Commit Graph

155 Commits

Author SHA1 Message Date
Tao Huang
aa65b81218 Merge commit '62646c7ab19511b8fc17078cf4b0603e550e73cd'
* commit '62646c7ab19511b8fc17078cf4b0603e550e73cd': (119202 commits)
  clk: rockchip: Fix missing rkclk_cpuclk_div_setting prototype for rk3128
  rtc: rk808: Explicitly include of.h for of_get_child_by_name
  ASoC: rk817: Explicitly include gpio/consumer.h for devm_gpiod_get_optional
  drm/rockchip: dsi2: add crtc post enable and pre disable callback
  drm/rockchip: vop2: set dsc config done in crtc post enable
  input: sensors: avoid -Wempty-body warning
  input: sensors: accel: dmard10: Make gsensor_reset() static
  ASoC: rk312x: Fix missing prototypes
  arm64: dts: rockchip: rk3518: Add rockchip,video-1080p-freq for cpu opp table
  soc: rockchip: system_monitor: Add support to limit cpu max freq when play 1080p video
  net: phy: Convert to use sysfs_emit_at() API
  drm/rockchip: dw_hdmi: Explicitly include pinctrl/consumer.h for devm_pinctrl_get
  net: rfkill: bt: Explicitly include pinctrl/consumer.h for pinctrl_select_state
  ASoC: codecs: rk_dsm: Explicitly include pinctrl/consumer.h for devm_pinctrl_get
  spi: rockchip-slave: Explicitly include pinctrl/consumer.h for pinctrl_pm_select_sleep_state
  media: rockchip: isp: Explicitly include platform_device.h
  regulator: rk801: Explicitly include platform_device.h
  soc: rockchip: decompress: Explicitly include of_platform.h for of_platform_device_create
  soc: rockchip: thunderboot_mmc: Explicitly include of_platform.h for of_platform_device_create
  soc: rockchip: thunderboot_sfc: Explicitly include of_platform.h for of_platform_device_create
  ...

Change-Id: I88628746fa5e58f85cf991634fe2f6355ac937e8
2025-07-17 15:26:12 +08:00
Tao Huang
fce55f8eb2 Merge tag 'v6.1.75'
This is the 6.1.75 stable release

* tag 'v6.1.75': (2623 commits)
  Linux 6.1.75
  Revert "Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d""
  arm64: dts: armada-3720-turris-mox: set irq type for RTC
  Revert "KEYS: encrypted: Add check for strsep"
  riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping
  block: Remove special-casing of compound pages
  i2c: s3c24xx: fix transferring more than one message in polling mode
  i2c: s3c24xx: fix read transfers in polling mode
  ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work
  selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes
  mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
  loop: fix the the direct I/O support check when used on top of block devices
  ethtool: netlink: Add missing ethnl_ops_begin/complete
  kdb: Fix a potential buffer overflow in kdb_local()
  ipvs: avoid stat macros calls from preemptible context
  netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description
  netfilter: nf_tables: skip dead set elements in netlink dump
  netfilter: nf_tables: do not allow mismatch field size and set key length
  netfilter: bridge: replace physindev with physinif in nf_bridge_info
  netfilter: propagate net to nf_bridge_get_physindev
  ...

Conflicts:
	drivers/clk/rockchip/clk-rk3568.c
	drivers/devfreq/event/rockchip-dfi.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
	drivers/i2c/busses/i2c-rk3x.c
	drivers/i2c/i2c-core-base.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
	drivers/nvme/host/nvme.h

Change-Id: I9649ece83925659bca59cced0be24f0bd165822a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-05-08 11:14:32 +08:00
Nícolas F. R. A. Prado
7cb7001ecd dt: dt-extract-compatibles: Don't follow symlinks when walking tree
[ Upstream commit 8f51593cdcab82fb23ef2e1a0010b2e6f99aae02 ]

The iglob function, which we use to find C source files in the kernel
tree, always follows symbolic links. This can cause unintentional
recursions whenever a symbolic link points to a parent directory. A
common scenario is building the kernel with the output set to a
directory inside the kernel tree, which will contain such a symlink.

Instead of using the iglob function, use os.walk to traverse the
directory tree, which by default doesn't follow symbolic links. fnmatch
is then used to match the glob on the filename, as well as ignore hidden
files (which were ignored by default with iglob).

This approach runs just as fast as using iglob.

Fixes: b6acf80735 ("dt: Add a check for undocumented compatible strings in kernel")
Reported-by: Aishwarya TCV <aishwarya.tcv@arm.com>
Closes: https://lore.kernel.org/all/e90cb52f-d55b-d3ba-3933-6cc7b43fcfbc@arm.com
Signed-off-by: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20231107225624.9811-1-nfraprado@collabora.com
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:45:03 +01:00
Nícolas F. R. A. Prado
c35bcede4f dt: dt-extract-compatibles: Handle cfile arguments in generator function
[ Upstream commit eb2139fc0da63b89a2ad565ecd8133a37e8b7c4f ]

Move the handling of the cfile arguments to a separate generator
function to avoid redundancy.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20230828211424.2964562-2-nfraprado@collabora.com
Signed-off-by: Rob Herring <robh@kernel.org>
Stable-dep-of: 8f51593cdcab ("dt: dt-extract-compatibles: Don't follow symlinks when walking tree")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:45:03 +01:00
Nícolas F. R. A. Prado
3453531284 dt: dt-extract-compatibles: Don't follow symlinks when walking tree
[ Upstream commit 8f51593cdcab82fb23ef2e1a0010b2e6f99aae02 ]

The iglob function, which we use to find C source files in the kernel
tree, always follows symbolic links. This can cause unintentional
recursions whenever a symbolic link points to a parent directory. A
common scenario is building the kernel with the output set to a
directory inside the kernel tree, which will contain such a symlink.

Instead of using the iglob function, use os.walk to traverse the
directory tree, which by default doesn't follow symbolic links. fnmatch
is then used to match the glob on the filename, as well as ignore hidden
files (which were ignored by default with iglob).

This approach runs just as fast as using iglob.

Fixes: b6acf80735 ("dt: Add a check for undocumented compatible strings in kernel")
Reported-by: Aishwarya TCV <aishwarya.tcv@arm.com>
Closes: https://lore.kernel.org/all/e90cb52f-d55b-d3ba-3933-6cc7b43fcfbc@arm.com
Signed-off-by: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20231107225624.9811-1-nfraprado@collabora.com
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:05 +01:00
Nícolas F. R. A. Prado
8a124b9e78 dt: dt-extract-compatibles: Handle cfile arguments in generator function
[ Upstream commit eb2139fc0da63b89a2ad565ecd8133a37e8b7c4f ]

Move the handling of the cfile arguments to a separate generator
function to avoid redundancy.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20230828211424.2964562-2-nfraprado@collabora.com
Signed-off-by: Rob Herring <robh@kernel.org>
Stable-dep-of: 8f51593cdcab ("dt: dt-extract-compatibles: Don't follow symlinks when walking tree")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:05 +01:00
Rob Herring
abe916c543 dt: dt-check-compatible: Find struct of_device_id instances with compiler annotations
The regex search for declarations of struct of_device_id was missing
cases that had a compiler annotation such as "__maybe_unused". Improve
the regex to allow for these. Use '\S' instead of specific characters to
shorten the regex. That also finds some more compatibles using '.'
characters.

