diff options
206 files changed, 1541 insertions, 1471 deletions
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt index 0ef00be44b01..43404b197933 100644 --- a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt | |||
| @@ -7,7 +7,10 @@ Required properties: | |||
| 7 | - "renesas,thermal-r8a73a4" (R-Mobile AP6) | 7 | - "renesas,thermal-r8a73a4" (R-Mobile AP6) |
| 8 | - "renesas,thermal-r8a7779" (R-Car H1) | 8 | - "renesas,thermal-r8a7779" (R-Car H1) |
| 9 | - "renesas,thermal-r8a7790" (R-Car H2) | 9 | - "renesas,thermal-r8a7790" (R-Car H2) |
| 10 | - "renesas,thermal-r8a7791" (R-Car M2) | 10 | - "renesas,thermal-r8a7791" (R-Car M2-W) |
| 11 | - "renesas,thermal-r8a7792" (R-Car V2H) | ||
| 12 | - "renesas,thermal-r8a7793" (R-Car M2-N) | ||
| 13 | - "renesas,thermal-r8a7794" (R-Car E2) | ||
| 11 | - reg : Address range of the thermal registers. | 14 | - reg : Address range of the thermal registers. |
| 12 | The 1st reg will be recognized as common register | 15 | The 1st reg will be recognized as common register |
| 13 | if it has "interrupts". | 16 | if it has "interrupts". |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4c81a860cc2b..479f33204a37 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -3621,7 +3621,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 3621 | 3621 | ||
| 3622 | usb-storage.delay_use= | 3622 | usb-storage.delay_use= |
| 3623 | [UMS] The delay in seconds before a new device is | 3623 | [UMS] The delay in seconds before a new device is |
| 3624 | scanned for Logical Units (default 5). | 3624 | scanned for Logical Units (default 1). |
| 3625 | 3625 | ||
| 3626 | usb-storage.quirks= | 3626 | usb-storage.quirks= |
| 3627 | [UMS] A list of quirks entries to supplement or | 3627 | [UMS] A list of quirks entries to supplement or |
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt index eeb11a28e4fc..e5a940e3d304 100644 --- a/Documentation/video4linux/vivid.txt +++ b/Documentation/video4linux/vivid.txt | |||
| @@ -221,12 +221,11 @@ ccs_out_mode: specify the allowed video output crop/compose/scaling combination | |||
| 221 | key, not quality. | 221 | key, not quality. |
| 222 | 222 | ||
| 223 | multiplanar: select whether each device instance supports multi-planar formats, | 223 | multiplanar: select whether each device instance supports multi-planar formats, |
| 224 | and thus the V4L2 multi-planar API. By default the first device instance | 224 | and thus the V4L2 multi-planar API. By default device instances are |
| 225 | is single-planar, the second multi-planar, and it keeps alternating. | 225 | single-planar. |
| 226 | 226 | ||
| 227 | This module option can override that for each instance. Values are: | 227 | This module option can override that for each instance. Values are: |
| 228 | 228 | ||
| 229 | 0: use alternating single and multi-planar devices. | ||
| 230 | 1: this is a single-planar instance. | 229 | 1: this is a single-planar instance. |
| 231 | 2: this is a multi-planar instance. | 230 | 2: this is a multi-planar instance. |
| 232 | 231 | ||
| @@ -975,9 +974,8 @@ is set, then the alpha component is only used for the color red and set to | |||
| 975 | 0 otherwise. | 974 | 0 otherwise. |
| 976 | 975 | ||
| 977 | The driver has to be configured to support the multiplanar formats. By default | 976 | The driver has to be configured to support the multiplanar formats. By default |
| 978 | the first driver instance is single-planar, the second is multi-planar, and it | 977 | the driver instances are single-planar. This can be changed by setting the |
| 979 | keeps alternating. This can be changed by setting the multiplanar module option, | 978 | multiplanar module option, see section 1 for more details on that option. |
| 980 | see section 1 for more details on that option. | ||
| 981 | 979 | ||
| 982 | If the driver instance is using the multiplanar formats/API, then the first | 980 | If the driver instance is using the multiplanar formats/API, then the first |
| 983 | single planar format (YUYV) and the multiplanar NV16M and NV61M formats the | 981 | single planar format (YUYV) and the multiplanar NV16M and NV61M formats the |
| @@ -1021,7 +1019,7 @@ the output overlay for the video output, turn on video looping and capture | |||
| 1021 | to see the blended framebuffer overlay that's being written to by the second | 1019 | to see the blended framebuffer overlay that's being written to by the second |
| 1022 | instance. This setup would require the following commands: | 1020 | instance. This setup would require the following commands: |
| 1023 | 1021 | ||
| 1024 | $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 multiplanar=1,1 | 1022 | $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 |
| 1025 | $ v4l2-ctl -d1 --find-fb | 1023 | $ v4l2-ctl -d1 --find-fb |
| 1026 | /dev/fb1 is the framebuffer associated with base address 0x12800000 | 1024 | /dev/fb1 is the framebuffer associated with base address 0x12800000 |
| 1027 | $ sudo v4l2-ctl -d2 --set-fbuf fb=1 | 1025 | $ sudo v4l2-ctl -d2 --set-fbuf fb=1 |
diff --git a/MAINTAINERS b/MAINTAINERS index fd3771cba0c9..2b87aee48ab0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1543,6 +1543,7 @@ F: arch/arm/mach-pxa/include/mach/z2.h | |||
| 1543 | 1543 | ||
| 1544 | ARM/ZYNQ ARCHITECTURE | 1544 | ARM/ZYNQ ARCHITECTURE |
| 1545 | M: Michal Simek <michal.simek@xilinx.com> | 1545 | M: Michal Simek <michal.simek@xilinx.com> |
| 1546 | R: Sören Brinkmann <soren.brinkmann@xilinx.com> | ||
| 1546 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1547 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1547 | W: http://wiki.xilinx.com | 1548 | W: http://wiki.xilinx.com |
| 1548 | T: git git://git.xilinx.com/linux-xlnx.git | 1549 | T: git git://git.xilinx.com/linux-xlnx.git |
| @@ -2078,8 +2079,9 @@ F: drivers/clocksource/bcm_kona_timer.c | |||
| 2078 | 2079 | ||
| 2079 | BROADCOM BCM2835 ARM ARCHITECTURE | 2080 | BROADCOM BCM2835 ARM ARCHITECTURE |
| 2080 | M: Stephen Warren <swarren@wwwdotorg.org> | 2081 | M: Stephen Warren <swarren@wwwdotorg.org> |
| 2082 | M: Lee Jones <lee@kernel.org> | ||
| 2081 | L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers) | 2083 | L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2082 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi.git | 2084 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/rpi/linux-rpi.git |
| 2083 | S: Maintained | 2085 | S: Maintained |
| 2084 | N: bcm2835 | 2086 | N: bcm2835 |
| 2085 | 2087 | ||
| @@ -7186,6 +7188,7 @@ F: drivers/crypto/picoxcell* | |||
| 7186 | 7188 | ||
| 7187 | PIN CONTROL SUBSYSTEM | 7189 | PIN CONTROL SUBSYSTEM |
| 7188 | M: Linus Walleij <linus.walleij@linaro.org> | 7190 | M: Linus Walleij <linus.walleij@linaro.org> |
| 7191 | L: linux-gpio@vger.kernel.org | ||
| 7189 | S: Maintained | 7192 | S: Maintained |
| 7190 | F: drivers/pinctrl/ | 7193 | F: drivers/pinctrl/ |
| 7191 | F: include/linux/pinctrl/ | 7194 | F: include/linux/pinctrl/ |
| @@ -8490,7 +8493,6 @@ F: arch/arm/mach-s3c24xx/bast-irq.c | |||
| 8490 | TI DAVINCI MACHINE SUPPORT | 8493 | TI DAVINCI MACHINE SUPPORT |
| 8491 | M: Sekhar Nori <nsekhar@ti.com> | 8494 | M: Sekhar Nori <nsekhar@ti.com> |
| 8492 | M: Kevin Hilman <khilman@deeprootsystems.com> | 8495 | M: Kevin Hilman <khilman@deeprootsystems.com> |
| 8493 | L: davinci-linux-open-source@linux.davincidsp.com (moderated for non-subscribers) | ||
| 8494 | T: git git://gitorious.org/linux-davinci/linux-davinci.git | 8496 | T: git git://gitorious.org/linux-davinci/linux-davinci.git |
| 8495 | Q: http://patchwork.kernel.org/project/linux-davinci/list/ | 8497 | Q: http://patchwork.kernel.org/project/linux-davinci/list/ |
| 8496 | S: Supported | 8498 | S: Supported |
| @@ -8500,7 +8502,6 @@ F: drivers/i2c/busses/i2c-davinci.c | |||
| 8500 | TI DAVINCI SERIES MEDIA DRIVER | 8502 | TI DAVINCI SERIES MEDIA DRIVER |
| 8501 | M: Lad, Prabhakar <prabhakar.csengg@gmail.com> | 8503 | M: Lad, Prabhakar <prabhakar.csengg@gmail.com> |
| 8502 | L: linux-media@vger.kernel.org | 8504 | L: linux-media@vger.kernel.org |
| 8503 | L: davinci-linux-open-source@linux.davincidsp.com (moderated for non-subscribers) | ||
| 8504 | W: http://linuxtv.org/ | 8505 | W: http://linuxtv.org/ |
| 8505 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | 8506 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ |
| 8506 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | 8507 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git |
| @@ -9710,11 +9711,6 @@ S: Maintained | |||
| 9710 | F: Documentation/hid/hiddev.txt | 9711 | F: Documentation/hid/hiddev.txt |
| 9711 | F: drivers/hid/usbhid/ | 9712 | F: drivers/hid/usbhid/ |
| 9712 | 9713 | ||
| 9713 | USB/IP DRIVERS | ||
| 9714 | L: linux-usb@vger.kernel.org | ||
| 9715 | S: Orphan | ||
| 9716 | F: drivers/staging/usbip/ | ||
| 9717 | |||
| 9718 | USB ISP116X DRIVER | 9714 | USB ISP116X DRIVER |
| 9719 | M: Olav Kongas <ok@artecdesign.ee> | 9715 | M: Olav Kongas <ok@artecdesign.ee> |
| 9720 | L: linux-usb@vger.kernel.org | 9716 | L: linux-usb@vger.kernel.org |
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 3 | 1 | VERSION = 3 |
| 2 | PATCHLEVEL = 18 | 2 | PATCHLEVEL = 18 |
| 3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
| 4 | EXTRAVERSION = -rc3 | 4 | EXTRAVERSION = -rc4 |
| 5 | NAME = Diseased Newt | 5 | NAME = Diseased Newt |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 03dc4c1a8736..d8f6a2ec3d4e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
| @@ -1187,7 +1187,7 @@ config DEBUG_UART_VIRT | |||
| 1187 | default 0xf1c28000 if DEBUG_SUNXI_UART0 | 1187 | default 0xf1c28000 if DEBUG_SUNXI_UART0 |
| 1188 | default 0xf1c28400 if DEBUG_SUNXI_UART1 | 1188 | default 0xf1c28400 if DEBUG_SUNXI_UART1 |
| 1189 | default 0xf1f02800 if DEBUG_SUNXI_R_UART | 1189 | default 0xf1f02800 if DEBUG_SUNXI_R_UART |
| 1190 | default 0xf2100000 if DEBUG_PXA_UART1 | 1190 | default 0xf6200000 if DEBUG_PXA_UART1 |
| 1191 | default 0xf4090000 if ARCH_LPC32XX | 1191 | default 0xf4090000 if ARCH_LPC32XX |
| 1192 | default 0xf4200000 if ARCH_GEMINI | 1192 | default 0xf4200000 if ARCH_GEMINI |
| 1193 | default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \ | 1193 | default 0xf7000000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART0 || \ |
diff --git a/arch/arm/boot/dts/vf610-cosmic.dts b/arch/arm/boot/dts/vf610-cosmic.dts index 3fd1b74e1216..de1b453c2932 100644 --- a/arch/arm/boot/dts/vf610-cosmic.dts +++ b/arch/arm/boot/dts/vf610-cosmic.dts | |||
| @@ -33,6 +33,13 @@ | |||
| 33 | 33 | ||
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | &esdhc1 { | ||
| 37 | pinctrl-names = "default"; | ||
| 38 | pinctrl-0 = <&pinctrl_esdhc1>; | ||
| 39 | bus-width = <4>; | ||
| 40 | status = "okay"; | ||
| 41 | }; | ||
| 42 | |||
| 36 | &fec1 { | 43 | &fec1 { |
| 37 | phy-mode = "rmii"; | 44 | phy-mode = "rmii"; |
| 38 | pinctrl-names = "default"; | 45 | pinctrl-names = "default"; |
| @@ -42,6 +49,18 @@ | |||
| 42 | 49 | ||
| 43 | &iomuxc { | 50 | &iomuxc { |
| 44 | vf610-cosmic { | 51 | vf610-cosmic { |
| 52 | pinctrl_esdhc1: esdhc1grp { | ||
| 53 | fsl,pins = < | ||
| 54 | VF610_PAD_PTA24__ESDHC1_CLK 0x31ef | ||
| 55 | VF610_PAD_PTA25__ESDHC1_CMD 0x31ef | ||
| 56 | VF610_PAD_PTA26__ESDHC1_DAT0 0x31ef | ||
| 57 | VF610_PAD_PTA27__ESDHC1_DAT1 0x31ef | ||
| 58 | VF610_PAD_PTA28__ESDHC1_DATA2 0x31ef | ||
| 59 | VF610_PAD_PTA29__ESDHC1_DAT3 0x31ef | ||
| 60 | VF610_PAD_PTB28__GPIO_98 0x219d | ||
| 61 | >; | ||
| 62 | }; | ||
| 63 | |||
| 45 | pinctrl_fec1: fec1grp { | 64 | pinctrl_fec1: fec1grp { |
| 46 | fsl,pins = < | 65 | fsl,pins = < |
| 47 | VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2 | 66 | VF610_PAD_PTC9__ENET_RMII1_MDC 0x30d2 |
diff --git a/arch/arm/boot/dts/zynq-parallella.dts b/arch/arm/boot/dts/zynq-parallella.dts index e1f51ca127fe..0429bbd89fba 100644 --- a/arch/arm/boot/dts/zynq-parallella.dts +++ b/arch/arm/boot/dts/zynq-parallella.dts | |||
| @@ -34,6 +34,10 @@ | |||
| 34 | }; | 34 | }; |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | &clkc { | ||
| 38 | fclk-enable = <0xf>; | ||
| 39 | }; | ||
| 40 | |||
| 37 | &gem0 { | 41 | &gem0 { |
| 38 | status = "okay"; | 42 | status = "okay"; |
| 39 | phy-mode = "rgmii-id"; | 43 | phy-mode = "rgmii-id"; |
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index d86771abbf57..72041f002b7e 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
| 27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 28 | #include <linux/edma.h> | 28 | #include <linux/edma.h> |
| 29 | #include <linux/dma-mapping.h> | ||
| 29 | #include <linux/of_address.h> | 30 | #include <linux/of_address.h> |
| 30 | #include <linux/of_device.h> | 31 | #include <linux/of_device.h> |
| 31 | #include <linux/of_dma.h> | 32 | #include <linux/of_dma.h> |
| @@ -1623,6 +1624,11 @@ static int edma_probe(struct platform_device *pdev) | |||
| 1623 | struct device_node *node = pdev->dev.of_node; | 1624 | struct device_node *node = pdev->dev.of_node; |
| 1624 | struct device *dev = &pdev->dev; | 1625 | struct device *dev = &pdev->dev; |
| 1625 | int ret; | 1626 | int ret; |
| 1627 | struct platform_device_info edma_dev_info = { | ||
| 1628 | .name = "edma-dma-engine", | ||
| 1629 | .dma_mask = DMA_BIT_MASK(32), | ||
| 1630 | .parent = &pdev->dev, | ||
| 1631 | }; | ||
| 1626 | 1632 | ||
| 1627 | if (node) { | 1633 | if (node) { |
| 1628 | /* Check if this is a second instance registered */ | 1634 | /* Check if this is a second instance registered */ |
| @@ -1793,6 +1799,9 @@ static int edma_probe(struct platform_device *pdev) | |||
| 1793 | edma_write_array(j, EDMA_QRAE, i, 0x0); | 1799 | edma_write_array(j, EDMA_QRAE, i, 0x0); |
| 1794 | } | 1800 | } |
| 1795 | arch_num_cc++; | 1801 | arch_num_cc++; |
| 1802 | |||
| 1803 | edma_dev_info.id = j; | ||
| 1804 | platform_device_register_full(&edma_dev_info); | ||
| 1796 | } | 1805 | } |
| 1797 | 1806 | ||
| 1798 | return 0; | 1807 | return 0; |
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index e688741c89aa..e6b0007355f8 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig | |||
| @@ -97,6 +97,7 @@ CONFIG_SERIAL_IMX_CONSOLE=y | |||
| 97 | # CONFIG_HW_RANDOM is not set | 97 | # CONFIG_HW_RANDOM is not set |
| 98 | CONFIG_I2C_CHARDEV=y | 98 | CONFIG_I2C_CHARDEV=y |
| 99 | CONFIG_I2C_IMX=y | 99 | CONFIG_I2C_IMX=y |
| 100 | CONFIG_SPI=y | ||
| 100 | CONFIG_SPI_IMX=y | 101 | CONFIG_SPI_IMX=y |
| 101 | CONFIG_SPI_SPIDEV=y | 102 | CONFIG_SPI_SPIDEV=y |
| 102 | CONFIG_GPIO_SYSFS=y | 103 | CONFIG_GPIO_SYSFS=y |
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 8fca6e276b69..6790f1b3f3a1 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
| @@ -158,6 +158,7 @@ CONFIG_I2C_CHARDEV=y | |||
| 158 | CONFIG_I2C_ALGOPCF=m | 158 | CONFIG_I2C_ALGOPCF=m |
| 159 | CONFIG_I2C_ALGOPCA=m | 159 | CONFIG_I2C_ALGOPCA=m |
| 160 | CONFIG_I2C_IMX=y | 160 | CONFIG_I2C_IMX=y |
| 161 | CONFIG_SPI=y | ||
| 161 | CONFIG_SPI_IMX=y | 162 | CONFIG_SPI_IMX=y |
| 162 | CONFIG_GPIO_SYSFS=y | 163 | CONFIG_GPIO_SYSFS=y |
| 163 | CONFIG_GPIO_MC9S08DZ60=y | 164 | CONFIG_GPIO_MC9S08DZ60=y |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index f1dc7fc668f3..3487046d8a78 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
| @@ -235,6 +235,7 @@ CONFIG_SPI_TEGRA20_SLINK=y | |||
| 235 | CONFIG_SPI_XILINX=y | 235 | CONFIG_SPI_XILINX=y |
| 236 | CONFIG_PINCTRL_AS3722=y | 236 | CONFIG_PINCTRL_AS3722=y |
| 237 | CONFIG_PINCTRL_PALMAS=y | 237 | CONFIG_PINCTRL_PALMAS=y |
| 238 | CONFIG_PINCTRL_APQ8084=y | ||
| 238 | CONFIG_GPIO_SYSFS=y | 239 | CONFIG_GPIO_SYSFS=y |
| 239 | CONFIG_GPIO_GENERIC_PLATFORM=y | 240 | CONFIG_GPIO_GENERIC_PLATFORM=y |
| 240 | CONFIG_GPIO_DWAPB=y | 241 | CONFIG_GPIO_DWAPB=y |
| @@ -411,6 +412,7 @@ CONFIG_NVEC_POWER=y | |||
| 411 | CONFIG_NVEC_PAZ00=y | 412 | CONFIG_NVEC_PAZ00=y |
| 412 | CONFIG_QCOM_GSBI=y | 413 | CONFIG_QCOM_GSBI=y |
| 413 | CONFIG_COMMON_CLK_QCOM=y | 414 | CONFIG_COMMON_CLK_QCOM=y |
| 415 | CONFIG_APQ_MMCC_8084=y | ||
| 414 | CONFIG_MSM_GCC_8660=y | 416 | CONFIG_MSM_GCC_8660=y |
| 415 | CONFIG_MSM_MMCC_8960=y | 417 | CONFIG_MSM_MMCC_8960=y |
| 416 | CONFIG_MSM_MMCC_8974=y | 418 | CONFIG_MSM_MMCC_8974=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 16e719c268dd..b3f86670d2eb 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
| @@ -86,7 +86,6 @@ CONFIG_IP_PNP_DHCP=y | |||
| 86 | CONFIG_IP_PNP_BOOTP=y | 86 | CONFIG_IP_PNP_BOOTP=y |
| 87 | CONFIG_IP_PNP_RARP=y | 87 | CONFIG_IP_PNP_RARP=y |
| 88 | # CONFIG_INET_LRO is not set | 88 | # CONFIG_INET_LRO is not set |
| 89 | CONFIG_IPV6=y | ||
| 90 | CONFIG_NETFILTER=y | 89 | CONFIG_NETFILTER=y |
| 91 | CONFIG_CAN=m | 90 | CONFIG_CAN=m |
| 92 | CONFIG_CAN_C_CAN=m | 91 | CONFIG_CAN_C_CAN=m |
| @@ -112,6 +111,7 @@ CONFIG_MTD_OOPS=y | |||
| 112 | CONFIG_MTD_CFI=y | 111 | CONFIG_MTD_CFI=y |
| 113 | CONFIG_MTD_CFI_INTELEXT=y | 112 | CONFIG_MTD_CFI_INTELEXT=y |
| 114 | CONFIG_MTD_NAND=y | 113 | CONFIG_MTD_NAND=y |
| 114 | CONFIG_MTD_NAND_ECC_BCH=y | ||
| 115 | CONFIG_MTD_NAND_OMAP2=y | 115 | CONFIG_MTD_NAND_OMAP2=y |
| 116 | CONFIG_MTD_ONENAND=y | 116 | CONFIG_MTD_ONENAND=y |
| 117 | CONFIG_MTD_ONENAND_VERIFY_WRITE=y | 117 | CONFIG_MTD_ONENAND_VERIFY_WRITE=y |
| @@ -317,7 +317,7 @@ CONFIG_EXT4_FS=y | |||
| 317 | CONFIG_FANOTIFY=y | 317 | CONFIG_FANOTIFY=y |
| 318 | CONFIG_QUOTA=y | 318 | CONFIG_QUOTA=y |
| 319 | CONFIG_QFMT_V2=y | 319 | CONFIG_QFMT_V2=y |
| 320 | CONFIG_AUTOFS4_FS=y | 320 | CONFIG_AUTOFS4_FS=m |
| 321 | CONFIG_MSDOS_FS=y | 321 | CONFIG_MSDOS_FS=y |
| 322 | CONFIG_VFAT_FS=y | 322 | CONFIG_VFAT_FS=y |
| 323 | CONFIG_TMPFS=y | 323 | CONFIG_TMPFS=y |
diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig index d7a5855a5db8..a2956c3112f1 100644 --- a/arch/arm/configs/socfpga_defconfig +++ b/arch/arm/configs/socfpga_defconfig | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 2 | CONFIG_FHANDLE=y | ||
| 3 | CONFIG_HIGH_RES_TIMERS=y | ||
| 3 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
| 4 | CONFIG_IKCONFIG_PROC=y | 5 | CONFIG_IKCONFIG_PROC=y |
| 5 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
| @@ -11,23 +12,17 @@ CONFIG_PROFILING=y | |||
| 11 | CONFIG_OPROFILE=y | 12 | CONFIG_OPROFILE=y |
| 12 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
| 13 | CONFIG_MODULE_UNLOAD=y | 14 | CONFIG_MODULE_UNLOAD=y |
| 14 | CONFIG_HOTPLUG=y | ||
| 15 | # CONFIG_LBDAF is not set | 15 | # CONFIG_LBDAF is not set |
| 16 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
| 17 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
| 18 | # CONFIG_IOSCHED_CFQ is not set | 18 | # CONFIG_IOSCHED_CFQ is not set |
| 19 | CONFIG_ARCH_SOCFPGA=y | 19 | CONFIG_ARCH_SOCFPGA=y |
| 20 | CONFIG_MACH_SOCFPGA_CYCLONE5=y | ||
| 21 | CONFIG_ARM_THUMBEE=y | 20 | CONFIG_ARM_THUMBEE=y |
| 22 | # CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set | ||
| 23 | # CONFIG_CACHE_L2X0 is not set | ||
| 24 | CONFIG_HIGH_RES_TIMERS=y | ||
| 25 | CONFIG_SMP=y | 21 | CONFIG_SMP=y |
| 26 | CONFIG_NR_CPUS=2 | 22 | CONFIG_NR_CPUS=2 |
| 27 | CONFIG_AEABI=y | 23 | CONFIG_AEABI=y |
| 28 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 24 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
| 29 | CONFIG_ZBOOT_ROM_BSS=0x0 | 25 | CONFIG_ZBOOT_ROM_BSS=0x0 |
| 30 | CONFIG_CMDLINE="" | ||
| 31 | CONFIG_VFP=y | 26 | CONFIG_VFP=y |
| 32 | CONFIG_NEON=y | 27 | CONFIG_NEON=y |
| 33 | CONFIG_NET=y | 28 | CONFIG_NET=y |
| @@ -41,38 +36,30 @@ CONFIG_IP_PNP=y | |||
| 41 | CONFIG_IP_PNP_DHCP=y | 36 | CONFIG_IP_PNP_DHCP=y |
| 42 | CONFIG_IP_PNP_BOOTP=y | 37 | CONFIG_IP_PNP_BOOTP=y |
| 43 | CONFIG_IP_PNP_RARP=y | 38 | CONFIG_IP_PNP_RARP=y |
| 39 | CONFIG_IPV6=y | ||
| 40 | CONFIG_NETWORK_PHY_TIMESTAMPING=y | ||
| 41 | CONFIG_VLAN_8021Q=y | ||
| 42 | CONFIG_VLAN_8021Q_GVRP=y | ||
| 44 | CONFIG_CAN=y | 43 | CONFIG_CAN=y |
| 45 | CONFIG_CAN_RAW=y | ||
| 46 | CONFIG_CAN_BCM=y | ||
| 47 | CONFIG_CAN_GW=y | ||
| 48 | CONFIG_CAN_DEV=y | ||
| 49 | CONFIG_CAN_CALC_BITTIMING=y | ||
| 50 | CONFIG_CAN_C_CAN=y | 44 | CONFIG_CAN_C_CAN=y |
| 51 | CONFIG_CAN_C_CAN_PLATFORM=y | 45 | CONFIG_CAN_C_CAN_PLATFORM=y |
| 52 | CONFIG_CAN_DEBUG_DEVICES=y | 46 | CONFIG_CAN_DEBUG_DEVICES=y |
| 53 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 47 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
| 54 | CONFIG_DEVTMPFS=y | 48 | CONFIG_DEVTMPFS=y |
| 55 | CONFIG_PROC_DEVICETREE=y | 49 | CONFIG_DEVTMPFS_MOUNT=y |
| 56 | CONFIG_BLK_DEV_RAM=y | 50 | CONFIG_BLK_DEV_RAM=y |
| 57 | CONFIG_BLK_DEV_RAM_COUNT=2 | 51 | CONFIG_BLK_DEV_RAM_COUNT=2 |
| 58 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 52 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
| 53 | CONFIG_SRAM=y | ||
| 59 | CONFIG_SCSI=y | 54 | CONFIG_SCSI=y |
| 60 | # CONFIG_SCSI_PROC_FS is not set | 55 | # CONFIG_SCSI_PROC_FS is not set |
| 61 | CONFIG_BLK_DEV_SD=y | 56 | CONFIG_BLK_DEV_SD=y |
| 62 | # CONFIG_SCSI_LOWLEVEL is not set | 57 | # CONFIG_SCSI_LOWLEVEL is not set |
| 63 | CONFIG_NETDEVICES=y | 58 | CONFIG_NETDEVICES=y |
| 64 | CONFIG_STMMAC_ETH=y | 59 | CONFIG_STMMAC_ETH=y |
| 60 | CONFIG_DWMAC_SOCFPGA=y | ||
| 65 | CONFIG_MICREL_PHY=y | 61 | CONFIG_MICREL_PHY=y |
| 66 | # CONFIG_STMMAC_PHY_ID_ZERO_WORKAROUND is not set | ||
| 67 | CONFIG_INPUT_EVDEV=y | 62 | CONFIG_INPUT_EVDEV=y |
| 68 | CONFIG_DWMAC_SOCFPGA=y | ||
| 69 | CONFIG_PPS=y | ||
| 70 | CONFIG_NETWORK_PHY_TIMESTAMPING=y | ||
| 71 | CONFIG_PTP_1588_CLOCK=y | ||
| 72 | CONFIG_VLAN_8021Q=y | ||
| 73 | CONFIG_VLAN_8021Q_GVRP=y | ||
| 74 | CONFIG_GARP=y | ||
| 75 | CONFIG_IPV6=y | ||
| 76 | # CONFIG_SERIO_SERPORT is not set | 63 | # CONFIG_SERIO_SERPORT is not set |
| 77 | CONFIG_SERIO_AMBAKMI=y | 64 | CONFIG_SERIO_AMBAKMI=y |
| 78 | CONFIG_LEGACY_PTY_COUNT=16 | 65 | CONFIG_LEGACY_PTY_COUNT=16 |
| @@ -81,45 +68,43 @@ CONFIG_SERIAL_8250_CONSOLE=y | |||
| 81 | CONFIG_SERIAL_8250_NR_UARTS=2 | 68 | CONFIG_SERIAL_8250_NR_UARTS=2 |
| 82 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | 69 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 |
| 83 | CONFIG_SERIAL_8250_DW=y | 70 | CONFIG_SERIAL_8250_DW=y |
| 71 | CONFIG_I2C=y | ||
| 72 | CONFIG_I2C_CHARDEV=y | ||
| 73 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | ||
| 84 | CONFIG_GPIOLIB=y | 74 | CONFIG_GPIOLIB=y |
| 85 | CONFIG_GPIO_SYSFS=y | 75 | CONFIG_GPIO_SYSFS=y |
| 86 | CONFIG_GPIO_DWAPB=y | 76 | CONFIG_GPIO_DWAPB=y |
| 87 | # CONFIG_RTC_HCTOSYS is not set | 77 | CONFIG_PMBUS=y |
| 78 | CONFIG_SENSORS_LTC2978=y | ||
| 79 | CONFIG_SENSORS_LTC2978_REGULATOR=y | ||
| 88 | CONFIG_WATCHDOG=y | 80 | CONFIG_WATCHDOG=y |
| 89 | CONFIG_DW_WATCHDOG=y | 81 | CONFIG_DW_WATCHDOG=y |
| 82 | CONFIG_REGULATOR=y | ||
| 83 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | ||
| 84 | CONFIG_USB=y | ||
| 85 | CONFIG_USB_DWC2=y | ||
| 86 | CONFIG_USB_DWC2_HOST=y | ||
| 87 | CONFIG_MMC=y | ||
| 88 | CONFIG_MMC_DW=y | ||
| 90 | CONFIG_EXT2_FS=y | 89 | CONFIG_EXT2_FS=y |
| 91 | CONFIG_EXT2_FS_XATTR=y | 90 | CONFIG_EXT2_FS_XATTR=y |
| 92 | CONFIG_EXT2_FS_POSIX_ACL=y | 91 | CONFIG_EXT2_FS_POSIX_ACL=y |
| 93 | CONFIG_EXT3_FS=y | 92 | CONFIG_EXT3_FS=y |
| 94 | CONFIG_NFS_FS=y | 93 | CONFIG_EXT4_FS=y |
| 95 | CONFIG_ROOT_NFS=y | ||
| 96 | # CONFIG_DNOTIFY is not set | ||
| 97 | # CONFIG_INOTIFY_USER is not set | ||
| 98 | CONFIG_FHANDLE=y | ||
| 99 | CONFIG_VFAT_FS=y | 94 | CONFIG_VFAT_FS=y |
| 100 | CONFIG_NTFS_FS=y | 95 | CONFIG_NTFS_FS=y |
| 101 | CONFIG_NTFS_RW=y | 96 | CONFIG_NTFS_RW=y |
| 102 | CONFIG_TMPFS=y | 97 | CONFIG_TMPFS=y |
| 103 | CONFIG_JFFS2_FS=y | 98 | CONFIG_CONFIGFS_FS=y |
| 99 | CONFIG_NFS_FS=y | ||
| 100 | CONFIG_ROOT_NFS=y | ||
| 104 | CONFIG_NLS_CODEPAGE_437=y | 101 | CONFIG_NLS_CODEPAGE_437=y |
| 105 | CONFIG_NLS_ISO8859_1=y | 102 | CONFIG_NLS_ISO8859_1=y |
| 103 | CONFIG_PRINTK_TIME=y | ||
| 104 | CONFIG_DEBUG_INFO=y | ||
| 106 | CONFIG_MAGIC_SYSRQ=y | 105 | CONFIG_MAGIC_SYSRQ=y |
| 107 | CONFIG_DETECT_HUNG_TASK=y | 106 | CONFIG_DETECT_HUNG_TASK=y |
| 108 | # CONFIG_SCHED_DEBUG is not set | 107 | # CONFIG_SCHED_DEBUG is not set |
| 109 | CONFIG_DEBUG_INFO=y | ||
| 110 | CONFIG_ENABLE_DEFAULT_TRACERS=y | 108 | CONFIG_ENABLE_DEFAULT_TRACERS=y |
| 111 | CONFIG_DEBUG_USER=y | 109 | CONFIG_DEBUG_USER=y |
| 112 | CONFIG_XZ_DEC=y | 110 | CONFIG_XZ_DEC=y |
| 113 | CONFIG_I2C=y | ||
| 114 | CONFIG_I2C_DESIGNWARE_CORE=y | ||
| 115 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | ||
| 116 | CONFIG_I2C_CHARDEV=y | ||
| 117 | CONFIG_MMC=y | ||
| 118 | CONFIG_MMC_DW=y | ||
| 119 | CONFIG_PM=y | ||
| 120 | CONFIG_SUSPEND=y | ||
| 121 | CONFIG_MMC_UNSAFE_RESUME=y | ||
| 122 | CONFIG_USB=y | ||
| 123 | CONFIG_USB_DWC2=y | ||
| 124 | CONFIG_USB_DWC2_HOST=y | ||
| 125 | CONFIG_USB_DWC2_PLATFORM=y | ||
diff --git a/arch/arm/mach-imx/clk-vf610.c b/arch/arm/mach-imx/clk-vf610.c index a17818475050..409637254594 100644 --- a/arch/arm/mach-imx/clk-vf610.c +++ b/arch/arm/mach-imx/clk-vf610.c | |||
| @@ -58,8 +58,14 @@ | |||
| 58 | #define PFD_PLL1_BASE (anatop_base + 0x2b0) | 58 | #define PFD_PLL1_BASE (anatop_base + 0x2b0) |
| 59 | #define PFD_PLL2_BASE (anatop_base + 0x100) | 59 | #define PFD_PLL2_BASE (anatop_base + 0x100) |
| 60 | #define PFD_PLL3_BASE (anatop_base + 0xf0) | 60 | #define PFD_PLL3_BASE (anatop_base + 0xf0) |
| 61 | #define PLL1_CTRL (anatop_base + 0x270) | ||
| 62 | #define PLL2_CTRL (anatop_base + 0x30) | ||
| 61 | #define PLL3_CTRL (anatop_base + 0x10) | 63 | #define PLL3_CTRL (anatop_base + 0x10) |
| 64 | #define PLL4_CTRL (anatop_base + 0x70) | ||
| 65 | #define PLL5_CTRL (anatop_base + 0xe0) | ||
| 66 | #define PLL6_CTRL (anatop_base + 0xa0) | ||
| 62 | #define PLL7_CTRL (anatop_base + 0x20) | 67 | #define PLL7_CTRL (anatop_base + 0x20) |
| 68 | #define ANA_MISC1 (anatop_base + 0x160) | ||
| 63 | 69 | ||
| 64 | static void __iomem *anatop_base; | 70 | static void __iomem *anatop_base; |
| 65 | static void __iomem *ccm_base; | 71 | static void __iomem *ccm_base; |
| @@ -67,25 +73,34 @@ static void __iomem *ccm_base; | |||
| 67 | /* sources for multiplexer clocks, this is used multiple times */ | 73 | /* sources for multiplexer clocks, this is used multiple times */ |
| 68 | static const char *fast_sels[] = { "firc", "fxosc", }; | 74 | static const char *fast_sels[] = { "firc", "fxosc", }; |
| 69 | static const char *slow_sels[] = { "sirc_32k", "sxosc", }; | 75 | static const char *slow_sels[] = { "sirc_32k", "sxosc", }; |
| 70 | static const char *pll1_sels[] = { "pll1_main", "pll1_pfd1", "pll1_pfd2", "pll1_pfd3", "pll1_pfd4", }; | 76 | static const char *pll1_sels[] = { "pll1_sys", "pll1_pfd1", "pll1_pfd2", "pll1_pfd3", "pll1_pfd4", }; |
| 71 | static const char *pll2_sels[] = { "pll2_main", "pll2_pfd1", "pll2_pfd2", "pll2_pfd3", "pll2_pfd4", }; | 77 | static const char *pll2_sels[] = { "pll2_bus", "pll2_pfd1", "pll2_pfd2", "pll2_pfd3", "pll2_pfd4", }; |
| 72 | static const char *sys_sels[] = { "fast_clk_sel", "slow_clk_sel", "pll2_pfd_sel", "pll2_main", "pll1_pfd_sel", "pll3_main", }; | 78 | static const char *pll_bypass_src_sels[] = { "fast_clk_sel", "lvds1_in", }; |
| 79 | static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", }; | ||
| 80 | static const char *pll2_bypass_sels[] = { "pll2", "pll2_bypass_src", }; | ||
| 81 | static const char *pll3_bypass_sels[] = { "pll3", "pll3_bypass_src", }; | ||
| 82 | static const char *pll4_bypass_sels[] = { "pll4", "pll4_bypass_src", }; | ||
| 83 | static const char *pll5_bypass_sels[] = { "pll5", "pll5_bypass_src", }; | ||
| 84 | static const char *pll6_bypass_sels[] = { "pll6", "pll6_bypass_src", }; | ||
| 85 | static const char *pll7_bypass_sels[] = { "pll7", "pll7_bypass_src", }; | ||
| 86 | static const char *sys_sels[] = { "fast_clk_sel", "slow_clk_sel", "pll2_pfd_sel", "pll2_bus", "pll1_pfd_sel", "pll3_usb_otg", }; | ||
| 73 | static const char *ddr_sels[] = { "pll2_pfd2", "sys_sel", }; | 87 | static const char *ddr_sels[] = { "pll2_pfd2", "sys_sel", }; |
| 74 | static const char *rmii_sels[] = { "enet_ext", "audio_ext", "enet_50m", "enet_25m", }; | 88 | static const char *rmii_sels[] = { "enet_ext", "audio_ext", "enet_50m", "enet_25m", }; |
| 75 | static const char *enet_ts_sels[] = { "enet_ext", "fxosc", "audio_ext", "usb", "enet_ts", "enet_25m", "enet_50m", }; | 89 | static const char *enet_ts_sels[] = { "enet_ext", "fxosc", "audio_ext", "usb", "enet_ts", "enet_25m", "enet_50m", }; |
| 76 | static const char *esai_sels[] = { "audio_ext", "mlb", "spdif_rx", "pll4_main_div", }; | 90 | static const char *esai_sels[] = { "audio_ext", "mlb", "spdif_rx", "pll4_audio_div", }; |
| 77 | static const char *sai_sels[] = { "audio_ext", "mlb", "spdif_rx", "pll4_main_div", }; | 91 | static const char *sai_sels[] = { "audio_ext", "mlb", "spdif_rx", "pll4_audio_div", }; |
| 78 | static const char *nfc_sels[] = { "platform_bus", "pll1_pfd1", "pll3_pfd1", "pll3_pfd3", }; | 92 | static const char *nfc_sels[] = { "platform_bus", "pll1_pfd1", "pll3_pfd1", "pll3_pfd3", }; |
| 79 | static const char *qspi_sels[] = { "pll3_main", "pll3_pfd4", "pll2_pfd4", "pll1_pfd4", }; | 93 | static const char *qspi_sels[] = { "pll3_usb_otg", "pll3_pfd4", "pll2_pfd4", "pll1_pfd4", }; |
| 80 | static const char *esdhc_sels[] = { "pll3_main", "pll3_pfd3", "pll1_pfd3", "platform_bus", }; | 94 | static const char *esdhc_sels[] = { "pll3_usb_otg", "pll3_pfd3", "pll1_pfd3", "platform_bus", }; |
| 81 | static const char *dcu_sels[] = { "pll1_pfd2", "pll3_main", }; | 95 | static const char *dcu_sels[] = { "pll1_pfd2", "pll3_usb_otg", }; |
| 82 | static const char *gpu_sels[] = { "pll2_pfd2", "pll3_pfd2", }; | 96 | static const char *gpu_sels[] = { "pll2_pfd2", "pll3_pfd2", }; |
| 83 | static const char *vadc_sels[] = { "pll6_main_div", "pll3_main_div", "pll3_main", }; | 97 | static const char *vadc_sels[] = { "pll6_video_div", "pll3_usb_otg_div", "pll3_usb_otg", }; |
| 84 | /* FTM counter clock source, not module clock */ | 98 | /* FTM counter clock source, not module clock */ |
| 85 | static const char *ftm_ext_sels[] = {"sirc_128k", "sxosc", "fxosc_half", "audio_ext", }; | 99 | static const char *ftm_ext_sels[] = {"sirc_128k", "sxosc", "fxosc_half", "audio_ext", }; |
| 86 | static const char *ftm_fix_sels[] = { "sxosc", "ipg_bus", }; | 100 | static const char *ftm_fix_sels[] = { "sxosc", "ipg_bus", }; |
| 87 | 101 | ||
| 88 | static struct clk_div_table pll4_main_div_table[] = { | 102 | |
| 103 | static struct clk_div_table pll4_audio_div_table[] = { | ||
| 89 | { .val = 0, .div = 1 }, | 104 | { .val = 0, .div = 1 }, |
| 90 | { .val = 1, .div = 2 }, | 105 | { .val = 1, .div = 2 }, |
| 91 | { .val = 2, .div = 6 }, | 106 | { .val = 2, .div = 6 }, |
| @@ -120,6 +135,9 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 120 | clk[VF610_CLK_AUDIO_EXT] = imx_obtain_fixed_clock("audio_ext", 0); | 135 | clk[VF610_CLK_AUDIO_EXT] = imx_obtain_fixed_clock("audio_ext", 0); |
| 121 | clk[VF610_CLK_ENET_EXT] = imx_obtain_fixed_clock("enet_ext", 0); | 136 | clk[VF610_CLK_ENET_EXT] = imx_obtain_fixed_clock("enet_ext", 0); |
| 122 | 137 | ||
| 138 | /* Clock source from external clock via LVDs PAD */ | ||
| 139 | clk[VF610_CLK_ANACLK1] = imx_obtain_fixed_clock("anaclk1", 0); | ||
| 140 | |||
| 123 | clk[VF610_CLK_FXOSC_HALF] = imx_clk_fixed_factor("fxosc_half", "fxosc", 1, 2); | 141 | clk[VF610_CLK_FXOSC_HALF] = imx_clk_fixed_factor("fxosc_half", "fxosc", 1, 2); |
| 124 | 142 | ||
| 125 | np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop"); | 143 | np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop"); |
| @@ -133,31 +151,63 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 133 | clk[VF610_CLK_SLOW_CLK_SEL] = imx_clk_mux("slow_clk_sel", CCM_CCSR, 4, 1, slow_sels, ARRAY_SIZE(slow_sels)); | 151 | clk[VF610_CLK_SLOW_CLK_SEL] = imx_clk_mux("slow_clk_sel", CCM_CCSR, 4, 1, slow_sels, ARRAY_SIZE(slow_sels)); |
| 134 | clk[VF610_CLK_FASK_CLK_SEL] = imx_clk_mux("fast_clk_sel", CCM_CCSR, 5, 1, fast_sels, ARRAY_SIZE(fast_sels)); | 152 | clk[VF610_CLK_FASK_CLK_SEL] = imx_clk_mux("fast_clk_sel", CCM_CCSR, 5, 1, fast_sels, ARRAY_SIZE(fast_sels)); |
| 135 | 153 | ||
| 136 | clk[VF610_CLK_PLL1_MAIN] = imx_clk_fixed_factor("pll1_main", "fast_clk_sel", 22, 1); | 154 | clk[VF610_CLK_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", PLL1_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 137 | clk[VF610_CLK_PLL1_PFD1] = imx_clk_pfd("pll1_pfd1", "pll1_main", PFD_PLL1_BASE, 0); | 155 | clk[VF610_CLK_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", PLL2_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 138 | clk[VF610_CLK_PLL1_PFD2] = imx_clk_pfd("pll1_pfd2", "pll1_main", PFD_PLL1_BASE, 1); | 156 | clk[VF610_CLK_PLL3_BYPASS_SRC] = imx_clk_mux("pll3_bypass_src", PLL3_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 139 | clk[VF610_CLK_PLL1_PFD3] = imx_clk_pfd("pll1_pfd3", "pll1_main", PFD_PLL1_BASE, 2); | 157 | clk[VF610_CLK_PLL4_BYPASS_SRC] = imx_clk_mux("pll4_bypass_src", PLL4_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 140 | clk[VF610_CLK_PLL1_PFD4] = imx_clk_pfd("pll1_pfd4", "pll1_main", PFD_PLL1_BASE, 3); | 158 | clk[VF610_CLK_PLL5_BYPASS_SRC] = imx_clk_mux("pll5_bypass_src", PLL5_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 141 | 159 | clk[VF610_CLK_PLL6_BYPASS_SRC] = imx_clk_mux("pll6_bypass_src", PLL6_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); | |
| 142 | clk[VF610_CLK_PLL2_MAIN] = imx_clk_fixed_factor("pll2_main", "fast_clk_sel", 22, 1); | 160 | clk[VF610_CLK_PLL7_BYPASS_SRC] = imx_clk_mux("pll7_bypass_src", PLL7_CTRL, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels)); |
| 143 | clk[VF610_CLK_PLL2_PFD1] = imx_clk_pfd("pll2_pfd1", "pll2_main", PFD_PLL2_BASE, 0); | 161 | |
| 144 | clk[VF610_CLK_PLL2_PFD2] = imx_clk_pfd("pll2_pfd2", "pll2_main", PFD_PLL2_BASE, 1); | 162 | clk[VF610_CLK_PLL1] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll1", "pll1_bypass_src", PLL1_CTRL, 0x1); |
| 145 | clk[VF610_CLK_PLL2_PFD3] = imx_clk_pfd("pll2_pfd3", "pll2_main", PFD_PLL2_BASE, 2); | 163 | clk[VF610_CLK_PLL2] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2", "pll2_bypass_src", PLL2_CTRL, 0x1); |
| 146 | clk[VF610_CLK_PLL2_PFD4] = imx_clk_pfd("pll2_pfd4", "pll2_main", PFD_PLL2_BASE, 3); | 164 | clk[VF610_CLK_PLL3] = imx_clk_pllv3(IMX_PLLV3_USB, "pll3", "pll3_bypass_src", PLL3_CTRL, 0x1); |
| 147 | 165 | clk[VF610_CLK_PLL4] = imx_clk_pllv3(IMX_PLLV3_AV, "pll4", "pll4_bypass_src", PLL4_CTRL, 0x7f); | |
| 148 | clk[VF610_CLK_PLL3_MAIN] = imx_clk_fixed_factor("pll3_main", "fast_clk_sel", 20, 1); | 166 | clk[VF610_CLK_PLL5] = imx_clk_pllv3(IMX_PLLV3_ENET, "pll5", "pll5_bypass_src", PLL5_CTRL, 0x3); |
| 149 | clk[VF610_CLK_PLL3_PFD1] = imx_clk_pfd("pll3_pfd1", "pll3_main", PFD_PLL3_BASE, 0); | 167 | clk[VF610_CLK_PLL6] = imx_clk_pllv3(IMX_PLLV3_AV, "pll6", "pll6_bypass_src", PLL6_CTRL, 0x7f); |
| 150 | clk[VF610_CLK_PLL3_PFD2] = imx_clk_pfd("pll3_pfd2", "pll3_main", PFD_PLL3_BASE, 1); | 168 | clk[VF610_CLK_PLL7] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7", "pll7_bypass_src", PLL7_CTRL, 0x1); |
| 151 | clk[VF610_CLK_PLL3_PFD3] = imx_clk_pfd("pll3_pfd3", "pll3_main", PFD_PLL3_BASE, 2); | 169 | |
| 152 | clk[VF610_CLK_PLL3_PFD4] = imx_clk_pfd("pll3_pfd4", "pll3_main", PFD_PLL3_BASE, 3); | 170 | clk[VF610_PLL1_BYPASS] = imx_clk_mux_flags("pll1_bypass", PLL1_CTRL, 16, 1, pll1_bypass_sels, ARRAY_SIZE(pll1_bypass_sels), CLK_SET_RATE_PARENT); |
| 153 | 171 | clk[VF610_PLL2_BYPASS] = imx_clk_mux_flags("pll2_bypass", PLL2_CTRL, 16, 1, pll2_bypass_sels, ARRAY_SIZE(pll2_bypass_sels), CLK_SET_RATE_PARENT); | |
| 154 | clk[VF610_CLK_PLL4_MAIN] = imx_clk_fixed_factor("pll4_main", "fast_clk_sel", 25, 1); | 172 | clk[VF610_PLL3_BYPASS] = imx_clk_mux_flags("pll3_bypass", PLL3_CTRL, 16, 1, pll3_bypass_sels, ARRAY_SIZE(pll3_bypass_sels), CLK_SET_RATE_PARENT); |
| 155 | /* Enet pll: fixed 50Mhz */ | 173 | clk[VF610_PLL4_BYPASS] = imx_clk_mux_flags("pll4_bypass", PLL4_CTRL, 16, 1, pll4_bypass_sels, ARRAY_SIZE(pll4_bypass_sels), CLK_SET_RATE_PARENT); |
| 156 | clk[VF610_CLK_PLL5_MAIN] = imx_clk_fixed_factor("pll5_main", "fast_clk_sel", 125, 6); | 174 | clk[VF610_PLL5_BYPASS] = imx_clk_mux_flags("pll5_bypass", PLL5_CTRL, 16, 1, pll5_bypass_sels, ARRAY_SIZE(pll5_bypass_sels), CLK_SET_RATE_PARENT); |
| 157 | /* pll6: default 960Mhz */ | 175 | clk[VF610_PLL6_BYPASS] = imx_clk_mux_flags("pll6_bypass", PLL6_CTRL, 16, 1, pll6_bypass_sels, ARRAY_SIZE(pll6_bypass_sels), CLK_SET_RATE_PARENT); |
| 158 | clk[VF610_CLK_PLL6_MAIN] = imx_clk_fixed_factor("pll6_main", "fast_clk_sel", 40, 1); | 176 | clk[VF610_PLL7_BYPASS] = imx_clk_mux_flags("pll7_bypass", PLL7_CTRL, 16, 1, pll7_bypass_sels, ARRAY_SIZE(pll7_bypass_sels), CLK_SET_RATE_PARENT); |
| 159 | /* pll7: USB1 PLL at 480MHz */ | 177 | |
| 160 | clk[VF610_CLK_PLL7_MAIN] = imx_clk_pllv3(IMX_PLLV3_USB, "pll7_main", "fast_clk_sel", PLL7_CTRL, 0x2); | 178 | /* Do not bypass PLLs initially */ |
| 179 | clk_set_parent(clk[VF610_PLL1_BYPASS], clk[VF610_CLK_PLL1]); | ||
| 180 | clk_set_parent(clk[VF610_PLL2_BYPASS], clk[VF610_CLK_PLL2]); | ||
| 181 | clk_set_parent(clk[VF610_PLL3_BYPASS], clk[VF610_CLK_PLL3]); | ||
| 182 | clk_set_parent(clk[VF610_PLL4_BYPASS], clk[VF610_CLK_PLL4]); | ||
| 183 | clk_set_parent(clk[VF610_PLL5_BYPASS], clk[VF610_CLK_PLL5]); | ||
| 184 | clk_set_parent(clk[VF610_PLL6_BYPASS], clk[VF610_CLK_PLL6]); | ||
| 185 | clk_set_parent(clk[VF610_PLL7_BYPASS], clk[VF610_CLK_PLL7]); | ||
| 186 | |||
| 187 | clk[VF610_CLK_PLL1_SYS] = imx_clk_gate("pll1_sys", "pll1_bypass", PLL1_CTRL, 13); | ||
| 188 | clk[VF610_CLK_PLL2_BUS] = imx_clk_gate("pll2_bus", "pll2_bypass", PLL2_CTRL, 13); | ||
| 189 | clk[VF610_CLK_PLL3_USB_OTG] = imx_clk_gate("pll3_usb_otg", "pll3_bypass", PLL3_CTRL, 13); | ||
| 190 | clk[VF610_CLK_PLL4_AUDIO] = imx_clk_gate("pll4_audio", "pll4_bypass", PLL4_CTRL, 13); | ||
| 191 | clk[VF610_CLK_PLL5_ENET] = imx_clk_gate("pll5_enet", "pll5_bypass", PLL5_CTRL, 13); | ||
| 192 | clk[VF610_CLK_PLL6_VIDEO] = imx_clk_gate("pll6_video", "pll6_bypass", PLL6_CTRL, 13); | ||
| 193 | clk[VF610_CLK_PLL7_USB_HOST] = imx_clk_gate("pll7_usb_host", "pll7_bypass", PLL7_CTRL, 13); | ||
| 194 | |||
| 195 | clk[VF610_CLK_LVDS1_IN] = imx_clk_gate_exclusive("lvds1_in", "anaclk1", ANA_MISC1, 12, BIT(10)); | ||
| 196 | |||
| 197 | clk[VF610_CLK_PLL1_PFD1] = imx_clk_pfd("pll1_pfd1", "pll1_sys", PFD_PLL1_BASE, 0); | ||
| 198 | clk[VF610_CLK_PLL1_PFD2] = imx_clk_pfd("pll1_pfd2", "pll1_sys", PFD_PLL1_BASE, 1); | ||
| 199 | clk[VF610_CLK_PLL1_PFD3] = imx_clk_pfd("pll1_pfd3", "pll1_sys", PFD_PLL1_BASE, 2); | ||
| 200 | clk[VF610_CLK_PLL1_PFD4] = imx_clk_pfd("pll1_pfd4", "pll1_sys", PFD_PLL1_BASE, 3); | ||
| 201 | |||
| 202 | clk[VF610_CLK_PLL2_PFD1] = imx_clk_pfd("pll2_pfd1", "pll2_bus", PFD_PLL2_BASE, 0); | ||
| 203 | clk[VF610_CLK_PLL2_PFD2] = imx_clk_pfd("pll2_pfd2", "pll2_bus", PFD_PLL2_BASE, 1); | ||
| 204 | clk[VF610_CLK_PLL2_PFD3] = imx_clk_pfd("pll2_pfd3", "pll2_bus", PFD_PLL2_BASE, 2); | ||
| 205 | clk[VF610_CLK_PLL2_PFD4] = imx_clk_pfd("pll2_pfd4", "pll2_bus", PFD_PLL2_BASE, 3); | ||
| 206 | |||
| 207 | clk[VF610_CLK_PLL3_PFD1] = imx_clk_pfd("pll3_pfd1", "pll3_usb_otg", PFD_PLL3_BASE, 0); | ||
| 208 | clk[VF610_CLK_PLL3_PFD2] = imx_clk_pfd("pll3_pfd2", "pll3_usb_otg", PFD_PLL3_BASE, 1); | ||
| 209 | clk[VF610_CLK_PLL3_PFD3] = imx_clk_pfd("pll3_pfd3", "pll3_usb_otg", PFD_PLL3_BASE, 2); | ||
| 210 | clk[VF610_CLK_PLL3_PFD4] = imx_clk_pfd("pll3_pfd4", "pll3_usb_otg", PFD_PLL3_BASE, 3); | ||
| 161 | 211 | ||
| 162 | clk[VF610_CLK_PLL1_PFD_SEL] = imx_clk_mux("pll1_pfd_sel", CCM_CCSR, 16, 3, pll1_sels, 5); | 212 | clk[VF610_CLK_PLL1_PFD_SEL] = imx_clk_mux("pll1_pfd_sel", CCM_CCSR, 16, 3, pll1_sels, 5); |
| 163 | clk[VF610_CLK_PLL2_PFD_SEL] = imx_clk_mux("pll2_pfd_sel", CCM_CCSR, 19, 3, pll2_sels, 5); | 213 | clk[VF610_CLK_PLL2_PFD_SEL] = imx_clk_mux("pll2_pfd_sel", CCM_CCSR, 19, 3, pll2_sels, 5); |
| @@ -167,12 +217,12 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 167 | clk[VF610_CLK_PLATFORM_BUS] = imx_clk_divider("platform_bus", "sys_bus", CCM_CACRR, 3, 3); | 217 | clk[VF610_CLK_PLATFORM_BUS] = imx_clk_divider("platform_bus", "sys_bus", CCM_CACRR, 3, 3); |
| 168 | clk[VF610_CLK_IPG_BUS] = imx_clk_divider("ipg_bus", "platform_bus", CCM_CACRR, 11, 2); | 218 | clk[VF610_CLK_IPG_BUS] = imx_clk_divider("ipg_bus", "platform_bus", CCM_CACRR, 11, 2); |
| 169 | 219 | ||
| 170 | clk[VF610_CLK_PLL3_MAIN_DIV] = imx_clk_divider("pll3_main_div", "pll3_main", CCM_CACRR, 20, 1); | 220 | clk[VF610_CLK_PLL3_MAIN_DIV] = imx_clk_divider("pll3_usb_otg_div", "pll3_usb_otg", CCM_CACRR, 20, 1); |
| 171 | clk[VF610_CLK_PLL4_MAIN_DIV] = clk_register_divider_table(NULL, "pll4_main_div", "pll4_main", 0, CCM_CACRR, 6, 3, 0, pll4_main_div_table, &imx_ccm_lock); | 221 | clk[VF610_CLK_PLL4_MAIN_DIV] = clk_register_divider_table(NULL, "pll4_audio_div", "pll4_audio", 0, CCM_CACRR, 6, 3, 0, pll4_audio_div_table, &imx_ccm_lock); |
| 172 | clk[VF610_CLK_PLL6_MAIN_DIV] = imx_clk_divider("pll6_main_div", "pll6_main", CCM_CACRR, 21, 1); | 222 | clk[VF610_CLK_PLL6_MAIN_DIV] = imx_clk_divider("pll6_video_div", "pll6_video", CCM_CACRR, 21, 1); |
| 173 | 223 | ||
| 174 | clk[VF610_CLK_USBPHY0] = imx_clk_gate("usbphy0", "pll3_main", PLL3_CTRL, 6); | 224 | clk[VF610_CLK_USBPHY0] = imx_clk_gate("usbphy0", "pll3_usb_otg", PLL3_CTRL, 6); |
| 175 | clk[VF610_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll7_main", PLL7_CTRL, 6); | 225 | clk[VF610_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll7_usb_host", PLL7_CTRL, 6); |
| 176 | 226 | ||
| 177 | clk[VF610_CLK_USBC0] = imx_clk_gate2("usbc0", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(4)); | 227 | clk[VF610_CLK_USBC0] = imx_clk_gate2("usbc0", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(4)); |
| 178 | clk[VF610_CLK_USBC1] = imx_clk_gate2("usbc1", "ipg_bus", CCM_CCGR7, CCM_CCGRx_CGn(4)); | 228 | clk[VF610_CLK_USBC1] = imx_clk_gate2("usbc1", "ipg_bus", CCM_CCGR7, CCM_CCGRx_CGn(4)); |
| @@ -191,8 +241,8 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) | |||
| 191 | clk[VF610_CLK_QSPI1_X1_DIV] = imx_clk_divider("qspi1_x1", "qspi1_x2", CCM_CSCDR3, 11, 1); | 241 | clk[VF610_CLK_QSPI1_X1_DIV] = imx_clk_divider("qspi1_x1", "qspi1_x2", CCM_CSCDR3, 11, 1); |
| 192 | clk[VF610_CLK_QSPI1] = imx_clk_gate2("qspi1", "qspi1_x1", CCM_CCGR8, CCM_CCGRx_CGn(4)); | 242 | clk[VF610_CLK_QSPI1] = imx_clk_gate2("qspi1", "qspi1_x1", CCM_CCGR8, CCM_CCGRx_CGn(4)); |
| 193 | 243 | ||
| 194 | clk[VF610_CLK_ENET_50M] = imx_clk_fixed_factor("enet_50m", "pll5_main", 1, 10); | 244 | clk[VF610_CLK_ENET_50M] = imx_clk_fixed_factor("enet_50m", "pll5_enet", 1, 10); |
| 195 | clk[VF610_CLK_ENET_25M] = imx_clk_fixed_factor("enet_25m", "pll5_main", 1, 20); | 245 | clk[VF610_CLK_ENET_25M] = imx_clk_fixed_factor("enet_25m", "pll5_enet", 1, 20); |
| 196 | clk[VF610_CLK_ENET_SEL] = imx_clk_mux("enet_sel", CCM_CSCMR2, 4, 2, rmii_sels, 4); | 246 | clk[VF610_CLK_ENET_SEL] = imx_clk_mux("enet_sel", CCM_CSCMR2, 4, 2, rmii_sels, 4); |
| 197 | clk[VF610_CLK_ENET_TS_SEL] = imx_clk_mux("enet_ts_sel", CCM_CSCMR2, 0, 3, enet_ts_sels, 7); | 247 | clk[VF610_CLK_ENET_TS_SEL] = imx_clk_mux("enet_ts_sel", CCM_CSCMR2, 0, 3, enet_ts_sels, 7); |
| 198 | clk[VF610_CLK_ENET] = imx_clk_gate("enet", "enet_sel", CCM_CSCDR1, 24); | 248 | clk[VF610_CLK_ENET] = imx_clk_gate("enet", "enet_sel", CCM_CSCDR1, 24); |
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 559c69a47731..7d11979da030 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h | |||
| @@ -76,7 +76,7 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p) | |||
| 76 | u32 n, byte_enables, data; | 76 | u32 n, byte_enables, data; |
| 77 | 77 | ||
| 78 | if (!is_pci_memory(addr)) { | 78 | if (!is_pci_memory(addr)) { |
| 79 | __raw_writeb(value, addr); | 79 | __raw_writeb(value, p); |
| 80 | return; | 80 | return; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| @@ -141,7 +141,7 @@ static inline unsigned char __indirect_readb(const volatile void __iomem *p) | |||
| 141 | u32 n, byte_enables, data; | 141 | u32 n, byte_enables, data; |
| 142 | 142 | ||
| 143 | if (!is_pci_memory(addr)) | 143 | if (!is_pci_memory(addr)) |
| 144 | return __raw_readb(addr); | 144 | return __raw_readb(p); |
| 145 | 145 | ||
| 146 | n = addr % 4; | 146 | n = addr % 4; |
| 147 | byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL; | 147 | byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL; |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index d22c30d3ccfa..8c58b71c2727 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
| @@ -917,6 +917,10 @@ static int __init omap_device_late_idle(struct device *dev, void *data) | |||
| 917 | static int __init omap_device_late_init(void) | 917 | static int __init omap_device_late_init(void) |
| 918 | { | 918 | { |
| 919 | bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle); | 919 | bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle); |
| 920 | |||
| 921 | WARN(!of_have_populated_dt(), | ||
| 922 | "legacy booting deprecated, please update to boot with .dts\n"); | ||
| 923 | |||
| 920 | return 0; | 924 | return 0; |
| 921 | } | 925 | } |
| 922 | omap_late_initcall_sync(omap_device_late_init); | 926 | omap_late_initcall_sync(omap_device_late_init); |
diff --git a/arch/arm/mach-pxa/include/mach/addr-map.h b/arch/arm/mach-pxa/include/mach/addr-map.h index bbf9df37ad4b..d28fe291233a 100644 --- a/arch/arm/mach-pxa/include/mach/addr-map.h +++ b/arch/arm/mach-pxa/include/mach/addr-map.h | |||
| @@ -39,6 +39,11 @@ | |||
| 39 | #define DMEMC_SIZE 0x00100000 | 39 | #define DMEMC_SIZE 0x00100000 |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
| 42 | * Reserved space for low level debug virtual addresses within | ||
| 43 | * 0xf6200000..0xf6201000 | ||
| 44 | */ | ||
| 45 | |||
| 46 | /* | ||
| 42 | * Internal Memory Controller (PXA27x and later) | 47 | * Internal Memory Controller (PXA27x and later) |
| 43 | */ | 48 | */ |
| 44 | #define IMEMC_PHYS 0x58000000 | 49 | #define IMEMC_PHYS 0x58000000 |
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 4ce602c2c6de..dd301be89ecc 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig | |||
| @@ -35,6 +35,9 @@ CONFIG_MODULE_UNLOAD=y | |||
| 35 | CONFIG_ARCH_THUNDER=y | 35 | CONFIG_ARCH_THUNDER=y |
| 36 | CONFIG_ARCH_VEXPRESS=y | 36 | CONFIG_ARCH_VEXPRESS=y |
| 37 | CONFIG_ARCH_XGENE=y | 37 | CONFIG_ARCH_XGENE=y |
| 38 | CONFIG_PCI=y | ||
| 39 | CONFIG_PCI_MSI=y | ||
| 40 | CONFIG_PCI_XGENE=y | ||
| 38 | CONFIG_SMP=y | 41 | CONFIG_SMP=y |
| 39 | CONFIG_PREEMPT=y | 42 | CONFIG_PREEMPT=y |
| 40 | CONFIG_KSM=y | 43 | CONFIG_KSM=y |
| @@ -52,6 +55,7 @@ CONFIG_IP_PNP_DHCP=y | |||
| 52 | CONFIG_IP_PNP_BOOTP=y | 55 | CONFIG_IP_PNP_BOOTP=y |
| 53 | # CONFIG_INET_LRO is not set | 56 | # CONFIG_INET_LRO is not set |
| 54 | # CONFIG_IPV6 is not set | 57 | # CONFIG_IPV6 is not set |
| 58 | CONFIG_BPF_JIT=y | ||
| 55 | # CONFIG_WIRELESS is not set | 59 | # CONFIG_WIRELESS is not set |
| 56 | CONFIG_NET_9P=y | 60 | CONFIG_NET_9P=y |
| 57 | CONFIG_NET_9P_VIRTIO=y | 61 | CONFIG_NET_9P_VIRTIO=y |
| @@ -65,16 +69,17 @@ CONFIG_VIRTIO_BLK=y | |||
| 65 | CONFIG_BLK_DEV_SD=y | 69 | CONFIG_BLK_DEV_SD=y |
| 66 | # CONFIG_SCSI_LOWLEVEL is not set | 70 | # CONFIG_SCSI_LOWLEVEL is not set |
| 67 | CONFIG_ATA=y | 71 | CONFIG_ATA=y |
| 72 | CONFIG_SATA_AHCI=y | ||
| 73 | CONFIG_SATA_AHCI_PLATFORM=y | ||
| 68 | CONFIG_AHCI_XGENE=y | 74 | CONFIG_AHCI_XGENE=y |
| 69 | CONFIG_PHY_XGENE=y | ||
| 70 | CONFIG_PATA_PLATFORM=y | 75 | CONFIG_PATA_PLATFORM=y |
| 71 | CONFIG_PATA_OF_PLATFORM=y | 76 | CONFIG_PATA_OF_PLATFORM=y |
| 72 | CONFIG_NETDEVICES=y | 77 | CONFIG_NETDEVICES=y |
| 73 | CONFIG_TUN=y | 78 | CONFIG_TUN=y |
| 74 | CONFIG_VIRTIO_NET=y | 79 | CONFIG_VIRTIO_NET=y |
| 80 | CONFIG_NET_XGENE=y | ||
| 75 | CONFIG_SMC91X=y | 81 | CONFIG_SMC91X=y |
| 76 | CONFIG_SMSC911X=y | 82 | CONFIG_SMSC911X=y |
| 77 | CONFIG_NET_XGENE=y | ||
| 78 | # CONFIG_WLAN is not set | 83 | # CONFIG_WLAN is not set |
| 79 | CONFIG_INPUT_EVDEV=y | 84 | CONFIG_INPUT_EVDEV=y |
| 80 | # CONFIG_SERIO_SERPORT is not set | 85 | # CONFIG_SERIO_SERPORT is not set |
| @@ -87,6 +92,11 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | |||
| 87 | CONFIG_SERIAL_OF_PLATFORM=y | 92 | CONFIG_SERIAL_OF_PLATFORM=y |
| 88 | CONFIG_VIRTIO_CONSOLE=y | 93 | CONFIG_VIRTIO_CONSOLE=y |
| 89 | # CONFIG_HW_RANDOM is not set | 94 | # CONFIG_HW_RANDOM is not set |
| 95 | # CONFIG_HMC_DRV is not set | ||
| 96 | CONFIG_SPI=y | ||
| 97 | CONFIG_SPI_PL022=y | ||
| 98 | CONFIG_GPIO_PL061=y | ||
| 99 | CONFIG_GPIO_XGENE=y | ||
| 90 | # CONFIG_HWMON is not set | 100 | # CONFIG_HWMON is not set |
| 91 | CONFIG_REGULATOR=y | 101 | CONFIG_REGULATOR=y |
| 92 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | 102 | CONFIG_REGULATOR_FIXED_VOLTAGE=y |
| @@ -97,13 +107,25 @@ CONFIG_LOGO=y | |||
| 97 | # CONFIG_LOGO_LINUX_MONO is not set | 107 | # CONFIG_LOGO_LINUX_MONO is not set |
| 98 | # CONFIG_LOGO_LINUX_VGA16 is not set | 108 | # CONFIG_LOGO_LINUX_VGA16 is not set |
| 99 | CONFIG_USB=y | 109 | CONFIG_USB=y |
| 110 | CONFIG_USB_EHCI_HCD=y | ||
| 111 | CONFIG_USB_EHCI_HCD_PLATFORM=y | ||
| 100 | CONFIG_USB_ISP1760_HCD=y | 112 | CONFIG_USB_ISP1760_HCD=y |
| 113 | CONFIG_USB_OHCI_HCD=y | ||
| 114 | CONFIG_USB_OHCI_HCD_PLATFORM=y | ||
| 101 | CONFIG_USB_STORAGE=y | 115 | CONFIG_USB_STORAGE=y |
| 116 | CONFIG_USB_ULPI=y | ||
| 102 | CONFIG_MMC=y | 117 | CONFIG_MMC=y |
| 103 | CONFIG_MMC_ARMMMCI=y | 118 | CONFIG_MMC_ARMMMCI=y |
| 119 | CONFIG_MMC_SDHCI=y | ||
| 120 | CONFIG_MMC_SDHCI_PLTFM=y | ||
| 121 | CONFIG_MMC_SPI=y | ||
| 122 | CONFIG_RTC_CLASS=y | ||
| 123 | CONFIG_RTC_DRV_EFI=y | ||
| 124 | CONFIG_RTC_DRV_XGENE=y | ||
| 104 | CONFIG_VIRTIO_BALLOON=y | 125 | CONFIG_VIRTIO_BALLOON=y |
| 105 | CONFIG_VIRTIO_MMIO=y | 126 | CONFIG_VIRTIO_MMIO=y |
| 106 | # CONFIG_IOMMU_SUPPORT is not set | 127 | # CONFIG_IOMMU_SUPPORT is not set |
| 128 | CONFIG_PHY_XGENE=y | ||
| 107 | CONFIG_EXT2_FS=y | 129 | CONFIG_EXT2_FS=y |
| 108 | CONFIG_EXT3_FS=y | 130 | CONFIG_EXT3_FS=y |
| 109 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 131 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index da1f06b535e3..9dfdac4a74a1 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
| @@ -792,3 +792,5 @@ __SYSCALL(__NR_renameat2, sys_renameat2) | |||
| 792 | __SYSCALL(__NR_getrandom, sys_getrandom) | 792 | __SYSCALL(__NR_getrandom, sys_getrandom) |
| 793 | #define __NR_memfd_create 385 | 793 | #define __NR_memfd_create 385 |
| 794 | __SYSCALL(__NR_memfd_create, sys_memfd_create) | 794 | __SYSCALL(__NR_memfd_create, sys_memfd_create) |
| 795 | #define __NR_bpf 386 | ||
| 796 | __SYSCALL(__NR_bpf, sys_bpf) | ||
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index 866c1c821860..663da771580a 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c | |||
| @@ -528,7 +528,7 @@ static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index) | |||
| 528 | if (WARN_ON_ONCE(!index)) | 528 | if (WARN_ON_ONCE(!index)) |
| 529 | return -EINVAL; | 529 | return -EINVAL; |
| 530 | 530 | ||
| 531 | if (state->type == PSCI_POWER_STATE_TYPE_STANDBY) | 531 | if (state[index - 1].type == PSCI_POWER_STATE_TYPE_STANDBY) |
| 532 | ret = psci_ops.cpu_suspend(state[index - 1], 0); | 532 | ret = psci_ops.cpu_suspend(state[index - 1], 0); |
| 533 | else | 533 | else |
| 534 | ret = __cpu_suspend(index, psci_suspend_finisher); | 534 | ret = __cpu_suspend(index, psci_suspend_finisher); |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 4ef7a54813e6..75e75d7b1702 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <uapi/asm/unistd.h> | 4 | #include <uapi/asm/unistd.h> |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | #define NR_syscalls 354 | 7 | #define NR_syscalls 355 |
| 8 | 8 | ||
| 9 | #define __ARCH_WANT_OLD_READDIR | 9 | #define __ARCH_WANT_OLD_READDIR |
| 10 | #define __ARCH_WANT_OLD_STAT | 10 | #define __ARCH_WANT_OLD_STAT |
diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h index b419c6b7ac37..2c1bec9a14b6 100644 --- a/arch/m68k/include/uapi/asm/unistd.h +++ b/arch/m68k/include/uapi/asm/unistd.h | |||
| @@ -359,5 +359,6 @@ | |||
| 359 | #define __NR_renameat2 351 | 359 | #define __NR_renameat2 351 |
| 360 | #define __NR_getrandom 352 | 360 | #define __NR_getrandom 352 |
| 361 | #define __NR_memfd_create 353 | 361 | #define __NR_memfd_create 353 |
| 362 | #define __NR_bpf 354 | ||
| 362 | 363 | ||
| 363 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ | 364 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index 05b46c2b08b8..2ca219e184cd 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
| @@ -374,4 +374,5 @@ ENTRY(sys_call_table) | |||
| 374 | .long sys_renameat2 | 374 | .long sys_renameat2 |
| 375 | .long sys_getrandom | 375 | .long sys_getrandom |
| 376 | .long sys_memfd_create | 376 | .long sys_memfd_create |
| 377 | .long sys_bpf | ||
| 377 | 378 | ||
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 23cb94806fbc..58076472bdd8 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -93,6 +93,15 @@ LDFLAGS_vmlinux += -G 0 -static -n -nostdlib | |||
| 93 | KBUILD_AFLAGS_MODULE += -mlong-calls | 93 | KBUILD_AFLAGS_MODULE += -mlong-calls |
| 94 | KBUILD_CFLAGS_MODULE += -mlong-calls | 94 | KBUILD_CFLAGS_MODULE += -mlong-calls |
| 95 | 95 | ||
| 96 | # | ||
| 97 | # pass -msoft-float to GAS if it supports it. However on newer binutils | ||
| 98 | # (specifically newer than 2.24.51.20140728) we then also need to explicitly | ||
| 99 | # set ".set hardfloat" in all files which manipulate floating point registers. | ||
| 100 | # | ||
| 101 | ifneq ($(call as-option,-Wa$(comma)-msoft-float,),) | ||
| 102 | cflags-y += -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float | ||
| 103 | endif | ||
| 104 | |||
| 96 | cflags-y += -ffreestanding | 105 | cflags-y += -ffreestanding |
| 97 | 106 | ||
| 98 | # | 107 | # |
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c index 741734049675..2bc4aa95944e 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c | |||
| @@ -809,6 +809,7 @@ static struct irq_chip octeon_irq_chip_ciu_gpio_v2 = { | |||
| 809 | .irq_set_type = octeon_irq_ciu_gpio_set_type, | 809 | .irq_set_type = octeon_irq_ciu_gpio_set_type, |
| 810 | #ifdef CONFIG_SMP | 810 | #ifdef CONFIG_SMP |
| 811 | .irq_set_affinity = octeon_irq_ciu_set_affinity_v2, | 811 | .irq_set_affinity = octeon_irq_ciu_set_affinity_v2, |
| 812 | .irq_cpu_offline = octeon_irq_cpu_offline_ciu, | ||
| 812 | #endif | 813 | #endif |
| 813 | .flags = IRQCHIP_SET_TYPE_MASKED, | 814 | .flags = IRQCHIP_SET_TYPE_MASKED, |
| 814 | }; | 815 | }; |
| @@ -823,6 +824,7 @@ static struct irq_chip octeon_irq_chip_ciu_gpio = { | |||
| 823 | .irq_set_type = octeon_irq_ciu_gpio_set_type, | 824 | .irq_set_type = octeon_irq_ciu_gpio_set_type, |
| 824 | #ifdef CONFIG_SMP | 825 | #ifdef CONFIG_SMP |
| 825 | .irq_set_affinity = octeon_irq_ciu_set_affinity, | 826 | .irq_set_affinity = octeon_irq_ciu_set_affinity, |
| 827 | .irq_cpu_offline = octeon_irq_cpu_offline_ciu, | ||
| 826 | #endif | 828 | #endif |
| 827 | .flags = IRQCHIP_SET_TYPE_MASKED, | 829 | .flags = IRQCHIP_SET_TYPE_MASKED, |
| 828 | }; | 830 | }; |
diff --git a/arch/mips/include/asm/asmmacro-32.h b/arch/mips/include/asm/asmmacro-32.h index e38c2811d4e2..cdac7b3eeaf7 100644 --- a/arch/mips/include/asm/asmmacro-32.h +++ b/arch/mips/include/asm/asmmacro-32.h | |||
| @@ -13,6 +13,8 @@ | |||
| 13 | #include <asm/mipsregs.h> | 13 | #include <asm/mipsregs.h> |
| 14 | 14 | ||
| 15 | .macro fpu_save_single thread tmp=t0 | 15 | .macro fpu_save_single thread tmp=t0 |
| 16 | .set push | ||
| 17 | SET_HARDFLOAT | ||
| 16 | cfc1 \tmp, fcr31 | 18 | cfc1 \tmp, fcr31 |
| 17 | swc1 $f0, THREAD_FPR0_LS64(\thread) | 19 | swc1 $f0, THREAD_FPR0_LS64(\thread) |
| 18 | swc1 $f1, THREAD_FPR1_LS64(\thread) | 20 | swc1 $f1, THREAD_FPR1_LS64(\thread) |
| @@ -47,9 +49,12 @@ | |||
| 47 | swc1 $f30, THREAD_FPR30_LS64(\thread) | 49 | swc1 $f30, THREAD_FPR30_LS64(\thread) |
| 48 | swc1 $f31, THREAD_FPR31_LS64(\thread) | 50 | swc1 $f31, THREAD_FPR31_LS64(\thread) |
| 49 | sw \tmp, THREAD_FCR31(\thread) | 51 | sw \tmp, THREAD_FCR31(\thread) |
| 52 | .set pop | ||
| 50 | .endm | 53 | .endm |
| 51 | 54 | ||
| 52 | .macro fpu_restore_single thread tmp=t0 | 55 | .macro fpu_restore_single thread tmp=t0 |
| 56 | .set push | ||
| 57 | SET_HARDFLOAT | ||
| 53 | lw \tmp, THREAD_FCR31(\thread) | 58 | lw \tmp, THREAD_FCR31(\thread) |
| 54 | lwc1 $f0, THREAD_FPR0_LS64(\thread) | 59 | lwc1 $f0, THREAD_FPR0_LS64(\thread) |
| 55 | lwc1 $f1, THREAD_FPR1_LS64(\thread) | 60 | lwc1 $f1, THREAD_FPR1_LS64(\thread) |
| @@ -84,6 +89,7 @@ | |||
| 84 | lwc1 $f30, THREAD_FPR30_LS64(\thread) | 89 | lwc1 $f30, THREAD_FPR30_LS64(\thread) |
| 85 | lwc1 $f31, THREAD_FPR31_LS64(\thread) | 90 | lwc1 $f31, THREAD_FPR31_LS64(\thread) |
| 86 | ctc1 \tmp, fcr31 | 91 | ctc1 \tmp, fcr31 |
| 92 | .set pop | ||
| 87 | .endm | 93 | .endm |
| 88 | 94 | ||
| 89 | .macro cpu_save_nonscratch thread | 95 | .macro cpu_save_nonscratch thread |
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h index cd9a98bc8f60..6caf8766b80f 100644 --- a/arch/mips/include/asm/asmmacro.h +++ b/arch/mips/include/asm/asmmacro.h | |||
| @@ -57,6 +57,8 @@ | |||
| 57 | #endif /* CONFIG_CPU_MIPSR2 */ | 57 | #endif /* CONFIG_CPU_MIPSR2 */ |
| 58 | 58 | ||
| 59 | .macro fpu_save_16even thread tmp=t0 | 59 | .macro fpu_save_16even thread tmp=t0 |
| 60 | .set push | ||
| 61 | SET_HARDFLOAT | ||
| 60 | cfc1 \tmp, fcr31 | 62 | cfc1 \tmp, fcr31 |
| 61 | sdc1 $f0, THREAD_FPR0_LS64(\thread) | 63 | sdc1 $f0, THREAD_FPR0_LS64(\thread) |
| 62 | sdc1 $f2, THREAD_FPR2_LS64(\thread) | 64 | sdc1 $f2, THREAD_FPR2_LS64(\thread) |
| @@ -75,11 +77,13 @@ | |||
| 75 | sdc1 $f28, THREAD_FPR28_LS64(\thread) | 77 | sdc1 $f28, THREAD_FPR28_LS64(\thread) |
| 76 | sdc1 $f30, THREAD_FPR30_LS64(\thread) | 78 | sdc1 $f30, THREAD_FPR30_LS64(\thread) |
| 77 | sw \tmp, THREAD_FCR31(\thread) | 79 | sw \tmp, THREAD_FCR31(\thread) |
| 80 | .set pop | ||
| 78 | .endm | 81 | .endm |
| 79 | 82 | ||
| 80 | .macro fpu_save_16odd thread | 83 | .macro fpu_save_16odd thread |
| 81 | .set push | 84 | .set push |
| 82 | .set mips64r2 | 85 | .set mips64r2 |
| 86 | SET_HARDFLOAT | ||
| 83 | sdc1 $f1, THREAD_FPR1_LS64(\thread) | 87 | sdc1 $f1, THREAD_FPR1_LS64(\thread) |
| 84 | sdc1 $f3, THREAD_FPR3_LS64(\thread) | 88 | sdc1 $f3, THREAD_FPR3_LS64(\thread) |
| 85 | sdc1 $f5, THREAD_FPR5_LS64(\thread) | 89 | sdc1 $f5, THREAD_FPR5_LS64(\thread) |
| @@ -110,6 +114,8 @@ | |||
| 110 | .endm | 114 | .endm |
| 111 | 115 | ||
| 112 | .macro fpu_restore_16even thread tmp=t0 | 116 | .macro fpu_restore_16even thread tmp=t0 |
| 117 | .set push | ||
| 118 | SET_HARDFLOAT | ||
| 113 | lw \tmp, THREAD_FCR31(\thread) | 119 | lw \tmp, THREAD_FCR31(\thread) |
| 114 | ldc1 $f0, THREAD_FPR0_LS64(\thread) | 120 | ldc1 $f0, THREAD_FPR0_LS64(\thread) |
| 115 | ldc1 $f2, THREAD_FPR2_LS64(\thread) | 121 | ldc1 $f2, THREAD_FPR2_LS64(\thread) |
| @@ -133,6 +139,7 @@ | |||
| 133 | .macro fpu_restore_16odd thread | 139 | .macro fpu_restore_16odd thread |
| 134 | .set push | 140 | .set push |
| 135 | .set mips64r2 | 141 | .set mips64r2 |
| 142 | SET_HARDFLOAT | ||
| 136 | ldc1 $f1, THREAD_FPR1_LS64(\thread) | 143 | ldc1 $f1, THREAD_FPR1_LS64(\thread) |
| 137 | ldc1 $f3, THREAD_FPR3_LS64(\thread) | 144 | ldc1 $f3, THREAD_FPR3_LS64(\thread) |
| 138 | ldc1 $f5, THREAD_FPR5_LS64(\thread) | 145 | ldc1 $f5, THREAD_FPR5_LS64(\thread) |
| @@ -277,6 +284,7 @@ | |||
| 277 | .macro cfcmsa rd, cs | 284 | .macro cfcmsa rd, cs |
| 278 | .set push | 285 | .set push |
| 279 | .set noat | 286 | .set noat |
| 287 | SET_HARDFLOAT | ||
| 280 | .insn | 288 | .insn |
| 281 | .word CFC_MSA_INSN | (\cs << 11) | 289 | .word CFC_MSA_INSN | (\cs << 11) |
| 282 | move \rd, $1 | 290 | move \rd, $1 |
| @@ -286,6 +294,7 @@ | |||
| 286 | .macro ctcmsa cd, rs | 294 | .macro ctcmsa cd, rs |
| 287 | .set push | 295 | .set push |
| 288 | .set noat | 296 | .set noat |
| 297 | SET_HARDFLOAT | ||
| 289 | move $1, \rs | 298 | move $1, \rs |
| 290 | .word CTC_MSA_INSN | (\cd << 6) | 299 | .word CTC_MSA_INSN | (\cd << 6) |
| 291 | .set pop | 300 | .set pop |
| @@ -294,6 +303,7 @@ | |||
| 294 | .macro ld_d wd, off, base | 303 | .macro ld_d wd, off, base |
| 295 | .set push | 304 | .set push |
| 296 | .set noat | 305 | .set noat |
| 306 | SET_HARDFLOAT | ||
| 297 | add $1, \base, \off | 307 | add $1, \base, \off |
| 298 | .word LDD_MSA_INSN | (\wd << 6) | 308 | .word LDD_MSA_INSN | (\wd << 6) |
| 299 | .set pop | 309 | .set pop |
| @@ -302,6 +312,7 @@ | |||
| 302 | .macro st_d wd, off, base | 312 | .macro st_d wd, off, base |
| 303 | .set push | 313 | .set push |
| 304 | .set noat | 314 | .set noat |
| 315 | SET_HARDFLOAT | ||
| 305 | add $1, \base, \off | 316 | add $1, \base, \off |
| 306 | .word STD_MSA_INSN | (\wd << 6) | 317 | .word STD_MSA_INSN | (\wd << 6) |
| 307 | .set pop | 318 | .set pop |
| @@ -310,6 +321,7 @@ | |||
| 310 | .macro copy_u_w rd, ws, n | 321 | .macro copy_u_w rd, ws, n |
| 311 | .set push | 322 | .set push |
| 312 | .set noat | 323 | .set noat |
| 324 | SET_HARDFLOAT | ||
| 313 | .insn | 325 | .insn |
| 314 | .word COPY_UW_MSA_INSN | (\n << 16) | (\ws << 11) | 326 | .word COPY_UW_MSA_INSN | (\n << 16) | (\ws << 11) |
| 315 | /* move triggers an assembler bug... */ | 327 | /* move triggers an assembler bug... */ |
| @@ -320,6 +332,7 @@ | |||
| 320 | .macro copy_u_d rd, ws, n | 332 | .macro copy_u_d rd, ws, n |
| 321 | .set push | 333 | .set push |
| 322 | .set noat | 334 | .set noat |
| 335 | SET_HARDFLOAT | ||
| 323 | .insn | 336 | .insn |
| 324 | .word COPY_UD_MSA_INSN | (\n << 16) | (\ws << 11) | 337 | .word COPY_UD_MSA_INSN | (\n << 16) | (\ws << 11) |
| 325 | /* move triggers an assembler bug... */ | 338 | /* move triggers an assembler bug... */ |
| @@ -330,6 +343,7 @@ | |||
| 330 | .macro insert_w wd, n, rs | 343 | .macro insert_w wd, n, rs |
| 331 | .set push | 344 | .set push |
| 332 | .set noat | 345 | .set noat |
| 346 | SET_HARDFLOAT | ||
| 333 | /* move triggers an assembler bug... */ | 347 | /* move triggers an assembler bug... */ |
| 334 | or $1, \rs, zero | 348 | or $1, \rs, zero |
| 335 | .word INSERT_W_MSA_INSN | (\n << 16) | (\wd << 6) | 349 | .word INSERT_W_MSA_INSN | (\n << 16) | (\wd << 6) |
| @@ -339,6 +353,7 @@ | |||
| 339 | .macro insert_d wd, n, rs | 353 | .macro insert_d wd, n, rs |
| 340 | .set push | 354 | .set push |
| 341 | .set noat | 355 | .set noat |
| 356 | SET_HARDFLOAT | ||
| 342 | /* move triggers an assembler bug... */ | 357 | /* move triggers an assembler bug... */ |
| 343 | or $1, \rs, zero | 358 | or $1, \rs, zero |
| 344 | .word INSERT_D_MSA_INSN | (\n << 16) | (\wd << 6) | 359 | .word INSERT_D_MSA_INSN | (\n << 16) | (\wd << 6) |
| @@ -381,6 +396,7 @@ | |||
| 381 | st_d 31, THREAD_FPR31, \thread | 396 | st_d 31, THREAD_FPR31, \thread |
| 382 | .set push | 397 | .set push |
| 383 | .set noat | 398 | .set noat |
| 399 | SET_HARDFLOAT | ||
| 384 | cfcmsa $1, MSA_CSR | 400 | cfcmsa $1, MSA_CSR |
| 385 | sw $1, THREAD_MSA_CSR(\thread) | 401 | sw $1, THREAD_MSA_CSR(\thread) |
| 386 | .set pop | 402 | .set pop |
| @@ -389,6 +405,7 @@ | |||
| 389 | .macro msa_restore_all thread | 405 | .macro msa_restore_all thread |
| 390 | .set push | 406 | .set push |
| 391 | .set noat | 407 | .set noat |
| 408 | SET_HARDFLOAT | ||
| 392 | lw $1, THREAD_MSA_CSR(\thread) | 409 | lw $1, THREAD_MSA_CSR(\thread) |
| 393 | ctcmsa MSA_CSR, $1 | 410 | ctcmsa MSA_CSR, $1 |
| 394 | .set pop | 411 | .set pop |
| @@ -441,6 +458,7 @@ | |||
| 441 | .macro msa_init_all_upper | 458 | .macro msa_init_all_upper |
| 442 | .set push | 459 | .set push |
| 443 | .set noat | 460 | .set noat |
| 461 | SET_HARDFLOAT | ||
| 444 | not $1, zero | 462 | not $1, zero |
| 445 | msa_init_upper 0 | 463 | msa_init_upper 0 |
| 446 | .set pop | 464 | .set pop |
diff --git a/arch/mips/include/asm/fpregdef.h b/arch/mips/include/asm/fpregdef.h index 429481f9028d..f184ba088532 100644 --- a/arch/mips/include/asm/fpregdef.h +++ b/arch/mips/include/asm/fpregdef.h | |||
| @@ -14,6 +14,20 @@ | |||
| 14 | 14 | ||
| 15 | #include <asm/sgidefs.h> | 15 | #include <asm/sgidefs.h> |
| 16 | 16 | ||
| 17 | /* | ||
| 18 | * starting with binutils 2.24.51.20140729, MIPS binutils warn about mixing | ||
| 19 | * hardfloat and softfloat object files. The kernel build uses soft-float by | ||
| 20 | * default, so we also need to pass -msoft-float along to GAS if it supports it. | ||
| 21 | * But this in turn causes assembler errors in files which access hardfloat | ||
| 22 | * registers. We detect if GAS supports "-msoft-float" in the Makefile and | ||
| 23 | * explicitly put ".set hardfloat" where floating point registers are touched. | ||
| 24 | */ | ||
| 25 | #ifdef GAS_HAS_SET_HARDFLOAT | ||
| 26 | #define SET_HARDFLOAT .set hardfloat | ||
| 27 | #else | ||
| 28 | #define SET_HARDFLOAT | ||
| 29 | #endif | ||
| 30 | |||
| 17 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | 31 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
| 18 | 32 | ||
| 19 | /* | 33 | /* |
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index 4d0aeda68397..dd562414cd5e 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
| @@ -145,8 +145,8 @@ static inline void lose_fpu(int save) | |||
| 145 | if (is_msa_enabled()) { | 145 | if (is_msa_enabled()) { |
| 146 | if (save) { | 146 | if (save) { |
| 147 | save_msa(current); | 147 | save_msa(current); |
| 148 | asm volatile("cfc1 %0, $31" | 148 | current->thread.fpu.fcr31 = |
| 149 | : "=r"(current->thread.fpu.fcr31)); | 149 | read_32bit_cp1_register(CP1_STATUS); |
| 150 | } | 150 | } |
| 151 | disable_msa(); | 151 | disable_msa(); |
| 152 | clear_thread_flag(TIF_USEDMSA); | 152 | clear_thread_flag(TIF_USEDMSA); |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index cf3b580c3df6..b46cd220a018 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
| @@ -1324,7 +1324,7 @@ do { \ | |||
| 1324 | /* | 1324 | /* |
| 1325 | * Macros to access the floating point coprocessor control registers | 1325 | * Macros to access the floating point coprocessor control registers |
| 1326 | */ | 1326 | */ |
| 1327 | #define read_32bit_cp1_register(source) \ | 1327 | #define _read_32bit_cp1_register(source, gas_hardfloat) \ |
| 1328 | ({ \ | 1328 | ({ \ |
| 1329 | int __res; \ | 1329 | int __res; \ |
| 1330 | \ | 1330 | \ |
| @@ -1334,12 +1334,21 @@ do { \ | |||
| 1334 | " # gas fails to assemble cfc1 for some archs, \n" \ | 1334 | " # gas fails to assemble cfc1 for some archs, \n" \ |
| 1335 | " # like Octeon. \n" \ | 1335 | " # like Octeon. \n" \ |
| 1336 | " .set mips1 \n" \ | 1336 | " .set mips1 \n" \ |
| 1337 | " "STR(gas_hardfloat)" \n" \ | ||
| 1337 | " cfc1 %0,"STR(source)" \n" \ | 1338 | " cfc1 %0,"STR(source)" \n" \ |
| 1338 | " .set pop \n" \ | 1339 | " .set pop \n" \ |
| 1339 | : "=r" (__res)); \ | 1340 | : "=r" (__res)); \ |
| 1340 | __res; \ | 1341 | __res; \ |
| 1341 | }) | 1342 | }) |
| 1342 | 1343 | ||
| 1344 | #ifdef GAS_HAS_SET_HARDFLOAT | ||
| 1345 | #define read_32bit_cp1_register(source) \ | ||
| 1346 | _read_32bit_cp1_register(source, .set hardfloat) | ||
| 1347 | #else | ||
| 1348 | #define read_32bit_cp1_register(source) \ | ||
| 1349 | _read_32bit_cp1_register(source, ) | ||
| 1350 | #endif | ||
| 1351 | |||
| 1343 | #ifdef HAVE_AS_DSP | 1352 | #ifdef HAVE_AS_DSP |
| 1344 | #define rddsp(mask) \ | 1353 | #define rddsp(mask) \ |
| 1345 | ({ \ | 1354 | ({ \ |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index fdb4923777d1..9dc58568f230 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -375,16 +375,17 @@ | |||
| 375 | #define __NR_seccomp (__NR_Linux + 352) | 375 | #define __NR_seccomp (__NR_Linux + 352) |
| 376 | #define __NR_getrandom (__NR_Linux + 353) | 376 | #define __NR_getrandom (__NR_Linux + 353) |
| 377 | #define __NR_memfd_create (__NR_Linux + 354) | 377 | #define __NR_memfd_create (__NR_Linux + 354) |
| 378 | #define __NR_bpf (__NR_Linux + 355) | ||
| 378 | 379 | ||
| 379 | /* | 380 | /* |
| 380 | * Offset of the last Linux o32 flavoured syscall | 381 | * Offset of the last Linux o32 flavoured syscall |
| 381 | */ | 382 | */ |
| 382 | #define __NR_Linux_syscalls 354 | 383 | #define __NR_Linux_syscalls 355 |
| 383 | 384 | ||
| 384 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 385 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 385 | 386 | ||
| 386 | #define __NR_O32_Linux 4000 | 387 | #define __NR_O32_Linux 4000 |
| 387 | #define __NR_O32_Linux_syscalls 354 | 388 | #define __NR_O32_Linux_syscalls 355 |
| 388 | 389 | ||
| 389 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 390 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 390 | 391 | ||
| @@ -707,16 +708,17 @@ | |||
| 707 | #define __NR_seccomp (__NR_Linux + 312) | 708 | #define __NR_seccomp (__NR_Linux + 312) |
| 708 | #define __NR_getrandom (__NR_Linux + 313) | 709 | #define __NR_getrandom (__NR_Linux + 313) |
| 709 | #define __NR_memfd_create (__NR_Linux + 314) | 710 | #define __NR_memfd_create (__NR_Linux + 314) |
| 711 | #define __NR_bpf (__NR_Linux + 315) | ||
| 710 | 712 | ||
| 711 | /* | 713 | /* |
| 712 | * Offset of the last Linux 64-bit flavoured syscall | 714 | * Offset of the last Linux 64-bit flavoured syscall |
| 713 | */ | 715 | */ |
| 714 | #define __NR_Linux_syscalls 314 | 716 | #define __NR_Linux_syscalls 315 |
| 715 | 717 | ||
| 716 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 718 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 717 | 719 | ||
| 718 | #define __NR_64_Linux 5000 | 720 | #define __NR_64_Linux 5000 |
| 719 | #define __NR_64_Linux_syscalls 314 | 721 | #define __NR_64_Linux_syscalls 315 |
| 720 | 722 | ||
| 721 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 723 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 722 | 724 | ||
| @@ -1043,15 +1045,16 @@ | |||
| 1043 | #define __NR_seccomp (__NR_Linux + 316) | 1045 | #define __NR_seccomp (__NR_Linux + 316) |
| 1044 | #define __NR_getrandom (__NR_Linux + 317) | 1046 | #define __NR_getrandom (__NR_Linux + 317) |
| 1045 | #define __NR_memfd_create (__NR_Linux + 318) | 1047 | #define __NR_memfd_create (__NR_Linux + 318) |
| 1048 | #define __NR_memfd_create (__NR_Linux + 319) | ||
| 1046 | 1049 | ||
| 1047 | /* | 1050 | /* |
| 1048 | * Offset of the last N32 flavoured syscall | 1051 | * Offset of the last N32 flavoured syscall |
| 1049 | */ | 1052 | */ |
| 1050 | #define __NR_Linux_syscalls 318 | 1053 | #define __NR_Linux_syscalls 319 |
| 1051 | 1054 | ||
| 1052 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1055 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1053 | 1056 | ||
| 1054 | #define __NR_N32_Linux 6000 | 1057 | #define __NR_N32_Linux 6000 |
| 1055 | #define __NR_N32_Linux_syscalls 318 | 1058 | #define __NR_N32_Linux_syscalls 319 |
| 1056 | 1059 | ||
| 1057 | #endif /* _UAPI_ASM_UNISTD_H */ | 1060 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index 7b2df224f041..4d7d99d601cc 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c | |||
| @@ -144,7 +144,7 @@ int __mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, | |||
| 144 | case mm_bc1t_op: | 144 | case mm_bc1t_op: |
| 145 | preempt_disable(); | 145 | preempt_disable(); |
| 146 | if (is_fpu_owner()) | 146 | if (is_fpu_owner()) |
| 147 | asm volatile("cfc1\t%0,$31" : "=r" (fcr31)); | 147 | fcr31 = read_32bit_cp1_register(CP1_STATUS); |
| 148 | else | 148 | else |
| 149 | fcr31 = current->thread.fpu.fcr31; | 149 | fcr31 = current->thread.fpu.fcr31; |
| 150 | preempt_enable(); | 150 | preempt_enable(); |
| @@ -562,11 +562,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, | |||
| 562 | case cop1_op: | 562 | case cop1_op: |
| 563 | preempt_disable(); | 563 | preempt_disable(); |
| 564 | if (is_fpu_owner()) | 564 | if (is_fpu_owner()) |
| 565 | asm volatile( | 565 | fcr31 = read_32bit_cp1_register(CP1_STATUS); |
| 566 | ".set push\n" | ||
| 567 | "\t.set mips1\n" | ||
| 568 | "\tcfc1\t%0,$31\n" | ||
| 569 | "\t.set pop" : "=r" (fcr31)); | ||
| 570 | else | 566 | else |
| 571 | fcr31 = current->thread.fpu.fcr31; | 567 | fcr31 = current->thread.fpu.fcr31; |
| 572 | preempt_enable(); | 568 | preempt_enable(); |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index ac35e12cb1f3..a5e26dd90592 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
| @@ -358,6 +358,7 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
| 358 | .set push | 358 | .set push |
| 359 | /* gas fails to assemble cfc1 for some archs (octeon).*/ \ | 359 | /* gas fails to assemble cfc1 for some archs (octeon).*/ \ |
| 360 | .set mips1 | 360 | .set mips1 |
| 361 | SET_HARDFLOAT | ||
| 361 | cfc1 a1, fcr31 | 362 | cfc1 a1, fcr31 |
| 362 | li a2, ~(0x3f << 12) | 363 | li a2, ~(0x3f << 12) |
| 363 | and a2, a1 | 364 | and a2, a1 |
diff --git a/arch/mips/kernel/r2300_fpu.S b/arch/mips/kernel/r2300_fpu.S index f31063dbdaeb..5ce3b746cedc 100644 --- a/arch/mips/kernel/r2300_fpu.S +++ b/arch/mips/kernel/r2300_fpu.S | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | .set mips1 | 28 | .set mips1 |
| 29 | /* Save floating point context */ | 29 | /* Save floating point context */ |
| 30 | LEAF(_save_fp_context) | 30 | LEAF(_save_fp_context) |
| 31 | .set push | ||
| 32 | SET_HARDFLOAT | ||
| 31 | li v0, 0 # assume success | 33 | li v0, 0 # assume success |
| 32 | cfc1 t1,fcr31 | 34 | cfc1 t1,fcr31 |
| 33 | EX(swc1 $f0,(SC_FPREGS+0)(a0)) | 35 | EX(swc1 $f0,(SC_FPREGS+0)(a0)) |
| @@ -65,6 +67,7 @@ LEAF(_save_fp_context) | |||
| 65 | EX(sw t1,(SC_FPC_CSR)(a0)) | 67 | EX(sw t1,(SC_FPC_CSR)(a0)) |
| 66 | cfc1 t0,$0 # implementation/version | 68 | cfc1 t0,$0 # implementation/version |
| 67 | jr ra | 69 | jr ra |
| 70 | .set pop | ||
| 68 | .set nomacro | 71 | .set nomacro |
| 69 | EX(sw t0,(SC_FPC_EIR)(a0)) | 72 | EX(sw t0,(SC_FPC_EIR)(a0)) |
| 70 | .set macro | 73 | .set macro |
| @@ -80,6 +83,8 @@ LEAF(_save_fp_context) | |||
| 80 | * stack frame which might have been changed by the user. | 83 | * stack frame which might have been changed by the user. |
| 81 | */ | 84 | */ |
| 82 | LEAF(_restore_fp_context) | 85 | LEAF(_restore_fp_context) |
| 86 | .set push | ||
| 87 | SET_HARDFLOAT | ||
| 83 | li v0, 0 # assume success | 88 | li v0, 0 # assume success |
| 84 | EX(lw t0,(SC_FPC_CSR)(a0)) | 89 | EX(lw t0,(SC_FPC_CSR)(a0)) |
| 85 | EX(lwc1 $f0,(SC_FPREGS+0)(a0)) | 90 | EX(lwc1 $f0,(SC_FPREGS+0)(a0)) |
| @@ -116,6 +121,7 @@ LEAF(_restore_fp_context) | |||
| 116 | EX(lwc1 $f31,(SC_FPREGS+248)(a0)) | 121 | EX(lwc1 $f31,(SC_FPREGS+248)(a0)) |
| 117 | jr ra | 122 | jr ra |
| 118 | ctc1 t0,fcr31 | 123 | ctc1 t0,fcr31 |
| 124 | .set pop | ||
| 119 | END(_restore_fp_context) | 125 | END(_restore_fp_context) |
| 120 | .set reorder | 126 | .set reorder |
| 121 | 127 | ||
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 20b7b040e76f..435ea652f5fa 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
| @@ -120,6 +120,9 @@ LEAF(_restore_fp) | |||
| 120 | 120 | ||
| 121 | #define FPU_DEFAULT 0x00000000 | 121 | #define FPU_DEFAULT 0x00000000 |
| 122 | 122 | ||
| 123 | .set push | ||
| 124 | SET_HARDFLOAT | ||
| 125 | |||
| 123 | LEAF(_init_fpu) | 126 | LEAF(_init_fpu) |
| 124 | mfc0 t0, CP0_STATUS | 127 | mfc0 t0, CP0_STATUS |
| 125 | li t1, ST0_CU1 | 128 | li t1, ST0_CU1 |
| @@ -165,3 +168,5 @@ LEAF(_init_fpu) | |||
| 165 | mtc1 t0, $f31 | 168 | mtc1 t0, $f31 |
| 166 | jr ra | 169 | jr ra |
| 167 | END(_init_fpu) | 170 | END(_init_fpu) |
| 171 | |||
| 172 | .set pop | ||
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index 8352523568e6..6c160c67984c 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S | |||
| @@ -19,8 +19,12 @@ | |||
| 19 | #include <asm/asm-offsets.h> | 19 | #include <asm/asm-offsets.h> |
| 20 | #include <asm/regdef.h> | 20 | #include <asm/regdef.h> |
| 21 | 21 | ||
| 22 | /* preprocessor replaces the fp in ".set fp=64" with $30 otherwise */ | ||
| 23 | #undef fp | ||
| 24 | |||
| 22 | .macro EX insn, reg, src | 25 | .macro EX insn, reg, src |
| 23 | .set push | 26 | .set push |
| 27 | SET_HARDFLOAT | ||
| 24 | .set nomacro | 28 | .set nomacro |
| 25 | .ex\@: \insn \reg, \src | 29 | .ex\@: \insn \reg, \src |
| 26 | .set pop | 30 | .set pop |
| @@ -33,12 +37,17 @@ | |||
| 33 | .set arch=r4000 | 37 | .set arch=r4000 |
| 34 | 38 | ||
| 35 | LEAF(_save_fp_context) | 39 | LEAF(_save_fp_context) |
| 40 | .set push | ||
| 41 | SET_HARDFLOAT | ||
| 36 | cfc1 t1, fcr31 | 42 | cfc1 t1, fcr31 |
| 43 | .set pop | ||
| 37 | 44 | ||
| 38 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) | 45 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) |
| 39 | .set push | 46 | .set push |
| 47 | SET_HARDFLOAT | ||
| 40 | #ifdef CONFIG_CPU_MIPS32_R2 | 48 | #ifdef CONFIG_CPU_MIPS32_R2 |
| 41 | .set mips64r2 | 49 | .set mips32r2 |
| 50 | .set fp=64 | ||
| 42 | mfc0 t0, CP0_STATUS | 51 | mfc0 t0, CP0_STATUS |
| 43 | sll t0, t0, 5 | 52 | sll t0, t0, 5 |
| 44 | bgez t0, 1f # skip storing odd if FR=0 | 53 | bgez t0, 1f # skip storing odd if FR=0 |
| @@ -64,6 +73,8 @@ LEAF(_save_fp_context) | |||
| 64 | 1: .set pop | 73 | 1: .set pop |
| 65 | #endif | 74 | #endif |
| 66 | 75 | ||
| 76 | .set push | ||
| 77 | SET_HARDFLOAT | ||
| 67 | /* Store the 16 even double precision registers */ | 78 | /* Store the 16 even double precision registers */ |
| 68 | EX sdc1 $f0, SC_FPREGS+0(a0) | 79 | EX sdc1 $f0, SC_FPREGS+0(a0) |
| 69 | EX sdc1 $f2, SC_FPREGS+16(a0) | 80 | EX sdc1 $f2, SC_FPREGS+16(a0) |
| @@ -84,11 +95,14 @@ LEAF(_save_fp_context) | |||
| 84 | EX sw t1, SC_FPC_CSR(a0) | 95 | EX sw t1, SC_FPC_CSR(a0) |
| 85 | jr ra | 96 | jr ra |
| 86 | li v0, 0 # success | 97 | li v0, 0 # success |
| 98 | .set pop | ||
| 87 | END(_save_fp_context) | 99 | END(_save_fp_context) |
| 88 | 100 | ||
| 89 | #ifdef CONFIG_MIPS32_COMPAT | 101 | #ifdef CONFIG_MIPS32_COMPAT |
| 90 | /* Save 32-bit process floating point context */ | 102 | /* Save 32-bit process floating point context */ |
| 91 | LEAF(_save_fp_context32) | 103 | LEAF(_save_fp_context32) |
| 104 | .set push | ||
| 105 | SET_HARDFLOAT | ||
| 92 | cfc1 t1, fcr31 | 106 | cfc1 t1, fcr31 |
| 93 | 107 | ||
| 94 | mfc0 t0, CP0_STATUS | 108 | mfc0 t0, CP0_STATUS |
| @@ -134,6 +148,7 @@ LEAF(_save_fp_context32) | |||
| 134 | EX sw t1, SC32_FPC_CSR(a0) | 148 | EX sw t1, SC32_FPC_CSR(a0) |
| 135 | cfc1 t0, $0 # implementation/version | 149 | cfc1 t0, $0 # implementation/version |
| 136 | EX sw t0, SC32_FPC_EIR(a0) | 150 | EX sw t0, SC32_FPC_EIR(a0) |
| 151 | .set pop | ||
| 137 | 152 | ||
| 138 | jr ra | 153 | jr ra |
| 139 | li v0, 0 # success | 154 | li v0, 0 # success |
| @@ -150,8 +165,10 @@ LEAF(_restore_fp_context) | |||
| 150 | 165 | ||
| 151 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) | 166 | #if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2) |
| 152 | .set push | 167 | .set push |
| 168 | SET_HARDFLOAT | ||
| 153 | #ifdef CONFIG_CPU_MIPS32_R2 | 169 | #ifdef CONFIG_CPU_MIPS32_R2 |
| 154 | .set mips64r2 | 170 | .set mips32r2 |
| 171 | .set fp=64 | ||
| 155 | mfc0 t0, CP0_STATUS | 172 | mfc0 t0, CP0_STATUS |
| 156 | sll t0, t0, 5 | 173 | sll t0, t0, 5 |
| 157 | bgez t0, 1f # skip loading odd if FR=0 | 174 | bgez t0, 1f # skip loading odd if FR=0 |
| @@ -175,6 +192,8 @@ LEAF(_restore_fp_context) | |||
| 175 | EX ldc1 $f31, SC_FPREGS+248(a0) | 192 | EX ldc1 $f31, SC_FPREGS+248(a0) |
| 176 | 1: .set pop | 193 | 1: .set pop |
| 177 | #endif | 194 | #endif |
| 195 | .set push | ||
| 196 | SET_HARDFLOAT | ||
| 178 | EX ldc1 $f0, SC_FPREGS+0(a0) | 197 | EX ldc1 $f0, SC_FPREGS+0(a0) |
| 179 | EX ldc1 $f2, SC_FPREGS+16(a0) | 198 | EX ldc1 $f2, SC_FPREGS+16(a0) |
| 180 | EX ldc1 $f4, SC_FPREGS+32(a0) | 199 | EX ldc1 $f4, SC_FPREGS+32(a0) |
| @@ -192,6 +211,7 @@ LEAF(_restore_fp_context) | |||
| 192 | EX ldc1 $f28, SC_FPREGS+224(a0) | 211 | EX ldc1 $f28, SC_FPREGS+224(a0) |
| 193 | EX ldc1 $f30, SC_FPREGS+240(a0) | 212 | EX ldc1 $f30, SC_FPREGS+240(a0) |
| 194 | ctc1 t1, fcr31 | 213 | ctc1 t1, fcr31 |
| 214 | .set pop | ||
| 195 | jr ra | 215 | jr ra |
| 196 | li v0, 0 # success | 216 | li v0, 0 # success |
| 197 | END(_restore_fp_context) | 217 | END(_restore_fp_context) |
| @@ -199,6 +219,8 @@ LEAF(_restore_fp_context) | |||
| 199 | #ifdef CONFIG_MIPS32_COMPAT | 219 | #ifdef CONFIG_MIPS32_COMPAT |
| 200 | LEAF(_restore_fp_context32) | 220 | LEAF(_restore_fp_context32) |
| 201 | /* Restore an o32 sigcontext. */ | 221 | /* Restore an o32 sigcontext. */ |
| 222 | .set push | ||
| 223 | SET_HARDFLOAT | ||
| 202 | EX lw t1, SC32_FPC_CSR(a0) | 224 | EX lw t1, SC32_FPC_CSR(a0) |
| 203 | 225 | ||
| 204 | mfc0 t0, CP0_STATUS | 226 | mfc0 t0, CP0_STATUS |
| @@ -242,6 +264,7 @@ LEAF(_restore_fp_context32) | |||
| 242 | ctc1 t1, fcr31 | 264 | ctc1 t1, fcr31 |
| 243 | jr ra | 265 | jr ra |
| 244 | li v0, 0 # success | 266 | li v0, 0 # success |
| 267 | .set pop | ||
| 245 | END(_restore_fp_context32) | 268 | END(_restore_fp_context32) |
| 246 | #endif | 269 | #endif |
| 247 | 270 | ||
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 4c4ec1812420..64591e671878 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
| @@ -22,6 +22,9 @@ | |||
| 22 | 22 | ||
| 23 | #include <asm/asmmacro.h> | 23 | #include <asm/asmmacro.h> |
| 24 | 24 | ||
| 25 | /* preprocessor replaces the fp in ".set fp=64" with $30 otherwise */ | ||
| 26 | #undef fp | ||
| 27 | |||
| 25 | /* | 28 | /* |
| 26 | * Offset to the current process status flags, the first 32 bytes of the | 29 | * Offset to the current process status flags, the first 32 bytes of the |
| 27 | * stack are not used. | 30 | * stack are not used. |
| @@ -65,8 +68,12 @@ | |||
| 65 | bgtz a3, 1f | 68 | bgtz a3, 1f |
| 66 | 69 | ||
| 67 | /* Save 128b MSA vector context + scalar FP control & status. */ | 70 | /* Save 128b MSA vector context + scalar FP control & status. */ |
| 71 | .set push | ||
| 72 | SET_HARDFLOAT | ||
| 68 | cfc1 t1, fcr31 | 73 | cfc1 t1, fcr31 |
| 69 | msa_save_all a0 | 74 | msa_save_all a0 |
| 75 | .set pop /* SET_HARDFLOAT */ | ||
| 76 | |||
| 70 | sw t1, THREAD_FCR31(a0) | 77 | sw t1, THREAD_FCR31(a0) |
| 71 | b 2f | 78 | b 2f |
| 72 | 79 | ||
| @@ -161,6 +168,9 @@ LEAF(_init_msa_upper) | |||
| 161 | 168 | ||
| 162 | #define FPU_DEFAULT 0x00000000 | 169 | #define FPU_DEFAULT 0x00000000 |
| 163 | 170 | ||
| 171 | .set push | ||
| 172 | SET_HARDFLOAT | ||
| 173 | |||
| 164 | LEAF(_init_fpu) | 174 | LEAF(_init_fpu) |
| 165 | mfc0 t0, CP0_STATUS | 175 | mfc0 t0, CP0_STATUS |
| 166 | li t1, ST0_CU1 | 176 | li t1, ST0_CU1 |
| @@ -232,7 +242,8 @@ LEAF(_init_fpu) | |||
| 232 | 242 | ||
| 233 | #ifdef CONFIG_CPU_MIPS32_R2 | 243 | #ifdef CONFIG_CPU_MIPS32_R2 |
| 234 | .set push | 244 | .set push |
| 235 | .set mips64r2 | 245 | .set mips32r2 |
| 246 | .set fp=64 | ||
| 236 | sll t0, t0, 5 # is Status.FR set? | 247 | sll t0, t0, 5 # is Status.FR set? |
| 237 | bgez t0, 1f # no: skip setting upper 32b | 248 | bgez t0, 1f # no: skip setting upper 32b |
| 238 | 249 | ||
| @@ -291,3 +302,5 @@ LEAF(_init_fpu) | |||
| 291 | #endif | 302 | #endif |
| 292 | jr ra | 303 | jr ra |
| 293 | END(_init_fpu) | 304 | END(_init_fpu) |
| 305 | |||
| 306 | .set pop /* SET_HARDFLOAT */ | ||
diff --git a/arch/mips/kernel/r6000_fpu.S b/arch/mips/kernel/r6000_fpu.S index da0fbe46d83b..47077380c15c 100644 --- a/arch/mips/kernel/r6000_fpu.S +++ b/arch/mips/kernel/r6000_fpu.S | |||
| @@ -18,6 +18,9 @@ | |||
| 18 | 18 | ||
| 19 | .set noreorder | 19 | .set noreorder |
| 20 | .set mips2 | 20 | .set mips2 |
| 21 | .set push | ||
| 22 | SET_HARDFLOAT | ||
| 23 | |||
| 21 | /* Save floating point context */ | 24 | /* Save floating point context */ |
| 22 | LEAF(_save_fp_context) | 25 | LEAF(_save_fp_context) |
| 23 | mfc0 t0,CP0_STATUS | 26 | mfc0 t0,CP0_STATUS |
| @@ -85,3 +88,5 @@ | |||
| 85 | 1: jr ra | 88 | 1: jr ra |
| 86 | nop | 89 | nop |
| 87 | END(_restore_fp_context) | 90 | END(_restore_fp_context) |
| 91 | |||
| 92 | .set pop /* SET_HARDFLOAT */ | ||
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 744cd10ba599..00cad1005a16 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -579,3 +579,4 @@ EXPORT(sys_call_table) | |||
| 579 | PTR sys_seccomp | 579 | PTR sys_seccomp |
| 580 | PTR sys_getrandom | 580 | PTR sys_getrandom |
| 581 | PTR sys_memfd_create | 581 | PTR sys_memfd_create |
| 582 | PTR sys_bpf /* 4355 */ | ||
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 002b1bc09c38..5251565e344b 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -434,4 +434,5 @@ EXPORT(sys_call_table) | |||
| 434 | PTR sys_seccomp | 434 | PTR sys_seccomp |
| 435 | PTR sys_getrandom | 435 | PTR sys_getrandom |
| 436 | PTR sys_memfd_create | 436 | PTR sys_memfd_create |
| 437 | PTR sys_bpf /* 5315 */ | ||
| 437 | .size sys_call_table,.-sys_call_table | 438 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index ca6cbbe9805b..77e74398b828 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -427,4 +427,5 @@ EXPORT(sysn32_call_table) | |||
| 427 | PTR sys_seccomp | 427 | PTR sys_seccomp |
| 428 | PTR sys_getrandom | 428 | PTR sys_getrandom |
| 429 | PTR sys_memfd_create | 429 | PTR sys_memfd_create |
| 430 | PTR sys_bpf | ||
| 430 | .size sysn32_call_table,.-sysn32_call_table | 431 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 9e10d11fbb84..6f8db9f728e8 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -564,4 +564,5 @@ EXPORT(sys32_call_table) | |||
| 564 | PTR sys_seccomp | 564 | PTR sys_seccomp |
| 565 | PTR sys_getrandom | 565 | PTR sys_getrandom |
| 566 | PTR sys_memfd_create | 566 | PTR sys_memfd_create |
| 567 | PTR sys_bpf /* 4355 */ | ||
| 567 | .size sys32_call_table,.-sys32_call_table | 568 | .size sys32_call_table,.-sys32_call_table |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index b3b8f0d9d4a7..d21ec57b6e95 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
| @@ -683,7 +683,8 @@ static void __init arch_mem_init(char **cmdline_p) | |||
| 683 | dma_contiguous_reserve(PFN_PHYS(max_low_pfn)); | 683 | dma_contiguous_reserve(PFN_PHYS(max_low_pfn)); |
| 684 | /* Tell bootmem about cma reserved memblock section */ | 684 | /* Tell bootmem about cma reserved memblock section */ |
| 685 | for_each_memblock(reserved, reg) | 685 | for_each_memblock(reserved, reg) |
| 686 | reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT); | 686 | if (reg->size != 0) |
| 687 | reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT); | ||
| 687 | } | 688 | } |
| 688 | 689 | ||
| 689 | static void __init resource_init(void) | 690 | static void __init resource_init(void) |
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c index 91615c2ef0cf..1ef365ab3cd3 100644 --- a/arch/mips/lib/r3k_dump_tlb.c +++ b/arch/mips/lib/r3k_dump_tlb.c | |||
| @@ -34,7 +34,7 @@ static void dump_tlb(int first, int last) | |||
| 34 | entrylo0 = read_c0_entrylo0(); | 34 | entrylo0 = read_c0_entrylo0(); |
| 35 | 35 | ||
| 36 | /* Unused entries have a virtual address of KSEG0. */ | 36 | /* Unused entries have a virtual address of KSEG0. */ |
| 37 | if ((entryhi & 0xffffe000) != 0x80000000 | 37 | if ((entryhi & 0xfffff000) != 0x80000000 |
| 38 | && (entryhi & 0xfc0) == asid) { | 38 | && (entryhi & 0xfc0) == asid) { |
| 39 | /* | 39 | /* |
| 40 | * Only print entries in use | 40 | * Only print entries in use |
| @@ -43,7 +43,7 @@ static void dump_tlb(int first, int last) | |||
| 43 | 43 | ||
| 44 | printk("va=%08lx asid=%08lx" | 44 | printk("va=%08lx asid=%08lx" |
| 45 | " [pa=%06lx n=%d d=%d v=%d g=%d]", | 45 | " [pa=%06lx n=%d d=%d v=%d g=%d]", |
| 46 | (entryhi & 0xffffe000), | 46 | (entryhi & 0xfffff000), |
| 47 | entryhi & 0xfc0, | 47 | entryhi & 0xfc0, |
| 48 | entrylo0 & PAGE_MASK, | 48 | entrylo0 & PAGE_MASK, |
| 49 | (entrylo0 & (1 << 11)) ? 1 : 0, | 49 | (entrylo0 & (1 << 11)) ? 1 : 0, |
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S index f3af6995e2a6..7d12c0dded3d 100644 --- a/arch/mips/lib/strnlen_user.S +++ b/arch/mips/lib/strnlen_user.S | |||
| @@ -40,9 +40,11 @@ FEXPORT(__strnlen_\func\()_nocheck_asm) | |||
| 40 | .else | 40 | .else |
| 41 | EX(lbe, t0, (v0), .Lfault\@) | 41 | EX(lbe, t0, (v0), .Lfault\@) |
| 42 | .endif | 42 | .endif |
| 43 | PTR_ADDIU v0, 1 | 43 | .set noreorder |
| 44 | bnez t0, 1b | 44 | bnez t0, 1b |
| 45 | 1: PTR_SUBU v0, a0 | 45 | 1: PTR_ADDIU v0, 1 |
| 46 | .set reorder | ||
| 47 | PTR_SUBU v0, a0 | ||
| 46 | jr ra | 48 | jr ra |
| 47 | END(__strnlen_\func\()_asm) | 49 | END(__strnlen_\func\()_asm) |
| 48 | 50 | ||
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 51a0fde4bec1..cac529a405b8 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
| @@ -584,11 +584,7 @@ static int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, | |||
| 584 | if (insn.i_format.rs == bc_op) { | 584 | if (insn.i_format.rs == bc_op) { |
| 585 | preempt_disable(); | 585 | preempt_disable(); |
| 586 | if (is_fpu_owner()) | 586 | if (is_fpu_owner()) |
| 587 | asm volatile( | 587 | fcr31 = read_32bit_cp1_register(CP1_STATUS); |
| 588 | ".set push\n" | ||
| 589 | "\t.set mips1\n" | ||
| 590 | "\tcfc1\t%0,$31\n" | ||
| 591 | "\t.set pop" : "=r" (fcr31)); | ||
| 592 | else | 588 | else |
| 593 | fcr31 = current->thread.fpu.fcr31; | 589 | fcr31 = current->thread.fpu.fcr31; |
| 594 | preempt_enable(); | 590 | preempt_enable(); |
diff --git a/arch/mips/pci/msi-xlp.c b/arch/mips/pci/msi-xlp.c index fa374fe3746b..f7ac3edda1b2 100644 --- a/arch/mips/pci/msi-xlp.c +++ b/arch/mips/pci/msi-xlp.c | |||
| @@ -443,10 +443,8 @@ static int xlp_setup_msix(uint64_t lnkbase, int node, int link, | |||
| 443 | msg.data = 0xc00 | msixvec; | 443 | msg.data = 0xc00 | msixvec; |
| 444 | 444 | ||
| 445 | ret = irq_set_msi_desc(xirq, desc); | 445 | ret = irq_set_msi_desc(xirq, desc); |
| 446 | if (ret < 0) { | 446 | if (ret < 0) |
| 447 | destroy_irq(xirq); | ||
| 448 | return ret; | 447 | return ret; |
| 449 | } | ||
| 450 | 448 | ||
| 451 | write_msi_msg(xirq, &msg); | 449 | write_msi_msg(xirq, &msg); |
| 452 | return 0; | 450 | return 0; |
diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h index a6774560afe3..493e72f64b35 100644 --- a/arch/powerpc/include/asm/fadump.h +++ b/arch/powerpc/include/asm/fadump.h | |||
| @@ -70,39 +70,39 @@ | |||
| 70 | #define CPU_UNKNOWN (~((u32)0)) | 70 | #define CPU_UNKNOWN (~((u32)0)) |
| 71 | 71 | ||
| 72 | /* Utility macros */ | 72 | /* Utility macros */ |
| 73 | #define SKIP_TO_NEXT_CPU(reg_entry) \ | 73 | #define SKIP_TO_NEXT_CPU(reg_entry) \ |
| 74 | ({ \ | 74 | ({ \ |
| 75 | while (reg_entry->reg_id != REG_ID("CPUEND")) \ | 75 | while (be64_to_cpu(reg_entry->reg_id) != REG_ID("CPUEND")) \ |
| 76 | reg_entry++; \ | 76 | reg_entry++; \ |
| 77 | reg_entry++; \ | 77 | reg_entry++; \ |
| 78 | }) | 78 | }) |
| 79 | 79 | ||
| 80 | /* Kernel Dump section info */ | 80 | /* Kernel Dump section info */ |
| 81 | struct fadump_section { | 81 | struct fadump_section { |
| 82 | u32 request_flag; | 82 | __be32 request_flag; |
| 83 | u16 source_data_type; | 83 | __be16 source_data_type; |
| 84 | u16 error_flags; | 84 | __be16 error_flags; |
| 85 | u64 source_address; | 85 | __be64 source_address; |
| 86 | u64 source_len; | 86 | __be64 source_len; |
| 87 | u64 bytes_dumped; | 87 | __be64 bytes_dumped; |
| 88 | u64 destination_address; | 88 | __be64 destination_address; |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | /* ibm,configure-kernel-dump header. */ | 91 | /* ibm,configure-kernel-dump header. */ |
| 92 | struct fadump_section_header { | 92 | struct fadump_section_header { |
| 93 | u32 dump_format_version; | 93 | __be32 dump_format_version; |
| 94 | u16 dump_num_sections; | 94 | __be16 dump_num_sections; |
| 95 | u16 dump_status_flag; | 95 | __be16 dump_status_flag; |
| 96 | u32 offset_first_dump_section; | 96 | __be32 offset_first_dump_section; |
| 97 | 97 | ||
| 98 | /* Fields for disk dump option. */ | 98 | /* Fields for disk dump option. */ |
| 99 | u32 dd_block_size; | 99 | __be32 dd_block_size; |
| 100 | u64 dd_block_offset; | 100 | __be64 dd_block_offset; |
| 101 | u64 dd_num_blocks; | 101 | __be64 dd_num_blocks; |
| 102 | u32 dd_offset_disk_path; | 102 | __be32 dd_offset_disk_path; |
| 103 | 103 | ||
| 104 | /* Maximum time allowed to prevent an automatic dump-reboot. */ | 104 | /* Maximum time allowed to prevent an automatic dump-reboot. */ |
| 105 | u32 max_time_auto; | 105 | __be32 max_time_auto; |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | /* | 108 | /* |
| @@ -174,15 +174,15 @@ static inline u64 str_to_u64(const char *str) | |||
| 174 | 174 | ||
| 175 | /* Register save area header. */ | 175 | /* Register save area header. */ |
| 176 | struct fadump_reg_save_area_header { | 176 | struct fadump_reg_save_area_header { |
| 177 | u64 magic_number; | 177 | __be64 magic_number; |
| 178 | u32 version; | 178 | __be32 version; |
| 179 | u32 num_cpu_offset; | 179 | __be32 num_cpu_offset; |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | /* Register entry. */ | 182 | /* Register entry. */ |
| 183 | struct fadump_reg_entry { | 183 | struct fadump_reg_entry { |
| 184 | u64 reg_id; | 184 | __be64 reg_id; |
| 185 | u64 reg_value; | 185 | __be64 reg_value; |
| 186 | }; | 186 | }; |
| 187 | 187 | ||
| 188 | /* fadump crash info structure */ | 188 | /* fadump crash info structure */ |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 5bbd1bc8c3b0..0905c8da90f1 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
| @@ -659,7 +659,13 @@ _GLOBAL(ret_from_except_lite) | |||
| 659 | 3: | 659 | 3: |
| 660 | #endif | 660 | #endif |
| 661 | bl save_nvgprs | 661 | bl save_nvgprs |
| 662 | /* | ||
| 663 | * Use a non volatile GPR to save and restore our thread_info flags | ||
| 664 | * across the call to restore_interrupts. | ||
| 665 | */ | ||
| 666 | mr r30,r4 | ||
| 662 | bl restore_interrupts | 667 | bl restore_interrupts |
| 668 | mr r4,r30 | ||
| 663 | addi r3,r1,STACK_FRAME_OVERHEAD | 669 | addi r3,r1,STACK_FRAME_OVERHEAD |
| 664 | bl do_notify_resume | 670 | bl do_notify_resume |
| 665 | b ret_from_except | 671 | b ret_from_except |
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 742694c1d852..26d091a1a54c 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c | |||
| @@ -58,7 +58,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 58 | const __be32 *sections; | 58 | const __be32 *sections; |
| 59 | int i, num_sections; | 59 | int i, num_sections; |
| 60 | int size; | 60 | int size; |
| 61 | const int *token; | 61 | const __be32 *token; |
| 62 | 62 | ||
| 63 | if (depth != 1 || strcmp(uname, "rtas") != 0) | 63 | if (depth != 1 || strcmp(uname, "rtas") != 0) |
| 64 | return 0; | 64 | return 0; |
| @@ -72,7 +72,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 72 | return 1; | 72 | return 1; |
| 73 | 73 | ||
| 74 | fw_dump.fadump_supported = 1; | 74 | fw_dump.fadump_supported = 1; |
| 75 | fw_dump.ibm_configure_kernel_dump = *token; | 75 | fw_dump.ibm_configure_kernel_dump = be32_to_cpu(*token); |
| 76 | 76 | ||
| 77 | /* | 77 | /* |
| 78 | * The 'ibm,kernel-dump' rtas node is present only if there is | 78 | * The 'ibm,kernel-dump' rtas node is present only if there is |
| @@ -147,11 +147,11 @@ static unsigned long init_fadump_mem_struct(struct fadump_mem_struct *fdm, | |||
| 147 | memset(fdm, 0, sizeof(struct fadump_mem_struct)); | 147 | memset(fdm, 0, sizeof(struct fadump_mem_struct)); |
| 148 | addr = addr & PAGE_MASK; | 148 | addr = addr & PAGE_MASK; |
| 149 | 149 | ||
| 150 | fdm->header.dump_format_version = 0x00000001; | 150 | fdm->header.dump_format_version = cpu_to_be32(0x00000001); |
| 151 | fdm->header.dump_num_sections = 3; | 151 | fdm->header.dump_num_sections = cpu_to_be16(3); |
| 152 | fdm->header.dump_status_flag = 0; | 152 | fdm->header.dump_status_flag = 0; |
| 153 | fdm->header.offset_first_dump_section = | 153 | fdm->header.offset_first_dump_section = |
| 154 | (u32)offsetof(struct fadump_mem_struct, cpu_state_data); | 154 | cpu_to_be32((u32)offsetof(struct fadump_mem_struct, cpu_state_data)); |
| 155 | 155 | ||
| 156 | /* | 156 | /* |
| 157 | * Fields for disk dump option. | 157 | * Fields for disk dump option. |
| @@ -167,27 +167,27 @@ static unsigned long init_fadump_mem_struct(struct fadump_mem_struct *fdm, | |||
| 167 | 167 | ||
| 168 | /* Kernel dump sections */ | 168 | /* Kernel dump sections */ |
| 169 | /* cpu state data section. */ | 169 | /* cpu state data section. */ |
| 170 | fdm->cpu_state_data.request_flag = FADUMP_REQUEST_FLAG; | 170 | fdm->cpu_state_data.request_flag = cpu_to_be32(FADUMP_REQUEST_FLAG); |
| 171 | fdm->cpu_state_data.source_data_type = FADUMP_CPU_STATE_DATA; | 171 | fdm->cpu_state_data.source_data_type = cpu_to_be16(FADUMP_CPU_STATE_DATA); |
| 172 | fdm->cpu_state_data.source_address = 0; | 172 | fdm->cpu_state_data.source_address = 0; |
| 173 | fdm->cpu_state_data.source_len = fw_dump.cpu_state_data_size; | 173 | fdm->cpu_state_data.source_len = cpu_to_be64(fw_dump.cpu_state_data_size); |
| 174 | fdm->cpu_state_data.destination_address = addr; | 174 | fdm->cpu_state_data.destination_address = cpu_to_be64(addr); |
| 175 | addr += fw_dump.cpu_state_data_size; | 175 | addr += fw_dump.cpu_state_data_size; |
| 176 | 176 | ||
| 177 | /* hpte region section */ | 177 | /* hpte region section */ |
| 178 | fdm->hpte_region.request_flag = FADUMP_REQUEST_FLAG; | 178 | fdm->hpte_region.request_flag = cpu_to_be32(FADUMP_REQUEST_FLAG); |
| 179 | fdm->hpte_region.source_data_type = FADUMP_HPTE_REGION; | 179 | fdm->hpte_region.source_data_type = cpu_to_be16(FADUMP_HPTE_REGION); |
| 180 | fdm->hpte_region.source_address = 0; | 180 | fdm->hpte_region.source_address = 0; |
| 181 | fdm->hpte_region.source_len = fw_dump.hpte_region_size; | 181 | fdm->hpte_region.source_len = cpu_to_be64(fw_dump.hpte_region_size); |
| 182 | fdm->hpte_region.destination_address = addr; | 182 | fdm->hpte_region.destination_address = cpu_to_be64(addr); |
| 183 | addr += fw_dump.hpte_region_size; | 183 | addr += fw_dump.hpte_region_size; |
| 184 | 184 | ||
| 185 | /* RMA region section */ | 185 | /* RMA region section */ |
| 186 | fdm->rmr_region.request_flag = FADUMP_REQUEST_FLAG; | 186 | fdm->rmr_region.request_flag = cpu_to_be32(FADUMP_REQUEST_FLAG); |
| 187 | fdm->rmr_region.source_data_type = FADUMP_REAL_MODE_REGION; | 187 | fdm->rmr_region.source_data_type = cpu_to_be16(FADUMP_REAL_MODE_REGION); |
| 188 | fdm->rmr_region.source_address = RMA_START; | 188 | fdm->rmr_region.source_address = cpu_to_be64(RMA_START); |
| 189 | fdm->rmr_region.source_len = fw_dump.boot_memory_size; | 189 | fdm->rmr_region.source_len = cpu_to_be64(fw_dump.boot_memory_size); |
| 190 | fdm->rmr_region.destination_address = addr; | 190 | fdm->rmr_region.destination_address = cpu_to_be64(addr); |
| 191 | addr += fw_dump.boot_memory_size; | 191 | addr += fw_dump.boot_memory_size; |
| 192 | 192 | ||
| 193 | return addr; | 193 | return addr; |
| @@ -272,7 +272,7 @@ int __init fadump_reserve_mem(void) | |||
| 272 | * first kernel. | 272 | * first kernel. |
| 273 | */ | 273 | */ |
| 274 | if (fdm_active) | 274 | if (fdm_active) |
| 275 | fw_dump.boot_memory_size = fdm_active->rmr_region.source_len; | 275 | fw_dump.boot_memory_size = be64_to_cpu(fdm_active->rmr_region.source_len); |
| 276 | else | 276 | else |
| 277 | fw_dump.boot_memory_size = fadump_calculate_reserve_size(); | 277 | fw_dump.boot_memory_size = fadump_calculate_reserve_size(); |
| 278 | 278 | ||
| @@ -314,8 +314,8 @@ int __init fadump_reserve_mem(void) | |||
| 314 | (unsigned long)(base >> 20)); | 314 | (unsigned long)(base >> 20)); |
| 315 | 315 | ||
| 316 | fw_dump.fadumphdr_addr = | 316 | fw_dump.fadumphdr_addr = |
| 317 | fdm_active->rmr_region.destination_address + | 317 | be64_to_cpu(fdm_active->rmr_region.destination_address) + |
| 318 | fdm_active->rmr_region.source_len; | 318 | be64_to_cpu(fdm_active->rmr_region.source_len); |
| 319 | pr_debug("fadumphdr_addr = %p\n", | 319 | pr_debug("fadumphdr_addr = %p\n", |
| 320 | (void *) fw_dump.fadumphdr_addr); | 320 | (void *) fw_dump.fadumphdr_addr); |
| 321 | } else { | 321 | } else { |
| @@ -472,9 +472,9 @@ fadump_read_registers(struct fadump_reg_entry *reg_entry, struct pt_regs *regs) | |||
| 472 | { | 472 | { |
| 473 | memset(regs, 0, sizeof(struct pt_regs)); | 473 | memset(regs, 0, sizeof(struct pt_regs)); |
| 474 | 474 | ||
| 475 | while (reg_entry->reg_id != REG_ID("CPUEND")) { | 475 | while (be64_to_cpu(reg_entry->reg_id) != REG_ID("CPUEND")) { |
| 476 | fadump_set_regval(regs, reg_entry->reg_id, | 476 | fadump_set_regval(regs, be64_to_cpu(reg_entry->reg_id), |
| 477 | reg_entry->reg_value); | 477 | be64_to_cpu(reg_entry->reg_value)); |
| 478 | reg_entry++; | 478 | reg_entry++; |
| 479 | } | 479 | } |
| 480 | reg_entry++; | 480 | reg_entry++; |
| @@ -603,20 +603,20 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm) | |||
| 603 | if (!fdm->cpu_state_data.bytes_dumped) | 603 | if (!fdm->cpu_state_data.bytes_dumped) |
| 604 | return -EINVAL; | 604 | return -EINVAL; |
| 605 | 605 | ||
| 606 | addr = fdm->cpu_state_data.destination_address; | 606 | addr = be64_to_cpu(fdm->cpu_state_data.destination_address); |
| 607 | vaddr = __va(addr); | 607 | vaddr = __va(addr); |
| 608 | 608 | ||
| 609 | reg_header = vaddr; | 609 | reg_header = vaddr; |
| 610 | if (reg_header->magic_number != REGSAVE_AREA_MAGIC) { | 610 | if (be64_to_cpu(reg_header->magic_number) != REGSAVE_AREA_MAGIC) { |
| 611 | printk(KERN_ERR "Unable to read register save area.\n"); | 611 | printk(KERN_ERR "Unable to read register save area.\n"); |
| 612 | return -ENOENT; | 612 | return -ENOENT; |
| 613 | } | 613 | } |
| 614 | pr_debug("--------CPU State Data------------\n"); | 614 | pr_debug("--------CPU State Data------------\n"); |
| 615 | pr_debug("Magic Number: %llx\n", reg_header->magic_number); | 615 | pr_debug("Magic Number: %llx\n", be64_to_cpu(reg_header->magic_number)); |
| 616 | pr_debug("NumCpuOffset: %x\n", reg_header->num_cpu_offset); | 616 | pr_debug("NumCpuOffset: %x\n", be32_to_cpu(reg_header->num_cpu_offset)); |
| 617 | 617 | ||
| 618 | vaddr += reg_header->num_cpu_offset; | 618 | vaddr += be32_to_cpu(reg_header->num_cpu_offset); |
| 619 | num_cpus = *((u32 *)(vaddr)); | 619 | num_cpus = be32_to_cpu(*((__be32 *)(vaddr))); |
| 620 | pr_debug("NumCpus : %u\n", num_cpus); | 620 | pr_debug("NumCpus : %u\n", num_cpus); |
| 621 | vaddr += sizeof(u32); | 621 | vaddr += sizeof(u32); |
| 622 | reg_entry = (struct fadump_reg_entry *)vaddr; | 622 | reg_entry = (struct fadump_reg_entry *)vaddr; |
| @@ -639,13 +639,13 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm) | |||
| 639 | fdh = __va(fw_dump.fadumphdr_addr); | 639 | fdh = __va(fw_dump.fadumphdr_addr); |
| 640 | 640 | ||
| 641 | for (i = 0; i < num_cpus; i++) { | 641 | for (i = 0; i < num_cpus; i++) { |
| 642 | if (reg_entry->reg_id != REG_ID("CPUSTRT")) { | 642 | if (be64_to_cpu(reg_entry->reg_id) != REG_ID("CPUSTRT")) { |
| 643 | printk(KERN_ERR "Unable to read CPU state data\n"); | 643 | printk(KERN_ERR "Unable to read CPU state data\n"); |
| 644 | rc = -ENOENT; | 644 | rc = -ENOENT; |
| 645 | goto error_out; | 645 | goto error_out; |
| 646 | } | 646 | } |
| 647 | /* Lower 4 bytes of reg_value contains logical cpu id */ | 647 | /* Lower 4 bytes of reg_value contains logical cpu id */ |
| 648 | cpu = reg_entry->reg_value & FADUMP_CPU_ID_MASK; | 648 | cpu = be64_to_cpu(reg_entry->reg_value) & FADUMP_CPU_ID_MASK; |
| 649 | if (fdh && !cpumask_test_cpu(cpu, &fdh->cpu_online_mask)) { | 649 | if (fdh && !cpumask_test_cpu(cpu, &fdh->cpu_online_mask)) { |
| 650 | SKIP_TO_NEXT_CPU(reg_entry); | 650 | SKIP_TO_NEXT_CPU(reg_entry); |
| 651 | continue; | 651 | continue; |
| @@ -692,7 +692,7 @@ static int __init process_fadump(const struct fadump_mem_struct *fdm_active) | |||
| 692 | return -EINVAL; | 692 | return -EINVAL; |
| 693 | 693 | ||
| 694 | /* Check if the dump data is valid. */ | 694 | /* Check if the dump data is valid. */ |
| 695 | if ((fdm_active->header.dump_status_flag == FADUMP_ERROR_FLAG) || | 695 | if ((be16_to_cpu(fdm_active->header.dump_status_flag) == FADUMP_ERROR_FLAG) || |
| 696 | (fdm_active->cpu_state_data.error_flags != 0) || | 696 | (fdm_active->cpu_state_data.error_flags != 0) || |
| 697 | (fdm_active->rmr_region.error_flags != 0)) { | 697 | (fdm_active->rmr_region.error_flags != 0)) { |
| 698 | printk(KERN_ERR "Dump taken by platform is not valid\n"); | 698 | printk(KERN_ERR "Dump taken by platform is not valid\n"); |
| @@ -828,7 +828,7 @@ static void fadump_setup_crash_memory_ranges(void) | |||
| 828 | static inline unsigned long fadump_relocate(unsigned long paddr) | 828 | static inline unsigned long fadump_relocate(unsigned long paddr) |
| 829 | { | 829 | { |
| 830 | if (paddr > RMA_START && paddr < fw_dump.boot_memory_size) | 830 | if (paddr > RMA_START && paddr < fw_dump.boot_memory_size) |
| 831 | return fdm.rmr_region.destination_address + paddr; | 831 | return be64_to_cpu(fdm.rmr_region.destination_address) + paddr; |
| 832 | else | 832 | else |
| 833 | return paddr; | 833 | return paddr; |
| 834 | } | 834 | } |
| @@ -902,7 +902,7 @@ static int fadump_create_elfcore_headers(char *bufp) | |||
| 902 | * to the specified destination_address. Hence set | 902 | * to the specified destination_address. Hence set |
| 903 | * the correct offset. | 903 | * the correct offset. |
| 904 | */ | 904 | */ |
| 905 | phdr->p_offset = fdm.rmr_region.destination_address; | 905 | phdr->p_offset = be64_to_cpu(fdm.rmr_region.destination_address); |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | phdr->p_paddr = mbase; | 908 | phdr->p_paddr = mbase; |
| @@ -951,7 +951,7 @@ static void register_fadump(void) | |||
| 951 | 951 | ||
| 952 | fadump_setup_crash_memory_ranges(); | 952 | fadump_setup_crash_memory_ranges(); |
| 953 | 953 | ||
| 954 | addr = fdm.rmr_region.destination_address + fdm.rmr_region.source_len; | 954 | addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len); |
| 955 | /* Initialize fadump crash info header. */ | 955 | /* Initialize fadump crash info header. */ |
| 956 | addr = init_fadump_header(addr); | 956 | addr = init_fadump_header(addr); |
| 957 | vaddr = __va(addr); | 957 | vaddr = __va(addr); |
| @@ -1023,7 +1023,7 @@ void fadump_cleanup(void) | |||
| 1023 | /* Invalidate the registration only if dump is active. */ | 1023 | /* Invalidate the registration only if dump is active. */ |
| 1024 | if (fw_dump.dump_active) { | 1024 | if (fw_dump.dump_active) { |
| 1025 | init_fadump_mem_struct(&fdm, | 1025 | init_fadump_mem_struct(&fdm, |
| 1026 | fdm_active->cpu_state_data.destination_address); | 1026 | be64_to_cpu(fdm_active->cpu_state_data.destination_address)); |
| 1027 | fadump_invalidate_dump(&fdm); | 1027 | fadump_invalidate_dump(&fdm); |
| 1028 | } | 1028 | } |
| 1029 | } | 1029 | } |
| @@ -1063,7 +1063,7 @@ static void fadump_invalidate_release_mem(void) | |||
| 1063 | return; | 1063 | return; |
| 1064 | } | 1064 | } |
| 1065 | 1065 | ||
| 1066 | destination_address = fdm_active->cpu_state_data.destination_address; | 1066 | destination_address = be64_to_cpu(fdm_active->cpu_state_data.destination_address); |
| 1067 | fadump_cleanup(); | 1067 | fadump_cleanup(); |
| 1068 | mutex_unlock(&fadump_mutex); | 1068 | mutex_unlock(&fadump_mutex); |
| 1069 | 1069 | ||
| @@ -1183,31 +1183,31 @@ static int fadump_region_show(struct seq_file *m, void *private) | |||
| 1183 | seq_printf(m, | 1183 | seq_printf(m, |
| 1184 | "CPU : [%#016llx-%#016llx] %#llx bytes, " | 1184 | "CPU : [%#016llx-%#016llx] %#llx bytes, " |
| 1185 | "Dumped: %#llx\n", | 1185 | "Dumped: %#llx\n", |
| 1186 | fdm_ptr->cpu_state_data.destination_address, | 1186 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address), |
| 1187 | fdm_ptr->cpu_state_data.destination_address + | 1187 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) + |
| 1188 | fdm_ptr->cpu_state_data.source_len - 1, | 1188 | be64_to_cpu(fdm_ptr->cpu_state_data.source_len) - 1, |
| 1189 | fdm_ptr->cpu_state_data.source_len, | 1189 | be64_to_cpu(fdm_ptr->cpu_state_data.source_len), |
| 1190 | fdm_ptr->cpu_state_data.bytes_dumped); | 1190 | be64_to_cpu(fdm_ptr->cpu_state_data.bytes_dumped)); |
| 1191 | seq_printf(m, | 1191 | seq_printf(m, |
| 1192 | "HPTE: [%#016llx-%#016llx] %#llx bytes, " | 1192 | "HPTE: [%#016llx-%#016llx] %#llx bytes, " |
| 1193 | "Dumped: %#llx\n", | 1193 | "Dumped: %#llx\n", |
| 1194 | fdm_ptr->hpte_region.destination_address, | 1194 | be64_to_cpu(fdm_ptr->hpte_region.destination_address), |
| 1195 | fdm_ptr->hpte_region.destination_address + | 1195 | be64_to_cpu(fdm_ptr->hpte_region.destination_address) + |
| 1196 | fdm_ptr->hpte_region.source_len - 1, | 1196 | be64_to_cpu(fdm_ptr->hpte_region.source_len) - 1, |
| 1197 | fdm_ptr->hpte_region.source_len, | 1197 | be64_to_cpu(fdm_ptr->hpte_region.source_len), |
| 1198 | fdm_ptr->hpte_region.bytes_dumped); | 1198 | be64_to_cpu(fdm_ptr->hpte_region.bytes_dumped)); |
| 1199 | seq_printf(m, | 1199 | seq_printf(m, |
| 1200 | "DUMP: [%#016llx-%#016llx] %#llx bytes, " | 1200 | "DUMP: [%#016llx-%#016llx] %#llx bytes, " |
| 1201 | "Dumped: %#llx\n", | 1201 | "Dumped: %#llx\n", |
| 1202 | fdm_ptr->rmr_region.destination_address, | 1202 | be64_to_cpu(fdm_ptr->rmr_region.destination_address), |
| 1203 | fdm_ptr->rmr_region.destination_address + | 1203 | be64_to_cpu(fdm_ptr->rmr_region.destination_address) + |
| 1204 | fdm_ptr->rmr_region.source_len - 1, | 1204 | be64_to_cpu(fdm_ptr->rmr_region.source_len) - 1, |
| 1205 | fdm_ptr->rmr_region.source_len, | 1205 | be64_to_cpu(fdm_ptr->rmr_region.source_len), |
| 1206 | fdm_ptr->rmr_region.bytes_dumped); | 1206 | be64_to_cpu(fdm_ptr->rmr_region.bytes_dumped)); |
| 1207 | 1207 | ||
| 1208 | if (!fdm_active || | 1208 | if (!fdm_active || |
| 1209 | (fw_dump.reserve_dump_area_start == | 1209 | (fw_dump.reserve_dump_area_start == |
| 1210 | fdm_ptr->cpu_state_data.destination_address)) | 1210 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address))) |
| 1211 | goto out; | 1211 | goto out; |
| 1212 | 1212 | ||
| 1213 | /* Dump is active. Show reserved memory region. */ | 1213 | /* Dump is active. Show reserved memory region. */ |
| @@ -1215,10 +1215,10 @@ static int fadump_region_show(struct seq_file *m, void *private) | |||
| 1215 | " : [%#016llx-%#016llx] %#llx bytes, " | 1215 | " : [%#016llx-%#016llx] %#llx bytes, " |
| 1216 | "Dumped: %#llx\n", | 1216 | "Dumped: %#llx\n", |
| 1217 | (unsigned long long)fw_dump.reserve_dump_area_start, | 1217 | (unsigned long long)fw_dump.reserve_dump_area_start, |
| 1218 | fdm_ptr->cpu_state_data.destination_address - 1, | 1218 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) - 1, |
| 1219 | fdm_ptr->cpu_state_data.destination_address - | 1219 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) - |
| 1220 | fw_dump.reserve_dump_area_start, | 1220 | fw_dump.reserve_dump_area_start, |
| 1221 | fdm_ptr->cpu_state_data.destination_address - | 1221 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) - |
| 1222 | fw_dump.reserve_dump_area_start); | 1222 | fw_dump.reserve_dump_area_start); |
| 1223 | out: | 1223 | out: |
| 1224 | if (fdm_active) | 1224 | if (fdm_active) |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index cad68ff8eca5..415a51b028b9 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
| @@ -103,7 +103,7 @@ unsigned long __max_low_memory = MAX_LOW_MEM; | |||
| 103 | /* | 103 | /* |
| 104 | * Check for command-line options that affect what MMU_init will do. | 104 | * Check for command-line options that affect what MMU_init will do. |
| 105 | */ | 105 | */ |
| 106 | void MMU_setup(void) | 106 | void __init MMU_setup(void) |
| 107 | { | 107 | { |
| 108 | /* Check for nobats option (used in mapin_ram). */ | 108 | /* Check for nobats option (used in mapin_ram). */ |
| 109 | if (strstr(boot_command_line, "nobats")) { | 109 | if (strstr(boot_command_line, "nobats")) { |
diff --git a/arch/powerpc/platforms/powernv/opal-lpc.c b/arch/powerpc/platforms/powernv/opal-lpc.c index ad4b31df779a..e4169d68cb32 100644 --- a/arch/powerpc/platforms/powernv/opal-lpc.c +++ b/arch/powerpc/platforms/powernv/opal-lpc.c | |||
| @@ -216,14 +216,54 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf, | |||
| 216 | &data, len); | 216 | &data, len); |
| 217 | if (rc) | 217 | if (rc) |
| 218 | return -ENXIO; | 218 | return -ENXIO; |
| 219 | |||
| 220 | /* | ||
| 221 | * Now there is some trickery with the data returned by OPAL | ||
| 222 | * as it's the desired data right justified in a 32-bit BE | ||
| 223 | * word. | ||
| 224 | * | ||
| 225 | * This is a very bad interface and I'm to blame for it :-( | ||
| 226 | * | ||
| 227 | * So we can't just apply a 32-bit swap to what comes from OPAL, | ||
| 228 | * because user space expects the *bytes* to be in their proper | ||
| 229 | * respective positions (ie, LPC position). | ||
| 230 | * | ||
| 231 | * So what we really want to do here is to shift data right | ||
| 232 | * appropriately on a LE kernel. | ||
| 233 | * | ||
| 234 | * IE. If the LPC transaction has bytes B0, B1, B2 and B3 in that | ||
| 235 | * order, we have in memory written to by OPAL at the "data" | ||
| 236 | * pointer: | ||
| 237 | * | ||
| 238 | * Bytes: OPAL "data" LE "data" | ||
| 239 | * 32-bit: B0 B1 B2 B3 B0B1B2B3 B3B2B1B0 | ||
| 240 | * 16-bit: B0 B1 0000B0B1 B1B00000 | ||
| 241 | * 8-bit: B0 000000B0 B0000000 | ||
| 242 | * | ||
| 243 | * So a BE kernel will have the leftmost of the above in the MSB | ||
| 244 | * and rightmost in the LSB and can just then "cast" the u32 "data" | ||
| 245 | * down to the appropriate quantity and write it. | ||
| 246 | * | ||
| 247 | * However, an LE kernel can't. It doesn't need to swap because a | ||
| 248 | * load from data followed by a store to user are going to preserve | ||
| 249 | * the byte ordering which is the wire byte order which is what the | ||
| 250 | * user wants, but in order to "crop" to the right size, we need to | ||
| 251 | * shift right first. | ||
| 252 | */ | ||
| 219 | switch(len) { | 253 | switch(len) { |
| 220 | case 4: | 254 | case 4: |
| 221 | rc = __put_user((u32)data, (u32 __user *)ubuf); | 255 | rc = __put_user((u32)data, (u32 __user *)ubuf); |
| 222 | break; | 256 | break; |
| 223 | case 2: | 257 | case 2: |
| 258 | #ifdef __LITTLE_ENDIAN__ | ||
| 259 | data >>= 16; | ||
| 260 | #endif | ||
| 224 | rc = __put_user((u16)data, (u16 __user *)ubuf); | 261 | rc = __put_user((u16)data, (u16 __user *)ubuf); |
| 225 | break; | 262 | break; |
| 226 | default: | 263 | default: |
| 264 | #ifdef __LITTLE_ENDIAN__ | ||
| 265 | data >>= 24; | ||
| 266 | #endif | ||
| 227 | rc = __put_user((u8)data, (u8 __user *)ubuf); | 267 | rc = __put_user((u8)data, (u8 __user *)ubuf); |
| 228 | break; | 268 | break; |
| 229 | } | 269 | } |
| @@ -263,12 +303,31 @@ static ssize_t lpc_debug_write(struct file *filp, const char __user *ubuf, | |||
| 263 | else if (todo > 1 && (pos & 1) == 0) | 303 | else if (todo > 1 && (pos & 1) == 0) |
| 264 | len = 2; | 304 | len = 2; |
| 265 | } | 305 | } |
| 306 | |||
| 307 | /* | ||
| 308 | * Similarly to the read case, we have some trickery here but | ||
| 309 | * it's different to handle. We need to pass the value to OPAL in | ||
| 310 | * a register whose layout depends on the access size. We want | ||
| 311 | * to reproduce the memory layout of the user, however we aren't | ||
| 312 | * doing a load from user and a store to another memory location | ||
| 313 | * which would achieve that. Here we pass the value to OPAL via | ||
| 314 | * a register which is expected to contain the "BE" interpretation | ||
| 315 | * of the byte sequence. IE: for a 32-bit access, byte 0 should be | ||
| 316 | * in the MSB. So here we *do* need to byteswap on LE. | ||
| 317 | * | ||
| 318 | * User bytes: LE "data" OPAL "data" | ||
| 319 | * 32-bit: B0 B1 B2 B3 B3B2B1B0 B0B1B2B3 | ||
| 320 | * 16-bit: B0 B1 0000B1B0 0000B0B1 | ||
| 321 | * 8-bit: B0 000000B0 000000B0 | ||
| 322 | */ | ||
| 266 | switch(len) { | 323 | switch(len) { |
| 267 | case 4: | 324 | case 4: |
| 268 | rc = __get_user(data, (u32 __user *)ubuf); | 325 | rc = __get_user(data, (u32 __user *)ubuf); |
| 326 | data = cpu_to_be32(data); | ||
| 269 | break; | 327 | break; |
| 270 | case 2: | 328 | case 2: |
| 271 | rc = __get_user(data, (u16 __user *)ubuf); | 329 | rc = __get_user(data, (u16 __user *)ubuf); |
| 330 | data = cpu_to_be16(data); | ||
| 272 | break; | 331 | break; |
| 273 | default: | 332 | default: |
| 274 | rc = __get_user(data, (u8 __user *)ubuf); | 333 | rc = __get_user(data, (u8 __user *)ubuf); |
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 6ad83bd11fe2..c22bb1b4beb8 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
| @@ -382,7 +382,7 @@ static int dlpar_online_cpu(struct device_node *dn) | |||
| 382 | BUG_ON(get_cpu_current_state(cpu) | 382 | BUG_ON(get_cpu_current_state(cpu) |
| 383 | != CPU_STATE_OFFLINE); | 383 | != CPU_STATE_OFFLINE); |
| 384 | cpu_maps_update_done(); | 384 | cpu_maps_update_done(); |
| 385 | rc = cpu_up(cpu); | 385 | rc = device_online(get_cpu_device(cpu)); |
| 386 | if (rc) | 386 | if (rc) |
| 387 | goto out; | 387 | goto out; |
| 388 | cpu_maps_update_begin(); | 388 | cpu_maps_update_begin(); |
| @@ -467,7 +467,7 @@ static int dlpar_offline_cpu(struct device_node *dn) | |||
| 467 | if (get_cpu_current_state(cpu) == CPU_STATE_ONLINE) { | 467 | if (get_cpu_current_state(cpu) == CPU_STATE_ONLINE) { |
| 468 | set_preferred_offline_state(cpu, CPU_STATE_OFFLINE); | 468 | set_preferred_offline_state(cpu, CPU_STATE_OFFLINE); |
| 469 | cpu_maps_update_done(); | 469 | cpu_maps_update_done(); |
| 470 | rc = cpu_down(cpu); | 470 | rc = device_offline(get_cpu_device(cpu)); |
| 471 | if (rc) | 471 | if (rc) |
| 472 | goto out; | 472 | goto out; |
| 473 | cpu_maps_update_begin(); | 473 | cpu_maps_update_begin(); |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 8c509d5397c6..f6880d2a40fb 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <asm/trace.h> | 43 | #include <asm/trace.h> |
| 44 | #include <asm/firmware.h> | 44 | #include <asm/firmware.h> |
| 45 | #include <asm/plpar_wrappers.h> | 45 | #include <asm/plpar_wrappers.h> |
| 46 | #include <asm/fadump.h> | ||
| 46 | 47 | ||
| 47 | #include "pseries.h" | 48 | #include "pseries.h" |
| 48 | 49 | ||
| @@ -247,8 +248,17 @@ static void pSeries_lpar_hptab_clear(void) | |||
| 247 | } | 248 | } |
| 248 | 249 | ||
| 249 | #ifdef __LITTLE_ENDIAN__ | 250 | #ifdef __LITTLE_ENDIAN__ |
| 250 | /* Reset exceptions to big endian */ | 251 | /* |
| 251 | if (firmware_has_feature(FW_FEATURE_SET_MODE)) { | 252 | * Reset exceptions to big endian. |
| 253 | * | ||
| 254 | * FIXME this is a hack for kexec, we need to reset the exception | ||
| 255 | * endian before starting the new kernel and this is a convenient place | ||
| 256 | * to do it. | ||
| 257 | * | ||
| 258 | * This is also called on boot when a fadump happens. In that case we | ||
| 259 | * must not change the exception endian mode. | ||
| 260 | */ | ||
| 261 | if (firmware_has_feature(FW_FEATURE_SET_MODE) && !is_fadump_active()) { | ||
| 252 | long rc; | 262 | long rc; |
| 253 | 263 | ||
| 254 | rc = pseries_big_endian_exceptions(); | 264 | rc = pseries_big_endian_exceptions(); |
diff --git a/arch/s390/configs/default_defconfig b/arch/s390/configs/default_defconfig index 9d94fdd9f525..9432d0f202ef 100644 --- a/arch/s390/configs/default_defconfig +++ b/arch/s390/configs/default_defconfig | |||
| @@ -35,7 +35,6 @@ CONFIG_MODULE_UNLOAD=y | |||
| 35 | CONFIG_MODULE_FORCE_UNLOAD=y | 35 | CONFIG_MODULE_FORCE_UNLOAD=y |
| 36 | CONFIG_MODVERSIONS=y | 36 | CONFIG_MODVERSIONS=y |
| 37 | CONFIG_MODULE_SRCVERSION_ALL=y | 37 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 38 | CONFIG_BLK_DEV_INTEGRITY=y | ||
| 39 | CONFIG_BLK_DEV_THROTTLING=y | 38 | CONFIG_BLK_DEV_THROTTLING=y |
| 40 | CONFIG_PARTITION_ADVANCED=y | 39 | CONFIG_PARTITION_ADVANCED=y |
| 41 | CONFIG_IBM_PARTITION=y | 40 | CONFIG_IBM_PARTITION=y |
| @@ -245,6 +244,7 @@ CONFIG_NF_TABLES_IPV4=m | |||
| 245 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 244 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 246 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 245 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| 247 | CONFIG_NF_TABLES_ARP=m | 246 | CONFIG_NF_TABLES_ARP=m |
| 247 | CONFIG_NF_NAT_IPV4=m | ||
| 248 | CONFIG_IP_NF_IPTABLES=m | 248 | CONFIG_IP_NF_IPTABLES=m |
| 249 | CONFIG_IP_NF_MATCH_AH=m | 249 | CONFIG_IP_NF_MATCH_AH=m |
| 250 | CONFIG_IP_NF_MATCH_ECN=m | 250 | CONFIG_IP_NF_MATCH_ECN=m |
| @@ -252,11 +252,6 @@ CONFIG_IP_NF_MATCH_RPFILTER=m | |||
| 252 | CONFIG_IP_NF_MATCH_TTL=m | 252 | CONFIG_IP_NF_MATCH_TTL=m |
| 253 | CONFIG_IP_NF_FILTER=m | 253 | CONFIG_IP_NF_FILTER=m |
| 254 | CONFIG_IP_NF_TARGET_REJECT=m | 254 | CONFIG_IP_NF_TARGET_REJECT=m |
| 255 | CONFIG_IP_NF_TARGET_ULOG=m | ||
| 256 | CONFIG_NF_NAT_IPV4=m | ||
| 257 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
| 258 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
| 259 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
| 260 | CONFIG_IP_NF_MANGLE=m | 255 | CONFIG_IP_NF_MANGLE=m |
| 261 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | 256 | CONFIG_IP_NF_TARGET_CLUSTERIP=m |
| 262 | CONFIG_IP_NF_TARGET_ECN=m | 257 | CONFIG_IP_NF_TARGET_ECN=m |
| @@ -270,6 +265,7 @@ CONFIG_NF_CONNTRACK_IPV6=m | |||
| 270 | CONFIG_NF_TABLES_IPV6=m | 265 | CONFIG_NF_TABLES_IPV6=m |
| 271 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 266 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 272 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 267 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 268 | CONFIG_NF_NAT_IPV6=m | ||
| 273 | CONFIG_IP6_NF_IPTABLES=m | 269 | CONFIG_IP6_NF_IPTABLES=m |
| 274 | CONFIG_IP6_NF_MATCH_AH=m | 270 | CONFIG_IP6_NF_MATCH_AH=m |
| 275 | CONFIG_IP6_NF_MATCH_EUI64=m | 271 | CONFIG_IP6_NF_MATCH_EUI64=m |
| @@ -286,9 +282,6 @@ CONFIG_IP6_NF_TARGET_REJECT=m | |||
| 286 | CONFIG_IP6_NF_MANGLE=m | 282 | CONFIG_IP6_NF_MANGLE=m |
| 287 | CONFIG_IP6_NF_RAW=m | 283 | CONFIG_IP6_NF_RAW=m |
| 288 | CONFIG_IP6_NF_SECURITY=m | 284 | CONFIG_IP6_NF_SECURITY=m |
| 289 | CONFIG_NF_NAT_IPV6=m | ||
| 290 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | ||
| 291 | CONFIG_IP6_NF_TARGET_NPT=m | ||
| 292 | CONFIG_NF_TABLES_BRIDGE=m | 285 | CONFIG_NF_TABLES_BRIDGE=m |
| 293 | CONFIG_NET_SCTPPROBE=m | 286 | CONFIG_NET_SCTPPROBE=m |
| 294 | CONFIG_RDS=m | 287 | CONFIG_RDS=m |
| @@ -374,14 +367,13 @@ CONFIG_BLK_DEV_SR=m | |||
| 374 | CONFIG_CHR_DEV_SG=y | 367 | CONFIG_CHR_DEV_SG=y |
| 375 | CONFIG_CHR_DEV_SCH=m | 368 | CONFIG_CHR_DEV_SCH=m |
| 376 | CONFIG_SCSI_ENCLOSURE=m | 369 | CONFIG_SCSI_ENCLOSURE=m |
| 377 | CONFIG_SCSI_MULTI_LUN=y | ||
| 378 | CONFIG_SCSI_CONSTANTS=y | 370 | CONFIG_SCSI_CONSTANTS=y |
| 379 | CONFIG_SCSI_LOGGING=y | 371 | CONFIG_SCSI_LOGGING=y |
| 380 | CONFIG_SCSI_SPI_ATTRS=m | 372 | CONFIG_SCSI_SPI_ATTRS=m |
| 373 | CONFIG_SCSI_FC_ATTRS=y | ||
| 381 | CONFIG_SCSI_SAS_LIBSAS=m | 374 | CONFIG_SCSI_SAS_LIBSAS=m |
| 382 | CONFIG_SCSI_SRP_ATTRS=m | 375 | CONFIG_SCSI_SRP_ATTRS=m |
| 383 | CONFIG_ISCSI_TCP=m | 376 | CONFIG_ISCSI_TCP=m |
| 384 | CONFIG_LIBFCOE=m | ||
| 385 | CONFIG_SCSI_DEBUG=m | 377 | CONFIG_SCSI_DEBUG=m |
| 386 | CONFIG_ZFCP=y | 378 | CONFIG_ZFCP=y |
| 387 | CONFIG_SCSI_VIRTIO=m | 379 | CONFIG_SCSI_VIRTIO=m |
| @@ -427,7 +419,6 @@ CONFIG_VIRTIO_NET=m | |||
| 427 | CONFIG_NLMON=m | 419 | CONFIG_NLMON=m |
| 428 | CONFIG_VHOST_NET=m | 420 | CONFIG_VHOST_NET=m |
| 429 | # CONFIG_NET_VENDOR_ARC is not set | 421 | # CONFIG_NET_VENDOR_ARC is not set |
| 430 | # CONFIG_NET_CADENCE is not set | ||
| 431 | # CONFIG_NET_VENDOR_CHELSIO is not set | 422 | # CONFIG_NET_VENDOR_CHELSIO is not set |
| 432 | # CONFIG_NET_VENDOR_INTEL is not set | 423 | # CONFIG_NET_VENDOR_INTEL is not set |
| 433 | # CONFIG_NET_VENDOR_MARVELL is not set | 424 | # CONFIG_NET_VENDOR_MARVELL is not set |
| @@ -481,14 +472,14 @@ CONFIG_JFS_FS=m | |||
| 481 | CONFIG_JFS_POSIX_ACL=y | 472 | CONFIG_JFS_POSIX_ACL=y |
| 482 | CONFIG_JFS_SECURITY=y | 473 | CONFIG_JFS_SECURITY=y |
| 483 | CONFIG_JFS_STATISTICS=y | 474 | CONFIG_JFS_STATISTICS=y |
| 484 | CONFIG_XFS_FS=m | 475 | CONFIG_XFS_FS=y |
| 485 | CONFIG_XFS_QUOTA=y | 476 | CONFIG_XFS_QUOTA=y |
| 486 | CONFIG_XFS_POSIX_ACL=y | 477 | CONFIG_XFS_POSIX_ACL=y |
| 487 | CONFIG_XFS_RT=y | 478 | CONFIG_XFS_RT=y |
| 488 | CONFIG_XFS_DEBUG=y | 479 | CONFIG_XFS_DEBUG=y |
| 489 | CONFIG_GFS2_FS=m | 480 | CONFIG_GFS2_FS=m |
| 490 | CONFIG_OCFS2_FS=m | 481 | CONFIG_OCFS2_FS=m |
| 491 | CONFIG_BTRFS_FS=m | 482 | CONFIG_BTRFS_FS=y |
| 492 | CONFIG_BTRFS_FS_POSIX_ACL=y | 483 | CONFIG_BTRFS_FS_POSIX_ACL=y |
| 493 | CONFIG_NILFS2_FS=m | 484 | CONFIG_NILFS2_FS=m |
| 494 | CONFIG_FANOTIFY=y | 485 | CONFIG_FANOTIFY=y |
| @@ -574,7 +565,6 @@ CONFIG_DEBUG_SHIRQ=y | |||
| 574 | CONFIG_DETECT_HUNG_TASK=y | 565 | CONFIG_DETECT_HUNG_TASK=y |
| 575 | CONFIG_TIMER_STATS=y | 566 | CONFIG_TIMER_STATS=y |
| 576 | CONFIG_DEBUG_RT_MUTEXES=y | 567 | CONFIG_DEBUG_RT_MUTEXES=y |
| 577 | CONFIG_RT_MUTEX_TESTER=y | ||
| 578 | CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y | 568 | CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y |
| 579 | CONFIG_PROVE_LOCKING=y | 569 | CONFIG_PROVE_LOCKING=y |
| 580 | CONFIG_LOCK_STAT=y | 570 | CONFIG_LOCK_STAT=y |
| @@ -600,8 +590,13 @@ CONFIG_FAULT_INJECTION_DEBUG_FS=y | |||
| 600 | CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y | 590 | CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y |
| 601 | CONFIG_LATENCYTOP=y | 591 | CONFIG_LATENCYTOP=y |
| 602 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | 592 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y |
| 593 | CONFIG_IRQSOFF_TRACER=y | ||
| 594 | CONFIG_PREEMPT_TRACER=y | ||
| 595 | CONFIG_SCHED_TRACER=y | ||
| 596 | CONFIG_FTRACE_SYSCALLS=y | ||
| 597 | CONFIG_STACK_TRACER=y | ||
| 603 | CONFIG_BLK_DEV_IO_TRACE=y | 598 | CONFIG_BLK_DEV_IO_TRACE=y |
| 604 | # CONFIG_KPROBE_EVENT is not set | 599 | CONFIG_UPROBE_EVENT=y |
| 605 | CONFIG_LKDTM=m | 600 | CONFIG_LKDTM=m |
| 606 | CONFIG_TEST_LIST_SORT=y | 601 | CONFIG_TEST_LIST_SORT=y |
| 607 | CONFIG_KPROBES_SANITY_TEST=y | 602 | CONFIG_KPROBES_SANITY_TEST=y |
| @@ -609,7 +604,10 @@ CONFIG_RBTREE_TEST=y | |||
| 609 | CONFIG_INTERVAL_TREE_TEST=m | 604 | CONFIG_INTERVAL_TREE_TEST=m |
| 610 | CONFIG_PERCPU_TEST=m | 605 | CONFIG_PERCPU_TEST=m |
| 611 | CONFIG_ATOMIC64_SELFTEST=y | 606 | CONFIG_ATOMIC64_SELFTEST=y |
| 607 | CONFIG_TEST_STRING_HELPERS=y | ||
| 608 | CONFIG_TEST_KSTRTOX=y | ||
| 612 | CONFIG_DMA_API_DEBUG=y | 609 | CONFIG_DMA_API_DEBUG=y |
| 610 | CONFIG_TEST_BPF=m | ||
| 613 | # CONFIG_STRICT_DEVMEM is not set | 611 | # CONFIG_STRICT_DEVMEM is not set |
| 614 | CONFIG_S390_PTDUMP=y | 612 | CONFIG_S390_PTDUMP=y |
| 615 | CONFIG_ENCRYPTED_KEYS=m | 613 | CONFIG_ENCRYPTED_KEYS=m |
| @@ -673,12 +671,6 @@ CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | |||
| 673 | CONFIG_X509_CERTIFICATE_PARSER=m | 671 | CONFIG_X509_CERTIFICATE_PARSER=m |
| 674 | CONFIG_CRC7=m | 672 | CONFIG_CRC7=m |
| 675 | CONFIG_CRC8=m | 673 | CONFIG_CRC8=m |
| 676 | CONFIG_XZ_DEC_X86=y | ||
| 677 | CONFIG_XZ_DEC_POWERPC=y | ||
| 678 | CONFIG_XZ_DEC_IA64=y | ||
| 679 | CONFIG_XZ_DEC_ARM=y | ||
| 680 | CONFIG_XZ_DEC_ARMTHUMB=y | ||
| 681 | CONFIG_XZ_DEC_SPARC=y | ||
| 682 | CONFIG_CORDIC=m | 674 | CONFIG_CORDIC=m |
| 683 | CONFIG_CMM=m | 675 | CONFIG_CMM=m |
| 684 | CONFIG_APPLDATA_BASE=y | 676 | CONFIG_APPLDATA_BASE=y |
diff --git a/arch/s390/configs/gcov_defconfig b/arch/s390/configs/gcov_defconfig index 90f514baa37d..219dca6ea926 100644 --- a/arch/s390/configs/gcov_defconfig +++ b/arch/s390/configs/gcov_defconfig | |||
| @@ -35,7 +35,6 @@ CONFIG_MODULE_UNLOAD=y | |||
| 35 | CONFIG_MODULE_FORCE_UNLOAD=y | 35 | CONFIG_MODULE_FORCE_UNLOAD=y |
| 36 | CONFIG_MODVERSIONS=y | 36 | CONFIG_MODVERSIONS=y |
| 37 | CONFIG_MODULE_SRCVERSION_ALL=y | 37 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 38 | CONFIG_BLK_DEV_INTEGRITY=y | ||
| 39 | CONFIG_BLK_DEV_THROTTLING=y | 38 | CONFIG_BLK_DEV_THROTTLING=y |
| 40 | CONFIG_PARTITION_ADVANCED=y | 39 | CONFIG_PARTITION_ADVANCED=y |
| 41 | CONFIG_IBM_PARTITION=y | 40 | CONFIG_IBM_PARTITION=y |
| @@ -243,6 +242,7 @@ CONFIG_NF_TABLES_IPV4=m | |||
| 243 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 242 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 244 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 243 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| 245 | CONFIG_NF_TABLES_ARP=m | 244 | CONFIG_NF_TABLES_ARP=m |
| 245 | CONFIG_NF_NAT_IPV4=m | ||
| 246 | CONFIG_IP_NF_IPTABLES=m | 246 | CONFIG_IP_NF_IPTABLES=m |
| 247 | CONFIG_IP_NF_MATCH_AH=m | 247 | CONFIG_IP_NF_MATCH_AH=m |
| 248 | CONFIG_IP_NF_MATCH_ECN=m | 248 | CONFIG_IP_NF_MATCH_ECN=m |
| @@ -250,11 +250,6 @@ CONFIG_IP_NF_MATCH_RPFILTER=m | |||
| 250 | CONFIG_IP_NF_MATCH_TTL=m | 250 | CONFIG_IP_NF_MATCH_TTL=m |
| 251 | CONFIG_IP_NF_FILTER=m | 251 | CONFIG_IP_NF_FILTER=m |
| 252 | CONFIG_IP_NF_TARGET_REJECT=m | 252 | CONFIG_IP_NF_TARGET_REJECT=m |
| 253 | CONFIG_IP_NF_TARGET_ULOG=m | ||
| 254 | CONFIG_NF_NAT_IPV4=m | ||
| 255 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
| 256 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
| 257 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
| 258 | CONFIG_IP_NF_MANGLE=m | 253 | CONFIG_IP_NF_MANGLE=m |
| 259 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | 254 | CONFIG_IP_NF_TARGET_CLUSTERIP=m |
| 260 | CONFIG_IP_NF_TARGET_ECN=m | 255 | CONFIG_IP_NF_TARGET_ECN=m |
| @@ -268,6 +263,7 @@ CONFIG_NF_CONNTRACK_IPV6=m | |||
| 268 | CONFIG_NF_TABLES_IPV6=m | 263 | CONFIG_NF_TABLES_IPV6=m |
| 269 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 264 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 270 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 265 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 266 | CONFIG_NF_NAT_IPV6=m | ||
| 271 | CONFIG_IP6_NF_IPTABLES=m | 267 | CONFIG_IP6_NF_IPTABLES=m |
| 272 | CONFIG_IP6_NF_MATCH_AH=m | 268 | CONFIG_IP6_NF_MATCH_AH=m |
| 273 | CONFIG_IP6_NF_MATCH_EUI64=m | 269 | CONFIG_IP6_NF_MATCH_EUI64=m |
| @@ -284,9 +280,6 @@ CONFIG_IP6_NF_TARGET_REJECT=m | |||
| 284 | CONFIG_IP6_NF_MANGLE=m | 280 | CONFIG_IP6_NF_MANGLE=m |
| 285 | CONFIG_IP6_NF_RAW=m | 281 | CONFIG_IP6_NF_RAW=m |
| 286 | CONFIG_IP6_NF_SECURITY=m | 282 | CONFIG_IP6_NF_SECURITY=m |
| 287 | CONFIG_NF_NAT_IPV6=m | ||
| 288 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | ||
| 289 | CONFIG_IP6_NF_TARGET_NPT=m | ||
| 290 | CONFIG_NF_TABLES_BRIDGE=m | 283 | CONFIG_NF_TABLES_BRIDGE=m |
| 291 | CONFIG_NET_SCTPPROBE=m | 284 | CONFIG_NET_SCTPPROBE=m |
| 292 | CONFIG_RDS=m | 285 | CONFIG_RDS=m |
| @@ -371,14 +364,13 @@ CONFIG_BLK_DEV_SR=m | |||
| 371 | CONFIG_CHR_DEV_SG=y | 364 | CONFIG_CHR_DEV_SG=y |
| 372 | CONFIG_CHR_DEV_SCH=m | 365 | CONFIG_CHR_DEV_SCH=m |
| 373 | CONFIG_SCSI_ENCLOSURE=m | 366 | CONFIG_SCSI_ENCLOSURE=m |
| 374 | CONFIG_SCSI_MULTI_LUN=y | ||
| 375 | CONFIG_SCSI_CONSTANTS=y | 367 | CONFIG_SCSI_CONSTANTS=y |
| 376 | CONFIG_SCSI_LOGGING=y | 368 | CONFIG_SCSI_LOGGING=y |
| 377 | CONFIG_SCSI_SPI_ATTRS=m | 369 | CONFIG_SCSI_SPI_ATTRS=m |
| 370 | CONFIG_SCSI_FC_ATTRS=y | ||
| 378 | CONFIG_SCSI_SAS_LIBSAS=m | 371 | CONFIG_SCSI_SAS_LIBSAS=m |
| 379 | CONFIG_SCSI_SRP_ATTRS=m | 372 | CONFIG_SCSI_SRP_ATTRS=m |
| 380 | CONFIG_ISCSI_TCP=m | 373 | CONFIG_ISCSI_TCP=m |
| 381 | CONFIG_LIBFCOE=m | ||
| 382 | CONFIG_SCSI_DEBUG=m | 374 | CONFIG_SCSI_DEBUG=m |
| 383 | CONFIG_ZFCP=y | 375 | CONFIG_ZFCP=y |
| 384 | CONFIG_SCSI_VIRTIO=m | 376 | CONFIG_SCSI_VIRTIO=m |
| @@ -424,7 +416,6 @@ CONFIG_VIRTIO_NET=m | |||
| 424 | CONFIG_NLMON=m | 416 | CONFIG_NLMON=m |
| 425 | CONFIG_VHOST_NET=m | 417 | CONFIG_VHOST_NET=m |
| 426 | # CONFIG_NET_VENDOR_ARC is not set | 418 | # CONFIG_NET_VENDOR_ARC is not set |
| 427 | # CONFIG_NET_CADENCE is not set | ||
| 428 | # CONFIG_NET_VENDOR_CHELSIO is not set | 419 | # CONFIG_NET_VENDOR_CHELSIO is not set |
| 429 | # CONFIG_NET_VENDOR_INTEL is not set | 420 | # CONFIG_NET_VENDOR_INTEL is not set |
| 430 | # CONFIG_NET_VENDOR_MARVELL is not set | 421 | # CONFIG_NET_VENDOR_MARVELL is not set |
| @@ -478,13 +469,13 @@ CONFIG_JFS_FS=m | |||
| 478 | CONFIG_JFS_POSIX_ACL=y | 469 | CONFIG_JFS_POSIX_ACL=y |
| 479 | CONFIG_JFS_SECURITY=y | 470 | CONFIG_JFS_SECURITY=y |
| 480 | CONFIG_JFS_STATISTICS=y | 471 | CONFIG_JFS_STATISTICS=y |
| 481 | CONFIG_XFS_FS=m | 472 | CONFIG_XFS_FS=y |
| 482 | CONFIG_XFS_QUOTA=y | 473 | CONFIG_XFS_QUOTA=y |
| 483 | CONFIG_XFS_POSIX_ACL=y | 474 | CONFIG_XFS_POSIX_ACL=y |
| 484 | CONFIG_XFS_RT=y | 475 | CONFIG_XFS_RT=y |
| 485 | CONFIG_GFS2_FS=m | 476 | CONFIG_GFS2_FS=m |
| 486 | CONFIG_OCFS2_FS=m | 477 | CONFIG_OCFS2_FS=m |
| 487 | CONFIG_BTRFS_FS=m | 478 | CONFIG_BTRFS_FS=y |
| 488 | CONFIG_BTRFS_FS_POSIX_ACL=y | 479 | CONFIG_BTRFS_FS_POSIX_ACL=y |
| 489 | CONFIG_NILFS2_FS=m | 480 | CONFIG_NILFS2_FS=m |
| 490 | CONFIG_FANOTIFY=y | 481 | CONFIG_FANOTIFY=y |
| @@ -626,12 +617,6 @@ CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | |||
| 626 | CONFIG_X509_CERTIFICATE_PARSER=m | 617 | CONFIG_X509_CERTIFICATE_PARSER=m |
| 627 | CONFIG_CRC7=m | 618 | CONFIG_CRC7=m |
| 628 | CONFIG_CRC8=m | 619 | CONFIG_CRC8=m |
| 629 | CONFIG_XZ_DEC_X86=y | ||
| 630 | CONFIG_XZ_DEC_POWERPC=y | ||
| 631 | CONFIG_XZ_DEC_IA64=y | ||
| 632 | CONFIG_XZ_DEC_ARM=y | ||
| 633 | CONFIG_XZ_DEC_ARMTHUMB=y | ||
| 634 | CONFIG_XZ_DEC_SPARC=y | ||
| 635 | CONFIG_CORDIC=m | 620 | CONFIG_CORDIC=m |
| 636 | CONFIG_CMM=m | 621 | CONFIG_CMM=m |
| 637 | CONFIG_APPLDATA_BASE=y | 622 | CONFIG_APPLDATA_BASE=y |
diff --git a/arch/s390/configs/performance_defconfig b/arch/s390/configs/performance_defconfig index 13559d32af69..822c2f2e0c25 100644 --- a/arch/s390/configs/performance_defconfig +++ b/arch/s390/configs/performance_defconfig | |||
| @@ -33,7 +33,6 @@ CONFIG_MODULE_UNLOAD=y | |||
| 33 | CONFIG_MODULE_FORCE_UNLOAD=y | 33 | CONFIG_MODULE_FORCE_UNLOAD=y |
| 34 | CONFIG_MODVERSIONS=y | 34 | CONFIG_MODVERSIONS=y |
| 35 | CONFIG_MODULE_SRCVERSION_ALL=y | 35 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 36 | CONFIG_BLK_DEV_INTEGRITY=y | ||
| 37 | CONFIG_BLK_DEV_THROTTLING=y | 36 | CONFIG_BLK_DEV_THROTTLING=y |
| 38 | CONFIG_PARTITION_ADVANCED=y | 37 | CONFIG_PARTITION_ADVANCED=y |
| 39 | CONFIG_IBM_PARTITION=y | 38 | CONFIG_IBM_PARTITION=y |
| @@ -241,6 +240,7 @@ CONFIG_NF_TABLES_IPV4=m | |||
| 241 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 240 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 242 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 241 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| 243 | CONFIG_NF_TABLES_ARP=m | 242 | CONFIG_NF_TABLES_ARP=m |
| 243 | CONFIG_NF_NAT_IPV4=m | ||
| 244 | CONFIG_IP_NF_IPTABLES=m | 244 | CONFIG_IP_NF_IPTABLES=m |
| 245 | CONFIG_IP_NF_MATCH_AH=m | 245 | CONFIG_IP_NF_MATCH_AH=m |
| 246 | CONFIG_IP_NF_MATCH_ECN=m | 246 | CONFIG_IP_NF_MATCH_ECN=m |
| @@ -248,11 +248,6 @@ CONFIG_IP_NF_MATCH_RPFILTER=m | |||
| 248 | CONFIG_IP_NF_MATCH_TTL=m | 248 | CONFIG_IP_NF_MATCH_TTL=m |
| 249 | CONFIG_IP_NF_FILTER=m | 249 | CONFIG_IP_NF_FILTER=m |
| 250 | CONFIG_IP_NF_TARGET_REJECT=m | 250 | CONFIG_IP_NF_TARGET_REJECT=m |
| 251 | CONFIG_IP_NF_TARGET_ULOG=m | ||
| 252 | CONFIG_NF_NAT_IPV4=m | ||
| 253 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
| 254 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
| 255 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
| 256 | CONFIG_IP_NF_MANGLE=m | 251 | CONFIG_IP_NF_MANGLE=m |
| 257 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | 252 | CONFIG_IP_NF_TARGET_CLUSTERIP=m |
| 258 | CONFIG_IP_NF_TARGET_ECN=m | 253 | CONFIG_IP_NF_TARGET_ECN=m |
| @@ -266,6 +261,7 @@ CONFIG_NF_CONNTRACK_IPV6=m | |||
| 266 | CONFIG_NF_TABLES_IPV6=m | 261 | CONFIG_NF_TABLES_IPV6=m |
| 267 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 262 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 268 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 263 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 264 | CONFIG_NF_NAT_IPV6=m | ||
| 269 | CONFIG_IP6_NF_IPTABLES=m | 265 | CONFIG_IP6_NF_IPTABLES=m |
| 270 | CONFIG_IP6_NF_MATCH_AH=m | 266 | CONFIG_IP6_NF_MATCH_AH=m |
| 271 | CONFIG_IP6_NF_MATCH_EUI64=m | 267 | CONFIG_IP6_NF_MATCH_EUI64=m |
| @@ -282,9 +278,6 @@ CONFIG_IP6_NF_TARGET_REJECT=m | |||
| 282 | CONFIG_IP6_NF_MANGLE=m | 278 | CONFIG_IP6_NF_MANGLE=m |
| 283 | CONFIG_IP6_NF_RAW=m | 279 | CONFIG_IP6_NF_RAW=m |
| 284 | CONFIG_IP6_NF_SECURITY=m | 280 | CONFIG_IP6_NF_SECURITY=m |
| 285 | CONFIG_NF_NAT_IPV6=m | ||
| 286 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | ||
| 287 | CONFIG_IP6_NF_TARGET_NPT=m | ||
| 288 | CONFIG_NF_TABLES_BRIDGE=m | 281 | CONFIG_NF_TABLES_BRIDGE=m |
| 289 | CONFIG_NET_SCTPPROBE=m | 282 | CONFIG_NET_SCTPPROBE=m |
| 290 | CONFIG_RDS=m | 283 | CONFIG_RDS=m |
| @@ -369,14 +362,13 @@ CONFIG_BLK_DEV_SR=m | |||
| 369 | CONFIG_CHR_DEV_SG=y | 362 | CONFIG_CHR_DEV_SG=y |
| 370 | CONFIG_CHR_DEV_SCH=m | 363 | CONFIG_CHR_DEV_SCH=m |
| 371 | CONFIG_SCSI_ENCLOSURE=m | 364 | CONFIG_SCSI_ENCLOSURE=m |
| 372 | CONFIG_SCSI_MULTI_LUN=y | ||
| 373 | CONFIG_SCSI_CONSTANTS=y | 365 | CONFIG_SCSI_CONSTANTS=y |
| 374 | CONFIG_SCSI_LOGGING=y | 366 | CONFIG_SCSI_LOGGING=y |
| 375 | CONFIG_SCSI_SPI_ATTRS=m | 367 | CONFIG_SCSI_SPI_ATTRS=m |
| 368 | CONFIG_SCSI_FC_ATTRS=y | ||
| 376 | CONFIG_SCSI_SAS_LIBSAS=m | 369 | CONFIG_SCSI_SAS_LIBSAS=m |
| 377 | CONFIG_SCSI_SRP_ATTRS=m | 370 | CONFIG_SCSI_SRP_ATTRS=m |
| 378 | CONFIG_ISCSI_TCP=m | 371 | CONFIG_ISCSI_TCP=m |
| 379 | CONFIG_LIBFCOE=m | ||
| 380 | CONFIG_SCSI_DEBUG=m | 372 | CONFIG_SCSI_DEBUG=m |
| 381 | CONFIG_ZFCP=y | 373 | CONFIG_ZFCP=y |
| 382 | CONFIG_SCSI_VIRTIO=m | 374 | CONFIG_SCSI_VIRTIO=m |
| @@ -422,7 +414,6 @@ CONFIG_VIRTIO_NET=m | |||
| 422 | CONFIG_NLMON=m | 414 | CONFIG_NLMON=m |
| 423 | CONFIG_VHOST_NET=m | 415 | CONFIG_VHOST_NET=m |
| 424 | # CONFIG_NET_VENDOR_ARC is not set | 416 | # CONFIG_NET_VENDOR_ARC is not set |
| 425 | # CONFIG_NET_CADENCE is not set | ||
| 426 | # CONFIG_NET_VENDOR_CHELSIO is not set | 417 | # CONFIG_NET_VENDOR_CHELSIO is not set |
| 427 | # CONFIG_NET_VENDOR_INTEL is not set | 418 | # CONFIG_NET_VENDOR_INTEL is not set |
| 428 | # CONFIG_NET_VENDOR_MARVELL is not set | 419 | # CONFIG_NET_VENDOR_MARVELL is not set |
| @@ -476,13 +467,13 @@ CONFIG_JFS_FS=m | |||
| 476 | CONFIG_JFS_POSIX_ACL=y | 467 | CONFIG_JFS_POSIX_ACL=y |
| 477 | CONFIG_JFS_SECURITY=y | 468 | CONFIG_JFS_SECURITY=y |
| 478 | CONFIG_JFS_STATISTICS=y | 469 | CONFIG_JFS_STATISTICS=y |
| 479 | CONFIG_XFS_FS=m | 470 | CONFIG_XFS_FS=y |
| 480 | CONFIG_XFS_QUOTA=y | 471 | CONFIG_XFS_QUOTA=y |
| 481 | CONFIG_XFS_POSIX_ACL=y | 472 | CONFIG_XFS_POSIX_ACL=y |
| 482 | CONFIG_XFS_RT=y | 473 | CONFIG_XFS_RT=y |
| 483 | CONFIG_GFS2_FS=m | 474 | CONFIG_GFS2_FS=m |
| 484 | CONFIG_OCFS2_FS=m | 475 | CONFIG_OCFS2_FS=m |
| 485 | CONFIG_BTRFS_FS=m | 476 | CONFIG_BTRFS_FS=y |
| 486 | CONFIG_BTRFS_FS_POSIX_ACL=y | 477 | CONFIG_BTRFS_FS_POSIX_ACL=y |
| 487 | CONFIG_NILFS2_FS=m | 478 | CONFIG_NILFS2_FS=m |
| 488 | CONFIG_FANOTIFY=y | 479 | CONFIG_FANOTIFY=y |
| @@ -550,8 +541,11 @@ CONFIG_TIMER_STATS=y | |||
| 550 | CONFIG_RCU_TORTURE_TEST=m | 541 | CONFIG_RCU_TORTURE_TEST=m |
| 551 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 | 542 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 |
| 552 | CONFIG_LATENCYTOP=y | 543 | CONFIG_LATENCYTOP=y |
| 544 | CONFIG_SCHED_TRACER=y | ||
| 545 | CONFIG_FTRACE_SYSCALLS=y | ||
| 546 | CONFIG_STACK_TRACER=y | ||
| 553 | CONFIG_BLK_DEV_IO_TRACE=y | 547 | CONFIG_BLK_DEV_IO_TRACE=y |
| 554 | # CONFIG_KPROBE_EVENT is not set | 548 | CONFIG_UPROBE_EVENT=y |
| 555 | CONFIG_LKDTM=m | 549 | CONFIG_LKDTM=m |
| 556 | CONFIG_PERCPU_TEST=m | 550 | CONFIG_PERCPU_TEST=m |
| 557 | CONFIG_ATOMIC64_SELFTEST=y | 551 | CONFIG_ATOMIC64_SELFTEST=y |
| @@ -618,12 +612,6 @@ CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | |||
| 618 | CONFIG_X509_CERTIFICATE_PARSER=m | 612 | CONFIG_X509_CERTIFICATE_PARSER=m |
| 619 | CONFIG_CRC7=m | 613 | CONFIG_CRC7=m |
| 620 | CONFIG_CRC8=m | 614 | CONFIG_CRC8=m |
| 621 | CONFIG_XZ_DEC_X86=y | ||
| 622 | CONFIG_XZ_DEC_POWERPC=y | ||
| 623 | CONFIG_XZ_DEC_IA64=y | ||
| 624 | CONFIG_XZ_DEC_ARM=y | ||
| 625 | CONFIG_XZ_DEC_ARMTHUMB=y | ||
| 626 | CONFIG_XZ_DEC_SPARC=y | ||
| 627 | CONFIG_CORDIC=m | 615 | CONFIG_CORDIC=m |
| 628 | CONFIG_CMM=m | 616 | CONFIG_CMM=m |
| 629 | CONFIG_APPLDATA_BASE=y | 617 | CONFIG_APPLDATA_BASE=y |
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig index e376789f2d8d..9d63051ebec4 100644 --- a/arch/s390/configs/zfcpdump_defconfig +++ b/arch/s390/configs/zfcpdump_defconfig | |||
| @@ -22,8 +22,8 @@ CONFIG_HZ_100=y | |||
| 22 | CONFIG_CRASH_DUMP=y | 22 | CONFIG_CRASH_DUMP=y |
| 23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| 24 | # CONFIG_SECCOMP is not set | 24 | # CONFIG_SECCOMP is not set |
| 25 | # CONFIG_IUCV is not set | ||
| 26 | CONFIG_NET=y | 25 | CONFIG_NET=y |
| 26 | # CONFIG_IUCV is not set | ||
| 27 | CONFIG_ATM=y | 27 | CONFIG_ATM=y |
| 28 | CONFIG_ATM_LANE=y | 28 | CONFIG_ATM_LANE=y |
| 29 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 29 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
| @@ -36,9 +36,9 @@ CONFIG_ENCLOSURE_SERVICES=y | |||
| 36 | CONFIG_SCSI=y | 36 | CONFIG_SCSI=y |
| 37 | CONFIG_BLK_DEV_SD=y | 37 | CONFIG_BLK_DEV_SD=y |
| 38 | CONFIG_SCSI_ENCLOSURE=y | 38 | CONFIG_SCSI_ENCLOSURE=y |
| 39 | CONFIG_SCSI_MULTI_LUN=y | ||
| 40 | CONFIG_SCSI_CONSTANTS=y | 39 | CONFIG_SCSI_CONSTANTS=y |
| 41 | CONFIG_SCSI_LOGGING=y | 40 | CONFIG_SCSI_LOGGING=y |
| 41 | CONFIG_SCSI_FC_ATTRS=y | ||
| 42 | CONFIG_SCSI_SRP_ATTRS=y | 42 | CONFIG_SCSI_SRP_ATTRS=y |
| 43 | CONFIG_ZFCP=y | 43 | CONFIG_ZFCP=y |
| 44 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 44 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
| @@ -75,12 +75,6 @@ CONFIG_DEBUG_KERNEL=y | |||
| 75 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 | 75 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 |
| 76 | # CONFIG_FTRACE is not set | 76 | # CONFIG_FTRACE is not set |
| 77 | # CONFIG_STRICT_DEVMEM is not set | 77 | # CONFIG_STRICT_DEVMEM is not set |
| 78 | CONFIG_XZ_DEC_X86=y | ||
| 79 | CONFIG_XZ_DEC_POWERPC=y | ||
| 80 | CONFIG_XZ_DEC_IA64=y | ||
| 81 | CONFIG_XZ_DEC_ARM=y | ||
| 82 | CONFIG_XZ_DEC_ARMTHUMB=y | ||
| 83 | CONFIG_XZ_DEC_SPARC=y | ||
| 84 | # CONFIG_PFAULT is not set | 78 | # CONFIG_PFAULT is not set |
| 85 | # CONFIG_S390_HYPFS_FS is not set | 79 | # CONFIG_S390_HYPFS_FS is not set |
| 86 | # CONFIG_VIRTUALIZATION is not set | 80 | # CONFIG_VIRTUALIZATION is not set |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index fab35a8efa4f..785c5f24d6f9 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
| @@ -92,10 +92,10 @@ CONFIG_CHR_DEV_ST=y | |||
| 92 | CONFIG_BLK_DEV_SR=y | 92 | CONFIG_BLK_DEV_SR=y |
| 93 | CONFIG_BLK_DEV_SR_VENDOR=y | 93 | CONFIG_BLK_DEV_SR_VENDOR=y |
| 94 | CONFIG_CHR_DEV_SG=y | 94 | CONFIG_CHR_DEV_SG=y |
| 95 | CONFIG_SCSI_MULTI_LUN=y | ||
| 96 | CONFIG_SCSI_CONSTANTS=y | 95 | CONFIG_SCSI_CONSTANTS=y |
| 97 | CONFIG_SCSI_LOGGING=y | 96 | CONFIG_SCSI_LOGGING=y |
| 98 | CONFIG_SCSI_SCAN_ASYNC=y | 97 | CONFIG_SCSI_SCAN_ASYNC=y |
| 98 | CONFIG_SCSI_FC_ATTRS=y | ||
| 99 | CONFIG_ZFCP=y | 99 | CONFIG_ZFCP=y |
| 100 | CONFIG_SCSI_VIRTIO=y | 100 | CONFIG_SCSI_VIRTIO=y |
| 101 | CONFIG_NETDEVICES=y | 101 | CONFIG_NETDEVICES=y |
| @@ -164,14 +164,13 @@ CONFIG_CRYPTO_CMAC=m | |||
| 164 | CONFIG_CRYPTO_XCBC=m | 164 | CONFIG_CRYPTO_XCBC=m |
| 165 | CONFIG_CRYPTO_VMAC=m | 165 | CONFIG_CRYPTO_VMAC=m |
| 166 | CONFIG_CRYPTO_CRC32=m | 166 | CONFIG_CRYPTO_CRC32=m |
| 167 | CONFIG_CRYPTO_CRCT10DIF=m | ||
| 168 | CONFIG_CRYPTO_MD4=m | 167 | CONFIG_CRYPTO_MD4=m |
| 169 | CONFIG_CRYPTO_MICHAEL_MIC=m | 168 | CONFIG_CRYPTO_MICHAEL_MIC=m |
| 170 | CONFIG_CRYPTO_RMD128=m | 169 | CONFIG_CRYPTO_RMD128=m |
| 171 | CONFIG_CRYPTO_RMD160=m | 170 | CONFIG_CRYPTO_RMD160=m |
| 172 | CONFIG_CRYPTO_RMD256=m | 171 | CONFIG_CRYPTO_RMD256=m |
| 173 | CONFIG_CRYPTO_RMD320=m | 172 | CONFIG_CRYPTO_RMD320=m |
| 174 | CONFIG_CRYPTO_SHA256=m | 173 | CONFIG_CRYPTO_SHA256=y |
| 175 | CONFIG_CRYPTO_SHA512=m | 174 | CONFIG_CRYPTO_SHA512=m |
| 176 | CONFIG_CRYPTO_TGR192=m | 175 | CONFIG_CRYPTO_TGR192=m |
| 177 | CONFIG_CRYPTO_WP512=m | 176 | CONFIG_CRYPTO_WP512=m |
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index 51d14fe5eb9a..ca1cabb3a96c 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c | |||
| @@ -121,6 +121,8 @@ unsigned long __kprobes prepare_ftrace_return(unsigned long parent, | |||
| 121 | { | 121 | { |
| 122 | struct ftrace_graph_ent trace; | 122 | struct ftrace_graph_ent trace; |
| 123 | 123 | ||
| 124 | if (unlikely(ftrace_graph_is_dead())) | ||
| 125 | goto out; | ||
| 124 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) | 126 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) |
| 125 | goto out; | 127 | goto out; |
| 126 | ip = (ip & PSW_ADDR_INSN) - MCOUNT_INSN_SIZE; | 128 | ip = (ip & PSW_ADDR_INSN) - MCOUNT_INSN_SIZE; |
diff --git a/arch/s390/kernel/vdso32/clock_gettime.S b/arch/s390/kernel/vdso32/clock_gettime.S index 48c2206a3956..5eec9afbb5b5 100644 --- a/arch/s390/kernel/vdso32/clock_gettime.S +++ b/arch/s390/kernel/vdso32/clock_gettime.S | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | .type __kernel_clock_gettime,@function | 19 | .type __kernel_clock_gettime,@function |
| 20 | __kernel_clock_gettime: | 20 | __kernel_clock_gettime: |
| 21 | .cfi_startproc | 21 | .cfi_startproc |
| 22 | ahi %r15,-16 | ||
| 22 | basr %r5,0 | 23 | basr %r5,0 |
| 23 | 0: al %r5,21f-0b(%r5) /* get &_vdso_data */ | 24 | 0: al %r5,21f-0b(%r5) /* get &_vdso_data */ |
| 24 | chi %r2,__CLOCK_REALTIME_COARSE | 25 | chi %r2,__CLOCK_REALTIME_COARSE |
| @@ -34,8 +35,8 @@ __kernel_clock_gettime: | |||
| 34 | 1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 35 | 1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
| 35 | tml %r4,0x0001 /* pending update ? loop */ | 36 | tml %r4,0x0001 /* pending update ? loop */ |
| 36 | jnz 1b | 37 | jnz 1b |
| 37 | stcke 24(%r15) /* Store TOD clock */ | 38 | stcke 0(%r15) /* Store TOD clock */ |
| 38 | lm %r0,%r1,25(%r15) | 39 | lm %r0,%r1,1(%r15) |
| 39 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 40 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 40 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 41 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
| 41 | brc 3,2f | 42 | brc 3,2f |
| @@ -70,6 +71,7 @@ __kernel_clock_gettime: | |||
| 70 | 8: st %r2,0(%r3) /* store tp->tv_sec */ | 71 | 8: st %r2,0(%r3) /* store tp->tv_sec */ |
| 71 | st %r1,4(%r3) /* store tp->tv_nsec */ | 72 | st %r1,4(%r3) /* store tp->tv_nsec */ |
| 72 | lhi %r2,0 | 73 | lhi %r2,0 |
| 74 | ahi %r15,16 | ||
| 73 | br %r14 | 75 | br %r14 |
| 74 | 76 | ||
| 75 | /* CLOCK_MONOTONIC_COARSE */ | 77 | /* CLOCK_MONOTONIC_COARSE */ |
| @@ -96,8 +98,8 @@ __kernel_clock_gettime: | |||
| 96 | 11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 98 | 11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
| 97 | tml %r4,0x0001 /* pending update ? loop */ | 99 | tml %r4,0x0001 /* pending update ? loop */ |
| 98 | jnz 11b | 100 | jnz 11b |
| 99 | stcke 24(%r15) /* Store TOD clock */ | 101 | stcke 0(%r15) /* Store TOD clock */ |
| 100 | lm %r0,%r1,25(%r15) | 102 | lm %r0,%r1,1(%r15) |
| 101 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 103 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 102 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 104 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
| 103 | brc 3,12f | 105 | brc 3,12f |
| @@ -132,11 +134,13 @@ __kernel_clock_gettime: | |||
| 132 | 17: st %r2,0(%r3) /* store tp->tv_sec */ | 134 | 17: st %r2,0(%r3) /* store tp->tv_sec */ |
| 133 | st %r1,4(%r3) /* store tp->tv_nsec */ | 135 | st %r1,4(%r3) /* store tp->tv_nsec */ |
| 134 | lhi %r2,0 | 136 | lhi %r2,0 |
| 137 | ahi %r15,16 | ||
| 135 | br %r14 | 138 | br %r14 |
| 136 | 139 | ||
| 137 | /* Fallback to system call */ | 140 | /* Fallback to system call */ |
| 138 | 19: lhi %r1,__NR_clock_gettime | 141 | 19: lhi %r1,__NR_clock_gettime |
| 139 | svc 0 | 142 | svc 0 |
| 143 | ahi %r15,16 | ||
| 140 | br %r14 | 144 | br %r14 |
| 141 | 145 | ||
| 142 | 20: .long 1000000000 | 146 | 20: .long 1000000000 |
diff --git a/arch/s390/kernel/vdso32/gettimeofday.S b/arch/s390/kernel/vdso32/gettimeofday.S index 60def5f562db..719de6186b20 100644 --- a/arch/s390/kernel/vdso32/gettimeofday.S +++ b/arch/s390/kernel/vdso32/gettimeofday.S | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | .type __kernel_gettimeofday,@function | 19 | .type __kernel_gettimeofday,@function |
| 20 | __kernel_gettimeofday: | 20 | __kernel_gettimeofday: |
| 21 | .cfi_startproc | 21 | .cfi_startproc |
| 22 | ahi %r15,-16 | ||
| 22 | basr %r5,0 | 23 | basr %r5,0 |
| 23 | 0: al %r5,13f-0b(%r5) /* get &_vdso_data */ | 24 | 0: al %r5,13f-0b(%r5) /* get &_vdso_data */ |
| 24 | 1: ltr %r3,%r3 /* check if tz is NULL */ | 25 | 1: ltr %r3,%r3 /* check if tz is NULL */ |
| @@ -29,30 +30,30 @@ __kernel_gettimeofday: | |||
| 29 | l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 30 | l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
| 30 | tml %r4,0x0001 /* pending update ? loop */ | 31 | tml %r4,0x0001 /* pending update ? loop */ |
| 31 | jnz 1b | 32 | jnz 1b |
| 32 | stcke 24(%r15) /* Store TOD clock */ | 33 | stcke 0(%r15) /* Store TOD clock */ |
| 33 | lm %r0,%r1,25(%r15) | 34 | lm %r0,%r1,1(%r15) |
| 34 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 35 | s %r0,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 35 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) | 36 | sl %r1,__VDSO_XTIME_STAMP+4(%r5) |
| 36 | brc 3,3f | 37 | brc 3,3f |
| 37 | ahi %r0,-1 | 38 | ahi %r0,-1 |
| 38 | 3: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 39 | 3: ms %r0,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 39 | st %r0,24(%r15) | 40 | st %r0,0(%r15) |
| 40 | l %r0,__VDSO_TK_MULT(%r5) | 41 | l %r0,__VDSO_TK_MULT(%r5) |
| 41 | ltr %r1,%r1 | 42 | ltr %r1,%r1 |
| 42 | mr %r0,%r0 | 43 | mr %r0,%r0 |
| 43 | jnm 4f | 44 | jnm 4f |
| 44 | a %r0,__VDSO_TK_MULT(%r5) | 45 | a %r0,__VDSO_TK_MULT(%r5) |
| 45 | 4: al %r0,24(%r15) | 46 | 4: al %r0,0(%r15) |
| 46 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ | 47 | al %r0,__VDSO_XTIME_NSEC(%r5) /* + xtime */ |
| 47 | al %r1,__VDSO_XTIME_NSEC+4(%r5) | 48 | al %r1,__VDSO_XTIME_NSEC+4(%r5) |
| 48 | brc 12,5f | 49 | brc 12,5f |
| 49 | ahi %r0,1 | 50 | ahi %r0,1 |
| 50 | 5: mvc 24(4,%r15),__VDSO_XTIME_SEC+4(%r5) | 51 | 5: mvc 0(4,%r15),__VDSO_XTIME_SEC+4(%r5) |
| 51 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ | 52 | cl %r4,__VDSO_UPD_COUNT+4(%r5) /* check update counter */ |
| 52 | jne 1b | 53 | jne 1b |
| 53 | l %r4,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 54 | l %r4,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
| 54 | srdl %r0,0(%r4) /* >> tk->shift */ | 55 | srdl %r0,0(%r4) /* >> tk->shift */ |
| 55 | l %r4,24(%r15) /* get tv_sec from stack */ | 56 | l %r4,0(%r15) /* get tv_sec from stack */ |
| 56 | basr %r5,0 | 57 | basr %r5,0 |
| 57 | 6: ltr %r0,%r0 | 58 | 6: ltr %r0,%r0 |
| 58 | jnz 7f | 59 | jnz 7f |
| @@ -71,6 +72,7 @@ __kernel_gettimeofday: | |||
| 71 | 9: srl %r0,6 | 72 | 9: srl %r0,6 |
| 72 | st %r0,4(%r2) /* store tv->tv_usec */ | 73 | st %r0,4(%r2) /* store tv->tv_usec */ |
| 73 | 10: slr %r2,%r2 | 74 | 10: slr %r2,%r2 |
| 75 | ahi %r15,16 | ||
| 74 | br %r14 | 76 | br %r14 |
| 75 | 11: .long 1000000000 | 77 | 11: .long 1000000000 |
| 76 | 12: .long 274877907 | 78 | 12: .long 274877907 |
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 9d9761f8e110..7699e735ae28 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | .type __kernel_clock_gettime,@function | 19 | .type __kernel_clock_gettime,@function |
| 20 | __kernel_clock_gettime: | 20 | __kernel_clock_gettime: |
| 21 | .cfi_startproc | 21 | .cfi_startproc |
| 22 | aghi %r15,-16 | ||
| 22 | larl %r5,_vdso_data | 23 | larl %r5,_vdso_data |
| 23 | cghi %r2,__CLOCK_REALTIME_COARSE | 24 | cghi %r2,__CLOCK_REALTIME_COARSE |
| 24 | je 4f | 25 | je 4f |
| @@ -37,10 +38,10 @@ __kernel_clock_gettime: | |||
| 37 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 38 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
| 38 | tmll %r4,0x0001 /* pending update ? loop */ | 39 | tmll %r4,0x0001 /* pending update ? loop */ |
| 39 | jnz 0b | 40 | jnz 0b |
| 40 | stcke 48(%r15) /* Store TOD clock */ | 41 | stcke 0(%r15) /* Store TOD clock */ |
| 41 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 42 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
| 42 | lg %r0,__VDSO_WTOM_SEC(%r5) | 43 | lg %r0,__VDSO_WTOM_SEC(%r5) |
| 43 | lg %r1,49(%r15) | 44 | lg %r1,1(%r15) |
| 44 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 45 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 45 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 46 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 46 | alg %r1,__VDSO_WTOM_NSEC(%r5) | 47 | alg %r1,__VDSO_WTOM_NSEC(%r5) |
| @@ -56,6 +57,7 @@ __kernel_clock_gettime: | |||
| 56 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ | 57 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ |
| 57 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 58 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
| 58 | lghi %r2,0 | 59 | lghi %r2,0 |
| 60 | aghi %r15,16 | ||
| 59 | br %r14 | 61 | br %r14 |
| 60 | 62 | ||
| 61 | /* CLOCK_MONOTONIC_COARSE */ | 63 | /* CLOCK_MONOTONIC_COARSE */ |
| @@ -82,9 +84,9 @@ __kernel_clock_gettime: | |||
| 82 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 84 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
| 83 | tmll %r4,0x0001 /* pending update ? loop */ | 85 | tmll %r4,0x0001 /* pending update ? loop */ |
| 84 | jnz 5b | 86 | jnz 5b |
| 85 | stcke 48(%r15) /* Store TOD clock */ | 87 | stcke 0(%r15) /* Store TOD clock */ |
| 86 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 88 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
| 87 | lg %r1,49(%r15) | 89 | lg %r1,1(%r15) |
| 88 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 90 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 89 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 91 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 90 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 92 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
| @@ -101,6 +103,7 @@ __kernel_clock_gettime: | |||
| 101 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ | 103 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ |
| 102 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 104 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
| 103 | lghi %r2,0 | 105 | lghi %r2,0 |
| 106 | aghi %r15,16 | ||
| 104 | br %r14 | 107 | br %r14 |
| 105 | 108 | ||
| 106 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 109 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ |
| @@ -134,11 +137,13 @@ __kernel_clock_gettime: | |||
| 134 | slgr %r4,%r0 /* r4 = tv_nsec */ | 137 | slgr %r4,%r0 /* r4 = tv_nsec */ |
| 135 | stg %r4,8(%r3) | 138 | stg %r4,8(%r3) |
| 136 | lghi %r2,0 | 139 | lghi %r2,0 |
| 140 | aghi %r15,16 | ||
| 137 | br %r14 | 141 | br %r14 |
| 138 | 142 | ||
| 139 | /* Fallback to system call */ | 143 | /* Fallback to system call */ |
| 140 | 12: lghi %r1,__NR_clock_gettime | 144 | 12: lghi %r1,__NR_clock_gettime |
| 141 | svc 0 | 145 | svc 0 |
| 146 | aghi %r15,16 | ||
| 142 | br %r14 | 147 | br %r14 |
| 143 | 148 | ||
| 144 | 13: .quad 1000000000 | 149 | 13: .quad 1000000000 |
diff --git a/arch/s390/kernel/vdso64/gettimeofday.S b/arch/s390/kernel/vdso64/gettimeofday.S index 7a344995a97f..6ce46707663c 100644 --- a/arch/s390/kernel/vdso64/gettimeofday.S +++ b/arch/s390/kernel/vdso64/gettimeofday.S | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | .type __kernel_gettimeofday,@function | 19 | .type __kernel_gettimeofday,@function |
| 20 | __kernel_gettimeofday: | 20 | __kernel_gettimeofday: |
| 21 | .cfi_startproc | 21 | .cfi_startproc |
| 22 | aghi %r15,-16 | ||
| 22 | larl %r5,_vdso_data | 23 | larl %r5,_vdso_data |
| 23 | 0: ltgr %r3,%r3 /* check if tz is NULL */ | 24 | 0: ltgr %r3,%r3 /* check if tz is NULL */ |
| 24 | je 1f | 25 | je 1f |
| @@ -28,8 +29,8 @@ __kernel_gettimeofday: | |||
| 28 | lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 29 | lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
| 29 | tmll %r4,0x0001 /* pending update ? loop */ | 30 | tmll %r4,0x0001 /* pending update ? loop */ |
| 30 | jnz 0b | 31 | jnz 0b |
| 31 | stcke 48(%r15) /* Store TOD clock */ | 32 | stcke 0(%r15) /* Store TOD clock */ |
| 32 | lg %r1,49(%r15) | 33 | lg %r1,1(%r15) |
| 33 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 34 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
| 34 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 35 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
| 35 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 36 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
| @@ -50,6 +51,7 @@ __kernel_gettimeofday: | |||
| 50 | srlg %r0,%r0,6 | 51 | srlg %r0,%r0,6 |
| 51 | stg %r0,8(%r2) /* store tv->tv_usec */ | 52 | stg %r0,8(%r2) /* store tv->tv_usec */ |
| 52 | 4: lghi %r2,0 | 53 | 4: lghi %r2,0 |
| 54 | aghi %r15,16 | ||
| 53 | br %r14 | 55 | br %r14 |
| 54 | 5: .quad 1000000000 | 56 | 5: .quad 1000000000 |
| 55 | .long 274877907 | 57 | .long 274877907 |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 416f2a323ba5..7f0089d9a4aa 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
| @@ -66,7 +66,11 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) | |||
| 66 | clock = S390_lowcore.last_update_clock; | 66 | clock = S390_lowcore.last_update_clock; |
| 67 | asm volatile( | 67 | asm volatile( |
| 68 | " stpt %0\n" /* Store current cpu timer value */ | 68 | " stpt %0\n" /* Store current cpu timer value */ |
| 69 | #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES | ||
| 70 | " stckf %1" /* Store current tod clock value */ | ||
| 71 | #else | ||
| 69 | " stck %1" /* Store current tod clock value */ | 72 | " stck %1" /* Store current tod clock value */ |
| 73 | #endif | ||
| 70 | : "=m" (S390_lowcore.last_update_timer), | 74 | : "=m" (S390_lowcore.last_update_timer), |
| 71 | "=m" (S390_lowcore.last_update_clock)); | 75 | "=m" (S390_lowcore.last_update_clock)); |
| 72 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; | 76 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; |
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 61a33f4ba608..df04227d00cf 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig | |||
| @@ -171,20 +171,23 @@ config WANT_DEV_COREDUMP | |||
| 171 | Drivers should "select" this option if they desire to use the | 171 | Drivers should "select" this option if they desire to use the |
| 172 | device coredump mechanism. | 172 | device coredump mechanism. |
| 173 | 173 | ||
| 174 | config DISABLE_DEV_COREDUMP | 174 | config ALLOW_DEV_COREDUMP |
| 175 | bool "Disable device coredump" if EXPERT | 175 | bool "Allow device coredump" if EXPERT |
| 176 | default y | ||
| 176 | help | 177 | help |
| 177 | Disable the device coredump mechanism despite drivers wanting to | 178 | This option controls if the device coredump mechanism is available or |
| 178 | use it; this allows for more sensitive systems or systems that | 179 | not; if disabled, the mechanism will be omitted even if drivers that |
| 179 | don't want to ever access the information to not have the code, | 180 | can use it are enabled. |
| 180 | nor keep any data. | 181 | Say 'N' for more sensitive systems or systems that don't want |
| 182 | to ever access the information to not have the code, nor keep any | ||
| 183 | data. | ||
| 181 | 184 | ||
| 182 | If unsure, say N. | 185 | If unsure, say Y. |
| 183 | 186 | ||
| 184 | config DEV_COREDUMP | 187 | config DEV_COREDUMP |
| 185 | bool | 188 | bool |
| 186 | default y if WANT_DEV_COREDUMP | 189 | default y if WANT_DEV_COREDUMP |
| 187 | depends on !DISABLE_DEV_COREDUMP | 190 | depends on ALLOW_DEV_COREDUMP |
| 188 | 191 | ||
| 189 | config DEBUG_DRIVER | 192 | config DEBUG_DRIVER |
| 190 | bool "Driver Core verbose debug messages" | 193 | bool "Driver Core verbose debug messages" |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 14d162952c3b..842d04707de6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
| @@ -724,12 +724,12 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj) | |||
| 724 | return &dir->kobj; | 724 | return &dir->kobj; |
| 725 | } | 725 | } |
| 726 | 726 | ||
| 727 | static DEFINE_MUTEX(gdp_mutex); | ||
| 727 | 728 | ||
| 728 | static struct kobject *get_device_parent(struct device *dev, | 729 | static struct kobject *get_device_parent(struct device *dev, |
| 729 | struct device *parent) | 730 | struct device *parent) |
| 730 | { | 731 | { |
| 731 | if (dev->class) { | 732 | if (dev->class) { |
| 732 | static DEFINE_MUTEX(gdp_mutex); | ||
| 733 | struct kobject *kobj = NULL; | 733 | struct kobject *kobj = NULL; |
| 734 | struct kobject *parent_kobj; | 734 | struct kobject *parent_kobj; |
| 735 | struct kobject *k; | 735 | struct kobject *k; |
| @@ -793,7 +793,9 @@ static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir) | |||
| 793 | glue_dir->kset != &dev->class->p->glue_dirs) | 793 | glue_dir->kset != &dev->class->p->glue_dirs) |
| 794 | return; | 794 | return; |
| 795 | 795 | ||
| 796 | mutex_lock(&gdp_mutex); | ||
| 796 | kobject_put(glue_dir); | 797 | kobject_put(glue_dir); |
| 798 | mutex_unlock(&gdp_mutex); | ||
| 797 | } | 799 | } |
| 798 | 800 | ||
| 799 | static void cleanup_device_parent(struct device *dev) | 801 | static void cleanup_device_parent(struct device *dev) |
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 0a54c588e433..27b71a0b72d0 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
| @@ -342,7 +342,6 @@ struct rbd_device { | |||
| 342 | 342 | ||
| 343 | struct list_head rq_queue; /* incoming rq queue */ | 343 | struct list_head rq_queue; /* incoming rq queue */ |
| 344 | spinlock_t lock; /* queue, flags, open_count */ | 344 | spinlock_t lock; /* queue, flags, open_count */ |
| 345 | struct workqueue_struct *rq_wq; | ||
| 346 | struct work_struct rq_work; | 345 | struct work_struct rq_work; |
| 347 | 346 | ||
| 348 | struct rbd_image_header header; | 347 | struct rbd_image_header header; |
| @@ -402,6 +401,8 @@ static struct kmem_cache *rbd_segment_name_cache; | |||
| 402 | static int rbd_major; | 401 | static int rbd_major; |
| 403 | static DEFINE_IDA(rbd_dev_id_ida); | 402 | static DEFINE_IDA(rbd_dev_id_ida); |
| 404 | 403 | ||
| 404 | static struct workqueue_struct *rbd_wq; | ||
| 405 | |||
| 405 | /* | 406 | /* |
| 406 | * Default to false for now, as single-major requires >= 0.75 version of | 407 | * Default to false for now, as single-major requires >= 0.75 version of |
| 407 | * userspace rbd utility. | 408 | * userspace rbd utility. |
| @@ -3452,7 +3453,7 @@ static void rbd_request_fn(struct request_queue *q) | |||
| 3452 | } | 3453 | } |
| 3453 | 3454 | ||
| 3454 | if (queued) | 3455 | if (queued) |
| 3455 | queue_work(rbd_dev->rq_wq, &rbd_dev->rq_work); | 3456 | queue_work(rbd_wq, &rbd_dev->rq_work); |
| 3456 | } | 3457 | } |
| 3457 | 3458 | ||
| 3458 | /* | 3459 | /* |
| @@ -3532,7 +3533,7 @@ static int rbd_obj_read_sync(struct rbd_device *rbd_dev, | |||
| 3532 | page_count = (u32) calc_pages_for(offset, length); | 3533 | page_count = (u32) calc_pages_for(offset, length); |
| 3533 | pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); | 3534 | pages = ceph_alloc_page_vector(page_count, GFP_KERNEL); |
| 3534 | if (IS_ERR(pages)) | 3535 | if (IS_ERR(pages)) |
| 3535 | ret = PTR_ERR(pages); | 3536 | return PTR_ERR(pages); |
| 3536 | 3537 | ||
| 3537 | ret = -ENOMEM; | 3538 | ret = -ENOMEM; |
| 3538 | obj_request = rbd_obj_request_create(object_name, offset, length, | 3539 | obj_request = rbd_obj_request_create(object_name, offset, length, |
| @@ -5242,16 +5243,9 @@ static int rbd_dev_device_setup(struct rbd_device *rbd_dev) | |||
| 5242 | set_capacity(rbd_dev->disk, rbd_dev->mapping.size / SECTOR_SIZE); | 5243 | set_capacity(rbd_dev->disk, rbd_dev->mapping.size / SECTOR_SIZE); |
| 5243 | set_disk_ro(rbd_dev->disk, rbd_dev->mapping.read_only); | 5244 | set_disk_ro(rbd_dev->disk, rbd_dev->mapping.read_only); |
| 5244 | 5245 | ||
| 5245 | rbd_dev->rq_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, | ||
| 5246 | rbd_dev->disk->disk_name); | ||
| 5247 | if (!rbd_dev->rq_wq) { | ||
| 5248 | ret = -ENOMEM; | ||
| 5249 | goto err_out_mapping; | ||
| 5250 | } | ||
| 5251 | |||
| 5252 | ret = rbd_bus_add_dev(rbd_dev); | 5246 | ret = rbd_bus_add_dev(rbd_dev); |
| 5253 | if (ret) | 5247 | if (ret) |
| 5254 | goto err_out_workqueue; | 5248 | goto err_out_mapping; |
| 5255 | 5249 | ||
| 5256 | /* Everything's ready. Announce the disk to the world. */ | 5250 | /* Everything's ready. Announce the disk to the world. */ |
| 5257 | 5251 | ||
| @@ -5263,9 +5257,6 @@ static int rbd_dev_device_setup(struct rbd_device *rbd_dev) | |||
| 5263 | 5257 | ||
| 5264 | return ret; | 5258 | return ret; |
| 5265 | 5259 | ||
| 5266 | err_out_workqueue: | ||
| 5267 | destroy_workqueue(rbd_dev->rq_wq); | ||
| 5268 | rbd_dev->rq_wq = NULL; | ||
| 5269 | err_out_mapping: | 5260 | err_out_mapping: |
| 5270 | rbd_dev_mapping_clear(rbd_dev); | 5261 | rbd_dev_mapping_clear(rbd_dev); |
| 5271 | err_out_disk: | 5262 | err_out_disk: |
| @@ -5512,7 +5503,6 @@ static void rbd_dev_device_release(struct device *dev) | |||
| 5512 | { | 5503 | { |
| 5513 | struct rbd_device *rbd_dev = dev_to_rbd_dev(dev); | 5504 | struct rbd_device *rbd_dev = dev_to_rbd_dev(dev); |
| 5514 | 5505 | ||
| 5515 | destroy_workqueue(rbd_dev->rq_wq); | ||
| 5516 | rbd_free_disk(rbd_dev); | 5506 | rbd_free_disk(rbd_dev); |
| 5517 | clear_bit(RBD_DEV_FLAG_EXISTS, &rbd_dev->flags); | 5507 | clear_bit(RBD_DEV_FLAG_EXISTS, &rbd_dev->flags); |
| 5518 | rbd_dev_mapping_clear(rbd_dev); | 5508 | rbd_dev_mapping_clear(rbd_dev); |
| @@ -5716,11 +5706,21 @@ static int __init rbd_init(void) | |||
| 5716 | if (rc) | 5706 | if (rc) |
| 5717 | return rc; | 5707 | return rc; |
| 5718 | 5708 | ||
| 5709 | /* | ||
| 5710 | * The number of active work items is limited by the number of | ||
| 5711 | * rbd devices, so leave @max_active at default. | ||
| 5712 | */ | ||
| 5713 | rbd_wq = alloc_workqueue(RBD_DRV_NAME, WQ_MEM_RECLAIM, 0); | ||
| 5714 | if (!rbd_wq) { | ||
| 5715 | rc = -ENOMEM; | ||
| 5716 | goto err_out_slab; | ||
| 5717 | } | ||
| 5718 | |||
| 5719 | if (single_major) { | 5719 | if (single_major) { |
| 5720 | rbd_major = register_blkdev(0, RBD_DRV_NAME); | 5720 | rbd_major = register_blkdev(0, RBD_DRV_NAME); |
| 5721 | if (rbd_major < 0) { | 5721 | if (rbd_major < 0) { |
| 5722 | rc = rbd_major; | 5722 | rc = rbd_major; |
| 5723 | goto err_out_slab; | 5723 | goto err_out_wq; |
| 5724 | } | 5724 | } |
| 5725 | } | 5725 | } |
| 5726 | 5726 | ||
| @@ -5738,6 +5738,8 @@ static int __init rbd_init(void) | |||
| 5738 | err_out_blkdev: | 5738 | err_out_blkdev: |
| 5739 | if (single_major) | 5739 | if (single_major) |
| 5740 | unregister_blkdev(rbd_major, RBD_DRV_NAME); | 5740 | unregister_blkdev(rbd_major, RBD_DRV_NAME); |
| 5741 | err_out_wq: | ||
| 5742 | destroy_workqueue(rbd_wq); | ||
| 5741 | err_out_slab: | 5743 | err_out_slab: |
| 5742 | rbd_slab_exit(); | 5744 | rbd_slab_exit(); |
| 5743 | return rc; | 5745 | return rc; |
| @@ -5749,6 +5751,7 @@ static void __exit rbd_exit(void) | |||
| 5749 | rbd_sysfs_cleanup(); | 5751 | rbd_sysfs_cleanup(); |
| 5750 | if (single_major) | 5752 | if (single_major) |
| 5751 | unregister_blkdev(rbd_major, RBD_DRV_NAME); | 5753 | unregister_blkdev(rbd_major, RBD_DRV_NAME); |
| 5754 | destroy_workqueue(rbd_wq); | ||
| 5752 | rbd_slab_exit(); | 5755 | rbd_slab_exit(); |
| 5753 | } | 5756 | } |
| 5754 | 5757 | ||
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 123f578d6dd3..4cfaaa5a49be 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c | |||
| @@ -1107,52 +1107,14 @@ bool edma_filter_fn(struct dma_chan *chan, void *param) | |||
| 1107 | } | 1107 | } |
| 1108 | EXPORT_SYMBOL(edma_filter_fn); | 1108 | EXPORT_SYMBOL(edma_filter_fn); |
| 1109 | 1109 | ||
| 1110 | static struct platform_device *pdev0, *pdev1; | ||
| 1111 | |||
| 1112 | static const struct platform_device_info edma_dev_info0 = { | ||
| 1113 | .name = "edma-dma-engine", | ||
| 1114 | .id = 0, | ||
| 1115 | .dma_mask = DMA_BIT_MASK(32), | ||
| 1116 | }; | ||
| 1117 | |||
| 1118 | static const struct platform_device_info edma_dev_info1 = { | ||
| 1119 | .name = "edma-dma-engine", | ||
| 1120 | .id = 1, | ||
| 1121 | .dma_mask = DMA_BIT_MASK(32), | ||
| 1122 | }; | ||
| 1123 | |||
| 1124 | static int edma_init(void) | 1110 | static int edma_init(void) |
| 1125 | { | 1111 | { |
| 1126 | int ret = platform_driver_register(&edma_driver); | 1112 | return platform_driver_register(&edma_driver); |
| 1127 | |||
| 1128 | if (ret == 0) { | ||
| 1129 | pdev0 = platform_device_register_full(&edma_dev_info0); | ||
| 1130 | if (IS_ERR(pdev0)) { | ||
| 1131 | platform_driver_unregister(&edma_driver); | ||
| 1132 | ret = PTR_ERR(pdev0); | ||
| 1133 | goto out; | ||
| 1134 | } | ||
| 1135 | } | ||
| 1136 | |||
| 1137 | if (!of_have_populated_dt() && EDMA_CTLRS == 2) { | ||
| 1138 | pdev1 = platform_device_register_full(&edma_dev_info1); | ||
| 1139 | if (IS_ERR(pdev1)) { | ||
| 1140 | platform_driver_unregister(&edma_driver); | ||
| 1141 | platform_device_unregister(pdev0); | ||
| 1142 | ret = PTR_ERR(pdev1); | ||
| 1143 | } | ||
| 1144 | } | ||
| 1145 | |||
| 1146 | out: | ||
| 1147 | return ret; | ||
| 1148 | } | 1113 | } |
| 1149 | subsys_initcall(edma_init); | 1114 | subsys_initcall(edma_init); |
| 1150 | 1115 | ||
| 1151 | static void __exit edma_exit(void) | 1116 | static void __exit edma_exit(void) |
| 1152 | { | 1117 | { |
| 1153 | platform_device_unregister(pdev0); | ||
| 1154 | if (pdev1) | ||
| 1155 | platform_device_unregister(pdev1); | ||
| 1156 | platform_driver_unregister(&edma_driver); | 1118 | platform_driver_unregister(&edma_driver); |
| 1157 | } | 1119 | } |
| 1158 | module_exit(edma_exit); | 1120 | module_exit(edma_exit); |
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 65ef9664d5da..899bede81b31 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
| @@ -12,11 +12,6 @@ | |||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program; if not, write to the Free Software | ||
| 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 19 | MA 02110-1301 USA. | ||
| 20 | * ------------------------------------------------------------------------- */ | 15 | * ------------------------------------------------------------------------- */ |
| 21 | 16 | ||
| 22 | /* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki | 17 | /* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki |
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index 8b10f88b13d9..580dbf05c148 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c | |||
| @@ -12,11 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 19 | * MA 02110-1301 USA. | ||
| 20 | */ | 15 | */ |
| 21 | 16 | ||
| 22 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index 34370090b753..270d84bfc2c6 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c | |||
| @@ -14,11 +14,6 @@ | |||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
| 16 | * | 16 | * |
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 20 | * MA 02110-1301 USA. | ||
| 21 | * | ||
| 22 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and | 17 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and |
| 23 | * Frodo Looijaard <frodol@dds.nl>, and also from Martin Bailey | 18 | * Frodo Looijaard <frodol@dds.nl>, and also from Martin Bailey |
| 24 | * <mbailey@littlefeet-inc.com> | 19 | * <mbailey@littlefeet-inc.com> |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.h b/drivers/i2c/algos/i2c-algo-pcf.h index 1ec703ee788d..262ee801975b 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.h +++ b/drivers/i2c/algos/i2c-algo-pcf.h | |||
| @@ -12,12 +12,7 @@ | |||
| 12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. */ |
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program; if not, write to the Free Software | ||
| 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 20 | MA 02110-1301 USA. */ | ||
| 21 | /* -------------------------------------------------------------------- */ | 16 | /* -------------------------------------------------------------------- */ |
| 22 | 17 | ||
| 23 | /* With some changes from Frodo Looijaard <frodol@dds.nl> */ | 18 | /* With some changes from Frodo Looijaard <frodol@dds.nl> */ |
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index 451e305f7971..4f2d78868281 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 21 | */ | 17 | */ |
| 22 | 18 | ||
| 23 | /* | 19 | /* |
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 2fa21ce9682b..45c5c4883022 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program; if not, write to the Free Software | ||
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | /* | 17 | /* |
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index 41fc6837fb8b..65e324054970 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | /* | 17 | /* |
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index a16f72891358..6c7113d990f8 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c | |||
| @@ -15,10 +15,6 @@ | |||
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
| 18 | |||
| 19 | You should have received a copy of the GNU General Public License | ||
| 20 | along with this program; if not, write to the Free Software | ||
| 21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | 18 | */ |
| 23 | 19 | ||
| 24 | /* | 20 | /* |
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 917d54588d95..e05a672db3e5 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c | |||
| @@ -434,7 +434,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) | |||
| 434 | } | 434 | } |
| 435 | } | 435 | } |
| 436 | 436 | ||
| 437 | ret = wait_for_completion_io_timeout(&dev->cmd_complete, | 437 | ret = wait_for_completion_timeout(&dev->cmd_complete, |
| 438 | dev->adapter.timeout); | 438 | dev->adapter.timeout); |
| 439 | if (ret == 0) { | 439 | if (ret == 0) { |
| 440 | dev_err(dev->dev, "controller timed out\n"); | 440 | dev_err(dev->dev, "controller timed out\n"); |
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c index 8762458ca7da..6f8c0756e350 100644 --- a/drivers/i2c/busses/i2c-au1550.c +++ b/drivers/i2c/busses/i2c-au1550.c | |||
| @@ -21,10 +21,6 @@ | |||
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | * GNU General Public License for more details. | 23 | * GNU General Public License for more details. |
| 24 | * | ||
| 25 | * You should have received a copy of the GNU General Public License | ||
| 26 | * along with this program; if not, write to the Free Software | ||
| 27 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 28 | */ | 24 | */ |
| 29 | 25 | ||
| 30 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index f3b89a4698b6..5bdbc71698d0 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
| @@ -23,10 +23,6 @@ | |||
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 | * GNU General Public License for more details. | 25 | * GNU General Public License for more details. |
| 26 | * | ||
| 27 | * You should have received a copy of the GNU General Public License | ||
| 28 | * along with this program; if not, write to the Free Software | ||
| 29 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 30 | */ | 26 | */ |
| 31 | 27 | ||
| 32 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 4d9614719128..d15b7c9b9219 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
| @@ -17,10 +17,6 @@ | |||
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. | 19 | * GNU General Public License for more details. |
| 20 | * | ||
| 21 | * You should have received a copy of the GNU General Public License | ||
| 22 | * along with this program; if not, write to the Free Software | ||
| 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 24 | * ---------------------------------------------------------------------------- | 20 | * ---------------------------------------------------------------------------- |
| 25 | * | 21 | * |
| 26 | */ | 22 | */ |
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 3c20e4bd6dd1..edca99dbba23 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | * ---------------------------------------------------------------------------- | 21 | * ---------------------------------------------------------------------------- |
| 26 | * | 22 | * |
| 27 | */ | 23 | */ |
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index d66b6cbc9edc..5a410ef17abd 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | * ---------------------------------------------------------------------------- | 21 | * ---------------------------------------------------------------------------- |
| 26 | * | 22 | * |
| 27 | */ | 23 | */ |
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index d31d313ab4f7..acb40f95db78 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c | |||
| @@ -19,10 +19,6 @@ | |||
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. | 21 | * GNU General Public License for more details. |
| 22 | * | ||
| 23 | * You should have received a copy of the GNU General Public License | ||
| 24 | * along with this program; if not, write to the Free Software | ||
| 25 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 26 | * ---------------------------------------------------------------------------- | 22 | * ---------------------------------------------------------------------------- |
| 27 | * | 23 | * |
| 28 | */ | 24 | */ |
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index a7431150acf7..373dd4d47765 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | * ---------------------------------------------------------------------------- | 21 | * ---------------------------------------------------------------------------- |
| 26 | * | 22 | * |
| 27 | */ | 23 | */ |
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index a44ea13d1434..76e699f9ed97 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c | |||
| @@ -9,10 +9,6 @@ | |||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program; if not, write to the Free Software | ||
| 15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | ||
| 16 | */ | 12 | */ |
| 17 | 13 | ||
| 18 | #include <linux/module.h> | 14 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c index 485497066ed7..92e8c0ce1625 100644 --- a/drivers/i2c/busses/i2c-elektor.c +++ b/drivers/i2c/busses/i2c-elektor.c | |||
| @@ -12,11 +12,7 @@ | |||
| 12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. */ |
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program; if not, write to the Free Software | ||
| 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
| 20 | /* ------------------------------------------------------------------------- */ | 16 | /* ------------------------------------------------------------------------- */ |
| 21 | 17 | ||
| 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | 18 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even |
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c index 14d2b76de25f..b7864cf42a72 100644 --- a/drivers/i2c/busses/i2c-hydra.c +++ b/drivers/i2c/busses/i2c-hydra.c | |||
| @@ -15,10 +15,6 @@ | |||
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
| 18 | |||
| 19 | You should have received a copy of the GNU General Public License | ||
| 20 | along with this program; if not, write to the Free Software | ||
| 21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | 18 | */ |
| 23 | 19 | ||
| 24 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 7cfc183b3d63..6ab4f1cb21f3 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
| @@ -15,10 +15,6 @@ | |||
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
| 18 | |||
| 19 | You should have received a copy of the GNU General Public License | ||
| 20 | along with this program; if not, write to the Free Software | ||
| 21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 22 | */ | 18 | */ |
| 23 | 19 | ||
| 24 | /* | 20 | /* |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index c48e46af670a..e9fb7cf78612 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
| @@ -11,11 +11,6 @@ | |||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | 13 | * |
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
| 17 | * USA. | ||
| 18 | * | ||
| 19 | * Author: | 14 | * Author: |
| 20 | * Darius Augulis, Teltonika Inc. | 15 | * Darius Augulis, Teltonika Inc. |
| 21 | * | 16 | * |
diff --git a/drivers/i2c/busses/i2c-iop3xx.h b/drivers/i2c/busses/i2c-iop3xx.h index 097e270955d0..2d6929c2bd92 100644 --- a/drivers/i2c/busses/i2c-iop3xx.h +++ b/drivers/i2c/busses/i2c-iop3xx.h | |||
| @@ -11,11 +11,7 @@ | |||
| 11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. */ |
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program; if not, write to the Free Software | ||
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
| 19 | /* ------------------------------------------------------------------------- */ | 15 | /* ------------------------------------------------------------------------- */ |
| 20 | 16 | ||
| 21 | 17 | ||
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index cf99dbf21fd1..113293d275f6 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. |
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License | ||
| 19 | along with this program; if not, write to the Free Software | ||
| 20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 21 | */ | 17 | */ |
| 22 | 18 | ||
| 23 | /* | 19 | /* |
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index 3f6ecbfb9a56..f2b0ff011631 100644 --- a/drivers/i2c/busses/i2c-ismt.c +++ b/drivers/i2c/busses/i2c-ismt.c | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * General Public License for more details. | 16 | * General Public License for more details. |
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 21 | * The full GNU General Public License is included in this distribution | 17 | * The full GNU General Public License is included in this distribution |
| 22 | * in the file called LICENSE.GPL. | 18 | * in the file called LICENSE.GPL. |
| 23 | * | 19 | * |
diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c index b170bdffb5de..88eda09e73c0 100644 --- a/drivers/i2c/busses/i2c-nforce2-s4985.c +++ b/drivers/i2c/busses/i2c-nforce2-s4985.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | /* | 17 | /* |
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index ee3a76c7ae97..70b3c9158509 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c | |||
| @@ -17,10 +17,6 @@ | |||
| 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | GNU General Public License for more details. | 19 | GNU General Public License for more details. |
| 20 | |||
| 21 | You should have received a copy of the GNU General Public License | ||
| 22 | along with this program; if not, write to the Free Software | ||
| 23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 24 | */ | 20 | */ |
| 25 | 21 | ||
| 26 | /* | 22 | /* |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 0dffb0e62c3b..26942c159de1 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
| @@ -22,10 +22,6 @@ | |||
| 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | * GNU General Public License for more details. | 24 | * GNU General Public License for more details. |
| 25 | * | ||
| 26 | * You should have received a copy of the GNU General Public License | ||
| 27 | * along with this program; if not, write to the Free Software | ||
| 28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 29 | */ | 25 | */ |
| 30 | 26 | ||
| 31 | #include <linux/module.h> | 27 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c index 62f55fe624cb..d1f625f923c7 100644 --- a/drivers/i2c/busses/i2c-parport-light.c +++ b/drivers/i2c/busses/i2c-parport-light.c | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | GNU General Public License for more details. | 20 | GNU General Public License for more details. |
| 21 | |||
| 22 | You should have received a copy of the GNU General Public License | ||
| 23 | along with this program; if not, write to the Free Software | ||
| 24 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | * ------------------------------------------------------------------------ */ | 21 | * ------------------------------------------------------------------------ */ |
| 26 | 22 | ||
| 27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index a27aae2d6757..a1fac5aa9bae 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | GNU General Public License for more details. | 20 | GNU General Public License for more details. |
| 21 | |||
| 22 | You should have received a copy of the GNU General Public License | ||
| 23 | along with this program; if not, write to the Free Software | ||
| 24 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | * ------------------------------------------------------------------------ */ | 21 | * ------------------------------------------------------------------------ */ |
| 26 | 22 | ||
| 27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-parport.h b/drivers/i2c/busses/i2c-parport.h index e572f3aac0f7..4e1294536805 100644 --- a/drivers/i2c/busses/i2c-parport.h +++ b/drivers/i2c/busses/i2c-parport.h | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program; if not, write to the Free Software | ||
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | * ------------------------------------------------------------------------ */ | 15 | * ------------------------------------------------------------------------ */ |
| 20 | 16 | ||
| 21 | #define PORT_DATA 0 | 17 | #define PORT_DATA 0 |
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index 7a9dce43e115..df1dbc92a024 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c | |||
| @@ -11,10 +11,6 @@ | |||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 18 | */ | 14 | */ |
| 19 | 15 | ||
| 20 | #include <linux/module.h> | 16 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c index 323f061a3163..e0eb4ca0102e 100644 --- a/drivers/i2c/busses/i2c-pca-isa.c +++ b/drivers/i2c/busses/i2c-pca-isa.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index a6f54ba27e2a..67cbec6796a0 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c | |||
| @@ -11,10 +11,6 @@ | |||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program; if not, write to the Free Software | ||
| 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 18 | */ | 14 | */ |
| 19 | 15 | ||
| 20 | /* | 16 | /* |
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c index 8564768fee32..177834e2d841 100644 --- a/drivers/i2c/busses/i2c-pmcmsp.c +++ b/drivers/i2c/busses/i2c-pmcmsp.c | |||
| @@ -18,10 +18,6 @@ | |||
| 18 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 18 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 19 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 19 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 20 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 20 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License along | ||
| 23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 24 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 25 | */ | 21 | */ |
| 26 | 22 | ||
| 27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 01e967763c2a..60a53c169ed2 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
| 16 | 16 | ||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program; if not, write to the Free Software | ||
| 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 20 | |||
| 21 | */ | 17 | */ |
| 22 | 18 | ||
| 23 | #include <linux/module.h> | 19 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e3b0337faeb7..65244774bfa3 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 21 | */ | 17 | */ |
| 22 | 18 | ||
| 23 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 8b5e79cb4468..4855188747c9 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
| @@ -14,10 +14,6 @@ | |||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 21 | */ | 17 | */ |
| 22 | 18 | ||
| 23 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c index 0fe505d7abe9..2b6219d86b0f 100644 --- a/drivers/i2c/busses/i2c-sibyte.c +++ b/drivers/i2c/busses/i2c-sibyte.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c index 964e5c6f84ab..15ac8395dcd3 100644 --- a/drivers/i2c/busses/i2c-simtec.c +++ b/drivers/i2c/busses/i2c-simtec.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index ac9bc33acef4..7d58a40faf2d 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c | |||
| @@ -11,10 +11,6 @@ | |||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program; if not, write to the Free Software | ||
| 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 18 | */ | 14 | */ |
| 19 | 15 | ||
| 20 | /* Note: we assume there can only be one SIS5595 with one SMBus interface */ | 16 | /* Note: we assume there can only be one SIS5595 with one SMBus interface */ |
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c index c6366733008d..1e6805b5cef2 100644 --- a/drivers/i2c/busses/i2c-sis630.c +++ b/drivers/i2c/busses/i2c-sis630.c | |||
| @@ -10,10 +10,6 @@ | |||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program; if not, write to the Free Software | ||
| 16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | 13 | */ |
| 18 | 14 | ||
| 19 | /* | 15 | /* |
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c index 8dc2fc5f74ff..44b904426073 100644 --- a/drivers/i2c/busses/i2c-sis96x.c +++ b/drivers/i2c/busses/i2c-sis96x.c | |||
| @@ -10,10 +10,6 @@ | |||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program; if not, write to the Free Software | ||
| 16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | 13 | */ |
| 18 | 14 | ||
| 19 | /* | 15 | /* |
diff --git a/drivers/i2c/busses/i2c-taos-evm.c b/drivers/i2c/busses/i2c-taos-evm.c index 10855a0b7e7f..4c7fc2d47014 100644 --- a/drivers/i2c/busses/i2c-taos-evm.c +++ b/drivers/i2c/busses/i2c-taos-evm.c | |||
| @@ -13,10 +13,6 @@ | |||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | 16 | */ |
| 21 | 17 | ||
| 22 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c index f4a1ed757612..59b1d233ca7b 100644 --- a/drivers/i2c/busses/i2c-via.c +++ b/drivers/i2c/busses/i2c-via.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program; if not, write to the Free Software | ||
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 6841200b6e50..0ee2646f3b00 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
| @@ -13,10 +13,6 @@ | |||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program; if not, write to the Free Software | ||
| 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 20 | */ | 16 | */ |
| 21 | 17 | ||
| 22 | /* | 18 | /* |
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index ade9223912d3..cc65ea0b818f 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
| 14 | * | 14 | * |
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 18 | * | ||
| 19 | * | 15 | * |
| 20 | * This code was implemented by Mocean Laboratories AB when porting linux | 16 | * This code was implemented by Mocean Laboratories AB when porting linux |
| 21 | * to the automotive development board Russellville. The copyright holder | 17 | * to the automotive development board Russellville. The copyright holder |
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index ff3f5747e43b..5153354b1a6b 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
| @@ -17,10 +17,6 @@ | |||
| 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 19 | General Public License for more details. | 19 | General Public License for more details. |
| 20 | |||
| 21 | You should have received a copy of the GNU General Public License | ||
| 22 | along with this program; if not, write to the Free Software | ||
| 23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 24 | */ | 20 | */ |
| 25 | 21 | ||
| 26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c index f24cc64e2e8c..90e322959303 100644 --- a/drivers/i2c/i2c-boardinfo.c +++ b/drivers/i2c/i2c-boardinfo.c | |||
| @@ -10,11 +10,6 @@ | |||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 17 | * MA 02110-1301 USA. | ||
| 18 | */ | 13 | */ |
| 19 | 14 | ||
| 20 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f90ac6a7f79..f43b4e11647a 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -10,12 +10,7 @@ | |||
| 10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. */ |
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program; if not, write to the Free Software | ||
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 18 | MA 02110-1301 USA. */ | ||
| 19 | /* ------------------------------------------------------------------------- */ | 14 | /* ------------------------------------------------------------------------- */ |
| 20 | 15 | ||
| 21 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. | 16 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. |
| @@ -670,6 +665,9 @@ static int i2c_device_remove(struct device *dev) | |||
| 670 | status = driver->remove(client); | 665 | status = driver->remove(client); |
| 671 | } | 666 | } |
| 672 | 667 | ||
| 668 | if (dev->of_node) | ||
| 669 | irq_dispose_mapping(client->irq); | ||
| 670 | |||
| 673 | dev_pm_domain_detach(&client->dev, true); | 671 | dev_pm_domain_detach(&client->dev, true); |
| 674 | return status; | 672 | return status; |
| 675 | } | 673 | } |
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h index 18a8fd21d2c2..17700bfddcf5 100644 --- a/drivers/i2c/i2c-core.h +++ b/drivers/i2c/i2c-core.h | |||
| @@ -10,11 +10,6 @@ | |||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 17 | * MA 02110-1301 USA. | ||
| 18 | */ | 13 | */ |
| 19 | 14 | ||
| 20 | #include <linux/rwsem.h> | 15 | #include <linux/rwsem.h> |
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 80b47e8ce030..71c7a3975b62 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c | |||
| @@ -14,11 +14,6 @@ | |||
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. |
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License | ||
| 19 | along with this program; if not, write to the Free Software | ||
| 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 21 | MA 02110-1301 USA. | ||
| 22 | */ | 17 | */ |
| 23 | 18 | ||
| 24 | /* Note that this is a complete rewrite of Simon Vogl's i2c-dev module. | 19 | /* Note that this is a complete rewrite of Simon Vogl's i2c-dev module. |
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index fc99f0d6b4a5..9ebf9cb4ad7a 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c | |||
| @@ -13,11 +13,6 @@ | |||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
| 20 | * MA 02110-1301 USA. | ||
| 21 | */ | 16 | */ |
| 22 | 17 | ||
| 23 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/i2c-stub.c b/drivers/i2c/i2c-stub.c index d241aa295d96..af2a94e1140b 100644 --- a/drivers/i2c/i2c-stub.c +++ b/drivers/i2c/i2c-stub.c | |||
| @@ -13,10 +13,6 @@ | |||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program; if not, write to the Free Software | ||
| 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 20 | */ | 16 | */ |
| 21 | 17 | ||
| 22 | #define DEBUG 1 | 18 | #define DEBUG 1 |
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 98909a9e284e..a23e58c4ed99 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c | |||
| @@ -894,7 +894,7 @@ static const struct attribute_group kxcjk1013_attrs_group = { | |||
| 894 | 894 | ||
| 895 | static const struct iio_event_spec kxcjk1013_event = { | 895 | static const struct iio_event_spec kxcjk1013_event = { |
| 896 | .type = IIO_EV_TYPE_THRESH, | 896 | .type = IIO_EV_TYPE_THRESH, |
| 897 | .dir = IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING, | 897 | .dir = IIO_EV_DIR_EITHER, |
| 898 | .mask_separate = BIT(IIO_EV_INFO_VALUE) | | 898 | .mask_separate = BIT(IIO_EV_INFO_VALUE) | |
| 899 | BIT(IIO_EV_INFO_ENABLE) | | 899 | BIT(IIO_EV_INFO_ENABLE) | |
| 900 | BIT(IIO_EV_INFO_PERIOD) | 900 | BIT(IIO_EV_INFO_PERIOD) |
diff --git a/drivers/iio/light/tsl4531.c b/drivers/iio/light/tsl4531.c index a15006efa137..0763b8632573 100644 --- a/drivers/iio/light/tsl4531.c +++ b/drivers/iio/light/tsl4531.c | |||
| @@ -230,9 +230,12 @@ static int tsl4531_resume(struct device *dev) | |||
| 230 | return i2c_smbus_write_byte_data(to_i2c_client(dev), TSL4531_CONTROL, | 230 | return i2c_smbus_write_byte_data(to_i2c_client(dev), TSL4531_CONTROL, |
| 231 | TSL4531_MODE_NORMAL); | 231 | TSL4531_MODE_NORMAL); |
| 232 | } | 232 | } |
| 233 | #endif | ||
| 234 | 233 | ||
| 235 | static SIMPLE_DEV_PM_OPS(tsl4531_pm_ops, tsl4531_suspend, tsl4531_resume); | 234 | static SIMPLE_DEV_PM_OPS(tsl4531_pm_ops, tsl4531_suspend, tsl4531_resume); |
| 235 | #define TSL4531_PM_OPS (&tsl4531_pm_ops) | ||
| 236 | #else | ||
| 237 | #define TSL4531_PM_OPS NULL | ||
| 238 | #endif | ||
| 236 | 239 | ||
| 237 | static const struct i2c_device_id tsl4531_id[] = { | 240 | static const struct i2c_device_id tsl4531_id[] = { |
| 238 | { "tsl4531", 0 }, | 241 | { "tsl4531", 0 }, |
| @@ -243,7 +246,7 @@ MODULE_DEVICE_TABLE(i2c, tsl4531_id); | |||
| 243 | static struct i2c_driver tsl4531_driver = { | 246 | static struct i2c_driver tsl4531_driver = { |
| 244 | .driver = { | 247 | .driver = { |
| 245 | .name = TSL4531_DRV_NAME, | 248 | .name = TSL4531_DRV_NAME, |
| 246 | .pm = &tsl4531_pm_ops, | 249 | .pm = TSL4531_PM_OPS, |
| 247 | .owner = THIS_MODULE, | 250 | .owner = THIS_MODULE, |
| 248 | }, | 251 | }, |
| 249 | .probe = tsl4531_probe, | 252 | .probe = tsl4531_probe, |
diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index 5e780ef206f3..8349cc0fdf66 100644 --- a/drivers/iio/proximity/as3935.c +++ b/drivers/iio/proximity/as3935.c | |||
| @@ -330,7 +330,7 @@ static int as3935_probe(struct spi_device *spi) | |||
| 330 | return -EINVAL; | 330 | return -EINVAL; |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(st)); | 333 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); |
| 334 | if (!indio_dev) | 334 | if (!indio_dev) |
| 335 | return -ENOMEM; | 335 | return -ENOMEM; |
| 336 | 336 | ||
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 3e238cd049e6..6a2e168c3ab0 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34) | 43 | #define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34) |
| 44 | #define ARMADA_370_XP_INT_SOURCE_CTL(irq) (0x100 + irq*4) | 44 | #define ARMADA_370_XP_INT_SOURCE_CTL(irq) (0x100 + irq*4) |
| 45 | #define ARMADA_370_XP_INT_SOURCE_CPU_MASK 0xF | 45 | #define ARMADA_370_XP_INT_SOURCE_CPU_MASK 0xF |
| 46 | #define ARMADA_370_XP_INT_IRQ_FIQ_MASK(cpuid) ((BIT(0) | BIT(8)) << cpuid) | ||
| 46 | 47 | ||
| 47 | #define ARMADA_370_XP_CPU_INTACK_OFFS (0x44) | 48 | #define ARMADA_370_XP_CPU_INTACK_OFFS (0x44) |
| 48 | #define ARMADA_375_PPI_CAUSE (0x10) | 49 | #define ARMADA_375_PPI_CAUSE (0x10) |
| @@ -406,19 +407,29 @@ static void armada_370_xp_mpic_handle_cascade_irq(unsigned int irq, | |||
| 406 | struct irq_desc *desc) | 407 | struct irq_desc *desc) |
| 407 | { | 408 | { |
| 408 | struct irq_chip *chip = irq_get_chip(irq); | 409 | struct irq_chip *chip = irq_get_chip(irq); |
| 409 | unsigned long irqmap, irqn; | 410 | unsigned long irqmap, irqn, irqsrc, cpuid; |
| 410 | unsigned int cascade_irq; | 411 | unsigned int cascade_irq; |
| 411 | 412 | ||
| 412 | chained_irq_enter(chip, desc); | 413 | chained_irq_enter(chip, desc); |
| 413 | 414 | ||
| 414 | irqmap = readl_relaxed(per_cpu_int_base + ARMADA_375_PPI_CAUSE); | 415 | irqmap = readl_relaxed(per_cpu_int_base + ARMADA_375_PPI_CAUSE); |
| 415 | 416 | cpuid = cpu_logical_map(smp_processor_id()); | |
| 416 | if (irqmap & BIT(0)) { | ||
| 417 | armada_370_xp_handle_msi_irq(NULL, true); | ||
| 418 | irqmap &= ~BIT(0); | ||
| 419 | } | ||
| 420 | 417 | ||
| 421 | for_each_set_bit(irqn, &irqmap, BITS_PER_LONG) { | 418 | for_each_set_bit(irqn, &irqmap, BITS_PER_LONG) { |
| 419 | irqsrc = readl_relaxed(main_int_base + | ||
| 420 | ARMADA_370_XP_INT_SOURCE_CTL(irqn)); | ||
| 421 | |||
| 422 | /* Check if the interrupt is not masked on current CPU. | ||
| 423 | * Test IRQ (0-1) and FIQ (8-9) mask bits. | ||
| 424 | */ | ||
| 425 | if (!(irqsrc & ARMADA_370_XP_INT_IRQ_FIQ_MASK(cpuid))) | ||
| 426 | continue; | ||
| 427 | |||
| 428 | if (irqn == 1) { | ||
| 429 | armada_370_xp_handle_msi_irq(NULL, true); | ||
| 430 | continue; | ||
| 431 | } | ||
| 432 | |||
| 422 | cascade_irq = irq_find_mapping(armada_370_xp_mpic_domain, irqn); | 433 | cascade_irq = irq_find_mapping(armada_370_xp_mpic_domain, irqn); |
| 423 | generic_handle_irq(cascade_irq); | 434 | generic_handle_irq(cascade_irq); |
| 424 | } | 435 | } |
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index b8579ee68bd6..2cf30576bf39 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c | |||
| @@ -962,6 +962,11 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) | |||
| 962 | case SYS_ATSC: | 962 | case SYS_ATSC: |
| 963 | c->modulation = VSB_8; | 963 | c->modulation = VSB_8; |
| 964 | break; | 964 | break; |
| 965 | case SYS_ISDBS: | ||
| 966 | c->symbol_rate = 28860000; | ||
| 967 | c->rolloff = ROLLOFF_35; | ||
| 968 | c->bandwidth_hz = c->symbol_rate / 100 * 135; | ||
| 969 | break; | ||
| 965 | default: | 970 | default: |
| 966 | c->modulation = QAM_AUTO; | 971 | c->modulation = QAM_AUTO; |
| 967 | break; | 972 | break; |
| @@ -2072,6 +2077,7 @@ static int dtv_set_frontend(struct dvb_frontend *fe) | |||
| 2072 | break; | 2077 | break; |
| 2073 | case SYS_DVBS: | 2078 | case SYS_DVBS: |
| 2074 | case SYS_TURBO: | 2079 | case SYS_TURBO: |
| 2080 | case SYS_ISDBS: | ||
| 2075 | rolloff = 135; | 2081 | rolloff = 135; |
| 2076 | break; | 2082 | break; |
| 2077 | case SYS_DVBS2: | 2083 | case SYS_DVBS2: |
diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c index 335daeff91b9..9d0d0347758f 100644 --- a/drivers/media/dvb-frontends/ds3000.c +++ b/drivers/media/dvb-frontends/ds3000.c | |||
| @@ -864,6 +864,13 @@ struct dvb_frontend *ds3000_attach(const struct ds3000_config *config, | |||
| 864 | memcpy(&state->frontend.ops, &ds3000_ops, | 864 | memcpy(&state->frontend.ops, &ds3000_ops, |
| 865 | sizeof(struct dvb_frontend_ops)); | 865 | sizeof(struct dvb_frontend_ops)); |
| 866 | state->frontend.demodulator_priv = state; | 866 | state->frontend.demodulator_priv = state; |
| 867 | |||
| 868 | /* | ||
| 869 | * Some devices like T480 starts with voltage on. Be sure | ||
| 870 | * to turn voltage off during init, as this can otherwise | ||
| 871 | * interfere with Unicable SCR systems. | ||
| 872 | */ | ||
| 873 | ds3000_set_voltage(&state->frontend, SEC_VOLTAGE_OFF); | ||
| 867 | return &state->frontend; | 874 | return &state->frontend; |
| 868 | 875 | ||
| 869 | error3: | 876 | error3: |
diff --git a/drivers/media/dvb-frontends/sp2.c b/drivers/media/dvb-frontends/sp2.c index 9b684d5c8f91..15bf4318cb74 100644 --- a/drivers/media/dvb-frontends/sp2.c +++ b/drivers/media/dvb-frontends/sp2.c | |||
| @@ -266,7 +266,7 @@ int sp2_ci_poll_slot_status(struct dvb_ca_en50221 *en50221, | |||
| 266 | return s->status; | 266 | return s->status; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | int sp2_init(struct sp2 *s) | 269 | static int sp2_init(struct sp2 *s) |
| 270 | { | 270 | { |
| 271 | int ret = 0; | 271 | int ret = 0; |
| 272 | u8 buf; | 272 | u8 buf; |
| @@ -348,7 +348,7 @@ err: | |||
| 348 | return ret; | 348 | return ret; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | int sp2_exit(struct i2c_client *client) | 351 | static int sp2_exit(struct i2c_client *client) |
| 352 | { | 352 | { |
| 353 | struct sp2 *s; | 353 | struct sp2 *s; |
| 354 | 354 | ||
diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c index d9905fb52f84..b35d65c9cc05 100644 --- a/drivers/media/dvb-frontends/tc90522.c +++ b/drivers/media/dvb-frontends/tc90522.c | |||
| @@ -216,32 +216,30 @@ static int tc90522s_get_frontend(struct dvb_frontend *fe) | |||
| 216 | c->delivery_system = SYS_ISDBS; | 216 | c->delivery_system = SYS_ISDBS; |
| 217 | 217 | ||
| 218 | layers = 0; | 218 | layers = 0; |
| 219 | ret = reg_read(state, 0xe8, val, 3); | 219 | ret = reg_read(state, 0xe6, val, 5); |
| 220 | if (ret == 0) { | 220 | if (ret == 0) { |
| 221 | int slots; | ||
| 222 | u8 v; | 221 | u8 v; |
| 223 | 222 | ||
| 223 | c->stream_id = val[0] << 8 | val[1]; | ||
| 224 | |||
| 224 | /* high/single layer */ | 225 | /* high/single layer */ |
| 225 | v = (val[0] & 0x70) >> 4; | 226 | v = (val[2] & 0x70) >> 4; |
| 226 | c->modulation = (v == 7) ? PSK_8 : QPSK; | 227 | c->modulation = (v == 7) ? PSK_8 : QPSK; |
| 227 | c->fec_inner = fec_conv_sat[v]; | 228 | c->fec_inner = fec_conv_sat[v]; |
| 228 | c->layer[0].fec = c->fec_inner; | 229 | c->layer[0].fec = c->fec_inner; |
| 229 | c->layer[0].modulation = c->modulation; | 230 | c->layer[0].modulation = c->modulation; |
| 230 | c->layer[0].segment_count = val[1] & 0x3f; /* slots */ | 231 | c->layer[0].segment_count = val[3] & 0x3f; /* slots */ |
| 231 | 232 | ||
| 232 | /* low layer */ | 233 | /* low layer */ |
| 233 | v = (val[0] & 0x07); | 234 | v = (val[2] & 0x07); |
| 234 | c->layer[1].fec = fec_conv_sat[v]; | 235 | c->layer[1].fec = fec_conv_sat[v]; |
| 235 | if (v == 0) /* no low layer */ | 236 | if (v == 0) /* no low layer */ |
| 236 | c->layer[1].segment_count = 0; | 237 | c->layer[1].segment_count = 0; |
| 237 | else | 238 | else |
| 238 | c->layer[1].segment_count = val[2] & 0x3f; /* slots */ | 239 | c->layer[1].segment_count = val[4] & 0x3f; /* slots */ |
| 239 | /* actually, BPSK if v==1, but not defined in fe_modulation_t */ | 240 | /* actually, BPSK if v==1, but not defined in fe_modulation_t */ |
| 240 | c->layer[1].modulation = QPSK; | 241 | c->layer[1].modulation = QPSK; |
| 241 | layers = (v > 0) ? 2 : 1; | 242 | layers = (v > 0) ? 2 : 1; |
| 242 | |||
| 243 | slots = c->layer[0].segment_count + c->layer[1].segment_count; | ||
| 244 | c->symbol_rate = 28860000 * slots / 48; | ||
| 245 | } | 243 | } |
| 246 | 244 | ||
| 247 | /* statistics */ | 245 | /* statistics */ |
| @@ -363,7 +361,7 @@ static int tc90522t_get_frontend(struct dvb_frontend *fe) | |||
| 363 | u8 v; | 361 | u8 v; |
| 364 | 362 | ||
| 365 | c->isdbt_partial_reception = val[0] & 0x01; | 363 | c->isdbt_partial_reception = val[0] & 0x01; |
| 366 | c->isdbt_sb_mode = (val[0] & 0xc0) == 0x01; | 364 | c->isdbt_sb_mode = (val[0] & 0xc0) == 0x40; |
| 367 | 365 | ||
| 368 | /* layer A */ | 366 | /* layer A */ |
| 369 | v = (val[2] & 0x78) >> 3; | 367 | v = (val[2] & 0x78) >> 3; |
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c index 2c61a62ab48b..686c3c2ad05b 100644 --- a/drivers/media/platform/vivid/vivid-core.c +++ b/drivers/media/platform/vivid/vivid-core.c | |||
| @@ -100,11 +100,9 @@ MODULE_PARM_DESC(ccs_out_mode, " output crop/compose/scale mode:\n" | |||
| 100 | "\t\t bit 0=crop, 1=compose, 2=scale,\n" | 100 | "\t\t bit 0=crop, 1=compose, 2=scale,\n" |
| 101 | "\t\t -1=user-controlled (default)"); | 101 | "\t\t -1=user-controlled (default)"); |
| 102 | 102 | ||
| 103 | static unsigned multiplanar[VIVID_MAX_DEVS]; | 103 | static unsigned multiplanar[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 1 }; |
| 104 | module_param_array(multiplanar, uint, NULL, 0444); | 104 | module_param_array(multiplanar, uint, NULL, 0444); |
| 105 | MODULE_PARM_DESC(multiplanar, " 0 (default) is alternating single and multiplanar devices,\n" | 105 | MODULE_PARM_DESC(multiplanar, " 1 (default) creates a single planar device, 2 creates a multiplanar device."); |
| 106 | "\t\t 1 is single planar devices,\n" | ||
| 107 | "\t\t 2 is multiplanar devices"); | ||
| 108 | 106 | ||
| 109 | /* Default: video + vbi-cap (raw and sliced) + radio rx + radio tx + sdr + vbi-out + vid-out */ | 107 | /* Default: video + vbi-cap (raw and sliced) + radio rx + radio tx + sdr + vbi-out + vid-out */ |
| 110 | static unsigned node_types[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 0x1d3d }; | 108 | static unsigned node_types[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 0x1d3d }; |
| @@ -669,10 +667,7 @@ static int __init vivid_create_instance(int inst) | |||
| 669 | /* start detecting feature set */ | 667 | /* start detecting feature set */ |
| 670 | 668 | ||
| 671 | /* do we use single- or multi-planar? */ | 669 | /* do we use single- or multi-planar? */ |
| 672 | if (multiplanar[inst] == 0) | 670 | dev->multiplanar = multiplanar[inst] > 1; |
| 673 | dev->multiplanar = inst & 1; | ||
| 674 | else | ||
| 675 | dev->multiplanar = multiplanar[inst] > 1; | ||
| 676 | v4l2_info(&dev->v4l2_dev, "using %splanar format API\n", | 671 | v4l2_info(&dev->v4l2_dev, "using %splanar format API\n", |
| 677 | dev->multiplanar ? "multi" : "single "); | 672 | dev->multiplanar ? "multi" : "single "); |
| 678 | 673 | ||
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index b8837dd39bb2..65f80b8b9f7a 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
| @@ -1678,7 +1678,8 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
| 1678 | if (press_type == 0) | 1678 | if (press_type == 0) |
| 1679 | rc_keyup(ictx->rdev); | 1679 | rc_keyup(ictx->rdev); |
| 1680 | else { | 1680 | else { |
| 1681 | if (ictx->rc_type == RC_BIT_RC6_MCE) | 1681 | if (ictx->rc_type == RC_BIT_RC6_MCE || |
| 1682 | ictx->rc_type == RC_BIT_OTHER) | ||
| 1682 | rc_keydown(ictx->rdev, | 1683 | rc_keydown(ictx->rdev, |
| 1683 | ictx->rc_type == RC_BIT_RC6_MCE ? RC_TYPE_RC6_MCE : RC_TYPE_OTHER, | 1684 | ictx->rc_type == RC_BIT_RC6_MCE ? RC_TYPE_RC6_MCE : RC_TYPE_OTHER, |
| 1684 | ictx->rc_scancode, ictx->rc_toggle); | 1685 | ictx->rc_scancode, ictx->rc_toggle); |
diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c index 08bbd4f508cd..b0df62961c14 100644 --- a/drivers/media/rc/ir-hix5hd2.c +++ b/drivers/media/rc/ir-hix5hd2.c | |||
| @@ -297,7 +297,7 @@ static int hix5hd2_ir_remove(struct platform_device *pdev) | |||
| 297 | return 0; | 297 | return 0; |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | #ifdef CONFIG_PM | 300 | #ifdef CONFIG_PM_SLEEP |
| 301 | static int hix5hd2_ir_suspend(struct device *dev) | 301 | static int hix5hd2_ir_suspend(struct device *dev) |
| 302 | { | 302 | { |
| 303 | struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev); | 303 | struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev); |
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c index 2ef763928ca4..84fa6e9b59a1 100644 --- a/drivers/media/rc/ir-rc5-decoder.c +++ b/drivers/media/rc/ir-rc5-decoder.c | |||
| @@ -53,7 +53,7 @@ static int ir_rc5_decode(struct rc_dev *dev, struct ir_raw_event ev) | |||
| 53 | u32 scancode; | 53 | u32 scancode; |
| 54 | enum rc_type protocol; | 54 | enum rc_type protocol; |
| 55 | 55 | ||
| 56 | if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X))) | 56 | if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ))) |
| 57 | return 0; | 57 | return 0; |
| 58 | 58 | ||
| 59 | if (!is_timing_event(ev)) { | 59 | if (!is_timing_event(ev)) { |
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c index e8fff2add265..b732ac6a26d8 100644 --- a/drivers/media/rc/rc-ir-raw.c +++ b/drivers/media/rc/rc-ir-raw.c | |||
| @@ -262,7 +262,6 @@ int ir_raw_event_register(struct rc_dev *dev) | |||
| 262 | return -ENOMEM; | 262 | return -ENOMEM; |
| 263 | 263 | ||
| 264 | dev->raw->dev = dev; | 264 | dev->raw->dev = dev; |
| 265 | dev->enabled_protocols = ~0; | ||
| 266 | dev->change_protocol = change_protocol; | 265 | dev->change_protocol = change_protocol; |
| 267 | rc = kfifo_alloc(&dev->raw->kfifo, | 266 | rc = kfifo_alloc(&dev->raw->kfifo, |
| 268 | sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE, | 267 | sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE, |
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index a7991c7d010a..8d3b74c5a717 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c | |||
| @@ -1421,6 +1421,8 @@ int rc_register_device(struct rc_dev *dev) | |||
| 1421 | 1421 | ||
| 1422 | if (dev->change_protocol) { | 1422 | if (dev->change_protocol) { |
| 1423 | u64 rc_type = (1 << rc_map->rc_type); | 1423 | u64 rc_type = (1 << rc_map->rc_type); |
| 1424 | if (dev->driver_type == RC_DRIVER_IR_RAW) | ||
| 1425 | rc_type |= RC_BIT_LIRC; | ||
| 1424 | rc = dev->change_protocol(dev, &rc_type); | 1426 | rc = dev->change_protocol(dev, &rc_type); |
| 1425 | if (rc < 0) | 1427 | if (rc < 0) |
| 1426 | goto out_raw; | 1428 | goto out_raw; |
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 03c53b72a2d6..270d58a4c43d 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
| @@ -311,7 +311,8 @@ int mmc_of_parse(struct mmc_host *host) | |||
| 311 | struct device_node *np; | 311 | struct device_node *np; |
| 312 | u32 bus_width; | 312 | u32 bus_width; |
| 313 | int len, ret; | 313 | int len, ret; |
| 314 | bool cap_invert, gpio_invert; | 314 | bool cd_cap_invert, cd_gpio_invert = false; |
| 315 | bool ro_cap_invert, ro_gpio_invert = false; | ||
| 315 | 316 | ||
| 316 | if (!host->parent || !host->parent->of_node) | 317 | if (!host->parent || !host->parent->of_node) |
| 317 | return 0; | 318 | return 0; |
| @@ -359,16 +360,13 @@ int mmc_of_parse(struct mmc_host *host) | |||
| 359 | if (of_find_property(np, "non-removable", &len)) { | 360 | if (of_find_property(np, "non-removable", &len)) { |
| 360 | host->caps |= MMC_CAP_NONREMOVABLE; | 361 | host->caps |= MMC_CAP_NONREMOVABLE; |
| 361 | } else { | 362 | } else { |
| 362 | if (of_property_read_bool(np, "cd-inverted")) | 363 | cd_cap_invert = of_property_read_bool(np, "cd-inverted"); |
| 363 | cap_invert = true; | ||
| 364 | else | ||
| 365 | cap_invert = false; | ||
| 366 | 364 | ||
| 367 | if (of_find_property(np, "broken-cd", &len)) | 365 | if (of_find_property(np, "broken-cd", &len)) |
| 368 | host->caps |= MMC_CAP_NEEDS_POLL; | 366 | host->caps |= MMC_CAP_NEEDS_POLL; |
| 369 | 367 | ||
| 370 | ret = mmc_gpiod_request_cd(host, "cd", 0, true, | 368 | ret = mmc_gpiod_request_cd(host, "cd", 0, true, |
| 371 | 0, &gpio_invert); | 369 | 0, &cd_gpio_invert); |
| 372 | if (ret) { | 370 | if (ret) { |
| 373 | if (ret == -EPROBE_DEFER) | 371 | if (ret == -EPROBE_DEFER) |
| 374 | return ret; | 372 | return ret; |
| @@ -391,17 +389,14 @@ int mmc_of_parse(struct mmc_host *host) | |||
| 391 | * both inverted, the end result is that the CD line is | 389 | * both inverted, the end result is that the CD line is |
| 392 | * not inverted. | 390 | * not inverted. |
| 393 | */ | 391 | */ |
| 394 | if (cap_invert ^ gpio_invert) | 392 | if (cd_cap_invert ^ cd_gpio_invert) |
| 395 | host->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH; | 393 | host->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH; |
| 396 | } | 394 | } |
| 397 | 395 | ||
| 398 | /* Parse Write Protection */ | 396 | /* Parse Write Protection */ |
| 399 | if (of_property_read_bool(np, "wp-inverted")) | 397 | ro_cap_invert = of_property_read_bool(np, "wp-inverted"); |
| 400 | cap_invert = true; | ||
| 401 | else | ||
| 402 | cap_invert = false; | ||
| 403 | 398 | ||
| 404 | ret = mmc_gpiod_request_ro(host, "wp", 0, false, 0, &gpio_invert); | 399 | ret = mmc_gpiod_request_ro(host, "wp", 0, false, 0, &ro_gpio_invert); |
| 405 | if (ret) { | 400 | if (ret) { |
| 406 | if (ret == -EPROBE_DEFER) | 401 | if (ret == -EPROBE_DEFER) |
| 407 | goto out; | 402 | goto out; |
| @@ -414,7 +409,7 @@ int mmc_of_parse(struct mmc_host *host) | |||
| 414 | dev_info(host->parent, "Got WP GPIO\n"); | 409 | dev_info(host->parent, "Got WP GPIO\n"); |
| 415 | 410 | ||
| 416 | /* See the comment on CD inversion above */ | 411 | /* See the comment on CD inversion above */ |
| 417 | if (cap_invert ^ gpio_invert) | 412 | if (ro_cap_invert ^ ro_gpio_invert) |
| 418 | host->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; | 413 | host->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; |
| 419 | 414 | ||
| 420 | if (of_find_property(np, "cap-sd-highspeed", &len)) | 415 | if (of_find_property(np, "cap-sd-highspeed", &len)) |
diff --git a/drivers/of/base.c b/drivers/of/base.c index 2305dc0382bc..3823edf2d012 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -1280,52 +1280,6 @@ int of_property_read_string(struct device_node *np, const char *propname, | |||
| 1280 | EXPORT_SYMBOL_GPL(of_property_read_string); | 1280 | EXPORT_SYMBOL_GPL(of_property_read_string); |
| 1281 | 1281 | ||
| 1282 | /** | 1282 | /** |
| 1283 | * of_property_read_string_index - Find and read a string from a multiple | ||
| 1284 | * strings property. | ||
| 1285 | * @np: device node from which the property value is to be read. | ||
| 1286 | * @propname: name of the property to be searched. | ||
| 1287 | * @index: index of the string in the list of strings | ||
| 1288 | * @out_string: pointer to null terminated return string, modified only if | ||
| 1289 | * return value is 0. | ||
| 1290 | * | ||
| 1291 | * Search for a property in a device tree node and retrieve a null | ||
| 1292 | * terminated string value (pointer to data, not a copy) in the list of strings | ||
| 1293 | * contained in that property. | ||
| 1294 | * Returns 0 on success, -EINVAL if the property does not exist, -ENODATA if | ||
| 1295 | * property does not have a value, and -EILSEQ if the string is not | ||
| 1296 | * null-terminated within the length of the property data. | ||
| 1297 | * | ||
| 1298 | * The out_string pointer is modified only if a valid string can be decoded. | ||
| 1299 | */ | ||
| 1300 | int of_property_read_string_index(struct device_node *np, const char *propname, | ||
| 1301 | int index, const char **output) | ||
| 1302 | { | ||
| 1303 | struct property *prop = of_find_property(np, propname, NULL); | ||
| 1304 | int i = 0; | ||
| 1305 | size_t l = 0, total = 0; | ||
| 1306 | const char *p; | ||
| 1307 | |||
| 1308 | if (!prop) | ||
| 1309 | return -EINVAL; | ||
| 1310 | if (!prop->value) | ||
| 1311 | return -ENODATA; | ||
| 1312 | if (strnlen(prop->value, prop->length) >= prop->length) | ||
| 1313 | return -EILSEQ; | ||
| 1314 | |||
| 1315 | p = prop->value; | ||
| 1316 | |||
| 1317 | for (i = 0; total < prop->length; total += l, p += l) { | ||
| 1318 | l = strlen(p) + 1; | ||
| 1319 | if (i++ == index) { | ||
| 1320 | *output = p; | ||
| 1321 | return 0; | ||
| 1322 | } | ||
| 1323 | } | ||
| 1324 | return -ENODATA; | ||
| 1325 | } | ||
| 1326 | EXPORT_SYMBOL_GPL(of_property_read_string_index); | ||
| 1327 | |||
| 1328 | /** | ||
| 1329 | * of_property_match_string() - Find string in a list and return index | 1283 | * of_property_match_string() - Find string in a list and return index |
| 1330 | * @np: pointer to node containing string list property | 1284 | * @np: pointer to node containing string list property |
| 1331 | * @propname: string list property name | 1285 | * @propname: string list property name |
| @@ -1351,7 +1305,7 @@ int of_property_match_string(struct device_node *np, const char *propname, | |||
| 1351 | end = p + prop->length; | 1305 | end = p + prop->length; |
| 1352 | 1306 | ||
| 1353 | for (i = 0; p < end; i++, p += l) { | 1307 | for (i = 0; p < end; i++, p += l) { |
| 1354 | l = strlen(p) + 1; | 1308 | l = strnlen(p, end - p) + 1; |
| 1355 | if (p + l > end) | 1309 | if (p + l > end) |
| 1356 | return -EILSEQ; | 1310 | return -EILSEQ; |
| 1357 | pr_debug("comparing %s with %s\n", string, p); | 1311 | pr_debug("comparing %s with %s\n", string, p); |
| @@ -1363,39 +1317,41 @@ int of_property_match_string(struct device_node *np, const char *propname, | |||
| 1363 | EXPORT_SYMBOL_GPL(of_property_match_string); | 1317 | EXPORT_SYMBOL_GPL(of_property_match_string); |
| 1364 | 1318 | ||
| 1365 | /** | 1319 | /** |
| 1366 | * of_property_count_strings - Find and return the number of strings from a | 1320 | * of_property_read_string_util() - Utility helper for parsing string properties |
| 1367 | * multiple strings property. | ||
| 1368 | * @np: device node from which the property value is to be read. | 1321 | * @np: device node from which the property value is to be read. |
| 1369 | * @propname: name of the property to be searched. | 1322 | * @propname: name of the property to be searched. |
| 1323 | * @out_strs: output array of string pointers. | ||
| 1324 | * @sz: number of array elements to read. | ||
| 1325 | * @skip: Number of strings to skip over at beginning of list. | ||
| 1370 | * | 1326 | * |
| 1371 | * Search for a property in a device tree node and retrieve the number of null | 1327 | * Don't call this function directly. It is a utility helper for the |
| 1372 | * terminated string contain in it. Returns the number of strings on | 1328 | * of_property_read_string*() family of functions. |
| 1373 | * success, -EINVAL if the property does not exist, -ENODATA if property | ||
| 1374 | * does not have a value, and -EILSEQ if the string is not null-terminated | ||
| 1375 | * within the length of the property data. | ||
| 1376 | */ | 1329 | */ |
| 1377 | int of_property_count_strings(struct device_node *np, const char *propname) | 1330 | int of_property_read_string_helper(struct device_node *np, const char *propname, |
| 1331 | const char **out_strs, size_t sz, int skip) | ||
| 1378 | { | 1332 | { |
| 1379 | struct property *prop = of_find_property(np, propname, NULL); | 1333 | struct property *prop = of_find_property(np, propname, NULL); |
| 1380 | int i = 0; | 1334 | int l = 0, i = 0; |
| 1381 | size_t l = 0, total = 0; | 1335 | const char *p, *end; |
| 1382 | const char *p; | ||
| 1383 | 1336 | ||
| 1384 | if (!prop) | 1337 | if (!prop) |
| 1385 | return -EINVAL; | 1338 | return -EINVAL; |
| 1386 | if (!prop->value) | 1339 | if (!prop->value) |
| 1387 | return -ENODATA; | 1340 | return -ENODATA; |
| 1388 | if (strnlen(prop->value, prop->length) >= prop->length) | ||
| 1389 | return -EILSEQ; | ||
| 1390 | |||
| 1391 | p = prop->value; | 1341 | p = prop->value; |
| 1342 | end = p + prop->length; | ||
| 1392 | 1343 | ||
| 1393 | for (i = 0; total < prop->length; total += l, p += l, i++) | 1344 | for (i = 0; p < end && (!out_strs || i < skip + sz); i++, p += l) { |
| 1394 | l = strlen(p) + 1; | 1345 | l = strnlen(p, end - p) + 1; |
| 1395 | 1346 | if (p + l > end) | |
| 1396 | return i; | 1347 | return -EILSEQ; |
| 1348 | if (out_strs && i >= skip) | ||
| 1349 | *out_strs++ = p; | ||
| 1350 | } | ||
| 1351 | i -= skip; | ||
| 1352 | return i <= 0 ? -ENODATA : i; | ||
| 1397 | } | 1353 | } |
| 1398 | EXPORT_SYMBOL_GPL(of_property_count_strings); | 1354 | EXPORT_SYMBOL_GPL(of_property_read_string_helper); |
| 1399 | 1355 | ||
| 1400 | void of_print_phandle_args(const char *msg, const struct of_phandle_args *args) | 1356 | void of_print_phandle_args(const char *msg, const struct of_phandle_args *args) |
| 1401 | { | 1357 | { |
diff --git a/drivers/of/selftest.c b/drivers/of/selftest.c index 78001270a598..11b873c54a77 100644 --- a/drivers/of/selftest.c +++ b/drivers/of/selftest.c | |||
| @@ -339,8 +339,9 @@ static void __init of_selftest_parse_phandle_with_args(void) | |||
| 339 | selftest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); | 339 | selftest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | static void __init of_selftest_property_match_string(void) | 342 | static void __init of_selftest_property_string(void) |
| 343 | { | 343 | { |
| 344 | const char *strings[4]; | ||
| 344 | struct device_node *np; | 345 | struct device_node *np; |
| 345 | int rc; | 346 | int rc; |
| 346 | 347 | ||
| @@ -357,13 +358,66 @@ static void __init of_selftest_property_match_string(void) | |||
| 357 | rc = of_property_match_string(np, "phandle-list-names", "third"); | 358 | rc = of_property_match_string(np, "phandle-list-names", "third"); |
| 358 | selftest(rc == 2, "third expected:0 got:%i\n", rc); | 359 | selftest(rc == 2, "third expected:0 got:%i\n", rc); |
| 359 | rc = of_property_match_string(np, "phandle-list-names", "fourth"); | 360 | rc = of_property_match_string(np, "phandle-list-names", "fourth"); |
| 360 | selftest(rc == -ENODATA, "unmatched string; rc=%i", rc); | 361 | selftest(rc == -ENODATA, "unmatched string; rc=%i\n", rc); |
| 361 | rc = of_property_match_string(np, "missing-property", "blah"); | 362 | rc = of_property_match_string(np, "missing-property", "blah"); |
| 362 | selftest(rc == -EINVAL, "missing property; rc=%i", rc); | 363 | selftest(rc == -EINVAL, "missing property; rc=%i\n", rc); |
| 363 | rc = of_property_match_string(np, "empty-property", "blah"); | 364 | rc = of_property_match_string(np, "empty-property", "blah"); |
| 364 | selftest(rc == -ENODATA, "empty property; rc=%i", rc); | 365 | selftest(rc == -ENODATA, "empty property; rc=%i\n", rc); |
| 365 | rc = of_property_match_string(np, "unterminated-string", "blah"); | 366 | rc = of_property_match_string(np, "unterminated-string", "blah"); |
| 366 | selftest(rc == -EILSEQ, "unterminated string; rc=%i", rc); | 367 | selftest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); |
| 368 | |||
| 369 | /* of_property_count_strings() tests */ | ||
| 370 | rc = of_property_count_strings(np, "string-property"); | ||
| 371 | selftest(rc == 1, "Incorrect string count; rc=%i\n", rc); | ||
| 372 | rc = of_property_count_strings(np, "phandle-list-names"); | ||
| 373 | selftest(rc == 3, "Incorrect string count; rc=%i\n", rc); | ||
| 374 | rc = of_property_count_strings(np, "unterminated-string"); | ||
| 375 | selftest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); | ||
| 376 | rc = of_property_count_strings(np, "unterminated-string-list"); | ||
| 377 | selftest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); | ||
| 378 | |||
| 379 | /* of_property_read_string_index() tests */ | ||
| 380 | rc = of_property_read_string_index(np, "string-property", 0, strings); | ||
| 381 | selftest(rc == 0 && !strcmp(strings[0], "foobar"), "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 382 | strings[0] = NULL; | ||
| 383 | rc = of_property_read_string_index(np, "string-property", 1, strings); | ||
| 384 | selftest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 385 | rc = of_property_read_string_index(np, "phandle-list-names", 0, strings); | ||
| 386 | selftest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 387 | rc = of_property_read_string_index(np, "phandle-list-names", 1, strings); | ||
| 388 | selftest(rc == 0 && !strcmp(strings[0], "second"), "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 389 | rc = of_property_read_string_index(np, "phandle-list-names", 2, strings); | ||
| 390 | selftest(rc == 0 && !strcmp(strings[0], "third"), "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 391 | strings[0] = NULL; | ||
| 392 | rc = of_property_read_string_index(np, "phandle-list-names", 3, strings); | ||
| 393 | selftest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 394 | strings[0] = NULL; | ||
| 395 | rc = of_property_read_string_index(np, "unterminated-string", 0, strings); | ||
| 396 | selftest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 397 | rc = of_property_read_string_index(np, "unterminated-string-list", 0, strings); | ||
| 398 | selftest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 399 | strings[0] = NULL; | ||
| 400 | rc = of_property_read_string_index(np, "unterminated-string-list", 2, strings); /* should fail */ | ||
| 401 | selftest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", rc); | ||
| 402 | strings[1] = NULL; | ||
| 403 | |||
| 404 | /* of_property_read_string_array() tests */ | ||
| 405 | rc = of_property_read_string_array(np, "string-property", strings, 4); | ||
| 406 | selftest(rc == 1, "Incorrect string count; rc=%i\n", rc); | ||
| 407 | rc = of_property_read_string_array(np, "phandle-list-names", strings, 4); | ||
| 408 | selftest(rc == 3, "Incorrect string count; rc=%i\n", rc); | ||
| 409 | rc = of_property_read_string_array(np, "unterminated-string", strings, 4); | ||
| 410 | selftest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); | ||
| 411 | /* -- An incorrectly formed string should cause a failure */ | ||
| 412 | rc = of_property_read_string_array(np, "unterminated-string-list", strings, 4); | ||
| 413 | selftest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); | ||
| 414 | /* -- parsing the correctly formed strings should still work: */ | ||
| 415 | strings[2] = NULL; | ||
| 416 | rc = of_property_read_string_array(np, "unterminated-string-list", strings, 2); | ||
| 417 | selftest(rc == 2 && strings[2] == NULL, "of_property_read_string_array() failure; rc=%i\n", rc); | ||
| 418 | strings[1] = NULL; | ||
| 419 | rc = of_property_read_string_array(np, "phandle-list-names", strings, 1); | ||
| 420 | selftest(rc == 1 && strings[1] == NULL, "Overwrote end of string array; rc=%i, str='%s'\n", rc, strings[1]); | ||
| 367 | } | 421 | } |
| 368 | 422 | ||
| 369 | #define propcmp(p1, p2) (((p1)->length == (p2)->length) && \ | 423 | #define propcmp(p1, p2) (((p1)->length == (p2)->length) && \ |
| @@ -881,7 +935,7 @@ static int __init of_selftest(void) | |||
| 881 | of_selftest_find_node_by_name(); | 935 | of_selftest_find_node_by_name(); |
| 882 | of_selftest_dynamic(); | 936 | of_selftest_dynamic(); |
| 883 | of_selftest_parse_phandle_with_args(); | 937 | of_selftest_parse_phandle_with_args(); |
| 884 | of_selftest_property_match_string(); | 938 | of_selftest_property_string(); |
| 885 | of_selftest_property_copy(); | 939 | of_selftest_property_copy(); |
| 886 | of_selftest_changeset(); | 940 | of_selftest_changeset(); |
| 887 | of_selftest_parse_interrupts(); | 941 | of_selftest_parse_interrupts(); |
diff --git a/drivers/of/testcase-data/tests-phandle.dtsi b/drivers/of/testcase-data/tests-phandle.dtsi index ce0fe083d406..5b1527e8a7fb 100644 --- a/drivers/of/testcase-data/tests-phandle.dtsi +++ b/drivers/of/testcase-data/tests-phandle.dtsi | |||
| @@ -39,7 +39,9 @@ | |||
| 39 | phandle-list-bad-args = <&provider2 1 0>, | 39 | phandle-list-bad-args = <&provider2 1 0>, |
| 40 | <&provider3 0>; | 40 | <&provider3 0>; |
| 41 | empty-property; | 41 | empty-property; |
| 42 | string-property = "foobar"; | ||
| 42 | unterminated-string = [40 41 42 43]; | 43 | unterminated-string = [40 41 42 43]; |
| 44 | unterminated-string-list = "first", "second", [40 41 42 43]; | ||
| 43 | }; | 45 | }; |
| 44 | }; | 46 | }; |
| 45 | }; | 47 | }; |
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 8c842980834a..f091576b6449 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c | |||
| @@ -258,14 +258,16 @@ static int omap_usb2_probe(struct platform_device *pdev) | |||
| 258 | otg->phy = &phy->phy; | 258 | otg->phy = &phy->phy; |
| 259 | 259 | ||
| 260 | platform_set_drvdata(pdev, phy); | 260 | platform_set_drvdata(pdev, phy); |
| 261 | pm_runtime_enable(phy->dev); | ||
| 261 | 262 | ||
| 262 | generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); | 263 | generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); |
| 263 | if (IS_ERR(generic_phy)) | 264 | if (IS_ERR(generic_phy)) { |
| 265 | pm_runtime_disable(phy->dev); | ||
| 264 | return PTR_ERR(generic_phy); | 266 | return PTR_ERR(generic_phy); |
| 267 | } | ||
| 265 | 268 | ||
| 266 | phy_set_drvdata(generic_phy, phy); | 269 | phy_set_drvdata(generic_phy, phy); |
| 267 | 270 | ||
| 268 | pm_runtime_enable(phy->dev); | ||
| 269 | phy_provider = devm_of_phy_provider_register(phy->dev, | 271 | phy_provider = devm_of_phy_provider_register(phy->dev, |
| 270 | of_phy_simple_xlate); | 272 | of_phy_simple_xlate); |
| 271 | if (IS_ERR(phy_provider)) { | 273 | if (IS_ERR(phy_provider)) { |
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c index e12e5b07f6d7..9dc38140194b 100644 --- a/drivers/pinctrl/pinctrl-baytrail.c +++ b/drivers/pinctrl/pinctrl-baytrail.c | |||
| @@ -227,10 +227,14 @@ static int byt_irq_type(struct irq_data *d, unsigned type) | |||
| 227 | spin_lock_irqsave(&vg->lock, flags); | 227 | spin_lock_irqsave(&vg->lock, flags); |
| 228 | value = readl(reg); | 228 | value = readl(reg); |
| 229 | 229 | ||
| 230 | WARN(value & BYT_DIRECT_IRQ_EN, | ||
| 231 | "Bad pad config for io mode, force direct_irq_en bit clearing"); | ||
| 232 | |||
| 230 | /* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits | 233 | /* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits |
| 231 | * are used to indicate high and low level triggering | 234 | * are used to indicate high and low level triggering |
| 232 | */ | 235 | */ |
| 233 | value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL); | 236 | value &= ~(BYT_DIRECT_IRQ_EN | BYT_TRIG_POS | BYT_TRIG_NEG | |
| 237 | BYT_TRIG_LVL); | ||
| 234 | 238 | ||
| 235 | switch (type) { | 239 | switch (type) { |
| 236 | case IRQ_TYPE_LEVEL_HIGH: | 240 | case IRQ_TYPE_LEVEL_HIGH: |
| @@ -318,7 +322,7 @@ static int byt_gpio_direction_output(struct gpio_chip *chip, | |||
| 318 | "Potential Error: Setting GPIO with direct_irq_en to output"); | 322 | "Potential Error: Setting GPIO with direct_irq_en to output"); |
| 319 | 323 | ||
| 320 | reg_val = readl(reg) | BYT_DIR_MASK; | 324 | reg_val = readl(reg) | BYT_DIR_MASK; |
| 321 | reg_val &= ~BYT_OUTPUT_EN; | 325 | reg_val &= ~(BYT_OUTPUT_EN | BYT_INPUT_EN); |
| 322 | 326 | ||
| 323 | if (value) | 327 | if (value) |
| 324 | writel(reg_val | BYT_LEVEL, reg); | 328 | writel(reg_val | BYT_LEVEL, reg); |
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 96a0b75c52c9..26c4fd1394da 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
| @@ -579,6 +579,17 @@ static const struct dmi_system_id video_vendor_dmi_table[] __initconst = { | |||
| 579 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5741"), | 579 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5741"), |
| 580 | }, | 580 | }, |
| 581 | }, | 581 | }, |
| 582 | { | ||
| 583 | /* | ||
| 584 | * Note no video_set_backlight_video_vendor, we must use the | ||
| 585 | * acer interface, as there is no native backlight interface. | ||
| 586 | */ | ||
| 587 | .ident = "Acer KAV80", | ||
| 588 | .matches = { | ||
| 589 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
| 590 | DMI_MATCH(DMI_PRODUCT_NAME, "KAV80"), | ||
| 591 | }, | ||
| 592 | }, | ||
| 582 | {} | 593 | {} |
| 583 | }; | 594 | }; |
| 584 | 595 | ||
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index 3a4951f46065..c1a6cd66af42 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c | |||
| @@ -182,6 +182,15 @@ static const struct dmi_system_id asus_quirks[] = { | |||
| 182 | }, | 182 | }, |
| 183 | { | 183 | { |
| 184 | .callback = dmi_matched, | 184 | .callback = dmi_matched, |
| 185 | .ident = "ASUSTeK COMPUTER INC. X550VB", | ||
| 186 | .matches = { | ||
| 187 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | ||
| 188 | DMI_MATCH(DMI_PRODUCT_NAME, "X550VB"), | ||
| 189 | }, | ||
| 190 | .driver_data = &quirk_asus_wapf4, | ||
| 191 | }, | ||
| 192 | { | ||
| 193 | .callback = dmi_matched, | ||
| 185 | .ident = "ASUSTeK COMPUTER INC. X55A", | 194 | .ident = "ASUSTeK COMPUTER INC. X55A", |
| 186 | .matches = { | 195 | .matches = { |
| 187 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 196 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 02152de135b5..ed494f37c40f 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
| @@ -837,6 +837,13 @@ static const struct dmi_system_id no_hw_rfkill_list[] = { | |||
| 837 | DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2"), | 837 | DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2"), |
| 838 | }, | 838 | }, |
| 839 | }, | 839 | }, |
| 840 | { | ||
| 841 | .ident = "Lenovo Yoga 3 Pro 1370", | ||
| 842 | .matches = { | ||
| 843 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
| 844 | DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 3 Pro-1370"), | ||
| 845 | }, | ||
| 846 | }, | ||
| 840 | {} | 847 | {} |
| 841 | }; | 848 | }; |
| 842 | 849 | ||
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 5a5966512277..ff765d8e1a09 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c | |||
| @@ -1561,6 +1561,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { | |||
| 1561 | }, | 1561 | }, |
| 1562 | { | 1562 | { |
| 1563 | .callback = samsung_dmi_matched, | 1563 | .callback = samsung_dmi_matched, |
| 1564 | .ident = "NC210", | ||
| 1565 | .matches = { | ||
| 1566 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
| 1567 | DMI_MATCH(DMI_PRODUCT_NAME, "NC210/NC110"), | ||
| 1568 | DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"), | ||
| 1569 | }, | ||
| 1570 | .driver_data = &samsung_broken_acpi_video, | ||
| 1571 | }, | ||
| 1572 | { | ||
| 1573 | .callback = samsung_dmi_matched, | ||
| 1564 | .ident = "730U3E/740U3E", | 1574 | .ident = "730U3E/740U3E", |
| 1565 | .matches = { | 1575 | .matches = { |
| 1566 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | 1576 | DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), |
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index ef3a1904e92f..ab6151f05420 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
| @@ -240,6 +240,12 @@ static const struct dmi_system_id toshiba_alt_keymap_dmi[] = { | |||
| 240 | DMI_MATCH(DMI_PRODUCT_NAME, "Qosmio X75-A"), | 240 | DMI_MATCH(DMI_PRODUCT_NAME, "Qosmio X75-A"), |
| 241 | }, | 241 | }, |
| 242 | }, | 242 | }, |
| 243 | { | ||
| 244 | .matches = { | ||
| 245 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
| 246 | DMI_MATCH(DMI_PRODUCT_NAME, "TECRA A50-A"), | ||
| 247 | }, | ||
| 248 | }, | ||
| 243 | {} | 249 | {} |
| 244 | }; | 250 | }; |
| 245 | 251 | ||
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index 86db310d5304..d2a8c64cae42 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c | |||
| @@ -163,7 +163,7 @@ static int of_get_max1586_platform_data(struct device *dev, | |||
| 163 | struct max1586_platform_data *pdata) | 163 | struct max1586_platform_data *pdata) |
| 164 | { | 164 | { |
| 165 | struct max1586_subdev_data *sub; | 165 | struct max1586_subdev_data *sub; |
| 166 | struct of_regulator_match rmatch[ARRAY_SIZE(max1586_reg)]; | 166 | struct of_regulator_match rmatch[ARRAY_SIZE(max1586_reg)] = { }; |
| 167 | struct device_node *np = dev->of_node; | 167 | struct device_node *np = dev->of_node; |
| 168 | int i, matched; | 168 | int i, matched; |
| 169 | 169 | ||
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index ef1af2debbd2..f69320e1738f 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c | |||
| @@ -395,7 +395,7 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev, | |||
| 395 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); | 395 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 396 | struct device_node *pmic_np, *regulators_np; | 396 | struct device_node *pmic_np, *regulators_np; |
| 397 | struct max77686_regulator_data *rdata; | 397 | struct max77686_regulator_data *rdata; |
| 398 | struct of_regulator_match rmatch; | 398 | struct of_regulator_match rmatch = { }; |
| 399 | unsigned int i; | 399 | unsigned int i; |
| 400 | 400 | ||
| 401 | pmic_np = iodev->dev->of_node; | 401 | pmic_np = iodev->dev->of_node; |
diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c index c67ff05fc1dd..d158f71fa128 100644 --- a/drivers/regulator/max77693.c +++ b/drivers/regulator/max77693.c | |||
| @@ -227,7 +227,7 @@ static int max77693_pmic_probe(struct platform_device *pdev) | |||
| 227 | struct max77693_dev *iodev = dev_get_drvdata(pdev->dev.parent); | 227 | struct max77693_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 228 | struct max77693_regulator_data *rdata = NULL; | 228 | struct max77693_regulator_data *rdata = NULL; |
| 229 | int num_rdata, i; | 229 | int num_rdata, i; |
| 230 | struct regulator_config config; | 230 | struct regulator_config config = { }; |
| 231 | 231 | ||
| 232 | num_rdata = max77693_pmic_init_rdata(&pdev->dev, &rdata); | 232 | num_rdata = max77693_pmic_init_rdata(&pdev->dev, &rdata); |
| 233 | if (!rdata || num_rdata <= 0) { | 233 | if (!rdata || num_rdata <= 0) { |
diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c index d89792b084e9..45fa240fe243 100644 --- a/drivers/regulator/max77802.c +++ b/drivers/regulator/max77802.c | |||
| @@ -454,7 +454,7 @@ static int max77802_pmic_dt_parse_pdata(struct platform_device *pdev, | |||
| 454 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); | 454 | struct max77686_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 455 | struct device_node *pmic_np, *regulators_np; | 455 | struct device_node *pmic_np, *regulators_np; |
| 456 | struct max77686_regulator_data *rdata; | 456 | struct max77686_regulator_data *rdata; |
| 457 | struct of_regulator_match rmatch; | 457 | struct of_regulator_match rmatch = { }; |
| 458 | unsigned int i; | 458 | unsigned int i; |
| 459 | 459 | ||
| 460 | pmic_np = iodev->dev->of_node; | 460 | pmic_np = iodev->dev->of_node; |
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index 2fc411188794..7eee2ca18541 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c | |||
| @@ -335,7 +335,7 @@ static int max8660_pdata_from_dt(struct device *dev, | |||
| 335 | int matched, i; | 335 | int matched, i; |
| 336 | struct device_node *np; | 336 | struct device_node *np; |
| 337 | struct max8660_subdev_data *sub; | 337 | struct max8660_subdev_data *sub; |
| 338 | struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)]; | 338 | struct of_regulator_match rmatch[ARRAY_SIZE(max8660_reg)] = { }; |
| 339 | 339 | ||
| 340 | np = of_get_child_by_name(dev->of_node, "regulators"); | 340 | np = of_get_child_by_name(dev->of_node, "regulators"); |
| 341 | if (!np) { | 341 | if (!np) { |
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 7a51814abdc5..5a1d4afa4776 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c | |||
| @@ -211,7 +211,8 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev, | |||
| 211 | search = dev->of_node; | 211 | search = dev->of_node; |
| 212 | 212 | ||
| 213 | if (!search) { | 213 | if (!search) { |
| 214 | dev_err(dev, "Failed to find regulator container node\n"); | 214 | dev_dbg(dev, "Failed to find regulator container node '%s'\n", |
| 215 | desc->regulators_node); | ||
| 215 | return NULL; | 216 | return NULL; |
| 216 | } | 217 | } |
| 217 | 218 | ||
diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c index 4acefa6b462e..7633b9bfbe6e 100644 --- a/drivers/regulator/s2mpa01.c +++ b/drivers/regulator/s2mpa01.c | |||
| @@ -341,7 +341,7 @@ static int s2mpa01_pmic_probe(struct platform_device *pdev) | |||
| 341 | { | 341 | { |
| 342 | struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); | 342 | struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); |
| 343 | struct sec_platform_data *pdata = dev_get_platdata(iodev->dev); | 343 | struct sec_platform_data *pdata = dev_get_platdata(iodev->dev); |
| 344 | struct of_regulator_match rdata[S2MPA01_REGULATOR_MAX]; | 344 | struct of_regulator_match rdata[S2MPA01_REGULATOR_MAX] = { }; |
| 345 | struct device_node *reg_np = NULL; | 345 | struct device_node *reg_np = NULL; |
| 346 | struct regulator_config config = { }; | 346 | struct regulator_config config = { }; |
| 347 | struct s2mpa01_info *s2mpa01; | 347 | struct s2mpa01_info *s2mpa01; |
diff --git a/drivers/soc/versatile/soc-realview.c b/drivers/soc/versatile/soc-realview.c index cea8ea3491d2..1a07bf540fec 100644 --- a/drivers/soc/versatile/soc-realview.c +++ b/drivers/soc/versatile/soc-realview.c | |||
| @@ -26,6 +26,7 @@ static const struct of_device_id realview_soc_of_match[] = { | |||
| 26 | { .compatible = "arm,realview-pb11mp-soc", }, | 26 | { .compatible = "arm,realview-pb11mp-soc", }, |
| 27 | { .compatible = "arm,realview-pba8-soc", }, | 27 | { .compatible = "arm,realview-pba8-soc", }, |
| 28 | { .compatible = "arm,realview-pbx-soc", }, | 28 | { .compatible = "arm,realview-pbx-soc", }, |
| 29 | { } | ||
| 29 | }; | 30 | }; |
| 30 | 31 | ||
| 31 | static u32 realview_coreid; | 32 | static u32 realview_coreid; |
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 448216025ce8..831ceb4a91f6 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | #define SPI_TCR 0x08 | 47 | #define SPI_TCR 0x08 |
| 48 | 48 | ||
| 49 | #define SPI_CTAR(x) (0x0c + (x * 4)) | 49 | #define SPI_CTAR(x) (0x0c + (((x) & 0x3) * 4)) |
| 50 | #define SPI_CTAR_FMSZ(x) (((x) & 0x0000000f) << 27) | 50 | #define SPI_CTAR_FMSZ(x) (((x) & 0x0000000f) << 27) |
| 51 | #define SPI_CTAR_CPOL(x) ((x) << 26) | 51 | #define SPI_CTAR_CPOL(x) ((x) << 26) |
| 52 | #define SPI_CTAR_CPHA(x) ((x) << 25) | 52 | #define SPI_CTAR_CPHA(x) ((x) << 25) |
| @@ -70,7 +70,7 @@ | |||
| 70 | 70 | ||
| 71 | #define SPI_PUSHR 0x34 | 71 | #define SPI_PUSHR 0x34 |
| 72 | #define SPI_PUSHR_CONT (1 << 31) | 72 | #define SPI_PUSHR_CONT (1 << 31) |
| 73 | #define SPI_PUSHR_CTAS(x) (((x) & 0x00000007) << 28) | 73 | #define SPI_PUSHR_CTAS(x) (((x) & 0x00000003) << 28) |
| 74 | #define SPI_PUSHR_EOQ (1 << 27) | 74 | #define SPI_PUSHR_EOQ (1 << 27) |
| 75 | #define SPI_PUSHR_CTCNT (1 << 26) | 75 | #define SPI_PUSHR_CTCNT (1 << 26) |
| 76 | #define SPI_PUSHR_PCS(x) (((1 << x) & 0x0000003f) << 16) | 76 | #define SPI_PUSHR_PCS(x) (((1 << x) & 0x0000003f) << 16) |
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index d8a105f76837..9e9e0f971e6c 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c | |||
| @@ -1274,7 +1274,9 @@ static int pxa2xx_spi_suspend(struct device *dev) | |||
| 1274 | if (status != 0) | 1274 | if (status != 0) |
| 1275 | return status; | 1275 | return status; |
| 1276 | write_SSCR0(0, drv_data->ioaddr); | 1276 | write_SSCR0(0, drv_data->ioaddr); |
| 1277 | clk_disable_unprepare(ssp->clk); | 1277 | |
| 1278 | if (!pm_runtime_suspended(dev)) | ||
| 1279 | clk_disable_unprepare(ssp->clk); | ||
| 1278 | 1280 | ||
| 1279 | return 0; | 1281 | return 0; |
| 1280 | } | 1282 | } |
| @@ -1288,7 +1290,8 @@ static int pxa2xx_spi_resume(struct device *dev) | |||
| 1288 | pxa2xx_spi_dma_resume(drv_data); | 1290 | pxa2xx_spi_dma_resume(drv_data); |
| 1289 | 1291 | ||
| 1290 | /* Enable the SSP clock */ | 1292 | /* Enable the SSP clock */ |
| 1291 | clk_prepare_enable(ssp->clk); | 1293 | if (!pm_runtime_suspended(dev)) |
| 1294 | clk_prepare_enable(ssp->clk); | ||
| 1292 | 1295 | ||
| 1293 | /* Restore LPSS private register bits */ | 1296 | /* Restore LPSS private register bits */ |
| 1294 | lpss_ssp_setup(drv_data); | 1297 | lpss_ssp_setup(drv_data); |
diff --git a/drivers/staging/iio/meter/ade7758.h b/drivers/staging/iio/meter/ade7758.h index 07318203a836..e8c98cf57070 100644 --- a/drivers/staging/iio/meter/ade7758.h +++ b/drivers/staging/iio/meter/ade7758.h | |||
| @@ -119,7 +119,6 @@ struct ade7758_state { | |||
| 119 | u8 *tx; | 119 | u8 *tx; |
| 120 | u8 *rx; | 120 | u8 *rx; |
| 121 | struct mutex buf_lock; | 121 | struct mutex buf_lock; |
| 122 | const struct iio_chan_spec *ade7758_ring_channels; | ||
| 123 | struct spi_transfer ring_xfer[4]; | 122 | struct spi_transfer ring_xfer[4]; |
| 124 | struct spi_message ring_msg; | 123 | struct spi_message ring_msg; |
| 125 | /* | 124 | /* |
diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c index abc60067cd72..fb373b89dcc2 100644 --- a/drivers/staging/iio/meter/ade7758_core.c +++ b/drivers/staging/iio/meter/ade7758_core.c | |||
| @@ -634,9 +634,6 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 634 | .type = IIO_VOLTAGE, | 634 | .type = IIO_VOLTAGE, |
| 635 | .indexed = 1, | 635 | .indexed = 1, |
| 636 | .channel = 0, | 636 | .channel = 0, |
| 637 | .extend_name = "raw", | ||
| 638 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 639 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 640 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE), | 637 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE), |
| 641 | .scan_index = 0, | 638 | .scan_index = 0, |
| 642 | .scan_type = { | 639 | .scan_type = { |
| @@ -648,9 +645,6 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 648 | .type = IIO_CURRENT, | 645 | .type = IIO_CURRENT, |
| 649 | .indexed = 1, | 646 | .indexed = 1, |
| 650 | .channel = 0, | 647 | .channel = 0, |
| 651 | .extend_name = "raw", | ||
| 652 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 653 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 654 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT), | 648 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT), |
| 655 | .scan_index = 1, | 649 | .scan_index = 1, |
| 656 | .scan_type = { | 650 | .scan_type = { |
| @@ -662,9 +656,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 662 | .type = IIO_POWER, | 656 | .type = IIO_POWER, |
| 663 | .indexed = 1, | 657 | .indexed = 1, |
| 664 | .channel = 0, | 658 | .channel = 0, |
| 665 | .extend_name = "apparent_raw", | 659 | .extend_name = "apparent", |
| 666 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 667 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 668 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR), | 660 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR), |
| 669 | .scan_index = 2, | 661 | .scan_index = 2, |
| 670 | .scan_type = { | 662 | .scan_type = { |
| @@ -676,9 +668,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 676 | .type = IIO_POWER, | 668 | .type = IIO_POWER, |
| 677 | .indexed = 1, | 669 | .indexed = 1, |
| 678 | .channel = 0, | 670 | .channel = 0, |
| 679 | .extend_name = "active_raw", | 671 | .extend_name = "active", |
| 680 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 681 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 682 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR), | 672 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR), |
| 683 | .scan_index = 3, | 673 | .scan_index = 3, |
| 684 | .scan_type = { | 674 | .scan_type = { |
| @@ -690,9 +680,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 690 | .type = IIO_POWER, | 680 | .type = IIO_POWER, |
| 691 | .indexed = 1, | 681 | .indexed = 1, |
| 692 | .channel = 0, | 682 | .channel = 0, |
| 693 | .extend_name = "reactive_raw", | 683 | .extend_name = "reactive", |
| 694 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 695 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 696 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR), | 684 | .address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR), |
| 697 | .scan_index = 4, | 685 | .scan_index = 4, |
| 698 | .scan_type = { | 686 | .scan_type = { |
| @@ -704,9 +692,6 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 704 | .type = IIO_VOLTAGE, | 692 | .type = IIO_VOLTAGE, |
| 705 | .indexed = 1, | 693 | .indexed = 1, |
| 706 | .channel = 1, | 694 | .channel = 1, |
| 707 | .extend_name = "raw", | ||
| 708 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 709 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 710 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE), | 695 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE), |
| 711 | .scan_index = 5, | 696 | .scan_index = 5, |
| 712 | .scan_type = { | 697 | .scan_type = { |
| @@ -718,9 +703,6 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 718 | .type = IIO_CURRENT, | 703 | .type = IIO_CURRENT, |
| 719 | .indexed = 1, | 704 | .indexed = 1, |
| 720 | .channel = 1, | 705 | .channel = 1, |
| 721 | .extend_name = "raw", | ||
| 722 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 723 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 724 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT), | 706 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT), |
| 725 | .scan_index = 6, | 707 | .scan_index = 6, |
| 726 | .scan_type = { | 708 | .scan_type = { |
| @@ -732,9 +714,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 732 | .type = IIO_POWER, | 714 | .type = IIO_POWER, |
| 733 | .indexed = 1, | 715 | .indexed = 1, |
| 734 | .channel = 1, | 716 | .channel = 1, |
| 735 | .extend_name = "apparent_raw", | 717 | .extend_name = "apparent", |
| 736 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 737 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 738 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR), | 718 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR), |
| 739 | .scan_index = 7, | 719 | .scan_index = 7, |
| 740 | .scan_type = { | 720 | .scan_type = { |
| @@ -746,9 +726,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 746 | .type = IIO_POWER, | 726 | .type = IIO_POWER, |
| 747 | .indexed = 1, | 727 | .indexed = 1, |
| 748 | .channel = 1, | 728 | .channel = 1, |
| 749 | .extend_name = "active_raw", | 729 | .extend_name = "active", |
| 750 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 751 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 752 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR), | 730 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR), |
| 753 | .scan_index = 8, | 731 | .scan_index = 8, |
| 754 | .scan_type = { | 732 | .scan_type = { |
| @@ -760,9 +738,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 760 | .type = IIO_POWER, | 738 | .type = IIO_POWER, |
| 761 | .indexed = 1, | 739 | .indexed = 1, |
| 762 | .channel = 1, | 740 | .channel = 1, |
| 763 | .extend_name = "reactive_raw", | 741 | .extend_name = "reactive", |
| 764 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 765 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 766 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR), | 742 | .address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR), |
| 767 | .scan_index = 9, | 743 | .scan_index = 9, |
| 768 | .scan_type = { | 744 | .scan_type = { |
| @@ -774,9 +750,6 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 774 | .type = IIO_VOLTAGE, | 750 | .type = IIO_VOLTAGE, |
| 775 | .indexed = 1, | 751 | .indexed = 1, |
| 776 | .channel = 2, | 752 | .channel = 2, |
| 777 | .extend_name = "raw", | ||
| 778 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 779 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 780 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE), | 753 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE), |
| 781 | .scan_index = 10, | 754 | .scan_index = 10, |
| 782 | .scan_type = { | 755 | .scan_type = { |
| @@ -788,9 +761,6 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 788 | .type = IIO_CURRENT, | 761 | .type = IIO_CURRENT, |
| 789 | .indexed = 1, | 762 | .indexed = 1, |
| 790 | .channel = 2, | 763 | .channel = 2, |
| 791 | .extend_name = "raw", | ||
| 792 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 793 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 794 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT), | 764 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT), |
| 795 | .scan_index = 11, | 765 | .scan_index = 11, |
| 796 | .scan_type = { | 766 | .scan_type = { |
| @@ -802,9 +772,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 802 | .type = IIO_POWER, | 772 | .type = IIO_POWER, |
| 803 | .indexed = 1, | 773 | .indexed = 1, |
| 804 | .channel = 2, | 774 | .channel = 2, |
| 805 | .extend_name = "apparent_raw", | 775 | .extend_name = "apparent", |
| 806 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 807 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 808 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR), | 776 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR), |
| 809 | .scan_index = 12, | 777 | .scan_index = 12, |
| 810 | .scan_type = { | 778 | .scan_type = { |
| @@ -816,9 +784,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 816 | .type = IIO_POWER, | 784 | .type = IIO_POWER, |
| 817 | .indexed = 1, | 785 | .indexed = 1, |
| 818 | .channel = 2, | 786 | .channel = 2, |
| 819 | .extend_name = "active_raw", | 787 | .extend_name = "active", |
| 820 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 821 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 822 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR), | 788 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR), |
| 823 | .scan_index = 13, | 789 | .scan_index = 13, |
| 824 | .scan_type = { | 790 | .scan_type = { |
| @@ -830,9 +796,7 @@ static const struct iio_chan_spec ade7758_channels[] = { | |||
| 830 | .type = IIO_POWER, | 796 | .type = IIO_POWER, |
| 831 | .indexed = 1, | 797 | .indexed = 1, |
| 832 | .channel = 2, | 798 | .channel = 2, |
| 833 | .extend_name = "reactive_raw", | 799 | .extend_name = "reactive", |
| 834 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), | ||
| 835 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), | ||
| 836 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR), | 800 | .address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR), |
| 837 | .scan_index = 14, | 801 | .scan_index = 14, |
| 838 | .scan_type = { | 802 | .scan_type = { |
| @@ -873,13 +837,14 @@ static int ade7758_probe(struct spi_device *spi) | |||
| 873 | goto error_free_rx; | 837 | goto error_free_rx; |
| 874 | } | 838 | } |
| 875 | st->us = spi; | 839 | st->us = spi; |
| 876 | st->ade7758_ring_channels = &ade7758_channels[0]; | ||
| 877 | mutex_init(&st->buf_lock); | 840 | mutex_init(&st->buf_lock); |
| 878 | 841 | ||
| 879 | indio_dev->name = spi->dev.driver->name; | 842 | indio_dev->name = spi->dev.driver->name; |
| 880 | indio_dev->dev.parent = &spi->dev; | 843 | indio_dev->dev.parent = &spi->dev; |
| 881 | indio_dev->info = &ade7758_info; | 844 | indio_dev->info = &ade7758_info; |
| 882 | indio_dev->modes = INDIO_DIRECT_MODE; | 845 | indio_dev->modes = INDIO_DIRECT_MODE; |
| 846 | indio_dev->channels = ade7758_channels; | ||
| 847 | indio_dev->num_channels = ARRAY_SIZE(ade7758_channels); | ||
| 883 | 848 | ||
| 884 | ret = ade7758_configure_ring(indio_dev); | 849 | ret = ade7758_configure_ring(indio_dev); |
| 885 | if (ret) | 850 | if (ret) |
diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c index c0accf8cce93..6e9006490742 100644 --- a/drivers/staging/iio/meter/ade7758_ring.c +++ b/drivers/staging/iio/meter/ade7758_ring.c | |||
| @@ -85,17 +85,16 @@ static irqreturn_t ade7758_trigger_handler(int irq, void *p) | |||
| 85 | **/ | 85 | **/ |
| 86 | static int ade7758_ring_preenable(struct iio_dev *indio_dev) | 86 | static int ade7758_ring_preenable(struct iio_dev *indio_dev) |
| 87 | { | 87 | { |
| 88 | struct ade7758_state *st = iio_priv(indio_dev); | ||
| 89 | unsigned channel; | 88 | unsigned channel; |
| 90 | 89 | ||
| 91 | if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength)) | 90 | if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength)) |
| 92 | return -EINVAL; | 91 | return -EINVAL; |
| 93 | 92 | ||
| 94 | channel = find_first_bit(indio_dev->active_scan_mask, | 93 | channel = find_first_bit(indio_dev->active_scan_mask, |
| 95 | indio_dev->masklength); | 94 | indio_dev->masklength); |
| 96 | 95 | ||
| 97 | ade7758_write_waveform_type(&indio_dev->dev, | 96 | ade7758_write_waveform_type(&indio_dev->dev, |
| 98 | st->ade7758_ring_channels[channel].address); | 97 | indio_dev->channels[channel].address); |
| 99 | 98 | ||
| 100 | return 0; | 99 | return 0; |
| 101 | } | 100 | } |
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index f8eb625b8400..62143ba31001 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c | |||
| @@ -387,15 +387,18 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, | |||
| 387 | int (*get_trend)(void *, long *)) | 387 | int (*get_trend)(void *, long *)) |
| 388 | { | 388 | { |
| 389 | struct device_node *np, *child, *sensor_np; | 389 | struct device_node *np, *child, *sensor_np; |
| 390 | struct thermal_zone_device *tzd = ERR_PTR(-ENODEV); | ||
| 390 | 391 | ||
| 391 | np = of_find_node_by_name(NULL, "thermal-zones"); | 392 | np = of_find_node_by_name(NULL, "thermal-zones"); |
| 392 | if (!np) | 393 | if (!np) |
| 393 | return ERR_PTR(-ENODEV); | 394 | return ERR_PTR(-ENODEV); |
| 394 | 395 | ||
| 395 | if (!dev || !dev->of_node) | 396 | if (!dev || !dev->of_node) { |
| 397 | of_node_put(np); | ||
| 396 | return ERR_PTR(-EINVAL); | 398 | return ERR_PTR(-EINVAL); |
| 399 | } | ||
| 397 | 400 | ||
| 398 | sensor_np = dev->of_node; | 401 | sensor_np = of_node_get(dev->of_node); |
| 399 | 402 | ||
| 400 | for_each_child_of_node(np, child) { | 403 | for_each_child_of_node(np, child) { |
| 401 | struct of_phandle_args sensor_specs; | 404 | struct of_phandle_args sensor_specs; |
| @@ -422,16 +425,21 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, | |||
| 422 | } | 425 | } |
| 423 | 426 | ||
| 424 | if (sensor_specs.np == sensor_np && id == sensor_id) { | 427 | if (sensor_specs.np == sensor_np && id == sensor_id) { |
| 425 | of_node_put(np); | 428 | tzd = thermal_zone_of_add_sensor(child, sensor_np, |
| 426 | return thermal_zone_of_add_sensor(child, sensor_np, | 429 | data, |
| 427 | data, | 430 | get_temp, |
| 428 | get_temp, | 431 | get_trend); |
| 429 | get_trend); | 432 | of_node_put(sensor_specs.np); |
| 433 | of_node_put(child); | ||
| 434 | goto exit; | ||
| 430 | } | 435 | } |
| 436 | of_node_put(sensor_specs.np); | ||
| 431 | } | 437 | } |
| 438 | exit: | ||
| 439 | of_node_put(sensor_np); | ||
| 432 | of_node_put(np); | 440 | of_node_put(np); |
| 433 | 441 | ||
| 434 | return ERR_PTR(-ENODEV); | 442 | return tzd; |
| 435 | } | 443 | } |
| 436 | EXPORT_SYMBOL_GPL(thermal_zone_of_sensor_register); | 444 | EXPORT_SYMBOL_GPL(thermal_zone_of_sensor_register); |
| 437 | 445 | ||
| @@ -623,6 +631,7 @@ static int thermal_of_populate_trip(struct device_node *np, | |||
| 623 | 631 | ||
| 624 | /* Required for cooling map matching */ | 632 | /* Required for cooling map matching */ |
| 625 | trip->np = np; | 633 | trip->np = np; |
| 634 | of_node_get(np); | ||
| 626 | 635 | ||
| 627 | return 0; | 636 | return 0; |
| 628 | } | 637 | } |
| @@ -730,9 +739,14 @@ finish: | |||
| 730 | return tz; | 739 | return tz; |
| 731 | 740 | ||
| 732 | free_tbps: | 741 | free_tbps: |
| 742 | for (i = 0; i < tz->num_tbps; i++) | ||
| 743 | of_node_put(tz->tbps[i].cooling_device); | ||
| 733 | kfree(tz->tbps); | 744 | kfree(tz->tbps); |
| 734 | free_trips: | 745 | free_trips: |
| 746 | for (i = 0; i < tz->ntrips; i++) | ||
| 747 | of_node_put(tz->trips[i].np); | ||
| 735 | kfree(tz->trips); | 748 | kfree(tz->trips); |
| 749 | of_node_put(gchild); | ||
| 736 | free_tz: | 750 | free_tz: |
| 737 | kfree(tz); | 751 | kfree(tz); |
| 738 | of_node_put(child); | 752 | of_node_put(child); |
| @@ -742,7 +756,13 @@ free_tz: | |||
| 742 | 756 | ||
| 743 | static inline void of_thermal_free_zone(struct __thermal_zone *tz) | 757 | static inline void of_thermal_free_zone(struct __thermal_zone *tz) |
| 744 | { | 758 | { |
| 759 | int i; | ||
| 760 | |||
| 761 | for (i = 0; i < tz->num_tbps; i++) | ||
| 762 | of_node_put(tz->tbps[i].cooling_device); | ||
| 745 | kfree(tz->tbps); | 763 | kfree(tz->tbps); |
| 764 | for (i = 0; i < tz->ntrips; i++) | ||
| 765 | of_node_put(tz->trips[i].np); | ||
| 746 | kfree(tz->trips); | 766 | kfree(tz->trips); |
| 747 | kfree(tz); | 767 | kfree(tz); |
| 748 | } | 768 | } |
| @@ -814,10 +834,13 @@ int __init of_parse_thermal_zones(void) | |||
| 814 | /* attempting to build remaining zones still */ | 834 | /* attempting to build remaining zones still */ |
| 815 | } | 835 | } |
| 816 | } | 836 | } |
| 837 | of_node_put(np); | ||
| 817 | 838 | ||
| 818 | return 0; | 839 | return 0; |
| 819 | 840 | ||
| 820 | exit_free: | 841 | exit_free: |
| 842 | of_node_put(child); | ||
| 843 | of_node_put(np); | ||
| 821 | of_thermal_free_zone(tz); | 844 | of_thermal_free_zone(tz); |
| 822 | 845 | ||
| 823 | /* no memory available, so free what we have built */ | 846 | /* no memory available, so free what we have built */ |
| @@ -859,4 +882,5 @@ void of_thermal_destroy_zones(void) | |||
| 859 | kfree(zone->ops); | 882 | kfree(zone->ops); |
| 860 | of_thermal_free_zone(zone->devdata); | 883 | of_thermal_free_zone(zone->devdata); |
| 861 | } | 884 | } |
| 885 | of_node_put(np); | ||
| 862 | } | 886 | } |
diff --git a/drivers/thermal/samsung/exynos_thermal_common.h b/drivers/thermal/samsung/exynos_thermal_common.h index 3eb2ed9ea3a4..158f5aa8dc5d 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.h +++ b/drivers/thermal/samsung/exynos_thermal_common.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #define SENSOR_NAME_LEN 16 | 27 | #define SENSOR_NAME_LEN 16 |
| 28 | #define MAX_TRIP_COUNT 8 | 28 | #define MAX_TRIP_COUNT 8 |
| 29 | #define MAX_COOLING_DEVICE 4 | 29 | #define MAX_COOLING_DEVICE 4 |
| 30 | #define MAX_THRESHOLD_LEVS 5 | 30 | #define MAX_TRIMINFO_CTRL_REG 2 |
| 31 | 31 | ||
| 32 | #define ACTIVE_INTERVAL 500 | 32 | #define ACTIVE_INTERVAL 500 |
| 33 | #define IDLE_INTERVAL 10000 | 33 | #define IDLE_INTERVAL 10000 |
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index acbff14da3a4..49c09243fd38 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c | |||
| @@ -77,16 +77,6 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp) | |||
| 77 | struct exynos_tmu_platform_data *pdata = data->pdata; | 77 | struct exynos_tmu_platform_data *pdata = data->pdata; |
| 78 | int temp_code; | 78 | int temp_code; |
| 79 | 79 | ||
| 80 | if (pdata->cal_mode == HW_MODE) | ||
| 81 | return temp; | ||
| 82 | |||
| 83 | if (data->soc == SOC_ARCH_EXYNOS4210) | ||
| 84 | /* temp should range between 25 and 125 */ | ||
| 85 | if (temp < 25 || temp > 125) { | ||
| 86 | temp_code = -EINVAL; | ||
| 87 | goto out; | ||
| 88 | } | ||
| 89 | |||
| 90 | switch (pdata->cal_type) { | 80 | switch (pdata->cal_type) { |
| 91 | case TYPE_TWO_POINT_TRIMMING: | 81 | case TYPE_TWO_POINT_TRIMMING: |
| 92 | temp_code = (temp - pdata->first_point_trim) * | 82 | temp_code = (temp - pdata->first_point_trim) * |
| @@ -101,7 +91,7 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp) | |||
| 101 | temp_code = temp + pdata->default_temp_offset; | 91 | temp_code = temp + pdata->default_temp_offset; |
| 102 | break; | 92 | break; |
| 103 | } | 93 | } |
| 104 | out: | 94 | |
| 105 | return temp_code; | 95 | return temp_code; |
| 106 | } | 96 | } |
| 107 | 97 | ||
| @@ -114,16 +104,6 @@ static int code_to_temp(struct exynos_tmu_data *data, u8 temp_code) | |||
| 114 | struct exynos_tmu_platform_data *pdata = data->pdata; | 104 | struct exynos_tmu_platform_data *pdata = data->pdata; |
| 115 | int temp; | 105 | int temp; |
| 116 | 106 | ||
| 117 | if (pdata->cal_mode == HW_MODE) | ||
| 118 | return temp_code; | ||
| 119 | |||
| 120 | if (data->soc == SOC_ARCH_EXYNOS4210) | ||
| 121 | /* temp_code should range between 75 and 175 */ | ||
| 122 | if (temp_code < 75 || temp_code > 175) { | ||
| 123 | temp = -ENODATA; | ||
| 124 | goto out; | ||
| 125 | } | ||
| 126 | |||
| 127 | switch (pdata->cal_type) { | 107 | switch (pdata->cal_type) { |
| 128 | case TYPE_TWO_POINT_TRIMMING: | 108 | case TYPE_TWO_POINT_TRIMMING: |
| 129 | temp = (temp_code - data->temp_error1) * | 109 | temp = (temp_code - data->temp_error1) * |
| @@ -138,18 +118,35 @@ static int code_to_temp(struct exynos_tmu_data *data, u8 temp_code) | |||
| 138 | temp = temp_code - pdata->default_temp_offset; | 118 | temp = temp_code - pdata->default_temp_offset; |
| 139 | break; | 119 | break; |
| 140 | } | 120 | } |
| 141 | out: | 121 | |
| 142 | return temp; | 122 | return temp; |
| 143 | } | 123 | } |
| 144 | 124 | ||
| 125 | static void exynos_tmu_clear_irqs(struct exynos_tmu_data *data) | ||
| 126 | { | ||
| 127 | const struct exynos_tmu_registers *reg = data->pdata->registers; | ||
| 128 | unsigned int val_irq; | ||
| 129 | |||
| 130 | val_irq = readl(data->base + reg->tmu_intstat); | ||
| 131 | /* | ||
| 132 | * Clear the interrupts. Please note that the documentation for | ||
| 133 | * Exynos3250, Exynos4412, Exynos5250 and Exynos5260 incorrectly | ||
| 134 | * states that INTCLEAR register has a different placing of bits | ||
| 135 | * responsible for FALL IRQs than INTSTAT register. Exynos5420 | ||
| 136 | * and Exynos5440 documentation is correct (Exynos4210 doesn't | ||
| 137 | * support FALL IRQs at all). | ||
| 138 | */ | ||
| 139 | writel(val_irq, data->base + reg->tmu_intclear); | ||
| 140 | } | ||
| 141 | |||
| 145 | static int exynos_tmu_initialize(struct platform_device *pdev) | 142 | static int exynos_tmu_initialize(struct platform_device *pdev) |
| 146 | { | 143 | { |
| 147 | struct exynos_tmu_data *data = platform_get_drvdata(pdev); | 144 | struct exynos_tmu_data *data = platform_get_drvdata(pdev); |
| 148 | struct exynos_tmu_platform_data *pdata = data->pdata; | 145 | struct exynos_tmu_platform_data *pdata = data->pdata; |
| 149 | const struct exynos_tmu_registers *reg = pdata->registers; | 146 | const struct exynos_tmu_registers *reg = pdata->registers; |
| 150 | unsigned int status, trim_info = 0, con; | 147 | unsigned int status, trim_info = 0, con, ctrl; |
| 151 | unsigned int rising_threshold = 0, falling_threshold = 0; | 148 | unsigned int rising_threshold = 0, falling_threshold = 0; |
| 152 | int ret = 0, threshold_code, i, trigger_levs = 0; | 149 | int ret = 0, threshold_code, i; |
| 153 | 150 | ||
| 154 | mutex_lock(&data->lock); | 151 | mutex_lock(&data->lock); |
| 155 | clk_enable(data->clk); | 152 | clk_enable(data->clk); |
| @@ -164,11 +161,17 @@ static int exynos_tmu_initialize(struct platform_device *pdev) | |||
| 164 | } | 161 | } |
| 165 | } | 162 | } |
| 166 | 163 | ||
| 167 | if (TMU_SUPPORTS(pdata, TRIM_RELOAD)) | 164 | if (TMU_SUPPORTS(pdata, TRIM_RELOAD)) { |
| 168 | __raw_writel(1, data->base + reg->triminfo_ctrl); | 165 | for (i = 0; i < reg->triminfo_ctrl_count; i++) { |
| 169 | 166 | if (pdata->triminfo_reload[i]) { | |
| 170 | if (pdata->cal_mode == HW_MODE) | 167 | ctrl = readl(data->base + |
| 171 | goto skip_calib_data; | 168 | reg->triminfo_ctrl[i]); |
| 169 | ctrl |= pdata->triminfo_reload[i]; | ||
| 170 | writel(ctrl, data->base + | ||
| 171 | reg->triminfo_ctrl[i]); | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
| 172 | 175 | ||
| 173 | /* Save trimming info in order to perform calibration */ | 176 | /* Save trimming info in order to perform calibration */ |
| 174 | if (data->soc == SOC_ARCH_EXYNOS5440) { | 177 | if (data->soc == SOC_ARCH_EXYNOS5440) { |
| @@ -197,7 +200,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev) | |||
| 197 | trim_info = readl(data->base + reg->triminfo_data); | 200 | trim_info = readl(data->base + reg->triminfo_data); |
| 198 | } | 201 | } |
| 199 | data->temp_error1 = trim_info & EXYNOS_TMU_TEMP_MASK; | 202 | data->temp_error1 = trim_info & EXYNOS_TMU_TEMP_MASK; |
| 200 | data->temp_error2 = ((trim_info >> reg->triminfo_85_shift) & | 203 | data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) & |
| 201 | EXYNOS_TMU_TEMP_MASK); | 204 | EXYNOS_TMU_TEMP_MASK); |
| 202 | 205 | ||
| 203 | if (!data->temp_error1 || | 206 | if (!data->temp_error1 || |
| @@ -207,67 +210,33 @@ static int exynos_tmu_initialize(struct platform_device *pdev) | |||
| 207 | 210 | ||
| 208 | if (!data->temp_error2) | 211 | if (!data->temp_error2) |
| 209 | data->temp_error2 = | 212 | data->temp_error2 = |
| 210 | (pdata->efuse_value >> reg->triminfo_85_shift) & | 213 | (pdata->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & |
| 211 | EXYNOS_TMU_TEMP_MASK; | 214 | EXYNOS_TMU_TEMP_MASK; |
| 212 | 215 | ||
| 213 | skip_calib_data: | ||
| 214 | if (pdata->max_trigger_level > MAX_THRESHOLD_LEVS) { | ||
| 215 | dev_err(&pdev->dev, "Invalid max trigger level\n"); | ||
| 216 | ret = -EINVAL; | ||
| 217 | goto out; | ||
| 218 | } | ||
| 219 | |||
| 220 | for (i = 0; i < pdata->max_trigger_level; i++) { | ||
| 221 | if (!pdata->trigger_levels[i]) | ||
| 222 | continue; | ||
| 223 | |||
| 224 | if ((pdata->trigger_type[i] == HW_TRIP) && | ||
| 225 | (!pdata->trigger_levels[pdata->max_trigger_level - 1])) { | ||
| 226 | dev_err(&pdev->dev, "Invalid hw trigger level\n"); | ||
| 227 | ret = -EINVAL; | ||
| 228 | goto out; | ||
| 229 | } | ||
| 230 | |||
| 231 | /* Count trigger levels except the HW trip*/ | ||
| 232 | if (!(pdata->trigger_type[i] == HW_TRIP)) | ||
| 233 | trigger_levs++; | ||
| 234 | } | ||
| 235 | |||
| 236 | rising_threshold = readl(data->base + reg->threshold_th0); | 216 | rising_threshold = readl(data->base + reg->threshold_th0); |
| 237 | 217 | ||
| 238 | if (data->soc == SOC_ARCH_EXYNOS4210) { | 218 | if (data->soc == SOC_ARCH_EXYNOS4210) { |
| 239 | /* Write temperature code for threshold */ | 219 | /* Write temperature code for threshold */ |
| 240 | threshold_code = temp_to_code(data, pdata->threshold); | 220 | threshold_code = temp_to_code(data, pdata->threshold); |
| 241 | if (threshold_code < 0) { | ||
| 242 | ret = threshold_code; | ||
| 243 | goto out; | ||
| 244 | } | ||
| 245 | writeb(threshold_code, | 221 | writeb(threshold_code, |
| 246 | data->base + reg->threshold_temp); | 222 | data->base + reg->threshold_temp); |
| 247 | for (i = 0; i < trigger_levs; i++) | 223 | for (i = 0; i < pdata->non_hw_trigger_levels; i++) |
| 248 | writeb(pdata->trigger_levels[i], data->base + | 224 | writeb(pdata->trigger_levels[i], data->base + |
| 249 | reg->threshold_th0 + i * sizeof(reg->threshold_th0)); | 225 | reg->threshold_th0 + i * sizeof(reg->threshold_th0)); |
| 250 | 226 | ||
| 251 | writel(reg->intclr_rise_mask, data->base + reg->tmu_intclear); | 227 | exynos_tmu_clear_irqs(data); |
| 252 | } else { | 228 | } else { |
| 253 | /* Write temperature code for rising and falling threshold */ | 229 | /* Write temperature code for rising and falling threshold */ |
| 254 | for (i = 0; | 230 | for (i = 0; i < pdata->non_hw_trigger_levels; i++) { |
| 255 | i < trigger_levs && i < EXYNOS_MAX_TRIGGER_PER_REG; i++) { | ||
| 256 | threshold_code = temp_to_code(data, | 231 | threshold_code = temp_to_code(data, |
| 257 | pdata->trigger_levels[i]); | 232 | pdata->trigger_levels[i]); |
| 258 | if (threshold_code < 0) { | ||
| 259 | ret = threshold_code; | ||
| 260 | goto out; | ||
| 261 | } | ||
| 262 | rising_threshold &= ~(0xff << 8 * i); | 233 | rising_threshold &= ~(0xff << 8 * i); |
| 263 | rising_threshold |= threshold_code << 8 * i; | 234 | rising_threshold |= threshold_code << 8 * i; |
| 264 | if (pdata->threshold_falling) { | 235 | if (pdata->threshold_falling) { |
| 265 | threshold_code = temp_to_code(data, | 236 | threshold_code = temp_to_code(data, |
| 266 | pdata->trigger_levels[i] - | 237 | pdata->trigger_levels[i] - |
| 267 | pdata->threshold_falling); | 238 | pdata->threshold_falling); |
| 268 | if (threshold_code > 0) | 239 | falling_threshold |= threshold_code << 8 * i; |
| 269 | falling_threshold |= | ||
| 270 | threshold_code << 8 * i; | ||
| 271 | } | 240 | } |
| 272 | } | 241 | } |
| 273 | 242 | ||
| @@ -276,9 +245,7 @@ skip_calib_data: | |||
| 276 | writel(falling_threshold, | 245 | writel(falling_threshold, |
| 277 | data->base + reg->threshold_th1); | 246 | data->base + reg->threshold_th1); |
| 278 | 247 | ||
| 279 | writel((reg->intclr_rise_mask << reg->intclr_rise_shift) | | 248 | exynos_tmu_clear_irqs(data); |
| 280 | (reg->intclr_fall_mask << reg->intclr_fall_shift), | ||
| 281 | data->base + reg->tmu_intclear); | ||
| 282 | 249 | ||
| 283 | /* if last threshold limit is also present */ | 250 | /* if last threshold limit is also present */ |
| 284 | i = pdata->max_trigger_level - 1; | 251 | i = pdata->max_trigger_level - 1; |
| @@ -286,10 +253,6 @@ skip_calib_data: | |||
| 286 | (pdata->trigger_type[i] == HW_TRIP)) { | 253 | (pdata->trigger_type[i] == HW_TRIP)) { |
| 287 | threshold_code = temp_to_code(data, | 254 | threshold_code = temp_to_code(data, |
| 288 | pdata->trigger_levels[i]); | 255 | pdata->trigger_levels[i]); |
| 289 | if (threshold_code < 0) { | ||
| 290 | ret = threshold_code; | ||
| 291 | goto out; | ||
| 292 | } | ||
| 293 | if (i == EXYNOS_MAX_TRIGGER_PER_REG - 1) { | 256 | if (i == EXYNOS_MAX_TRIGGER_PER_REG - 1) { |
| 294 | /* 1-4 level to be assigned in th0 reg */ | 257 | /* 1-4 level to be assigned in th0 reg */ |
| 295 | rising_threshold &= ~(0xff << 8 * i); | 258 | rising_threshold &= ~(0xff << 8 * i); |
| @@ -325,7 +288,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) | |||
| 325 | struct exynos_tmu_data *data = platform_get_drvdata(pdev); | 288 | struct exynos_tmu_data *data = platform_get_drvdata(pdev); |
| 326 | struct exynos_tmu_platform_data *pdata = data->pdata; | 289 | struct exynos_tmu_platform_data *pdata = data->pdata; |
| 327 | const struct exynos_tmu_registers *reg = pdata->registers; | 290 | const struct exynos_tmu_registers *reg = pdata->registers; |
| 328 | unsigned int con, interrupt_en, cal_val; | 291 | unsigned int con, interrupt_en; |
| 329 | 292 | ||
| 330 | mutex_lock(&data->lock); | 293 | mutex_lock(&data->lock); |
| 331 | clk_enable(data->clk); | 294 | clk_enable(data->clk); |
| @@ -335,15 +298,11 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) | |||
| 335 | if (pdata->test_mux) | 298 | if (pdata->test_mux) |
| 336 | con |= (pdata->test_mux << reg->test_mux_addr_shift); | 299 | con |= (pdata->test_mux << reg->test_mux_addr_shift); |
| 337 | 300 | ||
| 338 | if (pdata->reference_voltage) { | 301 | con &= ~(EXYNOS_TMU_REF_VOLTAGE_MASK << EXYNOS_TMU_REF_VOLTAGE_SHIFT); |
| 339 | con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift); | 302 | con |= pdata->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT; |
| 340 | con |= pdata->reference_voltage << reg->buf_vref_sel_shift; | ||
| 341 | } | ||
| 342 | 303 | ||
| 343 | if (pdata->gain) { | 304 | con &= ~(EXYNOS_TMU_BUF_SLOPE_SEL_MASK << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); |
| 344 | con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift); | 305 | con |= (pdata->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); |
| 345 | con |= (pdata->gain << reg->buf_slope_sel_shift); | ||
| 346 | } | ||
| 347 | 306 | ||
| 348 | if (pdata->noise_cancel_mode) { | 307 | if (pdata->noise_cancel_mode) { |
| 349 | con &= ~(reg->therm_trip_mode_mask << | 308 | con &= ~(reg->therm_trip_mode_mask << |
| @@ -351,29 +310,8 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) | |||
| 351 | con |= (pdata->noise_cancel_mode << reg->therm_trip_mode_shift); | 310 | con |= (pdata->noise_cancel_mode << reg->therm_trip_mode_shift); |
| 352 | } | 311 | } |
| 353 | 312 | ||
| 354 | if (pdata->cal_mode == HW_MODE) { | ||
| 355 | con &= ~(reg->calib_mode_mask << reg->calib_mode_shift); | ||
| 356 | cal_val = 0; | ||
| 357 | switch (pdata->cal_type) { | ||
| 358 | case TYPE_TWO_POINT_TRIMMING: | ||
| 359 | cal_val = 3; | ||
| 360 | break; | ||
| 361 | case TYPE_ONE_POINT_TRIMMING_85: | ||
| 362 | cal_val = 2; | ||
| 363 | break; | ||
| 364 | case TYPE_ONE_POINT_TRIMMING_25: | ||
| 365 | cal_val = 1; | ||
| 366 | break; | ||
| 367 | case TYPE_NONE: | ||
| 368 | break; | ||
| 369 | default: | ||
| 370 | dev_err(&pdev->dev, "Invalid calibration type, using none\n"); | ||
| 371 | } | ||
| 372 | con |= cal_val << reg->calib_mode_shift; | ||
| 373 | } | ||
| 374 | |||
| 375 | if (on) { | 313 | if (on) { |
| 376 | con |= (1 << reg->core_en_shift); | 314 | con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); |
| 377 | interrupt_en = | 315 | interrupt_en = |
| 378 | pdata->trigger_enable[3] << reg->inten_rise3_shift | | 316 | pdata->trigger_enable[3] << reg->inten_rise3_shift | |
| 379 | pdata->trigger_enable[2] << reg->inten_rise2_shift | | 317 | pdata->trigger_enable[2] << reg->inten_rise2_shift | |
| @@ -383,7 +321,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) | |||
| 383 | interrupt_en |= | 321 | interrupt_en |= |
| 384 | interrupt_en << reg->inten_fall0_shift; | 322 | interrupt_en << reg->inten_fall0_shift; |
| 385 | } else { | 323 | } else { |
| 386 | con &= ~(1 << reg->core_en_shift); | 324 | con &= ~(1 << EXYNOS_TMU_CORE_EN_SHIFT); |
| 387 | interrupt_en = 0; /* Disable all interrupts */ | 325 | interrupt_en = 0; /* Disable all interrupts */ |
| 388 | } | 326 | } |
| 389 | writel(interrupt_en, data->base + reg->tmu_inten); | 327 | writel(interrupt_en, data->base + reg->tmu_inten); |
| @@ -404,8 +342,16 @@ static int exynos_tmu_read(struct exynos_tmu_data *data) | |||
| 404 | clk_enable(data->clk); | 342 | clk_enable(data->clk); |
| 405 | 343 | ||
| 406 | temp_code = readb(data->base + reg->tmu_cur_temp); | 344 | temp_code = readb(data->base + reg->tmu_cur_temp); |
| 407 | temp = code_to_temp(data, temp_code); | ||
| 408 | 345 | ||
| 346 | if (data->soc == SOC_ARCH_EXYNOS4210) | ||
| 347 | /* temp_code should range between 75 and 175 */ | ||
| 348 | if (temp_code < 75 || temp_code > 175) { | ||
| 349 | temp = -ENODATA; | ||
| 350 | goto out; | ||
| 351 | } | ||
| 352 | |||
| 353 | temp = code_to_temp(data, temp_code); | ||
| 354 | out: | ||
| 409 | clk_disable(data->clk); | 355 | clk_disable(data->clk); |
| 410 | mutex_unlock(&data->lock); | 356 | mutex_unlock(&data->lock); |
| 411 | 357 | ||
| @@ -465,7 +411,7 @@ static void exynos_tmu_work(struct work_struct *work) | |||
| 465 | struct exynos_tmu_data, irq_work); | 411 | struct exynos_tmu_data, irq_work); |
| 466 | struct exynos_tmu_platform_data *pdata = data->pdata; | 412 | struct exynos_tmu_platform_data *pdata = data->pdata; |
| 467 | const struct exynos_tmu_registers *reg = pdata->registers; | 413 | const struct exynos_tmu_registers *reg = pdata->registers; |
| 468 | unsigned int val_irq, val_type; | 414 | unsigned int val_type; |
| 469 | 415 | ||
| 470 | if (!IS_ERR(data->clk_sec)) | 416 | if (!IS_ERR(data->clk_sec)) |
| 471 | clk_enable(data->clk_sec); | 417 | clk_enable(data->clk_sec); |
| @@ -483,9 +429,7 @@ static void exynos_tmu_work(struct work_struct *work) | |||
| 483 | clk_enable(data->clk); | 429 | clk_enable(data->clk); |
| 484 | 430 | ||
| 485 | /* TODO: take action based on particular interrupt */ | 431 | /* TODO: take action based on particular interrupt */ |
| 486 | val_irq = readl(data->base + reg->tmu_intstat); | 432 | exynos_tmu_clear_irqs(data); |
| 487 | /* clear the interrupts */ | ||
| 488 | writel(val_irq, data->base + reg->tmu_intclear); | ||
| 489 | 433 | ||
| 490 | clk_disable(data->clk); | 434 | clk_disable(data->clk); |
| 491 | mutex_unlock(&data->lock); | 435 | mutex_unlock(&data->lock); |
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 1b4a6444ea61..c58c7663a3fe 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h | |||
| @@ -34,11 +34,6 @@ enum calibration_type { | |||
| 34 | TYPE_NONE, | 34 | TYPE_NONE, |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | enum calibration_mode { | ||
| 38 | SW_MODE, | ||
| 39 | HW_MODE, | ||
| 40 | }; | ||
| 41 | |||
| 42 | enum soc_type { | 37 | enum soc_type { |
| 43 | SOC_ARCH_EXYNOS3250 = 1, | 38 | SOC_ARCH_EXYNOS3250 = 1, |
| 44 | SOC_ARCH_EXYNOS4210, | 39 | SOC_ARCH_EXYNOS4210, |
| @@ -82,46 +77,19 @@ enum soc_type { | |||
| 82 | * bitfields. The register validity, offsets and bitfield values may vary | 77 | * bitfields. The register validity, offsets and bitfield values may vary |
| 83 | * slightly across different exynos SOC's. | 78 | * slightly across different exynos SOC's. |
| 84 | * @triminfo_data: register containing 2 pont trimming data | 79 | * @triminfo_data: register containing 2 pont trimming data |
| 85 | * @triminfo_25_shift: shift bit of the 25 C trim value in triminfo_data reg. | ||
| 86 | * @triminfo_85_shift: shift bit of the 85 C trim value in triminfo_data reg. | ||
| 87 | * @triminfo_ctrl: trim info controller register. | 80 | * @triminfo_ctrl: trim info controller register. |
| 88 | * @triminfo_reload_shift: shift of triminfo reload enable bit in triminfo_ctrl | 81 | * @triminfo_ctrl_count: the number of trim info controller register. |
| 89 | reg. | ||
| 90 | * @tmu_ctrl: TMU main controller register. | 82 | * @tmu_ctrl: TMU main controller register. |
| 91 | * @test_mux_addr_shift: shift bits of test mux address. | 83 | * @test_mux_addr_shift: shift bits of test mux address. |
| 92 | * @buf_vref_sel_shift: shift bits of reference voltage in tmu_ctrl register. | ||
| 93 | * @buf_vref_sel_mask: mask bits of reference voltage in tmu_ctrl register. | ||
| 94 | * @therm_trip_mode_shift: shift bits of tripping mode in tmu_ctrl register. | 84 | * @therm_trip_mode_shift: shift bits of tripping mode in tmu_ctrl register. |
| 95 | * @therm_trip_mode_mask: mask bits of tripping mode in tmu_ctrl register. | 85 | * @therm_trip_mode_mask: mask bits of tripping mode in tmu_ctrl register. |
| 96 | * @therm_trip_en_shift: shift bits of tripping enable in tmu_ctrl register. | 86 | * @therm_trip_en_shift: shift bits of tripping enable in tmu_ctrl register. |
| 97 | * @buf_slope_sel_shift: shift bits of amplifier gain value in tmu_ctrl | ||
| 98 | register. | ||
| 99 | * @buf_slope_sel_mask: mask bits of amplifier gain value in tmu_ctrl register. | ||
| 100 | * @calib_mode_shift: shift bits of calibration mode value in tmu_ctrl | ||
| 101 | register. | ||
| 102 | * @calib_mode_mask: mask bits of calibration mode value in tmu_ctrl | ||
| 103 | register. | ||
| 104 | * @therm_trip_tq_en_shift: shift bits of thermal trip enable by TQ pin in | ||
| 105 | tmu_ctrl register. | ||
| 106 | * @core_en_shift: shift bits of TMU core enable bit in tmu_ctrl register. | ||
| 107 | * @tmu_status: register drescribing the TMU status. | 87 | * @tmu_status: register drescribing the TMU status. |
| 108 | * @tmu_cur_temp: register containing the current temperature of the TMU. | 88 | * @tmu_cur_temp: register containing the current temperature of the TMU. |
| 109 | * @tmu_cur_temp_shift: shift bits of current temp value in tmu_cur_temp | ||
| 110 | register. | ||
| 111 | * @threshold_temp: register containing the base threshold level. | 89 | * @threshold_temp: register containing the base threshold level. |
| 112 | * @threshold_th0: Register containing first set of rising levels. | 90 | * @threshold_th0: Register containing first set of rising levels. |
| 113 | * @threshold_th0_l0_shift: shift bits of level0 threshold temperature. | ||
| 114 | * @threshold_th0_l1_shift: shift bits of level1 threshold temperature. | ||
| 115 | * @threshold_th0_l2_shift: shift bits of level2 threshold temperature. | ||
| 116 | * @threshold_th0_l3_shift: shift bits of level3 threshold temperature. | ||
| 117 | * @threshold_th1: Register containing second set of rising levels. | 91 | * @threshold_th1: Register containing second set of rising levels. |
| 118 | * @threshold_th1_l0_shift: shift bits of level0 threshold temperature. | ||
| 119 | * @threshold_th1_l1_shift: shift bits of level1 threshold temperature. | ||
| 120 | * @threshold_th1_l2_shift: shift bits of level2 threshold temperature. | ||
| 121 | * @threshold_th1_l3_shift: shift bits of level3 threshold temperature. | ||
| 122 | * @threshold_th2: Register containing third set of rising levels. | 92 | * @threshold_th2: Register containing third set of rising levels. |
| 123 | * @threshold_th2_l0_shift: shift bits of level0 threshold temperature. | ||
| 124 | * @threshold_th3: Register containing fourth set of rising levels. | ||
| 125 | * @threshold_th3_l0_shift: shift bits of level0 threshold temperature. | 93 | * @threshold_th3_l0_shift: shift bits of level0 threshold temperature. |
| 126 | * @tmu_inten: register containing the different threshold interrupt | 94 | * @tmu_inten: register containing the different threshold interrupt |
| 127 | enable bits. | 95 | enable bits. |
| @@ -130,68 +98,35 @@ enum soc_type { | |||
| 130 | * @inten_rise2_shift: shift bits of rising 2 interrupt bits. | 98 | * @inten_rise2_shift: shift bits of rising 2 interrupt bits. |
| 131 | * @inten_rise3_shift: shift bits of rising 3 interrupt bits. | 99 | * @inten_rise3_shift: shift bits of rising 3 interrupt bits. |
| 132 | * @inten_fall0_shift: shift bits of falling 0 interrupt bits. | 100 | * @inten_fall0_shift: shift bits of falling 0 interrupt bits. |
| 133 | * @inten_fall1_shift: shift bits of falling 1 interrupt bits. | ||
| 134 | * @inten_fall2_shift: shift bits of falling 2 interrupt bits. | ||
| 135 | * @inten_fall3_shift: shift bits of falling 3 interrupt bits. | ||
| 136 | * @tmu_intstat: Register containing the interrupt status values. | 101 | * @tmu_intstat: Register containing the interrupt status values. |
| 137 | * @tmu_intclear: Register for clearing the raised interrupt status. | 102 | * @tmu_intclear: Register for clearing the raised interrupt status. |
| 138 | * @intclr_fall_shift: shift bits for interrupt clear fall 0 | ||
| 139 | * @intclr_rise_shift: shift bits of all rising interrupt bits. | ||
| 140 | * @intclr_rise_mask: mask bits of all rising interrupt bits. | ||
| 141 | * @intclr_fall_mask: mask bits of all rising interrupt bits. | ||
| 142 | * @emul_con: TMU emulation controller register. | 103 | * @emul_con: TMU emulation controller register. |
| 143 | * @emul_temp_shift: shift bits of emulation temperature. | 104 | * @emul_temp_shift: shift bits of emulation temperature. |
| 144 | * @emul_time_shift: shift bits of emulation time. | 105 | * @emul_time_shift: shift bits of emulation time. |
| 145 | * @emul_time_mask: mask bits of emulation time. | ||
| 146 | * @tmu_irqstatus: register to find which TMU generated interrupts. | 106 | * @tmu_irqstatus: register to find which TMU generated interrupts. |
| 147 | * @tmu_pmin: register to get/set the Pmin value. | 107 | * @tmu_pmin: register to get/set the Pmin value. |
| 148 | */ | 108 | */ |
| 149 | struct exynos_tmu_registers { | 109 | struct exynos_tmu_registers { |
| 150 | u32 triminfo_data; | 110 | u32 triminfo_data; |
| 151 | u32 triminfo_25_shift; | ||
| 152 | u32 triminfo_85_shift; | ||
| 153 | 111 | ||
| 154 | u32 triminfo_ctrl; | 112 | u32 triminfo_ctrl[MAX_TRIMINFO_CTRL_REG]; |
| 155 | u32 triminfo_ctrl1; | 113 | u32 triminfo_ctrl_count; |
| 156 | u32 triminfo_reload_shift; | ||
| 157 | 114 | ||
| 158 | u32 tmu_ctrl; | 115 | u32 tmu_ctrl; |
| 159 | u32 test_mux_addr_shift; | 116 | u32 test_mux_addr_shift; |
| 160 | u32 buf_vref_sel_shift; | ||
| 161 | u32 buf_vref_sel_mask; | ||
| 162 | u32 therm_trip_mode_shift; | 117 | u32 therm_trip_mode_shift; |
| 163 | u32 therm_trip_mode_mask; | 118 | u32 therm_trip_mode_mask; |
| 164 | u32 therm_trip_en_shift; | 119 | u32 therm_trip_en_shift; |
| 165 | u32 buf_slope_sel_shift; | ||
| 166 | u32 buf_slope_sel_mask; | ||
| 167 | u32 calib_mode_shift; | ||
| 168 | u32 calib_mode_mask; | ||
| 169 | u32 therm_trip_tq_en_shift; | ||
| 170 | u32 core_en_shift; | ||
| 171 | 120 | ||
| 172 | u32 tmu_status; | 121 | u32 tmu_status; |
| 173 | 122 | ||
| 174 | u32 tmu_cur_temp; | 123 | u32 tmu_cur_temp; |
| 175 | u32 tmu_cur_temp_shift; | ||
| 176 | 124 | ||
| 177 | u32 threshold_temp; | 125 | u32 threshold_temp; |
| 178 | 126 | ||
| 179 | u32 threshold_th0; | 127 | u32 threshold_th0; |
| 180 | u32 threshold_th0_l0_shift; | ||
| 181 | u32 threshold_th0_l1_shift; | ||
| 182 | u32 threshold_th0_l2_shift; | ||
| 183 | u32 threshold_th0_l3_shift; | ||
| 184 | |||
| 185 | u32 threshold_th1; | 128 | u32 threshold_th1; |
| 186 | u32 threshold_th1_l0_shift; | ||
| 187 | u32 threshold_th1_l1_shift; | ||
| 188 | u32 threshold_th1_l2_shift; | ||
| 189 | u32 threshold_th1_l3_shift; | ||
| 190 | |||
| 191 | u32 threshold_th2; | 129 | u32 threshold_th2; |
| 192 | u32 threshold_th2_l0_shift; | ||
| 193 | |||
| 194 | u32 threshold_th3; | ||
| 195 | u32 threshold_th3_l0_shift; | 130 | u32 threshold_th3_l0_shift; |
| 196 | 131 | ||
| 197 | u32 tmu_inten; | 132 | u32 tmu_inten; |
| @@ -200,22 +135,14 @@ struct exynos_tmu_registers { | |||
| 200 | u32 inten_rise2_shift; | 135 | u32 inten_rise2_shift; |
| 201 | u32 inten_rise3_shift; | 136 | u32 inten_rise3_shift; |
| 202 | u32 inten_fall0_shift; | 137 | u32 inten_fall0_shift; |
| 203 | u32 inten_fall1_shift; | ||
| 204 | u32 inten_fall2_shift; | ||
| 205 | u32 inten_fall3_shift; | ||
| 206 | 138 | ||
| 207 | u32 tmu_intstat; | 139 | u32 tmu_intstat; |
| 208 | 140 | ||
| 209 | u32 tmu_intclear; | 141 | u32 tmu_intclear; |
| 210 | u32 intclr_fall_shift; | ||
| 211 | u32 intclr_rise_shift; | ||
| 212 | u32 intclr_fall_mask; | ||
| 213 | u32 intclr_rise_mask; | ||
| 214 | 142 | ||
| 215 | u32 emul_con; | 143 | u32 emul_con; |
| 216 | u32 emul_temp_shift; | 144 | u32 emul_temp_shift; |
| 217 | u32 emul_time_shift; | 145 | u32 emul_time_shift; |
| 218 | u32 emul_time_mask; | ||
| 219 | 146 | ||
| 220 | u32 tmu_irqstatus; | 147 | u32 tmu_irqstatus; |
| 221 | u32 tmu_pmin; | 148 | u32 tmu_pmin; |
| @@ -250,11 +177,12 @@ struct exynos_tmu_registers { | |||
| 250 | * 1 = enable trigger_level[] interrupt, | 177 | * 1 = enable trigger_level[] interrupt, |
| 251 | * 0 = disable trigger_level[] interrupt | 178 | * 0 = disable trigger_level[] interrupt |
| 252 | * @max_trigger_level: max trigger level supported by the TMU | 179 | * @max_trigger_level: max trigger level supported by the TMU |
| 180 | * @non_hw_trigger_levels: number of defined non-hardware trigger levels | ||
| 253 | * @gain: gain of amplifier in the positive-TC generator block | 181 | * @gain: gain of amplifier in the positive-TC generator block |
| 254 | * 0 <= gain <= 15 | 182 | * 0 < gain <= 15 |
| 255 | * @reference_voltage: reference voltage of amplifier | 183 | * @reference_voltage: reference voltage of amplifier |
| 256 | * in the positive-TC generator block | 184 | * in the positive-TC generator block |
| 257 | * 0 <= reference_voltage <= 31 | 185 | * 0 < reference_voltage <= 31 |
| 258 | * @noise_cancel_mode: noise cancellation mode | 186 | * @noise_cancel_mode: noise cancellation mode |
| 259 | * 000, 100, 101, 110 and 111 can be different modes | 187 | * 000, 100, 101, 110 and 111 can be different modes |
| 260 | * @type: determines the type of SOC | 188 | * @type: determines the type of SOC |
| @@ -265,8 +193,8 @@ struct exynos_tmu_registers { | |||
| 265 | * @second_point_trim: temp value of the second point trimming | 193 | * @second_point_trim: temp value of the second point trimming |
| 266 | * @default_temp_offset: default temperature offset in case of no trimming | 194 | * @default_temp_offset: default temperature offset in case of no trimming |
| 267 | * @test_mux; information if SoC supports test MUX | 195 | * @test_mux; information if SoC supports test MUX |
| 196 | * @triminfo_reload: reload value to read TRIMINFO register | ||
| 268 | * @cal_type: calibration type for temperature | 197 | * @cal_type: calibration type for temperature |
| 269 | * @cal_mode: calibration mode for temperature | ||
| 270 | * @freq_clip_table: Table representing frequency reduction percentage. | 198 | * @freq_clip_table: Table representing frequency reduction percentage. |
| 271 | * @freq_tab_count: Count of the above table as frequency reduction may | 199 | * @freq_tab_count: Count of the above table as frequency reduction may |
| 272 | * applicable to only some of the trigger levels. | 200 | * applicable to only some of the trigger levels. |
| @@ -284,6 +212,7 @@ struct exynos_tmu_platform_data { | |||
| 284 | enum trigger_type trigger_type[MAX_TRIP_COUNT]; | 212 | enum trigger_type trigger_type[MAX_TRIP_COUNT]; |
| 285 | bool trigger_enable[MAX_TRIP_COUNT]; | 213 | bool trigger_enable[MAX_TRIP_COUNT]; |
| 286 | u8 max_trigger_level; | 214 | u8 max_trigger_level; |
| 215 | u8 non_hw_trigger_levels; | ||
| 287 | u8 gain; | 216 | u8 gain; |
| 288 | u8 reference_voltage; | 217 | u8 reference_voltage; |
| 289 | u8 noise_cancel_mode; | 218 | u8 noise_cancel_mode; |
| @@ -295,9 +224,9 @@ struct exynos_tmu_platform_data { | |||
| 295 | u8 second_point_trim; | 224 | u8 second_point_trim; |
| 296 | u8 default_temp_offset; | 225 | u8 default_temp_offset; |
| 297 | u8 test_mux; | 226 | u8 test_mux; |
| 227 | u8 triminfo_reload[MAX_TRIMINFO_CTRL_REG]; | ||
| 298 | 228 | ||
| 299 | enum calibration_type cal_type; | 229 | enum calibration_type cal_type; |
| 300 | enum calibration_mode cal_mode; | ||
| 301 | enum soc_type type; | 230 | enum soc_type type; |
| 302 | struct freq_clip_table freq_tab[4]; | 231 | struct freq_clip_table freq_tab[4]; |
| 303 | unsigned int freq_tab_count; | 232 | unsigned int freq_tab_count; |
diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index aa8e0dee2055..2683d2897e90 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c | |||
| @@ -27,14 +27,7 @@ | |||
| 27 | #if defined(CONFIG_CPU_EXYNOS4210) | 27 | #if defined(CONFIG_CPU_EXYNOS4210) |
| 28 | static const struct exynos_tmu_registers exynos4210_tmu_registers = { | 28 | static const struct exynos_tmu_registers exynos4210_tmu_registers = { |
| 29 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, | 29 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, |
| 30 | .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, | ||
| 31 | .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, | ||
| 32 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, | 30 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, |
| 33 | .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, | ||
| 34 | .buf_vref_sel_mask = EXYNOS_TMU_REF_VOLTAGE_MASK, | ||
| 35 | .buf_slope_sel_shift = EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, | ||
| 36 | .buf_slope_sel_mask = EXYNOS_TMU_BUF_SLOPE_SEL_MASK, | ||
| 37 | .core_en_shift = EXYNOS_TMU_CORE_EN_SHIFT, | ||
| 38 | .tmu_status = EXYNOS_TMU_REG_STATUS, | 31 | .tmu_status = EXYNOS_TMU_REG_STATUS, |
| 39 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, | 32 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, |
| 40 | .threshold_temp = EXYNOS4210_TMU_REG_THRESHOLD_TEMP, | 33 | .threshold_temp = EXYNOS4210_TMU_REG_THRESHOLD_TEMP, |
| @@ -46,7 +39,6 @@ static const struct exynos_tmu_registers exynos4210_tmu_registers = { | |||
| 46 | .inten_rise3_shift = EXYNOS_TMU_INTEN_RISE3_SHIFT, | 39 | .inten_rise3_shift = EXYNOS_TMU_INTEN_RISE3_SHIFT, |
| 47 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, | 40 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, |
| 48 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, | 41 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, |
| 49 | .intclr_rise_mask = EXYNOS4210_TMU_TRIG_LEVEL_MASK, | ||
| 50 | }; | 42 | }; |
| 51 | 43 | ||
| 52 | struct exynos_tmu_init_data const exynos4210_default_tmu_data = { | 44 | struct exynos_tmu_init_data const exynos4210_default_tmu_data = { |
| @@ -64,6 +56,7 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = { | |||
| 64 | .trigger_type[1] = THROTTLE_ACTIVE, | 56 | .trigger_type[1] = THROTTLE_ACTIVE, |
| 65 | .trigger_type[2] = SW_TRIP, | 57 | .trigger_type[2] = SW_TRIP, |
| 66 | .max_trigger_level = 4, | 58 | .max_trigger_level = 4, |
| 59 | .non_hw_trigger_levels = 3, | ||
| 67 | .gain = 15, | 60 | .gain = 15, |
| 68 | .reference_voltage = 7, | 61 | .reference_voltage = 7, |
| 69 | .cal_type = TYPE_ONE_POINT_TRIMMING, | 62 | .cal_type = TYPE_ONE_POINT_TRIMMING, |
| @@ -93,18 +86,14 @@ struct exynos_tmu_init_data const exynos4210_default_tmu_data = { | |||
| 93 | #if defined(CONFIG_SOC_EXYNOS3250) | 86 | #if defined(CONFIG_SOC_EXYNOS3250) |
| 94 | static const struct exynos_tmu_registers exynos3250_tmu_registers = { | 87 | static const struct exynos_tmu_registers exynos3250_tmu_registers = { |
| 95 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, | 88 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, |
| 96 | .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, | 89 | .triminfo_ctrl[0] = EXYNOS_TMU_TRIMINFO_CON1, |
| 97 | .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, | 90 | .triminfo_ctrl[1] = EXYNOS_TMU_TRIMINFO_CON2, |
| 91 | .triminfo_ctrl_count = 2, | ||
| 98 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, | 92 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, |
| 99 | .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, | 93 | .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, |
| 100 | .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, | ||
| 101 | .buf_vref_sel_mask = EXYNOS_TMU_REF_VOLTAGE_MASK, | ||
| 102 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, | 94 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, |
| 103 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, | 95 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, |
| 104 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, | 96 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, |
| 105 | .buf_slope_sel_shift = EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, | ||
| 106 | .buf_slope_sel_mask = EXYNOS_TMU_BUF_SLOPE_SEL_MASK, | ||
| 107 | .core_en_shift = EXYNOS_TMU_CORE_EN_SHIFT, | ||
| 108 | .tmu_status = EXYNOS_TMU_REG_STATUS, | 97 | .tmu_status = EXYNOS_TMU_REG_STATUS, |
| 109 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, | 98 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, |
| 110 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, | 99 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, |
| @@ -116,14 +105,9 @@ static const struct exynos_tmu_registers exynos3250_tmu_registers = { | |||
| 116 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, | 105 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, |
| 117 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, | 106 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, |
| 118 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, | 107 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, |
| 119 | .intclr_fall_shift = EXYNOS_TMU_CLEAR_FALL_INT_SHIFT, | ||
| 120 | .intclr_rise_shift = EXYNOS_TMU_RISE_INT_SHIFT, | ||
| 121 | .intclr_rise_mask = EXYNOS_TMU_RISE_INT_MASK, | ||
| 122 | .intclr_fall_mask = EXYNOS_TMU_FALL_INT_MASK, | ||
| 123 | .emul_con = EXYNOS_EMUL_CON, | 108 | .emul_con = EXYNOS_EMUL_CON, |
| 124 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, | 109 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, |
| 125 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, | 110 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, |
| 126 | .emul_time_mask = EXYNOS_EMUL_TIME_MASK, | ||
| 127 | }; | 111 | }; |
| 128 | 112 | ||
| 129 | #define EXYNOS3250_TMU_DATA \ | 113 | #define EXYNOS3250_TMU_DATA \ |
| @@ -141,6 +125,7 @@ static const struct exynos_tmu_registers exynos3250_tmu_registers = { | |||
| 141 | .trigger_type[2] = SW_TRIP, \ | 125 | .trigger_type[2] = SW_TRIP, \ |
| 142 | .trigger_type[3] = HW_TRIP, \ | 126 | .trigger_type[3] = HW_TRIP, \ |
| 143 | .max_trigger_level = 4, \ | 127 | .max_trigger_level = 4, \ |
| 128 | .non_hw_trigger_levels = 3, \ | ||
| 144 | .gain = 8, \ | 129 | .gain = 8, \ |
| 145 | .reference_voltage = 16, \ | 130 | .reference_voltage = 16, \ |
| 146 | .noise_cancel_mode = 4, \ | 131 | .noise_cancel_mode = 4, \ |
| @@ -160,8 +145,10 @@ static const struct exynos_tmu_registers exynos3250_tmu_registers = { | |||
| 160 | .temp_level = 95, \ | 145 | .temp_level = 95, \ |
| 161 | }, \ | 146 | }, \ |
| 162 | .freq_tab_count = 2, \ | 147 | .freq_tab_count = 2, \ |
| 148 | .triminfo_reload[0] = EXYNOS_TRIMINFO_RELOAD_ENABLE, \ | ||
| 149 | .triminfo_reload[1] = EXYNOS_TRIMINFO_RELOAD_ENABLE, \ | ||
| 163 | .registers = &exynos3250_tmu_registers, \ | 150 | .registers = &exynos3250_tmu_registers, \ |
| 164 | .features = (TMU_SUPPORT_EMULATION | \ | 151 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_TRIM_RELOAD | \ |
| 165 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ | 152 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ |
| 166 | TMU_SUPPORT_EMUL_TIME) | 153 | TMU_SUPPORT_EMUL_TIME) |
| 167 | #endif | 154 | #endif |
| @@ -182,20 +169,13 @@ struct exynos_tmu_init_data const exynos3250_default_tmu_data = { | |||
| 182 | #if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) | 169 | #if defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) |
| 183 | static const struct exynos_tmu_registers exynos4412_tmu_registers = { | 170 | static const struct exynos_tmu_registers exynos4412_tmu_registers = { |
| 184 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, | 171 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, |
| 185 | .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, | 172 | .triminfo_ctrl[0] = EXYNOS_TMU_TRIMINFO_CON2, |
| 186 | .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, | 173 | .triminfo_ctrl_count = 1, |
| 187 | .triminfo_ctrl = EXYNOS_TMU_TRIMINFO_CON, | ||
| 188 | .triminfo_reload_shift = EXYNOS_TRIMINFO_RELOAD_SHIFT, | ||
| 189 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, | 174 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, |
| 190 | .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, | 175 | .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, |
| 191 | .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, | ||
| 192 | .buf_vref_sel_mask = EXYNOS_TMU_REF_VOLTAGE_MASK, | ||
| 193 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, | 176 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, |
| 194 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, | 177 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, |
| 195 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, | 178 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, |
| 196 | .buf_slope_sel_shift = EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, | ||
| 197 | .buf_slope_sel_mask = EXYNOS_TMU_BUF_SLOPE_SEL_MASK, | ||
| 198 | .core_en_shift = EXYNOS_TMU_CORE_EN_SHIFT, | ||
| 199 | .tmu_status = EXYNOS_TMU_REG_STATUS, | 179 | .tmu_status = EXYNOS_TMU_REG_STATUS, |
| 200 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, | 180 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, |
| 201 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, | 181 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, |
| @@ -208,14 +188,9 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = { | |||
| 208 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, | 188 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, |
| 209 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, | 189 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, |
| 210 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, | 190 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, |
| 211 | .intclr_fall_shift = EXYNOS_TMU_CLEAR_FALL_INT_SHIFT, | ||
| 212 | .intclr_rise_shift = EXYNOS_TMU_RISE_INT_SHIFT, | ||
| 213 | .intclr_rise_mask = EXYNOS_TMU_RISE_INT_MASK, | ||
| 214 | .intclr_fall_mask = EXYNOS_TMU_FALL_INT_MASK, | ||
| 215 | .emul_con = EXYNOS_EMUL_CON, | 191 | .emul_con = EXYNOS_EMUL_CON, |
| 216 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, | 192 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, |
| 217 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, | 193 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, |
| 218 | .emul_time_mask = EXYNOS_EMUL_TIME_MASK, | ||
| 219 | }; | 194 | }; |
| 220 | 195 | ||
| 221 | #define EXYNOS4412_TMU_DATA \ | 196 | #define EXYNOS4412_TMU_DATA \ |
| @@ -233,6 +208,7 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = { | |||
| 233 | .trigger_type[2] = SW_TRIP, \ | 208 | .trigger_type[2] = SW_TRIP, \ |
| 234 | .trigger_type[3] = HW_TRIP, \ | 209 | .trigger_type[3] = HW_TRIP, \ |
| 235 | .max_trigger_level = 4, \ | 210 | .max_trigger_level = 4, \ |
| 211 | .non_hw_trigger_levels = 3, \ | ||
| 236 | .gain = 8, \ | 212 | .gain = 8, \ |
| 237 | .reference_voltage = 16, \ | 213 | .reference_voltage = 16, \ |
| 238 | .noise_cancel_mode = 4, \ | 214 | .noise_cancel_mode = 4, \ |
| @@ -252,6 +228,7 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = { | |||
| 252 | .temp_level = 95, \ | 228 | .temp_level = 95, \ |
| 253 | }, \ | 229 | }, \ |
| 254 | .freq_tab_count = 2, \ | 230 | .freq_tab_count = 2, \ |
| 231 | .triminfo_reload[0] = EXYNOS_TRIMINFO_RELOAD_ENABLE, \ | ||
| 255 | .registers = &exynos4412_tmu_registers, \ | 232 | .registers = &exynos4412_tmu_registers, \ |
| 256 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_TRIM_RELOAD | \ | 233 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_TRIM_RELOAD | \ |
| 257 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ | 234 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ |
| @@ -286,18 +263,11 @@ struct exynos_tmu_init_data const exynos5250_default_tmu_data = { | |||
| 286 | #if defined(CONFIG_SOC_EXYNOS5260) | 263 | #if defined(CONFIG_SOC_EXYNOS5260) |
| 287 | static const struct exynos_tmu_registers exynos5260_tmu_registers = { | 264 | static const struct exynos_tmu_registers exynos5260_tmu_registers = { |
| 288 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, | 265 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, |
| 289 | .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, | ||
| 290 | .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, | ||
| 291 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, | 266 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, |
| 292 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL1, | 267 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL1, |
| 293 | .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, | ||
| 294 | .buf_vref_sel_mask = EXYNOS_TMU_REF_VOLTAGE_MASK, | ||
| 295 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, | 268 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, |
| 296 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, | 269 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, |
| 297 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, | 270 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, |
| 298 | .buf_slope_sel_shift = EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, | ||
| 299 | .buf_slope_sel_mask = EXYNOS_TMU_BUF_SLOPE_SEL_MASK, | ||
| 300 | .core_en_shift = EXYNOS_TMU_CORE_EN_SHIFT, | ||
| 301 | .tmu_status = EXYNOS_TMU_REG_STATUS, | 271 | .tmu_status = EXYNOS_TMU_REG_STATUS, |
| 302 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, | 272 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, |
| 303 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, | 273 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, |
| @@ -310,14 +280,9 @@ static const struct exynos_tmu_registers exynos5260_tmu_registers = { | |||
| 310 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, | 280 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, |
| 311 | .tmu_intstat = EXYNOS5260_TMU_REG_INTSTAT, | 281 | .tmu_intstat = EXYNOS5260_TMU_REG_INTSTAT, |
| 312 | .tmu_intclear = EXYNOS5260_TMU_REG_INTCLEAR, | 282 | .tmu_intclear = EXYNOS5260_TMU_REG_INTCLEAR, |
| 313 | .intclr_fall_shift = EXYNOS5420_TMU_CLEAR_FALL_INT_SHIFT, | ||
| 314 | .intclr_rise_shift = EXYNOS_TMU_RISE_INT_SHIFT, | ||
| 315 | .intclr_rise_mask = EXYNOS5260_TMU_RISE_INT_MASK, | ||
| 316 | .intclr_fall_mask = EXYNOS5260_TMU_FALL_INT_MASK, | ||
| 317 | .emul_con = EXYNOS5260_EMUL_CON, | 283 | .emul_con = EXYNOS5260_EMUL_CON, |
| 318 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, | 284 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, |
| 319 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, | 285 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, |
| 320 | .emul_time_mask = EXYNOS_EMUL_TIME_MASK, | ||
| 321 | }; | 286 | }; |
| 322 | 287 | ||
| 323 | #define __EXYNOS5260_TMU_DATA \ | 288 | #define __EXYNOS5260_TMU_DATA \ |
| @@ -335,6 +300,7 @@ static const struct exynos_tmu_registers exynos5260_tmu_registers = { | |||
| 335 | .trigger_type[2] = SW_TRIP, \ | 300 | .trigger_type[2] = SW_TRIP, \ |
| 336 | .trigger_type[3] = HW_TRIP, \ | 301 | .trigger_type[3] = HW_TRIP, \ |
| 337 | .max_trigger_level = 4, \ | 302 | .max_trigger_level = 4, \ |
| 303 | .non_hw_trigger_levels = 3, \ | ||
| 338 | .gain = 8, \ | 304 | .gain = 8, \ |
| 339 | .reference_voltage = 16, \ | 305 | .reference_voltage = 16, \ |
| 340 | .noise_cancel_mode = 4, \ | 306 | .noise_cancel_mode = 4, \ |
| @@ -359,9 +325,8 @@ static const struct exynos_tmu_registers exynos5260_tmu_registers = { | |||
| 359 | #define EXYNOS5260_TMU_DATA \ | 325 | #define EXYNOS5260_TMU_DATA \ |
| 360 | __EXYNOS5260_TMU_DATA \ | 326 | __EXYNOS5260_TMU_DATA \ |
| 361 | .type = SOC_ARCH_EXYNOS5260, \ | 327 | .type = SOC_ARCH_EXYNOS5260, \ |
| 362 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_TRIM_RELOAD | \ | 328 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ |
| 363 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ | 329 | TMU_SUPPORT_READY_STATUS | TMU_SUPPORT_EMUL_TIME) |
| 364 | TMU_SUPPORT_EMUL_TIME) | ||
| 365 | 330 | ||
| 366 | struct exynos_tmu_init_data const exynos5260_default_tmu_data = { | 331 | struct exynos_tmu_init_data const exynos5260_default_tmu_data = { |
| 367 | .tmu_data = { | 332 | .tmu_data = { |
| @@ -378,17 +343,10 @@ struct exynos_tmu_init_data const exynos5260_default_tmu_data = { | |||
| 378 | #if defined(CONFIG_SOC_EXYNOS5420) | 343 | #if defined(CONFIG_SOC_EXYNOS5420) |
| 379 | static const struct exynos_tmu_registers exynos5420_tmu_registers = { | 344 | static const struct exynos_tmu_registers exynos5420_tmu_registers = { |
| 380 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, | 345 | .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, |
| 381 | .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, | ||
| 382 | .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, | ||
| 383 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, | 346 | .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, |
| 384 | .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, | ||
| 385 | .buf_vref_sel_mask = EXYNOS_TMU_REF_VOLTAGE_MASK, | ||
| 386 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, | 347 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, |
| 387 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, | 348 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, |
| 388 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, | 349 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, |
| 389 | .buf_slope_sel_shift = EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, | ||
| 390 | .buf_slope_sel_mask = EXYNOS_TMU_BUF_SLOPE_SEL_MASK, | ||
| 391 | .core_en_shift = EXYNOS_TMU_CORE_EN_SHIFT, | ||
| 392 | .tmu_status = EXYNOS_TMU_REG_STATUS, | 350 | .tmu_status = EXYNOS_TMU_REG_STATUS, |
| 393 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, | 351 | .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, |
| 394 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, | 352 | .threshold_th0 = EXYNOS_THD_TEMP_RISE, |
| @@ -402,14 +360,9 @@ static const struct exynos_tmu_registers exynos5420_tmu_registers = { | |||
| 402 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, | 360 | .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, |
| 403 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, | 361 | .tmu_intstat = EXYNOS_TMU_REG_INTSTAT, |
| 404 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, | 362 | .tmu_intclear = EXYNOS_TMU_REG_INTCLEAR, |
| 405 | .intclr_fall_shift = EXYNOS5420_TMU_CLEAR_FALL_INT_SHIFT, | ||
| 406 | .intclr_rise_shift = EXYNOS_TMU_RISE_INT_SHIFT, | ||
| 407 | .intclr_rise_mask = EXYNOS_TMU_RISE_INT_MASK, | ||
| 408 | .intclr_fall_mask = EXYNOS_TMU_FALL_INT_MASK, | ||
| 409 | .emul_con = EXYNOS_EMUL_CON, | 363 | .emul_con = EXYNOS_EMUL_CON, |
| 410 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, | 364 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, |
| 411 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, | 365 | .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, |
| 412 | .emul_time_mask = EXYNOS_EMUL_TIME_MASK, | ||
| 413 | }; | 366 | }; |
| 414 | 367 | ||
| 415 | #define __EXYNOS5420_TMU_DATA \ | 368 | #define __EXYNOS5420_TMU_DATA \ |
| @@ -427,6 +380,7 @@ static const struct exynos_tmu_registers exynos5420_tmu_registers = { | |||
| 427 | .trigger_type[2] = SW_TRIP, \ | 380 | .trigger_type[2] = SW_TRIP, \ |
| 428 | .trigger_type[3] = HW_TRIP, \ | 381 | .trigger_type[3] = HW_TRIP, \ |
| 429 | .max_trigger_level = 4, \ | 382 | .max_trigger_level = 4, \ |
| 383 | .non_hw_trigger_levels = 3, \ | ||
| 430 | .gain = 8, \ | 384 | .gain = 8, \ |
| 431 | .reference_voltage = 16, \ | 385 | .reference_voltage = 16, \ |
| 432 | .noise_cancel_mode = 4, \ | 386 | .noise_cancel_mode = 4, \ |
| @@ -451,16 +405,15 @@ static const struct exynos_tmu_registers exynos5420_tmu_registers = { | |||
| 451 | #define EXYNOS5420_TMU_DATA \ | 405 | #define EXYNOS5420_TMU_DATA \ |
| 452 | __EXYNOS5420_TMU_DATA \ | 406 | __EXYNOS5420_TMU_DATA \ |
| 453 | .type = SOC_ARCH_EXYNOS5250, \ | 407 | .type = SOC_ARCH_EXYNOS5250, \ |
| 454 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_TRIM_RELOAD | \ | 408 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ |
| 455 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ | 409 | TMU_SUPPORT_READY_STATUS | TMU_SUPPORT_EMUL_TIME) |
| 456 | TMU_SUPPORT_EMUL_TIME) | ||
| 457 | 410 | ||
| 458 | #define EXYNOS5420_TMU_DATA_SHARED \ | 411 | #define EXYNOS5420_TMU_DATA_SHARED \ |
| 459 | __EXYNOS5420_TMU_DATA \ | 412 | __EXYNOS5420_TMU_DATA \ |
| 460 | .type = SOC_ARCH_EXYNOS5420_TRIMINFO, \ | 413 | .type = SOC_ARCH_EXYNOS5420_TRIMINFO, \ |
| 461 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_TRIM_RELOAD | \ | 414 | .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ |
| 462 | TMU_SUPPORT_FALLING_TRIP | TMU_SUPPORT_READY_STATUS | \ | 415 | TMU_SUPPORT_READY_STATUS | TMU_SUPPORT_EMUL_TIME | \ |
| 463 | TMU_SUPPORT_EMUL_TIME | TMU_SUPPORT_ADDRESS_MULTIPLE) | 416 | TMU_SUPPORT_ADDRESS_MULTIPLE) |
| 464 | 417 | ||
| 465 | struct exynos_tmu_init_data const exynos5420_default_tmu_data = { | 418 | struct exynos_tmu_init_data const exynos5420_default_tmu_data = { |
| 466 | .tmu_data = { | 419 | .tmu_data = { |
| @@ -477,19 +430,10 @@ struct exynos_tmu_init_data const exynos5420_default_tmu_data = { | |||
| 477 | #if defined(CONFIG_SOC_EXYNOS5440) | 430 | #if defined(CONFIG_SOC_EXYNOS5440) |
| 478 | static const struct exynos_tmu_registers exynos5440_tmu_registers = { | 431 | static const struct exynos_tmu_registers exynos5440_tmu_registers = { |
| 479 | .triminfo_data = EXYNOS5440_TMU_S0_7_TRIM, | 432 | .triminfo_data = EXYNOS5440_TMU_S0_7_TRIM, |
| 480 | .triminfo_25_shift = EXYNOS_TRIMINFO_25_SHIFT, | ||
| 481 | .triminfo_85_shift = EXYNOS_TRIMINFO_85_SHIFT, | ||
| 482 | .tmu_ctrl = EXYNOS5440_TMU_S0_7_CTRL, | 433 | .tmu_ctrl = EXYNOS5440_TMU_S0_7_CTRL, |
| 483 | .buf_vref_sel_shift = EXYNOS_TMU_REF_VOLTAGE_SHIFT, | ||
| 484 | .buf_vref_sel_mask = EXYNOS_TMU_REF_VOLTAGE_MASK, | ||
| 485 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, | 434 | .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, |
| 486 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, | 435 | .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, |
| 487 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, | 436 | .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, |
| 488 | .buf_slope_sel_shift = EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, | ||
| 489 | .buf_slope_sel_mask = EXYNOS_TMU_BUF_SLOPE_SEL_MASK, | ||
| 490 | .calib_mode_shift = EXYNOS_TMU_CALIB_MODE_SHIFT, | ||
| 491 | .calib_mode_mask = EXYNOS_TMU_CALIB_MODE_MASK, | ||
| 492 | .core_en_shift = EXYNOS_TMU_CORE_EN_SHIFT, | ||
| 493 | .tmu_status = EXYNOS5440_TMU_S0_7_STATUS, | 437 | .tmu_status = EXYNOS5440_TMU_S0_7_STATUS, |
| 494 | .tmu_cur_temp = EXYNOS5440_TMU_S0_7_TEMP, | 438 | .tmu_cur_temp = EXYNOS5440_TMU_S0_7_TEMP, |
| 495 | .threshold_th0 = EXYNOS5440_TMU_S0_7_TH0, | 439 | .threshold_th0 = EXYNOS5440_TMU_S0_7_TH0, |
| @@ -504,10 +448,6 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = { | |||
| 504 | .inten_fall0_shift = EXYNOS5440_TMU_INTEN_FALL0_SHIFT, | 448 | .inten_fall0_shift = EXYNOS5440_TMU_INTEN_FALL0_SHIFT, |
| 505 | .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ, | 449 | .tmu_intstat = EXYNOS5440_TMU_S0_7_IRQ, |
| 506 | .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ, | 450 | .tmu_intclear = EXYNOS5440_TMU_S0_7_IRQ, |
| 507 | .intclr_fall_shift = EXYNOS5440_TMU_CLEAR_FALL_INT_SHIFT, | ||
| 508 | .intclr_rise_shift = EXYNOS5440_TMU_RISE_INT_SHIFT, | ||
| 509 | .intclr_rise_mask = EXYNOS5440_TMU_RISE_INT_MASK, | ||
| 510 | .intclr_fall_mask = EXYNOS5440_TMU_FALL_INT_MASK, | ||
| 511 | .tmu_irqstatus = EXYNOS5440_TMU_IRQ_STATUS, | 451 | .tmu_irqstatus = EXYNOS5440_TMU_IRQ_STATUS, |
| 512 | .emul_con = EXYNOS5440_TMU_S0_7_DEBUG, | 452 | .emul_con = EXYNOS5440_TMU_S0_7_DEBUG, |
| 513 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, | 453 | .emul_temp_shift = EXYNOS_EMUL_DATA_SHIFT, |
| @@ -521,11 +461,11 @@ static const struct exynos_tmu_registers exynos5440_tmu_registers = { | |||
| 521 | .trigger_type[0] = SW_TRIP, \ | 461 | .trigger_type[0] = SW_TRIP, \ |
| 522 | .trigger_type[4] = HW_TRIP, \ | 462 | .trigger_type[4] = HW_TRIP, \ |
| 523 | .max_trigger_level = 5, \ | 463 | .max_trigger_level = 5, \ |
| 464 | .non_hw_trigger_levels = 1, \ | ||
| 524 | .gain = 5, \ | 465 | .gain = 5, \ |
| 525 | .reference_voltage = 16, \ | 466 | .reference_voltage = 16, \ |
| 526 | .noise_cancel_mode = 4, \ | 467 | .noise_cancel_mode = 4, \ |
| 527 | .cal_type = TYPE_ONE_POINT_TRIMMING, \ | 468 | .cal_type = TYPE_ONE_POINT_TRIMMING, \ |
| 528 | .cal_mode = 0, \ | ||
| 529 | .efuse_value = 0x5b2d, \ | 469 | .efuse_value = 0x5b2d, \ |
| 530 | .min_efuse_value = 16, \ | 470 | .min_efuse_value = 16, \ |
| 531 | .max_efuse_value = 76, \ | 471 | .max_efuse_value = 76, \ |
diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/thermal/samsung/exynos_tmu_data.h index f0979e598491..65e2ea6a9579 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.h +++ b/drivers/thermal/samsung/exynos_tmu_data.h | |||
| @@ -39,55 +39,31 @@ | |||
| 39 | #define EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT 8 | 39 | #define EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT 8 |
| 40 | #define EXYNOS_TMU_CORE_EN_SHIFT 0 | 40 | #define EXYNOS_TMU_CORE_EN_SHIFT 0 |
| 41 | 41 | ||
| 42 | /* Exynos3250 specific registers */ | ||
| 43 | #define EXYNOS_TMU_TRIMINFO_CON1 0x10 | ||
| 44 | |||
| 42 | /* Exynos4210 specific registers */ | 45 | /* Exynos4210 specific registers */ |
| 43 | #define EXYNOS4210_TMU_REG_THRESHOLD_TEMP 0x44 | 46 | #define EXYNOS4210_TMU_REG_THRESHOLD_TEMP 0x44 |
| 44 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL0 0x50 | 47 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL0 0x50 |
| 45 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL1 0x54 | 48 | |
| 46 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL2 0x58 | 49 | /* Exynos5250, Exynos4412, Exynos3250 specific registers */ |
| 47 | #define EXYNOS4210_TMU_REG_TRIG_LEVEL3 0x5C | 50 | #define EXYNOS_TMU_TRIMINFO_CON2 0x14 |
| 48 | #define EXYNOS4210_TMU_REG_PAST_TEMP0 0x60 | ||
| 49 | #define EXYNOS4210_TMU_REG_PAST_TEMP1 0x64 | ||
| 50 | #define EXYNOS4210_TMU_REG_PAST_TEMP2 0x68 | ||
| 51 | #define EXYNOS4210_TMU_REG_PAST_TEMP3 0x6C | ||
| 52 | |||
| 53 | #define EXYNOS4210_TMU_TRIG_LEVEL0_MASK 0x1 | ||
| 54 | #define EXYNOS4210_TMU_TRIG_LEVEL1_MASK 0x10 | ||
| 55 | #define EXYNOS4210_TMU_TRIG_LEVEL2_MASK 0x100 | ||
| 56 | #define EXYNOS4210_TMU_TRIG_LEVEL3_MASK 0x1000 | ||
| 57 | #define EXYNOS4210_TMU_TRIG_LEVEL_MASK 0x1111 | ||
| 58 | #define EXYNOS4210_TMU_INTCLEAR_VAL 0x1111 | ||
| 59 | |||
| 60 | /* Exynos5250 and Exynos4412 specific registers */ | ||
| 61 | #define EXYNOS_TMU_TRIMINFO_CON 0x14 | ||
| 62 | #define EXYNOS_THD_TEMP_RISE 0x50 | 51 | #define EXYNOS_THD_TEMP_RISE 0x50 |
| 63 | #define EXYNOS_THD_TEMP_FALL 0x54 | 52 | #define EXYNOS_THD_TEMP_FALL 0x54 |
| 64 | #define EXYNOS_EMUL_CON 0x80 | 53 | #define EXYNOS_EMUL_CON 0x80 |
| 65 | 54 | ||
| 66 | #define EXYNOS_TRIMINFO_RELOAD_SHIFT 1 | 55 | #define EXYNOS_TRIMINFO_RELOAD_ENABLE 1 |
| 67 | #define EXYNOS_TRIMINFO_25_SHIFT 0 | 56 | #define EXYNOS_TRIMINFO_25_SHIFT 0 |
| 68 | #define EXYNOS_TRIMINFO_85_SHIFT 8 | 57 | #define EXYNOS_TRIMINFO_85_SHIFT 8 |
| 69 | #define EXYNOS_TMU_RISE_INT_MASK 0x111 | ||
| 70 | #define EXYNOS_TMU_RISE_INT_SHIFT 0 | ||
| 71 | #define EXYNOS_TMU_FALL_INT_MASK 0x111 | ||
| 72 | #define EXYNOS_TMU_CLEAR_RISE_INT 0x111 | ||
| 73 | #define EXYNOS_TMU_CLEAR_FALL_INT (0x111 << 12) | ||
| 74 | #define EXYNOS_TMU_CLEAR_FALL_INT_SHIFT 12 | ||
| 75 | #define EXYNOS5420_TMU_CLEAR_FALL_INT_SHIFT 16 | ||
| 76 | #define EXYNOS5440_TMU_CLEAR_FALL_INT_SHIFT 4 | ||
| 77 | #define EXYNOS_TMU_TRIP_MODE_SHIFT 13 | 58 | #define EXYNOS_TMU_TRIP_MODE_SHIFT 13 |
| 78 | #define EXYNOS_TMU_TRIP_MODE_MASK 0x7 | 59 | #define EXYNOS_TMU_TRIP_MODE_MASK 0x7 |
| 79 | #define EXYNOS_TMU_THERM_TRIP_EN_SHIFT 12 | 60 | #define EXYNOS_TMU_THERM_TRIP_EN_SHIFT 12 |
| 80 | #define EXYNOS_TMU_CALIB_MODE_SHIFT 4 | ||
| 81 | #define EXYNOS_TMU_CALIB_MODE_MASK 0x3 | ||
| 82 | 61 | ||
| 83 | #define EXYNOS_TMU_INTEN_RISE0_SHIFT 0 | 62 | #define EXYNOS_TMU_INTEN_RISE0_SHIFT 0 |
| 84 | #define EXYNOS_TMU_INTEN_RISE1_SHIFT 4 | 63 | #define EXYNOS_TMU_INTEN_RISE1_SHIFT 4 |
| 85 | #define EXYNOS_TMU_INTEN_RISE2_SHIFT 8 | 64 | #define EXYNOS_TMU_INTEN_RISE2_SHIFT 8 |
| 86 | #define EXYNOS_TMU_INTEN_RISE3_SHIFT 12 | 65 | #define EXYNOS_TMU_INTEN_RISE3_SHIFT 12 |
| 87 | #define EXYNOS_TMU_INTEN_FALL0_SHIFT 16 | 66 | #define EXYNOS_TMU_INTEN_FALL0_SHIFT 16 |
| 88 | #define EXYNOS_TMU_INTEN_FALL1_SHIFT 20 | ||
| 89 | #define EXYNOS_TMU_INTEN_FALL2_SHIFT 24 | ||
| 90 | #define EXYNOS_TMU_INTEN_FALL3_SHIFT 28 | ||
| 91 | 67 | ||
| 92 | #define EXYNOS_EMUL_TIME 0x57F0 | 68 | #define EXYNOS_EMUL_TIME 0x57F0 |
| 93 | #define EXYNOS_EMUL_TIME_MASK 0xffff | 69 | #define EXYNOS_EMUL_TIME_MASK 0xffff |
| @@ -103,10 +79,6 @@ | |||
| 103 | #define EXYNOS5260_TMU_REG_INTEN 0xC0 | 79 | #define EXYNOS5260_TMU_REG_INTEN 0xC0 |
| 104 | #define EXYNOS5260_TMU_REG_INTSTAT 0xC4 | 80 | #define EXYNOS5260_TMU_REG_INTSTAT 0xC4 |
| 105 | #define EXYNOS5260_TMU_REG_INTCLEAR 0xC8 | 81 | #define EXYNOS5260_TMU_REG_INTCLEAR 0xC8 |
| 106 | #define EXYNOS5260_TMU_CLEAR_RISE_INT 0x1111 | ||
| 107 | #define EXYNOS5260_TMU_CLEAR_FALL_INT (0x1111 << 16) | ||
| 108 | #define EXYNOS5260_TMU_RISE_INT_MASK 0x1111 | ||
| 109 | #define EXYNOS5260_TMU_FALL_INT_MASK 0x1111 | ||
| 110 | #define EXYNOS5260_EMUL_CON 0x100 | 82 | #define EXYNOS5260_EMUL_CON 0x100 |
| 111 | 83 | ||
| 112 | /* Exynos4412 specific */ | 84 | /* Exynos4412 specific */ |
| @@ -122,29 +94,17 @@ | |||
| 122 | #define EXYNOS5440_TMU_S0_7_TH0 0x110 | 94 | #define EXYNOS5440_TMU_S0_7_TH0 0x110 |
| 123 | #define EXYNOS5440_TMU_S0_7_TH1 0x130 | 95 | #define EXYNOS5440_TMU_S0_7_TH1 0x130 |
| 124 | #define EXYNOS5440_TMU_S0_7_TH2 0x150 | 96 | #define EXYNOS5440_TMU_S0_7_TH2 0x150 |
| 125 | #define EXYNOS5440_TMU_S0_7_EVTEN 0x1F0 | ||
| 126 | #define EXYNOS5440_TMU_S0_7_IRQEN 0x210 | 97 | #define EXYNOS5440_TMU_S0_7_IRQEN 0x210 |
| 127 | #define EXYNOS5440_TMU_S0_7_IRQ 0x230 | 98 | #define EXYNOS5440_TMU_S0_7_IRQ 0x230 |
| 128 | /* exynos5440 common registers */ | 99 | /* exynos5440 common registers */ |
| 129 | #define EXYNOS5440_TMU_IRQ_STATUS 0x000 | 100 | #define EXYNOS5440_TMU_IRQ_STATUS 0x000 |
| 130 | #define EXYNOS5440_TMU_PMIN 0x004 | 101 | #define EXYNOS5440_TMU_PMIN 0x004 |
| 131 | #define EXYNOS5440_TMU_TEMP 0x008 | ||
| 132 | 102 | ||
| 133 | #define EXYNOS5440_TMU_RISE_INT_MASK 0xf | ||
| 134 | #define EXYNOS5440_TMU_RISE_INT_SHIFT 0 | ||
| 135 | #define EXYNOS5440_TMU_FALL_INT_MASK 0xf | ||
| 136 | #define EXYNOS5440_TMU_INTEN_RISE0_SHIFT 0 | 103 | #define EXYNOS5440_TMU_INTEN_RISE0_SHIFT 0 |
| 137 | #define EXYNOS5440_TMU_INTEN_RISE1_SHIFT 1 | 104 | #define EXYNOS5440_TMU_INTEN_RISE1_SHIFT 1 |
| 138 | #define EXYNOS5440_TMU_INTEN_RISE2_SHIFT 2 | 105 | #define EXYNOS5440_TMU_INTEN_RISE2_SHIFT 2 |
| 139 | #define EXYNOS5440_TMU_INTEN_RISE3_SHIFT 3 | 106 | #define EXYNOS5440_TMU_INTEN_RISE3_SHIFT 3 |
| 140 | #define EXYNOS5440_TMU_INTEN_FALL0_SHIFT 4 | 107 | #define EXYNOS5440_TMU_INTEN_FALL0_SHIFT 4 |
| 141 | #define EXYNOS5440_TMU_INTEN_FALL1_SHIFT 5 | ||
| 142 | #define EXYNOS5440_TMU_INTEN_FALL2_SHIFT 6 | ||
| 143 | #define EXYNOS5440_TMU_INTEN_FALL3_SHIFT 7 | ||
| 144 | #define EXYNOS5440_TMU_TH_RISE0_SHIFT 0 | ||
| 145 | #define EXYNOS5440_TMU_TH_RISE1_SHIFT 8 | ||
| 146 | #define EXYNOS5440_TMU_TH_RISE2_SHIFT 16 | ||
| 147 | #define EXYNOS5440_TMU_TH_RISE3_SHIFT 24 | ||
| 148 | #define EXYNOS5440_TMU_TH_RISE4_SHIFT 24 | 108 | #define EXYNOS5440_TMU_TH_RISE4_SHIFT 24 |
| 149 | #define EXYNOS5440_EFUSE_SWAP_OFFSET 8 | 109 | #define EXYNOS5440_EFUSE_SWAP_OFFSET 8 |
| 150 | 110 | ||
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 9bf10aa6069b..43b90709585f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
| @@ -1575,8 +1575,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, | |||
| 1575 | 1575 | ||
| 1576 | thermal_zone_device_update(tz); | 1576 | thermal_zone_device_update(tz); |
| 1577 | 1577 | ||
| 1578 | if (!result) | 1578 | return tz; |
| 1579 | return tz; | ||
| 1580 | 1579 | ||
| 1581 | unregister: | 1580 | unregister: |
| 1582 | release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id); | 1581 | release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id); |
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 89c4cee253e3..2e900a98c3e3 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
| @@ -2413,12 +2413,17 @@ static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file, | |||
| 2413 | 2413 | ||
| 2414 | poll_wait(file, &tty->read_wait, wait); | 2414 | poll_wait(file, &tty->read_wait, wait); |
| 2415 | poll_wait(file, &tty->write_wait, wait); | 2415 | poll_wait(file, &tty->write_wait, wait); |
| 2416 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | ||
| 2417 | mask |= POLLHUP; | ||
| 2416 | if (input_available_p(tty, 1)) | 2418 | if (input_available_p(tty, 1)) |
| 2417 | mask |= POLLIN | POLLRDNORM; | 2419 | mask |= POLLIN | POLLRDNORM; |
| 2420 | else if (mask & POLLHUP) { | ||
| 2421 | tty_flush_to_ldisc(tty); | ||
| 2422 | if (input_available_p(tty, 1)) | ||
| 2423 | mask |= POLLIN | POLLRDNORM; | ||
| 2424 | } | ||
| 2418 | if (tty->packet && tty->link->ctrl_status) | 2425 | if (tty->packet && tty->link->ctrl_status) |
| 2419 | mask |= POLLPRI | POLLIN | POLLRDNORM; | 2426 | mask |= POLLPRI | POLLIN | POLLRDNORM; |
| 2420 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | ||
| 2421 | mask |= POLLHUP; | ||
| 2422 | if (tty_hung_up_p(file)) | 2427 | if (tty_hung_up_p(file)) |
| 2423 | mask |= POLLHUP; | 2428 | mask |= POLLHUP; |
| 2424 | if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { | 2429 | if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { |
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index 8f37d57165ec..de7aae523b37 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c | |||
| @@ -81,7 +81,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, | |||
| 81 | /* Set to highest baudrate supported */ | 81 | /* Set to highest baudrate supported */ |
| 82 | if (baud >= 1152000) | 82 | if (baud >= 1152000) |
| 83 | baud = 921600; | 83 | baud = 921600; |
| 84 | quot = DIV_ROUND_CLOSEST(port->uartclk, 256 * baud); | 84 | quot = (port->uartclk / (256 * baud)) + 1; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | /* | 87 | /* |
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 8bc2563335ae..56982da4a9e9 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c | |||
| @@ -158,7 +158,7 @@ static int of_platform_serial_probe(struct platform_device *ofdev) | |||
| 158 | if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) | 158 | if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) |
| 159 | return -EBUSY; | 159 | return -EBUSY; |
| 160 | 160 | ||
| 161 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 161 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
| 162 | if (info == NULL) | 162 | if (info == NULL) |
| 163 | return -ENOMEM; | 163 | return -ENOMEM; |
| 164 | 164 | ||
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index df3a8c74358e..eaeb9a02c7fe 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
| @@ -363,7 +363,7 @@ uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, | |||
| 363 | * The spd_hi, spd_vhi, spd_shi, spd_warp kludge... | 363 | * The spd_hi, spd_vhi, spd_shi, spd_warp kludge... |
| 364 | * Die! Die! Die! | 364 | * Die! Die! Die! |
| 365 | */ | 365 | */ |
| 366 | if (baud == 38400) | 366 | if (try == 0 && baud == 38400) |
| 367 | baud = altbaud; | 367 | baud = altbaud; |
| 368 | 368 | ||
| 369 | /* | 369 | /* |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 16a2c0237dd6..0508a1d8e4cd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
| @@ -1709,6 +1709,8 @@ int tty_release(struct inode *inode, struct file *filp) | |||
| 1709 | int pty_master, tty_closing, o_tty_closing, do_sleep; | 1709 | int pty_master, tty_closing, o_tty_closing, do_sleep; |
| 1710 | int idx; | 1710 | int idx; |
| 1711 | char buf[64]; | 1711 | char buf[64]; |
| 1712 | long timeout = 0; | ||
| 1713 | int once = 1; | ||
| 1712 | 1714 | ||
| 1713 | if (tty_paranoia_check(tty, inode, __func__)) | 1715 | if (tty_paranoia_check(tty, inode, __func__)) |
| 1714 | return 0; | 1716 | return 0; |
| @@ -1789,11 +1791,18 @@ int tty_release(struct inode *inode, struct file *filp) | |||
| 1789 | if (!do_sleep) | 1791 | if (!do_sleep) |
| 1790 | break; | 1792 | break; |
| 1791 | 1793 | ||
| 1792 | printk(KERN_WARNING "%s: %s: read/write wait queue active!\n", | 1794 | if (once) { |
| 1793 | __func__, tty_name(tty, buf)); | 1795 | once = 0; |
| 1796 | printk(KERN_WARNING "%s: %s: read/write wait queue active!\n", | ||
| 1797 | __func__, tty_name(tty, buf)); | ||
| 1798 | } | ||
| 1794 | tty_unlock_pair(tty, o_tty); | 1799 | tty_unlock_pair(tty, o_tty); |
| 1795 | mutex_unlock(&tty_mutex); | 1800 | mutex_unlock(&tty_mutex); |
| 1796 | schedule(); | 1801 | schedule_timeout_killable(timeout); |
| 1802 | if (timeout < 120 * HZ) | ||
| 1803 | timeout = 2 * timeout + 1; | ||
| 1804 | else | ||
| 1805 | timeout = MAX_SCHEDULE_TIMEOUT; | ||
| 1797 | } | 1806 | } |
| 1798 | 1807 | ||
| 1799 | /* | 1808 | /* |
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index 610b720d3b91..59b25e039968 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c | |||
| @@ -539,6 +539,12 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) | |||
| 539 | 539 | ||
| 540 | /* Save original vc_unipagdir_loc in case we allocate a new one */ | 540 | /* Save original vc_unipagdir_loc in case we allocate a new one */ |
| 541 | p = *vc->vc_uni_pagedir_loc; | 541 | p = *vc->vc_uni_pagedir_loc; |
| 542 | |||
| 543 | if (!p) { | ||
| 544 | err = -EINVAL; | ||
| 545 | |||
| 546 | goto out_unlock; | ||
| 547 | } | ||
| 542 | 548 | ||
| 543 | if (p->refcount > 1) { | 549 | if (p->refcount > 1) { |
| 544 | int j, k; | 550 | int j, k; |
| @@ -623,6 +629,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) | |||
| 623 | set_inverse_transl(vc, p, i); /* Update inverse translations */ | 629 | set_inverse_transl(vc, p, i); /* Update inverse translations */ |
| 624 | set_inverse_trans_unicode(vc, p); | 630 | set_inverse_trans_unicode(vc, p); |
| 625 | 631 | ||
| 632 | out_unlock: | ||
| 626 | console_unlock(); | 633 | console_unlock(); |
| 627 | return err; | 634 | return err; |
| 628 | } | 635 | } |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index e934e19f49f5..077d58ac3dcb 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
| @@ -60,6 +60,9 @@ static struct acm *acm_table[ACM_TTY_MINORS]; | |||
| 60 | 60 | ||
| 61 | static DEFINE_MUTEX(acm_table_lock); | 61 | static DEFINE_MUTEX(acm_table_lock); |
| 62 | 62 | ||
| 63 | static void acm_tty_set_termios(struct tty_struct *tty, | ||
| 64 | struct ktermios *termios_old); | ||
| 65 | |||
| 63 | /* | 66 | /* |
| 64 | * acm_table accessors | 67 | * acm_table accessors |
| 65 | */ | 68 | */ |
| @@ -145,8 +148,15 @@ static int acm_ctrl_msg(struct acm *acm, int request, int value, | |||
| 145 | /* devices aren't required to support these requests. | 148 | /* devices aren't required to support these requests. |
| 146 | * the cdc acm descriptor tells whether they do... | 149 | * the cdc acm descriptor tells whether they do... |
| 147 | */ | 150 | */ |
| 148 | #define acm_set_control(acm, control) \ | 151 | static inline int acm_set_control(struct acm *acm, int control) |
| 149 | acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE, control, NULL, 0) | 152 | { |
| 153 | if (acm->quirks & QUIRK_CONTROL_LINE_STATE) | ||
| 154 | return -EOPNOTSUPP; | ||
| 155 | |||
| 156 | return acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE, | ||
| 157 | control, NULL, 0); | ||
| 158 | } | ||
| 159 | |||
| 150 | #define acm_set_line(acm, line) \ | 160 | #define acm_set_line(acm, line) \ |
| 151 | acm_ctrl_msg(acm, USB_CDC_REQ_SET_LINE_CODING, 0, line, sizeof *(line)) | 161 | acm_ctrl_msg(acm, USB_CDC_REQ_SET_LINE_CODING, 0, line, sizeof *(line)) |
| 152 | #define acm_send_break(acm, ms) \ | 162 | #define acm_send_break(acm, ms) \ |
| @@ -554,6 +564,8 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty) | |||
| 554 | goto error_submit_urb; | 564 | goto error_submit_urb; |
| 555 | } | 565 | } |
| 556 | 566 | ||
| 567 | acm_tty_set_termios(tty, NULL); | ||
| 568 | |||
| 557 | /* | 569 | /* |
| 558 | * Unthrottle device in case the TTY was closed while throttled. | 570 | * Unthrottle device in case the TTY was closed while throttled. |
| 559 | */ | 571 | */ |
| @@ -980,11 +992,12 @@ static void acm_tty_set_termios(struct tty_struct *tty, | |||
| 980 | /* FIXME: Needs to clear unsupported bits in the termios */ | 992 | /* FIXME: Needs to clear unsupported bits in the termios */ |
| 981 | acm->clocal = ((termios->c_cflag & CLOCAL) != 0); | 993 | acm->clocal = ((termios->c_cflag & CLOCAL) != 0); |
| 982 | 994 | ||
| 983 | if (!newline.dwDTERate) { | 995 | if (C_BAUD(tty) == B0) { |
| 984 | newline.dwDTERate = acm->line.dwDTERate; | 996 | newline.dwDTERate = acm->line.dwDTERate; |
| 985 | newctrl &= ~ACM_CTRL_DTR; | 997 | newctrl &= ~ACM_CTRL_DTR; |
| 986 | } else | 998 | } else if (termios_old && (termios_old->c_cflag & CBAUD) == B0) { |
| 987 | newctrl |= ACM_CTRL_DTR; | 999 | newctrl |= ACM_CTRL_DTR; |
| 1000 | } | ||
| 988 | 1001 | ||
| 989 | if (newctrl != acm->ctrlout) | 1002 | if (newctrl != acm->ctrlout) |
| 990 | acm_set_control(acm, acm->ctrlout = newctrl); | 1003 | acm_set_control(acm, acm->ctrlout = newctrl); |
| @@ -1314,6 +1327,7 @@ made_compressed_probe: | |||
| 1314 | tty_port_init(&acm->port); | 1327 | tty_port_init(&acm->port); |
| 1315 | acm->port.ops = &acm_port_ops; | 1328 | acm->port.ops = &acm_port_ops; |
| 1316 | init_usb_anchor(&acm->delayed); | 1329 | init_usb_anchor(&acm->delayed); |
| 1330 | acm->quirks = quirks; | ||
| 1317 | 1331 | ||
| 1318 | buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); | 1332 | buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); |
| 1319 | if (!buf) { | 1333 | if (!buf) { |
| @@ -1681,6 +1695,9 @@ static const struct usb_device_id acm_ids[] = { | |||
| 1681 | { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */ | 1695 | { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */ |
| 1682 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ | 1696 | .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ |
| 1683 | }, | 1697 | }, |
| 1698 | { USB_DEVICE(0x20df, 0x0001), /* Simtec Electronics Entropy Key */ | ||
| 1699 | .driver_info = QUIRK_CONTROL_LINE_STATE, }, | ||
| 1700 | { USB_DEVICE(0x2184, 0x001c) }, /* GW Instek AFG-2225 */ | ||
| 1684 | { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ | 1701 | { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ |
| 1685 | }, | 1702 | }, |
| 1686 | /* Motorola H24 HSPA module: */ | 1703 | /* Motorola H24 HSPA module: */ |
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index fc75651afe1c..d3251ebd09e2 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h | |||
| @@ -121,6 +121,7 @@ struct acm { | |||
| 121 | unsigned int throttle_req:1; /* throttle requested */ | 121 | unsigned int throttle_req:1; /* throttle requested */ |
| 122 | u8 bInterval; | 122 | u8 bInterval; |
| 123 | struct usb_anchor delayed; /* writes queued for a device about to be woken */ | 123 | struct usb_anchor delayed; /* writes queued for a device about to be woken */ |
| 124 | unsigned long quirks; | ||
| 124 | }; | 125 | }; |
| 125 | 126 | ||
| 126 | #define CDC_DATA_INTERFACE_TYPE 0x0a | 127 | #define CDC_DATA_INTERFACE_TYPE 0x0a |
| @@ -132,3 +133,4 @@ struct acm { | |||
| 132 | #define NOT_A_MODEM BIT(3) | 133 | #define NOT_A_MODEM BIT(3) |
| 133 | #define NO_DATA_INTERFACE BIT(4) | 134 | #define NO_DATA_INTERFACE BIT(4) |
| 134 | #define IGNORE_DEVICE BIT(5) | 135 | #define IGNORE_DEVICE BIT(5) |
| 136 | #define QUIRK_CONTROL_LINE_STATE BIT(6) | ||
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index b84fb141e122..a6efb4184f2b 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
| @@ -2060,6 +2060,8 @@ int usb_alloc_streams(struct usb_interface *interface, | |||
| 2060 | return -EINVAL; | 2060 | return -EINVAL; |
| 2061 | if (dev->speed != USB_SPEED_SUPER) | 2061 | if (dev->speed != USB_SPEED_SUPER) |
| 2062 | return -EINVAL; | 2062 | return -EINVAL; |
| 2063 | if (dev->state < USB_STATE_CONFIGURED) | ||
| 2064 | return -ENODEV; | ||
| 2063 | 2065 | ||
| 2064 | for (i = 0; i < num_eps; i++) { | 2066 | for (i = 0; i < num_eps; i++) { |
| 2065 | /* Streams only apply to bulk endpoints. */ | 2067 | /* Streams only apply to bulk endpoints. */ |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 11e80ac31324..b649fef2e35d 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -4468,9 +4468,6 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
| 4468 | if (retval) | 4468 | if (retval) |
| 4469 | goto fail; | 4469 | goto fail; |
| 4470 | 4470 | ||
| 4471 | if (hcd->usb_phy && !hdev->parent) | ||
| 4472 | usb_phy_notify_connect(hcd->usb_phy, udev->speed); | ||
| 4473 | |||
| 4474 | /* | 4471 | /* |
| 4475 | * Some superspeed devices have finished the link training process | 4472 | * Some superspeed devices have finished the link training process |
| 4476 | * and attached to a superspeed hub port, but the device descriptor | 4473 | * and attached to a superspeed hub port, but the device descriptor |
| @@ -4627,8 +4624,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, | |||
| 4627 | 4624 | ||
| 4628 | /* Disconnect any existing devices under this port */ | 4625 | /* Disconnect any existing devices under this port */ |
| 4629 | if (udev) { | 4626 | if (udev) { |
| 4630 | if (hcd->usb_phy && !hdev->parent && | 4627 | if (hcd->usb_phy && !hdev->parent) |
| 4631 | !(portstatus & USB_PORT_STAT_CONNECTION)) | ||
| 4632 | usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); | 4628 | usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); |
| 4633 | usb_disconnect(&port_dev->child); | 4629 | usb_disconnect(&port_dev->child); |
| 4634 | } | 4630 | } |
| @@ -4783,6 +4779,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, | |||
| 4783 | port_dev->child = NULL; | 4779 | port_dev->child = NULL; |
| 4784 | spin_unlock_irq(&device_state_lock); | 4780 | spin_unlock_irq(&device_state_lock); |
| 4785 | mutex_unlock(&usb_port_peer_mutex); | 4781 | mutex_unlock(&usb_port_peer_mutex); |
| 4782 | } else { | ||
| 4783 | if (hcd->usb_phy && !hdev->parent) | ||
| 4784 | usb_phy_notify_connect(hcd->usb_phy, | ||
| 4785 | udev->speed); | ||
| 4786 | } | 4786 | } |
| 4787 | } | 4787 | } |
| 4788 | 4788 | ||
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 5ae883dc21f5..39b4081b632d 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
| @@ -97,6 +97,12 @@ static const struct usb_device_id usb_quirk_list[] = { | |||
| 97 | { USB_DEVICE(0x04f3, 0x0089), .driver_info = | 97 | { USB_DEVICE(0x04f3, 0x0089), .driver_info = |
| 98 | USB_QUIRK_DEVICE_QUALIFIER }, | 98 | USB_QUIRK_DEVICE_QUALIFIER }, |
| 99 | 99 | ||
| 100 | { USB_DEVICE(0x04f3, 0x009b), .driver_info = | ||
| 101 | USB_QUIRK_DEVICE_QUALIFIER }, | ||
| 102 | |||
| 103 | { USB_DEVICE(0x04f3, 0x016f), .driver_info = | ||
| 104 | USB_QUIRK_DEVICE_QUALIFIER }, | ||
| 105 | |||
| 100 | /* Roland SC-8820 */ | 106 | /* Roland SC-8820 */ |
| 101 | { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, | 107 | { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 102 | 108 | ||
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index eee87098bb8b..8b5c079c7b7d 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
| @@ -2327,7 +2327,7 @@ irq_retry: | |||
| 2327 | 2327 | ||
| 2328 | u32 usb_status = readl(hsotg->regs + GOTGCTL); | 2328 | u32 usb_status = readl(hsotg->regs + GOTGCTL); |
| 2329 | 2329 | ||
| 2330 | dev_info(hsotg->dev, "%s: USBRst\n", __func__); | 2330 | dev_dbg(hsotg->dev, "%s: USBRst\n", __func__); |
| 2331 | dev_dbg(hsotg->dev, "GNPTXSTS=%08x\n", | 2331 | dev_dbg(hsotg->dev, "GNPTXSTS=%08x\n", |
| 2332 | readl(hsotg->regs + GNPTXSTS)); | 2332 | readl(hsotg->regs + GNPTXSTS)); |
| 2333 | 2333 | ||
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index a8a30b1d4167..a3ca1375dd52 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
| @@ -234,7 +234,7 @@ config USB_EHCI_SH | |||
| 234 | 234 | ||
| 235 | config USB_EHCI_EXYNOS | 235 | config USB_EHCI_EXYNOS |
| 236 | tristate "EHCI support for Samsung S5P/EXYNOS SoC Series" | 236 | tristate "EHCI support for Samsung S5P/EXYNOS SoC Series" |
| 237 | depends on PLAT_S5P || ARCH_EXYNOS | 237 | depends on ARCH_S5PV210 || ARCH_EXYNOS |
| 238 | help | 238 | help |
| 239 | Enable support for the Samsung Exynos SOC's on-chip EHCI controller. | 239 | Enable support for the Samsung Exynos SOC's on-chip EHCI controller. |
| 240 | 240 | ||
| @@ -550,7 +550,7 @@ config USB_OHCI_SH | |||
| 550 | 550 | ||
| 551 | config USB_OHCI_EXYNOS | 551 | config USB_OHCI_EXYNOS |
| 552 | tristate "OHCI support for Samsung S5P/EXYNOS SoC Series" | 552 | tristate "OHCI support for Samsung S5P/EXYNOS SoC Series" |
| 553 | depends on PLAT_S5P || ARCH_EXYNOS | 553 | depends on ARCH_S5PV210 || ARCH_EXYNOS |
| 554 | help | 554 | help |
| 555 | Enable support for the Samsung Exynos SOC's on-chip OHCI controller. | 555 | Enable support for the Samsung Exynos SOC's on-chip OHCI controller. |
| 556 | 556 | ||
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c index d0d8fadf7066..1db0626c8bf4 100644 --- a/drivers/usb/host/hwa-hc.c +++ b/drivers/usb/host/hwa-hc.c | |||
| @@ -607,7 +607,7 @@ found: | |||
| 607 | wa->wa_descr = wa_descr = (struct usb_wa_descriptor *) hdr; | 607 | wa->wa_descr = wa_descr = (struct usb_wa_descriptor *) hdr; |
| 608 | if (le16_to_cpu(wa_descr->bcdWAVersion) > 0x0100) | 608 | if (le16_to_cpu(wa_descr->bcdWAVersion) > 0x0100) |
| 609 | dev_warn(dev, "Wire Adapter v%d.%d newer than groked v1.0\n", | 609 | dev_warn(dev, "Wire Adapter v%d.%d newer than groked v1.0\n", |
| 610 | le16_to_cpu(wa_descr->bcdWAVersion) & 0xff00 >> 8, | 610 | (le16_to_cpu(wa_descr->bcdWAVersion) & 0xff00) >> 8, |
| 611 | le16_to_cpu(wa_descr->bcdWAVersion) & 0x00ff); | 611 | le16_to_cpu(wa_descr->bcdWAVersion) & 0x00ff); |
| 612 | result = 0; | 612 | result = 0; |
| 613 | error: | 613 | error: |
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 280dde93abe5..9a69b1f1b300 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
| @@ -128,20 +128,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
| 128 | xhci->quirks |= XHCI_AVOID_BEI; | 128 | xhci->quirks |= XHCI_AVOID_BEI; |
| 129 | } | 129 | } |
| 130 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | 130 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && |
| 131 | (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI || | ||
| 132 | pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI)) { | ||
| 133 | /* Workaround for occasional spurious wakeups from S5 (or | ||
| 134 | * any other sleep) on Haswell machines with LPT and LPT-LP | ||
| 135 | * with the new Intel BIOS | ||
| 136 | */ | ||
| 137 | /* Limit the quirk to only known vendors, as this triggers | ||
| 138 | * yet another BIOS bug on some other machines | ||
| 139 | * https://bugzilla.kernel.org/show_bug.cgi?id=66171 | ||
| 140 | */ | ||
| 141 | if (pdev->subsystem_vendor == PCI_VENDOR_ID_HP) | ||
| 142 | xhci->quirks |= XHCI_SPURIOUS_WAKEUP; | ||
| 143 | } | ||
| 144 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | ||
| 145 | pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) { | 131 | pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) { |
| 146 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; | 132 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
| 147 | } | 133 | } |
| @@ -162,6 +148,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
| 162 | pdev->device == 0x3432) | 148 | pdev->device == 0x3432) |
| 163 | xhci->quirks |= XHCI_BROKEN_STREAMS; | 149 | xhci->quirks |= XHCI_BROKEN_STREAMS; |
| 164 | 150 | ||
| 151 | if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && | ||
| 152 | pdev->device == 0x1042) | ||
| 153 | xhci->quirks |= XHCI_BROKEN_STREAMS; | ||
| 154 | |||
| 165 | if (xhci->quirks & XHCI_RESET_ON_RESUME) | 155 | if (xhci->quirks & XHCI_RESET_ON_RESUME) |
| 166 | xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, | 156 | xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, |
| 167 | "QUIRK: Resetting on resume"); | 157 | "QUIRK: Resetting on resume"); |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 3d2bd65df0fc..02c420af251e 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
| @@ -335,7 +335,8 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
| 335 | port->interrupt_out_urb->transfer_buffer_length = length; | 335 | port->interrupt_out_urb->transfer_buffer_length = length; |
| 336 | 336 | ||
| 337 | priv->cur_pos = priv->cur_pos + length; | 337 | priv->cur_pos = priv->cur_pos + length; |
| 338 | result = usb_submit_urb(port->interrupt_out_urb, GFP_NOIO); | 338 | result = usb_submit_urb(port->interrupt_out_urb, |
| 339 | GFP_ATOMIC); | ||
| 339 | dev_dbg(&port->dev, "%s - Send write URB returns: %i\n", __func__, result); | 340 | dev_dbg(&port->dev, "%s - Send write URB returns: %i\n", __func__, result); |
| 340 | todo = priv->filled - priv->cur_pos; | 341 | todo = priv->filled - priv->cur_pos; |
| 341 | 342 | ||
| @@ -350,7 +351,7 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
| 350 | if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || | 351 | if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || |
| 351 | priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) { | 352 | priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) { |
| 352 | result = usb_submit_urb(port->interrupt_in_urb, | 353 | result = usb_submit_urb(port->interrupt_in_urb, |
| 353 | GFP_NOIO); | 354 | GFP_ATOMIC); |
| 354 | dev_dbg(&port->dev, "%s - Send read URB returns: %i\n", __func__, result); | 355 | dev_dbg(&port->dev, "%s - Send read URB returns: %i\n", __func__, result); |
| 355 | } | 356 | } |
| 356 | } | 357 | } |
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 4856fb7e637e..4b7bfb394a32 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
| @@ -215,7 +215,7 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
| 215 | 215 | ||
| 216 | /* The connected devices do not have a bulk write endpoint, | 216 | /* The connected devices do not have a bulk write endpoint, |
| 217 | * to transmit data to de barcode device the control endpoint is used */ | 217 | * to transmit data to de barcode device the control endpoint is used */ |
| 218 | dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); | 218 | dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC); |
| 219 | if (!dr) { | 219 | if (!dr) { |
| 220 | count = -ENOMEM; | 220 | count = -ENOMEM; |
| 221 | goto error_no_dr; | 221 | goto error_no_dr; |
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c index 4bc2fc98636e..73f125e0cb58 100644 --- a/drivers/usb/storage/initializers.c +++ b/drivers/usb/storage/initializers.c | |||
| @@ -52,7 +52,7 @@ int usb_stor_euscsi_init(struct us_data *us) | |||
| 52 | us->iobuf[0] = 0x1; | 52 | us->iobuf[0] = 0x1; |
| 53 | result = usb_stor_control_msg(us, us->send_ctrl_pipe, | 53 | result = usb_stor_control_msg(us, us->send_ctrl_pipe, |
| 54 | 0x0C, USB_RECIP_INTERFACE | USB_TYPE_VENDOR, | 54 | 0x0C, USB_RECIP_INTERFACE | USB_TYPE_VENDOR, |
| 55 | 0x01, 0x0, us->iobuf, 0x1, USB_CTRL_SET_TIMEOUT); | 55 | 0x01, 0x0, us->iobuf, 0x1, 5 * HZ); |
| 56 | usb_stor_dbg(us, "-- result is %d\n", result); | 56 | usb_stor_dbg(us, "-- result is %d\n", result); |
| 57 | 57 | ||
| 58 | return 0; | 58 | return 0; |
| @@ -100,7 +100,7 @@ int usb_stor_huawei_e220_init(struct us_data *us) | |||
| 100 | result = usb_stor_control_msg(us, us->send_ctrl_pipe, | 100 | result = usb_stor_control_msg(us, us->send_ctrl_pipe, |
| 101 | USB_REQ_SET_FEATURE, | 101 | USB_REQ_SET_FEATURE, |
| 102 | USB_TYPE_STANDARD | USB_RECIP_DEVICE, | 102 | USB_TYPE_STANDARD | USB_RECIP_DEVICE, |
| 103 | 0x01, 0x0, NULL, 0x0, 1000); | 103 | 0x01, 0x0, NULL, 0x0, 1 * HZ); |
| 104 | usb_stor_dbg(us, "Huawei mode set result is %d\n", result); | 104 | usb_stor_dbg(us, "Huawei mode set result is %d\n", result); |
| 105 | return 0; | 105 | return 0; |
| 106 | } | 106 | } |
diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 8591d89a38e6..27e4a580d2ed 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c | |||
| @@ -626,6 +626,7 @@ static int config_autodelink_after_power_on(struct us_data *us) | |||
| 626 | return 0; | 626 | return 0; |
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | #ifdef CONFIG_PM | ||
| 629 | static int config_autodelink_before_power_down(struct us_data *us) | 630 | static int config_autodelink_before_power_down(struct us_data *us) |
| 630 | { | 631 | { |
| 631 | struct rts51x_chip *chip = (struct rts51x_chip *)(us->extra); | 632 | struct rts51x_chip *chip = (struct rts51x_chip *)(us->extra); |
| @@ -716,6 +717,7 @@ static void fw5895_init(struct us_data *us) | |||
| 716 | } | 717 | } |
| 717 | } | 718 | } |
| 718 | } | 719 | } |
| 720 | #endif | ||
| 719 | 721 | ||
| 720 | #ifdef CONFIG_REALTEK_AUTOPM | 722 | #ifdef CONFIG_REALTEK_AUTOPM |
| 721 | static void fw5895_set_mmc_wp(struct us_data *us) | 723 | static void fw5895_set_mmc_wp(struct us_data *us) |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 22c7d4360fa2..b1d815eb6d0b 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
| @@ -1118,6 +1118,31 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
| 1118 | */ | 1118 | */ |
| 1119 | if (result == USB_STOR_XFER_LONG) | 1119 | if (result == USB_STOR_XFER_LONG) |
| 1120 | fake_sense = 1; | 1120 | fake_sense = 1; |
| 1121 | |||
| 1122 | /* | ||
| 1123 | * Sometimes a device will mistakenly skip the data phase | ||
| 1124 | * and go directly to the status phase without sending a | ||
| 1125 | * zero-length packet. If we get a 13-byte response here, | ||
| 1126 | * check whether it really is a CSW. | ||
| 1127 | */ | ||
| 1128 | if (result == USB_STOR_XFER_SHORT && | ||
| 1129 | srb->sc_data_direction == DMA_FROM_DEVICE && | ||
| 1130 | transfer_length - scsi_get_resid(srb) == | ||
| 1131 | US_BULK_CS_WRAP_LEN) { | ||
| 1132 | struct scatterlist *sg = NULL; | ||
| 1133 | unsigned int offset = 0; | ||
| 1134 | |||
| 1135 | if (usb_stor_access_xfer_buf((unsigned char *) bcs, | ||
| 1136 | US_BULK_CS_WRAP_LEN, srb, &sg, | ||
| 1137 | &offset, FROM_XFER_BUF) == | ||
| 1138 | US_BULK_CS_WRAP_LEN && | ||
| 1139 | bcs->Signature == | ||
| 1140 | cpu_to_le32(US_BULK_CS_SIGN)) { | ||
| 1141 | usb_stor_dbg(us, "Device skipped data phase\n"); | ||
| 1142 | scsi_set_resid(srb, transfer_length); | ||
| 1143 | goto skipped_data_phase; | ||
| 1144 | } | ||
| 1145 | } | ||
| 1121 | } | 1146 | } |
| 1122 | 1147 | ||
| 1123 | /* See flow chart on pg 15 of the Bulk Only Transport spec for | 1148 | /* See flow chart on pg 15 of the Bulk Only Transport spec for |
| @@ -1153,6 +1178,7 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
| 1153 | if (result != USB_STOR_XFER_GOOD) | 1178 | if (result != USB_STOR_XFER_GOOD) |
| 1154 | return USB_STOR_TRANSPORT_ERROR; | 1179 | return USB_STOR_TRANSPORT_ERROR; |
| 1155 | 1180 | ||
| 1181 | skipped_data_phase: | ||
| 1156 | /* check bulk status */ | 1182 | /* check bulk status */ |
| 1157 | residue = le32_to_cpu(bcs->Residue); | 1183 | residue = le32_to_cpu(bcs->Residue); |
| 1158 | usb_stor_dbg(us, "Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", | 1184 | usb_stor_dbg(us, "Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", |
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h index 8511b54a65d9..2fefaf923e4a 100644 --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h | |||
| @@ -54,6 +54,20 @@ UNUSUAL_DEV(0x0bc2, 0x3312, 0x0000, 0x9999, | |||
| 54 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 54 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 55 | US_FL_NO_ATA_1X), | 55 | US_FL_NO_ATA_1X), |
| 56 | 56 | ||
| 57 | /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ | ||
| 58 | UNUSUAL_DEV(0x0bc2, 0x3320, 0x0000, 0x9999, | ||
| 59 | "Seagate", | ||
| 60 | "Expansion Desk", | ||
| 61 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
| 62 | US_FL_NO_ATA_1X), | ||
| 63 | |||
| 64 | /* Reported-by: Bogdan Mihalcea <bogdan.mihalcea@infim.ro> */ | ||
| 65 | UNUSUAL_DEV(0x0bc2, 0xa003, 0x0000, 0x9999, | ||
| 66 | "Seagate", | ||
| 67 | "Backup Plus", | ||
| 68 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
| 69 | US_FL_NO_ATA_1X), | ||
| 70 | |||
| 57 | /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ | 71 | /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ |
| 58 | UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999, | 72 | UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999, |
| 59 | "Seagate", | 73 | "Seagate", |
| @@ -61,6 +75,13 @@ UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999, | |||
| 61 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 75 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 62 | US_FL_NO_ATA_1X), | 76 | US_FL_NO_ATA_1X), |
| 63 | 77 | ||
| 78 | /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ | ||
| 79 | UNUSUAL_DEV(0x0bc2, 0xab21, 0x0000, 0x9999, | ||
| 80 | "Seagate", | ||
| 81 | "Backup+ BK", | ||
| 82 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
| 83 | US_FL_NO_ATA_1X), | ||
| 84 | |||
| 64 | /* Reported-by: Claudio Bizzarri <claudio.bizzarri@gmail.com> */ | 85 | /* Reported-by: Claudio Bizzarri <claudio.bizzarri@gmail.com> */ |
| 65 | UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, | 86 | UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, |
| 66 | "JMicron", | 87 | "JMicron", |
| @@ -75,3 +96,10 @@ UNUSUAL_DEV(0x174c, 0x5106, 0x0000, 0x9999, | |||
| 75 | "ASM1051", | 96 | "ASM1051", |
| 76 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 97 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
| 77 | US_FL_IGNORE_UAS), | 98 | US_FL_IGNORE_UAS), |
| 99 | |||
| 100 | /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ | ||
| 101 | UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, | ||
| 102 | "VIA", | ||
| 103 | "VL711", | ||
| 104 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
| 105 | US_FL_NO_ATA_1X), | ||
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 783a94355efd..84a2d1868271 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
| @@ -413,7 +413,7 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, | |||
| 413 | ret = 0; | 413 | ret = 0; |
| 414 | fail: | 414 | fail: |
| 415 | while (ret < 0 && !list_empty(&tmplist)) { | 415 | while (ret < 0 && !list_empty(&tmplist)) { |
| 416 | sums = list_entry(&tmplist, struct btrfs_ordered_sum, list); | 416 | sums = list_entry(tmplist.next, struct btrfs_ordered_sum, list); |
| 417 | list_del(&sums->list); | 417 | list_del(&sums->list); |
| 418 | kfree(sums); | 418 | kfree(sums); |
| 419 | } | 419 | } |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 97de0fbd9f78..a96044004064 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
| @@ -925,7 +925,7 @@ static int o2net_send_tcp_msg(struct socket *sock, struct kvec *vec, | |||
| 925 | size_t veclen, size_t total) | 925 | size_t veclen, size_t total) |
| 926 | { | 926 | { |
| 927 | int ret; | 927 | int ret; |
| 928 | struct msghdr msg; | 928 | struct msghdr msg = {.msg_flags = 0,}; |
| 929 | 929 | ||
| 930 | if (sock == NULL) { | 930 | if (sock == NULL) { |
| 931 | ret = -EINVAL; | 931 | ret = -EINVAL; |
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index 4e9d7c1fea52..2a7ef4f8e2a6 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c | |||
| @@ -168,7 +168,7 @@ static void ovl_cache_put(struct ovl_dir_file *od, struct dentry *dentry) | |||
| 168 | { | 168 | { |
| 169 | struct ovl_dir_cache *cache = od->cache; | 169 | struct ovl_dir_cache *cache = od->cache; |
| 170 | 170 | ||
| 171 | list_del(&od->cursor.l_node); | 171 | list_del_init(&od->cursor.l_node); |
| 172 | WARN_ON(cache->refcount <= 0); | 172 | WARN_ON(cache->refcount <= 0); |
| 173 | cache->refcount--; | 173 | cache->refcount--; |
| 174 | if (!cache->refcount) { | 174 | if (!cache->refcount) { |
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 92e8f99a5857..281002689d64 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
| @@ -1338,7 +1338,10 @@ xfs_free_file_space( | |||
| 1338 | goto out; | 1338 | goto out; |
| 1339 | } | 1339 | } |
| 1340 | 1340 | ||
| 1341 | 1341 | /* | |
| 1342 | * Preallocate and zero a range of a file. This mechanism has the allocation | ||
| 1343 | * semantics of fallocate and in addition converts data in the range to zeroes. | ||
| 1344 | */ | ||
| 1342 | int | 1345 | int |
| 1343 | xfs_zero_file_space( | 1346 | xfs_zero_file_space( |
| 1344 | struct xfs_inode *ip, | 1347 | struct xfs_inode *ip, |
| @@ -1346,65 +1349,30 @@ xfs_zero_file_space( | |||
| 1346 | xfs_off_t len) | 1349 | xfs_off_t len) |
| 1347 | { | 1350 | { |
| 1348 | struct xfs_mount *mp = ip->i_mount; | 1351 | struct xfs_mount *mp = ip->i_mount; |
| 1349 | uint granularity; | 1352 | uint blksize; |
| 1350 | xfs_off_t start_boundary; | ||
| 1351 | xfs_off_t end_boundary; | ||
| 1352 | int error; | 1353 | int error; |
| 1353 | 1354 | ||
| 1354 | trace_xfs_zero_file_space(ip); | 1355 | trace_xfs_zero_file_space(ip); |
| 1355 | 1356 | ||
| 1356 | granularity = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE); | 1357 | blksize = 1 << mp->m_sb.sb_blocklog; |
| 1357 | 1358 | ||
| 1358 | /* | 1359 | /* |
| 1359 | * Round the range of extents we are going to convert inwards. If the | 1360 | * Punch a hole and prealloc the range. We use hole punch rather than |
| 1360 | * offset is aligned, then it doesn't get changed so we zero from the | 1361 | * unwritten extent conversion for two reasons: |
| 1361 | * start of the block offset points to. | 1362 | * |
| 1363 | * 1.) Hole punch handles partial block zeroing for us. | ||
| 1364 | * | ||
| 1365 | * 2.) If prealloc returns ENOSPC, the file range is still zero-valued | ||
| 1366 | * by virtue of the hole punch. | ||
| 1362 | */ | 1367 | */ |
| 1363 | start_boundary = round_up(offset, granularity); | 1368 | error = xfs_free_file_space(ip, offset, len); |
| 1364 | end_boundary = round_down(offset + len, granularity); | 1369 | if (error) |
| 1365 | 1370 | goto out; | |
| 1366 | ASSERT(start_boundary >= offset); | ||
| 1367 | ASSERT(end_boundary <= offset + len); | ||
| 1368 | |||
| 1369 | if (start_boundary < end_boundary - 1) { | ||
| 1370 | /* | ||
| 1371 | * Writeback the range to ensure any inode size updates due to | ||
| 1372 | * appending writes make it to disk (otherwise we could just | ||
| 1373 | * punch out the delalloc blocks). | ||
| 1374 | */ | ||
| 1375 | error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, | ||
| 1376 | start_boundary, end_boundary - 1); | ||
| 1377 | if (error) | ||
| 1378 | goto out; | ||
| 1379 | truncate_pagecache_range(VFS_I(ip), start_boundary, | ||
| 1380 | end_boundary - 1); | ||
| 1381 | |||
| 1382 | /* convert the blocks */ | ||
| 1383 | error = xfs_alloc_file_space(ip, start_boundary, | ||
| 1384 | end_boundary - start_boundary - 1, | ||
| 1385 | XFS_BMAPI_PREALLOC | XFS_BMAPI_CONVERT); | ||
| 1386 | if (error) | ||
| 1387 | goto out; | ||
| 1388 | |||
| 1389 | /* We've handled the interior of the range, now for the edges */ | ||
| 1390 | if (start_boundary != offset) { | ||
| 1391 | error = xfs_iozero(ip, offset, start_boundary - offset); | ||
| 1392 | if (error) | ||
| 1393 | goto out; | ||
| 1394 | } | ||
| 1395 | |||
| 1396 | if (end_boundary != offset + len) | ||
| 1397 | error = xfs_iozero(ip, end_boundary, | ||
| 1398 | offset + len - end_boundary); | ||
| 1399 | |||
| 1400 | } else { | ||
| 1401 | /* | ||
| 1402 | * It's either a sub-granularity range or the range spanned lies | ||
| 1403 | * partially across two adjacent blocks. | ||
| 1404 | */ | ||
| 1405 | error = xfs_iozero(ip, offset, len); | ||
| 1406 | } | ||
| 1407 | 1371 | ||
| 1372 | error = xfs_alloc_file_space(ip, round_down(offset, blksize), | ||
| 1373 | round_up(offset + len, blksize) - | ||
| 1374 | round_down(offset, blksize), | ||
| 1375 | XFS_BMAPI_PREALLOC); | ||
| 1408 | out: | 1376 | out: |
| 1409 | return error; | 1377 | return error; |
| 1410 | 1378 | ||
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index f1deb961a296..894924a5129b 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
| @@ -236,8 +236,10 @@ xfs_bulkstat_grab_ichunk( | |||
| 236 | XFS_WANT_CORRUPTED_RETURN(stat == 1); | 236 | XFS_WANT_CORRUPTED_RETURN(stat == 1); |
| 237 | 237 | ||
| 238 | /* Check if the record contains the inode in request */ | 238 | /* Check if the record contains the inode in request */ |
| 239 | if (irec->ir_startino + XFS_INODES_PER_CHUNK <= agino) | 239 | if (irec->ir_startino + XFS_INODES_PER_CHUNK <= agino) { |
| 240 | return -EINVAL; | 240 | *icount = 0; |
| 241 | return 0; | ||
| 242 | } | ||
| 241 | 243 | ||
| 242 | idx = agino - irec->ir_startino + 1; | 244 | idx = agino - irec->ir_startino + 1; |
| 243 | if (idx < XFS_INODES_PER_CHUNK && | 245 | if (idx < XFS_INODES_PER_CHUNK && |
| @@ -262,75 +264,76 @@ xfs_bulkstat_grab_ichunk( | |||
| 262 | 264 | ||
| 263 | #define XFS_BULKSTAT_UBLEFT(ubleft) ((ubleft) >= statstruct_size) | 265 | #define XFS_BULKSTAT_UBLEFT(ubleft) ((ubleft) >= statstruct_size) |
| 264 | 266 | ||
| 267 | struct xfs_bulkstat_agichunk { | ||
| 268 | char __user **ac_ubuffer;/* pointer into user's buffer */ | ||
| 269 | int ac_ubleft; /* bytes left in user's buffer */ | ||
| 270 | int ac_ubelem; /* spaces used in user's buffer */ | ||
| 271 | }; | ||
| 272 | |||
| 265 | /* | 273 | /* |
| 266 | * Process inodes in chunk with a pointer to a formatter function | 274 | * Process inodes in chunk with a pointer to a formatter function |
| 267 | * that will iget the inode and fill in the appropriate structure. | 275 | * that will iget the inode and fill in the appropriate structure. |
| 268 | */ | 276 | */ |
| 269 | int | 277 | static int |
| 270 | xfs_bulkstat_ag_ichunk( | 278 | xfs_bulkstat_ag_ichunk( |
| 271 | struct xfs_mount *mp, | 279 | struct xfs_mount *mp, |
| 272 | xfs_agnumber_t agno, | 280 | xfs_agnumber_t agno, |
| 273 | struct xfs_inobt_rec_incore *irbp, | 281 | struct xfs_inobt_rec_incore *irbp, |
| 274 | bulkstat_one_pf formatter, | 282 | bulkstat_one_pf formatter, |
| 275 | size_t statstruct_size, | 283 | size_t statstruct_size, |
| 276 | struct xfs_bulkstat_agichunk *acp) | 284 | struct xfs_bulkstat_agichunk *acp, |
| 285 | xfs_agino_t *last_agino) | ||
| 277 | { | 286 | { |
| 278 | xfs_ino_t lastino = acp->ac_lastino; | ||
| 279 | char __user **ubufp = acp->ac_ubuffer; | 287 | char __user **ubufp = acp->ac_ubuffer; |
| 280 | int ubleft = acp->ac_ubleft; | 288 | int chunkidx; |
| 281 | int ubelem = acp->ac_ubelem; | ||
| 282 | int chunkidx, clustidx; | ||
| 283 | int error = 0; | 289 | int error = 0; |
| 284 | xfs_agino_t agino; | 290 | xfs_agino_t agino = irbp->ir_startino; |
| 285 | 291 | ||
| 286 | for (agino = irbp->ir_startino, chunkidx = clustidx = 0; | 292 | for (chunkidx = 0; chunkidx < XFS_INODES_PER_CHUNK; |
| 287 | XFS_BULKSTAT_UBLEFT(ubleft) && | 293 | chunkidx++, agino++) { |
| 288 | irbp->ir_freecount < XFS_INODES_PER_CHUNK; | 294 | int fmterror; |
| 289 | chunkidx++, clustidx++, agino++) { | ||
| 290 | int fmterror; /* bulkstat formatter result */ | ||
| 291 | int ubused; | 295 | int ubused; |
| 292 | xfs_ino_t ino = XFS_AGINO_TO_INO(mp, agno, agino); | ||
| 293 | 296 | ||
| 294 | ASSERT(chunkidx < XFS_INODES_PER_CHUNK); | 297 | /* inode won't fit in buffer, we are done */ |
| 298 | if (acp->ac_ubleft < statstruct_size) | ||
| 299 | break; | ||
| 295 | 300 | ||
| 296 | /* Skip if this inode is free */ | 301 | /* Skip if this inode is free */ |
| 297 | if (XFS_INOBT_MASK(chunkidx) & irbp->ir_free) { | 302 | if (XFS_INOBT_MASK(chunkidx) & irbp->ir_free) |
| 298 | lastino = ino; | ||
| 299 | continue; | 303 | continue; |
| 300 | } | ||
| 301 | |||
| 302 | /* | ||
| 303 | * Count used inodes as free so we can tell when the | ||
| 304 | * chunk is used up. | ||
| 305 | */ | ||
| 306 | irbp->ir_freecount++; | ||
| 307 | 304 | ||
| 308 | /* Get the inode and fill in a single buffer */ | 305 | /* Get the inode and fill in a single buffer */ |
| 309 | ubused = statstruct_size; | 306 | ubused = statstruct_size; |
| 310 | error = formatter(mp, ino, *ubufp, ubleft, &ubused, &fmterror); | 307 | error = formatter(mp, XFS_AGINO_TO_INO(mp, agno, agino), |
| 311 | if (fmterror == BULKSTAT_RV_NOTHING) { | 308 | *ubufp, acp->ac_ubleft, &ubused, &fmterror); |
| 312 | if (error && error != -ENOENT && error != -EINVAL) { | 309 | |
| 313 | ubleft = 0; | 310 | if (fmterror == BULKSTAT_RV_GIVEUP || |
| 314 | break; | 311 | (error && error != -ENOENT && error != -EINVAL)) { |
| 315 | } | 312 | acp->ac_ubleft = 0; |
| 316 | lastino = ino; | ||
| 317 | continue; | ||
| 318 | } | ||
| 319 | if (fmterror == BULKSTAT_RV_GIVEUP) { | ||
| 320 | ubleft = 0; | ||
| 321 | ASSERT(error); | 313 | ASSERT(error); |
| 322 | break; | 314 | break; |
| 323 | } | 315 | } |
| 324 | if (*ubufp) | 316 | |
| 325 | *ubufp += ubused; | 317 | /* be careful not to leak error if at end of chunk */ |
| 326 | ubleft -= ubused; | 318 | if (fmterror == BULKSTAT_RV_NOTHING || error) { |
| 327 | ubelem++; | 319 | error = 0; |
| 328 | lastino = ino; | 320 | continue; |
| 321 | } | ||
| 322 | |||
| 323 | *ubufp += ubused; | ||
| 324 | acp->ac_ubleft -= ubused; | ||
| 325 | acp->ac_ubelem++; | ||
| 329 | } | 326 | } |
| 330 | 327 | ||
| 331 | acp->ac_lastino = lastino; | 328 | /* |
| 332 | acp->ac_ubleft = ubleft; | 329 | * Post-update *last_agino. At this point, agino will always point one |
| 333 | acp->ac_ubelem = ubelem; | 330 | * inode past the last inode we processed successfully. Hence we |
| 331 | * substract that inode when setting the *last_agino cursor so that we | ||
| 332 | * return the correct cookie to userspace. On the next bulkstat call, | ||
| 333 | * the inode under the lastino cookie will be skipped as we have already | ||
| 334 | * processed it here. | ||
| 335 | */ | ||
| 336 | *last_agino = agino - 1; | ||
| 334 | 337 | ||
| 335 | return error; | 338 | return error; |
| 336 | } | 339 | } |
| @@ -353,45 +356,33 @@ xfs_bulkstat( | |||
| 353 | xfs_agino_t agino; /* inode # in allocation group */ | 356 | xfs_agino_t agino; /* inode # in allocation group */ |
| 354 | xfs_agnumber_t agno; /* allocation group number */ | 357 | xfs_agnumber_t agno; /* allocation group number */ |
| 355 | xfs_btree_cur_t *cur; /* btree cursor for ialloc btree */ | 358 | xfs_btree_cur_t *cur; /* btree cursor for ialloc btree */ |
| 356 | int end_of_ag; /* set if we've seen the ag end */ | ||
| 357 | int error; /* error code */ | ||
| 358 | int fmterror;/* bulkstat formatter result */ | ||
| 359 | int i; /* loop index */ | ||
| 360 | int icount; /* count of inodes good in irbuf */ | ||
| 361 | size_t irbsize; /* size of irec buffer in bytes */ | 359 | size_t irbsize; /* size of irec buffer in bytes */ |
| 362 | xfs_ino_t ino; /* inode number (filesystem) */ | ||
| 363 | xfs_inobt_rec_incore_t *irbp; /* current irec buffer pointer */ | ||
| 364 | xfs_inobt_rec_incore_t *irbuf; /* start of irec buffer */ | 360 | xfs_inobt_rec_incore_t *irbuf; /* start of irec buffer */ |
| 365 | xfs_inobt_rec_incore_t *irbufend; /* end of good irec buffer entries */ | ||
| 366 | xfs_ino_t lastino; /* last inode number returned */ | ||
| 367 | int nirbuf; /* size of irbuf */ | 361 | int nirbuf; /* size of irbuf */ |
| 368 | int rval; /* return value error code */ | ||
| 369 | int tmp; /* result value from btree calls */ | ||
| 370 | int ubcount; /* size of user's buffer */ | 362 | int ubcount; /* size of user's buffer */ |
| 371 | int ubleft; /* bytes left in user's buffer */ | 363 | struct xfs_bulkstat_agichunk ac; |
| 372 | char __user *ubufp; /* pointer into user's buffer */ | 364 | int error = 0; |
| 373 | int ubelem; /* spaces used in user's buffer */ | ||
| 374 | 365 | ||
| 375 | /* | 366 | /* |
| 376 | * Get the last inode value, see if there's nothing to do. | 367 | * Get the last inode value, see if there's nothing to do. |
| 377 | */ | 368 | */ |
| 378 | ino = (xfs_ino_t)*lastinop; | 369 | agno = XFS_INO_TO_AGNO(mp, *lastinop); |
| 379 | lastino = ino; | 370 | agino = XFS_INO_TO_AGINO(mp, *lastinop); |
| 380 | agno = XFS_INO_TO_AGNO(mp, ino); | ||
| 381 | agino = XFS_INO_TO_AGINO(mp, ino); | ||
| 382 | if (agno >= mp->m_sb.sb_agcount || | 371 | if (agno >= mp->m_sb.sb_agcount || |
| 383 | ino != XFS_AGINO_TO_INO(mp, agno, agino)) { | 372 | *lastinop != XFS_AGINO_TO_INO(mp, agno, agino)) { |
| 384 | *done = 1; | 373 | *done = 1; |
| 385 | *ubcountp = 0; | 374 | *ubcountp = 0; |
| 386 | return 0; | 375 | return 0; |
| 387 | } | 376 | } |
| 388 | 377 | ||
| 389 | ubcount = *ubcountp; /* statstruct's */ | 378 | ubcount = *ubcountp; /* statstruct's */ |
| 390 | ubleft = ubcount * statstruct_size; /* bytes */ | 379 | ac.ac_ubuffer = &ubuffer; |
| 391 | *ubcountp = ubelem = 0; | 380 | ac.ac_ubleft = ubcount * statstruct_size; /* bytes */; |
| 381 | ac.ac_ubelem = 0; | ||
| 382 | |||
| 383 | *ubcountp = 0; | ||
| 392 | *done = 0; | 384 | *done = 0; |
| 393 | fmterror = 0; | 385 | |
| 394 | ubufp = ubuffer; | ||
| 395 | irbuf = kmem_zalloc_greedy(&irbsize, PAGE_SIZE, PAGE_SIZE * 4); | 386 | irbuf = kmem_zalloc_greedy(&irbsize, PAGE_SIZE, PAGE_SIZE * 4); |
| 396 | if (!irbuf) | 387 | if (!irbuf) |
| 397 | return -ENOMEM; | 388 | return -ENOMEM; |
| @@ -402,9 +393,13 @@ xfs_bulkstat( | |||
| 402 | * Loop over the allocation groups, starting from the last | 393 | * Loop over the allocation groups, starting from the last |
| 403 | * inode returned; 0 means start of the allocation group. | 394 | * inode returned; 0 means start of the allocation group. |
| 404 | */ | 395 | */ |
| 405 | rval = 0; | 396 | while (agno < mp->m_sb.sb_agcount) { |
| 406 | while (XFS_BULKSTAT_UBLEFT(ubleft) && agno < mp->m_sb.sb_agcount) { | 397 | struct xfs_inobt_rec_incore *irbp = irbuf; |
| 407 | cond_resched(); | 398 | struct xfs_inobt_rec_incore *irbufend = irbuf + nirbuf; |
| 399 | bool end_of_ag = false; | ||
| 400 | int icount = 0; | ||
| 401 | int stat; | ||
| 402 | |||
| 408 | error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp); | 403 | error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp); |
| 409 | if (error) | 404 | if (error) |
| 410 | break; | 405 | break; |
| @@ -414,10 +409,6 @@ xfs_bulkstat( | |||
| 414 | */ | 409 | */ |
| 415 | cur = xfs_inobt_init_cursor(mp, NULL, agbp, agno, | 410 | cur = xfs_inobt_init_cursor(mp, NULL, agbp, agno, |
| 416 | XFS_BTNUM_INO); | 411 | XFS_BTNUM_INO); |
| 417 | irbp = irbuf; | ||
| 418 | irbufend = irbuf + nirbuf; | ||
| 419 | end_of_ag = 0; | ||
| 420 | icount = 0; | ||
| 421 | if (agino > 0) { | 412 | if (agino > 0) { |
| 422 | /* | 413 | /* |
| 423 | * In the middle of an allocation group, we need to get | 414 | * In the middle of an allocation group, we need to get |
| @@ -427,22 +418,23 @@ xfs_bulkstat( | |||
| 427 | 418 | ||
| 428 | error = xfs_bulkstat_grab_ichunk(cur, agino, &icount, &r); | 419 | error = xfs_bulkstat_grab_ichunk(cur, agino, &icount, &r); |
| 429 | if (error) | 420 | if (error) |
| 430 | break; | 421 | goto del_cursor; |
| 431 | if (icount) { | 422 | if (icount) { |
| 432 | irbp->ir_startino = r.ir_startino; | 423 | irbp->ir_startino = r.ir_startino; |
| 433 | irbp->ir_freecount = r.ir_freecount; | 424 | irbp->ir_freecount = r.ir_freecount; |
| 434 | irbp->ir_free = r.ir_free; | 425 | irbp->ir_free = r.ir_free; |
| 435 | irbp++; | 426 | irbp++; |
| 436 | agino = r.ir_startino + XFS_INODES_PER_CHUNK; | ||
| 437 | } | 427 | } |
| 438 | /* Increment to the next record */ | 428 | /* Increment to the next record */ |
| 439 | error = xfs_btree_increment(cur, 0, &tmp); | 429 | error = xfs_btree_increment(cur, 0, &stat); |
| 440 | } else { | 430 | } else { |
| 441 | /* Start of ag. Lookup the first inode chunk */ | 431 | /* Start of ag. Lookup the first inode chunk */ |
| 442 | error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &tmp); | 432 | error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &stat); |
| 433 | } | ||
| 434 | if (error || stat == 0) { | ||
| 435 | end_of_ag = true; | ||
| 436 | goto del_cursor; | ||
| 443 | } | 437 | } |
| 444 | if (error) | ||
| 445 | break; | ||
| 446 | 438 | ||
| 447 | /* | 439 | /* |
| 448 | * Loop through inode btree records in this ag, | 440 | * Loop through inode btree records in this ag, |
| @@ -451,10 +443,10 @@ xfs_bulkstat( | |||
| 451 | while (irbp < irbufend && icount < ubcount) { | 443 | while (irbp < irbufend && icount < ubcount) { |
| 452 | struct xfs_inobt_rec_incore r; | 444 | struct xfs_inobt_rec_incore r; |
| 453 | 445 | ||
| 454 | error = xfs_inobt_get_rec(cur, &r, &i); | 446 | error = xfs_inobt_get_rec(cur, &r, &stat); |
| 455 | if (error || i == 0) { | 447 | if (error || stat == 0) { |
| 456 | end_of_ag = 1; | 448 | end_of_ag = true; |
| 457 | break; | 449 | goto del_cursor; |
| 458 | } | 450 | } |
| 459 | 451 | ||
| 460 | /* | 452 | /* |
| @@ -469,77 +461,79 @@ xfs_bulkstat( | |||
| 469 | irbp++; | 461 | irbp++; |
| 470 | icount += XFS_INODES_PER_CHUNK - r.ir_freecount; | 462 | icount += XFS_INODES_PER_CHUNK - r.ir_freecount; |
| 471 | } | 463 | } |
| 472 | /* | 464 | error = xfs_btree_increment(cur, 0, &stat); |
| 473 | * Set agino to after this chunk and bump the cursor. | 465 | if (error || stat == 0) { |
| 474 | */ | 466 | end_of_ag = true; |
| 475 | agino = r.ir_startino + XFS_INODES_PER_CHUNK; | 467 | goto del_cursor; |
| 476 | error = xfs_btree_increment(cur, 0, &tmp); | 468 | } |
| 477 | cond_resched(); | 469 | cond_resched(); |
| 478 | } | 470 | } |
| 471 | |||
| 479 | /* | 472 | /* |
| 480 | * Drop the btree buffers and the agi buffer. | 473 | * Drop the btree buffers and the agi buffer as we can't hold any |
| 481 | * We can't hold any of the locks these represent | 474 | * of the locks these represent when calling iget. If there is a |
| 482 | * when calling iget. | 475 | * pending error, then we are done. |
| 483 | */ | 476 | */ |
| 477 | del_cursor: | ||
| 484 | xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); | 478 | xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); |
| 485 | xfs_buf_relse(agbp); | 479 | xfs_buf_relse(agbp); |
| 480 | if (error) | ||
| 481 | break; | ||
| 486 | /* | 482 | /* |
| 487 | * Now format all the good inodes into the user's buffer. | 483 | * Now format all the good inodes into the user's buffer. The |
| 484 | * call to xfs_bulkstat_ag_ichunk() sets up the agino pointer | ||
| 485 | * for the next loop iteration. | ||
| 488 | */ | 486 | */ |
| 489 | irbufend = irbp; | 487 | irbufend = irbp; |
| 490 | for (irbp = irbuf; | 488 | for (irbp = irbuf; |
| 491 | irbp < irbufend && XFS_BULKSTAT_UBLEFT(ubleft); irbp++) { | 489 | irbp < irbufend && ac.ac_ubleft >= statstruct_size; |
| 492 | struct xfs_bulkstat_agichunk ac; | 490 | irbp++) { |
| 493 | |||
| 494 | ac.ac_lastino = lastino; | ||
| 495 | ac.ac_ubuffer = &ubuffer; | ||
| 496 | ac.ac_ubleft = ubleft; | ||
| 497 | ac.ac_ubelem = ubelem; | ||
| 498 | error = xfs_bulkstat_ag_ichunk(mp, agno, irbp, | 491 | error = xfs_bulkstat_ag_ichunk(mp, agno, irbp, |
| 499 | formatter, statstruct_size, &ac); | 492 | formatter, statstruct_size, &ac, |
| 493 | &agino); | ||
| 500 | if (error) | 494 | if (error) |
| 501 | rval = error; | 495 | break; |
| 502 | |||
| 503 | lastino = ac.ac_lastino; | ||
| 504 | ubleft = ac.ac_ubleft; | ||
| 505 | ubelem = ac.ac_ubelem; | ||
| 506 | 496 | ||
| 507 | cond_resched(); | 497 | cond_resched(); |
| 508 | } | 498 | } |
| 499 | |||
| 509 | /* | 500 | /* |
| 510 | * Set up for the next loop iteration. | 501 | * If we've run out of space or had a formatting error, we |
| 502 | * are now done | ||
| 511 | */ | 503 | */ |
| 512 | if (XFS_BULKSTAT_UBLEFT(ubleft)) { | 504 | if (ac.ac_ubleft < statstruct_size || error) |
| 513 | if (end_of_ag) { | ||
| 514 | agno++; | ||
| 515 | agino = 0; | ||
| 516 | } else | ||
| 517 | agino = XFS_INO_TO_AGINO(mp, lastino); | ||
| 518 | } else | ||
| 519 | break; | 505 | break; |
| 506 | |||
| 507 | if (end_of_ag) { | ||
| 508 | agno++; | ||
| 509 | agino = 0; | ||
| 510 | } | ||
| 520 | } | 511 | } |
| 521 | /* | 512 | /* |
| 522 | * Done, we're either out of filesystem or space to put the data. | 513 | * Done, we're either out of filesystem or space to put the data. |
| 523 | */ | 514 | */ |
| 524 | kmem_free(irbuf); | 515 | kmem_free(irbuf); |
| 525 | *ubcountp = ubelem; | 516 | *ubcountp = ac.ac_ubelem; |
| 517 | |||
| 526 | /* | 518 | /* |
| 527 | * Found some inodes, return them now and return the error next time. | 519 | * We found some inodes, so clear the error status and return them. |
| 520 | * The lastino pointer will point directly at the inode that triggered | ||
| 521 | * any error that occurred, so on the next call the error will be | ||
| 522 | * triggered again and propagated to userspace as there will be no | ||
| 523 | * formatted inodes in the buffer. | ||
| 528 | */ | 524 | */ |
| 529 | if (ubelem) | 525 | if (ac.ac_ubelem) |
| 530 | rval = 0; | 526 | error = 0; |
| 531 | if (agno >= mp->m_sb.sb_agcount) { | 527 | |
| 532 | /* | 528 | /* |
| 533 | * If we ran out of filesystem, mark lastino as off | 529 | * If we ran out of filesystem, lastino will point off the end of |
| 534 | * the end of the filesystem, so the next call | 530 | * the filesystem so the next call will return immediately. |
| 535 | * will return immediately. | 531 | */ |
| 536 | */ | 532 | *lastinop = XFS_AGINO_TO_INO(mp, agno, agino); |
| 537 | *lastinop = (xfs_ino_t)XFS_AGINO_TO_INO(mp, agno, 0); | 533 | if (agno >= mp->m_sb.sb_agcount) |
| 538 | *done = 1; | 534 | *done = 1; |
| 539 | } else | ||
| 540 | *lastinop = (xfs_ino_t)lastino; | ||
| 541 | 535 | ||
| 542 | return rval; | 536 | return error; |
| 543 | } | 537 | } |
| 544 | 538 | ||
| 545 | int | 539 | int |
diff --git a/fs/xfs/xfs_itable.h b/fs/xfs/xfs_itable.h index aaed08022eb9..6ea8b3912fa4 100644 --- a/fs/xfs/xfs_itable.h +++ b/fs/xfs/xfs_itable.h | |||
| @@ -30,22 +30,6 @@ typedef int (*bulkstat_one_pf)(struct xfs_mount *mp, | |||
| 30 | int *ubused, | 30 | int *ubused, |
| 31 | int *stat); | 31 | int *stat); |
| 32 | 32 | ||
| 33 | struct xfs_bulkstat_agichunk { | ||
| 34 | xfs_ino_t ac_lastino; /* last inode returned */ | ||
| 35 | char __user **ac_ubuffer;/* pointer into user's buffer */ | ||
| 36 | int ac_ubleft; /* bytes left in user's buffer */ | ||
| 37 | int ac_ubelem; /* spaces used in user's buffer */ | ||
| 38 | }; | ||
| 39 | |||
| 40 | int | ||
| 41 | xfs_bulkstat_ag_ichunk( | ||
| 42 | struct xfs_mount *mp, | ||
| 43 | xfs_agnumber_t agno, | ||
| 44 | struct xfs_inobt_rec_incore *irbp, | ||
| 45 | bulkstat_one_pf formatter, | ||
| 46 | size_t statstruct_size, | ||
| 47 | struct xfs_bulkstat_agichunk *acp); | ||
| 48 | |||
| 49 | /* | 33 | /* |
| 50 | * Values for stat return value. | 34 | * Values for stat return value. |
| 51 | */ | 35 | */ |
diff --git a/include/dt-bindings/clock/vf610-clock.h b/include/dt-bindings/clock/vf610-clock.h index d6b56b21539b..801c0ac50c47 100644 --- a/include/dt-bindings/clock/vf610-clock.h +++ b/include/dt-bindings/clock/vf610-clock.h | |||
| @@ -21,24 +21,24 @@ | |||
| 21 | #define VF610_CLK_FASK_CLK_SEL 8 | 21 | #define VF610_CLK_FASK_CLK_SEL 8 |
| 22 | #define VF610_CLK_AUDIO_EXT 9 | 22 | #define VF610_CLK_AUDIO_EXT 9 |
| 23 | #define VF610_CLK_ENET_EXT 10 | 23 | #define VF610_CLK_ENET_EXT 10 |
| 24 | #define VF610_CLK_PLL1_MAIN 11 | 24 | #define VF610_CLK_PLL1_SYS 11 |
| 25 | #define VF610_CLK_PLL1_PFD1 12 | 25 | #define VF610_CLK_PLL1_PFD1 12 |
| 26 | #define VF610_CLK_PLL1_PFD2 13 | 26 | #define VF610_CLK_PLL1_PFD2 13 |
| 27 | #define VF610_CLK_PLL1_PFD3 14 | 27 | #define VF610_CLK_PLL1_PFD3 14 |
| 28 | #define VF610_CLK_PLL1_PFD4 15 | 28 | #define VF610_CLK_PLL1_PFD4 15 |
| 29 | #define VF610_CLK_PLL2_MAIN 16 | 29 | #define VF610_CLK_PLL2_BUS 16 |
| 30 | #define VF610_CLK_PLL2_PFD1 17 | 30 | #define VF610_CLK_PLL2_PFD1 17 |
| 31 | #define VF610_CLK_PLL2_PFD2 18 | 31 | #define VF610_CLK_PLL2_PFD2 18 |
| 32 | #define VF610_CLK_PLL2_PFD3 19 | 32 | #define VF610_CLK_PLL2_PFD3 19 |
| 33 | #define VF610_CLK_PLL2_PFD4 20 | 33 | #define VF610_CLK_PLL2_PFD4 20 |
| 34 | #define VF610_CLK_PLL3_MAIN 21 | 34 | #define VF610_CLK_PLL3_USB_OTG 21 |
| 35 | #define VF610_CLK_PLL3_PFD1 22 | 35 | #define VF610_CLK_PLL3_PFD1 22 |
| 36 | #define VF610_CLK_PLL3_PFD2 23 | 36 | #define VF610_CLK_PLL3_PFD2 23 |
| 37 | #define VF610_CLK_PLL3_PFD3 24 | 37 | #define VF610_CLK_PLL3_PFD3 24 |
| 38 | #define VF610_CLK_PLL3_PFD4 25 | 38 | #define VF610_CLK_PLL3_PFD4 25 |
| 39 | #define VF610_CLK_PLL4_MAIN 26 | 39 | #define VF610_CLK_PLL4_AUDIO 26 |
| 40 | #define VF610_CLK_PLL5_MAIN 27 | 40 | #define VF610_CLK_PLL5_ENET 27 |
| 41 | #define VF610_CLK_PLL6_MAIN 28 | 41 | #define VF610_CLK_PLL6_VIDEO 28 |
| 42 | #define VF610_CLK_PLL3_MAIN_DIV 29 | 42 | #define VF610_CLK_PLL3_MAIN_DIV 29 |
| 43 | #define VF610_CLK_PLL4_MAIN_DIV 30 | 43 | #define VF610_CLK_PLL4_MAIN_DIV 30 |
| 44 | #define VF610_CLK_PLL6_MAIN_DIV 31 | 44 | #define VF610_CLK_PLL6_MAIN_DIV 31 |
| @@ -166,9 +166,32 @@ | |||
| 166 | #define VF610_CLK_DMAMUX3 153 | 166 | #define VF610_CLK_DMAMUX3 153 |
| 167 | #define VF610_CLK_FLEXCAN0_EN 154 | 167 | #define VF610_CLK_FLEXCAN0_EN 154 |
| 168 | #define VF610_CLK_FLEXCAN1_EN 155 | 168 | #define VF610_CLK_FLEXCAN1_EN 155 |
| 169 | #define VF610_CLK_PLL7_MAIN 156 | 169 | #define VF610_CLK_PLL7_USB_HOST 156 |
| 170 | #define VF610_CLK_USBPHY0 157 | 170 | #define VF610_CLK_USBPHY0 157 |
| 171 | #define VF610_CLK_USBPHY1 158 | 171 | #define VF610_CLK_USBPHY1 158 |
| 172 | #define VF610_CLK_END 159 | 172 | #define VF610_CLK_LVDS1_IN 159 |
| 173 | #define VF610_CLK_ANACLK1 160 | ||
| 174 | #define VF610_CLK_PLL1_BYPASS_SRC 161 | ||
| 175 | #define VF610_CLK_PLL2_BYPASS_SRC 162 | ||
| 176 | #define VF610_CLK_PLL3_BYPASS_SRC 163 | ||
| 177 | #define VF610_CLK_PLL4_BYPASS_SRC 164 | ||
| 178 | #define VF610_CLK_PLL5_BYPASS_SRC 165 | ||
| 179 | #define VF610_CLK_PLL6_BYPASS_SRC 166 | ||
| 180 | #define VF610_CLK_PLL7_BYPASS_SRC 167 | ||
| 181 | #define VF610_CLK_PLL1 168 | ||
| 182 | #define VF610_CLK_PLL2 169 | ||
| 183 | #define VF610_CLK_PLL3 170 | ||
| 184 | #define VF610_CLK_PLL4 171 | ||
| 185 | #define VF610_CLK_PLL5 172 | ||
| 186 | #define VF610_CLK_PLL6 173 | ||
| 187 | #define VF610_CLK_PLL7 174 | ||
| 188 | #define VF610_PLL1_BYPASS 175 | ||
| 189 | #define VF610_PLL2_BYPASS 176 | ||
| 190 | #define VF610_PLL3_BYPASS 177 | ||
| 191 | #define VF610_PLL4_BYPASS 178 | ||
| 192 | #define VF610_PLL5_BYPASS 179 | ||
| 193 | #define VF610_PLL6_BYPASS 180 | ||
| 194 | #define VF610_PLL7_BYPASS 181 | ||
| 195 | #define VF610_CLK_END 182 | ||
| 173 | 196 | ||
| 174 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ | 197 | #endif /* __DT_BINDINGS_CLOCK_VF610_H */ |
diff --git a/include/linux/cma.h b/include/linux/cma.h index 0430ed05d3b9..a93438beb33c 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h | |||
| @@ -18,12 +18,12 @@ struct cma; | |||
| 18 | extern phys_addr_t cma_get_base(struct cma *cma); | 18 | extern phys_addr_t cma_get_base(struct cma *cma); |
| 19 | extern unsigned long cma_get_size(struct cma *cma); | 19 | extern unsigned long cma_get_size(struct cma *cma); |
| 20 | 20 | ||
| 21 | extern int __init cma_declare_contiguous(phys_addr_t size, | 21 | extern int __init cma_declare_contiguous(phys_addr_t base, |
| 22 | phys_addr_t base, phys_addr_t limit, | 22 | phys_addr_t size, phys_addr_t limit, |
| 23 | phys_addr_t alignment, unsigned int order_per_bit, | 23 | phys_addr_t alignment, unsigned int order_per_bit, |
| 24 | bool fixed, struct cma **res_cma); | 24 | bool fixed, struct cma **res_cma); |
| 25 | extern int cma_init_reserved_mem(phys_addr_t size, | 25 | extern int cma_init_reserved_mem(phys_addr_t base, |
| 26 | phys_addr_t base, int order_per_bit, | 26 | phys_addr_t size, int order_per_bit, |
| 27 | struct cma **res_cma); | 27 | struct cma **res_cma); |
| 28 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); | 28 | extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align); |
| 29 | extern bool cma_release(struct cma *cma, struct page *pages, int count); | 29 | extern bool cma_release(struct cma *cma, struct page *pages, int count); |
diff --git a/include/linux/of.h b/include/linux/of.h index 6545e7aec7bb..29f0adc5f3e4 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -267,14 +267,12 @@ extern int of_property_read_u64(const struct device_node *np, | |||
| 267 | extern int of_property_read_string(struct device_node *np, | 267 | extern int of_property_read_string(struct device_node *np, |
| 268 | const char *propname, | 268 | const char *propname, |
| 269 | const char **out_string); | 269 | const char **out_string); |
| 270 | extern int of_property_read_string_index(struct device_node *np, | ||
| 271 | const char *propname, | ||
| 272 | int index, const char **output); | ||
| 273 | extern int of_property_match_string(struct device_node *np, | 270 | extern int of_property_match_string(struct device_node *np, |
| 274 | const char *propname, | 271 | const char *propname, |
| 275 | const char *string); | 272 | const char *string); |
| 276 | extern int of_property_count_strings(struct device_node *np, | 273 | extern int of_property_read_string_helper(struct device_node *np, |
| 277 | const char *propname); | 274 | const char *propname, |
| 275 | const char **out_strs, size_t sz, int index); | ||
| 278 | extern int of_device_is_compatible(const struct device_node *device, | 276 | extern int of_device_is_compatible(const struct device_node *device, |
| 279 | const char *); | 277 | const char *); |
| 280 | extern int of_device_is_available(const struct device_node *device); | 278 | extern int of_device_is_available(const struct device_node *device); |
| @@ -486,15 +484,9 @@ static inline int of_property_read_string(struct device_node *np, | |||
| 486 | return -ENOSYS; | 484 | return -ENOSYS; |
| 487 | } | 485 | } |
| 488 | 486 | ||
| 489 | static inline int of_property_read_string_index(struct device_node *np, | 487 | static inline int of_property_read_string_helper(struct device_node *np, |
| 490 | const char *propname, int index, | 488 | const char *propname, |
| 491 | const char **out_string) | 489 | const char **out_strs, size_t sz, int index) |
| 492 | { | ||
| 493 | return -ENOSYS; | ||
| 494 | } | ||
| 495 | |||
| 496 | static inline int of_property_count_strings(struct device_node *np, | ||
| 497 | const char *propname) | ||
| 498 | { | 490 | { |
| 499 | return -ENOSYS; | 491 | return -ENOSYS; |
| 500 | } | 492 | } |
| @@ -668,6 +660,70 @@ static inline int of_property_count_u64_elems(const struct device_node *np, | |||
| 668 | } | 660 | } |
| 669 | 661 | ||
| 670 | /** | 662 | /** |
| 663 | * of_property_read_string_array() - Read an array of strings from a multiple | ||
| 664 | * strings property. | ||
| 665 | * @np: device node from which the property value is to be read. | ||
| 666 | * @propname: name of the property to be searched. | ||
| 667 | * @out_strs: output array of string pointers. | ||
| 668 | * @sz: number of array elements to read. | ||
| 669 | * | ||
| 670 | * Search for a property in a device tree node and retrieve a list of | ||
| 671 | * terminated string values (pointer to data, not a copy) in that property. | ||
| 672 | * | ||
| 673 | * If @out_strs is NULL, the number of strings in the property is returned. | ||
| 674 | */ | ||
| 675 | static inline int of_property_read_string_array(struct device_node *np, | ||
| 676 | const char *propname, const char **out_strs, | ||
| 677 | size_t sz) | ||
| 678 | { | ||
| 679 | return of_property_read_string_helper(np, propname, out_strs, sz, 0); | ||
| 680 | } | ||
| 681 | |||
| 682 | /** | ||
| 683 | * of_property_count_strings() - Find and return the number of strings from a | ||
| 684 | * multiple strings property. | ||
| 685 | * @np: device node from which the property value is to be read. | ||
| 686 | * @propname: name of the property to be searched. | ||
| 687 | * | ||
| 688 | * Search for a property in a device tree node and retrieve the number of null | ||
| 689 | * terminated string contain in it. Returns the number of strings on | ||
| 690 | * success, -EINVAL if the property does not exist, -ENODATA if property | ||
| 691 | * does not have a value, and -EILSEQ if the string is not null-terminated | ||
| 692 | * within the length of the property data. | ||
| 693 | */ | ||
| 694 | static inline int of_property_count_strings(struct device_node *np, | ||
| 695 | const char *propname) | ||
| 696 | { | ||
| 697 | return of_property_read_string_helper(np, propname, NULL, 0, 0); | ||
| 698 | } | ||
| 699 | |||
| 700 | /** | ||
| 701 | * of_property_read_string_index() - Find and read a string from a multiple | ||
| 702 | * strings property. | ||
| 703 | * @np: device node from which the property value is to be read. | ||
| 704 | * @propname: name of the property to be searched. | ||
| 705 | * @index: index of the string in the list of strings | ||
| 706 | * @out_string: pointer to null terminated return string, modified only if | ||
| 707 | * return value is 0. | ||
| 708 | * | ||
| 709 | * Search for a property in a device tree node and retrieve a null | ||
| 710 | * terminated string value (pointer to data, not a copy) in the list of strings | ||
| 711 | * contained in that property. | ||
| 712 | * Returns 0 on success, -EINVAL if the property does not exist, -ENODATA if | ||
| 713 | * property does not have a value, and -EILSEQ if the string is not | ||
| 714 | * null-terminated within the length of the property data. | ||
| 715 | * | ||
| 716 | * The out_string pointer is modified only if a valid string can be decoded. | ||
| 717 | */ | ||
| 718 | static inline int of_property_read_string_index(struct device_node *np, | ||
| 719 | const char *propname, | ||
| 720 | int index, const char **output) | ||
| 721 | { | ||
| 722 | int rc = of_property_read_string_helper(np, propname, output, 1, index); | ||
| 723 | return rc < 0 ? rc : 0; | ||
| 724 | } | ||
| 725 | |||
| 726 | /** | ||
| 671 | * of_property_read_bool - Findfrom a property | 727 | * of_property_read_bool - Findfrom a property |
| 672 | * @np: device node from which the property value is to be read. | 728 | * @np: device node from which the property value is to be read. |
| 673 | * @propname: name of the property to be searched. | 729 | * @propname: name of the property to be searched. |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 64dacb7288a6..24c7728ca681 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
| @@ -41,8 +41,13 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | |||
| 41 | 41 | ||
| 42 | if (pci_is_root_bus(pbus)) | 42 | if (pci_is_root_bus(pbus)) |
| 43 | dev = pbus->bridge; | 43 | dev = pbus->bridge; |
| 44 | else | 44 | else { |
| 45 | /* If pbus is a virtual bus, there is no bridge to it */ | ||
| 46 | if (!pbus->self) | ||
| 47 | return NULL; | ||
| 48 | |||
| 45 | dev = &pbus->self->dev; | 49 | dev = &pbus->self->dev; |
| 50 | } | ||
| 46 | 51 | ||
| 47 | return ACPI_HANDLE(dev); | 52 | return ACPI_HANDLE(dev); |
| 48 | } | 53 | } |
| @@ -124,6 +124,7 @@ static int __init cma_activate_area(struct cma *cma) | |||
| 124 | 124 | ||
| 125 | err: | 125 | err: |
| 126 | kfree(cma->bitmap); | 126 | kfree(cma->bitmap); |
| 127 | cma->count = 0; | ||
| 127 | return -EINVAL; | 128 | return -EINVAL; |
| 128 | } | 129 | } |
| 129 | 130 | ||
| @@ -217,9 +218,8 @@ int __init cma_declare_contiguous(phys_addr_t base, | |||
| 217 | phys_addr_t highmem_start = __pa(high_memory); | 218 | phys_addr_t highmem_start = __pa(high_memory); |
| 218 | int ret = 0; | 219 | int ret = 0; |
| 219 | 220 | ||
| 220 | pr_debug("%s(size %lx, base %08lx, limit %08lx alignment %08lx)\n", | 221 | pr_debug("%s(size %pa, base %pa, limit %pa alignment %pa)\n", |
| 221 | __func__, (unsigned long)size, (unsigned long)base, | 222 | __func__, &size, &base, &limit, &alignment); |
| 222 | (unsigned long)limit, (unsigned long)alignment); | ||
| 223 | 223 | ||
| 224 | if (cma_area_count == ARRAY_SIZE(cma_areas)) { | 224 | if (cma_area_count == ARRAY_SIZE(cma_areas)) { |
| 225 | pr_err("Not enough slots for CMA reserved regions!\n"); | 225 | pr_err("Not enough slots for CMA reserved regions!\n"); |
| @@ -244,52 +244,72 @@ int __init cma_declare_contiguous(phys_addr_t base, | |||
| 244 | size = ALIGN(size, alignment); | 244 | size = ALIGN(size, alignment); |
| 245 | limit &= ~(alignment - 1); | 245 | limit &= ~(alignment - 1); |
| 246 | 246 | ||
| 247 | if (!base) | ||
| 248 | fixed = false; | ||
| 249 | |||
| 247 | /* size should be aligned with order_per_bit */ | 250 | /* size should be aligned with order_per_bit */ |
| 248 | if (!IS_ALIGNED(size >> PAGE_SHIFT, 1 << order_per_bit)) | 251 | if (!IS_ALIGNED(size >> PAGE_SHIFT, 1 << order_per_bit)) |
| 249 | return -EINVAL; | 252 | return -EINVAL; |
| 250 | 253 | ||
| 251 | /* | 254 | /* |
| 252 | * adjust limit to avoid crossing low/high memory boundary for | 255 | * If allocating at a fixed base the request region must not cross the |
| 253 | * automatically allocated regions | 256 | * low/high memory boundary. |
| 254 | */ | 257 | */ |
| 255 | if (((limit == 0 || limit > memblock_end) && | 258 | if (fixed && base < highmem_start && base + size > highmem_start) { |
| 256 | (memblock_end - size < highmem_start && | ||
| 257 | memblock_end > highmem_start)) || | ||
| 258 | (!fixed && limit > highmem_start && limit - size < highmem_start)) { | ||
| 259 | limit = highmem_start; | ||
| 260 | } | ||
| 261 | |||
| 262 | if (fixed && base < highmem_start && base+size > highmem_start) { | ||
| 263 | ret = -EINVAL; | 259 | ret = -EINVAL; |
| 264 | pr_err("Region at %08lx defined on low/high memory boundary (%08lx)\n", | 260 | pr_err("Region at %pa defined on low/high memory boundary (%pa)\n", |
| 265 | (unsigned long)base, (unsigned long)highmem_start); | 261 | &base, &highmem_start); |
| 266 | goto err; | 262 | goto err; |
| 267 | } | 263 | } |
| 268 | 264 | ||
| 265 | /* | ||
| 266 | * If the limit is unspecified or above the memblock end, its effective | ||
| 267 | * value will be the memblock end. Set it explicitly to simplify further | ||
| 268 | * checks. | ||
| 269 | */ | ||
| 270 | if (limit == 0 || limit > memblock_end) | ||
| 271 | limit = memblock_end; | ||
| 272 | |||
| 269 | /* Reserve memory */ | 273 | /* Reserve memory */ |
| 270 | if (base && fixed) { | 274 | if (fixed) { |
| 271 | if (memblock_is_region_reserved(base, size) || | 275 | if (memblock_is_region_reserved(base, size) || |
| 272 | memblock_reserve(base, size) < 0) { | 276 | memblock_reserve(base, size) < 0) { |
| 273 | ret = -EBUSY; | 277 | ret = -EBUSY; |
| 274 | goto err; | 278 | goto err; |
| 275 | } | 279 | } |
| 276 | } else { | 280 | } else { |
| 277 | phys_addr_t addr = memblock_alloc_range(size, alignment, base, | 281 | phys_addr_t addr = 0; |
| 278 | limit); | 282 | |
| 283 | /* | ||
| 284 | * All pages in the reserved area must come from the same zone. | ||
| 285 | * If the requested region crosses the low/high memory boundary, | ||
| 286 | * try allocating from high memory first and fall back to low | ||
| 287 | * memory in case of failure. | ||
| 288 | */ | ||
| 289 | if (base < highmem_start && limit > highmem_start) { | ||
| 290 | addr = memblock_alloc_range(size, alignment, | ||
| 291 | highmem_start, limit); | ||
| 292 | limit = highmem_start; | ||
| 293 | } | ||
| 294 | |||
| 279 | if (!addr) { | 295 | if (!addr) { |
| 280 | ret = -ENOMEM; | 296 | addr = memblock_alloc_range(size, alignment, base, |
| 281 | goto err; | 297 | limit); |
| 282 | } else { | 298 | if (!addr) { |
| 283 | base = addr; | 299 | ret = -ENOMEM; |
| 300 | goto err; | ||
| 301 | } | ||
| 284 | } | 302 | } |
| 303 | |||
| 304 | base = addr; | ||
| 285 | } | 305 | } |
| 286 | 306 | ||
| 287 | ret = cma_init_reserved_mem(base, size, order_per_bit, res_cma); | 307 | ret = cma_init_reserved_mem(base, size, order_per_bit, res_cma); |
| 288 | if (ret) | 308 | if (ret) |
| 289 | goto err; | 309 | goto err; |
| 290 | 310 | ||
| 291 | pr_info("Reserved %ld MiB at %08lx\n", (unsigned long)size / SZ_1M, | 311 | pr_info("Reserved %ld MiB at %pa\n", (unsigned long)size / SZ_1M, |
| 292 | (unsigned long)base); | 312 | &base); |
| 293 | return 0; | 313 | return 0; |
| 294 | 314 | ||
| 295 | err: | 315 | err: |
diff --git a/mm/truncate.c b/mm/truncate.c index 261eaf6e5a19..f1e4d6052369 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
| @@ -715,8 +715,9 @@ EXPORT_SYMBOL(truncate_pagecache); | |||
| 715 | * necessary) to @newsize. It will be typically be called from the filesystem's | 715 | * necessary) to @newsize. It will be typically be called from the filesystem's |
| 716 | * setattr function when ATTR_SIZE is passed in. | 716 | * setattr function when ATTR_SIZE is passed in. |
| 717 | * | 717 | * |
| 718 | * Must be called with inode_mutex held and before all filesystem specific | 718 | * Must be called with a lock serializing truncates and writes (generally |
| 719 | * block truncation has been performed. | 719 | * i_mutex but e.g. xfs uses a different lock) and before all filesystem |
| 720 | * specific block truncation has been performed. | ||
| 720 | */ | 721 | */ |
| 721 | void truncate_setsize(struct inode *inode, loff_t newsize) | 722 | void truncate_setsize(struct inode *inode, loff_t newsize) |
| 722 | { | 723 | { |
| @@ -755,7 +756,6 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) | |||
| 755 | struct page *page; | 756 | struct page *page; |
| 756 | pgoff_t index; | 757 | pgoff_t index; |
| 757 | 758 | ||
| 758 | WARN_ON(!mutex_is_locked(&inode->i_mutex)); | ||
| 759 | WARN_ON(to > inode->i_size); | 759 | WARN_ON(to > inode->i_size); |
| 760 | 760 | ||
| 761 | if (from >= to || bsize == PAGE_CACHE_SIZE) | 761 | if (from >= to || bsize == PAGE_CACHE_SIZE) |
diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c index de6662b14e1f..7e38b729696a 100644 --- a/net/ceph/auth_x.c +++ b/net/ceph/auth_x.c | |||
| @@ -149,6 +149,7 @@ static int process_one_ticket(struct ceph_auth_client *ac, | |||
| 149 | struct ceph_crypto_key old_key; | 149 | struct ceph_crypto_key old_key; |
| 150 | void *ticket_buf = NULL; | 150 | void *ticket_buf = NULL; |
| 151 | void *tp, *tpend; | 151 | void *tp, *tpend; |
| 152 | void **ptp; | ||
| 152 | struct ceph_timespec new_validity; | 153 | struct ceph_timespec new_validity; |
| 153 | struct ceph_crypto_key new_session_key; | 154 | struct ceph_crypto_key new_session_key; |
| 154 | struct ceph_buffer *new_ticket_blob; | 155 | struct ceph_buffer *new_ticket_blob; |
| @@ -208,25 +209,19 @@ static int process_one_ticket(struct ceph_auth_client *ac, | |||
| 208 | goto out; | 209 | goto out; |
| 209 | } | 210 | } |
| 210 | tp = ticket_buf; | 211 | tp = ticket_buf; |
| 211 | dlen = ceph_decode_32(&tp); | 212 | ptp = &tp; |
| 213 | tpend = *ptp + dlen; | ||
| 212 | } else { | 214 | } else { |
| 213 | /* unencrypted */ | 215 | /* unencrypted */ |
| 214 | ceph_decode_32_safe(p, end, dlen, bad); | 216 | ptp = p; |
| 215 | ticket_buf = kmalloc(dlen, GFP_NOFS); | 217 | tpend = end; |
| 216 | if (!ticket_buf) { | ||
| 217 | ret = -ENOMEM; | ||
| 218 | goto out; | ||
| 219 | } | ||
| 220 | tp = ticket_buf; | ||
| 221 | ceph_decode_need(p, end, dlen, bad); | ||
| 222 | ceph_decode_copy(p, ticket_buf, dlen); | ||
| 223 | } | 218 | } |
| 224 | tpend = tp + dlen; | 219 | ceph_decode_32_safe(ptp, tpend, dlen, bad); |
| 225 | dout(" ticket blob is %d bytes\n", dlen); | 220 | dout(" ticket blob is %d bytes\n", dlen); |
| 226 | ceph_decode_need(&tp, tpend, 1 + sizeof(u64), bad); | 221 | ceph_decode_need(ptp, tpend, 1 + sizeof(u64), bad); |
| 227 | blob_struct_v = ceph_decode_8(&tp); | 222 | blob_struct_v = ceph_decode_8(ptp); |
| 228 | new_secret_id = ceph_decode_64(&tp); | 223 | new_secret_id = ceph_decode_64(ptp); |
| 229 | ret = ceph_decode_buffer(&new_ticket_blob, &tp, tpend); | 224 | ret = ceph_decode_buffer(&new_ticket_blob, ptp, tpend); |
| 230 | if (ret) | 225 | if (ret) |
| 231 | goto out; | 226 | goto out; |
| 232 | 227 | ||
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 559c9f619c20..8d1653caffdb 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
| @@ -484,7 +484,7 @@ static int ceph_tcp_connect(struct ceph_connection *con) | |||
| 484 | IPPROTO_TCP, &sock); | 484 | IPPROTO_TCP, &sock); |
| 485 | if (ret) | 485 | if (ret) |
| 486 | return ret; | 486 | return ret; |
| 487 | sock->sk->sk_allocation = GFP_NOFS; | 487 | sock->sk->sk_allocation = GFP_NOFS | __GFP_MEMALLOC; |
| 488 | 488 | ||
| 489 | #ifdef CONFIG_LOCKDEP | 489 | #ifdef CONFIG_LOCKDEP |
| 490 | lockdep_set_class(&sock->sk->sk_lock, &socket_class); | 490 | lockdep_set_class(&sock->sk->sk_lock, &socket_class); |
| @@ -509,6 +509,9 @@ static int ceph_tcp_connect(struct ceph_connection *con) | |||
| 509 | 509 | ||
| 510 | return ret; | 510 | return ret; |
| 511 | } | 511 | } |
| 512 | |||
| 513 | sk_set_memalloc(sock->sk); | ||
| 514 | |||
| 512 | con->sock = sock; | 515 | con->sock = sock; |
| 513 | return 0; | 516 | return 0; |
| 514 | } | 517 | } |
| @@ -2769,8 +2772,11 @@ static void con_work(struct work_struct *work) | |||
| 2769 | { | 2772 | { |
| 2770 | struct ceph_connection *con = container_of(work, struct ceph_connection, | 2773 | struct ceph_connection *con = container_of(work, struct ceph_connection, |
| 2771 | work.work); | 2774 | work.work); |
| 2775 | unsigned long pflags = current->flags; | ||
| 2772 | bool fault; | 2776 | bool fault; |
| 2773 | 2777 | ||
| 2778 | current->flags |= PF_MEMALLOC; | ||
| 2779 | |||
| 2774 | mutex_lock(&con->mutex); | 2780 | mutex_lock(&con->mutex); |
| 2775 | while (true) { | 2781 | while (true) { |
| 2776 | int ret; | 2782 | int ret; |
| @@ -2824,6 +2830,8 @@ static void con_work(struct work_struct *work) | |||
| 2824 | con_fault_finish(con); | 2830 | con_fault_finish(con); |
| 2825 | 2831 | ||
| 2826 | con->ops->put(con); | 2832 | con->ops->put(con); |
| 2833 | |||
| 2834 | tsk_restore_flags(current, pflags, PF_MEMALLOC); | ||
| 2827 | } | 2835 | } |
| 2828 | 2836 | ||
| 2829 | /* | 2837 | /* |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c9cf248ce8ec..da03693099eb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -291,18 +291,14 @@ static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) | |||
| 291 | /* additional initialization for ALC888 variants */ | 291 | /* additional initialization for ALC888 variants */ |
| 292 | static void alc888_coef_init(struct hda_codec *codec) | 292 | static void alc888_coef_init(struct hda_codec *codec) |
| 293 | { | 293 | { |
| 294 | if (alc_get_coef0(codec) == 0x20) | 294 | switch (alc_get_coef0(codec) & 0x00f0) { |
| 295 | /* alc888S-VC */ | 295 | /* alc888-VA */ |
| 296 | alc_write_coef_idx(codec, 7, 0x830); | 296 | case 0x00: |
| 297 | else | 297 | /* alc888-VB */ |
| 298 | /* alc888-VB */ | 298 | case 0x10: |
| 299 | alc_write_coef_idx(codec, 7, 0x3030); | 299 | alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */ |
| 300 | } | 300 | break; |
| 301 | 301 | } | |
| 302 | /* additional initialization for ALC889 variants */ | ||
| 303 | static void alc889_coef_init(struct hda_codec *codec) | ||
| 304 | { | ||
| 305 | alc_update_coef_idx(codec, 7, 0, 0x2010); | ||
| 306 | } | 302 | } |
| 307 | 303 | ||
| 308 | /* turn on/off EAPD control (only if available) */ | 304 | /* turn on/off EAPD control (only if available) */ |
| @@ -359,25 +355,15 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type) | |||
| 359 | case 0x10ec0260: | 355 | case 0x10ec0260: |
| 360 | alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); | 356 | alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); |
| 361 | break; | 357 | break; |
| 362 | case 0x10ec0262: | ||
| 363 | case 0x10ec0880: | 358 | case 0x10ec0880: |
| 364 | case 0x10ec0882: | 359 | case 0x10ec0882: |
| 365 | case 0x10ec0883: | 360 | case 0x10ec0883: |
| 366 | case 0x10ec0885: | 361 | case 0x10ec0885: |
| 367 | case 0x10ec0887: | 362 | alc_update_coef_idx(codec, 7, 0, 0x2030); |
| 368 | /*case 0x10ec0889:*/ /* this causes an SPDIF problem */ | ||
| 369 | case 0x10ec0900: | ||
| 370 | alc889_coef_init(codec); | ||
| 371 | break; | 363 | break; |
| 372 | case 0x10ec0888: | 364 | case 0x10ec0888: |
| 373 | alc888_coef_init(codec); | 365 | alc888_coef_init(codec); |
| 374 | break; | 366 | break; |
| 375 | #if 0 /* XXX: This may cause the silent output on speaker on some machines */ | ||
| 376 | case 0x10ec0267: | ||
| 377 | case 0x10ec0268: | ||
| 378 | alc_update_coef_idx(codec, 7, 0, 0x3000); | ||
| 379 | break; | ||
| 380 | #endif /* XXX */ | ||
| 381 | } | 367 | } |
| 382 | break; | 368 | break; |
| 383 | } | 369 | } |
| @@ -1710,7 +1696,7 @@ static void alc889_fixup_coef(struct hda_codec *codec, | |||
| 1710 | { | 1696 | { |
| 1711 | if (action != HDA_FIXUP_ACT_INIT) | 1697 | if (action != HDA_FIXUP_ACT_INIT) |
| 1712 | return; | 1698 | return; |
| 1713 | alc889_coef_init(codec); | 1699 | alc_update_coef_idx(codec, 7, 0, 0x2030); |
| 1714 | } | 1700 | } |
| 1715 | 1701 | ||
| 1716 | /* toggle speaker-output according to the hp-jack state */ | 1702 | /* toggle speaker-output according to the hp-jack state */ |
| @@ -3350,6 +3336,27 @@ static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec, | |||
| 3350 | } | 3336 | } |
| 3351 | } | 3337 | } |
| 3352 | 3338 | ||
| 3339 | static void alc280_fixup_hp_gpio4(struct hda_codec *codec, | ||
| 3340 | const struct hda_fixup *fix, int action) | ||
| 3341 | { | ||
| 3342 | /* Like hp_gpio_mic1_led, but also needs GPIO4 low to enable headphone amp */ | ||
| 3343 | struct alc_spec *spec = codec->spec; | ||
| 3344 | static const struct hda_verb gpio_init[] = { | ||
| 3345 | { 0x01, AC_VERB_SET_GPIO_MASK, 0x18 }, | ||
| 3346 | { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x18 }, | ||
| 3347 | {} | ||
| 3348 | }; | ||
| 3349 | |||
| 3350 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
| 3351 | spec->gen.vmaster_mute.hook = alc269_fixup_hp_gpio_mute_hook; | ||
| 3352 | spec->gen.cap_sync_hook = alc269_fixup_hp_cap_mic_mute_hook; | ||
| 3353 | spec->gpio_led = 0; | ||
| 3354 | spec->cap_mute_led_nid = 0x18; | ||
| 3355 | snd_hda_add_verbs(codec, gpio_init); | ||
| 3356 | codec->power_filter = led_power_filter; | ||
| 3357 | } | ||
| 3358 | } | ||
| 3359 | |||
| 3353 | static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, | 3360 | static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, |
| 3354 | const struct hda_fixup *fix, int action) | 3361 | const struct hda_fixup *fix, int action) |
| 3355 | { | 3362 | { |
| @@ -4217,6 +4224,7 @@ enum { | |||
| 4217 | ALC283_FIXUP_BXBT2807_MIC, | 4224 | ALC283_FIXUP_BXBT2807_MIC, |
| 4218 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, | 4225 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, |
| 4219 | ALC282_FIXUP_ASPIRE_V5_PINS, | 4226 | ALC282_FIXUP_ASPIRE_V5_PINS, |
| 4227 | ALC280_FIXUP_HP_GPIO4, | ||
| 4220 | }; | 4228 | }; |
| 4221 | 4229 | ||
| 4222 | static const struct hda_fixup alc269_fixups[] = { | 4230 | static const struct hda_fixup alc269_fixups[] = { |
| @@ -4680,7 +4688,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
| 4680 | { }, | 4688 | { }, |
| 4681 | }, | 4689 | }, |
| 4682 | }, | 4690 | }, |
| 4683 | 4691 | [ALC280_FIXUP_HP_GPIO4] = { | |
| 4692 | .type = HDA_FIXUP_FUNC, | ||
| 4693 | .v.func = alc280_fixup_hp_gpio4, | ||
| 4694 | }, | ||
| 4684 | }; | 4695 | }; |
| 4685 | 4696 | ||
| 4686 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 4697 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
| @@ -4728,21 +4739,16 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 4728 | SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4739 | SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
| 4729 | SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4740 | SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4730 | SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4741 | SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4731 | SND_PCI_QUIRK(0x103c, 0x8004, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | ||
| 4732 | /* ALC290 */ | 4742 | /* ALC290 */ |
| 4733 | SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4743 | SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4734 | SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4744 | SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4735 | SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4745 | SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4736 | SND_PCI_QUIRK(0x103c, 0x2246, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4746 | SND_PCI_QUIRK(0x103c, 0x2246, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4737 | SND_PCI_QUIRK(0x103c, 0x2247, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | ||
| 4738 | SND_PCI_QUIRK(0x103c, 0x2248, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | ||
| 4739 | SND_PCI_QUIRK(0x103c, 0x2249, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | ||
| 4740 | SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4747 | SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4741 | SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4748 | SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4742 | SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4749 | SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4743 | SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4750 | SND_PCI_QUIRK(0x103c, 0x2256, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4744 | SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4751 | SND_PCI_QUIRK(0x103c, 0x2257, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4745 | SND_PCI_QUIRK(0x103c, 0x2258, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | ||
| 4746 | SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4752 | SND_PCI_QUIRK(0x103c, 0x2259, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4747 | SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4753 | SND_PCI_QUIRK(0x103c, 0x225a, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4748 | SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4754 | SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
| @@ -4751,7 +4757,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 4751 | SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4757 | SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
| 4752 | SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4758 | SND_PCI_QUIRK(0x103c, 0x2272, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4753 | SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4759 | SND_PCI_QUIRK(0x103c, 0x2273, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4754 | SND_PCI_QUIRK(0x103c, 0x2277, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | ||
| 4755 | SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 4760 | SND_PCI_QUIRK(0x103c, 0x2278, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
| 4756 | SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4761 | SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
| 4757 | SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4762 | SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
| @@ -4804,7 +4809,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 4804 | SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK), | 4809 | SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK), |
| 4805 | SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK), | 4810 | SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK), |
| 4806 | SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK), | 4811 | SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK), |
| 4807 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4812 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK), |
| 4808 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4813 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| 4809 | SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), | 4814 | SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), |
| 4810 | SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4815 | SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| @@ -4984,6 +4989,19 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | |||
| 4984 | {0x17, 0x40000000}, | 4989 | {0x17, 0x40000000}, |
| 4985 | {0x1d, 0x40700001}, | 4990 | {0x1d, 0x40700001}, |
| 4986 | {0x21, 0x02211040}), | 4991 | {0x21, 0x02211040}), |
| 4992 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, | ||
| 4993 | {0x12, 0x90a60130}, | ||
| 4994 | {0x13, 0x40000000}, | ||
| 4995 | {0x14, 0x90170110}, | ||
| 4996 | {0x15, 0x0421101f}, | ||
| 4997 | {0x16, 0x411111f0}, | ||
| 4998 | {0x17, 0x411111f0}, | ||
| 4999 | {0x18, 0x411111f0}, | ||
| 5000 | {0x19, 0x411111f0}, | ||
| 5001 | {0x1a, 0x04a11020}, | ||
| 5002 | {0x1b, 0x411111f0}, | ||
| 5003 | {0x1d, 0x40748605}, | ||
| 5004 | {0x1e, 0x411111f0}), | ||
| 4987 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED, | 5005 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED, |
| 4988 | {0x12, 0x90a60140}, | 5006 | {0x12, 0x90a60140}, |
| 4989 | {0x13, 0x40000000}, | 5007 | {0x13, 0x40000000}, |
| @@ -5651,6 +5669,35 @@ static void alc662_fixup_led_gpio1(struct hda_codec *codec, | |||
| 5651 | } | 5669 | } |
| 5652 | } | 5670 | } |
| 5653 | 5671 | ||
| 5672 | static struct coef_fw alc668_coefs[] = { | ||
| 5673 | WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), | ||
| 5674 | WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), | ||
| 5675 | WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), | ||
| 5676 | WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f), | ||
| 5677 | WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001), | ||
| 5678 | WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940), | ||
| 5679 | WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0), | ||
| 5680 | WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418), | ||
| 5681 | WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468), | ||
| 5682 | WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418), | ||
| 5683 | WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00), | ||
| 5684 | WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000), | ||
| 5685 | WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0), | ||
| 5686 | WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480), | ||
| 5687 | WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0), | ||
| 5688 | WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040), | ||
| 5689 | WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697), | ||
| 5690 | WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab), | ||
| 5691 | WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02), | ||
| 5692 | WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6), | ||
| 5693 | {} | ||
| 5694 | }; | ||
| 5695 | |||
| 5696 | static void alc668_restore_default_value(struct hda_codec *codec) | ||
| 5697 | { | ||
| 5698 | alc_process_coef_fw(codec, alc668_coefs); | ||
| 5699 | } | ||
| 5700 | |||
| 5654 | enum { | 5701 | enum { |
| 5655 | ALC662_FIXUP_ASPIRE, | 5702 | ALC662_FIXUP_ASPIRE, |
| 5656 | ALC662_FIXUP_LED_GPIO1, | 5703 | ALC662_FIXUP_LED_GPIO1, |
| @@ -6118,8 +6165,15 @@ static int patch_alc662(struct hda_codec *codec) | |||
| 6118 | 6165 | ||
| 6119 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 6166 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
| 6120 | 6167 | ||
| 6121 | spec->init_hook = alc662_fill_coef; | 6168 | switch (codec->vendor_id) { |
| 6122 | alc662_fill_coef(codec); | 6169 | case 0x10ec0668: |
| 6170 | spec->init_hook = alc668_restore_default_value; | ||
| 6171 | break; | ||
| 6172 | default: | ||
| 6173 | spec->init_hook = alc662_fill_coef; | ||
| 6174 | alc662_fill_coef(codec); | ||
| 6175 | break; | ||
| 6176 | } | ||
| 6123 | 6177 | ||
| 6124 | snd_hda_pick_fixup(codec, alc662_fixup_models, | 6178 | snd_hda_pick_fixup(codec, alc662_fixup_models, |
| 6125 | alc662_fixup_tbl, alc662_fixups); | 6179 | alc662_fixup_tbl, alc662_fixups); |
diff --git a/sound/usb/card.c b/sound/usb/card.c index 7ecd0e8a5c51..f61ebb17cc64 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
| @@ -591,18 +591,19 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
| 591 | { | 591 | { |
| 592 | struct snd_card *card; | 592 | struct snd_card *card; |
| 593 | struct list_head *p; | 593 | struct list_head *p; |
| 594 | bool was_shutdown; | ||
| 594 | 595 | ||
| 595 | if (chip == (void *)-1L) | 596 | if (chip == (void *)-1L) |
| 596 | return; | 597 | return; |
| 597 | 598 | ||
| 598 | card = chip->card; | 599 | card = chip->card; |
| 599 | down_write(&chip->shutdown_rwsem); | 600 | down_write(&chip->shutdown_rwsem); |
| 601 | was_shutdown = chip->shutdown; | ||
| 600 | chip->shutdown = 1; | 602 | chip->shutdown = 1; |
| 601 | up_write(&chip->shutdown_rwsem); | 603 | up_write(&chip->shutdown_rwsem); |
| 602 | 604 | ||
| 603 | mutex_lock(®ister_mutex); | 605 | mutex_lock(®ister_mutex); |
| 604 | chip->num_interfaces--; | 606 | if (!was_shutdown) { |
| 605 | if (chip->num_interfaces <= 0) { | ||
| 606 | struct snd_usb_endpoint *ep; | 607 | struct snd_usb_endpoint *ep; |
| 607 | 608 | ||
| 608 | snd_card_disconnect(card); | 609 | snd_card_disconnect(card); |
| @@ -622,6 +623,10 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
| 622 | list_for_each(p, &chip->mixer_list) { | 623 | list_for_each(p, &chip->mixer_list) { |
| 623 | snd_usb_mixer_disconnect(p); | 624 | snd_usb_mixer_disconnect(p); |
| 624 | } | 625 | } |
| 626 | } | ||
| 627 | |||
| 628 | chip->num_interfaces--; | ||
| 629 | if (chip->num_interfaces <= 0) { | ||
| 625 | usb_chip[chip->index] = NULL; | 630 | usb_chip[chip->index] = NULL; |
| 626 | mutex_unlock(®ister_mutex); | 631 | mutex_unlock(®ister_mutex); |
| 627 | snd_card_free_when_closed(card); | 632 | snd_card_free_when_closed(card); |
diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest index a8f81c782856..515247601df4 100755 --- a/tools/testing/selftests/ftrace/ftracetest +++ b/tools/testing/selftests/ftrace/ftracetest | |||
| @@ -82,7 +82,7 @@ parse_opts() { # opts | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | # Parameters | 84 | # Parameters |
| 85 | DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' '` | 85 | DEBUGFS_DIR=`grep debugfs /proc/mounts | cut -f2 -d' ' | head -1` |
| 86 | TRACING_DIR=$DEBUGFS_DIR/tracing | 86 | TRACING_DIR=$DEBUGFS_DIR/tracing |
| 87 | TOP_DIR=`absdir $0` | 87 | TOP_DIR=`absdir $0` |
| 88 | TEST_DIR=$TOP_DIR/test.d | 88 | TEST_DIR=$TOP_DIR/test.d |
