aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/core-api/genericirq.rst16
-rw-r--r--Documentation/devicetree/bindings/arm/ccn.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/omap/crossbar.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/axi-clkgen.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/exynos4-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5250-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5410-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5420-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5440-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/zx296702-clk.txt4
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-sec4.txt4
-rw-r--r--Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt2
-rw-r--r--Documentation/devicetree/bindings/display/atmel,lcdc.txt4
-rw-r--r--Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt4
-rw-r--r--Documentation/devicetree/bindings/dma/zxdma.txt2
-rw-r--r--Documentation/devicetree/bindings/eeprom/at25.txt13
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-altera.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-pca953x.txt2
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-jz4780.txt2
-rw-r--r--Documentation/devicetree/bindings/iio/pressure/hp03.txt2
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/bu21013.txt2
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt4
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt2
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt2
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt2
-rw-r--r--Documentation/devicetree/bindings/mailbox/altera-mailbox.txt6
-rw-r--r--Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt2
-rw-r--r--Documentation/devicetree/bindings/media/exynos5-gsc.txt2
-rw-r--r--Documentation/devicetree/bindings/media/mediatek-vcodec.txt2
-rw-r--r--Documentation/devicetree/bindings/media/rcar_vin.txt2
-rw-r--r--Documentation/devicetree/bindings/media/samsung-fimc.txt2
-rw-r--r--Documentation/devicetree/bindings/media/sh_mobile_ceu.txt2
-rw-r--r--Documentation/devicetree/bindings/media/video-interfaces.txt10
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/ti/emif.txt2
-rw-r--r--Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/misc/brcm,kona-smc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt4
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nor.txt6
-rw-r--r--Documentation/devicetree/bindings/mtd/mtk-nand.txt2
-rw-r--r--Documentation/devicetree/bindings/net/altera_tse.txt4
-rw-r--r--Documentation/devicetree/bindings/net/mdio.txt2
-rw-r--r--Documentation/devicetree/bindings/net/socfpga-dwmac.txt2
-rw-r--r--Documentation/devicetree/bindings/nios2/nios2.txt2
-rw-r--r--Documentation/devicetree/bindings/pci/altera-pcie.txt2
-rw-r--r--Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt2
-rw-r--r--Documentation/devicetree/bindings/pci/hisilicon-pcie.txt2
-rw-r--r--Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt4
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt4
-rw-r--r--Documentation/devicetree/bindings/regulator/regulator.txt2
-rw-r--r--Documentation/devicetree/bindings/serial/efm32-uart.txt2
-rw-r--r--Documentation/devicetree/bindings/serio/allwinner,sun4i-ps2.txt2
-rw-r--r--Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/adi,axi-i2s.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/ak4613.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/ak4642.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/max98371.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/max9867.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,fsi.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip-spdif.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt8
-rw-r--r--Documentation/devicetree/bindings/spi/efm32-spi.txt2
-rw-r--r--Documentation/devicetree/bindings/thermal/thermal.txt12
-rw-r--r--Documentation/devicetree/bindings/ufs/ufs-qcom.txt4
-rw-r--r--Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/am33xx-usb.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/ehci-st.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/ohci-st.txt2
-rw-r--r--Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt2
-rw-r--r--Documentation/driver-api/dmaengine/client.rst2
-rw-r--r--Documentation/driver-api/pci.rst3
-rw-r--r--Documentation/media/dvb-drivers/frontends.rst30
-rw-r--r--Documentation/media/dvb-drivers/index.rst1
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt6
-rw-r--r--Documentation/virtual/kvm/api.txt15
-rw-r--r--MAINTAINERS36
-rw-r--r--Makefile2
-rw-r--r--arch/alpha/include/uapi/asm/Kbuild2
-rw-r--r--arch/arc/include/uapi/asm/Kbuild1
-rw-r--r--arch/arm/boot/dts/am33xx.dtsi2
-rw-r--r--arch/arm/boot/dts/am4372.dtsi6
-rw-r--r--arch/arm/boot/dts/am437x-cm-t43.dts4
-rw-r--r--arch/arm/boot/dts/armada-385-db-ap.dts1
-rw-r--r--arch/arm/boot/dts/armada-385-linksys.dtsi1
-rw-r--r--arch/arm/boot/dts/armada-385-synology-ds116.dts2
-rw-r--r--arch/arm/boot/dts/armada-388-gp.dts2
-rw-r--r--arch/arm/boot/dts/bcm-nsp.dtsi4
-rw-r--r--arch/arm/boot/dts/bcm283x.dtsi1
-rw-r--r--arch/arm/boot/dts/bcm958623hr.dts4
-rw-r--r--arch/arm/boot/dts/bcm958625hr.dts4
-rw-r--r--arch/arm/boot/dts/dm814x.dtsi2
-rw-r--r--arch/arm/boot/dts/imx53.dtsi9
-rw-r--r--arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts3
-rw-r--r--arch/arm/boot/dts/logicpd-som-lv.dtsi17
-rw-r--r--arch/arm/boot/dts/meson.dtsi18
-rw-r--r--arch/arm/boot/dts/nspire.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-beagle-xm.dts1
-rw-r--r--arch/arm/boot/dts/omap3-beagle.dts1
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3x.dtsi2
-rw-r--r--arch/arm/boot/dts/omap3-evm-common.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-gta04.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-igep0020-common.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-igep0030-common.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-lilly-a83x.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-overo-base.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-pandora-common.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-tao3530.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3.dtsi1
-rw-r--r--arch/arm/boot/dts/omap4-droid4-xt894.dts1
-rw-r--r--arch/arm/boot/dts/omap4-duovero.dtsi1
-rw-r--r--arch/arm/boot/dts/omap4-panda-common.dtsi1
-rw-r--r--arch/arm/boot/dts/omap4-var-som-om44.dtsi1
-rw-r--r--arch/arm/boot/dts/omap4.dtsi5
-rw-r--r--arch/arm/boot/dts/omap5-board-common.dtsi2
-rw-r--r--arch/arm/boot/dts/omap5-cm-t54.dts2
-rw-r--r--arch/arm/boot/dts/omap5.dtsi1
-rw-r--r--arch/arm/boot/dts/r8a7790.dtsi1
-rw-r--r--arch/arm/boot/dts/r8a7792.dtsi1
-rw-r--r--arch/arm/boot/dts/r8a7793.dtsi1
-rw-r--r--arch/arm/boot/dts/r8a7794.dtsi1
-rw-r--r--arch/arm/boot/dts/vf610-zii-dev-rev-c.dts2
-rw-r--r--arch/arm/include/asm/kvm_arm.h3
-rw-r--r--arch/arm/include/asm/kvm_host.h5
-rw-r--r--arch/arm/include/uapi/asm/Kbuild1
-rw-r--r--arch/arm/mach-meson/platsmp.c2
-rw-r--r--arch/arm/mach-omap2/cm_common.c6
-rw-r--r--arch/arm/mach-omap2/omap-secure.c21
-rw-r--r--arch/arm/mach-omap2/omap-secure.h4
-rw-r--r--arch/arm/mach-omap2/omap_device.c10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c1
-rw-r--r--arch/arm/mach-omap2/pm.h4
-rw-r--r--arch/arm/mach-omap2/pm34xx.c13
-rw-r--r--arch/arm/mach-omap2/prcm-common.h1
-rw-r--r--arch/arm/mach-omap2/prm33xx.c12
-rw-r--r--arch/arm/mach-omap2/sleep34xx.S26
-rw-r--r--arch/arm64/boot/dts/Makefile2
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi4
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxl.dtsi6
-rw-r--r--arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts1
-rw-r--r--arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts1
-rw-r--r--arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts3
-rw-r--r--arch/arm64/include/asm/efi.h4
-rw-r--r--arch/arm64/include/asm/kvm_arm.h3
-rw-r--r--arch/arm64/include/asm/kvm_host.h1
-rw-r--r--arch/arm64/include/asm/mmu_context.h46
-rw-r--r--arch/arm64/include/asm/perf_event.h2
-rw-r--r--arch/arm64/include/uapi/asm/bpf_perf_event.h9
-rw-r--r--arch/arm64/kernel/fpsimd.c51
-rw-r--r--arch/arm64/kernel/process.c9
-rw-r--r--arch/arm64/kvm/debug.c21
-rw-r--r--arch/arm64/kvm/handle_exit.c57
-rw-r--r--arch/arm64/kvm/hyp/switch.c37
-rw-r--r--arch/blackfin/include/uapi/asm/Kbuild1
-rw-r--r--arch/c6x/include/uapi/asm/Kbuild1
-rw-r--r--arch/cris/include/uapi/asm/Kbuild1
-rw-r--r--arch/frv/include/uapi/asm/Kbuild2
-rw-r--r--arch/h8300/include/uapi/asm/Kbuild1
-rw-r--r--arch/hexagon/include/uapi/asm/Kbuild1
-rw-r--r--arch/ia64/include/uapi/asm/Kbuild1
-rw-r--r--arch/m32r/include/uapi/asm/Kbuild1
-rw-r--r--arch/m68k/configs/stmark2_defconfig1
-rw-r--r--arch/m68k/include/uapi/asm/Kbuild1
-rw-r--r--arch/m68k/kernel/vmlinux-nommu.lds2
-rw-r--r--arch/m68k/kernel/vmlinux-std.lds2
-rw-r--r--arch/m68k/kernel/vmlinux-sun3.lds2
-rw-r--r--arch/metag/include/uapi/asm/Kbuild1
-rw-r--r--arch/microblaze/include/uapi/asm/Kbuild1
-rw-r--r--arch/mips/include/asm/Kbuild1
-rw-r--r--arch/mips/include/asm/serial.h22
-rw-r--r--arch/mips/include/uapi/asm/Kbuild1
-rw-r--r--arch/mn10300/include/uapi/asm/Kbuild1
-rw-r--r--arch/nios2/include/uapi/asm/Kbuild1
-rw-r--r--arch/openrisc/include/uapi/asm/Kbuild1
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild1
-rw-r--r--arch/powerpc/include/asm/machdep.h1
-rw-r--r--arch/powerpc/include/asm/setup.h1
-rw-r--r--arch/powerpc/include/uapi/asm/Kbuild1
-rw-r--r--arch/powerpc/kernel/cpu_setup_power.S2
-rw-r--r--arch/powerpc/kernel/fadump.c22
-rw-r--r--arch/powerpc/kernel/setup-common.c27
-rw-r--r--arch/powerpc/perf/core-book3s.c4
-rw-r--r--arch/powerpc/platforms/ps3/setup.c15
-rw-r--r--arch/powerpc/platforms/pseries/setup.c1
-rw-r--r--arch/powerpc/xmon/xmon.c10
-rw-r--r--arch/riscv/include/uapi/asm/Kbuild1
-rw-r--r--arch/s390/Kbuild1
-rw-r--r--arch/s390/appldata/Makefile1
-rw-r--r--arch/s390/boot/compressed/vmlinux.scr1
-rw-r--r--arch/s390/crypto/sha1_s390.c7
-rw-r--r--arch/s390/hypfs/Makefile1
-rw-r--r--arch/s390/include/asm/Kbuild1
-rw-r--r--arch/s390/include/asm/alternative.h1
-rw-r--r--arch/s390/include/asm/ap.h5
-rw-r--r--arch/s390/include/asm/bugs.h1
-rw-r--r--arch/s390/include/asm/perf_event.h1
-rw-r--r--arch/s390/include/asm/ptrace.h11
-rw-r--r--arch/s390/include/asm/segment.h1
-rw-r--r--arch/s390/include/asm/switch_to.h27
-rw-r--r--arch/s390/include/asm/vga.h1
-rw-r--r--arch/s390/include/uapi/asm/Kbuild1
-rw-r--r--arch/s390/include/uapi/asm/bpf_perf_event.h9
-rw-r--r--arch/s390/include/uapi/asm/perf_regs.h1
-rw-r--r--arch/s390/include/uapi/asm/ptrace.h125
-rw-r--r--arch/s390/include/uapi/asm/sthyi.h1
-rw-r--r--arch/s390/include/uapi/asm/virtio-ccw.h2
-rw-r--r--arch/s390/include/uapi/asm/vmcp.h1
-rw-r--r--arch/s390/kernel/alternative.c1
-rw-r--r--arch/s390/kernel/perf_regs.c1
-rw-r--r--arch/s390/kernel/syscalls.S6
-rw-r--r--arch/s390/kernel/vdso64/note.S1
-rw-r--r--arch/s390/kvm/Makefile5
-rw-r--r--arch/s390/kvm/diag.c5
-rw-r--r--arch/s390/kvm/gaccess.h5
-rw-r--r--arch/s390/kvm/guestdbg.c5
-rw-r--r--arch/s390/kvm/intercept.c5
-rw-r--r--arch/s390/kvm/interrupt.c5
-rw-r--r--arch/s390/kvm/irq.h5
-rw-r--r--arch/s390/kvm/kvm-s390.c11
-rw-r--r--arch/s390/kvm/kvm-s390.h5
-rw-r--r--arch/s390/kvm/priv.c16
-rw-r--r--arch/s390/kvm/sigp.c5
-rw-r--r--arch/s390/kvm/vsie.c5
-rw-r--r--arch/s390/mm/pgalloc.c2
-rw-r--r--arch/s390/net/Makefile1
-rw-r--r--arch/s390/numa/Makefile1
-rw-r--r--arch/s390/pci/Makefile1
-rw-r--r--arch/s390/tools/gen_opcode_table.c1
-rw-r--r--arch/score/include/uapi/asm/Kbuild1
-rw-r--r--arch/sh/include/uapi/asm/Kbuild1
-rw-r--r--arch/sparc/include/uapi/asm/Kbuild1
-rw-r--r--arch/tile/include/uapi/asm/Kbuild1
-rw-r--r--arch/unicore32/include/uapi/asm/Kbuild1
-rw-r--r--arch/x86/entry/vdso/vclock_gettime.c2
-rw-r--r--arch/x86/include/asm/cpufeatures.h1
-rw-r--r--arch/x86/include/asm/kmemcheck.h1
-rw-r--r--arch/x86/include/asm/kvm_emulate.h2
-rw-r--r--arch/x86/include/asm/kvm_host.h16
-rw-r--r--arch/x86/include/asm/segment.h12
-rw-r--r--arch/x86/include/asm/tlbflush.h35
-rw-r--r--arch/x86/include/uapi/asm/Kbuild1
-rw-r--r--arch/x86/kernel/apic/vector.c4
-rw-r--r--arch/x86/kernel/cpu/amd.c7
-rw-r--r--arch/x86/kernel/cpu/microcode/amd.c4
-rw-r--r--arch/x86/kernel/process.c2
-rw-r--r--arch/x86/kernel/smpboot.c2
-rw-r--r--arch/x86/kvm/emulate.c24
-rw-r--r--arch/x86/kvm/vmx.c6
-rw-r--r--arch/x86/kvm/x86.c63
-rw-r--r--arch/x86/mm/extable.c6
-rw-r--r--arch/x86/mm/fault.c2
-rw-r--r--arch/x86/mm/kmemcheck/error.c1
-rw-r--r--arch/x86/mm/kmemcheck/error.h1
-rw-r--r--arch/x86/mm/kmemcheck/opcode.c1
-rw-r--r--arch/x86/mm/kmemcheck/opcode.h1
-rw-r--r--arch/x86/mm/kmemcheck/pte.c1
-rw-r--r--arch/x86/mm/kmemcheck/pte.h1
-rw-r--r--arch/x86/mm/kmemcheck/selftest.c1
-rw-r--r--arch/x86/mm/kmemcheck/selftest.h1
-rw-r--r--arch/x86/mm/kmemcheck/shadow.h1
-rw-r--r--arch/x86/pci/broadcom_bus.c2
-rw-r--r--arch/x86/platform/uv/uv_nmi.c4
-rw-r--r--arch/x86/power/cpu.c21
-rw-r--r--arch/x86/xen/enlighten_pv.c37
-rw-r--r--arch/x86/xen/xen-asm_64.S14
-rw-r--r--arch/xtensa/include/uapi/asm/Kbuild1
-rw-r--r--crypto/asymmetric_keys/pkcs7_parser.c4
-rw-r--r--crypto/asymmetric_keys/pkcs7_trust.c2
-rw-r--r--crypto/asymmetric_keys/pkcs7_verify.c9
-rw-r--r--crypto/asymmetric_keys/public_key.c7
-rw-r--r--crypto/asymmetric_keys/x509_cert_parser.c2
-rw-r--r--crypto/asymmetric_keys/x509_public_key.c8
-rw-r--r--drivers/Makefile1
-rw-r--r--drivers/acpi/cppc_acpi.c23
-rw-r--r--drivers/acpi/device_pm.c2
-rw-r--r--drivers/android/binder.c40
-rw-r--r--drivers/base/Kconfig25
-rw-r--r--drivers/base/isa.c10
-rw-r--r--drivers/base/power/main.c15
-rw-r--r--drivers/bus/arm-cci.c7
-rw-r--r--drivers/bus/arm-ccn.c25
-rw-r--r--drivers/firmware/arm_scpi.c216
-rw-r--r--drivers/firmware/efi/efi.c5
-rw-r--r--drivers/firmware/efi/esrt.c17
-rw-r--r--drivers/firmware/efi/runtime-map.c10
-rw-r--r--drivers/firmware/google/vpd.c48
-rw-r--r--drivers/firmware/qemu_fw_cfg.c3
-rw-r--r--drivers/gpio/gpio-74x164.c4
-rw-r--r--drivers/gpio/gpio-davinci.c2
-rw-r--r--drivers/gpio/gpio-pca953x.c2
-rw-r--r--drivers/gpu/drm/amd/acp/Makefile21
-rw-r--r--drivers/gpu/drm/amd/amdgpu/Makefile22
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h24
-rw-r--r--drivers/gpu/drm/amd/amdkfd/Makefile22
-rw-r--r--drivers/gpu/drm/amd/display/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/bios/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/calcs/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_debug.c22
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc_helper.c22
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h23
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c23
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce112/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce120/Makefile23
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce80/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/gpio/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/i2caux/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h22
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h22
-rw-r--r--drivers/gpu/drm/amd/display/dc/irq/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/dc/virtual/Makefile21
-rw-r--r--drivers/gpu/drm/amd/display/modules/freesync/Makefile21
-rw-r--r--drivers/gpu/drm/amd/lib/Makefile21
-rw-r--r--drivers/gpu/drm/amd/powerplay/Makefile22
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/Makefile22
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c24
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/smu72.h24
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h24
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/Makefile22
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h24
-rw-r--r--drivers/gpu/drm/bridge/analogix/analogix_dp_core.c2
-rw-r--r--drivers/gpu/drm/drm_connector.c28
-rw-r--r--drivers/gpu/drm/drm_mode_config.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c46
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h5
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.c15
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gem.h2
-rw-r--r--drivers/gpu/drm/i915/gvt/cfg_space.c21
-rw-r--r--drivers/gpu/drm/i915/gvt/handlers.c47
-rw-r--r--drivers/gpu/drm/i915/gvt/mmio.h2
-rw-r--r--drivers/gpu/drm/i915/gvt/scheduler.c22
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c31
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h3
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c1
-rw-r--r--drivers/gpu/drm/i915/intel_display.c51
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c13
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc.c98
-rw-r--r--drivers/gpu/drm/vc4/vc4_bo.c3
-rw-r--r--drivers/hv/channel.c10
-rw-r--r--drivers/hv/channel_mgmt.c7
-rw-r--r--drivers/iio/adc/cpcap-adc.c2
-rw-r--r--drivers/iio/adc/meson_saradc.c52
-rw-r--r--drivers/iio/health/max30102.c2
-rw-r--r--drivers/iio/industrialio-core.c4
-rw-r--r--drivers/iio/proximity/sx9500.c9
-rw-r--r--drivers/infiniband/Kconfig2
-rw-r--r--drivers/infiniband/core/cma.c1
-rw-r--r--drivers/infiniband/core/device.c2
-rw-r--r--drivers/infiniband/core/security.c50
-rw-r--r--drivers/infiniband/hw/hfi1/rc.c2
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_alloc.c23
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_device.h4
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hem.c25
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hem.h1
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c22
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_cm.c31
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_ctrl.c43
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_d.h6
-rw-r--r--drivers/iommu/intel-iommu.c8
-rw-r--r--drivers/md/md.c4
-rw-r--r--drivers/md/raid1.c4
-rw-r--r--drivers/md/raid10.c4
-rw-r--r--drivers/md/raid5-cache.c22
-rw-r--r--drivers/md/raid5.c2
-rw-r--r--drivers/media/common/siano/smscoreapi.c66
-rw-r--r--drivers/media/dvb-core/dvb_ca_en50221.c68
-rw-r--r--drivers/media/dvb-core/dvb_frontend.c13
-rw-r--r--drivers/media/dvb-core/dvb_net.c15
-rw-r--r--drivers/media/dvb-frontends/af9013.h24
-rw-r--r--drivers/media/dvb-frontends/ascot2e.h9
-rw-r--r--drivers/media/dvb-frontends/cxd2820r.h24
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h12
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drx_driver.h878
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drxj.c248
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drxj.h220
-rw-r--r--drivers/media/dvb-frontends/drxk.h13
-rw-r--r--drivers/media/dvb-frontends/drxk_hard.c32
-rw-r--r--drivers/media/dvb-frontends/dvb-pll.h13
-rw-r--r--drivers/media/dvb-frontends/helene.h30
-rw-r--r--drivers/media/dvb-frontends/horus3a.h9
-rw-r--r--drivers/media/dvb-frontends/ix2505v.c6
-rw-r--r--drivers/media/dvb-frontends/ix2505v.h28
-rw-r--r--drivers/media/dvb-frontends/l64781.c2
-rw-r--r--drivers/media/dvb-frontends/m88ds3103.h155
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.h17
-rw-r--r--drivers/media/dvb-frontends/mn88472.h16
-rw-r--r--drivers/media/dvb-frontends/rtl2830.h1
-rw-r--r--drivers/media/dvb-frontends/rtl2832.h1
-rw-r--r--drivers/media/dvb-frontends/rtl2832_sdr.h6
-rw-r--r--drivers/media/dvb-frontends/sp887x.c6
-rw-r--r--drivers/media/dvb-frontends/stb6000.h11
-rw-r--r--drivers/media/dvb-frontends/stv0299.c2
-rw-r--r--drivers/media/dvb-frontends/tda10071.h1
-rw-r--r--drivers/media/dvb-frontends/tda826x.h11
-rw-r--r--drivers/media/dvb-frontends/tua6100.c2
-rw-r--r--drivers/media/dvb-frontends/tua6100.h2
-rw-r--r--drivers/media/dvb-frontends/zd1301_demod.h13
-rw-r--r--drivers/media/dvb-frontends/zl10036.c8
-rw-r--r--drivers/media/dvb-frontends/zl10036.h16
-rw-r--r--drivers/media/i2c/Kconfig1
-rw-r--r--drivers/media/i2c/et8ek8/Kconfig1
-rw-r--r--drivers/media/i2c/imx274.c5
-rw-r--r--drivers/media/i2c/lm3560.c1
-rw-r--r--drivers/media/i2c/m5mols/m5mols_capture.c5
-rw-r--r--drivers/media/i2c/m5mols/m5mols_controls.c1
-rw-r--r--drivers/media/i2c/m5mols/m5mols_core.c20
-rw-r--r--drivers/media/i2c/ov5647.c4
-rw-r--r--drivers/media/i2c/s5k6a3.c3
-rw-r--r--drivers/media/i2c/s5k6aa.c5
-rw-r--r--drivers/media/i2c/tvp514x.c12
-rw-r--r--drivers/media/pci/netup_unidvb/netup_unidvb_core.c8
-rw-r--r--drivers/media/pci/solo6x10/solo6x10-enc.c2
-rw-r--r--drivers/media/pci/sta2x11/sta2x11_vip.c11
-rw-r--r--drivers/media/pci/tw68/tw68-risc.c33
-rw-r--r--drivers/media/platform/davinci/vpif.c3
-rw-r--r--drivers/media/platform/davinci/vpif_capture.c27
-rw-r--r--drivers/media/platform/davinci/vpif_display.c16
-rw-r--r--drivers/media/platform/exynos4-is/fimc-capture.c3
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.c11
-rw-r--r--drivers/media/platform/exynos4-is/mipi-csis.c2
-rw-r--r--drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c1
-rw-r--r--drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c1
-rw-r--r--drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c4
-rw-r--r--drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c2
-rw-r--r--drivers/media/platform/mtk-vpu/mtk_vpu.c3
-rw-r--r--drivers/media/platform/pxa_camera.c9
-rw-r--r--drivers/media/platform/rcar_fdp1.c2
-rw-r--r--drivers/media/platform/rcar_jpu.c4
-rw-r--r--drivers/media/platform/s3c-camif/camif-core.c1
-rw-r--r--drivers/media/platform/sh_veu.c2
-rw-r--r--drivers/media/platform/soc_camera/soc_scale_crop.c21
-rw-r--r--drivers/media/platform/sti/hva/hva-h264.c18
-rw-r--r--drivers/media/platform/ti-vpe/vpe.c2
-rw-r--r--drivers/media/platform/vim2m.c2
-rw-r--r--drivers/media/platform/vsp1/vsp1_dl.c1
-rw-r--r--drivers/media/radio/radio-si476x.c18
-rw-r--r--drivers/media/radio/radio-wl1273.c2
-rw-r--r--drivers/media/rc/img-ir/img-ir-hw.c2
-rw-r--r--drivers/media/rc/imon.c40
-rw-r--r--drivers/media/rc/ir-jvc-decoder.c2
-rw-r--r--drivers/media/rc/ir-lirc-codec.c4
-rw-r--r--drivers/media/rc/ir-nec-decoder.c3
-rw-r--r--drivers/media/rc/ir-sanyo-decoder.c2
-rw-r--r--drivers/media/rc/ir-sharp-decoder.c2
-rw-r--r--drivers/media/rc/ir-xmp-decoder.c2
-rw-r--r--drivers/media/rc/rc-ir-raw.c2
-rw-r--r--drivers/media/rc/rc-main.c78
-rw-r--r--drivers/media/rc/sir_ir.c40
-rw-r--r--drivers/media/rc/st_rc.c6
-rw-r--r--drivers/media/rc/streamzap.c6
-rw-r--r--drivers/media/tuners/mt2063.c6
-rw-r--r--drivers/media/usb/dvb-usb/cinergyT2-fe.c2
-rw-r--r--drivers/media/usb/dvb-usb/dib0700_devices.c8
-rw-r--r--drivers/media/usb/dvb-usb/dibusb-common.c16
-rw-r--r--drivers/media/usb/dvb-usb/friio-fe.c2
-rw-r--r--drivers/media/usb/dvb-usb/friio.c2
-rw-r--r--drivers/media/usb/gspca/ov519.c2
-rw-r--r--drivers/media/usb/pwc/pwc-dec23.c7
-rw-r--r--drivers/media/usb/siano/smsusb.c4
-rw-r--r--drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c6
-rw-r--r--drivers/media/usb/usbtv/usbtv-core.c1
-rw-r--r--drivers/media/v4l2-core/tuner-core.c4
-rw-r--r--drivers/media/v4l2-core/v4l2-async.c3
-rw-r--r--drivers/media/v4l2-core/v4l2-dv-timings.c10
-rw-r--r--drivers/media/v4l2-core/v4l2-fwnode.c10
-rw-r--r--drivers/media/v4l2-core/v4l2-mem2mem.c2
-rw-r--r--drivers/media/v4l2-core/videobuf-core.c2
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c56
-rw-r--r--drivers/media/v4l2-core/videobuf2-memops.c2
-rw-r--r--drivers/media/v4l2-core/videobuf2-v4l2.c10
-rw-r--r--drivers/net/can/flexcan.c9
-rw-r--r--drivers/net/can/peak_canfd/peak_canfd.c9
-rw-r--r--drivers/net/can/peak_canfd/peak_pciefd_main.c5
-rw-r--r--drivers/net/can/sja1000/peak_pci.c5
-rw-r--r--drivers/net/can/ti_hecc.c3
-rw-r--r--drivers/net/can/usb/ems_usb.c2
-rw-r--r--drivers/net/can/usb/esd_usb2.c2
-rw-r--r--drivers/net/can/usb/kvaser_usb.c13
-rw-r--r--drivers/net/can/usb/mcba_usb.c4
-rw-r--r--drivers/net/can/usb/usb_8dev.c2
-rw-r--r--drivers/net/dsa/bcm_sf2.c1
-rw-r--r--drivers/net/dsa/bcm_sf2_cfp.c4
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c34
-rw-r--r--drivers/net/ethernet/arc/emac_rockchip.c7
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c9
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c55
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_main.c2
-rw-r--r--drivers/net/ethernet/cavium/thunder/nicvf_queues.c2
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c11
-rw-r--r--drivers/net/ethernet/marvell/mvmdio.c3
-rw-r--r--drivers/net/ethernet/marvell/mvpp2.c4
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_repr.c15
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c1
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c8
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c31
-rw-r--r--drivers/net/ethernet/sfc/tx.c5
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c3
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c1
-rw-r--r--drivers/net/ipvlan/ipvlan_core.c1
-rw-r--r--drivers/net/phy/micrel.c6
-rw-r--r--drivers/net/phy/phylink.c1
-rw-r--r--drivers/net/phy/sfp.c41
-rw-r--r--drivers/net/tap.c14
-rw-r--r--drivers/net/tun.c24
-rw-r--r--drivers/net/usb/qmi_wwan.c2
-rw-r--r--drivers/net/usb/usbnet.c5
-rw-r--r--drivers/net/virtio_net.c2
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/api/txq.h4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/dbg.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-trans.h4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mvm.h3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c1
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c18
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c53
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/time-event.c24
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tx.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/utils.c13
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/drv.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/trans.c10
-rw-r--r--drivers/net/xen-netback/interface.c2
-rw-r--r--drivers/of/dynamic.c4
-rw-r--r--drivers/of/overlay.c84
-rw-r--r--drivers/of/unittest.c1
-rw-r--r--drivers/pci/pci-driver.c2
-rw-r--r--drivers/pinctrl/intel/pinctrl-denverton.c2
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c13
-rw-r--r--drivers/pinctrl/pinctrl-gemini.c2
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c2
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c6
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c6
-rw-r--r--drivers/s390/Makefile1
-rw-r--r--drivers/s390/block/Kconfig1
-rw-r--r--drivers/s390/block/dasd.c10
-rw-r--r--drivers/s390/block/dasd_eckd.c16
-rw-r--r--drivers/s390/block/dasd_int.h2
-rw-r--r--drivers/s390/char/Kconfig1
-rw-r--r--drivers/s390/char/defkeymap.map1
-rw-r--r--drivers/s390/cio/blacklist.h1
-rw-r--r--drivers/s390/cio/qdio_main.c7
-rw-r--r--drivers/s390/net/Kconfig1
-rw-r--r--drivers/s390/net/qeth_core.h3
-rw-r--r--drivers/s390/net/qeth_core_main.c31
-rw-r--r--drivers/s390/net/qeth_l2_main.c4
-rw-r--r--drivers/s390/net/qeth_l3_main.c7
-rw-r--r--drivers/s390/scsi/Makefile1
-rw-r--r--drivers/scsi/aacraid/aacraid.h1
-rw-r--r--drivers/scsi/aacraid/commsup.c35
-rw-r--r--drivers/scsi/aacraid/linit.c3
-rw-r--r--drivers/scsi/aacraid/rx.c15
-rw-r--r--drivers/scsi/aacraid/src.c20
-rw-r--r--drivers/scsi/scsi_lib.c10
-rw-r--r--drivers/scsi/ufs/ufshcd.c7
-rw-r--r--drivers/soc/amlogic/meson-gx-socinfo.c4
-rw-r--r--drivers/staging/ccree/ssi_hash.c9
-rw-r--r--drivers/staging/comedi/drivers/ni_atmio.c5
-rw-r--r--drivers/staging/lustre/lnet/lnet/lib-socket.c8
-rw-r--r--drivers/staging/media/atomisp/include/linux/atomisp.h34
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h16
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c26
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h34
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h18
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h98
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h78
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h144
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h38
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h216
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h32
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h22
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h52
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h40
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h18
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h68
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h14
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h62
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h120
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h32
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h112
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h24
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h128
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h12
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h90
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h148
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h30
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h258
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h36
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h34
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h20
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h12
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h38
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de_types.h10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2_types.h10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8_types.h82
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats_types.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h14
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc_types.h32
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h14
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_types.h26
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h16
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_types.h12
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h12
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h26
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_types.h8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane_types.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h98
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h42
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h104
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h20
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h40
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h38
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h26
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h14
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h20
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h30
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h28
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h40
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/memory_realloc.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h30
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/src/event.c4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/src/eventq.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame.h22
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h6
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h28
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h22
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c26
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h20
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl_comm.h14
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/timer/src/timer.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c68
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h22
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h4
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c18
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h2
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c6
-rw-r--r--drivers/staging/rtl8188eu/os_dep/ioctl_linux.c14
-rw-r--r--drivers/tee/optee/core.c1
-rw-r--r--drivers/tty/serdev/serdev-ttyport.c26
-rw-r--r--drivers/tty/serial/8250/8250_early.c14
-rw-r--r--drivers/tty/serial/8250/8250_pci.c3
-rw-r--r--drivers/usb/common/ulpi.c4
-rw-r--r--drivers/usb/core/config.c28
-rw-r--r--drivers/usb/core/devio.c14
-rw-r--r--drivers/usb/core/hub.c9
-rw-r--r--drivers/usb/core/quirks.c3
-rw-r--r--drivers/usb/gadget/Kconfig4
-rw-r--r--drivers/usb/gadget/composite.c7
-rw-r--r--drivers/usb/gadget/function/f_fs.c15
-rw-r--r--drivers/usb/gadget/legacy/Kconfig10
-rw-r--r--drivers/usb/gadget/udc/bdc/bdc_core.c1
-rw-r--r--drivers/usb/gadget/udc/core.c8
-rw-r--r--drivers/usb/gadget/udc/renesas_usb3.c2
-rw-r--r--drivers/usb/host/ehci-dbg.c2
-rw-r--r--drivers/usb/host/xhci-mem.c7
-rw-r--r--drivers/usb/host/xhci-ring.c12
-rw-r--r--drivers/usb/serial/option.c3
-rw-r--r--drivers/usb/serial/usb_debug.c2
-rw-r--r--drivers/usb/storage/uas-detect.h4
-rw-r--r--drivers/usb/typec/Kconfig54
-rw-r--r--drivers/usb/typec/ucsi/Kconfig1
-rw-r--r--drivers/usb/usbip/vhci_hcd.c1
-rw-r--r--drivers/vhost/net.c20
-rw-r--r--drivers/virtio/virtio.c2
-rw-r--r--drivers/virtio/virtio_balloon.c3
-rw-r--r--drivers/virtio/virtio_mmio.c57
-rw-r--r--drivers/xen/pvcalls-front.c4
-rw-r--r--fs/btrfs/ctree.c18
-rw-r--r--fs/btrfs/disk-io.c12
-rw-r--r--fs/btrfs/extent-tree.c1
-rw-r--r--fs/btrfs/inode.c2
-rw-r--r--fs/btrfs/ioctl.c2
-rw-r--r--fs/hpfs/dir.c1
-rw-r--r--fs/hpfs/dnode.c2
-rw-r--r--fs/hpfs/super.c1
-rw-r--r--fs/proc/base.c2
-rw-r--r--include/drm/drm_connector.h8
-rw-r--r--include/kvm/arm_arch_timer.h3
-rw-r--r--include/linux/debugfs.h2
-rw-r--r--include/linux/dma-mapping.h2
-rw-r--r--include/linux/hyperv.h1
-rw-r--r--include/linux/iio/timer/stm32-lptim-trigger.h5
-rw-r--r--include/linux/irqdesc.h6
-rw-r--r--include/linux/kmemcheck.h1
-rw-r--r--include/linux/kvm_host.h2
-rw-r--r--include/linux/perf_event.h6
-rw-r--r--include/linux/pm.h1
-rw-r--r--include/linux/rculist_nulls.h38
-rw-r--r--include/linux/serdev.h2
-rw-r--r--include/linux/skbuff.h3
-rw-r--r--include/linux/sysfs.h6
-rw-r--r--include/linux/tcp.h3
-rw-r--r--include/linux/usb/usbnet.h1
-rw-r--r--include/net/red.h13
-rw-r--r--include/net/sctp/structs.h3
-rw-r--r--include/net/sock.h6
-rw-r--r--include/net/tc_act/tc_sample.h1
-rw-r--r--include/net/tcp.h5
-rw-r--r--include/scsi/libsas.h2
-rw-r--r--include/trace/events/xdp.h1
-rw-r--r--include/uapi/asm-generic/bpf_perf_event.h9
-rw-r--r--include/uapi/linux/bpf_perf_event.h5
-rw-r--r--include/uapi/linux/kvm.h4
-rw-r--r--include/uapi/linux/usb/ch9.h3
-rw-r--r--kernel/bpf/core.c3
-rw-r--r--kernel/bpf/offload.c15
-rw-r--r--kernel/cpu.c14
-rw-r--r--kernel/debug/kdb/kdb_io.c2
-rw-r--r--kernel/events/core.c7
-rw-r--r--kernel/futex.c4
-rw-r--r--kernel/irq/matrix.c4
-rw-r--r--kernel/locking/lockdep.c3
-rw-r--r--kernel/printk/printk.c3
-rw-r--r--kernel/sched/fair.c102
-rw-r--r--kernel/sched/wait.c2
-rw-r--r--kernel/trace/bpf_trace.c8
-rw-r--r--lib/asn1_decoder.c49
-rw-r--r--lib/nlattr.c22
-rw-r--r--lib/oid_registry.c16
-rw-r--r--mm/kmemcheck.c1
-rw-r--r--net/9p/trans_fd.c1
-rw-r--r--net/core/dev.c2
-rw-r--r--net/dccp/minisocks.c6
-rw-r--r--net/dccp/proto.c5
-rw-r--r--net/ipv4/inet_timewait_sock.c6
-rw-r--r--net/ipv4/tcp.c1
-rw-r--r--net/ipv4/tcp_bbr.c12
-rw-r--r--net/ipv4/tcp_input.c12
-rw-r--r--net/ipv4/tcp_ipv4.c59
-rw-r--r--net/ipv4/tcp_minisocks.c6
-rw-r--r--net/ipv4/tcp_rate.c10
-rw-r--r--net/ipv4/tcp_recovery.c28
-rw-r--r--net/ipv6/ip6_tunnel.c2
-rw-r--r--net/ipv6/sit.c1
-rw-r--r--net/ipv6/tcp_ipv6.c11
-rw-r--r--net/kcm/kcmsock.c68
-rw-r--r--net/rds/rdma.c2
-rw-r--r--net/rxrpc/af_rxrpc.c5
-rw-r--r--net/rxrpc/call_event.c4
-rw-r--r--net/rxrpc/conn_event.c50
-rw-r--r--net/rxrpc/conn_object.c2
-rw-r--r--net/rxrpc/input.c4
-rw-r--r--net/rxrpc/sendmsg.c2
-rw-r--r--net/sched/act_sample.c14
-rw-r--r--net/sched/sch_choke.c3
-rw-r--r--net/sched/sch_generic.c3
-rw-r--r--net/sched/sch_gred.c3
-rw-r--r--net/sched/sch_red.c2
-rw-r--r--net/sched/sch_sfq.c3
-rw-r--r--net/sctp/chunk.c11
-rw-r--r--net/sctp/outqueue.c19
-rw-r--r--net/sctp/socket.c1
-rw-r--r--net/socket.c110
-rw-r--r--net/tipc/server.c3
-rw-r--r--net/tipc/udp_media.c4
-rw-r--r--net/vmw_vsock/hyperv_transport.c2
-rw-r--r--samples/bpf/bpf_load.c14
-rwxr-xr-xscripts/kernel-doc2
-rw-r--r--security/keys/key.c1
-rw-r--r--security/keys/keyctl.c24
-rw-r--r--security/keys/request_key.c48
-rw-r--r--sound/core/pcm.c2
-rw-r--r--sound/core/seq/seq_timer.c2
-rw-r--r--sound/pci/hda/patch_realtek.c8
-rw-r--r--sound/usb/mixer.c13
-rw-r--r--tools/arch/arm/include/uapi/asm/kvm.h7
-rw-r--r--tools/arch/arm64/include/uapi/asm/bpf_perf_event.h9
-rw-r--r--tools/arch/arm64/include/uapi/asm/kvm.h7
-rw-r--r--tools/arch/s390/include/uapi/asm/bpf_perf_event.h9
-rw-r--r--tools/arch/s390/include/uapi/asm/kvm.h4
-rw-r--r--tools/arch/s390/include/uapi/asm/kvm_perf.h4
-rw-r--r--tools/arch/s390/include/uapi/asm/ptrace.h457
-rw-r--r--tools/arch/x86/include/asm/cpufeatures.h537
-rw-r--r--tools/arch/x86/include/asm/disabled-features.h8
-rw-r--r--tools/bpf/bpftool/Documentation/Makefile2
-rw-r--r--tools/bpf/bpftool/Makefile7
-rw-r--r--tools/bpf/bpftool/main.c36
-rw-r--r--tools/bpf/bpftool/main.h5
-rw-r--r--tools/hv/hv_kvp_daemon.c70
-rw-r--r--tools/include/linux/kmemcheck.h1
-rw-r--r--tools/include/uapi/asm-generic/bpf_perf_event.h9
-rw-r--r--tools/include/uapi/asm-generic/mman.h1
-rw-r--r--tools/include/uapi/drm/drm.h41
-rw-r--r--tools/include/uapi/drm/i915_drm.h33
-rw-r--r--tools/include/uapi/linux/bpf_perf_event.h6
-rw-r--r--tools/include/uapi/linux/kcmp.h1
-rw-r--r--tools/include/uapi/linux/kvm.h1
-rw-r--r--tools/include/uapi/linux/perf_event.h1
-rw-r--r--tools/include/uapi/linux/prctl.h10
-rw-r--r--tools/objtool/Makefile8
-rw-r--r--tools/objtool/orc_dump.c7
-rw-r--r--tools/perf/arch/s390/Makefile1
-rw-r--r--tools/perf/arch/s390/util/dwarf-regs.c32
-rw-r--r--tools/perf/bench/numa.c56
-rw-r--r--tools/perf/builtin-help.c4
-rw-r--r--tools/perf/builtin-record.c42
-rw-r--r--tools/perf/builtin-report.c3
-rw-r--r--tools/perf/builtin-script.c31
-rw-r--r--tools/perf/builtin-top.c36
-rw-r--r--tools/perf/builtin-trace.c6
-rwxr-xr-xtools/perf/check-headers.sh1
-rwxr-xr-xtools/perf/tests/shell/trace+probe_libc_inet_pton.sh7
-rwxr-xr-xtools/perf/tests/shell/trace+probe_vfs_getname.sh6
-rw-r--r--tools/perf/tests/task-exit.c4
-rw-r--r--tools/perf/trace/beauty/mmap.c3
-rw-r--r--tools/perf/util/annotate.c18
-rw-r--r--tools/perf/util/evlist.c14
-rw-r--r--tools/perf/util/evlist.h2
-rw-r--r--tools/perf/util/evsel.c14
-rw-r--r--tools/perf/util/evsel.h1
-rw-r--r--tools/perf/util/intel-pt-decoder/inat.h10
-rw-r--r--tools/perf/util/intel-pt-decoder/x86-opcode-map.txt2
-rw-r--r--tools/perf/util/machine.c3
-rw-r--r--tools/perf/util/parse-events.c2
-rw-r--r--tools/perf/util/parse-events.h3
-rw-r--r--tools/perf/util/pmu.c5
-rw-r--r--tools/testing/selftests/bpf/Makefile14
-rw-r--r--tools/testing/selftests/bpf/test_verifier_log.c7
-rw-r--r--tools/usb/usbip/libsrc/vhci_driver.c14
-rw-r--r--virt/kvm/arm/arch_timer.c11
-rw-r--r--virt/kvm/arm/arm.c7
-rw-r--r--virt/kvm/arm/hyp/timer-sr.c48
-rw-r--r--virt/kvm/arm/hyp/vgic-v2-sr.c4
-rw-r--r--virt/kvm/arm/vgic/vgic-irqfd.c3
-rw-r--r--virt/kvm/arm/vgic/vgic-its.c4
-rw-r--r--virt/kvm/arm/vgic/vgic-v3.c2
-rw-r--r--virt/kvm/arm/vgic/vgic-v4.c6
-rw-r--r--virt/kvm/arm/vgic/vgic.c8
-rw-r--r--virt/kvm/kvm_main.c8
931 files changed, 8280 insertions, 5269 deletions
diff --git a/Documentation/core-api/genericirq.rst b/Documentation/core-api/genericirq.rst
index 0054bd48be84..4da67b65cecf 100644
--- a/Documentation/core-api/genericirq.rst
+++ b/Documentation/core-api/genericirq.rst
@@ -225,9 +225,9 @@ interrupts.
225 225
226The following control flow is implemented (simplified excerpt):: 226The following control flow is implemented (simplified excerpt)::
227 227
228 :c:func:`desc->irq_data.chip->irq_mask_ack`; 228 desc->irq_data.chip->irq_mask_ack();
229 handle_irq_event(desc->action); 229 handle_irq_event(desc->action);
230 :c:func:`desc->irq_data.chip->irq_unmask`; 230 desc->irq_data.chip->irq_unmask();
231 231
232 232
233Default Fast EOI IRQ flow handler 233Default Fast EOI IRQ flow handler
@@ -239,7 +239,7 @@ which only need an EOI at the end of the handler.
239The following control flow is implemented (simplified excerpt):: 239The following control flow is implemented (simplified excerpt)::
240 240
241 handle_irq_event(desc->action); 241 handle_irq_event(desc->action);
242 :c:func:`desc->irq_data.chip->irq_eoi`; 242 desc->irq_data.chip->irq_eoi();
243 243
244 244
245Default Edge IRQ flow handler 245Default Edge IRQ flow handler
@@ -251,15 +251,15 @@ interrupts.
251The following control flow is implemented (simplified excerpt):: 251The following control flow is implemented (simplified excerpt)::
252 252
253 if (desc->status & running) { 253 if (desc->status & running) {
254 :c:func:`desc->irq_data.chip->irq_mask_ack`; 254 desc->irq_data.chip->irq_mask_ack();
255 desc->status |= pending | masked; 255 desc->status |= pending | masked;
256 return; 256 return;
257 } 257 }
258 :c:func:`desc->irq_data.chip->irq_ack`; 258 desc->irq_data.chip->irq_ack();
259 desc->status |= running; 259 desc->status |= running;
260 do { 260 do {
261 if (desc->status & masked) 261 if (desc->status & masked)
262 :c:func:`desc->irq_data.chip->irq_unmask`; 262 desc->irq_data.chip->irq_unmask();
263 desc->status &= ~pending; 263 desc->status &= ~pending;
264 handle_irq_event(desc->action); 264 handle_irq_event(desc->action);
265 } while (status & pending); 265 } while (status & pending);
@@ -293,10 +293,10 @@ simplified version without locking.
293The following control flow is implemented (simplified excerpt):: 293The following control flow is implemented (simplified excerpt)::
294 294
295 if (desc->irq_data.chip->irq_ack) 295 if (desc->irq_data.chip->irq_ack)
296 :c:func:`desc->irq_data.chip->irq_ack`; 296 desc->irq_data.chip->irq_ack();
297 handle_irq_event(desc->action); 297 handle_irq_event(desc->action);
298 if (desc->irq_data.chip->irq_eoi) 298 if (desc->irq_data.chip->irq_eoi)
299 :c:func:`desc->irq_data.chip->irq_eoi`; 299 desc->irq_data.chip->irq_eoi();
300 300
301 301
302EOI Edge IRQ flow handler 302EOI Edge IRQ flow handler
diff --git a/Documentation/devicetree/bindings/arm/ccn.txt b/Documentation/devicetree/bindings/arm/ccn.txt
index 29801456c9ee..43b5a71a5a9d 100644
--- a/Documentation/devicetree/bindings/arm/ccn.txt
+++ b/Documentation/devicetree/bindings/arm/ccn.txt
@@ -15,7 +15,7 @@ Required properties:
15 15
16Example: 16Example:
17 17
18 ccn@0x2000000000 { 18 ccn@2000000000 {
19 compatible = "arm,ccn-504"; 19 compatible = "arm,ccn-504";
20 reg = <0x20 0x00000000 0 0x1000000>; 20 reg = <0x20 0x00000000 0 0x1000000>;
21 interrupts = <0 181 4>; 21 interrupts = <0 181 4>;
diff --git a/Documentation/devicetree/bindings/arm/omap/crossbar.txt b/Documentation/devicetree/bindings/arm/omap/crossbar.txt
index bb5727ae004a..ecb360ed0e33 100644
--- a/Documentation/devicetree/bindings/arm/omap/crossbar.txt
+++ b/Documentation/devicetree/bindings/arm/omap/crossbar.txt
@@ -49,7 +49,7 @@ An interrupt consumer on an SoC using crossbar will use:
49 interrupts = <GIC_SPI request_number interrupt_level> 49 interrupts = <GIC_SPI request_number interrupt_level>
50 50
51Example: 51Example:
52 device_x@0x4a023000 { 52 device_x@4a023000 {
53 /* Crossbar 8 used */ 53 /* Crossbar 8 used */
54 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 54 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
55 ... 55 ...
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt
index 866d93421eba..f9632bacbd04 100644
--- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt
+++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt
@@ -8,7 +8,7 @@ Required properties:
8- interrupts : Should contain MC General interrupt. 8- interrupts : Should contain MC General interrupt.
9 9
10Example: 10Example:
11 memory-controller@0x7000f000 { 11 memory-controller@7000f000 {
12 compatible = "nvidia,tegra20-mc"; 12 compatible = "nvidia,tegra20-mc";
13 reg = <0x7000f000 0x024 13 reg = <0x7000f000 0x024
14 0x7000f03c 0x3c4>; 14 0x7000f03c 0x3c4>;
diff --git a/Documentation/devicetree/bindings/clock/axi-clkgen.txt b/Documentation/devicetree/bindings/clock/axi-clkgen.txt
index fb40da303d25..aca94fe9416f 100644
--- a/Documentation/devicetree/bindings/clock/axi-clkgen.txt
+++ b/Documentation/devicetree/bindings/clock/axi-clkgen.txt
@@ -17,7 +17,7 @@ Optional properties:
17- clock-output-names : From common clock binding. 17- clock-output-names : From common clock binding.
18 18
19Example: 19Example:
20 clock@0xff000000 { 20 clock@ff000000 {
21 compatible = "adi,axi-clkgen"; 21 compatible = "adi,axi-clkgen";
22 #clock-cells = <0>; 22 #clock-cells = <0>;
23 reg = <0xff000000 0x1000>; 23 reg = <0xff000000 0x1000>;
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
index 7a837d2182ac..4acfc8f641b6 100644
--- a/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
@@ -23,7 +23,7 @@ Example:
23 clocks = <&clk_osc>; 23 clocks = <&clk_osc>;
24 }; 24 };
25 25
26 aux: aux@0x7e215004 { 26 aux: aux@7e215004 {
27 compatible = "brcm,bcm2835-aux"; 27 compatible = "brcm,bcm2835-aux";
28 #clock-cells = <1>; 28 #clock-cells = <1>;
29 reg = <0x7e215000 0x8>; 29 reg = <0x7e215000 0x8>;
diff --git a/Documentation/devicetree/bindings/clock/exynos4-clock.txt b/Documentation/devicetree/bindings/clock/exynos4-clock.txt
index bc61c952cb0b..17bb11365354 100644
--- a/Documentation/devicetree/bindings/clock/exynos4-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos4-clock.txt
@@ -24,7 +24,7 @@ tree sources.
24 24
25Example 1: An example of a clock controller node is listed below. 25Example 1: An example of a clock controller node is listed below.
26 26
27 clock: clock-controller@0x10030000 { 27 clock: clock-controller@10030000 {
28 compatible = "samsung,exynos4210-clock"; 28 compatible = "samsung,exynos4210-clock";
29 reg = <0x10030000 0x20000>; 29 reg = <0x10030000 0x20000>;
30 #clock-cells = <1>; 30 #clock-cells = <1>;
diff --git a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt
index 536eacd1063f..aff266a12eeb 100644
--- a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt
@@ -22,7 +22,7 @@ tree sources.
22 22
23Example 1: An example of a clock controller node is listed below. 23Example 1: An example of a clock controller node is listed below.
24 24
25 clock: clock-controller@0x10010000 { 25 clock: clock-controller@10010000 {
26 compatible = "samsung,exynos5250-clock"; 26 compatible = "samsung,exynos5250-clock";
27 reg = <0x10010000 0x30000>; 27 reg = <0x10010000 0x30000>;
28 #clock-cells = <1>; 28 #clock-cells = <1>;
diff --git a/Documentation/devicetree/bindings/clock/exynos5410-clock.txt b/Documentation/devicetree/bindings/clock/exynos5410-clock.txt
index 4527de3ea205..c68b0d29b3d0 100644
--- a/Documentation/devicetree/bindings/clock/exynos5410-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos5410-clock.txt
@@ -30,7 +30,7 @@ Example 1: An example of a clock controller node is listed below.
30 #clock-cells = <0>; 30 #clock-cells = <0>;
31 }; 31 };
32 32
33 clock: clock-controller@0x10010000 { 33 clock: clock-controller@10010000 {
34 compatible = "samsung,exynos5410-clock"; 34 compatible = "samsung,exynos5410-clock";
35 reg = <0x10010000 0x30000>; 35 reg = <0x10010000 0x30000>;
36 #clock-cells = <1>; 36 #clock-cells = <1>;
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
index d54f42cf0440..717a7b1531c7 100644
--- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
@@ -23,7 +23,7 @@ tree sources.
23 23
24Example 1: An example of a clock controller node is listed below. 24Example 1: An example of a clock controller node is listed below.
25 25
26 clock: clock-controller@0x10010000 { 26 clock: clock-controller@10010000 {
27 compatible = "samsung,exynos5420-clock"; 27 compatible = "samsung,exynos5420-clock";
28 reg = <0x10010000 0x30000>; 28 reg = <0x10010000 0x30000>;
29 #clock-cells = <1>; 29 #clock-cells = <1>;
diff --git a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt
index 5f7005f73058..c7d227c31e95 100644
--- a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt
@@ -21,7 +21,7 @@ tree sources.
21 21
22Example: An example of a clock controller node is listed below. 22Example: An example of a clock controller node is listed below.
23 23
24 clock: clock-controller@0x10010000 { 24 clock: clock-controller@10010000 {
25 compatible = "samsung,exynos5440-clock"; 25 compatible = "samsung,exynos5440-clock";
26 reg = <0x160000 0x10000>; 26 reg = <0x160000 0x10000>;
27 #clock-cells = <1>; 27 #clock-cells = <1>;
diff --git a/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt b/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt
index 3e6a81e99804..c35cb6c4af4d 100644
--- a/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt
+++ b/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt
@@ -14,7 +14,7 @@ Required properties:
14 14
15Example: 15Example:
16 16
17pllctrl: pll-controller@0x02310000 { 17pllctrl: pll-controller@02310000 {
18 compatible = "ti,keystone-pllctrl", "syscon"; 18 compatible = "ti,keystone-pllctrl", "syscon";
19 reg = <0x02310000 0x200>; 19 reg = <0x02310000 0x200>;
20}; 20};
diff --git a/Documentation/devicetree/bindings/clock/zx296702-clk.txt b/Documentation/devicetree/bindings/clock/zx296702-clk.txt
index e85ecb510d56..5c91c9e4f1be 100644
--- a/Documentation/devicetree/bindings/clock/zx296702-clk.txt
+++ b/Documentation/devicetree/bindings/clock/zx296702-clk.txt
@@ -20,13 +20,13 @@ ID in its "clocks" phandle cell. See include/dt-bindings/clock/zx296702-clock.h
20for the full list of zx296702 clock IDs. 20for the full list of zx296702 clock IDs.
21 21
22 22
23topclk: topcrm@0x09800000 { 23topclk: topcrm@09800000 {
24 compatible = "zte,zx296702-topcrm-clk"; 24 compatible = "zte,zx296702-topcrm-clk";
25 reg = <0x09800000 0x1000>; 25 reg = <0x09800000 0x1000>;
26 #clock-cells = <1>; 26 #clock-cells = <1>;
27}; 27};
28 28
29uart0: serial@0x09405000 { 29uart0: serial@09405000 {
30 compatible = "zte,zx296702-uart"; 30 compatible = "zte,zx296702-uart";
31 reg = <0x09405000 0x1000>; 31 reg = <0x09405000 0x1000>;
32 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 32 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
index 7aef0eae58d4..76aec8a3724d 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -456,7 +456,7 @@ System ON/OFF key driver
456 Definition: this is phandle to the register map node. 456 Definition: this is phandle to the register map node.
457 457
458EXAMPLE: 458EXAMPLE:
459 snvs-pwrkey@0x020cc000 { 459 snvs-pwrkey@020cc000 {
460 compatible = "fsl,sec-v4.0-pwrkey"; 460 compatible = "fsl,sec-v4.0-pwrkey";
461 regmap = <&snvs>; 461 regmap = <&snvs>;
462 interrupts = <0 4 0x4> 462 interrupts = <0 4 0x4>
@@ -545,7 +545,7 @@ FULL EXAMPLE
545 interrupts = <93 2>; 545 interrupts = <93 2>;
546 }; 546 };
547 547
548 snvs-pwrkey@0x020cc000 { 548 snvs-pwrkey@020cc000 {
549 compatible = "fsl,sec-v4.0-pwrkey"; 549 compatible = "fsl,sec-v4.0-pwrkey";
550 regmap = <&sec_mon>; 550 regmap = <&sec_mon>;
551 interrupts = <0 4 0x4>; 551 interrupts = <0 4 0x4>;
diff --git a/Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt b/Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt
index 001dd63979a9..148191b0fc15 100644
--- a/Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt
+++ b/Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt
@@ -9,7 +9,7 @@ Required properties:
9- clock-names : the name of clock used by the DFI, must be "pclk_ddr_mon"; 9- clock-names : the name of clock used by the DFI, must be "pclk_ddr_mon";
10 10
11Example: 11Example:
12 dfi: dfi@0xff630000 { 12 dfi: dfi@ff630000 {
13 compatible = "rockchip,rk3399-dfi"; 13 compatible = "rockchip,rk3399-dfi";
14 reg = <0x00 0xff630000 0x00 0x4000>; 14 reg = <0x00 0xff630000 0x00 0x4000>;
15 rockchip,pmu = <&pmugrf>; 15 rockchip,pmu = <&pmugrf>;
diff --git a/Documentation/devicetree/bindings/display/atmel,lcdc.txt b/Documentation/devicetree/bindings/display/atmel,lcdc.txt
index 1a21202778ee..acb5a0132127 100644
--- a/Documentation/devicetree/bindings/display/atmel,lcdc.txt
+++ b/Documentation/devicetree/bindings/display/atmel,lcdc.txt
@@ -27,7 +27,7 @@ Optional properties:
27 27
28Example: 28Example:
29 29
30 fb0: fb@0x00500000 { 30 fb0: fb@00500000 {
31 compatible = "atmel,at91sam9g45-lcdc"; 31 compatible = "atmel,at91sam9g45-lcdc";
32 reg = <0x00500000 0x1000>; 32 reg = <0x00500000 0x1000>;
33 interrupts = <23 3 0>; 33 interrupts = <23 3 0>;
@@ -41,7 +41,7 @@ Example:
41 41
42Example for fixed framebuffer memory: 42Example for fixed framebuffer memory:
43 43
44 fb0: fb@0x00500000 { 44 fb0: fb@00500000 {
45 compatible = "atmel,at91sam9263-lcdc"; 45 compatible = "atmel,at91sam9263-lcdc";
46 reg = <0x00700000 0x1000 0x70000000 0x200000>; 46 reg = <0x00700000 0x1000 0x70000000 0x200000>;
47 [...] 47 [...]
diff --git a/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt b/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
index 55492c264d17..b3408cc57be6 100644
--- a/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
+++ b/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
@@ -73,7 +73,7 @@ Hypervisor OS configuration:
73 max-read-transactions = <31>; 73 max-read-transactions = <31>;
74 channel-reset-timeout-cycles = <0x500>; 74 channel-reset-timeout-cycles = <0x500>;
75 75
76 hidma_24: dma-controller@0x5c050000 { 76 hidma_24: dma-controller@5c050000 {
77 compatible = "qcom,hidma-1.0"; 77 compatible = "qcom,hidma-1.0";
78 reg = <0 0x5c050000 0x0 0x1000>, 78 reg = <0 0x5c050000 0x0 0x1000>,
79 <0 0x5c0b0000 0x0 0x1000>; 79 <0 0x5c0b0000 0x0 0x1000>;
@@ -85,7 +85,7 @@ Hypervisor OS configuration:
85 85
86Guest OS configuration: 86Guest OS configuration:
87 87
88 hidma_24: dma-controller@0x5c050000 { 88 hidma_24: dma-controller@5c050000 {
89 compatible = "qcom,hidma-1.0"; 89 compatible = "qcom,hidma-1.0";
90 reg = <0 0x5c050000 0x0 0x1000>, 90 reg = <0 0x5c050000 0x0 0x1000>,
91 <0 0x5c0b0000 0x0 0x1000>; 91 <0 0x5c0b0000 0x0 0x1000>;
diff --git a/Documentation/devicetree/bindings/dma/zxdma.txt b/Documentation/devicetree/bindings/dma/zxdma.txt
index abec59f35fde..0ab80f69e566 100644
--- a/Documentation/devicetree/bindings/dma/zxdma.txt
+++ b/Documentation/devicetree/bindings/dma/zxdma.txt
@@ -13,7 +13,7 @@ Required properties:
13Example: 13Example:
14 14
15Controller: 15Controller:
16 dma: dma-controller@0x09c00000{ 16 dma: dma-controller@09c00000{
17 compatible = "zte,zx296702-dma"; 17 compatible = "zte,zx296702-dma";
18 reg = <0x09c00000 0x1000>; 18 reg = <0x09c00000 0x1000>;
19 clocks = <&topclk ZX296702_DMA_ACLK>; 19 clocks = <&topclk ZX296702_DMA_ACLK>;
diff --git a/Documentation/devicetree/bindings/eeprom/at25.txt b/Documentation/devicetree/bindings/eeprom/at25.txt
index 1d3447165c37..e823d90b802f 100644
--- a/Documentation/devicetree/bindings/eeprom/at25.txt
+++ b/Documentation/devicetree/bindings/eeprom/at25.txt
@@ -1,7 +1,12 @@
1EEPROMs (SPI) compatible with Atmel at25. 1EEPROMs (SPI) compatible with Atmel at25.
2 2
3Required properties: 3Required properties:
4- compatible : "atmel,at25". 4- compatible : Should be "<vendor>,<type>", and generic value "atmel,at25".
5 Example "<vendor>,<type>" values:
6 "microchip,25lc040"
7 "st,m95m02"
8 "st,m95256"
9
5- reg : chip select number 10- reg : chip select number
6- spi-max-frequency : max spi frequency to use 11- spi-max-frequency : max spi frequency to use
7- pagesize : size of the eeprom page 12- pagesize : size of the eeprom page
@@ -13,7 +18,7 @@ Optional properties:
13- spi-cpol : SPI inverse clock polarity, as per spi-bus bindings. 18- spi-cpol : SPI inverse clock polarity, as per spi-bus bindings.
14- read-only : this parameter-less property disables writes to the eeprom 19- read-only : this parameter-less property disables writes to the eeprom
15 20
16Obsolete legacy properties are can be used in place of "size", "pagesize", 21Obsolete legacy properties can be used in place of "size", "pagesize",
17"address-width", and "read-only": 22"address-width", and "read-only":
18- at25,byte-len : total eeprom size in bytes 23- at25,byte-len : total eeprom size in bytes
19- at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h 24- at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h
@@ -22,8 +27,8 @@ Obsolete legacy properties are can be used in place of "size", "pagesize",
22Additional compatible properties are also allowed. 27Additional compatible properties are also allowed.
23 28
24Example: 29Example:
25 at25@0 { 30 eeprom@0 {
26 compatible = "atmel,at25", "st,m95256"; 31 compatible = "st,m95256", "atmel,at25";
27 reg = <0> 32 reg = <0>
28 spi-max-frequency = <5000000>; 33 spi-max-frequency = <5000000>;
29 spi-cpha; 34 spi-cpha;
diff --git a/Documentation/devicetree/bindings/gpio/gpio-altera.txt b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
index 826a7208ca93..146e554b3c67 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-altera.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
@@ -30,7 +30,7 @@ Optional properties:
30 30
31Example: 31Example:
32 32
33gpio_altr: gpio@0xff200000 { 33gpio_altr: gpio@ff200000 {
34 compatible = "altr,pio-1.0"; 34 compatible = "altr,pio-1.0";
35 reg = <0xff200000 0x10>; 35 reg = <0xff200000 0x10>;
36 interrupts = <0 45 4>; 36 interrupts = <0 45 4>;
diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
index 7f57271df2bc..0d0158728f89 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
@@ -27,7 +27,7 @@ Required properties:
27 ti,tca6424 27 ti,tca6424
28 ti,tca9539 28 ti,tca9539
29 ti,tca9554 29 ti,tca9554
30 onsemi,pca9654 30 onnn,pca9654
31 exar,xra1202 31 exar,xra1202
32 32
33Optional properties: 33Optional properties:
diff --git a/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt b/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt
index 231e4cc4008c..d4a082acf92f 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-jz4780.txt
@@ -18,7 +18,7 @@ Optional properties:
18Example 18Example
19 19
20/ { 20/ {
21 i2c4: i2c4@0x10054000 { 21 i2c4: i2c4@10054000 {
22 compatible = "ingenic,jz4780-i2c"; 22 compatible = "ingenic,jz4780-i2c";
23 reg = <0x10054000 0x1000>; 23 reg = <0x10054000 0x1000>;
24 24
diff --git a/Documentation/devicetree/bindings/iio/pressure/hp03.txt b/Documentation/devicetree/bindings/iio/pressure/hp03.txt
index 54e7e70bcea5..831dbee7a5c3 100644
--- a/Documentation/devicetree/bindings/iio/pressure/hp03.txt
+++ b/Documentation/devicetree/bindings/iio/pressure/hp03.txt
@@ -10,7 +10,7 @@ Required properties:
10 10
11Example: 11Example:
12 12
13hp03@0x77 { 13hp03@77 {
14 compatible = "hoperf,hp03"; 14 compatible = "hoperf,hp03";
15 reg = <0x77>; 15 reg = <0x77>;
16 xclr-gpio = <&portc 0 0x0>; 16 xclr-gpio = <&portc 0 0x0>;
diff --git a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt
index ca5a2c86480c..56d835242af2 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt
@@ -15,7 +15,7 @@ Optional properties:
15Example: 15Example:
16 16
17 i2c@80110000 { 17 i2c@80110000 {
18 bu21013_tp@0x5c { 18 bu21013_tp@5c {
19 compatible = "rohm,bu21013_tp"; 19 compatible = "rohm,bu21013_tp";
20 reg = <0x5c>; 20 reg = <0x5c>;
21 touch-gpio = <&gpio2 20 0x4>; 21 touch-gpio = <&gpio2 20 0x4>;
diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt b/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
index 560d8a727b8f..2f3244648646 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
@@ -155,7 +155,7 @@ Example:
155 <0x0 0xe112f000 0 0x02000>, 155 <0x0 0xe112f000 0 0x02000>,
156 <0x0 0xe1140000 0 0x10000>, 156 <0x0 0xe1140000 0 0x10000>,
157 <0x0 0xe1160000 0 0x10000>; 157 <0x0 0xe1160000 0 0x10000>;
158 v2m0: v2m@0x8000 { 158 v2m0: v2m@8000 {
159 compatible = "arm,gic-v2m-frame"; 159 compatible = "arm,gic-v2m-frame";
160 msi-controller; 160 msi-controller;
161 reg = <0x0 0x80000 0 0x1000>; 161 reg = <0x0 0x80000 0 0x1000>;
@@ -163,7 +163,7 @@ Example:
163 163
164 .... 164 ....
165 165
166 v2mN: v2m@0x9000 { 166 v2mN: v2m@9000 {
167 compatible = "arm,gic-v2m-frame"; 167 compatible = "arm,gic-v2m-frame";
168 msi-controller; 168 msi-controller;
169 reg = <0x0 0x90000 0 0x1000>; 169 reg = <0x0 0x90000 0 0x1000>;
diff --git a/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt
index 80994adab392..42431f44697f 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/img,meta-intc.txt
@@ -71,7 +71,7 @@ Example 2:
71 * An interrupt generating device that is wired to a Meta external 71 * An interrupt generating device that is wired to a Meta external
72 * trigger block. 72 * trigger block.
73 */ 73 */
74 uart1: uart@0x02004c00 { 74 uart1: uart@02004c00 {
75 // Interrupt source '5' that is level-sensitive. 75 // Interrupt source '5' that is level-sensitive.
76 // Note that there are only two cells as specified in the 76 // Note that there are only two cells as specified in the
77 // interrupt parent's '#interrupt-cells' property. 77 // interrupt parent's '#interrupt-cells' property.
diff --git a/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt
index a69118550344..5dc2a55ad811 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/img,pdc-intc.txt
@@ -51,7 +51,7 @@ Example 1:
51 /* 51 /*
52 * TZ1090 PDC block 52 * TZ1090 PDC block
53 */ 53 */
54 pdc: pdc@0x02006000 { 54 pdc: pdc@02006000 {
55 // This is an interrupt controller node. 55 // This is an interrupt controller node.
56 interrupt-controller; 56 interrupt-controller;
57 57
diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt b/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt
index 715a013ed4bd..2ab0ea39867b 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/st,spear3xx-shirq.txt
@@ -39,7 +39,7 @@ Example:
39 39
40The following is an example from the SPEAr320 SoC dtsi file. 40The following is an example from the SPEAr320 SoC dtsi file.
41 41
42shirq: interrupt-controller@0xb3000000 { 42shirq: interrupt-controller@b3000000 {
43 compatible = "st,spear320-shirq"; 43 compatible = "st,spear320-shirq";
44 reg = <0xb3000000 0x1000>; 44 reg = <0xb3000000 0x1000>;
45 interrupts = <28 29 30 1>; 45 interrupts = <28 29 30 1>;
diff --git a/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt b/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt
index c2619797ce0c..49cfc8c337c4 100644
--- a/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/altera-mailbox.txt
@@ -14,7 +14,7 @@ Optional properties:
14 depends on the interrupt controller parent. 14 depends on the interrupt controller parent.
15 15
16Example: 16Example:
17 mbox_tx: mailbox@0x100 { 17 mbox_tx: mailbox@100 {
18 compatible = "altr,mailbox-1.0"; 18 compatible = "altr,mailbox-1.0";
19 reg = <0x100 0x8>; 19 reg = <0x100 0x8>;
20 interrupt-parent = < &gic_0 >; 20 interrupt-parent = < &gic_0 >;
@@ -22,7 +22,7 @@ Example:
22 #mbox-cells = <1>; 22 #mbox-cells = <1>;
23 }; 23 };
24 24
25 mbox_rx: mailbox@0x200 { 25 mbox_rx: mailbox@200 {
26 compatible = "altr,mailbox-1.0"; 26 compatible = "altr,mailbox-1.0";
27 reg = <0x200 0x8>; 27 reg = <0x200 0x8>;
28 interrupt-parent = < &gic_0 >; 28 interrupt-parent = < &gic_0 >;
@@ -40,7 +40,7 @@ support only one channel).The equivalent "mbox-names" property value can be
40used to give a name to the communication channel to be used by the client user. 40used to give a name to the communication channel to be used by the client user.
41 41
42Example: 42Example:
43 mclient0: mclient0@0x400 { 43 mclient0: mclient0@400 {
44 compatible = "client-1.0"; 44 compatible = "client-1.0";
45 reg = <0x400 0x10>; 45 reg = <0x400 0x10>;
46 mbox-names = "mbox-tx", "mbox-rx"; 46 mbox-names = "mbox-tx", "mbox-rx";
diff --git a/Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt b/Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt
index 0f3ee81d92c2..9bcdf2087625 100644
--- a/Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt
@@ -15,7 +15,7 @@ Optional properties:
15- brcm,use-bcm-hdr: present if a BCM header precedes each frame. 15- brcm,use-bcm-hdr: present if a BCM header precedes each frame.
16 16
17Example: 17Example:
18 pdc0: iproc-pdc0@0x612c0000 { 18 pdc0: iproc-pdc0@612c0000 {
19 compatible = "brcm,iproc-pdc-mbox"; 19 compatible = "brcm,iproc-pdc-mbox";
20 reg = <0 0x612c0000 0 0x445>; /* PDC FS0 regs */ 20 reg = <0 0x612c0000 0 0x445>; /* PDC FS0 regs */
21 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; 21 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
index 0d4fdaedc6f1..bc963a6d305a 100644
--- a/Documentation/devicetree/bindings/media/exynos5-gsc.txt
+++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
@@ -17,7 +17,7 @@ Optional properties:
17 17
18Example: 18Example:
19 19
20gsc_0: gsc@0x13e00000 { 20gsc_0: gsc@13e00000 {
21 compatible = "samsung,exynos5250-gsc"; 21 compatible = "samsung,exynos5250-gsc";
22 reg = <0x13e00000 0x1000>; 22 reg = <0x13e00000 0x1000>;
23 interrupts = <0 85 0>; 23 interrupts = <0 85 0>;
diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
index 46c15c54175d..2a615d84a682 100644
--- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
+++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
@@ -68,7 +68,7 @@ vcodec_dec: vcodec@16000000 {
68 "vdec_bus_clk_src"; 68 "vdec_bus_clk_src";
69 }; 69 };
70 70
71 vcodec_enc: vcodec@0x18002000 { 71 vcodec_enc: vcodec@18002000 {
72 compatible = "mediatek,mt8173-vcodec-enc"; 72 compatible = "mediatek,mt8173-vcodec-enc";
73 reg = <0 0x18002000 0 0x1000>, /*VENC_SYS*/ 73 reg = <0 0x18002000 0 0x1000>, /*VENC_SYS*/
74 <0 0x19002000 0 0x1000>; /*VENC_LT_SYS*/ 74 <0 0x19002000 0 0x1000>; /*VENC_LT_SYS*/
diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
index 6e4ef8caf759..19357d0bbe65 100644
--- a/Documentation/devicetree/bindings/media/rcar_vin.txt
+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
@@ -44,7 +44,7 @@ Device node example
44 vin0 = &vin0; 44 vin0 = &vin0;
45 }; 45 };
46 46
47 vin0: vin@0xe6ef0000 { 47 vin0: vin@e6ef0000 {
48 compatible = "renesas,vin-r8a7790", "renesas,rcar-gen2-vin"; 48 compatible = "renesas,vin-r8a7790", "renesas,rcar-gen2-vin";
49 clocks = <&mstp8_clks R8A7790_CLK_VIN0>; 49 clocks = <&mstp8_clks R8A7790_CLK_VIN0>;
50 reg = <0 0xe6ef0000 0 0x1000>; 50 reg = <0 0xe6ef0000 0 0x1000>;
diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt
index e4e15d8d7521..48c599dacbdf 100644
--- a/Documentation/devicetree/bindings/media/samsung-fimc.txt
+++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt
@@ -138,7 +138,7 @@ Example:
138 }; 138 };
139 139
140 /* MIPI CSI-2 bus IF sensor */ 140 /* MIPI CSI-2 bus IF sensor */
141 s5c73m3: sensor@0x1a { 141 s5c73m3: sensor@1a {
142 compatible = "samsung,s5c73m3"; 142 compatible = "samsung,s5c73m3";
143 reg = <0x1a>; 143 reg = <0x1a>;
144 vddio-supply = <...>; 144 vddio-supply = <...>;
diff --git a/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt b/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt
index 1ce4e46bcbb7..17a8e81ca0cc 100644
--- a/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt
+++ b/Documentation/devicetree/bindings/media/sh_mobile_ceu.txt
@@ -8,7 +8,7 @@ Bindings, specific for the sh_mobile_ceu_camera.c driver:
8 8
9Example: 9Example:
10 10
11ceu0: ceu@0xfe910000 { 11ceu0: ceu@fe910000 {
12 compatible = "renesas,sh-mobile-ceu"; 12 compatible = "renesas,sh-mobile-ceu";
13 reg = <0xfe910000 0xa0>; 13 reg = <0xfe910000 0xa0>;
14 interrupt-parent = <&intcs>; 14 interrupt-parent = <&intcs>;
diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt
index 3994b0143dd1..258b8dfddf48 100644
--- a/Documentation/devicetree/bindings/media/video-interfaces.txt
+++ b/Documentation/devicetree/bindings/media/video-interfaces.txt
@@ -154,7 +154,7 @@ imx074 is linked to ceu0 through the MIPI CSI-2 receiver (csi2). ceu0 has a
154'port' node which may indicate that at any time only one of the following data 154'port' node which may indicate that at any time only one of the following data
155pipelines can be active: ov772x -> ceu0 or imx074 -> csi2 -> ceu0. 155pipelines can be active: ov772x -> ceu0 or imx074 -> csi2 -> ceu0.
156 156
157 ceu0: ceu@0xfe910000 { 157 ceu0: ceu@fe910000 {
158 compatible = "renesas,sh-mobile-ceu"; 158 compatible = "renesas,sh-mobile-ceu";
159 reg = <0xfe910000 0xa0>; 159 reg = <0xfe910000 0xa0>;
160 interrupts = <0x880>; 160 interrupts = <0x880>;
@@ -193,9 +193,9 @@ pipelines can be active: ov772x -> ceu0 or imx074 -> csi2 -> ceu0.
193 }; 193 };
194 }; 194 };
195 195
196 i2c0: i2c@0xfff20000 { 196 i2c0: i2c@fff20000 {
197 ... 197 ...
198 ov772x_1: camera@0x21 { 198 ov772x_1: camera@21 {
199 compatible = "ovti,ov772x"; 199 compatible = "ovti,ov772x";
200 reg = <0x21>; 200 reg = <0x21>;
201 vddio-supply = <&regulator1>; 201 vddio-supply = <&regulator1>;
@@ -219,7 +219,7 @@ pipelines can be active: ov772x -> ceu0 or imx074 -> csi2 -> ceu0.
219 }; 219 };
220 }; 220 };
221 221
222 imx074: camera@0x1a { 222 imx074: camera@1a {
223 compatible = "sony,imx074"; 223 compatible = "sony,imx074";
224 reg = <0x1a>; 224 reg = <0x1a>;
225 vddio-supply = <&regulator1>; 225 vddio-supply = <&regulator1>;
@@ -239,7 +239,7 @@ pipelines can be active: ov772x -> ceu0 or imx074 -> csi2 -> ceu0.
239 }; 239 };
240 }; 240 };
241 241
242 csi2: csi2@0xffc90000 { 242 csi2: csi2@ffc90000 {
243 compatible = "renesas,sh-mobile-csi2"; 243 compatible = "renesas,sh-mobile-csi2";
244 reg = <0xffc90000 0x1000>; 244 reg = <0xffc90000 0x1000>;
245 interrupts = <0x17a0>; 245 interrupts = <0x17a0>;
diff --git a/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt b/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt
index fd823d6091b2..152eeccbde1c 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt
@@ -46,7 +46,7 @@ Optional properties:
46 46
47Example: 47Example:
48 48
49emif1: emif@0x4c000000 { 49emif1: emif@4c000000 {
50 compatible = "ti,emif-4d"; 50 compatible = "ti,emif-4d";
51 ti,hwmods = "emif2"; 51 ti,hwmods = "emif2";
52 phy-type = <1>; 52 phy-type = <1>;
diff --git a/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt b/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt
index 20963c76b4bc..71a1f5963936 100644
--- a/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt
+++ b/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt
@@ -13,7 +13,7 @@ Required properties:
13 13
14Example: 14Example:
15 15
16devctrl: device-state-control@0x02620000 { 16devctrl: device-state-control@02620000 {
17 compatible = "ti,keystone-devctrl", "syscon"; 17 compatible = "ti,keystone-devctrl", "syscon";
18 reg = <0x02620000 0x1000>; 18 reg = <0x02620000 0x1000>;
19}; 19};
diff --git a/Documentation/devicetree/bindings/misc/brcm,kona-smc.txt b/Documentation/devicetree/bindings/misc/brcm,kona-smc.txt
index 6c9f176f3571..05b47232ed9e 100644
--- a/Documentation/devicetree/bindings/misc/brcm,kona-smc.txt
+++ b/Documentation/devicetree/bindings/misc/brcm,kona-smc.txt
@@ -9,7 +9,7 @@ Required properties:
9- reg : Location and size of bounce buffer 9- reg : Location and size of bounce buffer
10 10
11Example: 11Example:
12 smc@0x3404c000 { 12 smc@3404c000 {
13 compatible = "brcm,bcm11351-smc", "brcm,kona-smc"; 13 compatible = "brcm,bcm11351-smc", "brcm,kona-smc";
14 reg = <0x3404c000 0x400>; //1 KiB in SRAM 14 reg = <0x3404c000 0x400>; //1 KiB in SRAM
15 }; 15 };
diff --git a/Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt b/Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt
index aaba2483b4ff..7f5dd83f5bd9 100644
--- a/Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt
@@ -12,7 +12,7 @@ Refer to clocks/clock-bindings.txt for generic clock consumer properties.
12 12
13Example: 13Example:
14 14
15sdio2: sdio@0x3f1a0000 { 15sdio2: sdio@3f1a0000 {
16 compatible = "brcm,kona-sdhci"; 16 compatible = "brcm,kona-sdhci";
17 reg = <0x3f1a0000 0x10000>; 17 reg = <0x3f1a0000 0x10000>;
18 clocks = <&sdio3_clk>; 18 clocks = <&sdio3_clk>;
diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
index 954561d09a8e..fa90d253dc7e 100644
--- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
+++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
@@ -24,7 +24,7 @@ Optional properties:
24 24
25Example: 25Example:
26 26
27sdhci0: sdhci@0x18041000 { 27sdhci0: sdhci@18041000 {
28 compatible = "brcm,sdhci-iproc-cygnus"; 28 compatible = "brcm,sdhci-iproc-cygnus";
29 reg = <0x18041000 0x100>; 29 reg = <0x18041000 0x100>;
30 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 30 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index 3a4ac401e6f9..19f5508a7569 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -55,7 +55,7 @@ Examples:
55 55
56[hwmod populated DMA resources] 56[hwmod populated DMA resources]
57 57
58 mmc1: mmc@0x4809c000 { 58 mmc1: mmc@4809c000 {
59 compatible = "ti,omap4-hsmmc"; 59 compatible = "ti,omap4-hsmmc";
60 reg = <0x4809c000 0x400>; 60 reg = <0x4809c000 0x400>;
61 ti,hwmods = "mmc1"; 61 ti,hwmods = "mmc1";
@@ -67,7 +67,7 @@ Examples:
67 67
68[generic DMA request binding] 68[generic DMA request binding]
69 69
70 mmc1: mmc@0x4809c000 { 70 mmc1: mmc@4809c000 {
71 compatible = "ti,omap4-hsmmc"; 71 compatible = "ti,omap4-hsmmc";
72 reg = <0x4809c000 0x400>; 72 reg = <0x4809c000 0x400>;
73 ti,hwmods = "mmc1"; 73 ti,hwmods = "mmc1";
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nor.txt b/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
index 131d3a74d0bd..c8567b40fe13 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
@@ -82,15 +82,15 @@ gpmc: gpmc@6e000000 {
82 label = "bootloader-nor"; 82 label = "bootloader-nor";
83 reg = <0 0x40000>; 83 reg = <0 0x40000>;
84 }; 84 };
85 partition@0x40000 { 85 partition@40000 {
86 label = "params-nor"; 86 label = "params-nor";
87 reg = <0x40000 0x40000>; 87 reg = <0x40000 0x40000>;
88 }; 88 };
89 partition@0x80000 { 89 partition@80000 {
90 label = "kernel-nor"; 90 label = "kernel-nor";
91 reg = <0x80000 0x200000>; 91 reg = <0x80000 0x200000>;
92 }; 92 };
93 partition@0x280000 { 93 partition@280000 {
94 label = "filesystem-nor"; 94 label = "filesystem-nor";
95 reg = <0x240000 0x7d80000>; 95 reg = <0x240000 0x7d80000>;
96 }; 96 };
diff --git a/Documentation/devicetree/bindings/mtd/mtk-nand.txt b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
index dbf9e054c11c..0431841de781 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
@@ -131,7 +131,7 @@ Example:
131 read-only; 131 read-only;
132 reg = <0x00000000 0x00400000>; 132 reg = <0x00000000 0x00400000>;
133 }; 133 };
134 android@0x00400000 { 134 android@00400000 {
135 label = "android"; 135 label = "android";
136 reg = <0x00400000 0x12c00000>; 136 reg = <0x00400000 0x12c00000>;
137 }; 137 };
diff --git a/Documentation/devicetree/bindings/net/altera_tse.txt b/Documentation/devicetree/bindings/net/altera_tse.txt
index a706297998e9..0e21df94a53f 100644
--- a/Documentation/devicetree/bindings/net/altera_tse.txt
+++ b/Documentation/devicetree/bindings/net/altera_tse.txt
@@ -52,7 +52,7 @@ Optional properties:
52 52
53Example: 53Example:
54 54
55 tse_sub_0_eth_tse_0: ethernet@0x1,00000000 { 55 tse_sub_0_eth_tse_0: ethernet@1,00000000 {
56 compatible = "altr,tse-msgdma-1.0"; 56 compatible = "altr,tse-msgdma-1.0";
57 reg = <0x00000001 0x00000000 0x00000400>, 57 reg = <0x00000001 0x00000000 0x00000400>,
58 <0x00000001 0x00000460 0x00000020>, 58 <0x00000001 0x00000460 0x00000020>,
@@ -90,7 +90,7 @@ Example:
90 }; 90 };
91 }; 91 };
92 92
93 tse_sub_1_eth_tse_0: ethernet@0x1,00001000 { 93 tse_sub_1_eth_tse_0: ethernet@1,00001000 {
94 compatible = "altr,tse-msgdma-1.0"; 94 compatible = "altr,tse-msgdma-1.0";
95 reg = <0x00000001 0x00001000 0x00000400>, 95 reg = <0x00000001 0x00001000 0x00000400>,
96 <0x00000001 0x00001460 0x00000020>, 96 <0x00000001 0x00001460 0x00000020>,
diff --git a/Documentation/devicetree/bindings/net/mdio.txt b/Documentation/devicetree/bindings/net/mdio.txt
index 96a53f89aa6e..e3e1603f256c 100644
--- a/Documentation/devicetree/bindings/net/mdio.txt
+++ b/Documentation/devicetree/bindings/net/mdio.txt
@@ -18,7 +18,7 @@ Example :
18This example shows these optional properties, plus other properties 18This example shows these optional properties, plus other properties
19required for the TI Davinci MDIO driver. 19required for the TI Davinci MDIO driver.
20 20
21 davinci_mdio: ethernet@0x5c030000 { 21 davinci_mdio: ethernet@5c030000 {
22 compatible = "ti,davinci_mdio"; 22 compatible = "ti,davinci_mdio";
23 reg = <0x5c030000 0x1000>; 23 reg = <0x5c030000 0x1000>;
24 #address-cells = <1>; 24 #address-cells = <1>;
diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
index b30d04b54ee9..17d6819669c8 100644
--- a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
+++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
@@ -28,7 +28,7 @@ Required properties:
28 28
29Example: 29Example:
30 30
31gmii_to_sgmii_converter: phy@0x100000240 { 31gmii_to_sgmii_converter: phy@100000240 {
32 compatible = "altr,gmii-to-sgmii-2.0"; 32 compatible = "altr,gmii-to-sgmii-2.0";
33 reg = <0x00000001 0x00000240 0x00000008>, 33 reg = <0x00000001 0x00000240 0x00000008>,
34 <0x00000001 0x00000200 0x00000040>; 34 <0x00000001 0x00000200 0x00000040>;
diff --git a/Documentation/devicetree/bindings/nios2/nios2.txt b/Documentation/devicetree/bindings/nios2/nios2.txt
index d6d0a94cb3bb..b95e831bcba3 100644
--- a/Documentation/devicetree/bindings/nios2/nios2.txt
+++ b/Documentation/devicetree/bindings/nios2/nios2.txt
@@ -36,7 +36,7 @@ Optional properties:
36 36
37Example: 37Example:
38 38
39cpu@0x0 { 39cpu@0 {
40 device_type = "cpu"; 40 device_type = "cpu";
41 compatible = "altr,nios2-1.0"; 41 compatible = "altr,nios2-1.0";
42 reg = <0>; 42 reg = <0>;
diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation/devicetree/bindings/pci/altera-pcie.txt
index 495880193adc..a1dc9366a8fc 100644
--- a/Documentation/devicetree/bindings/pci/altera-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/altera-pcie.txt
@@ -25,7 +25,7 @@ Optional properties:
25- bus-range: PCI bus numbers covered 25- bus-range: PCI bus numbers covered
26 26
27Example 27Example
28 pcie_0: pcie@0xc00000000 { 28 pcie_0: pcie@c00000000 {
29 compatible = "altr,pcie-root-port-1.0"; 29 compatible = "altr,pcie-root-port-1.0";
30 reg = <0xc0000000 0x20000000>, 30 reg = <0xc0000000 0x20000000>,
31 <0xff220000 0x00004000>; 31 <0xff220000 0x00004000>;
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
index 7b1e48bf172b..149d8f7f86b0 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
@@ -52,7 +52,7 @@ Additional required properties for imx7d-pcie:
52 52
53Example: 53Example:
54 54
55 pcie@0x01000000 { 55 pcie@01000000 {
56 compatible = "fsl,imx6q-pcie", "snps,dw-pcie"; 56 compatible = "fsl,imx6q-pcie", "snps,dw-pcie";
57 reg = <0x01ffc000 0x04000>, 57 reg = <0x01ffc000 0x04000>,
58 <0x01f00000 0x80000>; 58 <0x01f00000 0x80000>;
diff --git a/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
index bdb7ab39d2d7..7bf9df047a1e 100644
--- a/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
@@ -21,7 +21,7 @@ Optional properties:
21- dma-coherent: Present if DMA operations are coherent. 21- dma-coherent: Present if DMA operations are coherent.
22 22
23Hip05 Example (note that Hip06 is the same except compatible): 23Hip05 Example (note that Hip06 is the same except compatible):
24 pcie@0xb0080000 { 24 pcie@b0080000 {
25 compatible = "hisilicon,hip05-pcie", "snps,dw-pcie"; 25 compatible = "hisilicon,hip05-pcie", "snps,dw-pcie";
26 reg = <0 0xb0080000 0 0x10000>, <0x220 0x00000000 0 0x2000>; 26 reg = <0 0xb0080000 0 0x10000>, <0x220 0x00000000 0 0x2000>;
27 reg-names = "rc_dbi", "config"; 27 reg-names = "rc_dbi", "config";
diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
index cbc7847dbf6c..c1ce5a0a652e 100644
--- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
@@ -45,7 +45,7 @@ Optional properties:
45- usb3_vbus-supply : regulator phandle for controller usb3 vbus 45- usb3_vbus-supply : regulator phandle for controller usb3 vbus
46 46
47Example: 47Example:
48 usbphy: phy@0x01c13400 { 48 usbphy: phy@01c13400 {
49 #phy-cells = <1>; 49 #phy-cells = <1>;
50 compatible = "allwinner,sun4i-a10-usb-phy"; 50 compatible = "allwinner,sun4i-a10-usb-phy";
51 /* phy base regs, phy1 pmu reg, phy2 pmu reg */ 51 /* phy base regs, phy1 pmu reg, phy2 pmu reg */
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt
index 3600d5c6c4d7..3914529a3214 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt
@@ -25,7 +25,7 @@ Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
25 25
26For example: 26For example:
27 27
28 pinmux: pinmux@0x0301d0c8 { 28 pinmux: pinmux@0301d0c8 {
29 compatible = "brcm,cygnus-pinmux"; 29 compatible = "brcm,cygnus-pinmux";
30 reg = <0x0301d0c8 0x1b0>; 30 reg = <0x0301d0c8 0x1b0>;
31 31
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt
index eecf028ff485..bf9b07016c87 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt
@@ -96,14 +96,14 @@ For example, pinctrl might have subnodes like the following:
96 96
97For a specific board, if it wants to use sd1, 97For a specific board, if it wants to use sd1,
98it can add the following to its board-specific .dts file. 98it can add the following to its board-specific .dts file.
99sd1: sd@0x12340000 { 99sd1: sd@12340000 {
100 pinctrl-names = "default"; 100 pinctrl-names = "default";
101 pinctrl-0 = <&sd1_pmx0>; 101 pinctrl-0 = <&sd1_pmx0>;
102} 102}
103 103
104or 104or
105 105
106sd1: sd@0x12340000 { 106sd1: sd@12340000 {
107 pinctrl-names = "default"; 107 pinctrl-names = "default";
108 pinctrl-0 = <&sd1_pmx1>; 108 pinctrl-0 = <&sd1_pmx1>;
109} 109}
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
index 5f55be59d914..f8420520e14b 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt
@@ -41,7 +41,7 @@ For example, pinctrl might have subnodes like the following:
41 41
42For a specific board, if it wants to use uart2 without hardware flow control, 42For a specific board, if it wants to use uart2 without hardware flow control,
43it can add the following to its board-specific .dts file. 43it can add the following to its board-specific .dts file.
44uart2: uart@0xb0070000 { 44uart2: uart@b0070000 {
45 pinctrl-names = "default"; 45 pinctrl-names = "default";
46 pinctrl-0 = <&uart2_noflow_pins_a>; 46 pinctrl-0 = <&uart2_noflow_pins_a>;
47} 47}
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
index 4864e3a74de3..a01a3b8a2363 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
@@ -136,7 +136,7 @@ Example for rk3188:
136 #size-cells = <1>; 136 #size-cells = <1>;
137 ranges; 137 ranges;
138 138
139 gpio0: gpio0@0x2000a000 { 139 gpio0: gpio0@2000a000 {
140 compatible = "rockchip,rk3188-gpio-bank0"; 140 compatible = "rockchip,rk3188-gpio-bank0";
141 reg = <0x2000a000 0x100>; 141 reg = <0x2000a000 0x100>;
142 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 142 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
@@ -149,7 +149,7 @@ Example for rk3188:
149 #interrupt-cells = <2>; 149 #interrupt-cells = <2>;
150 }; 150 };
151 151
152 gpio1: gpio1@0x2003c000 { 152 gpio1: gpio1@2003c000 {
153 compatible = "rockchip,gpio-bank"; 153 compatible = "rockchip,gpio-bank";
154 reg = <0x2003c000 0x100>; 154 reg = <0x2003c000 0x100>;
155 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; 155 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index 378f6dc8b8bd..3cbf56ce66ea 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -107,7 +107,7 @@ regulators (twl_reg1 and twl_reg2),
107 ... 107 ...
108 }; 108 };
109 109
110 mmc: mmc@0x0 { 110 mmc: mmc@0 {
111 ... 111 ...
112 ... 112 ...
113 vmmc-supply = <&twl_reg1>; 113 vmmc-supply = <&twl_reg1>;
diff --git a/Documentation/devicetree/bindings/serial/efm32-uart.txt b/Documentation/devicetree/bindings/serial/efm32-uart.txt
index 8adbab268ca3..4f8d8fde0c1c 100644
--- a/Documentation/devicetree/bindings/serial/efm32-uart.txt
+++ b/Documentation/devicetree/bindings/serial/efm32-uart.txt
@@ -12,7 +12,7 @@ Optional properties:
12 12
13Example: 13Example:
14 14
15uart@0x4000c400 { 15uart@4000c400 {
16 compatible = "energymicro,efm32-uart"; 16 compatible = "energymicro,efm32-uart";
17 reg = <0x4000c400 0x400>; 17 reg = <0x4000c400 0x400>;
18 interrupts = <15>; 18 interrupts = <15>;
diff --git a/Documentation/devicetree/bindings/serio/allwinner,sun4i-ps2.txt b/Documentation/devicetree/bindings/serio/allwinner,sun4i-ps2.txt
index f311472990a7..75996b6111bb 100644
--- a/Documentation/devicetree/bindings/serio/allwinner,sun4i-ps2.txt
+++ b/Documentation/devicetree/bindings/serio/allwinner,sun4i-ps2.txt
@@ -14,7 +14,7 @@ Required properties:
14 14
15 15
16Example: 16Example:
17 ps20: ps2@0x01c2a000 { 17 ps20: ps2@01c2a000 {
18 compatible = "allwinner,sun4i-a10-ps2"; 18 compatible = "allwinner,sun4i-a10-ps2";
19 reg = <0x01c2a000 0x400>; 19 reg = <0x01c2a000 0x400>;
20 interrupts = <0 62 4>; 20 interrupts = <0 62 4>;
diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
index 64c66a5644e7..77cd42cc5f54 100644
--- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
+++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
@@ -220,7 +220,7 @@ qmss: qmss@2a40000 {
220 #address-cells = <1>; 220 #address-cells = <1>;
221 #size-cells = <1>; 221 #size-cells = <1>;
222 ranges; 222 ranges;
223 pdsp0@0x2a10000 { 223 pdsp0@2a10000 {
224 reg = <0x2a10000 0x1000>, 224 reg = <0x2a10000 0x1000>,
225 <0x2a0f000 0x100>, 225 <0x2a0f000 0x100>,
226 <0x2a0c000 0x3c8>, 226 <0x2a0c000 0x3c8>,
diff --git a/Documentation/devicetree/bindings/sound/adi,axi-i2s.txt b/Documentation/devicetree/bindings/sound/adi,axi-i2s.txt
index 5875ca459ed1..4248b662deff 100644
--- a/Documentation/devicetree/bindings/sound/adi,axi-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/adi,axi-i2s.txt
@@ -21,7 +21,7 @@ please check:
21 21
22Example: 22Example:
23 23
24 i2s: i2s@0x77600000 { 24 i2s: i2s@77600000 {
25 compatible = "adi,axi-i2s-1.00.a"; 25 compatible = "adi,axi-i2s-1.00.a";
26 reg = <0x77600000 0x1000>; 26 reg = <0x77600000 0x1000>;
27 clocks = <&clk 15>, <&audio_clock>; 27 clocks = <&clk 15>, <&audio_clock>;
diff --git a/Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt b/Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt
index 4eb7997674a0..7b664e7cb4ae 100644
--- a/Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt
+++ b/Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt
@@ -20,7 +20,7 @@ please check:
20 20
21Example: 21Example:
22 22
23 spdif: spdif@0x77400000 { 23 spdif: spdif@77400000 {
24 compatible = "adi,axi-spdif-tx-1.00.a"; 24 compatible = "adi,axi-spdif-tx-1.00.a";
25 reg = <0x77600000 0x1000>; 25 reg = <0x77600000 0x1000>;
26 clocks = <&clk 15>, <&audio_clock>; 26 clocks = <&clk 15>, <&audio_clock>;
diff --git a/Documentation/devicetree/bindings/sound/ak4613.txt b/Documentation/devicetree/bindings/sound/ak4613.txt
index 1783f9ef0930..49a2e74fd9cb 100644
--- a/Documentation/devicetree/bindings/sound/ak4613.txt
+++ b/Documentation/devicetree/bindings/sound/ak4613.txt
@@ -20,7 +20,7 @@ Optional properties:
20Example: 20Example:
21 21
22&i2c { 22&i2c {
23 ak4613: ak4613@0x10 { 23 ak4613: ak4613@10 {
24 compatible = "asahi-kasei,ak4613"; 24 compatible = "asahi-kasei,ak4613";
25 reg = <0x10>; 25 reg = <0x10>;
26 }; 26 };
diff --git a/Documentation/devicetree/bindings/sound/ak4642.txt b/Documentation/devicetree/bindings/sound/ak4642.txt
index 340784db6808..58e48ee97175 100644
--- a/Documentation/devicetree/bindings/sound/ak4642.txt
+++ b/Documentation/devicetree/bindings/sound/ak4642.txt
@@ -17,7 +17,7 @@ Optional properties:
17Example 1: 17Example 1:
18 18
19&i2c { 19&i2c {
20 ak4648: ak4648@0x12 { 20 ak4648: ak4648@12 {
21 compatible = "asahi-kasei,ak4642"; 21 compatible = "asahi-kasei,ak4642";
22 reg = <0x12>; 22 reg = <0x12>;
23 }; 23 };
diff --git a/Documentation/devicetree/bindings/sound/max98371.txt b/Documentation/devicetree/bindings/sound/max98371.txt
index 6c285235e64b..8b2b2704b574 100644
--- a/Documentation/devicetree/bindings/sound/max98371.txt
+++ b/Documentation/devicetree/bindings/sound/max98371.txt
@@ -10,7 +10,7 @@ Required properties:
10Example: 10Example:
11 11
12&i2c { 12&i2c {
13 max98371: max98371@0x31 { 13 max98371: max98371@31 {
14 compatible = "maxim,max98371"; 14 compatible = "maxim,max98371";
15 reg = <0x31>; 15 reg = <0x31>;
16 }; 16 };
diff --git a/Documentation/devicetree/bindings/sound/max9867.txt b/Documentation/devicetree/bindings/sound/max9867.txt
index 394cd4eb17ec..b8bd914ee697 100644
--- a/Documentation/devicetree/bindings/sound/max9867.txt
+++ b/Documentation/devicetree/bindings/sound/max9867.txt
@@ -10,7 +10,7 @@ Required properties:
10Example: 10Example:
11 11
12&i2c { 12&i2c {
13 max9867: max9867@0x18 { 13 max9867: max9867@18 {
14 compatible = "maxim,max9867"; 14 compatible = "maxim,max9867";
15 reg = <0x18>; 15 reg = <0x18>;
16 }; 16 };
diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.txt b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
index 0d0ab51105b0..0cf0f819b823 100644
--- a/Documentation/devicetree/bindings/sound/renesas,fsi.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
@@ -20,7 +20,7 @@ Required properties:
20 20
21Example: 21Example:
22 22
23sh_fsi2: sh_fsi2@0xec230000 { 23sh_fsi2: sh_fsi2@ec230000 {
24 compatible = "renesas,sh_fsi2"; 24 compatible = "renesas,sh_fsi2";
25 reg = <0xec230000 0x400>; 25 reg = <0xec230000 0x400>;
26 interrupts = <0 146 0x4>; 26 interrupts = <0 146 0x4>;
diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt
index 0a1dc4e1815c..ec20c1271e92 100644
--- a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt
@@ -33,7 +33,7 @@ Required properties on RK3288:
33 33
34Example for the rk3188 SPDIF controller: 34Example for the rk3188 SPDIF controller:
35 35
36spdif: spdif@0x1011e000 { 36spdif: spdif@1011e000 {
37 compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif"; 37 compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
38 reg = <0x1011e000 0x2000>; 38 reg = <0x1011e000 0x2000>;
39 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 39 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt b/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
index 40068ec0e9a5..9c1ee52fed5b 100644
--- a/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
@@ -51,7 +51,7 @@ Optional properties:
51 51
52Example: 52Example:
53 53
54 sti_uni_player1: sti-uni-player@0x8D81000 { 54 sti_uni_player1: sti-uni-player@8D81000 {
55 compatible = "st,stih407-uni-player-hdmi"; 55 compatible = "st,stih407-uni-player-hdmi";
56 #sound-dai-cells = <0>; 56 #sound-dai-cells = <0>;
57 st,syscfg = <&syscfg_core>; 57 st,syscfg = <&syscfg_core>;
@@ -63,7 +63,7 @@ Example:
63 st,tdm-mode = <1>; 63 st,tdm-mode = <1>;
64 }; 64 };
65 65
66 sti_uni_player2: sti-uni-player@0x8D82000 { 66 sti_uni_player2: sti-uni-player@8D82000 {
67 compatible = "st,stih407-uni-player-pcm-out"; 67 compatible = "st,stih407-uni-player-pcm-out";
68 #sound-dai-cells = <0>; 68 #sound-dai-cells = <0>;
69 st,syscfg = <&syscfg_core>; 69 st,syscfg = <&syscfg_core>;
@@ -74,7 +74,7 @@ Example:
74 dma-names = "tx"; 74 dma-names = "tx";
75 }; 75 };
76 76
77 sti_uni_player3: sti-uni-player@0x8D85000 { 77 sti_uni_player3: sti-uni-player@8D85000 {
78 compatible = "st,stih407-uni-player-spdif"; 78 compatible = "st,stih407-uni-player-spdif";
79 #sound-dai-cells = <0>; 79 #sound-dai-cells = <0>;
80 st,syscfg = <&syscfg_core>; 80 st,syscfg = <&syscfg_core>;
@@ -85,7 +85,7 @@ Example:
85 dma-names = "tx"; 85 dma-names = "tx";
86 }; 86 };
87 87
88 sti_uni_reader1: sti-uni-reader@0x8D84000 { 88 sti_uni_reader1: sti-uni-reader@8D84000 {
89 compatible = "st,stih407-uni-reader-hdmi"; 89 compatible = "st,stih407-uni-reader-hdmi";
90 #sound-dai-cells = <0>; 90 #sound-dai-cells = <0>;
91 st,syscfg = <&syscfg_core>; 91 st,syscfg = <&syscfg_core>;
diff --git a/Documentation/devicetree/bindings/spi/efm32-spi.txt b/Documentation/devicetree/bindings/spi/efm32-spi.txt
index 2c1e6a43930b..e0fa61a1be0c 100644
--- a/Documentation/devicetree/bindings/spi/efm32-spi.txt
+++ b/Documentation/devicetree/bindings/spi/efm32-spi.txt
@@ -19,7 +19,7 @@ Recommended properties :
19 19
20Example: 20Example:
21 21
22spi1: spi@0x4000c400 { /* USART1 */ 22spi1: spi@4000c400 { /* USART1 */
23 #address-cells = <1>; 23 #address-cells = <1>;
24 #size-cells = <0>; 24 #size-cells = <0>;
25 compatible = "energymicro,efm32-spi"; 25 compatible = "energymicro,efm32-spi";
diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index 88b6ea1ad290..44d7cb2cb2c0 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -239,7 +239,7 @@ cpus {
239 * A simple fan controller which supports 10 speeds of operation 239 * A simple fan controller which supports 10 speeds of operation
240 * (represented as 0-9). 240 * (represented as 0-9).
241 */ 241 */
242 fan0: fan@0x48 { 242 fan0: fan@48 {
243 ... 243 ...
244 cooling-min-level = <0>; 244 cooling-min-level = <0>;
245 cooling-max-level = <9>; 245 cooling-max-level = <9>;
@@ -252,7 +252,7 @@ ocp {
252 /* 252 /*
253 * A simple IC with a single bandgap temperature sensor. 253 * A simple IC with a single bandgap temperature sensor.
254 */ 254 */
255 bandgap0: bandgap@0x0000ED00 { 255 bandgap0: bandgap@0000ED00 {
256 ... 256 ...
257 #thermal-sensor-cells = <0>; 257 #thermal-sensor-cells = <0>;
258 }; 258 };
@@ -330,7 +330,7 @@ ocp {
330 /* 330 /*
331 * A simple IC with several bandgap temperature sensors. 331 * A simple IC with several bandgap temperature sensors.
332 */ 332 */
333 bandgap0: bandgap@0x0000ED00 { 333 bandgap0: bandgap@0000ED00 {
334 ... 334 ...
335 #thermal-sensor-cells = <1>; 335 #thermal-sensor-cells = <1>;
336 }; 336 };
@@ -447,7 +447,7 @@ one thermal zone.
447 /* 447 /*
448 * A simple IC with a single temperature sensor. 448 * A simple IC with a single temperature sensor.
449 */ 449 */
450 adc: sensor@0x49 { 450 adc: sensor@49 {
451 ... 451 ...
452 #thermal-sensor-cells = <0>; 452 #thermal-sensor-cells = <0>;
453 }; 453 };
@@ -458,7 +458,7 @@ ocp {
458 /* 458 /*
459 * A simple IC with a single bandgap temperature sensor. 459 * A simple IC with a single bandgap temperature sensor.
460 */ 460 */
461 bandgap0: bandgap@0x0000ED00 { 461 bandgap0: bandgap@0000ED00 {
462 ... 462 ...
463 #thermal-sensor-cells = <0>; 463 #thermal-sensor-cells = <0>;
464 }; 464 };
@@ -516,7 +516,7 @@ with many sensors and many cooling devices.
516 /* 516 /*
517 * An IC with several temperature sensor. 517 * An IC with several temperature sensor.
518 */ 518 */
519 adc_dummy: sensor@0x50 { 519 adc_dummy: sensor@50 {
520 ... 520 ...
521 #thermal-sensor-cells = <1>; /* sensor internal ID */ 521 #thermal-sensor-cells = <1>; /* sensor internal ID */
522 }; 522 };
diff --git a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt
index 1f69ee1a61ea..21d9a93db2e9 100644
--- a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt
+++ b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt
@@ -32,7 +32,7 @@ Optional properties:
32 32
33Example: 33Example:
34 34
35 ufsphy1: ufsphy@0xfc597000 { 35 ufsphy1: ufsphy@fc597000 {
36 compatible = "qcom,ufs-phy-qmp-20nm"; 36 compatible = "qcom,ufs-phy-qmp-20nm";
37 reg = <0xfc597000 0x800>; 37 reg = <0xfc597000 0x800>;
38 reg-names = "phy_mem"; 38 reg-names = "phy_mem";
@@ -53,7 +53,7 @@ Example:
53 <&clock_gcc clk_gcc_ufs_rx_cfg_clk>; 53 <&clock_gcc clk_gcc_ufs_rx_cfg_clk>;
54 }; 54 };
55 55
56 ufshc@0xfc598000 { 56 ufshc@fc598000 {
57 ... 57 ...
58 phys = <&ufsphy1>; 58 phys = <&ufsphy1>;
59 phy-names = "ufsphy"; 59 phy-names = "ufsphy";
diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
index a99ed5565b26..c39dfef76a18 100644
--- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
+++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
@@ -46,7 +46,7 @@ Note: If above properties are not defined it can be assumed that the supply
46regulators or clocks are always on. 46regulators or clocks are always on.
47 47
48Example: 48Example:
49 ufshc@0xfc598000 { 49 ufshc@fc598000 {
50 compatible = "jedec,ufs-1.1"; 50 compatible = "jedec,ufs-1.1";
51 reg = <0xfc598000 0x800>; 51 reg = <0xfc598000 0x800>;
52 interrupts = <0 28 0>; 52 interrupts = <0 28 0>;
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
index 7a33f22c815a..7a198a30408a 100644
--- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
@@ -95,6 +95,7 @@ usb: usb@47400000 {
95 reg = <0x47401300 0x100>; 95 reg = <0x47401300 0x100>;
96 reg-names = "phy"; 96 reg-names = "phy";
97 ti,ctrl_mod = <&ctrl_mod>; 97 ti,ctrl_mod = <&ctrl_mod>;
98 #phy-cells = <0>;
98 }; 99 };
99 100
100 usb0: usb@47401000 { 101 usb0: usb@47401000 {
@@ -141,6 +142,7 @@ usb: usb@47400000 {
141 reg = <0x47401b00 0x100>; 142 reg = <0x47401b00 0x100>;
142 reg-names = "phy"; 143 reg-names = "phy";
143 ti,ctrl_mod = <&ctrl_mod>; 144 ti,ctrl_mod = <&ctrl_mod>;
145 #phy-cells = <0>;
144 }; 146 };
145 147
146 usb1: usb@47401800 { 148 usb1: usb@47401800 {
diff --git a/Documentation/devicetree/bindings/usb/ehci-st.txt b/Documentation/devicetree/bindings/usb/ehci-st.txt
index 9feea6c3e4d9..065c91d955ad 100644
--- a/Documentation/devicetree/bindings/usb/ehci-st.txt
+++ b/Documentation/devicetree/bindings/usb/ehci-st.txt
@@ -22,7 +22,7 @@ See: Documentation/devicetree/bindings/reset/reset.txt
22 22
23Example: 23Example:
24 24
25 ehci1: usb@0xfe203e00 { 25 ehci1: usb@fe203e00 {
26 compatible = "st,st-ehci-300x"; 26 compatible = "st,st-ehci-300x";
27 reg = <0xfe203e00 0x100>; 27 reg = <0xfe203e00 0x100>;
28 interrupts = <GIC_SPI 148 IRQ_TYPE_NONE>; 28 interrupts = <GIC_SPI 148 IRQ_TYPE_NONE>;
diff --git a/Documentation/devicetree/bindings/usb/ohci-st.txt b/Documentation/devicetree/bindings/usb/ohci-st.txt
index d893ec9131c3..44c998c16f85 100644
--- a/Documentation/devicetree/bindings/usb/ohci-st.txt
+++ b/Documentation/devicetree/bindings/usb/ohci-st.txt
@@ -20,7 +20,7 @@ See: Documentation/devicetree/bindings/reset/reset.txt
20 20
21Example: 21Example:
22 22
23 ohci0: usb@0xfe1ffc00 { 23 ohci0: usb@fe1ffc00 {
24 compatible = "st,st-ohci-300x"; 24 compatible = "st,st-ohci-300x";
25 reg = <0xfe1ffc00 0x100>; 25 reg = <0xfe1ffc00 0x100>;
26 interrupts = <GIC_SPI 149 IRQ_TYPE_NONE>; 26 interrupts = <GIC_SPI 149 IRQ_TYPE_NONE>;
diff --git a/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt b/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
index e27763ef0049..3c7a1cd13b10 100644
--- a/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
@@ -6,7 +6,7 @@ reg: Register address and length for watchdog registers
6 6
7Example: 7Example:
8 8
9watchdog: jz4740-watchdog@0x10002000 { 9watchdog: jz4740-watchdog@10002000 {
10 compatible = "ingenic,jz4740-watchdog"; 10 compatible = "ingenic,jz4740-watchdog";
11 reg = <0x10002000 0x100>; 11 reg = <0x10002000 0x100>;
12}; 12};
diff --git a/Documentation/driver-api/dmaengine/client.rst b/Documentation/driver-api/dmaengine/client.rst
index 6245c99af8c1..fbbb2831f29f 100644
--- a/Documentation/driver-api/dmaengine/client.rst
+++ b/Documentation/driver-api/dmaengine/client.rst
@@ -185,7 +185,7 @@ The details of these operations are:
185 void dma_async_issue_pending(struct dma_chan *chan); 185 void dma_async_issue_pending(struct dma_chan *chan);
186 186
187Further APIs: 187Further APIs:
188------------ 188-------------
189 189
1901. Terminate APIs 1901. Terminate APIs
191 191
diff --git a/Documentation/driver-api/pci.rst b/Documentation/driver-api/pci.rst
index 01a6c8b7d3a7..ca85e5e78b2c 100644
--- a/Documentation/driver-api/pci.rst
+++ b/Documentation/driver-api/pci.rst
@@ -25,9 +25,6 @@ PCI Support Library
25.. kernel-doc:: drivers/pci/irq.c 25.. kernel-doc:: drivers/pci/irq.c
26 :export: 26 :export:
27 27
28.. kernel-doc:: drivers/pci/htirq.c
29 :export:
30
31.. kernel-doc:: drivers/pci/probe.c 28.. kernel-doc:: drivers/pci/probe.c
32 :export: 29 :export:
33 30
diff --git a/Documentation/media/dvb-drivers/frontends.rst b/Documentation/media/dvb-drivers/frontends.rst
new file mode 100644
index 000000000000..1f5f57989196
--- /dev/null
+++ b/Documentation/media/dvb-drivers/frontends.rst
@@ -0,0 +1,30 @@
1****************
2Frontend drivers
3****************
4
5Frontend attach headers
6***********************
7
8.. Keep it on alphabetic order
9
10.. kernel-doc:: drivers/media/dvb-frontends/a8293.h
11.. kernel-doc:: drivers/media/dvb-frontends/af9013.h
12.. kernel-doc:: drivers/media/dvb-frontends/ascot2e.h
13.. kernel-doc:: drivers/media/dvb-frontends/cxd2820r.h
14.. kernel-doc:: drivers/media/dvb-frontends/drxk.h
15.. kernel-doc:: drivers/media/dvb-frontends/dvb-pll.h
16.. kernel-doc:: drivers/media/dvb-frontends/helene.h
17.. kernel-doc:: drivers/media/dvb-frontends/horus3a.h
18.. kernel-doc:: drivers/media/dvb-frontends/ix2505v.h
19.. kernel-doc:: drivers/media/dvb-frontends/m88ds3103.h
20.. kernel-doc:: drivers/media/dvb-frontends/mb86a20s.h
21.. kernel-doc:: drivers/media/dvb-frontends/mn88472.h
22.. kernel-doc:: drivers/media/dvb-frontends/rtl2830.h
23.. kernel-doc:: drivers/media/dvb-frontends/rtl2832.h
24.. kernel-doc:: drivers/media/dvb-frontends/rtl2832_sdr.h
25.. kernel-doc:: drivers/media/dvb-frontends/stb6000.h
26.. kernel-doc:: drivers/media/dvb-frontends/tda10071.h
27.. kernel-doc:: drivers/media/dvb-frontends/tda826x.h
28.. kernel-doc:: drivers/media/dvb-frontends/zd1301_demod.h
29.. kernel-doc:: drivers/media/dvb-frontends/zl10036.h
30
diff --git a/Documentation/media/dvb-drivers/index.rst b/Documentation/media/dvb-drivers/index.rst
index 376141143ae9..314e127d82e3 100644
--- a/Documentation/media/dvb-drivers/index.rst
+++ b/Documentation/media/dvb-drivers/index.rst
@@ -41,4 +41,5 @@ For more details see the file COPYING in the source distribution of Linux.
41 technisat 41 technisat
42 ttusb-dec 42 ttusb-dec
43 udev 43 udev
44 frontends
44 contributors 45 contributors
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index 6338400eed73..2c31d9ee6776 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -319,12 +319,12 @@ struct Scsi_Host:
319 instance. If the reference count reaches 0 then the given instance 319 instance. If the reference count reaches 0 then the given instance
320 is freed 320 is freed
321 321
322The Scsi_device structure has had reference counting infrastructure added. 322The scsi_device structure has had reference counting infrastructure added.
323This effectively spreads the ownership of struct Scsi_device instances 323This effectively spreads the ownership of struct scsi_device instances
324across the various SCSI layers which use them. Previously such instances 324across the various SCSI layers which use them. Previously such instances
325were exclusively owned by the mid level. See the access functions declared 325were exclusively owned by the mid level. See the access functions declared
326towards the end of include/scsi/scsi_device.h . If an LLD wants to keep 326towards the end of include/scsi/scsi_device.h . If an LLD wants to keep
327a copy of a pointer to a Scsi_device instance it should use scsi_device_get() 327a copy of a pointer to a scsi_device instance it should use scsi_device_get()
328to bump its reference count. When it is finished with the pointer it can 328to bump its reference count. When it is finished with the pointer it can
329use scsi_device_put() to decrement its reference count (and potentially 329use scsi_device_put() to decrement its reference count (and potentially
330delete it). 330delete it).
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index f670e4b9e7f3..57d3ee9e4bde 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2901,14 +2901,19 @@ userspace buffer and its length:
2901 2901
2902struct kvm_s390_irq_state { 2902struct kvm_s390_irq_state {
2903 __u64 buf; 2903 __u64 buf;
2904 __u32 flags; 2904 __u32 flags; /* will stay unused for compatibility reasons */
2905 __u32 len; 2905 __u32 len;
2906 __u32 reserved[4]; 2906 __u32 reserved[4]; /* will stay unused for compatibility reasons */
2907}; 2907};
2908 2908
2909Userspace passes in the above struct and for each pending interrupt a 2909Userspace passes in the above struct and for each pending interrupt a
2910struct kvm_s390_irq is copied to the provided buffer. 2910struct kvm_s390_irq is copied to the provided buffer.
2911 2911
2912The structure contains a flags and a reserved field for future extensions. As
2913the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and
2914reserved, these fields can not be used in the future without breaking
2915compatibility.
2916
2912If -ENOBUFS is returned the buffer provided was too small and userspace 2917If -ENOBUFS is returned the buffer provided was too small and userspace
2913may retry with a bigger buffer. 2918may retry with a bigger buffer.
2914 2919
@@ -2932,10 +2937,14 @@ containing a struct kvm_s390_irq_state:
2932 2937
2933struct kvm_s390_irq_state { 2938struct kvm_s390_irq_state {
2934 __u64 buf; 2939 __u64 buf;
2940 __u32 flags; /* will stay unused for compatibility reasons */
2935 __u32 len; 2941 __u32 len;
2936 __u32 pad; 2942 __u32 reserved[4]; /* will stay unused for compatibility reasons */
2937}; 2943};
2938 2944
2945The restrictions for flags and reserved apply as well.
2946(see KVM_S390_GET_IRQ_STATE)
2947
2939The userspace memory referenced by buf contains a struct kvm_s390_irq 2948The userspace memory referenced by buf contains a struct kvm_s390_irq
2940for each interrupt to be injected into the guest. 2949for each interrupt to be injected into the guest.
2941If one of the interrupts could not be injected for some reason the 2950If one of the interrupts could not be injected for some reason the
diff --git a/MAINTAINERS b/MAINTAINERS
index d4fdcb12616c..82ad0eabce4f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -554,13 +554,13 @@ S: Orphan
554F: Documentation/filesystems/affs.txt 554F: Documentation/filesystems/affs.txt
555F: fs/affs/ 555F: fs/affs/
556 556
557AFS FILESYSTEM & AF_RXRPC SOCKET DOMAIN 557AFS FILESYSTEM
558M: David Howells <dhowells@redhat.com> 558M: David Howells <dhowells@redhat.com>
559L: linux-afs@lists.infradead.org 559L: linux-afs@lists.infradead.org
560S: Supported 560S: Supported
561F: fs/afs/ 561F: fs/afs/
562F: include/net/af_rxrpc.h 562F: include/trace/events/afs.h
563F: net/rxrpc/af_rxrpc.c 563F: Documentation/filesystems/afs.txt
564W: https://www.infradead.org/~dhowells/kafs/ 564W: https://www.infradead.org/~dhowells/kafs/
565 565
566AGPGART DRIVER 566AGPGART DRIVER
@@ -859,7 +859,8 @@ F: kernel/configs/android*
859ANDROID DRIVERS 859ANDROID DRIVERS
860M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 860M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
861M: Arve Hjønnevåg <arve@android.com> 861M: Arve Hjønnevåg <arve@android.com>
862M: Riley Andrews <riandrews@android.com> 862M: Todd Kjos <tkjos@android.com>
863M: Martijn Coenen <maco@android.com>
863T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 864T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
864L: devel@driverdev.osuosl.org 865L: devel@driverdev.osuosl.org
865S: Supported 866S: Supported
@@ -2046,7 +2047,7 @@ F: arch/arm/boot/dts/uniphier*
2046F: arch/arm/include/asm/hardware/cache-uniphier.h 2047F: arch/arm/include/asm/hardware/cache-uniphier.h
2047F: arch/arm/mach-uniphier/ 2048F: arch/arm/mach-uniphier/
2048F: arch/arm/mm/cache-uniphier.c 2049F: arch/arm/mm/cache-uniphier.c
2049F: arch/arm64/boot/dts/socionext/ 2050F: arch/arm64/boot/dts/socionext/uniphier*
2050F: drivers/bus/uniphier-system-bus.c 2051F: drivers/bus/uniphier-system-bus.c
2051F: drivers/clk/uniphier/ 2052F: drivers/clk/uniphier/
2052F: drivers/gpio/gpio-uniphier.c 2053F: drivers/gpio/gpio-uniphier.c
@@ -7766,6 +7767,7 @@ F: security/keys/
7766 7767
7767KGDB / KDB /debug_core 7768KGDB / KDB /debug_core
7768M: Jason Wessel <jason.wessel@windriver.com> 7769M: Jason Wessel <jason.wessel@windriver.com>
7770M: Daniel Thompson <daniel.thompson@linaro.org>
7769W: http://kgdb.wiki.kernel.org/ 7771W: http://kgdb.wiki.kernel.org/
7770L: kgdb-bugreport@lists.sourceforge.net 7772L: kgdb-bugreport@lists.sourceforge.net
7771T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git 7773T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git
@@ -11776,6 +11778,18 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git rtl8xxxu-deve
11776S: Maintained 11778S: Maintained
11777F: drivers/net/wireless/realtek/rtl8xxxu/ 11779F: drivers/net/wireless/realtek/rtl8xxxu/
11778 11780
11781RXRPC SOCKETS (AF_RXRPC)
11782M: David Howells <dhowells@redhat.com>
11783L: linux-afs@lists.infradead.org
11784S: Supported
11785F: net/rxrpc/
11786F: include/keys/rxrpc-type.h
11787F: include/net/af_rxrpc.h
11788F: include/trace/events/rxrpc.h
11789F: include/uapi/linux/rxrpc.h
11790F: Documentation/networking/rxrpc.txt
11791W: https://www.infradead.org/~dhowells/kafs/
11792
11779S3 SAVAGE FRAMEBUFFER DRIVER 11793S3 SAVAGE FRAMEBUFFER DRIVER
11780M: Antonino Daplas <adaplas@gmail.com> 11794M: Antonino Daplas <adaplas@gmail.com>
11781L: linux-fbdev@vger.kernel.org 11795L: linux-fbdev@vger.kernel.org
@@ -12629,6 +12643,14 @@ S: Maintained
12629F: drivers/ssb/ 12643F: drivers/ssb/
12630F: include/linux/ssb/ 12644F: include/linux/ssb/
12631 12645
12646SONY IMX274 SENSOR DRIVER
12647M: Leon Luo <leonl@leopardimaging.com>
12648L: linux-media@vger.kernel.org
12649T: git git://linuxtv.org/media_tree.git
12650S: Maintained
12651F: drivers/media/i2c/imx274.c
12652F: Documentation/devicetree/bindings/media/i2c/imx274.txt
12653
12632SONY MEMORYSTICK CARD SUPPORT 12654SONY MEMORYSTICK CARD SUPPORT
12633M: Alex Dubov <oakad@yahoo.com> 12655M: Alex Dubov <oakad@yahoo.com>
12634W: http://tifmxx.berlios.de/ 12656W: http://tifmxx.berlios.de/
@@ -13647,10 +13669,8 @@ F: drivers/net/wireless/ti/
13647F: include/linux/wl12xx.h 13669F: include/linux/wl12xx.h
13648 13670
13649TILE ARCHITECTURE 13671TILE ARCHITECTURE
13650M: Chris Metcalf <cmetcalf@mellanox.com>
13651W: http://www.mellanox.com/repository/solutions/tile-scm/ 13672W: http://www.mellanox.com/repository/solutions/tile-scm/
13652T: git git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git 13673S: Orphan
13653S: Supported
13654F: arch/tile/ 13674F: arch/tile/
13655F: drivers/char/tile-srom.c 13675F: drivers/char/tile-srom.c
13656F: drivers/edac/tile_edac.c 13676F: drivers/edac/tile_edac.c
diff --git a/Makefile b/Makefile
index c988e46a53cd..3f4d157add54 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
2VERSION = 4 2VERSION = 4
3PATCHLEVEL = 15 3PATCHLEVEL = 15
4SUBLEVEL = 0 4SUBLEVEL = 0
5EXTRAVERSION = -rc2 5EXTRAVERSION = -rc3
6NAME = Fearless Coyote 6NAME = Fearless Coyote
7 7
8# *DOCUMENTATION* 8# *DOCUMENTATION*
diff --git a/arch/alpha/include/uapi/asm/Kbuild b/arch/alpha/include/uapi/asm/Kbuild
index b15bf6bc0e94..14a2e9af97e9 100644
--- a/arch/alpha/include/uapi/asm/Kbuild
+++ b/arch/alpha/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3
4generic-y += bpf_perf_event.h
diff --git a/arch/arc/include/uapi/asm/Kbuild b/arch/arc/include/uapi/asm/Kbuild
index fa6d0ff4ff89..170b5db64afe 100644
--- a/arch/arc/include/uapi/asm/Kbuild
+++ b/arch/arc/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 1b81c4e75772..d37f95025807 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -630,6 +630,7 @@
630 reg-names = "phy"; 630 reg-names = "phy";
631 status = "disabled"; 631 status = "disabled";
632 ti,ctrl_mod = <&usb_ctrl_mod>; 632 ti,ctrl_mod = <&usb_ctrl_mod>;
633 #phy-cells = <0>;
633 }; 634 };
634 635
635 usb0: usb@47401000 { 636 usb0: usb@47401000 {
@@ -678,6 +679,7 @@
678 reg-names = "phy"; 679 reg-names = "phy";
679 status = "disabled"; 680 status = "disabled";
680 ti,ctrl_mod = <&usb_ctrl_mod>; 681 ti,ctrl_mod = <&usb_ctrl_mod>;
682 #phy-cells = <0>;
681 }; 683 };
682 684
683 usb1: usb@47401800 { 685 usb1: usb@47401800 {
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index e5b061469bf8..4714a59fd86d 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -927,7 +927,8 @@
927 reg = <0x48038000 0x2000>, 927 reg = <0x48038000 0x2000>,
928 <0x46000000 0x400000>; 928 <0x46000000 0x400000>;
929 reg-names = "mpu", "dat"; 929 reg-names = "mpu", "dat";
930 interrupts = <80>, <81>; 930 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
931 <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
931 interrupt-names = "tx", "rx"; 932 interrupt-names = "tx", "rx";
932 status = "disabled"; 933 status = "disabled";
933 dmas = <&edma 8 2>, 934 dmas = <&edma 8 2>,
@@ -941,7 +942,8 @@
941 reg = <0x4803C000 0x2000>, 942 reg = <0x4803C000 0x2000>,
942 <0x46400000 0x400000>; 943 <0x46400000 0x400000>;
943 reg-names = "mpu", "dat"; 944 reg-names = "mpu", "dat";
944 interrupts = <82>, <83>; 945 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>,
946 <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
945 interrupt-names = "tx", "rx"; 947 interrupt-names = "tx", "rx";
946 status = "disabled"; 948 status = "disabled";
947 dmas = <&edma 10 2>, 949 dmas = <&edma 10 2>,
diff --git a/arch/arm/boot/dts/am437x-cm-t43.dts b/arch/arm/boot/dts/am437x-cm-t43.dts
index 9e92d480576b..3b9a94c274a7 100644
--- a/arch/arm/boot/dts/am437x-cm-t43.dts
+++ b/arch/arm/boot/dts/am437x-cm-t43.dts
@@ -301,8 +301,8 @@
301 status = "okay"; 301 status = "okay";
302 pinctrl-names = "default"; 302 pinctrl-names = "default";
303 pinctrl-0 = <&spi0_pins>; 303 pinctrl-0 = <&spi0_pins>;
304 dmas = <&edma 16 304 dmas = <&edma 16 0
305 &edma 17>; 305 &edma 17 0>;
306 dma-names = "tx0", "rx0"; 306 dma-names = "tx0", "rx0";
307 307
308 flash: w25q64cvzpig@0 { 308 flash: w25q64cvzpig@0 {
diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
index 25d2d720dc0e..678aa023335d 100644
--- a/arch/arm/boot/dts/armada-385-db-ap.dts
+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
@@ -236,6 +236,7 @@
236 usb3_phy: usb3_phy { 236 usb3_phy: usb3_phy {
237 compatible = "usb-nop-xceiv"; 237 compatible = "usb-nop-xceiv";
238 vcc-supply = <&reg_xhci0_vbus>; 238 vcc-supply = <&reg_xhci0_vbus>;
239 #phy-cells = <0>;
239 }; 240 };
240 241
241 reg_xhci0_vbus: xhci0-vbus { 242 reg_xhci0_vbus: xhci0-vbus {
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index e1f355ffc8f7..434dc9aaa5e4 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -66,6 +66,7 @@
66 usb3_1_phy: usb3_1-phy { 66 usb3_1_phy: usb3_1-phy {
67 compatible = "usb-nop-xceiv"; 67 compatible = "usb-nop-xceiv";
68 vcc-supply = <&usb3_1_vbus>; 68 vcc-supply = <&usb3_1_vbus>;
69 #phy-cells = <0>;
69 }; 70 };
70 71
71 usb3_1_vbus: usb3_1-vbus { 72 usb3_1_vbus: usb3_1-vbus {
diff --git a/arch/arm/boot/dts/armada-385-synology-ds116.dts b/arch/arm/boot/dts/armada-385-synology-ds116.dts
index 36ad571e76f3..0a3552ebda3b 100644
--- a/arch/arm/boot/dts/armada-385-synology-ds116.dts
+++ b/arch/arm/boot/dts/armada-385-synology-ds116.dts
@@ -191,11 +191,13 @@
191 usb3_0_phy: usb3_0_phy { 191 usb3_0_phy: usb3_0_phy {
192 compatible = "usb-nop-xceiv"; 192 compatible = "usb-nop-xceiv";
193 vcc-supply = <&reg_usb3_0_vbus>; 193 vcc-supply = <&reg_usb3_0_vbus>;
194 #phy-cells = <0>;
194 }; 195 };
195 196
196 usb3_1_phy: usb3_1_phy { 197 usb3_1_phy: usb3_1_phy {
197 compatible = "usb-nop-xceiv"; 198 compatible = "usb-nop-xceiv";
198 vcc-supply = <&reg_usb3_1_vbus>; 199 vcc-supply = <&reg_usb3_1_vbus>;
200 #phy-cells = <0>;
199 }; 201 };
200 202
201 reg_usb3_0_vbus: usb3-vbus0 { 203 reg_usb3_0_vbus: usb3-vbus0 {
diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts
index f503955dbd3b..51b4ee6df130 100644
--- a/arch/arm/boot/dts/armada-388-gp.dts
+++ b/arch/arm/boot/dts/armada-388-gp.dts
@@ -276,11 +276,13 @@
276 usb2_1_phy: usb2_1_phy { 276 usb2_1_phy: usb2_1_phy {
277 compatible = "usb-nop-xceiv"; 277 compatible = "usb-nop-xceiv";
278 vcc-supply = <&reg_usb2_1_vbus>; 278 vcc-supply = <&reg_usb2_1_vbus>;
279 #phy-cells = <0>;
279 }; 280 };
280 281
281 usb3_phy: usb3_phy { 282 usb3_phy: usb3_phy {
282 compatible = "usb-nop-xceiv"; 283 compatible = "usb-nop-xceiv";
283 vcc-supply = <&reg_usb3_vbus>; 284 vcc-supply = <&reg_usb3_vbus>;
285 #phy-cells = <0>;
284 }; 286 };
285 287
286 reg_usb3_vbus: usb3-vbus { 288 reg_usb3_vbus: usb3-vbus {
diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 528b9e3bc1da..dcc55aa84583 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -85,7 +85,7 @@
85 timer@20200 { 85 timer@20200 {
86 compatible = "arm,cortex-a9-global-timer"; 86 compatible = "arm,cortex-a9-global-timer";
87 reg = <0x20200 0x100>; 87 reg = <0x20200 0x100>;
88 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; 88 interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
89 clocks = <&periph_clk>; 89 clocks = <&periph_clk>;
90 }; 90 };
91 91
@@ -93,7 +93,7 @@
93 compatible = "arm,cortex-a9-twd-timer"; 93 compatible = "arm,cortex-a9-twd-timer";
94 reg = <0x20600 0x20>; 94 reg = <0x20600 0x20>;
95 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | 95 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
96 IRQ_TYPE_LEVEL_HIGH)>; 96 IRQ_TYPE_EDGE_RISING)>;
97 clocks = <&periph_clk>; 97 clocks = <&periph_clk>;
98 }; 98 };
99 99
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 013431e3d7c3..dcde93c85c2d 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -639,5 +639,6 @@
639 639
640 usbphy: phy { 640 usbphy: phy {
641 compatible = "usb-nop-xceiv"; 641 compatible = "usb-nop-xceiv";
642 #phy-cells = <0>;
642 }; 643 };
643}; 644};
diff --git a/arch/arm/boot/dts/bcm958623hr.dts b/arch/arm/boot/dts/bcm958623hr.dts
index 3bc50849d013..b8bde13de90a 100644
--- a/arch/arm/boot/dts/bcm958623hr.dts
+++ b/arch/arm/boot/dts/bcm958623hr.dts
@@ -141,10 +141,6 @@
141 status = "okay"; 141 status = "okay";
142}; 142};
143 143
144&sata {
145 status = "okay";
146};
147
148&qspi { 144&qspi {
149 bspi-sel = <0>; 145 bspi-sel = <0>;
150 flash: m25p80@0 { 146 flash: m25p80@0 {
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index d94d14b3c745..6a44b8021702 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -177,10 +177,6 @@
177 status = "okay"; 177 status = "okay";
178}; 178};
179 179
180&sata {
181 status = "okay";
182};
183
184&srab { 180&srab {
185 compatible = "brcm,bcm58625-srab", "brcm,nsp-srab"; 181 compatible = "brcm,bcm58625-srab", "brcm,nsp-srab";
186 status = "okay"; 182 status = "okay";
diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm/boot/dts/dm814x.dtsi
index 9708157f5daf..681f5487406e 100644
--- a/arch/arm/boot/dts/dm814x.dtsi
+++ b/arch/arm/boot/dts/dm814x.dtsi
@@ -75,6 +75,7 @@
75 reg = <0x47401300 0x100>; 75 reg = <0x47401300 0x100>;
76 reg-names = "phy"; 76 reg-names = "phy";
77 ti,ctrl_mod = <&usb_ctrl_mod>; 77 ti,ctrl_mod = <&usb_ctrl_mod>;
78 #phy-cells = <0>;
78 }; 79 };
79 80
80 usb0: usb@47401000 { 81 usb0: usb@47401000 {
@@ -385,6 +386,7 @@
385 reg = <0x1b00 0x100>; 386 reg = <0x1b00 0x100>;
386 reg-names = "phy"; 387 reg-names = "phy";
387 ti,ctrl_mod = <&usb_ctrl_mod>; 388 ti,ctrl_mod = <&usb_ctrl_mod>;
389 #phy-cells = <0>;
388 }; 390 };
389 }; 391 };
390 392
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 589a67c5f796..84f17f7abb71 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,15 +433,6 @@
433 clock-names = "ipg", "per"; 433 clock-names = "ipg", "per";
434 }; 434 };
435 435
436 srtc: srtc@53fa4000 {
437 compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
438 reg = <0x53fa4000 0x4000>;
439 interrupts = <24>;
440 interrupt-parent = <&tzic>;
441 clocks = <&clks IMX5_CLK_SRTC_GATE>;
442 clock-names = "ipg";
443 };
444
445 iomuxc: iomuxc@53fa8000 { 436 iomuxc: iomuxc@53fa8000 {
446 compatible = "fsl,imx53-iomuxc"; 437 compatible = "fsl,imx53-iomuxc";
447 reg = <0x53fa8000 0x4000>; 438 reg = <0x53fa8000 0x4000>;
diff --git a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
index 38faa90007d7..2fa5eb4bd402 100644
--- a/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
+++ b/arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
@@ -72,7 +72,8 @@
72}; 72};
73 73
74&gpmc { 74&gpmc {
75 ranges = <1 0 0x08000000 0x1000000>; /* CS1: 16MB for LAN9221 */ 75 ranges = <0 0 0x30000000 0x1000000 /* CS0: 16MB for NAND */
76 1 0 0x2c000000 0x1000000>; /* CS1: 16MB for LAN9221 */
76 77
77 ethernet@gpmc { 78 ethernet@gpmc {
78 pinctrl-names = "default"; 79 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/logicpd-som-lv.dtsi b/arch/arm/boot/dts/logicpd-som-lv.dtsi
index 26cce4d18405..29cb804d10cc 100644
--- a/arch/arm/boot/dts/logicpd-som-lv.dtsi
+++ b/arch/arm/boot/dts/logicpd-som-lv.dtsi
@@ -33,11 +33,12 @@
33 hsusb2_phy: hsusb2_phy { 33 hsusb2_phy: hsusb2_phy {
34 compatible = "usb-nop-xceiv"; 34 compatible = "usb-nop-xceiv";
35 reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */ 35 reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */
36 #phy-cells = <0>;
36 }; 37 };
37}; 38};
38 39
39&gpmc { 40&gpmc {
40 ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */ 41 ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */
41 42
42 nand@0,0 { 43 nand@0,0 {
43 compatible = "ti,omap2-nand"; 44 compatible = "ti,omap2-nand";
@@ -121,7 +122,7 @@
121 122
122&mmc3 { 123&mmc3 {
123 interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>; 124 interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
124 pinctrl-0 = <&mmc3_pins>; 125 pinctrl-0 = <&mmc3_pins &wl127x_gpio>;
125 pinctrl-names = "default"; 126 pinctrl-names = "default";
126 vmmc-supply = <&wl12xx_vmmc>; 127 vmmc-supply = <&wl12xx_vmmc>;
127 non-removable; 128 non-removable;
@@ -132,8 +133,8 @@
132 wlcore: wlcore@2 { 133 wlcore: wlcore@2 {
133 compatible = "ti,wl1273"; 134 compatible = "ti,wl1273";
134 reg = <2>; 135 reg = <2>;
135 interrupt-parent = <&gpio5>; 136 interrupt-parent = <&gpio1>;
136 interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */ 137 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 2 */
137 ref-clock-frequency = <26000000>; 138 ref-clock-frequency = <26000000>;
138 }; 139 };
139}; 140};
@@ -157,8 +158,6 @@
157 OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */ 158 OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */
158 OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */ 159 OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */
159 OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */ 160 OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */
160 OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */
161 OMAP3_CORE1_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */
162 OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */ 161 OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */
163 OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */ 162 OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */
164 >; 163 >;
@@ -228,6 +227,12 @@
228 OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4) /* sys_boot2.gpio_4 */ 227 OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4) /* sys_boot2.gpio_4 */
229 >; 228 >;
230 }; 229 };
230 wl127x_gpio: pinmux_wl127x_gpio_pin {
231 pinctrl-single,pins = <
232 OMAP3_WKUP_IOPAD(0x2a0c, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */
233 OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */
234 >;
235 };
231}; 236};
232 237
233&omap3_pmx_core2 { 238&omap3_pmx_core2 {
diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index 4926133077b3..0d9faf1a51ea 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -85,15 +85,6 @@
85 reg = <0x7c00 0x200>; 85 reg = <0x7c00 0x200>;
86 }; 86 };
87 87
88 gpio_intc: interrupt-controller@9880 {
89 compatible = "amlogic,meson-gpio-intc";
90 reg = <0xc1109880 0x10>;
91 interrupt-controller;
92 #interrupt-cells = <2>;
93 amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
94 status = "disabled";
95 };
96
97 hwrng: rng@8100 { 88 hwrng: rng@8100 {
98 compatible = "amlogic,meson-rng"; 89 compatible = "amlogic,meson-rng";
99 reg = <0x8100 0x8>; 90 reg = <0x8100 0x8>;
@@ -191,6 +182,15 @@
191 status = "disabled"; 182 status = "disabled";
192 }; 183 };
193 184
185 gpio_intc: interrupt-controller@9880 {
186 compatible = "amlogic,meson-gpio-intc";
187 reg = <0x9880 0x10>;
188 interrupt-controller;
189 #interrupt-cells = <2>;
190 amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
191 status = "disabled";
192 };
193
194 wdt: watchdog@9900 { 194 wdt: watchdog@9900 {
195 compatible = "amlogic,meson6-wdt"; 195 compatible = "amlogic,meson6-wdt";
196 reg = <0x9900 0x8>; 196 reg = <0x9900 0x8>;
diff --git a/arch/arm/boot/dts/nspire.dtsi b/arch/arm/boot/dts/nspire.dtsi
index ec2283b1a638..1a5ae4cd107f 100644
--- a/arch/arm/boot/dts/nspire.dtsi
+++ b/arch/arm/boot/dts/nspire.dtsi
@@ -56,6 +56,7 @@
56 56
57 usb_phy: usb_phy { 57 usb_phy: usb_phy {
58 compatible = "usb-nop-xceiv"; 58 compatible = "usb-nop-xceiv";
59 #phy-cells = <0>;
59 }; 60 };
60 61
61 vbus_reg: vbus_reg { 62 vbus_reg: vbus_reg {
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index 683b96a8f73e..0349fcc9dc26 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -90,6 +90,7 @@
90 compatible = "usb-nop-xceiv"; 90 compatible = "usb-nop-xceiv";
91 reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ 91 reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
92 vcc-supply = <&hsusb2_power>; 92 vcc-supply = <&hsusb2_power>;
93 #phy-cells = <0>;
93 }; 94 };
94 95
95 tfp410: encoder0 { 96 tfp410: encoder0 {
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 4d2eaf843fa9..3ca8991a6c3e 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -64,6 +64,7 @@
64 compatible = "usb-nop-xceiv"; 64 compatible = "usb-nop-xceiv";
65 reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ 65 reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
66 vcc-supply = <&hsusb2_power>; 66 vcc-supply = <&hsusb2_power>;
67 #phy-cells = <0>;
67 }; 68 };
68 69
69 sound { 70 sound {
diff --git a/arch/arm/boot/dts/omap3-cm-t3x.dtsi b/arch/arm/boot/dts/omap3-cm-t3x.dtsi
index 31d5ebf38892..ab6003fe5a43 100644
--- a/arch/arm/boot/dts/omap3-cm-t3x.dtsi
+++ b/arch/arm/boot/dts/omap3-cm-t3x.dtsi
@@ -43,12 +43,14 @@
43 hsusb1_phy: hsusb1_phy { 43 hsusb1_phy: hsusb1_phy {
44 compatible = "usb-nop-xceiv"; 44 compatible = "usb-nop-xceiv";
45 vcc-supply = <&hsusb1_power>; 45 vcc-supply = <&hsusb1_power>;
46 #phy-cells = <0>;
46 }; 47 };
47 48
48 /* HS USB Host PHY on PORT 2 */ 49 /* HS USB Host PHY on PORT 2 */
49 hsusb2_phy: hsusb2_phy { 50 hsusb2_phy: hsusb2_phy {
50 compatible = "usb-nop-xceiv"; 51 compatible = "usb-nop-xceiv";
51 vcc-supply = <&hsusb2_power>; 52 vcc-supply = <&hsusb2_power>;
53 #phy-cells = <0>;
52 }; 54 };
53 55
54 ads7846reg: ads7846-reg { 56 ads7846reg: ads7846-reg {
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi b/arch/arm/boot/dts/omap3-evm-common.dtsi
index dbc3f030a16c..ee64191e41ca 100644
--- a/arch/arm/boot/dts/omap3-evm-common.dtsi
+++ b/arch/arm/boot/dts/omap3-evm-common.dtsi
@@ -29,6 +29,7 @@
29 compatible = "usb-nop-xceiv"; 29 compatible = "usb-nop-xceiv";
30 reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; /* gpio_21 */ 30 reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; /* gpio_21 */
31 vcc-supply = <&hsusb2_power>; 31 vcc-supply = <&hsusb2_power>;
32 #phy-cells = <0>;
32 }; 33 };
33 34
34 leds { 35 leds {
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 4504908c23fe..3dc56fb156b7 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -120,6 +120,7 @@
120 hsusb2_phy: hsusb2_phy { 120 hsusb2_phy: hsusb2_phy {
121 compatible = "usb-nop-xceiv"; 121 compatible = "usb-nop-xceiv";
122 reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; 122 reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
123 #phy-cells = <0>;
123 }; 124 };
124 125
125 tv0: connector { 126 tv0: connector {
diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
index 667f96245729..ecbec23af49f 100644
--- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi
+++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
@@ -58,6 +58,7 @@
58 compatible = "usb-nop-xceiv"; 58 compatible = "usb-nop-xceiv";
59 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */ 59 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */
60 vcc-supply = <&hsusb1_power>; 60 vcc-supply = <&hsusb1_power>;
61 #phy-cells = <0>;
61 }; 62 };
62 63
63 tfp410: encoder { 64 tfp410: encoder {
diff --git a/arch/arm/boot/dts/omap3-igep0030-common.dtsi b/arch/arm/boot/dts/omap3-igep0030-common.dtsi
index e94d9427450c..443f71707437 100644
--- a/arch/arm/boot/dts/omap3-igep0030-common.dtsi
+++ b/arch/arm/boot/dts/omap3-igep0030-common.dtsi
@@ -37,6 +37,7 @@
37 hsusb2_phy: hsusb2_phy { 37 hsusb2_phy: hsusb2_phy {
38 compatible = "usb-nop-xceiv"; 38 compatible = "usb-nop-xceiv";
39 reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* gpio_54 */ 39 reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* gpio_54 */
40 #phy-cells = <0>;
40 }; 41 };
41}; 42};
42 43
diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
index 343a36d8031d..7ada1e93e166 100644
--- a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
+++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
@@ -51,6 +51,7 @@
51 hsusb1_phy: hsusb1_phy { 51 hsusb1_phy: hsusb1_phy {
52 compatible = "usb-nop-xceiv"; 52 compatible = "usb-nop-xceiv";
53 vcc-supply = <&reg_vcc3>; 53 vcc-supply = <&reg_vcc3>;
54 #phy-cells = <0>;
54 }; 55 };
55}; 56};
56 57
diff --git a/arch/arm/boot/dts/omap3-overo-base.dtsi b/arch/arm/boot/dts/omap3-overo-base.dtsi
index f25e158e7163..ac141fcd1742 100644
--- a/arch/arm/boot/dts/omap3-overo-base.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-base.dtsi
@@ -51,6 +51,7 @@
51 compatible = "usb-nop-xceiv"; 51 compatible = "usb-nop-xceiv";
52 reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; /* gpio_183 */ 52 reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; /* gpio_183 */
53 vcc-supply = <&hsusb2_power>; 53 vcc-supply = <&hsusb2_power>;
54 #phy-cells = <0>;
54 }; 55 };
55 56
56 /* Regulator to trigger the nPoweron signal of the Wifi module */ 57 /* Regulator to trigger the nPoweron signal of the Wifi module */
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
index 53e007abdc71..cd53dc6c0051 100644
--- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -205,6 +205,7 @@
205 compatible = "usb-nop-xceiv"; 205 compatible = "usb-nop-xceiv";
206 reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */ 206 reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */
207 vcc-supply = <&vaux2>; 207 vcc-supply = <&vaux2>;
208 #phy-cells = <0>;
208 }; 209 };
209 210
210 /* HS USB Host VBUS supply 211 /* HS USB Host VBUS supply
diff --git a/arch/arm/boot/dts/omap3-tao3530.dtsi b/arch/arm/boot/dts/omap3-tao3530.dtsi
index 9a601d15247b..6f5bd027b717 100644
--- a/arch/arm/boot/dts/omap3-tao3530.dtsi
+++ b/arch/arm/boot/dts/omap3-tao3530.dtsi
@@ -46,6 +46,7 @@
46 compatible = "usb-nop-xceiv"; 46 compatible = "usb-nop-xceiv";
47 reset-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* gpio_162 */ 47 reset-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* gpio_162 */
48 vcc-supply = <&hsusb2_power>; 48 vcc-supply = <&hsusb2_power>;
49 #phy-cells = <0>;
49 }; 50 };
50 51
51 sound { 52 sound {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 90b5c7148feb..bb33935df7b0 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -715,6 +715,7 @@
715 compatible = "ti,ohci-omap3"; 715 compatible = "ti,ohci-omap3";
716 reg = <0x48064400 0x400>; 716 reg = <0x48064400 0x400>;
717 interrupts = <76>; 717 interrupts = <76>;
718 remote-wakeup-connected;
718 }; 719 };
719 720
720 usbhsehci: ehci@48064800 { 721 usbhsehci: ehci@48064800 {
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
index 8b93d37310f2..24a463f8641f 100644
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -73,6 +73,7 @@
73 /* HS USB Host PHY on PORT 1 */ 73 /* HS USB Host PHY on PORT 1 */
74 hsusb1_phy: hsusb1_phy { 74 hsusb1_phy: hsusb1_phy {
75 compatible = "usb-nop-xceiv"; 75 compatible = "usb-nop-xceiv";
76 #phy-cells = <0>;
76 }; 77 };
77 78
78 /* LCD regulator from sw5 source */ 79 /* LCD regulator from sw5 source */
diff --git a/arch/arm/boot/dts/omap4-duovero.dtsi b/arch/arm/boot/dts/omap4-duovero.dtsi
index 6e6810c258eb..eb123b24c8e3 100644
--- a/arch/arm/boot/dts/omap4-duovero.dtsi
+++ b/arch/arm/boot/dts/omap4-duovero.dtsi
@@ -43,6 +43,7 @@
43 hsusb1_phy: hsusb1_phy { 43 hsusb1_phy: hsusb1_phy {
44 compatible = "usb-nop-xceiv"; 44 compatible = "usb-nop-xceiv";
45 reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ 45 reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */
46 #phy-cells = <0>;
46 47
47 pinctrl-names = "default"; 48 pinctrl-names = "default";
48 pinctrl-0 = <&hsusb1phy_pins>; 49 pinctrl-0 = <&hsusb1phy_pins>;
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 22c1eee9b07a..5501d1b4e6cd 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -89,6 +89,7 @@
89 hsusb1_phy: hsusb1_phy { 89 hsusb1_phy: hsusb1_phy {
90 compatible = "usb-nop-xceiv"; 90 compatible = "usb-nop-xceiv";
91 reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ 91 reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */
92 #phy-cells = <0>;
92 vcc-supply = <&hsusb1_power>; 93 vcc-supply = <&hsusb1_power>;
93 clocks = <&auxclk3_ck>; 94 clocks = <&auxclk3_ck>;
94 clock-names = "main_clk"; 95 clock-names = "main_clk";
diff --git a/arch/arm/boot/dts/omap4-var-som-om44.dtsi b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
index 6500bfc8d130..10fce28ceb5b 100644
--- a/arch/arm/boot/dts/omap4-var-som-om44.dtsi
+++ b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
@@ -44,6 +44,7 @@
44 44
45 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */ 45 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */
46 vcc-supply = <&vbat>; 46 vcc-supply = <&vbat>;
47 #phy-cells = <0>;
47 48
48 clocks = <&auxclk3_ck>; 49 clocks = <&auxclk3_ck>;
49 clock-names = "main_clk"; 50 clock-names = "main_clk";
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 1dc5a76b3c71..cc1a07a3620f 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -398,7 +398,7 @@
398 elm: elm@48078000 { 398 elm: elm@48078000 {
399 compatible = "ti,am3352-elm"; 399 compatible = "ti,am3352-elm";
400 reg = <0x48078000 0x2000>; 400 reg = <0x48078000 0x2000>;
401 interrupts = <4>; 401 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
402 ti,hwmods = "elm"; 402 ti,hwmods = "elm";
403 status = "disabled"; 403 status = "disabled";
404 }; 404 };
@@ -1081,14 +1081,13 @@
1081 usbhsohci: ohci@4a064800 { 1081 usbhsohci: ohci@4a064800 {
1082 compatible = "ti,ohci-omap3"; 1082 compatible = "ti,ohci-omap3";
1083 reg = <0x4a064800 0x400>; 1083 reg = <0x4a064800 0x400>;
1084 interrupt-parent = <&gic>;
1085 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 1084 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
1085 remote-wakeup-connected;
1086 }; 1086 };
1087 1087
1088 usbhsehci: ehci@4a064c00 { 1088 usbhsehci: ehci@4a064c00 {
1089 compatible = "ti,ehci-omap"; 1089 compatible = "ti,ehci-omap";
1090 reg = <0x4a064c00 0x400>; 1090 reg = <0x4a064c00 0x400>;
1091 interrupt-parent = <&gic>;
1092 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; 1091 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
1093 }; 1092 };
1094 }; 1093 };
diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
index 575ecffb0e9e..1b20838bb9a4 100644
--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -73,12 +73,14 @@
73 clocks = <&auxclk1_ck>; 73 clocks = <&auxclk1_ck>;
74 clock-names = "main_clk"; 74 clock-names = "main_clk";
75 clock-frequency = <19200000>; 75 clock-frequency = <19200000>;
76 #phy-cells = <0>;
76 }; 77 };
77 78
78 /* HS USB Host PHY on PORT 3 */ 79 /* HS USB Host PHY on PORT 3 */
79 hsusb3_phy: hsusb3_phy { 80 hsusb3_phy: hsusb3_phy {
80 compatible = "usb-nop-xceiv"; 81 compatible = "usb-nop-xceiv";
81 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */ 82 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */
83 #phy-cells = <0>;
82 }; 84 };
83 85
84 tpd12s015: encoder { 86 tpd12s015: encoder {
diff --git a/arch/arm/boot/dts/omap5-cm-t54.dts b/arch/arm/boot/dts/omap5-cm-t54.dts
index 5b172a04b6f1..5e21fb430a65 100644
--- a/arch/arm/boot/dts/omap5-cm-t54.dts
+++ b/arch/arm/boot/dts/omap5-cm-t54.dts
@@ -63,12 +63,14 @@
63 hsusb2_phy: hsusb2_phy { 63 hsusb2_phy: hsusb2_phy {
64 compatible = "usb-nop-xceiv"; 64 compatible = "usb-nop-xceiv";
65 reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */ 65 reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */
66 #phy-cells = <0>;
66 }; 67 };
67 68
68 /* HS USB Host PHY on PORT 3 */ 69 /* HS USB Host PHY on PORT 3 */
69 hsusb3_phy: hsusb3_phy { 70 hsusb3_phy: hsusb3_phy {
70 compatible = "usb-nop-xceiv"; 71 compatible = "usb-nop-xceiv";
71 reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */ 72 reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */
73 #phy-cells = <0>;
72 }; 74 };
73 75
74 leds { 76 leds {
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 4cd0005e462f..51a7fb3d7b9a 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -940,6 +940,7 @@
940 compatible = "ti,ohci-omap3"; 940 compatible = "ti,ohci-omap3";
941 reg = <0x4a064800 0x400>; 941 reg = <0x4a064800 0x400>;
942 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 942 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
943 remote-wakeup-connected;
943 }; 944 };
944 945
945 usbhsehci: ehci@4a064c00 { 946 usbhsehci: ehci@4a064c00 {
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 2f017fee4009..62baabd757b6 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -1201,6 +1201,7 @@
1201 clock-names = "extal", "usb_extal"; 1201 clock-names = "extal", "usb_extal";
1202 #clock-cells = <2>; 1202 #clock-cells = <2>;
1203 #power-domain-cells = <0>; 1203 #power-domain-cells = <0>;
1204 #reset-cells = <1>;
1204 }; 1205 };
1205 1206
1206 prr: chipid@ff000044 { 1207 prr: chipid@ff000044 {
diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
index 131f65b0426e..3d080e07374c 100644
--- a/arch/arm/boot/dts/r8a7792.dtsi
+++ b/arch/arm/boot/dts/r8a7792.dtsi
@@ -829,6 +829,7 @@
829 clock-names = "extal"; 829 clock-names = "extal";
830 #clock-cells = <2>; 830 #clock-cells = <2>;
831 #power-domain-cells = <0>; 831 #power-domain-cells = <0>;
832 #reset-cells = <1>;
832 }; 833 };
833 }; 834 };
834 835
diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index 58eae569b4e0..0cd1035de1a4 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -1088,6 +1088,7 @@
1088 clock-names = "extal", "usb_extal"; 1088 clock-names = "extal", "usb_extal";
1089 #clock-cells = <2>; 1089 #clock-cells = <2>;
1090 #power-domain-cells = <0>; 1090 #power-domain-cells = <0>;
1091 #reset-cells = <1>;
1091 }; 1092 };
1092 1093
1093 rst: reset-controller@e6160000 { 1094 rst: reset-controller@e6160000 {
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 905e50c9b524..5643976c1356 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -1099,6 +1099,7 @@
1099 clock-names = "extal", "usb_extal"; 1099 clock-names = "extal", "usb_extal";
1100 #clock-cells = <2>; 1100 #clock-cells = <2>;
1101 #power-domain-cells = <0>; 1101 #power-domain-cells = <0>;
1102 #reset-cells = <1>;
1102 }; 1103 };
1103 1104
1104 rst: reset-controller@e6160000 { 1105 rst: reset-controller@e6160000 {
diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
index 02a6227c717c..fbb3758ca2e3 100644
--- a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
+++ b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts
@@ -359,7 +359,7 @@
359}; 359};
360 360
361&i2c1 { 361&i2c1 {
362 at24mac602@0 { 362 at24mac602@50 {
363 compatible = "atmel,24c02"; 363 compatible = "atmel,24c02";
364 reg = <0x50>; 364 reg = <0x50>;
365 read-only; 365 read-only;
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h
index c8781450905b..3ab8b3781bfe 100644
--- a/arch/arm/include/asm/kvm_arm.h
+++ b/arch/arm/include/asm/kvm_arm.h
@@ -161,8 +161,7 @@
161#else 161#else
162#define VTTBR_X (5 - KVM_T0SZ) 162#define VTTBR_X (5 - KVM_T0SZ)
163#endif 163#endif
164#define VTTBR_BADDR_SHIFT (VTTBR_X - 1) 164#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_X)
165#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
166#define VTTBR_VMID_SHIFT _AC(48, ULL) 165#define VTTBR_VMID_SHIFT _AC(48, ULL)
167#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT) 166#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
168 167
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 242151ea6908..a9f7d3f47134 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -285,6 +285,11 @@ static inline void kvm_arm_init_debug(void) {}
285static inline void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) {} 285static inline void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) {}
286static inline void kvm_arm_clear_debug(struct kvm_vcpu *vcpu) {} 286static inline void kvm_arm_clear_debug(struct kvm_vcpu *vcpu) {}
287static inline void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) {} 287static inline void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) {}
288static inline bool kvm_arm_handle_step_debug(struct kvm_vcpu *vcpu,
289 struct kvm_run *run)
290{
291 return false;
292}
288 293
289int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu, 294int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
290 struct kvm_device_attr *attr); 295 struct kvm_device_attr *attr);
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index 4d53de308ee0..4d1cc1847edf 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -7,6 +7,7 @@ generated-y += unistd-oabi.h
7generated-y += unistd-eabi.h 7generated-y += unistd-eabi.h
8 8
9generic-y += bitsperlong.h 9generic-y += bitsperlong.h
10generic-y += bpf_perf_event.h
10generic-y += errno.h 11generic-y += errno.h
11generic-y += ioctl.h 12generic-y += ioctl.h
12generic-y += ipcbuf.h 13generic-y += ipcbuf.h
diff --git a/arch/arm/mach-meson/platsmp.c b/arch/arm/mach-meson/platsmp.c
index 2555f9056a33..cad7ee8f0d6b 100644
--- a/arch/arm/mach-meson/platsmp.c
+++ b/arch/arm/mach-meson/platsmp.c
@@ -102,7 +102,7 @@ static void __init meson_smp_prepare_cpus(const char *scu_compatible,
102 102
103 scu_base = of_iomap(node, 0); 103 scu_base = of_iomap(node, 0);
104 if (!scu_base) { 104 if (!scu_base) {
105 pr_err("Couln't map SCU registers\n"); 105 pr_err("Couldn't map SCU registers\n");
106 return; 106 return;
107 } 107 }
108 108
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c
index d555791cf349..83c6fa74cc31 100644
--- a/arch/arm/mach-omap2/cm_common.c
+++ b/arch/arm/mach-omap2/cm_common.c
@@ -68,14 +68,17 @@ void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2)
68int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, 68int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
69 u8 *idlest_reg_id) 69 u8 *idlest_reg_id)
70{ 70{
71 int ret;
71 if (!cm_ll_data->split_idlest_reg) { 72 if (!cm_ll_data->split_idlest_reg) {
72 WARN_ONCE(1, "cm: %s: no low-level function defined\n", 73 WARN_ONCE(1, "cm: %s: no low-level function defined\n",
73 __func__); 74 __func__);
74 return -EINVAL; 75 return -EINVAL;
75 } 76 }
76 77
77 return cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, 78 ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst,
78 idlest_reg_id); 79 idlest_reg_id);
80 *prcm_inst -= cm_base.offset;
81 return ret;
79} 82}
80 83
81/** 84/**
@@ -337,6 +340,7 @@ int __init omap2_cm_base_init(void)
337 if (mem) { 340 if (mem) {
338 mem->pa = res.start + data->offset; 341 mem->pa = res.start + data->offset;
339 mem->va = data->mem + data->offset; 342 mem->va = data->mem + data->offset;
343 mem->offset = data->offset;
340 } 344 }
341 345
342 data->np = np; 346 data->np = np;
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c
index 5ac122e88f67..fa7f308c9027 100644
--- a/arch/arm/mach-omap2/omap-secure.c
+++ b/arch/arm/mach-omap2/omap-secure.c
@@ -73,6 +73,27 @@ phys_addr_t omap_secure_ram_mempool_base(void)
73 return omap_secure_memblock_base; 73 return omap_secure_memblock_base;
74} 74}
75 75
76#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
77u32 omap3_save_secure_ram(void __iomem *addr, int size)
78{
79 u32 ret;
80 u32 param[5];
81
82 if (size != OMAP3_SAVE_SECURE_RAM_SZ)
83 return OMAP3_SAVE_SECURE_RAM_SZ;
84
85 param[0] = 4; /* Number of arguments */
86 param[1] = __pa(addr); /* Physical address for saving */
87 param[2] = 0;
88 param[3] = 1;
89 param[4] = 1;
90
91 ret = save_secure_ram_context(__pa(param));
92
93 return ret;
94}
95#endif
96
76/** 97/**
77 * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls 98 * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls
78 * @idx: The PPA API index 99 * @idx: The PPA API index
diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h
index bae263fba640..c509cde71f93 100644
--- a/arch/arm/mach-omap2/omap-secure.h
+++ b/arch/arm/mach-omap2/omap-secure.h
@@ -31,6 +31,8 @@
31/* Maximum Secure memory storage size */ 31/* Maximum Secure memory storage size */
32#define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K) 32#define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K)
33 33
34#define OMAP3_SAVE_SECURE_RAM_SZ 0x803F
35
34/* Secure low power HAL API index */ 36/* Secure low power HAL API index */
35#define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a 37#define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a
36#define OMAP4_HAL_SAVEHW_INDEX 0x1b 38#define OMAP4_HAL_SAVEHW_INDEX 0x1b
@@ -65,6 +67,8 @@ extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
65extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs); 67extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs);
66extern phys_addr_t omap_secure_ram_mempool_base(void); 68extern phys_addr_t omap_secure_ram_mempool_base(void);
67extern int omap_secure_ram_reserve_memblock(void); 69extern int omap_secure_ram_reserve_memblock(void);
70extern u32 save_secure_ram_context(u32 args_pa);
71extern u32 omap3_save_secure_ram(void __iomem *save_regs, int size);
68 72
69extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, 73extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
70 u32 arg1, u32 arg2, u32 arg3, u32 arg4); 74 u32 arg1, u32 arg2, u32 arg3, u32 arg4);
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index d45cbfdb4be6..f0388058b7da 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -391,10 +391,8 @@ omap_device_copy_resources(struct omap_hwmod *oh,
391 const char *name; 391 const char *name;
392 int error, irq = 0; 392 int error, irq = 0;
393 393
394 if (!oh || !oh->od || !oh->od->pdev) { 394 if (!oh || !oh->od || !oh->od->pdev)
395 error = -EINVAL; 395 return -EINVAL;
396 goto error;
397 }
398 396
399 np = oh->od->pdev->dev.of_node; 397 np = oh->od->pdev->dev.of_node;
400 if (!np) { 398 if (!np) {
@@ -516,8 +514,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
516 goto odbs_exit1; 514 goto odbs_exit1;
517 515
518 od = omap_device_alloc(pdev, &oh, 1); 516 od = omap_device_alloc(pdev, &oh, 1);
519 if (IS_ERR(od)) 517 if (IS_ERR(od)) {
518 ret = PTR_ERR(od);
520 goto odbs_exit1; 519 goto odbs_exit1;
520 }
521 521
522 ret = platform_device_add_data(pdev, pdata, pdata_len); 522 ret = platform_device_add_data(pdev, pdata, pdata_len);
523 if (ret) 523 if (ret)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index d2106ae4410a..52c9d585b44d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1646,6 +1646,7 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1646 .main_clk = "mmchs3_fck", 1646 .main_clk = "mmchs3_fck",
1647 .prcm = { 1647 .prcm = {
1648 .omap2 = { 1648 .omap2 = {
1649 .module_offs = CORE_MOD,
1649 .prcm_reg_id = 1, 1650 .prcm_reg_id = 1,
1650 .module_bit = OMAP3430_EN_MMC3_SHIFT, 1651 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1651 .idlest_reg_id = 1, 1652 .idlest_reg_id = 1,
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index b668719b9b25..8e30772cfe32 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -81,10 +81,6 @@ extern unsigned int omap3_do_wfi_sz;
81/* ... and its pointer from SRAM after copy */ 81/* ... and its pointer from SRAM after copy */
82extern void (*omap3_do_wfi_sram)(void); 82extern void (*omap3_do_wfi_sram)(void);
83 83
84/* save_secure_ram_context function pointer and size, for copy to SRAM */
85extern int save_secure_ram_context(u32 *addr);
86extern unsigned int save_secure_ram_context_sz;
87
88extern void omap3_save_scratchpad_contents(void); 84extern void omap3_save_scratchpad_contents(void);
89 85
90#define PM_RTA_ERRATUM_i608 (1 << 0) 86#define PM_RTA_ERRATUM_i608 (1 << 0)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 841ba19d64a6..36c55547137c 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -48,6 +48,7 @@
48#include "prm3xxx.h" 48#include "prm3xxx.h"
49#include "pm.h" 49#include "pm.h"
50#include "sdrc.h" 50#include "sdrc.h"
51#include "omap-secure.h"
51#include "sram.h" 52#include "sram.h"
52#include "control.h" 53#include "control.h"
53#include "vc.h" 54#include "vc.h"
@@ -66,7 +67,6 @@ struct power_state {
66 67
67static LIST_HEAD(pwrst_list); 68static LIST_HEAD(pwrst_list);
68 69
69static int (*_omap_save_secure_sram)(u32 *addr);
70void (*omap3_do_wfi_sram)(void); 70void (*omap3_do_wfi_sram)(void);
71 71
72static struct powerdomain *mpu_pwrdm, *neon_pwrdm; 72static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
@@ -121,8 +121,8 @@ static void omap3_save_secure_ram_context(void)
121 * will hang the system. 121 * will hang the system.
122 */ 122 */
123 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); 123 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
124 ret = _omap_save_secure_sram((u32 *)(unsigned long) 124 ret = omap3_save_secure_ram(omap3_secure_ram_storage,
125 __pa(omap3_secure_ram_storage)); 125 OMAP3_SAVE_SECURE_RAM_SZ);
126 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); 126 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
127 /* Following is for error tracking, it should not happen */ 127 /* Following is for error tracking, it should not happen */
128 if (ret) { 128 if (ret) {
@@ -434,15 +434,10 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
434 * 434 *
435 * The minimum set of functions is pushed to SRAM for execution: 435 * The minimum set of functions is pushed to SRAM for execution:
436 * - omap3_do_wfi for erratum i581 WA, 436 * - omap3_do_wfi for erratum i581 WA,
437 * - save_secure_ram_context for security extensions.
438 */ 437 */
439void omap_push_sram_idle(void) 438void omap_push_sram_idle(void)
440{ 439{
441 omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz); 440 omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz);
442
443 if (omap_type() != OMAP2_DEVICE_TYPE_GP)
444 _omap_save_secure_sram = omap_sram_push(save_secure_ram_context,
445 save_secure_ram_context_sz);
446} 441}
447 442
448static void __init pm_errata_configure(void) 443static void __init pm_errata_configure(void)
@@ -553,7 +548,7 @@ int __init omap3_pm_init(void)
553 clkdm_add_wkdep(neon_clkdm, mpu_clkdm); 548 clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
554 if (omap_type() != OMAP2_DEVICE_TYPE_GP) { 549 if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
555 omap3_secure_ram_storage = 550 omap3_secure_ram_storage =
556 kmalloc(0x803F, GFP_KERNEL); 551 kmalloc(OMAP3_SAVE_SECURE_RAM_SZ, GFP_KERNEL);
557 if (!omap3_secure_ram_storage) 552 if (!omap3_secure_ram_storage)
558 pr_err("Memory allocation failed when allocating for secure sram context\n"); 553 pr_err("Memory allocation failed when allocating for secure sram context\n");
559 554
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 0592b23902c6..0977da0dab76 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -528,6 +528,7 @@ struct omap_prcm_irq_setup {
528struct omap_domain_base { 528struct omap_domain_base {
529 u32 pa; 529 u32 pa;
530 void __iomem *va; 530 void __iomem *va;
531 s16 offset;
531}; 532};
532 533
533/** 534/**
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c
index d2c5bcabdbeb..ebaf80d72a10 100644
--- a/arch/arm/mach-omap2/prm33xx.c
+++ b/arch/arm/mach-omap2/prm33xx.c
@@ -176,17 +176,6 @@ static int am33xx_pwrdm_read_pwrst(struct powerdomain *pwrdm)
176 return v; 176 return v;
177} 177}
178 178
179static int am33xx_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
180{
181 u32 v;
182
183 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs);
184 v &= AM33XX_LASTPOWERSTATEENTERED_MASK;
185 v >>= AM33XX_LASTPOWERSTATEENTERED_SHIFT;
186
187 return v;
188}
189
190static int am33xx_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) 179static int am33xx_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm)
191{ 180{
192 am33xx_prm_rmw_reg_bits(AM33XX_LOWPOWERSTATECHANGE_MASK, 181 am33xx_prm_rmw_reg_bits(AM33XX_LOWPOWERSTATECHANGE_MASK,
@@ -357,7 +346,6 @@ struct pwrdm_ops am33xx_pwrdm_operations = {
357 .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, 346 .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst,
358 .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, 347 .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst,
359 .pwrdm_read_pwrst = am33xx_pwrdm_read_pwrst, 348 .pwrdm_read_pwrst = am33xx_pwrdm_read_pwrst,
360 .pwrdm_read_prev_pwrst = am33xx_pwrdm_read_prev_pwrst,
361 .pwrdm_set_logic_retst = am33xx_pwrdm_set_logic_retst, 349 .pwrdm_set_logic_retst = am33xx_pwrdm_set_logic_retst,
362 .pwrdm_read_logic_pwrst = am33xx_pwrdm_read_logic_pwrst, 350 .pwrdm_read_logic_pwrst = am33xx_pwrdm_read_logic_pwrst,
363 .pwrdm_read_logic_retst = am33xx_pwrdm_read_logic_retst, 351 .pwrdm_read_logic_retst = am33xx_pwrdm_read_logic_retst,
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
index fa5fd24f524c..22daf4efed68 100644
--- a/arch/arm/mach-omap2/sleep34xx.S
+++ b/arch/arm/mach-omap2/sleep34xx.S
@@ -93,20 +93,13 @@ ENTRY(enable_omap3630_toggle_l2_on_restore)
93ENDPROC(enable_omap3630_toggle_l2_on_restore) 93ENDPROC(enable_omap3630_toggle_l2_on_restore)
94 94
95/* 95/*
96 * Function to call rom code to save secure ram context. This gets 96 * Function to call rom code to save secure ram context.
97 * relocated to SRAM, so it can be all in .data section. Otherwise 97 *
98 * we need to initialize api_params separately. 98 * r0 = physical address of the parameters
99 */ 99 */
100 .data
101 .align 3
102ENTRY(save_secure_ram_context) 100ENTRY(save_secure_ram_context)
103 stmfd sp!, {r4 - r11, lr} @ save registers on stack 101 stmfd sp!, {r4 - r11, lr} @ save registers on stack
104 adr r3, api_params @ r3 points to parameters 102 mov r3, r0 @ physical address of parameters
105 str r0, [r3,#0x4] @ r0 has sdram address
106 ldr r12, high_mask
107 and r3, r3, r12
108 ldr r12, sram_phy_addr_mask
109 orr r3, r3, r12
110 mov r0, #25 @ set service ID for PPA 103 mov r0, #25 @ set service ID for PPA
111 mov r12, r0 @ copy secure service ID in r12 104 mov r12, r0 @ copy secure service ID in r12
112 mov r1, #0 @ set task id for ROM code in r1 105 mov r1, #0 @ set task id for ROM code in r1
@@ -120,18 +113,7 @@ ENTRY(save_secure_ram_context)
120 nop 113 nop
121 nop 114 nop
122 ldmfd sp!, {r4 - r11, pc} 115 ldmfd sp!, {r4 - r11, pc}
123 .align
124sram_phy_addr_mask:
125 .word SRAM_BASE_P
126high_mask:
127 .word 0xffff
128api_params:
129 .word 0x4, 0x0, 0x0, 0x1, 0x1
130ENDPROC(save_secure_ram_context) 116ENDPROC(save_secure_ram_context)
131ENTRY(save_secure_ram_context_sz)
132 .word . - save_secure_ram_context
133
134 .text
135 117
136/* 118/*
137 * ====================== 119 * ======================
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index d7c22d51bc50..4aa50b9b26bc 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -12,6 +12,7 @@ subdir-y += cavium
12subdir-y += exynos 12subdir-y += exynos
13subdir-y += freescale 13subdir-y += freescale
14subdir-y += hisilicon 14subdir-y += hisilicon
15subdir-y += lg
15subdir-y += marvell 16subdir-y += marvell
16subdir-y += mediatek 17subdir-y += mediatek
17subdir-y += nvidia 18subdir-y += nvidia
@@ -22,5 +23,4 @@ subdir-y += rockchip
22subdir-y += socionext 23subdir-y += socionext
23subdir-y += sprd 24subdir-y += sprd
24subdir-y += xilinx 25subdir-y += xilinx
25subdir-y += lg
26subdir-y += zte 26subdir-y += zte
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index ead895a4e9a5..1fb8b9d6cb4e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -753,12 +753,12 @@
753 753
754&uart_B { 754&uart_B {
755 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>; 755 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
756 clock-names = "xtal", "core", "baud"; 756 clock-names = "xtal", "pclk", "baud";
757}; 757};
758 758
759&uart_C { 759&uart_C {
760 clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>; 760 clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
761 clock-names = "xtal", "core", "baud"; 761 clock-names = "xtal", "pclk", "baud";
762}; 762};
763 763
764&vpu { 764&vpu {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 8ed981f59e5a..6524b89e7115 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -688,7 +688,7 @@
688 688
689&uart_A { 689&uart_A {
690 clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>; 690 clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
691 clock-names = "xtal", "core", "baud"; 691 clock-names = "xtal", "pclk", "baud";
692}; 692};
693 693
694&uart_AO { 694&uart_AO {
@@ -703,12 +703,12 @@
703 703
704&uart_B { 704&uart_B {
705 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>; 705 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
706 clock-names = "xtal", "core", "baud"; 706 clock-names = "xtal", "pclk", "baud";
707}; 707};
708 708
709&uart_C { 709&uart_C {
710 clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>; 710 clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
711 clock-names = "xtal", "core", "baud"; 711 clock-names = "xtal", "pclk", "baud";
712}; 712};
713 713
714&vpu { 714&vpu {
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts
index dd7193acc7df..6bdefb26b329 100644
--- a/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts
+++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts
@@ -40,7 +40,6 @@
40}; 40};
41 41
42&ethsc { 42&ethsc {
43 interrupt-parent = <&gpio>;
44 interrupts = <0 8>; 43 interrupts = <0 8>;
45}; 44};
46 45
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts
index d99e3731358c..254d6795c67e 100644
--- a/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts
+++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts
@@ -40,7 +40,6 @@
40}; 40};
41 41
42&ethsc { 42&ethsc {
43 interrupt-parent = <&gpio>;
44 interrupts = <0 8>; 43 interrupts = <0 8>;
45}; 44};
46 45
diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts
index 864feeb35180..f9f06fcfb94a 100644
--- a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts
+++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts
@@ -38,8 +38,7 @@
38}; 38};
39 39
40&ethsc { 40&ethsc {
41 interrupt-parent = <&gpio>; 41 interrupts = <4 8>;
42 interrupts = <0 8>;
43}; 42};
44 43
45&serial0 { 44&serial0 {
diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
index 650344d01124..c4cd5081d78b 100644
--- a/arch/arm64/include/asm/efi.h
+++ b/arch/arm64/include/asm/efi.h
@@ -132,11 +132,9 @@ static inline void efi_set_pgd(struct mm_struct *mm)
132 * Defer the switch to the current thread's TTBR0_EL1 132 * Defer the switch to the current thread's TTBR0_EL1
133 * until uaccess_enable(). Restore the current 133 * until uaccess_enable(). Restore the current
134 * thread's saved ttbr0 corresponding to its active_mm 134 * thread's saved ttbr0 corresponding to its active_mm
135 * (if different from init_mm).
136 */ 135 */
137 cpu_set_reserved_ttbr0(); 136 cpu_set_reserved_ttbr0();
138 if (current->active_mm != &init_mm) 137 update_saved_ttbr0(current, current->active_mm);
139 update_saved_ttbr0(current, current->active_mm);
140 } 138 }
141 } 139 }
142} 140}
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 7f069ff37f06..715d395ef45b 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include/asm/kvm_arm.h
@@ -170,8 +170,7 @@
170#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS) 170#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS)
171#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA) 171#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA)
172 172
173#define VTTBR_BADDR_SHIFT (VTTBR_X - 1) 173#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_X)
174#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
175#define VTTBR_VMID_SHIFT (UL(48)) 174#define VTTBR_VMID_SHIFT (UL(48))
176#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT) 175#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
177 176
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 674912d7a571..ea6cb5b24258 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -370,6 +370,7 @@ void kvm_arm_init_debug(void);
370void kvm_arm_setup_debug(struct kvm_vcpu *vcpu); 370void kvm_arm_setup_debug(struct kvm_vcpu *vcpu);
371void kvm_arm_clear_debug(struct kvm_vcpu *vcpu); 371void kvm_arm_clear_debug(struct kvm_vcpu *vcpu);
372void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu); 372void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu);
373bool kvm_arm_handle_step_debug(struct kvm_vcpu *vcpu, struct kvm_run *run);
373int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu, 374int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
374 struct kvm_device_attr *attr); 375 struct kvm_device_attr *attr);
375int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu, 376int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu,
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
index 3257895a9b5e..9d155fa9a507 100644
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@ -156,29 +156,21 @@ void check_and_switch_context(struct mm_struct *mm, unsigned int cpu);
156 156
157#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; }) 157#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; })
158 158
159/*
160 * This is called when "tsk" is about to enter lazy TLB mode.
161 *
162 * mm: describes the currently active mm context
163 * tsk: task which is entering lazy tlb
164 * cpu: cpu number which is entering lazy tlb
165 *
166 * tsk->mm will be NULL
167 */
168static inline void
169enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
170{
171}
172
173#ifdef CONFIG_ARM64_SW_TTBR0_PAN 159#ifdef CONFIG_ARM64_SW_TTBR0_PAN
174static inline void update_saved_ttbr0(struct task_struct *tsk, 160static inline void update_saved_ttbr0(struct task_struct *tsk,
175 struct mm_struct *mm) 161 struct mm_struct *mm)
176{ 162{
177 if (system_uses_ttbr0_pan()) { 163 u64 ttbr;
178 BUG_ON(mm->pgd == swapper_pg_dir); 164
179 task_thread_info(tsk)->ttbr0 = 165 if (!system_uses_ttbr0_pan())
180 virt_to_phys(mm->pgd) | ASID(mm) << 48; 166 return;
181 } 167
168 if (mm == &init_mm)
169 ttbr = __pa_symbol(empty_zero_page);
170 else
171 ttbr = virt_to_phys(mm->pgd) | ASID(mm) << 48;
172
173 task_thread_info(tsk)->ttbr0 = ttbr;
182} 174}
183#else 175#else
184static inline void update_saved_ttbr0(struct task_struct *tsk, 176static inline void update_saved_ttbr0(struct task_struct *tsk,
@@ -187,6 +179,16 @@ static inline void update_saved_ttbr0(struct task_struct *tsk,
187} 179}
188#endif 180#endif
189 181
182static inline void
183enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
184{
185 /*
186 * We don't actually care about the ttbr0 mapping, so point it at the
187 * zero page.
188 */
189 update_saved_ttbr0(tsk, &init_mm);
190}
191
190static inline void __switch_mm(struct mm_struct *next) 192static inline void __switch_mm(struct mm_struct *next)
191{ 193{
192 unsigned int cpu = smp_processor_id(); 194 unsigned int cpu = smp_processor_id();
@@ -214,11 +216,9 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
214 * Update the saved TTBR0_EL1 of the scheduled-in task as the previous 216 * Update the saved TTBR0_EL1 of the scheduled-in task as the previous
215 * value may have not been initialised yet (activate_mm caller) or the 217 * value may have not been initialised yet (activate_mm caller) or the
216 * ASID has changed since the last run (following the context switch 218 * ASID has changed since the last run (following the context switch
217 * of another thread of the same process). Avoid setting the reserved 219 * of another thread of the same process).
218 * TTBR0_EL1 to swapper_pg_dir (init_mm; e.g. via idle_task_exit).
219 */ 220 */
220 if (next != &init_mm) 221 update_saved_ttbr0(tsk, next);
221 update_saved_ttbr0(tsk, next);
222} 222}
223 223
224#define deactivate_mm(tsk,mm) do { } while (0) 224#define deactivate_mm(tsk,mm) do { } while (0)
diff --git a/arch/arm64/include/asm/perf_event.h b/arch/arm64/include/asm/perf_event.h
index 8d5cbec17d80..f9ccc36d3dc3 100644
--- a/arch/arm64/include/asm/perf_event.h
+++ b/arch/arm64/include/asm/perf_event.h
@@ -18,6 +18,7 @@
18#define __ASM_PERF_EVENT_H 18#define __ASM_PERF_EVENT_H
19 19
20#include <asm/stack_pointer.h> 20#include <asm/stack_pointer.h>
21#include <asm/ptrace.h>
21 22
22#define ARMV8_PMU_MAX_COUNTERS 32 23#define ARMV8_PMU_MAX_COUNTERS 32
23#define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1) 24#define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1)
@@ -79,6 +80,7 @@ struct pt_regs;
79extern unsigned long perf_instruction_pointer(struct pt_regs *regs); 80extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
80extern unsigned long perf_misc_flags(struct pt_regs *regs); 81extern unsigned long perf_misc_flags(struct pt_regs *regs);
81#define perf_misc_flags(regs) perf_misc_flags(regs) 82#define perf_misc_flags(regs) perf_misc_flags(regs)
83#define perf_arch_bpf_user_pt_regs(regs) &regs->user_regs
82#endif 84#endif
83 85
84#define perf_arch_fetch_caller_regs(regs, __ip) { \ 86#define perf_arch_fetch_caller_regs(regs, __ip) { \
diff --git a/arch/arm64/include/uapi/asm/bpf_perf_event.h b/arch/arm64/include/uapi/asm/bpf_perf_event.h
new file mode 100644
index 000000000000..b551b741653d
--- /dev/null
+++ b/arch/arm64/include/uapi/asm/bpf_perf_event.h
@@ -0,0 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__
3#define _UAPI__ASM_BPF_PERF_EVENT_H__
4
5#include <asm/ptrace.h>
6
7typedef struct user_pt_regs bpf_user_pt_regs_t;
8
9#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 5084e699447a..540a1e010eb5 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -114,7 +114,12 @@
114 * returned from the 2nd syscall yet, TIF_FOREIGN_FPSTATE is still set so 114 * returned from the 2nd syscall yet, TIF_FOREIGN_FPSTATE is still set so
115 * whatever is in the FPSIMD registers is not saved to memory, but discarded. 115 * whatever is in the FPSIMD registers is not saved to memory, but discarded.
116 */ 116 */
117static DEFINE_PER_CPU(struct fpsimd_state *, fpsimd_last_state); 117struct fpsimd_last_state_struct {
118 struct fpsimd_state *st;
119 bool sve_in_use;
120};
121
122static DEFINE_PER_CPU(struct fpsimd_last_state_struct, fpsimd_last_state);
118 123
119/* Default VL for tasks that don't set it explicitly: */ 124/* Default VL for tasks that don't set it explicitly: */
120static int sve_default_vl = -1; 125static int sve_default_vl = -1;
@@ -905,7 +910,7 @@ void fpsimd_thread_switch(struct task_struct *next)
905 */ 910 */
906 struct fpsimd_state *st = &next->thread.fpsimd_state; 911 struct fpsimd_state *st = &next->thread.fpsimd_state;
907 912
908 if (__this_cpu_read(fpsimd_last_state) == st 913 if (__this_cpu_read(fpsimd_last_state.st) == st
909 && st->cpu == smp_processor_id()) 914 && st->cpu == smp_processor_id())
910 clear_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE); 915 clear_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE);
911 else 916 else
@@ -992,6 +997,21 @@ void fpsimd_signal_preserve_current_state(void)
992} 997}
993 998
994/* 999/*
1000 * Associate current's FPSIMD context with this cpu
1001 * Preemption must be disabled when calling this function.
1002 */
1003static void fpsimd_bind_to_cpu(void)
1004{
1005 struct fpsimd_last_state_struct *last =
1006 this_cpu_ptr(&fpsimd_last_state);
1007 struct fpsimd_state *st = &current->thread.fpsimd_state;
1008
1009 last->st = st;
1010 last->sve_in_use = test_thread_flag(TIF_SVE);
1011 st->cpu = smp_processor_id();
1012}
1013
1014/*
995 * Load the userland FPSIMD state of 'current' from memory, but only if the 1015 * Load the userland FPSIMD state of 'current' from memory, but only if the
996 * FPSIMD state already held in the registers is /not/ the most recent FPSIMD 1016 * FPSIMD state already held in the registers is /not/ the most recent FPSIMD
997 * state of 'current' 1017 * state of 'current'
@@ -1004,11 +1024,8 @@ void fpsimd_restore_current_state(void)
1004 local_bh_disable(); 1024 local_bh_disable();
1005 1025
1006 if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) { 1026 if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) {
1007 struct fpsimd_state *st = &current->thread.fpsimd_state;
1008
1009 task_fpsimd_load(); 1027 task_fpsimd_load();
1010 __this_cpu_write(fpsimd_last_state, st); 1028 fpsimd_bind_to_cpu();
1011 st->cpu = smp_processor_id();
1012 } 1029 }
1013 1030
1014 local_bh_enable(); 1031 local_bh_enable();
@@ -1032,12 +1049,8 @@ void fpsimd_update_current_state(struct fpsimd_state *state)
1032 1049
1033 task_fpsimd_load(); 1050 task_fpsimd_load();
1034 1051
1035 if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) { 1052 if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE))
1036 struct fpsimd_state *st = &current->thread.fpsimd_state; 1053 fpsimd_bind_to_cpu();
1037
1038 __this_cpu_write(fpsimd_last_state, st);
1039 st->cpu = smp_processor_id();
1040 }
1041 1054
1042 local_bh_enable(); 1055 local_bh_enable();
1043} 1056}
@@ -1052,7 +1065,7 @@ void fpsimd_flush_task_state(struct task_struct *t)
1052 1065
1053static inline void fpsimd_flush_cpu_state(void) 1066static inline void fpsimd_flush_cpu_state(void)
1054{ 1067{
1055 __this_cpu_write(fpsimd_last_state, NULL); 1068 __this_cpu_write(fpsimd_last_state.st, NULL);
1056} 1069}
1057 1070
1058/* 1071/*
@@ -1065,14 +1078,10 @@ static inline void fpsimd_flush_cpu_state(void)
1065#ifdef CONFIG_ARM64_SVE 1078#ifdef CONFIG_ARM64_SVE
1066void sve_flush_cpu_state(void) 1079void sve_flush_cpu_state(void)
1067{ 1080{
1068 struct fpsimd_state *const fpstate = __this_cpu_read(fpsimd_last_state); 1081 struct fpsimd_last_state_struct const *last =
1069 struct task_struct *tsk; 1082 this_cpu_ptr(&fpsimd_last_state);
1070
1071 if (!fpstate)
1072 return;
1073 1083
1074 tsk = container_of(fpstate, struct task_struct, thread.fpsimd_state); 1084 if (last->st && last->sve_in_use)
1075 if (test_tsk_thread_flag(tsk, TIF_SVE))
1076 fpsimd_flush_cpu_state(); 1085 fpsimd_flush_cpu_state();
1077} 1086}
1078#endif /* CONFIG_ARM64_SVE */ 1087#endif /* CONFIG_ARM64_SVE */
@@ -1267,7 +1276,7 @@ static inline void fpsimd_pm_init(void) { }
1267#ifdef CONFIG_HOTPLUG_CPU 1276#ifdef CONFIG_HOTPLUG_CPU
1268static int fpsimd_cpu_dead(unsigned int cpu) 1277static int fpsimd_cpu_dead(unsigned int cpu)
1269{ 1278{
1270 per_cpu(fpsimd_last_state, cpu) = NULL; 1279 per_cpu(fpsimd_last_state.st, cpu) = NULL;
1271 return 0; 1280 return 0;
1272} 1281}
1273 1282
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index b2adcce7bc18..6b7dcf4310ac 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -314,6 +314,15 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
314 clear_tsk_thread_flag(p, TIF_SVE); 314 clear_tsk_thread_flag(p, TIF_SVE);
315 p->thread.sve_state = NULL; 315 p->thread.sve_state = NULL;
316 316
317 /*
318 * In case p was allocated the same task_struct pointer as some
319 * other recently-exited task, make sure p is disassociated from
320 * any cpu that may have run that now-exited task recently.
321 * Otherwise we could erroneously skip reloading the FPSIMD
322 * registers for p.
323 */
324 fpsimd_flush_task_state(p);
325
317 if (likely(!(p->flags & PF_KTHREAD))) { 326 if (likely(!(p->flags & PF_KTHREAD))) {
318 *childregs = *current_pt_regs(); 327 *childregs = *current_pt_regs();
319 childregs->regs[0] = 0; 328 childregs->regs[0] = 0;
diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c
index dbadfaf850a7..fa63b28c65e0 100644
--- a/arch/arm64/kvm/debug.c
+++ b/arch/arm64/kvm/debug.c
@@ -221,3 +221,24 @@ void kvm_arm_clear_debug(struct kvm_vcpu *vcpu)
221 } 221 }
222 } 222 }
223} 223}
224
225
226/*
227 * After successfully emulating an instruction, we might want to
228 * return to user space with a KVM_EXIT_DEBUG. We can only do this
229 * once the emulation is complete, though, so for userspace emulations
230 * we have to wait until we have re-entered KVM before calling this
231 * helper.
232 *
233 * Return true (and set exit_reason) to return to userspace or false
234 * if no further action is required.
235 */
236bool kvm_arm_handle_step_debug(struct kvm_vcpu *vcpu, struct kvm_run *run)
237{
238 if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
239 run->exit_reason = KVM_EXIT_DEBUG;
240 run->debug.arch.hsr = ESR_ELx_EC_SOFTSTP_LOW << ESR_ELx_EC_SHIFT;
241 return true;
242 }
243 return false;
244}
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c
index b71247995469..304203fa9e33 100644
--- a/arch/arm64/kvm/handle_exit.c
+++ b/arch/arm64/kvm/handle_exit.c
@@ -28,6 +28,7 @@
28#include <asm/kvm_emulate.h> 28#include <asm/kvm_emulate.h>
29#include <asm/kvm_mmu.h> 29#include <asm/kvm_mmu.h>
30#include <asm/kvm_psci.h> 30#include <asm/kvm_psci.h>
31#include <asm/debug-monitors.h>
31 32
32#define CREATE_TRACE_POINTS 33#define CREATE_TRACE_POINTS
33#include "trace.h" 34#include "trace.h"
@@ -187,14 +188,46 @@ static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu)
187} 188}
188 189
189/* 190/*
191 * We may be single-stepping an emulated instruction. If the emulation
192 * has been completed in the kernel, we can return to userspace with a
193 * KVM_EXIT_DEBUG, otherwise userspace needs to complete its
194 * emulation first.
195 */
196static int handle_trap_exceptions(struct kvm_vcpu *vcpu, struct kvm_run *run)
197{
198 int handled;
199
200 /*
201 * See ARM ARM B1.14.1: "Hyp traps on instructions
202 * that fail their condition code check"
203 */
204 if (!kvm_condition_valid(vcpu)) {
205 kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
206 handled = 1;
207 } else {
208 exit_handle_fn exit_handler;
209
210 exit_handler = kvm_get_exit_handler(vcpu);
211 handled = exit_handler(vcpu, run);
212 }
213
214 /*
215 * kvm_arm_handle_step_debug() sets the exit_reason on the kvm_run
216 * structure if we need to return to userspace.
217 */
218 if (handled > 0 && kvm_arm_handle_step_debug(vcpu, run))
219 handled = 0;
220
221 return handled;
222}
223
224/*
190 * Return > 0 to return to guest, < 0 on error, 0 (and set exit_reason) on 225 * Return > 0 to return to guest, < 0 on error, 0 (and set exit_reason) on
191 * proper exit to userspace. 226 * proper exit to userspace.
192 */ 227 */
193int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run, 228int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
194 int exception_index) 229 int exception_index)
195{ 230{
196 exit_handle_fn exit_handler;
197
198 if (ARM_SERROR_PENDING(exception_index)) { 231 if (ARM_SERROR_PENDING(exception_index)) {
199 u8 hsr_ec = ESR_ELx_EC(kvm_vcpu_get_hsr(vcpu)); 232 u8 hsr_ec = ESR_ELx_EC(kvm_vcpu_get_hsr(vcpu));
200 233
@@ -220,20 +253,14 @@ int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
220 return 1; 253 return 1;
221 case ARM_EXCEPTION_EL1_SERROR: 254 case ARM_EXCEPTION_EL1_SERROR:
222 kvm_inject_vabt(vcpu); 255 kvm_inject_vabt(vcpu);
223 return 1; 256 /* We may still need to return for single-step */
224 case ARM_EXCEPTION_TRAP: 257 if (!(*vcpu_cpsr(vcpu) & DBG_SPSR_SS)
225 /* 258 && kvm_arm_handle_step_debug(vcpu, run))
226 * See ARM ARM B1.14.1: "Hyp traps on instructions 259 return 0;
227 * that fail their condition code check" 260 else
228 */
229 if (!kvm_condition_valid(vcpu)) {
230 kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu));
231 return 1; 261 return 1;
232 } 262 case ARM_EXCEPTION_TRAP:
233 263 return handle_trap_exceptions(vcpu, run);
234 exit_handler = kvm_get_exit_handler(vcpu);
235
236 return exit_handler(vcpu, run);
237 case ARM_EXCEPTION_HYP_GONE: 264 case ARM_EXCEPTION_HYP_GONE:
238 /* 265 /*
239 * EL2 has been reset to the hyp-stub. This happens when a guest 266 * EL2 has been reset to the hyp-stub. This happens when a guest
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
index 525c01f48867..f7c651f3a8c0 100644
--- a/arch/arm64/kvm/hyp/switch.c
+++ b/arch/arm64/kvm/hyp/switch.c
@@ -22,6 +22,7 @@
22#include <asm/kvm_emulate.h> 22#include <asm/kvm_emulate.h>
23#include <asm/kvm_hyp.h> 23#include <asm/kvm_hyp.h>
24#include <asm/fpsimd.h> 24#include <asm/fpsimd.h>
25#include <asm/debug-monitors.h>
25 26
26static bool __hyp_text __fpsimd_enabled_nvhe(void) 27static bool __hyp_text __fpsimd_enabled_nvhe(void)
27{ 28{
@@ -269,7 +270,11 @@ static bool __hyp_text __populate_fault_info(struct kvm_vcpu *vcpu)
269 return true; 270 return true;
270} 271}
271 272
272static void __hyp_text __skip_instr(struct kvm_vcpu *vcpu) 273/* Skip an instruction which has been emulated. Returns true if
274 * execution can continue or false if we need to exit hyp mode because
275 * single-step was in effect.
276 */
277static bool __hyp_text __skip_instr(struct kvm_vcpu *vcpu)
273{ 278{
274 *vcpu_pc(vcpu) = read_sysreg_el2(elr); 279 *vcpu_pc(vcpu) = read_sysreg_el2(elr);
275 280
@@ -282,6 +287,14 @@ static void __hyp_text __skip_instr(struct kvm_vcpu *vcpu)
282 } 287 }
283 288
284 write_sysreg_el2(*vcpu_pc(vcpu), elr); 289 write_sysreg_el2(*vcpu_pc(vcpu), elr);
290
291 if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
292 vcpu->arch.fault.esr_el2 =
293 (ESR_ELx_EC_SOFTSTP_LOW << ESR_ELx_EC_SHIFT) | 0x22;
294 return false;
295 } else {
296 return true;
297 }
285} 298}
286 299
287int __hyp_text __kvm_vcpu_run(struct kvm_vcpu *vcpu) 300int __hyp_text __kvm_vcpu_run(struct kvm_vcpu *vcpu)
@@ -342,13 +355,21 @@ again:
342 int ret = __vgic_v2_perform_cpuif_access(vcpu); 355 int ret = __vgic_v2_perform_cpuif_access(vcpu);
343 356
344 if (ret == 1) { 357 if (ret == 1) {
345 __skip_instr(vcpu); 358 if (__skip_instr(vcpu))
346 goto again; 359 goto again;
360 else
361 exit_code = ARM_EXCEPTION_TRAP;
347 } 362 }
348 363
349 if (ret == -1) { 364 if (ret == -1) {
350 /* Promote an illegal access to an SError */ 365 /* Promote an illegal access to an
351 __skip_instr(vcpu); 366 * SError. If we would be returning
367 * due to single-step clear the SS
368 * bit so handle_exit knows what to
369 * do after dealing with the error.
370 */
371 if (!__skip_instr(vcpu))
372 *vcpu_cpsr(vcpu) &= ~DBG_SPSR_SS;
352 exit_code = ARM_EXCEPTION_EL1_SERROR; 373 exit_code = ARM_EXCEPTION_EL1_SERROR;
353 } 374 }
354 375
@@ -363,8 +384,10 @@ again:
363 int ret = __vgic_v3_perform_cpuif_access(vcpu); 384 int ret = __vgic_v3_perform_cpuif_access(vcpu);
364 385
365 if (ret == 1) { 386 if (ret == 1) {
366 __skip_instr(vcpu); 387 if (__skip_instr(vcpu))
367 goto again; 388 goto again;
389 else
390 exit_code = ARM_EXCEPTION_TRAP;
368 } 391 }
369 392
370 /* 0 falls through to be handled out of EL2 */ 393 /* 0 falls through to be handled out of EL2 */
diff --git a/arch/blackfin/include/uapi/asm/Kbuild b/arch/blackfin/include/uapi/asm/Kbuild
index aa624b4ab655..2240b38c2915 100644
--- a/arch/blackfin/include/uapi/asm/Kbuild
+++ b/arch/blackfin/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += ioctl.h 8generic-y += ioctl.h
8generic-y += ipcbuf.h 9generic-y += ipcbuf.h
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
index 67ee896a76a7..26644e15d854 100644
--- a/arch/c6x/include/uapi/asm/Kbuild
+++ b/arch/c6x/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
index 3687b54bb18e..3470c6e9c7b9 100644
--- a/arch/cris/include/uapi/asm/Kbuild
+++ b/arch/cris/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/frv/include/uapi/asm/Kbuild b/arch/frv/include/uapi/asm/Kbuild
index b15bf6bc0e94..14a2e9af97e9 100644
--- a/arch/frv/include/uapi/asm/Kbuild
+++ b/arch/frv/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3
4generic-y += bpf_perf_event.h
diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild
index 187aed820e71..2f65f78792cb 100644
--- a/arch/h8300/include/uapi/asm/Kbuild
+++ b/arch/h8300/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bpf_perf_event.h
5generic-y += errno.h 6generic-y += errno.h
6generic-y += fcntl.h 7generic-y += fcntl.h
7generic-y += ioctl.h 8generic-y += ioctl.h
diff --git a/arch/hexagon/include/uapi/asm/Kbuild b/arch/hexagon/include/uapi/asm/Kbuild
index cb5df3aad3a8..41a176dbb53e 100644
--- a/arch/hexagon/include/uapi/asm/Kbuild
+++ b/arch/hexagon/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bpf_perf_event.h
5generic-y += errno.h 6generic-y += errno.h
6generic-y += fcntl.h 7generic-y += fcntl.h
7generic-y += ioctl.h 8generic-y += ioctl.h
diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild
index 13a97aa2285f..f5c6967a93bb 100644
--- a/arch/ia64/include/uapi/asm/Kbuild
+++ b/arch/ia64/include/uapi/asm/Kbuild
@@ -1,4 +1,5 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += kvm_para.h 5generic-y += kvm_para.h
diff --git a/arch/m32r/include/uapi/asm/Kbuild b/arch/m32r/include/uapi/asm/Kbuild
index 1c44d3b3eba0..451bf6071c6e 100644
--- a/arch/m32r/include/uapi/asm/Kbuild
+++ b/arch/m32r/include/uapi/asm/Kbuild
@@ -1,5 +1,6 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += kvm_para.h 5generic-y += kvm_para.h
5generic-y += siginfo.h 6generic-y += siginfo.h
diff --git a/arch/m68k/configs/stmark2_defconfig b/arch/m68k/configs/stmark2_defconfig
index 55e55dbc2fb6..3d07b1de7eb0 100644
--- a/arch/m68k/configs/stmark2_defconfig
+++ b/arch/m68k/configs/stmark2_defconfig
@@ -5,7 +5,6 @@ CONFIG_SYSVIPC=y
5CONFIG_LOG_BUF_SHIFT=14 5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_NAMESPACES=y 6CONFIG_NAMESPACES=y
7CONFIG_BLK_DEV_INITRD=y 7CONFIG_BLK_DEV_INITRD=y
8CONFIG_INITRAMFS_SOURCE="../uClinux-dist/romfs"
9# CONFIG_RD_BZIP2 is not set 8# CONFIG_RD_BZIP2 is not set
10# CONFIG_RD_LZMA is not set 9# CONFIG_RD_LZMA is not set
11# CONFIG_RD_XZ is not set 10# CONFIG_RD_XZ is not set
diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild
index 3717b64a620d..c2e26a44c482 100644
--- a/arch/m68k/include/uapi/asm/Kbuild
+++ b/arch/m68k/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += ioctl.h 8generic-y += ioctl.h
8generic-y += ipcbuf.h 9generic-y += ipcbuf.h
diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds
index 3aa571a513b5..cf6edda38971 100644
--- a/arch/m68k/kernel/vmlinux-nommu.lds
+++ b/arch/m68k/kernel/vmlinux-nommu.lds
@@ -45,6 +45,8 @@ SECTIONS {
45 .text : { 45 .text : {
46 HEAD_TEXT 46 HEAD_TEXT
47 TEXT_TEXT 47 TEXT_TEXT
48 IRQENTRY_TEXT
49 SOFTIRQENTRY_TEXT
48 SCHED_TEXT 50 SCHED_TEXT
49 CPUIDLE_TEXT 51 CPUIDLE_TEXT
50 LOCK_TEXT 52 LOCK_TEXT
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 89172b8974b9..625a5785804f 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -16,6 +16,8 @@ SECTIONS
16 .text : { 16 .text : {
17 HEAD_TEXT 17 HEAD_TEXT
18 TEXT_TEXT 18 TEXT_TEXT
19 IRQENTRY_TEXT
20 SOFTIRQENTRY_TEXT
19 SCHED_TEXT 21 SCHED_TEXT
20 CPUIDLE_TEXT 22 CPUIDLE_TEXT
21 LOCK_TEXT 23 LOCK_TEXT
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index 293990efc917..9868270b0984 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -16,6 +16,8 @@ SECTIONS
16 .text : { 16 .text : {
17 HEAD_TEXT 17 HEAD_TEXT
18 TEXT_TEXT 18 TEXT_TEXT
19 IRQENTRY_TEXT
20 SOFTIRQENTRY_TEXT
19 SCHED_TEXT 21 SCHED_TEXT
20 CPUIDLE_TEXT 22 CPUIDLE_TEXT
21 LOCK_TEXT 23 LOCK_TEXT
diff --git a/arch/metag/include/uapi/asm/Kbuild b/arch/metag/include/uapi/asm/Kbuild
index 6ac763d9a3e3..f9eaf07d29f8 100644
--- a/arch/metag/include/uapi/asm/Kbuild
+++ b/arch/metag/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/microblaze/include/uapi/asm/Kbuild b/arch/microblaze/include/uapi/asm/Kbuild
index 06609ca36115..2c6a6bffea32 100644
--- a/arch/microblaze/include/uapi/asm/Kbuild
+++ b/arch/microblaze/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bitsperlong.h 4generic-y += bitsperlong.h
5generic-y += bpf_perf_event.h
5generic-y += errno.h 6generic-y += errno.h
6generic-y += fcntl.h 7generic-y += fcntl.h
7generic-y += ioctl.h 8generic-y += ioctl.h
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index 7c8aab23bce8..b1f66699677d 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -16,7 +16,6 @@ generic-y += qrwlock.h
16generic-y += qspinlock.h 16generic-y += qspinlock.h
17generic-y += sections.h 17generic-y += sections.h
18generic-y += segment.h 18generic-y += segment.h
19generic-y += serial.h
20generic-y += trace_clock.h 19generic-y += trace_clock.h
21generic-y += unaligned.h 20generic-y += unaligned.h
22generic-y += user.h 21generic-y += user.h
diff --git a/arch/mips/include/asm/serial.h b/arch/mips/include/asm/serial.h
new file mode 100644
index 000000000000..1d830c6666c2
--- /dev/null
+++ b/arch/mips/include/asm/serial.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) 2017 MIPS Tech, LLC
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 */
9#ifndef __ASM__SERIAL_H
10#define __ASM__SERIAL_H
11
12#ifdef CONFIG_MIPS_GENERIC
13/*
14 * Generic kernels cannot know a correct value for all platforms at
15 * compile time. Set it to 0 to prevent 8250_early using it
16 */
17#define BASE_BAUD 0
18#else
19#include <asm-generic/serial.h>
20#endif
21
22#endif /* __ASM__SERIAL_H */
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild
index a0266feba9e6..7a4becd8963a 100644
--- a/arch/mips/include/uapi/asm/Kbuild
+++ b/arch/mips/include/uapi/asm/Kbuild
@@ -1,4 +1,5 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += ipcbuf.h 5generic-y += ipcbuf.h
diff --git a/arch/mn10300/include/uapi/asm/Kbuild b/arch/mn10300/include/uapi/asm/Kbuild
index c94ee54210bc..81271d3af47c 100644
--- a/arch/mn10300/include/uapi/asm/Kbuild
+++ b/arch/mn10300/include/uapi/asm/Kbuild
@@ -1,4 +1,5 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += siginfo.h 5generic-y += siginfo.h
diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index ffca24da7647..13a3d77b4d7b 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild
index 62286dbeb904..130c16ccba0a 100644
--- a/arch/openrisc/include/uapi/asm/Kbuild
+++ b/arch/openrisc/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index 196d2a4efb31..286ef5a5904b 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bpf_perf_event.h
5generic-y += kvm_para.h 6generic-y += kvm_para.h
6generic-y += param.h 7generic-y += param.h
7generic-y += poll.h 8generic-y += poll.h
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 73b92017b6d7..cd2fc1cc1cc7 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -76,6 +76,7 @@ struct machdep_calls {
76 76
77 void __noreturn (*restart)(char *cmd); 77 void __noreturn (*restart)(char *cmd);
78 void __noreturn (*halt)(void); 78 void __noreturn (*halt)(void);
79 void (*panic)(char *str);
79 void (*cpu_die)(void); 80 void (*cpu_die)(void);
80 81
81 long (*time_init)(void); /* Optional, may be NULL */ 82 long (*time_init)(void); /* Optional, may be NULL */
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index 257d23dbf55d..cf00ec26303a 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/asm/setup.h
@@ -24,6 +24,7 @@ extern void reloc_got2(unsigned long);
24 24
25void check_for_initrd(void); 25void check_for_initrd(void);
26void initmem_init(void); 26void initmem_init(void);
27void setup_panic(void);
27#define ARCH_PANIC_TIMEOUT 180 28#define ARCH_PANIC_TIMEOUT 180
28 29
29#ifdef CONFIG_PPC_PSERIES 30#ifdef CONFIG_PPC_PSERIES
diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild
index 0d960ef78a9a..1a6ed5919ffd 100644
--- a/arch/powerpc/include/uapi/asm/Kbuild
+++ b/arch/powerpc/include/uapi/asm/Kbuild
@@ -1,6 +1,7 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += param.h 5generic-y += param.h
5generic-y += poll.h 6generic-y += poll.h
6generic-y += resource.h 7generic-y += resource.h
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S
index 610955fe8b81..679bbe714e85 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -102,6 +102,7 @@ _GLOBAL(__setup_cpu_power9)
102 li r0,0 102 li r0,0
103 mtspr SPRN_PSSCR,r0 103 mtspr SPRN_PSSCR,r0
104 mtspr SPRN_LPID,r0 104 mtspr SPRN_LPID,r0
105 mtspr SPRN_PID,r0
105 mfspr r3,SPRN_LPCR 106 mfspr r3,SPRN_LPCR
106 LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC) 107 LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
107 or r3, r3, r4 108 or r3, r3, r4
@@ -126,6 +127,7 @@ _GLOBAL(__restore_cpu_power9)
126 li r0,0 127 li r0,0
127 mtspr SPRN_PSSCR,r0 128 mtspr SPRN_PSSCR,r0
128 mtspr SPRN_LPID,r0 129 mtspr SPRN_LPID,r0
130 mtspr SPRN_PID,r0
129 mfspr r3,SPRN_LPCR 131 mfspr r3,SPRN_LPCR
130 LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC) 132 LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
131 or r3, r3, r4 133 or r3, r3, r4
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 04ea5c04fd24..3c2c2688918f 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1462,25 +1462,6 @@ static void fadump_init_files(void)
1462 return; 1462 return;
1463} 1463}
1464 1464
1465static int fadump_panic_event(struct notifier_block *this,
1466 unsigned long event, void *ptr)
1467{
1468 /*
1469 * If firmware-assisted dump has been registered then trigger
1470 * firmware-assisted dump and let firmware handle everything
1471 * else. If this returns, then fadump was not registered, so
1472 * go through the rest of the panic path.
1473 */
1474 crash_fadump(NULL, ptr);
1475
1476 return NOTIFY_DONE;
1477}
1478
1479static struct notifier_block fadump_panic_block = {
1480 .notifier_call = fadump_panic_event,
1481 .priority = INT_MIN /* may not return; must be done last */
1482};
1483
1484/* 1465/*
1485 * Prepare for firmware-assisted dump. 1466 * Prepare for firmware-assisted dump.
1486 */ 1467 */
@@ -1513,9 +1494,6 @@ int __init setup_fadump(void)
1513 init_fadump_mem_struct(&fdm, fw_dump.reserve_dump_area_start); 1494 init_fadump_mem_struct(&fdm, fw_dump.reserve_dump_area_start);
1514 fadump_init_files(); 1495 fadump_init_files();
1515 1496
1516 atomic_notifier_chain_register(&panic_notifier_list,
1517 &fadump_panic_block);
1518
1519 return 1; 1497 return 1;
1520} 1498}
1521subsys_initcall(setup_fadump); 1499subsys_initcall(setup_fadump);
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2075322cd225..9d213542a48b 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -704,6 +704,30 @@ int check_legacy_ioport(unsigned long base_port)
704} 704}
705EXPORT_SYMBOL(check_legacy_ioport); 705EXPORT_SYMBOL(check_legacy_ioport);
706 706
707static int ppc_panic_event(struct notifier_block *this,
708 unsigned long event, void *ptr)
709{
710 /*
711 * If firmware-assisted dump has been registered then trigger
712 * firmware-assisted dump and let firmware handle everything else.
713 */
714 crash_fadump(NULL, ptr);
715 ppc_md.panic(ptr); /* May not return */
716 return NOTIFY_DONE;
717}
718
719static struct notifier_block ppc_panic_block = {
720 .notifier_call = ppc_panic_event,
721 .priority = INT_MIN /* may not return; must be done last */
722};
723
724void __init setup_panic(void)
725{
726 if (!ppc_md.panic)
727 return;
728 atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
729}
730
707#ifdef CONFIG_CHECK_CACHE_COHERENCY 731#ifdef CONFIG_CHECK_CACHE_COHERENCY
708/* 732/*
709 * For platforms that have configurable cache-coherency. This function 733 * For platforms that have configurable cache-coherency. This function
@@ -848,6 +872,9 @@ void __init setup_arch(char **cmdline_p)
848 /* Probe the machine type, establish ppc_md. */ 872 /* Probe the machine type, establish ppc_md. */
849 probe_machine(); 873 probe_machine();
850 874
875 /* Setup panic notifier if requested by the platform. */
876 setup_panic();
877
851 /* 878 /*
852 * Configure ppc_md.power_save (ppc32 only, 64-bit machines do 879 * Configure ppc_md.power_save (ppc32 only, 64-bit machines do
853 * it from their respective probe() function. 880 * it from their respective probe() function.
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 9e3da168d54c..153812966365 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -1415,7 +1415,7 @@ static int collect_events(struct perf_event *group, int max_count,
1415 int n = 0; 1415 int n = 0;
1416 struct perf_event *event; 1416 struct perf_event *event;
1417 1417
1418 if (!is_software_event(group)) { 1418 if (group->pmu->task_ctx_nr == perf_hw_context) {
1419 if (n >= max_count) 1419 if (n >= max_count)
1420 return -1; 1420 return -1;
1421 ctrs[n] = group; 1421 ctrs[n] = group;
@@ -1423,7 +1423,7 @@ static int collect_events(struct perf_event *group, int max_count,
1423 events[n++] = group->hw.config; 1423 events[n++] = group->hw.config;
1424 } 1424 }
1425 list_for_each_entry(event, &group->sibling_list, group_entry) { 1425 list_for_each_entry(event, &group->sibling_list, group_entry) {
1426 if (!is_software_event(event) && 1426 if (event->pmu->task_ctx_nr == perf_hw_context &&
1427 event->state != PERF_EVENT_STATE_OFF) { 1427 event->state != PERF_EVENT_STATE_OFF) {
1428 if (n >= max_count) 1428 if (n >= max_count)
1429 return -1; 1429 return -1;
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 9dabea6e1443..6244bc849469 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -104,6 +104,20 @@ static void __noreturn ps3_halt(void)
104 ps3_sys_manager_halt(); /* never returns */ 104 ps3_sys_manager_halt(); /* never returns */
105} 105}
106 106
107static void ps3_panic(char *str)
108{
109 DBG("%s:%d %s\n", __func__, __LINE__, str);
110
111 smp_send_stop();
112 printk("\n");
113 printk(" System does not reboot automatically.\n");
114 printk(" Please press POWER button.\n");
115 printk("\n");
116
117 while(1)
118 lv1_pause(1);
119}
120
107#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ 121#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
108 defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE) 122 defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
109static void __init prealloc(struct ps3_prealloc *p) 123static void __init prealloc(struct ps3_prealloc *p)
@@ -255,6 +269,7 @@ define_machine(ps3) {
255 .probe = ps3_probe, 269 .probe = ps3_probe,
256 .setup_arch = ps3_setup_arch, 270 .setup_arch = ps3_setup_arch,
257 .init_IRQ = ps3_init_IRQ, 271 .init_IRQ = ps3_init_IRQ,
272 .panic = ps3_panic,
258 .get_boot_time = ps3_get_boot_time, 273 .get_boot_time = ps3_get_boot_time,
259 .set_dabr = ps3_set_dabr, 274 .set_dabr = ps3_set_dabr,
260 .calibrate_decr = ps3_calibrate_decr, 275 .calibrate_decr = ps3_calibrate_decr,
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 5f1beb8367ac..a8531e012658 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -726,6 +726,7 @@ define_machine(pseries) {
726 .pcibios_fixup = pSeries_final_fixup, 726 .pcibios_fixup = pSeries_final_fixup,
727 .restart = rtas_restart, 727 .restart = rtas_restart,
728 .halt = rtas_halt, 728 .halt = rtas_halt,
729 .panic = rtas_os_term,
729 .get_boot_time = rtas_get_boot_time, 730 .get_boot_time = rtas_get_boot_time,
730 .get_rtc_time = rtas_get_rtc_time, 731 .get_rtc_time = rtas_get_rtc_time,
731 .set_rtc_time = rtas_set_rtc_time, 732 .set_rtc_time = rtas_set_rtc_time,
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 1b2d8cb49abb..cab24f549e7c 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1590,7 +1590,7 @@ static void print_bug_trap(struct pt_regs *regs)
1590 printf("kernel BUG at %s:%u!\n", 1590 printf("kernel BUG at %s:%u!\n",
1591 bug->file, bug->line); 1591 bug->file, bug->line);
1592#else 1592#else
1593 printf("kernel BUG at %p!\n", (void *)bug->bug_addr); 1593 printf("kernel BUG at %px!\n", (void *)bug->bug_addr);
1594#endif 1594#endif
1595#endif /* CONFIG_BUG */ 1595#endif /* CONFIG_BUG */
1596} 1596}
@@ -2329,7 +2329,7 @@ static void dump_one_paca(int cpu)
2329 2329
2330 p = &paca[cpu]; 2330 p = &paca[cpu];
2331 2331
2332 printf("paca for cpu 0x%x @ %p:\n", cpu, p); 2332 printf("paca for cpu 0x%x @ %px:\n", cpu, p);
2333 2333
2334 printf(" %-*s = %s\n", 20, "possible", cpu_possible(cpu) ? "yes" : "no"); 2334 printf(" %-*s = %s\n", 20, "possible", cpu_possible(cpu) ? "yes" : "no");
2335 printf(" %-*s = %s\n", 20, "present", cpu_present(cpu) ? "yes" : "no"); 2335 printf(" %-*s = %s\n", 20, "present", cpu_present(cpu) ? "yes" : "no");
@@ -2945,7 +2945,7 @@ static void show_task(struct task_struct *tsk)
2945 (tsk->exit_state & EXIT_DEAD) ? 'E' : 2945 (tsk->exit_state & EXIT_DEAD) ? 'E' :
2946 (tsk->state & TASK_INTERRUPTIBLE) ? 'S' : '?'; 2946 (tsk->state & TASK_INTERRUPTIBLE) ? 'S' : '?';
2947 2947
2948 printf("%p %016lx %6d %6d %c %2d %s\n", tsk, 2948 printf("%px %016lx %6d %6d %c %2d %s\n", tsk,
2949 tsk->thread.ksp, 2949 tsk->thread.ksp,
2950 tsk->pid, tsk->parent->pid, 2950 tsk->pid, tsk->parent->pid,
2951 state, task_thread_info(tsk)->cpu, 2951 state, task_thread_info(tsk)->cpu,
@@ -2988,7 +2988,7 @@ static void show_pte(unsigned long addr)
2988 2988
2989 if (setjmp(bus_error_jmp) != 0) { 2989 if (setjmp(bus_error_jmp) != 0) {
2990 catch_memory_errors = 0; 2990 catch_memory_errors = 0;
2991 printf("*** Error dumping pte for task %p\n", tsk); 2991 printf("*** Error dumping pte for task %px\n", tsk);
2992 return; 2992 return;
2993 } 2993 }
2994 2994
@@ -3074,7 +3074,7 @@ static void show_tasks(void)
3074 3074
3075 if (setjmp(bus_error_jmp) != 0) { 3075 if (setjmp(bus_error_jmp) != 0) {
3076 catch_memory_errors = 0; 3076 catch_memory_errors = 0;
3077 printf("*** Error dumping task %p\n", tsk); 3077 printf("*** Error dumping task %px\n", tsk);
3078 return; 3078 return;
3079 } 3079 }
3080 3080
diff --git a/arch/riscv/include/uapi/asm/Kbuild b/arch/riscv/include/uapi/asm/Kbuild
index 5ded96b06352..7e91f4850475 100644
--- a/arch/riscv/include/uapi/asm/Kbuild
+++ b/arch/riscv/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += setup.h 4generic-y += setup.h
5generic-y += unistd.h 5generic-y += unistd.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/s390/Kbuild b/arch/s390/Kbuild
index eae2c64cf69d..9fdff3fe1a42 100644
--- a/arch/s390/Kbuild
+++ b/arch/s390/Kbuild
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1obj-y += kernel/ 2obj-y += kernel/
2obj-y += mm/ 3obj-y += mm/
3obj-$(CONFIG_KVM) += kvm/ 4obj-$(CONFIG_KVM) += kvm/
diff --git a/arch/s390/appldata/Makefile b/arch/s390/appldata/Makefile
index 99f1cf071304..b06def4a4f2f 100644
--- a/arch/s390/appldata/Makefile
+++ b/arch/s390/appldata/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Makefile for the Linux - z/VM Monitor Stream. 3# Makefile for the Linux - z/VM Monitor Stream.
3# 4#
diff --git a/arch/s390/boot/compressed/vmlinux.scr b/arch/s390/boot/compressed/vmlinux.scr
index f02382ae5c48..42a242597f34 100644
--- a/arch/s390/boot/compressed/vmlinux.scr
+++ b/arch/s390/boot/compressed/vmlinux.scr
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1SECTIONS 2SECTIONS
2{ 3{
3 .rodata.compressed : { 4 .rodata.compressed : {
diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c
index c7de53d8da75..a00c17f761c1 100644
--- a/arch/s390/crypto/sha1_s390.c
+++ b/arch/s390/crypto/sha1_s390.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0+
1/* 2/*
2 * Cryptographic API. 3 * Cryptographic API.
3 * 4 *
@@ -16,12 +17,6 @@
16 * Copyright (c) Alan Smithee. 17 * Copyright (c) Alan Smithee.
17 * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk> 18 * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk>
18 * Copyright (c) Jean-Francois Dive <jef@linuxbe.org> 19 * Copyright (c) Jean-Francois Dive <jef@linuxbe.org>
19 *
20 * This program is free software; you can redistribute it and/or modify it
21 * under the terms of the GNU General Public License as published by the Free
22 * Software Foundation; either version 2 of the License, or (at your option)
23 * any later version.
24 *
25 */ 20 */
26#include <crypto/internal/hash.h> 21#include <crypto/internal/hash.h>
27#include <linux/init.h> 22#include <linux/init.h>
diff --git a/arch/s390/hypfs/Makefile b/arch/s390/hypfs/Makefile
index 2ee25ba252d6..06f601509ce9 100644
--- a/arch/s390/hypfs/Makefile
+++ b/arch/s390/hypfs/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Makefile for the linux hypfs filesystem routines. 3# Makefile for the linux hypfs filesystem routines.
3# 4#
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index 41c211a4d8b1..048450869328 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1generic-y += asm-offsets.h 2generic-y += asm-offsets.h
2generic-y += cacheflush.h 3generic-y += cacheflush.h
3generic-y += clkdev.h 4generic-y += clkdev.h
diff --git a/arch/s390/include/asm/alternative.h b/arch/s390/include/asm/alternative.h
index a72002056b54..c2cf7bcdef9b 100644
--- a/arch/s390/include/asm/alternative.h
+++ b/arch/s390/include/asm/alternative.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_S390_ALTERNATIVE_H 2#ifndef _ASM_S390_ALTERNATIVE_H
2#define _ASM_S390_ALTERNATIVE_H 3#define _ASM_S390_ALTERNATIVE_H
3 4
diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h
index c02f4aba88a6..cfce6835b109 100644
--- a/arch/s390/include/asm/ap.h
+++ b/arch/s390/include/asm/ap.h
@@ -1,12 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Adjunct processor (AP) interfaces 3 * Adjunct processor (AP) interfaces
3 * 4 *
4 * Copyright IBM Corp. 2017 5 * Copyright IBM Corp. 2017
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Tony Krowiak <akrowia@linux.vnet.ibm.com> 7 * Author(s): Tony Krowiak <akrowia@linux.vnet.ibm.com>
11 * Martin Schwidefsky <schwidefsky@de.ibm.com> 8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
12 * Harald Freudenberger <freude@de.ibm.com> 9 * Harald Freudenberger <freude@de.ibm.com>
diff --git a/arch/s390/include/asm/bugs.h b/arch/s390/include/asm/bugs.h
index 0f5bd894f4dc..aa42a179be33 100644
--- a/arch/s390/include/asm/bugs.h
+++ b/arch/s390/include/asm/bugs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * S390 version 3 * S390 version
3 * Copyright IBM Corp. 1999 4 * Copyright IBM Corp. 1999
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h
index d6c9d1e0dc2d..b9c0e361748b 100644
--- a/arch/s390/include/asm/perf_event.h
+++ b/arch/s390/include/asm/perf_event.h
@@ -40,6 +40,7 @@ struct pt_regs;
40extern unsigned long perf_instruction_pointer(struct pt_regs *regs); 40extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
41extern unsigned long perf_misc_flags(struct pt_regs *regs); 41extern unsigned long perf_misc_flags(struct pt_regs *regs);
42#define perf_misc_flags(regs) perf_misc_flags(regs) 42#define perf_misc_flags(regs) perf_misc_flags(regs)
43#define perf_arch_bpf_user_pt_regs(regs) &regs->user_regs
43 44
44/* Perf pt_regs extension for sample-data-entry indicators */ 45/* Perf pt_regs extension for sample-data-entry indicators */
45struct perf_sf_sde_regs { 46struct perf_sf_sde_regs {
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h
index a3788dafc0e1..6f70d81c40f2 100644
--- a/arch/s390/include/asm/ptrace.h
+++ b/arch/s390/include/asm/ptrace.h
@@ -74,9 +74,14 @@ enum {
74 */ 74 */
75struct pt_regs 75struct pt_regs
76{ 76{
77 unsigned long args[1]; 77 union {
78 psw_t psw; 78 user_pt_regs user_regs;
79 unsigned long gprs[NUM_GPRS]; 79 struct {
80 unsigned long args[1];
81 psw_t psw;
82 unsigned long gprs[NUM_GPRS];
83 };
84 };
80 unsigned long orig_gpr2; 85 unsigned long orig_gpr2;
81 unsigned int int_code; 86 unsigned int int_code;
82 unsigned int int_parm; 87 unsigned int int_parm;
diff --git a/arch/s390/include/asm/segment.h b/arch/s390/include/asm/segment.h
index 8bfce3475b1c..97a0582b8d0f 100644
--- a/arch/s390/include/asm/segment.h
+++ b/arch/s390/include/asm/segment.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_SEGMENT_H 2#ifndef _ASM_SEGMENT_H
2#define _ASM_SEGMENT_H 3#define _ASM_SEGMENT_H
3 4
diff --git a/arch/s390/include/asm/switch_to.h b/arch/s390/include/asm/switch_to.h
index ec7b476c1ac5..c61b2cc1a8a8 100644
--- a/arch/s390/include/asm/switch_to.h
+++ b/arch/s390/include/asm/switch_to.h
@@ -30,21 +30,20 @@ static inline void restore_access_regs(unsigned int *acrs)
30 asm volatile("lam 0,15,%0" : : "Q" (*(acrstype *)acrs)); 30 asm volatile("lam 0,15,%0" : : "Q" (*(acrstype *)acrs));
31} 31}
32 32
33#define switch_to(prev,next,last) do { \ 33#define switch_to(prev, next, last) do { \
34 if (prev->mm) { \ 34 /* save_fpu_regs() sets the CIF_FPU flag, which enforces \
35 save_fpu_regs(); \ 35 * a restore of the floating point / vector registers as \
36 save_access_regs(&prev->thread.acrs[0]); \ 36 * soon as the next task returns to user space \
37 save_ri_cb(prev->thread.ri_cb); \ 37 */ \
38 save_gs_cb(prev->thread.gs_cb); \ 38 save_fpu_regs(); \
39 } \ 39 save_access_regs(&prev->thread.acrs[0]); \
40 save_ri_cb(prev->thread.ri_cb); \
41 save_gs_cb(prev->thread.gs_cb); \
40 update_cr_regs(next); \ 42 update_cr_regs(next); \
41 if (next->mm) { \ 43 restore_access_regs(&next->thread.acrs[0]); \
42 set_cpu_flag(CIF_FPU); \ 44 restore_ri_cb(next->thread.ri_cb, prev->thread.ri_cb); \
43 restore_access_regs(&next->thread.acrs[0]); \ 45 restore_gs_cb(next->thread.gs_cb); \
44 restore_ri_cb(next->thread.ri_cb, prev->thread.ri_cb); \ 46 prev = __switch_to(prev, next); \
45 restore_gs_cb(next->thread.gs_cb); \
46 } \
47 prev = __switch_to(prev,next); \
48} while (0) 47} while (0)
49 48
50#endif /* __ASM_SWITCH_TO_H */ 49#endif /* __ASM_SWITCH_TO_H */
diff --git a/arch/s390/include/asm/vga.h b/arch/s390/include/asm/vga.h
index d375526c261f..605dc46bac5e 100644
--- a/arch/s390/include/asm/vga.h
+++ b/arch/s390/include/asm/vga.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef _ASM_S390_VGA_H 2#ifndef _ASM_S390_VGA_H
2#define _ASM_S390_VGA_H 3#define _ASM_S390_VGA_H
3 4
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
index 098f28778a13..92b7c9b3e641 100644
--- a/arch/s390/include/uapi/asm/Kbuild
+++ b/arch/s390/include/uapi/asm/Kbuild
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# UAPI Header export list 2# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 3include include/uapi/asm-generic/Kbuild.asm
3 4
diff --git a/arch/s390/include/uapi/asm/bpf_perf_event.h b/arch/s390/include/uapi/asm/bpf_perf_event.h
new file mode 100644
index 000000000000..cefe7c7cd4f6
--- /dev/null
+++ b/arch/s390/include/uapi/asm/bpf_perf_event.h
@@ -0,0 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__
3#define _UAPI__ASM_BPF_PERF_EVENT_H__
4
5#include <asm/ptrace.h>
6
7typedef user_pt_regs bpf_user_pt_regs_t;
8
9#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */
diff --git a/arch/s390/include/uapi/asm/perf_regs.h b/arch/s390/include/uapi/asm/perf_regs.h
index 7c8564f98205..d17dd9e5d516 100644
--- a/arch/s390/include/uapi/asm/perf_regs.h
+++ b/arch/s390/include/uapi/asm/perf_regs.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _ASM_S390_PERF_REGS_H 2#ifndef _ASM_S390_PERF_REGS_H
2#define _ASM_S390_PERF_REGS_H 3#define _ASM_S390_PERF_REGS_H
3 4
diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h
index 0d23c8ff2900..543dd70e12c8 100644
--- a/arch/s390/include/uapi/asm/ptrace.h
+++ b/arch/s390/include/uapi/asm/ptrace.h
@@ -162,7 +162,7 @@
162#define GPR_SIZE 8 162#define GPR_SIZE 8
163#define CR_SIZE 8 163#define CR_SIZE 8
164 164
165#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */ 165#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
166 166
167#endif /* __s390x__ */ 167#endif /* __s390x__ */
168 168
@@ -179,17 +179,16 @@
179#define ACR_SIZE 4 179#define ACR_SIZE 4
180 180
181 181
182#define PTRACE_OLDSETOPTIONS 21 182#define PTRACE_OLDSETOPTIONS 21
183 183
184#ifndef __ASSEMBLY__ 184#ifndef __ASSEMBLY__
185#include <linux/stddef.h> 185#include <linux/stddef.h>
186#include <linux/types.h> 186#include <linux/types.h>
187 187
188typedef union 188typedef union {
189{ 189 float f;
190 float f; 190 double d;
191 double d; 191 __u64 ui;
192 __u64 ui;
193 struct 192 struct
194 { 193 {
195 __u32 hi; 194 __u32 hi;
@@ -197,23 +196,21 @@ typedef union
197 } fp; 196 } fp;
198} freg_t; 197} freg_t;
199 198
200typedef struct 199typedef struct {
201{ 200 __u32 fpc;
202 __u32 fpc;
203 __u32 pad; 201 __u32 pad;
204 freg_t fprs[NUM_FPRS]; 202 freg_t fprs[NUM_FPRS];
205} s390_fp_regs; 203} s390_fp_regs;
206 204
207#define FPC_EXCEPTION_MASK 0xF8000000 205#define FPC_EXCEPTION_MASK 0xF8000000
208#define FPC_FLAGS_MASK 0x00F80000 206#define FPC_FLAGS_MASK 0x00F80000
209#define FPC_DXC_MASK 0x0000FF00 207#define FPC_DXC_MASK 0x0000FF00
210#define FPC_RM_MASK 0x00000003 208#define FPC_RM_MASK 0x00000003
211 209
212/* this typedef defines how a Program Status Word looks like */ 210/* this typedef defines how a Program Status Word looks like */
213typedef struct 211typedef struct {
214{ 212 unsigned long mask;
215 unsigned long mask; 213 unsigned long addr;
216 unsigned long addr;
217} __attribute__ ((aligned(8))) psw_t; 214} __attribute__ ((aligned(8))) psw_t;
218 215
219#ifndef __s390x__ 216#ifndef __s390x__
@@ -282,8 +279,7 @@ typedef struct
282/* 279/*
283 * The s390_regs structure is used to define the elf_gregset_t. 280 * The s390_regs structure is used to define the elf_gregset_t.
284 */ 281 */
285typedef struct 282typedef struct {
286{
287 psw_t psw; 283 psw_t psw;
288 unsigned long gprs[NUM_GPRS]; 284 unsigned long gprs[NUM_GPRS];
289 unsigned int acrs[NUM_ACRS]; 285 unsigned int acrs[NUM_ACRS];
@@ -291,24 +287,32 @@ typedef struct
291} s390_regs; 287} s390_regs;
292 288
293/* 289/*
290 * The user_pt_regs structure exports the beginning of
291 * the in-kernel pt_regs structure to user space.
292 */
293typedef struct {
294 unsigned long args[1];
295 psw_t psw;
296 unsigned long gprs[NUM_GPRS];
297} user_pt_regs;
298
299/*
294 * Now for the user space program event recording (trace) definitions. 300 * Now for the user space program event recording (trace) definitions.
295 * The following structures are used only for the ptrace interface, don't 301 * The following structures are used only for the ptrace interface, don't
296 * touch or even look at it if you don't want to modify the user-space 302 * touch or even look at it if you don't want to modify the user-space
297 * ptrace interface. In particular stay away from it for in-kernel PER. 303 * ptrace interface. In particular stay away from it for in-kernel PER.
298 */ 304 */
299typedef struct 305typedef struct {
300{
301 unsigned long cr[NUM_CR_WORDS]; 306 unsigned long cr[NUM_CR_WORDS];
302} per_cr_words; 307} per_cr_words;
303 308
304#define PER_EM_MASK 0xE8000000UL 309#define PER_EM_MASK 0xE8000000UL
305 310
306typedef struct 311typedef struct {
307{
308#ifdef __s390x__ 312#ifdef __s390x__
309 unsigned : 32; 313 unsigned : 32;
310#endif /* __s390x__ */ 314#endif /* __s390x__ */
311 unsigned em_branching : 1; 315 unsigned em_branching : 1;
312 unsigned em_instruction_fetch : 1; 316 unsigned em_instruction_fetch : 1;
313 /* 317 /*
314 * Switching on storage alteration automatically fixes 318 * Switching on storage alteration automatically fixes
@@ -317,44 +321,41 @@ typedef struct
317 unsigned em_storage_alteration : 1; 321 unsigned em_storage_alteration : 1;
318 unsigned em_gpr_alt_unused : 1; 322 unsigned em_gpr_alt_unused : 1;
319 unsigned em_store_real_address : 1; 323 unsigned em_store_real_address : 1;
320 unsigned : 3; 324 unsigned : 3;
321 unsigned branch_addr_ctl : 1; 325 unsigned branch_addr_ctl : 1;
322 unsigned : 1; 326 unsigned : 1;
323 unsigned storage_alt_space_ctl : 1; 327 unsigned storage_alt_space_ctl : 1;
324 unsigned : 21; 328 unsigned : 21;
325 unsigned long starting_addr; 329 unsigned long starting_addr;
326 unsigned long ending_addr; 330 unsigned long ending_addr;
327} per_cr_bits; 331} per_cr_bits;
328 332
329typedef struct 333typedef struct {
330{
331 unsigned short perc_atmid; 334 unsigned short perc_atmid;
332 unsigned long address; 335 unsigned long address;
333 unsigned char access_id; 336 unsigned char access_id;
334} per_lowcore_words; 337} per_lowcore_words;
335 338
336typedef struct 339typedef struct {
337{ 340 unsigned perc_branching : 1;
338 unsigned perc_branching : 1;
339 unsigned perc_instruction_fetch : 1; 341 unsigned perc_instruction_fetch : 1;
340 unsigned perc_storage_alteration : 1; 342 unsigned perc_storage_alteration : 1;
341 unsigned perc_gpr_alt_unused : 1; 343 unsigned perc_gpr_alt_unused : 1;
342 unsigned perc_store_real_address : 1; 344 unsigned perc_store_real_address : 1;
343 unsigned : 3; 345 unsigned : 3;
344 unsigned atmid_psw_bit_31 : 1; 346 unsigned atmid_psw_bit_31 : 1;
345 unsigned atmid_validity_bit : 1; 347 unsigned atmid_validity_bit : 1;
346 unsigned atmid_psw_bit_32 : 1; 348 unsigned atmid_psw_bit_32 : 1;
347 unsigned atmid_psw_bit_5 : 1; 349 unsigned atmid_psw_bit_5 : 1;
348 unsigned atmid_psw_bit_16 : 1; 350 unsigned atmid_psw_bit_16 : 1;
349 unsigned atmid_psw_bit_17 : 1; 351 unsigned atmid_psw_bit_17 : 1;
350 unsigned si : 2; 352 unsigned si : 2;
351 unsigned long address; 353 unsigned long address;
352 unsigned : 4; 354 unsigned : 4;
353 unsigned access_id : 4; 355 unsigned access_id : 4;
354} per_lowcore_bits; 356} per_lowcore_bits;
355 357
356typedef struct 358typedef struct {
357{
358 union { 359 union {
359 per_cr_words words; 360 per_cr_words words;
360 per_cr_bits bits; 361 per_cr_bits bits;
@@ -364,9 +365,9 @@ typedef struct
364 * the kernel always sets them to zero. To enable single 365 * the kernel always sets them to zero. To enable single
365 * stepping use ptrace(PTRACE_SINGLESTEP) instead. 366 * stepping use ptrace(PTRACE_SINGLESTEP) instead.
366 */ 367 */
367 unsigned single_step : 1; 368 unsigned single_step : 1;
368 unsigned instruction_fetch : 1; 369 unsigned instruction_fetch : 1;
369 unsigned : 30; 370 unsigned : 30;
370 /* 371 /*
371 * These addresses are copied into cr10 & cr11 if single 372 * These addresses are copied into cr10 & cr11 if single
372 * stepping is switched off 373 * stepping is switched off
@@ -376,11 +377,10 @@ typedef struct
376 union { 377 union {
377 per_lowcore_words words; 378 per_lowcore_words words;
378 per_lowcore_bits bits; 379 per_lowcore_bits bits;
379 } lowcore; 380 } lowcore;
380} per_struct; 381} per_struct;
381 382
382typedef struct 383typedef struct {
383{
384 unsigned int len; 384 unsigned int len;
385 unsigned long kernel_addr; 385 unsigned long kernel_addr;
386 unsigned long process_addr; 386 unsigned long process_addr;
@@ -390,12 +390,12 @@ typedef struct
390 * S/390 specific non posix ptrace requests. I chose unusual values so 390 * S/390 specific non posix ptrace requests. I chose unusual values so
391 * they are unlikely to clash with future ptrace definitions. 391 * they are unlikely to clash with future ptrace definitions.
392 */ 392 */
393#define PTRACE_PEEKUSR_AREA 0x5000 393#define PTRACE_PEEKUSR_AREA 0x5000
394#define PTRACE_POKEUSR_AREA 0x5001 394#define PTRACE_POKEUSR_AREA 0x5001
395#define PTRACE_PEEKTEXT_AREA 0x5002 395#define PTRACE_PEEKTEXT_AREA 0x5002
396#define PTRACE_PEEKDATA_AREA 0x5003 396#define PTRACE_PEEKDATA_AREA 0x5003
397#define PTRACE_POKETEXT_AREA 0x5004 397#define PTRACE_POKETEXT_AREA 0x5004
398#define PTRACE_POKEDATA_AREA 0x5005 398#define PTRACE_POKEDATA_AREA 0x5005
399#define PTRACE_GET_LAST_BREAK 0x5006 399#define PTRACE_GET_LAST_BREAK 0x5006
400#define PTRACE_PEEK_SYSTEM_CALL 0x5007 400#define PTRACE_PEEK_SYSTEM_CALL 0x5007
401#define PTRACE_POKE_SYSTEM_CALL 0x5008 401#define PTRACE_POKE_SYSTEM_CALL 0x5008
@@ -413,21 +413,19 @@ typedef struct
413 * PT_PROT definition is loosely based on hppa bsd definition in 413 * PT_PROT definition is loosely based on hppa bsd definition in
414 * gdb/hppab-nat.c 414 * gdb/hppab-nat.c
415 */ 415 */
416#define PTRACE_PROT 21 416#define PTRACE_PROT 21
417 417
418typedef enum 418typedef enum {
419{
420 ptprot_set_access_watchpoint, 419 ptprot_set_access_watchpoint,
421 ptprot_set_write_watchpoint, 420 ptprot_set_write_watchpoint,
422 ptprot_disable_watchpoint 421 ptprot_disable_watchpoint
423} ptprot_flags; 422} ptprot_flags;
424 423
425typedef struct 424typedef struct {
426{
427 unsigned long lowaddr; 425 unsigned long lowaddr;
428 unsigned long hiaddr; 426 unsigned long hiaddr;
429 ptprot_flags prot; 427 ptprot_flags prot;
430} ptprot_area; 428} ptprot_area;
431 429
432/* Sequence of bytes for breakpoint illegal instruction. */ 430/* Sequence of bytes for breakpoint illegal instruction. */
433#define S390_BREAKPOINT {0x0,0x1} 431#define S390_BREAKPOINT {0x0,0x1}
@@ -439,8 +437,7 @@ typedef struct
439 * The user_regs_struct defines the way the user registers are 437 * The user_regs_struct defines the way the user registers are
440 * store on the stack for signal handling. 438 * store on the stack for signal handling.
441 */ 439 */
442struct user_regs_struct 440struct user_regs_struct {
443{
444 psw_t psw; 441 psw_t psw;
445 unsigned long gprs[NUM_GPRS]; 442 unsigned long gprs[NUM_GPRS];
446 unsigned int acrs[NUM_ACRS]; 443 unsigned int acrs[NUM_ACRS];
diff --git a/arch/s390/include/uapi/asm/sthyi.h b/arch/s390/include/uapi/asm/sthyi.h
index ec113db4eb7e..b1b022316983 100644
--- a/arch/s390/include/uapi/asm/sthyi.h
+++ b/arch/s390/include/uapi/asm/sthyi.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_ASM_STHYI_H 2#ifndef _UAPI_ASM_STHYI_H
2#define _UAPI_ASM_STHYI_H 3#define _UAPI_ASM_STHYI_H
3 4
diff --git a/arch/s390/include/uapi/asm/virtio-ccw.h b/arch/s390/include/uapi/asm/virtio-ccw.h
index 3a77833c74dc..2b605f7e8483 100644
--- a/arch/s390/include/uapi/asm/virtio-ccw.h
+++ b/arch/s390/include/uapi/asm/virtio-ccw.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2/* 2/*
3 * Definitions for virtio-ccw devices. 3 * Definitions for virtio-ccw devices.
4 * 4 *
diff --git a/arch/s390/include/uapi/asm/vmcp.h b/arch/s390/include/uapi/asm/vmcp.h
index 4caf71714a55..aeaaa030030e 100644
--- a/arch/s390/include/uapi/asm/vmcp.h
+++ b/arch/s390/include/uapi/asm/vmcp.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* 2/*
2 * Copyright IBM Corp. 2004, 2005 3 * Copyright IBM Corp. 2004, 2005
3 * Interface implementation for communication with the z/VM control program 4 * Interface implementation for communication with the z/VM control program
diff --git a/arch/s390/kernel/alternative.c b/arch/s390/kernel/alternative.c
index 315986a06cf5..574e77622c04 100644
--- a/arch/s390/kernel/alternative.c
+++ b/arch/s390/kernel/alternative.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/module.h> 2#include <linux/module.h>
2#include <asm/alternative.h> 3#include <asm/alternative.h>
3#include <asm/facility.h> 4#include <asm/facility.h>
diff --git a/arch/s390/kernel/perf_regs.c b/arch/s390/kernel/perf_regs.c
index f8603ebed669..54e2d634b849 100644
--- a/arch/s390/kernel/perf_regs.c
+++ b/arch/s390/kernel/perf_regs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/perf_event.h> 2#include <linux/perf_event.h>
2#include <linux/perf_regs.h> 3#include <linux/perf_regs.h>
3#include <linux/kernel.h> 4#include <linux/kernel.h>
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 308a7b63348b..f7fc63385553 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -370,10 +370,10 @@ SYSCALL(sys_recvmmsg,compat_sys_recvmmsg)
370SYSCALL(sys_sendmmsg,compat_sys_sendmmsg) 370SYSCALL(sys_sendmmsg,compat_sys_sendmmsg)
371SYSCALL(sys_socket,sys_socket) 371SYSCALL(sys_socket,sys_socket)
372SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */ 372SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */
373SYSCALL(sys_bind,sys_bind) 373SYSCALL(sys_bind,compat_sys_bind)
374SYSCALL(sys_connect,sys_connect) 374SYSCALL(sys_connect,compat_sys_connect)
375SYSCALL(sys_listen,sys_listen) 375SYSCALL(sys_listen,sys_listen)
376SYSCALL(sys_accept4,sys_accept4) 376SYSCALL(sys_accept4,compat_sys_accept4)
377SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */ 377SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */
378SYSCALL(sys_setsockopt,compat_sys_setsockopt) 378SYSCALL(sys_setsockopt,compat_sys_setsockopt)
379SYSCALL(sys_getsockname,compat_sys_getsockname) 379SYSCALL(sys_getsockname,compat_sys_getsockname)
diff --git a/arch/s390/kernel/vdso64/note.S b/arch/s390/kernel/vdso64/note.S
index 79a071e4357e..db19d0680a0a 100644
--- a/arch/s390/kernel/vdso64/note.S
+++ b/arch/s390/kernel/vdso64/note.S
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text. 3 * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
3 * Here we can supply some information useful to userland. 4 * Here we can supply some information useful to userland.
diff --git a/arch/s390/kvm/Makefile b/arch/s390/kvm/Makefile
index 6048b1c6e580..05ee90a5ea08 100644
--- a/arch/s390/kvm/Makefile
+++ b/arch/s390/kvm/Makefile
@@ -1,10 +1,7 @@
1# SPDX-License-Identifier: GPL-2.0
1# Makefile for kernel virtual machines on s390 2# Makefile for kernel virtual machines on s390
2# 3#
3# Copyright IBM Corp. 2008 4# Copyright IBM Corp. 2008
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License (version 2 only)
7# as published by the Free Software Foundation.
8 5
9KVM := ../../../virt/kvm 6KVM := ../../../virt/kvm
10common-objs = $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/async_pf.o $(KVM)/irqchip.o $(KVM)/vfio.o 7common-objs = $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/async_pf.o $(KVM)/irqchip.o $(KVM)/vfio.o
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
index d93a2c0474bf..89aa114a2cba 100644
--- a/arch/s390/kvm/diag.c
+++ b/arch/s390/kvm/diag.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * handling diagnose instructions 3 * handling diagnose instructions
3 * 4 *
4 * Copyright IBM Corp. 2008, 2011 5 * Copyright IBM Corp. 2008, 2011
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * Christian Borntraeger <borntraeger@de.ibm.com>
12 */ 9 */
diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
index bec42b852246..f4c51756c462 100644
--- a/arch/s390/kvm/gaccess.h
+++ b/arch/s390/kvm/gaccess.h
@@ -1,12 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * access guest memory 3 * access guest memory
3 * 4 *
4 * Copyright IBM Corp. 2008, 2014 5 * Copyright IBM Corp. 2008, 2014
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 */ 8 */
12 9
diff --git a/arch/s390/kvm/guestdbg.c b/arch/s390/kvm/guestdbg.c
index bcbd86621d01..b5f3e82006d0 100644
--- a/arch/s390/kvm/guestdbg.c
+++ b/arch/s390/kvm/guestdbg.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * kvm guest debug support 3 * kvm guest debug support
3 * 4 *
4 * Copyright IBM Corp. 2014 5 * Copyright IBM Corp. 2014
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> 7 * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com>
11 */ 8 */
12#include <linux/kvm_host.h> 9#include <linux/kvm_host.h>
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index 8fe034beb623..9c7d70715862 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * in-kernel handling for sie intercepts 3 * in-kernel handling for sie intercepts
3 * 4 *
4 * Copyright IBM Corp. 2008, 2014 5 * Copyright IBM Corp. 2008, 2014
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * Christian Borntraeger <borntraeger@de.ibm.com>
12 */ 9 */
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index fa557372d600..024ad8bcc516 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * handling kvm guest interrupts 3 * handling kvm guest interrupts
3 * 4 *
4 * Copyright IBM Corp. 2008, 2015 5 * Copyright IBM Corp. 2008, 2015
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 */ 8 */
12 9
diff --git a/arch/s390/kvm/irq.h b/arch/s390/kvm/irq.h
index d98e4159643d..484608c71dd0 100644
--- a/arch/s390/kvm/irq.h
+++ b/arch/s390/kvm/irq.h
@@ -1,12 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * s390 irqchip routines 3 * s390 irqchip routines
3 * 4 *
4 * Copyright IBM Corp. 2014 5 * Copyright IBM Corp. 2014
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com> 7 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
11 */ 8 */
12#ifndef __KVM_IRQ_H 9#ifndef __KVM_IRQ_H
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 9614aea5839b..ec8b68e97d3c 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1,11 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * hosting zSeries kernel virtual machines 3 * hosting IBM Z kernel virtual machines (s390x)
3 * 4 *
4 * Copyright IBM Corp. 2008, 2009 5 * Copyright IBM Corp. 2008, 2017
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 * 6 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * Christian Borntraeger <borntraeger@de.ibm.com>
@@ -3808,6 +3805,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
3808 r = -EINVAL; 3805 r = -EINVAL;
3809 break; 3806 break;
3810 } 3807 }
3808 /* do not use irq_state.flags, it will break old QEMUs */
3811 r = kvm_s390_set_irq_state(vcpu, 3809 r = kvm_s390_set_irq_state(vcpu,
3812 (void __user *) irq_state.buf, 3810 (void __user *) irq_state.buf,
3813 irq_state.len); 3811 irq_state.len);
@@ -3823,6 +3821,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
3823 r = -EINVAL; 3821 r = -EINVAL;
3824 break; 3822 break;
3825 } 3823 }
3824 /* do not use irq_state.flags, it will break old QEMUs */
3826 r = kvm_s390_get_irq_state(vcpu, 3825 r = kvm_s390_get_irq_state(vcpu,
3827 (__u8 __user *) irq_state.buf, 3826 (__u8 __user *) irq_state.buf,
3828 irq_state.len); 3827 irq_state.len);
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
index 10d65dfbc306..5e46ba429bcb 100644
--- a/arch/s390/kvm/kvm-s390.h
+++ b/arch/s390/kvm/kvm-s390.h
@@ -1,12 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * definition for kvm on s390 3 * definition for kvm on s390
3 * 4 *
4 * Copyright IBM Corp. 2008, 2009 5 * Copyright IBM Corp. 2008, 2009
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * Christian Borntraeger <borntraeger@de.ibm.com>
12 * Christian Ehrhardt <ehrhardt@de.ibm.com> 9 * Christian Ehrhardt <ehrhardt@de.ibm.com>
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index c954ac49eee4..572496c688cc 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * handling privileged instructions 3 * handling privileged instructions
3 * 4 *
4 * Copyright IBM Corp. 2008, 2013 5 * Copyright IBM Corp. 2008, 2013
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * Christian Borntraeger <borntraeger@de.ibm.com>
12 */ 9 */
@@ -235,8 +232,6 @@ static int try_handle_skey(struct kvm_vcpu *vcpu)
235 VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation"); 232 VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation");
236 return -EAGAIN; 233 return -EAGAIN;
237 } 234 }
238 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
239 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
240 return 0; 235 return 0;
241} 236}
242 237
@@ -247,6 +242,9 @@ static int handle_iske(struct kvm_vcpu *vcpu)
247 int reg1, reg2; 242 int reg1, reg2;
248 int rc; 243 int rc;
249 244
245 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
246 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
247
250 rc = try_handle_skey(vcpu); 248 rc = try_handle_skey(vcpu);
251 if (rc) 249 if (rc)
252 return rc != -EAGAIN ? rc : 0; 250 return rc != -EAGAIN ? rc : 0;
@@ -276,6 +274,9 @@ static int handle_rrbe(struct kvm_vcpu *vcpu)
276 int reg1, reg2; 274 int reg1, reg2;
277 int rc; 275 int rc;
278 276
277 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
278 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
279
279 rc = try_handle_skey(vcpu); 280 rc = try_handle_skey(vcpu);
280 if (rc) 281 if (rc)
281 return rc != -EAGAIN ? rc : 0; 282 return rc != -EAGAIN ? rc : 0;
@@ -311,6 +312,9 @@ static int handle_sske(struct kvm_vcpu *vcpu)
311 int reg1, reg2; 312 int reg1, reg2;
312 int rc; 313 int rc;
313 314
315 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
316 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
317
314 rc = try_handle_skey(vcpu); 318 rc = try_handle_skey(vcpu);
315 if (rc) 319 if (rc)
316 return rc != -EAGAIN ? rc : 0; 320 return rc != -EAGAIN ? rc : 0;
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 9d592ef4104b..c1f5cde2c878 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * handling interprocessor communication 3 * handling interprocessor communication
3 * 4 *
4 * Copyright IBM Corp. 2008, 2013 5 * Copyright IBM Corp. 2008, 2013
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): Carsten Otte <cotte@de.ibm.com> 7 * Author(s): Carsten Otte <cotte@de.ibm.com>
11 * Christian Borntraeger <borntraeger@de.ibm.com> 8 * Christian Borntraeger <borntraeger@de.ibm.com>
12 * Christian Ehrhardt <ehrhardt@de.ibm.com> 9 * Christian Ehrhardt <ehrhardt@de.ibm.com>
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index a311938b63b3..5d6ae0326d9e 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -1,12 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * kvm nested virtualization support for s390x 3 * kvm nested virtualization support for s390x
3 * 4 *
4 * Copyright IBM Corp. 2016 5 * Copyright IBM Corp. 2016
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License (version 2 only)
8 * as published by the Free Software Foundation.
9 *
10 * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com> 7 * Author(s): David Hildenbrand <dahi@linux.vnet.ibm.com>
11 */ 8 */
12#include <linux/vmalloc.h> 9#include <linux/vmalloc.h>
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 434a9564917b..cb364153c43c 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -83,8 +83,6 @@ int crst_table_upgrade(struct mm_struct *mm, unsigned long end)
83 83
84 /* upgrade should only happen from 3 to 4, 3 to 5, or 4 to 5 levels */ 84 /* upgrade should only happen from 3 to 4, 3 to 5, or 4 to 5 levels */
85 VM_BUG_ON(mm->context.asce_limit < _REGION2_SIZE); 85 VM_BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
86 if (end >= TASK_SIZE_MAX)
87 return -ENOMEM;
88 rc = 0; 86 rc = 0;
89 notify = 0; 87 notify = 0;
90 while (mm->context.asce_limit < end) { 88 while (mm->context.asce_limit < end) {
diff --git a/arch/s390/net/Makefile b/arch/s390/net/Makefile
index 90568c33ddb0..e0d5f245e42b 100644
--- a/arch/s390/net/Makefile
+++ b/arch/s390/net/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Arch-specific network modules 3# Arch-specific network modules
3# 4#
diff --git a/arch/s390/numa/Makefile b/arch/s390/numa/Makefile
index f94ecaffa71b..66c2dff74895 100644
--- a/arch/s390/numa/Makefile
+++ b/arch/s390/numa/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1obj-y += numa.o 2obj-y += numa.o
2obj-y += toptree.o 3obj-y += toptree.o
3obj-$(CONFIG_NUMA_EMU) += mode_emu.o 4obj-$(CONFIG_NUMA_EMU) += mode_emu.o
diff --git a/arch/s390/pci/Makefile b/arch/s390/pci/Makefile
index 805d8b29193a..22d0871291ee 100644
--- a/arch/s390/pci/Makefile
+++ b/arch/s390/pci/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Makefile for the s390 PCI subsystem. 3# Makefile for the s390 PCI subsystem.
3# 4#
diff --git a/arch/s390/tools/gen_opcode_table.c b/arch/s390/tools/gen_opcode_table.c
index 01d4c5a4bfe9..357d42681cef 100644
--- a/arch/s390/tools/gen_opcode_table.c
+++ b/arch/s390/tools/gen_opcode_table.c
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* 2/*
2 * Generate opcode table initializers for the in-kernel disassembler. 3 * Generate opcode table initializers for the in-kernel disassembler.
3 * 4 *
diff --git a/arch/score/include/uapi/asm/Kbuild b/arch/score/include/uapi/asm/Kbuild
index c94ee54210bc..81271d3af47c 100644
--- a/arch/score/include/uapi/asm/Kbuild
+++ b/arch/score/include/uapi/asm/Kbuild
@@ -1,4 +1,5 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += siginfo.h 5generic-y += siginfo.h
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
index e28531333efa..ba4d39cb321d 100644
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bitsperlong.h 4generic-y += bitsperlong.h
5generic-y += bpf_perf_event.h
5generic-y += errno.h 6generic-y += errno.h
6generic-y += fcntl.h 7generic-y += fcntl.h
7generic-y += ioctl.h 8generic-y += ioctl.h
diff --git a/arch/sparc/include/uapi/asm/Kbuild b/arch/sparc/include/uapi/asm/Kbuild
index 2178c78c7c1a..4680ba246b55 100644
--- a/arch/sparc/include/uapi/asm/Kbuild
+++ b/arch/sparc/include/uapi/asm/Kbuild
@@ -1,4 +1,5 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += types.h 5generic-y += types.h
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild
index 5711de0a1b5e..cc439612bcd5 100644
--- a/arch/tile/include/uapi/asm/Kbuild
+++ b/arch/tile/include/uapi/asm/Kbuild
@@ -1,6 +1,7 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generic-y += errno.h 5generic-y += errno.h
5generic-y += fcntl.h 6generic-y += fcntl.h
6generic-y += ioctl.h 7generic-y += ioctl.h
diff --git a/arch/unicore32/include/uapi/asm/Kbuild b/arch/unicore32/include/uapi/asm/Kbuild
index 759a71411169..8611ef980554 100644
--- a/arch/unicore32/include/uapi/asm/Kbuild
+++ b/arch/unicore32/include/uapi/asm/Kbuild
@@ -3,6 +3,7 @@ include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += auxvec.h 4generic-y += auxvec.h
5generic-y += bitsperlong.h 5generic-y += bitsperlong.h
6generic-y += bpf_perf_event.h
6generic-y += errno.h 7generic-y += errno.h
7generic-y += fcntl.h 8generic-y += fcntl.h
8generic-y += ioctl.h 9generic-y += ioctl.h
diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c
index 11b13c4b43d5..f19856d95c60 100644
--- a/arch/x86/entry/vdso/vclock_gettime.c
+++ b/arch/x86/entry/vdso/vclock_gettime.c
@@ -324,5 +324,5 @@ notrace time_t __vdso_time(time_t *t)
324 *t = result; 324 *t = result;
325 return result; 325 return result;
326} 326}
327int time(time_t *t) 327time_t time(time_t *t)
328 __attribute__((weak, alias("__vdso_time"))); 328 __attribute__((weak, alias("__vdso_time")));
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index c0b0e9e8aa66..800104c8a3ed 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -266,6 +266,7 @@
266/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */ 266/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
267#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */ 267#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
268#define X86_FEATURE_IRPERF (13*32+ 1) /* Instructions Retired Count */ 268#define X86_FEATURE_IRPERF (13*32+ 1) /* Instructions Retired Count */
269#define X86_FEATURE_XSAVEERPTR (13*32+ 2) /* Always save/restore FP error pointers */
269 270
270/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */ 271/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
271#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */ 272#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */
diff --git a/arch/x86/include/asm/kmemcheck.h b/arch/x86/include/asm/kmemcheck.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/arch/x86/include/asm/kmemcheck.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 034caa1a084e..b24b1c8b3979 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -214,8 +214,6 @@ struct x86_emulate_ops {
214 void (*halt)(struct x86_emulate_ctxt *ctxt); 214 void (*halt)(struct x86_emulate_ctxt *ctxt);
215 void (*wbinvd)(struct x86_emulate_ctxt *ctxt); 215 void (*wbinvd)(struct x86_emulate_ctxt *ctxt);
216 int (*fix_hypercall)(struct x86_emulate_ctxt *ctxt); 216 int (*fix_hypercall)(struct x86_emulate_ctxt *ctxt);
217 void (*get_fpu)(struct x86_emulate_ctxt *ctxt); /* disables preempt */
218 void (*put_fpu)(struct x86_emulate_ctxt *ctxt); /* reenables preempt */
219 int (*intercept)(struct x86_emulate_ctxt *ctxt, 217 int (*intercept)(struct x86_emulate_ctxt *ctxt,
220 struct x86_instruction_info *info, 218 struct x86_instruction_info *info,
221 enum x86_intercept_stage stage); 219 enum x86_intercept_stage stage);
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 977de5fb968b..516798431328 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -536,7 +536,20 @@ struct kvm_vcpu_arch {
536 struct kvm_mmu_memory_cache mmu_page_cache; 536 struct kvm_mmu_memory_cache mmu_page_cache;
537 struct kvm_mmu_memory_cache mmu_page_header_cache; 537 struct kvm_mmu_memory_cache mmu_page_header_cache;
538 538
539 /*
540 * QEMU userspace and the guest each have their own FPU state.
541 * In vcpu_run, we switch between the user and guest FPU contexts.
542 * While running a VCPU, the VCPU thread will have the guest FPU
543 * context.
544 *
545 * Note that while the PKRU state lives inside the fpu registers,
546 * it is switched out separately at VMENTER and VMEXIT time. The
547 * "guest_fpu" state here contains the guest FPU context, with the
548 * host PRKU bits.
549 */
550 struct fpu user_fpu;
539 struct fpu guest_fpu; 551 struct fpu guest_fpu;
552
540 u64 xcr0; 553 u64 xcr0;
541 u64 guest_supported_xcr0; 554 u64 guest_supported_xcr0;
542 u32 guest_xstate_size; 555 u32 guest_xstate_size;
@@ -1435,4 +1448,7 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
1435#define put_smstate(type, buf, offset, val) \ 1448#define put_smstate(type, buf, offset, val) \
1436 *(type *)((buf) + (offset) - 0x7e00) = val 1449 *(type *)((buf) + (offset) - 0x7e00) = val
1437 1450
1451void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
1452 unsigned long start, unsigned long end);
1453
1438#endif /* _ASM_X86_KVM_HOST_H */ 1454#endif /* _ASM_X86_KVM_HOST_H */
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
index b20f9d623f9c..8f09012b92e7 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -236,11 +236,23 @@
236 */ 236 */
237#define EARLY_IDT_HANDLER_SIZE 9 237#define EARLY_IDT_HANDLER_SIZE 9
238 238
239/*
240 * xen_early_idt_handler_array is for Xen pv guests: for each entry in
241 * early_idt_handler_array it contains a prequel in the form of
242 * pop %rcx; pop %r11; jmp early_idt_handler_array[i]; summing up to
243 * max 8 bytes.
244 */
245#define XEN_EARLY_IDT_HANDLER_SIZE 8
246
239#ifndef __ASSEMBLY__ 247#ifndef __ASSEMBLY__
240 248
241extern const char early_idt_handler_array[NUM_EXCEPTION_VECTORS][EARLY_IDT_HANDLER_SIZE]; 249extern const char early_idt_handler_array[NUM_EXCEPTION_VECTORS][EARLY_IDT_HANDLER_SIZE];
242extern void early_ignore_irq(void); 250extern void early_ignore_irq(void);
243 251
252#if defined(CONFIG_X86_64) && defined(CONFIG_XEN_PV)
253extern const char xen_early_idt_handler_array[NUM_EXCEPTION_VECTORS][XEN_EARLY_IDT_HANDLER_SIZE];
254#endif
255
244/* 256/*
245 * Load a segment. Fall back on loading the zero segment if something goes 257 * Load a segment. Fall back on loading the zero segment if something goes
246 * wrong. This variant assumes that loading zero fully clears the segment. 258 * wrong. This variant assumes that loading zero fully clears the segment.
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 509046cfa5ce..877b5c1a1b12 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -173,40 +173,43 @@ static inline void cr4_init_shadow(void)
173 this_cpu_write(cpu_tlbstate.cr4, __read_cr4()); 173 this_cpu_write(cpu_tlbstate.cr4, __read_cr4());
174} 174}
175 175
176static inline void __cr4_set(unsigned long cr4)
177{
178 lockdep_assert_irqs_disabled();
179 this_cpu_write(cpu_tlbstate.cr4, cr4);
180 __write_cr4(cr4);
181}
182
176/* Set in this cpu's CR4. */ 183/* Set in this cpu's CR4. */
177static inline void cr4_set_bits(unsigned long mask) 184static inline void cr4_set_bits(unsigned long mask)
178{ 185{
179 unsigned long cr4; 186 unsigned long cr4, flags;
180 187
188 local_irq_save(flags);
181 cr4 = this_cpu_read(cpu_tlbstate.cr4); 189 cr4 = this_cpu_read(cpu_tlbstate.cr4);
182 if ((cr4 | mask) != cr4) { 190 if ((cr4 | mask) != cr4)
183 cr4 |= mask; 191 __cr4_set(cr4 | mask);
184 this_cpu_write(cpu_tlbstate.cr4, cr4); 192 local_irq_restore(flags);
185 __write_cr4(cr4);
186 }
187} 193}
188 194
189/* Clear in this cpu's CR4. */ 195/* Clear in this cpu's CR4. */
190static inline void cr4_clear_bits(unsigned long mask) 196static inline void cr4_clear_bits(unsigned long mask)
191{ 197{
192 unsigned long cr4; 198 unsigned long cr4, flags;
193 199
200 local_irq_save(flags);
194 cr4 = this_cpu_read(cpu_tlbstate.cr4); 201 cr4 = this_cpu_read(cpu_tlbstate.cr4);
195 if ((cr4 & ~mask) != cr4) { 202 if ((cr4 & ~mask) != cr4)
196 cr4 &= ~mask; 203 __cr4_set(cr4 & ~mask);
197 this_cpu_write(cpu_tlbstate.cr4, cr4); 204 local_irq_restore(flags);
198 __write_cr4(cr4);
199 }
200} 205}
201 206
202static inline void cr4_toggle_bits(unsigned long mask) 207static inline void cr4_toggle_bits_irqsoff(unsigned long mask)
203{ 208{
204 unsigned long cr4; 209 unsigned long cr4;
205 210
206 cr4 = this_cpu_read(cpu_tlbstate.cr4); 211 cr4 = this_cpu_read(cpu_tlbstate.cr4);
207 cr4 ^= mask; 212 __cr4_set(cr4 ^ mask);
208 this_cpu_write(cpu_tlbstate.cr4, cr4);
209 __write_cr4(cr4);
210} 213}
211 214
212/* Read the CR4 shadow. */ 215/* Read the CR4 shadow. */
diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
index da1489cb64dc..1e901e421f2d 100644
--- a/arch/x86/include/uapi/asm/Kbuild
+++ b/arch/x86/include/uapi/asm/Kbuild
@@ -1,6 +1,7 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bpf_perf_event.h
4generated-y += unistd_32.h 5generated-y += unistd_32.h
5generated-y += unistd_64.h 6generated-y += unistd_64.h
6generated-y += unistd_x32.h 7generated-y += unistd_x32.h
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 6a823a25eaff..750449152b04 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -542,8 +542,8 @@ error:
542} 542}
543 543
544#ifdef CONFIG_GENERIC_IRQ_DEBUGFS 544#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
545void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d, 545static void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d,
546 struct irq_data *irqd, int ind) 546 struct irq_data *irqd, int ind)
547{ 547{
548 unsigned int cpu, vector, prev_cpu, prev_vector; 548 unsigned int cpu, vector, prev_cpu, prev_vector;
549 struct apic_chip_data *apicd; 549 struct apic_chip_data *apicd;
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index d58184b7cd44..bcb75dc97d44 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -804,8 +804,11 @@ static void init_amd(struct cpuinfo_x86 *c)
804 case 0x17: init_amd_zn(c); break; 804 case 0x17: init_amd_zn(c); break;
805 } 805 }
806 806
807 /* Enable workaround for FXSAVE leak */ 807 /*
808 if (c->x86 >= 6) 808 * Enable workaround for FXSAVE leak on CPUs
809 * without a XSaveErPtr feature
810 */
811 if ((c->x86 >= 6) && (!cpu_has(c, X86_FEATURE_XSAVEERPTR)))
809 set_cpu_bug(c, X86_BUG_FXSAVE_LEAK); 812 set_cpu_bug(c, X86_BUG_FXSAVE_LEAK);
810 813
811 cpu_detect_cache_sizes(c); 814 cpu_detect_cache_sizes(c);
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index c6daec4bdba5..330b8462d426 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -470,6 +470,7 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
470#define F14H_MPB_MAX_SIZE 1824 470#define F14H_MPB_MAX_SIZE 1824
471#define F15H_MPB_MAX_SIZE 4096 471#define F15H_MPB_MAX_SIZE 4096
472#define F16H_MPB_MAX_SIZE 3458 472#define F16H_MPB_MAX_SIZE 3458
473#define F17H_MPB_MAX_SIZE 3200
473 474
474 switch (family) { 475 switch (family) {
475 case 0x14: 476 case 0x14:
@@ -481,6 +482,9 @@ static unsigned int verify_patch_size(u8 family, u32 patch_size,
481 case 0x16: 482 case 0x16:
482 max_size = F16H_MPB_MAX_SIZE; 483 max_size = F16H_MPB_MAX_SIZE;
483 break; 484 break;
485 case 0x17:
486 max_size = F17H_MPB_MAX_SIZE;
487 break;
484 default: 488 default:
485 max_size = F1XH_MPB_MAX_SIZE; 489 max_size = F1XH_MPB_MAX_SIZE;
486 break; 490 break;
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 97fb3e5737f5..bb988a24db92 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -299,7 +299,7 @@ void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
299 } 299 }
300 300
301 if ((tifp ^ tifn) & _TIF_NOTSC) 301 if ((tifp ^ tifn) & _TIF_NOTSC)
302 cr4_toggle_bits(X86_CR4_TSD); 302 cr4_toggle_bits_irqsoff(X86_CR4_TSD);
303 303
304 if ((tifp ^ tifn) & _TIF_NOCPUID) 304 if ((tifp ^ tifn) & _TIF_NOCPUID)
305 set_cpuid_faulting(!!(tifn & _TIF_NOCPUID)); 305 set_cpuid_faulting(!!(tifn & _TIF_NOCPUID));
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 3d01df7d7cf6..05a97d5fe298 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -237,7 +237,7 @@ static void notrace start_secondary(void *unused)
237 load_cr3(swapper_pg_dir); 237 load_cr3(swapper_pg_dir);
238 __flush_tlb_all(); 238 __flush_tlb_all();
239#endif 239#endif
240 240 load_current_idt();
241 cpu_init(); 241 cpu_init();
242 x86_cpuinit.early_percpu_clock_init(); 242 x86_cpuinit.early_percpu_clock_init();
243 preempt_disable(); 243 preempt_disable();
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index e7d04d0c8008..abe74f779f9d 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1046,7 +1046,6 @@ static void fetch_register_operand(struct operand *op)
1046 1046
1047static void read_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, int reg) 1047static void read_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, int reg)
1048{ 1048{
1049 ctxt->ops->get_fpu(ctxt);
1050 switch (reg) { 1049 switch (reg) {
1051 case 0: asm("movdqa %%xmm0, %0" : "=m"(*data)); break; 1050 case 0: asm("movdqa %%xmm0, %0" : "=m"(*data)); break;
1052 case 1: asm("movdqa %%xmm1, %0" : "=m"(*data)); break; 1051 case 1: asm("movdqa %%xmm1, %0" : "=m"(*data)); break;
@@ -1068,13 +1067,11 @@ static void read_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, int reg)
1068#endif 1067#endif
1069 default: BUG(); 1068 default: BUG();
1070 } 1069 }
1071 ctxt->ops->put_fpu(ctxt);
1072} 1070}
1073 1071
1074static void write_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data, 1072static void write_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data,
1075 int reg) 1073 int reg)
1076{ 1074{
1077 ctxt->ops->get_fpu(ctxt);
1078 switch (reg) { 1075 switch (reg) {
1079 case 0: asm("movdqa %0, %%xmm0" : : "m"(*data)); break; 1076 case 0: asm("movdqa %0, %%xmm0" : : "m"(*data)); break;
1080 case 1: asm("movdqa %0, %%xmm1" : : "m"(*data)); break; 1077 case 1: asm("movdqa %0, %%xmm1" : : "m"(*data)); break;
@@ -1096,12 +1093,10 @@ static void write_sse_reg(struct x86_emulate_ctxt *ctxt, sse128_t *data,
1096#endif 1093#endif
1097 default: BUG(); 1094 default: BUG();
1098 } 1095 }
1099 ctxt->ops->put_fpu(ctxt);
1100} 1096}
1101 1097
1102static void read_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg) 1098static void read_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg)
1103{ 1099{
1104 ctxt->ops->get_fpu(ctxt);
1105 switch (reg) { 1100 switch (reg) {
1106 case 0: asm("movq %%mm0, %0" : "=m"(*data)); break; 1101 case 0: asm("movq %%mm0, %0" : "=m"(*data)); break;
1107 case 1: asm("movq %%mm1, %0" : "=m"(*data)); break; 1102 case 1: asm("movq %%mm1, %0" : "=m"(*data)); break;
@@ -1113,12 +1108,10 @@ static void read_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg)
1113 case 7: asm("movq %%mm7, %0" : "=m"(*data)); break; 1108 case 7: asm("movq %%mm7, %0" : "=m"(*data)); break;
1114 default: BUG(); 1109 default: BUG();
1115 } 1110 }
1116 ctxt->ops->put_fpu(ctxt);
1117} 1111}
1118 1112
1119static void write_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg) 1113static void write_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg)
1120{ 1114{
1121 ctxt->ops->get_fpu(ctxt);
1122 switch (reg) { 1115 switch (reg) {
1123 case 0: asm("movq %0, %%mm0" : : "m"(*data)); break; 1116 case 0: asm("movq %0, %%mm0" : : "m"(*data)); break;
1124 case 1: asm("movq %0, %%mm1" : : "m"(*data)); break; 1117 case 1: asm("movq %0, %%mm1" : : "m"(*data)); break;
@@ -1130,7 +1123,6 @@ static void write_mmx_reg(struct x86_emulate_ctxt *ctxt, u64 *data, int reg)
1130 case 7: asm("movq %0, %%mm7" : : "m"(*data)); break; 1123 case 7: asm("movq %0, %%mm7" : : "m"(*data)); break;
1131 default: BUG(); 1124 default: BUG();
1132 } 1125 }
1133 ctxt->ops->put_fpu(ctxt);
1134} 1126}
1135 1127
1136static int em_fninit(struct x86_emulate_ctxt *ctxt) 1128static int em_fninit(struct x86_emulate_ctxt *ctxt)
@@ -1138,9 +1130,7 @@ static int em_fninit(struct x86_emulate_ctxt *ctxt)
1138 if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM)) 1130 if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM))
1139 return emulate_nm(ctxt); 1131 return emulate_nm(ctxt);
1140 1132
1141 ctxt->ops->get_fpu(ctxt);
1142 asm volatile("fninit"); 1133 asm volatile("fninit");
1143 ctxt->ops->put_fpu(ctxt);
1144 return X86EMUL_CONTINUE; 1134 return X86EMUL_CONTINUE;
1145} 1135}
1146 1136
@@ -1151,9 +1141,7 @@ static int em_fnstcw(struct x86_emulate_ctxt *ctxt)
1151 if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM)) 1141 if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM))
1152 return emulate_nm(ctxt); 1142 return emulate_nm(ctxt);
1153 1143
1154 ctxt->ops->get_fpu(ctxt);
1155 asm volatile("fnstcw %0": "+m"(fcw)); 1144 asm volatile("fnstcw %0": "+m"(fcw));
1156 ctxt->ops->put_fpu(ctxt);
1157 1145
1158 ctxt->dst.val = fcw; 1146 ctxt->dst.val = fcw;
1159 1147
@@ -1167,9 +1155,7 @@ static int em_fnstsw(struct x86_emulate_ctxt *ctxt)
1167 if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM)) 1155 if (ctxt->ops->get_cr(ctxt, 0) & (X86_CR0_TS | X86_CR0_EM))
1168 return emulate_nm(ctxt); 1156 return emulate_nm(ctxt);
1169 1157
1170 ctxt->ops->get_fpu(ctxt);
1171 asm volatile("fnstsw %0": "+m"(fsw)); 1158 asm volatile("fnstsw %0": "+m"(fsw));
1172 ctxt->ops->put_fpu(ctxt);
1173 1159
1174 ctxt->dst.val = fsw; 1160 ctxt->dst.val = fsw;
1175 1161
@@ -4001,12 +3987,8 @@ static int em_fxsave(struct x86_emulate_ctxt *ctxt)
4001 if (rc != X86EMUL_CONTINUE) 3987 if (rc != X86EMUL_CONTINUE)
4002 return rc; 3988 return rc;
4003 3989
4004 ctxt->ops->get_fpu(ctxt);
4005
4006 rc = asm_safe("fxsave %[fx]", , [fx] "+m"(fx_state)); 3990 rc = asm_safe("fxsave %[fx]", , [fx] "+m"(fx_state));
4007 3991
4008 ctxt->ops->put_fpu(ctxt);
4009
4010 if (rc != X86EMUL_CONTINUE) 3992 if (rc != X86EMUL_CONTINUE)
4011 return rc; 3993 return rc;
4012 3994
@@ -4049,8 +4031,6 @@ static int em_fxrstor(struct x86_emulate_ctxt *ctxt)
4049 if (rc != X86EMUL_CONTINUE) 4031 if (rc != X86EMUL_CONTINUE)
4050 return rc; 4032 return rc;
4051 4033
4052 ctxt->ops->get_fpu(ctxt);
4053
4054 if (size < __fxstate_size(16)) { 4034 if (size < __fxstate_size(16)) {
4055 rc = fxregs_fixup(&fx_state, size); 4035 rc = fxregs_fixup(&fx_state, size);
4056 if (rc != X86EMUL_CONTINUE) 4036 if (rc != X86EMUL_CONTINUE)
@@ -4066,8 +4046,6 @@ static int em_fxrstor(struct x86_emulate_ctxt *ctxt)
4066 rc = asm_safe("fxrstor %[fx]", : [fx] "m"(fx_state)); 4046 rc = asm_safe("fxrstor %[fx]", : [fx] "m"(fx_state));
4067 4047
4068out: 4048out:
4069 ctxt->ops->put_fpu(ctxt);
4070
4071 return rc; 4049 return rc;
4072} 4050}
4073 4051
@@ -5317,9 +5295,7 @@ static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt)
5317{ 5295{
5318 int rc; 5296 int rc;
5319 5297
5320 ctxt->ops->get_fpu(ctxt);
5321 rc = asm_safe("fwait"); 5298 rc = asm_safe("fwait");
5322 ctxt->ops->put_fpu(ctxt);
5323 5299
5324 if (unlikely(rc != X86EMUL_CONTINUE)) 5300 if (unlikely(rc != X86EMUL_CONTINUE))
5325 return emulate_exception(ctxt, MF_VECTOR, 0, false); 5301 return emulate_exception(ctxt, MF_VECTOR, 0, false);
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4704aaf6d19e..8eba631c4dbd 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6751,16 +6751,10 @@ static __init int hardware_setup(void)
6751 goto out; 6751 goto out;
6752 } 6752 }
6753 6753
6754 vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
6755 memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE); 6754 memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
6756 memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE); 6755 memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
6757 6756
6758 /*
6759 * Allow direct access to the PC debug port (it is often used for I/O
6760 * delays, but the vmexits simply slow things down).
6761 */
6762 memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE); 6757 memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
6763 clear_bit(0x80, vmx_io_bitmap_a);
6764 6758
6765 memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE); 6759 memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
6766 6760
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index eee8e7faf1af..faf843c9b916 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2937,7 +2937,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
2937 srcu_read_unlock(&vcpu->kvm->srcu, idx); 2937 srcu_read_unlock(&vcpu->kvm->srcu, idx);
2938 pagefault_enable(); 2938 pagefault_enable();
2939 kvm_x86_ops->vcpu_put(vcpu); 2939 kvm_x86_ops->vcpu_put(vcpu);
2940 kvm_put_guest_fpu(vcpu);
2941 vcpu->arch.last_host_tsc = rdtsc(); 2940 vcpu->arch.last_host_tsc = rdtsc();
2942} 2941}
2943 2942
@@ -5252,17 +5251,6 @@ static void emulator_halt(struct x86_emulate_ctxt *ctxt)
5252 emul_to_vcpu(ctxt)->arch.halt_request = 1; 5251 emul_to_vcpu(ctxt)->arch.halt_request = 1;
5253} 5252}
5254 5253
5255static void emulator_get_fpu(struct x86_emulate_ctxt *ctxt)
5256{
5257 preempt_disable();
5258 kvm_load_guest_fpu(emul_to_vcpu(ctxt));
5259}
5260
5261static void emulator_put_fpu(struct x86_emulate_ctxt *ctxt)
5262{
5263 preempt_enable();
5264}
5265
5266static int emulator_intercept(struct x86_emulate_ctxt *ctxt, 5254static int emulator_intercept(struct x86_emulate_ctxt *ctxt,
5267 struct x86_instruction_info *info, 5255 struct x86_instruction_info *info,
5268 enum x86_intercept_stage stage) 5256 enum x86_intercept_stage stage)
@@ -5340,8 +5328,6 @@ static const struct x86_emulate_ops emulate_ops = {
5340 .halt = emulator_halt, 5328 .halt = emulator_halt,
5341 .wbinvd = emulator_wbinvd, 5329 .wbinvd = emulator_wbinvd,
5342 .fix_hypercall = emulator_fix_hypercall, 5330 .fix_hypercall = emulator_fix_hypercall,
5343 .get_fpu = emulator_get_fpu,
5344 .put_fpu = emulator_put_fpu,
5345 .intercept = emulator_intercept, 5331 .intercept = emulator_intercept,
5346 .get_cpuid = emulator_get_cpuid, 5332 .get_cpuid = emulator_get_cpuid,
5347 .set_nmi_mask = emulator_set_nmi_mask, 5333 .set_nmi_mask = emulator_set_nmi_mask,
@@ -6778,6 +6764,20 @@ static void kvm_vcpu_flush_tlb(struct kvm_vcpu *vcpu)
6778 kvm_x86_ops->tlb_flush(vcpu); 6764 kvm_x86_ops->tlb_flush(vcpu);
6779} 6765}
6780 6766
6767void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
6768 unsigned long start, unsigned long end)
6769{
6770 unsigned long apic_address;
6771
6772 /*
6773 * The physical address of apic access page is stored in the VMCS.
6774 * Update it when it becomes invalid.
6775 */
6776 apic_address = gfn_to_hva(kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
6777 if (start <= apic_address && apic_address < end)
6778 kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
6779}
6780
6781void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu) 6781void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
6782{ 6782{
6783 struct page *page = NULL; 6783 struct page *page = NULL;
@@ -6952,7 +6952,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
6952 preempt_disable(); 6952 preempt_disable();
6953 6953
6954 kvm_x86_ops->prepare_guest_switch(vcpu); 6954 kvm_x86_ops->prepare_guest_switch(vcpu);
6955 kvm_load_guest_fpu(vcpu);
6956 6955
6957 /* 6956 /*
6958 * Disable IRQs before setting IN_GUEST_MODE. Posted interrupt 6957 * Disable IRQs before setting IN_GUEST_MODE. Posted interrupt
@@ -7297,12 +7296,14 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
7297 } 7296 }
7298 } 7297 }
7299 7298
7299 kvm_load_guest_fpu(vcpu);
7300
7300 if (unlikely(vcpu->arch.complete_userspace_io)) { 7301 if (unlikely(vcpu->arch.complete_userspace_io)) {
7301 int (*cui)(struct kvm_vcpu *) = vcpu->arch.complete_userspace_io; 7302 int (*cui)(struct kvm_vcpu *) = vcpu->arch.complete_userspace_io;
7302 vcpu->arch.complete_userspace_io = NULL; 7303 vcpu->arch.complete_userspace_io = NULL;
7303 r = cui(vcpu); 7304 r = cui(vcpu);
7304 if (r <= 0) 7305 if (r <= 0)
7305 goto out; 7306 goto out_fpu;
7306 } else 7307 } else
7307 WARN_ON(vcpu->arch.pio.count || vcpu->mmio_needed); 7308 WARN_ON(vcpu->arch.pio.count || vcpu->mmio_needed);
7308 7309
@@ -7311,6 +7312,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
7311 else 7312 else
7312 r = vcpu_run(vcpu); 7313 r = vcpu_run(vcpu);
7313 7314
7315out_fpu:
7316 kvm_put_guest_fpu(vcpu);
7314out: 7317out:
7315 post_kvm_run_save(vcpu); 7318 post_kvm_run_save(vcpu);
7316 kvm_sigset_deactivate(vcpu); 7319 kvm_sigset_deactivate(vcpu);
@@ -7704,32 +7707,25 @@ static void fx_init(struct kvm_vcpu *vcpu)
7704 vcpu->arch.cr0 |= X86_CR0_ET; 7707 vcpu->arch.cr0 |= X86_CR0_ET;
7705} 7708}
7706 7709
7710/* Swap (qemu) user FPU context for the guest FPU context. */
7707void kvm_load_guest_fpu(struct kvm_vcpu *vcpu) 7711void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
7708{ 7712{
7709 if (vcpu->guest_fpu_loaded) 7713 preempt_disable();
7710 return; 7714 copy_fpregs_to_fpstate(&vcpu->arch.user_fpu);
7711
7712 /*
7713 * Restore all possible states in the guest,
7714 * and assume host would use all available bits.
7715 * Guest xcr0 would be loaded later.
7716 */
7717 vcpu->guest_fpu_loaded = 1;
7718 __kernel_fpu_begin();
7719 /* PKRU is separately restored in kvm_x86_ops->run. */ 7715 /* PKRU is separately restored in kvm_x86_ops->run. */
7720 __copy_kernel_to_fpregs(&vcpu->arch.guest_fpu.state, 7716 __copy_kernel_to_fpregs(&vcpu->arch.guest_fpu.state,
7721 ~XFEATURE_MASK_PKRU); 7717 ~XFEATURE_MASK_PKRU);
7718 preempt_enable();
7722 trace_kvm_fpu(1); 7719 trace_kvm_fpu(1);
7723} 7720}
7724 7721
7722/* When vcpu_run ends, restore user space FPU context. */
7725void kvm_put_guest_fpu(struct kvm_vcpu *vcpu) 7723void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
7726{ 7724{
7727 if (!vcpu->guest_fpu_loaded) 7725 preempt_disable();
7728 return;
7729
7730 vcpu->guest_fpu_loaded = 0;
7731 copy_fpregs_to_fpstate(&vcpu->arch.guest_fpu); 7726 copy_fpregs_to_fpstate(&vcpu->arch.guest_fpu);
7732 __kernel_fpu_end(); 7727 copy_kernel_to_fpregs(&vcpu->arch.user_fpu.state);
7728 preempt_enable();
7733 ++vcpu->stat.fpu_reload; 7729 ++vcpu->stat.fpu_reload;
7734 trace_kvm_fpu(0); 7730 trace_kvm_fpu(0);
7735} 7731}
@@ -7846,7 +7842,8 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
7846 * To avoid have the INIT path from kvm_apic_has_events() that be 7842 * To avoid have the INIT path from kvm_apic_has_events() that be
7847 * called with loaded FPU and does not let userspace fix the state. 7843 * called with loaded FPU and does not let userspace fix the state.
7848 */ 7844 */
7849 kvm_put_guest_fpu(vcpu); 7845 if (init_event)
7846 kvm_put_guest_fpu(vcpu);
7850 mpx_state_buffer = get_xsave_addr(&vcpu->arch.guest_fpu.state.xsave, 7847 mpx_state_buffer = get_xsave_addr(&vcpu->arch.guest_fpu.state.xsave,
7851 XFEATURE_MASK_BNDREGS); 7848 XFEATURE_MASK_BNDREGS);
7852 if (mpx_state_buffer) 7849 if (mpx_state_buffer)
@@ -7855,6 +7852,8 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
7855 XFEATURE_MASK_BNDCSR); 7852 XFEATURE_MASK_BNDCSR);
7856 if (mpx_state_buffer) 7853 if (mpx_state_buffer)
7857 memset(mpx_state_buffer, 0, sizeof(struct mpx_bndcsr)); 7854 memset(mpx_state_buffer, 0, sizeof(struct mpx_bndcsr));
7855 if (init_event)
7856 kvm_load_guest_fpu(vcpu);
7858 } 7857 }
7859 7858
7860 if (!init_event) { 7859 if (!init_event) {
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 3321b446b66c..9fe656c42aa5 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -1,6 +1,7 @@
1#include <linux/extable.h> 1#include <linux/extable.h>
2#include <linux/uaccess.h> 2#include <linux/uaccess.h>
3#include <linux/sched/debug.h> 3#include <linux/sched/debug.h>
4#include <xen/xen.h>
4 5
5#include <asm/fpu/internal.h> 6#include <asm/fpu/internal.h>
6#include <asm/traps.h> 7#include <asm/traps.h>
@@ -82,7 +83,7 @@ bool ex_handler_refcount(const struct exception_table_entry *fixup,
82 83
83 return true; 84 return true;
84} 85}
85EXPORT_SYMBOL_GPL(ex_handler_refcount); 86EXPORT_SYMBOL(ex_handler_refcount);
86 87
87/* 88/*
88 * Handler for when we fail to restore a task's FPU state. We should never get 89 * Handler for when we fail to restore a task's FPU state. We should never get
@@ -212,8 +213,9 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
212 * Old CPUs leave the high bits of CS on the stack 213 * Old CPUs leave the high bits of CS on the stack
213 * undefined. I'm not sure which CPUs do this, but at least 214 * undefined. I'm not sure which CPUs do this, but at least
214 * the 486 DX works this way. 215 * the 486 DX works this way.
216 * Xen pv domains are not using the default __KERNEL_CS.
215 */ 217 */
216 if (regs->cs != __KERNEL_CS) 218 if (!xen_pv_domain() && regs->cs != __KERNEL_CS)
217 goto fail; 219 goto fail;
218 220
219 /* 221 /*
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 78ca9a8ee454..febf6980e653 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -701,7 +701,7 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
701 else 701 else
702 printk(KERN_CONT "paging request"); 702 printk(KERN_CONT "paging request");
703 703
704 printk(KERN_CONT " at %p\n", (void *) address); 704 printk(KERN_CONT " at %px\n", (void *) address);
705 printk(KERN_ALERT "IP: %pS\n", (void *)regs->ip); 705 printk(KERN_ALERT "IP: %pS\n", (void *)regs->ip);
706 706
707 dump_pagetable(address); 707 dump_pagetable(address);
diff --git a/arch/x86/mm/kmemcheck/error.c b/arch/x86/mm/kmemcheck/error.c
deleted file mode 100644
index cec594032515..000000000000
--- a/arch/x86/mm/kmemcheck/error.c
+++ /dev/null
@@ -1 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
diff --git a/arch/x86/mm/kmemcheck/error.h b/arch/x86/mm/kmemcheck/error.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/arch/x86/mm/kmemcheck/error.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/arch/x86/mm/kmemcheck/opcode.c b/arch/x86/mm/kmemcheck/opcode.c
deleted file mode 100644
index cec594032515..000000000000
--- a/arch/x86/mm/kmemcheck/opcode.c
+++ /dev/null
@@ -1 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
diff --git a/arch/x86/mm/kmemcheck/opcode.h b/arch/x86/mm/kmemcheck/opcode.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/arch/x86/mm/kmemcheck/opcode.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/arch/x86/mm/kmemcheck/pte.c b/arch/x86/mm/kmemcheck/pte.c
deleted file mode 100644
index cec594032515..000000000000
--- a/arch/x86/mm/kmemcheck/pte.c
+++ /dev/null
@@ -1 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
diff --git a/arch/x86/mm/kmemcheck/pte.h b/arch/x86/mm/kmemcheck/pte.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/arch/x86/mm/kmemcheck/pte.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/arch/x86/mm/kmemcheck/selftest.c b/arch/x86/mm/kmemcheck/selftest.c
deleted file mode 100644
index cec594032515..000000000000
--- a/arch/x86/mm/kmemcheck/selftest.c
+++ /dev/null
@@ -1 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
diff --git a/arch/x86/mm/kmemcheck/selftest.h b/arch/x86/mm/kmemcheck/selftest.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/arch/x86/mm/kmemcheck/selftest.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/arch/x86/mm/kmemcheck/shadow.h b/arch/x86/mm/kmemcheck/shadow.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/arch/x86/mm/kmemcheck/shadow.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/arch/x86/pci/broadcom_bus.c b/arch/x86/pci/broadcom_bus.c
index bb461cfd01ab..526536c81ddc 100644
--- a/arch/x86/pci/broadcom_bus.c
+++ b/arch/x86/pci/broadcom_bus.c
@@ -97,7 +97,7 @@ static int __init broadcom_postcore_init(void)
97 * We should get host bridge information from ACPI unless the BIOS 97 * We should get host bridge information from ACPI unless the BIOS
98 * doesn't support it. 98 * doesn't support it.
99 */ 99 */
100 if (acpi_os_get_root_pointer()) 100 if (!acpi_disabled && acpi_os_get_root_pointer())
101 return 0; 101 return 0;
102#endif 102#endif
103 103
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index c34bd8233f7c..5f64f30873e2 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -905,7 +905,7 @@ static inline void uv_call_kgdb_kdb(int cpu, struct pt_regs *regs, int master)
905/* 905/*
906 * UV NMI handler 906 * UV NMI handler
907 */ 907 */
908int uv_handle_nmi(unsigned int reason, struct pt_regs *regs) 908static int uv_handle_nmi(unsigned int reason, struct pt_regs *regs)
909{ 909{
910 struct uv_hub_nmi_s *hub_nmi = uv_hub_nmi; 910 struct uv_hub_nmi_s *hub_nmi = uv_hub_nmi;
911 int cpu = smp_processor_id(); 911 int cpu = smp_processor_id();
@@ -1013,7 +1013,7 @@ void uv_nmi_init(void)
1013} 1013}
1014 1014
1015/* Setup HUB NMI info */ 1015/* Setup HUB NMI info */
1016void __init uv_nmi_setup_common(bool hubbed) 1016static void __init uv_nmi_setup_common(bool hubbed)
1017{ 1017{
1018 int size = sizeof(void *) * (1 << NODES_SHIFT); 1018 int size = sizeof(void *) * (1 << NODES_SHIFT);
1019 int cpu; 1019 int cpu;
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 84fcfde53f8f..5191de14f4df 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -226,8 +226,20 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
226 load_idt((const struct desc_ptr *)&ctxt->idt_limit); 226 load_idt((const struct desc_ptr *)&ctxt->idt_limit);
227#endif 227#endif
228 228
229#ifdef CONFIG_X86_64
229 /* 230 /*
230 * segment registers 231 * We need GSBASE restored before percpu access can work.
232 * percpu access can happen in exception handlers or in complicated
233 * helpers like load_gs_index().
234 */
235 wrmsrl(MSR_GS_BASE, ctxt->gs_base);
236#endif
237
238 fix_processor_context();
239
240 /*
241 * Restore segment registers. This happens after restoring the GDT
242 * and LDT, which happen in fix_processor_context().
231 */ 243 */
232#ifdef CONFIG_X86_32 244#ifdef CONFIG_X86_32
233 loadsegment(es, ctxt->es); 245 loadsegment(es, ctxt->es);
@@ -248,13 +260,14 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
248 load_gs_index(ctxt->gs); 260 load_gs_index(ctxt->gs);
249 asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss)); 261 asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss));
250 262
263 /*
264 * Restore FSBASE and user GSBASE after reloading the respective
265 * segment selectors.
266 */
251 wrmsrl(MSR_FS_BASE, ctxt->fs_base); 267 wrmsrl(MSR_FS_BASE, ctxt->fs_base);
252 wrmsrl(MSR_GS_BASE, ctxt->gs_base);
253 wrmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base); 268 wrmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base);
254#endif 269#endif
255 270
256 fix_processor_context();
257
258 do_fpu_end(); 271 do_fpu_end();
259 tsc_verify_tsc_adjust(true); 272 tsc_verify_tsc_adjust(true);
260 x86_platform.restore_sched_clock_state(); 273 x86_platform.restore_sched_clock_state();
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index 5b2b3f3f6531..f2414c6c5e7c 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -622,7 +622,7 @@ static struct trap_array_entry trap_array[] = {
622 { simd_coprocessor_error, xen_simd_coprocessor_error, false }, 622 { simd_coprocessor_error, xen_simd_coprocessor_error, false },
623}; 623};
624 624
625static bool get_trap_addr(void **addr, unsigned int ist) 625static bool __ref get_trap_addr(void **addr, unsigned int ist)
626{ 626{
627 unsigned int nr; 627 unsigned int nr;
628 bool ist_okay = false; 628 bool ist_okay = false;
@@ -644,6 +644,14 @@ static bool get_trap_addr(void **addr, unsigned int ist)
644 } 644 }
645 } 645 }
646 646
647 if (nr == ARRAY_SIZE(trap_array) &&
648 *addr >= (void *)early_idt_handler_array[0] &&
649 *addr < (void *)early_idt_handler_array[NUM_EXCEPTION_VECTORS]) {
650 nr = (*addr - (void *)early_idt_handler_array[0]) /
651 EARLY_IDT_HANDLER_SIZE;
652 *addr = (void *)xen_early_idt_handler_array[nr];
653 }
654
647 if (WARN_ON(ist != 0 && !ist_okay)) 655 if (WARN_ON(ist != 0 && !ist_okay))
648 return false; 656 return false;
649 657
@@ -1262,6 +1270,21 @@ asmlinkage __visible void __init xen_start_kernel(void)
1262 xen_setup_gdt(0); 1270 xen_setup_gdt(0);
1263 1271
1264 xen_init_irq_ops(); 1272 xen_init_irq_ops();
1273
1274 /* Let's presume PV guests always boot on vCPU with id 0. */
1275 per_cpu(xen_vcpu_id, 0) = 0;
1276
1277 /*
1278 * Setup xen_vcpu early because idt_setup_early_handler needs it for
1279 * local_irq_disable(), irqs_disabled().
1280 *
1281 * Don't do the full vcpu_info placement stuff until we have
1282 * the cpu_possible_mask and a non-dummy shared_info.
1283 */
1284 xen_vcpu_info_reset(0);
1285
1286 idt_setup_early_handler();
1287
1265 xen_init_capabilities(); 1288 xen_init_capabilities();
1266 1289
1267#ifdef CONFIG_X86_LOCAL_APIC 1290#ifdef CONFIG_X86_LOCAL_APIC
@@ -1295,18 +1318,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
1295 */ 1318 */
1296 acpi_numa = -1; 1319 acpi_numa = -1;
1297#endif 1320#endif
1298 /* Let's presume PV guests always boot on vCPU with id 0. */
1299 per_cpu(xen_vcpu_id, 0) = 0;
1300
1301 /*
1302 * Setup xen_vcpu early because start_kernel needs it for
1303 * local_irq_disable(), irqs_disabled().
1304 *
1305 * Don't do the full vcpu_info placement stuff until we have
1306 * the cpu_possible_mask and a non-dummy shared_info.
1307 */
1308 xen_vcpu_info_reset(0);
1309
1310 WARN_ON(xen_cpuhp_setup(xen_cpu_up_prepare_pv, xen_cpu_dead_pv)); 1321 WARN_ON(xen_cpuhp_setup(xen_cpu_up_prepare_pv, xen_cpu_dead_pv));
1311 1322
1312 local_irq_disable(); 1323 local_irq_disable();
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S
index 8a10c9a9e2b5..417b339e5c8e 100644
--- a/arch/x86/xen/xen-asm_64.S
+++ b/arch/x86/xen/xen-asm_64.S
@@ -15,6 +15,7 @@
15 15
16#include <xen/interface/xen.h> 16#include <xen/interface/xen.h>
17 17
18#include <linux/init.h>
18#include <linux/linkage.h> 19#include <linux/linkage.h>
19 20
20.macro xen_pv_trap name 21.macro xen_pv_trap name
@@ -54,6 +55,19 @@ xen_pv_trap entry_INT80_compat
54#endif 55#endif
55xen_pv_trap hypervisor_callback 56xen_pv_trap hypervisor_callback
56 57
58 __INIT
59ENTRY(xen_early_idt_handler_array)
60 i = 0
61 .rept NUM_EXCEPTION_VECTORS
62 pop %rcx
63 pop %r11
64 jmp early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE
65 i = i + 1
66 .fill xen_early_idt_handler_array + i*XEN_EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc
67 .endr
68END(xen_early_idt_handler_array)
69 __FINIT
70
57hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32 71hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32
58/* 72/*
59 * Xen64 iret frame: 73 * Xen64 iret frame:
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
index a5bcdfb890f1..837d4dd76785 100644
--- a/arch/xtensa/include/uapi/asm/Kbuild
+++ b/arch/xtensa/include/uapi/asm/Kbuild
@@ -2,6 +2,7 @@
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4generic-y += bitsperlong.h 4generic-y += bitsperlong.h
5generic-y += bpf_perf_event.h
5generic-y += errno.h 6generic-y += errno.h
6generic-y += fcntl.h 7generic-y += fcntl.h
7generic-y += ioctl.h 8generic-y += ioctl.h
diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c
index c1ca1e86f5c4..a6dcaa659aa8 100644
--- a/crypto/asymmetric_keys/pkcs7_parser.c
+++ b/crypto/asymmetric_keys/pkcs7_parser.c
@@ -148,8 +148,10 @@ struct pkcs7_message *pkcs7_parse_message(const void *data, size_t datalen)
148 } 148 }
149 149
150 ret = pkcs7_check_authattrs(ctx->msg); 150 ret = pkcs7_check_authattrs(ctx->msg);
151 if (ret < 0) 151 if (ret < 0) {
152 msg = ERR_PTR(ret);
152 goto out; 153 goto out;
154 }
153 155
154 msg = ctx->msg; 156 msg = ctx->msg;
155 ctx->msg = NULL; 157 ctx->msg = NULL;
diff --git a/crypto/asymmetric_keys/pkcs7_trust.c b/crypto/asymmetric_keys/pkcs7_trust.c
index f6a009d88a33..1f4e25f10049 100644
--- a/crypto/asymmetric_keys/pkcs7_trust.c
+++ b/crypto/asymmetric_keys/pkcs7_trust.c
@@ -69,7 +69,7 @@ static int pkcs7_validate_trust_one(struct pkcs7_message *pkcs7,
69 /* Self-signed certificates form roots of their own, and if we 69 /* Self-signed certificates form roots of their own, and if we
70 * don't know them, then we can't accept them. 70 * don't know them, then we can't accept them.
71 */ 71 */
72 if (x509->next == x509) { 72 if (x509->signer == x509) {
73 kleave(" = -ENOKEY [unknown self-signed]"); 73 kleave(" = -ENOKEY [unknown self-signed]");
74 return -ENOKEY; 74 return -ENOKEY;
75 } 75 }
diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
index 2d93d9eccb4d..39e6de0c2761 100644
--- a/crypto/asymmetric_keys/pkcs7_verify.c
+++ b/crypto/asymmetric_keys/pkcs7_verify.c
@@ -59,11 +59,8 @@ static int pkcs7_digest(struct pkcs7_message *pkcs7,
59 desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; 59 desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP;
60 60
61 /* Digest the message [RFC2315 9.3] */ 61 /* Digest the message [RFC2315 9.3] */
62 ret = crypto_shash_init(desc); 62 ret = crypto_shash_digest(desc, pkcs7->data, pkcs7->data_len,
63 if (ret < 0) 63 sig->digest);
64 goto error;
65 ret = crypto_shash_finup(desc, pkcs7->data, pkcs7->data_len,
66 sig->digest);
67 if (ret < 0) 64 if (ret < 0)
68 goto error; 65 goto error;
69 pr_devel("MsgDigest = [%*ph]\n", 8, sig->digest); 66 pr_devel("MsgDigest = [%*ph]\n", 8, sig->digest);
@@ -150,7 +147,7 @@ static int pkcs7_find_key(struct pkcs7_message *pkcs7,
150 pr_devel("Sig %u: Found cert serial match X.509[%u]\n", 147 pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
151 sinfo->index, certix); 148 sinfo->index, certix);
152 149
153 if (x509->pub->pkey_algo != sinfo->sig->pkey_algo) { 150 if (strcmp(x509->pub->pkey_algo, sinfo->sig->pkey_algo) != 0) {
154 pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n", 151 pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
155 sinfo->index); 152 sinfo->index);
156 continue; 153 continue;
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index bc3035ef27a2..de996586762a 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -73,7 +73,7 @@ int public_key_verify_signature(const struct public_key *pkey,
73 char alg_name_buf[CRYPTO_MAX_ALG_NAME]; 73 char alg_name_buf[CRYPTO_MAX_ALG_NAME];
74 void *output; 74 void *output;
75 unsigned int outlen; 75 unsigned int outlen;
76 int ret = -ENOMEM; 76 int ret;
77 77
78 pr_devel("==>%s()\n", __func__); 78 pr_devel("==>%s()\n", __func__);
79 79
@@ -99,6 +99,7 @@ int public_key_verify_signature(const struct public_key *pkey,
99 if (IS_ERR(tfm)) 99 if (IS_ERR(tfm))
100 return PTR_ERR(tfm); 100 return PTR_ERR(tfm);
101 101
102 ret = -ENOMEM;
102 req = akcipher_request_alloc(tfm, GFP_KERNEL); 103 req = akcipher_request_alloc(tfm, GFP_KERNEL);
103 if (!req) 104 if (!req)
104 goto error_free_tfm; 105 goto error_free_tfm;
@@ -127,7 +128,7 @@ int public_key_verify_signature(const struct public_key *pkey,
127 * signature and returns that to us. 128 * signature and returns that to us.
128 */ 129 */
129 ret = crypto_wait_req(crypto_akcipher_verify(req), &cwait); 130 ret = crypto_wait_req(crypto_akcipher_verify(req), &cwait);
130 if (ret < 0) 131 if (ret)
131 goto out_free_output; 132 goto out_free_output;
132 133
133 /* Do the actual verification step. */ 134 /* Do the actual verification step. */
@@ -142,6 +143,8 @@ error_free_req:
142error_free_tfm: 143error_free_tfm:
143 crypto_free_akcipher(tfm); 144 crypto_free_akcipher(tfm);
144 pr_devel("<==%s() = %d\n", __func__, ret); 145 pr_devel("<==%s() = %d\n", __func__, ret);
146 if (WARN_ON_ONCE(ret > 0))
147 ret = -EINVAL;
145 return ret; 148 return ret;
146} 149}
147EXPORT_SYMBOL_GPL(public_key_verify_signature); 150EXPORT_SYMBOL_GPL(public_key_verify_signature);
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c
index dd03fead1ca3..ce2df8c9c583 100644
--- a/crypto/asymmetric_keys/x509_cert_parser.c
+++ b/crypto/asymmetric_keys/x509_cert_parser.c
@@ -409,6 +409,8 @@ int x509_extract_key_data(void *context, size_t hdrlen,
409 ctx->cert->pub->pkey_algo = "rsa"; 409 ctx->cert->pub->pkey_algo = "rsa";
410 410
411 /* Discard the BIT STRING metadata */ 411 /* Discard the BIT STRING metadata */
412 if (vlen < 1 || *(const u8 *)value != 0)
413 return -EBADMSG;
412 ctx->key = value + 1; 414 ctx->key = value + 1;
413 ctx->key_size = vlen - 1; 415 ctx->key_size = vlen - 1;
414 return 0; 416 return 0;
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index c9013582c026..9338b4558cdc 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -79,11 +79,7 @@ int x509_get_sig_params(struct x509_certificate *cert)
79 desc->tfm = tfm; 79 desc->tfm = tfm;
80 desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; 80 desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP;
81 81
82 ret = crypto_shash_init(desc); 82 ret = crypto_shash_digest(desc, cert->tbs, cert->tbs_size, sig->digest);
83 if (ret < 0)
84 goto error_2;
85 might_sleep();
86 ret = crypto_shash_finup(desc, cert->tbs, cert->tbs_size, sig->digest);
87 if (ret < 0) 83 if (ret < 0)
88 goto error_2; 84 goto error_2;
89 85
@@ -135,7 +131,7 @@ int x509_check_for_self_signed(struct x509_certificate *cert)
135 } 131 }
136 132
137 ret = -EKEYREJECTED; 133 ret = -EKEYREJECTED;
138 if (cert->pub->pkey_algo != cert->sig->pkey_algo) 134 if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0)
139 goto out; 135 goto out;
140 136
141 ret = public_key_verify_signature(cert->pub, cert->sig); 137 ret = public_key_verify_signature(cert->pub, cert->sig);
diff --git a/drivers/Makefile b/drivers/Makefile
index 1d034b680431..e06f7f633f73 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -105,6 +105,7 @@ obj-$(CONFIG_TC) += tc/
105obj-$(CONFIG_UWB) += uwb/ 105obj-$(CONFIG_UWB) += uwb/
106obj-$(CONFIG_USB_PHY) += usb/ 106obj-$(CONFIG_USB_PHY) += usb/
107obj-$(CONFIG_USB) += usb/ 107obj-$(CONFIG_USB) += usb/
108obj-$(CONFIG_USB_SUPPORT) += usb/
108obj-$(CONFIG_PCI) += usb/ 109obj-$(CONFIG_PCI) += usb/
109obj-$(CONFIG_USB_GADGET) += usb/ 110obj-$(CONFIG_USB_GADGET) += usb/
110obj-$(CONFIG_OF) += usb/ 111obj-$(CONFIG_OF) += usb/
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 21c28433c590..30e84cc600ae 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -949,7 +949,7 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
949 } 949 }
950 950
951 *val = 0; 951 *val = 0;
952 if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) 952 if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0)
953 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); 953 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id);
954 else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) 954 else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
955 vaddr = reg_res->sys_mem_vaddr; 955 vaddr = reg_res->sys_mem_vaddr;
@@ -988,7 +988,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
988 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); 988 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
989 struct cpc_reg *reg = &reg_res->cpc_entry.reg; 989 struct cpc_reg *reg = &reg_res->cpc_entry.reg;
990 990
991 if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) 991 if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0)
992 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); 992 vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id);
993 else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) 993 else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
994 vaddr = reg_res->sys_mem_vaddr; 994 vaddr = reg_res->sys_mem_vaddr;
@@ -1035,14 +1035,15 @@ int cppc_get_perf_caps(int cpunum, struct cppc_perf_caps *perf_caps)
1035 *lowest_non_linear_reg, *nominal_reg; 1035 *lowest_non_linear_reg, *nominal_reg;
1036 u64 high, low, nom, min_nonlinear; 1036 u64 high, low, nom, min_nonlinear;
1037 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); 1037 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum);
1038 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; 1038 struct cppc_pcc_data *pcc_ss_data;
1039 int ret = 0, regs_in_pcc = 0; 1039 int ret = 0, regs_in_pcc = 0;
1040 1040
1041 if (!cpc_desc) { 1041 if (!cpc_desc || pcc_ss_id < 0) {
1042 pr_debug("No CPC descriptor for CPU:%d\n", cpunum); 1042 pr_debug("No CPC descriptor for CPU:%d\n", cpunum);
1043 return -ENODEV; 1043 return -ENODEV;
1044 } 1044 }
1045 1045
1046 pcc_ss_data = pcc_data[pcc_ss_id];
1046 highest_reg = &cpc_desc->cpc_regs[HIGHEST_PERF]; 1047 highest_reg = &cpc_desc->cpc_regs[HIGHEST_PERF];
1047 lowest_reg = &cpc_desc->cpc_regs[LOWEST_PERF]; 1048 lowest_reg = &cpc_desc->cpc_regs[LOWEST_PERF];
1048 lowest_non_linear_reg = &cpc_desc->cpc_regs[LOW_NON_LINEAR_PERF]; 1049 lowest_non_linear_reg = &cpc_desc->cpc_regs[LOW_NON_LINEAR_PERF];
@@ -1095,15 +1096,16 @@ int cppc_get_perf_ctrs(int cpunum, struct cppc_perf_fb_ctrs *perf_fb_ctrs)
1095 struct cpc_register_resource *delivered_reg, *reference_reg, 1096 struct cpc_register_resource *delivered_reg, *reference_reg,
1096 *ref_perf_reg, *ctr_wrap_reg; 1097 *ref_perf_reg, *ctr_wrap_reg;
1097 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); 1098 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum);
1098 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; 1099 struct cppc_pcc_data *pcc_ss_data;
1099 u64 delivered, reference, ref_perf, ctr_wrap_time; 1100 u64 delivered, reference, ref_perf, ctr_wrap_time;
1100 int ret = 0, regs_in_pcc = 0; 1101 int ret = 0, regs_in_pcc = 0;
1101 1102
1102 if (!cpc_desc) { 1103 if (!cpc_desc || pcc_ss_id < 0) {
1103 pr_debug("No CPC descriptor for CPU:%d\n", cpunum); 1104 pr_debug("No CPC descriptor for CPU:%d\n", cpunum);
1104 return -ENODEV; 1105 return -ENODEV;
1105 } 1106 }
1106 1107
1108 pcc_ss_data = pcc_data[pcc_ss_id];
1107 delivered_reg = &cpc_desc->cpc_regs[DELIVERED_CTR]; 1109 delivered_reg = &cpc_desc->cpc_regs[DELIVERED_CTR];
1108 reference_reg = &cpc_desc->cpc_regs[REFERENCE_CTR]; 1110 reference_reg = &cpc_desc->cpc_regs[REFERENCE_CTR];
1109 ref_perf_reg = &cpc_desc->cpc_regs[REFERENCE_PERF]; 1111 ref_perf_reg = &cpc_desc->cpc_regs[REFERENCE_PERF];
@@ -1172,11 +1174,12 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls)
1172 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; 1174 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id];
1173 int ret = 0; 1175 int ret = 0;
1174 1176
1175 if (!cpc_desc) { 1177 if (!cpc_desc || pcc_ss_id < 0) {
1176 pr_debug("No CPC descriptor for CPU:%d\n", cpu); 1178 pr_debug("No CPC descriptor for CPU:%d\n", cpu);
1177 return -ENODEV; 1179 return -ENODEV;
1178 } 1180 }
1179 1181
1182 pcc_ss_data = pcc_data[pcc_ss_id];
1180 desired_reg = &cpc_desc->cpc_regs[DESIRED_PERF]; 1183 desired_reg = &cpc_desc->cpc_regs[DESIRED_PERF];
1181 1184
1182 /* 1185 /*
@@ -1301,7 +1304,7 @@ unsigned int cppc_get_transition_latency(int cpu_num)
1301 struct cpc_desc *cpc_desc; 1304 struct cpc_desc *cpc_desc;
1302 struct cpc_register_resource *desired_reg; 1305 struct cpc_register_resource *desired_reg;
1303 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu_num); 1306 int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu_num);
1304 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; 1307 struct cppc_pcc_data *pcc_ss_data;
1305 1308
1306 cpc_desc = per_cpu(cpc_desc_ptr, cpu_num); 1309 cpc_desc = per_cpu(cpc_desc_ptr, cpu_num);
1307 if (!cpc_desc) 1310 if (!cpc_desc)
@@ -1311,6 +1314,10 @@ unsigned int cppc_get_transition_latency(int cpu_num)
1311 if (!CPC_IN_PCC(desired_reg)) 1314 if (!CPC_IN_PCC(desired_reg))
1312 return CPUFREQ_ETERNAL; 1315 return CPUFREQ_ETERNAL;
1313 1316
1317 if (pcc_ss_id < 0)
1318 return CPUFREQ_ETERNAL;
1319
1320 pcc_ss_data = pcc_data[pcc_ss_id];
1314 if (pcc_ss_data->pcc_mpar) 1321 if (pcc_ss_data->pcc_mpar)
1315 latency_ns = 60 * (1000 * 1000 * 1000 / pcc_ss_data->pcc_mpar); 1322 latency_ns = 60 * (1000 * 1000 * 1000 / pcc_ss_data->pcc_mpar);
1316 1323
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index 5cfe794c36bd..c4d0a1c912f0 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -1159,7 +1159,7 @@ int acpi_subsys_thaw_noirq(struct device *dev)
1159 * skip all of the subsequent "thaw" callbacks for the device. 1159 * skip all of the subsequent "thaw" callbacks for the device.
1160 */ 1160 */
1161 if (dev_pm_smart_suspend_and_suspended(dev)) { 1161 if (dev_pm_smart_suspend_and_suspended(dev)) {
1162 dev->power.direct_complete = true; 1162 dev_pm_skip_next_resume_phases(dev);
1163 return 0; 1163 return 0;
1164 } 1164 }
1165 1165
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index a73596a4f804..bccec9de0533 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1948,6 +1948,26 @@ static void binder_send_failed_reply(struct binder_transaction *t,
1948} 1948}
1949 1949
1950/** 1950/**
1951 * binder_cleanup_transaction() - cleans up undelivered transaction
1952 * @t: transaction that needs to be cleaned up
1953 * @reason: reason the transaction wasn't delivered
1954 * @error_code: error to return to caller (if synchronous call)
1955 */
1956static void binder_cleanup_transaction(struct binder_transaction *t,
1957 const char *reason,
1958 uint32_t error_code)
1959{
1960 if (t->buffer->target_node && !(t->flags & TF_ONE_WAY)) {
1961 binder_send_failed_reply(t, error_code);
1962 } else {
1963 binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
1964 "undelivered transaction %d, %s\n",
1965 t->debug_id, reason);
1966 binder_free_transaction(t);
1967 }
1968}
1969
1970/**
1951 * binder_validate_object() - checks for a valid metadata object in a buffer. 1971 * binder_validate_object() - checks for a valid metadata object in a buffer.
1952 * @buffer: binder_buffer that we're parsing. 1972 * @buffer: binder_buffer that we're parsing.
1953 * @offset: offset in the buffer at which to validate an object. 1973 * @offset: offset in the buffer at which to validate an object.
@@ -4015,12 +4035,20 @@ retry:
4015 if (put_user(cmd, (uint32_t __user *)ptr)) { 4035 if (put_user(cmd, (uint32_t __user *)ptr)) {
4016 if (t_from) 4036 if (t_from)
4017 binder_thread_dec_tmpref(t_from); 4037 binder_thread_dec_tmpref(t_from);
4038
4039 binder_cleanup_transaction(t, "put_user failed",
4040 BR_FAILED_REPLY);
4041
4018 return -EFAULT; 4042 return -EFAULT;
4019 } 4043 }
4020 ptr += sizeof(uint32_t); 4044 ptr += sizeof(uint32_t);
4021 if (copy_to_user(ptr, &tr, sizeof(tr))) { 4045 if (copy_to_user(ptr, &tr, sizeof(tr))) {
4022 if (t_from) 4046 if (t_from)
4023 binder_thread_dec_tmpref(t_from); 4047 binder_thread_dec_tmpref(t_from);
4048
4049 binder_cleanup_transaction(t, "copy_to_user failed",
4050 BR_FAILED_REPLY);
4051
4024 return -EFAULT; 4052 return -EFAULT;
4025 } 4053 }
4026 ptr += sizeof(tr); 4054 ptr += sizeof(tr);
@@ -4090,15 +4118,9 @@ static void binder_release_work(struct binder_proc *proc,
4090 struct binder_transaction *t; 4118 struct binder_transaction *t;
4091 4119
4092 t = container_of(w, struct binder_transaction, work); 4120 t = container_of(w, struct binder_transaction, work);
4093 if (t->buffer->target_node && 4121
4094 !(t->flags & TF_ONE_WAY)) { 4122 binder_cleanup_transaction(t, "process died.",
4095 binder_send_failed_reply(t, BR_DEAD_REPLY); 4123 BR_DEAD_REPLY);
4096 } else {
4097 binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
4098 "undelivered transaction %d\n",
4099 t->debug_id);
4100 binder_free_transaction(t);
4101 }
4102 } break; 4124 } break;
4103 case BINDER_WORK_RETURN_ERROR: { 4125 case BINDER_WORK_RETURN_ERROR: {
4104 struct binder_error *e = container_of( 4126 struct binder_error *e = container_of(
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 2f6614c9a229..bdc87907d6a1 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -91,22 +91,23 @@ config FIRMWARE_IN_KERNEL
91 depends on FW_LOADER 91 depends on FW_LOADER
92 default y 92 default y
93 help 93 help
94 The kernel source tree includes a number of firmware 'blobs' 94 Various drivers in the kernel source tree may require firmware,
95 that are used by various drivers. The recommended way to 95 which is generally available in your distribution's linux-firmware
96 use these is to run "make firmware_install", which, after 96 package.
97 converting ihex files to binary, copies all of the needed 97
98 binary files in firmware/ to /lib/firmware/ on your system so 98 The linux-firmware package should install firmware into
99 that they can be loaded by userspace helpers on request. 99 /lib/firmware/ on your system, so they can be loaded by userspace
100 helpers on request.
100 101
101 Enabling this option will build each required firmware blob 102 Enabling this option will build each required firmware blob
102 into the kernel directly, where request_firmware() will find 103 specified by EXTRA_FIRMWARE into the kernel directly, where
103 them without having to call out to userspace. This may be 104 request_firmware() will find them without having to call out to
104 useful if your root file system requires a device that uses 105 userspace. This may be useful if your root file system requires a
105 such firmware and do not wish to use an initrd. 106 device that uses such firmware and you do not wish to use an
107 initrd.
106 108
107 This single option controls the inclusion of firmware for 109 This single option controls the inclusion of firmware for
108 every driver that uses request_firmware() and ships its 110 every driver that uses request_firmware(), which avoids a
109 firmware in the kernel source tree, which avoids a
110 proliferation of 'Include firmware for xxx device' options. 111 proliferation of 'Include firmware for xxx device' options.
111 112
112 Say 'N' and let firmware be loaded from userspace. 113 Say 'N' and let firmware be loaded from userspace.
diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index cd6ccdcf9df0..372d10af2600 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -39,7 +39,7 @@ static int isa_bus_probe(struct device *dev)
39{ 39{
40 struct isa_driver *isa_driver = dev->platform_data; 40 struct isa_driver *isa_driver = dev->platform_data;
41 41
42 if (isa_driver->probe) 42 if (isa_driver && isa_driver->probe)
43 return isa_driver->probe(dev, to_isa_dev(dev)->id); 43 return isa_driver->probe(dev, to_isa_dev(dev)->id);
44 44
45 return 0; 45 return 0;
@@ -49,7 +49,7 @@ static int isa_bus_remove(struct device *dev)
49{ 49{
50 struct isa_driver *isa_driver = dev->platform_data; 50 struct isa_driver *isa_driver = dev->platform_data;
51 51
52 if (isa_driver->remove) 52 if (isa_driver && isa_driver->remove)
53 return isa_driver->remove(dev, to_isa_dev(dev)->id); 53 return isa_driver->remove(dev, to_isa_dev(dev)->id);
54 54
55 return 0; 55 return 0;
@@ -59,7 +59,7 @@ static void isa_bus_shutdown(struct device *dev)
59{ 59{
60 struct isa_driver *isa_driver = dev->platform_data; 60 struct isa_driver *isa_driver = dev->platform_data;
61 61
62 if (isa_driver->shutdown) 62 if (isa_driver && isa_driver->shutdown)
63 isa_driver->shutdown(dev, to_isa_dev(dev)->id); 63 isa_driver->shutdown(dev, to_isa_dev(dev)->id);
64} 64}
65 65
@@ -67,7 +67,7 @@ static int isa_bus_suspend(struct device *dev, pm_message_t state)
67{ 67{
68 struct isa_driver *isa_driver = dev->platform_data; 68 struct isa_driver *isa_driver = dev->platform_data;
69 69
70 if (isa_driver->suspend) 70 if (isa_driver && isa_driver->suspend)
71 return isa_driver->suspend(dev, to_isa_dev(dev)->id, state); 71 return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
72 72
73 return 0; 73 return 0;
@@ -77,7 +77,7 @@ static int isa_bus_resume(struct device *dev)
77{ 77{
78 struct isa_driver *isa_driver = dev->platform_data; 78 struct isa_driver *isa_driver = dev->platform_data;
79 79
80 if (isa_driver->resume) 80 if (isa_driver && isa_driver->resume)
81 return isa_driver->resume(dev, to_isa_dev(dev)->id); 81 return isa_driver->resume(dev, to_isa_dev(dev)->id);
82 82
83 return 0; 83 return 0;
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index cd48b1c69167..6e8cc5de93fd 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -525,6 +525,21 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd)
525/*------------------------- Resume routines -------------------------*/ 525/*------------------------- Resume routines -------------------------*/
526 526
527/** 527/**
528 * dev_pm_skip_next_resume_phases - Skip next system resume phases for device.
529 * @dev: Target device.
530 *
531 * Make the core skip the "early resume" and "resume" phases for @dev.
532 *
533 * This function can be called by middle-layer code during the "noirq" phase of
534 * system resume if necessary, but not by device drivers.
535 */
536void dev_pm_skip_next_resume_phases(struct device *dev)
537{
538 dev->power.is_late_suspended = false;
539 dev->power.is_suspended = false;
540}
541
542/**
528 * dev_pm_may_skip_resume - System-wide device resume optimization check. 543 * dev_pm_may_skip_resume - System-wide device resume optimization check.
529 * @dev: Target device. 544 * @dev: Target device.
530 * 545 *
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 3c29d36702a8..5426c04fe24b 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -1755,14 +1755,17 @@ static int cci_pmu_probe(struct platform_device *pdev)
1755 raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock); 1755 raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock);
1756 mutex_init(&cci_pmu->reserve_mutex); 1756 mutex_init(&cci_pmu->reserve_mutex);
1757 atomic_set(&cci_pmu->active_events, 0); 1757 atomic_set(&cci_pmu->active_events, 0);
1758 cpumask_set_cpu(smp_processor_id(), &cci_pmu->cpus); 1758 cpumask_set_cpu(get_cpu(), &cci_pmu->cpus);
1759 1759
1760 ret = cci_pmu_init(cci_pmu, pdev); 1760 ret = cci_pmu_init(cci_pmu, pdev);
1761 if (ret) 1761 if (ret) {
1762 put_cpu();
1762 return ret; 1763 return ret;
1764 }
1763 1765
1764 cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE, 1766 cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE,
1765 &cci_pmu->node); 1767 &cci_pmu->node);
1768 put_cpu();
1766 pr_info("ARM %s PMU driver probed", cci_pmu->model->name); 1769 pr_info("ARM %s PMU driver probed", cci_pmu->model->name);
1767 return 0; 1770 return 0;
1768} 1771}
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c
index 3063f5312397..b52332e52ca5 100644
--- a/drivers/bus/arm-ccn.c
+++ b/drivers/bus/arm-ccn.c
@@ -262,7 +262,7 @@ static struct attribute *arm_ccn_pmu_format_attrs[] = {
262 NULL 262 NULL
263}; 263};
264 264
265static struct attribute_group arm_ccn_pmu_format_attr_group = { 265static const struct attribute_group arm_ccn_pmu_format_attr_group = {
266 .name = "format", 266 .name = "format",
267 .attrs = arm_ccn_pmu_format_attrs, 267 .attrs = arm_ccn_pmu_format_attrs,
268}; 268};
@@ -451,7 +451,7 @@ static struct arm_ccn_pmu_event arm_ccn_pmu_events[] = {
451static struct attribute 451static struct attribute
452 *arm_ccn_pmu_events_attrs[ARRAY_SIZE(arm_ccn_pmu_events) + 1]; 452 *arm_ccn_pmu_events_attrs[ARRAY_SIZE(arm_ccn_pmu_events) + 1];
453 453
454static struct attribute_group arm_ccn_pmu_events_attr_group = { 454static const struct attribute_group arm_ccn_pmu_events_attr_group = {
455 .name = "events", 455 .name = "events",
456 .is_visible = arm_ccn_pmu_events_is_visible, 456 .is_visible = arm_ccn_pmu_events_is_visible,
457 .attrs = arm_ccn_pmu_events_attrs, 457 .attrs = arm_ccn_pmu_events_attrs,
@@ -548,7 +548,7 @@ static struct attribute *arm_ccn_pmu_cmp_mask_attrs[] = {
548 NULL 548 NULL
549}; 549};
550 550
551static struct attribute_group arm_ccn_pmu_cmp_mask_attr_group = { 551static const struct attribute_group arm_ccn_pmu_cmp_mask_attr_group = {
552 .name = "cmp_mask", 552 .name = "cmp_mask",
553 .attrs = arm_ccn_pmu_cmp_mask_attrs, 553 .attrs = arm_ccn_pmu_cmp_mask_attrs,
554}; 554};
@@ -569,7 +569,7 @@ static struct attribute *arm_ccn_pmu_cpumask_attrs[] = {
569 NULL, 569 NULL,
570}; 570};
571 571
572static struct attribute_group arm_ccn_pmu_cpumask_attr_group = { 572static const struct attribute_group arm_ccn_pmu_cpumask_attr_group = {
573 .attrs = arm_ccn_pmu_cpumask_attrs, 573 .attrs = arm_ccn_pmu_cpumask_attrs,
574}; 574};
575 575
@@ -1268,10 +1268,12 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
1268 if (ccn->dt.id == 0) { 1268 if (ccn->dt.id == 0) {
1269 name = "ccn"; 1269 name = "ccn";
1270 } else { 1270 } else {
1271 int len = snprintf(NULL, 0, "ccn_%d", ccn->dt.id); 1271 name = devm_kasprintf(ccn->dev, GFP_KERNEL, "ccn_%d",
1272 1272 ccn->dt.id);
1273 name = devm_kzalloc(ccn->dev, len + 1, GFP_KERNEL); 1273 if (!name) {
1274 snprintf(name, len + 1, "ccn_%d", ccn->dt.id); 1274 err = -ENOMEM;
1275 goto error_choose_name;
1276 }
1275 } 1277 }
1276 1278
1277 /* Perf driver registration */ 1279 /* Perf driver registration */
@@ -1298,7 +1300,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
1298 } 1300 }
1299 1301
1300 /* Pick one CPU which we will use to collect data from CCN... */ 1302 /* Pick one CPU which we will use to collect data from CCN... */
1301 cpumask_set_cpu(smp_processor_id(), &ccn->dt.cpu); 1303 cpumask_set_cpu(get_cpu(), &ccn->dt.cpu);
1302 1304
1303 /* Also make sure that the overflow interrupt is handled by this CPU */ 1305 /* Also make sure that the overflow interrupt is handled by this CPU */
1304 if (ccn->irq) { 1306 if (ccn->irq) {
@@ -1315,10 +1317,13 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
1315 1317
1316 cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE, 1318 cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE,
1317 &ccn->dt.node); 1319 &ccn->dt.node);
1320 put_cpu();
1318 return 0; 1321 return 0;
1319 1322
1320error_pmu_register: 1323error_pmu_register:
1321error_set_affinity: 1324error_set_affinity:
1325 put_cpu();
1326error_choose_name:
1322 ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id); 1327 ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id);
1323 for (i = 0; i < ccn->num_xps; i++) 1328 for (i = 0; i < ccn->num_xps; i++)
1324 writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL); 1329 writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL);
@@ -1581,8 +1586,8 @@ static int __init arm_ccn_init(void)
1581 1586
1582static void __exit arm_ccn_exit(void) 1587static void __exit arm_ccn_exit(void)
1583{ 1588{
1584 cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
1585 platform_driver_unregister(&arm_ccn_driver); 1589 platform_driver_unregister(&arm_ccn_driver);
1590 cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
1586} 1591}
1587 1592
1588module_init(arm_ccn_init); 1593module_init(arm_ccn_init);
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index dfb373c8ba2a..7da9f1b83ebe 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -28,7 +28,6 @@
28#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 28#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
29 29
30#include <linux/bitmap.h> 30#include <linux/bitmap.h>
31#include <linux/bitfield.h>
32#include <linux/device.h> 31#include <linux/device.h>
33#include <linux/err.h> 32#include <linux/err.h>
34#include <linux/export.h> 33#include <linux/export.h>
@@ -73,13 +72,21 @@
73 72
74#define MAX_DVFS_DOMAINS 8 73#define MAX_DVFS_DOMAINS 8
75#define MAX_DVFS_OPPS 16 74#define MAX_DVFS_OPPS 16
76 75#define DVFS_LATENCY(hdr) (le32_to_cpu(hdr) >> 16)
77#define PROTO_REV_MAJOR_MASK GENMASK(31, 16) 76#define DVFS_OPP_COUNT(hdr) ((le32_to_cpu(hdr) >> 8) & 0xff)
78#define PROTO_REV_MINOR_MASK GENMASK(15, 0) 77
79 78#define PROTOCOL_REV_MINOR_BITS 16
80#define FW_REV_MAJOR_MASK GENMASK(31, 24) 79#define PROTOCOL_REV_MINOR_MASK ((1U << PROTOCOL_REV_MINOR_BITS) - 1)
81#define FW_REV_MINOR_MASK GENMASK(23, 16) 80#define PROTOCOL_REV_MAJOR(x) ((x) >> PROTOCOL_REV_MINOR_BITS)
82#define FW_REV_PATCH_MASK GENMASK(15, 0) 81#define PROTOCOL_REV_MINOR(x) ((x) & PROTOCOL_REV_MINOR_MASK)
82
83#define FW_REV_MAJOR_BITS 24
84#define FW_REV_MINOR_BITS 16
85#define FW_REV_PATCH_MASK ((1U << FW_REV_MINOR_BITS) - 1)
86#define FW_REV_MINOR_MASK ((1U << FW_REV_MAJOR_BITS) - 1)
87#define FW_REV_MAJOR(x) ((x) >> FW_REV_MAJOR_BITS)
88#define FW_REV_MINOR(x) (((x) & FW_REV_MINOR_MASK) >> FW_REV_MINOR_BITS)
89#define FW_REV_PATCH(x) ((x) & FW_REV_PATCH_MASK)
83 90
84#define MAX_RX_TIMEOUT (msecs_to_jiffies(30)) 91#define MAX_RX_TIMEOUT (msecs_to_jiffies(30))
85 92
@@ -304,6 +311,10 @@ struct clk_get_info {
304 u8 name[20]; 311 u8 name[20];
305} __packed; 312} __packed;
306 313
314struct clk_get_value {
315 __le32 rate;
316} __packed;
317
307struct clk_set_value { 318struct clk_set_value {
308 __le16 id; 319 __le16 id;
309 __le16 reserved; 320 __le16 reserved;
@@ -317,9 +328,7 @@ struct legacy_clk_set_value {
317} __packed; 328} __packed;
318 329
319struct dvfs_info { 330struct dvfs_info {
320 u8 domain; 331 __le32 header;
321 u8 opp_count;
322 __le16 latency;
323 struct { 332 struct {
324 __le32 freq; 333 __le32 freq;
325 __le32 m_volt; 334 __le32 m_volt;
@@ -342,6 +351,11 @@ struct _scpi_sensor_info {
342 char name[20]; 351 char name[20];
343}; 352};
344 353
354struct sensor_value {
355 __le32 lo_val;
356 __le32 hi_val;
357} __packed;
358
345struct dev_pstate_set { 359struct dev_pstate_set {
346 __le16 dev_id; 360 __le16 dev_id;
347 u8 pstate; 361 u8 pstate;
@@ -405,20 +419,19 @@ static void scpi_process_cmd(struct scpi_chan *ch, u32 cmd)
405 unsigned int len; 419 unsigned int len;
406 420
407 if (scpi_info->is_legacy) { 421 if (scpi_info->is_legacy) {
408 struct legacy_scpi_shared_mem __iomem *mem = 422 struct legacy_scpi_shared_mem *mem = ch->rx_payload;
409 ch->rx_payload;
410 423
411 /* RX Length is not replied by the legacy Firmware */ 424 /* RX Length is not replied by the legacy Firmware */
412 len = match->rx_len; 425 len = match->rx_len;
413 426
414 match->status = ioread32(&mem->status); 427 match->status = le32_to_cpu(mem->status);
415 memcpy_fromio(match->rx_buf, mem->payload, len); 428 memcpy_fromio(match->rx_buf, mem->payload, len);
416 } else { 429 } else {
417 struct scpi_shared_mem __iomem *mem = ch->rx_payload; 430 struct scpi_shared_mem *mem = ch->rx_payload;
418 431
419 len = min(match->rx_len, CMD_SIZE(cmd)); 432 len = min(match->rx_len, CMD_SIZE(cmd));
420 433
421 match->status = ioread32(&mem->status); 434 match->status = le32_to_cpu(mem->status);
422 memcpy_fromio(match->rx_buf, mem->payload, len); 435 memcpy_fromio(match->rx_buf, mem->payload, len);
423 } 436 }
424 437
@@ -432,11 +445,11 @@ static void scpi_process_cmd(struct scpi_chan *ch, u32 cmd)
432static void scpi_handle_remote_msg(struct mbox_client *c, void *msg) 445static void scpi_handle_remote_msg(struct mbox_client *c, void *msg)
433{ 446{
434 struct scpi_chan *ch = container_of(c, struct scpi_chan, cl); 447 struct scpi_chan *ch = container_of(c, struct scpi_chan, cl);
435 struct scpi_shared_mem __iomem *mem = ch->rx_payload; 448 struct scpi_shared_mem *mem = ch->rx_payload;
436 u32 cmd = 0; 449 u32 cmd = 0;
437 450
438 if (!scpi_info->is_legacy) 451 if (!scpi_info->is_legacy)
439 cmd = ioread32(&mem->command); 452 cmd = le32_to_cpu(mem->command);
440 453
441 scpi_process_cmd(ch, cmd); 454 scpi_process_cmd(ch, cmd);
442} 455}
@@ -446,7 +459,7 @@ static void scpi_tx_prepare(struct mbox_client *c, void *msg)
446 unsigned long flags; 459 unsigned long flags;
447 struct scpi_xfer *t = msg; 460 struct scpi_xfer *t = msg;
448 struct scpi_chan *ch = container_of(c, struct scpi_chan, cl); 461 struct scpi_chan *ch = container_of(c, struct scpi_chan, cl);
449 struct scpi_shared_mem __iomem *mem = ch->tx_payload; 462 struct scpi_shared_mem *mem = (struct scpi_shared_mem *)ch->tx_payload;
450 463
451 if (t->tx_buf) { 464 if (t->tx_buf) {
452 if (scpi_info->is_legacy) 465 if (scpi_info->is_legacy)
@@ -465,7 +478,7 @@ static void scpi_tx_prepare(struct mbox_client *c, void *msg)
465 } 478 }
466 479
467 if (!scpi_info->is_legacy) 480 if (!scpi_info->is_legacy)
468 iowrite32(t->cmd, &mem->command); 481 mem->command = cpu_to_le32(t->cmd);
469} 482}
470 483
471static struct scpi_xfer *get_scpi_xfer(struct scpi_chan *ch) 484static struct scpi_xfer *get_scpi_xfer(struct scpi_chan *ch)
@@ -570,13 +583,13 @@ scpi_clk_get_range(u16 clk_id, unsigned long *min, unsigned long *max)
570static unsigned long scpi_clk_get_val(u16 clk_id) 583static unsigned long scpi_clk_get_val(u16 clk_id)
571{ 584{
572 int ret; 585 int ret;
573 __le32 rate; 586 struct clk_get_value clk;
574 __le16 le_clk_id = cpu_to_le16(clk_id); 587 __le16 le_clk_id = cpu_to_le16(clk_id);
575 588
576 ret = scpi_send_message(CMD_GET_CLOCK_VALUE, &le_clk_id, 589 ret = scpi_send_message(CMD_GET_CLOCK_VALUE, &le_clk_id,
577 sizeof(le_clk_id), &rate, sizeof(rate)); 590 sizeof(le_clk_id), &clk, sizeof(clk));
578 591
579 return ret ? ret : le32_to_cpu(rate); 592 return ret ? ret : le32_to_cpu(clk.rate);
580} 593}
581 594
582static int scpi_clk_set_val(u16 clk_id, unsigned long rate) 595static int scpi_clk_set_val(u16 clk_id, unsigned long rate)
@@ -632,34 +645,34 @@ static int opp_cmp_func(const void *opp1, const void *opp2)
632 645
633static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain) 646static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain)
634{ 647{
635 if (domain >= MAX_DVFS_DOMAINS)
636 return ERR_PTR(-EINVAL);
637
638 return scpi_info->dvfs[domain] ?: ERR_PTR(-EINVAL);
639}
640
641static int scpi_dvfs_populate_info(struct device *dev, u8 domain)
642{
643 struct scpi_dvfs_info *info; 648 struct scpi_dvfs_info *info;
644 struct scpi_opp *opp; 649 struct scpi_opp *opp;
645 struct dvfs_info buf; 650 struct dvfs_info buf;
646 int ret, i; 651 int ret, i;
647 652
653 if (domain >= MAX_DVFS_DOMAINS)
654 return ERR_PTR(-EINVAL);
655
656 if (scpi_info->dvfs[domain]) /* data already populated */
657 return scpi_info->dvfs[domain];
658
648 ret = scpi_send_message(CMD_GET_DVFS_INFO, &domain, sizeof(domain), 659 ret = scpi_send_message(CMD_GET_DVFS_INFO, &domain, sizeof(domain),
649 &buf, sizeof(buf)); 660 &buf, sizeof(buf));
650 if (ret) 661 if (ret)
651 return ret; 662 return ERR_PTR(ret);
652 663
653 info = devm_kmalloc(dev, sizeof(*info), GFP_KERNEL); 664 info = kmalloc(sizeof(*info), GFP_KERNEL);
654 if (!info) 665 if (!info)
655 return -ENOMEM; 666 return ERR_PTR(-ENOMEM);
656 667
657 info->count = buf.opp_count; 668 info->count = DVFS_OPP_COUNT(buf.header);
658 info->latency = le16_to_cpu(buf.latency) * 1000; /* uS to nS */ 669 info->latency = DVFS_LATENCY(buf.header) * 1000; /* uS to nS */
659 670
660 info->opps = devm_kcalloc(dev, info->count, sizeof(*opp), GFP_KERNEL); 671 info->opps = kcalloc(info->count, sizeof(*opp), GFP_KERNEL);
661 if (!info->opps) 672 if (!info->opps) {
662 return -ENOMEM; 673 kfree(info);
674 return ERR_PTR(-ENOMEM);
675 }
663 676
664 for (i = 0, opp = info->opps; i < info->count; i++, opp++) { 677 for (i = 0, opp = info->opps; i < info->count; i++, opp++) {
665 opp->freq = le32_to_cpu(buf.opps[i].freq); 678 opp->freq = le32_to_cpu(buf.opps[i].freq);
@@ -669,15 +682,7 @@ static int scpi_dvfs_populate_info(struct device *dev, u8 domain)
669 sort(info->opps, info->count, sizeof(*opp), opp_cmp_func, NULL); 682 sort(info->opps, info->count, sizeof(*opp), opp_cmp_func, NULL);
670 683
671 scpi_info->dvfs[domain] = info; 684 scpi_info->dvfs[domain] = info;
672 return 0; 685 return info;
673}
674
675static void scpi_dvfs_populate(struct device *dev)
676{
677 int domain;
678
679 for (domain = 0; domain < MAX_DVFS_DOMAINS; domain++)
680 scpi_dvfs_populate_info(dev, domain);
681} 686}
682 687
683static int scpi_dev_domain_id(struct device *dev) 688static int scpi_dev_domain_id(struct device *dev)
@@ -708,6 +713,9 @@ static int scpi_dvfs_get_transition_latency(struct device *dev)
708 if (IS_ERR(info)) 713 if (IS_ERR(info))
709 return PTR_ERR(info); 714 return PTR_ERR(info);
710 715
716 if (!info->latency)
717 return 0;
718
711 return info->latency; 719 return info->latency;
712} 720}
713 721
@@ -768,19 +776,20 @@ static int scpi_sensor_get_info(u16 sensor_id, struct scpi_sensor_info *info)
768static int scpi_sensor_get_value(u16 sensor, u64 *val) 776static int scpi_sensor_get_value(u16 sensor, u64 *val)
769{ 777{
770 __le16 id = cpu_to_le16(sensor); 778 __le16 id = cpu_to_le16(sensor);
771 __le64 value; 779 struct sensor_value buf;
772 int ret; 780 int ret;
773 781
774 ret = scpi_send_message(CMD_SENSOR_VALUE, &id, sizeof(id), 782 ret = scpi_send_message(CMD_SENSOR_VALUE, &id, sizeof(id),
775 &value, sizeof(value)); 783 &buf, sizeof(buf));
776 if (ret) 784 if (ret)
777 return ret; 785 return ret;
778 786
779 if (scpi_info->is_legacy) 787 if (scpi_info->is_legacy)
780 /* only 32-bits supported, upper 32 bits can be junk */ 788 /* only 32-bits supported, hi_val can be junk */
781 *val = le32_to_cpup((__le32 *)&value); 789 *val = le32_to_cpu(buf.lo_val);
782 else 790 else
783 *val = le64_to_cpu(value); 791 *val = (u64)le32_to_cpu(buf.hi_val) << 32 |
792 le32_to_cpu(buf.lo_val);
784 793
785 return 0; 794 return 0;
786} 795}
@@ -853,19 +862,23 @@ static int scpi_init_versions(struct scpi_drvinfo *info)
853static ssize_t protocol_version_show(struct device *dev, 862static ssize_t protocol_version_show(struct device *dev,
854 struct device_attribute *attr, char *buf) 863 struct device_attribute *attr, char *buf)
855{ 864{
856 return sprintf(buf, "%lu.%lu\n", 865 struct scpi_drvinfo *scpi_info = dev_get_drvdata(dev);
857 FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), 866
858 FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version)); 867 return sprintf(buf, "%d.%d\n",
868 PROTOCOL_REV_MAJOR(scpi_info->protocol_version),
869 PROTOCOL_REV_MINOR(scpi_info->protocol_version));
859} 870}
860static DEVICE_ATTR_RO(protocol_version); 871static DEVICE_ATTR_RO(protocol_version);
861 872
862static ssize_t firmware_version_show(struct device *dev, 873static ssize_t firmware_version_show(struct device *dev,
863 struct device_attribute *attr, char *buf) 874 struct device_attribute *attr, char *buf)
864{ 875{
865 return sprintf(buf, "%lu.%lu.%lu\n", 876 struct scpi_drvinfo *scpi_info = dev_get_drvdata(dev);
866 FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), 877
867 FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), 878 return sprintf(buf, "%d.%d.%d\n",
868 FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version)); 879 FW_REV_MAJOR(scpi_info->firmware_version),
880 FW_REV_MINOR(scpi_info->firmware_version),
881 FW_REV_PATCH(scpi_info->firmware_version));
869} 882}
870static DEVICE_ATTR_RO(firmware_version); 883static DEVICE_ATTR_RO(firmware_version);
871 884
@@ -876,13 +889,39 @@ static struct attribute *versions_attrs[] = {
876}; 889};
877ATTRIBUTE_GROUPS(versions); 890ATTRIBUTE_GROUPS(versions);
878 891
879static void scpi_free_channels(void *data) 892static void
893scpi_free_channels(struct device *dev, struct scpi_chan *pchan, int count)
880{ 894{
881 struct scpi_drvinfo *info = data;
882 int i; 895 int i;
883 896
884 for (i = 0; i < info->num_chans; i++) 897 for (i = 0; i < count && pchan->chan; i++, pchan++) {
885 mbox_free_channel(info->channels[i].chan); 898 mbox_free_channel(pchan->chan);
899 devm_kfree(dev, pchan->xfers);
900 devm_iounmap(dev, pchan->rx_payload);
901 }
902}
903
904static int scpi_remove(struct platform_device *pdev)
905{
906 int i;
907 struct device *dev = &pdev->dev;
908 struct scpi_drvinfo *info = platform_get_drvdata(pdev);
909
910 scpi_info = NULL; /* stop exporting SCPI ops through get_scpi_ops */
911
912 of_platform_depopulate(dev);
913 sysfs_remove_groups(&dev->kobj, versions_groups);
914 scpi_free_channels(dev, info->channels, info->num_chans);
915 platform_set_drvdata(pdev, NULL);
916
917 for (i = 0; i < MAX_DVFS_DOMAINS && info->dvfs[i]; i++) {
918 kfree(info->dvfs[i]->opps);
919 kfree(info->dvfs[i]);
920 }
921 devm_kfree(dev, info->channels);
922 devm_kfree(dev, info);
923
924 return 0;
886} 925}
887 926
888#define MAX_SCPI_XFERS 10 927#define MAX_SCPI_XFERS 10
@@ -913,6 +952,7 @@ static int scpi_probe(struct platform_device *pdev)
913{ 952{
914 int count, idx, ret; 953 int count, idx, ret;
915 struct resource res; 954 struct resource res;
955 struct scpi_chan *scpi_chan;
916 struct device *dev = &pdev->dev; 956 struct device *dev = &pdev->dev;
917 struct device_node *np = dev->of_node; 957 struct device_node *np = dev->of_node;
918 958
@@ -929,19 +969,13 @@ static int scpi_probe(struct platform_device *pdev)
929 return -ENODEV; 969 return -ENODEV;
930 } 970 }
931 971
932 scpi_info->channels = devm_kcalloc(dev, count, sizeof(struct scpi_chan), 972 scpi_chan = devm_kcalloc(dev, count, sizeof(*scpi_chan), GFP_KERNEL);
933 GFP_KERNEL); 973 if (!scpi_chan)
934 if (!scpi_info->channels)
935 return -ENOMEM; 974 return -ENOMEM;
936 975
937 ret = devm_add_action(dev, scpi_free_channels, scpi_info); 976 for (idx = 0; idx < count; idx++) {
938 if (ret)
939 return ret;
940
941 for (; scpi_info->num_chans < count; scpi_info->num_chans++) {
942 resource_size_t size; 977 resource_size_t size;
943 int idx = scpi_info->num_chans; 978 struct scpi_chan *pchan = scpi_chan + idx;
944 struct scpi_chan *pchan = scpi_info->channels + idx;
945 struct mbox_client *cl = &pchan->cl; 979 struct mbox_client *cl = &pchan->cl;
946 struct device_node *shmem = of_parse_phandle(np, "shmem", idx); 980 struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
947 981
@@ -949,14 +983,15 @@ static int scpi_probe(struct platform_device *pdev)
949 of_node_put(shmem); 983 of_node_put(shmem);
950 if (ret) { 984 if (ret) {
951 dev_err(dev, "failed to get SCPI payload mem resource\n"); 985 dev_err(dev, "failed to get SCPI payload mem resource\n");
952 return ret; 986 goto err;
953 } 987 }
954 988
955 size = resource_size(&res); 989 size = resource_size(&res);
956 pchan->rx_payload = devm_ioremap(dev, res.start, size); 990 pchan->rx_payload = devm_ioremap(dev, res.start, size);
957 if (!pchan->rx_payload) { 991 if (!pchan->rx_payload) {
958 dev_err(dev, "failed to ioremap SCPI payload\n"); 992 dev_err(dev, "failed to ioremap SCPI payload\n");
959 return -EADDRNOTAVAIL; 993 ret = -EADDRNOTAVAIL;
994 goto err;
960 } 995 }
961 pchan->tx_payload = pchan->rx_payload + (size >> 1); 996 pchan->tx_payload = pchan->rx_payload + (size >> 1);
962 997
@@ -982,11 +1017,17 @@ static int scpi_probe(struct platform_device *pdev)
982 dev_err(dev, "failed to get channel%d err %d\n", 1017 dev_err(dev, "failed to get channel%d err %d\n",
983 idx, ret); 1018 idx, ret);
984 } 1019 }
1020err:
1021 scpi_free_channels(dev, scpi_chan, idx);
1022 scpi_info = NULL;
985 return ret; 1023 return ret;
986 } 1024 }
987 1025
1026 scpi_info->channels = scpi_chan;
1027 scpi_info->num_chans = count;
988 scpi_info->commands = scpi_std_commands; 1028 scpi_info->commands = scpi_std_commands;
989 scpi_info->scpi_ops = &scpi_ops; 1029
1030 platform_set_drvdata(pdev, scpi_info);
990 1031
991 if (scpi_info->is_legacy) { 1032 if (scpi_info->is_legacy) {
992 /* Replace with legacy variants */ 1033 /* Replace with legacy variants */
@@ -1002,23 +1043,23 @@ static int scpi_probe(struct platform_device *pdev)
1002 ret = scpi_init_versions(scpi_info); 1043 ret = scpi_init_versions(scpi_info);
1003 if (ret) { 1044 if (ret) {
1004 dev_err(dev, "incorrect or no SCP firmware found\n"); 1045 dev_err(dev, "incorrect or no SCP firmware found\n");
1046 scpi_remove(pdev);
1005 return ret; 1047 return ret;
1006 } 1048 }
1007 1049
1008 scpi_dvfs_populate(dev); 1050 _dev_info(dev, "SCP Protocol %d.%d Firmware %d.%d.%d version\n",
1009 1051 PROTOCOL_REV_MAJOR(scpi_info->protocol_version),
1010 _dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n", 1052 PROTOCOL_REV_MINOR(scpi_info->protocol_version),
1011 FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), 1053 FW_REV_MAJOR(scpi_info->firmware_version),
1012 FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version), 1054 FW_REV_MINOR(scpi_info->firmware_version),
1013 FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), 1055 FW_REV_PATCH(scpi_info->firmware_version));
1014 FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), 1056 scpi_info->scpi_ops = &scpi_ops;
1015 FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version));
1016 1057
1017 ret = devm_device_add_groups(dev, versions_groups); 1058 ret = sysfs_create_groups(&dev->kobj, versions_groups);
1018 if (ret) 1059 if (ret)
1019 dev_err(dev, "unable to create sysfs version group\n"); 1060 dev_err(dev, "unable to create sysfs version group\n");
1020 1061
1021 return devm_of_platform_populate(dev); 1062 return of_platform_populate(dev->of_node, NULL, NULL, dev);
1022} 1063}
1023 1064
1024static const struct of_device_id scpi_of_match[] = { 1065static const struct of_device_id scpi_of_match[] = {
@@ -1035,6 +1076,7 @@ static struct platform_driver scpi_driver = {
1035 .of_match_table = scpi_of_match, 1076 .of_match_table = scpi_of_match,
1036 }, 1077 },
1037 .probe = scpi_probe, 1078 .probe = scpi_probe,
1079 .remove = scpi_remove,
1038}; 1080};
1039module_platform_driver(scpi_driver); 1081module_platform_driver(scpi_driver);
1040 1082
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index f70febf680c3..557a47829d03 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -109,6 +109,8 @@ struct kobject *efi_kobj;
109/* 109/*
110 * Let's not leave out systab information that snuck into 110 * Let's not leave out systab information that snuck into
111 * the efivars driver 111 * the efivars driver
112 * Note, do not add more fields in systab sysfs file as it breaks sysfs
113 * one value per file rule!
112 */ 114 */
113static ssize_t systab_show(struct kobject *kobj, 115static ssize_t systab_show(struct kobject *kobj,
114 struct kobj_attribute *attr, char *buf) 116 struct kobj_attribute *attr, char *buf)
@@ -143,8 +145,7 @@ static ssize_t systab_show(struct kobject *kobj,
143 return str - buf; 145 return str - buf;
144} 146}
145 147
146static struct kobj_attribute efi_attr_systab = 148static struct kobj_attribute efi_attr_systab = __ATTR_RO_MODE(systab, 0400);
147 __ATTR(systab, 0400, systab_show, NULL);
148 149
149#define EFI_FIELD(var) efi.var 150#define EFI_FIELD(var) efi.var
150 151
diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
index bd7ed3c1148a..c47e0c6ec00f 100644
--- a/drivers/firmware/efi/esrt.c
+++ b/drivers/firmware/efi/esrt.c
@@ -106,7 +106,7 @@ static const struct sysfs_ops esre_attr_ops = {
106}; 106};
107 107
108/* Generic ESRT Entry ("ESRE") support. */ 108/* Generic ESRT Entry ("ESRE") support. */
109static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf) 109static ssize_t fw_class_show(struct esre_entry *entry, char *buf)
110{ 110{
111 char *str = buf; 111 char *str = buf;
112 112
@@ -117,18 +117,16 @@ static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf)
117 return str - buf; 117 return str - buf;
118} 118}
119 119
120static struct esre_attribute esre_fw_class = __ATTR(fw_class, 0400, 120static struct esre_attribute esre_fw_class = __ATTR_RO_MODE(fw_class, 0400);
121 esre_fw_class_show, NULL);
122 121
123#define esre_attr_decl(name, size, fmt) \ 122#define esre_attr_decl(name, size, fmt) \
124static ssize_t esre_##name##_show(struct esre_entry *entry, char *buf) \ 123static ssize_t name##_show(struct esre_entry *entry, char *buf) \
125{ \ 124{ \
126 return sprintf(buf, fmt "\n", \ 125 return sprintf(buf, fmt "\n", \
127 le##size##_to_cpu(entry->esre.esre1->name)); \ 126 le##size##_to_cpu(entry->esre.esre1->name)); \
128} \ 127} \
129\ 128\
130static struct esre_attribute esre_##name = __ATTR(name, 0400, \ 129static struct esre_attribute esre_##name = __ATTR_RO_MODE(name, 0400)
131 esre_##name##_show, NULL)
132 130
133esre_attr_decl(fw_type, 32, "%u"); 131esre_attr_decl(fw_type, 32, "%u");
134esre_attr_decl(fw_version, 32, "%u"); 132esre_attr_decl(fw_version, 32, "%u");
@@ -193,14 +191,13 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
193 191
194/* support for displaying ESRT fields at the top level */ 192/* support for displaying ESRT fields at the top level */
195#define esrt_attr_decl(name, size, fmt) \ 193#define esrt_attr_decl(name, size, fmt) \
196static ssize_t esrt_##name##_show(struct kobject *kobj, \ 194static ssize_t name##_show(struct kobject *kobj, \
197 struct kobj_attribute *attr, char *buf)\ 195 struct kobj_attribute *attr, char *buf)\
198{ \ 196{ \
199 return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ 197 return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \
200} \ 198} \
201\ 199\
202static struct kobj_attribute esrt_##name = __ATTR(name, 0400, \ 200static struct kobj_attribute esrt_##name = __ATTR_RO_MODE(name, 0400)
203 esrt_##name##_show, NULL)
204 201
205esrt_attr_decl(fw_resource_count, 32, "%u"); 202esrt_attr_decl(fw_resource_count, 32, "%u");
206esrt_attr_decl(fw_resource_count_max, 32, "%u"); 203esrt_attr_decl(fw_resource_count_max, 32, "%u");
@@ -431,7 +428,7 @@ err_remove_group:
431err_remove_esrt: 428err_remove_esrt:
432 kobject_put(esrt_kobj); 429 kobject_put(esrt_kobj);
433err: 430err:
434 kfree(esrt); 431 memunmap(esrt);
435 esrt = NULL; 432 esrt = NULL;
436 return error; 433 return error;
437} 434}
diff --git a/drivers/firmware/efi/runtime-map.c b/drivers/firmware/efi/runtime-map.c
index 8e64b77aeac9..f377609ff141 100644
--- a/drivers/firmware/efi/runtime-map.c
+++ b/drivers/firmware/efi/runtime-map.c
@@ -63,11 +63,11 @@ static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr,
63 return map_attr->show(entry, buf); 63 return map_attr->show(entry, buf);
64} 64}
65 65
66static struct map_attribute map_type_attr = __ATTR_RO(type); 66static struct map_attribute map_type_attr = __ATTR_RO_MODE(type, 0400);
67static struct map_attribute map_phys_addr_attr = __ATTR_RO(phys_addr); 67static struct map_attribute map_phys_addr_attr = __ATTR_RO_MODE(phys_addr, 0400);
68static struct map_attribute map_virt_addr_attr = __ATTR_RO(virt_addr); 68static struct map_attribute map_virt_addr_attr = __ATTR_RO_MODE(virt_addr, 0400);
69static struct map_attribute map_num_pages_attr = __ATTR_RO(num_pages); 69static struct map_attribute map_num_pages_attr = __ATTR_RO_MODE(num_pages, 0400);
70static struct map_attribute map_attribute_attr = __ATTR_RO(attribute); 70static struct map_attribute map_attribute_attr = __ATTR_RO_MODE(attribute, 0400);
71 71
72/* 72/*
73 * These are default attributes that are added for every memmap entry. 73 * These are default attributes that are added for every memmap entry.
diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
index 35e553b3b190..e4b40f2b4627 100644
--- a/drivers/firmware/google/vpd.c
+++ b/drivers/firmware/google/vpd.c
@@ -295,38 +295,60 @@ static int vpd_probe(struct platform_device *pdev)
295 if (ret) 295 if (ret)
296 return ret; 296 return ret;
297 297
298 return vpd_sections_init(entry.cbmem_addr); 298 vpd_kobj = kobject_create_and_add("vpd", firmware_kobj);
299 if (!vpd_kobj)
300 return -ENOMEM;
301
302 ret = vpd_sections_init(entry.cbmem_addr);
303 if (ret) {
304 kobject_put(vpd_kobj);
305 return ret;
306 }
307
308 return 0;
309}
310
311static int vpd_remove(struct platform_device *pdev)
312{
313 vpd_section_destroy(&ro_vpd);
314 vpd_section_destroy(&rw_vpd);
315
316 kobject_put(vpd_kobj);
317
318 return 0;
299} 319}
300 320
301static struct platform_driver vpd_driver = { 321static struct platform_driver vpd_driver = {
302 .probe = vpd_probe, 322 .probe = vpd_probe,
323 .remove = vpd_remove,
303 .driver = { 324 .driver = {
304 .name = "vpd", 325 .name = "vpd",
305 }, 326 },
306}; 327};
307 328
329static struct platform_device *vpd_pdev;
330
308static int __init vpd_platform_init(void) 331static int __init vpd_platform_init(void)
309{ 332{
310 struct platform_device *pdev; 333 int ret;
311
312 pdev = platform_device_register_simple("vpd", -1, NULL, 0);
313 if (IS_ERR(pdev))
314 return PTR_ERR(pdev);
315 334
316 vpd_kobj = kobject_create_and_add("vpd", firmware_kobj); 335 ret = platform_driver_register(&vpd_driver);
317 if (!vpd_kobj) 336 if (ret)
318 return -ENOMEM; 337 return ret;
319 338
320 platform_driver_register(&vpd_driver); 339 vpd_pdev = platform_device_register_simple("vpd", -1, NULL, 0);
340 if (IS_ERR(vpd_pdev)) {
341 platform_driver_unregister(&vpd_driver);
342 return PTR_ERR(vpd_pdev);
343 }
321 344
322 return 0; 345 return 0;
323} 346}
324 347
325static void __exit vpd_platform_exit(void) 348static void __exit vpd_platform_exit(void)
326{ 349{
327 vpd_section_destroy(&ro_vpd); 350 platform_device_unregister(vpd_pdev);
328 vpd_section_destroy(&rw_vpd); 351 platform_driver_unregister(&vpd_driver);
329 kobject_put(vpd_kobj);
330} 352}
331 353
332module_init(vpd_platform_init); 354module_init(vpd_platform_init);
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index 5cfe39f7a45f..deb483064f53 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -582,9 +582,10 @@ static int fw_cfg_sysfs_remove(struct platform_device *pdev)
582{ 582{
583 pr_debug("fw_cfg: unloading.\n"); 583 pr_debug("fw_cfg: unloading.\n");
584 fw_cfg_sysfs_cache_cleanup(); 584 fw_cfg_sysfs_cache_cleanup();
585 sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr);
586 fw_cfg_io_cleanup();
585 fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset); 587 fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset);
586 fw_cfg_kobj_cleanup(fw_cfg_sel_ko); 588 fw_cfg_kobj_cleanup(fw_cfg_sel_ko);
587 fw_cfg_io_cleanup();
588 return 0; 589 return 0;
589} 590}
590 591
diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c
index 6b535ec858cc..15a1f4b348c4 100644
--- a/drivers/gpio/gpio-74x164.c
+++ b/drivers/gpio/gpio-74x164.c
@@ -23,6 +23,7 @@
23struct gen_74x164_chip { 23struct gen_74x164_chip {
24 struct gpio_chip gpio_chip; 24 struct gpio_chip gpio_chip;
25 struct mutex lock; 25 struct mutex lock;
26 struct gpio_desc *gpiod_oe;
26 u32 registers; 27 u32 registers;
27 /* 28 /*
28 * Since the registers are chained, every byte sent will make 29 * Since the registers are chained, every byte sent will make
@@ -31,8 +32,7 @@ struct gen_74x164_chip {
31 * register at the end of the transfer. So, to have a logical 32 * register at the end of the transfer. So, to have a logical
32 * numbering, store the bytes in reverse order. 33 * numbering, store the bytes in reverse order.
33 */ 34 */
34 u8 buffer[0]; 35 u8 buffer[];
35 struct gpio_desc *gpiod_oe;
36}; 36};
37 37
38static int __gen_74x164_write_config(struct gen_74x164_chip *chip) 38static int __gen_74x164_write_config(struct gen_74x164_chip *chip)
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index f75d8443ecaf..e4b3d7db68c9 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -383,7 +383,7 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
383 u32 mask; 383 u32 mask;
384 384
385 d = (struct davinci_gpio_controller *)irq_data_get_irq_handler_data(data); 385 d = (struct davinci_gpio_controller *)irq_data_get_irq_handler_data(data);
386 g = (struct davinci_gpio_regs __iomem *)d->regs; 386 g = (struct davinci_gpio_regs __iomem *)d->regs[0];
387 mask = __gpio_mask(data->irq - d->base_irq); 387 mask = __gpio_mask(data->irq - d->base_irq);
388 388
389 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) 389 if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index babb7bd2ba59..a0a5f9730aa7 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -947,7 +947,7 @@ static const struct of_device_id pca953x_dt_ids[] = {
947 { .compatible = "ti,tca6416", .data = OF_953X(16, PCA_INT), }, 947 { .compatible = "ti,tca6416", .data = OF_953X(16, PCA_INT), },
948 { .compatible = "ti,tca6424", .data = OF_953X(24, PCA_INT), }, 948 { .compatible = "ti,tca6424", .data = OF_953X(24, PCA_INT), },
949 949
950 { .compatible = "onsemi,pca9654", .data = OF_953X( 8, PCA_INT), }, 950 { .compatible = "onnn,pca9654", .data = OF_953X( 8, PCA_INT), },
951 951
952 { .compatible = "exar,xra1202", .data = OF_953X( 8, 0), }, 952 { .compatible = "exar,xra1202", .data = OF_953X( 8, 0), },
953 { } 953 { }
diff --git a/drivers/gpu/drm/amd/acp/Makefile b/drivers/gpu/drm/amd/acp/Makefile
index 8a08e81ee90d..d4176a3fb706 100644
--- a/drivers/gpu/drm/amd/acp/Makefile
+++ b/drivers/gpu/drm/amd/acp/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the ACP, which is a sub-component 23# Makefile for the ACP, which is a sub-component
3# of AMDSOC/AMDGPU drm driver. 24# of AMDSOC/AMDGPU drm driver.
4# It provides the HW control for ACP related functionalities. 25# It provides the HW control for ACP related functionalities.
diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
index 78d609123420..90202cf4cd1e 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -1,4 +1,24 @@
1# SPDX-License-Identifier: GPL-2.0 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
2# 22#
3# Makefile for the drm device driver. This driver provides support for the 23# Makefile for the drm device driver. This driver provides support for the
4# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 24# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 6c570d4e4516..f8edf5483f11 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1,4 +1,6 @@
1/* 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
2 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
3 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
4 * to deal in the Software without restriction, including without limitation 6 * to deal in the Software without restriction, including without limitation
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
index f337c316ec2c..06525f2c36c3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
@@ -1,4 +1,26 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
2#if !defined(_AMDGPU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) 24#if !defined(_AMDGPU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
3#define _AMDGPU_TRACE_H_ 25#define _AMDGPU_TRACE_H_
4 26
diff --git a/drivers/gpu/drm/amd/amdkfd/Makefile b/drivers/gpu/drm/amd/amdkfd/Makefile
index 7bb0bc0ca3d6..342c2d937b17 100644
--- a/drivers/gpu/drm/amd/amdkfd/Makefile
+++ b/drivers/gpu/drm/amd/amdkfd/Makefile
@@ -1,4 +1,24 @@
1# SPDX-License-Identifier: GPL-2.0 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
2# 22#
3# Makefile for Heterogenous System Architecture support for AMD GPU devices 23# Makefile for Heterogenous System Architecture support for AMD GPU devices
4# 24#
diff --git a/drivers/gpu/drm/amd/display/Makefile b/drivers/gpu/drm/amd/display/Makefile
index 8ba37dd9cf7f..c27c81cdeed3 100644
--- a/drivers/gpu/drm/amd/display/Makefile
+++ b/drivers/gpu/drm/amd/display/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the DAL (Display Abstract Layer), which is a sub-component 23# Makefile for the DAL (Display Abstract Layer), which is a sub-component
3# of the AMDGPU drm driver. 24# of the AMDGPU drm driver.
4# It provides the HW control for display related functionalities. 25# It provides the HW control for display related functionalities.
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile b/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile
index 4699e47aa76b..2b72009844f8 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'dm' sub-component of DAL. 23# Makefile for the 'dm' sub-component of DAL.
3# It provides the control and status of dm blocks. 24# It provides the control and status of dm blocks.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile
index 4f83e3011743..aed538a4d1ba 100644
--- a/drivers/gpu/drm/amd/display/dc/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for Display Core (dc) component. 23# Makefile for Display Core (dc) component.
3# 24#
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/basics/Makefile b/drivers/gpu/drm/amd/display/dc/basics/Makefile
index 43c5ccdeeb72..6af8c8a9ad80 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/basics/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'utils' sub-component of DAL. 23# Makefile for the 'utils' sub-component of DAL.
3# It provides the general basic services required by other DAL 24# It provides the general basic services required by other DAL
4# subcomponents. 25# subcomponents.
diff --git a/drivers/gpu/drm/amd/display/dc/bios/Makefile b/drivers/gpu/drm/amd/display/dc/bios/Makefile
index 6ec815dce9cc..239e86bbec5a 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/bios/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'bios' sub-component of DAL. 23# Makefile for the 'bios' sub-component of DAL.
3# It provides the parsing and executing controls for atom bios image. 24# It provides the parsing and executing controls for atom bios image.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
index 41ef35995b02..7959e382ed28 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'calcs' sub-component of DAL. 23# Makefile for the 'calcs' sub-component of DAL.
3# It calculates Bandwidth and Watermarks values for HW programming 24# It calculates Bandwidth and Watermarks values for HW programming
4# 25#
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c
index 6acee5426e4b..43c7a7fddb83 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c
@@ -1,4 +1,26 @@
1/* 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23/*
2 * dc_debug.c 24 * dc_debug.c
3 * 25 *
4 * Created on: Nov 3, 2016 26 * Created on: Nov 3, 2016
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index b7422d3b71ef..928895809867 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1,5 +1,5 @@
1/* 1/*
2* Copyright 2012-15 Advanced Micro Devices, Inc. 2 * Copyright 2012-15 Advanced Micro Devices, Inc.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c
index 0d84b2a1ccfd..90e81f7ba919 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c
@@ -1,4 +1,26 @@
1/* 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23/*
2 * dc_helper.c 24 * dc_helper.c
3 * 25 *
4 * Created on: Aug 30, 2016 26 * Created on: Aug 30, 2016
diff --git a/drivers/gpu/drm/amd/display/dc/dce/Makefile b/drivers/gpu/drm/amd/display/dc/dce/Makefile
index 8abec0bed379..11401fd8e535 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for common 'dce' logic 23# Makefile for common 'dce' logic
3# HW object file under this folder follow similar pattern for HW programming 24# HW object file under this folder follow similar pattern for HW programming
4# - register offset and/or shift + mask stored in the dec_hw struct 25# - register offset and/or shift + mask stored in the dec_hw struct
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/Makefile b/drivers/gpu/drm/amd/display/dc/dce100/Makefile
index ea40870624b3..a822d4e2a169 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce100/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'controller' sub-component of DAL. 23# Makefile for the 'controller' sub-component of DAL.
3# It provides the control and status of HW CRTC block. 24# It provides the control and status of HW CRTC block.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
index 90911258bdb3..3ea43e2a9450 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
@@ -1,5 +1,5 @@
1/* 1/*
2* Copyright 2012-15 Advanced Micro Devices, Inc. 2 * Copyright 2012-15 Advanced Micro Devices, Inc.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h
index de8fdf438f9b..2f366d66635d 100644
--- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h
+++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h
@@ -1,4 +1,27 @@
1/* 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 *
23 */
24/*
2 * dce100_resource.h 25 * dce100_resource.h
3 * 26 *
4 * Created on: 2016-01-20 27 * Created on: 2016-01-20
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/Makefile b/drivers/gpu/drm/amd/display/dc/dce110/Makefile
index 98d956e2f218..d564c0eb8b04 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce110/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'controller' sub-component of DAL. 23# Makefile for the 'controller' sub-component of DAL.
3# It provides the control and status of HW CRTC block. 24# It provides the control and status of HW CRTC block.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
index 61adb8174ce0..42df17f9aa8d 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
@@ -1,5 +1,5 @@
1/* 1/*
2* Copyright 2012-15 Advanced Micro Devices, Inc. 2 * Copyright 2012-15 Advanced Micro Devices, Inc.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
index 07d9303d5477..59b4cd329715 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
@@ -1,3 +1,26 @@
1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
1#include "dm_services.h" 24#include "dm_services.h"
2 25
3/* include DCE11 register header files */ 26/* include DCE11 register header files */
diff --git a/drivers/gpu/drm/amd/display/dc/dce112/Makefile b/drivers/gpu/drm/amd/display/dc/dce112/Makefile
index 265ac4310d85..8e090446d511 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce112/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'controller' sub-component of DAL. 23# Makefile for the 'controller' sub-component of DAL.
3# It provides the control and status of HW CRTC block. 24# It provides the control and status of HW CRTC block.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/dce120/Makefile b/drivers/gpu/drm/amd/display/dc/dce120/Makefile
index 1779b963525c..37db1f8d45ea 100644
--- a/drivers/gpu/drm/amd/display/dc/dce120/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce120/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'controller' sub-component of DAL. 23# Makefile for the 'controller' sub-component of DAL.
3# It provides the control and status of HW CRTC block. 24# It provides the control and status of HW CRTC block.
4 25
@@ -8,4 +29,4 @@ dce120_hw_sequencer.o
8 29
9AMD_DAL_DCE120 = $(addprefix $(AMDDALPATH)/dc/dce120/,$(DCE120)) 30AMD_DAL_DCE120 = $(addprefix $(AMDDALPATH)/dc/dce120/,$(DCE120))
10 31
11AMD_DISPLAY_FILES += $(AMD_DAL_DCE120) \ No newline at end of file 32AMD_DISPLAY_FILES += $(AMD_DAL_DCE120)
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/Makefile b/drivers/gpu/drm/amd/display/dc/dce80/Makefile
index c1105895e5fa..bc388aa4b2f5 100644
--- a/drivers/gpu/drm/amd/display/dc/dce80/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dce80/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'controller' sub-component of DAL. 23# Makefile for the 'controller' sub-component of DAL.
3# It provides the control and status of HW CRTC block. 24# It provides the control and status of HW CRTC block.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile
index ebeb88283a14..f565a6042970 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for DCN. 23# Makefile for DCN.
3 24
4DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ 25DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \
diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
index 87bab8e8139f..3488af2b5786 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'utils' sub-component of DAL. 23# Makefile for the 'utils' sub-component of DAL.
3# It provides the general basic services required by other DAL 24# It provides the general basic services required by other DAL
4# subcomponents. 25# subcomponents.
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/Makefile b/drivers/gpu/drm/amd/display/dc/gpio/Makefile
index 70d01a9e9676..562ee189d780 100644
--- a/drivers/gpu/drm/amd/display/dc/gpio/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/gpio/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'gpio' sub-component of DAL. 23# Makefile for the 'gpio' sub-component of DAL.
3# It provides the control and status of HW GPIO pins. 24# It provides the control and status of HW GPIO pins.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/Makefile b/drivers/gpu/drm/amd/display/dc/i2caux/Makefile
index 55603400acd9..352885cb4d07 100644
--- a/drivers/gpu/drm/amd/display/dc/i2caux/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/i2caux/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'i2c' sub-component of DAL. 23# Makefile for the 'i2c' sub-component of DAL.
3# It provides the control and status of HW i2c engine of the adapter. 24# It provides the control and status of HW i2c engine of the adapter.
4 25
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h b/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h
index 3d33bcda7059..498b7f05c5ca 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h
@@ -1,4 +1,26 @@
1/* 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23/*
2 * link_encoder.h 24 * link_encoder.h
3 * 25 *
4 * Created on: Oct 6, 2015 26 * Created on: Oct 6, 2015
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h b/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
index 3050afe8e8a9..b5db1692393c 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
@@ -1,4 +1,26 @@
1/* 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23/*
2 * stream_encoder.h 24 * stream_encoder.h
3 * 25 *
4 */ 26 */
diff --git a/drivers/gpu/drm/amd/display/dc/irq/Makefile b/drivers/gpu/drm/amd/display/dc/irq/Makefile
index c7e93f7223bd..498515aad4a5 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/irq/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'audio' sub-component of DAL. 23# Makefile for the 'audio' sub-component of DAL.
3# It provides the control and status of HW adapter resources, 24# It provides the control and status of HW adapter resources,
4# that are global for the ASIC and sharable between pipes. 25# that are global for the ASIC and sharable between pipes.
diff --git a/drivers/gpu/drm/amd/display/dc/virtual/Makefile b/drivers/gpu/drm/amd/display/dc/virtual/Makefile
index fc0b7318d9cc..07326d244d50 100644
--- a/drivers/gpu/drm/amd/display/dc/virtual/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/virtual/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the virtual sub-component of DAL. 23# Makefile for the virtual sub-component of DAL.
3# It provides the control and status of HW CRTC block. 24# It provides the control and status of HW CRTC block.
4 25
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/Makefile b/drivers/gpu/drm/amd/display/modules/freesync/Makefile
index db8e0ff6d7a9..fb9a499780e8 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/Makefile
+++ b/drivers/gpu/drm/amd/display/modules/freesync/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for the 'freesync' sub-module of DAL. 23# Makefile for the 'freesync' sub-module of DAL.
3# 24#
4 25
diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile
index 87cd7009e80f..690243001e1a 100644
--- a/drivers/gpu/drm/amd/lib/Makefile
+++ b/drivers/gpu/drm/amd/lib/Makefile
@@ -1,4 +1,25 @@
1# 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
2# Makefile for AMD library routines, which are used by AMD driver 23# Makefile for AMD library routines, which are used by AMD driver
3# components. 24# components.
4# 25#
diff --git a/drivers/gpu/drm/amd/powerplay/Makefile b/drivers/gpu/drm/amd/powerplay/Makefile
index 8c55c6e254d9..231785a9e24c 100644
--- a/drivers/gpu/drm/amd/powerplay/Makefile
+++ b/drivers/gpu/drm/amd/powerplay/Makefile
@@ -1,4 +1,24 @@
1# SPDX-License-Identifier: GPL-2.0 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
2 22
3subdir-ccflags-y += \ 23subdir-ccflags-y += \
4 -I$(FULL_AMD_PATH)/powerplay/inc/ \ 24 -I$(FULL_AMD_PATH)/powerplay/inc/ \
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
index 824fb6fe54ae..a212c27f2e17 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
@@ -1,4 +1,24 @@
1# SPDX-License-Identifier: GPL-2.0 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
2# 22#
3# Makefile for the 'hw manager' sub-component of powerplay. 23# Makefile for the 'hw manager' sub-component of powerplay.
4# It provides the hardware management services for the driver. 24# It provides the hardware management services for the driver.
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
index 67fae834bc67..8de384bf9a8f 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
@@ -1,4 +1,26 @@
1// SPDX-License-Identifier: GPL-2.0 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
2#include "pp_overdriver.h" 24#include "pp_overdriver.h"
3#include <linux/errno.h> 25#include <linux/errno.h>
4 26
diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu72.h b/drivers/gpu/drm/amd/powerplay/inc/smu72.h
index 08cd70c75d8b..9ad1cefff79f 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/smu72.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/smu72.h
@@ -1,4 +1,26 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
2#ifndef SMU72_H 24#ifndef SMU72_H
3#define SMU72_H 25#define SMU72_H
4 26
diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h b/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h
index b2edbc0c3c4d..2aefbb85f620 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h
@@ -1,4 +1,26 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
2#ifndef SMU72_DISCRETE_H 24#ifndef SMU72_DISCRETE_H
3#define SMU72_DISCRETE_H 25#define SMU72_DISCRETE_H
4 26
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/Makefile b/drivers/gpu/drm/amd/powerplay/smumgr/Makefile
index 30d3089d7dba..98e701e4f553 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/Makefile
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/Makefile
@@ -1,4 +1,24 @@
1# SPDX-License-Identifier: GPL-2.0 1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
2# 22#
3# Makefile for the 'smu manager' sub-component of powerplay. 23# Makefile for the 'smu manager' sub-component of powerplay.
4# It provides the smu management services for the driver. 24# It provides the smu management services for the driver.
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h b/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h
index 283a0dc25e84..07129e6c31a9 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h
+++ b/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h
@@ -1,4 +1,26 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/*
2 * Copyright 2017 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
2#if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) 24#if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
3#define _GPU_SCHED_TRACE_H_ 25#define _GPU_SCHED_TRACE_H_
4 26
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 5dd3f1cd074a..a8905049b9da 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -946,7 +946,9 @@ static int analogix_dp_get_modes(struct drm_connector *connector)
946 return 0; 946 return 0;
947 } 947 }
948 948
949 pm_runtime_get_sync(dp->dev);
949 edid = drm_get_edid(connector, &dp->aux.ddc); 950 edid = drm_get_edid(connector, &dp->aux.ddc);
951 pm_runtime_put(dp->dev);
950 if (edid) { 952 if (edid) {
951 drm_mode_connector_update_edid_property(&dp->connector, 953 drm_mode_connector_update_edid_property(&dp->connector,
952 edid); 954 edid);
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 25f4b2e9a44f..482014137953 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -152,6 +152,16 @@ static void drm_connector_free(struct kref *kref)
152 connector->funcs->destroy(connector); 152 connector->funcs->destroy(connector);
153} 153}
154 154
155static void drm_connector_free_work_fn(struct work_struct *work)
156{
157 struct drm_connector *connector =
158 container_of(work, struct drm_connector, free_work);
159 struct drm_device *dev = connector->dev;
160
161 drm_mode_object_unregister(dev, &connector->base);
162 connector->funcs->destroy(connector);
163}
164
155/** 165/**
156 * drm_connector_init - Init a preallocated connector 166 * drm_connector_init - Init a preallocated connector
157 * @dev: DRM device 167 * @dev: DRM device
@@ -181,6 +191,8 @@ int drm_connector_init(struct drm_device *dev,
181 if (ret) 191 if (ret)
182 return ret; 192 return ret;
183 193
194 INIT_WORK(&connector->free_work, drm_connector_free_work_fn);
195
184 connector->base.properties = &connector->properties; 196 connector->base.properties = &connector->properties;
185 connector->dev = dev; 197 connector->dev = dev;
186 connector->funcs = funcs; 198 connector->funcs = funcs;
@@ -529,6 +541,18 @@ void drm_connector_list_iter_begin(struct drm_device *dev,
529} 541}
530EXPORT_SYMBOL(drm_connector_list_iter_begin); 542EXPORT_SYMBOL(drm_connector_list_iter_begin);
531 543
544/*
545 * Extra-safe connector put function that works in any context. Should only be
546 * used from the connector_iter functions, where we never really expect to
547 * actually release the connector when dropping our final reference.
548 */
549static void
550drm_connector_put_safe(struct drm_connector *conn)
551{
552 if (refcount_dec_and_test(&conn->base.refcount.refcount))
553 schedule_work(&conn->free_work);
554}
555
532/** 556/**
533 * drm_connector_list_iter_next - return next connector 557 * drm_connector_list_iter_next - return next connector
534 * @iter: connectr_list iterator 558 * @iter: connectr_list iterator
@@ -561,7 +585,7 @@ drm_connector_list_iter_next(struct drm_connector_list_iter *iter)
561 spin_unlock_irqrestore(&config->connector_list_lock, flags); 585 spin_unlock_irqrestore(&config->connector_list_lock, flags);
562 586
563 if (old_conn) 587 if (old_conn)
564 drm_connector_put(old_conn); 588 drm_connector_put_safe(old_conn);
565 589
566 return iter->conn; 590 return iter->conn;
567} 591}
@@ -580,7 +604,7 @@ void drm_connector_list_iter_end(struct drm_connector_list_iter *iter)
580{ 604{
581 iter->dev = NULL; 605 iter->dev = NULL;
582 if (iter->conn) 606 if (iter->conn)
583 drm_connector_put(iter->conn); 607 drm_connector_put_safe(iter->conn);
584 lock_release(&connector_list_iter_dep_map, 0, _RET_IP_); 608 lock_release(&connector_list_iter_dep_map, 0, _RET_IP_);
585} 609}
586EXPORT_SYMBOL(drm_connector_list_iter_end); 610EXPORT_SYMBOL(drm_connector_list_iter_end);
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index cda8bfab6d3b..cc78b3d9e5e4 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -431,6 +431,8 @@ void drm_mode_config_cleanup(struct drm_device *dev)
431 drm_connector_put(connector); 431 drm_connector_put(connector);
432 } 432 }
433 drm_connector_list_iter_end(&conn_iter); 433 drm_connector_list_iter_end(&conn_iter);
434 /* connector_iter drops references in a work item. */
435 flush_scheduled_work();
434 if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) { 436 if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) {
435 drm_connector_list_iter_begin(dev, &conn_iter); 437 drm_connector_list_iter_begin(dev, &conn_iter);
436 drm_for_each_connector_iter(connector, &conn_iter) 438 drm_for_each_connector_iter(connector, &conn_iter)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 82b72425a42f..27e423b87266 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -37,8 +37,6 @@
37#define DRIVER_MAJOR 1 37#define DRIVER_MAJOR 1
38#define DRIVER_MINOR 0 38#define DRIVER_MINOR 0
39 39
40static struct device *exynos_drm_get_dma_device(void);
41
42int exynos_atomic_check(struct drm_device *dev, 40int exynos_atomic_check(struct drm_device *dev,
43 struct drm_atomic_state *state) 41 struct drm_atomic_state *state)
44{ 42{
@@ -148,7 +146,7 @@ static struct drm_driver exynos_drm_driver = {
148 .prime_handle_to_fd = drm_gem_prime_handle_to_fd, 146 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
149 .prime_fd_to_handle = drm_gem_prime_fd_to_handle, 147 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
150 .gem_prime_export = drm_gem_prime_export, 148 .gem_prime_export = drm_gem_prime_export,
151 .gem_prime_import = drm_gem_prime_import, 149 .gem_prime_import = exynos_drm_gem_prime_import,
152 .gem_prime_get_sg_table = exynos_drm_gem_prime_get_sg_table, 150 .gem_prime_get_sg_table = exynos_drm_gem_prime_get_sg_table,
153 .gem_prime_import_sg_table = exynos_drm_gem_prime_import_sg_table, 151 .gem_prime_import_sg_table = exynos_drm_gem_prime_import_sg_table,
154 .gem_prime_vmap = exynos_drm_gem_prime_vmap, 152 .gem_prime_vmap = exynos_drm_gem_prime_vmap,
@@ -301,6 +299,27 @@ static struct component_match *exynos_drm_match_add(struct device *dev)
301 return match ?: ERR_PTR(-ENODEV); 299 return match ?: ERR_PTR(-ENODEV);
302} 300}
303 301
302static struct device *exynos_drm_get_dma_device(void)
303{
304 int i;
305
306 for (i = 0; i < ARRAY_SIZE(exynos_drm_drivers); ++i) {
307 struct exynos_drm_driver_info *info = &exynos_drm_drivers[i];
308 struct device *dev;
309
310 if (!info->driver || !(info->flags & DRM_DMA_DEVICE))
311 continue;
312
313 while ((dev = bus_find_device(&platform_bus_type, NULL,
314 &info->driver->driver,
315 (void *)platform_bus_type.match))) {
316 put_device(dev);
317 return dev;
318 }
319 }
320 return NULL;
321}
322
304static int exynos_drm_bind(struct device *dev) 323static int exynos_drm_bind(struct device *dev)
305{ 324{
306 struct exynos_drm_private *private; 325 struct exynos_drm_private *private;
@@ -469,27 +488,6 @@ static struct platform_driver exynos_drm_platform_driver = {
469 }, 488 },
470}; 489};
471 490
472static struct device *exynos_drm_get_dma_device(void)
473{
474 int i;
475
476 for (i = 0; i < ARRAY_SIZE(exynos_drm_drivers); ++i) {
477 struct exynos_drm_driver_info *info = &exynos_drm_drivers[i];
478 struct device *dev;
479
480 if (!info->driver || !(info->flags & DRM_DMA_DEVICE))
481 continue;
482
483 while ((dev = bus_find_device(&platform_bus_type, NULL,
484 &info->driver->driver,
485 (void *)platform_bus_type.match))) {
486 put_device(dev);
487 return dev;
488 }
489 }
490 return NULL;
491}
492
493static void exynos_drm_unregister_devices(void) 491static void exynos_drm_unregister_devices(void)
494{ 492{
495 int i; 493 int i;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index c6847fa708fa..589d465a7f88 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -194,11 +194,6 @@ struct drm_exynos_file_private {
194/* 194/*
195 * Exynos drm private structure. 195 * Exynos drm private structure.
196 * 196 *
197 * @da_start: start address to device address space.
198 * with iommu, device address space starts from this address
199 * otherwise default one.
200 * @da_space_size: size of device address space.
201 * if 0 then default value is used for it.
202 * @pending: the crtcs that have pending updates to finish 197 * @pending: the crtcs that have pending updates to finish
203 * @lock: protect access to @pending 198 * @lock: protect access to @pending
204 * @wait: wait an atomic commit to finish 199 * @wait: wait an atomic commit to finish
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index 077de014d610..11cc01b47bc0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -247,6 +247,15 @@ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
247 if (IS_ERR(exynos_gem)) 247 if (IS_ERR(exynos_gem))
248 return exynos_gem; 248 return exynos_gem;
249 249
250 if (!is_drm_iommu_supported(dev) && (flags & EXYNOS_BO_NONCONTIG)) {
251 /*
252 * when no IOMMU is available, all allocated buffers are
253 * contiguous anyway, so drop EXYNOS_BO_NONCONTIG flag
254 */
255 flags &= ~EXYNOS_BO_NONCONTIG;
256 DRM_WARN("Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n");
257 }
258
250 /* set memory type and cache attribute from user side. */ 259 /* set memory type and cache attribute from user side. */
251 exynos_gem->flags = flags; 260 exynos_gem->flags = flags;
252 261
@@ -506,6 +515,12 @@ int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
506} 515}
507 516
508/* low-level interface prime helpers */ 517/* low-level interface prime helpers */
518struct drm_gem_object *exynos_drm_gem_prime_import(struct drm_device *dev,
519 struct dma_buf *dma_buf)
520{
521 return drm_gem_prime_import_dev(dev, dma_buf, to_dma_dev(dev));
522}
523
509struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj) 524struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj)
510{ 525{
511 struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); 526 struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h
index e86d1a9518c3..5a4c7de80f65 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h
@@ -117,6 +117,8 @@ int exynos_drm_gem_fault(struct vm_fault *vmf);
117int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); 117int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
118 118
119/* low-level interface prime helpers */ 119/* low-level interface prime helpers */
120struct drm_gem_object *exynos_drm_gem_prime_import(struct drm_device *dev,
121 struct dma_buf *dma_buf);
120struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj); 122struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj);
121struct drm_gem_object * 123struct drm_gem_object *
122exynos_drm_gem_prime_import_sg_table(struct drm_device *dev, 124exynos_drm_gem_prime_import_sg_table(struct drm_device *dev,
diff --git a/drivers/gpu/drm/i915/gvt/cfg_space.c b/drivers/gpu/drm/i915/gvt/cfg_space.c
index ab19545d59a1..4ce2e6bd0680 100644
--- a/drivers/gpu/drm/i915/gvt/cfg_space.c
+++ b/drivers/gpu/drm/i915/gvt/cfg_space.c
@@ -208,6 +208,20 @@ static int emulate_pci_command_write(struct intel_vgpu *vgpu,
208 return 0; 208 return 0;
209} 209}
210 210
211static int emulate_pci_rom_bar_write(struct intel_vgpu *vgpu,
212 unsigned int offset, void *p_data, unsigned int bytes)
213{
214 u32 *pval = (u32 *)(vgpu_cfg_space(vgpu) + offset);
215 u32 new = *(u32 *)(p_data);
216
217 if ((new & PCI_ROM_ADDRESS_MASK) == PCI_ROM_ADDRESS_MASK)
218 /* We don't have rom, return size of 0. */
219 *pval = 0;
220 else
221 vgpu_pci_cfg_mem_write(vgpu, offset, p_data, bytes);
222 return 0;
223}
224
211static int emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset, 225static int emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset,
212 void *p_data, unsigned int bytes) 226 void *p_data, unsigned int bytes)
213{ 227{
@@ -300,6 +314,11 @@ int intel_vgpu_emulate_cfg_write(struct intel_vgpu *vgpu, unsigned int offset,
300 } 314 }
301 315
302 switch (rounddown(offset, 4)) { 316 switch (rounddown(offset, 4)) {
317 case PCI_ROM_ADDRESS:
318 if (WARN_ON(!IS_ALIGNED(offset, 4)))
319 return -EINVAL;
320 return emulate_pci_rom_bar_write(vgpu, offset, p_data, bytes);
321
303 case PCI_BASE_ADDRESS_0 ... PCI_BASE_ADDRESS_5: 322 case PCI_BASE_ADDRESS_0 ... PCI_BASE_ADDRESS_5:
304 if (WARN_ON(!IS_ALIGNED(offset, 4))) 323 if (WARN_ON(!IS_ALIGNED(offset, 4)))
305 return -EINVAL; 324 return -EINVAL;
@@ -375,6 +394,8 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu,
375 pci_resource_len(gvt->dev_priv->drm.pdev, 0); 394 pci_resource_len(gvt->dev_priv->drm.pdev, 0);
376 vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE].size = 395 vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE].size =
377 pci_resource_len(gvt->dev_priv->drm.pdev, 2); 396 pci_resource_len(gvt->dev_priv->drm.pdev, 2);
397
398 memset(vgpu_cfg_space(vgpu) + PCI_ROM_ADDRESS, 0, 4);
378} 399}
379 400
380/** 401/**
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index 44cd5ff5e97d..1f840f6b81bb 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -137,17 +137,26 @@ static int new_mmio_info(struct intel_gvt *gvt,
137 return 0; 137 return 0;
138} 138}
139 139
140static int render_mmio_to_ring_id(struct intel_gvt *gvt, unsigned int reg) 140/**
141 * intel_gvt_render_mmio_to_ring_id - convert a mmio offset into ring id
142 * @gvt: a GVT device
143 * @offset: register offset
144 *
145 * Returns:
146 * Ring ID on success, negative error code if failed.
147 */
148int intel_gvt_render_mmio_to_ring_id(struct intel_gvt *gvt,
149 unsigned int offset)
141{ 150{
142 enum intel_engine_id id; 151 enum intel_engine_id id;
143 struct intel_engine_cs *engine; 152 struct intel_engine_cs *engine;
144 153
145 reg &= ~GENMASK(11, 0); 154 offset &= ~GENMASK(11, 0);
146 for_each_engine(engine, gvt->dev_priv, id) { 155 for_each_engine(engine, gvt->dev_priv, id) {
147 if (engine->mmio_base == reg) 156 if (engine->mmio_base == offset)
148 return id; 157 return id;
149 } 158 }
150 return -1; 159 return -ENODEV;
151} 160}
152 161
153#define offset_to_fence_num(offset) \ 162#define offset_to_fence_num(offset) \
@@ -1398,18 +1407,36 @@ static int skl_lcpll_write(struct intel_vgpu *vgpu, unsigned int offset,
1398static int mmio_read_from_hw(struct intel_vgpu *vgpu, 1407static int mmio_read_from_hw(struct intel_vgpu *vgpu,
1399 unsigned int offset, void *p_data, unsigned int bytes) 1408 unsigned int offset, void *p_data, unsigned int bytes)
1400{ 1409{
1401 struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv; 1410 struct intel_gvt *gvt = vgpu->gvt;
1411 struct drm_i915_private *dev_priv = gvt->dev_priv;
1412 int ring_id;
1413 u32 ring_base;
1414
1415 ring_id = intel_gvt_render_mmio_to_ring_id(gvt, offset);
1416 /**
1417 * Read HW reg in following case
1418 * a. the offset isn't a ring mmio
1419 * b. the offset's ring is running on hw.
1420 * c. the offset is ring time stamp mmio
1421 */
1422 if (ring_id >= 0)
1423 ring_base = dev_priv->engine[ring_id]->mmio_base;
1424
1425 if (ring_id < 0 || vgpu == gvt->scheduler.engine_owner[ring_id] ||
1426 offset == i915_mmio_reg_offset(RING_TIMESTAMP(ring_base)) ||
1427 offset == i915_mmio_reg_offset(RING_TIMESTAMP_UDW(ring_base))) {
1428 mmio_hw_access_pre(dev_priv);
1429 vgpu_vreg(vgpu, offset) = I915_READ(_MMIO(offset));
1430 mmio_hw_access_post(dev_priv);
1431 }
1402 1432
1403 mmio_hw_access_pre(dev_priv);
1404 vgpu_vreg(vgpu, offset) = I915_READ(_MMIO(offset));
1405 mmio_hw_access_post(dev_priv);
1406 return intel_vgpu_default_mmio_read(vgpu, offset, p_data, bytes); 1433 return intel_vgpu_default_mmio_read(vgpu, offset, p_data, bytes);
1407} 1434}
1408 1435
1409static int elsp_mmio_write(struct intel_vgpu *vgpu, unsigned int offset, 1436static int elsp_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
1410 void *p_data, unsigned int bytes) 1437 void *p_data, unsigned int bytes)
1411{ 1438{
1412 int ring_id = render_mmio_to_ring_id(vgpu->gvt, offset); 1439 int ring_id = intel_gvt_render_mmio_to_ring_id(vgpu->gvt, offset);
1413 struct intel_vgpu_execlist *execlist; 1440 struct intel_vgpu_execlist *execlist;
1414 u32 data = *(u32 *)p_data; 1441 u32 data = *(u32 *)p_data;
1415 int ret = 0; 1442 int ret = 0;
@@ -1436,7 +1463,7 @@ static int ring_mode_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
1436 void *p_data, unsigned int bytes) 1463 void *p_data, unsigned int bytes)
1437{ 1464{
1438 u32 data = *(u32 *)p_data; 1465 u32 data = *(u32 *)p_data;
1439 int ring_id = render_mmio_to_ring_id(vgpu->gvt, offset); 1466 int ring_id = intel_gvt_render_mmio_to_ring_id(vgpu->gvt, offset);
1440 bool enable_execlist; 1467 bool enable_execlist;
1441 1468
1442 write_vreg(vgpu, offset, p_data, bytes); 1469 write_vreg(vgpu, offset, p_data, bytes);
diff --git a/drivers/gpu/drm/i915/gvt/mmio.h b/drivers/gpu/drm/i915/gvt/mmio.h
index 32cd64ddad26..dbc04ad2c7a1 100644
--- a/drivers/gpu/drm/i915/gvt/mmio.h
+++ b/drivers/gpu/drm/i915/gvt/mmio.h
@@ -65,6 +65,8 @@ struct intel_gvt_mmio_info {
65 struct hlist_node node; 65 struct hlist_node node;
66}; 66};
67 67
68int intel_gvt_render_mmio_to_ring_id(struct intel_gvt *gvt,
69 unsigned int reg);
68unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt); 70unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt);
69bool intel_gvt_match_device(struct intel_gvt *gvt, unsigned long device); 71bool intel_gvt_match_device(struct intel_gvt *gvt, unsigned long device);
70 72
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 3ac1dc97a7a0..69f8f0d155b9 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -131,6 +131,20 @@ static inline bool is_gvt_request(struct drm_i915_gem_request *req)
131 return i915_gem_context_force_single_submission(req->ctx); 131 return i915_gem_context_force_single_submission(req->ctx);
132} 132}
133 133
134static void save_ring_hw_state(struct intel_vgpu *vgpu, int ring_id)
135{
136 struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
137 u32 ring_base = dev_priv->engine[ring_id]->mmio_base;
138 i915_reg_t reg;
139
140 reg = RING_INSTDONE(ring_base);
141 vgpu_vreg(vgpu, i915_mmio_reg_offset(reg)) = I915_READ_FW(reg);
142 reg = RING_ACTHD(ring_base);
143 vgpu_vreg(vgpu, i915_mmio_reg_offset(reg)) = I915_READ_FW(reg);
144 reg = RING_ACTHD_UDW(ring_base);
145 vgpu_vreg(vgpu, i915_mmio_reg_offset(reg)) = I915_READ_FW(reg);
146}
147
134static int shadow_context_status_change(struct notifier_block *nb, 148static int shadow_context_status_change(struct notifier_block *nb,
135 unsigned long action, void *data) 149 unsigned long action, void *data)
136{ 150{
@@ -175,9 +189,12 @@ static int shadow_context_status_change(struct notifier_block *nb,
175 atomic_set(&workload->shadow_ctx_active, 1); 189 atomic_set(&workload->shadow_ctx_active, 1);
176 break; 190 break;
177 case INTEL_CONTEXT_SCHEDULE_OUT: 191 case INTEL_CONTEXT_SCHEDULE_OUT:
178 case INTEL_CONTEXT_SCHEDULE_PREEMPTED: 192 save_ring_hw_state(workload->vgpu, ring_id);
179 atomic_set(&workload->shadow_ctx_active, 0); 193 atomic_set(&workload->shadow_ctx_active, 0);
180 break; 194 break;
195 case INTEL_CONTEXT_SCHEDULE_PREEMPTED:
196 save_ring_hw_state(workload->vgpu, ring_id);
197 break;
181 default: 198 default:
182 WARN_ON(1); 199 WARN_ON(1);
183 return NOTIFY_OK; 200 return NOTIFY_OK;
@@ -740,6 +757,9 @@ int intel_vgpu_init_gvt_context(struct intel_vgpu *vgpu)
740 if (IS_ERR(vgpu->shadow_ctx)) 757 if (IS_ERR(vgpu->shadow_ctx))
741 return PTR_ERR(vgpu->shadow_ctx); 758 return PTR_ERR(vgpu->shadow_ctx);
742 759
760 if (INTEL_INFO(vgpu->gvt->dev_priv)->has_logical_ring_preemption)
761 vgpu->shadow_ctx->priority = INT_MAX;
762
743 vgpu->shadow_ctx->engine[RCS].initialised = true; 763 vgpu->shadow_ctx->engine[RCS].initialised = true;
744 764
745 bitmap_zero(vgpu->shadow_ctx_desc_updated, I915_NUM_ENGINES); 765 bitmap_zero(vgpu->shadow_ctx_desc_updated, I915_NUM_ENGINES);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3a140eedfc83..ad4050f7ab3b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4712,17 +4712,19 @@ int i915_gem_suspend(struct drm_i915_private *dev_priv)
4712 * state. Fortunately, the kernel_context is disposable and we do 4712 * state. Fortunately, the kernel_context is disposable and we do
4713 * not rely on its state. 4713 * not rely on its state.
4714 */ 4714 */
4715 ret = i915_gem_switch_to_kernel_context(dev_priv); 4715 if (!i915_terminally_wedged(&dev_priv->gpu_error)) {
4716 if (ret) 4716 ret = i915_gem_switch_to_kernel_context(dev_priv);
4717 goto err_unlock; 4717 if (ret)
4718 goto err_unlock;
4718 4719
4719 ret = i915_gem_wait_for_idle(dev_priv, 4720 ret = i915_gem_wait_for_idle(dev_priv,
4720 I915_WAIT_INTERRUPTIBLE | 4721 I915_WAIT_INTERRUPTIBLE |
4721 I915_WAIT_LOCKED); 4722 I915_WAIT_LOCKED);
4722 if (ret && ret != -EIO) 4723 if (ret && ret != -EIO)
4723 goto err_unlock; 4724 goto err_unlock;
4724 4725
4725 assert_kernel_context_is_current(dev_priv); 4726 assert_kernel_context_is_current(dev_priv);
4727 }
4726 i915_gem_contexts_lost(dev_priv); 4728 i915_gem_contexts_lost(dev_priv);
4727 mutex_unlock(&dev->struct_mutex); 4729 mutex_unlock(&dev->struct_mutex);
4728 4730
@@ -4946,8 +4948,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
4946{ 4948{
4947 int ret; 4949 int ret;
4948 4950
4949 mutex_lock(&dev_priv->drm.struct_mutex);
4950
4951 /* 4951 /*
4952 * We need to fallback to 4K pages since gvt gtt handling doesn't 4952 * We need to fallback to 4K pages since gvt gtt handling doesn't
4953 * support huge page entries - we will need to check either hypervisor 4953 * support huge page entries - we will need to check either hypervisor
@@ -4967,18 +4967,19 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
4967 dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup; 4967 dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup;
4968 } 4968 }
4969 4969
4970 ret = i915_gem_init_userptr(dev_priv);
4971 if (ret)
4972 return ret;
4973
4970 /* This is just a security blanket to placate dragons. 4974 /* This is just a security blanket to placate dragons.
4971 * On some systems, we very sporadically observe that the first TLBs 4975 * On some systems, we very sporadically observe that the first TLBs
4972 * used by the CS may be stale, despite us poking the TLB reset. If 4976 * used by the CS may be stale, despite us poking the TLB reset. If
4973 * we hold the forcewake during initialisation these problems 4977 * we hold the forcewake during initialisation these problems
4974 * just magically go away. 4978 * just magically go away.
4975 */ 4979 */
4980 mutex_lock(&dev_priv->drm.struct_mutex);
4976 intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL); 4981 intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
4977 4982
4978 ret = i915_gem_init_userptr(dev_priv);
4979 if (ret)
4980 goto out_unlock;
4981
4982 ret = i915_gem_init_ggtt(dev_priv); 4983 ret = i915_gem_init_ggtt(dev_priv);
4983 if (ret) 4984 if (ret)
4984 goto out_unlock; 4985 goto out_unlock;
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 68a58cce6ab1..3866c49bc390 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2951,9 +2951,6 @@ enum i915_power_well_id {
2951#define ILK_DPFC_CHICKEN _MMIO(0x43224) 2951#define ILK_DPFC_CHICKEN _MMIO(0x43224)
2952#define ILK_DPFC_DISABLE_DUMMY0 (1<<8) 2952#define ILK_DPFC_DISABLE_DUMMY0 (1<<8)
2953#define ILK_DPFC_NUKE_ON_ANY_MODIFICATION (1<<23) 2953#define ILK_DPFC_NUKE_ON_ANY_MODIFICATION (1<<23)
2954#define GLK_SKIP_SEG_EN (1<<12)
2955#define GLK_SKIP_SEG_COUNT_MASK (3<<10)
2956#define GLK_SKIP_SEG_COUNT(x) ((x)<<10)
2957#define ILK_FBC_RT_BASE _MMIO(0x2128) 2954#define ILK_FBC_RT_BASE _MMIO(0x2128)
2958#define ILK_FBC_RT_VALID (1<<0) 2955#define ILK_FBC_RT_VALID (1<<0)
2959#define SNB_FBC_FRONT_BUFFER (1<<1) 2956#define SNB_FBC_FRONT_BUFFER (1<<1)
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 933c18fd4258..e0843bb99169 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2131,6 +2131,7 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder,
2131 if (IS_CANNONLAKE(dev_priv)) { 2131 if (IS_CANNONLAKE(dev_priv)) {
2132 /* Configure DPCLKA_CFGCR0 to map the DPLL to the DDI. */ 2132 /* Configure DPCLKA_CFGCR0 to map the DPLL to the DDI. */
2133 val = I915_READ(DPCLKA_CFGCR0); 2133 val = I915_READ(DPCLKA_CFGCR0);
2134 val &= ~DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(port);
2134 val |= DPCLKA_CFGCR0_DDI_CLK_SEL(pll->id, port); 2135 val |= DPCLKA_CFGCR0_DDI_CLK_SEL(pll->id, port);
2135 I915_WRITE(DPCLKA_CFGCR0, val); 2136 I915_WRITE(DPCLKA_CFGCR0, val);
2136 2137
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 878acc432a4b..e8ccf89cb17b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1000,7 +1000,8 @@ enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
1000 return crtc->config->cpu_transcoder; 1000 return crtc->config->cpu_transcoder;
1001} 1001}
1002 1002
1003static bool pipe_dsl_stopped(struct drm_i915_private *dev_priv, enum pipe pipe) 1003static bool pipe_scanline_is_moving(struct drm_i915_private *dev_priv,
1004 enum pipe pipe)
1004{ 1005{
1005 i915_reg_t reg = PIPEDSL(pipe); 1006 i915_reg_t reg = PIPEDSL(pipe);
1006 u32 line1, line2; 1007 u32 line1, line2;
@@ -1015,7 +1016,28 @@ static bool pipe_dsl_stopped(struct drm_i915_private *dev_priv, enum pipe pipe)
1015 msleep(5); 1016 msleep(5);
1016 line2 = I915_READ(reg) & line_mask; 1017 line2 = I915_READ(reg) & line_mask;
1017 1018
1018 return line1 == line2; 1019 return line1 != line2;
1020}
1021
1022static void wait_for_pipe_scanline_moving(struct intel_crtc *crtc, bool state)
1023{
1024 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1025 enum pipe pipe = crtc->pipe;
1026
1027 /* Wait for the display line to settle/start moving */
1028 if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100))
1029 DRM_ERROR("pipe %c scanline %s wait timed out\n",
1030 pipe_name(pipe), onoff(state));
1031}
1032
1033static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc)
1034{
1035 wait_for_pipe_scanline_moving(crtc, false);
1036}
1037
1038static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc)
1039{
1040 wait_for_pipe_scanline_moving(crtc, true);
1019} 1041}
1020 1042
1021/* 1043/*
@@ -1038,7 +1060,6 @@ static void intel_wait_for_pipe_off(struct intel_crtc *crtc)
1038{ 1060{
1039 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); 1061 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1040 enum transcoder cpu_transcoder = crtc->config->cpu_transcoder; 1062 enum transcoder cpu_transcoder = crtc->config->cpu_transcoder;
1041 enum pipe pipe = crtc->pipe;
1042 1063
1043 if (INTEL_GEN(dev_priv) >= 4) { 1064 if (INTEL_GEN(dev_priv) >= 4) {
1044 i915_reg_t reg = PIPECONF(cpu_transcoder); 1065 i915_reg_t reg = PIPECONF(cpu_transcoder);
@@ -1049,9 +1070,7 @@ static void intel_wait_for_pipe_off(struct intel_crtc *crtc)
1049 100)) 1070 100))
1050 WARN(1, "pipe_off wait timed out\n"); 1071 WARN(1, "pipe_off wait timed out\n");
1051 } else { 1072 } else {
1052 /* Wait for the display line to settle */ 1073 intel_wait_for_pipe_scanline_stopped(crtc);
1053 if (wait_for(pipe_dsl_stopped(dev_priv, pipe), 100))
1054 WARN(1, "pipe_off wait timed out\n");
1055 } 1074 }
1056} 1075}
1057 1076
@@ -1936,15 +1955,14 @@ static void intel_enable_pipe(struct intel_crtc *crtc)
1936 POSTING_READ(reg); 1955 POSTING_READ(reg);
1937 1956
1938 /* 1957 /*
1939 * Until the pipe starts DSL will read as 0, which would cause 1958 * Until the pipe starts PIPEDSL reads will return a stale value,
1940 * an apparent vblank timestamp jump, which messes up also the 1959 * which causes an apparent vblank timestamp jump when PIPEDSL
1941 * frame count when it's derived from the timestamps. So let's 1960 * resets to its proper value. That also messes up the frame count
1942 * wait for the pipe to start properly before we call 1961 * when it's derived from the timestamps. So let's wait for the
1943 * drm_crtc_vblank_on() 1962 * pipe to start properly before we call drm_crtc_vblank_on()
1944 */ 1963 */
1945 if (dev->max_vblank_count == 0 && 1964 if (dev->max_vblank_count == 0)
1946 wait_for(intel_get_crtc_scanline(crtc) != crtc->scanline_offset, 50)) 1965 intel_wait_for_pipe_scanline_moving(crtc);
1947 DRM_ERROR("pipe %c didn't start\n", pipe_name(pipe));
1948} 1966}
1949 1967
1950/** 1968/**
@@ -14643,6 +14661,8 @@ void i830_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
14643 14661
14644void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe) 14662void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
14645{ 14663{
14664 struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
14665
14646 DRM_DEBUG_KMS("disabling pipe %c due to force quirk\n", 14666 DRM_DEBUG_KMS("disabling pipe %c due to force quirk\n",
14647 pipe_name(pipe)); 14667 pipe_name(pipe));
14648 14668
@@ -14652,8 +14672,7 @@ void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
14652 I915_WRITE(PIPECONF(pipe), 0); 14672 I915_WRITE(PIPECONF(pipe), 0);
14653 POSTING_READ(PIPECONF(pipe)); 14673 POSTING_READ(PIPECONF(pipe));
14654 14674
14655 if (wait_for(pipe_dsl_stopped(dev_priv, pipe), 100)) 14675 intel_wait_for_pipe_scanline_stopped(crtc);
14656 DRM_ERROR("pipe %c off wait timed out\n", pipe_name(pipe));
14657 14676
14658 I915_WRITE(DPLL(pipe), DPLL_VGA_MODE_DIS); 14677 I915_WRITE(DPLL(pipe), DPLL_VGA_MODE_DIS);
14659 POSTING_READ(DPLL(pipe)); 14678 POSTING_READ(DPLL(pipe));
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index f4a4e9496893..f0d0dbab4150 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -124,7 +124,6 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv)
124 124
125static void glk_init_clock_gating(struct drm_i915_private *dev_priv) 125static void glk_init_clock_gating(struct drm_i915_private *dev_priv)
126{ 126{
127 u32 val;
128 gen9_init_clock_gating(dev_priv); 127 gen9_init_clock_gating(dev_priv);
129 128
130 /* 129 /*
@@ -144,11 +143,6 @@ static void glk_init_clock_gating(struct drm_i915_private *dev_priv)
144 I915_WRITE(CHICKEN_MISC_2, val); 143 I915_WRITE(CHICKEN_MISC_2, val);
145 } 144 }
146 145
147 /* Display WA #1133: WaFbcSkipSegments:glk */
148 val = I915_READ(ILK_DPFC_CHICKEN);
149 val &= ~GLK_SKIP_SEG_COUNT_MASK;
150 val |= GLK_SKIP_SEG_EN | GLK_SKIP_SEG_COUNT(1);
151 I915_WRITE(ILK_DPFC_CHICKEN, val);
152} 146}
153 147
154static void i915_pineview_get_mem_freq(struct drm_i915_private *dev_priv) 148static void i915_pineview_get_mem_freq(struct drm_i915_private *dev_priv)
@@ -8517,7 +8511,6 @@ static void cnp_init_clock_gating(struct drm_i915_private *dev_priv)
8517 8511
8518static void cnl_init_clock_gating(struct drm_i915_private *dev_priv) 8512static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
8519{ 8513{
8520 u32 val;
8521 cnp_init_clock_gating(dev_priv); 8514 cnp_init_clock_gating(dev_priv);
8522 8515
8523 /* This is not an Wa. Enable for better image quality */ 8516 /* This is not an Wa. Enable for better image quality */
@@ -8537,12 +8530,6 @@ static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
8537 I915_WRITE(SLICE_UNIT_LEVEL_CLKGATE, 8530 I915_WRITE(SLICE_UNIT_LEVEL_CLKGATE,
8538 I915_READ(SLICE_UNIT_LEVEL_CLKGATE) | 8531 I915_READ(SLICE_UNIT_LEVEL_CLKGATE) |
8539 SARBUNIT_CLKGATE_DIS); 8532 SARBUNIT_CLKGATE_DIS);
8540
8541 /* Display WA #1133: WaFbcSkipSegments:cnl */
8542 val = I915_READ(ILK_DPFC_CHICKEN);
8543 val &= ~GLK_SKIP_SEG_COUNT_MASK;
8544 val |= GLK_SKIP_SEG_EN | GLK_SKIP_SEG_COUNT(1);
8545 I915_WRITE(ILK_DPFC_CHICKEN, val);
8546} 8533}
8547 8534
8548static void cfl_init_clock_gating(struct drm_i915_private *dev_priv) 8535static void cfl_init_clock_gating(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 8d7172e8381d..44343a2bf55c 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -81,6 +81,7 @@ struct ttm_page_pool {
81 char *name; 81 char *name;
82 unsigned long nfrees; 82 unsigned long nfrees;
83 unsigned long nrefills; 83 unsigned long nrefills;
84 unsigned int order;
84}; 85};
85 86
86/** 87/**
@@ -222,6 +223,17 @@ static struct kobj_type ttm_pool_kobj_type = {
222static struct ttm_pool_manager *_manager; 223static struct ttm_pool_manager *_manager;
223 224
224#ifndef CONFIG_X86 225#ifndef CONFIG_X86
226static int set_pages_wb(struct page *page, int numpages)
227{
228#if IS_ENABLED(CONFIG_AGP)
229 int i;
230
231 for (i = 0; i < numpages; i++)
232 unmap_page_from_agp(page++);
233#endif
234 return 0;
235}
236
225static int set_pages_array_wb(struct page **pages, int addrinarray) 237static int set_pages_array_wb(struct page **pages, int addrinarray)
226{ 238{
227#if IS_ENABLED(CONFIG_AGP) 239#if IS_ENABLED(CONFIG_AGP)
@@ -284,13 +296,23 @@ static struct ttm_page_pool *ttm_get_pool(int flags, bool huge,
284} 296}
285 297
286/* set memory back to wb and free the pages. */ 298/* set memory back to wb and free the pages. */
287static void ttm_pages_put(struct page *pages[], unsigned npages) 299static void ttm_pages_put(struct page *pages[], unsigned npages,
300 unsigned int order)
288{ 301{
289 unsigned i; 302 unsigned int i, pages_nr = (1 << order);
290 if (set_pages_array_wb(pages, npages)) 303
291 pr_err("Failed to set %d pages to wb!\n", npages); 304 if (order == 0) {
292 for (i = 0; i < npages; ++i) 305 if (set_pages_array_wb(pages, npages))
293 __free_page(pages[i]); 306 pr_err("Failed to set %d pages to wb!\n", npages);
307 }
308
309 for (i = 0; i < npages; ++i) {
310 if (order > 0) {
311 if (set_pages_wb(pages[i], pages_nr))
312 pr_err("Failed to set %d pages to wb!\n", pages_nr);
313 }
314 __free_pages(pages[i], order);
315 }
294} 316}
295 317
296static void ttm_pool_update_free_locked(struct ttm_page_pool *pool, 318static void ttm_pool_update_free_locked(struct ttm_page_pool *pool,
@@ -353,7 +375,7 @@ restart:
353 */ 375 */
354 spin_unlock_irqrestore(&pool->lock, irq_flags); 376 spin_unlock_irqrestore(&pool->lock, irq_flags);
355 377
356 ttm_pages_put(pages_to_free, freed_pages); 378 ttm_pages_put(pages_to_free, freed_pages, pool->order);
357 if (likely(nr_free != FREE_ALL_PAGES)) 379 if (likely(nr_free != FREE_ALL_PAGES))
358 nr_free -= freed_pages; 380 nr_free -= freed_pages;
359 381
@@ -388,7 +410,7 @@ restart:
388 spin_unlock_irqrestore(&pool->lock, irq_flags); 410 spin_unlock_irqrestore(&pool->lock, irq_flags);
389 411
390 if (freed_pages) 412 if (freed_pages)
391 ttm_pages_put(pages_to_free, freed_pages); 413 ttm_pages_put(pages_to_free, freed_pages, pool->order);
392out: 414out:
393 if (pages_to_free != static_buf) 415 if (pages_to_free != static_buf)
394 kfree(pages_to_free); 416 kfree(pages_to_free);
@@ -412,6 +434,7 @@ ttm_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
412 struct ttm_page_pool *pool; 434 struct ttm_page_pool *pool;
413 int shrink_pages = sc->nr_to_scan; 435 int shrink_pages = sc->nr_to_scan;
414 unsigned long freed = 0; 436 unsigned long freed = 0;
437 unsigned int nr_free_pool;
415 438
416 if (!mutex_trylock(&lock)) 439 if (!mutex_trylock(&lock))
417 return SHRINK_STOP; 440 return SHRINK_STOP;
@@ -419,12 +442,19 @@ ttm_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
419 /* select start pool in round robin fashion */ 442 /* select start pool in round robin fashion */
420 for (i = 0; i < NUM_POOLS; ++i) { 443 for (i = 0; i < NUM_POOLS; ++i) {
421 unsigned nr_free = shrink_pages; 444 unsigned nr_free = shrink_pages;
445 unsigned page_nr;
446
422 if (shrink_pages == 0) 447 if (shrink_pages == 0)
423 break; 448 break;
449
424 pool = &_manager->pools[(i + pool_offset)%NUM_POOLS]; 450 pool = &_manager->pools[(i + pool_offset)%NUM_POOLS];
451 page_nr = (1 << pool->order);
425 /* OK to use static buffer since global mutex is held. */ 452 /* OK to use static buffer since global mutex is held. */
426 shrink_pages = ttm_page_pool_free(pool, nr_free, true); 453 nr_free_pool = roundup(nr_free, page_nr) >> pool->order;
427 freed += nr_free - shrink_pages; 454 shrink_pages = ttm_page_pool_free(pool, nr_free_pool, true);
455 freed += (nr_free_pool - shrink_pages) << pool->order;
456 if (freed >= sc->nr_to_scan)
457 break;
428 } 458 }
429 mutex_unlock(&lock); 459 mutex_unlock(&lock);
430 return freed; 460 return freed;
@@ -436,9 +466,12 @@ ttm_pool_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
436{ 466{
437 unsigned i; 467 unsigned i;
438 unsigned long count = 0; 468 unsigned long count = 0;
469 struct ttm_page_pool *pool;
439 470
440 for (i = 0; i < NUM_POOLS; ++i) 471 for (i = 0; i < NUM_POOLS; ++i) {
441 count += _manager->pools[i].npages; 472 pool = &_manager->pools[i];
473 count += (pool->npages << pool->order);
474 }
442 475
443 return count; 476 return count;
444} 477}
@@ -510,8 +543,7 @@ static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags,
510 int r = 0; 543 int r = 0;
511 unsigned i, j, cpages; 544 unsigned i, j, cpages;
512 unsigned npages = 1 << order; 545 unsigned npages = 1 << order;
513 unsigned max_cpages = min(count, 546 unsigned max_cpages = min(count, (unsigned)NUM_PAGES_TO_ALLOC);
514 (unsigned)(PAGE_SIZE/sizeof(struct page *)));
515 547
516 /* allocate array for page caching change */ 548 /* allocate array for page caching change */
517 caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL); 549 caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL);
@@ -845,7 +877,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,
845#endif 877#endif
846 struct list_head plist; 878 struct list_head plist;
847 struct page *p = NULL; 879 struct page *p = NULL;
848 unsigned count; 880 unsigned count, first;
849 int r; 881 int r;
850 882
851 /* No pool for cached pages */ 883 /* No pool for cached pages */
@@ -886,6 +918,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,
886 } 918 }
887#endif 919#endif
888 920
921 first = i;
889 while (npages) { 922 while (npages) {
890 p = alloc_page(gfp_flags); 923 p = alloc_page(gfp_flags);
891 if (!p) { 924 if (!p) {
@@ -893,6 +926,10 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,
893 return -ENOMEM; 926 return -ENOMEM;
894 } 927 }
895 928
929 /* Swap the pages if we detect consecutive order */
930 if (i > first && pages[i - 1] == p - 1)
931 swap(p, pages[i - 1]);
932
896 pages[i++] = p; 933 pages[i++] = p;
897 --npages; 934 --npages;
898 } 935 }
@@ -921,8 +958,15 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,
921 r = ttm_page_pool_get_pages(pool, &plist, flags, cstate, 958 r = ttm_page_pool_get_pages(pool, &plist, flags, cstate,
922 npages - count, 0); 959 npages - count, 0);
923 960
924 list_for_each_entry(p, &plist, lru) 961 first = count;
925 pages[count++] = p; 962 list_for_each_entry(p, &plist, lru) {
963 struct page *tmp = p;
964
965 /* Swap the pages if we detect consecutive order */
966 if (count > first && pages[count - 1] == tmp - 1)
967 swap(tmp, pages[count - 1]);
968 pages[count++] = tmp;
969 }
926 970
927 if (r) { 971 if (r) {
928 /* If there is any pages in the list put them back to 972 /* If there is any pages in the list put them back to
@@ -937,7 +981,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags,
937} 981}
938 982
939static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, gfp_t flags, 983static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, gfp_t flags,
940 char *name) 984 char *name, unsigned int order)
941{ 985{
942 spin_lock_init(&pool->lock); 986 spin_lock_init(&pool->lock);
943 pool->fill_lock = false; 987 pool->fill_lock = false;
@@ -945,11 +989,17 @@ static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, gfp_t flags,
945 pool->npages = pool->nfrees = 0; 989 pool->npages = pool->nfrees = 0;
946 pool->gfp_flags = flags; 990 pool->gfp_flags = flags;
947 pool->name = name; 991 pool->name = name;
992 pool->order = order;
948} 993}
949 994
950int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages) 995int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages)
951{ 996{
952 int ret; 997 int ret;
998#ifdef CONFIG_TRANSPARENT_HUGEPAGE
999 unsigned order = HPAGE_PMD_ORDER;
1000#else
1001 unsigned order = 0;
1002#endif
953 1003
954 WARN_ON(_manager); 1004 WARN_ON(_manager);
955 1005
@@ -957,23 +1007,23 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages)
957 1007
958 _manager = kzalloc(sizeof(*_manager), GFP_KERNEL); 1008 _manager = kzalloc(sizeof(*_manager), GFP_KERNEL);
959 1009
960 ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc"); 1010 ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc", 0);
961 1011
962 ttm_page_pool_init_locked(&_manager->uc_pool, GFP_HIGHUSER, "uc"); 1012 ttm_page_pool_init_locked(&_manager->uc_pool, GFP_HIGHUSER, "uc", 0);
963 1013
964 ttm_page_pool_init_locked(&_manager->wc_pool_dma32, 1014 ttm_page_pool_init_locked(&_manager->wc_pool_dma32,
965 GFP_USER | GFP_DMA32, "wc dma"); 1015 GFP_USER | GFP_DMA32, "wc dma", 0);
966 1016
967 ttm_page_pool_init_locked(&_manager->uc_pool_dma32, 1017 ttm_page_pool_init_locked(&_manager->uc_pool_dma32,
968 GFP_USER | GFP_DMA32, "uc dma"); 1018 GFP_USER | GFP_DMA32, "uc dma", 0);
969 1019
970 ttm_page_pool_init_locked(&_manager->wc_pool_huge, 1020 ttm_page_pool_init_locked(&_manager->wc_pool_huge,
971 GFP_TRANSHUGE & ~(__GFP_MOVABLE | __GFP_COMP), 1021 GFP_TRANSHUGE & ~(__GFP_MOVABLE | __GFP_COMP),
972 "wc huge"); 1022 "wc huge", order);
973 1023
974 ttm_page_pool_init_locked(&_manager->uc_pool_huge, 1024 ttm_page_pool_init_locked(&_manager->uc_pool_huge,
975 GFP_TRANSHUGE & ~(__GFP_MOVABLE | __GFP_COMP) 1025 GFP_TRANSHUGE & ~(__GFP_MOVABLE | __GFP_COMP)
976 , "uc huge"); 1026 , "uc huge", order);
977 1027
978 _manager->options.max_size = max_pages; 1028 _manager->options.max_size = max_pages;
979 _manager->options.small = SMALL_ALLOCATION; 1029 _manager->options.small = SMALL_ALLOCATION;
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index 4ae45d7dac42..2decc8e2c79f 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -637,7 +637,8 @@ int vc4_bo_inc_usecnt(struct vc4_bo *bo)
637 mutex_lock(&bo->madv_lock); 637 mutex_lock(&bo->madv_lock);
638 switch (bo->madv) { 638 switch (bo->madv) {
639 case VC4_MADV_WILLNEED: 639 case VC4_MADV_WILLNEED:
640 refcount_inc(&bo->usecnt); 640 if (!refcount_inc_not_zero(&bo->usecnt))
641 refcount_set(&bo->usecnt, 1);
641 ret = 0; 642 ret = 0;
642 break; 643 break;
643 case VC4_MADV_DONTNEED: 644 case VC4_MADV_DONTNEED:
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 19f0cf37e0ed..ba0a092ae085 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -659,22 +659,28 @@ void vmbus_close(struct vmbus_channel *channel)
659 */ 659 */
660 return; 660 return;
661 } 661 }
662 mutex_lock(&vmbus_connection.channel_mutex);
663 /* 662 /*
664 * Close all the sub-channels first and then close the 663 * Close all the sub-channels first and then close the
665 * primary channel. 664 * primary channel.
666 */ 665 */
667 list_for_each_safe(cur, tmp, &channel->sc_list) { 666 list_for_each_safe(cur, tmp, &channel->sc_list) {
668 cur_channel = list_entry(cur, struct vmbus_channel, sc_list); 667 cur_channel = list_entry(cur, struct vmbus_channel, sc_list);
669 vmbus_close_internal(cur_channel);
670 if (cur_channel->rescind) { 668 if (cur_channel->rescind) {
669 wait_for_completion(&cur_channel->rescind_event);
670 mutex_lock(&vmbus_connection.channel_mutex);
671 vmbus_close_internal(cur_channel);
671 hv_process_channel_removal( 672 hv_process_channel_removal(
672 cur_channel->offermsg.child_relid); 673 cur_channel->offermsg.child_relid);
674 } else {
675 mutex_lock(&vmbus_connection.channel_mutex);
676 vmbus_close_internal(cur_channel);
673 } 677 }
678 mutex_unlock(&vmbus_connection.channel_mutex);
674 } 679 }
675 /* 680 /*
676 * Now close the primary. 681 * Now close the primary.
677 */ 682 */
683 mutex_lock(&vmbus_connection.channel_mutex);
678 vmbus_close_internal(channel); 684 vmbus_close_internal(channel);
679 mutex_unlock(&vmbus_connection.channel_mutex); 685 mutex_unlock(&vmbus_connection.channel_mutex);
680} 686}
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index ec5454f3f4a6..c21020b69114 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -333,6 +333,7 @@ static struct vmbus_channel *alloc_channel(void)
333 return NULL; 333 return NULL;
334 334
335 spin_lock_init(&channel->lock); 335 spin_lock_init(&channel->lock);
336 init_completion(&channel->rescind_event);
336 337
337 INIT_LIST_HEAD(&channel->sc_list); 338 INIT_LIST_HEAD(&channel->sc_list);
338 INIT_LIST_HEAD(&channel->percpu_list); 339 INIT_LIST_HEAD(&channel->percpu_list);
@@ -898,6 +899,7 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
898 /* 899 /*
899 * Now wait for offer handling to complete. 900 * Now wait for offer handling to complete.
900 */ 901 */
902 vmbus_rescind_cleanup(channel);
901 while (READ_ONCE(channel->probe_done) == false) { 903 while (READ_ONCE(channel->probe_done) == false) {
902 /* 904 /*
903 * We wait here until any channel offer is currently 905 * We wait here until any channel offer is currently
@@ -913,7 +915,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
913 if (channel->device_obj) { 915 if (channel->device_obj) {
914 if (channel->chn_rescind_callback) { 916 if (channel->chn_rescind_callback) {
915 channel->chn_rescind_callback(channel); 917 channel->chn_rescind_callback(channel);
916 vmbus_rescind_cleanup(channel);
917 return; 918 return;
918 } 919 }
919 /* 920 /*
@@ -922,7 +923,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
922 */ 923 */
923 dev = get_device(&channel->device_obj->device); 924 dev = get_device(&channel->device_obj->device);
924 if (dev) { 925 if (dev) {
925 vmbus_rescind_cleanup(channel);
926 vmbus_device_unregister(channel->device_obj); 926 vmbus_device_unregister(channel->device_obj);
927 put_device(dev); 927 put_device(dev);
928 } 928 }
@@ -936,13 +936,14 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
936 * 2. Then close the primary channel. 936 * 2. Then close the primary channel.
937 */ 937 */
938 mutex_lock(&vmbus_connection.channel_mutex); 938 mutex_lock(&vmbus_connection.channel_mutex);
939 vmbus_rescind_cleanup(channel);
940 if (channel->state == CHANNEL_OPEN_STATE) { 939 if (channel->state == CHANNEL_OPEN_STATE) {
941 /* 940 /*
942 * The channel is currently not open; 941 * The channel is currently not open;
943 * it is safe for us to cleanup the channel. 942 * it is safe for us to cleanup the channel.
944 */ 943 */
945 hv_process_channel_removal(rescind->child_relid); 944 hv_process_channel_removal(rescind->child_relid);
945 } else {
946 complete(&channel->rescind_event);
946 } 947 }
947 mutex_unlock(&vmbus_connection.channel_mutex); 948 mutex_unlock(&vmbus_connection.channel_mutex);
948 } 949 }
diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c
index 3576ec73ec23..9ad60421d360 100644
--- a/drivers/iio/adc/cpcap-adc.c
+++ b/drivers/iio/adc/cpcap-adc.c
@@ -1011,7 +1011,7 @@ static int cpcap_adc_probe(struct platform_device *pdev)
1011 platform_set_drvdata(pdev, indio_dev); 1011 platform_set_drvdata(pdev, indio_dev);
1012 1012
1013 ddata->irq = platform_get_irq_byname(pdev, "adcdone"); 1013 ddata->irq = platform_get_irq_byname(pdev, "adcdone");
1014 if (!ddata->irq) 1014 if (ddata->irq < 0)
1015 return -ENODEV; 1015 return -ENODEV;
1016 1016
1017 error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL, 1017 error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL,
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 9c6932ffc0af..36047147ce7c 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -221,8 +221,10 @@ enum meson_sar_adc_chan7_mux_sel {
221 221
222struct meson_sar_adc_data { 222struct meson_sar_adc_data {
223 bool has_bl30_integration; 223 bool has_bl30_integration;
224 u32 bandgap_reg;
224 unsigned int resolution; 225 unsigned int resolution;
225 const char *name; 226 const char *name;
227 const struct regmap_config *regmap_config;
226}; 228};
227 229
228struct meson_sar_adc_priv { 230struct meson_sar_adc_priv {
@@ -242,13 +244,20 @@ struct meson_sar_adc_priv {
242 int calibscale; 244 int calibscale;
243}; 245};
244 246
245static const struct regmap_config meson_sar_adc_regmap_config = { 247static const struct regmap_config meson_sar_adc_regmap_config_gxbb = {
246 .reg_bits = 8, 248 .reg_bits = 8,
247 .val_bits = 32, 249 .val_bits = 32,
248 .reg_stride = 4, 250 .reg_stride = 4,
249 .max_register = MESON_SAR_ADC_REG13, 251 .max_register = MESON_SAR_ADC_REG13,
250}; 252};
251 253
254static const struct regmap_config meson_sar_adc_regmap_config_meson8 = {
255 .reg_bits = 8,
256 .val_bits = 32,
257 .reg_stride = 4,
258 .max_register = MESON_SAR_ADC_DELTA_10,
259};
260
252static unsigned int meson_sar_adc_get_fifo_count(struct iio_dev *indio_dev) 261static unsigned int meson_sar_adc_get_fifo_count(struct iio_dev *indio_dev)
253{ 262{
254 struct meson_sar_adc_priv *priv = iio_priv(indio_dev); 263 struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
@@ -600,7 +609,7 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
600 init.num_parents = 1; 609 init.num_parents = 1;
601 610
602 priv->clk_gate.reg = base + MESON_SAR_ADC_REG3; 611 priv->clk_gate.reg = base + MESON_SAR_ADC_REG3;
603 priv->clk_gate.bit_idx = fls(MESON_SAR_ADC_REG3_CLK_EN); 612 priv->clk_gate.bit_idx = __ffs(MESON_SAR_ADC_REG3_CLK_EN);
604 priv->clk_gate.hw.init = &init; 613 priv->clk_gate.hw.init = &init;
605 614
606 priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw); 615 priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw);
@@ -685,6 +694,20 @@ static int meson_sar_adc_init(struct iio_dev *indio_dev)
685 return 0; 694 return 0;
686} 695}
687 696
697static void meson_sar_adc_set_bandgap(struct iio_dev *indio_dev, bool on_off)
698{
699 struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
700 u32 enable_mask;
701
702 if (priv->data->bandgap_reg == MESON_SAR_ADC_REG11)
703 enable_mask = MESON_SAR_ADC_REG11_BANDGAP_EN;
704 else
705 enable_mask = MESON_SAR_ADC_DELTA_10_TS_VBG_EN;
706
707 regmap_update_bits(priv->regmap, priv->data->bandgap_reg, enable_mask,
708 on_off ? enable_mask : 0);
709}
710
688static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev) 711static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
689{ 712{
690 struct meson_sar_adc_priv *priv = iio_priv(indio_dev); 713 struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
@@ -717,9 +740,9 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
717 regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1); 740 regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1);
718 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG0, 741 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG0,
719 MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval); 742 MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval);
720 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11, 743
721 MESON_SAR_ADC_REG11_BANDGAP_EN, 744 meson_sar_adc_set_bandgap(indio_dev, true);
722 MESON_SAR_ADC_REG11_BANDGAP_EN); 745
723 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, 746 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
724 MESON_SAR_ADC_REG3_ADC_EN, 747 MESON_SAR_ADC_REG3_ADC_EN,
725 MESON_SAR_ADC_REG3_ADC_EN); 748 MESON_SAR_ADC_REG3_ADC_EN);
@@ -739,8 +762,7 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
739err_adc_clk: 762err_adc_clk:
740 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, 763 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
741 MESON_SAR_ADC_REG3_ADC_EN, 0); 764 MESON_SAR_ADC_REG3_ADC_EN, 0);
742 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11, 765 meson_sar_adc_set_bandgap(indio_dev, false);
743 MESON_SAR_ADC_REG11_BANDGAP_EN, 0);
744 clk_disable_unprepare(priv->sana_clk); 766 clk_disable_unprepare(priv->sana_clk);
745err_sana_clk: 767err_sana_clk:
746 clk_disable_unprepare(priv->core_clk); 768 clk_disable_unprepare(priv->core_clk);
@@ -765,8 +787,8 @@ static int meson_sar_adc_hw_disable(struct iio_dev *indio_dev)
765 787
766 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, 788 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
767 MESON_SAR_ADC_REG3_ADC_EN, 0); 789 MESON_SAR_ADC_REG3_ADC_EN, 0);
768 regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11, 790
769 MESON_SAR_ADC_REG11_BANDGAP_EN, 0); 791 meson_sar_adc_set_bandgap(indio_dev, false);
770 792
771 clk_disable_unprepare(priv->sana_clk); 793 clk_disable_unprepare(priv->sana_clk);
772 clk_disable_unprepare(priv->core_clk); 794 clk_disable_unprepare(priv->core_clk);
@@ -844,30 +866,40 @@ static const struct iio_info meson_sar_adc_iio_info = {
844 866
845static const struct meson_sar_adc_data meson_sar_adc_meson8_data = { 867static const struct meson_sar_adc_data meson_sar_adc_meson8_data = {
846 .has_bl30_integration = false, 868 .has_bl30_integration = false,
869 .bandgap_reg = MESON_SAR_ADC_DELTA_10,
870 .regmap_config = &meson_sar_adc_regmap_config_meson8,
847 .resolution = 10, 871 .resolution = 10,
848 .name = "meson-meson8-saradc", 872 .name = "meson-meson8-saradc",
849}; 873};
850 874
851static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = { 875static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = {
852 .has_bl30_integration = false, 876 .has_bl30_integration = false,
877 .bandgap_reg = MESON_SAR_ADC_DELTA_10,
878 .regmap_config = &meson_sar_adc_regmap_config_meson8,
853 .resolution = 10, 879 .resolution = 10,
854 .name = "meson-meson8b-saradc", 880 .name = "meson-meson8b-saradc",
855}; 881};
856 882
857static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = { 883static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = {
858 .has_bl30_integration = true, 884 .has_bl30_integration = true,
885 .bandgap_reg = MESON_SAR_ADC_REG11,
886 .regmap_config = &meson_sar_adc_regmap_config_gxbb,
859 .resolution = 10, 887 .resolution = 10,
860 .name = "meson-gxbb-saradc", 888 .name = "meson-gxbb-saradc",
861}; 889};
862 890
863static const struct meson_sar_adc_data meson_sar_adc_gxl_data = { 891static const struct meson_sar_adc_data meson_sar_adc_gxl_data = {
864 .has_bl30_integration = true, 892 .has_bl30_integration = true,
893 .bandgap_reg = MESON_SAR_ADC_REG11,
894 .regmap_config = &meson_sar_adc_regmap_config_gxbb,
865 .resolution = 12, 895 .resolution = 12,
866 .name = "meson-gxl-saradc", 896 .name = "meson-gxl-saradc",
867}; 897};
868 898
869static const struct meson_sar_adc_data meson_sar_adc_gxm_data = { 899static const struct meson_sar_adc_data meson_sar_adc_gxm_data = {
870 .has_bl30_integration = true, 900 .has_bl30_integration = true,
901 .bandgap_reg = MESON_SAR_ADC_REG11,
902 .regmap_config = &meson_sar_adc_regmap_config_gxbb,
871 .resolution = 12, 903 .resolution = 12,
872 .name = "meson-gxm-saradc", 904 .name = "meson-gxm-saradc",
873}; 905};
@@ -945,7 +977,7 @@ static int meson_sar_adc_probe(struct platform_device *pdev)
945 return ret; 977 return ret;
946 978
947 priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, 979 priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
948 &meson_sar_adc_regmap_config); 980 priv->data->regmap_config);
949 if (IS_ERR(priv->regmap)) 981 if (IS_ERR(priv->regmap))
950 return PTR_ERR(priv->regmap); 982 return PTR_ERR(priv->regmap);
951 983
diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
index 203ffb9cad6a..147a8c14235f 100644
--- a/drivers/iio/health/max30102.c
+++ b/drivers/iio/health/max30102.c
@@ -371,7 +371,7 @@ static int max30102_read_raw(struct iio_dev *indio_dev,
371 mutex_unlock(&indio_dev->mlock); 371 mutex_unlock(&indio_dev->mlock);
372 break; 372 break;
373 case IIO_CHAN_INFO_SCALE: 373 case IIO_CHAN_INFO_SCALE:
374 *val = 1; /* 0.0625 */ 374 *val = 1000; /* 62.5 */
375 *val2 = 16; 375 *val2 = 16;
376 ret = IIO_VAL_FRACTIONAL; 376 ret = IIO_VAL_FRACTIONAL;
377 break; 377 break;
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 9c4cfd19b739..2f0998ebeed2 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -631,7 +631,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type,
631 * iio_format_value() - Formats a IIO value into its string representation 631 * iio_format_value() - Formats a IIO value into its string representation
632 * @buf: The buffer to which the formatted value gets written 632 * @buf: The buffer to which the formatted value gets written
633 * which is assumed to be big enough (i.e. PAGE_SIZE). 633 * which is assumed to be big enough (i.e. PAGE_SIZE).
634 * @type: One of the IIO_VAL_... constants. This decides how the val 634 * @type: One of the IIO_VAL_* constants. This decides how the val
635 * and val2 parameters are formatted. 635 * and val2 parameters are formatted.
636 * @size: Number of IIO value entries contained in vals 636 * @size: Number of IIO value entries contained in vals
637 * @vals: Pointer to the values, exact meaning depends on the 637 * @vals: Pointer to the values, exact meaning depends on the
@@ -639,7 +639,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type,
639 * 639 *
640 * Return: 0 by default, a negative number on failure or the 640 * Return: 0 by default, a negative number on failure or the
641 * total number of characters written for a type that belongs 641 * total number of characters written for a type that belongs
642 * to the IIO_VAL_... constant. 642 * to the IIO_VAL_* constant.
643 */ 643 */
644ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals) 644ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)
645{ 645{
diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
index 53c5d653e780..df23dbcc030a 100644
--- a/drivers/iio/proximity/sx9500.c
+++ b/drivers/iio/proximity/sx9500.c
@@ -869,6 +869,7 @@ static int sx9500_init_device(struct iio_dev *indio_dev)
869static void sx9500_gpio_probe(struct i2c_client *client, 869static void sx9500_gpio_probe(struct i2c_client *client,
870 struct sx9500_data *data) 870 struct sx9500_data *data)
871{ 871{
872 struct gpio_desc *gpiod_int;
872 struct device *dev; 873 struct device *dev;
873 874
874 if (!client) 875 if (!client)
@@ -876,6 +877,14 @@ static void sx9500_gpio_probe(struct i2c_client *client,
876 877
877 dev = &client->dev; 878 dev = &client->dev;
878 879
880 if (client->irq <= 0) {
881 gpiod_int = devm_gpiod_get(dev, SX9500_GPIO_INT, GPIOD_IN);
882 if (IS_ERR(gpiod_int))
883 dev_err(dev, "gpio get irq failed\n");
884 else
885 client->irq = gpiod_to_irq(gpiod_int);
886 }
887
879 data->gpiod_rst = devm_gpiod_get(dev, SX9500_GPIO_RESET, GPIOD_OUT_HIGH); 888 data->gpiod_rst = devm_gpiod_get(dev, SX9500_GPIO_RESET, GPIOD_OUT_HIGH);
880 if (IS_ERR(data->gpiod_rst)) { 889 if (IS_ERR(data->gpiod_rst)) {
881 dev_warn(dev, "gpio get reset pin failed\n"); 890 dev_warn(dev, "gpio get reset pin failed\n");
diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index 98ac46ed7214..cbf186522016 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -1,6 +1,6 @@
1menuconfig INFINIBAND 1menuconfig INFINIBAND
2 tristate "InfiniBand support" 2 tristate "InfiniBand support"
3 depends on HAS_IOMEM 3 depends on HAS_IOMEM && HAS_DMA
4 depends on NET 4 depends on NET
5 depends on INET 5 depends on INET
6 depends on m || IPV6 != m 6 depends on m || IPV6 != m
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 1fdb473b5df7..f6983357145d 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -801,6 +801,7 @@ struct rdma_cm_id *rdma_create_id(struct net *net,
801 INIT_LIST_HEAD(&id_priv->mc_list); 801 INIT_LIST_HEAD(&id_priv->mc_list);
802 get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num); 802 get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num);
803 id_priv->id.route.addr.dev_addr.net = get_net(net); 803 id_priv->id.route.addr.dev_addr.net = get_net(net);
804 id_priv->seq_num &= 0x00ffffff;
804 805
805 return &id_priv->id; 806 return &id_priv->id;
806} 807}
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 84fc32a2c8b3..5e1be4949d5f 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1253,5 +1253,5 @@ static void __exit ib_core_cleanup(void)
1253 1253
1254MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4); 1254MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4);
1255 1255
1256module_init(ib_core_init); 1256subsys_initcall(ib_core_init);
1257module_exit(ib_core_cleanup); 1257module_exit(ib_core_cleanup);
diff --git a/drivers/infiniband/core/security.c b/drivers/infiniband/core/security.c
index 23278ed5be45..a337386652b0 100644
--- a/drivers/infiniband/core/security.c
+++ b/drivers/infiniband/core/security.c
@@ -417,8 +417,17 @@ void ib_close_shared_qp_security(struct ib_qp_security *sec)
417 417
418int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev) 418int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev)
419{ 419{
420 u8 i = rdma_start_port(dev);
421 bool is_ib = false;
420 int ret; 422 int ret;
421 423
424 while (i <= rdma_end_port(dev) && !is_ib)
425 is_ib = rdma_protocol_ib(dev, i++);
426
427 /* If this isn't an IB device don't create the security context */
428 if (!is_ib)
429 return 0;
430
422 qp->qp_sec = kzalloc(sizeof(*qp->qp_sec), GFP_KERNEL); 431 qp->qp_sec = kzalloc(sizeof(*qp->qp_sec), GFP_KERNEL);
423 if (!qp->qp_sec) 432 if (!qp->qp_sec)
424 return -ENOMEM; 433 return -ENOMEM;
@@ -441,6 +450,10 @@ EXPORT_SYMBOL(ib_create_qp_security);
441 450
442void ib_destroy_qp_security_begin(struct ib_qp_security *sec) 451void ib_destroy_qp_security_begin(struct ib_qp_security *sec)
443{ 452{
453 /* Return if not IB */
454 if (!sec)
455 return;
456
444 mutex_lock(&sec->mutex); 457 mutex_lock(&sec->mutex);
445 458
446 /* Remove the QP from the lists so it won't get added to 459 /* Remove the QP from the lists so it won't get added to
@@ -470,6 +483,10 @@ void ib_destroy_qp_security_abort(struct ib_qp_security *sec)
470 int ret; 483 int ret;
471 int i; 484 int i;
472 485
486 /* Return if not IB */
487 if (!sec)
488 return;
489
473 /* If a concurrent cache update is in progress this 490 /* If a concurrent cache update is in progress this
474 * QP security could be marked for an error state 491 * QP security could be marked for an error state
475 * transition. Wait for this to complete. 492 * transition. Wait for this to complete.
@@ -505,6 +522,10 @@ void ib_destroy_qp_security_end(struct ib_qp_security *sec)
505{ 522{
506 int i; 523 int i;
507 524
525 /* Return if not IB */
526 if (!sec)
527 return;
528
508 /* If a concurrent cache update is occurring we must 529 /* If a concurrent cache update is occurring we must
509 * wait until this QP security structure is processed 530 * wait until this QP security structure is processed
510 * in the QP to error flow before destroying it because 531 * in the QP to error flow before destroying it because
@@ -557,7 +578,7 @@ int ib_security_modify_qp(struct ib_qp *qp,
557{ 578{
558 int ret = 0; 579 int ret = 0;
559 struct ib_ports_pkeys *tmp_pps; 580 struct ib_ports_pkeys *tmp_pps;
560 struct ib_ports_pkeys *new_pps; 581 struct ib_ports_pkeys *new_pps = NULL;
561 struct ib_qp *real_qp = qp->real_qp; 582 struct ib_qp *real_qp = qp->real_qp;
562 bool special_qp = (real_qp->qp_type == IB_QPT_SMI || 583 bool special_qp = (real_qp->qp_type == IB_QPT_SMI ||
563 real_qp->qp_type == IB_QPT_GSI || 584 real_qp->qp_type == IB_QPT_GSI ||
@@ -565,18 +586,27 @@ int ib_security_modify_qp(struct ib_qp *qp,
565 bool pps_change = ((qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) || 586 bool pps_change = ((qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) ||
566 (qp_attr_mask & IB_QP_ALT_PATH)); 587 (qp_attr_mask & IB_QP_ALT_PATH));
567 588
589 WARN_ONCE((qp_attr_mask & IB_QP_PORT &&
590 rdma_protocol_ib(real_qp->device, qp_attr->port_num) &&
591 !real_qp->qp_sec),
592 "%s: QP security is not initialized for IB QP: %d\n",
593 __func__, real_qp->qp_num);
594
568 /* The port/pkey settings are maintained only for the real QP. Open 595 /* The port/pkey settings are maintained only for the real QP. Open
569 * handles on the real QP will be in the shared_qp_list. When 596 * handles on the real QP will be in the shared_qp_list. When
570 * enforcing security on the real QP all the shared QPs will be 597 * enforcing security on the real QP all the shared QPs will be
571 * checked as well. 598 * checked as well.
572 */ 599 */
573 600
574 if (pps_change && !special_qp) { 601 if (pps_change && !special_qp && real_qp->qp_sec) {
575 mutex_lock(&real_qp->qp_sec->mutex); 602 mutex_lock(&real_qp->qp_sec->mutex);
576 new_pps = get_new_pps(real_qp, 603 new_pps = get_new_pps(real_qp,
577 qp_attr, 604 qp_attr,
578 qp_attr_mask); 605 qp_attr_mask);
579 606 if (!new_pps) {
607 mutex_unlock(&real_qp->qp_sec->mutex);
608 return -ENOMEM;
609 }
580 /* Add this QP to the lists for the new port 610 /* Add this QP to the lists for the new port
581 * and pkey settings before checking for permission 611 * and pkey settings before checking for permission
582 * in case there is a concurrent cache update 612 * in case there is a concurrent cache update
@@ -600,7 +630,7 @@ int ib_security_modify_qp(struct ib_qp *qp,
600 qp_attr_mask, 630 qp_attr_mask,
601 udata); 631 udata);
602 632
603 if (pps_change && !special_qp) { 633 if (new_pps) {
604 /* Clean up the lists and free the appropriate 634 /* Clean up the lists and free the appropriate
605 * ports_pkeys structure. 635 * ports_pkeys structure.
606 */ 636 */
@@ -631,6 +661,9 @@ int ib_security_pkey_access(struct ib_device *dev,
631 u16 pkey; 661 u16 pkey;
632 int ret; 662 int ret;
633 663
664 if (!rdma_protocol_ib(dev, port_num))
665 return 0;
666
634 ret = ib_get_cached_pkey(dev, port_num, pkey_index, &pkey); 667 ret = ib_get_cached_pkey(dev, port_num, pkey_index, &pkey);
635 if (ret) 668 if (ret)
636 return ret; 669 return ret;
@@ -665,6 +698,9 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent,
665{ 698{
666 int ret; 699 int ret;
667 700
701 if (!rdma_protocol_ib(agent->device, agent->port_num))
702 return 0;
703
668 ret = security_ib_alloc_security(&agent->security); 704 ret = security_ib_alloc_security(&agent->security);
669 if (ret) 705 if (ret)
670 return ret; 706 return ret;
@@ -690,6 +726,9 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent,
690 726
691void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent) 727void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent)
692{ 728{
729 if (!rdma_protocol_ib(agent->device, agent->port_num))
730 return;
731
693 security_ib_free_security(agent->security); 732 security_ib_free_security(agent->security);
694 if (agent->lsm_nb_reg) 733 if (agent->lsm_nb_reg)
695 unregister_lsm_notifier(&agent->lsm_nb); 734 unregister_lsm_notifier(&agent->lsm_nb);
@@ -697,6 +736,9 @@ void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent)
697 736
698int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index) 737int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index)
699{ 738{
739 if (!rdma_protocol_ib(map->agent.device, map->agent.port_num))
740 return 0;
741
700 if (map->agent.qp->qp_type == IB_QPT_SMI && !map->agent.smp_allowed) 742 if (map->agent.qp->qp_type == IB_QPT_SMI && !map->agent.smp_allowed)
701 return -EACCES; 743 return -EACCES;
702 744
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
index fd01a760259f..af5f7936f7e5 100644
--- a/drivers/infiniband/hw/hfi1/rc.c
+++ b/drivers/infiniband/hw/hfi1/rc.c
@@ -814,7 +814,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp,
814 struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); 814 struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
815 struct hfi1_16b_header *hdr = &opa_hdr->opah; 815 struct hfi1_16b_header *hdr = &opa_hdr->opah;
816 struct ib_other_headers *ohdr; 816 struct ib_other_headers *ohdr;
817 u32 bth0, bth1; 817 u32 bth0, bth1 = 0;
818 u16 len, pkey; 818 u16 len, pkey;
819 u8 becn = !!is_fecn; 819 u8 becn = !!is_fecn;
820 u8 l4 = OPA_16B_L4_IB_LOCAL; 820 u8 l4 = OPA_16B_L4_IB_LOCAL;
diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c
index 3e4c5253ab5c..a40ec939ece5 100644
--- a/drivers/infiniband/hw/hns/hns_roce_alloc.c
+++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c
@@ -162,14 +162,10 @@ void hns_roce_buf_free(struct hns_roce_dev *hr_dev, u32 size,
162{ 162{
163 int i; 163 int i;
164 struct device *dev = hr_dev->dev; 164 struct device *dev = hr_dev->dev;
165 u32 bits_per_long = BITS_PER_LONG;
166 165
167 if (buf->nbufs == 1) { 166 if (buf->nbufs == 1) {
168 dma_free_coherent(dev, size, buf->direct.buf, buf->direct.map); 167 dma_free_coherent(dev, size, buf->direct.buf, buf->direct.map);
169 } else { 168 } else {
170 if (bits_per_long == 64 && buf->page_shift == PAGE_SHIFT)
171 vunmap(buf->direct.buf);
172
173 for (i = 0; i < buf->nbufs; ++i) 169 for (i = 0; i < buf->nbufs; ++i)
174 if (buf->page_list[i].buf) 170 if (buf->page_list[i].buf)
175 dma_free_coherent(dev, 1 << buf->page_shift, 171 dma_free_coherent(dev, 1 << buf->page_shift,
@@ -185,9 +181,7 @@ int hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size, u32 max_direct,
185{ 181{
186 int i = 0; 182 int i = 0;
187 dma_addr_t t; 183 dma_addr_t t;
188 struct page **pages;
189 struct device *dev = hr_dev->dev; 184 struct device *dev = hr_dev->dev;
190 u32 bits_per_long = BITS_PER_LONG;
191 u32 page_size = 1 << page_shift; 185 u32 page_size = 1 << page_shift;
192 u32 order; 186 u32 order;
193 187
@@ -236,23 +230,6 @@ int hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size, u32 max_direct,
236 buf->page_list[i].map = t; 230 buf->page_list[i].map = t;
237 memset(buf->page_list[i].buf, 0, page_size); 231 memset(buf->page_list[i].buf, 0, page_size);
238 } 232 }
239 if (bits_per_long == 64 && page_shift == PAGE_SHIFT) {
240 pages = kmalloc_array(buf->nbufs, sizeof(*pages),
241 GFP_KERNEL);
242 if (!pages)
243 goto err_free;
244
245 for (i = 0; i < buf->nbufs; ++i)
246 pages[i] = virt_to_page(buf->page_list[i].buf);
247
248 buf->direct.buf = vmap(pages, buf->nbufs, VM_MAP,
249 PAGE_KERNEL);
250 kfree(pages);
251 if (!buf->direct.buf)
252 goto err_free;
253 } else {
254 buf->direct.buf = NULL;
255 }
256 } 233 }
257 234
258 return 0; 235 return 0;
diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
index 01d3d695cbba..b154ce40cded 100644
--- a/drivers/infiniband/hw/hns/hns_roce_device.h
+++ b/drivers/infiniband/hw/hns/hns_roce_device.h
@@ -726,11 +726,9 @@ static inline struct hns_roce_qp
726 726
727static inline void *hns_roce_buf_offset(struct hns_roce_buf *buf, int offset) 727static inline void *hns_roce_buf_offset(struct hns_roce_buf *buf, int offset)
728{ 728{
729 u32 bits_per_long_val = BITS_PER_LONG;
730 u32 page_size = 1 << buf->page_shift; 729 u32 page_size = 1 << buf->page_shift;
731 730
732 if ((bits_per_long_val == 64 && buf->page_shift == PAGE_SHIFT) || 731 if (buf->nbufs == 1)
733 buf->nbufs == 1)
734 return (char *)(buf->direct.buf) + offset; 732 return (char *)(buf->direct.buf) + offset;
735 else 733 else
736 return (char *)(buf->page_list[offset >> buf->page_shift].buf) + 734 return (char *)(buf->page_list[offset >> buf->page_shift].buf) +
diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.c b/drivers/infiniband/hw/hns/hns_roce_hem.c
index 8b733a66fae5..0eeabfbee192 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hem.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hem.c
@@ -224,6 +224,7 @@ static struct hns_roce_hem *hns_roce_alloc_hem(struct hns_roce_dev *hr_dev,
224 sg_init_table(chunk->mem, HNS_ROCE_HEM_CHUNK_LEN); 224 sg_init_table(chunk->mem, HNS_ROCE_HEM_CHUNK_LEN);
225 chunk->npages = 0; 225 chunk->npages = 0;
226 chunk->nsg = 0; 226 chunk->nsg = 0;
227 memset(chunk->buf, 0, sizeof(chunk->buf));
227 list_add_tail(&chunk->list, &hem->chunk_list); 228 list_add_tail(&chunk->list, &hem->chunk_list);
228 } 229 }
229 230
@@ -240,8 +241,7 @@ static struct hns_roce_hem *hns_roce_alloc_hem(struct hns_roce_dev *hr_dev,
240 if (!buf) 241 if (!buf)
241 goto fail; 242 goto fail;
242 243
243 sg_set_buf(mem, buf, PAGE_SIZE << order); 244 chunk->buf[chunk->npages] = buf;
244 WARN_ON(mem->offset);
245 sg_dma_len(mem) = PAGE_SIZE << order; 245 sg_dma_len(mem) = PAGE_SIZE << order;
246 246
247 ++chunk->npages; 247 ++chunk->npages;
@@ -267,8 +267,8 @@ void hns_roce_free_hem(struct hns_roce_dev *hr_dev, struct hns_roce_hem *hem)
267 list_for_each_entry_safe(chunk, tmp, &hem->chunk_list, list) { 267 list_for_each_entry_safe(chunk, tmp, &hem->chunk_list, list) {
268 for (i = 0; i < chunk->npages; ++i) 268 for (i = 0; i < chunk->npages; ++i)
269 dma_free_coherent(hr_dev->dev, 269 dma_free_coherent(hr_dev->dev,
270 chunk->mem[i].length, 270 sg_dma_len(&chunk->mem[i]),
271 lowmem_page_address(sg_page(&chunk->mem[i])), 271 chunk->buf[i],
272 sg_dma_address(&chunk->mem[i])); 272 sg_dma_address(&chunk->mem[i]));
273 kfree(chunk); 273 kfree(chunk);
274 } 274 }
@@ -722,11 +722,12 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev,
722 struct hns_roce_hem_chunk *chunk; 722 struct hns_roce_hem_chunk *chunk;
723 struct hns_roce_hem_mhop mhop; 723 struct hns_roce_hem_mhop mhop;
724 struct hns_roce_hem *hem; 724 struct hns_roce_hem *hem;
725 struct page *page = NULL; 725 void *addr = NULL;
726 unsigned long mhop_obj = obj; 726 unsigned long mhop_obj = obj;
727 unsigned long obj_per_chunk; 727 unsigned long obj_per_chunk;
728 unsigned long idx_offset; 728 unsigned long idx_offset;
729 int offset, dma_offset; 729 int offset, dma_offset;
730 int length;
730 int i, j; 731 int i, j;
731 u32 hem_idx = 0; 732 u32 hem_idx = 0;
732 733
@@ -763,25 +764,25 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev,
763 764
764 list_for_each_entry(chunk, &hem->chunk_list, list) { 765 list_for_each_entry(chunk, &hem->chunk_list, list) {
765 for (i = 0; i < chunk->npages; ++i) { 766 for (i = 0; i < chunk->npages; ++i) {
767 length = sg_dma_len(&chunk->mem[i]);
766 if (dma_handle && dma_offset >= 0) { 768 if (dma_handle && dma_offset >= 0) {
767 if (sg_dma_len(&chunk->mem[i]) > 769 if (length > (u32)dma_offset)
768 (u32)dma_offset)
769 *dma_handle = sg_dma_address( 770 *dma_handle = sg_dma_address(
770 &chunk->mem[i]) + dma_offset; 771 &chunk->mem[i]) + dma_offset;
771 dma_offset -= sg_dma_len(&chunk->mem[i]); 772 dma_offset -= length;
772 } 773 }
773 774
774 if (chunk->mem[i].length > (u32)offset) { 775 if (length > (u32)offset) {
775 page = sg_page(&chunk->mem[i]); 776 addr = chunk->buf[i] + offset;
776 goto out; 777 goto out;
777 } 778 }
778 offset -= chunk->mem[i].length; 779 offset -= length;
779 } 780 }
780 } 781 }
781 782
782out: 783out:
783 mutex_unlock(&table->mutex); 784 mutex_unlock(&table->mutex);
784 return page ? lowmem_page_address(page) + offset : NULL; 785 return addr;
785} 786}
786EXPORT_SYMBOL_GPL(hns_roce_table_find); 787EXPORT_SYMBOL_GPL(hns_roce_table_find);
787 788
diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.h b/drivers/infiniband/hw/hns/hns_roce_hem.h
index db66db12075e..e8850d59e780 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hem.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hem.h
@@ -78,6 +78,7 @@ struct hns_roce_hem_chunk {
78 int npages; 78 int npages;
79 int nsg; 79 int nsg;
80 struct scatterlist mem[HNS_ROCE_HEM_CHUNK_LEN]; 80 struct scatterlist mem[HNS_ROCE_HEM_CHUNK_LEN];
81 void *buf[HNS_ROCE_HEM_CHUNK_LEN];
81}; 82};
82 83
83struct hns_roce_hem { 84struct hns_roce_hem {
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 8f719c00467b..8e18445714a9 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -1126,9 +1126,11 @@ static int hns_roce_v2_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
1126{ 1126{
1127 struct hns_roce_v2_mpt_entry *mpt_entry; 1127 struct hns_roce_v2_mpt_entry *mpt_entry;
1128 struct scatterlist *sg; 1128 struct scatterlist *sg;
1129 u64 page_addr;
1129 u64 *pages; 1130 u64 *pages;
1131 int i, j;
1132 int len;
1130 int entry; 1133 int entry;
1131 int i;
1132 1134
1133 mpt_entry = mb_buf; 1135 mpt_entry = mb_buf;
1134 memset(mpt_entry, 0, sizeof(*mpt_entry)); 1136 memset(mpt_entry, 0, sizeof(*mpt_entry));
@@ -1186,14 +1188,20 @@ static int hns_roce_v2_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
1186 1188
1187 i = 0; 1189 i = 0;
1188 for_each_sg(mr->umem->sg_head.sgl, sg, mr->umem->nmap, entry) { 1190 for_each_sg(mr->umem->sg_head.sgl, sg, mr->umem->nmap, entry) {
1189 pages[i] = ((u64)sg_dma_address(sg)) >> 6; 1191 len = sg_dma_len(sg) >> PAGE_SHIFT;
1190 1192 for (j = 0; j < len; ++j) {
1191 /* Record the first 2 entry directly to MTPT table */ 1193 page_addr = sg_dma_address(sg) +
1192 if (i >= HNS_ROCE_V2_MAX_INNER_MTPT_NUM - 1) 1194 (j << mr->umem->page_shift);
1193 break; 1195 pages[i] = page_addr >> 6;
1194 i++; 1196
1197 /* Record the first 2 entry directly to MTPT table */
1198 if (i >= HNS_ROCE_V2_MAX_INNER_MTPT_NUM - 1)
1199 goto found;
1200 i++;
1201 }
1195 } 1202 }
1196 1203
1204found:
1197 mpt_entry->pa0_l = cpu_to_le32(lower_32_bits(pages[0])); 1205 mpt_entry->pa0_l = cpu_to_le32(lower_32_bits(pages[0]));
1198 roce_set_field(mpt_entry->byte_56_pa0_h, V2_MPT_BYTE_56_PA0_H_M, 1206 roce_set_field(mpt_entry->byte_56_pa0_h, V2_MPT_BYTE_56_PA0_H_M,
1199 V2_MPT_BYTE_56_PA0_H_S, 1207 V2_MPT_BYTE_56_PA0_H_S,
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index 493d6ef3d2d5..77870f9e1736 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -1043,7 +1043,7 @@ negotiate_done:
1043 * i40iw_schedule_cm_timer 1043 * i40iw_schedule_cm_timer
1044 * @@cm_node: connection's node 1044 * @@cm_node: connection's node
1045 * @sqbuf: buffer to send 1045 * @sqbuf: buffer to send
1046 * @type: if it es send ot close 1046 * @type: if it is send or close
1047 * @send_retrans: if rexmits to be done 1047 * @send_retrans: if rexmits to be done
1048 * @close_when_complete: is cm_node to be removed 1048 * @close_when_complete: is cm_node to be removed
1049 * 1049 *
@@ -1067,7 +1067,8 @@ int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node,
1067 1067
1068 new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC); 1068 new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC);
1069 if (!new_send) { 1069 if (!new_send) {
1070 i40iw_free_sqbuf(vsi, (void *)sqbuf); 1070 if (type != I40IW_TIMER_TYPE_CLOSE)
1071 i40iw_free_sqbuf(vsi, (void *)sqbuf);
1071 return -ENOMEM; 1072 return -ENOMEM;
1072 } 1073 }
1073 new_send->retrycount = I40IW_DEFAULT_RETRYS; 1074 new_send->retrycount = I40IW_DEFAULT_RETRYS;
@@ -1082,7 +1083,6 @@ int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node,
1082 new_send->timetosend += (HZ / 10); 1083 new_send->timetosend += (HZ / 10);
1083 if (cm_node->close_entry) { 1084 if (cm_node->close_entry) {
1084 kfree(new_send); 1085 kfree(new_send);
1085 i40iw_free_sqbuf(vsi, (void *)sqbuf);
1086 i40iw_pr_err("already close entry\n"); 1086 i40iw_pr_err("already close entry\n");
1087 return -EINVAL; 1087 return -EINVAL;
1088 } 1088 }
@@ -2947,8 +2947,6 @@ static struct i40iw_cm_node *i40iw_create_cm_node(
2947 loopback_remotenode->tcp_cntxt.snd_wnd = cm_node->tcp_cntxt.rcv_wnd; 2947 loopback_remotenode->tcp_cntxt.snd_wnd = cm_node->tcp_cntxt.rcv_wnd;
2948 cm_node->tcp_cntxt.snd_wscale = loopback_remotenode->tcp_cntxt.rcv_wscale; 2948 cm_node->tcp_cntxt.snd_wscale = loopback_remotenode->tcp_cntxt.rcv_wscale;
2949 loopback_remotenode->tcp_cntxt.snd_wscale = cm_node->tcp_cntxt.rcv_wscale; 2949 loopback_remotenode->tcp_cntxt.snd_wscale = cm_node->tcp_cntxt.rcv_wscale;
2950 loopback_remotenode->state = I40IW_CM_STATE_MPAREQ_RCVD;
2951 i40iw_create_event(loopback_remotenode, I40IW_CM_EVENT_MPA_REQ);
2952 } 2950 }
2953 return cm_node; 2951 return cm_node;
2954 } 2952 }
@@ -3689,11 +3687,16 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
3689 cm_id->add_ref(cm_id); 3687 cm_id->add_ref(cm_id);
3690 i40iw_add_ref(&iwqp->ibqp); 3688 i40iw_add_ref(&iwqp->ibqp);
3691 3689
3692 i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_ESTABLISHED, 0);
3693
3694 attr.qp_state = IB_QPS_RTS; 3690 attr.qp_state = IB_QPS_RTS;
3695 cm_node->qhash_set = false; 3691 cm_node->qhash_set = false;
3696 i40iw_modify_qp(&iwqp->ibqp, &attr, IB_QP_STATE, NULL); 3692 i40iw_modify_qp(&iwqp->ibqp, &attr, IB_QP_STATE, NULL);
3693
3694 cm_node->accelerated = 1;
3695 status =
3696 i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_ESTABLISHED, 0);
3697 if (status)
3698 i40iw_debug(dev, I40IW_DEBUG_CM, "error sending cm event - ESTABLISHED\n");
3699
3697 if (cm_node->loopbackpartner) { 3700 if (cm_node->loopbackpartner) {
3698 cm_node->loopbackpartner->pdata.size = conn_param->private_data_len; 3701 cm_node->loopbackpartner->pdata.size = conn_param->private_data_len;
3699 3702
@@ -3704,7 +3707,6 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
3704 i40iw_create_event(cm_node->loopbackpartner, I40IW_CM_EVENT_CONNECTED); 3707 i40iw_create_event(cm_node->loopbackpartner, I40IW_CM_EVENT_CONNECTED);
3705 } 3708 }
3706 3709
3707 cm_node->accelerated = 1;
3708 if (cm_node->accept_pend) { 3710 if (cm_node->accept_pend) {
3709 atomic_dec(&cm_node->listener->pend_accepts_cnt); 3711 atomic_dec(&cm_node->listener->pend_accepts_cnt);
3710 cm_node->accept_pend = 0; 3712 cm_node->accept_pend = 0;
@@ -3864,6 +3866,12 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
3864 goto err; 3866 goto err;
3865 } 3867 }
3866 3868
3869 if (cm_node->loopbackpartner) {
3870 cm_node->loopbackpartner->state = I40IW_CM_STATE_MPAREQ_RCVD;
3871 i40iw_create_event(cm_node->loopbackpartner,
3872 I40IW_CM_EVENT_MPA_REQ);
3873 }
3874
3867 i40iw_debug(cm_node->dev, 3875 i40iw_debug(cm_node->dev,
3868 I40IW_DEBUG_CM, 3876 I40IW_DEBUG_CM,
3869 "Api - connect(): port=0x%04x, cm_node=%p, cm_id = %p.\n", 3877 "Api - connect(): port=0x%04x, cm_node=%p, cm_id = %p.\n",
@@ -4044,9 +4052,6 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event)
4044 dev->iw_priv_qp_ops->qp_send_rtt(&iwqp->sc_qp, read0); 4052 dev->iw_priv_qp_ops->qp_send_rtt(&iwqp->sc_qp, read0);
4045 if (iwqp->page) 4053 if (iwqp->page)
4046 kunmap(iwqp->page); 4054 kunmap(iwqp->page);
4047 status = i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_CONNECT_REPLY, 0);
4048 if (status)
4049 i40iw_pr_err("send cm event\n");
4050 4055
4051 memset(&attr, 0, sizeof(attr)); 4056 memset(&attr, 0, sizeof(attr));
4052 attr.qp_state = IB_QPS_RTS; 4057 attr.qp_state = IB_QPS_RTS;
@@ -4054,6 +4059,10 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event)
4054 i40iw_modify_qp(&iwqp->ibqp, &attr, IB_QP_STATE, NULL); 4059 i40iw_modify_qp(&iwqp->ibqp, &attr, IB_QP_STATE, NULL);
4055 4060
4056 cm_node->accelerated = 1; 4061 cm_node->accelerated = 1;
4062 status = i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_CONNECT_REPLY,
4063 0);
4064 if (status)
4065 i40iw_debug(dev, I40IW_DEBUG_CM, "error sending cm event - CONNECT_REPLY\n");
4057 4066
4058 return; 4067 return;
4059 4068
diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
index d88c6cf47cf2..da9821a10e0d 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
@@ -513,7 +513,7 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp,
513 513
514 ret_code = i40iw_allocate_dma_mem(cqp->dev->hw, 514 ret_code = i40iw_allocate_dma_mem(cqp->dev->hw,
515 &cqp->sdbuf, 515 &cqp->sdbuf,
516 128, 516 I40IW_UPDATE_SD_BUF_SIZE * cqp->sq_size,
517 I40IW_SD_BUF_ALIGNMENT); 517 I40IW_SD_BUF_ALIGNMENT);
518 518
519 if (ret_code) 519 if (ret_code)
@@ -596,14 +596,15 @@ void i40iw_sc_cqp_post_sq(struct i40iw_sc_cqp *cqp)
596} 596}
597 597
598/** 598/**
599 * i40iw_sc_cqp_get_next_send_wqe - get next wqe on cqp sq 599 * i40iw_sc_cqp_get_next_send_wqe_idx - get next WQE on CQP SQ and pass back the index
600 * @cqp: struct for cqp hw 600 * @cqp: pointer to CQP structure
601 * @wqe_idx: we index of cqp ring 601 * @scratch: private data for CQP WQE
602 * @wqe_idx: WQE index for next WQE on CQP SQ
602 */ 603 */
603u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch) 604static u64 *i40iw_sc_cqp_get_next_send_wqe_idx(struct i40iw_sc_cqp *cqp,
605 u64 scratch, u32 *wqe_idx)
604{ 606{
605 u64 *wqe = NULL; 607 u64 *wqe = NULL;
606 u32 wqe_idx;
607 enum i40iw_status_code ret_code; 608 enum i40iw_status_code ret_code;
608 609
609 if (I40IW_RING_FULL_ERR(cqp->sq_ring)) { 610 if (I40IW_RING_FULL_ERR(cqp->sq_ring)) {
@@ -616,21 +617,33 @@ u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch)
616 cqp->sq_ring.size); 617 cqp->sq_ring.size);
617 return NULL; 618 return NULL;
618 } 619 }
619 I40IW_ATOMIC_RING_MOVE_HEAD(cqp->sq_ring, wqe_idx, ret_code); 620 I40IW_ATOMIC_RING_MOVE_HEAD(cqp->sq_ring, *wqe_idx, ret_code);
620 cqp->dev->cqp_cmd_stats[OP_REQUESTED_COMMANDS]++; 621 cqp->dev->cqp_cmd_stats[OP_REQUESTED_COMMANDS]++;
621 if (ret_code) 622 if (ret_code)
622 return NULL; 623 return NULL;
623 if (!wqe_idx) 624 if (!*wqe_idx)
624 cqp->polarity = !cqp->polarity; 625 cqp->polarity = !cqp->polarity;
625 626
626 wqe = cqp->sq_base[wqe_idx].elem; 627 wqe = cqp->sq_base[*wqe_idx].elem;
627 cqp->scratch_array[wqe_idx] = scratch; 628 cqp->scratch_array[*wqe_idx] = scratch;
628 I40IW_CQP_INIT_WQE(wqe); 629 I40IW_CQP_INIT_WQE(wqe);
629 630
630 return wqe; 631 return wqe;
631} 632}
632 633
633/** 634/**
635 * i40iw_sc_cqp_get_next_send_wqe - get next wqe on cqp sq
636 * @cqp: struct for cqp hw
637 * @scratch: private data for CQP WQE
638 */
639u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch)
640{
641 u32 wqe_idx;
642
643 return i40iw_sc_cqp_get_next_send_wqe_idx(cqp, scratch, &wqe_idx);
644}
645
646/**
634 * i40iw_sc_cqp_destroy - destroy cqp during close 647 * i40iw_sc_cqp_destroy - destroy cqp during close
635 * @cqp: struct for cqp hw 648 * @cqp: struct for cqp hw
636 */ 649 */
@@ -3587,8 +3600,10 @@ static enum i40iw_status_code cqp_sds_wqe_fill(struct i40iw_sc_cqp *cqp,
3587 u64 *wqe; 3600 u64 *wqe;
3588 int mem_entries, wqe_entries; 3601 int mem_entries, wqe_entries;
3589 struct i40iw_dma_mem *sdbuf = &cqp->sdbuf; 3602 struct i40iw_dma_mem *sdbuf = &cqp->sdbuf;
3603 u64 offset;
3604 u32 wqe_idx;
3590 3605
3591 wqe = i40iw_sc_cqp_get_next_send_wqe(cqp, scratch); 3606 wqe = i40iw_sc_cqp_get_next_send_wqe_idx(cqp, scratch, &wqe_idx);
3592 if (!wqe) 3607 if (!wqe)
3593 return I40IW_ERR_RING_FULL; 3608 return I40IW_ERR_RING_FULL;
3594 3609
@@ -3601,8 +3616,10 @@ static enum i40iw_status_code cqp_sds_wqe_fill(struct i40iw_sc_cqp *cqp,
3601 LS_64(mem_entries, I40IW_CQPSQ_UPESD_ENTRY_COUNT); 3616 LS_64(mem_entries, I40IW_CQPSQ_UPESD_ENTRY_COUNT);
3602 3617
3603 if (mem_entries) { 3618 if (mem_entries) {
3604 memcpy(sdbuf->va, &info->entry[3], (mem_entries << 4)); 3619 offset = wqe_idx * I40IW_UPDATE_SD_BUF_SIZE;
3605 data = sdbuf->pa; 3620 memcpy((char *)sdbuf->va + offset, &info->entry[3],
3621 mem_entries << 4);
3622 data = (u64)sdbuf->pa + offset;
3606 } else { 3623 } else {
3607 data = 0; 3624 data = 0;
3608 } 3625 }
diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/i40iw/i40iw_d.h
index 65ec39e3746b..029083cb81d5 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_d.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_d.h
@@ -1114,7 +1114,7 @@
1114#define I40IWQPC_VLANTAG_MASK (0xffffULL << I40IWQPC_VLANTAG_SHIFT) 1114#define I40IWQPC_VLANTAG_MASK (0xffffULL << I40IWQPC_VLANTAG_SHIFT)
1115 1115
1116#define I40IWQPC_ARPIDX_SHIFT 48 1116#define I40IWQPC_ARPIDX_SHIFT 48
1117#define I40IWQPC_ARPIDX_MASK (0xfffULL << I40IWQPC_ARPIDX_SHIFT) 1117#define I40IWQPC_ARPIDX_MASK (0xffffULL << I40IWQPC_ARPIDX_SHIFT)
1118 1118
1119#define I40IWQPC_FLOWLABEL_SHIFT 0 1119#define I40IWQPC_FLOWLABEL_SHIFT 0
1120#define I40IWQPC_FLOWLABEL_MASK (0xfffffUL << I40IWQPC_FLOWLABEL_SHIFT) 1120#define I40IWQPC_FLOWLABEL_MASK (0xfffffUL << I40IWQPC_FLOWLABEL_SHIFT)
@@ -1526,7 +1526,7 @@ enum i40iw_alignment {
1526 I40IW_AEQ_ALIGNMENT = 0x100, 1526 I40IW_AEQ_ALIGNMENT = 0x100,
1527 I40IW_CEQ_ALIGNMENT = 0x100, 1527 I40IW_CEQ_ALIGNMENT = 0x100,
1528 I40IW_CQ0_ALIGNMENT = 0x100, 1528 I40IW_CQ0_ALIGNMENT = 0x100,
1529 I40IW_SD_BUF_ALIGNMENT = 0x100 1529 I40IW_SD_BUF_ALIGNMENT = 0x80
1530}; 1530};
1531 1531
1532#define I40IW_WQE_SIZE_64 64 1532#define I40IW_WQE_SIZE_64 64
@@ -1534,6 +1534,8 @@ enum i40iw_alignment {
1534#define I40IW_QP_WQE_MIN_SIZE 32 1534#define I40IW_QP_WQE_MIN_SIZE 32
1535#define I40IW_QP_WQE_MAX_SIZE 128 1535#define I40IW_QP_WQE_MAX_SIZE 128
1536 1536
1537#define I40IW_UPDATE_SD_BUF_SIZE 128
1538
1537#define I40IW_CQE_QTYPE_RQ 0 1539#define I40IW_CQE_QTYPE_RQ 0
1538#define I40IW_CQE_QTYPE_SQ 1 1540#define I40IW_CQE_QTYPE_SQ 1
1539 1541
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index a0babdbf7146..4a2de34895ec 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2250,10 +2250,12 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
2250 uint64_t tmp; 2250 uint64_t tmp;
2251 2251
2252 if (!sg_res) { 2252 if (!sg_res) {
2253 unsigned int pgoff = sg->offset & ~PAGE_MASK;
2254
2253 sg_res = aligned_nrpages(sg->offset, sg->length); 2255 sg_res = aligned_nrpages(sg->offset, sg->length);
2254 sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset; 2256 sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + pgoff;
2255 sg->dma_length = sg->length; 2257 sg->dma_length = sg->length;
2256 pteval = page_to_phys(sg_page(sg)) | prot; 2258 pteval = (sg_phys(sg) - pgoff) | prot;
2257 phys_pfn = pteval >> VTD_PAGE_SHIFT; 2259 phys_pfn = pteval >> VTD_PAGE_SHIFT;
2258 } 2260 }
2259 2261
@@ -3787,7 +3789,7 @@ static int intel_nontranslate_map_sg(struct device *hddev,
3787 3789
3788 for_each_sg(sglist, sg, nelems, i) { 3790 for_each_sg(sglist, sg, nelems, i) {
3789 BUG_ON(!sg_page(sg)); 3791 BUG_ON(!sg_page(sg));
3790 sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset; 3792 sg->dma_address = sg_phys(sg);
3791 sg->dma_length = sg->length; 3793 sg->dma_length = sg->length;
3792 } 3794 }
3793 return nelems; 3795 return nelems;
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 41c050b59ec4..4e4dee0ec2de 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7605,7 +7605,9 @@ static int status_resync(struct seq_file *seq, struct mddev *mddev)
7605 if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) 7605 if (test_bit(MD_RECOVERY_DONE, &mddev->recovery))
7606 /* Still cleaning up */ 7606 /* Still cleaning up */
7607 resync = max_sectors; 7607 resync = max_sectors;
7608 } else 7608 } else if (resync > max_sectors)
7609 resync = max_sectors;
7610 else
7609 resync -= atomic_read(&mddev->recovery_active); 7611 resync -= atomic_read(&mddev->recovery_active);
7610 7612
7611 if (resync == 0) { 7613 if (resync == 0) {
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index cc9d337a1ed3..6df398e3a008 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -809,11 +809,15 @@ static void flush_pending_writes(struct r1conf *conf)
809 spin_lock_irq(&conf->device_lock); 809 spin_lock_irq(&conf->device_lock);
810 810
811 if (conf->pending_bio_list.head) { 811 if (conf->pending_bio_list.head) {
812 struct blk_plug plug;
812 struct bio *bio; 813 struct bio *bio;
814
813 bio = bio_list_get(&conf->pending_bio_list); 815 bio = bio_list_get(&conf->pending_bio_list);
814 conf->pending_count = 0; 816 conf->pending_count = 0;
815 spin_unlock_irq(&conf->device_lock); 817 spin_unlock_irq(&conf->device_lock);
818 blk_start_plug(&plug);
816 flush_bio_list(conf, bio); 819 flush_bio_list(conf, bio);
820 blk_finish_plug(&plug);
817 } else 821 } else
818 spin_unlock_irq(&conf->device_lock); 822 spin_unlock_irq(&conf->device_lock);
819} 823}
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index b9edbc747a95..c131835cf008 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -894,10 +894,13 @@ static void flush_pending_writes(struct r10conf *conf)
894 spin_lock_irq(&conf->device_lock); 894 spin_lock_irq(&conf->device_lock);
895 895
896 if (conf->pending_bio_list.head) { 896 if (conf->pending_bio_list.head) {
897 struct blk_plug plug;
897 struct bio *bio; 898 struct bio *bio;
899
898 bio = bio_list_get(&conf->pending_bio_list); 900 bio = bio_list_get(&conf->pending_bio_list);
899 conf->pending_count = 0; 901 conf->pending_count = 0;
900 spin_unlock_irq(&conf->device_lock); 902 spin_unlock_irq(&conf->device_lock);
903 blk_start_plug(&plug);
901 /* flush any pending bitmap writes to disk 904 /* flush any pending bitmap writes to disk
902 * before proceeding w/ I/O */ 905 * before proceeding w/ I/O */
903 bitmap_unplug(conf->mddev->bitmap); 906 bitmap_unplug(conf->mddev->bitmap);
@@ -918,6 +921,7 @@ static void flush_pending_writes(struct r10conf *conf)
918 generic_make_request(bio); 921 generic_make_request(bio);
919 bio = next; 922 bio = next;
920 } 923 }
924 blk_finish_plug(&plug);
921 } else 925 } else
922 spin_unlock_irq(&conf->device_lock); 926 spin_unlock_irq(&conf->device_lock);
923} 927}
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
index f1c86d938502..39f31f07ffe9 100644
--- a/drivers/md/raid5-cache.c
+++ b/drivers/md/raid5-cache.c
@@ -2577,31 +2577,22 @@ static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page)
2577int r5c_journal_mode_set(struct mddev *mddev, int mode) 2577int r5c_journal_mode_set(struct mddev *mddev, int mode)
2578{ 2578{
2579 struct r5conf *conf; 2579 struct r5conf *conf;
2580 int err;
2581 2580
2582 if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH || 2581 if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH ||
2583 mode > R5C_JOURNAL_MODE_WRITE_BACK) 2582 mode > R5C_JOURNAL_MODE_WRITE_BACK)
2584 return -EINVAL; 2583 return -EINVAL;
2585 2584
2586 err = mddev_lock(mddev);
2587 if (err)
2588 return err;
2589 conf = mddev->private; 2585 conf = mddev->private;
2590 if (!conf || !conf->log) { 2586 if (!conf || !conf->log)
2591 mddev_unlock(mddev);
2592 return -ENODEV; 2587 return -ENODEV;
2593 }
2594 2588
2595 if (raid5_calc_degraded(conf) > 0 && 2589 if (raid5_calc_degraded(conf) > 0 &&
2596 mode == R5C_JOURNAL_MODE_WRITE_BACK) { 2590 mode == R5C_JOURNAL_MODE_WRITE_BACK)
2597 mddev_unlock(mddev);
2598 return -EINVAL; 2591 return -EINVAL;
2599 }
2600 2592
2601 mddev_suspend(mddev); 2593 mddev_suspend(mddev);
2602 conf->log->r5c_journal_mode = mode; 2594 conf->log->r5c_journal_mode = mode;
2603 mddev_resume(mddev); 2595 mddev_resume(mddev);
2604 mddev_unlock(mddev);
2605 2596
2606 pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n", 2597 pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n",
2607 mdname(mddev), mode, r5c_journal_mode_str[mode]); 2598 mdname(mddev), mode, r5c_journal_mode_str[mode]);
@@ -2614,6 +2605,7 @@ static ssize_t r5c_journal_mode_store(struct mddev *mddev,
2614{ 2605{
2615 int mode = ARRAY_SIZE(r5c_journal_mode_str); 2606 int mode = ARRAY_SIZE(r5c_journal_mode_str);
2616 size_t len = length; 2607 size_t len = length;
2608 int ret;
2617 2609
2618 if (len < 2) 2610 if (len < 2)
2619 return -EINVAL; 2611 return -EINVAL;
@@ -2625,8 +2617,12 @@ static ssize_t r5c_journal_mode_store(struct mddev *mddev,
2625 if (strlen(r5c_journal_mode_str[mode]) == len && 2617 if (strlen(r5c_journal_mode_str[mode]) == len &&
2626 !strncmp(page, r5c_journal_mode_str[mode], len)) 2618 !strncmp(page, r5c_journal_mode_str[mode], len))
2627 break; 2619 break;
2628 2620 ret = mddev_lock(mddev);
2629 return r5c_journal_mode_set(mddev, mode) ?: length; 2621 if (ret)
2622 return ret;
2623 ret = r5c_journal_mode_set(mddev, mode);
2624 mddev_unlock(mddev);
2625 return ret ?: length;
2630} 2626}
2631 2627
2632struct md_sysfs_entry 2628struct md_sysfs_entry
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 31dc25e2871a..98ce4272ace9 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2677,13 +2677,13 @@ static void raid5_error(struct mddev *mddev, struct md_rdev *rdev)
2677 pr_debug("raid456: error called\n"); 2677 pr_debug("raid456: error called\n");
2678 2678
2679 spin_lock_irqsave(&conf->device_lock, flags); 2679 spin_lock_irqsave(&conf->device_lock, flags);
2680 set_bit(Faulty, &rdev->flags);
2680 clear_bit(In_sync, &rdev->flags); 2681 clear_bit(In_sync, &rdev->flags);
2681 mddev->degraded = raid5_calc_degraded(conf); 2682 mddev->degraded = raid5_calc_degraded(conf);
2682 spin_unlock_irqrestore(&conf->device_lock, flags); 2683 spin_unlock_irqrestore(&conf->device_lock, flags);
2683 set_bit(MD_RECOVERY_INTR, &mddev->recovery); 2684 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
2684 2685
2685 set_bit(Blocked, &rdev->flags); 2686 set_bit(Blocked, &rdev->flags);
2686 set_bit(Faulty, &rdev->flags);
2687 set_mask_bits(&mddev->sb_flags, 0, 2687 set_mask_bits(&mddev->sb_flags, 0,
2688 BIT(MD_SB_CHANGE_DEVS) | BIT(MD_SB_CHANGE_PENDING)); 2688 BIT(MD_SB_CHANGE_DEVS) | BIT(MD_SB_CHANGE_PENDING));
2689 pr_crit("md/raid:%s: Disk failure on %s, disabling device.\n" 2689 pr_crit("md/raid:%s: Disk failure on %s, disabling device.\n"
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c
index e4ea2a0c7a24..c5c827e11b64 100644
--- a/drivers/media/common/siano/smscoreapi.c
+++ b/drivers/media/common/siano/smscoreapi.c
@@ -521,13 +521,13 @@ static void list_add_locked(struct list_head *new, struct list_head *head,
521 spin_unlock_irqrestore(lock, flags); 521 spin_unlock_irqrestore(lock, flags);
522} 522}
523 523
524/** 524/*
525 * register a client callback that called when device plugged in/unplugged 525 * register a client callback that called when device plugged in/unplugged
526 * NOTE: if devices exist callback is called immediately for each device 526 * NOTE: if devices exist callback is called immediately for each device
527 * 527 *
528 * @param hotplug callback 528 * @param hotplug callback
529 * 529 *
530 * @return 0 on success, <0 on error. 530 * return: 0 on success, <0 on error.
531 */ 531 */
532int smscore_register_hotplug(hotplug_t hotplug) 532int smscore_register_hotplug(hotplug_t hotplug)
533{ 533{
@@ -562,7 +562,7 @@ int smscore_register_hotplug(hotplug_t hotplug)
562} 562}
563EXPORT_SYMBOL_GPL(smscore_register_hotplug); 563EXPORT_SYMBOL_GPL(smscore_register_hotplug);
564 564
565/** 565/*
566 * unregister a client callback that called when device plugged in/unplugged 566 * unregister a client callback that called when device plugged in/unplugged
567 * 567 *
568 * @param hotplug callback 568 * @param hotplug callback
@@ -636,7 +636,7 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
636 return cb; 636 return cb;
637} 637}
638 638
639/** 639/*
640 * creates coredev object for a device, prepares buffers, 640 * creates coredev object for a device, prepares buffers,
641 * creates buffer mappings, notifies registered hotplugs about new device. 641 * creates buffer mappings, notifies registered hotplugs about new device.
642 * 642 *
@@ -644,7 +644,7 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
644 * and handlers 644 * and handlers
645 * @param coredev pointer to a value that receives created coredev object 645 * @param coredev pointer to a value that receives created coredev object
646 * 646 *
647 * @return 0 on success, <0 on error. 647 * return: 0 on success, <0 on error.
648 */ 648 */
649int smscore_register_device(struct smsdevice_params_t *params, 649int smscore_register_device(struct smsdevice_params_t *params,
650 struct smscore_device_t **coredev, 650 struct smscore_device_t **coredev,
@@ -764,10 +764,10 @@ static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev,
764 0 : -ETIME; 764 0 : -ETIME;
765} 765}
766 766
767/** 767/*
768 * Starts & enables IR operations 768 * Starts & enables IR operations
769 * 769 *
770 * @return 0 on success, < 0 on error. 770 * return: 0 on success, < 0 on error.
771 */ 771 */
772static int smscore_init_ir(struct smscore_device_t *coredev) 772static int smscore_init_ir(struct smscore_device_t *coredev)
773{ 773{
@@ -812,13 +812,13 @@ static int smscore_init_ir(struct smscore_device_t *coredev)
812 return 0; 812 return 0;
813} 813}
814 814
815/** 815/*
816 * configures device features according to board configuration structure. 816 * configures device features according to board configuration structure.
817 * 817 *
818 * @param coredev pointer to a coredev object returned by 818 * @param coredev pointer to a coredev object returned by
819 * smscore_register_device 819 * smscore_register_device
820 * 820 *
821 * @return 0 on success, <0 on error. 821 * return: 0 on success, <0 on error.
822 */ 822 */
823static int smscore_configure_board(struct smscore_device_t *coredev) 823static int smscore_configure_board(struct smscore_device_t *coredev)
824{ 824{
@@ -861,13 +861,13 @@ static int smscore_configure_board(struct smscore_device_t *coredev)
861 return 0; 861 return 0;
862} 862}
863 863
864/** 864/*
865 * sets initial device mode and notifies client hotplugs that device is ready 865 * sets initial device mode and notifies client hotplugs that device is ready
866 * 866 *
867 * @param coredev pointer to a coredev object returned by 867 * @param coredev pointer to a coredev object returned by
868 * smscore_register_device 868 * smscore_register_device
869 * 869 *
870 * @return 0 on success, <0 on error. 870 * return: 0 on success, <0 on error.
871 */ 871 */
872int smscore_start_device(struct smscore_device_t *coredev) 872int smscore_start_device(struct smscore_device_t *coredev)
873{ 873{
@@ -1087,7 +1087,7 @@ static char *smscore_fw_lkup[][DEVICE_MODE_MAX] = {
1087 }, 1087 },
1088}; 1088};
1089 1089
1090/** 1090/*
1091 * get firmware file name from one of the two mechanisms : sms_boards or 1091 * get firmware file name from one of the two mechanisms : sms_boards or
1092 * smscore_fw_lkup. 1092 * smscore_fw_lkup.
1093 * @param coredev pointer to a coredev object returned by 1093 * @param coredev pointer to a coredev object returned by
@@ -1096,7 +1096,7 @@ static char *smscore_fw_lkup[][DEVICE_MODE_MAX] = {
1096 * @param lookup if 1, always get the fw filename from smscore_fw_lkup 1096 * @param lookup if 1, always get the fw filename from smscore_fw_lkup
1097 * table. if 0, try first to get from sms_boards 1097 * table. if 0, try first to get from sms_boards
1098 * 1098 *
1099 * @return 0 on success, <0 on error. 1099 * return: 0 on success, <0 on error.
1100 */ 1100 */
1101static char *smscore_get_fw_filename(struct smscore_device_t *coredev, 1101static char *smscore_get_fw_filename(struct smscore_device_t *coredev,
1102 int mode) 1102 int mode)
@@ -1125,7 +1125,7 @@ static char *smscore_get_fw_filename(struct smscore_device_t *coredev,
1125 return fw[mode]; 1125 return fw[mode];
1126} 1126}
1127 1127
1128/** 1128/*
1129 * loads specified firmware into a buffer and calls device loadfirmware_handler 1129 * loads specified firmware into a buffer and calls device loadfirmware_handler
1130 * 1130 *
1131 * @param coredev pointer to a coredev object returned by 1131 * @param coredev pointer to a coredev object returned by
@@ -1133,7 +1133,7 @@ static char *smscore_get_fw_filename(struct smscore_device_t *coredev,
1133 * @param filename null-terminated string specifies firmware file name 1133 * @param filename null-terminated string specifies firmware file name
1134 * @param loadfirmware_handler device handler that loads firmware 1134 * @param loadfirmware_handler device handler that loads firmware
1135 * 1135 *
1136 * @return 0 on success, <0 on error. 1136 * return: 0 on success, <0 on error.
1137 */ 1137 */
1138static int smscore_load_firmware_from_file(struct smscore_device_t *coredev, 1138static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
1139 int mode, 1139 int mode,
@@ -1182,14 +1182,14 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
1182 return rc; 1182 return rc;
1183} 1183}
1184 1184
1185/** 1185/*
1186 * notifies all clients registered with the device, notifies hotplugs, 1186 * notifies all clients registered with the device, notifies hotplugs,
1187 * frees all buffers and coredev object 1187 * frees all buffers and coredev object
1188 * 1188 *
1189 * @param coredev pointer to a coredev object returned by 1189 * @param coredev pointer to a coredev object returned by
1190 * smscore_register_device 1190 * smscore_register_device
1191 * 1191 *
1192 * @return 0 on success, <0 on error. 1192 * return: 0 on success, <0 on error.
1193 */ 1193 */
1194void smscore_unregister_device(struct smscore_device_t *coredev) 1194void smscore_unregister_device(struct smscore_device_t *coredev)
1195{ 1195{
@@ -1282,14 +1282,14 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
1282 return rc; 1282 return rc;
1283} 1283}
1284 1284
1285/** 1285/*
1286 * send init device request and wait for response 1286 * send init device request and wait for response
1287 * 1287 *
1288 * @param coredev pointer to a coredev object returned by 1288 * @param coredev pointer to a coredev object returned by
1289 * smscore_register_device 1289 * smscore_register_device
1290 * @param mode requested mode of operation 1290 * @param mode requested mode of operation
1291 * 1291 *
1292 * @return 0 on success, <0 on error. 1292 * return: 0 on success, <0 on error.
1293 */ 1293 */
1294static int smscore_init_device(struct smscore_device_t *coredev, int mode) 1294static int smscore_init_device(struct smscore_device_t *coredev, int mode)
1295{ 1295{
@@ -1315,7 +1315,7 @@ static int smscore_init_device(struct smscore_device_t *coredev, int mode)
1315 return rc; 1315 return rc;
1316} 1316}
1317 1317
1318/** 1318/*
1319 * calls device handler to change mode of operation 1319 * calls device handler to change mode of operation
1320 * NOTE: stellar/usb may disconnect when changing mode 1320 * NOTE: stellar/usb may disconnect when changing mode
1321 * 1321 *
@@ -1323,7 +1323,7 @@ static int smscore_init_device(struct smscore_device_t *coredev, int mode)
1323 * smscore_register_device 1323 * smscore_register_device
1324 * @param mode requested mode of operation 1324 * @param mode requested mode of operation
1325 * 1325 *
1326 * @return 0 on success, <0 on error. 1326 * return: 0 on success, <0 on error.
1327 */ 1327 */
1328int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) 1328int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
1329{ 1329{
@@ -1411,13 +1411,13 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
1411 return rc; 1411 return rc;
1412} 1412}
1413 1413
1414/** 1414/*
1415 * calls device handler to get current mode of operation 1415 * calls device handler to get current mode of operation
1416 * 1416 *
1417 * @param coredev pointer to a coredev object returned by 1417 * @param coredev pointer to a coredev object returned by
1418 * smscore_register_device 1418 * smscore_register_device
1419 * 1419 *
1420 * @return current mode 1420 * return: current mode
1421 */ 1421 */
1422int smscore_get_device_mode(struct smscore_device_t *coredev) 1422int smscore_get_device_mode(struct smscore_device_t *coredev)
1423{ 1423{
@@ -1425,7 +1425,7 @@ int smscore_get_device_mode(struct smscore_device_t *coredev)
1425} 1425}
1426EXPORT_SYMBOL_GPL(smscore_get_device_mode); 1426EXPORT_SYMBOL_GPL(smscore_get_device_mode);
1427 1427
1428/** 1428/*
1429 * find client by response id & type within the clients list. 1429 * find client by response id & type within the clients list.
1430 * return client handle or NULL. 1430 * return client handle or NULL.
1431 * 1431 *
@@ -1462,7 +1462,7 @@ found:
1462 return client; 1462 return client;
1463} 1463}
1464 1464
1465/** 1465/*
1466 * find client by response id/type, call clients onresponse handler 1466 * find client by response id/type, call clients onresponse handler
1467 * return buffer to pool on error 1467 * return buffer to pool on error
1468 * 1468 *
@@ -1615,13 +1615,13 @@ void smscore_onresponse(struct smscore_device_t *coredev,
1615} 1615}
1616EXPORT_SYMBOL_GPL(smscore_onresponse); 1616EXPORT_SYMBOL_GPL(smscore_onresponse);
1617 1617
1618/** 1618/*
1619 * return pointer to next free buffer descriptor from core pool 1619 * return pointer to next free buffer descriptor from core pool
1620 * 1620 *
1621 * @param coredev pointer to a coredev object returned by 1621 * @param coredev pointer to a coredev object returned by
1622 * smscore_register_device 1622 * smscore_register_device
1623 * 1623 *
1624 * @return pointer to descriptor on success, NULL on error. 1624 * return: pointer to descriptor on success, NULL on error.
1625 */ 1625 */
1626 1626
1627static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev) 1627static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev)
@@ -1648,7 +1648,7 @@ struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev)
1648} 1648}
1649EXPORT_SYMBOL_GPL(smscore_getbuffer); 1649EXPORT_SYMBOL_GPL(smscore_getbuffer);
1650 1650
1651/** 1651/*
1652 * return buffer descriptor to a pool 1652 * return buffer descriptor to a pool
1653 * 1653 *
1654 * @param coredev pointer to a coredev object returned by 1654 * @param coredev pointer to a coredev object returned by
@@ -1693,7 +1693,7 @@ static int smscore_validate_client(struct smscore_device_t *coredev,
1693 return 0; 1693 return 0;
1694} 1694}
1695 1695
1696/** 1696/*
1697 * creates smsclient object, check that id is taken by another client 1697 * creates smsclient object, check that id is taken by another client
1698 * 1698 *
1699 * @param coredev pointer to a coredev object from clients hotplug 1699 * @param coredev pointer to a coredev object from clients hotplug
@@ -1705,7 +1705,7 @@ static int smscore_validate_client(struct smscore_device_t *coredev,
1705 * @param context client-specific context 1705 * @param context client-specific context
1706 * @param client pointer to a value that receives created smsclient object 1706 * @param client pointer to a value that receives created smsclient object
1707 * 1707 *
1708 * @return 0 on success, <0 on error. 1708 * return: 0 on success, <0 on error.
1709 */ 1709 */
1710int smscore_register_client(struct smscore_device_t *coredev, 1710int smscore_register_client(struct smscore_device_t *coredev,
1711 struct smsclient_params_t *params, 1711 struct smsclient_params_t *params,
@@ -1740,7 +1740,7 @@ int smscore_register_client(struct smscore_device_t *coredev,
1740} 1740}
1741EXPORT_SYMBOL_GPL(smscore_register_client); 1741EXPORT_SYMBOL_GPL(smscore_register_client);
1742 1742
1743/** 1743/*
1744 * frees smsclient object and all subclients associated with it 1744 * frees smsclient object and all subclients associated with it
1745 * 1745 *
1746 * @param client pointer to smsclient object returned by 1746 * @param client pointer to smsclient object returned by
@@ -1771,7 +1771,7 @@ void smscore_unregister_client(struct smscore_client_t *client)
1771} 1771}
1772EXPORT_SYMBOL_GPL(smscore_unregister_client); 1772EXPORT_SYMBOL_GPL(smscore_unregister_client);
1773 1773
1774/** 1774/*
1775 * verifies that source id is not taken by another client, 1775 * verifies that source id is not taken by another client,
1776 * calls device handler to send requests to the device 1776 * calls device handler to send requests to the device
1777 * 1777 *
@@ -1780,7 +1780,7 @@ EXPORT_SYMBOL_GPL(smscore_unregister_client);
1780 * @param buffer pointer to a request buffer 1780 * @param buffer pointer to a request buffer
1781 * @param size size (in bytes) of request buffer 1781 * @param size size (in bytes) of request buffer
1782 * 1782 *
1783 * @return 0 on success, <0 on error. 1783 * return: 0 on success, <0 on error.
1784 */ 1784 */
1785int smsclient_sendrequest(struct smscore_client_t *client, 1785int smsclient_sendrequest(struct smscore_client_t *client,
1786 void *buffer, size_t size) 1786 void *buffer, size_t size)
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
index 95b3723282f4..d48b61eb01f4 100644
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
@@ -206,7 +206,7 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot,
206 * @hlen: Number of bytes in haystack. 206 * @hlen: Number of bytes in haystack.
207 * @needle: Buffer to find. 207 * @needle: Buffer to find.
208 * @nlen: Number of bytes in needle. 208 * @nlen: Number of bytes in needle.
209 * @return Pointer into haystack needle was found at, or NULL if not found. 209 * return: Pointer into haystack needle was found at, or NULL if not found.
210 */ 210 */
211static char *findstr(char *haystack, int hlen, char *needle, int nlen) 211static char *findstr(char *haystack, int hlen, char *needle, int nlen)
212{ 212{
@@ -226,7 +226,7 @@ static char *findstr(char *haystack, int hlen, char *needle, int nlen)
226/* ************************************************************************** */ 226/* ************************************************************************** */
227/* EN50221 physical interface functions */ 227/* EN50221 physical interface functions */
228 228
229/** 229/*
230 * dvb_ca_en50221_check_camstatus - Check CAM status. 230 * dvb_ca_en50221_check_camstatus - Check CAM status.
231 */ 231 */
232static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot) 232static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot)
@@ -275,9 +275,9 @@ static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot)
275 * @ca: CA instance. 275 * @ca: CA instance.
276 * @slot: Slot on interface. 276 * @slot: Slot on interface.
277 * @waitfor: Flags to wait for. 277 * @waitfor: Flags to wait for.
278 * @timeout_ms: Timeout in milliseconds. 278 * @timeout_hz: Timeout in milliseconds.
279 * 279 *
280 * @return 0 on success, nonzero on error. 280 * return: 0 on success, nonzero on error.
281 */ 281 */
282static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot, 282static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
283 u8 waitfor, int timeout_hz) 283 u8 waitfor, int timeout_hz)
@@ -325,7 +325,7 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
325 * @ca: CA instance. 325 * @ca: CA instance.
326 * @slot: Slot id. 326 * @slot: Slot id.
327 * 327 *
328 * @return 0 on success, nonzero on failure. 328 * return: 0 on success, nonzero on failure.
329 */ 329 */
330static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot) 330static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot)
331{ 331{
@@ -397,11 +397,11 @@ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot)
397 * @ca: CA instance. 397 * @ca: CA instance.
398 * @slot: Slot id. 398 * @slot: Slot id.
399 * @address: Address to read from. Updated. 399 * @address: Address to read from. Updated.
400 * @tupleType: Tuple id byte. Updated. 400 * @tuple_type: Tuple id byte. Updated.
401 * @tupleLength: Tuple length. Updated. 401 * @tuple_length: Tuple length. Updated.
402 * @tuple: Dest buffer for tuple (must be 256 bytes). Updated. 402 * @tuple: Dest buffer for tuple (must be 256 bytes). Updated.
403 * 403 *
404 * @return 0 on success, nonzero on error. 404 * return: 0 on success, nonzero on error.
405 */ 405 */
406static int dvb_ca_en50221_read_tuple(struct dvb_ca_private *ca, int slot, 406static int dvb_ca_en50221_read_tuple(struct dvb_ca_private *ca, int slot,
407 int *address, int *tuple_type, 407 int *address, int *tuple_type,
@@ -455,7 +455,7 @@ static int dvb_ca_en50221_read_tuple(struct dvb_ca_private *ca, int slot,
455 * @ca: CA instance. 455 * @ca: CA instance.
456 * @slot: Slot id. 456 * @slot: Slot id.
457 * 457 *
458 * @return 0 on success, <0 on failure. 458 * return: 0 on success, <0 on failure.
459 */ 459 */
460static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot) 460static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot)
461{ 461{
@@ -632,10 +632,11 @@ static int dvb_ca_en50221_set_configoption(struct dvb_ca_private *ca, int slot)
632 * @ca: CA instance. 632 * @ca: CA instance.
633 * @slot: Slot to read from. 633 * @slot: Slot to read from.
634 * @ebuf: If non-NULL, the data will be written to this buffer. If NULL, 634 * @ebuf: If non-NULL, the data will be written to this buffer. If NULL,
635 * the data will be added into the buffering system as a normal fragment. 635 * the data will be added into the buffering system as a normal
636 * fragment.
636 * @ecount: Size of ebuf. Ignored if ebuf is NULL. 637 * @ecount: Size of ebuf. Ignored if ebuf is NULL.
637 * 638 *
638 * @return Number of bytes read, or < 0 on error 639 * return: Number of bytes read, or < 0 on error
639 */ 640 */
640static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, 641static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
641 u8 *ebuf, int ecount) 642 u8 *ebuf, int ecount)
@@ -784,11 +785,11 @@ exit:
784 * 785 *
785 * @ca: CA instance. 786 * @ca: CA instance.
786 * @slot: Slot to write to. 787 * @slot: Slot to write to.
787 * @ebuf: The data in this buffer is treated as a complete link-level packet to 788 * @buf: The data in this buffer is treated as a complete link-level packet to
788 * be written. 789 * be written.
789 * @count: Size of ebuf. 790 * @bytes_write: Size of ebuf.
790 * 791 *
791 * @return Number of bytes written, or < 0 on error. 792 * return: Number of bytes written, or < 0 on error.
792 */ 793 */
793static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, 794static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot,
794 u8 *buf, int bytes_write) 795 u8 *buf, int bytes_write)
@@ -933,7 +934,7 @@ static int dvb_ca_en50221_slot_shutdown(struct dvb_ca_private *ca, int slot)
933/** 934/**
934 * dvb_ca_en50221_camchange_irq - A CAMCHANGE IRQ has occurred. 935 * dvb_ca_en50221_camchange_irq - A CAMCHANGE IRQ has occurred.
935 * 936 *
936 * @ca: CA instance. 937 * @pubca: CA instance.
937 * @slot: Slot concerned. 938 * @slot: Slot concerned.
938 * @change_type: One of the DVB_CA_CAMCHANGE_* values. 939 * @change_type: One of the DVB_CA_CAMCHANGE_* values.
939 */ 940 */
@@ -963,7 +964,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camchange_irq);
963/** 964/**
964 * dvb_ca_en50221_camready_irq - A CAMREADY IRQ has occurred. 965 * dvb_ca_en50221_camready_irq - A CAMREADY IRQ has occurred.
965 * 966 *
966 * @ca: CA instance. 967 * @pubca: CA instance.
967 * @slot: Slot concerned. 968 * @slot: Slot concerned.
968 */ 969 */
969void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot) 970void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot)
@@ -983,7 +984,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camready_irq);
983/** 984/**
984 * dvb_ca_en50221_frda_irq - An FR or DA IRQ has occurred. 985 * dvb_ca_en50221_frda_irq - An FR or DA IRQ has occurred.
985 * 986 *
986 * @ca: CA instance. 987 * @pubca: CA instance.
987 * @slot: Slot concerned. 988 * @slot: Slot concerned.
988 */ 989 */
989void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot) 990void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot)
@@ -1091,7 +1092,7 @@ static void dvb_ca_en50221_thread_update_delay(struct dvb_ca_private *ca)
1091 * 1092 *
1092 * @ca: CA instance. 1093 * @ca: CA instance.
1093 * @slot: Slot to process. 1094 * @slot: Slot to process.
1094 * @return: 0 .. no change 1095 * return:: 0 .. no change
1095 * 1 .. CAM state changed 1096 * 1 .. CAM state changed
1096 */ 1097 */
1097 1098
@@ -1296,7 +1297,7 @@ static void dvb_ca_en50221_thread_state_machine(struct dvb_ca_private *ca,
1296 mutex_unlock(&sl->slot_lock); 1297 mutex_unlock(&sl->slot_lock);
1297} 1298}
1298 1299
1299/** 1300/*
1300 * Kernel thread which monitors CA slots for CAM changes, and performs data 1301 * Kernel thread which monitors CA slots for CAM changes, and performs data
1301 * transfers. 1302 * transfers.
1302 */ 1303 */
@@ -1336,12 +1337,11 @@ static int dvb_ca_en50221_thread(void *data)
1336 * Real ioctl implementation. 1337 * Real ioctl implementation.
1337 * NOTE: CA_SEND_MSG/CA_GET_MSG ioctls have userspace buffers passed to them. 1338 * NOTE: CA_SEND_MSG/CA_GET_MSG ioctls have userspace buffers passed to them.
1338 * 1339 *
1339 * @inode: Inode concerned.
1340 * @file: File concerned. 1340 * @file: File concerned.
1341 * @cmd: IOCTL command. 1341 * @cmd: IOCTL command.
1342 * @arg: Associated argument. 1342 * @parg: Associated argument.
1343 * 1343 *
1344 * @return 0 on success, <0 on error. 1344 * return: 0 on success, <0 on error.
1345 */ 1345 */
1346static int dvb_ca_en50221_io_do_ioctl(struct file *file, 1346static int dvb_ca_en50221_io_do_ioctl(struct file *file,
1347 unsigned int cmd, void *parg) 1347 unsigned int cmd, void *parg)
@@ -1420,12 +1420,11 @@ out_unlock:
1420/** 1420/**
1421 * Wrapper for ioctl implementation. 1421 * Wrapper for ioctl implementation.
1422 * 1422 *
1423 * @inode: Inode concerned.
1424 * @file: File concerned. 1423 * @file: File concerned.
1425 * @cmd: IOCTL command. 1424 * @cmd: IOCTL command.
1426 * @arg: Associated argument. 1425 * @arg: Associated argument.
1427 * 1426 *
1428 * @return 0 on success, <0 on error. 1427 * return: 0 on success, <0 on error.
1429 */ 1428 */
1430static long dvb_ca_en50221_io_ioctl(struct file *file, 1429static long dvb_ca_en50221_io_ioctl(struct file *file,
1431 unsigned int cmd, unsigned long arg) 1430 unsigned int cmd, unsigned long arg)
@@ -1441,7 +1440,7 @@ static long dvb_ca_en50221_io_ioctl(struct file *file,
1441 * @count: Size of source buffer. 1440 * @count: Size of source buffer.
1442 * @ppos: Position in file (ignored). 1441 * @ppos: Position in file (ignored).
1443 * 1442 *
1444 * @return Number of bytes read, or <0 on error. 1443 * return: Number of bytes read, or <0 on error.
1445 */ 1444 */
1446static ssize_t dvb_ca_en50221_io_write(struct file *file, 1445static ssize_t dvb_ca_en50221_io_write(struct file *file,
1447 const char __user *buf, size_t count, 1446 const char __user *buf, size_t count,
@@ -1536,7 +1535,7 @@ exit:
1536 return status; 1535 return status;
1537} 1536}
1538 1537
1539/** 1538/*
1540 * Condition for waking up in dvb_ca_en50221_io_read_condition 1539 * Condition for waking up in dvb_ca_en50221_io_read_condition
1541 */ 1540 */
1542static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, 1541static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca,
@@ -1593,7 +1592,7 @@ nextslot:
1593 * @count: Size of destination buffer. 1592 * @count: Size of destination buffer.
1594 * @ppos: Position in file (ignored). 1593 * @ppos: Position in file (ignored).
1595 * 1594 *
1596 * @return Number of bytes read, or <0 on error. 1595 * return: Number of bytes read, or <0 on error.
1597 */ 1596 */
1598static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf, 1597static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf,
1599 size_t count, loff_t *ppos) 1598 size_t count, loff_t *ppos)
@@ -1702,7 +1701,7 @@ exit:
1702 * @inode: Inode concerned. 1701 * @inode: Inode concerned.
1703 * @file: File concerned. 1702 * @file: File concerned.
1704 * 1703 *
1705 * @return 0 on success, <0 on failure. 1704 * return: 0 on success, <0 on failure.
1706 */ 1705 */
1707static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) 1706static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)
1708{ 1707{
@@ -1752,7 +1751,7 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)
1752 * @inode: Inode concerned. 1751 * @inode: Inode concerned.
1753 * @file: File concerned. 1752 * @file: File concerned.
1754 * 1753 *
1755 * @return 0 on success, <0 on failure. 1754 * return: 0 on success, <0 on failure.
1756 */ 1755 */
1757static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) 1756static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)
1758{ 1757{
@@ -1781,7 +1780,7 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)
1781 * @file: File concerned. 1780 * @file: File concerned.
1782 * @wait: poll wait table. 1781 * @wait: poll wait table.
1783 * 1782 *
1784 * @return Standard poll mask. 1783 * return: Standard poll mask.
1785 */ 1784 */
1786static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait) 1785static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait)
1787{ 1786{
@@ -1838,11 +1837,11 @@ static const struct dvb_device dvbdev_ca = {
1838 * Initialise a new DVB CA EN50221 interface device. 1837 * Initialise a new DVB CA EN50221 interface device.
1839 * 1838 *
1840 * @dvb_adapter: DVB adapter to attach the new CA device to. 1839 * @dvb_adapter: DVB adapter to attach the new CA device to.
1841 * @ca: The dvb_ca instance. 1840 * @pubca: The dvb_ca instance.
1842 * @flags: Flags describing the CA device (DVB_CA_FLAG_*). 1841 * @flags: Flags describing the CA device (DVB_CA_FLAG_*).
1843 * @slot_count: Number of slots supported. 1842 * @slot_count: Number of slots supported.
1844 * 1843 *
1845 * @return 0 on success, nonzero on failure 1844 * return: 0 on success, nonzero on failure
1846 */ 1845 */
1847int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, 1846int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
1848 struct dvb_ca_en50221 *pubca, int flags, int slot_count) 1847 struct dvb_ca_en50221 *pubca, int flags, int slot_count)
@@ -1929,8 +1928,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_init);
1929/** 1928/**
1930 * Release a DVB CA EN50221 interface device. 1929 * Release a DVB CA EN50221 interface device.
1931 * 1930 *
1932 * @ca_dev: The dvb_device_t instance for the CA device. 1931 * @pubca: The associated dvb_ca instance.
1933 * @ca: The associated dvb_ca instance.
1934 */ 1932 */
1935void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) 1933void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)
1936{ 1934{
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 3ad83359098b..2afaa8226342 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -369,11 +369,14 @@ static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepr
369} 369}
370 370
371/** 371/**
372 * Performs automatic twiddling of frontend parameters. 372 * dvb_frontend_swzigzag_autotune - Performs automatic twiddling of frontend
373 * parameters.
373 * 374 *
374 * @param fe The frontend concerned. 375 * @fe: The frontend concerned.
375 * @param check_wrapped Checks if an iteration has completed. DO NOT SET ON THE FIRST ATTEMPT 376 * @check_wrapped: Checks if an iteration has completed.
376 * @returns Number of complete iterations that have been performed. 377 * DO NOT SET ON THE FIRST ATTEMPT.
378 *
379 * return: Number of complete iterations that have been performed.
377 */ 380 */
378static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wrapped) 381static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wrapped)
379{ 382{
@@ -1253,7 +1256,7 @@ dtv_property_legacy_params_sync(struct dvb_frontend *fe,
1253 * dtv_get_frontend - calls a callback for retrieving DTV parameters 1256 * dtv_get_frontend - calls a callback for retrieving DTV parameters
1254 * @fe: struct dvb_frontend pointer 1257 * @fe: struct dvb_frontend pointer
1255 * @c: struct dtv_frontend_properties pointer (DVBv5 cache) 1258 * @c: struct dtv_frontend_properties pointer (DVBv5 cache)
1256 * @p_out struct dvb_frontend_parameters pointer (DVBv3 FE struct) 1259 * @p_out: struct dvb_frontend_parameters pointer (DVBv3 FE struct)
1257 * 1260 *
1258 * This routine calls either the DVBv3 or DVBv5 get_frontend call. 1261 * This routine calls either the DVBv3 or DVBv5 get_frontend call.
1259 * If c is not null, it will update the DVBv5 cache struct pointed by it. 1262 * If c is not null, it will update the DVBv5 cache struct pointed by it.
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 06b0dcc13695..c018e3c06d5d 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -125,7 +125,7 @@ struct dvb_net_priv {
125}; 125};
126 126
127 127
128/** 128/*
129 * Determine the packet's protocol ID. The rule here is that we 129 * Determine the packet's protocol ID. The rule here is that we
130 * assume 802.3 if the type field is short enough to be a length. 130 * assume 802.3 if the type field is short enough to be a length.
131 * This is normal practice and works for any 'now in use' protocol. 131 * This is normal practice and works for any 'now in use' protocol.
@@ -155,7 +155,7 @@ static __be16 dvb_net_eth_type_trans(struct sk_buff *skb,
155 155
156 rawp = skb->data; 156 rawp = skb->data;
157 157
158 /** 158 /*
159 * This is a magic hack to spot IPX packets. Older Novell breaks 159 * This is a magic hack to spot IPX packets. Older Novell breaks
160 * the protocol design and runs IPX over 802.3 without an 802.2 LLC 160 * the protocol design and runs IPX over 802.3 without an 802.2 LLC
161 * layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This 161 * layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
@@ -164,7 +164,7 @@ static __be16 dvb_net_eth_type_trans(struct sk_buff *skb,
164 if (*(unsigned short *)rawp == 0xFFFF) 164 if (*(unsigned short *)rawp == 0xFFFF)
165 return htons(ETH_P_802_3); 165 return htons(ETH_P_802_3);
166 166
167 /** 167 /*
168 * Real 802.2 LLC 168 * Real 802.2 LLC
169 */ 169 */
170 return htons(ETH_P_802_2); 170 return htons(ETH_P_802_2);
@@ -215,7 +215,8 @@ static int ule_exthdr_padding(struct dvb_net_priv *p)
215 return 0; 215 return 0;
216} 216}
217 217
218/** Handle ULE extension headers. 218/*
219 * Handle ULE extension headers.
219 * Function is called after a successful CRC32 verification of an ULE SNDU to complete its decoding. 220 * Function is called after a successful CRC32 verification of an ULE SNDU to complete its decoding.
220 * Returns: >= 0: nr. of bytes consumed by next extension header 221 * Returns: >= 0: nr. of bytes consumed by next extension header
221 * -1: Mandatory extension header that is not recognized or TEST SNDU; discard. 222 * -1: Mandatory extension header that is not recognized or TEST SNDU; discard.
@@ -291,7 +292,7 @@ static int handle_ule_extensions( struct dvb_net_priv *p )
291} 292}
292 293
293 294
294/** Prepare for a new ULE SNDU: reset the decoder state. */ 295/* Prepare for a new ULE SNDU: reset the decoder state. */
295static inline void reset_ule( struct dvb_net_priv *p ) 296static inline void reset_ule( struct dvb_net_priv *p )
296{ 297{
297 p->ule_skb = NULL; 298 p->ule_skb = NULL;
@@ -304,7 +305,7 @@ static inline void reset_ule( struct dvb_net_priv *p )
304 p->ule_bridged = 0; 305 p->ule_bridged = 0;
305} 306}
306 307
307/** 308/*
308 * Decode ULE SNDUs according to draft-ietf-ipdvb-ule-03.txt from a sequence of 309 * Decode ULE SNDUs according to draft-ietf-ipdvb-ule-03.txt from a sequence of
309 * TS cells of a single PID. 310 * TS cells of a single PID.
310 */ 311 */
@@ -1005,7 +1006,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
1005{ 1006{
1006 struct net_device *dev = filter->priv; 1007 struct net_device *dev = filter->priv;
1007 1008
1008 /** 1009 /*
1009 * we rely on the DVB API definition where exactly one complete 1010 * we rely on the DVB API definition where exactly one complete
1010 * section is delivered in buffer1 1011 * section is delivered in buffer1
1011 */ 1012 */
diff --git a/drivers/media/dvb-frontends/af9013.h b/drivers/media/dvb-frontends/af9013.h
index 353274524f1b..a290722c04fd 100644
--- a/drivers/media/dvb-frontends/af9013.h
+++ b/drivers/media/dvb-frontends/af9013.h
@@ -38,6 +38,13 @@
38 * @api_version: Firmware API version. 38 * @api_version: Firmware API version.
39 * @gpio: GPIOs. 39 * @gpio: GPIOs.
40 * @get_dvb_frontend: Get DVB frontend callback. 40 * @get_dvb_frontend: Get DVB frontend callback.
41 *
42 * AF9013/5 GPIOs (mostly guessed):
43 * * demod#1-gpio#0 - set demod#2 i2c-addr for dual devices
44 * * demod#1-gpio#1 - xtal setting (?)
45 * * demod#1-gpio#3 - tuner#1
46 * * demod#2-gpio#0 - tuner#2
47 * * demod#2-gpio#1 - xtal setting (?)
41 */ 48 */
42struct af9013_platform_data { 49struct af9013_platform_data {
43 /* 50 /*
@@ -89,16 +96,15 @@ struct af9013_platform_data {
89#define AF9013_TS_PARALLEL AF9013_TS_MODE_PARALLEL 96#define AF9013_TS_PARALLEL AF9013_TS_MODE_PARALLEL
90#define AF9013_TS_SERIAL AF9013_TS_MODE_SERIAL 97#define AF9013_TS_SERIAL AF9013_TS_MODE_SERIAL
91 98
92/*
93 * AF9013/5 GPIOs (mostly guessed)
94 * demod#1-gpio#0 - set demod#2 i2c-addr for dual devices
95 * demod#1-gpio#1 - xtal setting (?)
96 * demod#1-gpio#3 - tuner#1
97 * demod#2-gpio#0 - tuner#2
98 * demod#2-gpio#1 - xtal setting (?)
99 */
100
101#if IS_REACHABLE(CONFIG_DVB_AF9013) 99#if IS_REACHABLE(CONFIG_DVB_AF9013)
100/**
101 * Attach an af9013 demod
102 *
103 * @config: pointer to &struct af9013_config with demod configuration.
104 * @i2c: i2c adapter to use.
105 *
106 * return: FE pointer on success, NULL on failure.
107 */
102extern struct dvb_frontend *af9013_attach(const struct af9013_config *config, 108extern struct dvb_frontend *af9013_attach(const struct af9013_config *config,
103 struct i2c_adapter *i2c); 109 struct i2c_adapter *i2c);
104#else 110#else
diff --git a/drivers/media/dvb-frontends/ascot2e.h b/drivers/media/dvb-frontends/ascot2e.h
index dc61bf7d1b09..418c565baf83 100644
--- a/drivers/media/dvb-frontends/ascot2e.h
+++ b/drivers/media/dvb-frontends/ascot2e.h
@@ -41,6 +41,15 @@ struct ascot2e_config {
41}; 41};
42 42
43#if IS_REACHABLE(CONFIG_DVB_ASCOT2E) 43#if IS_REACHABLE(CONFIG_DVB_ASCOT2E)
44/**
45 * Attach an ascot2e tuner
46 *
47 * @fe: frontend to be attached
48 * @config: pointer to &struct ascot2e_config with tuner configuration.
49 * @i2c: i2c adapter to use.
50 *
51 * return: FE pointer on success, NULL on failure.
52 */
44extern struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe, 53extern struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe,
45 const struct ascot2e_config *config, 54 const struct ascot2e_config *config,
46 struct i2c_adapter *i2c); 55 struct i2c_adapter *i2c);
diff --git a/drivers/media/dvb-frontends/cxd2820r.h b/drivers/media/dvb-frontends/cxd2820r.h
index f3ff8f6eb3bb..a49400c0e28e 100644
--- a/drivers/media/dvb-frontends/cxd2820r.h
+++ b/drivers/media/dvb-frontends/cxd2820r.h
@@ -49,7 +49,6 @@
49 * @gpio_chip_base: GPIO. 49 * @gpio_chip_base: GPIO.
50 * @get_dvb_frontend: Get DVB frontend. 50 * @get_dvb_frontend: Get DVB frontend.
51 */ 51 */
52
53struct cxd2820r_platform_data { 52struct cxd2820r_platform_data {
54 u8 ts_mode; 53 u8 ts_mode;
55 bool ts_clk_inv; 54 bool ts_clk_inv;
@@ -62,6 +61,17 @@ struct cxd2820r_platform_data {
62 bool attach_in_use; 61 bool attach_in_use;
63}; 62};
64 63
64/**
65 * struct cxd2820r_config - configuration for cxd2020r demod
66 *
67 * @i2c_address: Demodulator I2C address. Driver determines DVB-C slave I2C
68 * address automatically from master address.
69 * Default: none, must set. Values: 0x6c, 0x6d.
70 * @ts_mode: TS output mode. Default: none, must set. Values: FIXME?
71 * @ts_clock_inv: TS clock inverted. Default: 0. Values: 0, 1.
72 * @if_agc_polarity: Default: 0. Values: 0, 1
73 * @spec_inv: Spectrum inversion. Default: 0. Values: 0, 1.
74 */
65struct cxd2820r_config { 75struct cxd2820r_config {
66 /* Demodulator I2C address. 76 /* Demodulator I2C address.
67 * Driver determines DVB-C slave I2C address automatically from master 77 * Driver determines DVB-C slave I2C address automatically from master
@@ -98,6 +108,18 @@ struct cxd2820r_config {
98 108
99 109
100#if IS_REACHABLE(CONFIG_DVB_CXD2820R) 110#if IS_REACHABLE(CONFIG_DVB_CXD2820R)
111/**
112 * Attach a cxd2820r demod
113 *
114 * @config: pointer to &struct cxd2820r_config with demod configuration.
115 * @i2c: i2c adapter to use.
116 * @gpio_chip_base: if zero, disables GPIO setting. Otherwise, if
117 * CONFIG_GPIOLIB is set dynamically allocate
118 * gpio base; if is not set, use its value to
119 * setup the GPIO pins.
120 *
121 * return: FE pointer on success, NULL on failure.
122 */
101extern struct dvb_frontend *cxd2820r_attach( 123extern struct dvb_frontend *cxd2820r_attach(
102 const struct cxd2820r_config *config, 124 const struct cxd2820r_config *config,
103 struct i2c_adapter *i2c, 125 struct i2c_adapter *i2c,
diff --git a/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h b/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h
index 5b5421f70388..2b3af247a1f1 100644
--- a/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h
+++ b/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h
@@ -52,7 +52,7 @@ struct i2c_device_addr {
52}; 52};
53 53
54 54
55/** 55/*
56* \def IS_I2C_10BIT( addr ) 56* \def IS_I2C_10BIT( addr )
57* \brief Determine if I2C address 'addr' is a 10 bits address or not. 57* \brief Determine if I2C address 'addr' is a 10 bits address or not.
58* \param addr The I2C address. 58* \param addr The I2C address.
@@ -67,7 +67,7 @@ struct i2c_device_addr {
67Exported FUNCTIONS 67Exported FUNCTIONS
68------------------------------------------------------------------------------*/ 68------------------------------------------------------------------------------*/
69 69
70/** 70/*
71* \fn drxbsp_i2c_init() 71* \fn drxbsp_i2c_init()
72* \brief Initialize I2C communication module. 72* \brief Initialize I2C communication module.
73* \return drx_status_t Return status. 73* \return drx_status_t Return status.
@@ -76,7 +76,7 @@ Exported FUNCTIONS
76*/ 76*/
77 drx_status_t drxbsp_i2c_init(void); 77 drx_status_t drxbsp_i2c_init(void);
78 78
79/** 79/*
80* \fn drxbsp_i2c_term() 80* \fn drxbsp_i2c_term()
81* \brief Terminate I2C communication module. 81* \brief Terminate I2C communication module.
82* \return drx_status_t Return status. 82* \return drx_status_t Return status.
@@ -85,7 +85,7 @@ Exported FUNCTIONS
85*/ 85*/
86 drx_status_t drxbsp_i2c_term(void); 86 drx_status_t drxbsp_i2c_term(void);
87 87
88/** 88/*
89* \fn drx_status_t drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr, 89* \fn drx_status_t drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr,
90* u16 w_count, 90* u16 w_count,
91* u8 *wData, 91* u8 *wData,
@@ -121,7 +121,7 @@ Exported FUNCTIONS
121 struct i2c_device_addr *r_dev_addr, 121 struct i2c_device_addr *r_dev_addr,
122 u16 r_count, u8 *r_data); 122 u16 r_count, u8 *r_data);
123 123
124/** 124/*
125* \fn drxbsp_i2c_error_text() 125* \fn drxbsp_i2c_error_text()
126* \brief Returns a human readable error. 126* \brief Returns a human readable error.
127* Counter part of numerical drx_i2c_error_g. 127* Counter part of numerical drx_i2c_error_g.
@@ -130,7 +130,7 @@ Exported FUNCTIONS
130*/ 130*/
131 char *drxbsp_i2c_error_text(void); 131 char *drxbsp_i2c_error_text(void);
132 132
133/** 133/*
134* \var drx_i2c_error_g; 134* \var drx_i2c_error_g;
135* \brief I2C specific error codes, platform dependent. 135* \brief I2C specific error codes, platform dependent.
136*/ 136*/
diff --git a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
index cd69e187ba7a..855685b6b386 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
+++ b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
@@ -46,7 +46,7 @@ struct i2c_device_addr {
46 void *user_data; /* User data pointer */ 46 void *user_data; /* User data pointer */
47}; 47};
48 48
49/** 49/*
50* \def IS_I2C_10BIT( addr ) 50* \def IS_I2C_10BIT( addr )
51* \brief Determine if I2C address 'addr' is a 10 bits address or not. 51* \brief Determine if I2C address 'addr' is a 10 bits address or not.
52* \param addr The I2C address. 52* \param addr The I2C address.
@@ -61,7 +61,7 @@ struct i2c_device_addr {
61Exported FUNCTIONS 61Exported FUNCTIONS
62------------------------------------------------------------------------------*/ 62------------------------------------------------------------------------------*/
63 63
64/** 64/*
65* \fn drxbsp_i2c_init() 65* \fn drxbsp_i2c_init()
66* \brief Initialize I2C communication module. 66* \brief Initialize I2C communication module.
67* \return int Return status. 67* \return int Return status.
@@ -70,7 +70,7 @@ Exported FUNCTIONS
70*/ 70*/
71int drxbsp_i2c_init(void); 71int drxbsp_i2c_init(void);
72 72
73/** 73/*
74* \fn drxbsp_i2c_term() 74* \fn drxbsp_i2c_term()
75* \brief Terminate I2C communication module. 75* \brief Terminate I2C communication module.
76* \return int Return status. 76* \return int Return status.
@@ -79,7 +79,7 @@ int drxbsp_i2c_init(void);
79*/ 79*/
80int drxbsp_i2c_term(void); 80int drxbsp_i2c_term(void);
81 81
82/** 82/*
83* \fn int drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr, 83* \fn int drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr,
84* u16 w_count, 84* u16 w_count,
85* u8 * wData, 85* u8 * wData,
@@ -115,7 +115,7 @@ int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr,
115 struct i2c_device_addr *r_dev_addr, 115 struct i2c_device_addr *r_dev_addr,
116 u16 r_count, u8 *r_data); 116 u16 r_count, u8 *r_data);
117 117
118/** 118/*
119* \fn drxbsp_i2c_error_text() 119* \fn drxbsp_i2c_error_text()
120* \brief Returns a human readable error. 120* \brief Returns a human readable error.
121* Counter part of numerical drx_i2c_error_g. 121* Counter part of numerical drx_i2c_error_g.
@@ -124,7 +124,7 @@ int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr,
124*/ 124*/
125char *drxbsp_i2c_error_text(void); 125char *drxbsp_i2c_error_text(void);
126 126
127/** 127/*
128* \var drx_i2c_error_g; 128* \var drx_i2c_error_g;
129* \brief I2C specific error codes, platform dependent. 129* \brief I2C specific error codes, platform dependent.
130*/ 130*/
@@ -241,13 +241,13 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
241 struct i2c_device_addr *r_dev_addr, 241 struct i2c_device_addr *r_dev_addr,
242 u16 r_count, u8 *r_data); 242 u16 r_count, u8 *r_data);
243 243
244/************** 244/*************
245* 245*
246* This section configures the DRX Data Access Protocols (DAPs). 246* This section configures the DRX Data Access Protocols (DAPs).
247* 247*
248**************/ 248**************/
249 249
250/** 250/*
251* \def DRXDAP_SINGLE_MASTER 251* \def DRXDAP_SINGLE_MASTER
252* \brief Enable I2C single or I2C multimaster mode on host. 252* \brief Enable I2C single or I2C multimaster mode on host.
253* 253*
@@ -262,7 +262,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
262#define DRXDAP_SINGLE_MASTER 1 262#define DRXDAP_SINGLE_MASTER 1
263#endif 263#endif
264 264
265/** 265/*
266* \def DRXDAP_MAX_WCHUNKSIZE 266* \def DRXDAP_MAX_WCHUNKSIZE
267* \brief Defines maximum chunksize of an i2c write action by host. 267* \brief Defines maximum chunksize of an i2c write action by host.
268* 268*
@@ -282,7 +282,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
282#define DRXDAP_MAX_WCHUNKSIZE 60 282#define DRXDAP_MAX_WCHUNKSIZE 60
283#endif 283#endif
284 284
285/** 285/*
286* \def DRXDAP_MAX_RCHUNKSIZE 286* \def DRXDAP_MAX_RCHUNKSIZE
287* \brief Defines maximum chunksize of an i2c read action by host. 287* \brief Defines maximum chunksize of an i2c read action by host.
288* 288*
@@ -297,13 +297,13 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
297#define DRXDAP_MAX_RCHUNKSIZE 60 297#define DRXDAP_MAX_RCHUNKSIZE 60
298#endif 298#endif
299 299
300/************** 300/*************
301* 301*
302* This section describes drxdriver defines. 302* This section describes drxdriver defines.
303* 303*
304**************/ 304**************/
305 305
306/** 306/*
307* \def DRX_UNKNOWN 307* \def DRX_UNKNOWN
308* \brief Generic UNKNOWN value for DRX enumerated types. 308* \brief Generic UNKNOWN value for DRX enumerated types.
309* 309*
@@ -313,7 +313,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
313#define DRX_UNKNOWN (254) 313#define DRX_UNKNOWN (254)
314#endif 314#endif
315 315
316/** 316/*
317* \def DRX_AUTO 317* \def DRX_AUTO
318* \brief Generic AUTO value for DRX enumerated types. 318* \brief Generic AUTO value for DRX enumerated types.
319* 319*
@@ -324,104 +324,104 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
324#define DRX_AUTO (255) 324#define DRX_AUTO (255)
325#endif 325#endif
326 326
327/************** 327/*************
328* 328*
329* This section describes flag definitions for the device capbilities. 329* This section describes flag definitions for the device capbilities.
330* 330*
331**************/ 331**************/
332 332
333/** 333/*
334* \brief LNA capability flag 334* \brief LNA capability flag
335* 335*
336* Device has a Low Noise Amplifier 336* Device has a Low Noise Amplifier
337* 337*
338*/ 338*/
339#define DRX_CAPABILITY_HAS_LNA (1UL << 0) 339#define DRX_CAPABILITY_HAS_LNA (1UL << 0)
340/** 340/*
341* \brief OOB-RX capability flag 341* \brief OOB-RX capability flag
342* 342*
343* Device has OOB-RX 343* Device has OOB-RX
344* 344*
345*/ 345*/
346#define DRX_CAPABILITY_HAS_OOBRX (1UL << 1) 346#define DRX_CAPABILITY_HAS_OOBRX (1UL << 1)
347/** 347/*
348* \brief ATV capability flag 348* \brief ATV capability flag
349* 349*
350* Device has ATV 350* Device has ATV
351* 351*
352*/ 352*/
353#define DRX_CAPABILITY_HAS_ATV (1UL << 2) 353#define DRX_CAPABILITY_HAS_ATV (1UL << 2)
354/** 354/*
355* \brief DVB-T capability flag 355* \brief DVB-T capability flag
356* 356*
357* Device has DVB-T 357* Device has DVB-T
358* 358*
359*/ 359*/
360#define DRX_CAPABILITY_HAS_DVBT (1UL << 3) 360#define DRX_CAPABILITY_HAS_DVBT (1UL << 3)
361/** 361/*
362* \brief ITU-B capability flag 362* \brief ITU-B capability flag
363* 363*
364* Device has ITU-B 364* Device has ITU-B
365* 365*
366*/ 366*/
367#define DRX_CAPABILITY_HAS_ITUB (1UL << 4) 367#define DRX_CAPABILITY_HAS_ITUB (1UL << 4)
368/** 368/*
369* \brief Audio capability flag 369* \brief Audio capability flag
370* 370*
371* Device has Audio 371* Device has Audio
372* 372*
373*/ 373*/
374#define DRX_CAPABILITY_HAS_AUD (1UL << 5) 374#define DRX_CAPABILITY_HAS_AUD (1UL << 5)
375/** 375/*
376* \brief SAW switch capability flag 376* \brief SAW switch capability flag
377* 377*
378* Device has SAW switch 378* Device has SAW switch
379* 379*
380*/ 380*/
381#define DRX_CAPABILITY_HAS_SAWSW (1UL << 6) 381#define DRX_CAPABILITY_HAS_SAWSW (1UL << 6)
382/** 382/*
383* \brief GPIO1 capability flag 383* \brief GPIO1 capability flag
384* 384*
385* Device has GPIO1 385* Device has GPIO1
386* 386*
387*/ 387*/
388#define DRX_CAPABILITY_HAS_GPIO1 (1UL << 7) 388#define DRX_CAPABILITY_HAS_GPIO1 (1UL << 7)
389/** 389/*
390* \brief GPIO2 capability flag 390* \brief GPIO2 capability flag
391* 391*
392* Device has GPIO2 392* Device has GPIO2
393* 393*
394*/ 394*/
395#define DRX_CAPABILITY_HAS_GPIO2 (1UL << 8) 395#define DRX_CAPABILITY_HAS_GPIO2 (1UL << 8)
396/** 396/*
397* \brief IRQN capability flag 397* \brief IRQN capability flag
398* 398*
399* Device has IRQN 399* Device has IRQN
400* 400*
401*/ 401*/
402#define DRX_CAPABILITY_HAS_IRQN (1UL << 9) 402#define DRX_CAPABILITY_HAS_IRQN (1UL << 9)
403/** 403/*
404* \brief 8VSB capability flag 404* \brief 8VSB capability flag
405* 405*
406* Device has 8VSB 406* Device has 8VSB
407* 407*
408*/ 408*/
409#define DRX_CAPABILITY_HAS_8VSB (1UL << 10) 409#define DRX_CAPABILITY_HAS_8VSB (1UL << 10)
410/** 410/*
411* \brief SMA-TX capability flag 411* \brief SMA-TX capability flag
412* 412*
413* Device has SMATX 413* Device has SMATX
414* 414*
415*/ 415*/
416#define DRX_CAPABILITY_HAS_SMATX (1UL << 11) 416#define DRX_CAPABILITY_HAS_SMATX (1UL << 11)
417/** 417/*
418* \brief SMA-RX capability flag 418* \brief SMA-RX capability flag
419* 419*
420* Device has SMARX 420* Device has SMARX
421* 421*
422*/ 422*/
423#define DRX_CAPABILITY_HAS_SMARX (1UL << 12) 423#define DRX_CAPABILITY_HAS_SMARX (1UL << 12)
424/** 424/*
425* \brief ITU-A/C capability flag 425* \brief ITU-A/C capability flag
426* 426*
427* Device has ITU-A/C 427* Device has ITU-A/C
@@ -439,7 +439,7 @@ MACROS
439 DRX_VERSIONSTRING_HELP(PATCH) 439 DRX_VERSIONSTRING_HELP(PATCH)
440#define DRX_VERSIONSTRING_HELP(NUM) #NUM 440#define DRX_VERSIONSTRING_HELP(NUM) #NUM
441 441
442/** 442/*
443* \brief Macro to create byte array elements from 16 bit integers. 443* \brief Macro to create byte array elements from 16 bit integers.
444* This macro is used to create byte arrays for block writes. 444* This macro is used to create byte arrays for block writes.
445* Block writes speed up I2C traffic between host and demod. 445* Block writes speed up I2C traffic between host and demod.
@@ -449,7 +449,7 @@ MACROS
449#define DRX_16TO8(x) ((u8) (((u16)x) & 0xFF)), \ 449#define DRX_16TO8(x) ((u8) (((u16)x) & 0xFF)), \
450 ((u8)((((u16)x)>>8)&0xFF)) 450 ((u8)((((u16)x)>>8)&0xFF))
451 451
452/** 452/*
453* \brief Macro to convert 16 bit register value to a s32 453* \brief Macro to convert 16 bit register value to a s32
454*/ 454*/
455#define DRX_U16TODRXFREQ(x) ((x & 0x8000) ? \ 455#define DRX_U16TODRXFREQ(x) ((x & 0x8000) ? \
@@ -461,191 +461,191 @@ MACROS
461ENUM 461ENUM
462-------------------------------------------------------------------------*/ 462-------------------------------------------------------------------------*/
463 463
464/** 464/*
465* \enum enum drx_standard 465* \enum enum drx_standard
466* \brief Modulation standards. 466* \brief Modulation standards.
467*/ 467*/
468enum drx_standard { 468enum drx_standard {
469 DRX_STANDARD_DVBT = 0, /**< Terrestrial DVB-T. */ 469 DRX_STANDARD_DVBT = 0, /*< Terrestrial DVB-T. */
470 DRX_STANDARD_8VSB, /**< Terrestrial 8VSB. */ 470 DRX_STANDARD_8VSB, /*< Terrestrial 8VSB. */
471 DRX_STANDARD_NTSC, /**< Terrestrial\Cable analog NTSC. */ 471 DRX_STANDARD_NTSC, /*< Terrestrial\Cable analog NTSC. */
472 DRX_STANDARD_PAL_SECAM_BG, 472 DRX_STANDARD_PAL_SECAM_BG,
473 /**< Terrestrial analog PAL/SECAM B/G */ 473 /*< Terrestrial analog PAL/SECAM B/G */
474 DRX_STANDARD_PAL_SECAM_DK, 474 DRX_STANDARD_PAL_SECAM_DK,
475 /**< Terrestrial analog PAL/SECAM D/K */ 475 /*< Terrestrial analog PAL/SECAM D/K */
476 DRX_STANDARD_PAL_SECAM_I, 476 DRX_STANDARD_PAL_SECAM_I,
477 /**< Terrestrial analog PAL/SECAM I */ 477 /*< Terrestrial analog PAL/SECAM I */
478 DRX_STANDARD_PAL_SECAM_L, 478 DRX_STANDARD_PAL_SECAM_L,
479 /**< Terrestrial analog PAL/SECAM L 479 /*< Terrestrial analog PAL/SECAM L
480 with negative modulation */ 480 with negative modulation */
481 DRX_STANDARD_PAL_SECAM_LP, 481 DRX_STANDARD_PAL_SECAM_LP,
482 /**< Terrestrial analog PAL/SECAM L 482 /*< Terrestrial analog PAL/SECAM L
483 with positive modulation */ 483 with positive modulation */
484 DRX_STANDARD_ITU_A, /**< Cable ITU ANNEX A. */ 484 DRX_STANDARD_ITU_A, /*< Cable ITU ANNEX A. */
485 DRX_STANDARD_ITU_B, /**< Cable ITU ANNEX B. */ 485 DRX_STANDARD_ITU_B, /*< Cable ITU ANNEX B. */
486 DRX_STANDARD_ITU_C, /**< Cable ITU ANNEX C. */ 486 DRX_STANDARD_ITU_C, /*< Cable ITU ANNEX C. */
487 DRX_STANDARD_ITU_D, /**< Cable ITU ANNEX D. */ 487 DRX_STANDARD_ITU_D, /*< Cable ITU ANNEX D. */
488 DRX_STANDARD_FM, /**< Terrestrial\Cable FM radio */ 488 DRX_STANDARD_FM, /*< Terrestrial\Cable FM radio */
489 DRX_STANDARD_DTMB, /**< Terrestrial DTMB standard (China)*/ 489 DRX_STANDARD_DTMB, /*< Terrestrial DTMB standard (China)*/
490 DRX_STANDARD_UNKNOWN = DRX_UNKNOWN, 490 DRX_STANDARD_UNKNOWN = DRX_UNKNOWN,
491 /**< Standard unknown. */ 491 /*< Standard unknown. */
492 DRX_STANDARD_AUTO = DRX_AUTO 492 DRX_STANDARD_AUTO = DRX_AUTO
493 /**< Autodetect standard. */ 493 /*< Autodetect standard. */
494}; 494};
495 495
496/** 496/*
497* \enum enum drx_standard 497* \enum enum drx_standard
498* \brief Modulation sub-standards. 498* \brief Modulation sub-standards.
499*/ 499*/
500enum drx_substandard { 500enum drx_substandard {
501 DRX_SUBSTANDARD_MAIN = 0, /**< Main subvariant of standard */ 501 DRX_SUBSTANDARD_MAIN = 0, /*< Main subvariant of standard */
502 DRX_SUBSTANDARD_ATV_BG_SCANDINAVIA, 502 DRX_SUBSTANDARD_ATV_BG_SCANDINAVIA,
503 DRX_SUBSTANDARD_ATV_DK_POLAND, 503 DRX_SUBSTANDARD_ATV_DK_POLAND,
504 DRX_SUBSTANDARD_ATV_DK_CHINA, 504 DRX_SUBSTANDARD_ATV_DK_CHINA,
505 DRX_SUBSTANDARD_UNKNOWN = DRX_UNKNOWN, 505 DRX_SUBSTANDARD_UNKNOWN = DRX_UNKNOWN,
506 /**< Sub-standard unknown. */ 506 /*< Sub-standard unknown. */
507 DRX_SUBSTANDARD_AUTO = DRX_AUTO 507 DRX_SUBSTANDARD_AUTO = DRX_AUTO
508 /**< Auto (default) sub-standard */ 508 /*< Auto (default) sub-standard */
509}; 509};
510 510
511/** 511/*
512* \enum enum drx_bandwidth 512* \enum enum drx_bandwidth
513* \brief Channel bandwidth or channel spacing. 513* \brief Channel bandwidth or channel spacing.
514*/ 514*/
515enum drx_bandwidth { 515enum drx_bandwidth {
516 DRX_BANDWIDTH_8MHZ = 0, /**< Bandwidth 8 MHz. */ 516 DRX_BANDWIDTH_8MHZ = 0, /*< Bandwidth 8 MHz. */
517 DRX_BANDWIDTH_7MHZ, /**< Bandwidth 7 MHz. */ 517 DRX_BANDWIDTH_7MHZ, /*< Bandwidth 7 MHz. */
518 DRX_BANDWIDTH_6MHZ, /**< Bandwidth 6 MHz. */ 518 DRX_BANDWIDTH_6MHZ, /*< Bandwidth 6 MHz. */
519 DRX_BANDWIDTH_UNKNOWN = DRX_UNKNOWN, 519 DRX_BANDWIDTH_UNKNOWN = DRX_UNKNOWN,
520 /**< Bandwidth unknown. */ 520 /*< Bandwidth unknown. */
521 DRX_BANDWIDTH_AUTO = DRX_AUTO 521 DRX_BANDWIDTH_AUTO = DRX_AUTO
522 /**< Auto Set Bandwidth */ 522 /*< Auto Set Bandwidth */
523}; 523};
524 524
525/** 525/*
526* \enum enum drx_mirror 526* \enum enum drx_mirror
527* \brief Indicate if channel spectrum is mirrored or not. 527* \brief Indicate if channel spectrum is mirrored or not.
528*/ 528*/
529enum drx_mirror { 529enum drx_mirror {
530 DRX_MIRROR_NO = 0, /**< Spectrum is not mirrored. */ 530 DRX_MIRROR_NO = 0, /*< Spectrum is not mirrored. */
531 DRX_MIRROR_YES, /**< Spectrum is mirrored. */ 531 DRX_MIRROR_YES, /*< Spectrum is mirrored. */
532 DRX_MIRROR_UNKNOWN = DRX_UNKNOWN, 532 DRX_MIRROR_UNKNOWN = DRX_UNKNOWN,
533 /**< Unknown if spectrum is mirrored. */ 533 /*< Unknown if spectrum is mirrored. */
534 DRX_MIRROR_AUTO = DRX_AUTO 534 DRX_MIRROR_AUTO = DRX_AUTO
535 /**< Autodetect if spectrum is mirrored. */ 535 /*< Autodetect if spectrum is mirrored. */
536}; 536};
537 537
538/** 538/*
539* \enum enum drx_modulation 539* \enum enum drx_modulation
540* \brief Constellation type of the channel. 540* \brief Constellation type of the channel.
541*/ 541*/
542enum drx_modulation { 542enum drx_modulation {
543 DRX_CONSTELLATION_BPSK = 0, /**< Modulation is BPSK. */ 543 DRX_CONSTELLATION_BPSK = 0, /*< Modulation is BPSK. */
544 DRX_CONSTELLATION_QPSK, /**< Constellation is QPSK. */ 544 DRX_CONSTELLATION_QPSK, /*< Constellation is QPSK. */
545 DRX_CONSTELLATION_PSK8, /**< Constellation is PSK8. */ 545 DRX_CONSTELLATION_PSK8, /*< Constellation is PSK8. */
546 DRX_CONSTELLATION_QAM16, /**< Constellation is QAM16. */ 546 DRX_CONSTELLATION_QAM16, /*< Constellation is QAM16. */
547 DRX_CONSTELLATION_QAM32, /**< Constellation is QAM32. */ 547 DRX_CONSTELLATION_QAM32, /*< Constellation is QAM32. */
548 DRX_CONSTELLATION_QAM64, /**< Constellation is QAM64. */ 548 DRX_CONSTELLATION_QAM64, /*< Constellation is QAM64. */
549 DRX_CONSTELLATION_QAM128, /**< Constellation is QAM128. */ 549 DRX_CONSTELLATION_QAM128, /*< Constellation is QAM128. */
550 DRX_CONSTELLATION_QAM256, /**< Constellation is QAM256. */ 550 DRX_CONSTELLATION_QAM256, /*< Constellation is QAM256. */
551 DRX_CONSTELLATION_QAM512, /**< Constellation is QAM512. */ 551 DRX_CONSTELLATION_QAM512, /*< Constellation is QAM512. */
552 DRX_CONSTELLATION_QAM1024, /**< Constellation is QAM1024. */ 552 DRX_CONSTELLATION_QAM1024, /*< Constellation is QAM1024. */
553 DRX_CONSTELLATION_QPSK_NR, /**< Constellation is QPSK_NR */ 553 DRX_CONSTELLATION_QPSK_NR, /*< Constellation is QPSK_NR */
554 DRX_CONSTELLATION_UNKNOWN = DRX_UNKNOWN, 554 DRX_CONSTELLATION_UNKNOWN = DRX_UNKNOWN,
555 /**< Constellation unknown. */ 555 /*< Constellation unknown. */
556 DRX_CONSTELLATION_AUTO = DRX_AUTO 556 DRX_CONSTELLATION_AUTO = DRX_AUTO
557 /**< Autodetect constellation. */ 557 /*< Autodetect constellation. */
558}; 558};
559 559
560/** 560/*
561* \enum enum drx_hierarchy 561* \enum enum drx_hierarchy
562* \brief Hierarchy of the channel. 562* \brief Hierarchy of the channel.
563*/ 563*/
564enum drx_hierarchy { 564enum drx_hierarchy {
565 DRX_HIERARCHY_NONE = 0, /**< None hierarchical channel. */ 565 DRX_HIERARCHY_NONE = 0, /*< None hierarchical channel. */
566 DRX_HIERARCHY_ALPHA1, /**< Hierarchical channel, alpha=1. */ 566 DRX_HIERARCHY_ALPHA1, /*< Hierarchical channel, alpha=1. */
567 DRX_HIERARCHY_ALPHA2, /**< Hierarchical channel, alpha=2. */ 567 DRX_HIERARCHY_ALPHA2, /*< Hierarchical channel, alpha=2. */
568 DRX_HIERARCHY_ALPHA4, /**< Hierarchical channel, alpha=4. */ 568 DRX_HIERARCHY_ALPHA4, /*< Hierarchical channel, alpha=4. */
569 DRX_HIERARCHY_UNKNOWN = DRX_UNKNOWN, 569 DRX_HIERARCHY_UNKNOWN = DRX_UNKNOWN,
570 /**< Hierarchy unknown. */ 570 /*< Hierarchy unknown. */
571 DRX_HIERARCHY_AUTO = DRX_AUTO 571 DRX_HIERARCHY_AUTO = DRX_AUTO
572 /**< Autodetect hierarchy. */ 572 /*< Autodetect hierarchy. */
573}; 573};
574 574
575/** 575/*
576* \enum enum drx_priority 576* \enum enum drx_priority
577* \brief Channel priority in case of hierarchical transmission. 577* \brief Channel priority in case of hierarchical transmission.
578*/ 578*/
579enum drx_priority { 579enum drx_priority {
580 DRX_PRIORITY_LOW = 0, /**< Low priority channel. */ 580 DRX_PRIORITY_LOW = 0, /*< Low priority channel. */
581 DRX_PRIORITY_HIGH, /**< High priority channel. */ 581 DRX_PRIORITY_HIGH, /*< High priority channel. */
582 DRX_PRIORITY_UNKNOWN = DRX_UNKNOWN 582 DRX_PRIORITY_UNKNOWN = DRX_UNKNOWN
583 /**< Priority unknown. */ 583 /*< Priority unknown. */
584}; 584};
585 585
586/** 586/*
587* \enum enum drx_coderate 587* \enum enum drx_coderate
588* \brief Channel priority in case of hierarchical transmission. 588* \brief Channel priority in case of hierarchical transmission.
589*/ 589*/
590enum drx_coderate { 590enum drx_coderate {
591 DRX_CODERATE_1DIV2 = 0, /**< Code rate 1/2nd. */ 591 DRX_CODERATE_1DIV2 = 0, /*< Code rate 1/2nd. */
592 DRX_CODERATE_2DIV3, /**< Code rate 2/3nd. */ 592 DRX_CODERATE_2DIV3, /*< Code rate 2/3nd. */
593 DRX_CODERATE_3DIV4, /**< Code rate 3/4nd. */ 593 DRX_CODERATE_3DIV4, /*< Code rate 3/4nd. */
594 DRX_CODERATE_5DIV6, /**< Code rate 5/6nd. */ 594 DRX_CODERATE_5DIV6, /*< Code rate 5/6nd. */
595 DRX_CODERATE_7DIV8, /**< Code rate 7/8nd. */ 595 DRX_CODERATE_7DIV8, /*< Code rate 7/8nd. */
596 DRX_CODERATE_UNKNOWN = DRX_UNKNOWN, 596 DRX_CODERATE_UNKNOWN = DRX_UNKNOWN,
597 /**< Code rate unknown. */ 597 /*< Code rate unknown. */
598 DRX_CODERATE_AUTO = DRX_AUTO 598 DRX_CODERATE_AUTO = DRX_AUTO
599 /**< Autodetect code rate. */ 599 /*< Autodetect code rate. */
600}; 600};
601 601
602/** 602/*
603* \enum enum drx_guard 603* \enum enum drx_guard
604* \brief Guard interval of a channel. 604* \brief Guard interval of a channel.
605*/ 605*/
606enum drx_guard { 606enum drx_guard {
607 DRX_GUARD_1DIV32 = 0, /**< Guard interval 1/32nd. */ 607 DRX_GUARD_1DIV32 = 0, /*< Guard interval 1/32nd. */
608 DRX_GUARD_1DIV16, /**< Guard interval 1/16th. */ 608 DRX_GUARD_1DIV16, /*< Guard interval 1/16th. */
609 DRX_GUARD_1DIV8, /**< Guard interval 1/8th. */ 609 DRX_GUARD_1DIV8, /*< Guard interval 1/8th. */
610 DRX_GUARD_1DIV4, /**< Guard interval 1/4th. */ 610 DRX_GUARD_1DIV4, /*< Guard interval 1/4th. */
611 DRX_GUARD_UNKNOWN = DRX_UNKNOWN, 611 DRX_GUARD_UNKNOWN = DRX_UNKNOWN,
612 /**< Guard interval unknown. */ 612 /*< Guard interval unknown. */
613 DRX_GUARD_AUTO = DRX_AUTO 613 DRX_GUARD_AUTO = DRX_AUTO
614 /**< Autodetect guard interval. */ 614 /*< Autodetect guard interval. */
615}; 615};
616 616
617/** 617/*
618* \enum enum drx_fft_mode 618* \enum enum drx_fft_mode
619* \brief FFT mode. 619* \brief FFT mode.
620*/ 620*/
621enum drx_fft_mode { 621enum drx_fft_mode {
622 DRX_FFTMODE_2K = 0, /**< 2K FFT mode. */ 622 DRX_FFTMODE_2K = 0, /*< 2K FFT mode. */
623 DRX_FFTMODE_4K, /**< 4K FFT mode. */ 623 DRX_FFTMODE_4K, /*< 4K FFT mode. */
624 DRX_FFTMODE_8K, /**< 8K FFT mode. */ 624 DRX_FFTMODE_8K, /*< 8K FFT mode. */
625 DRX_FFTMODE_UNKNOWN = DRX_UNKNOWN, 625 DRX_FFTMODE_UNKNOWN = DRX_UNKNOWN,
626 /**< FFT mode unknown. */ 626 /*< FFT mode unknown. */
627 DRX_FFTMODE_AUTO = DRX_AUTO 627 DRX_FFTMODE_AUTO = DRX_AUTO
628 /**< Autodetect FFT mode. */ 628 /*< Autodetect FFT mode. */
629}; 629};
630 630
631/** 631/*
632* \enum enum drx_classification 632* \enum enum drx_classification
633* \brief Channel classification. 633* \brief Channel classification.
634*/ 634*/
635enum drx_classification { 635enum drx_classification {
636 DRX_CLASSIFICATION_GAUSS = 0, /**< Gaussion noise. */ 636 DRX_CLASSIFICATION_GAUSS = 0, /*< Gaussion noise. */
637 DRX_CLASSIFICATION_HVY_GAUSS, /**< Heavy Gaussion noise. */ 637 DRX_CLASSIFICATION_HVY_GAUSS, /*< Heavy Gaussion noise. */
638 DRX_CLASSIFICATION_COCHANNEL, /**< Co-channel. */ 638 DRX_CLASSIFICATION_COCHANNEL, /*< Co-channel. */
639 DRX_CLASSIFICATION_STATIC, /**< Static echo. */ 639 DRX_CLASSIFICATION_STATIC, /*< Static echo. */
640 DRX_CLASSIFICATION_MOVING, /**< Moving echo. */ 640 DRX_CLASSIFICATION_MOVING, /*< Moving echo. */
641 DRX_CLASSIFICATION_ZERODB, /**< Zero dB echo. */ 641 DRX_CLASSIFICATION_ZERODB, /*< Zero dB echo. */
642 DRX_CLASSIFICATION_UNKNOWN = DRX_UNKNOWN, 642 DRX_CLASSIFICATION_UNKNOWN = DRX_UNKNOWN,
643 /**< Unknown classification */ 643 /*< Unknown classification */
644 DRX_CLASSIFICATION_AUTO = DRX_AUTO 644 DRX_CLASSIFICATION_AUTO = DRX_AUTO
645 /**< Autodetect classification. */ 645 /*< Autodetect classification. */
646}; 646};
647 647
648/** 648/*
649* /enum enum drx_interleave_mode 649* /enum enum drx_interleave_mode
650* /brief Interleave modes 650* /brief Interleave modes
651*/ 651*/
@@ -673,80 +673,80 @@ enum drx_interleave_mode {
673 DRX_INTERLEAVEMODE_B52_M48, 673 DRX_INTERLEAVEMODE_B52_M48,
674 DRX_INTERLEAVEMODE_B52_M0, 674 DRX_INTERLEAVEMODE_B52_M0,
675 DRX_INTERLEAVEMODE_UNKNOWN = DRX_UNKNOWN, 675 DRX_INTERLEAVEMODE_UNKNOWN = DRX_UNKNOWN,
676 /**< Unknown interleave mode */ 676 /*< Unknown interleave mode */
677 DRX_INTERLEAVEMODE_AUTO = DRX_AUTO 677 DRX_INTERLEAVEMODE_AUTO = DRX_AUTO
678 /**< Autodetect interleave mode */ 678 /*< Autodetect interleave mode */
679}; 679};
680 680
681/** 681/*
682* \enum enum drx_carrier_mode 682* \enum enum drx_carrier_mode
683* \brief Channel Carrier Mode. 683* \brief Channel Carrier Mode.
684*/ 684*/
685enum drx_carrier_mode { 685enum drx_carrier_mode {
686 DRX_CARRIER_MULTI = 0, /**< Multi carrier mode */ 686 DRX_CARRIER_MULTI = 0, /*< Multi carrier mode */
687 DRX_CARRIER_SINGLE, /**< Single carrier mode */ 687 DRX_CARRIER_SINGLE, /*< Single carrier mode */
688 DRX_CARRIER_UNKNOWN = DRX_UNKNOWN, 688 DRX_CARRIER_UNKNOWN = DRX_UNKNOWN,
689 /**< Carrier mode unknown. */ 689 /*< Carrier mode unknown. */
690 DRX_CARRIER_AUTO = DRX_AUTO /**< Autodetect carrier mode */ 690 DRX_CARRIER_AUTO = DRX_AUTO /*< Autodetect carrier mode */
691}; 691};
692 692
693/** 693/*
694* \enum enum drx_frame_mode 694* \enum enum drx_frame_mode
695* \brief Channel Frame Mode. 695* \brief Channel Frame Mode.
696*/ 696*/
697enum drx_frame_mode { 697enum drx_frame_mode {
698 DRX_FRAMEMODE_420 = 0, /**< 420 with variable PN */ 698 DRX_FRAMEMODE_420 = 0, /*< 420 with variable PN */
699 DRX_FRAMEMODE_595, /**< 595 */ 699 DRX_FRAMEMODE_595, /*< 595 */
700 DRX_FRAMEMODE_945, /**< 945 with variable PN */ 700 DRX_FRAMEMODE_945, /*< 945 with variable PN */
701 DRX_FRAMEMODE_420_FIXED_PN, 701 DRX_FRAMEMODE_420_FIXED_PN,
702 /**< 420 with fixed PN */ 702 /*< 420 with fixed PN */
703 DRX_FRAMEMODE_945_FIXED_PN, 703 DRX_FRAMEMODE_945_FIXED_PN,
704 /**< 945 with fixed PN */ 704 /*< 945 with fixed PN */
705 DRX_FRAMEMODE_UNKNOWN = DRX_UNKNOWN, 705 DRX_FRAMEMODE_UNKNOWN = DRX_UNKNOWN,
706 /**< Frame mode unknown. */ 706 /*< Frame mode unknown. */
707 DRX_FRAMEMODE_AUTO = DRX_AUTO 707 DRX_FRAMEMODE_AUTO = DRX_AUTO
708 /**< Autodetect frame mode */ 708 /*< Autodetect frame mode */
709}; 709};
710 710
711/** 711/*
712* \enum enum drx_tps_frame 712* \enum enum drx_tps_frame
713* \brief Frame number in current super-frame. 713* \brief Frame number in current super-frame.
714*/ 714*/
715enum drx_tps_frame { 715enum drx_tps_frame {
716 DRX_TPS_FRAME1 = 0, /**< TPS frame 1. */ 716 DRX_TPS_FRAME1 = 0, /*< TPS frame 1. */
717 DRX_TPS_FRAME2, /**< TPS frame 2. */ 717 DRX_TPS_FRAME2, /*< TPS frame 2. */
718 DRX_TPS_FRAME3, /**< TPS frame 3. */ 718 DRX_TPS_FRAME3, /*< TPS frame 3. */
719 DRX_TPS_FRAME4, /**< TPS frame 4. */ 719 DRX_TPS_FRAME4, /*< TPS frame 4. */
720 DRX_TPS_FRAME_UNKNOWN = DRX_UNKNOWN 720 DRX_TPS_FRAME_UNKNOWN = DRX_UNKNOWN
721 /**< TPS frame unknown. */ 721 /*< TPS frame unknown. */
722}; 722};
723 723
724/** 724/*
725* \enum enum drx_ldpc 725* \enum enum drx_ldpc
726* \brief TPS LDPC . 726* \brief TPS LDPC .
727*/ 727*/
728enum drx_ldpc { 728enum drx_ldpc {
729 DRX_LDPC_0_4 = 0, /**< LDPC 0.4 */ 729 DRX_LDPC_0_4 = 0, /*< LDPC 0.4 */
730 DRX_LDPC_0_6, /**< LDPC 0.6 */ 730 DRX_LDPC_0_6, /*< LDPC 0.6 */
731 DRX_LDPC_0_8, /**< LDPC 0.8 */ 731 DRX_LDPC_0_8, /*< LDPC 0.8 */
732 DRX_LDPC_UNKNOWN = DRX_UNKNOWN, 732 DRX_LDPC_UNKNOWN = DRX_UNKNOWN,
733 /**< LDPC unknown. */ 733 /*< LDPC unknown. */
734 DRX_LDPC_AUTO = DRX_AUTO /**< Autodetect LDPC */ 734 DRX_LDPC_AUTO = DRX_AUTO /*< Autodetect LDPC */
735}; 735};
736 736
737/** 737/*
738* \enum enum drx_pilot_mode 738* \enum enum drx_pilot_mode
739* \brief Pilot modes in DTMB. 739* \brief Pilot modes in DTMB.
740*/ 740*/
741enum drx_pilot_mode { 741enum drx_pilot_mode {
742 DRX_PILOT_ON = 0, /**< Pilot On */ 742 DRX_PILOT_ON = 0, /*< Pilot On */
743 DRX_PILOT_OFF, /**< Pilot Off */ 743 DRX_PILOT_OFF, /*< Pilot Off */
744 DRX_PILOT_UNKNOWN = DRX_UNKNOWN, 744 DRX_PILOT_UNKNOWN = DRX_UNKNOWN,
745 /**< Pilot unknown. */ 745 /*< Pilot unknown. */
746 DRX_PILOT_AUTO = DRX_AUTO /**< Autodetect Pilot */ 746 DRX_PILOT_AUTO = DRX_AUTO /*< Autodetect Pilot */
747}; 747};
748 748
749/** 749/*
750 * enum drxu_code_action - indicate if firmware has to be uploaded or verified. 750 * enum drxu_code_action - indicate if firmware has to be uploaded or verified.
751 * @UCODE_UPLOAD: Upload the microcode image to device 751 * @UCODE_UPLOAD: Upload the microcode image to device
752 * @UCODE_VERIFY: Compare microcode image with code on device 752 * @UCODE_VERIFY: Compare microcode image with code on device
@@ -756,7 +756,7 @@ enum drxu_code_action {
756 UCODE_VERIFY 756 UCODE_VERIFY
757}; 757};
758 758
759/** 759/*
760* \enum enum drx_lock_status * \brief Used to reflect current lock status of demodulator. 760* \enum enum drx_lock_status * \brief Used to reflect current lock status of demodulator.
761* 761*
762* The generic lock states have device dependent semantics. 762* The generic lock states have device dependent semantics.
@@ -801,7 +801,7 @@ enum drx_lock_status {
801 DRX_LOCKED 801 DRX_LOCKED
802}; 802};
803 803
804/** 804/*
805* \enum enum drx_uio* \brief Used to address a User IO (UIO). 805* \enum enum drx_uio* \brief Used to address a User IO (UIO).
806*/ 806*/
807enum drx_uio { 807enum drx_uio {
@@ -840,7 +840,7 @@ enum drx_uio {
840 DRX_UIO_MAX = DRX_UIO32 840 DRX_UIO_MAX = DRX_UIO32
841}; 841};
842 842
843/** 843/*
844* \enum enum drxuio_mode * \brief Used to configure the modus oprandi of a UIO. 844* \enum enum drxuio_mode * \brief Used to configure the modus oprandi of a UIO.
845* 845*
846* DRX_UIO_MODE_FIRMWARE is an old uio mode. 846* DRX_UIO_MODE_FIRMWARE is an old uio mode.
@@ -850,37 +850,37 @@ enum drx_uio {
850*/ 850*/
851enum drxuio_mode { 851enum drxuio_mode {
852 DRX_UIO_MODE_DISABLE = 0x01, 852 DRX_UIO_MODE_DISABLE = 0x01,
853 /**< not used, pin is configured as input */ 853 /*< not used, pin is configured as input */
854 DRX_UIO_MODE_READWRITE = 0x02, 854 DRX_UIO_MODE_READWRITE = 0x02,
855 /**< used for read/write by application */ 855 /*< used for read/write by application */
856 DRX_UIO_MODE_FIRMWARE = 0x04, 856 DRX_UIO_MODE_FIRMWARE = 0x04,
857 /**< controlled by firmware, function 0 */ 857 /*< controlled by firmware, function 0 */
858 DRX_UIO_MODE_FIRMWARE0 = DRX_UIO_MODE_FIRMWARE, 858 DRX_UIO_MODE_FIRMWARE0 = DRX_UIO_MODE_FIRMWARE,
859 /**< same as above */ 859 /*< same as above */
860 DRX_UIO_MODE_FIRMWARE1 = 0x08, 860 DRX_UIO_MODE_FIRMWARE1 = 0x08,
861 /**< controlled by firmware, function 1 */ 861 /*< controlled by firmware, function 1 */
862 DRX_UIO_MODE_FIRMWARE2 = 0x10, 862 DRX_UIO_MODE_FIRMWARE2 = 0x10,
863 /**< controlled by firmware, function 2 */ 863 /*< controlled by firmware, function 2 */
864 DRX_UIO_MODE_FIRMWARE3 = 0x20, 864 DRX_UIO_MODE_FIRMWARE3 = 0x20,
865 /**< controlled by firmware, function 3 */ 865 /*< controlled by firmware, function 3 */
866 DRX_UIO_MODE_FIRMWARE4 = 0x40, 866 DRX_UIO_MODE_FIRMWARE4 = 0x40,
867 /**< controlled by firmware, function 4 */ 867 /*< controlled by firmware, function 4 */
868 DRX_UIO_MODE_FIRMWARE5 = 0x80 868 DRX_UIO_MODE_FIRMWARE5 = 0x80
869 /**< controlled by firmware, function 5 */ 869 /*< controlled by firmware, function 5 */
870}; 870};
871 871
872/** 872/*
873* \enum enum drxoob_downstream_standard * \brief Used to select OOB standard. 873* \enum enum drxoob_downstream_standard * \brief Used to select OOB standard.
874* 874*
875* Based on ANSI 55-1 and 55-2 875* Based on ANSI 55-1 and 55-2
876*/ 876*/
877enum drxoob_downstream_standard { 877enum drxoob_downstream_standard {
878 DRX_OOB_MODE_A = 0, 878 DRX_OOB_MODE_A = 0,
879 /**< ANSI 55-1 */ 879 /*< ANSI 55-1 */
880 DRX_OOB_MODE_B_GRADE_A, 880 DRX_OOB_MODE_B_GRADE_A,
881 /**< ANSI 55-2 A */ 881 /*< ANSI 55-2 A */
882 DRX_OOB_MODE_B_GRADE_B 882 DRX_OOB_MODE_B_GRADE_B
883 /**< ANSI 55-2 B */ 883 /*< ANSI 55-2 B */
884}; 884};
885 885
886/*------------------------------------------------------------------------- 886/*-------------------------------------------------------------------------
@@ -924,7 +924,7 @@ STRUCTS
924/*============================================================================*/ 924/*============================================================================*/
925/*============================================================================*/ 925/*============================================================================*/
926 926
927/** 927/*
928 * struct drxu_code_info Parameters for microcode upload and verfiy. 928 * struct drxu_code_info Parameters for microcode upload and verfiy.
929 * 929 *
930 * @mc_file: microcode file name 930 * @mc_file: microcode file name
@@ -935,7 +935,7 @@ struct drxu_code_info {
935 char *mc_file; 935 char *mc_file;
936}; 936};
937 937
938/** 938/*
939* \struct drx_mc_version_rec_t 939* \struct drx_mc_version_rec_t
940* \brief Microcode version record 940* \brief Microcode version record
941* Version numbers are stored in BCD format, as usual: 941* Version numbers are stored in BCD format, as usual:
@@ -963,7 +963,7 @@ struct drx_mc_version_rec {
963 963
964/*========================================*/ 964/*========================================*/
965 965
966/** 966/*
967* \struct drx_filter_info_t 967* \struct drx_filter_info_t
968* \brief Parameters for loading filter coefficients 968* \brief Parameters for loading filter coefficients
969* 969*
@@ -971,18 +971,18 @@ struct drx_mc_version_rec {
971*/ 971*/
972struct drx_filter_info { 972struct drx_filter_info {
973 u8 *data_re; 973 u8 *data_re;
974 /**< pointer to coefficients for RE */ 974 /*< pointer to coefficients for RE */
975 u8 *data_im; 975 u8 *data_im;
976 /**< pointer to coefficients for IM */ 976 /*< pointer to coefficients for IM */
977 u16 size_re; 977 u16 size_re;
978 /**< size of coefficients for RE */ 978 /*< size of coefficients for RE */
979 u16 size_im; 979 u16 size_im;
980 /**< size of coefficients for IM */ 980 /*< size of coefficients for IM */
981}; 981};
982 982
983/*========================================*/ 983/*========================================*/
984 984
985/** 985/*
986* \struct struct drx_channel * \brief The set of parameters describing a single channel. 986* \struct struct drx_channel * \brief The set of parameters describing a single channel.
987* 987*
988* Used by DRX_CTRL_SET_CHANNEL and DRX_CTRL_GET_CHANNEL. 988* Used by DRX_CTRL_SET_CHANNEL and DRX_CTRL_GET_CHANNEL.
@@ -991,29 +991,29 @@ struct drx_filter_info {
991*/ 991*/
992struct drx_channel { 992struct drx_channel {
993 s32 frequency; 993 s32 frequency;
994 /**< frequency in kHz */ 994 /*< frequency in kHz */
995 enum drx_bandwidth bandwidth; 995 enum drx_bandwidth bandwidth;
996 /**< bandwidth */ 996 /*< bandwidth */
997 enum drx_mirror mirror; /**< mirrored or not on RF */ 997 enum drx_mirror mirror; /*< mirrored or not on RF */
998 enum drx_modulation constellation; 998 enum drx_modulation constellation;
999 /**< constellation */ 999 /*< constellation */
1000 enum drx_hierarchy hierarchy; 1000 enum drx_hierarchy hierarchy;
1001 /**< hierarchy */ 1001 /*< hierarchy */
1002 enum drx_priority priority; /**< priority */ 1002 enum drx_priority priority; /*< priority */
1003 enum drx_coderate coderate; /**< coderate */ 1003 enum drx_coderate coderate; /*< coderate */
1004 enum drx_guard guard; /**< guard interval */ 1004 enum drx_guard guard; /*< guard interval */
1005 enum drx_fft_mode fftmode; /**< fftmode */ 1005 enum drx_fft_mode fftmode; /*< fftmode */
1006 enum drx_classification classification; 1006 enum drx_classification classification;
1007 /**< classification */ 1007 /*< classification */
1008 u32 symbolrate; 1008 u32 symbolrate;
1009 /**< symbolrate in symbols/sec */ 1009 /*< symbolrate in symbols/sec */
1010 enum drx_interleave_mode interleavemode; 1010 enum drx_interleave_mode interleavemode;
1011 /**< interleaveMode QAM */ 1011 /*< interleaveMode QAM */
1012 enum drx_ldpc ldpc; /**< ldpc */ 1012 enum drx_ldpc ldpc; /*< ldpc */
1013 enum drx_carrier_mode carrier; /**< carrier */ 1013 enum drx_carrier_mode carrier; /*< carrier */
1014 enum drx_frame_mode framemode; 1014 enum drx_frame_mode framemode;
1015 /**< frame mode */ 1015 /*< frame mode */
1016 enum drx_pilot_mode pilot; /**< pilot mode */ 1016 enum drx_pilot_mode pilot; /*< pilot mode */
1017}; 1017};
1018 1018
1019/*========================================*/ 1019/*========================================*/
@@ -1027,74 +1027,74 @@ enum drx_cfg_sqi_speed {
1027 1027
1028/*========================================*/ 1028/*========================================*/
1029 1029
1030/** 1030/*
1031* \struct struct drx_complex * A complex number. 1031* \struct struct drx_complex * A complex number.
1032* 1032*
1033* Used by DRX_CTRL_CONSTEL. 1033* Used by DRX_CTRL_CONSTEL.
1034*/ 1034*/
1035struct drx_complex { 1035struct drx_complex {
1036 s16 im; 1036 s16 im;
1037 /**< Imaginary part. */ 1037 /*< Imaginary part. */
1038 s16 re; 1038 s16 re;
1039 /**< Real part. */ 1039 /*< Real part. */
1040}; 1040};
1041 1041
1042/*========================================*/ 1042/*========================================*/
1043 1043
1044/** 1044/*
1045* \struct struct drx_frequency_plan * Array element of a frequency plan. 1045* \struct struct drx_frequency_plan * Array element of a frequency plan.
1046* 1046*
1047* Used by DRX_CTRL_SCAN_INIT. 1047* Used by DRX_CTRL_SCAN_INIT.
1048*/ 1048*/
1049struct drx_frequency_plan { 1049struct drx_frequency_plan {
1050 s32 first; 1050 s32 first;
1051 /**< First centre frequency in this band */ 1051 /*< First centre frequency in this band */
1052 s32 last; 1052 s32 last;
1053 /**< Last centre frequency in this band */ 1053 /*< Last centre frequency in this band */
1054 s32 step; 1054 s32 step;
1055 /**< Stepping frequency in this band */ 1055 /*< Stepping frequency in this band */
1056 enum drx_bandwidth bandwidth; 1056 enum drx_bandwidth bandwidth;
1057 /**< Bandwidth within this frequency band */ 1057 /*< Bandwidth within this frequency band */
1058 u16 ch_number; 1058 u16 ch_number;
1059 /**< First channel number in this band, or first 1059 /*< First channel number in this band, or first
1060 index in ch_names */ 1060 index in ch_names */
1061 char **ch_names; 1061 char **ch_names;
1062 /**< Optional list of channel names in this 1062 /*< Optional list of channel names in this
1063 band */ 1063 band */
1064}; 1064};
1065 1065
1066/*========================================*/ 1066/*========================================*/
1067 1067
1068/** 1068/*
1069* \struct struct drx_scan_param * Parameters for channel scan. 1069* \struct struct drx_scan_param * Parameters for channel scan.
1070* 1070*
1071* Used by DRX_CTRL_SCAN_INIT. 1071* Used by DRX_CTRL_SCAN_INIT.
1072*/ 1072*/
1073struct drx_scan_param { 1073struct drx_scan_param {
1074 struct drx_frequency_plan *frequency_plan; 1074 struct drx_frequency_plan *frequency_plan;
1075 /**< Frequency plan (array)*/ 1075 /*< Frequency plan (array)*/
1076 u16 frequency_plan_size; /**< Number of bands */ 1076 u16 frequency_plan_size; /*< Number of bands */
1077 u32 num_tries; /**< Max channels tried */ 1077 u32 num_tries; /*< Max channels tried */
1078 s32 skip; /**< Minimum frequency step to take 1078 s32 skip; /*< Minimum frequency step to take
1079 after a channel is found */ 1079 after a channel is found */
1080 void *ext_params; /**< Standard specific params */ 1080 void *ext_params; /*< Standard specific params */
1081}; 1081};
1082 1082
1083/*========================================*/ 1083/*========================================*/
1084 1084
1085/** 1085/*
1086* \brief Scan commands. 1086* \brief Scan commands.
1087* Used by scanning algorithms. 1087* Used by scanning algorithms.
1088*/ 1088*/
1089enum drx_scan_command { 1089enum drx_scan_command {
1090 DRX_SCAN_COMMAND_INIT = 0,/**< Initialize scanning */ 1090 DRX_SCAN_COMMAND_INIT = 0,/*< Initialize scanning */
1091 DRX_SCAN_COMMAND_NEXT, /**< Next scan */ 1091 DRX_SCAN_COMMAND_NEXT, /*< Next scan */
1092 DRX_SCAN_COMMAND_STOP /**< Stop scanning */ 1092 DRX_SCAN_COMMAND_STOP /*< Stop scanning */
1093}; 1093};
1094 1094
1095/*========================================*/ 1095/*========================================*/
1096 1096
1097/** 1097/*
1098* \brief Inner scan function prototype. 1098* \brief Inner scan function prototype.
1099*/ 1099*/
1100typedef int(*drx_scan_func_t) (void *scan_context, 1100typedef int(*drx_scan_func_t) (void *scan_context,
@@ -1104,77 +1104,77 @@ typedef int(*drx_scan_func_t) (void *scan_context,
1104 1104
1105/*========================================*/ 1105/*========================================*/
1106 1106
1107/** 1107/*
1108* \struct struct drxtps_info * TPS information, DVB-T specific. 1108* \struct struct drxtps_info * TPS information, DVB-T specific.
1109* 1109*
1110* Used by DRX_CTRL_TPS_INFO. 1110* Used by DRX_CTRL_TPS_INFO.
1111*/ 1111*/
1112 struct drxtps_info { 1112 struct drxtps_info {
1113 enum drx_fft_mode fftmode; /**< Fft mode */ 1113 enum drx_fft_mode fftmode; /*< Fft mode */
1114 enum drx_guard guard; /**< Guard interval */ 1114 enum drx_guard guard; /*< Guard interval */
1115 enum drx_modulation constellation; 1115 enum drx_modulation constellation;
1116 /**< Constellation */ 1116 /*< Constellation */
1117 enum drx_hierarchy hierarchy; 1117 enum drx_hierarchy hierarchy;
1118 /**< Hierarchy */ 1118 /*< Hierarchy */
1119 enum drx_coderate high_coderate; 1119 enum drx_coderate high_coderate;
1120 /**< High code rate */ 1120 /*< High code rate */
1121 enum drx_coderate low_coderate; 1121 enum drx_coderate low_coderate;
1122 /**< Low cod rate */ 1122 /*< Low cod rate */
1123 enum drx_tps_frame frame; /**< Tps frame */ 1123 enum drx_tps_frame frame; /*< Tps frame */
1124 u8 length; /**< Length */ 1124 u8 length; /*< Length */
1125 u16 cell_id; /**< Cell id */ 1125 u16 cell_id; /*< Cell id */
1126 }; 1126 };
1127 1127
1128/*========================================*/ 1128/*========================================*/
1129 1129
1130/** 1130/*
1131* \brief Power mode of device. 1131* \brief Power mode of device.
1132* 1132*
1133* Used by DRX_CTRL_SET_POWER_MODE. 1133* Used by DRX_CTRL_SET_POWER_MODE.
1134*/ 1134*/
1135 enum drx_power_mode { 1135 enum drx_power_mode {
1136 DRX_POWER_UP = 0, 1136 DRX_POWER_UP = 0,
1137 /**< Generic , Power Up Mode */ 1137 /*< Generic , Power Up Mode */
1138 DRX_POWER_MODE_1, 1138 DRX_POWER_MODE_1,
1139 /**< Device specific , Power Up Mode */ 1139 /*< Device specific , Power Up Mode */
1140 DRX_POWER_MODE_2, 1140 DRX_POWER_MODE_2,
1141 /**< Device specific , Power Up Mode */ 1141 /*< Device specific , Power Up Mode */
1142 DRX_POWER_MODE_3, 1142 DRX_POWER_MODE_3,
1143 /**< Device specific , Power Up Mode */ 1143 /*< Device specific , Power Up Mode */
1144 DRX_POWER_MODE_4, 1144 DRX_POWER_MODE_4,
1145 /**< Device specific , Power Up Mode */ 1145 /*< Device specific , Power Up Mode */
1146 DRX_POWER_MODE_5, 1146 DRX_POWER_MODE_5,
1147 /**< Device specific , Power Up Mode */ 1147 /*< Device specific , Power Up Mode */
1148 DRX_POWER_MODE_6, 1148 DRX_POWER_MODE_6,
1149 /**< Device specific , Power Up Mode */ 1149 /*< Device specific , Power Up Mode */
1150 DRX_POWER_MODE_7, 1150 DRX_POWER_MODE_7,
1151 /**< Device specific , Power Up Mode */ 1151 /*< Device specific , Power Up Mode */
1152 DRX_POWER_MODE_8, 1152 DRX_POWER_MODE_8,
1153 /**< Device specific , Power Up Mode */ 1153 /*< Device specific , Power Up Mode */
1154 1154
1155 DRX_POWER_MODE_9, 1155 DRX_POWER_MODE_9,
1156 /**< Device specific , Power Down Mode */ 1156 /*< Device specific , Power Down Mode */
1157 DRX_POWER_MODE_10, 1157 DRX_POWER_MODE_10,
1158 /**< Device specific , Power Down Mode */ 1158 /*< Device specific , Power Down Mode */
1159 DRX_POWER_MODE_11, 1159 DRX_POWER_MODE_11,
1160 /**< Device specific , Power Down Mode */ 1160 /*< Device specific , Power Down Mode */
1161 DRX_POWER_MODE_12, 1161 DRX_POWER_MODE_12,
1162 /**< Device specific , Power Down Mode */ 1162 /*< Device specific , Power Down Mode */
1163 DRX_POWER_MODE_13, 1163 DRX_POWER_MODE_13,
1164 /**< Device specific , Power Down Mode */ 1164 /*< Device specific , Power Down Mode */
1165 DRX_POWER_MODE_14, 1165 DRX_POWER_MODE_14,
1166 /**< Device specific , Power Down Mode */ 1166 /*< Device specific , Power Down Mode */
1167 DRX_POWER_MODE_15, 1167 DRX_POWER_MODE_15,
1168 /**< Device specific , Power Down Mode */ 1168 /*< Device specific , Power Down Mode */
1169 DRX_POWER_MODE_16, 1169 DRX_POWER_MODE_16,
1170 /**< Device specific , Power Down Mode */ 1170 /*< Device specific , Power Down Mode */
1171 DRX_POWER_DOWN = 255 1171 DRX_POWER_DOWN = 255
1172 /**< Generic , Power Down Mode */ 1172 /*< Generic , Power Down Mode */
1173 }; 1173 };
1174 1174
1175/*========================================*/ 1175/*========================================*/
1176 1176
1177/** 1177/*
1178* \enum enum drx_module * \brief Software module identification. 1178* \enum enum drx_module * \brief Software module identification.
1179* 1179*
1180* Used by DRX_CTRL_VERSION. 1180* Used by DRX_CTRL_VERSION.
@@ -1191,93 +1191,93 @@ typedef int(*drx_scan_func_t) (void *scan_context,
1191 DRX_MODULE_UNKNOWN 1191 DRX_MODULE_UNKNOWN
1192 }; 1192 };
1193 1193
1194/** 1194/*
1195* \enum struct drx_version * \brief Version information of one software module. 1195* \enum struct drx_version * \brief Version information of one software module.
1196* 1196*
1197* Used by DRX_CTRL_VERSION. 1197* Used by DRX_CTRL_VERSION.
1198*/ 1198*/
1199 struct drx_version { 1199 struct drx_version {
1200 enum drx_module module_type; 1200 enum drx_module module_type;
1201 /**< Type identifier of the module */ 1201 /*< Type identifier of the module */
1202 char *module_name; 1202 char *module_name;
1203 /**< Name or description of module */ 1203 /*< Name or description of module */
1204 u16 v_major; /**< Major version number */ 1204 u16 v_major; /*< Major version number */
1205 u16 v_minor; /**< Minor version number */ 1205 u16 v_minor; /*< Minor version number */
1206 u16 v_patch; /**< Patch version number */ 1206 u16 v_patch; /*< Patch version number */
1207 char *v_string; /**< Version as text string */ 1207 char *v_string; /*< Version as text string */
1208 }; 1208 };
1209 1209
1210/** 1210/*
1211* \enum struct drx_version_list * \brief List element of NULL terminated, linked list for version information. 1211* \enum struct drx_version_list * \brief List element of NULL terminated, linked list for version information.
1212* 1212*
1213* Used by DRX_CTRL_VERSION. 1213* Used by DRX_CTRL_VERSION.
1214*/ 1214*/
1215struct drx_version_list { 1215struct drx_version_list {
1216 struct drx_version *version;/**< Version information */ 1216 struct drx_version *version;/*< Version information */
1217 struct drx_version_list *next; 1217 struct drx_version_list *next;
1218 /**< Next list element */ 1218 /*< Next list element */
1219}; 1219};
1220 1220
1221/*========================================*/ 1221/*========================================*/
1222 1222
1223/** 1223/*
1224* \brief Parameters needed to confiugure a UIO. 1224* \brief Parameters needed to confiugure a UIO.
1225* 1225*
1226* Used by DRX_CTRL_UIO_CFG. 1226* Used by DRX_CTRL_UIO_CFG.
1227*/ 1227*/
1228 struct drxuio_cfg { 1228 struct drxuio_cfg {
1229 enum drx_uio uio; 1229 enum drx_uio uio;
1230 /**< UIO identifier */ 1230 /*< UIO identifier */
1231 enum drxuio_mode mode; 1231 enum drxuio_mode mode;
1232 /**< UIO operational mode */ 1232 /*< UIO operational mode */
1233 }; 1233 };
1234 1234
1235/*========================================*/ 1235/*========================================*/
1236 1236
1237/** 1237/*
1238* \brief Parameters needed to read from or write to a UIO. 1238* \brief Parameters needed to read from or write to a UIO.
1239* 1239*
1240* Used by DRX_CTRL_UIO_READ and DRX_CTRL_UIO_WRITE. 1240* Used by DRX_CTRL_UIO_READ and DRX_CTRL_UIO_WRITE.
1241*/ 1241*/
1242 struct drxuio_data { 1242 struct drxuio_data {
1243 enum drx_uio uio; 1243 enum drx_uio uio;
1244 /**< UIO identifier */ 1244 /*< UIO identifier */
1245 bool value; 1245 bool value;
1246 /**< UIO value (true=1, false=0) */ 1246 /*< UIO value (true=1, false=0) */
1247 }; 1247 };
1248 1248
1249/*========================================*/ 1249/*========================================*/
1250 1250
1251/** 1251/*
1252* \brief Parameters needed to configure OOB. 1252* \brief Parameters needed to configure OOB.
1253* 1253*
1254* Used by DRX_CTRL_SET_OOB. 1254* Used by DRX_CTRL_SET_OOB.
1255*/ 1255*/
1256 struct drxoob { 1256 struct drxoob {
1257 s32 frequency; /**< Frequency in kHz */ 1257 s32 frequency; /*< Frequency in kHz */
1258 enum drxoob_downstream_standard standard; 1258 enum drxoob_downstream_standard standard;
1259 /**< OOB standard */ 1259 /*< OOB standard */
1260 bool spectrum_inverted; /**< If true, then spectrum 1260 bool spectrum_inverted; /*< If true, then spectrum
1261 is inverted */ 1261 is inverted */
1262 }; 1262 };
1263 1263
1264/*========================================*/ 1264/*========================================*/
1265 1265
1266/** 1266/*
1267* \brief Metrics from OOB. 1267* \brief Metrics from OOB.
1268* 1268*
1269* Used by DRX_CTRL_GET_OOB. 1269* Used by DRX_CTRL_GET_OOB.
1270*/ 1270*/
1271 struct drxoob_status { 1271 struct drxoob_status {
1272 s32 frequency; /**< Frequency in Khz */ 1272 s32 frequency; /*< Frequency in Khz */
1273 enum drx_lock_status lock; /**< Lock status */ 1273 enum drx_lock_status lock; /*< Lock status */
1274 u32 mer; /**< MER */ 1274 u32 mer; /*< MER */
1275 s32 symbol_rate_offset; /**< Symbolrate offset in ppm */ 1275 s32 symbol_rate_offset; /*< Symbolrate offset in ppm */
1276 }; 1276 };
1277 1277
1278/*========================================*/ 1278/*========================================*/
1279 1279
1280/** 1280/*
1281* \brief Device dependent configuration data. 1281* \brief Device dependent configuration data.
1282* 1282*
1283* Used by DRX_CTRL_SET_CFG and DRX_CTRL_GET_CFG. 1283* Used by DRX_CTRL_SET_CFG and DRX_CTRL_GET_CFG.
@@ -1285,14 +1285,14 @@ struct drx_version_list {
1285*/ 1285*/
1286 struct drx_cfg { 1286 struct drx_cfg {
1287 u32 cfg_type; 1287 u32 cfg_type;
1288 /**< Function identifier */ 1288 /*< Function identifier */
1289 void *cfg_data; 1289 void *cfg_data;
1290 /**< Function data */ 1290 /*< Function data */
1291 }; 1291 };
1292 1292
1293/*========================================*/ 1293/*========================================*/
1294 1294
1295/** 1295/*
1296* /struct DRXMpegStartWidth_t 1296* /struct DRXMpegStartWidth_t
1297* MStart width [nr MCLK cycles] for serial MPEG output. 1297* MStart width [nr MCLK cycles] for serial MPEG output.
1298*/ 1298*/
@@ -1303,7 +1303,7 @@ struct drx_version_list {
1303 }; 1303 };
1304 1304
1305/* CTRL CFG MPEG output */ 1305/* CTRL CFG MPEG output */
1306/** 1306/*
1307* \struct struct drx_cfg_mpeg_output * \brief Configuration parameters for MPEG output control. 1307* \struct struct drx_cfg_mpeg_output * \brief Configuration parameters for MPEG output control.
1308* 1308*
1309* Used by DRX_CFG_MPEG_OUTPUT, in combination with DRX_CTRL_SET_CFG and 1309* Used by DRX_CFG_MPEG_OUTPUT, in combination with DRX_CTRL_SET_CFG and
@@ -1311,29 +1311,29 @@ struct drx_version_list {
1311*/ 1311*/
1312 1312
1313 struct drx_cfg_mpeg_output { 1313 struct drx_cfg_mpeg_output {
1314 bool enable_mpeg_output;/**< If true, enable MPEG output */ 1314 bool enable_mpeg_output;/*< If true, enable MPEG output */
1315 bool insert_rs_byte; /**< If true, insert RS byte */ 1315 bool insert_rs_byte; /*< If true, insert RS byte */
1316 bool enable_parallel; /**< If true, parallel out otherwise 1316 bool enable_parallel; /*< If true, parallel out otherwise
1317 serial */ 1317 serial */
1318 bool invert_data; /**< If true, invert DATA signals */ 1318 bool invert_data; /*< If true, invert DATA signals */
1319 bool invert_err; /**< If true, invert ERR signal */ 1319 bool invert_err; /*< If true, invert ERR signal */
1320 bool invert_str; /**< If true, invert STR signals */ 1320 bool invert_str; /*< If true, invert STR signals */
1321 bool invert_val; /**< If true, invert VAL signals */ 1321 bool invert_val; /*< If true, invert VAL signals */
1322 bool invert_clk; /**< If true, invert CLK signals */ 1322 bool invert_clk; /*< If true, invert CLK signals */
1323 bool static_clk; /**< If true, static MPEG clockrate 1323 bool static_clk; /*< If true, static MPEG clockrate
1324 will be used, otherwise clockrate 1324 will be used, otherwise clockrate
1325 will adapt to the bitrate of the 1325 will adapt to the bitrate of the
1326 TS */ 1326 TS */
1327 u32 bitrate; /**< Maximum bitrate in b/s in case 1327 u32 bitrate; /*< Maximum bitrate in b/s in case
1328 static clockrate is selected */ 1328 static clockrate is selected */
1329 enum drxmpeg_str_width width_str; 1329 enum drxmpeg_str_width width_str;
1330 /**< MPEG start width */ 1330 /*< MPEG start width */
1331 }; 1331 };
1332 1332
1333 1333
1334/*========================================*/ 1334/*========================================*/
1335 1335
1336/** 1336/*
1337* \struct struct drxi2c_data * \brief Data for I2C via 2nd or 3rd or etc I2C port. 1337* \struct struct drxi2c_data * \brief Data for I2C via 2nd or 3rd or etc I2C port.
1338* 1338*
1339* Used by DRX_CTRL_I2C_READWRITE. 1339* Used by DRX_CTRL_I2C_READWRITE.
@@ -1341,187 +1341,187 @@ struct drx_version_list {
1341* 1341*
1342*/ 1342*/
1343 struct drxi2c_data { 1343 struct drxi2c_data {
1344 u16 port_nr; /**< I2C port number */ 1344 u16 port_nr; /*< I2C port number */
1345 struct i2c_device_addr *w_dev_addr; 1345 struct i2c_device_addr *w_dev_addr;
1346 /**< Write device address */ 1346 /*< Write device address */
1347 u16 w_count; /**< Size of write data in bytes */ 1347 u16 w_count; /*< Size of write data in bytes */
1348 u8 *wData; /**< Pointer to write data */ 1348 u8 *wData; /*< Pointer to write data */
1349 struct i2c_device_addr *r_dev_addr; 1349 struct i2c_device_addr *r_dev_addr;
1350 /**< Read device address */ 1350 /*< Read device address */
1351 u16 r_count; /**< Size of data to read in bytes */ 1351 u16 r_count; /*< Size of data to read in bytes */
1352 u8 *r_data; /**< Pointer to read buffer */ 1352 u8 *r_data; /*< Pointer to read buffer */
1353 }; 1353 };
1354 1354
1355/*========================================*/ 1355/*========================================*/
1356 1356
1357/** 1357/*
1358* \enum enum drx_aud_standard * \brief Audio standard identifier. 1358* \enum enum drx_aud_standard * \brief Audio standard identifier.
1359* 1359*
1360* Used by DRX_CTRL_SET_AUD. 1360* Used by DRX_CTRL_SET_AUD.
1361*/ 1361*/
1362 enum drx_aud_standard { 1362 enum drx_aud_standard {
1363 DRX_AUD_STANDARD_BTSC, /**< set BTSC standard (USA) */ 1363 DRX_AUD_STANDARD_BTSC, /*< set BTSC standard (USA) */
1364 DRX_AUD_STANDARD_A2, /**< set A2-Korea FM Stereo */ 1364 DRX_AUD_STANDARD_A2, /*< set A2-Korea FM Stereo */
1365 DRX_AUD_STANDARD_EIAJ, /**< set to Japanese FM Stereo */ 1365 DRX_AUD_STANDARD_EIAJ, /*< set to Japanese FM Stereo */
1366 DRX_AUD_STANDARD_FM_STEREO,/**< set to FM-Stereo Radio */ 1366 DRX_AUD_STANDARD_FM_STEREO,/*< set to FM-Stereo Radio */
1367 DRX_AUD_STANDARD_M_MONO, /**< for 4.5 MHz mono detected */ 1367 DRX_AUD_STANDARD_M_MONO, /*< for 4.5 MHz mono detected */
1368 DRX_AUD_STANDARD_D_K_MONO, /**< for 6.5 MHz mono detected */ 1368 DRX_AUD_STANDARD_D_K_MONO, /*< for 6.5 MHz mono detected */
1369 DRX_AUD_STANDARD_BG_FM, /**< set BG_FM standard */ 1369 DRX_AUD_STANDARD_BG_FM, /*< set BG_FM standard */
1370 DRX_AUD_STANDARD_D_K1, /**< set D_K1 standard */ 1370 DRX_AUD_STANDARD_D_K1, /*< set D_K1 standard */
1371 DRX_AUD_STANDARD_D_K2, /**< set D_K2 standard */ 1371 DRX_AUD_STANDARD_D_K2, /*< set D_K2 standard */
1372 DRX_AUD_STANDARD_D_K3, /**< set D_K3 standard */ 1372 DRX_AUD_STANDARD_D_K3, /*< set D_K3 standard */
1373 DRX_AUD_STANDARD_BG_NICAM_FM, 1373 DRX_AUD_STANDARD_BG_NICAM_FM,
1374 /**< set BG_NICAM_FM standard */ 1374 /*< set BG_NICAM_FM standard */
1375 DRX_AUD_STANDARD_L_NICAM_AM, 1375 DRX_AUD_STANDARD_L_NICAM_AM,
1376 /**< set L_NICAM_AM standard */ 1376 /*< set L_NICAM_AM standard */
1377 DRX_AUD_STANDARD_I_NICAM_FM, 1377 DRX_AUD_STANDARD_I_NICAM_FM,
1378 /**< set I_NICAM_FM standard */ 1378 /*< set I_NICAM_FM standard */
1379 DRX_AUD_STANDARD_D_K_NICAM_FM, 1379 DRX_AUD_STANDARD_D_K_NICAM_FM,
1380 /**< set D_K_NICAM_FM standard */ 1380 /*< set D_K_NICAM_FM standard */
1381 DRX_AUD_STANDARD_NOT_READY,/**< used to detect audio standard */ 1381 DRX_AUD_STANDARD_NOT_READY,/*< used to detect audio standard */
1382 DRX_AUD_STANDARD_AUTO = DRX_AUTO, 1382 DRX_AUD_STANDARD_AUTO = DRX_AUTO,
1383 /**< Automatic Standard Detection */ 1383 /*< Automatic Standard Detection */
1384 DRX_AUD_STANDARD_UNKNOWN = DRX_UNKNOWN 1384 DRX_AUD_STANDARD_UNKNOWN = DRX_UNKNOWN
1385 /**< used as auto and for readback */ 1385 /*< used as auto and for readback */
1386 }; 1386 };
1387 1387
1388/* CTRL_AUD_GET_STATUS - struct drx_aud_status */ 1388/* CTRL_AUD_GET_STATUS - struct drx_aud_status */
1389/** 1389/*
1390* \enum enum drx_aud_nicam_status * \brief Status of NICAM carrier. 1390* \enum enum drx_aud_nicam_status * \brief Status of NICAM carrier.
1391*/ 1391*/
1392 enum drx_aud_nicam_status { 1392 enum drx_aud_nicam_status {
1393 DRX_AUD_NICAM_DETECTED = 0, 1393 DRX_AUD_NICAM_DETECTED = 0,
1394 /**< NICAM carrier detected */ 1394 /*< NICAM carrier detected */
1395 DRX_AUD_NICAM_NOT_DETECTED, 1395 DRX_AUD_NICAM_NOT_DETECTED,
1396 /**< NICAM carrier not detected */ 1396 /*< NICAM carrier not detected */
1397 DRX_AUD_NICAM_BAD /**< NICAM carrier bad quality */ 1397 DRX_AUD_NICAM_BAD /*< NICAM carrier bad quality */
1398 }; 1398 };
1399 1399
1400/** 1400/*
1401* \struct struct drx_aud_status * \brief Audio status characteristics. 1401* \struct struct drx_aud_status * \brief Audio status characteristics.
1402*/ 1402*/
1403 struct drx_aud_status { 1403 struct drx_aud_status {
1404 bool stereo; /**< stereo detection */ 1404 bool stereo; /*< stereo detection */
1405 bool carrier_a; /**< carrier A detected */ 1405 bool carrier_a; /*< carrier A detected */
1406 bool carrier_b; /**< carrier B detected */ 1406 bool carrier_b; /*< carrier B detected */
1407 bool sap; /**< sap / bilingual detection */ 1407 bool sap; /*< sap / bilingual detection */
1408 bool rds; /**< RDS data array present */ 1408 bool rds; /*< RDS data array present */
1409 enum drx_aud_nicam_status nicam_status; 1409 enum drx_aud_nicam_status nicam_status;
1410 /**< status of NICAM carrier */ 1410 /*< status of NICAM carrier */
1411 s8 fm_ident; /**< FM Identification value */ 1411 s8 fm_ident; /*< FM Identification value */
1412 }; 1412 };
1413 1413
1414/* CTRL_AUD_READ_RDS - DRXRDSdata_t */ 1414/* CTRL_AUD_READ_RDS - DRXRDSdata_t */
1415 1415
1416/** 1416/*
1417* \struct DRXRDSdata_t 1417* \struct DRXRDSdata_t
1418* \brief Raw RDS data array. 1418* \brief Raw RDS data array.
1419*/ 1419*/
1420 struct drx_cfg_aud_rds { 1420 struct drx_cfg_aud_rds {
1421 bool valid; /**< RDS data validation */ 1421 bool valid; /*< RDS data validation */
1422 u16 data[18]; /**< data from one RDS data array */ 1422 u16 data[18]; /*< data from one RDS data array */
1423 }; 1423 };
1424 1424
1425/* DRX_CFG_AUD_VOLUME - struct drx_cfg_aud_volume - set/get */ 1425/* DRX_CFG_AUD_VOLUME - struct drx_cfg_aud_volume - set/get */
1426/** 1426/*
1427* \enum DRXAudAVCDecayTime_t 1427* \enum DRXAudAVCDecayTime_t
1428* \brief Automatic volume control configuration. 1428* \brief Automatic volume control configuration.
1429*/ 1429*/
1430 enum drx_aud_avc_mode { 1430 enum drx_aud_avc_mode {
1431 DRX_AUD_AVC_OFF, /**< Automatic volume control off */ 1431 DRX_AUD_AVC_OFF, /*< Automatic volume control off */
1432 DRX_AUD_AVC_DECAYTIME_8S, /**< level volume in 8 seconds */ 1432 DRX_AUD_AVC_DECAYTIME_8S, /*< level volume in 8 seconds */
1433 DRX_AUD_AVC_DECAYTIME_4S, /**< level volume in 4 seconds */ 1433 DRX_AUD_AVC_DECAYTIME_4S, /*< level volume in 4 seconds */
1434 DRX_AUD_AVC_DECAYTIME_2S, /**< level volume in 2 seconds */ 1434 DRX_AUD_AVC_DECAYTIME_2S, /*< level volume in 2 seconds */
1435 DRX_AUD_AVC_DECAYTIME_20MS/**< level volume in 20 millisec */ 1435 DRX_AUD_AVC_DECAYTIME_20MS/*< level volume in 20 millisec */
1436 }; 1436 };
1437 1437
1438/** 1438/*
1439* /enum DRXAudMaxAVCGain_t 1439* /enum DRXAudMaxAVCGain_t
1440* /brief Automatic volume control max gain in audio baseband. 1440* /brief Automatic volume control max gain in audio baseband.
1441*/ 1441*/
1442 enum drx_aud_avc_max_gain { 1442 enum drx_aud_avc_max_gain {
1443 DRX_AUD_AVC_MAX_GAIN_0DB, /**< maximum AVC gain 0 dB */ 1443 DRX_AUD_AVC_MAX_GAIN_0DB, /*< maximum AVC gain 0 dB */
1444 DRX_AUD_AVC_MAX_GAIN_6DB, /**< maximum AVC gain 6 dB */ 1444 DRX_AUD_AVC_MAX_GAIN_6DB, /*< maximum AVC gain 6 dB */
1445 DRX_AUD_AVC_MAX_GAIN_12DB /**< maximum AVC gain 12 dB */ 1445 DRX_AUD_AVC_MAX_GAIN_12DB /*< maximum AVC gain 12 dB */
1446 }; 1446 };
1447 1447
1448/** 1448/*
1449* /enum DRXAudMaxAVCAtten_t 1449* /enum DRXAudMaxAVCAtten_t
1450* /brief Automatic volume control max attenuation in audio baseband. 1450* /brief Automatic volume control max attenuation in audio baseband.
1451*/ 1451*/
1452 enum drx_aud_avc_max_atten { 1452 enum drx_aud_avc_max_atten {
1453 DRX_AUD_AVC_MAX_ATTEN_12DB, 1453 DRX_AUD_AVC_MAX_ATTEN_12DB,
1454 /**< maximum AVC attenuation 12 dB */ 1454 /*< maximum AVC attenuation 12 dB */
1455 DRX_AUD_AVC_MAX_ATTEN_18DB, 1455 DRX_AUD_AVC_MAX_ATTEN_18DB,
1456 /**< maximum AVC attenuation 18 dB */ 1456 /*< maximum AVC attenuation 18 dB */
1457 DRX_AUD_AVC_MAX_ATTEN_24DB/**< maximum AVC attenuation 24 dB */ 1457 DRX_AUD_AVC_MAX_ATTEN_24DB/*< maximum AVC attenuation 24 dB */
1458 }; 1458 };
1459/** 1459/*
1460* \struct struct drx_cfg_aud_volume * \brief Audio volume configuration. 1460* \struct struct drx_cfg_aud_volume * \brief Audio volume configuration.
1461*/ 1461*/
1462 struct drx_cfg_aud_volume { 1462 struct drx_cfg_aud_volume {
1463 bool mute; /**< mute overrides volume setting */ 1463 bool mute; /*< mute overrides volume setting */
1464 s16 volume; /**< volume, range -114 to 12 dB */ 1464 s16 volume; /*< volume, range -114 to 12 dB */
1465 enum drx_aud_avc_mode avc_mode; /**< AVC auto volume control mode */ 1465 enum drx_aud_avc_mode avc_mode; /*< AVC auto volume control mode */
1466 u16 avc_ref_level; /**< AVC reference level */ 1466 u16 avc_ref_level; /*< AVC reference level */
1467 enum drx_aud_avc_max_gain avc_max_gain; 1467 enum drx_aud_avc_max_gain avc_max_gain;
1468 /**< AVC max gain selection */ 1468 /*< AVC max gain selection */
1469 enum drx_aud_avc_max_atten avc_max_atten; 1469 enum drx_aud_avc_max_atten avc_max_atten;
1470 /**< AVC max attenuation selection */ 1470 /*< AVC max attenuation selection */
1471 s16 strength_left; /**< quasi-peak, left speaker */ 1471 s16 strength_left; /*< quasi-peak, left speaker */
1472 s16 strength_right; /**< quasi-peak, right speaker */ 1472 s16 strength_right; /*< quasi-peak, right speaker */
1473 }; 1473 };
1474 1474
1475/* DRX_CFG_I2S_OUTPUT - struct drx_cfg_i2s_output - set/get */ 1475/* DRX_CFG_I2S_OUTPUT - struct drx_cfg_i2s_output - set/get */
1476/** 1476/*
1477* \enum enum drxi2s_mode * \brief I2S output mode. 1477* \enum enum drxi2s_mode * \brief I2S output mode.
1478*/ 1478*/
1479 enum drxi2s_mode { 1479 enum drxi2s_mode {
1480 DRX_I2S_MODE_MASTER, /**< I2S is in master mode */ 1480 DRX_I2S_MODE_MASTER, /*< I2S is in master mode */
1481 DRX_I2S_MODE_SLAVE /**< I2S is in slave mode */ 1481 DRX_I2S_MODE_SLAVE /*< I2S is in slave mode */
1482 }; 1482 };
1483 1483
1484/** 1484/*
1485* \enum enum drxi2s_word_length * \brief Width of I2S data. 1485* \enum enum drxi2s_word_length * \brief Width of I2S data.
1486*/ 1486*/
1487 enum drxi2s_word_length { 1487 enum drxi2s_word_length {
1488 DRX_I2S_WORDLENGTH_32 = 0,/**< I2S data is 32 bit wide */ 1488 DRX_I2S_WORDLENGTH_32 = 0,/*< I2S data is 32 bit wide */
1489 DRX_I2S_WORDLENGTH_16 = 1 /**< I2S data is 16 bit wide */ 1489 DRX_I2S_WORDLENGTH_16 = 1 /*< I2S data is 16 bit wide */
1490 }; 1490 };
1491 1491
1492/** 1492/*
1493* \enum enum drxi2s_format * \brief Data wordstrobe alignment for I2S. 1493* \enum enum drxi2s_format * \brief Data wordstrobe alignment for I2S.
1494*/ 1494*/
1495 enum drxi2s_format { 1495 enum drxi2s_format {
1496 DRX_I2S_FORMAT_WS_WITH_DATA, 1496 DRX_I2S_FORMAT_WS_WITH_DATA,
1497 /**< I2S data and wordstrobe are aligned */ 1497 /*< I2S data and wordstrobe are aligned */
1498 DRX_I2S_FORMAT_WS_ADVANCED 1498 DRX_I2S_FORMAT_WS_ADVANCED
1499 /**< I2S data one cycle after wordstrobe */ 1499 /*< I2S data one cycle after wordstrobe */
1500 }; 1500 };
1501 1501
1502/** 1502/*
1503* \enum enum drxi2s_polarity * \brief Polarity of I2S data. 1503* \enum enum drxi2s_polarity * \brief Polarity of I2S data.
1504*/ 1504*/
1505 enum drxi2s_polarity { 1505 enum drxi2s_polarity {
1506 DRX_I2S_POLARITY_RIGHT,/**< wordstrobe - right high, left low */ 1506 DRX_I2S_POLARITY_RIGHT,/*< wordstrobe - right high, left low */
1507 DRX_I2S_POLARITY_LEFT /**< wordstrobe - right low, left high */ 1507 DRX_I2S_POLARITY_LEFT /*< wordstrobe - right low, left high */
1508 }; 1508 };
1509 1509
1510/** 1510/*
1511* \struct struct drx_cfg_i2s_output * \brief I2S output configuration. 1511* \struct struct drx_cfg_i2s_output * \brief I2S output configuration.
1512*/ 1512*/
1513 struct drx_cfg_i2s_output { 1513 struct drx_cfg_i2s_output {
1514 bool output_enable; /**< I2S output enable */ 1514 bool output_enable; /*< I2S output enable */
1515 u32 frequency; /**< range from 8000-48000 Hz */ 1515 u32 frequency; /*< range from 8000-48000 Hz */
1516 enum drxi2s_mode mode; /**< I2S mode, master or slave */ 1516 enum drxi2s_mode mode; /*< I2S mode, master or slave */
1517 enum drxi2s_word_length word_length; 1517 enum drxi2s_word_length word_length;
1518 /**< I2S wordlength, 16 or 32 bits */ 1518 /*< I2S wordlength, 16 or 32 bits */
1519 enum drxi2s_polarity polarity;/**< I2S wordstrobe polarity */ 1519 enum drxi2s_polarity polarity;/*< I2S wordstrobe polarity */
1520 enum drxi2s_format format; /**< I2S wordstrobe delay to data */ 1520 enum drxi2s_format format; /*< I2S wordstrobe delay to data */
1521 }; 1521 };
1522 1522
1523/* ------------------------------expert interface-----------------------------*/ 1523/* ------------------------------expert interface-----------------------------*/
1524/** 1524/*
1525* /enum enum drx_aud_fm_deemphasis * setting for FM-Deemphasis in audio demodulator. 1525* /enum enum drx_aud_fm_deemphasis * setting for FM-Deemphasis in audio demodulator.
1526* 1526*
1527*/ 1527*/
@@ -1531,7 +1531,7 @@ struct drx_version_list {
1531 DRX_AUD_FM_DEEMPH_OFF 1531 DRX_AUD_FM_DEEMPH_OFF
1532 }; 1532 };
1533 1533
1534/** 1534/*
1535* /enum DRXAudDeviation_t 1535* /enum DRXAudDeviation_t
1536* setting for deviation mode in audio demodulator. 1536* setting for deviation mode in audio demodulator.
1537* 1537*
@@ -1541,7 +1541,7 @@ struct drx_version_list {
1541 DRX_AUD_DEVIATION_HIGH 1541 DRX_AUD_DEVIATION_HIGH
1542 }; 1542 };
1543 1543
1544/** 1544/*
1545* /enum enum drx_no_carrier_option * setting for carrier, mute/noise. 1545* /enum enum drx_no_carrier_option * setting for carrier, mute/noise.
1546* 1546*
1547*/ 1547*/
@@ -1550,7 +1550,7 @@ struct drx_version_list {
1550 DRX_NO_CARRIER_NOISE 1550 DRX_NO_CARRIER_NOISE
1551 }; 1551 };
1552 1552
1553/** 1553/*
1554* \enum DRXAudAutoSound_t 1554* \enum DRXAudAutoSound_t
1555* \brief Automatic Sound 1555* \brief Automatic Sound
1556*/ 1556*/
@@ -1560,7 +1560,7 @@ struct drx_version_list {
1560 DRX_AUD_AUTO_SOUND_SELECT_ON_CHANGE_OFF 1560 DRX_AUD_AUTO_SOUND_SELECT_ON_CHANGE_OFF
1561 }; 1561 };
1562 1562
1563/** 1563/*
1564* \enum DRXAudASSThres_t 1564* \enum DRXAudASSThres_t
1565* \brief Automatic Sound Select Thresholds 1565* \brief Automatic Sound Select Thresholds
1566*/ 1566*/
@@ -1570,7 +1570,7 @@ struct drx_version_list {
1570 u16 nicam; /* Nicam Threshold for ASS configuration */ 1570 u16 nicam; /* Nicam Threshold for ASS configuration */
1571 }; 1571 };
1572 1572
1573/** 1573/*
1574* \struct struct drx_aud_carrier * \brief Carrier detection related parameters 1574* \struct struct drx_aud_carrier * \brief Carrier detection related parameters
1575*/ 1575*/
1576 struct drx_aud_carrier { 1576 struct drx_aud_carrier {
@@ -1580,7 +1580,7 @@ struct drx_version_list {
1580 s32 dco; /* frequency adjustment (A) */ 1580 s32 dco; /* frequency adjustment (A) */
1581 }; 1581 };
1582 1582
1583/** 1583/*
1584* \struct struct drx_cfg_aud_carriers * \brief combining carrier A & B to one struct 1584* \struct struct drx_cfg_aud_carriers * \brief combining carrier A & B to one struct
1585*/ 1585*/
1586 struct drx_cfg_aud_carriers { 1586 struct drx_cfg_aud_carriers {
@@ -1588,7 +1588,7 @@ struct drx_version_list {
1588 struct drx_aud_carrier b; 1588 struct drx_aud_carrier b;
1589 }; 1589 };
1590 1590
1591/** 1591/*
1592* /enum enum drx_aud_i2s_src * Selection of audio source 1592* /enum enum drx_aud_i2s_src * Selection of audio source
1593*/ 1593*/
1594 enum drx_aud_i2s_src { 1594 enum drx_aud_i2s_src {
@@ -1597,19 +1597,19 @@ struct drx_version_list {
1597 DRX_AUD_SRC_STEREO_OR_A, 1597 DRX_AUD_SRC_STEREO_OR_A,
1598 DRX_AUD_SRC_STEREO_OR_B}; 1598 DRX_AUD_SRC_STEREO_OR_B};
1599 1599
1600/** 1600/*
1601* \enum enum drx_aud_i2s_matrix * \brief Used for selecting I2S output. 1601* \enum enum drx_aud_i2s_matrix * \brief Used for selecting I2S output.
1602*/ 1602*/
1603 enum drx_aud_i2s_matrix { 1603 enum drx_aud_i2s_matrix {
1604 DRX_AUD_I2S_MATRIX_A_MONO, 1604 DRX_AUD_I2S_MATRIX_A_MONO,
1605 /**< A sound only, stereo or mono */ 1605 /*< A sound only, stereo or mono */
1606 DRX_AUD_I2S_MATRIX_B_MONO, 1606 DRX_AUD_I2S_MATRIX_B_MONO,
1607 /**< B sound only, stereo or mono */ 1607 /*< B sound only, stereo or mono */
1608 DRX_AUD_I2S_MATRIX_STEREO, 1608 DRX_AUD_I2S_MATRIX_STEREO,
1609 /**< A+B sound, transparant */ 1609 /*< A+B sound, transparant */
1610 DRX_AUD_I2S_MATRIX_MONO /**< A+B mixed to mono sum, (L+R)/2 */}; 1610 DRX_AUD_I2S_MATRIX_MONO /*< A+B mixed to mono sum, (L+R)/2 */};
1611 1611
1612/** 1612/*
1613* /enum enum drx_aud_fm_matrix * setting for FM-Matrix in audio demodulator. 1613* /enum enum drx_aud_fm_matrix * setting for FM-Matrix in audio demodulator.
1614* 1614*
1615*/ 1615*/
@@ -1620,7 +1620,7 @@ struct drx_version_list {
1620 DRX_AUD_FM_MATRIX_SOUND_A, 1620 DRX_AUD_FM_MATRIX_SOUND_A,
1621 DRX_AUD_FM_MATRIX_SOUND_B}; 1621 DRX_AUD_FM_MATRIX_SOUND_B};
1622 1622
1623/** 1623/*
1624* \struct DRXAudMatrices_t 1624* \struct DRXAudMatrices_t
1625* \brief Mixer settings 1625* \brief Mixer settings
1626*/ 1626*/
@@ -1630,22 +1630,22 @@ struct drx_cfg_aud_mixer {
1630 enum drx_aud_fm_matrix matrix_fm; 1630 enum drx_aud_fm_matrix matrix_fm;
1631}; 1631};
1632 1632
1633/** 1633/*
1634* \enum DRXI2SVidSync_t 1634* \enum DRXI2SVidSync_t
1635* \brief Audio/video synchronization, interacts with I2S mode. 1635* \brief Audio/video synchronization, interacts with I2S mode.
1636* AUTO_1 and AUTO_2 are for automatic video standard detection with preference 1636* AUTO_1 and AUTO_2 are for automatic video standard detection with preference
1637* for NTSC or Monochrome, because the frequencies are too close (59.94 & 60 Hz) 1637* for NTSC or Monochrome, because the frequencies are too close (59.94 & 60 Hz)
1638*/ 1638*/
1639 enum drx_cfg_aud_av_sync { 1639 enum drx_cfg_aud_av_sync {
1640 DRX_AUD_AVSYNC_OFF,/**< audio/video synchronization is off */ 1640 DRX_AUD_AVSYNC_OFF,/*< audio/video synchronization is off */
1641 DRX_AUD_AVSYNC_NTSC, 1641 DRX_AUD_AVSYNC_NTSC,
1642 /**< it is an NTSC system */ 1642 /*< it is an NTSC system */
1643 DRX_AUD_AVSYNC_MONOCHROME, 1643 DRX_AUD_AVSYNC_MONOCHROME,
1644 /**< it is a MONOCHROME system */ 1644 /*< it is a MONOCHROME system */
1645 DRX_AUD_AVSYNC_PAL_SECAM 1645 DRX_AUD_AVSYNC_PAL_SECAM
1646 /**< it is a PAL/SECAM system */}; 1646 /*< it is a PAL/SECAM system */};
1647 1647
1648/** 1648/*
1649* \struct struct drx_cfg_aud_prescale * \brief Prescalers 1649* \struct struct drx_cfg_aud_prescale * \brief Prescalers
1650*/ 1650*/
1651struct drx_cfg_aud_prescale { 1651struct drx_cfg_aud_prescale {
@@ -1653,7 +1653,7 @@ struct drx_cfg_aud_prescale {
1653 s16 nicam_gain; 1653 s16 nicam_gain;
1654}; 1654};
1655 1655
1656/** 1656/*
1657* \struct struct drx_aud_beep * \brief Beep 1657* \struct struct drx_aud_beep * \brief Beep
1658*/ 1658*/
1659struct drx_aud_beep { 1659struct drx_aud_beep {
@@ -1662,14 +1662,14 @@ struct drx_aud_beep {
1662 bool mute; 1662 bool mute;
1663}; 1663};
1664 1664
1665/** 1665/*
1666* \enum enum drx_aud_btsc_detect * \brief BTSC detetcion mode 1666* \enum enum drx_aud_btsc_detect * \brief BTSC detetcion mode
1667*/ 1667*/
1668 enum drx_aud_btsc_detect { 1668 enum drx_aud_btsc_detect {
1669 DRX_BTSC_STEREO, 1669 DRX_BTSC_STEREO,
1670 DRX_BTSC_MONO_AND_SAP}; 1670 DRX_BTSC_MONO_AND_SAP};
1671 1671
1672/** 1672/*
1673* \struct struct drx_aud_data * \brief Audio data structure 1673* \struct struct drx_aud_data * \brief Audio data structure
1674*/ 1674*/
1675struct drx_aud_data { 1675struct drx_aud_data {
@@ -1692,7 +1692,7 @@ struct drx_aud_data {
1692 bool rds_data_present; 1692 bool rds_data_present;
1693}; 1693};
1694 1694
1695/** 1695/*
1696* \enum enum drx_qam_lock_range * \brief QAM lock range mode 1696* \enum enum drx_qam_lock_range * \brief QAM lock range mode
1697*/ 1697*/
1698 enum drx_qam_lock_range { 1698 enum drx_qam_lock_range {
@@ -1782,7 +1782,7 @@ struct drx_aud_data {
1782 u32 wdata, /* data to write */ 1782 u32 wdata, /* data to write */
1783 u32 *rdata); /* data to read */ 1783 u32 *rdata); /* data to read */
1784 1784
1785/** 1785/*
1786* \struct struct drx_access_func * \brief Interface to an access protocol. 1786* \struct struct drx_access_func * \brief Interface to an access protocol.
1787*/ 1787*/
1788struct drx_access_func { 1788struct drx_access_func {
@@ -1811,85 +1811,85 @@ struct drx_reg_dump {
1811/*============================================================================*/ 1811/*============================================================================*/
1812/*============================================================================*/ 1812/*============================================================================*/
1813 1813
1814/** 1814/*
1815* \struct struct drx_common_attr * \brief Set of common attributes, shared by all DRX devices. 1815* \struct struct drx_common_attr * \brief Set of common attributes, shared by all DRX devices.
1816*/ 1816*/
1817 struct drx_common_attr { 1817 struct drx_common_attr {
1818 /* Microcode (firmware) attributes */ 1818 /* Microcode (firmware) attributes */
1819 char *microcode_file; /**< microcode filename */ 1819 char *microcode_file; /*< microcode filename */
1820 bool verify_microcode; 1820 bool verify_microcode;
1821 /**< Use microcode verify or not. */ 1821 /*< Use microcode verify or not. */
1822 struct drx_mc_version_rec mcversion; 1822 struct drx_mc_version_rec mcversion;
1823 /**< Version record of microcode from file */ 1823 /*< Version record of microcode from file */
1824 1824
1825 /* Clocks and tuner attributes */ 1825 /* Clocks and tuner attributes */
1826 s32 intermediate_freq; 1826 s32 intermediate_freq;
1827 /**< IF,if tuner instance not used. (kHz)*/ 1827 /*< IF,if tuner instance not used. (kHz)*/
1828 s32 sys_clock_freq; 1828 s32 sys_clock_freq;
1829 /**< Systemclock frequency. (kHz) */ 1829 /*< Systemclock frequency. (kHz) */
1830 s32 osc_clock_freq; 1830 s32 osc_clock_freq;
1831 /**< Oscillator clock frequency. (kHz) */ 1831 /*< Oscillator clock frequency. (kHz) */
1832 s16 osc_clock_deviation; 1832 s16 osc_clock_deviation;
1833 /**< Oscillator clock deviation. (ppm) */ 1833 /*< Oscillator clock deviation. (ppm) */
1834 bool mirror_freq_spect; 1834 bool mirror_freq_spect;
1835 /**< Mirror IF frequency spectrum or not.*/ 1835 /*< Mirror IF frequency spectrum or not.*/
1836 1836
1837 /* Initial MPEG output attributes */ 1837 /* Initial MPEG output attributes */
1838 struct drx_cfg_mpeg_output mpeg_cfg; 1838 struct drx_cfg_mpeg_output mpeg_cfg;
1839 /**< MPEG configuration */ 1839 /*< MPEG configuration */
1840 1840
1841 bool is_opened; /**< if true instance is already opened. */ 1841 bool is_opened; /*< if true instance is already opened. */
1842 1842
1843 /* Channel scan */ 1843 /* Channel scan */
1844 struct drx_scan_param *scan_param; 1844 struct drx_scan_param *scan_param;
1845 /**< scan parameters */ 1845 /*< scan parameters */
1846 u16 scan_freq_plan_index; 1846 u16 scan_freq_plan_index;
1847 /**< next index in freq plan */ 1847 /*< next index in freq plan */
1848 s32 scan_next_frequency; 1848 s32 scan_next_frequency;
1849 /**< next freq to scan */ 1849 /*< next freq to scan */
1850 bool scan_ready; /**< scan ready flag */ 1850 bool scan_ready; /*< scan ready flag */
1851 u32 scan_max_channels;/**< number of channels in freqplan */ 1851 u32 scan_max_channels;/*< number of channels in freqplan */
1852 u32 scan_channels_scanned; 1852 u32 scan_channels_scanned;
1853 /**< number of channels scanned */ 1853 /*< number of channels scanned */
1854 /* Channel scan - inner loop: demod related */ 1854 /* Channel scan - inner loop: demod related */
1855 drx_scan_func_t scan_function; 1855 drx_scan_func_t scan_function;
1856 /**< function to check channel */ 1856 /*< function to check channel */
1857 /* Channel scan - inner loop: SYSObj related */ 1857 /* Channel scan - inner loop: SYSObj related */
1858 void *scan_context; /**< Context Pointer of SYSObj */ 1858 void *scan_context; /*< Context Pointer of SYSObj */
1859 /* Channel scan - parameters for default DTV scan function in core driver */ 1859 /* Channel scan - parameters for default DTV scan function in core driver */
1860 u16 scan_demod_lock_timeout; 1860 u16 scan_demod_lock_timeout;
1861 /**< millisecs to wait for lock */ 1861 /*< millisecs to wait for lock */
1862 enum drx_lock_status scan_desired_lock; 1862 enum drx_lock_status scan_desired_lock;
1863 /**< lock requirement for channel found */ 1863 /*< lock requirement for channel found */
1864 /* scan_active can be used by SetChannel to decide how to program the tuner, 1864 /* scan_active can be used by SetChannel to decide how to program the tuner,
1865 fast or slow (but stable). Usually fast during scan. */ 1865 fast or slow (but stable). Usually fast during scan. */
1866 bool scan_active; /**< true when scan routines are active */ 1866 bool scan_active; /*< true when scan routines are active */
1867 1867
1868 /* Power management */ 1868 /* Power management */
1869 enum drx_power_mode current_power_mode; 1869 enum drx_power_mode current_power_mode;
1870 /**< current power management mode */ 1870 /*< current power management mode */
1871 1871
1872 /* Tuner */ 1872 /* Tuner */
1873 u8 tuner_port_nr; /**< nr of I2C port to wich tuner is */ 1873 u8 tuner_port_nr; /*< nr of I2C port to wich tuner is */
1874 s32 tuner_min_freq_rf; 1874 s32 tuner_min_freq_rf;
1875 /**< minimum RF input frequency, in kHz */ 1875 /*< minimum RF input frequency, in kHz */
1876 s32 tuner_max_freq_rf; 1876 s32 tuner_max_freq_rf;
1877 /**< maximum RF input frequency, in kHz */ 1877 /*< maximum RF input frequency, in kHz */
1878 bool tuner_rf_agc_pol; /**< if true invert RF AGC polarity */ 1878 bool tuner_rf_agc_pol; /*< if true invert RF AGC polarity */
1879 bool tuner_if_agc_pol; /**< if true invert IF AGC polarity */ 1879 bool tuner_if_agc_pol; /*< if true invert IF AGC polarity */
1880 bool tuner_slow_mode; /**< if true invert IF AGC polarity */ 1880 bool tuner_slow_mode; /*< if true invert IF AGC polarity */
1881 1881
1882 struct drx_channel current_channel; 1882 struct drx_channel current_channel;
1883 /**< current channel parameters */ 1883 /*< current channel parameters */
1884 enum drx_standard current_standard; 1884 enum drx_standard current_standard;
1885 /**< current standard selection */ 1885 /*< current standard selection */
1886 enum drx_standard prev_standard; 1886 enum drx_standard prev_standard;
1887 /**< previous standard selection */ 1887 /*< previous standard selection */
1888 enum drx_standard di_cache_standard; 1888 enum drx_standard di_cache_standard;
1889 /**< standard in DI cache if available */ 1889 /*< standard in DI cache if available */
1890 bool use_bootloader; /**< use bootloader in open */ 1890 bool use_bootloader; /*< use bootloader in open */
1891 u32 capabilities; /**< capabilities flags */ 1891 u32 capabilities; /*< capabilities flags */
1892 u32 product_id; /**< product ID inc. metal fix number */}; 1892 u32 product_id; /*< product ID inc. metal fix number */};
1893 1893
1894/* 1894/*
1895* Generic functions for DRX devices. 1895* Generic functions for DRX devices.
@@ -1897,16 +1897,16 @@ struct drx_reg_dump {
1897 1897
1898struct drx_demod_instance; 1898struct drx_demod_instance;
1899 1899
1900/** 1900/*
1901* \struct struct drx_demod_instance * \brief Top structure of demodulator instance. 1901* \struct struct drx_demod_instance * \brief Top structure of demodulator instance.
1902*/ 1902*/
1903struct drx_demod_instance { 1903struct drx_demod_instance {
1904 /**< data access protocol functions */ 1904 /*< data access protocol functions */
1905 struct i2c_device_addr *my_i2c_dev_addr; 1905 struct i2c_device_addr *my_i2c_dev_addr;
1906 /**< i2c address and device identifier */ 1906 /*< i2c address and device identifier */
1907 struct drx_common_attr *my_common_attr; 1907 struct drx_common_attr *my_common_attr;
1908 /**< common DRX attributes */ 1908 /*< common DRX attributes */
1909 void *my_ext_attr; /**< device specific attributes */ 1909 void *my_ext_attr; /*< device specific attributes */
1910 /* generic demodulator data */ 1910 /* generic demodulator data */
1911 1911
1912 struct i2c_adapter *i2c; 1912 struct i2c_adapter *i2c;
@@ -2195,7 +2195,7 @@ Conversion from enum values to human readable form.
2195Access macros 2195Access macros
2196-------------------------------------------------------------------------*/ 2196-------------------------------------------------------------------------*/
2197 2197
2198/** 2198/*
2199* \brief Create a compilable reference to the microcode attribute 2199* \brief Create a compilable reference to the microcode attribute
2200* \param d pointer to demod instance 2200* \param d pointer to demod instance
2201* 2201*
@@ -2229,7 +2229,7 @@ Access macros
2229#define DRX_ATTR_I2CDEVID(d) ((d)->my_i2c_dev_addr->i2c_dev_id) 2229#define DRX_ATTR_I2CDEVID(d) ((d)->my_i2c_dev_addr->i2c_dev_id)
2230#define DRX_ISMCVERTYPE(x) ((x) == AUX_VER_RECORD) 2230#define DRX_ISMCVERTYPE(x) ((x) == AUX_VER_RECORD)
2231 2231
2232/**************************/ 2232/*************************/
2233 2233
2234/* Macros with device-specific handling are converted to CFG functions */ 2234/* Macros with device-specific handling are converted to CFG functions */
2235 2235
@@ -2285,7 +2285,7 @@ Access macros
2285#define DRX_GET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_GET((d), (x), \ 2285#define DRX_GET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_GET((d), (x), \
2286 DRX_XS_CFG_QAM_LOCKRANGE, enum drx_qam_lock_range, DRX_UNKNOWN) 2286 DRX_XS_CFG_QAM_LOCKRANGE, enum drx_qam_lock_range, DRX_UNKNOWN)
2287 2287
2288/** 2288/*
2289* \brief Macro to check if std is an ATV standard 2289* \brief Macro to check if std is an ATV standard
2290* \retval true std is an ATV standard 2290* \retval true std is an ATV standard
2291* \retval false std is an ATV standard 2291* \retval false std is an ATV standard
@@ -2298,7 +2298,7 @@ Access macros
2298 ((std) == DRX_STANDARD_NTSC) || \ 2298 ((std) == DRX_STANDARD_NTSC) || \
2299 ((std) == DRX_STANDARD_FM)) 2299 ((std) == DRX_STANDARD_FM))
2300 2300
2301/** 2301/*
2302* \brief Macro to check if std is an QAM standard 2302* \brief Macro to check if std is an QAM standard
2303* \retval true std is an QAM standards 2303* \retval true std is an QAM standards
2304* \retval false std is an QAM standards 2304* \retval false std is an QAM standards
@@ -2308,14 +2308,14 @@ Access macros
2308 ((std) == DRX_STANDARD_ITU_C) || \ 2308 ((std) == DRX_STANDARD_ITU_C) || \
2309 ((std) == DRX_STANDARD_ITU_D)) 2309 ((std) == DRX_STANDARD_ITU_D))
2310 2310
2311/** 2311/*
2312* \brief Macro to check if std is VSB standard 2312* \brief Macro to check if std is VSB standard
2313* \retval true std is VSB standard 2313* \retval true std is VSB standard
2314* \retval false std is not VSB standard 2314* \retval false std is not VSB standard
2315*/ 2315*/
2316#define DRX_ISVSBSTD(std) ((std) == DRX_STANDARD_8VSB) 2316#define DRX_ISVSBSTD(std) ((std) == DRX_STANDARD_8VSB)
2317 2317
2318/** 2318/*
2319* \brief Macro to check if std is DVBT standard 2319* \brief Macro to check if std is DVBT standard
2320* \retval true std is DVBT standard 2320* \retval true std is DVBT standard
2321* \retval false std is not DVBT standard 2321* \retval false std is not DVBT standard
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index 499ccff557bf..8cbd8cc21059 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -73,7 +73,7 @@ INCLUDE FILES
73 73
74#define DRX39XX_MAIN_FIRMWARE "dvb-fe-drxj-mc-1.0.8.fw" 74#define DRX39XX_MAIN_FIRMWARE "dvb-fe-drxj-mc-1.0.8.fw"
75 75
76/** 76/*
77* \brief Maximum u32 value. 77* \brief Maximum u32 value.
78*/ 78*/
79#ifndef MAX_U32 79#ifndef MAX_U32
@@ -100,8 +100,8 @@ INCLUDE FILES
100#ifndef OOB_DRX_DRIVE_STRENGTH 100#ifndef OOB_DRX_DRIVE_STRENGTH
101#define OOB_DRX_DRIVE_STRENGTH 0x02 101#define OOB_DRX_DRIVE_STRENGTH 0x02
102#endif 102#endif
103/**** START DJCOMBO patches to DRXJ registermap constants *********************/ 103/*** START DJCOMBO patches to DRXJ registermap constants *********************/
104/**** registermap 200706071303 from drxj **************************************/ 104/*** registermap 200706071303 from drxj **************************************/
105#define ATV_TOP_CR_AMP_TH_FM 0x0 105#define ATV_TOP_CR_AMP_TH_FM 0x0
106#define ATV_TOP_CR_AMP_TH_L 0xA 106#define ATV_TOP_CR_AMP_TH_L 0xA
107#define ATV_TOP_CR_AMP_TH_LP 0xA 107#define ATV_TOP_CR_AMP_TH_LP 0xA
@@ -188,7 +188,7 @@ INCLUDE FILES
188#define IQM_RC_ADJ_SEL_B_OFF 0x0 188#define IQM_RC_ADJ_SEL_B_OFF 0x0
189#define IQM_RC_ADJ_SEL_B_QAM 0x1 189#define IQM_RC_ADJ_SEL_B_QAM 0x1
190#define IQM_RC_ADJ_SEL_B_VSB 0x2 190#define IQM_RC_ADJ_SEL_B_VSB 0x2
191/**** END DJCOMBO patches to DRXJ registermap *********************************/ 191/*** END DJCOMBO patches to DRXJ registermap *********************************/
192 192
193#include "drx_driver_version.h" 193#include "drx_driver_version.h"
194 194
@@ -208,25 +208,25 @@ DEFINES
208#define DRXJ_WAKE_UP_KEY (demod->my_i2c_dev_addr->i2c_addr) 208#define DRXJ_WAKE_UP_KEY (demod->my_i2c_dev_addr->i2c_addr)
209#endif 209#endif
210 210
211/** 211/*
212* \def DRXJ_DEF_I2C_ADDR 212* \def DRXJ_DEF_I2C_ADDR
213* \brief Default I2C address of a demodulator instance. 213* \brief Default I2C address of a demodulator instance.
214*/ 214*/
215#define DRXJ_DEF_I2C_ADDR (0x52) 215#define DRXJ_DEF_I2C_ADDR (0x52)
216 216
217/** 217/*
218* \def DRXJ_DEF_DEMOD_DEV_ID 218* \def DRXJ_DEF_DEMOD_DEV_ID
219* \brief Default device identifier of a demodultor instance. 219* \brief Default device identifier of a demodultor instance.
220*/ 220*/
221#define DRXJ_DEF_DEMOD_DEV_ID (1) 221#define DRXJ_DEF_DEMOD_DEV_ID (1)
222 222
223/** 223/*
224* \def DRXJ_SCAN_TIMEOUT 224* \def DRXJ_SCAN_TIMEOUT
225* \brief Timeout value for waiting on demod lock during channel scan (millisec). 225* \brief Timeout value for waiting on demod lock during channel scan (millisec).
226*/ 226*/
227#define DRXJ_SCAN_TIMEOUT 1000 227#define DRXJ_SCAN_TIMEOUT 1000
228 228
229/** 229/*
230* \def HI_I2C_DELAY 230* \def HI_I2C_DELAY
231* \brief HI timing delay for I2C timing (in nano seconds) 231* \brief HI timing delay for I2C timing (in nano seconds)
232* 232*
@@ -234,7 +234,7 @@ DEFINES
234*/ 234*/
235#define HI_I2C_DELAY 42 235#define HI_I2C_DELAY 42
236 236
237/** 237/*
238* \def HI_I2C_BRIDGE_DELAY 238* \def HI_I2C_BRIDGE_DELAY
239* \brief HI timing delay for I2C timing (in nano seconds) 239* \brief HI timing delay for I2C timing (in nano seconds)
240* 240*
@@ -242,13 +242,13 @@ DEFINES
242*/ 242*/
243#define HI_I2C_BRIDGE_DELAY 750 243#define HI_I2C_BRIDGE_DELAY 750
244 244
245/** 245/*
246* \brief Time Window for MER and SER Measurement in Units of Segment duration. 246* \brief Time Window for MER and SER Measurement in Units of Segment duration.
247*/ 247*/
248#define VSB_TOP_MEASUREMENT_PERIOD 64 248#define VSB_TOP_MEASUREMENT_PERIOD 64
249#define SYMBOLS_PER_SEGMENT 832 249#define SYMBOLS_PER_SEGMENT 832
250 250
251/** 251/*
252* \brief bit rate and segment rate constants used for SER and BER. 252* \brief bit rate and segment rate constants used for SER and BER.
253*/ 253*/
254/* values taken from the QAM microcode */ 254/* values taken from the QAM microcode */
@@ -260,21 +260,21 @@ DEFINES
260#define DRXJ_QAM_SL_SIG_POWER_QAM64 43008 260#define DRXJ_QAM_SL_SIG_POWER_QAM64 43008
261#define DRXJ_QAM_SL_SIG_POWER_QAM128 20992 261#define DRXJ_QAM_SL_SIG_POWER_QAM128 20992
262#define DRXJ_QAM_SL_SIG_POWER_QAM256 43520 262#define DRXJ_QAM_SL_SIG_POWER_QAM256 43520
263/** 263/*
264* \brief Min supported symbolrates. 264* \brief Min supported symbolrates.
265*/ 265*/
266#ifndef DRXJ_QAM_SYMBOLRATE_MIN 266#ifndef DRXJ_QAM_SYMBOLRATE_MIN
267#define DRXJ_QAM_SYMBOLRATE_MIN (520000) 267#define DRXJ_QAM_SYMBOLRATE_MIN (520000)
268#endif 268#endif
269 269
270/** 270/*
271* \brief Max supported symbolrates. 271* \brief Max supported symbolrates.
272*/ 272*/
273#ifndef DRXJ_QAM_SYMBOLRATE_MAX 273#ifndef DRXJ_QAM_SYMBOLRATE_MAX
274#define DRXJ_QAM_SYMBOLRATE_MAX (7233000) 274#define DRXJ_QAM_SYMBOLRATE_MAX (7233000)
275#endif 275#endif
276 276
277/** 277/*
278* \def DRXJ_QAM_MAX_WAITTIME 278* \def DRXJ_QAM_MAX_WAITTIME
279* \brief Maximal wait time for QAM auto constellation in ms 279* \brief Maximal wait time for QAM auto constellation in ms
280*/ 280*/
@@ -290,7 +290,7 @@ DEFINES
290#define DRXJ_QAM_DEMOD_LOCK_EXT_WAITTIME 200 290#define DRXJ_QAM_DEMOD_LOCK_EXT_WAITTIME 200
291#endif 291#endif
292 292
293/** 293/*
294* \def SCU status and results 294* \def SCU status and results
295* \brief SCU 295* \brief SCU
296*/ 296*/
@@ -299,7 +299,7 @@ DEFINES
299#define FEC_RS_MEASUREMENT_PERIOD 12894 /* 1 sec */ 299#define FEC_RS_MEASUREMENT_PERIOD 12894 /* 1 sec */
300#define FEC_RS_MEASUREMENT_PRESCALE 1 /* n sec */ 300#define FEC_RS_MEASUREMENT_PRESCALE 1 /* n sec */
301 301
302/** 302/*
303* \def DRX_AUD_MAX_DEVIATION 303* \def DRX_AUD_MAX_DEVIATION
304* \brief Needed for calculation of prescale feature in AUD 304* \brief Needed for calculation of prescale feature in AUD
305*/ 305*/
@@ -307,14 +307,14 @@ DEFINES
307#define DRXJ_AUD_MAX_FM_DEVIATION 100 /* kHz */ 307#define DRXJ_AUD_MAX_FM_DEVIATION 100 /* kHz */
308#endif 308#endif
309 309
310/** 310/*
311* \brief Needed for calculation of NICAM prescale feature in AUD 311* \brief Needed for calculation of NICAM prescale feature in AUD
312*/ 312*/
313#ifndef DRXJ_AUD_MAX_NICAM_PRESCALE 313#ifndef DRXJ_AUD_MAX_NICAM_PRESCALE
314#define DRXJ_AUD_MAX_NICAM_PRESCALE (9) /* dB */ 314#define DRXJ_AUD_MAX_NICAM_PRESCALE (9) /* dB */
315#endif 315#endif
316 316
317/** 317/*
318* \brief Needed for calculation of NICAM prescale feature in AUD 318* \brief Needed for calculation of NICAM prescale feature in AUD
319*/ 319*/
320#ifndef DRXJ_AUD_MAX_WAITTIME 320#ifndef DRXJ_AUD_MAX_WAITTIME
@@ -371,21 +371,21 @@ DEFINES
371/*============================================================================*/ 371/*============================================================================*/
372/*=== GLOBAL VARIABLEs =======================================================*/ 372/*=== GLOBAL VARIABLEs =======================================================*/
373/*============================================================================*/ 373/*============================================================================*/
374/** 374/*
375*/ 375*/
376 376
377/** 377/*
378* \brief Temporary register definitions. 378* \brief Temporary register definitions.
379* (register definitions that are not yet available in register master) 379* (register definitions that are not yet available in register master)
380*/ 380*/
381 381
382/******************************************************************************/ 382/*****************************************************************************/
383/* Audio block 0x103 is write only. To avoid shadowing in driver accessing */ 383/* Audio block 0x103 is write only. To avoid shadowing in driver accessing */
384/* RAM adresses directly. This must be READ ONLY to avoid problems. */ 384/* RAM adresses directly. This must be READ ONLY to avoid problems. */
385/* Writing to the interface adresses is more than only writing the RAM */ 385/* Writing to the interface adresses is more than only writing the RAM */
386/* locations */ 386/* locations */
387/******************************************************************************/ 387/*****************************************************************************/
388/** 388/*
389* \brief RAM location of MODUS registers 389* \brief RAM location of MODUS registers
390*/ 390*/
391#define AUD_DEM_RAM_MODUS_HI__A 0x10204A3 391#define AUD_DEM_RAM_MODUS_HI__A 0x10204A3
@@ -394,13 +394,13 @@ DEFINES
394#define AUD_DEM_RAM_MODUS_LO__A 0x10204A4 394#define AUD_DEM_RAM_MODUS_LO__A 0x10204A4
395#define AUD_DEM_RAM_MODUS_LO__M 0x0FFF 395#define AUD_DEM_RAM_MODUS_LO__M 0x0FFF
396 396
397/** 397/*
398* \brief RAM location of I2S config registers 398* \brief RAM location of I2S config registers
399*/ 399*/
400#define AUD_DEM_RAM_I2S_CONFIG1__A 0x10204B1 400#define AUD_DEM_RAM_I2S_CONFIG1__A 0x10204B1
401#define AUD_DEM_RAM_I2S_CONFIG2__A 0x10204B2 401#define AUD_DEM_RAM_I2S_CONFIG2__A 0x10204B2
402 402
403/** 403/*
404* \brief RAM location of DCO config registers 404* \brief RAM location of DCO config registers
405*/ 405*/
406#define AUD_DEM_RAM_DCO_B_HI__A 0x1020461 406#define AUD_DEM_RAM_DCO_B_HI__A 0x1020461
@@ -408,20 +408,20 @@ DEFINES
408#define AUD_DEM_RAM_DCO_A_HI__A 0x1020463 408#define AUD_DEM_RAM_DCO_A_HI__A 0x1020463
409#define AUD_DEM_RAM_DCO_A_LO__A 0x1020464 409#define AUD_DEM_RAM_DCO_A_LO__A 0x1020464
410 410
411/** 411/*
412* \brief RAM location of Threshold registers 412* \brief RAM location of Threshold registers
413*/ 413*/
414#define AUD_DEM_RAM_NICAM_THRSHLD__A 0x102045A 414#define AUD_DEM_RAM_NICAM_THRSHLD__A 0x102045A
415#define AUD_DEM_RAM_A2_THRSHLD__A 0x10204BB 415#define AUD_DEM_RAM_A2_THRSHLD__A 0x10204BB
416#define AUD_DEM_RAM_BTSC_THRSHLD__A 0x10204A6 416#define AUD_DEM_RAM_BTSC_THRSHLD__A 0x10204A6
417 417
418/** 418/*
419* \brief RAM location of Carrier Threshold registers 419* \brief RAM location of Carrier Threshold registers
420*/ 420*/
421#define AUD_DEM_RAM_CM_A_THRSHLD__A 0x10204AF 421#define AUD_DEM_RAM_CM_A_THRSHLD__A 0x10204AF
422#define AUD_DEM_RAM_CM_B_THRSHLD__A 0x10204B0 422#define AUD_DEM_RAM_CM_B_THRSHLD__A 0x10204B0
423 423
424/** 424/*
425* \brief FM Matrix register fix 425* \brief FM Matrix register fix
426*/ 426*/
427#ifdef AUD_DEM_WR_FM_MATRIX__A 427#ifdef AUD_DEM_WR_FM_MATRIX__A
@@ -430,7 +430,7 @@ DEFINES
430#define AUD_DEM_WR_FM_MATRIX__A 0x105006F 430#define AUD_DEM_WR_FM_MATRIX__A 0x105006F
431 431
432/*============================================================================*/ 432/*============================================================================*/
433/** 433/*
434* \brief Defines required for audio 434* \brief Defines required for audio
435*/ 435*/
436#define AUD_VOLUME_ZERO_DB 115 436#define AUD_VOLUME_ZERO_DB 115
@@ -443,14 +443,14 @@ DEFINES
443#define AUD_I2S_FREQUENCY_MIN 12000UL 443#define AUD_I2S_FREQUENCY_MIN 12000UL
444#define AUD_RDS_ARRAY_SIZE 18 444#define AUD_RDS_ARRAY_SIZE 18
445 445
446/** 446/*
447* \brief Needed for calculation of prescale feature in AUD 447* \brief Needed for calculation of prescale feature in AUD
448*/ 448*/
449#ifndef DRX_AUD_MAX_FM_DEVIATION 449#ifndef DRX_AUD_MAX_FM_DEVIATION
450#define DRX_AUD_MAX_FM_DEVIATION (100) /* kHz */ 450#define DRX_AUD_MAX_FM_DEVIATION (100) /* kHz */
451#endif 451#endif
452 452
453/** 453/*
454* \brief Needed for calculation of NICAM prescale feature in AUD 454* \brief Needed for calculation of NICAM prescale feature in AUD
455*/ 455*/
456#ifndef DRX_AUD_MAX_NICAM_PRESCALE 456#ifndef DRX_AUD_MAX_NICAM_PRESCALE
@@ -478,7 +478,7 @@ DEFINES
478/*=== REGISTER ACCESS MACROS =================================================*/ 478/*=== REGISTER ACCESS MACROS =================================================*/
479/*============================================================================*/ 479/*============================================================================*/
480 480
481/** 481/*
482* This macro is used to create byte arrays for block writes. 482* This macro is used to create byte arrays for block writes.
483* Block writes speed up I2C traffic between host and demod. 483* Block writes speed up I2C traffic between host and demod.
484* The macro takes care of the required byte order in a 16 bits word. 484* The macro takes care of the required byte order in a 16 bits word.
@@ -486,7 +486,7 @@ DEFINES
486*/ 486*/
487#define DRXJ_16TO8(x) ((u8) (((u16)x) & 0xFF)), \ 487#define DRXJ_16TO8(x) ((u8) (((u16)x) & 0xFF)), \
488 ((u8)((((u16)x)>>8)&0xFF)) 488 ((u8)((((u16)x)>>8)&0xFF))
489/** 489/*
490* This macro is used to convert byte array to 16 bit register value for block read. 490* This macro is used to convert byte array to 16 bit register value for block read.
491* Block read speed up I2C traffic between host and demod. 491* Block read speed up I2C traffic between host and demod.
492* The macro takes care of the required byte order in a 16 bits word. 492* The macro takes care of the required byte order in a 16 bits word.
@@ -501,7 +501,7 @@ DEFINES
501/*=== HI COMMAND RELATED DEFINES =============================================*/ 501/*=== HI COMMAND RELATED DEFINES =============================================*/
502/*============================================================================*/ 502/*============================================================================*/
503 503
504/** 504/*
505* \brief General maximum number of retries for ucode command interfaces 505* \brief General maximum number of retries for ucode command interfaces
506*/ 506*/
507#define DRXJ_MAX_RETRIES (100) 507#define DRXJ_MAX_RETRIES (100)
@@ -807,7 +807,7 @@ static struct drxj_data drxj_data_g = {
807 }, 807 },
808}; 808};
809 809
810/** 810/*
811* \var drxj_default_addr_g 811* \var drxj_default_addr_g
812* \brief Default I2C address and device identifier. 812* \brief Default I2C address and device identifier.
813*/ 813*/
@@ -816,7 +816,7 @@ static struct i2c_device_addr drxj_default_addr_g = {
816 DRXJ_DEF_DEMOD_DEV_ID /* device id */ 816 DRXJ_DEF_DEMOD_DEV_ID /* device id */
817}; 817};
818 818
819/** 819/*
820* \var drxj_default_comm_attr_g 820* \var drxj_default_comm_attr_g
821* \brief Default common attributes of a drxj demodulator instance. 821* \brief Default common attributes of a drxj demodulator instance.
822*/ 822*/
@@ -887,7 +887,7 @@ static struct drx_common_attr drxj_default_comm_attr_g = {
887 0 /* mfx */ 887 0 /* mfx */
888}; 888};
889 889
890/** 890/*
891* \var drxj_default_demod_g 891* \var drxj_default_demod_g
892* \brief Default drxj demodulator instance. 892* \brief Default drxj demodulator instance.
893*/ 893*/
@@ -897,7 +897,7 @@ static struct drx_demod_instance drxj_default_demod_g = {
897 &drxj_data_g /* demod device specific attributes */ 897 &drxj_data_g /* demod device specific attributes */
898}; 898};
899 899
900/** 900/*
901* \brief Default audio data structure for DRK demodulator instance. 901* \brief Default audio data structure for DRK demodulator instance.
902* 902*
903* This structure is DRXK specific. 903* This structure is DRXK specific.
@@ -997,7 +997,7 @@ struct drxj_hi_cmd {
997/*=== MICROCODE RELATED STRUCTURES ===========================================*/ 997/*=== MICROCODE RELATED STRUCTURES ===========================================*/
998/*============================================================================*/ 998/*============================================================================*/
999 999
1000/** 1000/*
1001 * struct drxu_code_block_hdr - Structure of the microcode block headers 1001 * struct drxu_code_block_hdr - Structure of the microcode block headers
1002 * 1002 *
1003 * @addr: Destination address of the data in this block 1003 * @addr: Destination address of the data in this block
@@ -1086,7 +1086,7 @@ static u32 frac28(u32 N, u32 D)
1086 return Q1; 1086 return Q1;
1087} 1087}
1088 1088
1089/** 1089/*
1090* \fn u32 log1_times100( u32 x) 1090* \fn u32 log1_times100( u32 x)
1091* \brief Compute: 100*log10(x) 1091* \brief Compute: 100*log10(x)
1092* \param x 32 bits 1092* \param x 32 bits
@@ -1198,7 +1198,7 @@ static u32 log1_times100(u32 x)
1198 1198
1199} 1199}
1200 1200
1201/** 1201/*
1202* \fn u32 frac_times1e6( u16 N, u32 D) 1202* \fn u32 frac_times1e6( u16 N, u32 D)
1203* \brief Compute: (N/D) * 1000000. 1203* \brief Compute: (N/D) * 1000000.
1204* \param N nominator 16-bits. 1204* \param N nominator 16-bits.
@@ -1235,7 +1235,7 @@ static u32 frac_times1e6(u32 N, u32 D)
1235/*============================================================================*/ 1235/*============================================================================*/
1236 1236
1237 1237
1238/** 1238/*
1239* \brief Values for NICAM prescaler gain. Computed from dB to integer 1239* \brief Values for NICAM prescaler gain. Computed from dB to integer
1240* and rounded. For calc used formula: 16*10^(prescaleGain[dB]/20). 1240* and rounded. For calc used formula: 16*10^(prescaleGain[dB]/20).
1241* 1241*
@@ -1280,7 +1280,7 @@ static const u16 nicam_presc_table_val[43] = {
1280#define DRXJ_DAP_AUDTRIF_TIMEOUT 80 /* millisec */ 1280#define DRXJ_DAP_AUDTRIF_TIMEOUT 80 /* millisec */
1281/*============================================================================*/ 1281/*============================================================================*/
1282 1282
1283/** 1283/*
1284* \fn bool is_handled_by_aud_tr_if( u32 addr ) 1284* \fn bool is_handled_by_aud_tr_if( u32 addr )
1285* \brief Check if this address is handled by the audio token ring interface. 1285* \brief Check if this address is handled by the audio token ring interface.
1286* \param addr 1286* \param addr
@@ -1386,7 +1386,7 @@ int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr,
1386 1386
1387/*============================================================================*/ 1387/*============================================================================*/
1388 1388
1389/****************************** 1389/*****************************
1390* 1390*
1391* int drxdap_fasi_read_block ( 1391* int drxdap_fasi_read_block (
1392* struct i2c_device_addr *dev_addr, -- address of I2C device 1392* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1498,7 +1498,7 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
1498} 1498}
1499 1499
1500 1500
1501/****************************** 1501/*****************************
1502* 1502*
1503* int drxdap_fasi_read_reg16 ( 1503* int drxdap_fasi_read_reg16 (
1504* struct i2c_device_addr *dev_addr, -- address of I2C device 1504* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1531,7 +1531,7 @@ static int drxdap_fasi_read_reg16(struct i2c_device_addr *dev_addr,
1531 return rc; 1531 return rc;
1532} 1532}
1533 1533
1534/****************************** 1534/*****************************
1535* 1535*
1536* int drxdap_fasi_read_reg32 ( 1536* int drxdap_fasi_read_reg32 (
1537* struct i2c_device_addr *dev_addr, -- address of I2C device 1537* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1566,7 +1566,7 @@ static int drxdap_fasi_read_reg32(struct i2c_device_addr *dev_addr,
1566 return rc; 1566 return rc;
1567} 1567}
1568 1568
1569/****************************** 1569/*****************************
1570* 1570*
1571* int drxdap_fasi_write_block ( 1571* int drxdap_fasi_write_block (
1572* struct i2c_device_addr *dev_addr, -- address of I2C device 1572* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1705,7 +1705,7 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
1705 return first_err; 1705 return first_err;
1706} 1706}
1707 1707
1708/****************************** 1708/*****************************
1709* 1709*
1710* int drxdap_fasi_write_reg16 ( 1710* int drxdap_fasi_write_reg16 (
1711* struct i2c_device_addr *dev_addr, -- address of I2C device 1711* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1734,7 +1734,7 @@ static int drxdap_fasi_write_reg16(struct i2c_device_addr *dev_addr,
1734 return drxdap_fasi_write_block(dev_addr, addr, sizeof(data), buf, flags); 1734 return drxdap_fasi_write_block(dev_addr, addr, sizeof(data), buf, flags);
1735} 1735}
1736 1736
1737/****************************** 1737/*****************************
1738* 1738*
1739* int drxdap_fasi_read_modify_write_reg16 ( 1739* int drxdap_fasi_read_modify_write_reg16 (
1740* struct i2c_device_addr *dev_addr, -- address of I2C device 1740* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1778,7 +1778,7 @@ static int drxdap_fasi_read_modify_write_reg16(struct i2c_device_addr *dev_addr,
1778 return rc; 1778 return rc;
1779} 1779}
1780 1780
1781/****************************** 1781/*****************************
1782* 1782*
1783* int drxdap_fasi_write_reg32 ( 1783* int drxdap_fasi_write_reg32 (
1784* struct i2c_device_addr *dev_addr, -- address of I2C device 1784* struct i2c_device_addr *dev_addr, -- address of I2C device
@@ -1811,7 +1811,7 @@ static int drxdap_fasi_write_reg32(struct i2c_device_addr *dev_addr,
1811 1811
1812/*============================================================================*/ 1812/*============================================================================*/
1813 1813
1814/** 1814/*
1815* \fn int drxj_dap_rm_write_reg16short 1815* \fn int drxj_dap_rm_write_reg16short
1816* \brief Read modify write 16 bits audio register using short format only. 1816* \brief Read modify write 16 bits audio register using short format only.
1817* \param dev_addr 1817* \param dev_addr
@@ -1890,7 +1890,7 @@ static int drxj_dap_read_modify_write_reg16(struct i2c_device_addr *dev_addr,
1890 1890
1891/*============================================================================*/ 1891/*============================================================================*/
1892 1892
1893/** 1893/*
1894* \fn int drxj_dap_read_aud_reg16 1894* \fn int drxj_dap_read_aud_reg16
1895* \brief Read 16 bits audio register 1895* \brief Read 16 bits audio register
1896* \param dev_addr 1896* \param dev_addr
@@ -1997,7 +1997,7 @@ static int drxj_dap_read_reg16(struct i2c_device_addr *dev_addr,
1997} 1997}
1998/*============================================================================*/ 1998/*============================================================================*/
1999 1999
2000/** 2000/*
2001* \fn int drxj_dap_write_aud_reg16 2001* \fn int drxj_dap_write_aud_reg16
2002* \brief Write 16 bits audio register 2002* \brief Write 16 bits audio register
2003* \param dev_addr 2003* \param dev_addr
@@ -2086,7 +2086,7 @@ static int drxj_dap_write_reg16(struct i2c_device_addr *dev_addr,
2086#define DRXJ_HI_ATOMIC_READ SIO_HI_RA_RAM_PAR_3_ACP_RW_READ 2086#define DRXJ_HI_ATOMIC_READ SIO_HI_RA_RAM_PAR_3_ACP_RW_READ
2087#define DRXJ_HI_ATOMIC_WRITE SIO_HI_RA_RAM_PAR_3_ACP_RW_WRITE 2087#define DRXJ_HI_ATOMIC_WRITE SIO_HI_RA_RAM_PAR_3_ACP_RW_WRITE
2088 2088
2089/** 2089/*
2090* \fn int drxj_dap_atomic_read_write_block() 2090* \fn int drxj_dap_atomic_read_write_block()
2091* \brief Basic access routine for atomic read or write access 2091* \brief Basic access routine for atomic read or write access
2092* \param dev_addr pointer to i2c dev address 2092* \param dev_addr pointer to i2c dev address
@@ -2168,7 +2168,7 @@ rw_error:
2168 2168
2169/*============================================================================*/ 2169/*============================================================================*/
2170 2170
2171/** 2171/*
2172* \fn int drxj_dap_atomic_read_reg32() 2172* \fn int drxj_dap_atomic_read_reg32()
2173* \brief Atomic read of 32 bits words 2173* \brief Atomic read of 32 bits words
2174*/ 2174*/
@@ -2215,7 +2215,7 @@ int drxj_dap_atomic_read_reg32(struct i2c_device_addr *dev_addr,
2215/*============================================================================*/ 2215/*============================================================================*/
2216/*============================================================================*/ 2216/*============================================================================*/
2217 2217
2218/** 2218/*
2219* \fn int hi_cfg_command() 2219* \fn int hi_cfg_command()
2220* \brief Configure HI with settings stored in the demod structure. 2220* \brief Configure HI with settings stored in the demod structure.
2221* \param demod Demodulator. 2221* \param demod Demodulator.
@@ -2258,7 +2258,7 @@ rw_error:
2258 return rc; 2258 return rc;
2259} 2259}
2260 2260
2261/** 2261/*
2262* \fn int hi_command() 2262* \fn int hi_command()
2263* \brief Configure HI with settings stored in the demod structure. 2263* \brief Configure HI with settings stored in the demod structure.
2264* \param dev_addr I2C address. 2264* \param dev_addr I2C address.
@@ -2369,7 +2369,7 @@ rw_error:
2369 return rc; 2369 return rc;
2370} 2370}
2371 2371
2372/** 2372/*
2373* \fn int init_hi( const struct drx_demod_instance *demod ) 2373* \fn int init_hi( const struct drx_demod_instance *demod )
2374* \brief Initialise and configurate HI. 2374* \brief Initialise and configurate HI.
2375* \param demod pointer to demod data. 2375* \param demod pointer to demod data.
@@ -2450,7 +2450,7 @@ rw_error:
2450/*============================================================================*/ 2450/*============================================================================*/
2451/*============================================================================*/ 2451/*============================================================================*/
2452 2452
2453/** 2453/*
2454* \fn int get_device_capabilities() 2454* \fn int get_device_capabilities()
2455* \brief Get and store device capabilities. 2455* \brief Get and store device capabilities.
2456* \param demod Pointer to demodulator instance. 2456* \param demod Pointer to demodulator instance.
@@ -2656,7 +2656,7 @@ rw_error:
2656 return rc; 2656 return rc;
2657} 2657}
2658 2658
2659/** 2659/*
2660* \fn int power_up_device() 2660* \fn int power_up_device()
2661* \brief Power up device. 2661* \brief Power up device.
2662* \param demod Pointer to demodulator instance. 2662* \param demod Pointer to demodulator instance.
@@ -2710,7 +2710,7 @@ static int power_up_device(struct drx_demod_instance *demod)
2710/*----------------------------------------------------------------------------*/ 2710/*----------------------------------------------------------------------------*/
2711/* MPEG Output Configuration Functions - begin */ 2711/* MPEG Output Configuration Functions - begin */
2712/*----------------------------------------------------------------------------*/ 2712/*----------------------------------------------------------------------------*/
2713/** 2713/*
2714* \fn int ctrl_set_cfg_mpeg_output() 2714* \fn int ctrl_set_cfg_mpeg_output()
2715* \brief Set MPEG output configuration of the device. 2715* \brief Set MPEG output configuration of the device.
2716* \param devmod Pointer to demodulator instance. 2716* \param devmod Pointer to demodulator instance.
@@ -3356,7 +3356,7 @@ rw_error:
3356/* miscellaneous configurations - begin */ 3356/* miscellaneous configurations - begin */
3357/*----------------------------------------------------------------------------*/ 3357/*----------------------------------------------------------------------------*/
3358 3358
3359/** 3359/*
3360* \fn int set_mpegtei_handling() 3360* \fn int set_mpegtei_handling()
3361* \brief Activate MPEG TEI handling settings. 3361* \brief Activate MPEG TEI handling settings.
3362* \param devmod Pointer to demodulator instance. 3362* \param devmod Pointer to demodulator instance.
@@ -3429,7 +3429,7 @@ rw_error:
3429} 3429}
3430 3430
3431/*----------------------------------------------------------------------------*/ 3431/*----------------------------------------------------------------------------*/
3432/** 3432/*
3433* \fn int bit_reverse_mpeg_output() 3433* \fn int bit_reverse_mpeg_output()
3434* \brief Set MPEG output bit-endian settings. 3434* \brief Set MPEG output bit-endian settings.
3435* \param devmod Pointer to demodulator instance. 3435* \param devmod Pointer to demodulator instance.
@@ -3472,7 +3472,7 @@ rw_error:
3472} 3472}
3473 3473
3474/*----------------------------------------------------------------------------*/ 3474/*----------------------------------------------------------------------------*/
3475/** 3475/*
3476* \fn int set_mpeg_start_width() 3476* \fn int set_mpeg_start_width()
3477* \brief Set MPEG start width. 3477* \brief Set MPEG start width.
3478* \param devmod Pointer to demodulator instance. 3478* \param devmod Pointer to demodulator instance.
@@ -3522,7 +3522,7 @@ rw_error:
3522/*----------------------------------------------------------------------------*/ 3522/*----------------------------------------------------------------------------*/
3523/* UIO Configuration Functions - begin */ 3523/* UIO Configuration Functions - begin */
3524/*----------------------------------------------------------------------------*/ 3524/*----------------------------------------------------------------------------*/
3525/** 3525/*
3526* \fn int ctrl_set_uio_cfg() 3526* \fn int ctrl_set_uio_cfg()
3527* \brief Configure modus oprandi UIO. 3527* \brief Configure modus oprandi UIO.
3528* \param demod Pointer to demodulator instance. 3528* \param demod Pointer to demodulator instance.
@@ -3659,7 +3659,7 @@ rw_error:
3659 return rc; 3659 return rc;
3660} 3660}
3661 3661
3662/** 3662/*
3663* \fn int ctrl_uio_write() 3663* \fn int ctrl_uio_write()
3664* \brief Write to a UIO. 3664* \brief Write to a UIO.
3665* \param demod Pointer to demodulator instance. 3665* \param demod Pointer to demodulator instance.
@@ -3868,7 +3868,7 @@ rw_error:
3868/*----------------------------------------------------------------------------*/ 3868/*----------------------------------------------------------------------------*/
3869/* I2C Bridge Functions - begin */ 3869/* I2C Bridge Functions - begin */
3870/*----------------------------------------------------------------------------*/ 3870/*----------------------------------------------------------------------------*/
3871/** 3871/*
3872* \fn int ctrl_i2c_bridge() 3872* \fn int ctrl_i2c_bridge()
3873* \brief Open or close the I2C switch to tuner. 3873* \brief Open or close the I2C switch to tuner.
3874* \param demod Pointer to demodulator instance. 3874* \param demod Pointer to demodulator instance.
@@ -3903,7 +3903,7 @@ ctrl_i2c_bridge(struct drx_demod_instance *demod, bool *bridge_closed)
3903/*----------------------------------------------------------------------------*/ 3903/*----------------------------------------------------------------------------*/
3904/* Smart antenna Functions - begin */ 3904/* Smart antenna Functions - begin */
3905/*----------------------------------------------------------------------------*/ 3905/*----------------------------------------------------------------------------*/
3906/** 3906/*
3907* \fn int smart_ant_init() 3907* \fn int smart_ant_init()
3908* \brief Initialize Smart Antenna. 3908* \brief Initialize Smart Antenna.
3909* \param pointer to struct drx_demod_instance. 3909* \param pointer to struct drx_demod_instance.
@@ -4116,7 +4116,7 @@ rw_error:
4116 return rc; 4116 return rc;
4117} 4117}
4118 4118
4119/** 4119/*
4120* \fn int DRXJ_DAP_SCUAtomicReadWriteBlock() 4120* \fn int DRXJ_DAP_SCUAtomicReadWriteBlock()
4121* \brief Basic access routine for SCU atomic read or write access 4121* \brief Basic access routine for SCU atomic read or write access
4122* \param dev_addr pointer to i2c dev address 4122* \param dev_addr pointer to i2c dev address
@@ -4188,7 +4188,7 @@ rw_error:
4188 4188
4189/*============================================================================*/ 4189/*============================================================================*/
4190 4190
4191/** 4191/*
4192* \fn int DRXJ_DAP_AtomicReadReg16() 4192* \fn int DRXJ_DAP_AtomicReadReg16()
4193* \brief Atomic read of 16 bits words 4193* \brief Atomic read of 16 bits words
4194*/ 4194*/
@@ -4216,7 +4216,7 @@ int drxj_dap_scu_atomic_read_reg16(struct i2c_device_addr *dev_addr,
4216} 4216}
4217 4217
4218/*============================================================================*/ 4218/*============================================================================*/
4219/** 4219/*
4220* \fn int drxj_dap_scu_atomic_write_reg16() 4220* \fn int drxj_dap_scu_atomic_write_reg16()
4221* \brief Atomic read of 16 bits words 4221* \brief Atomic read of 16 bits words
4222*/ 4222*/
@@ -4237,7 +4237,7 @@ int drxj_dap_scu_atomic_write_reg16(struct i2c_device_addr *dev_addr,
4237} 4237}
4238 4238
4239/* -------------------------------------------------------------------------- */ 4239/* -------------------------------------------------------------------------- */
4240/** 4240/*
4241* \brief Measure result of ADC synchronisation 4241* \brief Measure result of ADC synchronisation
4242* \param demod demod instance 4242* \param demod demod instance
4243* \param count (returned) count 4243* \param count (returned) count
@@ -4297,7 +4297,7 @@ rw_error:
4297 return rc; 4297 return rc;
4298} 4298}
4299 4299
4300/** 4300/*
4301* \brief Synchronize analog and digital clock domains 4301* \brief Synchronize analog and digital clock domains
4302* \param demod demod instance 4302* \param demod demod instance
4303* \return int. 4303* \return int.
@@ -4365,7 +4365,7 @@ rw_error:
4365/*== 8VSB & QAM COMMON DATAPATH FUNCTIONS ==*/ 4365/*== 8VSB & QAM COMMON DATAPATH FUNCTIONS ==*/
4366/*============================================================================*/ 4366/*============================================================================*/
4367/*============================================================================*/ 4367/*============================================================================*/
4368/** 4368/*
4369* \fn int init_agc () 4369* \fn int init_agc ()
4370* \brief Initialize AGC for all standards. 4370* \brief Initialize AGC for all standards.
4371* \param demod instance of demodulator. 4371* \param demod instance of demodulator.
@@ -4741,7 +4741,7 @@ rw_error:
4741 return rc; 4741 return rc;
4742} 4742}
4743 4743
4744/** 4744/*
4745* \fn int set_frequency () 4745* \fn int set_frequency ()
4746* \brief Set frequency shift. 4746* \brief Set frequency shift.
4747* \param demod instance of demodulator. 4747* \param demod instance of demodulator.
@@ -4839,7 +4839,7 @@ rw_error:
4839 return rc; 4839 return rc;
4840} 4840}
4841 4841
4842/** 4842/*
4843* \fn int get_acc_pkt_err() 4843* \fn int get_acc_pkt_err()
4844* \brief Retrieve signal strength for VSB and QAM. 4844* \brief Retrieve signal strength for VSB and QAM.
4845* \param demod Pointer to demod instance 4845* \param demod Pointer to demod instance
@@ -4891,7 +4891,7 @@ rw_error:
4891 4891
4892/*============================================================================*/ 4892/*============================================================================*/
4893 4893
4894/** 4894/*
4895* \fn int set_agc_rf () 4895* \fn int set_agc_rf ()
4896* \brief Configure RF AGC 4896* \brief Configure RF AGC
4897* \param demod instance of demodulator. 4897* \param demod instance of demodulator.
@@ -5105,7 +5105,7 @@ rw_error:
5105 return rc; 5105 return rc;
5106} 5106}
5107 5107
5108/** 5108/*
5109* \fn int set_agc_if () 5109* \fn int set_agc_if ()
5110* \brief Configure If AGC 5110* \brief Configure If AGC
5111* \param demod instance of demodulator. 5111* \param demod instance of demodulator.
@@ -5334,7 +5334,7 @@ rw_error:
5334 return rc; 5334 return rc;
5335} 5335}
5336 5336
5337/** 5337/*
5338* \fn int set_iqm_af () 5338* \fn int set_iqm_af ()
5339* \brief Configure IQM AF registers 5339* \brief Configure IQM AF registers
5340* \param demod instance of demodulator. 5340* \param demod instance of demodulator.
@@ -5380,7 +5380,7 @@ rw_error:
5380/*============================================================================*/ 5380/*============================================================================*/
5381/*============================================================================*/ 5381/*============================================================================*/
5382 5382
5383/** 5383/*
5384* \fn int power_down_vsb () 5384* \fn int power_down_vsb ()
5385* \brief Powr down QAM related blocks. 5385* \brief Powr down QAM related blocks.
5386* \param demod instance of demodulator. 5386* \param demod instance of demodulator.
@@ -5478,7 +5478,7 @@ rw_error:
5478 return rc; 5478 return rc;
5479} 5479}
5480 5480
5481/** 5481/*
5482* \fn int set_vsb_leak_n_gain () 5482* \fn int set_vsb_leak_n_gain ()
5483* \brief Set ATSC demod. 5483* \brief Set ATSC demod.
5484* \param demod instance of demodulator. 5484* \param demod instance of demodulator.
@@ -5694,7 +5694,7 @@ rw_error:
5694 return rc; 5694 return rc;
5695} 5695}
5696 5696
5697/** 5697/*
5698* \fn int set_vsb() 5698* \fn int set_vsb()
5699* \brief Set 8VSB demod. 5699* \brief Set 8VSB demod.
5700* \param demod instance of demodulator. 5700* \param demod instance of demodulator.
@@ -6200,7 +6200,7 @@ rw_error:
6200 return rc; 6200 return rc;
6201} 6201}
6202 6202
6203/** 6203/*
6204* \fn static short get_vsb_post_rs_pck_err(struct i2c_device_addr *dev_addr, u16 *PckErrs) 6204* \fn static short get_vsb_post_rs_pck_err(struct i2c_device_addr *dev_addr, u16 *PckErrs)
6205* \brief Get the values of packet error in 8VSB mode 6205* \brief Get the values of packet error in 8VSB mode
6206* \return Error code 6206* \return Error code
@@ -6239,7 +6239,7 @@ rw_error:
6239 return rc; 6239 return rc;
6240} 6240}
6241 6241
6242/** 6242/*
6243* \fn static short GetVSBBer(struct i2c_device_addr *dev_addr, u32 *ber) 6243* \fn static short GetVSBBer(struct i2c_device_addr *dev_addr, u32 *ber)
6244* \brief Get the values of ber in VSB mode 6244* \brief Get the values of ber in VSB mode
6245* \return Error code 6245* \return Error code
@@ -6284,7 +6284,7 @@ rw_error:
6284 return rc; 6284 return rc;
6285} 6285}
6286 6286
6287/** 6287/*
6288* \fn static short get_vs_bpre_viterbi_ber(struct i2c_device_addr *dev_addr, u32 *ber) 6288* \fn static short get_vs_bpre_viterbi_ber(struct i2c_device_addr *dev_addr, u32 *ber)
6289* \brief Get the values of ber in VSB mode 6289* \brief Get the values of ber in VSB mode
6290* \return Error code 6290* \return Error code
@@ -6306,7 +6306,7 @@ static int get_vs_bpre_viterbi_ber(struct i2c_device_addr *dev_addr,
6306 return 0; 6306 return 0;
6307} 6307}
6308 6308
6309/** 6309/*
6310* \fn static int get_vsbmer(struct i2c_device_addr *dev_addr, u16 *mer) 6310* \fn static int get_vsbmer(struct i2c_device_addr *dev_addr, u16 *mer)
6311* \brief Get the values of MER 6311* \brief Get the values of MER
6312* \return Error code 6312* \return Error code
@@ -6340,7 +6340,7 @@ rw_error:
6340/*============================================================================*/ 6340/*============================================================================*/
6341/*============================================================================*/ 6341/*============================================================================*/
6342 6342
6343/** 6343/*
6344* \fn int power_down_qam () 6344* \fn int power_down_qam ()
6345* \brief Powr down QAM related blocks. 6345* \brief Powr down QAM related blocks.
6346* \param demod instance of demodulator. 6346* \param demod instance of demodulator.
@@ -6444,7 +6444,7 @@ rw_error:
6444 6444
6445/*============================================================================*/ 6445/*============================================================================*/
6446 6446
6447/** 6447/*
6448* \fn int set_qam_measurement () 6448* \fn int set_qam_measurement ()
6449* \brief Setup of the QAM Measuremnt intervals for signal quality 6449* \brief Setup of the QAM Measuremnt intervals for signal quality
6450* \param demod instance of demod. 6450* \param demod instance of demod.
@@ -6656,7 +6656,7 @@ rw_error:
6656 6656
6657/*============================================================================*/ 6657/*============================================================================*/
6658 6658
6659/** 6659/*
6660* \fn int set_qam16 () 6660* \fn int set_qam16 ()
6661* \brief QAM16 specific setup 6661* \brief QAM16 specific setup
6662* \param demod instance of demod. 6662* \param demod instance of demod.
@@ -6891,7 +6891,7 @@ rw_error:
6891 6891
6892/*============================================================================*/ 6892/*============================================================================*/
6893 6893
6894/** 6894/*
6895* \fn int set_qam32 () 6895* \fn int set_qam32 ()
6896* \brief QAM32 specific setup 6896* \brief QAM32 specific setup
6897* \param demod instance of demod. 6897* \param demod instance of demod.
@@ -7126,7 +7126,7 @@ rw_error:
7126 7126
7127/*============================================================================*/ 7127/*============================================================================*/
7128 7128
7129/** 7129/*
7130* \fn int set_qam64 () 7130* \fn int set_qam64 ()
7131* \brief QAM64 specific setup 7131* \brief QAM64 specific setup
7132* \param demod instance of demod. 7132* \param demod instance of demod.
@@ -7362,7 +7362,7 @@ rw_error:
7362 7362
7363/*============================================================================*/ 7363/*============================================================================*/
7364 7364
7365/** 7365/*
7366* \fn int set_qam128 () 7366* \fn int set_qam128 ()
7367* \brief QAM128 specific setup 7367* \brief QAM128 specific setup
7368* \param demod: instance of demod. 7368* \param demod: instance of demod.
@@ -7597,7 +7597,7 @@ rw_error:
7597 7597
7598/*============================================================================*/ 7598/*============================================================================*/
7599 7599
7600/** 7600/*
7601* \fn int set_qam256 () 7601* \fn int set_qam256 ()
7602* \brief QAM256 specific setup 7602* \brief QAM256 specific setup
7603* \param demod: instance of demod. 7603* \param demod: instance of demod.
@@ -7835,7 +7835,7 @@ rw_error:
7835#define QAM_SET_OP_CONSTELLATION 0x2 7835#define QAM_SET_OP_CONSTELLATION 0x2
7836#define QAM_SET_OP_SPECTRUM 0X4 7836#define QAM_SET_OP_SPECTRUM 0X4
7837 7837
7838/** 7838/*
7839* \fn int set_qam () 7839* \fn int set_qam ()
7840* \brief Set QAM demod. 7840* \brief Set QAM demod.
7841* \param demod: instance of demod. 7841* \param demod: instance of demod.
@@ -8845,7 +8845,7 @@ rw_error:
8845#define DEMOD_LOCKED 0x1 8845#define DEMOD_LOCKED 0x1
8846#define SYNC_FLIPPED 0x2 8846#define SYNC_FLIPPED 0x2
8847#define SPEC_MIRRORED 0x4 8847#define SPEC_MIRRORED 0x4
8848/** 8848/*
8849* \fn int qam64auto () 8849* \fn int qam64auto ()
8850* \brief auto do sync pattern switching and mirroring. 8850* \brief auto do sync pattern switching and mirroring.
8851* \param demod: instance of demod. 8851* \param demod: instance of demod.
@@ -8993,7 +8993,7 @@ rw_error:
8993 return rc; 8993 return rc;
8994} 8994}
8995 8995
8996/** 8996/*
8997* \fn int qam256auto () 8997* \fn int qam256auto ()
8998* \brief auto do sync pattern switching and mirroring. 8998* \brief auto do sync pattern switching and mirroring.
8999* \param demod: instance of demod. 8999* \param demod: instance of demod.
@@ -9077,7 +9077,7 @@ rw_error:
9077 return rc; 9077 return rc;
9078} 9078}
9079 9079
9080/** 9080/*
9081* \fn int set_qam_channel () 9081* \fn int set_qam_channel ()
9082* \brief Set QAM channel according to the requested constellation. 9082* \brief Set QAM channel according to the requested constellation.
9083* \param demod: instance of demod. 9083* \param demod: instance of demod.
@@ -9284,7 +9284,7 @@ rw_error:
9284 9284
9285/*============================================================================*/ 9285/*============================================================================*/
9286 9286
9287/** 9287/*
9288* \fn static short get_qamrs_err_count(struct i2c_device_addr *dev_addr) 9288* \fn static short get_qamrs_err_count(struct i2c_device_addr *dev_addr)
9289* \brief Get RS error count in QAM mode (used for post RS BER calculation) 9289* \brief Get RS error count in QAM mode (used for post RS BER calculation)
9290* \return Error code 9290* \return Error code
@@ -9355,7 +9355,7 @@ rw_error:
9355 9355
9356/*============================================================================*/ 9356/*============================================================================*/
9357 9357
9358/** 9358/*
9359 * \fn int get_sig_strength() 9359 * \fn int get_sig_strength()
9360 * \brief Retrieve signal strength for VSB and QAM. 9360 * \brief Retrieve signal strength for VSB and QAM.
9361 * \param demod Pointer to demod instance 9361 * \param demod Pointer to demod instance
@@ -9435,7 +9435,7 @@ rw_error:
9435 return rc; 9435 return rc;
9436} 9436}
9437 9437
9438/** 9438/*
9439* \fn int ctrl_get_qam_sig_quality() 9439* \fn int ctrl_get_qam_sig_quality()
9440* \brief Retrieve QAM signal quality from device. 9440* \brief Retrieve QAM signal quality from device.
9441* \param devmod Pointer to demodulator instance. 9441* \param devmod Pointer to demodulator instance.
@@ -9721,7 +9721,7 @@ rw_error:
9721*/ 9721*/
9722/* -------------------------------------------------------------------------- */ 9722/* -------------------------------------------------------------------------- */
9723 9723
9724/** 9724/*
9725* \fn int power_down_atv () 9725* \fn int power_down_atv ()
9726* \brief Power down ATV. 9726* \brief Power down ATV.
9727* \param demod instance of demodulator 9727* \param demod instance of demodulator
@@ -9822,7 +9822,7 @@ rw_error:
9822 9822
9823/*============================================================================*/ 9823/*============================================================================*/
9824 9824
9825/** 9825/*
9826* \brief Power up AUD. 9826* \brief Power up AUD.
9827* \param demod instance of demodulator 9827* \param demod instance of demodulator
9828* \return int. 9828* \return int.
@@ -9850,7 +9850,7 @@ rw_error:
9850 return rc; 9850 return rc;
9851} 9851}
9852 9852
9853/** 9853/*
9854* \fn int set_orx_nsu_aox() 9854* \fn int set_orx_nsu_aox()
9855* \brief Configure OrxNsuAox for OOB 9855* \brief Configure OrxNsuAox for OOB
9856* \param demod instance of demodulator. 9856* \param demod instance of demodulator.
@@ -9884,7 +9884,7 @@ rw_error:
9884 return rc; 9884 return rc;
9885} 9885}
9886 9886
9887/** 9887/*
9888* \fn int ctrl_set_oob() 9888* \fn int ctrl_set_oob()
9889* \brief Set OOB channel to be used. 9889* \brief Set OOB channel to be used.
9890* \param demod instance of demodulator 9890* \param demod instance of demodulator
@@ -9986,9 +9986,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par
9986 20; 9986 20;
9987 } 9987 }
9988 9988
9989 /*********/ 9989 /********/
9990 /* Stop */ 9990 /* Stop */
9991 /*********/ 9991 /********/
9992 rc = drxj_dap_write_reg16(dev_addr, ORX_COMM_EXEC__A, ORX_COMM_EXEC_STOP, 0); 9992 rc = drxj_dap_write_reg16(dev_addr, ORX_COMM_EXEC__A, ORX_COMM_EXEC_STOP, 0);
9993 if (rc != 0) { 9993 if (rc != 0) {
9994 pr_err("error %d\n", rc); 9994 pr_err("error %d\n", rc);
@@ -10004,9 +10004,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par
10004 pr_err("error %d\n", rc); 10004 pr_err("error %d\n", rc);
10005 goto rw_error; 10005 goto rw_error;
10006 } 10006 }
10007 /*********/ 10007 /********/
10008 /* Reset */ 10008 /* Reset */
10009 /*********/ 10009 /********/
10010 scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB 10010 scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB
10011 | SCU_RAM_COMMAND_CMD_DEMOD_RESET; 10011 | SCU_RAM_COMMAND_CMD_DEMOD_RESET;
10012 scu_cmd.parameter_len = 0; 10012 scu_cmd.parameter_len = 0;
@@ -10017,9 +10017,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par
10017 pr_err("error %d\n", rc); 10017 pr_err("error %d\n", rc);
10018 goto rw_error; 10018 goto rw_error;
10019 } 10019 }
10020 /***********/ 10020 /**********/
10021 /* SET_ENV */ 10021 /* SET_ENV */
10022 /***********/ 10022 /**********/
10023 /* set frequency, spectrum inversion and data rate */ 10023 /* set frequency, spectrum inversion and data rate */
10024 scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB 10024 scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB
10025 | SCU_RAM_COMMAND_CMD_DEMOD_SET_ENV; 10025 | SCU_RAM_COMMAND_CMD_DEMOD_SET_ENV;
@@ -10376,9 +10376,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par
10376 pr_err("error %d\n", rc); 10376 pr_err("error %d\n", rc);
10377 goto rw_error; 10377 goto rw_error;
10378 } 10378 }
10379 /*********/ 10379 /********/
10380 /* Start */ 10380 /* Start */
10381 /*********/ 10381 /********/
10382 scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB 10382 scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB
10383 | SCU_RAM_COMMAND_CMD_DEMOD_START; 10383 | SCU_RAM_COMMAND_CMD_DEMOD_START;
10384 scu_cmd.parameter_len = 0; 10384 scu_cmd.parameter_len = 0;
@@ -10419,7 +10419,7 @@ rw_error:
10419/*============================================================================= 10419/*=============================================================================
10420 ===== ctrl_set_channel() ========================================================== 10420 ===== ctrl_set_channel() ==========================================================
10421 ===========================================================================*/ 10421 ===========================================================================*/
10422/** 10422/*
10423* \fn int ctrl_set_channel() 10423* \fn int ctrl_set_channel()
10424* \brief Select a new transmission channel. 10424* \brief Select a new transmission channel.
10425* \param demod instance of demod. 10425* \param demod instance of demod.
@@ -10652,7 +10652,7 @@ rw_error:
10652 ===== SigQuality() ========================================================== 10652 ===== SigQuality() ==========================================================
10653 ===========================================================================*/ 10653 ===========================================================================*/
10654 10654
10655/** 10655/*
10656* \fn int ctrl_sig_quality() 10656* \fn int ctrl_sig_quality()
10657* \brief Retrieve signal quality form device. 10657* \brief Retrieve signal quality form device.
10658* \param devmod Pointer to demodulator instance. 10658* \param devmod Pointer to demodulator instance.
@@ -10768,7 +10768,7 @@ rw_error:
10768 10768
10769/*============================================================================*/ 10769/*============================================================================*/
10770 10770
10771/** 10771/*
10772* \fn int ctrl_lock_status() 10772* \fn int ctrl_lock_status()
10773* \brief Retrieve lock status . 10773* \brief Retrieve lock status .
10774* \param dev_addr Pointer to demodulator device address. 10774* \param dev_addr Pointer to demodulator device address.
@@ -10856,7 +10856,7 @@ rw_error:
10856 10856
10857/*============================================================================*/ 10857/*============================================================================*/
10858 10858
10859/** 10859/*
10860* \fn int ctrl_set_standard() 10860* \fn int ctrl_set_standard()
10861* \brief Set modulation standard to be used. 10861* \brief Set modulation standard to be used.
10862* \param standard Modulation standard. 10862* \param standard Modulation standard.
@@ -11012,7 +11012,7 @@ static void drxj_reset_mode(struct drxj_data *ext_attr)
11012 ext_attr->vsb_pre_saw_cfg.use_pre_saw = true; 11012 ext_attr->vsb_pre_saw_cfg.use_pre_saw = true;
11013} 11013}
11014 11014
11015/** 11015/*
11016* \fn int ctrl_power_mode() 11016* \fn int ctrl_power_mode()
11017* \brief Set the power mode of the device to the specified power mode 11017* \brief Set the power mode of the device to the specified power mode
11018* \param demod Pointer to demodulator instance. 11018* \param demod Pointer to demodulator instance.
@@ -11171,7 +11171,7 @@ rw_error:
11171/*== CTRL Set/Get Config related functions ===================================*/ 11171/*== CTRL Set/Get Config related functions ===================================*/
11172/*============================================================================*/ 11172/*============================================================================*/
11173 11173
11174/** 11174/*
11175* \fn int ctrl_set_cfg_pre_saw() 11175* \fn int ctrl_set_cfg_pre_saw()
11176* \brief Set Pre-saw reference. 11176* \brief Set Pre-saw reference.
11177* \param demod demod instance 11177* \param demod demod instance
@@ -11234,7 +11234,7 @@ rw_error:
11234 11234
11235/*============================================================================*/ 11235/*============================================================================*/
11236 11236
11237/** 11237/*
11238* \fn int ctrl_set_cfg_afe_gain() 11238* \fn int ctrl_set_cfg_afe_gain()
11239* \brief Set AFE Gain. 11239* \brief Set AFE Gain.
11240* \param demod demod instance 11240* \param demod demod instance
@@ -11324,7 +11324,7 @@ static int drx_ctrl_u_code(struct drx_demod_instance *demod,
11324 enum drxu_code_action action); 11324 enum drxu_code_action action);
11325static int drxj_set_lna_state(struct drx_demod_instance *demod, bool state); 11325static int drxj_set_lna_state(struct drx_demod_instance *demod, bool state);
11326 11326
11327/** 11327/*
11328* \fn drxj_open() 11328* \fn drxj_open()
11329* \brief Open the demod instance, configure device, configure drxdriver 11329* \brief Open the demod instance, configure device, configure drxdriver
11330* \return Status_t Return status. 11330* \return Status_t Return status.
@@ -11543,7 +11543,7 @@ rw_error:
11543} 11543}
11544 11544
11545/*============================================================================*/ 11545/*============================================================================*/
11546/** 11546/*
11547* \fn drxj_close() 11547* \fn drxj_close()
11548* \brief Close the demod instance, power down the device 11548* \brief Close the demod instance, power down the device
11549* \return Status_t Return status. 11549* \return Status_t Return status.
@@ -11594,7 +11594,7 @@ rw_error:
11594 * Microcode related functions 11594 * Microcode related functions
11595 */ 11595 */
11596 11596
11597/** 11597/*
11598 * drx_u_code_compute_crc - Compute CRC of block of microcode data. 11598 * drx_u_code_compute_crc - Compute CRC of block of microcode data.
11599 * @block_data: Pointer to microcode data. 11599 * @block_data: Pointer to microcode data.
11600 * @nr_words: Size of microcode block (number of 16 bits words). 11600 * @nr_words: Size of microcode block (number of 16 bits words).
@@ -11622,7 +11622,7 @@ static u16 drx_u_code_compute_crc(u8 *block_data, u16 nr_words)
11622 return (u16)(crc_word >> 16); 11622 return (u16)(crc_word >> 16);
11623} 11623}
11624 11624
11625/** 11625/*
11626 * drx_check_firmware - checks if the loaded firmware is valid 11626 * drx_check_firmware - checks if the loaded firmware is valid
11627 * 11627 *
11628 * @demod: demod structure 11628 * @demod: demod structure
@@ -11708,7 +11708,7 @@ eof:
11708 return -EINVAL; 11708 return -EINVAL;
11709} 11709}
11710 11710
11711/** 11711/*
11712 * drx_ctrl_u_code - Handle microcode upload or verify. 11712 * drx_ctrl_u_code - Handle microcode upload or verify.
11713 * @dev_addr: Address of device. 11713 * @dev_addr: Address of device.
11714 * @mc_info: Pointer to information about microcode data. 11714 * @mc_info: Pointer to information about microcode data.
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.h b/drivers/media/dvb-frontends/drx39xyj/drxj.h
index 6c5b8f78f9f6..d3ee1c23bb2f 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.h
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.h
@@ -69,15 +69,15 @@ TYPEDEFS
69 69
70 struct drxjscu_cmd { 70 struct drxjscu_cmd {
71 u16 command; 71 u16 command;
72 /**< Command number */ 72 /*< Command number */
73 u16 parameter_len; 73 u16 parameter_len;
74 /**< Data length in byte */ 74 /*< Data length in byte */
75 u16 result_len; 75 u16 result_len;
76 /**< result length in byte */ 76 /*< result length in byte */
77 u16 *parameter; 77 u16 *parameter;
78 /**< General purpous param */ 78 /*< General purpous param */
79 u16 *result; 79 u16 *result;
80 /**< General purpous param */}; 80 /*< General purpous param */};
81 81
82/*============================================================================*/ 82/*============================================================================*/
83/*============================================================================*/ 83/*============================================================================*/
@@ -130,7 +130,7 @@ TYPEDEFS
130 130
131 DRXJ_CFG_MAX /* dummy, never to be used */}; 131 DRXJ_CFG_MAX /* dummy, never to be used */};
132 132
133/** 133/*
134* /struct enum drxj_cfg_smart_ant_io * smart antenna i/o. 134* /struct enum drxj_cfg_smart_ant_io * smart antenna i/o.
135*/ 135*/
136enum drxj_cfg_smart_ant_io { 136enum drxj_cfg_smart_ant_io {
@@ -138,7 +138,7 @@ enum drxj_cfg_smart_ant_io {
138 DRXJ_SMT_ANT_INPUT 138 DRXJ_SMT_ANT_INPUT
139}; 139};
140 140
141/** 141/*
142* /struct struct drxj_cfg_smart_ant * Set smart antenna. 142* /struct struct drxj_cfg_smart_ant * Set smart antenna.
143*/ 143*/
144 struct drxj_cfg_smart_ant { 144 struct drxj_cfg_smart_ant {
@@ -146,7 +146,7 @@ enum drxj_cfg_smart_ant_io {
146 u16 ctrl_data; 146 u16 ctrl_data;
147 }; 147 };
148 148
149/** 149/*
150* /struct DRXJAGCSTATUS_t 150* /struct DRXJAGCSTATUS_t
151* AGC status information from the DRXJ-IQM-AF. 151* AGC status information from the DRXJ-IQM-AF.
152*/ 152*/
@@ -158,7 +158,7 @@ struct drxj_agc_status {
158 158
159/* DRXJ_CFG_AGC_RF, DRXJ_CFG_AGC_IF */ 159/* DRXJ_CFG_AGC_RF, DRXJ_CFG_AGC_IF */
160 160
161/** 161/*
162* /struct enum drxj_agc_ctrl_mode * Available AGCs modes in the DRXJ. 162* /struct enum drxj_agc_ctrl_mode * Available AGCs modes in the DRXJ.
163*/ 163*/
164 enum drxj_agc_ctrl_mode { 164 enum drxj_agc_ctrl_mode {
@@ -166,7 +166,7 @@ struct drxj_agc_status {
166 DRX_AGC_CTRL_USER, 166 DRX_AGC_CTRL_USER,
167 DRX_AGC_CTRL_OFF}; 167 DRX_AGC_CTRL_OFF};
168 168
169/** 169/*
170* /struct struct drxj_cfg_agc * Generic interface for all AGCs present on the DRXJ. 170* /struct struct drxj_cfg_agc * Generic interface for all AGCs present on the DRXJ.
171*/ 171*/
172 struct drxj_cfg_agc { 172 struct drxj_cfg_agc {
@@ -182,7 +182,7 @@ struct drxj_agc_status {
182 182
183/* DRXJ_CFG_PRE_SAW */ 183/* DRXJ_CFG_PRE_SAW */
184 184
185/** 185/*
186* /struct struct drxj_cfg_pre_saw * Interface to configure pre SAW sense. 186* /struct struct drxj_cfg_pre_saw * Interface to configure pre SAW sense.
187*/ 187*/
188 struct drxj_cfg_pre_saw { 188 struct drxj_cfg_pre_saw {
@@ -192,14 +192,14 @@ struct drxj_agc_status {
192 192
193/* DRXJ_CFG_AFE_GAIN */ 193/* DRXJ_CFG_AFE_GAIN */
194 194
195/** 195/*
196* /struct struct drxj_cfg_afe_gain * Interface to configure gain of AFE (LNA + PGA). 196* /struct struct drxj_cfg_afe_gain * Interface to configure gain of AFE (LNA + PGA).
197*/ 197*/
198 struct drxj_cfg_afe_gain { 198 struct drxj_cfg_afe_gain {
199 enum drx_standard standard; /* standard to which these settings apply */ 199 enum drx_standard standard; /* standard to which these settings apply */
200 u16 gain; /* gain in 0.1 dB steps, DRXJ range 140 .. 335 */}; 200 u16 gain; /* gain in 0.1 dB steps, DRXJ range 140 .. 335 */};
201 201
202/** 202/*
203* /struct drxjrs_errors 203* /struct drxjrs_errors
204* Available failure information in DRXJ_FEC_RS. 204* Available failure information in DRXJ_FEC_RS.
205* 205*
@@ -208,25 +208,25 @@ struct drxj_agc_status {
208*/ 208*/
209 struct drxjrs_errors { 209 struct drxjrs_errors {
210 u16 nr_bit_errors; 210 u16 nr_bit_errors;
211 /**< no of pre RS bit errors */ 211 /*< no of pre RS bit errors */
212 u16 nr_symbol_errors; 212 u16 nr_symbol_errors;
213 /**< no of pre RS symbol errors */ 213 /*< no of pre RS symbol errors */
214 u16 nr_packet_errors; 214 u16 nr_packet_errors;
215 /**< no of pre RS packet errors */ 215 /*< no of pre RS packet errors */
216 u16 nr_failures; 216 u16 nr_failures;
217 /**< no of post RS failures to decode */ 217 /*< no of post RS failures to decode */
218 u16 nr_snc_par_fail_count; 218 u16 nr_snc_par_fail_count;
219 /**< no of post RS bit erros */ 219 /*< no of post RS bit erros */
220 }; 220 };
221 221
222/** 222/*
223* /struct struct drxj_cfg_vsb_misc * symbol error rate 223* /struct struct drxj_cfg_vsb_misc * symbol error rate
224*/ 224*/
225 struct drxj_cfg_vsb_misc { 225 struct drxj_cfg_vsb_misc {
226 u32 symb_error; 226 u32 symb_error;
227 /**< symbol error rate sps */}; 227 /*< symbol error rate sps */};
228 228
229/** 229/*
230* /enum enum drxj_mpeg_output_clock_rate * Mpeg output clock rate. 230* /enum enum drxj_mpeg_output_clock_rate * Mpeg output clock rate.
231* 231*
232*/ 232*/
@@ -234,7 +234,7 @@ struct drxj_agc_status {
234 DRXJ_MPEG_START_WIDTH_1CLKCYC, 234 DRXJ_MPEG_START_WIDTH_1CLKCYC,
235 DRXJ_MPEG_START_WIDTH_8CLKCYC}; 235 DRXJ_MPEG_START_WIDTH_8CLKCYC};
236 236
237/** 237/*
238* /enum enum drxj_mpeg_output_clock_rate * Mpeg output clock rate. 238* /enum enum drxj_mpeg_output_clock_rate * Mpeg output clock rate.
239* 239*
240*/ 240*/
@@ -247,20 +247,20 @@ struct drxj_agc_status {
247 DRXJ_MPEGOUTPUT_CLOCK_RATE_25313K, 247 DRXJ_MPEGOUTPUT_CLOCK_RATE_25313K,
248 DRXJ_MPEGOUTPUT_CLOCK_RATE_21696K}; 248 DRXJ_MPEGOUTPUT_CLOCK_RATE_21696K};
249 249
250/** 250/*
251* /struct DRXJCfgMisc_t 251* /struct DRXJCfgMisc_t
252* Change TEI bit of MPEG output 252* Change TEI bit of MPEG output
253* reverse MPEG output bit order 253* reverse MPEG output bit order
254* set MPEG output clock rate 254* set MPEG output clock rate
255*/ 255*/
256 struct drxj_cfg_mpeg_output_misc { 256 struct drxj_cfg_mpeg_output_misc {
257 bool disable_tei_handling; /**< if true pass (not change) TEI bit */ 257 bool disable_tei_handling; /*< if true pass (not change) TEI bit */
258 bool bit_reverse_mpeg_outout; /**< if true, parallel: msb on MD0; serial: lsb out first */ 258 bool bit_reverse_mpeg_outout; /*< if true, parallel: msb on MD0; serial: lsb out first */
259 enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate; 259 enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate;
260 /**< set MPEG output clock rate that overwirtes the derived one from symbol rate */ 260 /*< set MPEG output clock rate that overwirtes the derived one from symbol rate */
261 enum drxj_mpeg_start_width mpeg_start_width; /**< set MPEG output start width */}; 261 enum drxj_mpeg_start_width mpeg_start_width; /*< set MPEG output start width */};
262 262
263/** 263/*
264* /enum enum drxj_xtal_freq * Supported external crystal reference frequency. 264* /enum enum drxj_xtal_freq * Supported external crystal reference frequency.
265*/ 265*/
266 enum drxj_xtal_freq { 266 enum drxj_xtal_freq {
@@ -269,21 +269,21 @@ struct drxj_agc_status {
269 DRXJ_XTAL_FREQ_20P25MHZ, 269 DRXJ_XTAL_FREQ_20P25MHZ,
270 DRXJ_XTAL_FREQ_4MHZ}; 270 DRXJ_XTAL_FREQ_4MHZ};
271 271
272/** 272/*
273* /enum enum drxj_xtal_freq * Supported external crystal reference frequency. 273* /enum enum drxj_xtal_freq * Supported external crystal reference frequency.
274*/ 274*/
275 enum drxji2c_speed { 275 enum drxji2c_speed {
276 DRXJ_I2C_SPEED_400KBPS, 276 DRXJ_I2C_SPEED_400KBPS,
277 DRXJ_I2C_SPEED_100KBPS}; 277 DRXJ_I2C_SPEED_100KBPS};
278 278
279/** 279/*
280* /struct struct drxj_cfg_hw_cfg * Get hw configuration, such as crystal reference frequency, I2C speed, etc... 280* /struct struct drxj_cfg_hw_cfg * Get hw configuration, such as crystal reference frequency, I2C speed, etc...
281*/ 281*/
282 struct drxj_cfg_hw_cfg { 282 struct drxj_cfg_hw_cfg {
283 enum drxj_xtal_freq xtal_freq; 283 enum drxj_xtal_freq xtal_freq;
284 /**< crystal reference frequency */ 284 /*< crystal reference frequency */
285 enum drxji2c_speed i2c_speed; 285 enum drxji2c_speed i2c_speed;
286 /**< 100 or 400 kbps */}; 286 /*< 100 or 400 kbps */};
287 287
288/* 288/*
289 * DRXJ_CFG_ATV_MISC 289 * DRXJ_CFG_ATV_MISC
@@ -352,7 +352,7 @@ struct drxj_cfg_oob_misc {
352 * DRXJ_CFG_ATV_OUTPUT 352 * DRXJ_CFG_ATV_OUTPUT
353 */ 353 */
354 354
355/** 355/*
356* /enum DRXJAttenuation_t 356* /enum DRXJAttenuation_t
357* Attenuation setting for SIF AGC. 357* Attenuation setting for SIF AGC.
358* 358*
@@ -363,7 +363,7 @@ struct drxj_cfg_oob_misc {
363 DRXJ_SIF_ATTENUATION_6DB, 363 DRXJ_SIF_ATTENUATION_6DB,
364 DRXJ_SIF_ATTENUATION_9DB}; 364 DRXJ_SIF_ATTENUATION_9DB};
365 365
366/** 366/*
367* /struct struct drxj_cfg_atv_output * SIF attenuation setting. 367* /struct struct drxj_cfg_atv_output * SIF attenuation setting.
368* 368*
369*/ 369*/
@@ -398,7 +398,7 @@ struct drxj_cfg_atv_output {
398/*============================================================================*/ 398/*============================================================================*/
399 399
400/*========================================*/ 400/*========================================*/
401/** 401/*
402* /struct struct drxj_data * DRXJ specific attributes. 402* /struct struct drxj_data * DRXJ specific attributes.
403* 403*
404* Global data container for DRXJ specific data. 404* Global data container for DRXJ specific data.
@@ -406,93 +406,93 @@ struct drxj_cfg_atv_output {
406*/ 406*/
407 struct drxj_data { 407 struct drxj_data {
408 /* device capabilties (determined during drx_open()) */ 408 /* device capabilties (determined during drx_open()) */
409 bool has_lna; /**< true if LNA (aka PGA) present */ 409 bool has_lna; /*< true if LNA (aka PGA) present */
410 bool has_oob; /**< true if OOB supported */ 410 bool has_oob; /*< true if OOB supported */
411 bool has_ntsc; /**< true if NTSC supported */ 411 bool has_ntsc; /*< true if NTSC supported */
412 bool has_btsc; /**< true if BTSC supported */ 412 bool has_btsc; /*< true if BTSC supported */
413 bool has_smatx; /**< true if mat_tx is available */ 413 bool has_smatx; /*< true if mat_tx is available */
414 bool has_smarx; /**< true if mat_rx is available */ 414 bool has_smarx; /*< true if mat_rx is available */
415 bool has_gpio; /**< true if GPIO is available */ 415 bool has_gpio; /*< true if GPIO is available */
416 bool has_irqn; /**< true if IRQN is available */ 416 bool has_irqn; /*< true if IRQN is available */
417 /* A1/A2/A... */ 417 /* A1/A2/A... */
418 u8 mfx; /**< metal fix */ 418 u8 mfx; /*< metal fix */
419 419
420 /* tuner settings */ 420 /* tuner settings */
421 bool mirror_freq_spect_oob;/**< tuner inversion (true = tuner mirrors the signal */ 421 bool mirror_freq_spect_oob;/*< tuner inversion (true = tuner mirrors the signal */
422 422
423 /* standard/channel settings */ 423 /* standard/channel settings */
424 enum drx_standard standard; /**< current standard information */ 424 enum drx_standard standard; /*< current standard information */
425 enum drx_modulation constellation; 425 enum drx_modulation constellation;
426 /**< current constellation */ 426 /*< current constellation */
427 s32 frequency; /**< center signal frequency in KHz */ 427 s32 frequency; /*< center signal frequency in KHz */
428 enum drx_bandwidth curr_bandwidth; 428 enum drx_bandwidth curr_bandwidth;
429 /**< current channel bandwidth */ 429 /*< current channel bandwidth */
430 enum drx_mirror mirror; /**< current channel mirror */ 430 enum drx_mirror mirror; /*< current channel mirror */
431 431
432 /* signal quality information */ 432 /* signal quality information */
433 u32 fec_bits_desired; /**< BER accounting period */ 433 u32 fec_bits_desired; /*< BER accounting period */
434 u16 fec_vd_plen; /**< no of trellis symbols: VD SER measurement period */ 434 u16 fec_vd_plen; /*< no of trellis symbols: VD SER measurement period */
435 u16 qam_vd_prescale; /**< Viterbi Measurement Prescale */ 435 u16 qam_vd_prescale; /*< Viterbi Measurement Prescale */
436 u16 qam_vd_period; /**< Viterbi Measurement period */ 436 u16 qam_vd_period; /*< Viterbi Measurement period */
437 u16 fec_rs_plen; /**< defines RS BER measurement period */ 437 u16 fec_rs_plen; /*< defines RS BER measurement period */
438 u16 fec_rs_prescale; /**< ReedSolomon Measurement Prescale */ 438 u16 fec_rs_prescale; /*< ReedSolomon Measurement Prescale */
439 u16 fec_rs_period; /**< ReedSolomon Measurement period */ 439 u16 fec_rs_period; /*< ReedSolomon Measurement period */
440 bool reset_pkt_err_acc; /**< Set a flag to reset accumulated packet error */ 440 bool reset_pkt_err_acc; /*< Set a flag to reset accumulated packet error */
441 u16 pkt_err_acc_start; /**< Set a flag to reset accumulated packet error */ 441 u16 pkt_err_acc_start; /*< Set a flag to reset accumulated packet error */
442 442
443 /* HI configuration */ 443 /* HI configuration */
444 u16 hi_cfg_timing_div; /**< HI Configure() parameter 2 */ 444 u16 hi_cfg_timing_div; /*< HI Configure() parameter 2 */
445 u16 hi_cfg_bridge_delay; /**< HI Configure() parameter 3 */ 445 u16 hi_cfg_bridge_delay; /*< HI Configure() parameter 3 */
446 u16 hi_cfg_wake_up_key; /**< HI Configure() parameter 4 */ 446 u16 hi_cfg_wake_up_key; /*< HI Configure() parameter 4 */
447 u16 hi_cfg_ctrl; /**< HI Configure() parameter 5 */ 447 u16 hi_cfg_ctrl; /*< HI Configure() parameter 5 */
448 u16 hi_cfg_transmit; /**< HI Configure() parameter 6 */ 448 u16 hi_cfg_transmit; /*< HI Configure() parameter 6 */
449 449
450 /* UIO configuration */ 450 /* UIO configuration */
451 enum drxuio_mode uio_sma_rx_mode;/**< current mode of SmaRx pin */ 451 enum drxuio_mode uio_sma_rx_mode;/*< current mode of SmaRx pin */
452 enum drxuio_mode uio_sma_tx_mode;/**< current mode of SmaTx pin */ 452 enum drxuio_mode uio_sma_tx_mode;/*< current mode of SmaTx pin */
453 enum drxuio_mode uio_gpio_mode; /**< current mode of ASEL pin */ 453 enum drxuio_mode uio_gpio_mode; /*< current mode of ASEL pin */
454 enum drxuio_mode uio_irqn_mode; /**< current mode of IRQN pin */ 454 enum drxuio_mode uio_irqn_mode; /*< current mode of IRQN pin */
455 455
456 /* IQM fs frequecy shift and inversion */ 456 /* IQM fs frequecy shift and inversion */
457 u32 iqm_fs_rate_ofs; /**< frequency shifter setting after setchannel */ 457 u32 iqm_fs_rate_ofs; /*< frequency shifter setting after setchannel */
458 bool pos_image; /**< Ture: positive image */ 458 bool pos_image; /*< Ture: positive image */
459 /* IQM RC frequecy shift */ 459 /* IQM RC frequecy shift */
460 u32 iqm_rc_rate_ofs; /**< frequency shifter setting after setchannel */ 460 u32 iqm_rc_rate_ofs; /*< frequency shifter setting after setchannel */
461 461
462 /* ATV configuration */ 462 /* ATV configuration */
463 u32 atv_cfg_changed_flags; /**< flag: flags cfg changes */ 463 u32 atv_cfg_changed_flags; /*< flag: flags cfg changes */
464 s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU0__A */ 464 s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU0__A */
465 s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU1__A */ 465 s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU1__A */
466 s16 atv_top_equ2[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU2__A */ 466 s16 atv_top_equ2[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU2__A */
467 s16 atv_top_equ3[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU3__A */ 467 s16 atv_top_equ3[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU3__A */
468 bool phase_correction_bypass;/**< flag: true=bypass */ 468 bool phase_correction_bypass;/*< flag: true=bypass */
469 s16 atv_top_vid_peak; /**< shadow of ATV_TOP_VID_PEAK__A */ 469 s16 atv_top_vid_peak; /*< shadow of ATV_TOP_VID_PEAK__A */
470 u16 atv_top_noise_th; /**< shadow of ATV_TOP_NOISE_TH__A */ 470 u16 atv_top_noise_th; /*< shadow of ATV_TOP_NOISE_TH__A */
471 bool enable_cvbs_output; /**< flag CVBS ouput enable */ 471 bool enable_cvbs_output; /*< flag CVBS ouput enable */
472 bool enable_sif_output; /**< flag SIF ouput enable */ 472 bool enable_sif_output; /*< flag SIF ouput enable */
473 enum drxjsif_attenuation sif_attenuation; 473 enum drxjsif_attenuation sif_attenuation;
474 /**< current SIF att setting */ 474 /*< current SIF att setting */
475 /* Agc configuration for QAM and VSB */ 475 /* Agc configuration for QAM and VSB */
476 struct drxj_cfg_agc qam_rf_agc_cfg; /**< qam RF AGC config */ 476 struct drxj_cfg_agc qam_rf_agc_cfg; /*< qam RF AGC config */
477 struct drxj_cfg_agc qam_if_agc_cfg; /**< qam IF AGC config */ 477 struct drxj_cfg_agc qam_if_agc_cfg; /*< qam IF AGC config */
478 struct drxj_cfg_agc vsb_rf_agc_cfg; /**< vsb RF AGC config */ 478 struct drxj_cfg_agc vsb_rf_agc_cfg; /*< vsb RF AGC config */
479 struct drxj_cfg_agc vsb_if_agc_cfg; /**< vsb IF AGC config */ 479 struct drxj_cfg_agc vsb_if_agc_cfg; /*< vsb IF AGC config */
480 480
481 /* PGA gain configuration for QAM and VSB */ 481 /* PGA gain configuration for QAM and VSB */
482 u16 qam_pga_cfg; /**< qam PGA config */ 482 u16 qam_pga_cfg; /*< qam PGA config */
483 u16 vsb_pga_cfg; /**< vsb PGA config */ 483 u16 vsb_pga_cfg; /*< vsb PGA config */
484 484
485 /* Pre SAW configuration for QAM and VSB */ 485 /* Pre SAW configuration for QAM and VSB */
486 struct drxj_cfg_pre_saw qam_pre_saw_cfg; 486 struct drxj_cfg_pre_saw qam_pre_saw_cfg;
487 /**< qam pre SAW config */ 487 /*< qam pre SAW config */
488 struct drxj_cfg_pre_saw vsb_pre_saw_cfg; 488 struct drxj_cfg_pre_saw vsb_pre_saw_cfg;
489 /**< qam pre SAW config */ 489 /*< qam pre SAW config */
490 490
491 /* Version information */ 491 /* Version information */
492 char v_text[2][12]; /**< allocated text versions */ 492 char v_text[2][12]; /*< allocated text versions */
493 struct drx_version v_version[2]; /**< allocated versions structs */ 493 struct drx_version v_version[2]; /*< allocated versions structs */
494 struct drx_version_list v_list_elements[2]; 494 struct drx_version_list v_list_elements[2];
495 /**< allocated version list */ 495 /*< allocated version list */
496 496
497 /* smart antenna configuration */ 497 /* smart antenna configuration */
498 bool smart_ant_inverted; 498 bool smart_ant_inverted;
@@ -502,25 +502,25 @@ struct drxj_cfg_atv_output {
502 bool oob_power_on; 502 bool oob_power_on;
503 503
504 /* MPEG static bitrate setting */ 504 /* MPEG static bitrate setting */
505 u32 mpeg_ts_static_bitrate; /**< bitrate static MPEG output */ 505 u32 mpeg_ts_static_bitrate; /*< bitrate static MPEG output */
506 bool disable_te_ihandling; /**< MPEG TS TEI handling */ 506 bool disable_te_ihandling; /*< MPEG TS TEI handling */
507 bool bit_reverse_mpeg_outout;/**< MPEG output bit order */ 507 bool bit_reverse_mpeg_outout;/*< MPEG output bit order */
508 enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate; 508 enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate;
509 /**< MPEG output clock rate */ 509 /*< MPEG output clock rate */
510 enum drxj_mpeg_start_width mpeg_start_width; 510 enum drxj_mpeg_start_width mpeg_start_width;
511 /**< MPEG Start width */ 511 /*< MPEG Start width */
512 512
513 /* Pre SAW & Agc configuration for ATV */ 513 /* Pre SAW & Agc configuration for ATV */
514 struct drxj_cfg_pre_saw atv_pre_saw_cfg; 514 struct drxj_cfg_pre_saw atv_pre_saw_cfg;
515 /**< atv pre SAW config */ 515 /*< atv pre SAW config */
516 struct drxj_cfg_agc atv_rf_agc_cfg; /**< atv RF AGC config */ 516 struct drxj_cfg_agc atv_rf_agc_cfg; /*< atv RF AGC config */
517 struct drxj_cfg_agc atv_if_agc_cfg; /**< atv IF AGC config */ 517 struct drxj_cfg_agc atv_if_agc_cfg; /*< atv IF AGC config */
518 u16 atv_pga_cfg; /**< atv pga config */ 518 u16 atv_pga_cfg; /*< atv pga config */
519 519
520 u32 curr_symbol_rate; 520 u32 curr_symbol_rate;
521 521
522 /* pin-safe mode */ 522 /* pin-safe mode */
523 bool pdr_safe_mode; /**< PDR safe mode activated */ 523 bool pdr_safe_mode; /*< PDR safe mode activated */
524 u16 pdr_safe_restore_val_gpio; 524 u16 pdr_safe_restore_val_gpio;
525 u16 pdr_safe_restore_val_v_sync; 525 u16 pdr_safe_restore_val_v_sync;
526 u16 pdr_safe_restore_val_sma_rx; 526 u16 pdr_safe_restore_val_sma_rx;
@@ -531,12 +531,12 @@ struct drxj_cfg_atv_output {
531 enum drxj_cfg_oob_lo_power oob_lo_pow; 531 enum drxj_cfg_oob_lo_power oob_lo_pow;
532 532
533 struct drx_aud_data aud_data; 533 struct drx_aud_data aud_data;
534 /**< audio storage */}; 534 /*< audio storage */};
535 535
536/*------------------------------------------------------------------------- 536/*-------------------------------------------------------------------------
537Access MACROS 537Access MACROS
538-------------------------------------------------------------------------*/ 538-------------------------------------------------------------------------*/
539/** 539/*
540* \brief Compilable references to attributes 540* \brief Compilable references to attributes
541* \param d pointer to demod instance 541* \param d pointer to demod instance
542* 542*
@@ -554,7 +554,7 @@ Access MACROS
554DEFINES 554DEFINES
555-------------------------------------------------------------------------*/ 555-------------------------------------------------------------------------*/
556 556
557/** 557/*
558* \def DRXJ_NTSC_CARRIER_FREQ_OFFSET 558* \def DRXJ_NTSC_CARRIER_FREQ_OFFSET
559* \brief Offset from picture carrier to centre frequency in kHz, in RF domain 559* \brief Offset from picture carrier to centre frequency in kHz, in RF domain
560* 560*
@@ -569,7 +569,7 @@ DEFINES
569*/ 569*/
570#define DRXJ_NTSC_CARRIER_FREQ_OFFSET ((s32)(1750)) 570#define DRXJ_NTSC_CARRIER_FREQ_OFFSET ((s32)(1750))
571 571
572/** 572/*
573* \def DRXJ_PAL_SECAM_BG_CARRIER_FREQ_OFFSET 573* \def DRXJ_PAL_SECAM_BG_CARRIER_FREQ_OFFSET
574* \brief Offset from picture carrier to centre frequency in kHz, in RF domain 574* \brief Offset from picture carrier to centre frequency in kHz, in RF domain
575* 575*
@@ -585,7 +585,7 @@ DEFINES
585*/ 585*/
586#define DRXJ_PAL_SECAM_BG_CARRIER_FREQ_OFFSET ((s32)(2375)) 586#define DRXJ_PAL_SECAM_BG_CARRIER_FREQ_OFFSET ((s32)(2375))
587 587
588/** 588/*
589* \def DRXJ_PAL_SECAM_DKIL_CARRIER_FREQ_OFFSET 589* \def DRXJ_PAL_SECAM_DKIL_CARRIER_FREQ_OFFSET
590* \brief Offset from picture carrier to centre frequency in kHz, in RF domain 590* \brief Offset from picture carrier to centre frequency in kHz, in RF domain
591* 591*
@@ -601,7 +601,7 @@ DEFINES
601*/ 601*/
602#define DRXJ_PAL_SECAM_DKIL_CARRIER_FREQ_OFFSET ((s32)(2775)) 602#define DRXJ_PAL_SECAM_DKIL_CARRIER_FREQ_OFFSET ((s32)(2775))
603 603
604/** 604/*
605* \def DRXJ_PAL_SECAM_LP_CARRIER_FREQ_OFFSET 605* \def DRXJ_PAL_SECAM_LP_CARRIER_FREQ_OFFSET
606* \brief Offset from picture carrier to centre frequency in kHz, in RF domain 606* \brief Offset from picture carrier to centre frequency in kHz, in RF domain
607* 607*
@@ -616,7 +616,7 @@ DEFINES
616*/ 616*/
617#define DRXJ_PAL_SECAM_LP_CARRIER_FREQ_OFFSET ((s32)(-3255)) 617#define DRXJ_PAL_SECAM_LP_CARRIER_FREQ_OFFSET ((s32)(-3255))
618 618
619/** 619/*
620* \def DRXJ_FM_CARRIER_FREQ_OFFSET 620* \def DRXJ_FM_CARRIER_FREQ_OFFSET
621* \brief Offset from sound carrier to centre frequency in kHz, in RF domain 621* \brief Offset from sound carrier to centre frequency in kHz, in RF domain
622* 622*
diff --git a/drivers/media/dvb-frontends/drxk.h b/drivers/media/dvb-frontends/drxk.h
index eb9bdc9f59c4..b16fedbb53a3 100644
--- a/drivers/media/dvb-frontends/drxk.h
+++ b/drivers/media/dvb-frontends/drxk.h
@@ -20,17 +20,18 @@
20 * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1 20 * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1
21 * means that 1=DVBC, 0 = DVBT. Zero means the opposite. 21 * means that 1=DVBC, 0 = DVBT. Zero means the opposite.
22 * @mpeg_out_clk_strength: DRXK Mpeg output clock drive strength. 22 * @mpeg_out_clk_strength: DRXK Mpeg output clock drive strength.
23 * @chunk_size: maximum size for I2C messages
23 * @microcode_name: Name of the firmware file with the microcode 24 * @microcode_name: Name of the firmware file with the microcode
24 * @qam_demod_parameter_count: The number of parameters used for the command 25 * @qam_demod_parameter_count: The number of parameters used for the command
25 * to set the demodulator parameters. All 26 * to set the demodulator parameters. All
26 * firmwares are using the 2-parameter commmand. 27 * firmwares are using the 2-parameter commmand.
27 * An exception is the "drxk_a3.mc" firmware, 28 * An exception is the ``drxk_a3.mc`` firmware,
28 * which uses the 4-parameter command. 29 * which uses the 4-parameter command.
29 * A value of 0 (default) or lower indicates that 30 * A value of 0 (default) or lower indicates that
30 * the correct number of parameters will be 31 * the correct number of parameters will be
31 * automatically detected. 32 * automatically detected.
32 * 33 *
33 * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is 34 * On the ``*_gpio`` vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
34 * UIO-3. 35 * UIO-3.
35 */ 36 */
36struct drxk_config { 37struct drxk_config {
@@ -52,6 +53,14 @@ struct drxk_config {
52}; 53};
53 54
54#if IS_REACHABLE(CONFIG_DVB_DRXK) 55#if IS_REACHABLE(CONFIG_DVB_DRXK)
56/**
57 * Attach a drxk demod
58 *
59 * @config: pointer to &struct drxk_config with demod configuration.
60 * @i2c: i2c adapter to use.
61 *
62 * return: FE pointer on success, NULL on failure.
63 */
55extern struct dvb_frontend *drxk_attach(const struct drxk_config *config, 64extern struct dvb_frontend *drxk_attach(const struct drxk_config *config,
56 struct i2c_adapter *i2c); 65 struct i2c_adapter *i2c);
57#else 66#else
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c
index 48a8aad47a74..f59ac2e91c59 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -207,9 +207,9 @@ static inline u32 log10times100(u32 value)
207 return (100L * intlog10(value)) >> 24; 207 return (100L * intlog10(value)) >> 24;
208} 208}
209 209
210/****************************************************************************/ 210/***************************************************************************/
211/* I2C **********************************************************************/ 211/* I2C **********************************************************************/
212/****************************************************************************/ 212/***************************************************************************/
213 213
214static int drxk_i2c_lock(struct drxk_state *state) 214static int drxk_i2c_lock(struct drxk_state *state)
215{ 215{
@@ -3444,7 +3444,7 @@ error:
3444 3444
3445/*============================================================================*/ 3445/*============================================================================*/
3446 3446
3447/** 3447/*
3448* \brief Activate DVBT specific presets 3448* \brief Activate DVBT specific presets
3449* \param demod instance of demodulator. 3449* \param demod instance of demodulator.
3450* \return DRXStatus_t. 3450* \return DRXStatus_t.
@@ -3484,7 +3484,7 @@ error:
3484 3484
3485/*============================================================================*/ 3485/*============================================================================*/
3486 3486
3487/** 3487/*
3488* \brief Initialize channelswitch-independent settings for DVBT. 3488* \brief Initialize channelswitch-independent settings for DVBT.
3489* \param demod instance of demodulator. 3489* \param demod instance of demodulator.
3490* \return DRXStatus_t. 3490* \return DRXStatus_t.
@@ -3696,7 +3696,7 @@ error:
3696} 3696}
3697 3697
3698/*============================================================================*/ 3698/*============================================================================*/
3699/** 3699/*
3700* \brief start dvbt demodulating for channel. 3700* \brief start dvbt demodulating for channel.
3701* \param demod instance of demodulator. 3701* \param demod instance of demodulator.
3702* \return DRXStatus_t. 3702* \return DRXStatus_t.
@@ -3732,7 +3732,7 @@ error:
3732 3732
3733/*============================================================================*/ 3733/*============================================================================*/
3734 3734
3735/** 3735/*
3736* \brief Set up dvbt demodulator for channel. 3736* \brief Set up dvbt demodulator for channel.
3737* \param demod instance of demodulator. 3737* \param demod instance of demodulator.
3738* \return DRXStatus_t. 3738* \return DRXStatus_t.
@@ -4086,7 +4086,7 @@ error:
4086 4086
4087/*============================================================================*/ 4087/*============================================================================*/
4088 4088
4089/** 4089/*
4090* \brief Retrieve lock status . 4090* \brief Retrieve lock status .
4091* \param demod Pointer to demodulator instance. 4091* \param demod Pointer to demodulator instance.
4092* \param lockStat Pointer to lock status structure. 4092* \param lockStat Pointer to lock status structure.
@@ -4148,7 +4148,7 @@ static int power_up_qam(struct drxk_state *state)
4148} 4148}
4149 4149
4150 4150
4151/** Power Down QAM */ 4151/* Power Down QAM */
4152static int power_down_qam(struct drxk_state *state) 4152static int power_down_qam(struct drxk_state *state)
4153{ 4153{
4154 u16 data = 0; 4154 u16 data = 0;
@@ -4186,7 +4186,7 @@ error:
4186 4186
4187/*============================================================================*/ 4187/*============================================================================*/
4188 4188
4189/** 4189/*
4190* \brief Setup of the QAM Measurement intervals for signal quality 4190* \brief Setup of the QAM Measurement intervals for signal quality
4191* \param demod instance of demod. 4191* \param demod instance of demod.
4192* \param modulation current modulation. 4192* \param modulation current modulation.
@@ -4461,7 +4461,7 @@ error:
4461 4461
4462/*============================================================================*/ 4462/*============================================================================*/
4463 4463
4464/** 4464/*
4465* \brief QAM32 specific setup 4465* \brief QAM32 specific setup
4466* \param demod instance of demod. 4466* \param demod instance of demod.
4467* \return DRXStatus_t. 4467* \return DRXStatus_t.
@@ -4657,7 +4657,7 @@ error:
4657 4657
4658/*============================================================================*/ 4658/*============================================================================*/
4659 4659
4660/** 4660/*
4661* \brief QAM64 specific setup 4661* \brief QAM64 specific setup
4662* \param demod instance of demod. 4662* \param demod instance of demod.
4663* \return DRXStatus_t. 4663* \return DRXStatus_t.
@@ -4852,7 +4852,7 @@ error:
4852 4852
4853/*============================================================================*/ 4853/*============================================================================*/
4854 4854
4855/** 4855/*
4856* \brief QAM128 specific setup 4856* \brief QAM128 specific setup
4857* \param demod: instance of demod. 4857* \param demod: instance of demod.
4858* \return DRXStatus_t. 4858* \return DRXStatus_t.
@@ -5049,7 +5049,7 @@ error:
5049 5049
5050/*============================================================================*/ 5050/*============================================================================*/
5051 5051
5052/** 5052/*
5053* \brief QAM256 specific setup 5053* \brief QAM256 specific setup
5054* \param demod: instance of demod. 5054* \param demod: instance of demod.
5055* \return DRXStatus_t. 5055* \return DRXStatus_t.
@@ -5244,7 +5244,7 @@ error:
5244 5244
5245 5245
5246/*============================================================================*/ 5246/*============================================================================*/
5247/** 5247/*
5248* \brief Reset QAM block. 5248* \brief Reset QAM block.
5249* \param demod: instance of demod. 5249* \param demod: instance of demod.
5250* \param channel: pointer to channel data. 5250* \param channel: pointer to channel data.
@@ -5272,7 +5272,7 @@ error:
5272 5272
5273/*============================================================================*/ 5273/*============================================================================*/
5274 5274
5275/** 5275/*
5276* \brief Set QAM symbolrate. 5276* \brief Set QAM symbolrate.
5277* \param demod: instance of demod. 5277* \param demod: instance of demod.
5278* \param channel: pointer to channel data. 5278* \param channel: pointer to channel data.
@@ -5341,7 +5341,7 @@ error:
5341 5341
5342/*============================================================================*/ 5342/*============================================================================*/
5343 5343
5344/** 5344/*
5345* \brief Get QAM lock status. 5345* \brief Get QAM lock status.
5346* \param demod: instance of demod. 5346* \param demod: instance of demod.
5347* \param channel: pointer to channel data. 5347* \param channel: pointer to channel data.
diff --git a/drivers/media/dvb-frontends/dvb-pll.h b/drivers/media/dvb-frontends/dvb-pll.h
index 6aaa9c6bff9c..212e0730f154 100644
--- a/drivers/media/dvb-frontends/dvb-pll.h
+++ b/drivers/media/dvb-frontends/dvb-pll.h
@@ -30,16 +30,17 @@
30#define DVB_PLL_TDEE4 18 30#define DVB_PLL_TDEE4 18
31#define DVB_PLL_THOMSON_DTT7520X 19 31#define DVB_PLL_THOMSON_DTT7520X 19
32 32
33#if IS_REACHABLE(CONFIG_DVB_PLL)
33/** 34/**
34 * Attach a dvb-pll to the supplied frontend structure. 35 * Attach a dvb-pll to the supplied frontend structure.
35 * 36 *
36 * @param fe Frontend to attach to. 37 * @fe: Frontend to attach to.
37 * @param pll_addr i2c address of the PLL (if used). 38 * @pll_addr: i2c address of the PLL (if used).
38 * @param i2c i2c adapter to use (set to NULL if not used). 39 * @i2c: i2c adapter to use (set to NULL if not used).
39 * @param pll_desc_id dvb_pll_desc to use. 40 * @pll_desc_id: dvb_pll_desc to use.
40 * @return Frontend pointer on success, NULL on failure 41 *
42 * return: Frontend pointer on success, NULL on failure
41 */ 43 */
42#if IS_REACHABLE(CONFIG_DVB_PLL)
43extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, 44extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
44 int pll_addr, 45 int pll_addr,
45 struct i2c_adapter *i2c, 46 struct i2c_adapter *i2c,
diff --git a/drivers/media/dvb-frontends/helene.h b/drivers/media/dvb-frontends/helene.h
index 333615491d9e..c9fc81c7e4e7 100644
--- a/drivers/media/dvb-frontends/helene.h
+++ b/drivers/media/dvb-frontends/helene.h
@@ -38,6 +38,7 @@ enum helene_xtal {
38 * @set_tuner_priv: Callback function private context 38 * @set_tuner_priv: Callback function private context
39 * @set_tuner_callback: Callback function that notifies the parent driver 39 * @set_tuner_callback: Callback function that notifies the parent driver
40 * which tuner is active now 40 * which tuner is active now
41 * @xtal: Cristal frequency as described by &enum helene_xtal
41 */ 42 */
42struct helene_config { 43struct helene_config {
43 u8 i2c_address; 44 u8 i2c_address;
@@ -48,9 +49,31 @@ struct helene_config {
48}; 49};
49 50
50#if IS_REACHABLE(CONFIG_DVB_HELENE) 51#if IS_REACHABLE(CONFIG_DVB_HELENE)
52/**
53 * Attach a helene tuner (terrestrial and cable standards)
54 *
55 * @fe: frontend to be attached
56 * @config: pointer to &struct helene_config with tuner configuration.
57 * @i2c: i2c adapter to use.
58 *
59 * return: FE pointer on success, NULL on failure.
60 */
51extern struct dvb_frontend *helene_attach(struct dvb_frontend *fe, 61extern struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
52 const struct helene_config *config, 62 const struct helene_config *config,
53 struct i2c_adapter *i2c); 63 struct i2c_adapter *i2c);
64
65/**
66 * Attach a helene tuner (satellite standards)
67 *
68 * @fe: frontend to be attached
69 * @config: pointer to &struct helene_config with tuner configuration.
70 * @i2c: i2c adapter to use.
71 *
72 * return: FE pointer on success, NULL on failure.
73 */
74extern struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe,
75 const struct helene_config *config,
76 struct i2c_adapter *i2c);
54#else 77#else
55static inline struct dvb_frontend *helene_attach(struct dvb_frontend *fe, 78static inline struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
56 const struct helene_config *config, 79 const struct helene_config *config,
@@ -59,13 +82,6 @@ static inline struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
59 pr_warn("%s: driver disabled by Kconfig\n", __func__); 82 pr_warn("%s: driver disabled by Kconfig\n", __func__);
60 return NULL; 83 return NULL;
61} 84}
62#endif
63
64#if IS_REACHABLE(CONFIG_DVB_HELENE)
65extern struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe,
66 const struct helene_config *config,
67 struct i2c_adapter *i2c);
68#else
69static inline struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe, 85static inline struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe,
70 const struct helene_config *config, 86 const struct helene_config *config,
71 struct i2c_adapter *i2c) 87 struct i2c_adapter *i2c)
diff --git a/drivers/media/dvb-frontends/horus3a.h b/drivers/media/dvb-frontends/horus3a.h
index 672a556df71a..9157fd037e2f 100644
--- a/drivers/media/dvb-frontends/horus3a.h
+++ b/drivers/media/dvb-frontends/horus3a.h
@@ -41,6 +41,15 @@ struct horus3a_config {
41}; 41};
42 42
43#if IS_REACHABLE(CONFIG_DVB_HORUS3A) 43#if IS_REACHABLE(CONFIG_DVB_HORUS3A)
44/**
45 * Attach a horus3a tuner
46 *
47 * @fe: frontend to be attached
48 * @config: pointer to &struct helene_config with tuner configuration.
49 * @i2c: i2c adapter to use.
50 *
51 * return: FE pointer on success, NULL on failure.
52 */
44extern struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe, 53extern struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,
45 const struct horus3a_config *config, 54 const struct horus3a_config *config,
46 struct i2c_adapter *i2c); 55 struct i2c_adapter *i2c);
diff --git a/drivers/media/dvb-frontends/ix2505v.c b/drivers/media/dvb-frontends/ix2505v.c
index 534b24fa2b95..965012ad5c59 100644
--- a/drivers/media/dvb-frontends/ix2505v.c
+++ b/drivers/media/dvb-frontends/ix2505v.c
@@ -1,4 +1,4 @@
1/** 1/*
2 * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner 2 * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner
3 * 3 *
4 * Copyright (C) 2010 Malcolm Priestley 4 * Copyright (C) 2010 Malcolm Priestley
@@ -36,7 +36,7 @@ struct ix2505v_state {
36 u32 frequency; 36 u32 frequency;
37}; 37};
38 38
39/** 39/*
40 * Data read format of the Sharp IX2505V B0017 40 * Data read format of the Sharp IX2505V B0017
41 * 41 *
42 * byte1: 1 | 1 | 0 | 0 | 0 | MA1 | MA0 | 1 42 * byte1: 1 | 1 | 0 | 0 | 0 | MA1 | MA0 | 1
@@ -99,7 +99,7 @@ static void ix2505v_release(struct dvb_frontend *fe)
99 99
100} 100}
101 101
102/** 102/*
103 * Data write format of the Sharp IX2505V B0017 103 * Data write format of the Sharp IX2505V B0017
104 * 104 *
105 * byte1: 1 | 1 | 0 | 0 | 0 | 0(MA1)| 0(MA0)| 0 105 * byte1: 1 | 1 | 0 | 0 | 0 | 0(MA1)| 0(MA0)| 0
diff --git a/drivers/media/dvb-frontends/ix2505v.h b/drivers/media/dvb-frontends/ix2505v.h
index 0b0a431c74f6..49ed93e754ed 100644
--- a/drivers/media/dvb-frontends/ix2505v.h
+++ b/drivers/media/dvb-frontends/ix2505v.h
@@ -20,31 +20,33 @@
20#include "dvb_frontend.h" 20#include "dvb_frontend.h"
21 21
22/** 22/**
23 * Attach a ix2505v tuner to the supplied frontend structure. 23 * struct ix2505v_config - ix2505 attachment configuration
24 * 24 *
25 * @param fe Frontend to attach to. 25 * @tuner_address: tuner address
26 * @param config ix2505v_config structure 26 * @tuner_gain: Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB
27 * @return FE pointer on success, NULL on failure. 27 * @tuner_chargepump: Charge pump output +/- 0=120 1=260 2=555 3=1200(default)
28 * @min_delay_ms: delay after tune
29 * @tuner_write_only: disables reads
28 */ 30 */
29
30struct ix2505v_config { 31struct ix2505v_config {
31 u8 tuner_address; 32 u8 tuner_address;
32
33 /*Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB */
34 u8 tuner_gain; 33 u8 tuner_gain;
35
36 /*Charge pump output +/- 0=120 1=260 2=555 3=1200(default) */
37 u8 tuner_chargepump; 34 u8 tuner_chargepump;
38
39 /* delay after tune */
40 int min_delay_ms; 35 int min_delay_ms;
41
42 /* disables reads*/
43 u8 tuner_write_only; 36 u8 tuner_write_only;
44 37
45}; 38};
46 39
47#if IS_REACHABLE(CONFIG_DVB_IX2505V) 40#if IS_REACHABLE(CONFIG_DVB_IX2505V)
41/**
42 * Attach a ix2505v tuner to the supplied frontend structure.
43 *
44 * @fe: Frontend to attach to.
45 * @config: pointer to &struct ix2505v_config
46 * @i2c: pointer to &struct i2c_adapter.
47 *
48 * return: FE pointer on success, NULL on failure.
49 */
48extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe, 50extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
49 const struct ix2505v_config *config, struct i2c_adapter *i2c); 51 const struct ix2505v_config *config, struct i2c_adapter *i2c);
50#else 52#else
diff --git a/drivers/media/dvb-frontends/l64781.c b/drivers/media/dvb-frontends/l64781.c
index 68923c84679a..e5a6c1766664 100644
--- a/drivers/media/dvb-frontends/l64781.c
+++ b/drivers/media/dvb-frontends/l64781.c
@@ -517,7 +517,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
517 state->i2c = i2c; 517 state->i2c = i2c;
518 state->first = 1; 518 state->first = 1;
519 519
520 /** 520 /*
521 * the L64781 won't show up before we send the reset_and_configure() 521 * the L64781 won't show up before we send the reset_and_configure()
522 * broadcast. If nothing responds there is no L64781 on the bus... 522 * broadcast. If nothing responds there is no L64781 on the bus...
523 */ 523 */
diff --git a/drivers/media/dvb-frontends/m88ds3103.h b/drivers/media/dvb-frontends/m88ds3103.h
index 04b355a005fb..1a8964a2265d 100644
--- a/drivers/media/dvb-frontends/m88ds3103.h
+++ b/drivers/media/dvb-frontends/m88ds3103.h
@@ -25,6 +25,34 @@
25 */ 25 */
26 26
27/** 27/**
28 * enum m88ds3103_ts_mode - TS connection mode
29 * @M88DS3103_TS_SERIAL: TS output pin D0, normal
30 * @M88DS3103_TS_SERIAL_D7: TS output pin D7
31 * @M88DS3103_TS_PARALLEL: TS Parallel mode
32 * @M88DS3103_TS_CI: TS CI Mode
33 */
34enum m88ds3103_ts_mode {
35 M88DS3103_TS_SERIAL,
36 M88DS3103_TS_SERIAL_D7,
37 M88DS3103_TS_PARALLEL,
38 M88DS3103_TS_CI
39};
40
41/**
42 * enum m88ds3103_clock_out
43 * @M88DS3103_CLOCK_OUT_DISABLED: Clock output is disabled
44 * @M88DS3103_CLOCK_OUT_ENABLED: Clock output is enabled with crystal
45 * clock.
46 * @M88DS3103_CLOCK_OUT_ENABLED_DIV2: Clock output is enabled with half
47 * crystal clock.
48 */
49enum m88ds3103_clock_out {
50 M88DS3103_CLOCK_OUT_DISABLED,
51 M88DS3103_CLOCK_OUT_ENABLED,
52 M88DS3103_CLOCK_OUT_ENABLED_DIV2
53};
54
55/**
28 * struct m88ds3103_platform_data - Platform data for the m88ds3103 driver 56 * struct m88ds3103_platform_data - Platform data for the m88ds3103 driver
29 * @clk: Clock frequency. 57 * @clk: Clock frequency.
30 * @i2c_wr_max: Max bytes I2C adapter can write at once. 58 * @i2c_wr_max: Max bytes I2C adapter can write at once.
@@ -44,24 +72,16 @@
44 * @get_dvb_frontend: Get DVB frontend. 72 * @get_dvb_frontend: Get DVB frontend.
45 * @get_i2c_adapter: Get I2C adapter. 73 * @get_i2c_adapter: Get I2C adapter.
46 */ 74 */
47
48struct m88ds3103_platform_data { 75struct m88ds3103_platform_data {
49 u32 clk; 76 u32 clk;
50 u16 i2c_wr_max; 77 u16 i2c_wr_max;
51#define M88DS3103_TS_SERIAL 0 /* TS output pin D0, normal */ 78 enum m88ds3103_ts_mode ts_mode;
52#define M88DS3103_TS_SERIAL_D7 1 /* TS output pin D7 */
53#define M88DS3103_TS_PARALLEL 2 /* TS Parallel mode */
54#define M88DS3103_TS_CI 3 /* TS CI Mode */
55 u8 ts_mode:2;
56 u32 ts_clk; 79 u32 ts_clk;
80 enum m88ds3103_clock_out clk_out;
57 u8 ts_clk_pol:1; 81 u8 ts_clk_pol:1;
58 u8 spec_inv:1; 82 u8 spec_inv:1;
59 u8 agc; 83 u8 agc;
60 u8 agc_inv:1; 84 u8 agc_inv:1;
61#define M88DS3103_CLOCK_OUT_DISABLED 0
62#define M88DS3103_CLOCK_OUT_ENABLED 1
63#define M88DS3103_CLOCK_OUT_ENABLED_DIV2 2
64 u8 clk_out:2;
65 u8 envelope_mode:1; 85 u8 envelope_mode:1;
66 u8 lnb_hv_pol:1; 86 u8 lnb_hv_pol:1;
67 u8 lnb_en_pol:1; 87 u8 lnb_en_pol:1;
@@ -73,105 +93,60 @@ struct m88ds3103_platform_data {
73 u8 attach_in_use:1; 93 u8 attach_in_use:1;
74}; 94};
75 95
76/* 96/**
77 * Do not add new m88ds3103_attach() users! Use I2C bindings instead. 97 * struct m88ds3103_config - m88ds3102 configuration
98 *
99 * @i2c_addr: I2C address. Default: none, must set. Example: 0x68, ...
100 * @clock: Device's clock. Default: none, must set. Example: 27000000
101 * @i2c_wr_max: Max bytes I2C provider is asked to write at once.
102 * Default: none, must set. Example: 33, 65, ...
103 * @ts_mode: TS output mode, as defined by &enum m88ds3103_ts_mode.
104 * Default: M88DS3103_TS_SERIAL.
105 * @ts_clk: TS clk in KHz. Default: 0.
106 * @ts_clk_pol: TS clk polarity.Default: 0.
107 * 1-active at falling edge; 0-active at rising edge.
108 * @spec_inv: Spectrum inversion. Default: 0.
109 * @agc_inv: AGC polarity. Default: 0.
110 * @clock_out: Clock output, as defined by &enum m88ds3103_clock_out.
111 * Default: M88DS3103_CLOCK_OUT_DISABLED.
112 * @envelope_mode: DiSEqC envelope mode. Default: 0.
113 * @agc: AGC configuration. Default: none, must set.
114 * @lnb_hv_pol: LNB H/V pin polarity. Default: 0. Values:
115 * 1: pin high set to VOLTAGE_13, pin low to set VOLTAGE_18;
116 * 0: pin high set to VOLTAGE_18, pin low to set VOLTAGE_13.
117 * @lnb_en_pol: LNB enable pin polarity. Default: 0. Values:
118 * 1: pin high to enable, pin low to disable;
119 * 0: pin high to disable, pin low to enable.
78 */ 120 */
79struct m88ds3103_config { 121struct m88ds3103_config {
80 /*
81 * I2C address
82 * Default: none, must set
83 * 0x68, ...
84 */
85 u8 i2c_addr; 122 u8 i2c_addr;
86
87 /*
88 * clock
89 * Default: none, must set
90 * 27000000
91 */
92 u32 clock; 123 u32 clock;
93
94 /*
95 * max bytes I2C provider is asked to write at once
96 * Default: none, must set
97 * 33, 65, ...
98 */
99 u16 i2c_wr_max; 124 u16 i2c_wr_max;
100
101 /*
102 * TS output mode
103 * Default: M88DS3103_TS_SERIAL
104 */
105#define M88DS3103_TS_SERIAL 0 /* TS output pin D0, normal */
106#define M88DS3103_TS_SERIAL_D7 1 /* TS output pin D7 */
107#define M88DS3103_TS_PARALLEL 2 /* TS Parallel mode */
108#define M88DS3103_TS_CI 3 /* TS CI Mode */
109 u8 ts_mode; 125 u8 ts_mode;
110
111 /*
112 * TS clk in KHz
113 * Default: 0.
114 */
115 u32 ts_clk; 126 u32 ts_clk;
116
117 /*
118 * TS clk polarity.
119 * Default: 0. 1-active at falling edge; 0-active at rising edge.
120 */
121 u8 ts_clk_pol:1; 127 u8 ts_clk_pol:1;
122
123 /*
124 * spectrum inversion
125 * Default: 0
126 */
127 u8 spec_inv:1; 128 u8 spec_inv:1;
128
129 /*
130 * AGC polarity
131 * Default: 0
132 */
133 u8 agc_inv:1; 129 u8 agc_inv:1;
134
135 /*
136 * clock output
137 * Default: M88DS3103_CLOCK_OUT_DISABLED
138 */
139#define M88DS3103_CLOCK_OUT_DISABLED 0
140#define M88DS3103_CLOCK_OUT_ENABLED 1
141#define M88DS3103_CLOCK_OUT_ENABLED_DIV2 2
142 u8 clock_out; 130 u8 clock_out;
143
144 /*
145 * DiSEqC envelope mode
146 * Default: 0
147 */
148 u8 envelope_mode:1; 131 u8 envelope_mode:1;
149
150 /*
151 * AGC configuration
152 * Default: none, must set
153 */
154 u8 agc; 132 u8 agc;
155
156 /*
157 * LNB H/V pin polarity
158 * Default: 0.
159 * 1: pin high set to VOLTAGE_13, pin low to set VOLTAGE_18.
160 * 0: pin high set to VOLTAGE_18, pin low to set VOLTAGE_13.
161 */
162 u8 lnb_hv_pol:1; 133 u8 lnb_hv_pol:1;
163
164 /*
165 * LNB enable pin polarity
166 * Default: 0.
167 * 1: pin high to enable, pin low to disable.
168 * 0: pin high to disable, pin low to enable.
169 */
170 u8 lnb_en_pol:1; 134 u8 lnb_en_pol:1;
171}; 135};
172 136
173#if defined(CONFIG_DVB_M88DS3103) || \ 137#if defined(CONFIG_DVB_M88DS3103) || \
174 (defined(CONFIG_DVB_M88DS3103_MODULE) && defined(MODULE)) 138 (defined(CONFIG_DVB_M88DS3103_MODULE) && defined(MODULE))
139/**
140 * Attach a m88ds3103 demod
141 *
142 * @config: pointer to &struct m88ds3103_config with demod configuration.
143 * @i2c: i2c adapter to use.
144 * @tuner_i2c: on success, returns the I2C adapter associated with
145 * m88ds3103 tuner.
146 *
147 * return: FE pointer on success, NULL on failure.
148 * Note: Do not add new m88ds3103_attach() users! Use I2C bindings instead.
149 */
175extern struct dvb_frontend *m88ds3103_attach( 150extern struct dvb_frontend *m88ds3103_attach(
176 const struct m88ds3103_config *config, 151 const struct m88ds3103_config *config,
177 struct i2c_adapter *i2c, 152 struct i2c_adapter *i2c,
diff --git a/drivers/media/dvb-frontends/mb86a20s.h b/drivers/media/dvb-frontends/mb86a20s.h
index dfb02db2126c..05c9725d1c5f 100644
--- a/drivers/media/dvb-frontends/mb86a20s.h
+++ b/drivers/media/dvb-frontends/mb86a20s.h
@@ -26,7 +26,6 @@
26 * @demod_address: the demodulator's i2c address 26 * @demod_address: the demodulator's i2c address
27 * @is_serial: if true, TS is serial. Otherwise, TS is parallel 27 * @is_serial: if true, TS is serial. Otherwise, TS is parallel
28 */ 28 */
29
30struct mb86a20s_config { 29struct mb86a20s_config {
31 u32 fclk; 30 u32 fclk;
32 u8 demod_address; 31 u8 demod_address;
@@ -34,9 +33,17 @@ struct mb86a20s_config {
34}; 33};
35 34
36#if IS_REACHABLE(CONFIG_DVB_MB86A20S) 35#if IS_REACHABLE(CONFIG_DVB_MB86A20S)
36/**
37 * Attach a mb86a20s demod
38 *
39 * @config: pointer to &struct mb86a20s_config with demod configuration.
40 * @i2c: i2c adapter to use.
41 *
42 * return: FE pointer on success, NULL on failure.
43 */
37extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config, 44extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
38 struct i2c_adapter *i2c); 45 struct i2c_adapter *i2c);
39extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *); 46
40#else 47#else
41static inline struct dvb_frontend *mb86a20s_attach( 48static inline struct dvb_frontend *mb86a20s_attach(
42 const struct mb86a20s_config *config, struct i2c_adapter *i2c) 49 const struct mb86a20s_config *config, struct i2c_adapter *i2c)
@@ -44,12 +51,6 @@ static inline struct dvb_frontend *mb86a20s_attach(
44 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 51 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
45 return NULL; 52 return NULL;
46} 53}
47static inline struct i2c_adapter *
48 mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *fe)
49{
50 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
51 return NULL;
52}
53#endif 54#endif
54 55
55#endif /* MB86A20S */ 56#endif /* MB86A20S */
diff --git a/drivers/media/dvb-frontends/mn88472.h b/drivers/media/dvb-frontends/mn88472.h
index 323632523876..8cd5ef61903b 100644
--- a/drivers/media/dvb-frontends/mn88472.h
+++ b/drivers/media/dvb-frontends/mn88472.h
@@ -19,21 +19,21 @@
19 19
20#include <linux/dvb/frontend.h> 20#include <linux/dvb/frontend.h>
21 21
22/* Define old names for backward compatibility */
23#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE
24#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED
25#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL
26#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL
27
22/** 28/**
23 * struct mn88472_config - Platform data for the mn88472 driver 29 * struct mn88472_config - Platform data for the mn88472 driver
24 * @xtal: Clock frequency. 30 * @xtal: Clock frequency.
25 * @ts_mode: TS mode. 31 * @ts_mode: TS mode.
26 * @ts_clock: TS clock config. 32 * @ts_clock: TS clock config.
27 * @i2c_wr_max: Max number of bytes driver writes to I2C at once. 33 * @i2c_wr_max: Max number of bytes driver writes to I2C at once.
28 * @get_dvb_frontend: Get DVB frontend. 34 * @fe: pointer to a frontend pointer
35 * @get_dvb_frontend: Get DVB frontend callback.
29 */ 36 */
30
31/* Define old names for backward compatibility */
32#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE
33#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED
34#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL
35#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL
36
37struct mn88472_config { 37struct mn88472_config {
38 unsigned int xtal; 38 unsigned int xtal;
39 39
diff --git a/drivers/media/dvb-frontends/rtl2830.h b/drivers/media/dvb-frontends/rtl2830.h
index 0cde151e6608..458ac94e8a8b 100644
--- a/drivers/media/dvb-frontends/rtl2830.h
+++ b/drivers/media/dvb-frontends/rtl2830.h
@@ -32,7 +32,6 @@
32 * @pid_filter: Set PID to PID filter. 32 * @pid_filter: Set PID to PID filter.
33 * @pid_filter_ctrl: Control PID filter. 33 * @pid_filter_ctrl: Control PID filter.
34 */ 34 */
35
36struct rtl2830_platform_data { 35struct rtl2830_platform_data {
37 u32 clk; 36 u32 clk;
38 bool spec_inv; 37 bool spec_inv;
diff --git a/drivers/media/dvb-frontends/rtl2832.h b/drivers/media/dvb-frontends/rtl2832.h
index 03c0de039fa9..6a124ff71c2b 100644
--- a/drivers/media/dvb-frontends/rtl2832.h
+++ b/drivers/media/dvb-frontends/rtl2832.h
@@ -35,7 +35,6 @@
35 * @pid_filter: Set PID to PID filter. 35 * @pid_filter: Set PID to PID filter.
36 * @pid_filter_ctrl: Control PID filter. 36 * @pid_filter_ctrl: Control PID filter.
37 */ 37 */
38
39struct rtl2832_platform_data { 38struct rtl2832_platform_data {
40 u32 clk; 39 u32 clk;
41 /* 40 /*
diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.h b/drivers/media/dvb-frontends/rtl2832_sdr.h
index d8fc7e7212e3..8f88c2fb8627 100644
--- a/drivers/media/dvb-frontends/rtl2832_sdr.h
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.h
@@ -33,15 +33,11 @@
33 * struct rtl2832_sdr_platform_data - Platform data for the rtl2832_sdr driver 33 * struct rtl2832_sdr_platform_data - Platform data for the rtl2832_sdr driver
34 * @clk: Clock frequency (4000000, 16000000, 25000000, 28800000). 34 * @clk: Clock frequency (4000000, 16000000, 25000000, 28800000).
35 * @tuner: Used tuner model. 35 * @tuner: Used tuner model.
36 * @i2c_client: rtl2832 demod driver I2C client. 36 * @regmap: pointer to &struct regmap.
37 * @bulk_read: rtl2832 driver private I/O interface.
38 * @bulk_write: rtl2832 driver private I/O interface.
39 * @update_bits: rtl2832 driver private I/O interface.
40 * @dvb_frontend: rtl2832 DVB frontend. 37 * @dvb_frontend: rtl2832 DVB frontend.
41 * @v4l2_subdev: Tuner v4l2 controls. 38 * @v4l2_subdev: Tuner v4l2 controls.
42 * @dvb_usb_device: DVB USB interface for USB streaming. 39 * @dvb_usb_device: DVB USB interface for USB streaming.
43 */ 40 */
44
45struct rtl2832_sdr_platform_data { 41struct rtl2832_sdr_platform_data {
46 u32 clk; 42 u32 clk;
47 /* 43 /*
diff --git a/drivers/media/dvb-frontends/sp887x.c b/drivers/media/dvb-frontends/sp887x.c
index 7c511c3cd4ca..d2c402b52c6e 100644
--- a/drivers/media/dvb-frontends/sp887x.c
+++ b/drivers/media/dvb-frontends/sp887x.c
@@ -57,7 +57,7 @@ static int sp887x_writereg (struct sp887x_state* state, u16 reg, u16 data)
57 int ret; 57 int ret;
58 58
59 if ((ret = i2c_transfer(state->i2c, &msg, 1)) != 1) { 59 if ((ret = i2c_transfer(state->i2c, &msg, 1)) != 1) {
60 /** 60 /*
61 * in case of soft reset we ignore ACK errors... 61 * in case of soft reset we ignore ACK errors...
62 */ 62 */
63 if (!(reg == 0xf1a && data == 0x000 && 63 if (!(reg == 0xf1a && data == 0x000 &&
@@ -130,7 +130,7 @@ static void sp887x_setup_agc (struct sp887x_state* state)
130 130
131#define BLOCKSIZE 30 131#define BLOCKSIZE 30
132#define FW_SIZE 0x4000 132#define FW_SIZE 0x4000
133/** 133/*
134 * load firmware and setup MPEG interface... 134 * load firmware and setup MPEG interface...
135 */ 135 */
136static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware *fw) 136static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware *fw)
@@ -279,7 +279,7 @@ static int configure_reg0xc05(struct dtv_frontend_properties *p, u16 *reg0xc05)
279 return 0; 279 return 0;
280} 280}
281 281
282/** 282/*
283 * estimates division of two 24bit numbers, 283 * estimates division of two 24bit numbers,
284 * derived from the ves1820/stv0299 driver code 284 * derived from the ves1820/stv0299 driver code
285 */ 285 */
diff --git a/drivers/media/dvb-frontends/stb6000.h b/drivers/media/dvb-frontends/stb6000.h
index 78e75dfc317f..e94a3d5facf6 100644
--- a/drivers/media/dvb-frontends/stb6000.h
+++ b/drivers/media/dvb-frontends/stb6000.h
@@ -26,15 +26,16 @@
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include "dvb_frontend.h" 27#include "dvb_frontend.h"
28 28
29#if IS_REACHABLE(CONFIG_DVB_STB6000)
29/** 30/**
30 * Attach a stb6000 tuner to the supplied frontend structure. 31 * Attach a stb6000 tuner to the supplied frontend structure.
31 * 32 *
32 * @param fe Frontend to attach to. 33 * @fe: Frontend to attach to.
33 * @param addr i2c address of the tuner. 34 * @addr: i2c address of the tuner.
34 * @param i2c i2c adapter to use. 35 * @i2c: i2c adapter to use.
35 * @return FE pointer on success, NULL on failure. 36 *
37 * return: FE pointer on success, NULL on failure.
36 */ 38 */
37#if IS_REACHABLE(CONFIG_DVB_STB6000)
38extern struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr, 39extern struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr,
39 struct i2c_adapter *i2c); 40 struct i2c_adapter *i2c);
40#else 41#else
diff --git a/drivers/media/dvb-frontends/stv0299.c b/drivers/media/dvb-frontends/stv0299.c
index b36b21a13201..b1f3d675d316 100644
--- a/drivers/media/dvb-frontends/stv0299.c
+++ b/drivers/media/dvb-frontends/stv0299.c
@@ -368,7 +368,7 @@ static int stv0299_set_voltage(struct dvb_frontend *fe,
368 reg0x08 = stv0299_readreg (state, 0x08); 368 reg0x08 = stv0299_readreg (state, 0x08);
369 reg0x0c = stv0299_readreg (state, 0x0c); 369 reg0x0c = stv0299_readreg (state, 0x0c);
370 370
371 /** 371 /*
372 * H/V switching over OP0, OP1 and OP2 are LNB power enable bits 372 * H/V switching over OP0, OP1 and OP2 are LNB power enable bits
373 */ 373 */
374 reg0x0c &= 0x0f; 374 reg0x0c &= 0x0f;
diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h
index 8f184026ee11..da1a87bc1603 100644
--- a/drivers/media/dvb-frontends/tda10071.h
+++ b/drivers/media/dvb-frontends/tda10071.h
@@ -38,7 +38,6 @@
38 * @tuner_i2c_addr: CX24118A tuner I2C address (0x14, 0x54, ...). 38 * @tuner_i2c_addr: CX24118A tuner I2C address (0x14, 0x54, ...).
39 * @get_dvb_frontend: Get DVB frontend. 39 * @get_dvb_frontend: Get DVB frontend.
40 */ 40 */
41
42struct tda10071_platform_data { 41struct tda10071_platform_data {
43 u32 clk; 42 u32 clk;
44 u16 i2c_wr_max; 43 u16 i2c_wr_max;
diff --git a/drivers/media/dvb-frontends/tda826x.h b/drivers/media/dvb-frontends/tda826x.h
index 81abe1aebe9f..6a7bed12e741 100644
--- a/drivers/media/dvb-frontends/tda826x.h
+++ b/drivers/media/dvb-frontends/tda826x.h
@@ -29,11 +29,12 @@
29/** 29/**
30 * Attach a tda826x tuner to the supplied frontend structure. 30 * Attach a tda826x tuner to the supplied frontend structure.
31 * 31 *
32 * @param fe Frontend to attach to. 32 * @fe: Frontend to attach to.
33 * @param addr i2c address of the tuner. 33 * @addr: i2c address of the tuner.
34 * @param i2c i2c adapter to use. 34 * @i2c: i2c adapter to use.
35 * @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. 35 * @has_loopthrough: Set to 1 if the card has a loopthrough RF connector.
36 * @return FE pointer on success, NULL on failure. 36 *
37 * return: FE pointer on success, NULL on failure.
37 */ 38 */
38#if IS_REACHABLE(CONFIG_DVB_TDA826X) 39#if IS_REACHABLE(CONFIG_DVB_TDA826X)
39extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr, 40extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr,
diff --git a/drivers/media/dvb-frontends/tua6100.c b/drivers/media/dvb-frontends/tua6100.c
index 18e6d4c5be21..1d41abd47f04 100644
--- a/drivers/media/dvb-frontends/tua6100.c
+++ b/drivers/media/dvb-frontends/tua6100.c
@@ -1,4 +1,4 @@
1/** 1/*
2 * Driver for Infineon tua6100 pll. 2 * Driver for Infineon tua6100 pll.
3 * 3 *
4 * (c) 2006 Andrew de Quincey 4 * (c) 2006 Andrew de Quincey
diff --git a/drivers/media/dvb-frontends/tua6100.h b/drivers/media/dvb-frontends/tua6100.h
index 9f15cbdfdeca..6c098a894ea6 100644
--- a/drivers/media/dvb-frontends/tua6100.h
+++ b/drivers/media/dvb-frontends/tua6100.h
@@ -1,4 +1,4 @@
1/** 1/*
2 * Driver for Infineon tua6100 PLL. 2 * Driver for Infineon tua6100 PLL.
3 * 3 *
4 * (c) 2006 Andrew de Quincey 4 * (c) 2006 Andrew de Quincey
diff --git a/drivers/media/dvb-frontends/zd1301_demod.h b/drivers/media/dvb-frontends/zd1301_demod.h
index ceb2e05e873c..6cd8f6f9c415 100644
--- a/drivers/media/dvb-frontends/zd1301_demod.h
+++ b/drivers/media/dvb-frontends/zd1301_demod.h
@@ -27,7 +27,6 @@
27 * @reg_read: Register read callback. 27 * @reg_read: Register read callback.
28 * @reg_write: Register write callback. 28 * @reg_write: Register write callback.
29 */ 29 */
30
31struct zd1301_demod_platform_data { 30struct zd1301_demod_platform_data {
32 void *reg_priv; 31 void *reg_priv;
33 int (*reg_read)(void *, u16, u8 *); 32 int (*reg_read)(void *, u16, u8 *);
@@ -41,8 +40,7 @@ struct zd1301_demod_platform_data {
41 * 40 *
42 * Return: Pointer to DVB frontend which given platform device owns. 41 * Return: Pointer to DVB frontend which given platform device owns.
43 */ 42 */
44 43struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *pdev);
45struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *);
46 44
47/** 45/**
48 * zd1301_demod_get_i2c_adapter() - Get pointer to I2C adapter 46 * zd1301_demod_get_i2c_adapter() - Get pointer to I2C adapter
@@ -50,11 +48,16 @@ struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *);
50 * 48 *
51 * Return: Pointer to I2C adapter which given platform device owns. 49 * Return: Pointer to I2C adapter which given platform device owns.
52 */ 50 */
53 51struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *pdev);
54struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *);
55 52
56#else 53#else
57 54
55/**
56 * zd1301_demod_get_dvb_frontend() - Attach a zd1301 frontend
57 * @dev: Pointer to platform device
58 *
59 * Return: Pointer to %struct dvb_frontend or NULL if attach fails.
60 */
58static inline struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *dev) 61static inline struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *dev)
59{ 62{
60 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 63 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
diff --git a/drivers/media/dvb-frontends/zl10036.c b/drivers/media/dvb-frontends/zl10036.c
index 062282739ce5..89dd65ae88ad 100644
--- a/drivers/media/dvb-frontends/zl10036.c
+++ b/drivers/media/dvb-frontends/zl10036.c
@@ -1,4 +1,4 @@
1/** 1/*
2 * Driver for Zarlink zl10036 DVB-S silicon tuner 2 * Driver for Zarlink zl10036 DVB-S silicon tuner
3 * 3 *
4 * Copyright (C) 2006 Tino Reichardt 4 * Copyright (C) 2006 Tino Reichardt
@@ -157,7 +157,7 @@ static int zl10036_sleep(struct dvb_frontend *fe)
157 return ret; 157 return ret;
158} 158}
159 159
160/** 160/*
161 * register map of the ZL10036/ZL10038 161 * register map of the ZL10036/ZL10038
162 * 162 *
163 * reg[default] content 163 * reg[default] content
@@ -219,7 +219,7 @@ static int zl10036_set_bandwidth(struct zl10036_state *state, u32 fbw)
219 if (fbw <= 28820) { 219 if (fbw <= 28820) {
220 br = _BR_MAXIMUM; 220 br = _BR_MAXIMUM;
221 } else { 221 } else {
222 /** 222 /*
223 * f(bw)=34,6MHz f(xtal)=10.111MHz 223 * f(bw)=34,6MHz f(xtal)=10.111MHz
224 * br = (10111/34600) * 63 * 1/K = 14; 224 * br = (10111/34600) * 63 * 1/K = 14;
225 */ 225 */
@@ -315,7 +315,7 @@ static int zl10036_set_params(struct dvb_frontend *fe)
315 || (frequency > fe->ops.info.frequency_max)) 315 || (frequency > fe->ops.info.frequency_max))
316 return -EINVAL; 316 return -EINVAL;
317 317
318 /** 318 /*
319 * alpha = 1.35 for dvb-s 319 * alpha = 1.35 for dvb-s
320 * fBW = (alpha*symbolrate)/(2*0.8) 320 * fBW = (alpha*symbolrate)/(2*0.8)
321 * 1.35 / (2*0.8) = 27 / 32 321 * 1.35 / (2*0.8) = 27 / 32
diff --git a/drivers/media/dvb-frontends/zl10036.h b/drivers/media/dvb-frontends/zl10036.h
index 88751adfecf7..ec90ca927739 100644
--- a/drivers/media/dvb-frontends/zl10036.h
+++ b/drivers/media/dvb-frontends/zl10036.h
@@ -20,20 +20,20 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include "dvb_frontend.h" 21#include "dvb_frontend.h"
22 22
23/**
24 * Attach a zl10036 tuner to the supplied frontend structure.
25 *
26 * @param fe Frontend to attach to.
27 * @param config zl10036_config structure
28 * @return FE pointer on success, NULL on failure.
29 */
30
31struct zl10036_config { 23struct zl10036_config {
32 u8 tuner_address; 24 u8 tuner_address;
33 int rf_loop_enable; 25 int rf_loop_enable;
34}; 26};
35 27
36#if IS_REACHABLE(CONFIG_DVB_ZL10036) 28#if IS_REACHABLE(CONFIG_DVB_ZL10036)
29/**
30 * Attach a zl10036 tuner to the supplied frontend structure.
31 *
32 * @fe: Frontend to attach to.
33 * @config: zl10036_config structure.
34 * @i2c: pointer to struct i2c_adapter.
35 * return: FE pointer on success, NULL on failure.
36 */
37extern struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe, 37extern struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe,
38 const struct zl10036_config *config, struct i2c_adapter *i2c); 38 const struct zl10036_config *config, struct i2c_adapter *i2c);
39#else 39#else
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 3c6d6428f525..cb5d7ff82915 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -676,6 +676,7 @@ config VIDEO_OV13858
676 tristate "OmniVision OV13858 sensor support" 676 tristate "OmniVision OV13858 sensor support"
677 depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API 677 depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
678 depends on MEDIA_CAMERA_SUPPORT 678 depends on MEDIA_CAMERA_SUPPORT
679 select V4L2_FWNODE
679 ---help--- 680 ---help---
680 This is a Video4Linux2 sensor-level driver for the OmniVision 681 This is a Video4Linux2 sensor-level driver for the OmniVision
681 OV13858 camera. 682 OV13858 camera.
diff --git a/drivers/media/i2c/et8ek8/Kconfig b/drivers/media/i2c/et8ek8/Kconfig
index 14399365ad7f..9fe409e95666 100644
--- a/drivers/media/i2c/et8ek8/Kconfig
+++ b/drivers/media/i2c/et8ek8/Kconfig
@@ -1,6 +1,7 @@
1config VIDEO_ET8EK8 1config VIDEO_ET8EK8
2 tristate "ET8EK8 camera sensor support" 2 tristate "ET8EK8 camera sensor support"
3 depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API 3 depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
4 select V4L2_FWNODE
4 ---help--- 5 ---help---
5 This is a driver for the Toshiba ET8EK8 5 MP camera sensor. 6 This is a driver for the Toshiba ET8EK8 5 MP camera sensor.
6 It is used for example in Nokia N900 (RX-51). 7 It is used for example in Nokia N900 (RX-51).
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index 800b9bf9cdd3..2f71af2f90bf 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -1770,8 +1770,7 @@ static int imx274_probe(struct i2c_client *client,
1770 return 0; 1770 return 0;
1771 1771
1772err_ctrls: 1772err_ctrls:
1773 v4l2_async_unregister_subdev(sd); 1773 v4l2_ctrl_handler_free(&imx274->ctrls.handler);
1774 v4l2_ctrl_handler_free(sd->ctrl_handler);
1775err_me: 1774err_me:
1776 media_entity_cleanup(&sd->entity); 1775 media_entity_cleanup(&sd->entity);
1777err_regmap: 1776err_regmap:
@@ -1788,7 +1787,7 @@ static int imx274_remove(struct i2c_client *client)
1788 imx274_write_table(imx274, mode_table[IMX274_MODE_STOP_STREAM]); 1787 imx274_write_table(imx274, mode_table[IMX274_MODE_STOP_STREAM]);
1789 1788
1790 v4l2_async_unregister_subdev(sd); 1789 v4l2_async_unregister_subdev(sd);
1791 v4l2_ctrl_handler_free(sd->ctrl_handler); 1790 v4l2_ctrl_handler_free(&imx274->ctrls.handler);
1792 media_entity_cleanup(&sd->entity); 1791 media_entity_cleanup(&sd->entity);
1793 mutex_destroy(&imx274->lock); 1792 mutex_destroy(&imx274->lock);
1794 return 0; 1793 return 0;
diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c
index 251a2aaf98c3..b600e03aa94b 100644
--- a/drivers/media/i2c/lm3560.c
+++ b/drivers/media/i2c/lm3560.c
@@ -50,6 +50,7 @@ enum led_enable {
50/** 50/**
51 * struct lm3560_flash 51 * struct lm3560_flash
52 * 52 *
53 * @dev: pointer to &struct device
53 * @pdata: platform data 54 * @pdata: platform data
54 * @regmap: reg. map for i2c 55 * @regmap: reg. map for i2c
55 * @lock: muxtex for serial access. 56 * @lock: muxtex for serial access.
diff --git a/drivers/media/i2c/m5mols/m5mols_capture.c b/drivers/media/i2c/m5mols/m5mols_capture.c
index a0cd6dc32eb0..0fb457f57995 100644
--- a/drivers/media/i2c/m5mols/m5mols_capture.c
+++ b/drivers/media/i2c/m5mols/m5mols_capture.c
@@ -33,6 +33,10 @@
33 33
34/** 34/**
35 * m5mols_read_rational - I2C read of a rational number 35 * m5mols_read_rational - I2C read of a rational number
36 * @sd: sub-device, as pointed by struct v4l2_subdev
37 * @addr_num: numerator register
38 * @addr_den: denominator register
39 * @val: place to store the division result
36 * 40 *
37 * Read numerator and denominator from registers @addr_num and @addr_den 41 * Read numerator and denominator from registers @addr_num and @addr_den
38 * respectively and return the division result in @val. 42 * respectively and return the division result in @val.
@@ -53,6 +57,7 @@ static int m5mols_read_rational(struct v4l2_subdev *sd, u32 addr_num,
53 57
54/** 58/**
55 * m5mols_capture_info - Gather captured image information 59 * m5mols_capture_info - Gather captured image information
60 * @info: M-5MOLS driver data structure
56 * 61 *
57 * For now it gathers only EXIF information and file size. 62 * For now it gathers only EXIF information and file size.
58 */ 63 */
diff --git a/drivers/media/i2c/m5mols/m5mols_controls.c b/drivers/media/i2c/m5mols/m5mols_controls.c
index c2218c0a9e6f..82eab7c2bc8c 100644
--- a/drivers/media/i2c/m5mols/m5mols_controls.c
+++ b/drivers/media/i2c/m5mols/m5mols_controls.c
@@ -126,6 +126,7 @@ static struct m5mols_scenemode m5mols_default_scenemode[] = {
126 126
127/** 127/**
128 * m5mols_do_scenemode() - Change current scenemode 128 * m5mols_do_scenemode() - Change current scenemode
129 * @info: M-5MOLS driver data structure
129 * @mode: Desired mode of the scenemode 130 * @mode: Desired mode of the scenemode
130 * 131 *
131 * WARNING: The execution order is important. Do not change the order. 132 * WARNING: The execution order is important. Do not change the order.
diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c
index 463534d44756..12e79f9e32d5 100644
--- a/drivers/media/i2c/m5mols/m5mols_core.c
+++ b/drivers/media/i2c/m5mols/m5mols_core.c
@@ -114,7 +114,8 @@ static const struct m5mols_resolution m5mols_reg_res[] = {
114 114
115/** 115/**
116 * m5mols_swap_byte - an byte array to integer conversion function 116 * m5mols_swap_byte - an byte array to integer conversion function
117 * @size: size in bytes of I2C packet defined in the M-5MOLS datasheet 117 * @data: byte array
118 * @length: size in bytes of I2C packet defined in the M-5MOLS datasheet
118 * 119 *
119 * Convert I2C data byte array with performing any required byte 120 * Convert I2C data byte array with performing any required byte
120 * reordering to assure proper values for each data type, regardless 121 * reordering to assure proper values for each data type, regardless
@@ -132,8 +133,9 @@ static u32 m5mols_swap_byte(u8 *data, u8 length)
132 133
133/** 134/**
134 * m5mols_read - I2C read function 135 * m5mols_read - I2C read function
135 * @reg: combination of size, category and command for the I2C packet 136 * @sd: sub-device, as pointed by struct v4l2_subdev
136 * @size: desired size of I2C packet 137 * @size: desired size of I2C packet
138 * @reg: combination of size, category and command for the I2C packet
137 * @val: read value 139 * @val: read value
138 * 140 *
139 * Returns 0 on success, or else negative errno. 141 * Returns 0 on success, or else negative errno.
@@ -232,6 +234,7 @@ int m5mols_read_u32(struct v4l2_subdev *sd, u32 reg, u32 *val)
232 234
233/** 235/**
234 * m5mols_write - I2C command write function 236 * m5mols_write - I2C command write function
237 * @sd: sub-device, as pointed by struct v4l2_subdev
235 * @reg: combination of size, category and command for the I2C packet 238 * @reg: combination of size, category and command for the I2C packet
236 * @val: value to write 239 * @val: value to write
237 * 240 *
@@ -284,6 +287,7 @@ int m5mols_write(struct v4l2_subdev *sd, u32 reg, u32 val)
284 287
285/** 288/**
286 * m5mols_busy_wait - Busy waiting with I2C register polling 289 * m5mols_busy_wait - Busy waiting with I2C register polling
290 * @sd: sub-device, as pointed by struct v4l2_subdev
287 * @reg: the I2C_REG() address of an 8-bit status register to check 291 * @reg: the I2C_REG() address of an 8-bit status register to check
288 * @value: expected status register value 292 * @value: expected status register value
289 * @mask: bit mask for the read status register value 293 * @mask: bit mask for the read status register value
@@ -316,6 +320,8 @@ int m5mols_busy_wait(struct v4l2_subdev *sd, u32 reg, u32 value, u32 mask,
316 320
317/** 321/**
318 * m5mols_enable_interrupt - Clear interrupt pending bits and unmask interrupts 322 * m5mols_enable_interrupt - Clear interrupt pending bits and unmask interrupts
323 * @sd: sub-device, as pointed by struct v4l2_subdev
324 * @reg: combination of size, category and command for the I2C packet
319 * 325 *
320 * Before writing desired interrupt value the INT_FACTOR register should 326 * Before writing desired interrupt value the INT_FACTOR register should
321 * be read to clear pending interrupts. 327 * be read to clear pending interrupts.
@@ -349,6 +355,8 @@ int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 irq_mask, u32 timeout)
349 355
350/** 356/**
351 * m5mols_reg_mode - Write the mode and check busy status 357 * m5mols_reg_mode - Write the mode and check busy status
358 * @sd: sub-device, as pointed by struct v4l2_subdev
359 * @mode: the required operation mode
352 * 360 *
353 * It always accompanies a little delay changing the M-5MOLS mode, so it is 361 * It always accompanies a little delay changing the M-5MOLS mode, so it is
354 * needed checking current busy status to guarantee right mode. 362 * needed checking current busy status to guarantee right mode.
@@ -364,6 +372,7 @@ static int m5mols_reg_mode(struct v4l2_subdev *sd, u8 mode)
364 372
365/** 373/**
366 * m5mols_set_mode - set the M-5MOLS controller mode 374 * m5mols_set_mode - set the M-5MOLS controller mode
375 * @info: M-5MOLS driver data structure
367 * @mode: the required operation mode 376 * @mode: the required operation mode
368 * 377 *
369 * The commands of M-5MOLS are grouped into specific modes. Each functionality 378 * The commands of M-5MOLS are grouped into specific modes. Each functionality
@@ -421,6 +430,7 @@ int m5mols_set_mode(struct m5mols_info *info, u8 mode)
421 430
422/** 431/**
423 * m5mols_get_version - retrieve full revisions information of M-5MOLS 432 * m5mols_get_version - retrieve full revisions information of M-5MOLS
433 * @sd: sub-device, as pointed by struct v4l2_subdev
424 * 434 *
425 * The version information includes revisions of hardware and firmware, 435 * The version information includes revisions of hardware and firmware,
426 * AutoFocus alghorithm version and the version string. 436 * AutoFocus alghorithm version and the version string.
@@ -489,6 +499,7 @@ static enum m5mols_restype __find_restype(u32 code)
489 499
490/** 500/**
491 * __find_resolution - Lookup preset and type of M-5MOLS's resolution 501 * __find_resolution - Lookup preset and type of M-5MOLS's resolution
502 * @sd: sub-device, as pointed by struct v4l2_subdev
492 * @mf: pixel format to find/negotiate the resolution preset for 503 * @mf: pixel format to find/negotiate the resolution preset for
493 * @type: M-5MOLS resolution type 504 * @type: M-5MOLS resolution type
494 * @resolution: M-5MOLS resolution preset register value 505 * @resolution: M-5MOLS resolution preset register value
@@ -662,6 +673,7 @@ static const struct v4l2_subdev_pad_ops m5mols_pad_ops = {
662 673
663/** 674/**
664 * m5mols_restore_controls - Apply current control values to the registers 675 * m5mols_restore_controls - Apply current control values to the registers
676 * @info: M-5MOLS driver data structure
665 * 677 *
666 * m5mols_do_scenemode() handles all parameters for which there is yet no 678 * m5mols_do_scenemode() handles all parameters for which there is yet no
667 * individual control. It should be replaced at some point by setting each 679 * individual control. It should be replaced at some point by setting each
@@ -686,6 +698,7 @@ int m5mols_restore_controls(struct m5mols_info *info)
686 698
687/** 699/**
688 * m5mols_start_monitor - Start the monitor mode 700 * m5mols_start_monitor - Start the monitor mode
701 * @info: M-5MOLS driver data structure
689 * 702 *
690 * Before applying the controls setup the resolution and frame rate 703 * Before applying the controls setup the resolution and frame rate
691 * in PARAMETER mode, and then switch over to MONITOR mode. 704 * in PARAMETER mode, and then switch over to MONITOR mode.
@@ -789,6 +802,7 @@ int __attribute__ ((weak)) m5mols_update_fw(struct v4l2_subdev *sd,
789 802
790/** 803/**
791 * m5mols_fw_start - M-5MOLS internal ARM controller initialization 804 * m5mols_fw_start - M-5MOLS internal ARM controller initialization
805 * @sd: sub-device, as pointed by struct v4l2_subdev
792 * 806 *
793 * Execute the M-5MOLS internal ARM controller initialization sequence. 807 * Execute the M-5MOLS internal ARM controller initialization sequence.
794 * This function should be called after the supply voltage has been 808 * This function should be called after the supply voltage has been
@@ -844,6 +858,8 @@ static int m5mols_auto_focus_stop(struct m5mols_info *info)
844 858
845/** 859/**
846 * m5mols_s_power - Main sensor power control function 860 * m5mols_s_power - Main sensor power control function
861 * @sd: sub-device, as pointed by struct v4l2_subdev
862 * @on: if true, powers on the device; powers off otherwise.
847 * 863 *
848 * To prevent breaking the lens when the sensor is powered off the Soft-Landing 864 * To prevent breaking the lens when the sensor is powered off the Soft-Landing
849 * algorithm is called where available. The Soft-Landing algorithm availability 865 * algorithm is called where available. The Soft-Landing algorithm availability
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index 34179d232a35..da39c49de503 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -428,8 +428,8 @@ static int ov5647_sensor_set_register(struct v4l2_subdev *sd,
428} 428}
429#endif 429#endif
430 430
431/** 431/*
432 * @short Subdev core operations registration 432 * Subdev core operations registration
433 */ 433 */
434static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = { 434static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = {
435 .s_power = ov5647_sensor_power, 435 .s_power = ov5647_sensor_power,
diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c
index 67dcca76f981..2e140272794b 100644
--- a/drivers/media/i2c/s5k6a3.c
+++ b/drivers/media/i2c/s5k6a3.c
@@ -53,6 +53,9 @@ enum {
53 * @gpio_reset: GPIO connected to the sensor's reset pin 53 * @gpio_reset: GPIO connected to the sensor's reset pin
54 * @lock: mutex protecting the structure's members below 54 * @lock: mutex protecting the structure's members below
55 * @format: media bus format at the sensor's source pad 55 * @format: media bus format at the sensor's source pad
56 * @clock: pointer to &struct clk.
57 * @clock_frequency: clock frequency
58 * @power_count: stores state if device is powered
56 */ 59 */
57struct s5k6a3 { 60struct s5k6a3 {
58 struct device *dev; 61 struct device *dev;
diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
index 9fd254a8e20d..13c10b5e2b45 100644
--- a/drivers/media/i2c/s5k6aa.c
+++ b/drivers/media/i2c/s5k6aa.c
@@ -421,6 +421,7 @@ static int s5k6aa_set_ahb_address(struct i2c_client *client)
421 421
422/** 422/**
423 * s5k6aa_configure_pixel_clock - apply ISP main clock/PLL configuration 423 * s5k6aa_configure_pixel_clock - apply ISP main clock/PLL configuration
424 * @s5k6aa: pointer to &struct s5k6aa describing the device
424 * 425 *
425 * Configure the internal ISP PLL for the required output frequency. 426 * Configure the internal ISP PLL for the required output frequency.
426 * Locking: called with s5k6aa.lock mutex held. 427 * Locking: called with s5k6aa.lock mutex held.
@@ -669,6 +670,7 @@ static int s5k6aa_set_input_params(struct s5k6aa *s5k6aa)
669 670
670/** 671/**
671 * s5k6aa_configure_video_bus - configure the video output interface 672 * s5k6aa_configure_video_bus - configure the video output interface
673 * @s5k6aa: pointer to &struct s5k6aa describing the device
672 * @bus_type: video bus type: parallel or MIPI-CSI 674 * @bus_type: video bus type: parallel or MIPI-CSI
673 * @nlanes: number of MIPI lanes to be used (MIPI-CSI only) 675 * @nlanes: number of MIPI lanes to be used (MIPI-CSI only)
674 * 676 *
@@ -724,6 +726,8 @@ static int s5k6aa_new_config_sync(struct i2c_client *client, int timeout,
724 726
725/** 727/**
726 * s5k6aa_set_prev_config - write user preview register set 728 * s5k6aa_set_prev_config - write user preview register set
729 * @s5k6aa: pointer to &struct s5k6aa describing the device
730 * @preset: s5kaa preset to be applied
727 * 731 *
728 * Configure output resolution and color fromat, pixel clock 732 * Configure output resolution and color fromat, pixel clock
729 * frequency range, device frame rate type and frame period range. 733 * frequency range, device frame rate type and frame period range.
@@ -777,6 +781,7 @@ static int s5k6aa_set_prev_config(struct s5k6aa *s5k6aa,
777 781
778/** 782/**
779 * s5k6aa_initialize_isp - basic ISP MCU initialization 783 * s5k6aa_initialize_isp - basic ISP MCU initialization
784 * @sd: pointer to V4L2 sub-device descriptor
780 * 785 *
781 * Configure AHB addresses for registers read/write; configure PLLs for 786 * Configure AHB addresses for registers read/write; configure PLLs for
782 * required output pixel clock. The ISP power supply needs to be already 787 * required output pixel clock. The ISP power supply needs to be already
diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c
index ad2df998f9c5..d575b3e7e835 100644
--- a/drivers/media/i2c/tvp514x.c
+++ b/drivers/media/i2c/tvp514x.c
@@ -86,6 +86,7 @@ static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable);
86/** 86/**
87 * struct tvp514x_decoder - TVP5146/47 decoder object 87 * struct tvp514x_decoder - TVP5146/47 decoder object
88 * @sd: Subdevice Slave handle 88 * @sd: Subdevice Slave handle
89 * @hdl: embedded &struct v4l2_ctrl_handler
89 * @tvp514x_regs: copy of hw's regs with preset values. 90 * @tvp514x_regs: copy of hw's regs with preset values.
90 * @pdata: Board specific 91 * @pdata: Board specific
91 * @ver: Chip version 92 * @ver: Chip version
@@ -98,6 +99,9 @@ static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable);
98 * @std_list: Standards list 99 * @std_list: Standards list
99 * @input: Input routing at chip level 100 * @input: Input routing at chip level
100 * @output: Output routing at chip level 101 * @output: Output routing at chip level
102 * @pad: subdev media pad associated with the decoder
103 * @format: media bus frame format
104 * @int_seq: driver's register init sequence
101 */ 105 */
102struct tvp514x_decoder { 106struct tvp514x_decoder {
103 struct v4l2_subdev sd; 107 struct v4l2_subdev sd;
@@ -211,7 +215,7 @@ static struct tvp514x_reg tvp514x_reg_list_default[] = {
211 {TOK_TERM, 0, 0}, 215 {TOK_TERM, 0, 0},
212}; 216};
213 217
214/** 218/*
215 * List of image formats supported by TVP5146/47 decoder 219 * List of image formats supported by TVP5146/47 decoder
216 * Currently we are using 8 bit mode only, but can be 220 * Currently we are using 8 bit mode only, but can be
217 * extended to 10/20 bit mode. 221 * extended to 10/20 bit mode.
@@ -226,7 +230,7 @@ static const struct v4l2_fmtdesc tvp514x_fmt_list[] = {
226 }, 230 },
227}; 231};
228 232
229/** 233/*
230 * Supported standards - 234 * Supported standards -
231 * 235 *
232 * Currently supports two standards only, need to add support for rest of the 236 * Currently supports two standards only, need to add support for rest of the
@@ -931,7 +935,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,
931 * tvp514x_set_pad_format() - V4L2 decoder interface handler for set pad format 935 * tvp514x_set_pad_format() - V4L2 decoder interface handler for set pad format
932 * @sd: pointer to standard V4L2 sub-device structure 936 * @sd: pointer to standard V4L2 sub-device structure
933 * @cfg: pad configuration 937 * @cfg: pad configuration
934 * @format: pointer to v4l2_subdev_format structure 938 * @fmt: pointer to v4l2_subdev_format structure
935 * 939 *
936 * Set pad format for the output pad 940 * Set pad format for the output pad
937 */ 941 */
@@ -1199,7 +1203,7 @@ static const struct tvp514x_reg tvp514xm_init_reg_seq[] = {
1199 {TOK_TERM, 0, 0}, 1203 {TOK_TERM, 0, 0},
1200}; 1204};
1201 1205
1202/** 1206/*
1203 * I2C Device Table - 1207 * I2C Device Table -
1204 * 1208 *
1205 * name - Name of the actual device/chip. 1209 * name - Name of the actual device/chip.
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 11829c0fa138..509d69e6ca4a 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -82,11 +82,11 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
82 * @start_addr_lo: DMA ring buffer start address, lower part 82 * @start_addr_lo: DMA ring buffer start address, lower part
83 * @start_addr_hi: DMA ring buffer start address, higher part 83 * @start_addr_hi: DMA ring buffer start address, higher part
84 * @size: DMA ring buffer size register 84 * @size: DMA ring buffer size register
85 Bits [0-7]: DMA packet size, 188 bytes 85 * * Bits [0-7]: DMA packet size, 188 bytes
86 Bits [16-23]: packets count in block, 128 packets 86 * * Bits [16-23]: packets count in block, 128 packets
87 Bits [24-31]: blocks count, 8 blocks 87 * * Bits [24-31]: blocks count, 8 blocks
88 * @timeout: DMA timeout in units of 8ns 88 * @timeout: DMA timeout in units of 8ns
89 For example, value of 375000000 equals to 3 sec 89 * For example, value of 375000000 equals to 3 sec
90 * @curr_addr_lo: Current ring buffer head address, lower part 90 * @curr_addr_lo: Current ring buffer head address, lower part
91 * @curr_addr_hi: Current ring buffer head address, higher part 91 * @curr_addr_hi: Current ring buffer head address, higher part
92 * @stat_pkt_received: Statistic register, not tested 92 * @stat_pkt_received: Statistic register, not tested
diff --git a/drivers/media/pci/solo6x10/solo6x10-enc.c b/drivers/media/pci/solo6x10/solo6x10-enc.c
index d28211bb9674..58d6b5131dd0 100644
--- a/drivers/media/pci/solo6x10/solo6x10-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-enc.c
@@ -175,7 +175,7 @@ out:
175 return 0; 175 return 0;
176} 176}
177 177
178/** 178/*
179 * Set channel Quality Profile (0-3). 179 * Set channel Quality Profile (0-3).
180 */ 180 */
181void solo_s_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch, 181void solo_s_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch,
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
index eb5a9eae7c8e..dd199bfc1d45 100644
--- a/drivers/media/pci/sta2x11/sta2x11_vip.c
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -404,6 +404,7 @@ static const struct v4l2_file_operations vip_fops = {
404 * vidioc_querycap - return capabilities of device 404 * vidioc_querycap - return capabilities of device
405 * @file: descriptor of device 405 * @file: descriptor of device
406 * @cap: contains return values 406 * @cap: contains return values
407 * @priv: unused
407 * 408 *
408 * the capabilities of the device are returned 409 * the capabilities of the device are returned
409 * 410 *
@@ -429,6 +430,7 @@ static int vidioc_querycap(struct file *file, void *priv,
429 * vidioc_s_std - set video standard 430 * vidioc_s_std - set video standard
430 * @file: descriptor of device 431 * @file: descriptor of device
431 * @std: contains standard to be set 432 * @std: contains standard to be set
433 * @priv: unused
432 * 434 *
433 * the video standard is set 435 * the video standard is set
434 * 436 *
@@ -466,6 +468,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id std)
466/** 468/**
467 * vidioc_g_std - get video standard 469 * vidioc_g_std - get video standard
468 * @file: descriptor of device 470 * @file: descriptor of device
471 * @priv: unused
469 * @std: contains return values 472 * @std: contains return values
470 * 473 *
471 * the current video standard is returned 474 * the current video standard is returned
@@ -483,6 +486,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std)
483/** 486/**
484 * vidioc_querystd - get possible video standards 487 * vidioc_querystd - get possible video standards
485 * @file: descriptor of device 488 * @file: descriptor of device
489 * @priv: unused
486 * @std: contains return values 490 * @std: contains return values
487 * 491 *
488 * all possible video standards are returned 492 * all possible video standards are returned
@@ -512,6 +516,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
512/** 516/**
513 * vidioc_s_input - set input line 517 * vidioc_s_input - set input line
514 * @file: descriptor of device 518 * @file: descriptor of device
519 * @priv: unused
515 * @i: new input line number 520 * @i: new input line number
516 * 521 *
517 * the current active input line is set 522 * the current active input line is set
@@ -538,6 +543,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
538/** 543/**
539 * vidioc_g_input - return input line 544 * vidioc_g_input - return input line
540 * @file: descriptor of device 545 * @file: descriptor of device
546 * @priv: unused
541 * @i: returned input line number 547 * @i: returned input line number
542 * 548 *
543 * the current active input line is returned 549 * the current active input line is returned
@@ -554,6 +560,8 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
554 560
555/** 561/**
556 * vidioc_enum_fmt_vid_cap - return video capture format 562 * vidioc_enum_fmt_vid_cap - return video capture format
563 * @file: descriptor of device
564 * @priv: unused
557 * @f: returned format information 565 * @f: returned format information
558 * 566 *
559 * returns name and format of video capture 567 * returns name and format of video capture
@@ -577,6 +585,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
577/** 585/**
578 * vidioc_try_fmt_vid_cap - set video capture format 586 * vidioc_try_fmt_vid_cap - set video capture format
579 * @file: descriptor of device 587 * @file: descriptor of device
588 * @priv: unused
580 * @f: new format 589 * @f: new format
581 * 590 *
582 * new video format is set which includes width and 591 * new video format is set which includes width and
@@ -639,6 +648,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
639/** 648/**
640 * vidioc_s_fmt_vid_cap - set current video format parameters 649 * vidioc_s_fmt_vid_cap - set current video format parameters
641 * @file: descriptor of device 650 * @file: descriptor of device
651 * @priv: unused
642 * @f: returned format information 652 * @f: returned format information
643 * 653 *
644 * set new capture format 654 * set new capture format
@@ -706,6 +716,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
706/** 716/**
707 * vidioc_g_fmt_vid_cap - get current video format parameters 717 * vidioc_g_fmt_vid_cap - get current video format parameters
708 * @file: descriptor of device 718 * @file: descriptor of device
719 * @priv: unused
709 * @f: contains format information 720 * @f: contains format information
710 * 721 *
711 * returns current video format parameters 722 * returns current video format parameters
diff --git a/drivers/media/pci/tw68/tw68-risc.c b/drivers/media/pci/tw68/tw68-risc.c
index 7439db212a69..82ff9c9494f3 100644
--- a/drivers/media/pci/tw68/tw68-risc.c
+++ b/drivers/media/pci/tw68/tw68-risc.c
@@ -29,14 +29,15 @@
29#include "tw68.h" 29#include "tw68.h"
30 30
31/** 31/**
32 * @rp pointer to current risc program position 32 * tw68_risc_field
33 * @sglist pointer to "scatter-gather list" of buffer pointers 33 * @rp: pointer to current risc program position
34 * @offset offset to target memory buffer 34 * @sglist: pointer to "scatter-gather list" of buffer pointers
35 * @sync_line 0 -> no sync, 1 -> odd sync, 2 -> even sync 35 * @offset: offset to target memory buffer
36 * @bpl number of bytes per scan line 36 * @sync_line: 0 -> no sync, 1 -> odd sync, 2 -> even sync
37 * @padding number of bytes of padding to add 37 * @bpl: number of bytes per scan line
38 * @lines number of lines in field 38 * @padding: number of bytes of padding to add
39 * @jump insert a jump at the start 39 * @lines: number of lines in field
40 * @jump: insert a jump at the start
40 */ 41 */
41static __le32 *tw68_risc_field(__le32 *rp, struct scatterlist *sglist, 42static __le32 *tw68_risc_field(__le32 *rp, struct scatterlist *sglist,
42 unsigned int offset, u32 sync_line, 43 unsigned int offset, u32 sync_line,
@@ -120,18 +121,18 @@ static __le32 *tw68_risc_field(__le32 *rp, struct scatterlist *sglist,
120 * memory for the dma controller "program" and then fills in that 121 * memory for the dma controller "program" and then fills in that
121 * memory with the appropriate "instructions". 122 * memory with the appropriate "instructions".
122 * 123 *
123 * @pci_dev structure with info about the pci 124 * @pci: structure with info about the pci
124 * slot which our device is in. 125 * slot which our device is in.
125 * @risc structure with info about the memory 126 * @buf: structure with info about the memory
126 * used for our controller program. 127 * used for our controller program.
127 * @sglist scatter-gather list entry 128 * @sglist: scatter-gather list entry
128 * @top_offset offset within the risc program area for the 129 * @top_offset: offset within the risc program area for the
129 * first odd frame line 130 * first odd frame line
130 * @bottom_offset offset within the risc program area for the 131 * @bottom_offset: offset within the risc program area for the
131 * first even frame line 132 * first even frame line
132 * @bpl number of data bytes per scan line 133 * @bpl: number of data bytes per scan line
133 * @padding number of extra bytes to add at end of line 134 * @padding: number of extra bytes to add at end of line
134 * @lines number of scan lines 135 * @lines: number of scan lines
135 */ 136 */
136int tw68_risc_buffer(struct pci_dev *pci, 137int tw68_risc_buffer(struct pci_dev *pci,
137 struct tw68_buf *buf, 138 struct tw68_buf *buf,
diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
index 07e89a4985a6..16352e2263d2 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -47,8 +47,9 @@ EXPORT_SYMBOL_GPL(vpif_lock);
47void __iomem *vpif_base; 47void __iomem *vpif_base;
48EXPORT_SYMBOL_GPL(vpif_base); 48EXPORT_SYMBOL_GPL(vpif_base);
49 49
50/** 50/*
51 * vpif_ch_params: video standard configuration parameters for vpif 51 * vpif_ch_params: video standard configuration parameters for vpif
52 *
52 * The table must include all presets from supported subdevices. 53 * The table must include all presets from supported subdevices.
53 */ 54 */
54const struct vpif_channel_config_params vpif_ch_params[] = { 55const struct vpif_channel_config_params vpif_ch_params[] = {
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index a89367ab1e06..fca4dc829f73 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -109,7 +109,7 @@ static int vpif_buffer_prepare(struct vb2_buffer *vb)
109 * @vq: vb2_queue ptr 109 * @vq: vb2_queue ptr
110 * @nbuffers: ptr to number of buffers requested by application 110 * @nbuffers: ptr to number of buffers requested by application
111 * @nplanes:: contains number of distinct video planes needed to hold a frame 111 * @nplanes:: contains number of distinct video planes needed to hold a frame
112 * @sizes[]: contains the size (in bytes) of each plane. 112 * @sizes: contains the size (in bytes) of each plane.
113 * @alloc_devs: ptr to allocation context 113 * @alloc_devs: ptr to allocation context
114 * 114 *
115 * This callback function is called when reqbuf() is called to adjust 115 * This callback function is called when reqbuf() is called to adjust
@@ -167,7 +167,7 @@ static void vpif_buffer_queue(struct vb2_buffer *vb)
167 167
168/** 168/**
169 * vpif_start_streaming : Starts the DMA engine for streaming 169 * vpif_start_streaming : Starts the DMA engine for streaming
170 * @vb: ptr to vb2_buffer 170 * @vq: ptr to vb2_buffer
171 * @count: number of buffers 171 * @count: number of buffers
172 */ 172 */
173static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) 173static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
@@ -629,7 +629,7 @@ static void vpif_calculate_offsets(struct channel_obj *ch)
629 629
630/** 630/**
631 * vpif_get_default_field() - Get default field type based on interface 631 * vpif_get_default_field() - Get default field type based on interface
632 * @vpif_params - ptr to vpif params 632 * @iface: ptr to vpif interface
633 */ 633 */
634static inline enum v4l2_field vpif_get_default_field( 634static inline enum v4l2_field vpif_get_default_field(
635 struct vpif_interface *iface) 635 struct vpif_interface *iface)
@@ -640,8 +640,8 @@ static inline enum v4l2_field vpif_get_default_field(
640 640
641/** 641/**
642 * vpif_config_addr() - function to configure buffer address in vpif 642 * vpif_config_addr() - function to configure buffer address in vpif
643 * @ch - channel ptr 643 * @ch: channel ptr
644 * @muxmode - channel mux mode 644 * @muxmode: channel mux mode
645 */ 645 */
646static void vpif_config_addr(struct channel_obj *ch, int muxmode) 646static void vpif_config_addr(struct channel_obj *ch, int muxmode)
647{ 647{
@@ -661,9 +661,9 @@ static void vpif_config_addr(struct channel_obj *ch, int muxmode)
661 661
662/** 662/**
663 * vpif_input_to_subdev() - Maps input to sub device 663 * vpif_input_to_subdev() - Maps input to sub device
664 * @vpif_cfg - global config ptr 664 * @vpif_cfg: global config ptr
665 * @chan_cfg - channel config ptr 665 * @chan_cfg: channel config ptr
666 * @input_index - Given input index from application 666 * @input_index: Given input index from application
667 * 667 *
668 * lookup the sub device information for a given input index. 668 * lookup the sub device information for a given input index.
669 * we report all the inputs to application. inputs table also 669 * we report all the inputs to application. inputs table also
@@ -699,9 +699,9 @@ static int vpif_input_to_subdev(
699 699
700/** 700/**
701 * vpif_set_input() - Select an input 701 * vpif_set_input() - Select an input
702 * @vpif_cfg - global config ptr 702 * @vpif_cfg: global config ptr
703 * @ch - channel 703 * @ch: channel
704 * @_index - Given input index from application 704 * @index: Given input index from application
705 * 705 *
706 * Select the given input. 706 * Select the given input.
707 */ 707 */
@@ -792,7 +792,7 @@ static int vpif_querystd(struct file *file, void *priv, v4l2_std_id *std_id)
792 * vpif_g_std() - get STD handler 792 * vpif_g_std() - get STD handler
793 * @file: file ptr 793 * @file: file ptr
794 * @priv: file handle 794 * @priv: file handle
795 * @std_id: ptr to std id 795 * @std: ptr to std id
796 */ 796 */
797static int vpif_g_std(struct file *file, void *priv, v4l2_std_id *std) 797static int vpif_g_std(struct file *file, void *priv, v4l2_std_id *std)
798{ 798{
@@ -933,7 +933,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)
933 * vpif_enum_fmt_vid_cap() - ENUM_FMT handler 933 * vpif_enum_fmt_vid_cap() - ENUM_FMT handler
934 * @file: file ptr 934 * @file: file ptr
935 * @priv: file handle 935 * @priv: file handle
936 * @index: input index 936 * @fmt: ptr to V4L2 format descriptor
937 */ 937 */
938static int vpif_enum_fmt_vid_cap(struct file *file, void *priv, 938static int vpif_enum_fmt_vid_cap(struct file *file, void *priv,
939 struct v4l2_fmtdesc *fmt) 939 struct v4l2_fmtdesc *fmt)
@@ -1745,6 +1745,7 @@ static int vpif_remove(struct platform_device *device)
1745#ifdef CONFIG_PM_SLEEP 1745#ifdef CONFIG_PM_SLEEP
1746/** 1746/**
1747 * vpif_suspend: vpif device suspend 1747 * vpif_suspend: vpif device suspend
1748 * @dev: pointer to &struct device
1748 */ 1749 */
1749static int vpif_suspend(struct device *dev) 1750static int vpif_suspend(struct device *dev)
1750{ 1751{
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index ff2f75a328c9..7be636237acf 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -102,7 +102,7 @@ static int vpif_buffer_prepare(struct vb2_buffer *vb)
102 * @vq: vb2_queue ptr 102 * @vq: vb2_queue ptr
103 * @nbuffers: ptr to number of buffers requested by application 103 * @nbuffers: ptr to number of buffers requested by application
104 * @nplanes:: contains number of distinct video planes needed to hold a frame 104 * @nplanes:: contains number of distinct video planes needed to hold a frame
105 * @sizes[]: contains the size (in bytes) of each plane. 105 * @sizes: contains the size (in bytes) of each plane.
106 * @alloc_devs: ptr to allocation context 106 * @alloc_devs: ptr to allocation context
107 * 107 *
108 * This callback function is called when reqbuf() is called to adjust 108 * This callback function is called when reqbuf() is called to adjust
@@ -158,7 +158,7 @@ static void vpif_buffer_queue(struct vb2_buffer *vb)
158 158
159/** 159/**
160 * vpif_start_streaming : Starts the DMA engine for streaming 160 * vpif_start_streaming : Starts the DMA engine for streaming
161 * @vb: ptr to vb2_buffer 161 * @vq: ptr to vb2_buffer
162 * @count: number of buffers 162 * @count: number of buffers
163 */ 163 */
164static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) 164static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
@@ -766,9 +766,9 @@ static int vpif_enum_output(struct file *file, void *fh,
766 766
767/** 767/**
768 * vpif_output_to_subdev() - Maps output to sub device 768 * vpif_output_to_subdev() - Maps output to sub device
769 * @vpif_cfg - global config ptr 769 * @vpif_cfg: global config ptr
770 * @chan_cfg - channel config ptr 770 * @chan_cfg: channel config ptr
771 * @index - Given output index from application 771 * @index: Given output index from application
772 * 772 *
773 * lookup the sub device information for a given output index. 773 * lookup the sub device information for a given output index.
774 * we report all the output to application. output table also 774 * we report all the output to application. output table also
@@ -802,9 +802,9 @@ vpif_output_to_subdev(struct vpif_display_config *vpif_cfg,
802 802
803/** 803/**
804 * vpif_set_output() - Select an output 804 * vpif_set_output() - Select an output
805 * @vpif_cfg - global config ptr 805 * @vpif_cfg: global config ptr
806 * @ch - channel 806 * @ch: channel
807 * @index - Given output index from application 807 * @index: Given output index from application
808 * 808 *
809 * Select the given output. 809 * Select the given output.
810 */ 810 */
diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
index 948fe01f6c96..ed9302caa004 100644
--- a/drivers/media/platform/exynos4-is/fimc-capture.c
+++ b/drivers/media/platform/exynos4-is/fimc-capture.c
@@ -146,6 +146,7 @@ static int fimc_stop_capture(struct fimc_dev *fimc, bool suspend)
146 146
147/** 147/**
148 * fimc_capture_config_update - apply the camera interface configuration 148 * fimc_capture_config_update - apply the camera interface configuration
149 * @ctx: FIMC capture context
149 * 150 *
150 * To be called from within the interrupt handler with fimc.slock 151 * To be called from within the interrupt handler with fimc.slock
151 * spinlock held. It updates the camera pixel crop, rotation and 152 * spinlock held. It updates the camera pixel crop, rotation and
@@ -858,6 +859,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
858 * fimc_get_sensor_frame_desc - query the sensor for media bus frame parameters 859 * fimc_get_sensor_frame_desc - query the sensor for media bus frame parameters
859 * @sensor: pointer to the sensor subdev 860 * @sensor: pointer to the sensor subdev
860 * @plane_fmt: provides plane sizes corresponding to the frame layout entries 861 * @plane_fmt: provides plane sizes corresponding to the frame layout entries
862 * @num_planes: number of planes
861 * @try: true to set the frame parameters, false to query only 863 * @try: true to set the frame parameters, false to query only
862 * 864 *
863 * This function is used by this driver only for compressed/blob data formats. 865 * This function is used by this driver only for compressed/blob data formats.
@@ -1101,6 +1103,7 @@ static int fimc_cap_g_input(struct file *file, void *priv, unsigned int *i)
1101/** 1103/**
1102 * fimc_pipeline_validate - check for formats inconsistencies 1104 * fimc_pipeline_validate - check for formats inconsistencies
1103 * between source and sink pad of each link 1105 * between source and sink pad of each link
1106 * @fimc: the FIMC device this context applies to
1104 * 1107 *
1105 * Return 0 if all formats match or -EPIPE otherwise. 1108 * Return 0 if all formats match or -EPIPE otherwise.
1106 */ 1109 */
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index c15596b56dc9..0ef583cfc424 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -60,6 +60,7 @@ static void __setup_sensor_notification(struct fimc_md *fmd,
60 60
61/** 61/**
62 * fimc_pipeline_prepare - update pipeline information with subdevice pointers 62 * fimc_pipeline_prepare - update pipeline information with subdevice pointers
63 * @p: fimc pipeline
63 * @me: media entity terminating the pipeline 64 * @me: media entity terminating the pipeline
64 * 65 *
65 * Caller holds the graph mutex. 66 * Caller holds the graph mutex.
@@ -151,8 +152,8 @@ static int __subdev_set_power(struct v4l2_subdev *sd, int on)
151 152
152/** 153/**
153 * fimc_pipeline_s_power - change power state of all pipeline subdevs 154 * fimc_pipeline_s_power - change power state of all pipeline subdevs
154 * @fimc: fimc device terminating the pipeline 155 * @p: fimc device terminating the pipeline
155 * @state: true to power on, false to power off 156 * @on: true to power on, false to power off
156 * 157 *
157 * Needs to be called with the graph mutex held. 158 * Needs to be called with the graph mutex held.
158 */ 159 */
@@ -219,6 +220,7 @@ static int __fimc_pipeline_enable(struct exynos_media_pipeline *ep,
219/** 220/**
220 * __fimc_pipeline_open - update the pipeline information, enable power 221 * __fimc_pipeline_open - update the pipeline information, enable power
221 * of all pipeline subdevs and the sensor clock 222 * of all pipeline subdevs and the sensor clock
223 * @ep: fimc device terminating the pipeline
222 * @me: media entity to start graph walk with 224 * @me: media entity to start graph walk with
223 * @prepare: true to walk the current pipeline and acquire all subdevs 225 * @prepare: true to walk the current pipeline and acquire all subdevs
224 * 226 *
@@ -252,7 +254,7 @@ static int __fimc_pipeline_open(struct exynos_media_pipeline *ep,
252 254
253/** 255/**
254 * __fimc_pipeline_close - disable the sensor clock and pipeline power 256 * __fimc_pipeline_close - disable the sensor clock and pipeline power
255 * @fimc: fimc device terminating the pipeline 257 * @ep: fimc device terminating the pipeline
256 * 258 *
257 * Disable power of all subdevs and turn the external sensor clock off. 259 * Disable power of all subdevs and turn the external sensor clock off.
258 */ 260 */
@@ -281,7 +283,7 @@ static int __fimc_pipeline_close(struct exynos_media_pipeline *ep)
281 283
282/** 284/**
283 * __fimc_pipeline_s_stream - call s_stream() on pipeline subdevs 285 * __fimc_pipeline_s_stream - call s_stream() on pipeline subdevs
284 * @pipeline: video pipeline structure 286 * @ep: video pipeline structure
285 * @on: passed as the s_stream() callback argument 287 * @on: passed as the s_stream() callback argument
286 */ 288 */
287static int __fimc_pipeline_s_stream(struct exynos_media_pipeline *ep, bool on) 289static int __fimc_pipeline_s_stream(struct exynos_media_pipeline *ep, bool on)
@@ -902,6 +904,7 @@ static int __fimc_md_create_fimc_is_links(struct fimc_md *fmd)
902 904
903/** 905/**
904 * fimc_md_create_links - create default links between registered entities 906 * fimc_md_create_links - create default links between registered entities
907 * @fmd: fimc media device
905 * 908 *
906 * Parallel interface sensor entities are connected directly to FIMC capture 909 * Parallel interface sensor entities are connected directly to FIMC capture
907 * entities. The sensors using MIPI CSIS bus are connected through immutable 910 * entities. The sensors using MIPI CSIS bus are connected through immutable
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index 560aadabcb11..cba46a656338 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -189,7 +189,7 @@ struct csis_drvdata {
189 * @irq: requested s5p-mipi-csis irq number 189 * @irq: requested s5p-mipi-csis irq number
190 * @interrupt_mask: interrupt mask of the all used interrupts 190 * @interrupt_mask: interrupt mask of the all used interrupts
191 * @flags: the state variable for power and streaming control 191 * @flags: the state variable for power and streaming control
192 * @clock_frequency: device bus clock frequency 192 * @clk_frequency: device bus clock frequency
193 * @hs_settle: HS-RX settle time 193 * @hs_settle: HS-RX settle time
194 * @num_lanes: number of MIPI-CSI data lanes used 194 * @num_lanes: number of MIPI-CSI data lanes used
195 * @max_num_lanes: maximum number of MIPI-CSI data lanes supported 195 * @max_num_lanes: maximum number of MIPI-CSI data lanes supported
diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
index b7731b18ecae..aa3ce41898bc 100644
--- a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
@@ -59,6 +59,7 @@ struct h264_fb {
59 * @read_idx : read index 59 * @read_idx : read index
60 * @write_idx : write index 60 * @write_idx : write index
61 * @count : buffer count in list 61 * @count : buffer count in list
62 * @reserved : for 8 bytes alignment
62 */ 63 */
63struct h264_ring_fb_list { 64struct h264_ring_fb_list {
64 struct h264_fb fb_list[H264_MAX_FB_NUM]; 65 struct h264_fb fb_list[H264_MAX_FB_NUM];
diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c
index b9fad6a48879..3e84a761db3a 100644
--- a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c
@@ -155,7 +155,6 @@ struct vdec_vp8_vpu_inst {
155 * @reg_base : HW register base address 155 * @reg_base : HW register base address
156 * @frm_cnt : decode frame count 156 * @frm_cnt : decode frame count
157 * @ctx : V4L2 context 157 * @ctx : V4L2 context
158 * @dev : platform device
159 * @vpu : VPU instance for decoder 158 * @vpu : VPU instance for decoder
160 * @vsi : VPU share information 159 * @vsi : VPU share information
161 */ 160 */
diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c
index 4eb3be37ba14..6cf31b366aad 100644
--- a/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c
+++ b/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c
@@ -34,7 +34,7 @@ static const char h264_filler_marker[] = {0x0, 0x0, 0x0, 0x1, 0xc};
34#define H264_FILLER_MARKER_SIZE ARRAY_SIZE(h264_filler_marker) 34#define H264_FILLER_MARKER_SIZE ARRAY_SIZE(h264_filler_marker)
35#define VENC_PIC_BITSTREAM_BYTE_CNT 0x0098 35#define VENC_PIC_BITSTREAM_BYTE_CNT 0x0098
36 36
37/** 37/*
38 * enum venc_h264_vpu_work_buf - h264 encoder buffer index 38 * enum venc_h264_vpu_work_buf - h264 encoder buffer index
39 */ 39 */
40enum venc_h264_vpu_work_buf { 40enum venc_h264_vpu_work_buf {
@@ -50,7 +50,7 @@ enum venc_h264_vpu_work_buf {
50 VENC_H264_VPU_WORK_BUF_MAX, 50 VENC_H264_VPU_WORK_BUF_MAX,
51}; 51};
52 52
53/** 53/*
54 * enum venc_h264_bs_mode - for bs_mode argument in h264_enc_vpu_encode 54 * enum venc_h264_bs_mode - for bs_mode argument in h264_enc_vpu_encode
55 */ 55 */
56enum venc_h264_bs_mode { 56enum venc_h264_bs_mode {
diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c
index acb639c4abd2..957420dd60de 100644
--- a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c
+++ b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c
@@ -34,7 +34,7 @@
34/* This ac_tag is vp8 frame tag. */ 34/* This ac_tag is vp8 frame tag. */
35#define MAX_AC_TAG_SIZE 10 35#define MAX_AC_TAG_SIZE 10
36 36
37/** 37/*
38 * enum venc_vp8_vpu_work_buf - vp8 encoder buffer index 38 * enum venc_vp8_vpu_work_buf - vp8 encoder buffer index
39 */ 39 */
40enum venc_vp8_vpu_work_buf { 40enum venc_vp8_vpu_work_buf {
diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c
index 853d598937f6..1ff6a93262b7 100644
--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -181,6 +181,7 @@ struct share_obj {
181 * @extmem: VPU extended memory information 181 * @extmem: VPU extended memory information
182 * @reg: VPU TCM and configuration registers 182 * @reg: VPU TCM and configuration registers
183 * @run: VPU initialization status 183 * @run: VPU initialization status
184 * @wdt: VPU watchdog workqueue
184 * @ipi_desc: VPU IPI descriptor 185 * @ipi_desc: VPU IPI descriptor
185 * @recv_buf: VPU DTCM share buffer for receiving. The 186 * @recv_buf: VPU DTCM share buffer for receiving. The
186 * receive buffer is only accessed in interrupt context. 187 * receive buffer is only accessed in interrupt context.
@@ -194,7 +195,7 @@ struct share_obj {
194 * suppose a client is using VPU to decode VP8. 195 * suppose a client is using VPU to decode VP8.
195 * If the other client wants to encode VP8, 196 * If the other client wants to encode VP8,
196 * it has to wait until VP8 decode completes. 197 * it has to wait until VP8 decode completes.
197 * @wdt_refcnt WDT reference count to make sure the watchdog can be 198 * @wdt_refcnt: WDT reference count to make sure the watchdog can be
198 * disabled if no other client is using VPU service 199 * disabled if no other client is using VPU service
199 * @ack_wq: The wait queue for each codec and mdp. When sleeping 200 * @ack_wq: The wait queue for each codec and mdp. When sleeping
200 * processes wake up, they will check the condition 201 * processes wake up, they will check the condition
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index 9d3f0cb1d95a..295f34ad1080 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -235,6 +235,7 @@ enum pxa_mbus_layout {
235 * stored in memory in the following way: 235 * stored in memory in the following way:
236 * @packing: Type of sample-packing, that has to be used 236 * @packing: Type of sample-packing, that has to be used
237 * @order: Sample order when storing in memory 237 * @order: Sample order when storing in memory
238 * @layout: Planes layout in memory
238 * @bits_per_sample: How many bits the bridge has to sample 239 * @bits_per_sample: How many bits the bridge has to sample
239 */ 240 */
240struct pxa_mbus_pixelfmt { 241struct pxa_mbus_pixelfmt {
@@ -852,10 +853,10 @@ static void pxa_camera_dma_irq_v(void *data)
852/** 853/**
853 * pxa_init_dma_channel - init dma descriptors 854 * pxa_init_dma_channel - init dma descriptors
854 * @pcdev: pxa camera device 855 * @pcdev: pxa camera device
855 * @vb: videobuffer2 buffer 856 * @buf: pxa camera buffer
856 * @dma: dma video buffer
857 * @channel: dma channel (0 => 'Y', 1 => 'U', 2 => 'V') 857 * @channel: dma channel (0 => 'Y', 1 => 'U', 2 => 'V')
858 * @cibr: camera Receive Buffer Register 858 * @sg: dma scatter list
859 * @sglen: dma scatter list length
859 * 860 *
860 * Prepares the pxa dma descriptors to transfer one camera channel. 861 * Prepares the pxa dma descriptors to transfer one camera channel.
861 * 862 *
@@ -1010,6 +1011,8 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev,
1010/** 1011/**
1011 * pxa_camera_check_link_miss - check missed DMA linking 1012 * pxa_camera_check_link_miss - check missed DMA linking
1012 * @pcdev: camera device 1013 * @pcdev: camera device
1014 * @last_submitted: an opaque DMA cookie for last submitted
1015 * @last_issued: an opaque DMA cookie for last issued
1013 * 1016 *
1014 * The DMA chaining is done with DMA running. This means a tiny temporal window 1017 * The DMA chaining is done with DMA running. This means a tiny temporal window
1015 * remains, where a buffer is queued on the chain, while the chain is already 1018 * remains, where a buffer is queued on the chain, while the chain is already
diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c
index 3245bc45f4a0..b13dec3081e5 100644
--- a/drivers/media/platform/rcar_fdp1.c
+++ b/drivers/media/platform/rcar_fdp1.c
@@ -1132,7 +1132,7 @@ static int fdp1_device_process(struct fdp1_ctx *ctx)
1132 * mem2mem callbacks 1132 * mem2mem callbacks
1133 */ 1133 */
1134 1134
1135/** 1135/*
1136 * job_ready() - check whether an instance is ready to be scheduled to run 1136 * job_ready() - check whether an instance is ready to be scheduled to run
1137 */ 1137 */
1138static int fdp1_m2m_job_ready(void *priv) 1138static int fdp1_m2m_job_ready(void *priv)
diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c
index 070bac36d766..f6092ae45912 100644
--- a/drivers/media/platform/rcar_jpu.c
+++ b/drivers/media/platform/rcar_jpu.c
@@ -257,7 +257,7 @@ struct jpu_fmt {
257}; 257};
258 258
259/** 259/**
260 * jpu_q_data - parameters of one queue 260 * struct jpu_q_data - parameters of one queue
261 * @fmtinfo: driver-specific format of this queue 261 * @fmtinfo: driver-specific format of this queue
262 * @format: multiplanar format of this queue 262 * @format: multiplanar format of this queue
263 * @sequence: sequence number 263 * @sequence: sequence number
@@ -269,7 +269,7 @@ struct jpu_q_data {
269}; 269};
270 270
271/** 271/**
272 * jpu_ctx - the device context data 272 * struct jpu_ctx - the device context data
273 * @jpu: JPEG IP device for this context 273 * @jpu: JPEG IP device for this context
274 * @encoder: compression (encode) operation or decompression (decode) 274 * @encoder: compression (encode) operation or decompression (decode)
275 * @compr_quality: destination image quality in compression (encode) mode 275 * @compr_quality: destination image quality in compression (encode) mode
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index c4ab63986c8f..79bc0ef6bb41 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -103,6 +103,7 @@ static const struct camif_fmt camif_formats[] = {
103 103
104/** 104/**
105 * s3c_camif_find_format() - lookup camif color format by fourcc or an index 105 * s3c_camif_find_format() - lookup camif color format by fourcc or an index
106 * @vp: video path (DMA) description (codec/preview)
106 * @pixelformat: fourcc to match, ignored if null 107 * @pixelformat: fourcc to match, ignored if null
107 * @index: index to the camif_formats array, ignored if negative 108 * @index: index to the camif_formats array, ignored if negative
108 */ 109 */
diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index 15a562af13c7..dedc1b024f6f 100644
--- a/drivers/media/platform/sh_veu.c
+++ b/drivers/media/platform/sh_veu.c
@@ -267,7 +267,7 @@ static void sh_veu_process(struct sh_veu_dev *veu,
267 sh_veu_reg_write(veu, VEU_EIER, 1); /* enable interrupt in VEU */ 267 sh_veu_reg_write(veu, VEU_EIER, 1); /* enable interrupt in VEU */
268} 268}
269 269
270/** 270/*
271 * sh_veu_device_run() - prepares and starts the device 271 * sh_veu_device_run() - prepares and starts the device
272 * 272 *
273 * This will be called by the framework when it decides to schedule a particular 273 * This will be called by the framework when it decides to schedule a particular
diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c
index 0116097c0c0f..270ec613c27c 100644
--- a/drivers/media/platform/soc_camera/soc_scale_crop.c
+++ b/drivers/media/platform/soc_camera/soc_scale_crop.c
@@ -306,16 +306,17 @@ update_cache:
306} 306}
307 307
308/** 308/**
309 * @icd - soc-camera device 309 * soc_camera_client_scale
310 * @rect - camera cropping window 310 * @icd: soc-camera device
311 * @subrect - part of rect, sent to the user 311 * @rect: camera cropping window
312 * @mf - in- / output camera output window 312 * @subrect: part of rect, sent to the user
313 * @width - on input: max host input width 313 * @mf: in- / output camera output window
314 * on output: user width, mapped back to input 314 * @width: on input: max host input width;
315 * @height - on input: max host input height 315 * on output: user width, mapped back to input
316 * on output: user height, mapped back to input 316 * @height: on input: max host input height;
317 * @host_can_scale - host can scale this pixel format 317 * on output: user height, mapped back to input
318 * @shift - shift, used for scaling 318 * @host_can_scale: host can scale this pixel format
319 * @shift: shift, used for scaling
319 */ 320 */
320int soc_camera_client_scale(struct soc_camera_device *icd, 321int soc_camera_client_scale(struct soc_camera_device *icd,
321 struct v4l2_rect *rect, struct v4l2_rect *subrect, 322 struct v4l2_rect *rect, struct v4l2_rect *subrect,
diff --git a/drivers/media/platform/sti/hva/hva-h264.c b/drivers/media/platform/sti/hva/hva-h264.c
index a7e5eed17ada..17f1eb0ba957 100644
--- a/drivers/media/platform/sti/hva/hva-h264.c
+++ b/drivers/media/platform/sti/hva/hva-h264.c
@@ -134,7 +134,7 @@ enum hva_h264_sei_payload_type {
134 SEI_FRAME_PACKING_ARRANGEMENT = 45 134 SEI_FRAME_PACKING_ARRANGEMENT = 45
135}; 135};
136 136
137/** 137/*
138 * stereo Video Info struct 138 * stereo Video Info struct
139 */ 139 */
140struct hva_h264_stereo_video_sei { 140struct hva_h264_stereo_video_sei {
@@ -146,7 +146,9 @@ struct hva_h264_stereo_video_sei {
146 u8 right_view_self_contained_flag; 146 u8 right_view_self_contained_flag;
147}; 147};
148 148
149/** 149/*
150 * struct hva_h264_td
151 *
150 * @frame_width: width in pixels of the buffer containing the input frame 152 * @frame_width: width in pixels of the buffer containing the input frame
151 * @frame_height: height in pixels of the buffer containing the input frame 153 * @frame_height: height in pixels of the buffer containing the input frame
152 * @frame_num: the parameter to be written in the slice header 154 * @frame_num: the parameter to be written in the slice header
@@ -352,7 +354,9 @@ struct hva_h264_td {
352 u32 addr_brc_in_out_parameter; 354 u32 addr_brc_in_out_parameter;
353}; 355};
354 356
355/** 357/*
358 * struct hva_h264_slice_po
359 *
356 * @ slice_size: slice size 360 * @ slice_size: slice size
357 * @ slice_start_time: start time 361 * @ slice_start_time: start time
358 * @ slice_stop_time: stop time 362 * @ slice_stop_time: stop time
@@ -365,7 +369,9 @@ struct hva_h264_slice_po {
365 u32 slice_num; 369 u32 slice_num;
366}; 370};
367 371
368/** 372/*
373 * struct hva_h264_po
374 *
369 * @ bitstream_size: bitstream size 375 * @ bitstream_size: bitstream size
370 * @ dct_bitstream_size: dtc bitstream size 376 * @ dct_bitstream_size: dtc bitstream size
371 * @ stuffing_bits: number of stuffing bits inserted by the encoder 377 * @ stuffing_bits: number of stuffing bits inserted by the encoder
@@ -391,7 +397,9 @@ struct hva_h264_task {
391 struct hva_h264_po po; 397 struct hva_h264_po po;
392}; 398};
393 399
394/** 400/*
401 * struct hva_h264_ctx
402 *
395 * @seq_info: sequence information buffer 403 * @seq_info: sequence information buffer
396 * @ref_frame: reference frame buffer 404 * @ref_frame: reference frame buffer
397 * @rec_frame: reconstructed frame buffer 405 * @rec_frame: reconstructed frame buffer
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
index 45bd10544189..e395aa85c8ad 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -926,7 +926,7 @@ static struct vpe_ctx *file2ctx(struct file *file)
926 * mem2mem callbacks 926 * mem2mem callbacks
927 */ 927 */
928 928
929/** 929/*
930 * job_ready() - check whether an instance is ready to be scheduled to run 930 * job_ready() - check whether an instance is ready to be scheduled to run
931 */ 931 */
932static int job_ready(void *priv) 932static int job_ready(void *priv)
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index 7bf9fa2f8534..065483e62db4 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -343,7 +343,7 @@ static void schedule_irq(struct vim2m_dev *dev, int msec_timeout)
343 * mem2mem callbacks 343 * mem2mem callbacks
344 */ 344 */
345 345
346/** 346/*
347 * job_ready() - check whether an instance is ready to be scheduled to run 347 * job_ready() - check whether an instance is ready to be scheduled to run
348 */ 348 */
349static int job_ready(void *priv) 349static int job_ready(void *priv)
diff --git a/drivers/media/platform/vsp1/vsp1_dl.c b/drivers/media/platform/vsp1/vsp1_dl.c
index 8b5cbb6b7a70..4257451f1bd8 100644
--- a/drivers/media/platform/vsp1/vsp1_dl.c
+++ b/drivers/media/platform/vsp1/vsp1_dl.c
@@ -70,6 +70,7 @@ struct vsp1_dl_body {
70 * @dma: DMA address for the header 70 * @dma: DMA address for the header
71 * @body0: first display list body 71 * @body0: first display list body
72 * @fragments: list of extra display list bodies 72 * @fragments: list of extra display list bodies
73 * @has_chain: if true, indicates that there's a partition chain
73 * @chain: entry in the display list partition chain 74 * @chain: entry in the display list partition chain
74 */ 75 */
75struct vsp1_dl_list { 76struct vsp1_dl_list {
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
index 271f725b17e8..540ac887a63c 100644
--- a/drivers/media/radio/radio-si476x.c
+++ b/drivers/media/radio/radio-si476x.c
@@ -158,7 +158,7 @@ enum si476x_ctrl_idx {
158}; 158};
159static struct v4l2_ctrl_config si476x_ctrls[] = { 159static struct v4l2_ctrl_config si476x_ctrls[] = {
160 160
161 /** 161 /*
162 * SI476X during its station seeking(or tuning) process uses several 162 * SI476X during its station seeking(or tuning) process uses several
163 * parameters to detrmine if "the station" is valid: 163 * parameters to detrmine if "the station" is valid:
164 * 164 *
@@ -197,7 +197,7 @@ static struct v4l2_ctrl_config si476x_ctrls[] = {
197 .step = 2, 197 .step = 2,
198 }, 198 },
199 199
200 /** 200 /*
201 * #V4L2_CID_SI476X_HARMONICS_COUNT -- number of harmonics 201 * #V4L2_CID_SI476X_HARMONICS_COUNT -- number of harmonics
202 * built-in power-line noise supression filter is to reject 202 * built-in power-line noise supression filter is to reject
203 * during AM-mode operation. 203 * during AM-mode operation.
@@ -213,7 +213,7 @@ static struct v4l2_ctrl_config si476x_ctrls[] = {
213 .step = 1, 213 .step = 1,
214 }, 214 },
215 215
216 /** 216 /*
217 * #V4L2_CID_SI476X_DIVERSITY_MODE -- configuration which 217 * #V4L2_CID_SI476X_DIVERSITY_MODE -- configuration which
218 * two tuners working in diversity mode are to work in. 218 * two tuners working in diversity mode are to work in.
219 * 219 *
@@ -237,7 +237,7 @@ static struct v4l2_ctrl_config si476x_ctrls[] = {
237 .max = ARRAY_SIZE(phase_diversity_modes) - 1, 237 .max = ARRAY_SIZE(phase_diversity_modes) - 1,
238 }, 238 },
239 239
240 /** 240 /*
241 * #V4L2_CID_SI476X_INTERCHIP_LINK -- inter-chip link in 241 * #V4L2_CID_SI476X_INTERCHIP_LINK -- inter-chip link in
242 * diversity mode indicator. Allows user to determine if two 242 * diversity mode indicator. Allows user to determine if two
243 * chips working in diversity mode have established a link 243 * chips working in diversity mode have established a link
@@ -296,11 +296,15 @@ struct si476x_radio_ops {
296/** 296/**
297 * struct si476x_radio - radio device 297 * struct si476x_radio - radio device
298 * 298 *
299 * @core: Pointer to underlying core device 299 * @v4l2dev: Pointer to V4L2 device created by V4L2 subsystem
300 * @videodev: Pointer to video device created by V4L2 subsystem 300 * @videodev: Pointer to video device created by V4L2 subsystem
301 * @ctrl_handler: V4L2 controls handler
302 * @core: Pointer to underlying core device
301 * @ops: Vtable of functions. See struct si476x_radio_ops for details 303 * @ops: Vtable of functions. See struct si476x_radio_ops for details
302 * @kref: Reference counter 304 * @debugfs: pointer to &strucd dentry for debugfs
303 * @core_lock: An r/w semaphore to brebvent the deletion of underlying 305 * @audmode: audio mode, as defined for the rxsubchans field
306 * at videodev2.h
307 *
304 * core structure is the radio device is being used 308 * core structure is the radio device is being used
305 */ 309 */
306struct si476x_radio { 310struct si476x_radio {
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index 903fcd5e99c0..3cbdc085c65d 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1330,7 +1330,7 @@ static int wl1273_fm_vidioc_s_input(struct file *file, void *priv,
1330 1330
1331/** 1331/**
1332 * wl1273_fm_set_tx_power() - Set the transmission power value. 1332 * wl1273_fm_set_tx_power() - Set the transmission power value.
1333 * @core: A pointer to the device struct. 1333 * @radio: A pointer to the device struct.
1334 * @power: The new power value. 1334 * @power: The new power value.
1335 */ 1335 */
1336static int wl1273_fm_set_tx_power(struct wl1273_device *radio, u16 power) 1336static int wl1273_fm_set_tx_power(struct wl1273_device *radio, u16 power)
diff --git a/drivers/media/rc/img-ir/img-ir-hw.c b/drivers/media/rc/img-ir/img-ir-hw.c
index f54bc5d23893..ec4ded84cd17 100644
--- a/drivers/media/rc/img-ir/img-ir-hw.c
+++ b/drivers/media/rc/img-ir/img-ir-hw.c
@@ -339,7 +339,7 @@ static void img_ir_decoder_preprocess(struct img_ir_decoder *decoder)
339/** 339/**
340 * img_ir_decoder_convert() - Generate internal timings in decoder. 340 * img_ir_decoder_convert() - Generate internal timings in decoder.
341 * @decoder: Decoder to be converted to internal timings. 341 * @decoder: Decoder to be converted to internal timings.
342 * @timings: Timing register values. 342 * @reg_timings: Timing register values.
343 * @clock_hz: IR clock rate in Hz. 343 * @clock_hz: IR clock rate in Hz.
344 * 344 *
345 * Fills out the repeat timings and timing register values for a specific clock 345 * Fills out the repeat timings and timing register values for a specific clock
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index b25b35b3f6da..eb943e862515 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -492,7 +492,7 @@ static void free_imon_context(struct imon_context *ictx)
492 dev_dbg(dev, "%s: iMON context freed\n", __func__); 492 dev_dbg(dev, "%s: iMON context freed\n", __func__);
493} 493}
494 494
495/** 495/*
496 * Called when the Display device (e.g. /dev/lcd0) 496 * Called when the Display device (e.g. /dev/lcd0)
497 * is opened by the application. 497 * is opened by the application.
498 */ 498 */
@@ -542,7 +542,7 @@ exit:
542 return retval; 542 return retval;
543} 543}
544 544
545/** 545/*
546 * Called when the display device (e.g. /dev/lcd0) 546 * Called when the display device (e.g. /dev/lcd0)
547 * is closed by the application. 547 * is closed by the application.
548 */ 548 */
@@ -575,7 +575,7 @@ static int display_close(struct inode *inode, struct file *file)
575 return retval; 575 return retval;
576} 576}
577 577
578/** 578/*
579 * Sends a packet to the device -- this function must be called with 579 * Sends a packet to the device -- this function must be called with
580 * ictx->lock held, or its unlock/lock sequence while waiting for tx 580 * ictx->lock held, or its unlock/lock sequence while waiting for tx
581 * to complete can/will lead to a deadlock. 581 * to complete can/will lead to a deadlock.
@@ -664,7 +664,7 @@ static int send_packet(struct imon_context *ictx)
664 return retval; 664 return retval;
665} 665}
666 666
667/** 667/*
668 * Sends an associate packet to the iMON 2.4G. 668 * Sends an associate packet to the iMON 2.4G.
669 * 669 *
670 * This might not be such a good idea, since it has an id collision with 670 * This might not be such a good idea, since it has an id collision with
@@ -694,7 +694,7 @@ static int send_associate_24g(struct imon_context *ictx)
694 return retval; 694 return retval;
695} 695}
696 696
697/** 697/*
698 * Sends packets to setup and show clock on iMON display 698 * Sends packets to setup and show clock on iMON display
699 * 699 *
700 * Arguments: year - last 2 digits of year, month - 1..12, 700 * Arguments: year - last 2 digits of year, month - 1..12,
@@ -781,7 +781,7 @@ static int send_set_imon_clock(struct imon_context *ictx,
781 return retval; 781 return retval;
782} 782}
783 783
784/** 784/*
785 * These are the sysfs functions to handle the association on the iMON 2.4G LT. 785 * These are the sysfs functions to handle the association on the iMON 2.4G LT.
786 */ 786 */
787static ssize_t show_associate_remote(struct device *d, 787static ssize_t show_associate_remote(struct device *d,
@@ -823,7 +823,7 @@ static ssize_t store_associate_remote(struct device *d,
823 return count; 823 return count;
824} 824}
825 825
826/** 826/*
827 * sysfs functions to control internal imon clock 827 * sysfs functions to control internal imon clock
828 */ 828 */
829static ssize_t show_imon_clock(struct device *d, 829static ssize_t show_imon_clock(struct device *d,
@@ -923,7 +923,7 @@ static const struct attribute_group imon_rf_attr_group = {
923 .attrs = imon_rf_sysfs_entries 923 .attrs = imon_rf_sysfs_entries
924}; 924};
925 925
926/** 926/*
927 * Writes data to the VFD. The iMON VFD is 2x16 characters 927 * Writes data to the VFD. The iMON VFD is 2x16 characters
928 * and requires data in 5 consecutive USB interrupt packets, 928 * and requires data in 5 consecutive USB interrupt packets,
929 * each packet but the last carrying 7 bytes. 929 * each packet but the last carrying 7 bytes.
@@ -1008,7 +1008,7 @@ exit:
1008 return (!retval) ? n_bytes : retval; 1008 return (!retval) ? n_bytes : retval;
1009} 1009}
1010 1010
1011/** 1011/*
1012 * Writes data to the LCD. The iMON OEM LCD screen expects 8-byte 1012 * Writes data to the LCD. The iMON OEM LCD screen expects 8-byte
1013 * packets. We accept data as 16 hexadecimal digits, followed by a 1013 * packets. We accept data as 16 hexadecimal digits, followed by a
1014 * newline (to make it easy to drive the device from a command-line 1014 * newline (to make it easy to drive the device from a command-line
@@ -1066,7 +1066,7 @@ exit:
1066 return (!retval) ? n_bytes : retval; 1066 return (!retval) ? n_bytes : retval;
1067} 1067}
1068 1068
1069/** 1069/*
1070 * Callback function for USB core API: transmit data 1070 * Callback function for USB core API: transmit data
1071 */ 1071 */
1072static void usb_tx_callback(struct urb *urb) 1072static void usb_tx_callback(struct urb *urb)
@@ -1087,7 +1087,7 @@ static void usb_tx_callback(struct urb *urb)
1087 complete(&ictx->tx.finished); 1087 complete(&ictx->tx.finished);
1088} 1088}
1089 1089
1090/** 1090/*
1091 * report touchscreen input 1091 * report touchscreen input
1092 */ 1092 */
1093static void imon_touch_display_timeout(struct timer_list *t) 1093static void imon_touch_display_timeout(struct timer_list *t)
@@ -1103,7 +1103,7 @@ static void imon_touch_display_timeout(struct timer_list *t)
1103 input_sync(ictx->touch); 1103 input_sync(ictx->touch);
1104} 1104}
1105 1105
1106/** 1106/*
1107 * iMON IR receivers support two different signal sets -- those used by 1107 * iMON IR receivers support two different signal sets -- those used by
1108 * the iMON remotes, and those used by the Windows MCE remotes (which is 1108 * the iMON remotes, and those used by the Windows MCE remotes (which is
1109 * really just RC-6), but only one or the other at a time, as the signals 1109 * really just RC-6), but only one or the other at a time, as the signals
@@ -1191,7 +1191,7 @@ static inline int tv2int(const struct timeval *a, const struct timeval *b)
1191 return sec; 1191 return sec;
1192} 1192}
1193 1193
1194/** 1194/*
1195 * The directional pad behaves a bit differently, depending on whether this is 1195 * The directional pad behaves a bit differently, depending on whether this is
1196 * one of the older ffdc devices or a newer device. Newer devices appear to 1196 * one of the older ffdc devices or a newer device. Newer devices appear to
1197 * have a higher resolution matrix for more precise mouse movement, but it 1197 * have a higher resolution matrix for more precise mouse movement, but it
@@ -1543,7 +1543,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
1543 } 1543 }
1544} 1544}
1545 1545
1546/** 1546/*
1547 * figure out if these is a press or a release. We don't actually 1547 * figure out if these is a press or a release. We don't actually
1548 * care about repeats, as those will be auto-generated within the IR 1548 * care about repeats, as those will be auto-generated within the IR
1549 * subsystem for repeating scancodes. 1549 * subsystem for repeating scancodes.
@@ -1592,10 +1592,10 @@ static int imon_parse_press_type(struct imon_context *ictx,
1592 return press_type; 1592 return press_type;
1593} 1593}
1594 1594
1595/** 1595/*
1596 * Process the incoming packet 1596 * Process the incoming packet
1597 */ 1597 */
1598/** 1598/*
1599 * Convert bit count to time duration (in us) and submit 1599 * Convert bit count to time duration (in us) and submit
1600 * the value to lirc_dev. 1600 * the value to lirc_dev.
1601 */ 1601 */
@@ -1608,7 +1608,7 @@ static void submit_data(struct imon_context *context)
1608 ir_raw_event_store_with_filter(context->rdev, &ev); 1608 ir_raw_event_store_with_filter(context->rdev, &ev);
1609} 1609}
1610 1610
1611/** 1611/*
1612 * Process the incoming packet 1612 * Process the incoming packet
1613 */ 1613 */
1614static void imon_incoming_ir_raw(struct imon_context *context, 1614static void imon_incoming_ir_raw(struct imon_context *context,
@@ -1831,7 +1831,7 @@ not_input_data:
1831 } 1831 }
1832} 1832}
1833 1833
1834/** 1834/*
1835 * Callback function for USB core API: receive data 1835 * Callback function for USB core API: receive data
1836 */ 1836 */
1837static void usb_rx_callback_intf0(struct urb *urb) 1837static void usb_rx_callback_intf0(struct urb *urb)
@@ -2485,7 +2485,7 @@ static void imon_init_display(struct imon_context *ictx,
2485 2485
2486} 2486}
2487 2487
2488/** 2488/*
2489 * Callback function for USB core API: Probe 2489 * Callback function for USB core API: Probe
2490 */ 2490 */
2491static int imon_probe(struct usb_interface *interface, 2491static int imon_probe(struct usb_interface *interface,
@@ -2583,7 +2583,7 @@ fail:
2583 return ret; 2583 return ret;
2584} 2584}
2585 2585
2586/** 2586/*
2587 * Callback function for USB core API: disconnect 2587 * Callback function for USB core API: disconnect
2588 */ 2588 */
2589static void imon_disconnect(struct usb_interface *interface) 2589static void imon_disconnect(struct usb_interface *interface)
diff --git a/drivers/media/rc/ir-jvc-decoder.c b/drivers/media/rc/ir-jvc-decoder.c
index e2bd68c42edf..22c8aee3df4f 100644
--- a/drivers/media/rc/ir-jvc-decoder.c
+++ b/drivers/media/rc/ir-jvc-decoder.c
@@ -39,7 +39,7 @@ enum jvc_state {
39/** 39/**
40 * ir_jvc_decode() - Decode one JVC pulse or space 40 * ir_jvc_decode() - Decode one JVC pulse or space
41 * @dev: the struct rc_dev descriptor of the device 41 * @dev: the struct rc_dev descriptor of the device
42 * @duration: the struct ir_raw_event descriptor of the pulse/space 42 * @ev: the struct ir_raw_event descriptor of the pulse/space
43 * 43 *
44 * This function returns -EINVAL if the pulse violates the state machine 44 * This function returns -EINVAL if the pulse violates the state machine
45 */ 45 */
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c
index 8f2f37412fc5..4fd4521693d9 100644
--- a/drivers/media/rc/ir-lirc-codec.c
+++ b/drivers/media/rc/ir-lirc-codec.c
@@ -25,8 +25,8 @@
25/** 25/**
26 * ir_lirc_decode() - Send raw IR data to lirc_dev to be relayed to the 26 * ir_lirc_decode() - Send raw IR data to lirc_dev to be relayed to the
27 * lircd userspace daemon for decoding. 27 * lircd userspace daemon for decoding.
28 * @input_dev: the struct rc_dev descriptor of the device 28 * @dev: the struct rc_dev descriptor of the device
29 * @duration: the struct ir_raw_event descriptor of the pulse/space 29 * @ev: the struct ir_raw_event descriptor of the pulse/space
30 * 30 *
31 * This function returns -EINVAL if the lirc interfaces aren't wired up. 31 * This function returns -EINVAL if the lirc interfaces aren't wired up.
32 */ 32 */
diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c
index a95d09acc22a..6880c190dcd2 100644
--- a/drivers/media/rc/ir-nec-decoder.c
+++ b/drivers/media/rc/ir-nec-decoder.c
@@ -41,7 +41,7 @@ enum nec_state {
41/** 41/**
42 * ir_nec_decode() - Decode one NEC pulse or space 42 * ir_nec_decode() - Decode one NEC pulse or space
43 * @dev: the struct rc_dev descriptor of the device 43 * @dev: the struct rc_dev descriptor of the device
44 * @duration: the struct ir_raw_event descriptor of the pulse/space 44 * @ev: the struct ir_raw_event descriptor of the pulse/space
45 * 45 *
46 * This function returns -EINVAL if the pulse violates the state machine 46 * This function returns -EINVAL if the pulse violates the state machine
47 */ 47 */
@@ -183,7 +183,6 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
183 * ir_nec_scancode_to_raw() - encode an NEC scancode ready for modulation. 183 * ir_nec_scancode_to_raw() - encode an NEC scancode ready for modulation.
184 * @protocol: specific protocol to use 184 * @protocol: specific protocol to use
185 * @scancode: a single NEC scancode. 185 * @scancode: a single NEC scancode.
186 * @raw: raw data to be modulated.
187 */ 186 */
188static u32 ir_nec_scancode_to_raw(enum rc_proto protocol, u32 scancode) 187static u32 ir_nec_scancode_to_raw(enum rc_proto protocol, u32 scancode)
189{ 188{
diff --git a/drivers/media/rc/ir-sanyo-decoder.c b/drivers/media/rc/ir-sanyo-decoder.c
index 758c60956850..d94e07b02f3b 100644
--- a/drivers/media/rc/ir-sanyo-decoder.c
+++ b/drivers/media/rc/ir-sanyo-decoder.c
@@ -48,7 +48,7 @@ enum sanyo_state {
48/** 48/**
49 * ir_sanyo_decode() - Decode one SANYO pulse or space 49 * ir_sanyo_decode() - Decode one SANYO pulse or space
50 * @dev: the struct rc_dev descriptor of the device 50 * @dev: the struct rc_dev descriptor of the device
51 * @duration: the struct ir_raw_event descriptor of the pulse/space 51 * @ev: the struct ir_raw_event descriptor of the pulse/space
52 * 52 *
53 * This function returns -EINVAL if the pulse violates the state machine 53 * This function returns -EINVAL if the pulse violates the state machine
54 */ 54 */
diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c
index 129b558acc92..7140dd6160ee 100644
--- a/drivers/media/rc/ir-sharp-decoder.c
+++ b/drivers/media/rc/ir-sharp-decoder.c
@@ -39,7 +39,7 @@ enum sharp_state {
39/** 39/**
40 * ir_sharp_decode() - Decode one Sharp pulse or space 40 * ir_sharp_decode() - Decode one Sharp pulse or space
41 * @dev: the struct rc_dev descriptor of the device 41 * @dev: the struct rc_dev descriptor of the device
42 * @duration: the struct ir_raw_event descriptor of the pulse/space 42 * @ev: the struct ir_raw_event descriptor of the pulse/space
43 * 43 *
44 * This function returns -EINVAL if the pulse violates the state machine 44 * This function returns -EINVAL if the pulse violates the state machine
45 */ 45 */
diff --git a/drivers/media/rc/ir-xmp-decoder.c b/drivers/media/rc/ir-xmp-decoder.c
index 6f464be1c8d7..712bc6d76e92 100644
--- a/drivers/media/rc/ir-xmp-decoder.c
+++ b/drivers/media/rc/ir-xmp-decoder.c
@@ -35,7 +35,7 @@ enum xmp_state {
35/** 35/**
36 * ir_xmp_decode() - Decode one XMP pulse or space 36 * ir_xmp_decode() - Decode one XMP pulse or space
37 * @dev: the struct rc_dev descriptor of the device 37 * @dev: the struct rc_dev descriptor of the device
38 * @duration: the struct ir_raw_event descriptor of the pulse/space 38 * @ev: the struct ir_raw_event descriptor of the pulse/space
39 * 39 *
40 * This function returns -EINVAL if the pulse violates the state machine 40 * This function returns -EINVAL if the pulse violates the state machine
41 */ 41 */
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index f6e5ba4fbb49..d78483a504c9 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -128,7 +128,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_store_edge);
128/** 128/**
129 * ir_raw_event_store_with_filter() - pass next pulse/space to decoders with some processing 129 * ir_raw_event_store_with_filter() - pass next pulse/space to decoders with some processing
130 * @dev: the struct rc_dev device descriptor 130 * @dev: the struct rc_dev device descriptor
131 * @type: the type of the event that has occurred 131 * @ev: the event that has occurred
132 * 132 *
133 * This routine (which may be called from an interrupt context) works 133 * This routine (which may be called from an interrupt context) works
134 * in similar manner to ir_raw_event_store_edge. 134 * in similar manner to ir_raw_event_store_edge.
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 17950e29d4e3..c144b77eac98 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -39,41 +39,41 @@ static const struct {
39 [RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 }, 39 [RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 },
40 [RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 }, 40 [RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 },
41 [RC_PROTO_RC5] = { .name = "rc-5", 41 [RC_PROTO_RC5] = { .name = "rc-5",
42 .scancode_bits = 0x1f7f, .repeat_period = 164 }, 42 .scancode_bits = 0x1f7f, .repeat_period = 250 },
43 [RC_PROTO_RC5X_20] = { .name = "rc-5x-20", 43 [RC_PROTO_RC5X_20] = { .name = "rc-5x-20",
44 .scancode_bits = 0x1f7f3f, .repeat_period = 164 }, 44 .scancode_bits = 0x1f7f3f, .repeat_period = 250 },
45 [RC_PROTO_RC5_SZ] = { .name = "rc-5-sz", 45 [RC_PROTO_RC5_SZ] = { .name = "rc-5-sz",
46 .scancode_bits = 0x2fff, .repeat_period = 164 }, 46 .scancode_bits = 0x2fff, .repeat_period = 250 },
47 [RC_PROTO_JVC] = { .name = "jvc", 47 [RC_PROTO_JVC] = { .name = "jvc",
48 .scancode_bits = 0xffff, .repeat_period = 250 }, 48 .scancode_bits = 0xffff, .repeat_period = 250 },
49 [RC_PROTO_SONY12] = { .name = "sony-12", 49 [RC_PROTO_SONY12] = { .name = "sony-12",
50 .scancode_bits = 0x1f007f, .repeat_period = 100 }, 50 .scancode_bits = 0x1f007f, .repeat_period = 250 },
51 [RC_PROTO_SONY15] = { .name = "sony-15", 51 [RC_PROTO_SONY15] = { .name = "sony-15",
52 .scancode_bits = 0xff007f, .repeat_period = 100 }, 52 .scancode_bits = 0xff007f, .repeat_period = 250 },
53 [RC_PROTO_SONY20] = { .name = "sony-20", 53 [RC_PROTO_SONY20] = { .name = "sony-20",
54 .scancode_bits = 0x1fff7f, .repeat_period = 100 }, 54 .scancode_bits = 0x1fff7f, .repeat_period = 250 },
55 [RC_PROTO_NEC] = { .name = "nec", 55 [RC_PROTO_NEC] = { .name = "nec",
56 .scancode_bits = 0xffff, .repeat_period = 160 }, 56 .scancode_bits = 0xffff, .repeat_period = 250 },
57 [RC_PROTO_NECX] = { .name = "nec-x", 57 [RC_PROTO_NECX] = { .name = "nec-x",
58 .scancode_bits = 0xffffff, .repeat_period = 160 }, 58 .scancode_bits = 0xffffff, .repeat_period = 250 },
59 [RC_PROTO_NEC32] = { .name = "nec-32", 59 [RC_PROTO_NEC32] = { .name = "nec-32",
60 .scancode_bits = 0xffffffff, .repeat_period = 160 }, 60 .scancode_bits = 0xffffffff, .repeat_period = 250 },
61 [RC_PROTO_SANYO] = { .name = "sanyo", 61 [RC_PROTO_SANYO] = { .name = "sanyo",
62 .scancode_bits = 0x1fffff, .repeat_period = 250 }, 62 .scancode_bits = 0x1fffff, .repeat_period = 250 },
63 [RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd", 63 [RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd",
64 .scancode_bits = 0xffff, .repeat_period = 150 }, 64 .scancode_bits = 0xffff, .repeat_period = 250 },
65 [RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse", 65 [RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse",
66 .scancode_bits = 0x1fffff, .repeat_period = 150 }, 66 .scancode_bits = 0x1fffff, .repeat_period = 250 },
67 [RC_PROTO_RC6_0] = { .name = "rc-6-0", 67 [RC_PROTO_RC6_0] = { .name = "rc-6-0",
68 .scancode_bits = 0xffff, .repeat_period = 164 }, 68 .scancode_bits = 0xffff, .repeat_period = 250 },
69 [RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20", 69 [RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20",
70 .scancode_bits = 0xfffff, .repeat_period = 164 }, 70 .scancode_bits = 0xfffff, .repeat_period = 250 },
71 [RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24", 71 [RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24",
72 .scancode_bits = 0xffffff, .repeat_period = 164 }, 72 .scancode_bits = 0xffffff, .repeat_period = 250 },
73 [RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32", 73 [RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32",
74 .scancode_bits = 0xffffffff, .repeat_period = 164 }, 74 .scancode_bits = 0xffffffff, .repeat_period = 250 },
75 [RC_PROTO_RC6_MCE] = { .name = "rc-6-mce", 75 [RC_PROTO_RC6_MCE] = { .name = "rc-6-mce",
76 .scancode_bits = 0xffff7fff, .repeat_period = 164 }, 76 .scancode_bits = 0xffff7fff, .repeat_period = 250 },
77 [RC_PROTO_SHARP] = { .name = "sharp", 77 [RC_PROTO_SHARP] = { .name = "sharp",
78 .scancode_bits = 0x1fff, .repeat_period = 250 }, 78 .scancode_bits = 0x1fff, .repeat_period = 250 },
79 [RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 }, 79 [RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 },
@@ -170,10 +170,11 @@ static struct rc_map_list empty_map = {
170 * @name: name to assign to the table 170 * @name: name to assign to the table
171 * @rc_proto: ir type to assign to the new table 171 * @rc_proto: ir type to assign to the new table
172 * @size: initial size of the table 172 * @size: initial size of the table
173 * @return: zero on success or a negative error code
174 * 173 *
175 * This routine will initialize the rc_map and will allocate 174 * This routine will initialize the rc_map and will allocate
176 * memory to hold at least the specified number of elements. 175 * memory to hold at least the specified number of elements.
176 *
177 * return: zero on success or a negative error code
177 */ 178 */
178static int ir_create_table(struct rc_map *rc_map, 179static int ir_create_table(struct rc_map *rc_map,
179 const char *name, u64 rc_proto, size_t size) 180 const char *name, u64 rc_proto, size_t size)
@@ -216,10 +217,11 @@ static void ir_free_table(struct rc_map *rc_map)
216 * ir_resize_table() - resizes a scancode table if necessary 217 * ir_resize_table() - resizes a scancode table if necessary
217 * @rc_map: the rc_map to resize 218 * @rc_map: the rc_map to resize
218 * @gfp_flags: gfp flags to use when allocating memory 219 * @gfp_flags: gfp flags to use when allocating memory
219 * @return: zero on success or a negative error code
220 * 220 *
221 * This routine will shrink the rc_map if it has lots of 221 * This routine will shrink the rc_map if it has lots of
222 * unused entries and grow it if it is full. 222 * unused entries and grow it if it is full.
223 *
224 * return: zero on success or a negative error code
223 */ 225 */
224static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags) 226static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags)
225{ 227{
@@ -265,11 +267,13 @@ static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags)
265 * @dev: the struct rc_dev device descriptor 267 * @dev: the struct rc_dev device descriptor
266 * @rc_map: scancode table to be adjusted 268 * @rc_map: scancode table to be adjusted
267 * @index: index of the mapping that needs to be updated 269 * @index: index of the mapping that needs to be updated
268 * @keycode: the desired keycode 270 * @new_keycode: the desired keycode
269 * @return: previous keycode assigned to the mapping
270 * 271 *
271 * This routine is used to update scancode->keycode mapping at given 272 * This routine is used to update scancode->keycode mapping at given
272 * position. 273 * position.
274 *
275 * return: previous keycode assigned to the mapping
276 *
273 */ 277 */
274static unsigned int ir_update_mapping(struct rc_dev *dev, 278static unsigned int ir_update_mapping(struct rc_dev *dev,
275 struct rc_map *rc_map, 279 struct rc_map *rc_map,
@@ -320,12 +324,13 @@ static unsigned int ir_update_mapping(struct rc_dev *dev,
320 * @scancode: the desired scancode 324 * @scancode: the desired scancode
321 * @resize: controls whether we allowed to resize the table to 325 * @resize: controls whether we allowed to resize the table to
322 * accommodate not yet present scancodes 326 * accommodate not yet present scancodes
323 * @return: index of the mapping containing scancode in question
324 * or -1U in case of failure.
325 * 327 *
326 * This routine is used to locate given scancode in rc_map. 328 * This routine is used to locate given scancode in rc_map.
327 * If scancode is not yet present the routine will allocate a new slot 329 * If scancode is not yet present the routine will allocate a new slot
328 * for it. 330 * for it.
331 *
332 * return: index of the mapping containing scancode in question
333 * or -1U in case of failure.
329 */ 334 */
330static unsigned int ir_establish_scancode(struct rc_dev *dev, 335static unsigned int ir_establish_scancode(struct rc_dev *dev,
331 struct rc_map *rc_map, 336 struct rc_map *rc_map,
@@ -375,11 +380,12 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev,
375/** 380/**
376 * ir_setkeycode() - set a keycode in the scancode->keycode table 381 * ir_setkeycode() - set a keycode in the scancode->keycode table
377 * @idev: the struct input_dev device descriptor 382 * @idev: the struct input_dev device descriptor
378 * @scancode: the desired scancode 383 * @ke: Input keymap entry
379 * @keycode: result 384 * @old_keycode: result
380 * @return: -EINVAL if the keycode could not be inserted, otherwise zero.
381 * 385 *
382 * This routine is used to handle evdev EVIOCSKEY ioctl. 386 * This routine is used to handle evdev EVIOCSKEY ioctl.
387 *
388 * return: -EINVAL if the keycode could not be inserted, otherwise zero.
383 */ 389 */
384static int ir_setkeycode(struct input_dev *idev, 390static int ir_setkeycode(struct input_dev *idev,
385 const struct input_keymap_entry *ke, 391 const struct input_keymap_entry *ke,
@@ -422,11 +428,11 @@ out:
422/** 428/**
423 * ir_setkeytable() - sets several entries in the scancode->keycode table 429 * ir_setkeytable() - sets several entries in the scancode->keycode table
424 * @dev: the struct rc_dev device descriptor 430 * @dev: the struct rc_dev device descriptor
425 * @to: the struct rc_map to copy entries to
426 * @from: the struct rc_map to copy entries from 431 * @from: the struct rc_map to copy entries from
427 * @return: -ENOMEM if all keycodes could not be inserted, otherwise zero.
428 * 432 *
429 * This routine is used to handle table initialization. 433 * This routine is used to handle table initialization.
434 *
435 * return: -ENOMEM if all keycodes could not be inserted, otherwise zero.
430 */ 436 */
431static int ir_setkeytable(struct rc_dev *dev, 437static int ir_setkeytable(struct rc_dev *dev,
432 const struct rc_map *from) 438 const struct rc_map *from)
@@ -474,10 +480,11 @@ static int rc_map_cmp(const void *key, const void *elt)
474 * ir_lookup_by_scancode() - locate mapping by scancode 480 * ir_lookup_by_scancode() - locate mapping by scancode
475 * @rc_map: the struct rc_map to search 481 * @rc_map: the struct rc_map to search
476 * @scancode: scancode to look for in the table 482 * @scancode: scancode to look for in the table
477 * @return: index in the table, -1U if not found
478 * 483 *
479 * This routine performs binary search in RC keykeymap table for 484 * This routine performs binary search in RC keykeymap table for
480 * given scancode. 485 * given scancode.
486 *
487 * return: index in the table, -1U if not found
481 */ 488 */
482static unsigned int ir_lookup_by_scancode(const struct rc_map *rc_map, 489static unsigned int ir_lookup_by_scancode(const struct rc_map *rc_map,
483 unsigned int scancode) 490 unsigned int scancode)
@@ -495,11 +502,11 @@ static unsigned int ir_lookup_by_scancode(const struct rc_map *rc_map,
495/** 502/**
496 * ir_getkeycode() - get a keycode from the scancode->keycode table 503 * ir_getkeycode() - get a keycode from the scancode->keycode table
497 * @idev: the struct input_dev device descriptor 504 * @idev: the struct input_dev device descriptor
498 * @scancode: the desired scancode 505 * @ke: Input keymap entry
499 * @keycode: used to return the keycode, if found, or KEY_RESERVED
500 * @return: always returns zero.
501 * 506 *
502 * This routine is used to handle evdev EVIOCGKEY ioctl. 507 * This routine is used to handle evdev EVIOCGKEY ioctl.
508 *
509 * return: always returns zero.
503 */ 510 */
504static int ir_getkeycode(struct input_dev *idev, 511static int ir_getkeycode(struct input_dev *idev,
505 struct input_keymap_entry *ke) 512 struct input_keymap_entry *ke)
@@ -556,11 +563,12 @@ out:
556 * rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode 563 * rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode
557 * @dev: the struct rc_dev descriptor of the device 564 * @dev: the struct rc_dev descriptor of the device
558 * @scancode: the scancode to look for 565 * @scancode: the scancode to look for
559 * @return: the corresponding keycode, or KEY_RESERVED
560 * 566 *
561 * This routine is used by drivers which need to convert a scancode to a 567 * This routine is used by drivers which need to convert a scancode to a
562 * keycode. Normally it should not be used since drivers should have no 568 * keycode. Normally it should not be used since drivers should have no
563 * interest in keycodes. 569 * interest in keycodes.
570 *
571 * return: the corresponding keycode, or KEY_RESERVED
564 */ 572 */
565u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode) 573u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode)
566{ 574{
@@ -625,7 +633,8 @@ EXPORT_SYMBOL_GPL(rc_keyup);
625 633
626/** 634/**
627 * ir_timer_keyup() - generates a keyup event after a timeout 635 * ir_timer_keyup() - generates a keyup event after a timeout
628 * @cookie: a pointer to the struct rc_dev for the device 636 *
637 * @t: a pointer to the struct timer_list
629 * 638 *
630 * This routine will generate a keyup event some time after a keydown event 639 * This routine will generate a keyup event some time after a keydown event
631 * is generated when no further activity has been detected. 640 * is generated when no further activity has been detected.
@@ -780,7 +789,8 @@ EXPORT_SYMBOL_GPL(rc_keydown_notimeout);
780 * provides sensible defaults 789 * provides sensible defaults
781 * @dev: the struct rc_dev descriptor of the device 790 * @dev: the struct rc_dev descriptor of the device
782 * @filter: the scancode and mask 791 * @filter: the scancode and mask
783 * @return: 0 or -EINVAL if the filter is not valid 792 *
793 * return: 0 or -EINVAL if the filter is not valid
784 */ 794 */
785static int rc_validate_filter(struct rc_dev *dev, 795static int rc_validate_filter(struct rc_dev *dev,
786 struct rc_scancode_filter *filter) 796 struct rc_scancode_filter *filter)
diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c
index 76120664b700..9ee2c9196b4d 100644
--- a/drivers/media/rc/sir_ir.c
+++ b/drivers/media/rc/sir_ir.c
@@ -57,7 +57,7 @@ static void add_read_queue(int flag, unsigned long val);
57static irqreturn_t sir_interrupt(int irq, void *dev_id); 57static irqreturn_t sir_interrupt(int irq, void *dev_id);
58static void send_space(unsigned long len); 58static void send_space(unsigned long len);
59static void send_pulse(unsigned long len); 59static void send_pulse(unsigned long len);
60static void init_hardware(void); 60static int init_hardware(void);
61static void drop_hardware(void); 61static void drop_hardware(void);
62/* Initialisation */ 62/* Initialisation */
63 63
@@ -263,11 +263,36 @@ static void send_pulse(unsigned long len)
263 } 263 }
264} 264}
265 265
266static void init_hardware(void) 266static int init_hardware(void)
267{ 267{
268 u8 scratch, scratch2, scratch3;
268 unsigned long flags; 269 unsigned long flags;
269 270
270 spin_lock_irqsave(&hardware_lock, flags); 271 spin_lock_irqsave(&hardware_lock, flags);
272
273 /*
274 * This is a simple port existence test, borrowed from the autoconfig
275 * function in drivers/tty/serial/8250/8250_port.c
276 */
277 scratch = sinp(UART_IER);
278 soutp(UART_IER, 0);
279#ifdef __i386__
280 outb(0xff, 0x080);
281#endif
282 scratch2 = sinp(UART_IER) & 0x0f;
283 soutp(UART_IER, 0x0f);
284#ifdef __i386__
285 outb(0x00, 0x080);
286#endif
287 scratch3 = sinp(UART_IER) & 0x0f;
288 soutp(UART_IER, scratch);
289 if (scratch2 != 0 || scratch3 != 0x0f) {
290 /* we fail, there's nothing here */
291 spin_unlock_irqrestore(&hardware_lock, flags);
292 pr_err("port existence test failed, cannot continue\n");
293 return -ENODEV;
294 }
295
271 /* reset UART */ 296 /* reset UART */
272 outb(0, io + UART_MCR); 297 outb(0, io + UART_MCR);
273 outb(0, io + UART_IER); 298 outb(0, io + UART_IER);
@@ -285,6 +310,8 @@ static void init_hardware(void)
285 /* turn on UART */ 310 /* turn on UART */
286 outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, io + UART_MCR); 311 outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, io + UART_MCR);
287 spin_unlock_irqrestore(&hardware_lock, flags); 312 spin_unlock_irqrestore(&hardware_lock, flags);
313
314 return 0;
288} 315}
289 316
290static void drop_hardware(void) 317static void drop_hardware(void)
@@ -334,14 +361,19 @@ static int sir_ir_probe(struct platform_device *dev)
334 pr_err("IRQ %d already in use.\n", irq); 361 pr_err("IRQ %d already in use.\n", irq);
335 return retval; 362 return retval;
336 } 363 }
364
365 retval = init_hardware();
366 if (retval) {
367 del_timer_sync(&timerlist);
368 return retval;
369 }
370
337 pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq); 371 pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq);
338 372
339 retval = devm_rc_register_device(&sir_ir_dev->dev, rcdev); 373 retval = devm_rc_register_device(&sir_ir_dev->dev, rcdev);
340 if (retval < 0) 374 if (retval < 0)
341 return retval; 375 return retval;
342 376
343 init_hardware();
344
345 return 0; 377 return 0;
346} 378}
347 379
diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index a8e39c635f34..d2efd7b2c3bc 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -49,7 +49,7 @@ struct st_rc_device {
49#define IRB_RX_NOISE_SUPPR 0x5c /* noise suppression */ 49#define IRB_RX_NOISE_SUPPR 0x5c /* noise suppression */
50#define IRB_RX_POLARITY_INV 0x68 /* polarity inverter */ 50#define IRB_RX_POLARITY_INV 0x68 /* polarity inverter */
51 51
52/** 52/*
53 * IRQ set: Enable full FIFO 1 -> bit 3; 53 * IRQ set: Enable full FIFO 1 -> bit 3;
54 * Enable overrun IRQ 1 -> bit 2; 54 * Enable overrun IRQ 1 -> bit 2;
55 * Enable last symbol IRQ 1 -> bit 1: 55 * Enable last symbol IRQ 1 -> bit 1:
@@ -72,7 +72,7 @@ static void st_rc_send_lirc_timeout(struct rc_dev *rdev)
72 ir_raw_event_store(rdev, &ev); 72 ir_raw_event_store(rdev, &ev);
73} 73}
74 74
75/** 75/*
76 * RX graphical example to better understand the difference between ST IR block 76 * RX graphical example to better understand the difference between ST IR block
77 * output and standard definition used by LIRC (and most of the world!) 77 * output and standard definition used by LIRC (and most of the world!)
78 * 78 *
@@ -317,7 +317,7 @@ static int st_rc_probe(struct platform_device *pdev)
317 device_init_wakeup(dev, true); 317 device_init_wakeup(dev, true);
318 dev_pm_set_wake_irq(dev, rc_dev->irq); 318 dev_pm_set_wake_irq(dev, rc_dev->irq);
319 319
320 /** 320 /*
321 * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW 321 * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW
322 * lircd expects a long space first before a signal train to sync. 322 * lircd expects a long space first before a signal train to sync.
323 */ 323 */
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index 4eebfcfc10f3..c9a70fda88a8 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -191,7 +191,7 @@ static void sz_push_half_space(struct streamzap_ir *sz,
191 sz_push_full_space(sz, value & SZ_SPACE_MASK); 191 sz_push_full_space(sz, value & SZ_SPACE_MASK);
192} 192}
193 193
194/** 194/*
195 * streamzap_callback - usb IRQ handler callback 195 * streamzap_callback - usb IRQ handler callback
196 * 196 *
197 * This procedure is invoked on reception of data from 197 * This procedure is invoked on reception of data from
@@ -321,7 +321,7 @@ out:
321 return NULL; 321 return NULL;
322} 322}
323 323
324/** 324/*
325 * streamzap_probe 325 * streamzap_probe
326 * 326 *
327 * Called by usb-core to associated with a candidate device 327 * Called by usb-core to associated with a candidate device
@@ -450,7 +450,7 @@ free_sz:
450 return retval; 450 return retval;
451} 451}
452 452
453/** 453/*
454 * streamzap_disconnect 454 * streamzap_disconnect
455 * 455 *
456 * Called by the usb core when the device is removed from the system. 456 * Called by the usb core when the device is removed from the system.
diff --git a/drivers/media/tuners/mt2063.c b/drivers/media/tuners/mt2063.c
index 8b39d8dc97a0..5c87c5c6a455 100644
--- a/drivers/media/tuners/mt2063.c
+++ b/drivers/media/tuners/mt2063.c
@@ -1397,9 +1397,9 @@ static u32 MT2063_Round_fLO(u32 f_LO, u32 f_LO_Step, u32 f_ref)
1397 * risk of overflow. It accurately calculates 1397 * risk of overflow. It accurately calculates
1398 * f_ref * num / denom to within 1 HZ with fixed math. 1398 * f_ref * num / denom to within 1 HZ with fixed math.
1399 * 1399 *
1400 * @num : Fractional portion of the multiplier 1400 * @f_ref: SRO frequency.
1401 * @num: Fractional portion of the multiplier
1401 * @denom: denominator portion of the ratio 1402 * @denom: denominator portion of the ratio
1402 * @f_Ref: SRO frequency.
1403 * 1403 *
1404 * This calculation handles f_ref as two separate 14-bit fields. 1404 * This calculation handles f_ref as two separate 14-bit fields.
1405 * Therefore, a maximum value of 2^28-1 may safely be used for f_ref. 1405 * Therefore, a maximum value of 2^28-1 may safely be used for f_ref.
@@ -1464,8 +1464,6 @@ static u32 MT2063_CalcLO1Mult(u32 *Div,
1464 * @f_LO: desired LO frequency. 1464 * @f_LO: desired LO frequency.
1465 * @f_LO_Step: Minimum step size for the LO (in Hz). 1465 * @f_LO_Step: Minimum step size for the LO (in Hz).
1466 * @f_Ref: SRO frequency. 1466 * @f_Ref: SRO frequency.
1467 * @f_Avoid: Range of PLL frequencies to avoid near
1468 * integer multiples of f_Ref (in Hz).
1469 * 1467 *
1470 * Returns: Recalculated LO frequency. 1468 * Returns: Recalculated LO frequency.
1471 */ 1469 */
diff --git a/drivers/media/usb/dvb-usb/cinergyT2-fe.c b/drivers/media/usb/dvb-usb/cinergyT2-fe.c
index f9772ad0a2a5..5a2f81311fb7 100644
--- a/drivers/media/usb/dvb-usb/cinergyT2-fe.c
+++ b/drivers/media/usb/dvb-usb/cinergyT2-fe.c
@@ -26,7 +26,7 @@
26#include "cinergyT2.h" 26#include "cinergyT2.h"
27 27
28 28
29/** 29/*
30 * convert linux-dvb frontend parameter set into TPS. 30 * convert linux-dvb frontend parameter set into TPS.
31 * See ETSI ETS-300744, section 4.6.2, table 9 for details. 31 * See ETSI ETS-300744, section 4.6.2, table 9 for details.
32 * 32 *
diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
index 92098c1b78e5..366b05529915 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -1677,10 +1677,10 @@ static int dib8096_set_param_override(struct dvb_frontend *fe)
1677 return -EINVAL; 1677 return -EINVAL;
1678 } 1678 }
1679 1679
1680 /** Update PLL if needed ratio **/ 1680 /* Update PLL if needed ratio */
1681 state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, 0); 1681 state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, 0);
1682 1682
1683 /** Get optimize PLL ratio to remove spurious **/ 1683 /* Get optimize PLL ratio to remove spurious */
1684 pll_ratio = dib8090_compute_pll_parameters(fe); 1684 pll_ratio = dib8090_compute_pll_parameters(fe);
1685 if (pll_ratio == 17) 1685 if (pll_ratio == 17)
1686 timf = 21387946; 1686 timf = 21387946;
@@ -1691,7 +1691,7 @@ static int dib8096_set_param_override(struct dvb_frontend *fe)
1691 else 1691 else
1692 timf = 18179756; 1692 timf = 18179756;
1693 1693
1694 /** Update ratio **/ 1694 /* Update ratio */
1695 state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, pll_ratio); 1695 state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, pll_ratio);
1696 1696
1697 state->dib8000_ops.ctrl_timf(fe, DEMOD_TIMF_SET, timf); 1697 state->dib8000_ops.ctrl_timf(fe, DEMOD_TIMF_SET, timf);
@@ -3357,7 +3357,7 @@ static int novatd_sleep_override(struct dvb_frontend* fe)
3357 return state->sleep(fe); 3357 return state->sleep(fe);
3358} 3358}
3359 3359
3360/** 3360/*
3361 * novatd_frontend_attach - Nova-TD specific attach 3361 * novatd_frontend_attach - Nova-TD specific attach
3362 * 3362 *
3363 * Nova-TD has GPIO0, 1 and 2 for LEDs. So do not fiddle with them except for 3363 * Nova-TD has GPIO0, 1 and 2 for LEDs. So do not fiddle with them except for
diff --git a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c
index 8207e6900656..bcacb0f22028 100644
--- a/drivers/media/usb/dvb-usb/dibusb-common.c
+++ b/drivers/media/usb/dvb-usb/dibusb-common.c
@@ -223,8 +223,20 @@ EXPORT_SYMBOL(dibusb_i2c_algo);
223 223
224int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val) 224int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
225{ 225{
226 u8 wbuf[1] = { offs }; 226 u8 *buf;
227 return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1); 227 int rc;
228
229 buf = kmalloc(2, GFP_KERNEL);
230 if (!buf)
231 return -ENOMEM;
232
233 buf[0] = offs;
234
235 rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1);
236 *val = buf[1];
237 kfree(buf);
238
239 return rc;
228} 240}
229EXPORT_SYMBOL(dibusb_read_eeprom_byte); 241EXPORT_SYMBOL(dibusb_read_eeprom_byte);
230 242
diff --git a/drivers/media/usb/dvb-usb/friio-fe.c b/drivers/media/usb/dvb-usb/friio-fe.c
index 41261317bd5c..b6046e0e07f6 100644
--- a/drivers/media/usb/dvb-usb/friio-fe.c
+++ b/drivers/media/usb/dvb-usb/friio-fe.c
@@ -297,7 +297,7 @@ static int jdvbt90502_set_frontend(struct dvb_frontend *fe)
297} 297}
298 298
299 299
300/** 300/*
301 * (reg, val) commad list to initialize this module. 301 * (reg, val) commad list to initialize this module.
302 * captured on a Windows box. 302 * captured on a Windows box.
303 */ 303 */
diff --git a/drivers/media/usb/dvb-usb/friio.c b/drivers/media/usb/dvb-usb/friio.c
index 62abe6c43a32..16875945e662 100644
--- a/drivers/media/usb/dvb-usb/friio.c
+++ b/drivers/media/usb/dvb-usb/friio.c
@@ -21,7 +21,7 @@ MODULE_PARM_DESC(debug,
21 21
22DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); 22DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
23 23
24/** 24/*
25 * Indirect I2C access to the PLL via FE. 25 * Indirect I2C access to the PLL via FE.
26 * whole I2C protocol data to the PLL is sent via the FE's I2C register. 26 * whole I2C protocol data to the PLL is sent via the FE's I2C register.
27 * This is done by a control msg to the FE with the I2C data accompanied, and 27 * This is done by a control msg to the FE with the I2C data accompanied, and
diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c
index f1537daf4e2e..1b30434b72ef 100644
--- a/drivers/media/usb/gspca/ov519.c
+++ b/drivers/media/usb/gspca/ov519.c
@@ -1,4 +1,4 @@
1/** 1/*
2 * OV519 driver 2 * OV519 driver
3 * 3 *
4 * Copyright (C) 2008-2011 Jean-François Moine <moinejf@free.fr> 4 * Copyright (C) 2008-2011 Jean-François Moine <moinejf@free.fr>
diff --git a/drivers/media/usb/pwc/pwc-dec23.c b/drivers/media/usb/pwc/pwc-dec23.c
index 3792fedff951..1283b3bd9800 100644
--- a/drivers/media/usb/pwc/pwc-dec23.c
+++ b/drivers/media/usb/pwc/pwc-dec23.c
@@ -649,11 +649,10 @@ static void DecompressBand23(struct pwc_dec23_private *pdec,
649} 649}
650 650
651/** 651/**
652 *
653 * Uncompress a pwc23 buffer. 652 * Uncompress a pwc23 buffer.
654 * 653 * @pdev: pointer to pwc device's internal struct
655 * src: raw data 654 * @src: raw data
656 * dst: image output 655 * @dst: image output
657 */ 656 */
658void pwc_dec23_decompress(struct pwc_device *pdev, 657void pwc_dec23_decompress(struct pwc_device *pdev,
659 const void *src, 658 const void *src,
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index 8c1f926567ec..d07349cf9489 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -74,7 +74,7 @@ struct smsusb_device_t {
74static int smsusb_submit_urb(struct smsusb_device_t *dev, 74static int smsusb_submit_urb(struct smsusb_device_t *dev,
75 struct smsusb_urb_t *surb); 75 struct smsusb_urb_t *surb);
76 76
77/** 77/*
78 * Completing URB's callback handler - bottom half (proccess context) 78 * Completing URB's callback handler - bottom half (proccess context)
79 * submits the URB prepared on smsusb_onresponse() 79 * submits the URB prepared on smsusb_onresponse()
80 */ 80 */
@@ -86,7 +86,7 @@ static void do_submit_urb(struct work_struct *work)
86 smsusb_submit_urb(dev, surb); 86 smsusb_submit_urb(dev, surb);
87} 87}
88 88
89/** 89/*
90 * Completing URB's callback handler - top half (interrupt context) 90 * Completing URB's callback handler - top half (interrupt context)
91 * adds completing sms urb to the global surbs list and activtes the worker 91 * adds completing sms urb to the global surbs list and activtes the worker
92 * thread the surb 92 * thread the surb
diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index b842f367249f..a142b9dc0feb 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -76,7 +76,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
76#define TTUSB_REV_2_2 0x22 76#define TTUSB_REV_2_2 0x22
77#define TTUSB_BUDGET_NAME "ttusb_stc_fw" 77#define TTUSB_BUDGET_NAME "ttusb_stc_fw"
78 78
79/** 79/*
80 * since we're casting (struct ttusb*) <-> (struct dvb_demux*) around 80 * since we're casting (struct ttusb*) <-> (struct dvb_demux*) around
81 * the dvb_demux field must be the first in struct!! 81 * the dvb_demux field must be the first in struct!!
82 */ 82 */
@@ -713,7 +713,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len)
713 } 713 }
714 } 714 }
715 715
716 /** 716 /*
717 * if length is valid and we reached the end: 717 * if length is valid and we reached the end:
718 * goto next muxpack 718 * goto next muxpack
719 */ 719 */
@@ -729,7 +729,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len)
729 /* maximum bytes, until we know the length */ 729 /* maximum bytes, until we know the length */
730 ttusb->muxpack_len = 2; 730 ttusb->muxpack_len = 2;
731 731
732 /** 732 /*
733 * no muxpacks left? 733 * no muxpacks left?
734 * return to search-sync state 734 * return to search-sync state
735 */ 735 */
diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c
index b55b79b8e921..127f8a0c098b 100644
--- a/drivers/media/usb/usbtv/usbtv-core.c
+++ b/drivers/media/usb/usbtv/usbtv-core.c
@@ -144,6 +144,7 @@ static void usbtv_disconnect(struct usb_interface *intf)
144 144
145static const struct usb_device_id usbtv_id_table[] = { 145static const struct usb_device_id usbtv_id_table[] = {
146 { USB_DEVICE(0x1b71, 0x3002) }, 146 { USB_DEVICE(0x1b71, 0x3002) },
147 { USB_DEVICE(0x1f71, 0x3301) },
147 {} 148 {}
148}; 149};
149MODULE_DEVICE_TABLE(usb, usbtv_id_table); 150MODULE_DEVICE_TABLE(usb, usbtv_id_table);
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c
index 8db45dfc271b..82852f23a3b6 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -239,7 +239,7 @@ static const struct analog_demod_ops tuner_analog_ops = {
239 * @type: type of the tuner (e. g. tuner number) 239 * @type: type of the tuner (e. g. tuner number)
240 * @new_mode_mask: Indicates if tuner supports TV and/or Radio 240 * @new_mode_mask: Indicates if tuner supports TV and/or Radio
241 * @new_config: an optional parameter used by a few tuners to adjust 241 * @new_config: an optional parameter used by a few tuners to adjust
242 internal parameters, like LNA mode 242 * internal parameters, like LNA mode
243 * @tuner_callback: an optional function to be called when switching 243 * @tuner_callback: an optional function to be called when switching
244 * to analog mode 244 * to analog mode
245 * 245 *
@@ -750,6 +750,7 @@ static int tuner_remove(struct i2c_client *client)
750/** 750/**
751 * check_mode - Verify if tuner supports the requested mode 751 * check_mode - Verify if tuner supports the requested mode
752 * @t: a pointer to the module's internal struct_tuner 752 * @t: a pointer to the module's internal struct_tuner
753 * @mode: mode of the tuner, as defined by &enum v4l2_tuner_type.
753 * 754 *
754 * This function checks if the tuner is capable of tuning analog TV, 755 * This function checks if the tuner is capable of tuning analog TV,
755 * digital TV or radio, depending on what the caller wants. If the 756 * digital TV or radio, depending on what the caller wants. If the
@@ -757,6 +758,7 @@ static int tuner_remove(struct i2c_client *client)
757 * returns 0. 758 * returns 0.
758 * This function is needed for boards that have a separate tuner for 759 * This function is needed for boards that have a separate tuner for
759 * radio (like devices with tea5767). 760 * radio (like devices with tea5767).
761 *
760 * NOTE: mt20xx uses V4L2_TUNER_DIGITAL_TV and calls set_tv_freq to 762 * NOTE: mt20xx uses V4L2_TUNER_DIGITAL_TV and calls set_tv_freq to
761 * select a TV frequency. So, t_mode = T_ANALOG_TV could actually 763 * select a TV frequency. So, t_mode = T_ANALOG_TV could actually
762 * be used to represent a Digital TV too. 764 * be used to represent a Digital TV too.
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
index a7c3464976f2..e5acfab470a5 100644
--- a/drivers/media/v4l2-core/v4l2-async.c
+++ b/drivers/media/v4l2-core/v4l2-async.c
@@ -558,8 +558,7 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
558 if (!asd) 558 if (!asd)
559 continue; 559 continue;
560 560
561 ret = v4l2_async_match_notify(notifier, notifier->v4l2_dev, sd, 561 ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd);
562 asd);
563 if (ret) 562 if (ret)
564 goto err_unbind; 563 goto err_unbind;
565 564
diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c
index 5c8c49d240d1..930f9c53a64e 100644
--- a/drivers/media/v4l2-core/v4l2-dv-timings.c
+++ b/drivers/media/v4l2-core/v4l2-dv-timings.c
@@ -245,11 +245,11 @@ EXPORT_SYMBOL_GPL(v4l2_find_dv_timings_cea861_vic);
245 245
246/** 246/**
247 * v4l2_match_dv_timings - check if two timings match 247 * v4l2_match_dv_timings - check if two timings match
248 * @t1 - compare this v4l2_dv_timings struct... 248 * @t1: compare this v4l2_dv_timings struct...
249 * @t2 - with this struct. 249 * @t2: with this struct.
250 * @pclock_delta - the allowed pixelclock deviation. 250 * @pclock_delta: the allowed pixelclock deviation.
251 * @match_reduced_fps - if true, then fail if V4L2_DV_FL_REDUCED_FPS does not 251 * @match_reduced_fps: if true, then fail if V4L2_DV_FL_REDUCED_FPS does not
252 * match. 252 * match.
253 * 253 *
254 * Compare t1 with t2 with a given margin of error for the pixelclock. 254 * Compare t1 with t2 with a given margin of error for the pixelclock.
255 */ 255 */
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
index 681b192420d9..fb72c7ac04d4 100644
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -458,11 +458,6 @@ static int __v4l2_async_notifier_parse_fwnode_endpoints(
458 if (!is_available) 458 if (!is_available)
459 continue; 459 continue;
460 460
461 if (WARN_ON(notifier->num_subdevs >= notifier->max_subdevs)) {
462 ret = -EINVAL;
463 break;
464 }
465
466 if (has_port) { 461 if (has_port) {
467 struct fwnode_endpoint ep; 462 struct fwnode_endpoint ep;
468 463
@@ -474,6 +469,11 @@ static int __v4l2_async_notifier_parse_fwnode_endpoints(
474 continue; 469 continue;
475 } 470 }
476 471
472 if (WARN_ON(notifier->num_subdevs >= notifier->max_subdevs)) {
473 ret = -EINVAL;
474 break;
475 }
476
477 ret = v4l2_async_notifier_fwnode_parse_endpoint( 477 ret = v4l2_async_notifier_fwnode_parse_endpoint(
478 dev, notifier, fwnode, asd_struct_size, parse_endpoint); 478 dev, notifier, fwnode, asd_struct_size, parse_endpoint);
479 if (ret < 0) 479 if (ret < 0)
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index f62e68aa04c4..bc580fbe18fa 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -183,6 +183,7 @@ EXPORT_SYMBOL(v4l2_m2m_get_curr_priv);
183 183
184/** 184/**
185 * v4l2_m2m_try_run() - select next job to perform and run it if possible 185 * v4l2_m2m_try_run() - select next job to perform and run it if possible
186 * @m2m_dev: per-device context
186 * 187 *
187 * Get next transaction (if present) from the waiting jobs list and run it. 188 * Get next transaction (if present) from the waiting jobs list and run it.
188 */ 189 */
@@ -281,6 +282,7 @@ EXPORT_SYMBOL_GPL(v4l2_m2m_try_schedule);
281 282
282/** 283/**
283 * v4l2_m2m_cancel_job() - cancel pending jobs for the context 284 * v4l2_m2m_cancel_job() - cancel pending jobs for the context
285 * @m2m_ctx: m2m context with jobs to be canceled
284 * 286 *
285 * In case of streamoff or release called on any context, 287 * In case of streamoff or release called on any context,
286 * 1] If the context is currently running, then abort job will be called 288 * 1] If the context is currently running, then abort job will be called
diff --git a/drivers/media/v4l2-core/videobuf-core.c b/drivers/media/v4l2-core/videobuf-core.c
index 1dbf6f7785bb..e87fb13b22dc 100644
--- a/drivers/media/v4l2-core/videobuf-core.c
+++ b/drivers/media/v4l2-core/videobuf-core.c
@@ -222,7 +222,7 @@ int videobuf_queue_is_busy(struct videobuf_queue *q)
222} 222}
223EXPORT_SYMBOL_GPL(videobuf_queue_is_busy); 223EXPORT_SYMBOL_GPL(videobuf_queue_is_busy);
224 224
225/** 225/*
226 * __videobuf_free() - free all the buffers and their control structures 226 * __videobuf_free() - free all the buffers and their control structures
227 * 227 *
228 * This function can only be called if streaming/reading is off, i.e. no buffers 228 * This function can only be called if streaming/reading is off, i.e. no buffers
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index cb115ba6a1d2..a8589d96ef72 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -188,7 +188,7 @@ module_param(debug, int, 0644);
188static void __vb2_queue_cancel(struct vb2_queue *q); 188static void __vb2_queue_cancel(struct vb2_queue *q);
189static void __enqueue_in_driver(struct vb2_buffer *vb); 189static void __enqueue_in_driver(struct vb2_buffer *vb);
190 190
191/** 191/*
192 * __vb2_buf_mem_alloc() - allocate video memory for the given buffer 192 * __vb2_buf_mem_alloc() - allocate video memory for the given buffer
193 */ 193 */
194static int __vb2_buf_mem_alloc(struct vb2_buffer *vb) 194static int __vb2_buf_mem_alloc(struct vb2_buffer *vb)
@@ -229,7 +229,7 @@ free:
229 return ret; 229 return ret;
230} 230}
231 231
232/** 232/*
233 * __vb2_buf_mem_free() - free memory of the given buffer 233 * __vb2_buf_mem_free() - free memory of the given buffer
234 */ 234 */
235static void __vb2_buf_mem_free(struct vb2_buffer *vb) 235static void __vb2_buf_mem_free(struct vb2_buffer *vb)
@@ -243,7 +243,7 @@ static void __vb2_buf_mem_free(struct vb2_buffer *vb)
243 } 243 }
244} 244}
245 245
246/** 246/*
247 * __vb2_buf_userptr_put() - release userspace memory associated with 247 * __vb2_buf_userptr_put() - release userspace memory associated with
248 * a USERPTR buffer 248 * a USERPTR buffer
249 */ 249 */
@@ -258,7 +258,7 @@ static void __vb2_buf_userptr_put(struct vb2_buffer *vb)
258 } 258 }
259} 259}
260 260
261/** 261/*
262 * __vb2_plane_dmabuf_put() - release memory associated with 262 * __vb2_plane_dmabuf_put() - release memory associated with
263 * a DMABUF shared plane 263 * a DMABUF shared plane
264 */ 264 */
@@ -277,7 +277,7 @@ static void __vb2_plane_dmabuf_put(struct vb2_buffer *vb, struct vb2_plane *p)
277 p->dbuf_mapped = 0; 277 p->dbuf_mapped = 0;
278} 278}
279 279
280/** 280/*
281 * __vb2_buf_dmabuf_put() - release memory associated with 281 * __vb2_buf_dmabuf_put() - release memory associated with
282 * a DMABUF shared buffer 282 * a DMABUF shared buffer
283 */ 283 */
@@ -289,7 +289,7 @@ static void __vb2_buf_dmabuf_put(struct vb2_buffer *vb)
289 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]); 289 __vb2_plane_dmabuf_put(vb, &vb->planes[plane]);
290} 290}
291 291
292/** 292/*
293 * __setup_offsets() - setup unique offsets ("cookies") for every plane in 293 * __setup_offsets() - setup unique offsets ("cookies") for every plane in
294 * the buffer. 294 * the buffer.
295 */ 295 */
@@ -317,7 +317,7 @@ static void __setup_offsets(struct vb2_buffer *vb)
317 } 317 }
318} 318}
319 319
320/** 320/*
321 * __vb2_queue_alloc() - allocate videobuf buffer structures and (for MMAP type) 321 * __vb2_queue_alloc() - allocate videobuf buffer structures and (for MMAP type)
322 * video buffer memory for all buffers/planes on the queue and initializes the 322 * video buffer memory for all buffers/planes on the queue and initializes the
323 * queue 323 * queue
@@ -386,7 +386,7 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
386 return buffer; 386 return buffer;
387} 387}
388 388
389/** 389/*
390 * __vb2_free_mem() - release all video buffer memory for a given queue 390 * __vb2_free_mem() - release all video buffer memory for a given queue
391 */ 391 */
392static void __vb2_free_mem(struct vb2_queue *q, unsigned int buffers) 392static void __vb2_free_mem(struct vb2_queue *q, unsigned int buffers)
@@ -410,7 +410,7 @@ static void __vb2_free_mem(struct vb2_queue *q, unsigned int buffers)
410 } 410 }
411} 411}
412 412
413/** 413/*
414 * __vb2_queue_free() - free buffers at the end of the queue - video memory and 414 * __vb2_queue_free() - free buffers at the end of the queue - video memory and
415 * related information, if no buffers are left return the queue to an 415 * related information, if no buffers are left return the queue to an
416 * uninitialized state. Might be called even if the queue has already been freed. 416 * uninitialized state. Might be called even if the queue has already been freed.
@@ -544,7 +544,7 @@ bool vb2_buffer_in_use(struct vb2_queue *q, struct vb2_buffer *vb)
544} 544}
545EXPORT_SYMBOL(vb2_buffer_in_use); 545EXPORT_SYMBOL(vb2_buffer_in_use);
546 546
547/** 547/*
548 * __buffers_in_use() - return true if any buffers on the queue are in use and 548 * __buffers_in_use() - return true if any buffers on the queue are in use and
549 * the queue cannot be freed (by the means of REQBUFS(0)) call 549 * the queue cannot be freed (by the means of REQBUFS(0)) call
550 */ 550 */
@@ -564,7 +564,7 @@ void vb2_core_querybuf(struct vb2_queue *q, unsigned int index, void *pb)
564} 564}
565EXPORT_SYMBOL_GPL(vb2_core_querybuf); 565EXPORT_SYMBOL_GPL(vb2_core_querybuf);
566 566
567/** 567/*
568 * __verify_userptr_ops() - verify that all memory operations required for 568 * __verify_userptr_ops() - verify that all memory operations required for
569 * USERPTR queue type have been provided 569 * USERPTR queue type have been provided
570 */ 570 */
@@ -577,7 +577,7 @@ static int __verify_userptr_ops(struct vb2_queue *q)
577 return 0; 577 return 0;
578} 578}
579 579
580/** 580/*
581 * __verify_mmap_ops() - verify that all memory operations required for 581 * __verify_mmap_ops() - verify that all memory operations required for
582 * MMAP queue type have been provided 582 * MMAP queue type have been provided
583 */ 583 */
@@ -590,7 +590,7 @@ static int __verify_mmap_ops(struct vb2_queue *q)
590 return 0; 590 return 0;
591} 591}
592 592
593/** 593/*
594 * __verify_dmabuf_ops() - verify that all memory operations required for 594 * __verify_dmabuf_ops() - verify that all memory operations required for
595 * DMABUF queue type have been provided 595 * DMABUF queue type have been provided
596 */ 596 */
@@ -953,7 +953,7 @@ void vb2_discard_done(struct vb2_queue *q)
953} 953}
954EXPORT_SYMBOL_GPL(vb2_discard_done); 954EXPORT_SYMBOL_GPL(vb2_discard_done);
955 955
956/** 956/*
957 * __prepare_mmap() - prepare an MMAP buffer 957 * __prepare_mmap() - prepare an MMAP buffer
958 */ 958 */
959static int __prepare_mmap(struct vb2_buffer *vb, const void *pb) 959static int __prepare_mmap(struct vb2_buffer *vb, const void *pb)
@@ -966,7 +966,7 @@ static int __prepare_mmap(struct vb2_buffer *vb, const void *pb)
966 return ret ? ret : call_vb_qop(vb, buf_prepare, vb); 966 return ret ? ret : call_vb_qop(vb, buf_prepare, vb);
967} 967}
968 968
969/** 969/*
970 * __prepare_userptr() - prepare a USERPTR buffer 970 * __prepare_userptr() - prepare a USERPTR buffer
971 */ 971 */
972static int __prepare_userptr(struct vb2_buffer *vb, const void *pb) 972static int __prepare_userptr(struct vb2_buffer *vb, const void *pb)
@@ -1082,7 +1082,7 @@ err:
1082 return ret; 1082 return ret;
1083} 1083}
1084 1084
1085/** 1085/*
1086 * __prepare_dmabuf() - prepare a DMABUF buffer 1086 * __prepare_dmabuf() - prepare a DMABUF buffer
1087 */ 1087 */
1088static int __prepare_dmabuf(struct vb2_buffer *vb, const void *pb) 1088static int __prepare_dmabuf(struct vb2_buffer *vb, const void *pb)
@@ -1215,7 +1215,7 @@ err:
1215 return ret; 1215 return ret;
1216} 1216}
1217 1217
1218/** 1218/*
1219 * __enqueue_in_driver() - enqueue a vb2_buffer in driver for processing 1219 * __enqueue_in_driver() - enqueue a vb2_buffer in driver for processing
1220 */ 1220 */
1221static void __enqueue_in_driver(struct vb2_buffer *vb) 1221static void __enqueue_in_driver(struct vb2_buffer *vb)
@@ -1298,7 +1298,7 @@ int vb2_core_prepare_buf(struct vb2_queue *q, unsigned int index, void *pb)
1298} 1298}
1299EXPORT_SYMBOL_GPL(vb2_core_prepare_buf); 1299EXPORT_SYMBOL_GPL(vb2_core_prepare_buf);
1300 1300
1301/** 1301/*
1302 * vb2_start_streaming() - Attempt to start streaming. 1302 * vb2_start_streaming() - Attempt to start streaming.
1303 * @q: videobuf2 queue 1303 * @q: videobuf2 queue
1304 * 1304 *
@@ -1427,7 +1427,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
1427} 1427}
1428EXPORT_SYMBOL_GPL(vb2_core_qbuf); 1428EXPORT_SYMBOL_GPL(vb2_core_qbuf);
1429 1429
1430/** 1430/*
1431 * __vb2_wait_for_done_vb() - wait for a buffer to become available 1431 * __vb2_wait_for_done_vb() - wait for a buffer to become available
1432 * for dequeuing 1432 * for dequeuing
1433 * 1433 *
@@ -1502,7 +1502,7 @@ static int __vb2_wait_for_done_vb(struct vb2_queue *q, int nonblocking)
1502 return 0; 1502 return 0;
1503} 1503}
1504 1504
1505/** 1505/*
1506 * __vb2_get_done_vb() - get a buffer ready for dequeuing 1506 * __vb2_get_done_vb() - get a buffer ready for dequeuing
1507 * 1507 *
1508 * Will sleep if required for nonblocking == false. 1508 * Will sleep if required for nonblocking == false.
@@ -1553,7 +1553,7 @@ int vb2_wait_for_all_buffers(struct vb2_queue *q)
1553} 1553}
1554EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers); 1554EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
1555 1555
1556/** 1556/*
1557 * __vb2_dqbuf() - bring back the buffer to the DEQUEUED state 1557 * __vb2_dqbuf() - bring back the buffer to the DEQUEUED state
1558 */ 1558 */
1559static void __vb2_dqbuf(struct vb2_buffer *vb) 1559static void __vb2_dqbuf(struct vb2_buffer *vb)
@@ -1625,7 +1625,7 @@ int vb2_core_dqbuf(struct vb2_queue *q, unsigned int *pindex, void *pb,
1625} 1625}
1626EXPORT_SYMBOL_GPL(vb2_core_dqbuf); 1626EXPORT_SYMBOL_GPL(vb2_core_dqbuf);
1627 1627
1628/** 1628/*
1629 * __vb2_queue_cancel() - cancel and stop (pause) streaming 1629 * __vb2_queue_cancel() - cancel and stop (pause) streaming
1630 * 1630 *
1631 * Removes all queued buffers from driver's queue and all buffers queued by 1631 * Removes all queued buffers from driver's queue and all buffers queued by
@@ -1773,7 +1773,7 @@ int vb2_core_streamoff(struct vb2_queue *q, unsigned int type)
1773} 1773}
1774EXPORT_SYMBOL_GPL(vb2_core_streamoff); 1774EXPORT_SYMBOL_GPL(vb2_core_streamoff);
1775 1775
1776/** 1776/*
1777 * __find_plane_by_offset() - find plane associated with the given offset off 1777 * __find_plane_by_offset() - find plane associated with the given offset off
1778 */ 1778 */
1779static int __find_plane_by_offset(struct vb2_queue *q, unsigned long off, 1779static int __find_plane_by_offset(struct vb2_queue *q, unsigned long off,
@@ -2104,7 +2104,7 @@ unsigned int vb2_core_poll(struct vb2_queue *q, struct file *file,
2104} 2104}
2105EXPORT_SYMBOL_GPL(vb2_core_poll); 2105EXPORT_SYMBOL_GPL(vb2_core_poll);
2106 2106
2107/** 2107/*
2108 * struct vb2_fileio_buf - buffer context used by file io emulator 2108 * struct vb2_fileio_buf - buffer context used by file io emulator
2109 * 2109 *
2110 * vb2 provides a compatibility layer and emulator of file io (read and 2110 * vb2 provides a compatibility layer and emulator of file io (read and
@@ -2118,7 +2118,7 @@ struct vb2_fileio_buf {
2118 unsigned int queued:1; 2118 unsigned int queued:1;
2119}; 2119};
2120 2120
2121/** 2121/*
2122 * struct vb2_fileio_data - queue context used by file io emulator 2122 * struct vb2_fileio_data - queue context used by file io emulator
2123 * 2123 *
2124 * @cur_index: the index of the buffer currently being read from or 2124 * @cur_index: the index of the buffer currently being read from or
@@ -2155,7 +2155,7 @@ struct vb2_fileio_data {
2155 unsigned write_immediately:1; 2155 unsigned write_immediately:1;
2156}; 2156};
2157 2157
2158/** 2158/*
2159 * __vb2_init_fileio() - initialize file io emulator 2159 * __vb2_init_fileio() - initialize file io emulator
2160 * @q: videobuf2 queue 2160 * @q: videobuf2 queue
2161 * @read: mode selector (1 means read, 0 means write) 2161 * @read: mode selector (1 means read, 0 means write)
@@ -2274,7 +2274,7 @@ err_kfree:
2274 return ret; 2274 return ret;
2275} 2275}
2276 2276
2277/** 2277/*
2278 * __vb2_cleanup_fileio() - free resourced used by file io emulator 2278 * __vb2_cleanup_fileio() - free resourced used by file io emulator
2279 * @q: videobuf2 queue 2279 * @q: videobuf2 queue
2280 */ 2280 */
@@ -2293,7 +2293,7 @@ static int __vb2_cleanup_fileio(struct vb2_queue *q)
2293 return 0; 2293 return 0;
2294} 2294}
2295 2295
2296/** 2296/*
2297 * __vb2_perform_fileio() - perform a single file io (read or write) operation 2297 * __vb2_perform_fileio() - perform a single file io (read or write) operation
2298 * @q: videobuf2 queue 2298 * @q: videobuf2 queue
2299 * @data: pointed to target userspace buffer 2299 * @data: pointed to target userspace buffer
diff --git a/drivers/media/v4l2-core/videobuf2-memops.c b/drivers/media/v4l2-core/videobuf2-memops.c
index 4bb8424114ce..89e51989332b 100644
--- a/drivers/media/v4l2-core/videobuf2-memops.c
+++ b/drivers/media/v4l2-core/videobuf2-memops.c
@@ -120,7 +120,7 @@ static void vb2_common_vm_close(struct vm_area_struct *vma)
120 h->put(h->arg); 120 h->put(h->arg);
121} 121}
122 122
123/** 123/*
124 * vb2_common_vm_ops - common vm_ops used for tracking refcount of mmaped 124 * vb2_common_vm_ops - common vm_ops used for tracking refcount of mmaped
125 * video buffers 125 * video buffers
126 */ 126 */
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c
index 0c0669976bdc..4075314a6989 100644
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
@@ -49,7 +49,7 @@ module_param(debug, int, 0644);
49#define V4L2_BUFFER_OUT_FLAGS (V4L2_BUF_FLAG_PFRAME | V4L2_BUF_FLAG_BFRAME | \ 49#define V4L2_BUFFER_OUT_FLAGS (V4L2_BUF_FLAG_PFRAME | V4L2_BUF_FLAG_BFRAME | \
50 V4L2_BUF_FLAG_KEYFRAME | V4L2_BUF_FLAG_TIMECODE) 50 V4L2_BUF_FLAG_KEYFRAME | V4L2_BUF_FLAG_TIMECODE)
51 51
52/** 52/*
53 * __verify_planes_array() - verify that the planes array passed in struct 53 * __verify_planes_array() - verify that the planes array passed in struct
54 * v4l2_buffer from userspace can be safely used 54 * v4l2_buffer from userspace can be safely used
55 */ 55 */
@@ -78,7 +78,7 @@ static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb)
78 return __verify_planes_array(vb, pb); 78 return __verify_planes_array(vb, pb);
79} 79}
80 80
81/** 81/*
82 * __verify_length() - Verify that the bytesused value for each plane fits in 82 * __verify_length() - Verify that the bytesused value for each plane fits in
83 * the plane length and that the data offset doesn't exceed the bytesused value. 83 * the plane length and that the data offset doesn't exceed the bytesused value.
84 */ 84 */
@@ -181,7 +181,7 @@ static int vb2_queue_or_prepare_buf(struct vb2_queue *q, struct v4l2_buffer *b,
181 return __verify_planes_array(q->bufs[b->index], b); 181 return __verify_planes_array(q->bufs[b->index], b);
182} 182}
183 183
184/** 184/*
185 * __fill_v4l2_buffer() - fill in a struct v4l2_buffer with information to be 185 * __fill_v4l2_buffer() - fill in a struct v4l2_buffer with information to be
186 * returned to userspace 186 * returned to userspace
187 */ 187 */
@@ -286,7 +286,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb)
286 q->last_buffer_dequeued = true; 286 q->last_buffer_dequeued = true;
287} 287}
288 288
289/** 289/*
290 * __fill_vb2_buffer() - fill a vb2_buffer with information provided in a 290 * __fill_vb2_buffer() - fill a vb2_buffer with information provided in a
291 * v4l2_buffer by the userspace. It also verifies that struct 291 * v4l2_buffer by the userspace. It also verifies that struct
292 * v4l2_buffer has a valid number of planes. 292 * v4l2_buffer has a valid number of planes.
@@ -446,7 +446,7 @@ static const struct vb2_buf_ops v4l2_buf_ops = {
446 .copy_timestamp = __copy_timestamp, 446 .copy_timestamp = __copy_timestamp,
447}; 447};
448 448
449/** 449/*
450 * vb2_querybuf() - query video buffer information 450 * vb2_querybuf() - query video buffer information
451 * @q: videobuf queue 451 * @q: videobuf queue
452 * @b: buffer struct passed from userspace to vidioc_querybuf handler 452 * @b: buffer struct passed from userspace to vidioc_querybuf handler
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index a13a4896a8bd..0626dcfd1f3d 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -184,12 +184,12 @@
184 * Below is some version info we got: 184 * Below is some version info we got:
185 * SOC Version IP-Version Glitch- [TR]WRN_INT IRQ Err Memory err RTR re- 185 * SOC Version IP-Version Glitch- [TR]WRN_INT IRQ Err Memory err RTR re-
186 * Filter? connected? Passive detection ception in MB 186 * Filter? connected? Passive detection ception in MB
187 * MX25 FlexCAN2 03.00.00.00 no no ? no no 187 * MX25 FlexCAN2 03.00.00.00 no no no no no
188 * MX28 FlexCAN2 03.00.04.00 yes yes no no no 188 * MX28 FlexCAN2 03.00.04.00 yes yes no no no
189 * MX35 FlexCAN2 03.00.00.00 no no ? no no 189 * MX35 FlexCAN2 03.00.00.00 no no no no no
190 * MX53 FlexCAN2 03.00.00.00 yes no no no no 190 * MX53 FlexCAN2 03.00.00.00 yes no no no no
191 * MX6s FlexCAN3 10.00.12.00 yes yes no no yes 191 * MX6s FlexCAN3 10.00.12.00 yes yes no no yes
192 * VF610 FlexCAN3 ? no yes ? yes yes? 192 * VF610 FlexCAN3 ? no yes no yes yes?
193 * 193 *
194 * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. 194 * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
195 */ 195 */
@@ -297,7 +297,8 @@ static const struct flexcan_devtype_data fsl_imx6q_devtype_data = {
297 297
298static const struct flexcan_devtype_data fsl_vf610_devtype_data = { 298static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
299 .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | 299 .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
300 FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, 300 FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
301 FLEXCAN_QUIRK_BROKEN_PERR_STATE,
301}; 302};
302 303
303static const struct can_bittiming_const flexcan_bittiming_const = { 304static const struct can_bittiming_const flexcan_bittiming_const = {
diff --git a/drivers/net/can/peak_canfd/peak_canfd.c b/drivers/net/can/peak_canfd/peak_canfd.c
index 85268be0c913..55513411a82e 100644
--- a/drivers/net/can/peak_canfd/peak_canfd.c
+++ b/drivers/net/can/peak_canfd/peak_canfd.c
@@ -258,21 +258,18 @@ static int pucan_handle_can_rx(struct peak_canfd_priv *priv,
258 /* if this frame is an echo, */ 258 /* if this frame is an echo, */
259 if ((rx_msg_flags & PUCAN_MSG_LOOPED_BACK) && 259 if ((rx_msg_flags & PUCAN_MSG_LOOPED_BACK) &&
260 !(rx_msg_flags & PUCAN_MSG_SELF_RECEIVE)) { 260 !(rx_msg_flags & PUCAN_MSG_SELF_RECEIVE)) {
261 int n;
262 unsigned long flags; 261 unsigned long flags;
263 262
264 spin_lock_irqsave(&priv->echo_lock, flags); 263 spin_lock_irqsave(&priv->echo_lock, flags);
265 n = can_get_echo_skb(priv->ndev, msg->client); 264 can_get_echo_skb(priv->ndev, msg->client);
266 spin_unlock_irqrestore(&priv->echo_lock, flags); 265 spin_unlock_irqrestore(&priv->echo_lock, flags);
267 266
268 /* count bytes of the echo instead of skb */ 267 /* count bytes of the echo instead of skb */
269 stats->tx_bytes += cf_len; 268 stats->tx_bytes += cf_len;
270 stats->tx_packets++; 269 stats->tx_packets++;
271 270
272 if (n) { 271 /* restart tx queue (a slot is free) */
273 /* restart tx queue only if a slot is free */ 272 netif_wake_queue(priv->ndev);
274 netif_wake_queue(priv->ndev);
275 }
276 273
277 return 0; 274 return 0;
278 } 275 }
diff --git a/drivers/net/can/peak_canfd/peak_pciefd_main.c b/drivers/net/can/peak_canfd/peak_pciefd_main.c
index b4efd711f824..788c3464a3b0 100644
--- a/drivers/net/can/peak_canfd/peak_pciefd_main.c
+++ b/drivers/net/can/peak_canfd/peak_pciefd_main.c
@@ -825,7 +825,10 @@ err_release_regions:
825err_disable_pci: 825err_disable_pci:
826 pci_disable_device(pdev); 826 pci_disable_device(pdev);
827 827
828 return err; 828 /* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while
829 * the probe() function must return a negative errno in case of failure
830 * (err is unchanged if negative) */
831 return pcibios_err_to_errno(err);
829} 832}
830 833
831/* free the board structure object, as well as its resources: */ 834/* free the board structure object, as well as its resources: */
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index 131026fbc2d7..5adc95c922ee 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -717,7 +717,10 @@ failure_release_regions:
717failure_disable_pci: 717failure_disable_pci:
718 pci_disable_device(pdev); 718 pci_disable_device(pdev);
719 719
720 return err; 720 /* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while
721 * the probe() function must return a negative errno in case of failure
722 * (err is unchanged if negative) */
723 return pcibios_err_to_errno(err);
721} 724}
722 725
723static void peak_pci_remove(struct pci_dev *pdev) 726static void peak_pci_remove(struct pci_dev *pdev)
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 4d4941469cfc..db6ea936dc3f 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -637,6 +637,9 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota)
637 mbx_mask = hecc_read(priv, HECC_CANMIM); 637 mbx_mask = hecc_read(priv, HECC_CANMIM);
638 mbx_mask |= HECC_TX_MBOX_MASK; 638 mbx_mask |= HECC_TX_MBOX_MASK;
639 hecc_write(priv, HECC_CANMIM, mbx_mask); 639 hecc_write(priv, HECC_CANMIM, mbx_mask);
640 } else {
641 /* repoll is done only if whole budget is used */
642 num_pkts = quota;
640 } 643 }
641 644
642 return num_pkts; 645 return num_pkts;
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index b3d02759c226..b00358297424 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -288,6 +288,8 @@ static void ems_usb_read_interrupt_callback(struct urb *urb)
288 288
289 case -ECONNRESET: /* unlink */ 289 case -ECONNRESET: /* unlink */
290 case -ENOENT: 290 case -ENOENT:
291 case -EPIPE:
292 case -EPROTO:
291 case -ESHUTDOWN: 293 case -ESHUTDOWN:
292 return; 294 return;
293 295
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index 9fdb0f0bfa06..c6dcf93675c0 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -393,6 +393,8 @@ static void esd_usb2_read_bulk_callback(struct urb *urb)
393 break; 393 break;
394 394
395 case -ENOENT: 395 case -ENOENT:
396 case -EPIPE:
397 case -EPROTO:
396 case -ESHUTDOWN: 398 case -ESHUTDOWN:
397 return; 399 return;
398 400
diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c
index 9b18d96ef526..63587b8e6825 100644
--- a/drivers/net/can/usb/kvaser_usb.c
+++ b/drivers/net/can/usb/kvaser_usb.c
@@ -609,8 +609,8 @@ static int kvaser_usb_wait_msg(const struct kvaser_usb *dev, u8 id,
609 } 609 }
610 610
611 if (pos + tmp->len > actual_len) { 611 if (pos + tmp->len > actual_len) {
612 dev_err(dev->udev->dev.parent, 612 dev_err_ratelimited(dev->udev->dev.parent,
613 "Format error\n"); 613 "Format error\n");
614 break; 614 break;
615 } 615 }
616 616
@@ -813,6 +813,7 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,
813 if (err) { 813 if (err) {
814 netdev_err(netdev, "Error transmitting URB\n"); 814 netdev_err(netdev, "Error transmitting URB\n");
815 usb_unanchor_urb(urb); 815 usb_unanchor_urb(urb);
816 kfree(buf);
816 usb_free_urb(urb); 817 usb_free_urb(urb);
817 return err; 818 return err;
818 } 819 }
@@ -1325,6 +1326,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
1325 case 0: 1326 case 0:
1326 break; 1327 break;
1327 case -ENOENT: 1328 case -ENOENT:
1329 case -EPIPE:
1330 case -EPROTO:
1328 case -ESHUTDOWN: 1331 case -ESHUTDOWN:
1329 return; 1332 return;
1330 default: 1333 default:
@@ -1333,7 +1336,7 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
1333 goto resubmit_urb; 1336 goto resubmit_urb;
1334 } 1337 }
1335 1338
1336 while (pos <= urb->actual_length - MSG_HEADER_LEN) { 1339 while (pos <= (int)(urb->actual_length - MSG_HEADER_LEN)) {
1337 msg = urb->transfer_buffer + pos; 1340 msg = urb->transfer_buffer + pos;
1338 1341
1339 /* The Kvaser firmware can only read and write messages that 1342 /* The Kvaser firmware can only read and write messages that
@@ -1352,7 +1355,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
1352 } 1355 }
1353 1356
1354 if (pos + msg->len > urb->actual_length) { 1357 if (pos + msg->len > urb->actual_length) {
1355 dev_err(dev->udev->dev.parent, "Format error\n"); 1358 dev_err_ratelimited(dev->udev->dev.parent,
1359 "Format error\n");
1356 break; 1360 break;
1357 } 1361 }
1358 1362
@@ -1768,6 +1772,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
1768 spin_unlock_irqrestore(&priv->tx_contexts_lock, flags); 1772 spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
1769 1773
1770 usb_unanchor_urb(urb); 1774 usb_unanchor_urb(urb);
1775 kfree(buf);
1771 1776
1772 stats->tx_dropped++; 1777 stats->tx_dropped++;
1773 1778
diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index 7f0272558bef..8d8c2086424d 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -592,6 +592,8 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
592 break; 592 break;
593 593
594 case -ENOENT: 594 case -ENOENT:
595 case -EPIPE:
596 case -EPROTO:
595 case -ESHUTDOWN: 597 case -ESHUTDOWN:
596 return; 598 return;
597 599
@@ -862,7 +864,7 @@ static int mcba_usb_probe(struct usb_interface *intf,
862 goto cleanup_unregister_candev; 864 goto cleanup_unregister_candev;
863 } 865 }
864 866
865 dev_info(&intf->dev, "Microchip CAN BUS analizer connected\n"); 867 dev_info(&intf->dev, "Microchip CAN BUS Analyzer connected\n");
866 868
867 return 0; 869 return 0;
868 870
diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c
index d000cb62d6ae..27861c417c94 100644
--- a/drivers/net/can/usb/usb_8dev.c
+++ b/drivers/net/can/usb/usb_8dev.c
@@ -524,6 +524,8 @@ static void usb_8dev_read_bulk_callback(struct urb *urb)
524 break; 524 break;
525 525
526 case -ENOENT: 526 case -ENOENT:
527 case -EPIPE:
528 case -EPROTO:
527 case -ESHUTDOWN: 529 case -ESHUTDOWN:
528 return; 530 return;
529 531
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index ea01f24f15e7..b62d47210db8 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -14,7 +14,6 @@
14#include <linux/netdevice.h> 14#include <linux/netdevice.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/of.h>
18#include <linux/phy.h> 17#include <linux/phy.h>
19#include <linux/phy_fixed.h> 18#include <linux/phy_fixed.h>
20#include <linux/mii.h> 19#include <linux/mii.h>
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c
index b721a2009b50..23b45da784cb 100644
--- a/drivers/net/dsa/bcm_sf2_cfp.c
+++ b/drivers/net/dsa/bcm_sf2_cfp.c
@@ -625,7 +625,7 @@ static int bcm_sf2_cfp_ipv6_rule_set(struct bcm_sf2_priv *priv, int port,
625 bcm_sf2_cfp_slice_ipv6(priv, v6_spec->ip6src, v6_spec->psrc, 625 bcm_sf2_cfp_slice_ipv6(priv, v6_spec->ip6src, v6_spec->psrc,
626 slice_num, false); 626 slice_num, false);
627 bcm_sf2_cfp_slice_ipv6(priv, v6_m_spec->ip6src, v6_m_spec->psrc, 627 bcm_sf2_cfp_slice_ipv6(priv, v6_m_spec->ip6src, v6_m_spec->psrc,
628 slice_num, true); 628 SLICE_NUM_MASK, true);
629 629
630 /* Insert into TCAM now because we need to insert a second rule */ 630 /* Insert into TCAM now because we need to insert a second rule */
631 bcm_sf2_cfp_rule_addr_set(priv, rule_index[0]); 631 bcm_sf2_cfp_rule_addr_set(priv, rule_index[0]);
@@ -699,7 +699,7 @@ static int bcm_sf2_cfp_ipv6_rule_set(struct bcm_sf2_priv *priv, int port,
699 /* Insert into Action and policer RAMs now, set chain ID to 699 /* Insert into Action and policer RAMs now, set chain ID to
700 * the one we are chained to 700 * the one we are chained to
701 */ 701 */
702 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index[0], port_num, 702 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index[1], port_num,
703 queue_num, true); 703 queue_num, true);
704 if (ret) 704 if (ret)
705 goto out_err; 705 goto out_err;
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 8171055fde7a..66d33e97cbc5 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -339,7 +339,7 @@ static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)
339 u16 mask; 339 u16 mask;
340 340
341 mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &mask); 341 mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &mask);
342 mask |= GENMASK(chip->g1_irq.nirqs, 0); 342 mask &= ~GENMASK(chip->g1_irq.nirqs, 0);
343 mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask); 343 mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);
344 344
345 free_irq(chip->irq, chip); 345 free_irq(chip->irq, chip);
@@ -395,7 +395,7 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
395 return 0; 395 return 0;
396 396
397out_disable: 397out_disable:
398 mask |= GENMASK(chip->g1_irq.nirqs, 0); 398 mask &= ~GENMASK(chip->g1_irq.nirqs, 0);
399 mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask); 399 mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);
400 400
401out_mapping: 401out_mapping:
@@ -2177,6 +2177,19 @@ static const struct of_device_id mv88e6xxx_mdio_external_match[] = {
2177 { }, 2177 { },
2178}; 2178};
2179 2179
2180static void mv88e6xxx_mdios_unregister(struct mv88e6xxx_chip *chip)
2181
2182{
2183 struct mv88e6xxx_mdio_bus *mdio_bus;
2184 struct mii_bus *bus;
2185
2186 list_for_each_entry(mdio_bus, &chip->mdios, list) {
2187 bus = mdio_bus->bus;
2188
2189 mdiobus_unregister(bus);
2190 }
2191}
2192
2180static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip, 2193static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip,
2181 struct device_node *np) 2194 struct device_node *np)
2182{ 2195{
@@ -2201,27 +2214,16 @@ static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip,
2201 match = of_match_node(mv88e6xxx_mdio_external_match, child); 2214 match = of_match_node(mv88e6xxx_mdio_external_match, child);
2202 if (match) { 2215 if (match) {
2203 err = mv88e6xxx_mdio_register(chip, child, true); 2216 err = mv88e6xxx_mdio_register(chip, child, true);
2204 if (err) 2217 if (err) {
2218 mv88e6xxx_mdios_unregister(chip);
2205 return err; 2219 return err;
2220 }
2206 } 2221 }
2207 } 2222 }
2208 2223
2209 return 0; 2224 return 0;
2210} 2225}
2211 2226
2212static void mv88e6xxx_mdios_unregister(struct mv88e6xxx_chip *chip)
2213
2214{
2215 struct mv88e6xxx_mdio_bus *mdio_bus;
2216 struct mii_bus *bus;
2217
2218 list_for_each_entry(mdio_bus, &chip->mdios, list) {
2219 bus = mdio_bus->bus;
2220
2221 mdiobus_unregister(bus);
2222 }
2223}
2224
2225static int mv88e6xxx_get_eeprom_len(struct dsa_switch *ds) 2227static int mv88e6xxx_get_eeprom_len(struct dsa_switch *ds)
2226{ 2228{
2227 struct mv88e6xxx_chip *chip = ds->priv; 2229 struct mv88e6xxx_chip *chip = ds->priv;
diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
index e278e3d96ee0..c6163874e4e7 100644
--- a/drivers/net/ethernet/arc/emac_rockchip.c
+++ b/drivers/net/ethernet/arc/emac_rockchip.c
@@ -220,9 +220,11 @@ static int emac_rockchip_probe(struct platform_device *pdev)
220 220
221 /* RMII TX/RX needs always a rate of 25MHz */ 221 /* RMII TX/RX needs always a rate of 25MHz */
222 err = clk_set_rate(priv->macclk, 25000000); 222 err = clk_set_rate(priv->macclk, 25000000);
223 if (err) 223 if (err) {
224 dev_err(dev, 224 dev_err(dev,
225 "failed to change mac clock rate (%d)\n", err); 225 "failed to change mac clock rate (%d)\n", err);
226 goto out_clk_disable_macclk;
227 }
226 } 228 }
227 229
228 err = arc_emac_probe(ndev, interface); 230 err = arc_emac_probe(ndev, interface);
@@ -232,7 +234,8 @@ static int emac_rockchip_probe(struct platform_device *pdev)
232 } 234 }
233 235
234 return 0; 236 return 0;
235 237out_clk_disable_macclk:
238 clk_disable_unprepare(priv->macclk);
236out_regulator_disable: 239out_regulator_disable:
237 if (priv->regulator) 240 if (priv->regulator)
238 regulator_disable(priv->regulator); 241 regulator_disable(priv->regulator);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index c5c38d4b7d1c..61ca4eb7c6fa 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1883,7 +1883,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
1883 * here forever if we consistently cannot allocate 1883 * here forever if we consistently cannot allocate
1884 * buffers. 1884 * buffers.
1885 */ 1885 */
1886 else if (rc == -ENOMEM) 1886 else if (rc == -ENOMEM && budget)
1887 rx_pkts++; 1887 rx_pkts++;
1888 else if (rc == -EBUSY) /* partial completion */ 1888 else if (rc == -EBUSY) /* partial completion */
1889 break; 1889 break;
@@ -1969,7 +1969,7 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget)
1969 cpu_to_le32(RX_CMPL_ERRORS_CRC_ERROR); 1969 cpu_to_le32(RX_CMPL_ERRORS_CRC_ERROR);
1970 1970
1971 rc = bnxt_rx_pkt(bp, bnapi, &raw_cons, &event); 1971 rc = bnxt_rx_pkt(bp, bnapi, &raw_cons, &event);
1972 if (likely(rc == -EIO)) 1972 if (likely(rc == -EIO) && budget)
1973 rx_pkts++; 1973 rx_pkts++;
1974 else if (rc == -EBUSY) /* partial completion */ 1974 else if (rc == -EBUSY) /* partial completion */
1975 break; 1975 break;
@@ -3368,6 +3368,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
3368 u16 cp_ring_id, len = 0; 3368 u16 cp_ring_id, len = 0;
3369 struct hwrm_err_output *resp = bp->hwrm_cmd_resp_addr; 3369 struct hwrm_err_output *resp = bp->hwrm_cmd_resp_addr;
3370 u16 max_req_len = BNXT_HWRM_MAX_REQ_LEN; 3370 u16 max_req_len = BNXT_HWRM_MAX_REQ_LEN;
3371 struct hwrm_short_input short_input = {0};
3371 3372
3372 req->seq_id = cpu_to_le16(bp->hwrm_cmd_seq++); 3373 req->seq_id = cpu_to_le16(bp->hwrm_cmd_seq++);
3373 memset(resp, 0, PAGE_SIZE); 3374 memset(resp, 0, PAGE_SIZE);
@@ -3376,7 +3377,6 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
3376 3377
3377 if (bp->flags & BNXT_FLAG_SHORT_CMD) { 3378 if (bp->flags & BNXT_FLAG_SHORT_CMD) {
3378 void *short_cmd_req = bp->hwrm_short_cmd_req_addr; 3379 void *short_cmd_req = bp->hwrm_short_cmd_req_addr;
3379 struct hwrm_short_input short_input = {0};
3380 3380
3381 memcpy(short_cmd_req, req, msg_len); 3381 memcpy(short_cmd_req, req, msg_len);
3382 memset(short_cmd_req + msg_len, 0, BNXT_HWRM_MAX_REQ_LEN - 3382 memset(short_cmd_req + msg_len, 0, BNXT_HWRM_MAX_REQ_LEN -
@@ -8263,8 +8263,9 @@ static void bnxt_shutdown(struct pci_dev *pdev)
8263 if (netif_running(dev)) 8263 if (netif_running(dev))
8264 dev_close(dev); 8264 dev_close(dev);
8265 8265
8266 bnxt_ulp_shutdown(bp);
8267
8266 if (system_state == SYSTEM_POWER_OFF) { 8268 if (system_state == SYSTEM_POWER_OFF) {
8267 bnxt_ulp_shutdown(bp);
8268 bnxt_clear_int_mode(bp); 8269 bnxt_clear_int_mode(bp);
8269 pci_wake_from_d3(pdev, bp->wol); 8270 pci_wake_from_d3(pdev, bp->wol);
8270 pci_set_power_state(pdev, PCI_D3hot); 8271 pci_set_power_state(pdev, PCI_D3hot);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index d5031f436f83..3d201d7324bd 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -56,7 +56,6 @@ static int bnxt_tc_parse_redir(struct bnxt *bp,
56{ 56{
57 int ifindex = tcf_mirred_ifindex(tc_act); 57 int ifindex = tcf_mirred_ifindex(tc_act);
58 struct net_device *dev; 58 struct net_device *dev;
59 u16 dst_fid;
60 59
61 dev = __dev_get_by_index(dev_net(bp->dev), ifindex); 60 dev = __dev_get_by_index(dev_net(bp->dev), ifindex);
62 if (!dev) { 61 if (!dev) {
@@ -64,15 +63,7 @@ static int bnxt_tc_parse_redir(struct bnxt *bp,
64 return -EINVAL; 63 return -EINVAL;
65 } 64 }
66 65
67 /* find the FID from dev */
68 dst_fid = bnxt_flow_get_dst_fid(bp, dev);
69 if (dst_fid == BNXT_FID_INVALID) {
70 netdev_info(bp->dev, "can't get fid for ifindex=%d", ifindex);
71 return -EINVAL;
72 }
73
74 actions->flags |= BNXT_TC_ACTION_FLAG_FWD; 66 actions->flags |= BNXT_TC_ACTION_FLAG_FWD;
75 actions->dst_fid = dst_fid;
76 actions->dst_dev = dev; 67 actions->dst_dev = dev;
77 return 0; 68 return 0;
78} 69}
@@ -160,13 +151,17 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
160 if (rc) 151 if (rc)
161 return rc; 152 return rc;
162 153
163 /* Tunnel encap/decap action must be accompanied by a redirect action */ 154 if (actions->flags & BNXT_TC_ACTION_FLAG_FWD) {
164 if ((actions->flags & BNXT_TC_ACTION_FLAG_TUNNEL_ENCAP || 155 if (actions->flags & BNXT_TC_ACTION_FLAG_TUNNEL_ENCAP) {
165 actions->flags & BNXT_TC_ACTION_FLAG_TUNNEL_DECAP) && 156 /* dst_fid is PF's fid */
166 !(actions->flags & BNXT_TC_ACTION_FLAG_FWD)) { 157 actions->dst_fid = bp->pf.fw_fid;
167 netdev_info(bp->dev, 158 } else {
168 "error: no redir action along with encap/decap"); 159 /* find the FID from dst_dev */
169 return -EINVAL; 160 actions->dst_fid =
161 bnxt_flow_get_dst_fid(bp, actions->dst_dev);
162 if (actions->dst_fid == BNXT_FID_INVALID)
163 return -EINVAL;
164 }
170 } 165 }
171 166
172 return rc; 167 return rc;
@@ -532,10 +527,8 @@ static int hwrm_cfa_decap_filter_alloc(struct bnxt *bp,
532 } 527 }
533 528
534 if (flow->flags & BNXT_TC_FLOW_FLAGS_TUNL_ETH_ADDRS) { 529 if (flow->flags & BNXT_TC_FLOW_FLAGS_TUNL_ETH_ADDRS) {
535 enables |= CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_DST_MACADDR | 530 enables |= CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_DST_MACADDR;
536 CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_SRC_MACADDR;
537 ether_addr_copy(req.dst_macaddr, l2_info->dmac); 531 ether_addr_copy(req.dst_macaddr, l2_info->dmac);
538 ether_addr_copy(req.src_macaddr, l2_info->smac);
539 } 532 }
540 if (l2_info->num_vlans) { 533 if (l2_info->num_vlans) {
541 enables |= CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_T_IVLAN_VID; 534 enables |= CFA_DECAP_FILTER_ALLOC_REQ_ENABLES_T_IVLAN_VID;
@@ -901,10 +894,10 @@ static void bnxt_tc_put_decap_handle(struct bnxt *bp,
901 894
902static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp, 895static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
903 struct ip_tunnel_key *tun_key, 896 struct ip_tunnel_key *tun_key,
904 struct bnxt_tc_l2_key *l2_info, 897 struct bnxt_tc_l2_key *l2_info)
905 struct net_device *real_dst_dev)
906{ 898{
907#ifdef CONFIG_INET 899#ifdef CONFIG_INET
900 struct net_device *real_dst_dev = bp->dev;
908 struct flowi4 flow = { {0} }; 901 struct flowi4 flow = { {0} };
909 struct net_device *dst_dev; 902 struct net_device *dst_dev;
910 struct neighbour *nbr; 903 struct neighbour *nbr;
@@ -1008,14 +1001,13 @@ static int bnxt_tc_get_decap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow,
1008 */ 1001 */
1009 tun_key.u.ipv4.dst = flow->tun_key.u.ipv4.src; 1002 tun_key.u.ipv4.dst = flow->tun_key.u.ipv4.src;
1010 tun_key.tp_dst = flow->tun_key.tp_dst; 1003 tun_key.tp_dst = flow->tun_key.tp_dst;
1011 rc = bnxt_tc_resolve_tunnel_hdrs(bp, &tun_key, &l2_info, bp->dev); 1004 rc = bnxt_tc_resolve_tunnel_hdrs(bp, &tun_key, &l2_info);
1012 if (rc) 1005 if (rc)
1013 goto put_decap; 1006 goto put_decap;
1014 1007
1015 decap_key->ttl = tun_key.ttl;
1016 decap_l2_info = &decap_node->l2_info; 1008 decap_l2_info = &decap_node->l2_info;
1009 /* decap smac is wildcarded */
1017 ether_addr_copy(decap_l2_info->dmac, l2_info.smac); 1010 ether_addr_copy(decap_l2_info->dmac, l2_info.smac);
1018 ether_addr_copy(decap_l2_info->smac, l2_info.dmac);
1019 if (l2_info.num_vlans) { 1011 if (l2_info.num_vlans) {
1020 decap_l2_info->num_vlans = l2_info.num_vlans; 1012 decap_l2_info->num_vlans = l2_info.num_vlans;
1021 decap_l2_info->inner_vlan_tpid = l2_info.inner_vlan_tpid; 1013 decap_l2_info->inner_vlan_tpid = l2_info.inner_vlan_tpid;
@@ -1095,8 +1087,7 @@ static int bnxt_tc_get_encap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow,
1095 if (encap_node->tunnel_handle != INVALID_TUNNEL_HANDLE) 1087 if (encap_node->tunnel_handle != INVALID_TUNNEL_HANDLE)
1096 goto done; 1088 goto done;
1097 1089
1098 rc = bnxt_tc_resolve_tunnel_hdrs(bp, encap_key, &encap_node->l2_info, 1090 rc = bnxt_tc_resolve_tunnel_hdrs(bp, encap_key, &encap_node->l2_info);
1099 flow->actions.dst_dev);
1100 if (rc) 1091 if (rc)
1101 goto put_encap; 1092 goto put_encap;
1102 1093
@@ -1169,6 +1160,15 @@ static int __bnxt_tc_del_flow(struct bnxt *bp,
1169 return 0; 1160 return 0;
1170} 1161}
1171 1162
1163static void bnxt_tc_set_src_fid(struct bnxt *bp, struct bnxt_tc_flow *flow,
1164 u16 src_fid)
1165{
1166 if (flow->actions.flags & BNXT_TC_ACTION_FLAG_TUNNEL_DECAP)
1167 flow->src_fid = bp->pf.fw_fid;
1168 else
1169 flow->src_fid = src_fid;
1170}
1171
1172/* Add a new flow or replace an existing flow. 1172/* Add a new flow or replace an existing flow.
1173 * Notes on locking: 1173 * Notes on locking:
1174 * There are essentially two critical sections here. 1174 * There are essentially two critical sections here.
@@ -1204,7 +1204,8 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
1204 rc = bnxt_tc_parse_flow(bp, tc_flow_cmd, flow); 1204 rc = bnxt_tc_parse_flow(bp, tc_flow_cmd, flow);
1205 if (rc) 1205 if (rc)
1206 goto free_node; 1206 goto free_node;
1207 flow->src_fid = src_fid; 1207
1208 bnxt_tc_set_src_fid(bp, flow, src_fid);
1208 1209
1209 if (!bnxt_tc_can_offload(bp, flow)) { 1210 if (!bnxt_tc_can_offload(bp, flow)) {
1210 rc = -ENOSPC; 1211 rc = -ENOSPC;
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 6aa0eee88ea5..a5eecd895a82 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1113,7 +1113,7 @@ static int liquidio_watchdog(void *param)
1113 dev_err(&oct->pci_dev->dev, 1113 dev_err(&oct->pci_dev->dev,
1114 "ERROR: Octeon core %d crashed or got stuck! See oct-fwdump for details.\n", 1114 "ERROR: Octeon core %d crashed or got stuck! See oct-fwdump for details.\n",
1115 core); 1115 core);
1116 err_msg_was_printed[core] = true; 1116 err_msg_was_printed[core] = true;
1117 } 1117 }
1118 } 1118 }
1119 1119
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 8b2c31e2a2b0..a3d12dbde95b 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1355,6 +1355,8 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry,
1355 1355
1356 /* Offload checksum calculation to HW */ 1356 /* Offload checksum calculation to HW */
1357 if (skb->ip_summed == CHECKSUM_PARTIAL) { 1357 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1358 if (ip.v4->version == 4)
1359 hdr->csum_l3 = 1; /* Enable IP csum calculation */
1358 hdr->l3_offset = skb_network_offset(skb); 1360 hdr->l3_offset = skb_network_offset(skb);
1359 hdr->l4_offset = skb_transport_offset(skb); 1361 hdr->l4_offset = skb_transport_offset(skb);
1360 1362
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 5be52d89b182..7f837006bb6a 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1378,9 +1378,11 @@ static int gfar_probe(struct platform_device *ofdev)
1378 1378
1379 gfar_init_addr_hash_table(priv); 1379 gfar_init_addr_hash_table(priv);
1380 1380
1381 /* Insert receive time stamps into padding alignment bytes */ 1381 /* Insert receive time stamps into padding alignment bytes, and
1382 * plus 2 bytes padding to ensure the cpu alignment.
1383 */
1382 if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) 1384 if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)
1383 priv->padding = 8; 1385 priv->padding = 8 + DEFAULT_PADDING;
1384 1386
1385 if (dev->features & NETIF_F_IP_CSUM || 1387 if (dev->features & NETIF_F_IP_CSUM ||
1386 priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) 1388 priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)
@@ -1790,6 +1792,7 @@ static int init_phy(struct net_device *dev)
1790 GFAR_SUPPORTED_GBIT : 0; 1792 GFAR_SUPPORTED_GBIT : 0;
1791 phy_interface_t interface; 1793 phy_interface_t interface;
1792 struct phy_device *phydev; 1794 struct phy_device *phydev;
1795 struct ethtool_eee edata;
1793 1796
1794 priv->oldlink = 0; 1797 priv->oldlink = 0;
1795 priv->oldspeed = 0; 1798 priv->oldspeed = 0;
@@ -1814,6 +1817,10 @@ static int init_phy(struct net_device *dev)
1814 /* Add support for flow control, but don't advertise it by default */ 1817 /* Add support for flow control, but don't advertise it by default */
1815 phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause); 1818 phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
1816 1819
1820 /* disable EEE autoneg, EEE not supported by eTSEC */
1821 memset(&edata, 0, sizeof(struct ethtool_eee));
1822 phy_ethtool_set_eee(phydev, &edata);
1823
1817 return 0; 1824 return 0;
1818} 1825}
1819 1826
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index c9798210fa0f..0495487f7b42 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -344,7 +344,8 @@ static int orion_mdio_probe(struct platform_device *pdev)
344 dev->regs + MVMDIO_ERR_INT_MASK); 344 dev->regs + MVMDIO_ERR_INT_MASK);
345 345
346 } else if (dev->err_interrupt == -EPROBE_DEFER) { 346 } else if (dev->err_interrupt == -EPROBE_DEFER) {
347 return -EPROBE_DEFER; 347 ret = -EPROBE_DEFER;
348 goto out_mdio;
348 } 349 }
349 350
350 if (pdev->dev.of_node) 351 if (pdev->dev.of_node)
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index d83a78be98a2..634b2f41cc9e 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -85,7 +85,7 @@
85 85
86/* RSS Registers */ 86/* RSS Registers */
87#define MVPP22_RSS_INDEX 0x1500 87#define MVPP22_RSS_INDEX 0x1500
88#define MVPP22_RSS_INDEX_TABLE_ENTRY(idx) ((idx) << 8) 88#define MVPP22_RSS_INDEX_TABLE_ENTRY(idx) (idx)
89#define MVPP22_RSS_INDEX_TABLE(idx) ((idx) << 8) 89#define MVPP22_RSS_INDEX_TABLE(idx) ((idx) << 8)
90#define MVPP22_RSS_INDEX_QUEUE(idx) ((idx) << 16) 90#define MVPP22_RSS_INDEX_QUEUE(idx) ((idx) << 16)
91#define MVPP22_RSS_TABLE_ENTRY 0x1508 91#define MVPP22_RSS_TABLE_ENTRY 0x1508
@@ -5598,7 +5598,7 @@ static int mvpp2_aggr_txq_init(struct platform_device *pdev,
5598 u32 txq_dma; 5598 u32 txq_dma;
5599 5599
5600 /* Allocate memory for TX descriptors */ 5600 /* Allocate memory for TX descriptors */
5601 aggr_txq->descs = dma_alloc_coherent(&pdev->dev, 5601 aggr_txq->descs = dma_zalloc_coherent(&pdev->dev,
5602 MVPP2_AGGR_TXQ_SIZE * MVPP2_DESC_ALIGNED_SIZE, 5602 MVPP2_AGGR_TXQ_SIZE * MVPP2_DESC_ALIGNED_SIZE,
5603 &aggr_txq->descs_dma, GFP_KERNEL); 5603 &aggr_txq->descs_dma, GFP_KERNEL);
5604 if (!aggr_txq->descs) 5604 if (!aggr_txq->descs)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
index 924a05e05da0..78b36c67c232 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
@@ -84,16 +84,13 @@ nfp_repr_phy_port_get_stats64(struct nfp_port *port,
84{ 84{
85 u8 __iomem *mem = port->eth_stats; 85 u8 __iomem *mem = port->eth_stats;
86 86
87 /* TX and RX stats are flipped as we are returning the stats as seen 87 stats->tx_packets = readq(mem + NFP_MAC_STATS_TX_FRAMES_TRANSMITTED_OK);
88 * at the switch port corresponding to the phys port. 88 stats->tx_bytes = readq(mem + NFP_MAC_STATS_TX_OUT_OCTETS);
89 */ 89 stats->tx_dropped = readq(mem + NFP_MAC_STATS_TX_OUT_ERRORS);
90 stats->tx_packets = readq(mem + NFP_MAC_STATS_RX_FRAMES_RECEIVED_OK);
91 stats->tx_bytes = readq(mem + NFP_MAC_STATS_RX_IN_OCTETS);
92 stats->tx_dropped = readq(mem + NFP_MAC_STATS_RX_IN_ERRORS);
93 90
94 stats->rx_packets = readq(mem + NFP_MAC_STATS_TX_FRAMES_TRANSMITTED_OK); 91 stats->rx_packets = readq(mem + NFP_MAC_STATS_RX_FRAMES_RECEIVED_OK);
95 stats->rx_bytes = readq(mem + NFP_MAC_STATS_TX_OUT_OCTETS); 92 stats->rx_bytes = readq(mem + NFP_MAC_STATS_RX_IN_OCTETS);
96 stats->rx_dropped = readq(mem + NFP_MAC_STATS_TX_OUT_ERRORS); 93 stats->rx_dropped = readq(mem + NFP_MAC_STATS_RX_IN_ERRORS);
97} 94}
98 95
99static void 96static void
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index 71bee1af71ef..df21e900f874 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -195,6 +195,7 @@ err2:
195err1: 195err1:
196 rmnet_unregister_real_device(real_dev, port); 196 rmnet_unregister_real_device(real_dev, port);
197err0: 197err0:
198 kfree(ep);
198 return err; 199 return err;
199} 200}
200 201
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index 29842ccc91a9..08e4afc0ab39 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
@@ -126,12 +126,12 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
126 126
127 if (skb_headroom(skb) < required_headroom) { 127 if (skb_headroom(skb) < required_headroom) {
128 if (pskb_expand_head(skb, required_headroom, 0, GFP_KERNEL)) 128 if (pskb_expand_head(skb, required_headroom, 0, GFP_KERNEL))
129 return RMNET_MAP_CONSUMED; 129 goto fail;
130 } 130 }
131 131
132 map_header = rmnet_map_add_map_header(skb, additional_header_len, 0); 132 map_header = rmnet_map_add_map_header(skb, additional_header_len, 0);
133 if (!map_header) 133 if (!map_header)
134 return RMNET_MAP_CONSUMED; 134 goto fail;
135 135
136 if (port->egress_data_format & RMNET_EGRESS_FORMAT_MUXING) { 136 if (port->egress_data_format & RMNET_EGRESS_FORMAT_MUXING) {
137 if (mux_id == 0xff) 137 if (mux_id == 0xff)
@@ -143,6 +143,10 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
143 skb->protocol = htons(ETH_P_MAP); 143 skb->protocol = htons(ETH_P_MAP);
144 144
145 return RMNET_MAP_SUCCESS; 145 return RMNET_MAP_SUCCESS;
146
147fail:
148 kfree_skb(skb);
149 return RMNET_MAP_CONSUMED;
146} 150}
147 151
148static void 152static void
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 7e060aa9fbed..db72d13cebb9 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1149,7 +1149,8 @@ static int sh_eth_tx_free(struct net_device *ndev, bool sent_only)
1149 entry, le32_to_cpu(txdesc->status)); 1149 entry, le32_to_cpu(txdesc->status));
1150 /* Free the original skb. */ 1150 /* Free the original skb. */
1151 if (mdp->tx_skbuff[entry]) { 1151 if (mdp->tx_skbuff[entry]) {
1152 dma_unmap_single(&ndev->dev, le32_to_cpu(txdesc->addr), 1152 dma_unmap_single(&mdp->pdev->dev,
1153 le32_to_cpu(txdesc->addr),
1153 le32_to_cpu(txdesc->len) >> 16, 1154 le32_to_cpu(txdesc->len) >> 16,
1154 DMA_TO_DEVICE); 1155 DMA_TO_DEVICE);
1155 dev_kfree_skb_irq(mdp->tx_skbuff[entry]); 1156 dev_kfree_skb_irq(mdp->tx_skbuff[entry]);
@@ -1179,14 +1180,14 @@ static void sh_eth_ring_free(struct net_device *ndev)
1179 if (mdp->rx_skbuff[i]) { 1180 if (mdp->rx_skbuff[i]) {
1180 struct sh_eth_rxdesc *rxdesc = &mdp->rx_ring[i]; 1181 struct sh_eth_rxdesc *rxdesc = &mdp->rx_ring[i];
1181 1182
1182 dma_unmap_single(&ndev->dev, 1183 dma_unmap_single(&mdp->pdev->dev,
1183 le32_to_cpu(rxdesc->addr), 1184 le32_to_cpu(rxdesc->addr),
1184 ALIGN(mdp->rx_buf_sz, 32), 1185 ALIGN(mdp->rx_buf_sz, 32),
1185 DMA_FROM_DEVICE); 1186 DMA_FROM_DEVICE);
1186 } 1187 }
1187 } 1188 }
1188 ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring; 1189 ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring;
1189 dma_free_coherent(NULL, ringsize, mdp->rx_ring, 1190 dma_free_coherent(&mdp->pdev->dev, ringsize, mdp->rx_ring,
1190 mdp->rx_desc_dma); 1191 mdp->rx_desc_dma);
1191 mdp->rx_ring = NULL; 1192 mdp->rx_ring = NULL;
1192 } 1193 }
@@ -1203,7 +1204,7 @@ static void sh_eth_ring_free(struct net_device *ndev)
1203 sh_eth_tx_free(ndev, false); 1204 sh_eth_tx_free(ndev, false);
1204 1205
1205 ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring; 1206 ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring;
1206 dma_free_coherent(NULL, ringsize, mdp->tx_ring, 1207 dma_free_coherent(&mdp->pdev->dev, ringsize, mdp->tx_ring,
1207 mdp->tx_desc_dma); 1208 mdp->tx_desc_dma);
1208 mdp->tx_ring = NULL; 1209 mdp->tx_ring = NULL;
1209 } 1210 }
@@ -1245,9 +1246,9 @@ static void sh_eth_ring_format(struct net_device *ndev)
1245 1246
1246 /* The size of the buffer is a multiple of 32 bytes. */ 1247 /* The size of the buffer is a multiple of 32 bytes. */
1247 buf_len = ALIGN(mdp->rx_buf_sz, 32); 1248 buf_len = ALIGN(mdp->rx_buf_sz, 32);
1248 dma_addr = dma_map_single(&ndev->dev, skb->data, buf_len, 1249 dma_addr = dma_map_single(&mdp->pdev->dev, skb->data, buf_len,
1249 DMA_FROM_DEVICE); 1250 DMA_FROM_DEVICE);
1250 if (dma_mapping_error(&ndev->dev, dma_addr)) { 1251 if (dma_mapping_error(&mdp->pdev->dev, dma_addr)) {
1251 kfree_skb(skb); 1252 kfree_skb(skb);
1252 break; 1253 break;
1253 } 1254 }
@@ -1323,8 +1324,8 @@ static int sh_eth_ring_init(struct net_device *ndev)
1323 1324
1324 /* Allocate all Rx descriptors. */ 1325 /* Allocate all Rx descriptors. */
1325 rx_ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring; 1326 rx_ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring;
1326 mdp->rx_ring = dma_alloc_coherent(NULL, rx_ringsize, &mdp->rx_desc_dma, 1327 mdp->rx_ring = dma_alloc_coherent(&mdp->pdev->dev, rx_ringsize,
1327 GFP_KERNEL); 1328 &mdp->rx_desc_dma, GFP_KERNEL);
1328 if (!mdp->rx_ring) 1329 if (!mdp->rx_ring)
1329 goto ring_free; 1330 goto ring_free;
1330 1331
@@ -1332,8 +1333,8 @@ static int sh_eth_ring_init(struct net_device *ndev)
1332 1333
1333 /* Allocate all Tx descriptors. */ 1334 /* Allocate all Tx descriptors. */
1334 tx_ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring; 1335 tx_ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring;
1335 mdp->tx_ring = dma_alloc_coherent(NULL, tx_ringsize, &mdp->tx_desc_dma, 1336 mdp->tx_ring = dma_alloc_coherent(&mdp->pdev->dev, tx_ringsize,
1336 GFP_KERNEL); 1337 &mdp->tx_desc_dma, GFP_KERNEL);
1337 if (!mdp->tx_ring) 1338 if (!mdp->tx_ring)
1338 goto ring_free; 1339 goto ring_free;
1339 return 0; 1340 return 0;
@@ -1527,7 +1528,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
1527 mdp->rx_skbuff[entry] = NULL; 1528 mdp->rx_skbuff[entry] = NULL;
1528 if (mdp->cd->rpadir) 1529 if (mdp->cd->rpadir)
1529 skb_reserve(skb, NET_IP_ALIGN); 1530 skb_reserve(skb, NET_IP_ALIGN);
1530 dma_unmap_single(&ndev->dev, dma_addr, 1531 dma_unmap_single(&mdp->pdev->dev, dma_addr,
1531 ALIGN(mdp->rx_buf_sz, 32), 1532 ALIGN(mdp->rx_buf_sz, 32),
1532 DMA_FROM_DEVICE); 1533 DMA_FROM_DEVICE);
1533 skb_put(skb, pkt_len); 1534 skb_put(skb, pkt_len);
@@ -1555,9 +1556,9 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
1555 if (skb == NULL) 1556 if (skb == NULL)
1556 break; /* Better luck next round. */ 1557 break; /* Better luck next round. */
1557 sh_eth_set_receive_align(skb); 1558 sh_eth_set_receive_align(skb);
1558 dma_addr = dma_map_single(&ndev->dev, skb->data, 1559 dma_addr = dma_map_single(&mdp->pdev->dev, skb->data,
1559 buf_len, DMA_FROM_DEVICE); 1560 buf_len, DMA_FROM_DEVICE);
1560 if (dma_mapping_error(&ndev->dev, dma_addr)) { 1561 if (dma_mapping_error(&mdp->pdev->dev, dma_addr)) {
1561 kfree_skb(skb); 1562 kfree_skb(skb);
1562 break; 1563 break;
1563 } 1564 }
@@ -2441,9 +2442,9 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
2441 /* soft swap. */ 2442 /* soft swap. */
2442 if (!mdp->cd->hw_swap) 2443 if (!mdp->cd->hw_swap)
2443 sh_eth_soft_swap(PTR_ALIGN(skb->data, 4), skb->len + 2); 2444 sh_eth_soft_swap(PTR_ALIGN(skb->data, 4), skb->len + 2);
2444 dma_addr = dma_map_single(&ndev->dev, skb->data, skb->len, 2445 dma_addr = dma_map_single(&mdp->pdev->dev, skb->data, skb->len,
2445 DMA_TO_DEVICE); 2446 DMA_TO_DEVICE);
2446 if (dma_mapping_error(&ndev->dev, dma_addr)) { 2447 if (dma_mapping_error(&mdp->pdev->dev, dma_addr)) {
2447 kfree_skb(skb); 2448 kfree_skb(skb);
2448 return NETDEV_TX_OK; 2449 return NETDEV_TX_OK;
2449 } 2450 }
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index 0ea7e16f2e6e..9937a2450e57 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -77,6 +77,7 @@ static void efx_dequeue_buffer(struct efx_tx_queue *tx_queue,
77 } 77 }
78 78
79 if (buffer->flags & EFX_TX_BUF_SKB) { 79 if (buffer->flags & EFX_TX_BUF_SKB) {
80 EFX_WARN_ON_PARANOID(!pkts_compl || !bytes_compl);
80 (*pkts_compl)++; 81 (*pkts_compl)++;
81 (*bytes_compl) += buffer->skb->len; 82 (*bytes_compl) += buffer->skb->len;
82 dev_consume_skb_any((struct sk_buff *)buffer->skb); 83 dev_consume_skb_any((struct sk_buff *)buffer->skb);
@@ -426,12 +427,14 @@ static int efx_tx_map_data(struct efx_tx_queue *tx_queue, struct sk_buff *skb,
426static void efx_enqueue_unwind(struct efx_tx_queue *tx_queue) 427static void efx_enqueue_unwind(struct efx_tx_queue *tx_queue)
427{ 428{
428 struct efx_tx_buffer *buffer; 429 struct efx_tx_buffer *buffer;
430 unsigned int bytes_compl = 0;
431 unsigned int pkts_compl = 0;
429 432
430 /* Work backwards until we hit the original insert pointer value */ 433 /* Work backwards until we hit the original insert pointer value */
431 while (tx_queue->insert_count != tx_queue->write_count) { 434 while (tx_queue->insert_count != tx_queue->write_count) {
432 --tx_queue->insert_count; 435 --tx_queue->insert_count;
433 buffer = __efx_tx_queue_get_insert_buffer(tx_queue); 436 buffer = __efx_tx_queue_get_insert_buffer(tx_queue);
434 efx_dequeue_buffer(tx_queue, buffer, NULL, NULL); 437 efx_dequeue_buffer(tx_queue, buffer, &pkts_compl, &bytes_compl);
435 } 438 }
436} 439}
437 440
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index e5ff734d4f9b..9eb7f65d8000 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
808 val, reg); 808 val, reg);
809 809
810 if (gmac->variant->soc_has_internal_phy) { 810 if (gmac->variant->soc_has_internal_phy) {
811 if (of_property_read_bool(priv->plat->phy_node, 811 if (of_property_read_bool(node, "allwinner,leds-active-low"))
812 "allwinner,leds-active-low"))
813 reg |= H3_EPHY_LED_POL; 812 reg |= H3_EPHY_LED_POL;
814 else 813 else
815 reg &= ~H3_EPHY_LED_POL; 814 reg &= ~H3_EPHY_LED_POL;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index f63c2ddced3c..d7250539d0bd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2588,6 +2588,7 @@ static int stmmac_open(struct net_device *dev)
2588 2588
2589 priv->dma_buf_sz = STMMAC_ALIGN(buf_sz); 2589 priv->dma_buf_sz = STMMAC_ALIGN(buf_sz);
2590 priv->rx_copybreak = STMMAC_RX_COPYBREAK; 2590 priv->rx_copybreak = STMMAC_RX_COPYBREAK;
2591 priv->mss = 0;
2591 2592
2592 ret = alloc_dma_desc_resources(priv); 2593 ret = alloc_dma_desc_resources(priv);
2593 if (ret < 0) { 2594 if (ret < 0) {
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index 11c1e7950fe5..77cc4fbaeace 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -393,6 +393,7 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb)
393 .flowi4_oif = dev->ifindex, 393 .flowi4_oif = dev->ifindex,
394 .flowi4_tos = RT_TOS(ip4h->tos), 394 .flowi4_tos = RT_TOS(ip4h->tos),
395 .flowi4_flags = FLOWI_FLAG_ANYSRC, 395 .flowi4_flags = FLOWI_FLAG_ANYSRC,
396 .flowi4_mark = skb->mark,
396 .daddr = ip4h->daddr, 397 .daddr = ip4h->daddr,
397 .saddr = ip4h->saddr, 398 .saddr = ip4h->saddr,
398 }; 399 };
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index fdb43dd9b5cd..ab4614113403 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -496,16 +496,18 @@ static int ksz9031_of_load_skew_values(struct phy_device *phydev,
496 return ksz9031_extended_write(phydev, OP_DATA, 2, reg, newval); 496 return ksz9031_extended_write(phydev, OP_DATA, 2, reg, newval);
497} 497}
498 498
499/* Center KSZ9031RNX FLP timing at 16ms. */
499static int ksz9031_center_flp_timing(struct phy_device *phydev) 500static int ksz9031_center_flp_timing(struct phy_device *phydev)
500{ 501{
501 int result; 502 int result;
502 503
503 /* Center KSZ9031RNX FLP timing at 16ms. */
504 result = ksz9031_extended_write(phydev, OP_DATA, 0, 504 result = ksz9031_extended_write(phydev, OP_DATA, 0,
505 MII_KSZ9031RN_FLP_BURST_TX_HI, 0x0006); 505 MII_KSZ9031RN_FLP_BURST_TX_HI, 0x0006);
506 if (result)
507 return result;
508
506 result = ksz9031_extended_write(phydev, OP_DATA, 0, 509 result = ksz9031_extended_write(phydev, OP_DATA, 0,
507 MII_KSZ9031RN_FLP_BURST_TX_LO, 0x1A80); 510 MII_KSZ9031RN_FLP_BURST_TX_LO, 0x1A80);
508
509 if (result) 511 if (result)
510 return result; 512 return result;
511 513
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index e3bbc70372d3..5dc9668dde34 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -773,6 +773,7 @@ void phylink_stop(struct phylink *pl)
773 sfp_upstream_stop(pl->sfp_bus); 773 sfp_upstream_stop(pl->sfp_bus);
774 774
775 set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); 775 set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
776 queue_work(system_power_efficient_wq, &pl->resolve);
776 flush_work(&pl->resolve); 777 flush_work(&pl->resolve);
777} 778}
778EXPORT_SYMBOL_GPL(phylink_stop); 779EXPORT_SYMBOL_GPL(phylink_stop);
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index e381811e5f11..9dfc1c4c954f 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -351,12 +351,13 @@ static void sfp_sm_link_check_los(struct sfp *sfp)
351{ 351{
352 unsigned int los = sfp->state & SFP_F_LOS; 352 unsigned int los = sfp->state & SFP_F_LOS;
353 353
354 /* FIXME: what if neither SFP_OPTIONS_LOS_INVERTED nor 354 /* If neither SFP_OPTIONS_LOS_INVERTED nor SFP_OPTIONS_LOS_NORMAL
355 * SFP_OPTIONS_LOS_NORMAL are set? For now, we assume 355 * are set, we assume that no LOS signal is available.
356 * the same as SFP_OPTIONS_LOS_NORMAL set.
357 */ 356 */
358 if (sfp->id.ext.options & SFP_OPTIONS_LOS_INVERTED) 357 if (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED))
359 los ^= SFP_F_LOS; 358 los ^= SFP_F_LOS;
359 else if (!(sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL)))
360 los = 0;
360 361
361 if (los) 362 if (los)
362 sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0); 363 sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0);
@@ -364,6 +365,22 @@ static void sfp_sm_link_check_los(struct sfp *sfp)
364 sfp_sm_link_up(sfp); 365 sfp_sm_link_up(sfp);
365} 366}
366 367
368static bool sfp_los_event_active(struct sfp *sfp, unsigned int event)
369{
370 return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
371 event == SFP_E_LOS_LOW) ||
372 (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
373 event == SFP_E_LOS_HIGH);
374}
375
376static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event)
377{
378 return (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) &&
379 event == SFP_E_LOS_HIGH) ||
380 (sfp->id.ext.options & cpu_to_be16(SFP_OPTIONS_LOS_NORMAL) &&
381 event == SFP_E_LOS_LOW);
382}
383
367static void sfp_sm_fault(struct sfp *sfp, bool warn) 384static void sfp_sm_fault(struct sfp *sfp, bool warn)
368{ 385{
369 if (sfp->sm_retries && !--sfp->sm_retries) { 386 if (sfp->sm_retries && !--sfp->sm_retries) {
@@ -470,6 +487,11 @@ static int sfp_sm_mod_probe(struct sfp *sfp)
470 return -EINVAL; 487 return -EINVAL;
471 } 488 }
472 489
490 /* If the module requires address swap mode, warn about it */
491 if (sfp->id.ext.diagmon & SFP_DIAGMON_ADDRMODE)
492 dev_warn(sfp->dev,
493 "module address swap to access page 0xA2 is not supported.\n");
494
473 return sfp_module_insert(sfp->sfp_bus, &sfp->id); 495 return sfp_module_insert(sfp->sfp_bus, &sfp->id);
474} 496}
475 497
@@ -581,9 +603,7 @@ static void sfp_sm_event(struct sfp *sfp, unsigned int event)
581 case SFP_S_WAIT_LOS: 603 case SFP_S_WAIT_LOS:
582 if (event == SFP_E_TX_FAULT) 604 if (event == SFP_E_TX_FAULT)
583 sfp_sm_fault(sfp, true); 605 sfp_sm_fault(sfp, true);
584 else if (event == 606 else if (sfp_los_event_inactive(sfp, event))
585 (sfp->id.ext.options & SFP_OPTIONS_LOS_INVERTED ?
586 SFP_E_LOS_HIGH : SFP_E_LOS_LOW))
587 sfp_sm_link_up(sfp); 607 sfp_sm_link_up(sfp);
588 break; 608 break;
589 609
@@ -591,9 +611,7 @@ static void sfp_sm_event(struct sfp *sfp, unsigned int event)
591 if (event == SFP_E_TX_FAULT) { 611 if (event == SFP_E_TX_FAULT) {
592 sfp_sm_link_down(sfp); 612 sfp_sm_link_down(sfp);
593 sfp_sm_fault(sfp, true); 613 sfp_sm_fault(sfp, true);
594 } else if (event == 614 } else if (sfp_los_event_active(sfp, event)) {
595 (sfp->id.ext.options & SFP_OPTIONS_LOS_INVERTED ?
596 SFP_E_LOS_LOW : SFP_E_LOS_HIGH)) {
597 sfp_sm_link_down(sfp); 615 sfp_sm_link_down(sfp);
598 sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0); 616 sfp_sm_next(sfp, SFP_S_WAIT_LOS, 0);
599 } 617 }
@@ -639,7 +657,8 @@ static int sfp_module_info(struct sfp *sfp, struct ethtool_modinfo *modinfo)
639{ 657{
640 /* locking... and check module is present */ 658 /* locking... and check module is present */
641 659
642 if (sfp->id.ext.sff8472_compliance) { 660 if (sfp->id.ext.sff8472_compliance &&
661 !(sfp->id.ext.diagmon & SFP_DIAGMON_ADDRMODE)) {
643 modinfo->type = ETH_MODULE_SFF_8472; 662 modinfo->type = ETH_MODULE_SFF_8472;
644 modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN; 663 modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
645 } else { 664 } else {
diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index e9489b88407c..0a886fda0129 100644
--- a/drivers/net/tap.c
+++ b/drivers/net/tap.c
@@ -829,8 +829,11 @@ static ssize_t tap_do_read(struct tap_queue *q,
829 DEFINE_WAIT(wait); 829 DEFINE_WAIT(wait);
830 ssize_t ret = 0; 830 ssize_t ret = 0;
831 831
832 if (!iov_iter_count(to)) 832 if (!iov_iter_count(to)) {
833 if (skb)
834 kfree_skb(skb);
833 return 0; 835 return 0;
836 }
834 837
835 if (skb) 838 if (skb)
836 goto put; 839 goto put;
@@ -1154,11 +1157,14 @@ static int tap_recvmsg(struct socket *sock, struct msghdr *m,
1154 size_t total_len, int flags) 1157 size_t total_len, int flags)
1155{ 1158{
1156 struct tap_queue *q = container_of(sock, struct tap_queue, sock); 1159 struct tap_queue *q = container_of(sock, struct tap_queue, sock);
1160 struct sk_buff *skb = m->msg_control;
1157 int ret; 1161 int ret;
1158 if (flags & ~(MSG_DONTWAIT|MSG_TRUNC)) 1162 if (flags & ~(MSG_DONTWAIT|MSG_TRUNC)) {
1163 if (skb)
1164 kfree_skb(skb);
1159 return -EINVAL; 1165 return -EINVAL;
1160 ret = tap_do_read(q, &m->msg_iter, flags & MSG_DONTWAIT, 1166 }
1161 m->msg_control); 1167 ret = tap_do_read(q, &m->msg_iter, flags & MSG_DONTWAIT, skb);
1162 if (ret > total_len) { 1168 if (ret > total_len) {
1163 m->msg_flags |= MSG_TRUNC; 1169 m->msg_flags |= MSG_TRUNC;
1164 ret = flags & MSG_TRUNC ? ret : total_len; 1170 ret = flags & MSG_TRUNC ? ret : total_len;
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 95749006d687..4f4a842a1c9c 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1952,8 +1952,11 @@ static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile,
1952 1952
1953 tun_debug(KERN_INFO, tun, "tun_do_read\n"); 1953 tun_debug(KERN_INFO, tun, "tun_do_read\n");
1954 1954
1955 if (!iov_iter_count(to)) 1955 if (!iov_iter_count(to)) {
1956 if (skb)
1957 kfree_skb(skb);
1956 return 0; 1958 return 0;
1959 }
1957 1960
1958 if (!skb) { 1961 if (!skb) {
1959 /* Read frames from ring */ 1962 /* Read frames from ring */
@@ -2069,22 +2072,24 @@ static int tun_recvmsg(struct socket *sock, struct msghdr *m, size_t total_len,
2069{ 2072{
2070 struct tun_file *tfile = container_of(sock, struct tun_file, socket); 2073 struct tun_file *tfile = container_of(sock, struct tun_file, socket);
2071 struct tun_struct *tun = tun_get(tfile); 2074 struct tun_struct *tun = tun_get(tfile);
2075 struct sk_buff *skb = m->msg_control;
2072 int ret; 2076 int ret;
2073 2077
2074 if (!tun) 2078 if (!tun) {
2075 return -EBADFD; 2079 ret = -EBADFD;
2080 goto out_free_skb;
2081 }
2076 2082
2077 if (flags & ~(MSG_DONTWAIT|MSG_TRUNC|MSG_ERRQUEUE)) { 2083 if (flags & ~(MSG_DONTWAIT|MSG_TRUNC|MSG_ERRQUEUE)) {
2078 ret = -EINVAL; 2084 ret = -EINVAL;
2079 goto out; 2085 goto out_put_tun;
2080 } 2086 }
2081 if (flags & MSG_ERRQUEUE) { 2087 if (flags & MSG_ERRQUEUE) {
2082 ret = sock_recv_errqueue(sock->sk, m, total_len, 2088 ret = sock_recv_errqueue(sock->sk, m, total_len,
2083 SOL_PACKET, TUN_TX_TIMESTAMP); 2089 SOL_PACKET, TUN_TX_TIMESTAMP);
2084 goto out; 2090 goto out;
2085 } 2091 }
2086 ret = tun_do_read(tun, tfile, &m->msg_iter, flags & MSG_DONTWAIT, 2092 ret = tun_do_read(tun, tfile, &m->msg_iter, flags & MSG_DONTWAIT, skb);
2087 m->msg_control);
2088 if (ret > (ssize_t)total_len) { 2093 if (ret > (ssize_t)total_len) {
2089 m->msg_flags |= MSG_TRUNC; 2094 m->msg_flags |= MSG_TRUNC;
2090 ret = flags & MSG_TRUNC ? ret : total_len; 2095 ret = flags & MSG_TRUNC ? ret : total_len;
@@ -2092,6 +2097,13 @@ static int tun_recvmsg(struct socket *sock, struct msghdr *m, size_t total_len,
2092out: 2097out:
2093 tun_put(tun); 2098 tun_put(tun);
2094 return ret; 2099 return ret;
2100
2101out_put_tun:
2102 tun_put(tun);
2103out_free_skb:
2104 if (skb)
2105 kfree_skb(skb);
2106 return ret;
2095} 2107}
2096 2108
2097static int tun_peek_len(struct socket *sock) 2109static int tun_peek_len(struct socket *sock)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index c750cf7c042b..304ec6555cd8 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -261,9 +261,11 @@ static void qmi_wwan_netdev_setup(struct net_device *net)
261 net->hard_header_len = 0; 261 net->hard_header_len = 0;
262 net->addr_len = 0; 262 net->addr_len = 0;
263 net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST; 263 net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
264 set_bit(EVENT_NO_IP_ALIGN, &dev->flags);
264 netdev_dbg(net, "mode: raw IP\n"); 265 netdev_dbg(net, "mode: raw IP\n");
265 } else if (!net->header_ops) { /* don't bother if already set */ 266 } else if (!net->header_ops) { /* don't bother if already set */
266 ether_setup(net); 267 ether_setup(net);
268 clear_bit(EVENT_NO_IP_ALIGN, &dev->flags);
267 netdev_dbg(net, "mode: Ethernet\n"); 269 netdev_dbg(net, "mode: Ethernet\n");
268 } 270 }
269 271
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 80348b6a8646..d56fe32bf48d 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -484,7 +484,10 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
484 return -ENOLINK; 484 return -ENOLINK;
485 } 485 }
486 486
487 skb = __netdev_alloc_skb_ip_align(dev->net, size, flags); 487 if (test_bit(EVENT_NO_IP_ALIGN, &dev->flags))
488 skb = __netdev_alloc_skb(dev->net, size, flags);
489 else
490 skb = __netdev_alloc_skb_ip_align(dev->net, size, flags);
488 if (!skb) { 491 if (!skb) {
489 netif_dbg(dev, rx_err, dev->net, "no rx skb\n"); 492 netif_dbg(dev, rx_err, dev->net, "no rx skb\n");
490 usbnet_defer_kevent (dev, EVENT_RX_MEMORY); 493 usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 19a985ef9104..559b215c0169 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -756,7 +756,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
756 int num_skb_frags; 756 int num_skb_frags;
757 757
758 buf = virtqueue_get_buf_ctx(rq->vq, &len, &ctx); 758 buf = virtqueue_get_buf_ctx(rq->vq, &len, &ctx);
759 if (unlikely(!ctx)) { 759 if (unlikely(!buf)) {
760 pr_debug("%s: rx error: %d buffers out of %d missing\n", 760 pr_debug("%s: rx error: %d buffers out of %d missing\n",
761 dev->name, num_buf, 761 dev->name, num_buf,
762 virtio16_to_cpu(vi->vdev, 762 virtio16_to_cpu(vi->vdev,
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 310c4e2746aa..cdf9e4161592 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -2070,7 +2070,7 @@ static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt)
2070 return head_pad; 2070 return head_pad;
2071} 2071}
2072 2072
2073/** 2073/*
2074 * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for 2074 * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for
2075 * bus layer usage. 2075 * bus layer usage.
2076 */ 2076 */
@@ -4121,8 +4121,8 @@ release:
4121 sdio_release_host(sdiodev->func[1]); 4121 sdio_release_host(sdiodev->func[1]);
4122fail: 4122fail:
4123 brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err); 4123 brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
4124 device_release_driver(dev);
4125 device_release_driver(&sdiodev->func[2]->dev); 4124 device_release_driver(&sdiodev->func[2]->dev);
4125 device_release_driver(dev);
4126} 4126}
4127 4127
4128struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) 4128struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
index 87b4434224a1..dfa111bb411e 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
@@ -68,6 +68,9 @@
68 * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW 68 * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW
69 * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames 69 * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames
70 * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames 70 * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames
71 * @IWL_MVM_DQA_INJECT_MONITOR_QUEUE: a queue reserved for injection using
72 * monitor mode. Note this queue is the same as the queue for P2P device
73 * but we can't have active monitor mode along with P2P device anyway.
71 * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames 74 * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames
72 * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure 75 * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure
73 * that we are never left without the possibility to connect to an AP. 76 * that we are never left without the possibility to connect to an AP.
@@ -87,6 +90,7 @@ enum iwl_mvm_dqa_txq {
87 IWL_MVM_DQA_CMD_QUEUE = 0, 90 IWL_MVM_DQA_CMD_QUEUE = 0,
88 IWL_MVM_DQA_AUX_QUEUE = 1, 91 IWL_MVM_DQA_AUX_QUEUE = 1,
89 IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2, 92 IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2,
93 IWL_MVM_DQA_INJECT_MONITOR_QUEUE = 2,
90 IWL_MVM_DQA_GCAST_QUEUE = 3, 94 IWL_MVM_DQA_GCAST_QUEUE = 3,
91 IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4, 95 IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4,
92 IWL_MVM_DQA_MIN_MGMT_QUEUE = 5, 96 IWL_MVM_DQA_MIN_MGMT_QUEUE = 5,
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index 9c889a32fe24..223fb77a3aa9 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -209,8 +209,6 @@ static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt)
209 209
210static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) 210static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt)
211{ 211{
212 iwl_fw_dbg_stop_recording(fwrt);
213
214 fwrt->dump.conf = FW_DBG_INVALID; 212 fwrt->dump.conf = FW_DBG_INVALID;
215} 213}
216 214
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index ca0b5536a8a6..921cab9e2d73 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -117,6 +117,7 @@
117#define FH_RSCSR_FRAME_INVALID 0x55550000 117#define FH_RSCSR_FRAME_INVALID 0x55550000
118#define FH_RSCSR_FRAME_ALIGN 0x40 118#define FH_RSCSR_FRAME_ALIGN 0x40
119#define FH_RSCSR_RPA_EN BIT(25) 119#define FH_RSCSR_RPA_EN BIT(25)
120#define FH_RSCSR_RADA_EN BIT(26)
120#define FH_RSCSR_RXQ_POS 16 121#define FH_RSCSR_RXQ_POS 16
121#define FH_RSCSR_RXQ_MASK 0x3F0000 122#define FH_RSCSR_RXQ_MASK 0x3F0000
122 123
@@ -128,7 +129,8 @@ struct iwl_rx_packet {
128 * 31: flag flush RB request 129 * 31: flag flush RB request
129 * 30: flag ignore TC (terminal counter) request 130 * 30: flag ignore TC (terminal counter) request
130 * 29: flag fast IRQ request 131 * 29: flag fast IRQ request
131 * 28-26: Reserved 132 * 28-27: Reserved
133 * 26: RADA enabled
132 * 25: Offload enabled 134 * 25: Offload enabled
133 * 24: RPF enabled 135 * 24: RPF enabled
134 * 23: RSS enabled 136 * 23: RSS enabled
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index a2bf530eeae4..2f22e14e00fe 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -787,7 +787,7 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm,
787 u32 action) 787 u32 action)
788{ 788{
789 struct iwl_mac_ctx_cmd cmd = {}; 789 struct iwl_mac_ctx_cmd cmd = {};
790 u32 tfd_queue_msk = 0; 790 u32 tfd_queue_msk = BIT(mvm->snif_queue);
791 int ret; 791 int ret;
792 792
793 WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); 793 WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 4575595ab022..55ab5349dd40 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -972,6 +972,7 @@ struct iwl_mvm {
972 972
973 /* Tx queues */ 973 /* Tx queues */
974 u16 aux_queue; 974 u16 aux_queue;
975 u16 snif_queue;
975 u16 probe_queue; 976 u16 probe_queue;
976 u16 p2p_dev_queue; 977 u16 p2p_dev_queue;
977 978
@@ -1060,6 +1061,7 @@ struct iwl_mvm {
1060 * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running 1061 * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
1061 * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done 1062 * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done
1062 * @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running 1063 * @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running
1064 * @IWL_MVM_STATUS_NEED_FLUSH_P2P: need to flush P2P bcast STA
1063 */ 1065 */
1064enum iwl_mvm_status { 1066enum iwl_mvm_status {
1065 IWL_MVM_STATUS_HW_RFKILL, 1067 IWL_MVM_STATUS_HW_RFKILL,
@@ -1071,6 +1073,7 @@ enum iwl_mvm_status {
1071 IWL_MVM_STATUS_ROC_AUX_RUNNING, 1073 IWL_MVM_STATUS_ROC_AUX_RUNNING,
1072 IWL_MVM_STATUS_D3_RECONFIG, 1074 IWL_MVM_STATUS_D3_RECONFIG,
1073 IWL_MVM_STATUS_FIRMWARE_RUNNING, 1075 IWL_MVM_STATUS_FIRMWARE_RUNNING,
1076 IWL_MVM_STATUS_NEED_FLUSH_P2P,
1074}; 1077};
1075 1078
1076/* Keep track of completed init configuration */ 1079/* Keep track of completed init configuration */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 7078b7e458be..45470b6b351a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -624,6 +624,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
624 mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0; 624 mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0;
625 625
626 mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; 626 mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE;
627 mvm->snif_queue = IWL_MVM_DQA_INJECT_MONITOR_QUEUE;
627 mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; 628 mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
628 mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; 629 mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE;
629 630
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 76dc58381e1c..3b8d44361380 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -213,6 +213,7 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
213 struct ieee80211_rx_status *rx_status) 213 struct ieee80211_rx_status *rx_status)
214{ 214{
215 int energy_a, energy_b, max_energy; 215 int energy_a, energy_b, max_energy;
216 u32 rate_flags = le32_to_cpu(desc->rate_n_flags);
216 217
217 energy_a = desc->energy_a; 218 energy_a = desc->energy_a;
218 energy_a = energy_a ? -energy_a : S8_MIN; 219 energy_a = energy_a ? -energy_a : S8_MIN;
@@ -224,7 +225,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
224 energy_a, energy_b, max_energy); 225 energy_a, energy_b, max_energy);
225 226
226 rx_status->signal = max_energy; 227 rx_status->signal = max_energy;
227 rx_status->chains = 0; /* TODO: phy info */ 228 rx_status->chains =
229 (rate_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_POS;
228 rx_status->chain_signal[0] = energy_a; 230 rx_status->chain_signal[0] = energy_a;
229 rx_status->chain_signal[1] = energy_b; 231 rx_status->chain_signal[1] = energy_b;
230 rx_status->chain_signal[2] = S8_MIN; 232 rx_status->chain_signal[2] = S8_MIN;
@@ -232,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
232 234
233static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, 235static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
234 struct ieee80211_rx_status *stats, 236 struct ieee80211_rx_status *stats,
235 struct iwl_rx_mpdu_desc *desc, int queue, 237 struct iwl_rx_mpdu_desc *desc, u32 pkt_flags,
236 u8 *crypt_len) 238 int queue, u8 *crypt_len)
237{ 239{
238 u16 status = le16_to_cpu(desc->status); 240 u16 status = le16_to_cpu(desc->status);
239 241
@@ -253,6 +255,8 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
253 return -1; 255 return -1;
254 256
255 stats->flag |= RX_FLAG_DECRYPTED; 257 stats->flag |= RX_FLAG_DECRYPTED;
258 if (pkt_flags & FH_RSCSR_RADA_EN)
259 stats->flag |= RX_FLAG_MIC_STRIPPED;
256 *crypt_len = IEEE80211_CCMP_HDR_LEN; 260 *crypt_len = IEEE80211_CCMP_HDR_LEN;
257 return 0; 261 return 0;
258 case IWL_RX_MPDU_STATUS_SEC_TKIP: 262 case IWL_RX_MPDU_STATUS_SEC_TKIP:
@@ -270,6 +274,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
270 if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == 274 if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
271 IWL_RX_MPDU_STATUS_SEC_WEP) 275 IWL_RX_MPDU_STATUS_SEC_WEP)
272 *crypt_len = IEEE80211_WEP_IV_LEN; 276 *crypt_len = IEEE80211_WEP_IV_LEN;
277
278 if (pkt_flags & FH_RSCSR_RADA_EN)
279 stats->flag |= RX_FLAG_ICV_STRIPPED;
280
273 return 0; 281 return 0;
274 case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: 282 case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
275 if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) 283 if (!(status & IWL_RX_MPDU_STATUS_MIC_OK))
@@ -848,7 +856,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
848 856
849 rx_status = IEEE80211_SKB_RXCB(skb); 857 rx_status = IEEE80211_SKB_RXCB(skb);
850 858
851 if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, queue, &crypt_len)) { 859 if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc,
860 le32_to_cpu(pkt->len_n_flags), queue,
861 &crypt_len)) {
852 kfree_skb(skb); 862 kfree_skb(skb);
853 return; 863 return;
854 } 864 }
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index c19f98489d4e..1add5615fc3a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -1709,29 +1709,29 @@ void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta)
1709 sta->sta_id = IWL_MVM_INVALID_STA; 1709 sta->sta_id = IWL_MVM_INVALID_STA;
1710} 1710}
1711 1711
1712static void iwl_mvm_enable_aux_queue(struct iwl_mvm *mvm) 1712static void iwl_mvm_enable_aux_snif_queue(struct iwl_mvm *mvm, u16 *queue,
1713 u8 sta_id, u8 fifo)
1713{ 1714{
1714 unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ? 1715 unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ?
1715 mvm->cfg->base_params->wd_timeout : 1716 mvm->cfg->base_params->wd_timeout :
1716 IWL_WATCHDOG_DISABLED; 1717 IWL_WATCHDOG_DISABLED;
1717 1718
1718 if (iwl_mvm_has_new_tx_api(mvm)) { 1719 if (iwl_mvm_has_new_tx_api(mvm)) {
1719 int queue = iwl_mvm_tvqm_enable_txq(mvm, mvm->aux_queue, 1720 int tvqm_queue =
1720 mvm->aux_sta.sta_id, 1721 iwl_mvm_tvqm_enable_txq(mvm, *queue, sta_id,
1721 IWL_MAX_TID_COUNT, 1722 IWL_MAX_TID_COUNT,
1722 wdg_timeout); 1723 wdg_timeout);
1723 mvm->aux_queue = queue; 1724 *queue = tvqm_queue;
1724 } else { 1725 } else {
1725 struct iwl_trans_txq_scd_cfg cfg = { 1726 struct iwl_trans_txq_scd_cfg cfg = {
1726 .fifo = IWL_MVM_TX_FIFO_MCAST, 1727 .fifo = fifo,
1727 .sta_id = mvm->aux_sta.sta_id, 1728 .sta_id = sta_id,
1728 .tid = IWL_MAX_TID_COUNT, 1729 .tid = IWL_MAX_TID_COUNT,
1729 .aggregate = false, 1730 .aggregate = false,
1730 .frame_limit = IWL_FRAME_LIMIT, 1731 .frame_limit = IWL_FRAME_LIMIT,
1731 }; 1732 };
1732 1733
1733 iwl_mvm_enable_txq(mvm, mvm->aux_queue, mvm->aux_queue, 0, &cfg, 1734 iwl_mvm_enable_txq(mvm, *queue, *queue, 0, &cfg, wdg_timeout);
1734 wdg_timeout);
1735 } 1735 }
1736} 1736}
1737 1737
@@ -1750,7 +1750,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm)
1750 1750
1751 /* Map Aux queue to fifo - needs to happen before adding Aux station */ 1751 /* Map Aux queue to fifo - needs to happen before adding Aux station */
1752 if (!iwl_mvm_has_new_tx_api(mvm)) 1752 if (!iwl_mvm_has_new_tx_api(mvm))
1753 iwl_mvm_enable_aux_queue(mvm); 1753 iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue,
1754 mvm->aux_sta.sta_id,
1755 IWL_MVM_TX_FIFO_MCAST);
1754 1756
1755 ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL, 1757 ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL,
1756 MAC_INDEX_AUX, 0); 1758 MAC_INDEX_AUX, 0);
@@ -1764,7 +1766,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm)
1764 * to firmware so enable queue here - after the station was added 1766 * to firmware so enable queue here - after the station was added
1765 */ 1767 */
1766 if (iwl_mvm_has_new_tx_api(mvm)) 1768 if (iwl_mvm_has_new_tx_api(mvm))
1767 iwl_mvm_enable_aux_queue(mvm); 1769 iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue,
1770 mvm->aux_sta.sta_id,
1771 IWL_MVM_TX_FIFO_MCAST);
1768 1772
1769 return 0; 1773 return 0;
1770} 1774}
@@ -1772,10 +1776,31 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm)
1772int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) 1776int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
1773{ 1777{
1774 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 1778 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1779 int ret;
1775 1780
1776 lockdep_assert_held(&mvm->mutex); 1781 lockdep_assert_held(&mvm->mutex);
1777 return iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, 1782
1783 /* Map snif queue to fifo - must happen before adding snif station */
1784 if (!iwl_mvm_has_new_tx_api(mvm))
1785 iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue,
1786 mvm->snif_sta.sta_id,
1787 IWL_MVM_TX_FIFO_BE);
1788
1789 ret = iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr,
1778 mvmvif->id, 0); 1790 mvmvif->id, 0);
1791 if (ret)
1792 return ret;
1793
1794 /*
1795 * For 22000 firmware and on we cannot add queue to a station unknown
1796 * to firmware so enable queue here - after the station was added
1797 */
1798 if (iwl_mvm_has_new_tx_api(mvm))
1799 iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue,
1800 mvm->snif_sta.sta_id,
1801 IWL_MVM_TX_FIFO_BE);
1802
1803 return 0;
1779} 1804}
1780 1805
1781int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) 1806int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
@@ -1784,6 +1809,8 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
1784 1809
1785 lockdep_assert_held(&mvm->mutex); 1810 lockdep_assert_held(&mvm->mutex);
1786 1811
1812 iwl_mvm_disable_txq(mvm, mvm->snif_queue, mvm->snif_queue,
1813 IWL_MAX_TID_COUNT, 0);
1787 ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); 1814 ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id);
1788 if (ret) 1815 if (ret)
1789 IWL_WARN(mvm, "Failed sending remove station\n"); 1816 IWL_WARN(mvm, "Failed sending remove station\n");
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 4d0314912e94..e25cda9fbf6c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -132,6 +132,24 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
132 * executed, and a new time event means a new command. 132 * executed, and a new time event means a new command.
133 */ 133 */
134 iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC); 134 iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC);
135
136 /* Do the same for the P2P device queue (STA) */
137 if (test_and_clear_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status)) {
138 struct iwl_mvm_vif *mvmvif;
139
140 /*
141 * NB: access to this pointer would be racy, but the flush bit
142 * can only be set when we had a P2P-Device VIF, and we have a
143 * flush of this work in iwl_mvm_prepare_mac_removal() so it's
144 * not really racy.
145 */
146
147 if (!WARN_ON(!mvm->p2p_device_vif)) {
148 mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif);
149 iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true,
150 CMD_ASYNC);
151 }
152 }
135} 153}
136 154
137static void iwl_mvm_roc_finished(struct iwl_mvm *mvm) 155static void iwl_mvm_roc_finished(struct iwl_mvm *mvm)
@@ -855,10 +873,12 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm)
855 873
856 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); 874 mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
857 875
858 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) 876 if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) {
859 iwl_mvm_remove_time_event(mvm, mvmvif, te_data); 877 iwl_mvm_remove_time_event(mvm, mvmvif, te_data);
860 else 878 set_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status);
879 } else {
861 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); 880 iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data);
881 }
862 882
863 iwl_mvm_roc_finished(mvm); 883 iwl_mvm_roc_finished(mvm);
864} 884}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 593b7f97b29c..333bcb75b8af 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -657,7 +657,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
657 if (ap_sta_id != IWL_MVM_INVALID_STA) 657 if (ap_sta_id != IWL_MVM_INVALID_STA)
658 sta_id = ap_sta_id; 658 sta_id = ap_sta_id;
659 } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { 659 } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) {
660 queue = mvm->aux_queue; 660 queue = mvm->snif_queue;
661 sta_id = mvm->snif_sta.sta_id;
661 } 662 }
662 } 663 }
663 664
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index d46115e2d69e..03ffd84786ca 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -1134,9 +1134,18 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,
1134 unsigned int default_timeout = 1134 unsigned int default_timeout =
1135 cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout; 1135 cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout;
1136 1136
1137 if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) 1137 if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) {
1138 /*
1139 * We can't know when the station is asleep or awake, so we
1140 * must disable the queue hang detection.
1141 */
1142 if (fw_has_capa(&mvm->fw->ucode_capa,
1143 IWL_UCODE_TLV_CAPA_STA_PM_NOTIF) &&
1144 vif && vif->type == NL80211_IFTYPE_AP)
1145 return IWL_WATCHDOG_DISABLED;
1138 return iwlmvm_mod_params.tfd_q_hang_detect ? 1146 return iwlmvm_mod_params.tfd_q_hang_detect ?
1139 default_timeout : IWL_WATCHDOG_DISABLED; 1147 default_timeout : IWL_WATCHDOG_DISABLED;
1148 }
1140 1149
1141 trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS); 1150 trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS);
1142 txq_timer = (void *)trigger->data; 1151 txq_timer = (void *)trigger->data;
@@ -1163,6 +1172,8 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,
1163 return le32_to_cpu(txq_timer->p2p_go); 1172 return le32_to_cpu(txq_timer->p2p_go);
1164 case NL80211_IFTYPE_P2P_DEVICE: 1173 case NL80211_IFTYPE_P2P_DEVICE:
1165 return le32_to_cpu(txq_timer->p2p_device); 1174 return le32_to_cpu(txq_timer->p2p_device);
1175 case NL80211_IFTYPE_MONITOR:
1176 return default_timeout;
1166 default: 1177 default:
1167 WARN_ON(1); 1178 WARN_ON(1);
1168 return mvm->cfg->base_params->wd_timeout; 1179 return mvm->cfg->base_params->wd_timeout;
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index f21fe59faccf..ccd7c33c4c28 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -553,6 +553,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
553 {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)}, 553 {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)},
554 {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)}, 554 {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)},
555 {IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)}, 555 {IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)},
556 {IWL_PCI_DEVICE(0x271C, 0x0214, iwl9260_2ac_cfg)},
556 {IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)}, 557 {IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)},
557 {IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)}, 558 {IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)},
558 {IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)}, 559 {IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)},
@@ -664,6 +665,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
664 {IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)}, 665 {IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)},
665 {IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)}, 666 {IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)},
666 {IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)}, 667 {IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)},
668 {IWL_PCI_DEVICE(0xA0F0, 0x0000, iwla000_2ax_cfg_hr)},
667 669
668#endif /* CONFIG_IWLMVM */ 670#endif /* CONFIG_IWLMVM */
669 671
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index c59f4581e972..ac05fd1e74c4 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -49,6 +49,7 @@
49 * 49 *
50 *****************************************************************************/ 50 *****************************************************************************/
51#include "iwl-trans.h" 51#include "iwl-trans.h"
52#include "iwl-prph.h"
52#include "iwl-context-info.h" 53#include "iwl-context-info.h"
53#include "internal.h" 54#include "internal.h"
54 55
@@ -156,6 +157,11 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power)
156 157
157 trans_pcie->is_down = true; 158 trans_pcie->is_down = true;
158 159
160 /* Stop dbgc before stopping device */
161 iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
162 udelay(100);
163 iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
164
159 /* tell the device to stop sending interrupts */ 165 /* tell the device to stop sending interrupts */
160 iwl_disable_interrupts(trans); 166 iwl_disable_interrupts(trans);
161 167
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index b7a51603465b..4541c86881d6 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -166,6 +166,7 @@ static void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
166 print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 166 print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32,
167 4, buf, i, 0); 167 4, buf, i, 0);
168 } 168 }
169 goto out;
169 170
170err_read: 171err_read:
171 print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); 172 print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0);
@@ -1226,6 +1227,15 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)
1226 1227
1227 trans_pcie->is_down = true; 1228 trans_pcie->is_down = true;
1228 1229
1230 /* Stop dbgc before stopping device */
1231 if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
1232 iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
1233 } else {
1234 iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
1235 udelay(100);
1236 iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
1237 }
1238
1229 /* tell the device to stop sending interrupts */ 1239 /* tell the device to stop sending interrupts */
1230 iwl_disable_interrupts(trans); 1240 iwl_disable_interrupts(trans);
1231 1241
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index d6dff347f896..78ebe494fef0 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -186,7 +186,7 @@ static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev)
186 /* Obtain the queue to be used to transmit this packet */ 186 /* Obtain the queue to be used to transmit this packet */
187 index = skb_get_queue_mapping(skb); 187 index = skb_get_queue_mapping(skb);
188 if (index >= num_queues) { 188 if (index >= num_queues) {
189 pr_warn_ratelimited("Invalid queue %hu for packet on interface %s\n.", 189 pr_warn_ratelimited("Invalid queue %hu for packet on interface %s\n",
190 index, vif->dev->name); 190 index, vif->dev->name);
191 index %= num_queues; 191 index %= num_queues;
192 } 192 }
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index c454941b34ec..ab988d88704d 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -695,7 +695,7 @@ int __of_changeset_apply_entries(struct of_changeset *ocs, int *ret_revert)
695/* 695/*
696 * Returns 0 on success, a negative error value in case of an error. 696 * Returns 0 on success, a negative error value in case of an error.
697 * 697 *
698 * If multiple changset entry notification errors occur then only the 698 * If multiple changeset entry notification errors occur then only the
699 * final notification error is reported. 699 * final notification error is reported.
700 */ 700 */
701int __of_changeset_apply_notify(struct of_changeset *ocs) 701int __of_changeset_apply_notify(struct of_changeset *ocs)
@@ -795,7 +795,7 @@ int __of_changeset_revert_entries(struct of_changeset *ocs, int *ret_apply)
795} 795}
796 796
797/* 797/*
798 * If multiple changset entry notification errors occur then only the 798 * If multiple changeset entry notification errors occur then only the
799 * final notification error is reported. 799 * final notification error is reported.
800 */ 800 */
801int __of_changeset_revert_notify(struct of_changeset *ocs) 801int __of_changeset_revert_notify(struct of_changeset *ocs)
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index c150abb9049d..3981b7da4fa9 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -522,7 +522,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
522 struct device_node *node, *overlay_node; 522 struct device_node *node, *overlay_node;
523 struct fragment *fragment; 523 struct fragment *fragment;
524 struct fragment *fragments; 524 struct fragment *fragments;
525 int cnt, ret; 525 int cnt, id, ret;
526 526
527 /* 527 /*
528 * Warn for some issues. Can not return -EINVAL for these until 528 * Warn for some issues. Can not return -EINVAL for these until
@@ -543,9 +543,9 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
543 543
544 of_changeset_init(&ovcs->cset); 544 of_changeset_init(&ovcs->cset);
545 545
546 ovcs->id = idr_alloc(&ovcs_idr, ovcs, 1, 0, GFP_KERNEL); 546 id = idr_alloc(&ovcs_idr, ovcs, 1, 0, GFP_KERNEL);
547 if (ovcs->id <= 0) 547 if (id <= 0)
548 return ovcs->id; 548 return id;
549 549
550 cnt = 0; 550 cnt = 0;
551 551
@@ -572,18 +572,20 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
572 572
573 cnt = 0; 573 cnt = 0;
574 for_each_child_of_node(tree, node) { 574 for_each_child_of_node(tree, node) {
575 overlay_node = of_get_child_by_name(node, "__overlay__");
576 if (!overlay_node)
577 continue;
578
575 fragment = &fragments[cnt]; 579 fragment = &fragments[cnt];
576 fragment->overlay = of_get_child_by_name(node, "__overlay__"); 580 fragment->overlay = overlay_node;
577 if (fragment->overlay) { 581 fragment->target = find_target_node(node);
578 fragment->target = find_target_node(node); 582 if (!fragment->target) {
579 if (!fragment->target) { 583 of_node_put(fragment->overlay);
580 of_node_put(fragment->overlay); 584 ret = -EINVAL;
581 ret = -EINVAL; 585 goto err_free_fragments;
582 goto err_free_fragments;
583 } else {
584 cnt++;
585 }
586 } 586 }
587
588 cnt++;
587 } 589 }
588 590
589 /* 591 /*
@@ -611,6 +613,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
611 goto err_free_fragments; 613 goto err_free_fragments;
612 } 614 }
613 615
616 ovcs->id = id;
614 ovcs->count = cnt; 617 ovcs->count = cnt;
615 ovcs->fragments = fragments; 618 ovcs->fragments = fragments;
616 619
@@ -619,7 +622,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs,
619err_free_fragments: 622err_free_fragments:
620 kfree(fragments); 623 kfree(fragments);
621err_free_idr: 624err_free_idr:
622 idr_remove(&ovcs_idr, ovcs->id); 625 idr_remove(&ovcs_idr, id);
623 626
624 pr_err("%s() failed, ret = %d\n", __func__, ret); 627 pr_err("%s() failed, ret = %d\n", __func__, ret);
625 628
@@ -630,9 +633,8 @@ static void free_overlay_changeset(struct overlay_changeset *ovcs)
630{ 633{
631 int i; 634 int i;
632 635
633 if (!ovcs->cset.entries.next) 636 if (ovcs->cset.entries.next)
634 return; 637 of_changeset_destroy(&ovcs->cset);
635 of_changeset_destroy(&ovcs->cset);
636 638
637 if (ovcs->id) 639 if (ovcs->id)
638 idr_remove(&ovcs_idr, ovcs->id); 640 idr_remove(&ovcs_idr, ovcs->id);
@@ -660,14 +662,14 @@ static void free_overlay_changeset(struct overlay_changeset *ovcs)
660 * A non-zero return value will not have created the changeset if error is from: 662 * A non-zero return value will not have created the changeset if error is from:
661 * - parameter checks 663 * - parameter checks
662 * - building the changeset 664 * - building the changeset
663 * - overlay changset pre-apply notifier 665 * - overlay changeset pre-apply notifier
664 * 666 *
665 * If an error is returned by an overlay changeset pre-apply notifier 667 * If an error is returned by an overlay changeset pre-apply notifier
666 * then no further overlay changeset pre-apply notifier will be called. 668 * then no further overlay changeset pre-apply notifier will be called.
667 * 669 *
668 * A non-zero return value will have created the changeset if error is from: 670 * A non-zero return value will have created the changeset if error is from:
669 * - overlay changeset entry notifier 671 * - overlay changeset entry notifier
670 * - overlay changset post-apply notifier 672 * - overlay changeset post-apply notifier
671 * 673 *
672 * If an error is returned by an overlay changeset post-apply notifier 674 * If an error is returned by an overlay changeset post-apply notifier
673 * then no further overlay changeset post-apply notifier will be called. 675 * then no further overlay changeset post-apply notifier will be called.
@@ -706,12 +708,11 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id)
706 } 708 }
707 709
708 of_overlay_mutex_lock(); 710 of_overlay_mutex_lock();
711 mutex_lock(&of_mutex);
709 712
710 ret = of_resolve_phandles(tree); 713 ret = of_resolve_phandles(tree);
711 if (ret) 714 if (ret)
712 goto err_overlay_unlock; 715 goto err_free_overlay_changeset;
713
714 mutex_lock(&of_mutex);
715 716
716 ret = init_overlay_changeset(ovcs, tree); 717 ret = init_overlay_changeset(ovcs, tree);
717 if (ret) 718 if (ret)
@@ -736,14 +737,13 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id)
736 devicetree_state_flags |= DTSF_APPLY_FAIL; 737 devicetree_state_flags |= DTSF_APPLY_FAIL;
737 } 738 }
738 goto err_free_overlay_changeset; 739 goto err_free_overlay_changeset;
739 } else {
740 ret = __of_changeset_apply_notify(&ovcs->cset);
741 if (ret)
742 pr_err("overlay changeset entry notify error %d\n",
743 ret);
744 /* fall through */
745 } 740 }
746 741
742 ret = __of_changeset_apply_notify(&ovcs->cset);
743 if (ret)
744 pr_err("overlay changeset entry notify error %d\n", ret);
745 /* notify failure is not fatal, continue */
746
747 list_add_tail(&ovcs->ovcs_list, &ovcs_list); 747 list_add_tail(&ovcs->ovcs_list, &ovcs_list);
748 *ovcs_id = ovcs->id; 748 *ovcs_id = ovcs->id;
749 749
@@ -755,18 +755,14 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id)
755 ret = ret_tmp; 755 ret = ret_tmp;
756 } 756 }
757 757
758 mutex_unlock(&of_mutex); 758 goto out_unlock;
759 of_overlay_mutex_unlock();
760
761 goto out;
762
763err_overlay_unlock:
764 of_overlay_mutex_unlock();
765 759
766err_free_overlay_changeset: 760err_free_overlay_changeset:
767 free_overlay_changeset(ovcs); 761 free_overlay_changeset(ovcs);
768 762
763out_unlock:
769 mutex_unlock(&of_mutex); 764 mutex_unlock(&of_mutex);
765 of_overlay_mutex_unlock();
770 766
771out: 767out:
772 pr_debug("%s() err=%d\n", __func__, ret); 768 pr_debug("%s() err=%d\n", __func__, ret);
@@ -871,7 +867,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs)
871 * 867 *
872 * A non-zero return value will not revert the changeset if error is from: 868 * A non-zero return value will not revert the changeset if error is from:
873 * - parameter checks 869 * - parameter checks
874 * - overlay changset pre-remove notifier 870 * - overlay changeset pre-remove notifier
875 * - overlay changeset entry revert 871 * - overlay changeset entry revert
876 * 872 *
877 * If an error is returned by an overlay changeset pre-remove notifier 873 * If an error is returned by an overlay changeset pre-remove notifier
@@ -882,7 +878,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs)
882 * 878 *
883 * A non-zero return value will revert the changeset if error is from: 879 * A non-zero return value will revert the changeset if error is from:
884 * - overlay changeset entry notifier 880 * - overlay changeset entry notifier
885 * - overlay changset post-remove notifier 881 * - overlay changeset post-remove notifier
886 * 882 *
887 * If an error is returned by an overlay changeset post-remove notifier 883 * If an error is returned by an overlay changeset post-remove notifier
888 * then no further overlay changeset post-remove notifier will be called. 884 * then no further overlay changeset post-remove notifier will be called.
@@ -931,15 +927,13 @@ int of_overlay_remove(int *ovcs_id)
931 if (ret_apply) 927 if (ret_apply)
932 devicetree_state_flags |= DTSF_REVERT_FAIL; 928 devicetree_state_flags |= DTSF_REVERT_FAIL;
933 goto out_unlock; 929 goto out_unlock;
934 } else {
935 ret = __of_changeset_revert_notify(&ovcs->cset);
936 if (ret) {
937 pr_err("overlay changeset entry notify error %d\n",
938 ret);
939 /* fall through - changeset was reverted */
940 }
941 } 930 }
942 931
932 ret = __of_changeset_revert_notify(&ovcs->cset);
933 if (ret)
934 pr_err("overlay changeset entry notify error %d\n", ret);
935 /* notify failure is not fatal, continue */
936
943 *ovcs_id = 0; 937 *ovcs_id = 0;
944 938
945 ret_tmp = overlay_notify(ovcs, OF_OVERLAY_POST_REMOVE); 939 ret_tmp = overlay_notify(ovcs, OF_OVERLAY_POST_REMOVE);
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index e568b1e82501..0f8052f1355c 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -2165,7 +2165,6 @@ static int __init overlay_data_add(int onum)
2165 ret = of_overlay_apply(info->np_overlay, &info->overlay_id); 2165 ret = of_overlay_apply(info->np_overlay, &info->overlay_id);
2166 if (ret < 0) { 2166 if (ret < 0) {
2167 pr_err("of_overlay_apply() (ret=%d), %d\n", ret, onum); 2167 pr_err("of_overlay_apply() (ret=%d), %d\n", ret, onum);
2168 of_overlay_mutex_unlock();
2169 goto out_free_np_overlay; 2168 goto out_free_np_overlay;
2170 } 2169 }
2171 2170
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 3cf2da22acf2..9e53e51b91f3 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1014,7 +1014,7 @@ static int pci_pm_thaw_noirq(struct device *dev)
1014 * the subsequent "thaw" callbacks for the device. 1014 * the subsequent "thaw" callbacks for the device.
1015 */ 1015 */
1016 if (dev_pm_smart_suspend_and_suspended(dev)) { 1016 if (dev_pm_smart_suspend_and_suspended(dev)) {
1017 dev->power.direct_complete = true; 1017 dev_pm_skip_next_resume_phases(dev);
1018 return 0; 1018 return 0;
1019 } 1019 }
1020 1020
diff --git a/drivers/pinctrl/intel/pinctrl-denverton.c b/drivers/pinctrl/intel/pinctrl-denverton.c
index 4500880240f2..6572550cfe78 100644
--- a/drivers/pinctrl/intel/pinctrl-denverton.c
+++ b/drivers/pinctrl/intel/pinctrl-denverton.c
@@ -207,7 +207,7 @@ static const unsigned int dnv_uart0_pins[] = { 60, 61, 64, 65 };
207static const unsigned int dnv_uart0_modes[] = { 2, 3, 1, 1 }; 207static const unsigned int dnv_uart0_modes[] = { 2, 3, 1, 1 };
208static const unsigned int dnv_uart1_pins[] = { 94, 95, 96, 97 }; 208static const unsigned int dnv_uart1_pins[] = { 94, 95, 96, 97 };
209static const unsigned int dnv_uart2_pins[] = { 60, 61, 62, 63 }; 209static const unsigned int dnv_uart2_pins[] = { 60, 61, 62, 63 };
210static const unsigned int dnv_uart2_modes[] = { 1, 1, 2, 2 }; 210static const unsigned int dnv_uart2_modes[] = { 1, 2, 2, 2 };
211static const unsigned int dnv_emmc_pins[] = { 211static const unsigned int dnv_emmc_pins[] = {
212 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 212 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
213}; 213};
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index d45af31b86b4..bdb8d174efef 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -408,12 +408,21 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
408{ 408{
409 struct armada_37xx_pinctrl *info = gpiochip_get_data(chip); 409 struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
410 unsigned int reg = OUTPUT_EN; 410 unsigned int reg = OUTPUT_EN;
411 unsigned int mask; 411 unsigned int mask, val, ret;
412 412
413 armada_37xx_update_reg(&reg, offset); 413 armada_37xx_update_reg(&reg, offset);
414 mask = BIT(offset); 414 mask = BIT(offset);
415 415
416 return regmap_update_bits(info->regmap, reg, mask, mask); 416 ret = regmap_update_bits(info->regmap, reg, mask, mask);
417
418 if (ret)
419 return ret;
420
421 reg = OUTPUT_VAL;
422 val = value ? mask : 0;
423 regmap_update_bits(info->regmap, reg, mask, val);
424
425 return 0;
417} 426}
418 427
419static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset) 428static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
diff --git a/drivers/pinctrl/pinctrl-gemini.c b/drivers/pinctrl/pinctrl-gemini.c
index e9b83e291edf..c11b8f14d841 100644
--- a/drivers/pinctrl/pinctrl-gemini.c
+++ b/drivers/pinctrl/pinctrl-gemini.c
@@ -2322,7 +2322,7 @@ static const struct gemini_pin_conf *gemini_get_pin_conf(struct gemini_pmx *pmx,
2322 int i; 2322 int i;
2323 2323
2324 for (i = 0; i < pmx->nconfs; i++) { 2324 for (i = 0; i < pmx->nconfs; i++) {
2325 retconf = &gemini_confs_3516[i]; 2325 retconf = &pmx->confs[i];
2326 if (retconf->pin == pin) 2326 if (retconf->pin == pin)
2327 return retconf; 2327 return retconf;
2328 } 2328 }
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
index 4f2a726bbaeb..f5f77432ce6f 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
@@ -428,7 +428,7 @@ static const struct sunxi_desc_pin a64_pins[] = {
428 SUNXI_FUNCTION(0x0, "gpio_in"), 428 SUNXI_FUNCTION(0x0, "gpio_in"),
429 SUNXI_FUNCTION(0x1, "gpio_out"), 429 SUNXI_FUNCTION(0x1, "gpio_out"),
430 SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */ 430 SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
431 SUNXI_FUNCTION(0x4, "uart0")), /* RX */ 431 SUNXI_FUNCTION(0x3, "uart0")), /* RX */
432 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5), 432 SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
433 SUNXI_FUNCTION(0x0, "gpio_in"), 433 SUNXI_FUNCTION(0x0, "gpio_in"),
434 SUNXI_FUNCTION(0x1, "gpio_out"), 434 SUNXI_FUNCTION(0x1, "gpio_out"),
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
index 97b48336f84a..a78d7b922ef4 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
@@ -535,14 +535,16 @@ static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_data_broken = {
535 .pins = sun50i_h5_pins, 535 .pins = sun50i_h5_pins,
536 .npins = ARRAY_SIZE(sun50i_h5_pins), 536 .npins = ARRAY_SIZE(sun50i_h5_pins),
537 .irq_banks = 2, 537 .irq_banks = 2,
538 .irq_read_needs_mux = true 538 .irq_read_needs_mux = true,
539 .disable_strict_mode = true,
539}; 540};
540 541
541static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_data = { 542static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_data = {
542 .pins = sun50i_h5_pins, 543 .pins = sun50i_h5_pins,
543 .npins = ARRAY_SIZE(sun50i_h5_pins), 544 .npins = ARRAY_SIZE(sun50i_h5_pins),
544 .irq_banks = 3, 545 .irq_banks = 3,
545 .irq_read_needs_mux = true 546 .irq_read_needs_mux = true,
547 .disable_strict_mode = true,
546}; 548};
547 549
548static int sun50i_h5_pinctrl_probe(struct platform_device *pdev) 550static int sun50i_h5_pinctrl_probe(struct platform_device *pdev)
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
index 472ef0d91b99..5553c0eb0f41 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
@@ -145,19 +145,19 @@ static const struct sunxi_desc_pin sun9i_a80_pins[] = {
145 SUNXI_FUNCTION(0x0, "gpio_in"), 145 SUNXI_FUNCTION(0x0, "gpio_in"),
146 SUNXI_FUNCTION(0x1, "gpio_out"), 146 SUNXI_FUNCTION(0x1, "gpio_out"),
147 SUNXI_FUNCTION(0x3, "mcsi"), /* MCLK */ 147 SUNXI_FUNCTION(0x3, "mcsi"), /* MCLK */
148 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PB_EINT14 */ 148 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 14)), /* PB_EINT14 */
149 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15), 149 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
150 SUNXI_FUNCTION(0x0, "gpio_in"), 150 SUNXI_FUNCTION(0x0, "gpio_in"),
151 SUNXI_FUNCTION(0x1, "gpio_out"), 151 SUNXI_FUNCTION(0x1, "gpio_out"),
152 SUNXI_FUNCTION(0x3, "mcsi"), /* SCK */ 152 SUNXI_FUNCTION(0x3, "mcsi"), /* SCK */
153 SUNXI_FUNCTION(0x4, "i2c4"), /* SCK */ 153 SUNXI_FUNCTION(0x4, "i2c4"), /* SCK */
154 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PB_EINT15 */ 154 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 15)), /* PB_EINT15 */
155 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16), 155 SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
156 SUNXI_FUNCTION(0x0, "gpio_in"), 156 SUNXI_FUNCTION(0x0, "gpio_in"),
157 SUNXI_FUNCTION(0x1, "gpio_out"), 157 SUNXI_FUNCTION(0x1, "gpio_out"),
158 SUNXI_FUNCTION(0x3, "mcsi"), /* SDA */ 158 SUNXI_FUNCTION(0x3, "mcsi"), /* SDA */
159 SUNXI_FUNCTION(0x4, "i2c4"), /* SDA */ 159 SUNXI_FUNCTION(0x4, "i2c4"), /* SDA */
160 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PB_EINT16 */ 160 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 16)), /* PB_EINT16 */
161 161
162 /* Hole */ 162 /* Hole */
163 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0), 163 SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
diff --git a/drivers/s390/Makefile b/drivers/s390/Makefile
index e5225ad9c5b1..2fdab400c1fe 100644
--- a/drivers/s390/Makefile
+++ b/drivers/s390/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Makefile for the S/390 specific device drivers 3# Makefile for the S/390 specific device drivers
3# 4#
diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig
index 31f014b57bfc..bc27d716aa6b 100644
--- a/drivers/s390/block/Kconfig
+++ b/drivers/s390/block/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1comment "S/390 block device drivers" 2comment "S/390 block device drivers"
2 depends on S390 && BLOCK 3 depends on S390 && BLOCK
3 4
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 66e008f7adb6..d4e8dff673cc 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -759,7 +759,7 @@ static void dasd_profile_end_add_data(struct dasd_profile_info *data,
759 /* in case of an overflow, reset the whole profile */ 759 /* in case of an overflow, reset the whole profile */
760 if (data->dasd_io_reqs == UINT_MAX) { 760 if (data->dasd_io_reqs == UINT_MAX) {
761 memset(data, 0, sizeof(*data)); 761 memset(data, 0, sizeof(*data));
762 getnstimeofday(&data->starttod); 762 ktime_get_real_ts64(&data->starttod);
763 } 763 }
764 data->dasd_io_reqs++; 764 data->dasd_io_reqs++;
765 data->dasd_io_sects += sectors; 765 data->dasd_io_sects += sectors;
@@ -894,7 +894,7 @@ void dasd_profile_reset(struct dasd_profile *profile)
894 return; 894 return;
895 } 895 }
896 memset(data, 0, sizeof(*data)); 896 memset(data, 0, sizeof(*data));
897 getnstimeofday(&data->starttod); 897 ktime_get_real_ts64(&data->starttod);
898 spin_unlock_bh(&profile->lock); 898 spin_unlock_bh(&profile->lock);
899} 899}
900 900
@@ -911,7 +911,7 @@ int dasd_profile_on(struct dasd_profile *profile)
911 kfree(data); 911 kfree(data);
912 return 0; 912 return 0;
913 } 913 }
914 getnstimeofday(&data->starttod); 914 ktime_get_real_ts64(&data->starttod);
915 profile->data = data; 915 profile->data = data;
916 spin_unlock_bh(&profile->lock); 916 spin_unlock_bh(&profile->lock);
917 return 0; 917 return 0;
@@ -995,8 +995,8 @@ static void dasd_stats_array(struct seq_file *m, unsigned int *array)
995static void dasd_stats_seq_print(struct seq_file *m, 995static void dasd_stats_seq_print(struct seq_file *m,
996 struct dasd_profile_info *data) 996 struct dasd_profile_info *data)
997{ 997{
998 seq_printf(m, "start_time %ld.%09ld\n", 998 seq_printf(m, "start_time %lld.%09ld\n",
999 data->starttod.tv_sec, data->starttod.tv_nsec); 999 (s64)data->starttod.tv_sec, data->starttod.tv_nsec);
1000 seq_printf(m, "total_requests %u\n", data->dasd_io_reqs); 1000 seq_printf(m, "total_requests %u\n", data->dasd_io_reqs);
1001 seq_printf(m, "total_sectors %u\n", data->dasd_io_sects); 1001 seq_printf(m, "total_sectors %u\n", data->dasd_io_sects);
1002 seq_printf(m, "total_pav %u\n", data->dasd_io_alias); 1002 seq_printf(m, "total_pav %u\n", data->dasd_io_alias);
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 1a41ef496338..a2edf2a7ace9 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -531,10 +531,12 @@ static int prefix_LRE(struct ccw1 *ccw, struct PFX_eckd_data *pfxdata,
531 pfxdata->validity.define_extent = 1; 531 pfxdata->validity.define_extent = 1;
532 532
533 /* private uid is kept up to date, conf_data may be outdated */ 533 /* private uid is kept up to date, conf_data may be outdated */
534 if (startpriv->uid.type != UA_BASE_DEVICE) { 534 if (startpriv->uid.type == UA_BASE_PAV_ALIAS)
535 pfxdata->validity.verify_base = 1; 535 pfxdata->validity.verify_base = 1;
536 if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) 536
537 pfxdata->validity.hyper_pav = 1; 537 if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) {
538 pfxdata->validity.verify_base = 1;
539 pfxdata->validity.hyper_pav = 1;
538 } 540 }
539 541
540 rc = define_extent(NULL, dedata, trk, totrk, cmd, basedev, blksize); 542 rc = define_extent(NULL, dedata, trk, totrk, cmd, basedev, blksize);
@@ -3415,10 +3417,12 @@ static int prepare_itcw(struct itcw *itcw,
3415 pfxdata.validity.define_extent = 1; 3417 pfxdata.validity.define_extent = 1;
3416 3418
3417 /* private uid is kept up to date, conf_data may be outdated */ 3419 /* private uid is kept up to date, conf_data may be outdated */
3418 if (startpriv->uid.type != UA_BASE_DEVICE) { 3420 if (startpriv->uid.type == UA_BASE_PAV_ALIAS)
3421 pfxdata.validity.verify_base = 1;
3422
3423 if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) {
3419 pfxdata.validity.verify_base = 1; 3424 pfxdata.validity.verify_base = 1;
3420 if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) 3425 pfxdata.validity.hyper_pav = 1;
3421 pfxdata.validity.hyper_pav = 1;
3422 } 3426 }
3423 3427
3424 switch (cmd) { 3428 switch (cmd) {
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h
index b095a23bcc0c..96709b1a7bf8 100644
--- a/drivers/s390/block/dasd_int.h
+++ b/drivers/s390/block/dasd_int.h
@@ -441,7 +441,7 @@ struct dasd_profile_info {
441 unsigned int dasd_io_nr_req[32]; /* hist. of # of requests in chanq */ 441 unsigned int dasd_io_nr_req[32]; /* hist. of # of requests in chanq */
442 442
443 /* new data */ 443 /* new data */
444 struct timespec starttod; /* time of start or last reset */ 444 struct timespec64 starttod; /* time of start or last reset */
445 unsigned int dasd_io_alias; /* requests using an alias */ 445 unsigned int dasd_io_alias; /* requests using an alias */
446 unsigned int dasd_io_tpm; /* requests using transport mode */ 446 unsigned int dasd_io_tpm; /* requests using transport mode */
447 unsigned int dasd_read_reqs; /* total number of read requests */ 447 unsigned int dasd_read_reqs; /* total number of read requests */
diff --git a/drivers/s390/char/Kconfig b/drivers/s390/char/Kconfig
index 97c4c9fdd53d..ab0b243a947d 100644
--- a/drivers/s390/char/Kconfig
+++ b/drivers/s390/char/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1comment "S/390 character device drivers" 2comment "S/390 character device drivers"
2 depends on S390 3 depends on S390
3 4
diff --git a/drivers/s390/char/defkeymap.map b/drivers/s390/char/defkeymap.map
index 353b3f268824..f4c095612a02 100644
--- a/drivers/s390/char/defkeymap.map
+++ b/drivers/s390/char/defkeymap.map
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# Default keymap for 3270 (ebcdic codepage 037). 2# Default keymap for 3270 (ebcdic codepage 037).
2keymaps 0-1,4-5 3keymaps 0-1,4-5
3 4
diff --git a/drivers/s390/cio/blacklist.h b/drivers/s390/cio/blacklist.h
index 95e25c1df922..140e3e4ee2fd 100644
--- a/drivers/s390/cio/blacklist.h
+++ b/drivers/s390/cio/blacklist.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1#ifndef S390_BLACKLIST_H 2#ifndef S390_BLACKLIST_H
2#define S390_BLACKLIST_H 3#define S390_BLACKLIST_H
3 4
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index 59b4a3370cd5..95b0efe28afb 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -431,8 +431,8 @@ static void process_buffer_error(struct qdio_q *q, int count)
431 q->qdio_error = QDIO_ERROR_SLSB_STATE; 431 q->qdio_error = QDIO_ERROR_SLSB_STATE;
432 432
433 /* special handling for no target buffer empty */ 433 /* special handling for no target buffer empty */
434 if ((!q->is_input_q && 434 if (queue_type(q) == QDIO_IQDIO_QFMT && !q->is_input_q &&
435 (q->sbal[q->first_to_check]->element[15].sflags) == 0x10)) { 435 q->sbal[q->first_to_check]->element[15].sflags == 0x10) {
436 qperf_inc(q, target_full); 436 qperf_inc(q, target_full);
437 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "OUTFULL FTC:%02x", 437 DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "OUTFULL FTC:%02x",
438 q->first_to_check); 438 q->first_to_check);
@@ -536,7 +536,8 @@ static int get_inbound_buffer_frontier(struct qdio_q *q)
536 case SLSB_P_INPUT_ERROR: 536 case SLSB_P_INPUT_ERROR:
537 process_buffer_error(q, count); 537 process_buffer_error(q, count);
538 q->first_to_check = add_buf(q->first_to_check, count); 538 q->first_to_check = add_buf(q->first_to_check, count);
539 atomic_sub(count, &q->nr_buf_used); 539 if (atomic_sub_return(count, &q->nr_buf_used) == 0)
540 qperf_inc(q, inbound_queue_full);
540 if (q->irq_ptr->perf_stat_enabled) 541 if (q->irq_ptr->perf_stat_enabled)
541 account_sbals_error(q, count); 542 account_sbals_error(q, count);
542 break; 543 break;
diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig
index b2837b1c70b7..a782a207ad31 100644
--- a/drivers/s390/net/Kconfig
+++ b/drivers/s390/net/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1menu "S/390 network device drivers" 2menu "S/390 network device drivers"
2 depends on NETDEVICES && S390 3 depends on NETDEVICES && S390
3 4
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 9cd569ef43ec..15015a24f8ad 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -987,6 +987,9 @@ struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *,
987int qeth_set_features(struct net_device *, netdev_features_t); 987int qeth_set_features(struct net_device *, netdev_features_t);
988void qeth_recover_features(struct net_device *dev); 988void qeth_recover_features(struct net_device *dev);
989netdev_features_t qeth_fix_features(struct net_device *, netdev_features_t); 989netdev_features_t qeth_fix_features(struct net_device *, netdev_features_t);
990netdev_features_t qeth_features_check(struct sk_buff *skb,
991 struct net_device *dev,
992 netdev_features_t features);
990int qeth_vm_request_mac(struct qeth_card *card); 993int qeth_vm_request_mac(struct qeth_card *card);
991int qeth_push_hdr(struct sk_buff *skb, struct qeth_hdr **hdr, unsigned int len); 994int qeth_push_hdr(struct sk_buff *skb, struct qeth_hdr **hdr, unsigned int len);
992 995
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 98a7f84540ab..430e3214f7e2 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -20,6 +20,11 @@
20#include <linux/mii.h> 20#include <linux/mii.h>
21#include <linux/kthread.h> 21#include <linux/kthread.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/if_vlan.h>
24#include <linux/netdevice.h>
25#include <linux/netdev_features.h>
26#include <linux/skbuff.h>
27
23#include <net/iucv/af_iucv.h> 28#include <net/iucv/af_iucv.h>
24#include <net/dsfield.h> 29#include <net/dsfield.h>
25 30
@@ -6439,6 +6444,32 @@ netdev_features_t qeth_fix_features(struct net_device *dev,
6439} 6444}
6440EXPORT_SYMBOL_GPL(qeth_fix_features); 6445EXPORT_SYMBOL_GPL(qeth_fix_features);
6441 6446
6447netdev_features_t qeth_features_check(struct sk_buff *skb,
6448 struct net_device *dev,
6449 netdev_features_t features)
6450{
6451 /* GSO segmentation builds skbs with
6452 * a (small) linear part for the headers, and
6453 * page frags for the data.
6454 * Compared to a linear skb, the header-only part consumes an
6455 * additional buffer element. This reduces buffer utilization, and
6456 * hurts throughput. So compress small segments into one element.
6457 */
6458 if (netif_needs_gso(skb, features)) {
6459 /* match skb_segment(): */
6460 unsigned int doffset = skb->data - skb_mac_header(skb);
6461 unsigned int hsize = skb_shinfo(skb)->gso_size;
6462 unsigned int hroom = skb_headroom(skb);
6463
6464 /* linearize only if resulting skb allocations are order-0: */
6465 if (SKB_DATA_ALIGN(hroom + doffset + hsize) <= SKB_MAX_HEAD(0))
6466 features &= ~NETIF_F_SG;
6467 }
6468
6469 return vlan_features_check(skb, features);
6470}
6471EXPORT_SYMBOL_GPL(qeth_features_check);
6472
6442static int __init qeth_core_init(void) 6473static int __init qeth_core_init(void)
6443{ 6474{
6444 int rc; 6475 int rc;
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 93d7e345d180..5863ea170ff2 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -961,6 +961,7 @@ static const struct net_device_ops qeth_l2_netdev_ops = {
961 .ndo_stop = qeth_l2_stop, 961 .ndo_stop = qeth_l2_stop,
962 .ndo_get_stats = qeth_get_stats, 962 .ndo_get_stats = qeth_get_stats,
963 .ndo_start_xmit = qeth_l2_hard_start_xmit, 963 .ndo_start_xmit = qeth_l2_hard_start_xmit,
964 .ndo_features_check = qeth_features_check,
964 .ndo_validate_addr = eth_validate_addr, 965 .ndo_validate_addr = eth_validate_addr,
965 .ndo_set_rx_mode = qeth_l2_set_rx_mode, 966 .ndo_set_rx_mode = qeth_l2_set_rx_mode,
966 .ndo_do_ioctl = qeth_do_ioctl, 967 .ndo_do_ioctl = qeth_do_ioctl,
@@ -1011,6 +1012,7 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
1011 if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) { 1012 if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) {
1012 card->dev->hw_features = NETIF_F_SG; 1013 card->dev->hw_features = NETIF_F_SG;
1013 card->dev->vlan_features = NETIF_F_SG; 1014 card->dev->vlan_features = NETIF_F_SG;
1015 card->dev->features |= NETIF_F_SG;
1014 /* OSA 3S and earlier has no RX/TX support */ 1016 /* OSA 3S and earlier has no RX/TX support */
1015 if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) { 1017 if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) {
1016 card->dev->hw_features |= NETIF_F_IP_CSUM; 1018 card->dev->hw_features |= NETIF_F_IP_CSUM;
@@ -1029,8 +1031,6 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
1029 1031
1030 card->info.broadcast_capable = 1; 1032 card->info.broadcast_capable = 1;
1031 qeth_l2_request_initial_mac(card); 1033 qeth_l2_request_initial_mac(card);
1032 card->dev->gso_max_size = (QETH_MAX_BUFFER_ELEMENTS(card) - 1) *
1033 PAGE_SIZE;
1034 SET_NETDEV_DEV(card->dev, &card->gdev->dev); 1034 SET_NETDEV_DEV(card->dev, &card->gdev->dev);
1035 netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT); 1035 netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT);
1036 netif_carrier_off(card->dev); 1036 netif_carrier_off(card->dev);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 0f8c12738b06..6a73894b0cb5 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1377,6 +1377,7 @@ qeth_l3_add_mc_to_hash(struct qeth_card *card, struct in_device *in4_dev)
1377 1377
1378 tmp->u.a4.addr = be32_to_cpu(im4->multiaddr); 1378 tmp->u.a4.addr = be32_to_cpu(im4->multiaddr);
1379 memcpy(tmp->mac, buf, sizeof(tmp->mac)); 1379 memcpy(tmp->mac, buf, sizeof(tmp->mac));
1380 tmp->is_multicast = 1;
1380 1381
1381 ipm = qeth_l3_ip_from_hash(card, tmp); 1382 ipm = qeth_l3_ip_from_hash(card, tmp);
1382 if (ipm) { 1383 if (ipm) {
@@ -2918,6 +2919,7 @@ static const struct net_device_ops qeth_l3_osa_netdev_ops = {
2918 .ndo_stop = qeth_l3_stop, 2919 .ndo_stop = qeth_l3_stop,
2919 .ndo_get_stats = qeth_get_stats, 2920 .ndo_get_stats = qeth_get_stats,
2920 .ndo_start_xmit = qeth_l3_hard_start_xmit, 2921 .ndo_start_xmit = qeth_l3_hard_start_xmit,
2922 .ndo_features_check = qeth_features_check,
2921 .ndo_validate_addr = eth_validate_addr, 2923 .ndo_validate_addr = eth_validate_addr,
2922 .ndo_set_rx_mode = qeth_l3_set_multicast_list, 2924 .ndo_set_rx_mode = qeth_l3_set_multicast_list,
2923 .ndo_do_ioctl = qeth_do_ioctl, 2925 .ndo_do_ioctl = qeth_do_ioctl,
@@ -2958,6 +2960,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
2958 card->dev->vlan_features = NETIF_F_SG | 2960 card->dev->vlan_features = NETIF_F_SG |
2959 NETIF_F_RXCSUM | NETIF_F_IP_CSUM | 2961 NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
2960 NETIF_F_TSO; 2962 NETIF_F_TSO;
2963 card->dev->features |= NETIF_F_SG;
2961 } 2964 }
2962 } 2965 }
2963 } else if (card->info.type == QETH_CARD_TYPE_IQD) { 2966 } else if (card->info.type == QETH_CARD_TYPE_IQD) {
@@ -2985,8 +2988,8 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
2985 NETIF_F_HW_VLAN_CTAG_RX | 2988 NETIF_F_HW_VLAN_CTAG_RX |
2986 NETIF_F_HW_VLAN_CTAG_FILTER; 2989 NETIF_F_HW_VLAN_CTAG_FILTER;
2987 netif_keep_dst(card->dev); 2990 netif_keep_dst(card->dev);
2988 card->dev->gso_max_size = (QETH_MAX_BUFFER_ELEMENTS(card) - 1) * 2991 netif_set_gso_max_size(card->dev, (QETH_MAX_BUFFER_ELEMENTS(card) - 1) *
2989 PAGE_SIZE; 2992 PAGE_SIZE);
2990 2993
2991 SET_NETDEV_DEV(card->dev, &card->gdev->dev); 2994 SET_NETDEV_DEV(card->dev, &card->gdev->dev);
2992 netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT); 2995 netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT);
diff --git a/drivers/s390/scsi/Makefile b/drivers/s390/scsi/Makefile
index 9259039e886d..9dda431ec8f3 100644
--- a/drivers/s390/scsi/Makefile
+++ b/drivers/s390/scsi/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1# 2#
2# Makefile for the S/390 specific device drivers 3# Makefile for the S/390 specific device drivers
3# 4#
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 403a639574e5..6e3d81969a77 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1673,6 +1673,7 @@ struct aac_dev
1673 struct aac_hba_map_info hba_map[AAC_MAX_BUSES][AAC_MAX_TARGETS]; 1673 struct aac_hba_map_info hba_map[AAC_MAX_BUSES][AAC_MAX_TARGETS];
1674 u8 adapter_shutdown; 1674 u8 adapter_shutdown;
1675 u32 handle_pci_error; 1675 u32 handle_pci_error;
1676 bool init_reset;
1676}; 1677};
1677 1678
1678#define aac_adapter_interrupt(dev) \ 1679#define aac_adapter_interrupt(dev) \
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 525a652dab48..bec9f3193f60 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -467,35 +467,6 @@ int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw
467 return 0; 467 return 0;
468} 468}
469 469
470#ifdef CONFIG_EEH
471static inline int aac_check_eeh_failure(struct aac_dev *dev)
472{
473 /* Check for an EEH failure for the given
474 * device node. Function eeh_dev_check_failure()
475 * returns 0 if there has not been an EEH error
476 * otherwise returns a non-zero value.
477 *
478 * Need to be called before any PCI operation,
479 * i.e.,before aac_adapter_check_health()
480 */
481 struct eeh_dev *edev = pci_dev_to_eeh_dev(dev->pdev);
482
483 if (eeh_dev_check_failure(edev)) {
484 /* The EEH mechanisms will handle this
485 * error and reset the device if
486 * necessary.
487 */
488 return 1;
489 }
490 return 0;
491}
492#else
493static inline int aac_check_eeh_failure(struct aac_dev *dev)
494{
495 return 0;
496}
497#endif
498
499/* 470/*
500 * Define the highest level of host to adapter communication routines. 471 * Define the highest level of host to adapter communication routines.
501 * These routines will support host to adapter FS commuication. These 472 * These routines will support host to adapter FS commuication. These
@@ -701,7 +672,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
701 return -ETIMEDOUT; 672 return -ETIMEDOUT;
702 } 673 }
703 674
704 if (aac_check_eeh_failure(dev)) 675 if (unlikely(pci_channel_offline(dev->pdev)))
705 return -EFAULT; 676 return -EFAULT;
706 677
707 if ((blink = aac_adapter_check_health(dev)) > 0) { 678 if ((blink = aac_adapter_check_health(dev)) > 0) {
@@ -801,7 +772,7 @@ int aac_hba_send(u8 command, struct fib *fibptr, fib_callback callback,
801 772
802 spin_unlock_irqrestore(&fibptr->event_lock, flags); 773 spin_unlock_irqrestore(&fibptr->event_lock, flags);
803 774
804 if (aac_check_eeh_failure(dev)) 775 if (unlikely(pci_channel_offline(dev->pdev)))
805 return -EFAULT; 776 return -EFAULT;
806 777
807 fibptr->flags |= FIB_CONTEXT_FLAG_WAIT; 778 fibptr->flags |= FIB_CONTEXT_FLAG_WAIT;
@@ -1583,6 +1554,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
1583 * will ensure that i/o is queisced and the card is flushed in that 1554 * will ensure that i/o is queisced and the card is flushed in that
1584 * case. 1555 * case.
1585 */ 1556 */
1557 aac_free_irq(aac);
1586 aac_fib_map_free(aac); 1558 aac_fib_map_free(aac);
1587 dma_free_coherent(&aac->pdev->dev, aac->comm_size, aac->comm_addr, 1559 dma_free_coherent(&aac->pdev->dev, aac->comm_size, aac->comm_addr,
1588 aac->comm_phys); 1560 aac->comm_phys);
@@ -1590,7 +1562,6 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
1590 aac->comm_phys = 0; 1562 aac->comm_phys = 0;
1591 kfree(aac->queues); 1563 kfree(aac->queues);
1592 aac->queues = NULL; 1564 aac->queues = NULL;
1593 aac_free_irq(aac);
1594 kfree(aac->fsa_dev); 1565 kfree(aac->fsa_dev);
1595 aac->fsa_dev = NULL; 1566 aac->fsa_dev = NULL;
1596 1567
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index c9252b138c1f..bdf127aaab41 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1680,6 +1680,9 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1680 aac->cardtype = index; 1680 aac->cardtype = index;
1681 INIT_LIST_HEAD(&aac->entry); 1681 INIT_LIST_HEAD(&aac->entry);
1682 1682
1683 if (aac_reset_devices || reset_devices)
1684 aac->init_reset = true;
1685
1683 aac->fibs = kzalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL); 1686 aac->fibs = kzalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL);
1684 if (!aac->fibs) 1687 if (!aac->fibs)
1685 goto out_free_host; 1688 goto out_free_host;
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 93ef7c37e568..620166694171 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -561,11 +561,16 @@ int _aac_rx_init(struct aac_dev *dev)
561 dev->a_ops.adapter_sync_cmd = rx_sync_cmd; 561 dev->a_ops.adapter_sync_cmd = rx_sync_cmd;
562 dev->a_ops.adapter_enable_int = aac_rx_disable_interrupt; 562 dev->a_ops.adapter_enable_int = aac_rx_disable_interrupt;
563 dev->OIMR = status = rx_readb (dev, MUnit.OIMR); 563 dev->OIMR = status = rx_readb (dev, MUnit.OIMR);
564 if ((((status & 0x0c) != 0x0c) || aac_reset_devices || reset_devices) && 564
565 !aac_rx_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) 565 if (((status & 0x0c) != 0x0c) || dev->init_reset) {
566 /* Make sure the Hardware FIFO is empty */ 566 dev->init_reset = false;
567 while ((++restart < 512) && 567 if (!aac_rx_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) {
568 (rx_readl(dev, MUnit.OutboundQueue) != 0xFFFFFFFFL)); 568 /* Make sure the Hardware FIFO is empty */
569 while ((++restart < 512) &&
570 (rx_readl(dev, MUnit.OutboundQueue) != 0xFFFFFFFFL));
571 }
572 }
573
569 /* 574 /*
570 * Check to see if the board panic'd while booting. 575 * Check to see if the board panic'd while booting.
571 */ 576 */
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 0c9361c87ec8..fde6b6aa86e3 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -868,9 +868,13 @@ int aac_src_init(struct aac_dev *dev)
868 /* Failure to reset here is an option ... */ 868 /* Failure to reset here is an option ... */
869 dev->a_ops.adapter_sync_cmd = src_sync_cmd; 869 dev->a_ops.adapter_sync_cmd = src_sync_cmd;
870 dev->a_ops.adapter_enable_int = aac_src_disable_interrupt; 870 dev->a_ops.adapter_enable_int = aac_src_disable_interrupt;
871 if ((aac_reset_devices || reset_devices) && 871
872 !aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) 872 if (dev->init_reset) {
873 ++restart; 873 dev->init_reset = false;
874 if (!aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET))
875 ++restart;
876 }
877
874 /* 878 /*
875 * Check to see if the board panic'd while booting. 879 * Check to see if the board panic'd while booting.
876 */ 880 */
@@ -1014,9 +1018,13 @@ int aac_srcv_init(struct aac_dev *dev)
1014 /* Failure to reset here is an option ... */ 1018 /* Failure to reset here is an option ... */
1015 dev->a_ops.adapter_sync_cmd = src_sync_cmd; 1019 dev->a_ops.adapter_sync_cmd = src_sync_cmd;
1016 dev->a_ops.adapter_enable_int = aac_src_disable_interrupt; 1020 dev->a_ops.adapter_enable_int = aac_src_disable_interrupt;
1017 if ((aac_reset_devices || reset_devices) && 1021
1018 !aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) 1022 if (dev->init_reset) {
1019 ++restart; 1023 dev->init_reset = false;
1024 if (!aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET))
1025 ++restart;
1026 }
1027
1020 /* 1028 /*
1021 * Check to see if flash update is running. 1029 * Check to see if flash update is running.
1022 * Wait for the adapter to be up and running. Wait up to 5 minutes 1030 * Wait for the adapter to be up and running. Wait up to 5 minutes
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1cbc497e00bd..00742c50cd44 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2148,11 +2148,13 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q)
2148 q->limits.cluster = 0; 2148 q->limits.cluster = 0;
2149 2149
2150 /* 2150 /*
2151 * set a reasonable default alignment on word boundaries: the 2151 * Set a reasonable default alignment: The larger of 32-byte (dword),
2152 * host and device may alter it using 2152 * which is a common minimum for HBAs, and the minimum DMA alignment,
2153 * blk_queue_update_dma_alignment() later. 2153 * which is set by the platform.
2154 *
2155 * Devices that require a bigger alignment can increase it later.
2154 */ 2156 */
2155 blk_queue_dma_alignment(q, 0x03); 2157 blk_queue_dma_alignment(q, max(4, dma_get_cache_alignment()) - 1);
2156} 2158}
2157EXPORT_SYMBOL_GPL(__scsi_init_queue); 2159EXPORT_SYMBOL_GPL(__scsi_init_queue);
2158 2160
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 011c3369082c..a355d989b414 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6559,12 +6559,15 @@ static int ufshcd_config_vreg(struct device *dev,
6559 struct ufs_vreg *vreg, bool on) 6559 struct ufs_vreg *vreg, bool on)
6560{ 6560{
6561 int ret = 0; 6561 int ret = 0;
6562 struct regulator *reg = vreg->reg; 6562 struct regulator *reg;
6563 const char *name = vreg->name; 6563 const char *name;
6564 int min_uV, uA_load; 6564 int min_uV, uA_load;
6565 6565
6566 BUG_ON(!vreg); 6566 BUG_ON(!vreg);
6567 6567
6568 reg = vreg->reg;
6569 name = vreg->name;
6570
6568 if (regulator_count_voltages(reg) > 0) { 6571 if (regulator_count_voltages(reg) > 0) {
6569 min_uV = on ? vreg->min_uV : 0; 6572 min_uV = on ? vreg->min_uV : 0;
6570 ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); 6573 ret = regulator_set_voltage(reg, min_uV, vreg->max_uV);
diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c
index 89f4cf507be6..f2d8c3c53ea4 100644
--- a/drivers/soc/amlogic/meson-gx-socinfo.c
+++ b/drivers/soc/amlogic/meson-gx-socinfo.c
@@ -20,8 +20,8 @@
20#define AO_SEC_SOCINFO_OFFSET AO_SEC_SD_CFG8 20#define AO_SEC_SOCINFO_OFFSET AO_SEC_SD_CFG8
21 21
22#define SOCINFO_MAJOR GENMASK(31, 24) 22#define SOCINFO_MAJOR GENMASK(31, 24)
23#define SOCINFO_MINOR GENMASK(23, 16) 23#define SOCINFO_PACK GENMASK(23, 16)
24#define SOCINFO_PACK GENMASK(15, 8) 24#define SOCINFO_MINOR GENMASK(15, 8)
25#define SOCINFO_MISC GENMASK(7, 0) 25#define SOCINFO_MISC GENMASK(7, 0)
26 26
27static const struct meson_gx_soc_id { 27static const struct meson_gx_soc_id {
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index d79090ed7f9c..1799d3f26a9e 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -1778,9 +1778,12 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)
1778 } 1778 }
1779 in += sizeof(u32); 1779 in += sizeof(u32);
1780 1780
1781 rc = ssi_hash_init(state, ctx); 1781 /* call init() to allocate bufs if the user hasn't */
1782 if (rc) 1782 if (!state->digest_buff) {
1783 goto out; 1783 rc = ssi_hash_init(state, ctx);
1784 if (rc)
1785 goto out;
1786 }
1784 1787
1785 dma_sync_single_for_cpu(dev, state->digest_buff_dma_addr, 1788 dma_sync_single_for_cpu(dev, state->digest_buff_dma_addr,
1786 ctx->inter_digestsize, DMA_BIDIRECTIONAL); 1789 ctx->inter_digestsize, DMA_BIDIRECTIONAL);
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index 2d62a8c57332..ae6ed96d7874 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -361,3 +361,8 @@ static struct comedi_driver ni_atmio_driver = {
361 .detach = ni_atmio_detach, 361 .detach = ni_atmio_detach,
362}; 362};
363module_comedi_driver(ni_atmio_driver); 363module_comedi_driver(ni_atmio_driver);
364
365MODULE_AUTHOR("Comedi http://www.comedi.org");
366MODULE_DESCRIPTION("Comedi low-level driver");
367MODULE_LICENSE("GPL");
368
diff --git a/drivers/staging/lustre/lnet/lnet/lib-socket.c b/drivers/staging/lustre/lnet/lnet/lib-socket.c
index 539a26444f31..7d49d4865298 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-socket.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-socket.c
@@ -71,16 +71,12 @@ lnet_sock_ioctl(int cmd, unsigned long arg)
71 } 71 }
72 72
73 sock_filp = sock_alloc_file(sock, 0, NULL); 73 sock_filp = sock_alloc_file(sock, 0, NULL);
74 if (IS_ERR(sock_filp)) { 74 if (IS_ERR(sock_filp))
75 sock_release(sock); 75 return PTR_ERR(sock_filp);
76 rc = PTR_ERR(sock_filp);
77 goto out;
78 }
79 76
80 rc = kernel_sock_unlocked_ioctl(sock_filp, cmd, arg); 77 rc = kernel_sock_unlocked_ioctl(sock_filp, cmd, arg);
81 78
82 fput(sock_filp); 79 fput(sock_filp);
83out:
84 return rc; 80 return rc;
85} 81}
86 82
diff --git a/drivers/staging/media/atomisp/include/linux/atomisp.h b/drivers/staging/media/atomisp/include/linux/atomisp.h
index b5533197226d..15fa5679bae7 100644
--- a/drivers/staging/media/atomisp/include/linux/atomisp.h
+++ b/drivers/staging/media/atomisp/include/linux/atomisp.h
@@ -208,14 +208,14 @@ struct atomisp_dis_vector {
208}; 208};
209 209
210 210
211/** DVS 2.0 Coefficient types. This structure contains 4 pointers to 211/* DVS 2.0 Coefficient types. This structure contains 4 pointers to
212 * arrays that contain the coeffients for each type. 212 * arrays that contain the coeffients for each type.
213 */ 213 */
214struct atomisp_dvs2_coef_types { 214struct atomisp_dvs2_coef_types {
215 short __user *odd_real; /**< real part of the odd coefficients*/ 215 short __user *odd_real; /** real part of the odd coefficients*/
216 short __user *odd_imag; /**< imaginary part of the odd coefficients*/ 216 short __user *odd_imag; /** imaginary part of the odd coefficients*/
217 short __user *even_real;/**< real part of the even coefficients*/ 217 short __user *even_real;/** real part of the even coefficients*/
218 short __user *even_imag;/**< imaginary part of the even coefficients*/ 218 short __user *even_imag;/** imaginary part of the even coefficients*/
219}; 219};
220 220
221/* 221/*
@@ -223,10 +223,10 @@ struct atomisp_dvs2_coef_types {
223 * arrays that contain the statistics for each type. 223 * arrays that contain the statistics for each type.
224 */ 224 */
225struct atomisp_dvs2_stat_types { 225struct atomisp_dvs2_stat_types {
226 int __user *odd_real; /**< real part of the odd statistics*/ 226 int __user *odd_real; /** real part of the odd statistics*/
227 int __user *odd_imag; /**< imaginary part of the odd statistics*/ 227 int __user *odd_imag; /** imaginary part of the odd statistics*/
228 int __user *even_real;/**< real part of the even statistics*/ 228 int __user *even_real;/** real part of the even statistics*/
229 int __user *even_imag;/**< imaginary part of the even statistics*/ 229 int __user *even_imag;/** imaginary part of the even statistics*/
230}; 230};
231 231
232struct atomisp_dis_coefficients { 232struct atomisp_dis_coefficients {
@@ -390,16 +390,16 @@ struct atomisp_metadata_config {
390 * Generic resolution structure. 390 * Generic resolution structure.
391 */ 391 */
392struct atomisp_resolution { 392struct atomisp_resolution {
393 uint32_t width; /**< Width */ 393 uint32_t width; /** Width */
394 uint32_t height; /**< Height */ 394 uint32_t height; /** Height */
395}; 395};
396 396
397/* 397/*
398 * This specifies the coordinates (x,y) 398 * This specifies the coordinates (x,y)
399 */ 399 */
400struct atomisp_zoom_point { 400struct atomisp_zoom_point {
401 int32_t x; /**< x coordinate */ 401 int32_t x; /** x coordinate */
402 int32_t y; /**< y coordinate */ 402 int32_t y; /** y coordinate */
403}; 403};
404 404
405/* 405/*
@@ -411,9 +411,9 @@ struct atomisp_zoom_region {
411}; 411};
412 412
413struct atomisp_dz_config { 413struct atomisp_dz_config {
414 uint32_t dx; /**< Horizontal zoom factor */ 414 uint32_t dx; /** Horizontal zoom factor */
415 uint32_t dy; /**< Vertical zoom factor */ 415 uint32_t dy; /** Vertical zoom factor */
416 struct atomisp_zoom_region zoom_region; /**< region for zoom */ 416 struct atomisp_zoom_region zoom_region; /** region for zoom */
417}; 417};
418 418
419struct atomisp_parm { 419struct atomisp_parm {
@@ -758,7 +758,7 @@ enum atomisp_acc_arg_type {
758 ATOMISP_ACC_ARG_FRAME /* Frame argument */ 758 ATOMISP_ACC_ARG_FRAME /* Frame argument */
759}; 759};
760 760
761/** ISP memories, isp2400 */ 761/* ISP memories, isp2400 */
762enum atomisp_acc_memory { 762enum atomisp_acc_memory {
763 ATOMISP_ACC_MEMORY_PMEM0 = 0, 763 ATOMISP_ACC_MEMORY_PMEM0 = 0,
764 ATOMISP_ACC_MEMORY_DMEM0, 764 ATOMISP_ACC_MEMORY_DMEM0,
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
index 8a18c528cad4..debf0e3853ff 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
@@ -5187,7 +5187,7 @@ int get_frame_info_nop(struct atomisp_sub_device *asd,
5187 return 0; 5187 return 0;
5188} 5188}
5189 5189
5190/** 5190/*
5191 * Resets CSS parameters that depend on input resolution. 5191 * Resets CSS parameters that depend on input resolution.
5192 * 5192 *
5193 * Update params like CSS RAW binning, 2ppc mode and pp_input 5193 * Update params like CSS RAW binning, 2ppc mode and pp_input
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
index 6e87aa5aab4c..b7f9da014641 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
@@ -4051,7 +4051,7 @@ int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
4051int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd, 4051int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
4052 unsigned int *zoom) 4052 unsigned int *zoom)
4053{ 4053{
4054 struct ia_css_dz_config dz_config; /**< Digital Zoom */ 4054 struct ia_css_dz_config dz_config; /** Digital Zoom */
4055 struct ia_css_isp_config isp_config; 4055 struct ia_css_isp_config isp_config;
4056 struct atomisp_device *isp = asd->isp; 4056 struct atomisp_device *isp = asd->isp;
4057 4057
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h
index 685da0f48bab..95669eedaad1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h
@@ -28,17 +28,17 @@ struct atomisp_histogram32 {
28}; 28};
29 29
30struct atomisp_dvs2_stat_types32 { 30struct atomisp_dvs2_stat_types32 {
31 compat_uptr_t odd_real; /**< real part of the odd statistics*/ 31 compat_uptr_t odd_real; /** real part of the odd statistics*/
32 compat_uptr_t odd_imag; /**< imaginary part of the odd statistics*/ 32 compat_uptr_t odd_imag; /** imaginary part of the odd statistics*/
33 compat_uptr_t even_real;/**< real part of the even statistics*/ 33 compat_uptr_t even_real;/** real part of the even statistics*/
34 compat_uptr_t even_imag;/**< imaginary part of the even statistics*/ 34 compat_uptr_t even_imag;/** imaginary part of the even statistics*/
35}; 35};
36 36
37struct atomisp_dvs2_coef_types32 { 37struct atomisp_dvs2_coef_types32 {
38 compat_uptr_t odd_real; /**< real part of the odd coefficients*/ 38 compat_uptr_t odd_real; /** real part of the odd coefficients*/
39 compat_uptr_t odd_imag; /**< imaginary part of the odd coefficients*/ 39 compat_uptr_t odd_imag; /** imaginary part of the odd coefficients*/
40 compat_uptr_t even_real;/**< real part of the even coefficients*/ 40 compat_uptr_t even_real;/** real part of the even coefficients*/
41 compat_uptr_t even_imag;/**< imaginary part of the even coefficients*/ 41 compat_uptr_t even_imag;/** imaginary part of the even coefficients*/
42}; 42};
43 43
44struct atomisp_dvs2_statistics32 { 44struct atomisp_dvs2_statistics32 {
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h
index f3d61827ae8c..c3eba675da06 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h
@@ -223,7 +223,7 @@ struct atomisp_subdev_params {
223 223
224 bool dis_proj_data_valid; 224 bool dis_proj_data_valid;
225 225
226 struct ia_css_dz_config dz_config; /**< Digital Zoom */ 226 struct ia_css_dz_config dz_config; /** Digital Zoom */
227 struct ia_css_capture_config capture_config; 227 struct ia_css_capture_config capture_config;
228 228
229 struct atomisp_css_isp_config config; 229 struct atomisp_css_isp_config config;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c
index 19bae1610fb6..050d60f0894f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c
@@ -21,7 +21,7 @@
21 * Forward declarations. 21 * Forward declarations.
22 * 22 *
23 **********************************************************************/ 23 **********************************************************************/
24/** 24/*
25 * @brief Read the oldest element from the circular buffer. 25 * @brief Read the oldest element from the circular buffer.
26 * Read the oldest element WITHOUT checking whehter the 26 * Read the oldest element WITHOUT checking whehter the
27 * circular buffer is empty or not. The oldest element is 27 * circular buffer is empty or not. The oldest element is
@@ -34,7 +34,7 @@
34static inline ia_css_circbuf_elem_t 34static inline ia_css_circbuf_elem_t
35ia_css_circbuf_read(ia_css_circbuf_t *cb); 35ia_css_circbuf_read(ia_css_circbuf_t *cb);
36 36
37/** 37/*
38 * @brief Shift a chunk of elements in the circular buffer. 38 * @brief Shift a chunk of elements in the circular buffer.
39 * A chunk of elements (i.e. the ones from the "start" position 39 * A chunk of elements (i.e. the ones from the "start" position
40 * to the "chunk_src" position) are shifted in the circular buffer, 40 * to the "chunk_src" position) are shifted in the circular buffer,
@@ -48,7 +48,7 @@ static inline void ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
48 uint32_t chunk_src, 48 uint32_t chunk_src,
49 uint32_t chunk_dest); 49 uint32_t chunk_dest);
50 50
51/** 51/*
52 * @brief Get the "val" field in the element. 52 * @brief Get the "val" field in the element.
53 * 53 *
54 * @param elem The pointer to the element. 54 * @param elem The pointer to the element.
@@ -63,7 +63,7 @@ ia_css_circbuf_elem_get_val(ia_css_circbuf_elem_t *elem);
63 * Non-inline functions. 63 * Non-inline functions.
64 * 64 *
65 **********************************************************************/ 65 **********************************************************************/
66/** 66/*
67 * @brief Create the circular buffer. 67 * @brief Create the circular buffer.
68 * Refer to "ia_css_circbuf.h" for details. 68 * Refer to "ia_css_circbuf.h" for details.
69 */ 69 */
@@ -88,7 +88,7 @@ ia_css_circbuf_create(ia_css_circbuf_t *cb,
88 cb->elems = elems; 88 cb->elems = elems;
89} 89}
90 90
91/** 91/*
92 * @brief Destroy the circular buffer. 92 * @brief Destroy the circular buffer.
93 * Refer to "ia_css_circbuf.h" for details. 93 * Refer to "ia_css_circbuf.h" for details.
94 */ 94 */
@@ -99,7 +99,7 @@ void ia_css_circbuf_destroy(ia_css_circbuf_t *cb)
99 cb->elems = NULL; 99 cb->elems = NULL;
100} 100}
101 101
102/** 102/*
103 * @brief Pop a value out of the circular buffer. 103 * @brief Pop a value out of the circular buffer.
104 * Refer to "ia_css_circbuf.h" for details. 104 * Refer to "ia_css_circbuf.h" for details.
105 */ 105 */
@@ -116,7 +116,7 @@ uint32_t ia_css_circbuf_pop(ia_css_circbuf_t *cb)
116 return ret; 116 return ret;
117} 117}
118 118
119/** 119/*
120 * @brief Extract a value out of the circular buffer. 120 * @brief Extract a value out of the circular buffer.
121 * Refer to "ia_css_circbuf.h" for details. 121 * Refer to "ia_css_circbuf.h" for details.
122 */ 122 */
@@ -166,7 +166,7 @@ uint32_t ia_css_circbuf_extract(ia_css_circbuf_t *cb, int offset)
166 return val; 166 return val;
167} 167}
168 168
169/** 169/*
170 * @brief Peek an element from the circular buffer. 170 * @brief Peek an element from the circular buffer.
171 * Refer to "ia_css_circbuf.h" for details. 171 * Refer to "ia_css_circbuf.h" for details.
172 */ 172 */
@@ -180,7 +180,7 @@ uint32_t ia_css_circbuf_peek(ia_css_circbuf_t *cb, int offset)
180 return cb->elems[pos].val; 180 return cb->elems[pos].val;
181} 181}
182 182
183/** 183/*
184 * @brief Get the value of an element from the circular buffer. 184 * @brief Get the value of an element from the circular buffer.
185 * Refer to "ia_css_circbuf.h" for details. 185 * Refer to "ia_css_circbuf.h" for details.
186 */ 186 */
@@ -194,7 +194,7 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset)
194 return cb->elems[pos].val; 194 return cb->elems[pos].val;
195} 195}
196 196
197/** @brief increase size of a circular buffer. 197/* @brief increase size of a circular buffer.
198 * Use 'CAUTION' before using this function. This was added to 198 * Use 'CAUTION' before using this function. This was added to
199 * support / fix issue with increasing size for tagger only 199 * support / fix issue with increasing size for tagger only
200 * Please refer to "ia_css_circbuf.h" for details. 200 * Please refer to "ia_css_circbuf.h" for details.
@@ -252,7 +252,7 @@ bool ia_css_circbuf_increase_size(
252 * Inline functions. 252 * Inline functions.
253 * 253 *
254 ****************************************************************/ 254 ****************************************************************/
255/** 255/*
256 * @brief Get the "val" field in the element. 256 * @brief Get the "val" field in the element.
257 * Refer to "Forward declarations" for details. 257 * Refer to "Forward declarations" for details.
258 */ 258 */
@@ -262,7 +262,7 @@ ia_css_circbuf_elem_get_val(ia_css_circbuf_elem_t *elem)
262 return elem->val; 262 return elem->val;
263} 263}
264 264
265/** 265/*
266 * @brief Read the oldest element from the circular buffer. 266 * @brief Read the oldest element from the circular buffer.
267 * Refer to "Forward declarations" for details. 267 * Refer to "Forward declarations" for details.
268 */ 268 */
@@ -282,7 +282,7 @@ ia_css_circbuf_read(ia_css_circbuf_t *cb)
282 return elem; 282 return elem;
283} 283}
284 284
285/** 285/*
286 * @brief Shift a chunk of elements in the circular buffer. 286 * @brief Shift a chunk of elements in the circular buffer.
287 * Refer to "Forward declarations" for details. 287 * Refer to "Forward declarations" for details.
288 */ 288 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h
index 616789d9b3f6..a6d650a9a1f4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h
@@ -19,7 +19,7 @@
19#include <ia_css_frame_public.h> /* ia_css_frame_info */ 19#include <ia_css_frame_public.h> /* ia_css_frame_info */
20#include <ia_css_binary.h> /* ia_css_binary_descr */ 20#include <ia_css_binary.h> /* ia_css_binary_descr */
21 21
22/** @brief Get a binary descriptor for copy. 22/* @brief Get a binary descriptor for copy.
23 * 23 *
24 * @param[in] pipe 24 * @param[in] pipe
25 * @param[out] copy_desc 25 * @param[out] copy_desc
@@ -36,7 +36,7 @@ extern void ia_css_pipe_get_copy_binarydesc(
36 struct ia_css_frame_info *out_info, 36 struct ia_css_frame_info *out_info,
37 struct ia_css_frame_info *vf_info); 37 struct ia_css_frame_info *vf_info);
38 38
39/** @brief Get a binary descriptor for vfpp. 39/* @brief Get a binary descriptor for vfpp.
40 * 40 *
41 * @param[in] pipe 41 * @param[in] pipe
42 * @param[out] vfpp_descr 42 * @param[out] vfpp_descr
@@ -51,7 +51,7 @@ extern void ia_css_pipe_get_vfpp_binarydesc(
51 struct ia_css_frame_info *in_info, 51 struct ia_css_frame_info *in_info,
52 struct ia_css_frame_info *out_info); 52 struct ia_css_frame_info *out_info);
53 53
54/** @brief Get numerator and denominator of bayer downscaling factor. 54/* @brief Get numerator and denominator of bayer downscaling factor.
55 * 55 *
56 * @param[in] bds_factor: The bayer downscaling factor. 56 * @param[in] bds_factor: The bayer downscaling factor.
57 * (= The bds_factor member in the sh_css_bds_factor structure.) 57 * (= The bds_factor member in the sh_css_bds_factor structure.)
@@ -67,7 +67,7 @@ extern enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
67 unsigned int *bds_factor_numerator, 67 unsigned int *bds_factor_numerator,
68 unsigned int *bds_factor_denominator); 68 unsigned int *bds_factor_denominator);
69 69
70/** @brief Get a binary descriptor for preview stage. 70/* @brief Get a binary descriptor for preview stage.
71 * 71 *
72 * @param[in] pipe 72 * @param[in] pipe
73 * @param[out] preview_descr 73 * @param[out] preview_descr
@@ -86,7 +86,7 @@ extern enum ia_css_err ia_css_pipe_get_preview_binarydesc(
86 struct ia_css_frame_info *out_info, 86 struct ia_css_frame_info *out_info,
87 struct ia_css_frame_info *vf_info); 87 struct ia_css_frame_info *vf_info);
88 88
89/** @brief Get a binary descriptor for video stage. 89/* @brief Get a binary descriptor for video stage.
90 * 90 *
91 * @param[in/out] pipe 91 * @param[in/out] pipe
92 * @param[out] video_descr 92 * @param[out] video_descr
@@ -105,7 +105,7 @@ extern enum ia_css_err ia_css_pipe_get_video_binarydesc(
105 struct ia_css_frame_info *vf_info, 105 struct ia_css_frame_info *vf_info,
106 int stream_config_left_padding); 106 int stream_config_left_padding);
107 107
108/** @brief Get a binary descriptor for yuv scaler stage. 108/* @brief Get a binary descriptor for yuv scaler stage.
109 * 109 *
110 * @param[in/out] pipe 110 * @param[in/out] pipe
111 * @param[out] yuv_scaler_descr 111 * @param[out] yuv_scaler_descr
@@ -124,7 +124,7 @@ void ia_css_pipe_get_yuvscaler_binarydesc(
124 struct ia_css_frame_info *internal_out_info, 124 struct ia_css_frame_info *internal_out_info,
125 struct ia_css_frame_info *vf_info); 125 struct ia_css_frame_info *vf_info);
126 126
127/** @brief Get a binary descriptor for capture pp stage. 127/* @brief Get a binary descriptor for capture pp stage.
128 * 128 *
129 * @param[in/out] pipe 129 * @param[in/out] pipe
130 * @param[out] capture_pp_descr 130 * @param[out] capture_pp_descr
@@ -140,7 +140,7 @@ extern void ia_css_pipe_get_capturepp_binarydesc(
140 struct ia_css_frame_info *out_info, 140 struct ia_css_frame_info *out_info,
141 struct ia_css_frame_info *vf_info); 141 struct ia_css_frame_info *vf_info);
142 142
143/** @brief Get a binary descriptor for primary capture. 143/* @brief Get a binary descriptor for primary capture.
144 * 144 *
145 * @param[in] pipe 145 * @param[in] pipe
146 * @param[out] prim_descr 146 * @param[out] prim_descr
@@ -158,7 +158,7 @@ extern void ia_css_pipe_get_primary_binarydesc(
158 struct ia_css_frame_info *vf_info, 158 struct ia_css_frame_info *vf_info,
159 unsigned int stage_idx); 159 unsigned int stage_idx);
160 160
161/** @brief Get a binary descriptor for pre gdc stage. 161/* @brief Get a binary descriptor for pre gdc stage.
162 * 162 *
163 * @param[in] pipe 163 * @param[in] pipe
164 * @param[out] pre_gdc_descr 164 * @param[out] pre_gdc_descr
@@ -173,7 +173,7 @@ extern void ia_css_pipe_get_pre_gdc_binarydesc(
173 struct ia_css_frame_info *in_info, 173 struct ia_css_frame_info *in_info,
174 struct ia_css_frame_info *out_info); 174 struct ia_css_frame_info *out_info);
175 175
176/** @brief Get a binary descriptor for gdc stage. 176/* @brief Get a binary descriptor for gdc stage.
177 * 177 *
178 * @param[in] pipe 178 * @param[in] pipe
179 * @param[out] gdc_descr 179 * @param[out] gdc_descr
@@ -188,7 +188,7 @@ extern void ia_css_pipe_get_gdc_binarydesc(
188 struct ia_css_frame_info *in_info, 188 struct ia_css_frame_info *in_info,
189 struct ia_css_frame_info *out_info); 189 struct ia_css_frame_info *out_info);
190 190
191/** @brief Get a binary descriptor for post gdc. 191/* @brief Get a binary descriptor for post gdc.
192 * 192 *
193 * @param[in] pipe 193 * @param[in] pipe
194 * @param[out] post_gdc_descr 194 * @param[out] post_gdc_descr
@@ -205,7 +205,7 @@ extern void ia_css_pipe_get_post_gdc_binarydesc(
205 struct ia_css_frame_info *out_info, 205 struct ia_css_frame_info *out_info,
206 struct ia_css_frame_info *vf_info); 206 struct ia_css_frame_info *vf_info);
207 207
208/** @brief Get a binary descriptor for de. 208/* @brief Get a binary descriptor for de.
209 * 209 *
210 * @param[in] pipe 210 * @param[in] pipe
211 * @param[out] pre_de_descr 211 * @param[out] pre_de_descr
@@ -220,7 +220,7 @@ extern void ia_css_pipe_get_pre_de_binarydesc(
220 struct ia_css_frame_info *in_info, 220 struct ia_css_frame_info *in_info,
221 struct ia_css_frame_info *out_info); 221 struct ia_css_frame_info *out_info);
222 222
223/** @brief Get a binary descriptor for pre anr stage. 223/* @brief Get a binary descriptor for pre anr stage.
224 * 224 *
225 * @param[in] pipe 225 * @param[in] pipe
226 * @param[out] pre_anr_descr 226 * @param[out] pre_anr_descr
@@ -235,7 +235,7 @@ extern void ia_css_pipe_get_pre_anr_binarydesc(
235 struct ia_css_frame_info *in_info, 235 struct ia_css_frame_info *in_info,
236 struct ia_css_frame_info *out_info); 236 struct ia_css_frame_info *out_info);
237 237
238/** @brief Get a binary descriptor for ANR stage. 238/* @brief Get a binary descriptor for ANR stage.
239 * 239 *
240 * @param[in] pipe 240 * @param[in] pipe
241 * @param[out] anr_descr 241 * @param[out] anr_descr
@@ -250,7 +250,7 @@ extern void ia_css_pipe_get_anr_binarydesc(
250 struct ia_css_frame_info *in_info, 250 struct ia_css_frame_info *in_info,
251 struct ia_css_frame_info *out_info); 251 struct ia_css_frame_info *out_info);
252 252
253/** @brief Get a binary descriptor for post anr stage. 253/* @brief Get a binary descriptor for post anr stage.
254 * 254 *
255 * @param[in] pipe 255 * @param[in] pipe
256 * @param[out] post_anr_descr 256 * @param[out] post_anr_descr
@@ -267,7 +267,7 @@ extern void ia_css_pipe_get_post_anr_binarydesc(
267 struct ia_css_frame_info *out_info, 267 struct ia_css_frame_info *out_info,
268 struct ia_css_frame_info *vf_info); 268 struct ia_css_frame_info *vf_info);
269 269
270/** @brief Get a binary descriptor for ldc stage. 270/* @brief Get a binary descriptor for ldc stage.
271 * 271 *
272 * @param[in/out] pipe 272 * @param[in/out] pipe
273 * @param[out] capture_pp_descr 273 * @param[out] capture_pp_descr
@@ -282,7 +282,7 @@ extern void ia_css_pipe_get_ldc_binarydesc(
282 struct ia_css_frame_info *in_info, 282 struct ia_css_frame_info *in_info,
283 struct ia_css_frame_info *out_info); 283 struct ia_css_frame_info *out_info);
284 284
285/** @brief Calculates the required BDS factor 285/* @brief Calculates the required BDS factor
286 * 286 *
287 * @param[in] input_res 287 * @param[in] input_res
288 * @param[in] output_res 288 * @param[in] output_res
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h
index ba8858759b30..155b6fb4722b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h
@@ -18,7 +18,7 @@
18#include <ia_css_types.h> 18#include <ia_css_types.h>
19#include <ia_css_frame_public.h> 19#include <ia_css_frame_public.h>
20 20
21/** @brief Get Input format bits per pixel based on stream configuration of this 21/* @brief Get Input format bits per pixel based on stream configuration of this
22 * pipe. 22 * pipe.
23 * 23 *
24 * @param[in] pipe 24 * @param[in] pipe
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h
index f8b2e458f876..a8c27676a38b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h
@@ -22,7 +22,7 @@
22#include <ia_css_stream_public.h> 22#include <ia_css_stream_public.h>
23#include <ia_css_stream_format.h> 23#include <ia_css_stream_format.h>
24 24
25/** @brief convert "errno" error code to "ia_css_err" error code 25/* @brief convert "errno" error code to "ia_css_err" error code
26 * 26 *
27 * @param[in] "errno" error code 27 * @param[in] "errno" error code
28 * @return "ia_css_err" error code 28 * @return "ia_css_err" error code
@@ -31,7 +31,7 @@
31enum ia_css_err ia_css_convert_errno( 31enum ia_css_err ia_css_convert_errno(
32 int in_err); 32 int in_err);
33 33
34/** @brief check vf frame info. 34/* @brief check vf frame info.
35 * 35 *
36 * @param[in] info 36 * @param[in] info
37 * @return IA_CSS_SUCCESS or error code upon error. 37 * @return IA_CSS_SUCCESS or error code upon error.
@@ -40,7 +40,7 @@ enum ia_css_err ia_css_convert_errno(
40extern enum ia_css_err ia_css_util_check_vf_info( 40extern enum ia_css_err ia_css_util_check_vf_info(
41 const struct ia_css_frame_info * const info); 41 const struct ia_css_frame_info * const info);
42 42
43/** @brief check input configuration. 43/* @brief check input configuration.
44 * 44 *
45 * @param[in] stream_config 45 * @param[in] stream_config
46 * @param[in] must_be_raw 46 * @param[in] must_be_raw
@@ -52,7 +52,7 @@ extern enum ia_css_err ia_css_util_check_input(
52 bool must_be_raw, 52 bool must_be_raw,
53 bool must_be_yuv); 53 bool must_be_yuv);
54 54
55/** @brief check vf and out frame info. 55/* @brief check vf and out frame info.
56 * 56 *
57 * @param[in] out_info 57 * @param[in] out_info
58 * @param[in] vf_info 58 * @param[in] vf_info
@@ -63,7 +63,7 @@ extern enum ia_css_err ia_css_util_check_vf_out_info(
63 const struct ia_css_frame_info * const out_info, 63 const struct ia_css_frame_info * const out_info,
64 const struct ia_css_frame_info * const vf_info); 64 const struct ia_css_frame_info * const vf_info);
65 65
66/** @brief check width and height 66/* @brief check width and height
67 * 67 *
68 * @param[in] width 68 * @param[in] width
69 * @param[in] height 69 * @param[in] height
@@ -75,7 +75,7 @@ extern enum ia_css_err ia_css_util_check_res(
75 unsigned int height); 75 unsigned int height);
76 76
77#ifdef ISP2401 77#ifdef ISP2401
78/** @brief compare resolutions (less or equal) 78/* @brief compare resolutions (less or equal)
79 * 79 *
80 * @param[in] a resolution 80 * @param[in] a resolution
81 * @param[in] b resolution 81 * @param[in] b resolution
@@ -108,7 +108,7 @@ extern bool ia_css_util_resolution_is_even(
108 const struct ia_css_resolution resolution); 108 const struct ia_css_resolution resolution);
109 109
110#endif 110#endif
111/** @brief check width and height 111/* @brief check width and height
112 * 112 *
113 * @param[in] stream_format 113 * @param[in] stream_format
114 * @param[in] two_ppc 114 * @param[in] two_ppc
@@ -119,7 +119,7 @@ extern unsigned int ia_css_util_input_format_bpp(
119 enum ia_css_stream_format stream_format, 119 enum ia_css_stream_format stream_format,
120 bool two_ppc); 120 bool two_ppc);
121 121
122/** @brief check if input format it raw 122/* @brief check if input format it raw
123 * 123 *
124 * @param[in] stream_format 124 * @param[in] stream_format
125 * @return true if the input format is raw or false otherwise 125 * @return true if the input format is raw or false otherwise
@@ -128,7 +128,7 @@ extern unsigned int ia_css_util_input_format_bpp(
128extern bool ia_css_util_is_input_format_raw( 128extern bool ia_css_util_is_input_format_raw(
129 enum ia_css_stream_format stream_format); 129 enum ia_css_stream_format stream_format);
130 130
131/** @brief check if input format it yuv 131/* @brief check if input format it yuv
132 * 132 *
133 * @param[in] stream_format 133 * @param[in] stream_format
134 * @return true if the input format is yuv or false otherwise 134 * @return true if the input format is yuv or false otherwise
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h
index 6720ab55d6f5..9c0cb4a63862 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h
@@ -277,6 +277,6 @@ static inline void csi_rx_be_ctrl_reg_store(
277 277
278 ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg*sizeof(hrt_data), value); 278 ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
279} 279}
280/** end of DLI */ 280/* end of DLI */
281 281
282#endif /* __CSI_RX_PRIVATE_H_INCLUDED__ */ 282#endif /* __CSI_RX_PRIVATE_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h
index 470c92d287fe..4d07c2fe1469 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h
@@ -192,7 +192,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state(
192 ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i, state->proc_state[i].isp_sync_state); 192 ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i, state->proc_state[i].isp_sync_state);
193 } 193 }
194} 194}
195/** end of NCI */ 195/* end of NCI */
196 196
197/***************************************************** 197/*****************************************************
198 * 198 *
@@ -227,7 +227,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_reg_store(
227 227
228 ia_css_device_store_uint32(IBUF_CTRL_BASE[ID] + reg*sizeof(hrt_data), value); 228 ia_css_device_store_uint32(IBUF_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
229} 229}
230/** end of DLI */ 230/* end of DLI */
231 231
232 232
233#endif /* __IBUF_CTRL_PRIVATE_H_INCLUDED__ */ 233#endif /* __IBUF_CTRL_PRIVATE_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c
index 14d1d3b627a9..842ae340ae13 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c
@@ -26,7 +26,7 @@
26#include "isys_irq_private.h" 26#include "isys_irq_private.h"
27#endif 27#endif
28 28
29/** Public interface */ 29/* Public interface */
30STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_status_enable( 30STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_status_enable(
31 const isys_irq_ID_t isys_irqc_id) 31 const isys_irq_ID_t isys_irqc_id)
32{ 32{
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h
index c17ce131c9e1..e69f39893bd2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h
@@ -59,7 +59,7 @@ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_dump(
59 state->status, state->edge, state->mask, state->enable, state->level_no); 59 state->status, state->edge, state->mask, state->enable, state->level_no);
60} 60}
61 61
62/** end of NCI */ 62/* end of NCI */
63 63
64/* -------------------------------------------------------+ 64/* -------------------------------------------------------+
65 | Device level interface (DLI) | 65 | Device level interface (DLI) |
@@ -101,7 +101,7 @@ STORAGE_CLASS_ISYS2401_IRQ_C hrt_data isys_irqc_reg_load(
101 return value; 101 return value;
102} 102}
103 103
104/** end of DLI */ 104/* end of DLI */
105 105
106#endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */ 106#endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */
107 107
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h
index 1603a09b621a..f946105ddf43 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h
@@ -122,7 +122,7 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_dump_state(
122 stream2mmio_print_sid_state(&(state->sid_state[i])); 122 stream2mmio_print_sid_state(&(state->sid_state[i]));
123 } 123 }
124} 124}
125/** end of NCI */ 125/* end of NCI */
126 126
127/***************************************************** 127/*****************************************************
128 * 128 *
@@ -163,6 +163,6 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_reg_store(
163 ia_css_device_store_uint32(STREAM2MMIO_CTRL_BASE[ID] + 163 ia_css_device_store_uint32(STREAM2MMIO_CTRL_BASE[ID] +
164 reg * sizeof(hrt_data), value); 164 reg * sizeof(hrt_data), value);
165} 165}
166/** end of DLI */ 166/* end of DLI */
167 167
168#endif /* __ISYS_STREAM2MMIO_PRIVATE_H_INCLUDED__ */ 168#endif /* __ISYS_STREAM2MMIO_PRIVATE_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h
index 3f34b508f0bf..c5bf540eadf1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h
@@ -160,5 +160,5 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_reg_store(
160 160
161 ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg*sizeof(hrt_data), value); 161 ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
162} 162}
163/** end of DLI */ 163/* end of DLI */
164#endif /* __PIXELGEN_PRIVATE_H_INCLUDED__ */ 164#endif /* __PIXELGEN_PRIVATE_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h
index e7a734a9fc43..1be5c6956d65 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h
@@ -46,7 +46,7 @@ struct isys2401_dma_port_cfg_s {
46 uint32_t cropping; 46 uint32_t cropping;
47 uint32_t width; 47 uint32_t width;
48 }; 48 };
49/** end of DMA Port */ 49/* end of DMA Port */
50 50
51/************************************************ 51/************************************************
52 * 52 *
@@ -79,7 +79,7 @@ struct isys2401_dma_cfg_s {
79 isys2401_dma_extension extension; 79 isys2401_dma_extension extension;
80 uint32_t height; 80 uint32_t height;
81}; 81};
82/** end of DMA Device */ 82/* end of DMA Device */
83 83
84/* isys2401_dma_channel limits per DMA ID */ 84/* isys2401_dma_channel limits per DMA ID */
85extern const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID]; 85extern const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID];
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h
index 216813e42a0a..0bf2feb8bbfb 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h
@@ -86,6 +86,6 @@ struct pixelgen_prbs_cfg_s {
86 sync_generator_cfg_t sync_gen_cfg; 86 sync_generator_cfg_t sync_gen_cfg;
87}; 87};
88 88
89/** end of Pixel-generator: TPG. ("pixelgen_global.h") */ 89/* end of Pixel-generator: TPG. ("pixelgen_global.h") */
90#endif /* __PIXELGEN_GLOBAL_H_INCLUDED__ */ 90#endif /* __PIXELGEN_GLOBAL_H_INCLUDED__ */
91 91
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h
index 9f7ecac46273..d2e3a2deea2e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h
@@ -331,7 +331,7 @@ typedef enum {
331 IBUF_CTRL2_ID, /* map ISYS2401_IBUF_CNTRL_C */ 331 IBUF_CTRL2_ID, /* map ISYS2401_IBUF_CNTRL_C */
332 N_IBUF_CTRL_ID 332 N_IBUF_CTRL_ID
333} ibuf_ctrl_ID_t; 333} ibuf_ctrl_ID_t;
334/** end of Input-buffer Controller */ 334/* end of Input-buffer Controller */
335 335
336/* 336/*
337 * Stream2MMIO. 337 * Stream2MMIO.
@@ -364,7 +364,7 @@ typedef enum {
364 STREAM2MMIO_SID7_ID, 364 STREAM2MMIO_SID7_ID,
365 N_STREAM2MMIO_SID_ID 365 N_STREAM2MMIO_SID_ID
366} stream2mmio_sid_ID_t; 366} stream2mmio_sid_ID_t;
367/** end of Stream2MMIO */ 367/* end of Stream2MMIO */
368 368
369/** 369/**
370 * Input System 2401: CSI-MIPI recevier. 370 * Input System 2401: CSI-MIPI recevier.
@@ -390,7 +390,7 @@ typedef enum {
390 CSI_RX_DLANE3_ID, /* map to DLANE3 in CSI RX */ 390 CSI_RX_DLANE3_ID, /* map to DLANE3 in CSI RX */
391 N_CSI_RX_DLANE_ID 391 N_CSI_RX_DLANE_ID
392} csi_rx_fe_dlane_ID_t; 392} csi_rx_fe_dlane_ID_t;
393/** end of CSI-MIPI receiver */ 393/* end of CSI-MIPI receiver */
394 394
395typedef enum { 395typedef enum {
396 ISYS2401_DMA0_ID = 0, 396 ISYS2401_DMA0_ID = 0,
@@ -406,7 +406,7 @@ typedef enum {
406 PIXELGEN2_ID, 406 PIXELGEN2_ID,
407 N_PIXELGEN_ID 407 N_PIXELGEN_ID
408} pixelgen_ID_t; 408} pixelgen_ID_t;
409/** end of pixel-generator. ("system_global.h") */ 409/* end of pixel-generator. ("system_global.h") */
410 410
411typedef enum { 411typedef enum {
412 INPUT_SYSTEM_CSI_PORT0_ID = 0, 412 INPUT_SYSTEM_CSI_PORT0_ID = 0,
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h
index 1f6a55ff5db8..efcd6e1679e8 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h
@@ -31,7 +31,7 @@ more details.
31#ifndef __CSS_API_VERSION_H 31#ifndef __CSS_API_VERSION_H
32#define __CSS_API_VERSION_H 32#define __CSS_API_VERSION_H
33 33
34/** @file 34/* @file
35 * CSS API version file. This file contains the version number of the CSS-API. 35 * CSS API version file. This file contains the version number of the CSS-API.
36 * 36 *
37 * This file is generated from a set of input files describing the CSS-API 37 * This file is generated from a set of input files describing the CSS-API
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c
index 5a4eabf79ee2..bcfd443f5202 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c
@@ -21,7 +21,7 @@
21#endif /* __INLINE_GP_TIMER__ */ 21#endif /* __INLINE_GP_TIMER__ */
22#include "system_local.h" 22#include "system_local.h"
23 23
24/** FIXME: not sure if reg_load(), reg_store() should be API. 24/* FIXME: not sure if reg_load(), reg_store() should be API.
25 */ 25 */
26static uint32_t 26static uint32_t
27gp_timer_reg_load(uint32_t reg); 27gp_timer_reg_load(uint32_t reg);
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h
index 3b5df85fc510..426d022d3a26 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h
@@ -73,7 +73,7 @@ extern void csi_rx_be_ctrl_get_state(
73extern void csi_rx_be_ctrl_dump_state( 73extern void csi_rx_be_ctrl_dump_state(
74 const csi_rx_backend_ID_t ID, 74 const csi_rx_backend_ID_t ID,
75 csi_rx_be_ctrl_state_t *state); 75 csi_rx_be_ctrl_state_t *state);
76/** end of NCI */ 76/* end of NCI */
77 77
78/***************************************************** 78/*****************************************************
79 * 79 *
@@ -130,6 +130,6 @@ extern void csi_rx_be_ctrl_reg_store(
130 const csi_rx_backend_ID_t ID, 130 const csi_rx_backend_ID_t ID,
131 const hrt_address reg, 131 const hrt_address reg,
132 const hrt_data value); 132 const hrt_data value);
133/** end of DLI */ 133/* end of DLI */
134#endif /* USE_INPUT_SYSTEM_VERSION_2401 */ 134#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
135#endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */ 135#endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h
index 1ac0e64e539c..98ee9947fb8e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h
@@ -54,7 +54,7 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_proc_state(
54STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_dump_state( 54STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_dump_state(
55 const ibuf_ctrl_ID_t ID, 55 const ibuf_ctrl_ID_t ID,
56 ibuf_ctrl_state_t *state); 56 ibuf_ctrl_state_t *state);
57/** end of NCI */ 57/* end of NCI */
58 58
59/***************************************************** 59/*****************************************************
60 * 60 *
@@ -87,7 +87,7 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_reg_store(
87 const ibuf_ctrl_ID_t ID, 87 const ibuf_ctrl_ID_t ID,
88 const hrt_address reg, 88 const hrt_address reg,
89 const hrt_data value); 89 const hrt_data value);
90/** end of DLI */ 90/* end of DLI */
91 91
92#endif /* USE_INPUT_SYSTEM_VERSION_2401 */ 92#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
93#endif /* __IBUF_CTRL_PUBLIC_H_INCLUDED__ */ 93#endif /* __IBUF_CTRL_PUBLIC_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h
index a025ad562bd2..0d978e5911c0 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h
@@ -49,7 +49,7 @@
49 49
50/* Arithmetic */ 50/* Arithmetic */
51 51
52/** @brief bitwise AND 52/* @brief bitwise AND
53 * 53 *
54 * @param[in] _a first argument 54 * @param[in] _a first argument
55 * @param[in] _b second argument 55 * @param[in] _b second argument
@@ -63,7 +63,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_and(
63 const tvector1w _a, 63 const tvector1w _a,
64 const tvector1w _b); 64 const tvector1w _b);
65 65
66/** @brief bitwise OR 66/* @brief bitwise OR
67 * 67 *
68 * @param[in] _a first argument 68 * @param[in] _a first argument
69 * @param[in] _b second argument 69 * @param[in] _b second argument
@@ -77,7 +77,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_or(
77 const tvector1w _a, 77 const tvector1w _a,
78 const tvector1w _b); 78 const tvector1w _b);
79 79
80/** @brief bitwise XOR 80/* @brief bitwise XOR
81 * 81 *
82 * @param[in] _a first argument 82 * @param[in] _a first argument
83 * @param[in] _b second argument 83 * @param[in] _b second argument
@@ -91,7 +91,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_xor(
91 const tvector1w _a, 91 const tvector1w _a,
92 const tvector1w _b); 92 const tvector1w _b);
93 93
94/** @brief bitwise inverse 94/* @brief bitwise inverse
95 * 95 *
96 * @param[in] _a first argument 96 * @param[in] _a first argument
97 * 97 *
@@ -105,7 +105,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_inv(
105 105
106/* Additive */ 106/* Additive */
107 107
108/** @brief addition 108/* @brief addition
109 * 109 *
110 * @param[in] _a first argument 110 * @param[in] _a first argument
111 * @param[in] _b second argument 111 * @param[in] _b second argument
@@ -120,7 +120,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_add(
120 const tvector1w _a, 120 const tvector1w _a,
121 const tvector1w _b); 121 const tvector1w _b);
122 122
123/** @brief subtraction 123/* @brief subtraction
124 * 124 *
125 * @param[in] _a first argument 125 * @param[in] _a first argument
126 * @param[in] _b second argument 126 * @param[in] _b second argument
@@ -135,7 +135,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_sub(
135 const tvector1w _a, 135 const tvector1w _a,
136 const tvector1w _b); 136 const tvector1w _b);
137 137
138/** @brief saturated addition 138/* @brief saturated addition
139 * 139 *
140 * @param[in] _a first argument 140 * @param[in] _a first argument
141 * @param[in] _b second argument 141 * @param[in] _b second argument
@@ -150,7 +150,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_addsat(
150 const tvector1w _a, 150 const tvector1w _a,
151 const tvector1w _b); 151 const tvector1w _b);
152 152
153/** @brief saturated subtraction 153/* @brief saturated subtraction
154 * 154 *
155 * @param[in] _a first argument 155 * @param[in] _a first argument
156 * @param[in] _b second argument 156 * @param[in] _b second argument
@@ -166,7 +166,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subsat(
166 const tvector1w _b); 166 const tvector1w _b);
167 167
168#ifdef ISP2401 168#ifdef ISP2401
169/** @brief Unsigned saturated subtraction 169/* @brief Unsigned saturated subtraction
170 * 170 *
171 * @param[in] _a first argument 171 * @param[in] _a first argument
172 * @param[in] _b second argument 172 * @param[in] _b second argument
@@ -182,7 +182,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w_unsigned OP_1w_subsat_u(
182 const tvector1w_unsigned _b); 182 const tvector1w_unsigned _b);
183 183
184#endif 184#endif
185/** @brief subtraction with shift right and rounding 185/* @brief subtraction with shift right and rounding
186 * 186 *
187 * @param[in] _a first argument 187 * @param[in] _a first argument
188 * @param[in] _b second argument 188 * @param[in] _b second argument
@@ -202,7 +202,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subasr1(
202 const tvector1w _a, 202 const tvector1w _a,
203 const tvector1w _b); 203 const tvector1w _b);
204 204
205/** @brief Subtraction with shift right and rounding 205/* @brief Subtraction with shift right and rounding
206 * 206 *
207 * @param[in] _a first operand 207 * @param[in] _a first operand
208 * @param[in] _b second operand 208 * @param[in] _b second operand
@@ -217,7 +217,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subhalfrnd(
217 const tvector1w _a, 217 const tvector1w _a,
218 const tvector1w _b); 218 const tvector1w _b);
219 219
220/** @brief Subtraction with shift right and no rounding 220/* @brief Subtraction with shift right and no rounding
221 * 221 *
222 * @param[in] _a first operand 222 * @param[in] _a first operand
223 * @param[in] _b second operand 223 * @param[in] _b second operand
@@ -233,7 +233,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subhalf(
233 const tvector1w _b); 233 const tvector1w _b);
234 234
235 235
236/** @brief saturated absolute value 236/* @brief saturated absolute value
237 * 237 *
238 * @param[in] _a input 238 * @param[in] _a input
239 * 239 *
@@ -247,7 +247,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subhalf(
247STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_abs( 247STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_abs(
248 const tvector1w _a); 248 const tvector1w _a);
249 249
250/** @brief saturated absolute difference 250/* @brief saturated absolute difference
251 * 251 *
252 * @param[in] _a first argument 252 * @param[in] _a first argument
253 * @param[in] _b second argument 253 * @param[in] _b second argument
@@ -264,7 +264,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subabssat(
264 264
265/* Multiplicative */ 265/* Multiplicative */
266 266
267/** @brief doubling multiply 267/* @brief doubling multiply
268 * 268 *
269 * @param[in] _a first argument 269 * @param[in] _a first argument
270 * @param[in] _b second argument 270 * @param[in] _b second argument
@@ -281,7 +281,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector2w OP_1w_muld(
281 const tvector1w _a, 281 const tvector1w _a,
282 const tvector1w _b); 282 const tvector1w _b);
283 283
284/** @brief integer multiply 284/* @brief integer multiply
285 * 285 *
286 * @param[in] _a first argument 286 * @param[in] _a first argument
287 * @param[in] _b second argument 287 * @param[in] _b second argument
@@ -298,7 +298,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_mul(
298 const tvector1w _a, 298 const tvector1w _a,
299 const tvector1w _b); 299 const tvector1w _b);
300 300
301/** @brief fractional saturating multiply 301/* @brief fractional saturating multiply
302 * 302 *
303 * @param[in] _a first argument 303 * @param[in] _a first argument
304 * @param[in] _b second argument 304 * @param[in] _b second argument
@@ -316,7 +316,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_qmul(
316 const tvector1w _a, 316 const tvector1w _a,
317 const tvector1w _b); 317 const tvector1w _b);
318 318
319/** @brief fractional saturating multiply with rounding 319/* @brief fractional saturating multiply with rounding
320 * 320 *
321 * @param[in] _a first argument 321 * @param[in] _a first argument
322 * @param[in] _b second argument 322 * @param[in] _b second argument
@@ -337,7 +337,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_qrmul(
337 337
338/* Comparative */ 338/* Comparative */
339 339
340/** @brief equal 340/* @brief equal
341 * 341 *
342 * @param[in] _a first argument 342 * @param[in] _a first argument
343 * @param[in] _b second argument 343 * @param[in] _b second argument
@@ -351,7 +351,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_eq(
351 const tvector1w _a, 351 const tvector1w _a,
352 const tvector1w _b); 352 const tvector1w _b);
353 353
354/** @brief not equal 354/* @brief not equal
355 * 355 *
356 * @param[in] _a first argument 356 * @param[in] _a first argument
357 * @param[in] _b second argument 357 * @param[in] _b second argument
@@ -365,7 +365,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_ne(
365 const tvector1w _a, 365 const tvector1w _a,
366 const tvector1w _b); 366 const tvector1w _b);
367 367
368/** @brief less or equal 368/* @brief less or equal
369 * 369 *
370 * @param[in] _a first argument 370 * @param[in] _a first argument
371 * @param[in] _b second argument 371 * @param[in] _b second argument
@@ -379,7 +379,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_le(
379 const tvector1w _a, 379 const tvector1w _a,
380 const tvector1w _b); 380 const tvector1w _b);
381 381
382/** @brief less then 382/* @brief less then
383 * 383 *
384 * @param[in] _a first argument 384 * @param[in] _a first argument
385 * @param[in] _b second argument 385 * @param[in] _b second argument
@@ -393,7 +393,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_lt(
393 const tvector1w _a, 393 const tvector1w _a,
394 const tvector1w _b); 394 const tvector1w _b);
395 395
396/** @brief greater or equal 396/* @brief greater or equal
397 * 397 *
398 * @param[in] _a first argument 398 * @param[in] _a first argument
399 * @param[in] _b second argument 399 * @param[in] _b second argument
@@ -407,7 +407,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_ge(
407 const tvector1w _a, 407 const tvector1w _a,
408 const tvector1w _b); 408 const tvector1w _b);
409 409
410/** @brief greater than 410/* @brief greater than
411 * 411 *
412 * @param[in] _a first argument 412 * @param[in] _a first argument
413 * @param[in] _b second argument 413 * @param[in] _b second argument
@@ -423,7 +423,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_gt(
423 423
424/* Shift */ 424/* Shift */
425 425
426/** @brief aritmetic shift right 426/* @brief aritmetic shift right
427 * 427 *
428 * @param[in] _a input 428 * @param[in] _a input
429 * @param[in] _b shift amount 429 * @param[in] _b shift amount
@@ -441,7 +441,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_asr(
441 const tvector1w _a, 441 const tvector1w _a,
442 const tvector1w _b); 442 const tvector1w _b);
443 443
444/** @brief aritmetic shift right with rounding 444/* @brief aritmetic shift right with rounding
445 * 445 *
446 * @param[in] _a input 446 * @param[in] _a input
447 * @param[in] _b shift amount 447 * @param[in] _b shift amount
@@ -460,7 +460,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_asrrnd(
460 const tvector1w _a, 460 const tvector1w _a,
461 const tvector1w _b); 461 const tvector1w _b);
462 462
463/** @brief saturating arithmetic shift left 463/* @brief saturating arithmetic shift left
464 * 464 *
465 * @param[in] _a input 465 * @param[in] _a input
466 * @param[in] _b shift amount 466 * @param[in] _b shift amount
@@ -480,7 +480,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_asl(
480 const tvector1w _a, 480 const tvector1w _a,
481 const tvector1w _b); 481 const tvector1w _b);
482 482
483/** @brief saturating aritmetic shift left 483/* @brief saturating aritmetic shift left
484 * 484 *
485 * @param[in] _a input 485 * @param[in] _a input
486 * @param[in] _b shift amount 486 * @param[in] _b shift amount
@@ -493,7 +493,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_aslsat(
493 const tvector1w _a, 493 const tvector1w _a,
494 const tvector1w _b); 494 const tvector1w _b);
495 495
496/** @brief logical shift left 496/* @brief logical shift left
497 * 497 *
498 * @param[in] _a input 498 * @param[in] _a input
499 * @param[in] _b shift amount 499 * @param[in] _b shift amount
@@ -510,7 +510,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lsl(
510 const tvector1w _a, 510 const tvector1w _a,
511 const tvector1w _b); 511 const tvector1w _b);
512 512
513/** @brief logical shift right 513/* @brief logical shift right
514 * 514 *
515 * @param[in] _a input 515 * @param[in] _a input
516 * @param[in] _b shift amount 516 * @param[in] _b shift amount
@@ -528,7 +528,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lsr(
528 const tvector1w _b); 528 const tvector1w _b);
529 529
530#ifdef ISP2401 530#ifdef ISP2401
531/** @brief bidirectional saturating arithmetic shift 531/* @brief bidirectional saturating arithmetic shift
532 * 532 *
533 * @param[in] _a input 533 * @param[in] _a input
534 * @param[in] _b shift amount 534 * @param[in] _b shift amount
@@ -546,7 +546,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_ashift_sat(
546 const tvector1w _a, 546 const tvector1w _a,
547 const tvector1w _b); 547 const tvector1w _b);
548 548
549/** @brief bidirectional non-saturating arithmetic shift 549/* @brief bidirectional non-saturating arithmetic shift
550 * 550 *
551 * @param[in] _a input 551 * @param[in] _a input
552 * @param[in] _b shift amount 552 * @param[in] _b shift amount
@@ -565,7 +565,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_ashift(
565 const tvector1w _b); 565 const tvector1w _b);
566 566
567 567
568/** @brief bidirectional logical shift 568/* @brief bidirectional logical shift
569 * 569 *
570 * @param[in] _a input 570 * @param[in] _a input
571 * @param[in] _b shift amount 571 * @param[in] _b shift amount
@@ -588,7 +588,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lshift(
588#endif 588#endif
589/* Cast */ 589/* Cast */
590 590
591/** @brief Cast from int to 1w 591/* @brief Cast from int to 1w
592 * 592 *
593 * @param[in] _a input 593 * @param[in] _a input
594 * 594 *
@@ -601,7 +601,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lshift(
601STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_int_cast_to_1w( 601STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_int_cast_to_1w(
602 const int _a); 602 const int _a);
603 603
604/** @brief Cast from 1w to int 604/* @brief Cast from 1w to int
605 * 605 *
606 * @param[in] _a input 606 * @param[in] _a input
607 * 607 *
@@ -614,7 +614,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_int_cast_to_1w(
614STORAGE_CLASS_ISP_OP1W_FUNC_H int OP_1w_cast_to_int( 614STORAGE_CLASS_ISP_OP1W_FUNC_H int OP_1w_cast_to_int(
615 const tvector1w _a); 615 const tvector1w _a);
616 616
617/** @brief Cast from 1w to 2w 617/* @brief Cast from 1w to 2w
618 * 618 *
619 * @param[in] _a input 619 * @param[in] _a input
620 * 620 *
@@ -627,7 +627,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H int OP_1w_cast_to_int(
627STORAGE_CLASS_ISP_OP1W_FUNC_H tvector2w OP_1w_cast_to_2w( 627STORAGE_CLASS_ISP_OP1W_FUNC_H tvector2w OP_1w_cast_to_2w(
628 const tvector1w _a); 628 const tvector1w _a);
629 629
630/** @brief Cast from 2w to 1w 630/* @brief Cast from 2w to 1w
631 * 631 *
632 * @param[in] _a input 632 * @param[in] _a input
633 * 633 *
@@ -641,7 +641,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_2w_cast_to_1w(
641 const tvector2w _a); 641 const tvector2w _a);
642 642
643 643
644/** @brief Cast from 2w to 1w with saturation 644/* @brief Cast from 2w to 1w with saturation
645 * 645 *
646 * @param[in] _a input 646 * @param[in] _a input
647 * 647 *
@@ -657,7 +657,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_2w_sat_cast_to_1w(
657 657
658/* clipping */ 658/* clipping */
659 659
660/** @brief Clip asymmetrical 660/* @brief Clip asymmetrical
661 * 661 *
662 * @param[in] _a first argument 662 * @param[in] _a first argument
663 * @param[in] _b second argument 663 * @param[in] _b second argument
@@ -673,7 +673,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_clip_asym(
673 const tvector1w _a, 673 const tvector1w _a,
674 const tvector1w _b); 674 const tvector1w _b);
675 675
676/** @brief Clip zero 676/* @brief Clip zero
677 * 677 *
678 * @param[in] _a first argument 678 * @param[in] _a first argument
679 * @param[in] _b second argument 679 * @param[in] _b second argument
@@ -691,7 +691,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_clipz(
691 691
692/* division */ 692/* division */
693 693
694/** @brief Truncated division 694/* @brief Truncated division
695 * 695 *
696 * @param[in] _a first argument 696 * @param[in] _a first argument
697 * @param[in] _b second argument 697 * @param[in] _b second argument
@@ -708,7 +708,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_div(
708 const tvector1w _a, 708 const tvector1w _a,
709 const tvector1w _b); 709 const tvector1w _b);
710 710
711/** @brief Fractional saturating divide 711/* @brief Fractional saturating divide
712 * 712 *
713 * @param[in] _a first argument 713 * @param[in] _a first argument
714 * @param[in] _b second argument 714 * @param[in] _b second argument
@@ -726,7 +726,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_qdiv(
726 const tvector1w _a, 726 const tvector1w _a,
727 const tvector1w _b); 727 const tvector1w _b);
728 728
729/** @brief Modulo 729/* @brief Modulo
730 * 730 *
731 * @param[in] _a first argument 731 * @param[in] _a first argument
732 * @param[in] _b second argument 732 * @param[in] _b second argument
@@ -741,7 +741,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_mod(
741 const tvector1w _a, 741 const tvector1w _a,
742 const tvector1w _b); 742 const tvector1w _b);
743 743
744/** @brief Unsigned integer Square root 744/* @brief Unsigned integer Square root
745 * 745 *
746 * @param[in] _a input 746 * @param[in] _a input
747 * 747 *
@@ -754,7 +754,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w_unsigned OP_1w_sqrt_u(
754 754
755/* Miscellaneous */ 755/* Miscellaneous */
756 756
757/** @brief Multiplexer 757/* @brief Multiplexer
758 * 758 *
759 * @param[in] _a first argument 759 * @param[in] _a first argument
760 * @param[in] _b second argument 760 * @param[in] _b second argument
@@ -770,7 +770,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_mux(
770 const tvector1w _b, 770 const tvector1w _b,
771 const tflags _c); 771 const tflags _c);
772 772
773/** @brief Average without rounding 773/* @brief Average without rounding
774 * 774 *
775 * @param[in] _a first operand 775 * @param[in] _a first operand
776 * @param[in] _b second operand 776 * @param[in] _b second operand
@@ -786,7 +786,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_avg(
786 const tvector1w _a, 786 const tvector1w _a,
787 const tvector1w _b); 787 const tvector1w _b);
788 788
789/** @brief Average with rounding 789/* @brief Average with rounding
790 * 790 *
791 * @param[in] _a first argument 791 * @param[in] _a first argument
792 * @param[in] _b second argument 792 * @param[in] _b second argument
@@ -802,7 +802,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_avgrnd(
802 const tvector1w _a, 802 const tvector1w _a,
803 const tvector1w _b); 803 const tvector1w _b);
804 804
805/** @brief Minimum 805/* @brief Minimum
806 * 806 *
807 * @param[in] _a first argument 807 * @param[in] _a first argument
808 * @param[in] _b second argument 808 * @param[in] _b second argument
@@ -816,7 +816,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_min(
816 const tvector1w _a, 816 const tvector1w _a,
817 const tvector1w _b); 817 const tvector1w _b);
818 818
819/** @brief Maximum 819/* @brief Maximum
820 * 820 *
821 * @param[in] _a first argument 821 * @param[in] _a first argument
822 * @param[in] _b second argument 822 * @param[in] _b second argument
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h
index cf7e7314842d..7575d260b837 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h
@@ -48,7 +48,7 @@
48 48
49/* Arithmetic */ 49/* Arithmetic */
50 50
51/** @brief bitwise AND 51/* @brief bitwise AND
52 * 52 *
53 * @param[in] _a first argument 53 * @param[in] _a first argument
54 * @param[in] _b second argument 54 * @param[in] _b second argument
@@ -62,7 +62,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_and(
62 const tvector2w _a, 62 const tvector2w _a,
63 const tvector2w _b); 63 const tvector2w _b);
64 64
65/** @brief bitwise OR 65/* @brief bitwise OR
66 * 66 *
67 * @param[in] _a first argument 67 * @param[in] _a first argument
68 * @param[in] _b second argument 68 * @param[in] _b second argument
@@ -76,7 +76,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_or(
76 const tvector2w _a, 76 const tvector2w _a,
77 const tvector2w _b); 77 const tvector2w _b);
78 78
79/** @brief bitwise XOR 79/* @brief bitwise XOR
80 * 80 *
81 * @param[in] _a first argument 81 * @param[in] _a first argument
82 * @param[in] _b second argument 82 * @param[in] _b second argument
@@ -90,7 +90,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_xor(
90 const tvector2w _a, 90 const tvector2w _a,
91 const tvector2w _b); 91 const tvector2w _b);
92 92
93/** @brief bitwise inverse 93/* @brief bitwise inverse
94 * 94 *
95 * @param[in] _a first argument 95 * @param[in] _a first argument
96 * 96 *
@@ -104,7 +104,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_inv(
104 104
105/* Additive */ 105/* Additive */
106 106
107/** @brief addition 107/* @brief addition
108 * 108 *
109 * @param[in] _a first argument 109 * @param[in] _a first argument
110 * @param[in] _b second argument 110 * @param[in] _b second argument
@@ -119,7 +119,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_add(
119 const tvector2w _a, 119 const tvector2w _a,
120 const tvector2w _b); 120 const tvector2w _b);
121 121
122/** @brief subtraction 122/* @brief subtraction
123 * 123 *
124 * @param[in] _a first argument 124 * @param[in] _a first argument
125 * @param[in] _b second argument 125 * @param[in] _b second argument
@@ -134,7 +134,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_sub(
134 const tvector2w _a, 134 const tvector2w _a,
135 const tvector2w _b); 135 const tvector2w _b);
136 136
137/** @brief saturated addition 137/* @brief saturated addition
138 * 138 *
139 * @param[in] _a first argument 139 * @param[in] _a first argument
140 * @param[in] _b second argument 140 * @param[in] _b second argument
@@ -149,7 +149,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_addsat(
149 const tvector2w _a, 149 const tvector2w _a,
150 const tvector2w _b); 150 const tvector2w _b);
151 151
152/** @brief saturated subtraction 152/* @brief saturated subtraction
153 * 153 *
154 * @param[in] _a first argument 154 * @param[in] _a first argument
155 * @param[in] _b second argument 155 * @param[in] _b second argument
@@ -164,7 +164,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subsat(
164 const tvector2w _a, 164 const tvector2w _a,
165 const tvector2w _b); 165 const tvector2w _b);
166 166
167/** @brief subtraction with shift right and rounding 167/* @brief subtraction with shift right and rounding
168 * 168 *
169 * @param[in] _a first argument 169 * @param[in] _a first argument
170 * @param[in] _b second argument 170 * @param[in] _b second argument
@@ -184,7 +184,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subasr1(
184 const tvector2w _a, 184 const tvector2w _a,
185 const tvector2w _b); 185 const tvector2w _b);
186 186
187/** @brief Subtraction with shift right and rounding 187/* @brief Subtraction with shift right and rounding
188 * 188 *
189 * @param[in] _a first operand 189 * @param[in] _a first operand
190 * @param[in] _b second operand 190 * @param[in] _b second operand
@@ -199,7 +199,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalfrnd(
199 const tvector2w _a, 199 const tvector2w _a,
200 const tvector2w _b); 200 const tvector2w _b);
201 201
202/** @brief Subtraction with shift right and no rounding 202/* @brief Subtraction with shift right and no rounding
203 * 203 *
204 * @param[in] _a first operand 204 * @param[in] _a first operand
205 * @param[in] _b second operand 205 * @param[in] _b second operand
@@ -214,7 +214,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalf(
214 const tvector2w _a, 214 const tvector2w _a,
215 const tvector2w _b); 215 const tvector2w _b);
216 216
217/** @brief saturated absolute value 217/* @brief saturated absolute value
218 * 218 *
219 * @param[in] _a input 219 * @param[in] _a input
220 * 220 *
@@ -228,7 +228,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalf(
228STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_abs( 228STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_abs(
229 const tvector2w _a); 229 const tvector2w _a);
230 230
231/** @brief saturated absolute difference 231/* @brief saturated absolute difference
232 * 232 *
233 * @param[in] _a first argument 233 * @param[in] _a first argument
234 * @param[in] _b second argument 234 * @param[in] _b second argument
@@ -245,7 +245,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subabssat(
245 245
246/* Multiplicative */ 246/* Multiplicative */
247 247
248/** @brief integer multiply 248/* @brief integer multiply
249 * 249 *
250 * @param[in] _a first argument 250 * @param[in] _a first argument
251 * @param[in] _b second argument 251 * @param[in] _b second argument
@@ -262,7 +262,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mul(
262 const tvector2w _a, 262 const tvector2w _a,
263 const tvector2w _b); 263 const tvector2w _b);
264 264
265/** @brief fractional saturating multiply 265/* @brief fractional saturating multiply
266 * 266 *
267 * @param[in] _a first argument 267 * @param[in] _a first argument
268 * @param[in] _b second argument 268 * @param[in] _b second argument
@@ -279,7 +279,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_qmul(
279 const tvector2w _a, 279 const tvector2w _a,
280 const tvector2w _b); 280 const tvector2w _b);
281 281
282/** @brief fractional saturating multiply with rounding 282/* @brief fractional saturating multiply with rounding
283 * 283 *
284 * @param[in] _a first argument 284 * @param[in] _a first argument
285 * @param[in] _b second argument 285 * @param[in] _b second argument
@@ -301,7 +301,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_qrmul(
301 301
302/* Comparative */ 302/* Comparative */
303 303
304/** @brief equal 304/* @brief equal
305 * 305 *
306 * @param[in] _a first argument 306 * @param[in] _a first argument
307 * @param[in] _b second argument 307 * @param[in] _b second argument
@@ -315,7 +315,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_eq(
315 const tvector2w _a, 315 const tvector2w _a,
316 const tvector2w _b); 316 const tvector2w _b);
317 317
318/** @brief not equal 318/* @brief not equal
319 * 319 *
320 * @param[in] _a first argument 320 * @param[in] _a first argument
321 * @param[in] _b second argument 321 * @param[in] _b second argument
@@ -329,7 +329,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_ne(
329 const tvector2w _a, 329 const tvector2w _a,
330 const tvector2w _b); 330 const tvector2w _b);
331 331
332/** @brief less or equal 332/* @brief less or equal
333 * 333 *
334 * @param[in] _a first argument 334 * @param[in] _a first argument
335 * @param[in] _b second argument 335 * @param[in] _b second argument
@@ -343,7 +343,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_le(
343 const tvector2w _a, 343 const tvector2w _a,
344 const tvector2w _b); 344 const tvector2w _b);
345 345
346/** @brief less then 346/* @brief less then
347 * 347 *
348 * @param[in] _a first argument 348 * @param[in] _a first argument
349 * @param[in] _b second argument 349 * @param[in] _b second argument
@@ -357,7 +357,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_lt(
357 const tvector2w _a, 357 const tvector2w _a,
358 const tvector2w _b); 358 const tvector2w _b);
359 359
360/** @brief greater or equal 360/* @brief greater or equal
361 * 361 *
362 * @param[in] _a first argument 362 * @param[in] _a first argument
363 * @param[in] _b second argument 363 * @param[in] _b second argument
@@ -371,7 +371,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_ge(
371 const tvector2w _a, 371 const tvector2w _a,
372 const tvector2w _b); 372 const tvector2w _b);
373 373
374/** @brief greater than 374/* @brief greater than
375 * 375 *
376 * @param[in] _a first argument 376 * @param[in] _a first argument
377 * @param[in] _b second argument 377 * @param[in] _b second argument
@@ -387,7 +387,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_gt(
387 387
388/* Shift */ 388/* Shift */
389 389
390/** @brief aritmetic shift right 390/* @brief aritmetic shift right
391 * 391 *
392 * @param[in] _a input 392 * @param[in] _a input
393 * @param[in] _b shift amount 393 * @param[in] _b shift amount
@@ -404,7 +404,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asr(
404 const tvector2w _a, 404 const tvector2w _a,
405 const tvector2w _b); 405 const tvector2w _b);
406 406
407/** @brief aritmetic shift right with rounding 407/* @brief aritmetic shift right with rounding
408 * 408 *
409 * @param[in] _a input 409 * @param[in] _a input
410 * @param[in] _b shift amount 410 * @param[in] _b shift amount
@@ -423,7 +423,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asrrnd(
423 const tvector2w _a, 423 const tvector2w _a,
424 const tvector2w _b); 424 const tvector2w _b);
425 425
426/** @brief saturating aritmetic shift left 426/* @brief saturating aritmetic shift left
427 * 427 *
428 * @param[in] _a input 428 * @param[in] _a input
429 * @param[in] _b shift amount 429 * @param[in] _b shift amount
@@ -443,7 +443,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asl(
443 const tvector2w _a, 443 const tvector2w _a,
444 const tvector2w _b); 444 const tvector2w _b);
445 445
446/** @brief saturating aritmetic shift left 446/* @brief saturating aritmetic shift left
447 * 447 *
448 * @param[in] _a input 448 * @param[in] _a input
449 * @param[in] _b shift amount 449 * @param[in] _b shift amount
@@ -456,7 +456,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_aslsat(
456 const tvector2w _a, 456 const tvector2w _a,
457 const tvector2w _b); 457 const tvector2w _b);
458 458
459/** @brief logical shift left 459/* @brief logical shift left
460 * 460 *
461 * @param[in] _a input 461 * @param[in] _a input
462 * @param[in] _b shift amount 462 * @param[in] _b shift amount
@@ -473,7 +473,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_lsl(
473 const tvector2w _a, 473 const tvector2w _a,
474 const tvector2w _b); 474 const tvector2w _b);
475 475
476/** @brief logical shift right 476/* @brief logical shift right
477 * 477 *
478 * @param[in] _a input 478 * @param[in] _a input
479 * @param[in] _b shift amount 479 * @param[in] _b shift amount
@@ -492,7 +492,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_lsr(
492 492
493/* clipping */ 493/* clipping */
494 494
495/** @brief Clip asymmetrical 495/* @brief Clip asymmetrical
496 * 496 *
497 * @param[in] _a first argument 497 * @param[in] _a first argument
498 * @param[in] _b second argument 498 * @param[in] _b second argument
@@ -507,7 +507,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_clip_asym(
507 const tvector2w _a, 507 const tvector2w _a,
508 const tvector2w _b); 508 const tvector2w _b);
509 509
510/** @brief Clip zero 510/* @brief Clip zero
511 * 511 *
512 * @param[in] _a first argument 512 * @param[in] _a first argument
513 * @param[in] _b second argument 513 * @param[in] _b second argument
@@ -524,7 +524,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_clipz(
524 524
525/* division */ 525/* division */
526 526
527/** @brief Truncated division 527/* @brief Truncated division
528 * 528 *
529 * @param[in] _a first argument 529 * @param[in] _a first argument
530 * @param[in] _b second argument 530 * @param[in] _b second argument
@@ -541,7 +541,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_div(
541 const tvector2w _a, 541 const tvector2w _a,
542 const tvector2w _b); 542 const tvector2w _b);
543 543
544/** @brief Saturating truncated division 544/* @brief Saturating truncated division
545 * 545 *
546 * @param[in] _a first argument 546 * @param[in] _a first argument
547 * @param[in] _b second argument 547 * @param[in] _b second argument
@@ -559,7 +559,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector1w OP_2w_divh(
559 const tvector2w _a, 559 const tvector2w _a,
560 const tvector1w _b); 560 const tvector1w _b);
561 561
562/** @brief Modulo 562/* @brief Modulo
563 * 563 *
564 * @param[in] _a first argument 564 * @param[in] _a first argument
565 * @param[in] _b second argument 565 * @param[in] _b second argument
@@ -572,7 +572,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mod(
572 const tvector2w _a, 572 const tvector2w _a,
573 const tvector2w _b); 573 const tvector2w _b);
574 574
575/** @brief Unsigned Integer Square root 575/* @brief Unsigned Integer Square root
576 * 576 *
577 * @param[in] _a input 577 * @param[in] _a input
578 * 578 *
@@ -585,7 +585,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector1w_unsigned OP_2w_sqrt_u(
585 585
586/* Miscellaneous */ 586/* Miscellaneous */
587 587
588/** @brief Multiplexer 588/* @brief Multiplexer
589 * 589 *
590 * @param[in] _a first argument 590 * @param[in] _a first argument
591 * @param[in] _b second argument 591 * @param[in] _b second argument
@@ -601,7 +601,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mux(
601 const tvector2w _b, 601 const tvector2w _b,
602 const tflags _c); 602 const tflags _c);
603 603
604/** @brief Average without rounding 604/* @brief Average without rounding
605 * 605 *
606 * @param[in] _a first operand 606 * @param[in] _a first operand
607 * @param[in] _b second operand 607 * @param[in] _b second operand
@@ -617,7 +617,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_avg(
617 const tvector2w _a, 617 const tvector2w _a,
618 const tvector2w _b); 618 const tvector2w _b);
619 619
620/** @brief Average with rounding 620/* @brief Average with rounding
621 * 621 *
622 * @param[in] _a first argument 622 * @param[in] _a first argument
623 * @param[in] _b second argument 623 * @param[in] _b second argument
@@ -633,7 +633,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_avgrnd(
633 const tvector2w _a, 633 const tvector2w _a,
634 const tvector2w _b); 634 const tvector2w _b);
635 635
636/** @brief Minimum 636/* @brief Minimum
637 * 637 *
638 * @param[in] _a first argument 638 * @param[in] _a first argument
639 * @param[in] _b second argument 639 * @param[in] _b second argument
@@ -647,7 +647,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_min(
647 const tvector2w _a, 647 const tvector2w _a,
648 const tvector2w _b); 648 const tvector2w _b);
649 649
650/** @brief Maximum 650/* @brief Maximum
651 * 651 *
652 * @param[in] _a first argument 652 * @param[in] _a first argument
653 * @param[in] _b second argument 653 * @param[in] _b second argument
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h
index 5624cfcfa015..6c53ca9df96c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h
@@ -43,7 +43,7 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_sid_state(
43 const stream2mmio_ID_t ID, 43 const stream2mmio_ID_t ID,
44 const stream2mmio_sid_ID_t sid_id, 44 const stream2mmio_sid_ID_t sid_id,
45 stream2mmio_sid_state_t *state); 45 stream2mmio_sid_state_t *state);
46/** end of NCI */ 46/* end of NCI */
47 47
48/***************************************************** 48/*****************************************************
49 * 49 *
@@ -96,6 +96,6 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_reg_store(
96 const stream2mmio_ID_t ID, 96 const stream2mmio_ID_t ID,
97 const hrt_address reg, 97 const hrt_address reg,
98 const hrt_data value); 98 const hrt_data value);
99/** end of DLI */ 99/* end of DLI */
100 100
101#endif /* __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__ */ 101#endif /* __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h
index c0f3f3ea32d7..f597e07d7c4f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h
@@ -41,7 +41,7 @@ STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_get_state(
41STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state( 41STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state(
42 const pixelgen_ID_t ID, 42 const pixelgen_ID_t ID,
43 pixelgen_ctrl_state_t *state); 43 pixelgen_ctrl_state_t *state);
44/** end of NCI */ 44/* end of NCI */
45 45
46/***************************************************** 46/*****************************************************
47 * 47 *
@@ -73,7 +73,7 @@ STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_reg_store(
73 const pixelgen_ID_t ID, 73 const pixelgen_ID_t ID,
74 const hrt_address reg, 74 const hrt_address reg,
75 const hrt_data value); 75 const hrt_data value);
76/** end of DLI */ 76/* end of DLI */
77 77
78#endif /* USE_INPUT_SYSTEM_VERSION_2401 */ 78#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
79#endif /* __PIXELGEN_PUBLIC_H_INCLUDED__ */ 79#endif /* __PIXELGEN_PUBLIC_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h
index a202d6dce106..c1638c06407d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h
@@ -27,7 +27,7 @@
27 27
28#include "ref_vector_func_types.h" 28#include "ref_vector_func_types.h"
29 29
30/** @brief Doubling multiply accumulate with saturation 30/* @brief Doubling multiply accumulate with saturation
31 * 31 *
32 * @param[in] acc accumulator 32 * @param[in] acc accumulator
33 * @param[in] a multiply input 33 * @param[in] a multiply input
@@ -44,7 +44,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector2w OP_1w_maccd_sat(
44 tvector1w a, 44 tvector1w a,
45 tvector1w b ); 45 tvector1w b );
46 46
47/** @brief Doubling multiply accumulate 47/* @brief Doubling multiply accumulate
48 * 48 *
49 * @param[in] acc accumulator 49 * @param[in] acc accumulator
50 * @param[in] a multiply input 50 * @param[in] a multiply input
@@ -61,7 +61,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector2w OP_1w_maccd(
61 tvector1w a, 61 tvector1w a,
62 tvector1w b ); 62 tvector1w b );
63 63
64/** @brief Re-aligning multiply 64/* @brief Re-aligning multiply
65 * 65 *
66 * @param[in] a multiply input 66 * @param[in] a multiply input
67 * @param[in] b multiply input 67 * @param[in] b multiply input
@@ -78,7 +78,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_mul_realigning(
78 tvector1w b, 78 tvector1w b,
79 tscalar1w shift ); 79 tscalar1w shift );
80 80
81/** @brief Leading bit index 81/* @brief Leading bit index
82 * 82 *
83 * @param[in] a input 83 * @param[in] a input
84 * 84 *
@@ -92,7 +92,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_mul_realigning(
92STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_lod( 92STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_lod(
93 tvector1w a); 93 tvector1w a);
94 94
95/** @brief Config Unit Input Processing 95/* @brief Config Unit Input Processing
96 * 96 *
97 * @param[in] a input 97 * @param[in] a input
98 * @param[in] input_scale input scaling factor 98 * @param[in] input_scale input scaling factor
@@ -111,7 +111,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_input_scaling_offset_clamping(
111 tscalar1w_5bit_signed input_scale, 111 tscalar1w_5bit_signed input_scale,
112 tscalar1w_5bit_signed input_offset); 112 tscalar1w_5bit_signed input_offset);
113 113
114/** @brief Config Unit Output Processing 114/* @brief Config Unit Output Processing
115 * 115 *
116 * @param[in] a output 116 * @param[in] a output
117 * @param[in] output_scale output scaling factor 117 * @param[in] output_scale output scaling factor
@@ -127,7 +127,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_output_scaling_clamping(
127 tvector1w a, 127 tvector1w a,
128 tscalar1w_5bit_signed output_scale); 128 tscalar1w_5bit_signed output_scale);
129 129
130/** @brief Config Unit Piecewiselinear estimation 130/* @brief Config Unit Piecewiselinear estimation
131 * 131 *
132 * @param[in] a input 132 * @param[in] a input
133 * @param[in] config_points config parameter structure 133 * @param[in] config_points config parameter structure
@@ -143,7 +143,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_piecewise_estimation(
143 tvector1w a, 143 tvector1w a,
144 ref_config_points config_points); 144 ref_config_points config_points);
145 145
146/** @brief Fast Config Unit 146/* @brief Fast Config Unit
147 * 147 *
148 * @param[in] x input 148 * @param[in] x input
149 * @param[in] init_vectors LUT data structure 149 * @param[in] init_vectors LUT data structure
@@ -161,7 +161,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_XCU(
161 xcu_ref_init_vectors init_vectors); 161 xcu_ref_init_vectors init_vectors);
162 162
163 163
164/** @brief LXCU 164/* @brief LXCU
165 * 165 *
166 * @param[in] x input 166 * @param[in] x input
167 * @param[in] init_vectors LUT data structure 167 * @param[in] init_vectors LUT data structure
@@ -180,7 +180,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_LXCU(
180 tvector1w x, 180 tvector1w x,
181 xcu_ref_init_vectors init_vectors); 181 xcu_ref_init_vectors init_vectors);
182 182
183/** @brief Coring 183/* @brief Coring
184 * 184 *
185 * @param[in] coring_vec Amount of coring based on brightness level 185 * @param[in] coring_vec Amount of coring based on brightness level
186 * @param[in] filt_input Vector of input pixels on which Coring is applied 186 * @param[in] filt_input Vector of input pixels on which Coring is applied
@@ -196,7 +196,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w coring(
196 tvector1w filt_input, 196 tvector1w filt_input,
197 tscalar1w m_CnrCoring0 ); 197 tscalar1w m_CnrCoring0 );
198 198
199/** @brief Normalised FIR with coefficients [3,4,1] 199/* @brief Normalised FIR with coefficients [3,4,1]
200 * 200 *
201 * @param[in] m 1x3 matrix with pixels 201 * @param[in] m 1x3 matrix with pixels
202 * 202 *
@@ -209,7 +209,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w coring(
209STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_m90_nrm ( 209STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_m90_nrm (
210 const s_1w_1x3_matrix m); 210 const s_1w_1x3_matrix m);
211 211
212/** @brief Normalised FIR with coefficients [1,4,3] 212/* @brief Normalised FIR with coefficients [1,4,3]
213 * 213 *
214 * @param[in] m 1x3 matrix with pixels 214 * @param[in] m 1x3 matrix with pixels
215 * 215 *
@@ -222,7 +222,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_m90_nrm (
222STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_p90_nrm ( 222STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_p90_nrm (
223 const s_1w_1x3_matrix m); 223 const s_1w_1x3_matrix m);
224 224
225/** @brief Normalised FIR with coefficients [1,2,1] 225/* @brief Normalised FIR with coefficients [1,2,1]
226 * 226 *
227 * @param[in] m 1x3 matrix with pixels 227 * @param[in] m 1x3 matrix with pixels
228 * 228 *
@@ -234,7 +234,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_p90_nrm (
234STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm ( 234STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm (
235 const s_1w_1x3_matrix m); 235 const s_1w_1x3_matrix m);
236 236
237/** @brief Normalised FIR with coefficients [13,16,3] 237/* @brief Normalised FIR with coefficients [13,16,3]
238 * 238 *
239 * @param[in] m 1x3 matrix with pixels 239 * @param[in] m 1x3 matrix with pixels
240 * 240 *
@@ -246,7 +246,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm (
246STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph0 ( 246STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph0 (
247 const s_1w_1x3_matrix m); 247 const s_1w_1x3_matrix m);
248 248
249/** @brief Normalised FIR with coefficients [9,16,7] 249/* @brief Normalised FIR with coefficients [9,16,7]
250 * 250 *
251 * @param[in] m 1x3 matrix with pixels 251 * @param[in] m 1x3 matrix with pixels
252 * 252 *
@@ -258,7 +258,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph0 (
258STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph1 ( 258STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph1 (
259 const s_1w_1x3_matrix m); 259 const s_1w_1x3_matrix m);
260 260
261/** @brief Normalised FIR with coefficients [5,16,11] 261/* @brief Normalised FIR with coefficients [5,16,11]
262 * 262 *
263 * @param[in] m 1x3 matrix with pixels 263 * @param[in] m 1x3 matrix with pixels
264 * 264 *
@@ -270,7 +270,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph1 (
270STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph2 ( 270STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph2 (
271 const s_1w_1x3_matrix m); 271 const s_1w_1x3_matrix m);
272 272
273/** @brief Normalised FIR with coefficients [1,16,15] 273/* @brief Normalised FIR with coefficients [1,16,15]
274 * 274 *
275 * @param[in] m 1x3 matrix with pixels 275 * @param[in] m 1x3 matrix with pixels
276 * 276 *
@@ -282,7 +282,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph2 (
282STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph3 ( 282STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph3 (
283 const s_1w_1x3_matrix m); 283 const s_1w_1x3_matrix m);
284 284
285/** @brief Normalised FIR with programable phase shift 285/* @brief Normalised FIR with programable phase shift
286 * 286 *
287 * @param[in] m 1x3 matrix with pixels 287 * @param[in] m 1x3 matrix with pixels
288 * @param[in] coeff phase shift 288 * @param[in] coeff phase shift
@@ -295,7 +295,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph3 (
295STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_calc_coeff ( 295STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_calc_coeff (
296 const s_1w_1x3_matrix m, tscalar1w_3bit coeff); 296 const s_1w_1x3_matrix m, tscalar1w_3bit coeff);
297 297
298/** @brief 3 tap FIR with coefficients [1,1,1] 298/* @brief 3 tap FIR with coefficients [1,1,1]
299 * 299 *
300 * @param[in] m 1x3 matrix with pixels 300 * @param[in] m 1x3 matrix with pixels
301 * 301 *
@@ -308,7 +308,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_9dB_nrm (
308 const s_1w_1x3_matrix m); 308 const s_1w_1x3_matrix m);
309 309
310#ifdef ISP2401 310#ifdef ISP2401
311/** @brief symmetric 3 tap FIR acts as LPF or BSF 311/* @brief symmetric 3 tap FIR acts as LPF or BSF
312 * 312 *
313 * @param[in] m 1x3 matrix with pixels 313 * @param[in] m 1x3 matrix with pixels
314 * @param[in] k filter coefficient shift 314 * @param[in] k filter coefficient shift
@@ -336,7 +336,7 @@ sym_fir1x3m_lpf_bsf(s_1w_1x3_matrix m,
336 tscalar_bool bsf_flag); 336 tscalar_bool bsf_flag);
337#endif 337#endif
338 338
339/** @brief Normalised 2D FIR with coefficients [1;2;1] * [1,2,1] 339/* @brief Normalised 2D FIR with coefficients [1;2;1] * [1,2,1]
340 * 340 *
341 * @param[in] m 3x3 matrix with pixels 341 * @param[in] m 3x3 matrix with pixels
342 * 342 *
@@ -353,7 +353,7 @@ sym_fir1x3m_lpf_bsf(s_1w_1x3_matrix m,
353STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_6dB_nrm ( 353STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_6dB_nrm (
354 const s_1w_3x3_matrix m); 354 const s_1w_3x3_matrix m);
355 355
356/** @brief Normalised 2D FIR with coefficients [1;1;1] * [1,1,1] 356/* @brief Normalised 2D FIR with coefficients [1;1;1] * [1,1,1]
357 * 357 *
358 * @param[in] m 3x3 matrix with pixels 358 * @param[in] m 3x3 matrix with pixels
359 * 359 *
@@ -371,7 +371,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_6dB_nrm (
371STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm ( 371STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm (
372 const s_1w_3x3_matrix m); 372 const s_1w_3x3_matrix m);
373 373
374/** @brief Normalised dual output 2D FIR with coefficients [1;2;1] * [1,2,1] 374/* @brief Normalised dual output 2D FIR with coefficients [1;2;1] * [1,2,1]
375 * 375 *
376 * @param[in] m 4x3 matrix with pixels 376 * @param[in] m 4x3 matrix with pixels
377 * 377 *
@@ -391,7 +391,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm (
391 STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_6dB_out2x1_nrm ( 391 STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_6dB_out2x1_nrm (
392 const s_1w_4x3_matrix m); 392 const s_1w_4x3_matrix m);
393 393
394/** @brief Normalised dual output 2D FIR with coefficients [1;1;1] * [1,1,1] 394/* @brief Normalised dual output 2D FIR with coefficients [1;1;1] * [1,1,1]
395 * 395 *
396 * @param[in] m 4x3 matrix with pixels 396 * @param[in] m 4x3 matrix with pixels
397 * 397 *
@@ -411,7 +411,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm (
411STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_9dB_out2x1_nrm ( 411STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_9dB_out2x1_nrm (
412 const s_1w_4x3_matrix m); 412 const s_1w_4x3_matrix m);
413 413
414/** @brief Normalised 2D FIR 5x5 414/* @brief Normalised 2D FIR 5x5
415 * 415 *
416 * @param[in] m 5x5 matrix with pixels 416 * @param[in] m 5x5 matrix with pixels
417 * 417 *
@@ -429,7 +429,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_9dB_out2x1_nrm (
429STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_15dB_nrm ( 429STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_15dB_nrm (
430 const s_1w_5x5_matrix m); 430 const s_1w_5x5_matrix m);
431 431
432/** @brief Normalised FIR 1x5 432/* @brief Normalised FIR 1x5
433 * 433 *
434 * @param[in] m 1x5 matrix with pixels 434 * @param[in] m 1x5 matrix with pixels
435 * 435 *
@@ -447,7 +447,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_15dB_nrm (
447STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_12dB_nrm ( 447STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_12dB_nrm (
448 const s_1w_1x5_matrix m); 448 const s_1w_1x5_matrix m);
449 449
450/** @brief Normalised 2D FIR 5x5 450/* @brief Normalised 2D FIR 5x5
451 * 451 *
452 * @param[in] m 5x5 matrix with pixels 452 * @param[in] m 5x5 matrix with pixels
453 * 453 *
@@ -465,7 +465,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_12dB_nrm (
465STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_12dB_nrm ( 465STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_12dB_nrm (
466 const s_1w_5x5_matrix m); 466 const s_1w_5x5_matrix m);
467 467
468/** @brief Approximate averaging FIR 1x5 468/* @brief Approximate averaging FIR 1x5
469 * 469 *
470 * @param[in] m 1x5 matrix with pixels 470 * @param[in] m 1x5 matrix with pixels
471 * 471 *
@@ -479,7 +479,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_12dB_nrm (
479STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_box ( 479STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_box (
480 s_1w_1x5_matrix m); 480 s_1w_1x5_matrix m);
481 481
482/** @brief Approximate averaging FIR 1x9 482/* @brief Approximate averaging FIR 1x9
483 * 483 *
484 * @param[in] m 1x9 matrix with pixels 484 * @param[in] m 1x9 matrix with pixels
485 * 485 *
@@ -493,7 +493,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_box (
493STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x9m_box ( 493STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x9m_box (
494 s_1w_1x9_matrix m); 494 s_1w_1x9_matrix m);
495 495
496/** @brief Approximate averaging FIR 1x11 496/* @brief Approximate averaging FIR 1x11
497 * 497 *
498 * @param[in] m 1x11 matrix with pixels 498 * @param[in] m 1x11 matrix with pixels
499 * 499 *
@@ -507,7 +507,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x9m_box (
507STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x11m_box ( 507STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x11m_box (
508 s_1w_1x11_matrix m); 508 s_1w_1x11_matrix m);
509 509
510/** @brief Symmetric 7 tap filter with normalization 510/* @brief Symmetric 7 tap filter with normalization
511 * 511 *
512 * @param[in] in 1x7 matrix with pixels 512 * @param[in] in 1x7 matrix with pixels
513 * @param[in] coeff 1x4 matrix with coefficients 513 * @param[in] coeff 1x4 matrix with coefficients
@@ -528,7 +528,7 @@ fir1x7m_sym_nrm(s_1w_1x7_matrix in,
528 s_1w_1x4_matrix coeff, 528 s_1w_1x4_matrix coeff,
529 tvector1w out_shift); 529 tvector1w out_shift);
530 530
531/** @brief Symmetric 7 tap filter with normalization at input side 531/* @brief Symmetric 7 tap filter with normalization at input side
532 * 532 *
533 * @param[in] in 1x7 matrix with pixels 533 * @param[in] in 1x7 matrix with pixels
534 * @param[in] coeff 1x4 matrix with coefficients 534 * @param[in] coeff 1x4 matrix with coefficients
@@ -549,7 +549,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w
549fir1x7m_sym_innrm_approx(s_1w_1x7_matrix in, 549fir1x7m_sym_innrm_approx(s_1w_1x7_matrix in,
550 s_1w_1x4_matrix coeff); 550 s_1w_1x4_matrix coeff);
551 551
552/** @brief Symmetric 7 tap filter with normalization at output side 552/* @brief Symmetric 7 tap filter with normalization at output side
553 * 553 *
554 * @param[in] in 1x7 matrix with pixels 554 * @param[in] in 1x7 matrix with pixels
555 * @param[in] coeff 1x4 matrix with coefficients 555 * @param[in] coeff 1x4 matrix with coefficients
@@ -571,7 +571,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w
571fir1x7m_sym_outnrm_approx(s_1w_1x7_matrix in, 571fir1x7m_sym_outnrm_approx(s_1w_1x7_matrix in,
572 s_1w_1x4_matrix coeff); 572 s_1w_1x4_matrix coeff);
573 573
574/** @brief 4 tap filter with normalization 574/* @brief 4 tap filter with normalization
575 * 575 *
576 * @param[in] in 1x4 matrix with pixels 576 * @param[in] in 1x4 matrix with pixels
577 * @param[in] coeff 1x4 matrix with coefficients 577 * @param[in] coeff 1x4 matrix with coefficients
@@ -588,7 +588,7 @@ fir1x4m_nrm(s_1w_1x4_matrix in,
588 s_1w_1x4_matrix coeff, 588 s_1w_1x4_matrix coeff,
589 tvector1w out_shift); 589 tvector1w out_shift);
590 590
591/** @brief 4 tap filter with normalization for half pixel interpolation 591/* @brief 4 tap filter with normalization for half pixel interpolation
592 * 592 *
593 * @param[in] in 1x4 matrix with pixels 593 * @param[in] in 1x4 matrix with pixels
594 * 594 *
@@ -604,7 +604,7 @@ fir1x4m_nrm(s_1w_1x4_matrix in,
604STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w 604STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w
605fir1x4m_bicubic_bezier_half(s_1w_1x4_matrix in); 605fir1x4m_bicubic_bezier_half(s_1w_1x4_matrix in);
606 606
607/** @brief 4 tap filter with normalization for quarter pixel interpolation 607/* @brief 4 tap filter with normalization for quarter pixel interpolation
608 * 608 *
609 * @param[in] in 1x4 matrix with pixels 609 * @param[in] in 1x4 matrix with pixels
610 * @param[in] coeff 1x4 matrix with coefficients 610 * @param[in] coeff 1x4 matrix with coefficients
@@ -626,7 +626,7 @@ fir1x4m_bicubic_bezier_quarter(s_1w_1x4_matrix in,
626 s_1w_1x4_matrix coeff); 626 s_1w_1x4_matrix coeff);
627 627
628 628
629/** @brief Symmetric 3 tap filter with normalization 629/* @brief Symmetric 3 tap filter with normalization
630 * 630 *
631 * @param[in] in 1x3 matrix with pixels 631 * @param[in] in 1x3 matrix with pixels
632 * @param[in] coeff 1x2 matrix with coefficients 632 * @param[in] coeff 1x2 matrix with coefficients
@@ -646,7 +646,7 @@ fir1x3m_sym_nrm(s_1w_1x3_matrix in,
646 s_1w_1x2_matrix coeff, 646 s_1w_1x2_matrix coeff,
647 tvector1w out_shift); 647 tvector1w out_shift);
648 648
649/** @brief Symmetric 3 tap filter with normalization 649/* @brief Symmetric 3 tap filter with normalization
650 * 650 *
651 * @param[in] in 1x3 matrix with pixels 651 * @param[in] in 1x3 matrix with pixels
652 * @param[in] coeff 1x2 matrix with coefficients 652 * @param[in] coeff 1x2 matrix with coefficients
@@ -666,7 +666,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w
666fir1x3m_sym_nrm_approx(s_1w_1x3_matrix in, 666fir1x3m_sym_nrm_approx(s_1w_1x3_matrix in,
667 s_1w_1x2_matrix coeff); 667 s_1w_1x2_matrix coeff);
668 668
669/** @brief Mean of 1x3 matrix 669/* @brief Mean of 1x3 matrix
670 * 670 *
671 * @param[in] m 1x3 matrix with pixels 671 * @param[in] m 1x3 matrix with pixels
672 * 672 *
@@ -678,7 +678,7 @@ fir1x3m_sym_nrm_approx(s_1w_1x3_matrix in,
678STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x3m( 678STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x3m(
679 s_1w_1x3_matrix m); 679 s_1w_1x3_matrix m);
680 680
681/** @brief Mean of 3x3 matrix 681/* @brief Mean of 3x3 matrix
682 * 682 *
683 * @param[in] m 3x3 matrix with pixels 683 * @param[in] m 3x3 matrix with pixels
684 * 684 *
@@ -690,7 +690,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x3m(
690STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean3x3m( 690STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean3x3m(
691 s_1w_3x3_matrix m); 691 s_1w_3x3_matrix m);
692 692
693/** @brief Mean of 1x4 matrix 693/* @brief Mean of 1x4 matrix
694 * 694 *
695 * @param[in] m 1x4 matrix with pixels 695 * @param[in] m 1x4 matrix with pixels
696 * 696 *
@@ -701,7 +701,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean3x3m(
701STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x4m( 701STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x4m(
702 s_1w_1x4_matrix m); 702 s_1w_1x4_matrix m);
703 703
704/** @brief Mean of 4x4 matrix 704/* @brief Mean of 4x4 matrix
705 * 705 *
706 * @param[in] m 4x4 matrix with pixels 706 * @param[in] m 4x4 matrix with pixels
707 * 707 *
@@ -712,7 +712,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x4m(
712STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean4x4m( 712STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean4x4m(
713 s_1w_4x4_matrix m); 713 s_1w_4x4_matrix m);
714 714
715/** @brief Mean of 2x3 matrix 715/* @brief Mean of 2x3 matrix
716 * 716 *
717 * @param[in] m 2x3 matrix with pixels 717 * @param[in] m 2x3 matrix with pixels
718 * 718 *
@@ -724,7 +724,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean4x4m(
724STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean2x3m( 724STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean2x3m(
725 s_1w_2x3_matrix m); 725 s_1w_2x3_matrix m);
726 726
727/** @brief Mean of 1x5 matrix 727/* @brief Mean of 1x5 matrix
728 * 728 *
729 * @param[in] m 1x5 matrix with pixels 729 * @param[in] m 1x5 matrix with pixels
730 * 730 *
@@ -735,7 +735,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean2x3m(
735*/ 735*/
736STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x5m(s_1w_1x5_matrix m); 736STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x5m(s_1w_1x5_matrix m);
737 737
738/** @brief Mean of 1x6 matrix 738/* @brief Mean of 1x6 matrix
739 * 739 *
740 * @param[in] m 1x6 matrix with pixels 740 * @param[in] m 1x6 matrix with pixels
741 * 741 *
@@ -747,7 +747,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x5m(s_1w_1x5_matrix m);
747STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x6m( 747STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x6m(
748 s_1w_1x6_matrix m); 748 s_1w_1x6_matrix m);
749 749
750/** @brief Mean of 5x5 matrix 750/* @brief Mean of 5x5 matrix
751 * 751 *
752 * @param[in] m 5x5 matrix with pixels 752 * @param[in] m 5x5 matrix with pixels
753 * 753 *
@@ -759,7 +759,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x6m(
759STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean5x5m( 759STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean5x5m(
760 s_1w_5x5_matrix m); 760 s_1w_5x5_matrix m);
761 761
762/** @brief Mean of 6x6 matrix 762/* @brief Mean of 6x6 matrix
763 * 763 *
764 * @param[in] m 6x6 matrix with pixels 764 * @param[in] m 6x6 matrix with pixels
765 * 765 *
@@ -771,7 +771,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean5x5m(
771STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean6x6m( 771STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean6x6m(
772 s_1w_6x6_matrix m); 772 s_1w_6x6_matrix m);
773 773
774/** @brief Minimum of 4x4 matrix 774/* @brief Minimum of 4x4 matrix
775 * 775 *
776 * @param[in] m 4x4 matrix with pixels 776 * @param[in] m 4x4 matrix with pixels
777 * 777 *
@@ -783,7 +783,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean6x6m(
783STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w min4x4m( 783STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w min4x4m(
784 s_1w_4x4_matrix m); 784 s_1w_4x4_matrix m);
785 785
786/** @brief Maximum of 4x4 matrix 786/* @brief Maximum of 4x4 matrix
787 * 787 *
788 * @param[in] m 4x4 matrix with pixels 788 * @param[in] m 4x4 matrix with pixels
789 * 789 *
@@ -795,7 +795,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w min4x4m(
795STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w max4x4m( 795STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w max4x4m(
796 s_1w_4x4_matrix m); 796 s_1w_4x4_matrix m);
797 797
798/** @brief SAD between two 3x3 matrices 798/* @brief SAD between two 3x3 matrices
799 * 799 *
800 * @param[in] a 3x3 matrix with pixels 800 * @param[in] a 3x3 matrix with pixels
801 * 801 *
@@ -813,7 +813,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad3x3m_precise(
813 s_1w_3x3_matrix a, 813 s_1w_3x3_matrix a,
814 s_1w_3x3_matrix b); 814 s_1w_3x3_matrix b);
815 815
816/** @brief SAD between two 3x3 matrices 816/* @brief SAD between two 3x3 matrices
817 * 817 *
818 * @param[in] a 3x3 matrix with pixels 818 * @param[in] a 3x3 matrix with pixels
819 * 819 *
@@ -833,7 +833,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad3x3m(
833 s_1w_3x3_matrix a, 833 s_1w_3x3_matrix a,
834 s_1w_3x3_matrix b); 834 s_1w_3x3_matrix b);
835 835
836/** @brief SAD between two 5x5 matrices 836/* @brief SAD between two 5x5 matrices
837 * 837 *
838 * @param[in] a 5x5 matrix with pixels 838 * @param[in] a 5x5 matrix with pixels
839 * 839 *
@@ -847,7 +847,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad5x5m(
847 s_1w_5x5_matrix a, 847 s_1w_5x5_matrix a,
848 s_1w_5x5_matrix b); 848 s_1w_5x5_matrix b);
849 849
850/** @brief Absolute gradient between two sets of 1x5 matrices 850/* @brief Absolute gradient between two sets of 1x5 matrices
851 * 851 *
852 * @param[in] m0 first set of 1x5 matrix with pixels 852 * @param[in] m0 first set of 1x5 matrix with pixels
853 * @param[in] m1 second set of 1x5 matrix with pixels 853 * @param[in] m1 second set of 1x5 matrix with pixels
@@ -860,7 +860,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad5x5m(
860STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w 860STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w
861absgrad1x5m(s_1w_1x5_matrix m0, s_1w_1x5_matrix m1); 861absgrad1x5m(s_1w_1x5_matrix m0, s_1w_1x5_matrix m1);
862 862
863/** @brief Bi-linear Interpolation optimized(approximate) 863/* @brief Bi-linear Interpolation optimized(approximate)
864 * 864 *
865 * @param[in] a input0 865 * @param[in] a input0
866 * @param[in] b input1 866 * @param[in] b input1
@@ -882,7 +882,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_bilinear_interpol_approx_c(
882 tvector1w b, 882 tvector1w b,
883 tscalar1w_weight c); 883 tscalar1w_weight c);
884 884
885/** @brief Bi-linear Interpolation optimized(approximate) 885/* @brief Bi-linear Interpolation optimized(approximate)
886 * 886 *
887 * @param[in] a input0 887 * @param[in] a input0
888 * @param[in] b input1 888 * @param[in] b input1
@@ -904,7 +904,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_bilinear_interpol_approx(
904 tvector1w b, 904 tvector1w b,
905 tvector1w_weight c); 905 tvector1w_weight c);
906 906
907/** @brief Bi-linear Interpolation 907/* @brief Bi-linear Interpolation
908 * 908 *
909 * @param[in] a input0 909 * @param[in] a input0
910 * @param[in] b input1 910 * @param[in] b input1
@@ -925,7 +925,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_bilinear_interpol(
925 tvector1w b, 925 tvector1w b,
926 tscalar1w_weight c); 926 tscalar1w_weight c);
927 927
928/** @brief Generic Block Matching Algorithm 928/* @brief Generic Block Matching Algorithm
929 * @param[in] search_window pointer to input search window of 16x16 pixels 929 * @param[in] search_window pointer to input search window of 16x16 pixels
930 * @param[in] ref_block pointer to input reference block of 8x8 pixels, where N<=M 930 * @param[in] ref_block pointer to input reference block of 8x8 pixels, where N<=M
931 * @param[in] output pointer to output sads 931 * @param[in] output pointer to output sads
@@ -954,9 +954,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H int generic_block_matching_algorithm(
954 tscalar1w_4bit_bma_shift shift); 954 tscalar1w_4bit_bma_shift shift);
955 955
956#ifndef ISP2401 956#ifndef ISP2401
957/** @brief OP_1w_asp_bma_16_1_32way 957/* @brief OP_1w_asp_bma_16_1_32way
958#else 958#else
959/** @brief OP_1w_asp_bma_16_1_32way_nomask 959/* @brief OP_1w_asp_bma_16_1_32way_nomask
960#endif 960#endif
961 * 961 *
962 * @param[in] search_area input search window of 16x16 pixels 962 * @param[in] search_area input search window of 16x16 pixels
@@ -984,9 +984,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_16_1 OP_1w_asp_bma_16_1_32way_nomask(
984 tscalar1w_4bit_bma_shift shift); 984 tscalar1w_4bit_bma_shift shift);
985 985
986#ifndef ISP2401 986#ifndef ISP2401
987/** @brief OP_1w_asp_bma_16_2_32way 987/* @brief OP_1w_asp_bma_16_2_32way
988#else 988#else
989/** @brief OP_1w_asp_bma_16_2_32way_nomask 989/* @brief OP_1w_asp_bma_16_2_32way_nomask
990#endif 990#endif
991 * 991 *
992 * @param[in] search_area input search window of 16x16 pixels 992 * @param[in] search_area input search window of 16x16 pixels
@@ -1011,9 +1011,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_16_2 OP_1w_asp_bma_16_2_32way_nomask(
1011 ref_block_8x8 input_block, 1011 ref_block_8x8 input_block,
1012 tscalar1w_4bit_bma_shift shift); 1012 tscalar1w_4bit_bma_shift shift);
1013#ifndef ISP2401 1013#ifndef ISP2401
1014/** @brief OP_1w_asp_bma_14_1_32way 1014/* @brief OP_1w_asp_bma_14_1_32way
1015#else 1015#else
1016/** @brief OP_1w_asp_bma_14_1_32way_nomask 1016/* @brief OP_1w_asp_bma_14_1_32way_nomask
1017#endif 1017#endif
1018 * 1018 *
1019 * @param[in] search_area input search block of 16x16 pixels with search window of 14x14 pixels 1019 * @param[in] search_area input search block of 16x16 pixels with search window of 14x14 pixels
@@ -1041,9 +1041,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_14_1 OP_1w_asp_bma_14_1_32way_nomask(
1041 tscalar1w_4bit_bma_shift shift); 1041 tscalar1w_4bit_bma_shift shift);
1042 1042
1043#ifndef ISP2401 1043#ifndef ISP2401
1044/** @brief OP_1w_asp_bma_14_2_32way 1044/* @brief OP_1w_asp_bma_14_2_32way
1045#else 1045#else
1046/** @brief OP_1w_asp_bma_14_2_32way_nomask 1046/* @brief OP_1w_asp_bma_14_2_32way_nomask
1047#endif 1047#endif
1048 * 1048 *
1049 * @param[in] search_area input search block of 16x16 pixels with search window of 14x14 pixels 1049 * @param[in] search_area input search block of 16x16 pixels with search window of 14x14 pixels
@@ -1069,7 +1069,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_14_2 OP_1w_asp_bma_14_2_32way_nomask(
1069 tscalar1w_4bit_bma_shift shift); 1069 tscalar1w_4bit_bma_shift shift);
1070 1070
1071#ifdef ISP2401 1071#ifdef ISP2401
1072/** @brief multiplex addition and passing 1072/* @brief multiplex addition and passing
1073 * 1073 *
1074 * @param[in] _a first pixel 1074 * @param[in] _a first pixel
1075 * @param[in] _b second pixel 1075 * @param[in] _b second pixel
@@ -1087,7 +1087,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_cond_add(
1087 1087
1088#endif 1088#endif
1089#ifdef HAS_bfa_unit 1089#ifdef HAS_bfa_unit
1090/** @brief OP_1w_single_bfa_7x7 1090/* @brief OP_1w_single_bfa_7x7
1091 * 1091 *
1092 * @param[in] weights - spatial and range weight lut 1092 * @param[in] weights - spatial and range weight lut
1093 * @param[in] threshold - threshold plane, for range weight scaling 1093 * @param[in] threshold - threshold plane, for range weight scaling
@@ -1115,7 +1115,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bfa_7x7_output OP_1w_single_bfa_7x7(
1115 tvector1w central_pix, 1115 tvector1w central_pix,
1116 s_1w_7x7_matrix src_plane); 1116 s_1w_7x7_matrix src_plane);
1117 1117
1118/** @brief OP_1w_joint_bfa_7x7 1118/* @brief OP_1w_joint_bfa_7x7
1119 * 1119 *
1120 * @param[in] weights - spatial and range weight lut 1120 * @param[in] weights - spatial and range weight lut
1121 * @param[in] threshold0 - 1st threshold plane, for range weight scaling 1121 * @param[in] threshold0 - 1st threshold plane, for range weight scaling
@@ -1149,7 +1149,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bfa_7x7_output OP_1w_joint_bfa_7x7(
1149 tvector1w central_pix1, 1149 tvector1w central_pix1,
1150 s_1w_7x7_matrix src1_plane); 1150 s_1w_7x7_matrix src1_plane);
1151 1151
1152/** @brief bbb_bfa_gen_spatial_weight_lut 1152/* @brief bbb_bfa_gen_spatial_weight_lut
1153 * 1153 *
1154 * @param[in] in - 7x7 matrix of spatial weights 1154 * @param[in] in - 7x7 matrix of spatial weights
1155 * @param[in] out - generated LUT 1155 * @param[in] out - generated LUT
@@ -1163,7 +1163,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H void bbb_bfa_gen_spatial_weight_lut(
1163 s_1w_7x7_matrix in, 1163 s_1w_7x7_matrix in,
1164 tvector1w out[BFA_MAX_KWAY]); 1164 tvector1w out[BFA_MAX_KWAY]);
1165 1165
1166/** @brief bbb_bfa_gen_range_weight_lut 1166/* @brief bbb_bfa_gen_range_weight_lut
1167 * 1167 *
1168 * @param[in] in - input range weight, 1168 * @param[in] in - input range weight,
1169 * @param[in] out - generated LUT 1169 * @param[in] out - generated LUT
@@ -1184,7 +1184,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H void bbb_bfa_gen_range_weight_lut(
1184#endif 1184#endif
1185 1185
1186#ifdef ISP2401 1186#ifdef ISP2401
1187/** @brief OP_1w_imax32 1187/* @brief OP_1w_imax32
1188 * 1188 *
1189 * @param[in] src - structure that holds an array of 32 elements. 1189 * @param[in] src - structure that holds an array of 32 elements.
1190 * 1190 *
@@ -1195,7 +1195,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H void bbb_bfa_gen_range_weight_lut(
1195STORAGE_CLASS_REF_VECTOR_FUNC_H int OP_1w_imax32( 1195STORAGE_CLASS_REF_VECTOR_FUNC_H int OP_1w_imax32(
1196 imax32_ref_in_vector src); 1196 imax32_ref_in_vector src);
1197 1197
1198/** @brief OP_1w_imaxidx32 1198/* @brief OP_1w_imaxidx32
1199 * 1199 *
1200 * @param[in] src - structure that holds a vector of elements. 1200 * @param[in] src - structure that holds a vector of elements.
1201 * 1201 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h
index e85e5c889c15..6436dae0007e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h
@@ -168,7 +168,7 @@ static inline unsigned int round_half_down_mul(unsigned int a, unsigned int b)
168} 168}
169#endif 169#endif
170 170
171/** @brief Next Power of Two 171/* @brief Next Power of Two
172 * 172 *
173 * @param[in] unsigned number 173 * @param[in] unsigned number
174 * 174 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
index d80437c58bde..f4d9674cdab6 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25 25
26/** @brief Copy from src_buf to dest_buf. 26/* @brief Copy from src_buf to dest_buf.
27 * 27 *
28 * @param[out] dest_buf. Destination buffer to copy to 28 * @param[out] dest_buf. Destination buffer to copy to
29 * @param[in] dest_size. The size of the destination buffer in bytes 29 * @param[in] dest_size. The size of the destination buffer in bytes
@@ -53,7 +53,7 @@ static inline int memcpy_s(
53 return 0; 53 return 0;
54} 54}
55 55
56/** @brief Get the length of the string, excluding the null terminator 56/* @brief Get the length of the string, excluding the null terminator
57 * 57 *
58 * @param[in] src_str. The source string 58 * @param[in] src_str. The source string
59 * @param[in] max_len. Look only for max_len bytes in the string 59 * @param[in] max_len. Look only for max_len bytes in the string
@@ -78,7 +78,7 @@ static size_t strnlen_s(
78 return ix; 78 return ix;
79} 79}
80 80
81/** @brief Copy string from src_str to dest_str 81/* @brief Copy string from src_str to dest_str
82 * 82 *
83 * @param[out] dest_str. Destination buffer to copy to 83 * @param[out] dest_str. Destination buffer to copy to
84 * @param[in] dest_size. The size of the destination buffer in bytes 84 * @param[in] dest_size. The size of the destination buffer in bytes
@@ -120,7 +120,7 @@ static inline int strncpy_s(
120 return 0; 120 return 0;
121} 121}
122 122
123/** @brief Copy string from src_str to dest_str 123/* @brief Copy string from src_str to dest_str
124 * 124 *
125 * @param[out] dest_str. Destination buffer to copy to 125 * @param[out] dest_str. Destination buffer to copy to
126 * @param[in] dest_size. The size of the destination buffer in bytes 126 * @param[in] dest_size. The size of the destination buffer in bytes
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c
index 9aa8c168a803..2cf1d58941bf 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c
@@ -17,7 +17,7 @@
17#include <assert_support.h> 17#include <assert_support.h>
18#include "tag_local.h" 18#include "tag_local.h"
19 19
20/** 20/*
21 * @brief Creates the tag description from the given parameters. 21 * @brief Creates the tag description from the given parameters.
22 * @param[in] num_captures 22 * @param[in] num_captures
23 * @param[in] skip 23 * @param[in] skip
@@ -39,7 +39,7 @@ sh_css_create_tag_descr(int num_captures,
39 tag_descr->exp_id = exp_id; 39 tag_descr->exp_id = exp_id;
40} 40}
41 41
42/** 42/*
43 * @brief Encodes the members of tag description into a 32-bit value. 43 * @brief Encodes the members of tag description into a 32-bit value.
44 * @param[in] tag Pointer to the tag description 44 * @param[in] tag Pointer to the tag description
45 * @return (unsigned int) Encoded 32-bit tag-info 45 * @return (unsigned int) Encoded 32-bit tag-info
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h
index 2458b3767c90..e44df6916d90 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h
@@ -16,7 +16,7 @@
16#ifndef _IA_CSS_H_ 16#ifndef _IA_CSS_H_
17#define _IA_CSS_H_ 17#define _IA_CSS_H_
18 18
19/** @file 19/* @file
20 * This file is the starting point of the CSS-API. It includes all CSS-API 20 * This file is the starting point of the CSS-API. It includes all CSS-API
21 * header files. 21 * header files.
22 */ 22 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h
index a80a7dbaf712..080198796ad0 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_3A_H 15#ifndef __IA_CSS_3A_H
16#define __IA_CSS_3A_H 16#define __IA_CSS_3A_H
17 17
18/** @file 18/* @file
19 * This file contains types used for 3A statistics 19 * This file contains types used for 3A statistics
20 */ 20 */
21 21
@@ -31,7 +31,7 @@ enum ia_css_3a_tables {
31 IA_CSS_NUM_3A_TABLES 31 IA_CSS_NUM_3A_TABLES
32}; 32};
33 33
34/** Structure that holds 3A statistics in the ISP internal 34/* Structure that holds 3A statistics in the ISP internal
35 * format. Use ia_css_get_3a_statistics() to translate 35 * format. Use ia_css_get_3a_statistics() to translate
36 * this to the format used on the host (3A library). 36 * this to the format used on the host (3A library).
37 * */ 37 * */
@@ -48,13 +48,13 @@ struct ia_css_isp_3a_statistics {
48 struct { 48 struct {
49 ia_css_ptr rgby_tbl; 49 ia_css_ptr rgby_tbl;
50 } data_hmem; 50 } data_hmem;
51 uint32_t exp_id; /**< exposure id, to match statistics to a frame, 51 uint32_t exp_id; /** exposure id, to match statistics to a frame,
52 see ia_css_event_public.h for more detail. */ 52 see ia_css_event_public.h for more detail. */
53 uint32_t isp_config_id;/**< Unique ID to track which config was actually applied to a particular frame */ 53 uint32_t isp_config_id;/** Unique ID to track which config was actually applied to a particular frame */
54 ia_css_ptr data_ptr; /**< pointer to base of all data */ 54 ia_css_ptr data_ptr; /** pointer to base of all data */
55 uint32_t size; /**< total size of all data */ 55 uint32_t size; /** total size of all data */
56 uint32_t dmem_size; 56 uint32_t dmem_size;
57 uint32_t vmem_size; /**< both lo and hi have this size */ 57 uint32_t vmem_size; /** both lo and hi have this size */
58 uint32_t hmem_size; 58 uint32_t hmem_size;
59}; 59};
60#define SIZE_OF_DMEM_STRUCT \ 60#define SIZE_OF_DMEM_STRUCT \
@@ -77,7 +77,7 @@ struct ia_css_isp_3a_statistics {
77 SIZE_OF_IA_CSS_PTR + \ 77 SIZE_OF_IA_CSS_PTR + \
78 4 * sizeof(uint32_t)) 78 4 * sizeof(uint32_t))
79 79
80/** Map with host-side pointers to ISP-format statistics. 80/* Map with host-side pointers to ISP-format statistics.
81 * These pointers can either be copies of ISP data or memory mapped 81 * These pointers can either be copies of ISP data or memory mapped
82 * ISP pointers. 82 * ISP pointers.
83 * All of the data behind these pointers is allocated contiguously, the 83 * All of the data behind these pointers is allocated contiguously, the
@@ -85,17 +85,17 @@ struct ia_css_isp_3a_statistics {
85 * point into this one block of data. 85 * point into this one block of data.
86 */ 86 */
87struct ia_css_isp_3a_statistics_map { 87struct ia_css_isp_3a_statistics_map {
88 void *data_ptr; /**< Pointer to start of memory */ 88 void *data_ptr; /** Pointer to start of memory */
89 struct ia_css_3a_output *dmem_stats; 89 struct ia_css_3a_output *dmem_stats;
90 uint16_t *vmem_stats_hi; 90 uint16_t *vmem_stats_hi;
91 uint16_t *vmem_stats_lo; 91 uint16_t *vmem_stats_lo;
92 struct ia_css_bh_table *hmem_stats; 92 struct ia_css_bh_table *hmem_stats;
93 uint32_t size; /**< total size in bytes of data_ptr */ 93 uint32_t size; /** total size in bytes of data_ptr */
94 uint32_t data_allocated; /**< indicate whether data_ptr 94 uint32_t data_allocated; /** indicate whether data_ptr
95 was allocated or not. */ 95 was allocated or not. */
96}; 96};
97 97
98/** @brief Copy and translate 3A statistics from an ISP buffer to a host buffer 98/* @brief Copy and translate 3A statistics from an ISP buffer to a host buffer
99 * @param[out] host_stats Host buffer. 99 * @param[out] host_stats Host buffer.
100 * @param[in] isp_stats ISP buffer. 100 * @param[in] isp_stats ISP buffer.
101 * @return error value if temporary memory cannot be allocated 101 * @return error value if temporary memory cannot be allocated
@@ -109,7 +109,7 @@ enum ia_css_err
109ia_css_get_3a_statistics(struct ia_css_3a_statistics *host_stats, 109ia_css_get_3a_statistics(struct ia_css_3a_statistics *host_stats,
110 const struct ia_css_isp_3a_statistics *isp_stats); 110 const struct ia_css_isp_3a_statistics *isp_stats);
111 111
112/** @brief Translate 3A statistics from ISP format to host format. 112/* @brief Translate 3A statistics from ISP format to host format.
113 * @param[out] host_stats host-format statistics 113 * @param[out] host_stats host-format statistics
114 * @param[in] isp_stats ISP-format statistics 114 * @param[in] isp_stats ISP-format statistics
115 * @return None 115 * @return None
@@ -125,35 +125,35 @@ ia_css_translate_3a_statistics(
125 125
126/* Convenience functions for alloc/free of certain datatypes */ 126/* Convenience functions for alloc/free of certain datatypes */
127 127
128/** @brief Allocate memory for the 3a statistics on the ISP 128/* @brief Allocate memory for the 3a statistics on the ISP
129 * @param[in] grid The grid. 129 * @param[in] grid The grid.
130 * @return Pointer to the allocated 3a statistics buffer on the ISP 130 * @return Pointer to the allocated 3a statistics buffer on the ISP
131*/ 131*/
132struct ia_css_isp_3a_statistics * 132struct ia_css_isp_3a_statistics *
133ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid); 133ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid);
134 134
135/** @brief Free the 3a statistics memory on the isp 135/* @brief Free the 3a statistics memory on the isp
136 * @param[in] me Pointer to the 3a statistics buffer on the ISP. 136 * @param[in] me Pointer to the 3a statistics buffer on the ISP.
137 * @return None 137 * @return None
138*/ 138*/
139void 139void
140ia_css_isp_3a_statistics_free(struct ia_css_isp_3a_statistics *me); 140ia_css_isp_3a_statistics_free(struct ia_css_isp_3a_statistics *me);
141 141
142/** @brief Allocate memory for the 3a statistics on the host 142/* @brief Allocate memory for the 3a statistics on the host
143 * @param[in] grid The grid. 143 * @param[in] grid The grid.
144 * @return Pointer to the allocated 3a statistics buffer on the host 144 * @return Pointer to the allocated 3a statistics buffer on the host
145*/ 145*/
146struct ia_css_3a_statistics * 146struct ia_css_3a_statistics *
147ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid); 147ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid);
148 148
149/** @brief Free the 3a statistics memory on the host 149/* @brief Free the 3a statistics memory on the host
150 * @param[in] me Pointer to the 3a statistics buffer on the host. 150 * @param[in] me Pointer to the 3a statistics buffer on the host.
151 * @return None 151 * @return None
152 */ 152 */
153void 153void
154ia_css_3a_statistics_free(struct ia_css_3a_statistics *me); 154ia_css_3a_statistics_free(struct ia_css_3a_statistics *me);
155 155
156/** @brief Allocate a 3a statistics map structure 156/* @brief Allocate a 3a statistics map structure
157 * @param[in] isp_stats pointer to ISP 3a statistis struct 157 * @param[in] isp_stats pointer to ISP 3a statistis struct
158 * @param[in] data_ptr host-side pointer to ISP 3a statistics. 158 * @param[in] data_ptr host-side pointer to ISP 3a statistics.
159 * @return Pointer to the allocated 3a statistics map 159 * @return Pointer to the allocated 3a statistics map
@@ -174,7 +174,7 @@ ia_css_isp_3a_statistics_map_allocate(
174 const struct ia_css_isp_3a_statistics *isp_stats, 174 const struct ia_css_isp_3a_statistics *isp_stats,
175 void *data_ptr); 175 void *data_ptr);
176 176
177/** @brief Free the 3a statistics map 177/* @brief Free the 3a statistics map
178 * @param[in] me Pointer to the 3a statistics map 178 * @param[in] me Pointer to the 3a statistics map
179 * @return None 179 * @return None
180 * 180 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h
index a2a1873aca83..138bc3bb4627 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h
@@ -15,7 +15,7 @@
15#ifndef _IA_CSS_ACC_TYPES_H 15#ifndef _IA_CSS_ACC_TYPES_H
16#define _IA_CSS_ACC_TYPES_H 16#define _IA_CSS_ACC_TYPES_H
17 17
18/** @file 18/* @file
19 * This file contains types used for acceleration 19 * This file contains types used for acceleration
20 */ 20 */
21 21
@@ -40,16 +40,16 @@
40 * in the kernel and HAL. 40 * in the kernel and HAL.
41*/ 41*/
42 42
43/** Type of acceleration. 43/* Type of acceleration.
44 */ 44 */
45enum ia_css_acc_type { 45enum ia_css_acc_type {
46 IA_CSS_ACC_NONE, /**< Normal binary */ 46 IA_CSS_ACC_NONE, /** Normal binary */
47 IA_CSS_ACC_OUTPUT, /**< Accelerator stage on output frame */ 47 IA_CSS_ACC_OUTPUT, /** Accelerator stage on output frame */
48 IA_CSS_ACC_VIEWFINDER, /**< Accelerator stage on viewfinder frame */ 48 IA_CSS_ACC_VIEWFINDER, /** Accelerator stage on viewfinder frame */
49 IA_CSS_ACC_STANDALONE, /**< Stand-alone acceleration */ 49 IA_CSS_ACC_STANDALONE, /** Stand-alone acceleration */
50}; 50};
51 51
52/** Cells types 52/* Cells types
53 */ 53 */
54enum ia_css_cell_type { 54enum ia_css_cell_type {
55 IA_CSS_SP0 = 0, 55 IA_CSS_SP0 = 0,
@@ -58,45 +58,45 @@ enum ia_css_cell_type {
58 MAX_NUM_OF_CELLS 58 MAX_NUM_OF_CELLS
59}; 59};
60 60
61/** Firmware types. 61/* Firmware types.
62 */ 62 */
63enum ia_css_fw_type { 63enum ia_css_fw_type {
64 ia_css_sp_firmware, /**< Firmware for the SP */ 64 ia_css_sp_firmware, /** Firmware for the SP */
65 ia_css_isp_firmware, /**< Firmware for the ISP */ 65 ia_css_isp_firmware, /** Firmware for the ISP */
66 ia_css_bootloader_firmware, /**< Firmware for the BootLoader */ 66 ia_css_bootloader_firmware, /** Firmware for the BootLoader */
67 ia_css_acc_firmware /**< Firmware for accelrations */ 67 ia_css_acc_firmware /** Firmware for accelrations */
68}; 68};
69 69
70struct ia_css_blob_descr; 70struct ia_css_blob_descr;
71 71
72/** Blob descriptor. 72/* Blob descriptor.
73 * This structure describes an SP or ISP blob. 73 * This structure describes an SP or ISP blob.
74 * It describes the test, data and bss sections as well as position in a 74 * It describes the test, data and bss sections as well as position in a
75 * firmware file. 75 * firmware file.
76 * For convenience, it contains dynamic data after loading. 76 * For convenience, it contains dynamic data after loading.
77 */ 77 */
78struct ia_css_blob_info { 78struct ia_css_blob_info {
79 /**< Static blob data */ 79 /** Static blob data */
80 uint32_t offset; /**< Blob offset in fw file */ 80 uint32_t offset; /** Blob offset in fw file */
81 struct ia_css_isp_param_memory_offsets memory_offsets; /**< offset wrt hdr in bytes */ 81 struct ia_css_isp_param_memory_offsets memory_offsets; /** offset wrt hdr in bytes */
82 uint32_t prog_name_offset; /**< offset wrt hdr in bytes */ 82 uint32_t prog_name_offset; /** offset wrt hdr in bytes */
83 uint32_t size; /**< Size of blob */ 83 uint32_t size; /** Size of blob */
84 uint32_t padding_size; /**< total cummulative of bytes added due to section alignment */ 84 uint32_t padding_size; /** total cummulative of bytes added due to section alignment */
85 uint32_t icache_source; /**< Position of icache in blob */ 85 uint32_t icache_source; /** Position of icache in blob */
86 uint32_t icache_size; /**< Size of icache section */ 86 uint32_t icache_size; /** Size of icache section */
87 uint32_t icache_padding;/**< bytes added due to icache section alignment */ 87 uint32_t icache_padding;/** bytes added due to icache section alignment */
88 uint32_t text_source; /**< Position of text in blob */ 88 uint32_t text_source; /** Position of text in blob */
89 uint32_t text_size; /**< Size of text section */ 89 uint32_t text_size; /** Size of text section */
90 uint32_t text_padding; /**< bytes added due to text section alignment */ 90 uint32_t text_padding; /** bytes added due to text section alignment */
91 uint32_t data_source; /**< Position of data in blob */ 91 uint32_t data_source; /** Position of data in blob */
92 uint32_t data_target; /**< Start of data in SP dmem */ 92 uint32_t data_target; /** Start of data in SP dmem */
93 uint32_t data_size; /**< Size of text section */ 93 uint32_t data_size; /** Size of text section */
94 uint32_t data_padding; /**< bytes added due to data section alignment */ 94 uint32_t data_padding; /** bytes added due to data section alignment */
95 uint32_t bss_target; /**< Start position of bss in SP dmem */ 95 uint32_t bss_target; /** Start position of bss in SP dmem */
96 uint32_t bss_size; /**< Size of bss section */ 96 uint32_t bss_size; /** Size of bss section */
97 /**< Dynamic data filled by loader */ 97 /** Dynamic data filled by loader */
98 CSS_ALIGN(const void *code, 8); /**< Code section absolute pointer within fw, code = icache + text */ 98 CSS_ALIGN(const void *code, 8); /** Code section absolute pointer within fw, code = icache + text */
99 CSS_ALIGN(const void *data, 8); /**< Data section absolute pointer within fw, data = data + bss */ 99 CSS_ALIGN(const void *data, 8); /** Data section absolute pointer within fw, data = data + bss */
100}; 100};
101 101
102struct ia_css_binary_input_info { 102struct ia_css_binary_input_info {
@@ -140,9 +140,9 @@ struct ia_css_binary_s3a_info {
140 uint32_t fixed_s3a_deci_log; 140 uint32_t fixed_s3a_deci_log;
141}; 141};
142 142
143/** DPC related binary info */ 143/* DPC related binary info */
144struct ia_css_binary_dpc_info { 144struct ia_css_binary_dpc_info {
145 uint32_t bnr_lite; /**< bnr lite enable flag */ 145 uint32_t bnr_lite; /** bnr lite enable flag */
146}; 146};
147 147
148struct ia_css_binary_iterator_info { 148struct ia_css_binary_iterator_info {
@@ -193,7 +193,7 @@ struct ia_css_binary_block_info {
193 uint32_t output_block_height; 193 uint32_t output_block_height;
194}; 194};
195 195
196/** Structure describing an ISP binary. 196/* Structure describing an ISP binary.
197 * It describes the capabilities of a binary, like the maximum resolution, 197 * It describes the capabilities of a binary, like the maximum resolution,
198 * support features, dma channels, uds features, etc. 198 * support features, dma channels, uds features, etc.
199 * This part is to be used by the SP. 199 * This part is to be used by the SP.
@@ -210,7 +210,7 @@ struct ia_css_binary_info {
210 struct ia_css_binary_dvs_info dvs; 210 struct ia_css_binary_dvs_info dvs;
211 struct ia_css_binary_vf_dec_info vf_dec; 211 struct ia_css_binary_vf_dec_info vf_dec;
212 struct ia_css_binary_s3a_info s3a; 212 struct ia_css_binary_s3a_info s3a;
213 struct ia_css_binary_dpc_info dpc_bnr; /**< DPC related binary info */ 213 struct ia_css_binary_dpc_info dpc_bnr; /** DPC related binary info */
214 struct ia_css_binary_iterator_info iterator; 214 struct ia_css_binary_iterator_info iterator;
215 struct ia_css_binary_address_info addresses; 215 struct ia_css_binary_address_info addresses;
216 struct ia_css_binary_uds_info uds; 216 struct ia_css_binary_uds_info uds;
@@ -269,7 +269,7 @@ struct ia_css_binary_info {
269 } dma; 269 } dma;
270}; 270};
271 271
272/** Structure describing an ISP binary. 272/* Structure describing an ISP binary.
273 * It describes the capabilities of a binary, like the maximum resolution, 273 * It describes the capabilities of a binary, like the maximum resolution,
274 * support features, dma channels, uds features, etc. 274 * support features, dma channels, uds features, etc.
275 */ 275 */
@@ -281,8 +281,8 @@ struct ia_css_binary_xinfo {
281 enum ia_css_acc_type type; 281 enum ia_css_acc_type type;
282 CSS_ALIGN(int32_t num_output_formats, 8); 282 CSS_ALIGN(int32_t num_output_formats, 8);
283 enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM]; 283 enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM];
284 CSS_ALIGN(int32_t num_vf_formats, 8); /**< number of supported vf formats */ 284 CSS_ALIGN(int32_t num_vf_formats, 8); /** number of supported vf formats */
285 enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /**< types of supported vf formats */ 285 enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
286 uint8_t num_output_pins; 286 uint8_t num_output_pins;
287 ia_css_ptr xmem_addr; 287 ia_css_ptr xmem_addr;
288 CSS_ALIGN(const struct ia_css_blob_descr *blob, 8); 288 CSS_ALIGN(const struct ia_css_blob_descr *blob, 8);
@@ -291,55 +291,55 @@ struct ia_css_binary_xinfo {
291 CSS_ALIGN(struct ia_css_binary_xinfo *next, 8); 291 CSS_ALIGN(struct ia_css_binary_xinfo *next, 8);
292}; 292};
293 293
294/** Structure describing the Bootloader (an ISP binary). 294/* Structure describing the Bootloader (an ISP binary).
295 * It contains several address, either in ddr, isp_dmem or 295 * It contains several address, either in ddr, isp_dmem or
296 * the entry function in icache. 296 * the entry function in icache.
297 */ 297 */
298struct ia_css_bl_info { 298struct ia_css_bl_info {
299 uint32_t num_dma_cmds; /**< Number of cmds sent by CSS */ 299 uint32_t num_dma_cmds; /** Number of cmds sent by CSS */
300 uint32_t dma_cmd_list; /**< Dma command list sent by CSS */ 300 uint32_t dma_cmd_list; /** Dma command list sent by CSS */
301 uint32_t sw_state; /**< Polled from css */ 301 uint32_t sw_state; /** Polled from css */
302 /* Entry functions */ 302 /* Entry functions */
303 uint32_t bl_entry; /**< The SP entry function */ 303 uint32_t bl_entry; /** The SP entry function */
304}; 304};
305 305
306/** Structure describing the SP binary. 306/* Structure describing the SP binary.
307 * It contains several address, either in ddr, sp_dmem or 307 * It contains several address, either in ddr, sp_dmem or
308 * the entry function in pmem. 308 * the entry function in pmem.
309 */ 309 */
310struct ia_css_sp_info { 310struct ia_css_sp_info {
311 uint32_t init_dmem_data; /**< data sect config, stored to dmem */ 311 uint32_t init_dmem_data; /** data sect config, stored to dmem */
312 uint32_t per_frame_data; /**< Per frame data, stored to dmem */ 312 uint32_t per_frame_data; /** Per frame data, stored to dmem */
313 uint32_t group; /**< Per pipeline data, loaded by dma */ 313 uint32_t group; /** Per pipeline data, loaded by dma */
314 uint32_t output; /**< SP output data, loaded by dmem */ 314 uint32_t output; /** SP output data, loaded by dmem */
315 uint32_t host_sp_queue; /**< Host <-> SP queues */ 315 uint32_t host_sp_queue; /** Host <-> SP queues */
316 uint32_t host_sp_com;/**< Host <-> SP commands */ 316 uint32_t host_sp_com;/** Host <-> SP commands */
317 uint32_t isp_started; /**< Polled from sensor thread, csim only */ 317 uint32_t isp_started; /** Polled from sensor thread, csim only */
318 uint32_t sw_state; /**< Polled from css */ 318 uint32_t sw_state; /** Polled from css */
319 uint32_t host_sp_queues_initialized; /**< Polled from the SP */ 319 uint32_t host_sp_queues_initialized; /** Polled from the SP */
320 uint32_t sleep_mode; /**< different mode to halt SP */ 320 uint32_t sleep_mode; /** different mode to halt SP */
321 uint32_t invalidate_tlb; /**< inform SP to invalidate mmu TLB */ 321 uint32_t invalidate_tlb; /** inform SP to invalidate mmu TLB */
322#ifndef ISP2401 322#ifndef ISP2401
323 uint32_t stop_copy_preview; /**< suspend copy and preview pipe when capture */ 323 uint32_t stop_copy_preview; /** suspend copy and preview pipe when capture */
324#endif 324#endif
325 uint32_t debug_buffer_ddr_address; /**< inform SP the address 325 uint32_t debug_buffer_ddr_address; /** inform SP the address
326 of DDR debug queue */ 326 of DDR debug queue */
327 uint32_t perf_counter_input_system_error; /**< input system perf 327 uint32_t perf_counter_input_system_error; /** input system perf
328 counter array */ 328 counter array */
329#ifdef HAS_WATCHDOG_SP_THREAD_DEBUG 329#ifdef HAS_WATCHDOG_SP_THREAD_DEBUG
330 uint32_t debug_wait; /**< thread/pipe post mortem debug */ 330 uint32_t debug_wait; /** thread/pipe post mortem debug */
331 uint32_t debug_stage; /**< thread/pipe post mortem debug */ 331 uint32_t debug_stage; /** thread/pipe post mortem debug */
332 uint32_t debug_stripe; /**< thread/pipe post mortem debug */ 332 uint32_t debug_stripe; /** thread/pipe post mortem debug */
333#endif 333#endif
334 uint32_t threads_stack; /**< sp thread's stack pointers */ 334 uint32_t threads_stack; /** sp thread's stack pointers */
335 uint32_t threads_stack_size; /**< sp thread's stack sizes */ 335 uint32_t threads_stack_size; /** sp thread's stack sizes */
336 uint32_t curr_binary_id; /**< current binary id */ 336 uint32_t curr_binary_id; /** current binary id */
337 uint32_t raw_copy_line_count; /**< raw copy line counter */ 337 uint32_t raw_copy_line_count; /** raw copy line counter */
338 uint32_t ddr_parameter_address; /**< acc param ddrptr, sp dmem */ 338 uint32_t ddr_parameter_address; /** acc param ddrptr, sp dmem */
339 uint32_t ddr_parameter_size; /**< acc param size, sp dmem */ 339 uint32_t ddr_parameter_size; /** acc param size, sp dmem */
340 /* Entry functions */ 340 /* Entry functions */
341 uint32_t sp_entry; /**< The SP entry function */ 341 uint32_t sp_entry; /** The SP entry function */
342 uint32_t tagger_frames_addr; /**< Base address of tagger state */ 342 uint32_t tagger_frames_addr; /** Base address of tagger state */
343}; 343};
344 344
345/* The following #if is there because this header file is also included 345/* The following #if is there because this header file is also included
@@ -348,37 +348,37 @@ struct ia_css_sp_info {
348 More permanent solution will be to refactor this include. 348 More permanent solution will be to refactor this include.
349*/ 349*/
350#if !defined(__ISP) 350#if !defined(__ISP)
351/** Accelerator firmware information. 351/* Accelerator firmware information.
352 */ 352 */
353struct ia_css_acc_info { 353struct ia_css_acc_info {
354 uint32_t per_frame_data; /**< Dummy for now */ 354 uint32_t per_frame_data; /** Dummy for now */
355}; 355};
356 356
357/** Firmware information. 357/* Firmware information.
358 */ 358 */
359union ia_css_fw_union { 359union ia_css_fw_union {
360 struct ia_css_binary_xinfo isp; /**< ISP info */ 360 struct ia_css_binary_xinfo isp; /** ISP info */
361 struct ia_css_sp_info sp; /**< SP info */ 361 struct ia_css_sp_info sp; /** SP info */
362 struct ia_css_bl_info bl; /**< Bootloader info */ 362 struct ia_css_bl_info bl; /** Bootloader info */
363 struct ia_css_acc_info acc; /**< Accelerator info */ 363 struct ia_css_acc_info acc; /** Accelerator info */
364}; 364};
365 365
366/** Firmware information. 366/* Firmware information.
367 */ 367 */
368struct ia_css_fw_info { 368struct ia_css_fw_info {
369 size_t header_size; /**< size of fw header */ 369 size_t header_size; /** size of fw header */
370 CSS_ALIGN(uint32_t type, 8); 370 CSS_ALIGN(uint32_t type, 8);
371 union ia_css_fw_union info; /**< Binary info */ 371 union ia_css_fw_union info; /** Binary info */
372 struct ia_css_blob_info blob; /**< Blob info */ 372 struct ia_css_blob_info blob; /** Blob info */
373 /* Dynamic part */ 373 /* Dynamic part */
374 struct ia_css_fw_info *next; 374 struct ia_css_fw_info *next;
375 CSS_ALIGN(uint32_t loaded, 8); /**< Firmware has been loaded */ 375 CSS_ALIGN(uint32_t loaded, 8); /** Firmware has been loaded */
376 CSS_ALIGN(const uint8_t *isp_code, 8); /**< ISP pointer to code */ 376 CSS_ALIGN(const uint8_t *isp_code, 8); /** ISP pointer to code */
377 /**< Firmware handle between user space and kernel */ 377 /** Firmware handle between user space and kernel */
378 CSS_ALIGN(uint32_t handle, 8); 378 CSS_ALIGN(uint32_t handle, 8);
379 /**< Sections to copy from/to ISP */ 379 /** Sections to copy from/to ISP */
380 struct ia_css_isp_param_css_segments mem_initializers; 380 struct ia_css_isp_param_css_segments mem_initializers;
381 /**< Initializer for local ISP memories */ 381 /** Initializer for local ISP memories */
382}; 382};
383 383
384struct ia_css_blob_descr { 384struct ia_css_blob_descr {
@@ -390,39 +390,39 @@ struct ia_css_blob_descr {
390 390
391struct ia_css_acc_fw; 391struct ia_css_acc_fw;
392 392
393/** Structure describing the SP binary of a stand-alone accelerator. 393/* Structure describing the SP binary of a stand-alone accelerator.
394 */ 394 */
395struct ia_css_acc_sp { 395struct ia_css_acc_sp {
396 void (*init)(struct ia_css_acc_fw *); /**< init for crun */ 396 void (*init)(struct ia_css_acc_fw *); /** init for crun */
397 uint32_t sp_prog_name_offset; /**< program name offset wrt hdr in bytes */ 397 uint32_t sp_prog_name_offset; /** program name offset wrt hdr in bytes */
398 uint32_t sp_blob_offset; /**< blob offset wrt hdr in bytes */ 398 uint32_t sp_blob_offset; /** blob offset wrt hdr in bytes */
399 void *entry; /**< Address of sp entry point */ 399 void *entry; /** Address of sp entry point */
400 uint32_t *css_abort; /**< SP dmem abort flag */ 400 uint32_t *css_abort; /** SP dmem abort flag */
401 void *isp_code; /**< SP dmem address holding xmem 401 void *isp_code; /** SP dmem address holding xmem
402 address of isp code */ 402 address of isp code */
403 struct ia_css_fw_info fw; /**< SP fw descriptor */ 403 struct ia_css_fw_info fw; /** SP fw descriptor */
404 const uint8_t *code; /**< ISP pointer of allocated SP code */ 404 const uint8_t *code; /** ISP pointer of allocated SP code */
405}; 405};
406 406
407/** Acceleration firmware descriptor. 407/* Acceleration firmware descriptor.
408 * This descriptor descibes either SP code (stand-alone), or 408 * This descriptor descibes either SP code (stand-alone), or
409 * ISP code (a separate pipeline stage). 409 * ISP code (a separate pipeline stage).
410 */ 410 */
411struct ia_css_acc_fw_hdr { 411struct ia_css_acc_fw_hdr {
412 enum ia_css_acc_type type; /**< Type of accelerator */ 412 enum ia_css_acc_type type; /** Type of accelerator */
413 uint32_t isp_prog_name_offset; /**< program name offset wrt 413 uint32_t isp_prog_name_offset; /** program name offset wrt
414 header in bytes */ 414 header in bytes */
415 uint32_t isp_blob_offset; /**< blob offset wrt header 415 uint32_t isp_blob_offset; /** blob offset wrt header
416 in bytes */ 416 in bytes */
417 uint32_t isp_size; /**< Size of isp blob */ 417 uint32_t isp_size; /** Size of isp blob */
418 const uint8_t *isp_code; /**< ISP pointer to code */ 418 const uint8_t *isp_code; /** ISP pointer to code */
419 struct ia_css_acc_sp sp; /**< Standalone sp code */ 419 struct ia_css_acc_sp sp; /** Standalone sp code */
420 /**< Firmware handle between user space and kernel */ 420 /** Firmware handle between user space and kernel */
421 uint32_t handle; 421 uint32_t handle;
422 struct ia_css_data parameters; /**< Current SP parameters */ 422 struct ia_css_data parameters; /** Current SP parameters */
423}; 423};
424 424
425/** Firmware structure. 425/* Firmware structure.
426 * This contains the header and actual blobs. 426 * This contains the header and actual blobs.
427 * For standalone, it contains SP and ISP blob. 427 * For standalone, it contains SP and ISP blob.
428 * For a pipeline stage accelerator, it contains ISP code only. 428 * For a pipeline stage accelerator, it contains ISP code only.
@@ -430,7 +430,7 @@ struct ia_css_acc_fw_hdr {
430 * header and computed using the access macros below. 430 * header and computed using the access macros below.
431 */ 431 */
432struct ia_css_acc_fw { 432struct ia_css_acc_fw {
433 struct ia_css_acc_fw_hdr header; /**< firmware header */ 433 struct ia_css_acc_fw_hdr header; /** firmware header */
434 /* 434 /*
435 int8_t isp_progname[]; **< ISP program name 435 int8_t isp_progname[]; **< ISP program name
436 int8_t sp_progname[]; **< SP program name, stand-alone only 436 int8_t sp_progname[]; **< SP program name, stand-alone only
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
index b2ecf3618c15..a0058eac7d5a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_BUFFER_H 15#ifndef __IA_CSS_BUFFER_H
16#define __IA_CSS_BUFFER_H 16#define __IA_CSS_BUFFER_H
17 17
18/** @file 18/* @file
19 * This file contains datastructures and types for buffers used in CSS 19 * This file contains datastructures and types for buffers used in CSS
20 */ 20 */
21 21
@@ -23,7 +23,7 @@
23#include "ia_css_types.h" 23#include "ia_css_types.h"
24#include "ia_css_timer.h" 24#include "ia_css_timer.h"
25 25
26/** Enumeration of buffer types. Buffers can be queued and de-queued 26/* Enumeration of buffer types. Buffers can be queued and de-queued
27 * to hand them over between IA and ISP. 27 * to hand them over between IA and ISP.
28 */ 28 */
29enum ia_css_buffer_type { 29enum ia_css_buffer_type {
@@ -48,28 +48,28 @@ enum ia_css_buffer_type {
48 48
49/* Driver API is not SP/ISP visible, 64 bit types not supported on hivecc */ 49/* Driver API is not SP/ISP visible, 64 bit types not supported on hivecc */
50#if !defined(__ISP) 50#if !defined(__ISP)
51/** Buffer structure. This is a container structure that enables content 51/* Buffer structure. This is a container structure that enables content
52 * independent buffer queues and access functions. 52 * independent buffer queues and access functions.
53 */ 53 */
54struct ia_css_buffer { 54struct ia_css_buffer {
55 enum ia_css_buffer_type type; /**< Buffer type. */ 55 enum ia_css_buffer_type type; /** Buffer type. */
56 unsigned int exp_id; 56 unsigned int exp_id;
57 /**< exposure id for this buffer; 0 = not available 57 /** exposure id for this buffer; 0 = not available
58 see ia_css_event_public.h for more detail. */ 58 see ia_css_event_public.h for more detail. */
59 union { 59 union {
60 struct ia_css_isp_3a_statistics *stats_3a; /**< 3A statistics & optionally RGBY statistics. */ 60 struct ia_css_isp_3a_statistics *stats_3a; /** 3A statistics & optionally RGBY statistics. */
61 struct ia_css_isp_dvs_statistics *stats_dvs; /**< DVS statistics. */ 61 struct ia_css_isp_dvs_statistics *stats_dvs; /** DVS statistics. */
62 struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs; /**< SKC DVS statistics. */ 62 struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs; /** SKC DVS statistics. */
63 struct ia_css_frame *frame; /**< Frame buffer. */ 63 struct ia_css_frame *frame; /** Frame buffer. */
64 struct ia_css_acc_param *custom_data; /**< Custom buffer. */ 64 struct ia_css_acc_param *custom_data; /** Custom buffer. */
65 struct ia_css_metadata *metadata; /**< Sensor metadata. */ 65 struct ia_css_metadata *metadata; /** Sensor metadata. */
66 } data; /**< Buffer data pointer. */ 66 } data; /** Buffer data pointer. */
67 uint64_t driver_cookie; /**< cookie for the driver */ 67 uint64_t driver_cookie; /** cookie for the driver */
68 struct ia_css_time_meas timing_data; /**< timing data (readings from the timer) */ 68 struct ia_css_time_meas timing_data; /** timing data (readings from the timer) */
69 struct ia_css_clock_tick isys_eof_clock_tick; /**< ISYS's end of frame timer tick*/ 69 struct ia_css_clock_tick isys_eof_clock_tick; /** ISYS's end of frame timer tick*/
70}; 70};
71 71
72/** @brief Dequeue param buffers from sp2host_queue 72/* @brief Dequeue param buffers from sp2host_queue
73 * 73 *
74 * @return None 74 * @return None
75 * 75 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h
index a15d3e368341..021a313fab85 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_CONTROL_H 15#ifndef __IA_CSS_CONTROL_H
16#define __IA_CSS_CONTROL_H 16#define __IA_CSS_CONTROL_H
17 17
18/** @file 18/* @file
19 * This file contains functionality for starting and controlling CSS 19 * This file contains functionality for starting and controlling CSS
20 */ 20 */
21 21
@@ -24,7 +24,7 @@
24#include <ia_css_firmware.h> 24#include <ia_css_firmware.h>
25#include <ia_css_irq.h> 25#include <ia_css_irq.h>
26 26
27/** @brief Initialize the CSS API. 27/* @brief Initialize the CSS API.
28 * @param[in] env Environment, provides functions to access the 28 * @param[in] env Environment, provides functions to access the
29 * environment in which the CSS code runs. This is 29 * environment in which the CSS code runs. This is
30 * used for host side memory access and message 30 * used for host side memory access and message
@@ -51,7 +51,7 @@ enum ia_css_err ia_css_init(
51 uint32_t l1_base, 51 uint32_t l1_base,
52 enum ia_css_irq_type irq_type); 52 enum ia_css_irq_type irq_type);
53 53
54/** @brief Un-initialize the CSS API. 54/* @brief Un-initialize the CSS API.
55 * @return None 55 * @return None
56 * 56 *
57 * This function deallocates all memory that has been allocated by the CSS API 57 * This function deallocates all memory that has been allocated by the CSS API
@@ -66,7 +66,7 @@ enum ia_css_err ia_css_init(
66void 66void
67ia_css_uninit(void); 67ia_css_uninit(void);
68 68
69/** @brief Suspend CSS API for power down 69/* @brief Suspend CSS API for power down
70 * @return success or faulure code 70 * @return success or faulure code
71 * 71 *
72 * suspend shuts down the system by: 72 * suspend shuts down the system by:
@@ -80,7 +80,7 @@ ia_css_uninit(void);
80enum ia_css_err 80enum ia_css_err
81ia_css_suspend(void); 81ia_css_suspend(void);
82 82
83/** @brief Resume CSS API from power down 83/* @brief Resume CSS API from power down
84 * @return success or failure code 84 * @return success or failure code
85 * 85 *
86 * After a power cycle, this function will bring the CSS API back into 86 * After a power cycle, this function will bring the CSS API back into
@@ -91,7 +91,7 @@ ia_css_suspend(void);
91enum ia_css_err 91enum ia_css_err
92ia_css_resume(void); 92ia_css_resume(void);
93 93
94/** @brief Enable use of a separate queue for ISYS events. 94/* @brief Enable use of a separate queue for ISYS events.
95 * 95 *
96 * @param[in] enable: enable or disable use of separate ISYS event queues. 96 * @param[in] enable: enable or disable use of separate ISYS event queues.
97 * @return error if called when SP is running. 97 * @return error if called when SP is running.
@@ -105,7 +105,7 @@ ia_css_resume(void);
105enum ia_css_err 105enum ia_css_err
106ia_css_enable_isys_event_queue(bool enable); 106ia_css_enable_isys_event_queue(bool enable);
107 107
108/** @brief Test whether the ISP has started. 108/* @brief Test whether the ISP has started.
109 * 109 *
110 * @return Boolean flag true if the ISP has started or false otherwise. 110 * @return Boolean flag true if the ISP has started or false otherwise.
111 * 111 *
@@ -114,7 +114,7 @@ ia_css_enable_isys_event_queue(bool enable);
114bool 114bool
115ia_css_isp_has_started(void); 115ia_css_isp_has_started(void);
116 116
117/** @brief Test whether the SP has initialized. 117/* @brief Test whether the SP has initialized.
118 * 118 *
119 * @return Boolean flag true if the SP has initialized or false otherwise. 119 * @return Boolean flag true if the SP has initialized or false otherwise.
120 * 120 *
@@ -123,7 +123,7 @@ ia_css_isp_has_started(void);
123bool 123bool
124ia_css_sp_has_initialized(void); 124ia_css_sp_has_initialized(void);
125 125
126/** @brief Test whether the SP has terminated. 126/* @brief Test whether the SP has terminated.
127 * 127 *
128 * @return Boolean flag true if the SP has terminated or false otherwise. 128 * @return Boolean flag true if the SP has terminated or false otherwise.
129 * 129 *
@@ -132,7 +132,7 @@ ia_css_sp_has_initialized(void);
132bool 132bool
133ia_css_sp_has_terminated(void); 133ia_css_sp_has_terminated(void);
134 134
135/** @brief start SP hardware 135/* @brief start SP hardware
136 * 136 *
137 * @return IA_CSS_SUCCESS or error code upon error. 137 * @return IA_CSS_SUCCESS or error code upon error.
138 * 138 *
@@ -144,7 +144,7 @@ enum ia_css_err
144ia_css_start_sp(void); 144ia_css_start_sp(void);
145 145
146 146
147/** @brief stop SP hardware 147/* @brief stop SP hardware
148 * 148 *
149 * @return IA_CSS_SUCCESS or error code upon error. 149 * @return IA_CSS_SUCCESS or error code upon error.
150 * 150 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h
index 59459f7a9876..84a960b7abbc 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h
@@ -15,7 +15,7 @@
15#ifndef _IA_CSS_DEVICE_ACCESS_H 15#ifndef _IA_CSS_DEVICE_ACCESS_H
16#define _IA_CSS_DEVICE_ACCESS_H 16#define _IA_CSS_DEVICE_ACCESS_H
17 17
18/** @file 18/* @file
19 * File containing internal functions for the CSS-API to access the CSS device. 19 * File containing internal functions for the CSS-API to access the CSS device.
20 */ 20 */
21 21
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h
index 147bf81959d3..1f01534964e3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_DVS_H 15#ifndef __IA_CSS_DVS_H
16#define __IA_CSS_DVS_H 16#define __IA_CSS_DVS_H
17 17
18/** @file 18/* @file
19 * This file contains types for DVS statistics 19 * This file contains types for DVS statistics
20 */ 20 */
21 21
@@ -31,7 +31,7 @@ enum dvs_statistics_type {
31}; 31};
32 32
33 33
34/** Structure that holds DVS statistics in the ISP internal 34/* Structure that holds DVS statistics in the ISP internal
35 * format. Use ia_css_get_dvs_statistics() to translate 35 * format. Use ia_css_get_dvs_statistics() to translate
36 * this to the format used on the host (DVS engine). 36 * this to the format used on the host (DVS engine).
37 * */ 37 * */
@@ -40,12 +40,12 @@ struct ia_css_isp_dvs_statistics {
40 ia_css_ptr ver_proj; 40 ia_css_ptr ver_proj;
41 uint32_t hor_size; 41 uint32_t hor_size;
42 uint32_t ver_size; 42 uint32_t ver_size;
43 uint32_t exp_id; /**< see ia_css_event_public.h for more detail */ 43 uint32_t exp_id; /** see ia_css_event_public.h for more detail */
44 ia_css_ptr data_ptr; /* base pointer containing all memory */ 44 ia_css_ptr data_ptr; /* base pointer containing all memory */
45 uint32_t size; /* size of allocated memory in data_ptr */ 45 uint32_t size; /* size of allocated memory in data_ptr */
46}; 46};
47 47
48/** Structure that holds SKC DVS statistics in the ISP internal 48/* Structure that holds SKC DVS statistics in the ISP internal
49 * format. Use ia_css_dvs_statistics_get() to translate this to 49 * format. Use ia_css_dvs_statistics_get() to translate this to
50 * the format used on the host. 50 * the format used on the host.
51 * */ 51 * */
@@ -82,7 +82,7 @@ union ia_css_dvs_statistics_host {
82 struct ia_css_skc_dvs_statistics *p_skc_dvs_statistics_host; 82 struct ia_css_skc_dvs_statistics *p_skc_dvs_statistics_host;
83}; 83};
84 84
85/** @brief Copy DVS statistics from an ISP buffer to a host buffer. 85/* @brief Copy DVS statistics from an ISP buffer to a host buffer.
86 * @param[in] host_stats Host buffer 86 * @param[in] host_stats Host buffer
87 * @param[in] isp_stats ISP buffer 87 * @param[in] isp_stats ISP buffer
88 * @return error value if temporary memory cannot be allocated 88 * @return error value if temporary memory cannot be allocated
@@ -100,7 +100,7 @@ enum ia_css_err
100ia_css_get_dvs_statistics(struct ia_css_dvs_statistics *host_stats, 100ia_css_get_dvs_statistics(struct ia_css_dvs_statistics *host_stats,
101 const struct ia_css_isp_dvs_statistics *isp_stats); 101 const struct ia_css_isp_dvs_statistics *isp_stats);
102 102
103/** @brief Translate DVS statistics from ISP format to host format 103/* @brief Translate DVS statistics from ISP format to host format
104 * @param[in] host_stats Host buffer 104 * @param[in] host_stats Host buffer
105 * @param[in] isp_stats ISP buffer 105 * @param[in] isp_stats ISP buffer
106 * @return None 106 * @return None
@@ -116,7 +116,7 @@ ia_css_translate_dvs_statistics(
116 struct ia_css_dvs_statistics *host_stats, 116 struct ia_css_dvs_statistics *host_stats,
117 const struct ia_css_isp_dvs_statistics_map *isp_stats); 117 const struct ia_css_isp_dvs_statistics_map *isp_stats);
118 118
119/** @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer. 119/* @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer.
120 * @param[in] host_stats Host buffer 120 * @param[in] host_stats Host buffer
121 * @param[in] isp_stats ISP buffer 121 * @param[in] isp_stats ISP buffer
122 * @return error value if temporary memory cannot be allocated 122 * @return error value if temporary memory cannot be allocated
@@ -134,7 +134,7 @@ enum ia_css_err
134ia_css_get_dvs2_statistics(struct ia_css_dvs2_statistics *host_stats, 134ia_css_get_dvs2_statistics(struct ia_css_dvs2_statistics *host_stats,
135 const struct ia_css_isp_dvs_statistics *isp_stats); 135 const struct ia_css_isp_dvs_statistics *isp_stats);
136 136
137/** @brief Translate DVS2 statistics from ISP format to host format 137/* @brief Translate DVS2 statistics from ISP format to host format
138 * @param[in] host_stats Host buffer 138 * @param[in] host_stats Host buffer
139 * @param[in] isp_stats ISP buffer 139 * @param[in] isp_stats ISP buffer
140 * @return None 140 * @return None
@@ -150,7 +150,7 @@ ia_css_translate_dvs2_statistics(
150 struct ia_css_dvs2_statistics *host_stats, 150 struct ia_css_dvs2_statistics *host_stats,
151 const struct ia_css_isp_dvs_statistics_map *isp_stats); 151 const struct ia_css_isp_dvs_statistics_map *isp_stats);
152 152
153/** @brief Copy DVS statistics from an ISP buffer to a host buffer. 153/* @brief Copy DVS statistics from an ISP buffer to a host buffer.
154 * @param[in] type - DVS statistics type 154 * @param[in] type - DVS statistics type
155 * @param[in] host_stats Host buffer 155 * @param[in] host_stats Host buffer
156 * @param[in] isp_stats ISP buffer 156 * @param[in] isp_stats ISP buffer
@@ -161,105 +161,105 @@ ia_css_dvs_statistics_get(enum dvs_statistics_type type,
161 union ia_css_dvs_statistics_host *host_stats, 161 union ia_css_dvs_statistics_host *host_stats,
162 const union ia_css_dvs_statistics_isp *isp_stats); 162 const union ia_css_dvs_statistics_isp *isp_stats);
163 163
164/** @brief Allocate the DVS statistics memory on the ISP 164/* @brief Allocate the DVS statistics memory on the ISP
165 * @param[in] grid The grid. 165 * @param[in] grid The grid.
166 * @return Pointer to the allocated DVS statistics buffer on the ISP 166 * @return Pointer to the allocated DVS statistics buffer on the ISP
167*/ 167*/
168struct ia_css_isp_dvs_statistics * 168struct ia_css_isp_dvs_statistics *
169ia_css_isp_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid); 169ia_css_isp_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid);
170 170
171/** @brief Free the DVS statistics memory on the ISP 171/* @brief Free the DVS statistics memory on the ISP
172 * @param[in] me Pointer to the DVS statistics buffer on the ISP. 172 * @param[in] me Pointer to the DVS statistics buffer on the ISP.
173 * @return None 173 * @return None
174*/ 174*/
175void 175void
176ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me); 176ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me);
177 177
178/** @brief Allocate the DVS 2.0 statistics memory 178/* @brief Allocate the DVS 2.0 statistics memory
179 * @param[in] grid The grid. 179 * @param[in] grid The grid.
180 * @return Pointer to the allocated DVS statistics buffer on the ISP 180 * @return Pointer to the allocated DVS statistics buffer on the ISP
181*/ 181*/
182struct ia_css_isp_dvs_statistics * 182struct ia_css_isp_dvs_statistics *
183ia_css_isp_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid); 183ia_css_isp_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid);
184 184
185/** @brief Free the DVS 2.0 statistics memory 185/* @brief Free the DVS 2.0 statistics memory
186 * @param[in] me Pointer to the DVS statistics buffer on the ISP. 186 * @param[in] me Pointer to the DVS statistics buffer on the ISP.
187 * @return None 187 * @return None
188*/ 188*/
189void 189void
190ia_css_isp_dvs2_statistics_free(struct ia_css_isp_dvs_statistics *me); 190ia_css_isp_dvs2_statistics_free(struct ia_css_isp_dvs_statistics *me);
191 191
192/** @brief Allocate the DVS statistics memory on the host 192/* @brief Allocate the DVS statistics memory on the host
193 * @param[in] grid The grid. 193 * @param[in] grid The grid.
194 * @return Pointer to the allocated DVS statistics buffer on the host 194 * @return Pointer to the allocated DVS statistics buffer on the host
195*/ 195*/
196struct ia_css_dvs_statistics * 196struct ia_css_dvs_statistics *
197ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid); 197ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid);
198 198
199/** @brief Free the DVS statistics memory on the host 199/* @brief Free the DVS statistics memory on the host
200 * @param[in] me Pointer to the DVS statistics buffer on the host. 200 * @param[in] me Pointer to the DVS statistics buffer on the host.
201 * @return None 201 * @return None
202*/ 202*/
203void 203void
204ia_css_dvs_statistics_free(struct ia_css_dvs_statistics *me); 204ia_css_dvs_statistics_free(struct ia_css_dvs_statistics *me);
205 205
206/** @brief Allocate the DVS coefficients memory 206/* @brief Allocate the DVS coefficients memory
207 * @param[in] grid The grid. 207 * @param[in] grid The grid.
208 * @return Pointer to the allocated DVS coefficients buffer 208 * @return Pointer to the allocated DVS coefficients buffer
209*/ 209*/
210struct ia_css_dvs_coefficients * 210struct ia_css_dvs_coefficients *
211ia_css_dvs_coefficients_allocate(const struct ia_css_dvs_grid_info *grid); 211ia_css_dvs_coefficients_allocate(const struct ia_css_dvs_grid_info *grid);
212 212
213/** @brief Free the DVS coefficients memory 213/* @brief Free the DVS coefficients memory
214 * @param[in] me Pointer to the DVS coefficients buffer. 214 * @param[in] me Pointer to the DVS coefficients buffer.
215 * @return None 215 * @return None
216 */ 216 */
217void 217void
218ia_css_dvs_coefficients_free(struct ia_css_dvs_coefficients *me); 218ia_css_dvs_coefficients_free(struct ia_css_dvs_coefficients *me);
219 219
220/** @brief Allocate the DVS 2.0 statistics memory on the host 220/* @brief Allocate the DVS 2.0 statistics memory on the host
221 * @param[in] grid The grid. 221 * @param[in] grid The grid.
222 * @return Pointer to the allocated DVS 2.0 statistics buffer on the host 222 * @return Pointer to the allocated DVS 2.0 statistics buffer on the host
223 */ 223 */
224struct ia_css_dvs2_statistics * 224struct ia_css_dvs2_statistics *
225ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid); 225ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid);
226 226
227/** @brief Free the DVS 2.0 statistics memory 227/* @brief Free the DVS 2.0 statistics memory
228 * @param[in] me Pointer to the DVS 2.0 statistics buffer on the host. 228 * @param[in] me Pointer to the DVS 2.0 statistics buffer on the host.
229 * @return None 229 * @return None
230*/ 230*/
231void 231void
232ia_css_dvs2_statistics_free(struct ia_css_dvs2_statistics *me); 232ia_css_dvs2_statistics_free(struct ia_css_dvs2_statistics *me);
233 233
234/** @brief Allocate the DVS 2.0 coefficients memory 234/* @brief Allocate the DVS 2.0 coefficients memory
235 * @param[in] grid The grid. 235 * @param[in] grid The grid.
236 * @return Pointer to the allocated DVS 2.0 coefficients buffer 236 * @return Pointer to the allocated DVS 2.0 coefficients buffer
237*/ 237*/
238struct ia_css_dvs2_coefficients * 238struct ia_css_dvs2_coefficients *
239ia_css_dvs2_coefficients_allocate(const struct ia_css_dvs_grid_info *grid); 239ia_css_dvs2_coefficients_allocate(const struct ia_css_dvs_grid_info *grid);
240 240
241/** @brief Free the DVS 2.0 coefficients memory 241/* @brief Free the DVS 2.0 coefficients memory
242 * @param[in] me Pointer to the DVS 2.0 coefficients buffer. 242 * @param[in] me Pointer to the DVS 2.0 coefficients buffer.
243 * @return None 243 * @return None
244*/ 244*/
245void 245void
246ia_css_dvs2_coefficients_free(struct ia_css_dvs2_coefficients *me); 246ia_css_dvs2_coefficients_free(struct ia_css_dvs2_coefficients *me);
247 247
248/** @brief Allocate the DVS 2.0 6-axis config memory 248/* @brief Allocate the DVS 2.0 6-axis config memory
249 * @param[in] stream The stream. 249 * @param[in] stream The stream.
250 * @return Pointer to the allocated DVS 6axis configuration buffer 250 * @return Pointer to the allocated DVS 6axis configuration buffer
251*/ 251*/
252struct ia_css_dvs_6axis_config * 252struct ia_css_dvs_6axis_config *
253ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream); 253ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream);
254 254
255/** @brief Free the DVS 2.0 6-axis config memory 255/* @brief Free the DVS 2.0 6-axis config memory
256 * @param[in] dvs_6axis_config Pointer to the DVS 6axis configuration buffer 256 * @param[in] dvs_6axis_config Pointer to the DVS 6axis configuration buffer
257 * @return None 257 * @return None
258 */ 258 */
259void 259void
260ia_css_dvs2_6axis_config_free(struct ia_css_dvs_6axis_config *dvs_6axis_config); 260ia_css_dvs2_6axis_config_free(struct ia_css_dvs_6axis_config *dvs_6axis_config);
261 261
262/** @brief Allocate a dvs statistics map structure 262/* @brief Allocate a dvs statistics map structure
263 * @param[in] isp_stats pointer to ISP dvs statistis struct 263 * @param[in] isp_stats pointer to ISP dvs statistis struct
264 * @param[in] data_ptr host-side pointer to ISP dvs statistics. 264 * @param[in] data_ptr host-side pointer to ISP dvs statistics.
265 * @return Pointer to the allocated dvs statistics map 265 * @return Pointer to the allocated dvs statistics map
@@ -280,7 +280,7 @@ ia_css_isp_dvs_statistics_map_allocate(
280 const struct ia_css_isp_dvs_statistics *isp_stats, 280 const struct ia_css_isp_dvs_statistics *isp_stats,
281 void *data_ptr); 281 void *data_ptr);
282 282
283/** @brief Free the dvs statistics map 283/* @brief Free the dvs statistics map
284 * @param[in] me Pointer to the dvs statistics map 284 * @param[in] me Pointer to the dvs statistics map
285 * @return None 285 * @return None
286 * 286 *
@@ -291,7 +291,7 @@ ia_css_isp_dvs_statistics_map_allocate(
291void 291void
292ia_css_isp_dvs_statistics_map_free(struct ia_css_isp_dvs_statistics_map *me); 292ia_css_isp_dvs_statistics_map_free(struct ia_css_isp_dvs_statistics_map *me);
293 293
294/** @brief Allocate memory for the SKC DVS statistics on the ISP 294/* @brief Allocate memory for the SKC DVS statistics on the ISP
295 * @return Pointer to the allocated ACC DVS statistics buffer on the ISP 295 * @return Pointer to the allocated ACC DVS statistics buffer on the ISP
296*/ 296*/
297struct ia_css_isp_skc_dvs_statistics *ia_css_skc_dvs_statistics_allocate(void); 297struct ia_css_isp_skc_dvs_statistics *ia_css_skc_dvs_statistics_allocate(void);
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h
index 1ae9daf0be76..8b0218ee658d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h
@@ -20,12 +20,12 @@
20#include "ia_css_types.h" 20#include "ia_css_types.h"
21#include "ia_css_acc_types.h" 21#include "ia_css_acc_types.h"
22 22
23/** @file 23/* @file
24 * This file contains prototypes for functions that need to be provided to the 24 * This file contains prototypes for functions that need to be provided to the
25 * CSS-API host-code by the environment in which the CSS-API code runs. 25 * CSS-API host-code by the environment in which the CSS-API code runs.
26 */ 26 */
27 27
28/** Memory allocation attributes, for use in ia_css_css_mem_env. */ 28/* Memory allocation attributes, for use in ia_css_css_mem_env. */
29enum ia_css_mem_attr { 29enum ia_css_mem_attr {
30 IA_CSS_MEM_ATTR_CACHED = 1 << 0, 30 IA_CSS_MEM_ATTR_CACHED = 1 << 0,
31 IA_CSS_MEM_ATTR_ZEROED = 1 << 1, 31 IA_CSS_MEM_ATTR_ZEROED = 1 << 1,
@@ -33,62 +33,62 @@ enum ia_css_mem_attr {
33 IA_CSS_MEM_ATTR_CONTIGUOUS = 1 << 3, 33 IA_CSS_MEM_ATTR_CONTIGUOUS = 1 << 3,
34}; 34};
35 35
36/** Environment with function pointers for local IA memory allocation. 36/* Environment with function pointers for local IA memory allocation.
37 * This provides the CSS code with environment specific functionality 37 * This provides the CSS code with environment specific functionality
38 * for memory allocation of small local buffers such as local data structures. 38 * for memory allocation of small local buffers such as local data structures.
39 * This is never expected to allocate more than one page of memory (4K bytes). 39 * This is never expected to allocate more than one page of memory (4K bytes).
40 */ 40 */
41struct ia_css_cpu_mem_env { 41struct ia_css_cpu_mem_env {
42 void (*flush)(struct ia_css_acc_fw *fw); 42 void (*flush)(struct ia_css_acc_fw *fw);
43 /**< Flush function to flush the cache for given accelerator. */ 43 /** Flush function to flush the cache for given accelerator. */
44}; 44};
45 45
46/** Environment with function pointers to access the CSS hardware. This includes 46/* Environment with function pointers to access the CSS hardware. This includes
47 * registers and local memories. 47 * registers and local memories.
48 */ 48 */
49struct ia_css_hw_access_env { 49struct ia_css_hw_access_env {
50 void (*store_8)(hrt_address addr, uint8_t data); 50 void (*store_8)(hrt_address addr, uint8_t data);
51 /**< Store an 8 bit value into an address in the CSS HW address space. 51 /** Store an 8 bit value into an address in the CSS HW address space.
52 The address must be an 8 bit aligned address. */ 52 The address must be an 8 bit aligned address. */
53 void (*store_16)(hrt_address addr, uint16_t data); 53 void (*store_16)(hrt_address addr, uint16_t data);
54 /**< Store a 16 bit value into an address in the CSS HW address space. 54 /** Store a 16 bit value into an address in the CSS HW address space.
55 The address must be a 16 bit aligned address. */ 55 The address must be a 16 bit aligned address. */
56 void (*store_32)(hrt_address addr, uint32_t data); 56 void (*store_32)(hrt_address addr, uint32_t data);
57 /**< Store a 32 bit value into an address in the CSS HW address space. 57 /** Store a 32 bit value into an address in the CSS HW address space.
58 The address must be a 32 bit aligned address. */ 58 The address must be a 32 bit aligned address. */
59 uint8_t (*load_8)(hrt_address addr); 59 uint8_t (*load_8)(hrt_address addr);
60 /**< Load an 8 bit value from an address in the CSS HW address 60 /** Load an 8 bit value from an address in the CSS HW address
61 space. The address must be an 8 bit aligned address. */ 61 space. The address must be an 8 bit aligned address. */
62 uint16_t (*load_16)(hrt_address addr); 62 uint16_t (*load_16)(hrt_address addr);
63 /**< Load a 16 bit value from an address in the CSS HW address 63 /** Load a 16 bit value from an address in the CSS HW address
64 space. The address must be a 16 bit aligned address. */ 64 space. The address must be a 16 bit aligned address. */
65 uint32_t (*load_32)(hrt_address addr); 65 uint32_t (*load_32)(hrt_address addr);
66 /**< Load a 32 bit value from an address in the CSS HW address 66 /** Load a 32 bit value from an address in the CSS HW address
67 space. The address must be a 32 bit aligned address. */ 67 space. The address must be a 32 bit aligned address. */
68 void (*store)(hrt_address addr, const void *data, uint32_t bytes); 68 void (*store)(hrt_address addr, const void *data, uint32_t bytes);
69 /**< Store a number of bytes into a byte-aligned address in the CSS HW address space. */ 69 /** Store a number of bytes into a byte-aligned address in the CSS HW address space. */
70 void (*load)(hrt_address addr, void *data, uint32_t bytes); 70 void (*load)(hrt_address addr, void *data, uint32_t bytes);
71 /**< Load a number of bytes from a byte-aligned address in the CSS HW address space. */ 71 /** Load a number of bytes from a byte-aligned address in the CSS HW address space. */
72}; 72};
73 73
74/** Environment with function pointers to print error and debug messages. 74/* Environment with function pointers to print error and debug messages.
75 */ 75 */
76struct ia_css_print_env { 76struct ia_css_print_env {
77 int (*debug_print)(const char *fmt, va_list args); 77 int (*debug_print)(const char *fmt, va_list args);
78 /**< Print a debug message. */ 78 /** Print a debug message. */
79 int (*error_print)(const char *fmt, va_list args); 79 int (*error_print)(const char *fmt, va_list args);
80 /**< Print an error message.*/ 80 /** Print an error message.*/
81}; 81};
82 82
83/** Environment structure. This includes function pointers to access several 83/* Environment structure. This includes function pointers to access several
84 * features provided by the environment in which the CSS API is used. 84 * features provided by the environment in which the CSS API is used.
85 * This is used to run the camera IP in multiple platforms such as Linux, 85 * This is used to run the camera IP in multiple platforms such as Linux,
86 * Windows and several simulation environments. 86 * Windows and several simulation environments.
87 */ 87 */
88struct ia_css_env { 88struct ia_css_env {
89 struct ia_css_cpu_mem_env cpu_mem_env; /**< local flush. */ 89 struct ia_css_cpu_mem_env cpu_mem_env; /** local flush. */
90 struct ia_css_hw_access_env hw_access_env; /**< CSS HW access functions */ 90 struct ia_css_hw_access_env hw_access_env; /** CSS HW access functions */
91 struct ia_css_print_env print_env; /**< Message printing env. */ 91 struct ia_css_print_env print_env; /** Message printing env. */
92}; 92};
93 93
94#endif /* __IA_CSS_ENV_H */ 94#endif /* __IA_CSS_ENV_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h
index 572e4e55c69e..cf895815ea31 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h
@@ -15,12 +15,12 @@
15#ifndef __IA_CSS_ERR_H 15#ifndef __IA_CSS_ERR_H
16#define __IA_CSS_ERR_H 16#define __IA_CSS_ERR_H
17 17
18/** @file 18/* @file
19 * This file contains possible return values for most 19 * This file contains possible return values for most
20 * functions in the CSS-API. 20 * functions in the CSS-API.
21 */ 21 */
22 22
23/** Errors, these values are used as the return value for most 23/* Errors, these values are used as the return value for most
24 * functions in this API. 24 * functions in this API.
25 */ 25 */
26enum ia_css_err { 26enum ia_css_err {
@@ -41,22 +41,22 @@ enum ia_css_err {
41 IA_CSS_ERR_NOT_SUPPORTED 41 IA_CSS_ERR_NOT_SUPPORTED
42}; 42};
43 43
44/** FW warnings. This enum contains a value for each warning that 44/* FW warnings. This enum contains a value for each warning that
45 * the SP FW could indicate potential performance issue 45 * the SP FW could indicate potential performance issue
46 */ 46 */
47enum ia_css_fw_warning { 47enum ia_css_fw_warning {
48 IA_CSS_FW_WARNING_NONE, 48 IA_CSS_FW_WARNING_NONE,
49 IA_CSS_FW_WARNING_ISYS_QUEUE_FULL, /** < CSS system delayed because of insufficient space in the ISys queue. 49 IA_CSS_FW_WARNING_ISYS_QUEUE_FULL, /* < CSS system delayed because of insufficient space in the ISys queue.
50 This warning can be avoided by de-queing ISYS buffers more timely. */ 50 This warning can be avoided by de-queing ISYS buffers more timely. */
51 IA_CSS_FW_WARNING_PSYS_QUEUE_FULL, /** < CSS system delayed because of insufficient space in the PSys queue. 51 IA_CSS_FW_WARNING_PSYS_QUEUE_FULL, /* < CSS system delayed because of insufficient space in the PSys queue.
52 This warning can be avoided by de-queing PSYS buffers more timely. */ 52 This warning can be avoided by de-queing PSYS buffers more timely. */
53 IA_CSS_FW_WARNING_CIRCBUF_ALL_LOCKED, /** < CSS system delayed because of insufficient available buffers. 53 IA_CSS_FW_WARNING_CIRCBUF_ALL_LOCKED, /* < CSS system delayed because of insufficient available buffers.
54 This warning can be avoided by unlocking locked frame-buffers more timely. */ 54 This warning can be avoided by unlocking locked frame-buffers more timely. */
55 IA_CSS_FW_WARNING_EXP_ID_LOCKED, /** < Exposure ID skipped because the frame associated to it was still locked. 55 IA_CSS_FW_WARNING_EXP_ID_LOCKED, /* < Exposure ID skipped because the frame associated to it was still locked.
56 This warning can be avoided by unlocking locked frame-buffers more timely. */ 56 This warning can be avoided by unlocking locked frame-buffers more timely. */
57 IA_CSS_FW_WARNING_TAG_EXP_ID_FAILED, /** < Exposure ID cannot be found on the circular buffer. 57 IA_CSS_FW_WARNING_TAG_EXP_ID_FAILED, /* < Exposure ID cannot be found on the circular buffer.
58 This warning can be avoided by unlocking locked frame-buffers more timely. */ 58 This warning can be avoided by unlocking locked frame-buffers more timely. */
59 IA_CSS_FW_WARNING_FRAME_PARAM_MISMATCH, /** < Frame and param pair mismatched in tagger. 59 IA_CSS_FW_WARNING_FRAME_PARAM_MISMATCH, /* < Frame and param pair mismatched in tagger.
60 This warning can be avoided by providing a param set for each frame. */ 60 This warning can be avoided by providing a param set for each frame. */
61}; 61};
62 62
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h
index aaf349772abe..036a2f03d3bd 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_EVENT_PUBLIC_H 15#ifndef __IA_CSS_EVENT_PUBLIC_H
16#define __IA_CSS_EVENT_PUBLIC_H 16#define __IA_CSS_EVENT_PUBLIC_H
17 17
18/** @file 18/* @file
19 * This file contains CSS-API events functionality 19 * This file contains CSS-API events functionality
20 */ 20 */
21 21
@@ -24,7 +24,7 @@
24#include <ia_css_types.h> /* ia_css_pipe */ 24#include <ia_css_types.h> /* ia_css_pipe */
25#include <ia_css_timer.h> /* ia_css_timer */ 25#include <ia_css_timer.h> /* ia_css_timer */
26 26
27/** The event type, distinguishes the kind of events that 27/* The event type, distinguishes the kind of events that
28 * can are generated by the CSS system. 28 * can are generated by the CSS system.
29 * 29 *
30 * !!!IMPORTANT!!! KEEP THE FOLLOWING IN SYNC: 30 * !!!IMPORTANT!!! KEEP THE FOLLOWING IN SYNC:
@@ -35,43 +35,43 @@
35 */ 35 */
36enum ia_css_event_type { 36enum ia_css_event_type {
37 IA_CSS_EVENT_TYPE_OUTPUT_FRAME_DONE = 1 << 0, 37 IA_CSS_EVENT_TYPE_OUTPUT_FRAME_DONE = 1 << 0,
38 /**< Output frame ready. */ 38 /** Output frame ready. */
39 IA_CSS_EVENT_TYPE_SECOND_OUTPUT_FRAME_DONE = 1 << 1, 39 IA_CSS_EVENT_TYPE_SECOND_OUTPUT_FRAME_DONE = 1 << 1,
40 /**< Second output frame ready. */ 40 /** Second output frame ready. */
41 IA_CSS_EVENT_TYPE_VF_OUTPUT_FRAME_DONE = 1 << 2, 41 IA_CSS_EVENT_TYPE_VF_OUTPUT_FRAME_DONE = 1 << 2,
42 /**< Viewfinder Output frame ready. */ 42 /** Viewfinder Output frame ready. */
43 IA_CSS_EVENT_TYPE_SECOND_VF_OUTPUT_FRAME_DONE = 1 << 3, 43 IA_CSS_EVENT_TYPE_SECOND_VF_OUTPUT_FRAME_DONE = 1 << 3,
44 /**< Second viewfinder Output frame ready. */ 44 /** Second viewfinder Output frame ready. */
45 IA_CSS_EVENT_TYPE_3A_STATISTICS_DONE = 1 << 4, 45 IA_CSS_EVENT_TYPE_3A_STATISTICS_DONE = 1 << 4,
46 /**< Indication that 3A statistics are available. */ 46 /** Indication that 3A statistics are available. */
47 IA_CSS_EVENT_TYPE_DIS_STATISTICS_DONE = 1 << 5, 47 IA_CSS_EVENT_TYPE_DIS_STATISTICS_DONE = 1 << 5,
48 /**< Indication that DIS statistics are available. */ 48 /** Indication that DIS statistics are available. */
49 IA_CSS_EVENT_TYPE_PIPELINE_DONE = 1 << 6, 49 IA_CSS_EVENT_TYPE_PIPELINE_DONE = 1 << 6,
50 /**< Pipeline Done event, sent after last pipeline stage. */ 50 /** Pipeline Done event, sent after last pipeline stage. */
51 IA_CSS_EVENT_TYPE_FRAME_TAGGED = 1 << 7, 51 IA_CSS_EVENT_TYPE_FRAME_TAGGED = 1 << 7,
52 /**< Frame tagged. */ 52 /** Frame tagged. */
53 IA_CSS_EVENT_TYPE_INPUT_FRAME_DONE = 1 << 8, 53 IA_CSS_EVENT_TYPE_INPUT_FRAME_DONE = 1 << 8,
54 /**< Input frame ready. */ 54 /** Input frame ready. */
55 IA_CSS_EVENT_TYPE_METADATA_DONE = 1 << 9, 55 IA_CSS_EVENT_TYPE_METADATA_DONE = 1 << 9,
56 /**< Metadata ready. */ 56 /** Metadata ready. */
57 IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE = 1 << 10, 57 IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE = 1 << 10,
58 /**< Indication that LACE statistics are available. */ 58 /** Indication that LACE statistics are available. */
59 IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE = 1 << 11, 59 IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE = 1 << 11,
60 /**< Extension stage complete. */ 60 /** Extension stage complete. */
61 IA_CSS_EVENT_TYPE_TIMER = 1 << 12, 61 IA_CSS_EVENT_TYPE_TIMER = 1 << 12,
62 /**< Timer event for measuring the SP side latencies. It contains the 62 /** Timer event for measuring the SP side latencies. It contains the
63 32-bit timer value from the SP */ 63 32-bit timer value from the SP */
64 IA_CSS_EVENT_TYPE_PORT_EOF = 1 << 13, 64 IA_CSS_EVENT_TYPE_PORT_EOF = 1 << 13,
65 /**< End Of Frame event, sent when in buffered sensor mode. */ 65 /** End Of Frame event, sent when in buffered sensor mode. */
66 IA_CSS_EVENT_TYPE_FW_WARNING = 1 << 14, 66 IA_CSS_EVENT_TYPE_FW_WARNING = 1 << 14,
67 /**< Performance warning encounter by FW */ 67 /** Performance warning encounter by FW */
68 IA_CSS_EVENT_TYPE_FW_ASSERT = 1 << 15, 68 IA_CSS_EVENT_TYPE_FW_ASSERT = 1 << 15,
69 /**< Assertion hit by FW */ 69 /** Assertion hit by FW */
70}; 70};
71 71
72#define IA_CSS_EVENT_TYPE_NONE 0 72#define IA_CSS_EVENT_TYPE_NONE 0
73 73
74/** IA_CSS_EVENT_TYPE_ALL is a mask for all pipe related events. 74/* IA_CSS_EVENT_TYPE_ALL is a mask for all pipe related events.
75 * The other events (such as PORT_EOF) cannot be enabled/disabled 75 * The other events (such as PORT_EOF) cannot be enabled/disabled
76 * and are hence excluded from this macro. 76 * and are hence excluded from this macro.
77 */ 77 */
@@ -89,7 +89,7 @@ enum ia_css_event_type {
89 IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE | \ 89 IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE | \
90 IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE) 90 IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE)
91 91
92/** The event struct, container for the event type and its related values. 92/* The event struct, container for the event type and its related values.
93 * Depending on the event type, either pipe or port will be filled. 93 * Depending on the event type, either pipe or port will be filled.
94 * Pipeline related events (like buffer/frame events) will return a valid and filled pipe handle. 94 * Pipeline related events (like buffer/frame events) will return a valid and filled pipe handle.
95 * For non pipeline related events (but i.e. stream specific, like EOF event), the port will be 95 * For non pipeline related events (but i.e. stream specific, like EOF event), the port will be
@@ -97,14 +97,14 @@ enum ia_css_event_type {
97 */ 97 */
98struct ia_css_event { 98struct ia_css_event {
99 struct ia_css_pipe *pipe; 99 struct ia_css_pipe *pipe;
100 /**< Pipe handle on which event happened, NULL for non pipe related 100 /** Pipe handle on which event happened, NULL for non pipe related
101 events. */ 101 events. */
102 enum ia_css_event_type type; 102 enum ia_css_event_type type;
103 /**< Type of Event, always valid/filled. */ 103 /** Type of Event, always valid/filled. */
104 uint8_t port; 104 uint8_t port;
105 /**< Port number for EOF event (not valid for other events). */ 105 /** Port number for EOF event (not valid for other events). */
106 uint8_t exp_id; 106 uint8_t exp_id;
107 /**< Exposure id for EOF/FRAME_TAGGED/FW_WARNING event (not valid for other events) 107 /** Exposure id for EOF/FRAME_TAGGED/FW_WARNING event (not valid for other events)
108 The exposure ID is unique only within a logical stream and it is 108 The exposure ID is unique only within a logical stream and it is
109 only generated on systems that have an input system (such as 2400 109 only generated on systems that have an input system (such as 2400
110 and 2401). 110 and 2401).
@@ -120,26 +120,26 @@ struct ia_css_event {
120 in the exposure IDs. Therefor applications should not use this 120 in the exposure IDs. Therefor applications should not use this
121 to detect frame drops. */ 121 to detect frame drops. */
122 uint32_t fw_handle; 122 uint32_t fw_handle;
123 /**< Firmware Handle for ACC_STAGE_COMPLETE event (not valid for other 123 /** Firmware Handle for ACC_STAGE_COMPLETE event (not valid for other
124 events). */ 124 events). */
125 enum ia_css_fw_warning fw_warning; 125 enum ia_css_fw_warning fw_warning;
126 /**< Firmware warning code, only for WARNING events. */ 126 /** Firmware warning code, only for WARNING events. */
127 uint8_t fw_assert_module_id; 127 uint8_t fw_assert_module_id;
128 /**< Firmware module id, only for ASSERT events, should be logged by driver. */ 128 /** Firmware module id, only for ASSERT events, should be logged by driver. */
129 uint16_t fw_assert_line_no; 129 uint16_t fw_assert_line_no;
130 /**< Firmware line number, only for ASSERT events, should be logged by driver. */ 130 /** Firmware line number, only for ASSERT events, should be logged by driver. */
131 clock_value_t timer_data; 131 clock_value_t timer_data;
132 /**< For storing the full 32-bit of the timer value. Valid only for TIMER 132 /** For storing the full 32-bit of the timer value. Valid only for TIMER
133 event */ 133 event */
134 uint8_t timer_code; 134 uint8_t timer_code;
135 /**< For storing the code of the TIMER event. Valid only for 135 /** For storing the code of the TIMER event. Valid only for
136 TIMER event */ 136 TIMER event */
137 uint8_t timer_subcode; 137 uint8_t timer_subcode;
138 /**< For storing the subcode of the TIMER event. Valid only 138 /** For storing the subcode of the TIMER event. Valid only
139 for TIMER event */ 139 for TIMER event */
140}; 140};
141 141
142/** @brief Dequeue a PSYS event from the CSS system. 142/* @brief Dequeue a PSYS event from the CSS system.
143 * 143 *
144 * @param[out] event Pointer to the event struct which will be filled by 144 * @param[out] event Pointer to the event struct which will be filled by
145 * this function if an event is available. 145 * this function if an event is available.
@@ -156,7 +156,7 @@ struct ia_css_event {
156enum ia_css_err 156enum ia_css_err
157ia_css_dequeue_psys_event(struct ia_css_event *event); 157ia_css_dequeue_psys_event(struct ia_css_event *event);
158 158
159/** @brief Dequeue an event from the CSS system. 159/* @brief Dequeue an event from the CSS system.
160 * 160 *
161 * @param[out] event Pointer to the event struct which will be filled by 161 * @param[out] event Pointer to the event struct which will be filled by
162 * this function if an event is available. 162 * this function if an event is available.
@@ -171,7 +171,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event);
171enum ia_css_err 171enum ia_css_err
172ia_css_dequeue_event(struct ia_css_event *event); 172ia_css_dequeue_event(struct ia_css_event *event);
173 173
174/** @brief Dequeue an ISYS event from the CSS system. 174/* @brief Dequeue an ISYS event from the CSS system.
175 * 175 *
176 * @param[out] event Pointer to the event struct which will be filled by 176 * @param[out] event Pointer to the event struct which will be filled by
177 * this function if an event is available. 177 * this function if an event is available.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h
index 06d375a09be2..d7d7f0a995e5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h
@@ -15,21 +15,21 @@
15#ifndef __IA_CSS_FIRMWARE_H 15#ifndef __IA_CSS_FIRMWARE_H
16#define __IA_CSS_FIRMWARE_H 16#define __IA_CSS_FIRMWARE_H
17 17
18/** @file 18/* @file
19 * This file contains firmware loading/unloading support functionality 19 * This file contains firmware loading/unloading support functionality
20 */ 20 */
21 21
22#include "ia_css_err.h" 22#include "ia_css_err.h"
23#include "ia_css_env.h" 23#include "ia_css_env.h"
24 24
25/** CSS firmware package structure. 25/* CSS firmware package structure.
26 */ 26 */
27struct ia_css_fw { 27struct ia_css_fw {
28 void *data; /**< pointer to the firmware data */ 28 void *data; /** pointer to the firmware data */
29 unsigned int bytes; /**< length in bytes of firmware data */ 29 unsigned int bytes; /** length in bytes of firmware data */
30}; 30};
31 31
32/** @brief Loads the firmware 32/* @brief Loads the firmware
33 * @param[in] env Environment, provides functions to access the 33 * @param[in] env Environment, provides functions to access the
34 * environment in which the CSS code runs. This is 34 * environment in which the CSS code runs. This is
35 * used for host side memory access and message 35 * used for host side memory access and message
@@ -51,7 +51,7 @@ enum ia_css_err
51ia_css_load_firmware(const struct ia_css_env *env, 51ia_css_load_firmware(const struct ia_css_env *env,
52 const struct ia_css_fw *fw); 52 const struct ia_css_fw *fw);
53 53
54/** @brief Unloads the firmware 54/* @brief Unloads the firmware
55 * @return None 55 * @return None
56 * 56 *
57 * This function unloads the firmware loaded by ia_css_load_firmware. 57 * This function unloads the firmware loaded by ia_css_load_firmware.
@@ -61,7 +61,7 @@ ia_css_load_firmware(const struct ia_css_env *env,
61void 61void
62ia_css_unload_firmware(void); 62ia_css_unload_firmware(void);
63 63
64/** @brief Checks firmware version 64/* @brief Checks firmware version
65 * @param[in] fw Firmware package containing the firmware for all 65 * @param[in] fw Firmware package containing the firmware for all
66 * predefined ISP binaries. 66 * predefined ISP binaries.
67 * @return Returns true when the firmware version matches with the CSS 67 * @return Returns true when the firmware version matches with the CSS
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h
index da9c60144c6d..e5ffc579aef1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h
@@ -15,7 +15,7 @@
15#ifndef _IA_CSS_FRAC_H 15#ifndef _IA_CSS_FRAC_H
16#define _IA_CSS_FRAC_H 16#define _IA_CSS_FRAC_H
17 17
18/** @file 18/* @file
19 * This file contains typedefs used for fractional numbers 19 * This file contains typedefs used for fractional numbers
20 */ 20 */
21 21
@@ -25,13 +25,13 @@
25 * NOTE: the 16 bit fixed point types actually occupy 32 bits 25 * NOTE: the 16 bit fixed point types actually occupy 32 bits
26 * to save on extension operations in the ISP code. 26 * to save on extension operations in the ISP code.
27 */ 27 */
28/** Unsigned fixed point value, 0 integer bits, 16 fractional bits */ 28/* Unsigned fixed point value, 0 integer bits, 16 fractional bits */
29typedef uint32_t ia_css_u0_16; 29typedef uint32_t ia_css_u0_16;
30/** Unsigned fixed point value, 5 integer bits, 11 fractional bits */ 30/* Unsigned fixed point value, 5 integer bits, 11 fractional bits */
31typedef uint32_t ia_css_u5_11; 31typedef uint32_t ia_css_u5_11;
32/** Unsigned fixed point value, 8 integer bits, 8 fractional bits */ 32/* Unsigned fixed point value, 8 integer bits, 8 fractional bits */
33typedef uint32_t ia_css_u8_8; 33typedef uint32_t ia_css_u8_8;
34/** Signed fixed point value, 0 integer bits, 15 fractional bits */ 34/* Signed fixed point value, 0 integer bits, 15 fractional bits */
35typedef int32_t ia_css_s0_15; 35typedef int32_t ia_css_s0_15;
36 36
37#endif /* _IA_CSS_FRAC_H */ 37#endif /* _IA_CSS_FRAC_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h
index d534fbd91380..2f177edc36ac 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_FRAME_FORMAT_H 15#ifndef __IA_CSS_FRAME_FORMAT_H
16#define __IA_CSS_FRAME_FORMAT_H 16#define __IA_CSS_FRAME_FORMAT_H
17 17
18/** @file 18/* @file
19 * This file contains information about formats supported in the ISP 19 * This file contains information about formats supported in the ISP
20 */ 20 */
21 21
22/** Frame formats, some of these come from fourcc.org, others are 22/* Frame formats, some of these come from fourcc.org, others are
23 better explained by video4linux2. The NV11 seems to be described only 23 better explained by video4linux2. The NV11 seems to be described only
24 on MSDN pages, but even those seem to be gone now. 24 on MSDN pages, but even those seem to be gone now.
25 Frames can come in many forms, the main categories are RAW, RGB and YUV 25 Frames can come in many forms, the main categories are RAW, RGB and YUV
@@ -48,45 +48,45 @@
48 - css/bxt_sandbox/isysapi/interface/ia_css_isysapi_fw_types.h 48 - css/bxt_sandbox/isysapi/interface/ia_css_isysapi_fw_types.h
49*/ 49*/
50enum ia_css_frame_format { 50enum ia_css_frame_format {
51 IA_CSS_FRAME_FORMAT_NV11 = 0, /**< 12 bit YUV 411, Y, UV plane */ 51 IA_CSS_FRAME_FORMAT_NV11 = 0, /** 12 bit YUV 411, Y, UV plane */
52 IA_CSS_FRAME_FORMAT_NV12, /**< 12 bit YUV 420, Y, UV plane */ 52 IA_CSS_FRAME_FORMAT_NV12, /** 12 bit YUV 420, Y, UV plane */
53 IA_CSS_FRAME_FORMAT_NV12_16, /**< 16 bit YUV 420, Y, UV plane */ 53 IA_CSS_FRAME_FORMAT_NV12_16, /** 16 bit YUV 420, Y, UV plane */
54 IA_CSS_FRAME_FORMAT_NV12_TILEY, /**< 12 bit YUV 420, Intel proprietary tiled format, TileY */ 54 IA_CSS_FRAME_FORMAT_NV12_TILEY, /** 12 bit YUV 420, Intel proprietary tiled format, TileY */
55 IA_CSS_FRAME_FORMAT_NV16, /**< 16 bit YUV 422, Y, UV plane */ 55 IA_CSS_FRAME_FORMAT_NV16, /** 16 bit YUV 422, Y, UV plane */
56 IA_CSS_FRAME_FORMAT_NV21, /**< 12 bit YUV 420, Y, VU plane */ 56 IA_CSS_FRAME_FORMAT_NV21, /** 12 bit YUV 420, Y, VU plane */
57 IA_CSS_FRAME_FORMAT_NV61, /**< 16 bit YUV 422, Y, VU plane */ 57 IA_CSS_FRAME_FORMAT_NV61, /** 16 bit YUV 422, Y, VU plane */
58 IA_CSS_FRAME_FORMAT_YV12, /**< 12 bit YUV 420, Y, V, U plane */ 58 IA_CSS_FRAME_FORMAT_YV12, /** 12 bit YUV 420, Y, V, U plane */
59 IA_CSS_FRAME_FORMAT_YV16, /**< 16 bit YUV 422, Y, V, U plane */ 59 IA_CSS_FRAME_FORMAT_YV16, /** 16 bit YUV 422, Y, V, U plane */
60 IA_CSS_FRAME_FORMAT_YUV420, /**< 12 bit YUV 420, Y, U, V plane */ 60 IA_CSS_FRAME_FORMAT_YUV420, /** 12 bit YUV 420, Y, U, V plane */
61 IA_CSS_FRAME_FORMAT_YUV420_16, /**< yuv420, 16 bits per subpixel */ 61 IA_CSS_FRAME_FORMAT_YUV420_16, /** yuv420, 16 bits per subpixel */
62 IA_CSS_FRAME_FORMAT_YUV422, /**< 16 bit YUV 422, Y, U, V plane */ 62 IA_CSS_FRAME_FORMAT_YUV422, /** 16 bit YUV 422, Y, U, V plane */
63 IA_CSS_FRAME_FORMAT_YUV422_16, /**< yuv422, 16 bits per subpixel */ 63 IA_CSS_FRAME_FORMAT_YUV422_16, /** yuv422, 16 bits per subpixel */
64 IA_CSS_FRAME_FORMAT_UYVY, /**< 16 bit YUV 422, UYVY interleaved */ 64 IA_CSS_FRAME_FORMAT_UYVY, /** 16 bit YUV 422, UYVY interleaved */
65 IA_CSS_FRAME_FORMAT_YUYV, /**< 16 bit YUV 422, YUYV interleaved */ 65 IA_CSS_FRAME_FORMAT_YUYV, /** 16 bit YUV 422, YUYV interleaved */
66 IA_CSS_FRAME_FORMAT_YUV444, /**< 24 bit YUV 444, Y, U, V plane */ 66 IA_CSS_FRAME_FORMAT_YUV444, /** 24 bit YUV 444, Y, U, V plane */
67 IA_CSS_FRAME_FORMAT_YUV_LINE, /**< Internal format, 2 y lines followed 67 IA_CSS_FRAME_FORMAT_YUV_LINE, /** Internal format, 2 y lines followed
68 by a uvinterleaved line */ 68 by a uvinterleaved line */
69 IA_CSS_FRAME_FORMAT_RAW, /**< RAW, 1 plane */ 69 IA_CSS_FRAME_FORMAT_RAW, /** RAW, 1 plane */
70 IA_CSS_FRAME_FORMAT_RGB565, /**< 16 bit RGB, 1 plane. Each 3 sub 70 IA_CSS_FRAME_FORMAT_RGB565, /** 16 bit RGB, 1 plane. Each 3 sub
71 pixels are packed into one 16 bit 71 pixels are packed into one 16 bit
72 value, 5 bits for R, 6 bits for G 72 value, 5 bits for R, 6 bits for G
73 and 5 bits for B. */ 73 and 5 bits for B. */
74 IA_CSS_FRAME_FORMAT_PLANAR_RGB888, /**< 24 bit RGB, 3 planes */ 74 IA_CSS_FRAME_FORMAT_PLANAR_RGB888, /** 24 bit RGB, 3 planes */
75 IA_CSS_FRAME_FORMAT_RGBA888, /**< 32 bit RGBA, 1 plane, A=Alpha 75 IA_CSS_FRAME_FORMAT_RGBA888, /** 32 bit RGBA, 1 plane, A=Alpha
76 (alpha is unused) */ 76 (alpha is unused) */
77 IA_CSS_FRAME_FORMAT_QPLANE6, /**< Internal, for advanced ISP */ 77 IA_CSS_FRAME_FORMAT_QPLANE6, /** Internal, for advanced ISP */
78 IA_CSS_FRAME_FORMAT_BINARY_8, /**< byte stream, used for jpeg. For 78 IA_CSS_FRAME_FORMAT_BINARY_8, /** byte stream, used for jpeg. For
79 frames of this type, we set the 79 frames of this type, we set the
80 height to 1 and the width to the 80 height to 1 and the width to the
81 number of allocated bytes. */ 81 number of allocated bytes. */
82 IA_CSS_FRAME_FORMAT_MIPI, /**< MIPI frame, 1 plane */ 82 IA_CSS_FRAME_FORMAT_MIPI, /** MIPI frame, 1 plane */
83 IA_CSS_FRAME_FORMAT_RAW_PACKED, /**< RAW, 1 plane, packed */ 83 IA_CSS_FRAME_FORMAT_RAW_PACKED, /** RAW, 1 plane, packed */
84 IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_8, /**< 8 bit per Y/U/V. 84 IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_8, /** 8 bit per Y/U/V.
85 Y odd line; UYVY 85 Y odd line; UYVY
86 interleaved even line */ 86 interleaved even line */
87 IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8, /**< Legacy YUV420. UY odd 87 IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8, /** Legacy YUV420. UY odd
88 line; VY even line */ 88 line; VY even line */
89 IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 /**< 10 bit per Y/U/V. Y odd 89 IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 /** 10 bit per Y/U/V. Y odd
90 line; UYVY interleaved 90 line; UYVY interleaved
91 even line */ 91 even line */
92}; 92};
@@ -95,7 +95,7 @@ enum ia_css_frame_format {
95/* because of issues this would cause with the Clockwork code checking tool. */ 95/* because of issues this would cause with the Clockwork code checking tool. */
96#define IA_CSS_FRAME_FORMAT_NUM (IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 + 1) 96#define IA_CSS_FRAME_FORMAT_NUM (IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 + 1)
97 97
98/** Number of valid output frame formats for ISP **/ 98/* Number of valid output frame formats for ISP **/
99#define IA_CSS_FRAME_OUT_FORMAT_NUM (IA_CSS_FRAME_FORMAT_RGBA888 + 1) 99#define IA_CSS_FRAME_OUT_FORMAT_NUM (IA_CSS_FRAME_FORMAT_RGBA888 + 1)
100 100
101#endif /* __IA_CSS_FRAME_FORMAT_H */ 101#endif /* __IA_CSS_FRAME_FORMAT_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h
index 92f2389176b2..ba7a076c3afa 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_FRAME_PUBLIC_H 15#ifndef __IA_CSS_FRAME_PUBLIC_H
16#define __IA_CSS_FRAME_PUBLIC_H 16#define __IA_CSS_FRAME_PUBLIC_H
17 17
18/** @file 18/* @file
19 * This file contains structs to describe various frame-formats supported by the ISP. 19 * This file contains structs to describe various frame-formats supported by the ISP.
20 */ 20 */
21 21
@@ -25,73 +25,73 @@
25#include "ia_css_frame_format.h" 25#include "ia_css_frame_format.h"
26#include "ia_css_buffer.h" 26#include "ia_css_buffer.h"
27 27
28/** For RAW input, the bayer order needs to be specified separately. There 28/* For RAW input, the bayer order needs to be specified separately. There
29 * are 4 possible orders. The name is constructed by taking the first two 29 * are 4 possible orders. The name is constructed by taking the first two
30 * colors on the first line and the first two colors from the second line. 30 * colors on the first line and the first two colors from the second line.
31 */ 31 */
32enum ia_css_bayer_order { 32enum ia_css_bayer_order {
33 IA_CSS_BAYER_ORDER_GRBG, /**< GRGRGRGRGR .. BGBGBGBGBG */ 33 IA_CSS_BAYER_ORDER_GRBG, /** GRGRGRGRGR .. BGBGBGBGBG */
34 IA_CSS_BAYER_ORDER_RGGB, /**< RGRGRGRGRG .. GBGBGBGBGB */ 34 IA_CSS_BAYER_ORDER_RGGB, /** RGRGRGRGRG .. GBGBGBGBGB */
35 IA_CSS_BAYER_ORDER_BGGR, /**< BGBGBGBGBG .. GRGRGRGRGR */ 35 IA_CSS_BAYER_ORDER_BGGR, /** BGBGBGBGBG .. GRGRGRGRGR */
36 IA_CSS_BAYER_ORDER_GBRG, /**< GBGBGBGBGB .. RGRGRGRGRG */ 36 IA_CSS_BAYER_ORDER_GBRG, /** GBGBGBGBGB .. RGRGRGRGRG */
37}; 37};
38#define IA_CSS_BAYER_ORDER_NUM (IA_CSS_BAYER_ORDER_GBRG + 1) 38#define IA_CSS_BAYER_ORDER_NUM (IA_CSS_BAYER_ORDER_GBRG + 1)
39 39
40/** Frame plane structure. This describes one plane in an image 40/* Frame plane structure. This describes one plane in an image
41 * frame buffer. 41 * frame buffer.
42 */ 42 */
43struct ia_css_frame_plane { 43struct ia_css_frame_plane {
44 unsigned int height; /**< height of a plane in lines */ 44 unsigned int height; /** height of a plane in lines */
45 unsigned int width; /**< width of a line, in DMA elements, note that 45 unsigned int width; /** width of a line, in DMA elements, note that
46 for RGB565 the three subpixels are stored in 46 for RGB565 the three subpixels are stored in
47 one element. For all other formats this is 47 one element. For all other formats this is
48 the number of subpixels per line. */ 48 the number of subpixels per line. */
49 unsigned int stride; /**< stride of a line in bytes */ 49 unsigned int stride; /** stride of a line in bytes */
50 unsigned int offset; /**< offset in bytes to start of frame data. 50 unsigned int offset; /** offset in bytes to start of frame data.
51 offset is wrt data field in ia_css_frame */ 51 offset is wrt data field in ia_css_frame */
52}; 52};
53 53
54/** Binary "plane". This is used to story binary streams such as jpeg 54/* Binary "plane". This is used to story binary streams such as jpeg
55 * images. This is not actually a real plane. 55 * images. This is not actually a real plane.
56 */ 56 */
57struct ia_css_frame_binary_plane { 57struct ia_css_frame_binary_plane {
58 unsigned int size; /**< number of bytes in the stream */ 58 unsigned int size; /** number of bytes in the stream */
59 struct ia_css_frame_plane data; /**< plane */ 59 struct ia_css_frame_plane data; /** plane */
60}; 60};
61 61
62/** Container for planar YUV frames. This contains 3 planes. 62/* Container for planar YUV frames. This contains 3 planes.
63 */ 63 */
64struct ia_css_frame_yuv_planes { 64struct ia_css_frame_yuv_planes {
65 struct ia_css_frame_plane y; /**< Y plane */ 65 struct ia_css_frame_plane y; /** Y plane */
66 struct ia_css_frame_plane u; /**< U plane */ 66 struct ia_css_frame_plane u; /** U plane */
67 struct ia_css_frame_plane v; /**< V plane */ 67 struct ia_css_frame_plane v; /** V plane */
68}; 68};
69 69
70/** Container for semi-planar YUV frames. 70/* Container for semi-planar YUV frames.
71 */ 71 */
72struct ia_css_frame_nv_planes { 72struct ia_css_frame_nv_planes {
73 struct ia_css_frame_plane y; /**< Y plane */ 73 struct ia_css_frame_plane y; /** Y plane */
74 struct ia_css_frame_plane uv; /**< UV plane */ 74 struct ia_css_frame_plane uv; /** UV plane */
75}; 75};
76 76
77/** Container for planar RGB frames. Each color has its own plane. 77/* Container for planar RGB frames. Each color has its own plane.
78 */ 78 */
79struct ia_css_frame_rgb_planes { 79struct ia_css_frame_rgb_planes {
80 struct ia_css_frame_plane r; /**< Red plane */ 80 struct ia_css_frame_plane r; /** Red plane */
81 struct ia_css_frame_plane g; /**< Green plane */ 81 struct ia_css_frame_plane g; /** Green plane */
82 struct ia_css_frame_plane b; /**< Blue plane */ 82 struct ia_css_frame_plane b; /** Blue plane */
83}; 83};
84 84
85/** Container for 6-plane frames. These frames are used internally 85/* Container for 6-plane frames. These frames are used internally
86 * in the advanced ISP only. 86 * in the advanced ISP only.
87 */ 87 */
88struct ia_css_frame_plane6_planes { 88struct ia_css_frame_plane6_planes {
89 struct ia_css_frame_plane r; /**< Red plane */ 89 struct ia_css_frame_plane r; /** Red plane */
90 struct ia_css_frame_plane r_at_b; /**< Red at blue plane */ 90 struct ia_css_frame_plane r_at_b; /** Red at blue plane */
91 struct ia_css_frame_plane gr; /**< Red-green plane */ 91 struct ia_css_frame_plane gr; /** Red-green plane */
92 struct ia_css_frame_plane gb; /**< Blue-green plane */ 92 struct ia_css_frame_plane gb; /** Blue-green plane */
93 struct ia_css_frame_plane b; /**< Blue plane */ 93 struct ia_css_frame_plane b; /** Blue plane */
94 struct ia_css_frame_plane b_at_r; /**< Blue at red plane */ 94 struct ia_css_frame_plane b_at_r; /** Blue at red plane */
95}; 95};
96 96
97/* Crop info struct - stores the lines to be cropped in isp */ 97/* Crop info struct - stores the lines to be cropped in isp */
@@ -103,15 +103,15 @@ struct ia_css_crop_info {
103 unsigned int start_line; 103 unsigned int start_line;
104}; 104};
105 105
106/** Frame info struct. This describes the contents of an image frame buffer. 106/* Frame info struct. This describes the contents of an image frame buffer.
107 */ 107 */
108struct ia_css_frame_info { 108struct ia_css_frame_info {
109 struct ia_css_resolution res; /**< Frame resolution (valid data) */ 109 struct ia_css_resolution res; /** Frame resolution (valid data) */
110 unsigned int padded_width; /**< stride of line in memory (in pixels) */ 110 unsigned int padded_width; /** stride of line in memory (in pixels) */
111 enum ia_css_frame_format format; /**< format of the frame data */ 111 enum ia_css_frame_format format; /** format of the frame data */
112 unsigned int raw_bit_depth; /**< number of valid bits per pixel, 112 unsigned int raw_bit_depth; /** number of valid bits per pixel,
113 only valid for RAW bayer frames */ 113 only valid for RAW bayer frames */
114 enum ia_css_bayer_order raw_bayer_order; /**< bayer order, only valid 114 enum ia_css_bayer_order raw_bayer_order; /** bayer order, only valid
115 for RAW bayer frames */ 115 for RAW bayer frames */
116 /* the params below are computed based on bayer_order 116 /* the params below are computed based on bayer_order
117 * we can remove the raw_bayer_order if it is redundant 117 * we can remove the raw_bayer_order if it is redundant
@@ -136,9 +136,9 @@ struct ia_css_frame_info {
136 * Specifies the DVS loop delay in "frame periods" 136 * Specifies the DVS loop delay in "frame periods"
137 */ 137 */
138enum ia_css_frame_delay { 138enum ia_css_frame_delay {
139 IA_CSS_FRAME_DELAY_0, /**< Frame delay = 0 */ 139 IA_CSS_FRAME_DELAY_0, /** Frame delay = 0 */
140 IA_CSS_FRAME_DELAY_1, /**< Frame delay = 1 */ 140 IA_CSS_FRAME_DELAY_1, /** Frame delay = 1 */
141 IA_CSS_FRAME_DELAY_2 /**< Frame delay = 2 */ 141 IA_CSS_FRAME_DELAY_2 /** Frame delay = 2 */
142}; 142};
143 143
144enum ia_css_frame_flash_state { 144enum ia_css_frame_flash_state {
@@ -147,13 +147,13 @@ enum ia_css_frame_flash_state {
147 IA_CSS_FRAME_FLASH_STATE_FULL 147 IA_CSS_FRAME_FLASH_STATE_FULL
148}; 148};
149 149
150/** Frame structure. This structure describes an image buffer or frame. 150/* Frame structure. This structure describes an image buffer or frame.
151 * This is the main structure used for all input and output images. 151 * This is the main structure used for all input and output images.
152 */ 152 */
153struct ia_css_frame { 153struct ia_css_frame {
154 struct ia_css_frame_info info; /**< info struct describing the frame */ 154 struct ia_css_frame_info info; /** info struct describing the frame */
155 ia_css_ptr data; /**< pointer to start of image data */ 155 ia_css_ptr data; /** pointer to start of image data */
156 unsigned int data_bytes; /**< size of image data in bytes */ 156 unsigned int data_bytes; /** size of image data in bytes */
157 /* LA: move this to ia_css_buffer */ 157 /* LA: move this to ia_css_buffer */
158 /* 158 /*
159 * -1 if data address is static during life time of pipeline 159 * -1 if data address is static during life time of pipeline
@@ -171,10 +171,10 @@ struct ia_css_frame {
171 enum ia_css_buffer_type buf_type; 171 enum ia_css_buffer_type buf_type;
172 enum ia_css_frame_flash_state flash_state; 172 enum ia_css_frame_flash_state flash_state;
173 unsigned int exp_id; 173 unsigned int exp_id;
174 /**< exposure id, see ia_css_event_public.h for more detail */ 174 /** exposure id, see ia_css_event_public.h for more detail */
175 uint32_t isp_config_id; /**< Unique ID to track which config was actually applied to a particular frame */ 175 uint32_t isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */
176 bool valid; /**< First video output frame is not valid */ 176 bool valid; /** First video output frame is not valid */
177 bool contiguous; /**< memory is allocated physically contiguously */ 177 bool contiguous; /** memory is allocated physically contiguously */
178 union { 178 union {
179 unsigned int _initialisation_dummy; 179 unsigned int _initialisation_dummy;
180 struct ia_css_frame_plane raw; 180 struct ia_css_frame_plane raw;
@@ -185,7 +185,7 @@ struct ia_css_frame {
185 struct ia_css_frame_nv_planes nv; 185 struct ia_css_frame_nv_planes nv;
186 struct ia_css_frame_plane6_planes plane6; 186 struct ia_css_frame_plane6_planes plane6;
187 struct ia_css_frame_binary_plane binary; 187 struct ia_css_frame_binary_plane binary;
188 } planes; /**< frame planes, select the right one based on 188 } planes; /** frame planes, select the right one based on
189 info.format */ 189 info.format */
190}; 190};
191 191
@@ -204,7 +204,7 @@ struct ia_css_frame {
204 { 0 } /* planes */ \ 204 { 0 } /* planes */ \
205} 205}
206 206
207/** @brief Fill a frame with zeros 207/* @brief Fill a frame with zeros
208 * 208 *
209 * @param frame The frame. 209 * @param frame The frame.
210 * @return None 210 * @return None
@@ -213,7 +213,7 @@ struct ia_css_frame {
213 */ 213 */
214void ia_css_frame_zero(struct ia_css_frame *frame); 214void ia_css_frame_zero(struct ia_css_frame *frame);
215 215
216/** @brief Allocate a CSS frame structure 216/* @brief Allocate a CSS frame structure
217 * 217 *
218 * @param frame The allocated frame. 218 * @param frame The allocated frame.
219 * @param width The width (in pixels) of the frame. 219 * @param width The width (in pixels) of the frame.
@@ -234,7 +234,7 @@ ia_css_frame_allocate(struct ia_css_frame **frame,
234 unsigned int stride, 234 unsigned int stride,
235 unsigned int raw_bit_depth); 235 unsigned int raw_bit_depth);
236 236
237/** @brief Allocate a CSS frame structure using a frame info structure. 237/* @brief Allocate a CSS frame structure using a frame info structure.
238 * 238 *
239 * @param frame The allocated frame. 239 * @param frame The allocated frame.
240 * @param[in] info The frame info structure. 240 * @param[in] info The frame info structure.
@@ -247,7 +247,7 @@ ia_css_frame_allocate(struct ia_css_frame **frame,
247enum ia_css_err 247enum ia_css_err
248ia_css_frame_allocate_from_info(struct ia_css_frame **frame, 248ia_css_frame_allocate_from_info(struct ia_css_frame **frame,
249 const struct ia_css_frame_info *info); 249 const struct ia_css_frame_info *info);
250/** @brief Free a CSS frame structure. 250/* @brief Free a CSS frame structure.
251 * 251 *
252 * @param[in] frame Pointer to the frame. 252 * @param[in] frame Pointer to the frame.
253 * @return None 253 * @return None
@@ -258,7 +258,7 @@ ia_css_frame_allocate_from_info(struct ia_css_frame **frame,
258void 258void
259ia_css_frame_free(struct ia_css_frame *frame); 259ia_css_frame_free(struct ia_css_frame *frame);
260 260
261/** @brief Allocate a contiguous CSS frame structure 261/* @brief Allocate a contiguous CSS frame structure
262 * 262 *
263 * @param frame The allocated frame. 263 * @param frame The allocated frame.
264 * @param width The width (in pixels) of the frame. 264 * @param width The width (in pixels) of the frame.
@@ -280,7 +280,7 @@ ia_css_frame_allocate_contiguous(struct ia_css_frame **frame,
280 unsigned int stride, 280 unsigned int stride,
281 unsigned int raw_bit_depth); 281 unsigned int raw_bit_depth);
282 282
283/** @brief Allocate a contiguous CSS frame from a frame info structure. 283/* @brief Allocate a contiguous CSS frame from a frame info structure.
284 * 284 *
285 * @param frame The allocated frame. 285 * @param frame The allocated frame.
286 * @param[in] info The frame info structure. 286 * @param[in] info The frame info structure.
@@ -296,7 +296,7 @@ enum ia_css_err
296ia_css_frame_allocate_contiguous_from_info(struct ia_css_frame **frame, 296ia_css_frame_allocate_contiguous_from_info(struct ia_css_frame **frame,
297 const struct ia_css_frame_info *info); 297 const struct ia_css_frame_info *info);
298 298
299/** @brief Allocate a CSS frame structure using a frame info structure. 299/* @brief Allocate a CSS frame structure using a frame info structure.
300 * 300 *
301 * @param frame The allocated frame. 301 * @param frame The allocated frame.
302 * @param[in] info The frame info structure. 302 * @param[in] info The frame info structure.
@@ -309,7 +309,7 @@ enum ia_css_err
309ia_css_frame_create_from_info(struct ia_css_frame **frame, 309ia_css_frame_create_from_info(struct ia_css_frame **frame,
310 const struct ia_css_frame_info *info); 310 const struct ia_css_frame_info *info);
311 311
312/** @brief Set a mapped data buffer to a CSS frame 312/* @brief Set a mapped data buffer to a CSS frame
313 * 313 *
314 * @param[in] frame Valid CSS frame pointer 314 * @param[in] frame Valid CSS frame pointer
315 * @param[in] mapped_data Mapped data buffer to be assigned to the CSS frame 315 * @param[in] mapped_data Mapped data buffer to be assigned to the CSS frame
@@ -327,7 +327,7 @@ ia_css_frame_set_data(struct ia_css_frame *frame,
327 const ia_css_ptr mapped_data, 327 const ia_css_ptr mapped_data,
328 size_t data_size_bytes); 328 size_t data_size_bytes);
329 329
330/** @brief Map an existing frame data pointer to a CSS frame. 330/* @brief Map an existing frame data pointer to a CSS frame.
331 * 331 *
332 * @param frame Pointer to the frame to be initialized 332 * @param frame Pointer to the frame to be initialized
333 * @param[in] info The frame info. 333 * @param[in] info The frame info.
@@ -350,7 +350,7 @@ ia_css_frame_map(struct ia_css_frame **frame,
350 uint16_t attribute, 350 uint16_t attribute,
351 void *context); 351 void *context);
352 352
353/** @brief Unmap a CSS frame structure. 353/* @brief Unmap a CSS frame structure.
354 * 354 *
355 * @param[in] frame Pointer to the CSS frame. 355 * @param[in] frame Pointer to the CSS frame.
356 * @return None 356 * @return None
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h
index 8a17c3346caa..f415570a3da9 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_INPUT_PORT_H 15#ifndef __IA_CSS_INPUT_PORT_H
16#define __IA_CSS_INPUT_PORT_H 16#define __IA_CSS_INPUT_PORT_H
17 17
18/** @file 18/* @file
19 * This file contains information about the possible input ports for CSS 19 * This file contains information about the possible input ports for CSS
20 */ 20 */
21 21
22/** Enumeration of the physical input ports on the CSS hardware. 22/* Enumeration of the physical input ports on the CSS hardware.
23 * There are 3 MIPI CSI-2 ports. 23 * There are 3 MIPI CSI-2 ports.
24 */ 24 */
25enum ia_css_csi2_port { 25enum ia_css_csi2_port {
@@ -28,39 +28,39 @@ enum ia_css_csi2_port {
28 IA_CSS_CSI2_PORT2 /* Implicitly map to MIPI_PORT2_ID */ 28 IA_CSS_CSI2_PORT2 /* Implicitly map to MIPI_PORT2_ID */
29}; 29};
30 30
31/** Backward compatible for CSS API 2.0 only 31/* Backward compatible for CSS API 2.0 only
32 * TO BE REMOVED when all drivers move to CSS API 2.1 32 * TO BE REMOVED when all drivers move to CSS API 2.1
33 */ 33 */
34#define IA_CSS_CSI2_PORT_4LANE IA_CSS_CSI2_PORT0 34#define IA_CSS_CSI2_PORT_4LANE IA_CSS_CSI2_PORT0
35#define IA_CSS_CSI2_PORT_1LANE IA_CSS_CSI2_PORT1 35#define IA_CSS_CSI2_PORT_1LANE IA_CSS_CSI2_PORT1
36#define IA_CSS_CSI2_PORT_2LANE IA_CSS_CSI2_PORT2 36#define IA_CSS_CSI2_PORT_2LANE IA_CSS_CSI2_PORT2
37 37
38/** The CSI2 interface supports 2 types of compression or can 38/* The CSI2 interface supports 2 types of compression or can
39 * be run without compression. 39 * be run without compression.
40 */ 40 */
41enum ia_css_csi2_compression_type { 41enum ia_css_csi2_compression_type {
42 IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /**< No compression */ 42 IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /** No compression */
43 IA_CSS_CSI2_COMPRESSION_TYPE_1, /**< Compression scheme 1 */ 43 IA_CSS_CSI2_COMPRESSION_TYPE_1, /** Compression scheme 1 */
44 IA_CSS_CSI2_COMPRESSION_TYPE_2 /**< Compression scheme 2 */ 44 IA_CSS_CSI2_COMPRESSION_TYPE_2 /** Compression scheme 2 */
45}; 45};
46 46
47struct ia_css_csi2_compression { 47struct ia_css_csi2_compression {
48 enum ia_css_csi2_compression_type type; 48 enum ia_css_csi2_compression_type type;
49 /**< Compression used */ 49 /** Compression used */
50 unsigned int compressed_bits_per_pixel; 50 unsigned int compressed_bits_per_pixel;
51 /**< Compressed bits per pixel (only when compression is enabled) */ 51 /** Compressed bits per pixel (only when compression is enabled) */
52 unsigned int uncompressed_bits_per_pixel; 52 unsigned int uncompressed_bits_per_pixel;
53 /**< Uncompressed bits per pixel (only when compression is enabled) */ 53 /** Uncompressed bits per pixel (only when compression is enabled) */
54}; 54};
55 55
56/** Input port structure. 56/* Input port structure.
57 */ 57 */
58struct ia_css_input_port { 58struct ia_css_input_port {
59 enum ia_css_csi2_port port; /**< Physical CSI-2 port */ 59 enum ia_css_csi2_port port; /** Physical CSI-2 port */
60 unsigned int num_lanes; /**< Number of lanes used (4-lane port only) */ 60 unsigned int num_lanes; /** Number of lanes used (4-lane port only) */
61 unsigned int timeout; /**< Timeout value */ 61 unsigned int timeout; /** Timeout value */
62 unsigned int rxcount; /**< Register value, should include all lanes */ 62 unsigned int rxcount; /** Register value, should include all lanes */
63 struct ia_css_csi2_compression compression; /**< Compression used */ 63 struct ia_css_csi2_compression compression; /** Compression used */
64}; 64};
65 65
66#endif /* __IA_CSS_INPUT_PORT_H */ 66#endif /* __IA_CSS_INPUT_PORT_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h
index 416ca4d28732..10ef61178bb2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_IRQ_H 15#ifndef __IA_CSS_IRQ_H
16#define __IA_CSS_IRQ_H 16#define __IA_CSS_IRQ_H
17 17
18/** @file 18/* @file
19 * This file contains information for Interrupts/IRQs from CSS 19 * This file contains information for Interrupts/IRQs from CSS
20 */ 20 */
21 21
@@ -23,14 +23,14 @@
23#include "ia_css_pipe_public.h" 23#include "ia_css_pipe_public.h"
24#include "ia_css_input_port.h" 24#include "ia_css_input_port.h"
25 25
26/** Interrupt types, these enumerate all supported interrupt types. 26/* Interrupt types, these enumerate all supported interrupt types.
27 */ 27 */
28enum ia_css_irq_type { 28enum ia_css_irq_type {
29 IA_CSS_IRQ_TYPE_EDGE, /**< Edge (level) sensitive interrupt */ 29 IA_CSS_IRQ_TYPE_EDGE, /** Edge (level) sensitive interrupt */
30 IA_CSS_IRQ_TYPE_PULSE /**< Pulse-shaped interrupt */ 30 IA_CSS_IRQ_TYPE_PULSE /** Pulse-shaped interrupt */
31}; 31};
32 32
33/** Interrupt request type. 33/* Interrupt request type.
34 * When the CSS hardware generates an interrupt, a function in this API 34 * When the CSS hardware generates an interrupt, a function in this API
35 * needs to be called to retrieve information about the interrupt. 35 * needs to be called to retrieve information about the interrupt.
36 * This interrupt type is part of this information and indicates what 36 * This interrupt type is part of this information and indicates what
@@ -46,55 +46,55 @@ enum ia_css_irq_type {
46 */ 46 */
47enum ia_css_irq_info { 47enum ia_css_irq_info {
48 IA_CSS_IRQ_INFO_CSS_RECEIVER_ERROR = 1 << 0, 48 IA_CSS_IRQ_INFO_CSS_RECEIVER_ERROR = 1 << 0,
49 /**< the css receiver has encountered an error */ 49 /** the css receiver has encountered an error */
50 IA_CSS_IRQ_INFO_CSS_RECEIVER_FIFO_OVERFLOW = 1 << 1, 50 IA_CSS_IRQ_INFO_CSS_RECEIVER_FIFO_OVERFLOW = 1 << 1,
51 /**< the FIFO in the csi receiver has overflown */ 51 /** the FIFO in the csi receiver has overflown */
52 IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF = 1 << 2, 52 IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF = 1 << 2,
53 /**< the css receiver received the start of frame */ 53 /** the css receiver received the start of frame */
54 IA_CSS_IRQ_INFO_CSS_RECEIVER_EOF = 1 << 3, 54 IA_CSS_IRQ_INFO_CSS_RECEIVER_EOF = 1 << 3,
55 /**< the css receiver received the end of frame */ 55 /** the css receiver received the end of frame */
56 IA_CSS_IRQ_INFO_CSS_RECEIVER_SOL = 1 << 4, 56 IA_CSS_IRQ_INFO_CSS_RECEIVER_SOL = 1 << 4,
57 /**< the css receiver received the start of line */ 57 /** the css receiver received the start of line */
58 IA_CSS_IRQ_INFO_PSYS_EVENTS_READY = 1 << 5, 58 IA_CSS_IRQ_INFO_PSYS_EVENTS_READY = 1 << 5,
59 /**< One or more events are available in the PSYS event queue */ 59 /** One or more events are available in the PSYS event queue */
60 IA_CSS_IRQ_INFO_EVENTS_READY = IA_CSS_IRQ_INFO_PSYS_EVENTS_READY, 60 IA_CSS_IRQ_INFO_EVENTS_READY = IA_CSS_IRQ_INFO_PSYS_EVENTS_READY,
61 /**< deprecated{obsolete version of IA_CSS_IRQ_INFO_PSYS_EVENTS_READY, 61 /** deprecated{obsolete version of IA_CSS_IRQ_INFO_PSYS_EVENTS_READY,
62 * same functionality.} */ 62 * same functionality.} */
63 IA_CSS_IRQ_INFO_CSS_RECEIVER_EOL = 1 << 6, 63 IA_CSS_IRQ_INFO_CSS_RECEIVER_EOL = 1 << 6,
64 /**< the css receiver received the end of line */ 64 /** the css receiver received the end of line */
65 IA_CSS_IRQ_INFO_CSS_RECEIVER_SIDEBAND_CHANGED = 1 << 7, 65 IA_CSS_IRQ_INFO_CSS_RECEIVER_SIDEBAND_CHANGED = 1 << 7,
66 /**< the css receiver received a change in side band signals */ 66 /** the css receiver received a change in side band signals */
67 IA_CSS_IRQ_INFO_CSS_RECEIVER_GEN_SHORT_0 = 1 << 8, 67 IA_CSS_IRQ_INFO_CSS_RECEIVER_GEN_SHORT_0 = 1 << 8,
68 /**< generic short packets (0) */ 68 /** generic short packets (0) */
69 IA_CSS_IRQ_INFO_CSS_RECEIVER_GEN_SHORT_1 = 1 << 9, 69 IA_CSS_IRQ_INFO_CSS_RECEIVER_GEN_SHORT_1 = 1 << 9,
70 /**< generic short packets (1) */ 70 /** generic short packets (1) */
71 IA_CSS_IRQ_INFO_IF_PRIM_ERROR = 1 << 10, 71 IA_CSS_IRQ_INFO_IF_PRIM_ERROR = 1 << 10,
72 /**< the primary input formatter (A) has encountered an error */ 72 /** the primary input formatter (A) has encountered an error */
73 IA_CSS_IRQ_INFO_IF_PRIM_B_ERROR = 1 << 11, 73 IA_CSS_IRQ_INFO_IF_PRIM_B_ERROR = 1 << 11,
74 /**< the primary input formatter (B) has encountered an error */ 74 /** the primary input formatter (B) has encountered an error */
75 IA_CSS_IRQ_INFO_IF_SEC_ERROR = 1 << 12, 75 IA_CSS_IRQ_INFO_IF_SEC_ERROR = 1 << 12,
76 /**< the secondary input formatter has encountered an error */ 76 /** the secondary input formatter has encountered an error */
77 IA_CSS_IRQ_INFO_STREAM_TO_MEM_ERROR = 1 << 13, 77 IA_CSS_IRQ_INFO_STREAM_TO_MEM_ERROR = 1 << 13,
78 /**< the stream-to-memory device has encountered an error */ 78 /** the stream-to-memory device has encountered an error */
79 IA_CSS_IRQ_INFO_SW_0 = 1 << 14, 79 IA_CSS_IRQ_INFO_SW_0 = 1 << 14,
80 /**< software interrupt 0 */ 80 /** software interrupt 0 */
81 IA_CSS_IRQ_INFO_SW_1 = 1 << 15, 81 IA_CSS_IRQ_INFO_SW_1 = 1 << 15,
82 /**< software interrupt 1 */ 82 /** software interrupt 1 */
83 IA_CSS_IRQ_INFO_SW_2 = 1 << 16, 83 IA_CSS_IRQ_INFO_SW_2 = 1 << 16,
84 /**< software interrupt 2 */ 84 /** software interrupt 2 */
85 IA_CSS_IRQ_INFO_ISP_BINARY_STATISTICS_READY = 1 << 17, 85 IA_CSS_IRQ_INFO_ISP_BINARY_STATISTICS_READY = 1 << 17,
86 /**< ISP binary statistics are ready */ 86 /** ISP binary statistics are ready */
87 IA_CSS_IRQ_INFO_INPUT_SYSTEM_ERROR = 1 << 18, 87 IA_CSS_IRQ_INFO_INPUT_SYSTEM_ERROR = 1 << 18,
88 /**< the input system in in error */ 88 /** the input system in in error */
89 IA_CSS_IRQ_INFO_IF_ERROR = 1 << 19, 89 IA_CSS_IRQ_INFO_IF_ERROR = 1 << 19,
90 /**< the input formatter in in error */ 90 /** the input formatter in in error */
91 IA_CSS_IRQ_INFO_DMA_ERROR = 1 << 20, 91 IA_CSS_IRQ_INFO_DMA_ERROR = 1 << 20,
92 /**< the dma in in error */ 92 /** the dma in in error */
93 IA_CSS_IRQ_INFO_ISYS_EVENTS_READY = 1 << 21, 93 IA_CSS_IRQ_INFO_ISYS_EVENTS_READY = 1 << 21,
94 /**< end-of-frame events are ready in the isys_event queue */ 94 /** end-of-frame events are ready in the isys_event queue */
95}; 95};
96 96
97/** CSS receiver error types. Whenever the CSS receiver has encountered 97/* CSS receiver error types. Whenever the CSS receiver has encountered
98 * an error, this enumeration is used to indicate which errors have occurred. 98 * an error, this enumeration is used to indicate which errors have occurred.
99 * 99 *
100 * Note that multiple error flags can be enabled at once and that this is in 100 * Note that multiple error flags can be enabled at once and that this is in
@@ -105,39 +105,39 @@ enum ia_css_irq_info {
105 * different receiver types, or possibly none in case of tests systems. 105 * different receiver types, or possibly none in case of tests systems.
106 */ 106 */
107enum ia_css_rx_irq_info { 107enum ia_css_rx_irq_info {
108 IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN = 1U << 0, /**< buffer overrun */ 108 IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN = 1U << 0, /** buffer overrun */
109 IA_CSS_RX_IRQ_INFO_ENTER_SLEEP_MODE = 1U << 1, /**< entering sleep mode */ 109 IA_CSS_RX_IRQ_INFO_ENTER_SLEEP_MODE = 1U << 1, /** entering sleep mode */
110 IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE = 1U << 2, /**< exited sleep mode */ 110 IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE = 1U << 2, /** exited sleep mode */
111 IA_CSS_RX_IRQ_INFO_ECC_CORRECTED = 1U << 3, /**< ECC corrected */ 111 IA_CSS_RX_IRQ_INFO_ECC_CORRECTED = 1U << 3, /** ECC corrected */
112 IA_CSS_RX_IRQ_INFO_ERR_SOT = 1U << 4, 112 IA_CSS_RX_IRQ_INFO_ERR_SOT = 1U << 4,
113 /**< Start of transmission */ 113 /** Start of transmission */
114 IA_CSS_RX_IRQ_INFO_ERR_SOT_SYNC = 1U << 5, /**< SOT sync (??) */ 114 IA_CSS_RX_IRQ_INFO_ERR_SOT_SYNC = 1U << 5, /** SOT sync (??) */
115 IA_CSS_RX_IRQ_INFO_ERR_CONTROL = 1U << 6, /**< Control (??) */ 115 IA_CSS_RX_IRQ_INFO_ERR_CONTROL = 1U << 6, /** Control (??) */
116 IA_CSS_RX_IRQ_INFO_ERR_ECC_DOUBLE = 1U << 7, /**< Double ECC */ 116 IA_CSS_RX_IRQ_INFO_ERR_ECC_DOUBLE = 1U << 7, /** Double ECC */
117 IA_CSS_RX_IRQ_INFO_ERR_CRC = 1U << 8, /**< CRC error */ 117 IA_CSS_RX_IRQ_INFO_ERR_CRC = 1U << 8, /** CRC error */
118 IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ID = 1U << 9, /**< Unknown ID */ 118 IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ID = 1U << 9, /** Unknown ID */
119 IA_CSS_RX_IRQ_INFO_ERR_FRAME_SYNC = 1U << 10,/**< Frame sync error */ 119 IA_CSS_RX_IRQ_INFO_ERR_FRAME_SYNC = 1U << 10,/** Frame sync error */
120 IA_CSS_RX_IRQ_INFO_ERR_FRAME_DATA = 1U << 11,/**< Frame data error */ 120 IA_CSS_RX_IRQ_INFO_ERR_FRAME_DATA = 1U << 11,/** Frame data error */
121 IA_CSS_RX_IRQ_INFO_ERR_DATA_TIMEOUT = 1U << 12,/**< Timeout occurred */ 121 IA_CSS_RX_IRQ_INFO_ERR_DATA_TIMEOUT = 1U << 12,/** Timeout occurred */
122 IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ESC = 1U << 13,/**< Unknown escape seq. */ 122 IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ESC = 1U << 13,/** Unknown escape seq. */
123 IA_CSS_RX_IRQ_INFO_ERR_LINE_SYNC = 1U << 14,/**< Line Sync error */ 123 IA_CSS_RX_IRQ_INFO_ERR_LINE_SYNC = 1U << 14,/** Line Sync error */
124 IA_CSS_RX_IRQ_INFO_INIT_TIMEOUT = 1U << 15, 124 IA_CSS_RX_IRQ_INFO_INIT_TIMEOUT = 1U << 15,
125}; 125};
126 126
127/** Interrupt info structure. This structure contains information about an 127/* Interrupt info structure. This structure contains information about an
128 * interrupt. This needs to be used after an interrupt is received on the IA 128 * interrupt. This needs to be used after an interrupt is received on the IA
129 * to perform the correct action. 129 * to perform the correct action.
130 */ 130 */
131struct ia_css_irq { 131struct ia_css_irq {
132 enum ia_css_irq_info type; /**< Interrupt type. */ 132 enum ia_css_irq_info type; /** Interrupt type. */
133 unsigned int sw_irq_0_val; /**< In case of SW interrupt 0, value. */ 133 unsigned int sw_irq_0_val; /** In case of SW interrupt 0, value. */
134 unsigned int sw_irq_1_val; /**< In case of SW interrupt 1, value. */ 134 unsigned int sw_irq_1_val; /** In case of SW interrupt 1, value. */
135 unsigned int sw_irq_2_val; /**< In case of SW interrupt 2, value. */ 135 unsigned int sw_irq_2_val; /** In case of SW interrupt 2, value. */
136 struct ia_css_pipe *pipe; 136 struct ia_css_pipe *pipe;
137 /**< The image pipe that generated the interrupt. */ 137 /** The image pipe that generated the interrupt. */
138}; 138};
139 139
140/** @brief Obtain interrupt information. 140/* @brief Obtain interrupt information.
141 * 141 *
142 * @param[out] info Pointer to the interrupt info. The interrupt 142 * @param[out] info Pointer to the interrupt info. The interrupt
143 * information wil be written to this info. 143 * information wil be written to this info.
@@ -154,7 +154,7 @@ struct ia_css_irq {
154enum ia_css_err 154enum ia_css_err
155ia_css_irq_translate(unsigned int *info); 155ia_css_irq_translate(unsigned int *info);
156 156
157/** @brief Get CSI receiver error info. 157/* @brief Get CSI receiver error info.
158 * 158 *
159 * @param[out] irq_bits Pointer to the interrupt bits. The interrupt 159 * @param[out] irq_bits Pointer to the interrupt bits. The interrupt
160 * bits will be written this info. 160 * bits will be written this info.
@@ -172,7 +172,7 @@ ia_css_irq_translate(unsigned int *info);
172void 172void
173ia_css_rx_get_irq_info(unsigned int *irq_bits); 173ia_css_rx_get_irq_info(unsigned int *irq_bits);
174 174
175/** @brief Get CSI receiver error info. 175/* @brief Get CSI receiver error info.
176 * 176 *
177 * @param[in] port Input port identifier. 177 * @param[in] port Input port identifier.
178 * @param[out] irq_bits Pointer to the interrupt bits. The interrupt 178 * @param[out] irq_bits Pointer to the interrupt bits. The interrupt
@@ -188,7 +188,7 @@ ia_css_rx_get_irq_info(unsigned int *irq_bits);
188void 188void
189ia_css_rx_port_get_irq_info(enum ia_css_csi2_port port, unsigned int *irq_bits); 189ia_css_rx_port_get_irq_info(enum ia_css_csi2_port port, unsigned int *irq_bits);
190 190
191/** @brief Clear CSI receiver error info. 191/* @brief Clear CSI receiver error info.
192 * 192 *
193 * @param[in] irq_bits The bits that should be cleared from the CSI receiver 193 * @param[in] irq_bits The bits that should be cleared from the CSI receiver
194 * interrupt bits register. 194 * interrupt bits register.
@@ -205,7 +205,7 @@ ia_css_rx_port_get_irq_info(enum ia_css_csi2_port port, unsigned int *irq_bits);
205void 205void
206ia_css_rx_clear_irq_info(unsigned int irq_bits); 206ia_css_rx_clear_irq_info(unsigned int irq_bits);
207 207
208/** @brief Clear CSI receiver error info. 208/* @brief Clear CSI receiver error info.
209 * 209 *
210 * @param[in] port Input port identifier. 210 * @param[in] port Input port identifier.
211 * @param[in] irq_bits The bits that should be cleared from the CSI receiver 211 * @param[in] irq_bits The bits that should be cleared from the CSI receiver
@@ -220,7 +220,7 @@ ia_css_rx_clear_irq_info(unsigned int irq_bits);
220void 220void
221ia_css_rx_port_clear_irq_info(enum ia_css_csi2_port port, unsigned int irq_bits); 221ia_css_rx_port_clear_irq_info(enum ia_css_csi2_port port, unsigned int irq_bits);
222 222
223/** @brief Enable or disable specific interrupts. 223/* @brief Enable or disable specific interrupts.
224 * 224 *
225 * @param[in] type The interrupt type that will be enabled/disabled. 225 * @param[in] type The interrupt type that will be enabled/disabled.
226 * @param[in] enable enable or disable. 226 * @param[in] enable enable or disable.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h
index c40c5a19bfe1..8b674c98224c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_METADATA_H 15#ifndef __IA_CSS_METADATA_H
16#define __IA_CSS_METADATA_H 16#define __IA_CSS_METADATA_H
17 17
18/** @file 18/* @file
19 * This file contains structure for processing sensor metadata. 19 * This file contains structure for processing sensor metadata.
20 */ 20 */
21 21
@@ -23,32 +23,32 @@
23#include "ia_css_types.h" 23#include "ia_css_types.h"
24#include "ia_css_stream_format.h" 24#include "ia_css_stream_format.h"
25 25
26/** Metadata configuration. This data structure contains necessary info 26/* Metadata configuration. This data structure contains necessary info
27 * to process sensor metadata. 27 * to process sensor metadata.
28 */ 28 */
29struct ia_css_metadata_config { 29struct ia_css_metadata_config {
30 enum ia_css_stream_format data_type; /**< Data type of CSI-2 embedded 30 enum ia_css_stream_format data_type; /** Data type of CSI-2 embedded
31 data. The default value is IA_CSS_STREAM_FORMAT_EMBEDDED. For 31 data. The default value is IA_CSS_STREAM_FORMAT_EMBEDDED. For
32 certain sensors, user can choose non-default data type for embedded 32 certain sensors, user can choose non-default data type for embedded
33 data. */ 33 data. */
34 struct ia_css_resolution resolution; /**< Resolution */ 34 struct ia_css_resolution resolution; /** Resolution */
35}; 35};
36 36
37struct ia_css_metadata_info { 37struct ia_css_metadata_info {
38 struct ia_css_resolution resolution; /**< Resolution */ 38 struct ia_css_resolution resolution; /** Resolution */
39 uint32_t stride; /**< Stride in bytes */ 39 uint32_t stride; /** Stride in bytes */
40 uint32_t size; /**< Total size in bytes */ 40 uint32_t size; /** Total size in bytes */
41}; 41};
42 42
43struct ia_css_metadata { 43struct ia_css_metadata {
44 struct ia_css_metadata_info info; /**< Layout info */ 44 struct ia_css_metadata_info info; /** Layout info */
45 ia_css_ptr address; /**< CSS virtual address */ 45 ia_css_ptr address; /** CSS virtual address */
46 uint32_t exp_id; 46 uint32_t exp_id;
47 /**< Exposure ID, see ia_css_event_public.h for more detail */ 47 /** Exposure ID, see ia_css_event_public.h for more detail */
48}; 48};
49#define SIZE_OF_IA_CSS_METADATA_STRUCT sizeof(struct ia_css_metadata) 49#define SIZE_OF_IA_CSS_METADATA_STRUCT sizeof(struct ia_css_metadata)
50 50
51/** @brief Allocate a metadata buffer. 51/* @brief Allocate a metadata buffer.
52 * @param[in] metadata_info Metadata info struct, contains details on metadata buffers. 52 * @param[in] metadata_info Metadata info struct, contains details on metadata buffers.
53 * @return Pointer of metadata buffer or NULL (if error) 53 * @return Pointer of metadata buffer or NULL (if error)
54 * 54 *
@@ -58,7 +58,7 @@ struct ia_css_metadata {
58struct ia_css_metadata * 58struct ia_css_metadata *
59ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info); 59ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info);
60 60
61/** @brief Free a metadata buffer. 61/* @brief Free a metadata buffer.
62 * 62 *
63 * @param[in] metadata Pointer of metadata buffer. 63 * @param[in] metadata Pointer of metadata buffer.
64 * @return None 64 * @return None
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h
index fd2c01b60b28..f9c9cd76be97 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_MIPI_H 15#ifndef __IA_CSS_MIPI_H
16#define __IA_CSS_MIPI_H 16#define __IA_CSS_MIPI_H
17 17
18/** @file 18/* @file
19 * This file contains MIPI support functionality 19 * This file contains MIPI support functionality
20 */ 20 */
21 21
@@ -24,10 +24,10 @@
24#include "ia_css_stream_format.h" 24#include "ia_css_stream_format.h"
25#include "ia_css_input_port.h" 25#include "ia_css_input_port.h"
26 26
27/** Backward compatible for CSS API 2.0 only 27/* Backward compatible for CSS API 2.0 only
28 * TO BE REMOVED when all drivers move to CSS API 2.1. 28 * TO BE REMOVED when all drivers move to CSS API 2.1.
29 */ 29 */
30/** @brief Specify a CSS MIPI frame buffer. 30/* @brief Specify a CSS MIPI frame buffer.
31 * 31 *
32 * @param[in] size_mem_words The frame size in memory words (32B). 32 * @param[in] size_mem_words The frame size in memory words (32B).
33 * @param[in] contiguous Allocate memory physically contiguously or not. 33 * @param[in] contiguous Allocate memory physically contiguously or not.
@@ -42,7 +42,7 @@ ia_css_mipi_frame_specify(const unsigned int size_mem_words,
42 const bool contiguous); 42 const bool contiguous);
43 43
44#if !defined(HAS_NO_INPUT_SYSTEM) 44#if !defined(HAS_NO_INPUT_SYSTEM)
45/** @brief Register size of a CSS MIPI frame for check during capturing. 45/* @brief Register size of a CSS MIPI frame for check during capturing.
46 * 46 *
47 * @param[in] port CSI-2 port this check is registered. 47 * @param[in] port CSI-2 port this check is registered.
48 * @param[in] size_mem_words The frame size in memory words (32B). 48 * @param[in] size_mem_words The frame size in memory words (32B).
@@ -59,7 +59,7 @@ ia_css_mipi_frame_enable_check_on_size(const enum ia_css_csi2_port port,
59 const unsigned int size_mem_words); 59 const unsigned int size_mem_words);
60#endif 60#endif
61 61
62/** @brief Calculate the size of a mipi frame. 62/* @brief Calculate the size of a mipi frame.
63 * 63 *
64 * @param[in] width The width (in pixels) of the frame. 64 * @param[in] width The width (in pixels) of the frame.
65 * @param[in] height The height (in lines) of the frame. 65 * @param[in] height The height (in lines) of the frame.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h
index 48f8855d61f6..13c21056bfbf 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_MMU_H 15#ifndef __IA_CSS_MMU_H
16#define __IA_CSS_MMU_H 16#define __IA_CSS_MMU_H
17 17
18/** @file 18/* @file
19 * This file contains one support function for invalidating the CSS MMU cache 19 * This file contains one support function for invalidating the CSS MMU cache
20 */ 20 */
21 21
22/** @brief Invalidate the MMU internal cache. 22/* @brief Invalidate the MMU internal cache.
23 * @return None 23 * @return None
24 * 24 *
25 * This function triggers an invalidation of the translate-look-aside 25 * This function triggers an invalidation of the translate-look-aside
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h
index 969840da52b2..de409638d009 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h
@@ -15,13 +15,13 @@
15#ifndef __IA_CSS_MORPH_H 15#ifndef __IA_CSS_MORPH_H
16#define __IA_CSS_MORPH_H 16#define __IA_CSS_MORPH_H
17 17
18/** @file 18/* @file
19 * This file contains supporting for morphing table 19 * This file contains supporting for morphing table
20 */ 20 */
21 21
22#include <ia_css_types.h> 22#include <ia_css_types.h>
23 23
24/** @brief Morphing table 24/* @brief Morphing table
25 * @param[in] width Width of the morphing table. 25 * @param[in] width Width of the morphing table.
26 * @param[in] height Height of the morphing table. 26 * @param[in] height Height of the morphing table.
27 * @return Pointer to the morphing table 27 * @return Pointer to the morphing table
@@ -29,7 +29,7 @@
29struct ia_css_morph_table * 29struct ia_css_morph_table *
30ia_css_morph_table_allocate(unsigned int width, unsigned int height); 30ia_css_morph_table_allocate(unsigned int width, unsigned int height);
31 31
32/** @brief Free the morph table 32/* @brief Free the morph table
33 * @param[in] me Pointer to the morph table. 33 * @param[in] me Pointer to the morph table.
34 * @return None 34 * @return None
35*/ 35*/
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h
index 733e0ef3afe8..df0aad9a6ab9 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_PIPE_PUBLIC_H 15#ifndef __IA_CSS_PIPE_PUBLIC_H
16#define __IA_CSS_PIPE_PUBLIC_H 16#define __IA_CSS_PIPE_PUBLIC_H
17 17
18/** @file 18/* @file
19 * This file contains the public interface for CSS pipes. 19 * This file contains the public interface for CSS pipes.
20 */ 20 */
21 21
@@ -34,7 +34,7 @@ enum {
34 IA_CSS_PIPE_MAX_OUTPUT_STAGE, 34 IA_CSS_PIPE_MAX_OUTPUT_STAGE,
35}; 35};
36 36
37/** Enumeration of pipe modes. This mode can be used to create 37/* Enumeration of pipe modes. This mode can be used to create
38 * an image pipe for this mode. These pipes can be combined 38 * an image pipe for this mode. These pipes can be combined
39 * to configure and run streams on the ISP. 39 * to configure and run streams on the ISP.
40 * 40 *
@@ -42,12 +42,12 @@ enum {
42 * create a continuous capture stream. 42 * create a continuous capture stream.
43 */ 43 */
44enum ia_css_pipe_mode { 44enum ia_css_pipe_mode {
45 IA_CSS_PIPE_MODE_PREVIEW, /**< Preview pipe */ 45 IA_CSS_PIPE_MODE_PREVIEW, /** Preview pipe */
46 IA_CSS_PIPE_MODE_VIDEO, /**< Video pipe */ 46 IA_CSS_PIPE_MODE_VIDEO, /** Video pipe */
47 IA_CSS_PIPE_MODE_CAPTURE, /**< Still capture pipe */ 47 IA_CSS_PIPE_MODE_CAPTURE, /** Still capture pipe */
48 IA_CSS_PIPE_MODE_ACC, /**< Accelerated pipe */ 48 IA_CSS_PIPE_MODE_ACC, /** Accelerated pipe */
49 IA_CSS_PIPE_MODE_COPY, /**< Copy pipe, only used for embedded/image data copying */ 49 IA_CSS_PIPE_MODE_COPY, /** Copy pipe, only used for embedded/image data copying */
50 IA_CSS_PIPE_MODE_YUVPP, /**< YUV post processing pipe, used for all use cases with YUV input, 50 IA_CSS_PIPE_MODE_YUVPP, /** YUV post processing pipe, used for all use cases with YUV input,
51 for SoC sensor and external ISP */ 51 for SoC sensor and external ISP */
52}; 52};
53/* Temporary define */ 53/* Temporary define */
@@ -58,10 +58,10 @@ enum ia_css_pipe_mode {
58 * the order should match with definition in sh_css_defs.h 58 * the order should match with definition in sh_css_defs.h
59 */ 59 */
60enum ia_css_pipe_version { 60enum ia_css_pipe_version {
61 IA_CSS_PIPE_VERSION_1 = 1, /**< ISP1.0 pipe */ 61 IA_CSS_PIPE_VERSION_1 = 1, /** ISP1.0 pipe */
62 IA_CSS_PIPE_VERSION_2_2 = 2, /**< ISP2.2 pipe */ 62 IA_CSS_PIPE_VERSION_2_2 = 2, /** ISP2.2 pipe */
63 IA_CSS_PIPE_VERSION_2_6_1 = 3, /**< ISP2.6.1 pipe */ 63 IA_CSS_PIPE_VERSION_2_6_1 = 3, /** ISP2.6.1 pipe */
64 IA_CSS_PIPE_VERSION_2_7 = 4 /**< ISP2.7 pipe */ 64 IA_CSS_PIPE_VERSION_2_7 = 4 /** ISP2.7 pipe */
65}; 65};
66 66
67/** 67/**
@@ -71,79 +71,79 @@ enum ia_css_pipe_version {
71 */ 71 */
72struct ia_css_pipe_config { 72struct ia_css_pipe_config {
73 enum ia_css_pipe_mode mode; 73 enum ia_css_pipe_mode mode;
74 /**< mode, indicates which mode the pipe should use. */ 74 /** mode, indicates which mode the pipe should use. */
75 enum ia_css_pipe_version isp_pipe_version; 75 enum ia_css_pipe_version isp_pipe_version;
76 /**< pipe version, indicates which imaging pipeline the pipe should use. */ 76 /** pipe version, indicates which imaging pipeline the pipe should use. */
77 struct ia_css_resolution input_effective_res; 77 struct ia_css_resolution input_effective_res;
78 /**< input effective resolution */ 78 /** input effective resolution */
79 struct ia_css_resolution bayer_ds_out_res; 79 struct ia_css_resolution bayer_ds_out_res;
80 /**< bayer down scaling */ 80 /** bayer down scaling */
81 struct ia_css_resolution capt_pp_in_res; 81 struct ia_css_resolution capt_pp_in_res;
82#ifndef ISP2401 82#ifndef ISP2401
83 /**< bayer down scaling */ 83 /** bayer down scaling */
84#else 84#else
85 /**< capture post processing input resolution */ 85 /** capture post processing input resolution */
86#endif 86#endif
87 struct ia_css_resolution vf_pp_in_res; 87 struct ia_css_resolution vf_pp_in_res;
88#ifndef ISP2401 88#ifndef ISP2401
89 /**< bayer down scaling */ 89 /** bayer down scaling */
90#else 90#else
91 /**< view finder post processing input resolution */ 91 /** view finder post processing input resolution */
92 struct ia_css_resolution output_system_in_res; 92 struct ia_css_resolution output_system_in_res;
93 /**< For IPU3 only: use output_system_in_res to specify what input resolution 93 /** For IPU3 only: use output_system_in_res to specify what input resolution
94 will OSYS receive, this resolution is equal to the output resolution of GDC 94 will OSYS receive, this resolution is equal to the output resolution of GDC
95 if not determined CSS will set output_system_in_res with main osys output pin resolution 95 if not determined CSS will set output_system_in_res with main osys output pin resolution
96 All other IPUs may ignore this property */ 96 All other IPUs may ignore this property */
97#endif 97#endif
98 struct ia_css_resolution dvs_crop_out_res; 98 struct ia_css_resolution dvs_crop_out_res;
99 /**< dvs crop, video only, not in use yet. Use dvs_envelope below. */ 99 /** dvs crop, video only, not in use yet. Use dvs_envelope below. */
100 struct ia_css_frame_info output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; 100 struct ia_css_frame_info output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
101 /**< output of YUV scaling */ 101 /** output of YUV scaling */
102 struct ia_css_frame_info vf_output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; 102 struct ia_css_frame_info vf_output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
103 /**< output of VF YUV scaling */ 103 /** output of VF YUV scaling */
104 struct ia_css_fw_info *acc_extension; 104 struct ia_css_fw_info *acc_extension;
105 /**< Pipeline extension accelerator */ 105 /** Pipeline extension accelerator */
106 struct ia_css_fw_info **acc_stages; 106 struct ia_css_fw_info **acc_stages;
107 /**< Standalone accelerator stages */ 107 /** Standalone accelerator stages */
108 uint32_t num_acc_stages; 108 uint32_t num_acc_stages;
109 /**< Number of standalone accelerator stages */ 109 /** Number of standalone accelerator stages */
110 struct ia_css_capture_config default_capture_config; 110 struct ia_css_capture_config default_capture_config;
111 /**< Default capture config for initial capture pipe configuration. */ 111 /** Default capture config for initial capture pipe configuration. */
112 struct ia_css_resolution dvs_envelope; /**< temporary */ 112 struct ia_css_resolution dvs_envelope; /** temporary */
113 enum ia_css_frame_delay dvs_frame_delay; 113 enum ia_css_frame_delay dvs_frame_delay;
114 /**< indicates the DVS loop delay in frame periods */ 114 /** indicates the DVS loop delay in frame periods */
115 int acc_num_execs; 115 int acc_num_execs;
116 /**< For acceleration pipes only: determine how many times the pipe 116 /** For acceleration pipes only: determine how many times the pipe
117 should be run. Setting this to -1 means it will run until 117 should be run. Setting this to -1 means it will run until
118 stopped. */ 118 stopped. */
119 bool enable_dz; 119 bool enable_dz;
120 /**< Disabling digital zoom for a pipeline, if this is set to false, 120 /** Disabling digital zoom for a pipeline, if this is set to false,
121 then setting a zoom factor will have no effect. 121 then setting a zoom factor will have no effect.
122 In some use cases this provides better performance. */ 122 In some use cases this provides better performance. */
123 bool enable_dpc; 123 bool enable_dpc;
124 /**< Disabling "Defect Pixel Correction" for a pipeline, if this is set 124 /** Disabling "Defect Pixel Correction" for a pipeline, if this is set
125 to false. In some use cases this provides better performance. */ 125 to false. In some use cases this provides better performance. */
126 bool enable_vfpp_bci; 126 bool enable_vfpp_bci;
127 /**< Enabling BCI mode will cause yuv_scale binary to be picked up 127 /** Enabling BCI mode will cause yuv_scale binary to be picked up
128 instead of vf_pp. This only applies to viewfinder post 128 instead of vf_pp. This only applies to viewfinder post
129 processing stages. */ 129 processing stages. */
130#ifdef ISP2401 130#ifdef ISP2401
131 bool enable_luma_only; 131 bool enable_luma_only;
132 /**< Enabling of monochrome mode for a pipeline. If enabled only luma processing 132 /** Enabling of monochrome mode for a pipeline. If enabled only luma processing
133 will be done. */ 133 will be done. */
134 bool enable_tnr; 134 bool enable_tnr;
135 /**< Enabling of TNR (temporal noise reduction). This is only applicable to video 135 /** Enabling of TNR (temporal noise reduction). This is only applicable to video
136 pipes. Non video-pipes should always set this parameter to false. */ 136 pipes. Non video-pipes should always set this parameter to false. */
137#endif 137#endif
138 struct ia_css_isp_config *p_isp_config; 138 struct ia_css_isp_config *p_isp_config;
139 /**< Pointer to ISP configuration */ 139 /** Pointer to ISP configuration */
140 struct ia_css_resolution gdc_in_buffer_res; 140 struct ia_css_resolution gdc_in_buffer_res;
141 /**< GDC in buffer resolution. */ 141 /** GDC in buffer resolution. */
142 struct ia_css_point gdc_in_buffer_offset; 142 struct ia_css_point gdc_in_buffer_offset;
143 /**< GDC in buffer offset - indicates the pixel coordinates of the first valid pixel inside the buffer */ 143 /** GDC in buffer offset - indicates the pixel coordinates of the first valid pixel inside the buffer */
144#ifdef ISP2401 144#ifdef ISP2401
145 struct ia_css_coordinate internal_frame_origin_bqs_on_sctbl; 145 struct ia_css_coordinate internal_frame_origin_bqs_on_sctbl;
146 /**< Origin of internal frame positioned on shading table at shading correction in ISP. 146 /** Origin of internal frame positioned on shading table at shading correction in ISP.
147 NOTE: Shading table is larger than or equal to internal frame. 147 NOTE: Shading table is larger than or equal to internal frame.
148 Shading table has shading gains and internal frame has bayer data. 148 Shading table has shading gains and internal frame has bayer data.
149 The origin of internal frame is used in shading correction in ISP 149 The origin of internal frame is used in shading correction in ISP
@@ -228,20 +228,20 @@ struct ia_css_pipe_config {
228 228
229#endif 229#endif
230 230
231/** Pipe info, this struct describes properties of a pipe after it's stream has 231/* Pipe info, this struct describes properties of a pipe after it's stream has
232 * been created. 232 * been created.
233 * ~~~** DO NOT ADD NEW FIELD **~~~ This structure will be deprecated. 233 * ~~~** DO NOT ADD NEW FIELD **~~~ This structure will be deprecated.
234 * - On the Behalf of CSS-API Committee. 234 * - On the Behalf of CSS-API Committee.
235 */ 235 */
236struct ia_css_pipe_info { 236struct ia_css_pipe_info {
237 struct ia_css_frame_info output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; 237 struct ia_css_frame_info output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
238 /**< Info about output resolution. This contains the stride which 238 /** Info about output resolution. This contains the stride which
239 should be used for memory allocation. */ 239 should be used for memory allocation. */
240 struct ia_css_frame_info vf_output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; 240 struct ia_css_frame_info vf_output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
241 /**< Info about viewfinder output resolution (optional). This contains 241 /** Info about viewfinder output resolution (optional). This contains
242 the stride that should be used for memory allocation. */ 242 the stride that should be used for memory allocation. */
243 struct ia_css_frame_info raw_output_info; 243 struct ia_css_frame_info raw_output_info;
244 /**< Raw output resolution. This indicates the resolution of the 244 /** Raw output resolution. This indicates the resolution of the
245 RAW bayer output for pipes that support this. Currently, only the 245 RAW bayer output for pipes that support this. Currently, only the
246 still capture pipes support this feature. When this resolution is 246 still capture pipes support this feature. When this resolution is
247 smaller than the input resolution, cropping will be performed by 247 smaller than the input resolution, cropping will be performed by
@@ -252,17 +252,17 @@ struct ia_css_pipe_info {
252 the input resolution - 8x8. */ 252 the input resolution - 8x8. */
253#ifdef ISP2401 253#ifdef ISP2401
254 struct ia_css_resolution output_system_in_res_info; 254 struct ia_css_resolution output_system_in_res_info;
255 /**< For IPU3 only. Info about output system in resolution which is considered 255 /** For IPU3 only. Info about output system in resolution which is considered
256 as gdc out resolution. */ 256 as gdc out resolution. */
257#endif 257#endif
258 struct ia_css_shading_info shading_info; 258 struct ia_css_shading_info shading_info;
259 /**< After an image pipe is created, this field will contain the info 259 /** After an image pipe is created, this field will contain the info
260 for the shading correction. */ 260 for the shading correction. */
261 struct ia_css_grid_info grid_info; 261 struct ia_css_grid_info grid_info;
262 /**< After an image pipe is created, this field will contain the grid 262 /** After an image pipe is created, this field will contain the grid
263 info for 3A and DVS. */ 263 info for 3A and DVS. */
264 int num_invalid_frames; 264 int num_invalid_frames;
265 /**< The very first frames in a started stream do not contain valid data. 265 /** The very first frames in a started stream do not contain valid data.
266 In this field, the CSS-firmware communicates to the host-driver how 266 In this field, the CSS-firmware communicates to the host-driver how
267 many initial frames will contain invalid data; this allows the 267 many initial frames will contain invalid data; this allows the
268 host-driver to discard those initial invalid frames and start it's 268 host-driver to discard those initial invalid frames and start it's
@@ -299,7 +299,7 @@ struct ia_css_pipe_info {
299 299
300#endif 300#endif
301 301
302/** @brief Load default pipe configuration 302/* @brief Load default pipe configuration
303 * @param[out] pipe_config The pipe configuration. 303 * @param[out] pipe_config The pipe configuration.
304 * @return None 304 * @return None
305 * 305 *
@@ -334,7 +334,7 @@ struct ia_css_pipe_info {
334 */ 334 */
335void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config); 335void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config);
336 336
337/** @brief Create a pipe 337/* @brief Create a pipe
338 * @param[in] config The pipe configuration. 338 * @param[in] config The pipe configuration.
339 * @param[out] pipe The pipe. 339 * @param[out] pipe The pipe.
340 * @return IA_CSS_SUCCESS or the error code. 340 * @return IA_CSS_SUCCESS or the error code.
@@ -346,7 +346,7 @@ enum ia_css_err
346ia_css_pipe_create(const struct ia_css_pipe_config *config, 346ia_css_pipe_create(const struct ia_css_pipe_config *config,
347 struct ia_css_pipe **pipe); 347 struct ia_css_pipe **pipe);
348 348
349/** @brief Destroy a pipe 349/* @brief Destroy a pipe
350 * @param[in] pipe The pipe. 350 * @param[in] pipe The pipe.
351 * @return IA_CSS_SUCCESS or the error code. 351 * @return IA_CSS_SUCCESS or the error code.
352 * 352 *
@@ -355,7 +355,7 @@ ia_css_pipe_create(const struct ia_css_pipe_config *config,
355enum ia_css_err 355enum ia_css_err
356ia_css_pipe_destroy(struct ia_css_pipe *pipe); 356ia_css_pipe_destroy(struct ia_css_pipe *pipe);
357 357
358/** @brief Provides information about a pipe 358/* @brief Provides information about a pipe
359 * @param[in] pipe The pipe. 359 * @param[in] pipe The pipe.
360 * @param[out] pipe_info The pipe information. 360 * @param[out] pipe_info The pipe information.
361 * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS. 361 * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS.
@@ -366,7 +366,7 @@ enum ia_css_err
366ia_css_pipe_get_info(const struct ia_css_pipe *pipe, 366ia_css_pipe_get_info(const struct ia_css_pipe *pipe,
367 struct ia_css_pipe_info *pipe_info); 367 struct ia_css_pipe_info *pipe_info);
368 368
369/** @brief Configure a pipe with filter coefficients. 369/* @brief Configure a pipe with filter coefficients.
370 * @param[in] pipe The pipe. 370 * @param[in] pipe The pipe.
371 * @param[in] config The pointer to ISP configuration. 371 * @param[in] config The pointer to ISP configuration.
372 * @return IA_CSS_SUCCESS or error code upon error. 372 * @return IA_CSS_SUCCESS or error code upon error.
@@ -378,7 +378,7 @@ enum ia_css_err
378ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe, 378ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
379 struct ia_css_isp_config *config); 379 struct ia_css_isp_config *config);
380 380
381/** @brief Controls when the Event generator raises an IRQ to the Host. 381/* @brief Controls when the Event generator raises an IRQ to the Host.
382 * 382 *
383 * @param[in] pipe The pipe. 383 * @param[in] pipe The pipe.
384 * @param[in] or_mask Binary or of enum ia_css_event_irq_mask_type. Each pipe 384 * @param[in] or_mask Binary or of enum ia_css_event_irq_mask_type. Each pipe
@@ -455,7 +455,7 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
455 unsigned int or_mask, 455 unsigned int or_mask,
456 unsigned int and_mask); 456 unsigned int and_mask);
457 457
458/** @brief Reads the current event IRQ mask from the CSS. 458/* @brief Reads the current event IRQ mask from the CSS.
459 * 459 *
460 * @param[in] pipe The pipe. 460 * @param[in] pipe The pipe.
461 * @param[out] or_mask Current or_mask. The bits in this mask are a binary or 461 * @param[out] or_mask Current or_mask. The bits in this mask are a binary or
@@ -476,7 +476,7 @@ ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe,
476 unsigned int *or_mask, 476 unsigned int *or_mask,
477 unsigned int *and_mask); 477 unsigned int *and_mask);
478 478
479/** @brief Queue a buffer for an image pipe. 479/* @brief Queue a buffer for an image pipe.
480 * 480 *
481 * @param[in] pipe The pipe that will own the buffer. 481 * @param[in] pipe The pipe that will own the buffer.
482 * @param[in] buffer Pointer to the buffer. 482 * @param[in] buffer Pointer to the buffer.
@@ -498,7 +498,7 @@ enum ia_css_err
498ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe, 498ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
499 const struct ia_css_buffer *buffer); 499 const struct ia_css_buffer *buffer);
500 500
501/** @brief Dequeue a buffer from an image pipe. 501/* @brief Dequeue a buffer from an image pipe.
502 * 502 *
503 * @param[in] pipe The pipeline that the buffer queue belongs to. 503 * @param[in] pipe The pipeline that the buffer queue belongs to.
504 * @param[in,out] buffer The buffer is used to lookup the type which determines 504 * @param[in,out] buffer The buffer is used to lookup the type which determines
@@ -519,7 +519,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
519 struct ia_css_buffer *buffer); 519 struct ia_css_buffer *buffer);
520 520
521 521
522/** @brief Set the state (Enable or Disable) of the Extension stage in the 522/* @brief Set the state (Enable or Disable) of the Extension stage in the
523 * given pipe. 523 * given pipe.
524 * @param[in] pipe Pipe handle. 524 * @param[in] pipe Pipe handle.
525 * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle) 525 * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle)
@@ -546,7 +546,7 @@ ia_css_pipe_set_qos_ext_state (struct ia_css_pipe *pipe,
546 uint32_t fw_handle, 546 uint32_t fw_handle,
547 bool enable); 547 bool enable);
548 548
549/** @brief Get the state (Enable or Disable) of the Extension stage in the 549/* @brief Get the state (Enable or Disable) of the Extension stage in the
550 * given pipe. 550 * given pipe.
551 * @param[in] pipe Pipe handle. 551 * @param[in] pipe Pipe handle.
552 * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle) 552 * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle)
@@ -573,7 +573,7 @@ ia_css_pipe_get_qos_ext_state (struct ia_css_pipe *pipe,
573 bool * enable); 573 bool * enable);
574 574
575#ifdef ISP2401 575#ifdef ISP2401
576/** @brief Update mapped CSS and ISP arguments for QoS pipe during SP runtime. 576/* @brief Update mapped CSS and ISP arguments for QoS pipe during SP runtime.
577 * @param[in] pipe Pipe handle. 577 * @param[in] pipe Pipe handle.
578 * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle). 578 * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle).
579 * @param[in] css_seg Parameter memory descriptors for CSS segments. 579 * @param[in] css_seg Parameter memory descriptors for CSS segments.
@@ -595,7 +595,7 @@ ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_hand
595 struct ia_css_isp_param_isp_segments *isp_seg); 595 struct ia_css_isp_param_isp_segments *isp_seg);
596 596
597#endif 597#endif
598/** @brief Get selected configuration settings 598/* @brief Get selected configuration settings
599 * @param[in] pipe The pipe. 599 * @param[in] pipe The pipe.
600 * @param[out] config Configuration settings. 600 * @param[out] config Configuration settings.
601 * @return None 601 * @return None
@@ -604,7 +604,7 @@ void
604ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe, 604ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
605 struct ia_css_isp_config *config); 605 struct ia_css_isp_config *config);
606 606
607/** @brief Set the scaler lut on this pipe. A copy of lut is made in the inuit 607/* @brief Set the scaler lut on this pipe. A copy of lut is made in the inuit
608 * address space. So the LUT can be freed by caller. 608 * address space. So the LUT can be freed by caller.
609 * @param[in] pipe Pipe handle. 609 * @param[in] pipe Pipe handle.
610 * @param[in] lut Look up tabel 610 * @param[in] lut Look up tabel
@@ -623,7 +623,7 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
623enum ia_css_err 623enum ia_css_err
624ia_css_pipe_set_bci_scaler_lut( struct ia_css_pipe *pipe, 624ia_css_pipe_set_bci_scaler_lut( struct ia_css_pipe *pipe,
625 const void *lut); 625 const void *lut);
626/** @brief Checking of DVS statistics ability 626/* @brief Checking of DVS statistics ability
627 * @param[in] pipe_info The pipe info. 627 * @param[in] pipe_info The pipe info.
628 * @return true - has DVS statistics ability 628 * @return true - has DVS statistics ability
629 * false - otherwise 629 * false - otherwise
@@ -631,7 +631,7 @@ ia_css_pipe_set_bci_scaler_lut( struct ia_css_pipe *pipe,
631bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info); 631bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info);
632 632
633#ifdef ISP2401 633#ifdef ISP2401
634/** @brief Override the frameformat set on the output pins. 634/* @brief Override the frameformat set on the output pins.
635 * @param[in] pipe Pipe handle. 635 * @param[in] pipe Pipe handle.
636 * @param[in] output_pin Pin index to set the format on 636 * @param[in] output_pin Pin index to set the format on
637 * 0 - main output pin 637 * 0 - main output pin
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h
index 9b0eeb08ca04..6f24656b6cb4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_PRBS_H 15#ifndef __IA_CSS_PRBS_H
16#define __IA_CSS_PRBS_H 16#define __IA_CSS_PRBS_H
17 17
18/** @file 18/* @file
19 * This file contains support for Pseudo Random Bit Sequence (PRBS) inputs 19 * This file contains support for Pseudo Random Bit Sequence (PRBS) inputs
20 */ 20 */
21 21
22/** Enumerate the PRBS IDs. 22/* Enumerate the PRBS IDs.
23 */ 23 */
24enum ia_css_prbs_id { 24enum ia_css_prbs_id {
25 IA_CSS_PRBS_ID0, 25 IA_CSS_PRBS_ID0,
@@ -44,10 +44,10 @@ enum ia_css_prbs_id {
44 */ 44 */
45struct ia_css_prbs_config { 45struct ia_css_prbs_config {
46 enum ia_css_prbs_id id; 46 enum ia_css_prbs_id id;
47 unsigned int h_blank; /**< horizontal blank */ 47 unsigned int h_blank; /** horizontal blank */
48 unsigned int v_blank; /**< vertical blank */ 48 unsigned int v_blank; /** vertical blank */
49 int seed; /**< random seed for the 1st 2-pixel-components/clock */ 49 int seed; /** random seed for the 1st 2-pixel-components/clock */
50 int seed1; /**< random seed for the 2nd 2-pixel-components/clock */ 50 int seed1; /** random seed for the 2nd 2-pixel-components/clock */
51}; 51};
52 52
53#endif /* __IA_CSS_PRBS_H */ 53#endif /* __IA_CSS_PRBS_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h
index 19af4021b24c..9a167306611c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_PROPERTIES_H 15#ifndef __IA_CSS_PROPERTIES_H
16#define __IA_CSS_PROPERTIES_H 16#define __IA_CSS_PROPERTIES_H
17 17
18/** @file 18/* @file
19 * This file contains support for retrieving properties of some hardware the CSS system 19 * This file contains support for retrieving properties of some hardware the CSS system
20 */ 20 */
21 21
@@ -24,12 +24,12 @@
24 24
25struct ia_css_properties { 25struct ia_css_properties {
26 int gdc_coord_one; 26 int gdc_coord_one;
27 bool l1_base_is_index; /**< Indicate whether the L1 page base 27 bool l1_base_is_index; /** Indicate whether the L1 page base
28 is a page index or a byte address. */ 28 is a page index or a byte address. */
29 enum ia_css_vamem_type vamem_type; 29 enum ia_css_vamem_type vamem_type;
30}; 30};
31 31
32/** @brief Get hardware properties 32/* @brief Get hardware properties
33 * @param[in,out] properties The hardware properties 33 * @param[in,out] properties The hardware properties
34 * @return None 34 * @return None
35 * 35 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h
index cb0f249e98c8..588f53d32b72 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h
@@ -15,13 +15,13 @@
15#ifndef __IA_CSS_SHADING_H 15#ifndef __IA_CSS_SHADING_H
16#define __IA_CSS_SHADING_H 16#define __IA_CSS_SHADING_H
17 17
18/** @file 18/* @file
19 * This file contains support for setting the shading table for CSS 19 * This file contains support for setting the shading table for CSS
20 */ 20 */
21 21
22#include <ia_css_types.h> 22#include <ia_css_types.h>
23 23
24/** @brief Shading table 24/* @brief Shading table
25 * @param[in] width Width of the shading table. 25 * @param[in] width Width of the shading table.
26 * @param[in] height Height of the shading table. 26 * @param[in] height Height of the shading table.
27 * @return Pointer to the shading table 27 * @return Pointer to the shading table
@@ -30,7 +30,7 @@ struct ia_css_shading_table *
30ia_css_shading_table_alloc(unsigned int width, 30ia_css_shading_table_alloc(unsigned int width,
31 unsigned int height); 31 unsigned int height);
32 32
33/** @brief Free shading table 33/* @brief Free shading table
34 * @param[in] table Pointer to the shading table. 34 * @param[in] table Pointer to the shading table.
35 * @return None 35 * @return None
36*/ 36*/
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h
index 453fe4db0133..fb6e8c2ca8bf 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h
@@ -48,7 +48,7 @@ struct ia_css_stream {
48 bool started; 48 bool started;
49}; 49};
50 50
51/** @brief Get a binary in the stream, which binary has the shading correction. 51/* @brief Get a binary in the stream, which binary has the shading correction.
52 * 52 *
53 * @param[in] stream: The stream. 53 * @param[in] stream: The stream.
54 * @return The binary which has the shading correction. 54 * @return The binary which has the shading correction.
@@ -76,7 +76,7 @@ sh_css_invalidate_params(struct ia_css_stream *stream);
76const struct ia_css_fpn_table * 76const struct ia_css_fpn_table *
77ia_css_get_fpn_table(struct ia_css_stream *stream); 77ia_css_get_fpn_table(struct ia_css_stream *stream);
78 78
79/** @brief Get a pointer to the shading table. 79/* @brief Get a pointer to the shading table.
80 * 80 *
81 * @param[in] stream: The stream. 81 * @param[in] stream: The stream.
82 * @return The pointer to the shading table. 82 * @return The pointer to the shading table.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h
index ae608a9c9051..f7e9020a86e1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h
@@ -15,74 +15,74 @@
15#ifndef __IA_CSS_STREAM_FORMAT_H 15#ifndef __IA_CSS_STREAM_FORMAT_H
16#define __IA_CSS_STREAM_FORMAT_H 16#define __IA_CSS_STREAM_FORMAT_H
17 17
18/** @file 18/* @file
19 * This file contains formats usable for ISP streaming input 19 * This file contains formats usable for ISP streaming input
20 */ 20 */
21 21
22#include <type_support.h> /* bool */ 22#include <type_support.h> /* bool */
23 23
24/** The ISP streaming input interface supports the following formats. 24/* The ISP streaming input interface supports the following formats.
25 * These match the corresponding MIPI formats. 25 * These match the corresponding MIPI formats.
26 */ 26 */
27enum ia_css_stream_format { 27enum ia_css_stream_format {
28 IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, /**< 8 bits per subpixel */ 28 IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, /** 8 bits per subpixel */
29 IA_CSS_STREAM_FORMAT_YUV420_8, /**< 8 bits per subpixel */ 29 IA_CSS_STREAM_FORMAT_YUV420_8, /** 8 bits per subpixel */
30 IA_CSS_STREAM_FORMAT_YUV420_10, /**< 10 bits per subpixel */ 30 IA_CSS_STREAM_FORMAT_YUV420_10, /** 10 bits per subpixel */
31 IA_CSS_STREAM_FORMAT_YUV420_16, /**< 16 bits per subpixel */ 31 IA_CSS_STREAM_FORMAT_YUV420_16, /** 16 bits per subpixel */
32 IA_CSS_STREAM_FORMAT_YUV422_8, /**< UYVY..UYVY, 8 bits per subpixel */ 32 IA_CSS_STREAM_FORMAT_YUV422_8, /** UYVY..UYVY, 8 bits per subpixel */
33 IA_CSS_STREAM_FORMAT_YUV422_10, /**< UYVY..UYVY, 10 bits per subpixel */ 33 IA_CSS_STREAM_FORMAT_YUV422_10, /** UYVY..UYVY, 10 bits per subpixel */
34 IA_CSS_STREAM_FORMAT_YUV422_16, /**< UYVY..UYVY, 16 bits per subpixel */ 34 IA_CSS_STREAM_FORMAT_YUV422_16, /** UYVY..UYVY, 16 bits per subpixel */
35 IA_CSS_STREAM_FORMAT_RGB_444, /**< BGR..BGR, 4 bits per subpixel */ 35 IA_CSS_STREAM_FORMAT_RGB_444, /** BGR..BGR, 4 bits per subpixel */
36 IA_CSS_STREAM_FORMAT_RGB_555, /**< BGR..BGR, 5 bits per subpixel */ 36 IA_CSS_STREAM_FORMAT_RGB_555, /** BGR..BGR, 5 bits per subpixel */
37 IA_CSS_STREAM_FORMAT_RGB_565, /**< BGR..BGR, 5 bits B and R, 6 bits G */ 37 IA_CSS_STREAM_FORMAT_RGB_565, /** BGR..BGR, 5 bits B and R, 6 bits G */
38 IA_CSS_STREAM_FORMAT_RGB_666, /**< BGR..BGR, 6 bits per subpixel */ 38 IA_CSS_STREAM_FORMAT_RGB_666, /** BGR..BGR, 6 bits per subpixel */
39 IA_CSS_STREAM_FORMAT_RGB_888, /**< BGR..BGR, 8 bits per subpixel */ 39 IA_CSS_STREAM_FORMAT_RGB_888, /** BGR..BGR, 8 bits per subpixel */
40 IA_CSS_STREAM_FORMAT_RAW_6, /**< RAW data, 6 bits per pixel */ 40 IA_CSS_STREAM_FORMAT_RAW_6, /** RAW data, 6 bits per pixel */
41 IA_CSS_STREAM_FORMAT_RAW_7, /**< RAW data, 7 bits per pixel */ 41 IA_CSS_STREAM_FORMAT_RAW_7, /** RAW data, 7 bits per pixel */
42 IA_CSS_STREAM_FORMAT_RAW_8, /**< RAW data, 8 bits per pixel */ 42 IA_CSS_STREAM_FORMAT_RAW_8, /** RAW data, 8 bits per pixel */
43 IA_CSS_STREAM_FORMAT_RAW_10, /**< RAW data, 10 bits per pixel */ 43 IA_CSS_STREAM_FORMAT_RAW_10, /** RAW data, 10 bits per pixel */
44 IA_CSS_STREAM_FORMAT_RAW_12, /**< RAW data, 12 bits per pixel */ 44 IA_CSS_STREAM_FORMAT_RAW_12, /** RAW data, 12 bits per pixel */
45 IA_CSS_STREAM_FORMAT_RAW_14, /**< RAW data, 14 bits per pixel */ 45 IA_CSS_STREAM_FORMAT_RAW_14, /** RAW data, 14 bits per pixel */
46 IA_CSS_STREAM_FORMAT_RAW_16, /**< RAW data, 16 bits per pixel, which is 46 IA_CSS_STREAM_FORMAT_RAW_16, /** RAW data, 16 bits per pixel, which is
47 not specified in CSI-MIPI standard*/ 47 not specified in CSI-MIPI standard*/
48 IA_CSS_STREAM_FORMAT_BINARY_8, /**< Binary byte stream, which is target at 48 IA_CSS_STREAM_FORMAT_BINARY_8, /** Binary byte stream, which is target at
49 JPEG. */ 49 JPEG. */
50 50
51 /** CSI2-MIPI specific format: Generic short packet data. It is used to 51 /* CSI2-MIPI specific format: Generic short packet data. It is used to
52 * keep the timing information for the opening/closing of shutters, 52 * keep the timing information for the opening/closing of shutters,
53 * triggering of flashes and etc. 53 * triggering of flashes and etc.
54 */ 54 */
55 IA_CSS_STREAM_FORMAT_GENERIC_SHORT1, /**< Generic Short Packet Code 1 */ 55 IA_CSS_STREAM_FORMAT_GENERIC_SHORT1, /** Generic Short Packet Code 1 */
56 IA_CSS_STREAM_FORMAT_GENERIC_SHORT2, /**< Generic Short Packet Code 2 */ 56 IA_CSS_STREAM_FORMAT_GENERIC_SHORT2, /** Generic Short Packet Code 2 */
57 IA_CSS_STREAM_FORMAT_GENERIC_SHORT3, /**< Generic Short Packet Code 3 */ 57 IA_CSS_STREAM_FORMAT_GENERIC_SHORT3, /** Generic Short Packet Code 3 */
58 IA_CSS_STREAM_FORMAT_GENERIC_SHORT4, /**< Generic Short Packet Code 4 */ 58 IA_CSS_STREAM_FORMAT_GENERIC_SHORT4, /** Generic Short Packet Code 4 */
59 IA_CSS_STREAM_FORMAT_GENERIC_SHORT5, /**< Generic Short Packet Code 5 */ 59 IA_CSS_STREAM_FORMAT_GENERIC_SHORT5, /** Generic Short Packet Code 5 */
60 IA_CSS_STREAM_FORMAT_GENERIC_SHORT6, /**< Generic Short Packet Code 6 */ 60 IA_CSS_STREAM_FORMAT_GENERIC_SHORT6, /** Generic Short Packet Code 6 */
61 IA_CSS_STREAM_FORMAT_GENERIC_SHORT7, /**< Generic Short Packet Code 7 */ 61 IA_CSS_STREAM_FORMAT_GENERIC_SHORT7, /** Generic Short Packet Code 7 */
62 IA_CSS_STREAM_FORMAT_GENERIC_SHORT8, /**< Generic Short Packet Code 8 */ 62 IA_CSS_STREAM_FORMAT_GENERIC_SHORT8, /** Generic Short Packet Code 8 */
63 63
64 /** CSI2-MIPI specific format: YUV data. 64 /* CSI2-MIPI specific format: YUV data.
65 */ 65 */
66 IA_CSS_STREAM_FORMAT_YUV420_8_SHIFT, /**< YUV420 8-bit (Chroma Shifted Pixel Sampling) */ 66 IA_CSS_STREAM_FORMAT_YUV420_8_SHIFT, /** YUV420 8-bit (Chroma Shifted Pixel Sampling) */
67 IA_CSS_STREAM_FORMAT_YUV420_10_SHIFT, /**< YUV420 8-bit (Chroma Shifted Pixel Sampling) */ 67 IA_CSS_STREAM_FORMAT_YUV420_10_SHIFT, /** YUV420 8-bit (Chroma Shifted Pixel Sampling) */
68 68
69 /** CSI2-MIPI specific format: Generic long packet data 69 /* CSI2-MIPI specific format: Generic long packet data
70 */ 70 */
71 IA_CSS_STREAM_FORMAT_EMBEDDED, /**< Embedded 8-bit non Image Data */ 71 IA_CSS_STREAM_FORMAT_EMBEDDED, /** Embedded 8-bit non Image Data */
72 72
73 /** CSI2-MIPI specific format: User defined byte-based data. For example, 73 /* CSI2-MIPI specific format: User defined byte-based data. For example,
74 * the data transmitter (e.g. the SoC sensor) can keep the JPEG data as 74 * the data transmitter (e.g. the SoC sensor) can keep the JPEG data as
75 * the User Defined Data Type 4 and the MPEG data as the 75 * the User Defined Data Type 4 and the MPEG data as the
76 * User Defined Data Type 7. 76 * User Defined Data Type 7.
77 */ 77 */
78 IA_CSS_STREAM_FORMAT_USER_DEF1, /**< User defined 8-bit data type 1 */ 78 IA_CSS_STREAM_FORMAT_USER_DEF1, /** User defined 8-bit data type 1 */
79 IA_CSS_STREAM_FORMAT_USER_DEF2, /**< User defined 8-bit data type 2 */ 79 IA_CSS_STREAM_FORMAT_USER_DEF2, /** User defined 8-bit data type 2 */
80 IA_CSS_STREAM_FORMAT_USER_DEF3, /**< User defined 8-bit data type 3 */ 80 IA_CSS_STREAM_FORMAT_USER_DEF3, /** User defined 8-bit data type 3 */
81 IA_CSS_STREAM_FORMAT_USER_DEF4, /**< User defined 8-bit data type 4 */ 81 IA_CSS_STREAM_FORMAT_USER_DEF4, /** User defined 8-bit data type 4 */
82 IA_CSS_STREAM_FORMAT_USER_DEF5, /**< User defined 8-bit data type 5 */ 82 IA_CSS_STREAM_FORMAT_USER_DEF5, /** User defined 8-bit data type 5 */
83 IA_CSS_STREAM_FORMAT_USER_DEF6, /**< User defined 8-bit data type 6 */ 83 IA_CSS_STREAM_FORMAT_USER_DEF6, /** User defined 8-bit data type 6 */
84 IA_CSS_STREAM_FORMAT_USER_DEF7, /**< User defined 8-bit data type 7 */ 84 IA_CSS_STREAM_FORMAT_USER_DEF7, /** User defined 8-bit data type 7 */
85 IA_CSS_STREAM_FORMAT_USER_DEF8, /**< User defined 8-bit data type 8 */ 85 IA_CSS_STREAM_FORMAT_USER_DEF8, /** User defined 8-bit data type 8 */
86}; 86};
87 87
88#define IA_CSS_STREAM_FORMAT_NUM IA_CSS_STREAM_FORMAT_USER_DEF8 88#define IA_CSS_STREAM_FORMAT_NUM IA_CSS_STREAM_FORMAT_USER_DEF8
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h
index 2c8d9de10a59..ca3203357ff5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_STREAM_PUBLIC_H 15#ifndef __IA_CSS_STREAM_PUBLIC_H
16#define __IA_CSS_STREAM_PUBLIC_H 16#define __IA_CSS_STREAM_PUBLIC_H
17 17
18/** @file 18/* @file
19 * This file contains support for configuring and controlling streams 19 * This file contains support for configuring and controlling streams
20 */ 20 */
21 21
@@ -27,26 +27,26 @@
27#include "ia_css_prbs.h" 27#include "ia_css_prbs.h"
28#include "ia_css_input_port.h" 28#include "ia_css_input_port.h"
29 29
30/** Input modes, these enumerate all supported input modes. 30/* Input modes, these enumerate all supported input modes.
31 * Note that not all ISP modes support all input modes. 31 * Note that not all ISP modes support all input modes.
32 */ 32 */
33enum ia_css_input_mode { 33enum ia_css_input_mode {
34 IA_CSS_INPUT_MODE_SENSOR, /**< data from sensor */ 34 IA_CSS_INPUT_MODE_SENSOR, /** data from sensor */
35 IA_CSS_INPUT_MODE_FIFO, /**< data from input-fifo */ 35 IA_CSS_INPUT_MODE_FIFO, /** data from input-fifo */
36 IA_CSS_INPUT_MODE_TPG, /**< data from test-pattern generator */ 36 IA_CSS_INPUT_MODE_TPG, /** data from test-pattern generator */
37 IA_CSS_INPUT_MODE_PRBS, /**< data from pseudo-random bit stream */ 37 IA_CSS_INPUT_MODE_PRBS, /** data from pseudo-random bit stream */
38 IA_CSS_INPUT_MODE_MEMORY, /**< data from a frame in memory */ 38 IA_CSS_INPUT_MODE_MEMORY, /** data from a frame in memory */
39 IA_CSS_INPUT_MODE_BUFFERED_SENSOR /**< data is sent through mipi buffer */ 39 IA_CSS_INPUT_MODE_BUFFERED_SENSOR /** data is sent through mipi buffer */
40}; 40};
41 41
42/** Structure of the MIPI buffer configuration 42/* Structure of the MIPI buffer configuration
43 */ 43 */
44struct ia_css_mipi_buffer_config { 44struct ia_css_mipi_buffer_config {
45 unsigned int size_mem_words; /**< The frame size in the system memory 45 unsigned int size_mem_words; /** The frame size in the system memory
46 words (32B) */ 46 words (32B) */
47 bool contiguous; /**< Allocated memory physically 47 bool contiguous; /** Allocated memory physically
48 contiguously or not. \deprecated{Will be false always.}*/ 48 contiguously or not. \deprecated{Will be false always.}*/
49 unsigned int nof_mipi_buffers; /**< The number of MIPI buffers required for this 49 unsigned int nof_mipi_buffers; /** The number of MIPI buffers required for this
50 stream */ 50 stream */
51}; 51};
52 52
@@ -57,44 +57,44 @@ enum {
57 IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH 57 IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH
58}; 58};
59 59
60/** This is input data configuration for one MIPI data type. We can have 60/* This is input data configuration for one MIPI data type. We can have
61 * multiple of this in one virtual channel. 61 * multiple of this in one virtual channel.
62 */ 62 */
63struct ia_css_stream_isys_stream_config { 63struct ia_css_stream_isys_stream_config {
64 struct ia_css_resolution input_res; /**< Resolution of input data */ 64 struct ia_css_resolution input_res; /** Resolution of input data */
65 enum ia_css_stream_format format; /**< Format of input stream. This data 65 enum ia_css_stream_format format; /** Format of input stream. This data
66 format will be mapped to MIPI data 66 format will be mapped to MIPI data
67 type internally. */ 67 type internally. */
68 int linked_isys_stream_id; /**< default value is -1, other value means 68 int linked_isys_stream_id; /** default value is -1, other value means
69 current isys_stream shares the same buffer with 69 current isys_stream shares the same buffer with
70 indicated isys_stream*/ 70 indicated isys_stream*/
71 bool valid; /**< indicate whether other fields have valid value */ 71 bool valid; /** indicate whether other fields have valid value */
72}; 72};
73 73
74struct ia_css_stream_input_config { 74struct ia_css_stream_input_config {
75 struct ia_css_resolution input_res; /**< Resolution of input data */ 75 struct ia_css_resolution input_res; /** Resolution of input data */
76 struct ia_css_resolution effective_res; /**< Resolution of input data. 76 struct ia_css_resolution effective_res; /** Resolution of input data.
77 Used for CSS 2400/1 System and deprecated for other 77 Used for CSS 2400/1 System and deprecated for other
78 systems (replaced by input_effective_res in 78 systems (replaced by input_effective_res in
79 ia_css_pipe_config) */ 79 ia_css_pipe_config) */
80 enum ia_css_stream_format format; /**< Format of input stream. This data 80 enum ia_css_stream_format format; /** Format of input stream. This data
81 format will be mapped to MIPI data 81 format will be mapped to MIPI data
82 type internally. */ 82 type internally. */
83 enum ia_css_bayer_order bayer_order; /**< Bayer order for RAW streams */ 83 enum ia_css_bayer_order bayer_order; /** Bayer order for RAW streams */
84}; 84};
85 85
86 86
87/** Input stream description. This describes how input will flow into the 87/* Input stream description. This describes how input will flow into the
88 * CSS. This is used to program the CSS hardware. 88 * CSS. This is used to program the CSS hardware.
89 */ 89 */
90struct ia_css_stream_config { 90struct ia_css_stream_config {
91 enum ia_css_input_mode mode; /**< Input mode */ 91 enum ia_css_input_mode mode; /** Input mode */
92 union { 92 union {
93 struct ia_css_input_port port; /**< Port, for sensor only. */ 93 struct ia_css_input_port port; /** Port, for sensor only. */
94 struct ia_css_tpg_config tpg; /**< TPG configuration */ 94 struct ia_css_tpg_config tpg; /** TPG configuration */
95 struct ia_css_prbs_config prbs; /**< PRBS configuration */ 95 struct ia_css_prbs_config prbs; /** PRBS configuration */
96 } source; /**< Source of input data */ 96 } source; /** Source of input data */
97 unsigned int channel_id; /**< Channel on which input data 97 unsigned int channel_id; /** Channel on which input data
98 will arrive. Use this field 98 will arrive. Use this field
99 to specify virtual channel id. 99 to specify virtual channel id.
100 Valid values are: 0, 1, 2, 3 */ 100 Valid values are: 0, 1, 2, 3 */
@@ -110,29 +110,29 @@ struct ia_css_stream_config {
110 * and will be deprecated. In the future,all platforms will use the N*N method 110 * and will be deprecated. In the future,all platforms will use the N*N method
111 */ 111 */
112#endif 112#endif
113 unsigned int sensor_binning_factor; /**< Binning factor used by sensor 113 unsigned int sensor_binning_factor; /** Binning factor used by sensor
114 to produce image data. This is 114 to produce image data. This is
115 used for shading correction. */ 115 used for shading correction. */
116 unsigned int pixels_per_clock; /**< Number of pixels per clock, which can be 116 unsigned int pixels_per_clock; /** Number of pixels per clock, which can be
117 1, 2 or 4. */ 117 1, 2 or 4. */
118 bool online; /**< offline will activate RAW copy on SP, use this for 118 bool online; /** offline will activate RAW copy on SP, use this for
119 continuous capture. */ 119 continuous capture. */
120 /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */ 120 /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */
121 unsigned init_num_cont_raw_buf; /**< initial number of raw buffers to 121 unsigned init_num_cont_raw_buf; /** initial number of raw buffers to
122 allocate */ 122 allocate */
123 unsigned target_num_cont_raw_buf; /**< total number of raw buffers to 123 unsigned target_num_cont_raw_buf; /** total number of raw buffers to
124 allocate */ 124 allocate */
125 bool pack_raw_pixels; /**< Pack pixels in the raw buffers */ 125 bool pack_raw_pixels; /** Pack pixels in the raw buffers */
126 bool continuous; /**< Use SP copy feature to continuously capture frames 126 bool continuous; /** Use SP copy feature to continuously capture frames
127 to system memory and run pipes in offline mode */ 127 to system memory and run pipes in offline mode */
128 bool disable_cont_viewfinder; /**< disable continous viewfinder for ZSL use case */ 128 bool disable_cont_viewfinder; /** disable continous viewfinder for ZSL use case */
129 int32_t flash_gpio_pin; /**< pin on which the flash is connected, -1 for no flash */ 129 int32_t flash_gpio_pin; /** pin on which the flash is connected, -1 for no flash */
130 int left_padding; /**< The number of input-formatter left-paddings, -1 for default from binary.*/ 130 int left_padding; /** The number of input-formatter left-paddings, -1 for default from binary.*/
131 struct ia_css_mipi_buffer_config mipi_buffer_config; /**< mipi buffer configuration */ 131 struct ia_css_mipi_buffer_config mipi_buffer_config; /** mipi buffer configuration */
132 struct ia_css_metadata_config metadata_config; /**< Metadata configuration. */ 132 struct ia_css_metadata_config metadata_config; /** Metadata configuration. */
133 bool ia_css_enable_raw_buffer_locking; /**< Enable Raw Buffer Locking for HALv3 Support */ 133 bool ia_css_enable_raw_buffer_locking; /** Enable Raw Buffer Locking for HALv3 Support */
134 bool lock_all; 134 bool lock_all;
135 /**< Lock all RAW buffers (true) or lock only buffers processed by 135 /** Lock all RAW buffers (true) or lock only buffers processed by
136 video or preview pipe (false). 136 video or preview pipe (false).
137 This setting needs to be enabled to allow raw buffer locking 137 This setting needs to be enabled to allow raw buffer locking
138 without continuous viewfinder. */ 138 without continuous viewfinder. */
@@ -140,15 +140,15 @@ struct ia_css_stream_config {
140 140
141struct ia_css_stream; 141struct ia_css_stream;
142 142
143/** Stream info, this struct describes properties of a stream after it has been 143/* Stream info, this struct describes properties of a stream after it has been
144 * created. 144 * created.
145 */ 145 */
146struct ia_css_stream_info { 146struct ia_css_stream_info {
147 struct ia_css_metadata_info metadata_info; 147 struct ia_css_metadata_info metadata_info;
148 /**< Info about the metadata layout, this contains the stride. */ 148 /** Info about the metadata layout, this contains the stride. */
149}; 149};
150 150
151/** @brief Load default stream configuration 151/* @brief Load default stream configuration
152 * @param[in,out] stream_config The stream configuration. 152 * @param[in,out] stream_config The stream configuration.
153 * @return None 153 * @return None
154 * 154 *
@@ -165,7 +165,7 @@ void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config);
165 * create the internal structures and fill in the configuration data and pipes 165 * create the internal structures and fill in the configuration data and pipes
166 */ 166 */
167 167
168 /** @brief Creates a stream 168 /* @brief Creates a stream
169 * @param[in] stream_config The stream configuration. 169 * @param[in] stream_config The stream configuration.
170 * @param[in] num_pipes The number of pipes to incorporate in the stream. 170 * @param[in] num_pipes The number of pipes to incorporate in the stream.
171 * @param[in] pipes The pipes. 171 * @param[in] pipes The pipes.
@@ -180,7 +180,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
180 struct ia_css_pipe *pipes[], 180 struct ia_css_pipe *pipes[],
181 struct ia_css_stream **stream); 181 struct ia_css_stream **stream);
182 182
183/** @brief Destroys a stream 183/* @brief Destroys a stream
184 * @param[in] stream The stream. 184 * @param[in] stream The stream.
185 * @return IA_CSS_SUCCESS or the error code. 185 * @return IA_CSS_SUCCESS or the error code.
186 * 186 *
@@ -189,7 +189,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
189enum ia_css_err 189enum ia_css_err
190ia_css_stream_destroy(struct ia_css_stream *stream); 190ia_css_stream_destroy(struct ia_css_stream *stream);
191 191
192/** @brief Provides information about a stream 192/* @brief Provides information about a stream
193 * @param[in] stream The stream. 193 * @param[in] stream The stream.
194 * @param[out] stream_info The information about the stream. 194 * @param[out] stream_info The information about the stream.
195 * @return IA_CSS_SUCCESS or the error code. 195 * @return IA_CSS_SUCCESS or the error code.
@@ -200,7 +200,7 @@ enum ia_css_err
200ia_css_stream_get_info(const struct ia_css_stream *stream, 200ia_css_stream_get_info(const struct ia_css_stream *stream,
201 struct ia_css_stream_info *stream_info); 201 struct ia_css_stream_info *stream_info);
202 202
203/** @brief load (rebuild) a stream that was unloaded. 203/* @brief load (rebuild) a stream that was unloaded.
204 * @param[in] stream The stream 204 * @param[in] stream The stream
205 * @return IA_CSS_SUCCESS or the error code 205 * @return IA_CSS_SUCCESS or the error code
206 * 206 *
@@ -210,7 +210,7 @@ ia_css_stream_get_info(const struct ia_css_stream *stream,
210enum ia_css_err 210enum ia_css_err
211ia_css_stream_load(struct ia_css_stream *stream); 211ia_css_stream_load(struct ia_css_stream *stream);
212 212
213/** @brief Starts the stream. 213/* @brief Starts the stream.
214 * @param[in] stream The stream. 214 * @param[in] stream The stream.
215 * @return IA_CSS_SUCCESS or the error code. 215 * @return IA_CSS_SUCCESS or the error code.
216 * 216 *
@@ -223,7 +223,7 @@ ia_css_stream_load(struct ia_css_stream *stream);
223enum ia_css_err 223enum ia_css_err
224ia_css_stream_start(struct ia_css_stream *stream); 224ia_css_stream_start(struct ia_css_stream *stream);
225 225
226/** @brief Stop the stream. 226/* @brief Stop the stream.
227 * @param[in] stream The stream. 227 * @param[in] stream The stream.
228 * @return IA_CSS_SUCCESS or the error code. 228 * @return IA_CSS_SUCCESS or the error code.
229 * 229 *
@@ -233,7 +233,7 @@ ia_css_stream_start(struct ia_css_stream *stream);
233enum ia_css_err 233enum ia_css_err
234ia_css_stream_stop(struct ia_css_stream *stream); 234ia_css_stream_stop(struct ia_css_stream *stream);
235 235
236/** @brief Check if a stream has stopped 236/* @brief Check if a stream has stopped
237 * @param[in] stream The stream. 237 * @param[in] stream The stream.
238 * @return boolean flag 238 * @return boolean flag
239 * 239 *
@@ -242,7 +242,7 @@ ia_css_stream_stop(struct ia_css_stream *stream);
242bool 242bool
243ia_css_stream_has_stopped(struct ia_css_stream *stream); 243ia_css_stream_has_stopped(struct ia_css_stream *stream);
244 244
245/** @brief destroy a stream according to the stream seed previosly saved in the seed array. 245/* @brief destroy a stream according to the stream seed previosly saved in the seed array.
246 * @param[in] stream The stream. 246 * @param[in] stream The stream.
247 * @return IA_CSS_SUCCESS (no other errors are generated now) 247 * @return IA_CSS_SUCCESS (no other errors are generated now)
248 * 248 *
@@ -251,7 +251,7 @@ ia_css_stream_has_stopped(struct ia_css_stream *stream);
251enum ia_css_err 251enum ia_css_err
252ia_css_stream_unload(struct ia_css_stream *stream); 252ia_css_stream_unload(struct ia_css_stream *stream);
253 253
254/** @brief Returns stream format 254/* @brief Returns stream format
255 * @param[in] stream The stream. 255 * @param[in] stream The stream.
256 * @return format of the string 256 * @return format of the string
257 * 257 *
@@ -260,7 +260,7 @@ ia_css_stream_unload(struct ia_css_stream *stream);
260enum ia_css_stream_format 260enum ia_css_stream_format
261ia_css_stream_get_format(const struct ia_css_stream *stream); 261ia_css_stream_get_format(const struct ia_css_stream *stream);
262 262
263/** @brief Check if the stream is configured for 2 pixels per clock 263/* @brief Check if the stream is configured for 2 pixels per clock
264 * @param[in] stream The stream. 264 * @param[in] stream The stream.
265 * @return boolean flag 265 * @return boolean flag
266 * 266 *
@@ -270,7 +270,7 @@ ia_css_stream_get_format(const struct ia_css_stream *stream);
270bool 270bool
271ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream); 271ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream);
272 272
273/** @brief Sets the output frame stride (at the last pipe) 273/* @brief Sets the output frame stride (at the last pipe)
274 * @param[in] stream The stream 274 * @param[in] stream The stream
275 * @param[in] output_padded_width - the output buffer stride. 275 * @param[in] output_padded_width - the output buffer stride.
276 * @return ia_css_err 276 * @return ia_css_err
@@ -280,7 +280,7 @@ ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream);
280enum ia_css_err 280enum ia_css_err
281ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width); 281ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width);
282 282
283/** @brief Return max number of continuous RAW frames. 283/* @brief Return max number of continuous RAW frames.
284 * @param[in] stream The stream. 284 * @param[in] stream The stream.
285 * @param[out] buffer_depth The maximum number of continuous RAW frames. 285 * @param[out] buffer_depth The maximum number of continuous RAW frames.
286 * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS 286 * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS
@@ -291,7 +291,7 @@ ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int
291enum ia_css_err 291enum ia_css_err
292ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth); 292ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth);
293 293
294/** @brief Set nr of continuous RAW frames to use. 294/* @brief Set nr of continuous RAW frames to use.
295 * 295 *
296 * @param[in] stream The stream. 296 * @param[in] stream The stream.
297 * @param[in] buffer_depth Number of frames to set. 297 * @param[in] buffer_depth Number of frames to set.
@@ -302,7 +302,7 @@ ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_dep
302enum ia_css_err 302enum ia_css_err
303ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth); 303ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth);
304 304
305/** @brief Get number of continuous RAW frames to use. 305/* @brief Get number of continuous RAW frames to use.
306 * @param[in] stream The stream. 306 * @param[in] stream The stream.
307 * @param[out] buffer_depth The number of frames to use 307 * @param[out] buffer_depth The number of frames to use
308 * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS 308 * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS
@@ -315,7 +315,7 @@ ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth);
315 315
316/* ===== CAPTURE ===== */ 316/* ===== CAPTURE ===== */
317 317
318/** @brief Configure the continuous capture 318/* @brief Configure the continuous capture
319 * 319 *
320 * @param[in] stream The stream. 320 * @param[in] stream The stream.
321 * @param[in] num_captures The number of RAW frames to be processed to 321 * @param[in] num_captures The number of RAW frames to be processed to
@@ -347,7 +347,7 @@ ia_css_stream_capture(struct ia_css_stream *stream,
347 unsigned int skip, 347 unsigned int skip,
348 int offset); 348 int offset);
349 349
350/** @brief Specify which raw frame to tag based on exp_id found in frame info 350/* @brief Specify which raw frame to tag based on exp_id found in frame info
351 * 351 *
352 * @param[in] stream The stream. 352 * @param[in] stream The stream.
353 * @param[in] exp_id The exposure id of the raw frame to tag. 353 * @param[in] exp_id The exposure id of the raw frame to tag.
@@ -363,7 +363,7 @@ ia_css_stream_capture_frame(struct ia_css_stream *stream,
363 363
364/* ===== VIDEO ===== */ 364/* ===== VIDEO ===== */
365 365
366/** @brief Send streaming data into the css input FIFO 366/* @brief Send streaming data into the css input FIFO
367 * 367 *
368 * @param[in] stream The stream. 368 * @param[in] stream The stream.
369 * @param[in] data Pointer to the pixels to be send. 369 * @param[in] data Pointer to the pixels to be send.
@@ -395,7 +395,7 @@ ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
395 unsigned int width, 395 unsigned int width,
396 unsigned int height); 396 unsigned int height);
397 397
398/** @brief Start an input frame on the CSS input FIFO. 398/* @brief Start an input frame on the CSS input FIFO.
399 * 399 *
400 * @param[in] stream The stream. 400 * @param[in] stream The stream.
401 * @return None 401 * @return None
@@ -411,7 +411,7 @@ ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
411void 411void
412ia_css_stream_start_input_frame(const struct ia_css_stream *stream); 412ia_css_stream_start_input_frame(const struct ia_css_stream *stream);
413 413
414/** @brief Send a line of input data into the CSS input FIFO. 414/* @brief Send a line of input data into the CSS input FIFO.
415 * 415 *
416 * @param[in] stream The stream. 416 * @param[in] stream The stream.
417 * @param[in] data Array of the first line of image data. 417 * @param[in] data Array of the first line of image data.
@@ -435,7 +435,7 @@ ia_css_stream_send_input_line(const struct ia_css_stream *stream,
435 const unsigned short *data2, 435 const unsigned short *data2,
436 unsigned int width2); 436 unsigned int width2);
437 437
438/** @brief Send a line of input embedded data into the CSS input FIFO. 438/* @brief Send a line of input embedded data into the CSS input FIFO.
439 * 439 *
440 * @param[in] stream Pointer of the stream. 440 * @param[in] stream Pointer of the stream.
441 * @param[in] format Format of the embedded data. 441 * @param[in] format Format of the embedded data.
@@ -457,7 +457,7 @@ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
457 const unsigned short *data, 457 const unsigned short *data,
458 unsigned int width); 458 unsigned int width);
459 459
460/** @brief End an input frame on the CSS input FIFO. 460/* @brief End an input frame on the CSS input FIFO.
461 * 461 *
462 * @param[in] stream The stream. 462 * @param[in] stream The stream.
463 * @return None 463 * @return None
@@ -467,7 +467,7 @@ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
467void 467void
468ia_css_stream_end_input_frame(const struct ia_css_stream *stream); 468ia_css_stream_end_input_frame(const struct ia_css_stream *stream);
469 469
470/** @brief send a request flash command to SP 470/* @brief send a request flash command to SP
471 * 471 *
472 * @param[in] stream The stream. 472 * @param[in] stream The stream.
473 * @return None 473 * @return None
@@ -481,7 +481,7 @@ ia_css_stream_end_input_frame(const struct ia_css_stream *stream);
481void 481void
482ia_css_stream_request_flash(struct ia_css_stream *stream); 482ia_css_stream_request_flash(struct ia_css_stream *stream);
483 483
484/** @brief Configure a stream with filter coefficients. 484/* @brief Configure a stream with filter coefficients.
485 * @deprecated {Replaced by 485 * @deprecated {Replaced by
486 * ia_css_pipe_set_isp_config_on_pipe()} 486 * ia_css_pipe_set_isp_config_on_pipe()}
487 * 487 *
@@ -503,7 +503,7 @@ ia_css_stream_set_isp_config_on_pipe(struct ia_css_stream *stream,
503 const struct ia_css_isp_config *config, 503 const struct ia_css_isp_config *config,
504 struct ia_css_pipe *pipe); 504 struct ia_css_pipe *pipe);
505 505
506/** @brief Configure a stream with filter coefficients. 506/* @brief Configure a stream with filter coefficients.
507 * @deprecated {Replaced by 507 * @deprecated {Replaced by
508 * ia_css_pipe_set_isp_config()} 508 * ia_css_pipe_set_isp_config()}
509 * @param[in] stream The stream. 509 * @param[in] stream The stream.
@@ -523,7 +523,7 @@ ia_css_stream_set_isp_config(
523 struct ia_css_stream *stream, 523 struct ia_css_stream *stream,
524 const struct ia_css_isp_config *config); 524 const struct ia_css_isp_config *config);
525 525
526/** @brief Get selected configuration settings 526/* @brief Get selected configuration settings
527 * @param[in] stream The stream. 527 * @param[in] stream The stream.
528 * @param[out] config Configuration settings. 528 * @param[out] config Configuration settings.
529 * @return None 529 * @return None
@@ -532,7 +532,7 @@ void
532ia_css_stream_get_isp_config(const struct ia_css_stream *stream, 532ia_css_stream_get_isp_config(const struct ia_css_stream *stream,
533 struct ia_css_isp_config *config); 533 struct ia_css_isp_config *config);
534 534
535/** @brief allocate continuous raw frames for continuous capture 535/* @brief allocate continuous raw frames for continuous capture
536 * @param[in] stream The stream. 536 * @param[in] stream The stream.
537 * @return IA_CSS_SUCCESS or error code. 537 * @return IA_CSS_SUCCESS or error code.
538 * 538 *
@@ -544,7 +544,7 @@ ia_css_stream_get_isp_config(const struct ia_css_stream *stream,
544enum ia_css_err 544enum ia_css_err
545ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream); 545ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream);
546 546
547/** @brief allocate continuous raw frames for continuous capture 547/* @brief allocate continuous raw frames for continuous capture
548 * @param[in] stream The stream. 548 * @param[in] stream The stream.
549 * @return IA_CSS_SUCCESS or error code. 549 * @return IA_CSS_SUCCESS or error code.
550 * 550 *
@@ -555,7 +555,7 @@ ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream);
555enum ia_css_err 555enum ia_css_err
556ia_css_update_continuous_frames(struct ia_css_stream *stream); 556ia_css_update_continuous_frames(struct ia_css_stream *stream);
557 557
558/** @brief ia_css_unlock_raw_frame . unlock a raw frame (HALv3 Support) 558/* @brief ia_css_unlock_raw_frame . unlock a raw frame (HALv3 Support)
559 * @param[in] stream The stream. 559 * @param[in] stream The stream.
560 * @param[in] exp_id exposure id that uniquely identifies the locked Raw Frame Buffer 560 * @param[in] exp_id exposure id that uniquely identifies the locked Raw Frame Buffer
561 * @return ia_css_err IA_CSS_SUCCESS or error code 561 * @return ia_css_err IA_CSS_SUCCESS or error code
@@ -567,7 +567,7 @@ ia_css_update_continuous_frames(struct ia_css_stream *stream);
567enum ia_css_err 567enum ia_css_err
568ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id); 568ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id);
569 569
570/** @brief ia_css_en_dz_capt_pipe . Enable/Disable digital zoom for capture pipe 570/* @brief ia_css_en_dz_capt_pipe . Enable/Disable digital zoom for capture pipe
571 * @param[in] stream The stream. 571 * @param[in] stream The stream.
572 * @param[in] enable - true, disable - false 572 * @param[in] enable - true, disable - false
573 * @return None 573 * @return None
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h
index 575bb28b4bec..b256d7c88716 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h
@@ -31,47 +31,47 @@ more details.
31#ifndef __IA_CSS_TIMER_H 31#ifndef __IA_CSS_TIMER_H
32#define __IA_CSS_TIMER_H 32#define __IA_CSS_TIMER_H
33 33
34/** @file 34/* @file
35 * Timer interface definitions 35 * Timer interface definitions
36 */ 36 */
37#include <type_support.h> /* for uint32_t */ 37#include <type_support.h> /* for uint32_t */
38#include "ia_css_err.h" 38#include "ia_css_err.h"
39 39
40/** @brief timer reading definition */ 40/* @brief timer reading definition */
41typedef uint32_t clock_value_t; 41typedef uint32_t clock_value_t;
42 42
43/** @brief 32 bit clock tick,(timestamp based on timer-value of CSS-internal timer)*/ 43/* @brief 32 bit clock tick,(timestamp based on timer-value of CSS-internal timer)*/
44struct ia_css_clock_tick { 44struct ia_css_clock_tick {
45 clock_value_t ticks; /**< measured time in ticks.*/ 45 clock_value_t ticks; /** measured time in ticks.*/
46}; 46};
47 47
48/** @brief TIMER event codes */ 48/* @brief TIMER event codes */
49enum ia_css_tm_event { 49enum ia_css_tm_event {
50 IA_CSS_TM_EVENT_AFTER_INIT, 50 IA_CSS_TM_EVENT_AFTER_INIT,
51 /**< Timer Event after Initialization */ 51 /** Timer Event after Initialization */
52 IA_CSS_TM_EVENT_MAIN_END, 52 IA_CSS_TM_EVENT_MAIN_END,
53 /**< Timer Event after end of Main */ 53 /** Timer Event after end of Main */
54 IA_CSS_TM_EVENT_THREAD_START, 54 IA_CSS_TM_EVENT_THREAD_START,
55 /**< Timer Event after thread start */ 55 /** Timer Event after thread start */
56 IA_CSS_TM_EVENT_FRAME_PROC_START, 56 IA_CSS_TM_EVENT_FRAME_PROC_START,
57 /**< Timer Event after Frame Process Start */ 57 /** Timer Event after Frame Process Start */
58 IA_CSS_TM_EVENT_FRAME_PROC_END 58 IA_CSS_TM_EVENT_FRAME_PROC_END
59 /**< Timer Event after Frame Process End */ 59 /** Timer Event after Frame Process End */
60}; 60};
61 61
62/** @brief code measurement common struct */ 62/* @brief code measurement common struct */
63struct ia_css_time_meas { 63struct ia_css_time_meas {
64 clock_value_t start_timer_value; /**< measured time in ticks */ 64 clock_value_t start_timer_value; /** measured time in ticks */
65 clock_value_t end_timer_value; /**< measured time in ticks */ 65 clock_value_t end_timer_value; /** measured time in ticks */
66}; 66};
67 67
68/**@brief SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT checks to ensure correct alignment for struct ia_css_clock_tick. */ 68/**@brief SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT checks to ensure correct alignment for struct ia_css_clock_tick. */
69#define SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT sizeof(clock_value_t) 69#define SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT sizeof(clock_value_t)
70/** @brief checks to ensure correct alignment for ia_css_time_meas. */ 70/* @brief checks to ensure correct alignment for ia_css_time_meas. */
71#define SIZE_OF_IA_CSS_TIME_MEAS_STRUCT (sizeof(clock_value_t) \ 71#define SIZE_OF_IA_CSS_TIME_MEAS_STRUCT (sizeof(clock_value_t) \
72 + sizeof(clock_value_t)) 72 + sizeof(clock_value_t))
73 73
74/** @brief API to fetch timer count directly 74/* @brief API to fetch timer count directly
75* 75*
76* @param curr_ts [out] measured count value 76* @param curr_ts [out] measured count value
77* @return IA_CSS_SUCCESS if success 77* @return IA_CSS_SUCCESS if success
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h
index 9238a3317a46..81498bd7485b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_TPG_H 15#ifndef __IA_CSS_TPG_H
16#define __IA_CSS_TPG_H 16#define __IA_CSS_TPG_H
17 17
18/** @file 18/* @file
19 * This file contains support for the test pattern generator (TPG) 19 * This file contains support for the test pattern generator (TPG)
20 */ 20 */
21 21
22/** Enumerate the TPG IDs. 22/* Enumerate the TPG IDs.
23 */ 23 */
24enum ia_css_tpg_id { 24enum ia_css_tpg_id {
25 IA_CSS_TPG_ID0, 25 IA_CSS_TPG_ID0,
@@ -35,7 +35,7 @@ enum ia_css_tpg_id {
35 */ 35 */
36#define N_CSS_TPG_IDS (IA_CSS_TPG_ID2+1) 36#define N_CSS_TPG_IDS (IA_CSS_TPG_ID2+1)
37 37
38/** Enumerate the TPG modes. 38/* Enumerate the TPG modes.
39 */ 39 */
40enum ia_css_tpg_mode { 40enum ia_css_tpg_mode {
41 IA_CSS_TPG_MODE_RAMP, 41 IA_CSS_TPG_MODE_RAMP,
@@ -44,7 +44,7 @@ enum ia_css_tpg_mode {
44 IA_CSS_TPG_MODE_MONO 44 IA_CSS_TPG_MODE_MONO
45}; 45};
46 46
47/** @brief Configure the test pattern generator. 47/* @brief Configure the test pattern generator.
48 * 48 *
49 * Configure the Test Pattern Generator, the way these values are used to 49 * Configure the Test Pattern Generator, the way these values are used to
50 * generate the pattern can be seen in the HRT extension for the test pattern 50 * generate the pattern can be seen in the HRT extension for the test pattern
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h
index 5fec3d5c89d8..725b90072cfe 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h
@@ -16,7 +16,7 @@
16#ifndef _IA_CSS_TYPES_H 16#ifndef _IA_CSS_TYPES_H
17#define _IA_CSS_TYPES_H 17#define _IA_CSS_TYPES_H
18 18
19/** @file 19/* @file
20 * This file contains types used for the ia_css parameters. 20 * This file contains types used for the ia_css parameters.
21 * These types are in a separate file because they are expected 21 * These types are in a separate file because they are expected
22 * to be used in software layers that do not access the CSS API 22 * to be used in software layers that do not access the CSS API
@@ -58,7 +58,7 @@
58#include "isp/kernels/output/output_1.0/ia_css_output_types.h" 58#include "isp/kernels/output/output_1.0/ia_css_output_types.h"
59 59
60#define IA_CSS_DVS_STAT_GRID_INFO_SUPPORTED 60#define IA_CSS_DVS_STAT_GRID_INFO_SUPPORTED
61/**< Should be removed after Driver adaptation will be done */ 61/** Should be removed after Driver adaptation will be done */
62 62
63#define IA_CSS_VERSION_MAJOR 2 63#define IA_CSS_VERSION_MAJOR 2
64#define IA_CSS_VERSION_MINOR 0 64#define IA_CSS_VERSION_MINOR 0
@@ -69,8 +69,8 @@
69/* Min and max exposure IDs. These macros are here to allow 69/* Min and max exposure IDs. These macros are here to allow
70 * the drivers to get this information. Changing these macros 70 * the drivers to get this information. Changing these macros
71 * constitutes a CSS API change. */ 71 * constitutes a CSS API change. */
72#define IA_CSS_ISYS_MIN_EXPOSURE_ID 1 /**< Minimum exposure ID */ 72#define IA_CSS_ISYS_MIN_EXPOSURE_ID 1 /** Minimum exposure ID */
73#define IA_CSS_ISYS_MAX_EXPOSURE_ID 250 /**< Maximum exposure ID */ 73#define IA_CSS_ISYS_MAX_EXPOSURE_ID 250 /** Maximum exposure ID */
74 74
75/* opaque types */ 75/* opaque types */
76struct ia_css_isp_parameters; 76struct ia_css_isp_parameters;
@@ -79,72 +79,72 @@ struct ia_css_memory_offsets;
79struct ia_css_config_memory_offsets; 79struct ia_css_config_memory_offsets;
80struct ia_css_state_memory_offsets; 80struct ia_css_state_memory_offsets;
81 81
82/** Virtual address within the CSS address space. */ 82/* Virtual address within the CSS address space. */
83typedef uint32_t ia_css_ptr; 83typedef uint32_t ia_css_ptr;
84 84
85/** Generic resolution structure. 85/* Generic resolution structure.
86 */ 86 */
87struct ia_css_resolution { 87struct ia_css_resolution {
88 uint32_t width; /**< Width */ 88 uint32_t width; /** Width */
89 uint32_t height; /**< Height */ 89 uint32_t height; /** Height */
90}; 90};
91 91
92/** Generic coordinate structure. 92/* Generic coordinate structure.
93 */ 93 */
94struct ia_css_coordinate { 94struct ia_css_coordinate {
95 int32_t x; /**< Value of a coordinate on the horizontal axis */ 95 int32_t x; /** Value of a coordinate on the horizontal axis */
96 int32_t y; /**< Value of a coordinate on the vertical axis */ 96 int32_t y; /** Value of a coordinate on the vertical axis */
97}; 97};
98 98
99/** Vector with signed values. This is used to indicate motion for 99/* Vector with signed values. This is used to indicate motion for
100 * Digital Image Stabilization. 100 * Digital Image Stabilization.
101 */ 101 */
102struct ia_css_vector { 102struct ia_css_vector {
103 int32_t x; /**< horizontal motion (in pixels) */ 103 int32_t x; /** horizontal motion (in pixels) */
104 int32_t y; /**< vertical motion (in pixels) */ 104 int32_t y; /** vertical motion (in pixels) */
105}; 105};
106 106
107/* Short hands */ 107/* Short hands */
108#define IA_CSS_ISP_DMEM IA_CSS_ISP_DMEM0 108#define IA_CSS_ISP_DMEM IA_CSS_ISP_DMEM0
109#define IA_CSS_ISP_VMEM IA_CSS_ISP_VMEM0 109#define IA_CSS_ISP_VMEM IA_CSS_ISP_VMEM0
110 110
111/** CSS data descriptor */ 111/* CSS data descriptor */
112struct ia_css_data { 112struct ia_css_data {
113 ia_css_ptr address; /**< CSS virtual address */ 113 ia_css_ptr address; /** CSS virtual address */
114 uint32_t size; /**< Disabled if 0 */ 114 uint32_t size; /** Disabled if 0 */
115}; 115};
116 116
117/** Host data descriptor */ 117/* Host data descriptor */
118struct ia_css_host_data { 118struct ia_css_host_data {
119 char *address; /**< Host address */ 119 char *address; /** Host address */
120 uint32_t size; /**< Disabled if 0 */ 120 uint32_t size; /** Disabled if 0 */
121}; 121};
122 122
123/** ISP data descriptor */ 123/* ISP data descriptor */
124struct ia_css_isp_data { 124struct ia_css_isp_data {
125 uint32_t address; /**< ISP address */ 125 uint32_t address; /** ISP address */
126 uint32_t size; /**< Disabled if 0 */ 126 uint32_t size; /** Disabled if 0 */
127}; 127};
128 128
129/** Shading Correction types. */ 129/* Shading Correction types. */
130enum ia_css_shading_correction_type { 130enum ia_css_shading_correction_type {
131#ifndef ISP2401 131#ifndef ISP2401
132 IA_CSS_SHADING_CORRECTION_TYPE_1 /**< Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400) */ 132 IA_CSS_SHADING_CORRECTION_TYPE_1 /** Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400) */
133#else 133#else
134 IA_CSS_SHADING_CORRECTION_NONE, /**< Shading Correction is not processed in the pipe. */ 134 IA_CSS_SHADING_CORRECTION_NONE, /** Shading Correction is not processed in the pipe. */
135 IA_CSS_SHADING_CORRECTION_TYPE_1 /**< Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400/2401) */ 135 IA_CSS_SHADING_CORRECTION_TYPE_1 /** Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400/2401) */
136#endif 136#endif
137 137
138 /**< More shading correction types can be added in the future. */ 138 /** More shading correction types can be added in the future. */
139}; 139};
140 140
141/** Shading Correction information. */ 141/* Shading Correction information. */
142struct ia_css_shading_info { 142struct ia_css_shading_info {
143 enum ia_css_shading_correction_type type; /**< Shading Correction type. */ 143 enum ia_css_shading_correction_type type; /** Shading Correction type. */
144 144
145 union { /** Shading Correction information of each Shading Correction types. */ 145 union { /* Shading Correction information of each Shading Correction types. */
146 146
147 /** Shading Correction information of IA_CSS_SHADING_CORRECTION_TYPE_1. 147 /* Shading Correction information of IA_CSS_SHADING_CORRECTION_TYPE_1.
148 * 148 *
149 * This structure contains the information necessary to generate 149 * This structure contains the information necessary to generate
150 * the shading table required in the isp. 150 * the shading table required in the isp.
@@ -288,20 +288,20 @@ struct ia_css_shading_info {
288 */ 288 */
289 struct { 289 struct {
290#ifndef ISP2401 290#ifndef ISP2401
291 uint32_t enable; /**< Shading correction enabled. 291 uint32_t enable; /** Shading correction enabled.
292 0:disabled, 1:enabled */ 292 0:disabled, 1:enabled */
293 uint32_t num_hor_grids; /**< Number of data points per line 293 uint32_t num_hor_grids; /** Number of data points per line
294 per color on shading table. */ 294 per color on shading table. */
295 uint32_t num_ver_grids; /**< Number of lines of data points 295 uint32_t num_ver_grids; /** Number of lines of data points
296 per color on shading table. */ 296 per color on shading table. */
297 uint32_t bqs_per_grid_cell; /**< Grid cell size 297 uint32_t bqs_per_grid_cell; /** Grid cell size
298 in BQ(Bayer Quad) unit. 298 in BQ(Bayer Quad) unit.
299 (1BQ means {Gr,R,B,Gb}(2x2 pixels).) 299 (1BQ means {Gr,R,B,Gb}(2x2 pixels).)
300 Valid values are 8,16,32,64. */ 300 Valid values are 8,16,32,64. */
301#else 301#else
302 uint32_t num_hor_grids; /**< Number of data points per line per color on shading table. */ 302 uint32_t num_hor_grids; /** Number of data points per line per color on shading table. */
303 uint32_t num_ver_grids; /**< Number of lines of data points per color on shading table. */ 303 uint32_t num_ver_grids; /** Number of lines of data points per color on shading table. */
304 uint32_t bqs_per_grid_cell; /**< Grid cell size in BQ unit. 304 uint32_t bqs_per_grid_cell; /** Grid cell size in BQ unit.
305 NOTE: bqs = size in BQ(Bayer Quad) unit. 305 NOTE: bqs = size in BQ(Bayer Quad) unit.
306 1BQ means {Gr,R,B,Gb} (2x2 pixels). 306 1BQ means {Gr,R,B,Gb} (2x2 pixels).
307 Horizontal 1 bqs corresponds to horizontal 2 pixels. 307 Horizontal 1 bqs corresponds to horizontal 2 pixels.
@@ -310,13 +310,13 @@ struct ia_css_shading_info {
310 uint32_t bayer_scale_hor_ratio_in; 310 uint32_t bayer_scale_hor_ratio_in;
311 uint32_t bayer_scale_hor_ratio_out; 311 uint32_t bayer_scale_hor_ratio_out;
312#ifndef ISP2401 312#ifndef ISP2401
313 /**< Horizontal ratio of bayer scaling 313 /** Horizontal ratio of bayer scaling
314 between input width and output width, for the scaling 314 between input width and output width, for the scaling
315 which should be done before shading correction. 315 which should be done before shading correction.
316 output_width = input_width * bayer_scale_hor_ratio_out 316 output_width = input_width * bayer_scale_hor_ratio_out
317 / bayer_scale_hor_ratio_in */ 317 / bayer_scale_hor_ratio_in */
318#else 318#else
319 /**< Horizontal ratio of bayer scaling between input width and output width, 319 /** Horizontal ratio of bayer scaling between input width and output width,
320 for the scaling which should be done before shading correction. 320 for the scaling which should be done before shading correction.
321 output_width = input_width * bayer_scale_hor_ratio_out 321 output_width = input_width * bayer_scale_hor_ratio_out
322 / bayer_scale_hor_ratio_in + 0.5 */ 322 / bayer_scale_hor_ratio_in + 0.5 */
@@ -324,30 +324,30 @@ struct ia_css_shading_info {
324 uint32_t bayer_scale_ver_ratio_in; 324 uint32_t bayer_scale_ver_ratio_in;
325 uint32_t bayer_scale_ver_ratio_out; 325 uint32_t bayer_scale_ver_ratio_out;
326#ifndef ISP2401 326#ifndef ISP2401
327 /**< Vertical ratio of bayer scaling 327 /** Vertical ratio of bayer scaling
328 between input height and output height, for the scaling 328 between input height and output height, for the scaling
329 which should be done before shading correction. 329 which should be done before shading correction.
330 output_height = input_height * bayer_scale_ver_ratio_out 330 output_height = input_height * bayer_scale_ver_ratio_out
331 / bayer_scale_ver_ratio_in */ 331 / bayer_scale_ver_ratio_in */
332 uint32_t sc_bayer_origin_x_bqs_on_shading_table; 332 uint32_t sc_bayer_origin_x_bqs_on_shading_table;
333 /**< X coordinate (in bqs) of bayer origin on shading table. 333 /** X coordinate (in bqs) of bayer origin on shading table.
334 This indicates the left-most pixel of bayer 334 This indicates the left-most pixel of bayer
335 (not include margin) inputted to the shading correction. 335 (not include margin) inputted to the shading correction.
336 This corresponds to the left-most pixel of bayer 336 This corresponds to the left-most pixel of bayer
337 inputted to isp from sensor. */ 337 inputted to isp from sensor. */
338 uint32_t sc_bayer_origin_y_bqs_on_shading_table; 338 uint32_t sc_bayer_origin_y_bqs_on_shading_table;
339 /**< Y coordinate (in bqs) of bayer origin on shading table. 339 /** Y coordinate (in bqs) of bayer origin on shading table.
340 This indicates the top pixel of bayer 340 This indicates the top pixel of bayer
341 (not include margin) inputted to the shading correction. 341 (not include margin) inputted to the shading correction.
342 This corresponds to the top pixel of bayer 342 This corresponds to the top pixel of bayer
343 inputted to isp from sensor. */ 343 inputted to isp from sensor. */
344#else 344#else
345 /**< Vertical ratio of bayer scaling between input height and output height, 345 /** Vertical ratio of bayer scaling between input height and output height,
346 for the scaling which should be done before shading correction. 346 for the scaling which should be done before shading correction.
347 output_height = input_height * bayer_scale_ver_ratio_out 347 output_height = input_height * bayer_scale_ver_ratio_out
348 / bayer_scale_ver_ratio_in + 0.5 */ 348 / bayer_scale_ver_ratio_in + 0.5 */
349 struct ia_css_resolution isp_input_sensor_data_res_bqs; 349 struct ia_css_resolution isp_input_sensor_data_res_bqs;
350 /**< Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling. 350 /** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
351 NOTE: This is NOT the size of the physical sensor size. 351 NOTE: This is NOT the size of the physical sensor size.
352 CSS requests the driver that ISP inputs sensor data 352 CSS requests the driver that ISP inputs sensor data
353 by the size of isp_input_sensor_data_res_bqs. 353 by the size of isp_input_sensor_data_res_bqs.
@@ -357,22 +357,22 @@ struct ia_css_shading_info {
357 ISP assumes the area of isp_input_sensor_data_res_bqs 357 ISP assumes the area of isp_input_sensor_data_res_bqs
358 is centered on the physical sensor. */ 358 is centered on the physical sensor. */
359 struct ia_css_resolution sensor_data_res_bqs; 359 struct ia_css_resolution sensor_data_res_bqs;
360 /**< Sensor data size (in bqs) at shading correction. 360 /** Sensor data size (in bqs) at shading correction.
361 This is the size AFTER bayer scaling. */ 361 This is the size AFTER bayer scaling. */
362 struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl; 362 struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
363 /**< Origin of sensor data area positioned on shading table at shading correction. 363 /** Origin of sensor data area positioned on shading table at shading correction.
364 The coordinate x,y should be positive values. */ 364 The coordinate x,y should be positive values. */
365#endif 365#endif
366 } type_1; 366 } type_1;
367 367
368 /**< More structures can be added here when more shading correction types will be added 368 /** More structures can be added here when more shading correction types will be added
369 in the future. */ 369 in the future. */
370 } info; 370 } info;
371}; 371};
372 372
373#ifndef ISP2401 373#ifndef ISP2401
374 374
375/** Default Shading Correction information of Shading Correction Type 1. */ 375/* Default Shading Correction information of Shading Correction Type 1. */
376#define DEFAULT_SHADING_INFO_TYPE_1 \ 376#define DEFAULT_SHADING_INFO_TYPE_1 \
377{ \ 377{ \
378 IA_CSS_SHADING_CORRECTION_TYPE_1, /* type */ \ 378 IA_CSS_SHADING_CORRECTION_TYPE_1, /* type */ \
@@ -394,7 +394,7 @@ struct ia_css_shading_info {
394 394
395#else 395#else
396 396
397/** Default Shading Correction information of Shading Correction Type 1. */ 397/* Default Shading Correction information of Shading Correction Type 1. */
398#define DEFAULT_SHADING_INFO_TYPE_1 \ 398#define DEFAULT_SHADING_INFO_TYPE_1 \
399{ \ 399{ \
400 IA_CSS_SHADING_CORRECTION_TYPE_1, /* type */ \ 400 IA_CSS_SHADING_CORRECTION_TYPE_1, /* type */ \
@@ -416,27 +416,27 @@ struct ia_css_shading_info {
416 416
417#endif 417#endif
418 418
419/** Default Shading Correction information. */ 419/* Default Shading Correction information. */
420#define DEFAULT_SHADING_INFO DEFAULT_SHADING_INFO_TYPE_1 420#define DEFAULT_SHADING_INFO DEFAULT_SHADING_INFO_TYPE_1
421 421
422/** structure that describes the 3A and DIS grids */ 422/* structure that describes the 3A and DIS grids */
423struct ia_css_grid_info { 423struct ia_css_grid_info {
424 /** \name ISP input size 424 /* \name ISP input size
425 * that is visible for user 425 * that is visible for user
426 * @{ 426 * @{
427 */ 427 */
428 uint32_t isp_in_width; 428 uint32_t isp_in_width;
429 uint32_t isp_in_height; 429 uint32_t isp_in_height;
430 /** @}*/ 430 /* @}*/
431 431
432 struct ia_css_3a_grid_info s3a_grid; /**< 3A grid info */ 432 struct ia_css_3a_grid_info s3a_grid; /** 3A grid info */
433 union ia_css_dvs_grid_u dvs_grid; 433 union ia_css_dvs_grid_u dvs_grid;
434 /**< All types of DVS statistics grid info union */ 434 /** All types of DVS statistics grid info union */
435 435
436 enum ia_css_vamem_type vamem_type; 436 enum ia_css_vamem_type vamem_type;
437}; 437};
438 438
439/** defaults for ia_css_grid_info structs */ 439/* defaults for ia_css_grid_info structs */
440#define DEFAULT_GRID_INFO \ 440#define DEFAULT_GRID_INFO \
441{ \ 441{ \
442 0, /* isp_in_width */ \ 442 0, /* isp_in_width */ \
@@ -446,25 +446,25 @@ struct ia_css_grid_info {
446 IA_CSS_VAMEM_TYPE_1 /* vamem_type */ \ 446 IA_CSS_VAMEM_TYPE_1 /* vamem_type */ \
447} 447}
448 448
449/** Morphing table, used for geometric distortion and chromatic abberration 449/* Morphing table, used for geometric distortion and chromatic abberration
450 * correction (GDCAC, also called GDC). 450 * correction (GDCAC, also called GDC).
451 * This table describes the imperfections introduced by the lens, the 451 * This table describes the imperfections introduced by the lens, the
452 * advanced ISP can correct for these imperfections using this table. 452 * advanced ISP can correct for these imperfections using this table.
453 */ 453 */
454struct ia_css_morph_table { 454struct ia_css_morph_table {
455 uint32_t enable; /**< To disable GDC, set this field to false. The 455 uint32_t enable; /** To disable GDC, set this field to false. The
456 coordinates fields can be set to NULL in this case. */ 456 coordinates fields can be set to NULL in this case. */
457 uint32_t height; /**< Table height */ 457 uint32_t height; /** Table height */
458 uint32_t width; /**< Table width */ 458 uint32_t width; /** Table width */
459 uint16_t *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES]; 459 uint16_t *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES];
460 /**< X coordinates that describe the sensor imperfection */ 460 /** X coordinates that describe the sensor imperfection */
461 uint16_t *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES]; 461 uint16_t *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES];
462 /**< Y coordinates that describe the sensor imperfection */ 462 /** Y coordinates that describe the sensor imperfection */
463}; 463};
464 464
465struct ia_css_dvs_6axis_config { 465struct ia_css_dvs_6axis_config {
466 unsigned int exp_id; 466 unsigned int exp_id;
467 /**< Exposure ID, see ia_css_event_public.h for more detail */ 467 /** Exposure ID, see ia_css_event_public.h for more detail */
468 uint32_t width_y; 468 uint32_t width_y;
469 uint32_t height_y; 469 uint32_t height_y;
470 uint32_t width_uv; 470 uint32_t width_uv;
@@ -479,16 +479,16 @@ struct ia_css_dvs_6axis_config {
479 * This specifies the coordinates (x,y) 479 * This specifies the coordinates (x,y)
480 */ 480 */
481struct ia_css_point { 481struct ia_css_point {
482 int32_t x; /**< x coordinate */ 482 int32_t x; /** x coordinate */
483 int32_t y; /**< y coordinate */ 483 int32_t y; /** y coordinate */
484}; 484};
485 485
486/** 486/**
487 * This specifies the region 487 * This specifies the region
488 */ 488 */
489struct ia_css_region { 489struct ia_css_region {
490 struct ia_css_point origin; /**< Starting point coordinates for the region */ 490 struct ia_css_point origin; /** Starting point coordinates for the region */
491 struct ia_css_resolution resolution; /**< Region resolution */ 491 struct ia_css_resolution resolution; /** Region resolution */
492}; 492};
493 493
494/** 494/**
@@ -509,30 +509,30 @@ struct ia_css_region {
509 * y + height <= effective input height 509 * y + height <= effective input height
510 */ 510 */
511struct ia_css_dz_config { 511struct ia_css_dz_config {
512 uint32_t dx; /**< Horizontal zoom factor */ 512 uint32_t dx; /** Horizontal zoom factor */
513 uint32_t dy; /**< Vertical zoom factor */ 513 uint32_t dy; /** Vertical zoom factor */
514 struct ia_css_region zoom_region; /**< region for zoom */ 514 struct ia_css_region zoom_region; /** region for zoom */
515}; 515};
516 516
517/** The still capture mode, this can be RAW (simply copy sensor input to DDR), 517/* The still capture mode, this can be RAW (simply copy sensor input to DDR),
518 * Primary ISP, the Advanced ISP (GDC) or the low-light ISP (ANR). 518 * Primary ISP, the Advanced ISP (GDC) or the low-light ISP (ANR).
519 */ 519 */
520enum ia_css_capture_mode { 520enum ia_css_capture_mode {
521 IA_CSS_CAPTURE_MODE_RAW, /**< no processing, copy data only */ 521 IA_CSS_CAPTURE_MODE_RAW, /** no processing, copy data only */
522 IA_CSS_CAPTURE_MODE_BAYER, /**< bayer processing, up to demosaic */ 522 IA_CSS_CAPTURE_MODE_BAYER, /** bayer processing, up to demosaic */
523 IA_CSS_CAPTURE_MODE_PRIMARY, /**< primary ISP */ 523 IA_CSS_CAPTURE_MODE_PRIMARY, /** primary ISP */
524 IA_CSS_CAPTURE_MODE_ADVANCED, /**< advanced ISP (GDC) */ 524 IA_CSS_CAPTURE_MODE_ADVANCED, /** advanced ISP (GDC) */
525 IA_CSS_CAPTURE_MODE_LOW_LIGHT /**< low light ISP (ANR) */ 525 IA_CSS_CAPTURE_MODE_LOW_LIGHT /** low light ISP (ANR) */
526}; 526};
527 527
528struct ia_css_capture_config { 528struct ia_css_capture_config {
529 enum ia_css_capture_mode mode; /**< Still capture mode */ 529 enum ia_css_capture_mode mode; /** Still capture mode */
530 uint32_t enable_xnr; /**< Enable/disable XNR */ 530 uint32_t enable_xnr; /** Enable/disable XNR */
531 uint32_t enable_raw_output; 531 uint32_t enable_raw_output;
532 bool enable_capture_pp_bli; /**< Enable capture_pp_bli mode */ 532 bool enable_capture_pp_bli; /** Enable capture_pp_bli mode */
533}; 533};
534 534
535/** default settings for ia_css_capture_config structs */ 535/* default settings for ia_css_capture_config structs */
536#define DEFAULT_CAPTURE_CONFIG \ 536#define DEFAULT_CAPTURE_CONFIG \
537{ \ 537{ \
538 IA_CSS_CAPTURE_MODE_PRIMARY, /* mode (capture) */ \ 538 IA_CSS_CAPTURE_MODE_PRIMARY, /* mode (capture) */ \
@@ -542,7 +542,7 @@ struct ia_css_capture_config {
542} 542}
543 543
544 544
545/** ISP filter configuration. This is a collection of configurations 545/* ISP filter configuration. This is a collection of configurations
546 * for each of the ISP filters (modules). 546 * for each of the ISP filters (modules).
547 * 547 *
548 * NOTE! The contents of all pointers is copied when get or set with the 548 * NOTE! The contents of all pointers is copied when get or set with the
@@ -557,98 +557,98 @@ struct ia_css_capture_config {
557 * ["ISP block", 2only] : ISP block is used only for ISP2. 557 * ["ISP block", 2only] : ISP block is used only for ISP2.
558 */ 558 */
559struct ia_css_isp_config { 559struct ia_css_isp_config {
560 struct ia_css_wb_config *wb_config; /**< White Balance 560 struct ia_css_wb_config *wb_config; /** White Balance
561 [WB1, 1&2] */ 561 [WB1, 1&2] */
562 struct ia_css_cc_config *cc_config; /**< Color Correction 562 struct ia_css_cc_config *cc_config; /** Color Correction
563 [CSC1, 1only] */ 563 [CSC1, 1only] */
564 struct ia_css_tnr_config *tnr_config; /**< Temporal Noise Reduction 564 struct ia_css_tnr_config *tnr_config; /** Temporal Noise Reduction
565 [TNR1, 1&2] */ 565 [TNR1, 1&2] */
566 struct ia_css_ecd_config *ecd_config; /**< Eigen Color Demosaicing 566 struct ia_css_ecd_config *ecd_config; /** Eigen Color Demosaicing
567 [DE2, 2only] */ 567 [DE2, 2only] */
568 struct ia_css_ynr_config *ynr_config; /**< Y(Luma) Noise Reduction 568 struct ia_css_ynr_config *ynr_config; /** Y(Luma) Noise Reduction
569 [YNR2&YEE2, 2only] */ 569 [YNR2&YEE2, 2only] */
570 struct ia_css_fc_config *fc_config; /**< Fringe Control 570 struct ia_css_fc_config *fc_config; /** Fringe Control
571 [FC2, 2only] */ 571 [FC2, 2only] */
572 struct ia_css_formats_config *formats_config; /**< Formats Control for main output 572 struct ia_css_formats_config *formats_config; /** Formats Control for main output
573 [FORMATS, 1&2] */ 573 [FORMATS, 1&2] */
574 struct ia_css_cnr_config *cnr_config; /**< Chroma Noise Reduction 574 struct ia_css_cnr_config *cnr_config; /** Chroma Noise Reduction
575 [CNR2, 2only] */ 575 [CNR2, 2only] */
576 struct ia_css_macc_config *macc_config; /**< MACC 576 struct ia_css_macc_config *macc_config; /** MACC
577 [MACC2, 2only] */ 577 [MACC2, 2only] */
578 struct ia_css_ctc_config *ctc_config; /**< Chroma Tone Control 578 struct ia_css_ctc_config *ctc_config; /** Chroma Tone Control
579 [CTC2, 2only] */ 579 [CTC2, 2only] */
580 struct ia_css_aa_config *aa_config; /**< YUV Anti-Aliasing 580 struct ia_css_aa_config *aa_config; /** YUV Anti-Aliasing
581 [AA2, 2only] 581 [AA2, 2only]
582 (not used currently) */ 582 (not used currently) */
583 struct ia_css_aa_config *baa_config; /**< Bayer Anti-Aliasing 583 struct ia_css_aa_config *baa_config; /** Bayer Anti-Aliasing
584 [BAA2, 1&2] */ 584 [BAA2, 1&2] */
585 struct ia_css_ce_config *ce_config; /**< Chroma Enhancement 585 struct ia_css_ce_config *ce_config; /** Chroma Enhancement
586 [CE1, 1only] */ 586 [CE1, 1only] */
587 struct ia_css_dvs_6axis_config *dvs_6axis_config; 587 struct ia_css_dvs_6axis_config *dvs_6axis_config;
588 struct ia_css_ob_config *ob_config; /**< Objective Black 588 struct ia_css_ob_config *ob_config; /** Objective Black
589 [OB1, 1&2] */ 589 [OB1, 1&2] */
590 struct ia_css_dp_config *dp_config; /**< Defect Pixel Correction 590 struct ia_css_dp_config *dp_config; /** Defect Pixel Correction
591 [DPC1/DPC2, 1&2] */ 591 [DPC1/DPC2, 1&2] */
592 struct ia_css_nr_config *nr_config; /**< Noise Reduction 592 struct ia_css_nr_config *nr_config; /** Noise Reduction
593 [BNR1&YNR1&CNR1, 1&2]*/ 593 [BNR1&YNR1&CNR1, 1&2]*/
594 struct ia_css_ee_config *ee_config; /**< Edge Enhancement 594 struct ia_css_ee_config *ee_config; /** Edge Enhancement
595 [YEE1, 1&2] */ 595 [YEE1, 1&2] */
596 struct ia_css_de_config *de_config; /**< Demosaic 596 struct ia_css_de_config *de_config; /** Demosaic
597 [DE1, 1only] */ 597 [DE1, 1only] */
598 struct ia_css_gc_config *gc_config; /**< Gamma Correction (for YUV) 598 struct ia_css_gc_config *gc_config; /** Gamma Correction (for YUV)
599 [GC1, 1only] */ 599 [GC1, 1only] */
600 struct ia_css_anr_config *anr_config; /**< Advanced Noise Reduction */ 600 struct ia_css_anr_config *anr_config; /** Advanced Noise Reduction */
601 struct ia_css_3a_config *s3a_config; /**< 3A Statistics config */ 601 struct ia_css_3a_config *s3a_config; /** 3A Statistics config */
602 struct ia_css_xnr_config *xnr_config; /**< eXtra Noise Reduction */ 602 struct ia_css_xnr_config *xnr_config; /** eXtra Noise Reduction */
603 struct ia_css_dz_config *dz_config; /**< Digital Zoom */ 603 struct ia_css_dz_config *dz_config; /** Digital Zoom */
604 struct ia_css_cc_config *yuv2rgb_cc_config; /**< Color Correction 604 struct ia_css_cc_config *yuv2rgb_cc_config; /** Color Correction
605 [CCM2, 2only] */ 605 [CCM2, 2only] */
606 struct ia_css_cc_config *rgb2yuv_cc_config; /**< Color Correction 606 struct ia_css_cc_config *rgb2yuv_cc_config; /** Color Correction
607 [CSC2, 2only] */ 607 [CSC2, 2only] */
608 struct ia_css_macc_table *macc_table; /**< MACC 608 struct ia_css_macc_table *macc_table; /** MACC
609 [MACC1/MACC2, 1&2]*/ 609 [MACC1/MACC2, 1&2]*/
610 struct ia_css_gamma_table *gamma_table; /**< Gamma Correction (for YUV) 610 struct ia_css_gamma_table *gamma_table; /** Gamma Correction (for YUV)
611 [GC1, 1only] */ 611 [GC1, 1only] */
612 struct ia_css_ctc_table *ctc_table; /**< Chroma Tone Control 612 struct ia_css_ctc_table *ctc_table; /** Chroma Tone Control
613 [CTC1, 1only] */ 613 [CTC1, 1only] */
614 614
615 /** \deprecated */ 615 /* \deprecated */
616 struct ia_css_xnr_table *xnr_table; /**< eXtra Noise Reduction 616 struct ia_css_xnr_table *xnr_table; /** eXtra Noise Reduction
617 [XNR1, 1&2] */ 617 [XNR1, 1&2] */
618 struct ia_css_rgb_gamma_table *r_gamma_table;/**< sRGB Gamma Correction 618 struct ia_css_rgb_gamma_table *r_gamma_table;/** sRGB Gamma Correction
619 [GC2, 2only] */ 619 [GC2, 2only] */
620 struct ia_css_rgb_gamma_table *g_gamma_table;/**< sRGB Gamma Correction 620 struct ia_css_rgb_gamma_table *g_gamma_table;/** sRGB Gamma Correction
621 [GC2, 2only] */ 621 [GC2, 2only] */
622 struct ia_css_rgb_gamma_table *b_gamma_table;/**< sRGB Gamma Correction 622 struct ia_css_rgb_gamma_table *b_gamma_table;/** sRGB Gamma Correction
623 [GC2, 2only] */ 623 [GC2, 2only] */
624 struct ia_css_vector *motion_vector; /**< For 2-axis DVS */ 624 struct ia_css_vector *motion_vector; /** For 2-axis DVS */
625 struct ia_css_shading_table *shading_table; 625 struct ia_css_shading_table *shading_table;
626 struct ia_css_morph_table *morph_table; 626 struct ia_css_morph_table *morph_table;
627 struct ia_css_dvs_coefficients *dvs_coefs; /**< DVS 1.0 coefficients */ 627 struct ia_css_dvs_coefficients *dvs_coefs; /** DVS 1.0 coefficients */
628 struct ia_css_dvs2_coefficients *dvs2_coefs; /**< DVS 2.0 coefficients */ 628 struct ia_css_dvs2_coefficients *dvs2_coefs; /** DVS 2.0 coefficients */
629 struct ia_css_capture_config *capture_config; 629 struct ia_css_capture_config *capture_config;
630 struct ia_css_anr_thres *anr_thres; 630 struct ia_css_anr_thres *anr_thres;
631 /** @deprecated{Old shading settings, see bugzilla bz675 for details} */ 631 /* @deprecated{Old shading settings, see bugzilla bz675 for details} */
632 struct ia_css_shading_settings *shading_settings; 632 struct ia_css_shading_settings *shading_settings;
633 struct ia_css_xnr3_config *xnr3_config; /**< eXtreme Noise Reduction v3 */ 633 struct ia_css_xnr3_config *xnr3_config; /** eXtreme Noise Reduction v3 */
634 /** comment from Lasse: Be aware how this feature will affect coordinate 634 /* comment from Lasse: Be aware how this feature will affect coordinate
635 * normalization in different parts of the system. (e.g. face detection, 635 * normalization in different parts of the system. (e.g. face detection,
636 * touch focus, 3A statistics and windows of interest, shading correction, 636 * touch focus, 3A statistics and windows of interest, shading correction,
637 * DVS, GDC) from IQ tool level and application level down-to ISP FW level. 637 * DVS, GDC) from IQ tool level and application level down-to ISP FW level.
638 * the risk for regression is not in the individual blocks, but how they 638 * the risk for regression is not in the individual blocks, but how they
639 * integrate together. */ 639 * integrate together. */
640 struct ia_css_output_config *output_config; /**< Main Output Mirroring, flipping */ 640 struct ia_css_output_config *output_config; /** Main Output Mirroring, flipping */
641 641
642#ifdef ISP2401 642#ifdef ISP2401
643 struct ia_css_tnr3_kernel_config *tnr3_config; /**< TNR3 config */ 643 struct ia_css_tnr3_kernel_config *tnr3_config; /** TNR3 config */
644#endif 644#endif
645 struct ia_css_scaler_config *scaler_config; /**< Skylake: scaler config (optional) */ 645 struct ia_css_scaler_config *scaler_config; /** Skylake: scaler config (optional) */
646 struct ia_css_formats_config *formats_config_display;/**< Formats control for viewfinder/display output (optional) 646 struct ia_css_formats_config *formats_config_display;/** Formats control for viewfinder/display output (optional)
647 [OSYS, n/a] */ 647 [OSYS, n/a] */
648 struct ia_css_output_config *output_config_display; /**< Viewfinder/display output mirroring, flipping (optional) */ 648 struct ia_css_output_config *output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */
649 649
650 struct ia_css_frame *output_frame; /**< Output frame the config is to be applied to (optional) */ 650 struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */
651 uint32_t isp_config_id; /**< Unique ID to track which config was actually applied to a particular frame */ 651 uint32_t isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */
652}; 652};
653 653
654#endif /* _IA_CSS_TYPES_H */ 654#endif /* _IA_CSS_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h
index 48c59896e847..1e88901e0b82 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h
@@ -15,16 +15,16 @@
15#ifndef __IA_CSS_VERSION_H 15#ifndef __IA_CSS_VERSION_H
16#define __IA_CSS_VERSION_H 16#define __IA_CSS_VERSION_H
17 17
18/** @file 18/* @file
19 * This file contains functions to retrieve CSS-API version information 19 * This file contains functions to retrieve CSS-API version information
20 */ 20 */
21 21
22#include <ia_css_err.h> 22#include <ia_css_err.h>
23 23
24/** a common size for the version arrays */ 24/* a common size for the version arrays */
25#define MAX_VERSION_SIZE 500 25#define MAX_VERSION_SIZE 500
26 26
27/** @brief Retrieves the current CSS version 27/* @brief Retrieves the current CSS version
28 * @param[out] version A pointer to a buffer where to put the generated 28 * @param[out] version A pointer to a buffer where to put the generated
29 * version string. NULL is ignored. 29 * version string. NULL is ignored.
30 * @param[in] max_size Size of the version buffer. If version string 30 * @param[in] max_size Size of the version buffer. If version string
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h
index 834eedbbeeff..0b95bf9b9aaf 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h
@@ -15,12 +15,12 @@
15#ifndef __IA_CSS_AA2_TYPES_H 15#ifndef __IA_CSS_AA2_TYPES_H
16#define __IA_CSS_AA2_TYPES_H 16#define __IA_CSS_AA2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Anti-Aliasing parameters. 19* CSS-API header file for Anti-Aliasing parameters.
20*/ 20*/
21 21
22 22
23/** Anti-Aliasing configuration. 23/* Anti-Aliasing configuration.
24 * 24 *
25 * This structure is used both for YUV AA and Bayer AA. 25 * This structure is used both for YUV AA and Bayer AA.
26 * 26 *
@@ -39,7 +39,7 @@
39 * ISP2: BAA2 is used. 39 * ISP2: BAA2 is used.
40 */ 40 */
41struct ia_css_aa_config { 41struct ia_css_aa_config {
42 uint16_t strength; /**< Strength of the filter. 42 uint16_t strength; /** Strength of the filter.
43 u0.13, [0,8191], 43 u0.13, [0,8191],
44 default/ineffective 0 */ 44 default/ineffective 0 */
45}; 45};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h
index e205574098f2..dc317a857369 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_ANR_TYPES_H 15#ifndef __IA_CSS_ANR_TYPES_H
16#define __IA_CSS_ANR_TYPES_H 16#define __IA_CSS_ANR_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Advanced Noise Reduction kernel v1 19* CSS-API header file for Advanced Noise Reduction kernel v1
20*/ 20*/
21 21
@@ -23,11 +23,11 @@
23#define ANR_BPP 10 23#define ANR_BPP 10
24#define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8))*8) 24#define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8))*8)
25 25
26/** Advanced Noise Reduction configuration. 26/* Advanced Noise Reduction configuration.
27 * This is also known as Low-Light. 27 * This is also known as Low-Light.
28 */ 28 */
29struct ia_css_anr_config { 29struct ia_css_anr_config {
30 int32_t threshold; /**< Threshold */ 30 int32_t threshold; /** Threshold */
31 int32_t thresholds[4*4*4]; 31 int32_t thresholds[4*4*4];
32 int32_t factors[3]; 32 int32_t factors[3];
33}; 33};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h
index 3832ada433ec..9b611315392c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_ANR2_TYPES_H 15#ifndef __IA_CSS_ANR2_TYPES_H
16#define __IA_CSS_ANR2_TYPES_H 16#define __IA_CSS_ANR2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Advanced Noise Reduction kernel v2 19* CSS-API header file for Advanced Noise Reduction kernel v2
20*/ 20*/
21 21
@@ -23,7 +23,7 @@
23 23
24#define ANR_PARAM_SIZE 13 24#define ANR_PARAM_SIZE 13
25 25
26/** Advanced Noise Reduction (ANR) thresholds */ 26/* Advanced Noise Reduction (ANR) thresholds */
27struct ia_css_anr_thres { 27struct ia_css_anr_thres {
28 int16_t data[13*64]; 28 int16_t data[13*64];
29}; 29};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h
index 4a289853367a..312141793fd2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h
@@ -18,7 +18,7 @@
18#include "vmem.h" 18#include "vmem.h"
19#include "ia_css_anr2_types.h" 19#include "ia_css_anr2_types.h"
20 20
21/** Advanced Noise Reduction (ANR) thresholds */ 21/* Advanced Noise Reduction (ANR) thresholds */
22 22
23struct ia_css_isp_anr2_params { 23struct ia_css_isp_anr2_params {
24 VMEM_ARRAY(data, ANR_PARAM_SIZE*ISP_VEC_NELEMS); 24 VMEM_ARRAY(data, ANR_PARAM_SIZE*ISP_VEC_NELEMS);
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h
index 75ca7606b95c..a0d355454aa3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h
@@ -27,7 +27,7 @@
27#define BAYER_QUAD_HEIGHT 2 27#define BAYER_QUAD_HEIGHT 2
28#define NOF_BAYER_VECTORS 4 28#define NOF_BAYER_VECTORS 4
29 29
30/** bayer load/store */ 30/* bayer load/store */
31struct sh_css_isp_bayer_ls_isp_config { 31struct sh_css_isp_bayer_ls_isp_config {
32 uint32_t base_address[NUM_BAYER_LS]; 32 uint32_t base_address[NUM_BAYER_LS];
33 uint32_t width[NUM_BAYER_LS]; 33 uint32_t width[NUM_BAYER_LS];
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h
index 9ae27a9e0baa..ec1688e7352d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_BH_TYPES_H 15#ifndef __IA_CSS_BH_TYPES_H
16#define __IA_CSS_BH_TYPES_H 16#define __IA_CSS_BH_TYPES_H
17 17
18/** Number of elements in the BH table. 18/* Number of elements in the BH table.
19 * Should be consistent with hmem.h 19 * Should be consistent with hmem.h
20 */ 20 */
21#define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH 21#define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH
@@ -27,7 +27,7 @@
27#define BH_COLOR_Y (3) 27#define BH_COLOR_Y (3)
28#define BH_COLOR_NUM (4) 28#define BH_COLOR_NUM (4)
29 29
30/** BH table */ 30/* BH table */
31struct ia_css_bh_table { 31struct ia_css_bh_table {
32 uint32_t hmem[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE]; 32 uint32_t hmem[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE];
33}; 33};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h
index 219fb835cb26..87e0f19c856b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h
@@ -15,13 +15,13 @@
15#ifndef __IA_CSS_BNLM_TYPES_H 15#ifndef __IA_CSS_BNLM_TYPES_H
16#define __IA_CSS_BNLM_TYPES_H 16#define __IA_CSS_BNLM_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Bayer Non-Linear Mean parameters. 19* CSS-API header file for Bayer Non-Linear Mean parameters.
20*/ 20*/
21 21
22#include "type_support.h" /* int32_t */ 22#include "type_support.h" /* int32_t */
23 23
24/** Bayer Non-Linear Mean configuration 24/* Bayer Non-Linear Mean configuration
25 * 25 *
26 * \brief BNLM public parameters. 26 * \brief BNLM public parameters.
27 * \details Struct with all parameters for the BNLM kernel that can be set 27 * \details Struct with all parameters for the BNLM kernel that can be set
@@ -30,16 +30,16 @@
30 * ISP2.6.1: BNLM is used. 30 * ISP2.6.1: BNLM is used.
31 */ 31 */
32struct ia_css_bnlm_config { 32struct ia_css_bnlm_config {
33 bool rad_enable; /**< Enable a radial dependency in a weight calculation */ 33 bool rad_enable; /** Enable a radial dependency in a weight calculation */
34 int32_t rad_x_origin; /**< Initial x coordinate for a radius calculation */ 34 int32_t rad_x_origin; /** Initial x coordinate for a radius calculation */
35 int32_t rad_y_origin; /**< Initial x coordinate for a radius calculation */ 35 int32_t rad_y_origin; /** Initial x coordinate for a radius calculation */
36 /* a threshold for average of weights if this < Th, do not denoise pixel */ 36 /* a threshold for average of weights if this < Th, do not denoise pixel */
37 int32_t avg_min_th; 37 int32_t avg_min_th;
38 /* minimum weight for denoising if max < th, do not denoise pixel */ 38 /* minimum weight for denoising if max < th, do not denoise pixel */
39 int32_t max_min_th; 39 int32_t max_min_th;
40 40
41 /**@{*/ 41 /**@{*/
42 /** Coefficient for approximation, in the form of (1 + x / N)^N, 42 /* Coefficient for approximation, in the form of (1 + x / N)^N,
43 * that fits the first-order exp() to default exp_lut in BNLM sheet 43 * that fits the first-order exp() to default exp_lut in BNLM sheet
44 * */ 44 * */
45 int32_t exp_coeff_a; 45 int32_t exp_coeff_a;
@@ -48,55 +48,55 @@ struct ia_css_bnlm_config {
48 uint32_t exp_exponent; 48 uint32_t exp_exponent;
49 /**@}*/ 49 /**@}*/
50 50
51 int32_t nl_th[3]; /**< Detail thresholds */ 51 int32_t nl_th[3]; /** Detail thresholds */
52 52
53 /** Index for n-th maximum candidate weight for each detail group */ 53 /* Index for n-th maximum candidate weight for each detail group */
54 int32_t match_quality_max_idx[4]; 54 int32_t match_quality_max_idx[4];
55 55
56 /**@{*/ 56 /**@{*/
57 /** A lookup table for 1/sqrt(1+mu) approximation */ 57 /* A lookup table for 1/sqrt(1+mu) approximation */
58 int32_t mu_root_lut_thr[15]; 58 int32_t mu_root_lut_thr[15];
59 int32_t mu_root_lut_val[16]; 59 int32_t mu_root_lut_val[16];
60 /**@}*/ 60 /**@}*/
61 /**@{*/ 61 /**@{*/
62 /** A lookup table for SAD normalization */ 62 /* A lookup table for SAD normalization */
63 int32_t sad_norm_lut_thr[15]; 63 int32_t sad_norm_lut_thr[15];
64 int32_t sad_norm_lut_val[16]; 64 int32_t sad_norm_lut_val[16];
65 /**@}*/ 65 /**@}*/
66 /**@{*/ 66 /**@{*/
67 /** A lookup table that models a weight's dependency on textures */ 67 /* A lookup table that models a weight's dependency on textures */
68 int32_t sig_detail_lut_thr[15]; 68 int32_t sig_detail_lut_thr[15];
69 int32_t sig_detail_lut_val[16]; 69 int32_t sig_detail_lut_val[16];
70 /**@}*/ 70 /**@}*/
71 /**@{*/ 71 /**@{*/
72 /** A lookup table that models a weight's dependency on a pixel's radial distance */ 72 /* A lookup table that models a weight's dependency on a pixel's radial distance */
73 int32_t sig_rad_lut_thr[15]; 73 int32_t sig_rad_lut_thr[15];
74 int32_t sig_rad_lut_val[16]; 74 int32_t sig_rad_lut_val[16];
75 /**@}*/ 75 /**@}*/
76 /**@{*/ 76 /**@{*/
77 /** A lookup table to control denoise power depending on a pixel's radial distance */ 77 /* A lookup table to control denoise power depending on a pixel's radial distance */
78 int32_t rad_pow_lut_thr[15]; 78 int32_t rad_pow_lut_thr[15];
79 int32_t rad_pow_lut_val[16]; 79 int32_t rad_pow_lut_val[16];
80 /**@}*/ 80 /**@}*/
81 /**@{*/ 81 /**@{*/
82 /** Non linear transfer functions to calculate the blending coefficient depending on detail group */ 82 /* Non linear transfer functions to calculate the blending coefficient depending on detail group */
83 /** detail group 0 */ 83 /* detail group 0 */
84 /**@{*/ 84 /**@{*/
85 int32_t nl_0_lut_thr[15]; 85 int32_t nl_0_lut_thr[15];
86 int32_t nl_0_lut_val[16]; 86 int32_t nl_0_lut_val[16];
87 /**@}*/ 87 /**@}*/
88 /**@{*/ 88 /**@{*/
89 /** detail group 1 */ 89 /* detail group 1 */
90 int32_t nl_1_lut_thr[15]; 90 int32_t nl_1_lut_thr[15];
91 int32_t nl_1_lut_val[16]; 91 int32_t nl_1_lut_val[16];
92 /**@}*/ 92 /**@}*/
93 /**@{*/ 93 /**@{*/
94 /** detail group 2 */ 94 /* detail group 2 */
95 int32_t nl_2_lut_thr[15]; 95 int32_t nl_2_lut_thr[15];
96 int32_t nl_2_lut_val[16]; 96 int32_t nl_2_lut_val[16];
97 /**@}*/ 97 /**@}*/
98 /**@{*/ 98 /**@{*/
99 /** detail group 3 */ 99 /* detail group 3 */
100 int32_t nl_3_lut_thr[15]; 100 int32_t nl_3_lut_thr[15];
101 int32_t nl_3_lut_val[16]; 101 int32_t nl_3_lut_val[16];
102 /**@}*/ 102 /**@}*/
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h
index be80f705d8a1..551bd0ed3bac 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h
@@ -15,13 +15,13 @@
15#ifndef __IA_CSS_BNR2_2_TYPES_H 15#ifndef __IA_CSS_BNR2_2_TYPES_H
16#define __IA_CSS_BNR2_2_TYPES_H 16#define __IA_CSS_BNR2_2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Bayer Noise Reduction parameters. 19* CSS-API header file for Bayer Noise Reduction parameters.
20*/ 20*/
21 21
22#include "type_support.h" /* int32_t */ 22#include "type_support.h" /* int32_t */
23 23
24/** Bayer Noise Reduction 2.2 configuration 24/* Bayer Noise Reduction 2.2 configuration
25 * 25 *
26 * \brief BNR2_2 public parameters. 26 * \brief BNR2_2 public parameters.
27 * \details Struct with all parameters for the BNR2.2 kernel that can be set 27 * \details Struct with all parameters for the BNR2.2 kernel that can be set
@@ -31,41 +31,41 @@
31 */ 31 */
32struct ia_css_bnr2_2_config { 32struct ia_css_bnr2_2_config {
33 /**@{*/ 33 /**@{*/
34 /** Directional variance gain for R/G/B components in dark region */ 34 /* Directional variance gain for R/G/B components in dark region */
35 int32_t d_var_gain_r; 35 int32_t d_var_gain_r;
36 int32_t d_var_gain_g; 36 int32_t d_var_gain_g;
37 int32_t d_var_gain_b; 37 int32_t d_var_gain_b;
38 /**@}*/ 38 /**@}*/
39 /**@{*/ 39 /**@{*/
40 /** Slope of Directional variance gain between dark and bright region */ 40 /* Slope of Directional variance gain between dark and bright region */
41 int32_t d_var_gain_slope_r; 41 int32_t d_var_gain_slope_r;
42 int32_t d_var_gain_slope_g; 42 int32_t d_var_gain_slope_g;
43 int32_t d_var_gain_slope_b; 43 int32_t d_var_gain_slope_b;
44 /**@}*/ 44 /**@}*/
45 /**@{*/ 45 /**@{*/
46 /** Non-Directional variance gain for R/G/B components in dark region */ 46 /* Non-Directional variance gain for R/G/B components in dark region */
47 int32_t n_var_gain_r; 47 int32_t n_var_gain_r;
48 int32_t n_var_gain_g; 48 int32_t n_var_gain_g;
49 int32_t n_var_gain_b; 49 int32_t n_var_gain_b;
50 /**@}*/ 50 /**@}*/
51 /**@{*/ 51 /**@{*/
52 /** Slope of Non-Directional variance gain between dark and bright region */ 52 /* Slope of Non-Directional variance gain between dark and bright region */
53 int32_t n_var_gain_slope_r; 53 int32_t n_var_gain_slope_r;
54 int32_t n_var_gain_slope_g; 54 int32_t n_var_gain_slope_g;
55 int32_t n_var_gain_slope_b; 55 int32_t n_var_gain_slope_b;
56 /**@}*/ 56 /**@}*/
57 57
58 int32_t dir_thres; /**< Threshold for directional filtering */ 58 int32_t dir_thres; /** Threshold for directional filtering */
59 int32_t dir_thres_w; /**< Threshold width for directional filtering */ 59 int32_t dir_thres_w; /** Threshold width for directional filtering */
60 int32_t var_offset_coef; /**< Variance offset coefficient */ 60 int32_t var_offset_coef; /** Variance offset coefficient */
61 int32_t dir_gain; /**< Gain for directional coefficient */ 61 int32_t dir_gain; /** Gain for directional coefficient */
62 int32_t detail_gain; /**< Gain for low contrast texture control */ 62 int32_t detail_gain; /** Gain for low contrast texture control */
63 int32_t detail_gain_divisor; /**< Gain divisor for low contrast texture control */ 63 int32_t detail_gain_divisor; /** Gain divisor for low contrast texture control */
64 int32_t detail_level_offset; /**< Bias value for low contrast texture control */ 64 int32_t detail_level_offset; /** Bias value for low contrast texture control */
65 int32_t d_var_th_min; /**< Minimum clipping value for directional variance*/ 65 int32_t d_var_th_min; /** Minimum clipping value for directional variance*/
66 int32_t d_var_th_max; /**< Maximum clipping value for diretional variance*/ 66 int32_t d_var_th_max; /** Maximum clipping value for diretional variance*/
67 int32_t n_var_th_min; /**< Minimum clipping value for non-directional variance*/ 67 int32_t n_var_th_min; /** Minimum clipping value for non-directional variance*/
68 int32_t n_var_th_max; /**< Maximum clipping value for non-directional variance*/ 68 int32_t n_var_th_max; /** Maximum clipping value for non-directional variance*/
69}; 69};
70 70
71#endif /* __IA_CSS_BNR2_2_TYPES_H */ 71#endif /* __IA_CSS_BNR2_2_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h
index 6df6c2be9a70..3ebc069d8ada 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_CNR2_TYPES_H 15#ifndef __IA_CSS_CNR2_TYPES_H
16#define __IA_CSS_CNR2_TYPES_H 16#define __IA_CSS_CNR2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Chroma Noise Reduction (CNR) parameters 19* CSS-API header file for Chroma Noise Reduction (CNR) parameters
20*/ 20*/
21 21
22/** Chroma Noise Reduction configuration. 22/* Chroma Noise Reduction configuration.
23 * 23 *
24 * Small sensitivity of edge means strong smoothness and NR performance. 24 * Small sensitivity of edge means strong smoothness and NR performance.
25 * If you see blurred color on vertical edges, 25 * If you see blurred color on vertical edges,
@@ -33,21 +33,21 @@
33 * ISP2: CNR2 is used for Still. 33 * ISP2: CNR2 is used for Still.
34 */ 34 */
35struct ia_css_cnr_config { 35struct ia_css_cnr_config {
36 uint16_t coring_u; /**< Coring level of U. 36 uint16_t coring_u; /** Coring level of U.
37 u0.13, [0,8191], default/ineffective 0 */ 37 u0.13, [0,8191], default/ineffective 0 */
38 uint16_t coring_v; /**< Coring level of V. 38 uint16_t coring_v; /** Coring level of V.
39 u0.13, [0,8191], default/ineffective 0 */ 39 u0.13, [0,8191], default/ineffective 0 */
40 uint16_t sense_gain_vy; /**< Sensitivity of horizontal edge of Y. 40 uint16_t sense_gain_vy; /** Sensitivity of horizontal edge of Y.
41 u13.0, [0,8191], default 100, ineffective 8191 */ 41 u13.0, [0,8191], default 100, ineffective 8191 */
42 uint16_t sense_gain_vu; /**< Sensitivity of horizontal edge of U. 42 uint16_t sense_gain_vu; /** Sensitivity of horizontal edge of U.
43 u13.0, [0,8191], default 100, ineffective 8191 */ 43 u13.0, [0,8191], default 100, ineffective 8191 */
44 uint16_t sense_gain_vv; /**< Sensitivity of horizontal edge of V. 44 uint16_t sense_gain_vv; /** Sensitivity of horizontal edge of V.
45 u13.0, [0,8191], default 100, ineffective 8191 */ 45 u13.0, [0,8191], default 100, ineffective 8191 */
46 uint16_t sense_gain_hy; /**< Sensitivity of vertical edge of Y. 46 uint16_t sense_gain_hy; /** Sensitivity of vertical edge of Y.
47 u13.0, [0,8191], default 50, ineffective 8191 */ 47 u13.0, [0,8191], default 50, ineffective 8191 */
48 uint16_t sense_gain_hu; /**< Sensitivity of vertical edge of U. 48 uint16_t sense_gain_hu; /** Sensitivity of vertical edge of U.
49 u13.0, [0,8191], default 50, ineffective 8191 */ 49 u13.0, [0,8191], default 50, ineffective 8191 */
50 uint16_t sense_gain_hv; /**< Sensitivity of vertical edge of V. 50 uint16_t sense_gain_hv; /** Sensitivity of vertical edge of V.
51 u13.0, [0,8191], default 50, ineffective 8191 */ 51 u13.0, [0,8191], default 50, ineffective 8191 */
52}; 52};
53 53
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h
index 3f11442500f0..47a38fd65950 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h
@@ -23,10 +23,10 @@
23 * 23 *
24 */ 24 */
25struct ia_css_conversion_config { 25struct ia_css_conversion_config {
26 uint32_t en; /**< en parameter */ 26 uint32_t en; /** en parameter */
27 uint32_t dummy0; /**< dummy0 dummy parameter 0 */ 27 uint32_t dummy0; /** dummy0 dummy parameter 0 */
28 uint32_t dummy1; /**< dummy1 dummy parameter 1 */ 28 uint32_t dummy1; /** dummy1 dummy parameter 1 */
29 uint32_t dummy2; /**< dummy2 dummy parameter 2 */ 29 uint32_t dummy2; /** dummy2 dummy parameter 2 */
30}; 30};
31 31
32#endif /* __IA_CSS_CONVERSION_TYPES_H */ 32#endif /* __IA_CSS_CONVERSION_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h
index 8bfc8dad37a8..0f1812cdd92a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h
@@ -19,7 +19,7 @@
19#include "dma.h" 19#include "dma.h"
20#include "sh_css_internal.h" /* sh_css_crop_pos */ 20#include "sh_css_internal.h" /* sh_css_crop_pos */
21 21
22/** Crop frame */ 22/* Crop frame */
23struct sh_css_isp_crop_isp_config { 23struct sh_css_isp_crop_isp_config {
24 uint32_t width_a_over_b; 24 uint32_t width_a_over_b;
25 struct dma_port_config port_b; 25 struct dma_port_config port_b;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h
index 8091ad4d4602..b5d454225f89 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_CROP_TYPES_H 15#ifndef __IA_CSS_CROP_TYPES_H
16#define __IA_CSS_CROP_TYPES_H 16#define __IA_CSS_CROP_TYPES_H
17 17
18/** Crop frame 18/* Crop frame
19 * 19 *
20 * ISP block: crop frame 20 * ISP block: crop frame
21 */ 21 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h
index 54ced072467f..10404380c637 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_CSC_TYPES_H 15#ifndef __IA_CSS_CSC_TYPES_H
16#define __IA_CSS_CSC_TYPES_H 16#define __IA_CSS_CSC_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Color Space Conversion parameters. 19* CSS-API header file for Color Space Conversion parameters.
20*/ 20*/
21 21
22/** Color Correction configuration. 22/* Color Correction configuration.
23 * 23 *
24 * This structure is used for 3 cases. 24 * This structure is used for 3 cases.
25 * ("YCgCo" is the output format of Demosaic.) 25 * ("YCgCo" is the output format of Demosaic.)
@@ -68,9 +68,9 @@
68 * 4096 -3430 -666 68 * 4096 -3430 -666
69 */ 69 */
70struct ia_css_cc_config { 70struct ia_css_cc_config {
71 uint32_t fraction_bits;/**< Fractional bits of matrix. 71 uint32_t fraction_bits;/** Fractional bits of matrix.
72 u8.0, [0,13] */ 72 u8.0, [0,13] */
73 int32_t matrix[3 * 3]; /**< Conversion matrix. 73 int32_t matrix[3 * 3]; /** Conversion matrix.
74 s[13-fraction_bits].[fraction_bits], 74 s[13-fraction_bits].[fraction_bits],
75 [-8192,8191] */ 75 [-8192,8191] */
76}; 76};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h
index c66e823618f6..ad7040c9d7cb 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h
@@ -22,11 +22,11 @@
22 22
23/*VMEM Luma params*/ 23/*VMEM Luma params*/
24struct ia_css_isp_ctc2_vmem_params { 24struct ia_css_isp_ctc2_vmem_params {
25 /**< Gains by Y(Luma) at Y = 0.0,Y_X1, Y_X2, Y_X3, Y_X4*/ 25 /** Gains by Y(Luma) at Y = 0.0,Y_X1, Y_X2, Y_X3, Y_X4*/
26 VMEM_ARRAY(y_x, ISP_VEC_NELEMS); 26 VMEM_ARRAY(y_x, ISP_VEC_NELEMS);
27 /** kneepoints by Y(Luma) 0.0, y_x1, y_x2, y _x3, y_x4*/ 27 /* kneepoints by Y(Luma) 0.0, y_x1, y_x2, y _x3, y_x4*/
28 VMEM_ARRAY(y_y, ISP_VEC_NELEMS); 28 VMEM_ARRAY(y_y, ISP_VEC_NELEMS);
29 /** Slopes of lines interconnecting 29 /* Slopes of lines interconnecting
30 * 0.0 -> y_x1 -> y_x2 -> y _x3 -> y_x4 -> 1.0*/ 30 * 0.0 -> y_x1 -> y_x2 -> y _x3 -> y_x4 -> 1.0*/
31 VMEM_ARRAY(e_y_slope, ISP_VEC_NELEMS); 31 VMEM_ARRAY(e_y_slope, ISP_VEC_NELEMS);
32}; 32};
@@ -34,15 +34,15 @@ struct ia_css_isp_ctc2_vmem_params {
34/*DMEM Chroma params*/ 34/*DMEM Chroma params*/
35struct ia_css_isp_ctc2_dmem_params { 35struct ia_css_isp_ctc2_dmem_params {
36 36
37 /** Gains by UV(Chroma) under kneepoints uv_x0 and uv_x1*/ 37 /* Gains by UV(Chroma) under kneepoints uv_x0 and uv_x1*/
38 int32_t uv_y0; 38 int32_t uv_y0;
39 int32_t uv_y1; 39 int32_t uv_y1;
40 40
41 /** Kneepoints by UV(Chroma)- uv_x0 and uv_x1*/ 41 /* Kneepoints by UV(Chroma)- uv_x0 and uv_x1*/
42 int32_t uv_x0; 42 int32_t uv_x0;
43 int32_t uv_x1; 43 int32_t uv_x1;
44 44
45 /** Slope of line interconnecting uv_x0 -> uv_x1*/ 45 /* Slope of line interconnecting uv_x0 -> uv_x1*/
46 int32_t uv_dydx; 46 int32_t uv_dydx;
47 47
48}; 48};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h
index 7b75f01e2ad2..1222cf33e851 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_CTC2_TYPES_H 15#ifndef __IA_CSS_CTC2_TYPES_H
16#define __IA_CSS_CTC2_TYPES_H 16#define __IA_CSS_CTC2_TYPES_H
17 17
18/** Chroma Tone Control configuration. 18/* Chroma Tone Control configuration.
19* 19*
20* ISP block: CTC2 (CTC by polygonal approximation) 20* ISP block: CTC2 (CTC by polygonal approximation)
21* (ISP1: CTC1 (CTC by look-up table) is used.) 21* (ISP1: CTC1 (CTC by look-up table) is used.)
@@ -24,7 +24,7 @@
24*/ 24*/
25struct ia_css_ctc2_config { 25struct ia_css_ctc2_config {
26 26
27 /**< Gains by Y(Luma) at Y =0.0,Y_X1, Y_X2, Y_X3, Y_X4 and Y_X5 27 /** Gains by Y(Luma) at Y =0.0,Y_X1, Y_X2, Y_X3, Y_X4 and Y_X5
28 * --default/ineffective value: 4096(0.5f) 28 * --default/ineffective value: 4096(0.5f)
29 */ 29 */
30 int32_t y_y0; 30 int32_t y_y0;
@@ -33,19 +33,19 @@ struct ia_css_ctc2_config {
33 int32_t y_y3; 33 int32_t y_y3;
34 int32_t y_y4; 34 int32_t y_y4;
35 int32_t y_y5; 35 int32_t y_y5;
36 /** 1st-4th kneepoints by Y(Luma) --default/ineffective value:n/a 36 /* 1st-4th kneepoints by Y(Luma) --default/ineffective value:n/a
37 * requirement: 0.0 < y_x1 < y_x2 <y _x3 < y_x4 < 1.0 37 * requirement: 0.0 < y_x1 < y_x2 <y _x3 < y_x4 < 1.0
38 */ 38 */
39 int32_t y_x1; 39 int32_t y_x1;
40 int32_t y_x2; 40 int32_t y_x2;
41 int32_t y_x3; 41 int32_t y_x3;
42 int32_t y_x4; 42 int32_t y_x4;
43 /** Gains by UV(Chroma) under threholds uv_x0 and uv_x1 43 /* Gains by UV(Chroma) under threholds uv_x0 and uv_x1
44 * --default/ineffective value: 4096(0.5f) 44 * --default/ineffective value: 4096(0.5f)
45 */ 45 */
46 int32_t uv_y0; 46 int32_t uv_y0;
47 int32_t uv_y1; 47 int32_t uv_y1;
48 /** Minimum and Maximum Thresholds by UV(Chroma)- uv_x0 and uv_x1 48 /* Minimum and Maximum Thresholds by UV(Chroma)- uv_x0 and uv_x1
49 * --default/ineffective value: n/a 49 * --default/ineffective value: n/a
50 */ 50 */
51 int32_t uv_x0; 51 int32_t uv_x0;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h
index 1da215bb966d..4ac47ce10566 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_CTC_TYPES_H 15#ifndef __IA_CSS_CTC_TYPES_H
16#define __IA_CSS_CTC_TYPES_H 16#define __IA_CSS_CTC_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Chroma Tone Control parameters. 19* CSS-API header file for Chroma Tone Control parameters.
20*/ 20*/
21 21
22/** Fractional bits for CTC gain (used only for ISP1). 22/* Fractional bits for CTC gain (used only for ISP1).
23 * 23 *
24 * IA_CSS_CTC_COEF_SHIFT(=13) includes not only the fractional bits 24 * IA_CSS_CTC_COEF_SHIFT(=13) includes not only the fractional bits
25 * of gain(=8), but also the bits(=5) to convert chroma 25 * of gain(=8), but also the bits(=5) to convert chroma
@@ -32,14 +32,14 @@
32 */ 32 */
33#define IA_CSS_CTC_COEF_SHIFT 13 33#define IA_CSS_CTC_COEF_SHIFT 13
34 34
35/** Number of elements in the CTC table. */ 35/* Number of elements in the CTC table. */
36#define IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2 10 36#define IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2 10
37/** Number of elements in the CTC table. */ 37/* Number of elements in the CTC table. */
38#define IA_CSS_VAMEM_1_CTC_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2) 38#define IA_CSS_VAMEM_1_CTC_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2)
39 39
40/** Number of elements in the CTC table. */ 40/* Number of elements in the CTC table. */
41#define IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2 8 41#define IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2 8
42/** Number of elements in the CTC table. */ 42/* Number of elements in the CTC table. */
43#define IA_CSS_VAMEM_2_CTC_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2) + 1) 43#define IA_CSS_VAMEM_2_CTC_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2) + 1)
44 44
45enum ia_css_vamem_type { 45enum ia_css_vamem_type {
@@ -47,44 +47,44 @@ enum ia_css_vamem_type {
47 IA_CSS_VAMEM_TYPE_2 47 IA_CSS_VAMEM_TYPE_2
48}; 48};
49 49
50/** Chroma Tone Control configuration. 50/* Chroma Tone Control configuration.
51 * 51 *
52 * ISP block: CTC2 (CTC by polygonal line approximation) 52 * ISP block: CTC2 (CTC by polygonal line approximation)
53 * (ISP1: CTC1 (CTC by look-up table) is used.) 53 * (ISP1: CTC1 (CTC by look-up table) is used.)
54 * ISP2: CTC2 is used. 54 * ISP2: CTC2 is used.
55 */ 55 */
56struct ia_css_ctc_config { 56struct ia_css_ctc_config {
57 uint16_t y0; /**< 1st kneepoint gain. 57 uint16_t y0; /** 1st kneepoint gain.
58 u[ce_gain_exp].[13-ce_gain_exp], [0,8191], 58 u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
59 default/ineffective 4096(0.5) */ 59 default/ineffective 4096(0.5) */
60 uint16_t y1; /**< 2nd kneepoint gain. 60 uint16_t y1; /** 2nd kneepoint gain.
61 u[ce_gain_exp].[13-ce_gain_exp], [0,8191], 61 u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
62 default/ineffective 4096(0.5) */ 62 default/ineffective 4096(0.5) */
63 uint16_t y2; /**< 3rd kneepoint gain. 63 uint16_t y2; /** 3rd kneepoint gain.
64 u[ce_gain_exp].[13-ce_gain_exp], [0,8191], 64 u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
65 default/ineffective 4096(0.5) */ 65 default/ineffective 4096(0.5) */
66 uint16_t y3; /**< 4th kneepoint gain. 66 uint16_t y3; /** 4th kneepoint gain.
67 u[ce_gain_exp].[13-ce_gain_exp], [0,8191], 67 u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
68 default/ineffective 4096(0.5) */ 68 default/ineffective 4096(0.5) */
69 uint16_t y4; /**< 5th kneepoint gain. 69 uint16_t y4; /** 5th kneepoint gain.
70 u[ce_gain_exp].[13-ce_gain_exp], [0,8191], 70 u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
71 default/ineffective 4096(0.5) */ 71 default/ineffective 4096(0.5) */
72 uint16_t y5; /**< 6th kneepoint gain. 72 uint16_t y5; /** 6th kneepoint gain.
73 u[ce_gain_exp].[13-ce_gain_exp], [0,8191], 73 u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
74 default/ineffective 4096(0.5) */ 74 default/ineffective 4096(0.5) */
75 uint16_t ce_gain_exp; /**< Common exponent of y-axis gain. 75 uint16_t ce_gain_exp; /** Common exponent of y-axis gain.
76 u8.0, [0,13], 76 u8.0, [0,13],
77 default/ineffective 1 */ 77 default/ineffective 1 */
78 uint16_t x1; /**< 2nd kneepoint luma. 78 uint16_t x1; /** 2nd kneepoint luma.
79 u0.13, [0,8191], constraints: 0<x1<x2, 79 u0.13, [0,8191], constraints: 0<x1<x2,
80 default/ineffective 1024 */ 80 default/ineffective 1024 */
81 uint16_t x2; /**< 3rd kneepoint luma. 81 uint16_t x2; /** 3rd kneepoint luma.
82 u0.13, [0,8191], constraints: x1<x2<x3, 82 u0.13, [0,8191], constraints: x1<x2<x3,
83 default/ineffective 2048 */ 83 default/ineffective 2048 */
84 uint16_t x3; /**< 4th kneepoint luma. 84 uint16_t x3; /** 4th kneepoint luma.
85 u0.13, [0,8191], constraints: x2<x3<x4, 85 u0.13, [0,8191], constraints: x2<x3<x4,
86 default/ineffective 6144 */ 86 default/ineffective 6144 */
87 uint16_t x4; /**< 5tn kneepoint luma. 87 uint16_t x4; /** 5tn kneepoint luma.
88 u0.13, [0,8191], constraints: x3<x4<8191, 88 u0.13, [0,8191], constraints: x3<x4<8191,
89 default/ineffective 7168 */ 89 default/ineffective 7168 */
90}; 90};
@@ -94,7 +94,7 @@ union ia_css_ctc_data {
94 uint16_t vamem_2[IA_CSS_VAMEM_2_CTC_TABLE_SIZE]; 94 uint16_t vamem_2[IA_CSS_VAMEM_2_CTC_TABLE_SIZE];
95}; 95};
96 96
97/** CTC table, used for Chroma Tone Control. 97/* CTC table, used for Chroma Tone Control.
98 * 98 *
99 * ISP block: CTC1 (CTC by look-up table) 99 * ISP block: CTC1 (CTC by look-up table)
100 * ISP1: CTC1 is used. 100 * ISP1: CTC1 is used.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de_types.h
index 525c838d5a99..803be68abc54 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de_types.h
@@ -15,25 +15,25 @@
15#ifndef __IA_CSS_DE_TYPES_H 15#ifndef __IA_CSS_DE_TYPES_H
16#define __IA_CSS_DE_TYPES_H 16#define __IA_CSS_DE_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Demosaic (bayer-to-YCgCo) parameters. 19* CSS-API header file for Demosaic (bayer-to-YCgCo) parameters.
20*/ 20*/
21 21
22/** Demosaic (bayer-to-YCgCo) configuration. 22/* Demosaic (bayer-to-YCgCo) configuration.
23 * 23 *
24 * ISP block: DE1 24 * ISP block: DE1
25 * ISP1: DE1 is used. 25 * ISP1: DE1 is used.
26 * (ISP2: DE2 is used.) 26 * (ISP2: DE2 is used.)
27 */ 27 */
28struct ia_css_de_config { 28struct ia_css_de_config {
29 ia_css_u0_16 pixelnoise; /**< Pixel noise used in moire elimination. 29 ia_css_u0_16 pixelnoise; /** Pixel noise used in moire elimination.
30 u0.16, [0,65535], 30 u0.16, [0,65535],
31 default 0, ineffective 0 */ 31 default 0, ineffective 0 */
32 ia_css_u0_16 c1_coring_threshold; /**< Coring threshold for C1. 32 ia_css_u0_16 c1_coring_threshold; /** Coring threshold for C1.
33 This is the same as nr_config.threshold_cb. 33 This is the same as nr_config.threshold_cb.
34 u0.16, [0,65535], 34 u0.16, [0,65535],
35 default 128(0.001953125), ineffective 0 */ 35 default 128(0.001953125), ineffective 0 */
36 ia_css_u0_16 c2_coring_threshold; /**< Coring threshold for C2. 36 ia_css_u0_16 c2_coring_threshold; /** Coring threshold for C2.
37 This is the same as nr_config.threshold_cr. 37 This is the same as nr_config.threshold_cr.
38 u0.16, [0,65535], 38 u0.16, [0,65535],
39 default 128(0.001953125), ineffective 0 */ 39 default 128(0.001953125), ineffective 0 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2_types.h
index eac1b2779857..50bdde419bb1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2_types.h
@@ -15,24 +15,24 @@
15#ifndef __IA_CSS_DE2_TYPES_H 15#ifndef __IA_CSS_DE2_TYPES_H
16#define __IA_CSS_DE2_TYPES_H 16#define __IA_CSS_DE2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Demosaicing parameters. 19* CSS-API header file for Demosaicing parameters.
20*/ 20*/
21 21
22/** Eigen Color Demosaicing configuration. 22/* Eigen Color Demosaicing configuration.
23 * 23 *
24 * ISP block: DE2 24 * ISP block: DE2
25 * (ISP1: DE1 is used.) 25 * (ISP1: DE1 is used.)
26 * ISP2: DE2 is used. 26 * ISP2: DE2 is used.
27 */ 27 */
28struct ia_css_ecd_config { 28struct ia_css_ecd_config {
29 uint16_t zip_strength; /**< Strength of zipper reduction. 29 uint16_t zip_strength; /** Strength of zipper reduction.
30 u0.13, [0,8191], 30 u0.13, [0,8191],
31 default 5489(0.67), ineffective 0 */ 31 default 5489(0.67), ineffective 0 */
32 uint16_t fc_strength; /**< Strength of false color reduction. 32 uint16_t fc_strength; /** Strength of false color reduction.
33 u0.13, [0,8191], 33 u0.13, [0,8191],
34 default 8191(almost 1.0), ineffective 0 */ 34 default 8191(almost 1.0), ineffective 0 */
35 uint16_t fc_debias; /**< Prevent color change 35 uint16_t fc_debias; /** Prevent color change
36 on noise or Gr/Gb imbalance. 36 on noise or Gr/Gb imbalance.
37 u0.13, [0,8191], 37 u0.13, [0,8191],
38 default 0, ineffective 0 */ 38 default 0, ineffective 0 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h
index b5d7b6b175b6..1bf6dcef7dc7 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.h
@@ -15,12 +15,12 @@
15#ifndef __IA_CSS_DP_TYPES_H 15#ifndef __IA_CSS_DP_TYPES_H
16#define __IA_CSS_DP_TYPES_H 16#define __IA_CSS_DP_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Defect Pixel Correction (DPC) parameters. 19* CSS-API header file for Defect Pixel Correction (DPC) parameters.
20*/ 20*/
21 21
22 22
23/** Defect Pixel Correction configuration. 23/* Defect Pixel Correction configuration.
24 * 24 *
25 * ISP block: DPC1 (DPC after WB) 25 * ISP block: DPC1 (DPC after WB)
26 * DPC2 (DPC before WB) 26 * DPC2 (DPC before WB)
@@ -28,14 +28,14 @@
28 * ISP2: DPC2 is used. 28 * ISP2: DPC2 is used.
29 */ 29 */
30struct ia_css_dp_config { 30struct ia_css_dp_config {
31 ia_css_u0_16 threshold; /**< The threshold of defect pixel correction, 31 ia_css_u0_16 threshold; /** The threshold of defect pixel correction,
32 representing the permissible difference of 32 representing the permissible difference of
33 intensity between one pixel and its 33 intensity between one pixel and its
34 surrounding pixels. Smaller values result 34 surrounding pixels. Smaller values result
35 in more frequent pixel corrections. 35 in more frequent pixel corrections.
36 u0.16, [0,65535], 36 u0.16, [0,65535],
37 default 8192, ineffective 65535 */ 37 default 8192, ineffective 65535 */
38 ia_css_u8_8 gain; /**< The sensitivity of mis-correction. ISP will 38 ia_css_u8_8 gain; /** The sensitivity of mis-correction. ISP will
39 miss a lot of defects if the value is set 39 miss a lot of defects if the value is set
40 too large. 40 too large.
41 u8.8, [0,65535], 41 u8.8, [0,65535],
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h
index b2c974196ce8..6727682d287f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.h
@@ -15,14 +15,14 @@
15#ifndef __IA_CSS_DPC2_TYPES_H 15#ifndef __IA_CSS_DPC2_TYPES_H
16#define __IA_CSS_DPC2_TYPES_H 16#define __IA_CSS_DPC2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Defect Pixel Correction 2 (DPC2) parameters. 19* CSS-API header file for Defect Pixel Correction 2 (DPC2) parameters.
20*/ 20*/
21 21
22#include "type_support.h" 22#include "type_support.h"
23 23
24/**@{*/ 24/**@{*/
25/** Floating point constants for different metrics. */ 25/* Floating point constants for different metrics. */
26#define METRIC1_ONE_FP (1<<12) 26#define METRIC1_ONE_FP (1<<12)
27#define METRIC2_ONE_FP (1<<5) 27#define METRIC2_ONE_FP (1<<5)
28#define METRIC3_ONE_FP (1<<12) 28#define METRIC3_ONE_FP (1<<12)
@@ -30,7 +30,7 @@
30/**@}*/ 30/**@}*/
31 31
32/**@{*/ 32/**@{*/
33/** Defect Pixel Correction 2 configuration. 33/* Defect Pixel Correction 2 configuration.
34 * 34 *
35 * \brief DPC2 public parameters. 35 * \brief DPC2 public parameters.
36 * \details Struct with all parameters for the Defect Pixel Correction 2 36 * \details Struct with all parameters for the Defect Pixel Correction 2
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h
index 4d0abfe4d0fd..66a7e58659c0 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h
@@ -30,7 +30,7 @@
30#ifdef ISP2401 30#ifdef ISP2401
31 31
32#endif 32#endif
33/** dvserence frame */ 33/* dvserence frame */
34struct sh_css_isp_dvs_isp_config { 34struct sh_css_isp_dvs_isp_config {
35 uint32_t num_horizontal_blocks; 35 uint32_t num_horizontal_blocks;
36 uint32_t num_vertical_blocks; 36 uint32_t num_vertical_blocks;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h
index 216c54a21ea5..30772d217fb2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_DVS_TYPES_H 15#ifndef __IA_CSS_DVS_TYPES_H
16#define __IA_CSS_DVS_TYPES_H 16#define __IA_CSS_DVS_TYPES_H
17 17
18/** DVS frame 18/* DVS frame
19 * 19 *
20 * ISP block: dvs frame 20 * ISP block: dvs frame
21 */ 21 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8_types.h
index 07651f0ac558..32e91824a5e5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_EED1_8_TYPES_H 15#ifndef __IA_CSS_EED1_8_TYPES_H
16#define __IA_CSS_EED1_8_TYPES_H 16#define __IA_CSS_EED1_8_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Edge Enhanced Demosaic parameters. 19* CSS-API header file for Edge Enhanced Demosaic parameters.
20*/ 20*/
21 21
@@ -36,51 +36,51 @@
36 */ 36 */
37#define IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS 9 37#define IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS 9
38 38
39/** Edge Enhanced Demosaic configuration 39/* Edge Enhanced Demosaic configuration
40 * 40 *
41 * ISP2.6.1: EED1_8 is used. 41 * ISP2.6.1: EED1_8 is used.
42 */ 42 */
43 43
44struct ia_css_eed1_8_config { 44struct ia_css_eed1_8_config {
45 int32_t rbzp_strength; /**< Strength of zipper reduction. */ 45 int32_t rbzp_strength; /** Strength of zipper reduction. */
46 46
47 int32_t fcstrength; /**< Strength of false color reduction. */ 47 int32_t fcstrength; /** Strength of false color reduction. */
48 int32_t fcthres_0; /**< Threshold to prevent chroma coring due to noise or green disparity in dark region. */ 48 int32_t fcthres_0; /** Threshold to prevent chroma coring due to noise or green disparity in dark region. */
49 int32_t fcthres_1; /**< Threshold to prevent chroma coring due to noise or green disparity in bright region. */ 49 int32_t fcthres_1; /** Threshold to prevent chroma coring due to noise or green disparity in bright region. */
50 int32_t fc_sat_coef; /**< How much color saturation to maintain in high color saturation region. */ 50 int32_t fc_sat_coef; /** How much color saturation to maintain in high color saturation region. */
51 int32_t fc_coring_prm; /**< Chroma coring coefficient for tint color suppression. */ 51 int32_t fc_coring_prm; /** Chroma coring coefficient for tint color suppression. */
52 52
53 int32_t aerel_thres0; /**< Threshold for Non-Directional Reliability at dark region. */ 53 int32_t aerel_thres0; /** Threshold for Non-Directional Reliability at dark region. */
54 int32_t aerel_gain0; /**< Gain for Non-Directional Reliability at dark region. */ 54 int32_t aerel_gain0; /** Gain for Non-Directional Reliability at dark region. */
55 int32_t aerel_thres1; /**< Threshold for Non-Directional Reliability at bright region. */ 55 int32_t aerel_thres1; /** Threshold for Non-Directional Reliability at bright region. */
56 int32_t aerel_gain1; /**< Gain for Non-Directional Reliability at bright region. */ 56 int32_t aerel_gain1; /** Gain for Non-Directional Reliability at bright region. */
57 57
58 int32_t derel_thres0; /**< Threshold for Directional Reliability at dark region. */ 58 int32_t derel_thres0; /** Threshold for Directional Reliability at dark region. */
59 int32_t derel_gain0; /**< Gain for Directional Reliability at dark region. */ 59 int32_t derel_gain0; /** Gain for Directional Reliability at dark region. */
60 int32_t derel_thres1; /**< Threshold for Directional Reliability at bright region. */ 60 int32_t derel_thres1; /** Threshold for Directional Reliability at bright region. */
61 int32_t derel_gain1; /**< Gain for Directional Reliability at bright region. */ 61 int32_t derel_gain1; /** Gain for Directional Reliability at bright region. */
62 62
63 int32_t coring_pos0; /**< Positive Edge Coring Threshold in dark region. */ 63 int32_t coring_pos0; /** Positive Edge Coring Threshold in dark region. */
64 int32_t coring_pos1; /**< Positive Edge Coring Threshold in bright region. */ 64 int32_t coring_pos1; /** Positive Edge Coring Threshold in bright region. */
65 int32_t coring_neg0; /**< Negative Edge Coring Threshold in dark region. */ 65 int32_t coring_neg0; /** Negative Edge Coring Threshold in dark region. */
66 int32_t coring_neg1; /**< Negative Edge Coring Threshold in bright region. */ 66 int32_t coring_neg1; /** Negative Edge Coring Threshold in bright region. */
67 67
68 int32_t gain_exp; /**< Common Exponent of Gain. */ 68 int32_t gain_exp; /** Common Exponent of Gain. */
69 int32_t gain_pos0; /**< Gain for Positive Edge in dark region. */ 69 int32_t gain_pos0; /** Gain for Positive Edge in dark region. */
70 int32_t gain_pos1; /**< Gain for Positive Edge in bright region. */ 70 int32_t gain_pos1; /** Gain for Positive Edge in bright region. */
71 int32_t gain_neg0; /**< Gain for Negative Edge in dark region. */ 71 int32_t gain_neg0; /** Gain for Negative Edge in dark region. */
72 int32_t gain_neg1; /**< Gain for Negative Edge in bright region. */ 72 int32_t gain_neg1; /** Gain for Negative Edge in bright region. */
73 73
74 int32_t pos_margin0; /**< Margin for Positive Edge in dark region. */ 74 int32_t pos_margin0; /** Margin for Positive Edge in dark region. */
75 int32_t pos_margin1; /**< Margin for Positive Edge in bright region. */ 75 int32_t pos_margin1; /** Margin for Positive Edge in bright region. */
76 int32_t neg_margin0; /**< Margin for Negative Edge in dark region. */ 76 int32_t neg_margin0; /** Margin for Negative Edge in dark region. */
77 int32_t neg_margin1; /**< Margin for Negative Edge in bright region. */ 77 int32_t neg_margin1; /** Margin for Negative Edge in bright region. */
78 78
79 int32_t dew_enhance_seg_x[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /**< Segment data for directional edge weight: X. */ 79 int32_t dew_enhance_seg_x[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /** Segment data for directional edge weight: X. */
80 int32_t dew_enhance_seg_y[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /**< Segment data for directional edge weight: Y. */ 80 int32_t dew_enhance_seg_y[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /** Segment data for directional edge weight: Y. */
81 int32_t dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /**< Segment data for directional edge weight: Slope. */ 81 int32_t dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /** Segment data for directional edge weight: Slope. */
82 int32_t dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /**< Segment data for directional edge weight: Exponent. */ 82 int32_t dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /** Segment data for directional edge weight: Exponent. */
83 int32_t dedgew_max; /**< Max Weight for Directional Edge. */ 83 int32_t dedgew_max; /** Max Weight for Directional Edge. */
84}; 84};
85 85
86#endif /* __IA_CSS_EED1_8_TYPES_H */ 86#endif /* __IA_CSS_EED1_8_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats_types.h
index df1565a5914c..49479572b40d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats_types.h
@@ -15,20 +15,20 @@
15#ifndef __IA_CSS_FORMATS_TYPES_H 15#ifndef __IA_CSS_FORMATS_TYPES_H
16#define __IA_CSS_FORMATS_TYPES_H 16#define __IA_CSS_FORMATS_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for output format parameters. 19* CSS-API header file for output format parameters.
20*/ 20*/
21 21
22#include "type_support.h" 22#include "type_support.h"
23 23
24/** Formats configuration. 24/* Formats configuration.
25 * 25 *
26 * ISP block: FORMATS 26 * ISP block: FORMATS
27 * ISP1: FORMATS is used. 27 * ISP1: FORMATS is used.
28 * ISP2: FORMATS is used. 28 * ISP2: FORMATS is used.
29 */ 29 */
30struct ia_css_formats_config { 30struct ia_css_formats_config {
31 uint32_t video_full_range_flag; /**< selects the range of YUV output. 31 uint32_t video_full_range_flag; /** selects the range of YUV output.
32 u8.0, [0,1], 32 u8.0, [0,1],
33 default 1, ineffective n/a\n 33 default 1, ineffective n/a\n
34 1 - full range, luma 0-255, chroma 0-255\n 34 1 - full range, luma 0-255, chroma 0-255\n
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h
index 5a2f0c06a80d..ef287fa3c428 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_FPN_TYPES_H 15#ifndef __IA_CSS_FPN_TYPES_H
16#define __IA_CSS_FPN_TYPES_H 16#define __IA_CSS_FPN_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Fixed Pattern Noise parameters. 19* CSS-API header file for Fixed Pattern Noise parameters.
20*/ 20*/
21 21
22/** Fixed Pattern Noise table. 22/* Fixed Pattern Noise table.
23 * 23 *
24 * This contains the fixed patterns noise values 24 * This contains the fixed patterns noise values
25 * obtained from a black frame capture. 25 * obtained from a black frame capture.
@@ -33,15 +33,15 @@
33 */ 33 */
34 34
35struct ia_css_fpn_table { 35struct ia_css_fpn_table {
36 int16_t *data; /**< Table content (fixed patterns noise). 36 int16_t *data; /** Table content (fixed patterns noise).
37 u0.[13-shift], [0,63] */ 37 u0.[13-shift], [0,63] */
38 uint32_t width; /**< Table width (in pixels). 38 uint32_t width; /** Table width (in pixels).
39 This is the input frame width. */ 39 This is the input frame width. */
40 uint32_t height; /**< Table height (in pixels). 40 uint32_t height; /** Table height (in pixels).
41 This is the input frame height. */ 41 This is the input frame height. */
42 uint32_t shift; /**< Common exponent of table content. 42 uint32_t shift; /** Common exponent of table content.
43 u8.0, [0,13] */ 43 u8.0, [0,13] */
44 uint32_t enabled; /**< Fpn is enabled. 44 uint32_t enabled; /** Fpn is enabled.
45 bool */ 45 bool */
46}; 46};
47 47
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc_types.h
index dd9f0eda3353..594807fe2925 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc_types.h
@@ -15,36 +15,36 @@
15#ifndef __IA_CSS_GC_TYPES_H 15#ifndef __IA_CSS_GC_TYPES_H
16#define __IA_CSS_GC_TYPES_H 16#define __IA_CSS_GC_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Gamma Correction parameters. 19* CSS-API header file for Gamma Correction parameters.
20*/ 20*/
21 21
22#include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h" /* FIXME: Needed for ia_css_vamem_type */ 22#include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h" /* FIXME: Needed for ia_css_vamem_type */
23 23
24/** Fractional bits for GAMMA gain */ 24/* Fractional bits for GAMMA gain */
25#define IA_CSS_GAMMA_GAIN_K_SHIFT 13 25#define IA_CSS_GAMMA_GAIN_K_SHIFT 13
26 26
27/** Number of elements in the gamma table. */ 27/* Number of elements in the gamma table. */
28#define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2 10 28#define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2 10
29#define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2) 29#define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2)
30 30
31/** Number of elements in the gamma table. */ 31/* Number of elements in the gamma table. */
32#define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2 8 32#define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2 8
33#define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2) + 1) 33#define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2) + 1)
34 34
35/** Gamma table, used for Y(Luma) Gamma Correction. 35/* Gamma table, used for Y(Luma) Gamma Correction.
36 * 36 *
37 * ISP block: GC1 (YUV Gamma Correction) 37 * ISP block: GC1 (YUV Gamma Correction)
38 * ISP1: GC1 is used. 38 * ISP1: GC1 is used.
39 * (ISP2: GC2(sRGB Gamma Correction) is used.) 39 * (ISP2: GC2(sRGB Gamma Correction) is used.)
40 */ 40 */
41/**< IA_CSS_VAMEM_TYPE_1(ISP2300) or 41/** IA_CSS_VAMEM_TYPE_1(ISP2300) or
42 IA_CSS_VAMEM_TYPE_2(ISP2400) */ 42 IA_CSS_VAMEM_TYPE_2(ISP2400) */
43union ia_css_gc_data { 43union ia_css_gc_data {
44 uint16_t vamem_1[IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE]; 44 uint16_t vamem_1[IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE];
45 /**< Y(Luma) Gamma table on vamem type 1. u0.8, [0,255] */ 45 /** Y(Luma) Gamma table on vamem type 1. u0.8, [0,255] */
46 uint16_t vamem_2[IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE]; 46 uint16_t vamem_2[IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE];
47 /**< Y(Luma) Gamma table on vamem type 2. u0.8, [0,255] */ 47 /** Y(Luma) Gamma table on vamem type 2. u0.8, [0,255] */
48}; 48};
49 49
50struct ia_css_gamma_table { 50struct ia_css_gamma_table {
@@ -52,22 +52,22 @@ struct ia_css_gamma_table {
52 union ia_css_gc_data data; 52 union ia_css_gc_data data;
53}; 53};
54 54
55/** Gamma Correction configuration (used only for YUV Gamma Correction). 55/* Gamma Correction configuration (used only for YUV Gamma Correction).
56 * 56 *
57 * ISP block: GC1 (YUV Gamma Correction) 57 * ISP block: GC1 (YUV Gamma Correction)
58 * ISP1: GC1 is used. 58 * ISP1: GC1 is used.
59 * (ISP2: GC2 (sRGB Gamma Correction) is used.) 59 * (ISP2: GC2 (sRGB Gamma Correction) is used.)
60 */ 60 */
61struct ia_css_gc_config { 61struct ia_css_gc_config {
62 uint16_t gain_k1; /**< Gain to adjust U after YUV Gamma Correction. 62 uint16_t gain_k1; /** Gain to adjust U after YUV Gamma Correction.
63 u0.16, [0,65535], 63 u0.16, [0,65535],
64 default/ineffective 19000(0.29) */ 64 default/ineffective 19000(0.29) */
65 uint16_t gain_k2; /**< Gain to adjust V after YUV Gamma Correction. 65 uint16_t gain_k2; /** Gain to adjust V after YUV Gamma Correction.
66 u0.16, [0,65535], 66 u0.16, [0,65535],
67 default/ineffective 19000(0.29) */ 67 default/ineffective 19000(0.29) */
68}; 68};
69 69
70/** Chroma Enhancement configuration. 70/* Chroma Enhancement configuration.
71 * 71 *
72 * This parameter specifies range of chroma output level. 72 * This parameter specifies range of chroma output level.
73 * The standard range is [0,255] or [16,240]. 73 * The standard range is [0,255] or [16,240].
@@ -77,20 +77,20 @@ struct ia_css_gc_config {
77 * (ISP2: CE1 is not used.) 77 * (ISP2: CE1 is not used.)
78 */ 78 */
79struct ia_css_ce_config { 79struct ia_css_ce_config {
80 uint8_t uv_level_min; /**< Minimum of chroma output level. 80 uint8_t uv_level_min; /** Minimum of chroma output level.
81 u0.8, [0,255], default/ineffective 0 */ 81 u0.8, [0,255], default/ineffective 0 */
82 uint8_t uv_level_max; /**< Maximum of chroma output level. 82 uint8_t uv_level_max; /** Maximum of chroma output level.
83 u0.8, [0,255], default/ineffective 255 */ 83 u0.8, [0,255], default/ineffective 255 */
84}; 84};
85 85
86/** Multi-Axes Color Correction (MACC) configuration. 86/* Multi-Axes Color Correction (MACC) configuration.
87 * 87 *
88 * ISP block: MACC2 (MACC by matrix and exponent(ia_css_macc_config)) 88 * ISP block: MACC2 (MACC by matrix and exponent(ia_css_macc_config))
89 * (ISP1: MACC1 (MACC by only matrix) is used.) 89 * (ISP1: MACC1 (MACC by only matrix) is used.)
90 * ISP2: MACC2 is used. 90 * ISP2: MACC2 is used.
91 */ 91 */
92struct ia_css_macc_config { 92struct ia_css_macc_config {
93 uint8_t exp; /**< Common exponent of ia_css_macc_table. 93 uint8_t exp; /** Common exponent of ia_css_macc_table.
94 u8.0, [0,13], default 1, ineffective 1 */ 94 u8.0, [0,13], default 1, ineffective 1 */
95}; 95};
96 96
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h
index e439583bdfb6..fab7467d30a5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h
@@ -17,33 +17,33 @@
17 17
18#include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h" /* FIXME: needed for ia_css_vamem_type */ 18#include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h" /* FIXME: needed for ia_css_vamem_type */
19 19
20/** @file 20/* @file
21* CSS-API header file for Gamma Correction parameters. 21* CSS-API header file for Gamma Correction parameters.
22*/ 22*/
23 23
24/** sRGB Gamma table, used for sRGB Gamma Correction. 24/* sRGB Gamma table, used for sRGB Gamma Correction.
25 * 25 *
26 * ISP block: GC2 (sRGB Gamma Correction) 26 * ISP block: GC2 (sRGB Gamma Correction)
27 * (ISP1: GC1(YUV Gamma Correction) is used.) 27 * (ISP1: GC1(YUV Gamma Correction) is used.)
28 * ISP2: GC2 is used. 28 * ISP2: GC2 is used.
29 */ 29 */
30 30
31/** Number of elements in the sRGB gamma table. */ 31/* Number of elements in the sRGB gamma table. */
32#define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2 8 32#define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2 8
33#define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2) 33#define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2)
34 34
35/** Number of elements in the sRGB gamma table. */ 35/* Number of elements in the sRGB gamma table. */
36#define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2 8 36#define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2 8
37#define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2) + 1) 37#define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2) + 1)
38 38
39/**< IA_CSS_VAMEM_TYPE_1(ISP2300) or 39/** IA_CSS_VAMEM_TYPE_1(ISP2300) or
40 IA_CSS_VAMEM_TYPE_2(ISP2400) */ 40 IA_CSS_VAMEM_TYPE_2(ISP2400) */
41union ia_css_rgb_gamma_data { 41union ia_css_rgb_gamma_data {
42 uint16_t vamem_1[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE]; 42 uint16_t vamem_1[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE];
43 /**< RGB Gamma table on vamem type1. This table is not used, 43 /** RGB Gamma table on vamem type1. This table is not used,
44 because sRGB Gamma Correction is not implemented for ISP2300. */ 44 because sRGB Gamma Correction is not implemented for ISP2300. */
45 uint16_t vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE]; 45 uint16_t vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE];
46 /**< RGB Gamma table on vamem type2. u0.12, [0,4095] */ 46 /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
47}; 47};
48 48
49struct ia_css_rgb_gamma_table { 49struct ia_css_rgb_gamma_table {
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_types.h
index c3345b32e3e6..26464421b077 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_types.h
@@ -24,14 +24,14 @@
24 * \detail Currently HDR paramters are used only for testing purposes 24 * \detail Currently HDR paramters are used only for testing purposes
25 */ 25 */
26struct ia_css_hdr_irradiance_params { 26struct ia_css_hdr_irradiance_params {
27 int test_irr; /**< Test parameter */ 27 int test_irr; /** Test parameter */
28 int match_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /**< Histogram matching shift parameter */ 28 int match_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Histogram matching shift parameter */
29 int match_mul[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /**< Histogram matching multiplication parameter */ 29 int match_mul[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Histogram matching multiplication parameter */
30 int thr_low[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /**< Weight map soft threshold low bound parameter */ 30 int thr_low[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Weight map soft threshold low bound parameter */
31 int thr_high[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /**< Weight map soft threshold high bound parameter */ 31 int thr_high[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Weight map soft threshold high bound parameter */
32 int thr_coeff[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /**< Soft threshold linear function coefficien */ 32 int thr_coeff[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Soft threshold linear function coefficien */
33 int thr_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /**< Soft threshold precision shift parameter */ 33 int thr_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Soft threshold precision shift parameter */
34 int weight_bpp; /**< Weight map bits per pixel */ 34 int weight_bpp; /** Weight map bits per pixel */
35}; 35};
36 36
37/** 37/**
@@ -39,7 +39,7 @@ struct ia_css_hdr_irradiance_params {
39 * \detail Currently HDR paramters are used only for testing purposes 39 * \detail Currently HDR paramters are used only for testing purposes
40 */ 40 */
41struct ia_css_hdr_deghost_params { 41struct ia_css_hdr_deghost_params {
42 int test_deg; /**< Test parameter */ 42 int test_deg; /** Test parameter */
43}; 43};
44 44
45/** 45/**
@@ -47,7 +47,7 @@ struct ia_css_hdr_deghost_params {
47 * \detail Currently HDR paramters are used only for testing purposes 47 * \detail Currently HDR paramters are used only for testing purposes
48 */ 48 */
49struct ia_css_hdr_exclusion_params { 49struct ia_css_hdr_exclusion_params {
50 int test_excl; /**< Test parameter */ 50 int test_excl; /** Test parameter */
51}; 51};
52 52
53/** 53/**
@@ -56,9 +56,9 @@ struct ia_css_hdr_exclusion_params {
56 * the CSS API. Currenly, only test paramters are defined. 56 * the CSS API. Currenly, only test paramters are defined.
57 */ 57 */
58struct ia_css_hdr_config { 58struct ia_css_hdr_config {
59 struct ia_css_hdr_irradiance_params irradiance; /**< HDR irradiance paramaters */ 59 struct ia_css_hdr_irradiance_params irradiance; /** HDR irradiance paramaters */
60 struct ia_css_hdr_deghost_params deghost; /**< HDR deghosting parameters */ 60 struct ia_css_hdr_deghost_params deghost; /** HDR deghosting parameters */
61 struct ia_css_hdr_exclusion_params exclusion; /**< HDR exclusion parameters */ 61 struct ia_css_hdr_exclusion_params exclusion; /** HDR exclusion parameters */
62}; 62};
63 63
64#endif /* __IA_CSS_HDR_TYPES_H */ 64#endif /* __IA_CSS_HDR_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c
index 78e159c04851..f80480cf9de2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c
@@ -1,5 +1,5 @@
1#ifdef ISP2401 1#ifdef ISP2401
2/** 2/*
3Support for Intel Camera Imaging ISP subsystem. 3Support for Intel Camera Imaging ISP subsystem.
4Copyright (c) 2010 - 2015, Intel Corporation. 4Copyright (c) 2010 - 2015, Intel Corporation.
5 5
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c
index f7e1a632c47e..eb9e9439cc21 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c
@@ -1,5 +1,5 @@
1#ifdef ISP2401 1#ifdef ISP2401
2/** 2/*
3Support for Intel Camera Imaging ISP subsystem. 3Support for Intel Camera Imaging ISP subsystem.
4Copyright (c) 2010 - 2015, Intel Corporation. 4Copyright (c) 2010 - 2015, Intel Corporation.
5 5
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h
index 3d510bf5886a..9cd31c2c0253 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h
@@ -15,22 +15,22 @@
15#ifndef __IA_CSS_MACC1_5_TYPES_H 15#ifndef __IA_CSS_MACC1_5_TYPES_H
16#define __IA_CSS_MACC1_5_TYPES_H 16#define __IA_CSS_MACC1_5_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Multi-Axis Color Conversion algorithm parameters. 19* CSS-API header file for Multi-Axis Color Conversion algorithm parameters.
20*/ 20*/
21 21
22/** Multi-Axis Color Conversion configuration 22/* Multi-Axis Color Conversion configuration
23 * 23 *
24 * ISP2.6.1: MACC1_5 is used. 24 * ISP2.6.1: MACC1_5 is used.
25 */ 25 */
26 26
27 27
28/** Number of axes in the MACC table. */ 28/* Number of axes in the MACC table. */
29#define IA_CSS_MACC_NUM_AXES 16 29#define IA_CSS_MACC_NUM_AXES 16
30/** Number of coefficients per MACC axes. */ 30/* Number of coefficients per MACC axes. */
31#define IA_CSS_MACC_NUM_COEFS 4 31#define IA_CSS_MACC_NUM_COEFS 4
32 32
33/** Multi-Axes Color Correction (MACC) table. 33/* Multi-Axes Color Correction (MACC) table.
34 * 34 *
35 * ISP block: MACC (MACC by only matrix) 35 * ISP block: MACC (MACC by only matrix)
36 * MACC1_5 (MACC by matrix and exponent(ia_css_macc_config)) 36 * MACC1_5 (MACC by matrix and exponent(ia_css_macc_config))
@@ -55,19 +55,19 @@
55 */ 55 */
56struct ia_css_macc1_5_table { 56struct ia_css_macc1_5_table {
57 int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES]; 57 int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
58 /**< 16 of 2x2 matix 58 /** 16 of 2x2 matix
59 MACC1_5: s[macc_config.exp].[13-macc_config.exp], [-8192,8191] 59 MACC1_5: s[macc_config.exp].[13-macc_config.exp], [-8192,8191]
60 default/ineffective: (s1.12) 60 default/ineffective: (s1.12)
61 16 of "identity 2x2 matix" {4096,0,0,4096} */ 61 16 of "identity 2x2 matix" {4096,0,0,4096} */
62}; 62};
63 63
64/** Multi-Axes Color Correction (MACC) configuration. 64/* Multi-Axes Color Correction (MACC) configuration.
65 * 65 *
66 * ISP block: MACC1_5 (MACC by matrix and exponent(ia_css_macc_config)) 66 * ISP block: MACC1_5 (MACC by matrix and exponent(ia_css_macc_config))
67 * ISP2: MACC1_5 is used. 67 * ISP2: MACC1_5 is used.
68 */ 68 */
69struct ia_css_macc1_5_config { 69struct ia_css_macc1_5_config {
70 uint8_t exp; /**< Common exponent of ia_css_macc_table. 70 uint8_t exp; /** Common exponent of ia_css_macc_table.
71 u8.0, [0,13], default 1, ineffective 1 */ 71 u8.0, [0,13], default 1, ineffective 1 */
72}; 72};
73 73
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_types.h
index a25581c6f3ac..2c9e5a8ceb98 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_types.h
@@ -15,17 +15,17 @@
15#ifndef __IA_CSS_MACC_TYPES_H 15#ifndef __IA_CSS_MACC_TYPES_H
16#define __IA_CSS_MACC_TYPES_H 16#define __IA_CSS_MACC_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Multi-Axis Color Correction (MACC) parameters. 19* CSS-API header file for Multi-Axis Color Correction (MACC) parameters.
20*/ 20*/
21 21
22/** Number of axes in the MACC table. */ 22/* Number of axes in the MACC table. */
23#define IA_CSS_MACC_NUM_AXES 16 23#define IA_CSS_MACC_NUM_AXES 16
24/** Number of coefficients per MACC axes. */ 24/* Number of coefficients per MACC axes. */
25#define IA_CSS_MACC_NUM_COEFS 4 25#define IA_CSS_MACC_NUM_COEFS 4
26/** The number of planes in the morphing table. */ 26/* The number of planes in the morphing table. */
27 27
28/** Multi-Axis Color Correction (MACC) table. 28/* Multi-Axis Color Correction (MACC) table.
29 * 29 *
30 * ISP block: MACC1 (MACC by only matrix) 30 * ISP block: MACC1 (MACC by only matrix)
31 * MACC2 (MACC by matrix and exponent(ia_css_macc_config)) 31 * MACC2 (MACC by matrix and exponent(ia_css_macc_config))
@@ -51,7 +51,7 @@
51 51
52struct ia_css_macc_table { 52struct ia_css_macc_table {
53 int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES]; 53 int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
54 /**< 16 of 2x2 matix 54 /** 16 of 2x2 matix
55 MACC1: s2.13, [-65536,65535] 55 MACC1: s2.13, [-65536,65535]
56 default/ineffective: 56 default/ineffective:
57 16 of "identity 2x2 matix" {8192,0,0,8192} 57 16 of "identity 2x2 matix" {8192,0,0,8192}
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h
index eeaadfeb5a1e..d981394c1c11 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_OB2_TYPES_H 15#ifndef __IA_CSS_OB2_TYPES_H
16#define __IA_CSS_OB2_TYPES_H 16#define __IA_CSS_OB2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Optical Black algorithm parameters. 19* CSS-API header file for Optical Black algorithm parameters.
20*/ 20*/
21 21
22/** Optical Black configuration 22/* Optical Black configuration
23 * 23 *
24 * ISP2.6.1: OB2 is used. 24 * ISP2.6.1: OB2 is used.
25 */ 25 */
@@ -27,16 +27,16 @@
27#include "ia_css_frac.h" 27#include "ia_css_frac.h"
28 28
29struct ia_css_ob2_config { 29struct ia_css_ob2_config {
30 ia_css_u0_16 level_gr; /**< Black level for GR pixels. 30 ia_css_u0_16 level_gr; /** Black level for GR pixels.
31 u0.16, [0,65535], 31 u0.16, [0,65535],
32 default/ineffective 0 */ 32 default/ineffective 0 */
33 ia_css_u0_16 level_r; /**< Black level for R pixels. 33 ia_css_u0_16 level_r; /** Black level for R pixels.
34 u0.16, [0,65535], 34 u0.16, [0,65535],
35 default/ineffective 0 */ 35 default/ineffective 0 */
36 ia_css_u0_16 level_b; /**< Black level for B pixels. 36 ia_css_u0_16 level_b; /** Black level for B pixels.
37 u0.16, [0,65535], 37 u0.16, [0,65535],
38 default/ineffective 0 */ 38 default/ineffective 0 */
39 ia_css_u0_16 level_gb; /**< Black level for GB pixels. 39 ia_css_u0_16 level_gb; /** Black level for GB pixels.
40 u0.16, [0,65535], 40 u0.16, [0,65535],
41 default/ineffective 0 */ 41 default/ineffective 0 */
42}; 42};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h
index 88459b6c003d..a9717b8f44ac 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.h
@@ -15,51 +15,51 @@
15#ifndef __IA_CSS_OB_TYPES_H 15#ifndef __IA_CSS_OB_TYPES_H
16#define __IA_CSS_OB_TYPES_H 16#define __IA_CSS_OB_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Optical Black level parameters. 19* CSS-API header file for Optical Black level parameters.
20*/ 20*/
21 21
22#include "ia_css_frac.h" 22#include "ia_css_frac.h"
23 23
24/** Optical black mode. 24/* Optical black mode.
25 */ 25 */
26enum ia_css_ob_mode { 26enum ia_css_ob_mode {
27 IA_CSS_OB_MODE_NONE, /**< OB has no effect. */ 27 IA_CSS_OB_MODE_NONE, /** OB has no effect. */
28 IA_CSS_OB_MODE_FIXED, /**< Fixed OB */ 28 IA_CSS_OB_MODE_FIXED, /** Fixed OB */
29 IA_CSS_OB_MODE_RASTER /**< Raster OB */ 29 IA_CSS_OB_MODE_RASTER /** Raster OB */
30}; 30};
31 31
32/** Optical Black level configuration. 32/* Optical Black level configuration.
33 * 33 *
34 * ISP block: OB1 34 * ISP block: OB1
35 * ISP1: OB1 is used. 35 * ISP1: OB1 is used.
36 * ISP2: OB1 is used. 36 * ISP2: OB1 is used.
37 */ 37 */
38struct ia_css_ob_config { 38struct ia_css_ob_config {
39 enum ia_css_ob_mode mode; /**< Mode (None / Fixed / Raster). 39 enum ia_css_ob_mode mode; /** Mode (None / Fixed / Raster).
40 enum, [0,2], 40 enum, [0,2],
41 default 1, ineffective 0 */ 41 default 1, ineffective 0 */
42 ia_css_u0_16 level_gr; /**< Black level for GR pixels 42 ia_css_u0_16 level_gr; /** Black level for GR pixels
43 (used for Fixed Mode only). 43 (used for Fixed Mode only).
44 u0.16, [0,65535], 44 u0.16, [0,65535],
45 default/ineffective 0 */ 45 default/ineffective 0 */
46 ia_css_u0_16 level_r; /**< Black level for R pixels 46 ia_css_u0_16 level_r; /** Black level for R pixels
47 (used for Fixed Mode only). 47 (used for Fixed Mode only).
48 u0.16, [0,65535], 48 u0.16, [0,65535],
49 default/ineffective 0 */ 49 default/ineffective 0 */
50 ia_css_u0_16 level_b; /**< Black level for B pixels 50 ia_css_u0_16 level_b; /** Black level for B pixels
51 (used for Fixed Mode only). 51 (used for Fixed Mode only).
52 u0.16, [0,65535], 52 u0.16, [0,65535],
53 default/ineffective 0 */ 53 default/ineffective 0 */
54 ia_css_u0_16 level_gb; /**< Black level for GB pixels 54 ia_css_u0_16 level_gb; /** Black level for GB pixels
55 (used for Fixed Mode only). 55 (used for Fixed Mode only).
56 u0.16, [0,65535], 56 u0.16, [0,65535],
57 default/ineffective 0 */ 57 default/ineffective 0 */
58 uint16_t start_position; /**< Start position of OB area 58 uint16_t start_position; /** Start position of OB area
59 (used for Raster Mode only). 59 (used for Raster Mode only).
60 u16.0, [0,63], 60 u16.0, [0,63],
61 default/ineffective 0 */ 61 default/ineffective 0 */
62 uint16_t end_position; /**< End position of OB area 62 uint16_t end_position; /** End position of OB area
63 (used for Raster Mode only). 63 (used for Raster Mode only).
64 u16.0, [0,63], 64 u16.0, [0,63],
65 default/ineffective 0 */ 65 default/ineffective 0 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_param.h
index 26ec27e085c1..eb7defa41145 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_param.h
@@ -19,7 +19,7 @@
19#include "dma.h" 19#include "dma.h"
20#include "ia_css_frame_comm.h" /* ia_css_frame_sp_info */ 20#include "ia_css_frame_comm.h" /* ia_css_frame_sp_info */
21 21
22/** output frame */ 22/* output frame */
23struct sh_css_isp_output_isp_config { 23struct sh_css_isp_output_isp_config {
24 uint32_t width_a_over_b; 24 uint32_t width_a_over_b;
25 uint32_t height; 25 uint32_t height;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_types.h
index 4335ac28b31d..9c7342fb8145 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_OUTPUT_TYPES_H 15#ifndef __IA_CSS_OUTPUT_TYPES_H
16#define __IA_CSS_OUTPUT_TYPES_H 16#define __IA_CSS_OUTPUT_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for parameters of output frames. 19* CSS-API header file for parameters of output frames.
20*/ 20*/
21 21
22/** Output frame 22/* Output frame
23 * 23 *
24 * ISP block: output frame 24 * ISP block: output frame
25 */ 25 */
@@ -40,8 +40,8 @@ struct ia_css_output1_configuration {
40}; 40};
41 41
42struct ia_css_output_config { 42struct ia_css_output_config {
43 uint8_t enable_hflip; /**< enable horizontal output mirroring */ 43 uint8_t enable_hflip; /** enable horizontal output mirroring */
44 uint8_t enable_vflip; /**< enable vertical output mirroring */ 44 uint8_t enable_vflip; /** enable vertical output mirroring */
45}; 45};
46 46
47#endif /* __IA_CSS_OUTPUT_TYPES_H */ 47#endif /* __IA_CSS_OUTPUT_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane_types.h
index 955fd472a241..62d371841619 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane_types.h
@@ -18,7 +18,7 @@
18#include <ia_css_frame_public.h> 18#include <ia_css_frame_public.h>
19#include "sh_css_internal.h" 19#include "sh_css_internal.h"
20 20
21/** qplane frame 21/* qplane frame
22 * 22 *
23 * ISP block: qplane frame 23 * ISP block: qplane frame
24 */ 24 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h
index 54f8c299d227..5c0b8febd79a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h
@@ -18,7 +18,7 @@
18#include <ia_css_frame_public.h> 18#include <ia_css_frame_public.h>
19#include "sh_css_internal.h" 19#include "sh_css_internal.h"
20 20
21/** Raw frame 21/* Raw frame
22 * 22 *
23 * ISP block: Raw frame 23 * ISP block: Raw frame
24 */ 24 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h
index 1f1b72a417d1..026443b999a6 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h
@@ -19,7 +19,7 @@
19#include "sh_css_defs.h" 19#include "sh_css_defs.h"
20#include "dma.h" 20#include "dma.h"
21 21
22/** Reference frame */ 22/* Reference frame */
23struct ia_css_ref_configuration { 23struct ia_css_ref_configuration {
24 const struct ia_css_frame *ref_frames[MAX_NUM_VIDEO_DELAY_FRAMES]; 24 const struct ia_css_frame *ref_frames[MAX_NUM_VIDEO_DELAY_FRAMES];
25 uint32_t dvs_frame_delay; 25 uint32_t dvs_frame_delay;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h
index ce0eaeeee9c6..4750fba268b9 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_REF_TYPES_H 15#ifndef __IA_CSS_REF_TYPES_H
16#define __IA_CSS_REF_TYPES_H 16#define __IA_CSS_REF_TYPES_H
17 17
18/** Reference frame 18/* Reference frame
19 * 19 *
20 * ISP block: reference frame 20 * ISP block: reference frame
21 */ 21 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h
index f57ed1ec5981..8d674d2c6427 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_S3A_TYPES_H 15#ifndef __IA_CSS_S3A_TYPES_H
16#define __IA_CSS_S3A_TYPES_H 16#define __IA_CSS_S3A_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for 3A statistics parameters. 19* CSS-API header file for 3A statistics parameters.
20*/ 20*/
21 21
@@ -25,11 +25,11 @@
25#include "../../../../components/stats_3a/src/stats_3a_public.h" 25#include "../../../../components/stats_3a/src/stats_3a_public.h"
26#endif 26#endif
27 27
28/** 3A configuration. This configures the 3A statistics collection 28/* 3A configuration. This configures the 3A statistics collection
29 * module. 29 * module.
30 */ 30 */
31 31
32/** 3A statistics grid 32/* 3A statistics grid
33 * 33 *
34 * ISP block: S3A1 (3A Support for 3A ver.1 (Histogram is not used for AE)) 34 * ISP block: S3A1 (3A Support for 3A ver.1 (Histogram is not used for AE))
35 * S3A2 (3A Support for 3A ver.2 (Histogram is used for AE)) 35 * S3A2 (3A Support for 3A ver.2 (Histogram is used for AE))
@@ -39,23 +39,23 @@
39struct ia_css_3a_grid_info { 39struct ia_css_3a_grid_info {
40 40
41#if defined(SYSTEM_css_skycam_c0_system) 41#if defined(SYSTEM_css_skycam_c0_system)
42 uint32_t ae_enable; /**< ae enabled in binary, 42 uint32_t ae_enable; /** ae enabled in binary,
43 0:disabled, 1:enabled */ 43 0:disabled, 1:enabled */
44 struct ae_public_config_grid_config ae_grd_info; /**< see description in ae_public.h*/ 44 struct ae_public_config_grid_config ae_grd_info; /** see description in ae_public.h*/
45 45
46 uint32_t awb_enable; /**< awb enabled in binary, 46 uint32_t awb_enable; /** awb enabled in binary,
47 0:disabled, 1:enabled */ 47 0:disabled, 1:enabled */
48 struct awb_public_config_grid_config awb_grd_info; /**< see description in awb_public.h*/ 48 struct awb_public_config_grid_config awb_grd_info; /** see description in awb_public.h*/
49 49
50 uint32_t af_enable; /**< af enabled in binary, 50 uint32_t af_enable; /** af enabled in binary,
51 0:disabled, 1:enabled */ 51 0:disabled, 1:enabled */
52 struct af_public_grid_config af_grd_info; /**< see description in af_public.h*/ 52 struct af_public_grid_config af_grd_info; /** see description in af_public.h*/
53 53
54 uint32_t awb_fr_enable; /**< awb_fr enabled in binary, 54 uint32_t awb_fr_enable; /** awb_fr enabled in binary,
55 0:disabled, 1:enabled */ 55 0:disabled, 1:enabled */
56 struct awb_fr_public_grid_config awb_fr_grd_info;/**< see description in awb_fr_public.h*/ 56 struct awb_fr_public_grid_config awb_fr_grd_info;/** see description in awb_fr_public.h*/
57 57
58 uint32_t elem_bit_depth; /**< TODO:Taken from BYT - need input from AIQ 58 uint32_t elem_bit_depth; /** TODO:Taken from BYT - need input from AIQ
59 if needed for SKC 59 if needed for SKC
60 Bit depth of element used 60 Bit depth of element used
61 to calculate 3A statistics. 61 to calculate 3A statistics.
@@ -63,34 +63,34 @@ struct ia_css_3a_grid_info {
63 bayer bit depth in DSP. */ 63 bayer bit depth in DSP. */
64 64
65#else 65#else
66 uint32_t enable; /**< 3A statistics enabled. 66 uint32_t enable; /** 3A statistics enabled.
67 0:disabled, 1:enabled */ 67 0:disabled, 1:enabled */
68 uint32_t use_dmem; /**< DMEM or VMEM determines layout. 68 uint32_t use_dmem; /** DMEM or VMEM determines layout.
69 0:3A statistics are stored to VMEM, 69 0:3A statistics are stored to VMEM,
70 1:3A statistics are stored to DMEM */ 70 1:3A statistics are stored to DMEM */
71 uint32_t has_histogram; /**< Statistics include histogram. 71 uint32_t has_histogram; /** Statistics include histogram.
72 0:no histogram, 1:has histogram */ 72 0:no histogram, 1:has histogram */
73 uint32_t width; /**< Width of 3A grid table. 73 uint32_t width; /** Width of 3A grid table.
74 (= Horizontal number of grid cells 74 (= Horizontal number of grid cells
75 in table, which cells have effective 75 in table, which cells have effective
76 statistics.) */ 76 statistics.) */
77 uint32_t height; /**< Height of 3A grid table. 77 uint32_t height; /** Height of 3A grid table.
78 (= Vertical number of grid cells 78 (= Vertical number of grid cells
79 in table, which cells have effective 79 in table, which cells have effective
80 statistics.) */ 80 statistics.) */
81 uint32_t aligned_width; /**< Horizontal stride (for alloc). 81 uint32_t aligned_width; /** Horizontal stride (for alloc).
82 (= Horizontal number of grid cells 82 (= Horizontal number of grid cells
83 in table, which means 83 in table, which means
84 the allocated width.) */ 84 the allocated width.) */
85 uint32_t aligned_height; /**< Vertical stride (for alloc). 85 uint32_t aligned_height; /** Vertical stride (for alloc).
86 (= Vertical number of grid cells 86 (= Vertical number of grid cells
87 in table, which means 87 in table, which means
88 the allocated height.) */ 88 the allocated height.) */
89 uint32_t bqs_per_grid_cell; /**< Grid cell size in BQ(Bayer Quad) unit. 89 uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit.
90 (1BQ means {Gr,R,B,Gb}(2x2 pixels).) 90 (1BQ means {Gr,R,B,Gb}(2x2 pixels).)
91 Valid values are 8,16,32,64. */ 91 Valid values are 8,16,32,64. */
92 uint32_t deci_factor_log2; /**< log2 of bqs_per_grid_cell. */ 92 uint32_t deci_factor_log2; /** log2 of bqs_per_grid_cell. */
93 uint32_t elem_bit_depth; /**< Bit depth of element used 93 uint32_t elem_bit_depth; /** Bit depth of element used
94 to calculate 3A statistics. 94 to calculate 3A statistics.
95 This is 13, which is the normalized 95 This is 13, which is the normalized
96 bayer bit depth in DSP. */ 96 bayer bit depth in DSP. */
@@ -148,7 +148,7 @@ struct ia_css_3a_grid_info {
148 * However, that will require driver/ 3A lib modifications. 148 * However, that will require driver/ 3A lib modifications.
149 */ 149 */
150 150
151/** 3A configuration. This configures the 3A statistics collection 151/* 3A configuration. This configures the 3A statistics collection
152 * module. 152 * module.
153 * 153 *
154 * ae_y_*: Coefficients to calculate luminance from bayer. 154 * ae_y_*: Coefficients to calculate luminance from bayer.
@@ -167,38 +167,38 @@ struct ia_css_3a_grid_info {
167 * ISP2: S3A2 and SDVS2 are used. 167 * ISP2: S3A2 and SDVS2 are used.
168 */ 168 */
169struct ia_css_3a_config { 169struct ia_css_3a_config {
170 ia_css_u0_16 ae_y_coef_r; /**< Weight of R for Y. 170 ia_css_u0_16 ae_y_coef_r; /** Weight of R for Y.
171 u0.16, [0,65535], 171 u0.16, [0,65535],
172 default/ineffective 25559 */ 172 default/ineffective 25559 */
173 ia_css_u0_16 ae_y_coef_g; /**< Weight of G for Y. 173 ia_css_u0_16 ae_y_coef_g; /** Weight of G for Y.
174 u0.16, [0,65535], 174 u0.16, [0,65535],
175 default/ineffective 32768 */ 175 default/ineffective 32768 */
176 ia_css_u0_16 ae_y_coef_b; /**< Weight of B for Y. 176 ia_css_u0_16 ae_y_coef_b; /** Weight of B for Y.
177 u0.16, [0,65535], 177 u0.16, [0,65535],
178 default/ineffective 7209 */ 178 default/ineffective 7209 */
179 ia_css_u0_16 awb_lg_high_raw; /**< AWB level gate high for raw. 179 ia_css_u0_16 awb_lg_high_raw; /** AWB level gate high for raw.
180 u0.16, [0,65535], 180 u0.16, [0,65535],
181 default 65472(=1023*64), 181 default 65472(=1023*64),
182 ineffective 65535 */ 182 ineffective 65535 */
183 ia_css_u0_16 awb_lg_low; /**< AWB level gate low. 183 ia_css_u0_16 awb_lg_low; /** AWB level gate low.
184 u0.16, [0,65535], 184 u0.16, [0,65535],
185 default 64(=1*64), 185 default 64(=1*64),
186 ineffective 0 */ 186 ineffective 0 */
187 ia_css_u0_16 awb_lg_high; /**< AWB level gate high. 187 ia_css_u0_16 awb_lg_high; /** AWB level gate high.
188 u0.16, [0,65535], 188 u0.16, [0,65535],
189 default 65535, 189 default 65535,
190 ineffective 65535 */ 190 ineffective 65535 */
191 ia_css_s0_15 af_fir1_coef[7]; /**< AF FIR coefficients of fir1. 191 ia_css_s0_15 af_fir1_coef[7]; /** AF FIR coefficients of fir1.
192 s0.15, [-32768,32767], 192 s0.15, [-32768,32767],
193 default/ineffective 193 default/ineffective
194 -6689,-12207,-32768,32767,12207,6689,0 */ 194 -6689,-12207,-32768,32767,12207,6689,0 */
195 ia_css_s0_15 af_fir2_coef[7]; /**< AF FIR coefficients of fir2. 195 ia_css_s0_15 af_fir2_coef[7]; /** AF FIR coefficients of fir2.
196 s0.15, [-32768,32767], 196 s0.15, [-32768,32767],
197 default/ineffective 197 default/ineffective
198 2053,0,-18437,32767,-18437,2053,0 */ 198 2053,0,-18437,32767,-18437,2053,0 */
199}; 199};
200 200
201/** 3A statistics. This structure describes the data stored 201/* 3A statistics. This structure describes the data stored
202 * in each 3A grid point. 202 * in each 3A grid point.
203 * 203 *
204 * ISP block: S3A1 (3A Support for 3A ver.1) (Histogram is not used for AE) 204 * ISP block: S3A1 (3A Support for 3A ver.1) (Histogram is not used for AE)
@@ -209,43 +209,43 @@ struct ia_css_3a_config {
209 * ISP2: S3A2 is used. 209 * ISP2: S3A2 is used.
210 */ 210 */
211struct ia_css_3a_output { 211struct ia_css_3a_output {
212 int32_t ae_y; /**< Sum of Y in a statistics window, for AE. 212 int32_t ae_y; /** Sum of Y in a statistics window, for AE.
213 (u19.13) */ 213 (u19.13) */
214 int32_t awb_cnt; /**< Number of effective pixels 214 int32_t awb_cnt; /** Number of effective pixels
215 in a statistics window. 215 in a statistics window.
216 Pixels passed by the AWB level gate check are 216 Pixels passed by the AWB level gate check are
217 judged as "effective". (u32) */ 217 judged as "effective". (u32) */
218 int32_t awb_gr; /**< Sum of Gr in a statistics window, for AWB. 218 int32_t awb_gr; /** Sum of Gr in a statistics window, for AWB.
219 All Gr pixels (not only for effective pixels) 219 All Gr pixels (not only for effective pixels)
220 are summed. (u19.13) */ 220 are summed. (u19.13) */
221 int32_t awb_r; /**< Sum of R in a statistics window, for AWB. 221 int32_t awb_r; /** Sum of R in a statistics window, for AWB.
222 All R pixels (not only for effective pixels) 222 All R pixels (not only for effective pixels)
223 are summed. (u19.13) */ 223 are summed. (u19.13) */
224 int32_t awb_b; /**< Sum of B in a statistics window, for AWB. 224 int32_t awb_b; /** Sum of B in a statistics window, for AWB.
225 All B pixels (not only for effective pixels) 225 All B pixels (not only for effective pixels)
226 are summed. (u19.13) */ 226 are summed. (u19.13) */
227 int32_t awb_gb; /**< Sum of Gb in a statistics window, for AWB. 227 int32_t awb_gb; /** Sum of Gb in a statistics window, for AWB.
228 All Gb pixels (not only for effective pixels) 228 All Gb pixels (not only for effective pixels)
229 are summed. (u19.13) */ 229 are summed. (u19.13) */
230 int32_t af_hpf1; /**< Sum of |Y| following high pass filter af_fir1 230 int32_t af_hpf1; /** Sum of |Y| following high pass filter af_fir1
231 within a statistics window, for AF. (u19.13) */ 231 within a statistics window, for AF. (u19.13) */
232 int32_t af_hpf2; /**< Sum of |Y| following high pass filter af_fir2 232 int32_t af_hpf2; /** Sum of |Y| following high pass filter af_fir2
233 within a statistics window, for AF. (u19.13) */ 233 within a statistics window, for AF. (u19.13) */
234}; 234};
235 235
236 236
237/** 3A Statistics. This structure describes the statistics that are generated 237/* 3A Statistics. This structure describes the statistics that are generated
238 * using the provided configuration (ia_css_3a_config). 238 * using the provided configuration (ia_css_3a_config).
239 */ 239 */
240struct ia_css_3a_statistics { 240struct ia_css_3a_statistics {
241 struct ia_css_3a_grid_info grid; /**< grid info contains the dimensions of the 3A grid */ 241 struct ia_css_3a_grid_info grid; /** grid info contains the dimensions of the 3A grid */
242 struct ia_css_3a_output *data; /**< the pointer to 3a_output[grid.width * grid.height] 242 struct ia_css_3a_output *data; /** the pointer to 3a_output[grid.width * grid.height]
243 containing the 3A statistics */ 243 containing the 3A statistics */
244 struct ia_css_3a_rgby_output *rgby_data;/**< the pointer to 3a_rgby_output[256] 244 struct ia_css_3a_rgby_output *rgby_data;/** the pointer to 3a_rgby_output[256]
245 containing the histogram */ 245 containing the histogram */
246}; 246};
247 247
248/** Histogram (Statistics for AE). 248/* Histogram (Statistics for AE).
249 * 249 *
250 * 4 histograms(r,g,b,y), 250 * 4 histograms(r,g,b,y),
251 * 256 bins for each histogram, unsigned 24bit value for each bin. 251 * 256 bins for each histogram, unsigned 24bit value for each bin.
@@ -256,10 +256,10 @@ struct ia_css_3a_statistics {
256 * ISP2: HIST2 is used. 256 * ISP2: HIST2 is used.
257 */ 257 */
258struct ia_css_3a_rgby_output { 258struct ia_css_3a_rgby_output {
259 uint32_t r; /**< Number of R of one bin of the histogram R. (u24) */ 259 uint32_t r; /** Number of R of one bin of the histogram R. (u24) */
260 uint32_t g; /**< Number of G of one bin of the histogram G. (u24) */ 260 uint32_t g; /** Number of G of one bin of the histogram G. (u24) */
261 uint32_t b; /**< Number of B of one bin of the histogram B. (u24) */ 261 uint32_t b; /** Number of B of one bin of the histogram B. (u24) */
262 uint32_t y; /**< Number of Y of one bin of the histogram Y. (u24) */ 262 uint32_t y; /** Number of Y of one bin of the histogram Y. (u24) */
263}; 263};
264 264
265#endif /* __IA_CSS_S3A_TYPES_H */ 265#endif /* __IA_CSS_S3A_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h
index 8b2b56b0310b..9aa019539f47 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h
@@ -22,7 +22,7 @@
22 22
23#define NUM_S3A_LS 1 23#define NUM_S3A_LS 1
24 24
25/** s3a statistics store */ 25/* s3a statistics store */
26#ifdef ISP2401 26#ifdef ISP2401
27struct ia_css_s3a_stat_ls_configuration { 27struct ia_css_s3a_stat_ls_configuration {
28 uint32_t s3a_grid_size_log2; 28 uint32_t s3a_grid_size_log2;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h
index 44e3c43a5d4a..b35ac3e4009b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h
@@ -32,7 +32,7 @@ ia_css_sc_dump(
32 unsigned level); 32 unsigned level);
33 33
34#ifdef ISP2401 34#ifdef ISP2401
35/** @brief Configure the shading correction. 35/* @brief Configure the shading correction.
36 * @param[out] to Parameters used in the shading correction kernel in the isp. 36 * @param[out] to Parameters used in the shading correction kernel in the isp.
37 * @param[in] from Parameters passed from the host. 37 * @param[in] from Parameters passed from the host.
38 * @param[in] size Size of the sh_css_isp_sc_isp_config structure. 38 * @param[in] size Size of the sh_css_isp_sc_isp_config structure.
@@ -45,7 +45,7 @@ ia_css_sc_config(
45 const struct ia_css_sc_configuration *from, 45 const struct ia_css_sc_configuration *from,
46 unsigned size); 46 unsigned size);
47 47
48/** @brief Configure the shading correction. 48/* @brief Configure the shading correction.
49 * @param[in] binary The binary, which has the shading correction. 49 * @param[in] binary The binary, which has the shading correction.
50 * @param[in] internal_frame_origin_x_bqs_on_sctbl 50 * @param[in] internal_frame_origin_x_bqs_on_sctbl
51 * X coordinate (in bqs) of the origin of the internal frame on the shading table. 51 * X coordinate (in bqs) of the origin of the internal frame on the shading table.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h
index 5a833bc48af1..30ce499ac8cf 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h
@@ -15,25 +15,25 @@
15#ifndef __IA_CSS_SC_TYPES_H 15#ifndef __IA_CSS_SC_TYPES_H
16#define __IA_CSS_SC_TYPES_H 16#define __IA_CSS_SC_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Lens Shading Correction (SC) parameters. 19* CSS-API header file for Lens Shading Correction (SC) parameters.
20*/ 20*/
21 21
22 22
23/** Number of color planes in the shading table. */ 23/* Number of color planes in the shading table. */
24#define IA_CSS_SC_NUM_COLORS 4 24#define IA_CSS_SC_NUM_COLORS 4
25 25
26/** The 4 colors that a shading table consists of. 26/* The 4 colors that a shading table consists of.
27 * For each color we store a grid of values. 27 * For each color we store a grid of values.
28 */ 28 */
29enum ia_css_sc_color { 29enum ia_css_sc_color {
30 IA_CSS_SC_COLOR_GR, /**< Green on a green-red line */ 30 IA_CSS_SC_COLOR_GR, /** Green on a green-red line */
31 IA_CSS_SC_COLOR_R, /**< Red */ 31 IA_CSS_SC_COLOR_R, /** Red */
32 IA_CSS_SC_COLOR_B, /**< Blue */ 32 IA_CSS_SC_COLOR_B, /** Blue */
33 IA_CSS_SC_COLOR_GB /**< Green on a green-blue line */ 33 IA_CSS_SC_COLOR_GB /** Green on a green-blue line */
34}; 34};
35 35
36/** Lens Shading Correction table. 36/* Lens Shading Correction table.
37 * 37 *
38 * This describes the color shading artefacts 38 * This describes the color shading artefacts
39 * introduced by lens imperfections. To correct artefacts, 39 * introduced by lens imperfections. To correct artefacts,
@@ -64,39 +64,39 @@ enum ia_css_sc_color {
64 * ISP2: SC1 is used. 64 * ISP2: SC1 is used.
65 */ 65 */
66struct ia_css_shading_table { 66struct ia_css_shading_table {
67 uint32_t enable; /**< Set to false for no shading correction. 67 uint32_t enable; /** Set to false for no shading correction.
68 The data field can be NULL when enable == true */ 68 The data field can be NULL when enable == true */
69/* ------ deprecated(bz675) : from ------ */ 69/* ------ deprecated(bz675) : from ------ */
70 uint32_t sensor_width; /**< Native sensor width in pixels. */ 70 uint32_t sensor_width; /** Native sensor width in pixels. */
71 uint32_t sensor_height; /**< Native sensor height in lines. 71 uint32_t sensor_height; /** Native sensor height in lines.
72 When shading_settings.enable_shading_table_conversion is set 72 When shading_settings.enable_shading_table_conversion is set
73 as 0, sensor_width and sensor_height are NOT used. 73 as 0, sensor_width and sensor_height are NOT used.
74 These are used only in the legacy shading table conversion 74 These are used only in the legacy shading table conversion
75 in the css, when shading_settings. 75 in the css, when shading_settings.
76 enable_shading_table_conversion is set as 1. */ 76 enable_shading_table_conversion is set as 1. */
77/* ------ deprecated(bz675) : to ------ */ 77/* ------ deprecated(bz675) : to ------ */
78 uint32_t width; /**< Number of data points per line per color. 78 uint32_t width; /** Number of data points per line per color.
79 u8.0, [0,81] */ 79 u8.0, [0,81] */
80 uint32_t height; /**< Number of lines of data points per color. 80 uint32_t height; /** Number of lines of data points per color.
81 u8.0, [0,61] */ 81 u8.0, [0,61] */
82 uint32_t fraction_bits; /**< Bits of fractional part in the data 82 uint32_t fraction_bits; /** Bits of fractional part in the data
83 points. 83 points.
84 u8.0, [0,13] */ 84 u8.0, [0,13] */
85 uint16_t *data[IA_CSS_SC_NUM_COLORS]; 85 uint16_t *data[IA_CSS_SC_NUM_COLORS];
86 /**< Table data, one array for each color. 86 /** Table data, one array for each color.
87 Use ia_css_sc_color to index this array. 87 Use ia_css_sc_color to index this array.
88 u[13-fraction_bits].[fraction_bits], [0,8191] */ 88 u[13-fraction_bits].[fraction_bits], [0,8191] */
89}; 89};
90 90
91/* ------ deprecated(bz675) : from ------ */ 91/* ------ deprecated(bz675) : from ------ */
92/** Shading Correction settings. 92/* Shading Correction settings.
93 * 93 *
94 * NOTE: 94 * NOTE:
95 * This structure should be removed when the shading table conversion is 95 * This structure should be removed when the shading table conversion is
96 * removed from the css. 96 * removed from the css.
97 */ 97 */
98struct ia_css_shading_settings { 98struct ia_css_shading_settings {
99 uint32_t enable_shading_table_conversion; /**< Set to 0, 99 uint32_t enable_shading_table_conversion; /** Set to 0,
100 if the conversion of the shading table should be disabled 100 if the conversion of the shading table should be disabled
101 in the css. (default 1) 101 in the css. (default 1)
102 0: The shading table is directly sent to the isp. 102 0: The shading table is directly sent to the isp.
@@ -119,14 +119,14 @@ struct ia_css_shading_settings {
119 119
120#ifdef ISP2401 120#ifdef ISP2401
121 121
122/** Shading Correction configuration. 122/* Shading Correction configuration.
123 * 123 *
124 * NOTE: The shading table size is larger than or equal to the internal frame size. 124 * NOTE: The shading table size is larger than or equal to the internal frame size.
125 */ 125 */
126struct ia_css_sc_configuration { 126struct ia_css_sc_configuration {
127 uint32_t internal_frame_origin_x_bqs_on_sctbl; /**< Origin X (in bqs) of internal frame on shading table. */ 127 uint32_t internal_frame_origin_x_bqs_on_sctbl; /** Origin X (in bqs) of internal frame on shading table. */
128 uint32_t internal_frame_origin_y_bqs_on_sctbl; /**< Origin Y (in bqs) of internal frame on shading table. */ 128 uint32_t internal_frame_origin_y_bqs_on_sctbl; /** Origin Y (in bqs) of internal frame on shading table. */
129 /**< NOTE: bqs = size in BQ(Bayer Quad) unit. 129 /** NOTE: bqs = size in BQ(Bayer Quad) unit.
130 1BQ means {Gr,R,B,Gb}(2x2 pixels). 130 1BQ means {Gr,R,B,Gb}(2x2 pixels).
131 Horizontal 1 bqs corresponds to horizontal 2 pixels. 131 Horizontal 1 bqs corresponds to horizontal 2 pixels.
132 Vertical 1 bqs corresponds to vertical 2 pixels. */ 132 Vertical 1 bqs corresponds to vertical 2 pixels. */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h
index 295dc60b778c..031983c357e4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h
@@ -15,21 +15,21 @@
15#ifndef __IA_CSS_SDIS_COMMON_TYPES_H 15#ifndef __IA_CSS_SDIS_COMMON_TYPES_H
16#define __IA_CSS_SDIS_COMMON_TYPES_H 16#define __IA_CSS_SDIS_COMMON_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for DVS statistics parameters. 19* CSS-API header file for DVS statistics parameters.
20*/ 20*/
21 21
22#include <type_support.h> 22#include <type_support.h>
23 23
24/** DVS statistics grid dimensions in number of cells. 24/* DVS statistics grid dimensions in number of cells.
25 */ 25 */
26 26
27struct ia_css_dvs_grid_dim { 27struct ia_css_dvs_grid_dim {
28 uint32_t width; /**< Width of DVS grid table in cells */ 28 uint32_t width; /** Width of DVS grid table in cells */
29 uint32_t height; /**< Height of DVS grid table in cells */ 29 uint32_t height; /** Height of DVS grid table in cells */
30}; 30};
31 31
32/** DVS statistics dimensions in number of cells for 32/* DVS statistics dimensions in number of cells for
33 * grid, coeffieicient and projection. 33 * grid, coeffieicient and projection.
34 */ 34 */
35 35
@@ -55,7 +55,7 @@ struct ia_css_sdis_info {
55 0, /* dis_deci_factor_log2 */ \ 55 0, /* dis_deci_factor_log2 */ \
56 } 56 }
57 57
58/** DVS statistics grid 58/* DVS statistics grid
59 * 59 *
60 * ISP block: SDVS1 (DIS/DVS Support for DIS/DVS ver.1 (2-axes)) 60 * ISP block: SDVS1 (DIS/DVS Support for DIS/DVS ver.1 (2-axes))
61 * SDVS2 (DVS Support for DVS ver.2 (6-axes)) 61 * SDVS2 (DVS Support for DVS ver.2 (6-axes))
@@ -63,23 +63,23 @@ struct ia_css_sdis_info {
63 * ISP2: SDVS2 is used. 63 * ISP2: SDVS2 is used.
64 */ 64 */
65struct ia_css_dvs_grid_res { 65struct ia_css_dvs_grid_res {
66 uint32_t width; /**< Width of DVS grid table. 66 uint32_t width; /** Width of DVS grid table.
67 (= Horizontal number of grid cells 67 (= Horizontal number of grid cells
68 in table, which cells have effective 68 in table, which cells have effective
69 statistics.) 69 statistics.)
70 For DVS1, this is equal to 70 For DVS1, this is equal to
71 the number of vertical statistics. */ 71 the number of vertical statistics. */
72 uint32_t aligned_width; /**< Stride of each grid line. 72 uint32_t aligned_width; /** Stride of each grid line.
73 (= Horizontal number of grid cells 73 (= Horizontal number of grid cells
74 in table, which means 74 in table, which means
75 the allocated width.) */ 75 the allocated width.) */
76 uint32_t height; /**< Height of DVS grid table. 76 uint32_t height; /** Height of DVS grid table.
77 (= Vertical number of grid cells 77 (= Vertical number of grid cells
78 in table, which cells have effective 78 in table, which cells have effective
79 statistics.) 79 statistics.)
80 For DVS1, This is equal to 80 For DVS1, This is equal to
81 the number of horizontal statistics. */ 81 the number of horizontal statistics. */
82 uint32_t aligned_height;/**< Stride of each grid column. 82 uint32_t aligned_height;/** Stride of each grid column.
83 (= Vertical number of grid cells 83 (= Vertical number of grid cells
84 in table, which means 84 in table, which means
85 the allocated height.) */ 85 the allocated height.) */
@@ -89,125 +89,125 @@ struct ia_css_dvs_grid_res {
89 * However, that implies driver I/F changes 89 * However, that implies driver I/F changes
90 */ 90 */
91struct ia_css_dvs_grid_info { 91struct ia_css_dvs_grid_info {
92 uint32_t enable; /**< DVS statistics enabled. 92 uint32_t enable; /** DVS statistics enabled.
93 0:disabled, 1:enabled */ 93 0:disabled, 1:enabled */
94 uint32_t width; /**< Width of DVS grid table. 94 uint32_t width; /** Width of DVS grid table.
95 (= Horizontal number of grid cells 95 (= Horizontal number of grid cells
96 in table, which cells have effective 96 in table, which cells have effective
97 statistics.) 97 statistics.)
98 For DVS1, this is equal to 98 For DVS1, this is equal to
99 the number of vertical statistics. */ 99 the number of vertical statistics. */
100 uint32_t aligned_width; /**< Stride of each grid line. 100 uint32_t aligned_width; /** Stride of each grid line.
101 (= Horizontal number of grid cells 101 (= Horizontal number of grid cells
102 in table, which means 102 in table, which means
103 the allocated width.) */ 103 the allocated width.) */
104 uint32_t height; /**< Height of DVS grid table. 104 uint32_t height; /** Height of DVS grid table.
105 (= Vertical number of grid cells 105 (= Vertical number of grid cells
106 in table, which cells have effective 106 in table, which cells have effective
107 statistics.) 107 statistics.)
108 For DVS1, This is equal to 108 For DVS1, This is equal to
109 the number of horizontal statistics. */ 109 the number of horizontal statistics. */
110 uint32_t aligned_height;/**< Stride of each grid column. 110 uint32_t aligned_height;/** Stride of each grid column.
111 (= Vertical number of grid cells 111 (= Vertical number of grid cells
112 in table, which means 112 in table, which means
113 the allocated height.) */ 113 the allocated height.) */
114 uint32_t bqs_per_grid_cell; /**< Grid cell size in BQ(Bayer Quad) unit. 114 uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit.
115 (1BQ means {Gr,R,B,Gb}(2x2 pixels).) 115 (1BQ means {Gr,R,B,Gb}(2x2 pixels).)
116 For DVS1, valid value is 64. 116 For DVS1, valid value is 64.
117 For DVS2, valid value is only 64, 117 For DVS2, valid value is only 64,
118 currently. */ 118 currently. */
119 uint32_t num_hor_coefs; /**< Number of horizontal coefficients. */ 119 uint32_t num_hor_coefs; /** Number of horizontal coefficients. */
120 uint32_t num_ver_coefs; /**< Number of vertical coefficients. */ 120 uint32_t num_ver_coefs; /** Number of vertical coefficients. */
121}; 121};
122 122
123/** Number of DVS statistics levels 123/* Number of DVS statistics levels
124 */ 124 */
125#define IA_CSS_DVS_STAT_NUM_OF_LEVELS 3 125#define IA_CSS_DVS_STAT_NUM_OF_LEVELS 3
126 126
127/** DVS statistics generated by accelerator global configuration 127/* DVS statistics generated by accelerator global configuration
128 */ 128 */
129struct dvs_stat_public_dvs_global_cfg { 129struct dvs_stat_public_dvs_global_cfg {
130 unsigned char kappa; 130 unsigned char kappa;
131 /**< DVS statistics global configuration - kappa */ 131 /** DVS statistics global configuration - kappa */
132 unsigned char match_shift; 132 unsigned char match_shift;
133 /**< DVS statistics global configuration - match_shift */ 133 /** DVS statistics global configuration - match_shift */
134 unsigned char ybin_mode; 134 unsigned char ybin_mode;
135 /**< DVS statistics global configuration - y binning mode */ 135 /** DVS statistics global configuration - y binning mode */
136}; 136};
137 137
138/** DVS statistics generated by accelerator level grid 138/* DVS statistics generated by accelerator level grid
139 * configuration 139 * configuration
140 */ 140 */
141struct dvs_stat_public_dvs_level_grid_cfg { 141struct dvs_stat_public_dvs_level_grid_cfg {
142 unsigned char grid_width; 142 unsigned char grid_width;
143 /**< DVS statistics grid width */ 143 /** DVS statistics grid width */
144 unsigned char grid_height; 144 unsigned char grid_height;
145 /**< DVS statistics grid height */ 145 /** DVS statistics grid height */
146 unsigned char block_width; 146 unsigned char block_width;
147 /**< DVS statistics block width */ 147 /** DVS statistics block width */
148 unsigned char block_height; 148 unsigned char block_height;
149 /**< DVS statistics block height */ 149 /** DVS statistics block height */
150}; 150};
151 151
152/** DVS statistics generated by accelerator level grid start 152/* DVS statistics generated by accelerator level grid start
153 * configuration 153 * configuration
154 */ 154 */
155struct dvs_stat_public_dvs_level_grid_start { 155struct dvs_stat_public_dvs_level_grid_start {
156 unsigned short x_start; 156 unsigned short x_start;
157 /**< DVS statistics level x start */ 157 /** DVS statistics level x start */
158 unsigned short y_start; 158 unsigned short y_start;
159 /**< DVS statistics level y start */ 159 /** DVS statistics level y start */
160 unsigned char enable; 160 unsigned char enable;
161 /**< DVS statistics level enable */ 161 /** DVS statistics level enable */
162}; 162};
163 163
164/** DVS statistics generated by accelerator level grid end 164/* DVS statistics generated by accelerator level grid end
165 * configuration 165 * configuration
166 */ 166 */
167struct dvs_stat_public_dvs_level_grid_end { 167struct dvs_stat_public_dvs_level_grid_end {
168 unsigned short x_end; 168 unsigned short x_end;
169 /**< DVS statistics level x end */ 169 /** DVS statistics level x end */
170 unsigned short y_end; 170 unsigned short y_end;
171 /**< DVS statistics level y end */ 171 /** DVS statistics level y end */
172}; 172};
173 173
174/** DVS statistics generated by accelerator Feature Extraction 174/* DVS statistics generated by accelerator Feature Extraction
175 * Region Of Interest (FE-ROI) configuration 175 * Region Of Interest (FE-ROI) configuration
176 */ 176 */
177struct dvs_stat_public_dvs_level_fe_roi_cfg { 177struct dvs_stat_public_dvs_level_fe_roi_cfg {
178 unsigned char x_start; 178 unsigned char x_start;
179 /**< DVS statistics fe-roi level x start */ 179 /** DVS statistics fe-roi level x start */
180 unsigned char y_start; 180 unsigned char y_start;
181 /**< DVS statistics fe-roi level y start */ 181 /** DVS statistics fe-roi level y start */
182 unsigned char x_end; 182 unsigned char x_end;
183 /**< DVS statistics fe-roi level x end */ 183 /** DVS statistics fe-roi level x end */
184 unsigned char y_end; 184 unsigned char y_end;
185 /**< DVS statistics fe-roi level y end */ 185 /** DVS statistics fe-roi level y end */
186}; 186};
187 187
188/** DVS statistics generated by accelerator public configuration 188/* DVS statistics generated by accelerator public configuration
189 */ 189 */
190struct dvs_stat_public_dvs_grd_cfg { 190struct dvs_stat_public_dvs_grd_cfg {
191 struct dvs_stat_public_dvs_level_grid_cfg grd_cfg; 191 struct dvs_stat_public_dvs_level_grid_cfg grd_cfg;
192 /**< DVS statistics level grid configuration */ 192 /** DVS statistics level grid configuration */
193 struct dvs_stat_public_dvs_level_grid_start grd_start; 193 struct dvs_stat_public_dvs_level_grid_start grd_start;
194 /**< DVS statistics level grid start configuration */ 194 /** DVS statistics level grid start configuration */
195 struct dvs_stat_public_dvs_level_grid_end grd_end; 195 struct dvs_stat_public_dvs_level_grid_end grd_end;
196 /**< DVS statistics level grid end configuration */ 196 /** DVS statistics level grid end configuration */
197}; 197};
198 198
199/** DVS statistics grid generated by accelerator 199/* DVS statistics grid generated by accelerator
200 */ 200 */
201struct ia_css_dvs_stat_grid_info { 201struct ia_css_dvs_stat_grid_info {
202 struct dvs_stat_public_dvs_global_cfg dvs_gbl_cfg; 202 struct dvs_stat_public_dvs_global_cfg dvs_gbl_cfg;
203 /**< DVS statistics global configuration (kappa, match, binning) */ 203 /** DVS statistics global configuration (kappa, match, binning) */
204 struct dvs_stat_public_dvs_grd_cfg grd_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS]; 204 struct dvs_stat_public_dvs_grd_cfg grd_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
205 /**< DVS statistics grid configuration (blocks and grids) */ 205 /** DVS statistics grid configuration (blocks and grids) */
206 struct dvs_stat_public_dvs_level_fe_roi_cfg fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS]; 206 struct dvs_stat_public_dvs_level_fe_roi_cfg fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
207 /**< DVS statistics FE ROI (region of interest) configuration */ 207 /** DVS statistics FE ROI (region of interest) configuration */
208}; 208};
209 209
210/** DVS statistics generated by accelerator default grid info 210/* DVS statistics generated by accelerator default grid info
211 */ 211 */
212#define DEFAULT_DVS_GRID_INFO { \ 212#define DEFAULT_DVS_GRID_INFO { \
213{ \ 213{ \
@@ -219,14 +219,14 @@ struct ia_css_dvs_stat_grid_info {
219} 219}
220 220
221 221
222/** Union that holds all types of DVS statistics grid info in 222/* Union that holds all types of DVS statistics grid info in
223 * CSS format 223 * CSS format
224 * */ 224 * */
225union ia_css_dvs_grid_u { 225union ia_css_dvs_grid_u {
226 struct ia_css_dvs_stat_grid_info dvs_stat_grid_info; 226 struct ia_css_dvs_stat_grid_info dvs_stat_grid_info;
227 /**< DVS statistics produced by accelerator grid info */ 227 /** DVS statistics produced by accelerator grid info */
228 struct ia_css_dvs_grid_info dvs_grid_info; 228 struct ia_css_dvs_grid_info dvs_grid_info;
229 /**< DVS (DVS1/DVS2) grid info */ 229 /** DVS (DVS1/DVS2) grid info */
230}; 230};
231 231
232#endif /* __IA_CSS_SDIS_COMMON_TYPES_H */ 232#endif /* __IA_CSS_SDIS_COMMON_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h
index d408b58a027d..d2ee57008fb6 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h
@@ -15,38 +15,38 @@
15#ifndef __IA_CSS_SDIS_TYPES_H 15#ifndef __IA_CSS_SDIS_TYPES_H
16#define __IA_CSS_SDIS_TYPES_H 16#define __IA_CSS_SDIS_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for DVS statistics parameters. 19* CSS-API header file for DVS statistics parameters.
20*/ 20*/
21 21
22/** Number of DVS coefficient types */ 22/* Number of DVS coefficient types */
23#define IA_CSS_DVS_NUM_COEF_TYPES 6 23#define IA_CSS_DVS_NUM_COEF_TYPES 6
24 24
25#ifndef PIPE_GENERATION 25#ifndef PIPE_GENERATION
26#include "isp/kernels/sdis/common/ia_css_sdis_common_types.h" 26#include "isp/kernels/sdis/common/ia_css_sdis_common_types.h"
27#endif 27#endif
28 28
29/** DVS 1.0 Coefficients. 29/* DVS 1.0 Coefficients.
30 * This structure describes the coefficients that are needed for the dvs statistics. 30 * This structure describes the coefficients that are needed for the dvs statistics.
31 */ 31 */
32 32
33struct ia_css_dvs_coefficients { 33struct ia_css_dvs_coefficients {
34 struct ia_css_dvs_grid_info grid;/**< grid info contains the dimensions of the dvs grid */ 34 struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
35 int16_t *hor_coefs; /**< the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES] 35 int16_t *hor_coefs; /** the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
36 containing the horizontal coefficients */ 36 containing the horizontal coefficients */
37 int16_t *ver_coefs; /**< the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES] 37 int16_t *ver_coefs; /** the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
38 containing the vertical coefficients */ 38 containing the vertical coefficients */
39}; 39};
40 40
41/** DVS 1.0 Statistics. 41/* DVS 1.0 Statistics.
42 * This structure describes the statistics that are generated using the provided coefficients. 42 * This structure describes the statistics that are generated using the provided coefficients.
43 */ 43 */
44 44
45struct ia_css_dvs_statistics { 45struct ia_css_dvs_statistics {
46 struct ia_css_dvs_grid_info grid;/**< grid info contains the dimensions of the dvs grid */ 46 struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
47 int32_t *hor_proj; /**< the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES] 47 int32_t *hor_proj; /** the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES]
48 containing the horizontal projections */ 48 containing the horizontal projections */
49 int32_t *ver_proj; /**< the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES] 49 int32_t *ver_proj; /** the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES]
50 containing the vertical projections */ 50 containing the vertical projections */
51}; 51};
52 52
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h
index 7db7dd10fe00..2a0bc4031746 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h
@@ -15,55 +15,55 @@
15#ifndef __IA_CSS_SDIS2_TYPES_H 15#ifndef __IA_CSS_SDIS2_TYPES_H
16#define __IA_CSS_SDIS2_TYPES_H 16#define __IA_CSS_SDIS2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for DVS statistics parameters. 19* CSS-API header file for DVS statistics parameters.
20*/ 20*/
21 21
22/** Number of DVS coefficient types */ 22/* Number of DVS coefficient types */
23#define IA_CSS_DVS2_NUM_COEF_TYPES 4 23#define IA_CSS_DVS2_NUM_COEF_TYPES 4
24 24
25#ifndef PIPE_GENERATION 25#ifndef PIPE_GENERATION
26#include "isp/kernels/sdis/common/ia_css_sdis_common_types.h" 26#include "isp/kernels/sdis/common/ia_css_sdis_common_types.h"
27#endif 27#endif
28 28
29/** DVS 2.0 Coefficient types. This structure contains 4 pointers to 29/* DVS 2.0 Coefficient types. This structure contains 4 pointers to
30 * arrays that contain the coeffients for each type. 30 * arrays that contain the coeffients for each type.
31 */ 31 */
32struct ia_css_dvs2_coef_types { 32struct ia_css_dvs2_coef_types {
33 int16_t *odd_real; /**< real part of the odd coefficients*/ 33 int16_t *odd_real; /** real part of the odd coefficients*/
34 int16_t *odd_imag; /**< imaginary part of the odd coefficients*/ 34 int16_t *odd_imag; /** imaginary part of the odd coefficients*/
35 int16_t *even_real;/**< real part of the even coefficients*/ 35 int16_t *even_real;/** real part of the even coefficients*/
36 int16_t *even_imag;/**< imaginary part of the even coefficients*/ 36 int16_t *even_imag;/** imaginary part of the even coefficients*/
37}; 37};
38 38
39/** DVS 2.0 Coefficients. This structure describes the coefficients that are needed for the dvs statistics. 39/* DVS 2.0 Coefficients. This structure describes the coefficients that are needed for the dvs statistics.
40 * e.g. hor_coefs.odd_real is the pointer to int16_t[grid.num_hor_coefs] containing the horizontal odd real 40 * e.g. hor_coefs.odd_real is the pointer to int16_t[grid.num_hor_coefs] containing the horizontal odd real
41 * coefficients. 41 * coefficients.
42 */ 42 */
43struct ia_css_dvs2_coefficients { 43struct ia_css_dvs2_coefficients {
44 struct ia_css_dvs_grid_info grid; /**< grid info contains the dimensions of the dvs grid */ 44 struct ia_css_dvs_grid_info grid; /** grid info contains the dimensions of the dvs grid */
45 struct ia_css_dvs2_coef_types hor_coefs; /**< struct with pointers that contain the horizontal coefficients */ 45 struct ia_css_dvs2_coef_types hor_coefs; /** struct with pointers that contain the horizontal coefficients */
46 struct ia_css_dvs2_coef_types ver_coefs; /**< struct with pointers that contain the vertical coefficients */ 46 struct ia_css_dvs2_coef_types ver_coefs; /** struct with pointers that contain the vertical coefficients */
47}; 47};
48 48
49/** DVS 2.0 Statistic types. This structure contains 4 pointers to 49/* DVS 2.0 Statistic types. This structure contains 4 pointers to
50 * arrays that contain the statistics for each type. 50 * arrays that contain the statistics for each type.
51 */ 51 */
52struct ia_css_dvs2_stat_types { 52struct ia_css_dvs2_stat_types {
53 int32_t *odd_real; /**< real part of the odd statistics*/ 53 int32_t *odd_real; /** real part of the odd statistics*/
54 int32_t *odd_imag; /**< imaginary part of the odd statistics*/ 54 int32_t *odd_imag; /** imaginary part of the odd statistics*/
55 int32_t *even_real;/**< real part of the even statistics*/ 55 int32_t *even_real;/** real part of the even statistics*/
56 int32_t *even_imag;/**< imaginary part of the even statistics*/ 56 int32_t *even_imag;/** imaginary part of the even statistics*/
57}; 57};
58 58
59/** DVS 2.0 Statistics. This structure describes the statistics that are generated using the provided coefficients. 59/* DVS 2.0 Statistics. This structure describes the statistics that are generated using the provided coefficients.
60 * e.g. hor_prod.odd_real is the pointer to int16_t[grid.aligned_height][grid.aligned_width] containing 60 * e.g. hor_prod.odd_real is the pointer to int16_t[grid.aligned_height][grid.aligned_width] containing
61 * the horizontal odd real statistics. Valid statistics data area is int16_t[0..grid.height-1][0..grid.width-1] 61 * the horizontal odd real statistics. Valid statistics data area is int16_t[0..grid.height-1][0..grid.width-1]
62 */ 62 */
63struct ia_css_dvs2_statistics { 63struct ia_css_dvs2_statistics {
64 struct ia_css_dvs_grid_info grid; /**< grid info contains the dimensions of the dvs grid */ 64 struct ia_css_dvs_grid_info grid; /** grid info contains the dimensions of the dvs grid */
65 struct ia_css_dvs2_stat_types hor_prod; /**< struct with pointers that contain the horizontal statistics */ 65 struct ia_css_dvs2_stat_types hor_prod; /** struct with pointers that contain the horizontal statistics */
66 struct ia_css_dvs2_stat_types ver_prod; /**< struct with pointers that contain the vertical statistics */ 66 struct ia_css_dvs2_stat_types ver_prod; /** struct with pointers that contain the vertical statistics */
67}; 67};
68 68
69#endif /* __IA_CSS_SDIS2_TYPES_H */ 69#endif /* __IA_CSS_SDIS2_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h
index cc47a50e5ad5..91ea8dd4651d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h
@@ -15,13 +15,13 @@
15#ifndef __IA_CSS_TDF_TYPES_H 15#ifndef __IA_CSS_TDF_TYPES_H
16#define __IA_CSS_TDF_TYPES_H 16#define __IA_CSS_TDF_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Transform Domain Filter parameters. 19* CSS-API header file for Transform Domain Filter parameters.
20*/ 20*/
21 21
22#include "type_support.h" 22#include "type_support.h"
23 23
24/** Transform Domain Filter configuration 24/* Transform Domain Filter configuration
25 * 25 *
26 * \brief TDF public parameters. 26 * \brief TDF public parameters.
27 * \details Struct with all parameters for the TDF kernel that can be set 27 * \details Struct with all parameters for the TDF kernel that can be set
@@ -30,23 +30,23 @@
30 * ISP2.6.1: TDF is used. 30 * ISP2.6.1: TDF is used.
31 */ 31 */
32struct ia_css_tdf_config { 32struct ia_css_tdf_config {
33 int32_t thres_flat_table[64]; /**< Final optimized strength table of NR for flat region. */ 33 int32_t thres_flat_table[64]; /** Final optimized strength table of NR for flat region. */
34 int32_t thres_detail_table[64]; /**< Final optimized strength table of NR for detail region. */ 34 int32_t thres_detail_table[64]; /** Final optimized strength table of NR for detail region. */
35 int32_t epsilon_0; /**< Coefficient to control variance for dark area (for flat region). */ 35 int32_t epsilon_0; /** Coefficient to control variance for dark area (for flat region). */
36 int32_t epsilon_1; /**< Coefficient to control variance for bright area (for flat region). */ 36 int32_t epsilon_1; /** Coefficient to control variance for bright area (for flat region). */
37 int32_t eps_scale_text; /**< Epsilon scaling coefficient for texture region. */ 37 int32_t eps_scale_text; /** Epsilon scaling coefficient for texture region. */
38 int32_t eps_scale_edge; /**< Epsilon scaling coefficient for edge region. */ 38 int32_t eps_scale_edge; /** Epsilon scaling coefficient for edge region. */
39 int32_t sepa_flat; /**< Threshold to judge flat (edge < m_Flat_thre). */ 39 int32_t sepa_flat; /** Threshold to judge flat (edge < m_Flat_thre). */
40 int32_t sepa_edge; /**< Threshold to judge edge (edge > m_Edge_thre). */ 40 int32_t sepa_edge; /** Threshold to judge edge (edge > m_Edge_thre). */
41 int32_t blend_flat; /**< Blending ratio at flat region. */ 41 int32_t blend_flat; /** Blending ratio at flat region. */
42 int32_t blend_text; /**< Blending ratio at texture region. */ 42 int32_t blend_text; /** Blending ratio at texture region. */
43 int32_t blend_edge; /**< Blending ratio at edge region. */ 43 int32_t blend_edge; /** Blending ratio at edge region. */
44 int32_t shading_gain; /**< Gain of Shading control. */ 44 int32_t shading_gain; /** Gain of Shading control. */
45 int32_t shading_base_gain; /**< Base Gain of Shading control. */ 45 int32_t shading_base_gain; /** Base Gain of Shading control. */
46 int32_t local_y_gain; /**< Gain of local luminance control. */ 46 int32_t local_y_gain; /** Gain of local luminance control. */
47 int32_t local_y_base_gain; /**< Base gain of local luminance control. */ 47 int32_t local_y_base_gain; /** Base gain of local luminance control. */
48 int32_t rad_x_origin; /**< Initial x coord. for radius computation. */ 48 int32_t rad_x_origin; /** Initial x coord. for radius computation. */
49 int32_t rad_y_origin; /**< Initial y coord. for radius computation. */ 49 int32_t rad_y_origin; /** Initial y coord. for radius computation. */
50}; 50};
51 51
52#endif /* __IA_CSS_TDF_TYPES_H */ 52#endif /* __IA_CSS_TDF_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h
index 135563f52174..223423f8c40b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h
@@ -16,7 +16,7 @@ more details.
16#ifndef _IA_CSS_TNR3_TYPES_H 16#ifndef _IA_CSS_TNR3_TYPES_H
17#define _IA_CSS_TNR3_TYPES_H 17#define _IA_CSS_TNR3_TYPES_H
18 18
19/** @file 19/* @file
20* CSS-API header file for Temporal Noise Reduction v3 (TNR3) kernel 20* CSS-API header file for Temporal Noise Reduction v3 (TNR3) kernel
21*/ 21*/
22 22
@@ -27,7 +27,7 @@ more details.
27 */ 27 */
28#define TNR3_NUM_SEGMENTS 3 28#define TNR3_NUM_SEGMENTS 3
29 29
30/** Temporal Noise Reduction v3 (TNR3) configuration. 30/* Temporal Noise Reduction v3 (TNR3) configuration.
31 * The parameter to this kernel is fourfold 31 * The parameter to this kernel is fourfold
32 * 1. Three piecewise linear graphs (one for each plane) with three segments 32 * 1. Three piecewise linear graphs (one for each plane) with three segments
33 * each. Each line graph has Luma values on the x axis and sigma values for 33 * each. Each line graph has Luma values on the x axis and sigma values for
@@ -44,17 +44,17 @@ more details.
44 * 4. Selection of the reference frame buffer to be used for noise reduction. 44 * 4. Selection of the reference frame buffer to be used for noise reduction.
45 */ 45 */
46struct ia_css_tnr3_kernel_config { 46struct ia_css_tnr3_kernel_config {
47 unsigned int maxfb_y; /**< Maximum Feedback Gain for Y */ 47 unsigned int maxfb_y; /** Maximum Feedback Gain for Y */
48 unsigned int maxfb_u; /**< Maximum Feedback Gain for U */ 48 unsigned int maxfb_u; /** Maximum Feedback Gain for U */
49 unsigned int maxfb_v; /**< Maximum Feedback Gain for V */ 49 unsigned int maxfb_v; /** Maximum Feedback Gain for V */
50 unsigned int round_adj_y; /**< Rounding Adjust for Y */ 50 unsigned int round_adj_y; /** Rounding Adjust for Y */
51 unsigned int round_adj_u; /**< Rounding Adjust for U */ 51 unsigned int round_adj_u; /** Rounding Adjust for U */
52 unsigned int round_adj_v; /**< Rounding Adjust for V */ 52 unsigned int round_adj_v; /** Rounding Adjust for V */
53 unsigned int knee_y[TNR3_NUM_SEGMENTS - 1]; /**< Knee points */ 53 unsigned int knee_y[TNR3_NUM_SEGMENTS - 1]; /** Knee points */
54 unsigned int sigma_y[TNR3_NUM_SEGMENTS + 1]; /**< Standard deviation for Y at points Y0, Y1, Y2, Y3 */ 54 unsigned int sigma_y[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for Y at points Y0, Y1, Y2, Y3 */
55 unsigned int sigma_u[TNR3_NUM_SEGMENTS + 1]; /**< Standard deviation for U at points U0, U1, U2, U3 */ 55 unsigned int sigma_u[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for U at points U0, U1, U2, U3 */
56 unsigned int sigma_v[TNR3_NUM_SEGMENTS + 1]; /**< Standard deviation for V at points V0, V1, V2, V3 */ 56 unsigned int sigma_v[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for V at points V0, V1, V2, V3 */
57 unsigned int ref_buf_select; /**< Selection of the reference buffer */ 57 unsigned int ref_buf_select; /** Selection of the reference buffer */
58}; 58};
59 59
60#endif 60#endif
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h
index 4fd35e6ccd70..9bbc9ab2e6c0 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_TNR_TYPES_H 15#ifndef __IA_CSS_TNR_TYPES_H
16#define __IA_CSS_TNR_TYPES_H 16#define __IA_CSS_TNR_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Temporal Noise Reduction (TNR) parameters. 19* CSS-API header file for Temporal Noise Reduction (TNR) parameters.
20*/ 20*/
21 21
22/** Temporal Noise Reduction (TNR) configuration. 22/* Temporal Noise Reduction (TNR) configuration.
23 * 23 *
24 * When difference between current frame and previous frame is less than or 24 * When difference between current frame and previous frame is less than or
25 * equal to threshold, TNR works and current frame is mixed 25 * equal to threshold, TNR works and current frame is mixed
@@ -36,18 +36,18 @@
36 36
37 37
38struct ia_css_tnr_config { 38struct ia_css_tnr_config {
39 ia_css_u0_16 gain; /**< Interpolation ratio of current frame 39 ia_css_u0_16 gain; /** Interpolation ratio of current frame
40 and previous frame. 40 and previous frame.
41 gain=0.0 -> previous frame is outputted. 41 gain=0.0 -> previous frame is outputted.
42 gain=1.0 -> current frame is outputted. 42 gain=1.0 -> current frame is outputted.
43 u0.16, [0,65535], 43 u0.16, [0,65535],
44 default 32768(0.5), ineffective 65535(almost 1.0) */ 44 default 32768(0.5), ineffective 65535(almost 1.0) */
45 ia_css_u0_16 threshold_y; /**< Threshold to enable interpolation of Y. 45 ia_css_u0_16 threshold_y; /** Threshold to enable interpolation of Y.
46 If difference between current frame and 46 If difference between current frame and
47 previous frame is greater than threshold_y, 47 previous frame is greater than threshold_y,
48 TNR for Y is disabled. 48 TNR for Y is disabled.
49 u0.16, [0,65535], default/ineffective 0 */ 49 u0.16, [0,65535], default/ineffective 0 */
50 ia_css_u0_16 threshold_uv; /**< Threshold to enable interpolation of 50 ia_css_u0_16 threshold_uv; /** Threshold to enable interpolation of
51 U/V. 51 U/V.
52 If difference between current frame and 52 If difference between current frame and
53 previous frame is greater than threshold_uv, 53 previous frame is greater than threshold_uv,
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h
index df5d37c8c946..9df4e12f6c2c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h
@@ -23,9 +23,9 @@
23 23
24#define VFDEC_BITS_PER_PIXEL GAMMA_OUTPUT_BITS 24#define VFDEC_BITS_PER_PIXEL GAMMA_OUTPUT_BITS
25 25
26/** Viewfinder decimation */ 26/* Viewfinder decimation */
27struct sh_css_isp_vf_isp_config { 27struct sh_css_isp_vf_isp_config {
28 uint32_t vf_downscale_bits; /**< Log VF downscale value */ 28 uint32_t vf_downscale_bits; /** Log VF downscale value */
29 uint32_t enable; 29 uint32_t enable;
30 struct ia_css_frame_sp_info info; 30 struct ia_css_frame_sp_info info;
31 struct { 31 struct {
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h
index d8cfdfbc8c0b..e3efafa279ff 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_VF_TYPES_H 15#ifndef __IA_CSS_VF_TYPES_H
16#define __IA_CSS_VF_TYPES_H 16#define __IA_CSS_VF_TYPES_H
17 17
18/** Viewfinder decimation 18/* Viewfinder decimation
19 * 19 *
20 * ISP block: vfeven_horizontal_downscale 20 * ISP block: vfeven_horizontal_downscale
21 */ 21 */
@@ -24,7 +24,7 @@
24#include <type_support.h> 24#include <type_support.h>
25 25
26struct ia_css_vf_configuration { 26struct ia_css_vf_configuration {
27 uint32_t vf_downscale_bits; /**< Log VF downscale value */ 27 uint32_t vf_downscale_bits; /** Log VF downscale value */
28 const struct ia_css_frame_info *info; 28 const struct ia_css_frame_info *info;
29}; 29};
30 30
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h
index 6bcfa274be88..bf98734d057e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h
@@ -15,31 +15,31 @@
15#ifndef __IA_CSS_WB_TYPES_H 15#ifndef __IA_CSS_WB_TYPES_H
16#define __IA_CSS_WB_TYPES_H 16#define __IA_CSS_WB_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for White Balance parameters. 19* CSS-API header file for White Balance parameters.
20*/ 20*/
21 21
22 22
23/** White Balance configuration (Gain Adjust). 23/* White Balance configuration (Gain Adjust).
24 * 24 *
25 * ISP block: WB1 25 * ISP block: WB1
26 * ISP1: WB1 is used. 26 * ISP1: WB1 is used.
27 * ISP2: WB1 is used. 27 * ISP2: WB1 is used.
28 */ 28 */
29struct ia_css_wb_config { 29struct ia_css_wb_config {
30 uint32_t integer_bits; /**< Common exponent of gains. 30 uint32_t integer_bits; /** Common exponent of gains.
31 u8.0, [0,3], 31 u8.0, [0,3],
32 default 1, ineffective 1 */ 32 default 1, ineffective 1 */
33 uint32_t gr; /**< Significand of Gr gain. 33 uint32_t gr; /** Significand of Gr gain.
34 u[integer_bits].[16-integer_bits], [0,65535], 34 u[integer_bits].[16-integer_bits], [0,65535],
35 default/ineffective 32768(u1.15, 1.0) */ 35 default/ineffective 32768(u1.15, 1.0) */
36 uint32_t r; /**< Significand of R gain. 36 uint32_t r; /** Significand of R gain.
37 u[integer_bits].[16-integer_bits], [0,65535], 37 u[integer_bits].[16-integer_bits], [0,65535],
38 default/ineffective 32768(u1.15, 1.0) */ 38 default/ineffective 32768(u1.15, 1.0) */
39 uint32_t b; /**< Significand of B gain. 39 uint32_t b; /** Significand of B gain.
40 u[integer_bits].[16-integer_bits], [0,65535], 40 u[integer_bits].[16-integer_bits], [0,65535],
41 default/ineffective 32768(u1.15, 1.0) */ 41 default/ineffective 32768(u1.15, 1.0) */
42 uint32_t gb; /**< Significand of Gb gain. 42 uint32_t gb; /** Significand of Gb gain.
43 u[integer_bits].[16-integer_bits], [0,65535], 43 u[integer_bits].[16-integer_bits], [0,65535],
44 default/ineffective 32768(u1.15, 1.0) */ 44 default/ineffective 32768(u1.15, 1.0) */
45}; 45};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c
index 3018100f6f76..abcb531f51cc 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c
@@ -21,7 +21,7 @@
21#include "ia_css_xnr.host.h" 21#include "ia_css_xnr.host.h"
22 22
23const struct ia_css_xnr_config default_xnr_config = { 23const struct ia_css_xnr_config default_xnr_config = {
24 /** default threshold 6400 translates to 25 on ISP. */ 24 /* default threshold 6400 translates to 25 on ISP. */
25 6400 25 6400
26}; 26};
27 27
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h
index 806c9f8f0e2e..a5caebbe2f84 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h
@@ -41,7 +41,7 @@ struct sh_css_isp_xnr_vamem_params {
41}; 41};
42 42
43struct sh_css_isp_xnr_params { 43struct sh_css_isp_xnr_params {
44 /** XNR threshold. 44 /* XNR threshold.
45 * type:u0.16 but actual valid range is:[0,255] 45 * type:u0.16 but actual valid range is:[0,255]
46 * valid range is dependent on SH_CSS_ISP_YUV_BITS (currently 8bits) 46 * valid range is dependent on SH_CSS_ISP_YUV_BITS (currently 8bits)
47 * default: 25 */ 47 * default: 25 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h
index 89e8b0f17e8c..d2b634211a3f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_XNR_TYPES_H 15#ifndef __IA_CSS_XNR_TYPES_H
16#define __IA_CSS_XNR_TYPES_H 16#define __IA_CSS_XNR_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Extra Noise Reduction (XNR) parameters. 19* CSS-API header file for Extra Noise Reduction (XNR) parameters.
20*/ 20*/
21 21
22/** XNR table. 22/* XNR table.
23 * 23 *
24 * NOTE: The driver does not need to set this table, 24 * NOTE: The driver does not need to set this table,
25 * because the default values are set inside the css. 25 * because the default values are set inside the css.
@@ -36,23 +36,23 @@
36 * 36 *
37 */ 37 */
38 38
39/** Number of elements in the xnr table. */ 39/* Number of elements in the xnr table. */
40#define IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2 6 40#define IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2 6
41/** Number of elements in the xnr table. */ 41/* Number of elements in the xnr table. */
42#define IA_CSS_VAMEM_1_XNR_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2) 42#define IA_CSS_VAMEM_1_XNR_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2)
43 43
44/** Number of elements in the xnr table. */ 44/* Number of elements in the xnr table. */
45#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2 6 45#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2 6
46/** Number of elements in the xnr table. */ 46/* Number of elements in the xnr table. */
47#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE (1U<<IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2) 47#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE (1U<<IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2)
48 48
49/**< IA_CSS_VAMEM_TYPE_1(ISP2300) or 49/** IA_CSS_VAMEM_TYPE_1(ISP2300) or
50 IA_CSS_VAMEM_TYPE_2(ISP2400) */ 50 IA_CSS_VAMEM_TYPE_2(ISP2400) */
51union ia_css_xnr_data { 51union ia_css_xnr_data {
52 uint16_t vamem_1[IA_CSS_VAMEM_1_XNR_TABLE_SIZE]; 52 uint16_t vamem_1[IA_CSS_VAMEM_1_XNR_TABLE_SIZE];
53 /**< Coefficients table on vamem type1. u0.12, [0,4095] */ 53 /** Coefficients table on vamem type1. u0.12, [0,4095] */
54 uint16_t vamem_2[IA_CSS_VAMEM_2_XNR_TABLE_SIZE]; 54 uint16_t vamem_2[IA_CSS_VAMEM_2_XNR_TABLE_SIZE];
55 /**< Coefficients table on vamem type2. u0.12, [0,4095] */ 55 /** Coefficients table on vamem type2. u0.12, [0,4095] */
56}; 56};
57 57
58struct ia_css_xnr_table { 58struct ia_css_xnr_table {
@@ -61,7 +61,7 @@ struct ia_css_xnr_table {
61}; 61};
62 62
63struct ia_css_xnr_config { 63struct ia_css_xnr_config {
64 /** XNR threshold. 64 /* XNR threshold.
65 * type:u0.16 valid range:[0,65535] 65 * type:u0.16 valid range:[0,65535]
66 * default: 6400 */ 66 * default: 6400 */
67 uint16_t threshold; 67 uint16_t threshold;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h
index 8f14d1080651..669200caf72e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h
@@ -15,7 +15,7 @@
15#ifndef __IA_CSS_XNR3_TYPES_H 15#ifndef __IA_CSS_XNR3_TYPES_H
16#define __IA_CSS_XNR3_TYPES_H 16#define __IA_CSS_XNR3_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Extra Noise Reduction (XNR) parameters. 19* CSS-API header file for Extra Noise Reduction (XNR) parameters.
20*/ 20*/
21 21
@@ -47,12 +47,12 @@
47 * IA_CSS_XNR3_SIGMA_SCALE. 47 * IA_CSS_XNR3_SIGMA_SCALE.
48 */ 48 */
49struct ia_css_xnr3_sigma_params { 49struct ia_css_xnr3_sigma_params {
50 int y0; /**< Sigma for Y range similarity in dark area */ 50 int y0; /** Sigma for Y range similarity in dark area */
51 int y1; /**< Sigma for Y range similarity in bright area */ 51 int y1; /** Sigma for Y range similarity in bright area */
52 int u0; /**< Sigma for U range similarity in dark area */ 52 int u0; /** Sigma for U range similarity in dark area */
53 int u1; /**< Sigma for U range similarity in bright area */ 53 int u1; /** Sigma for U range similarity in bright area */
54 int v0; /**< Sigma for V range similarity in dark area */ 54 int v0; /** Sigma for V range similarity in dark area */
55 int v1; /**< Sigma for V range similarity in bright area */ 55 int v1; /** Sigma for V range similarity in bright area */
56}; 56};
57 57
58/** 58/**
@@ -64,10 +64,10 @@ struct ia_css_xnr3_sigma_params {
64 * with IA_CSS_XNR3_CORING_SCALE. The ineffective value is 0. 64 * with IA_CSS_XNR3_CORING_SCALE. The ineffective value is 0.
65 */ 65 */
66struct ia_css_xnr3_coring_params { 66struct ia_css_xnr3_coring_params {
67 int u0; /**< Coring threshold of U channel in dark area */ 67 int u0; /** Coring threshold of U channel in dark area */
68 int u1; /**< Coring threshold of U channel in bright area */ 68 int u1; /** Coring threshold of U channel in bright area */
69 int v0; /**< Coring threshold of V channel in dark area */ 69 int v0; /** Coring threshold of V channel in dark area */
70 int v1; /**< Coring threshold of V channel in bright area */ 70 int v1; /** Coring threshold of V channel in bright area */
71}; 71};
72 72
73/** 73/**
@@ -81,7 +81,7 @@ struct ia_css_xnr3_coring_params {
81 * value of 0.0 bypasses the entire xnr3 filter. 81 * value of 0.0 bypasses the entire xnr3 filter.
82 */ 82 */
83struct ia_css_xnr3_blending_params { 83struct ia_css_xnr3_blending_params {
84 int strength; /**< Blending strength */ 84 int strength; /** Blending strength */
85}; 85};
86 86
87/** 87/**
@@ -90,9 +90,9 @@ struct ia_css_xnr3_blending_params {
90 * from the CSS API. 90 * from the CSS API.
91 */ 91 */
92struct ia_css_xnr3_config { 92struct ia_css_xnr3_config {
93 struct ia_css_xnr3_sigma_params sigma; /**< XNR3 sigma parameters */ 93 struct ia_css_xnr3_sigma_params sigma; /** XNR3 sigma parameters */
94 struct ia_css_xnr3_coring_params coring; /**< XNR3 coring parameters */ 94 struct ia_css_xnr3_coring_params coring; /** XNR3 coring parameters */
95 struct ia_css_xnr3_blending_params blending; /**< XNR3 blending parameters */ 95 struct ia_css_xnr3_blending_params blending; /** XNR3 blending parameters */
96}; 96};
97 97
98#endif /* __IA_CSS_XNR3_TYPES_H */ 98#endif /* __IA_CSS_XNR3_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h
index 3f46655bee57..3f8589a5a43a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_YNR_TYPES_H 15#ifndef __IA_CSS_YNR_TYPES_H
16#define __IA_CSS_YNR_TYPES_H 16#define __IA_CSS_YNR_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Noise Reduction (BNR) and YCC Noise Reduction (YNR,CNR). 19* CSS-API header file for Noise Reduction (BNR) and YCC Noise Reduction (YNR,CNR).
20*/ 20*/
21 21
22/** Configuration used by Bayer Noise Reduction (BNR) and 22/* Configuration used by Bayer Noise Reduction (BNR) and
23 * YCC Noise Reduction (YNR,CNR). 23 * YCC Noise Reduction (YNR,CNR).
24 * 24 *
25 * ISP block: BNR1, YNR1, CNR1 25 * ISP block: BNR1, YNR1, CNR1
@@ -28,28 +28,28 @@
28 * BNR1,YNR2,CNR2 are used for Still. 28 * BNR1,YNR2,CNR2 are used for Still.
29 */ 29 */
30struct ia_css_nr_config { 30struct ia_css_nr_config {
31 ia_css_u0_16 bnr_gain; /**< Strength of noise reduction (BNR). 31 ia_css_u0_16 bnr_gain; /** Strength of noise reduction (BNR).
32 u0.16, [0,65535], 32 u0.16, [0,65535],
33 default 14336(0.21875), ineffective 0 */ 33 default 14336(0.21875), ineffective 0 */
34 ia_css_u0_16 ynr_gain; /**< Strength of noise reduction (YNR). 34 ia_css_u0_16 ynr_gain; /** Strength of noise reduction (YNR).
35 u0.16, [0,65535], 35 u0.16, [0,65535],
36 default 14336(0.21875), ineffective 0 */ 36 default 14336(0.21875), ineffective 0 */
37 ia_css_u0_16 direction; /**< Sensitivity of edge (BNR). 37 ia_css_u0_16 direction; /** Sensitivity of edge (BNR).
38 u0.16, [0,65535], 38 u0.16, [0,65535],
39 default 512(0.0078125), ineffective 0 */ 39 default 512(0.0078125), ineffective 0 */
40 ia_css_u0_16 threshold_cb; /**< Coring threshold for Cb (CNR). 40 ia_css_u0_16 threshold_cb; /** Coring threshold for Cb (CNR).
41 This is the same as 41 This is the same as
42 de_config.c1_coring_threshold. 42 de_config.c1_coring_threshold.
43 u0.16, [0,65535], 43 u0.16, [0,65535],
44 default 0(0), ineffective 0 */ 44 default 0(0), ineffective 0 */
45 ia_css_u0_16 threshold_cr; /**< Coring threshold for Cr (CNR). 45 ia_css_u0_16 threshold_cr; /** Coring threshold for Cr (CNR).
46 This is the same as 46 This is the same as
47 de_config.c2_coring_threshold. 47 de_config.c2_coring_threshold.
48 u0.16, [0,65535], 48 u0.16, [0,65535],
49 default 0(0), ineffective 0 */ 49 default 0(0), ineffective 0 */
50}; 50};
51 51
52/** Edge Enhancement (sharpen) configuration. 52/* Edge Enhancement (sharpen) configuration.
53 * 53 *
54 * ISP block: YEE1 54 * ISP block: YEE1
55 * ISP1: YEE1 is used. 55 * ISP1: YEE1 is used.
@@ -57,24 +57,24 @@ struct ia_css_nr_config {
57 * (YEE2 is used for Still.) 57 * (YEE2 is used for Still.)
58 */ 58 */
59struct ia_css_ee_config { 59struct ia_css_ee_config {
60 ia_css_u5_11 gain; /**< The strength of sharpness. 60 ia_css_u5_11 gain; /** The strength of sharpness.
61 u5.11, [0,65535], 61 u5.11, [0,65535],
62 default 8192(4.0), ineffective 0 */ 62 default 8192(4.0), ineffective 0 */
63 ia_css_u8_8 threshold; /**< The threshold that divides noises from 63 ia_css_u8_8 threshold; /** The threshold that divides noises from
64 edge. 64 edge.
65 u8.8, [0,65535], 65 u8.8, [0,65535],
66 default 256(1.0), ineffective 65535 */ 66 default 256(1.0), ineffective 65535 */
67 ia_css_u5_11 detail_gain; /**< The strength of sharpness in pell-mell 67 ia_css_u5_11 detail_gain; /** The strength of sharpness in pell-mell
68 area. 68 area.
69 u5.11, [0,65535], 69 u5.11, [0,65535],
70 default 2048(1.0), ineffective 0 */ 70 default 2048(1.0), ineffective 0 */
71}; 71};
72 72
73/** YNR and YEE (sharpen) configuration. 73/* YNR and YEE (sharpen) configuration.
74 */ 74 */
75struct ia_css_yee_config { 75struct ia_css_yee_config {
76 struct ia_css_nr_config nr; /**< The NR configuration. */ 76 struct ia_css_nr_config nr; /** The NR configuration. */
77 struct ia_css_ee_config ee; /**< The EE configuration. */ 77 struct ia_css_ee_config ee; /** The EE configuration. */
78}; 78};
79 79
80#endif /* __IA_CSS_YNR_TYPES_H */ 80#endif /* __IA_CSS_YNR_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h
index e0a0b10ac5fa..83161a24207d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h
@@ -15,11 +15,11 @@
15#ifndef __IA_CSS_YNR2_TYPES_H 15#ifndef __IA_CSS_YNR2_TYPES_H
16#define __IA_CSS_YNR2_TYPES_H 16#define __IA_CSS_YNR2_TYPES_H
17 17
18/** @file 18/* @file
19* CSS-API header file for Y(Luma) Noise Reduction. 19* CSS-API header file for Y(Luma) Noise Reduction.
20*/ 20*/
21 21
22/** Y(Luma) Noise Reduction configuration. 22/* Y(Luma) Noise Reduction configuration.
23 * 23 *
24 * ISP block: YNR2 & YEE2 24 * ISP block: YNR2 & YEE2
25 * (ISP1: YNR1 and YEE1 are used.) 25 * (ISP1: YNR1 and YEE1 are used.)
@@ -27,21 +27,21 @@
27 * ISP2: YNR2 and YEE2 are used for Still. 27 * ISP2: YNR2 and YEE2 are used for Still.
28 */ 28 */
29struct ia_css_ynr_config { 29struct ia_css_ynr_config {
30 uint16_t edge_sense_gain_0; /**< Sensitivity of edge in dark area. 30 uint16_t edge_sense_gain_0; /** Sensitivity of edge in dark area.
31 u13.0, [0,8191], 31 u13.0, [0,8191],
32 default 1000, ineffective 0 */ 32 default 1000, ineffective 0 */
33 uint16_t edge_sense_gain_1; /**< Sensitivity of edge in bright area. 33 uint16_t edge_sense_gain_1; /** Sensitivity of edge in bright area.
34 u13.0, [0,8191], 34 u13.0, [0,8191],
35 default 1000, ineffective 0 */ 35 default 1000, ineffective 0 */
36 uint16_t corner_sense_gain_0; /**< Sensitivity of corner in dark area. 36 uint16_t corner_sense_gain_0; /** Sensitivity of corner in dark area.
37 u13.0, [0,8191], 37 u13.0, [0,8191],
38 default 1000, ineffective 0 */ 38 default 1000, ineffective 0 */
39 uint16_t corner_sense_gain_1; /**< Sensitivity of corner in bright area. 39 uint16_t corner_sense_gain_1; /** Sensitivity of corner in bright area.
40 u13.0, [0,8191], 40 u13.0, [0,8191],
41 default 1000, ineffective 0 */ 41 default 1000, ineffective 0 */
42}; 42};
43 43
44/** Fringe Control configuration. 44/* Fringe Control configuration.
45 * 45 *
46 * ISP block: FC2 (FC2 is used with YNR2/YEE2.) 46 * ISP block: FC2 (FC2 is used with YNR2/YEE2.)
47 * (ISP1: FC2 is not used.) 47 * (ISP1: FC2 is not used.)
@@ -49,43 +49,43 @@ struct ia_css_ynr_config {
49 * ISP2: FC2 is used for Still. 49 * ISP2: FC2 is used for Still.
50 */ 50 */
51struct ia_css_fc_config { 51struct ia_css_fc_config {
52 uint8_t gain_exp; /**< Common exponent of gains. 52 uint8_t gain_exp; /** Common exponent of gains.
53 u8.0, [0,13], 53 u8.0, [0,13],
54 default 1, ineffective 0 */ 54 default 1, ineffective 0 */
55 uint16_t coring_pos_0; /**< Coring threshold for positive edge in dark area. 55 uint16_t coring_pos_0; /** Coring threshold for positive edge in dark area.
56 u0.13, [0,8191], 56 u0.13, [0,8191],
57 default 0(0), ineffective 0 */ 57 default 0(0), ineffective 0 */
58 uint16_t coring_pos_1; /**< Coring threshold for positive edge in bright area. 58 uint16_t coring_pos_1; /** Coring threshold for positive edge in bright area.
59 u0.13, [0,8191], 59 u0.13, [0,8191],
60 default 0(0), ineffective 0 */ 60 default 0(0), ineffective 0 */
61 uint16_t coring_neg_0; /**< Coring threshold for negative edge in dark area. 61 uint16_t coring_neg_0; /** Coring threshold for negative edge in dark area.
62 u0.13, [0,8191], 62 u0.13, [0,8191],
63 default 0(0), ineffective 0 */ 63 default 0(0), ineffective 0 */
64 uint16_t coring_neg_1; /**< Coring threshold for negative edge in bright area. 64 uint16_t coring_neg_1; /** Coring threshold for negative edge in bright area.
65 u0.13, [0,8191], 65 u0.13, [0,8191],
66 default 0(0), ineffective 0 */ 66 default 0(0), ineffective 0 */
67 uint16_t gain_pos_0; /**< Gain for positive edge in dark area. 67 uint16_t gain_pos_0; /** Gain for positive edge in dark area.
68 u0.13, [0,8191], 68 u0.13, [0,8191],
69 default 4096(0.5), ineffective 0 */ 69 default 4096(0.5), ineffective 0 */
70 uint16_t gain_pos_1; /**< Gain for positive edge in bright area. 70 uint16_t gain_pos_1; /** Gain for positive edge in bright area.
71 u0.13, [0,8191], 71 u0.13, [0,8191],
72 default 4096(0.5), ineffective 0 */ 72 default 4096(0.5), ineffective 0 */
73 uint16_t gain_neg_0; /**< Gain for negative edge in dark area. 73 uint16_t gain_neg_0; /** Gain for negative edge in dark area.
74 u0.13, [0,8191], 74 u0.13, [0,8191],
75 default 4096(0.5), ineffective 0 */ 75 default 4096(0.5), ineffective 0 */
76 uint16_t gain_neg_1; /**< Gain for negative edge in bright area. 76 uint16_t gain_neg_1; /** Gain for negative edge in bright area.
77 u0.13, [0,8191], 77 u0.13, [0,8191],
78 default 4096(0.5), ineffective 0 */ 78 default 4096(0.5), ineffective 0 */
79 uint16_t crop_pos_0; /**< Limit for positive edge in dark area. 79 uint16_t crop_pos_0; /** Limit for positive edge in dark area.
80 u0.13, [0,8191], 80 u0.13, [0,8191],
81 default/ineffective 8191(almost 1.0) */ 81 default/ineffective 8191(almost 1.0) */
82 uint16_t crop_pos_1; /**< Limit for positive edge in bright area. 82 uint16_t crop_pos_1; /** Limit for positive edge in bright area.
83 u0.13, [0,8191], 83 u0.13, [0,8191],
84 default/ineffective 8191(almost 1.0) */ 84 default/ineffective 8191(almost 1.0) */
85 int16_t crop_neg_0; /**< Limit for negative edge in dark area. 85 int16_t crop_neg_0; /** Limit for negative edge in dark area.
86 s0.13, [-8192,0], 86 s0.13, [-8192,0],
87 default/ineffective -8192(-1.0) */ 87 default/ineffective -8192(-1.0) */
88 int16_t crop_neg_1; /**< Limit for negative edge in bright area. 88 int16_t crop_neg_1; /** Limit for negative edge in bright area.
89 s0.13, [-8192,0], 89 s0.13, [-8192,0],
90 default/ineffective -8192(-1.0) */ 90 default/ineffective -8192(-1.0) */
91}; 91};
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h
index 63a8703c9c44..c9ff0cb2493a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h
@@ -24,7 +24,7 @@
24 */ 24 */
25#define NUM_YUV_LS 2 25#define NUM_YUV_LS 2
26 26
27/** YUV load/store */ 27/* YUV load/store */
28struct sh_css_isp_yuv_ls_isp_config { 28struct sh_css_isp_yuv_ls_isp_config {
29 unsigned base_address[NUM_YUV_LS]; 29 unsigned base_address[NUM_YUV_LS];
30 unsigned width[NUM_YUV_LS]; 30 unsigned width[NUM_YUV_LS];
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/memory_realloc.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/memory_realloc.c
index e814f1bf19f7..6512a1ceb9d3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/memory_realloc.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/memory_realloc.c
@@ -1,4 +1,4 @@
1/** 1/*
2Support for Intel Camera Imaging ISP subsystem. 2Support for Intel Camera Imaging ISP subsystem.
3Copyright (c) 2010 - 2015, Intel Corporation. 3Copyright (c) 2010 - 2015, Intel Corporation.
4 4
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
index c65194619a34..5a58abe2b233 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
@@ -269,7 +269,7 @@ enum ia_css_err
269ia_css_binary_find(struct ia_css_binary_descr *descr, 269ia_css_binary_find(struct ia_css_binary_descr *descr,
270 struct ia_css_binary *binary); 270 struct ia_css_binary *binary);
271 271
272/** @brief Get the shading information of the specified shading correction type. 272/* @brief Get the shading information of the specified shading correction type.
273 * 273 *
274 * @param[in] binary: The isp binary which has the shading correction. 274 * @param[in] binary: The isp binary which has the shading correction.
275 * @param[in] type: The shading correction type. 275 * @param[in] type: The shading correction type.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
index e028e460ae4c..295e07049393 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
@@ -972,7 +972,7 @@ ia_css_binary_uninit(void)
972 return IA_CSS_SUCCESS; 972 return IA_CSS_SUCCESS;
973} 973}
974 974
975/** @brief Compute decimation factor for 3A statistics and shading correction. 975/* @brief Compute decimation factor for 3A statistics and shading correction.
976 * 976 *
977 * @param[in] width Frame width in pixels. 977 * @param[in] width Frame width in pixels.
978 * @param[in] height Frame height in pixels. 978 * @param[in] height Frame height in pixels.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c
index 42d9a8508858..e50d9f2e2609 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c
@@ -152,7 +152,7 @@ void ia_css_queue_map(
152 unmap_buffer_type_to_queue_id(thread_id, buf_type); 152 unmap_buffer_type_to_queue_id(thread_id, buf_type);
153} 153}
154 154
155/** 155/*
156 * @brief Query the internal queue ID. 156 * @brief Query the internal queue ID.
157 */ 157 */
158bool ia_css_query_internal_queue_id( 158bool ia_css_query_internal_queue_id(
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h
index 3c8dcfd4bbc6..4b28b2a0863a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h
@@ -54,21 +54,21 @@ extern unsigned int ia_css_debug_trace_level;
54 * Values can be combined to dump a combination of sets. 54 * Values can be combined to dump a combination of sets.
55 */ 55 */
56enum ia_css_debug_enable_param_dump { 56enum ia_css_debug_enable_param_dump {
57 IA_CSS_DEBUG_DUMP_FPN = 1 << 0, /**< FPN table */ 57 IA_CSS_DEBUG_DUMP_FPN = 1 << 0, /** FPN table */
58 IA_CSS_DEBUG_DUMP_OB = 1 << 1, /**< OB table */ 58 IA_CSS_DEBUG_DUMP_OB = 1 << 1, /** OB table */
59 IA_CSS_DEBUG_DUMP_SC = 1 << 2, /**< Shading table */ 59 IA_CSS_DEBUG_DUMP_SC = 1 << 2, /** Shading table */
60 IA_CSS_DEBUG_DUMP_WB = 1 << 3, /**< White balance */ 60 IA_CSS_DEBUG_DUMP_WB = 1 << 3, /** White balance */
61 IA_CSS_DEBUG_DUMP_DP = 1 << 4, /**< Defect Pixel */ 61 IA_CSS_DEBUG_DUMP_DP = 1 << 4, /** Defect Pixel */
62 IA_CSS_DEBUG_DUMP_BNR = 1 << 5, /**< Bayer Noise Reductions */ 62 IA_CSS_DEBUG_DUMP_BNR = 1 << 5, /** Bayer Noise Reductions */
63 IA_CSS_DEBUG_DUMP_S3A = 1 << 6, /**< 3A Statistics */ 63 IA_CSS_DEBUG_DUMP_S3A = 1 << 6, /** 3A Statistics */
64 IA_CSS_DEBUG_DUMP_DE = 1 << 7, /**< De Mosaicing */ 64 IA_CSS_DEBUG_DUMP_DE = 1 << 7, /** De Mosaicing */
65 IA_CSS_DEBUG_DUMP_YNR = 1 << 8, /**< Luma Noise Reduction */ 65 IA_CSS_DEBUG_DUMP_YNR = 1 << 8, /** Luma Noise Reduction */
66 IA_CSS_DEBUG_DUMP_CSC = 1 << 9, /**< Color Space Conversion */ 66 IA_CSS_DEBUG_DUMP_CSC = 1 << 9, /** Color Space Conversion */
67 IA_CSS_DEBUG_DUMP_GC = 1 << 10, /**< Gamma Correction */ 67 IA_CSS_DEBUG_DUMP_GC = 1 << 10, /** Gamma Correction */
68 IA_CSS_DEBUG_DUMP_TNR = 1 << 11, /**< Temporal Noise Reduction */ 68 IA_CSS_DEBUG_DUMP_TNR = 1 << 11, /** Temporal Noise Reduction */
69 IA_CSS_DEBUG_DUMP_ANR = 1 << 12, /**< Advanced Noise Reduction */ 69 IA_CSS_DEBUG_DUMP_ANR = 1 << 12, /** Advanced Noise Reduction */
70 IA_CSS_DEBUG_DUMP_CE = 1 << 13, /**< Chroma Enhancement */ 70 IA_CSS_DEBUG_DUMP_CE = 1 << 13, /** Chroma Enhancement */
71 IA_CSS_DEBUG_DUMP_ALL = 1 << 14 /**< Dump all device parameters */ 71 IA_CSS_DEBUG_DUMP_ALL = 1 << 14 /** Dump all device parameters */
72}; 72};
73 73
74#define IA_CSS_ERROR(fmt, ...) \ 74#define IA_CSS_ERROR(fmt, ...) \
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
index 0fa7cb2423d8..dd1127a21494 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
@@ -1617,7 +1617,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
1617 1617
1618#elif SP_DEBUG == SP_DEBUG_TRACE 1618#elif SP_DEBUG == SP_DEBUG_TRACE
1619 1619
1620/** 1620/*
1621 * This is just an example how TRACE_FILE_ID (see ia_css_debug.sp.h) will 1621 * This is just an example how TRACE_FILE_ID (see ia_css_debug.sp.h) will
1622 * me mapped on the file name string. 1622 * me mapped on the file name string.
1623 * 1623 *
@@ -2267,7 +2267,7 @@ void ia_css_debug_dump_debug_info(const char *context)
2267 return; 2267 return;
2268} 2268}
2269 2269
2270/** this function is for debug use, it can make SP go to sleep 2270/* this function is for debug use, it can make SP go to sleep
2271 state after each frame, then user can dump the stable SP dmem. 2271 state after each frame, then user can dump the stable SP dmem.
2272 this function can be called after ia_css_start_sp() 2272 this function can be called after ia_css_start_sp()
2273 and before sh_css_init_buffer_queues() 2273 and before sh_css_init_buffer_queues()
@@ -2526,7 +2526,7 @@ void ia_css_debug_dump_ddr_debug_queue(void)
2526} 2526}
2527*/ 2527*/
2528 2528
2529/** 2529/*
2530 * @brief Initialize the debug mode. 2530 * @brief Initialize the debug mode.
2531 * Refer to "ia_css_debug.h" for more details. 2531 * Refer to "ia_css_debug.h" for more details.
2532 */ 2532 */
@@ -2537,7 +2537,7 @@ bool ia_css_debug_mode_init(void)
2537 return rc; 2537 return rc;
2538} 2538}
2539 2539
2540/** 2540/*
2541 * @brief Disable the DMA channel. 2541 * @brief Disable the DMA channel.
2542 * Refer to "ia_css_debug.h" for more details. 2542 * Refer to "ia_css_debug.h" for more details.
2543 */ 2543 */
@@ -2552,7 +2552,7 @@ ia_css_debug_mode_disable_dma_channel(int dma_id,
2552 return rc; 2552 return rc;
2553} 2553}
2554 2554
2555/** 2555/*
2556 * @brief Enable the DMA channel. 2556 * @brief Enable the DMA channel.
2557 * Refer to "ia_css_debug.h" for more details. 2557 * Refer to "ia_css_debug.h" for more details.
2558 */ 2558 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/src/event.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/src/event.c
index 2698c3e1adb0..239c06730bf4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/src/event.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/src/event.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
@@ -52,7 +52,7 @@ more details.
52 52
53#include "ia_css_queue.h" /* host_sp_enqueue_XXX */ 53#include "ia_css_queue.h" /* host_sp_enqueue_XXX */
54#include "ia_css_event.h" /* ia_css_event_encode */ 54#include "ia_css_event.h" /* ia_css_event_encode */
55/** 55/*
56 * @brief Encode the information into the software-event. 56 * @brief Encode the information into the software-event.
57 * Refer to "sw_event_public.h" for details. 57 * Refer to "sw_event_public.h" for details.
58 */ 58 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/src/eventq.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/src/eventq.c
index 56d6858890ec..913a4bf7a34f 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/src/eventq.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/src/eventq.c
@@ -37,7 +37,7 @@ int ia_css_eventq_recv(
37 return error; 37 return error;
38} 38}
39 39
40/** 40/*
41 * @brief The Host sends the event to the SP. 41 * @brief The Host sends the event to the SP.
42 * Refer to "sh_css_sp.h" for details. 42 * Refer to "sh_css_sp.h" for details.
43 */ 43 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame.h
index c7e07b79f4e5..89ad8080ceb1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame.h
@@ -41,7 +41,7 @@ more details.
41/********************************************************************* 41/*********************************************************************
42**** Frame INFO APIs 42**** Frame INFO APIs
43**********************************************************************/ 43**********************************************************************/
44/** @brief Sets the given width and alignment to the frame info 44/* @brief Sets the given width and alignment to the frame info
45 * 45 *
46 * @param 46 * @param
47 * @param[in] info The info to which parameters would set 47 * @param[in] info The info to which parameters would set
@@ -53,7 +53,7 @@ void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
53 unsigned int width, 53 unsigned int width,
54 unsigned int min_padded_width); 54 unsigned int min_padded_width);
55 55
56/** @brief Sets the given format to the frame info 56/* @brief Sets the given format to the frame info
57 * 57 *
58 * @param 58 * @param
59 * @param[in] info The info to which parameters would set 59 * @param[in] info The info to which parameters would set
@@ -63,7 +63,7 @@ void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
63void ia_css_frame_info_set_format(struct ia_css_frame_info *info, 63void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
64 enum ia_css_frame_format format); 64 enum ia_css_frame_format format);
65 65
66/** @brief Sets the frame info with the given parameters 66/* @brief Sets the frame info with the given parameters
67 * 67 *
68 * @param 68 * @param
69 * @param[in] info The info to which parameters would set 69 * @param[in] info The info to which parameters would set
@@ -79,7 +79,7 @@ void ia_css_frame_info_init(struct ia_css_frame_info *info,
79 enum ia_css_frame_format format, 79 enum ia_css_frame_format format,
80 unsigned int aligned); 80 unsigned int aligned);
81 81
82/** @brief Checks whether 2 frame infos has the same resolution 82/* @brief Checks whether 2 frame infos has the same resolution
83 * 83 *
84 * @param 84 * @param
85 * @param[in] frame_a The first frame to be compared 85 * @param[in] frame_a The first frame to be compared
@@ -90,7 +90,7 @@ bool ia_css_frame_info_is_same_resolution(
90 const struct ia_css_frame_info *info_a, 90 const struct ia_css_frame_info *info_a,
91 const struct ia_css_frame_info *info_b); 91 const struct ia_css_frame_info *info_b);
92 92
93/** @brief Check the frame info is valid 93/* @brief Check the frame info is valid
94 * 94 *
95 * @param 95 * @param
96 * @param[in] info The frame attributes to be initialized 96 * @param[in] info The frame attributes to be initialized
@@ -102,7 +102,7 @@ enum ia_css_err ia_css_frame_check_info(const struct ia_css_frame_info *info);
102**** Frame APIs 102**** Frame APIs
103**********************************************************************/ 103**********************************************************************/
104 104
105/** @brief Initialize the plane depending on the frame type 105/* @brief Initialize the plane depending on the frame type
106 * 106 *
107 * @param 107 * @param
108 * @param[in] frame The frame attributes to be initialized 108 * @param[in] frame The frame attributes to be initialized
@@ -110,7 +110,7 @@ enum ia_css_err ia_css_frame_check_info(const struct ia_css_frame_info *info);
110 */ 110 */
111enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame); 111enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame);
112 112
113/** @brief Free an array of frames 113/* @brief Free an array of frames
114 * 114 *
115 * @param 115 * @param
116 * @param[in] num_frames The number of frames to be freed in the array 116 * @param[in] num_frames The number of frames to be freed in the array
@@ -120,7 +120,7 @@ enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame);
120void ia_css_frame_free_multiple(unsigned int num_frames, 120void ia_css_frame_free_multiple(unsigned int num_frames,
121 struct ia_css_frame **frames_array); 121 struct ia_css_frame **frames_array);
122 122
123/** @brief Allocate a CSS frame structure of given size in bytes.. 123/* @brief Allocate a CSS frame structure of given size in bytes..
124 * 124 *
125 * @param frame The allocated frame. 125 * @param frame The allocated frame.
126 * @param[in] size_bytes The frame size in bytes. 126 * @param[in] size_bytes The frame size in bytes.
@@ -135,7 +135,7 @@ enum ia_css_err ia_css_frame_allocate_with_buffer_size(
135 const unsigned int size_bytes, 135 const unsigned int size_bytes,
136 const bool contiguous); 136 const bool contiguous);
137 137
138/** @brief Check whether 2 frames are same type 138/* @brief Check whether 2 frames are same type
139 * 139 *
140 * @param 140 * @param
141 * @param[in] frame_a The first frame to be compared 141 * @param[in] frame_a The first frame to be compared
@@ -146,7 +146,7 @@ bool ia_css_frame_is_same_type(
146 const struct ia_css_frame *frame_a, 146 const struct ia_css_frame *frame_a,
147 const struct ia_css_frame *frame_b); 147 const struct ia_css_frame *frame_b);
148 148
149/** @brief Configure a dma port from frame info 149/* @brief Configure a dma port from frame info
150 * 150 *
151 * @param 151 * @param
152 * @param[in] config The DAM port configuration 152 * @param[in] config The DAM port configuration
@@ -158,7 +158,7 @@ void ia_css_dma_configure_from_info(
158 const struct ia_css_frame_info *info); 158 const struct ia_css_frame_info *info);
159 159
160#ifdef ISP2401 160#ifdef ISP2401
161/** @brief Finds the cropping resolution 161/* @brief Finds the cropping resolution
162 * This function finds the maximum cropping resolution in an input image keeping 162 * This function finds the maximum cropping resolution in an input image keeping
163 * the aspect ratio for the given output resolution.Calculates the coordinates 163 * the aspect ratio for the given output resolution.Calculates the coordinates
164 * for cropping from the center and returns the starting pixel location of the 164 * for cropping from the center and returns the starting pixel location of the
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
index f1a943cf04c0..5faa89ad8a23 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c
index 11d3995ba0db..adefa57820a4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c
index d9a5f3e9283a..8dc74927e9a2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
index 8e651b80345a..2283dd1c1c9b 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
@@ -53,7 +53,7 @@ enum ia_css_param_class {
53}; 53};
54#define IA_CSS_NUM_PARAM_CLASSES (IA_CSS_PARAM_CLASS_STATE + 1) 54#define IA_CSS_NUM_PARAM_CLASSES (IA_CSS_PARAM_CLASS_STATE + 1)
55 55
56/** ISP parameter descriptor */ 56/* ISP parameter descriptor */
57struct ia_css_isp_parameter { 57struct ia_css_isp_parameter {
58 uint32_t offset; /* Offset in isp_<mem>)parameters, etc. */ 58 uint32_t offset; /* Offset in isp_<mem>)parameters, etc. */
59 uint32_t size; /* Disabled if 0 */ 59 uint32_t size; /* Disabled if 0 */
@@ -77,10 +77,10 @@ struct ia_css_isp_param_isp_segments {
77 77
78/* Memory offsets in binary info */ 78/* Memory offsets in binary info */
79struct ia_css_isp_param_memory_offsets { 79struct ia_css_isp_param_memory_offsets {
80 uint32_t offsets[IA_CSS_NUM_PARAM_CLASSES]; /**< offset wrt hdr in bytes */ 80 uint32_t offsets[IA_CSS_NUM_PARAM_CLASSES]; /** offset wrt hdr in bytes */
81}; 81};
82 82
83/** Offsets for ISP kernel parameters per isp memory. 83/* Offsets for ISP kernel parameters per isp memory.
84 * Only relevant for standard ISP binaries, not ACC or SP. 84 * Only relevant for standard ISP binaries, not ACC or SP.
85 */ 85 */
86union ia_css_all_memory_offsets { 86union ia_css_all_memory_offsets {
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c
index 832d9e16edeb..f793ce125f02 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h
index 02bf908d94e6..4cf2defe9ef0 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h
@@ -44,7 +44,7 @@ more details.
44 * Virtual Input System. (Input System 2401) 44 * Virtual Input System. (Input System 2401)
45 */ 45 */
46typedef input_system_cfg_t ia_css_isys_descr_t; 46typedef input_system_cfg_t ia_css_isys_descr_t;
47/** end of Virtual Input System */ 47/* end of Virtual Input System */
48#endif 48#endif
49 49
50#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) 50#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
@@ -112,7 +112,7 @@ unsigned int ia_css_isys_rx_translate_irq_infos(unsigned int bits);
112 112
113#endif /* #if !defined(USE_INPUT_SYSTEM_VERSION_2401) */ 113#endif /* #if !defined(USE_INPUT_SYSTEM_VERSION_2401) */
114 114
115/** @brief Translate format and compression to format type. 115/* @brief Translate format and compression to format type.
116 * 116 *
117 * @param[in] input_format The input format. 117 * @param[in] input_format The input format.
118 * @param[in] compression The compression scheme. 118 * @param[in] compression The compression scheme.
@@ -195,7 +195,7 @@ extern void ia_css_isys_stream2mmio_sid_rmgr_release(
195 stream2mmio_ID_t stream2mmio, 195 stream2mmio_ID_t stream2mmio,
196 stream2mmio_sid_ID_t *sid); 196 stream2mmio_sid_ID_t *sid);
197 197
198/** end of Virtual Input System */ 198/* end of Virtual Input System */
199#endif 199#endif
200 200
201#endif /* __IA_CSS_ISYS_H__ */ 201#endif /* __IA_CSS_ISYS_H__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c
index d1d4f79c00f1..3b04dc51335a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c
index faef97672eac..d8c3b75d7fac 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17 * Support for Intel Camera Imaging ISP subsystem. 17 * Support for Intel Camera Imaging ISP subsystem.
18 * Copyright (c) 2010 - 2015, Intel Corporation. 18 * Copyright (c) 2010 - 2015, Intel Corporation.
19 * 19 *
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c
index 5032627342d9..4def4a542b7d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c
index 239ef310bdeb..4122084fd237 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c
index a93c7f44ff12..222b294c0ab0 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c
index 46a157f64343..70f6cb5e5918 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c
index 0f1e8a2f6b10..90922a7acefd 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
@@ -166,7 +166,7 @@ static int32_t calculate_stride(
166 bool raw_packed, 166 bool raw_packed,
167 int32_t align_in_bytes); 167 int32_t align_in_bytes);
168 168
169/** end of Forwarded Declaration */ 169/* end of Forwarded Declaration */
170 170
171/************************************************** 171/**************************************************
172 * 172 *
@@ -292,7 +292,7 @@ ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
292 return rc; 292 return rc;
293} 293}
294 294
295/** end of Public Methods */ 295/* end of Public Methods */
296 296
297/************************************************** 297/**************************************************
298 * 298 *
@@ -894,5 +894,5 @@ static csi_mipi_packet_type_t get_csi_mipi_packet_type(
894 894
895 return packet_type; 895 return packet_type;
896} 896}
897/** end of Private Methods */ 897/* end of Private Methods */
898#endif 898#endif
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
index 90646f5f8885..e64936e2d46e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
@@ -103,7 +103,7 @@ struct ia_css_pipeline_stage_desc {
103 struct ia_css_frame *vf_frame; 103 struct ia_css_frame *vf_frame;
104}; 104};
105 105
106/** @brief initialize the pipeline module 106/* @brief initialize the pipeline module
107 * 107 *
108 * @return None 108 * @return None
109 * 109 *
@@ -112,7 +112,7 @@ struct ia_css_pipeline_stage_desc {
112 */ 112 */
113void ia_css_pipeline_init(void); 113void ia_css_pipeline_init(void);
114 114
115/** @brief initialize the pipeline structure with default values 115/* @brief initialize the pipeline structure with default values
116 * 116 *
117 * @param[out] pipeline structure to be initialized with defaults 117 * @param[out] pipeline structure to be initialized with defaults
118 * @param[in] pipe_id 118 * @param[in] pipe_id
@@ -129,7 +129,7 @@ enum ia_css_err ia_css_pipeline_create(
129 unsigned int pipe_num, 129 unsigned int pipe_num,
130 unsigned int dvs_frame_delay); 130 unsigned int dvs_frame_delay);
131 131
132/** @brief destroy a pipeline 132/* @brief destroy a pipeline
133 * 133 *
134 * @param[in] pipeline 134 * @param[in] pipeline
135 * @return None 135 * @return None
@@ -138,7 +138,7 @@ enum ia_css_err ia_css_pipeline_create(
138void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline); 138void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline);
139 139
140 140
141/** @brief Starts a pipeline 141/* @brief Starts a pipeline
142 * 142 *
143 * @param[in] pipe_id 143 * @param[in] pipe_id
144 * @param[in] pipeline 144 * @param[in] pipeline
@@ -148,7 +148,7 @@ void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline);
148void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id, 148void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
149 struct ia_css_pipeline *pipeline); 149 struct ia_css_pipeline *pipeline);
150 150
151/** @brief Request to stop a pipeline 151/* @brief Request to stop a pipeline
152 * 152 *
153 * @param[in] pipeline 153 * @param[in] pipeline
154 * @return IA_CSS_SUCCESS or error code upon error. 154 * @return IA_CSS_SUCCESS or error code upon error.
@@ -156,7 +156,7 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
156 */ 156 */
157enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline); 157enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline);
158 158
159/** @brief Check whether pipeline has stopped 159/* @brief Check whether pipeline has stopped
160 * 160 *
161 * @param[in] pipeline 161 * @param[in] pipeline
162 * @return true if the pipeline has stopped 162 * @return true if the pipeline has stopped
@@ -164,7 +164,7 @@ enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline);
164 */ 164 */
165bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipe); 165bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipe);
166 166
167/** @brief clean all the stages pipeline and make it as new 167/* @brief clean all the stages pipeline and make it as new
168 * 168 *
169 * @param[in] pipeline 169 * @param[in] pipeline
170 * @return None 170 * @return None
@@ -172,7 +172,7 @@ bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipe);
172 */ 172 */
173void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline); 173void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline);
174 174
175/** @brief Add a stage to pipeline. 175/* @brief Add a stage to pipeline.
176 * 176 *
177 * @param pipeline Pointer to the pipeline to be added to. 177 * @param pipeline Pointer to the pipeline to be added to.
178 * @param[in] stage_desc The description of the stage 178 * @param[in] stage_desc The description of the stage
@@ -188,7 +188,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
188 struct ia_css_pipeline_stage_desc *stage_desc, 188 struct ia_css_pipeline_stage_desc *stage_desc,
189 struct ia_css_pipeline_stage **stage); 189 struct ia_css_pipeline_stage **stage);
190 190
191/** @brief Finalize the stages in a pipeline 191/* @brief Finalize the stages in a pipeline
192 * 192 *
193 * @param pipeline Pointer to the pipeline to be added to. 193 * @param pipeline Pointer to the pipeline to be added to.
194 * @return None 194 * @return None
@@ -198,7 +198,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
198void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline, 198void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
199 bool continuous); 199 bool continuous);
200 200
201/** @brief gets a stage from the pipeline 201/* @brief gets a stage from the pipeline
202 * 202 *
203 * @param[in] pipeline 203 * @param[in] pipeline
204 * @return IA_CSS_SUCCESS or error code upon error. 204 * @return IA_CSS_SUCCESS or error code upon error.
@@ -208,7 +208,7 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
208 int mode, 208 int mode,
209 struct ia_css_pipeline_stage **stage); 209 struct ia_css_pipeline_stage **stage);
210 210
211/** @brief Gets a pipeline stage corresponding Firmware handle from the pipeline 211/* @brief Gets a pipeline stage corresponding Firmware handle from the pipeline
212 * 212 *
213 * @param[in] pipeline 213 * @param[in] pipeline
214 * @param[in] fw_handle 214 * @param[in] fw_handle
@@ -221,7 +221,7 @@ enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeli
221 uint32_t fw_handle, 221 uint32_t fw_handle,
222 struct ia_css_pipeline_stage **stage); 222 struct ia_css_pipeline_stage **stage);
223 223
224/** @brief Gets the Firmware handle correponding the stage num from the pipeline 224/* @brief Gets the Firmware handle correponding the stage num from the pipeline
225 * 225 *
226 * @param[in] pipeline 226 * @param[in] pipeline
227 * @param[in] stage_num 227 * @param[in] stage_num
@@ -234,7 +234,7 @@ enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeli
234 uint32_t stage_num, 234 uint32_t stage_num,
235 uint32_t *fw_handle); 235 uint32_t *fw_handle);
236 236
237/** @brief gets the output stage from the pipeline 237/* @brief gets the output stage from the pipeline
238 * 238 *
239 * @param[in] pipeline 239 * @param[in] pipeline
240 * @return IA_CSS_SUCCESS or error code upon error. 240 * @return IA_CSS_SUCCESS or error code upon error.
@@ -245,7 +245,7 @@ enum ia_css_err ia_css_pipeline_get_output_stage(
245 int mode, 245 int mode,
246 struct ia_css_pipeline_stage **stage); 246 struct ia_css_pipeline_stage **stage);
247 247
248/** @brief Checks whether the pipeline uses params 248/* @brief Checks whether the pipeline uses params
249 * 249 *
250 * @param[in] pipeline 250 * @param[in] pipeline
251 * @return true if the pipeline uses params 251 * @return true if the pipeline uses params
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
index 62d13978475d..8f93d29d1c51 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
@@ -114,7 +114,7 @@ void ia_css_pipeline_map(unsigned int pipe_num, bool map)
114 IA_CSS_LEAVE_PRIVATE("void"); 114 IA_CSS_LEAVE_PRIVATE("void");
115} 115}
116 116
117/** @brief destroy a pipeline 117/* @brief destroy a pipeline
118 * 118 *
119 * @param[in] pipeline 119 * @param[in] pipeline
120 * @return None 120 * @return None
@@ -187,7 +187,7 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
187 "ia_css_pipeline_start() leave: return_void\n"); 187 "ia_css_pipeline_start() leave: return_void\n");
188} 188}
189 189
190/** 190/*
191 * @brief Query the SP thread ID. 191 * @brief Query the SP thread ID.
192 * Refer to "sh_css_internal.h" for details. 192 * Refer to "sh_css_internal.h" for details.
193 */ 193 */
@@ -285,7 +285,7 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline)
285 IA_CSS_LEAVE_PRIVATE("void"); 285 IA_CSS_LEAVE_PRIVATE("void");
286} 286}
287 287
288/** @brief Add a stage to pipeline. 288/* @brief Add a stage to pipeline.
289 * 289 *
290 * @param pipeline Pointer to the pipeline to be added to. 290 * @param pipeline Pointer to the pipeline to be added to.
291 * @param[in] stage_desc The description of the stage 291 * @param[in] stage_desc The description of the stage
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h
index e50a0f813753..aaf2e247cafb 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h
@@ -51,7 +51,7 @@ typedef struct ia_css_queue ia_css_queue_t;
51/***************************************************************************** 51/*****************************************************************************
52 * Queue Public APIs 52 * Queue Public APIs
53 *****************************************************************************/ 53 *****************************************************************************/
54/** @brief Initialize a local queue instance. 54/* @brief Initialize a local queue instance.
55 * 55 *
56 * @param[out] qhandle. Handle to queue instance for use with API 56 * @param[out] qhandle. Handle to queue instance for use with API
57 * @param[in] desc. Descriptor with queue properties filled-in 57 * @param[in] desc. Descriptor with queue properties filled-in
@@ -63,7 +63,7 @@ extern int ia_css_queue_local_init(
63 ia_css_queue_t *qhandle, 63 ia_css_queue_t *qhandle,
64 ia_css_queue_local_t *desc); 64 ia_css_queue_local_t *desc);
65 65
66/** @brief Initialize a remote queue instance 66/* @brief Initialize a remote queue instance
67 * 67 *
68 * @param[out] qhandle. Handle to queue instance for use with API 68 * @param[out] qhandle. Handle to queue instance for use with API
69 * @param[in] desc. Descriptor with queue properties filled-in 69 * @param[in] desc. Descriptor with queue properties filled-in
@@ -74,7 +74,7 @@ extern int ia_css_queue_remote_init(
74 ia_css_queue_t *qhandle, 74 ia_css_queue_t *qhandle,
75 ia_css_queue_remote_t *desc); 75 ia_css_queue_remote_t *desc);
76 76
77/** @brief Uninitialize a queue instance 77/* @brief Uninitialize a queue instance
78 * 78 *
79 * @param[in] qhandle. Handle to queue instance 79 * @param[in] qhandle. Handle to queue instance
80 * @return 0 - Successful uninit. 80 * @return 0 - Successful uninit.
@@ -83,7 +83,7 @@ extern int ia_css_queue_remote_init(
83extern int ia_css_queue_uninit( 83extern int ia_css_queue_uninit(
84 ia_css_queue_t *qhandle); 84 ia_css_queue_t *qhandle);
85 85
86/** @brief Enqueue an item in the queue instance 86/* @brief Enqueue an item in the queue instance
87 * 87 *
88 * @param[in] qhandle. Handle to queue instance 88 * @param[in] qhandle. Handle to queue instance
89 * @param[in] item. Object to be enqueued. 89 * @param[in] item. Object to be enqueued.
@@ -96,7 +96,7 @@ extern int ia_css_queue_enqueue(
96 ia_css_queue_t *qhandle, 96 ia_css_queue_t *qhandle,
97 uint32_t item); 97 uint32_t item);
98 98
99/** @brief Dequeue an item from the queue instance 99/* @brief Dequeue an item from the queue instance
100 * 100 *
101 * @param[in] qhandle. Handle to queue instance 101 * @param[in] qhandle. Handle to queue instance
102 * @param[out] item. Object to be dequeued into this item. 102 * @param[out] item. Object to be dequeued into this item.
@@ -110,7 +110,7 @@ extern int ia_css_queue_dequeue(
110 ia_css_queue_t *qhandle, 110 ia_css_queue_t *qhandle,
111 uint32_t *item); 111 uint32_t *item);
112 112
113/** @brief Check if the queue is empty 113/* @brief Check if the queue is empty
114 * 114 *
115 * @param[in] qhandle. Handle to queue instance 115 * @param[in] qhandle. Handle to queue instance
116 * @param[in] is_empty True if empty, False if not. 116 * @param[in] is_empty True if empty, False if not.
@@ -123,7 +123,7 @@ extern int ia_css_queue_is_empty(
123 ia_css_queue_t *qhandle, 123 ia_css_queue_t *qhandle,
124 bool *is_empty); 124 bool *is_empty);
125 125
126/** @brief Check if the queue is full 126/* @brief Check if the queue is full
127 * 127 *
128 * @param[in] qhandle. Handle to queue instance 128 * @param[in] qhandle. Handle to queue instance
129 * @param[in] is_full True if Full, False if not. 129 * @param[in] is_full True if Full, False if not.
@@ -136,7 +136,7 @@ extern int ia_css_queue_is_full(
136 ia_css_queue_t *qhandle, 136 ia_css_queue_t *qhandle,
137 bool *is_full); 137 bool *is_full);
138 138
139/** @brief Get used space in the queue 139/* @brief Get used space in the queue
140 * 140 *
141 * @param[in] qhandle. Handle to queue instance 141 * @param[in] qhandle. Handle to queue instance
142 * @param[in] size Number of available elements in the queue 142 * @param[in] size Number of available elements in the queue
@@ -148,7 +148,7 @@ extern int ia_css_queue_get_used_space(
148 ia_css_queue_t *qhandle, 148 ia_css_queue_t *qhandle,
149 uint32_t *size); 149 uint32_t *size);
150 150
151/** @brief Get free space in the queue 151/* @brief Get free space in the queue
152 * 152 *
153 * @param[in] qhandle. Handle to queue instance 153 * @param[in] qhandle. Handle to queue instance
154 * @param[in] size Number of free elements in the queue 154 * @param[in] size Number of free elements in the queue
@@ -160,7 +160,7 @@ extern int ia_css_queue_get_free_space(
160 ia_css_queue_t *qhandle, 160 ia_css_queue_t *qhandle,
161 uint32_t *size); 161 uint32_t *size);
162 162
163/** @brief Peek at an element in the queue 163/* @brief Peek at an element in the queue
164 * 164 *
165 * @param[in] qhandle. Handle to queue instance 165 * @param[in] qhandle. Handle to queue instance
166 * @param[in] offset Offset of element to peek, 166 * @param[in] offset Offset of element to peek,
@@ -175,7 +175,7 @@ extern int ia_css_queue_peek(
175 uint32_t offset, 175 uint32_t offset,
176 uint32_t *element); 176 uint32_t *element);
177 177
178/** @brief Get the usable size for the queue 178/* @brief Get the usable size for the queue
179 * 179 *
180 * @param[in] qhandle. Handle to queue instance 180 * @param[in] qhandle. Handle to queue instance
181 * @param[out] size Size value to be returned here. 181 * @param[out] size Size value to be returned here.
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c
index 946d4f2d2108..7bb2b494836e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c
index efa9c140484f..370ff3816dbe 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
@@ -44,7 +44,7 @@ enum ia_css_err ia_css_rmgr_init(void)
44 return err; 44 return err;
45} 45}
46 46
47/** 47/*
48 * @brief Uninitialize resource pool (host) 48 * @brief Uninitialize resource pool (host)
49 */ 49 */
50void ia_css_rmgr_uninit(void) 50void ia_css_rmgr_uninit(void)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c
index e56006c07ee8..54239ac9d7c9 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c
@@ -20,13 +20,13 @@
20#include <memory_access.h> /* mmmgr_malloc, mhmm_free */ 20#include <memory_access.h> /* mmmgr_malloc, mhmm_free */
21#include <ia_css_debug.h> 21#include <ia_css_debug.h>
22 22
23/** 23/*
24 * @brief VBUF resource handles 24 * @brief VBUF resource handles
25 */ 25 */
26#define NUM_HANDLES 1000 26#define NUM_HANDLES 1000
27struct ia_css_rmgr_vbuf_handle handle_table[NUM_HANDLES]; 27struct ia_css_rmgr_vbuf_handle handle_table[NUM_HANDLES];
28 28
29/** 29/*
30 * @brief VBUF resource pool - refpool 30 * @brief VBUF resource pool - refpool
31 */ 31 */
32struct ia_css_rmgr_vbuf_pool refpool = { 32struct ia_css_rmgr_vbuf_pool refpool = {
@@ -37,7 +37,7 @@ struct ia_css_rmgr_vbuf_pool refpool = {
37 NULL, /* handles */ 37 NULL, /* handles */
38}; 38};
39 39
40/** 40/*
41 * @brief VBUF resource pool - writepool 41 * @brief VBUF resource pool - writepool
42 */ 42 */
43struct ia_css_rmgr_vbuf_pool writepool = { 43struct ia_css_rmgr_vbuf_pool writepool = {
@@ -48,7 +48,7 @@ struct ia_css_rmgr_vbuf_pool writepool = {
48 NULL, /* handles */ 48 NULL, /* handles */
49}; 49};
50 50
51/** 51/*
52 * @brief VBUF resource pool - hmmbufferpool 52 * @brief VBUF resource pool - hmmbufferpool
53 */ 53 */
54struct ia_css_rmgr_vbuf_pool hmmbufferpool = { 54struct ia_css_rmgr_vbuf_pool hmmbufferpool = {
@@ -63,7 +63,7 @@ struct ia_css_rmgr_vbuf_pool *vbuf_ref = &refpool;
63struct ia_css_rmgr_vbuf_pool *vbuf_write = &writepool; 63struct ia_css_rmgr_vbuf_pool *vbuf_write = &writepool;
64struct ia_css_rmgr_vbuf_pool *hmm_buffer_pool = &hmmbufferpool; 64struct ia_css_rmgr_vbuf_pool *hmm_buffer_pool = &hmmbufferpool;
65 65
66/** 66/*
67 * @brief Initialize the reference count (host, vbuf) 67 * @brief Initialize the reference count (host, vbuf)
68 */ 68 */
69static void rmgr_refcount_init_vbuf(void) 69static void rmgr_refcount_init_vbuf(void)
@@ -72,7 +72,7 @@ static void rmgr_refcount_init_vbuf(void)
72 memset(&handle_table, 0, sizeof(handle_table)); 72 memset(&handle_table, 0, sizeof(handle_table));
73} 73}
74 74
75/** 75/*
76 * @brief Retain the reference count for a handle (host, vbuf) 76 * @brief Retain the reference count for a handle (host, vbuf)
77 * 77 *
78 * @param handle The pointer to the handle 78 * @param handle The pointer to the handle
@@ -109,7 +109,7 @@ void ia_css_rmgr_refcount_retain_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
109 (*handle)->count++; 109 (*handle)->count++;
110} 110}
111 111
112/** 112/*
113 * @brief Release the reference count for a handle (host, vbuf) 113 * @brief Release the reference count for a handle (host, vbuf)
114 * 114 *
115 * @param handle The pointer to the handle 115 * @param handle The pointer to the handle
@@ -131,7 +131,7 @@ void ia_css_rmgr_refcount_release_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
131 } 131 }
132} 132}
133 133
134/** 134/*
135 * @brief Initialize the resource pool (host, vbuf) 135 * @brief Initialize the resource pool (host, vbuf)
136 * 136 *
137 * @param pool The pointer to the pool 137 * @param pool The pointer to the pool
@@ -163,7 +163,7 @@ enum ia_css_err ia_css_rmgr_init_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
163 return err; 163 return err;
164} 164}
165 165
166/** 166/*
167 * @brief Uninitialize the resource pool (host, vbuf) 167 * @brief Uninitialize the resource pool (host, vbuf)
168 * 168 *
169 * @param pool The pointer to the pool 169 * @param pool The pointer to the pool
@@ -197,7 +197,7 @@ void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
197 } 197 }
198} 198}
199 199
200/** 200/*
201 * @brief Push a handle to the pool 201 * @brief Push a handle to the pool
202 * 202 *
203 * @param pool The pointer to the pool 203 * @param pool The pointer to the pool
@@ -224,7 +224,7 @@ void rmgr_push_handle(struct ia_css_rmgr_vbuf_pool *pool,
224 assert(succes); 224 assert(succes);
225} 225}
226 226
227/** 227/*
228 * @brief Pop a handle from the pool 228 * @brief Pop a handle from the pool
229 * 229 *
230 * @param pool The pointer to the pool 230 * @param pool The pointer to the pool
@@ -254,7 +254,7 @@ void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool,
254 } 254 }
255} 255}
256 256
257/** 257/*
258 * @brief Acquire a handle from the pool (host, vbuf) 258 * @brief Acquire a handle from the pool (host, vbuf)
259 * 259 *
260 * @param pool The pointer to the pool 260 * @param pool The pointer to the pool
@@ -302,7 +302,7 @@ void ia_css_rmgr_acq_vbuf(struct ia_css_rmgr_vbuf_pool *pool,
302 ia_css_rmgr_refcount_retain_vbuf(handle); 302 ia_css_rmgr_refcount_retain_vbuf(handle);
303} 303}
304 304
305/** 305/*
306 * @brief Release a handle to the pool (host, vbuf) 306 * @brief Release a handle to the pool (host, vbuf)
307 * 307 *
308 * @param pool The pointer to the pool 308 * @param pool The pointer to the pool
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h
index 27e9eb1e2102..bc4b1723369e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h
@@ -37,17 +37,17 @@ more details.
37 37
38 38
39typedef struct { 39typedef struct {
40 uint32_t ddr_data_offset; /**< posistion of data in DDR */ 40 uint32_t ddr_data_offset; /** posistion of data in DDR */
41 uint32_t dmem_data_addr; /**< data segment address in dmem */ 41 uint32_t dmem_data_addr; /** data segment address in dmem */
42 uint32_t dmem_bss_addr; /**< bss segment address in dmem */ 42 uint32_t dmem_bss_addr; /** bss segment address in dmem */
43 uint32_t data_size; /**< data segment size */ 43 uint32_t data_size; /** data segment size */
44 uint32_t bss_size; /**< bss segment size */ 44 uint32_t bss_size; /** bss segment size */
45 uint32_t spctrl_config_dmem_addr; /** <location of dmem_cfg in SP dmem */ 45 uint32_t spctrl_config_dmem_addr; /* <location of dmem_cfg in SP dmem */
46 uint32_t spctrl_state_dmem_addr; /** < location of state in SP dmem */ 46 uint32_t spctrl_state_dmem_addr; /* < location of state in SP dmem */
47 unsigned int sp_entry; /** < entry function ptr on SP */ 47 unsigned int sp_entry; /* < entry function ptr on SP */
48 const void *code; /**< location of firmware */ 48 const void *code; /** location of firmware */
49 uint32_t code_size; 49 uint32_t code_size;
50 char *program_name; /**< not used on hardware, only for simulation */ 50 char *program_name; /** not used on hardware, only for simulation */
51} ia_css_spctrl_cfg; 51} ia_css_spctrl_cfg;
52 52
53/* Get the code addr in DDR of SP */ 53/* Get the code addr in DDR of SP */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl_comm.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl_comm.h
index 3af2891efca7..2620d7514f79 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl_comm.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl_comm.h
@@ -41,16 +41,16 @@ typedef enum {
41 IA_CSS_SP_SW_RUNNING 41 IA_CSS_SP_SW_RUNNING
42} ia_css_spctrl_sp_sw_state; 42} ia_css_spctrl_sp_sw_state;
43 43
44/** Structure to encapsulate required arguments for 44/* Structure to encapsulate required arguments for
45 * initialization of SP DMEM using the SP itself 45 * initialization of SP DMEM using the SP itself
46 */ 46 */
47struct ia_css_sp_init_dmem_cfg { 47struct ia_css_sp_init_dmem_cfg {
48 ia_css_ptr ddr_data_addr; /**< data segment address in ddr */ 48 ia_css_ptr ddr_data_addr; /** data segment address in ddr */
49 uint32_t dmem_data_addr; /**< data segment address in dmem */ 49 uint32_t dmem_data_addr; /** data segment address in dmem */
50 uint32_t dmem_bss_addr; /**< bss segment address in dmem */ 50 uint32_t dmem_bss_addr; /** bss segment address in dmem */
51 uint32_t data_size; /**< data segment size */ 51 uint32_t data_size; /** data segment size */
52 uint32_t bss_size; /**< bss segment size */ 52 uint32_t bss_size; /** bss segment size */
53 sp_ID_t sp_id; /** <sp Id */ 53 sp_ID_t sp_id; /* <sp Id */
54}; 54};
55 55
56#define SIZE_OF_IA_CSS_SP_INIT_DMEM_CFG_STRUCT \ 56#define SIZE_OF_IA_CSS_SP_INIT_DMEM_CFG_STRUCT \
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c
index 6d9bceb60196..844e4d536cec 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
@@ -39,7 +39,7 @@ more details.
39 39
40struct spctrl_context_info { 40struct spctrl_context_info {
41 struct ia_css_sp_init_dmem_cfg dmem_config; 41 struct ia_css_sp_init_dmem_cfg dmem_config;
42 uint32_t spctrl_config_dmem_addr; /** location of dmem_cfg in SP dmem */ 42 uint32_t spctrl_config_dmem_addr; /* location of dmem_cfg in SP dmem */
43 uint32_t spctrl_state_dmem_addr; 43 uint32_t spctrl_state_dmem_addr;
44 unsigned int sp_entry; /* entry function ptr on SP */ 44 unsigned int sp_entry; /* entry function ptr on SP */
45 hrt_vaddress code_addr; /* sp firmware location in host mem-DDR*/ 45 hrt_vaddress code_addr; /* sp firmware location in host mem-DDR*/
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/timer/src/timer.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/timer/src/timer.c
index 49c69e60ca5c..b7dd18492a91 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/timer/src/timer.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/timer/src/timer.c
@@ -13,7 +13,7 @@
13 * more details. 13 * more details.
14 */ 14 */
15#else 15#else
16/** 16/*
17Support for Intel Camera Imaging ISP subsystem. 17Support for Intel Camera Imaging ISP subsystem.
18Copyright (c) 2010 - 2015, Intel Corporation. 18Copyright (c) 2010 - 2015, Intel Corporation.
19 19
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
index f92b6a9f77eb..322bb3de6098 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
@@ -176,7 +176,7 @@ static struct sh_css_hmm_buffer_record hmm_buffer_record[MAX_HMM_BUFFER_NUM];
176 176
177static bool fw_explicitly_loaded = false; 177static bool fw_explicitly_loaded = false;
178 178
179/** 179/*
180 * Local prototypes 180 * Local prototypes
181 */ 181 */
182 182
@@ -187,7 +187,7 @@ static enum ia_css_err
187sh_css_pipe_start(struct ia_css_stream *stream); 187sh_css_pipe_start(struct ia_css_stream *stream);
188 188
189#ifdef ISP2401 189#ifdef ISP2401
190/** 190/*
191 * @brief Stop all "ia_css_pipe" instances in the target 191 * @brief Stop all "ia_css_pipe" instances in the target
192 * "ia_css_stream" instance. 192 * "ia_css_stream" instance.
193 * 193 *
@@ -207,7 +207,7 @@ sh_css_pipe_start(struct ia_css_stream *stream);
207static enum ia_css_err 207static enum ia_css_err
208sh_css_pipes_stop(struct ia_css_stream *stream); 208sh_css_pipes_stop(struct ia_css_stream *stream);
209 209
210/** 210/*
211 * @brief Check if all "ia_css_pipe" instances in the target 211 * @brief Check if all "ia_css_pipe" instances in the target
212 * "ia_css_stream" instance have stopped. 212 * "ia_css_stream" instance have stopped.
213 * 213 *
@@ -1649,7 +1649,7 @@ ia_css_init(const struct ia_css_env *env,
1649 void (*flush_func)(struct ia_css_acc_fw *fw); 1649 void (*flush_func)(struct ia_css_acc_fw *fw);
1650 hrt_data select, enable; 1650 hrt_data select, enable;
1651 1651
1652 /** 1652 /*
1653 * The C99 standard does not specify the exact object representation of structs; 1653 * The C99 standard does not specify the exact object representation of structs;
1654 * the representation is compiler dependent. 1654 * the representation is compiler dependent.
1655 * 1655 *
@@ -4617,23 +4617,23 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
4617 * 4) "enum ia_css_event_type convert_event_sp_to_host_domain" (sh_css.c) 4617 * 4) "enum ia_css_event_type convert_event_sp_to_host_domain" (sh_css.c)
4618 */ 4618 */
4619static enum ia_css_event_type convert_event_sp_to_host_domain[] = { 4619static enum ia_css_event_type convert_event_sp_to_host_domain[] = {
4620 IA_CSS_EVENT_TYPE_OUTPUT_FRAME_DONE, /**< Output frame ready. */ 4620 IA_CSS_EVENT_TYPE_OUTPUT_FRAME_DONE, /** Output frame ready. */
4621 IA_CSS_EVENT_TYPE_SECOND_OUTPUT_FRAME_DONE, /**< Second output frame ready. */ 4621 IA_CSS_EVENT_TYPE_SECOND_OUTPUT_FRAME_DONE, /** Second output frame ready. */
4622 IA_CSS_EVENT_TYPE_VF_OUTPUT_FRAME_DONE, /**< Viewfinder Output frame ready. */ 4622 IA_CSS_EVENT_TYPE_VF_OUTPUT_FRAME_DONE, /** Viewfinder Output frame ready. */
4623 IA_CSS_EVENT_TYPE_SECOND_VF_OUTPUT_FRAME_DONE, /**< Second viewfinder Output frame ready. */ 4623 IA_CSS_EVENT_TYPE_SECOND_VF_OUTPUT_FRAME_DONE, /** Second viewfinder Output frame ready. */
4624 IA_CSS_EVENT_TYPE_3A_STATISTICS_DONE, /**< Indication that 3A statistics are available. */ 4624 IA_CSS_EVENT_TYPE_3A_STATISTICS_DONE, /** Indication that 3A statistics are available. */
4625 IA_CSS_EVENT_TYPE_DIS_STATISTICS_DONE, /**< Indication that DIS statistics are available. */ 4625 IA_CSS_EVENT_TYPE_DIS_STATISTICS_DONE, /** Indication that DIS statistics are available. */
4626 IA_CSS_EVENT_TYPE_PIPELINE_DONE, /**< Pipeline Done event, sent after last pipeline stage. */ 4626 IA_CSS_EVENT_TYPE_PIPELINE_DONE, /** Pipeline Done event, sent after last pipeline stage. */
4627 IA_CSS_EVENT_TYPE_FRAME_TAGGED, /**< Frame tagged. */ 4627 IA_CSS_EVENT_TYPE_FRAME_TAGGED, /** Frame tagged. */
4628 IA_CSS_EVENT_TYPE_INPUT_FRAME_DONE, /**< Input frame ready. */ 4628 IA_CSS_EVENT_TYPE_INPUT_FRAME_DONE, /** Input frame ready. */
4629 IA_CSS_EVENT_TYPE_METADATA_DONE, /**< Metadata ready. */ 4629 IA_CSS_EVENT_TYPE_METADATA_DONE, /** Metadata ready. */
4630 IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE, /**< Indication that LACE statistics are available. */ 4630 IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE, /** Indication that LACE statistics are available. */
4631 IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE, /**< Extension stage executed. */ 4631 IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE, /** Extension stage executed. */
4632 IA_CSS_EVENT_TYPE_TIMER, /**< Timing measurement data. */ 4632 IA_CSS_EVENT_TYPE_TIMER, /** Timing measurement data. */
4633 IA_CSS_EVENT_TYPE_PORT_EOF, /**< End Of Frame event, sent when in buffered sensor mode. */ 4633 IA_CSS_EVENT_TYPE_PORT_EOF, /** End Of Frame event, sent when in buffered sensor mode. */
4634 IA_CSS_EVENT_TYPE_FW_WARNING, /**< Performance warning encountered by FW */ 4634 IA_CSS_EVENT_TYPE_FW_WARNING, /** Performance warning encountered by FW */
4635 IA_CSS_EVENT_TYPE_FW_ASSERT, /**< Assertion hit by FW */ 4635 IA_CSS_EVENT_TYPE_FW_ASSERT, /** Assertion hit by FW */
4636 0, /** error if sp passes SH_CSS_SP_EVENT_NR_OF_TYPES as a valid event. */ 4636 0, /* error if sp passes SH_CSS_SP_EVENT_NR_OF_TYPES as a valid event. */
4637}; 4637};
4638 4638
4639enum ia_css_err 4639enum ia_css_err
@@ -5028,7 +5028,7 @@ sh_css_enable_cont_capt(bool enable, bool stop_copy_preview)
5028bool 5028bool
5029sh_css_continuous_is_enabled(uint8_t pipe_num) 5029sh_css_continuous_is_enabled(uint8_t pipe_num)
5030#else 5030#else
5031/** 5031/*
5032 * @brief Stop all "ia_css_pipe" instances in the target 5032 * @brief Stop all "ia_css_pipe" instances in the target
5033 * "ia_css_stream" instance. 5033 * "ia_css_stream" instance.
5034 * 5034 *
@@ -5107,7 +5107,7 @@ ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
5107 return IA_CSS_SUCCESS; 5107 return IA_CSS_SUCCESS;
5108} 5108}
5109#else 5109#else
5110 /** 5110 /*
5111 * Stop all "ia_css_pipe" instances in this target 5111 * Stop all "ia_css_pipe" instances in this target
5112 * "ia_css_stream" instance. 5112 * "ia_css_stream" instance.
5113 */ 5113 */
@@ -5146,7 +5146,7 @@ ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
5146 } 5146 }
5147 } 5147 }
5148 5148
5149 /** 5149 /*
5150 * In the CSS firmware use scenario "Continuous Preview" 5150 * In the CSS firmware use scenario "Continuous Preview"
5151 * as well as "Continuous Video", the "ia_css_pipe" instance 5151 * as well as "Continuous Video", the "ia_css_pipe" instance
5152 * "Copy Pipe" is activated. This "Copy Pipe" is private to 5152 * "Copy Pipe" is activated. This "Copy Pipe" is private to
@@ -5183,7 +5183,7 @@ ERR:
5183 return err; 5183 return err;
5184} 5184}
5185 5185
5186/** 5186/*
5187 * @brief Check if all "ia_css_pipe" instances in the target 5187 * @brief Check if all "ia_css_pipe" instances in the target
5188 * "ia_css_stream" instance have stopped. 5188 * "ia_css_stream" instance have stopped.
5189 * 5189 *
@@ -5218,7 +5218,7 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream)
5218 main_pipe_id = main_pipe->mode; 5218 main_pipe_id = main_pipe->mode;
5219 IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id); 5219 IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id);
5220 5220
5221 /** 5221 /*
5222 * Check if every "ia_css_pipe" instance in this target 5222 * Check if every "ia_css_pipe" instance in this target
5223 * "ia_css_stream" instance has stopped. 5223 * "ia_css_stream" instance has stopped.
5224 */ 5224 */
@@ -5229,7 +5229,7 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream)
5229 rval); 5229 rval);
5230 } 5230 }
5231 5231
5232 /** 5232 /*
5233 * In the CSS firmware use scenario "Continuous Preview" 5233 * In the CSS firmware use scenario "Continuous Preview"
5234 * as well as "Continuous Video", the "ia_css_pipe" instance 5234 * as well as "Continuous Video", the "ia_css_pipe" instance
5235 * "Copy Pipe" is activated. This "Copy Pipe" is private to 5235 * "Copy Pipe" is activated. This "Copy Pipe" is private to
@@ -5474,7 +5474,7 @@ ERR:
5474} 5474}
5475 5475
5476#ifdef ISP2401 5476#ifdef ISP2401
5477/** 5477/*
5478 * @brief Check if a format is supported by the pipe. 5478 * @brief Check if a format is supported by the pipe.
5479 * 5479 *
5480 */ 5480 */
@@ -8626,7 +8626,7 @@ sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
8626 return err; 8626 return err;
8627} 8627}
8628 8628
8629/** 8629/*
8630 * @brief Tag a specific frame in continuous capture. 8630 * @brief Tag a specific frame in continuous capture.
8631 * Refer to "sh_css_internal.h" for details. 8631 * Refer to "sh_css_internal.h" for details.
8632 */ 8632 */
@@ -8666,7 +8666,7 @@ enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream,
8666 return err; 8666 return err;
8667} 8667}
8668 8668
8669/** 8669/*
8670 * @brief Configure the continuous capture. 8670 * @brief Configure the continuous capture.
8671 * Refer to "sh_css_internal.h" for details. 8671 * Refer to "sh_css_internal.h" for details.
8672 */ 8672 */
@@ -8822,7 +8822,7 @@ sh_css_init_host_sp_control_vars(void)
8822 "sh_css_init_host_sp_control_vars() leave: return_void\n"); 8822 "sh_css_init_host_sp_control_vars() leave: return_void\n");
8823} 8823}
8824 8824
8825/** 8825/*
8826 * create the internal structures and fill in the configuration data 8826 * create the internal structures and fill in the configuration data
8827 */ 8827 */
8828void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config) 8828void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config)
@@ -10435,7 +10435,7 @@ ia_css_start_sp(void)
10435 return err; 10435 return err;
10436} 10436}
10437 10437
10438/** 10438/*
10439 * Time to wait SP for termincate. Only condition when this can happen 10439 * Time to wait SP for termincate. Only condition when this can happen
10440 * is a fatal hw failure, but we must be able to detect this and emit 10440 * is a fatal hw failure, but we must be able to detect this and emit
10441 * a proper error trace. 10441 * a proper error trace.
@@ -10713,7 +10713,7 @@ ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id)
10713 return ret; 10713 return ret;
10714} 10714}
10715 10715
10716/** @brief Set the state (Enable or Disable) of the Extension stage in the 10716/* @brief Set the state (Enable or Disable) of the Extension stage in the
10717 * given pipe. 10717 * given pipe.
10718 */ 10718 */
10719enum ia_css_err 10719enum ia_css_err
@@ -10758,7 +10758,7 @@ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool
10758 return err; 10758 return err;
10759} 10759}
10760 10760
10761/** @brief Get the state (Enable or Disable) of the Extension stage in the 10761/* @brief Get the state (Enable or Disable) of the Extension stage in the
10762 * given pipe. 10762 * given pipe.
10763 */ 10763 */
10764enum ia_css_err 10764enum ia_css_err
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
index 0910021286a4..161122e1bcbc 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
@@ -188,7 +188,7 @@ enum host2sp_commands {
188 N_host2sp_cmd 188 N_host2sp_cmd
189}; 189};
190 190
191/** Enumeration used to indicate the events that are produced by 191/* Enumeration used to indicate the events that are produced by
192 * the SP and consumed by the Host. 192 * the SP and consumed by the Host.
193 * 193 *
194 * !!!IMPORTANT!!! KEEP THE FOLLOWING IN SYNC: 194 * !!!IMPORTANT!!! KEEP THE FOLLOWING IN SYNC:
@@ -274,10 +274,10 @@ struct sh_css_ddr_address_map_compound {
274}; 274};
275 275
276struct ia_css_isp_parameter_set_info { 276struct ia_css_isp_parameter_set_info {
277 struct sh_css_ddr_address_map mem_map;/**< pointers to Parameters in ISP format IMPT: 277 struct sh_css_ddr_address_map mem_map;/** pointers to Parameters in ISP format IMPT:
278 This should be first member of this struct */ 278 This should be first member of this struct */
279 uint32_t isp_parameters_id;/**< Unique ID to track which config was actually applied to a particular frame */ 279 uint32_t isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */
280 ia_css_ptr output_frame_ptr;/**< Output frame to which this config has to be applied (optional) */ 280 ia_css_ptr output_frame_ptr;/** Output frame to which this config has to be applied (optional) */
281}; 281};
282 282
283/* this struct contains all arguments that can be passed to 283/* this struct contains all arguments that can be passed to
@@ -398,9 +398,9 @@ struct sh_css_sp_input_formatter_set {
398/* SP configuration information */ 398/* SP configuration information */
399struct sh_css_sp_config { 399struct sh_css_sp_config {
400 uint8_t no_isp_sync; /* Signal host immediately after start */ 400 uint8_t no_isp_sync; /* Signal host immediately after start */
401 uint8_t enable_raw_pool_locking; /**< Enable Raw Buffer Locking for HALv3 Support */ 401 uint8_t enable_raw_pool_locking; /** Enable Raw Buffer Locking for HALv3 Support */
402 uint8_t lock_all; 402 uint8_t lock_all;
403 /**< If raw buffer locking is enabled, this flag indicates whether raw 403 /** If raw buffer locking is enabled, this flag indicates whether raw
404 frames are locked when their EOF event is successfully sent to the 404 frames are locked when their EOF event is successfully sent to the
405 host (true) or when they are passed to the preview/video pipe 405 host (true) or when they are passed to the preview/video pipe
406 (false). */ 406 (false). */
@@ -458,13 +458,13 @@ struct sh_css_sp_pipeline_io {
458 /*struct sh_css_sp_pipeline_terminal output;*/ 458 /*struct sh_css_sp_pipeline_terminal output;*/
459}; 459};
460 460
461/** This struct tracks how many streams are registered per CSI port. 461/* This struct tracks how many streams are registered per CSI port.
462 * This is used to track which streams have already been configured. 462 * This is used to track which streams have already been configured.
463 * Only when all streams are configured, the CSI RX is started for that port. 463 * Only when all streams are configured, the CSI RX is started for that port.
464 */ 464 */
465struct sh_css_sp_pipeline_io_status { 465struct sh_css_sp_pipeline_io_status {
466 uint32_t active[N_INPUT_SYSTEM_CSI_PORT]; /**< registered streams */ 466 uint32_t active[N_INPUT_SYSTEM_CSI_PORT]; /** registered streams */
467 uint32_t running[N_INPUT_SYSTEM_CSI_PORT]; /**< configured streams */ 467 uint32_t running[N_INPUT_SYSTEM_CSI_PORT]; /** configured streams */
468}; 468};
469 469
470#endif 470#endif
@@ -500,7 +500,7 @@ enum sh_css_port_type {
500#define SH_CSS_METADATA_OFFLINE_MODE 0x04 500#define SH_CSS_METADATA_OFFLINE_MODE 0x04
501#define SH_CSS_METADATA_WAIT_INPUT 0x08 501#define SH_CSS_METADATA_WAIT_INPUT 0x08
502 502
503/** @brief Free an array of metadata buffers. 503/* @brief Free an array of metadata buffers.
504 * 504 *
505 * @param[in] num_bufs Number of metadata buffers to be freed. 505 * @param[in] num_bufs Number of metadata buffers to be freed.
506 * @param[in] bufs Pointer of array of metadata buffers. 506 * @param[in] bufs Pointer of array of metadata buffers.
@@ -764,7 +764,7 @@ struct sh_css_hmm_buffer {
764 hrt_vaddress frame_data; 764 hrt_vaddress frame_data;
765 uint32_t flashed; 765 uint32_t flashed;
766 uint32_t exp_id; 766 uint32_t exp_id;
767 uint32_t isp_parameters_id; /**< Unique ID to track which config was 767 uint32_t isp_parameters_id; /** Unique ID to track which config was
768 actually applied to a particular frame */ 768 actually applied to a particular frame */
769#if CONFIG_ON_FRAME_ENQUEUE() 769#if CONFIG_ON_FRAME_ENQUEUE()
770 struct sh_css_config_on_frame_enqueue config_on_frame_enqueue; 770 struct sh_css_config_on_frame_enqueue config_on_frame_enqueue;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h
index e12789236bb9..4bcc35d219f8 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h
@@ -22,7 +22,7 @@
22#include <ia_css_pipe_public.h> 22#include <ia_css_pipe_public.h>
23#include <ia_css_stream_public.h> 23#include <ia_css_stream_public.h>
24 24
25/** The pipe id type, distinguishes the kind of pipes that 25/* The pipe id type, distinguishes the kind of pipes that
26 * can be run in parallel. 26 * can be run in parallel.
27 */ 27 */
28enum ia_css_pipe_id { 28enum ia_css_pipe_id {
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c
index 36aaa3019a15..883474e90c81 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c
@@ -321,7 +321,7 @@ calculate_mipi_buff_size(
321 height = stream_cfg->input_config.input_res.height; 321 height = stream_cfg->input_config.input_res.height;
322 format = stream_cfg->input_config.format; 322 format = stream_cfg->input_config.format;
323 pack_raw_pixels = stream_cfg->pack_raw_pixels; 323 pack_raw_pixels = stream_cfg->pack_raw_pixels;
324 /** end of NOTE */ 324 /* end of NOTE */
325 325
326 /** 326 /**
327#ifndef ISP2401 327#ifndef ISP2401
@@ -341,7 +341,7 @@ calculate_mipi_buff_size(
341 * in the non-continuous use scenario. 341 * in the non-continuous use scenario.
342 */ 342 */
343 width_padded = width + (2 * ISP_VEC_NELEMS); 343 width_padded = width + (2 * ISP_VEC_NELEMS);
344 /** end of NOTE */ 344 /* end of NOTE */
345 345
346 IA_CSS_ENTER("padded_width=%d, height=%d, format=%d\n", 346 IA_CSS_ENTER("padded_width=%d, height=%d, format=%d\n",
347 width_padded, height, format); 347 width_padded, height, format);
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h
index a7ffe6d8331b..270ec2b60a3e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h
@@ -144,8 +144,8 @@ struct ia_css_isp_parameters {
144 struct sh_css_ddr_address_map_size pipe_ddr_ptrs_size[IA_CSS_PIPE_ID_NUM]; 144 struct sh_css_ddr_address_map_size pipe_ddr_ptrs_size[IA_CSS_PIPE_ID_NUM];
145 struct sh_css_ddr_address_map ddr_ptrs; 145 struct sh_css_ddr_address_map ddr_ptrs;
146 struct sh_css_ddr_address_map_size ddr_ptrs_size; 146 struct sh_css_ddr_address_map_size ddr_ptrs_size;
147 struct ia_css_frame *output_frame; /**< Output frame the config is to be applied to (optional) */ 147 struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */
148 uint32_t isp_parameters_id; /**< Unique ID to track which config was actually applied to a particular frame */ 148 uint32_t isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */
149}; 149};
150 150
151void 151void
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c
index e6a345979ff1..6fc00fc402b1 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c
@@ -261,7 +261,7 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
261 assert(out_frame != NULL); 261 assert(out_frame != NULL);
262 262
263 { 263 {
264 /** 264 /*
265 * Clear sh_css_sp_stage for easy debugging. 265 * Clear sh_css_sp_stage for easy debugging.
266 * program_input_circuit must be saved as it is set outside 266 * program_input_circuit must be saved as it is set outside
267 * this function. 267 * this function.
@@ -335,7 +335,7 @@ sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame,
335 assert(out_frame != NULL); 335 assert(out_frame != NULL);
336 336
337 { 337 {
338 /** 338 /*
339 * Clear sh_css_sp_stage for easy debugging. 339 * Clear sh_css_sp_stage for easy debugging.
340 * program_input_circuit must be saved as it is set outside 340 * program_input_circuit must be saved as it is set outside
341 * this function. 341 * this function.
@@ -909,7 +909,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
909 xinfo = binary->info; 909 xinfo = binary->info;
910 info = &xinfo->sp; 910 info = &xinfo->sp;
911 { 911 {
912 /** 912 /*
913 * Clear sh_css_sp_stage for easy debugging. 913 * Clear sh_css_sp_stage for easy debugging.
914 * program_input_circuit must be saved as it is set outside 914 * program_input_circuit must be saved as it is set outside
915 * this function. 915 * this function.
@@ -980,7 +980,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
980 sh_css_isp_stage.binary_name[SH_CSS_MAX_BINARY_NAME - 1] = 0; 980 sh_css_isp_stage.binary_name[SH_CSS_MAX_BINARY_NAME - 1] = 0;
981 sh_css_isp_stage.mem_initializers = *isp_mem_if; 981 sh_css_isp_stage.mem_initializers = *isp_mem_if;
982 982
983 /** 983 /*
984 * Even when a stage does not need uds and does not params, 984 * Even when a stage does not need uds and does not params,
985 * ia_css_uds_sp_scale_params() seems to be called (needs 985 * ia_css_uds_sp_scale_params() seems to be called (needs
986 * further investigation). This function can not deal with 986 * further investigation). This function can not deal with
@@ -1429,7 +1429,7 @@ sh_css_init_host2sp_frame_data(void)
1429} 1429}
1430 1430
1431 1431
1432/** 1432/*
1433 * @brief Update the offline frame information in host_sp_communication. 1433 * @brief Update the offline frame information in host_sp_communication.
1434 * Refer to "sh_css_sp.h" for more details. 1434 * Refer to "sh_css_sp.h" for more details.
1435 */ 1435 */
@@ -1461,7 +1461,7 @@ sh_css_update_host2sp_offline_frame(
1461} 1461}
1462 1462
1463#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) 1463#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
1464/** 1464/*
1465 * @brief Update the mipi frame information in host_sp_communication. 1465 * @brief Update the mipi frame information in host_sp_communication.
1466 * Refer to "sh_css_sp.h" for more details. 1466 * Refer to "sh_css_sp.h" for more details.
1467 */ 1467 */
@@ -1488,7 +1488,7 @@ sh_css_update_host2sp_mipi_frame(
1488 frame ? frame->data : 0); 1488 frame ? frame->data : 0);
1489} 1489}
1490 1490
1491/** 1491/*
1492 * @brief Update the mipi metadata information in host_sp_communication. 1492 * @brief Update the mipi metadata information in host_sp_communication.
1493 * Refer to "sh_css_sp.h" for more details. 1493 * Refer to "sh_css_sp.h" for more details.
1494 */ 1494 */
@@ -1735,7 +1735,7 @@ ia_css_isp_has_started(void)
1735} 1735}
1736 1736
1737 1737
1738/** 1738/*
1739 * @brief Initialize the DMA software-mask in the debug mode. 1739 * @brief Initialize the DMA software-mask in the debug mode.
1740 * Refer to "sh_css_sp.h" for more details. 1740 * Refer to "sh_css_sp.h" for more details.
1741 */ 1741 */
@@ -1761,7 +1761,7 @@ sh_css_sp_init_dma_sw_reg(int dma_id)
1761 return true; 1761 return true;
1762} 1762}
1763 1763
1764/** 1764/*
1765 * @brief Set the DMA software-mask in the debug mode. 1765 * @brief Set the DMA software-mask in the debug mode.
1766 * Refer to "sh_css_sp.h" for more details. 1766 * Refer to "sh_css_sp.h" for more details.
1767 */ 1767 */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h
index e49e478ab354..0b8e3d872069 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h
@@ -61,7 +61,7 @@ struct sh_css {
61#endif 61#endif
62 hrt_vaddress sp_bin_addr; 62 hrt_vaddress sp_bin_addr;
63 hrt_data page_table_base_index; 63 hrt_data page_table_base_index;
64 unsigned int size_mem_words; /** \deprecated{Use ia_css_mipi_buffer_config instead.}*/ 64 unsigned int size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
65 enum ia_css_irq_type irq_type; 65 enum ia_css_irq_type irq_type;
66 unsigned int pipe_counter; 66 unsigned int pipe_counter;
67 67
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 068aece25d37..cded30f145aa 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -394,7 +394,7 @@ struct octeon_hcd {
394 result = -1; \ 394 result = -1; \
395 break; \ 395 break; \
396 } else \ 396 } else \
397 cvmx_wait(100); \ 397 __delay(100); \
398 } \ 398 } \
399 } while (0); \ 399 } while (0); \
400 result; }) 400 result; })
@@ -774,7 +774,7 @@ retry:
774 usbn_clk_ctl.s.hclk_rst = 1; 774 usbn_clk_ctl.s.hclk_rst = 1;
775 cvmx_write64_uint64(CVMX_USBNX_CLK_CTL(usb->index), usbn_clk_ctl.u64); 775 cvmx_write64_uint64(CVMX_USBNX_CLK_CTL(usb->index), usbn_clk_ctl.u64);
776 /* 2e. Wait 64 core-clock cycles for HCLK to stabilize */ 776 /* 2e. Wait 64 core-clock cycles for HCLK to stabilize */
777 cvmx_wait(64); 777 __delay(64);
778 /* 778 /*
779 * 3. Program the power-on reset field in the USBN clock-control 779 * 3. Program the power-on reset field in the USBN clock-control
780 * register: 780 * register:
@@ -795,7 +795,7 @@ retry:
795 cvmx_write64_uint64(CVMX_USBNX_USBP_CTL_STATUS(usb->index), 795 cvmx_write64_uint64(CVMX_USBNX_USBP_CTL_STATUS(usb->index),
796 usbn_usbp_ctl_status.u64); 796 usbn_usbp_ctl_status.u64);
797 /* 6. Wait 10 cycles */ 797 /* 6. Wait 10 cycles */
798 cvmx_wait(10); 798 __delay(10);
799 /* 799 /*
800 * 7. Clear ATE_RESET field in the USBN clock-control register: 800 * 7. Clear ATE_RESET field in the USBN clock-control register:
801 * USBN_USBP_CTL_STATUS[ATE_RESET] = 0 801 * USBN_USBP_CTL_STATUS[ATE_RESET] = 0
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index c0664dc80bf2..446310775e90 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -1395,19 +1395,13 @@ static int rtw_wx_get_essid(struct net_device *dev,
1395 if ((check_fwstate(pmlmepriv, _FW_LINKED)) || 1395 if ((check_fwstate(pmlmepriv, _FW_LINKED)) ||
1396 (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { 1396 (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) {
1397 len = pcur_bss->Ssid.SsidLength; 1397 len = pcur_bss->Ssid.SsidLength;
1398
1399 wrqu->essid.length = len;
1400
1401 memcpy(extra, pcur_bss->Ssid.Ssid, len); 1398 memcpy(extra, pcur_bss->Ssid.Ssid, len);
1402
1403 wrqu->essid.flags = 1;
1404 } else { 1399 } else {
1405 ret = -1; 1400 len = 0;
1406 goto exit; 1401 *extra = 0;
1407 } 1402 }
1408 1403 wrqu->essid.length = len;
1409exit: 1404 wrqu->essid.flags = 1;
1410
1411 1405
1412 return ret; 1406 return ret;
1413} 1407}
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 7952357df9c8..edb6e4e9ef3a 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -590,7 +590,6 @@ static int __init optee_driver_init(void)
590 return -ENODEV; 590 return -ENODEV;
591 591
592 np = of_find_matching_node(fw_np, optee_match); 592 np = of_find_matching_node(fw_np, optee_match);
593 of_node_put(fw_np);
594 if (!np) 593 if (!np)
595 return -ENODEV; 594 return -ENODEV;
596 595
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index ce7ad0acee7a..247788a16f0b 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -27,23 +27,41 @@ static int ttyport_receive_buf(struct tty_port *port, const unsigned char *cp,
27{ 27{
28 struct serdev_controller *ctrl = port->client_data; 28 struct serdev_controller *ctrl = port->client_data;
29 struct serport *serport = serdev_controller_get_drvdata(ctrl); 29 struct serport *serport = serdev_controller_get_drvdata(ctrl);
30 int ret;
30 31
31 if (!test_bit(SERPORT_ACTIVE, &serport->flags)) 32 if (!test_bit(SERPORT_ACTIVE, &serport->flags))
32 return 0; 33 return 0;
33 34
34 return serdev_controller_receive_buf(ctrl, cp, count); 35 ret = serdev_controller_receive_buf(ctrl, cp, count);
36
37 dev_WARN_ONCE(&ctrl->dev, ret < 0 || ret > count,
38 "receive_buf returns %d (count = %zu)\n",
39 ret, count);
40 if (ret < 0)
41 return 0;
42 else if (ret > count)
43 return count;
44
45 return ret;
35} 46}
36 47
37static void ttyport_write_wakeup(struct tty_port *port) 48static void ttyport_write_wakeup(struct tty_port *port)
38{ 49{
39 struct serdev_controller *ctrl = port->client_data; 50 struct serdev_controller *ctrl = port->client_data;
40 struct serport *serport = serdev_controller_get_drvdata(ctrl); 51 struct serport *serport = serdev_controller_get_drvdata(ctrl);
52 struct tty_struct *tty;
53
54 tty = tty_port_tty_get(port);
55 if (!tty)
56 return;
41 57
42 if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags) && 58 if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) &&
43 test_bit(SERPORT_ACTIVE, &serport->flags)) 59 test_bit(SERPORT_ACTIVE, &serport->flags))
44 serdev_controller_write_wakeup(ctrl); 60 serdev_controller_write_wakeup(ctrl);
45 61
46 wake_up_interruptible_poll(&port->tty->write_wait, POLLOUT); 62 wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
63
64 tty_kref_put(tty);
47} 65}
48 66
49static const struct tty_port_client_operations client_ops = { 67static const struct tty_port_client_operations client_ops = {
@@ -136,8 +154,10 @@ static void ttyport_close(struct serdev_controller *ctrl)
136 154
137 clear_bit(SERPORT_ACTIVE, &serport->flags); 155 clear_bit(SERPORT_ACTIVE, &serport->flags);
138 156
157 tty_lock(tty);
139 if (tty->ops->close) 158 if (tty->ops->close)
140 tty->ops->close(tty, NULL); 159 tty->ops->close(tty, NULL);
160 tty_unlock(tty);
141 161
142 tty_release_struct(tty, serport->tty_idx); 162 tty_release_struct(tty, serport->tty_idx);
143} 163}
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index 362c25ff188a..ae6a256524d8 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -122,12 +122,14 @@ static void __init init_port(struct earlycon_device *device)
122 serial8250_early_out(port, UART_FCR, 0); /* no fifo */ 122 serial8250_early_out(port, UART_FCR, 0); /* no fifo */
123 serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */ 123 serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */
124 124
125 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); 125 if (port->uartclk && device->baud) {
126 c = serial8250_early_in(port, UART_LCR); 126 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud);
127 serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB); 127 c = serial8250_early_in(port, UART_LCR);
128 serial8250_early_out(port, UART_DLL, divisor & 0xff); 128 serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB);
129 serial8250_early_out(port, UART_DLM, (divisor >> 8) & 0xff); 129 serial8250_early_out(port, UART_DLL, divisor & 0xff);
130 serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB); 130 serial8250_early_out(port, UART_DLM, (divisor >> 8) & 0xff);
131 serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
132 }
131} 133}
132 134
133int __init early_serial8250_setup(struct earlycon_device *device, 135int __init early_serial8250_setup(struct earlycon_device *device,
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index b7e0e3416641..54adf8d56350 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -5135,6 +5135,9 @@ static const struct pci_device_id serial_pci_tbl[] = {
5135 { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 }, 5135 { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 },
5136 { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 }, 5136 { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 },
5137 5137
5138 /* Amazon PCI serial device */
5139 { PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 },
5140
5138 /* 5141 /*
5139 * These entries match devices with class COMMUNICATION_SERIAL, 5142 * These entries match devices with class COMMUNICATION_SERIAL,
5140 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL 5143 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 8b351444cc40..9a2ab6751a23 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -180,9 +180,9 @@ static int ulpi_of_register(struct ulpi *ulpi)
180 /* Find a ulpi bus underneath the parent or the grandparent */ 180 /* Find a ulpi bus underneath the parent or the grandparent */
181 parent = ulpi->dev.parent; 181 parent = ulpi->dev.parent;
182 if (parent->of_node) 182 if (parent->of_node)
183 np = of_find_node_by_name(parent->of_node, "ulpi"); 183 np = of_get_child_by_name(parent->of_node, "ulpi");
184 else if (parent->parent && parent->parent->of_node) 184 else if (parent->parent && parent->parent->of_node)
185 np = of_find_node_by_name(parent->parent->of_node, "ulpi"); 185 np = of_get_child_by_name(parent->parent->of_node, "ulpi");
186 if (!np) 186 if (!np)
187 return 0; 187 return 0;
188 188
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index da8acd980fc6..55b198ba629b 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -905,14 +905,25 @@ void usb_release_bos_descriptor(struct usb_device *dev)
905 } 905 }
906} 906}
907 907
908static const __u8 bos_desc_len[256] = {
909 [USB_CAP_TYPE_WIRELESS_USB] = USB_DT_USB_WIRELESS_CAP_SIZE,
910 [USB_CAP_TYPE_EXT] = USB_DT_USB_EXT_CAP_SIZE,
911 [USB_SS_CAP_TYPE] = USB_DT_USB_SS_CAP_SIZE,
912 [USB_SSP_CAP_TYPE] = USB_DT_USB_SSP_CAP_SIZE(1),
913 [CONTAINER_ID_TYPE] = USB_DT_USB_SS_CONTN_ID_SIZE,
914 [USB_PTM_CAP_TYPE] = USB_DT_USB_PTM_ID_SIZE,
915};
916
908/* Get BOS descriptor set */ 917/* Get BOS descriptor set */
909int usb_get_bos_descriptor(struct usb_device *dev) 918int usb_get_bos_descriptor(struct usb_device *dev)
910{ 919{
911 struct device *ddev = &dev->dev; 920 struct device *ddev = &dev->dev;
912 struct usb_bos_descriptor *bos; 921 struct usb_bos_descriptor *bos;
913 struct usb_dev_cap_header *cap; 922 struct usb_dev_cap_header *cap;
923 struct usb_ssp_cap_descriptor *ssp_cap;
914 unsigned char *buffer; 924 unsigned char *buffer;
915 int length, total_len, num, i; 925 int length, total_len, num, i, ssac;
926 __u8 cap_type;
916 int ret; 927 int ret;
917 928
918 bos = kzalloc(sizeof(struct usb_bos_descriptor), GFP_KERNEL); 929 bos = kzalloc(sizeof(struct usb_bos_descriptor), GFP_KERNEL);
@@ -965,7 +976,13 @@ int usb_get_bos_descriptor(struct usb_device *dev)
965 dev->bos->desc->bNumDeviceCaps = i; 976 dev->bos->desc->bNumDeviceCaps = i;
966 break; 977 break;
967 } 978 }
979 cap_type = cap->bDevCapabilityType;
968 length = cap->bLength; 980 length = cap->bLength;
981 if (bos_desc_len[cap_type] && length < bos_desc_len[cap_type]) {
982 dev->bos->desc->bNumDeviceCaps = i;
983 break;
984 }
985
969 total_len -= length; 986 total_len -= length;
970 987
971 if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) { 988 if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) {
@@ -973,7 +990,7 @@ int usb_get_bos_descriptor(struct usb_device *dev)
973 continue; 990 continue;
974 } 991 }
975 992
976 switch (cap->bDevCapabilityType) { 993 switch (cap_type) {
977 case USB_CAP_TYPE_WIRELESS_USB: 994 case USB_CAP_TYPE_WIRELESS_USB:
978 /* Wireless USB cap descriptor is handled by wusb */ 995 /* Wireless USB cap descriptor is handled by wusb */
979 break; 996 break;
@@ -986,8 +1003,11 @@ int usb_get_bos_descriptor(struct usb_device *dev)
986 (struct usb_ss_cap_descriptor *)buffer; 1003 (struct usb_ss_cap_descriptor *)buffer;
987 break; 1004 break;
988 case USB_SSP_CAP_TYPE: 1005 case USB_SSP_CAP_TYPE:
989 dev->bos->ssp_cap = 1006 ssp_cap = (struct usb_ssp_cap_descriptor *)buffer;
990 (struct usb_ssp_cap_descriptor *)buffer; 1007 ssac = (le32_to_cpu(ssp_cap->bmAttributes) &
1008 USB_SSP_SUBLINK_SPEED_ATTRIBS) + 1;
1009 if (length >= USB_DT_USB_SSP_CAP_SIZE(ssac))
1010 dev->bos->ssp_cap = ssp_cap;
991 break; 1011 break;
992 case CONTAINER_ID_TYPE: 1012 case CONTAINER_ID_TYPE:
993 dev->bos->ss_id = 1013 dev->bos->ss_id =
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 705c573d0257..a3fad4ec9870 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1442,14 +1442,18 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
1442 int number_of_packets = 0; 1442 int number_of_packets = 0;
1443 unsigned int stream_id = 0; 1443 unsigned int stream_id = 0;
1444 void *buf; 1444 void *buf;
1445 1445 unsigned long mask = USBDEVFS_URB_SHORT_NOT_OK |
1446 if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP |
1447 USBDEVFS_URB_SHORT_NOT_OK |
1448 USBDEVFS_URB_BULK_CONTINUATION | 1446 USBDEVFS_URB_BULK_CONTINUATION |
1449 USBDEVFS_URB_NO_FSBR | 1447 USBDEVFS_URB_NO_FSBR |
1450 USBDEVFS_URB_ZERO_PACKET | 1448 USBDEVFS_URB_ZERO_PACKET |
1451 USBDEVFS_URB_NO_INTERRUPT)) 1449 USBDEVFS_URB_NO_INTERRUPT;
1452 return -EINVAL; 1450 /* USBDEVFS_URB_ISO_ASAP is a special case */
1451 if (uurb->type == USBDEVFS_URB_TYPE_ISO)
1452 mask |= USBDEVFS_URB_ISO_ASAP;
1453
1454 if (uurb->flags & ~mask)
1455 return -EINVAL;
1456
1453 if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX) 1457 if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX)
1454 return -EINVAL; 1458 return -EINVAL;
1455 if (uurb->buffer_length > 0 && !uurb->buffer) 1459 if (uurb->buffer_length > 0 && !uurb->buffer)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 7ccdd3d4db84..cf7bbcb9a63c 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4948,6 +4948,15 @@ loop:
4948 usb_put_dev(udev); 4948 usb_put_dev(udev);
4949 if ((status == -ENOTCONN) || (status == -ENOTSUPP)) 4949 if ((status == -ENOTCONN) || (status == -ENOTSUPP))
4950 break; 4950 break;
4951
4952 /* When halfway through our retry count, power-cycle the port */
4953 if (i == (SET_CONFIG_TRIES / 2) - 1) {
4954 dev_info(&port_dev->dev, "attempt power cycle\n");
4955 usb_hub_set_port_power(hdev, hub, port1, false);
4956 msleep(2 * hub_power_on_good_delay(hub));
4957 usb_hub_set_port_power(hdev, hub, port1, true);
4958 msleep(hub_power_on_good_delay(hub));
4959 }
4951 } 4960 }
4952 if (hub->hdev->parent || 4961 if (hub->hdev->parent ||
4953 !hcd->driver->port_handed_over || 4962 !hcd->driver->port_handed_over ||
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index f1dbab6f798f..a10b346b9777 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -146,6 +146,9 @@ static const struct usb_device_id usb_quirk_list[] = {
146 /* appletouch */ 146 /* appletouch */
147 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, 147 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
148 148
149 /* Genesys Logic hub, internally used by KY-688 USB 3.1 Type-C Hub */
150 { USB_DEVICE(0x05e3, 0x0612), .driver_info = USB_QUIRK_NO_LPM },
151
149 /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */ 152 /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */
150 { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM }, 153 { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
151 154
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 31cce7805eb2..0a19a76645ad 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -508,8 +508,8 @@ choice
508 controller, and the relevant drivers for each function declared 508 controller, and the relevant drivers for each function declared
509 by the device. 509 by the device.
510 510
511source "drivers/usb/gadget/legacy/Kconfig"
512
513endchoice 511endchoice
514 512
513source "drivers/usb/gadget/legacy/Kconfig"
514
515endif # USB_GADGET 515endif # USB_GADGET
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index eec14e6ed20b..77c7ecca816a 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -146,7 +146,6 @@ int config_ep_by_speed(struct usb_gadget *g,
146 struct usb_function *f, 146 struct usb_function *f,
147 struct usb_ep *_ep) 147 struct usb_ep *_ep)
148{ 148{
149 struct usb_composite_dev *cdev = get_gadget_data(g);
150 struct usb_endpoint_descriptor *chosen_desc = NULL; 149 struct usb_endpoint_descriptor *chosen_desc = NULL;
151 struct usb_descriptor_header **speed_desc = NULL; 150 struct usb_descriptor_header **speed_desc = NULL;
152 151
@@ -226,8 +225,12 @@ ep_found:
226 _ep->maxburst = comp_desc->bMaxBurst + 1; 225 _ep->maxburst = comp_desc->bMaxBurst + 1;
227 break; 226 break;
228 default: 227 default:
229 if (comp_desc->bMaxBurst != 0) 228 if (comp_desc->bMaxBurst != 0) {
229 struct usb_composite_dev *cdev;
230
231 cdev = get_gadget_data(g);
230 ERROR(cdev, "ep0 bMaxBurst must be 0\n"); 232 ERROR(cdev, "ep0 bMaxBurst must be 0\n");
233 }
231 _ep->maxburst = 1; 234 _ep->maxburst = 1;
232 break; 235 break;
233 } 236 }
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 97ea059a7aa4..b6cf5ab5a0a1 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1012,7 +1012,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
1012 else 1012 else
1013 ret = ep->status; 1013 ret = ep->status;
1014 goto error_mutex; 1014 goto error_mutex;
1015 } else if (!(req = usb_ep_alloc_request(ep->ep, GFP_KERNEL))) { 1015 } else if (!(req = usb_ep_alloc_request(ep->ep, GFP_ATOMIC))) {
1016 ret = -ENOMEM; 1016 ret = -ENOMEM;
1017 } else { 1017 } else {
1018 req->buf = data; 1018 req->buf = data;
@@ -2282,9 +2282,18 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,
2282 int i; 2282 int i;
2283 2283
2284 if (len < sizeof(*d) || 2284 if (len < sizeof(*d) ||
2285 d->bFirstInterfaceNumber >= ffs->interfaces_count || 2285 d->bFirstInterfaceNumber >= ffs->interfaces_count)
2286 !d->Reserved1)
2287 return -EINVAL; 2286 return -EINVAL;
2287 if (d->Reserved1 != 1) {
2288 /*
2289 * According to the spec, Reserved1 must be set to 1
2290 * but older kernels incorrectly rejected non-zero
2291 * values. We fix it here to avoid returning EINVAL
2292 * in response to values we used to accept.
2293 */
2294 pr_debug("usb_ext_compat_desc::Reserved1 forced to 1\n");
2295 d->Reserved1 = 1;
2296 }
2288 for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i) 2297 for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
2289 if (d->Reserved2[i]) 2298 if (d->Reserved2[i])
2290 return -EINVAL; 2299 return -EINVAL;
diff --git a/drivers/usb/gadget/legacy/Kconfig b/drivers/usb/gadget/legacy/Kconfig
index a12fb459dbd9..9570bbeced4f 100644
--- a/drivers/usb/gadget/legacy/Kconfig
+++ b/drivers/usb/gadget/legacy/Kconfig
@@ -13,6 +13,14 @@
13# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG). 13# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
14# 14#
15 15
16menuconfig USB_GADGET_LEGACY
17 bool "Legacy USB Gadget Support"
18 help
19 Legacy USB gadgets are USB gadgets that do not use the USB gadget
20 configfs interface.
21
22if USB_GADGET_LEGACY
23
16config USB_ZERO 24config USB_ZERO
17 tristate "Gadget Zero (DEVELOPMENT)" 25 tristate "Gadget Zero (DEVELOPMENT)"
18 select USB_LIBCOMPOSITE 26 select USB_LIBCOMPOSITE
@@ -490,3 +498,5 @@ config USB_G_WEBCAM
490 498
491 Say "y" to link the driver statically, or "m" to build a 499 Say "y" to link the driver statically, or "m" to build a
492 dynamically linked module called "g_webcam". 500 dynamically linked module called "g_webcam".
501
502endif
diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
index d39f070acbd7..01b44e159623 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_core.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
@@ -642,7 +642,6 @@ static const struct of_device_id bdc_of_match[] = {
642static struct platform_driver bdc_driver = { 642static struct platform_driver bdc_driver = {
643 .driver = { 643 .driver = {
644 .name = BRCM_BDC_NAME, 644 .name = BRCM_BDC_NAME,
645 .owner = THIS_MODULE,
646 .pm = &bdc_pm_ops, 645 .pm = &bdc_pm_ops,
647 .of_match_table = bdc_of_match, 646 .of_match_table = bdc_of_match,
648 }, 647 },
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 61422d624ad0..93eff7dec2f5 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -1069,8 +1069,12 @@ static inline void usb_gadget_udc_stop(struct usb_udc *udc)
1069static inline void usb_gadget_udc_set_speed(struct usb_udc *udc, 1069static inline void usb_gadget_udc_set_speed(struct usb_udc *udc,
1070 enum usb_device_speed speed) 1070 enum usb_device_speed speed)
1071{ 1071{
1072 if (udc->gadget->ops->udc_set_speed) 1072 if (udc->gadget->ops->udc_set_speed) {
1073 udc->gadget->ops->udc_set_speed(udc->gadget, speed); 1073 enum usb_device_speed s;
1074
1075 s = min(speed, udc->gadget->max_speed);
1076 udc->gadget->ops->udc_set_speed(udc->gadget, s);
1077 }
1074} 1078}
1075 1079
1076/** 1080/**
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index bc37f40baacf..6e87af248367 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -252,7 +252,7 @@
252#define USB3_EP0_SS_MAX_PACKET_SIZE 512 252#define USB3_EP0_SS_MAX_PACKET_SIZE 512
253#define USB3_EP0_HSFS_MAX_PACKET_SIZE 64 253#define USB3_EP0_HSFS_MAX_PACKET_SIZE 64
254#define USB3_EP0_BUF_SIZE 8 254#define USB3_EP0_BUF_SIZE 8
255#define USB3_MAX_NUM_PIPES 30 255#define USB3_MAX_NUM_PIPES 6 /* This includes PIPE 0 */
256#define USB3_WAIT_US 3 256#define USB3_WAIT_US 3
257#define USB3_DMA_NUM_SETTING_AREA 4 257#define USB3_DMA_NUM_SETTING_AREA 4
258/* 258/*
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 19f00424f53e..3ed75aaa09d9 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -827,7 +827,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
827 default: /* unknown */ 827 default: /* unknown */
828 break; 828 break;
829 } 829 }
830 temp = (cap >> 8) & 0xff; 830 offset = (cap >> 8) & 0xff;
831 } 831 }
832 } 832 }
833#endif 833#endif
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index e1fba4688509..15f7d422885f 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -934,6 +934,12 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id)
934 if (!vdev) 934 if (!vdev)
935 return; 935 return;
936 936
937 if (vdev->real_port == 0 ||
938 vdev->real_port > HCS_MAX_PORTS(xhci->hcs_params1)) {
939 xhci_dbg(xhci, "Bad vdev->real_port.\n");
940 goto out;
941 }
942
937 tt_list_head = &(xhci->rh_bw[vdev->real_port - 1].tts); 943 tt_list_head = &(xhci->rh_bw[vdev->real_port - 1].tts);
938 list_for_each_entry_safe(tt_info, next, tt_list_head, tt_list) { 944 list_for_each_entry_safe(tt_info, next, tt_list_head, tt_list) {
939 /* is this a hub device that added a tt_info to the tts list */ 945 /* is this a hub device that added a tt_info to the tts list */
@@ -947,6 +953,7 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id)
947 } 953 }
948 } 954 }
949 } 955 }
956out:
950 /* we are now at a leaf device */ 957 /* we are now at a leaf device */
951 xhci_debugfs_remove_slot(xhci, slot_id); 958 xhci_debugfs_remove_slot(xhci, slot_id);
952 xhci_free_virt_device(xhci, slot_id); 959 xhci_free_virt_device(xhci, slot_id);
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index c239c688076c..6eb87c6e4d24 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2477,12 +2477,16 @@ static int handle_tx_event(struct xhci_hcd *xhci,
2477 */ 2477 */
2478 if (list_empty(&ep_ring->td_list)) { 2478 if (list_empty(&ep_ring->td_list)) {
2479 /* 2479 /*
2480 * A stopped endpoint may generate an extra completion 2480 * Don't print wanings if it's due to a stopped endpoint
2481 * event if the device was suspended. Don't print 2481 * generating an extra completion event if the device
2482 * warnings. 2482 * was suspended. Or, a event for the last TRB of a
2483 * short TD we already got a short event for.
2484 * The short TD is already removed from the TD list.
2483 */ 2485 */
2486
2484 if (!(trb_comp_code == COMP_STOPPED || 2487 if (!(trb_comp_code == COMP_STOPPED ||
2485 trb_comp_code == COMP_STOPPED_LENGTH_INVALID)) { 2488 trb_comp_code == COMP_STOPPED_LENGTH_INVALID ||
2489 ep_ring->last_td_was_short)) {
2486 xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n", 2490 xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n",
2487 TRB_TO_SLOT_ID(le32_to_cpu(event->flags)), 2491 TRB_TO_SLOT_ID(le32_to_cpu(event->flags)),
2488 ep_index); 2492 ep_index);
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index aaa7d901a06d..3b3513874cfd 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -238,6 +238,7 @@ static void option_instat_callback(struct urb *urb);
238/* These Quectel products use Quectel's vendor ID */ 238/* These Quectel products use Quectel's vendor ID */
239#define QUECTEL_PRODUCT_EC21 0x0121 239#define QUECTEL_PRODUCT_EC21 0x0121
240#define QUECTEL_PRODUCT_EC25 0x0125 240#define QUECTEL_PRODUCT_EC25 0x0125
241#define QUECTEL_PRODUCT_BG96 0x0296
241 242
242#define CMOTECH_VENDOR_ID 0x16d8 243#define CMOTECH_VENDOR_ID 0x16d8
243#define CMOTECH_PRODUCT_6001 0x6001 244#define CMOTECH_PRODUCT_6001 0x6001
@@ -1182,6 +1183,8 @@ static const struct usb_device_id option_ids[] = {
1182 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1183 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1183 { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25), 1184 { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25),
1184 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1185 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1186 { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
1187 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1185 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, 1188 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
1186 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, 1189 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
1187 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), 1190 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index ab5a2ac4993a..aaf4813e4971 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -31,12 +31,14 @@ static const struct usb_device_id id_table[] = {
31}; 31};
32 32
33static const struct usb_device_id dbc_id_table[] = { 33static const struct usb_device_id dbc_id_table[] = {
34 { USB_DEVICE(0x1d6b, 0x0010) },
34 { USB_DEVICE(0x1d6b, 0x0011) }, 35 { USB_DEVICE(0x1d6b, 0x0011) },
35 { }, 36 { },
36}; 37};
37 38
38static const struct usb_device_id id_table_combined[] = { 39static const struct usb_device_id id_table_combined[] = {
39 { USB_DEVICE(0x0525, 0x127a) }, 40 { USB_DEVICE(0x0525, 0x127a) },
41 { USB_DEVICE(0x1d6b, 0x0010) },
40 { USB_DEVICE(0x1d6b, 0x0011) }, 42 { USB_DEVICE(0x1d6b, 0x0011) },
41 { }, 43 { },
42}; 44};
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 1fcd758a961f..3734a25e09e5 100644
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -112,6 +112,10 @@ static int uas_use_uas_driver(struct usb_interface *intf,
112 } 112 }
113 } 113 }
114 114
115 /* All Seagate disk enclosures have broken ATA pass-through support */
116 if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2)
117 flags |= US_FL_NO_ATA_1X;
118
115 usb_stor_adjust_quirks(udev, &flags); 119 usb_stor_adjust_quirks(udev, &flags);
116 120
117 if (flags & US_FL_IGNORE_UAS) { 121 if (flags & US_FL_IGNORE_UAS) {
diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
index 465d7da849c3..bcb2744c5977 100644
--- a/drivers/usb/typec/Kconfig
+++ b/drivers/usb/typec/Kconfig
@@ -1,13 +1,53 @@
1 1
2menu "USB Power Delivery and Type-C drivers" 2menuconfig TYPEC
3 tristate "USB Type-C Support"
4 help
5 USB Type-C Specification defines a cable and connector for USB where
6 only one type of plug is supported on both ends, i.e. there will not
7 be Type-A plug on one end of the cable and Type-B plug on the other.
8 Determination of the host-to-device relationship happens through a
9 specific Configuration Channel (CC) which goes through the USB Type-C
10 cable. The Configuration Channel may also be used to detect optional
11 Accessory Modes - Analog Audio and Debug - and if USB Power Delivery
12 is supported, the Alternate Modes, where the connector is used for
13 something else then USB communication.
14
15 USB Power Delivery Specification defines a protocol that can be used
16 to negotiate the voltage and current levels with the connected
17 partners. USB Power Delivery allows higher voltages then the normal
18 5V, up to 20V, and current up to 5A over the cable. The USB Power
19 Delivery protocol is also used to negotiate the optional Alternate
20 Modes when they are supported. USB Power Delivery does not depend on
21 USB Type-C connector, however it is mostly used together with USB
22 Type-C connectors.
23
24 USB Type-C and USB Power Delivery Specifications define a set of state
25 machines that need to be implemented in either software or firmware.
26 Simple USB Type-C PHYs, for example USB Type-C Port Controller
27 Interface Specification compliant "Port Controllers" need the state
28 machines to be handled in the OS, but stand-alone USB Type-C and Power
29 Delivery controllers handle the state machines inside their firmware.
30 The USB Type-C and Power Delivery controllers usually function
31 autonomously, and do not necessarily require drivers.
32
33 Enable this configurations option if you have USB Type-C connectors on
34 your system and 1) you know your USB Type-C hardware requires OS
35 control (a driver) to function, or 2) if you need to be able to read
36 the status of the USB Type-C ports in your system, or 3) if you need
37 to be able to swap the power role (decide are you supplying or
38 consuming power over the cable) or data role (host or device) when
39 both roles are supported.
40
41 For more information, see the kernel documentation for USB Type-C
42 Connector Class API (Documentation/driver-api/usb/typec.rst)
43 <https://www.kernel.org/doc/html/latest/driver-api/usb/typec.html>
44 and ABI (Documentation/ABI/testing/sysfs-class-typec).
3 45
4config TYPEC 46if TYPEC
5 tristate
6 47
7config TYPEC_TCPM 48config TYPEC_TCPM
8 tristate "USB Type-C Port Controller Manager" 49 tristate "USB Type-C Port Controller Manager"
9 depends on USB 50 depends on USB
10 select TYPEC
11 help 51 help
12 The Type-C Port Controller Manager provides a USB PD and USB Type-C 52 The Type-C Port Controller Manager provides a USB PD and USB Type-C
13 state machine for use with Type-C Port Controllers. 53 state machine for use with Type-C Port Controllers.
@@ -22,7 +62,6 @@ config TYPEC_WCOVE
22 depends on INTEL_SOC_PMIC 62 depends on INTEL_SOC_PMIC
23 depends on INTEL_PMC_IPC 63 depends on INTEL_PMC_IPC
24 depends on BXT_WC_PMIC_OPREGION 64 depends on BXT_WC_PMIC_OPREGION
25 select TYPEC
26 help 65 help
27 This driver adds support for USB Type-C detection on Intel Broxton 66 This driver adds support for USB Type-C detection on Intel Broxton
28 platforms that have Intel Whiskey Cove PMIC. The driver can detect the 67 platforms that have Intel Whiskey Cove PMIC. The driver can detect the
@@ -31,14 +70,13 @@ config TYPEC_WCOVE
31 To compile this driver as module, choose M here: the module will be 70 To compile this driver as module, choose M here: the module will be
32 called typec_wcove 71 called typec_wcove
33 72
34endif 73endif # TYPEC_TCPM
35 74
36source "drivers/usb/typec/ucsi/Kconfig" 75source "drivers/usb/typec/ucsi/Kconfig"
37 76
38config TYPEC_TPS6598X 77config TYPEC_TPS6598X
39 tristate "TI TPS6598x USB Power Delivery controller driver" 78 tristate "TI TPS6598x USB Power Delivery controller driver"
40 depends on I2C 79 depends on I2C
41 select TYPEC
42 help 80 help
43 Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power 81 Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power
44 Delivery controller. 82 Delivery controller.
@@ -46,4 +84,4 @@ config TYPEC_TPS6598X
46 If you choose to build this driver as a dynamically linked module, the 84 If you choose to build this driver as a dynamically linked module, the
47 module will be called tps6598x.ko. 85 module will be called tps6598x.ko.
48 86
49endmenu 87endif # TYPEC
diff --git a/drivers/usb/typec/ucsi/Kconfig b/drivers/usb/typec/ucsi/Kconfig
index d0c31cee4720..e36d6c73c4a4 100644
--- a/drivers/usb/typec/ucsi/Kconfig
+++ b/drivers/usb/typec/ucsi/Kconfig
@@ -1,7 +1,6 @@
1config TYPEC_UCSI 1config TYPEC_UCSI
2 tristate "USB Type-C Connector System Software Interface driver" 2 tristate "USB Type-C Connector System Software Interface driver"
3 depends on !CPU_BIG_ENDIAN 3 depends on !CPU_BIG_ENDIAN
4 select TYPEC
5 help 4 help
6 USB Type-C Connector System Software Interface (UCSI) is a 5 USB Type-C Connector System Software Interface (UCSI) is a
7 specification for an interface that allows the operating system to 6 specification for an interface that allows the operating system to
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 713e94170963..6b3278c4b72a 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -1098,7 +1098,6 @@ static int hcd_name_to_id(const char *name)
1098static int vhci_setup(struct usb_hcd *hcd) 1098static int vhci_setup(struct usb_hcd *hcd)
1099{ 1099{
1100 struct vhci *vhci = *((void **)dev_get_platdata(hcd->self.controller)); 1100 struct vhci *vhci = *((void **)dev_get_platdata(hcd->self.controller));
1101 hcd->self.sg_tablesize = ~0;
1102 if (usb_hcd_is_primary_hcd(hcd)) { 1101 if (usb_hcd_is_primary_hcd(hcd)) {
1103 vhci->vhci_hcd_hs = hcd_to_vhci_hcd(hcd); 1102 vhci->vhci_hcd_hs = hcd_to_vhci_hcd(hcd);
1104 vhci->vhci_hcd_hs->vhci = vhci; 1103 vhci->vhci_hcd_hs->vhci = vhci;
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 8d626d7c2e7e..c7bdeb655646 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -778,16 +778,6 @@ static void handle_rx(struct vhost_net *net)
778 /* On error, stop handling until the next kick. */ 778 /* On error, stop handling until the next kick. */
779 if (unlikely(headcount < 0)) 779 if (unlikely(headcount < 0))
780 goto out; 780 goto out;
781 if (nvq->rx_array)
782 msg.msg_control = vhost_net_buf_consume(&nvq->rxq);
783 /* On overrun, truncate and discard */
784 if (unlikely(headcount > UIO_MAXIOV)) {
785 iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1);
786 err = sock->ops->recvmsg(sock, &msg,
787 1, MSG_DONTWAIT | MSG_TRUNC);
788 pr_debug("Discarded rx packet: len %zd\n", sock_len);
789 continue;
790 }
791 /* OK, now we need to know about added descriptors. */ 781 /* OK, now we need to know about added descriptors. */
792 if (!headcount) { 782 if (!headcount) {
793 if (unlikely(vhost_enable_notify(&net->dev, vq))) { 783 if (unlikely(vhost_enable_notify(&net->dev, vq))) {
@@ -800,6 +790,16 @@ static void handle_rx(struct vhost_net *net)
800 * they refilled. */ 790 * they refilled. */
801 goto out; 791 goto out;
802 } 792 }
793 if (nvq->rx_array)
794 msg.msg_control = vhost_net_buf_consume(&nvq->rxq);
795 /* On overrun, truncate and discard */
796 if (unlikely(headcount > UIO_MAXIOV)) {
797 iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1);
798 err = sock->ops->recvmsg(sock, &msg,
799 1, MSG_DONTWAIT | MSG_TRUNC);
800 pr_debug("Discarded rx packet: len %zd\n", sock_len);
801 continue;
802 }
803 /* We don't need to be notified again. */ 803 /* We don't need to be notified again. */
804 iov_iter_init(&msg.msg_iter, READ, vq->iov, in, vhost_len); 804 iov_iter_init(&msg.msg_iter, READ, vq->iov, in, vhost_len);
805 fixup = msg.msg_iter; 805 fixup = msg.msg_iter;
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 48230a5e12f2..bf7ff3934d7f 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -333,6 +333,8 @@ int register_virtio_device(struct virtio_device *dev)
333 /* device_register() causes the bus infrastructure to look for a 333 /* device_register() causes the bus infrastructure to look for a
334 * matching driver. */ 334 * matching driver. */
335 err = device_register(&dev->dev); 335 err = device_register(&dev->dev);
336 if (err)
337 ida_simple_remove(&virtio_index_ida, dev->index);
336out: 338out:
337 if (err) 339 if (err)
338 virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED); 340 virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 7960746f7597..a1fb52cb3f0a 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -174,13 +174,12 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num)
174 while ((page = balloon_page_pop(&pages))) { 174 while ((page = balloon_page_pop(&pages))) {
175 balloon_page_enqueue(&vb->vb_dev_info, page); 175 balloon_page_enqueue(&vb->vb_dev_info, page);
176 176
177 vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE;
178
179 set_page_pfns(vb, vb->pfns + vb->num_pfns, page); 177 set_page_pfns(vb, vb->pfns + vb->num_pfns, page);
180 vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; 178 vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE;
181 if (!virtio_has_feature(vb->vdev, 179 if (!virtio_has_feature(vb->vdev,
182 VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) 180 VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
183 adjust_managed_page_count(page, -1); 181 adjust_managed_page_count(page, -1);
182 vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE;
184 } 183 }
185 184
186 num_allocated_pages = vb->num_pfns; 185 num_allocated_pages = vb->num_pfns;
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 74dc7170fd35..a9192fe4f345 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -493,7 +493,16 @@ static const struct virtio_config_ops virtio_mmio_config_ops = {
493}; 493};
494 494
495 495
496static void virtio_mmio_release_dev_empty(struct device *_d) {} 496static void virtio_mmio_release_dev(struct device *_d)
497{
498 struct virtio_device *vdev =
499 container_of(_d, struct virtio_device, dev);
500 struct virtio_mmio_device *vm_dev =
501 container_of(vdev, struct virtio_mmio_device, vdev);
502 struct platform_device *pdev = vm_dev->pdev;
503
504 devm_kfree(&pdev->dev, vm_dev);
505}
497 506
498/* Platform device */ 507/* Platform device */
499 508
@@ -513,25 +522,30 @@ static int virtio_mmio_probe(struct platform_device *pdev)
513 return -EBUSY; 522 return -EBUSY;
514 523
515 vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); 524 vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL);
516 if (!vm_dev) 525 if (!vm_dev) {
517 return -ENOMEM; 526 rc = -ENOMEM;
527 goto free_mem;
528 }
518 529
519 vm_dev->vdev.dev.parent = &pdev->dev; 530 vm_dev->vdev.dev.parent = &pdev->dev;
520 vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; 531 vm_dev->vdev.dev.release = virtio_mmio_release_dev;
521 vm_dev->vdev.config = &virtio_mmio_config_ops; 532 vm_dev->vdev.config = &virtio_mmio_config_ops;
522 vm_dev->pdev = pdev; 533 vm_dev->pdev = pdev;
523 INIT_LIST_HEAD(&vm_dev->virtqueues); 534 INIT_LIST_HEAD(&vm_dev->virtqueues);
524 spin_lock_init(&vm_dev->lock); 535 spin_lock_init(&vm_dev->lock);
525 536
526 vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); 537 vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem));
527 if (vm_dev->base == NULL) 538 if (vm_dev->base == NULL) {
528 return -EFAULT; 539 rc = -EFAULT;
540 goto free_vmdev;
541 }
529 542
530 /* Check magic value */ 543 /* Check magic value */
531 magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE); 544 magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE);
532 if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) { 545 if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
533 dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic); 546 dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic);
534 return -ENODEV; 547 rc = -ENODEV;
548 goto unmap;
535 } 549 }
536 550
537 /* Check device version */ 551 /* Check device version */
@@ -539,7 +553,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)
539 if (vm_dev->version < 1 || vm_dev->version > 2) { 553 if (vm_dev->version < 1 || vm_dev->version > 2) {
540 dev_err(&pdev->dev, "Version %ld not supported!\n", 554 dev_err(&pdev->dev, "Version %ld not supported!\n",
541 vm_dev->version); 555 vm_dev->version);
542 return -ENXIO; 556 rc = -ENXIO;
557 goto unmap;
543 } 558 }
544 559
545 vm_dev->vdev.id.device = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_ID); 560 vm_dev->vdev.id.device = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_ID);
@@ -548,7 +563,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)
548 * virtio-mmio device with an ID 0 is a (dummy) placeholder 563 * virtio-mmio device with an ID 0 is a (dummy) placeholder
549 * with no function. End probing now with no error reported. 564 * with no function. End probing now with no error reported.
550 */ 565 */
551 return -ENODEV; 566 rc = -ENODEV;
567 goto unmap;
552 } 568 }
553 vm_dev->vdev.id.vendor = readl(vm_dev->base + VIRTIO_MMIO_VENDOR_ID); 569 vm_dev->vdev.id.vendor = readl(vm_dev->base + VIRTIO_MMIO_VENDOR_ID);
554 570
@@ -573,13 +589,34 @@ static int virtio_mmio_probe(struct platform_device *pdev)
573 589
574 platform_set_drvdata(pdev, vm_dev); 590 platform_set_drvdata(pdev, vm_dev);
575 591
576 return register_virtio_device(&vm_dev->vdev); 592 rc = register_virtio_device(&vm_dev->vdev);
593 if (rc) {
594 iounmap(vm_dev->base);
595 devm_release_mem_region(&pdev->dev, mem->start,
596 resource_size(mem));
597 put_device(&vm_dev->vdev.dev);
598 }
599 return rc;
600unmap:
601 iounmap(vm_dev->base);
602free_mem:
603 devm_release_mem_region(&pdev->dev, mem->start,
604 resource_size(mem));
605free_vmdev:
606 devm_kfree(&pdev->dev, vm_dev);
607 return rc;
577} 608}
578 609
579static int virtio_mmio_remove(struct platform_device *pdev) 610static int virtio_mmio_remove(struct platform_device *pdev)
580{ 611{
581 struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev); 612 struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
613 struct resource *mem;
582 614
615 iounmap(vm_dev->base);
616 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
617 if (mem)
618 devm_release_mem_region(&pdev->dev, mem->start,
619 resource_size(mem));
583 unregister_virtio_device(&vm_dev->vdev); 620 unregister_virtio_device(&vm_dev->vdev);
584 621
585 return 0; 622 return 0;
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 40caa92bff33..d1e1d8d2b9d5 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -1103,7 +1103,7 @@ static int pvcalls_front_remove(struct xenbus_device *dev)
1103 kfree(map); 1103 kfree(map);
1104 } 1104 }
1105 } 1105 }
1106 if (bedata->ref >= 0) 1106 if (bedata->ref != -1)
1107 gnttab_end_foreign_access(bedata->ref, 0, 0); 1107 gnttab_end_foreign_access(bedata->ref, 0, 0);
1108 kfree(bedata->ring.sring); 1108 kfree(bedata->ring.sring);
1109 kfree(bedata); 1109 kfree(bedata);
@@ -1128,6 +1128,8 @@ static int pvcalls_front_probe(struct xenbus_device *dev,
1128 } 1128 }
1129 1129
1130 versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len); 1130 versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
1131 if (IS_ERR(versions))
1132 return PTR_ERR(versions);
1131 if (!len) 1133 if (!len)
1132 return -EINVAL; 1134 return -EINVAL;
1133 if (strcmp(versions, "1")) { 1135 if (strcmp(versions, "1")) {
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 531e0a8645b0..1e74cf826532 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1032,14 +1032,17 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
1032 root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) && 1032 root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) &&
1033 !(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) { 1033 !(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) {
1034 ret = btrfs_inc_ref(trans, root, buf, 1); 1034 ret = btrfs_inc_ref(trans, root, buf, 1);
1035 BUG_ON(ret); /* -ENOMEM */ 1035 if (ret)
1036 return ret;
1036 1037
1037 if (root->root_key.objectid == 1038 if (root->root_key.objectid ==
1038 BTRFS_TREE_RELOC_OBJECTID) { 1039 BTRFS_TREE_RELOC_OBJECTID) {
1039 ret = btrfs_dec_ref(trans, root, buf, 0); 1040 ret = btrfs_dec_ref(trans, root, buf, 0);
1040 BUG_ON(ret); /* -ENOMEM */ 1041 if (ret)
1042 return ret;
1041 ret = btrfs_inc_ref(trans, root, cow, 1); 1043 ret = btrfs_inc_ref(trans, root, cow, 1);
1042 BUG_ON(ret); /* -ENOMEM */ 1044 if (ret)
1045 return ret;
1043 } 1046 }
1044 new_flags |= BTRFS_BLOCK_FLAG_FULL_BACKREF; 1047 new_flags |= BTRFS_BLOCK_FLAG_FULL_BACKREF;
1045 } else { 1048 } else {
@@ -1049,7 +1052,8 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
1049 ret = btrfs_inc_ref(trans, root, cow, 1); 1052 ret = btrfs_inc_ref(trans, root, cow, 1);
1050 else 1053 else
1051 ret = btrfs_inc_ref(trans, root, cow, 0); 1054 ret = btrfs_inc_ref(trans, root, cow, 0);
1052 BUG_ON(ret); /* -ENOMEM */ 1055 if (ret)
1056 return ret;
1053 } 1057 }
1054 if (new_flags != 0) { 1058 if (new_flags != 0) {
1055 int level = btrfs_header_level(buf); 1059 int level = btrfs_header_level(buf);
@@ -1068,9 +1072,11 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
1068 ret = btrfs_inc_ref(trans, root, cow, 1); 1072 ret = btrfs_inc_ref(trans, root, cow, 1);
1069 else 1073 else
1070 ret = btrfs_inc_ref(trans, root, cow, 0); 1074 ret = btrfs_inc_ref(trans, root, cow, 0);
1071 BUG_ON(ret); /* -ENOMEM */ 1075 if (ret)
1076 return ret;
1072 ret = btrfs_dec_ref(trans, root, buf, 1); 1077 ret = btrfs_dec_ref(trans, root, buf, 1);
1073 BUG_ON(ret); /* -ENOMEM */ 1078 if (ret)
1079 return ret;
1074 } 1080 }
1075 clean_tree_block(fs_info, buf); 1081 clean_tree_block(fs_info, buf);
1076 *last_ref = 1; 1082 *last_ref = 1;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 10a2a579cc7f..a8ecccfc36de 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3231,6 +3231,7 @@ static int write_dev_supers(struct btrfs_device *device,
3231 int errors = 0; 3231 int errors = 0;
3232 u32 crc; 3232 u32 crc;
3233 u64 bytenr; 3233 u64 bytenr;
3234 int op_flags;
3234 3235
3235 if (max_mirrors == 0) 3236 if (max_mirrors == 0)
3236 max_mirrors = BTRFS_SUPER_MIRROR_MAX; 3237 max_mirrors = BTRFS_SUPER_MIRROR_MAX;
@@ -3273,13 +3274,10 @@ static int write_dev_supers(struct btrfs_device *device,
3273 * we fua the first super. The others we allow 3274 * we fua the first super. The others we allow
3274 * to go down lazy. 3275 * to go down lazy.
3275 */ 3276 */
3276 if (i == 0) { 3277 op_flags = REQ_SYNC | REQ_META | REQ_PRIO;
3277 ret = btrfsic_submit_bh(REQ_OP_WRITE, 3278 if (i == 0 && !btrfs_test_opt(device->fs_info, NOBARRIER))
3278 REQ_SYNC | REQ_FUA | REQ_META | REQ_PRIO, bh); 3279 op_flags |= REQ_FUA;
3279 } else { 3280 ret = btrfsic_submit_bh(REQ_OP_WRITE, op_flags, bh);
3280 ret = btrfsic_submit_bh(REQ_OP_WRITE,
3281 REQ_SYNC | REQ_META | REQ_PRIO, bh);
3282 }
3283 if (ret) 3281 if (ret)
3284 errors++; 3282 errors++;
3285 } 3283 }
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 4497f937e8fb..2f4328511ac8 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -9206,6 +9206,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
9206 ret = btrfs_del_root(trans, fs_info, &root->root_key); 9206 ret = btrfs_del_root(trans, fs_info, &root->root_key);
9207 if (ret) { 9207 if (ret) {
9208 btrfs_abort_transaction(trans, ret); 9208 btrfs_abort_transaction(trans, ret);
9209 err = ret;
9209 goto out_end_trans; 9210 goto out_end_trans;
9210 } 9211 }
9211 9212
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 993061f83067..e1a7f3cb5be9 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3005,6 +3005,8 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
3005 compress_type = ordered_extent->compress_type; 3005 compress_type = ordered_extent->compress_type;
3006 if (test_bit(BTRFS_ORDERED_PREALLOC, &ordered_extent->flags)) { 3006 if (test_bit(BTRFS_ORDERED_PREALLOC, &ordered_extent->flags)) {
3007 BUG_ON(compress_type); 3007 BUG_ON(compress_type);
3008 btrfs_qgroup_free_data(inode, NULL, ordered_extent->file_offset,
3009 ordered_extent->len);
3008 ret = btrfs_mark_extent_written(trans, BTRFS_I(inode), 3010 ret = btrfs_mark_extent_written(trans, BTRFS_I(inode),
3009 ordered_extent->file_offset, 3011 ordered_extent->file_offset,
3010 ordered_extent->file_offset + 3012 ordered_extent->file_offset +
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d748ad1c3620..2ef8acaac688 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2206,7 +2206,7 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,
2206 if (!path) 2206 if (!path)
2207 return -ENOMEM; 2207 return -ENOMEM;
2208 2208
2209 ptr = &name[BTRFS_INO_LOOKUP_PATH_MAX]; 2209 ptr = &name[BTRFS_INO_LOOKUP_PATH_MAX - 1];
2210 2210
2211 key.objectid = tree_id; 2211 key.objectid = tree_id;
2212 key.type = BTRFS_ROOT_ITEM_KEY; 2212 key.type = BTRFS_ROOT_ITEM_KEY;
diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c
index 8d6b7e35faf9..c83ece7facc5 100644
--- a/fs/hpfs/dir.c
+++ b/fs/hpfs/dir.c
@@ -150,7 +150,6 @@ static int hpfs_readdir(struct file *file, struct dir_context *ctx)
150 if (unlikely(ret < 0)) 150 if (unlikely(ret < 0))
151 goto out; 151 goto out;
152 ctx->pos = ((loff_t) hpfs_de_as_down_as_possible(inode->i_sb, hpfs_inode->i_dno) << 4) + 1; 152 ctx->pos = ((loff_t) hpfs_de_as_down_as_possible(inode->i_sb, hpfs_inode->i_dno) << 4) + 1;
153 file->f_version = inode->i_version;
154 } 153 }
155 next_pos = ctx->pos; 154 next_pos = ctx->pos;
156 if (!(de = map_pos_dirent(inode, &next_pos, &qbh))) { 155 if (!(de = map_pos_dirent(inode, &next_pos, &qbh))) {
diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 3b834563b1f1..a4ad18afbdec 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -419,7 +419,6 @@ int hpfs_add_dirent(struct inode *i,
419 c = 1; 419 c = 1;
420 goto ret; 420 goto ret;
421 } 421 }
422 i->i_version++;
423 c = hpfs_add_to_dnode(i, dno, name, namelen, new_de, 0); 422 c = hpfs_add_to_dnode(i, dno, name, namelen, new_de, 0);
424 ret: 423 ret:
425 return c; 424 return c;
@@ -726,7 +725,6 @@ int hpfs_remove_dirent(struct inode *i, dnode_secno dno, struct hpfs_dirent *de,
726 return 2; 725 return 2;
727 } 726 }
728 } 727 }
729 i->i_version++;
730 for_all_poss(i, hpfs_pos_del, (t = get_pos(dnode, de)) + 1, 1); 728 for_all_poss(i, hpfs_pos_del, (t = get_pos(dnode, de)) + 1, 1);
731 hpfs_delete_de(i->i_sb, dnode, de); 729 hpfs_delete_de(i->i_sb, dnode, de);
732 hpfs_mark_4buffers_dirty(qbh); 730 hpfs_mark_4buffers_dirty(qbh);
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index c45a3b9b9ac7..f2c3ebcd309c 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -235,7 +235,6 @@ static struct inode *hpfs_alloc_inode(struct super_block *sb)
235 ei = kmem_cache_alloc(hpfs_inode_cachep, GFP_NOFS); 235 ei = kmem_cache_alloc(hpfs_inode_cachep, GFP_NOFS);
236 if (!ei) 236 if (!ei)
237 return NULL; 237 return NULL;
238 ei->vfs_inode.i_version = 1;
239 return &ei->vfs_inode; 238 return &ei->vfs_inode;
240} 239}
241 240
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 28fa85276eec..60316b52d659 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2268,7 +2268,7 @@ static int show_timer(struct seq_file *m, void *v)
2268 notify = timer->it_sigev_notify; 2268 notify = timer->it_sigev_notify;
2269 2269
2270 seq_printf(m, "ID: %d\n", timer->it_id); 2270 seq_printf(m, "ID: %d\n", timer->it_id);
2271 seq_printf(m, "signal: %d/%p\n", 2271 seq_printf(m, "signal: %d/%px\n",
2272 timer->sigq->info.si_signo, 2272 timer->sigq->info.si_signo,
2273 timer->sigq->info.si_value.sival_ptr); 2273 timer->sigq->info.si_value.sival_ptr);
2274 seq_printf(m, "notify: %s/%s.%d\n", 2274 seq_printf(m, "notify: %s/%s.%d\n",
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index df9807a3caae..a4649c56ca2f 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -916,6 +916,14 @@ struct drm_connector {
916 uint8_t num_h_tile, num_v_tile; 916 uint8_t num_h_tile, num_v_tile;
917 uint8_t tile_h_loc, tile_v_loc; 917 uint8_t tile_h_loc, tile_v_loc;
918 uint16_t tile_h_size, tile_v_size; 918 uint16_t tile_h_size, tile_v_size;
919
920 /**
921 * @free_work:
922 *
923 * Work used only by &drm_connector_iter to be able to clean up a
924 * connector from any context.
925 */
926 struct work_struct free_work;
919}; 927};
920 928
921#define obj_to_connector(x) container_of(x, struct drm_connector, base) 929#define obj_to_connector(x) container_of(x, struct drm_connector, base)
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
index 01ee473517e2..6e45608b2399 100644
--- a/include/kvm/arm_arch_timer.h
+++ b/include/kvm/arm_arch_timer.h
@@ -93,7 +93,4 @@ void kvm_timer_init_vhe(void);
93#define vcpu_vtimer(v) (&(v)->arch.timer_cpu.vtimer) 93#define vcpu_vtimer(v) (&(v)->arch.timer_cpu.vtimer)
94#define vcpu_ptimer(v) (&(v)->arch.timer_cpu.ptimer) 94#define vcpu_ptimer(v) (&(v)->arch.timer_cpu.ptimer)
95 95
96void enable_el1_phys_timer_access(void);
97void disable_el1_phys_timer_access(void);
98
99#endif 96#endif
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index f36ecc2a5712..3b0ba54cc4d5 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -216,6 +216,8 @@ static inline void debugfs_remove(struct dentry *dentry)
216static inline void debugfs_remove_recursive(struct dentry *dentry) 216static inline void debugfs_remove_recursive(struct dentry *dentry)
217{ } 217{ }
218 218
219const struct file_operations *debugfs_real_fops(const struct file *filp);
220
219static inline int debugfs_file_get(struct dentry *dentry) 221static inline int debugfs_file_get(struct dentry *dentry)
220{ 222{
221 return 0; 223 return 0;
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index e8f8e8fb244d..81ed9b2d84dc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -704,7 +704,6 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
704 return ret; 704 return ret;
705} 705}
706 706
707#ifdef CONFIG_HAS_DMA
708static inline int dma_get_cache_alignment(void) 707static inline int dma_get_cache_alignment(void)
709{ 708{
710#ifdef ARCH_DMA_MINALIGN 709#ifdef ARCH_DMA_MINALIGN
@@ -712,7 +711,6 @@ static inline int dma_get_cache_alignment(void)
712#endif 711#endif
713 return 1; 712 return 1;
714} 713}
715#endif
716 714
717/* flags for the coherent memory api */ 715/* flags for the coherent memory api */
718#define DMA_MEMORY_EXCLUSIVE 0x01 716#define DMA_MEMORY_EXCLUSIVE 0x01
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index f3e97c5f94c9..6c9336626592 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -708,6 +708,7 @@ struct vmbus_channel {
708 u8 monitor_bit; 708 u8 monitor_bit;
709 709
710 bool rescind; /* got rescind msg */ 710 bool rescind; /* got rescind msg */
711 struct completion rescind_event;
711 712
712 u32 ringbuffer_gpadlhandle; 713 u32 ringbuffer_gpadlhandle;
713 714
diff --git a/include/linux/iio/timer/stm32-lptim-trigger.h b/include/linux/iio/timer/stm32-lptim-trigger.h
index 34d59bfdce2d..464458d20b16 100644
--- a/include/linux/iio/timer/stm32-lptim-trigger.h
+++ b/include/linux/iio/timer/stm32-lptim-trigger.h
@@ -16,11 +16,14 @@
16#define LPTIM2_OUT "lptim2_out" 16#define LPTIM2_OUT "lptim2_out"
17#define LPTIM3_OUT "lptim3_out" 17#define LPTIM3_OUT "lptim3_out"
18 18
19#if IS_ENABLED(CONFIG_IIO_STM32_LPTIMER_TRIGGER) 19#if IS_REACHABLE(CONFIG_IIO_STM32_LPTIMER_TRIGGER)
20bool is_stm32_lptim_trigger(struct iio_trigger *trig); 20bool is_stm32_lptim_trigger(struct iio_trigger *trig);
21#else 21#else
22static inline bool is_stm32_lptim_trigger(struct iio_trigger *trig) 22static inline bool is_stm32_lptim_trigger(struct iio_trigger *trig)
23{ 23{
24#if IS_ENABLED(CONFIG_IIO_STM32_LPTIMER_TRIGGER)
25 pr_warn_once("stm32 lptim_trigger not linked in\n");
26#endif
24 return false; 27 return false;
25} 28}
26#endif 29#endif
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index dd418955962b..39fb3700f7a9 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -230,7 +230,7 @@ irq_set_chip_handler_name_locked(struct irq_data *data, struct irq_chip *chip,
230 data->chip = chip; 230 data->chip = chip;
231} 231}
232 232
233static inline int irq_balancing_disabled(unsigned int irq) 233static inline bool irq_balancing_disabled(unsigned int irq)
234{ 234{
235 struct irq_desc *desc; 235 struct irq_desc *desc;
236 236
@@ -238,7 +238,7 @@ static inline int irq_balancing_disabled(unsigned int irq)
238 return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; 238 return desc->status_use_accessors & IRQ_NO_BALANCING_MASK;
239} 239}
240 240
241static inline int irq_is_percpu(unsigned int irq) 241static inline bool irq_is_percpu(unsigned int irq)
242{ 242{
243 struct irq_desc *desc; 243 struct irq_desc *desc;
244 244
@@ -246,7 +246,7 @@ static inline int irq_is_percpu(unsigned int irq)
246 return desc->status_use_accessors & IRQ_PER_CPU; 246 return desc->status_use_accessors & IRQ_PER_CPU;
247} 247}
248 248
249static inline int irq_is_percpu_devid(unsigned int irq) 249static inline bool irq_is_percpu_devid(unsigned int irq)
250{ 250{
251 struct irq_desc *desc; 251 struct irq_desc *desc;
252 252
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/include/linux/kmemcheck.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 893d6d606cd0..6bdd4b9f6611 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -232,7 +232,7 @@ struct kvm_vcpu {
232 struct mutex mutex; 232 struct mutex mutex;
233 struct kvm_run *run; 233 struct kvm_run *run;
234 234
235 int guest_fpu_loaded, guest_xcr0_loaded; 235 int guest_xcr0_loaded;
236 struct swait_queue_head wq; 236 struct swait_queue_head wq;
237 struct pid __rcu *pid; 237 struct pid __rcu *pid;
238 int sigset_active; 238 int sigset_active;
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 2c9c87d8a0c1..7546822a1d74 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -15,6 +15,7 @@
15#define _LINUX_PERF_EVENT_H 15#define _LINUX_PERF_EVENT_H
16 16
17#include <uapi/linux/perf_event.h> 17#include <uapi/linux/perf_event.h>
18#include <uapi/linux/bpf_perf_event.h>
18 19
19/* 20/*
20 * Kernel-internal data types and definitions: 21 * Kernel-internal data types and definitions:
@@ -787,7 +788,7 @@ struct perf_output_handle {
787}; 788};
788 789
789struct bpf_perf_event_data_kern { 790struct bpf_perf_event_data_kern {
790 struct pt_regs *regs; 791 bpf_user_pt_regs_t *regs;
791 struct perf_sample_data *data; 792 struct perf_sample_data *data;
792 struct perf_event *event; 793 struct perf_event *event;
793}; 794};
@@ -1177,6 +1178,9 @@ extern void perf_bp_event(struct perf_event *event, void *data);
1177 (user_mode(regs) ? PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL) 1178 (user_mode(regs) ? PERF_RECORD_MISC_USER : PERF_RECORD_MISC_KERNEL)
1178# define perf_instruction_pointer(regs) instruction_pointer(regs) 1179# define perf_instruction_pointer(regs) instruction_pointer(regs)
1179#endif 1180#endif
1181#ifndef perf_arch_bpf_user_pt_regs
1182# define perf_arch_bpf_user_pt_regs(regs) regs
1183#endif
1180 1184
1181static inline bool has_branch_stack(struct perf_event *event) 1185static inline bool has_branch_stack(struct perf_event *event)
1182{ 1186{
diff --git a/include/linux/pm.h b/include/linux/pm.h
index b5a40b713e9e..e723b78d8357 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -772,6 +772,7 @@ extern int pm_generic_poweroff_late(struct device *dev);
772extern int pm_generic_poweroff(struct device *dev); 772extern int pm_generic_poweroff(struct device *dev);
773extern void pm_generic_complete(struct device *dev); 773extern void pm_generic_complete(struct device *dev);
774 774
775extern void dev_pm_skip_next_resume_phases(struct device *dev);
775extern bool dev_pm_may_skip_resume(struct device *dev); 776extern bool dev_pm_may_skip_resume(struct device *dev);
776extern bool dev_pm_smart_suspend_and_suspended(struct device *dev); 777extern bool dev_pm_smart_suspend_and_suspended(struct device *dev);
777 778
diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h
index a328e8181e49..e4b257ff881b 100644
--- a/include/linux/rculist_nulls.h
+++ b/include/linux/rculist_nulls.h
@@ -101,44 +101,6 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n,
101} 101}
102 102
103/** 103/**
104 * hlist_nulls_add_tail_rcu
105 * @n: the element to add to the hash list.
106 * @h: the list to add to.
107 *
108 * Description:
109 * Adds the specified element to the end of the specified hlist_nulls,
110 * while permitting racing traversals. NOTE: tail insertion requires
111 * list traversal.
112 *
113 * The caller must take whatever precautions are necessary
114 * (such as holding appropriate locks) to avoid racing
115 * with another list-mutation primitive, such as hlist_nulls_add_head_rcu()
116 * or hlist_nulls_del_rcu(), running on this same list.
117 * However, it is perfectly legal to run concurrently with
118 * the _rcu list-traversal primitives, such as
119 * hlist_nulls_for_each_entry_rcu(), used to prevent memory-consistency
120 * problems on Alpha CPUs. Regardless of the type of CPU, the
121 * list-traversal primitive must be guarded by rcu_read_lock().
122 */
123static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n,
124 struct hlist_nulls_head *h)
125{
126 struct hlist_nulls_node *i, *last = NULL;
127
128 for (i = hlist_nulls_first_rcu(h); !is_a_nulls(i);
129 i = hlist_nulls_next_rcu(i))
130 last = i;
131
132 if (last) {
133 n->next = last->next;
134 n->pprev = &last->next;
135 rcu_assign_pointer(hlist_nulls_next_rcu(last), n);
136 } else {
137 hlist_nulls_add_head_rcu(n, h);
138 }
139}
140
141/**
142 * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type 104 * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type
143 * @tpos: the type * to use as a loop cursor. 105 * @tpos: the type * to use as a loop cursor.
144 * @pos: the &struct hlist_nulls_node to use as a loop cursor. 106 * @pos: the &struct hlist_nulls_node to use as a loop cursor.
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index e69402d4a8ae..d609e6dc5bad 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -184,7 +184,7 @@ static inline int serdev_controller_receive_buf(struct serdev_controller *ctrl,
184 struct serdev_device *serdev = ctrl->serdev; 184 struct serdev_device *serdev = ctrl->serdev;
185 185
186 if (!serdev || !serdev->ops->receive_buf) 186 if (!serdev || !serdev->ops->receive_buf)
187 return -EINVAL; 187 return 0;
188 188
189 return serdev->ops->receive_buf(serdev, data, count); 189 return serdev->ops->receive_buf(serdev, data, count);
190} 190}
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index bc486ef23f20..a38c80e9f91e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1406,8 +1406,7 @@ static inline struct sk_buff *skb_get(struct sk_buff *skb)
1406} 1406}
1407 1407
1408/* 1408/*
1409 * If users == 1, we are the only owner and are can avoid redundant 1409 * If users == 1, we are the only owner and can avoid redundant atomic changes.
1410 * atomic change.
1411 */ 1410 */
1412 1411
1413/** 1412/**
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index e32dfe098e82..40839c02d28c 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -117,6 +117,12 @@ struct attribute_group {
117 .show = _name##_show, \ 117 .show = _name##_show, \
118} 118}
119 119
120#define __ATTR_RO_MODE(_name, _mode) { \
121 .attr = { .name = __stringify(_name), \
122 .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
123 .show = _name##_show, \
124}
125
120#define __ATTR_WO(_name) { \ 126#define __ATTR_WO(_name) { \
121 .attr = { .name = __stringify(_name), .mode = S_IWUSR }, \ 127 .attr = { .name = __stringify(_name), .mode = S_IWUSR }, \
122 .store = _name##_store, \ 128 .store = _name##_store, \
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index df5d97a85e1a..ca4a6361389b 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -224,7 +224,8 @@ struct tcp_sock {
224 rate_app_limited:1, /* rate_{delivered,interval_us} limited? */ 224 rate_app_limited:1, /* rate_{delivered,interval_us} limited? */
225 fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */ 225 fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */
226 fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */ 226 fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */
227 unused:3; 227 is_sack_reneg:1, /* in recovery from loss with SACK reneg? */
228 unused:2;
228 u8 nonagle : 4,/* Disable Nagle algorithm? */ 229 u8 nonagle : 4,/* Disable Nagle algorithm? */
229 thin_lto : 1,/* Use linear timeouts for thin streams */ 230 thin_lto : 1,/* Use linear timeouts for thin streams */
230 unused1 : 1, 231 unused1 : 1,
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index a69877734c4e..e2ec3582e549 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -82,6 +82,7 @@ struct usbnet {
82# define EVENT_RX_KILL 10 82# define EVENT_RX_KILL 10
83# define EVENT_LINK_CHANGE 11 83# define EVENT_LINK_CHANGE 11
84# define EVENT_SET_RX_MODE 12 84# define EVENT_SET_RX_MODE 12
85# define EVENT_NO_IP_ALIGN 13
85}; 86};
86 87
87static inline struct usb_driver *driver_of(struct usb_interface *intf) 88static inline struct usb_driver *driver_of(struct usb_interface *intf)
diff --git a/include/net/red.h b/include/net/red.h
index 9a9347710701..9665582c4687 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -168,6 +168,17 @@ static inline void red_set_vars(struct red_vars *v)
168 v->qcount = -1; 168 v->qcount = -1;
169} 169}
170 170
171static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog)
172{
173 if (fls(qth_min) + Wlog > 32)
174 return false;
175 if (fls(qth_max) + Wlog > 32)
176 return false;
177 if (qth_max < qth_min)
178 return false;
179 return true;
180}
181
171static inline void red_set_parms(struct red_parms *p, 182static inline void red_set_parms(struct red_parms *p,
172 u32 qth_min, u32 qth_max, u8 Wlog, u8 Plog, 183 u32 qth_min, u32 qth_max, u8 Wlog, u8 Plog,
173 u8 Scell_log, u8 *stab, u32 max_P) 184 u8 Scell_log, u8 *stab, u32 max_P)
@@ -179,7 +190,7 @@ static inline void red_set_parms(struct red_parms *p,
179 p->qth_max = qth_max << Wlog; 190 p->qth_max = qth_max << Wlog;
180 p->Wlog = Wlog; 191 p->Wlog = Wlog;
181 p->Plog = Plog; 192 p->Plog = Plog;
182 if (delta < 0) 193 if (delta <= 0)
183 delta = 1; 194 delta = 1;
184 p->qth_delta = delta; 195 p->qth_delta = delta;
185 if (!max_P) { 196 if (!max_P) {
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 16f949eef52f..2f8f93da5dc2 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -503,7 +503,8 @@ struct sctp_datamsg {
503 /* Did the messenge fail to send? */ 503 /* Did the messenge fail to send? */
504 int send_error; 504 int send_error;
505 u8 send_failed:1, 505 u8 send_failed:1,
506 can_delay; /* should this message be Nagle delayed */ 506 can_delay:1, /* should this message be Nagle delayed */
507 abandoned:1; /* should this message be abandoned */
507}; 508};
508 509
509struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, 510struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *,
diff --git a/include/net/sock.h b/include/net/sock.h
index 79e1a2c7912c..9155da422692 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -685,11 +685,7 @@ static inline void sk_add_node_rcu(struct sock *sk, struct hlist_head *list)
685 685
686static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) 686static inline void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
687{ 687{
688 if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport && 688 hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list);
689 sk->sk_family == AF_INET6)
690 hlist_nulls_add_tail_rcu(&sk->sk_nulls_node, list);
691 else
692 hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list);
693} 689}
694 690
695static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list) 691static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
diff --git a/include/net/tc_act/tc_sample.h b/include/net/tc_act/tc_sample.h
index 524cee4f4c81..01dbfea32672 100644
--- a/include/net/tc_act/tc_sample.h
+++ b/include/net/tc_act/tc_sample.h
@@ -14,7 +14,6 @@ struct tcf_sample {
14 struct psample_group __rcu *psample_group; 14 struct psample_group __rcu *psample_group;
15 u32 psample_group_num; 15 u32 psample_group_num;
16 struct list_head tcfm_list; 16 struct list_head tcfm_list;
17 struct rcu_head rcu;
18}; 17};
19#define to_sample(a) ((struct tcf_sample *)a) 18#define to_sample(a) ((struct tcf_sample *)a)
20 19
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 4e09398009c1..6da880d2f022 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -844,12 +844,11 @@ static inline int tcp_v6_sdif(const struct sk_buff *skb)
844} 844}
845#endif 845#endif
846 846
847/* TCP_SKB_CB reference means this can not be used from early demux */
848static inline bool inet_exact_dif_match(struct net *net, struct sk_buff *skb) 847static inline bool inet_exact_dif_match(struct net *net, struct sk_buff *skb)
849{ 848{
850#if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV) 849#if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
851 if (!net->ipv4.sysctl_tcp_l3mdev_accept && 850 if (!net->ipv4.sysctl_tcp_l3mdev_accept &&
852 skb && ipv4_l3mdev_skb(TCP_SKB_CB(skb)->header.h4.flags)) 851 skb && ipv4_l3mdev_skb(IPCB(skb)->flags))
853 return true; 852 return true;
854#endif 853#endif
855 return false; 854 return false;
@@ -1056,7 +1055,7 @@ void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb);
1056void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb, 1055void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
1057 struct rate_sample *rs); 1056 struct rate_sample *rs);
1058void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost, 1057void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
1059 struct rate_sample *rs); 1058 bool is_sack_reneg, struct rate_sample *rs);
1060void tcp_rate_check_app_limited(struct sock *sk); 1059void tcp_rate_check_app_limited(struct sock *sk);
1061 1060
1062/* These functions determine how the current flow behaves in respect of SACK 1061/* These functions determine how the current flow behaves in respect of SACK
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 0f9cbf96c093..6df6fe0c2198 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -159,11 +159,11 @@ struct expander_device {
159 159
160struct sata_device { 160struct sata_device {
161 unsigned int class; 161 unsigned int class;
162 struct smp_resp rps_resp; /* report_phy_sata_resp */
163 u8 port_no; /* port number, if this is a PM (Port) */ 162 u8 port_no; /* port number, if this is a PM (Port) */
164 163
165 struct ata_port *ap; 164 struct ata_port *ap;
166 struct ata_host ata_host; 165 struct ata_host ata_host;
166 struct smp_resp rps_resp ____cacheline_aligned; /* report_phy_sata_resp */
167 u8 fis[ATA_RESP_FIS_SIZE]; 167 u8 fis[ATA_RESP_FIS_SIZE];
168}; 168};
169 169
diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
index 4cd0f05d0113..8989a92c571a 100644
--- a/include/trace/events/xdp.h
+++ b/include/trace/events/xdp.h
@@ -8,6 +8,7 @@
8#include <linux/netdevice.h> 8#include <linux/netdevice.h>
9#include <linux/filter.h> 9#include <linux/filter.h>
10#include <linux/tracepoint.h> 10#include <linux/tracepoint.h>
11#include <linux/bpf.h>
11 12
12#define __XDP_ACT_MAP(FN) \ 13#define __XDP_ACT_MAP(FN) \
13 FN(ABORTED) \ 14 FN(ABORTED) \
diff --git a/include/uapi/asm-generic/bpf_perf_event.h b/include/uapi/asm-generic/bpf_perf_event.h
new file mode 100644
index 000000000000..53815d2cd047
--- /dev/null
+++ b/include/uapi/asm-generic/bpf_perf_event.h
@@ -0,0 +1,9 @@
1#ifndef _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__
2#define _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__
3
4#include <linux/ptrace.h>
5
6/* Export kernel pt_regs structure */
7typedef struct pt_regs bpf_user_pt_regs_t;
8
9#endif /* _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__ */
diff --git a/include/uapi/linux/bpf_perf_event.h b/include/uapi/linux/bpf_perf_event.h
index af549d4ecf1b..8f95303f9d80 100644
--- a/include/uapi/linux/bpf_perf_event.h
+++ b/include/uapi/linux/bpf_perf_event.h
@@ -8,11 +8,10 @@
8#ifndef _UAPI__LINUX_BPF_PERF_EVENT_H__ 8#ifndef _UAPI__LINUX_BPF_PERF_EVENT_H__
9#define _UAPI__LINUX_BPF_PERF_EVENT_H__ 9#define _UAPI__LINUX_BPF_PERF_EVENT_H__
10 10
11#include <linux/types.h> 11#include <asm/bpf_perf_event.h>
12#include <linux/ptrace.h>
13 12
14struct bpf_perf_event_data { 13struct bpf_perf_event_data {
15 struct pt_regs regs; 14 bpf_user_pt_regs_t regs;
16 __u64 sample_period; 15 __u64 sample_period;
17}; 16};
18 17
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 282d7613fce8..496e59a2738b 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -630,9 +630,9 @@ struct kvm_s390_irq {
630 630
631struct kvm_s390_irq_state { 631struct kvm_s390_irq_state {
632 __u64 buf; 632 __u64 buf;
633 __u32 flags; 633 __u32 flags; /* will stay unused for compatibility reasons */
634 __u32 len; 634 __u32 len;
635 __u32 reserved[4]; 635 __u32 reserved[4]; /* will stay unused for compatibility reasons */
636}; 636};
637 637
638/* for KVM_SET_GUEST_DEBUG */ 638/* for KVM_SET_GUEST_DEBUG */
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 41a0a81b01e6..c4c79aa331bd 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -880,6 +880,8 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */
880 __u8 bReserved; 880 __u8 bReserved;
881} __attribute__((packed)); 881} __attribute__((packed));
882 882
883#define USB_DT_USB_WIRELESS_CAP_SIZE 11
884
883/* USB 2.0 Extension descriptor */ 885/* USB 2.0 Extension descriptor */
884#define USB_CAP_TYPE_EXT 2 886#define USB_CAP_TYPE_EXT 2
885 887
@@ -1072,6 +1074,7 @@ struct usb_ptm_cap_descriptor {
1072 __u8 bDevCapabilityType; 1074 __u8 bDevCapabilityType;
1073} __attribute__((packed)); 1075} __attribute__((packed));
1074 1076
1077#define USB_DT_USB_PTM_ID_SIZE 3
1075/* 1078/*
1076 * The size of the descriptor for the Sublink Speed Attribute Count 1079 * The size of the descriptor for the Sublink Speed Attribute Count
1077 * (SSAC) specified in bmAttributes[4:0]. 1080 * (SSAC) specified in bmAttributes[4:0].
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index b9f8686a84cf..86b50aa26ee8 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1447,7 +1447,8 @@ int bpf_prog_array_length(struct bpf_prog_array __rcu *progs)
1447 rcu_read_lock(); 1447 rcu_read_lock();
1448 prog = rcu_dereference(progs)->progs; 1448 prog = rcu_dereference(progs)->progs;
1449 for (; *prog; prog++) 1449 for (; *prog; prog++)
1450 cnt++; 1450 if (*prog != &dummy_bpf_prog.prog)
1451 cnt++;
1451 rcu_read_unlock(); 1452 rcu_read_unlock();
1452 return cnt; 1453 return cnt;
1453} 1454}
diff --git a/kernel/bpf/offload.c b/kernel/bpf/offload.c
index 68ec884440b7..8455b89d1bbf 100644
--- a/kernel/bpf/offload.c
+++ b/kernel/bpf/offload.c
@@ -1,3 +1,18 @@
1/*
2 * Copyright (C) 2017 Netronome Systems, Inc.
3 *
4 * This software is licensed under the GNU General License Version 2,
5 * June 1991 as shown in the file COPYING in the top-level directory of this
6 * source tree.
7 *
8 * THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
9 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
10 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11 * FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
12 * OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
13 * THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
14 */
15
1#include <linux/bpf.h> 16#include <linux/bpf.h>
2#include <linux/bpf_verifier.h> 17#include <linux/bpf_verifier.h>
3#include <linux/bug.h> 18#include <linux/bug.h>
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 04892a82f6ac..41376c3ac93b 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -780,8 +780,8 @@ static int takedown_cpu(unsigned int cpu)
780 BUG_ON(cpu_online(cpu)); 780 BUG_ON(cpu_online(cpu));
781 781
782 /* 782 /*
783 * The CPUHP_AP_SCHED_MIGRATE_DYING callback will have removed all 783 * The teardown callback for CPUHP_AP_SCHED_STARTING will have removed
784 * runnable tasks from the cpu, there's only the idle task left now 784 * all runnable tasks from the CPU, there's only the idle task left now
785 * that the migration thread is done doing the stop_machine thing. 785 * that the migration thread is done doing the stop_machine thing.
786 * 786 *
787 * Wait for the stop thread to go away. 787 * Wait for the stop thread to go away.
@@ -1289,11 +1289,6 @@ static struct cpuhp_step cpuhp_bp_states[] = {
1289 .teardown.single = NULL, 1289 .teardown.single = NULL,
1290 .cant_stop = true, 1290 .cant_stop = true,
1291 }, 1291 },
1292 [CPUHP_AP_SMPCFD_DYING] = {
1293 .name = "smpcfd:dying",
1294 .startup.single = NULL,
1295 .teardown.single = smpcfd_dying_cpu,
1296 },
1297 /* 1292 /*
1298 * Handled on controll processor until the plugged processor manages 1293 * Handled on controll processor until the plugged processor manages
1299 * this itself. 1294 * this itself.
@@ -1335,6 +1330,11 @@ static struct cpuhp_step cpuhp_ap_states[] = {
1335 .startup.single = NULL, 1330 .startup.single = NULL,
1336 .teardown.single = rcutree_dying_cpu, 1331 .teardown.single = rcutree_dying_cpu,
1337 }, 1332 },
1333 [CPUHP_AP_SMPCFD_DYING] = {
1334 .name = "smpcfd:dying",
1335 .startup.single = NULL,
1336 .teardown.single = smpcfd_dying_cpu,
1337 },
1338 /* Entry state on starting. Interrupts enabled from here on. Transient 1338 /* Entry state on starting. Interrupts enabled from here on. Transient
1339 * state for synchronsization */ 1339 * state for synchronsization */
1340 [CPUHP_AP_ONLINE] = { 1340 [CPUHP_AP_ONLINE] = {
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c
index e74be38245ad..ed5d34925ad0 100644
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -350,7 +350,7 @@ poll_again:
350 } 350 }
351 kdb_printf("\n"); 351 kdb_printf("\n");
352 for (i = 0; i < count; i++) { 352 for (i = 0; i < count; i++) {
353 if (kallsyms_symbol_next(p_tmp, i) < 0) 353 if (WARN_ON(!kallsyms_symbol_next(p_tmp, i)))
354 break; 354 break;
355 kdb_printf("%s ", p_tmp); 355 kdb_printf("%s ", p_tmp);
356 *(p_tmp + len) = '\0'; 356 *(p_tmp + len) = '\0';
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 16beab4767e1..4df5b695bf0d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6639,6 +6639,7 @@ static void perf_event_namespaces_output(struct perf_event *event,
6639 struct perf_namespaces_event *namespaces_event = data; 6639 struct perf_namespaces_event *namespaces_event = data;
6640 struct perf_output_handle handle; 6640 struct perf_output_handle handle;
6641 struct perf_sample_data sample; 6641 struct perf_sample_data sample;
6642 u16 header_size = namespaces_event->event_id.header.size;
6642 int ret; 6643 int ret;
6643 6644
6644 if (!perf_event_namespaces_match(event)) 6645 if (!perf_event_namespaces_match(event))
@@ -6649,7 +6650,7 @@ static void perf_event_namespaces_output(struct perf_event *event,
6649 ret = perf_output_begin(&handle, event, 6650 ret = perf_output_begin(&handle, event,
6650 namespaces_event->event_id.header.size); 6651 namespaces_event->event_id.header.size);
6651 if (ret) 6652 if (ret)
6652 return; 6653 goto out;
6653 6654
6654 namespaces_event->event_id.pid = perf_event_pid(event, 6655 namespaces_event->event_id.pid = perf_event_pid(event,
6655 namespaces_event->task); 6656 namespaces_event->task);
@@ -6661,6 +6662,8 @@ static void perf_event_namespaces_output(struct perf_event *event,
6661 perf_event__output_id_sample(event, &handle, &sample); 6662 perf_event__output_id_sample(event, &handle, &sample);
6662 6663
6663 perf_output_end(&handle); 6664 perf_output_end(&handle);
6665out:
6666 namespaces_event->event_id.header.size = header_size;
6664} 6667}
6665 6668
6666static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info, 6669static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info,
@@ -7987,11 +7990,11 @@ static void bpf_overflow_handler(struct perf_event *event,
7987{ 7990{
7988 struct bpf_perf_event_data_kern ctx = { 7991 struct bpf_perf_event_data_kern ctx = {
7989 .data = data, 7992 .data = data,
7990 .regs = regs,
7991 .event = event, 7993 .event = event,
7992 }; 7994 };
7993 int ret = 0; 7995 int ret = 0;
7994 7996
7997 ctx.regs = perf_arch_bpf_user_pt_regs(regs);
7995 preempt_disable(); 7998 preempt_disable();
7996 if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1)) 7999 if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1))
7997 goto out; 8000 goto out;
diff --git a/kernel/futex.c b/kernel/futex.c
index 76ed5921117a..57d0b3657e16 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1582,8 +1582,8 @@ static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
1582{ 1582{
1583 unsigned int op = (encoded_op & 0x70000000) >> 28; 1583 unsigned int op = (encoded_op & 0x70000000) >> 28;
1584 unsigned int cmp = (encoded_op & 0x0f000000) >> 24; 1584 unsigned int cmp = (encoded_op & 0x0f000000) >> 24;
1585 int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 12); 1585 int oparg = sign_extend32((encoded_op & 0x00fff000) >> 12, 11);
1586 int cmparg = sign_extend32(encoded_op & 0x00000fff, 12); 1586 int cmparg = sign_extend32(encoded_op & 0x00000fff, 11);
1587 int oldval, ret; 1587 int oldval, ret;
1588 1588
1589 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) { 1589 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) {
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index 7df2480005f8..0ba0dd8863a7 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -384,7 +384,9 @@ unsigned int irq_matrix_available(struct irq_matrix *m, bool cpudown)
384{ 384{
385 struct cpumap *cm = this_cpu_ptr(m->maps); 385 struct cpumap *cm = this_cpu_ptr(m->maps);
386 386
387 return (m->global_available - cpudown) ? cm->available : 0; 387 if (!cpudown)
388 return m->global_available;
389 return m->global_available - cm->available;
388} 390}
389 391
390/** 392/**
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 9776da8db180..670d8d7d8087 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4790,7 +4790,8 @@ void lockdep_invariant_state(bool force)
4790 * Verify the former, enforce the latter. 4790 * Verify the former, enforce the latter.
4791 */ 4791 */
4792 WARN_ON_ONCE(!force && current->lockdep_depth); 4792 WARN_ON_ONCE(!force && current->lockdep_depth);
4793 invalidate_xhlock(&xhlock(current->xhlock_idx)); 4793 if (current->xhlocks)
4794 invalidate_xhlock(&xhlock(current->xhlock_idx));
4794} 4795}
4795 4796
4796static int cross_lock(struct lockdep_map *lock) 4797static int cross_lock(struct lockdep_map *lock)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 5d81206a572d..b9006617710f 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3141,9 +3141,6 @@ void dump_stack_print_info(const char *log_lvl)
3141void show_regs_print_info(const char *log_lvl) 3141void show_regs_print_info(const char *log_lvl)
3142{ 3142{
3143 dump_stack_print_info(log_lvl); 3143 dump_stack_print_info(log_lvl);
3144
3145 printk("%stask: %p task.stack: %p\n",
3146 log_lvl, current, task_stack_page(current));
3147} 3144}
3148 3145
3149#endif 3146#endif
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4037e19bbca2..2fe3aa853e4d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3413,9 +3413,9 @@ void set_task_rq_fair(struct sched_entity *se,
3413 * _IFF_ we look at the pure running and runnable sums. Because they 3413 * _IFF_ we look at the pure running and runnable sums. Because they
3414 * represent the very same entity, just at different points in the hierarchy. 3414 * represent the very same entity, just at different points in the hierarchy.
3415 * 3415 *
3416 * 3416 * Per the above update_tg_cfs_util() is trivial and simply copies the running
3417 * Per the above update_tg_cfs_util() is trivial (and still 'wrong') and 3417 * sum over (but still wrong, because the group entity and group rq do not have
3418 * simply copies the running sum over. 3418 * their PELT windows aligned).
3419 * 3419 *
3420 * However, update_tg_cfs_runnable() is more complex. So we have: 3420 * However, update_tg_cfs_runnable() is more complex. So we have:
3421 * 3421 *
@@ -3424,11 +3424,11 @@ void set_task_rq_fair(struct sched_entity *se,
3424 * And since, like util, the runnable part should be directly transferable, 3424 * And since, like util, the runnable part should be directly transferable,
3425 * the following would _appear_ to be the straight forward approach: 3425 * the following would _appear_ to be the straight forward approach:
3426 * 3426 *
3427 * grq->avg.load_avg = grq->load.weight * grq->avg.running_avg (3) 3427 * grq->avg.load_avg = grq->load.weight * grq->avg.runnable_avg (3)
3428 * 3428 *
3429 * And per (1) we have: 3429 * And per (1) we have:
3430 * 3430 *
3431 * ge->avg.running_avg == grq->avg.running_avg 3431 * ge->avg.runnable_avg == grq->avg.runnable_avg
3432 * 3432 *
3433 * Which gives: 3433 * Which gives:
3434 * 3434 *
@@ -3447,27 +3447,28 @@ void set_task_rq_fair(struct sched_entity *se,
3447 * to (shortly) return to us. This only works by keeping the weights as 3447 * to (shortly) return to us. This only works by keeping the weights as
3448 * integral part of the sum. We therefore cannot decompose as per (3). 3448 * integral part of the sum. We therefore cannot decompose as per (3).
3449 * 3449 *
3450 * OK, so what then? 3450 * Another reason this doesn't work is that runnable isn't a 0-sum entity.
3451 * Imagine a rq with 2 tasks that each are runnable 2/3 of the time. Then the
3452 * rq itself is runnable anywhere between 2/3 and 1 depending on how the
3453 * runnable section of these tasks overlap (or not). If they were to perfectly
3454 * align the rq as a whole would be runnable 2/3 of the time. If however we
3455 * always have at least 1 runnable task, the rq as a whole is always runnable.
3451 * 3456 *
3457 * So we'll have to approximate.. :/
3452 * 3458 *
3453 * Another way to look at things is: 3459 * Given the constraint:
3454 * 3460 *
3455 * grq->avg.load_avg = \Sum se->avg.load_avg 3461 * ge->avg.running_sum <= ge->avg.runnable_sum <= LOAD_AVG_MAX
3456 * 3462 *
3457 * Therefore, per (2): 3463 * We can construct a rule that adds runnable to a rq by assuming minimal
3464 * overlap.
3458 * 3465 *
3459 * grq->avg.load_avg = \Sum se->load.weight * se->avg.runnable_avg 3466 * On removal, we'll assume each task is equally runnable; which yields:
3460 * 3467 *
3461 * And the very thing we're propagating is a change in that sum (someone 3468 * grq->avg.runnable_sum = grq->avg.load_sum / grq->load.weight
3462 * joined/left). So we can easily know the runnable change, which would be, per
3463 * (2) the already tracked se->load_avg divided by the corresponding
3464 * se->weight.
3465 * 3469 *
3466 * Basically (4) but in differential form: 3470 * XXX: only do this for the part of runnable > running ?
3467 * 3471 *
3468 * d(runnable_avg) += se->avg.load_avg / se->load.weight
3469 * (5)
3470 * ge->avg.load_avg += ge->load.weight * d(runnable_avg)
3471 */ 3472 */
3472 3473
3473static inline void 3474static inline void
@@ -3479,6 +3480,14 @@ update_tg_cfs_util(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq
3479 if (!delta) 3480 if (!delta)
3480 return; 3481 return;
3481 3482
3483 /*
3484 * The relation between sum and avg is:
3485 *
3486 * LOAD_AVG_MAX - 1024 + sa->period_contrib
3487 *
3488 * however, the PELT windows are not aligned between grq and gse.
3489 */
3490
3482 /* Set new sched_entity's utilization */ 3491 /* Set new sched_entity's utilization */
3483 se->avg.util_avg = gcfs_rq->avg.util_avg; 3492 se->avg.util_avg = gcfs_rq->avg.util_avg;
3484 se->avg.util_sum = se->avg.util_avg * LOAD_AVG_MAX; 3493 se->avg.util_sum = se->avg.util_avg * LOAD_AVG_MAX;
@@ -3491,33 +3500,68 @@ update_tg_cfs_util(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq
3491static inline void 3500static inline void
3492update_tg_cfs_runnable(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq *gcfs_rq) 3501update_tg_cfs_runnable(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq *gcfs_rq)
3493{ 3502{
3494 long runnable_sum = gcfs_rq->prop_runnable_sum; 3503 long delta_avg, running_sum, runnable_sum = gcfs_rq->prop_runnable_sum;
3495 long runnable_load_avg, load_avg; 3504 unsigned long runnable_load_avg, load_avg;
3496 s64 runnable_load_sum, load_sum; 3505 u64 runnable_load_sum, load_sum = 0;
3506 s64 delta_sum;
3497 3507
3498 if (!runnable_sum) 3508 if (!runnable_sum)
3499 return; 3509 return;
3500 3510
3501 gcfs_rq->prop_runnable_sum = 0; 3511 gcfs_rq->prop_runnable_sum = 0;
3502 3512
3513 if (runnable_sum >= 0) {
3514 /*
3515 * Add runnable; clip at LOAD_AVG_MAX. Reflects that until
3516 * the CPU is saturated running == runnable.
3517 */
3518 runnable_sum += se->avg.load_sum;
3519 runnable_sum = min(runnable_sum, (long)LOAD_AVG_MAX);
3520 } else {
3521 /*
3522 * Estimate the new unweighted runnable_sum of the gcfs_rq by
3523 * assuming all tasks are equally runnable.
3524 */
3525 if (scale_load_down(gcfs_rq->load.weight)) {
3526 load_sum = div_s64(gcfs_rq->avg.load_sum,
3527 scale_load_down(gcfs_rq->load.weight));
3528 }
3529
3530 /* But make sure to not inflate se's runnable */
3531 runnable_sum = min(se->avg.load_sum, load_sum);
3532 }
3533
3534 /*
3535 * runnable_sum can't be lower than running_sum
3536 * As running sum is scale with cpu capacity wehreas the runnable sum
3537 * is not we rescale running_sum 1st
3538 */
3539 running_sum = se->avg.util_sum /
3540 arch_scale_cpu_capacity(NULL, cpu_of(rq_of(cfs_rq)));
3541 runnable_sum = max(runnable_sum, running_sum);
3542
3503 load_sum = (s64)se_weight(se) * runnable_sum; 3543 load_sum = (s64)se_weight(se) * runnable_sum;
3504 load_avg = div_s64(load_sum, LOAD_AVG_MAX); 3544 load_avg = div_s64(load_sum, LOAD_AVG_MAX);
3505 3545
3506 add_positive(&se->avg.load_sum, runnable_sum); 3546 delta_sum = load_sum - (s64)se_weight(se) * se->avg.load_sum;
3507 add_positive(&se->avg.load_avg, load_avg); 3547 delta_avg = load_avg - se->avg.load_avg;
3508 3548
3509 add_positive(&cfs_rq->avg.load_avg, load_avg); 3549 se->avg.load_sum = runnable_sum;
3510 add_positive(&cfs_rq->avg.load_sum, load_sum); 3550 se->avg.load_avg = load_avg;
3551 add_positive(&cfs_rq->avg.load_avg, delta_avg);
3552 add_positive(&cfs_rq->avg.load_sum, delta_sum);
3511 3553
3512 runnable_load_sum = (s64)se_runnable(se) * runnable_sum; 3554 runnable_load_sum = (s64)se_runnable(se) * runnable_sum;
3513 runnable_load_avg = div_s64(runnable_load_sum, LOAD_AVG_MAX); 3555 runnable_load_avg = div_s64(runnable_load_sum, LOAD_AVG_MAX);
3556 delta_sum = runnable_load_sum - se_weight(se) * se->avg.runnable_load_sum;
3557 delta_avg = runnable_load_avg - se->avg.runnable_load_avg;
3514 3558
3515 add_positive(&se->avg.runnable_load_sum, runnable_sum); 3559 se->avg.runnable_load_sum = runnable_sum;
3516 add_positive(&se->avg.runnable_load_avg, runnable_load_avg); 3560 se->avg.runnable_load_avg = runnable_load_avg;
3517 3561
3518 if (se->on_rq) { 3562 if (se->on_rq) {
3519 add_positive(&cfs_rq->avg.runnable_load_avg, runnable_load_avg); 3563 add_positive(&cfs_rq->avg.runnable_load_avg, delta_avg);
3520 add_positive(&cfs_rq->avg.runnable_load_sum, runnable_load_sum); 3564 add_positive(&cfs_rq->avg.runnable_load_sum, delta_sum);
3521 } 3565 }
3522} 3566}
3523 3567
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c
index 98feab7933c7..929ecb7d6b78 100644
--- a/kernel/sched/wait.c
+++ b/kernel/sched/wait.c
@@ -27,7 +27,7 @@ void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq
27 27
28 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; 28 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE;
29 spin_lock_irqsave(&wq_head->lock, flags); 29 spin_lock_irqsave(&wq_head->lock, flags);
30 __add_wait_queue_entry_tail(wq_head, wq_entry); 30 __add_wait_queue(wq_head, wq_entry);
31 spin_unlock_irqrestore(&wq_head->lock, flags); 31 spin_unlock_irqrestore(&wq_head->lock, flags);
32} 32}
33EXPORT_SYMBOL(add_wait_queue); 33EXPORT_SYMBOL(add_wait_queue);
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 27d1f4ffa3de..0ce99c379c30 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -759,6 +759,8 @@ const struct bpf_prog_ops perf_event_prog_ops = {
759 759
760static DEFINE_MUTEX(bpf_event_mutex); 760static DEFINE_MUTEX(bpf_event_mutex);
761 761
762#define BPF_TRACE_MAX_PROGS 64
763
762int perf_event_attach_bpf_prog(struct perf_event *event, 764int perf_event_attach_bpf_prog(struct perf_event *event,
763 struct bpf_prog *prog) 765 struct bpf_prog *prog)
764{ 766{
@@ -772,6 +774,12 @@ int perf_event_attach_bpf_prog(struct perf_event *event,
772 goto unlock; 774 goto unlock;
773 775
774 old_array = event->tp_event->prog_array; 776 old_array = event->tp_event->prog_array;
777 if (old_array &&
778 bpf_prog_array_length(old_array) >= BPF_TRACE_MAX_PROGS) {
779 ret = -E2BIG;
780 goto unlock;
781 }
782
775 ret = bpf_prog_array_copy(old_array, NULL, prog, &new_array); 783 ret = bpf_prog_array_copy(old_array, NULL, prog, &new_array);
776 if (ret < 0) 784 if (ret < 0)
777 goto unlock; 785 goto unlock;
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
index 1ef0cec38d78..dc14beae2c9a 100644
--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -313,42 +313,47 @@ next_op:
313 313
314 /* Decide how to handle the operation */ 314 /* Decide how to handle the operation */
315 switch (op) { 315 switch (op) {
316 case ASN1_OP_MATCH_ANY_ACT:
317 case ASN1_OP_MATCH_ANY_ACT_OR_SKIP:
318 case ASN1_OP_COND_MATCH_ANY_ACT:
319 case ASN1_OP_COND_MATCH_ANY_ACT_OR_SKIP:
320 ret = actions[machine[pc + 1]](context, hdr, tag, data + dp, len);
321 if (ret < 0)
322 return ret;
323 goto skip_data;
324
325 case ASN1_OP_MATCH_ACT:
326 case ASN1_OP_MATCH_ACT_OR_SKIP:
327 case ASN1_OP_COND_MATCH_ACT_OR_SKIP:
328 ret = actions[machine[pc + 2]](context, hdr, tag, data + dp, len);
329 if (ret < 0)
330 return ret;
331 goto skip_data;
332
333 case ASN1_OP_MATCH: 316 case ASN1_OP_MATCH:
334 case ASN1_OP_MATCH_OR_SKIP: 317 case ASN1_OP_MATCH_OR_SKIP:
318 case ASN1_OP_MATCH_ACT:
319 case ASN1_OP_MATCH_ACT_OR_SKIP:
335 case ASN1_OP_MATCH_ANY: 320 case ASN1_OP_MATCH_ANY:
336 case ASN1_OP_MATCH_ANY_OR_SKIP: 321 case ASN1_OP_MATCH_ANY_OR_SKIP:
322 case ASN1_OP_MATCH_ANY_ACT:
323 case ASN1_OP_MATCH_ANY_ACT_OR_SKIP:
337 case ASN1_OP_COND_MATCH_OR_SKIP: 324 case ASN1_OP_COND_MATCH_OR_SKIP:
325 case ASN1_OP_COND_MATCH_ACT_OR_SKIP:
338 case ASN1_OP_COND_MATCH_ANY: 326 case ASN1_OP_COND_MATCH_ANY:
339 case ASN1_OP_COND_MATCH_ANY_OR_SKIP: 327 case ASN1_OP_COND_MATCH_ANY_OR_SKIP:
340 skip_data: 328 case ASN1_OP_COND_MATCH_ANY_ACT:
329 case ASN1_OP_COND_MATCH_ANY_ACT_OR_SKIP:
330
341 if (!(flags & FLAG_CONS)) { 331 if (!(flags & FLAG_CONS)) {
342 if (flags & FLAG_INDEFINITE_LENGTH) { 332 if (flags & FLAG_INDEFINITE_LENGTH) {
333 size_t tmp = dp;
334
343 ret = asn1_find_indefinite_length( 335 ret = asn1_find_indefinite_length(
344 data, datalen, &dp, &len, &errmsg); 336 data, datalen, &tmp, &len, &errmsg);
345 if (ret < 0) 337 if (ret < 0)
346 goto error; 338 goto error;
347 } else {
348 dp += len;
349 } 339 }
350 pr_debug("- LEAF: %zu\n", len); 340 pr_debug("- LEAF: %zu\n", len);
351 } 341 }
342
343 if (op & ASN1_OP_MATCH__ACT) {
344 unsigned char act;
345
346 if (op & ASN1_OP_MATCH__ANY)
347 act = machine[pc + 1];
348 else
349 act = machine[pc + 2];
350 ret = actions[act](context, hdr, tag, data + dp, len);
351 if (ret < 0)
352 return ret;
353 }
354
355 if (!(flags & FLAG_CONS))
356 dp += len;
352 pc += asn1_op_lengths[op]; 357 pc += asn1_op_lengths[op];
353 goto next_op; 358 goto next_op;
354 359
@@ -434,6 +439,8 @@ next_op:
434 else 439 else
435 act = machine[pc + 1]; 440 act = machine[pc + 1];
436 ret = actions[act](context, hdr, 0, data + tdp, len); 441 ret = actions[act](context, hdr, 0, data + tdp, len);
442 if (ret < 0)
443 return ret;
437 } 444 }
438 pc += asn1_op_lengths[op]; 445 pc += asn1_op_lengths[op];
439 goto next_op; 446 goto next_op;
diff --git a/lib/nlattr.c b/lib/nlattr.c
index 8bf78b4b78f0..dfa55c873c13 100644
--- a/lib/nlattr.c
+++ b/lib/nlattr.c
@@ -15,7 +15,11 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <net/netlink.h> 16#include <net/netlink.h>
17 17
18/* for these data types attribute length must be exactly given size */ 18/* For these data types, attribute length should be exactly the given
19 * size. However, to maintain compatibility with broken commands, if the
20 * attribute length does not match the expected size a warning is emitted
21 * to the user that the command is sending invalid data and needs to be fixed.
22 */
19static const u8 nla_attr_len[NLA_TYPE_MAX+1] = { 23static const u8 nla_attr_len[NLA_TYPE_MAX+1] = {
20 [NLA_U8] = sizeof(u8), 24 [NLA_U8] = sizeof(u8),
21 [NLA_U16] = sizeof(u16), 25 [NLA_U16] = sizeof(u16),
@@ -28,8 +32,16 @@ static const u8 nla_attr_len[NLA_TYPE_MAX+1] = {
28}; 32};
29 33
30static const u8 nla_attr_minlen[NLA_TYPE_MAX+1] = { 34static const u8 nla_attr_minlen[NLA_TYPE_MAX+1] = {
35 [NLA_U8] = sizeof(u8),
36 [NLA_U16] = sizeof(u16),
37 [NLA_U32] = sizeof(u32),
38 [NLA_U64] = sizeof(u64),
31 [NLA_MSECS] = sizeof(u64), 39 [NLA_MSECS] = sizeof(u64),
32 [NLA_NESTED] = NLA_HDRLEN, 40 [NLA_NESTED] = NLA_HDRLEN,
41 [NLA_S8] = sizeof(s8),
42 [NLA_S16] = sizeof(s16),
43 [NLA_S32] = sizeof(s32),
44 [NLA_S64] = sizeof(s64),
33}; 45};
34 46
35static int validate_nla_bitfield32(const struct nlattr *nla, 47static int validate_nla_bitfield32(const struct nlattr *nla,
@@ -69,11 +81,9 @@ static int validate_nla(const struct nlattr *nla, int maxtype,
69 81
70 BUG_ON(pt->type > NLA_TYPE_MAX); 82 BUG_ON(pt->type > NLA_TYPE_MAX);
71 83
72 /* for data types NLA_U* and NLA_S* require exact length */ 84 if (nla_attr_len[pt->type] && attrlen != nla_attr_len[pt->type]) {
73 if (nla_attr_len[pt->type]) { 85 pr_warn_ratelimited("netlink: '%s': attribute type %d has an invalid length.\n",
74 if (attrlen != nla_attr_len[pt->type]) 86 current->comm, type);
75 return -ERANGE;
76 return 0;
77 } 87 }
78 88
79 switch (pt->type) { 89 switch (pt->type) {
diff --git a/lib/oid_registry.c b/lib/oid_registry.c
index 41b9e50711a7..0bcac6ccb1b2 100644
--- a/lib/oid_registry.c
+++ b/lib/oid_registry.c
@@ -116,14 +116,14 @@ int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize)
116 int count; 116 int count;
117 117
118 if (v >= end) 118 if (v >= end)
119 return -EBADMSG; 119 goto bad;
120 120
121 n = *v++; 121 n = *v++;
122 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40); 122 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40);
123 if (count >= bufsize)
124 return -ENOBUFS;
123 buffer += count; 125 buffer += count;
124 bufsize -= count; 126 bufsize -= count;
125 if (bufsize == 0)
126 return -ENOBUFS;
127 127
128 while (v < end) { 128 while (v < end) {
129 num = 0; 129 num = 0;
@@ -134,20 +134,24 @@ int sprint_oid(const void *data, size_t datasize, char *buffer, size_t bufsize)
134 num = n & 0x7f; 134 num = n & 0x7f;
135 do { 135 do {
136 if (v >= end) 136 if (v >= end)
137 return -EBADMSG; 137 goto bad;
138 n = *v++; 138 n = *v++;
139 num <<= 7; 139 num <<= 7;
140 num |= n & 0x7f; 140 num |= n & 0x7f;
141 } while (n & 0x80); 141 } while (n & 0x80);
142 } 142 }
143 ret += count = snprintf(buffer, bufsize, ".%lu", num); 143 ret += count = snprintf(buffer, bufsize, ".%lu", num);
144 buffer += count; 144 if (count >= bufsize)
145 if (bufsize <= count)
146 return -ENOBUFS; 145 return -ENOBUFS;
146 buffer += count;
147 bufsize -= count; 147 bufsize -= count;
148 } 148 }
149 149
150 return ret; 150 return ret;
151
152bad:
153 snprintf(buffer, bufsize, "(bad)");
154 return -EBADMSG;
151} 155}
152EXPORT_SYMBOL_GPL(sprint_oid); 156EXPORT_SYMBOL_GPL(sprint_oid);
153 157
diff --git a/mm/kmemcheck.c b/mm/kmemcheck.c
deleted file mode 100644
index cec594032515..000000000000
--- a/mm/kmemcheck.c
+++ /dev/null
@@ -1 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 985046ae4231..80f5c79053a4 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -839,7 +839,6 @@ static int p9_socket_open(struct p9_client *client, struct socket *csocket)
839 if (IS_ERR(file)) { 839 if (IS_ERR(file)) {
840 pr_err("%s (%d): failed to map fd\n", 840 pr_err("%s (%d): failed to map fd\n",
841 __func__, task_pid_nr(current)); 841 __func__, task_pid_nr(current));
842 sock_release(csocket);
843 kfree(p); 842 kfree(p);
844 return PTR_ERR(file); 843 return PTR_ERR(file);
845 } 844 }
diff --git a/net/core/dev.c b/net/core/dev.c
index 07ed21d64f92..f47e96b62308 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1106,7 +1106,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
1106 * when the name is long and there isn't enough space left 1106 * when the name is long and there isn't enough space left
1107 * for the digits, or if all bits are used. 1107 * for the digits, or if all bits are used.
1108 */ 1108 */
1109 return p ? -ENFILE : -EEXIST; 1109 return -ENFILE;
1110} 1110}
1111 1111
1112static int dev_alloc_name_ns(struct net *net, 1112static int dev_alloc_name_ns(struct net *net,
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index abd07a443219..178bb9833311 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -57,10 +57,16 @@ void dccp_time_wait(struct sock *sk, int state, int timeo)
57 if (state == DCCP_TIME_WAIT) 57 if (state == DCCP_TIME_WAIT)
58 timeo = DCCP_TIMEWAIT_LEN; 58 timeo = DCCP_TIMEWAIT_LEN;
59 59
60 /* tw_timer is pinned, so we need to make sure BH are disabled
61 * in following section, otherwise timer handler could run before
62 * we complete the initialization.
63 */
64 local_bh_disable();
60 inet_twsk_schedule(tw, timeo); 65 inet_twsk_schedule(tw, timeo);
61 /* Linkage updates. */ 66 /* Linkage updates. */
62 __inet_twsk_hashdance(tw, sk, &dccp_hashinfo); 67 __inet_twsk_hashdance(tw, sk, &dccp_hashinfo);
63 inet_twsk_put(tw); 68 inet_twsk_put(tw);
69 local_bh_enable();
64 } else { 70 } else {
65 /* Sorry, if we're out of memory, just CLOSE this 71 /* Sorry, if we're out of memory, just CLOSE this
66 * socket up. We've got bigger problems than 72 * socket up. We've got bigger problems than
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index b68168fcc06a..9d43c1f40274 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -259,6 +259,7 @@ int dccp_disconnect(struct sock *sk, int flags)
259{ 259{
260 struct inet_connection_sock *icsk = inet_csk(sk); 260 struct inet_connection_sock *icsk = inet_csk(sk);
261 struct inet_sock *inet = inet_sk(sk); 261 struct inet_sock *inet = inet_sk(sk);
262 struct dccp_sock *dp = dccp_sk(sk);
262 int err = 0; 263 int err = 0;
263 const int old_state = sk->sk_state; 264 const int old_state = sk->sk_state;
264 265
@@ -278,6 +279,10 @@ int dccp_disconnect(struct sock *sk, int flags)
278 sk->sk_err = ECONNRESET; 279 sk->sk_err = ECONNRESET;
279 280
280 dccp_clear_xmit_timers(sk); 281 dccp_clear_xmit_timers(sk);
282 ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
283 ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
284 dp->dccps_hc_rx_ccid = NULL;
285 dp->dccps_hc_tx_ccid = NULL;
281 286
282 __skb_queue_purge(&sk->sk_receive_queue); 287 __skb_queue_purge(&sk->sk_receive_queue);
283 __skb_queue_purge(&sk->sk_write_queue); 288 __skb_queue_purge(&sk->sk_write_queue);
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index c690cd0d9b3f..b563e0c46bac 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -93,7 +93,7 @@ static void inet_twsk_add_bind_node(struct inet_timewait_sock *tw,
93} 93}
94 94
95/* 95/*
96 * Enter the time wait state. 96 * Enter the time wait state. This is called with locally disabled BH.
97 * Essentially we whip up a timewait bucket, copy the relevant info into it 97 * Essentially we whip up a timewait bucket, copy the relevant info into it
98 * from the SK, and mess with hash chains and list linkage. 98 * from the SK, and mess with hash chains and list linkage.
99 */ 99 */
@@ -111,7 +111,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
111 */ 111 */
112 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, 112 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num,
113 hashinfo->bhash_size)]; 113 hashinfo->bhash_size)];
114 spin_lock_bh(&bhead->lock); 114 spin_lock(&bhead->lock);
115 tw->tw_tb = icsk->icsk_bind_hash; 115 tw->tw_tb = icsk->icsk_bind_hash;
116 WARN_ON(!icsk->icsk_bind_hash); 116 WARN_ON(!icsk->icsk_bind_hash);
117 inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); 117 inet_twsk_add_bind_node(tw, &tw->tw_tb->owners);
@@ -137,7 +137,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
137 if (__sk_nulls_del_node_init_rcu(sk)) 137 if (__sk_nulls_del_node_init_rcu(sk))
138 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); 138 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
139 139
140 spin_unlock_bh(lock); 140 spin_unlock(lock);
141} 141}
142EXPORT_SYMBOL_GPL(__inet_twsk_hashdance); 142EXPORT_SYMBOL_GPL(__inet_twsk_hashdance);
143 143
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index bf97317e6c97..f08eebe60446 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2412,6 +2412,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2412 tp->snd_cwnd_cnt = 0; 2412 tp->snd_cwnd_cnt = 0;
2413 tp->window_clamp = 0; 2413 tp->window_clamp = 0;
2414 tcp_set_ca_state(sk, TCP_CA_Open); 2414 tcp_set_ca_state(sk, TCP_CA_Open);
2415 tp->is_sack_reneg = 0;
2415 tcp_clear_retrans(tp); 2416 tcp_clear_retrans(tp);
2416 inet_csk_delack_init(sk); 2417 inet_csk_delack_init(sk);
2417 /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0 2418 /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
index 69ee877574d0..8322f26e770e 100644
--- a/net/ipv4/tcp_bbr.c
+++ b/net/ipv4/tcp_bbr.c
@@ -110,7 +110,8 @@ struct bbr {
110 u32 lt_last_lost; /* LT intvl start: tp->lost */ 110 u32 lt_last_lost; /* LT intvl start: tp->lost */
111 u32 pacing_gain:10, /* current gain for setting pacing rate */ 111 u32 pacing_gain:10, /* current gain for setting pacing rate */
112 cwnd_gain:10, /* current gain for setting cwnd */ 112 cwnd_gain:10, /* current gain for setting cwnd */
113 full_bw_cnt:3, /* number of rounds without large bw gains */ 113 full_bw_reached:1, /* reached full bw in Startup? */
114 full_bw_cnt:2, /* number of rounds without large bw gains */
114 cycle_idx:3, /* current index in pacing_gain cycle array */ 115 cycle_idx:3, /* current index in pacing_gain cycle array */
115 has_seen_rtt:1, /* have we seen an RTT sample yet? */ 116 has_seen_rtt:1, /* have we seen an RTT sample yet? */
116 unused_b:5; 117 unused_b:5;
@@ -180,7 +181,7 @@ static bool bbr_full_bw_reached(const struct sock *sk)
180{ 181{
181 const struct bbr *bbr = inet_csk_ca(sk); 182 const struct bbr *bbr = inet_csk_ca(sk);
182 183
183 return bbr->full_bw_cnt >= bbr_full_bw_cnt; 184 return bbr->full_bw_reached;
184} 185}
185 186
186/* Return the windowed max recent bandwidth sample, in pkts/uS << BW_SCALE. */ 187/* Return the windowed max recent bandwidth sample, in pkts/uS << BW_SCALE. */
@@ -717,6 +718,7 @@ static void bbr_check_full_bw_reached(struct sock *sk,
717 return; 718 return;
718 } 719 }
719 ++bbr->full_bw_cnt; 720 ++bbr->full_bw_cnt;
721 bbr->full_bw_reached = bbr->full_bw_cnt >= bbr_full_bw_cnt;
720} 722}
721 723
722/* If pipe is probably full, drain the queue and then enter steady-state. */ 724/* If pipe is probably full, drain the queue and then enter steady-state. */
@@ -850,6 +852,7 @@ static void bbr_init(struct sock *sk)
850 bbr->restore_cwnd = 0; 852 bbr->restore_cwnd = 0;
851 bbr->round_start = 0; 853 bbr->round_start = 0;
852 bbr->idle_restart = 0; 854 bbr->idle_restart = 0;
855 bbr->full_bw_reached = 0;
853 bbr->full_bw = 0; 856 bbr->full_bw = 0;
854 bbr->full_bw_cnt = 0; 857 bbr->full_bw_cnt = 0;
855 bbr->cycle_mstamp = 0; 858 bbr->cycle_mstamp = 0;
@@ -871,6 +874,11 @@ static u32 bbr_sndbuf_expand(struct sock *sk)
871 */ 874 */
872static u32 bbr_undo_cwnd(struct sock *sk) 875static u32 bbr_undo_cwnd(struct sock *sk)
873{ 876{
877 struct bbr *bbr = inet_csk_ca(sk);
878
879 bbr->full_bw = 0; /* spurious slow-down; reset full pipe detection */
880 bbr->full_bw_cnt = 0;
881 bbr_reset_lt_bw_sampling(sk);
874 return tcp_sk(sk)->snd_cwnd; 882 return tcp_sk(sk)->snd_cwnd;
875} 883}
876 884
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 734cfc8ff76e..9550cc42de2d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -579,6 +579,7 @@ void tcp_rcv_space_adjust(struct sock *sk)
579 int time; 579 int time;
580 int copied; 580 int copied;
581 581
582 tcp_mstamp_refresh(tp);
582 time = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcvq_space.time); 583 time = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcvq_space.time);
583 if (time < (tp->rcv_rtt_est.rtt_us >> 3) || tp->rcv_rtt_est.rtt_us == 0) 584 if (time < (tp->rcv_rtt_est.rtt_us >> 3) || tp->rcv_rtt_est.rtt_us == 0)
584 return; 585 return;
@@ -1941,6 +1942,8 @@ void tcp_enter_loss(struct sock *sk)
1941 if (is_reneg) { 1942 if (is_reneg) {
1942 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSACKRENEGING); 1943 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSACKRENEGING);
1943 tp->sacked_out = 0; 1944 tp->sacked_out = 0;
1945 /* Mark SACK reneging until we recover from this loss event. */
1946 tp->is_sack_reneg = 1;
1944 } 1947 }
1945 tcp_clear_all_retrans_hints(tp); 1948 tcp_clear_all_retrans_hints(tp);
1946 1949
@@ -2326,6 +2329,7 @@ static void tcp_undo_cwnd_reduction(struct sock *sk, bool unmark_loss)
2326 } 2329 }
2327 tp->snd_cwnd_stamp = tcp_jiffies32; 2330 tp->snd_cwnd_stamp = tcp_jiffies32;
2328 tp->undo_marker = 0; 2331 tp->undo_marker = 0;
2332 tp->rack.advanced = 1; /* Force RACK to re-exam losses */
2329} 2333}
2330 2334
2331static inline bool tcp_may_undo(const struct tcp_sock *tp) 2335static inline bool tcp_may_undo(const struct tcp_sock *tp)
@@ -2364,6 +2368,7 @@ static bool tcp_try_undo_recovery(struct sock *sk)
2364 return true; 2368 return true;
2365 } 2369 }
2366 tcp_set_ca_state(sk, TCP_CA_Open); 2370 tcp_set_ca_state(sk, TCP_CA_Open);
2371 tp->is_sack_reneg = 0;
2367 return false; 2372 return false;
2368} 2373}
2369 2374
@@ -2397,8 +2402,10 @@ static bool tcp_try_undo_loss(struct sock *sk, bool frto_undo)
2397 NET_INC_STATS(sock_net(sk), 2402 NET_INC_STATS(sock_net(sk),
2398 LINUX_MIB_TCPSPURIOUSRTOS); 2403 LINUX_MIB_TCPSPURIOUSRTOS);
2399 inet_csk(sk)->icsk_retransmits = 0; 2404 inet_csk(sk)->icsk_retransmits = 0;
2400 if (frto_undo || tcp_is_sack(tp)) 2405 if (frto_undo || tcp_is_sack(tp)) {
2401 tcp_set_ca_state(sk, TCP_CA_Open); 2406 tcp_set_ca_state(sk, TCP_CA_Open);
2407 tp->is_sack_reneg = 0;
2408 }
2402 return true; 2409 return true;
2403 } 2410 }
2404 return false; 2411 return false;
@@ -3495,6 +3502,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
3495 struct tcp_sacktag_state sack_state; 3502 struct tcp_sacktag_state sack_state;
3496 struct rate_sample rs = { .prior_delivered = 0 }; 3503 struct rate_sample rs = { .prior_delivered = 0 };
3497 u32 prior_snd_una = tp->snd_una; 3504 u32 prior_snd_una = tp->snd_una;
3505 bool is_sack_reneg = tp->is_sack_reneg;
3498 u32 ack_seq = TCP_SKB_CB(skb)->seq; 3506 u32 ack_seq = TCP_SKB_CB(skb)->seq;
3499 u32 ack = TCP_SKB_CB(skb)->ack_seq; 3507 u32 ack = TCP_SKB_CB(skb)->ack_seq;
3500 bool is_dupack = false; 3508 bool is_dupack = false;
@@ -3611,7 +3619,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
3611 3619
3612 delivered = tp->delivered - delivered; /* freshly ACKed or SACKed */ 3620 delivered = tp->delivered - delivered; /* freshly ACKed or SACKed */
3613 lost = tp->lost - lost; /* freshly marked lost */ 3621 lost = tp->lost - lost; /* freshly marked lost */
3614 tcp_rate_gen(sk, delivered, lost, sack_state.rate); 3622 tcp_rate_gen(sk, delivered, lost, is_sack_reneg, sack_state.rate);
3615 tcp_cong_control(sk, ack, delivered, flag, sack_state.rate); 3623 tcp_cong_control(sk, ack, delivered, flag, sack_state.rate);
3616 tcp_xmit_recovery(sk, rexmit); 3624 tcp_xmit_recovery(sk, rexmit);
3617 return 1; 3625 return 1;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index c6bc0c4d19c6..77ea45da0fe9 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1591,6 +1591,34 @@ int tcp_filter(struct sock *sk, struct sk_buff *skb)
1591} 1591}
1592EXPORT_SYMBOL(tcp_filter); 1592EXPORT_SYMBOL(tcp_filter);
1593 1593
1594static void tcp_v4_restore_cb(struct sk_buff *skb)
1595{
1596 memmove(IPCB(skb), &TCP_SKB_CB(skb)->header.h4,
1597 sizeof(struct inet_skb_parm));
1598}
1599
1600static void tcp_v4_fill_cb(struct sk_buff *skb, const struct iphdr *iph,
1601 const struct tcphdr *th)
1602{
1603 /* This is tricky : We move IPCB at its correct location into TCP_SKB_CB()
1604 * barrier() makes sure compiler wont play fool^Waliasing games.
1605 */
1606 memmove(&TCP_SKB_CB(skb)->header.h4, IPCB(skb),
1607 sizeof(struct inet_skb_parm));
1608 barrier();
1609
1610 TCP_SKB_CB(skb)->seq = ntohl(th->seq);
1611 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
1612 skb->len - th->doff * 4);
1613 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
1614 TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th);
1615 TCP_SKB_CB(skb)->tcp_tw_isn = 0;
1616 TCP_SKB_CB(skb)->ip_dsfield = ipv4_get_dsfield(iph);
1617 TCP_SKB_CB(skb)->sacked = 0;
1618 TCP_SKB_CB(skb)->has_rxtstamp =
1619 skb->tstamp || skb_hwtstamps(skb)->hwtstamp;
1620}
1621
1594/* 1622/*
1595 * From tcp_input.c 1623 * From tcp_input.c
1596 */ 1624 */
@@ -1631,24 +1659,6 @@ int tcp_v4_rcv(struct sk_buff *skb)
1631 1659
1632 th = (const struct tcphdr *)skb->data; 1660 th = (const struct tcphdr *)skb->data;
1633 iph = ip_hdr(skb); 1661 iph = ip_hdr(skb);
1634 /* This is tricky : We move IPCB at its correct location into TCP_SKB_CB()
1635 * barrier() makes sure compiler wont play fool^Waliasing games.
1636 */
1637 memmove(&TCP_SKB_CB(skb)->header.h4, IPCB(skb),
1638 sizeof(struct inet_skb_parm));
1639 barrier();
1640
1641 TCP_SKB_CB(skb)->seq = ntohl(th->seq);
1642 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
1643 skb->len - th->doff * 4);
1644 TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
1645 TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th);
1646 TCP_SKB_CB(skb)->tcp_tw_isn = 0;
1647 TCP_SKB_CB(skb)->ip_dsfield = ipv4_get_dsfield(iph);
1648 TCP_SKB_CB(skb)->sacked = 0;
1649 TCP_SKB_CB(skb)->has_rxtstamp =
1650 skb->tstamp || skb_hwtstamps(skb)->hwtstamp;
1651
1652lookup: 1662lookup:
1653 sk = __inet_lookup_skb(&tcp_hashinfo, skb, __tcp_hdrlen(th), th->source, 1663 sk = __inet_lookup_skb(&tcp_hashinfo, skb, __tcp_hdrlen(th), th->source,
1654 th->dest, sdif, &refcounted); 1664 th->dest, sdif, &refcounted);
@@ -1679,14 +1689,19 @@ process:
1679 sock_hold(sk); 1689 sock_hold(sk);
1680 refcounted = true; 1690 refcounted = true;
1681 nsk = NULL; 1691 nsk = NULL;
1682 if (!tcp_filter(sk, skb)) 1692 if (!tcp_filter(sk, skb)) {
1693 th = (const struct tcphdr *)skb->data;
1694 iph = ip_hdr(skb);
1695 tcp_v4_fill_cb(skb, iph, th);
1683 nsk = tcp_check_req(sk, skb, req, false); 1696 nsk = tcp_check_req(sk, skb, req, false);
1697 }
1684 if (!nsk) { 1698 if (!nsk) {
1685 reqsk_put(req); 1699 reqsk_put(req);
1686 goto discard_and_relse; 1700 goto discard_and_relse;
1687 } 1701 }
1688 if (nsk == sk) { 1702 if (nsk == sk) {
1689 reqsk_put(req); 1703 reqsk_put(req);
1704 tcp_v4_restore_cb(skb);
1690 } else if (tcp_child_process(sk, nsk, skb)) { 1705 } else if (tcp_child_process(sk, nsk, skb)) {
1691 tcp_v4_send_reset(nsk, skb); 1706 tcp_v4_send_reset(nsk, skb);
1692 goto discard_and_relse; 1707 goto discard_and_relse;
@@ -1712,6 +1727,7 @@ process:
1712 goto discard_and_relse; 1727 goto discard_and_relse;
1713 th = (const struct tcphdr *)skb->data; 1728 th = (const struct tcphdr *)skb->data;
1714 iph = ip_hdr(skb); 1729 iph = ip_hdr(skb);
1730 tcp_v4_fill_cb(skb, iph, th);
1715 1731
1716 skb->dev = NULL; 1732 skb->dev = NULL;
1717 1733
@@ -1742,6 +1758,8 @@ no_tcp_socket:
1742 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) 1758 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
1743 goto discard_it; 1759 goto discard_it;
1744 1760
1761 tcp_v4_fill_cb(skb, iph, th);
1762
1745 if (tcp_checksum_complete(skb)) { 1763 if (tcp_checksum_complete(skb)) {
1746csum_error: 1764csum_error:
1747 __TCP_INC_STATS(net, TCP_MIB_CSUMERRORS); 1765 __TCP_INC_STATS(net, TCP_MIB_CSUMERRORS);
@@ -1768,6 +1786,8 @@ do_time_wait:
1768 goto discard_it; 1786 goto discard_it;
1769 } 1787 }
1770 1788
1789 tcp_v4_fill_cb(skb, iph, th);
1790
1771 if (tcp_checksum_complete(skb)) { 1791 if (tcp_checksum_complete(skb)) {
1772 inet_twsk_put(inet_twsk(sk)); 1792 inet_twsk_put(inet_twsk(sk));
1773 goto csum_error; 1793 goto csum_error;
@@ -1784,6 +1804,7 @@ do_time_wait:
1784 if (sk2) { 1804 if (sk2) {
1785 inet_twsk_deschedule_put(inet_twsk(sk)); 1805 inet_twsk_deschedule_put(inet_twsk(sk));
1786 sk = sk2; 1806 sk = sk2;
1807 tcp_v4_restore_cb(skb);
1787 refcounted = false; 1808 refcounted = false;
1788 goto process; 1809 goto process;
1789 } 1810 }
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index e36eff0403f4..b079b619b60c 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -310,10 +310,16 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
310 if (state == TCP_TIME_WAIT) 310 if (state == TCP_TIME_WAIT)
311 timeo = TCP_TIMEWAIT_LEN; 311 timeo = TCP_TIMEWAIT_LEN;
312 312
313 /* tw_timer is pinned, so we need to make sure BH are disabled
314 * in following section, otherwise timer handler could run before
315 * we complete the initialization.
316 */
317 local_bh_disable();
313 inet_twsk_schedule(tw, timeo); 318 inet_twsk_schedule(tw, timeo);
314 /* Linkage updates. */ 319 /* Linkage updates. */
315 __inet_twsk_hashdance(tw, sk, &tcp_hashinfo); 320 __inet_twsk_hashdance(tw, sk, &tcp_hashinfo);
316 inet_twsk_put(tw); 321 inet_twsk_put(tw);
322 local_bh_enable();
317 } else { 323 } else {
318 /* Sorry, if we're out of memory, just CLOSE this 324 /* Sorry, if we're out of memory, just CLOSE this
319 * socket up. We've got bigger problems than 325 * socket up. We've got bigger problems than
diff --git a/net/ipv4/tcp_rate.c b/net/ipv4/tcp_rate.c
index 3330a370d306..c61240e43923 100644
--- a/net/ipv4/tcp_rate.c
+++ b/net/ipv4/tcp_rate.c
@@ -106,7 +106,7 @@ void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
106 106
107/* Update the connection delivery information and generate a rate sample. */ 107/* Update the connection delivery information and generate a rate sample. */
108void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost, 108void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
109 struct rate_sample *rs) 109 bool is_sack_reneg, struct rate_sample *rs)
110{ 110{
111 struct tcp_sock *tp = tcp_sk(sk); 111 struct tcp_sock *tp = tcp_sk(sk);
112 u32 snd_us, ack_us; 112 u32 snd_us, ack_us;
@@ -124,8 +124,12 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
124 124
125 rs->acked_sacked = delivered; /* freshly ACKed or SACKed */ 125 rs->acked_sacked = delivered; /* freshly ACKed or SACKed */
126 rs->losses = lost; /* freshly marked lost */ 126 rs->losses = lost; /* freshly marked lost */
127 /* Return an invalid sample if no timing information is available. */ 127 /* Return an invalid sample if no timing information is available or
128 if (!rs->prior_mstamp) { 128 * in recovery from loss with SACK reneging. Rate samples taken during
129 * a SACK reneging event may overestimate bw by including packets that
130 * were SACKed before the reneg.
131 */
132 if (!rs->prior_mstamp || is_sack_reneg) {
129 rs->delivered = -1; 133 rs->delivered = -1;
130 rs->interval_us = -1; 134 rs->interval_us = -1;
131 return; 135 return;
diff --git a/net/ipv4/tcp_recovery.c b/net/ipv4/tcp_recovery.c
index d3ea89020c69..3a81720ac0c4 100644
--- a/net/ipv4/tcp_recovery.c
+++ b/net/ipv4/tcp_recovery.c
@@ -55,7 +55,8 @@ static void tcp_rack_detect_loss(struct sock *sk, u32 *reo_timeout)
55 * to queuing or delayed ACKs. 55 * to queuing or delayed ACKs.
56 */ 56 */
57 reo_wnd = 1000; 57 reo_wnd = 1000;
58 if ((tp->rack.reord || !tp->lost_out) && min_rtt != ~0U) { 58 if ((tp->rack.reord || inet_csk(sk)->icsk_ca_state < TCP_CA_Recovery) &&
59 min_rtt != ~0U) {
59 reo_wnd = max((min_rtt >> 2) * tp->rack.reo_wnd_steps, reo_wnd); 60 reo_wnd = max((min_rtt >> 2) * tp->rack.reo_wnd_steps, reo_wnd);
60 reo_wnd = min(reo_wnd, tp->srtt_us >> 3); 61 reo_wnd = min(reo_wnd, tp->srtt_us >> 3);
61 } 62 }
@@ -79,12 +80,12 @@ static void tcp_rack_detect_loss(struct sock *sk, u32 *reo_timeout)
79 */ 80 */
80 remaining = tp->rack.rtt_us + reo_wnd - 81 remaining = tp->rack.rtt_us + reo_wnd -
81 tcp_stamp_us_delta(tp->tcp_mstamp, skb->skb_mstamp); 82 tcp_stamp_us_delta(tp->tcp_mstamp, skb->skb_mstamp);
82 if (remaining < 0) { 83 if (remaining <= 0) {
83 tcp_rack_mark_skb_lost(sk, skb); 84 tcp_rack_mark_skb_lost(sk, skb);
84 list_del_init(&skb->tcp_tsorted_anchor); 85 list_del_init(&skb->tcp_tsorted_anchor);
85 } else { 86 } else {
86 /* Record maximum wait time (+1 to avoid 0) */ 87 /* Record maximum wait time */
87 *reo_timeout = max_t(u32, *reo_timeout, 1 + remaining); 88 *reo_timeout = max_t(u32, *reo_timeout, remaining);
88 } 89 }
89 } 90 }
90} 91}
@@ -116,13 +117,8 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
116{ 117{
117 u32 rtt_us; 118 u32 rtt_us;
118 119
119 if (tp->rack.mstamp &&
120 !tcp_rack_sent_after(xmit_time, tp->rack.mstamp,
121 end_seq, tp->rack.end_seq))
122 return;
123
124 rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, xmit_time); 120 rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, xmit_time);
125 if (sacked & TCPCB_RETRANS) { 121 if (rtt_us < tcp_min_rtt(tp) && (sacked & TCPCB_RETRANS)) {
126 /* If the sacked packet was retransmitted, it's ambiguous 122 /* If the sacked packet was retransmitted, it's ambiguous
127 * whether the retransmission or the original (or the prior 123 * whether the retransmission or the original (or the prior
128 * retransmission) was sacked. 124 * retransmission) was sacked.
@@ -133,13 +129,15 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
133 * so it's at least one RTT (i.e., retransmission is at least 129 * so it's at least one RTT (i.e., retransmission is at least
134 * an RTT later). 130 * an RTT later).
135 */ 131 */
136 if (rtt_us < tcp_min_rtt(tp)) 132 return;
137 return;
138 } 133 }
139 tp->rack.rtt_us = rtt_us;
140 tp->rack.mstamp = xmit_time;
141 tp->rack.end_seq = end_seq;
142 tp->rack.advanced = 1; 134 tp->rack.advanced = 1;
135 tp->rack.rtt_us = rtt_us;
136 if (tcp_rack_sent_after(xmit_time, tp->rack.mstamp,
137 end_seq, tp->rack.end_seq)) {
138 tp->rack.mstamp = xmit_time;
139 tp->rack.end_seq = end_seq;
140 }
143} 141}
144 142
145/* We have waited long enough to accommodate reordering. Mark the expired 143/* We have waited long enough to accommodate reordering. Mark the expired
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 3d3092adf1d2..db84f523656d 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -904,7 +904,7 @@ static int ipxip6_rcv(struct sk_buff *skb, u8 ipproto,
904 if (t->parms.collect_md) { 904 if (t->parms.collect_md) {
905 tun_dst = ipv6_tun_rx_dst(skb, 0, 0, 0); 905 tun_dst = ipv6_tun_rx_dst(skb, 0, 0, 0);
906 if (!tun_dst) 906 if (!tun_dst)
907 return 0; 907 goto drop;
908 } 908 }
909 ret = __ip6_tnl_rcv(t, skb, tpi, tun_dst, dscp_ecn_decapsulate, 909 ret = __ip6_tnl_rcv(t, skb, tpi, tun_dst, dscp_ecn_decapsulate,
910 log_ecn_error); 910 log_ecn_error);
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index d60ddcb0bfe2..d7dc23c1b2ca 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1098,6 +1098,7 @@ static void ipip6_tunnel_update(struct ip_tunnel *t, struct ip_tunnel_parm *p,
1098 ipip6_tunnel_link(sitn, t); 1098 ipip6_tunnel_link(sitn, t);
1099 t->parms.iph.ttl = p->iph.ttl; 1099 t->parms.iph.ttl = p->iph.ttl;
1100 t->parms.iph.tos = p->iph.tos; 1100 t->parms.iph.tos = p->iph.tos;
1101 t->parms.iph.frag_off = p->iph.frag_off;
1101 if (t->parms.link != p->link || t->fwmark != fwmark) { 1102 if (t->parms.link != p->link || t->fwmark != fwmark) {
1102 t->parms.link = p->link; 1103 t->parms.link = p->link;
1103 t->fwmark = fwmark; 1104 t->fwmark = fwmark;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 6bb98c93edfe..1f04ec0e4a7a 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1454,7 +1454,6 @@ process:
1454 struct sock *nsk; 1454 struct sock *nsk;
1455 1455
1456 sk = req->rsk_listener; 1456 sk = req->rsk_listener;
1457 tcp_v6_fill_cb(skb, hdr, th);
1458 if (tcp_v6_inbound_md5_hash(sk, skb)) { 1457 if (tcp_v6_inbound_md5_hash(sk, skb)) {
1459 sk_drops_add(sk, skb); 1458 sk_drops_add(sk, skb);
1460 reqsk_put(req); 1459 reqsk_put(req);
@@ -1467,8 +1466,12 @@ process:
1467 sock_hold(sk); 1466 sock_hold(sk);
1468 refcounted = true; 1467 refcounted = true;
1469 nsk = NULL; 1468 nsk = NULL;
1470 if (!tcp_filter(sk, skb)) 1469 if (!tcp_filter(sk, skb)) {
1470 th = (const struct tcphdr *)skb->data;
1471 hdr = ipv6_hdr(skb);
1472 tcp_v6_fill_cb(skb, hdr, th);
1471 nsk = tcp_check_req(sk, skb, req, false); 1473 nsk = tcp_check_req(sk, skb, req, false);
1474 }
1472 if (!nsk) { 1475 if (!nsk) {
1473 reqsk_put(req); 1476 reqsk_put(req);
1474 goto discard_and_relse; 1477 goto discard_and_relse;
@@ -1492,8 +1495,6 @@ process:
1492 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) 1495 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
1493 goto discard_and_relse; 1496 goto discard_and_relse;
1494 1497
1495 tcp_v6_fill_cb(skb, hdr, th);
1496
1497 if (tcp_v6_inbound_md5_hash(sk, skb)) 1498 if (tcp_v6_inbound_md5_hash(sk, skb))
1498 goto discard_and_relse; 1499 goto discard_and_relse;
1499 1500
@@ -1501,6 +1502,7 @@ process:
1501 goto discard_and_relse; 1502 goto discard_and_relse;
1502 th = (const struct tcphdr *)skb->data; 1503 th = (const struct tcphdr *)skb->data;
1503 hdr = ipv6_hdr(skb); 1504 hdr = ipv6_hdr(skb);
1505 tcp_v6_fill_cb(skb, hdr, th);
1504 1506
1505 skb->dev = NULL; 1507 skb->dev = NULL;
1506 1508
@@ -1590,7 +1592,6 @@ do_time_wait:
1590 tcp_v6_timewait_ack(sk, skb); 1592 tcp_v6_timewait_ack(sk, skb);
1591 break; 1593 break;
1592 case TCP_TW_RST: 1594 case TCP_TW_RST:
1593 tcp_v6_restore_cb(skb);
1594 tcp_v6_send_reset(sk, skb); 1595 tcp_v6_send_reset(sk, skb);
1595 inet_twsk_deschedule_put(inet_twsk(sk)); 1596 inet_twsk_deschedule_put(inet_twsk(sk));
1596 goto discard_it; 1597 goto discard_it;
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 0b750a22c4b9..d4e98f20fc2a 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -1625,60 +1625,30 @@ static struct proto kcm_proto = {
1625}; 1625};
1626 1626
1627/* Clone a kcm socket. */ 1627/* Clone a kcm socket. */
1628static int kcm_clone(struct socket *osock, struct kcm_clone *info, 1628static struct file *kcm_clone(struct socket *osock)
1629 struct socket **newsockp)
1630{ 1629{
1631 struct socket *newsock; 1630 struct socket *newsock;
1632 struct sock *newsk; 1631 struct sock *newsk;
1633 struct file *newfile;
1634 int err, newfd;
1635 1632
1636 err = -ENFILE;
1637 newsock = sock_alloc(); 1633 newsock = sock_alloc();
1638 if (!newsock) 1634 if (!newsock)
1639 goto out; 1635 return ERR_PTR(-ENFILE);
1640 1636
1641 newsock->type = osock->type; 1637 newsock->type = osock->type;
1642 newsock->ops = osock->ops; 1638 newsock->ops = osock->ops;
1643 1639
1644 __module_get(newsock->ops->owner); 1640 __module_get(newsock->ops->owner);
1645 1641
1646 newfd = get_unused_fd_flags(0);
1647 if (unlikely(newfd < 0)) {
1648 err = newfd;
1649 goto out_fd_fail;
1650 }
1651
1652 newfile = sock_alloc_file(newsock, 0, osock->sk->sk_prot_creator->name);
1653 if (IS_ERR(newfile)) {
1654 err = PTR_ERR(newfile);
1655 goto out_sock_alloc_fail;
1656 }
1657
1658 newsk = sk_alloc(sock_net(osock->sk), PF_KCM, GFP_KERNEL, 1642 newsk = sk_alloc(sock_net(osock->sk), PF_KCM, GFP_KERNEL,
1659 &kcm_proto, true); 1643 &kcm_proto, true);
1660 if (!newsk) { 1644 if (!newsk) {
1661 err = -ENOMEM; 1645 sock_release(newsock);
1662 goto out_sk_alloc_fail; 1646 return ERR_PTR(-ENOMEM);
1663 } 1647 }
1664
1665 sock_init_data(newsock, newsk); 1648 sock_init_data(newsock, newsk);
1666 init_kcm_sock(kcm_sk(newsk), kcm_sk(osock->sk)->mux); 1649 init_kcm_sock(kcm_sk(newsk), kcm_sk(osock->sk)->mux);
1667 1650
1668 fd_install(newfd, newfile); 1651 return sock_alloc_file(newsock, 0, osock->sk->sk_prot_creator->name);
1669 *newsockp = newsock;
1670 info->fd = newfd;
1671
1672 return 0;
1673
1674out_sk_alloc_fail:
1675 fput(newfile);
1676out_sock_alloc_fail:
1677 put_unused_fd(newfd);
1678out_fd_fail:
1679 sock_release(newsock);
1680out:
1681 return err;
1682} 1652}
1683 1653
1684static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) 1654static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
@@ -1708,17 +1678,25 @@ static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1708 } 1678 }
1709 case SIOCKCMCLONE: { 1679 case SIOCKCMCLONE: {
1710 struct kcm_clone info; 1680 struct kcm_clone info;
1711 struct socket *newsock = NULL; 1681 struct file *file;
1712 1682
1713 err = kcm_clone(sock, &info, &newsock); 1683 info.fd = get_unused_fd_flags(0);
1714 if (!err) { 1684 if (unlikely(info.fd < 0))
1715 if (copy_to_user((void __user *)arg, &info, 1685 return info.fd;
1716 sizeof(info))) {
1717 err = -EFAULT;
1718 sys_close(info.fd);
1719 }
1720 }
1721 1686
1687 file = kcm_clone(sock);
1688 if (IS_ERR(file)) {
1689 put_unused_fd(info.fd);
1690 return PTR_ERR(file);
1691 }
1692 if (copy_to_user((void __user *)arg, &info,
1693 sizeof(info))) {
1694 put_unused_fd(info.fd);
1695 fput(file);
1696 return -EFAULT;
1697 }
1698 fd_install(info.fd, file);
1699 err = 0;
1722 break; 1700 break;
1723 } 1701 }
1724 default: 1702 default:
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 8886f15abe90..bc2f1e0977d6 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -183,7 +183,7 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
183 long i; 183 long i;
184 int ret; 184 int ret;
185 185
186 if (rs->rs_bound_addr == 0) { 186 if (rs->rs_bound_addr == 0 || !rs->rs_transport) {
187 ret = -ENOTCONN; /* XXX not a great errno */ 187 ret = -ENOTCONN; /* XXX not a great errno */
188 goto out; 188 goto out;
189 } 189 }
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 8f7cf4c042be..dcd818fa837e 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -860,6 +860,7 @@ static void rxrpc_sock_destructor(struct sock *sk)
860static int rxrpc_release_sock(struct sock *sk) 860static int rxrpc_release_sock(struct sock *sk)
861{ 861{
862 struct rxrpc_sock *rx = rxrpc_sk(sk); 862 struct rxrpc_sock *rx = rxrpc_sk(sk);
863 struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk));
863 864
864 _enter("%p{%d,%d}", sk, sk->sk_state, refcount_read(&sk->sk_refcnt)); 865 _enter("%p{%d,%d}", sk, sk->sk_state, refcount_read(&sk->sk_refcnt));
865 866
@@ -895,8 +896,8 @@ static int rxrpc_release_sock(struct sock *sk)
895 rxrpc_release_calls_on_socket(rx); 896 rxrpc_release_calls_on_socket(rx);
896 flush_workqueue(rxrpc_workqueue); 897 flush_workqueue(rxrpc_workqueue);
897 rxrpc_purge_queue(&sk->sk_receive_queue); 898 rxrpc_purge_queue(&sk->sk_receive_queue);
898 rxrpc_queue_work(&rx->local->rxnet->service_conn_reaper); 899 rxrpc_queue_work(&rxnet->service_conn_reaper);
899 rxrpc_queue_work(&rx->local->rxnet->client_conn_reaper); 900 rxrpc_queue_work(&rxnet->client_conn_reaper);
900 901
901 rxrpc_put_local(rx->local); 902 rxrpc_put_local(rx->local);
902 rx->local = NULL; 903 rx->local = NULL;
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index bda952ffe6a6..ad2ab1103189 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -123,7 +123,7 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason,
123 else 123 else
124 ack_at = expiry; 124 ack_at = expiry;
125 125
126 ack_at = jiffies + expiry; 126 ack_at += now;
127 if (time_before(ack_at, call->ack_at)) { 127 if (time_before(ack_at, call->ack_at)) {
128 WRITE_ONCE(call->ack_at, ack_at); 128 WRITE_ONCE(call->ack_at, ack_at);
129 rxrpc_reduce_call_timer(call, ack_at, now, 129 rxrpc_reduce_call_timer(call, ack_at, now,
@@ -426,7 +426,7 @@ recheck_state:
426 next = call->expect_rx_by; 426 next = call->expect_rx_by;
427 427
428#define set(T) { t = READ_ONCE(T); if (time_before(t, next)) next = t; } 428#define set(T) { t = READ_ONCE(T); if (time_before(t, next)) next = t; }
429 429
430 set(call->expect_req_by); 430 set(call->expect_req_by);
431 set(call->expect_term_by); 431 set(call->expect_term_by);
432 set(call->ack_at); 432 set(call->ack_at);
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c
index 9e9a8db1bc9c..4ca11be6be3c 100644
--- a/net/rxrpc/conn_event.c
+++ b/net/rxrpc/conn_event.c
@@ -30,22 +30,18 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
30 struct rxrpc_skb_priv *sp = skb ? rxrpc_skb(skb) : NULL; 30 struct rxrpc_skb_priv *sp = skb ? rxrpc_skb(skb) : NULL;
31 struct rxrpc_channel *chan; 31 struct rxrpc_channel *chan;
32 struct msghdr msg; 32 struct msghdr msg;
33 struct kvec iov; 33 struct kvec iov[3];
34 struct { 34 struct {
35 struct rxrpc_wire_header whdr; 35 struct rxrpc_wire_header whdr;
36 union { 36 union {
37 struct { 37 __be32 abort_code;
38 __be32 code; 38 struct rxrpc_ackpacket ack;
39 } abort;
40 struct {
41 struct rxrpc_ackpacket ack;
42 u8 padding[3];
43 struct rxrpc_ackinfo info;
44 };
45 }; 39 };
46 } __attribute__((packed)) pkt; 40 } __attribute__((packed)) pkt;
41 struct rxrpc_ackinfo ack_info;
47 size_t len; 42 size_t len;
48 u32 serial, mtu, call_id; 43 int ioc;
44 u32 serial, mtu, call_id, padding;
49 45
50 _enter("%d", conn->debug_id); 46 _enter("%d", conn->debug_id);
51 47
@@ -66,6 +62,13 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
66 msg.msg_controllen = 0; 62 msg.msg_controllen = 0;
67 msg.msg_flags = 0; 63 msg.msg_flags = 0;
68 64
65 iov[0].iov_base = &pkt;
66 iov[0].iov_len = sizeof(pkt.whdr);
67 iov[1].iov_base = &padding;
68 iov[1].iov_len = 3;
69 iov[2].iov_base = &ack_info;
70 iov[2].iov_len = sizeof(ack_info);
71
69 pkt.whdr.epoch = htonl(conn->proto.epoch); 72 pkt.whdr.epoch = htonl(conn->proto.epoch);
70 pkt.whdr.cid = htonl(conn->proto.cid); 73 pkt.whdr.cid = htonl(conn->proto.cid);
71 pkt.whdr.callNumber = htonl(call_id); 74 pkt.whdr.callNumber = htonl(call_id);
@@ -80,8 +83,10 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
80 len = sizeof(pkt.whdr); 83 len = sizeof(pkt.whdr);
81 switch (chan->last_type) { 84 switch (chan->last_type) {
82 case RXRPC_PACKET_TYPE_ABORT: 85 case RXRPC_PACKET_TYPE_ABORT:
83 pkt.abort.code = htonl(chan->last_abort); 86 pkt.abort_code = htonl(chan->last_abort);
84 len += sizeof(pkt.abort); 87 iov[0].iov_len += sizeof(pkt.abort_code);
88 len += sizeof(pkt.abort_code);
89 ioc = 1;
85 break; 90 break;
86 91
87 case RXRPC_PACKET_TYPE_ACK: 92 case RXRPC_PACKET_TYPE_ACK:
@@ -94,13 +99,19 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
94 pkt.ack.serial = htonl(skb ? sp->hdr.serial : 0); 99 pkt.ack.serial = htonl(skb ? sp->hdr.serial : 0);
95 pkt.ack.reason = skb ? RXRPC_ACK_DUPLICATE : RXRPC_ACK_IDLE; 100 pkt.ack.reason = skb ? RXRPC_ACK_DUPLICATE : RXRPC_ACK_IDLE;
96 pkt.ack.nAcks = 0; 101 pkt.ack.nAcks = 0;
97 pkt.info.rxMTU = htonl(rxrpc_rx_mtu); 102 ack_info.rxMTU = htonl(rxrpc_rx_mtu);
98 pkt.info.maxMTU = htonl(mtu); 103 ack_info.maxMTU = htonl(mtu);
99 pkt.info.rwind = htonl(rxrpc_rx_window_size); 104 ack_info.rwind = htonl(rxrpc_rx_window_size);
100 pkt.info.jumbo_max = htonl(rxrpc_rx_jumbo_max); 105 ack_info.jumbo_max = htonl(rxrpc_rx_jumbo_max);
101 pkt.whdr.flags |= RXRPC_SLOW_START_OK; 106 pkt.whdr.flags |= RXRPC_SLOW_START_OK;
102 len += sizeof(pkt.ack) + sizeof(pkt.info); 107 padding = 0;
108 iov[0].iov_len += sizeof(pkt.ack);
109 len += sizeof(pkt.ack) + 3 + sizeof(ack_info);
110 ioc = 3;
103 break; 111 break;
112
113 default:
114 return;
104 } 115 }
105 116
106 /* Resync with __rxrpc_disconnect_call() and check that the last call 117 /* Resync with __rxrpc_disconnect_call() and check that the last call
@@ -110,9 +121,6 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
110 if (READ_ONCE(chan->last_call) != call_id) 121 if (READ_ONCE(chan->last_call) != call_id)
111 return; 122 return;
112 123
113 iov.iov_base = &pkt;
114 iov.iov_len = len;
115
116 serial = atomic_inc_return(&conn->serial); 124 serial = atomic_inc_return(&conn->serial);
117 pkt.whdr.serial = htonl(serial); 125 pkt.whdr.serial = htonl(serial);
118 126
@@ -127,7 +135,7 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
127 break; 135 break;
128 } 136 }
129 137
130 kernel_sendmsg(conn->params.local->socket, &msg, &iov, 1, len); 138 kernel_sendmsg(conn->params.local->socket, &msg, iov, ioc, len);
131 _leave(""); 139 _leave("");
132 return; 140 return;
133} 141}
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c
index 1aad04a32d5e..c628351eb900 100644
--- a/net/rxrpc/conn_object.c
+++ b/net/rxrpc/conn_object.c
@@ -424,7 +424,7 @@ void rxrpc_service_connection_reaper(struct work_struct *work)
424 if (earliest != now + MAX_JIFFY_OFFSET) { 424 if (earliest != now + MAX_JIFFY_OFFSET) {
425 _debug("reschedule reaper %ld", (long)earliest - (long)now); 425 _debug("reschedule reaper %ld", (long)earliest - (long)now);
426 ASSERT(time_after(earliest, now)); 426 ASSERT(time_after(earliest, now));
427 rxrpc_set_service_reap_timer(rxnet, earliest); 427 rxrpc_set_service_reap_timer(rxnet, earliest);
428 } 428 }
429 429
430 while (!list_empty(&graveyard)) { 430 while (!list_empty(&graveyard)) {
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 23a5e61d8f79..6fc61400337f 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -976,7 +976,7 @@ static void rxrpc_input_call_packet(struct rxrpc_call *call,
976 rxrpc_reduce_call_timer(call, expect_rx_by, now, 976 rxrpc_reduce_call_timer(call, expect_rx_by, now,
977 rxrpc_timer_set_for_normal); 977 rxrpc_timer_set_for_normal);
978 } 978 }
979 979
980 switch (sp->hdr.type) { 980 switch (sp->hdr.type) {
981 case RXRPC_PACKET_TYPE_DATA: 981 case RXRPC_PACKET_TYPE_DATA:
982 rxrpc_input_data(call, skb, skew); 982 rxrpc_input_data(call, skb, skew);
@@ -1213,7 +1213,7 @@ void rxrpc_data_ready(struct sock *udp_sk)
1213 goto reupgrade; 1213 goto reupgrade;
1214 conn->service_id = sp->hdr.serviceId; 1214 conn->service_id = sp->hdr.serviceId;
1215 } 1215 }
1216 1216
1217 if (sp->hdr.callNumber == 0) { 1217 if (sp->hdr.callNumber == 0) {
1218 /* Connection-level packet */ 1218 /* Connection-level packet */
1219 _debug("CONN %p {%d}", conn, conn->debug_id); 1219 _debug("CONN %p {%d}", conn, conn->debug_id);
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
index a1c53ac066a1..09f2a3e05221 100644
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -233,7 +233,7 @@ static void rxrpc_queue_packet(struct rxrpc_sock *rx, struct rxrpc_call *call,
233 if (resend_at < 1) 233 if (resend_at < 1)
234 resend_at = 1; 234 resend_at = 1;
235 235
236 resend_at = now + rxrpc_resend_timeout; 236 resend_at += now;
237 WRITE_ONCE(call->resend_at, resend_at); 237 WRITE_ONCE(call->resend_at, resend_at);
238 rxrpc_reduce_call_timer(call, resend_at, now, 238 rxrpc_reduce_call_timer(call, resend_at, now,
239 rxrpc_timer_set_for_send); 239 rxrpc_timer_set_for_send);
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
index 8b5abcd2f32f..9438969290a6 100644
--- a/net/sched/act_sample.c
+++ b/net/sched/act_sample.c
@@ -96,23 +96,16 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,
96 return ret; 96 return ret;
97} 97}
98 98
99static void tcf_sample_cleanup_rcu(struct rcu_head *rcu) 99static void tcf_sample_cleanup(struct tc_action *a, int bind)
100{ 100{
101 struct tcf_sample *s = container_of(rcu, struct tcf_sample, rcu); 101 struct tcf_sample *s = to_sample(a);
102 struct psample_group *psample_group; 102 struct psample_group *psample_group;
103 103
104 psample_group = rcu_dereference_protected(s->psample_group, 1); 104 psample_group = rtnl_dereference(s->psample_group);
105 RCU_INIT_POINTER(s->psample_group, NULL); 105 RCU_INIT_POINTER(s->psample_group, NULL);
106 psample_group_put(psample_group); 106 psample_group_put(psample_group);
107} 107}
108 108
109static void tcf_sample_cleanup(struct tc_action *a, int bind)
110{
111 struct tcf_sample *s = to_sample(a);
112
113 call_rcu(&s->rcu, tcf_sample_cleanup_rcu);
114}
115
116static bool tcf_sample_dev_ok_push(struct net_device *dev) 109static bool tcf_sample_dev_ok_push(struct net_device *dev)
117{ 110{
118 switch (dev->type) { 111 switch (dev->type) {
@@ -264,7 +257,6 @@ static int __init sample_init_module(void)
264 257
265static void __exit sample_cleanup_module(void) 258static void __exit sample_cleanup_module(void)
266{ 259{
267 rcu_barrier();
268 tcf_unregister_action(&act_sample_ops, &sample_net_ops); 260 tcf_unregister_action(&act_sample_ops, &sample_net_ops);
269} 261}
270 262
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index b30a2c70bd48..531250fceb9e 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -369,6 +369,9 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt)
369 369
370 ctl = nla_data(tb[TCA_CHOKE_PARMS]); 370 ctl = nla_data(tb[TCA_CHOKE_PARMS]);
371 371
372 if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
373 return -EINVAL;
374
372 if (ctl->limit > CHOKE_MAX_QUEUE) 375 if (ctl->limit > CHOKE_MAX_QUEUE)
373 return -EINVAL; 376 return -EINVAL;
374 377
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 3839cbbdc32b..cd1b200acae7 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -26,6 +26,7 @@
26#include <linux/list.h> 26#include <linux/list.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/if_vlan.h> 28#include <linux/if_vlan.h>
29#include <linux/if_macvlan.h>
29#include <net/sch_generic.h> 30#include <net/sch_generic.h>
30#include <net/pkt_sched.h> 31#include <net/pkt_sched.h>
31#include <net/dst.h> 32#include <net/dst.h>
@@ -277,6 +278,8 @@ unsigned long dev_trans_start(struct net_device *dev)
277 278
278 if (is_vlan_dev(dev)) 279 if (is_vlan_dev(dev))
279 dev = vlan_dev_real_dev(dev); 280 dev = vlan_dev_real_dev(dev);
281 else if (netif_is_macvlan(dev))
282 dev = macvlan_dev_real_dev(dev);
280 res = netdev_get_tx_queue(dev, 0)->trans_start; 283 res = netdev_get_tx_queue(dev, 0)->trans_start;
281 for (i = 1; i < dev->num_tx_queues; i++) { 284 for (i = 1; i < dev->num_tx_queues; i++) {
282 val = netdev_get_tx_queue(dev, i)->trans_start; 285 val = netdev_get_tx_queue(dev, i)->trans_start;
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index 17c7130454bd..bc30f9186ac6 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -356,6 +356,9 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
356 struct gred_sched *table = qdisc_priv(sch); 356 struct gred_sched *table = qdisc_priv(sch);
357 struct gred_sched_data *q = table->tab[dp]; 357 struct gred_sched_data *q = table->tab[dp];
358 358
359 if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
360 return -EINVAL;
361
359 if (!q) { 362 if (!q) {
360 table->tab[dp] = q = *prealloc; 363 table->tab[dp] = q = *prealloc;
361 *prealloc = NULL; 364 *prealloc = NULL;
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 7f8ea9e297c3..9d874e60e032 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -212,6 +212,8 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt)
212 max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0; 212 max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0;
213 213
214 ctl = nla_data(tb[TCA_RED_PARMS]); 214 ctl = nla_data(tb[TCA_RED_PARMS]);
215 if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
216 return -EINVAL;
215 217
216 if (ctl->limit > 0) { 218 if (ctl->limit > 0) {
217 child = fifo_create_dflt(sch, &bfifo_qdisc_ops, ctl->limit); 219 child = fifo_create_dflt(sch, &bfifo_qdisc_ops, ctl->limit);
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 09c1203c1711..930e5bd26d3d 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -639,6 +639,9 @@ static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
639 if (ctl->divisor && 639 if (ctl->divisor &&
640 (!is_power_of_2(ctl->divisor) || ctl->divisor > 65536)) 640 (!is_power_of_2(ctl->divisor) || ctl->divisor > 65536))
641 return -EINVAL; 641 return -EINVAL;
642 if (ctl_v1 && !red_check_params(ctl_v1->qth_min, ctl_v1->qth_max,
643 ctl_v1->Wlog))
644 return -EINVAL;
642 if (ctl_v1 && ctl_v1->qth_min) { 645 if (ctl_v1 && ctl_v1->qth_min) {
643 p = kmalloc(sizeof(*p), GFP_KERNEL); 646 p = kmalloc(sizeof(*p), GFP_KERNEL);
644 if (!p) 647 if (!p)
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index 7b261afc47b9..7f8baa48e7c2 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -53,6 +53,7 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg)
53 msg->send_failed = 0; 53 msg->send_failed = 0;
54 msg->send_error = 0; 54 msg->send_error = 0;
55 msg->can_delay = 1; 55 msg->can_delay = 1;
56 msg->abandoned = 0;
56 msg->expires_at = 0; 57 msg->expires_at = 0;
57 INIT_LIST_HEAD(&msg->chunks); 58 INIT_LIST_HEAD(&msg->chunks);
58} 59}
@@ -304,6 +305,13 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
304 if (!chunk->asoc->peer.prsctp_capable) 305 if (!chunk->asoc->peer.prsctp_capable)
305 return 0; 306 return 0;
306 307
308 if (chunk->msg->abandoned)
309 return 1;
310
311 if (!chunk->has_tsn &&
312 !(chunk->chunk_hdr->flags & SCTP_DATA_FIRST_FRAG))
313 return 0;
314
307 if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) && 315 if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
308 time_after(jiffies, chunk->msg->expires_at)) { 316 time_after(jiffies, chunk->msg->expires_at)) {
309 struct sctp_stream_out *streamout = 317 struct sctp_stream_out *streamout =
@@ -316,6 +324,7 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
316 chunk->asoc->abandoned_unsent[SCTP_PR_INDEX(TTL)]++; 324 chunk->asoc->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
317 streamout->ext->abandoned_unsent[SCTP_PR_INDEX(TTL)]++; 325 streamout->ext->abandoned_unsent[SCTP_PR_INDEX(TTL)]++;
318 } 326 }
327 chunk->msg->abandoned = 1;
319 return 1; 328 return 1;
320 } else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) && 329 } else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
321 chunk->sent_count > chunk->sinfo.sinfo_timetolive) { 330 chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
@@ -324,10 +333,12 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
324 333
325 chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++; 334 chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
326 streamout->ext->abandoned_sent[SCTP_PR_INDEX(RTX)]++; 335 streamout->ext->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
336 chunk->msg->abandoned = 1;
327 return 1; 337 return 1;
328 } else if (!SCTP_PR_POLICY(chunk->sinfo.sinfo_flags) && 338 } else if (!SCTP_PR_POLICY(chunk->sinfo.sinfo_flags) &&
329 chunk->msg->expires_at && 339 chunk->msg->expires_at &&
330 time_after(jiffies, chunk->msg->expires_at)) { 340 time_after(jiffies, chunk->msg->expires_at)) {
341 chunk->msg->abandoned = 1;
331 return 1; 342 return 1;
332 } 343 }
333 /* PRIO policy is processed by sendmsg, not here */ 344 /* PRIO policy is processed by sendmsg, not here */
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 4db012aa25f7..7d67feeeffc1 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -364,10 +364,12 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc,
364 list_for_each_entry_safe(chk, temp, queue, transmitted_list) { 364 list_for_each_entry_safe(chk, temp, queue, transmitted_list) {
365 struct sctp_stream_out *streamout; 365 struct sctp_stream_out *streamout;
366 366
367 if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) || 367 if (!chk->msg->abandoned &&
368 chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive) 368 (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
369 chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive))
369 continue; 370 continue;
370 371
372 chk->msg->abandoned = 1;
371 list_del_init(&chk->transmitted_list); 373 list_del_init(&chk->transmitted_list);
372 sctp_insert_list(&asoc->outqueue.abandoned, 374 sctp_insert_list(&asoc->outqueue.abandoned,
373 &chk->transmitted_list); 375 &chk->transmitted_list);
@@ -377,7 +379,8 @@ static int sctp_prsctp_prune_sent(struct sctp_association *asoc,
377 asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; 379 asoc->abandoned_sent[SCTP_PR_INDEX(PRIO)]++;
378 streamout->ext->abandoned_sent[SCTP_PR_INDEX(PRIO)]++; 380 streamout->ext->abandoned_sent[SCTP_PR_INDEX(PRIO)]++;
379 381
380 if (!chk->tsn_gap_acked) { 382 if (queue != &asoc->outqueue.retransmit &&
383 !chk->tsn_gap_acked) {
381 if (chk->transport) 384 if (chk->transport)
382 chk->transport->flight_size -= 385 chk->transport->flight_size -=
383 sctp_data_size(chk); 386 sctp_data_size(chk);
@@ -403,10 +406,13 @@ static int sctp_prsctp_prune_unsent(struct sctp_association *asoc,
403 q->sched->unsched_all(&asoc->stream); 406 q->sched->unsched_all(&asoc->stream);
404 407
405 list_for_each_entry_safe(chk, temp, &q->out_chunk_list, list) { 408 list_for_each_entry_safe(chk, temp, &q->out_chunk_list, list) {
406 if (!SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) || 409 if (!chk->msg->abandoned &&
407 chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive) 410 (!(chk->chunk_hdr->flags & SCTP_DATA_FIRST_FRAG) ||
411 !SCTP_PR_PRIO_ENABLED(chk->sinfo.sinfo_flags) ||
412 chk->sinfo.sinfo_timetolive <= sinfo->sinfo_timetolive))
408 continue; 413 continue;
409 414
415 chk->msg->abandoned = 1;
410 sctp_sched_dequeue_common(q, chk); 416 sctp_sched_dequeue_common(q, chk);
411 asoc->sent_cnt_removable--; 417 asoc->sent_cnt_removable--;
412 asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++; 418 asoc->abandoned_unsent[SCTP_PR_INDEX(PRIO)]++;
@@ -1434,7 +1440,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1434 /* If this chunk has not been acked, stop 1440 /* If this chunk has not been acked, stop
1435 * considering it as 'outstanding'. 1441 * considering it as 'outstanding'.
1436 */ 1442 */
1437 if (!tchunk->tsn_gap_acked) { 1443 if (transmitted_queue != &q->retransmit &&
1444 !tchunk->tsn_gap_acked) {
1438 if (tchunk->transport) 1445 if (tchunk->transport)
1439 tchunk->transport->flight_size -= 1446 tchunk->transport->flight_size -=
1440 sctp_data_size(tchunk); 1447 sctp_data_size(tchunk);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 014847e25648..eb17a911aa29 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5080,7 +5080,6 @@ static int sctp_getsockopt_peeloff_common(struct sock *sk, sctp_peeloff_arg_t *p
5080 *newfile = sock_alloc_file(newsock, 0, NULL); 5080 *newfile = sock_alloc_file(newsock, 0, NULL);
5081 if (IS_ERR(*newfile)) { 5081 if (IS_ERR(*newfile)) {
5082 put_unused_fd(retval); 5082 put_unused_fd(retval);
5083 sock_release(newsock);
5084 retval = PTR_ERR(*newfile); 5083 retval = PTR_ERR(*newfile);
5085 *newfile = NULL; 5084 *newfile = NULL;
5086 return retval; 5085 return retval;
diff --git a/net/socket.c b/net/socket.c
index 42d8e9c9ccd5..05f361faec45 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -406,8 +406,10 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
406 name.len = strlen(name.name); 406 name.len = strlen(name.name);
407 } 407 }
408 path.dentry = d_alloc_pseudo(sock_mnt->mnt_sb, &name); 408 path.dentry = d_alloc_pseudo(sock_mnt->mnt_sb, &name);
409 if (unlikely(!path.dentry)) 409 if (unlikely(!path.dentry)) {
410 sock_release(sock);
410 return ERR_PTR(-ENOMEM); 411 return ERR_PTR(-ENOMEM);
412 }
411 path.mnt = mntget(sock_mnt); 413 path.mnt = mntget(sock_mnt);
412 414
413 d_instantiate(path.dentry, SOCK_INODE(sock)); 415 d_instantiate(path.dentry, SOCK_INODE(sock));
@@ -415,9 +417,11 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
415 file = alloc_file(&path, FMODE_READ | FMODE_WRITE, 417 file = alloc_file(&path, FMODE_READ | FMODE_WRITE,
416 &socket_file_ops); 418 &socket_file_ops);
417 if (IS_ERR(file)) { 419 if (IS_ERR(file)) {
418 /* drop dentry, keep inode */ 420 /* drop dentry, keep inode for a bit */
419 ihold(d_inode(path.dentry)); 421 ihold(d_inode(path.dentry));
420 path_put(&path); 422 path_put(&path);
423 /* ... and now kill it properly */
424 sock_release(sock);
421 return file; 425 return file;
422 } 426 }
423 427
@@ -1330,19 +1334,9 @@ SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)
1330 1334
1331 retval = sock_create(family, type, protocol, &sock); 1335 retval = sock_create(family, type, protocol, &sock);
1332 if (retval < 0) 1336 if (retval < 0)
1333 goto out; 1337 return retval;
1334
1335 retval = sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));
1336 if (retval < 0)
1337 goto out_release;
1338
1339out:
1340 /* It may be already another descriptor 8) Not kernel problem. */
1341 return retval;
1342 1338
1343out_release: 1339 return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));
1344 sock_release(sock);
1345 return retval;
1346} 1340}
1347 1341
1348/* 1342/*
@@ -1366,87 +1360,72 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol,
1366 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; 1360 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
1367 1361
1368 /* 1362 /*
1363 * reserve descriptors and make sure we won't fail
1364 * to return them to userland.
1365 */
1366 fd1 = get_unused_fd_flags(flags);
1367 if (unlikely(fd1 < 0))
1368 return fd1;
1369
1370 fd2 = get_unused_fd_flags(flags);
1371 if (unlikely(fd2 < 0)) {
1372 put_unused_fd(fd1);
1373 return fd2;
1374 }
1375
1376 err = put_user(fd1, &usockvec[0]);
1377 if (err)
1378 goto out;
1379
1380 err = put_user(fd2, &usockvec[1]);
1381 if (err)
1382 goto out;
1383
1384 /*
1369 * Obtain the first socket and check if the underlying protocol 1385 * Obtain the first socket and check if the underlying protocol
1370 * supports the socketpair call. 1386 * supports the socketpair call.
1371 */ 1387 */
1372 1388
1373 err = sock_create(family, type, protocol, &sock1); 1389 err = sock_create(family, type, protocol, &sock1);
1374 if (err < 0) 1390 if (unlikely(err < 0))
1375 goto out; 1391 goto out;
1376 1392
1377 err = sock_create(family, type, protocol, &sock2); 1393 err = sock_create(family, type, protocol, &sock2);
1378 if (err < 0) 1394 if (unlikely(err < 0)) {
1379 goto out_release_1; 1395 sock_release(sock1);
1380 1396 goto out;
1381 err = sock1->ops->socketpair(sock1, sock2);
1382 if (err < 0)
1383 goto out_release_both;
1384
1385 fd1 = get_unused_fd_flags(flags);
1386 if (unlikely(fd1 < 0)) {
1387 err = fd1;
1388 goto out_release_both;
1389 } 1397 }
1390 1398
1391 fd2 = get_unused_fd_flags(flags); 1399 err = sock1->ops->socketpair(sock1, sock2);
1392 if (unlikely(fd2 < 0)) { 1400 if (unlikely(err < 0)) {
1393 err = fd2; 1401 sock_release(sock2);
1394 goto out_put_unused_1; 1402 sock_release(sock1);
1403 goto out;
1395 } 1404 }
1396 1405
1397 newfile1 = sock_alloc_file(sock1, flags, NULL); 1406 newfile1 = sock_alloc_file(sock1, flags, NULL);
1398 if (IS_ERR(newfile1)) { 1407 if (IS_ERR(newfile1)) {
1399 err = PTR_ERR(newfile1); 1408 err = PTR_ERR(newfile1);
1400 goto out_put_unused_both; 1409 sock_release(sock2);
1410 goto out;
1401 } 1411 }
1402 1412
1403 newfile2 = sock_alloc_file(sock2, flags, NULL); 1413 newfile2 = sock_alloc_file(sock2, flags, NULL);
1404 if (IS_ERR(newfile2)) { 1414 if (IS_ERR(newfile2)) {
1405 err = PTR_ERR(newfile2); 1415 err = PTR_ERR(newfile2);
1406 goto out_fput_1; 1416 fput(newfile1);
1417 goto out;
1407 } 1418 }
1408 1419
1409 err = put_user(fd1, &usockvec[0]);
1410 if (err)
1411 goto out_fput_both;
1412
1413 err = put_user(fd2, &usockvec[1]);
1414 if (err)
1415 goto out_fput_both;
1416
1417 audit_fd_pair(fd1, fd2); 1420 audit_fd_pair(fd1, fd2);
1418 1421
1419 fd_install(fd1, newfile1); 1422 fd_install(fd1, newfile1);
1420 fd_install(fd2, newfile2); 1423 fd_install(fd2, newfile2);
1421 /* fd1 and fd2 may be already another descriptors.
1422 * Not kernel problem.
1423 */
1424
1425 return 0; 1424 return 0;
1426 1425
1427out_fput_both: 1426out:
1428 fput(newfile2);
1429 fput(newfile1);
1430 put_unused_fd(fd2);
1431 put_unused_fd(fd1);
1432 goto out;
1433
1434out_fput_1:
1435 fput(newfile1);
1436 put_unused_fd(fd2);
1437 put_unused_fd(fd1);
1438 sock_release(sock2);
1439 goto out;
1440
1441out_put_unused_both:
1442 put_unused_fd(fd2); 1427 put_unused_fd(fd2);
1443out_put_unused_1:
1444 put_unused_fd(fd1); 1428 put_unused_fd(fd1);
1445out_release_both:
1446 sock_release(sock2);
1447out_release_1:
1448 sock_release(sock1);
1449out:
1450 return err; 1429 return err;
1451} 1430}
1452 1431
@@ -1562,7 +1541,6 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
1562 if (IS_ERR(newfile)) { 1541 if (IS_ERR(newfile)) {
1563 err = PTR_ERR(newfile); 1542 err = PTR_ERR(newfile);
1564 put_unused_fd(newfd); 1543 put_unused_fd(newfd);
1565 sock_release(newsock);
1566 goto out_put; 1544 goto out_put;
1567 } 1545 }
1568 1546
diff --git a/net/tipc/server.c b/net/tipc/server.c
index acaef80fb88c..d60c30342327 100644
--- a/net/tipc/server.c
+++ b/net/tipc/server.c
@@ -314,6 +314,7 @@ static int tipc_accept_from_sock(struct tipc_conn *con)
314 newcon->usr_data = s->tipc_conn_new(newcon->conid); 314 newcon->usr_data = s->tipc_conn_new(newcon->conid);
315 if (!newcon->usr_data) { 315 if (!newcon->usr_data) {
316 sock_release(newsock); 316 sock_release(newsock);
317 conn_put(newcon);
317 return -ENOMEM; 318 return -ENOMEM;
318 } 319 }
319 320
@@ -511,7 +512,7 @@ bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type,
511 s = con->server; 512 s = con->server;
512 scbr = s->tipc_conn_new(*conid); 513 scbr = s->tipc_conn_new(*conid);
513 if (!scbr) { 514 if (!scbr) {
514 tipc_close_conn(con); 515 conn_put(con);
515 return false; 516 return false;
516 } 517 }
517 518
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index ecca64fc6a6f..3deabcab4882 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -371,10 +371,6 @@ static int tipc_udp_recv(struct sock *sk, struct sk_buff *skb)
371 goto rcu_out; 371 goto rcu_out;
372 } 372 }
373 373
374 tipc_rcv(sock_net(sk), skb, b);
375 rcu_read_unlock();
376 return 0;
377
378rcu_out: 374rcu_out:
379 rcu_read_unlock(); 375 rcu_read_unlock();
380out: 376out:
diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c
index 5583df708b8c..a827547aa102 100644
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -487,7 +487,7 @@ static void hvs_release(struct vsock_sock *vsk)
487 487
488 lock_sock(sk); 488 lock_sock(sk);
489 489
490 sk->sk_state = SS_DISCONNECTING; 490 sk->sk_state = TCP_CLOSING;
491 vsock_remove_sock(vsk); 491 vsock_remove_sock(vsk);
492 492
493 release_sock(sk); 493 release_sock(sk);
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
index 522ca9252d6c..242631aa4ea2 100644
--- a/samples/bpf/bpf_load.c
+++ b/samples/bpf/bpf_load.c
@@ -193,8 +193,18 @@ static int load_and_attach(const char *event, struct bpf_insn *prog, int size)
193 return -1; 193 return -1;
194 } 194 }
195 event_fd[prog_cnt - 1] = efd; 195 event_fd[prog_cnt - 1] = efd;
196 ioctl(efd, PERF_EVENT_IOC_ENABLE, 0); 196 err = ioctl(efd, PERF_EVENT_IOC_ENABLE, 0);
197 ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd); 197 if (err < 0) {
198 printf("ioctl PERF_EVENT_IOC_ENABLE failed err %s\n",
199 strerror(errno));
200 return -1;
201 }
202 err = ioctl(efd, PERF_EVENT_IOC_SET_BPF, fd);
203 if (err < 0) {
204 printf("ioctl PERF_EVENT_IOC_SET_BPF failed err %s\n",
205 strerror(errno));
206 return -1;
207 }
198 208
199 return 0; 209 return 0;
200} 210}
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index bd29a92b4b48..df0f045a9a89 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -3248,4 +3248,4 @@ if ($verbose && $warnings) {
3248 print STDERR "$warnings warnings\n"; 3248 print STDERR "$warnings warnings\n";
3249} 3249}
3250 3250
3251exit($errors); 3251exit($output_mode eq "none" ? 0 : $errors);
diff --git a/security/keys/key.c b/security/keys/key.c
index 66049183ad89..d97c9394b5dd 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -833,7 +833,6 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref,
833 833
834 key_check(keyring); 834 key_check(keyring);
835 835
836 key_ref = ERR_PTR(-EPERM);
837 if (!(flags & KEY_ALLOC_BYPASS_RESTRICTION)) 836 if (!(flags & KEY_ALLOC_BYPASS_RESTRICTION))
838 restrict_link = keyring->restrict_link; 837 restrict_link = keyring->restrict_link;
839 838
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index 76d22f726ae4..1ffe60bb2845 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -1588,9 +1588,8 @@ error_keyring:
1588 * The caller must have Setattr permission to change keyring restrictions. 1588 * The caller must have Setattr permission to change keyring restrictions.
1589 * 1589 *
1590 * The requested type name may be a NULL pointer to reject all attempts 1590 * The requested type name may be a NULL pointer to reject all attempts
1591 * to link to the keyring. If _type is non-NULL, _restriction can be 1591 * to link to the keyring. In this case, _restriction must also be NULL.
1592 * NULL or a pointer to a string describing the restriction. If _type is 1592 * Otherwise, both _type and _restriction must be non-NULL.
1593 * NULL, _restriction must also be NULL.
1594 * 1593 *
1595 * Returns 0 if successful. 1594 * Returns 0 if successful.
1596 */ 1595 */
@@ -1598,7 +1597,6 @@ long keyctl_restrict_keyring(key_serial_t id, const char __user *_type,
1598 const char __user *_restriction) 1597 const char __user *_restriction)
1599{ 1598{
1600 key_ref_t key_ref; 1599 key_ref_t key_ref;
1601 bool link_reject = !_type;
1602 char type[32]; 1600 char type[32];
1603 char *restriction = NULL; 1601 char *restriction = NULL;
1604 long ret; 1602 long ret;
@@ -1607,31 +1605,29 @@ long keyctl_restrict_keyring(key_serial_t id, const char __user *_type,
1607 if (IS_ERR(key_ref)) 1605 if (IS_ERR(key_ref))
1608 return PTR_ERR(key_ref); 1606 return PTR_ERR(key_ref);
1609 1607
1608 ret = -EINVAL;
1610 if (_type) { 1609 if (_type) {
1611 ret = key_get_type_from_user(type, _type, sizeof(type)); 1610 if (!_restriction)
1612 if (ret < 0)
1613 goto error; 1611 goto error;
1614 }
1615 1612
1616 if (_restriction) { 1613 ret = key_get_type_from_user(type, _type, sizeof(type));
1617 if (!_type) { 1614 if (ret < 0)
1618 ret = -EINVAL;
1619 goto error; 1615 goto error;
1620 }
1621 1616
1622 restriction = strndup_user(_restriction, PAGE_SIZE); 1617 restriction = strndup_user(_restriction, PAGE_SIZE);
1623 if (IS_ERR(restriction)) { 1618 if (IS_ERR(restriction)) {
1624 ret = PTR_ERR(restriction); 1619 ret = PTR_ERR(restriction);
1625 goto error; 1620 goto error;
1626 } 1621 }
1622 } else {
1623 if (_restriction)
1624 goto error;
1627 } 1625 }
1628 1626
1629 ret = keyring_restrict(key_ref, link_reject ? NULL : type, restriction); 1627 ret = keyring_restrict(key_ref, _type ? type : NULL, restriction);
1630 kfree(restriction); 1628 kfree(restriction);
1631
1632error: 1629error:
1633 key_ref_put(key_ref); 1630 key_ref_put(key_ref);
1634
1635 return ret; 1631 return ret;
1636} 1632}
1637 1633
diff --git a/security/keys/request_key.c b/security/keys/request_key.c
index e8036cd0ad54..114f7408feee 100644
--- a/security/keys/request_key.c
+++ b/security/keys/request_key.c
@@ -251,11 +251,12 @@ static int construct_key(struct key *key, const void *callout_info,
251 * The keyring selected is returned with an extra reference upon it which the 251 * The keyring selected is returned with an extra reference upon it which the
252 * caller must release. 252 * caller must release.
253 */ 253 */
254static void construct_get_dest_keyring(struct key **_dest_keyring) 254static int construct_get_dest_keyring(struct key **_dest_keyring)
255{ 255{
256 struct request_key_auth *rka; 256 struct request_key_auth *rka;
257 const struct cred *cred = current_cred(); 257 const struct cred *cred = current_cred();
258 struct key *dest_keyring = *_dest_keyring, *authkey; 258 struct key *dest_keyring = *_dest_keyring, *authkey;
259 int ret;
259 260
260 kenter("%p", dest_keyring); 261 kenter("%p", dest_keyring);
261 262
@@ -264,6 +265,8 @@ static void construct_get_dest_keyring(struct key **_dest_keyring)
264 /* the caller supplied one */ 265 /* the caller supplied one */
265 key_get(dest_keyring); 266 key_get(dest_keyring);
266 } else { 267 } else {
268 bool do_perm_check = true;
269
267 /* use a default keyring; falling through the cases until we 270 /* use a default keyring; falling through the cases until we
268 * find one that we actually have */ 271 * find one that we actually have */
269 switch (cred->jit_keyring) { 272 switch (cred->jit_keyring) {
@@ -278,8 +281,10 @@ static void construct_get_dest_keyring(struct key **_dest_keyring)
278 dest_keyring = 281 dest_keyring =
279 key_get(rka->dest_keyring); 282 key_get(rka->dest_keyring);
280 up_read(&authkey->sem); 283 up_read(&authkey->sem);
281 if (dest_keyring) 284 if (dest_keyring) {
285 do_perm_check = false;
282 break; 286 break;
287 }
283 } 288 }
284 289
285 case KEY_REQKEY_DEFL_THREAD_KEYRING: 290 case KEY_REQKEY_DEFL_THREAD_KEYRING:
@@ -314,11 +319,29 @@ static void construct_get_dest_keyring(struct key **_dest_keyring)
314 default: 319 default:
315 BUG(); 320 BUG();
316 } 321 }
322
323 /*
324 * Require Write permission on the keyring. This is essential
325 * because the default keyring may be the session keyring, and
326 * joining a keyring only requires Search permission.
327 *
328 * However, this check is skipped for the "requestor keyring" so
329 * that /sbin/request-key can itself use request_key() to add
330 * keys to the original requestor's destination keyring.
331 */
332 if (dest_keyring && do_perm_check) {
333 ret = key_permission(make_key_ref(dest_keyring, 1),
334 KEY_NEED_WRITE);
335 if (ret) {
336 key_put(dest_keyring);
337 return ret;
338 }
339 }
317 } 340 }
318 341
319 *_dest_keyring = dest_keyring; 342 *_dest_keyring = dest_keyring;
320 kleave(" [dk %d]", key_serial(dest_keyring)); 343 kleave(" [dk %d]", key_serial(dest_keyring));
321 return; 344 return 0;
322} 345}
323 346
324/* 347/*
@@ -444,11 +467,15 @@ static struct key *construct_key_and_link(struct keyring_search_context *ctx,
444 if (ctx->index_key.type == &key_type_keyring) 467 if (ctx->index_key.type == &key_type_keyring)
445 return ERR_PTR(-EPERM); 468 return ERR_PTR(-EPERM);
446 469
447 user = key_user_lookup(current_fsuid()); 470 ret = construct_get_dest_keyring(&dest_keyring);
448 if (!user) 471 if (ret)
449 return ERR_PTR(-ENOMEM); 472 goto error;
450 473
451 construct_get_dest_keyring(&dest_keyring); 474 user = key_user_lookup(current_fsuid());
475 if (!user) {
476 ret = -ENOMEM;
477 goto error_put_dest_keyring;
478 }
452 479
453 ret = construct_alloc_key(ctx, dest_keyring, flags, user, &key); 480 ret = construct_alloc_key(ctx, dest_keyring, flags, user, &key);
454 key_user_put(user); 481 key_user_put(user);
@@ -463,7 +490,7 @@ static struct key *construct_key_and_link(struct keyring_search_context *ctx,
463 } else if (ret == -EINPROGRESS) { 490 } else if (ret == -EINPROGRESS) {
464 ret = 0; 491 ret = 0;
465 } else { 492 } else {
466 goto couldnt_alloc_key; 493 goto error_put_dest_keyring;
467 } 494 }
468 495
469 key_put(dest_keyring); 496 key_put(dest_keyring);
@@ -473,8 +500,9 @@ static struct key *construct_key_and_link(struct keyring_search_context *ctx,
473construction_failed: 500construction_failed:
474 key_negate_and_link(key, key_negative_timeout, NULL, NULL); 501 key_negate_and_link(key, key_negative_timeout, NULL, NULL);
475 key_put(key); 502 key_put(key);
476couldnt_alloc_key: 503error_put_dest_keyring:
477 key_put(dest_keyring); 504 key_put(dest_keyring);
505error:
478 kleave(" = %d", ret); 506 kleave(" = %d", ret);
479 return ERR_PTR(ret); 507 return ERR_PTR(ret);
480} 508}
@@ -546,9 +574,7 @@ struct key *request_key_and_link(struct key_type *type,
546 if (!IS_ERR(key_ref)) { 574 if (!IS_ERR(key_ref)) {
547 key = key_ref_to_ptr(key_ref); 575 key = key_ref_to_ptr(key_ref);
548 if (dest_keyring) { 576 if (dest_keyring) {
549 construct_get_dest_keyring(&dest_keyring);
550 ret = key_link(dest_keyring, key); 577 ret = key_link(dest_keyring, key);
551 key_put(dest_keyring);
552 if (ret < 0) { 578 if (ret < 0) {
553 key_put(key); 579 key_put(key);
554 key = ERR_PTR(ret); 580 key = ERR_PTR(ret);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 9070f277f8db..09ee8c6b9f75 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -153,7 +153,9 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
153 err = -ENXIO; 153 err = -ENXIO;
154 goto _error; 154 goto _error;
155 } 155 }
156 mutex_lock(&pcm->open_mutex);
156 err = snd_pcm_info_user(substream, info); 157 err = snd_pcm_info_user(substream, info);
158 mutex_unlock(&pcm->open_mutex);
157 _error: 159 _error:
158 mutex_unlock(&register_mutex); 160 mutex_unlock(&register_mutex);
159 return err; 161 return err;
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
index 37d9cfbc29f9..b80985fbc334 100644
--- a/sound/core/seq/seq_timer.c
+++ b/sound/core/seq/seq_timer.c
@@ -355,7 +355,7 @@ static int initialize_timer(struct snd_seq_timer *tmr)
355 unsigned long freq; 355 unsigned long freq;
356 356
357 t = tmr->timeri->timer; 357 t = tmr->timeri->timer;
358 if (snd_BUG_ON(!t)) 358 if (!t)
359 return -EINVAL; 359 return -EINVAL;
360 360
361 freq = tmr->preferred_resolution; 361 freq = tmr->preferred_resolution;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 921a10eff43a..4b21f71d685c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -330,6 +330,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
330 case 0x10ec0236: 330 case 0x10ec0236:
331 case 0x10ec0255: 331 case 0x10ec0255:
332 case 0x10ec0256: 332 case 0x10ec0256:
333 case 0x10ec0257:
333 case 0x10ec0282: 334 case 0x10ec0282:
334 case 0x10ec0283: 335 case 0x10ec0283:
335 case 0x10ec0286: 336 case 0x10ec0286:
@@ -2772,6 +2773,7 @@ enum {
2772 ALC269_TYPE_ALC298, 2773 ALC269_TYPE_ALC298,
2773 ALC269_TYPE_ALC255, 2774 ALC269_TYPE_ALC255,
2774 ALC269_TYPE_ALC256, 2775 ALC269_TYPE_ALC256,
2776 ALC269_TYPE_ALC257,
2775 ALC269_TYPE_ALC215, 2777 ALC269_TYPE_ALC215,
2776 ALC269_TYPE_ALC225, 2778 ALC269_TYPE_ALC225,
2777 ALC269_TYPE_ALC294, 2779 ALC269_TYPE_ALC294,
@@ -2805,6 +2807,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
2805 case ALC269_TYPE_ALC298: 2807 case ALC269_TYPE_ALC298:
2806 case ALC269_TYPE_ALC255: 2808 case ALC269_TYPE_ALC255:
2807 case ALC269_TYPE_ALC256: 2809 case ALC269_TYPE_ALC256:
2810 case ALC269_TYPE_ALC257:
2808 case ALC269_TYPE_ALC215: 2811 case ALC269_TYPE_ALC215:
2809 case ALC269_TYPE_ALC225: 2812 case ALC269_TYPE_ALC225:
2810 case ALC269_TYPE_ALC294: 2813 case ALC269_TYPE_ALC294:
@@ -6867,6 +6870,10 @@ static int patch_alc269(struct hda_codec *codec)
6867 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ 6870 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
6868 alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/ 6871 alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
6869 break; 6872 break;
6873 case 0x10ec0257:
6874 spec->codec_variant = ALC269_TYPE_ALC257;
6875 spec->gen.mixer_nid = 0;
6876 break;
6870 case 0x10ec0215: 6877 case 0x10ec0215:
6871 case 0x10ec0285: 6878 case 0x10ec0285:
6872 case 0x10ec0289: 6879 case 0x10ec0289:
@@ -7914,6 +7921,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
7914 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269), 7921 HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
7915 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269), 7922 HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
7916 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269), 7923 HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
7924 HDA_CODEC_ENTRY(0x10ec0257, "ALC257", patch_alc269),
7917 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260), 7925 HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
7918 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262), 7926 HDA_CODEC_ENTRY(0x10ec0262, "ALC262", patch_alc262),
7919 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268), 7927 HDA_CODEC_ENTRY(0x10ec0267, "ALC267", patch_alc268),
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 61b348383de8..7c9e361b2200 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -204,6 +204,10 @@ static int snd_usb_copy_string_desc(struct mixer_build *state,
204 int index, char *buf, int maxlen) 204 int index, char *buf, int maxlen)
205{ 205{
206 int len = usb_string(state->chip->dev, index, buf, maxlen - 1); 206 int len = usb_string(state->chip->dev, index, buf, maxlen - 1);
207
208 if (len < 0)
209 return 0;
210
207 buf[len] = 0; 211 buf[len] = 0;
208 return len; 212 return len;
209} 213}
@@ -2174,13 +2178,14 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid,
2174 if (len) 2178 if (len)
2175 ; 2179 ;
2176 else if (nameid) 2180 else if (nameid)
2177 snd_usb_copy_string_desc(state, nameid, kctl->id.name, 2181 len = snd_usb_copy_string_desc(state, nameid, kctl->id.name,
2178 sizeof(kctl->id.name)); 2182 sizeof(kctl->id.name));
2179 else { 2183 else
2180 len = get_term_name(state, &state->oterm, 2184 len = get_term_name(state, &state->oterm,
2181 kctl->id.name, sizeof(kctl->id.name), 0); 2185 kctl->id.name, sizeof(kctl->id.name), 0);
2182 if (!len) 2186
2183 strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name)); 2187 if (!len) {
2188 strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
2184 2189
2185 if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) 2190 if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR)
2186 append_ctl_name(kctl, " Clock Source"); 2191 append_ctl_name(kctl, " Clock Source");
diff --git a/tools/arch/arm/include/uapi/asm/kvm.h b/tools/arch/arm/include/uapi/asm/kvm.h
index 1f57bbe82b6f..6edd177bb1c7 100644
--- a/tools/arch/arm/include/uapi/asm/kvm.h
+++ b/tools/arch/arm/include/uapi/asm/kvm.h
@@ -152,6 +152,12 @@ struct kvm_arch_memory_slot {
152 (__ARM_CP15_REG(op1, 0, crm, 0) | KVM_REG_SIZE_U64) 152 (__ARM_CP15_REG(op1, 0, crm, 0) | KVM_REG_SIZE_U64)
153#define ARM_CP15_REG64(...) __ARM_CP15_REG64(__VA_ARGS__) 153#define ARM_CP15_REG64(...) __ARM_CP15_REG64(__VA_ARGS__)
154 154
155/* PL1 Physical Timer Registers */
156#define KVM_REG_ARM_PTIMER_CTL ARM_CP15_REG32(0, 14, 2, 1)
157#define KVM_REG_ARM_PTIMER_CNT ARM_CP15_REG64(0, 14)
158#define KVM_REG_ARM_PTIMER_CVAL ARM_CP15_REG64(2, 14)
159
160/* Virtual Timer Registers */
155#define KVM_REG_ARM_TIMER_CTL ARM_CP15_REG32(0, 14, 3, 1) 161#define KVM_REG_ARM_TIMER_CTL ARM_CP15_REG32(0, 14, 3, 1)
156#define KVM_REG_ARM_TIMER_CNT ARM_CP15_REG64(1, 14) 162#define KVM_REG_ARM_TIMER_CNT ARM_CP15_REG64(1, 14)
157#define KVM_REG_ARM_TIMER_CVAL ARM_CP15_REG64(3, 14) 163#define KVM_REG_ARM_TIMER_CVAL ARM_CP15_REG64(3, 14)
@@ -216,6 +222,7 @@ struct kvm_arch_memory_slot {
216#define KVM_DEV_ARM_ITS_SAVE_TABLES 1 222#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
217#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2 223#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
218#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3 224#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
225#define KVM_DEV_ARM_ITS_CTRL_RESET 4
219 226
220/* KVM_IRQ_LINE irq field index values */ 227/* KVM_IRQ_LINE irq field index values */
221#define KVM_ARM_IRQ_TYPE_SHIFT 24 228#define KVM_ARM_IRQ_TYPE_SHIFT 24
diff --git a/tools/arch/arm64/include/uapi/asm/bpf_perf_event.h b/tools/arch/arm64/include/uapi/asm/bpf_perf_event.h
new file mode 100644
index 000000000000..b551b741653d
--- /dev/null
+++ b/tools/arch/arm64/include/uapi/asm/bpf_perf_event.h
@@ -0,0 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__
3#define _UAPI__ASM_BPF_PERF_EVENT_H__
4
5#include <asm/ptrace.h>
6
7typedef struct user_pt_regs bpf_user_pt_regs_t;
8
9#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */
diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/include/uapi/asm/kvm.h
index 51149ec75fe4..9abbf3044654 100644
--- a/tools/arch/arm64/include/uapi/asm/kvm.h
+++ b/tools/arch/arm64/include/uapi/asm/kvm.h
@@ -196,6 +196,12 @@ struct kvm_arch_memory_slot {
196 196
197#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64) 197#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64)
198 198
199/* Physical Timer EL0 Registers */
200#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1)
201#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2)
202#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1)
203
204/* EL0 Virtual Timer Registers */
199#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1) 205#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1)
200#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) 206#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2)
201#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2) 207#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2)
@@ -228,6 +234,7 @@ struct kvm_arch_memory_slot {
228#define KVM_DEV_ARM_ITS_SAVE_TABLES 1 234#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
229#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2 235#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
230#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3 236#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
237#define KVM_DEV_ARM_ITS_CTRL_RESET 4
231 238
232/* Device Control API on vcpu fd */ 239/* Device Control API on vcpu fd */
233#define KVM_ARM_VCPU_PMU_V3_CTRL 0 240#define KVM_ARM_VCPU_PMU_V3_CTRL 0
diff --git a/tools/arch/s390/include/uapi/asm/bpf_perf_event.h b/tools/arch/s390/include/uapi/asm/bpf_perf_event.h
new file mode 100644
index 000000000000..cefe7c7cd4f6
--- /dev/null
+++ b/tools/arch/s390/include/uapi/asm/bpf_perf_event.h
@@ -0,0 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__
3#define _UAPI__ASM_BPF_PERF_EVENT_H__
4
5#include <asm/ptrace.h>
6
7typedef user_pt_regs bpf_user_pt_regs_t;
8
9#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */
diff --git a/tools/arch/s390/include/uapi/asm/kvm.h b/tools/arch/s390/include/uapi/asm/kvm.h
index 9ad172dcd912..38535a57fef8 100644
--- a/tools/arch/s390/include/uapi/asm/kvm.h
+++ b/tools/arch/s390/include/uapi/asm/kvm.h
@@ -6,10 +6,6 @@
6 * 6 *
7 * Copyright IBM Corp. 2008 7 * Copyright IBM Corp. 2008
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License (version 2 only)
11 * as published by the Free Software Foundation.
12 *
13 * Author(s): Carsten Otte <cotte@de.ibm.com> 9 * Author(s): Carsten Otte <cotte@de.ibm.com>
14 * Christian Borntraeger <borntraeger@de.ibm.com> 10 * Christian Borntraeger <borntraeger@de.ibm.com>
15 */ 11 */
diff --git a/tools/arch/s390/include/uapi/asm/kvm_perf.h b/tools/arch/s390/include/uapi/asm/kvm_perf.h
index c36c97ffdc6f..84606b8cc49e 100644
--- a/tools/arch/s390/include/uapi/asm/kvm_perf.h
+++ b/tools/arch/s390/include/uapi/asm/kvm_perf.h
@@ -4,10 +4,6 @@
4 * 4 *
5 * Copyright 2014 IBM Corp. 5 * Copyright 2014 IBM Corp.
6 * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com> 6 * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License (version 2 only)
10 * as published by the Free Software Foundation.
11 */ 7 */
12 8
13#ifndef __LINUX_KVM_PERF_S390_H 9#ifndef __LINUX_KVM_PERF_S390_H
diff --git a/tools/arch/s390/include/uapi/asm/ptrace.h b/tools/arch/s390/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..543dd70e12c8
--- /dev/null
+++ b/tools/arch/s390/include/uapi/asm/ptrace.h
@@ -0,0 +1,457 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * S390 version
4 * Copyright IBM Corp. 1999, 2000
5 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
6 */
7
8#ifndef _UAPI_S390_PTRACE_H
9#define _UAPI_S390_PTRACE_H
10
11/*
12 * Offsets in the user_regs_struct. They are used for the ptrace
13 * system call and in entry.S
14 */
15#ifndef __s390x__
16
17#define PT_PSWMASK 0x00
18#define PT_PSWADDR 0x04
19#define PT_GPR0 0x08
20#define PT_GPR1 0x0C
21#define PT_GPR2 0x10
22#define PT_GPR3 0x14
23#define PT_GPR4 0x18
24#define PT_GPR5 0x1C
25#define PT_GPR6 0x20
26#define PT_GPR7 0x24
27#define PT_GPR8 0x28
28#define PT_GPR9 0x2C
29#define PT_GPR10 0x30
30#define PT_GPR11 0x34
31#define PT_GPR12 0x38
32#define PT_GPR13 0x3C
33#define PT_GPR14 0x40
34#define PT_GPR15 0x44
35#define PT_ACR0 0x48
36#define PT_ACR1 0x4C
37#define PT_ACR2 0x50
38#define PT_ACR3 0x54
39#define PT_ACR4 0x58
40#define PT_ACR5 0x5C
41#define PT_ACR6 0x60
42#define PT_ACR7 0x64
43#define PT_ACR8 0x68
44#define PT_ACR9 0x6C
45#define PT_ACR10 0x70
46#define PT_ACR11 0x74
47#define PT_ACR12 0x78
48#define PT_ACR13 0x7C
49#define PT_ACR14 0x80
50#define PT_ACR15 0x84
51#define PT_ORIGGPR2 0x88
52#define PT_FPC 0x90
53/*
54 * A nasty fact of life that the ptrace api
55 * only supports passing of longs.
56 */
57#define PT_FPR0_HI 0x98
58#define PT_FPR0_LO 0x9C
59#define PT_FPR1_HI 0xA0
60#define PT_FPR1_LO 0xA4
61#define PT_FPR2_HI 0xA8
62#define PT_FPR2_LO 0xAC
63#define PT_FPR3_HI 0xB0
64#define PT_FPR3_LO 0xB4
65#define PT_FPR4_HI 0xB8
66#define PT_FPR4_LO 0xBC
67#define PT_FPR5_HI 0xC0
68#define PT_FPR5_LO 0xC4
69#define PT_FPR6_HI 0xC8
70#define PT_FPR6_LO 0xCC
71#define PT_FPR7_HI 0xD0
72#define PT_FPR7_LO 0xD4
73#define PT_FPR8_HI 0xD8
74#define PT_FPR8_LO 0XDC
75#define PT_FPR9_HI 0xE0
76#define PT_FPR9_LO 0xE4
77#define PT_FPR10_HI 0xE8
78#define PT_FPR10_LO 0xEC
79#define PT_FPR11_HI 0xF0
80#define PT_FPR11_LO 0xF4
81#define PT_FPR12_HI 0xF8
82#define PT_FPR12_LO 0xFC
83#define PT_FPR13_HI 0x100
84#define PT_FPR13_LO 0x104
85#define PT_FPR14_HI 0x108
86#define PT_FPR14_LO 0x10C
87#define PT_FPR15_HI 0x110
88#define PT_FPR15_LO 0x114
89#define PT_CR_9 0x118
90#define PT_CR_10 0x11C
91#define PT_CR_11 0x120
92#define PT_IEEE_IP 0x13C
93#define PT_LASTOFF PT_IEEE_IP
94#define PT_ENDREGS 0x140-1
95
96#define GPR_SIZE 4
97#define CR_SIZE 4
98
99#define STACK_FRAME_OVERHEAD 96 /* size of minimum stack frame */
100
101#else /* __s390x__ */
102
103#define PT_PSWMASK 0x00
104#define PT_PSWADDR 0x08
105#define PT_GPR0 0x10
106#define PT_GPR1 0x18
107#define PT_GPR2 0x20
108#define PT_GPR3 0x28
109#define PT_GPR4 0x30
110#define PT_GPR5 0x38
111#define PT_GPR6 0x40
112#define PT_GPR7 0x48
113#define PT_GPR8 0x50
114#define PT_GPR9 0x58
115#define PT_GPR10 0x60
116#define PT_GPR11 0x68
117#define PT_GPR12 0x70
118#define PT_GPR13 0x78
119#define PT_GPR14 0x80
120#define PT_GPR15 0x88
121#define PT_ACR0 0x90
122#define PT_ACR1 0x94
123#define PT_ACR2 0x98
124#define PT_ACR3 0x9C
125#define PT_ACR4 0xA0
126#define PT_ACR5 0xA4
127#define PT_ACR6 0xA8
128#define PT_ACR7 0xAC
129#define PT_ACR8 0xB0
130#define PT_ACR9 0xB4
131#define PT_ACR10 0xB8
132#define PT_ACR11 0xBC
133#define PT_ACR12 0xC0
134#define PT_ACR13 0xC4
135#define PT_ACR14 0xC8
136#define PT_ACR15 0xCC
137#define PT_ORIGGPR2 0xD0
138#define PT_FPC 0xD8
139#define PT_FPR0 0xE0
140#define PT_FPR1 0xE8
141#define PT_FPR2 0xF0
142#define PT_FPR3 0xF8
143#define PT_FPR4 0x100
144#define PT_FPR5 0x108
145#define PT_FPR6 0x110
146#define PT_FPR7 0x118
147#define PT_FPR8 0x120
148#define PT_FPR9 0x128
149#define PT_FPR10 0x130
150#define PT_FPR11 0x138
151#define PT_FPR12 0x140
152#define PT_FPR13 0x148
153#define PT_FPR14 0x150
154#define PT_FPR15 0x158
155#define PT_CR_9 0x160
156#define PT_CR_10 0x168
157#define PT_CR_11 0x170
158#define PT_IEEE_IP 0x1A8
159#define PT_LASTOFF PT_IEEE_IP
160#define PT_ENDREGS 0x1B0-1
161
162#define GPR_SIZE 8
163#define CR_SIZE 8
164
165#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
166
167#endif /* __s390x__ */
168
169#define NUM_GPRS 16
170#define NUM_FPRS 16
171#define NUM_CRS 16
172#define NUM_ACRS 16
173
174#define NUM_CR_WORDS 3
175
176#define FPR_SIZE 8
177#define FPC_SIZE 4
178#define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */
179#define ACR_SIZE 4
180
181
182#define PTRACE_OLDSETOPTIONS 21
183
184#ifndef __ASSEMBLY__
185#include <linux/stddef.h>
186#include <linux/types.h>
187
188typedef union {
189 float f;
190 double d;
191 __u64 ui;
192 struct
193 {
194 __u32 hi;
195 __u32 lo;
196 } fp;
197} freg_t;
198
199typedef struct {
200 __u32 fpc;
201 __u32 pad;
202 freg_t fprs[NUM_FPRS];
203} s390_fp_regs;
204
205#define FPC_EXCEPTION_MASK 0xF8000000
206#define FPC_FLAGS_MASK 0x00F80000
207#define FPC_DXC_MASK 0x0000FF00
208#define FPC_RM_MASK 0x00000003
209
210/* this typedef defines how a Program Status Word looks like */
211typedef struct {
212 unsigned long mask;
213 unsigned long addr;
214} __attribute__ ((aligned(8))) psw_t;
215
216#ifndef __s390x__
217
218#define PSW_MASK_PER 0x40000000UL
219#define PSW_MASK_DAT 0x04000000UL
220#define PSW_MASK_IO 0x02000000UL
221#define PSW_MASK_EXT 0x01000000UL
222#define PSW_MASK_KEY 0x00F00000UL
223#define PSW_MASK_BASE 0x00080000UL /* always one */
224#define PSW_MASK_MCHECK 0x00040000UL
225#define PSW_MASK_WAIT 0x00020000UL
226#define PSW_MASK_PSTATE 0x00010000UL
227#define PSW_MASK_ASC 0x0000C000UL
228#define PSW_MASK_CC 0x00003000UL
229#define PSW_MASK_PM 0x00000F00UL
230#define PSW_MASK_RI 0x00000000UL
231#define PSW_MASK_EA 0x00000000UL
232#define PSW_MASK_BA 0x00000000UL
233
234#define PSW_MASK_USER 0x0000FF00UL
235
236#define PSW_ADDR_AMODE 0x80000000UL
237#define PSW_ADDR_INSN 0x7FFFFFFFUL
238
239#define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 20)
240
241#define PSW_ASC_PRIMARY 0x00000000UL
242#define PSW_ASC_ACCREG 0x00004000UL
243#define PSW_ASC_SECONDARY 0x00008000UL
244#define PSW_ASC_HOME 0x0000C000UL
245
246#else /* __s390x__ */
247
248#define PSW_MASK_PER 0x4000000000000000UL
249#define PSW_MASK_DAT 0x0400000000000000UL
250#define PSW_MASK_IO 0x0200000000000000UL
251#define PSW_MASK_EXT 0x0100000000000000UL
252#define PSW_MASK_BASE 0x0000000000000000UL
253#define PSW_MASK_KEY 0x00F0000000000000UL
254#define PSW_MASK_MCHECK 0x0004000000000000UL
255#define PSW_MASK_WAIT 0x0002000000000000UL
256#define PSW_MASK_PSTATE 0x0001000000000000UL
257#define PSW_MASK_ASC 0x0000C00000000000UL
258#define PSW_MASK_CC 0x0000300000000000UL
259#define PSW_MASK_PM 0x00000F0000000000UL
260#define PSW_MASK_RI 0x0000008000000000UL
261#define PSW_MASK_EA 0x0000000100000000UL
262#define PSW_MASK_BA 0x0000000080000000UL
263
264#define PSW_MASK_USER 0x0000FF0180000000UL
265
266#define PSW_ADDR_AMODE 0x0000000000000000UL
267#define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL
268
269#define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 52)
270
271#define PSW_ASC_PRIMARY 0x0000000000000000UL
272#define PSW_ASC_ACCREG 0x0000400000000000UL
273#define PSW_ASC_SECONDARY 0x0000800000000000UL
274#define PSW_ASC_HOME 0x0000C00000000000UL
275
276#endif /* __s390x__ */
277
278
279/*
280 * The s390_regs structure is used to define the elf_gregset_t.
281 */
282typedef struct {
283 psw_t psw;
284 unsigned long gprs[NUM_GPRS];
285 unsigned int acrs[NUM_ACRS];
286 unsigned long orig_gpr2;
287} s390_regs;
288
289/*
290 * The user_pt_regs structure exports the beginning of
291 * the in-kernel pt_regs structure to user space.
292 */
293typedef struct {
294 unsigned long args[1];
295 psw_t psw;
296 unsigned long gprs[NUM_GPRS];
297} user_pt_regs;
298
299/*
300 * Now for the user space program event recording (trace) definitions.
301 * The following structures are used only for the ptrace interface, don't
302 * touch or even look at it if you don't want to modify the user-space
303 * ptrace interface. In particular stay away from it for in-kernel PER.
304 */
305typedef struct {
306 unsigned long cr[NUM_CR_WORDS];
307} per_cr_words;
308
309#define PER_EM_MASK 0xE8000000UL
310
311typedef struct {
312#ifdef __s390x__
313 unsigned : 32;
314#endif /* __s390x__ */
315 unsigned em_branching : 1;
316 unsigned em_instruction_fetch : 1;
317 /*
318 * Switching on storage alteration automatically fixes
319 * the storage alteration event bit in the users std.
320 */
321 unsigned em_storage_alteration : 1;
322 unsigned em_gpr_alt_unused : 1;
323 unsigned em_store_real_address : 1;
324 unsigned : 3;
325 unsigned branch_addr_ctl : 1;
326 unsigned : 1;
327 unsigned storage_alt_space_ctl : 1;
328 unsigned : 21;
329 unsigned long starting_addr;
330 unsigned long ending_addr;
331} per_cr_bits;
332
333typedef struct {
334 unsigned short perc_atmid;
335 unsigned long address;
336 unsigned char access_id;
337} per_lowcore_words;
338
339typedef struct {
340 unsigned perc_branching : 1;
341 unsigned perc_instruction_fetch : 1;
342 unsigned perc_storage_alteration : 1;
343 unsigned perc_gpr_alt_unused : 1;
344 unsigned perc_store_real_address : 1;
345 unsigned : 3;
346 unsigned atmid_psw_bit_31 : 1;
347 unsigned atmid_validity_bit : 1;
348 unsigned atmid_psw_bit_32 : 1;
349 unsigned atmid_psw_bit_5 : 1;
350 unsigned atmid_psw_bit_16 : 1;
351 unsigned atmid_psw_bit_17 : 1;
352 unsigned si : 2;
353 unsigned long address;
354 unsigned : 4;
355 unsigned access_id : 4;
356} per_lowcore_bits;
357
358typedef struct {
359 union {
360 per_cr_words words;
361 per_cr_bits bits;
362 } control_regs;
363 /*
364 * The single_step and instruction_fetch bits are obsolete,
365 * the kernel always sets them to zero. To enable single
366 * stepping use ptrace(PTRACE_SINGLESTEP) instead.
367 */
368 unsigned single_step : 1;
369 unsigned instruction_fetch : 1;
370 unsigned : 30;
371 /*
372 * These addresses are copied into cr10 & cr11 if single
373 * stepping is switched off
374 */
375 unsigned long starting_addr;
376 unsigned long ending_addr;
377 union {
378 per_lowcore_words words;
379 per_lowcore_bits bits;
380 } lowcore;
381} per_struct;
382
383typedef struct {
384 unsigned int len;
385 unsigned long kernel_addr;
386 unsigned long process_addr;
387} ptrace_area;
388
389/*
390 * S/390 specific non posix ptrace requests. I chose unusual values so
391 * they are unlikely to clash with future ptrace definitions.
392 */
393#define PTRACE_PEEKUSR_AREA 0x5000
394#define PTRACE_POKEUSR_AREA 0x5001
395#define PTRACE_PEEKTEXT_AREA 0x5002
396#define PTRACE_PEEKDATA_AREA 0x5003
397#define PTRACE_POKETEXT_AREA 0x5004
398#define PTRACE_POKEDATA_AREA 0x5005
399#define PTRACE_GET_LAST_BREAK 0x5006
400#define PTRACE_PEEK_SYSTEM_CALL 0x5007
401#define PTRACE_POKE_SYSTEM_CALL 0x5008
402#define PTRACE_ENABLE_TE 0x5009
403#define PTRACE_DISABLE_TE 0x5010
404#define PTRACE_TE_ABORT_RAND 0x5011
405
406/*
407 * The numbers chosen here are somewhat arbitrary but absolutely MUST
408 * not overlap with any of the number assigned in <linux/ptrace.h>.
409 */
410#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
411
412/*
413 * PT_PROT definition is loosely based on hppa bsd definition in
414 * gdb/hppab-nat.c
415 */
416#define PTRACE_PROT 21
417
418typedef enum {
419 ptprot_set_access_watchpoint,
420 ptprot_set_write_watchpoint,
421 ptprot_disable_watchpoint
422} ptprot_flags;
423
424typedef struct {
425 unsigned long lowaddr;
426 unsigned long hiaddr;
427 ptprot_flags prot;
428} ptprot_area;
429
430/* Sequence of bytes for breakpoint illegal instruction. */
431#define S390_BREAKPOINT {0x0,0x1}
432#define S390_BREAKPOINT_U16 ((__u16)0x0001)
433#define S390_SYSCALL_OPCODE ((__u16)0x0a00)
434#define S390_SYSCALL_SIZE 2
435
436/*
437 * The user_regs_struct defines the way the user registers are
438 * store on the stack for signal handling.
439 */
440struct user_regs_struct {
441 psw_t psw;
442 unsigned long gprs[NUM_GPRS];
443 unsigned int acrs[NUM_ACRS];
444 unsigned long orig_gpr2;
445 s390_fp_regs fp_regs;
446 /*
447 * These per registers are in here so that gdb can modify them
448 * itself as there is no "official" ptrace interface for hardware
449 * watchpoints. This is the way intel does it.
450 */
451 per_struct per_info;
452 unsigned long ieee_instruction_pointer; /* obsolete, always 0 */
453};
454
455#endif /* __ASSEMBLY__ */
456
457#endif /* _UAPI_S390_PTRACE_H */
diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index 793690fbda36..c0b0e9e8aa66 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -13,173 +13,176 @@
13/* 13/*
14 * Defines x86 CPU feature bits 14 * Defines x86 CPU feature bits
15 */ 15 */
16#define NCAPINTS 18 /* N 32-bit words worth of info */ 16#define NCAPINTS 18 /* N 32-bit words worth of info */
17#define NBUGINTS 1 /* N 32-bit bug flags */ 17#define NBUGINTS 1 /* N 32-bit bug flags */
18 18
19/* 19/*
20 * Note: If the comment begins with a quoted string, that string is used 20 * Note: If the comment begins with a quoted string, that string is used
21 * in /proc/cpuinfo instead of the macro name. If the string is "", 21 * in /proc/cpuinfo instead of the macro name. If the string is "",
22 * this feature bit is not displayed in /proc/cpuinfo at all. 22 * this feature bit is not displayed in /proc/cpuinfo at all.
23 *
24 * When adding new features here that depend on other features,
25 * please update the table in kernel/cpu/cpuid-deps.c as well.
23 */ 26 */
24 27
25/* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */ 28/* Intel-defined CPU features, CPUID level 0x00000001 (EDX), word 0 */
26#define X86_FEATURE_FPU ( 0*32+ 0) /* Onboard FPU */ 29#define X86_FEATURE_FPU ( 0*32+ 0) /* Onboard FPU */
27#define X86_FEATURE_VME ( 0*32+ 1) /* Virtual Mode Extensions */ 30#define X86_FEATURE_VME ( 0*32+ 1) /* Virtual Mode Extensions */
28#define X86_FEATURE_DE ( 0*32+ 2) /* Debugging Extensions */ 31#define X86_FEATURE_DE ( 0*32+ 2) /* Debugging Extensions */
29#define X86_FEATURE_PSE ( 0*32+ 3) /* Page Size Extensions */ 32#define X86_FEATURE_PSE ( 0*32+ 3) /* Page Size Extensions */
30#define X86_FEATURE_TSC ( 0*32+ 4) /* Time Stamp Counter */ 33#define X86_FEATURE_TSC ( 0*32+ 4) /* Time Stamp Counter */
31#define X86_FEATURE_MSR ( 0*32+ 5) /* Model-Specific Registers */ 34#define X86_FEATURE_MSR ( 0*32+ 5) /* Model-Specific Registers */
32#define X86_FEATURE_PAE ( 0*32+ 6) /* Physical Address Extensions */ 35#define X86_FEATURE_PAE ( 0*32+ 6) /* Physical Address Extensions */
33#define X86_FEATURE_MCE ( 0*32+ 7) /* Machine Check Exception */ 36#define X86_FEATURE_MCE ( 0*32+ 7) /* Machine Check Exception */
34#define X86_FEATURE_CX8 ( 0*32+ 8) /* CMPXCHG8 instruction */ 37#define X86_FEATURE_CX8 ( 0*32+ 8) /* CMPXCHG8 instruction */
35#define X86_FEATURE_APIC ( 0*32+ 9) /* Onboard APIC */ 38#define X86_FEATURE_APIC ( 0*32+ 9) /* Onboard APIC */
36#define X86_FEATURE_SEP ( 0*32+11) /* SYSENTER/SYSEXIT */ 39#define X86_FEATURE_SEP ( 0*32+11) /* SYSENTER/SYSEXIT */
37#define X86_FEATURE_MTRR ( 0*32+12) /* Memory Type Range Registers */ 40#define X86_FEATURE_MTRR ( 0*32+12) /* Memory Type Range Registers */
38#define X86_FEATURE_PGE ( 0*32+13) /* Page Global Enable */ 41#define X86_FEATURE_PGE ( 0*32+13) /* Page Global Enable */
39#define X86_FEATURE_MCA ( 0*32+14) /* Machine Check Architecture */ 42#define X86_FEATURE_MCA ( 0*32+14) /* Machine Check Architecture */
40#define X86_FEATURE_CMOV ( 0*32+15) /* CMOV instructions */ 43#define X86_FEATURE_CMOV ( 0*32+15) /* CMOV instructions (plus FCMOVcc, FCOMI with FPU) */
41 /* (plus FCMOVcc, FCOMI with FPU) */ 44#define X86_FEATURE_PAT ( 0*32+16) /* Page Attribute Table */
42#define X86_FEATURE_PAT ( 0*32+16) /* Page Attribute Table */ 45#define X86_FEATURE_PSE36 ( 0*32+17) /* 36-bit PSEs */
43#define X86_FEATURE_PSE36 ( 0*32+17) /* 36-bit PSEs */ 46#define X86_FEATURE_PN ( 0*32+18) /* Processor serial number */
44#define X86_FEATURE_PN ( 0*32+18) /* Processor serial number */ 47#define X86_FEATURE_CLFLUSH ( 0*32+19) /* CLFLUSH instruction */
45#define X86_FEATURE_CLFLUSH ( 0*32+19) /* CLFLUSH instruction */ 48#define X86_FEATURE_DS ( 0*32+21) /* "dts" Debug Store */
46#define X86_FEATURE_DS ( 0*32+21) /* "dts" Debug Store */ 49#define X86_FEATURE_ACPI ( 0*32+22) /* ACPI via MSR */
47#define X86_FEATURE_ACPI ( 0*32+22) /* ACPI via MSR */ 50#define X86_FEATURE_MMX ( 0*32+23) /* Multimedia Extensions */
48#define X86_FEATURE_MMX ( 0*32+23) /* Multimedia Extensions */ 51#define X86_FEATURE_FXSR ( 0*32+24) /* FXSAVE/FXRSTOR, CR4.OSFXSR */
49#define X86_FEATURE_FXSR ( 0*32+24) /* FXSAVE/FXRSTOR, CR4.OSFXSR */ 52#define X86_FEATURE_XMM ( 0*32+25) /* "sse" */
50#define X86_FEATURE_XMM ( 0*32+25) /* "sse" */ 53#define X86_FEATURE_XMM2 ( 0*32+26) /* "sse2" */
51#define X86_FEATURE_XMM2 ( 0*32+26) /* "sse2" */ 54#define X86_FEATURE_SELFSNOOP ( 0*32+27) /* "ss" CPU self snoop */
52#define X86_FEATURE_SELFSNOOP ( 0*32+27) /* "ss" CPU self snoop */ 55#define X86_FEATURE_HT ( 0*32+28) /* Hyper-Threading */
53#define X86_FEATURE_HT ( 0*32+28) /* Hyper-Threading */ 56#define X86_FEATURE_ACC ( 0*32+29) /* "tm" Automatic clock control */
54#define X86_FEATURE_ACC ( 0*32+29) /* "tm" Automatic clock control */ 57#define X86_FEATURE_IA64 ( 0*32+30) /* IA-64 processor */
55#define X86_FEATURE_IA64 ( 0*32+30) /* IA-64 processor */ 58#define X86_FEATURE_PBE ( 0*32+31) /* Pending Break Enable */
56#define X86_FEATURE_PBE ( 0*32+31) /* Pending Break Enable */
57 59
58/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ 60/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */
59/* Don't duplicate feature flags which are redundant with Intel! */ 61/* Don't duplicate feature flags which are redundant with Intel! */
60#define X86_FEATURE_SYSCALL ( 1*32+11) /* SYSCALL/SYSRET */ 62#define X86_FEATURE_SYSCALL ( 1*32+11) /* SYSCALL/SYSRET */
61#define X86_FEATURE_MP ( 1*32+19) /* MP Capable. */ 63#define X86_FEATURE_MP ( 1*32+19) /* MP Capable */
62#define X86_FEATURE_NX ( 1*32+20) /* Execute Disable */ 64#define X86_FEATURE_NX ( 1*32+20) /* Execute Disable */
63#define X86_FEATURE_MMXEXT ( 1*32+22) /* AMD MMX extensions */ 65#define X86_FEATURE_MMXEXT ( 1*32+22) /* AMD MMX extensions */
64#define X86_FEATURE_FXSR_OPT ( 1*32+25) /* FXSAVE/FXRSTOR optimizations */ 66#define X86_FEATURE_FXSR_OPT ( 1*32+25) /* FXSAVE/FXRSTOR optimizations */
65#define X86_FEATURE_GBPAGES ( 1*32+26) /* "pdpe1gb" GB pages */ 67#define X86_FEATURE_GBPAGES ( 1*32+26) /* "pdpe1gb" GB pages */
66#define X86_FEATURE_RDTSCP ( 1*32+27) /* RDTSCP */ 68#define X86_FEATURE_RDTSCP ( 1*32+27) /* RDTSCP */
67#define X86_FEATURE_LM ( 1*32+29) /* Long Mode (x86-64) */ 69#define X86_FEATURE_LM ( 1*32+29) /* Long Mode (x86-64, 64-bit support) */
68#define X86_FEATURE_3DNOWEXT ( 1*32+30) /* AMD 3DNow! extensions */ 70#define X86_FEATURE_3DNOWEXT ( 1*32+30) /* AMD 3DNow extensions */
69#define X86_FEATURE_3DNOW ( 1*32+31) /* 3DNow! */ 71#define X86_FEATURE_3DNOW ( 1*32+31) /* 3DNow */
70 72
71/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */ 73/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */
72#define X86_FEATURE_RECOVERY ( 2*32+ 0) /* CPU in recovery mode */ 74#define X86_FEATURE_RECOVERY ( 2*32+ 0) /* CPU in recovery mode */
73#define X86_FEATURE_LONGRUN ( 2*32+ 1) /* Longrun power control */ 75#define X86_FEATURE_LONGRUN ( 2*32+ 1) /* Longrun power control */
74#define X86_FEATURE_LRTI ( 2*32+ 3) /* LongRun table interface */ 76#define X86_FEATURE_LRTI ( 2*32+ 3) /* LongRun table interface */
75 77
76/* Other features, Linux-defined mapping, word 3 */ 78/* Other features, Linux-defined mapping, word 3 */
77/* This range is used for feature bits which conflict or are synthesized */ 79/* This range is used for feature bits which conflict or are synthesized */
78#define X86_FEATURE_CXMMX ( 3*32+ 0) /* Cyrix MMX extensions */ 80#define X86_FEATURE_CXMMX ( 3*32+ 0) /* Cyrix MMX extensions */
79#define X86_FEATURE_K6_MTRR ( 3*32+ 1) /* AMD K6 nonstandard MTRRs */ 81#define X86_FEATURE_K6_MTRR ( 3*32+ 1) /* AMD K6 nonstandard MTRRs */
80#define X86_FEATURE_CYRIX_ARR ( 3*32+ 2) /* Cyrix ARRs (= MTRRs) */ 82#define X86_FEATURE_CYRIX_ARR ( 3*32+ 2) /* Cyrix ARRs (= MTRRs) */
81#define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* Centaur MCRs (= MTRRs) */ 83#define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* Centaur MCRs (= MTRRs) */
82/* cpu types for specific tunings: */ 84
83#define X86_FEATURE_K8 ( 3*32+ 4) /* "" Opteron, Athlon64 */ 85/* CPU types for specific tunings: */
84#define X86_FEATURE_K7 ( 3*32+ 5) /* "" Athlon */ 86#define X86_FEATURE_K8 ( 3*32+ 4) /* "" Opteron, Athlon64 */
85#define X86_FEATURE_P3 ( 3*32+ 6) /* "" P3 */ 87#define X86_FEATURE_K7 ( 3*32+ 5) /* "" Athlon */
86#define X86_FEATURE_P4 ( 3*32+ 7) /* "" P4 */ 88#define X86_FEATURE_P3 ( 3*32+ 6) /* "" P3 */
87#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* TSC ticks at a constant rate */ 89#define X86_FEATURE_P4 ( 3*32+ 7) /* "" P4 */
88#define X86_FEATURE_UP ( 3*32+ 9) /* smp kernel running on up */ 90#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* TSC ticks at a constant rate */
89#define X86_FEATURE_ART ( 3*32+10) /* Platform has always running timer (ART) */ 91#define X86_FEATURE_UP ( 3*32+ 9) /* SMP kernel running on UP */
90#define X86_FEATURE_ARCH_PERFMON ( 3*32+11) /* Intel Architectural PerfMon */ 92#define X86_FEATURE_ART ( 3*32+10) /* Always running timer (ART) */
91#define X86_FEATURE_PEBS ( 3*32+12) /* Precise-Event Based Sampling */ 93#define X86_FEATURE_ARCH_PERFMON ( 3*32+11) /* Intel Architectural PerfMon */
92#define X86_FEATURE_BTS ( 3*32+13) /* Branch Trace Store */ 94#define X86_FEATURE_PEBS ( 3*32+12) /* Precise-Event Based Sampling */
93#define X86_FEATURE_SYSCALL32 ( 3*32+14) /* "" syscall in ia32 userspace */ 95#define X86_FEATURE_BTS ( 3*32+13) /* Branch Trace Store */
94#define X86_FEATURE_SYSENTER32 ( 3*32+15) /* "" sysenter in ia32 userspace */ 96#define X86_FEATURE_SYSCALL32 ( 3*32+14) /* "" syscall in IA32 userspace */
95#define X86_FEATURE_REP_GOOD ( 3*32+16) /* rep microcode works well */ 97#define X86_FEATURE_SYSENTER32 ( 3*32+15) /* "" sysenter in IA32 userspace */
96#define X86_FEATURE_MFENCE_RDTSC ( 3*32+17) /* "" Mfence synchronizes RDTSC */ 98#define X86_FEATURE_REP_GOOD ( 3*32+16) /* REP microcode works well */
97#define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) /* "" Lfence synchronizes RDTSC */ 99#define X86_FEATURE_MFENCE_RDTSC ( 3*32+17) /* "" MFENCE synchronizes RDTSC */
98#define X86_FEATURE_ACC_POWER ( 3*32+19) /* AMD Accumulated Power Mechanism */ 100#define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) /* "" LFENCE synchronizes RDTSC */
99#define X86_FEATURE_NOPL ( 3*32+20) /* The NOPL (0F 1F) instructions */ 101#define X86_FEATURE_ACC_POWER ( 3*32+19) /* AMD Accumulated Power Mechanism */
100#define X86_FEATURE_ALWAYS ( 3*32+21) /* "" Always-present feature */ 102#define X86_FEATURE_NOPL ( 3*32+20) /* The NOPL (0F 1F) instructions */
101#define X86_FEATURE_XTOPOLOGY ( 3*32+22) /* cpu topology enum extensions */ 103#define X86_FEATURE_ALWAYS ( 3*32+21) /* "" Always-present feature */
102#define X86_FEATURE_TSC_RELIABLE ( 3*32+23) /* TSC is known to be reliable */ 104#define X86_FEATURE_XTOPOLOGY ( 3*32+22) /* CPU topology enum extensions */
103#define X86_FEATURE_NONSTOP_TSC ( 3*32+24) /* TSC does not stop in C states */ 105#define X86_FEATURE_TSC_RELIABLE ( 3*32+23) /* TSC is known to be reliable */
104#define X86_FEATURE_CPUID ( 3*32+25) /* CPU has CPUID instruction itself */ 106#define X86_FEATURE_NONSTOP_TSC ( 3*32+24) /* TSC does not stop in C states */
105#define X86_FEATURE_EXTD_APICID ( 3*32+26) /* has extended APICID (8 bits) */ 107#define X86_FEATURE_CPUID ( 3*32+25) /* CPU has CPUID instruction itself */
106#define X86_FEATURE_AMD_DCM ( 3*32+27) /* multi-node processor */ 108#define X86_FEATURE_EXTD_APICID ( 3*32+26) /* Extended APICID (8 bits) */
107#define X86_FEATURE_APERFMPERF ( 3*32+28) /* APERFMPERF */ 109#define X86_FEATURE_AMD_DCM ( 3*32+27) /* AMD multi-node processor */
108#define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30) /* TSC doesn't stop in S3 state */ 110#define X86_FEATURE_APERFMPERF ( 3*32+28) /* P-State hardware coordination feedback capability (APERF/MPERF MSRs) */
109#define X86_FEATURE_TSC_KNOWN_FREQ ( 3*32+31) /* TSC has known frequency */ 111#define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30) /* TSC doesn't stop in S3 state */
112#define X86_FEATURE_TSC_KNOWN_FREQ ( 3*32+31) /* TSC has known frequency */
110 113
111/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ 114/* Intel-defined CPU features, CPUID level 0x00000001 (ECX), word 4 */
112#define X86_FEATURE_XMM3 ( 4*32+ 0) /* "pni" SSE-3 */ 115#define X86_FEATURE_XMM3 ( 4*32+ 0) /* "pni" SSE-3 */
113#define X86_FEATURE_PCLMULQDQ ( 4*32+ 1) /* PCLMULQDQ instruction */ 116#define X86_FEATURE_PCLMULQDQ ( 4*32+ 1) /* PCLMULQDQ instruction */
114#define X86_FEATURE_DTES64 ( 4*32+ 2) /* 64-bit Debug Store */ 117#define X86_FEATURE_DTES64 ( 4*32+ 2) /* 64-bit Debug Store */
115#define X86_FEATURE_MWAIT ( 4*32+ 3) /* "monitor" Monitor/Mwait support */ 118#define X86_FEATURE_MWAIT ( 4*32+ 3) /* "monitor" MONITOR/MWAIT support */
116#define X86_FEATURE_DSCPL ( 4*32+ 4) /* "ds_cpl" CPL Qual. Debug Store */ 119#define X86_FEATURE_DSCPL ( 4*32+ 4) /* "ds_cpl" CPL-qualified (filtered) Debug Store */
117#define X86_FEATURE_VMX ( 4*32+ 5) /* Hardware virtualization */ 120#define X86_FEATURE_VMX ( 4*32+ 5) /* Hardware virtualization */
118#define X86_FEATURE_SMX ( 4*32+ 6) /* Safer mode */ 121#define X86_FEATURE_SMX ( 4*32+ 6) /* Safer Mode eXtensions */
119#define X86_FEATURE_EST ( 4*32+ 7) /* Enhanced SpeedStep */ 122#define X86_FEATURE_EST ( 4*32+ 7) /* Enhanced SpeedStep */
120#define X86_FEATURE_TM2 ( 4*32+ 8) /* Thermal Monitor 2 */ 123#define X86_FEATURE_TM2 ( 4*32+ 8) /* Thermal Monitor 2 */
121#define X86_FEATURE_SSSE3 ( 4*32+ 9) /* Supplemental SSE-3 */ 124#define X86_FEATURE_SSSE3 ( 4*32+ 9) /* Supplemental SSE-3 */
122#define X86_FEATURE_CID ( 4*32+10) /* Context ID */ 125#define X86_FEATURE_CID ( 4*32+10) /* Context ID */
123#define X86_FEATURE_SDBG ( 4*32+11) /* Silicon Debug */ 126#define X86_FEATURE_SDBG ( 4*32+11) /* Silicon Debug */
124#define X86_FEATURE_FMA ( 4*32+12) /* Fused multiply-add */ 127#define X86_FEATURE_FMA ( 4*32+12) /* Fused multiply-add */
125#define X86_FEATURE_CX16 ( 4*32+13) /* CMPXCHG16B */ 128#define X86_FEATURE_CX16 ( 4*32+13) /* CMPXCHG16B instruction */
126#define X86_FEATURE_XTPR ( 4*32+14) /* Send Task Priority Messages */ 129#define X86_FEATURE_XTPR ( 4*32+14) /* Send Task Priority Messages */
127#define X86_FEATURE_PDCM ( 4*32+15) /* Performance Capabilities */ 130#define X86_FEATURE_PDCM ( 4*32+15) /* Perf/Debug Capabilities MSR */
128#define X86_FEATURE_PCID ( 4*32+17) /* Process Context Identifiers */ 131#define X86_FEATURE_PCID ( 4*32+17) /* Process Context Identifiers */
129#define X86_FEATURE_DCA ( 4*32+18) /* Direct Cache Access */ 132#define X86_FEATURE_DCA ( 4*32+18) /* Direct Cache Access */
130#define X86_FEATURE_XMM4_1 ( 4*32+19) /* "sse4_1" SSE-4.1 */ 133#define X86_FEATURE_XMM4_1 ( 4*32+19) /* "sse4_1" SSE-4.1 */
131#define X86_FEATURE_XMM4_2 ( 4*32+20) /* "sse4_2" SSE-4.2 */ 134#define X86_FEATURE_XMM4_2 ( 4*32+20) /* "sse4_2" SSE-4.2 */
132#define X86_FEATURE_X2APIC ( 4*32+21) /* x2APIC */ 135#define X86_FEATURE_X2APIC ( 4*32+21) /* X2APIC */
133#define X86_FEATURE_MOVBE ( 4*32+22) /* MOVBE instruction */ 136#define X86_FEATURE_MOVBE ( 4*32+22) /* MOVBE instruction */
134#define X86_FEATURE_POPCNT ( 4*32+23) /* POPCNT instruction */ 137#define X86_FEATURE_POPCNT ( 4*32+23) /* POPCNT instruction */
135#define X86_FEATURE_TSC_DEADLINE_TIMER ( 4*32+24) /* Tsc deadline timer */ 138#define X86_FEATURE_TSC_DEADLINE_TIMER ( 4*32+24) /* TSC deadline timer */
136#define X86_FEATURE_AES ( 4*32+25) /* AES instructions */ 139#define X86_FEATURE_AES ( 4*32+25) /* AES instructions */
137#define X86_FEATURE_XSAVE ( 4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */ 140#define X86_FEATURE_XSAVE ( 4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV instructions */
138#define X86_FEATURE_OSXSAVE ( 4*32+27) /* "" XSAVE enabled in the OS */ 141#define X86_FEATURE_OSXSAVE ( 4*32+27) /* "" XSAVE instruction enabled in the OS */
139#define X86_FEATURE_AVX ( 4*32+28) /* Advanced Vector Extensions */ 142#define X86_FEATURE_AVX ( 4*32+28) /* Advanced Vector Extensions */
140#define X86_FEATURE_F16C ( 4*32+29) /* 16-bit fp conversions */ 143#define X86_FEATURE_F16C ( 4*32+29) /* 16-bit FP conversions */
141#define X86_FEATURE_RDRAND ( 4*32+30) /* The RDRAND instruction */ 144#define X86_FEATURE_RDRAND ( 4*32+30) /* RDRAND instruction */
142#define X86_FEATURE_HYPERVISOR ( 4*32+31) /* Running on a hypervisor */ 145#define X86_FEATURE_HYPERVISOR ( 4*32+31) /* Running on a hypervisor */
143 146
144/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ 147/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
145#define X86_FEATURE_XSTORE ( 5*32+ 2) /* "rng" RNG present (xstore) */ 148#define X86_FEATURE_XSTORE ( 5*32+ 2) /* "rng" RNG present (xstore) */
146#define X86_FEATURE_XSTORE_EN ( 5*32+ 3) /* "rng_en" RNG enabled */ 149#define X86_FEATURE_XSTORE_EN ( 5*32+ 3) /* "rng_en" RNG enabled */
147#define X86_FEATURE_XCRYPT ( 5*32+ 6) /* "ace" on-CPU crypto (xcrypt) */ 150#define X86_FEATURE_XCRYPT ( 5*32+ 6) /* "ace" on-CPU crypto (xcrypt) */
148#define X86_FEATURE_XCRYPT_EN ( 5*32+ 7) /* "ace_en" on-CPU crypto enabled */ 151#define X86_FEATURE_XCRYPT_EN ( 5*32+ 7) /* "ace_en" on-CPU crypto enabled */
149#define X86_FEATURE_ACE2 ( 5*32+ 8) /* Advanced Cryptography Engine v2 */ 152#define X86_FEATURE_ACE2 ( 5*32+ 8) /* Advanced Cryptography Engine v2 */
150#define X86_FEATURE_ACE2_EN ( 5*32+ 9) /* ACE v2 enabled */ 153#define X86_FEATURE_ACE2_EN ( 5*32+ 9) /* ACE v2 enabled */
151#define X86_FEATURE_PHE ( 5*32+10) /* PadLock Hash Engine */ 154#define X86_FEATURE_PHE ( 5*32+10) /* PadLock Hash Engine */
152#define X86_FEATURE_PHE_EN ( 5*32+11) /* PHE enabled */ 155#define X86_FEATURE_PHE_EN ( 5*32+11) /* PHE enabled */
153#define X86_FEATURE_PMM ( 5*32+12) /* PadLock Montgomery Multiplier */ 156#define X86_FEATURE_PMM ( 5*32+12) /* PadLock Montgomery Multiplier */
154#define X86_FEATURE_PMM_EN ( 5*32+13) /* PMM enabled */ 157#define X86_FEATURE_PMM_EN ( 5*32+13) /* PMM enabled */
155 158
156/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ 159/* More extended AMD flags: CPUID level 0x80000001, ECX, word 6 */
157#define X86_FEATURE_LAHF_LM ( 6*32+ 0) /* LAHF/SAHF in long mode */ 160#define X86_FEATURE_LAHF_LM ( 6*32+ 0) /* LAHF/SAHF in long mode */
158#define X86_FEATURE_CMP_LEGACY ( 6*32+ 1) /* If yes HyperThreading not valid */ 161#define X86_FEATURE_CMP_LEGACY ( 6*32+ 1) /* If yes HyperThreading not valid */
159#define X86_FEATURE_SVM ( 6*32+ 2) /* Secure virtual machine */ 162#define X86_FEATURE_SVM ( 6*32+ 2) /* Secure Virtual Machine */
160#define X86_FEATURE_EXTAPIC ( 6*32+ 3) /* Extended APIC space */ 163#define X86_FEATURE_EXTAPIC ( 6*32+ 3) /* Extended APIC space */
161#define X86_FEATURE_CR8_LEGACY ( 6*32+ 4) /* CR8 in 32-bit mode */ 164#define X86_FEATURE_CR8_LEGACY ( 6*32+ 4) /* CR8 in 32-bit mode */
162#define X86_FEATURE_ABM ( 6*32+ 5) /* Advanced bit manipulation */ 165#define X86_FEATURE_ABM ( 6*32+ 5) /* Advanced bit manipulation */
163#define X86_FEATURE_SSE4A ( 6*32+ 6) /* SSE-4A */ 166#define X86_FEATURE_SSE4A ( 6*32+ 6) /* SSE-4A */
164#define X86_FEATURE_MISALIGNSSE ( 6*32+ 7) /* Misaligned SSE mode */ 167#define X86_FEATURE_MISALIGNSSE ( 6*32+ 7) /* Misaligned SSE mode */
165#define X86_FEATURE_3DNOWPREFETCH ( 6*32+ 8) /* 3DNow prefetch instructions */ 168#define X86_FEATURE_3DNOWPREFETCH ( 6*32+ 8) /* 3DNow prefetch instructions */
166#define X86_FEATURE_OSVW ( 6*32+ 9) /* OS Visible Workaround */ 169#define X86_FEATURE_OSVW ( 6*32+ 9) /* OS Visible Workaround */
167#define X86_FEATURE_IBS ( 6*32+10) /* Instruction Based Sampling */ 170#define X86_FEATURE_IBS ( 6*32+10) /* Instruction Based Sampling */
168#define X86_FEATURE_XOP ( 6*32+11) /* extended AVX instructions */ 171#define X86_FEATURE_XOP ( 6*32+11) /* extended AVX instructions */
169#define X86_FEATURE_SKINIT ( 6*32+12) /* SKINIT/STGI instructions */ 172#define X86_FEATURE_SKINIT ( 6*32+12) /* SKINIT/STGI instructions */
170#define X86_FEATURE_WDT ( 6*32+13) /* Watchdog timer */ 173#define X86_FEATURE_WDT ( 6*32+13) /* Watchdog timer */
171#define X86_FEATURE_LWP ( 6*32+15) /* Light Weight Profiling */ 174#define X86_FEATURE_LWP ( 6*32+15) /* Light Weight Profiling */
172#define X86_FEATURE_FMA4 ( 6*32+16) /* 4 operands MAC instructions */ 175#define X86_FEATURE_FMA4 ( 6*32+16) /* 4 operands MAC instructions */
173#define X86_FEATURE_TCE ( 6*32+17) /* translation cache extension */ 176#define X86_FEATURE_TCE ( 6*32+17) /* Translation Cache Extension */
174#define X86_FEATURE_NODEID_MSR ( 6*32+19) /* NodeId MSR */ 177#define X86_FEATURE_NODEID_MSR ( 6*32+19) /* NodeId MSR */
175#define X86_FEATURE_TBM ( 6*32+21) /* trailing bit manipulations */ 178#define X86_FEATURE_TBM ( 6*32+21) /* Trailing Bit Manipulations */
176#define X86_FEATURE_TOPOEXT ( 6*32+22) /* topology extensions CPUID leafs */ 179#define X86_FEATURE_TOPOEXT ( 6*32+22) /* Topology extensions CPUID leafs */
177#define X86_FEATURE_PERFCTR_CORE ( 6*32+23) /* core performance counter extensions */ 180#define X86_FEATURE_PERFCTR_CORE ( 6*32+23) /* Core performance counter extensions */
178#define X86_FEATURE_PERFCTR_NB ( 6*32+24) /* NB performance counter extensions */ 181#define X86_FEATURE_PERFCTR_NB ( 6*32+24) /* NB performance counter extensions */
179#define X86_FEATURE_BPEXT (6*32+26) /* data breakpoint extension */ 182#define X86_FEATURE_BPEXT ( 6*32+26) /* Data breakpoint extension */
180#define X86_FEATURE_PTSC ( 6*32+27) /* performance time-stamp counter */ 183#define X86_FEATURE_PTSC ( 6*32+27) /* Performance time-stamp counter */
181#define X86_FEATURE_PERFCTR_LLC ( 6*32+28) /* Last Level Cache performance counter extensions */ 184#define X86_FEATURE_PERFCTR_LLC ( 6*32+28) /* Last Level Cache performance counter extensions */
182#define X86_FEATURE_MWAITX ( 6*32+29) /* MWAIT extension (MONITORX/MWAITX) */ 185#define X86_FEATURE_MWAITX ( 6*32+29) /* MWAIT extension (MONITORX/MWAITX instructions) */
183 186
184/* 187/*
185 * Auxiliary flags: Linux defined - For features scattered in various 188 * Auxiliary flags: Linux defined - For features scattered in various
@@ -187,146 +190,154 @@
187 * 190 *
188 * Reuse free bits when adding new feature flags! 191 * Reuse free bits when adding new feature flags!
189 */ 192 */
190#define X86_FEATURE_RING3MWAIT ( 7*32+ 0) /* Ring 3 MONITOR/MWAIT */ 193#define X86_FEATURE_RING3MWAIT ( 7*32+ 0) /* Ring 3 MONITOR/MWAIT instructions */
191#define X86_FEATURE_CPUID_FAULT ( 7*32+ 1) /* Intel CPUID faulting */ 194#define X86_FEATURE_CPUID_FAULT ( 7*32+ 1) /* Intel CPUID faulting */
192#define X86_FEATURE_CPB ( 7*32+ 2) /* AMD Core Performance Boost */ 195#define X86_FEATURE_CPB ( 7*32+ 2) /* AMD Core Performance Boost */
193#define X86_FEATURE_EPB ( 7*32+ 3) /* IA32_ENERGY_PERF_BIAS support */ 196#define X86_FEATURE_EPB ( 7*32+ 3) /* IA32_ENERGY_PERF_BIAS support */
194#define X86_FEATURE_CAT_L3 ( 7*32+ 4) /* Cache Allocation Technology L3 */ 197#define X86_FEATURE_CAT_L3 ( 7*32+ 4) /* Cache Allocation Technology L3 */
195#define X86_FEATURE_CAT_L2 ( 7*32+ 5) /* Cache Allocation Technology L2 */ 198#define X86_FEATURE_CAT_L2 ( 7*32+ 5) /* Cache Allocation Technology L2 */
196#define X86_FEATURE_CDP_L3 ( 7*32+ 6) /* Code and Data Prioritization L3 */ 199#define X86_FEATURE_CDP_L3 ( 7*32+ 6) /* Code and Data Prioritization L3 */
197 200
198#define X86_FEATURE_HW_PSTATE ( 7*32+ 8) /* AMD HW-PState */ 201#define X86_FEATURE_HW_PSTATE ( 7*32+ 8) /* AMD HW-PState */
199#define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ 202#define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
200#define X86_FEATURE_SME ( 7*32+10) /* AMD Secure Memory Encryption */ 203#define X86_FEATURE_SME ( 7*32+10) /* AMD Secure Memory Encryption */
201 204
202#define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */ 205#define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */
203#define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */ 206#define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */
204#define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */ 207#define X86_FEATURE_AVX512_4VNNIW ( 7*32+16) /* AVX-512 Neural Network Instructions */
205#define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */ 208#define X86_FEATURE_AVX512_4FMAPS ( 7*32+17) /* AVX-512 Multiply Accumulation Single precision */
206 209
207#define X86_FEATURE_MBA ( 7*32+18) /* Memory Bandwidth Allocation */ 210#define X86_FEATURE_MBA ( 7*32+18) /* Memory Bandwidth Allocation */
208 211
209/* Virtualization flags: Linux defined, word 8 */ 212/* Virtualization flags: Linux defined, word 8 */
210#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */ 213#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
211#define X86_FEATURE_VNMI ( 8*32+ 1) /* Intel Virtual NMI */ 214#define X86_FEATURE_VNMI ( 8*32+ 1) /* Intel Virtual NMI */
212#define X86_FEATURE_FLEXPRIORITY ( 8*32+ 2) /* Intel FlexPriority */ 215#define X86_FEATURE_FLEXPRIORITY ( 8*32+ 2) /* Intel FlexPriority */
213#define X86_FEATURE_EPT ( 8*32+ 3) /* Intel Extended Page Table */ 216#define X86_FEATURE_EPT ( 8*32+ 3) /* Intel Extended Page Table */
214#define X86_FEATURE_VPID ( 8*32+ 4) /* Intel Virtual Processor ID */ 217#define X86_FEATURE_VPID ( 8*32+ 4) /* Intel Virtual Processor ID */
215 218
216#define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer vmmcall to vmcall */ 219#define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer VMMCALL to VMCALL */
217#define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */ 220#define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */
218 221
219 222
220/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */ 223/* Intel-defined CPU features, CPUID level 0x00000007:0 (EBX), word 9 */
221#define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* {RD/WR}{FS/GS}BASE instructions*/ 224#define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* RDFSBASE, WRFSBASE, RDGSBASE, WRGSBASE instructions*/
222#define X86_FEATURE_TSC_ADJUST ( 9*32+ 1) /* TSC adjustment MSR 0x3b */ 225#define X86_FEATURE_TSC_ADJUST ( 9*32+ 1) /* TSC adjustment MSR 0x3B */
223#define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */ 226#define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */
224#define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */ 227#define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */
225#define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */ 228#define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */
226#define X86_FEATURE_SMEP ( 9*32+ 7) /* Supervisor Mode Execution Protection */ 229#define X86_FEATURE_SMEP ( 9*32+ 7) /* Supervisor Mode Execution Protection */
227#define X86_FEATURE_BMI2 ( 9*32+ 8) /* 2nd group bit manipulation extensions */ 230#define X86_FEATURE_BMI2 ( 9*32+ 8) /* 2nd group bit manipulation extensions */
228#define X86_FEATURE_ERMS ( 9*32+ 9) /* Enhanced REP MOVSB/STOSB */ 231#define X86_FEATURE_ERMS ( 9*32+ 9) /* Enhanced REP MOVSB/STOSB instructions */
229#define X86_FEATURE_INVPCID ( 9*32+10) /* Invalidate Processor Context ID */ 232#define X86_FEATURE_INVPCID ( 9*32+10) /* Invalidate Processor Context ID */
230#define X86_FEATURE_RTM ( 9*32+11) /* Restricted Transactional Memory */ 233#define X86_FEATURE_RTM ( 9*32+11) /* Restricted Transactional Memory */
231#define X86_FEATURE_CQM ( 9*32+12) /* Cache QoS Monitoring */ 234#define X86_FEATURE_CQM ( 9*32+12) /* Cache QoS Monitoring */
232#define X86_FEATURE_MPX ( 9*32+14) /* Memory Protection Extension */ 235#define X86_FEATURE_MPX ( 9*32+14) /* Memory Protection Extension */
233#define X86_FEATURE_RDT_A ( 9*32+15) /* Resource Director Technology Allocation */ 236#define X86_FEATURE_RDT_A ( 9*32+15) /* Resource Director Technology Allocation */
234#define X86_FEATURE_AVX512F ( 9*32+16) /* AVX-512 Foundation */ 237#define X86_FEATURE_AVX512F ( 9*32+16) /* AVX-512 Foundation */
235#define X86_FEATURE_AVX512DQ ( 9*32+17) /* AVX-512 DQ (Double/Quad granular) Instructions */ 238#define X86_FEATURE_AVX512DQ ( 9*32+17) /* AVX-512 DQ (Double/Quad granular) Instructions */
236#define X86_FEATURE_RDSEED ( 9*32+18) /* The RDSEED instruction */ 239#define X86_FEATURE_RDSEED ( 9*32+18) /* RDSEED instruction */
237#define X86_FEATURE_ADX ( 9*32+19) /* The ADCX and ADOX instructions */ 240#define X86_FEATURE_ADX ( 9*32+19) /* ADCX and ADOX instructions */
238#define X86_FEATURE_SMAP ( 9*32+20) /* Supervisor Mode Access Prevention */ 241#define X86_FEATURE_SMAP ( 9*32+20) /* Supervisor Mode Access Prevention */
239#define X86_FEATURE_AVX512IFMA ( 9*32+21) /* AVX-512 Integer Fused Multiply-Add instructions */ 242#define X86_FEATURE_AVX512IFMA ( 9*32+21) /* AVX-512 Integer Fused Multiply-Add instructions */
240#define X86_FEATURE_CLFLUSHOPT ( 9*32+23) /* CLFLUSHOPT instruction */ 243#define X86_FEATURE_CLFLUSHOPT ( 9*32+23) /* CLFLUSHOPT instruction */
241#define X86_FEATURE_CLWB ( 9*32+24) /* CLWB instruction */ 244#define X86_FEATURE_CLWB ( 9*32+24) /* CLWB instruction */
242#define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */ 245#define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */
243#define X86_FEATURE_AVX512ER ( 9*32+27) /* AVX-512 Exponential and Reciprocal */ 246#define X86_FEATURE_AVX512ER ( 9*32+27) /* AVX-512 Exponential and Reciprocal */
244#define X86_FEATURE_AVX512CD ( 9*32+28) /* AVX-512 Conflict Detection */ 247#define X86_FEATURE_AVX512CD ( 9*32+28) /* AVX-512 Conflict Detection */
245#define X86_FEATURE_SHA_NI ( 9*32+29) /* SHA1/SHA256 Instruction Extensions */ 248#define X86_FEATURE_SHA_NI ( 9*32+29) /* SHA1/SHA256 Instruction Extensions */
246#define X86_FEATURE_AVX512BW ( 9*32+30) /* AVX-512 BW (Byte/Word granular) Instructions */ 249#define X86_FEATURE_AVX512BW ( 9*32+30) /* AVX-512 BW (Byte/Word granular) Instructions */
247#define X86_FEATURE_AVX512VL ( 9*32+31) /* AVX-512 VL (128/256 Vector Length) Extensions */ 250#define X86_FEATURE_AVX512VL ( 9*32+31) /* AVX-512 VL (128/256 Vector Length) Extensions */
248 251
249/* Extended state features, CPUID level 0x0000000d:1 (eax), word 10 */ 252/* Extended state features, CPUID level 0x0000000d:1 (EAX), word 10 */
250#define X86_FEATURE_XSAVEOPT (10*32+ 0) /* XSAVEOPT */ 253#define X86_FEATURE_XSAVEOPT (10*32+ 0) /* XSAVEOPT instruction */
251#define X86_FEATURE_XSAVEC (10*32+ 1) /* XSAVEC */ 254#define X86_FEATURE_XSAVEC (10*32+ 1) /* XSAVEC instruction */
252#define X86_FEATURE_XGETBV1 (10*32+ 2) /* XGETBV with ECX = 1 */ 255#define X86_FEATURE_XGETBV1 (10*32+ 2) /* XGETBV with ECX = 1 instruction */
253#define X86_FEATURE_XSAVES (10*32+ 3) /* XSAVES/XRSTORS */ 256#define X86_FEATURE_XSAVES (10*32+ 3) /* XSAVES/XRSTORS instructions */
254 257
255/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:0 (edx), word 11 */ 258/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:0 (EDX), word 11 */
256#define X86_FEATURE_CQM_LLC (11*32+ 1) /* LLC QoS if 1 */ 259#define X86_FEATURE_CQM_LLC (11*32+ 1) /* LLC QoS if 1 */
257 260
258/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (edx), word 12 */ 261/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (EDX), word 12 */
259#define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0) /* LLC occupancy monitoring if 1 */ 262#define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0) /* LLC occupancy monitoring */
260#define X86_FEATURE_CQM_MBM_TOTAL (12*32+ 1) /* LLC Total MBM monitoring */ 263#define X86_FEATURE_CQM_MBM_TOTAL (12*32+ 1) /* LLC Total MBM monitoring */
261#define X86_FEATURE_CQM_MBM_LOCAL (12*32+ 2) /* LLC Local MBM monitoring */ 264#define X86_FEATURE_CQM_MBM_LOCAL (12*32+ 2) /* LLC Local MBM monitoring */
262 265
263/* AMD-defined CPU features, CPUID level 0x80000008 (ebx), word 13 */ 266/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
264#define X86_FEATURE_CLZERO (13*32+0) /* CLZERO instruction */ 267#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
265#define X86_FEATURE_IRPERF (13*32+1) /* Instructions Retired Count */ 268#define X86_FEATURE_IRPERF (13*32+ 1) /* Instructions Retired Count */
266 269
267/* Thermal and Power Management Leaf, CPUID level 0x00000006 (eax), word 14 */ 270/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
268#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */ 271#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */
269#define X86_FEATURE_IDA (14*32+ 1) /* Intel Dynamic Acceleration */ 272#define X86_FEATURE_IDA (14*32+ 1) /* Intel Dynamic Acceleration */
270#define X86_FEATURE_ARAT (14*32+ 2) /* Always Running APIC Timer */ 273#define X86_FEATURE_ARAT (14*32+ 2) /* Always Running APIC Timer */
271#define X86_FEATURE_PLN (14*32+ 4) /* Intel Power Limit Notification */ 274#define X86_FEATURE_PLN (14*32+ 4) /* Intel Power Limit Notification */
272#define X86_FEATURE_PTS (14*32+ 6) /* Intel Package Thermal Status */ 275#define X86_FEATURE_PTS (14*32+ 6) /* Intel Package Thermal Status */
273#define X86_FEATURE_HWP (14*32+ 7) /* Intel Hardware P-states */ 276#define X86_FEATURE_HWP (14*32+ 7) /* Intel Hardware P-states */
274#define X86_FEATURE_HWP_NOTIFY (14*32+ 8) /* HWP Notification */ 277#define X86_FEATURE_HWP_NOTIFY (14*32+ 8) /* HWP Notification */
275#define X86_FEATURE_HWP_ACT_WINDOW (14*32+ 9) /* HWP Activity Window */ 278#define X86_FEATURE_HWP_ACT_WINDOW (14*32+ 9) /* HWP Activity Window */
276#define X86_FEATURE_HWP_EPP (14*32+10) /* HWP Energy Perf. Preference */ 279#define X86_FEATURE_HWP_EPP (14*32+10) /* HWP Energy Perf. Preference */
277#define X86_FEATURE_HWP_PKG_REQ (14*32+11) /* HWP Package Level Request */ 280#define X86_FEATURE_HWP_PKG_REQ (14*32+11) /* HWP Package Level Request */
278 281
279/* AMD SVM Feature Identification, CPUID level 0x8000000a (edx), word 15 */ 282/* AMD SVM Feature Identification, CPUID level 0x8000000a (EDX), word 15 */
280#define X86_FEATURE_NPT (15*32+ 0) /* Nested Page Table support */ 283#define X86_FEATURE_NPT (15*32+ 0) /* Nested Page Table support */
281#define X86_FEATURE_LBRV (15*32+ 1) /* LBR Virtualization support */ 284#define X86_FEATURE_LBRV (15*32+ 1) /* LBR Virtualization support */
282#define X86_FEATURE_SVML (15*32+ 2) /* "svm_lock" SVM locking MSR */ 285#define X86_FEATURE_SVML (15*32+ 2) /* "svm_lock" SVM locking MSR */
283#define X86_FEATURE_NRIPS (15*32+ 3) /* "nrip_save" SVM next_rip save */ 286#define X86_FEATURE_NRIPS (15*32+ 3) /* "nrip_save" SVM next_rip save */
284#define X86_FEATURE_TSCRATEMSR (15*32+ 4) /* "tsc_scale" TSC scaling support */ 287#define X86_FEATURE_TSCRATEMSR (15*32+ 4) /* "tsc_scale" TSC scaling support */
285#define X86_FEATURE_VMCBCLEAN (15*32+ 5) /* "vmcb_clean" VMCB clean bits support */ 288#define X86_FEATURE_VMCBCLEAN (15*32+ 5) /* "vmcb_clean" VMCB clean bits support */
286#define X86_FEATURE_FLUSHBYASID (15*32+ 6) /* flush-by-ASID support */ 289#define X86_FEATURE_FLUSHBYASID (15*32+ 6) /* flush-by-ASID support */
287#define X86_FEATURE_DECODEASSISTS (15*32+ 7) /* Decode Assists support */ 290#define X86_FEATURE_DECODEASSISTS (15*32+ 7) /* Decode Assists support */
288#define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */ 291#define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */
289#define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */ 292#define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */
290#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */ 293#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
291#define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */ 294#define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */
292#define X86_FEATURE_VGIF (15*32+16) /* Virtual GIF */ 295#define X86_FEATURE_VGIF (15*32+16) /* Virtual GIF */
293 296
294/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */ 297/* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
295#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/ 298#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
296#define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */ 299#define X86_FEATURE_UMIP (16*32+ 2) /* User Mode Instruction Protection */
297#define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */ 300#define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */
298#define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for vectors of DW/QW */ 301#define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */
299#define X86_FEATURE_LA57 (16*32+16) /* 5-level page tables */ 302#define X86_FEATURE_AVX512_VBMI2 (16*32+ 6) /* Additional AVX512 Vector Bit Manipulation Instructions */
300#define X86_FEATURE_RDPID (16*32+22) /* RDPID instruction */ 303#define X86_FEATURE_GFNI (16*32+ 8) /* Galois Field New Instructions */
304#define X86_FEATURE_VAES (16*32+ 9) /* Vector AES */
305#define X86_FEATURE_VPCLMULQDQ (16*32+10) /* Carry-Less Multiplication Double Quadword */
306#define X86_FEATURE_AVX512_VNNI (16*32+11) /* Vector Neural Network Instructions */
307#define X86_FEATURE_AVX512_BITALG (16*32+12) /* Support for VPOPCNT[B,W] and VPSHUF-BITQMB instructions */
308#define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for vectors of DW/QW */
309#define X86_FEATURE_LA57 (16*32+16) /* 5-level page tables */
310#define X86_FEATURE_RDPID (16*32+22) /* RDPID instruction */
301 311
302/* AMD-defined CPU features, CPUID level 0x80000007 (ebx), word 17 */ 312/* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */
303#define X86_FEATURE_OVERFLOW_RECOV (17*32+0) /* MCA overflow recovery support */ 313#define X86_FEATURE_OVERFLOW_RECOV (17*32+ 0) /* MCA overflow recovery support */
304#define X86_FEATURE_SUCCOR (17*32+1) /* Uncorrectable error containment and recovery */ 314#define X86_FEATURE_SUCCOR (17*32+ 1) /* Uncorrectable error containment and recovery */
305#define X86_FEATURE_SMCA (17*32+3) /* Scalable MCA */ 315#define X86_FEATURE_SMCA (17*32+ 3) /* Scalable MCA */
306 316
307/* 317/*
308 * BUG word(s) 318 * BUG word(s)
309 */ 319 */
310#define X86_BUG(x) (NCAPINTS*32 + (x)) 320#define X86_BUG(x) (NCAPINTS*32 + (x))
311 321
312#define X86_BUG_F00F X86_BUG(0) /* Intel F00F */ 322#define X86_BUG_F00F X86_BUG(0) /* Intel F00F */
313#define X86_BUG_FDIV X86_BUG(1) /* FPU FDIV */ 323#define X86_BUG_FDIV X86_BUG(1) /* FPU FDIV */
314#define X86_BUG_COMA X86_BUG(2) /* Cyrix 6x86 coma */ 324#define X86_BUG_COMA X86_BUG(2) /* Cyrix 6x86 coma */
315#define X86_BUG_AMD_TLB_MMATCH X86_BUG(3) /* "tlb_mmatch" AMD Erratum 383 */ 325#define X86_BUG_AMD_TLB_MMATCH X86_BUG(3) /* "tlb_mmatch" AMD Erratum 383 */
316#define X86_BUG_AMD_APIC_C1E X86_BUG(4) /* "apic_c1e" AMD Erratum 400 */ 326#define X86_BUG_AMD_APIC_C1E X86_BUG(4) /* "apic_c1e" AMD Erratum 400 */
317#define X86_BUG_11AP X86_BUG(5) /* Bad local APIC aka 11AP */ 327#define X86_BUG_11AP X86_BUG(5) /* Bad local APIC aka 11AP */
318#define X86_BUG_FXSAVE_LEAK X86_BUG(6) /* FXSAVE leaks FOP/FIP/FOP */ 328#define X86_BUG_FXSAVE_LEAK X86_BUG(6) /* FXSAVE leaks FOP/FIP/FOP */
319#define X86_BUG_CLFLUSH_MONITOR X86_BUG(7) /* AAI65, CLFLUSH required before MONITOR */ 329#define X86_BUG_CLFLUSH_MONITOR X86_BUG(7) /* AAI65, CLFLUSH required before MONITOR */
320#define X86_BUG_SYSRET_SS_ATTRS X86_BUG(8) /* SYSRET doesn't fix up SS attrs */ 330#define X86_BUG_SYSRET_SS_ATTRS X86_BUG(8) /* SYSRET doesn't fix up SS attrs */
321#ifdef CONFIG_X86_32 331#ifdef CONFIG_X86_32
322/* 332/*
323 * 64-bit kernels don't use X86_BUG_ESPFIX. Make the define conditional 333 * 64-bit kernels don't use X86_BUG_ESPFIX. Make the define conditional
324 * to avoid confusion. 334 * to avoid confusion.
325 */ 335 */
326#define X86_BUG_ESPFIX X86_BUG(9) /* "" IRET to 16-bit SS corrupts ESP/RSP high bits */ 336#define X86_BUG_ESPFIX X86_BUG(9) /* "" IRET to 16-bit SS corrupts ESP/RSP high bits */
327#endif 337#endif
328#define X86_BUG_NULL_SEG X86_BUG(10) /* Nulling a selector preserves the base */ 338#define X86_BUG_NULL_SEG X86_BUG(10) /* Nulling a selector preserves the base */
329#define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */ 339#define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */
330#define X86_BUG_MONITOR X86_BUG(12) /* IPI required to wake up remote CPU */ 340#define X86_BUG_MONITOR X86_BUG(12) /* IPI required to wake up remote CPU */
331#define X86_BUG_AMD_E400 X86_BUG(13) /* CPU is among the affected by Erratum 400 */ 341#define X86_BUG_AMD_E400 X86_BUG(13) /* CPU is among the affected by Erratum 400 */
342
332#endif /* _ASM_X86_CPUFEATURES_H */ 343#endif /* _ASM_X86_CPUFEATURES_H */
diff --git a/tools/arch/x86/include/asm/disabled-features.h b/tools/arch/x86/include/asm/disabled-features.h
index c10c9128f54e..14d6d5007314 100644
--- a/tools/arch/x86/include/asm/disabled-features.h
+++ b/tools/arch/x86/include/asm/disabled-features.h
@@ -16,6 +16,12 @@
16# define DISABLE_MPX (1<<(X86_FEATURE_MPX & 31)) 16# define DISABLE_MPX (1<<(X86_FEATURE_MPX & 31))
17#endif 17#endif
18 18
19#ifdef CONFIG_X86_INTEL_UMIP
20# define DISABLE_UMIP 0
21#else
22# define DISABLE_UMIP (1<<(X86_FEATURE_UMIP & 31))
23#endif
24
19#ifdef CONFIG_X86_64 25#ifdef CONFIG_X86_64
20# define DISABLE_VME (1<<(X86_FEATURE_VME & 31)) 26# define DISABLE_VME (1<<(X86_FEATURE_VME & 31))
21# define DISABLE_K6_MTRR (1<<(X86_FEATURE_K6_MTRR & 31)) 27# define DISABLE_K6_MTRR (1<<(X86_FEATURE_K6_MTRR & 31))
@@ -63,7 +69,7 @@
63#define DISABLED_MASK13 0 69#define DISABLED_MASK13 0
64#define DISABLED_MASK14 0 70#define DISABLED_MASK14 0
65#define DISABLED_MASK15 0 71#define DISABLED_MASK15 0
66#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE|DISABLE_LA57) 72#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE|DISABLE_LA57|DISABLE_UMIP)
67#define DISABLED_MASK17 0 73#define DISABLED_MASK17 0
68#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18) 74#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18)
69 75
diff --git a/tools/bpf/bpftool/Documentation/Makefile b/tools/bpf/bpftool/Documentation/Makefile
index bde77d7c4390..37292bb5ce60 100644
--- a/tools/bpf/bpftool/Documentation/Makefile
+++ b/tools/bpf/bpftool/Documentation/Makefile
@@ -6,7 +6,7 @@ RM ?= rm -f
6 6
7# Make the path relative to DESTDIR, not prefix 7# Make the path relative to DESTDIR, not prefix
8ifndef DESTDIR 8ifndef DESTDIR
9prefix?=$(HOME) 9prefix ?= /usr/local
10endif 10endif
11mandir ?= $(prefix)/share/man 11mandir ?= $(prefix)/share/man
12man8dir = $(mandir)/man8 12man8dir = $(mandir)/man8
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 813826c50936..ec3052c0b004 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -45,8 +45,8 @@ $(LIBBPF)-clean:
45 $(call QUIET_CLEAN, libbpf) 45 $(call QUIET_CLEAN, libbpf)
46 $(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(OUTPUT) clean >/dev/null 46 $(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(OUTPUT) clean >/dev/null
47 47
48prefix = /usr 48prefix = /usr/local
49bash_compdir ?= $(prefix)/share/bash-completion/completions 49bash_compdir ?= /usr/share/bash-completion/completions
50 50
51CC = gcc 51CC = gcc
52 52
@@ -76,6 +76,7 @@ clean: $(LIBBPF)-clean
76 $(Q)rm -rf $(OUTPUT)bpftool $(OUTPUT)*.o $(OUTPUT)*.d 76 $(Q)rm -rf $(OUTPUT)bpftool $(OUTPUT)*.o $(OUTPUT)*.d
77 77
78install: 78install:
79 install -m 0755 -d $(prefix)/sbin
79 install $(OUTPUT)bpftool $(prefix)/sbin/bpftool 80 install $(OUTPUT)bpftool $(prefix)/sbin/bpftool
80 install -m 0755 -d $(bash_compdir) 81 install -m 0755 -d $(bash_compdir)
81 install -m 0644 bash-completion/bpftool $(bash_compdir) 82 install -m 0644 bash-completion/bpftool $(bash_compdir)
@@ -88,5 +89,5 @@ doc-install:
88 89
89FORCE: 90FORCE:
90 91
91.PHONY: all clean FORCE 92.PHONY: all clean FORCE install doc doc-install
92.DEFAULT_GOAL := all 93.DEFAULT_GOAL := all
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c
index d6e4762170a4..d294bc8168be 100644
--- a/tools/bpf/bpftool/main.c
+++ b/tools/bpf/bpftool/main.c
@@ -58,11 +58,19 @@ bool show_pinned;
58struct pinned_obj_table prog_table; 58struct pinned_obj_table prog_table;
59struct pinned_obj_table map_table; 59struct pinned_obj_table map_table;
60 60
61static void __noreturn clean_and_exit(int i)
62{
63 if (json_output)
64 jsonw_destroy(&json_wtr);
65
66 exit(i);
67}
68
61void usage(void) 69void usage(void)
62{ 70{
63 last_do_help(last_argc - 1, last_argv + 1); 71 last_do_help(last_argc - 1, last_argv + 1);
64 72
65 exit(-1); 73 clean_and_exit(-1);
66} 74}
67 75
68static int do_help(int argc, char **argv) 76static int do_help(int argc, char **argv)
@@ -280,6 +288,7 @@ int main(int argc, char **argv)
280 hash_init(prog_table.table); 288 hash_init(prog_table.table);
281 hash_init(map_table.table); 289 hash_init(map_table.table);
282 290
291 opterr = 0;
283 while ((opt = getopt_long(argc, argv, "Vhpjf", 292 while ((opt = getopt_long(argc, argv, "Vhpjf",
284 options, NULL)) >= 0) { 293 options, NULL)) >= 0) {
285 switch (opt) { 294 switch (opt) {
@@ -291,13 +300,25 @@ int main(int argc, char **argv)
291 pretty_output = true; 300 pretty_output = true;
292 /* fall through */ 301 /* fall through */
293 case 'j': 302 case 'j':
294 json_output = true; 303 if (!json_output) {
304 json_wtr = jsonw_new(stdout);
305 if (!json_wtr) {
306 p_err("failed to create JSON writer");
307 return -1;
308 }
309 json_output = true;
310 }
311 jsonw_pretty(json_wtr, pretty_output);
295 break; 312 break;
296 case 'f': 313 case 'f':
297 show_pinned = true; 314 show_pinned = true;
298 break; 315 break;
299 default: 316 default:
300 usage(); 317 p_err("unrecognized option '%s'", argv[optind - 1]);
318 if (json_output)
319 clean_and_exit(-1);
320 else
321 usage();
301 } 322 }
302 } 323 }
303 324
@@ -306,15 +327,6 @@ int main(int argc, char **argv)
306 if (argc < 0) 327 if (argc < 0)
307 usage(); 328 usage();
308 329
309 if (json_output) {
310 json_wtr = jsonw_new(stdout);
311 if (!json_wtr) {
312 p_err("failed to create JSON writer");
313 return -1;
314 }
315 jsonw_pretty(json_wtr, pretty_output);
316 }
317
318 bfd_init(); 330 bfd_init();
319 331
320 ret = cmd_select(cmds, argc, argv, do_help); 332 ret = cmd_select(cmds, argc, argv, do_help);
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h
index 9c191e222d6f..bff330b49791 100644
--- a/tools/bpf/bpftool/main.h
+++ b/tools/bpf/bpftool/main.h
@@ -41,6 +41,7 @@
41#include <stdbool.h> 41#include <stdbool.h>
42#include <stdio.h> 42#include <stdio.h>
43#include <linux/bpf.h> 43#include <linux/bpf.h>
44#include <linux/compiler.h>
44#include <linux/kernel.h> 45#include <linux/kernel.h>
45#include <linux/hashtable.h> 46#include <linux/hashtable.h>
46 47
@@ -50,7 +51,7 @@
50 51
51#define NEXT_ARG() ({ argc--; argv++; if (argc < 0) usage(); }) 52#define NEXT_ARG() ({ argc--; argv++; if (argc < 0) usage(); })
52#define NEXT_ARGP() ({ (*argc)--; (*argv)++; if (*argc < 0) usage(); }) 53#define NEXT_ARGP() ({ (*argc)--; (*argv)++; if (*argc < 0) usage(); })
53#define BAD_ARG() ({ p_err("what is '%s'?\n", *argv); -1; }) 54#define BAD_ARG() ({ p_err("what is '%s'?", *argv); -1; })
54 55
55#define ERR_MAX_LEN 1024 56#define ERR_MAX_LEN 1024
56 57
@@ -80,7 +81,7 @@ void p_info(const char *fmt, ...);
80 81
81bool is_prefix(const char *pfx, const char *str); 82bool is_prefix(const char *pfx, const char *str);
82void fprint_hex(FILE *f, void *arg, unsigned int n, const char *sep); 83void fprint_hex(FILE *f, void *arg, unsigned int n, const char *sep);
83void usage(void) __attribute__((noreturn)); 84void usage(void) __noreturn;
84 85
85struct pinned_obj_table { 86struct pinned_obj_table {
86 DECLARE_HASHTABLE(table, 16); 87 DECLARE_HASHTABLE(table, 16);
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index eaa3bec273c8..4c99c57736ce 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -193,11 +193,14 @@ static void kvp_update_mem_state(int pool)
193 for (;;) { 193 for (;;) {
194 readp = &record[records_read]; 194 readp = &record[records_read];
195 records_read += fread(readp, sizeof(struct kvp_record), 195 records_read += fread(readp, sizeof(struct kvp_record),
196 ENTRIES_PER_BLOCK * num_blocks, 196 ENTRIES_PER_BLOCK * num_blocks - records_read,
197 filep); 197 filep);
198 198
199 if (ferror(filep)) { 199 if (ferror(filep)) {
200 syslog(LOG_ERR, "Failed to read file, pool: %d", pool); 200 syslog(LOG_ERR,
201 "Failed to read file, pool: %d; error: %d %s",
202 pool, errno, strerror(errno));
203 kvp_release_lock(pool);
201 exit(EXIT_FAILURE); 204 exit(EXIT_FAILURE);
202 } 205 }
203 206
@@ -210,6 +213,7 @@ static void kvp_update_mem_state(int pool)
210 213
211 if (record == NULL) { 214 if (record == NULL) {
212 syslog(LOG_ERR, "malloc failed"); 215 syslog(LOG_ERR, "malloc failed");
216 kvp_release_lock(pool);
213 exit(EXIT_FAILURE); 217 exit(EXIT_FAILURE);
214 } 218 }
215 continue; 219 continue;
@@ -224,15 +228,11 @@ static void kvp_update_mem_state(int pool)
224 fclose(filep); 228 fclose(filep);
225 kvp_release_lock(pool); 229 kvp_release_lock(pool);
226} 230}
231
227static int kvp_file_init(void) 232static int kvp_file_init(void)
228{ 233{
229 int fd; 234 int fd;
230 FILE *filep;
231 size_t records_read;
232 char *fname; 235 char *fname;
233 struct kvp_record *record;
234 struct kvp_record *readp;
235 int num_blocks;
236 int i; 236 int i;
237 int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; 237 int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
238 238
@@ -246,61 +246,19 @@ static int kvp_file_init(void)
246 246
247 for (i = 0; i < KVP_POOL_COUNT; i++) { 247 for (i = 0; i < KVP_POOL_COUNT; i++) {
248 fname = kvp_file_info[i].fname; 248 fname = kvp_file_info[i].fname;
249 records_read = 0;
250 num_blocks = 1;
251 sprintf(fname, "%s/.kvp_pool_%d", KVP_CONFIG_LOC, i); 249 sprintf(fname, "%s/.kvp_pool_%d", KVP_CONFIG_LOC, i);
252 fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */); 250 fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */);
253 251
254 if (fd == -1) 252 if (fd == -1)
255 return 1; 253 return 1;
256 254
257
258 filep = fopen(fname, "re");
259 if (!filep) {
260 close(fd);
261 return 1;
262 }
263
264 record = malloc(alloc_unit * num_blocks);
265 if (record == NULL) {
266 fclose(filep);
267 close(fd);
268 return 1;
269 }
270 for (;;) {
271 readp = &record[records_read];
272 records_read += fread(readp, sizeof(struct kvp_record),
273 ENTRIES_PER_BLOCK,
274 filep);
275
276 if (ferror(filep)) {
277 syslog(LOG_ERR, "Failed to read file, pool: %d",
278 i);
279 exit(EXIT_FAILURE);
280 }
281
282 if (!feof(filep)) {
283 /*
284 * We have more data to read.
285 */
286 num_blocks++;
287 record = realloc(record, alloc_unit *
288 num_blocks);
289 if (record == NULL) {
290 fclose(filep);
291 close(fd);
292 return 1;
293 }
294 continue;
295 }
296 break;
297 }
298 kvp_file_info[i].fd = fd; 255 kvp_file_info[i].fd = fd;
299 kvp_file_info[i].num_blocks = num_blocks; 256 kvp_file_info[i].num_blocks = 1;
300 kvp_file_info[i].records = record; 257 kvp_file_info[i].records = malloc(alloc_unit);
301 kvp_file_info[i].num_records = records_read; 258 if (kvp_file_info[i].records == NULL)
302 fclose(filep); 259 return 1;
303 260 kvp_file_info[i].num_records = 0;
261 kvp_update_mem_state(i);
304 } 262 }
305 263
306 return 0; 264 return 0;
diff --git a/tools/include/linux/kmemcheck.h b/tools/include/linux/kmemcheck.h
deleted file mode 100644
index ea32a7d3cf1b..000000000000
--- a/tools/include/linux/kmemcheck.h
+++ /dev/null
@@ -1 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 */
diff --git a/tools/include/uapi/asm-generic/bpf_perf_event.h b/tools/include/uapi/asm-generic/bpf_perf_event.h
new file mode 100644
index 000000000000..53815d2cd047
--- /dev/null
+++ b/tools/include/uapi/asm-generic/bpf_perf_event.h
@@ -0,0 +1,9 @@
1#ifndef _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__
2#define _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__
3
4#include <linux/ptrace.h>
5
6/* Export kernel pt_regs structure */
7typedef struct pt_regs bpf_user_pt_regs_t;
8
9#endif /* _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__ */
diff --git a/tools/include/uapi/asm-generic/mman.h b/tools/include/uapi/asm-generic/mman.h
index 2dffcbf705b3..653687d9771b 100644
--- a/tools/include/uapi/asm-generic/mman.h
+++ b/tools/include/uapi/asm-generic/mman.h
@@ -13,6 +13,7 @@
13#define MAP_NONBLOCK 0x10000 /* do not block on IO */ 13#define MAP_NONBLOCK 0x10000 /* do not block on IO */
14#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ 14#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
15#define MAP_HUGETLB 0x40000 /* create a huge page mapping */ 15#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
16#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */
16 17
17/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ 18/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */
18 19
diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h
index 97677cd6964d..6fdff5945c8a 100644
--- a/tools/include/uapi/drm/drm.h
+++ b/tools/include/uapi/drm/drm.h
@@ -737,6 +737,28 @@ struct drm_syncobj_array {
737 __u32 pad; 737 __u32 pad;
738}; 738};
739 739
740/* Query current scanout sequence number */
741struct drm_crtc_get_sequence {
742 __u32 crtc_id; /* requested crtc_id */
743 __u32 active; /* return: crtc output is active */
744 __u64 sequence; /* return: most recent vblank sequence */
745 __s64 sequence_ns; /* return: most recent time of first pixel out */
746};
747
748/* Queue event to be delivered at specified sequence. Time stamp marks
749 * when the first pixel of the refresh cycle leaves the display engine
750 * for the display
751 */
752#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 /* sequence is relative to current */
753#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 /* Use next sequence if we've missed */
754
755struct drm_crtc_queue_sequence {
756 __u32 crtc_id;
757 __u32 flags;
758 __u64 sequence; /* on input, target sequence. on output, actual sequence */
759 __u64 user_data; /* user data passed to event */
760};
761
740#if defined(__cplusplus) 762#if defined(__cplusplus)
741} 763}
742#endif 764#endif
@@ -819,6 +841,9 @@ extern "C" {
819 841
820#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) 842#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
821 843
844#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence)
845#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence)
846
822#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) 847#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
823 848
824#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) 849#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
@@ -863,6 +888,11 @@ extern "C" {
863#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) 888#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array)
864#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) 889#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array)
865 890
891#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease)
892#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees)
893#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)
894#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
895
866/** 896/**
867 * Device specific ioctls should only be in their respective headers 897 * Device specific ioctls should only be in their respective headers
868 * The device specific ioctl range is from 0x40 to 0x9f. 898 * The device specific ioctl range is from 0x40 to 0x9f.
@@ -893,6 +923,7 @@ struct drm_event {
893 923
894#define DRM_EVENT_VBLANK 0x01 924#define DRM_EVENT_VBLANK 0x01
895#define DRM_EVENT_FLIP_COMPLETE 0x02 925#define DRM_EVENT_FLIP_COMPLETE 0x02
926#define DRM_EVENT_CRTC_SEQUENCE 0x03
896 927
897struct drm_event_vblank { 928struct drm_event_vblank {
898 struct drm_event base; 929 struct drm_event base;
@@ -903,6 +934,16 @@ struct drm_event_vblank {
903 __u32 crtc_id; /* 0 on older kernels that do not support this */ 934 __u32 crtc_id; /* 0 on older kernels that do not support this */
904}; 935};
905 936
937/* Event delivered at sequence. Time stamp marks when the first pixel
938 * of the refresh cycle leaves the display engine for the display
939 */
940struct drm_event_crtc_sequence {
941 struct drm_event base;
942 __u64 user_data;
943 __s64 time_ns;
944 __u64 sequence;
945};
946
906/* typedef area */ 947/* typedef area */
907#ifndef __KERNEL__ 948#ifndef __KERNEL__
908typedef struct drm_clip_rect drm_clip_rect_t; 949typedef struct drm_clip_rect drm_clip_rect_t;
diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h
index 9816590d3ad2..ac3c6503ca27 100644
--- a/tools/include/uapi/drm/i915_drm.h
+++ b/tools/include/uapi/drm/i915_drm.h
@@ -397,10 +397,20 @@ typedef struct drm_i915_irq_wait {
397#define I915_PARAM_MIN_EU_IN_POOL 39 397#define I915_PARAM_MIN_EU_IN_POOL 39
398#define I915_PARAM_MMAP_GTT_VERSION 40 398#define I915_PARAM_MMAP_GTT_VERSION 40
399 399
400/* Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution 400/*
401 * Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution
401 * priorities and the driver will attempt to execute batches in priority order. 402 * priorities and the driver will attempt to execute batches in priority order.
403 * The param returns a capability bitmask, nonzero implies that the scheduler
404 * is enabled, with different features present according to the mask.
405 *
406 * The initial priority for each batch is supplied by the context and is
407 * controlled via I915_CONTEXT_PARAM_PRIORITY.
402 */ 408 */
403#define I915_PARAM_HAS_SCHEDULER 41 409#define I915_PARAM_HAS_SCHEDULER 41
410#define I915_SCHEDULER_CAP_ENABLED (1ul << 0)
411#define I915_SCHEDULER_CAP_PRIORITY (1ul << 1)
412#define I915_SCHEDULER_CAP_PREEMPTION (1ul << 2)
413
404#define I915_PARAM_HUC_STATUS 42 414#define I915_PARAM_HUC_STATUS 42
405 415
406/* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to opt-out of 416/* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to opt-out of
@@ -1309,14 +1319,16 @@ struct drm_i915_reg_read {
1309 * be specified 1319 * be specified
1310 */ 1320 */
1311 __u64 offset; 1321 __u64 offset;
1322#define I915_REG_READ_8B_WA (1ul << 0)
1323
1312 __u64 val; /* Return value */ 1324 __u64 val; /* Return value */
1313}; 1325};
1314/* Known registers: 1326/* Known registers:
1315 * 1327 *
1316 * Render engine timestamp - 0x2358 + 64bit - gen7+ 1328 * Render engine timestamp - 0x2358 + 64bit - gen7+
1317 * - Note this register returns an invalid value if using the default 1329 * - Note this register returns an invalid value if using the default
1318 * single instruction 8byte read, in order to workaround that use 1330 * single instruction 8byte read, in order to workaround that pass
1319 * offset (0x2538 | 1) instead. 1331 * flag I915_REG_READ_8B_WA in offset field.
1320 * 1332 *
1321 */ 1333 */
1322 1334
@@ -1359,6 +1371,10 @@ struct drm_i915_gem_context_param {
1359#define I915_CONTEXT_PARAM_GTT_SIZE 0x3 1371#define I915_CONTEXT_PARAM_GTT_SIZE 0x3
1360#define I915_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4 1372#define I915_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4
1361#define I915_CONTEXT_PARAM_BANNABLE 0x5 1373#define I915_CONTEXT_PARAM_BANNABLE 0x5
1374#define I915_CONTEXT_PARAM_PRIORITY 0x6
1375#define I915_CONTEXT_MAX_USER_PRIORITY 1023 /* inclusive */
1376#define I915_CONTEXT_DEFAULT_PRIORITY 0
1377#define I915_CONTEXT_MIN_USER_PRIORITY -1023 /* inclusive */
1362 __u64 value; 1378 __u64 value;
1363}; 1379};
1364 1380
@@ -1510,9 +1526,14 @@ struct drm_i915_perf_oa_config {
1510 __u32 n_boolean_regs; 1526 __u32 n_boolean_regs;
1511 __u32 n_flex_regs; 1527 __u32 n_flex_regs;
1512 1528
1513 __u64 __user mux_regs_ptr; 1529 /*
1514 __u64 __user boolean_regs_ptr; 1530 * These fields are pointers to tuples of u32 values (register
1515 __u64 __user flex_regs_ptr; 1531 * address, value). For example the expected length of the buffer
1532 * pointed by mux_regs_ptr is (2 * sizeof(u32) * n_mux_regs).
1533 */
1534 __u64 mux_regs_ptr;
1535 __u64 boolean_regs_ptr;
1536 __u64 flex_regs_ptr;
1516}; 1537};
1517 1538
1518#if defined(__cplusplus) 1539#if defined(__cplusplus)
diff --git a/tools/include/uapi/linux/bpf_perf_event.h b/tools/include/uapi/linux/bpf_perf_event.h
index 067427259820..8f95303f9d80 100644
--- a/tools/include/uapi/linux/bpf_perf_event.h
+++ b/tools/include/uapi/linux/bpf_perf_event.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1/* Copyright (c) 2016 Facebook 2/* Copyright (c) 2016 Facebook
2 * 3 *
3 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
@@ -7,11 +8,10 @@
7#ifndef _UAPI__LINUX_BPF_PERF_EVENT_H__ 8#ifndef _UAPI__LINUX_BPF_PERF_EVENT_H__
8#define _UAPI__LINUX_BPF_PERF_EVENT_H__ 9#define _UAPI__LINUX_BPF_PERF_EVENT_H__
9 10
10#include <linux/types.h> 11#include <asm/bpf_perf_event.h>
11#include <linux/ptrace.h>
12 12
13struct bpf_perf_event_data { 13struct bpf_perf_event_data {
14 struct pt_regs regs; 14 bpf_user_pt_regs_t regs;
15 __u64 sample_period; 15 __u64 sample_period;
16}; 16};
17 17
diff --git a/tools/include/uapi/linux/kcmp.h b/tools/include/uapi/linux/kcmp.h
index 481e103da78e..ef1305010925 100644
--- a/tools/include/uapi/linux/kcmp.h
+++ b/tools/include/uapi/linux/kcmp.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _UAPI_LINUX_KCMP_H 2#ifndef _UAPI_LINUX_KCMP_H
2#define _UAPI_LINUX_KCMP_H 3#define _UAPI_LINUX_KCMP_H
3 4
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 7e99999d6236..282d7613fce8 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -931,6 +931,7 @@ struct kvm_ppc_resize_hpt {
931#define KVM_CAP_PPC_SMT_POSSIBLE 147 931#define KVM_CAP_PPC_SMT_POSSIBLE 147
932#define KVM_CAP_HYPERV_SYNIC2 148 932#define KVM_CAP_HYPERV_SYNIC2 148
933#define KVM_CAP_HYPERV_VP_INDEX 149 933#define KVM_CAP_HYPERV_VP_INDEX 149
934#define KVM_CAP_S390_AIS_MIGRATION 150
934 935
935#ifdef KVM_CAP_IRQ_ROUTING 936#ifdef KVM_CAP_IRQ_ROUTING
936 937
diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index 362493a2f950..b9a4953018ed 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -942,6 +942,7 @@ enum perf_callchain_context {
942#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */ 942#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */
943#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */ 943#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */
944#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */ 944#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */
945#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */
945 946
946#define PERF_FLAG_FD_NO_GROUP (1UL << 0) 947#define PERF_FLAG_FD_NO_GROUP (1UL << 0)
947#define PERF_FLAG_FD_OUTPUT (1UL << 1) 948#define PERF_FLAG_FD_OUTPUT (1UL << 1)
diff --git a/tools/include/uapi/linux/prctl.h b/tools/include/uapi/linux/prctl.h
index a8d0759a9e40..af5f8c2df87a 100644
--- a/tools/include/uapi/linux/prctl.h
+++ b/tools/include/uapi/linux/prctl.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1#ifndef _LINUX_PRCTL_H 2#ifndef _LINUX_PRCTL_H
2#define _LINUX_PRCTL_H 3#define _LINUX_PRCTL_H
3 4
@@ -197,4 +198,13 @@ struct prctl_mm_map {
197# define PR_CAP_AMBIENT_LOWER 3 198# define PR_CAP_AMBIENT_LOWER 3
198# define PR_CAP_AMBIENT_CLEAR_ALL 4 199# define PR_CAP_AMBIENT_CLEAR_ALL 4
199 200
201/* arm64 Scalable Vector Extension controls */
202/* Flag values must be kept in sync with ptrace NT_ARM_SVE interface */
203#define PR_SVE_SET_VL 50 /* set task vector length */
204# define PR_SVE_SET_VL_ONEXEC (1 << 18) /* defer effect until exec */
205#define PR_SVE_GET_VL 51 /* get task vector length */
206/* Bits common to PR_SVE_SET_VL and PR_SVE_GET_VL */
207# define PR_SVE_VL_LEN_MASK 0xffff
208# define PR_SVE_VL_INHERIT (1 << 17) /* inherit across exec */
209
200#endif /* _LINUX_PRCTL_H */ 210#endif /* _LINUX_PRCTL_H */
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 0f94af3ccaaa..ae0272f9a091 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -7,9 +7,11 @@ ARCH := x86
7endif 7endif
8 8
9# always use the host compiler 9# always use the host compiler
10CC = gcc 10HOSTCC ?= gcc
11LD = ld 11HOSTLD ?= ld
12AR = ar 12CC = $(HOSTCC)
13LD = $(HOSTLD)
14AR = ar
13 15
14ifeq ($(srctree),) 16ifeq ($(srctree),)
15srctree := $(patsubst %/,%,$(dir $(CURDIR))) 17srctree := $(patsubst %/,%,$(dir $(CURDIR)))
diff --git a/tools/objtool/orc_dump.c b/tools/objtool/orc_dump.c
index 36c5bf6a2675..c3343820916a 100644
--- a/tools/objtool/orc_dump.c
+++ b/tools/objtool/orc_dump.c
@@ -76,7 +76,8 @@ int orc_dump(const char *_objname)
76 int fd, nr_entries, i, *orc_ip = NULL, orc_size = 0; 76 int fd, nr_entries, i, *orc_ip = NULL, orc_size = 0;
77 struct orc_entry *orc = NULL; 77 struct orc_entry *orc = NULL;
78 char *name; 78 char *name;
79 unsigned long nr_sections, orc_ip_addr = 0; 79 size_t nr_sections;
80 Elf64_Addr orc_ip_addr = 0;
80 size_t shstrtab_idx; 81 size_t shstrtab_idx;
81 Elf *elf; 82 Elf *elf;
82 Elf_Scn *scn; 83 Elf_Scn *scn;
@@ -187,10 +188,10 @@ int orc_dump(const char *_objname)
187 return -1; 188 return -1;
188 } 189 }
189 190
190 printf("%s+%lx:", name, rela.r_addend); 191 printf("%s+%llx:", name, (unsigned long long)rela.r_addend);
191 192
192 } else { 193 } else {
193 printf("%lx:", orc_ip_addr + (i * sizeof(int)) + orc_ip[i]); 194 printf("%llx:", (unsigned long long)(orc_ip_addr + (i * sizeof(int)) + orc_ip[i]));
194 } 195 }
195 196
196 197
diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile
index 21322e0385b8..09ba923debe8 100644
--- a/tools/perf/arch/s390/Makefile
+++ b/tools/perf/arch/s390/Makefile
@@ -2,3 +2,4 @@ ifndef NO_DWARF
2PERF_HAVE_DWARF_REGS := 1 2PERF_HAVE_DWARF_REGS := 1
3endif 3endif
4HAVE_KVM_STAT_SUPPORT := 1 4HAVE_KVM_STAT_SUPPORT := 1
5PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
diff --git a/tools/perf/arch/s390/util/dwarf-regs.c b/tools/perf/arch/s390/util/dwarf-regs.c
index f47576ce13ea..a8ace5cc6301 100644
--- a/tools/perf/arch/s390/util/dwarf-regs.c
+++ b/tools/perf/arch/s390/util/dwarf-regs.c
@@ -2,17 +2,43 @@
2/* 2/*
3 * Mapping of DWARF debug register numbers into register names. 3 * Mapping of DWARF debug register numbers into register names.
4 * 4 *
5 * Copyright IBM Corp. 2010 5 * Copyright IBM Corp. 2010, 2017
6 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>, 6 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
7 * Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
7 * 8 *
8 */ 9 */
9 10
11#include <errno.h>
10#include <stddef.h> 12#include <stddef.h>
11#include <dwarf-regs.h> 13#include <stdlib.h>
12#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <asm/ptrace.h>
16#include <string.h>
17#include <dwarf-regs.h>
13#include "dwarf-regs-table.h" 18#include "dwarf-regs-table.h"
14 19
15const char *get_arch_regstr(unsigned int n) 20const char *get_arch_regstr(unsigned int n)
16{ 21{
17 return (n >= ARRAY_SIZE(s390_dwarf_regs)) ? NULL : s390_dwarf_regs[n]; 22 return (n >= ARRAY_SIZE(s390_dwarf_regs)) ? NULL : s390_dwarf_regs[n];
18} 23}
24
25/*
26 * Convert the register name into an offset to struct pt_regs (kernel).
27 * This is required by the BPF prologue generator. The BPF
28 * program is called in the BPF overflow handler in the perf
29 * core.
30 */
31int regs_query_register_offset(const char *name)
32{
33 unsigned long gpr;
34
35 if (!name || strncmp(name, "%r", 2))
36 return -EINVAL;
37
38 errno = 0;
39 gpr = strtoul(name + 2, NULL, 10);
40 if (errno || gpr >= 16)
41 return -EINVAL;
42
43 return offsetof(user_pt_regs, gprs) + 8 * gpr;
44}
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index d95fdcc26f4b..944070e98a2c 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -216,6 +216,47 @@ static const char * const numa_usage[] = {
216 NULL 216 NULL
217}; 217};
218 218
219/*
220 * To get number of numa nodes present.
221 */
222static int nr_numa_nodes(void)
223{
224 int i, nr_nodes = 0;
225
226 for (i = 0; i < g->p.nr_nodes; i++) {
227 if (numa_bitmask_isbitset(numa_nodes_ptr, i))
228 nr_nodes++;
229 }
230
231 return nr_nodes;
232}
233
234/*
235 * To check if given numa node is present.
236 */
237static int is_node_present(int node)
238{
239 return numa_bitmask_isbitset(numa_nodes_ptr, node);
240}
241
242/*
243 * To check given numa node has cpus.
244 */
245static bool node_has_cpus(int node)
246{
247 struct bitmask *cpu = numa_allocate_cpumask();
248 unsigned int i;
249
250 if (cpu && !numa_node_to_cpus(node, cpu)) {
251 for (i = 0; i < cpu->size; i++) {
252 if (numa_bitmask_isbitset(cpu, i))
253 return true;
254 }
255 }
256
257 return false; /* lets fall back to nocpus safely */
258}
259
219static cpu_set_t bind_to_cpu(int target_cpu) 260static cpu_set_t bind_to_cpu(int target_cpu)
220{ 261{
221 cpu_set_t orig_mask, mask; 262 cpu_set_t orig_mask, mask;
@@ -244,12 +285,12 @@ static cpu_set_t bind_to_cpu(int target_cpu)
244 285
245static cpu_set_t bind_to_node(int target_node) 286static cpu_set_t bind_to_node(int target_node)
246{ 287{
247 int cpus_per_node = g->p.nr_cpus/g->p.nr_nodes; 288 int cpus_per_node = g->p.nr_cpus / nr_numa_nodes();
248 cpu_set_t orig_mask, mask; 289 cpu_set_t orig_mask, mask;
249 int cpu; 290 int cpu;
250 int ret; 291 int ret;
251 292
252 BUG_ON(cpus_per_node*g->p.nr_nodes != g->p.nr_cpus); 293 BUG_ON(cpus_per_node * nr_numa_nodes() != g->p.nr_cpus);
253 BUG_ON(!cpus_per_node); 294 BUG_ON(!cpus_per_node);
254 295
255 ret = sched_getaffinity(0, sizeof(orig_mask), &orig_mask); 296 ret = sched_getaffinity(0, sizeof(orig_mask), &orig_mask);
@@ -649,7 +690,7 @@ static int parse_setup_node_list(void)
649 int i; 690 int i;
650 691
651 for (i = 0; i < mul; i++) { 692 for (i = 0; i < mul; i++) {
652 if (t >= g->p.nr_tasks) { 693 if (t >= g->p.nr_tasks || !node_has_cpus(bind_node)) {
653 printf("\n# NOTE: ignoring bind NODEs starting at NODE#%d\n", bind_node); 694 printf("\n# NOTE: ignoring bind NODEs starting at NODE#%d\n", bind_node);
654 goto out; 695 goto out;
655 } 696 }
@@ -964,6 +1005,8 @@ static void calc_convergence(double runtime_ns_max, double *convergence)
964 sum = 0; 1005 sum = 0;
965 1006
966 for (node = 0; node < g->p.nr_nodes; node++) { 1007 for (node = 0; node < g->p.nr_nodes; node++) {
1008 if (!is_node_present(node))
1009 continue;
967 nr = nodes[node]; 1010 nr = nodes[node];
968 nr_min = min(nr, nr_min); 1011 nr_min = min(nr, nr_min);
969 nr_max = max(nr, nr_max); 1012 nr_max = max(nr, nr_max);
@@ -984,8 +1027,11 @@ static void calc_convergence(double runtime_ns_max, double *convergence)
984 process_groups = 0; 1027 process_groups = 0;
985 1028
986 for (node = 0; node < g->p.nr_nodes; node++) { 1029 for (node = 0; node < g->p.nr_nodes; node++) {
987 int processes = count_node_processes(node); 1030 int processes;
988 1031
1032 if (!is_node_present(node))
1033 continue;
1034 processes = count_node_processes(node);
989 nr = nodes[node]; 1035 nr = nodes[node];
990 tprintf(" %2d/%-2d", nr, processes); 1036 tprintf(" %2d/%-2d", nr, processes);
991 1037
@@ -1291,7 +1337,7 @@ static void print_summary(void)
1291 1337
1292 printf("\n ###\n"); 1338 printf("\n ###\n");
1293 printf(" # %d %s will execute (on %d nodes, %d CPUs):\n", 1339 printf(" # %d %s will execute (on %d nodes, %d CPUs):\n",
1294 g->p.nr_tasks, g->p.nr_tasks == 1 ? "task" : "tasks", g->p.nr_nodes, g->p.nr_cpus); 1340 g->p.nr_tasks, g->p.nr_tasks == 1 ? "task" : "tasks", nr_numa_nodes(), g->p.nr_cpus);
1295 printf(" # %5dx %5ldMB global shared mem operations\n", 1341 printf(" # %5dx %5ldMB global shared mem operations\n",
1296 g->p.nr_loops, g->p.bytes_global/1024/1024); 1342 g->p.nr_loops, g->p.bytes_global/1024/1024);
1297 printf(" # %5dx %5ldMB process shared mem operations\n", 1343 printf(" # %5dx %5ldMB process shared mem operations\n",
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index bd1fedef3d1c..a0f7ed2b869b 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -284,7 +284,7 @@ static int perf_help_config(const char *var, const char *value, void *cb)
284 add_man_viewer(value); 284 add_man_viewer(value);
285 return 0; 285 return 0;
286 } 286 }
287 if (!strstarts(var, "man.")) 287 if (strstarts(var, "man."))
288 return add_man_viewer_info(var, value); 288 return add_man_viewer_info(var, value);
289 289
290 return 0; 290 return 0;
@@ -314,7 +314,7 @@ static const char *cmd_to_page(const char *perf_cmd)
314 314
315 if (!perf_cmd) 315 if (!perf_cmd)
316 return "perf"; 316 return "perf";
317 else if (!strstarts(perf_cmd, "perf")) 317 else if (strstarts(perf_cmd, "perf"))
318 return perf_cmd; 318 return perf_cmd;
319 319
320 return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s; 320 return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s;
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3d7f33e19df2..003255910c05 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -339,6 +339,22 @@ static int record__open(struct record *rec)
339 struct perf_evsel_config_term *err_term; 339 struct perf_evsel_config_term *err_term;
340 int rc = 0; 340 int rc = 0;
341 341
342 /*
343 * For initial_delay we need to add a dummy event so that we can track
344 * PERF_RECORD_MMAP while we wait for the initial delay to enable the
345 * real events, the ones asked by the user.
346 */
347 if (opts->initial_delay) {
348 if (perf_evlist__add_dummy(evlist))
349 return -ENOMEM;
350
351 pos = perf_evlist__first(evlist);
352 pos->tracking = 0;
353 pos = perf_evlist__last(evlist);
354 pos->tracking = 1;
355 pos->attr.enable_on_exec = 1;
356 }
357
342 perf_evlist__config(evlist, opts, &callchain_param); 358 perf_evlist__config(evlist, opts, &callchain_param);
343 359
344 evlist__for_each_entry(evlist, pos) { 360 evlist__for_each_entry(evlist, pos) {
@@ -749,17 +765,19 @@ static int record__synthesize(struct record *rec, bool tail)
749 goto out; 765 goto out;
750 } 766 }
751 767
752 err = perf_event__synthesize_kernel_mmap(tool, process_synthesized_event, 768 if (!perf_evlist__exclude_kernel(rec->evlist)) {
753 machine); 769 err = perf_event__synthesize_kernel_mmap(tool, process_synthesized_event,
754 WARN_ONCE(err < 0, "Couldn't record kernel reference relocation symbol\n" 770 machine);
755 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n" 771 WARN_ONCE(err < 0, "Couldn't record kernel reference relocation symbol\n"
756 "Check /proc/kallsyms permission or run as root.\n"); 772 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n"
757 773 "Check /proc/kallsyms permission or run as root.\n");
758 err = perf_event__synthesize_modules(tool, process_synthesized_event, 774
759 machine); 775 err = perf_event__synthesize_modules(tool, process_synthesized_event,
760 WARN_ONCE(err < 0, "Couldn't record kernel module information.\n" 776 machine);
761 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n" 777 WARN_ONCE(err < 0, "Couldn't record kernel module information.\n"
762 "Check /proc/modules permission or run as root.\n"); 778 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n"
779 "Check /proc/modules permission or run as root.\n");
780 }
763 781
764 if (perf_guest) { 782 if (perf_guest) {
765 machines__process_guests(&session->machines, 783 machines__process_guests(&session->machines,
@@ -1693,7 +1711,7 @@ int cmd_record(int argc, const char **argv)
1693 1711
1694 err = -ENOMEM; 1712 err = -ENOMEM;
1695 1713
1696 if (symbol_conf.kptr_restrict) 1714 if (symbol_conf.kptr_restrict && !perf_evlist__exclude_kernel(rec->evlist))
1697 pr_warning( 1715 pr_warning(
1698"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n" 1716"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n"
1699"check /proc/sys/kernel/kptr_restrict.\n\n" 1717"check /proc/sys/kernel/kptr_restrict.\n\n"
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 1394cd8d96f7..af5dd038195e 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -441,6 +441,9 @@ static void report__warn_kptr_restrict(const struct report *rep)
441 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host); 441 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host);
442 struct kmap *kernel_kmap = kernel_map ? map__kmap(kernel_map) : NULL; 442 struct kmap *kernel_kmap = kernel_map ? map__kmap(kernel_map) : NULL;
443 443
444 if (perf_evlist__exclude_kernel(rep->session->evlist))
445 return;
446
444 if (kernel_map == NULL || 447 if (kernel_map == NULL ||
445 (kernel_map->dso->hit && 448 (kernel_map->dso->hit &&
446 (kernel_kmap->ref_reloc_sym == NULL || 449 (kernel_kmap->ref_reloc_sym == NULL ||
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 68f36dc0344f..9b43bda45a41 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1955,6 +1955,16 @@ static int perf_script__fopen_per_event_dump(struct perf_script *script)
1955 struct perf_evsel *evsel; 1955 struct perf_evsel *evsel;
1956 1956
1957 evlist__for_each_entry(script->session->evlist, evsel) { 1957 evlist__for_each_entry(script->session->evlist, evsel) {
1958 /*
1959 * Already setup? I.e. we may be called twice in cases like
1960 * Intel PT, one for the intel_pt// and dummy events, then
1961 * for the evsels syntheized from the auxtrace info.
1962 *
1963 * Ses perf_script__process_auxtrace_info.
1964 */
1965 if (evsel->priv != NULL)
1966 continue;
1967
1958 evsel->priv = perf_evsel_script__new(evsel, script->session->data); 1968 evsel->priv = perf_evsel_script__new(evsel, script->session->data);
1959 if (evsel->priv == NULL) 1969 if (evsel->priv == NULL)
1960 goto out_err_fclose; 1970 goto out_err_fclose;
@@ -2838,6 +2848,25 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
2838 return set_maps(script); 2848 return set_maps(script);
2839} 2849}
2840 2850
2851#ifdef HAVE_AUXTRACE_SUPPORT
2852static int perf_script__process_auxtrace_info(struct perf_tool *tool,
2853 union perf_event *event,
2854 struct perf_session *session)
2855{
2856 int ret = perf_event__process_auxtrace_info(tool, event, session);
2857
2858 if (ret == 0) {
2859 struct perf_script *script = container_of(tool, struct perf_script, tool);
2860
2861 ret = perf_script__setup_per_event_dump(script);
2862 }
2863
2864 return ret;
2865}
2866#else
2867#define perf_script__process_auxtrace_info 0
2868#endif
2869
2841int cmd_script(int argc, const char **argv) 2870int cmd_script(int argc, const char **argv)
2842{ 2871{
2843 bool show_full_info = false; 2872 bool show_full_info = false;
@@ -2866,7 +2895,7 @@ int cmd_script(int argc, const char **argv)
2866 .feature = perf_event__process_feature, 2895 .feature = perf_event__process_feature,
2867 .build_id = perf_event__process_build_id, 2896 .build_id = perf_event__process_build_id,
2868 .id_index = perf_event__process_id_index, 2897 .id_index = perf_event__process_id_index,
2869 .auxtrace_info = perf_event__process_auxtrace_info, 2898 .auxtrace_info = perf_script__process_auxtrace_info,
2870 .auxtrace = perf_event__process_auxtrace, 2899 .auxtrace = perf_event__process_auxtrace,
2871 .auxtrace_error = perf_event__process_auxtrace_error, 2900 .auxtrace_error = perf_event__process_auxtrace_error,
2872 .stat = perf_event__process_stat_event, 2901 .stat = perf_event__process_stat_event,
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 477a8699f0b5..9e0d2645ae13 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -77,6 +77,7 @@
77#include "sane_ctype.h" 77#include "sane_ctype.h"
78 78
79static volatile int done; 79static volatile int done;
80static volatile int resize;
80 81
81#define HEADER_LINE_NR 5 82#define HEADER_LINE_NR 5
82 83
@@ -85,11 +86,13 @@ static void perf_top__update_print_entries(struct perf_top *top)
85 top->print_entries = top->winsize.ws_row - HEADER_LINE_NR; 86 top->print_entries = top->winsize.ws_row - HEADER_LINE_NR;
86} 87}
87 88
88static void perf_top__sig_winch(int sig __maybe_unused, 89static void winch_sig(int sig __maybe_unused)
89 siginfo_t *info __maybe_unused, void *arg)
90{ 90{
91 struct perf_top *top = arg; 91 resize = 1;
92}
92 93
94static void perf_top__resize(struct perf_top *top)
95{
93 get_term_dimensions(&top->winsize); 96 get_term_dimensions(&top->winsize);
94 perf_top__update_print_entries(top); 97 perf_top__update_print_entries(top);
95} 98}
@@ -473,12 +476,8 @@ static bool perf_top__handle_keypress(struct perf_top *top, int c)
473 case 'e': 476 case 'e':
474 prompt_integer(&top->print_entries, "Enter display entries (lines)"); 477 prompt_integer(&top->print_entries, "Enter display entries (lines)");
475 if (top->print_entries == 0) { 478 if (top->print_entries == 0) {
476 struct sigaction act = { 479 perf_top__resize(top);
477 .sa_sigaction = perf_top__sig_winch, 480 signal(SIGWINCH, winch_sig);
478 .sa_flags = SA_SIGINFO,
479 };
480 perf_top__sig_winch(SIGWINCH, NULL, top);
481 sigaction(SIGWINCH, &act, NULL);
482 } else { 481 } else {
483 signal(SIGWINCH, SIG_DFL); 482 signal(SIGWINCH, SIG_DFL);
484 } 483 }
@@ -732,14 +731,16 @@ static void perf_event__process_sample(struct perf_tool *tool,
732 if (!machine->kptr_restrict_warned && 731 if (!machine->kptr_restrict_warned &&
733 symbol_conf.kptr_restrict && 732 symbol_conf.kptr_restrict &&
734 al.cpumode == PERF_RECORD_MISC_KERNEL) { 733 al.cpumode == PERF_RECORD_MISC_KERNEL) {
735 ui__warning( 734 if (!perf_evlist__exclude_kernel(top->session->evlist)) {
735 ui__warning(
736"Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n" 736"Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n"
737"Check /proc/sys/kernel/kptr_restrict.\n\n" 737"Check /proc/sys/kernel/kptr_restrict.\n\n"
738"Kernel%s samples will not be resolved.\n", 738"Kernel%s samples will not be resolved.\n",
739 al.map && !RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION]) ? 739 al.map && !RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION]) ?
740 " modules" : ""); 740 " modules" : "");
741 if (use_browser <= 0) 741 if (use_browser <= 0)
742 sleep(5); 742 sleep(5);
743 }
743 machine->kptr_restrict_warned = true; 744 machine->kptr_restrict_warned = true;
744 } 745 }
745 746
@@ -1030,6 +1031,11 @@ static int __cmd_top(struct perf_top *top)
1030 1031
1031 if (hits == top->samples) 1032 if (hits == top->samples)
1032 ret = perf_evlist__poll(top->evlist, 100); 1033 ret = perf_evlist__poll(top->evlist, 100);
1034
1035 if (resize) {
1036 perf_top__resize(top);
1037 resize = 0;
1038 }
1033 } 1039 }
1034 1040
1035 ret = 0; 1041 ret = 0;
@@ -1352,12 +1358,8 @@ int cmd_top(int argc, const char **argv)
1352 1358
1353 get_term_dimensions(&top.winsize); 1359 get_term_dimensions(&top.winsize);
1354 if (top.print_entries == 0) { 1360 if (top.print_entries == 0) {
1355 struct sigaction act = {
1356 .sa_sigaction = perf_top__sig_winch,
1357 .sa_flags = SA_SIGINFO,
1358 };
1359 perf_top__update_print_entries(&top); 1361 perf_top__update_print_entries(&top);
1360 sigaction(SIGWINCH, &act, NULL); 1362 signal(SIGWINCH, winch_sig);
1361 } 1363 }
1362 1364
1363 status = __cmd_top(&top); 1365 status = __cmd_top(&top);
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f2757d38c7d7..84debdbad327 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1152,12 +1152,14 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
1152 if (trace->host == NULL) 1152 if (trace->host == NULL)
1153 return -ENOMEM; 1153 return -ENOMEM;
1154 1154
1155 if (trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr) < 0) 1155 err = trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr);
1156 return -errno; 1156 if (err < 0)
1157 goto out;
1157 1158
1158 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target, 1159 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
1159 evlist->threads, trace__tool_process, false, 1160 evlist->threads, trace__tool_process, false,
1160 trace->opts.proc_map_timeout, 1); 1161 trace->opts.proc_map_timeout, 1);
1162out:
1161 if (err) 1163 if (err)
1162 symbol__exit(); 1164 symbol__exit();
1163 1165
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 77406d25e521..6db9d809fe97 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -30,6 +30,7 @@ arch/x86/include/uapi/asm/vmx.h
30arch/powerpc/include/uapi/asm/kvm.h 30arch/powerpc/include/uapi/asm/kvm.h
31arch/s390/include/uapi/asm/kvm.h 31arch/s390/include/uapi/asm/kvm.h
32arch/s390/include/uapi/asm/kvm_perf.h 32arch/s390/include/uapi/asm/kvm_perf.h
33arch/s390/include/uapi/asm/ptrace.h
33arch/s390/include/uapi/asm/sie.h 34arch/s390/include/uapi/asm/sie.h
34arch/arm/include/uapi/asm/kvm.h 35arch/arm/include/uapi/asm/kvm.h
35arch/arm64/include/uapi/asm/kvm.h 36arch/arm64/include/uapi/asm/kvm.h
diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
index 7a84d73324e3..8b3da21a08f1 100755
--- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
@@ -10,8 +10,8 @@
10 10
11. $(dirname $0)/lib/probe.sh 11. $(dirname $0)/lib/probe.sh
12 12
13ld=$(realpath /lib64/ld*.so.* | uniq) 13libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g')
14libc=$(echo $ld | sed 's/ld/libc/g') 14nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254
15 15
16trace_libc_inet_pton_backtrace() { 16trace_libc_inet_pton_backtrace() {
17 idx=0 17 idx=0
@@ -37,6 +37,9 @@ trace_libc_inet_pton_backtrace() {
37 done 37 done
38} 38}
39 39
40# Check for IPv6 interface existence
41ip a sh lo | fgrep -q inet6 || exit 2
42
40skip_if_no_perf_probe && \ 43skip_if_no_perf_probe && \
41perf probe -q $libc inet_pton && \ 44perf probe -q $libc inet_pton && \
42trace_libc_inet_pton_backtrace 45trace_libc_inet_pton_backtrace
diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
index 2e68c5f120da..2a9ef080efd0 100755
--- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
@@ -17,8 +17,10 @@ skip_if_no_perf_probe || exit 2
17file=$(mktemp /tmp/temporary_file.XXXXX) 17file=$(mktemp /tmp/temporary_file.XXXXX)
18 18
19trace_open_vfs_getname() { 19trace_open_vfs_getname() {
20 perf trace -e open touch $file 2>&1 | \ 20 test "$(uname -m)" = s390x && { svc="openat"; txt="dfd: +CWD, +"; }
21 egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open\(filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$" 21
22 perf trace -e ${svc:-open} touch $file 2>&1 | \
23 egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ ${svc:-open}\(${txt}filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$"
22} 24}
23 25
24 26
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index bc4a7344e274..89c8e1604ca7 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -84,7 +84,11 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
84 84
85 evsel = perf_evlist__first(evlist); 85 evsel = perf_evlist__first(evlist);
86 evsel->attr.task = 1; 86 evsel->attr.task = 1;
87#ifdef __s390x__
88 evsel->attr.sample_freq = 1000000;
89#else
87 evsel->attr.sample_freq = 1; 90 evsel->attr.sample_freq = 1;
91#endif
88 evsel->attr.inherit = 0; 92 evsel->attr.inherit = 0;
89 evsel->attr.watermark = 0; 93 evsel->attr.watermark = 0;
90 evsel->attr.wakeup_events = 1; 94 evsel->attr.wakeup_events = 1;
diff --git a/tools/perf/trace/beauty/mmap.c b/tools/perf/trace/beauty/mmap.c
index 9e1668b2c5d7..417e3ecfe9d7 100644
--- a/tools/perf/trace/beauty/mmap.c
+++ b/tools/perf/trace/beauty/mmap.c
@@ -62,6 +62,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size,
62 P_MMAP_FLAG(POPULATE); 62 P_MMAP_FLAG(POPULATE);
63 P_MMAP_FLAG(STACK); 63 P_MMAP_FLAG(STACK);
64 P_MMAP_FLAG(UNINITIALIZED); 64 P_MMAP_FLAG(UNINITIALIZED);
65#ifdef MAP_SYNC
66 P_MMAP_FLAG(SYNC);
67#endif
65#undef P_MMAP_FLAG 68#undef P_MMAP_FLAG
66 69
67 if (flags) 70 if (flags)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index da1c4c4a0dd8..3369c7830260 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -165,7 +165,7 @@ static void ins__delete(struct ins_operands *ops)
165static int ins__raw_scnprintf(struct ins *ins, char *bf, size_t size, 165static int ins__raw_scnprintf(struct ins *ins, char *bf, size_t size,
166 struct ins_operands *ops) 166 struct ins_operands *ops)
167{ 167{
168 return scnprintf(bf, size, "%-6.6s %s", ins->name, ops->raw); 168 return scnprintf(bf, size, "%-6s %s", ins->name, ops->raw);
169} 169}
170 170
171int ins__scnprintf(struct ins *ins, char *bf, size_t size, 171int ins__scnprintf(struct ins *ins, char *bf, size_t size,
@@ -230,12 +230,12 @@ static int call__scnprintf(struct ins *ins, char *bf, size_t size,
230 struct ins_operands *ops) 230 struct ins_operands *ops)
231{ 231{
232 if (ops->target.name) 232 if (ops->target.name)
233 return scnprintf(bf, size, "%-6.6s %s", ins->name, ops->target.name); 233 return scnprintf(bf, size, "%-6s %s", ins->name, ops->target.name);
234 234
235 if (ops->target.addr == 0) 235 if (ops->target.addr == 0)
236 return ins__raw_scnprintf(ins, bf, size, ops); 236 return ins__raw_scnprintf(ins, bf, size, ops);
237 237
238 return scnprintf(bf, size, "%-6.6s *%" PRIx64, ins->name, ops->target.addr); 238 return scnprintf(bf, size, "%-6s *%" PRIx64, ins->name, ops->target.addr);
239} 239}
240 240
241static struct ins_ops call_ops = { 241static struct ins_ops call_ops = {
@@ -299,7 +299,7 @@ static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
299 c++; 299 c++;
300 } 300 }
301 301
302 return scnprintf(bf, size, "%-6.6s %.*s%" PRIx64, 302 return scnprintf(bf, size, "%-6s %.*s%" PRIx64,
303 ins->name, c ? c - ops->raw : 0, ops->raw, 303 ins->name, c ? c - ops->raw : 0, ops->raw,
304 ops->target.offset); 304 ops->target.offset);
305} 305}
@@ -372,7 +372,7 @@ static int lock__scnprintf(struct ins *ins, char *bf, size_t size,
372 if (ops->locked.ins.ops == NULL) 372 if (ops->locked.ins.ops == NULL)
373 return ins__raw_scnprintf(ins, bf, size, ops); 373 return ins__raw_scnprintf(ins, bf, size, ops);
374 374
375 printed = scnprintf(bf, size, "%-6.6s ", ins->name); 375 printed = scnprintf(bf, size, "%-6s ", ins->name);
376 return printed + ins__scnprintf(&ops->locked.ins, bf + printed, 376 return printed + ins__scnprintf(&ops->locked.ins, bf + printed,
377 size - printed, ops->locked.ops); 377 size - printed, ops->locked.ops);
378} 378}
@@ -448,7 +448,7 @@ out_free_source:
448static int mov__scnprintf(struct ins *ins, char *bf, size_t size, 448static int mov__scnprintf(struct ins *ins, char *bf, size_t size,
449 struct ins_operands *ops) 449 struct ins_operands *ops)
450{ 450{
451 return scnprintf(bf, size, "%-6.6s %s,%s", ins->name, 451 return scnprintf(bf, size, "%-6s %s,%s", ins->name,
452 ops->source.name ?: ops->source.raw, 452 ops->source.name ?: ops->source.raw,
453 ops->target.name ?: ops->target.raw); 453 ops->target.name ?: ops->target.raw);
454} 454}
@@ -488,7 +488,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
488static int dec__scnprintf(struct ins *ins, char *bf, size_t size, 488static int dec__scnprintf(struct ins *ins, char *bf, size_t size,
489 struct ins_operands *ops) 489 struct ins_operands *ops)
490{ 490{
491 return scnprintf(bf, size, "%-6.6s %s", ins->name, 491 return scnprintf(bf, size, "%-6s %s", ins->name,
492 ops->target.name ?: ops->target.raw); 492 ops->target.name ?: ops->target.raw);
493} 493}
494 494
@@ -500,7 +500,7 @@ static struct ins_ops dec_ops = {
500static int nop__scnprintf(struct ins *ins __maybe_unused, char *bf, size_t size, 500static int nop__scnprintf(struct ins *ins __maybe_unused, char *bf, size_t size,
501 struct ins_operands *ops __maybe_unused) 501 struct ins_operands *ops __maybe_unused)
502{ 502{
503 return scnprintf(bf, size, "%-6.6s", "nop"); 503 return scnprintf(bf, size, "%-6s", "nop");
504} 504}
505 505
506static struct ins_ops nop_ops = { 506static struct ins_ops nop_ops = {
@@ -924,7 +924,7 @@ void disasm_line__free(struct disasm_line *dl)
924int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw) 924int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw)
925{ 925{
926 if (raw || !dl->ins.ops) 926 if (raw || !dl->ins.ops)
927 return scnprintf(bf, size, "%-6.6s %s", dl->ins.name, dl->ops.raw); 927 return scnprintf(bf, size, "%-6s %s", dl->ins.name, dl->ops.raw);
928 928
929 return ins__scnprintf(&dl->ins, bf, size, &dl->ops); 929 return ins__scnprintf(&dl->ins, bf, size, &dl->ops);
930} 930}
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index c6c891e154a6..b62e523a7035 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -257,7 +257,7 @@ int perf_evlist__add_dummy(struct perf_evlist *evlist)
257 .config = PERF_COUNT_SW_DUMMY, 257 .config = PERF_COUNT_SW_DUMMY,
258 .size = sizeof(attr), /* to capture ABI version */ 258 .size = sizeof(attr), /* to capture ABI version */
259 }; 259 };
260 struct perf_evsel *evsel = perf_evsel__new(&attr); 260 struct perf_evsel *evsel = perf_evsel__new_idx(&attr, evlist->nr_entries);
261 261
262 if (evsel == NULL) 262 if (evsel == NULL)
263 return -ENOMEM; 263 return -ENOMEM;
@@ -1786,3 +1786,15 @@ void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist,
1786state_err: 1786state_err:
1787 return; 1787 return;
1788} 1788}
1789
1790bool perf_evlist__exclude_kernel(struct perf_evlist *evlist)
1791{
1792 struct perf_evsel *evsel;
1793
1794 evlist__for_each_entry(evlist, evsel) {
1795 if (!evsel->attr.exclude_kernel)
1796 return false;
1797 }
1798
1799 return true;
1800}
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index e72ae64c11ac..491f69542920 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -312,4 +312,6 @@ perf_evlist__find_evsel_by_str(struct perf_evlist *evlist, const char *str);
312 312
313struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist, 313struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist,
314 union perf_event *event); 314 union perf_event *event);
315
316bool perf_evlist__exclude_kernel(struct perf_evlist *evlist);
315#endif /* __PERF_EVLIST_H */ 317#endif /* __PERF_EVLIST_H */
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f894893c203d..d5fbcf8c7aa7 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -733,12 +733,16 @@ static void apply_config_terms(struct perf_evsel *evsel,
733 list_for_each_entry(term, config_terms, list) { 733 list_for_each_entry(term, config_terms, list) {
734 switch (term->type) { 734 switch (term->type) {
735 case PERF_EVSEL__CONFIG_TERM_PERIOD: 735 case PERF_EVSEL__CONFIG_TERM_PERIOD:
736 attr->sample_period = term->val.period; 736 if (!(term->weak && opts->user_interval != ULLONG_MAX)) {
737 attr->freq = 0; 737 attr->sample_period = term->val.period;
738 attr->freq = 0;
739 }
738 break; 740 break;
739 case PERF_EVSEL__CONFIG_TERM_FREQ: 741 case PERF_EVSEL__CONFIG_TERM_FREQ:
740 attr->sample_freq = term->val.freq; 742 if (!(term->weak && opts->user_freq != UINT_MAX)) {
741 attr->freq = 1; 743 attr->sample_freq = term->val.freq;
744 attr->freq = 1;
745 }
742 break; 746 break;
743 case PERF_EVSEL__CONFIG_TERM_TIME: 747 case PERF_EVSEL__CONFIG_TERM_TIME:
744 if (term->val.time) 748 if (term->val.time)
@@ -1371,7 +1375,7 @@ perf_evsel__process_group_data(struct perf_evsel *leader,
1371static int 1375static int
1372perf_evsel__read_group(struct perf_evsel *leader, int cpu, int thread) 1376perf_evsel__read_group(struct perf_evsel *leader, int cpu, int thread)
1373{ 1377{
1374 struct perf_stat_evsel *ps = leader->priv; 1378 struct perf_stat_evsel *ps = leader->stats;
1375 u64 read_format = leader->attr.read_format; 1379 u64 read_format = leader->attr.read_format;
1376 int size = perf_evsel__read_size(leader); 1380 int size = perf_evsel__read_size(leader);
1377 u64 *data = ps->group_data; 1381 u64 *data = ps->group_data;
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 9277df96ffda..157f49e8a772 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -67,6 +67,7 @@ struct perf_evsel_config_term {
67 bool overwrite; 67 bool overwrite;
68 char *branch; 68 char *branch;
69 } val; 69 } val;
70 bool weak;
70}; 71};
71 72
72struct perf_stat_evsel; 73struct perf_stat_evsel;
diff --git a/tools/perf/util/intel-pt-decoder/inat.h b/tools/perf/util/intel-pt-decoder/inat.h
index 125ecd2a300d..52dc8d911173 100644
--- a/tools/perf/util/intel-pt-decoder/inat.h
+++ b/tools/perf/util/intel-pt-decoder/inat.h
@@ -97,6 +97,16 @@
97#define INAT_MAKE_GROUP(grp) ((grp << INAT_GRP_OFFS) | INAT_MODRM) 97#define INAT_MAKE_GROUP(grp) ((grp << INAT_GRP_OFFS) | INAT_MODRM)
98#define INAT_MAKE_IMM(imm) (imm << INAT_IMM_OFFS) 98#define INAT_MAKE_IMM(imm) (imm << INAT_IMM_OFFS)
99 99
100/* Identifiers for segment registers */
101#define INAT_SEG_REG_IGNORE 0
102#define INAT_SEG_REG_DEFAULT 1
103#define INAT_SEG_REG_CS 2
104#define INAT_SEG_REG_SS 3
105#define INAT_SEG_REG_DS 4
106#define INAT_SEG_REG_ES 5
107#define INAT_SEG_REG_FS 6
108#define INAT_SEG_REG_GS 7
109
100/* Attribute search APIs */ 110/* Attribute search APIs */
101extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode); 111extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode);
102extern int inat_get_last_prefix_id(insn_byte_t last_pfx); 112extern int inat_get_last_prefix_id(insn_byte_t last_pfx);
diff --git a/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt b/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
index 12e377184ee4..c4d55919fac1 100644
--- a/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
+++ b/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
@@ -896,7 +896,7 @@ EndTable
896 896
897GrpTable: Grp3_1 897GrpTable: Grp3_1
8980: TEST Eb,Ib 8980: TEST Eb,Ib
8991: 8991: TEST Eb,Ib
9002: NOT Eb 9002: NOT Eb
9013: NEG Eb 9013: NEG Eb
9024: MUL AL,Eb 9024: MUL AL,Eb
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 6a8d03c3d9b7..270f3223c6df 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -172,6 +172,9 @@ void machine__exit(struct machine *machine)
172{ 172{
173 int i; 173 int i;
174 174
175 if (machine == NULL)
176 return;
177
175 machine__destroy_kernel_maps(machine); 178 machine__destroy_kernel_maps(machine);
176 map_groups__exit(&machine->kmaps); 179 map_groups__exit(&machine->kmaps);
177 dsos__exit(&machine->dsos); 180 dsos__exit(&machine->dsos);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index a7fcd95961ef..170316795a18 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1116,6 +1116,7 @@ do { \
1116 INIT_LIST_HEAD(&__t->list); \ 1116 INIT_LIST_HEAD(&__t->list); \
1117 __t->type = PERF_EVSEL__CONFIG_TERM_ ## __type; \ 1117 __t->type = PERF_EVSEL__CONFIG_TERM_ ## __type; \
1118 __t->val.__name = __val; \ 1118 __t->val.__name = __val; \
1119 __t->weak = term->weak; \
1119 list_add_tail(&__t->list, head_terms); \ 1120 list_add_tail(&__t->list, head_terms); \
1120} while (0) 1121} while (0)
1121 1122
@@ -2410,6 +2411,7 @@ static int new_term(struct parse_events_term **_term,
2410 2411
2411 *term = *temp; 2412 *term = *temp;
2412 INIT_LIST_HEAD(&term->list); 2413 INIT_LIST_HEAD(&term->list);
2414 term->weak = false;
2413 2415
2414 switch (term->type_val) { 2416 switch (term->type_val) {
2415 case PARSE_EVENTS__TERM_TYPE_NUM: 2417 case PARSE_EVENTS__TERM_TYPE_NUM:
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index be337c266697..88108cd11b4c 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -101,6 +101,9 @@ struct parse_events_term {
101 /* error string indexes for within parsed string */ 101 /* error string indexes for within parsed string */
102 int err_term; 102 int err_term;
103 int err_val; 103 int err_val;
104
105 /* Coming from implicit alias */
106 bool weak;
104}; 107};
105 108
106struct parse_events_error { 109struct parse_events_error {
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 07cb2ac041d7..80fb1593913a 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -405,6 +405,11 @@ static int pmu_alias_terms(struct perf_pmu_alias *alias,
405 parse_events_terms__purge(&list); 405 parse_events_terms__purge(&list);
406 return ret; 406 return ret;
407 } 407 }
408 /*
409 * Weak terms don't override command line options,
410 * which we don't want for implicit terms in aliases.
411 */
412 cloned->weak = true;
408 list_add_tail(&cloned->list, &list); 413 list_add_tail(&cloned->list, &list);
409 } 414 }
410 list_splice(&list, terms); 415 list_splice(&list, terms);
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 333a48655ee0..21a2d76b67dc 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,7 +1,19 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2
3ifeq ($(srctree),)
4srctree := $(patsubst %/,%,$(dir $(CURDIR)))
5srctree := $(patsubst %/,%,$(dir $(srctree)))
6srctree := $(patsubst %/,%,$(dir $(srctree)))
7srctree := $(patsubst %/,%,$(dir $(srctree)))
8endif
9include $(srctree)/tools/scripts/Makefile.arch
10
11$(call detected_var,SRCARCH)
12
2LIBDIR := ../../../lib 13LIBDIR := ../../../lib
3BPFDIR := $(LIBDIR)/bpf 14BPFDIR := $(LIBDIR)/bpf
4APIDIR := ../../../include/uapi 15APIDIR := ../../../include/uapi
16ASMDIR:= ../../../arch/$(ARCH)/include/uapi
5GENDIR := ../../../../include/generated 17GENDIR := ../../../../include/generated
6GENHDR := $(GENDIR)/autoconf.h 18GENHDR := $(GENDIR)/autoconf.h
7 19
@@ -9,7 +21,7 @@ ifneq ($(wildcard $(GENHDR)),)
9 GENFLAGS := -DHAVE_GENHDR 21 GENFLAGS := -DHAVE_GENHDR
10endif 22endif
11 23
12CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include 24CFLAGS += -Wall -O2 -I$(APIDIR) -I$(ASMDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include
13LDLIBS += -lcap -lelf 25LDLIBS += -lcap -lelf
14 26
15TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \ 27TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \
diff --git a/tools/testing/selftests/bpf/test_verifier_log.c b/tools/testing/selftests/bpf/test_verifier_log.c
index 3cc0b561489e..e9626cf5607a 100644
--- a/tools/testing/selftests/bpf/test_verifier_log.c
+++ b/tools/testing/selftests/bpf/test_verifier_log.c
@@ -3,6 +3,8 @@
3#include <stdio.h> 3#include <stdio.h>
4#include <string.h> 4#include <string.h>
5#include <unistd.h> 5#include <unistd.h>
6#include <sys/time.h>
7#include <sys/resource.h>
6 8
7#include <linux/bpf.h> 9#include <linux/bpf.h>
8#include <linux/filter.h> 10#include <linux/filter.h>
@@ -131,11 +133,16 @@ static void test_log_bad(char *log, size_t log_len, int log_level)
131 133
132int main(int argc, char **argv) 134int main(int argc, char **argv)
133{ 135{
136 struct rlimit limit = { RLIM_INFINITY, RLIM_INFINITY };
134 char full_log[LOG_SIZE]; 137 char full_log[LOG_SIZE];
135 char log[LOG_SIZE]; 138 char log[LOG_SIZE];
136 size_t want_len; 139 size_t want_len;
137 int i; 140 int i;
138 141
142 /* allow unlimited locked memory to have more consistent error code */
143 if (setrlimit(RLIMIT_MEMLOCK, &limit) < 0)
144 perror("Unable to lift memlock rlimit");
145
139 memset(log, 1, LOG_SIZE); 146 memset(log, 1, LOG_SIZE);
140 147
141 /* Test incorrect attr */ 148 /* Test incorrect attr */
diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
index 5727dfb15a83..8a1cd1616de4 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.c
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
@@ -329,9 +329,17 @@ err:
329int usbip_vhci_get_free_port(uint32_t speed) 329int usbip_vhci_get_free_port(uint32_t speed)
330{ 330{
331 for (int i = 0; i < vhci_driver->nports; i++) { 331 for (int i = 0; i < vhci_driver->nports; i++) {
332 if (speed == USB_SPEED_SUPER && 332
333 vhci_driver->idev[i].hub != HUB_SPEED_SUPER) 333 switch (speed) {
334 continue; 334 case USB_SPEED_SUPER:
335 if (vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
336 continue;
337 break;
338 default:
339 if (vhci_driver->idev[i].hub != HUB_SPEED_HIGH)
340 continue;
341 break;
342 }
335 343
336 if (vhci_driver->idev[i].status == VDEV_ST_NULL) 344 if (vhci_driver->idev[i].status == VDEV_ST_NULL)
337 return vhci_driver->idev[i].port; 345 return vhci_driver->idev[i].port;
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index 4151250ce8da..f9555b1e7f15 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -479,9 +479,6 @@ void kvm_timer_vcpu_load(struct kvm_vcpu *vcpu)
479 479
480 vtimer_restore_state(vcpu); 480 vtimer_restore_state(vcpu);
481 481
482 if (has_vhe())
483 disable_el1_phys_timer_access();
484
485 /* Set the background timer for the physical timer emulation. */ 482 /* Set the background timer for the physical timer emulation. */
486 phys_timer_emulate(vcpu); 483 phys_timer_emulate(vcpu);
487} 484}
@@ -510,9 +507,6 @@ void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu)
510 if (unlikely(!timer->enabled)) 507 if (unlikely(!timer->enabled))
511 return; 508 return;
512 509
513 if (has_vhe())
514 enable_el1_phys_timer_access();
515
516 vtimer_save_state(vcpu); 510 vtimer_save_state(vcpu);
517 511
518 /* 512 /*
@@ -841,7 +835,10 @@ int kvm_timer_enable(struct kvm_vcpu *vcpu)
841no_vgic: 835no_vgic:
842 preempt_disable(); 836 preempt_disable();
843 timer->enabled = 1; 837 timer->enabled = 1;
844 kvm_timer_vcpu_load_vgic(vcpu); 838 if (!irqchip_in_kernel(vcpu->kvm))
839 kvm_timer_vcpu_load_user(vcpu);
840 else
841 kvm_timer_vcpu_load_vgic(vcpu);
845 preempt_enable(); 842 preempt_enable();
846 843
847 return 0; 844 return 0;
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index a67c106d73f5..6b60c98a6e22 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -188,6 +188,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
188 kvm->vcpus[i] = NULL; 188 kvm->vcpus[i] = NULL;
189 } 189 }
190 } 190 }
191 atomic_set(&kvm->online_vcpus, 0);
191} 192}
192 193
193int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) 194int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
@@ -296,7 +297,6 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
296{ 297{
297 kvm_mmu_free_memory_caches(vcpu); 298 kvm_mmu_free_memory_caches(vcpu);
298 kvm_timer_vcpu_terminate(vcpu); 299 kvm_timer_vcpu_terminate(vcpu);
299 kvm_vgic_vcpu_destroy(vcpu);
300 kvm_pmu_vcpu_destroy(vcpu); 300 kvm_pmu_vcpu_destroy(vcpu);
301 kvm_vcpu_uninit(vcpu); 301 kvm_vcpu_uninit(vcpu);
302 kmem_cache_free(kvm_vcpu_cache, vcpu); 302 kmem_cache_free(kvm_vcpu_cache, vcpu);
@@ -627,6 +627,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
627 ret = kvm_handle_mmio_return(vcpu, vcpu->run); 627 ret = kvm_handle_mmio_return(vcpu, vcpu->run);
628 if (ret) 628 if (ret)
629 return ret; 629 return ret;
630 if (kvm_arm_handle_step_debug(vcpu, vcpu->run))
631 return 0;
632
630 } 633 }
631 634
632 if (run->immediate_exit) 635 if (run->immediate_exit)
@@ -1502,7 +1505,7 @@ int kvm_arch_init(void *opaque)
1502 bool in_hyp_mode; 1505 bool in_hyp_mode;
1503 1506
1504 if (!is_hyp_mode_available()) { 1507 if (!is_hyp_mode_available()) {
1505 kvm_err("HYP mode not available\n"); 1508 kvm_info("HYP mode not available\n");
1506 return -ENODEV; 1509 return -ENODEV;
1507 } 1510 }
1508 1511
diff --git a/virt/kvm/arm/hyp/timer-sr.c b/virt/kvm/arm/hyp/timer-sr.c
index f39861639f08..f24404b3c8df 100644
--- a/virt/kvm/arm/hyp/timer-sr.c
+++ b/virt/kvm/arm/hyp/timer-sr.c
@@ -27,42 +27,34 @@ void __hyp_text __kvm_timer_set_cntvoff(u32 cntvoff_low, u32 cntvoff_high)
27 write_sysreg(cntvoff, cntvoff_el2); 27 write_sysreg(cntvoff, cntvoff_el2);
28} 28}
29 29
30void __hyp_text enable_el1_phys_timer_access(void)
31{
32 u64 val;
33
34 /* Allow physical timer/counter access for the host */
35 val = read_sysreg(cnthctl_el2);
36 val |= CNTHCTL_EL1PCTEN | CNTHCTL_EL1PCEN;
37 write_sysreg(val, cnthctl_el2);
38}
39
40void __hyp_text disable_el1_phys_timer_access(void)
41{
42 u64 val;
43
44 /*
45 * Disallow physical timer access for the guest
46 * Physical counter access is allowed
47 */
48 val = read_sysreg(cnthctl_el2);
49 val &= ~CNTHCTL_EL1PCEN;
50 val |= CNTHCTL_EL1PCTEN;
51 write_sysreg(val, cnthctl_el2);
52}
53
54void __hyp_text __timer_disable_traps(struct kvm_vcpu *vcpu) 30void __hyp_text __timer_disable_traps(struct kvm_vcpu *vcpu)
55{ 31{
56 /* 32 /*
57 * We don't need to do this for VHE since the host kernel runs in EL2 33 * We don't need to do this for VHE since the host kernel runs in EL2
58 * with HCR_EL2.TGE ==1, which makes those bits have no impact. 34 * with HCR_EL2.TGE ==1, which makes those bits have no impact.
59 */ 35 */
60 if (!has_vhe()) 36 if (!has_vhe()) {
61 enable_el1_phys_timer_access(); 37 u64 val;
38
39 /* Allow physical timer/counter access for the host */
40 val = read_sysreg(cnthctl_el2);
41 val |= CNTHCTL_EL1PCTEN | CNTHCTL_EL1PCEN;
42 write_sysreg(val, cnthctl_el2);
43 }
62} 44}
63 45
64void __hyp_text __timer_enable_traps(struct kvm_vcpu *vcpu) 46void __hyp_text __timer_enable_traps(struct kvm_vcpu *vcpu)
65{ 47{
66 if (!has_vhe()) 48 if (!has_vhe()) {
67 disable_el1_phys_timer_access(); 49 u64 val;
50
51 /*
52 * Disallow physical timer access for the guest
53 * Physical counter access is allowed
54 */
55 val = read_sysreg(cnthctl_el2);
56 val &= ~CNTHCTL_EL1PCEN;
57 val |= CNTHCTL_EL1PCTEN;
58 write_sysreg(val, cnthctl_el2);
59 }
68} 60}
diff --git a/virt/kvm/arm/hyp/vgic-v2-sr.c b/virt/kvm/arm/hyp/vgic-v2-sr.c
index a3f18d362366..d7fd46fe9efb 100644
--- a/virt/kvm/arm/hyp/vgic-v2-sr.c
+++ b/virt/kvm/arm/hyp/vgic-v2-sr.c
@@ -34,11 +34,7 @@ static void __hyp_text save_elrsr(struct kvm_vcpu *vcpu, void __iomem *base)
34 else 34 else
35 elrsr1 = 0; 35 elrsr1 = 0;
36 36
37#ifdef CONFIG_CPU_BIG_ENDIAN
38 cpu_if->vgic_elrsr = ((u64)elrsr0 << 32) | elrsr1;
39#else
40 cpu_if->vgic_elrsr = ((u64)elrsr1 << 32) | elrsr0; 37 cpu_if->vgic_elrsr = ((u64)elrsr1 << 32) | elrsr0;
41#endif
42} 38}
43 39
44static void __hyp_text save_lrs(struct kvm_vcpu *vcpu, void __iomem *base) 40static void __hyp_text save_lrs(struct kvm_vcpu *vcpu, void __iomem *base)
diff --git a/virt/kvm/arm/vgic/vgic-irqfd.c b/virt/kvm/arm/vgic/vgic-irqfd.c
index b7baf581611a..99e026d2dade 100644
--- a/virt/kvm/arm/vgic/vgic-irqfd.c
+++ b/virt/kvm/arm/vgic/vgic-irqfd.c
@@ -112,8 +112,7 @@ int kvm_vgic_setup_default_irq_routing(struct kvm *kvm)
112 u32 nr = dist->nr_spis; 112 u32 nr = dist->nr_spis;
113 int i, ret; 113 int i, ret;
114 114
115 entries = kcalloc(nr, sizeof(struct kvm_kernel_irq_routing_entry), 115 entries = kcalloc(nr, sizeof(*entries), GFP_KERNEL);
116 GFP_KERNEL);
117 if (!entries) 116 if (!entries)
118 return -ENOMEM; 117 return -ENOMEM;
119 118
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 1f761a9991e7..8e633bd9cc1e 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -421,6 +421,7 @@ static int its_sync_lpi_pending_table(struct kvm_vcpu *vcpu)
421 u32 *intids; 421 u32 *intids;
422 int nr_irqs, i; 422 int nr_irqs, i;
423 unsigned long flags; 423 unsigned long flags;
424 u8 pendmask;
424 425
425 nr_irqs = vgic_copy_lpi_list(vcpu, &intids); 426 nr_irqs = vgic_copy_lpi_list(vcpu, &intids);
426 if (nr_irqs < 0) 427 if (nr_irqs < 0)
@@ -428,7 +429,6 @@ static int its_sync_lpi_pending_table(struct kvm_vcpu *vcpu)
428 429
429 for (i = 0; i < nr_irqs; i++) { 430 for (i = 0; i < nr_irqs; i++) {
430 int byte_offset, bit_nr; 431 int byte_offset, bit_nr;
431 u8 pendmask;
432 432
433 byte_offset = intids[i] / BITS_PER_BYTE; 433 byte_offset = intids[i] / BITS_PER_BYTE;
434 bit_nr = intids[i] % BITS_PER_BYTE; 434 bit_nr = intids[i] % BITS_PER_BYTE;
@@ -821,6 +821,8 @@ static int vgic_its_alloc_collection(struct vgic_its *its,
821 return E_ITS_MAPC_COLLECTION_OOR; 821 return E_ITS_MAPC_COLLECTION_OOR;
822 822
823 collection = kzalloc(sizeof(*collection), GFP_KERNEL); 823 collection = kzalloc(sizeof(*collection), GFP_KERNEL);
824 if (!collection)
825 return -ENOMEM;
824 826
825 collection->collection_id = coll_id; 827 collection->collection_id = coll_id;
826 collection->target_addr = COLLECTION_NOT_MAPPED; 828 collection->target_addr = COLLECTION_NOT_MAPPED;
diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c
index 2f05f732d3fd..f47e8481fa45 100644
--- a/virt/kvm/arm/vgic/vgic-v3.c
+++ b/virt/kvm/arm/vgic/vgic-v3.c
@@ -327,13 +327,13 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
327 int last_byte_offset = -1; 327 int last_byte_offset = -1;
328 struct vgic_irq *irq; 328 struct vgic_irq *irq;
329 int ret; 329 int ret;
330 u8 val;
330 331
331 list_for_each_entry(irq, &dist->lpi_list_head, lpi_list) { 332 list_for_each_entry(irq, &dist->lpi_list_head, lpi_list) {
332 int byte_offset, bit_nr; 333 int byte_offset, bit_nr;
333 struct kvm_vcpu *vcpu; 334 struct kvm_vcpu *vcpu;
334 gpa_t pendbase, ptr; 335 gpa_t pendbase, ptr;
335 bool stored; 336 bool stored;
336 u8 val;
337 337
338 vcpu = irq->target_vcpu; 338 vcpu = irq->target_vcpu;
339 if (!vcpu) 339 if (!vcpu)
diff --git a/virt/kvm/arm/vgic/vgic-v4.c b/virt/kvm/arm/vgic/vgic-v4.c
index 53c324aa44ef..4a37292855bc 100644
--- a/virt/kvm/arm/vgic/vgic-v4.c
+++ b/virt/kvm/arm/vgic/vgic-v4.c
@@ -337,8 +337,10 @@ int kvm_vgic_v4_unset_forwarding(struct kvm *kvm, int virq,
337 goto out; 337 goto out;
338 338
339 WARN_ON(!(irq->hw && irq->host_irq == virq)); 339 WARN_ON(!(irq->hw && irq->host_irq == virq));
340 irq->hw = false; 340 if (irq->hw) {
341 ret = its_unmap_vlpi(virq); 341 irq->hw = false;
342 ret = its_unmap_vlpi(virq);
343 }
342 344
343out: 345out:
344 mutex_unlock(&its->its_lock); 346 mutex_unlock(&its->its_lock);
diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c
index b168a328a9e0..ecb8e25f5fe5 100644
--- a/virt/kvm/arm/vgic/vgic.c
+++ b/virt/kvm/arm/vgic/vgic.c
@@ -492,6 +492,7 @@ int kvm_vgic_unmap_phys_irq(struct kvm_vcpu *vcpu, unsigned int vintid)
492int kvm_vgic_set_owner(struct kvm_vcpu *vcpu, unsigned int intid, void *owner) 492int kvm_vgic_set_owner(struct kvm_vcpu *vcpu, unsigned int intid, void *owner)
493{ 493{
494 struct vgic_irq *irq; 494 struct vgic_irq *irq;
495 unsigned long flags;
495 int ret = 0; 496 int ret = 0;
496 497
497 if (!vgic_initialized(vcpu->kvm)) 498 if (!vgic_initialized(vcpu->kvm))
@@ -502,12 +503,12 @@ int kvm_vgic_set_owner(struct kvm_vcpu *vcpu, unsigned int intid, void *owner)
502 return -EINVAL; 503 return -EINVAL;
503 504
504 irq = vgic_get_irq(vcpu->kvm, vcpu, intid); 505 irq = vgic_get_irq(vcpu->kvm, vcpu, intid);
505 spin_lock(&irq->irq_lock); 506 spin_lock_irqsave(&irq->irq_lock, flags);
506 if (irq->owner && irq->owner != owner) 507 if (irq->owner && irq->owner != owner)
507 ret = -EEXIST; 508 ret = -EEXIST;
508 else 509 else
509 irq->owner = owner; 510 irq->owner = owner;
510 spin_unlock(&irq->irq_lock); 511 spin_unlock_irqrestore(&irq->irq_lock, flags);
511 512
512 return ret; 513 return ret;
513} 514}
@@ -823,13 +824,14 @@ void vgic_kick_vcpus(struct kvm *kvm)
823 824
824bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, unsigned int vintid) 825bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, unsigned int vintid)
825{ 826{
826 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, vintid); 827 struct vgic_irq *irq;
827 bool map_is_active; 828 bool map_is_active;
828 unsigned long flags; 829 unsigned long flags;
829 830
830 if (!vgic_initialized(vcpu->kvm)) 831 if (!vgic_initialized(vcpu->kvm))
831 return false; 832 return false;
832 833
834 irq = vgic_get_irq(vcpu->kvm, vcpu, vintid);
833 spin_lock_irqsave(&irq->irq_lock, flags); 835 spin_lock_irqsave(&irq->irq_lock, flags);
834 map_is_active = irq->hw && irq->active; 836 map_is_active = irq->hw && irq->active;
835 spin_unlock_irqrestore(&irq->irq_lock, flags); 837 spin_unlock_irqrestore(&irq->irq_lock, flags);
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index c422c10cd1dd..210bf820385a 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -135,6 +135,11 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm);
135static unsigned long long kvm_createvm_count; 135static unsigned long long kvm_createvm_count;
136static unsigned long long kvm_active_vms; 136static unsigned long long kvm_active_vms;
137 137
138__weak void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
139 unsigned long start, unsigned long end)
140{
141}
142
138bool kvm_is_reserved_pfn(kvm_pfn_t pfn) 143bool kvm_is_reserved_pfn(kvm_pfn_t pfn)
139{ 144{
140 if (pfn_valid(pfn)) 145 if (pfn_valid(pfn))
@@ -360,6 +365,9 @@ static void kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
360 kvm_flush_remote_tlbs(kvm); 365 kvm_flush_remote_tlbs(kvm);
361 366
362 spin_unlock(&kvm->mmu_lock); 367 spin_unlock(&kvm->mmu_lock);
368
369 kvm_arch_mmu_notifier_invalidate_range(kvm, start, end);
370
363 srcu_read_unlock(&kvm->srcu, idx); 371 srcu_read_unlock(&kvm->srcu, idx);
364} 372}
365 373