Unfortunately, these changes add ~400 more compatibles without a
schema.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230804190130.1936566-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
2023-08-17 13:07:39 -05:00
Tao Huang
daf2796321 Merge commit '52f971ee6e023d89d24f9e3cd145d86d707e459c'
* commit '52f971ee6e023d89d24f9e3cd145d86d707e459c': (84565 commits)
  arm64: dts: rockchip: rk3562: Enable viLKsvPwrActive for soc bus
  mtd: spi-nor: esmt: Support New devices
  mtd: spi-nor: fmsh: Support New devices
  mtd: spi-nor: gigadevice: Support New devices
  mtd: spinand: gsto: Add code
  mtd: spinand: hyf: Support new devices
  mmc: convert thunder boot dependency
  ARM: dts: rockchip: rv1106: add node for system sleep
  ARM: rockchip: support rv1106 suspend
  ARM: rockchip: add some pm-related functions
  video: rockchip: mpp: fix rk3528 avsd not probe issue
  arm64: dts: rockchip: rk3588-vehicle-maxim-serdes: Add BOE AV156FHT L83 support
  arm64: rockchip_defconfig: Enable CONFIG_DRM_PANEL_MAXIM_MAX96752F
  drm/panel: Add panel driver for Maxim MAX96752F based LCDs
  media: i2c: techpoint: add support 4 channel 2 lane mode
  drm/rockchip: dsi2: fix NULL in component_ops .unbind helper
  media: rockchip: vicap: fixes cma can not alloc when capture raw
  media: rockchip: vicap: fixed vc err for multi channel
  media: rockchip: hdmirx: fix timing info for interlaced resolution
  media: rockchip: hdmirx: fix code error for cec register failed
  ...

Change-Id: Ia7ac365455d87a295e62bbf481d80694a9712f30

