From 8d54d185ffb14361bf0ce3daff4f15c6029d7859 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Wed, 15 Nov 2017 11:50:50 -0600 Subject: [PATCH] Linux v4.14 --- ...ng-rtl8822be-fix-wrong-dma-unmap-len.patch | 46 + ...q-wmi-Add-DMI-check-before-binding-t.patch | 72 + ...17042_battery-Add-support-for-ACPI-e.patch | 78 - ...o-Fix-reporting-invalid-suggested-of.patch | 118 + ...17042_battery-Fix-ACPI-interrupt-iss.patch | 80 - ...d-support-for-capacitive-home-button.patch | 53 - ...-Add-support-for-BOSC0200-ACPI-devic.patch | 32 - ...ntel-Cherry-Trail-Whiskey-Cove-SMBUS.patch | 410 -- ...support-for-CPUs-without-virtual-NMI.patch | 296 + CVE-2017-7477.patch | 73 - ...e-the-HID-device-is-opened-on-resume.patch | 74 - ...-prevent-KEYCTL_READ-on-negative-key.patch | 88 - ...ng-root-ports-in-link-state-handling.patch | 55 + USB-ulpi-fix-bus-node-lookup.patch | 48 + allwinner-net-emac.patch | 308 - arm-exynos-fix-usb3.patch | 411 ++ arm-of-restrict-dma-configuration.patch | 121 - arm-tegra-fix-gpu-iommu.patch | 39 - arm64-socionext-96b-enablement.patch | 3099 +++++++++ .../CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ | 1 + baseconfig/CONFIG_ALTERA_MSGDMA | 1 + baseconfig/CONFIG_ATH10K_USB | 1 + baseconfig/CONFIG_BATTERY_MAX1721X | 1 + baseconfig/CONFIG_BLK_CPQ_CISS_DA | 1 - baseconfig/CONFIG_BLK_DEV_UB | 1 - baseconfig/CONFIG_BNXT_FLOWER_OFFLOAD | 1 + baseconfig/CONFIG_BPF_STREAM_PARSER | 1 + baseconfig/CONFIG_BT_SCO | 1 - baseconfig/CONFIG_CCS811 | 1 + baseconfig/CONFIG_CEC_PIN | 1 + baseconfig/CONFIG_CHARGER_QCOM_SMBB | 1 - baseconfig/CONFIG_CISS_SCSI_TAPE | 1 - baseconfig/CONFIG_CLK_HSDK | 1 + baseconfig/CONFIG_CLOCK_THERMAL | 1 + baseconfig/CONFIG_CRYPTO_DEV_SP_CCP | 1 + baseconfig/CONFIG_CRYPTO_GCM | 2 +- baseconfig/CONFIG_CRYPTO_GHASH | 2 +- baseconfig/CONFIG_DEVFREQ_THERMAL | 1 + baseconfig/CONFIG_DP83867_PHY | 2 +- baseconfig/CONFIG_DVB_DDBRIDGE_MSIENABLE | 1 + baseconfig/CONFIG_EXPERIMENTAL | 1 - baseconfig/CONFIG_GPIO_BD9571MWV | 1 + baseconfig/CONFIG_GPIO_TPS68470 | 1 + baseconfig/CONFIG_HID_ASUS | 2 +- baseconfig/CONFIG_I2C_PARPORT_LIGHT | 2 +- baseconfig/CONFIG_INFINIBAND_EXP_USER_ACCESS | 1 + baseconfig/CONFIG_INOTIFY | 1 - baseconfig/CONFIG_INPUT_PWM_VIBRA | 1 + baseconfig/CONFIG_INPUT_RK805_PWRKEY | 1 + baseconfig/CONFIG_IP_DCCP | 2 +- baseconfig/CONFIG_IR_GPIO_TX | 1 + baseconfig/CONFIG_IR_PWM_TX | 1 + baseconfig/CONFIG_LEDS_AS3645A | 1 + baseconfig/CONFIG_LEDS_IS31FL32XX | 2 +- .../CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT | 1 + baseconfig/CONFIG_LTC2471 | 1 + baseconfig/CONFIG_MDIO_I2C | 1 + baseconfig/CONFIG_MFD_BD9571MWV | 1 + baseconfig/CONFIG_MFD_TPS68470 | 1 + baseconfig/CONFIG_MLX5_ESWITCH | 1 + baseconfig/CONFIG_MLX5_MPFS | 1 + baseconfig/CONFIG_MMC_BLOCK_BOUNCE | 1 - baseconfig/CONFIG_MMC_TOSHIBA_PCI | 2 +- baseconfig/CONFIG_NET_NSH | 1 + baseconfig/CONFIG_NET_VENDOR_HUAWEI | 1 + baseconfig/CONFIG_NET_VENDOR_SNI | 1 + baseconfig/CONFIG_NFT_FIB_NETDEV | 1 + baseconfig/CONFIG_PARPORT | 2 +- baseconfig/CONFIG_PARPORT_PC | 2 +- baseconfig/CONFIG_PATA_ARASAN_CF | 2 +- baseconfig/CONFIG_PATA_ATIIXP | 2 +- baseconfig/CONFIG_PATA_CYPRESS | 2 +- baseconfig/CONFIG_PATA_MPIIX | 2 +- baseconfig/CONFIG_PATA_OLDPIIX | 2 +- baseconfig/CONFIG_PATA_RDC | 2 +- baseconfig/CONFIG_PATA_SCH | 2 +- baseconfig/CONFIG_PATA_TOSHIBA | 2 +- baseconfig/CONFIG_PATA_TRIFLEX | 2 +- baseconfig/CONFIG_PCIE_DW_HOST_ECAM | 1 + baseconfig/CONFIG_PHYLINK | 1 + baseconfig/CONFIG_PHY_MVEBU_CP110_COMPHY | 1 + baseconfig/CONFIG_PI433 | 1 + baseconfig/CONFIG_PINCTRL_MSM8994 | 1 - baseconfig/CONFIG_PINCTRL_RK805 | 1 + baseconfig/CONFIG_PINCTRL_SPRD | 1 + baseconfig/CONFIG_PINCTRL_SPRD_SC9860 | 1 + baseconfig/CONFIG_PM_OPP | 2 +- baseconfig/CONFIG_PPS_GENERATOR_PARPORT | 1 - baseconfig/CONFIG_QCOM_GLINK_SSR | 1 + baseconfig/CONFIG_R8822BE | 1 + baseconfig/CONFIG_REGULATOR_BD9571MWV | 1 + baseconfig/CONFIG_RESET_ATTACK_MITIGATION | 1 + baseconfig/CONFIG_RESET_HSDK_V1 | 1 + baseconfig/CONFIG_RMNET | 1 + baseconfig/CONFIG_ROCKCHIP_PHY | 1 + baseconfig/CONFIG_RPMSG_QCOM_GLINK_SMEM | 1 + baseconfig/CONFIG_SENSORS_IBM_CFFPS | 1 + baseconfig/CONFIG_SENSORS_TPS53679 | 1 + baseconfig/CONFIG_SERIO_GPIO_PS2 | 1 + baseconfig/CONFIG_SFP | 1 + baseconfig/CONFIG_SLAB_FREELIST_HARDENED | 1 + baseconfig/CONFIG_SND_HDA_POWER_SAVE_DEFAULT | 2 +- baseconfig/CONFIG_SND_SOC_CS43130 | 1 + baseconfig/CONFIG_SND_SOC_WM8524 | 1 + baseconfig/CONFIG_SQUASHFS_ZSTD | 1 + baseconfig/CONFIG_STRING_SELFTEST | 1 + baseconfig/CONFIG_SURFACE3_WMI | 1 - baseconfig/CONFIG_SURFACE_3_BUTTON | 2 +- baseconfig/CONFIG_TI_SYSCON_RESET | 1 - baseconfig/CONFIG_USB_LED | 1 - baseconfig/CONFIG_VIDEO_RENESAS_VSP1 | 1 - baseconfig/CONFIG_W1_SLAVE_DS2805 | 1 + baseconfig/CONFIG_WIL6210_DEBUGFS | 1 + baseconfig/CONFIG_ZRAM_WRITEBACK | 1 + .../arm/{arm64 => }/CONFIG_ARCH_BCM_IPROC | 0 baseconfig/arm/CONFIG_BLK_DEV_SX8 | 1 + .../arm/CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG | 1 + baseconfig/arm/CONFIG_CRYPTO_SHA256_ARM64 | 2 +- baseconfig/arm/CONFIG_DRM_DW_HDMI_CEC | 1 + baseconfig/arm/CONFIG_DRM_VC4_HDMI_CEC | 1 + baseconfig/arm/CONFIG_EXTCON_USBC_CROS_EC | 1 + baseconfig/arm/CONFIG_HW_RANDOM_IMX_RNGC | 1 + baseconfig/{ => arm}/CONFIG_HW_RANDOM_OMAP | 0 baseconfig/arm/CONFIG_I2C_DESIGNWARE_CORE | 2 +- baseconfig/arm/CONFIG_I2C_DESIGNWARE_PLATFORM | 2 +- baseconfig/arm/CONFIG_IOMMU_DMA | 1 + baseconfig/arm/CONFIG_MESON_GX_SOCINFO | 1 + .../arm/{armv7 => }/CONFIG_MTD_NAND_PXA3xx | 0 baseconfig/arm/CONFIG_PARPORT | 1 - baseconfig/arm/CONFIG_PATA_ALI | 1 + baseconfig/arm/CONFIG_PATA_AMD | 1 + baseconfig/arm/CONFIG_PATA_ARTOP | 1 + baseconfig/arm/CONFIG_PATA_ATP867X | 1 + baseconfig/arm/CONFIG_PATA_CMD640_PCI | 1 + baseconfig/arm/CONFIG_PATA_CMD64X | 1 + baseconfig/arm/CONFIG_PATA_CS5520 | 1 + baseconfig/arm/CONFIG_PATA_CS5530 | 1 + baseconfig/arm/CONFIG_PATA_CS5535 | 1 + baseconfig/arm/CONFIG_PATA_CS5536 | 1 + baseconfig/arm/CONFIG_PATA_EFAR | 1 + baseconfig/arm/CONFIG_PATA_HPT366 | 1 + baseconfig/arm/CONFIG_PATA_HPT37X | 1 + baseconfig/arm/CONFIG_PATA_HPT3X2N | 1 + baseconfig/arm/CONFIG_PATA_HPT3X3 | 1 + baseconfig/arm/CONFIG_PATA_IT8213 | 1 + baseconfig/arm/CONFIG_PATA_IT821X | 1 + baseconfig/arm/CONFIG_PATA_JMICRON | 1 + baseconfig/arm/CONFIG_PATA_NETCELL | 1 + baseconfig/arm/CONFIG_PATA_NINJA32 | 1 + baseconfig/arm/CONFIG_PATA_NS87410 | 1 + baseconfig/arm/CONFIG_PATA_NS87415 | 1 + baseconfig/arm/CONFIG_PATA_OF_PLATFORM | 1 - baseconfig/arm/CONFIG_PATA_OPTI | 1 + baseconfig/arm/CONFIG_PATA_OPTIDMA | 1 + baseconfig/arm/CONFIG_PATA_PDC2027X | 1 + baseconfig/arm/CONFIG_PATA_PDC_OLD | 1 + baseconfig/arm/CONFIG_PATA_SERVERWORKS | 1 + baseconfig/arm/CONFIG_PATA_SIL680 | 1 + baseconfig/arm/CONFIG_PATA_SIS | 1 + baseconfig/arm/CONFIG_PATA_VIA | 1 + baseconfig/arm/CONFIG_PATA_WINBOND | 1 + baseconfig/arm/CONFIG_RADIO_WL128X | 1 - baseconfig/arm/CONFIG_ROCKCHIP_PHY | 1 + baseconfig/arm/CONFIG_SATA_INIC162X | 1 + baseconfig/arm/CONFIG_SATA_NV | 1 + baseconfig/arm/CONFIG_SATA_PROMISE | 1 + baseconfig/arm/CONFIG_SATA_QSTOR | 1 + baseconfig/arm/CONFIG_SATA_SIL | 1 + baseconfig/arm/CONFIG_SATA_SIL24 | 1 + baseconfig/arm/CONFIG_SATA_SIS | 1 + baseconfig/arm/CONFIG_SATA_SVW | 1 + baseconfig/arm/CONFIG_SATA_SX4 | 1 + baseconfig/arm/CONFIG_SATA_ULI | 1 + baseconfig/arm/CONFIG_SATA_VIA | 1 + baseconfig/arm/CONFIG_SATA_VITESSE | 1 + .../armv7 => }/CONFIG_SND_SOC_TEGRA20_AC97 | 0 .../armv7 => }/CONFIG_SND_SOC_TEGRA20_DAS | 0 .../{armv7 => }/CONFIG_SND_SOC_TEGRA20_I2S | 0 .../armv7 => }/CONFIG_SND_SOC_TEGRA20_SPDIF | 0 .../{armv7 => }/CONFIG_SND_SOC_TEGRA30_AHUB | 0 .../{armv7 => }/CONFIG_SND_SOC_TEGRA30_I2S | 0 baseconfig/arm/{armv7 => }/CONFIG_SUNXI_SRAM | 0 baseconfig/arm/CONFIG_TINYDRM_REPAPER | 1 + baseconfig/arm/CONFIG_TINYDRM_ST7586 | 1 + baseconfig/arm/CONFIG_TI_ST | 1 - .../arm/{arm64 => }/CONFIG_USB_CHIPIDEA | 0 .../arm/{arm64 => }/CONFIG_USB_CHIPIDEA_HOST | 0 .../arm/{arm64 => }/CONFIG_USB_CHIPIDEA_UDC | 0 .../arm/{arm64 => }/CONFIG_USB_CHIPIDEA_ULPI | 0 baseconfig/arm/CONFIG_VIDEO_MESON_AO_CEC | 1 + .../arm/arm64/CONFIG_ARCH_TEGRA_186_SOC | 2 +- baseconfig/arm/arm64/CONFIG_ARCH_VULCAN | 1 - baseconfig/arm/arm64/CONFIG_ARM64_PMEM | 1 + .../arm/arm64/CONFIG_ARM_TEGRA186_CPUFREQ | 1 + baseconfig/{ => arm/arm64}/CONFIG_ATA_ACPI | 0 baseconfig/arm/arm64/CONFIG_CHARGER_QCOM_SMBB | 1 + baseconfig/arm/arm64/CONFIG_CRYPTO_AES_ARM64 | 2 +- baseconfig/arm/arm64/CONFIG_DMI | 1 - baseconfig/arm/arm64/CONFIG_DMIID | 1 - baseconfig/arm/arm64/CONFIG_DMI_SYSFS | 1 - baseconfig/arm/arm64/CONFIG_GPIO_THUNDERX | 1 + .../arm/{ => arm64}/CONFIG_MFD_SPMI_PMIC | 0 baseconfig/arm/arm64/CONFIG_MMC_QCOM_DML | 2 +- baseconfig/arm/arm64/CONFIG_NET_VENDOR_SNI | 1 + baseconfig/arm/arm64/CONFIG_PARPORT_PC | 1 - baseconfig/{ => arm/arm64}/CONFIG_PATA_ACPI | 0 baseconfig/arm/arm64/CONFIG_PCIE_DW_HOST_ECAM | 1 + .../arm/arm64/CONFIG_PHY_MVEBU_CP110_COMPHY | 1 + baseconfig/arm/arm64/CONFIG_RANDOMIZE_BASE | 2 +- .../arm64/CONFIG_RANDOMIZE_MODULE_REGION_FULL | 1 + baseconfig/arm/arm64/CONFIG_RELOCATABLE | 2 +- baseconfig/arm/arm64/CONFIG_SNI_NETSEC | 1 + .../arm64/CONFIG_SOCIONEXT_SYNQUACER_PREITS | 1 + .../arm/arm64/CONFIG_USB_CONFIGFS_F_LB_SS | 1 + baseconfig/arm/arm64/CONFIG_VIDEO_QCOM_CAMSS | 1 + baseconfig/arm/arm64/CONFIG_VMAP_STACK | 1 + .../arm/{ => armv7}/CONFIG_DRM_SUN4I_BACKEND | 0 .../arm/armv7/CONFIG_DRM_SUN4I_HDMI_CEC | 1 + baseconfig/arm/armv7/CONFIG_MMC_QCOM_DML | 1 - baseconfig/arm/armv7/CONFIG_OMAP2_DSS_DEBUG | 1 - baseconfig/arm/armv7/CONFIG_PATA_FTIDE010 | 1 - baseconfig/arm/armv7/CONFIG_PINCTRL_BCM281XX | 1 - baseconfig/arm/armv7/CONFIG_PINCTRL_IMX35 | 1 - baseconfig/arm/armv7/CONFIG_PWM_TIECAP | 1 + baseconfig/arm/armv7/CONFIG_RTC_DRV_ARMADA38X | 1 - baseconfig/arm/armv7/CONFIG_SUN4I_A10_CCU | 1 + baseconfig/arm/armv7/CONFIG_SUN8I_A83T_CCU | 1 + baseconfig/arm/armv7/CONFIG_SUN8I_DE2_CCU | 1 + baseconfig/arm/armv7/CONFIG_SUN8I_R40_CCU | 1 + .../armv7/armv7/CONFIG_BATTERY_BQ27XXX_HDQ | 1 + .../arm/armv7/armv7/CONFIG_CHARGER_QCOM_SMBB | 1 + .../arm/armv7/armv7/CONFIG_IMX_REMOTEPROC | 1 + .../arm/armv7/armv7/CONFIG_MFD_SPMI_PMIC | 1 + .../arm/armv7/armv7/CONFIG_MMC_QCOM_DML | 2 +- .../arm/armv7/armv7/CONFIG_TI_SYSCON_RESET | 1 - .../arm/armv7/armv7/CONFIG_USB_CHIPIDEA | 1 - .../arm/armv7/armv7/CONFIG_USB_CHIPIDEA_HOST | 1 - .../arm/armv7/armv7/CONFIG_USB_CHIPIDEA_UDC | 1 - .../arm/armv7/armv7/CONFIG_USB_CHIPIDEA_ULPI | 1 - .../arm/armv7/armv7/CONFIG_VIDEO_QCOM_CAMSS | 1 + .../arm/armv7/lpae/CONFIG_SND_SOC_TEGRA20_DAS | 1 - .../arm/armv7/lpae/CONFIG_TI_SYSCON_RESET | 1 - .../CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE | 2 +- baseconfig/powerpc/CONFIG_PPC_MEMTRACE | 1 + baseconfig/powerpc/CONFIG_PPC_VAS | 1 + baseconfig/powerpc/CONFIG_SENSORS_IBM_CFFPS | 1 + baseconfig/powerpc/CONFIG_SWIOTLB | 2 +- .../powerpc64p7/CONFIG_CPU_LITTLE_ENDIAN | 1 - .../powerpc/powerpc64p7/CONFIG_GENERIC_PHY | 1 - baseconfig/powerpc/powerpc64p7/CONFIG_I2C_MUX | 1 - .../powerpc/powerpc64p7/CONFIG_MFD_CORE | 1 - .../powerpc/powerpc64p7/CONFIG_POWER7_CPU | 1 - .../powerpc/powerpc64p7/CONFIG_SERIAL_CORE | 1 - baseconfig/s390x/CONFIG_BLK_CPQ_CISS_DA | 1 - baseconfig/s390x/CONFIG_CMA | 1 + baseconfig/s390x/CONFIG_CMA_AREAS | 1 + baseconfig/s390x/CONFIG_CMA_DEBUG | 1 + baseconfig/s390x/CONFIG_CMA_DEBUGFS | 1 + baseconfig/s390x/CONFIG_I2C_PARPORT | 1 - baseconfig/s390x/CONFIG_I2C_PARPORT_LIGHT | 1 - baseconfig/s390x/CONFIG_MFD_BD9571MWV | 1 + baseconfig/s390x/CONFIG_MFD_RTSX_USB | 1 + baseconfig/s390x/CONFIG_MFD_TPS68470 | 1 + baseconfig/s390x/CONFIG_MFD_VIPERBOARD | 1 + baseconfig/s390x/CONFIG_PARPORT | 1 - baseconfig/s390x/CONFIG_VMCP_CMA_SIZE | 1 + baseconfig/x86/CONFIG_ATA_ACPI | 1 + .../x86/CONFIG_CONFIG_PINCTRL_LEWISBURG | 1 + baseconfig/x86/CONFIG_HID_ASUS | 1 + baseconfig/x86/CONFIG_HYPERV_VSOCKETS | 1 + baseconfig/{ => x86}/CONFIG_I2C_PARPORT | 0 baseconfig/x86/CONFIG_I2C_PARPORT_LIGHT | 1 + baseconfig/x86/CONFIG_INTEL_RDT | 1 + baseconfig/x86/CONFIG_MAXSMP | 2 +- baseconfig/x86/CONFIG_MMC_TOSHIBA_PCI | 1 + baseconfig/x86/CONFIG_PARPORT | 1 + baseconfig/{ => x86}/CONFIG_PARPORT_1284 | 0 baseconfig/{ => x86}/CONFIG_PARPORT_AX88796 | 0 baseconfig/x86/CONFIG_PARPORT_PC | 1 + baseconfig/{ => x86}/CONFIG_PARPORT_PC_FIFO | 0 baseconfig/{ => x86}/CONFIG_PARPORT_PC_PCMCIA | 0 .../{ => x86}/CONFIG_PARPORT_PC_SUPERIO | 0 baseconfig/{ => x86}/CONFIG_PARPORT_SERIAL | 0 baseconfig/x86/CONFIG_PATA_ACPI | 1 + baseconfig/x86/CONFIG_PATA_ATIIXP | 1 + baseconfig/x86/CONFIG_PATA_MPIIX | 1 + baseconfig/x86/CONFIG_PATA_OLDPIIX | 1 + baseconfig/x86/CONFIG_PATA_SCH | 1 + baseconfig/x86/CONFIG_PATA_TOSHIBA | 1 + baseconfig/x86/CONFIG_PATA_TRIFLEX | 1 + baseconfig/x86/CONFIG_PINCTRL_DENVERTON | 1 + .../{ => x86}/CONFIG_PPS_CLIENT_PARPORT | 0 baseconfig/{ => x86}/CONFIG_SENSORS_HDAPS | 0 .../CONFIG_USB_SERIAL_MOS7715_PARPORT | 0 baseconfig/x86/CONFIG_XEN_PVCALLS_BACKEND | 1 + baseconfig/x86/i686/CONFIG_PINCTRL_BCM281XX | 1 - .../x86/i686PAE/CONFIG_PINCTRL_BCM281XX | 1 - baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT | 1 + .../CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT | 1 + baseconfig/x86/x86_64/CONFIG_DEVICE_PRIVATE | 1 + baseconfig/x86/x86_64/CONFIG_DEVICE_PUBLIC | 1 + baseconfig/x86/x86_64/CONFIG_EXTCON_GPIO | 1 - baseconfig/x86/x86_64/CONFIG_EXTCON_MAX3355 | 1 - baseconfig/x86/x86_64/CONFIG_EXTCON_RT8973A | 1 - baseconfig/x86/x86_64/CONFIG_EXTCON_SM5502 | 1 - baseconfig/x86/x86_64/CONFIG_EXTCON_USB_GPIO | 1 - baseconfig/x86/x86_64/CONFIG_HMM_MIRROR | 1 + .../x86/x86_64/CONFIG_I2C_DESIGNWARE_CORE | 1 - .../x86/x86_64/CONFIG_I2C_DESIGNWARE_PLATFORM | 1 - .../CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT | 1 + baseconfig/x86/x86_64/CONFIG_NR_CPUS | 2 +- baseconfig/x86/x86_64/CONFIG_X86_5LEVEL | 1 + bcm2837-bluetooth-support.patch | 36 + bcm2837-move-dt.patch | 516 -- bcm283x-vc4-fixes.patch | 1803 ----- build_configs.sh | 2 - config_generation | 9 +- debugconfig/arm/armv7/CONFIG_DMADEVICES_DEBUG | 1 - debugconfig/x86/x86_64/CONFIG_NR_CPUS | 1 + drm-cma-reduce-dmesg-logs.patch | 43 + ...cks-if-we-miss-the-pageflip-s-vblank.patch | 200 + efi-lockdown.patch | 1653 +++-- filter-aarch64.sh | 2 +- filter-armv7hl.sh | 2 +- filter-modules.sh | 4 +- kbuild-AFTER_LINK.patch | 126 - kernel-aarch64-debug.config | 253 +- kernel-aarch64.config | 253 +- kernel-armv7hl-debug.config | 245 +- kernel-armv7hl-lpae-debug.config | 251 +- kernel-armv7hl-lpae.config | 251 +- kernel-armv7hl.config | 245 +- kernel-i686-PAE.config | 101 +- kernel-i686-PAEdebug.config | 99 +- kernel-i686-debug.config | 99 +- kernel-i686.config | 101 +- kernel-ppc64-debug.config | 136 +- kernel-ppc64.config | 136 +- kernel-ppc64le-debug.config | 136 +- kernel-ppc64le.config | 136 +- kernel-ppc64p7-debug.config | 5818 ----------------- kernel-ppc64p7.config | 5794 ---------------- kernel-s390x-debug.config | 136 +- kernel-s390x.config | 136 +- kernel-x86_64-debug.config | 104 +- kernel-x86_64.config | 108 +- kernel.spec | 176 +- ...-allow-L2-to-access-the-hardware-CR8.patch | 41 - ...required-netlink-attributes-presence.patch | 46 - no-pcspkr-modalias.patch | 8 +- pci-mark-amd-stoney-gpu-ats-as-broken.patch | 47 - ...rce-host-mode-for-USB-on-apq8016-sbc.patch | 93 - qcom-QDF2432-tmp-errata.patch | 59 - qcom-display-iommu.patch | 1960 ------ ...i_hdrc_msm_probe-missing-of_node_get.patch | 45 - qcom-msm89xx-fixes.patch | 159 - qxl-fixes.patch | 126 - silence-fbcon-logo.patch | 19 +- sources | 5 +- ...ovo-X1-Carbon-5-should-use-SMBUS-RMI.patch | 29 + 360 files changed, 7606 insertions(+), 19944 deletions(-) create mode 100644 0001-PATCH-staging-rtl8822be-fix-wrong-dma-unmap-len.patch create mode 100644 0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch delete mode 100644 0001-power-supply-max17042_battery-Add-support-for-ACPI-e.patch create mode 100644 0001-staging-vboxvideo-Fix-reporting-invalid-suggested-of.patch delete mode 100644 0002-power-supply-max17042_battery-Fix-ACPI-interrupt-iss.patch delete mode 100644 0011-Input-goodix-Add-support-for-capacitive-home-button.patch delete mode 100644 0013-iio-accel-bmc150-Add-support-for-BOSC0200-ACPI-devic.patch delete mode 100644 0015-i2c-cht-wc-Add-Intel-Cherry-Trail-Whiskey-Cove-SMBUS.patch create mode 100644 1-2-kvm-vmx-Reinstate-support-for-CPUs-without-virtual-NMI.patch delete mode 100644 CVE-2017-7477.patch delete mode 100644 HID-rmi-Make-sure-the-HID-device-is-opened-on-resume.patch delete mode 100644 KEYS-prevent-KEYCTL_READ-on-negative-key.patch create mode 100644 PCI-aspm-deal-with-missing-root-ports-in-link-state-handling.patch create mode 100644 USB-ulpi-fix-bus-node-lookup.patch create mode 100644 arm-exynos-fix-usb3.patch delete mode 100644 arm-of-restrict-dma-configuration.patch delete mode 100644 arm-tegra-fix-gpu-iommu.patch create mode 100644 arm64-socionext-96b-enablement.patch create mode 100644 baseconfig/CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ create mode 100644 baseconfig/CONFIG_ALTERA_MSGDMA create mode 100644 baseconfig/CONFIG_ATH10K_USB create mode 100644 baseconfig/CONFIG_BATTERY_MAX1721X delete mode 100644 baseconfig/CONFIG_BLK_CPQ_CISS_DA delete mode 100644 baseconfig/CONFIG_BLK_DEV_UB create mode 100644 baseconfig/CONFIG_BNXT_FLOWER_OFFLOAD create mode 100644 baseconfig/CONFIG_BPF_STREAM_PARSER delete mode 100644 baseconfig/CONFIG_BT_SCO create mode 100644 baseconfig/CONFIG_CCS811 create mode 100644 baseconfig/CONFIG_CEC_PIN delete mode 100644 baseconfig/CONFIG_CHARGER_QCOM_SMBB delete mode 100644 baseconfig/CONFIG_CISS_SCSI_TAPE create mode 100644 baseconfig/CONFIG_CLK_HSDK create mode 100644 baseconfig/CONFIG_CLOCK_THERMAL create mode 100644 baseconfig/CONFIG_CRYPTO_DEV_SP_CCP create mode 100644 baseconfig/CONFIG_DEVFREQ_THERMAL create mode 100644 baseconfig/CONFIG_DVB_DDBRIDGE_MSIENABLE delete mode 100644 baseconfig/CONFIG_EXPERIMENTAL create mode 100644 baseconfig/CONFIG_GPIO_BD9571MWV create mode 100644 baseconfig/CONFIG_GPIO_TPS68470 create mode 100644 baseconfig/CONFIG_INFINIBAND_EXP_USER_ACCESS delete mode 100644 baseconfig/CONFIG_INOTIFY create mode 100644 baseconfig/CONFIG_INPUT_PWM_VIBRA create mode 100644 baseconfig/CONFIG_INPUT_RK805_PWRKEY create mode 100644 baseconfig/CONFIG_IR_GPIO_TX create mode 100644 baseconfig/CONFIG_IR_PWM_TX create mode 100644 baseconfig/CONFIG_LEDS_AS3645A create mode 100644 baseconfig/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT create mode 100644 baseconfig/CONFIG_LTC2471 create mode 100644 baseconfig/CONFIG_MDIO_I2C create mode 100644 baseconfig/CONFIG_MFD_BD9571MWV create mode 100644 baseconfig/CONFIG_MFD_TPS68470 create mode 100644 baseconfig/CONFIG_MLX5_ESWITCH create mode 100644 baseconfig/CONFIG_MLX5_MPFS delete mode 100644 baseconfig/CONFIG_MMC_BLOCK_BOUNCE create mode 100644 baseconfig/CONFIG_NET_NSH create mode 100644 baseconfig/CONFIG_NET_VENDOR_HUAWEI create mode 100644 baseconfig/CONFIG_NET_VENDOR_SNI create mode 100644 baseconfig/CONFIG_NFT_FIB_NETDEV create mode 100644 baseconfig/CONFIG_PCIE_DW_HOST_ECAM create mode 100644 baseconfig/CONFIG_PHYLINK create mode 100644 baseconfig/CONFIG_PHY_MVEBU_CP110_COMPHY create mode 100644 baseconfig/CONFIG_PI433 delete mode 100644 baseconfig/CONFIG_PINCTRL_MSM8994 create mode 100644 baseconfig/CONFIG_PINCTRL_RK805 create mode 100644 baseconfig/CONFIG_PINCTRL_SPRD create mode 100644 baseconfig/CONFIG_PINCTRL_SPRD_SC9860 delete mode 100644 baseconfig/CONFIG_PPS_GENERATOR_PARPORT create mode 100644 baseconfig/CONFIG_QCOM_GLINK_SSR create mode 100644 baseconfig/CONFIG_R8822BE create mode 100644 baseconfig/CONFIG_REGULATOR_BD9571MWV create mode 100644 baseconfig/CONFIG_RESET_ATTACK_MITIGATION create mode 100644 baseconfig/CONFIG_RESET_HSDK_V1 create mode 100644 baseconfig/CONFIG_RMNET create mode 100644 baseconfig/CONFIG_ROCKCHIP_PHY create mode 100644 baseconfig/CONFIG_RPMSG_QCOM_GLINK_SMEM create mode 100644 baseconfig/CONFIG_SENSORS_IBM_CFFPS create mode 100644 baseconfig/CONFIG_SENSORS_TPS53679 create mode 100644 baseconfig/CONFIG_SERIO_GPIO_PS2 create mode 100644 baseconfig/CONFIG_SFP create mode 100644 baseconfig/CONFIG_SLAB_FREELIST_HARDENED create mode 100644 baseconfig/CONFIG_SND_SOC_CS43130 create mode 100644 baseconfig/CONFIG_SND_SOC_WM8524 create mode 100644 baseconfig/CONFIG_SQUASHFS_ZSTD create mode 100644 baseconfig/CONFIG_STRING_SELFTEST delete mode 100644 baseconfig/CONFIG_SURFACE3_WMI delete mode 100644 baseconfig/CONFIG_TI_SYSCON_RESET delete mode 100644 baseconfig/CONFIG_USB_LED delete mode 100644 baseconfig/CONFIG_VIDEO_RENESAS_VSP1 create mode 100644 baseconfig/CONFIG_W1_SLAVE_DS2805 create mode 100644 baseconfig/CONFIG_WIL6210_DEBUGFS create mode 100644 baseconfig/CONFIG_ZRAM_WRITEBACK rename baseconfig/arm/{arm64 => }/CONFIG_ARCH_BCM_IPROC (100%) create mode 100644 baseconfig/arm/CONFIG_BLK_DEV_SX8 create mode 100644 baseconfig/arm/CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG create mode 100644 baseconfig/arm/CONFIG_DRM_DW_HDMI_CEC create mode 100644 baseconfig/arm/CONFIG_DRM_VC4_HDMI_CEC create mode 100644 baseconfig/arm/CONFIG_EXTCON_USBC_CROS_EC create mode 100644 baseconfig/arm/CONFIG_HW_RANDOM_IMX_RNGC rename baseconfig/{ => arm}/CONFIG_HW_RANDOM_OMAP (100%) create mode 100644 baseconfig/arm/CONFIG_IOMMU_DMA create mode 100644 baseconfig/arm/CONFIG_MESON_GX_SOCINFO rename baseconfig/arm/{armv7 => }/CONFIG_MTD_NAND_PXA3xx (100%) delete mode 100644 baseconfig/arm/CONFIG_PARPORT create mode 100644 baseconfig/arm/CONFIG_PATA_ALI create mode 100644 baseconfig/arm/CONFIG_PATA_AMD create mode 100644 baseconfig/arm/CONFIG_PATA_ARTOP create mode 100644 baseconfig/arm/CONFIG_PATA_ATP867X create mode 100644 baseconfig/arm/CONFIG_PATA_CMD640_PCI create mode 100644 baseconfig/arm/CONFIG_PATA_CMD64X create mode 100644 baseconfig/arm/CONFIG_PATA_CS5520 create mode 100644 baseconfig/arm/CONFIG_PATA_CS5530 create mode 100644 baseconfig/arm/CONFIG_PATA_CS5535 create mode 100644 baseconfig/arm/CONFIG_PATA_CS5536 create mode 100644 baseconfig/arm/CONFIG_PATA_EFAR create mode 100644 baseconfig/arm/CONFIG_PATA_HPT366 create mode 100644 baseconfig/arm/CONFIG_PATA_HPT37X create mode 100644 baseconfig/arm/CONFIG_PATA_HPT3X2N create mode 100644 baseconfig/arm/CONFIG_PATA_HPT3X3 create mode 100644 baseconfig/arm/CONFIG_PATA_IT8213 create mode 100644 baseconfig/arm/CONFIG_PATA_IT821X create mode 100644 baseconfig/arm/CONFIG_PATA_JMICRON create mode 100644 baseconfig/arm/CONFIG_PATA_NETCELL create mode 100644 baseconfig/arm/CONFIG_PATA_NINJA32 create mode 100644 baseconfig/arm/CONFIG_PATA_NS87410 create mode 100644 baseconfig/arm/CONFIG_PATA_NS87415 delete mode 100644 baseconfig/arm/CONFIG_PATA_OF_PLATFORM create mode 100644 baseconfig/arm/CONFIG_PATA_OPTI create mode 100644 baseconfig/arm/CONFIG_PATA_OPTIDMA create mode 100644 baseconfig/arm/CONFIG_PATA_PDC2027X create mode 100644 baseconfig/arm/CONFIG_PATA_PDC_OLD create mode 100644 baseconfig/arm/CONFIG_PATA_SERVERWORKS create mode 100644 baseconfig/arm/CONFIG_PATA_SIL680 create mode 100644 baseconfig/arm/CONFIG_PATA_SIS create mode 100644 baseconfig/arm/CONFIG_PATA_VIA create mode 100644 baseconfig/arm/CONFIG_PATA_WINBOND delete mode 100644 baseconfig/arm/CONFIG_RADIO_WL128X create mode 100644 baseconfig/arm/CONFIG_ROCKCHIP_PHY create mode 100644 baseconfig/arm/CONFIG_SATA_INIC162X create mode 100644 baseconfig/arm/CONFIG_SATA_NV create mode 100644 baseconfig/arm/CONFIG_SATA_PROMISE create mode 100644 baseconfig/arm/CONFIG_SATA_QSTOR create mode 100644 baseconfig/arm/CONFIG_SATA_SIL create mode 100644 baseconfig/arm/CONFIG_SATA_SIL24 create mode 100644 baseconfig/arm/CONFIG_SATA_SIS create mode 100644 baseconfig/arm/CONFIG_SATA_SVW create mode 100644 baseconfig/arm/CONFIG_SATA_SX4 create mode 100644 baseconfig/arm/CONFIG_SATA_ULI create mode 100644 baseconfig/arm/CONFIG_SATA_VIA create mode 100644 baseconfig/arm/CONFIG_SATA_VITESSE rename baseconfig/arm/{armv7/armv7 => }/CONFIG_SND_SOC_TEGRA20_AC97 (100%) rename baseconfig/arm/{armv7/armv7 => }/CONFIG_SND_SOC_TEGRA20_DAS (100%) rename baseconfig/arm/{armv7 => }/CONFIG_SND_SOC_TEGRA20_I2S (100%) rename baseconfig/arm/{armv7/armv7 => }/CONFIG_SND_SOC_TEGRA20_SPDIF (100%) rename baseconfig/arm/{armv7 => }/CONFIG_SND_SOC_TEGRA30_AHUB (100%) rename baseconfig/arm/{armv7 => }/CONFIG_SND_SOC_TEGRA30_I2S (100%) rename baseconfig/arm/{armv7 => }/CONFIG_SUNXI_SRAM (100%) create mode 100644 baseconfig/arm/CONFIG_TINYDRM_REPAPER create mode 100644 baseconfig/arm/CONFIG_TINYDRM_ST7586 delete mode 100644 baseconfig/arm/CONFIG_TI_ST rename baseconfig/arm/{arm64 => }/CONFIG_USB_CHIPIDEA (100%) rename baseconfig/arm/{arm64 => }/CONFIG_USB_CHIPIDEA_HOST (100%) rename baseconfig/arm/{arm64 => }/CONFIG_USB_CHIPIDEA_UDC (100%) rename baseconfig/arm/{arm64 => }/CONFIG_USB_CHIPIDEA_ULPI (100%) create mode 100644 baseconfig/arm/CONFIG_VIDEO_MESON_AO_CEC delete mode 100644 baseconfig/arm/arm64/CONFIG_ARCH_VULCAN create mode 100644 baseconfig/arm/arm64/CONFIG_ARM64_PMEM create mode 100644 baseconfig/arm/arm64/CONFIG_ARM_TEGRA186_CPUFREQ rename baseconfig/{ => arm/arm64}/CONFIG_ATA_ACPI (100%) create mode 100644 baseconfig/arm/arm64/CONFIG_CHARGER_QCOM_SMBB delete mode 100644 baseconfig/arm/arm64/CONFIG_DMI delete mode 100644 baseconfig/arm/arm64/CONFIG_DMIID delete mode 100644 baseconfig/arm/arm64/CONFIG_DMI_SYSFS create mode 100644 baseconfig/arm/arm64/CONFIG_GPIO_THUNDERX rename baseconfig/arm/{ => arm64}/CONFIG_MFD_SPMI_PMIC (100%) create mode 100644 baseconfig/arm/arm64/CONFIG_NET_VENDOR_SNI delete mode 100644 baseconfig/arm/arm64/CONFIG_PARPORT_PC rename baseconfig/{ => arm/arm64}/CONFIG_PATA_ACPI (100%) create mode 100644 baseconfig/arm/arm64/CONFIG_PCIE_DW_HOST_ECAM create mode 100644 baseconfig/arm/arm64/CONFIG_PHY_MVEBU_CP110_COMPHY create mode 100644 baseconfig/arm/arm64/CONFIG_RANDOMIZE_MODULE_REGION_FULL create mode 100644 baseconfig/arm/arm64/CONFIG_SNI_NETSEC create mode 100644 baseconfig/arm/arm64/CONFIG_SOCIONEXT_SYNQUACER_PREITS create mode 100644 baseconfig/arm/arm64/CONFIG_USB_CONFIGFS_F_LB_SS create mode 100644 baseconfig/arm/arm64/CONFIG_VIDEO_QCOM_CAMSS create mode 100644 baseconfig/arm/arm64/CONFIG_VMAP_STACK rename baseconfig/arm/{ => armv7}/CONFIG_DRM_SUN4I_BACKEND (100%) create mode 100644 baseconfig/arm/armv7/CONFIG_DRM_SUN4I_HDMI_CEC delete mode 100644 baseconfig/arm/armv7/CONFIG_MMC_QCOM_DML delete mode 100644 baseconfig/arm/armv7/CONFIG_OMAP2_DSS_DEBUG delete mode 100644 baseconfig/arm/armv7/CONFIG_PATA_FTIDE010 delete mode 100644 baseconfig/arm/armv7/CONFIG_PINCTRL_BCM281XX delete mode 100644 baseconfig/arm/armv7/CONFIG_PINCTRL_IMX35 create mode 100644 baseconfig/arm/armv7/CONFIG_PWM_TIECAP delete mode 100644 baseconfig/arm/armv7/CONFIG_RTC_DRV_ARMADA38X create mode 100644 baseconfig/arm/armv7/CONFIG_SUN4I_A10_CCU create mode 100644 baseconfig/arm/armv7/CONFIG_SUN8I_A83T_CCU create mode 100644 baseconfig/arm/armv7/CONFIG_SUN8I_DE2_CCU create mode 100644 baseconfig/arm/armv7/CONFIG_SUN8I_R40_CCU create mode 100644 baseconfig/arm/armv7/armv7/CONFIG_BATTERY_BQ27XXX_HDQ create mode 100644 baseconfig/arm/armv7/armv7/CONFIG_CHARGER_QCOM_SMBB create mode 100644 baseconfig/arm/armv7/armv7/CONFIG_IMX_REMOTEPROC create mode 100644 baseconfig/arm/armv7/armv7/CONFIG_MFD_SPMI_PMIC delete mode 100644 baseconfig/arm/armv7/armv7/CONFIG_TI_SYSCON_RESET delete mode 100644 baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA delete mode 100644 baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_HOST delete mode 100644 baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_UDC delete mode 100644 baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_ULPI create mode 100644 baseconfig/arm/armv7/armv7/CONFIG_VIDEO_QCOM_CAMSS delete mode 100644 baseconfig/arm/armv7/lpae/CONFIG_SND_SOC_TEGRA20_DAS delete mode 100644 baseconfig/arm/armv7/lpae/CONFIG_TI_SYSCON_RESET create mode 100644 baseconfig/powerpc/CONFIG_PPC_MEMTRACE create mode 100644 baseconfig/powerpc/CONFIG_PPC_VAS create mode 100644 baseconfig/powerpc/CONFIG_SENSORS_IBM_CFFPS delete mode 100644 baseconfig/powerpc/powerpc64p7/CONFIG_CPU_LITTLE_ENDIAN delete mode 100644 baseconfig/powerpc/powerpc64p7/CONFIG_GENERIC_PHY delete mode 100644 baseconfig/powerpc/powerpc64p7/CONFIG_I2C_MUX delete mode 100644 baseconfig/powerpc/powerpc64p7/CONFIG_MFD_CORE delete mode 100644 baseconfig/powerpc/powerpc64p7/CONFIG_POWER7_CPU delete mode 100644 baseconfig/powerpc/powerpc64p7/CONFIG_SERIAL_CORE delete mode 100644 baseconfig/s390x/CONFIG_BLK_CPQ_CISS_DA create mode 100644 baseconfig/s390x/CONFIG_CMA create mode 100644 baseconfig/s390x/CONFIG_CMA_AREAS create mode 100644 baseconfig/s390x/CONFIG_CMA_DEBUG create mode 100644 baseconfig/s390x/CONFIG_CMA_DEBUGFS delete mode 100644 baseconfig/s390x/CONFIG_I2C_PARPORT delete mode 100644 baseconfig/s390x/CONFIG_I2C_PARPORT_LIGHT create mode 100644 baseconfig/s390x/CONFIG_MFD_BD9571MWV create mode 100644 baseconfig/s390x/CONFIG_MFD_RTSX_USB create mode 100644 baseconfig/s390x/CONFIG_MFD_TPS68470 create mode 100644 baseconfig/s390x/CONFIG_MFD_VIPERBOARD delete mode 100644 baseconfig/s390x/CONFIG_PARPORT create mode 100644 baseconfig/s390x/CONFIG_VMCP_CMA_SIZE create mode 100644 baseconfig/x86/CONFIG_ATA_ACPI create mode 100644 baseconfig/x86/CONFIG_CONFIG_PINCTRL_LEWISBURG create mode 100644 baseconfig/x86/CONFIG_HID_ASUS create mode 100644 baseconfig/x86/CONFIG_HYPERV_VSOCKETS rename baseconfig/{ => x86}/CONFIG_I2C_PARPORT (100%) create mode 100644 baseconfig/x86/CONFIG_I2C_PARPORT_LIGHT create mode 100644 baseconfig/x86/CONFIG_INTEL_RDT create mode 100644 baseconfig/x86/CONFIG_MMC_TOSHIBA_PCI create mode 100644 baseconfig/x86/CONFIG_PARPORT rename baseconfig/{ => x86}/CONFIG_PARPORT_1284 (100%) rename baseconfig/{ => x86}/CONFIG_PARPORT_AX88796 (100%) create mode 100644 baseconfig/x86/CONFIG_PARPORT_PC rename baseconfig/{ => x86}/CONFIG_PARPORT_PC_FIFO (100%) rename baseconfig/{ => x86}/CONFIG_PARPORT_PC_PCMCIA (100%) rename baseconfig/{ => x86}/CONFIG_PARPORT_PC_SUPERIO (100%) rename baseconfig/{ => x86}/CONFIG_PARPORT_SERIAL (100%) create mode 100644 baseconfig/x86/CONFIG_PATA_ACPI create mode 100644 baseconfig/x86/CONFIG_PATA_ATIIXP create mode 100644 baseconfig/x86/CONFIG_PATA_MPIIX create mode 100644 baseconfig/x86/CONFIG_PATA_OLDPIIX create mode 100644 baseconfig/x86/CONFIG_PATA_SCH create mode 100644 baseconfig/x86/CONFIG_PATA_TOSHIBA create mode 100644 baseconfig/x86/CONFIG_PATA_TRIFLEX create mode 100644 baseconfig/x86/CONFIG_PINCTRL_DENVERTON rename baseconfig/{ => x86}/CONFIG_PPS_CLIENT_PARPORT (100%) rename baseconfig/{ => x86}/CONFIG_SENSORS_HDAPS (100%) rename baseconfig/{ => x86}/CONFIG_USB_SERIAL_MOS7715_PARPORT (100%) create mode 100644 baseconfig/x86/CONFIG_XEN_PVCALLS_BACKEND delete mode 100644 baseconfig/x86/i686/CONFIG_PINCTRL_BCM281XX delete mode 100644 baseconfig/x86/i686PAE/CONFIG_PINCTRL_BCM281XX create mode 100644 baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT create mode 100644 baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT create mode 100644 baseconfig/x86/x86_64/CONFIG_DEVICE_PRIVATE create mode 100644 baseconfig/x86/x86_64/CONFIG_DEVICE_PUBLIC delete mode 100644 baseconfig/x86/x86_64/CONFIG_EXTCON_GPIO delete mode 100644 baseconfig/x86/x86_64/CONFIG_EXTCON_MAX3355 delete mode 100644 baseconfig/x86/x86_64/CONFIG_EXTCON_RT8973A delete mode 100644 baseconfig/x86/x86_64/CONFIG_EXTCON_SM5502 delete mode 100644 baseconfig/x86/x86_64/CONFIG_EXTCON_USB_GPIO create mode 100644 baseconfig/x86/x86_64/CONFIG_HMM_MIRROR delete mode 100644 baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_CORE delete mode 100644 baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_PLATFORM create mode 100644 baseconfig/x86/x86_64/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT create mode 100644 baseconfig/x86/x86_64/CONFIG_X86_5LEVEL create mode 100644 bcm2837-bluetooth-support.patch delete mode 100644 bcm2837-move-dt.patch delete mode 100644 bcm283x-vc4-fixes.patch delete mode 100644 debugconfig/arm/armv7/CONFIG_DMADEVICES_DEBUG create mode 100644 debugconfig/x86/x86_64/CONFIG_NR_CPUS create mode 100644 drm-cma-reduce-dmesg-logs.patch create mode 100644 drm-i915-Boost-GPU-clocks-if-we-miss-the-pageflip-s-vblank.patch delete mode 100644 kbuild-AFTER_LINK.patch delete mode 100644 kernel-ppc64p7-debug.config delete mode 100644 kernel-ppc64p7.config delete mode 100644 kvm-nVMX-Don-t-allow-L2-to-access-the-hardware-CR8.patch delete mode 100644 nl80211-check-for-the-required-netlink-attributes-presence.patch delete mode 100644 pci-mark-amd-stoney-gpu-ats-as-broken.patch delete mode 100644 qcom-Force-host-mode-for-USB-on-apq8016-sbc.patch delete mode 100644 qcom-QDF2432-tmp-errata.patch delete mode 100644 qcom-display-iommu.patch delete mode 100644 qcom-msm-ci_hdrc_msm_probe-missing-of_node_get.patch delete mode 100644 qxl-fixes.patch create mode 100644 v3-2-2-Input-synaptics---Lenovo-X1-Carbon-5-should-use-SMBUS-RMI.patch diff --git a/0001-PATCH-staging-rtl8822be-fix-wrong-dma-unmap-len.patch b/0001-PATCH-staging-rtl8822be-fix-wrong-dma-unmap-len.patch new file mode 100644 index 000000000..540b925eb --- /dev/null +++ b/0001-PATCH-staging-rtl8822be-fix-wrong-dma-unmap-len.patch @@ -0,0 +1,46 @@ +From 37af97ef14c201b1db8dd341aabd262da23e48aa Mon Sep 17 00:00:00 2001 +From: Fedora Kernel Team +Date: Mon, 30 Oct 2017 11:38:27 -0500 +Subject: [PATCH] [PATCH] staging: rtl8822be: fix wrong dma unmap len + +Patch fixes splat: + +r8822be 0000:04:00.0: DMA-API: device driver frees DMA memory with different size +[device address=0x0000000078477000] [map size=4096 bytes] [unmap size=424 bytes] + +Call Trace: + debug_dma_unmap_page+0xa5/0xb0 + ? unmap_single+0x2f/0x40 + _rtl8822be_send_bcn_or_cmd_packet+0x2c5/0x300 [r8822be] + ? _rtl8822be_send_bcn_or_cmd_packet+0x2c5/0x300 [r8822be] + rtl8822b_halmac_cb_write_data_rsvd_page+0x51/0xc0 [r8822be] + _halmac_write_data_rsvd_page+0x22/0x30 [r8822be] + halmac_download_rsvd_page_88xx+0xee/0x1f0 [r8822be] + halmac_dlfw_to_mem_88xx+0x80/0x120 [r8822be] + halmac_download_firmware_88xx.part.47+0x477/0x600 [r8822be] + halmac_download_firmware_88xx+0x32/0x40 [r8822be] + rtl_halmac_dlfw+0x70/0x120 [r8822be] + rtl_halmac_init_hal+0x5f/0x1b0 [r8822be] + rtl8822be_hw_init+0x8a2/0x1040 [r8822be] + +Signed-off-by: Stanislaw Gruszka +--- + drivers/staging/rtlwifi/rtl8822be/fw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/rtlwifi/rtl8822be/fw.c b/drivers/staging/rtlwifi/rtl8822be/fw.c +index 8e24da1..a2cc548 100644 +--- a/drivers/staging/rtlwifi/rtl8822be/fw.c ++++ b/drivers/staging/rtlwifi/rtl8822be/fw.c +@@ -419,7 +419,7 @@ static bool _rtl8822be_send_bcn_or_cmd_packet(struct ieee80211_hw *hw, + dma_addr = rtlpriv->cfg->ops->get_desc( + hw, (u8 *)pbd_desc, true, HW_DESC_TXBUFF_ADDR); + +- pci_unmap_single(rtlpci->pdev, dma_addr, skb->len, ++ pci_unmap_single(rtlpci->pdev, dma_addr, pskb->len, + PCI_DMA_TODEVICE); + kfree_skb(pskb); + +-- +2.13.6 + diff --git a/0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch b/0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch new file mode 100644 index 000000000..2242e2d44 --- /dev/null +++ b/0001-platform-x86-peaq-wmi-Add-DMI-check-before-binding-t.patch @@ -0,0 +1,72 @@ +From 0e9df6a74f9573409e5a2fbe29c1389188280bfc Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Thu, 5 Oct 2017 16:02:33 +0200 +Subject: [PATCH] platform/x86: peaq-wmi: Add DMI check before binding to the + WMI interface + +It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not +as unique as a GUID should be and is used on some other devices too. + +This is causing spurious key-press reports on these other devices. + +This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to +ensure that it is actually running on a PEAQ 2-in-1, fixing the +spurious key-presses on these other devices. + +BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1497861 +BugLink: https://bugzilla.suse.com/attachment.cgi?id=743182 +Cc: stable@vger.kernel.org +Signed-off-by: Hans de Goede +--- + drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c +index bc98ef95514a..67fa3fa32011 100644 +--- a/drivers/platform/x86/peaq-wmi.c ++++ b/drivers/platform/x86/peaq-wmi.c +@@ -8,6 +8,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -64,8 +65,23 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) + } + } + ++/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */ ++static const struct dmi_system_id peaq_dmi_table[] = { ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "PEAQ"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "PEAQ PMM C1010 MD99187"), ++ }, ++ }, ++ {} ++}; ++ + static int __init peaq_wmi_init(void) + { ++ /* WMI GUID is not unique, also check for a DMI match */ ++ if (!dmi_check_system(peaq_dmi_table)) ++ return -ENODEV; ++ + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + return -ENODEV; + +@@ -86,6 +101,9 @@ static int __init peaq_wmi_init(void) + + static void __exit peaq_wmi_exit(void) + { ++ if (!dmi_check_system(peaq_dmi_table)) ++ return; ++ + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) + return; + +-- +2.14.2 + diff --git a/0001-power-supply-max17042_battery-Add-support-for-ACPI-e.patch b/0001-power-supply-max17042_battery-Add-support-for-ACPI-e.patch deleted file mode 100644 index 858cd5a34..000000000 --- a/0001-power-supply-max17042_battery-Add-support-for-ACPI-e.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 075bb90dbb4d894938c5859e3850987238db9cd8 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 11 Aug 2017 22:30:55 +0200 -Subject: [PATCH 1/2] power: supply: max17042_battery: Add support for ACPI - enumeration - -Some x86 devices enumerate a max17047 fuel-gauge through a MAX17047 -ACPI firmware-node, add support for this. - -Signed-off-by: Hans de Goede ---- - drivers/power/supply/max17042_battery.c | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c -index aecaaa2b0586..b2ddb7eb69c6 100644 ---- a/drivers/power/supply/max17042_battery.c -+++ b/drivers/power/supply/max17042_battery.c -@@ -22,6 +22,7 @@ - * This driver is based on max17040_battery.c - */ - -+#include - #include - #include - #include -@@ -982,6 +983,8 @@ static int max17042_probe(struct i2c_client *client, - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); - const struct power_supply_desc *max17042_desc = &max17042_psy_desc; - struct power_supply_config psy_cfg = {}; -+ const struct acpi_device_id *acpi_id; -+ struct device *dev = &client->dev; - struct max17042_chip *chip; - int ret; - int i; -@@ -995,7 +998,15 @@ static int max17042_probe(struct i2c_client *client, - return -ENOMEM; - - chip->client = client; -- chip->chip_type = id->driver_data; -+ if (id) { -+ chip->chip_type = id->driver_data; -+ } else { -+ acpi_id = acpi_match_device(dev->driver->acpi_match_table, dev); -+ if (!acpi_id) -+ return -ENODEV; -+ -+ chip->chip_type = acpi_id->driver_data; -+ } - chip->regmap = devm_regmap_init_i2c(client, &max17042_regmap_config); - if (IS_ERR(chip->regmap)) { - dev_err(&client->dev, "Failed to initialize regmap\n"); -@@ -1104,6 +1115,14 @@ static int max17042_resume(struct device *dev) - static SIMPLE_DEV_PM_OPS(max17042_pm_ops, max17042_suspend, - max17042_resume); - -+#ifdef CONFIG_ACPI -+static const struct acpi_device_id max17042_acpi_match[] = { -+ { "MAX17047", MAXIM_DEVICE_TYPE_MAX17047 }, -+ { } -+}; -+MODULE_DEVICE_TABLE(acpi, max17042_acpi_match); -+#endif -+ - #ifdef CONFIG_OF - static const struct of_device_id max17042_dt_match[] = { - { .compatible = "maxim,max17042" }, -@@ -1125,6 +1144,7 @@ MODULE_DEVICE_TABLE(i2c, max17042_id); - static struct i2c_driver max17042_i2c_driver = { - .driver = { - .name = "max17042", -+ .acpi_match_table = ACPI_PTR(max17042_acpi_match), - .of_match_table = of_match_ptr(max17042_dt_match), - .pm = &max17042_pm_ops, - }, --- -2.13.4 - diff --git a/0001-staging-vboxvideo-Fix-reporting-invalid-suggested-of.patch b/0001-staging-vboxvideo-Fix-reporting-invalid-suggested-of.patch new file mode 100644 index 000000000..695fcda36 --- /dev/null +++ b/0001-staging-vboxvideo-Fix-reporting-invalid-suggested-of.patch @@ -0,0 +1,118 @@ +From 3b40f521aa2f42862203497a94ae77536f41ade2 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Thu, 12 Oct 2017 19:44:48 +0200 +Subject: [PATCH] staging: vboxvideo: Fix reporting invalid + suggested-offset-properties + +The x and y hints receives from the host are unsigned 32 bit integers and +they get set to -1 (0xffffffff) when invalid. Before this commit the +vboxvideo driver was storing them in an u16 causing the -1 to be truncated +to 65535 which, once reported to userspace, was breaking gnome 3.26+ +in Wayland mode. + +This commit stores the host values in 32 bit variables, removing the +truncation and checks for -1, replacing it with 0 as -1 is not a valid +suggested-offset-property value. Likewise the properties are now +initialized to 0 instead of -1, since -1 is not a valid value. +This fixes gnome 3.26+ in Wayland mode not working with the vboxvideo +driver. + +Reported-by: Gianfranco Costamagna +Cc: stable@vger.kernel.org +Cc: Michael Thayer +Signed-off-by: Hans de Goede +--- + drivers/staging/vboxvideo/vbox_drv.h | 8 ++++---- + drivers/staging/vboxvideo/vbox_irq.c | 4 ++-- + drivers/staging/vboxvideo/vbox_mode.c | 26 ++++++++++++++++++-------- + 3 files changed, 24 insertions(+), 14 deletions(-) + +diff --git a/drivers/staging/vboxvideo/vbox_drv.h b/drivers/staging/vboxvideo/vbox_drv.h +index 4b9302703b36..eeac4f0cb2c6 100644 +--- a/drivers/staging/vboxvideo/vbox_drv.h ++++ b/drivers/staging/vboxvideo/vbox_drv.h +@@ -137,8 +137,8 @@ struct vbox_connector { + char name[32]; + struct vbox_crtc *vbox_crtc; + struct { +- u16 width; +- u16 height; ++ u32 width; ++ u32 height; + bool disconnected; + } mode_hint; + }; +@@ -150,8 +150,8 @@ struct vbox_crtc { + unsigned int crtc_id; + u32 fb_offset; + bool cursor_enabled; +- u16 x_hint; +- u16 y_hint; ++ u32 x_hint; ++ u32 y_hint; + }; + + struct vbox_encoder { +diff --git a/drivers/staging/vboxvideo/vbox_irq.c b/drivers/staging/vboxvideo/vbox_irq.c +index 3ca8bec62ac4..74abdf02d9fd 100644 +--- a/drivers/staging/vboxvideo/vbox_irq.c ++++ b/drivers/staging/vboxvideo/vbox_irq.c +@@ -150,8 +150,8 @@ static void vbox_update_mode_hints(struct vbox_private *vbox) + + disconnected = !(hints->enabled); + crtc_id = vbox_conn->vbox_crtc->crtc_id; +- vbox_conn->mode_hint.width = hints->cx & 0x8fff; +- vbox_conn->mode_hint.height = hints->cy & 0x8fff; ++ vbox_conn->mode_hint.width = hints->cx; ++ vbox_conn->mode_hint.height = hints->cy; + vbox_conn->vbox_crtc->x_hint = hints->dx; + vbox_conn->vbox_crtc->y_hint = hints->dy; + vbox_conn->mode_hint.disconnected = disconnected; +diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c +index 257a77830410..6f08dc966719 100644 +--- a/drivers/staging/vboxvideo/vbox_mode.c ++++ b/drivers/staging/vboxvideo/vbox_mode.c +@@ -553,12 +553,22 @@ static int vbox_get_modes(struct drm_connector *connector) + ++num_modes; + } + vbox_set_edid(connector, preferred_width, preferred_height); +- drm_object_property_set_value( +- &connector->base, vbox->dev->mode_config.suggested_x_property, +- vbox_connector->vbox_crtc->x_hint); +- drm_object_property_set_value( +- &connector->base, vbox->dev->mode_config.suggested_y_property, +- vbox_connector->vbox_crtc->y_hint); ++ ++ if (vbox_connector->vbox_crtc->x_hint != -1) ++ drm_object_property_set_value(&connector->base, ++ vbox->dev->mode_config.suggested_x_property, ++ vbox_connector->vbox_crtc->x_hint); ++ else ++ drm_object_property_set_value(&connector->base, ++ vbox->dev->mode_config.suggested_x_property, 0); ++ ++ if (vbox_connector->vbox_crtc->y_hint != -1) ++ drm_object_property_set_value(&connector->base, ++ vbox->dev->mode_config.suggested_y_property, ++ vbox_connector->vbox_crtc->y_hint); ++ else ++ drm_object_property_set_value(&connector->base, ++ vbox->dev->mode_config.suggested_y_property, 0); + + return num_modes; + } +@@ -640,9 +650,9 @@ static int vbox_connector_init(struct drm_device *dev, + + drm_mode_create_suggested_offset_properties(dev); + drm_object_attach_property(&connector->base, +- dev->mode_config.suggested_x_property, -1); ++ dev->mode_config.suggested_x_property, 0); + drm_object_attach_property(&connector->base, +- dev->mode_config.suggested_y_property, -1); ++ dev->mode_config.suggested_y_property, 0); + drm_connector_register(connector); + + drm_mode_connector_attach_encoder(connector, encoder); +-- +2.14.2 + diff --git a/0002-power-supply-max17042_battery-Fix-ACPI-interrupt-iss.patch b/0002-power-supply-max17042_battery-Fix-ACPI-interrupt-iss.patch deleted file mode 100644 index 6daecaf4d..000000000 --- a/0002-power-supply-max17042_battery-Fix-ACPI-interrupt-iss.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 27b9d46d25c873b351757c44ce523bf0ede1d08e Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 14 Aug 2017 11:02:59 +0200 -Subject: [PATCH 2/2] power: supply: max17042_battery: Fix ACPI interrupt - issues - -On some x86/ACPI boards the DSDT defines an ACPI event handler for -the max17047 IRQ, this causes several problems: - -1) We need to share the IRQ to avoid an error getting it - -2) Even of we are willing to share, we may fail to share because some - DSDTs claim it exclusivly - -3) If we are unable to share the IRQ, or the IRQ is only listed as an - ACPI event source and not in the max1704 firmware node, then the - charge threshold IRQ (which is used to give an IRQ every 1 percent - charge change) becomes a problem, the ACPI event handler will not - update this to the next 1 percent threshold, so the IRQ keeps firing - and we get an IRQ storm pegging 1 CPU core. - - This happens despite the max17042 driver not setting the charge - threshold because Windows uses it and leaves it set on reboot. - - So if we are unable to get the IRQ we need to reprogram the - charge threshold to its disabled setting. - -This commit fixes al of the above, while at it it also makes the error -msg when being unable to get the IRQ consistent with other messages. - -Signed-off-by: Hans de Goede ---- - drivers/power/supply/max17042_battery.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c -index b2ddb7eb69c6..18a44e4ed6ff 100644 ---- a/drivers/power/supply/max17042_battery.c -+++ b/drivers/power/supply/max17042_battery.c -@@ -1050,11 +1050,18 @@ static int max17042_probe(struct i2c_client *client, - } - - if (client->irq) { -+ unsigned int flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT; -+ -+ /* -+ * On ACPI systems the IRQ may be handled by ACPI-event code, -+ * so we need to share (if the ACPI code is willing to share). -+ */ -+ if (acpi_id) -+ flags |= IRQF_SHARED | IRQF_PROBE_SHARED; -+ - ret = devm_request_threaded_irq(&client->dev, client->irq, - NULL, -- max17042_thread_handler, -- IRQF_TRIGGER_FALLING | -- IRQF_ONESHOT, -+ max17042_thread_handler, flags, - chip->battery->desc->name, - chip); - if (!ret) { -@@ -1064,10 +1071,13 @@ static int max17042_probe(struct i2c_client *client, - max17042_set_soc_threshold(chip, 1); - } else { - client->irq = 0; -- dev_err(&client->dev, "%s(): cannot get IRQ\n", -- __func__); -+ if (ret != -EBUSY) -+ dev_err(&client->dev, "Failed to get IRQ\n"); - } - } -+ /* Not able to update the charge threshold when exceeded? -> disable */ -+ if (!client->irq) -+ regmap_write(chip->regmap, MAX17042_SALRT_Th, 0xff00); - - regmap_read(chip->regmap, MAX17042_STATUS, &val); - if (val & STATUS_POR_BIT) { --- -2.13.4 - diff --git a/0011-Input-goodix-Add-support-for-capacitive-home-button.patch b/0011-Input-goodix-Add-support-for-capacitive-home-button.patch deleted file mode 100644 index 162357c21..000000000 --- a/0011-Input-goodix-Add-support-for-capacitive-home-button.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 2a99775c336303d2efc43eab4f24b34722a28faa Mon Sep 17 00:00:00 2001 -From: "Sergei A. Trusov" -Date: Tue, 20 Jun 2017 18:08:35 +0200 -Subject: [PATCH 11/16] Input: goodix: Add support for capacitive home button - -On some x86 tablets with a Goodix touchscreen, the Windows logo on the -front is a capacitive home button. Touching this button results in a touch -with bit 4 of the first byte set, while only the lower 4 bits (0-3) are -used to indicate the number of touches. - -Report a KEY_LEFTMETA press when this happens. - -Note that the hardware might support more than one button, in which -case the "id" byte of coor_data would identify the button in question. -This is not implemented as we don't have access to hardware with -multiple buttons. - -Signed-off-by: Sergei A. Trusov -Acked-by: Bastien Nocera ---- - drivers/input/touchscreen/goodix.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c -index 240b16f3ee97..903137d9cf7d 100644 ---- a/drivers/input/touchscreen/goodix.c -+++ b/drivers/input/touchscreen/goodix.c -@@ -267,6 +267,12 @@ static void goodix_process_events(struct goodix_ts_data *ts) - if (touch_num < 0) - return; - -+ /* -+ * Bit 4 of the first byte reports the status of the capacitive -+ * Windows/Home button. -+ */ -+ input_report_key(ts->input_dev, KEY_LEFTMETA, !!(point_data[0] & BIT(4))); -+ - for (i = 0; i < touch_num; i++) - goodix_ts_report_touch(ts, - &point_data[1 + GOODIX_CONTACT_SIZE * i]); -@@ -612,6 +618,9 @@ static int goodix_request_input_dev(struct goodix_ts_data *ts) - ts->input_dev->id.product = ts->id; - ts->input_dev->id.version = ts->version; - -+ /* Capacitive Windows/Home button on some devices */ -+ input_set_capability(ts->input_dev, EV_KEY, KEY_LEFTMETA); -+ - error = input_register_device(ts->input_dev); - if (error) { - dev_err(&ts->client->dev, --- -2.13.0 - diff --git a/0013-iio-accel-bmc150-Add-support-for-BOSC0200-ACPI-devic.patch b/0013-iio-accel-bmc150-Add-support-for-BOSC0200-ACPI-devic.patch deleted file mode 100644 index 8eb41ee3f..000000000 --- a/0013-iio-accel-bmc150-Add-support-for-BOSC0200-ACPI-devic.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bf3e9581e10a19b2ce77a45fe001116d269b4c7f Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Sun, 18 Jun 2017 12:47:38 +0200 -Subject: [PATCH 13/16] iio: accel: bmc150: Add support for BOSC0200 ACPI - device id - -Add support for the BOSC0200 ACPI device id used on some x86 tablets. -note driver_data is not set to a specific model, driver_data is not -used anyways (instead detection is done on the chip_id reg) and the -2 tablets with a BOSC0200 ACPI device id I've have 2 different chips, -one has a BMA250E, the other a BMA222E. - -Signed-off-by: Hans de Goede ---- - drivers/iio/accel/bmc150-accel-i2c.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/iio/accel/bmc150-accel-i2c.c b/drivers/iio/accel/bmc150-accel-i2c.c -index 8ca8041267ef..f85014fbaa12 100644 ---- a/drivers/iio/accel/bmc150-accel-i2c.c -+++ b/drivers/iio/accel/bmc150-accel-i2c.c -@@ -64,6 +64,7 @@ static const struct acpi_device_id bmc150_accel_acpi_match[] = { - {"BMA250E", bma250e}, - {"BMA222E", bma222e}, - {"BMA0280", bma280}, -+ {"BOSC0200"}, - { }, - }; - MODULE_DEVICE_TABLE(acpi, bmc150_accel_acpi_match); --- -2.13.0 - diff --git a/0015-i2c-cht-wc-Add-Intel-Cherry-Trail-Whiskey-Cove-SMBUS.patch b/0015-i2c-cht-wc-Add-Intel-Cherry-Trail-Whiskey-Cove-SMBUS.patch deleted file mode 100644 index 5d7497ce1..000000000 --- a/0015-i2c-cht-wc-Add-Intel-Cherry-Trail-Whiskey-Cove-SMBUS.patch +++ /dev/null @@ -1,410 +0,0 @@ -From bd0d7169342e47919f68e75d659968f02b62f84b Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 3 Mar 2017 23:48:50 +0100 -Subject: [PATCH 15/16] i2c-cht-wc: Add Intel Cherry Trail Whiskey Cove SMBUS - controller driver - -The Intel Cherry Trail Whiskey Cove PMIC does not contain a builtin -battery charger, instead boards with this PMIC use an external TI -bq24292i charger IC, which is connected to a SMBUS controller built into -the PMIC. - -This commit adds an i2c-bus driver for the PMIC's builtin SMBUS -controller. The probe function for this i2c-bus will also register an -i2c-client for the TI bq24292i charger after the i2c-bus has been -registered. - -Note that several device-properties are set on the client-device to -tell the bq24190 power-supply driver to integrate the Whiskey Cove PMIC -and e.g. use the PMIC's BC1.2 detection (through extcon) to determine -the maximum input current. - -Cc: Andy Shevchenko -Signed-off-by: Hans de Goede ---- -Changes in v2: --Various style (mostly captialization and variable name) fixes --Use device-properties instead of platform_data for the i2c_board_info ---- - drivers/i2c/busses/Kconfig | 8 + - drivers/i2c/busses/Makefile | 1 + - drivers/i2c/busses/i2c-cht-wc.c | 336 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 345 insertions(+) - create mode 100644 drivers/i2c/busses/i2c-cht-wc.c - -diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 144cbadc7c72..18c96178b177 100644 ---- a/drivers/i2c/busses/Kconfig -+++ b/drivers/i2c/busses/Kconfig -@@ -187,6 +187,14 @@ config I2C_PIIX4 - This driver can also be built as a module. If so, the module - will be called i2c-piix4. - -+config I2C_CHT_WC -+ tristate "Intel Cherry Trail Whiskey Cove PMIC smbus controller" -+ depends on INTEL_SOC_PMIC_CHTWC -+ help -+ If you say yes to this option, support will be included for the -+ SMBus controller found in the Intel Cherry Trail Whiskey Cove PMIC -+ found on some Intel Cherry Trail systems. -+ - config I2C_NFORCE2 - tristate "Nvidia nForce2, nForce3 and nForce4" - depends on PCI -diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index 30b60855fbcd..f6443fa44f61 100644 ---- a/drivers/i2c/busses/Makefile -+++ b/drivers/i2c/busses/Makefile -@@ -12,6 +12,7 @@ obj-$(CONFIG_I2C_ALI15X3) += i2c-ali15x3.o - obj-$(CONFIG_I2C_AMD756) += i2c-amd756.o - obj-$(CONFIG_I2C_AMD756_S4882) += i2c-amd756-s4882.o - obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o -+obj-$(CONFIG_I2C_CHT_WC) += i2c-cht-wc.o - obj-$(CONFIG_I2C_I801) += i2c-i801.o - obj-$(CONFIG_I2C_ISCH) += i2c-isch.o - obj-$(CONFIG_I2C_ISMT) += i2c-ismt.o -diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c -new file mode 100644 -index 000000000000..ccf0785bcb75 ---- /dev/null -+++ b/drivers/i2c/busses/i2c-cht-wc.c -@@ -0,0 +1,336 @@ -+/* -+ * Intel CHT Whiskey Cove PMIC I2C Master driver -+ * Copyright (C) 2017 Hans de Goede -+ * -+ * Based on various non upstream patches to support the CHT Whiskey Cove PMIC: -+ * Copyright (C) 2011 - 2014 Intel Corporation. All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License version -+ * 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define CHT_WC_I2C_CTRL 0x5e24 -+#define CHT_WC_I2C_CTRL_WR BIT(0) -+#define CHT_WC_I2C_CTRL_RD BIT(1) -+#define CHT_WC_I2C_CLIENT_ADDR 0x5e25 -+#define CHT_WC_I2C_REG_OFFSET 0x5e26 -+#define CHT_WC_I2C_WRDATA 0x5e27 -+#define CHT_WC_I2C_RDDATA 0x5e28 -+ -+#define CHT_WC_EXTCHGRIRQ 0x6e0a -+#define CHT_WC_EXTCHGRIRQ_CLIENT_IRQ BIT(0) -+#define CHT_WC_EXTCHGRIRQ_WRITE_IRQ BIT(1) -+#define CHT_WC_EXTCHGRIRQ_READ_IRQ BIT(2) -+#define CHT_WC_EXTCHGRIRQ_NACK_IRQ BIT(3) -+#define CHT_WC_EXTCHGRIRQ_ADAP_IRQMASK ((u8)GENMASK(3, 1)) -+#define CHT_WC_EXTCHGRIRQ_MSK 0x6e17 -+ -+struct cht_wc_i2c_adap { -+ struct i2c_adapter adapter; -+ wait_queue_head_t wait; -+ struct irq_chip irqchip; -+ struct mutex irqchip_lock; -+ struct regmap *regmap; -+ struct irq_domain *irq_domain; -+ struct i2c_client *client; -+ int client_irq; -+ u8 irq_mask; -+ u8 old_irq_mask; -+ bool nack; -+ bool done; -+}; -+ -+static irqreturn_t cht_wc_i2c_adap_thread_handler(int id, void *data) -+{ -+ struct cht_wc_i2c_adap *adap = data; -+ int ret, reg; -+ -+ /* Read IRQs */ -+ ret = regmap_read(adap->regmap, CHT_WC_EXTCHGRIRQ, ®); -+ if (ret) { -+ dev_err(&adap->adapter.dev, "Error reading extchgrirq reg\n"); -+ return IRQ_NONE; -+ } -+ -+ reg &= ~adap->irq_mask; -+ -+ /* -+ * Immediately ack IRQs, so that if new IRQs arrives while we're -+ * handling the previous ones our irq will re-trigger when we're done. -+ */ -+ ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ, reg); -+ if (ret) -+ dev_err(&adap->adapter.dev, "Error writing extchgrirq reg\n"); -+ -+ /* -+ * Do NOT use handle_nested_irq here, the client irq handler will -+ * likely want to do i2c transfers and the i2c controller uses this -+ * interrupt handler as well, so running the client irq handler from -+ * this thread will cause things to lock up. -+ */ -+ if (reg & CHT_WC_EXTCHGRIRQ_CLIENT_IRQ) { -+ /* -+ * generic_handle_irq expects local IRQs to be disabled -+ * as normally it is called from interrupt context. -+ */ -+ local_irq_disable(); -+ generic_handle_irq(adap->client_irq); -+ local_irq_enable(); -+ } -+ -+ if (reg & CHT_WC_EXTCHGRIRQ_ADAP_IRQMASK) { -+ adap->nack = !!(reg & CHT_WC_EXTCHGRIRQ_NACK_IRQ); -+ adap->done = true; -+ wake_up(&adap->wait); -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+static u32 cht_wc_i2c_adap_master_func(struct i2c_adapter *adap) -+{ -+ /* This i2c adapter only supports SMBUS byte transfers */ -+ return I2C_FUNC_SMBUS_BYTE_DATA; -+} -+ -+static int cht_wc_i2c_adap_smbus_xfer(struct i2c_adapter *_adap, u16 addr, -+ unsigned short flags, char read_write, -+ u8 command, int size, -+ union i2c_smbus_data *data) -+{ -+ struct cht_wc_i2c_adap *adap = i2c_get_adapdata(_adap); -+ int ret, reg; -+ -+ adap->nack = false; -+ adap->done = false; -+ -+ ret = regmap_write(adap->regmap, CHT_WC_I2C_CLIENT_ADDR, addr); -+ if (ret) -+ return ret; -+ -+ if (read_write == I2C_SMBUS_WRITE) { -+ ret = regmap_write(adap->regmap, CHT_WC_I2C_WRDATA, data->byte); -+ if (ret) -+ return ret; -+ } -+ -+ ret = regmap_write(adap->regmap, CHT_WC_I2C_REG_OFFSET, command); -+ if (ret) -+ return ret; -+ -+ ret = regmap_write(adap->regmap, CHT_WC_I2C_CTRL, -+ (read_write == I2C_SMBUS_WRITE) ? -+ CHT_WC_I2C_CTRL_WR : CHT_WC_I2C_CTRL_RD); -+ if (ret) -+ return ret; -+ -+ /* 3 second timeout, during cable plug the PMIC responds quite slow */ -+ ret = wait_event_timeout(adap->wait, adap->done, 3 * HZ); -+ if (ret == 0) -+ return -ETIMEDOUT; -+ if (adap->nack) -+ return -EIO; -+ -+ if (read_write == I2C_SMBUS_READ) { -+ ret = regmap_read(adap->regmap, CHT_WC_I2C_RDDATA, ®); -+ if (ret) -+ return ret; -+ -+ data->byte = reg; -+ } -+ -+ return 0; -+} -+ -+static const struct i2c_algorithm cht_wc_i2c_adap_algo = { -+ .functionality = cht_wc_i2c_adap_master_func, -+ .smbus_xfer = cht_wc_i2c_adap_smbus_xfer, -+}; -+ -+/**** irqchip for the client connected to the extchgr i2c adapter ****/ -+static void cht_wc_i2c_irq_lock(struct irq_data *data) -+{ -+ struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); -+ -+ mutex_lock(&adap->irqchip_lock); -+} -+ -+static void cht_wc_i2c_irq_sync_unlock(struct irq_data *data) -+{ -+ struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); -+ int ret; -+ -+ if (adap->irq_mask != adap->old_irq_mask) { -+ ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ_MSK, -+ adap->irq_mask); -+ if (ret == 0) -+ adap->old_irq_mask = adap->irq_mask; -+ else -+ dev_err(&adap->adapter.dev, "Error writing EXTCHGRIRQ_MSK\n"); -+ } -+ -+ mutex_unlock(&adap->irqchip_lock); -+} -+ -+static void cht_wc_i2c_irq_enable(struct irq_data *data) -+{ -+ struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); -+ -+ adap->irq_mask &= ~CHT_WC_EXTCHGRIRQ_CLIENT_IRQ; -+} -+ -+static void cht_wc_i2c_irq_disable(struct irq_data *data) -+{ -+ struct cht_wc_i2c_adap *adap = irq_data_get_irq_chip_data(data); -+ -+ adap->irq_mask |= CHT_WC_EXTCHGRIRQ_CLIENT_IRQ; -+} -+ -+static const struct irq_chip cht_wc_i2c_irq_chip = { -+ .irq_bus_lock = cht_wc_i2c_irq_lock, -+ .irq_bus_sync_unlock = cht_wc_i2c_irq_sync_unlock, -+ .irq_disable = cht_wc_i2c_irq_disable, -+ .irq_enable = cht_wc_i2c_irq_enable, -+ .name = "cht_wc_ext_chrg_irq_chip", -+}; -+ -+static const struct property_entry bq24190_props[] = { -+ PROPERTY_ENTRY_STRING("extcon-name", "cht_wcove_pwrsrc"), -+ PROPERTY_ENTRY_BOOL("omit-battery-class"), -+ PROPERTY_ENTRY_BOOL("disable-reset"), -+ { } -+}; -+ -+static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev) -+{ -+ struct intel_soc_pmic *pmic = dev_get_drvdata(pdev->dev.parent); -+ struct cht_wc_i2c_adap *adap; -+ struct i2c_board_info board_info = { -+ .type = "bq24190", -+ .addr = 0x6b, -+ .properties = bq24190_props, -+ }; -+ int ret, irq; -+ -+ irq = platform_get_irq(pdev, 0); -+ if (irq < 0) { -+ dev_err(&pdev->dev, "Error missing irq resource\n"); -+ return -EINVAL; -+ } -+ -+ adap = devm_kzalloc(&pdev->dev, sizeof(*adap), GFP_KERNEL); -+ if (!adap) -+ return -ENOMEM; -+ -+ init_waitqueue_head(&adap->wait); -+ mutex_init(&adap->irqchip_lock); -+ adap->irqchip = cht_wc_i2c_irq_chip; -+ adap->regmap = pmic->regmap; -+ adap->adapter.owner = THIS_MODULE; -+ adap->adapter.class = I2C_CLASS_HWMON; -+ adap->adapter.algo = &cht_wc_i2c_adap_algo; -+ strlcpy(adap->adapter.name, "PMIC I2C Adapter", -+ sizeof(adap->adapter.name)); -+ adap->adapter.dev.parent = &pdev->dev; -+ -+ /* Clear and activate i2c-adapter interrupts, disable client IRQ */ -+ adap->old_irq_mask = adap->irq_mask = ~CHT_WC_EXTCHGRIRQ_ADAP_IRQMASK; -+ ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ, ~adap->irq_mask); -+ if (ret) -+ return ret; -+ -+ ret = regmap_write(adap->regmap, CHT_WC_EXTCHGRIRQ_MSK, adap->irq_mask); -+ if (ret) -+ return ret; -+ -+ /* Alloc and register client IRQ */ -+ adap->irq_domain = irq_domain_add_linear(pdev->dev.of_node, 1, -+ &irq_domain_simple_ops, NULL); -+ if (!adap->irq_domain) -+ return -ENOMEM; -+ -+ adap->client_irq = irq_create_mapping(adap->irq_domain, 0); -+ if (!adap->client_irq) { -+ ret = -ENOMEM; -+ goto remove_irq_domain; -+ } -+ -+ irq_set_chip_data(adap->client_irq, adap); -+ irq_set_chip_and_handler(adap->client_irq, &adap->irqchip, -+ handle_simple_irq); -+ -+ ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, -+ cht_wc_i2c_adap_thread_handler, -+ IRQF_ONESHOT, "PMIC I2C Adapter", adap); -+ if (ret) -+ goto remove_irq_domain; -+ -+ i2c_set_adapdata(&adap->adapter, adap); -+ ret = i2c_add_adapter(&adap->adapter); -+ if (ret) -+ goto remove_irq_domain; -+ -+ board_info.irq = adap->client_irq; -+ adap->client = i2c_new_device(&adap->adapter, &board_info); -+ if (!adap->client) { -+ ret = -ENOMEM; -+ goto del_adapter; -+ } -+ -+ platform_set_drvdata(pdev, adap); -+ return 0; -+ -+del_adapter: -+ i2c_del_adapter(&adap->adapter); -+remove_irq_domain: -+ irq_domain_remove(adap->irq_domain); -+ return ret; -+} -+ -+static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev) -+{ -+ struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev); -+ -+ i2c_unregister_device(adap->client); -+ i2c_del_adapter(&adap->adapter); -+ irq_domain_remove(adap->irq_domain); -+ -+ return 0; -+} -+ -+static struct platform_device_id cht_wc_i2c_adap_id_table[] = { -+ { .name = "cht_wcove_ext_chgr" }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(platform, cht_wc_i2c_adap_id_table); -+ -+struct platform_driver cht_wc_i2c_adap_driver = { -+ .probe = cht_wc_i2c_adap_i2c_probe, -+ .remove = cht_wc_i2c_adap_i2c_remove, -+ .driver = { -+ .name = "cht_wcove_ext_chgr", -+ }, -+ .id_table = cht_wc_i2c_adap_id_table, -+}; -+module_platform_driver(cht_wc_i2c_adap_driver); -+ -+MODULE_DESCRIPTION("Intel CHT Whiskey Cove PMIC I2C Master driver"); -+MODULE_AUTHOR("Hans de Goede "); -+MODULE_LICENSE("GPL"); --- -2.13.0 - diff --git a/1-2-kvm-vmx-Reinstate-support-for-CPUs-without-virtual-NMI.patch b/1-2-kvm-vmx-Reinstate-support-for-CPUs-without-virtual-NMI.patch new file mode 100644 index 000000000..ca079af42 --- /dev/null +++ b/1-2-kvm-vmx-Reinstate-support-for-CPUs-without-virtual-NMI.patch @@ -0,0 +1,296 @@ +From patchwork Mon Nov 6 12:31:12 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [1/2] kvm: vmx: Reinstate support for CPUs without virtual NMI +From: Paolo Bonzini +X-Patchwork-Id: 10043403 +Message-Id: <1509971473-74491-2-git-send-email-pbonzini@redhat.com> +To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org +Cc: rkrcmar@redhat.com, stable@vger.kernel.org +Date: Mon, 6 Nov 2017 13:31:12 +0100 + +This is more or less a revert of commit 2c82878b0cb3 ("KVM: VMX: require +virtual NMI support", 2017-03-27); it turns out that Core 2 Duo machines +only had virtual NMIs in some SKUs. + +The revert is not trivial because in the meanwhile there have been several +fixes to nested NMI injection. Therefore, the entire vNMI state is moved +to struct loaded_vmcs. + +Another change compared to before the patch is a simplification here: + + if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked && + !(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis( + get_vmcs12(vcpu))))) { + +The final condition here is always true (because nested_cpu_has_virtual_nmis +is always false) and is removed. + +Fixes: 2c82878b0cb38fd516fd612c67852a6bbf282003 +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1490803 +Cc: stable@vger.kernel.org +Signed-off-by: Paolo Bonzini +--- + arch/x86/kvm/vmx.c | 150 +++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 106 insertions(+), 44 deletions(-) + +diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c +index e6c8ffa84968..d6b3b12ae1e2 100644 +--- a/arch/x86/kvm/vmx.c ++++ b/arch/x86/kvm/vmx.c +@@ -202,6 +202,10 @@ struct loaded_vmcs { + bool nmi_known_unmasked; + unsigned long vmcs_host_cr3; /* May not match real cr3 */ + unsigned long vmcs_host_cr4; /* May not match real cr4 */ ++ /* Support for vnmi-less CPUs */ ++ int soft_vnmi_blocked; ++ ktime_t entry_time; ++ s64 vnmi_blocked_time; + struct list_head loaded_vmcss_on_cpu_link; + }; + +@@ -1291,6 +1295,11 @@ static inline bool cpu_has_vmx_invpcid(void) + SECONDARY_EXEC_ENABLE_INVPCID; + } + ++static inline bool cpu_has_virtual_nmis(void) ++{ ++ return vmcs_config.pin_based_exec_ctrl & PIN_BASED_VIRTUAL_NMIS; ++} ++ + static inline bool cpu_has_vmx_wbinvd_exit(void) + { + return vmcs_config.cpu_based_2nd_exec_ctrl & +@@ -1348,11 +1357,6 @@ static inline bool nested_cpu_has2(struct vmcs12 *vmcs12, u32 bit) + (vmcs12->secondary_vm_exec_control & bit); + } + +-static inline bool nested_cpu_has_virtual_nmis(struct vmcs12 *vmcs12) +-{ +- return vmcs12->pin_based_vm_exec_control & PIN_BASED_VIRTUAL_NMIS; +-} +- + static inline bool nested_cpu_has_preemption_timer(struct vmcs12 *vmcs12) + { + return vmcs12->pin_based_vm_exec_control & +@@ -3712,9 +3716,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) + &_vmexit_control) < 0) + return -EIO; + +- min = PIN_BASED_EXT_INTR_MASK | PIN_BASED_NMI_EXITING | +- PIN_BASED_VIRTUAL_NMIS; +- opt = PIN_BASED_POSTED_INTR | PIN_BASED_VMX_PREEMPTION_TIMER; ++ min = PIN_BASED_EXT_INTR_MASK | PIN_BASED_NMI_EXITING; ++ opt = PIN_BASED_VIRTUAL_NMIS | PIN_BASED_POSTED_INTR | ++ PIN_BASED_VMX_PREEMPTION_TIMER; + if (adjust_vmx_controls(min, opt, MSR_IA32_VMX_PINBASED_CTLS, + &_pin_based_exec_control) < 0) + return -EIO; +@@ -5669,7 +5673,8 @@ static void enable_irq_window(struct kvm_vcpu *vcpu) + + static void enable_nmi_window(struct kvm_vcpu *vcpu) + { +- if (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_STI) { ++ if (!cpu_has_virtual_nmis() || ++ vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_STI) { + enable_irq_window(vcpu); + return; + } +@@ -5709,6 +5714,19 @@ static void vmx_inject_nmi(struct kvm_vcpu *vcpu) + { + struct vcpu_vmx *vmx = to_vmx(vcpu); + ++ if (!cpu_has_virtual_nmis()) { ++ /* ++ * Tracking the NMI-blocked state in software is built upon ++ * finding the next open IRQ window. This, in turn, depends on ++ * well-behaving guests: They have to keep IRQs disabled at ++ * least as long as the NMI handler runs. Otherwise we may ++ * cause NMI nesting, maybe breaking the guest. But as this is ++ * highly unlikely, we can live with the residual risk. ++ */ ++ vmx->loaded_vmcs->soft_vnmi_blocked = 1; ++ vmx->loaded_vmcs->vnmi_blocked_time = 0; ++ } ++ + ++vcpu->stat.nmi_injections; + vmx->loaded_vmcs->nmi_known_unmasked = false; + +@@ -5727,6 +5745,8 @@ static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu) + struct vcpu_vmx *vmx = to_vmx(vcpu); + bool masked; + ++ if (!cpu_has_virtual_nmis()) ++ return vmx->loaded_vmcs->soft_vnmi_blocked; + if (vmx->loaded_vmcs->nmi_known_unmasked) + return false; + masked = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_NMI; +@@ -5738,13 +5758,20 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) + { + struct vcpu_vmx *vmx = to_vmx(vcpu); + +- vmx->loaded_vmcs->nmi_known_unmasked = !masked; +- if (masked) +- vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, +- GUEST_INTR_STATE_NMI); +- else +- vmcs_clear_bits(GUEST_INTERRUPTIBILITY_INFO, +- GUEST_INTR_STATE_NMI); ++ if (!cpu_has_virtual_nmis()) { ++ if (vmx->loaded_vmcs->soft_vnmi_blocked != masked) { ++ vmx->loaded_vmcs->soft_vnmi_blocked = masked; ++ vmx->loaded_vmcs->vnmi_blocked_time = 0; ++ } ++ } else { ++ vmx->loaded_vmcs->nmi_known_unmasked = !masked; ++ if (masked) ++ vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, ++ GUEST_INTR_STATE_NMI); ++ else ++ vmcs_clear_bits(GUEST_INTERRUPTIBILITY_INFO, ++ GUEST_INTR_STATE_NMI); ++ } + } + + static int vmx_nmi_allowed(struct kvm_vcpu *vcpu) +@@ -5752,6 +5779,10 @@ static int vmx_nmi_allowed(struct kvm_vcpu *vcpu) + if (to_vmx(vcpu)->nested.nested_run_pending) + return 0; + ++ if (!cpu_has_virtual_nmis() && ++ to_vmx(vcpu)->loaded_vmcs->soft_vnmi_blocked) ++ return 0; ++ + return !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & + (GUEST_INTR_STATE_MOV_SS | GUEST_INTR_STATE_STI + | GUEST_INTR_STATE_NMI)); +@@ -6479,6 +6510,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) + * AAK134, BY25. + */ + if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) && ++ cpu_has_virtual_nmis() && + (exit_qualification & INTR_INFO_UNBLOCK_NMI)) + vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI); + +@@ -6965,7 +6997,7 @@ static struct loaded_vmcs *nested_get_current_vmcs02(struct vcpu_vmx *vmx) + } + + /* Create a new VMCS */ +- item = kmalloc(sizeof(struct vmcs02_list), GFP_KERNEL); ++ item = kzalloc(sizeof(struct vmcs02_list), GFP_KERNEL); + if (!item) + return NULL; + item->vmcs02.vmcs = alloc_vmcs(); +@@ -7982,6 +8014,7 @@ static int handle_pml_full(struct kvm_vcpu *vcpu) + * "blocked by NMI" bit has to be set before next VM entry. + */ + if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) && ++ cpu_has_virtual_nmis() && + (exit_qualification & INTR_INFO_UNBLOCK_NMI)) + vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, + GUEST_INTR_STATE_NMI); +@@ -8826,6 +8859,25 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) + return 0; + } + ++ if (unlikely(!cpu_has_virtual_nmis() && ++ vmx->loaded_vmcs->soft_vnmi_blocked)) { ++ if (vmx_interrupt_allowed(vcpu)) { ++ vmx->loaded_vmcs->soft_vnmi_blocked = 0; ++ } else if (vmx->loaded_vmcs->vnmi_blocked_time > 1000000000LL && ++ vcpu->arch.nmi_pending) { ++ /* ++ * This CPU don't support us in finding the end of an ++ * NMI-blocked window if the guest runs with IRQs ++ * disabled. So we pull the trigger after 1 s of ++ * futile waiting, but inform the user about this. ++ */ ++ printk(KERN_WARNING "%s: Breaking out of NMI-blocked " ++ "state on VCPU %d after 1 s timeout\n", ++ __func__, vcpu->vcpu_id); ++ vmx->loaded_vmcs->soft_vnmi_blocked = 0; ++ } ++ } ++ + if (exit_reason < kvm_vmx_max_exit_handlers + && kvm_vmx_exit_handlers[exit_reason]) + return kvm_vmx_exit_handlers[exit_reason](vcpu); +@@ -9108,33 +9160,38 @@ static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx) + + idtv_info_valid = vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK; + +- if (vmx->loaded_vmcs->nmi_known_unmasked) +- return; +- /* +- * Can't use vmx->exit_intr_info since we're not sure what +- * the exit reason is. +- */ +- exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO); +- unblock_nmi = (exit_intr_info & INTR_INFO_UNBLOCK_NMI) != 0; +- vector = exit_intr_info & INTR_INFO_VECTOR_MASK; +- /* +- * SDM 3: 27.7.1.2 (September 2008) +- * Re-set bit "block by NMI" before VM entry if vmexit caused by +- * a guest IRET fault. +- * SDM 3: 23.2.2 (September 2008) +- * Bit 12 is undefined in any of the following cases: +- * If the VM exit sets the valid bit in the IDT-vectoring +- * information field. +- * If the VM exit is due to a double fault. +- */ +- if ((exit_intr_info & INTR_INFO_VALID_MASK) && unblock_nmi && +- vector != DF_VECTOR && !idtv_info_valid) +- vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, +- GUEST_INTR_STATE_NMI); +- else +- vmx->loaded_vmcs->nmi_known_unmasked = +- !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) +- & GUEST_INTR_STATE_NMI); ++ if (cpu_has_virtual_nmis()) { ++ if (vmx->loaded_vmcs->nmi_known_unmasked) ++ return; ++ /* ++ * Can't use vmx->exit_intr_info since we're not sure what ++ * the exit reason is. ++ */ ++ exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO); ++ unblock_nmi = (exit_intr_info & INTR_INFO_UNBLOCK_NMI) != 0; ++ vector = exit_intr_info & INTR_INFO_VECTOR_MASK; ++ /* ++ * SDM 3: 27.7.1.2 (September 2008) ++ * Re-set bit "block by NMI" before VM entry if vmexit caused by ++ * a guest IRET fault. ++ * SDM 3: 23.2.2 (September 2008) ++ * Bit 12 is undefined in any of the following cases: ++ * If the VM exit sets the valid bit in the IDT-vectoring ++ * information field. ++ * If the VM exit is due to a double fault. ++ */ ++ if ((exit_intr_info & INTR_INFO_VALID_MASK) && unblock_nmi && ++ vector != DF_VECTOR && !idtv_info_valid) ++ vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, ++ GUEST_INTR_STATE_NMI); ++ else ++ vmx->loaded_vmcs->nmi_known_unmasked = ++ !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) ++ & GUEST_INTR_STATE_NMI); ++ } else if (unlikely(vmx->loaded_vmcs->soft_vnmi_blocked)) ++ vmx->loaded_vmcs->vnmi_blocked_time += ++ ktime_to_ns(ktime_sub(ktime_get(), ++ vmx->loaded_vmcs->entry_time)); + } + + static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu, +@@ -9251,6 +9308,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) + struct vcpu_vmx *vmx = to_vmx(vcpu); + unsigned long debugctlmsr, cr3, cr4; + ++ /* Record the guest's net vcpu time for enforced NMI injections. */ ++ if (unlikely(!cpu_has_virtual_nmis() && ++ vmx->loaded_vmcs->soft_vnmi_blocked)) ++ vmx->loaded_vmcs->entry_time = ktime_get(); ++ + /* Don't enter VMX if guest state is invalid, let the exit handler + start emulation until we arrive back to a valid state */ + if (vmx->emulation_required) diff --git a/CVE-2017-7477.patch b/CVE-2017-7477.patch deleted file mode 100644 index 6405614cc..000000000 --- a/CVE-2017-7477.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 4d6fa57b4dab0d77f4d8e9d9c73d1e63f6fe8fee Mon Sep 17 00:00:00 2001 -From: "Jason A. Donenfeld" -Date: Fri, 21 Apr 2017 23:14:48 +0200 -Subject: macsec: avoid heap overflow in skb_to_sgvec - -While this may appear as a humdrum one line change, it's actually quite -important. An sk_buff stores data in three places: - -1. A linear chunk of allocated memory in skb->data. This is the easiest - one to work with, but it precludes using scatterdata since the memory - must be linear. -2. The array skb_shinfo(skb)->frags, which is of maximum length - MAX_SKB_FRAGS. This is nice for scattergather, since these fragments - can point to different pages. -3. skb_shinfo(skb)->frag_list, which is a pointer to another sk_buff, - which in turn can have data in either (1) or (2). - -The first two are rather easy to deal with, since they're of a fixed -maximum length, while the third one is not, since there can be -potentially limitless chains of fragments. Fortunately dealing with -frag_list is opt-in for drivers, so drivers don't actually have to deal -with this mess. For whatever reason, macsec decided it wanted pain, and -so it explicitly specified NETIF_F_FRAGLIST. - -Because dealing with (1), (2), and (3) is insane, most users of sk_buff -doing any sort of crypto or paging operation calls a convenient function -called skb_to_sgvec (which happens to be recursive if (3) is in use!). -This takes a sk_buff as input, and writes into its output pointer an -array of scattergather list items. Sometimes people like to declare a -fixed size scattergather list on the stack; othertimes people like to -allocate a fixed size scattergather list on the heap. However, if you're -doing it in a fixed-size fashion, you really shouldn't be using -NETIF_F_FRAGLIST too (unless you're also ensuring the sk_buff and its -frag_list children arent't shared and then you check the number of -fragments in total required.) - -Macsec specifically does this: - - size += sizeof(struct scatterlist) * (MAX_SKB_FRAGS + 1); - tmp = kmalloc(size, GFP_ATOMIC); - *sg = (struct scatterlist *)(tmp + sg_offset); - ... - sg_init_table(sg, MAX_SKB_FRAGS + 1); - skb_to_sgvec(skb, sg, 0, skb->len); - -Specifying MAX_SKB_FRAGS + 1 is the right answer usually, but not if you're -using NETIF_F_FRAGLIST, in which case the call to skb_to_sgvec will -overflow the heap, and disaster ensues. - -Signed-off-by: Jason A. Donenfeld -Cc: stable@vger.kernel.org -Cc: security@kernel.org -Signed-off-by: David S. Miller ---- - drivers/net/macsec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c -index ff0a5ed..dbab05a 100644 ---- a/drivers/net/macsec.c -+++ b/drivers/net/macsec.c -@@ -2716,7 +2716,7 @@ static netdev_tx_t macsec_start_xmit(struct sk_buff *skb, - } - - #define MACSEC_FEATURES \ -- (NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST) -+ (NETIF_F_SG | NETIF_F_HIGHDMA) - static struct lock_class_key macsec_netdev_addr_lock_key; - - static int macsec_dev_init(struct net_device *dev) --- -cgit v1.1 - diff --git a/HID-rmi-Make-sure-the-HID-device-is-opened-on-resume.patch b/HID-rmi-Make-sure-the-HID-device-is-opened-on-resume.patch deleted file mode 100644 index d7d626972..000000000 --- a/HID-rmi-Make-sure-the-HID-device-is-opened-on-resume.patch +++ /dev/null @@ -1,74 +0,0 @@ -From patchwork Sun Jul 23 01:15:09 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: HID: rmi: Make sure the HID device is opened on resume -From: Lyude -X-Patchwork-Id: 9858267 -Message-Id: <20170723011509.23651-1-lyude@redhat.com> -To: linux-input@vger.kernel.org -Cc: Lyude , Andrew Duggan , - stable@vger.kernel.org, Jiri Kosina , - Benjamin Tissoires , - linux-kernel@vger.kernel.org -Date: Sat, 22 Jul 2017 21:15:09 -0400 - -So it looks like that suspend/resume has actually always been broken on -hid-rmi. The fact it worked was a rather silly coincidence that was -relying on the HID device to already be opened upon resume. This means -that so long as anything was reading the /dev/input/eventX node for for -an RMI device, it would suspend and resume correctly. As well, if -nothing happened to be keeping the HID device away it would shut off, -then the RMI driver would get confused on resume when it stopped -responding and explode. - -So, call hid_hw_open() in rmi_post_resume() so we make sure that the -device is alive before we try talking to it. - -This fixes RMI device suspend/resume over HID. - -Signed-off-by: Lyude -Cc: Andrew Duggan -Cc: stable@vger.kernel.org ---- - drivers/hid/hid-rmi.c | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c -index 5b40c2614599..e7d124f9a27f 100644 ---- a/drivers/hid/hid-rmi.c -+++ b/drivers/hid/hid-rmi.c -@@ -431,22 +431,29 @@ static int rmi_post_resume(struct hid_device *hdev) - { - struct rmi_data *data = hid_get_drvdata(hdev); - struct rmi_device *rmi_dev = data->xport.rmi_dev; -- int ret; -+ int ret = 0; - - if (!(data->device_flags & RMI_DEVICE)) - return 0; - -- ret = rmi_reset_attn_mode(hdev); -+ /* Make sure the HID device is ready to receive events */ -+ ret = hid_hw_open(hdev); - if (ret) - return ret; - -+ ret = rmi_reset_attn_mode(hdev); -+ if (ret) -+ goto out; -+ - ret = rmi_driver_resume(rmi_dev, false); - if (ret) { - hid_warn(hdev, "Failed to resume device: %d\n", ret); -- return ret; -+ goto out; - } - -- return 0; -+out: -+ hid_hw_close(hdev); -+ return ret; - } - #endif /* CONFIG_PM */ - diff --git a/KEYS-prevent-KEYCTL_READ-on-negative-key.patch b/KEYS-prevent-KEYCTL_READ-on-negative-key.patch deleted file mode 100644 index d80176e66..000000000 --- a/KEYS-prevent-KEYCTL_READ-on-negative-key.patch +++ /dev/null @@ -1,88 +0,0 @@ -From patchwork Mon Sep 18 18:37:23 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: KEYS: prevent KEYCTL_READ on negative key -From: Eric Biggers -X-Patchwork-Id: 9957387 -Message-Id: <20170918183723.114253-1-ebiggers3@gmail.com> -To: keyrings@vger.kernel.org -Cc: David Howells , Michael Halcrow , - linux-security-module@vger.kernel.org, - linux-kernel@vger.kernel.org, Eric Biggers , - stable@vger.kernel.org -Date: Mon, 18 Sep 2017 11:37:23 -0700 - -From: Eric Biggers - -Because keyctl_read_key() looks up the key with no permissions -requested, it may find a negatively instantiated key. If the key is -also possessed, we went ahead and called ->read() on the key. But the -key payload will actually contain the ->reject_error rather than the -normal payload. Thus, the kernel oopses trying to read the -user_key_payload from memory address (int)-ENOKEY = 0x00000000ffffff82. - -Fortunately the payload data is stored inline, so it shouldn't be -possible to abuse this as an arbitrary memory read primitive... - -Reproducer: - keyctl new_session - keyctl request2 user desc '' @s - keyctl read $(keyctl show | awk '/user: desc/ {print $1}') - -It causes a crash like the following: - BUG: unable to handle kernel paging request at 00000000ffffff92 - IP: user_read+0x33/0xa0 - PGD 36a54067 P4D 36a54067 PUD 0 - Oops: 0000 [#1] SMP - CPU: 0 PID: 211 Comm: keyctl Not tainted 4.14.0-rc1 #337 - Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 - task: ffff90aa3b74c3c0 task.stack: ffff9878c0478000 - RIP: 0010:user_read+0x33/0xa0 - RSP: 0018:ffff9878c047bee8 EFLAGS: 00010246 - RAX: 0000000000000001 RBX: ffff90aa3d7da340 RCX: 0000000000000017 - RDX: 0000000000000000 RSI: 00000000ffffff82 RDI: ffff90aa3d7da340 - RBP: ffff9878c047bf00 R08: 00000024f95da94f R09: 0000000000000000 - R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 - R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 - FS: 00007f58ece69740(0000) GS:ffff90aa3e200000(0000) knlGS:0000000000000000 - CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 - CR2: 00000000ffffff92 CR3: 0000000036adc001 CR4: 00000000003606f0 - Call Trace: - keyctl_read_key+0xac/0xe0 - SyS_keyctl+0x99/0x120 - entry_SYSCALL_64_fastpath+0x1f/0xbe - RIP: 0033:0x7f58ec787bb9 - RSP: 002b:00007ffc8d401678 EFLAGS: 00000206 ORIG_RAX: 00000000000000fa - RAX: ffffffffffffffda RBX: 00007ffc8d402800 RCX: 00007f58ec787bb9 - RDX: 0000000000000000 RSI: 00000000174a63ac RDI: 000000000000000b - RBP: 0000000000000004 R08: 00007ffc8d402809 R09: 0000000000000020 - R10: 0000000000000000 R11: 0000000000000206 R12: 00007ffc8d402800 - R13: 00007ffc8d4016e0 R14: 0000000000000000 R15: 0000000000000000 - Code: e5 41 55 49 89 f5 41 54 49 89 d4 53 48 89 fb e8 a4 b4 ad ff 85 c0 74 09 80 3d b9 4c 96 00 00 74 43 48 8b b3 20 01 00 00 4d 85 ed <0f> b7 5e 10 74 29 4d 85 e4 74 24 4c 39 e3 4c 89 e2 4c 89 ef 48 - RIP: user_read+0x33/0xa0 RSP: ffff9878c047bee8 - CR2: 00000000ffffff92 - -Fixes: 61ea0c0ba904 ("KEYS: Skip key state checks when checking for possession") -Cc: [v3.13+] -Signed-off-by: Eric Biggers ---- - security/keys/keyctl.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c -index ab0b337c84b4..6a82090c7fc1 100644 ---- a/security/keys/keyctl.c -+++ b/security/keys/keyctl.c -@@ -766,6 +766,11 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) - - key = key_ref_to_ptr(key_ref); - -+ if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) { -+ ret = -ENOKEY; -+ goto error2; -+ } -+ - /* see if we can read it directly */ - ret = key_permission(key_ref, KEY_NEED_READ); - if (ret == 0) diff --git a/PCI-aspm-deal-with-missing-root-ports-in-link-state-handling.patch b/PCI-aspm-deal-with-missing-root-ports-in-link-state-handling.patch new file mode 100644 index 000000000..03b011561 --- /dev/null +++ b/PCI-aspm-deal-with-missing-root-ports-in-link-state-handling.patch @@ -0,0 +1,55 @@ +From patchwork Mon Oct 2 14:08:40 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: PCI: aspm: deal with missing root ports in link state handling +From: Ard Biesheuvel +X-Patchwork-Id: 9980861 +Message-Id: <20171002140840.7767-1-ard.biesheuvel@linaro.org> +To: linux-pci@vger.kernel.org, bhelgaas@google.com +Cc: graeme.gregory@linaro.org, leif.lindholm@linaro.org, + daniel.thompson@Linaro.org, Ard Biesheuvel +Date: Mon, 2 Oct 2017 15:08:40 +0100 + +Even though it is unconventional, some PCIe host implementations omit +the root ports entirely, and simply consist of a host bridge (which +is not modeled as a device in the PCI hierarchy) and a link. + +When the downstream device is an endpoint, our current code does not +seem to mind this unusual configuration. However, when PCIe switches +are involved, the ASPM code assumes that any downstream switch port +has a parent, and blindly derefences the bus->parent->self field of +the pci_dev struct to chain the downstream link state to the link +state of the root port. Given that the root port is missing, the link +is not modeled at all, and nor is the link state, and attempting to +access it results in a NULL pointer dereference and a crash. + +So let's avoid this by allowing the link state chain to terminate at +the downstream port if no root port exists. + +Signed-off-by: Ard Biesheuvel +--- + drivers/pci/pcie/aspm.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c +index 1dfa10cc566b..0bea8498b5a5 100644 +--- a/drivers/pci/pcie/aspm.c ++++ b/drivers/pci/pcie/aspm.c +@@ -802,10 +802,14 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev) + + /* + * Root Ports and PCI/PCI-X to PCIe Bridges are roots of PCIe +- * hierarchies. ++ * hierarchies. Note that some PCIe host implementations omit ++ * the root ports entirely, in which case a downstream port on ++ * a switch may become the root of the link state chain for all ++ * its subordinate endpoints. + */ + if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT || +- pci_pcie_type(pdev) == PCI_EXP_TYPE_PCIE_BRIDGE) { ++ pci_pcie_type(pdev) == PCI_EXP_TYPE_PCIE_BRIDGE || ++ !pdev->bus->parent->self) { + link->root = link; + } else { + struct pcie_link_state *parent; diff --git a/USB-ulpi-fix-bus-node-lookup.patch b/USB-ulpi-fix-bus-node-lookup.patch new file mode 100644 index 000000000..835cf2ab6 --- /dev/null +++ b/USB-ulpi-fix-bus-node-lookup.patch @@ -0,0 +1,48 @@ +From patchwork Sat Nov 11 15:31:18 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: USB: ulpi: fix bus-node lookup +From: Johan Hovold +X-Patchwork-Id: 10054387 +Message-Id: <20171111153118.16038-1-johan@kernel.org> +To: Heikki Krogerus +Cc: Greg Kroah-Hartman , + linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-msm@vger.kernel.org, Rob Clark , + Peter Robinson , Johan Hovold , + stable +Date: Sat, 11 Nov 2017 16:31:18 +0100 + +Fix bus-node lookup during registration, which ended up searching the whole +device tree depth-first starting at the parent (or grand parent) rather +than just matching on its children. + +To make things worse, the parent (or grand-parent) node could end being +prematurely freed as well. + +Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT") +Reported-by: Peter Robinson +Reported-by: Stephen Boyd +Cc: stable # 4.10 +Signed-off-by: Johan Hovold +--- + drivers/usb/common/ulpi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +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) + /* Find a ulpi bus underneath the parent or the grandparent */ + parent = ulpi->dev.parent; + if (parent->of_node) +- np = of_find_node_by_name(parent->of_node, "ulpi"); ++ np = of_get_child_by_name(parent->of_node, "ulpi"); + else if (parent->parent && parent->parent->of_node) +- np = of_find_node_by_name(parent->parent->of_node, "ulpi"); ++ np = of_get_child_by_name(parent->parent->of_node, "ulpi"); + if (!np) + return 0; + diff --git a/allwinner-net-emac.patch b/allwinner-net-emac.patch index f5d680bde..346c50809 100644 --- a/allwinner-net-emac.patch +++ b/allwinner-net-emac.patch @@ -332,314 +332,6 @@ index 11240a8313c2..d38282b9e5d4 100644 -- 2.13.5 -From 4aba5ca95496899165ee7ceef5d9c60a6e7b15dd Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 4 Sep 2017 13:04:47 +0100 -Subject: [PATCH 3/4] Revert "arm64: dts: allwinner: Revert EMAC changes" - -This reverts commit 87e1f5e8bb4bd584de0a8f3b1e42196dca221d02. ---- - .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 16 ++++++++++++++++ - .../boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 15 +++++++++++++++ - arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 17 +++++++++++++++++ - .../dts/allwinner/sun50i-a64-sopine-baseboard.dts | 16 ++++++++++++++++ - arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 ++++++++++++++++++++ - .../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 17 +++++++++++++++++ - .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 17 +++++++++++++++++ - .../boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 17 +++++++++++++++++ - 8 files changed, 135 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts -index 6872135d7f84..ba2fde2909f9 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts -@@ -51,6 +51,7 @@ - compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - serial1 = &uart1; - }; -@@ -67,6 +68,14 @@ - }; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ status = "okay"; -+}; -+ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins>; -@@ -77,6 +86,13 @@ - bias-pull-up; - }; - -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins>; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts -index f82ccf332c0f..24f1aac366d6 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts -@@ -48,3 +48,18 @@ - - /* TODO: Camera, touchscreen, etc. */ - }; -+ -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ status = "okay"; -+}; -+ -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -index 7c533b6d4ba9..827168bc22ed 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -@@ -51,6 +51,7 @@ - compatible = "pine64,pine64", "allwinner,sun50i-a64"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - serial1 = &uart1; - serial2 = &uart2; -@@ -78,6 +79,15 @@ - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rmii_pins>; -+ phy-mode = "rmii"; -+ phy-handle = <&ext_rmii_phy1>; -+ status = "okay"; -+ -+}; -+ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins>; -@@ -88,6 +98,13 @@ - bias-pull-up; - }; - -+&mdio { -+ ext_rmii_phy1: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins>; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts -index d891a1a27f6c..216e3a5dafae 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts -@@ -53,6 +53,7 @@ - "allwinner,sun50i-a64"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - }; - -@@ -76,6 +77,21 @@ - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ status = "okay"; -+}; -+ -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc2 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc2_pins>; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi -index 68aadc9b96dc..bd0f33b77f57 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi -@@ -449,6 +449,26 @@ - #size-cells = <0>; - }; - -+ emac: ethernet@1c30000 { -+ compatible = "allwinner,sun50i-a64-emac"; -+ syscon = <&syscon>; -+ reg = <0x01c30000 0x10000>; -+ interrupts = ; -+ interrupt-names = "macirq"; -+ resets = <&ccu RST_BUS_EMAC>; -+ reset-names = "stmmaceth"; -+ clocks = <&ccu CLK_BUS_EMAC>; -+ clock-names = "stmmaceth"; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ mdio: mdio { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ }; -+ - gic: interrupt-controller@1c81000 { - compatible = "arm,gic-400"; - reg = <0x01c81000 0x1000>, -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts -index 1c2387bd5df6..968908761194 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts -@@ -50,6 +50,7 @@ - compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - }; - -@@ -108,6 +109,22 @@ - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emac_rgmii_pins>; -+ phy-supply = <®_gmac_3v3>; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+&mdio { -+ ext_rgmii_phy: ethernet-phy@7 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <7>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts -index 4f77c8470f6c..a8296feee884 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts -@@ -59,6 +59,7 @@ - }; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - }; - -@@ -136,12 +137,28 @@ - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emac_rgmii_pins>; -+ phy-supply = <®_gmac_3v3>; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ - &ir { - pinctrl-names = "default"; - pinctrl-0 = <&ir_pins_a>; - status = "okay"; - }; - -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts -index 6be06873e5af..d906b302cbcd 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts -@@ -54,6 +54,7 @@ - compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5"; - - aliases { -+ ethernet0 = &emac; - serial0 = &uart0; - }; - -@@ -143,12 +144,28 @@ - status = "okay"; - }; - -+&emac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emac_rgmii_pins>; -+ phy-supply = <®_gmac_3v3>; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ - &ir { - pinctrl-names = "default"; - pinctrl-0 = <&ir_pins_a>; - status = "okay"; - }; - -+&mdio { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; --- -2.13.5 - From 11190f020b948ccdf15061b6df8cc2836a2afcb1 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 4 Sep 2017 13:04:55 +0100 diff --git a/arm-exynos-fix-usb3.patch b/arm-exynos-fix-usb3.patch new file mode 100644 index 000000000..cb5828acf --- /dev/null +++ b/arm-exynos-fix-usb3.patch @@ -0,0 +1,411 @@ +From patchwork Mon Oct 9 12:00:50 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCHv4,1/2] drivers: phy: add calibrate method +From: Andrzej Pietrasiewicz +X-Patchwork-Id: 9992829 +Message-Id: <1507550451-21324-2-git-send-email-andrzej.p@samsung.com> +To: linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org +Cc: Mark Rutland , Felipe Balbi , + Bartlomiej Zolnierkiewicz , + Greg Kroah-Hartman , + Russell King , + Krzysztof Kozlowski , + Kishon Vijay Abraham I , + Rob Herring , Kukjin Kim , + Andrzej Pietrasiewicz , + Marek Szyprowski +Date: Mon, 09 Oct 2017 14:00:50 +0200 + +Some quirky UDCs (like dwc3 on Exynos) need to have their phys calibrated e.g. +for using super speed. This patch adds a new phy_calibrate() method. +When the calibration should be used is dependent on actual chip. + +In case of dwc3 on Exynos the calibration must happen after usb_add_hcd() +(while in host mode), because certain phy parameters like Tx LOS levels +and boost levels need to be calibrated further post initialization of xHCI +controller, to get SuperSpeed operations working. But an hcd must be +prepared first in order to pass it to usb_add_hcd(), so, in particular, dwc3 +registers must be available first, and in order for the latter to happen +the phys must be initialized. This poses a chicken and egg problem if +the calibration were to be performed in phy_init(). To break the circular +dependency a separate method is added which can be called at a desired +moment after phy intialization. + +Signed-off-by: Andrzej Pietrasiewicz +--- + drivers/phy/phy-core.c | 15 +++++++++++++++ + include/linux/phy/phy.h | 10 ++++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c +index a268f4d..b4964b0 100644 +--- a/drivers/phy/phy-core.c ++++ b/drivers/phy/phy-core.c +@@ -372,6 +372,21 @@ int phy_reset(struct phy *phy) + } + EXPORT_SYMBOL_GPL(phy_reset); + ++int phy_calibrate(struct phy *phy) ++{ ++ int ret; ++ ++ if (!phy || !phy->ops->calibrate) ++ return 0; ++ ++ mutex_lock(&phy->mutex); ++ ret = phy->ops->calibrate(phy); ++ mutex_unlock(&phy->mutex); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(phy_calibrate); ++ + /** + * _of_phy_get() - lookup and obtain a reference to a phy by phandle + * @np: device_node for which to get the phy +diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h +index e694d40..87580c8 100644 +--- a/include/linux/phy/phy.h ++++ b/include/linux/phy/phy.h +@@ -39,6 +39,7 @@ enum phy_mode { + * @power_off: powering off the phy + * @set_mode: set the mode of the phy + * @reset: resetting the phy ++ * @calibrate: calibrate the phy + * @owner: the module owner containing the ops + */ + struct phy_ops { +@@ -48,6 +49,7 @@ struct phy_ops { + int (*power_off)(struct phy *phy); + int (*set_mode)(struct phy *phy, enum phy_mode mode); + int (*reset)(struct phy *phy); ++ int (*calibrate)(struct phy *phy); + struct module *owner; + }; + +@@ -141,6 +143,7 @@ static inline void *phy_get_drvdata(struct phy *phy) + int phy_power_off(struct phy *phy); + int phy_set_mode(struct phy *phy, enum phy_mode mode); + int phy_reset(struct phy *phy); ++int phy_calibrate(struct phy *phy); + static inline int phy_get_bus_width(struct phy *phy) + { + return phy->attrs.bus_width; +@@ -262,6 +265,13 @@ static inline int phy_reset(struct phy *phy) + return -ENOSYS; + } + ++static inline int phy_calibrate(struct phy *phy) ++{ ++ if (!phy) ++ return 0; ++ return -ENOSYS; ++} ++ + static inline int phy_get_bus_width(struct phy *phy) + { + return -ENOSYS; +From patchwork Mon Oct 9 12:00:51 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCHv4, + 2/2] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800 +From: Andrzej Pietrasiewicz +X-Patchwork-Id: 9992809 +Message-Id: <1507550451-21324-3-git-send-email-andrzej.p@samsung.com> +To: linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, + linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org +Cc: Mark Rutland , Felipe Balbi , + Bartlomiej Zolnierkiewicz , + Greg Kroah-Hartman , + Russell King , + Krzysztof Kozlowski , + Kishon Vijay Abraham I , + Rob Herring , Kukjin Kim , + Andrzej Pietrasiewicz , + Marek Szyprowski +Date: Mon, 09 Oct 2017 14:00:51 +0200 + +From: Vivek Gautam + +Adding phy calibration sequence for USB 3.0 DRD PHY present on +Exynos5420/5800 systems. +This calibration facilitates setting certain PHY parameters viz. +the Loss-of-Signal (LOS) Detector Threshold Level, as well as +Tx-Vboost-Level for Super-Speed operations. +Additionally we also set proper time to wait for RxDetect measurement, +for desired PHY reference clock, so as to solve issue with enumeration +of few USB 3.0 devices, like Samsung SUM-TSB16S 3.0 USB drive +on the controller. + +We are using CR_port for this purpose to send required data +to override the LOS values. + +On testing with USB 3.0 devices on USB 3.0 port present on +SMDK5420, and peach-pit boards should see following message: +usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd + +and without this patch, should see below shown message: +usb 1-1: new high-speed USB device number 2 using xhci-hcd + +[Also removed unnecessary extra lines in the register macro definitions] + +Signed-off-by: Vivek Gautam +[adapted to use phy_calibrate as entry point] +Signed-off-by: Andrzej Pietrasiewicz +--- + drivers/phy/samsung/phy-exynos5-usbdrd.c | 183 +++++++++++++++++++++++++++++++ + drivers/usb/dwc3/core.c | 7 +- + 2 files changed, 188 insertions(+), 2 deletions(-) + +diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c +index 22c68f5..9e83c15 100644 +--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c ++++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c +@@ -90,7 +90,17 @@ + #define PHYCLKRST_COMMONONN BIT(0) + + #define EXYNOS5_DRD_PHYREG0 0x14 ++#define PHYREG0_SSC_REF_CLK_SEL BIT(21) ++#define PHYREG0_SSC_RANGE BIT(20) ++#define PHYREG0_CR_WRITE BIT(19) ++#define PHYREG0_CR_READ BIT(18) ++#define PHYREG0_CR_DATA_IN(_x) ((_x) << 2) ++#define PHYREG0_CR_CAP_DATA BIT(1) ++#define PHYREG0_CR_CAP_ADDR BIT(0) ++ + #define EXYNOS5_DRD_PHYREG1 0x18 ++#define PHYREG1_CR_DATA_OUT(_x) ((_x) << 1) ++#define PHYREG1_CR_ACK BIT(0) + + #define EXYNOS5_DRD_PHYPARAM0 0x1c + +@@ -119,6 +129,25 @@ + #define EXYNOS5_DRD_PHYRESUME 0x34 + #define EXYNOS5_DRD_LINKPORT 0x44 + ++/* USB 3.0 DRD PHY SS Function Control Reg; accessed by CR_PORT */ ++#define EXYNOS5_DRD_PHYSS_LOSLEVEL_OVRD_IN (0x15) ++#define LOSLEVEL_OVRD_IN_LOS_BIAS_5420 (0x5 << 13) ++#define LOSLEVEL_OVRD_IN_LOS_BIAS_DEFAULT (0x0 << 13) ++#define LOSLEVEL_OVRD_IN_EN (0x1 << 10) ++#define LOSLEVEL_OVRD_IN_LOS_LEVEL_DEFAULT (0x9 << 0) ++ ++#define EXYNOS5_DRD_PHYSS_TX_VBOOSTLEVEL_OVRD_IN (0x12) ++#define TX_VBOOSTLEVEL_OVRD_IN_VBOOST_5420 (0x5 << 13) ++#define TX_VBOOSTLEVEL_OVRD_IN_VBOOST_DEFAULT (0x4 << 13) ++ ++#define EXYNOS5_DRD_PHYSS_LANE0_TX_DEBUG (0x1010) ++#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_19M2_20M (0x4 << 4) ++#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_24M (0x8 << 4) ++#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_25M_26M (0x8 << 4) ++#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_48M_50M_52M (0x20 << 4) ++#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_62M5 (0x20 << 4) ++#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_96M_100M (0x40 << 4) ++ + #define KHZ 1000 + #define MHZ (KHZ * KHZ) + +@@ -527,6 +556,151 @@ static int exynos5_usbdrd_phy_power_off(struct phy *phy) + return 0; + } + ++static int crport_handshake(struct exynos5_usbdrd_phy *phy_drd, ++ u32 val, u32 cmd) ++{ ++ u32 usec = 100; ++ unsigned int result; ++ ++ writel(val | cmd, phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0); ++ ++ do { ++ result = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYREG1); ++ if (result & PHYREG1_CR_ACK) ++ break; ++ ++ udelay(1); ++ } while (usec-- > 0); ++ ++ if (!usec) { ++ dev_err(phy_drd->dev, ++ "CRPORT handshake timeout1 (0x%08x)\n", val); ++ return -ETIME; ++ } ++ ++ usec = 100; ++ ++ writel(val, phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0); ++ ++ do { ++ result = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYREG1); ++ if (!(result & PHYREG1_CR_ACK)) ++ break; ++ ++ udelay(1); ++ } while (usec-- > 0); ++ ++ if (!usec) { ++ dev_err(phy_drd->dev, ++ "CRPORT handshake timeout2 (0x%08x)\n", val); ++ return -ETIME; ++ } ++ ++ return 0; ++} ++ ++static int crport_ctrl_write(struct exynos5_usbdrd_phy *phy_drd, ++ u32 addr, u32 data) ++{ ++ int ret; ++ ++ /* Write Address */ ++ writel(PHYREG0_CR_DATA_IN(addr), ++ phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0); ++ ret = crport_handshake(phy_drd, PHYREG0_CR_DATA_IN(addr), ++ PHYREG0_CR_CAP_ADDR); ++ if (ret) ++ return ret; ++ ++ /* Write Data */ ++ writel(PHYREG0_CR_DATA_IN(data), ++ phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0); ++ ret = crport_handshake(phy_drd, PHYREG0_CR_DATA_IN(data), ++ PHYREG0_CR_CAP_DATA); ++ if (ret) ++ return ret; ++ ++ ret = crport_handshake(phy_drd, PHYREG0_CR_DATA_IN(data), ++ PHYREG0_CR_WRITE); ++ ++ return ret; ++} ++ ++/* ++ * Calibrate few PHY parameters using CR_PORT register to meet ++ * SuperSpeed requirements on Exynos5420 and Exynos5800 systems, ++ * which have 28nm USB 3.0 DRD PHY. ++ */ ++static int exynos5420_usbdrd_phy_calibrate(struct exynos5_usbdrd_phy *phy_drd) ++{ ++ unsigned int temp; ++ int ret = 0; ++ ++ /* ++ * Change los_bias to (0x5) for 28nm PHY from a ++ * default value (0x0); los_level is set as default ++ * (0x9) as also reflected in los_level[30:26] bits ++ * of PHYPARAM0 register. ++ */ ++ temp = LOSLEVEL_OVRD_IN_LOS_BIAS_5420 | ++ LOSLEVEL_OVRD_IN_EN | ++ LOSLEVEL_OVRD_IN_LOS_LEVEL_DEFAULT; ++ ret = crport_ctrl_write(phy_drd, ++ EXYNOS5_DRD_PHYSS_LOSLEVEL_OVRD_IN, ++ temp); ++ if (ret) { ++ dev_err(phy_drd->dev, ++ "Failed setting Loss-of-Signal level for SuperSpeed\n"); ++ return ret; ++ } ++ ++ /* ++ * Set tx_vboost_lvl to (0x5) for 28nm PHY Tuning, ++ * to raise Tx signal level from its default value of (0x4) ++ */ ++ temp = TX_VBOOSTLEVEL_OVRD_IN_VBOOST_5420; ++ ret = crport_ctrl_write(phy_drd, ++ EXYNOS5_DRD_PHYSS_TX_VBOOSTLEVEL_OVRD_IN, ++ temp); ++ if (ret) { ++ dev_err(phy_drd->dev, ++ "Failed setting Tx-Vboost-Level for SuperSpeed\n"); ++ return ret; ++ } ++ ++ /* ++ * Set proper time to wait for RxDetect measurement, for ++ * desired reference clock of PHY, by tuning the CR_PORT ++ * register LANE0.TX_DEBUG which is internal to PHY. ++ * This fixes issue with few USB 3.0 devices, which are ++ * not detected (not even generate interrupts on the bus ++ * on insertion) without this change. ++ * e.g. Samsung SUM-TSB16S 3.0 USB drive. ++ */ ++ switch (phy_drd->extrefclk) { ++ case EXYNOS5_FSEL_50MHZ: ++ temp = LANE0_TX_DEBUG_RXDET_MEAS_TIME_48M_50M_52M; ++ break; ++ case EXYNOS5_FSEL_20MHZ: ++ case EXYNOS5_FSEL_19MHZ2: ++ temp = LANE0_TX_DEBUG_RXDET_MEAS_TIME_19M2_20M; ++ break; ++ case EXYNOS5_FSEL_24MHZ: ++ default: ++ temp = LANE0_TX_DEBUG_RXDET_MEAS_TIME_24M; ++ break; ++ } ++ ++ ret = crport_ctrl_write(phy_drd, ++ EXYNOS5_DRD_PHYSS_LANE0_TX_DEBUG, ++ temp); ++ if (ret) ++ dev_err(phy_drd->dev, ++ "Failed setting RxDetect measurement time for SuperSpeed\n"); ++ ++ return ret; ++} ++ + static struct phy *exynos5_usbdrd_phy_xlate(struct device *dev, + struct of_phandle_args *args) + { +@@ -538,11 +712,20 @@ static struct phy *exynos5_usbdrd_phy_xlate(struct device *dev, + return phy_drd->phys[args->args[0]].phy; + } + ++static int exynos5_usbdrd_phy_calibrate(struct phy *phy) ++{ ++ struct phy_usb_instance *inst = phy_get_drvdata(phy); ++ struct exynos5_usbdrd_phy *phy_drd = to_usbdrd_phy(inst); ++ ++ return exynos5420_usbdrd_phy_calibrate(phy_drd); ++} ++ + static const struct phy_ops exynos5_usbdrd_phy_ops = { + .init = exynos5_usbdrd_phy_init, + .exit = exynos5_usbdrd_phy_exit, + .power_on = exynos5_usbdrd_phy_power_on, + .power_off = exynos5_usbdrd_phy_power_off, ++ .calibrate = exynos5_usbdrd_phy_calibrate, + .owner = THIS_MODULE, + }; + +diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c +index 03474d3..224e0dd 100644 +--- a/drivers/usb/dwc3/core.c ++++ b/drivers/usb/dwc3/core.c +@@ -156,9 +156,10 @@ static void __dwc3_set_mode(struct work_struct *work) + } else { + if (dwc->usb2_phy) + otg_set_vbus(dwc->usb2_phy->otg, true); +- if (dwc->usb2_generic_phy) ++ if (dwc->usb2_generic_phy) { + phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST); +- ++ phy_calibrate(dwc->usb2_generic_phy); ++ } + } + break; + case DWC3_GCTL_PRTCAP_DEVICE: +@@ -955,6 +956,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) + dev_err(dev, "failed to initialize host\n"); + return ret; + } ++ if (dwc->usb2_generic_phy) ++ phy_calibrate(dwc->usb2_generic_phy); + break; + case USB_DR_MODE_OTG: + INIT_WORK(&dwc->drd_work, __dwc3_set_mode); diff --git a/arm-of-restrict-dma-configuration.patch b/arm-of-restrict-dma-configuration.patch deleted file mode 100644 index cc9ddd965..000000000 --- a/arm-of-restrict-dma-configuration.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 723288836628bc1c0855f3bb7b64b1803e4b9e4a Mon Sep 17 00:00:00 2001 -From: Robin Murphy -Date: Thu, 31 Aug 2017 11:32:54 +0100 -Subject: of: restrict DMA configuration - -Moving DMA configuration to happen later at driver probe time had the -unnoticed side-effect that we now perform DMA configuration for *every* -device represented in DT, rather than only those explicitly created by -the of_platform and PCI code. - -As Christoph points out, this is not really the best thing to do. Whilst -there may well be other DMA-capable buses that can benefit from having -their children automatically configured after the bridge has probed, -there are also plenty of others like USB, MDIO, etc. that definitely do -not support DMA and should not be indiscriminately processed. - -The good news is that in most cases the DT "dma-ranges" property serves -as an appropriate indicator - per a strict interpretation of the spec, -anything lacking a "dma-ranges" property should be considered not to -have a mapping of DMA address space from its children to its parent, -thus anything for which of_dma_get_range() does not succeed does not -need DMA configuration. Certain bus types have a general expectation of -DMA capability and carry a well-established precedent that an absent -"dma-ranges" implies the same as the empty property, so we automatically -opt those in to DMA configuration regardless, to avoid regressing most -existing platforms. - -Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices") -Reported-by: Christoph Hellwig -Signed-off-by: Robin Murphy -Acked-by: Rob Herring -Signed-off-by: Christoph Hellwig ---- - drivers/of/device.c | 48 ++++++++++++++++++++++++++++++++---------------- - 1 file changed, 32 insertions(+), 16 deletions(-) - -diff --git a/drivers/of/device.c b/drivers/of/device.c -index e0a28ea..04c4c95 100644 ---- a/drivers/of/device.c -+++ b/drivers/of/device.c -@@ -9,6 +9,9 @@ - #include - #include - #include -+#include -+#include -+#include - - #include - #include "of_private.h" -@@ -84,31 +87,28 @@ int of_device_add(struct platform_device *ofdev) - */ - int of_dma_configure(struct device *dev, struct device_node *np) - { -- u64 dma_addr, paddr, size; -+ u64 dma_addr, paddr, size = 0; - int ret; - bool coherent; - unsigned long offset; - const struct iommu_ops *iommu; - u64 mask; - -- /* -- * Set default coherent_dma_mask to 32 bit. Drivers are expected to -- * setup the correct supported mask. -- */ -- if (!dev->coherent_dma_mask) -- dev->coherent_dma_mask = DMA_BIT_MASK(32); -- -- /* -- * Set it to coherent_dma_mask by default if the architecture -- * code has not set it. -- */ -- if (!dev->dma_mask) -- dev->dma_mask = &dev->coherent_dma_mask; -- - ret = of_dma_get_range(np, &dma_addr, &paddr, &size); - if (ret < 0) { -+ /* -+ * For legacy reasons, we have to assume some devices need -+ * DMA configuration regardless of whether "dma-ranges" is -+ * correctly specified or not. -+ */ -+ if (!dev_is_pci(dev) && -+#ifdef CONFIG_ARM_AMBA -+ dev->bus != &amba_bustype && -+#endif -+ dev->bus != &platform_bus_type) -+ return ret == -ENODEV ? 0 : ret; -+ - dma_addr = offset = 0; -- size = max(dev->coherent_dma_mask, dev->coherent_dma_mask + 1); - } else { - offset = PFN_DOWN(paddr - dma_addr); - -@@ -129,6 +129,22 @@ int of_dma_configure(struct device *dev, struct device_node *np) - dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset); - } - -+ /* -+ * Set default coherent_dma_mask to 32 bit. Drivers are expected to -+ * setup the correct supported mask. -+ */ -+ if (!dev->coherent_dma_mask) -+ dev->coherent_dma_mask = DMA_BIT_MASK(32); -+ /* -+ * Set it to coherent_dma_mask by default if the architecture -+ * code has not set it. -+ */ -+ if (!dev->dma_mask) -+ dev->dma_mask = &dev->coherent_dma_mask; -+ -+ if (!size) -+ size = max(dev->coherent_dma_mask, dev->coherent_dma_mask + 1); -+ - dev->dma_pfn_offset = offset; - - /* --- -cgit v1.1 - diff --git a/arm-tegra-fix-gpu-iommu.patch b/arm-tegra-fix-gpu-iommu.patch deleted file mode 100644 index c775c88b4..000000000 --- a/arm-tegra-fix-gpu-iommu.patch +++ /dev/null @@ -1,39 +0,0 @@ -From patchwork Sun Jul 9 16:36:14 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: ARM: tegra: Register host1x node with iommu binding on tegra124 -From: Paul Kocialkowski -X-Patchwork-Id: 9831825 -Message-Id: <20170709163614.6746-1-contact@paulk.fr> -To: linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, - linux-kernel@vger.kernel.org -Cc: Thierry Reding , - Stephen Warren , - Mikko Perttunen , - Paul Kocialkowski , - Jonathan Hunter -Date: Sun, 9 Jul 2017 19:36:14 +0300 - -This registers the host1x node with the SMMU (as HC swgroup) to allow -the host1x code to attach to it. It avoid failing the probe sequence, -which resulted in the tegra drm driver not probing and thus nothing -being displayed on-screen. - -Signed-off-by: Paul Kocialkowski ---- - arch/arm/boot/dts/tegra124.dtsi | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi -index 187a36c6d0fc..b3b89befffeb 100644 ---- a/arch/arm/boot/dts/tegra124.dtsi -+++ b/arch/arm/boot/dts/tegra124.dtsi -@@ -85,6 +85,7 @@ - clocks = <&tegra_car TEGRA124_CLK_HOST1X>; - resets = <&tegra_car 28>; - reset-names = "host1x"; -+ iommus = <&mc TEGRA_SWGROUP_HC>; - - #address-cells = <2>; - #size-cells = <2>; diff --git a/arm64-socionext-96b-enablement.patch b/arm64-socionext-96b-enablement.patch new file mode 100644 index 000000000..0a7df3a19 --- /dev/null +++ b/arm64-socionext-96b-enablement.patch @@ -0,0 +1,3099 @@ +From 58be18a7bbf9dca67f4260ac172a44baa59d0ee9 Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Mon, 21 Aug 2017 10:47:48 +0100 +Subject: arm64: acpi/gtdt: validate CNTFRQ after having enabled the frame + +The ACPI GTDT code validates the CNTFRQ field of each MMIO timer +frame against the CNTFRQ system register of the current CPU, to +ensure that they are equal, which is mandated by the architecture. + +However, reading the CNTFRQ field of a frame is not possible until +the RFRQ bit in the frame's CNTACRn register is set, and doing so +before that willl produce the following error: + + arch_timer: [Firmware Bug]: CNTFRQ mismatch: frame @ 0x00000000e0be0000: (0x00000000), CPU: (0x0ee6b280) + arch_timer: Disabling MMIO timers due to CNTFRQ mismatch + arch_timer: Failed to initialize memory-mapped timer. + +The reason is that the CNTFRQ field is RES0 if access is not enabled. + +So move the validation of CNTFRQ into the loop that iterates over the +timers to find the best frame, but defer it until after we have selected +the best frame, which should also have enabled the RFRQ bit. + +Signed-off-by: Ard Biesheuvel +--- + drivers/clocksource/arm_arch_timer.c | 38 ++++++++++++++++++++---------------- + 1 file changed, 21 insertions(+), 17 deletions(-) + +diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c +index fd4b7f6..14e2419 100644 +--- a/drivers/clocksource/arm_arch_timer.c ++++ b/drivers/clocksource/arm_arch_timer.c +@@ -1268,10 +1268,6 @@ arch_timer_mem_find_best_frame(struct arch_timer_mem *timer_mem) + + iounmap(cntctlbase); + +- if (!best_frame) +- pr_err("Unable to find a suitable frame in timer @ %pa\n", +- &timer_mem->cntctlbase); +- + return best_frame; + } + +@@ -1372,6 +1368,8 @@ static int __init arch_timer_mem_of_init(struct device_node *np) + + frame = arch_timer_mem_find_best_frame(timer_mem); + if (!frame) { ++ pr_err("Unable to find a suitable frame in timer @ %pa\n", ++ &timer_mem->cntctlbase); + ret = -EINVAL; + goto out; + } +@@ -1420,7 +1418,7 @@ arch_timer_mem_verify_cntfrq(struct arch_timer_mem *timer_mem) + static int __init arch_timer_mem_acpi_init(int platform_timer_count) + { + struct arch_timer_mem *timers, *timer; +- struct arch_timer_mem_frame *frame; ++ struct arch_timer_mem_frame *frame, *best_frame = NULL; + int timer_count, i, ret = 0; + + timers = kcalloc(platform_timer_count, sizeof(*timers), +@@ -1432,14 +1430,6 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count) + if (ret || !timer_count) + goto out; + +- for (i = 0; i < timer_count; i++) { +- ret = arch_timer_mem_verify_cntfrq(&timers[i]); +- if (ret) { +- pr_err("Disabling MMIO timers due to CNTFRQ mismatch\n"); +- goto out; +- } +- } +- + /* + * While unlikely, it's theoretically possible that none of the frames + * in a timer expose the combination of feature we want. +@@ -1448,12 +1438,26 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count) + timer = &timers[i]; + + frame = arch_timer_mem_find_best_frame(timer); +- if (frame) +- break; ++ if (!best_frame) ++ best_frame = frame; ++ ++ ret = arch_timer_mem_verify_cntfrq(timer); ++ if (ret) { ++ pr_err("Disabling MMIO timers due to CNTFRQ mismatch\n"); ++ goto out; ++ } ++ ++ if (!best_frame) /* implies !frame */ ++ /* ++ * Only complain about missing suitable frames if we ++ * haven't already found one in a previous iteration. ++ */ ++ pr_err("Unable to find a suitable frame in timer @ %pa\n", ++ &timer->cntctlbase); + } + +- if (frame) +- ret = arch_timer_mem_frame_register(frame); ++ if (best_frame) ++ ret = arch_timer_mem_frame_register(best_frame); + out: + kfree(timers); + return ret; +-- +cgit v1.1 + +From 33d983b5bb2929ae242606925e708092b1dfdd8f Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Sat, 2 Sep 2017 11:01:22 +0100 +Subject: drivers/irqchip: gicv3: add workaround for Synquacer pre-ITS + +In their infinite wisdom, the Socionext engineers have decided +that ITS device IDs should not be hardwired, but it should be +left up to the software to assign them, by allowing it to +redirect MSI doorbell writes via a separate hardware block +that issues the doorbell write with a device ID that is +derived from the memory address. This completely breaks any +kind of isolation, or virtualization in general, for that +matter, but add support for it nonetheless. + +Signed-off-by: Ard Biesheuvel +--- + arch/arm64/Kconfig | 8 +++++++ + drivers/irqchip/irq-gic-v3-its.c | 48 +++++++++++++++++++++++++++++++++++----- + 2 files changed, 51 insertions(+), 5 deletions(-) + +diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig +index 0df64a6..c4361df 100644 +--- a/arch/arm64/Kconfig ++++ b/arch/arm64/Kconfig +@@ -539,6 +539,14 @@ config QCOM_QDF2400_ERRATUM_0065 + + If unsure, say Y. + ++config SOCIONEXT_SYNQUACER_PREITS ++ bool "Socionext Synquacer: Workaround for GICv3 pre-ITS" ++ default y ++ help ++ Socionext Synquacer SoCs implement a separate h/w block to generate ++ MSI doorbell writes with non-zero values for the device ID. ++ ++ If unsure, say Y. + endmenu + + +diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c +index e8d8934..0d372f1 100644 +--- a/drivers/irqchip/irq-gic-v3-its.c ++++ b/drivers/irqchip/irq-gic-v3-its.c +@@ -46,6 +46,7 @@ + #define ITS_FLAGS_CMDQ_NEEDS_FLUSHING (1ULL << 0) + #define ITS_FLAGS_WORKAROUND_CAVIUM_22375 (1ULL << 1) + #define ITS_FLAGS_WORKAROUND_CAVIUM_23144 (1ULL << 2) ++#define ITS_FLAGS_WORKAROUND_SOCIONEXT_PREITS (1ULL << 3) + + #define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0) + +@@ -99,6 +100,10 @@ struct its_node { + struct its_collection *collections; + struct list_head its_device_list; + u64 flags; ++#ifdef CONFIG_SOCIONEXT_SYNQUACER_PREITS ++ u64 pre_its_base; ++ u64 pre_its_size; ++#endif + u32 ite_size; + u32 device_ids; + int numa_node; +@@ -1102,13 +1107,29 @@ static void its_irq_compose_msi_msg(struct irq_data *d, struct msi_msg *msg) + u64 addr; + + its = its_dev->its; +- addr = its->phys_base + GITS_TRANSLATER; ++ ++#ifdef CONFIG_SOCIONEXT_SYNQUACER_PREITS ++ if (its->flags & ITS_FLAGS_WORKAROUND_SOCIONEXT_PREITS) ++ ++ /* ++ * The Socionext Synquacer SoC has a so-called 'pre-ITS', ++ * which maps 32-bit writes into a separate window of size ++ * '4 << device_id_bits' onto writes to GITS_TRANSLATER with ++ * device ID taken from bits [device_id_bits + 1:2] of the ++ * window offset. ++ */ ++ addr = its->pre_its_base + (its_dev->device_id << 2); ++ else ++#endif ++ addr = its->phys_base + GITS_TRANSLATER; + + msg->address_lo = lower_32_bits(addr); + msg->address_hi = upper_32_bits(addr); + msg->data = its_get_event_id(d); + +- iommu_dma_map_msi_msg(d->irq, msg); ++ if (!IS_ENABLED(CONFIG_SOCIONEXT_SYNQUACER_PREITS) || ++ !(its->flags & ITS_FLAGS_WORKAROUND_SOCIONEXT_PREITS)) ++ iommu_dma_map_msi_msg(d->irq, msg); + } + + static int its_irq_set_irqchip_state(struct irq_data *d, +@@ -1666,6 +1687,11 @@ static int its_alloc_tables(struct its_node *its) + ids = 0x14; /* 20 bits, 8MB */ + } + ++#ifdef CONFIG_SOCIONEXT_SYNQUACER_PREITS ++ if (its->flags & ITS_FLAGS_WORKAROUND_SOCIONEXT_PREITS) ++ ids = ilog2(its->pre_its_size) - 2; ++#endif ++ + its->device_ids = ids; + + for (i = 0; i < GITS_BASER_NR_REGS; i++) { +@@ -2788,11 +2814,21 @@ static const struct gic_quirk its_quirks[] = { + } + }; + +-static void its_enable_quirks(struct its_node *its) ++static void its_enable_quirks(struct its_node *its, ++ struct fwnode_handle *handle) + { + u32 iidr = readl_relaxed(its->base + GITS_IIDR); + + gic_enable_quirks(iidr, its_quirks, its); ++ ++#ifdef CONFIG_SOCIONEXT_SYNQUACER_PREITS ++ if (!fwnode_property_read_u64_array(handle, ++ "socionext,synquacer-pre-its", ++ &its->pre_its_base, 2)) { ++ its->flags |= ITS_FLAGS_WORKAROUND_SOCIONEXT_PREITS; ++ pr_info("ITS: enabling workaround for Socionext Synquacer pre-ITS\n"); ++ } ++#endif + } + + static int its_init_domain(struct fwnode_handle *handle, struct its_node *its) +@@ -2812,7 +2848,9 @@ static int its_init_domain(struct fwnode_handle *handle, struct its_node *its) + + inner_domain->parent = its_parent; + irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_NEXUS); +- inner_domain->flags |= IRQ_DOMAIN_FLAG_MSI_REMAP; ++ ++ if (!(its->flags & ITS_FLAGS_WORKAROUND_SOCIONEXT_PREITS)) ++ inner_domain->flags |= IRQ_DOMAIN_FLAG_MSI_REMAP; + info->ops = &its_msi_domain_ops; + info->data = its; + inner_domain->host_data = info; +@@ -2966,7 +3004,7 @@ static int __init its_probe_one(struct resource *res, + } + its->cmd_write = its->cmd_base; + +- its_enable_quirks(its); ++ its_enable_quirks(its, handle); + + err = its_alloc_tables(its); + if (err) +-- +cgit v1.1 + +From 26e7bb47b0fb03a01be1e391a08c7375b45335a2 Mon Sep 17 00:00:00 2001 +From: Ard Biesheuvel +Date: Mon, 21 Aug 2017 20:29:05 +0100 +Subject: pci: designware: add driver for DWC controller in ECAM shift mode + +Some implementations of the Synopsys Designware PCIe controller implement +a so-called ECAM shift mode, which allows a static memory window to be +configured that covers the configuration space of the entire bus range. + +If the firmware performs all the low level configuration that is required +to expose this controller in a fully ECAM compatible manner, we can +simply describe it as "pci-host-ecam-generic" and be done with it. +However, it appears that in some cases (one of which is the Armada 80x0), +the IP is synthesized with an ATU window size that does not allow the +first bus to be mapped in a way that prevents the device on the +downstream port from appearing more than once. + +So implement a driver that relies on the firmware to perform all low +level initialization, and drives the controller in ECAM mode, but +overrides the config space accessors to take the above quirk into +account. + +Note that, unlike most drivers for this IP, this driver does not expose +a fake bridge device at B/D/F 00:00.0. There is no point in doing so, +given that this is not a true bridge, and does not require any windows +to be configured in order for the downstream device to operate correctly. +Omitting it also prevents the PCI resource allocation routines from +handing out BAR space to it unnecessarily. + +Cc: Bjorn Helgaas +Cc: Jingoo Han +Cc: Joao Pinto +Signed-off-by: Ard Biesheuvel +--- + drivers/pci/dwc/Kconfig | 11 +++++ + drivers/pci/dwc/Makefile | 1 + + drivers/pci/dwc/pcie-designware-ecam.c | 77 ++++++++++++++++++++++++++++++++++ + 3 files changed, 89 insertions(+) + create mode 100644 drivers/pci/dwc/pcie-designware-ecam.c + +diff --git a/drivers/pci/dwc/Kconfig b/drivers/pci/dwc/Kconfig +index 22ec82f..19856b1 100644 +--- a/drivers/pci/dwc/Kconfig ++++ b/drivers/pci/dwc/Kconfig +@@ -169,4 +169,15 @@ config PCIE_KIRIN + Say Y here if you want PCIe controller support + on HiSilicon Kirin series SoCs. + ++config PCIE_DW_HOST_ECAM ++ bool "Synopsys DesignWare PCIe controller in ECAM mode" ++ depends on OF && PCI ++ select PCI_HOST_COMMON ++ select IRQ_DOMAIN ++ help ++ Add support for Synopsys DesignWare PCIe controllers configured ++ by the firmware into ECAM shift mode. In some cases, these are ++ fully ECAM compliant, in which case the pci-host-generic driver ++ may be used instead. ++ + endmenu +diff --git a/drivers/pci/dwc/Makefile b/drivers/pci/dwc/Makefile +index c61be97..7d5a23e 100644 +--- a/drivers/pci/dwc/Makefile ++++ b/drivers/pci/dwc/Makefile +@@ -1,5 +1,6 @@ + # SPDX-License-Identifier: GPL-2.0 + obj-$(CONFIG_PCIE_DW) += pcie-designware.o + obj-$(CONFIG_PCIE_DW_HOST) += pcie-designware-host.o ++obj-$(CONFIG_PCIE_DW_HOST_ECAM) += pcie-designware-ecam.o + obj-$(CONFIG_PCIE_DW_EP) += pcie-designware-ep.o + obj-$(CONFIG_PCIE_DW_PLAT) += pcie-designware-plat.o + ifneq ($(filter y,$(CONFIG_PCI_DRA7XX_HOST) $(CONFIG_PCI_DRA7XX_EP)),) +diff --git a/drivers/pci/dwc/pcie-designware-ecam.c b/drivers/pci/dwc/pcie-designware-ecam.c +new file mode 100644 +index 0000000..ede627d +--- /dev/null ++++ b/drivers/pci/dwc/pcie-designware-ecam.c +@@ -0,0 +1,77 @@ ++/* ++ * Driver for mostly ECAM compatible Synopsys dw PCIe controllers ++ * configured by the firmware into RC mode ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Copyright (C) 2014 ARM Limited ++ * Copyright (C) 2017 Linaro Limited ++ * ++ * Authors: Will Deacon ++ * Ard Biesheuvel ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int pci_dw_ecam_config_read(struct pci_bus *bus, u32 devfn, int where, ++ int size, u32 *val) ++{ ++ struct pci_config_window *cfg = bus->sysdata; ++ ++ /* ++ * The Synopsys dw PCIe controller in RC mode will not filter type 0 ++ * config TLPs sent to devices 1 and up on its downstream port, ++ * resulting in devices appearing multiple times on bus 0 unless we ++ * filter them here. ++ */ ++ if (bus->number == cfg->busr.start && PCI_SLOT(devfn) > 0) { ++ *val = 0xffffffff; ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ } ++ return pci_generic_config_read(bus, devfn, where, size, val); ++} ++ ++static int pci_dw_ecam_config_write(struct pci_bus *bus, u32 devfn, int where, ++ int size, u32 val) ++{ ++ struct pci_config_window *cfg = bus->sysdata; ++ ++ if (bus->number == cfg->busr.start && PCI_SLOT(devfn) > 0) ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ ++ return pci_generic_config_write(bus, devfn, where, size, val); ++} ++ ++static struct pci_ecam_ops pci_dw_ecam_bus_ops = { ++ .pci_ops.map_bus = pci_ecam_map_bus, ++ .pci_ops.read = pci_dw_ecam_config_read, ++ .pci_ops.write = pci_dw_ecam_config_write, ++ .bus_shift = 20, ++}; ++ ++static const struct of_device_id pci_dw_ecam_of_match[] = { ++ { .compatible = "marvell,armada8k-pcie-ecam" }, ++ { .compatible = "socionext,synquacer-pcie-ecam" }, ++ { .compatible = "snps,dw-pcie-ecam" }, ++ { }, ++}; ++ ++static int pci_dw_ecam_probe(struct platform_device *pdev) ++{ ++ return pci_host_common_probe(pdev, &pci_dw_ecam_bus_ops); ++} ++ ++static struct platform_driver pci_dw_ecam_driver = { ++ .driver.name = "pcie-designware-ecam", ++ .driver.of_match_table = pci_dw_ecam_of_match, ++ .driver.suppress_bind_attrs = true, ++ .probe = pci_dw_ecam_probe, ++}; ++builtin_platform_driver(pci_dw_ecam_driver); +-- +cgit v1.1 + +From e3dff048a10f16aa0fd32438442ce39558bbdbef Mon Sep 17 00:00:00 2001 +From: Jassi Brar +Date: Tue, 29 Aug 2017 22:45:59 +0530 +Subject: net: socionext: Add Synquacer NetSec driver + +This driver adds support for Socionext "netsec" IP Gigabit +Ethernet + PHY IP used in the Synquacer SC2A11 SoC. + +Signed-off-by: Jassi Brar +Signed-off-by: Ard Biesheuvel +--- + drivers/net/ethernet/Kconfig | 1 + + drivers/net/ethernet/Makefile | 1 + + drivers/net/ethernet/socionext/Kconfig | 29 + + drivers/net/ethernet/socionext/Makefile | 1 + + drivers/net/ethernet/socionext/netsec/Makefile | 6 + + drivers/net/ethernet/socionext/netsec/netsec.h | 408 ++++++++++++++ + .../socionext/netsec/netsec_desc_ring_access.c | 623 +++++++++++++++++++++ + .../net/ethernet/socionext/netsec/netsec_ethtool.c | 78 +++ + .../ethernet/socionext/netsec/netsec_gmac_access.c | 330 +++++++++++ + .../net/ethernet/socionext/netsec/netsec_netdev.c | 540 ++++++++++++++++++ + .../ethernet/socionext/netsec/netsec_platform.c | 435 ++++++++++++++ + 11 files changed, 2452 insertions(+) + create mode 100644 drivers/net/ethernet/socionext/Kconfig + create mode 100644 drivers/net/ethernet/socionext/Makefile + create mode 100644 drivers/net/ethernet/socionext/netsec/Makefile + create mode 100644 drivers/net/ethernet/socionext/netsec/netsec.h + create mode 100644 drivers/net/ethernet/socionext/netsec/netsec_desc_ring_access.c + create mode 100644 drivers/net/ethernet/socionext/netsec/netsec_ethtool.c + create mode 100644 drivers/net/ethernet/socionext/netsec/netsec_gmac_access.c + create mode 100644 drivers/net/ethernet/socionext/netsec/netsec_netdev.c + create mode 100644 drivers/net/ethernet/socionext/netsec/netsec_platform.c + +diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig +index c604213..d50519e 100644 +--- a/drivers/net/ethernet/Kconfig ++++ b/drivers/net/ethernet/Kconfig +@@ -170,6 +170,7 @@ source "drivers/net/ethernet/sis/Kconfig" + source "drivers/net/ethernet/sfc/Kconfig" + source "drivers/net/ethernet/sgi/Kconfig" + source "drivers/net/ethernet/smsc/Kconfig" ++source "drivers/net/ethernet/socionext/Kconfig" + source "drivers/net/ethernet/stmicro/Kconfig" + source "drivers/net/ethernet/sun/Kconfig" + source "drivers/net/ethernet/tehuti/Kconfig" +diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile +index a0a03d4..6ae1bb9 100644 +--- a/drivers/net/ethernet/Makefile ++++ b/drivers/net/ethernet/Makefile +@@ -81,6 +81,7 @@ obj-$(CONFIG_SFC) += sfc/ + obj-$(CONFIG_SFC_FALCON) += sfc/falcon/ + obj-$(CONFIG_NET_VENDOR_SGI) += sgi/ + obj-$(CONFIG_NET_VENDOR_SMSC) += smsc/ ++obj-$(CONFIG_NET_VENDOR_SNI) += socionext/ + obj-$(CONFIG_NET_VENDOR_STMICRO) += stmicro/ + obj-$(CONFIG_NET_VENDOR_SUN) += sun/ + obj-$(CONFIG_NET_VENDOR_TEHUTI) += tehuti/ +diff --git a/drivers/net/ethernet/socionext/Kconfig b/drivers/net/ethernet/socionext/Kconfig +new file mode 100644 +index 0000000..a6dc195 +--- /dev/null ++++ b/drivers/net/ethernet/socionext/Kconfig +@@ -0,0 +1,29 @@ ++# ++# Socionext Network device configuration ++# ++ ++config NET_VENDOR_SNI ++ bool "Socionext devices" ++ default y ++ ---help--- ++ If you have a network (Ethernet) card belonging to this class, say Y. ++ ++ Note that the answer to this question doesn't directly affect the ++ the questions about Socionext cards. If you say Y, you will be asked ++ for your specific card in the following questions. ++ ++if NET_VENDOR_SNI ++ ++config SNI_NETSEC ++ tristate "NETSEC Driver Support" ++ depends on OF ++ select PHYLIB ++ select MII ++help ++ Enable to add support for the SocioNext NetSec Gigabit Ethernet ++ controller + PHY, as found on the Synquacer SC2A11 SoC ++ ++ To compile this driver as a module, choose M here: the module will be ++ called netsec. If unsure, say N. ++ ++endif # NET_VENDOR_SNI +diff --git a/drivers/net/ethernet/socionext/Makefile b/drivers/net/ethernet/socionext/Makefile +new file mode 100644 +index 0000000..9555899 +--- /dev/null ++++ b/drivers/net/ethernet/socionext/Makefile +@@ -0,0 +1 @@ ++obj-$(CONFIG_SNI_NETSEC) += netsec/ +diff --git a/drivers/net/ethernet/socionext/netsec/Makefile b/drivers/net/ethernet/socionext/netsec/Makefile +new file mode 100644 +index 0000000..18884ed +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/Makefile +@@ -0,0 +1,6 @@ ++obj-$(CONFIG_SNI_NETSEC) := netsec.o ++netsec-objs := netsec_desc_ring_access.o \ ++ netsec_netdev.o \ ++ netsec_ethtool.o \ ++ netsec_platform.o \ ++ netsec_gmac_access.o +diff --git a/drivers/net/ethernet/socionext/netsec/netsec.h b/drivers/net/ethernet/socionext/netsec/netsec.h +new file mode 100644 +index 0000000..3b97661 +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/netsec.h +@@ -0,0 +1,408 @@ ++/** ++ * netsec.h ++ * ++ * Copyright (C) 2013-2014 Fujitsu Semiconductor Limited. ++ * Copyright (C) 2014-2017 Linaro Ltd. All rights reserved. ++ * Andy Green ++ * Jassi Brar ++ * Ard Biesheuvel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ */ ++#ifndef NETSEC_INTERNAL_H ++#define NETSEC_INTERNAL_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define NETSEC_FLOW_CONTROL_START_THRESHOLD 36 ++#define NETSEC_FLOW_CONTROL_STOP_THRESHOLD 48 ++ ++#define NETSEC_CLK_MHZ 1000000 ++ ++#define NETSEC_RX_PKT_BUF_LEN 1522 ++#define NETSEC_RX_JUMBO_PKT_BUF_LEN 9022 ++ ++#define NETSEC_NETDEV_TX_PKT_SCAT_NUM_MAX 19 ++ ++#define DESC_NUM 128 ++ ++#define NETSEC_TX_SHIFT_OWN_FIELD 31 ++#define NETSEC_TX_SHIFT_LD_FIELD 30 ++#define NETSEC_TX_SHIFT_DRID_FIELD 24 ++#define NETSEC_TX_SHIFT_PT_FIELD 21 ++#define NETSEC_TX_SHIFT_TDRID_FIELD 16 ++#define NETSEC_TX_SHIFT_CC_FIELD 15 ++#define NETSEC_TX_SHIFT_FS_FIELD 9 ++#define NETSEC_TX_LAST 8 ++#define NETSEC_TX_SHIFT_CO 7 ++#define NETSEC_TX_SHIFT_SO 6 ++#define NETSEC_TX_SHIFT_TRS_FIELD 4 ++ ++#define NETSEC_RX_PKT_OWN_FIELD 31 ++#define NETSEC_RX_PKT_LD_FIELD 30 ++#define NETSEC_RX_PKT_SDRID_FIELD 24 ++#define NETSEC_RX_PKT_FR_FIELD 23 ++#define NETSEC_RX_PKT_ER_FIELD 21 ++#define NETSEC_RX_PKT_ERR_FIELD 16 ++#define NETSEC_RX_PKT_TDRID_FIELD 12 ++#define NETSEC_RX_PKT_FS_FIELD 9 ++#define NETSEC_RX_PKT_LS_FIELD 8 ++#define NETSEC_RX_PKT_CO_FIELD 6 ++ ++#define NETSEC_RX_PKT_ERR_MASK 3 ++ ++#define NETSEC_MAX_TX_PKT_LEN 1518 ++#define NETSEC_MAX_TX_JUMBO_PKT_LEN 9018 ++ ++enum netsec_rings { ++ NETSEC_RING_TX, ++ NETSEC_RING_RX ++}; ++ ++#define NETSEC_RING_GMAC 15 ++#define NETSEC_RING_MAX 1 ++ ++#define NETSEC_TCP_SEG_LEN_MAX 1460 ++#define NETSEC_TCP_JUMBO_SEG_LEN_MAX 8960 ++ ++#define NETSEC_RX_CKSUM_NOTAVAIL 0 ++#define NETSEC_RX_CKSUM_OK 1 ++#define NETSEC_RX_CKSUM_NG 2 ++ ++#define NETSEC_TOP_IRQ_REG_CODE_LOAD_END BIT(20) ++#define NETSEC_IRQ_TRANSITION_COMPLETE BIT(4) ++#define NETSEC_IRQ_RX BIT(1) ++#define NETSEC_IRQ_TX BIT(0) ++ ++#define NETSEC_IRQ_EMPTY BIT(17) ++#define NETSEC_IRQ_ERR BIT(16) ++#define NETSEC_IRQ_PKT_CNT BIT(15) ++#define NETSEC_IRQ_TIMEUP BIT(14) ++#define NETSEC_IRQ_RCV (NETSEC_IRQ_PKT_CNT | \ ++ NETSEC_IRQ_TIMEUP) ++ ++#define NETSEC_IRQ_TX_DONE BIT(15) ++#define NETSEC_IRQ_SND (NETSEC_IRQ_TX_DONE | \ ++ NETSEC_IRQ_TIMEUP) ++ ++#define NETSEC_MODE_TRANS_COMP_IRQ_N2T BIT(20) ++#define NETSEC_MODE_TRANS_COMP_IRQ_T2N BIT(19) ++ ++#define NETSEC_DESC_MIN 2 ++#define NETSEC_DESC_MAX 2047 ++#define NETSEC_INT_PKTCNT_MAX 2047 ++ ++#define NETSEC_FLOW_START_TH_MAX 95 ++#define NETSEC_FLOW_STOP_TH_MAX 95 ++#define NETSEC_FLOW_PAUSE_TIME_MIN 5 ++ ++#define NETSEC_CLK_EN_REG_DOM_ALL 0x3f ++ ++#define NETSEC_REG_TOP_STATUS 0x80 ++#define NETSEC_REG_TOP_INTEN 0x81 ++#define NETSEC_REG_INTEN_SET 0x8d ++#define NETSEC_REG_INTEN_CLR 0x8e ++#define NETSEC_REG_NRM_TX_STATUS 0x100 ++#define NETSEC_REG_NRM_TX_INTEN 0x101 ++#define NETSEC_REG_NRM_TX_INTEN_SET 0x10a ++#define NETSEC_REG_NRM_TX_INTEN_CLR 0x10b ++#define NETSEC_REG_NRM_RX_STATUS 0x110 ++#define NETSEC_REG_NRM_RX_INTEN 0x111 ++#define NETSEC_REG_NRM_RX_INTEN_SET 0x11a ++#define NETSEC_REG_NRM_RX_INTEN_CLR 0x11b ++#define NETSEC_REG_RESERVED_RX_DESC_START 0x122 ++#define NETSEC_REG_RESERVED_TX_DESC_START 0x132 ++#define NETSEC_REG_CLK_EN 0x40 ++#define NETSEC_REG_SOFT_RST 0x41 ++#define NETSEC_REG_PKT_CMD_BUF 0x34 ++#define NETSEC_REG_PKT_CTRL 0x50 ++#define NETSEC_REG_COM_INIT 0x48 ++#define NETSEC_REG_DMA_TMR_CTRL 0x83 ++#define NETSEC_REG_F_TAIKI_MC_VER 0x8b ++#define NETSEC_REG_F_TAIKI_VER 0x8c ++#define NETSEC_REG_DMA_HM_CTRL 0x85 ++#define NETSEC_REG_DMA_MH_CTRL 0x88 ++#define NETSEC_REG_ADDR_DIS_CORE 0x86 ++#define NETSEC_REG_DMAC_HM_CMD_BUF 0x84 ++#define NETSEC_REG_DMAC_MH_CMD_BUF 0x87 ++#define NETSEC_REG_NRM_TX_PKTCNT 0x104 ++#define NETSEC_REG_NRM_TX_DONE_TXINT_PKTCNT 0x106 ++#define NETSEC_REG_NRM_RX_RXINT_PKTCNT 0x116 ++#define NETSEC_REG_NRM_TX_TXINT_TMR 0x108 ++#define NETSEC_REG_NRM_RX_RXINT_TMR 0x118 ++#define NETSEC_REG_NRM_TX_DONE_PKTCNT 0x105 ++#define NETSEC_REG_NRM_RX_PKTCNT 0x115 ++#define NETSEC_REG_NRM_TX_TMR 0x107 ++#define NETSEC_REG_NRM_RX_TMR 0x117 ++#define NETSEC_REG_NRM_TX_DESC_START_UP 0x10d ++#define NETSEC_REG_NRM_TX_DESC_START_LW 0x102 ++#define NETSEC_REG_NRM_RX_DESC_START_UP 0x11d ++#define NETSEC_REG_NRM_RX_DESC_START_LW 0x112 ++#define NETSEC_REG_NRM_TX_CONFIG 0x10c ++#define NETSEC_REG_NRM_RX_CONFIG 0x11c ++#define MAC_REG_DATA 0x470 ++#define MAC_REG_CMD 0x471 ++#define MAC_REG_FLOW_TH 0x473 ++#define MAC_REG_INTF_SEL 0x475 ++#define MAC_REG_DESC_INIT 0x47f ++#define MAC_REG_DESC_SOFT_RST 0x481 ++#define NETSEC_REG_MODE_TRANS_COMP_STATUS 0x140 ++#define GMAC_REG_MCR 0x0000 ++#define GMAC_REG_MFFR 0x0004 ++#define GMAC_REG_GAR 0x0010 ++#define GMAC_REG_GDR 0x0014 ++#define GMAC_REG_FCR 0x0018 ++#define GMAC_REG_BMR 0x1000 ++#define GMAC_REG_RDLAR 0x100c ++#define GMAC_REG_TDLAR 0x1010 ++#define GMAC_REG_OMR 0x1018 ++ ++#define NETSEC_PKT_CTRL_REG_MODE_NRM BIT(28) ++#define NETSEC_PKT_CTRL_REG_EN_JUMBO BIT(27) ++#define NETSEC_PKT_CTRL_REG_LOG_CHKSUM_ER BIT(3) ++#define NETSEC_PKT_CTRL_REG_LOG_HD_INCOMPLETE BIT(2) ++#define NETSEC_PKT_CTRL_REG_LOG_HD_ER BIT(1) ++#define NETSEC_PKT_CTRL_REG_DRP_NO_MATCH BIT(0) ++ ++#define NETSEC_CLK_EN_REG_DOM_G BIT(5) ++#define NETSEC_CLK_EN_REG_DOM_C BIT(1) ++#define NETSEC_CLK_EN_REG_DOM_D BIT(0) ++ ++#define NETSEC_COM_INIT_REG_DB BIT(2) ++#define NETSEC_COM_INIT_REG_CLS BIT(1) ++#define NETSEC_COM_INIT_REG_ALL (NETSEC_COM_INIT_REG_CLS | \ ++ NETSEC_COM_INIT_REG_DB) ++ ++#define NETSEC_SOFT_RST_REG_RESET 0 ++#define NETSEC_SOFT_RST_REG_RUN BIT(31) ++ ++#define NETSEC_DMA_CTRL_REG_STOP 1 ++#define MH_CTRL__MODE_TRANS BIT(20) ++ ++#define NETSEC_GMAC_CMD_ST_READ 0 ++#define NETSEC_GMAC_CMD_ST_WRITE BIT(28) ++#define NETSEC_GMAC_CMD_ST_BUSY BIT(31) ++ ++#define NETSEC_GMAC_BMR_REG_COMMON 0x00412080 ++#define NETSEC_GMAC_BMR_REG_RESET 0x00020181 ++#define NETSEC_GMAC_BMR_REG_SWR 0x00000001 ++ ++#define NETSEC_GMAC_OMR_REG_ST BIT(13) ++#define NETSEC_GMAC_OMR_REG_SR BIT(1) ++ ++#define NETSEC_GMAC_MCR_REG_IBN BIT(30) ++#define NETSEC_GMAC_MCR_REG_CST BIT(25) ++#define NETSEC_GMAC_MCR_REG_JE BIT(20) ++#define NETSEC_MCR_PS BIT(15) ++#define NETSEC_GMAC_MCR_REG_FES BIT(14) ++#define NETSEC_GMAC_MCR_REG_FULL_DUPLEX_COMMON 0x0000280c ++#define NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON 0x0001a00c ++ ++#define NETSEC_FCR_RFE BIT(2) ++#define NETSEC_FCR_TFE BIT(1) ++ ++#define NETSEC_GMAC_GAR_REG_GW BIT(1) ++#define NETSEC_GMAC_GAR_REG_GB BIT(0) ++ ++#define NETSEC_GMAC_GAR_REG_SHIFT_PA 11 ++#define NETSEC_GMAC_GAR_REG_SHIFT_GR 6 ++#define GMAC_REG_SHIFT_CR_GAR 2 ++ ++#define NETSEC_GMAC_GAR_REG_CR_25_35_MHZ 2 ++#define NETSEC_GMAC_GAR_REG_CR_35_60_MHZ 3 ++#define NETSEC_GMAC_GAR_REG_CR_60_100_MHZ 0 ++#define NETSEC_GMAC_GAR_REG_CR_100_150_MHZ 1 ++#define NETSEC_GMAC_GAR_REG_CR_150_250_MHZ 4 ++#define NETSEC_GMAC_GAR_REG_CR_250_300_MHZ 5 ++ ++#define NETSEC_GMAC_RDLAR_REG_COMMON 0x18000 ++#define NETSEC_GMAC_TDLAR_REG_COMMON 0x1c000 ++ ++#define NETSEC_REG_NETSEC_VER_F_TAIKI 0x50000 ++ ++#define NETSEC_REG_DESC_RING_CONFIG_CFG_UP BIT(31) ++#define NETSEC_REG_DESC_RING_CONFIG_CH_RST BIT(30) ++#define NETSEC_REG_DESC_TMR_MODE 4 ++#define NETSEC_REG_DESC_ENDIAN 0 ++ ++#define NETSEC_MAC_DESC_SOFT_RST_SOFT_RST 1 ++#define NETSEC_MAC_DESC_INIT_REG_INIT 1 ++ ++#define NETSEC_EEPROM_MAC_ADDRESS 0x00 ++#define NETSEC_EEPROM_HM_ME_ADDRESS_H 0x08 ++#define NETSEC_EEPROM_HM_ME_ADDRESS_L 0x0C ++#define NETSEC_EEPROM_HM_ME_SIZE 0x10 ++#define NETSEC_EEPROM_MH_ME_ADDRESS_H 0x14 ++#define NETSEC_EEPROM_MH_ME_ADDRESS_L 0x18 ++#define NETSEC_EEPROM_MH_ME_SIZE 0x1C ++#define NETSEC_EEPROM_PKT_ME_ADDRESS 0x20 ++#define NETSEC_EEPROM_PKT_ME_SIZE 0x24 ++ ++/* this is used to interpret a register layout */ ++struct netsec_pkt_ctrlaram { ++ u8 log_chksum_er_flag:1; ++ u8 log_hd_imcomplete_flag:1; ++ u8 log_hd_er_flag:1; ++}; ++ ++struct netsec_param { ++ struct netsec_pkt_ctrlaram pkt_ctrlaram; ++ bool use_jumbo_pkt_flag; ++}; ++ ++struct netsec_mac_mode { ++ u16 flow_start_th; ++ u16 flow_stop_th; ++ u16 pause_time; ++ bool flow_ctrl_enable_flag; ++}; ++ ++struct netsec_desc_ring { ++ spinlock_t spinlock_desc; /* protect descriptor access */ ++ phys_addr_t desc_phys; ++ struct netsec_frag_info *frag; ++ struct sk_buff **priv; ++ void *ring_vaddr; ++ enum netsec_rings id; ++ int len; ++ u16 tx_done_num; ++ u16 rx_num; ++ u16 head; ++ u16 tail; ++ bool running; ++ bool full; ++}; ++ ++struct netsec_frag_info { ++ dma_addr_t dma_addr; ++ void *addr; ++ u16 len; ++}; ++ ++struct netsec_priv { ++ struct netsec_desc_ring desc_ring[NETSEC_RING_MAX + 1]; ++ struct ethtool_coalesce et_coalesce; ++ struct netsec_mac_mode mac_mode; ++ struct netsec_param param; ++ struct napi_struct napi; ++ phy_interface_t phy_interface; ++ spinlock_t tx_queue_lock; /* protect transmit queue */ ++ struct netsec_frag_info tx_info[MAX_SKB_FRAGS]; ++ struct net_device *ndev; ++ struct device_node *phy_np; ++ struct phy_device *phydev; ++ struct mii_bus *mii_bus; ++ void __iomem *ioaddr; ++ const void *eeprom_base; ++ struct device *dev; ++ struct clk *clk[3]; ++ u32 rx_pkt_buf_len; ++ u32 msg_enable; ++ u32 freq; ++ int actual_link_speed; ++ int clock_count; ++ bool rx_cksum_offload_flag; ++ bool actual_duplex; ++ bool irq_registered; ++}; ++ ++struct netsec_tx_de { ++ u32 attr; ++ u32 data_buf_addr_up; ++ u32 data_buf_addr_lw; ++ u32 buf_len_info; ++}; ++ ++struct netsec_rx_de { ++ u32 attr; ++ u32 data_buf_addr_up; ++ u32 data_buf_addr_lw; ++ u32 buf_len_info; ++}; ++ ++struct netsec_tx_pkt_ctrl { ++ u16 tcp_seg_len; ++ bool tcp_seg_offload_flag; ++ bool cksum_offload_flag; ++}; ++ ++struct netsec_rx_pkt_info { ++ int rx_cksum_result; ++ int err_code; ++ bool is_fragmented; ++ bool err_flag; ++}; ++ ++struct netsec_skb_cb { ++ bool is_rx; ++}; ++ ++static inline void netsec_writel(struct netsec_priv *priv, ++ u32 reg_addr, u32 val) ++{ ++ writel_relaxed(val, priv->ioaddr + (reg_addr << 2)); ++} ++ ++static inline u32 netsec_readl(struct netsec_priv *priv, u32 reg_addr) ++{ ++ return readl_relaxed(priv->ioaddr + (reg_addr << 2)); ++} ++ ++static inline void netsec_mark_skb_type(struct sk_buff *skb, bool is_rx) ++{ ++ struct netsec_skb_cb *cb = (struct netsec_skb_cb *)skb->cb; ++ ++ cb->is_rx = is_rx; ++} ++ ++static inline bool skb_is_rx(struct sk_buff *skb) ++{ ++ struct netsec_skb_cb *cb = (struct netsec_skb_cb *)skb->cb; ++ ++ return cb->is_rx; ++} ++ ++extern const struct net_device_ops netsec_netdev_ops; ++extern const struct ethtool_ops netsec_ethtool_ops; ++ ++int netsec_start_gmac(struct netsec_priv *priv); ++int netsec_stop_gmac(struct netsec_priv *priv); ++int netsec_mii_register(struct netsec_priv *priv); ++void netsec_mii_unregister(struct netsec_priv *priv); ++int netsec_start_desc_ring(struct netsec_priv *priv, enum netsec_rings id); ++void netsec_stop_desc_ring(struct netsec_priv *priv, enum netsec_rings id); ++u16 netsec_get_rx_num(struct netsec_priv *priv); ++u16 netsec_get_tx_avail_num(struct netsec_priv *priv); ++int netsec_clean_tx_desc_ring(struct netsec_priv *priv); ++int netsec_clean_rx_desc_ring(struct netsec_priv *priv); ++int netsec_set_tx_pkt_data(struct netsec_priv *priv, ++ const struct netsec_tx_pkt_ctrl *tx_ctrl, ++ u8 count_frags, const struct netsec_frag_info *info, ++ struct sk_buff *skb); ++int netsec_get_rx_pkt_data(struct netsec_priv *priv, ++ struct netsec_rx_pkt_info *rxpi, ++ struct netsec_frag_info *frag, u16 *len, ++ struct sk_buff **skb); ++void netsec_ring_irq_enable(struct netsec_priv *priv, ++ enum netsec_rings id, u32 i); ++void netsec_ring_irq_disable(struct netsec_priv *priv, ++ enum netsec_rings id, u32 i); ++int netsec_alloc_desc_ring(struct netsec_priv *priv, enum netsec_rings id); ++void netsec_free_desc_ring(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc); ++int netsec_setup_rx_desc(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc); ++int netsec_netdev_napi_poll(struct napi_struct *napi_p, int budget); ++ ++#endif /* NETSEC_INTERNAL_H */ +diff --git a/drivers/net/ethernet/socionext/netsec/netsec_desc_ring_access.c b/drivers/net/ethernet/socionext/netsec/netsec_desc_ring_access.c +new file mode 100644 +index 0000000..a4e56cd +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/netsec_desc_ring_access.c +@@ -0,0 +1,623 @@ ++/** ++ * drivers/net/ethernet/socionext/netsec/netsec_desc_ring_access.c ++ * ++ * Copyright (C) 2013-2014 Fujitsu Semiconductor Limited. ++ * Copyright (C) 2014-2017 Linaro Ltd. All rights reserved. ++ * Andy Green ++ * Jassi Brar ++ * Ard Biesheuvel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ */ ++ ++#include ++#include ++ ++#include "netsec.h" ++ ++static const u32 ads_irq_set[] = { ++ NETSEC_REG_NRM_TX_INTEN_SET, ++ NETSEC_REG_NRM_RX_INTEN_SET, ++}; ++ ++static const u32 desc_ring_irq_inten_clr_reg_addr[] = { ++ NETSEC_REG_NRM_TX_INTEN_CLR, ++ NETSEC_REG_NRM_RX_INTEN_CLR, ++}; ++ ++static const u32 int_tmr_reg_addr[] = { ++ NETSEC_REG_NRM_TX_TXINT_TMR, ++ NETSEC_REG_NRM_RX_RXINT_TMR, ++}; ++ ++static const u32 rx_pkt_cnt_reg_addr[] = { ++ 0, ++ NETSEC_REG_NRM_RX_PKTCNT, ++}; ++ ++static const u32 tx_pkt_cnt_reg_addr[] = { ++ NETSEC_REG_NRM_TX_PKTCNT, ++ 0, ++}; ++ ++static const u32 int_pkt_cnt_reg_addr[] = { ++ NETSEC_REG_NRM_TX_DONE_TXINT_PKTCNT, ++ NETSEC_REG_NRM_RX_RXINT_PKTCNT, ++}; ++ ++static const u32 tx_done_pkt_addr[] = { ++ NETSEC_REG_NRM_TX_DONE_PKTCNT, ++ 0, ++}; ++ ++static const u32 netsec_desc_mask[] = { ++ [NETSEC_RING_TX] = NETSEC_GMAC_OMR_REG_ST, ++ [NETSEC_RING_RX] = NETSEC_GMAC_OMR_REG_SR ++}; ++ ++void netsec_ring_irq_enable(struct netsec_priv *priv, ++ enum netsec_rings id, u32 irqf) ++{ ++ netsec_writel(priv, ads_irq_set[id], irqf); ++} ++ ++void netsec_ring_irq_disable(struct netsec_priv *priv, ++ enum netsec_rings id, u32 irqf) ++{ ++ netsec_writel(priv, desc_ring_irq_inten_clr_reg_addr[id], irqf); ++} ++ ++static struct sk_buff *alloc_rx_pkt_buf(struct netsec_priv *priv, ++ struct netsec_frag_info *info) ++{ ++ struct sk_buff *skb; ++ ++ if (device_get_dma_attr(priv->dev) == DEV_DMA_COHERENT) { ++ skb = netdev_alloc_skb_ip_align(priv->ndev, info->len); ++ } else { ++ info->len = L1_CACHE_ALIGN(info->len); ++ skb = netdev_alloc_skb(priv->ndev, info->len); ++ } ++ if (!skb) ++ return NULL; ++ ++ netsec_mark_skb_type(skb, NETSEC_RING_RX); ++ info->addr = skb->data; ++ info->dma_addr = dma_map_single(priv->dev, info->addr, info->len, ++ DMA_FROM_DEVICE); ++ if (dma_mapping_error(priv->dev, info->dma_addr)) { ++ dev_kfree_skb(skb); ++ return NULL; ++ } ++ return skb; ++} ++ ++int netsec_alloc_desc_ring(struct netsec_priv *priv, enum netsec_rings id) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[id]; ++ int ret = 0; ++ ++ desc->id = id; ++ desc->len = sizeof(struct netsec_tx_de); /* rx and tx desc same size */ ++ ++ spin_lock_init(&desc->spinlock_desc); ++ ++ desc->ring_vaddr = dma_zalloc_coherent(priv->dev, desc->len * DESC_NUM, ++ &desc->desc_phys, GFP_KERNEL); ++ if (!desc->ring_vaddr) { ++ ret = -ENOMEM; ++ goto err; ++ } ++ ++ desc->frag = kcalloc(DESC_NUM, sizeof(*desc->frag), GFP_KERNEL); ++ if (!desc->frag) { ++ ret = -ENOMEM; ++ goto err; ++ } ++ ++ desc->priv = kcalloc(DESC_NUM, sizeof(struct sk_buff *), GFP_KERNEL); ++ if (!desc->priv) { ++ ret = -ENOMEM; ++ goto err; ++ } ++ ++ return 0; ++ ++err: ++ netsec_free_desc_ring(priv, desc); ++ ++ return ret; ++} ++ ++static void netsec_uninit_pkt_desc_ring(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc) ++{ ++ struct netsec_frag_info *frag; ++ u32 status; ++ u16 idx; ++ ++ for (idx = 0; idx < DESC_NUM; idx++) { ++ frag = &desc->frag[idx]; ++ if (!frag->addr) ++ continue; ++ ++ status = *(u32 *)(desc->ring_vaddr + desc->len * idx); ++ ++ dma_unmap_single(priv->dev, frag->dma_addr, frag->len, ++ skb_is_rx(desc->priv[idx]) ? DMA_FROM_DEVICE : ++ DMA_TO_DEVICE); ++ if ((status >> NETSEC_TX_LAST) & 1) ++ dev_kfree_skb(desc->priv[idx]); ++ } ++ ++ memset(desc->frag, 0, sizeof(struct netsec_frag_info) * DESC_NUM); ++ memset(desc->priv, 0, sizeof(struct sk_buff *) * DESC_NUM); ++ memset(desc->ring_vaddr, 0, desc->len * DESC_NUM); ++} ++ ++void netsec_free_desc_ring(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc) ++{ ++ if (desc->ring_vaddr && desc->frag && desc->priv) ++ netsec_uninit_pkt_desc_ring(priv, desc); ++ ++ if (desc->ring_vaddr) { ++ dma_free_coherent(priv->dev, desc->len * DESC_NUM, ++ desc->ring_vaddr, desc->desc_phys); ++ desc->ring_vaddr = NULL; ++ } ++ kfree(desc->frag); ++ desc->frag = NULL; ++ kfree(desc->priv); ++ desc->priv = NULL; ++} ++ ++static void netsec_set_rx_de(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc, u16 idx, ++ const struct netsec_frag_info *info, ++ struct sk_buff *skb) ++{ ++ struct netsec_rx_de *de = desc->ring_vaddr + desc->len * idx; ++ u32 attr = (1 << NETSEC_RX_PKT_OWN_FIELD) | ++ (1 << NETSEC_RX_PKT_FS_FIELD) | ++ (1 << NETSEC_RX_PKT_LS_FIELD); ++ ++ if (idx == DESC_NUM - 1) ++ attr |= (1 << NETSEC_RX_PKT_LD_FIELD); ++ ++ de->data_buf_addr_up = upper_32_bits(info->dma_addr); ++ de->data_buf_addr_lw = lower_32_bits(info->dma_addr); ++ de->buf_len_info = info->len; ++ /* desc->attr makes the descriptor live, so it must be physically ++ * written last after the rest of the descriptor body is already there ++ */ ++ dma_wmb(); ++ de->attr = attr; ++ ++ desc->frag[idx].dma_addr = info->dma_addr; ++ desc->frag[idx].addr = info->addr; ++ desc->frag[idx].len = info->len; ++ ++ desc->priv[idx] = skb; ++} ++ ++int netsec_setup_rx_desc(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc) ++{ ++ struct netsec_frag_info info; ++ struct sk_buff *skb; ++ int n; ++ ++ info.len = priv->rx_pkt_buf_len; ++ ++ for (n = 0; n < DESC_NUM; n++) { ++ skb = alloc_rx_pkt_buf(priv, &info); ++ if (!skb) { ++ netsec_uninit_pkt_desc_ring(priv, desc); ++ return -ENOMEM; ++ } ++ netsec_set_rx_de(priv, desc, n, &info, skb); ++ } ++ ++ return 0; ++} ++ ++static void netsec_set_tx_desc_entry(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc, ++ const struct netsec_tx_pkt_ctrl *tx_ctrl, ++ bool first_flag, bool last_flag, ++ const struct netsec_frag_info *frag, ++ struct sk_buff *skb) ++{ ++ struct netsec_tx_de *tx_desc_entry; ++ int idx = desc->head; ++ u32 attr; ++ ++ tx_desc_entry = desc->ring_vaddr + (desc->len * idx); ++ ++ attr = (1 << NETSEC_TX_SHIFT_OWN_FIELD) | ++ (desc->id << NETSEC_TX_SHIFT_DRID_FIELD) | ++ (1 << NETSEC_TX_SHIFT_PT_FIELD) | ++ (NETSEC_RING_GMAC << NETSEC_TX_SHIFT_TDRID_FIELD) | ++ (first_flag << NETSEC_TX_SHIFT_FS_FIELD) | ++ (last_flag << NETSEC_TX_LAST) | ++ (tx_ctrl->cksum_offload_flag << NETSEC_TX_SHIFT_CO) | ++ (tx_ctrl->tcp_seg_offload_flag << NETSEC_TX_SHIFT_SO) | ++ (1 << NETSEC_TX_SHIFT_TRS_FIELD); ++ if (idx == DESC_NUM - 1) ++ attr |= (1 << NETSEC_TX_SHIFT_LD_FIELD); ++ ++ tx_desc_entry->data_buf_addr_up = upper_32_bits(frag->dma_addr); ++ tx_desc_entry->data_buf_addr_lw = lower_32_bits(frag->dma_addr); ++ tx_desc_entry->buf_len_info = (tx_ctrl->tcp_seg_len << 16) | frag->len; ++ /* desc->attr makes the descriptor live, so it must be physically ++ * written last after the rest of the descriptor body is already there ++ */ ++ dma_wmb(); ++ tx_desc_entry->attr = attr; ++ ++ desc->frag[idx] = *frag; ++ desc->priv[idx] = skb; ++} ++ ++static void netsec_get_rx_de(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc, u16 idx, ++ struct netsec_rx_pkt_info *rxpi, ++ struct netsec_frag_info *frag, u16 *len, ++ struct sk_buff **skb) ++{ ++ struct netsec_rx_de de = {}; ++ ++ *rxpi = (struct netsec_rx_pkt_info){}; ++ memcpy(&de, desc->ring_vaddr + desc->len * idx, desc->len); ++ ++ dev_dbg(priv->dev, "%08x\n", *(u32 *)&de); ++ *len = de.buf_len_info >> 16; ++ ++ rxpi->is_fragmented = (de.attr >> NETSEC_RX_PKT_FR_FIELD) & 1; ++ rxpi->err_flag = (de.attr >> NETSEC_RX_PKT_ER_FIELD) & 1; ++ rxpi->rx_cksum_result = (de.attr >> NETSEC_RX_PKT_CO_FIELD) & 3; ++ rxpi->err_code = (de.attr >> NETSEC_RX_PKT_ERR_FIELD) & ++ NETSEC_RX_PKT_ERR_MASK; ++ *frag = desc->frag[idx]; ++ *skb = desc->priv[idx]; ++} ++ ++static void netsec_inc_desc_head_idx(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc, u16 inc) ++{ ++ u32 sum; ++ ++ sum = desc->head + inc; ++ ++ if (sum >= DESC_NUM) ++ sum -= DESC_NUM; ++ ++ desc->head = sum; ++ desc->full = desc->head == desc->tail; ++} ++ ++static void netsec_inc_desc_tail_idx(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc) ++{ ++ u32 sum; ++ ++ sum = desc->tail + 1; ++ ++ if (sum >= DESC_NUM) ++ sum -= DESC_NUM; ++ ++ desc->tail = sum; ++ desc->full = false; ++} ++ ++static u16 netsec_get_tx_avail_num_sub(struct netsec_priv *priv, ++ const struct netsec_desc_ring *desc) ++{ ++ if (desc->full) ++ return 0; ++ ++ if (desc->tail > desc->head) ++ return desc->tail - desc->head; ++ ++ return DESC_NUM + desc->tail - desc->head; ++} ++ ++static u16 netsec_get_tx_done_num_sub(struct netsec_priv *priv, ++ struct netsec_desc_ring *desc) ++{ ++ desc->tx_done_num += netsec_readl(priv, tx_done_pkt_addr[desc->id]); ++ ++ return desc->tx_done_num; ++} ++ ++static int netsec_set_irq_coalesce_param(struct netsec_priv *priv, ++ enum netsec_rings id) ++{ ++ int max_frames, tmr; ++ ++ switch (id) { ++ case NETSEC_RING_TX: ++ max_frames = priv->et_coalesce.tx_max_coalesced_frames; ++ tmr = priv->et_coalesce.tx_coalesce_usecs; ++ break; ++ case NETSEC_RING_RX: ++ max_frames = priv->et_coalesce.rx_max_coalesced_frames; ++ tmr = priv->et_coalesce.rx_coalesce_usecs; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ netsec_writel(priv, int_pkt_cnt_reg_addr[id], max_frames); ++ netsec_writel(priv, int_tmr_reg_addr[id], ((tmr != 0) << 31) | tmr); ++ ++ return 0; ++} ++ ++int netsec_start_desc_ring(struct netsec_priv *priv, enum netsec_rings id) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[id]; ++ int ret = 0; ++ ++ spin_lock_bh(&desc->spinlock_desc); ++ ++ if (desc->running) { ++ ret = -EBUSY; ++ goto err; ++ } ++ ++ switch (desc->id) { ++ case NETSEC_RING_RX: ++ netsec_writel(priv, ads_irq_set[id], NETSEC_IRQ_RCV); ++ break; ++ case NETSEC_RING_TX: ++ netsec_writel(priv, ads_irq_set[id], NETSEC_IRQ_EMPTY); ++ break; ++ } ++ ++ netsec_set_irq_coalesce_param(priv, desc->id); ++ desc->running = true; ++ ++err: ++ spin_unlock_bh(&desc->spinlock_desc); ++ ++ return ret; ++} ++ ++void netsec_stop_desc_ring(struct netsec_priv *priv, enum netsec_rings id) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[id]; ++ ++ spin_lock_bh(&desc->spinlock_desc); ++ if (desc->running) ++ netsec_writel(priv, desc_ring_irq_inten_clr_reg_addr[id], ++ NETSEC_IRQ_RCV | NETSEC_IRQ_EMPTY | ++ NETSEC_IRQ_SND); ++ ++ desc->running = false; ++ spin_unlock_bh(&desc->spinlock_desc); ++} ++ ++u16 netsec_get_rx_num(struct netsec_priv *priv) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[NETSEC_RING_RX]; ++ u32 result; ++ ++ spin_lock(&desc->spinlock_desc); ++ if (desc->running) { ++ result = netsec_readl(priv, ++ rx_pkt_cnt_reg_addr[NETSEC_RING_RX]); ++ desc->rx_num += result; ++ if (result) ++ netsec_inc_desc_head_idx(priv, desc, result); ++ } ++ spin_unlock(&desc->spinlock_desc); ++ ++ return desc->rx_num; ++} ++ ++u16 netsec_get_tx_avail_num(struct netsec_priv *priv) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[NETSEC_RING_TX]; ++ u16 result; ++ ++ spin_lock(&desc->spinlock_desc); ++ ++ if (!desc->running) { ++ netif_err(priv, drv, priv->ndev, ++ "%s: not running tx desc\n", __func__); ++ result = 0; ++ goto err; ++ } ++ ++ result = netsec_get_tx_avail_num_sub(priv, desc); ++ ++err: ++ spin_unlock(&desc->spinlock_desc); ++ ++ return result; ++} ++ ++int netsec_clean_tx_desc_ring(struct netsec_priv *priv) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[NETSEC_RING_TX]; ++ unsigned int pkts = 0, bytes = 0; ++ struct netsec_frag_info *frag; ++ struct netsec_tx_de *entry; ++ bool is_last; ++ ++ spin_lock(&desc->spinlock_desc); ++ ++ netsec_get_tx_done_num_sub(priv, desc); ++ ++ while ((desc->tail != desc->head || desc->full) && desc->tx_done_num) { ++ frag = &desc->frag[desc->tail]; ++ entry = desc->ring_vaddr + desc->len * desc->tail; ++ is_last = (entry->attr >> NETSEC_TX_LAST) & 1; ++ ++ dma_unmap_single(priv->dev, frag->dma_addr, frag->len, ++ DMA_TO_DEVICE); ++ if (is_last) { ++ pkts++; ++ bytes += desc->priv[desc->tail]->len; ++ dev_kfree_skb(desc->priv[desc->tail]); ++ } ++ *frag = (struct netsec_frag_info){}; ++ netsec_inc_desc_tail_idx(priv, desc); ++ ++ if (is_last) ++ desc->tx_done_num--; ++ } ++ ++ spin_unlock(&desc->spinlock_desc); ++ ++ priv->ndev->stats.tx_packets += pkts; ++ priv->ndev->stats.tx_bytes += bytes; ++ ++ netdev_completed_queue(priv->ndev, pkts, bytes); ++ ++ return 0; ++} ++ ++int netsec_clean_rx_desc_ring(struct netsec_priv *priv) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[NETSEC_RING_RX]; ++ ++ spin_lock(&desc->spinlock_desc); ++ ++ while (desc->full || (desc->tail != desc->head)) { ++ netsec_set_rx_de(priv, desc, desc->tail, ++ &desc->frag[desc->tail], ++ desc->priv[desc->tail]); ++ desc->rx_num--; ++ netsec_inc_desc_tail_idx(priv, desc); ++ } ++ ++ spin_unlock(&desc->spinlock_desc); ++ ++ return 0; ++} ++ ++int netsec_set_tx_pkt_data(struct netsec_priv *priv, ++ const struct netsec_tx_pkt_ctrl *tx_ctrl, ++ u8 count_frags, const struct netsec_frag_info *info, ++ struct sk_buff *skb) ++{ ++ struct netsec_desc_ring *desc; ++ u32 sum_len = 0; ++ unsigned int i; ++ int ret = 0; ++ ++ if (tx_ctrl->tcp_seg_offload_flag && !tx_ctrl->cksum_offload_flag) ++ return -EINVAL; ++ ++ if (tx_ctrl->tcp_seg_offload_flag) { ++ if (tx_ctrl->tcp_seg_len == 0) ++ return -EINVAL; ++ ++ if (priv->param.use_jumbo_pkt_flag) { ++ if (tx_ctrl->tcp_seg_len > NETSEC_TCP_JUMBO_SEG_LEN_MAX) ++ return -EINVAL; ++ } else { ++ if (tx_ctrl->tcp_seg_len > NETSEC_TCP_SEG_LEN_MAX) ++ return -EINVAL; ++ } ++ } else { ++ if (tx_ctrl->tcp_seg_len) ++ return -EINVAL; ++ } ++ ++ if (!count_frags) ++ return -ERANGE; ++ ++ for (i = 0; i < count_frags; i++) { ++ if ((info[i].len == 0) || (info[i].len > 0xffff)) { ++ netif_err(priv, drv, priv->ndev, ++ "%s: bad info len\n", __func__); ++ return -EINVAL; ++ } ++ sum_len += info[i].len; ++ } ++ ++ if (!tx_ctrl->tcp_seg_offload_flag) { ++ if (priv->param.use_jumbo_pkt_flag) { ++ if (sum_len > NETSEC_MAX_TX_JUMBO_PKT_LEN) ++ return -EINVAL; ++ } else { ++ if (sum_len > NETSEC_MAX_TX_PKT_LEN) ++ return -EINVAL; ++ } ++ } ++ ++ desc = &priv->desc_ring[NETSEC_RING_TX]; ++ spin_lock(&desc->spinlock_desc); ++ ++ if (!desc->running) { ++ ret = -ENODEV; ++ goto end; ++ } ++ ++ dma_rmb(); /* we need to see a consistent view of pending tx count */ ++ if (count_frags > netsec_get_tx_avail_num_sub(priv, desc)) { ++ ret = -EBUSY; ++ goto end; ++ } ++ ++ for (i = 0; i < count_frags; i++) { ++ netsec_set_tx_desc_entry(priv, desc, tx_ctrl, i == 0, ++ i == count_frags - 1, &info[i], skb); ++ netsec_inc_desc_head_idx(priv, desc, 1); ++ } ++ ++ dma_wmb(); /* ensure the descriptor is flushed */ ++ netsec_writel(priv, tx_pkt_cnt_reg_addr[NETSEC_RING_TX], 1); ++ ++end: ++ spin_unlock(&desc->spinlock_desc); ++ ++ return ret; ++} ++ ++int netsec_get_rx_pkt_data(struct netsec_priv *priv, ++ struct netsec_rx_pkt_info *rxpi, ++ struct netsec_frag_info *frag, u16 *len, ++ struct sk_buff **skb) ++{ ++ struct netsec_desc_ring *desc = &priv->desc_ring[NETSEC_RING_RX]; ++ struct netsec_frag_info info; ++ struct sk_buff *tmp_skb; ++ int ret = 0; ++ ++ spin_lock(&desc->spinlock_desc); ++ ++ if (desc->rx_num == 0) { ++ dev_err(priv->dev, "%s 0 len rx\n", __func__); ++ ret = -EINVAL; ++ goto err; ++ } ++ ++ info.len = priv->rx_pkt_buf_len; ++ dma_rmb(); /* we need to ensure we only see current data in descriptor */ ++ tmp_skb = alloc_rx_pkt_buf(priv, &info); ++ if (!tmp_skb) { ++ netsec_set_rx_de(priv, desc, desc->tail, ++ &desc->frag[desc->tail], ++ desc->priv[desc->tail]); ++ ret = -ENOMEM; ++ } else { ++ netsec_get_rx_de(priv, desc, desc->tail, rxpi, frag, len, skb); ++ netsec_set_rx_de(priv, desc, desc->tail, &info, tmp_skb); ++ } ++ ++ netsec_inc_desc_tail_idx(priv, desc); ++ desc->rx_num--; ++ ++err: ++ spin_unlock(&desc->spinlock_desc); ++ ++ return ret; ++} +diff --git a/drivers/net/ethernet/socionext/netsec/netsec_ethtool.c b/drivers/net/ethernet/socionext/netsec/netsec_ethtool.c +new file mode 100644 +index 0000000..45830fe +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/netsec_ethtool.c +@@ -0,0 +1,78 @@ ++/** ++ * drivers/net/ethernet/socionext/netsec/netsec_ethtool.c ++ * ++ * Copyright (C) 2013-2014 Fujitsu Semiconductor Limited. ++ * Copyright (C) 2014-2017 Linaro Ltd. All rights reserved. ++ * Andy Green ++ * Jassi Brar ++ * Ard Biesheuvel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ */ ++ ++#include "netsec.h" ++ ++static void netsec_et_get_drvinfo(struct net_device *net_device, ++ struct ethtool_drvinfo *info) ++{ ++ strlcpy(info->driver, "netsec", sizeof(info->driver)); ++ strlcpy(info->bus_info, dev_name(net_device->dev.parent), ++ sizeof(info->bus_info)); ++} ++ ++static int netsec_et_get_coalesce(struct net_device *net_device, ++ struct ethtool_coalesce *et_coalesce) ++{ ++ struct netsec_priv *priv = netdev_priv(net_device); ++ ++ *et_coalesce = priv->et_coalesce; ++ ++ return 0; ++} ++ ++static int netsec_et_set_coalesce(struct net_device *net_device, ++ struct ethtool_coalesce *et_coalesce) ++{ ++ struct netsec_priv *priv = netdev_priv(net_device); ++ ++ if (et_coalesce->rx_max_coalesced_frames > NETSEC_INT_PKTCNT_MAX) ++ return -EINVAL; ++ if (et_coalesce->tx_max_coalesced_frames > NETSEC_INT_PKTCNT_MAX) ++ return -EINVAL; ++ if (!et_coalesce->rx_max_coalesced_frames) ++ return -EINVAL; ++ if (!et_coalesce->tx_max_coalesced_frames) ++ return -EINVAL; ++ ++ priv->et_coalesce = *et_coalesce; ++ ++ return 0; ++} ++ ++static u32 netsec_et_get_msglevel(struct net_device *dev) ++{ ++ struct netsec_priv *priv = netdev_priv(dev); ++ ++ return priv->msg_enable; ++} ++ ++static void netsec_et_set_msglevel(struct net_device *dev, u32 datum) ++{ ++ struct netsec_priv *priv = netdev_priv(dev); ++ ++ priv->msg_enable = datum; ++} ++ ++const struct ethtool_ops netsec_ethtool_ops = { ++ .get_drvinfo = netsec_et_get_drvinfo, ++ .get_link_ksettings = phy_ethtool_get_link_ksettings, ++ .set_link_ksettings = phy_ethtool_set_link_ksettings, ++ .get_link = ethtool_op_get_link, ++ .get_coalesce = netsec_et_get_coalesce, ++ .set_coalesce = netsec_et_set_coalesce, ++ .get_msglevel = netsec_et_get_msglevel, ++ .set_msglevel = netsec_et_set_msglevel, ++}; +diff --git a/drivers/net/ethernet/socionext/netsec/netsec_gmac_access.c b/drivers/net/ethernet/socionext/netsec/netsec_gmac_access.c +new file mode 100644 +index 0000000..94e9b7f +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/netsec_gmac_access.c +@@ -0,0 +1,330 @@ ++/** ++ * drivers/net/ethernet/socionext/netsec/netsec_gmac_access.c ++ * ++ * Copyright (C) 2013-2014 Fujitsu Semiconductor Limited. ++ * Copyright (C) 2014-2017 Linaro Ltd. All rights reserved. ++ * Andy Green ++ * Jassi Brar ++ * Ard Biesheuvel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ */ ++#include "netsec.h" ++ ++#define TIMEOUT_SPINS_MAC 1000 ++#define TIMEOUT_SECONDARY_MS_MAC 100 ++ ++static u32 netsec_clk_type(u32 freq) ++{ ++ if (freq < 35 * NETSEC_CLK_MHZ) ++ return NETSEC_GMAC_GAR_REG_CR_25_35_MHZ; ++ if (freq < 60 * NETSEC_CLK_MHZ) ++ return NETSEC_GMAC_GAR_REG_CR_35_60_MHZ; ++ if (freq < 100 * NETSEC_CLK_MHZ) ++ return NETSEC_GMAC_GAR_REG_CR_60_100_MHZ; ++ if (freq < 150 * NETSEC_CLK_MHZ) ++ return NETSEC_GMAC_GAR_REG_CR_100_150_MHZ; ++ if (freq < 250 * NETSEC_CLK_MHZ) ++ return NETSEC_GMAC_GAR_REG_CR_150_250_MHZ; ++ ++ return NETSEC_GMAC_GAR_REG_CR_250_300_MHZ; ++} ++ ++static int netsec_wait_while_busy(struct netsec_priv *priv, u32 addr, u32 mask) ++{ ++ u32 timeout = TIMEOUT_SPINS_MAC; ++ ++ while (--timeout && netsec_readl(priv, addr) & mask) ++ cpu_relax(); ++ if (timeout) ++ return 0; ++ ++ timeout = TIMEOUT_SECONDARY_MS_MAC; ++ while (--timeout && netsec_readl(priv, addr) & mask) ++ usleep_range(1000, 2000); ++ ++ if (timeout) ++ return 0; ++ ++ netdev_WARN(priv->ndev, "%s: timeout\n", __func__); ++ ++ return -ETIMEDOUT; ++} ++ ++static int netsec_mac_write(struct netsec_priv *priv, u32 addr, u32 value) ++{ ++ netsec_writel(priv, MAC_REG_DATA, value); ++ netsec_writel(priv, MAC_REG_CMD, addr | NETSEC_GMAC_CMD_ST_WRITE); ++ return netsec_wait_while_busy(priv, ++ MAC_REG_CMD, NETSEC_GMAC_CMD_ST_BUSY); ++} ++ ++static int netsec_mac_read(struct netsec_priv *priv, u32 addr, u32 *read) ++{ ++ int ret; ++ ++ netsec_writel(priv, MAC_REG_CMD, addr | NETSEC_GMAC_CMD_ST_READ); ++ ret = netsec_wait_while_busy(priv, ++ MAC_REG_CMD, NETSEC_GMAC_CMD_ST_BUSY); ++ if (ret) ++ return ret; ++ ++ *read = netsec_readl(priv, MAC_REG_DATA); ++ ++ return 0; ++} ++ ++static int netsec_mac_wait_while_busy(struct netsec_priv *priv, ++ u32 addr, u32 mask) ++{ ++ u32 timeout = TIMEOUT_SPINS_MAC; ++ int ret, data; ++ ++ do { ++ ret = netsec_mac_read(priv, addr, &data); ++ if (ret) ++ break; ++ cpu_relax(); ++ } while (--timeout && (data & mask)); ++ ++ if (timeout) ++ return 0; ++ ++ timeout = TIMEOUT_SECONDARY_MS_MAC; ++ do { ++ usleep_range(1000, 2000); ++ ++ ret = netsec_mac_read(priv, addr, &data); ++ if (ret) ++ break; ++ cpu_relax(); ++ } while (--timeout && (data & mask)); ++ ++ if (timeout && !ret) ++ return 0; ++ ++ netdev_WARN(priv->ndev, "%s: timeout\n", __func__); ++ ++ return -ETIMEDOUT; ++} ++ ++static int netsec_mac_update_to_phy_state(struct netsec_priv *priv) ++{ ++ struct phy_device *phydev = priv->ndev->phydev; ++ u32 value = 0; ++ ++ value = phydev->duplex ? NETSEC_GMAC_MCR_REG_FULL_DUPLEX_COMMON : ++ NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON; ++ ++ if (phydev->speed != SPEED_1000) ++ value |= NETSEC_MCR_PS; ++ ++ if ((priv->phy_interface != PHY_INTERFACE_MODE_GMII) && ++ (phydev->speed == SPEED_100)) ++ value |= NETSEC_GMAC_MCR_REG_FES; ++ ++ value |= NETSEC_GMAC_MCR_REG_CST | NETSEC_GMAC_MCR_REG_JE; ++ ++ if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII) ++ value |= NETSEC_GMAC_MCR_REG_IBN; ++ ++ if (netsec_mac_write(priv, GMAC_REG_MCR, value)) ++ return -ETIMEDOUT; ++ ++ priv->actual_link_speed = phydev->speed; ++ priv->actual_duplex = phydev->duplex; ++ ++ return 0; ++} ++ ++/* NB netsec_start_gmac() only called from adjust_link */ ++ ++int netsec_start_gmac(struct netsec_priv *priv) ++{ ++ struct phy_device *phydev = priv->ndev->phydev; ++ u32 value = 0; ++ int ret; ++ ++ if (priv->desc_ring[NETSEC_RING_TX].running && ++ priv->desc_ring[NETSEC_RING_RX].running) ++ return 0; ++ ++ if (!priv->desc_ring[NETSEC_RING_RX].running && ++ !priv->desc_ring[NETSEC_RING_TX].running) { ++ if (phydev->speed != SPEED_1000) ++ value = (NETSEC_GMAC_MCR_REG_CST | ++ NETSEC_GMAC_MCR_REG_HALF_DUPLEX_COMMON); ++ ++ if (netsec_mac_write(priv, GMAC_REG_MCR, value)) ++ return -ETIMEDOUT; ++ if (netsec_mac_write(priv, GMAC_REG_BMR, ++ NETSEC_GMAC_BMR_REG_RESET)) ++ return -ETIMEDOUT; ++ ++ /* Wait soft reset */ ++ usleep_range(1000, 5000); ++ ++ ret = netsec_mac_read(priv, GMAC_REG_BMR, &value); ++ if (ret) ++ return ret; ++ if (value & NETSEC_GMAC_BMR_REG_SWR) ++ return -EAGAIN; ++ ++ netsec_writel(priv, MAC_REG_DESC_SOFT_RST, 1); ++ if (netsec_wait_while_busy(priv, MAC_REG_DESC_SOFT_RST, 1)) ++ return -ETIMEDOUT; ++ ++ netsec_writel(priv, MAC_REG_DESC_INIT, 1); ++ if (netsec_wait_while_busy(priv, MAC_REG_DESC_INIT, 1)) ++ return -ETIMEDOUT; ++ ++ if (netsec_mac_write(priv, GMAC_REG_BMR, ++ NETSEC_GMAC_BMR_REG_COMMON)) ++ return -ETIMEDOUT; ++ if (netsec_mac_write(priv, GMAC_REG_RDLAR, ++ NETSEC_GMAC_RDLAR_REG_COMMON)) ++ return -ETIMEDOUT; ++ if (netsec_mac_write(priv, GMAC_REG_TDLAR, ++ NETSEC_GMAC_TDLAR_REG_COMMON)) ++ return -ETIMEDOUT; ++ if (netsec_mac_write(priv, GMAC_REG_MFFR, 0x80000001)) ++ return -ETIMEDOUT; ++ ++ ret = netsec_mac_update_to_phy_state(priv); ++ if (ret) ++ return ret; ++ ++ if (priv->mac_mode.flow_ctrl_enable_flag) { ++ netsec_writel(priv, MAC_REG_FLOW_TH, ++ (priv->mac_mode.flow_stop_th << 16) | ++ priv->mac_mode.flow_start_th); ++ if (netsec_mac_write(priv, GMAC_REG_FCR, ++ (priv->mac_mode.pause_time << 16) | ++ NETSEC_FCR_RFE | NETSEC_FCR_TFE)) ++ return -ETIMEDOUT; ++ } ++ } ++ ++ ret = netsec_mac_read(priv, GMAC_REG_OMR, &value); ++ if (ret) ++ return ret; ++ ++ if (!priv->desc_ring[NETSEC_RING_RX].running) { ++ value |= NETSEC_GMAC_OMR_REG_SR; ++ netsec_start_desc_ring(priv, NETSEC_RING_RX); ++ } ++ if (!priv->desc_ring[NETSEC_RING_TX].running) { ++ value |= NETSEC_GMAC_OMR_REG_ST; ++ netsec_start_desc_ring(priv, NETSEC_RING_TX); ++ } ++ ++ if (netsec_mac_write(priv, GMAC_REG_OMR, value)) ++ return -ETIMEDOUT; ++ ++ netsec_writel(priv, NETSEC_REG_INTEN_SET, ++ NETSEC_IRQ_TX | NETSEC_IRQ_RX); ++ ++ return 0; ++} ++ ++int netsec_stop_gmac(struct netsec_priv *priv) ++{ ++ u32 value; ++ int ret; ++ ++ ret = netsec_mac_read(priv, GMAC_REG_OMR, &value); ++ if (ret) ++ return ret; ++ ++ if (priv->desc_ring[NETSEC_RING_RX].running) { ++ value &= ~NETSEC_GMAC_OMR_REG_SR; ++ netsec_stop_desc_ring(priv, NETSEC_RING_RX); ++ } ++ if (priv->desc_ring[NETSEC_RING_TX].running) { ++ value &= ~NETSEC_GMAC_OMR_REG_ST; ++ netsec_stop_desc_ring(priv, NETSEC_RING_TX); ++ } ++ ++ priv->actual_link_speed = 0; ++ priv->actual_duplex = false; ++ ++ return netsec_mac_write(priv, GMAC_REG_OMR, value); ++} ++ ++static int netsec_phy_write(struct mii_bus *bus, ++ int phy_addr, int reg, u16 val) ++{ ++ struct netsec_priv *priv = bus->priv; ++ ++ if (netsec_mac_write(priv, GMAC_REG_GDR, val)) ++ return -ETIMEDOUT; ++ if (netsec_mac_write(priv, GMAC_REG_GAR, ++ phy_addr << NETSEC_GMAC_GAR_REG_SHIFT_PA | ++ reg << NETSEC_GMAC_GAR_REG_SHIFT_GR | ++ NETSEC_GMAC_GAR_REG_GW | NETSEC_GMAC_GAR_REG_GB | ++ (netsec_clk_type(priv->freq) << ++ GMAC_REG_SHIFT_CR_GAR))) ++ return -ETIMEDOUT; ++ ++ return netsec_mac_wait_while_busy(priv, GMAC_REG_GAR, ++ NETSEC_GMAC_GAR_REG_GB); ++} ++ ++static int netsec_phy_read(struct mii_bus *bus, int phy_addr, int reg_addr) ++{ ++ struct netsec_priv *priv = bus->priv; ++ u32 data; ++ int ret; ++ ++ if (netsec_mac_write(priv, GMAC_REG_GAR, NETSEC_GMAC_GAR_REG_GB | ++ phy_addr << NETSEC_GMAC_GAR_REG_SHIFT_PA | ++ reg_addr << NETSEC_GMAC_GAR_REG_SHIFT_GR | ++ (netsec_clk_type(priv->freq) << ++ GMAC_REG_SHIFT_CR_GAR))) ++ return -ETIMEDOUT; ++ ++ ret = netsec_mac_wait_while_busy(priv, GMAC_REG_GAR, ++ NETSEC_GMAC_GAR_REG_GB); ++ if (ret) ++ return ret; ++ ++ ret = netsec_mac_read(priv, GMAC_REG_GDR, &data); ++ if (ret) ++ return ret; ++ ++ return data; ++} ++ ++int netsec_mii_register(struct netsec_priv *priv) ++{ ++ struct mii_bus *bus = devm_mdiobus_alloc(priv->dev); ++ int ret; ++ ++ if (!bus) ++ return -ENOMEM; ++ ++ snprintf(bus->id, MII_BUS_ID_SIZE, "%s", dev_name(priv->dev)); ++ bus->priv = priv; ++ bus->name = "SNI NETSEC MDIO"; ++ bus->read = netsec_phy_read; ++ bus->write = netsec_phy_write; ++ bus->parent = priv->dev; ++ priv->mii_bus = bus; ++ ++ if (dev_of_node(priv->dev)) { ++ ret = of_mdiobus_register(bus, dev_of_node(priv->dev)); ++ } else { ++ /* Mask out all PHYs from auto probing. */ ++ bus->phy_mask = ~0; ++ ret = mdiobus_register(bus); ++ } ++ return ret; ++} ++ ++void netsec_mii_unregister(struct netsec_priv *priv) ++{ ++ mdiobus_unregister(priv->mii_bus); ++} +diff --git a/drivers/net/ethernet/socionext/netsec/netsec_netdev.c b/drivers/net/ethernet/socionext/netsec/netsec_netdev.c +new file mode 100644 +index 0000000..e99cf0e +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/netsec_netdev.c +@@ -0,0 +1,540 @@ ++/** ++ * drivers/net/ethernet/socionext/netsec/netsec_netdev.c ++ * ++ * Copyright (C) 2013-2014 Fujitsu Semiconductor Limited. ++ * Copyright (C) 2014-2017 Linaro Ltd. All rights reserved. ++ * Andy Green ++ * Jassi Brar ++ * Ard Biesheuvel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "netsec.h" ++ ++#define WAIT_FW_RDY_TIMEOUT 50 ++ ++static const u32 desc_ring_irq_status_reg_addr[] = { ++ NETSEC_REG_NRM_TX_STATUS, ++ NETSEC_REG_NRM_RX_STATUS, ++}; ++ ++static const u32 desc_ads[] = { ++ NETSEC_REG_NRM_TX_CONFIG, ++ NETSEC_REG_NRM_RX_CONFIG, ++}; ++ ++static const u32 netsec_desc_start_reg_addr_up[] = { ++ NETSEC_REG_NRM_TX_DESC_START_UP, ++ NETSEC_REG_NRM_RX_DESC_START_UP, ++}; ++ ++static const u32 netsec_desc_start_reg_addr_lw[] = { ++ NETSEC_REG_NRM_TX_DESC_START_LW, ++ NETSEC_REG_NRM_RX_DESC_START_LW, ++}; ++ ++static u32 netsec_calc_pkt_ctrl_reg_param(const struct netsec_pkt_ctrlaram ++ *pkt_ctrlaram_p) ++{ ++ u32 param = NETSEC_PKT_CTRL_REG_MODE_NRM; ++ ++ if (pkt_ctrlaram_p->log_chksum_er_flag) ++ param |= NETSEC_PKT_CTRL_REG_LOG_CHKSUM_ER; ++ ++ if (pkt_ctrlaram_p->log_hd_imcomplete_flag) ++ param |= NETSEC_PKT_CTRL_REG_LOG_HD_INCOMPLETE; ++ ++ if (pkt_ctrlaram_p->log_hd_er_flag) ++ param |= NETSEC_PKT_CTRL_REG_LOG_HD_ER; ++ ++ return param; ++} ++ ++static int netsec_netdev_load_ucode_region(struct netsec_priv *priv, u32 reg, ++ u32 addr_h, u32 addr_l, u32 size) ++{ ++ u64 base = (u64)addr_h << 32 | addr_l; ++ __le32 *ucode; ++ u32 i; ++ ++ ucode = memremap(base, size * sizeof(u32), MEMREMAP_WT); ++ if (!ucode) ++ return -ENOMEM; ++ ++ for (i = 0; i < size; i++) ++ netsec_writel(priv, reg, le32_to_cpu(ucode[i])); ++ ++ memunmap(ucode); ++ return 0; ++} ++ ++static int netsec_netdev_load_microcode(struct netsec_priv *priv) ++{ ++ int err; ++ ++ err = netsec_netdev_load_ucode_region( ++ priv, NETSEC_REG_DMAC_HM_CMD_BUF, ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_HM_ME_ADDRESS_H), ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_HM_ME_ADDRESS_L), ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_HM_ME_SIZE)); ++ if (err) ++ return err; ++ ++ err = netsec_netdev_load_ucode_region( ++ priv, NETSEC_REG_DMAC_MH_CMD_BUF, ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_MH_ME_ADDRESS_H), ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_MH_ME_ADDRESS_L), ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_MH_ME_SIZE)); ++ if (err) ++ return err; ++ ++ err = netsec_netdev_load_ucode_region( ++ priv, NETSEC_REG_PKT_CMD_BUF, ++ 0, ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_PKT_ME_ADDRESS), ++ le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_PKT_ME_SIZE)); ++ if (err) ++ return err; ++ ++ return 0; ++} ++ ++static int netsec_init_hardware(struct netsec_priv *priv) ++{ ++ u32 value; ++ int err; ++ ++ /* set desc_start addr */ ++ netsec_writel(priv, netsec_desc_start_reg_addr_up[NETSEC_RING_RX], ++ upper_32_bits(priv->desc_ring[NETSEC_RING_RX].desc_phys)); ++ netsec_writel(priv, netsec_desc_start_reg_addr_lw[NETSEC_RING_RX], ++ lower_32_bits(priv->desc_ring[NETSEC_RING_RX].desc_phys)); ++ ++ netsec_writel(priv, netsec_desc_start_reg_addr_up[NETSEC_RING_TX], ++ upper_32_bits(priv->desc_ring[NETSEC_RING_TX].desc_phys)); ++ netsec_writel(priv, netsec_desc_start_reg_addr_lw[NETSEC_RING_TX], ++ lower_32_bits(priv->desc_ring[NETSEC_RING_TX].desc_phys)); ++ ++ /* set normal tx desc ring config */ ++ netsec_writel(priv, desc_ads[NETSEC_RING_TX], ++ 1 << NETSEC_REG_DESC_ENDIAN); ++ netsec_writel(priv, desc_ads[NETSEC_RING_RX], ++ 1 << NETSEC_REG_DESC_ENDIAN); ++ ++ err = netsec_netdev_load_microcode(priv); ++ if (err) { ++ netif_err(priv, probe, priv->ndev, ++ "%s: failed to load microcode (%d)\n", __func__, err); ++ return err; ++ } ++ ++ /* start DMA engines */ ++ netsec_writel(priv, NETSEC_REG_DMA_TMR_CTRL, priv->freq / 1000000 - 1); ++ netsec_writel(priv, NETSEC_REG_ADDR_DIS_CORE, 0); ++ ++ usleep_range(1000, 2000); ++ ++ if (!(netsec_readl(priv, NETSEC_REG_TOP_STATUS) & ++ NETSEC_TOP_IRQ_REG_CODE_LOAD_END)) { ++ netif_err(priv, drv, priv->ndev, "microengine start failed\n"); ++ return -ENXIO; ++ } ++ netsec_writel(priv, NETSEC_REG_TOP_STATUS, ++ NETSEC_TOP_IRQ_REG_CODE_LOAD_END); ++ ++ value = netsec_calc_pkt_ctrl_reg_param(&priv->param.pkt_ctrlaram); ++ ++ if (priv->param.use_jumbo_pkt_flag) ++ value |= NETSEC_PKT_CTRL_REG_EN_JUMBO; ++ ++ /* change to normal mode */ ++ netsec_writel(priv, NETSEC_REG_DMA_MH_CTRL, MH_CTRL__MODE_TRANS); ++ netsec_writel(priv, NETSEC_REG_PKT_CTRL, value); ++ ++ while ((netsec_readl(priv, NETSEC_REG_MODE_TRANS_COMP_STATUS) & ++ NETSEC_MODE_TRANS_COMP_IRQ_T2N) == 0) ++ cpu_relax(); ++ ++ return 0; ++} ++ ++static void netsec_ring_irq_clr(struct netsec_priv *priv, ++ unsigned int id, u32 value) ++{ ++ netsec_writel(priv, desc_ring_irq_status_reg_addr[id], ++ value & (NETSEC_IRQ_EMPTY | NETSEC_IRQ_ERR)); ++} ++ ++static void netsec_napi_tx_processing(struct netsec_priv *priv) ++{ ++ netsec_ring_irq_clr(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ netsec_clean_tx_desc_ring(priv); ++ ++ if (netif_queue_stopped(priv->ndev) && ++ netsec_get_tx_avail_num(priv) >= NETSEC_NETDEV_TX_PKT_SCAT_NUM_MAX) ++ netif_wake_queue(priv->ndev); ++} ++ ++int netsec_netdev_napi_poll(struct napi_struct *napi_p, int budget) ++{ ++ struct netsec_priv *priv = container_of(napi_p, struct netsec_priv, ++ napi); ++ struct net_device *ndev = priv->ndev; ++ struct netsec_rx_pkt_info rx_info; ++ int ret, done = 0, rx_num = 0; ++ struct netsec_frag_info frag; ++ struct sk_buff *skb; ++ u16 len; ++ ++ netsec_napi_tx_processing(priv); ++ ++ while (done < budget) { ++ if (!rx_num) { ++ rx_num = netsec_get_rx_num(priv); ++ if (!rx_num) ++ break; ++ } ++ done++; ++ rx_num--; ++ ret = netsec_get_rx_pkt_data(priv, &rx_info, &frag, &len, &skb); ++ if (unlikely(ret == -ENOMEM)) { ++ netif_err(priv, drv, priv->ndev, ++ "%s: rx fail %d\n", __func__, ret); ++ ndev->stats.rx_dropped++; ++ continue; ++ } ++ dma_unmap_single(priv->dev, frag.dma_addr, frag.len, ++ DMA_FROM_DEVICE); ++ skb_put(skb, len); ++ skb->protocol = eth_type_trans(skb, priv->ndev); ++ ++ if (priv->rx_cksum_offload_flag && ++ rx_info.rx_cksum_result == NETSEC_RX_CKSUM_OK) ++ skb->ip_summed = CHECKSUM_UNNECESSARY; ++ ++ if (napi_gro_receive(napi_p, skb) != GRO_DROP) { ++ ndev->stats.rx_packets++; ++ ndev->stats.rx_bytes += len; ++ } ++ } ++ ++ if (done < budget && napi_complete_done(napi_p, done)) ++ netsec_writel(priv, NETSEC_REG_INTEN_SET, ++ NETSEC_IRQ_TX | NETSEC_IRQ_RX); ++ return done; ++} ++ ++static netdev_tx_t netsec_netdev_start_xmit(struct sk_buff *skb, ++ struct net_device *ndev) ++{ ++ struct netsec_priv *priv = netdev_priv(ndev); ++ struct netsec_tx_pkt_ctrl tx_ctrl = {}; ++ u16 pend_tx, tso_seg_len = 0; ++ skb_frag_t *frag; ++ int count_frags; ++ int ret, i; ++ ++ netsec_ring_irq_clr(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ ++ count_frags = skb_shinfo(skb)->nr_frags + 1; ++ ++ if (skb->ip_summed == CHECKSUM_PARTIAL) { ++ if ((skb->protocol == htons(ETH_P_IP) && ++ ip_hdr(skb)->protocol == IPPROTO_TCP) || ++ (skb->protocol == htons(ETH_P_IPV6) && ++ ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)) ++ tx_ctrl.cksum_offload_flag = true; ++ else ++ skb_checksum_help(skb); ++ } ++ ++ if (skb_is_gso(skb)) ++ tso_seg_len = skb_shinfo(skb)->gso_size; ++ ++ if (tso_seg_len > 0) { ++ if (skb->protocol == htons(ETH_P_IP)) { ++ ip_hdr(skb)->tot_len = 0; ++ tcp_hdr(skb)->check = ++ ~tcp_v4_check(0, ip_hdr(skb)->saddr, ++ ip_hdr(skb)->daddr, 0); ++ } else { ++ ipv6_hdr(skb)->payload_len = 0; ++ tcp_hdr(skb)->check = ++ ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, ++ &ipv6_hdr(skb)->daddr, ++ 0, IPPROTO_TCP, 0); ++ } ++ ++ tx_ctrl.tcp_seg_offload_flag = true; ++ tx_ctrl.tcp_seg_len = tso_seg_len; ++ } ++ ++ priv->tx_info[0].dma_addr = dma_map_single(priv->dev, skb->data, ++ skb_headlen(skb), ++ DMA_TO_DEVICE); ++ if (dma_mapping_error(priv->dev, priv->tx_info[0].dma_addr)) { ++ netif_err(priv, drv, priv->ndev, ++ "%s: DMA mapping failed\n", __func__); ++ return NETDEV_TX_OK; ++ } ++ priv->tx_info[0].addr = skb->data; ++ priv->tx_info[0].len = skb_headlen(skb); ++ ++ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { ++ frag = &skb_shinfo(skb)->frags[i]; ++ priv->tx_info[i + 1].dma_addr = ++ skb_frag_dma_map(priv->dev, frag, 0, ++ skb_frag_size(frag), DMA_TO_DEVICE); ++ priv->tx_info[i + 1].addr = skb_frag_address(frag); ++ priv->tx_info[i + 1].len = frag->size; ++ } ++ ++ netsec_mark_skb_type(skb, NETSEC_RING_TX); ++ ++ ret = netsec_set_tx_pkt_data(priv, &tx_ctrl, count_frags, ++ priv->tx_info, skb); ++ if (ret) { ++ netif_info(priv, drv, priv->ndev, ++ "set tx pkt failed %d\n", ret); ++ for (i = 0; i < count_frags; i++) ++ dma_unmap_single(priv->dev, priv->tx_info[i].dma_addr, ++ priv->tx_info[i].len, DMA_TO_DEVICE); ++ ndev->stats.tx_dropped++; ++ ++ return NETDEV_TX_OK; ++ } ++ ++ netdev_sent_queue(priv->ndev, skb->len); ++ ++ spin_lock(&priv->tx_queue_lock); ++ pend_tx = netsec_get_tx_avail_num(priv); ++ ++ if (pend_tx < NETSEC_NETDEV_TX_PKT_SCAT_NUM_MAX) { ++ netsec_ring_irq_enable(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ netif_stop_queue(ndev); ++ goto err; ++ } ++ if (pend_tx <= DESC_NUM - 2) { ++ netsec_ring_irq_enable(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ goto err; ++ } ++ netsec_ring_irq_disable(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ ++err: ++ spin_unlock(&priv->tx_queue_lock); ++ ++ return NETDEV_TX_OK; ++} ++ ++static int netsec_netdev_set_features(struct net_device *ndev, ++ netdev_features_t features) ++{ ++ struct netsec_priv *priv = netdev_priv(ndev); ++ ++ priv->rx_cksum_offload_flag = !!(features & NETIF_F_RXCSUM); ++ ++ return 0; ++} ++ ++static void netsec_phy_adjust_link(struct net_device *ndev) ++{ ++ struct netsec_priv *priv = netdev_priv(ndev); ++ ++ if (priv->actual_link_speed == ndev->phydev->speed && ++ priv->actual_duplex == ndev->phydev->duplex) ++ return; ++ ++ phy_print_status(ndev->phydev); ++ ++ netsec_stop_gmac(priv); ++ netsec_start_gmac(priv); ++} ++ ++static irqreturn_t netsec_irq_handler(int irq, void *dev_id) ++{ ++ struct netsec_priv *priv = dev_id; ++ u32 status = netsec_readl(priv, NETSEC_REG_TOP_STATUS) & ++ netsec_readl(priv, NETSEC_REG_TOP_INTEN); ++ ++ if (!status) ++ return IRQ_NONE; ++ ++ if (status & (NETSEC_IRQ_TX | NETSEC_IRQ_RX)) { ++ netsec_writel(priv, NETSEC_REG_INTEN_CLR, ++ status & (NETSEC_IRQ_TX | NETSEC_IRQ_RX)); ++ napi_schedule(&priv->napi); ++ } ++ ++ return IRQ_HANDLED; ++} ++ ++static void netsec_reset_hardware(struct netsec_priv *priv) ++{ ++ /* stop DMA engines */ ++ if (!netsec_readl(priv, NETSEC_REG_ADDR_DIS_CORE)) { ++ netsec_writel(priv, NETSEC_REG_DMA_HM_CTRL, ++ NETSEC_DMA_CTRL_REG_STOP); ++ netsec_writel(priv, NETSEC_REG_DMA_MH_CTRL, ++ NETSEC_DMA_CTRL_REG_STOP); ++ ++ while (netsec_readl(priv, NETSEC_REG_DMA_HM_CTRL) & ++ NETSEC_DMA_CTRL_REG_STOP) ++ cpu_relax(); ++ ++ while (netsec_readl(priv, NETSEC_REG_DMA_MH_CTRL) & ++ NETSEC_DMA_CTRL_REG_STOP) ++ cpu_relax(); ++ } ++ ++ netsec_writel(priv, NETSEC_REG_SOFT_RST, NETSEC_SOFT_RST_REG_RESET); ++ netsec_writel(priv, NETSEC_REG_SOFT_RST, NETSEC_SOFT_RST_REG_RUN); ++ netsec_writel(priv, NETSEC_REG_COM_INIT, NETSEC_COM_INIT_REG_ALL); ++ ++ while (netsec_readl(priv, NETSEC_REG_COM_INIT) != 0) ++ cpu_relax(); ++} ++ ++static int netsec_netdev_open(struct net_device *ndev) ++{ ++ struct netsec_priv *priv = netdev_priv(ndev); ++ int ret, n; ++ ++ pm_runtime_get_sync(priv->dev); ++ ++ netsec_reset_hardware(priv); ++ ++ for (n = 0; n <= NETSEC_RING_MAX; n++) { ++ ret = netsec_alloc_desc_ring(priv, n); ++ if (ret) { ++ netif_err(priv, probe, priv->ndev, ++ "%s: alloc ring failed\n", __func__); ++ goto err; ++ } ++ } ++ ++ ret = netsec_setup_rx_desc(priv, &priv->desc_ring[NETSEC_RING_RX]); ++ if (ret) { ++ netif_err(priv, probe, priv->ndev, ++ "%s: fail setup ring\n", __func__); ++ goto err1; ++ } ++ ++ ret = netsec_init_hardware(priv); ++ if (ret) { ++ netif_err(priv, probe, priv->ndev, ++ "%s: netsec_init_hardware fail %d\n", __func__, ret); ++ goto err1; ++ } ++ ++ ret = request_irq(priv->ndev->irq, netsec_irq_handler, ++ IRQF_SHARED, "netsec", priv); ++ if (ret) { ++ netif_err(priv, drv, priv->ndev, "request_irq failed\n"); ++ goto err1; ++ } ++ priv->irq_registered = true; ++ ++ ret = netsec_clean_rx_desc_ring(priv); ++ if (ret) { ++ netif_err(priv, drv, priv->ndev, ++ "%s: clean rx desc fail\n", __func__); ++ goto err2; ++ } ++ ++ ret = netsec_clean_tx_desc_ring(priv); ++ if (ret) { ++ netif_err(priv, drv, priv->ndev, ++ "%s: clean tx desc fail\n", __func__); ++ goto err2; ++ } ++ ++ netsec_ring_irq_clr(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ ++ if (dev_of_node(priv->dev)) { ++ if (!of_phy_connect(priv->ndev, priv->phy_np, ++ netsec_phy_adjust_link, 0, ++ priv->phy_interface)) { ++ netif_err(priv, link, priv->ndev, "missing PHY\n"); ++ goto err2; ++ } ++ } else { ++ ret = phy_connect_direct(priv->ndev, priv->phydev, ++ netsec_phy_adjust_link, ++ priv->phy_interface); ++ if (ret) { ++ netif_err(priv, link, priv->ndev, ++ "phy_connect_direct() failed (%d)\n", ret); ++ goto err2; ++ } ++ } ++ ++ phy_start_aneg(ndev->phydev); ++ ++ netsec_ring_irq_disable(priv, NETSEC_RING_TX, NETSEC_IRQ_EMPTY); ++ ++ netsec_start_gmac(priv); ++ napi_enable(&priv->napi); ++ netif_start_queue(ndev); ++ ++ netsec_writel(priv, NETSEC_REG_INTEN_SET, ++ NETSEC_IRQ_TX | NETSEC_IRQ_RX); ++ ++ return 0; ++ ++err2: ++ pm_runtime_put_sync(priv->dev); ++ free_irq(priv->ndev->irq, priv); ++ priv->irq_registered = false; ++err1: ++ for (n = 0; n <= NETSEC_RING_MAX; n++) ++ netsec_free_desc_ring(priv, &priv->desc_ring[n]); ++err: ++ pm_runtime_put_sync(priv->dev); ++ ++ return ret; ++} ++ ++static int netsec_netdev_stop(struct net_device *ndev) ++{ ++ struct netsec_priv *priv = netdev_priv(ndev); ++ int n; ++ ++ phy_stop(ndev->phydev); ++ phy_disconnect(ndev->phydev); ++ ++ netif_stop_queue(priv->ndev); ++ napi_disable(&priv->napi); ++ ++ netsec_writel(priv, NETSEC_REG_INTEN_CLR, ~0); ++ netsec_stop_gmac(priv); ++ ++ pm_runtime_put_sync(priv->dev); ++ ++ for (n = 0; n <= NETSEC_RING_MAX; n++) ++ netsec_free_desc_ring(priv, &priv->desc_ring[n]); ++ ++ free_irq(priv->ndev->irq, priv); ++ priv->irq_registered = false; ++ ++ return 0; ++} ++ ++const struct net_device_ops netsec_netdev_ops = { ++ .ndo_open = netsec_netdev_open, ++ .ndo_stop = netsec_netdev_stop, ++ .ndo_start_xmit = netsec_netdev_start_xmit, ++ .ndo_set_features = netsec_netdev_set_features, ++ .ndo_set_mac_address = eth_mac_addr, ++ .ndo_validate_addr = eth_validate_addr, ++}; +diff --git a/drivers/net/ethernet/socionext/netsec/netsec_platform.c b/drivers/net/ethernet/socionext/netsec/netsec_platform.c +new file mode 100644 +index 0000000..624f6a7 +--- /dev/null ++++ b/drivers/net/ethernet/socionext/netsec/netsec_platform.c +@@ -0,0 +1,435 @@ ++/** ++ * drivers/net/ethernet/socionext/netsec/netsec_platform.c ++ * ++ * Copyright (C) 2013-2014 Fujitsu Semiconductor Limited. ++ * Copyright (C) 2014-2017 Linaro Ltd. All rights reserved. ++ * Andy Green ++ * Jassi Brar ++ * Ard Biesheuvel ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "netsec.h" ++ ++#define NETSEC_F_NETSEC_VER_MAJOR_NUM(x) (x & 0xffff0000) ++ ++static int napi_weight = 64; ++static u16 pause_time = 256; ++ ++static int netsec_of_probe(struct platform_device *pdev, ++ struct netsec_priv *priv) ++{ ++ int clk_count, ret, i; ++ ++ priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0); ++ if (!priv->phy_np) { ++ dev_err(&pdev->dev, "missing required property 'phy-handle'\n"); ++ return -EINVAL; ++ } ++ ++ /* we require named clocks if there is more than one */ ++ clk_count = of_property_count_strings(pdev->dev.of_node, "clock-names"); ++ if (clk_count > 1) { ++ if (clk_count > ARRAY_SIZE(priv->clk)) { ++ dev_err(&pdev->dev, "too many clocks specified (%d)\n", ++ clk_count); ++ return -EINVAL; ++ } ++ ++ for (i = 0; i < clk_count; i++) { ++ const char *clk_name; ++ ++ ret = of_property_read_string_index(pdev->dev.of_node, ++ "clock-names", i, ++ &clk_name); ++ if (ret) { ++ dev_err(&pdev->dev, ++ "failed to parse 'clock-names'\n"); ++ return ret; ++ } ++ priv->clk[i] = devm_clk_get(&pdev->dev, clk_name); ++ if (!strcmp(clk_name, "phy_refclk")) { ++ priv->freq = clk_get_rate(priv->clk[i]); ++ dev_dbg(&pdev->dev, ++ "found PHY refclock #%d freq %u\n", ++ i, priv->freq); ++ } ++ } ++ priv->clock_count = clk_count; ++ } else { ++ priv->clk[0] = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(priv->clk)) { ++ dev_err(&pdev->dev, ++ "missing required property 'clocks'\n"); ++ return PTR_ERR(priv->clk); ++ } ++ priv->freq = clk_get_rate(priv->clk[0]); ++ priv->clock_count = 1; ++ } ++ return 0; ++} ++ ++static int netsec_acpi_probe(struct platform_device *pdev, ++ struct netsec_priv *priv, u32 *phy_addr) ++{ ++ int ret; ++ ++ if (!IS_ENABLED(CONFIG_ACPI)) ++ return -ENODEV; ++ ++ ret = device_property_read_u32(&pdev->dev, "phy-channel", phy_addr); ++ if (ret) { ++ dev_err(&pdev->dev, ++ "missing required property 'phy-channel'\n"); ++ return ret; ++ } ++ ++ ret = device_property_read_u32(&pdev->dev, ++ "socionext,phy-clock-frequency", ++ &priv->freq); ++ if (ret) ++ dev_err(&pdev->dev, ++ "missing required property 'socionext,phy-clock-frequency'\n"); ++ return ret; ++} ++ ++static int netsec_probe(struct platform_device *pdev) ++{ ++ struct net_device *ndev; ++ struct netsec_priv *priv; ++ struct resource *mmio_res, *eeprom_res, *irq_res; ++ u8 *mac, macbuf[ETH_ALEN]; ++ u32 hw_ver, phy_addr; ++ int ret; ++ ++ mmio_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!mmio_res) { ++ dev_err(&pdev->dev, "No MMIO resource found.\n"); ++ return -ENODEV; ++ } ++ ++ eeprom_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ++ if (!eeprom_res) { ++ dev_info(&pdev->dev, "No EEPROM resource found.\n"); ++ return -ENODEV; ++ } ++ ++ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); ++ if (!irq_res) { ++ dev_err(&pdev->dev, "No IRQ resource found.\n"); ++ return -ENODEV; ++ } ++ ++ ndev = alloc_etherdev(sizeof(*priv)); ++ if (!ndev) ++ return -ENOMEM; ++ ++ priv = netdev_priv(ndev); ++ priv->ndev = ndev; ++ SET_NETDEV_DEV(ndev, &pdev->dev); ++ platform_set_drvdata(pdev, priv); ++ priv->dev = &pdev->dev; ++ ++ priv->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV | ++ NETIF_MSG_LINK | NETIF_MSG_PROBE; ++ ++ ndev->irq = irq_res->start; ++ ++ priv->phy_interface = device_get_phy_mode(&pdev->dev); ++ if (priv->phy_interface < 0) { ++ dev_err(&pdev->dev, "missing required property 'phy-mode'\n"); ++ ret = -ENODEV; ++ goto free_ndev; ++ } ++ ++ priv->ioaddr = devm_ioremap(&pdev->dev, mmio_res->start, ++ resource_size(mmio_res)); ++ if (!priv->ioaddr) { ++ dev_err(&pdev->dev, "devm_ioremap() failed\n"); ++ ret = -ENXIO; ++ goto free_ndev; ++ } ++ ++ priv->eeprom_base = devm_memremap(&pdev->dev, eeprom_res->start, ++ resource_size(eeprom_res), ++ MEMREMAP_WT); ++ if (!priv->eeprom_base) { ++ dev_err(&pdev->dev, "devm_memremap() failed for EEPROM\n"); ++ ret = -ENXIO; ++ goto free_ndev; ++ } ++ ++ mac = device_get_mac_address(&pdev->dev, macbuf, sizeof(macbuf)); ++ if (mac) ++ ether_addr_copy(ndev->dev_addr, mac); ++ ++ if (priv->eeprom_base && ++ (!mac || !is_valid_ether_addr(ndev->dev_addr))) { ++ const u8 *macp = priv->eeprom_base + NETSEC_EEPROM_MAC_ADDRESS; ++ ++ ndev->dev_addr[0] = macp[3]; ++ ndev->dev_addr[1] = macp[2]; ++ ndev->dev_addr[2] = macp[1]; ++ ndev->dev_addr[3] = macp[0]; ++ ndev->dev_addr[4] = macp[7]; ++ ndev->dev_addr[5] = macp[6]; ++ } ++ ++ if (!is_valid_ether_addr(ndev->dev_addr)) { ++ dev_warn(&pdev->dev, "No MAC address found, using random\n"); ++ eth_hw_addr_random(ndev); ++ } ++ ++ if (dev_of_node(&pdev->dev)) ++ ret = netsec_of_probe(pdev, priv); ++ else ++ ret = netsec_acpi_probe(pdev, priv, &phy_addr); ++ if (ret) ++ goto free_ndev; ++ ++ if (!priv->freq) { ++ dev_err(&pdev->dev, "missing PHY reference clock frequency\n"); ++ ret = -ENODEV; ++ goto free_ndev; ++ } ++ ++ /* disable by default */ ++ priv->et_coalesce.rx_coalesce_usecs = 0; ++ priv->et_coalesce.rx_max_coalesced_frames = 1; ++ priv->et_coalesce.tx_coalesce_usecs = 0; ++ priv->et_coalesce.tx_max_coalesced_frames = 1; ++ ++ ret = device_property_read_u32(&pdev->dev, "max-frame-size", ++ &ndev->max_mtu); ++ if (ret < 0) ++ ndev->max_mtu = ETH_DATA_LEN; ++ ++ priv->rx_pkt_buf_len = ndev->max_mtu + 22; ++ priv->param.use_jumbo_pkt_flag = (ndev->max_mtu > ETH_DATA_LEN); ++ ++ pm_runtime_enable(&pdev->dev); ++ /* runtime_pm coverage just for probe, open/close also cover it */ ++ pm_runtime_get_sync(&pdev->dev); ++ ++ hw_ver = netsec_readl(priv, NETSEC_REG_F_TAIKI_VER); ++ /* this driver only supports F_TAIKI style NETSEC */ ++ if (NETSEC_F_NETSEC_VER_MAJOR_NUM(hw_ver) != ++ NETSEC_F_NETSEC_VER_MAJOR_NUM(NETSEC_REG_NETSEC_VER_F_TAIKI)) { ++ ret = -ENODEV; ++ goto pm_disable; ++ } ++ ++ dev_info(&pdev->dev, "hardware revision %d.%d\n", ++ hw_ver >> 16, hw_ver & 0xffff); ++ ++ priv->mac_mode.flow_start_th = NETSEC_FLOW_CONTROL_START_THRESHOLD; ++ priv->mac_mode.flow_stop_th = NETSEC_FLOW_CONTROL_STOP_THRESHOLD; ++ priv->mac_mode.pause_time = pause_time; ++ priv->mac_mode.flow_ctrl_enable_flag = false; ++ ++ netif_napi_add(ndev, &priv->napi, netsec_netdev_napi_poll, napi_weight); ++ ++ ndev->netdev_ops = &netsec_netdev_ops; ++ ndev->ethtool_ops = &netsec_ethtool_ops; ++ ndev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | ++ NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GSO | ++ NETIF_F_HIGHDMA | NETIF_F_RXCSUM; ++ ndev->hw_features = ndev->features; ++ ++ priv->rx_cksum_offload_flag = true; ++ spin_lock_init(&priv->tx_queue_lock); ++ ++ ret = netsec_mii_register(priv); ++ if (ret) { ++ dev_err(&pdev->dev, "mii bus registration failed (%d)\n", ret); ++ goto pm_disable; ++ } ++ ++ if (!dev_of_node(&pdev->dev)) { /* ACPI */ ++ priv->phydev = get_phy_device(priv->mii_bus, phy_addr, false); ++ if (IS_ERR(priv->phydev)) { ++ dev_err(&pdev->dev, "get_phy_device() failed (%ld)\n", ++ PTR_ERR(priv->phydev)); ++ ret = PTR_ERR(priv->phydev); ++ goto unregister_mii; ++ } ++ ++ ret = phy_device_register(priv->phydev); ++ if (ret) { ++ dev_err(&pdev->dev, ++ "phy_device_register() failed (%d)\n", ret); ++ phy_device_free(priv->phydev); ++ goto unregister_mii; ++ } ++ } ++ ++ /* disable all other interrupt sources */ ++ netsec_writel(priv, NETSEC_REG_INTEN_CLR, ~0); ++ netsec_writel(priv, NETSEC_REG_INTEN_SET, ++ NETSEC_IRQ_TX | NETSEC_IRQ_RX); ++ ++ if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) ++ dev_warn(&pdev->dev, "Failed to enable 64-bit DMA\n"); ++ ++ ret = register_netdev(ndev); ++ if (ret) { ++ netif_err(priv, probe, ndev, "register_netdev() failed\n"); ++ goto unregister_mii; ++ } ++ ++ pm_runtime_put_sync_suspend(&pdev->dev); ++ ++ return 0; ++ ++unregister_mii: ++ netsec_mii_unregister(priv); ++ ++pm_disable: ++ pm_runtime_put_sync_suspend(&pdev->dev); ++ pm_runtime_disable(&pdev->dev); ++ ++free_ndev: ++ free_netdev(ndev); ++ ++ dev_err(&pdev->dev, "init failed\n"); ++ ++ return ret; ++} ++ ++static int netsec_remove(struct platform_device *pdev) ++{ ++ struct netsec_priv *priv = platform_get_drvdata(pdev); ++ ++ unregister_netdev(priv->ndev); ++ if (!dev_of_node(&pdev->dev)) { /* ACPI */ ++ phy_device_remove(priv->phydev); ++ phy_device_free(priv->phydev); ++ } ++ netsec_mii_unregister(priv); ++ pm_runtime_disable(&pdev->dev); ++ free_netdev(priv->ndev); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_PM ++static int netsec_runtime_suspend(struct device *dev) ++{ ++ struct netsec_priv *priv = dev_get_drvdata(dev); ++ int n; ++ ++ netif_dbg(priv, drv, priv->ndev, "%s\n", __func__); ++ ++ if (priv->irq_registered) ++ disable_irq(priv->ndev->irq); ++ ++ netsec_writel(priv, NETSEC_REG_CLK_EN, 0); ++ ++ for (n = priv->clock_count - 1; n >= 0; n--) ++ clk_disable_unprepare(priv->clk[n]); ++ ++ return 0; ++} ++ ++static int netsec_runtime_resume(struct device *dev) ++{ ++ struct netsec_priv *priv = dev_get_drvdata(dev); ++ int n; ++ ++ netif_dbg(priv, drv, priv->ndev, "%s\n", __func__); ++ ++ /* first let the clocks back on */ ++ ++ for (n = 0; n < priv->clock_count; n++) ++ clk_prepare_enable(priv->clk[n]); ++ ++ netsec_writel(priv, NETSEC_REG_CLK_EN, NETSEC_CLK_EN_REG_DOM_D | ++ NETSEC_CLK_EN_REG_DOM_C | ++ NETSEC_CLK_EN_REG_DOM_G); ++ ++ if (priv->irq_registered) ++ enable_irq(priv->ndev->irq); ++ ++ return 0; ++} ++ ++static int netsec_pm_suspend(struct device *dev) ++{ ++ struct netsec_priv *priv = dev_get_drvdata(dev); ++ ++ netif_dbg(priv, drv, priv->ndev, "%s\n", __func__); ++ ++ if (pm_runtime_status_suspended(dev)) ++ return 0; ++ ++ return netsec_runtime_suspend(dev); ++} ++ ++static int netsec_pm_resume(struct device *dev) ++{ ++ struct netsec_priv *priv = dev_get_drvdata(dev); ++ ++ netif_dbg(priv, drv, priv->ndev, "%s\n", __func__); ++ ++ if (pm_runtime_status_suspended(dev)) ++ return 0; ++ ++ return netsec_runtime_resume(dev); ++} ++#endif ++ ++static const struct dev_pm_ops netsec_pm_ops = { ++ SET_SYSTEM_SLEEP_PM_OPS(netsec_pm_suspend, netsec_pm_resume) ++ SET_RUNTIME_PM_OPS(netsec_runtime_suspend, netsec_runtime_resume, NULL) ++}; ++ ++static const struct of_device_id netsec_dt_ids[] = { ++ { .compatible = "socionext,synquacer-netsec" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, netsec_dt_ids); ++ ++#ifdef CONFIG_ACPI ++static const struct acpi_device_id netsec_acpi_ids[] = { ++ { "SCX0001" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(acpi, netsec_acpi_ids); ++#endif ++ ++static struct platform_driver netsec_driver = { ++ .probe = netsec_probe, ++ .remove = netsec_remove, ++ .driver.name = "netsec", ++ .driver.of_match_table = netsec_dt_ids, ++ .driver.acpi_match_table = ACPI_PTR(netsec_acpi_ids), ++ .driver.pm = &netsec_pm_ops, ++}; ++module_platform_driver(netsec_driver); ++ ++MODULE_AUTHOR("Andy Green "); ++MODULE_AUTHOR("Jassi Brar "); ++MODULE_AUTHOR("Ard Biesheuvel "); ++MODULE_DESCRIPTION("NETSEC Ethernet driver"); ++MODULE_LICENSE("GPL"); +-- +cgit v1.1 + +From 31a61532e7b859a797d36595ec5ab7485a9b24d5 Mon Sep 17 00:00:00 2001 +From: Jassi Brar +Date: Wed, 30 Aug 2017 15:55:52 +0530 +Subject: dt-bindings: net: Add DT bindings for Socionext Netsec + +This patch adds documentation for Device-Tree bindings for the +Socionext NetSec Controller driver. + +Signed-off-by: Jassi Brar +Signed-off-by: Ard Biesheuvel +--- + .../devicetree/bindings/net/socionext-netsec.txt | 43 ++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + create mode 100644 Documentation/devicetree/bindings/net/socionext-netsec.txt + +diff --git a/Documentation/devicetree/bindings/net/socionext-netsec.txt b/Documentation/devicetree/bindings/net/socionext-netsec.txt +new file mode 100644 +index 0000000..4695969 +--- /dev/null ++++ b/Documentation/devicetree/bindings/net/socionext-netsec.txt +@@ -0,0 +1,43 @@ ++* Socionext NetSec Ethernet Controller IP ++ ++Required properties: ++- compatible: Should be "socionext,synquacer-netsec" ++- reg: Address and length of the control register area, followed by the ++ address and length of the EEPROM holding the MAC address and ++ microengine firmware ++- interrupts: Should contain ethernet controller interrupt ++- clocks: phandle to the PHY reference clock, and any other clocks to be ++ switched by runtime_pm ++- clock-names: Required only if more than a single clock is listed in 'clocks'. ++ The PHY reference clock must be named 'phy_refclk' ++- phy-mode: See ethernet.txt file in the same directory ++- phy-handle: phandle to select child phy ++ ++Optional properties: (See ethernet.txt file in the same directory) ++- local-mac-address ++- mac-address ++- max-speed ++- max-frame-size ++ ++Required properties for the child phy: ++- reg: phy address ++ ++Example: ++ eth0: netsec@522D0000 { ++ compatible = "socionext,synquacer-netsec"; ++ reg = <0 0x522D0000 0x0 0x10000>, <0 0x10000000 0x0 0x10000>; ++ interrupts = ; ++ clocks = <&clk_netsec>; ++ phy-mode = "rgmii"; ++ max-speed = <1000>; ++ max-frame-size = <9000>; ++ phy-handle = <ðphy0>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ethphy0: ethernet-phy@1 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <1>; ++ }; ++ }; +-- +cgit v1.1 + +From d2fc584f8237746a84e6ec8690d8884f148fc449 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 10 Oct 2017 11:35:51 +0100 +Subject: [PATCH] add interrupt.h, sort alphabetically + +Signed-off-by: Peter Robinson +--- + drivers/net/ethernet/socionext/netsec/netsec_platform.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/ethernet/socionext/netsec/netsec_platform.c b/drivers/net/ethernet/socionext/netsec/netsec_platform.c +index 624f6a7093f6..79072bae917d 100644 +--- a/drivers/net/ethernet/socionext/netsec/netsec_platform.c ++++ b/drivers/net/ethernet/socionext/netsec/netsec_platform.c +@@ -14,21 +14,22 @@ + */ + + #include +-#include +-#include +-#include +-#include + #include ++#include ++#include ++#include + #include ++#include ++#include + #include +-#include +-#include +-#include ++#include + #include + #include + #include +-#include ++#include + #include ++#include ++#include + + #include "netsec.h" + +-- +2.14.2 + diff --git a/baseconfig/CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ b/baseconfig/CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ new file mode 100644 index 000000000..40a287f0f --- /dev/null +++ b/baseconfig/CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ @@ -0,0 +1 @@ +CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ=y diff --git a/baseconfig/CONFIG_ALTERA_MSGDMA b/baseconfig/CONFIG_ALTERA_MSGDMA new file mode 100644 index 000000000..7a1edd837 --- /dev/null +++ b/baseconfig/CONFIG_ALTERA_MSGDMA @@ -0,0 +1 @@ +CONFIG_ALTERA_MSGDMA=m diff --git a/baseconfig/CONFIG_ATH10K_USB b/baseconfig/CONFIG_ATH10K_USB new file mode 100644 index 000000000..29021503d --- /dev/null +++ b/baseconfig/CONFIG_ATH10K_USB @@ -0,0 +1 @@ +CONFIG_ATH10K_USB=m diff --git a/baseconfig/CONFIG_BATTERY_MAX1721X b/baseconfig/CONFIG_BATTERY_MAX1721X new file mode 100644 index 000000000..98c04567c --- /dev/null +++ b/baseconfig/CONFIG_BATTERY_MAX1721X @@ -0,0 +1 @@ +# CONFIG_BATTERY_MAX1721X is not set diff --git a/baseconfig/CONFIG_BLK_CPQ_CISS_DA b/baseconfig/CONFIG_BLK_CPQ_CISS_DA deleted file mode 100644 index be7870097..000000000 --- a/baseconfig/CONFIG_BLK_CPQ_CISS_DA +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BLK_CPQ_CISS_DA=m diff --git a/baseconfig/CONFIG_BLK_DEV_UB b/baseconfig/CONFIG_BLK_DEV_UB deleted file mode 100644 index 6fbfd13fb..000000000 --- a/baseconfig/CONFIG_BLK_DEV_UB +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_BLK_DEV_UB is not set diff --git a/baseconfig/CONFIG_BNXT_FLOWER_OFFLOAD b/baseconfig/CONFIG_BNXT_FLOWER_OFFLOAD new file mode 100644 index 000000000..170bbf312 --- /dev/null +++ b/baseconfig/CONFIG_BNXT_FLOWER_OFFLOAD @@ -0,0 +1 @@ +CONFIG_BNXT_FLOWER_OFFLOAD=y diff --git a/baseconfig/CONFIG_BPF_STREAM_PARSER b/baseconfig/CONFIG_BPF_STREAM_PARSER new file mode 100644 index 000000000..7cf783506 --- /dev/null +++ b/baseconfig/CONFIG_BPF_STREAM_PARSER @@ -0,0 +1 @@ +CONFIG_BPF_STREAM_PARSER=y diff --git a/baseconfig/CONFIG_BT_SCO b/baseconfig/CONFIG_BT_SCO deleted file mode 100644 index c04760986..000000000 --- a/baseconfig/CONFIG_BT_SCO +++ /dev/null @@ -1 +0,0 @@ -CONFIG_BT_SCO=y diff --git a/baseconfig/CONFIG_CCS811 b/baseconfig/CONFIG_CCS811 new file mode 100644 index 000000000..931f14e2a --- /dev/null +++ b/baseconfig/CONFIG_CCS811 @@ -0,0 +1 @@ +# CONFIG_CCS811 is not set diff --git a/baseconfig/CONFIG_CEC_PIN b/baseconfig/CONFIG_CEC_PIN new file mode 100644 index 000000000..395ddfbf2 --- /dev/null +++ b/baseconfig/CONFIG_CEC_PIN @@ -0,0 +1 @@ +CONFIG_CEC_PIN=y diff --git a/baseconfig/CONFIG_CHARGER_QCOM_SMBB b/baseconfig/CONFIG_CHARGER_QCOM_SMBB deleted file mode 100644 index c06d8f1f1..000000000 --- a/baseconfig/CONFIG_CHARGER_QCOM_SMBB +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_CHARGER_QCOM_SMBB is not set diff --git a/baseconfig/CONFIG_CISS_SCSI_TAPE b/baseconfig/CONFIG_CISS_SCSI_TAPE deleted file mode 100644 index 2170cc840..000000000 --- a/baseconfig/CONFIG_CISS_SCSI_TAPE +++ /dev/null @@ -1 +0,0 @@ -CONFIG_CISS_SCSI_TAPE=y diff --git a/baseconfig/CONFIG_CLK_HSDK b/baseconfig/CONFIG_CLK_HSDK new file mode 100644 index 000000000..e1788bbc5 --- /dev/null +++ b/baseconfig/CONFIG_CLK_HSDK @@ -0,0 +1 @@ +# CONFIG_CLK_HSDK is not set diff --git a/baseconfig/CONFIG_CLOCK_THERMAL b/baseconfig/CONFIG_CLOCK_THERMAL new file mode 100644 index 000000000..72ca05f2c --- /dev/null +++ b/baseconfig/CONFIG_CLOCK_THERMAL @@ -0,0 +1 @@ +# CONFIG_CLOCK_THERMAL is not set diff --git a/baseconfig/CONFIG_CRYPTO_DEV_SP_CCP b/baseconfig/CONFIG_CRYPTO_DEV_SP_CCP new file mode 100644 index 000000000..c494dcc87 --- /dev/null +++ b/baseconfig/CONFIG_CRYPTO_DEV_SP_CCP @@ -0,0 +1 @@ +# CONFIG_CRYPTO_DEV_SP_CCP is not set diff --git a/baseconfig/CONFIG_CRYPTO_GCM b/baseconfig/CONFIG_CRYPTO_GCM index 0cb7edc79..8b509be56 100644 --- a/baseconfig/CONFIG_CRYPTO_GCM +++ b/baseconfig/CONFIG_CRYPTO_GCM @@ -1 +1 @@ -CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_GCM=y diff --git a/baseconfig/CONFIG_CRYPTO_GHASH b/baseconfig/CONFIG_CRYPTO_GHASH index b94cd971d..2104f2f02 100644 --- a/baseconfig/CONFIG_CRYPTO_GHASH +++ b/baseconfig/CONFIG_CRYPTO_GHASH @@ -1 +1 @@ -CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_GHASH=y diff --git a/baseconfig/CONFIG_DEVFREQ_THERMAL b/baseconfig/CONFIG_DEVFREQ_THERMAL new file mode 100644 index 000000000..5b90f9082 --- /dev/null +++ b/baseconfig/CONFIG_DEVFREQ_THERMAL @@ -0,0 +1 @@ +# CONFIG_DEVFREQ_THERMAL is not set diff --git a/baseconfig/CONFIG_DP83867_PHY b/baseconfig/CONFIG_DP83867_PHY index 5ba3d57bd..2bb3289c3 100644 --- a/baseconfig/CONFIG_DP83867_PHY +++ b/baseconfig/CONFIG_DP83867_PHY @@ -1 +1 @@ -CONFIG_DP83867_PHY=m +# CONFIG_DP83867_PHY is not set diff --git a/baseconfig/CONFIG_DVB_DDBRIDGE_MSIENABLE b/baseconfig/CONFIG_DVB_DDBRIDGE_MSIENABLE new file mode 100644 index 000000000..4f0814b60 --- /dev/null +++ b/baseconfig/CONFIG_DVB_DDBRIDGE_MSIENABLE @@ -0,0 +1 @@ +# CONFIG_DVB_DDBRIDGE_MSIENABLE is not set diff --git a/baseconfig/CONFIG_EXPERIMENTAL b/baseconfig/CONFIG_EXPERIMENTAL deleted file mode 100644 index 8c91d40b9..000000000 --- a/baseconfig/CONFIG_EXPERIMENTAL +++ /dev/null @@ -1 +0,0 @@ -CONFIG_EXPERIMENTAL=y diff --git a/baseconfig/CONFIG_GPIO_BD9571MWV b/baseconfig/CONFIG_GPIO_BD9571MWV new file mode 100644 index 000000000..0cdd67b34 --- /dev/null +++ b/baseconfig/CONFIG_GPIO_BD9571MWV @@ -0,0 +1 @@ +CONFIG_GPIO_BD9571MWV=m diff --git a/baseconfig/CONFIG_GPIO_TPS68470 b/baseconfig/CONFIG_GPIO_TPS68470 new file mode 100644 index 000000000..3176e956e --- /dev/null +++ b/baseconfig/CONFIG_GPIO_TPS68470 @@ -0,0 +1 @@ +CONFIG_GPIO_TPS68470=y diff --git a/baseconfig/CONFIG_HID_ASUS b/baseconfig/CONFIG_HID_ASUS index efc1ef4f8..b5df524a7 100644 --- a/baseconfig/CONFIG_HID_ASUS +++ b/baseconfig/CONFIG_HID_ASUS @@ -1 +1 @@ -CONFIG_HID_ASUS=m +# CONFIG_HID_ASUS is not set diff --git a/baseconfig/CONFIG_I2C_PARPORT_LIGHT b/baseconfig/CONFIG_I2C_PARPORT_LIGHT index 1dbc68883..e18239222 100644 --- a/baseconfig/CONFIG_I2C_PARPORT_LIGHT +++ b/baseconfig/CONFIG_I2C_PARPORT_LIGHT @@ -1 +1 @@ -CONFIG_I2C_PARPORT_LIGHT=m +# CONFIG_I2C_PARPORT_LIGHT is not set diff --git a/baseconfig/CONFIG_INFINIBAND_EXP_USER_ACCESS b/baseconfig/CONFIG_INFINIBAND_EXP_USER_ACCESS new file mode 100644 index 000000000..478415c11 --- /dev/null +++ b/baseconfig/CONFIG_INFINIBAND_EXP_USER_ACCESS @@ -0,0 +1 @@ +# CONFIG_INFINIBAND_EXP_USER_ACCESS is not set diff --git a/baseconfig/CONFIG_INOTIFY b/baseconfig/CONFIG_INOTIFY deleted file mode 100644 index 78343a1d2..000000000 --- a/baseconfig/CONFIG_INOTIFY +++ /dev/null @@ -1 +0,0 @@ -CONFIG_INOTIFY=y diff --git a/baseconfig/CONFIG_INPUT_PWM_VIBRA b/baseconfig/CONFIG_INPUT_PWM_VIBRA new file mode 100644 index 000000000..39a51b490 --- /dev/null +++ b/baseconfig/CONFIG_INPUT_PWM_VIBRA @@ -0,0 +1 @@ +# CONFIG_INPUT_PWM_VIBRA is not set diff --git a/baseconfig/CONFIG_INPUT_RK805_PWRKEY b/baseconfig/CONFIG_INPUT_RK805_PWRKEY new file mode 100644 index 000000000..4ce96f558 --- /dev/null +++ b/baseconfig/CONFIG_INPUT_RK805_PWRKEY @@ -0,0 +1 @@ +CONFIG_INPUT_RK805_PWRKEY=m diff --git a/baseconfig/CONFIG_IP_DCCP b/baseconfig/CONFIG_IP_DCCP index 26ba41376..6ecb43a3e 100644 --- a/baseconfig/CONFIG_IP_DCCP +++ b/baseconfig/CONFIG_IP_DCCP @@ -1 +1 @@ -CONFIG_IP_DCCP=m +# CONFIG_IP_DCCP is not set diff --git a/baseconfig/CONFIG_IR_GPIO_TX b/baseconfig/CONFIG_IR_GPIO_TX new file mode 100644 index 000000000..4b6b484bb --- /dev/null +++ b/baseconfig/CONFIG_IR_GPIO_TX @@ -0,0 +1 @@ +CONFIG_IR_GPIO_TX=m diff --git a/baseconfig/CONFIG_IR_PWM_TX b/baseconfig/CONFIG_IR_PWM_TX new file mode 100644 index 000000000..4dfd41870 --- /dev/null +++ b/baseconfig/CONFIG_IR_PWM_TX @@ -0,0 +1 @@ +CONFIG_IR_PWM_TX=m diff --git a/baseconfig/CONFIG_LEDS_AS3645A b/baseconfig/CONFIG_LEDS_AS3645A new file mode 100644 index 000000000..25d6f9f10 --- /dev/null +++ b/baseconfig/CONFIG_LEDS_AS3645A @@ -0,0 +1 @@ +CONFIG_LEDS_AS3645A=m diff --git a/baseconfig/CONFIG_LEDS_IS31FL32XX b/baseconfig/CONFIG_LEDS_IS31FL32XX index bc726f797..343dc4dd8 100644 --- a/baseconfig/CONFIG_LEDS_IS31FL32XX +++ b/baseconfig/CONFIG_LEDS_IS31FL32XX @@ -1 +1 @@ -# CONFIG_LEDS_IS31FL32XX is not set +CONFIG_LEDS_IS31FL32XX=m diff --git a/baseconfig/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT b/baseconfig/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT new file mode 100644 index 000000000..336528547 --- /dev/null +++ b/baseconfig/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT @@ -0,0 +1 @@ +# CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT is not set diff --git a/baseconfig/CONFIG_LTC2471 b/baseconfig/CONFIG_LTC2471 new file mode 100644 index 000000000..5d272ac29 --- /dev/null +++ b/baseconfig/CONFIG_LTC2471 @@ -0,0 +1 @@ +# CONFIG_LTC2471 is not set diff --git a/baseconfig/CONFIG_MDIO_I2C b/baseconfig/CONFIG_MDIO_I2C new file mode 100644 index 000000000..df7d9e025 --- /dev/null +++ b/baseconfig/CONFIG_MDIO_I2C @@ -0,0 +1 @@ +CONFIG_MDIO_I2C=m diff --git a/baseconfig/CONFIG_MFD_BD9571MWV b/baseconfig/CONFIG_MFD_BD9571MWV new file mode 100644 index 000000000..28d27a0e5 --- /dev/null +++ b/baseconfig/CONFIG_MFD_BD9571MWV @@ -0,0 +1 @@ +CONFIG_MFD_BD9571MWV=m diff --git a/baseconfig/CONFIG_MFD_TPS68470 b/baseconfig/CONFIG_MFD_TPS68470 new file mode 100644 index 000000000..10fd40465 --- /dev/null +++ b/baseconfig/CONFIG_MFD_TPS68470 @@ -0,0 +1 @@ +CONFIG_MFD_TPS68470=y diff --git a/baseconfig/CONFIG_MLX5_ESWITCH b/baseconfig/CONFIG_MLX5_ESWITCH new file mode 100644 index 000000000..8a69e0671 --- /dev/null +++ b/baseconfig/CONFIG_MLX5_ESWITCH @@ -0,0 +1 @@ +CONFIG_MLX5_ESWITCH=y diff --git a/baseconfig/CONFIG_MLX5_MPFS b/baseconfig/CONFIG_MLX5_MPFS new file mode 100644 index 000000000..6799ed484 --- /dev/null +++ b/baseconfig/CONFIG_MLX5_MPFS @@ -0,0 +1 @@ +CONFIG_MLX5_MPFS=y diff --git a/baseconfig/CONFIG_MMC_BLOCK_BOUNCE b/baseconfig/CONFIG_MMC_BLOCK_BOUNCE deleted file mode 100644 index 4470e8359..000000000 --- a/baseconfig/CONFIG_MMC_BLOCK_BOUNCE +++ /dev/null @@ -1 +0,0 @@ -CONFIG_MMC_BLOCK_BOUNCE=y diff --git a/baseconfig/CONFIG_MMC_TOSHIBA_PCI b/baseconfig/CONFIG_MMC_TOSHIBA_PCI index 9372cd4fe..2ae27a7ef 100644 --- a/baseconfig/CONFIG_MMC_TOSHIBA_PCI +++ b/baseconfig/CONFIG_MMC_TOSHIBA_PCI @@ -1 +1 @@ -CONFIG_MMC_TOSHIBA_PCI=m +# CONFIG_MMC_TOSHIBA_PCI is not set diff --git a/baseconfig/CONFIG_NET_NSH b/baseconfig/CONFIG_NET_NSH new file mode 100644 index 000000000..2a9a24e04 --- /dev/null +++ b/baseconfig/CONFIG_NET_NSH @@ -0,0 +1 @@ +CONFIG_NET_NSH=m diff --git a/baseconfig/CONFIG_NET_VENDOR_HUAWEI b/baseconfig/CONFIG_NET_VENDOR_HUAWEI new file mode 100644 index 000000000..ae01b9160 --- /dev/null +++ b/baseconfig/CONFIG_NET_VENDOR_HUAWEI @@ -0,0 +1 @@ +# CONFIG_NET_VENDOR_HUAWEI is not set diff --git a/baseconfig/CONFIG_NET_VENDOR_SNI b/baseconfig/CONFIG_NET_VENDOR_SNI new file mode 100644 index 000000000..4f301f9ba --- /dev/null +++ b/baseconfig/CONFIG_NET_VENDOR_SNI @@ -0,0 +1 @@ +# CONFIG_NET_VENDOR_SNI is not set diff --git a/baseconfig/CONFIG_NFT_FIB_NETDEV b/baseconfig/CONFIG_NFT_FIB_NETDEV new file mode 100644 index 000000000..273bfeb6a --- /dev/null +++ b/baseconfig/CONFIG_NFT_FIB_NETDEV @@ -0,0 +1 @@ +CONFIG_NFT_FIB_NETDEV=m diff --git a/baseconfig/CONFIG_PARPORT b/baseconfig/CONFIG_PARPORT index 589156958..9dd8f33af 100644 --- a/baseconfig/CONFIG_PARPORT +++ b/baseconfig/CONFIG_PARPORT @@ -1 +1 @@ -CONFIG_PARPORT=m +# CONFIG_PARPORT is not set diff --git a/baseconfig/CONFIG_PARPORT_PC b/baseconfig/CONFIG_PARPORT_PC index b9aa6e8ca..e2a0d3656 100644 --- a/baseconfig/CONFIG_PARPORT_PC +++ b/baseconfig/CONFIG_PARPORT_PC @@ -1 +1 @@ -CONFIG_PARPORT_PC=m +# CONFIG_PARPORT_PC is not set diff --git a/baseconfig/CONFIG_PATA_ARASAN_CF b/baseconfig/CONFIG_PATA_ARASAN_CF index b6c8b16ae..edd438e6c 100644 --- a/baseconfig/CONFIG_PATA_ARASAN_CF +++ b/baseconfig/CONFIG_PATA_ARASAN_CF @@ -1 +1 @@ -CONFIG_PATA_ARASAN_CF=m +# CONFIG_PATA_ARASAN_CF is not set diff --git a/baseconfig/CONFIG_PATA_ATIIXP b/baseconfig/CONFIG_PATA_ATIIXP index 0089d45c9..2730e0e76 100644 --- a/baseconfig/CONFIG_PATA_ATIIXP +++ b/baseconfig/CONFIG_PATA_ATIIXP @@ -1 +1 @@ -CONFIG_PATA_ATIIXP=m +# CONFIG_PATA_ATIIXP is not set diff --git a/baseconfig/CONFIG_PATA_CYPRESS b/baseconfig/CONFIG_PATA_CYPRESS index 3ad2c2cec..901fb21a9 100644 --- a/baseconfig/CONFIG_PATA_CYPRESS +++ b/baseconfig/CONFIG_PATA_CYPRESS @@ -1 +1 @@ -CONFIG_PATA_CYPRESS=m +# CONFIG_PATA_CYPRESS is not set diff --git a/baseconfig/CONFIG_PATA_MPIIX b/baseconfig/CONFIG_PATA_MPIIX index a29c081f6..241149b47 100644 --- a/baseconfig/CONFIG_PATA_MPIIX +++ b/baseconfig/CONFIG_PATA_MPIIX @@ -1 +1 @@ -CONFIG_PATA_MPIIX=m +# CONFIG_PATA_MPIIX is not set diff --git a/baseconfig/CONFIG_PATA_OLDPIIX b/baseconfig/CONFIG_PATA_OLDPIIX index a3a6f6f6f..b35bb81d0 100644 --- a/baseconfig/CONFIG_PATA_OLDPIIX +++ b/baseconfig/CONFIG_PATA_OLDPIIX @@ -1 +1 @@ -CONFIG_PATA_OLDPIIX=m +# CONFIG_PATA_OLDPIIX is not set diff --git a/baseconfig/CONFIG_PATA_RDC b/baseconfig/CONFIG_PATA_RDC index 011a98d5a..48afa962b 100644 --- a/baseconfig/CONFIG_PATA_RDC +++ b/baseconfig/CONFIG_PATA_RDC @@ -1 +1 @@ -CONFIG_PATA_RDC=m +# CONFIG_PATA_RDC is not set diff --git a/baseconfig/CONFIG_PATA_SCH b/baseconfig/CONFIG_PATA_SCH index 2b0924997..52035bf53 100644 --- a/baseconfig/CONFIG_PATA_SCH +++ b/baseconfig/CONFIG_PATA_SCH @@ -1 +1 @@ -CONFIG_PATA_SCH=m +# CONFIG_PATA_SCH is not set diff --git a/baseconfig/CONFIG_PATA_TOSHIBA b/baseconfig/CONFIG_PATA_TOSHIBA index 1fe4524d6..ffe9957f1 100644 --- a/baseconfig/CONFIG_PATA_TOSHIBA +++ b/baseconfig/CONFIG_PATA_TOSHIBA @@ -1 +1 @@ -CONFIG_PATA_TOSHIBA=m +# CONFIG_PATA_TOSHIBA is not set diff --git a/baseconfig/CONFIG_PATA_TRIFLEX b/baseconfig/CONFIG_PATA_TRIFLEX index 09a247f65..5da0e57c4 100644 --- a/baseconfig/CONFIG_PATA_TRIFLEX +++ b/baseconfig/CONFIG_PATA_TRIFLEX @@ -1 +1 @@ -CONFIG_PATA_TRIFLEX=m +# CONFIG_PATA_TRIFLEX is not set diff --git a/baseconfig/CONFIG_PCIE_DW_HOST_ECAM b/baseconfig/CONFIG_PCIE_DW_HOST_ECAM new file mode 100644 index 000000000..c73d5c1aa --- /dev/null +++ b/baseconfig/CONFIG_PCIE_DW_HOST_ECAM @@ -0,0 +1 @@ +# CONFIG_PCIE_DW_HOST_ECAM is not set diff --git a/baseconfig/CONFIG_PHYLINK b/baseconfig/CONFIG_PHYLINK new file mode 100644 index 000000000..cc1e23e0b --- /dev/null +++ b/baseconfig/CONFIG_PHYLINK @@ -0,0 +1 @@ +CONFIG_PHYLINK=m diff --git a/baseconfig/CONFIG_PHY_MVEBU_CP110_COMPHY b/baseconfig/CONFIG_PHY_MVEBU_CP110_COMPHY new file mode 100644 index 000000000..8c104689f --- /dev/null +++ b/baseconfig/CONFIG_PHY_MVEBU_CP110_COMPHY @@ -0,0 +1 @@ +# CONFIG_PHY_MVEBU_CP110_COMPHY is not set diff --git a/baseconfig/CONFIG_PI433 b/baseconfig/CONFIG_PI433 new file mode 100644 index 000000000..b275e1e6a --- /dev/null +++ b/baseconfig/CONFIG_PI433 @@ -0,0 +1 @@ +# CONFIG_PI433 is not set diff --git a/baseconfig/CONFIG_PINCTRL_MSM8994 b/baseconfig/CONFIG_PINCTRL_MSM8994 deleted file mode 100644 index 977b1c3c4..000000000 --- a/baseconfig/CONFIG_PINCTRL_MSM8994 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PINCTRL_MSM8994 is not set diff --git a/baseconfig/CONFIG_PINCTRL_RK805 b/baseconfig/CONFIG_PINCTRL_RK805 new file mode 100644 index 000000000..47b4fd855 --- /dev/null +++ b/baseconfig/CONFIG_PINCTRL_RK805 @@ -0,0 +1 @@ +CONFIG_PINCTRL_RK805=m diff --git a/baseconfig/CONFIG_PINCTRL_SPRD b/baseconfig/CONFIG_PINCTRL_SPRD new file mode 100644 index 000000000..cffa73544 --- /dev/null +++ b/baseconfig/CONFIG_PINCTRL_SPRD @@ -0,0 +1 @@ +# CONFIG_PINCTRL_SPRD is not set diff --git a/baseconfig/CONFIG_PINCTRL_SPRD_SC9860 b/baseconfig/CONFIG_PINCTRL_SPRD_SC9860 new file mode 100644 index 000000000..f9b405f96 --- /dev/null +++ b/baseconfig/CONFIG_PINCTRL_SPRD_SC9860 @@ -0,0 +1 @@ +# CONFIG_PINCTRL_SPRD_SC9860 is not set diff --git a/baseconfig/CONFIG_PM_OPP b/baseconfig/CONFIG_PM_OPP index a77bd27f8..bbe2b56ba 100644 --- a/baseconfig/CONFIG_PM_OPP +++ b/baseconfig/CONFIG_PM_OPP @@ -1 +1 @@ -# CONFIG_PM_OPP is not set +CONFIG_PM_OPP=y diff --git a/baseconfig/CONFIG_PPS_GENERATOR_PARPORT b/baseconfig/CONFIG_PPS_GENERATOR_PARPORT deleted file mode 100644 index 10f4eca68..000000000 --- a/baseconfig/CONFIG_PPS_GENERATOR_PARPORT +++ /dev/null @@ -1 +0,0 @@ -CONFIG_PPS_GENERATOR_PARPORT=m diff --git a/baseconfig/CONFIG_QCOM_GLINK_SSR b/baseconfig/CONFIG_QCOM_GLINK_SSR new file mode 100644 index 000000000..1c67b32f7 --- /dev/null +++ b/baseconfig/CONFIG_QCOM_GLINK_SSR @@ -0,0 +1 @@ +# CONFIG_QCOM_GLINK_SSR is not set diff --git a/baseconfig/CONFIG_R8822BE b/baseconfig/CONFIG_R8822BE new file mode 100644 index 000000000..2f7c08787 --- /dev/null +++ b/baseconfig/CONFIG_R8822BE @@ -0,0 +1 @@ +CONFIG_R8822BE=m diff --git a/baseconfig/CONFIG_REGULATOR_BD9571MWV b/baseconfig/CONFIG_REGULATOR_BD9571MWV new file mode 100644 index 000000000..3b0acb786 --- /dev/null +++ b/baseconfig/CONFIG_REGULATOR_BD9571MWV @@ -0,0 +1 @@ +CONFIG_REGULATOR_BD9571MWV=m diff --git a/baseconfig/CONFIG_RESET_ATTACK_MITIGATION b/baseconfig/CONFIG_RESET_ATTACK_MITIGATION new file mode 100644 index 000000000..8202a7865 --- /dev/null +++ b/baseconfig/CONFIG_RESET_ATTACK_MITIGATION @@ -0,0 +1 @@ +CONFIG_RESET_ATTACK_MITIGATION=y diff --git a/baseconfig/CONFIG_RESET_HSDK_V1 b/baseconfig/CONFIG_RESET_HSDK_V1 new file mode 100644 index 000000000..4c2b97d79 --- /dev/null +++ b/baseconfig/CONFIG_RESET_HSDK_V1 @@ -0,0 +1 @@ +# CONFIG_RESET_HSDK_V1 is not set diff --git a/baseconfig/CONFIG_RMNET b/baseconfig/CONFIG_RMNET new file mode 100644 index 000000000..5e8c115b5 --- /dev/null +++ b/baseconfig/CONFIG_RMNET @@ -0,0 +1 @@ +# CONFIG_RMNET is not set diff --git a/baseconfig/CONFIG_ROCKCHIP_PHY b/baseconfig/CONFIG_ROCKCHIP_PHY new file mode 100644 index 000000000..4ca60873a --- /dev/null +++ b/baseconfig/CONFIG_ROCKCHIP_PHY @@ -0,0 +1 @@ +# CONFIG_ROCKCHIP_PHY is not set diff --git a/baseconfig/CONFIG_RPMSG_QCOM_GLINK_SMEM b/baseconfig/CONFIG_RPMSG_QCOM_GLINK_SMEM new file mode 100644 index 000000000..c2c0a0c78 --- /dev/null +++ b/baseconfig/CONFIG_RPMSG_QCOM_GLINK_SMEM @@ -0,0 +1 @@ +# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set diff --git a/baseconfig/CONFIG_SENSORS_IBM_CFFPS b/baseconfig/CONFIG_SENSORS_IBM_CFFPS new file mode 100644 index 000000000..a217d973e --- /dev/null +++ b/baseconfig/CONFIG_SENSORS_IBM_CFFPS @@ -0,0 +1 @@ +# CONFIG_SENSORS_IBM_CFFPS is not set diff --git a/baseconfig/CONFIG_SENSORS_TPS53679 b/baseconfig/CONFIG_SENSORS_TPS53679 new file mode 100644 index 000000000..461a703df --- /dev/null +++ b/baseconfig/CONFIG_SENSORS_TPS53679 @@ -0,0 +1 @@ +CONFIG_SENSORS_TPS53679=m diff --git a/baseconfig/CONFIG_SERIO_GPIO_PS2 b/baseconfig/CONFIG_SERIO_GPIO_PS2 new file mode 100644 index 000000000..22c1adbfb --- /dev/null +++ b/baseconfig/CONFIG_SERIO_GPIO_PS2 @@ -0,0 +1 @@ +# CONFIG_SERIO_GPIO_PS2 is not set diff --git a/baseconfig/CONFIG_SFP b/baseconfig/CONFIG_SFP new file mode 100644 index 000000000..db57db12e --- /dev/null +++ b/baseconfig/CONFIG_SFP @@ -0,0 +1 @@ +CONFIG_SFP=m diff --git a/baseconfig/CONFIG_SLAB_FREELIST_HARDENED b/baseconfig/CONFIG_SLAB_FREELIST_HARDENED new file mode 100644 index 000000000..52602d279 --- /dev/null +++ b/baseconfig/CONFIG_SLAB_FREELIST_HARDENED @@ -0,0 +1 @@ +CONFIG_SLAB_FREELIST_HARDENED=y diff --git a/baseconfig/CONFIG_SND_HDA_POWER_SAVE_DEFAULT b/baseconfig/CONFIG_SND_HDA_POWER_SAVE_DEFAULT index ce02ec981..ba018972d 100644 --- a/baseconfig/CONFIG_SND_HDA_POWER_SAVE_DEFAULT +++ b/baseconfig/CONFIG_SND_HDA_POWER_SAVE_DEFAULT @@ -1 +1 @@ -CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 +CONFIG_SND_HDA_POWER_SAVE_DEFAULT=1 diff --git a/baseconfig/CONFIG_SND_SOC_CS43130 b/baseconfig/CONFIG_SND_SOC_CS43130 new file mode 100644 index 000000000..3fad16f6d --- /dev/null +++ b/baseconfig/CONFIG_SND_SOC_CS43130 @@ -0,0 +1 @@ +CONFIG_SND_SOC_CS43130=m diff --git a/baseconfig/CONFIG_SND_SOC_WM8524 b/baseconfig/CONFIG_SND_SOC_WM8524 new file mode 100644 index 000000000..1eb33d7e5 --- /dev/null +++ b/baseconfig/CONFIG_SND_SOC_WM8524 @@ -0,0 +1 @@ +CONFIG_SND_SOC_WM8524=m diff --git a/baseconfig/CONFIG_SQUASHFS_ZSTD b/baseconfig/CONFIG_SQUASHFS_ZSTD new file mode 100644 index 000000000..023fb21e0 --- /dev/null +++ b/baseconfig/CONFIG_SQUASHFS_ZSTD @@ -0,0 +1 @@ +CONFIG_SQUASHFS_ZSTD=y diff --git a/baseconfig/CONFIG_STRING_SELFTEST b/baseconfig/CONFIG_STRING_SELFTEST new file mode 100644 index 000000000..dbff6d7fa --- /dev/null +++ b/baseconfig/CONFIG_STRING_SELFTEST @@ -0,0 +1 @@ +# CONFIG_STRING_SELFTEST is not set diff --git a/baseconfig/CONFIG_SURFACE3_WMI b/baseconfig/CONFIG_SURFACE3_WMI deleted file mode 100644 index d2fbd9c7b..000000000 --- a/baseconfig/CONFIG_SURFACE3_WMI +++ /dev/null @@ -1 +0,0 @@ -CONFIG_SURFACE3_WMI=m diff --git a/baseconfig/CONFIG_SURFACE_3_BUTTON b/baseconfig/CONFIG_SURFACE_3_BUTTON index 8ba50033b..5b0621446 100644 --- a/baseconfig/CONFIG_SURFACE_3_BUTTON +++ b/baseconfig/CONFIG_SURFACE_3_BUTTON @@ -1 +1 @@ -CONFIG_SURFACE_3_BUTTON=m +# CONFIG_SURFACE_3_BUTTON is not set diff --git a/baseconfig/CONFIG_TI_SYSCON_RESET b/baseconfig/CONFIG_TI_SYSCON_RESET deleted file mode 100644 index daf623a6e..000000000 --- a/baseconfig/CONFIG_TI_SYSCON_RESET +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_TI_SYSCON_RESET is not set diff --git a/baseconfig/CONFIG_USB_LED b/baseconfig/CONFIG_USB_LED deleted file mode 100644 index 445af6c46..000000000 --- a/baseconfig/CONFIG_USB_LED +++ /dev/null @@ -1 +0,0 @@ -CONFIG_USB_LED=m diff --git a/baseconfig/CONFIG_VIDEO_RENESAS_VSP1 b/baseconfig/CONFIG_VIDEO_RENESAS_VSP1 deleted file mode 100644 index dd5c6f34c..000000000 --- a/baseconfig/CONFIG_VIDEO_RENESAS_VSP1 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_VIDEO_RENESAS_VSP1 is not set diff --git a/baseconfig/CONFIG_W1_SLAVE_DS2805 b/baseconfig/CONFIG_W1_SLAVE_DS2805 new file mode 100644 index 000000000..eddd3bbb3 --- /dev/null +++ b/baseconfig/CONFIG_W1_SLAVE_DS2805 @@ -0,0 +1 @@ +CONFIG_W1_SLAVE_DS2805=m diff --git a/baseconfig/CONFIG_WIL6210_DEBUGFS b/baseconfig/CONFIG_WIL6210_DEBUGFS new file mode 100644 index 000000000..f0f5fe7cf --- /dev/null +++ b/baseconfig/CONFIG_WIL6210_DEBUGFS @@ -0,0 +1 @@ +CONFIG_WIL6210_DEBUGFS=y diff --git a/baseconfig/CONFIG_ZRAM_WRITEBACK b/baseconfig/CONFIG_ZRAM_WRITEBACK new file mode 100644 index 000000000..9a566b71c --- /dev/null +++ b/baseconfig/CONFIG_ZRAM_WRITEBACK @@ -0,0 +1 @@ +# CONFIG_ZRAM_WRITEBACK is not set diff --git a/baseconfig/arm/arm64/CONFIG_ARCH_BCM_IPROC b/baseconfig/arm/CONFIG_ARCH_BCM_IPROC similarity index 100% rename from baseconfig/arm/arm64/CONFIG_ARCH_BCM_IPROC rename to baseconfig/arm/CONFIG_ARCH_BCM_IPROC diff --git a/baseconfig/arm/CONFIG_BLK_DEV_SX8 b/baseconfig/arm/CONFIG_BLK_DEV_SX8 new file mode 100644 index 000000000..76e0342ed --- /dev/null +++ b/baseconfig/arm/CONFIG_BLK_DEV_SX8 @@ -0,0 +1 @@ +# CONFIG_BLK_DEV_SX8 is not set diff --git a/baseconfig/arm/CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG b/baseconfig/arm/CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG new file mode 100644 index 000000000..62fd0b85a --- /dev/null +++ b/baseconfig/arm/CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG @@ -0,0 +1 @@ +CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y diff --git a/baseconfig/arm/CONFIG_CRYPTO_SHA256_ARM64 b/baseconfig/arm/CONFIG_CRYPTO_SHA256_ARM64 index ba32f8501..3aa7dacbf 100644 --- a/baseconfig/arm/CONFIG_CRYPTO_SHA256_ARM64 +++ b/baseconfig/arm/CONFIG_CRYPTO_SHA256_ARM64 @@ -1 +1 @@ -CONFIG_CRYPTO_SHA256_ARM64=m +CONFIG_CRYPTO_SHA256_ARM64=y diff --git a/baseconfig/arm/CONFIG_DRM_DW_HDMI_CEC b/baseconfig/arm/CONFIG_DRM_DW_HDMI_CEC new file mode 100644 index 000000000..a3e178eae --- /dev/null +++ b/baseconfig/arm/CONFIG_DRM_DW_HDMI_CEC @@ -0,0 +1 @@ +CONFIG_DRM_DW_HDMI_CEC=m diff --git a/baseconfig/arm/CONFIG_DRM_VC4_HDMI_CEC b/baseconfig/arm/CONFIG_DRM_VC4_HDMI_CEC new file mode 100644 index 000000000..da0132c1f --- /dev/null +++ b/baseconfig/arm/CONFIG_DRM_VC4_HDMI_CEC @@ -0,0 +1 @@ +CONFIG_DRM_VC4_HDMI_CEC=y diff --git a/baseconfig/arm/CONFIG_EXTCON_USBC_CROS_EC b/baseconfig/arm/CONFIG_EXTCON_USBC_CROS_EC new file mode 100644 index 000000000..831bc6ea7 --- /dev/null +++ b/baseconfig/arm/CONFIG_EXTCON_USBC_CROS_EC @@ -0,0 +1 @@ +CONFIG_EXTCON_USBC_CROS_EC=m diff --git a/baseconfig/arm/CONFIG_HW_RANDOM_IMX_RNGC b/baseconfig/arm/CONFIG_HW_RANDOM_IMX_RNGC new file mode 100644 index 000000000..e7b39a2c7 --- /dev/null +++ b/baseconfig/arm/CONFIG_HW_RANDOM_IMX_RNGC @@ -0,0 +1 @@ +CONFIG_HW_RANDOM_IMX_RNGC=m diff --git a/baseconfig/CONFIG_HW_RANDOM_OMAP b/baseconfig/arm/CONFIG_HW_RANDOM_OMAP similarity index 100% rename from baseconfig/CONFIG_HW_RANDOM_OMAP rename to baseconfig/arm/CONFIG_HW_RANDOM_OMAP diff --git a/baseconfig/arm/CONFIG_I2C_DESIGNWARE_CORE b/baseconfig/arm/CONFIG_I2C_DESIGNWARE_CORE index 661ffb01a..f9cdc633b 100644 --- a/baseconfig/arm/CONFIG_I2C_DESIGNWARE_CORE +++ b/baseconfig/arm/CONFIG_I2C_DESIGNWARE_CORE @@ -1 +1 @@ -CONFIG_I2C_DESIGNWARE_CORE=m +CONFIG_I2C_DESIGNWARE_CORE=y diff --git a/baseconfig/arm/CONFIG_I2C_DESIGNWARE_PLATFORM b/baseconfig/arm/CONFIG_I2C_DESIGNWARE_PLATFORM index cec2f8633..3d50a3e8a 100644 --- a/baseconfig/arm/CONFIG_I2C_DESIGNWARE_PLATFORM +++ b/baseconfig/arm/CONFIG_I2C_DESIGNWARE_PLATFORM @@ -1 +1 @@ -CONFIG_I2C_DESIGNWARE_PLATFORM=m +CONFIG_I2C_DESIGNWARE_PLATFORM=y diff --git a/baseconfig/arm/CONFIG_IOMMU_DMA b/baseconfig/arm/CONFIG_IOMMU_DMA new file mode 100644 index 000000000..a9155fba1 --- /dev/null +++ b/baseconfig/arm/CONFIG_IOMMU_DMA @@ -0,0 +1 @@ +CONFIG_IOMMU_DMA=y diff --git a/baseconfig/arm/CONFIG_MESON_GX_SOCINFO b/baseconfig/arm/CONFIG_MESON_GX_SOCINFO new file mode 100644 index 000000000..ce5ba6f4a --- /dev/null +++ b/baseconfig/arm/CONFIG_MESON_GX_SOCINFO @@ -0,0 +1 @@ +CONFIG_MESON_GX_SOCINFO=y diff --git a/baseconfig/arm/armv7/CONFIG_MTD_NAND_PXA3xx b/baseconfig/arm/CONFIG_MTD_NAND_PXA3xx similarity index 100% rename from baseconfig/arm/armv7/CONFIG_MTD_NAND_PXA3xx rename to baseconfig/arm/CONFIG_MTD_NAND_PXA3xx diff --git a/baseconfig/arm/CONFIG_PARPORT b/baseconfig/arm/CONFIG_PARPORT deleted file mode 100644 index 9dd8f33af..000000000 --- a/baseconfig/arm/CONFIG_PARPORT +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PARPORT is not set diff --git a/baseconfig/arm/CONFIG_PATA_ALI b/baseconfig/arm/CONFIG_PATA_ALI new file mode 100644 index 000000000..15c814454 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_ALI @@ -0,0 +1 @@ +# CONFIG_PATA_ALI is not set diff --git a/baseconfig/arm/CONFIG_PATA_AMD b/baseconfig/arm/CONFIG_PATA_AMD new file mode 100644 index 000000000..33a58facc --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_AMD @@ -0,0 +1 @@ +# CONFIG_PATA_AMD is not set diff --git a/baseconfig/arm/CONFIG_PATA_ARTOP b/baseconfig/arm/CONFIG_PATA_ARTOP new file mode 100644 index 000000000..a4e7eb3b0 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_ARTOP @@ -0,0 +1 @@ +# CONFIG_PATA_ARTOP is not set diff --git a/baseconfig/arm/CONFIG_PATA_ATP867X b/baseconfig/arm/CONFIG_PATA_ATP867X new file mode 100644 index 000000000..5e66402b8 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_ATP867X @@ -0,0 +1 @@ +# CONFIG_PATA_ATP867X is not set diff --git a/baseconfig/arm/CONFIG_PATA_CMD640_PCI b/baseconfig/arm/CONFIG_PATA_CMD640_PCI new file mode 100644 index 000000000..9244705d2 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_CMD640_PCI @@ -0,0 +1 @@ +# CONFIG_PATA_CMD640_PCI is not set diff --git a/baseconfig/arm/CONFIG_PATA_CMD64X b/baseconfig/arm/CONFIG_PATA_CMD64X new file mode 100644 index 000000000..eb4773083 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_CMD64X @@ -0,0 +1 @@ +# CONFIG_PATA_CMD64X is not set diff --git a/baseconfig/arm/CONFIG_PATA_CS5520 b/baseconfig/arm/CONFIG_PATA_CS5520 new file mode 100644 index 000000000..2328c0724 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_CS5520 @@ -0,0 +1 @@ +# CONFIG_PATA_CS5520 is not set diff --git a/baseconfig/arm/CONFIG_PATA_CS5530 b/baseconfig/arm/CONFIG_PATA_CS5530 new file mode 100644 index 000000000..106b33a1a --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_CS5530 @@ -0,0 +1 @@ +# CONFIG_PATA_CS5530 is not set diff --git a/baseconfig/arm/CONFIG_PATA_CS5535 b/baseconfig/arm/CONFIG_PATA_CS5535 new file mode 100644 index 000000000..331016055 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_CS5535 @@ -0,0 +1 @@ +# CONFIG_PATA_CS5535 is not set diff --git a/baseconfig/arm/CONFIG_PATA_CS5536 b/baseconfig/arm/CONFIG_PATA_CS5536 new file mode 100644 index 000000000..e82dab7f2 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_CS5536 @@ -0,0 +1 @@ +# CONFIG_PATA_CS5536 is not set diff --git a/baseconfig/arm/CONFIG_PATA_EFAR b/baseconfig/arm/CONFIG_PATA_EFAR new file mode 100644 index 000000000..d1957bf57 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_EFAR @@ -0,0 +1 @@ +# CONFIG_PATA_EFAR is not set diff --git a/baseconfig/arm/CONFIG_PATA_HPT366 b/baseconfig/arm/CONFIG_PATA_HPT366 new file mode 100644 index 000000000..b67ac339d --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_HPT366 @@ -0,0 +1 @@ +# CONFIG_PATA_HPT366 is not set diff --git a/baseconfig/arm/CONFIG_PATA_HPT37X b/baseconfig/arm/CONFIG_PATA_HPT37X new file mode 100644 index 000000000..990af0509 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_HPT37X @@ -0,0 +1 @@ +# CONFIG_PATA_HPT37X is not set diff --git a/baseconfig/arm/CONFIG_PATA_HPT3X2N b/baseconfig/arm/CONFIG_PATA_HPT3X2N new file mode 100644 index 000000000..471fcff45 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_HPT3X2N @@ -0,0 +1 @@ +# CONFIG_PATA_HPT3X2N is not set diff --git a/baseconfig/arm/CONFIG_PATA_HPT3X3 b/baseconfig/arm/CONFIG_PATA_HPT3X3 new file mode 100644 index 000000000..9fc36a00b --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_HPT3X3 @@ -0,0 +1 @@ +# CONFIG_PATA_HPT3X3 is not set diff --git a/baseconfig/arm/CONFIG_PATA_IT8213 b/baseconfig/arm/CONFIG_PATA_IT8213 new file mode 100644 index 000000000..47fbeb7f5 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_IT8213 @@ -0,0 +1 @@ +# CONFIG_PATA_IT8213 is not set diff --git a/baseconfig/arm/CONFIG_PATA_IT821X b/baseconfig/arm/CONFIG_PATA_IT821X new file mode 100644 index 000000000..c29d7f7cb --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_IT821X @@ -0,0 +1 @@ +# CONFIG_PATA_IT821X is not set diff --git a/baseconfig/arm/CONFIG_PATA_JMICRON b/baseconfig/arm/CONFIG_PATA_JMICRON new file mode 100644 index 000000000..55695c65f --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_JMICRON @@ -0,0 +1 @@ +# CONFIG_PATA_JMICRON is not set diff --git a/baseconfig/arm/CONFIG_PATA_NETCELL b/baseconfig/arm/CONFIG_PATA_NETCELL new file mode 100644 index 000000000..e598ae303 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_NETCELL @@ -0,0 +1 @@ +# CONFIG_PATA_NETCELL is not set diff --git a/baseconfig/arm/CONFIG_PATA_NINJA32 b/baseconfig/arm/CONFIG_PATA_NINJA32 new file mode 100644 index 000000000..9deb5dff7 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_NINJA32 @@ -0,0 +1 @@ +# CONFIG_PATA_NINJA32 is not set diff --git a/baseconfig/arm/CONFIG_PATA_NS87410 b/baseconfig/arm/CONFIG_PATA_NS87410 new file mode 100644 index 000000000..32f9c72e0 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_NS87410 @@ -0,0 +1 @@ +# CONFIG_PATA_NS87410 is not set diff --git a/baseconfig/arm/CONFIG_PATA_NS87415 b/baseconfig/arm/CONFIG_PATA_NS87415 new file mode 100644 index 000000000..d12f9010d --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_NS87415 @@ -0,0 +1 @@ +# CONFIG_PATA_NS87415 is not set diff --git a/baseconfig/arm/CONFIG_PATA_OF_PLATFORM b/baseconfig/arm/CONFIG_PATA_OF_PLATFORM deleted file mode 100644 index 5354705f9..000000000 --- a/baseconfig/arm/CONFIG_PATA_OF_PLATFORM +++ /dev/null @@ -1 +0,0 @@ -CONFIG_PATA_OF_PLATFORM=m diff --git a/baseconfig/arm/CONFIG_PATA_OPTI b/baseconfig/arm/CONFIG_PATA_OPTI new file mode 100644 index 000000000..f95b6c966 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_OPTI @@ -0,0 +1 @@ +# CONFIG_PATA_OPTI is not set diff --git a/baseconfig/arm/CONFIG_PATA_OPTIDMA b/baseconfig/arm/CONFIG_PATA_OPTIDMA new file mode 100644 index 000000000..6bf1d2e8a --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_OPTIDMA @@ -0,0 +1 @@ +# CONFIG_PATA_OPTIDMA is not set diff --git a/baseconfig/arm/CONFIG_PATA_PDC2027X b/baseconfig/arm/CONFIG_PATA_PDC2027X new file mode 100644 index 000000000..c8ad0b826 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_PDC2027X @@ -0,0 +1 @@ +# CONFIG_PATA_PDC2027X is not set diff --git a/baseconfig/arm/CONFIG_PATA_PDC_OLD b/baseconfig/arm/CONFIG_PATA_PDC_OLD new file mode 100644 index 000000000..d77240fcf --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_PDC_OLD @@ -0,0 +1 @@ +# CONFIG_PATA_PDC_OLD is not set diff --git a/baseconfig/arm/CONFIG_PATA_SERVERWORKS b/baseconfig/arm/CONFIG_PATA_SERVERWORKS new file mode 100644 index 000000000..5cacac7a6 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_SERVERWORKS @@ -0,0 +1 @@ +# CONFIG_PATA_SERVERWORKS is not set diff --git a/baseconfig/arm/CONFIG_PATA_SIL680 b/baseconfig/arm/CONFIG_PATA_SIL680 new file mode 100644 index 000000000..75224a38b --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_SIL680 @@ -0,0 +1 @@ +# CONFIG_PATA_SIL680 is not set diff --git a/baseconfig/arm/CONFIG_PATA_SIS b/baseconfig/arm/CONFIG_PATA_SIS new file mode 100644 index 000000000..8c547495a --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_SIS @@ -0,0 +1 @@ +# CONFIG_PATA_SIS is not set diff --git a/baseconfig/arm/CONFIG_PATA_VIA b/baseconfig/arm/CONFIG_PATA_VIA new file mode 100644 index 000000000..9deaa6c3c --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_VIA @@ -0,0 +1 @@ +# CONFIG_PATA_VIA is not set diff --git a/baseconfig/arm/CONFIG_PATA_WINBOND b/baseconfig/arm/CONFIG_PATA_WINBOND new file mode 100644 index 000000000..9b3eb6289 --- /dev/null +++ b/baseconfig/arm/CONFIG_PATA_WINBOND @@ -0,0 +1 @@ +# CONFIG_PATA_WINBOND is not set diff --git a/baseconfig/arm/CONFIG_RADIO_WL128X b/baseconfig/arm/CONFIG_RADIO_WL128X deleted file mode 100644 index 88b42f8e6..000000000 --- a/baseconfig/arm/CONFIG_RADIO_WL128X +++ /dev/null @@ -1 +0,0 @@ -CONFIG_RADIO_WL128X=m diff --git a/baseconfig/arm/CONFIG_ROCKCHIP_PHY b/baseconfig/arm/CONFIG_ROCKCHIP_PHY new file mode 100644 index 000000000..e49faf8f9 --- /dev/null +++ b/baseconfig/arm/CONFIG_ROCKCHIP_PHY @@ -0,0 +1 @@ +CONFIG_ROCKCHIP_PHY=m diff --git a/baseconfig/arm/CONFIG_SATA_INIC162X b/baseconfig/arm/CONFIG_SATA_INIC162X new file mode 100644 index 000000000..6abf495a0 --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_INIC162X @@ -0,0 +1 @@ +# CONFIG_SATA_INIC162X is not set diff --git a/baseconfig/arm/CONFIG_SATA_NV b/baseconfig/arm/CONFIG_SATA_NV new file mode 100644 index 000000000..c8419327a --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_NV @@ -0,0 +1 @@ +# CONFIG_SATA_NV is not set diff --git a/baseconfig/arm/CONFIG_SATA_PROMISE b/baseconfig/arm/CONFIG_SATA_PROMISE new file mode 100644 index 000000000..2af59fe8e --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_PROMISE @@ -0,0 +1 @@ +# CONFIG_SATA_PROMISE is not set diff --git a/baseconfig/arm/CONFIG_SATA_QSTOR b/baseconfig/arm/CONFIG_SATA_QSTOR new file mode 100644 index 000000000..8b3cce9ab --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_QSTOR @@ -0,0 +1 @@ +# CONFIG_SATA_QSTOR is not set diff --git a/baseconfig/arm/CONFIG_SATA_SIL b/baseconfig/arm/CONFIG_SATA_SIL new file mode 100644 index 000000000..5d551ee6a --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_SIL @@ -0,0 +1 @@ +# CONFIG_SATA_SIL is not set diff --git a/baseconfig/arm/CONFIG_SATA_SIL24 b/baseconfig/arm/CONFIG_SATA_SIL24 new file mode 100644 index 000000000..7526a06a0 --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_SIL24 @@ -0,0 +1 @@ +# CONFIG_SATA_SIL24 is not set diff --git a/baseconfig/arm/CONFIG_SATA_SIS b/baseconfig/arm/CONFIG_SATA_SIS new file mode 100644 index 000000000..1cd4ae75f --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_SIS @@ -0,0 +1 @@ +# CONFIG_SATA_SIS is not set diff --git a/baseconfig/arm/CONFIG_SATA_SVW b/baseconfig/arm/CONFIG_SATA_SVW new file mode 100644 index 000000000..625275c8d --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_SVW @@ -0,0 +1 @@ +# CONFIG_SATA_SVW is not set diff --git a/baseconfig/arm/CONFIG_SATA_SX4 b/baseconfig/arm/CONFIG_SATA_SX4 new file mode 100644 index 000000000..abbd89112 --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_SX4 @@ -0,0 +1 @@ +# CONFIG_SATA_SX4 is not set diff --git a/baseconfig/arm/CONFIG_SATA_ULI b/baseconfig/arm/CONFIG_SATA_ULI new file mode 100644 index 000000000..b50271fc3 --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_ULI @@ -0,0 +1 @@ +# CONFIG_SATA_ULI is not set diff --git a/baseconfig/arm/CONFIG_SATA_VIA b/baseconfig/arm/CONFIG_SATA_VIA new file mode 100644 index 000000000..f5754463a --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_VIA @@ -0,0 +1 @@ +# CONFIG_SATA_VIA is not set diff --git a/baseconfig/arm/CONFIG_SATA_VITESSE b/baseconfig/arm/CONFIG_SATA_VITESSE new file mode 100644 index 000000000..59856ec7b --- /dev/null +++ b/baseconfig/arm/CONFIG_SATA_VITESSE @@ -0,0 +1 @@ +# CONFIG_SATA_VITESSE is not set diff --git a/baseconfig/arm/armv7/armv7/CONFIG_SND_SOC_TEGRA20_AC97 b/baseconfig/arm/CONFIG_SND_SOC_TEGRA20_AC97 similarity index 100% rename from baseconfig/arm/armv7/armv7/CONFIG_SND_SOC_TEGRA20_AC97 rename to baseconfig/arm/CONFIG_SND_SOC_TEGRA20_AC97 diff --git a/baseconfig/arm/armv7/armv7/CONFIG_SND_SOC_TEGRA20_DAS b/baseconfig/arm/CONFIG_SND_SOC_TEGRA20_DAS similarity index 100% rename from baseconfig/arm/armv7/armv7/CONFIG_SND_SOC_TEGRA20_DAS rename to baseconfig/arm/CONFIG_SND_SOC_TEGRA20_DAS diff --git a/baseconfig/arm/armv7/CONFIG_SND_SOC_TEGRA20_I2S b/baseconfig/arm/CONFIG_SND_SOC_TEGRA20_I2S similarity index 100% rename from baseconfig/arm/armv7/CONFIG_SND_SOC_TEGRA20_I2S rename to baseconfig/arm/CONFIG_SND_SOC_TEGRA20_I2S diff --git a/baseconfig/arm/armv7/armv7/CONFIG_SND_SOC_TEGRA20_SPDIF b/baseconfig/arm/CONFIG_SND_SOC_TEGRA20_SPDIF similarity index 100% rename from baseconfig/arm/armv7/armv7/CONFIG_SND_SOC_TEGRA20_SPDIF rename to baseconfig/arm/CONFIG_SND_SOC_TEGRA20_SPDIF diff --git a/baseconfig/arm/armv7/CONFIG_SND_SOC_TEGRA30_AHUB b/baseconfig/arm/CONFIG_SND_SOC_TEGRA30_AHUB similarity index 100% rename from baseconfig/arm/armv7/CONFIG_SND_SOC_TEGRA30_AHUB rename to baseconfig/arm/CONFIG_SND_SOC_TEGRA30_AHUB diff --git a/baseconfig/arm/armv7/CONFIG_SND_SOC_TEGRA30_I2S b/baseconfig/arm/CONFIG_SND_SOC_TEGRA30_I2S similarity index 100% rename from baseconfig/arm/armv7/CONFIG_SND_SOC_TEGRA30_I2S rename to baseconfig/arm/CONFIG_SND_SOC_TEGRA30_I2S diff --git a/baseconfig/arm/armv7/CONFIG_SUNXI_SRAM b/baseconfig/arm/CONFIG_SUNXI_SRAM similarity index 100% rename from baseconfig/arm/armv7/CONFIG_SUNXI_SRAM rename to baseconfig/arm/CONFIG_SUNXI_SRAM diff --git a/baseconfig/arm/CONFIG_TINYDRM_REPAPER b/baseconfig/arm/CONFIG_TINYDRM_REPAPER new file mode 100644 index 000000000..c4d2874fa --- /dev/null +++ b/baseconfig/arm/CONFIG_TINYDRM_REPAPER @@ -0,0 +1 @@ +# CONFIG_TINYDRM_REPAPER is not set diff --git a/baseconfig/arm/CONFIG_TINYDRM_ST7586 b/baseconfig/arm/CONFIG_TINYDRM_ST7586 new file mode 100644 index 000000000..2b9e29f63 --- /dev/null +++ b/baseconfig/arm/CONFIG_TINYDRM_ST7586 @@ -0,0 +1 @@ +# CONFIG_TINYDRM_ST7586 is not set diff --git a/baseconfig/arm/CONFIG_TI_ST b/baseconfig/arm/CONFIG_TI_ST deleted file mode 100644 index e6d0d4428..000000000 --- a/baseconfig/arm/CONFIG_TI_ST +++ /dev/null @@ -1 +0,0 @@ -CONFIG_TI_ST=m diff --git a/baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA b/baseconfig/arm/CONFIG_USB_CHIPIDEA similarity index 100% rename from baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA rename to baseconfig/arm/CONFIG_USB_CHIPIDEA diff --git a/baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA_HOST b/baseconfig/arm/CONFIG_USB_CHIPIDEA_HOST similarity index 100% rename from baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA_HOST rename to baseconfig/arm/CONFIG_USB_CHIPIDEA_HOST diff --git a/baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA_UDC b/baseconfig/arm/CONFIG_USB_CHIPIDEA_UDC similarity index 100% rename from baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA_UDC rename to baseconfig/arm/CONFIG_USB_CHIPIDEA_UDC diff --git a/baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA_ULPI b/baseconfig/arm/CONFIG_USB_CHIPIDEA_ULPI similarity index 100% rename from baseconfig/arm/arm64/CONFIG_USB_CHIPIDEA_ULPI rename to baseconfig/arm/CONFIG_USB_CHIPIDEA_ULPI diff --git a/baseconfig/arm/CONFIG_VIDEO_MESON_AO_CEC b/baseconfig/arm/CONFIG_VIDEO_MESON_AO_CEC new file mode 100644 index 000000000..499a44076 --- /dev/null +++ b/baseconfig/arm/CONFIG_VIDEO_MESON_AO_CEC @@ -0,0 +1 @@ +CONFIG_VIDEO_MESON_AO_CEC=m diff --git a/baseconfig/arm/arm64/CONFIG_ARCH_TEGRA_186_SOC b/baseconfig/arm/arm64/CONFIG_ARCH_TEGRA_186_SOC index 0439db330..1cafdb24f 100644 --- a/baseconfig/arm/arm64/CONFIG_ARCH_TEGRA_186_SOC +++ b/baseconfig/arm/arm64/CONFIG_ARCH_TEGRA_186_SOC @@ -1 +1 @@ -# CONFIG_ARCH_TEGRA_186_SOC is not set +CONFIG_ARCH_TEGRA_186_SOC=y diff --git a/baseconfig/arm/arm64/CONFIG_ARCH_VULCAN b/baseconfig/arm/arm64/CONFIG_ARCH_VULCAN deleted file mode 100644 index 6081275c5..000000000 --- a/baseconfig/arm/arm64/CONFIG_ARCH_VULCAN +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_ARCH_VULCAN is not set diff --git a/baseconfig/arm/arm64/CONFIG_ARM64_PMEM b/baseconfig/arm/arm64/CONFIG_ARM64_PMEM new file mode 100644 index 000000000..9325600d1 --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_ARM64_PMEM @@ -0,0 +1 @@ +# CONFIG_ARM64_PMEM is not set diff --git a/baseconfig/arm/arm64/CONFIG_ARM_TEGRA186_CPUFREQ b/baseconfig/arm/arm64/CONFIG_ARM_TEGRA186_CPUFREQ new file mode 100644 index 000000000..f0e165dfb --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_ARM_TEGRA186_CPUFREQ @@ -0,0 +1 @@ +CONFIG_ARM_TEGRA186_CPUFREQ=m diff --git a/baseconfig/CONFIG_ATA_ACPI b/baseconfig/arm/arm64/CONFIG_ATA_ACPI similarity index 100% rename from baseconfig/CONFIG_ATA_ACPI rename to baseconfig/arm/arm64/CONFIG_ATA_ACPI diff --git a/baseconfig/arm/arm64/CONFIG_CHARGER_QCOM_SMBB b/baseconfig/arm/arm64/CONFIG_CHARGER_QCOM_SMBB new file mode 100644 index 000000000..43a91eb0e --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_CHARGER_QCOM_SMBB @@ -0,0 +1 @@ +CONFIG_CHARGER_QCOM_SMBB=m diff --git a/baseconfig/arm/arm64/CONFIG_CRYPTO_AES_ARM64 b/baseconfig/arm/arm64/CONFIG_CRYPTO_AES_ARM64 index 113c72b8c..dd0ae2c1d 100644 --- a/baseconfig/arm/arm64/CONFIG_CRYPTO_AES_ARM64 +++ b/baseconfig/arm/arm64/CONFIG_CRYPTO_AES_ARM64 @@ -1 +1 @@ -CONFIG_CRYPTO_AES_ARM64=m +CONFIG_CRYPTO_AES_ARM64=y diff --git a/baseconfig/arm/arm64/CONFIG_DMI b/baseconfig/arm/arm64/CONFIG_DMI deleted file mode 100644 index f961d1678..000000000 --- a/baseconfig/arm/arm64/CONFIG_DMI +++ /dev/null @@ -1 +0,0 @@ -CONFIG_DMI=y diff --git a/baseconfig/arm/arm64/CONFIG_DMIID b/baseconfig/arm/arm64/CONFIG_DMIID deleted file mode 100644 index d0ea3622a..000000000 --- a/baseconfig/arm/arm64/CONFIG_DMIID +++ /dev/null @@ -1 +0,0 @@ -CONFIG_DMIID=y diff --git a/baseconfig/arm/arm64/CONFIG_DMI_SYSFS b/baseconfig/arm/arm64/CONFIG_DMI_SYSFS deleted file mode 100644 index 76565caf8..000000000 --- a/baseconfig/arm/arm64/CONFIG_DMI_SYSFS +++ /dev/null @@ -1 +0,0 @@ -CONFIG_DMI_SYSFS=y diff --git a/baseconfig/arm/arm64/CONFIG_GPIO_THUNDERX b/baseconfig/arm/arm64/CONFIG_GPIO_THUNDERX new file mode 100644 index 000000000..6895cc045 --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_GPIO_THUNDERX @@ -0,0 +1 @@ +CONFIG_GPIO_THUNDERX=m diff --git a/baseconfig/arm/CONFIG_MFD_SPMI_PMIC b/baseconfig/arm/arm64/CONFIG_MFD_SPMI_PMIC similarity index 100% rename from baseconfig/arm/CONFIG_MFD_SPMI_PMIC rename to baseconfig/arm/arm64/CONFIG_MFD_SPMI_PMIC diff --git a/baseconfig/arm/arm64/CONFIG_MMC_QCOM_DML b/baseconfig/arm/arm64/CONFIG_MMC_QCOM_DML index 059d0d4f2..48facf367 100644 --- a/baseconfig/arm/arm64/CONFIG_MMC_QCOM_DML +++ b/baseconfig/arm/arm64/CONFIG_MMC_QCOM_DML @@ -1 +1 @@ -CONFIG_MMC_QCOM_DML=m +CONFIG_MMC_QCOM_DML=y diff --git a/baseconfig/arm/arm64/CONFIG_NET_VENDOR_SNI b/baseconfig/arm/arm64/CONFIG_NET_VENDOR_SNI new file mode 100644 index 000000000..bb77206de --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_NET_VENDOR_SNI @@ -0,0 +1 @@ +CONFIG_NET_VENDOR_SNI=y diff --git a/baseconfig/arm/arm64/CONFIG_PARPORT_PC b/baseconfig/arm/arm64/CONFIG_PARPORT_PC deleted file mode 100644 index e2a0d3656..000000000 --- a/baseconfig/arm/arm64/CONFIG_PARPORT_PC +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PARPORT_PC is not set diff --git a/baseconfig/CONFIG_PATA_ACPI b/baseconfig/arm/arm64/CONFIG_PATA_ACPI similarity index 100% rename from baseconfig/CONFIG_PATA_ACPI rename to baseconfig/arm/arm64/CONFIG_PATA_ACPI diff --git a/baseconfig/arm/arm64/CONFIG_PCIE_DW_HOST_ECAM b/baseconfig/arm/arm64/CONFIG_PCIE_DW_HOST_ECAM new file mode 100644 index 000000000..cdb6169bd --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_PCIE_DW_HOST_ECAM @@ -0,0 +1 @@ +CONFIG_PCIE_DW_HOST_ECAM=y diff --git a/baseconfig/arm/arm64/CONFIG_PHY_MVEBU_CP110_COMPHY b/baseconfig/arm/arm64/CONFIG_PHY_MVEBU_CP110_COMPHY new file mode 100644 index 000000000..1902b0c1f --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_PHY_MVEBU_CP110_COMPHY @@ -0,0 +1 @@ +CONFIG_PHY_MVEBU_CP110_COMPHY=m diff --git a/baseconfig/arm/arm64/CONFIG_RANDOMIZE_BASE b/baseconfig/arm/arm64/CONFIG_RANDOMIZE_BASE index 097a2d3e7..20610a95a 100644 --- a/baseconfig/arm/arm64/CONFIG_RANDOMIZE_BASE +++ b/baseconfig/arm/arm64/CONFIG_RANDOMIZE_BASE @@ -1 +1 @@ -# CONFIG_RANDOMIZE_BASE is not set +CONFIG_RANDOMIZE_BASE=y diff --git a/baseconfig/arm/arm64/CONFIG_RANDOMIZE_MODULE_REGION_FULL b/baseconfig/arm/arm64/CONFIG_RANDOMIZE_MODULE_REGION_FULL new file mode 100644 index 000000000..7645a371e --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_RANDOMIZE_MODULE_REGION_FULL @@ -0,0 +1 @@ +CONFIG_RANDOMIZE_MODULE_REGION_FULL=y diff --git a/baseconfig/arm/arm64/CONFIG_RELOCATABLE b/baseconfig/arm/arm64/CONFIG_RELOCATABLE index ff7e13901..36808edb3 100644 --- a/baseconfig/arm/arm64/CONFIG_RELOCATABLE +++ b/baseconfig/arm/arm64/CONFIG_RELOCATABLE @@ -1 +1 @@ -# CONFIG_RELOCATABLE is not set +CONFIG_RELOCATABLE=y diff --git a/baseconfig/arm/arm64/CONFIG_SNI_NETSEC b/baseconfig/arm/arm64/CONFIG_SNI_NETSEC new file mode 100644 index 000000000..c348519ff --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_SNI_NETSEC @@ -0,0 +1 @@ +CONFIG_SNI_NETSEC=m diff --git a/baseconfig/arm/arm64/CONFIG_SOCIONEXT_SYNQUACER_PREITS b/baseconfig/arm/arm64/CONFIG_SOCIONEXT_SYNQUACER_PREITS new file mode 100644 index 000000000..ded5c358e --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_SOCIONEXT_SYNQUACER_PREITS @@ -0,0 +1 @@ +CONFIG_SOCIONEXT_SYNQUACER_PREITS=y diff --git a/baseconfig/arm/arm64/CONFIG_USB_CONFIGFS_F_LB_SS b/baseconfig/arm/arm64/CONFIG_USB_CONFIGFS_F_LB_SS new file mode 100644 index 000000000..213edb5a1 --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_USB_CONFIGFS_F_LB_SS @@ -0,0 +1 @@ +# CONFIG_USB_CONFIGFS_F_LB_SS is not set diff --git a/baseconfig/arm/arm64/CONFIG_VIDEO_QCOM_CAMSS b/baseconfig/arm/arm64/CONFIG_VIDEO_QCOM_CAMSS new file mode 100644 index 000000000..5e2512c4c --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_VIDEO_QCOM_CAMSS @@ -0,0 +1 @@ +CONFIG_VIDEO_QCOM_CAMSS=m diff --git a/baseconfig/arm/arm64/CONFIG_VMAP_STACK b/baseconfig/arm/arm64/CONFIG_VMAP_STACK new file mode 100644 index 000000000..8bd986875 --- /dev/null +++ b/baseconfig/arm/arm64/CONFIG_VMAP_STACK @@ -0,0 +1 @@ +CONFIG_VMAP_STACK=y diff --git a/baseconfig/arm/CONFIG_DRM_SUN4I_BACKEND b/baseconfig/arm/armv7/CONFIG_DRM_SUN4I_BACKEND similarity index 100% rename from baseconfig/arm/CONFIG_DRM_SUN4I_BACKEND rename to baseconfig/arm/armv7/CONFIG_DRM_SUN4I_BACKEND diff --git a/baseconfig/arm/armv7/CONFIG_DRM_SUN4I_HDMI_CEC b/baseconfig/arm/armv7/CONFIG_DRM_SUN4I_HDMI_CEC new file mode 100644 index 000000000..8ba73409c --- /dev/null +++ b/baseconfig/arm/armv7/CONFIG_DRM_SUN4I_HDMI_CEC @@ -0,0 +1 @@ +# CONFIG_DRM_SUN4I_HDMI_CEC is not set diff --git a/baseconfig/arm/armv7/CONFIG_MMC_QCOM_DML b/baseconfig/arm/armv7/CONFIG_MMC_QCOM_DML deleted file mode 100644 index 059d0d4f2..000000000 --- a/baseconfig/arm/armv7/CONFIG_MMC_QCOM_DML +++ /dev/null @@ -1 +0,0 @@ -CONFIG_MMC_QCOM_DML=m diff --git a/baseconfig/arm/armv7/CONFIG_OMAP2_DSS_DEBUG b/baseconfig/arm/armv7/CONFIG_OMAP2_DSS_DEBUG deleted file mode 100644 index 8b8ba13e8..000000000 --- a/baseconfig/arm/armv7/CONFIG_OMAP2_DSS_DEBUG +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_OMAP2_DSS_DEBUG is not set diff --git a/baseconfig/arm/armv7/CONFIG_PATA_FTIDE010 b/baseconfig/arm/armv7/CONFIG_PATA_FTIDE010 deleted file mode 100644 index c20fa4d0f..000000000 --- a/baseconfig/arm/armv7/CONFIG_PATA_FTIDE010 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PATA_FTIDE010 is not set diff --git a/baseconfig/arm/armv7/CONFIG_PINCTRL_BCM281XX b/baseconfig/arm/armv7/CONFIG_PINCTRL_BCM281XX deleted file mode 100644 index 9963aedf7..000000000 --- a/baseconfig/arm/armv7/CONFIG_PINCTRL_BCM281XX +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PINCTRL_BCM281XX is not set diff --git a/baseconfig/arm/armv7/CONFIG_PINCTRL_IMX35 b/baseconfig/arm/armv7/CONFIG_PINCTRL_IMX35 deleted file mode 100644 index c9a64229e..000000000 --- a/baseconfig/arm/armv7/CONFIG_PINCTRL_IMX35 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PINCTRL_IMX35 is not set diff --git a/baseconfig/arm/armv7/CONFIG_PWM_TIECAP b/baseconfig/arm/armv7/CONFIG_PWM_TIECAP new file mode 100644 index 000000000..84f1e9b57 --- /dev/null +++ b/baseconfig/arm/armv7/CONFIG_PWM_TIECAP @@ -0,0 +1 @@ +CONFIG_PWM_TIECAP=m diff --git a/baseconfig/arm/armv7/CONFIG_RTC_DRV_ARMADA38X b/baseconfig/arm/armv7/CONFIG_RTC_DRV_ARMADA38X deleted file mode 100644 index 7dcdafcbb..000000000 --- a/baseconfig/arm/armv7/CONFIG_RTC_DRV_ARMADA38X +++ /dev/null @@ -1 +0,0 @@ -CONFIG_RTC_DRV_ARMADA38X=m diff --git a/baseconfig/arm/armv7/CONFIG_SUN4I_A10_CCU b/baseconfig/arm/armv7/CONFIG_SUN4I_A10_CCU new file mode 100644 index 000000000..3b2ba681a --- /dev/null +++ b/baseconfig/arm/armv7/CONFIG_SUN4I_A10_CCU @@ -0,0 +1 @@ +CONFIG_SUN4I_A10_CCU=y diff --git a/baseconfig/arm/armv7/CONFIG_SUN8I_A83T_CCU b/baseconfig/arm/armv7/CONFIG_SUN8I_A83T_CCU new file mode 100644 index 000000000..a4e88a43c --- /dev/null +++ b/baseconfig/arm/armv7/CONFIG_SUN8I_A83T_CCU @@ -0,0 +1 @@ +CONFIG_SUN8I_A83T_CCU=y diff --git a/baseconfig/arm/armv7/CONFIG_SUN8I_DE2_CCU b/baseconfig/arm/armv7/CONFIG_SUN8I_DE2_CCU new file mode 100644 index 000000000..1729d1f68 --- /dev/null +++ b/baseconfig/arm/armv7/CONFIG_SUN8I_DE2_CCU @@ -0,0 +1 @@ +CONFIG_SUN8I_DE2_CCU=y diff --git a/baseconfig/arm/armv7/CONFIG_SUN8I_R40_CCU b/baseconfig/arm/armv7/CONFIG_SUN8I_R40_CCU new file mode 100644 index 000000000..149900927 --- /dev/null +++ b/baseconfig/arm/armv7/CONFIG_SUN8I_R40_CCU @@ -0,0 +1 @@ +CONFIG_SUN8I_R40_CCU=y diff --git a/baseconfig/arm/armv7/armv7/CONFIG_BATTERY_BQ27XXX_HDQ b/baseconfig/arm/armv7/armv7/CONFIG_BATTERY_BQ27XXX_HDQ new file mode 100644 index 000000000..2be078588 --- /dev/null +++ b/baseconfig/arm/armv7/armv7/CONFIG_BATTERY_BQ27XXX_HDQ @@ -0,0 +1 @@ +CONFIG_BATTERY_BQ27XXX_HDQ=m diff --git a/baseconfig/arm/armv7/armv7/CONFIG_CHARGER_QCOM_SMBB b/baseconfig/arm/armv7/armv7/CONFIG_CHARGER_QCOM_SMBB new file mode 100644 index 000000000..43a91eb0e --- /dev/null +++ b/baseconfig/arm/armv7/armv7/CONFIG_CHARGER_QCOM_SMBB @@ -0,0 +1 @@ +CONFIG_CHARGER_QCOM_SMBB=m diff --git a/baseconfig/arm/armv7/armv7/CONFIG_IMX_REMOTEPROC b/baseconfig/arm/armv7/armv7/CONFIG_IMX_REMOTEPROC new file mode 100644 index 000000000..53983d8af --- /dev/null +++ b/baseconfig/arm/armv7/armv7/CONFIG_IMX_REMOTEPROC @@ -0,0 +1 @@ +CONFIG_IMX_REMOTEPROC=m diff --git a/baseconfig/arm/armv7/armv7/CONFIG_MFD_SPMI_PMIC b/baseconfig/arm/armv7/armv7/CONFIG_MFD_SPMI_PMIC new file mode 100644 index 000000000..6360fee39 --- /dev/null +++ b/baseconfig/arm/armv7/armv7/CONFIG_MFD_SPMI_PMIC @@ -0,0 +1 @@ +CONFIG_MFD_SPMI_PMIC=m diff --git a/baseconfig/arm/armv7/armv7/CONFIG_MMC_QCOM_DML b/baseconfig/arm/armv7/armv7/CONFIG_MMC_QCOM_DML index 059d0d4f2..48facf367 100644 --- a/baseconfig/arm/armv7/armv7/CONFIG_MMC_QCOM_DML +++ b/baseconfig/arm/armv7/armv7/CONFIG_MMC_QCOM_DML @@ -1 +1 @@ -CONFIG_MMC_QCOM_DML=m +CONFIG_MMC_QCOM_DML=y diff --git a/baseconfig/arm/armv7/armv7/CONFIG_TI_SYSCON_RESET b/baseconfig/arm/armv7/armv7/CONFIG_TI_SYSCON_RESET deleted file mode 100644 index defe64498..000000000 --- a/baseconfig/arm/armv7/armv7/CONFIG_TI_SYSCON_RESET +++ /dev/null @@ -1 +0,0 @@ -CONFIG_TI_SYSCON_RESET=m diff --git a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA b/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA deleted file mode 100644 index 0b76e3525..000000000 --- a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA +++ /dev/null @@ -1 +0,0 @@ -CONFIG_USB_CHIPIDEA=m diff --git a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_HOST b/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_HOST deleted file mode 100644 index 1c14a4a6c..000000000 --- a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_HOST +++ /dev/null @@ -1 +0,0 @@ -CONFIG_USB_CHIPIDEA_HOST=y diff --git a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_UDC b/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_UDC deleted file mode 100644 index 320052607..000000000 --- a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_UDC +++ /dev/null @@ -1 +0,0 @@ -CONFIG_USB_CHIPIDEA_UDC=y diff --git a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_ULPI b/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_ULPI deleted file mode 100644 index d1a5cf9eb..000000000 --- a/baseconfig/arm/armv7/armv7/CONFIG_USB_CHIPIDEA_ULPI +++ /dev/null @@ -1 +0,0 @@ -CONFIG_USB_CHIPIDEA_ULPI=y diff --git a/baseconfig/arm/armv7/armv7/CONFIG_VIDEO_QCOM_CAMSS b/baseconfig/arm/armv7/armv7/CONFIG_VIDEO_QCOM_CAMSS new file mode 100644 index 000000000..5e2512c4c --- /dev/null +++ b/baseconfig/arm/armv7/armv7/CONFIG_VIDEO_QCOM_CAMSS @@ -0,0 +1 @@ +CONFIG_VIDEO_QCOM_CAMSS=m diff --git a/baseconfig/arm/armv7/lpae/CONFIG_SND_SOC_TEGRA20_DAS b/baseconfig/arm/armv7/lpae/CONFIG_SND_SOC_TEGRA20_DAS deleted file mode 100644 index 71a38a48c..000000000 --- a/baseconfig/arm/armv7/lpae/CONFIG_SND_SOC_TEGRA20_DAS +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_SND_SOC_TEGRA20_DAS is not set diff --git a/baseconfig/arm/armv7/lpae/CONFIG_TI_SYSCON_RESET b/baseconfig/arm/armv7/lpae/CONFIG_TI_SYSCON_RESET deleted file mode 100644 index defe64498..000000000 --- a/baseconfig/arm/armv7/lpae/CONFIG_TI_SYSCON_RESET +++ /dev/null @@ -1 +0,0 @@ -CONFIG_TI_SYSCON_RESET=m diff --git a/baseconfig/powerpc/CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE b/baseconfig/powerpc/CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE index bbbf7d364..e7fe50c39 100644 --- a/baseconfig/powerpc/CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE +++ b/baseconfig/powerpc/CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE @@ -1 +1 @@ -CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y +# CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is not set diff --git a/baseconfig/powerpc/CONFIG_PPC_MEMTRACE b/baseconfig/powerpc/CONFIG_PPC_MEMTRACE new file mode 100644 index 000000000..c783714d8 --- /dev/null +++ b/baseconfig/powerpc/CONFIG_PPC_MEMTRACE @@ -0,0 +1 @@ +# CONFIG_PPC_MEMTRACE is not set diff --git a/baseconfig/powerpc/CONFIG_PPC_VAS b/baseconfig/powerpc/CONFIG_PPC_VAS new file mode 100644 index 000000000..ec767da00 --- /dev/null +++ b/baseconfig/powerpc/CONFIG_PPC_VAS @@ -0,0 +1 @@ +CONFIG_PPC_VAS=y diff --git a/baseconfig/powerpc/CONFIG_SENSORS_IBM_CFFPS b/baseconfig/powerpc/CONFIG_SENSORS_IBM_CFFPS new file mode 100644 index 000000000..31f260384 --- /dev/null +++ b/baseconfig/powerpc/CONFIG_SENSORS_IBM_CFFPS @@ -0,0 +1 @@ +CONFIG_SENSORS_IBM_CFFPS=m diff --git a/baseconfig/powerpc/CONFIG_SWIOTLB b/baseconfig/powerpc/CONFIG_SWIOTLB index 5405b65b4..ac62bf35e 100644 --- a/baseconfig/powerpc/CONFIG_SWIOTLB +++ b/baseconfig/powerpc/CONFIG_SWIOTLB @@ -1 +1 @@ -CONFIG_SWIOTLB=y +# CONFIG_SWIOTLB is not set diff --git a/baseconfig/powerpc/powerpc64p7/CONFIG_CPU_LITTLE_ENDIAN b/baseconfig/powerpc/powerpc64p7/CONFIG_CPU_LITTLE_ENDIAN deleted file mode 100644 index 57d623ff2..000000000 --- a/baseconfig/powerpc/powerpc64p7/CONFIG_CPU_LITTLE_ENDIAN +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_CPU_LITTLE_ENDIAN is not set diff --git a/baseconfig/powerpc/powerpc64p7/CONFIG_GENERIC_PHY b/baseconfig/powerpc/powerpc64p7/CONFIG_GENERIC_PHY deleted file mode 100644 index 40cd1a4f5..000000000 --- a/baseconfig/powerpc/powerpc64p7/CONFIG_GENERIC_PHY +++ /dev/null @@ -1 +0,0 @@ -CONFIG_GENERIC_PHY=y diff --git a/baseconfig/powerpc/powerpc64p7/CONFIG_I2C_MUX b/baseconfig/powerpc/powerpc64p7/CONFIG_I2C_MUX deleted file mode 100644 index 6982ed98a..000000000 --- a/baseconfig/powerpc/powerpc64p7/CONFIG_I2C_MUX +++ /dev/null @@ -1 +0,0 @@ -CONFIG_I2C_MUX=m diff --git a/baseconfig/powerpc/powerpc64p7/CONFIG_MFD_CORE b/baseconfig/powerpc/powerpc64p7/CONFIG_MFD_CORE deleted file mode 100644 index c8855e8a0..000000000 --- a/baseconfig/powerpc/powerpc64p7/CONFIG_MFD_CORE +++ /dev/null @@ -1 +0,0 @@ -CONFIG_MFD_CORE=m diff --git a/baseconfig/powerpc/powerpc64p7/CONFIG_POWER7_CPU b/baseconfig/powerpc/powerpc64p7/CONFIG_POWER7_CPU deleted file mode 100644 index 40eb65bc2..000000000 --- a/baseconfig/powerpc/powerpc64p7/CONFIG_POWER7_CPU +++ /dev/null @@ -1 +0,0 @@ -CONFIG_POWER7_CPU=y diff --git a/baseconfig/powerpc/powerpc64p7/CONFIG_SERIAL_CORE b/baseconfig/powerpc/powerpc64p7/CONFIG_SERIAL_CORE deleted file mode 100644 index 32ecde504..000000000 --- a/baseconfig/powerpc/powerpc64p7/CONFIG_SERIAL_CORE +++ /dev/null @@ -1 +0,0 @@ -CONFIG_SERIAL_CORE=m diff --git a/baseconfig/s390x/CONFIG_BLK_CPQ_CISS_DA b/baseconfig/s390x/CONFIG_BLK_CPQ_CISS_DA deleted file mode 100644 index 2e6c723ac..000000000 --- a/baseconfig/s390x/CONFIG_BLK_CPQ_CISS_DA +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_BLK_CPQ_CISS_DA is not set diff --git a/baseconfig/s390x/CONFIG_CMA b/baseconfig/s390x/CONFIG_CMA new file mode 100644 index 000000000..309c9e771 --- /dev/null +++ b/baseconfig/s390x/CONFIG_CMA @@ -0,0 +1 @@ +CONFIG_CMA=y diff --git a/baseconfig/s390x/CONFIG_CMA_AREAS b/baseconfig/s390x/CONFIG_CMA_AREAS new file mode 100644 index 000000000..5474a48e9 --- /dev/null +++ b/baseconfig/s390x/CONFIG_CMA_AREAS @@ -0,0 +1 @@ +CONFIG_CMA_AREAS=7 diff --git a/baseconfig/s390x/CONFIG_CMA_DEBUG b/baseconfig/s390x/CONFIG_CMA_DEBUG new file mode 100644 index 000000000..64ff80c56 --- /dev/null +++ b/baseconfig/s390x/CONFIG_CMA_DEBUG @@ -0,0 +1 @@ +# CONFIG_CMA_DEBUG is not set diff --git a/baseconfig/s390x/CONFIG_CMA_DEBUGFS b/baseconfig/s390x/CONFIG_CMA_DEBUGFS new file mode 100644 index 000000000..fba89903a --- /dev/null +++ b/baseconfig/s390x/CONFIG_CMA_DEBUGFS @@ -0,0 +1 @@ +# CONFIG_CMA_DEBUGFS is not set diff --git a/baseconfig/s390x/CONFIG_I2C_PARPORT b/baseconfig/s390x/CONFIG_I2C_PARPORT deleted file mode 100644 index 87b55caf2..000000000 --- a/baseconfig/s390x/CONFIG_I2C_PARPORT +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_I2C_PARPORT is not set diff --git a/baseconfig/s390x/CONFIG_I2C_PARPORT_LIGHT b/baseconfig/s390x/CONFIG_I2C_PARPORT_LIGHT deleted file mode 100644 index e18239222..000000000 --- a/baseconfig/s390x/CONFIG_I2C_PARPORT_LIGHT +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_I2C_PARPORT_LIGHT is not set diff --git a/baseconfig/s390x/CONFIG_MFD_BD9571MWV b/baseconfig/s390x/CONFIG_MFD_BD9571MWV new file mode 100644 index 000000000..d321ad3c6 --- /dev/null +++ b/baseconfig/s390x/CONFIG_MFD_BD9571MWV @@ -0,0 +1 @@ +# CONFIG_MFD_BD9571MWV is not set diff --git a/baseconfig/s390x/CONFIG_MFD_RTSX_USB b/baseconfig/s390x/CONFIG_MFD_RTSX_USB new file mode 100644 index 000000000..b6efa65e7 --- /dev/null +++ b/baseconfig/s390x/CONFIG_MFD_RTSX_USB @@ -0,0 +1 @@ +# CONFIG_MFD_RTSX_USB is not set diff --git a/baseconfig/s390x/CONFIG_MFD_TPS68470 b/baseconfig/s390x/CONFIG_MFD_TPS68470 new file mode 100644 index 000000000..e82f415aa --- /dev/null +++ b/baseconfig/s390x/CONFIG_MFD_TPS68470 @@ -0,0 +1 @@ +# CONFIG_MFD_TPS68470 is not set diff --git a/baseconfig/s390x/CONFIG_MFD_VIPERBOARD b/baseconfig/s390x/CONFIG_MFD_VIPERBOARD new file mode 100644 index 000000000..1d4d00579 --- /dev/null +++ b/baseconfig/s390x/CONFIG_MFD_VIPERBOARD @@ -0,0 +1 @@ +# CONFIG_MFD_VIPERBOARD is not set diff --git a/baseconfig/s390x/CONFIG_PARPORT b/baseconfig/s390x/CONFIG_PARPORT deleted file mode 100644 index 9dd8f33af..000000000 --- a/baseconfig/s390x/CONFIG_PARPORT +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PARPORT is not set diff --git a/baseconfig/s390x/CONFIG_VMCP_CMA_SIZE b/baseconfig/s390x/CONFIG_VMCP_CMA_SIZE new file mode 100644 index 000000000..aee0667ac --- /dev/null +++ b/baseconfig/s390x/CONFIG_VMCP_CMA_SIZE @@ -0,0 +1 @@ +CONFIG_VMCP_CMA_SIZE=4 diff --git a/baseconfig/x86/CONFIG_ATA_ACPI b/baseconfig/x86/CONFIG_ATA_ACPI new file mode 100644 index 000000000..a0be76e56 --- /dev/null +++ b/baseconfig/x86/CONFIG_ATA_ACPI @@ -0,0 +1 @@ +CONFIG_ATA_ACPI=y diff --git a/baseconfig/x86/CONFIG_CONFIG_PINCTRL_LEWISBURG b/baseconfig/x86/CONFIG_CONFIG_PINCTRL_LEWISBURG new file mode 100644 index 000000000..c2c51192e --- /dev/null +++ b/baseconfig/x86/CONFIG_CONFIG_PINCTRL_LEWISBURG @@ -0,0 +1 @@ +CONFIG_PINCTRL_LEWISBURG=m diff --git a/baseconfig/x86/CONFIG_HID_ASUS b/baseconfig/x86/CONFIG_HID_ASUS new file mode 100644 index 000000000..efc1ef4f8 --- /dev/null +++ b/baseconfig/x86/CONFIG_HID_ASUS @@ -0,0 +1 @@ +CONFIG_HID_ASUS=m diff --git a/baseconfig/x86/CONFIG_HYPERV_VSOCKETS b/baseconfig/x86/CONFIG_HYPERV_VSOCKETS new file mode 100644 index 000000000..bd21cd675 --- /dev/null +++ b/baseconfig/x86/CONFIG_HYPERV_VSOCKETS @@ -0,0 +1 @@ +CONFIG_HYPERV_VSOCKETS=m diff --git a/baseconfig/CONFIG_I2C_PARPORT b/baseconfig/x86/CONFIG_I2C_PARPORT similarity index 100% rename from baseconfig/CONFIG_I2C_PARPORT rename to baseconfig/x86/CONFIG_I2C_PARPORT diff --git a/baseconfig/x86/CONFIG_I2C_PARPORT_LIGHT b/baseconfig/x86/CONFIG_I2C_PARPORT_LIGHT new file mode 100644 index 000000000..1dbc68883 --- /dev/null +++ b/baseconfig/x86/CONFIG_I2C_PARPORT_LIGHT @@ -0,0 +1 @@ +CONFIG_I2C_PARPORT_LIGHT=m diff --git a/baseconfig/x86/CONFIG_INTEL_RDT b/baseconfig/x86/CONFIG_INTEL_RDT new file mode 100644 index 000000000..0dcef9a32 --- /dev/null +++ b/baseconfig/x86/CONFIG_INTEL_RDT @@ -0,0 +1 @@ +CONFIG_INTEL_RDT=y diff --git a/baseconfig/x86/CONFIG_MAXSMP b/baseconfig/x86/CONFIG_MAXSMP index 8d0fa581d..d0d71de53 100644 --- a/baseconfig/x86/CONFIG_MAXSMP +++ b/baseconfig/x86/CONFIG_MAXSMP @@ -1 +1 @@ -CONFIG_MAXSMP=y +# CONFIG_MAXSMP is not set diff --git a/baseconfig/x86/CONFIG_MMC_TOSHIBA_PCI b/baseconfig/x86/CONFIG_MMC_TOSHIBA_PCI new file mode 100644 index 000000000..9372cd4fe --- /dev/null +++ b/baseconfig/x86/CONFIG_MMC_TOSHIBA_PCI @@ -0,0 +1 @@ +CONFIG_MMC_TOSHIBA_PCI=m diff --git a/baseconfig/x86/CONFIG_PARPORT b/baseconfig/x86/CONFIG_PARPORT new file mode 100644 index 000000000..589156958 --- /dev/null +++ b/baseconfig/x86/CONFIG_PARPORT @@ -0,0 +1 @@ +CONFIG_PARPORT=m diff --git a/baseconfig/CONFIG_PARPORT_1284 b/baseconfig/x86/CONFIG_PARPORT_1284 similarity index 100% rename from baseconfig/CONFIG_PARPORT_1284 rename to baseconfig/x86/CONFIG_PARPORT_1284 diff --git a/baseconfig/CONFIG_PARPORT_AX88796 b/baseconfig/x86/CONFIG_PARPORT_AX88796 similarity index 100% rename from baseconfig/CONFIG_PARPORT_AX88796 rename to baseconfig/x86/CONFIG_PARPORT_AX88796 diff --git a/baseconfig/x86/CONFIG_PARPORT_PC b/baseconfig/x86/CONFIG_PARPORT_PC new file mode 100644 index 000000000..b9aa6e8ca --- /dev/null +++ b/baseconfig/x86/CONFIG_PARPORT_PC @@ -0,0 +1 @@ +CONFIG_PARPORT_PC=m diff --git a/baseconfig/CONFIG_PARPORT_PC_FIFO b/baseconfig/x86/CONFIG_PARPORT_PC_FIFO similarity index 100% rename from baseconfig/CONFIG_PARPORT_PC_FIFO rename to baseconfig/x86/CONFIG_PARPORT_PC_FIFO diff --git a/baseconfig/CONFIG_PARPORT_PC_PCMCIA b/baseconfig/x86/CONFIG_PARPORT_PC_PCMCIA similarity index 100% rename from baseconfig/CONFIG_PARPORT_PC_PCMCIA rename to baseconfig/x86/CONFIG_PARPORT_PC_PCMCIA diff --git a/baseconfig/CONFIG_PARPORT_PC_SUPERIO b/baseconfig/x86/CONFIG_PARPORT_PC_SUPERIO similarity index 100% rename from baseconfig/CONFIG_PARPORT_PC_SUPERIO rename to baseconfig/x86/CONFIG_PARPORT_PC_SUPERIO diff --git a/baseconfig/CONFIG_PARPORT_SERIAL b/baseconfig/x86/CONFIG_PARPORT_SERIAL similarity index 100% rename from baseconfig/CONFIG_PARPORT_SERIAL rename to baseconfig/x86/CONFIG_PARPORT_SERIAL diff --git a/baseconfig/x86/CONFIG_PATA_ACPI b/baseconfig/x86/CONFIG_PATA_ACPI new file mode 100644 index 000000000..c3bc7866f --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_ACPI @@ -0,0 +1 @@ +CONFIG_PATA_ACPI=m diff --git a/baseconfig/x86/CONFIG_PATA_ATIIXP b/baseconfig/x86/CONFIG_PATA_ATIIXP new file mode 100644 index 000000000..0089d45c9 --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_ATIIXP @@ -0,0 +1 @@ +CONFIG_PATA_ATIIXP=m diff --git a/baseconfig/x86/CONFIG_PATA_MPIIX b/baseconfig/x86/CONFIG_PATA_MPIIX new file mode 100644 index 000000000..a29c081f6 --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_MPIIX @@ -0,0 +1 @@ +CONFIG_PATA_MPIIX=m diff --git a/baseconfig/x86/CONFIG_PATA_OLDPIIX b/baseconfig/x86/CONFIG_PATA_OLDPIIX new file mode 100644 index 000000000..a3a6f6f6f --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_OLDPIIX @@ -0,0 +1 @@ +CONFIG_PATA_OLDPIIX=m diff --git a/baseconfig/x86/CONFIG_PATA_SCH b/baseconfig/x86/CONFIG_PATA_SCH new file mode 100644 index 000000000..2b0924997 --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_SCH @@ -0,0 +1 @@ +CONFIG_PATA_SCH=m diff --git a/baseconfig/x86/CONFIG_PATA_TOSHIBA b/baseconfig/x86/CONFIG_PATA_TOSHIBA new file mode 100644 index 000000000..1fe4524d6 --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_TOSHIBA @@ -0,0 +1 @@ +CONFIG_PATA_TOSHIBA=m diff --git a/baseconfig/x86/CONFIG_PATA_TRIFLEX b/baseconfig/x86/CONFIG_PATA_TRIFLEX new file mode 100644 index 000000000..09a247f65 --- /dev/null +++ b/baseconfig/x86/CONFIG_PATA_TRIFLEX @@ -0,0 +1 @@ +CONFIG_PATA_TRIFLEX=m diff --git a/baseconfig/x86/CONFIG_PINCTRL_DENVERTON b/baseconfig/x86/CONFIG_PINCTRL_DENVERTON new file mode 100644 index 000000000..ec6b4e8e1 --- /dev/null +++ b/baseconfig/x86/CONFIG_PINCTRL_DENVERTON @@ -0,0 +1 @@ +CONFIG_PINCTRL_DENVERTON=m diff --git a/baseconfig/CONFIG_PPS_CLIENT_PARPORT b/baseconfig/x86/CONFIG_PPS_CLIENT_PARPORT similarity index 100% rename from baseconfig/CONFIG_PPS_CLIENT_PARPORT rename to baseconfig/x86/CONFIG_PPS_CLIENT_PARPORT diff --git a/baseconfig/CONFIG_SENSORS_HDAPS b/baseconfig/x86/CONFIG_SENSORS_HDAPS similarity index 100% rename from baseconfig/CONFIG_SENSORS_HDAPS rename to baseconfig/x86/CONFIG_SENSORS_HDAPS diff --git a/baseconfig/CONFIG_USB_SERIAL_MOS7715_PARPORT b/baseconfig/x86/CONFIG_USB_SERIAL_MOS7715_PARPORT similarity index 100% rename from baseconfig/CONFIG_USB_SERIAL_MOS7715_PARPORT rename to baseconfig/x86/CONFIG_USB_SERIAL_MOS7715_PARPORT diff --git a/baseconfig/x86/CONFIG_XEN_PVCALLS_BACKEND b/baseconfig/x86/CONFIG_XEN_PVCALLS_BACKEND new file mode 100644 index 000000000..3a5b2c46d --- /dev/null +++ b/baseconfig/x86/CONFIG_XEN_PVCALLS_BACKEND @@ -0,0 +1 @@ +# CONFIG_XEN_PVCALLS_BACKEND is not set diff --git a/baseconfig/x86/i686/CONFIG_PINCTRL_BCM281XX b/baseconfig/x86/i686/CONFIG_PINCTRL_BCM281XX deleted file mode 100644 index 9963aedf7..000000000 --- a/baseconfig/x86/i686/CONFIG_PINCTRL_BCM281XX +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PINCTRL_BCM281XX is not set diff --git a/baseconfig/x86/i686PAE/CONFIG_PINCTRL_BCM281XX b/baseconfig/x86/i686PAE/CONFIG_PINCTRL_BCM281XX deleted file mode 100644 index 9963aedf7..000000000 --- a/baseconfig/x86/i686PAE/CONFIG_PINCTRL_BCM281XX +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_PINCTRL_BCM281XX is not set diff --git a/baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT b/baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT new file mode 100644 index 000000000..f9eacfabc --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT @@ -0,0 +1 @@ +CONFIG_AMD_MEM_ENCRYPT=y diff --git a/baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT b/baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT new file mode 100644 index 000000000..e41f0cf8f --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT @@ -0,0 +1 @@ +# CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is not set diff --git a/baseconfig/x86/x86_64/CONFIG_DEVICE_PRIVATE b/baseconfig/x86/x86_64/CONFIG_DEVICE_PRIVATE new file mode 100644 index 000000000..ef0a4ad5b --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_DEVICE_PRIVATE @@ -0,0 +1 @@ +CONFIG_DEVICE_PRIVATE=y diff --git a/baseconfig/x86/x86_64/CONFIG_DEVICE_PUBLIC b/baseconfig/x86/x86_64/CONFIG_DEVICE_PUBLIC new file mode 100644 index 000000000..c790e941b --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_DEVICE_PUBLIC @@ -0,0 +1 @@ +CONFIG_DEVICE_PUBLIC=y diff --git a/baseconfig/x86/x86_64/CONFIG_EXTCON_GPIO b/baseconfig/x86/x86_64/CONFIG_EXTCON_GPIO deleted file mode 100644 index 87ca2bd05..000000000 --- a/baseconfig/x86/x86_64/CONFIG_EXTCON_GPIO +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_EXTCON_GPIO is not set diff --git a/baseconfig/x86/x86_64/CONFIG_EXTCON_MAX3355 b/baseconfig/x86/x86_64/CONFIG_EXTCON_MAX3355 deleted file mode 100644 index 680b5a774..000000000 --- a/baseconfig/x86/x86_64/CONFIG_EXTCON_MAX3355 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_EXTCON_MAX3355 is not set diff --git a/baseconfig/x86/x86_64/CONFIG_EXTCON_RT8973A b/baseconfig/x86/x86_64/CONFIG_EXTCON_RT8973A deleted file mode 100644 index e5f7236c9..000000000 --- a/baseconfig/x86/x86_64/CONFIG_EXTCON_RT8973A +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_EXTCON_RT8973A is not set diff --git a/baseconfig/x86/x86_64/CONFIG_EXTCON_SM5502 b/baseconfig/x86/x86_64/CONFIG_EXTCON_SM5502 deleted file mode 100644 index 916994aa9..000000000 --- a/baseconfig/x86/x86_64/CONFIG_EXTCON_SM5502 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_EXTCON_SM5502 is not set diff --git a/baseconfig/x86/x86_64/CONFIG_EXTCON_USB_GPIO b/baseconfig/x86/x86_64/CONFIG_EXTCON_USB_GPIO deleted file mode 100644 index 7a0c9af30..000000000 --- a/baseconfig/x86/x86_64/CONFIG_EXTCON_USB_GPIO +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_EXTCON_USB_GPIO is not set diff --git a/baseconfig/x86/x86_64/CONFIG_HMM_MIRROR b/baseconfig/x86/x86_64/CONFIG_HMM_MIRROR new file mode 100644 index 000000000..11dfee6c1 --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_HMM_MIRROR @@ -0,0 +1 @@ +CONFIG_HMM_MIRROR=y diff --git a/baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_CORE b/baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_CORE deleted file mode 100644 index f9cdc633b..000000000 --- a/baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_CORE +++ /dev/null @@ -1 +0,0 @@ -CONFIG_I2C_DESIGNWARE_CORE=y diff --git a/baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_PLATFORM b/baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_PLATFORM deleted file mode 100644 index 3d50a3e8a..000000000 --- a/baseconfig/x86/x86_64/CONFIG_I2C_DESIGNWARE_PLATFORM +++ /dev/null @@ -1 +0,0 @@ -CONFIG_I2C_DESIGNWARE_PLATFORM=y diff --git a/baseconfig/x86/x86_64/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT b/baseconfig/x86/x86_64/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT new file mode 100644 index 000000000..4a06cfcc2 --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT @@ -0,0 +1 @@ +CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT=y diff --git a/baseconfig/x86/x86_64/CONFIG_NR_CPUS b/baseconfig/x86/x86_64/CONFIG_NR_CPUS index 441191641..27d187f4d 100644 --- a/baseconfig/x86/x86_64/CONFIG_NR_CPUS +++ b/baseconfig/x86/x86_64/CONFIG_NR_CPUS @@ -1 +1 @@ -CONFIG_NR_CPUS=8192 +CONFIG_NR_CPUS=1024 diff --git a/baseconfig/x86/x86_64/CONFIG_X86_5LEVEL b/baseconfig/x86/x86_64/CONFIG_X86_5LEVEL new file mode 100644 index 000000000..db301f396 --- /dev/null +++ b/baseconfig/x86/x86_64/CONFIG_X86_5LEVEL @@ -0,0 +1 @@ +# CONFIG_X86_5LEVEL is not set diff --git a/bcm2837-bluetooth-support.patch b/bcm2837-bluetooth-support.patch new file mode 100644 index 000000000..c272c1efe --- /dev/null +++ b/bcm2837-bluetooth-support.patch @@ -0,0 +1,36 @@ +From 50252c318fe2fcfcbd0832fa835e7fd1fafd7d2d Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 10 Sep 2017 19:30:02 +0100 +Subject: [PATCH 2/2] ARM: dts: bcm2837-rpi-3-b: Add bcm43438 serial slave + +Add BCM43438 (bluetooth) as a slave device of uart0 (pl011/ttyAMA0). +This allows to automatically insert the bcm43438 to the bluetooth +subsystem instead of relying on userspace helpers (hciattach). + +Overwrite chosen/stdout-path to use 8250 aux uart as console. + +Signed-off-by: Loic Poulain +Signed-off-by: Peter Robinson +--- + arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +index 20725ca487f3..e4488cb3067e 100644 +--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +@@ -24,6 +29,11 @@ + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; + status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ max-speed = <2000000>; ++ }; + }; + + /* uart1 is mapped to the pin header */ +-- +2.13.5 + diff --git a/bcm2837-move-dt.patch b/bcm2837-move-dt.patch deleted file mode 100644 index 018cf81d7..000000000 --- a/bcm2837-move-dt.patch +++ /dev/null @@ -1,516 +0,0 @@ -From 3bfe25fa9f8a56c5c877c7fd854d89238787c6d8 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Wed, 26 Jul 2017 13:01:56 -0700 -Subject: ARM: dts: bcm283x: Move the BCM2837 DT contents from arm64 to arm. - -BCM2837 is somewhat unusual in that we build its DT on both arm32 and -arm64. Most devices are being run in arm32 mode. - -Having the body of the DT for 2837 separate from 2835/6 has been a -source of pain, as we often need to make changes that span both -directories simultaneously (for example, the thermal changes for 4.13, -or anything that changes the name of a node referenced by '&' from -board files). Other changes are made more complicated than they need -to be, such as the SDHOST enabling, because we have to split a single -logical change into a 283[56] half and a 2837 half. - -To fix this, make the stub board include file live in arm64 instead of -arm32, and keep all of BCM283x's contents in arm32. From here on, our -changes to DT contents can be submitted through a single tree. - -Signed-off-by: Eric Anholt -Signed-off-by: Florian Fainelli ---- - arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 42 ++++++++++- - arch/arm/boot/dts/bcm2837.dtsi | 86 ++++++++++++++++++++++ - arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi | 1 - - arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 42 +---------- - arch/arm64/boot/dts/broadcom/bcm2837.dtsi | 86 ---------------------- - .../boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi | 1 - - .../boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi | 1 - - arch/arm64/boot/dts/broadcom/bcm283x.dtsi | 1 - - 8 files changed, 128 insertions(+), 132 deletions(-) - create mode 100644 arch/arm/boot/dts/bcm2837.dtsi - delete mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi - delete mode 100644 arch/arm64/boot/dts/broadcom/bcm2837.dtsi - delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi - delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi - delete mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi - -diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts -index c72a27d..972f14d 100644 ---- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts -+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts -@@ -1 +1,41 @@ --#include "arm64/broadcom/bcm2837-rpi-3-b.dts" -+/dts-v1/; -+#include "bcm2837.dtsi" -+#include "bcm2835-rpi.dtsi" -+#include "bcm283x-rpi-smsc9514.dtsi" -+#include "bcm283x-rpi-usb-host.dtsi" -+ -+/ { -+ compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; -+ model = "Raspberry Pi 3 Model B"; -+ -+ memory { -+ reg = <0 0x40000000>; -+ }; -+ -+ leds { -+ act { -+ gpios = <&gpio 47 0>; -+ }; -+ }; -+}; -+ -+&uart1 { -+ status = "okay"; -+}; -+ -+/* SDHCI is used to control the SDIO for wireless */ -+&sdhci { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_gpio34>; -+ status = "okay"; -+ bus-width = <4>; -+ non-removable; -+}; -+ -+/* SDHOST is used to drive the SD card */ -+&sdhost { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhost_gpio48>; -+ status = "okay"; -+ bus-width = <4>; -+}; -diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi -new file mode 100644 -index 0000000..2d5de6f0 ---- /dev/null -+++ b/arch/arm/boot/dts/bcm2837.dtsi -@@ -0,0 +1,86 @@ -+#include "bcm283x.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2837"; -+ -+ soc { -+ ranges = <0x7e000000 0x3f000000 0x1000000>, -+ <0x40000000 0x40000000 0x00001000>; -+ dma-ranges = <0xc0000000 0x00000000 0x3f000000>; -+ -+ local_intc: local_intc { -+ compatible = "brcm,bcm2836-l1-intc"; -+ reg = <0x40000000 0x100>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ interrupt-parent = <&local_intc>; -+ }; -+ }; -+ -+ timer { -+ compatible = "arm,armv7-timer"; -+ interrupt-parent = <&local_intc>; -+ interrupts = <0>, // PHYS_SECURE_PPI -+ <1>, // PHYS_NONSECURE_PPI -+ <3>, // VIRT_PPI -+ <2>; // HYP_PPI -+ always-on; -+ }; -+ -+ cpus: cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53"; -+ reg = <0>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000d8>; -+ }; -+ -+ cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53"; -+ reg = <1>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000e0>; -+ }; -+ -+ cpu2: cpu@2 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53"; -+ reg = <2>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000e8>; -+ }; -+ -+ cpu3: cpu@3 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53"; -+ reg = <3>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000f0>; -+ }; -+ }; -+}; -+ -+/* Make the BCM2835-style global interrupt controller be a child of the -+ * CPU-local interrupt controller. -+ */ -+&intc { -+ compatible = "brcm,bcm2836-armctrl-ic"; -+ reg = <0x7e00b200 0x200>; -+ interrupt-parent = <&local_intc>; -+ interrupts = <8>; -+}; -+ -+&cpu_thermal { -+ coefficients = <(-538) 412000>; -+}; -+ -+/* enable thermal sensor with the correct compatible property set */ -+&thermal { -+ compatible = "brcm,bcm2837-thermal"; -+ status = "okay"; -+}; -diff --git a/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi b/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi -deleted file mode 120000 -index 3937b77..0000000 ---- a/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi -+++ /dev/null -@@ -1 +0,0 @@ --../../../../arm/boot/dts/bcm2835-rpi.dtsi -\ No newline at end of file -diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts -index 972f14d..699d340 100644 ---- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts -+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts -@@ -1,41 +1 @@ --/dts-v1/; --#include "bcm2837.dtsi" --#include "bcm2835-rpi.dtsi" --#include "bcm283x-rpi-smsc9514.dtsi" --#include "bcm283x-rpi-usb-host.dtsi" -- --/ { -- compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; -- model = "Raspberry Pi 3 Model B"; -- -- memory { -- reg = <0 0x40000000>; -- }; -- -- leds { -- act { -- gpios = <&gpio 47 0>; -- }; -- }; --}; -- --&uart1 { -- status = "okay"; --}; -- --/* SDHCI is used to control the SDIO for wireless */ --&sdhci { -- pinctrl-names = "default"; -- pinctrl-0 = <&emmc_gpio34>; -- status = "okay"; -- bus-width = <4>; -- non-removable; --}; -- --/* SDHOST is used to drive the SD card */ --&sdhost { -- pinctrl-names = "default"; -- pinctrl-0 = <&sdhost_gpio48>; -- status = "okay"; -- bus-width = <4>; --}; -+#include "arm/bcm2837-rpi-3-b.dts" -diff --git a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi b/arch/arm64/boot/dts/broadcom/bcm2837.dtsi -deleted file mode 100644 -index 2d5de6f0..0000000 ---- a/arch/arm64/boot/dts/broadcom/bcm2837.dtsi -+++ /dev/null -@@ -1,86 +0,0 @@ --#include "bcm283x.dtsi" -- --/ { -- compatible = "brcm,bcm2837"; -- -- soc { -- ranges = <0x7e000000 0x3f000000 0x1000000>, -- <0x40000000 0x40000000 0x00001000>; -- dma-ranges = <0xc0000000 0x00000000 0x3f000000>; -- -- local_intc: local_intc { -- compatible = "brcm,bcm2836-l1-intc"; -- reg = <0x40000000 0x100>; -- interrupt-controller; -- #interrupt-cells = <1>; -- interrupt-parent = <&local_intc>; -- }; -- }; -- -- timer { -- compatible = "arm,armv7-timer"; -- interrupt-parent = <&local_intc>; -- interrupts = <0>, // PHYS_SECURE_PPI -- <1>, // PHYS_NONSECURE_PPI -- <3>, // VIRT_PPI -- <2>; // HYP_PPI -- always-on; -- }; -- -- cpus: cpus { -- #address-cells = <1>; -- #size-cells = <0>; -- -- cpu0: cpu@0 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53"; -- reg = <0>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000d8>; -- }; -- -- cpu1: cpu@1 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53"; -- reg = <1>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000e0>; -- }; -- -- cpu2: cpu@2 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53"; -- reg = <2>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000e8>; -- }; -- -- cpu3: cpu@3 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53"; -- reg = <3>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000f0>; -- }; -- }; --}; -- --/* Make the BCM2835-style global interrupt controller be a child of the -- * CPU-local interrupt controller. -- */ --&intc { -- compatible = "brcm,bcm2836-armctrl-ic"; -- reg = <0x7e00b200 0x200>; -- interrupt-parent = <&local_intc>; -- interrupts = <8>; --}; -- --&cpu_thermal { -- coefficients = <(-538) 412000>; --}; -- --/* enable thermal sensor with the correct compatible property set */ --&thermal { -- compatible = "brcm,bcm2837-thermal"; -- status = "okay"; --}; -diff --git a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi -deleted file mode 120000 -index dca7c05..0000000 ---- a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi -+++ /dev/null -@@ -1 +0,0 @@ --../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi -\ No newline at end of file -diff --git a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi -deleted file mode 120000 -index cbeebe3..0000000 ---- a/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi -+++ /dev/null -@@ -1 +0,0 @@ --../../../../arm/boot/dts/bcm283x-rpi-usb-host.dtsi -\ No newline at end of file -diff --git a/arch/arm64/boot/dts/broadcom/bcm283x.dtsi b/arch/arm64/boot/dts/broadcom/bcm283x.dtsi -deleted file mode 120000 -index 5f54e4c..0000000 ---- a/arch/arm64/boot/dts/broadcom/bcm283x.dtsi -+++ /dev/null -@@ -1 +0,0 @@ --../../../../arm/boot/dts/bcm283x.dtsi -\ No newline at end of file --- -cgit v1.1 - -From 4188ea2aeb6dd8f99ab77662f463e41bc464a704 Mon Sep 17 00:00:00 2001 -From: Stefan Wahren -Date: Sun, 30 Jul 2017 19:10:32 +0200 -Subject: ARM: bcm283x: Define UART pinmuxing on board level - -Until RPI 3 and Zero W the pl011 (uart0) was always on pin 14/15. So in -order to take care of them and other boards in the future, -we need to define UART pinmuxing on board level. - -This work based on Eric Anholt's patch "ARM: bcm2385: Don't force pl011 -onto pins 14/15." and Fabian Vogt's patch "ARM64: dts: bcm2837: assign -uart0 to BT and uart1 to pin headers". - -Signed-off-by: Stefan Wahren -Reviewed-by: Eric Anholt -Signed-off-by: Eric Anholt ---- - arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 6 ++++++ - arch/arm/boot/dts/bcm2835-rpi-a.dts | 6 ++++++ - arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 6 ++++++ - arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 6 ++++++ - arch/arm/boot/dts/bcm2835-rpi-b.dts | 6 ++++++ - arch/arm/boot/dts/bcm2835-rpi-zero.dts | 6 ++++++ - arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +- - arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 6 ++++++ - arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 10 ++++++++++ - 9 files changed, 53 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts -index d070454..9f86649 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts -+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts -@@ -99,3 +99,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts -index 46d078e..4b1af06 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi-a.dts -+++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts -@@ -94,3 +94,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts -index 432088e..a846f1e 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts -+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts -@@ -101,3 +101,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts -index 4133bc2..e860964 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts -+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts -@@ -94,3 +94,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts -index 4d56fe3..5d77f3f 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi-b.dts -+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts -@@ -89,3 +89,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts -index 79a20d5..7036240 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts -+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts -@@ -103,3 +103,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi -index e55b362..e36c392 100644 ---- a/arch/arm/boot/dts/bcm2835-rpi.dtsi -+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi -@@ -39,7 +39,7 @@ - }; - - alt0: alt0 { -- brcm,pins = <4 5 7 8 9 10 11 14 15>; -+ brcm,pins = <4 5 7 8 9 10 11>; - brcm,function = ; - }; - }; -diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts -index bf19e8c..e8de414 100644 ---- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts -+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts -@@ -39,3 +39,9 @@ - &hdmi { - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; - }; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio14>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts -index 972f14d..20725ca 100644 ---- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts -+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts -@@ -19,7 +19,17 @@ - }; - }; - -+/* uart0 communicates with the BT module */ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; -+ status = "okay"; -+}; -+ -+/* uart1 is mapped to the pin header */ - &uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_gpio14>; - status = "okay"; - }; - --- -cgit v1.1 - diff --git a/bcm283x-vc4-fixes.patch b/bcm283x-vc4-fixes.patch deleted file mode 100644 index d17ff1873..000000000 --- a/bcm283x-vc4-fixes.patch +++ /dev/null @@ -1,1803 +0,0 @@ -From d74617cb4aebe5a4cb3eeda3070053ccfc36a0ae Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Tue, 25 Jul 2017 09:27:32 -0700 -Subject: [PATCH 1/6] drm/vc4: Demote user-accessible DRM_ERROR paths to - DRM_DEBUG. - -Userspace shouldn't be able to spam dmesg by passing bad arguments. -This has particularly become an issues since we started using a bad -argument to set_tiling to detect if set_tiling was supported. - -Signed-off-by: Eric Anholt -Fixes: 83753117f1de ("drm/vc4: Add get/set tiling ioctls.") -Link: https://patchwork.freedesktop.org/patch/msgid/20170725162733.28007-1-eric@anholt.net -Reviewed-by: Boris Brezillon ---- - drivers/gpu/drm/vc4/vc4_bo.c | 14 +++--- - drivers/gpu/drm/vc4/vc4_gem.c | 10 ++-- - drivers/gpu/drm/vc4/vc4_kms.c | 2 +- - drivers/gpu/drm/vc4/vc4_render_cl.c | 40 +++++++-------- - drivers/gpu/drm/vc4/vc4_validate.c | 78 +++++++++++++++--------------- - drivers/gpu/drm/vc4/vc4_validate_shaders.c | 72 +++++++++++++-------------- - 6 files changed, 108 insertions(+), 108 deletions(-) - -diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index 487f96412d35..ede80199001d 100644 ---- a/drivers/gpu/drm/vc4/vc4_bo.c -+++ b/drivers/gpu/drm/vc4/vc4_bo.c -@@ -389,7 +389,7 @@ vc4_prime_export(struct drm_device *dev, struct drm_gem_object *obj, int flags) - struct vc4_bo *bo = to_vc4_bo(obj); - - if (bo->validated_shader) { -- DRM_ERROR("Attempting to export shader BO\n"); -+ DRM_DEBUG("Attempting to export shader BO\n"); - return ERR_PTR(-EINVAL); - } - -@@ -410,7 +410,7 @@ int vc4_mmap(struct file *filp, struct vm_area_struct *vma) - bo = to_vc4_bo(gem_obj); - - if (bo->validated_shader && (vma->vm_flags & VM_WRITE)) { -- DRM_ERROR("mmaping of shader BOs for writing not allowed.\n"); -+ DRM_DEBUG("mmaping of shader BOs for writing not allowed.\n"); - return -EINVAL; - } - -@@ -435,7 +435,7 @@ int vc4_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) - struct vc4_bo *bo = to_vc4_bo(obj); - - if (bo->validated_shader && (vma->vm_flags & VM_WRITE)) { -- DRM_ERROR("mmaping of shader BOs for writing not allowed.\n"); -+ DRM_DEBUG("mmaping of shader BOs for writing not allowed.\n"); - return -EINVAL; - } - -@@ -447,7 +447,7 @@ void *vc4_prime_vmap(struct drm_gem_object *obj) - struct vc4_bo *bo = to_vc4_bo(obj); - - if (bo->validated_shader) { -- DRM_ERROR("mmaping of shader BOs not allowed.\n"); -+ DRM_DEBUG("mmaping of shader BOs not allowed.\n"); - return ERR_PTR(-EINVAL); - } - -@@ -501,7 +501,7 @@ int vc4_mmap_bo_ioctl(struct drm_device *dev, void *data, - - gem_obj = drm_gem_object_lookup(file_priv, args->handle); - if (!gem_obj) { -- DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -+ DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle); - return -EINVAL; - } - -@@ -605,7 +605,7 @@ int vc4_set_tiling_ioctl(struct drm_device *dev, void *data, - - gem_obj = drm_gem_object_lookup(file_priv, args->handle); - if (!gem_obj) { -- DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -+ DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle); - return -ENOENT; - } - bo = to_vc4_bo(gem_obj); -@@ -636,7 +636,7 @@ int vc4_get_tiling_ioctl(struct drm_device *dev, void *data, - - gem_obj = drm_gem_object_lookup(file_priv, args->handle); - if (!gem_obj) { -- DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -+ DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle); - return -ENOENT; - } - bo = to_vc4_bo(gem_obj); -diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index d5b821ad06af..a3e45e67f417 100644 ---- a/drivers/gpu/drm/vc4/vc4_gem.c -+++ b/drivers/gpu/drm/vc4/vc4_gem.c -@@ -659,7 +659,7 @@ vc4_cl_lookup_bos(struct drm_device *dev, - /* See comment on bo_index for why we have to check - * this. - */ -- DRM_ERROR("Rendering requires BOs to validate\n"); -+ DRM_DEBUG("Rendering requires BOs to validate\n"); - return -EINVAL; - } - -@@ -691,7 +691,7 @@ vc4_cl_lookup_bos(struct drm_device *dev, - struct drm_gem_object *bo = idr_find(&file_priv->object_idr, - handles[i]); - if (!bo) { -- DRM_ERROR("Failed to look up GEM BO %d: %d\n", -+ DRM_DEBUG("Failed to look up GEM BO %d: %d\n", - i, handles[i]); - ret = -EINVAL; - spin_unlock(&file_priv->table_lock); -@@ -729,7 +729,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) - args->shader_rec_count >= (UINT_MAX / - sizeof(struct vc4_shader_state)) || - temp_size < exec_size) { -- DRM_ERROR("overflow in exec arguments\n"); -+ DRM_DEBUG("overflow in exec arguments\n"); - ret = -EINVAL; - goto fail; - } -@@ -974,7 +974,7 @@ vc4_wait_bo_ioctl(struct drm_device *dev, void *data, - - gem_obj = drm_gem_object_lookup(file_priv, args->handle); - if (!gem_obj) { -- DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -+ DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle); - return -EINVAL; - } - bo = to_vc4_bo(gem_obj); -@@ -1009,7 +1009,7 @@ vc4_submit_cl_ioctl(struct drm_device *dev, void *data, - int ret = 0; - - if ((args->flags & ~VC4_SUBMIT_CL_USE_CLEAR_COLOR) != 0) { -- DRM_ERROR("Unknown flags: 0x%02x\n", args->flags); -+ DRM_DEBUG("Unknown flags: 0x%02x\n", args->flags); - return -EINVAL; - } - -diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index bc6ecdc6f104..b2c55eb09ca3 100644 ---- a/drivers/gpu/drm/vc4/vc4_kms.c -+++ b/drivers/gpu/drm/vc4/vc4_kms.c -@@ -204,7 +204,7 @@ static struct drm_framebuffer *vc4_fb_create(struct drm_device *dev, - gem_obj = drm_gem_object_lookup(file_priv, - mode_cmd->handles[0]); - if (!gem_obj) { -- DRM_ERROR("Failed to look up GEM BO %d\n", -+ DRM_DEBUG("Failed to look up GEM BO %d\n", - mode_cmd->handles[0]); - return ERR_PTR(-ENOENT); - } -diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 5dc19429d4ae..da3bfd53f0bd 100644 ---- a/drivers/gpu/drm/vc4/vc4_render_cl.c -+++ b/drivers/gpu/drm/vc4/vc4_render_cl.c -@@ -378,14 +378,14 @@ static int vc4_full_res_bounds_check(struct vc4_exec_info *exec, - u32 render_tiles_stride = DIV_ROUND_UP(exec->args->width, 32); - - if (surf->offset > obj->base.size) { -- DRM_ERROR("surface offset %d > BO size %zd\n", -+ DRM_DEBUG("surface offset %d > BO size %zd\n", - surf->offset, obj->base.size); - return -EINVAL; - } - - if ((obj->base.size - surf->offset) / VC4_TILE_BUFFER_SIZE < - render_tiles_stride * args->max_y_tile + args->max_x_tile) { -- DRM_ERROR("MSAA tile %d, %d out of bounds " -+ DRM_DEBUG("MSAA tile %d, %d out of bounds " - "(bo size %zd, offset %d).\n", - args->max_x_tile, args->max_y_tile, - obj->base.size, -@@ -401,7 +401,7 @@ static int vc4_rcl_msaa_surface_setup(struct vc4_exec_info *exec, - struct drm_vc4_submit_rcl_surface *surf) - { - if (surf->flags != 0 || surf->bits != 0) { -- DRM_ERROR("MSAA surface had nonzero flags/bits\n"); -+ DRM_DEBUG("MSAA surface had nonzero flags/bits\n"); - return -EINVAL; - } - -@@ -415,7 +415,7 @@ static int vc4_rcl_msaa_surface_setup(struct vc4_exec_info *exec, - exec->rcl_write_bo[exec->rcl_write_bo_count++] = *obj; - - if (surf->offset & 0xf) { -- DRM_ERROR("MSAA write must be 16b aligned.\n"); -+ DRM_DEBUG("MSAA write must be 16b aligned.\n"); - return -EINVAL; - } - -@@ -437,7 +437,7 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec, - int ret; - - if (surf->flags & ~VC4_SUBMIT_RCL_SURFACE_READ_IS_FULL_RES) { -- DRM_ERROR("Extra flags set\n"); -+ DRM_DEBUG("Extra flags set\n"); - return -EINVAL; - } - -@@ -453,12 +453,12 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec, - - if (surf->flags & VC4_SUBMIT_RCL_SURFACE_READ_IS_FULL_RES) { - if (surf == &exec->args->zs_write) { -- DRM_ERROR("general zs write may not be a full-res.\n"); -+ DRM_DEBUG("general zs write may not be a full-res.\n"); - return -EINVAL; - } - - if (surf->bits != 0) { -- DRM_ERROR("load/store general bits set with " -+ DRM_DEBUG("load/store general bits set with " - "full res load/store.\n"); - return -EINVAL; - } -@@ -473,19 +473,19 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec, - if (surf->bits & ~(VC4_LOADSTORE_TILE_BUFFER_TILING_MASK | - VC4_LOADSTORE_TILE_BUFFER_BUFFER_MASK | - VC4_LOADSTORE_TILE_BUFFER_FORMAT_MASK)) { -- DRM_ERROR("Unknown bits in load/store: 0x%04x\n", -+ DRM_DEBUG("Unknown bits in load/store: 0x%04x\n", - surf->bits); - return -EINVAL; - } - - if (tiling > VC4_TILING_FORMAT_LT) { -- DRM_ERROR("Bad tiling format\n"); -+ DRM_DEBUG("Bad tiling format\n"); - return -EINVAL; - } - - if (buffer == VC4_LOADSTORE_TILE_BUFFER_ZS) { - if (format != 0) { -- DRM_ERROR("No color format should be set for ZS\n"); -+ DRM_DEBUG("No color format should be set for ZS\n"); - return -EINVAL; - } - cpp = 4; -@@ -499,16 +499,16 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec, - cpp = 4; - break; - default: -- DRM_ERROR("Bad tile buffer format\n"); -+ DRM_DEBUG("Bad tile buffer format\n"); - return -EINVAL; - } - } else { -- DRM_ERROR("Bad load/store buffer %d.\n", buffer); -+ DRM_DEBUG("Bad load/store buffer %d.\n", buffer); - return -EINVAL; - } - - if (surf->offset & 0xf) { -- DRM_ERROR("load/store buffer must be 16b aligned.\n"); -+ DRM_DEBUG("load/store buffer must be 16b aligned.\n"); - return -EINVAL; - } - -@@ -533,7 +533,7 @@ vc4_rcl_render_config_surface_setup(struct vc4_exec_info *exec, - int cpp; - - if (surf->flags != 0) { -- DRM_ERROR("No flags supported on render config.\n"); -+ DRM_DEBUG("No flags supported on render config.\n"); - return -EINVAL; - } - -@@ -541,7 +541,7 @@ vc4_rcl_render_config_surface_setup(struct vc4_exec_info *exec, - VC4_RENDER_CONFIG_FORMAT_MASK | - VC4_RENDER_CONFIG_MS_MODE_4X | - VC4_RENDER_CONFIG_DECIMATE_MODE_4X)) { -- DRM_ERROR("Unknown bits in render config: 0x%04x\n", -+ DRM_DEBUG("Unknown bits in render config: 0x%04x\n", - surf->bits); - return -EINVAL; - } -@@ -556,7 +556,7 @@ vc4_rcl_render_config_surface_setup(struct vc4_exec_info *exec, - exec->rcl_write_bo[exec->rcl_write_bo_count++] = *obj; - - if (tiling > VC4_TILING_FORMAT_LT) { -- DRM_ERROR("Bad tiling format\n"); -+ DRM_DEBUG("Bad tiling format\n"); - return -EINVAL; - } - -@@ -569,7 +569,7 @@ vc4_rcl_render_config_surface_setup(struct vc4_exec_info *exec, - cpp = 4; - break; - default: -- DRM_ERROR("Bad tile buffer format\n"); -+ DRM_DEBUG("Bad tile buffer format\n"); - return -EINVAL; - } - -@@ -590,7 +590,7 @@ int vc4_get_rcl(struct drm_device *dev, struct vc4_exec_info *exec) - - if (args->min_x_tile > args->max_x_tile || - args->min_y_tile > args->max_y_tile) { -- DRM_ERROR("Bad render tile set (%d,%d)-(%d,%d)\n", -+ DRM_DEBUG("Bad render tile set (%d,%d)-(%d,%d)\n", - args->min_x_tile, args->min_y_tile, - args->max_x_tile, args->max_y_tile); - return -EINVAL; -@@ -599,7 +599,7 @@ int vc4_get_rcl(struct drm_device *dev, struct vc4_exec_info *exec) - if (has_bin && - (args->max_x_tile > exec->bin_tiles_x || - args->max_y_tile > exec->bin_tiles_y)) { -- DRM_ERROR("Render tiles (%d,%d) outside of bin config " -+ DRM_DEBUG("Render tiles (%d,%d) outside of bin config " - "(%d,%d)\n", - args->max_x_tile, args->max_y_tile, - exec->bin_tiles_x, exec->bin_tiles_y); -@@ -642,7 +642,7 @@ int vc4_get_rcl(struct drm_device *dev, struct vc4_exec_info *exec) - */ - if (!setup.color_write && !setup.zs_write && - !setup.msaa_color_write && !setup.msaa_zs_write) { -- DRM_ERROR("RCL requires color or Z/S write\n"); -+ DRM_DEBUG("RCL requires color or Z/S write\n"); - return -EINVAL; - } - -diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index 814b512c6b9a..2db485abb186 100644 ---- a/drivers/gpu/drm/vc4/vc4_validate.c -+++ b/drivers/gpu/drm/vc4/vc4_validate.c -@@ -109,7 +109,7 @@ vc4_use_bo(struct vc4_exec_info *exec, uint32_t hindex) - struct vc4_bo *bo; - - if (hindex >= exec->bo_count) { -- DRM_ERROR("BO index %d greater than BO count %d\n", -+ DRM_DEBUG("BO index %d greater than BO count %d\n", - hindex, exec->bo_count); - return NULL; - } -@@ -117,7 +117,7 @@ vc4_use_bo(struct vc4_exec_info *exec, uint32_t hindex) - bo = to_vc4_bo(&obj->base); - - if (bo->validated_shader) { -- DRM_ERROR("Trying to use shader BO as something other than " -+ DRM_DEBUG("Trying to use shader BO as something other than " - "a shader\n"); - return NULL; - } -@@ -172,7 +172,7 @@ vc4_check_tex_size(struct vc4_exec_info *exec, struct drm_gem_cma_object *fbo, - * our math. - */ - if (width > 4096 || height > 4096) { -- DRM_ERROR("Surface dimensions (%d,%d) too large", -+ DRM_DEBUG("Surface dimensions (%d,%d) too large", - width, height); - return false; - } -@@ -191,7 +191,7 @@ vc4_check_tex_size(struct vc4_exec_info *exec, struct drm_gem_cma_object *fbo, - aligned_height = round_up(height, utile_h); - break; - default: -- DRM_ERROR("buffer tiling %d unsupported\n", tiling_format); -+ DRM_DEBUG("buffer tiling %d unsupported\n", tiling_format); - return false; - } - -@@ -200,7 +200,7 @@ vc4_check_tex_size(struct vc4_exec_info *exec, struct drm_gem_cma_object *fbo, - - if (size + offset < size || - size + offset > fbo->base.size) { -- DRM_ERROR("Overflow in %dx%d (%dx%d) fbo size (%d + %d > %zd)\n", -+ DRM_DEBUG("Overflow in %dx%d (%dx%d) fbo size (%d + %d > %zd)\n", - width, height, - aligned_width, aligned_height, - size, offset, fbo->base.size); -@@ -214,7 +214,7 @@ static int - validate_flush(VALIDATE_ARGS) - { - if (!validate_bin_pos(exec, untrusted, exec->args->bin_cl_size - 1)) { -- DRM_ERROR("Bin CL must end with VC4_PACKET_FLUSH\n"); -+ DRM_DEBUG("Bin CL must end with VC4_PACKET_FLUSH\n"); - return -EINVAL; - } - exec->found_flush = true; -@@ -226,13 +226,13 @@ static int - validate_start_tile_binning(VALIDATE_ARGS) - { - if (exec->found_start_tile_binning_packet) { -- DRM_ERROR("Duplicate VC4_PACKET_START_TILE_BINNING\n"); -+ DRM_DEBUG("Duplicate VC4_PACKET_START_TILE_BINNING\n"); - return -EINVAL; - } - exec->found_start_tile_binning_packet = true; - - if (!exec->found_tile_binning_mode_config_packet) { -- DRM_ERROR("missing VC4_PACKET_TILE_BINNING_MODE_CONFIG\n"); -+ DRM_DEBUG("missing VC4_PACKET_TILE_BINNING_MODE_CONFIG\n"); - return -EINVAL; - } - -@@ -243,7 +243,7 @@ static int - validate_increment_semaphore(VALIDATE_ARGS) - { - if (!validate_bin_pos(exec, untrusted, exec->args->bin_cl_size - 2)) { -- DRM_ERROR("Bin CL must end with " -+ DRM_DEBUG("Bin CL must end with " - "VC4_PACKET_INCREMENT_SEMAPHORE\n"); - return -EINVAL; - } -@@ -264,7 +264,7 @@ validate_indexed_prim_list(VALIDATE_ARGS) - - /* Check overflow condition */ - if (exec->shader_state_count == 0) { -- DRM_ERROR("shader state must precede primitives\n"); -+ DRM_DEBUG("shader state must precede primitives\n"); - return -EINVAL; - } - shader_state = &exec->shader_state[exec->shader_state_count - 1]; -@@ -281,7 +281,7 @@ validate_indexed_prim_list(VALIDATE_ARGS) - - if (offset > ib->base.size || - (ib->base.size - offset) / index_size < length) { -- DRM_ERROR("IB access overflow (%d + %d*%d > %zd)\n", -+ DRM_DEBUG("IB access overflow (%d + %d*%d > %zd)\n", - offset, length, index_size, ib->base.size); - return -EINVAL; - } -@@ -301,13 +301,13 @@ validate_gl_array_primitive(VALIDATE_ARGS) - - /* Check overflow condition */ - if (exec->shader_state_count == 0) { -- DRM_ERROR("shader state must precede primitives\n"); -+ DRM_DEBUG("shader state must precede primitives\n"); - return -EINVAL; - } - shader_state = &exec->shader_state[exec->shader_state_count - 1]; - - if (length + base_index < length) { -- DRM_ERROR("primitive vertex count overflow\n"); -+ DRM_DEBUG("primitive vertex count overflow\n"); - return -EINVAL; - } - max_index = length + base_index - 1; -@@ -324,7 +324,7 @@ validate_gl_shader_state(VALIDATE_ARGS) - uint32_t i = exec->shader_state_count++; - - if (i >= exec->shader_state_size) { -- DRM_ERROR("More requests for shader states than declared\n"); -+ DRM_DEBUG("More requests for shader states than declared\n"); - return -EINVAL; - } - -@@ -332,7 +332,7 @@ validate_gl_shader_state(VALIDATE_ARGS) - exec->shader_state[i].max_index = 0; - - if (exec->shader_state[i].addr & ~0xf) { -- DRM_ERROR("high bits set in GL shader rec reference\n"); -+ DRM_DEBUG("high bits set in GL shader rec reference\n"); - return -EINVAL; - } - -@@ -356,7 +356,7 @@ validate_tile_binning_config(VALIDATE_ARGS) - int bin_slot; - - if (exec->found_tile_binning_mode_config_packet) { -- DRM_ERROR("Duplicate VC4_PACKET_TILE_BINNING_MODE_CONFIG\n"); -+ DRM_DEBUG("Duplicate VC4_PACKET_TILE_BINNING_MODE_CONFIG\n"); - return -EINVAL; - } - exec->found_tile_binning_mode_config_packet = true; -@@ -368,14 +368,14 @@ validate_tile_binning_config(VALIDATE_ARGS) - - if (exec->bin_tiles_x == 0 || - exec->bin_tiles_y == 0) { -- DRM_ERROR("Tile binning config of %dx%d too small\n", -+ DRM_DEBUG("Tile binning config of %dx%d too small\n", - exec->bin_tiles_x, exec->bin_tiles_y); - return -EINVAL; - } - - if (flags & (VC4_BIN_CONFIG_DB_NON_MS | - VC4_BIN_CONFIG_TILE_BUFFER_64BIT)) { -- DRM_ERROR("unsupported binning config flags 0x%02x\n", flags); -+ DRM_DEBUG("unsupported binning config flags 0x%02x\n", flags); - return -EINVAL; - } - -@@ -493,20 +493,20 @@ vc4_validate_bin_cl(struct drm_device *dev, - const struct cmd_info *info; - - if (cmd >= ARRAY_SIZE(cmd_info)) { -- DRM_ERROR("0x%08x: packet %d out of bounds\n", -+ DRM_DEBUG("0x%08x: packet %d out of bounds\n", - src_offset, cmd); - return -EINVAL; - } - - info = &cmd_info[cmd]; - if (!info->name) { -- DRM_ERROR("0x%08x: packet %d invalid\n", -+ DRM_DEBUG("0x%08x: packet %d invalid\n", - src_offset, cmd); - return -EINVAL; - } - - if (src_offset + info->len > len) { -- DRM_ERROR("0x%08x: packet %d (%s) length 0x%08x " -+ DRM_DEBUG("0x%08x: packet %d (%s) length 0x%08x " - "exceeds bounds (0x%08x)\n", - src_offset, cmd, info->name, info->len, - src_offset + len); -@@ -519,7 +519,7 @@ vc4_validate_bin_cl(struct drm_device *dev, - if (info->func && info->func(exec, - dst_pkt + 1, - src_pkt + 1)) { -- DRM_ERROR("0x%08x: packet %d (%s) failed to validate\n", -+ DRM_DEBUG("0x%08x: packet %d (%s) failed to validate\n", - src_offset, cmd, info->name); - return -EINVAL; - } -@@ -537,7 +537,7 @@ vc4_validate_bin_cl(struct drm_device *dev, - exec->ct0ea = exec->ct0ca + dst_offset; - - if (!exec->found_start_tile_binning_packet) { -- DRM_ERROR("Bin CL missing VC4_PACKET_START_TILE_BINNING\n"); -+ DRM_DEBUG("Bin CL missing VC4_PACKET_START_TILE_BINNING\n"); - return -EINVAL; - } - -@@ -549,7 +549,7 @@ vc4_validate_bin_cl(struct drm_device *dev, - * semaphore increment. - */ - if (!exec->found_increment_semaphore_packet || !exec->found_flush) { -- DRM_ERROR("Bin CL missing VC4_PACKET_INCREMENT_SEMAPHORE + " -+ DRM_DEBUG("Bin CL missing VC4_PACKET_INCREMENT_SEMAPHORE + " - "VC4_PACKET_FLUSH\n"); - return -EINVAL; - } -@@ -588,11 +588,11 @@ reloc_tex(struct vc4_exec_info *exec, - uint32_t remaining_size = tex->base.size - p0; - - if (p0 > tex->base.size - 4) { -- DRM_ERROR("UBO offset greater than UBO size\n"); -+ DRM_DEBUG("UBO offset greater than UBO size\n"); - goto fail; - } - if (p1 > remaining_size - 4) { -- DRM_ERROR("UBO clamp would allow reads " -+ DRM_DEBUG("UBO clamp would allow reads " - "outside of UBO\n"); - goto fail; - } -@@ -612,14 +612,14 @@ reloc_tex(struct vc4_exec_info *exec, - if (VC4_GET_FIELD(p3, VC4_TEX_P2_PTYPE) == - VC4_TEX_P2_PTYPE_CUBE_MAP_STRIDE) { - if (cube_map_stride) { -- DRM_ERROR("Cube map stride set twice\n"); -+ DRM_DEBUG("Cube map stride set twice\n"); - goto fail; - } - - cube_map_stride = p3 & VC4_TEX_P2_CMST_MASK; - } - if (!cube_map_stride) { -- DRM_ERROR("Cube map stride not set\n"); -+ DRM_DEBUG("Cube map stride not set\n"); - goto fail; - } - } -@@ -660,7 +660,7 @@ reloc_tex(struct vc4_exec_info *exec, - case VC4_TEXTURE_TYPE_RGBA64: - case VC4_TEXTURE_TYPE_YUV422R: - default: -- DRM_ERROR("Texture format %d unsupported\n", type); -+ DRM_DEBUG("Texture format %d unsupported\n", type); - goto fail; - } - utile_w = utile_width(cpp); -@@ -713,7 +713,7 @@ reloc_tex(struct vc4_exec_info *exec, - level_size = aligned_width * cpp * aligned_height; - - if (offset < level_size) { -- DRM_ERROR("Level %d (%dx%d -> %dx%d) size %db " -+ DRM_DEBUG("Level %d (%dx%d -> %dx%d) size %db " - "overflowed buffer bounds (offset %d)\n", - i, level_width, level_height, - aligned_width, aligned_height, -@@ -764,7 +764,7 @@ validate_gl_shader_rec(struct drm_device *dev, - - nr_relocs = ARRAY_SIZE(shader_reloc_offsets) + nr_attributes; - if (nr_relocs * 4 > exec->shader_rec_size) { -- DRM_ERROR("overflowed shader recs reading %d handles " -+ DRM_DEBUG("overflowed shader recs reading %d handles " - "from %d bytes left\n", - nr_relocs, exec->shader_rec_size); - return -EINVAL; -@@ -774,7 +774,7 @@ validate_gl_shader_rec(struct drm_device *dev, - exec->shader_rec_size -= nr_relocs * 4; - - if (packet_size > exec->shader_rec_size) { -- DRM_ERROR("overflowed shader recs copying %db packet " -+ DRM_DEBUG("overflowed shader recs copying %db packet " - "from %d bytes left\n", - packet_size, exec->shader_rec_size); - return -EINVAL; -@@ -794,7 +794,7 @@ validate_gl_shader_rec(struct drm_device *dev, - - for (i = 0; i < shader_reloc_count; i++) { - if (src_handles[i] > exec->bo_count) { -- DRM_ERROR("Shader handle %d too big\n", src_handles[i]); -+ DRM_DEBUG("Shader handle %d too big\n", src_handles[i]); - return -EINVAL; - } - -@@ -810,13 +810,13 @@ validate_gl_shader_rec(struct drm_device *dev, - - if (((*(uint16_t *)pkt_u & VC4_SHADER_FLAG_FS_SINGLE_THREAD) == 0) != - to_vc4_bo(&bo[0]->base)->validated_shader->is_threaded) { -- DRM_ERROR("Thread mode of CL and FS do not match\n"); -+ DRM_DEBUG("Thread mode of CL and FS do not match\n"); - return -EINVAL; - } - - if (to_vc4_bo(&bo[1]->base)->validated_shader->is_threaded || - to_vc4_bo(&bo[2]->base)->validated_shader->is_threaded) { -- DRM_ERROR("cs and vs cannot be threaded\n"); -+ DRM_DEBUG("cs and vs cannot be threaded\n"); - return -EINVAL; - } - -@@ -831,7 +831,7 @@ validate_gl_shader_rec(struct drm_device *dev, - *(uint32_t *)(pkt_v + o) = bo[i]->paddr + src_offset; - - if (src_offset != 0) { -- DRM_ERROR("Shaders must be at offset 0 of " -+ DRM_DEBUG("Shaders must be at offset 0 of " - "the BO.\n"); - return -EINVAL; - } -@@ -842,7 +842,7 @@ validate_gl_shader_rec(struct drm_device *dev, - - if (validated_shader->uniforms_src_size > - exec->uniforms_size) { -- DRM_ERROR("Uniforms src buffer overflow\n"); -+ DRM_DEBUG("Uniforms src buffer overflow\n"); - return -EINVAL; - } - -@@ -900,7 +900,7 @@ validate_gl_shader_rec(struct drm_device *dev, - - if (vbo->base.size < offset || - vbo->base.size - offset < attr_size) { -- DRM_ERROR("BO offset overflow (%d + %d > %zu)\n", -+ DRM_DEBUG("BO offset overflow (%d + %d > %zu)\n", - offset, attr_size, vbo->base.size); - return -EINVAL; - } -@@ -909,7 +909,7 @@ validate_gl_shader_rec(struct drm_device *dev, - max_index = ((vbo->base.size - offset - attr_size) / - stride); - if (state->max_index > max_index) { -- DRM_ERROR("primitives use index %d out of " -+ DRM_DEBUG("primitives use index %d out of " - "supplied %d\n", - state->max_index, max_index); - return -EINVAL; -diff --git a/drivers/gpu/drm/vc4/vc4_validate_shaders.c b/drivers/gpu/drm/vc4/vc4_validate_shaders.c -index 0b2df5c6efb4..d3f15bf60900 100644 ---- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c -+++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c -@@ -200,7 +200,7 @@ check_tmu_write(struct vc4_validated_shader_info *validated_shader, - uint32_t clamp_reg, clamp_offset; - - if (sig == QPU_SIG_SMALL_IMM) { -- DRM_ERROR("direct TMU read used small immediate\n"); -+ DRM_DEBUG("direct TMU read used small immediate\n"); - return false; - } - -@@ -209,7 +209,7 @@ check_tmu_write(struct vc4_validated_shader_info *validated_shader, - */ - if (is_mul || - QPU_GET_FIELD(inst, QPU_OP_ADD) != QPU_A_ADD) { -- DRM_ERROR("direct TMU load wasn't an add\n"); -+ DRM_DEBUG("direct TMU load wasn't an add\n"); - return false; - } - -@@ -220,13 +220,13 @@ check_tmu_write(struct vc4_validated_shader_info *validated_shader, - */ - clamp_reg = raddr_add_a_to_live_reg_index(inst); - if (clamp_reg == ~0) { -- DRM_ERROR("direct TMU load wasn't clamped\n"); -+ DRM_DEBUG("direct TMU load wasn't clamped\n"); - return false; - } - - clamp_offset = validation_state->live_min_clamp_offsets[clamp_reg]; - if (clamp_offset == ~0) { -- DRM_ERROR("direct TMU load wasn't clamped\n"); -+ DRM_DEBUG("direct TMU load wasn't clamped\n"); - return false; - } - -@@ -238,7 +238,7 @@ check_tmu_write(struct vc4_validated_shader_info *validated_shader, - - if (!(add_b == QPU_MUX_A && raddr_a == QPU_R_UNIF) && - !(add_b == QPU_MUX_B && raddr_b == QPU_R_UNIF)) { -- DRM_ERROR("direct TMU load didn't add to a uniform\n"); -+ DRM_DEBUG("direct TMU load didn't add to a uniform\n"); - return false; - } - -@@ -246,14 +246,14 @@ check_tmu_write(struct vc4_validated_shader_info *validated_shader, - } else { - if (raddr_a == QPU_R_UNIF || (sig != QPU_SIG_SMALL_IMM && - raddr_b == QPU_R_UNIF)) { -- DRM_ERROR("uniform read in the same instruction as " -+ DRM_DEBUG("uniform read in the same instruction as " - "texture setup.\n"); - return false; - } - } - - if (validation_state->tmu_write_count[tmu] >= 4) { -- DRM_ERROR("TMU%d got too many parameters before dispatch\n", -+ DRM_DEBUG("TMU%d got too many parameters before dispatch\n", - tmu); - return false; - } -@@ -265,7 +265,7 @@ check_tmu_write(struct vc4_validated_shader_info *validated_shader, - */ - if (!is_direct) { - if (validation_state->needs_uniform_address_update) { -- DRM_ERROR("Texturing with undefined uniform address\n"); -+ DRM_DEBUG("Texturing with undefined uniform address\n"); - return false; - } - -@@ -336,35 +336,35 @@ validate_uniform_address_write(struct vc4_validated_shader_info *validated_shade - case QPU_SIG_LOAD_TMU1: - break; - default: -- DRM_ERROR("uniforms address change must be " -+ DRM_DEBUG("uniforms address change must be " - "normal math\n"); - return false; - } - - if (is_mul || QPU_GET_FIELD(inst, QPU_OP_ADD) != QPU_A_ADD) { -- DRM_ERROR("Uniform address reset must be an ADD.\n"); -+ DRM_DEBUG("Uniform address reset must be an ADD.\n"); - return false; - } - - if (QPU_GET_FIELD(inst, QPU_COND_ADD) != QPU_COND_ALWAYS) { -- DRM_ERROR("Uniform address reset must be unconditional.\n"); -+ DRM_DEBUG("Uniform address reset must be unconditional.\n"); - return false; - } - - if (QPU_GET_FIELD(inst, QPU_PACK) != QPU_PACK_A_NOP && - !(inst & QPU_PM)) { -- DRM_ERROR("No packing allowed on uniforms reset\n"); -+ DRM_DEBUG("No packing allowed on uniforms reset\n"); - return false; - } - - if (add_lri == -1) { -- DRM_ERROR("First argument of uniform address write must be " -+ DRM_DEBUG("First argument of uniform address write must be " - "an immediate value.\n"); - return false; - } - - if (validation_state->live_immediates[add_lri] != expected_offset) { -- DRM_ERROR("Resetting uniforms with offset %db instead of %db\n", -+ DRM_DEBUG("Resetting uniforms with offset %db instead of %db\n", - validation_state->live_immediates[add_lri], - expected_offset); - return false; -@@ -372,7 +372,7 @@ validate_uniform_address_write(struct vc4_validated_shader_info *validated_shade - - if (!(add_b == QPU_MUX_A && raddr_a == QPU_R_UNIF) && - !(add_b == QPU_MUX_B && raddr_b == QPU_R_UNIF)) { -- DRM_ERROR("Second argument of uniform address write must be " -+ DRM_DEBUG("Second argument of uniform address write must be " - "a uniform.\n"); - return false; - } -@@ -417,7 +417,7 @@ check_reg_write(struct vc4_validated_shader_info *validated_shader, - switch (waddr) { - case QPU_W_UNIFORMS_ADDRESS: - if (is_b) { -- DRM_ERROR("relative uniforms address change " -+ DRM_DEBUG("relative uniforms address change " - "unsupported\n"); - return false; - } -@@ -452,11 +452,11 @@ check_reg_write(struct vc4_validated_shader_info *validated_shader, - /* XXX: I haven't thought about these, so don't support them - * for now. - */ -- DRM_ERROR("Unsupported waddr %d\n", waddr); -+ DRM_DEBUG("Unsupported waddr %d\n", waddr); - return false; - - case QPU_W_VPM_ADDR: -- DRM_ERROR("General VPM DMA unsupported\n"); -+ DRM_DEBUG("General VPM DMA unsupported\n"); - return false; - - case QPU_W_VPM: -@@ -559,7 +559,7 @@ check_instruction_writes(struct vc4_validated_shader_info *validated_shader, - bool ok; - - if (is_tmu_write(waddr_add) && is_tmu_write(waddr_mul)) { -- DRM_ERROR("ADD and MUL both set up textures\n"); -+ DRM_DEBUG("ADD and MUL both set up textures\n"); - return false; - } - -@@ -588,7 +588,7 @@ check_branch(uint64_t inst, - * there's no need for it. - */ - if (waddr_add != QPU_W_NOP || waddr_mul != QPU_W_NOP) { -- DRM_ERROR("branch instruction at %d wrote a register.\n", -+ DRM_DEBUG("branch instruction at %d wrote a register.\n", - validation_state->ip); - return false; - } -@@ -614,7 +614,7 @@ check_instruction_reads(struct vc4_validated_shader_info *validated_shader, - validated_shader->uniforms_size += 4; - - if (validation_state->needs_uniform_address_update) { -- DRM_ERROR("Uniform read with undefined uniform " -+ DRM_DEBUG("Uniform read with undefined uniform " - "address\n"); - return false; - } -@@ -660,19 +660,19 @@ vc4_validate_branches(struct vc4_shader_validation_state *validation_state) - continue; - - if (ip - last_branch < 4) { -- DRM_ERROR("Branch at %d during delay slots\n", ip); -+ DRM_DEBUG("Branch at %d during delay slots\n", ip); - return false; - } - last_branch = ip; - - if (inst & QPU_BRANCH_REG) { -- DRM_ERROR("branching from register relative " -+ DRM_DEBUG("branching from register relative " - "not supported\n"); - return false; - } - - if (!(inst & QPU_BRANCH_REL)) { -- DRM_ERROR("relative branching required\n"); -+ DRM_DEBUG("relative branching required\n"); - return false; - } - -@@ -682,13 +682,13 @@ vc4_validate_branches(struct vc4_shader_validation_state *validation_state) - * end of the shader object. - */ - if (branch_imm % sizeof(inst) != 0) { -- DRM_ERROR("branch target not aligned\n"); -+ DRM_DEBUG("branch target not aligned\n"); - return false; - } - - branch_target_ip = after_delay_ip + (branch_imm >> 3); - if (branch_target_ip >= validation_state->max_ip) { -- DRM_ERROR("Branch at %d outside of shader (ip %d/%d)\n", -+ DRM_DEBUG("Branch at %d outside of shader (ip %d/%d)\n", - ip, branch_target_ip, - validation_state->max_ip); - return false; -@@ -699,7 +699,7 @@ vc4_validate_branches(struct vc4_shader_validation_state *validation_state) - * the shader. - */ - if (after_delay_ip >= validation_state->max_ip) { -- DRM_ERROR("Branch at %d continues past shader end " -+ DRM_DEBUG("Branch at %d continues past shader end " - "(%d/%d)\n", - ip, after_delay_ip, validation_state->max_ip); - return false; -@@ -709,7 +709,7 @@ vc4_validate_branches(struct vc4_shader_validation_state *validation_state) - } - - if (max_branch_target > validation_state->max_ip - 3) { -- DRM_ERROR("Branch landed after QPU_SIG_PROG_END"); -+ DRM_DEBUG("Branch landed after QPU_SIG_PROG_END"); - return false; - } - -@@ -750,7 +750,7 @@ vc4_handle_branch_target(struct vc4_shader_validation_state *validation_state) - return true; - - if (texturing_in_progress(validation_state)) { -- DRM_ERROR("Branch target landed during TMU setup\n"); -+ DRM_DEBUG("Branch target landed during TMU setup\n"); - return false; - } - -@@ -837,7 +837,7 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj) - case QPU_SIG_LAST_THREAD_SWITCH: - if (!check_instruction_writes(validated_shader, - &validation_state)) { -- DRM_ERROR("Bad write at ip %d\n", ip); -+ DRM_DEBUG("Bad write at ip %d\n", ip); - goto fail; - } - -@@ -855,7 +855,7 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj) - validated_shader->is_threaded = true; - - if (ip < last_thread_switch_ip + 3) { -- DRM_ERROR("Thread switch too soon after " -+ DRM_DEBUG("Thread switch too soon after " - "last switch at ip %d\n", ip); - goto fail; - } -@@ -867,7 +867,7 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj) - case QPU_SIG_LOAD_IMM: - if (!check_instruction_writes(validated_shader, - &validation_state)) { -- DRM_ERROR("Bad LOAD_IMM write at ip %d\n", ip); -+ DRM_DEBUG("Bad LOAD_IMM write at ip %d\n", ip); - goto fail; - } - break; -@@ -878,14 +878,14 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj) - goto fail; - - if (ip < last_thread_switch_ip + 3) { -- DRM_ERROR("Branch in thread switch at ip %d", -+ DRM_DEBUG("Branch in thread switch at ip %d", - ip); - goto fail; - } - - break; - default: -- DRM_ERROR("Unsupported QPU signal %d at " -+ DRM_DEBUG("Unsupported QPU signal %d at " - "instruction %d\n", sig, ip); - goto fail; - } -@@ -898,7 +898,7 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj) - } - - if (ip == validation_state.max_ip) { -- DRM_ERROR("shader failed to terminate before " -+ DRM_DEBUG("shader failed to terminate before " - "shader BO end at %zd\n", - shader_obj->base.size); - goto fail; -@@ -907,7 +907,7 @@ vc4_validate_shader(struct drm_gem_cma_object *shader_obj) - /* Might corrupt other thread */ - if (validated_shader->is_threaded && - validation_state.all_registers_used) { -- DRM_ERROR("Shader uses threading, but uses the upper " -+ DRM_DEBUG("Shader uses threading, but uses the upper " - "half of the registers, too\n"); - goto fail; - } --- -2.13.5 - -From 28b369f5abc790f56e668869d88f261ca7a27c55 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Tue, 8 Aug 2017 13:56:05 -0700 -Subject: [PATCH 2/6] drm/vc4: Fix leak of HDMI EDID - -We don't keep a pointer to it around anywhere, so it's our job to free -it. - -Cc: Stefan Wahren -Link: https://github.com/anholt/linux/issues/101 -Fixes: c8b75bca92cb ("drm/vc4: Add KMS support for Raspberry Pi.") -Signed-off-by: Eric Anholt -Link: https://patchwork.freedesktop.org/patch/msgid/20170808205605.4432-1-eric@anholt.net -Reviewed-by: Daniel Vetter -Tested-by: Stefan Wahren ---- - drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c -index ed63d4e85762..f7803fd7f47c 100644 ---- a/drivers/gpu/drm/vc4/vc4_hdmi.c -+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -260,6 +260,7 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) - drm_mode_connector_update_edid_property(connector, edid); - ret = drm_add_edid_modes(connector, edid); - drm_edid_to_eld(connector, edid); -+ kfree(edid); - - return ret; - } --- -2.13.5 - -From 3b688b6d347f777a8e86165decc33198b063b8c0 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Tue, 25 Jul 2017 11:27:16 -0700 -Subject: [PATCH 3/6] drm/vc4: Start using u64_to_user_ptr. - -Chris Wilson pointed out this little cleanup in a review of new code, -so let's fix up the code I was copying from. - -Signed-off-by: Eric Anholt -Link: https://patchwork.freedesktop.org/patch/msgid/20170725182718.31468-1-eric@anholt.net -Reviewed-by: Daniel Vetter ---- - drivers/gpu/drm/vc4/vc4_gem.c | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index a3e45e67f417..8b551bc630c4 100644 ---- a/drivers/gpu/drm/vc4/vc4_gem.c -+++ b/drivers/gpu/drm/vc4/vc4_gem.c -@@ -119,7 +119,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, - bo_state[i].size = vc4_bo->base.base.size; - } - -- if (copy_to_user((void __user *)(uintptr_t)get_state->bo, -+ if (copy_to_user(u64_to_user_ptr(get_state->bo), - bo_state, - state->bo_count * sizeof(*bo_state))) - ret = -EFAULT; -@@ -678,8 +678,7 @@ vc4_cl_lookup_bos(struct drm_device *dev, - goto fail; - } - -- if (copy_from_user(handles, -- (void __user *)(uintptr_t)args->bo_handles, -+ if (copy_from_user(handles, u64_to_user_ptr(args->bo_handles), - exec->bo_count * sizeof(uint32_t))) { - ret = -EFAULT; - DRM_ERROR("Failed to copy in GEM handles\n"); -@@ -755,21 +754,21 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) - exec->shader_state_size = args->shader_rec_count; - - if (copy_from_user(bin, -- (void __user *)(uintptr_t)args->bin_cl, -+ u64_to_user_ptr(args->bin_cl), - args->bin_cl_size)) { - ret = -EFAULT; - goto fail; - } - - if (copy_from_user(exec->shader_rec_u, -- (void __user *)(uintptr_t)args->shader_rec, -+ u64_to_user_ptr(args->shader_rec), - args->shader_rec_size)) { - ret = -EFAULT; - goto fail; - } - - if (copy_from_user(exec->uniforms_u, -- (void __user *)(uintptr_t)args->uniforms, -+ u64_to_user_ptr(args->uniforms), - args->uniforms_size)) { - ret = -EFAULT; - goto fail; --- -2.13.5 - -From da81d76bce216c160d2924a52e362b160bbb6ca1 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Tue, 25 Jul 2017 11:27:17 -0700 -Subject: [PATCH 4/6] drm/vc4: Add an ioctl for labeling GEM BOs for summary - stats - -This has proven immensely useful for debugging memory leaks and -overallocation (which is a rather serious concern on the platform, -given that we typically run at about 256MB of CMA out of up to 1GB -total memory, with framebuffers that are about 8MB ecah). - -The state of the art without this is to dump debug logs from every GL -application, guess as to kernel allocations based on bo_stats, and try -to merge that all together into a global picture of memory allocation -state. With this, you can add a couple of calls to the debug build of -the 3D driver and get a pretty detailed view of GPU memory usage from -/debug/dri/0/bo_stats (or when we debug print to dmesg on allocation -failure). - -The Mesa side currently labels at the gallium resource level (so you -see that a 1920x20 pixmap has been created, presumably for the window -system panel), but we could extend that to be even more useful with -glObjectLabel() names being sent all the way down to the kernel. - -(partial) example of sorted debugfs output with Mesa labeling all -resources: - - kernel BO cache: 16392kb BOs (3) - tiling shadow 1920x1080: 8160kb BOs (1) - resource 1920x1080@32/0: 8160kb BOs (1) -scanout resource 1920x1080@32/0: 8100kb BOs (1) - kernel: 8100kb BOs (1) - -v2: Use strndup_user(), use lockdep assertion instead of just a - comment, fix an array[-1] reference, extend comment about name - freeing. - -Signed-off-by: Eric Anholt -Link: https://patchwork.freedesktop.org/patch/msgid/20170725182718.31468-2-eric@anholt.net -Reviewed-by: Chris Wilson ---- - drivers/gpu/drm/vc4/vc4_bo.c | 258 ++++++++++++++++++++++++++++-------- - drivers/gpu/drm/vc4/vc4_drv.c | 8 +- - drivers/gpu/drm/vc4/vc4_drv.h | 39 +++++- - drivers/gpu/drm/vc4/vc4_gem.c | 2 +- - drivers/gpu/drm/vc4/vc4_render_cl.c | 2 +- - drivers/gpu/drm/vc4/vc4_v3d.c | 3 +- - include/uapi/drm/vc4_drm.h | 11 ++ - 7 files changed, 257 insertions(+), 66 deletions(-) - -diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index ede80199001d..27c4a927311f 100644 ---- a/drivers/gpu/drm/vc4/vc4_bo.c -+++ b/drivers/gpu/drm/vc4/vc4_bo.c -@@ -24,21 +24,35 @@ - #include "vc4_drv.h" - #include "uapi/drm/vc4_drm.h" - -+static const char * const bo_type_names[] = { -+ "kernel", -+ "V3D", -+ "V3D shader", -+ "dumb", -+ "binner", -+ "RCL", -+ "BCL", -+ "kernel BO cache", -+}; -+ -+static bool is_user_label(int label) -+{ -+ return label >= VC4_BO_TYPE_COUNT; -+} -+ - static void vc4_bo_stats_dump(struct vc4_dev *vc4) - { -- DRM_INFO("num bos allocated: %d\n", -- vc4->bo_stats.num_allocated); -- DRM_INFO("size bos allocated: %dkb\n", -- vc4->bo_stats.size_allocated / 1024); -- DRM_INFO("num bos used: %d\n", -- vc4->bo_stats.num_allocated - vc4->bo_stats.num_cached); -- DRM_INFO("size bos used: %dkb\n", -- (vc4->bo_stats.size_allocated - -- vc4->bo_stats.size_cached) / 1024); -- DRM_INFO("num bos cached: %d\n", -- vc4->bo_stats.num_cached); -- DRM_INFO("size bos cached: %dkb\n", -- vc4->bo_stats.size_cached / 1024); -+ int i; -+ -+ for (i = 0; i < vc4->num_labels; i++) { -+ if (!vc4->bo_labels[i].num_allocated) -+ continue; -+ -+ DRM_INFO("%30s: %6dkb BOs (%d)\n", -+ vc4->bo_labels[i].name, -+ vc4->bo_labels[i].size_allocated / 1024, -+ vc4->bo_labels[i].num_allocated); -+ } - } - - #ifdef CONFIG_DEBUG_FS -@@ -47,30 +61,103 @@ int vc4_bo_stats_debugfs(struct seq_file *m, void *unused) - struct drm_info_node *node = (struct drm_info_node *)m->private; - struct drm_device *dev = node->minor->dev; - struct vc4_dev *vc4 = to_vc4_dev(dev); -- struct vc4_bo_stats stats; -+ int i; - -- /* Take a snapshot of the current stats with the lock held. */ - mutex_lock(&vc4->bo_lock); -- stats = vc4->bo_stats; -+ for (i = 0; i < vc4->num_labels; i++) { -+ if (!vc4->bo_labels[i].num_allocated) -+ continue; -+ -+ seq_printf(m, "%30s: %6dkb BOs (%d)\n", -+ vc4->bo_labels[i].name, -+ vc4->bo_labels[i].size_allocated / 1024, -+ vc4->bo_labels[i].num_allocated); -+ } - mutex_unlock(&vc4->bo_lock); - -- seq_printf(m, "num bos allocated: %d\n", -- stats.num_allocated); -- seq_printf(m, "size bos allocated: %dkb\n", -- stats.size_allocated / 1024); -- seq_printf(m, "num bos used: %d\n", -- stats.num_allocated - stats.num_cached); -- seq_printf(m, "size bos used: %dkb\n", -- (stats.size_allocated - stats.size_cached) / 1024); -- seq_printf(m, "num bos cached: %d\n", -- stats.num_cached); -- seq_printf(m, "size bos cached: %dkb\n", -- stats.size_cached / 1024); -- - return 0; - } - #endif - -+/* Takes ownership of *name and returns the appropriate slot for it in -+ * the bo_labels[] array, extending it as necessary. -+ * -+ * This is inefficient and could use a hash table instead of walking -+ * an array and strcmp()ing. However, the assumption is that user -+ * labeling will be infrequent (scanout buffers and other long-lived -+ * objects, or debug driver builds), so we can live with it for now. -+ */ -+static int vc4_get_user_label(struct vc4_dev *vc4, const char *name) -+{ -+ int i; -+ int free_slot = -1; -+ -+ for (i = 0; i < vc4->num_labels; i++) { -+ if (!vc4->bo_labels[i].name) { -+ free_slot = i; -+ } else if (strcmp(vc4->bo_labels[i].name, name) == 0) { -+ kfree(name); -+ return i; -+ } -+ } -+ -+ if (free_slot != -1) { -+ WARN_ON(vc4->bo_labels[free_slot].num_allocated != 0); -+ vc4->bo_labels[free_slot].name = name; -+ return free_slot; -+ } else { -+ u32 new_label_count = vc4->num_labels + 1; -+ struct vc4_label *new_labels = -+ krealloc(vc4->bo_labels, -+ new_label_count * sizeof(*new_labels), -+ GFP_KERNEL); -+ -+ if (!new_labels) { -+ kfree(name); -+ return -1; -+ } -+ -+ free_slot = vc4->num_labels; -+ vc4->bo_labels = new_labels; -+ vc4->num_labels = new_label_count; -+ -+ vc4->bo_labels[free_slot].name = name; -+ vc4->bo_labels[free_slot].num_allocated = 0; -+ vc4->bo_labels[free_slot].size_allocated = 0; -+ -+ return free_slot; -+ } -+} -+ -+static void vc4_bo_set_label(struct drm_gem_object *gem_obj, int label) -+{ -+ struct vc4_bo *bo = to_vc4_bo(gem_obj); -+ struct vc4_dev *vc4 = to_vc4_dev(gem_obj->dev); -+ -+ lockdep_assert_held(&vc4->bo_lock); -+ -+ if (label != -1) { -+ vc4->bo_labels[label].num_allocated++; -+ vc4->bo_labels[label].size_allocated += gem_obj->size; -+ } -+ -+ vc4->bo_labels[bo->label].num_allocated--; -+ vc4->bo_labels[bo->label].size_allocated -= gem_obj->size; -+ -+ if (vc4->bo_labels[bo->label].num_allocated == 0 && -+ is_user_label(bo->label)) { -+ /* Free user BO label slots on last unreference. -+ * Slots are just where we track the stats for a given -+ * name, and once a name is unused we can reuse that -+ * slot. -+ */ -+ kfree(vc4->bo_labels[bo->label].name); -+ vc4->bo_labels[bo->label].name = NULL; -+ } -+ -+ bo->label = label; -+} -+ - static uint32_t bo_page_index(size_t size) - { - return (size / PAGE_SIZE) - 1; -@@ -80,7 +167,8 @@ static uint32_t bo_page_index(size_t size) - static void vc4_bo_destroy(struct vc4_bo *bo) - { - struct drm_gem_object *obj = &bo->base.base; -- struct vc4_dev *vc4 = to_vc4_dev(obj->dev); -+ -+ vc4_bo_set_label(obj, -1); - - if (bo->validated_shader) { - kfree(bo->validated_shader->texture_samples); -@@ -88,9 +176,6 @@ static void vc4_bo_destroy(struct vc4_bo *bo) - bo->validated_shader = NULL; - } - -- vc4->bo_stats.num_allocated--; -- vc4->bo_stats.size_allocated -= obj->size; -- - reservation_object_fini(&bo->_resv); - - drm_gem_cma_free_object(obj); -@@ -99,12 +184,6 @@ static void vc4_bo_destroy(struct vc4_bo *bo) - /* Must be called with bo_lock held. */ - static void vc4_bo_remove_from_cache(struct vc4_bo *bo) - { -- struct drm_gem_object *obj = &bo->base.base; -- struct vc4_dev *vc4 = to_vc4_dev(obj->dev); -- -- vc4->bo_stats.num_cached--; -- vc4->bo_stats.size_cached -= obj->size; -- - list_del(&bo->unref_head); - list_del(&bo->size_head); - } -@@ -165,7 +244,8 @@ static void vc4_bo_cache_purge(struct drm_device *dev) - } - - static struct vc4_bo *vc4_bo_get_from_cache(struct drm_device *dev, -- uint32_t size) -+ uint32_t size, -+ enum vc4_kernel_bo_type type) - { - struct vc4_dev *vc4 = to_vc4_dev(dev); - uint32_t page_index = bo_page_index(size); -@@ -186,6 +266,8 @@ static struct vc4_bo *vc4_bo_get_from_cache(struct drm_device *dev, - kref_init(&bo->base.base.refcount); - - out: -+ if (bo) -+ vc4_bo_set_label(&bo->base.base, type); - mutex_unlock(&vc4->bo_lock); - return bo; - } -@@ -208,8 +290,9 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size) - return ERR_PTR(-ENOMEM); - - mutex_lock(&vc4->bo_lock); -- vc4->bo_stats.num_allocated++; -- vc4->bo_stats.size_allocated += size; -+ bo->label = VC4_BO_TYPE_KERNEL; -+ vc4->bo_labels[VC4_BO_TYPE_KERNEL].num_allocated++; -+ vc4->bo_labels[VC4_BO_TYPE_KERNEL].size_allocated += size; - mutex_unlock(&vc4->bo_lock); - bo->resv = &bo->_resv; - reservation_object_init(bo->resv); -@@ -218,7 +301,7 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size) - } - - struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, -- bool allow_unzeroed) -+ bool allow_unzeroed, enum vc4_kernel_bo_type type) - { - size_t size = roundup(unaligned_size, PAGE_SIZE); - struct vc4_dev *vc4 = to_vc4_dev(dev); -@@ -229,7 +312,7 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, - return ERR_PTR(-EINVAL); - - /* First, try to get a vc4_bo from the kernel BO cache. */ -- bo = vc4_bo_get_from_cache(dev, size); -+ bo = vc4_bo_get_from_cache(dev, size, type); - if (bo) { - if (!allow_unzeroed) - memset(bo->base.vaddr, 0, bo->base.base.size); -@@ -251,7 +334,13 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, - return ERR_PTR(-ENOMEM); - } - } -- return to_vc4_bo(&cma_obj->base); -+ bo = to_vc4_bo(&cma_obj->base); -+ -+ mutex_lock(&vc4->bo_lock); -+ vc4_bo_set_label(&cma_obj->base, type); -+ mutex_unlock(&vc4->bo_lock); -+ -+ return bo; - } - - int vc4_dumb_create(struct drm_file *file_priv, -@@ -268,7 +357,7 @@ int vc4_dumb_create(struct drm_file *file_priv, - if (args->size < args->pitch * args->height) - args->size = args->pitch * args->height; - -- bo = vc4_bo_create(dev, args->size, false); -+ bo = vc4_bo_create(dev, args->size, false, VC4_BO_TYPE_DUMB); - if (IS_ERR(bo)) - return PTR_ERR(bo); - -@@ -348,8 +437,7 @@ void vc4_free_object(struct drm_gem_object *gem_bo) - list_add(&bo->size_head, cache_list); - list_add(&bo->unref_head, &vc4->bo_cache.time_list); - -- vc4->bo_stats.num_cached++; -- vc4->bo_stats.size_cached += gem_bo->size; -+ vc4_bo_set_label(&bo->base.base, VC4_BO_TYPE_KERNEL_CACHE); - - vc4_bo_cache_free_old(dev); - -@@ -483,7 +571,7 @@ int vc4_create_bo_ioctl(struct drm_device *dev, void *data, - * We can't allocate from the BO cache, because the BOs don't - * get zeroed, and that might leak data between users. - */ -- bo = vc4_bo_create(dev, args->size, false); -+ bo = vc4_bo_create(dev, args->size, false, VC4_BO_TYPE_V3D); - if (IS_ERR(bo)) - return PTR_ERR(bo); - -@@ -536,7 +624,7 @@ vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data, - return -EINVAL; - } - -- bo = vc4_bo_create(dev, args->size, true); -+ bo = vc4_bo_create(dev, args->size, true, VC4_BO_TYPE_V3D_SHADER); - if (IS_ERR(bo)) - return PTR_ERR(bo); - -@@ -651,9 +739,24 @@ int vc4_get_tiling_ioctl(struct drm_device *dev, void *data, - return 0; - } - --void vc4_bo_cache_init(struct drm_device *dev) -+int vc4_bo_cache_init(struct drm_device *dev) - { - struct vc4_dev *vc4 = to_vc4_dev(dev); -+ int i; -+ -+ /* Create the initial set of BO labels that the kernel will -+ * use. This lets us avoid a bunch of string reallocation in -+ * the kernel's draw and BO allocation paths. -+ */ -+ vc4->bo_labels = kcalloc(VC4_BO_TYPE_COUNT, sizeof(*vc4->bo_labels), -+ GFP_KERNEL); -+ if (!vc4->bo_labels) -+ return -ENOMEM; -+ vc4->num_labels = VC4_BO_TYPE_COUNT; -+ -+ BUILD_BUG_ON(ARRAY_SIZE(bo_type_names) != VC4_BO_TYPE_COUNT); -+ for (i = 0; i < VC4_BO_TYPE_COUNT; i++) -+ vc4->bo_labels[i].name = bo_type_names[i]; - - mutex_init(&vc4->bo_lock); - -@@ -663,19 +766,66 @@ void vc4_bo_cache_init(struct drm_device *dev) - setup_timer(&vc4->bo_cache.time_timer, - vc4_bo_cache_time_timer, - (unsigned long)dev); -+ -+ return 0; - } - - void vc4_bo_cache_destroy(struct drm_device *dev) - { - struct vc4_dev *vc4 = to_vc4_dev(dev); -+ int i; - - del_timer(&vc4->bo_cache.time_timer); - cancel_work_sync(&vc4->bo_cache.time_work); - - vc4_bo_cache_purge(dev); - -- if (vc4->bo_stats.num_allocated) { -- DRM_ERROR("Destroying BO cache while BOs still allocated:\n"); -- vc4_bo_stats_dump(vc4); -+ for (i = 0; i < vc4->num_labels; i++) { -+ if (vc4->bo_labels[i].num_allocated) { -+ DRM_ERROR("Destroying BO cache with %d %s " -+ "BOs still allocated\n", -+ vc4->bo_labels[i].num_allocated, -+ vc4->bo_labels[i].name); -+ } -+ -+ if (is_user_label(i)) -+ kfree(vc4->bo_labels[i].name); - } -+ kfree(vc4->bo_labels); -+} -+ -+int vc4_label_bo_ioctl(struct drm_device *dev, void *data, -+ struct drm_file *file_priv) -+{ -+ struct vc4_dev *vc4 = to_vc4_dev(dev); -+ struct drm_vc4_label_bo *args = data; -+ char *name; -+ struct drm_gem_object *gem_obj; -+ int ret = 0, label; -+ -+ if (!args->len) -+ return -EINVAL; -+ -+ name = strndup_user(u64_to_user_ptr(args->name), args->len + 1); -+ if (IS_ERR(name)) -+ return PTR_ERR(name); -+ -+ gem_obj = drm_gem_object_lookup(file_priv, args->handle); -+ if (!gem_obj) { -+ DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -+ kfree(name); -+ return -ENOENT; -+ } -+ -+ mutex_lock(&vc4->bo_lock); -+ label = vc4_get_user_label(vc4, name); -+ if (label != -1) -+ vc4_bo_set_label(gem_obj, label); -+ else -+ ret = -ENOMEM; -+ mutex_unlock(&vc4->bo_lock); -+ -+ drm_gem_object_unreference_unlocked(gem_obj); -+ -+ return ret; - } -diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index c6b487c3d2b7..75c1f50a7b5d 100644 ---- a/drivers/gpu/drm/vc4/vc4_drv.c -+++ b/drivers/gpu/drm/vc4/vc4_drv.c -@@ -140,6 +140,7 @@ static const struct drm_ioctl_desc vc4_drm_ioctls[] = { - DRM_IOCTL_DEF_DRV(VC4_GET_PARAM, vc4_get_param_ioctl, DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(VC4_SET_TILING, vc4_set_tiling_ioctl, DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(VC4_GET_TILING, vc4_get_tiling_ioctl, DRM_RENDER_ALLOW), -+ DRM_IOCTL_DEF_DRV(VC4_LABEL_BO, vc4_label_bo_ioctl, DRM_RENDER_ALLOW), - }; - - static struct drm_driver vc4_drm_driver = { -@@ -257,7 +258,9 @@ static int vc4_drm_bind(struct device *dev) - vc4->dev = drm; - drm->dev_private = vc4; - -- vc4_bo_cache_init(drm); -+ ret = vc4_bo_cache_init(drm); -+ if (ret) -+ goto dev_unref; - - drm_mode_config_init(drm); - -@@ -281,8 +284,9 @@ static int vc4_drm_bind(struct device *dev) - component_unbind_all(dev, drm); - gem_destroy: - vc4_gem_destroy(drm); -- drm_dev_unref(drm); - vc4_bo_cache_destroy(drm); -+dev_unref: -+ drm_dev_unref(drm); - return ret; - } - -diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index df22698d62ee..75d9957cb76d 100644 ---- a/drivers/gpu/drm/vc4/vc4_drv.h -+++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -11,6 +11,24 @@ - #include - #include - -+/* Don't forget to update vc4_bo.c: bo_type_names[] when adding to -+ * this. -+ */ -+enum vc4_kernel_bo_type { -+ /* Any kernel allocation (gem_create_object hook) before it -+ * gets another type set. -+ */ -+ VC4_BO_TYPE_KERNEL, -+ VC4_BO_TYPE_V3D, -+ VC4_BO_TYPE_V3D_SHADER, -+ VC4_BO_TYPE_DUMB, -+ VC4_BO_TYPE_BIN, -+ VC4_BO_TYPE_RCL, -+ VC4_BO_TYPE_BCL, -+ VC4_BO_TYPE_KERNEL_CACHE, -+ VC4_BO_TYPE_COUNT -+}; -+ - struct vc4_dev { - struct drm_device *dev; - -@@ -46,14 +64,14 @@ struct vc4_dev { - struct timer_list time_timer; - } bo_cache; - -- struct vc4_bo_stats { -+ u32 num_labels; -+ struct vc4_label { -+ const char *name; - u32 num_allocated; - u32 size_allocated; -- u32 num_cached; -- u32 size_cached; -- } bo_stats; -+ } *bo_labels; - -- /* Protects bo_cache and the BO stats. */ -+ /* Protects bo_cache and bo_labels. */ - struct mutex bo_lock; - - uint64_t dma_fence_context; -@@ -169,6 +187,11 @@ struct vc4_bo { - /* normally (resv == &_resv) except for imported bo's */ - struct reservation_object *resv; - struct reservation_object _resv; -+ -+ /* One of enum vc4_kernel_bo_type, or VC4_BO_TYPE_COUNT + i -+ * for user-allocated labels. -+ */ -+ int label; - }; - - static inline struct vc4_bo * -@@ -460,7 +483,7 @@ struct vc4_validated_shader_info { - struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size); - void vc4_free_object(struct drm_gem_object *gem_obj); - struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t size, -- bool from_cache); -+ bool from_cache, enum vc4_kernel_bo_type type); - int vc4_dumb_create(struct drm_file *file_priv, - struct drm_device *dev, - struct drm_mode_create_dumb *args); -@@ -478,6 +501,8 @@ int vc4_get_tiling_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); - int vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -+int vc4_label_bo_ioctl(struct drm_device *dev, void *data, -+ struct drm_file *file_priv); - int vc4_mmap(struct file *filp, struct vm_area_struct *vma); - struct reservation_object *vc4_prime_res_obj(struct drm_gem_object *obj); - int vc4_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); -@@ -485,7 +510,7 @@ struct drm_gem_object *vc4_prime_import_sg_table(struct drm_device *dev, - struct dma_buf_attachment *attach, - struct sg_table *sgt); - void *vc4_prime_vmap(struct drm_gem_object *obj); --void vc4_bo_cache_init(struct drm_device *dev); -+int vc4_bo_cache_init(struct drm_device *dev); - void vc4_bo_cache_destroy(struct drm_device *dev); - int vc4_bo_stats_debugfs(struct seq_file *m, void *arg); - -diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 8b551bc630c4..80f1953b4938 100644 ---- a/drivers/gpu/drm/vc4/vc4_gem.c -+++ b/drivers/gpu/drm/vc4/vc4_gem.c -@@ -774,7 +774,7 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) - goto fail; - } - -- bo = vc4_bo_create(dev, exec_size, true); -+ bo = vc4_bo_create(dev, exec_size, true, VC4_BO_TYPE_BCL); - if (IS_ERR(bo)) { - DRM_ERROR("Couldn't allocate BO for binning\n"); - ret = PTR_ERR(bo); -diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index da3bfd53f0bd..e0539731130b 100644 ---- a/drivers/gpu/drm/vc4/vc4_render_cl.c -+++ b/drivers/gpu/drm/vc4/vc4_render_cl.c -@@ -320,7 +320,7 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, - - size += xtiles * ytiles * loop_body_size; - -- setup->rcl = &vc4_bo_create(dev, size, true)->base; -+ setup->rcl = &vc4_bo_create(dev, size, true, VC4_BO_TYPE_RCL)->base; - if (IS_ERR(setup->rcl)) - return PTR_ERR(setup->rcl); - list_add_tail(&to_vc4_bo(&setup->rcl->base)->unref_head, -diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index 8c723da71f66..622cd43840b8 100644 ---- a/drivers/gpu/drm/vc4/vc4_v3d.c -+++ b/drivers/gpu/drm/vc4/vc4_v3d.c -@@ -236,7 +236,8 @@ vc4_allocate_bin_bo(struct drm_device *drm) - INIT_LIST_HEAD(&list); - - while (true) { -- struct vc4_bo *bo = vc4_bo_create(drm, size, true); -+ struct vc4_bo *bo = vc4_bo_create(drm, size, true, -+ VC4_BO_TYPE_BIN); - - if (IS_ERR(bo)) { - ret = PTR_ERR(bo); -diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 6ac4c5c014cb..551628e571f9 100644 ---- a/include/uapi/drm/vc4_drm.h -+++ b/include/uapi/drm/vc4_drm.h -@@ -40,6 +40,7 @@ extern "C" { - #define DRM_VC4_GET_PARAM 0x07 - #define DRM_VC4_SET_TILING 0x08 - #define DRM_VC4_GET_TILING 0x09 -+#define DRM_VC4_LABEL_BO 0x0a - - #define DRM_IOCTL_VC4_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl) - #define DRM_IOCTL_VC4_WAIT_SEQNO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, struct drm_vc4_wait_seqno) -@@ -51,6 +52,7 @@ extern "C" { - #define DRM_IOCTL_VC4_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_PARAM, struct drm_vc4_get_param) - #define DRM_IOCTL_VC4_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SET_TILING, struct drm_vc4_set_tiling) - #define DRM_IOCTL_VC4_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_TILING, struct drm_vc4_get_tiling) -+#define DRM_IOCTL_VC4_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_LABEL_BO, struct drm_vc4_label_bo) - - struct drm_vc4_submit_rcl_surface { - __u32 hindex; /* Handle index, or ~0 if not present. */ -@@ -311,6 +313,15 @@ struct drm_vc4_set_tiling { - __u64 modifier; - }; - -+/** -+ * struct drm_vc4_label_bo - Attach a name to a BO for debug purposes. -+ */ -+struct drm_vc4_label_bo { -+ __u32 handle; -+ __u32 len; -+ __u64 name; -+}; -+ - #if defined(__cplusplus) - } - #endif --- -2.13.5 - -From 34cbed8ed9441caa13017108dac189e09c35f9af Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Wed, 2 Aug 2017 13:32:40 -0700 -Subject: [PATCH 5/6] drm/vc4: Fix double destroy of the BO cache on teardown. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It's also destroyed from the top level vc4_drv.c initialization, which -is where the cache was actually initialized from. - -This used to just involve duplicate del_timer() and cancel_work_sync() -being called, but it started causing kmalloc issues once we -double-freed the new BO label array. - -Fixes: 1908a876f909 ("drm/vc4: Add an ioctl for labeling GEM BOs for summary stats") -Signed-off-by: Eric Anholt -Link: https://patchwork.freedesktop.org/patch/msgid/20170802203242.12815-1-eric@anholt.net -Tested-by: Noralf Trønnes -Acked-by: Noralf Trønnes -Reviewed-by: Boris Brezillon ---- - drivers/gpu/drm/vc4/vc4_gem.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 80f1953b4938..624177b9cce4 100644 ---- a/drivers/gpu/drm/vc4/vc4_gem.c -+++ b/drivers/gpu/drm/vc4/vc4_gem.c -@@ -1117,6 +1117,4 @@ vc4_gem_destroy(struct drm_device *dev) - - if (vc4->hang_state) - vc4_free_hang_state(dev, vc4->hang_state); -- -- vc4_bo_cache_destroy(dev); - } --- -2.13.5 - -From 4f218eea5be54c8506e6db700750e8b8019dc6af Mon Sep 17 00:00:00 2001 -From: Boris Brezillon -Date: Fri, 16 Jun 2017 10:30:33 +0200 -Subject: [PATCH 6/6] drm/vc4: Send a VBLANK event when disabling a CRTC - -VBLANK events are missed when the CRTC is being disabled because the -driver does not wait till the end of the frame before stopping the -HVS and PV blocks. In this case, we should explicitly issue a VBLANK -event if there's one waiting. - -Signed-off-by: Boris Brezillon -Reviewed-by: Eric Anholt -Link: http://patchwork.freedesktop.org/patch/msgid/1497601833-24588-1-git-send-email-boris.brezillon@free-electrons.com ---- - drivers/gpu/drm/vc4/vc4_crtc.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index a12cc7ea99b6..b0582ad3f459 100644 ---- a/drivers/gpu/drm/vc4/vc4_crtc.c -+++ b/drivers/gpu/drm/vc4/vc4_crtc.c -@@ -518,6 +518,19 @@ static void vc4_crtc_disable(struct drm_crtc *crtc) - WARN_ON_ONCE((HVS_READ(SCALER_DISPSTATX(chan)) & - (SCALER_DISPSTATX_FULL | SCALER_DISPSTATX_EMPTY)) != - SCALER_DISPSTATX_EMPTY); -+ -+ /* -+ * Make sure we issue a vblank event after disabling the CRTC if -+ * someone was waiting it. -+ */ -+ if (crtc->state->event) { -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev->event_lock, flags); -+ drm_crtc_send_vblank_event(crtc, crtc->state->event); -+ crtc->state->event = NULL; -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+ } - } - - static void vc4_crtc_update_dlist(struct drm_crtc *crtc) --- -2.13.5 - diff --git a/build_configs.sh b/build_configs.sh index 55fb89d01..140511f19 100755 --- a/build_configs.sh +++ b/build_configs.sh @@ -46,8 +46,6 @@ function merge_configs() echo "# powerpc" > $name elif [ "x$arch" == "xppc64le" ]; then echo "# powerpc" > $name - elif [ "x$arch" == "xppc64p7" ]; then - echo "# powerpc" > $name elif [ "x$arch" == "xs390x" ]; then echo "# s390" > $name elif [ "x$arch" == "xarmv7hl" ]; then diff --git a/config_generation b/config_generation index e5dde85cf..64ae444f4 100644 --- a/config_generation +++ b/config_generation @@ -5,7 +5,7 @@ # x86_64 x86_64=baseconfig:baseconfig-x86:baseconfig-x86-x86_64 -x86_64-debug=baseconfig:baseconfig-x86:baseconfig-x86-x86_64:debugconfig:debugconfig-x86 +x86_64-debug=baseconfig:baseconfig-x86:baseconfig-x86-x86_64:debugconfig:debugconfig-x86:debugconfig-x86-x86_64 # i686 i686=baseconfig:baseconfig-x86:baseconfig-x86-i686 @@ -20,8 +20,7 @@ ppc64-debug=baseconfig:baseconfig-powerpc:baseconfig-powerpc-powerpc64:debugconf # ppc64le ppc64le=baseconfig:baseconfig-powerpc:baseconfig-powerpc-powerpc64le ppc64le-debug=baseconfig:baseconfig-powerpc:baseconfig-powerpc-powerpc64le:debugconfig -ppc64p7=baseconfig:baseconfig-powerpc:baseconfig-powerpc-powerpc64p7 -ppc64p7-debug=baseconfig:baseconfig-powerpc:baseconfig-powerpc-powerpc64p7:debugconfig + # s390x s390x=baseconfig:baseconfig-s390x s390x-debug=baseconfig:baseconfig-s390x:debugconfig @@ -32,6 +31,6 @@ aarch64-debug=baseconfig:baseconfig-arm:baseconfig-arm-arm64:debugconfig:debugco # arm armv7hl=baseconfig:baseconfig-arm:baseconfig-arm-armv7:baseconfig-arm-armv7-armv7 -armv7hl-debug=baseconfig:baseconfig-arm:baseconfig-arm-armv7:baseconfig-arm-armv7-armv7:debugconfig:debugconfig-arm:debugconfig-arm-armv7 +armv7hl-debug=baseconfig:baseconfig-arm:baseconfig-arm-armv7:baseconfig-arm-armv7-armv7:debugconfig:debugconfig-arm armv7hl-lpae=baseconfig:baseconfig-arm:baseconfig-arm-armv7:baseconfig-arm-armv7-lpae -armv7hl-lpae-debug=baseconfig:baseconfig-arm:baseconfig-arm-armv7:baseconfig-arm-armv7-lpae:debugconfig:debugconfig-arm:debugconfig-arm-armv7 +armv7hl-lpae-debug=baseconfig:baseconfig-arm:baseconfig-arm-armv7:baseconfig-arm-armv7-lpae:debugconfig:debugconfig-arm diff --git a/debugconfig/arm/armv7/CONFIG_DMADEVICES_DEBUG b/debugconfig/arm/armv7/CONFIG_DMADEVICES_DEBUG deleted file mode 100644 index 7cd4fec86..000000000 --- a/debugconfig/arm/armv7/CONFIG_DMADEVICES_DEBUG +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_DMADEVICES_DEBUG is not set diff --git a/debugconfig/x86/x86_64/CONFIG_NR_CPUS b/debugconfig/x86/x86_64/CONFIG_NR_CPUS new file mode 100644 index 000000000..441191641 --- /dev/null +++ b/debugconfig/x86/x86_64/CONFIG_NR_CPUS @@ -0,0 +1 @@ +CONFIG_NR_CPUS=8192 diff --git a/drm-cma-reduce-dmesg-logs.patch b/drm-cma-reduce-dmesg-logs.patch new file mode 100644 index 000000000..d7252c498 --- /dev/null +++ b/drm-cma-reduce-dmesg-logs.patch @@ -0,0 +1,43 @@ +From patchwork Thu Oct 5 11:29:17 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [v2] drm/gem-cma-helper: Change the level of the allocation failure + message +From: Boris Brezillon +X-Patchwork-Id: 180737 +Message-Id: <20171005112917.15949-1-boris.brezillon@free-electrons.com> +To: David Airlie , Daniel Vetter , + dri-devel@lists.freedesktop.org +Cc: Boris Brezillon +Date: Thu, 5 Oct 2017 13:29:17 +0200 + +drm_gem_cma_create() prints an error message when dma_alloc_wc() fails to +allocate the amount of memory we requested. This can lead to annoying +error messages when CMA is only one possible source of memory for the BO +allocation. Turn this error message into a debug one. + +Signed-off-by: Boris Brezillon +Reviewed-by: Daniel Vetter +Reviewed-by: Eric Engestrom +Reviewed-by: Eric Anholt +--- +Changes in v2: +- Remove __must_check attribute +--- + drivers/gpu/drm/drm_gem_cma_helper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c +index 373e33f22be4..020e7668dfab 100644 +--- a/drivers/gpu/drm/drm_gem_cma_helper.c ++++ b/drivers/gpu/drm/drm_gem_cma_helper.c +@@ -112,7 +112,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, + cma_obj->vaddr = dma_alloc_wc(drm->dev, size, &cma_obj->paddr, + GFP_KERNEL | __GFP_NOWARN); + if (!cma_obj->vaddr) { +- dev_err(drm->dev, "failed to allocate buffer with size %zu\n", ++ dev_dbg(drm->dev, "failed to allocate buffer with size %zu\n", + size); + ret = -ENOMEM; + goto error; diff --git a/drm-i915-Boost-GPU-clocks-if-we-miss-the-pageflip-s-vblank.patch b/drm-i915-Boost-GPU-clocks-if-we-miss-the-pageflip-s-vblank.patch new file mode 100644 index 000000000..07f81116a --- /dev/null +++ b/drm-i915-Boost-GPU-clocks-if-we-miss-the-pageflip-s-vblank.patch @@ -0,0 +1,200 @@ +From patchwork Thu Aug 17 12:37:06 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: drm/i915: Boost GPU clocks if we miss the pageflip's vblank +From: Chris Wilson +X-Patchwork-Id: 172204 +Message-Id: <20170817123706.6777-1-chris@chris-wilson.co.uk> +To: intel-gfx@lists.freedesktop.org +Cc: Daniel Vetter +Date: Thu, 17 Aug 2017 13:37:06 +0100 + +If we miss the current vblank because the gpu was busy, that may cause a +jitter as the frame rate temporarily drops. We try to limit the impact +of this by then boosting the GPU clock to deliver the frame as quickly +as possible. Originally done in commit 6ad790c0f5ac ("drm/i915: Boost GPU +frequency if we detect outstanding pageflips") but was never forward +ported to atomic and finally dropped in commit fd3a40242e87 ("drm/i915: +Rip out legacy page_flip completion/irq handling"). + +References: https://bugs.freedesktop.org/show_bug.cgi?id=102199 +Signed-off-by: Chris Wilson +Cc: Maarten Lankhorst +Cc: Ville Syrjälä +Cc: Daniel Vetter +Tested-by: Lyude Paul +Reviewed-by: Radoslaw Szwichtenberg +--- + drivers/gpu/drm/i915/intel_display.c | 59 ++++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/i915/intel_drv.h | 1 - + drivers/gpu/drm/i915/intel_pm.c | 42 ++----------------------- + 3 files changed, 62 insertions(+), 40 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c +index 0e93ec201fe3..7d5b19553637 100644 +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -12636,6 +12636,55 @@ static const struct drm_crtc_funcs intel_crtc_funcs = { + .set_crc_source = intel_crtc_set_crc_source, + }; + ++struct wait_rps_boost { ++ struct wait_queue_entry wait; ++ ++ struct drm_crtc *crtc; ++ struct drm_i915_gem_request *request; ++}; ++ ++static int do_rps_boost(struct wait_queue_entry *_wait, ++ unsigned mode, int sync, void *key) ++{ ++ struct wait_rps_boost *wait = container_of(_wait, typeof(*wait), wait); ++ struct drm_i915_gem_request *rq = wait->request; ++ ++ gen6_rps_boost(rq, NULL); ++ i915_gem_request_put(rq); ++ ++ drm_crtc_vblank_put(wait->crtc); ++ ++ list_del(&wait->wait.entry); ++ kfree(wait); ++ return 1; ++} ++ ++static void add_rps_boost_after_vblank(struct drm_crtc *crtc, ++ struct dma_fence *fence) ++{ ++ struct wait_rps_boost *wait; ++ ++ if (!dma_fence_is_i915(fence)) ++ return; ++ ++ if (drm_crtc_vblank_get(crtc)) ++ return; ++ ++ wait = kmalloc(sizeof(*wait), GFP_KERNEL); ++ if (!wait) { ++ drm_crtc_vblank_put(crtc); ++ return; ++ } ++ ++ wait->request = to_request(dma_fence_get(fence)); ++ wait->crtc = crtc; ++ ++ wait->wait.func = do_rps_boost; ++ wait->wait.flags = 0; ++ ++ add_wait_queue(drm_crtc_vblank_waitqueue(crtc), &wait->wait); ++} ++ + /** + * intel_prepare_plane_fb - Prepare fb for usage on plane + * @plane: drm plane to prepare for +@@ -12733,12 +12782,22 @@ intel_prepare_plane_fb(struct drm_plane *plane, + return ret; + + if (!new_state->fence) { /* implicit fencing */ ++ struct dma_fence *fence; ++ + ret = i915_sw_fence_await_reservation(&intel_state->commit_ready, + obj->resv, NULL, + false, I915_FENCE_TIMEOUT, + GFP_KERNEL); + if (ret < 0) + return ret; ++ ++ fence = reservation_object_get_excl_rcu(obj->resv); ++ if (fence) { ++ add_rps_boost_after_vblank(new_state->crtc, fence); ++ dma_fence_put(fence); ++ } ++ } else { ++ add_rps_boost_after_vblank(new_state->crtc, new_state->fence); + } + + return 0; +diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h +index fa47285918f4..e092354b4d63 100644 +--- a/drivers/gpu/drm/i915/intel_drv.h ++++ b/drivers/gpu/drm/i915/intel_drv.h +@@ -1844,7 +1844,6 @@ void gen6_rps_reset_ei(struct drm_i915_private *dev_priv); + void gen6_rps_idle(struct drm_i915_private *dev_priv); + void gen6_rps_boost(struct drm_i915_gem_request *rq, + struct intel_rps_client *rps); +-void intel_queue_rps_boost_for_request(struct drm_i915_gem_request *req); + void g4x_wm_get_hw_state(struct drm_device *dev); + void vlv_wm_get_hw_state(struct drm_device *dev); + void ilk_wm_get_hw_state(struct drm_device *dev); +diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c +index ed662937ec3c..c9fa2eb1903c 100644 +--- a/drivers/gpu/drm/i915/intel_pm.c ++++ b/drivers/gpu/drm/i915/intel_pm.c +@@ -6169,6 +6169,7 @@ void gen6_rps_boost(struct drm_i915_gem_request *rq, + struct intel_rps_client *rps) + { + struct drm_i915_private *i915 = rq->i915; ++ unsigned long flags; + bool boost; + + /* This is intentionally racy! We peek at the state here, then +@@ -6178,13 +6179,13 @@ void gen6_rps_boost(struct drm_i915_gem_request *rq, + return; + + boost = false; +- spin_lock_irq(&rq->lock); ++ spin_lock_irqsave(&rq->lock, flags); + if (!rq->waitboost && !i915_gem_request_completed(rq)) { + atomic_inc(&i915->rps.num_waiters); + rq->waitboost = true; + boost = true; + } +- spin_unlock_irq(&rq->lock); ++ spin_unlock_irqrestore(&rq->lock, flags); + if (!boost) + return; + +@@ -9132,43 +9133,6 @@ int intel_freq_opcode(struct drm_i915_private *dev_priv, int val) + return DIV_ROUND_CLOSEST(val, GT_FREQUENCY_MULTIPLIER); + } + +-struct request_boost { +- struct work_struct work; +- struct drm_i915_gem_request *req; +-}; +- +-static void __intel_rps_boost_work(struct work_struct *work) +-{ +- struct request_boost *boost = container_of(work, struct request_boost, work); +- struct drm_i915_gem_request *req = boost->req; +- +- if (!i915_gem_request_completed(req)) +- gen6_rps_boost(req, NULL); +- +- i915_gem_request_put(req); +- kfree(boost); +-} +- +-void intel_queue_rps_boost_for_request(struct drm_i915_gem_request *req) +-{ +- struct request_boost *boost; +- +- if (req == NULL || INTEL_GEN(req->i915) < 6) +- return; +- +- if (i915_gem_request_completed(req)) +- return; +- +- boost = kmalloc(sizeof(*boost), GFP_ATOMIC); +- if (boost == NULL) +- return; +- +- boost->req = i915_gem_request_get(req); +- +- INIT_WORK(&boost->work, __intel_rps_boost_work); +- queue_work(req->i915->wq, &boost->work); +-} +- + void intel_pm_setup(struct drm_i915_private *dev_priv) + { + mutex_init(&dev_priv->rps.hw_lock); diff --git a/efi-lockdown.patch b/efi-lockdown.patch index e04878458..4ac65fd5d 100644 --- a/efi-lockdown.patch +++ b/efi-lockdown.patch @@ -1,53 +1,7 @@ -From df7d76ae50f18d4465e59fdf7f19d3df44906cb5 Mon Sep 17 00:00:00 2001 -From: Josh Boyer -Date: Mon, 21 Nov 2016 23:55:55 +0000 -Subject: [PATCH 07/32] efi: Add EFI_SECURE_BOOT bit - -UEFI machines can be booted in Secure Boot mode. Add a EFI_SECURE_BOOT bit -that can be passed to efi_enabled() to find out whether secure boot is -enabled. - -This will be used by the SysRq+x handler, registered by the x86 arch, to find -out whether secure boot mode is enabled so that it can be disabled. - -Signed-off-by: Josh Boyer -Signed-off-by: David Howells ---- - arch/x86/kernel/setup.c | 1 + - include/linux/efi.h | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 69780ed..447905e 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -1182,6 +1182,7 @@ void __init setup_arch(char **cmdline_p) - pr_info("Secure boot disabled\n"); - break; - case efi_secureboot_mode_enabled: -+ set_bit(EFI_SECURE_BOOT, &efi.flags); - pr_info("Secure boot enabled\n"); - break; - default: -diff --git a/include/linux/efi.h b/include/linux/efi.h -index 94d34e0..6049600 100644 ---- a/include/linux/efi.h -+++ b/include/linux/efi.h -@@ -1069,6 +1069,7 @@ extern int __init efi_setup_pcdp_console(char *); - #define EFI_DBG 8 /* Print additional debug info at runtime */ - #define EFI_NX_PE_DATA 9 /* Can runtime data regions be mapped non-executable? */ - #define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */ -+#define EFI_SECURE_BOOT 11 /* Are we in Secure Boot mode? */ - - #ifdef CONFIG_EFI - /* --- -2.7.4 - -From f05a90c19a9613d8d50597319ed91f691e25b689 Mon Sep 17 00:00:00 2001 +From 646ac5c07196bc3680e34188e55c8cc3565f65e7 Mon Sep 17 00:00:00 2001 From: David Howells -Date: Mon, 21 Nov 2016 23:36:17 +0000 -Subject: [PATCH 09/32] Add the ability to lock down access to the running +Date: Wed, 24 May 2017 14:56:00 +0100 +Subject: [PATCH 01/26] Add the ability to lock down access to the running kernel image Provide a single call to allow kernel code to determine whether the system @@ -57,64 +11,70 @@ modules that aren't validly signed with a key we recognise, fiddling with MSR registers and disallowing hibernation, Signed-off-by: David Howells +Acked-by: James Morris --- - include/linux/kernel.h | 9 +++++++++ - include/linux/security.h | 11 +++++++++++ - security/Kconfig | 15 +++++++++++++++ + include/linux/kernel.h | 17 ++++++++++++++ + include/linux/security.h | 8 +++++++ + security/Kconfig | 8 +++++++ security/Makefile | 3 +++ - security/lock_down.c | 40 ++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 78 insertions(+) + security/lock_down.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 96 insertions(+) create mode 100644 security/lock_down.c diff --git a/include/linux/kernel.h b/include/linux/kernel.h -index cb09238..3cd3be9 100644 +index 0ad4c3044cf9..362da2e4bf53 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h -@@ -273,6 +273,15 @@ extern int oops_may_print(void); - void do_exit(long error_code) __noreturn; - void complete_and_exit(struct completion *, long) __noreturn; - +@@ -287,6 +287,23 @@ static inline void refcount_error_report(struct pt_regs *regs, const char *err) + { } + #endif + +#ifdef CONFIG_LOCK_DOWN_KERNEL -+extern bool kernel_is_locked_down(void); ++extern bool __kernel_is_locked_down(const char *what, bool first); +#else -+static inline bool kernel_is_locked_down(void) ++static inline bool __kernel_is_locked_down(const char *what, bool first) +{ + return false; +} +#endif ++ ++#define kernel_is_locked_down(what) \ ++ ({ \ ++ static bool message_given; \ ++ bool locked_down = __kernel_is_locked_down(what, !message_given); \ ++ message_given = true; \ ++ locked_down; \ ++ }) + /* Internal, do not use. */ int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res); int __must_check _kstrtol(const char *s, unsigned int base, long *res); diff --git a/include/linux/security.h b/include/linux/security.h -index d3868f2..187b74b 100644 +index ce6265960d6c..310775476b68 100644 --- a/include/linux/security.h +++ b/include/linux/security.h -@@ -1679,5 +1679,16 @@ static inline void free_secdata(void *secdata) +@@ -1753,5 +1753,13 @@ static inline void free_secdata(void *secdata) { } #endif /* CONFIG_SECURITY */ - + +#ifdef CONFIG_LOCK_DOWN_KERNEL -+extern void lock_kernel_down(void); -+#ifdef CONFIG_ALLOW_LOCKDOWN_LIFT -+extern void lift_kernel_lockdown(void); -+#endif ++extern void __init init_lockdown(void); +#else -+static inline void lock_kernel_down(void) ++static inline void __init init_lockdown(void) +{ +} +#endif + #endif /* ! __LINUX_SECURITY_H */ - + diff --git a/security/Kconfig b/security/Kconfig -index d900f47..d9b391d 100644 +index e8e449444e65..8e01fd59ae7e 100644 --- a/security/Kconfig +++ b/security/Kconfig -@@ -193,6 +193,21 @@ config STATIC_USERMODEHELPER_PATH +@@ -205,6 +205,14 @@ config STATIC_USERMODEHELPER_PATH If you wish for all usermode helper programs to be disabled, specify an empty string here (i.e. ""). - + +config LOCK_DOWN_KERNEL + bool "Allow the kernel to be 'locked down'" + help @@ -122,19 +82,12 @@ index d900f47..d9b391d 100644 + instance if UEFI secure boot is enabled. Locking down the kernel + turns off various features that might otherwise allow access to the + kernel image (eg. setting MSR registers). -+ -+config ALLOW_LOCKDOWN_LIFT -+ bool -+ help -+ Allow the lockdown on a kernel to be lifted, thereby restoring the -+ ability of userspace to access the kernel image (eg. by SysRq+x under -+ x86). + source security/selinux/Kconfig source security/smack/Kconfig source security/tomoyo/Kconfig diff --git a/security/Makefile b/security/Makefile -index f2d71cd..8c4a43e 100644 +index f2d71cdb8e19..8c4a43e3d4e0 100644 --- a/security/Makefile +++ b/security/Makefile @@ -29,3 +29,6 @@ obj-$(CONFIG_CGROUP_DEVICE) += device_cgroup.o @@ -146,10 +99,10 @@ index f2d71cd..8c4a43e 100644 +obj-$(CONFIG_LOCK_DOWN_KERNEL) += lock_down.o diff --git a/security/lock_down.c b/security/lock_down.c new file mode 100644 -index 0000000..5788c60 +index 000000000000..d8595c0e6673 --- /dev/null +++ b/security/lock_down.c -@@ -0,0 +1,40 @@ +@@ -0,0 +1,60 @@ +/* Lock down the kernel + * + * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. @@ -164,282 +117,110 @@ index 0000000..5788c60 +#include +#include + -+static __read_mostly bool kernel_locked_down; ++static __ro_after_init bool kernel_locked_down; + +/* + * Put the kernel into lock-down mode. + */ -+void lock_kernel_down(void) ++static void __init lock_kernel_down(const char *where) +{ -+ kernel_locked_down = true; ++ if (!kernel_locked_down) { ++ kernel_locked_down = true; ++ pr_notice("Kernel is locked down from %s; see man kernel_lockdown.7\n", ++ where); ++ } +} + -+/* -+ * Take the kernel out of lockdown mode. -+ */ -+void lift_kernel_lockdown(void) ++static int __init lockdown_param(char *ignored) +{ -+ kernel_locked_down = false; ++ lock_kernel_down("command line"); ++ return 0; ++} ++ ++early_param("lockdown", lockdown_param); ++ ++/* ++ * Lock the kernel down from very early in the arch setup. This must happen ++ * prior to things like ACPI being initialised. ++ */ ++void __init init_lockdown(void) ++{ ++#ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT ++ if (efi_enabled(EFI_SECURE_BOOT)) ++ lock_kernel_down("EFI secure boot"); ++#endif +} + +/** + * kernel_is_locked_down - Find out if the kernel is locked down ++ * @what: Tag to use in notice generated if lockdown is in effect + */ -+bool kernel_is_locked_down(void) ++bool __kernel_is_locked_down(const char *what, bool first) +{ ++ if (what && first && kernel_locked_down) ++ pr_notice("Lockdown: %s is restricted; see man kernel_lockdown.7\n", ++ what); + return kernel_locked_down; +} -+EXPORT_SYMBOL(kernel_is_locked_down); ++EXPORT_SYMBOL(__kernel_is_locked_down); -- -2.7.4 +2.13.6 -From fb6feb38e297260d050fc477c72683ac51d07ae3 Mon Sep 17 00:00:00 2001 -From: David Howells -Date: Mon, 21 Nov 2016 23:55:55 +0000 -Subject: [PATCH 10/32] efi: Lock down the kernel if booted in secure boot mode - -UEFI Secure Boot provides a mechanism for ensuring that the firmware will -only load signed bootloaders and kernels. Certain use cases may also -require that all kernel modules also be signed. Add a configuration option -that to lock down the kernel - which includes requiring validly signed -modules - if the kernel is secure-booted. - -Signed-off-by: David Howells ---- - arch/x86/Kconfig | 12 ++++++++++++ - arch/x86/kernel/setup.c | 8 +++++++- - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 874c123..a315974 100644 ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -1816,6 +1816,18 @@ config EFI_MIXED - - If unsure, say N. - -+config EFI_SECURE_BOOT_LOCK_DOWN -+ def_bool n -+ depends on EFI -+ prompt "Lock down the kernel when UEFI Secure Boot is enabled" -+ ---help--- -+ UEFI Secure Boot provides a mechanism for ensuring that the firmware -+ will only load signed bootloaders and kernels. Certain use cases may -+ also require that all kernel modules also be signed and that -+ userspace is prevented from directly changing the running kernel -+ image. Say Y here to automatically lock down the kernel when a -+ system boots with UEFI Secure Boot enabled. -+ - config SECCOMP - def_bool y - prompt "Enable seccomp to safely compute untrusted bytecode" -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 447905e..d44e60e 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -69,6 +69,7 @@ - #include - #include - #include -+#include - - #include - #include