Conflicts:
	.gitignore
	Documentation/devicetree/bindings/clock/rockchip,px30-cru.txt
	Documentation/devicetree/bindings/connector/usb-connector.yaml
	Documentation/devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt
	Documentation/devicetree/bindings/hwmon/pwm-fan.txt
	Documentation/devicetree/bindings/iio/light/vl6180.txt
	Documentation/devicetree/bindings/iommu/rockchip,iommu.txt
	Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml
	Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
	Documentation/devicetree/bindings/net/snps,dwmac.yaml
	Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml
	Documentation/devicetree/bindings/power/rockchip-io-domain.txt
	Documentation/devicetree/bindings/regulator/fan53555.txt
	Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
	Documentation/devicetree/bindings/sound/rockchip,pdm.yaml
	Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
	Documentation/devicetree/bindings/spi/spi-rockchip.yaml
	Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
	Documentation/devicetree/bindings/usb/usb-xhci.txt
	Documentation/filesystems/erofs.rst
	arch/arm/Kconfig
	arch/arm/Makefile
	arch/arm/boot/compressed/head.S
	arch/arm/boot/dts/rk3036.dtsi
	arch/arm/boot/dts/rk3066a-rayeager.dts
	arch/arm/boot/dts/rk3066a.dtsi
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm/boot/dts/rk3288.dtsi
	arch/arm/boot/dts/rk3xxx.dtsi
	arch/arm64/boot/dts/rockchip/Makefile
	arch/arm64/boot/dts/rockchip/px30.dtsi
	arch/arm64/boot/dts/rockchip/rk3308.dtsi
	arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
	arch/arm64/boot/dts/rockchip/rk3399.dtsi
	arch/arm64/boot/dts/rockchip/rk3566.dtsi
	arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi
	arch/arm64/boot/dts/rockchip/rk3568.dtsi
	arch/arm64/boot/dts/rockchip/rockchip-pinconf.dtsi
	arch/arm64/kernel/process.c
	arch/arm64/mm/Makefile
	arch/arm64/mm/fault.c
	arch/arm64/mm/init.c
	drivers/Kconfig
	drivers/Makefile
	drivers/android/Kconfig
	drivers/ata/ahci_platform.c
	drivers/char/hw_random/Kconfig
	drivers/char/hw_random/Makefile
	drivers/clk/clk.c
	drivers/clk/rockchip/Kconfig
	drivers/clk/rockchip/Makefile
	drivers/clk/rockchip/clk-cpu.c
	drivers/clk/rockchip/clk-rk3036.c
	drivers/clk/rockchip/clk-rk3188.c
	drivers/clk/rockchip/clk-rk3308.c
	drivers/clk/rockchip/clk-rk3399.c
	drivers/clk/rockchip/clk-rk3568.c
	drivers/clk/rockchip/clk-rv1126.c
	drivers/clk/rockchip/clk.c
	drivers/clk/rockchip/clk.h
	drivers/cpufreq/cpufreq-dt.c
	drivers/crypto/Kconfig
	drivers/devfreq/Makefile
	drivers/devfreq/devfreq.c
	drivers/dma-buf/dma-buf.c
	drivers/dma-buf/heaps/Makefile
	drivers/dma/pl330.c
	drivers/firmware/Kconfig
	drivers/gpio/Kconfig
	drivers/gpio/Makefile
	drivers/gpio/gpio-rockchip.c
	drivers/gpu/Makefile
	drivers/gpu/drm/Kconfig
	drivers/gpu/drm/Makefile
	drivers/gpu/drm/bridge/Kconfig
	drivers/gpu/drm/bridge/Makefile
	drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
	drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
	drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
	drivers/gpu/drm/bridge/display-connector.c
	drivers/gpu/drm/bridge/sii902x.c
	drivers/gpu/drm/bridge/synopsys/Makefile
	drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
	drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
	drivers/gpu/drm/drm_atomic_helper.c
	drivers/gpu/drm/drm_crtc_internal.h
	drivers/gpu/drm/drm_edid.c
	drivers/gpu/drm/panel/panel-simple.c
	drivers/gpu/drm/rockchip/Kconfig
	drivers/gpu/drm/rockchip/Makefile
	drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
	drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
	drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
	drivers/gpu/drm/rockchip/inno_hdmi.c
	drivers/gpu/drm/rockchip/rockchip_drm_drv.c
	drivers/gpu/drm/rockchip/rockchip_drm_drv.h
	drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
	drivers/gpu/drm/rockchip/rockchip_drm_gem.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.h
	drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
	drivers/gpu/drm/rockchip/rockchip_lvds.c
	drivers/gpu/drm/rockchip/rockchip_rgb.c
	drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.h
	drivers/hwmon/pwm-fan.c
	drivers/hwspinlock/Kconfig
	drivers/hwspinlock/Makefile
	drivers/i2c/busses/i2c-rk3x.c
	drivers/i2c/i2c-core-base.c
	drivers/iio/adc/Kconfig
	drivers/iio/adc/rockchip_saradc.c
	drivers/iio/industrialio-event.c
	drivers/input/touchscreen/Makefile
	drivers/iommu/iommu.c
	drivers/iommu/rockchip-iommu.c
	drivers/irqchip/irq-gic-v3-its.c
	drivers/leds/Makefile
	drivers/mailbox/Kconfig
	drivers/media/common/videobuf2/Makefile
	drivers/media/i2c/Kconfig
	drivers/media/i2c/Makefile
	drivers/media/i2c/dw9714.c
	drivers/media/i2c/hi556.c
	drivers/media/i2c/imx214.c
	drivers/media/i2c/imx258.c
	drivers/media/i2c/imx334.c
	drivers/media/i2c/imx335.c
	drivers/media/i2c/ov5648.c
	drivers/media/i2c/ov5670.c
	drivers/media/i2c/ov5695.c
	drivers/media/i2c/ov7251.c
	drivers/media/platform/Kconfig
	drivers/media/platform/Makefile
	drivers/media/platform/rockchip/Kconfig
	drivers/media/spi/Kconfig
	drivers/media/spi/Makefile
	drivers/media/usb/uvc/uvc_driver.c
	drivers/media/usb/uvc/uvcvideo.h
	drivers/media/v4l2-core/v4l2-async.c
	drivers/media/v4l2-core/v4l2-ioctl.c
	drivers/mfd/rk808.c
	drivers/mmc/core/block.c
	drivers/mmc/core/host.c
	drivers/mmc/core/mmc.c
	drivers/mmc/core/mmc_ops.c
	drivers/mmc/host/Makefile
	drivers/mmc/host/dw_mmc-rockchip.c
	drivers/mmc/host/dw_mmc.c
	drivers/mmc/host/dw_mmc.h
	drivers/mmc/host/sdhci-of-dwcmshc.c
	drivers/mtd/nand/Makefile
	drivers/mtd/nand/raw/Kconfig
	drivers/mtd/nand/raw/Makefile
	drivers/mtd/nand/raw/rockchip-nand-controller.c
	drivers/mtd/nand/spi/Makefile
	drivers/mtd/nand/spi/core.c
	drivers/mtd/nand/spi/gigadevice.c
	drivers/mtd/nand/spi/macronix.c
	drivers/mtd/nand/spi/xtx.c
	drivers/mtd/spi-nor/Kconfig
	drivers/mtd/spi-nor/Makefile
	drivers/mtd/spi-nor/core.c
	drivers/mtd/spi-nor/core.h
	drivers/mtd/spi-nor/eon.c
	drivers/mtd/spi-nor/esmt.c
	drivers/mtd/spi-nor/gigadevice.c
	drivers/mtd/spi-nor/macronix.c
	drivers/mtd/spi-nor/winbond.c
	drivers/mtd/spi-nor/xmc.c
	drivers/net/ethernet/stmicro/stmmac/Makefile
	drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
	drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
	drivers/net/ethernet/stmicro/stmmac/stmmac.h
	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
	drivers/net/phy/Kconfig
	drivers/net/phy/motorcomm.c
	drivers/net/phy/phy_device.c
	drivers/nvmem/Kconfig
	drivers/nvmem/Makefile
	drivers/pci/controller/dwc/Makefile
	drivers/pci/controller/dwc/pcie-designware-host.c
	drivers/pci/controller/dwc/pcie-dw-rockchip.c
	drivers/pci/controller/pcie-rockchip-host.c
	drivers/pci/controller/pcie-rockchip.h
	drivers/pci/pci-sysfs.c
	drivers/pci/pcie/Makefile
	drivers/phy/rockchip/Kconfig
	drivers/phy/rockchip/Makefile
	drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
	drivers/phy/rockchip/phy-rockchip-inno-usb2.c
	drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
	drivers/phy/rockchip/phy-rockchip-snps-pcie3.c
	drivers/phy/rockchip/phy-rockchip-typec.c
	drivers/pinctrl/Kconfig
	drivers/pinctrl/Makefile
	drivers/pinctrl/pinctrl-rk805.c
	drivers/pinctrl/pinctrl-rockchip.c
	drivers/pinctrl/pinctrl-rockchip.h
	drivers/power/supply/Kconfig
	drivers/power/supply/Makefile
	drivers/power/supply/bq25890_charger.c
	drivers/power/supply/rk817_charger.c
	drivers/pwm/core.c
	drivers/pwm/pwm-rockchip.c
	drivers/regulator/fan53555.c
	drivers/regulator/rk808-regulator.c
	drivers/rtc/rtc-hym8563.c
	drivers/soc/rockchip/Kconfig
	drivers/soc/rockchip/Makefile
	drivers/soc/rockchip/grf.c
	drivers/soc/rockchip/io-domain.c
	drivers/soc/rockchip/pm_domains.c
	drivers/spi/Kconfig
	drivers/spi/spi-rockchip-sfc.c
	drivers/spi/spi-rockchip.c
	drivers/spi/spidev.c
	drivers/staging/android/ion/heaps/ion_system_heap.c
	drivers/thermal/rockchip_thermal.c
	drivers/tty/serial/8250/8250_dma.c
	drivers/tty/serial/8250/8250_dw.c
	drivers/tty/serial/8250/8250_dwlib.c
	drivers/tty/serial/8250/8250_port.c
	drivers/usb/dwc2/platform.c
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/core.h
	drivers/usb/dwc3/ep0.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/gadget/configfs.c
	drivers/usb/gadget/function/f_fs.c
	drivers/usb/gadget/function/f_uvc.c
	drivers/usb/gadget/function/uvc.h
	drivers/usb/gadget/function/uvc_configfs.c
	drivers/usb/gadget/function/uvc_queue.c
	drivers/usb/gadget/function/uvc_v4l2.c
	drivers/usb/gadget/function/uvc_video.c
	drivers/usb/gadget/udc/core.c
	drivers/usb/host/ehci-hcd.c
	drivers/usb/host/ehci-platform.c
	drivers/usb/storage/unusual_uas.h
	drivers/usb/typec/altmodes/Kconfig
	drivers/usb/typec/altmodes/displayport.c
	drivers/usb/typec/class.c
	drivers/usb/typec/tcpm/tcpm.c
	fs/Kconfig
	fs/cifs/inode.c
	fs/dax.c
	fs/erofs/data.c
	fs/erofs/inode.c
	fs/erofs/internal.h
	fs/erofs/super.c
	fs/f2fs/super.c
	fs/fuse/dev.c
	include/drm/bridge/dw_hdmi.h
	include/drm/drm_connector.h
	include/drm/drm_edid.h
	include/dt-bindings/clock/rk3568-cru.h
	include/dt-bindings/power/rk3568-power.h
	include/dt-bindings/power/rk3588-power.h
	include/linux/clk-provider.h
	include/linux/cma.h
	include/linux/dma-buf.h
	include/linux/dma-heap.h
	include/linux/mfd/rk808.h
	include/linux/mtd/spi-nor.h
	include/linux/mtd/spinand.h
	include/linux/phy/pcie.h
	include/linux/pwm.h
	include/linux/sched/sysctl.h
	include/linux/slub_def.h
	include/linux/stmmac.h
	include/linux/usb/typec.h
	include/media/v4l2-async.h
	include/soc/rockchip/pm_domains.h
	include/uapi/drm/drm_fourcc.h
	include/uapi/linux/iio/types.h
	include/uapi/linux/media-bus-format.h
	init/Kconfig
	init/main.c
	kernel/printk/printk.c
	kernel/rcu/Kconfig.debug
	kernel/rcu/tree_stall.h
	kernel/sched/core.c
	kernel/sched/cpufreq_schedutil.c
	kernel/sched/fair.c
	kernel/sched/pelt.c
	kernel/sched/rt.c
	kernel/sched/sched.h
	kernel/softirq.c
	kernel/sysctl.c
	mm/Makefile
	mm/cma.c
	mm/page_alloc.c
	mm/slub.c
	scripts/.gitignore
	scripts/headers_install.sh
	sound/soc/codecs/Kconfig
	sound/soc/codecs/Makefile
	sound/soc/codecs/es8326.c
	sound/soc/codecs/es8326.h
	sound/soc/codecs/hdmi-codec.c
	sound/soc/codecs/rk817_codec.c
	sound/soc/rockchip/Kconfig
	sound/soc/rockchip/Makefile
	sound/soc/rockchip/rockchip_i2s.c
	sound/soc/rockchip/rockchip_i2s_tdm.c
	sound/soc/rockchip/rockchip_i2s_tdm.h
	sound/soc/rockchip/rockchip_pdm.c
	sound/soc/rockchip/rockchip_spdif.c
	sound/soc/soc-generic-dmaengine-pcm.c
	tools/iio/iio_event_monitor.c
2023-05-20 18:57:29 +08:00
Andre Przywara
a3eebcb61f dts: add riscv include prefix link
The Allwinner D1/D1s SoCs (with a RISC-V core) use an (almost?) identical
die as their R528/T113-s siblings with ARM Cortex-A7 cores.

To allow sharing the basic SoC .dtsi files across those two
architectures as well, introduce a symlink to the RISC-V DT directory.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20230320005249.13403-2-andre.przywara@arm.com
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2023-03-27 22:45:22 +02:00
Frank Rowand
568a10bfff of: add processing of EXPECT_NOT to of_unittest_expect
scripts/dtc/of_unittest_expect processes EXPECT messages that
document expected kernel messages triggered by unittest.  Add
processing of EXPECT_NOT messages that document kernel messages
triggered by unittest that are not expected.

This is commit 2 of 2, implementing the processing of EXPECT_NOT
messages.

Signed-off-by: Frank Rowand <frowand.list@gmail.com>
Link: https://lore.kernel.org/r/20230213185702.395776-3-frowand.list@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
2023-02-17 15:46:20 -06:00
Frank Rowand
511f3aa710 of: prepare to add processing of EXPECT_NOT to of_unittest_expect
scripts/dtc/of_unittest_expect processes EXPECT messages that
document expected kernel messages triggered by unittest.  Add
processing of EXPECT_NOT messages that document kernel messages
triggered by unittest that are not expected.

This is commit 1 of 2, renaming existing variables in anticipation
of the changes needed to process EXPECT_NOT, so that commit 2 of 2
will be smaller and easier to read.  This commit is not intended
to make any functional changes.

Signed-off-by: Frank Rowand <frowand.list@gmail.com>
Link: https://lore.kernel.org/r/20230213185702.395776-2-frowand.list@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
2023-02-17 15:46:20 -06:00
Rob Herring
ec340077a8 scripts/dtc: Update to upstream version v1.6.1-66-gabbd523bae6e
This adds the following commits from upstream:

abbd523bae6e pylibfdt: Work-around SWIG limitations with flexible arrays
a41509bea3e7 libfdt: Replace deprecated 0-length arrays with proper flexible arrays
2cd89f862cdb dtc: Warning rather than error on possible truncation of cell values

Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/all/20230203172430.474431-1-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>
2023-02-06 11:03:00 -06:00
Rob Herring
ea3723a541 scripts/dtc: Update to upstream version v1.6.1-63-g55778a03df61
It's been a while since the last sync and Lee needs commit 73590342fc85
("libfdt: prevent integer overflow in fdt_next_tag").

This adds the following commits from upstream:

55778a03df61 libfdt: tests: add get_next_tag_invalid_prop_len
73590342fc85 libfdt: prevent integer overflow in fdt_next_tag
035fb90d5375 libfdt: add fdt_get_property_by_offset_w helper
98a07006c48d Makefile: fix infinite recursion by dropping non-existent `%.output`
a036cc7b0c10 Makefile: limit make re-execution to avoid infinite spin
c6e92108bcd9 libdtc: remove duplicate judgments
e37c25677dc9 Don't generate erroneous fixups from reference to path
50454658f2b5 libfdt: Don't mask fdt_get_name() returned error
e64a204196c9 manual.txt: Follow README.md and remove Jon
f508c83fe6f0 Update README in MANIFEST.in and setup.py to README.md
c2ccf8a77dd2 Add description of Signed-off-by lines
90b9d9de42ca Split out information for contributors to CONTRIBUTING.md
0ee1d479b23a Remove Jon Loeliger from maintainers list
b33a73c62c1c Convert README to README.md
7ad60734b1c1 Allow static building with meson
fd9b8c96c780 Allow static building with make
fda71da26e7f libfdt: Handle failed get_name() on BEGIN_NODE
c7c7f17a83d5 Fix test script to run also on dash shell
01f23ffe1679 Add missing relref_merge test to meson test list
ed310803ea89 pylibfdt: add FdtRo.get_path()
c001fc01a43e pylibfdt: fix swig build in install
26c54f840d23 tests: add test cases for label-relative path references
ec7986e682cf dtc: introduce label relative path references
651410e54cb9 util: introduce xstrndup helper
4048aed12b81 setup.py: fix out of tree build
ff5afb96d0c0 Handle integer overflow in check_property_phandle_args()
ca7294434309 README: Explain how to add a new API function
c0c2e115f82e Fix a UB when fdt_get_string return null
cd5f69cbc0d4 tests: setprop_inplace: use xstrdup instead of unchecked strdup
a04f69025003 pylibfdt: add Property.as_*int*_array()
83102717d7c4 pylibfdt: add Property.as_stringlist()
d152126bb029 Fix Python crash on getprop deallocation
17739b7ef510 Support 'r' format for printing raw bytes with fdtget
45f3d1a095dd libfdt: overlay: make overlay_get_target() public
c19a4bafa514 libfdt: fix an incorrect integer promotion
1cc41b1c969f pylibfdt: Add packaging metadata
db72398cd437 README: Update pylibfdt install instructions
383e148b70a4 pylibfdt: fix with Python 3.10
23b56cb7e189 pylibfdt: Move setup.py to the top level
69a760747d8d pylibfdt: Split setup.py author name and email
0b106a77dbdc pylibfdt: Use setuptools_scm for the version
c691776ddb26 pylibfdt: Use setuptools instead of distutils
5216f3f1bbb7 libfdt: Add static lib to meson build
4eda2590f481 CI: Cirrus: bump used FreeBSD from 12.1 to 13.0

Link: https://lore.kernel.org/r/20221101181427.1808703-1-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>
2022-11-10 08:37:19 -06:00
Rob Herring
b6acf80735 dt: Add a check for undocumented compatible strings in kernel
Add a make target, dt_compatible_check, to extract compatible strings
from kernel sources and check if they are documented by a schema.
At least version v2022.08 of dtschema with dt-check-compatible is
required.

This check can also be run manually on specific files or directories:

scripts/dtc/dt-extract-compatibles drivers/clk/ | \
  xargs dt-check-compatible -v -s Documentation/devicetree/bindings/processed-schema.json

Currently, there are about 3800 undocumented compatible strings. Most of
these are cases where the binding is not yet converted (given there
are 1900 .txt binding files remaining).

Link: https://lore.kernel.org/all/20220916012510.2718170-1-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>
2022-09-27 10:36:16 -05:00
Tao Huang
c7a43f0886 Merge tag 'ASB-2022-06-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2022-01-01
CVE-2022-24958
CVE-2022-20136
CVE-2022-23960
CVE-2022-20141
CVE-2021-4154
CVE-2022-20132

* tag 'ASB-2022-06-05_12-5.10': (1188 commits)
  BACKPORT: net/sched: cls_u32: fix netns refcount changes in u32_change()
  UPSTREAM: io_uring: always use original task when preparing req identity
  FROMLIST: remoteproc: Fix dma_mem leak after rproc_shutdown
  FROMLIST: dma-mapping: Add dma_release_coherent_memory to DMA API
  ANDROID: Update QCOM symbol list for __reset_control_get
  ANDROID: vendor_hooks: Add hooks for mutex
  BACKPORT: can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
  BACKPORT: can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: oplus: Update the ABI xml and symbol list
  UPSTREAM: remoteproc: Fix count check in rproc_coredump_write()
  BACKPORT: esp: Fix possible buffer overflow in ESP transformation
  ANDROID: Fix the drain_all_pages default condition broken by a hook
  UPSTREAM: Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6"
  UPSTREAM: xfrm: fix MTU regression
  ANDROID: signal: Add vendor hook for memory reaping
  FROMGIT: usb: gadget: uvc: allow for application to cleanly shutdown
  FROMGIT: usb: dwc3: gadget: increase tx fifo size for ss isoc endpoints
  UPSTREAM: usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
  FROMGIT: usb: gadget: uvc: remove pause flag use
  ...

Change-Id: Idf3eea3b21dc69c8189161c0e24744336431913a

Conflicts:
	drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
	drivers/spi/spi-rockchip.c
	drivers/usb/gadget/function/f_uvc.c
	drivers/usb/gadget/function/uvc.h
	drivers/usb/gadget/function/uvc_configfs.c
	drivers/usb/gadget/function/uvc_queue.c
	drivers/usb/gadget/function/uvc_video.c
	sound/soc/rockchip/rockchip_i2s.c
2022-07-15 17:58:38 +08:00
Tao Huang
24cbee6672 Merge tag 'ASB-2022-04-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2022-04-01
CVE-2021-0707
CVE-2021-39800
CVE-2021-39801 (4.9 only)
CVE-2021-39802

* tag 'ASB-2022-04-05_12-5.10': (3832 commits)
  ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
  ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
  UPSTREAM: locking/lockdep: Avoid potential access of invalid memory in lock_class
  ANDROID: mm: Fix implicit declaration of function 'isolate_lru_page'
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: GKI: Add hook symbol to symbol list
  Revert "ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree"
  ANDROID: vendor_hooks: Add hooks to for free_unref_page_commit
  ANDROID: vendor_hooks: Add hooks to for alloc_contig_range
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
  ANDROID: GKI: Add symbols to symbol list
  FROMGIT: iommu/iova: Improve 32-bit free space estimate
  ANDROID: export walk_page_range and swp_swap_info
  ANDROID: vendor_hooks: export shrink_slab
  ANDROID: usb: gadget: f_accessory: add compat_ioctl support
  UPSTREAM: sr9700: sanity check for packet length
  UPSTREAM: io_uring: return back safer resurrect
  UPSTREAM: Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
  ...

Change-Id: Ic61ead530b99b10ffd535a358a48fe9bb8c33fd4

Conflicts:
	drivers/android/Kconfig
	drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/i2c/busses/i2c-rk3x.c
	drivers/media/i2c/imx258.c
	drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
	drivers/usb/dwc2/gadget.c
	drivers/usb/gadget/function/uvc.h
	lib/Kconfig.debug
2022-07-15 17:40:39 +08:00
Arnd Bergmann
b2441b3bdc h8300: remove stale bindings and symlink
These four files are left over from the h8300 removal.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-20 22:40:56 +02:00
Jianqun Xu
de3a995b83 scripts/dtc: Support delete unused nodes when CONFIG_ROCKCHIP_MINI_KERNEL=y
Delete nodes in case of:
* node is null, without any property and children node
* node with 'status' property but not "okay" or "ok"

Change-Id: Ic7d2ba1cb60350c21fa6a46222c20870c74359d4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-04-27 14:47:48 +08:00
Thomas Bracht Laumann Jespersen
6f095441f8 scripts/dtc: Call pkg-config POSIXly correct
[ Upstream commit a8b309ce97 ]

Running with POSIXLY_CORRECT=1 in the environment the scripts/dtc build
fails, because pkg-config doesn't output anything when the flags come
after the arguments.

Fixes: 067c650c45 ("dtc: Use pkg-config to locate libyaml")
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220131112028.7907-1-t@laumann.xyz
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:40:15 +02:00
Linus Torvalds
9bf3fc5007 Merge tag 'devicetree-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree updates from Rob Herring:

 - Add Krzysztof Kozlowski as co-maintainer for DT bindings providing
   much needed help.

 - DT schema validation now takes DTB files as input rather than
   intermediate YAML files. This decouples the validation from the
   source level syntax information. There's a bunch of schema fixes as a
   result of switching to DTB based validation which exposed some errors
   and incomplete schemas and examples.

 - Kbuild improvements to explicitly warn users running 'make
   dt_binding_check' on missing yamllint

 - Expand DT_SCHEMA_FILES kbuild variable to take just a partial
   filename or path instead of the full path to 1 file.

 - Convert various bindings to schema format: mscc,vsc7514-switch,
   multiple GNSS bindings, ahci-platform, i2c-at91, multiple UFS
   bindings, cortina,gemini-sata-bridge, cortina,gemini-ethernet, Atmel
   SHA, Atmel TDES, Atmel AES, armv7m-systick, Samsung Exynos display
   subsystem, nuvoton,npcm7xx-timer, samsung,s3c2410-i2c, zynqmp_dma,
   msm/mdp4, rda,8810pl-uart

 - New schemas for u-boot environment variable partition, TI clksel

 - New compatible strings for Renesas RZ/V2L SoC

 - Vendor prefixes for Xen, HPE, deprecated Synopsys, deprecated
   HiSilicon

 - Add/fix schemas for QEMU Arm 'virt' machine

 - Drop unused of_alias_get_alias_list() function

 - Add a script to check DT unittest EXPECT message output. Pass
   messages also now print by default at PR_INFO level to help test
   automation.

* tag 'devicetree-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (96 commits)
  dt-bindings: kbuild: Make DT_SCHEMA_LINT a recursive variable
  dt-bindings: nvmem: add U-Boot environment variables binding
  dt-bindings: ufs: qcom: Add SM6350 compatible string
  dt-bindings: dmaengine: sifive,fu540-c000: include generic schema
  dt-bindings: gpio: pca95xx: drop useless consumer example
  Revert "of: base: Introduce of_alias_get_alias_list() to check alias IDs"
  dt-bindings: virtio,mmio: Allow setting devices 'dma-coherent'
  dt-bindings: gnss: Add two more chips
  dt-bindings: gnss: Rewrite sirfstar binding in YAML
  dt-bindings: gnss: Modify u-blox to use common bindings
  dt-bindings: gnss: Rewrite common bindings in YAML
  dt-bindings: ata: ahci-platform: Add rk3568-dwc-ahci compatible
  dt-bindings: ata: ahci-platform: Add power-domains property
  dt-bindings: ata: ahci-platform: Convert DT bindings to yaml
  dt-bindings: kbuild: Use DTB files for validation
  dt-bindings: kbuild: Pass DT_SCHEMA_FILES to dt-validate
  dt-bindings: Add QEMU virt machine compatible
  dt-bindings: arm: Convert QEMU fw-cfg to DT schema
  dt-bindings: i2c: at91: Add SAMA7G5 compatible strings list
  dt-bindings: i2c: convert i2c-at91 to json-schema
  ...
2022-03-26 11:41:53 -07:00
Rob Herring
ef8795f3f1 dt-bindings: kbuild: Use DTB files for validation
Switch the DT validation to use DTB files directly instead of a DTS to
YAML conversion.

The original motivation for supporting validation on DTB files was to
enable running validation on a running system (e.g. 'dt-validate
/sys/firmware/fdt') or other cases where the original source DTS is not
available.

The YAML format was not without issues. Using DTBs with the schema type
information solves some of those problems. The YAML format relies on the
DTS source level information including bracketing of properties, size
directives, and phandle tags all of which are lost in a DTB file. While
standardizing the bracketing is a good thing, it does cause a lot of
extra warnings and churn to fix them.

Another issue has been signed types are not validated correctly as sign
information is not propagated to YAML. Using the schema type information
allows for proper handling of signed types. YAML also can't represent
the full range of 64-bit integers as numbers are stored as floats by
most/all parsers.

The DTB validation works by decoding property values using the type
information in the schemas themselves. The main corner case this does
not work for is matrix types where neither dimension is fixed. For
now, checking the dimensions in these cases are skipped.

Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220310160513.1708182-3-robh@kernel.org
2022-03-11 11:16:16 -06:00
Frank Rowand
8e4296c286 of: unittest: add program to process EXPECT messages
If unittest detects a problem it will print a warning or error message
to the console.  Unittest also triggers warning and error messages from
other kernel code as a result of intentionally bad unittest data.  This
has led to confusion as to whether the triggered messages are an
expected result of a test or whether there is a real problem that is
independent of unittest.

EXPECT messages were added to unittest to report each triggered message
that is expected, resulting in verbose console output.

scripts/dtc/of_unittest is a new program that processes the EXPECT
messages to determine whether the triggered messages occurred and
also removes the excess verbosity of the EXPECT messages.  More
information is available from 'scripts/dtc/of_unittest_expect --help'.

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220201181413.2719955-1-frowand.list@gmail.com
2022-02-28 15:20:32 -06:00
Gustavo A. R. Silva
5224f79096 treewide: Replace zero-length arrays with flexible-array members
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

This code was transformed with the help of Coccinelle:
(next-20220214$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)

@@
identifier S, member, array;
type T1, T2;
@@

struct S {
  ...
  T1 member;
  T2 array[
- 0
  ];
};

UAPI and wireless changes were intentionally excluded from this patch
and will be sent out separately.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2022-02-17 07:00:39 -06:00
Thomas Bracht Laumann Jespersen
a8b309ce97 scripts/dtc: Call pkg-config POSIXly correct
Running with POSIXLY_CORRECT=1 in the environment the scripts/dtc build
fails, because pkg-config doesn't output anything when the flags come
after the arguments.

Fixes: 067c650c45 ("dtc: Use pkg-config to locate libyaml")
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220131112028.7907-1-t@laumann.xyz
2022-02-04 09:43:43 -06:00
Matthias Schiffer
078b5a4498 scripts/dtc: dtx_diff: remove broken example from help text
commit d8adf5b92a upstream.

dtx_diff suggests to use <(...) syntax to pipe two inputs into it, but
this has never worked: The /proc/self/fds/... paths passed by the shell
will fail the `[ -f "${dtx}" ] && [ -r "${dtx}" ]` check in compile_to_dts,
but even with this check removed, the function cannot work: hexdump will
eat up the DTB magic, making the subsequent dtc call fail, as a pipe
cannot be rewound.

Simply remove this broken example, as there is already an alternative one
that works fine.

Fixes: 10eadc253d ("dtc: create tool to diff device trees")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220113081918.10387-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 10:54:35 +01:00
Matthias Schiffer
d8adf5b92a scripts/dtc: dtx_diff: remove broken example from help text
dtx_diff suggests to use <(...) syntax to pipe two inputs into it, but
this has never worked: The /proc/self/fds/... paths passed by the shell
will fail the `[ -f "${dtx}" ] && [ -r "${dtx}" ]` check in compile_to_dts,
but even with this check removed, the function cannot work: hexdump will
eat up the DTB magic, making the subsequent dtc call fail, as a pipe
cannot be rewound.

Simply remove this broken example, as there is already an alternative one
that works fine.

Fixes: 10eadc253d ("dtc: create tool to diff device trees")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220113081918.10387-1-matthias.schiffer@ew.tq-group.com
2022-01-17 16:26:44 -06:00
Rob Herring
a77725a9a3 scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8
This adds the following commits from upstream:

0a3a9d3449c8 checks: Add an interrupt-map check
8fd24744e361 checks: Ensure '#interrupt-cells' only exists in interrupt providers
d8d1a9a77863 checks: Drop interrupt provider '#address-cells' check
52a16fd72824 checks: Make interrupt_provider check dependent on interrupts_extended_is_cell
37fd700685da treesource: Maintain phandle label/path on output
e33ce1d6a8c7 flattree: Use '\n', not ';' to separate asm pseudo-ops
d24cc189dca6 asm: Use assembler macros instead of cpp macros
ff3a30c115ad asm: Use .asciz and .ascii instead of .string
5eb5927d81ee fdtdump: fix -Werror=int-to-pointer-cast
0869f8269161 libfdt: Add ALIGNMENT error string
69595a167f06 checks: Fix bus-range check
72d09e2682a4 Makefile: add -Wsign-compare to warning options
b587787ef388 checks: Fix signedness comparisons warnings
69bed6c2418f dtc: Wrap phandle validity check
910221185560 fdtget: Fix signedness comparisons warnings
d966f08fcd21 tests: Fix signedness comparisons warnings
ecfb438c07fa dtc: Fix signedness comparisons warnings: pointer diff
5bec74a6d135 dtc: Fix signedness comparisons warnings: reservednum
24e7f511fd4a fdtdump: Fix signedness comparisons warnings
b6910bec1161 Bump version to v1.6.1
21d61d18f968 Fix CID 1461557
4c2ef8f4d14c checks: Introduce is_multiple_of()
e59ca36fb70e Make handling of cpp line information more tolerant
0c3fd9b6aceb checks: Drop interrupt_cells_is_cell check
6b3081abc4ac checks: Add check_is_cell() for all phandle+arg properties
2dffc192a77f yamltree: Remove marker ordering dependency
61e513439e40 pylibfdt: Rework "avoid unused variable warning" lines
c8bddd106095 tests: add a positive gpio test case
ad4abfadb687 checks: replace strstr and strrchr with strends
09c6a6e88718 dtc.h: add strends for suffix matching
9bb9b8d0b4a0 checks: tigthen up nr-gpios prop exception
b07b62ee3342 libfdt: Add FDT alignment check to fdt_check_header()
a2def5479950 libfdt: Check that the root-node name is empty
4ca61f84dc21 libfdt: Check that there is only one root node
34d708249a91 dtc: Remove -O dtbo support
8e7ff260f755 libfdt: Fix a possible "unchecked return value" warning
88875268c05c checks: Warn on node-name and property name being the same
9d2279e7e6ee checks: Change node-name check to match devicetree spec
f527c867a8c6 util: limit gnu_printf format attribute to gcc >= 4.4.0

Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Tested-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2021-10-29 08:55:38 -05:00
Jianqun Xu
57c92c0734 scripts: dtc: delete empty node after omit_unused_nodes
A node is empty node if its proplist/label/child both null or both
set as deleted.

Change-Id: Ia934c58df3305dc9531cc912322eb2728f7af689
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-30 18:56:26 +08:00
Liu, Changcheng
26004d2275 UPSTREAM: dts: remove cris & metag dts hard link file
arch cris & metag have been removed from supported archs.
The dts hard link files should also be removed, or the ctags
tool will give warning.

execute"ctags -R" or "gtags", output:
ctags: Warning: cannot open source file
"scripts/dtc/include-prefixes/cris" : No such file or directory
ctags: Warning: cannot open source file
"scripts/dtc/include-prefixes/metag" : No such file or directory

This patch was override by commit 9820464afd ("UPSTREAM:
devicetree: Move include prefixes from arch to separate
directory"), so apply it again.

Change-Id: I002617cde3f879bc8364f55502839b3c3cd2dd92
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
(cherry picked from commit 8d14f31ec9)
2021-05-08 20:58:44 +08:00
Masahiro Yamada
9009b45581 .gitignore: prefix local generated files with a slash
The pattern prefixed with '/' matches files in the same directory,
but not ones in sub-directories.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Andra Paraschiv <andraprs@amazon.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Gabriel Krisman Bertazi <krisman@collabora.com>
2021-05-02 00:43:35 +09:00
Tao Huang
bc69b758ef Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (176331 commits)
  ANDROID: GKI: Enable bounds sanitizer
  ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS
  ANDROID: abi_gki_aarch64_qcom: Add cpufreq related symbols
  ANDROID: cpufreq: Add a restricted vendor hook for freq transition
  ANDROID: scsi: ufs: add hooks to track ufs commands
  ANDROID: Fix compilation error when CPU_FREQ is disabled
  BACKPORT: kasan, arm64: allow using KUnit tests with HW_TAGS mode
  Revert "FROMGIT: kasan, arm64: allow using KUnit tests with HW_TAGS mode"
  Revert "BACKPORT: kasan: remove redundant config option"
  UPSTREAM: arm/kasan: fix the array size of kasan_early_shadow_pte[]
  FROMGIT: KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility
  FROMGIT: KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config()
  FROMGIT: KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available
  FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
  FROMGIT: KVM: arm64: Fix nVHE hyp panic host context restore
  FROMGIT: KVM: arm64: Avoid corrupting vCPU context register in guest exit
  FROMLIST: arm64: cpufeatures: Fix handling of CONFIG_CMDLINE for idreg overrides
  ANDROID: sched: Add vendor hook for uclamp_eff_value
  ANDROID: abi_gki_aarch64_qcom: Add CFS scheduler symbols
  ANDROID: GKI: Add mempool APIs to the symbol list
  ...

Change-Id: I4ed13984b97bc531d1dae61920457f31b84190e9

Conflicts:
	Documentation/devicetree/bindings/nvmem/rockchip-otp.txt
	arch/arm64/boot/dts/rockchip/px30.dtsi
	arch/arm64/boot/dts/rockchip/rk3308.dtsi
	arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
	drivers/clk/rockchip/Kconfig
	drivers/clk/rockchip/clk-rk3308.c
	drivers/gpu/drm/rockchip/rk3066_hdmi.c
	drivers/gpu/drm/rockchip/rockchip_rgb.c
	drivers/media/i2c/imx219.c
	drivers/nvmem/rockchip-otp.c
	drivers/power/supply/cw2015_battery.c
	sound/soc/codecs/cx2072x.c
	sound/soc/codecs/cx2072x.h
	sound/soc/codecs/rk3328_codec.c
2021-03-17 18:07:51 +08:00
Tao Huang
251c226c35 rk: revert to v4.19
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I502dce68b639df4ebf5a1688e0dc2e5c5763ebc2
2021-03-17 18:05:39 +08:00
Linus Torvalds
6bf331d5ce Merge tag 'devicetree-fixes-for-5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring:

 - Another batch of graph and video-interfaces schema conversions

 - Drop DT header symlink for dropped C6X arch

 - Fix bcm2711-hdmi schema error

* tag 'devicetree-fixes-for-5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: media: Use graph and video-interfaces schemas, round 2
  dts: drop dangling c6x symlink
  dt-bindings: bcm2711-hdmi: Fix broken schema
2021-03-05 12:12:28 -08:00
Michal Kubecek
497a4dc827 dts: drop dangling c6x symlink
With c6x architecture removal, scripts/dtc/include-prefixes/c6x symlink
lost its target. Drop the dangling symlink which triggers some distribution
check scripts.

Fixes: a579fcfa8e ("c6x: remove architecture")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210223204114.E7F55E0155@unicorn.suse.cz
2021-02-23 21:37:09 -06:00
Rob Herring
c3476d2f2b scripts/dtc: Add missing fdtoverlay to gitignore
Commit 0da6bcd9fc ("scripts: dtc: Build fdtoverlay tool") enabled
building fdtoverlay, but failed to add it to .gitignore.

Also add a note to keep hostprogs in sync with .gitignore.

Fixes: 0da6bcd9fc ("scripts: dtc: Build fdtoverlay tool")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2021-02-23 14:48:40 -08:00
Viresh Kumar
59b48a7151 scripts: dtc: Remove the unused fdtdump.c file
This was copied from external DTC repository long back and isn't used
anymore. Over that the dtc tool can be used to generate the dts source
back from the dtb. Remove the unused fdtdump.c file.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/7ea1a9e7fd5d75b7adfc2a4c40dde2d4ea3fddf8.1611904394.git.viresh.kumar@linaro.org
2021-02-04 09:00:04 -06:00
Viresh Kumar
0da6bcd9fc scripts: dtc: Build fdtoverlay tool
We will start building overlays for platforms soon in the kernel and
would need fdtoverlay going forward. Lets start building it.

The fdtoverlay program applies one or more overlay dtb blobs to a base
dtb blob. The kernel build system would later use fdtoverlay to generate
the overlaid blobs based on platform specific configurations.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/4a201dea3ba11a00cab7e936dfc1140dac1a1ae3.1611904394.git.viresh.kumar@linaro.org
2021-02-04 09:00:04 -06:00
Rob Herring
79edff1206 scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9
This adds the following commits from upstream:

183df9e9c2b9 gitignore: Ignore the swp files
0db6d09584e1 gitignore: Add cscope files
307afa1a7be8 Update Jon Loeliger's email
ca16a723fa9d fdtdump: Fix gcc11 warning
64990a272e8f srcpos: increase MAX_SRCFILE_DEPTH
163f0469bf2e dtc: Allow overlays to have .dtbo extension
3b01518e688d Set last_comp_version correctly in new dtb and fix potential version issues in fdt_open_into
f7e5737f26aa tests: Fix overlay_overlay_nosugar test case
7cd5d5fe43d5 libfdt: Tweak description of assume-aligned load helpers
a7c404099349 libfdt: Internally perform potentially unaligned loads
bab85e48a6f4 meson: increase default timeout for tests
f8b46098824d meson: do not assume python is installed, skip tests
30a56bce4f0b meson: fix -Wall warning
5e735860c478 libfdt: Check for 8-byte address alignment in fdt_ro_probe_()
67849a327927 build-sys: add meson build
05874d08212d pylibfdt: allow build out of tree
3bc3a6b9fe0c dtc: Fix signedness comparisons warnings: Wrap (-1)
e1147b159e92 dtc: Fix signedness comparisons warnings: change types
04cf1fdc0fcf convert-dtsv0: Fix signedness comparisons warning
b30013edb878 libfdt: Fix kernel-doc comments

Signed-off-by: Rob Herring <robh@kernel.org>
2021-02-04 09:00:04 -06:00
Viresh Kumar
b775f49fbc scripts: dtc: Fetch fdtoverlay.c from external DTC project
We will start building overlays for platforms soon in the kernel and
would need fdtoverlay tool going forward. Lets start fetching it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/28f66f70602225bb6aeb58e924c20bde9d864327.1611904394.git.viresh.kumar@linaro.org
2021-02-03 15:21:44 -06:00
Jianqun Xu
d709fc7b79 scripts: dtc: delete empty node after omit_unused_nodes
A node is empty node if its proplist/label/child both null or both
set as deleted.

Change-Id: Ia934c58df3305dc9531cc912322eb2728f7af689
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-01 09:26:26 +08:00
Rob Herring
6e9c9686d8 scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121
This adds the following commits from upstream:

cbca977ea121 checks: Allow PCI bridge child nodes without an address
73e0f143b73d libfdt: fdt_strerror(): Fix comparison warning
6c2be7d85315 libfdt: fdt_get_string(): Fix sequential write comparison warnings
82525f41d59e libfdt: libfdt_wip: Fix comparison warning
fb1f65f15832 libfdt: fdt_create_with_flags(): Fix comparison warning
f28aa271000b libfdt: fdt_move(): Fix comparison warnings
3d7c6f44195a libfdt: fdt_add_string_(): Fix comparison warning
10f682788c30 libfdt: fdt_node_offset_by_phandle(): Fix comparison warning
07158f4cf2a2 libfdt: overlay: Fix comparison warning
ce9e1f25a7de libfdt: fdt_resize(): Fix comparison warning
faa76fc10bc5 libfdt: fdt_splice_(): Fix comparison warning
54dca0985316 libfdt: fdt_get_string(): Fix comparison warnings
f8e11e61624e libfdt: fdt_grab_space_(): Fix comparison warning
0c43d4d7bf5a libfdt: fdt_mem_rsv(): Fix comparison warnings
442ea3dd1579 libfdt: fdt_offset_ptr(): Fix comparison warnings
ca19c3db2bf6 Makefile: Specify cflags for libyaml
7bb86f1c0956 libfdt: fix fdt_check_node_offset_ w/ VALID_INPUT
3d522abc7571 dtc: Include stdlib.h in util.h
808cdaaf524f dtc: Avoid UB when shifting
3e3138b4a956 libfdt: fix fdt_check_full buffer overrun

Signed-off-by: Rob Herring <robh@kernel.org>
2020-10-12 09:58:15 -05:00
Rob Herring
aa6174f0d3 Merge branch 'dt/linus' into dt/next 2020-10-06 08:38:32 -05:00
Uwe Kleine-König
efe84d408b scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting
When building with

	$ HOST_EXTRACFLAGS=-g make

the expectation is that host tools are built with debug informations.
This however doesn't happen if the Makefile assigns a new value to the
HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for
the first assignment.

Fixes: e3fd9b5384 ("scripts/dtc: consolidate include path options in Makefile")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>
2020-09-29 15:48:08 -05:00
Tao Huang
48f4e7f7c2 Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-09-01
CVE-2020-0402
CVE-2020-0404
CVE-2020-0407

* tag 'ASB-2020-09-05_4.19-stable': (3616 commits)
  Linux 4.19.143
  ALSA: usb-audio: Update documentation comment for MS2109 quirk
  HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage()
  tpm: Unify the mismatching TPM space buffer sizes
  usb: dwc3: gadget: Handle ZLP for sg requests
  usb: dwc3: gadget: Fix handling ZLP
  usb: dwc3: gadget: Don't setup more than requested
  btrfs: check the right error variable in btrfs_del_dir_entries_in_log
  usb: storage: Add unusual_uas entry for Sony PSZ drives
  USB: cdc-acm: rework notification_buffer resizing
  USB: gadget: u_f: Unbreak offset calculation in VLAs
  USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()
  USB: gadget: u_f: add overflow checks to VLA macros
  usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()
  USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge
  USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D
  USB: quirks: Add no-lpm quirk for another Raydium touchscreen
  usb: uas: Add quirk for PNY Pro Elite
  USB: yurex: Fix bad gfp argument
  drm/amd/pm: correct Vega12 swctf limit setting
  ...

Change-Id: Iece02c55e9b3446bdda5dc7bdfbe3e310b2dbc83

Conflicts:
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm64/boot/dts/rockchip/rk3399.dtsi
	arch/arm64/kernel/cpuinfo.c
	drivers/clk/clk.c
	drivers/clk/rockchip/clk-cpu.c
	drivers/clk/rockchip/clk-rk3228.c
	drivers/devfreq/governor_simpleondemand.c
	drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
	drivers/gpu/drm/drm_edid.c
	drivers/hid/usbhid/hid-core.c
	drivers/media/i2c/ov5695.c
	drivers/media/v4l2-core/v4l2-ioctl.c
	drivers/regulator/core.c
	drivers/thermal/cpu_cooling.c
	drivers/usb/core/quirks.c
	drivers/usb/dwc2/platform.c
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/core.h
	drivers/usb/dwc3/gadget.c
	drivers/usb/host/ehci-platform.c
	drivers/usb/storage/unusual_uas.h
	include/drm/drm_connector.h
	include/linux/clk-provider.h
	include/linux/devfreq.h
	include/linux/pci_ids.h
	kernel/power/wakeup_reason.c
	mm/memory.c
	mm/swapfile.c
2020-09-24 17:59:50 +08:00
Geert Uytterhoeven
4036707c7c scripts/dtc: dtx_diff - make help text formatting consistent
None of the help texts use capitalization, except the one for the -T
option.  Drop the capitalization for consistency.
Split the single long line that doesn't fit in 80 characters.

Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200819124709.20401-1-geert+renesas@glider.be
2020-08-19 14:30:34 -06:00
Masahiro Yamada
faabed295c kbuild: introduce hostprogs-always-y and userprogs-always-y
To build host programs, you need to add the program names to 'hostprogs'
to use the necessary build rule, but it is not enough to build them
because there is no dependency.

There are two types of host programs: built as the prerequisite of
another (e.g. gen_crc32table in lib/Makefile), or always built when
Kbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile).

The latter is typical in Makefiles under scripts/, which contains host
programs globally used during the kernel build. To build them, you need
to add them to both 'hostprogs' and 'always-y'.

This commit adds hostprogs-always-y as a shorthand.

The same applies to user programs. net/bpfilter/Makefile builds
bpfilter_umh on demand, hence always-y is unneeded. In contrast,
programs under samples/ are added to both 'userprogs' and 'always-y'
so they are always built when Kbuild visits the Makefiles.

userprogs-always-y works as a shorthand.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2020-08-10 01:32:59 +09:00
Rob Herring
3eb619b2f7 scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c
Sync with upstream dtc primarily to pickup the I2C bus check fixes. The
interrupt_provider check is noisy, so turn it off for now.

This adds the following commits from upstream:

9d7888cbf19c dtc: Consider one-character strings as strings
8259d59f59de checks: Improve i2c reg property checking
fdabcf2980a4 checks: Remove warning for I2C_OWN_SLAVE_ADDRESS
2478b1652c8d libfdt: add extern "C" for C++
f68bfc2668b2 libfdt: trivial typo fix
7be250b4d059 libfdt: Correct condition for reordering blocks
81e0919a3e21 checks: Add interrupt provider test
85e5d839847a Makefile: when building libfdt only, do not add unneeded deps
b28464a550c5 Fix some potential unaligned accesses in dtc

Signed-off-by: Rob Herring <robh@kernel.org>
2020-06-30 08:42:26 -06:00
Masahiro Yamada
f8d8b46cd2 scripts/dtc: use pkg-config to include <yaml.h> in non-standard path
Commit 067c650c45 ("dtc: Use pkg-config to locate libyaml") added
'pkg-config --libs' to link libyaml installed in a non-standard
location.

yamltree.c includes <yaml.h>, but that commit did not add the search
path for <yaml.h>. If /usr/include/yaml.h does not exist, it fails to
build. A user can explicitly pass HOSTCFLAGS to work around it, but
the policy is not consistent.

There are two ways to deal with libraries in a non-default location.

[1] Use HOSTCFLAGS and HOSTLDFLAGS for additional search paths for
    headers and libraries.
    They are documented in Documentation/kbuild/kbuild.rst

    $ make HOSTCFLAGS='-I <prefix>/include' HOSTLDFLAGS='-L <prefix>/lib'

[2] Use pkg-config

    'pkg-config --cflags' for querying the header search path
    'pkg-config --libs'   for querying the lib and its path

If we go with pkg-config, use [2] consistently. Do not mix up
[1] and [2].

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2020-06-08 13:14:00 -06:00
Masahiro Yamada
0903060fe5 kbuild: check libyaml installation for 'make dt_binding_check'
If you run 'make dtbs_check' without installing the libyaml package,
the error message "dtc needs libyaml ..." is shown.

This should be checked also for 'make dt_binding_check' because dtc
needs to validate *.example.dts extracted from *.yaml files.

It is missing since commit 4f0e3a57d6 ("kbuild: Add support for DT
binding schema checks"), but this fix-up is applicable only after commit
e10c4321dc ("kbuild: allow to run dt_binding_check and dtbs_check
in a single command").

I gave the Fixes tag to the latter in case somebody is interested in
back-porting this.

Fixes: e10c4321dc ("kbuild: allow to run dt_binding_check and dtbs_check in a single command")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2020-04-17 10:45:23 -05:00
Jianqun Xu
78f23081e1 scripts/dtc: Support delete unused nodes
Delete nodes in case of:
* node is null, without any property and children node
* node with 'status' property but not "okay" or "ok"

Change-Id: Ic7d2ba1cb60350c21fa6a46222c20870c74359d4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-04-07 19:27:31 +08:00