diff options
175 files changed, 1082 insertions, 664 deletions
| @@ -111,6 +111,7 @@ Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> | |||
| 111 | Uwe Kleine-König <ukl@pengutronix.de> | 111 | Uwe Kleine-König <ukl@pengutronix.de> |
| 112 | Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> | 112 | Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> |
| 113 | Valdis Kletnieks <Valdis.Kletnieks@vt.edu> | 113 | Valdis Kletnieks <Valdis.Kletnieks@vt.edu> |
| 114 | Viresh Kumar <viresh.linux@gmail.com> <viresh.kumar@st.com> | ||
| 114 | Takashi YOSHII <takashi.yoshii.zj@renesas.com> | 115 | Takashi YOSHII <takashi.yoshii.zj@renesas.com> |
| 115 | Yusuke Goda <goda.yusuke@renesas.com> | 116 | Yusuke Goda <goda.yusuke@renesas.com> |
| 116 | Gustavo Padovan <gustavo@las.ic.unicamp.br> | 117 | Gustavo Padovan <gustavo@las.ic.unicamp.br> |
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 5bc8a476c15e..cfedf63cce15 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
| @@ -219,6 +219,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale | |||
| 219 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale | 219 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale |
| 220 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale | 220 | What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale |
| 221 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale | 221 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale |
| 222 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale | ||
| 222 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale | 223 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale |
| 223 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_peak_scale | 224 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_peak_scale |
| 224 | What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_scale | 225 | What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_scale |
| @@ -273,6 +274,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale_available | |||
| 273 | What: /sys/.../iio:deviceX/in_voltageX_scale_available | 274 | What: /sys/.../iio:deviceX/in_voltageX_scale_available |
| 274 | What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available | 275 | What: /sys/.../iio:deviceX/in_voltage-voltage_scale_available |
| 275 | What: /sys/.../iio:deviceX/out_voltageX_scale_available | 276 | What: /sys/.../iio:deviceX/out_voltageX_scale_available |
| 277 | What: /sys/.../iio:deviceX/out_altvoltageX_scale_available | ||
| 276 | What: /sys/.../iio:deviceX/in_capacitance_scale_available | 278 | What: /sys/.../iio:deviceX/in_capacitance_scale_available |
| 277 | KernelVersion: 2.635 | 279 | KernelVersion: 2.635 |
| 278 | Contact: linux-iio@vger.kernel.org | 280 | Contact: linux-iio@vger.kernel.org |
| @@ -298,14 +300,19 @@ Description: | |||
| 298 | gives the 3dB frequency of the filter in Hz. | 300 | gives the 3dB frequency of the filter in Hz. |
| 299 | 301 | ||
| 300 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw | 302 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw |
| 303 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_raw | ||
| 301 | KernelVersion: 2.6.37 | 304 | KernelVersion: 2.6.37 |
| 302 | Contact: linux-iio@vger.kernel.org | 305 | Contact: linux-iio@vger.kernel.org |
| 303 | Description: | 306 | Description: |
| 304 | Raw (unscaled, no bias etc.) output voltage for | 307 | Raw (unscaled, no bias etc.) output voltage for |
| 305 | channel Y. The number must always be specified and | 308 | channel Y. The number must always be specified and |
| 306 | unique if the output corresponds to a single channel. | 309 | unique if the output corresponds to a single channel. |
| 310 | While DAC like devices typically use out_voltage, | ||
| 311 | a continuous frequency generating device, such as | ||
| 312 | a DDS or PLL should use out_altvoltage. | ||
| 307 | 313 | ||
| 308 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY&Z_raw | 314 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY&Z_raw |
| 315 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY&Z_raw | ||
| 309 | KernelVersion: 2.6.37 | 316 | KernelVersion: 2.6.37 |
| 310 | Contact: linux-iio@vger.kernel.org | 317 | Contact: linux-iio@vger.kernel.org |
| 311 | Description: | 318 | Description: |
| @@ -316,6 +323,8 @@ Description: | |||
| 316 | 323 | ||
| 317 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown_mode | 324 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown_mode |
| 318 | What: /sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown_mode | 325 | What: /sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown_mode |
| 326 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown_mode | ||
| 327 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltage_powerdown_mode | ||
| 319 | KernelVersion: 2.6.38 | 328 | KernelVersion: 2.6.38 |
| 320 | Contact: linux-iio@vger.kernel.org | 329 | Contact: linux-iio@vger.kernel.org |
| 321 | Description: | 330 | Description: |
| @@ -330,6 +339,8 @@ Description: | |||
| 330 | 339 | ||
| 331 | What: /sys/.../iio:deviceX/out_votlageY_powerdown_mode_available | 340 | What: /sys/.../iio:deviceX/out_votlageY_powerdown_mode_available |
| 332 | What: /sys/.../iio:deviceX/out_voltage_powerdown_mode_available | 341 | What: /sys/.../iio:deviceX/out_voltage_powerdown_mode_available |
| 342 | What: /sys/.../iio:deviceX/out_altvotlageY_powerdown_mode_available | ||
| 343 | What: /sys/.../iio:deviceX/out_altvoltage_powerdown_mode_available | ||
| 333 | KernelVersion: 2.6.38 | 344 | KernelVersion: 2.6.38 |
| 334 | Contact: linux-iio@vger.kernel.org | 345 | Contact: linux-iio@vger.kernel.org |
| 335 | Description: | 346 | Description: |
| @@ -338,6 +349,8 @@ Description: | |||
| 338 | 349 | ||
| 339 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown | 350 | What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown |
| 340 | What: /sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown | 351 | What: /sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown |
| 352 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown | ||
| 353 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltage_powerdown | ||
| 341 | KernelVersion: 2.6.38 | 354 | KernelVersion: 2.6.38 |
| 342 | Contact: linux-iio@vger.kernel.org | 355 | Contact: linux-iio@vger.kernel.org |
| 343 | Description: | 356 | Description: |
| @@ -346,6 +359,24 @@ Description: | |||
| 346 | normal operation. Y may be suppressed if all outputs are | 359 | normal operation. Y may be suppressed if all outputs are |
| 347 | controlled together. | 360 | controlled together. |
| 348 | 361 | ||
| 362 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency | ||
| 363 | KernelVersion: 3.4.0 | ||
| 364 | Contact: linux-iio@vger.kernel.org | ||
| 365 | Description: | ||
| 366 | Output frequency for channel Y in Hz. The number must always be | ||
| 367 | specified and unique if the output corresponds to a single | ||
| 368 | channel. | ||
| 369 | |||
| 370 | What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_phase | ||
| 371 | KernelVersion: 3.4.0 | ||
| 372 | Contact: linux-iio@vger.kernel.org | ||
| 373 | Description: | ||
| 374 | Phase in radians of one frequency/clock output Y | ||
| 375 | (out_altvoltageY) relative to another frequency/clock output | ||
| 376 | (out_altvoltageZ) of the device X. The number must always be | ||
| 377 | specified and unique if the output corresponds to a single | ||
| 378 | channel. | ||
| 379 | |||
| 349 | What: /sys/bus/iio/devices/iio:deviceX/events | 380 | What: /sys/bus/iio/devices/iio:deviceX/events |
| 350 | KernelVersion: 2.6.35 | 381 | KernelVersion: 2.6.35 |
| 351 | Contact: linux-iio@vger.kernel.org | 382 | Contact: linux-iio@vger.kernel.org |
diff --git a/Documentation/arm/SPEAr/overview.txt b/Documentation/arm/SPEAr/overview.txt index 57aae7765c74..65610bf52ebf 100644 --- a/Documentation/arm/SPEAr/overview.txt +++ b/Documentation/arm/SPEAr/overview.txt | |||
| @@ -60,4 +60,4 @@ Introduction | |||
| 60 | Document Author | 60 | Document Author |
| 61 | --------------- | 61 | --------------- |
| 62 | 62 | ||
| 63 | Viresh Kumar <viresh.kumar@st.com>, (c) 2010-2012 ST Microelectronics | 63 | Viresh Kumar <viresh.linux@gmail.com>, (c) 2010-2012 ST Microelectronics |
diff --git a/MAINTAINERS b/MAINTAINERS index 3e30a3afe2a4..eb22272b2116 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -579,7 +579,7 @@ F: drivers/net/appletalk/ | |||
| 579 | F: net/appletalk/ | 579 | F: net/appletalk/ |
| 580 | 580 | ||
| 581 | ARASAN COMPACT FLASH PATA CONTROLLER | 581 | ARASAN COMPACT FLASH PATA CONTROLLER |
| 582 | M: Viresh Kumar <viresh.kumar@st.com> | 582 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 583 | L: linux-ide@vger.kernel.org | 583 | L: linux-ide@vger.kernel.org |
| 584 | S: Maintained | 584 | S: Maintained |
| 585 | F: include/linux/pata_arasan_cf_data.h | 585 | F: include/linux/pata_arasan_cf_data.h |
| @@ -5296,7 +5296,7 @@ S: Maintained | |||
| 5296 | F: drivers/pinctrl/ | 5296 | F: drivers/pinctrl/ |
| 5297 | 5297 | ||
| 5298 | PIN CONTROLLER - ST SPEAR | 5298 | PIN CONTROLLER - ST SPEAR |
| 5299 | M: Viresh Kumar <viresh.kumar@st.com> | 5299 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 5300 | L: spear-devel@list.st.com | 5300 | L: spear-devel@list.st.com |
| 5301 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 5301 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 5302 | W: http://www.st.com/spear | 5302 | W: http://www.st.com/spear |
| @@ -5873,7 +5873,7 @@ S: Maintained | |||
| 5873 | F: drivers/tty/serial | 5873 | F: drivers/tty/serial |
| 5874 | 5874 | ||
| 5875 | SYNOPSYS DESIGNWARE DMAC DRIVER | 5875 | SYNOPSYS DESIGNWARE DMAC DRIVER |
| 5876 | M: Viresh Kumar <viresh.kumar@st.com> | 5876 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 5877 | S: Maintained | 5877 | S: Maintained |
| 5878 | F: include/linux/dw_dmac.h | 5878 | F: include/linux/dw_dmac.h |
| 5879 | F: drivers/dma/dw_dmac_regs.h | 5879 | F: drivers/dma/dw_dmac_regs.h |
| @@ -6021,7 +6021,7 @@ S: Maintained | |||
| 6021 | F: drivers/mmc/host/sdhci-s3c.c | 6021 | F: drivers/mmc/host/sdhci-s3c.c |
| 6022 | 6022 | ||
| 6023 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER | 6023 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER |
| 6024 | M: Viresh Kumar <viresh.kumar@st.com> | 6024 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 6025 | L: spear-devel@list.st.com | 6025 | L: spear-devel@list.st.com |
| 6026 | L: linux-mmc@vger.kernel.org | 6026 | L: linux-mmc@vger.kernel.org |
| 6027 | S: Maintained | 6027 | S: Maintained |
| @@ -6377,7 +6377,7 @@ S: Maintained | |||
| 6377 | F: include/linux/compiler.h | 6377 | F: include/linux/compiler.h |
| 6378 | 6378 | ||
| 6379 | SPEAR PLATFORM SUPPORT | 6379 | SPEAR PLATFORM SUPPORT |
| 6380 | M: Viresh Kumar <viresh.kumar@st.com> | 6380 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 6381 | M: Shiraz Hashim <shiraz.hashim@st.com> | 6381 | M: Shiraz Hashim <shiraz.hashim@st.com> |
| 6382 | L: spear-devel@list.st.com | 6382 | L: spear-devel@list.st.com |
| 6383 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 6383 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -6386,7 +6386,7 @@ S: Maintained | |||
| 6386 | F: arch/arm/plat-spear/ | 6386 | F: arch/arm/plat-spear/ |
| 6387 | 6387 | ||
| 6388 | SPEAR13XX MACHINE SUPPORT | 6388 | SPEAR13XX MACHINE SUPPORT |
| 6389 | M: Viresh Kumar <viresh.kumar@st.com> | 6389 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 6390 | M: Shiraz Hashim <shiraz.hashim@st.com> | 6390 | M: Shiraz Hashim <shiraz.hashim@st.com> |
| 6391 | L: spear-devel@list.st.com | 6391 | L: spear-devel@list.st.com |
| 6392 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 6392 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -6395,7 +6395,7 @@ S: Maintained | |||
| 6395 | F: arch/arm/mach-spear13xx/ | 6395 | F: arch/arm/mach-spear13xx/ |
| 6396 | 6396 | ||
| 6397 | SPEAR3XX MACHINE SUPPORT | 6397 | SPEAR3XX MACHINE SUPPORT |
| 6398 | M: Viresh Kumar <viresh.kumar@st.com> | 6398 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 6399 | M: Shiraz Hashim <shiraz.hashim@st.com> | 6399 | M: Shiraz Hashim <shiraz.hashim@st.com> |
| 6400 | L: spear-devel@list.st.com | 6400 | L: spear-devel@list.st.com |
| 6401 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 6401 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -6406,7 +6406,7 @@ F: arch/arm/mach-spear3xx/ | |||
| 6406 | SPEAR6XX MACHINE SUPPORT | 6406 | SPEAR6XX MACHINE SUPPORT |
| 6407 | M: Rajeev Kumar <rajeev-dlh.kumar@st.com> | 6407 | M: Rajeev Kumar <rajeev-dlh.kumar@st.com> |
| 6408 | M: Shiraz Hashim <shiraz.hashim@st.com> | 6408 | M: Shiraz Hashim <shiraz.hashim@st.com> |
| 6409 | M: Viresh Kumar <viresh.kumar@st.com> | 6409 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 6410 | L: spear-devel@list.st.com | 6410 | L: spear-devel@list.st.com |
| 6411 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 6411 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 6412 | W: http://www.st.com/spear | 6412 | W: http://www.st.com/spear |
| @@ -6414,7 +6414,7 @@ S: Maintained | |||
| 6414 | F: arch/arm/mach-spear6xx/ | 6414 | F: arch/arm/mach-spear6xx/ |
| 6415 | 6415 | ||
| 6416 | SPEAR CLOCK FRAMEWORK SUPPORT | 6416 | SPEAR CLOCK FRAMEWORK SUPPORT |
| 6417 | M: Viresh Kumar <viresh.kumar@st.com> | 6417 | M: Viresh Kumar <viresh.linux@gmail.com> |
| 6418 | L: spear-devel@list.st.com | 6418 | L: spear-devel@list.st.com |
| 6419 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 6419 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 6420 | W: http://www.st.com/spear | 6420 | W: http://www.st.com/spear |
| @@ -7421,7 +7421,7 @@ F: include/linux/vlynq.h | |||
| 7421 | 7421 | ||
| 7422 | VME SUBSYSTEM | 7422 | VME SUBSYSTEM |
| 7423 | M: Martyn Welch <martyn.welch@ge.com> | 7423 | M: Martyn Welch <martyn.welch@ge.com> |
| 7424 | M: Manohar Vanga <manohar.vanga@cern.ch> | 7424 | M: Manohar Vanga <manohar.vanga@gmail.com> |
| 7425 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 7425 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| 7426 | L: devel@driverdev.osuosl.org | 7426 | L: devel@driverdev.osuosl.org |
| 7427 | S: Maintained | 7427 | S: Maintained |
diff --git a/arch/arm/boot/dts/spear1310-evb.dts b/arch/arm/boot/dts/spear1310-evb.dts index 8314e4171884..dd4358bc26e2 100644 --- a/arch/arm/boot/dts/spear1310-evb.dts +++ b/arch/arm/boot/dts/spear1310-evb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr1310 Evaluation Baord | 2 | * DTS file for SPEAr1310 Evaluation Baord |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear1310.dtsi b/arch/arm/boot/dts/spear1310.dtsi index 9e61da404d57..419ea7413d23 100644 --- a/arch/arm/boot/dts/spear1310.dtsi +++ b/arch/arm/boot/dts/spear1310.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for all SPEAr1310 SoCs | 2 | * DTS file for all SPEAr1310 SoCs |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear1340-evb.dts b/arch/arm/boot/dts/spear1340-evb.dts index 0d8472e5ab9f..c9a54e06fb68 100644 --- a/arch/arm/boot/dts/spear1340-evb.dts +++ b/arch/arm/boot/dts/spear1340-evb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr1340 Evaluation Baord | 2 | * DTS file for SPEAr1340 Evaluation Baord |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear1340.dtsi b/arch/arm/boot/dts/spear1340.dtsi index a26fc47a55e8..d71fe2a68f09 100644 --- a/arch/arm/boot/dts/spear1340.dtsi +++ b/arch/arm/boot/dts/spear1340.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for all SPEAr1340 SoCs | 2 | * DTS file for all SPEAr1340 SoCs |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi index 1f8e1e1481df..10dcec7e7321 100644 --- a/arch/arm/boot/dts/spear13xx.dtsi +++ b/arch/arm/boot/dts/spear13xx.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for all SPEAr13xx SoCs | 2 | * DTS file for all SPEAr13xx SoCs |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear300-evb.dts b/arch/arm/boot/dts/spear300-evb.dts index fc82b1a26458..d71b8d581e3d 100644 --- a/arch/arm/boot/dts/spear300-evb.dts +++ b/arch/arm/boot/dts/spear300-evb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr300 Evaluation Baord | 2 | * DTS file for SPEAr300 Evaluation Baord |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear300.dtsi b/arch/arm/boot/dts/spear300.dtsi index 01c5e358fdb2..ed3627c116cc 100644 --- a/arch/arm/boot/dts/spear300.dtsi +++ b/arch/arm/boot/dts/spear300.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr300 SoC | 2 | * DTS file for SPEAr300 SoC |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear310-evb.dts b/arch/arm/boot/dts/spear310-evb.dts index dc5e2d445a93..b00544e0cd5d 100644 --- a/arch/arm/boot/dts/spear310-evb.dts +++ b/arch/arm/boot/dts/spear310-evb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr310 Evaluation Baord | 2 | * DTS file for SPEAr310 Evaluation Baord |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear310.dtsi b/arch/arm/boot/dts/spear310.dtsi index e47081c494d9..62fc4fb3e5f9 100644 --- a/arch/arm/boot/dts/spear310.dtsi +++ b/arch/arm/boot/dts/spear310.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr310 SoC | 2 | * DTS file for SPEAr310 SoC |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear320-evb.dts b/arch/arm/boot/dts/spear320-evb.dts index 6308fa3bec1e..c13fd1f3b09f 100644 --- a/arch/arm/boot/dts/spear320-evb.dts +++ b/arch/arm/boot/dts/spear320-evb.dts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr320 Evaluation Baord | 2 | * DTS file for SPEAr320 Evaluation Baord |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear320.dtsi b/arch/arm/boot/dts/spear320.dtsi index 5372ca399b1f..1f49d69595a0 100644 --- a/arch/arm/boot/dts/spear320.dtsi +++ b/arch/arm/boot/dts/spear320.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for SPEAr320 SoC | 2 | * DTS file for SPEAr320 SoC |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/boot/dts/spear3xx.dtsi b/arch/arm/boot/dts/spear3xx.dtsi index 91072553963f..3a8bb5736928 100644 --- a/arch/arm/boot/dts/spear3xx.dtsi +++ b/arch/arm/boot/dts/spear3xx.dtsi | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DTS file for all SPEAr3xx SoCs | 2 | * DTS file for all SPEAr3xx SoCs |
| 3 | * | 3 | * |
| 4 | * Copyright 2012 Viresh Kumar <viresh.kumar@st.com> | 4 | * Copyright 2012 Viresh Kumar <viresh.linux@gmail.com> |
| 5 | * | 5 | * |
| 6 | * The code contained herein is licensed under the GNU General Public | 6 | * The code contained herein is licensed under the GNU General Public |
| 7 | * License. You may obtain a copy of the GNU General Public License | 7 | * License. You may obtain a copy of the GNU General Public License |
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 7be54690aeec..e42cf597f6e6 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | " .long 1b, 4f, 2b, 4f\n" \ | 19 | " .long 1b, 4f, 2b, 4f\n" \ |
| 20 | " .popsection\n" \ | 20 | " .popsection\n" \ |
| 21 | " .pushsection .fixup,\"ax\"\n" \ | 21 | " .pushsection .fixup,\"ax\"\n" \ |
| 22 | " .align 2\n" \ | ||
| 22 | "4: mov %0, " err_reg "\n" \ | 23 | "4: mov %0, " err_reg "\n" \ |
| 23 | " b 3b\n" \ | 24 | " b 3b\n" \ |
| 24 | " .popsection" | 25 | " .popsection" |
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h index e0d1c0cfa548..6b9b077d86b3 100644 --- a/arch/arm/include/asm/hardware/sp810.h +++ b/arch/arm/include/asm/hardware/sp810.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * ARM PrimeXsys System Controller SP810 header file | 4 | * ARM PrimeXsys System Controller SP810 header file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 437f0c426517..0d1851ca6eb9 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
| @@ -495,6 +495,7 @@ ENDPROC(__und_usr) | |||
| 495 | * The out of line fixup for the ldrt above. | 495 | * The out of line fixup for the ldrt above. |
| 496 | */ | 496 | */ |
| 497 | .pushsection .fixup, "ax" | 497 | .pushsection .fixup, "ax" |
| 498 | .align 2 | ||
| 498 | 4: mov pc, r9 | 499 | 4: mov pc, r9 |
| 499 | .popsection | 500 | .popsection |
| 500 | .pushsection __ex_table,"a" | 501 | .pushsection __ex_table,"a" |
diff --git a/arch/arm/kernel/kprobes-thumb.c b/arch/arm/kernel/kprobes-thumb.c index 8f96ec778e8d..6123daf397a7 100644 --- a/arch/arm/kernel/kprobes-thumb.c +++ b/arch/arm/kernel/kprobes-thumb.c | |||
| @@ -660,7 +660,7 @@ static const union decode_item t32_table_1111_100x[] = { | |||
| 660 | /* LDRSB (literal) 1111 1001 x001 1111 xxxx xxxx xxxx xxxx */ | 660 | /* LDRSB (literal) 1111 1001 x001 1111 xxxx xxxx xxxx xxxx */ |
| 661 | /* LDRH (literal) 1111 1000 x011 1111 xxxx xxxx xxxx xxxx */ | 661 | /* LDRH (literal) 1111 1000 x011 1111 xxxx xxxx xxxx xxxx */ |
| 662 | /* LDRSH (literal) 1111 1001 x011 1111 xxxx xxxx xxxx xxxx */ | 662 | /* LDRSH (literal) 1111 1001 x011 1111 xxxx xxxx xxxx xxxx */ |
| 663 | DECODE_EMULATEX (0xfe5f0000, 0xf81f0000, t32_simulate_ldr_literal, | 663 | DECODE_SIMULATEX(0xfe5f0000, 0xf81f0000, t32_simulate_ldr_literal, |
| 664 | REGS(PC, NOSPPCX, 0, 0, 0)), | 664 | REGS(PC, NOSPPCX, 0, 0, 0)), |
| 665 | 665 | ||
| 666 | /* STRB (immediate) 1111 1000 0000 xxxx xxxx 1xxx xxxx xxxx */ | 666 | /* STRB (immediate) 1111 1000 0000 xxxx xxxx 1xxx xxxx xxxx */ |
diff --git a/arch/arm/mach-spear13xx/include/mach/debug-macro.S b/arch/arm/mach-spear13xx/include/mach/debug-macro.S index ea1564609bd4..9e3ae6bfe50d 100644 --- a/arch/arm/mach-spear13xx/include/mach/debug-macro.S +++ b/arch/arm/mach-spear13xx/include/mach/debug-macro.S | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Debugging macro include header spear13xx machine family | 4 | * Debugging macro include header spear13xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/dma.h b/arch/arm/mach-spear13xx/include/mach/dma.h index 383ab04dc6c9..d50bdb605925 100644 --- a/arch/arm/mach-spear13xx/include/mach/dma.h +++ b/arch/arm/mach-spear13xx/include/mach/dma.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * DMA information for SPEAr13xx machine family | 4 | * DMA information for SPEAr13xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h index 6d8c45b9f298..dac57fd0cdfd 100644 --- a/arch/arm/mach-spear13xx/include/mach/generic.h +++ b/arch/arm/mach-spear13xx/include/mach/generic.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * spear13xx machine family generic header file | 4 | * spear13xx machine family generic header file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/gpio.h b/arch/arm/mach-spear13xx/include/mach/gpio.h index cd6f4f86a56b..85f176311f63 100644 --- a/arch/arm/mach-spear13xx/include/mach/gpio.h +++ b/arch/arm/mach-spear13xx/include/mach/gpio.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * GPIO macros for SPEAr13xx machine family | 4 | * GPIO macros for SPEAr13xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/irqs.h b/arch/arm/mach-spear13xx/include/mach/irqs.h index f542a24aa5f2..271a62b4cd31 100644 --- a/arch/arm/mach-spear13xx/include/mach/irqs.h +++ b/arch/arm/mach-spear13xx/include/mach/irqs.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * IRQ helper macros for spear13xx machine family | 4 | * IRQ helper macros for spear13xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/spear.h b/arch/arm/mach-spear13xx/include/mach/spear.h index 30c57ef72686..65f27def239b 100644 --- a/arch/arm/mach-spear13xx/include/mach/spear.h +++ b/arch/arm/mach-spear13xx/include/mach/spear.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * spear13xx Machine family specific definition | 4 | * spear13xx Machine family specific definition |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/timex.h b/arch/arm/mach-spear13xx/include/mach/timex.h index 31af3e8d976e..3a58b8284a6a 100644 --- a/arch/arm/mach-spear13xx/include/mach/timex.h +++ b/arch/arm/mach-spear13xx/include/mach/timex.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr3XX machine family specific timex definitions | 4 | * SPEAr3XX machine family specific timex definitions |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/include/mach/uncompress.h b/arch/arm/mach-spear13xx/include/mach/uncompress.h index c7840896ae6e..70fe72f05dea 100644 --- a/arch/arm/mach-spear13xx/include/mach/uncompress.h +++ b/arch/arm/mach-spear13xx/include/mach/uncompress.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Serial port stubs for kernel decompress status messages | 4 | * Serial port stubs for kernel decompress status messages |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/spear1310.c b/arch/arm/mach-spear13xx/spear1310.c index fefd15b2f380..732d29bc7330 100644 --- a/arch/arm/mach-spear13xx/spear1310.c +++ b/arch/arm/mach-spear13xx/spear1310.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr1310 machine source file | 4 | * SPEAr1310 machine source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear13xx/spear1340.c index ee38cbc56869..81e4ed76ad06 100644 --- a/arch/arm/mach-spear13xx/spear1340.c +++ b/arch/arm/mach-spear13xx/spear1340.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr1340 machine source file | 4 | * SPEAr1340 machine source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c index 50b349ae863d..cf936b106e27 100644 --- a/arch/arm/mach-spear13xx/spear13xx.c +++ b/arch/arm/mach-spear13xx/spear13xx.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr13XX machines common source file | 4 | * SPEAr13XX machines common source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/debug-macro.S b/arch/arm/mach-spear3xx/include/mach/debug-macro.S index 590519f10d6e..0a6381fad5d9 100644 --- a/arch/arm/mach-spear3xx/include/mach/debug-macro.S +++ b/arch/arm/mach-spear3xx/include/mach/debug-macro.S | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Debugging macro include header spear3xx machine family | 4 | * Debugging macro include header spear3xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar<viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index 4a95b9453c2a..ce19113ca791 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr3XX machine family generic header file | 4 | * SPEAr3XX machine family generic header file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar<viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/gpio.h b/arch/arm/mach-spear3xx/include/mach/gpio.h index 451b2081bfc9..2ac74c6db7f1 100644 --- a/arch/arm/mach-spear3xx/include/mach/gpio.h +++ b/arch/arm/mach-spear3xx/include/mach/gpio.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * GPIO macros for SPEAr3xx machine family | 4 | * GPIO macros for SPEAr3xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar<viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h index 51bd62a0254c..803de76f5f36 100644 --- a/arch/arm/mach-spear3xx/include/mach/irqs.h +++ b/arch/arm/mach-spear3xx/include/mach/irqs.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * IRQ helper macros for SPEAr3xx machine family | 4 | * IRQ helper macros for SPEAr3xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/misc_regs.h b/arch/arm/mach-spear3xx/include/mach/misc_regs.h index 18e2ac576f25..6309bf68d6f8 100644 --- a/arch/arm/mach-spear3xx/include/mach/misc_regs.h +++ b/arch/arm/mach-spear3xx/include/mach/misc_regs.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Miscellaneous registers definitions for SPEAr3xx machine family | 4 | * Miscellaneous registers definitions for SPEAr3xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/spear.h b/arch/arm/mach-spear3xx/include/mach/spear.h index 51eb953148a9..8cca95193d4d 100644 --- a/arch/arm/mach-spear3xx/include/mach/spear.h +++ b/arch/arm/mach-spear3xx/include/mach/spear.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr3xx Machine family specific definition | 4 | * SPEAr3xx Machine family specific definition |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/timex.h b/arch/arm/mach-spear3xx/include/mach/timex.h index a38cc9de876f..9f5d08bd0c44 100644 --- a/arch/arm/mach-spear3xx/include/mach/timex.h +++ b/arch/arm/mach-spear3xx/include/mach/timex.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr3XX machine family specific timex definitions | 4 | * SPEAr3XX machine family specific timex definitions |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/include/mach/uncompress.h b/arch/arm/mach-spear3xx/include/mach/uncompress.h index 53ba8bbc0dfa..b909b011f7c8 100644 --- a/arch/arm/mach-spear3xx/include/mach/uncompress.h +++ b/arch/arm/mach-spear3xx/include/mach/uncompress.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Serial port stubs for kernel decompress status messages | 4 | * Serial port stubs for kernel decompress status messages |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c index f74a05bdb829..0f882ecb7d81 100644 --- a/arch/arm/mach-spear3xx/spear300.c +++ b/arch/arm/mach-spear3xx/spear300.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr300 machine source file | 4 | * SPEAr300 machine source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009-2012 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c index 84dfb0900747..bbcf4571d361 100644 --- a/arch/arm/mach-spear3xx/spear310.c +++ b/arch/arm/mach-spear3xx/spear310.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr310 machine source file | 4 | * SPEAr310 machine source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009-2012 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index a88fa841d29d..88d483bcd66a 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr320 machine source file | 4 | * SPEAr320 machine source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009-2012 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index f22419ed74a8..0f41bd1c47c3 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr3XX machines common source file | 4 | * SPEAr3XX machines common source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009-2012 ST Microelectronics | 6 | * Copyright (C) 2009-2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear6xx/include/mach/gpio.h b/arch/arm/mach-spear6xx/include/mach/gpio.h index 3a789dbb69f7..d42cefc0356d 100644 --- a/arch/arm/mach-spear6xx/include/mach/gpio.h +++ b/arch/arm/mach-spear6xx/include/mach/gpio.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * GPIO macros for SPEAr6xx machine family | 4 | * GPIO macros for SPEAr6xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/arch/arm/mach-spear6xx/include/mach/misc_regs.h index 179e45774b3a..c34acc201d34 100644 --- a/arch/arm/mach-spear6xx/include/mach/misc_regs.h +++ b/arch/arm/mach-spear6xx/include/mach/misc_regs.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Miscellaneous registers definitions for SPEAr6xx machine family | 4 | * Miscellaneous registers definitions for SPEAr6xx machine family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 9c74ac545849..1509a3cb5833 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
| @@ -580,43 +580,12 @@ static void ux500_uart0_reset(void) | |||
| 580 | udelay(1); | 580 | udelay(1); |
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | /* This needs to be referenced by callbacks */ | ||
| 584 | struct pinctrl *u0_p; | ||
| 585 | struct pinctrl_state *u0_def; | ||
| 586 | struct pinctrl_state *u0_sleep; | ||
| 587 | |||
| 588 | static void ux500_uart0_init(void) | ||
| 589 | { | ||
| 590 | int ret; | ||
| 591 | |||
| 592 | if (IS_ERR(u0_p) || IS_ERR(u0_def)) | ||
| 593 | return; | ||
| 594 | |||
| 595 | ret = pinctrl_select_state(u0_p, u0_def); | ||
| 596 | if (ret) | ||
| 597 | pr_err("could not set UART0 defstate\n"); | ||
| 598 | } | ||
| 599 | |||
| 600 | static void ux500_uart0_exit(void) | ||
| 601 | { | ||
| 602 | int ret; | ||
| 603 | |||
| 604 | if (IS_ERR(u0_p) || IS_ERR(u0_sleep)) | ||
| 605 | return; | ||
| 606 | |||
| 607 | ret = pinctrl_select_state(u0_p, u0_sleep); | ||
| 608 | if (ret) | ||
| 609 | pr_err("could not set UART0 idlestate\n"); | ||
| 610 | } | ||
| 611 | |||
| 612 | static struct amba_pl011_data uart0_plat = { | 583 | static struct amba_pl011_data uart0_plat = { |
| 613 | #ifdef CONFIG_STE_DMA40 | 584 | #ifdef CONFIG_STE_DMA40 |
| 614 | .dma_filter = stedma40_filter, | 585 | .dma_filter = stedma40_filter, |
| 615 | .dma_rx_param = &uart0_dma_cfg_rx, | 586 | .dma_rx_param = &uart0_dma_cfg_rx, |
| 616 | .dma_tx_param = &uart0_dma_cfg_tx, | 587 | .dma_tx_param = &uart0_dma_cfg_tx, |
| 617 | #endif | 588 | #endif |
| 618 | .init = ux500_uart0_init, | ||
| 619 | .exit = ux500_uart0_exit, | ||
| 620 | .reset = ux500_uart0_reset, | 589 | .reset = ux500_uart0_reset, |
| 621 | }; | 590 | }; |
| 622 | 591 | ||
| @@ -638,28 +607,7 @@ static struct amba_pl011_data uart2_plat = { | |||
| 638 | 607 | ||
| 639 | static void __init mop500_uart_init(struct device *parent) | 608 | static void __init mop500_uart_init(struct device *parent) |
| 640 | { | 609 | { |
| 641 | struct amba_device *uart0_device; | 610 | db8500_add_uart0(parent, &uart0_plat); |
| 642 | |||
| 643 | uart0_device = db8500_add_uart0(parent, &uart0_plat); | ||
| 644 | if (uart0_device) { | ||
| 645 | u0_p = pinctrl_get(&uart0_device->dev); | ||
| 646 | if (IS_ERR(u0_p)) | ||
| 647 | dev_err(&uart0_device->dev, | ||
| 648 | "could not get UART0 pinctrl\n"); | ||
| 649 | else { | ||
| 650 | u0_def = pinctrl_lookup_state(u0_p, | ||
| 651 | PINCTRL_STATE_DEFAULT); | ||
| 652 | if (IS_ERR(u0_def)) { | ||
| 653 | dev_err(&uart0_device->dev, | ||
| 654 | "could not get UART0 defstate\n"); | ||
| 655 | } | ||
| 656 | u0_sleep = pinctrl_lookup_state(u0_p, | ||
| 657 | PINCTRL_STATE_SLEEP); | ||
| 658 | if (IS_ERR(u0_sleep)) | ||
| 659 | dev_err(&uart0_device->dev, | ||
| 660 | "could not get UART0 idlestate\n"); | ||
| 661 | } | ||
| 662 | } | ||
| 663 | db8500_add_uart1(parent, &uart1_plat); | 611 | db8500_add_uart1(parent, &uart1_plat); |
| 664 | db8500_add_uart2(parent, &uart2_plat); | 612 | db8500_add_uart2(parent, &uart2_plat); |
| 665 | } | 613 | } |
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 62135849f48b..c641fb685017 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c | |||
| @@ -762,6 +762,11 @@ b_epilogue: | |||
| 762 | update_on_xread(ctx); | 762 | update_on_xread(ctx); |
| 763 | emit(ARM_MOV_R(r_A, r_X), ctx); | 763 | emit(ARM_MOV_R(r_A, r_X), ctx); |
| 764 | break; | 764 | break; |
| 765 | case BPF_S_ANC_ALU_XOR_X: | ||
| 766 | /* A ^= X */ | ||
| 767 | update_on_xread(ctx); | ||
| 768 | emit(ARM_EOR_R(r_A, r_A, r_X), ctx); | ||
| 769 | break; | ||
| 765 | case BPF_S_ANC_PROTOCOL: | 770 | case BPF_S_ANC_PROTOCOL: |
| 766 | /* A = ntohs(skb->protocol) */ | 771 | /* A = ntohs(skb->protocol) */ |
| 767 | ctx->seen |= SEEN_SKB; | 772 | ctx->seen |= SEEN_SKB; |
diff --git a/arch/arm/net/bpf_jit_32.h b/arch/arm/net/bpf_jit_32.h index 99ae5e3f46d2..7fa2f7d3cb90 100644 --- a/arch/arm/net/bpf_jit_32.h +++ b/arch/arm/net/bpf_jit_32.h | |||
| @@ -68,6 +68,8 @@ | |||
| 68 | #define ARM_INST_CMP_R 0x01500000 | 68 | #define ARM_INST_CMP_R 0x01500000 |
| 69 | #define ARM_INST_CMP_I 0x03500000 | 69 | #define ARM_INST_CMP_I 0x03500000 |
| 70 | 70 | ||
| 71 | #define ARM_INST_EOR_R 0x00200000 | ||
| 72 | |||
| 71 | #define ARM_INST_LDRB_I 0x05d00000 | 73 | #define ARM_INST_LDRB_I 0x05d00000 |
| 72 | #define ARM_INST_LDRB_R 0x07d00000 | 74 | #define ARM_INST_LDRB_R 0x07d00000 |
| 73 | #define ARM_INST_LDRH_I 0x01d000b0 | 75 | #define ARM_INST_LDRH_I 0x01d000b0 |
| @@ -132,6 +134,8 @@ | |||
| 132 | #define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm) | 134 | #define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm) |
| 133 | #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm) | 135 | #define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm) |
| 134 | 136 | ||
| 137 | #define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm) | ||
| 138 | |||
| 135 | #define ARM_LDR_I(rt, rn, off) (ARM_INST_LDR_I | (rt) << 12 | (rn) << 16 \ | 139 | #define ARM_LDR_I(rt, rn, off) (ARM_INST_LDR_I | (rt) << 12 | (rn) << 16 \ |
| 136 | | (off)) | 140 | | (off)) |
| 137 | #define ARM_LDRB_I(rt, rn, off) (ARM_INST_LDRB_I | (rt) << 12 | (rn) << 16 \ | 141 | #define ARM_LDRB_I(rt, rn, off) (ARM_INST_LDRB_I | (rt) << 12 | (rn) << 16 \ |
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S index ab3de721c5db..75b05ad0fbad 100644 --- a/arch/arm/plat-spear/include/plat/debug-macro.S +++ b/arch/arm/plat-spear/include/plat/debug-macro.S | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Debugging macro include header for spear platform | 4 | * Debugging macro include header for spear platform |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/include/plat/pl080.h b/arch/arm/plat-spear/include/plat/pl080.h index e14a3e4932f9..2bc6b54460a8 100644 --- a/arch/arm/plat-spear/include/plat/pl080.h +++ b/arch/arm/plat-spear/include/plat/pl080.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * DMAC pl080 definitions for SPEAr platform | 4 | * DMAC pl080 definitions for SPEAr platform |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/include/plat/shirq.h b/arch/arm/plat-spear/include/plat/shirq.h index 03ed8b585dcf..88a7fbd24793 100644 --- a/arch/arm/plat-spear/include/plat/shirq.h +++ b/arch/arm/plat-spear/include/plat/shirq.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr platform shared irq layer header file | 4 | * SPEAr platform shared irq layer header file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/include/plat/timex.h b/arch/arm/plat-spear/include/plat/timex.h index 914d09dd50fd..ef95e5b780bd 100644 --- a/arch/arm/plat-spear/include/plat/timex.h +++ b/arch/arm/plat-spear/include/plat/timex.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr platform specific timex definitions | 4 | * SPEAr platform specific timex definitions |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h index 6dd455bafdfd..2ce6cb17a98b 100644 --- a/arch/arm/plat-spear/include/plat/uncompress.h +++ b/arch/arm/plat-spear/include/plat/uncompress.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Serial port stubs for kernel decompress status messages | 4 | * Serial port stubs for kernel decompress status messages |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/pl080.c b/arch/arm/plat-spear/pl080.c index a56a067717c1..12cf27f935f9 100644 --- a/arch/arm/plat-spear/pl080.c +++ b/arch/arm/plat-spear/pl080.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * DMAC pl080 definitions for SPEAr platform | 4 | * DMAC pl080 definitions for SPEAr platform |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/restart.c b/arch/arm/plat-spear/restart.c index ea0a61302b7e..4f990115b1bd 100644 --- a/arch/arm/plat-spear/restart.c +++ b/arch/arm/plat-spear/restart.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr platform specific restart functions | 4 | * SPEAr platform specific restart functions |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/arm/plat-spear/shirq.c b/arch/arm/plat-spear/shirq.c index 961fb7261243..853e891e1184 100644 --- a/arch/arm/plat-spear/shirq.c +++ b/arch/arm/plat-spear/shirq.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr platform shared irq layer source file | 4 | * SPEAr platform shared irq layer source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics | 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c index 68d651081bd3..d0b1607f2711 100644 --- a/arch/h8300/kernel/setup.c +++ b/arch/h8300/kernel/setup.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
| 36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
| 37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
| 38 | #include <asm/sections.h> | ||
| 38 | 39 | ||
| 39 | #if defined(__H8300H__) | 40 | #if defined(__H8300H__) |
| 40 | #define CPU "H8/300H" | 41 | #define CPU "H8/300H" |
| @@ -54,7 +55,6 @@ unsigned long memory_end; | |||
| 54 | 55 | ||
| 55 | char __initdata command_line[COMMAND_LINE_SIZE]; | 56 | char __initdata command_line[COMMAND_LINE_SIZE]; |
| 56 | 57 | ||
| 57 | extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; | ||
| 58 | extern int _ramstart, _ramend; | 58 | extern int _ramstart, _ramend; |
| 59 | extern char _target_name[]; | 59 | extern char _target_name[]; |
| 60 | extern void h8300_gpio_init(void); | 60 | extern void h8300_gpio_init(void); |
| @@ -119,9 +119,9 @@ void __init setup_arch(char **cmdline_p) | |||
| 119 | memory_end = CONFIG_BLKDEV_RESERVE_ADDRESS; | 119 | memory_end = CONFIG_BLKDEV_RESERVE_ADDRESS; |
| 120 | #endif | 120 | #endif |
| 121 | 121 | ||
| 122 | init_mm.start_code = (unsigned long) &_stext; | 122 | init_mm.start_code = (unsigned long) _stext; |
| 123 | init_mm.end_code = (unsigned long) &_etext; | 123 | init_mm.end_code = (unsigned long) _etext; |
| 124 | init_mm.end_data = (unsigned long) &_edata; | 124 | init_mm.end_data = (unsigned long) _edata; |
| 125 | init_mm.brk = (unsigned long) 0; | 125 | init_mm.brk = (unsigned long) 0; |
| 126 | 126 | ||
| 127 | #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT) | 127 | #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT) |
| @@ -134,15 +134,12 @@ void __init setup_arch(char **cmdline_p) | |||
| 134 | printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n"); | 134 | printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n"); |
| 135 | 135 | ||
| 136 | #ifdef DEBUG | 136 | #ifdef DEBUG |
| 137 | printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x " | 137 | printk(KERN_DEBUG "KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p " |
| 138 | "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, | 138 | "BSS=0x%p-0x%p\n", _stext, _etext, _sdata, _edata, __bss_start, |
| 139 | (int) &_sdata, (int) &_edata, | 139 | __bss_stop); |
| 140 | (int) &_sbss, (int) &_ebss); | 140 | printk(KERN_DEBUG "KERNEL -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx " |
| 141 | printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " | 141 | "STACK=0x%06lx-0x%p\n", __bss_stop, memory_start, memory_start, |
| 142 | "STACK=0x%06x-0x%06x\n", | 142 | memory_end, memory_end, &_ramend); |
| 143 | (int) &_ebss, (int) memory_start, | ||
| 144 | (int) memory_start, (int) memory_end, | ||
| 145 | (int) memory_end, (int) &_ramend); | ||
| 146 | #endif | 143 | #endif |
| 147 | 144 | ||
| 148 | #ifdef CONFIG_DEFAULT_CMDLINE | 145 | #ifdef CONFIG_DEFAULT_CMDLINE |
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index 973369c32a95..981e25094b1a 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <asm/segment.h> | 36 | #include <asm/segment.h> |
| 37 | #include <asm/page.h> | 37 | #include <asm/page.h> |
| 38 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
| 39 | #include <asm/sections.h> | ||
| 39 | 40 | ||
| 40 | #undef DEBUG | 41 | #undef DEBUG |
| 41 | 42 | ||
| @@ -123,7 +124,6 @@ void __init mem_init(void) | |||
| 123 | int codek = 0, datak = 0, initk = 0; | 124 | int codek = 0, datak = 0, initk = 0; |
| 124 | /* DAVIDM look at setup memory map generically with reserved area */ | 125 | /* DAVIDM look at setup memory map generically with reserved area */ |
| 125 | unsigned long tmp; | 126 | unsigned long tmp; |
| 126 | extern char _etext, _stext, _sdata, _ebss, __init_begin, __init_end; | ||
| 127 | extern unsigned long _ramend, _ramstart; | 127 | extern unsigned long _ramend, _ramstart; |
| 128 | unsigned long len = &_ramend - &_ramstart; | 128 | unsigned long len = &_ramend - &_ramstart; |
| 129 | unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */ | 129 | unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */ |
| @@ -142,9 +142,9 @@ void __init mem_init(void) | |||
| 142 | /* this will put all memory onto the freelists */ | 142 | /* this will put all memory onto the freelists */ |
| 143 | totalram_pages = free_all_bootmem(); | 143 | totalram_pages = free_all_bootmem(); |
| 144 | 144 | ||
| 145 | codek = (&_etext - &_stext) >> 10; | 145 | codek = (_etext - _stext) >> 10; |
| 146 | datak = (&_ebss - &_sdata) >> 10; | 146 | datak = (__bss_stop - _sdata) >> 10; |
| 147 | initk = (&__init_begin - &__init_end) >> 10; | 147 | initk = (__init_begin - __init_end) >> 10; |
| 148 | 148 | ||
| 149 | tmp = nr_free_pages() << PAGE_SHIFT; | 149 | tmp = nr_free_pages() << PAGE_SHIFT; |
| 150 | printk(KERN_INFO "Memory available: %luk/%luk RAM, %luk/%luk ROM (%dk kernel code, %dk data)\n", | 150 | printk(KERN_INFO "Memory available: %luk/%luk RAM, %luk/%luk ROM (%dk kernel code, %dk data)\n", |
| @@ -178,22 +178,21 @@ free_initmem(void) | |||
| 178 | { | 178 | { |
| 179 | #ifdef CONFIG_RAMKERNEL | 179 | #ifdef CONFIG_RAMKERNEL |
| 180 | unsigned long addr; | 180 | unsigned long addr; |
| 181 | extern char __init_begin, __init_end; | ||
| 182 | /* | 181 | /* |
| 183 | * the following code should be cool even if these sections | 182 | * the following code should be cool even if these sections |
| 184 | * are not page aligned. | 183 | * are not page aligned. |
| 185 | */ | 184 | */ |
| 186 | addr = PAGE_ALIGN((unsigned long)(&__init_begin)); | 185 | addr = PAGE_ALIGN((unsigned long)(__init_begin)); |
| 187 | /* next to check that the page we free is not a partial page */ | 186 | /* next to check that the page we free is not a partial page */ |
| 188 | for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) { | 187 | for (; addr + PAGE_SIZE < (unsigned long)__init_end; addr +=PAGE_SIZE) { |
| 189 | ClearPageReserved(virt_to_page(addr)); | 188 | ClearPageReserved(virt_to_page(addr)); |
| 190 | init_page_count(virt_to_page(addr)); | 189 | init_page_count(virt_to_page(addr)); |
| 191 | free_page(addr); | 190 | free_page(addr); |
| 192 | totalram_pages++; | 191 | totalram_pages++; |
| 193 | } | 192 | } |
| 194 | printk(KERN_INFO "Freeing unused kernel memory: %ldk freed (0x%x - 0x%x)\n", | 193 | printk(KERN_INFO "Freeing unused kernel memory: %ldk freed (0x%x - 0x%x)\n", |
| 195 | (addr - PAGE_ALIGN((long) &__init_begin)) >> 10, | 194 | (addr - PAGE_ALIGN((long) __init_begin)) >> 10, |
| 196 | (int)(PAGE_ALIGN((unsigned long)(&__init_begin))), | 195 | (int)(PAGE_ALIGN((unsigned long)__init_begin)), |
| 197 | (int)(addr - PAGE_SIZE)); | 196 | (int)(addr - PAGE_SIZE)); |
| 198 | #endif | 197 | #endif |
| 199 | } | 198 | } |
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 36f957f31842..8733a86ad52e 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
| @@ -68,9 +68,7 @@ static const char *pseries_nvram_os_partitions[] = { | |||
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | static void oops_to_nvram(struct kmsg_dumper *dumper, | 70 | static void oops_to_nvram(struct kmsg_dumper *dumper, |
| 71 | enum kmsg_dump_reason reason, | 71 | enum kmsg_dump_reason reason); |
| 72 | const char *old_msgs, unsigned long old_len, | ||
| 73 | const char *new_msgs, unsigned long new_len); | ||
| 74 | 72 | ||
| 75 | static struct kmsg_dumper nvram_kmsg_dumper = { | 73 | static struct kmsg_dumper nvram_kmsg_dumper = { |
| 76 | .dump = oops_to_nvram | 74 | .dump = oops_to_nvram |
| @@ -504,28 +502,6 @@ int __init pSeries_nvram_init(void) | |||
| 504 | } | 502 | } |
| 505 | 503 | ||
| 506 | /* | 504 | /* |
| 507 | * Try to capture the last capture_len bytes of the printk buffer. Return | ||
| 508 | * the amount actually captured. | ||
| 509 | */ | ||
| 510 | static size_t capture_last_msgs(const char *old_msgs, size_t old_len, | ||
| 511 | const char *new_msgs, size_t new_len, | ||
| 512 | char *captured, size_t capture_len) | ||
| 513 | { | ||
| 514 | if (new_len >= capture_len) { | ||
| 515 | memcpy(captured, new_msgs + (new_len - capture_len), | ||
| 516 | capture_len); | ||
| 517 | return capture_len; | ||
| 518 | } else { | ||
| 519 | /* Grab the end of old_msgs. */ | ||
| 520 | size_t old_tail_len = min(old_len, capture_len - new_len); | ||
| 521 | memcpy(captured, old_msgs + (old_len - old_tail_len), | ||
| 522 | old_tail_len); | ||
| 523 | memcpy(captured + old_tail_len, new_msgs, new_len); | ||
| 524 | return old_tail_len + new_len; | ||
| 525 | } | ||
| 526 | } | ||
| 527 | |||
| 528 | /* | ||
| 529 | * Are we using the ibm,rtas-log for oops/panic reports? And if so, | 505 | * Are we using the ibm,rtas-log for oops/panic reports? And if so, |
| 530 | * would logging this oops/panic overwrite an RTAS event that rtas_errd | 506 | * would logging this oops/panic overwrite an RTAS event that rtas_errd |
| 531 | * hasn't had a chance to read and process? Return 1 if so, else 0. | 507 | * hasn't had a chance to read and process? Return 1 if so, else 0. |
| @@ -541,27 +517,6 @@ static int clobbering_unread_rtas_event(void) | |||
| 541 | NVRAM_RTAS_READ_TIMEOUT); | 517 | NVRAM_RTAS_READ_TIMEOUT); |
| 542 | } | 518 | } |
| 543 | 519 | ||
| 544 | /* Squeeze out each line's <n> severity prefix. */ | ||
| 545 | static size_t elide_severities(char *buf, size_t len) | ||
| 546 | { | ||
| 547 | char *in, *out, *buf_end = buf + len; | ||
| 548 | /* Assume a <n> at the very beginning marks the start of a line. */ | ||
| 549 | int newline = 1; | ||
| 550 | |||
| 551 | in = out = buf; | ||
| 552 | while (in < buf_end) { | ||
| 553 | if (newline && in+3 <= buf_end && | ||
| 554 | *in == '<' && isdigit(in[1]) && in[2] == '>') { | ||
| 555 | in += 3; | ||
| 556 | newline = 0; | ||
| 557 | } else { | ||
| 558 | newline = (*in == '\n'); | ||
| 559 | *out++ = *in++; | ||
| 560 | } | ||
| 561 | } | ||
| 562 | return out - buf; | ||
| 563 | } | ||
| 564 | |||
| 565 | /* Derived from logfs_compress() */ | 520 | /* Derived from logfs_compress() */ |
| 566 | static int nvram_compress(const void *in, void *out, size_t inlen, | 521 | static int nvram_compress(const void *in, void *out, size_t inlen, |
| 567 | size_t outlen) | 522 | size_t outlen) |
| @@ -619,9 +574,7 @@ static int zip_oops(size_t text_len) | |||
| 619 | * partition. If that's too much, go back and capture uncompressed text. | 574 | * partition. If that's too much, go back and capture uncompressed text. |
| 620 | */ | 575 | */ |
| 621 | static void oops_to_nvram(struct kmsg_dumper *dumper, | 576 | static void oops_to_nvram(struct kmsg_dumper *dumper, |
| 622 | enum kmsg_dump_reason reason, | 577 | enum kmsg_dump_reason reason) |
| 623 | const char *old_msgs, unsigned long old_len, | ||
| 624 | const char *new_msgs, unsigned long new_len) | ||
| 625 | { | 578 | { |
| 626 | static unsigned int oops_count = 0; | 579 | static unsigned int oops_count = 0; |
| 627 | static bool panicking = false; | 580 | static bool panicking = false; |
| @@ -660,14 +613,14 @@ static void oops_to_nvram(struct kmsg_dumper *dumper, | |||
| 660 | return; | 613 | return; |
| 661 | 614 | ||
| 662 | if (big_oops_buf) { | 615 | if (big_oops_buf) { |
| 663 | text_len = capture_last_msgs(old_msgs, old_len, | 616 | kmsg_dump_get_buffer(dumper, false, |
| 664 | new_msgs, new_len, big_oops_buf, big_oops_buf_sz); | 617 | big_oops_buf, big_oops_buf_sz, &text_len); |
| 665 | text_len = elide_severities(big_oops_buf, text_len); | ||
| 666 | rc = zip_oops(text_len); | 618 | rc = zip_oops(text_len); |
| 667 | } | 619 | } |
| 668 | if (rc != 0) { | 620 | if (rc != 0) { |
| 669 | text_len = capture_last_msgs(old_msgs, old_len, | 621 | kmsg_dump_rewind(dumper); |
| 670 | new_msgs, new_len, oops_data, oops_data_sz); | 622 | kmsg_dump_get_buffer(dumper, true, |
| 623 | oops_data, oops_data_sz, &text_len); | ||
| 671 | err_type = ERR_TYPE_KERNEL_PANIC; | 624 | err_type = ERR_TYPE_KERNEL_PANIC; |
| 672 | *oops_len = (u16) text_len; | 625 | *oops_len = (u16) text_len; |
| 673 | } | 626 | } |
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index 43876f16caf1..cb00ccc7d571 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h | |||
| @@ -47,16 +47,26 @@ static inline void native_set_pte(pte_t *ptep, pte_t pte) | |||
| 47 | * they can run pmd_offset_map_lock or pmd_trans_huge or other pmd | 47 | * they can run pmd_offset_map_lock or pmd_trans_huge or other pmd |
| 48 | * operations. | 48 | * operations. |
| 49 | * | 49 | * |
| 50 | * Without THP if the mmap_sem is hold for reading, the | 50 | * Without THP if the mmap_sem is hold for reading, the pmd can only |
| 51 | * pmd can only transition from null to not null while pmd_read_atomic runs. | 51 | * transition from null to not null while pmd_read_atomic runs. So |
| 52 | * So there's no need of literally reading it atomically. | 52 | * we can always return atomic pmd values with this function. |
| 53 | * | 53 | * |
| 54 | * With THP if the mmap_sem is hold for reading, the pmd can become | 54 | * With THP if the mmap_sem is hold for reading, the pmd can become |
| 55 | * THP or null or point to a pte (and in turn become "stable") at any | 55 | * trans_huge or none or point to a pte (and in turn become "stable") |
| 56 | * time under pmd_read_atomic, so it's mandatory to read it atomically | 56 | * at any time under pmd_read_atomic. We could read it really |
| 57 | * with cmpxchg8b. | 57 | * atomically here with a atomic64_read for the THP enabled case (and |
| 58 | * it would be a whole lot simpler), but to avoid using cmpxchg8b we | ||
| 59 | * only return an atomic pmdval if the low part of the pmdval is later | ||
| 60 | * found stable (i.e. pointing to a pte). And we're returning a none | ||
| 61 | * pmdval if the low part of the pmd is none. In some cases the high | ||
| 62 | * and low part of the pmdval returned may not be consistent if THP is | ||
| 63 | * enabled (the low part may point to previously mapped hugepage, | ||
| 64 | * while the high part may point to a more recently mapped hugepage), | ||
| 65 | * but pmd_none_or_trans_huge_or_clear_bad() only needs the low part | ||
| 66 | * of the pmd to be read atomically to decide if the pmd is unstable | ||
| 67 | * or not, with the only exception of when the low part of the pmd is | ||
| 68 | * zero in which case we return a none pmd. | ||
| 58 | */ | 69 | */ |
| 59 | #ifndef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 60 | static inline pmd_t pmd_read_atomic(pmd_t *pmdp) | 70 | static inline pmd_t pmd_read_atomic(pmd_t *pmdp) |
| 61 | { | 71 | { |
| 62 | pmdval_t ret; | 72 | pmdval_t ret; |
| @@ -74,12 +84,6 @@ static inline pmd_t pmd_read_atomic(pmd_t *pmdp) | |||
| 74 | 84 | ||
| 75 | return (pmd_t) { ret }; | 85 | return (pmd_t) { ret }; |
| 76 | } | 86 | } |
| 77 | #else /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
| 78 | static inline pmd_t pmd_read_atomic(pmd_t *pmdp) | ||
| 79 | { | ||
| 80 | return (pmd_t) { atomic64_read((atomic64_t *)pmdp) }; | ||
| 81 | } | ||
| 82 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
| 83 | 87 | ||
| 84 | static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) | 88 | static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) |
| 85 | { | 89 | { |
diff --git a/arch/x86/platform/mrst/early_printk_mrst.c b/arch/x86/platform/mrst/early_printk_mrst.c index 3c6e328483c7..028454f0c3a5 100644 --- a/arch/x86/platform/mrst/early_printk_mrst.c +++ b/arch/x86/platform/mrst/early_printk_mrst.c | |||
| @@ -110,19 +110,16 @@ static struct kmsg_dumper dw_dumper; | |||
| 110 | static int dumper_registered; | 110 | static int dumper_registered; |
| 111 | 111 | ||
| 112 | static void dw_kmsg_dump(struct kmsg_dumper *dumper, | 112 | static void dw_kmsg_dump(struct kmsg_dumper *dumper, |
| 113 | enum kmsg_dump_reason reason, | 113 | enum kmsg_dump_reason reason) |
| 114 | const char *s1, unsigned long l1, | ||
| 115 | const char *s2, unsigned long l2) | ||
| 116 | { | 114 | { |
| 117 | int i; | 115 | static char line[1024]; |
| 116 | size_t len; | ||
| 118 | 117 | ||
| 119 | /* When run to this, we'd better re-init the HW */ | 118 | /* When run to this, we'd better re-init the HW */ |
| 120 | mrst_early_console_init(); | 119 | mrst_early_console_init(); |
| 121 | 120 | ||
| 122 | for (i = 0; i < l1; i++) | 121 | while (kmsg_dump_get_line(dumper, true, line, sizeof(line), &len)) |
| 123 | early_mrst_console.write(&early_mrst_console, s1 + i, 1); | 122 | early_mrst_console.write(&early_mrst_console, line, len); |
| 124 | for (i = 0; i < l2; i++) | ||
| 125 | early_mrst_console.write(&early_mrst_console, s2 + i, 1); | ||
| 126 | } | 123 | } |
| 127 | 124 | ||
| 128 | /* Set the ratio rate to 115200, 8n1, IRQ disabled */ | 125 | /* Set the ratio rate to 115200, 8n1, IRQ disabled */ |
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 7608559de93a..f973754ddf90 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
| @@ -68,8 +68,8 @@ endif | |||
| 68 | 68 | ||
| 69 | # Only build variant and/or platform if it includes a Makefile | 69 | # Only build variant and/or platform if it includes a Makefile |
| 70 | 70 | ||
| 71 | buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) | 71 | buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) |
| 72 | buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/) | 72 | buildplf := $(shell test -e $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/) |
| 73 | 73 | ||
| 74 | # Find libgcc.a | 74 | # Find libgcc.a |
| 75 | 75 | ||
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index 88ecea3facb4..ee2e2089483d 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
| @@ -83,7 +83,6 @@ SECTIONS | |||
| 83 | 83 | ||
| 84 | _text = .; | 84 | _text = .; |
| 85 | _stext = .; | 85 | _stext = .; |
| 86 | _ftext = .; | ||
| 87 | 86 | ||
| 88 | .text : | 87 | .text : |
| 89 | { | 88 | { |
| @@ -112,7 +111,7 @@ SECTIONS | |||
| 112 | EXCEPTION_TABLE(16) | 111 | EXCEPTION_TABLE(16) |
| 113 | /* Data section */ | 112 | /* Data section */ |
| 114 | 113 | ||
| 115 | _fdata = .; | 114 | _sdata = .; |
| 116 | RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE) | 115 | RW_DATA_SECTION(XCHAL_ICACHE_LINESIZE, PAGE_SIZE, THREAD_SIZE) |
| 117 | _edata = .; | 116 | _edata = .; |
| 118 | 117 | ||
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index ba150e5de2eb..db955179da2d 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
| @@ -26,11 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | #include <asm/bootparam.h> | 27 | #include <asm/bootparam.h> |
| 28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
| 29 | 29 | #include <asm/sections.h> | |
| 30 | /* References to section boundaries */ | ||
| 31 | |||
| 32 | extern char _ftext, _etext, _fdata, _edata, _rodata_end; | ||
| 33 | extern char __init_begin, __init_end; | ||
| 34 | 30 | ||
| 35 | /* | 31 | /* |
| 36 | * mem_reserve(start, end, must_exist) | 32 | * mem_reserve(start, end, must_exist) |
| @@ -197,9 +193,9 @@ void __init mem_init(void) | |||
| 197 | reservedpages++; | 193 | reservedpages++; |
| 198 | } | 194 | } |
| 199 | 195 | ||
| 200 | codesize = (unsigned long) &_etext - (unsigned long) &_ftext; | 196 | codesize = (unsigned long) _etext - (unsigned long) _stext; |
| 201 | datasize = (unsigned long) &_edata - (unsigned long) &_fdata; | 197 | datasize = (unsigned long) _edata - (unsigned long) _sdata; |
| 202 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | 198 | initsize = (unsigned long) __init_end - (unsigned long) __init_begin; |
| 203 | 199 | ||
| 204 | printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, " | 200 | printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, " |
| 205 | "%ldk data, %ldk init %ldk highmem)\n", | 201 | "%ldk data, %ldk init %ldk highmem)\n", |
| @@ -237,7 +233,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
| 237 | 233 | ||
| 238 | void free_initmem(void) | 234 | void free_initmem(void) |
| 239 | { | 235 | { |
| 240 | free_reserved_mem(&__init_begin, &__init_end); | 236 | free_reserved_mem(__init_begin, __init_end); |
| 241 | printk("Freeing unused kernel memory: %dk freed\n", | 237 | printk("Freeing unused kernel memory: %zuk freed\n", |
| 242 | (&__init_end - &__init_begin) >> 10); | 238 | (__init_end - __init_begin) >> 10); |
| 243 | } | 239 | } |
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 3239517f4d90..ac6a5beb28f3 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Arasan Compact Flash host controller source file | 4 | * Arasan Compact Flash host controller source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2011 ST Microelectronics | 6 | * Copyright (C) 2011 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
| @@ -959,7 +959,7 @@ static struct platform_driver arasan_cf_driver = { | |||
| 959 | 959 | ||
| 960 | module_platform_driver(arasan_cf_driver); | 960 | module_platform_driver(arasan_cf_driver); |
| 961 | 961 | ||
| 962 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 962 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 963 | MODULE_DESCRIPTION("Arasan ATA Compact Flash driver"); | 963 | MODULE_DESCRIPTION("Arasan ATA Compact Flash driver"); |
| 964 | MODULE_LICENSE("GPL"); | 964 | MODULE_LICENSE("GPL"); |
| 965 | MODULE_ALIAS("platform:" DRIVER_NAME); | 965 | MODULE_ALIAS("platform:" DRIVER_NAME); |
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 1b1cbb571d38..dcb8a6e48692 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
| @@ -100,7 +100,7 @@ static void driver_deferred_probe_add(struct device *dev) | |||
| 100 | mutex_lock(&deferred_probe_mutex); | 100 | mutex_lock(&deferred_probe_mutex); |
| 101 | if (list_empty(&dev->p->deferred_probe)) { | 101 | if (list_empty(&dev->p->deferred_probe)) { |
| 102 | dev_dbg(dev, "Added to deferred list\n"); | 102 | dev_dbg(dev, "Added to deferred list\n"); |
| 103 | list_add(&dev->p->deferred_probe, &deferred_probe_pending_list); | 103 | list_add_tail(&dev->p->deferred_probe, &deferred_probe_pending_list); |
| 104 | } | 104 | } |
| 105 | mutex_unlock(&deferred_probe_mutex); | 105 | mutex_unlock(&deferred_probe_mutex); |
| 106 | } | 106 | } |
diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c index af34074e702b..6756e7c3bc07 100644 --- a/drivers/clk/spear/clk-aux-synth.c +++ b/drivers/clk/spear/clk-aux-synth.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2012 ST Microelectronics | 2 | * Copyright (C) 2012 ST Microelectronics |
| 3 | * Viresh Kumar <viresh.kumar@st.com> | 3 | * Viresh Kumar <viresh.linux@gmail.com> |
| 4 | * | 4 | * |
| 5 | * This file is licensed under the terms of the GNU General Public | 5 | * This file is licensed under the terms of the GNU General Public |
| 6 | * License version 2. This program is licensed "as is" without any | 6 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/clk-frac-synth.c b/drivers/clk/spear/clk-frac-synth.c index 4dbdb3fe18e0..958aa3ad1d60 100644 --- a/drivers/clk/spear/clk-frac-synth.c +++ b/drivers/clk/spear/clk-frac-synth.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2012 ST Microelectronics | 2 | * Copyright (C) 2012 ST Microelectronics |
| 3 | * Viresh Kumar <viresh.kumar@st.com> | 3 | * Viresh Kumar <viresh.linux@gmail.com> |
| 4 | * | 4 | * |
| 5 | * This file is licensed under the terms of the GNU General Public | 5 | * This file is licensed under the terms of the GNU General Public |
| 6 | * License version 2. This program is licensed "as is" without any | 6 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/clk-gpt-synth.c b/drivers/clk/spear/clk-gpt-synth.c index b471c9762a97..1afc18c4effc 100644 --- a/drivers/clk/spear/clk-gpt-synth.c +++ b/drivers/clk/spear/clk-gpt-synth.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2012 ST Microelectronics | 2 | * Copyright (C) 2012 ST Microelectronics |
| 3 | * Viresh Kumar <viresh.kumar@st.com> | 3 | * Viresh Kumar <viresh.linux@gmail.com> |
| 4 | * | 4 | * |
| 5 | * This file is licensed under the terms of the GNU General Public | 5 | * This file is licensed under the terms of the GNU General Public |
| 6 | * License version 2. This program is licensed "as is" without any | 6 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/clk-vco-pll.c b/drivers/clk/spear/clk-vco-pll.c index dcd4bdf4b0d9..5f1b6badeb15 100644 --- a/drivers/clk/spear/clk-vco-pll.c +++ b/drivers/clk/spear/clk-vco-pll.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2012 ST Microelectronics | 2 | * Copyright (C) 2012 ST Microelectronics |
| 3 | * Viresh Kumar <viresh.kumar@st.com> | 3 | * Viresh Kumar <viresh.linux@gmail.com> |
| 4 | * | 4 | * |
| 5 | * This file is licensed under the terms of the GNU General Public | 5 | * This file is licensed under the terms of the GNU General Public |
| 6 | * License version 2. This program is licensed "as is" without any | 6 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/clk.c b/drivers/clk/spear/clk.c index 376d4e5ff326..7cd63788d546 100644 --- a/drivers/clk/spear/clk.c +++ b/drivers/clk/spear/clk.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2012 ST Microelectronics | 2 | * Copyright (C) 2012 ST Microelectronics |
| 3 | * Viresh Kumar <viresh.kumar@st.com> | 3 | * Viresh Kumar <viresh.linux@gmail.com> |
| 4 | * | 4 | * |
| 5 | * This file is licensed under the terms of the GNU General Public | 5 | * This file is licensed under the terms of the GNU General Public |
| 6 | * License version 2. This program is licensed "as is" without any | 6 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/clk.h b/drivers/clk/spear/clk.h index 3321c46a071c..931737677dfa 100644 --- a/drivers/clk/spear/clk.h +++ b/drivers/clk/spear/clk.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Clock framework definitions for SPEAr platform | 2 | * Clock framework definitions for SPEAr platform |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/spear1310_clock.c b/drivers/clk/spear/spear1310_clock.c index 42b68df9aeef..8f05652d53e6 100644 --- a/drivers/clk/spear/spear1310_clock.c +++ b/drivers/clk/spear/spear1310_clock.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr1310 machine clock framework source file | 4 | * SPEAr1310 machine clock framework source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c index f130919d5bf8..e3ea72162236 100644 --- a/drivers/clk/spear/spear1340_clock.c +++ b/drivers/clk/spear/spear1340_clock.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SPEAr1340 machine clock framework source file | 4 | * SPEAr1340 machine clock framework source file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics | 6 | * Copyright (C) 2012 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c index 440bb3e4c971..01dd6daff2a1 100644 --- a/drivers/clk/spear/spear3xx_clock.c +++ b/drivers/clk/spear/spear3xx_clock.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * SPEAr3xx machines clock framework source file | 2 | * SPEAr3xx machines clock framework source file |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/clk/spear/spear6xx_clock.c b/drivers/clk/spear/spear6xx_clock.c index f9a20b382304..554d64b062a1 100644 --- a/drivers/clk/spear/spear6xx_clock.c +++ b/drivers/clk/spear/spear6xx_clock.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * SPEAr6xx machines clock framework source file | 2 | * SPEAr6xx machines clock framework source file |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index e23dc82d43ac..721296157577 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
| @@ -1626,4 +1626,4 @@ module_exit(dw_exit); | |||
| 1626 | MODULE_LICENSE("GPL v2"); | 1626 | MODULE_LICENSE("GPL v2"); |
| 1627 | MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller driver"); | 1627 | MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller driver"); |
| 1628 | MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); | 1628 | MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); |
| 1629 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 1629 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index fb4f4990f5eb..1dc2a4ad0026 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
| @@ -815,8 +815,6 @@ static int sdma_request_channel(struct sdma_channel *sdmac) | |||
| 815 | 815 | ||
| 816 | init_completion(&sdmac->done); | 816 | init_completion(&sdmac->done); |
| 817 | 817 | ||
| 818 | sdmac->buf_tail = 0; | ||
| 819 | |||
| 820 | return 0; | 818 | return 0; |
| 821 | out: | 819 | out: |
| 822 | 820 | ||
| @@ -927,6 +925,8 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( | |||
| 927 | 925 | ||
| 928 | sdmac->flags = 0; | 926 | sdmac->flags = 0; |
| 929 | 927 | ||
| 928 | sdmac->buf_tail = 0; | ||
| 929 | |||
| 930 | dev_dbg(sdma->dev, "setting up %d entries for channel %d.\n", | 930 | dev_dbg(sdma->dev, "setting up %d entries for channel %d.\n", |
| 931 | sg_len, channel); | 931 | sg_len, channel); |
| 932 | 932 | ||
| @@ -1027,6 +1027,8 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( | |||
| 1027 | 1027 | ||
| 1028 | sdmac->status = DMA_IN_PROGRESS; | 1028 | sdmac->status = DMA_IN_PROGRESS; |
| 1029 | 1029 | ||
| 1030 | sdmac->buf_tail = 0; | ||
| 1031 | |||
| 1030 | sdmac->flags |= IMX_DMA_SG_LOOP; | 1032 | sdmac->flags |= IMX_DMA_SG_LOOP; |
| 1031 | sdmac->direction = direction; | 1033 | sdmac->direction = direction; |
| 1032 | ret = sdma_load_context(sdmac); | 1034 | ret = sdma_load_context(sdmac); |
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index cbcc28e79be6..e4feba6b03c0 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
| @@ -392,6 +392,8 @@ struct pl330_req { | |||
| 392 | struct pl330_reqcfg *cfg; | 392 | struct pl330_reqcfg *cfg; |
| 393 | /* Pointer to first xfer in the request. */ | 393 | /* Pointer to first xfer in the request. */ |
| 394 | struct pl330_xfer *x; | 394 | struct pl330_xfer *x; |
| 395 | /* Hook to attach to DMAC's list of reqs with due callback */ | ||
| 396 | struct list_head rqd; | ||
| 395 | }; | 397 | }; |
| 396 | 398 | ||
| 397 | /* | 399 | /* |
| @@ -461,8 +463,6 @@ struct _pl330_req { | |||
| 461 | /* Number of bytes taken to setup MC for the req */ | 463 | /* Number of bytes taken to setup MC for the req */ |
| 462 | u32 mc_len; | 464 | u32 mc_len; |
| 463 | struct pl330_req *r; | 465 | struct pl330_req *r; |
| 464 | /* Hook to attach to DMAC's list of reqs with due callback */ | ||
| 465 | struct list_head rqd; | ||
| 466 | }; | 466 | }; |
| 467 | 467 | ||
| 468 | /* ToBeDone for tasklet */ | 468 | /* ToBeDone for tasklet */ |
| @@ -1683,7 +1683,7 @@ static void pl330_dotask(unsigned long data) | |||
| 1683 | /* Returns 1 if state was updated, 0 otherwise */ | 1683 | /* Returns 1 if state was updated, 0 otherwise */ |
| 1684 | static int pl330_update(const struct pl330_info *pi) | 1684 | static int pl330_update(const struct pl330_info *pi) |
| 1685 | { | 1685 | { |
| 1686 | struct _pl330_req *rqdone; | 1686 | struct pl330_req *rqdone, *tmp; |
| 1687 | struct pl330_dmac *pl330; | 1687 | struct pl330_dmac *pl330; |
| 1688 | unsigned long flags; | 1688 | unsigned long flags; |
| 1689 | void __iomem *regs; | 1689 | void __iomem *regs; |
| @@ -1750,7 +1750,10 @@ static int pl330_update(const struct pl330_info *pi) | |||
| 1750 | if (active == -1) /* Aborted */ | 1750 | if (active == -1) /* Aborted */ |
| 1751 | continue; | 1751 | continue; |
| 1752 | 1752 | ||
| 1753 | rqdone = &thrd->req[active]; | 1753 | /* Detach the req */ |
| 1754 | rqdone = thrd->req[active].r; | ||
| 1755 | thrd->req[active].r = NULL; | ||
| 1756 | |||
| 1754 | mark_free(thrd, active); | 1757 | mark_free(thrd, active); |
| 1755 | 1758 | ||
| 1756 | /* Get going again ASAP */ | 1759 | /* Get going again ASAP */ |
| @@ -1762,20 +1765,11 @@ static int pl330_update(const struct pl330_info *pi) | |||
| 1762 | } | 1765 | } |
| 1763 | 1766 | ||
| 1764 | /* Now that we are in no hurry, do the callbacks */ | 1767 | /* Now that we are in no hurry, do the callbacks */ |
| 1765 | while (!list_empty(&pl330->req_done)) { | 1768 | list_for_each_entry_safe(rqdone, tmp, &pl330->req_done, rqd) { |
| 1766 | struct pl330_req *r; | 1769 | list_del(&rqdone->rqd); |
| 1767 | |||
| 1768 | rqdone = container_of(pl330->req_done.next, | ||
| 1769 | struct _pl330_req, rqd); | ||
| 1770 | |||
| 1771 | list_del_init(&rqdone->rqd); | ||
| 1772 | |||
| 1773 | /* Detach the req */ | ||
| 1774 | r = rqdone->r; | ||
| 1775 | rqdone->r = NULL; | ||
| 1776 | 1770 | ||
| 1777 | spin_unlock_irqrestore(&pl330->lock, flags); | 1771 | spin_unlock_irqrestore(&pl330->lock, flags); |
| 1778 | _callback(r, PL330_ERR_NONE); | 1772 | _callback(rqdone, PL330_ERR_NONE); |
| 1779 | spin_lock_irqsave(&pl330->lock, flags); | 1773 | spin_lock_irqsave(&pl330->lock, flags); |
| 1780 | } | 1774 | } |
| 1781 | 1775 | ||
| @@ -2321,7 +2315,7 @@ static void pl330_tasklet(unsigned long data) | |||
| 2321 | /* Pick up ripe tomatoes */ | 2315 | /* Pick up ripe tomatoes */ |
| 2322 | list_for_each_entry_safe(desc, _dt, &pch->work_list, node) | 2316 | list_for_each_entry_safe(desc, _dt, &pch->work_list, node) |
| 2323 | if (desc->status == DONE) { | 2317 | if (desc->status == DONE) { |
| 2324 | if (pch->cyclic) | 2318 | if (!pch->cyclic) |
| 2325 | dma_cookie_complete(&desc->txd); | 2319 | dma_cookie_complete(&desc->txd); |
| 2326 | list_move_tail(&desc->node, &list); | 2320 | list_move_tail(&desc->node, &list); |
| 2327 | } | 2321 | } |
| @@ -2539,7 +2533,7 @@ static inline void _init_desc(struct dma_pl330_desc *desc) | |||
| 2539 | } | 2533 | } |
| 2540 | 2534 | ||
| 2541 | /* Returns the number of descriptors added to the DMAC pool */ | 2535 | /* Returns the number of descriptors added to the DMAC pool */ |
| 2542 | int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count) | 2536 | static int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count) |
| 2543 | { | 2537 | { |
| 2544 | struct dma_pl330_desc *desc; | 2538 | struct dma_pl330_desc *desc; |
| 2545 | unsigned long flags; | 2539 | unsigned long flags; |
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 23416e443765..a4ed30bd9a41 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c | |||
| @@ -116,8 +116,8 @@ const char *max8997_extcon_cable[] = { | |||
| 116 | [5] = "Charge-downstream", | 116 | [5] = "Charge-downstream", |
| 117 | [6] = "MHL", | 117 | [6] = "MHL", |
| 118 | [7] = "Dock-desk", | 118 | [7] = "Dock-desk", |
| 119 | [7] = "Dock-card", | 119 | [8] = "Dock-card", |
| 120 | [8] = "JIG", | 120 | [9] = "JIG", |
| 121 | 121 | ||
| 122 | NULL, | 122 | NULL, |
| 123 | }; | 123 | }; |
| @@ -514,6 +514,7 @@ static int __devexit max8997_muic_remove(struct platform_device *pdev) | |||
| 514 | 514 | ||
| 515 | extcon_dev_unregister(info->edev); | 515 | extcon_dev_unregister(info->edev); |
| 516 | 516 | ||
| 517 | kfree(info->edev); | ||
| 517 | kfree(info); | 518 | kfree(info); |
| 518 | 519 | ||
| 519 | return 0; | 520 | return 0; |
diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index f598a700ec15..159aeb07b3ba 100644 --- a/drivers/extcon/extcon_class.c +++ b/drivers/extcon/extcon_class.c | |||
| @@ -762,7 +762,7 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev) | |||
| 762 | #if defined(CONFIG_ANDROID) | 762 | #if defined(CONFIG_ANDROID) |
| 763 | if (switch_class) | 763 | if (switch_class) |
| 764 | ret = class_compat_create_link(switch_class, edev->dev, | 764 | ret = class_compat_create_link(switch_class, edev->dev, |
| 765 | dev); | 765 | NULL); |
| 766 | #endif /* CONFIG_ANDROID */ | 766 | #endif /* CONFIG_ANDROID */ |
| 767 | 767 | ||
| 768 | spin_lock_init(&edev->lock); | 768 | spin_lock_init(&edev->lock); |
diff --git a/drivers/extcon/extcon_gpio.c b/drivers/extcon/extcon_gpio.c index fe7a07b47336..8a0dcc11c7c7 100644 --- a/drivers/extcon/extcon_gpio.c +++ b/drivers/extcon/extcon_gpio.c | |||
| @@ -125,6 +125,7 @@ static int __devinit gpio_extcon_probe(struct platform_device *pdev) | |||
| 125 | if (ret < 0) | 125 | if (ret < 0) |
| 126 | goto err_request_irq; | 126 | goto err_request_irq; |
| 127 | 127 | ||
| 128 | platform_set_drvdata(pdev, extcon_data); | ||
| 128 | /* Perform initial detection */ | 129 | /* Perform initial detection */ |
| 129 | gpio_extcon_work(&extcon_data->work.work); | 130 | gpio_extcon_work(&extcon_data->work.work); |
| 130 | 131 | ||
| @@ -146,6 +147,7 @@ static int __devexit gpio_extcon_remove(struct platform_device *pdev) | |||
| 146 | struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev); | 147 | struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev); |
| 147 | 148 | ||
| 148 | cancel_delayed_work_sync(&extcon_data->work); | 149 | cancel_delayed_work_sync(&extcon_data->work); |
| 150 | free_irq(extcon_data->irq, extcon_data); | ||
| 149 | gpio_free(extcon_data->gpio); | 151 | gpio_free(extcon_data->gpio); |
| 150 | extcon_dev_unregister(&extcon_data->edev); | 152 | extcon_dev_unregister(&extcon_data->edev); |
| 151 | devm_kfree(&pdev->dev, extcon_data); | 153 | devm_kfree(&pdev->dev, extcon_data); |
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index f082e48ab113..70d62f5bc909 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c | |||
| @@ -215,7 +215,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) | |||
| 215 | int i; | 215 | int i; |
| 216 | 216 | ||
| 217 | if (send_command(cmd) || send_argument(key)) { | 217 | if (send_command(cmd) || send_argument(key)) { |
| 218 | pr_warn("%s: read arg fail\n", key); | 218 | pr_warn("%.4s: read arg fail\n", key); |
| 219 | return -EIO; | 219 | return -EIO; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| @@ -223,7 +223,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) | |||
| 223 | 223 | ||
| 224 | for (i = 0; i < len; i++) { | 224 | for (i = 0; i < len; i++) { |
| 225 | if (__wait_status(0x05)) { | 225 | if (__wait_status(0x05)) { |
| 226 | pr_warn("%s: read data fail\n", key); | 226 | pr_warn("%.4s: read data fail\n", key); |
| 227 | return -EIO; | 227 | return -EIO; |
| 228 | } | 228 | } |
| 229 | buffer[i] = inb(APPLESMC_DATA_PORT); | 229 | buffer[i] = inb(APPLESMC_DATA_PORT); |
diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/emc2103.c index 9691f664c76e..e7d234b59312 100644 --- a/drivers/hwmon/emc2103.c +++ b/drivers/hwmon/emc2103.c | |||
| @@ -451,11 +451,15 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da, | |||
| 451 | data->fan_rpm_control = true; | 451 | data->fan_rpm_control = true; |
| 452 | break; | 452 | break; |
| 453 | default: | 453 | default: |
| 454 | mutex_unlock(&data->update_lock); | 454 | count = -EINVAL; |
| 455 | return -EINVAL; | 455 | goto err; |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg); | 458 | result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg); |
| 459 | if (result) { | ||
| 460 | count = result; | ||
| 461 | goto err; | ||
| 462 | } | ||
| 459 | 463 | ||
| 460 | if (data->fan_rpm_control) | 464 | if (data->fan_rpm_control) |
| 461 | conf_reg |= 0x80; | 465 | conf_reg |= 0x80; |
| @@ -463,7 +467,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da, | |||
| 463 | conf_reg &= ~0x80; | 467 | conf_reg &= ~0x80; |
| 464 | 468 | ||
| 465 | i2c_smbus_write_byte_data(client, REG_FAN_CONF1, conf_reg); | 469 | i2c_smbus_write_byte_data(client, REG_FAN_CONF1, conf_reg); |
| 466 | 470 | err: | |
| 467 | mutex_unlock(&data->update_lock); | 471 | mutex_unlock(&data->update_lock); |
| 468 | return count; | 472 | return count; |
| 469 | } | 473 | } |
diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig index 56eecefcec75..2ec93da41e2c 100644 --- a/drivers/iio/Kconfig +++ b/drivers/iio/Kconfig | |||
| @@ -8,8 +8,7 @@ menuconfig IIO | |||
| 8 | help | 8 | help |
| 9 | The industrial I/O subsystem provides a unified framework for | 9 | The industrial I/O subsystem provides a unified framework for |
| 10 | drivers for many different types of embedded sensors using a | 10 | drivers for many different types of embedded sensors using a |
| 11 | number of different physical interfaces (i2c, spi, etc). See | 11 | number of different physical interfaces (i2c, spi, etc). |
| 12 | Documentation/iio for more information. | ||
| 13 | 12 | ||
| 14 | if IIO | 13 | if IIO |
| 15 | 14 | ||
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 1ddd8861c71b..4f947e4377ef 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c | |||
| @@ -661,7 +661,6 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev) | |||
| 661 | * New channel registration method - relies on the fact a group does | 661 | * New channel registration method - relies on the fact a group does |
| 662 | * not need to be initialized if it is name is NULL. | 662 | * not need to be initialized if it is name is NULL. |
| 663 | */ | 663 | */ |
| 664 | INIT_LIST_HEAD(&indio_dev->channel_attr_list); | ||
| 665 | if (indio_dev->channels) | 664 | if (indio_dev->channels) |
| 666 | for (i = 0; i < indio_dev->num_channels; i++) { | 665 | for (i = 0; i < indio_dev->num_channels; i++) { |
| 667 | ret = iio_device_add_channel_sysfs(indio_dev, | 666 | ret = iio_device_add_channel_sysfs(indio_dev, |
| @@ -725,12 +724,16 @@ static void iio_device_unregister_sysfs(struct iio_dev *indio_dev) | |||
| 725 | static void iio_dev_release(struct device *device) | 724 | static void iio_dev_release(struct device *device) |
| 726 | { | 725 | { |
| 727 | struct iio_dev *indio_dev = dev_to_iio_dev(device); | 726 | struct iio_dev *indio_dev = dev_to_iio_dev(device); |
| 728 | cdev_del(&indio_dev->chrdev); | 727 | if (indio_dev->chrdev.dev) |
| 728 | cdev_del(&indio_dev->chrdev); | ||
| 729 | if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) | 729 | if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) |
| 730 | iio_device_unregister_trigger_consumer(indio_dev); | 730 | iio_device_unregister_trigger_consumer(indio_dev); |
| 731 | iio_device_unregister_eventset(indio_dev); | 731 | iio_device_unregister_eventset(indio_dev); |
| 732 | iio_device_unregister_sysfs(indio_dev); | 732 | iio_device_unregister_sysfs(indio_dev); |
| 733 | iio_device_unregister_debugfs(indio_dev); | 733 | iio_device_unregister_debugfs(indio_dev); |
| 734 | |||
| 735 | ida_simple_remove(&iio_ida, indio_dev->id); | ||
| 736 | kfree(indio_dev); | ||
| 734 | } | 737 | } |
| 735 | 738 | ||
| 736 | static struct device_type iio_dev_type = { | 739 | static struct device_type iio_dev_type = { |
| @@ -761,6 +764,7 @@ struct iio_dev *iio_device_alloc(int sizeof_priv) | |||
| 761 | dev_set_drvdata(&dev->dev, (void *)dev); | 764 | dev_set_drvdata(&dev->dev, (void *)dev); |
| 762 | mutex_init(&dev->mlock); | 765 | mutex_init(&dev->mlock); |
| 763 | mutex_init(&dev->info_exist_lock); | 766 | mutex_init(&dev->info_exist_lock); |
| 767 | INIT_LIST_HEAD(&dev->channel_attr_list); | ||
| 764 | 768 | ||
| 765 | dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL); | 769 | dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL); |
| 766 | if (dev->id < 0) { | 770 | if (dev->id < 0) { |
| @@ -778,10 +782,8 @@ EXPORT_SYMBOL(iio_device_alloc); | |||
| 778 | 782 | ||
| 779 | void iio_device_free(struct iio_dev *dev) | 783 | void iio_device_free(struct iio_dev *dev) |
| 780 | { | 784 | { |
| 781 | if (dev) { | 785 | if (dev) |
| 782 | ida_simple_remove(&iio_ida, dev->id); | 786 | put_device(&dev->dev); |
| 783 | kfree(dev); | ||
| 784 | } | ||
| 785 | } | 787 | } |
| 786 | EXPORT_SYMBOL(iio_device_free); | 788 | EXPORT_SYMBOL(iio_device_free); |
| 787 | 789 | ||
| @@ -902,7 +904,7 @@ void iio_device_unregister(struct iio_dev *indio_dev) | |||
| 902 | mutex_lock(&indio_dev->info_exist_lock); | 904 | mutex_lock(&indio_dev->info_exist_lock); |
| 903 | indio_dev->info = NULL; | 905 | indio_dev->info = NULL; |
| 904 | mutex_unlock(&indio_dev->info_exist_lock); | 906 | mutex_unlock(&indio_dev->info_exist_lock); |
| 905 | device_unregister(&indio_dev->dev); | 907 | device_del(&indio_dev->dev); |
| 906 | } | 908 | } |
| 907 | EXPORT_SYMBOL(iio_device_unregister); | 909 | EXPORT_SYMBOL(iio_device_unregister); |
| 908 | subsys_initcall(iio_init); | 910 | subsys_initcall(iio_init); |
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index af2d9086d7e8..c370c2d87c17 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
| 30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
| 31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
| 32 | #include <linux/slab.h> | ||
| 32 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
| 33 | #include <linux/isa.h> | 34 | #include <linux/isa.h> |
| 34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c index 373f423b1181..947a06a1845f 100644 --- a/drivers/mfd/stmpe-i2c.c +++ b/drivers/mfd/stmpe-i2c.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * | 6 | * |
| 7 | * License Terms: GNU General Public License, version 2 | 7 | * License Terms: GNU General Public License, version 2 |
| 8 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | 8 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson |
| 9 | * Author: Viresh Kumar <viresh.kumar@st.com> for ST Microelectronics | 9 | * Author: Viresh Kumar <viresh.linux@gmail.com> for ST Microelectronics |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
diff --git a/drivers/mfd/stmpe-spi.c b/drivers/mfd/stmpe-spi.c index afd459013ecb..9edfe864cc05 100644 --- a/drivers/mfd/stmpe-spi.c +++ b/drivers/mfd/stmpe-spi.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright (C) ST Microelectronics SA 2011 | 4 | * Copyright (C) ST Microelectronics SA 2011 |
| 5 | * | 5 | * |
| 6 | * License Terms: GNU General Public License, version 2 | 6 | * License Terms: GNU General Public License, version 2 |
| 7 | * Author: Viresh Kumar <viresh.kumar@st.com> for ST Microelectronics | 7 | * Author: Viresh Kumar <viresh.linux@gmail.com> for ST Microelectronics |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #include <linux/spi/spi.h> | 10 | #include <linux/spi/spi.h> |
| @@ -146,4 +146,4 @@ module_exit(stmpe_exit); | |||
| 146 | 146 | ||
| 147 | MODULE_LICENSE("GPL v2"); | 147 | MODULE_LICENSE("GPL v2"); |
| 148 | MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver"); | 148 | MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver"); |
| 149 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 149 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 93936f1b75eb..23f5463d4cae 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
| @@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots, | |||
| 835 | struct mei_cl *cl, | 835 | struct mei_cl *cl, |
| 836 | struct mei_io_list *cmpl_list) | 836 | struct mei_io_list *cmpl_list) |
| 837 | { | 837 | { |
| 838 | if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) + | 838 | if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) + |
| 839 | sizeof(struct hbm_flow_control))) { | 839 | sizeof(struct hbm_flow_control))) { |
| 840 | /* return the cancel routine */ | 840 | /* return the cancel routine */ |
| 841 | list_del(&cb_pos->cb_list); | 841 | list_del(&cb_pos->cb_list); |
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index c70333228337..7de13891e49e 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
| @@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
| 982 | err = request_threaded_irq(pdev->irq, | 982 | err = request_threaded_irq(pdev->irq, |
| 983 | NULL, | 983 | NULL, |
| 984 | mei_interrupt_thread_handler, | 984 | mei_interrupt_thread_handler, |
| 985 | 0, mei_driver_name, dev); | 985 | IRQF_ONESHOT, mei_driver_name, dev); |
| 986 | else | 986 | else |
| 987 | err = request_threaded_irq(pdev->irq, | 987 | err = request_threaded_irq(pdev->irq, |
| 988 | mei_interrupt_quick_handler, | 988 | mei_interrupt_quick_handler, |
| @@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
| 992 | if (err) { | 992 | if (err) { |
| 993 | dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", | 993 | dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", |
| 994 | pdev->irq); | 994 | pdev->irq); |
| 995 | goto unmap_memory; | 995 | goto disable_msi; |
| 996 | } | 996 | } |
| 997 | INIT_DELAYED_WORK(&dev->timer_work, mei_timer); | 997 | INIT_DELAYED_WORK(&dev->timer_work, mei_timer); |
| 998 | if (mei_hw_init(dev)) { | 998 | if (mei_hw_init(dev)) { |
| @@ -1023,8 +1023,8 @@ release_irq: | |||
| 1023 | mei_disable_interrupts(dev); | 1023 | mei_disable_interrupts(dev); |
| 1024 | flush_scheduled_work(); | 1024 | flush_scheduled_work(); |
| 1025 | free_irq(pdev->irq, dev); | 1025 | free_irq(pdev->irq, dev); |
| 1026 | disable_msi: | ||
| 1026 | pci_disable_msi(pdev); | 1027 | pci_disable_msi(pdev); |
| 1027 | unmap_memory: | ||
| 1028 | pci_iounmap(pdev, dev->mem_addr); | 1028 | pci_iounmap(pdev, dev->mem_addr); |
| 1029 | free_device: | 1029 | free_device: |
| 1030 | kfree(dev); | 1030 | kfree(dev); |
| @@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev) | |||
| 1101 | 1101 | ||
| 1102 | pci_release_regions(pdev); | 1102 | pci_release_regions(pdev); |
| 1103 | pci_disable_device(pdev); | 1103 | pci_disable_device(pdev); |
| 1104 | |||
| 1105 | misc_deregister(&mei_misc_device); | ||
| 1104 | } | 1106 | } |
| 1105 | #ifdef CONFIG_PM | 1107 | #ifdef CONFIG_PM |
| 1106 | static int mei_pci_suspend(struct device *device) | 1108 | static int mei_pci_suspend(struct device *device) |
| @@ -1216,7 +1218,6 @@ module_init(mei_init_module); | |||
| 1216 | */ | 1218 | */ |
| 1217 | static void __exit mei_exit_module(void) | 1219 | static void __exit mei_exit_module(void) |
| 1218 | { | 1220 | { |
| 1219 | misc_deregister(&mei_misc_device); | ||
| 1220 | pci_unregister_driver(&mei_driver); | 1221 | pci_unregister_driver(&mei_driver); |
| 1221 | 1222 | ||
| 1222 | pr_debug("unloaded successfully.\n"); | 1223 | pr_debug("unloaded successfully.\n"); |
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 6be5605707b4..e2ec0505eb5c 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
| @@ -341,7 +341,7 @@ static const struct watchdog_ops wd_ops = { | |||
| 341 | }; | 341 | }; |
| 342 | static const struct watchdog_info wd_info = { | 342 | static const struct watchdog_info wd_info = { |
| 343 | .identity = INTEL_AMT_WATCHDOG_ID, | 343 | .identity = INTEL_AMT_WATCHDOG_ID, |
| 344 | .options = WDIOF_KEEPALIVEPING, | 344 | .options = WDIOF_KEEPALIVEPING | WDIOF_ALARMONLY, |
| 345 | }; | 345 | }; |
| 346 | 346 | ||
| 347 | static struct watchdog_device amt_wd_dev = { | 347 | static struct watchdog_device amt_wd_dev = { |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index f0fcce40cd8d..50ff19a62368 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
| @@ -1216,12 +1216,7 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np, | |||
| 1216 | int bus_width = 0; | 1216 | int bus_width = 0; |
| 1217 | 1217 | ||
| 1218 | pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0); | 1218 | pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0); |
| 1219 | if (!pdata->gpio_wp) | ||
| 1220 | pdata->gpio_wp = -1; | ||
| 1221 | |||
| 1222 | pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0); | 1219 | pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0); |
| 1223 | if (!pdata->gpio_cd) | ||
| 1224 | pdata->gpio_cd = -1; | ||
| 1225 | 1220 | ||
| 1226 | if (of_get_property(np, "cd-inverted", NULL)) | 1221 | if (of_get_property(np, "cd-inverted", NULL)) |
| 1227 | pdata->cd_invert = true; | 1222 | pdata->cd_invert = true; |
| @@ -1276,6 +1271,12 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
| 1276 | return -EINVAL; | 1271 | return -EINVAL; |
| 1277 | } | 1272 | } |
| 1278 | 1273 | ||
| 1274 | if (!plat) { | ||
| 1275 | plat = devm_kzalloc(&dev->dev, sizeof(*plat), GFP_KERNEL); | ||
| 1276 | if (!plat) | ||
| 1277 | return -ENOMEM; | ||
| 1278 | } | ||
| 1279 | |||
| 1279 | if (np) | 1280 | if (np) |
| 1280 | mmci_dt_populate_generic_pdata(np, plat); | 1281 | mmci_dt_populate_generic_pdata(np, plat); |
| 1281 | 1282 | ||
| @@ -1424,6 +1425,10 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
| 1424 | writel(0, host->base + MMCIMASK1); | 1425 | writel(0, host->base + MMCIMASK1); |
| 1425 | writel(0xfff, host->base + MMCICLEAR); | 1426 | writel(0xfff, host->base + MMCICLEAR); |
| 1426 | 1427 | ||
| 1428 | if (plat->gpio_cd == -EPROBE_DEFER) { | ||
| 1429 | ret = -EPROBE_DEFER; | ||
| 1430 | goto err_gpio_cd; | ||
| 1431 | } | ||
| 1427 | if (gpio_is_valid(plat->gpio_cd)) { | 1432 | if (gpio_is_valid(plat->gpio_cd)) { |
| 1428 | ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)"); | 1433 | ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)"); |
| 1429 | if (ret == 0) | 1434 | if (ret == 0) |
| @@ -1447,6 +1452,10 @@ static int __devinit mmci_probe(struct amba_device *dev, | |||
| 1447 | if (ret >= 0) | 1452 | if (ret >= 0) |
| 1448 | host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd); | 1453 | host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd); |
| 1449 | } | 1454 | } |
| 1455 | if (plat->gpio_wp == -EPROBE_DEFER) { | ||
| 1456 | ret = -EPROBE_DEFER; | ||
| 1457 | goto err_gpio_wp; | ||
| 1458 | } | ||
| 1450 | if (gpio_is_valid(plat->gpio_wp)) { | 1459 | if (gpio_is_valid(plat->gpio_wp)) { |
| 1451 | ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)"); | 1460 | ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)"); |
| 1452 | if (ret == 0) | 1461 | if (ret == 0) |
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 1fe32dfa7cd4..423da8194cd8 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Support of SDHCI platform devices for spear soc family | 4 | * Support of SDHCI platform devices for spear soc family |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2010 ST Microelectronics | 6 | * Copyright (C) 2010 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * Inspired by sdhci-pltfm.c | 9 | * Inspired by sdhci-pltfm.c |
| 10 | * | 10 | * |
| @@ -289,5 +289,5 @@ static struct platform_driver sdhci_driver = { | |||
| 289 | module_platform_driver(sdhci_driver); | 289 | module_platform_driver(sdhci_driver); |
| 290 | 290 | ||
| 291 | MODULE_DESCRIPTION("SPEAr Secure Digital Host Controller Interface driver"); | 291 | MODULE_DESCRIPTION("SPEAr Secure Digital Host Controller Interface driver"); |
| 292 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 292 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 293 | MODULE_LICENSE("GPL v2"); | 293 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c index ae36d7e1e913..551e316e4454 100644 --- a/drivers/mtd/mtdoops.c +++ b/drivers/mtd/mtdoops.c | |||
| @@ -304,32 +304,17 @@ static void find_next_position(struct mtdoops_context *cxt) | |||
| 304 | } | 304 | } |
| 305 | 305 | ||
| 306 | static void mtdoops_do_dump(struct kmsg_dumper *dumper, | 306 | static void mtdoops_do_dump(struct kmsg_dumper *dumper, |
| 307 | enum kmsg_dump_reason reason, const char *s1, unsigned long l1, | 307 | enum kmsg_dump_reason reason) |
| 308 | const char *s2, unsigned long l2) | ||
| 309 | { | 308 | { |
| 310 | struct mtdoops_context *cxt = container_of(dumper, | 309 | struct mtdoops_context *cxt = container_of(dumper, |
| 311 | struct mtdoops_context, dump); | 310 | struct mtdoops_context, dump); |
| 312 | unsigned long s1_start, s2_start; | ||
| 313 | unsigned long l1_cpy, l2_cpy; | ||
| 314 | char *dst; | ||
| 315 | |||
| 316 | if (reason != KMSG_DUMP_OOPS && | ||
| 317 | reason != KMSG_DUMP_PANIC) | ||
| 318 | return; | ||
| 319 | 311 | ||
| 320 | /* Only dump oopses if dump_oops is set */ | 312 | /* Only dump oopses if dump_oops is set */ |
| 321 | if (reason == KMSG_DUMP_OOPS && !dump_oops) | 313 | if (reason == KMSG_DUMP_OOPS && !dump_oops) |
| 322 | return; | 314 | return; |
| 323 | 315 | ||
| 324 | dst = cxt->oops_buf + MTDOOPS_HEADER_SIZE; /* Skip the header */ | 316 | kmsg_dump_get_buffer(dumper, true, cxt->oops_buf + MTDOOPS_HEADER_SIZE, |
| 325 | l2_cpy = min(l2, record_size - MTDOOPS_HEADER_SIZE); | 317 | record_size - MTDOOPS_HEADER_SIZE, NULL); |
| 326 | l1_cpy = min(l1, record_size - MTDOOPS_HEADER_SIZE - l2_cpy); | ||
| 327 | |||
| 328 | s2_start = l2 - l2_cpy; | ||
| 329 | s1_start = l1 - l1_cpy; | ||
| 330 | |||
| 331 | memcpy(dst, s1 + s1_start, l1_cpy); | ||
| 332 | memcpy(dst + l1_cpy, s2 + s2_start, l2_cpy); | ||
| 333 | 318 | ||
| 334 | /* Panics must be written immediately */ | 319 | /* Panics must be written immediately */ |
| 335 | if (reason != KMSG_DUMP_OOPS) | 320 | if (reason != KMSG_DUMP_OOPS) |
| @@ -375,6 +360,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd) | |||
| 375 | return; | 360 | return; |
| 376 | } | 361 | } |
| 377 | 362 | ||
| 363 | cxt->dump.max_reason = KMSG_DUMP_OOPS; | ||
| 378 | cxt->dump.dump = mtdoops_do_dump; | 364 | cxt->dump.dump = mtdoops_do_dump; |
| 379 | err = kmsg_dump_register(&cxt->dump); | 365 | err = kmsg_dump_register(&cxt->dump); |
| 380 | if (err) { | 366 | if (err) { |
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c index afb50ee64598..4ba4636b6a4a 100644 --- a/drivers/pinctrl/pinctrl-mxs.c +++ b/drivers/pinctrl/pinctrl-mxs.c | |||
| @@ -137,7 +137,7 @@ static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev, | |||
| 137 | 137 | ||
| 138 | free_group: | 138 | free_group: |
| 139 | if (!purecfg) | 139 | if (!purecfg) |
| 140 | free(group); | 140 | kfree(group); |
| 141 | free: | 141 | free: |
| 142 | kfree(new_map); | 142 | kfree(new_map); |
| 143 | return ret; | 143 | return ret; |
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index e8937e7e4999..3e7e47d6b385 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
| @@ -1438,7 +1438,27 @@ static int nmk_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, | |||
| 1438 | 1438 | ||
| 1439 | dev_dbg(npct->dev, "enable group %s, %u pins\n", g->name, g->npins); | 1439 | dev_dbg(npct->dev, "enable group %s, %u pins\n", g->name, g->npins); |
| 1440 | 1440 | ||
| 1441 | /* Handle this special glitch on altfunction C */ | 1441 | /* |
| 1442 | * If we're setting altfunc C by setting both AFSLA and AFSLB to 1, | ||
| 1443 | * we may pass through an undesired state. In this case we take | ||
| 1444 | * some extra care. | ||
| 1445 | * | ||
| 1446 | * Safe sequence used to switch IOs between GPIO and Alternate-C mode: | ||
| 1447 | * - Save SLPM registers (since we have a shadow register in the | ||
| 1448 | * nmk_chip we're using that as backup) | ||
| 1449 | * - Set SLPM=0 for the IOs you want to switch and others to 1 | ||
| 1450 | * - Configure the GPIO registers for the IOs that are being switched | ||
| 1451 | * - Set IOFORCE=1 | ||
| 1452 | * - Modify the AFLSA/B registers for the IOs that are being switched | ||
| 1453 | * - Set IOFORCE=0 | ||
| 1454 | * - Restore SLPM registers | ||
| 1455 | * - Any spurious wake up event during switch sequence to be ignored | ||
| 1456 | * and cleared | ||
| 1457 | * | ||
| 1458 | * We REALLY need to save ALL slpm registers, because the external | ||
| 1459 | * IOFORCE will switch *all* ports to their sleepmode setting to as | ||
| 1460 | * to avoid glitches. (Not just one port!) | ||
| 1461 | */ | ||
| 1442 | glitch = (g->altsetting == NMK_GPIO_ALT_C); | 1462 | glitch = (g->altsetting == NMK_GPIO_ALT_C); |
| 1443 | 1463 | ||
| 1444 | if (glitch) { | 1464 | if (glitch) { |
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index 5ae50aadf885..b3f6b2873fdd 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.c +++ b/drivers/pinctrl/spear/pinctrl-spear.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr pinmux | 2 | * Driver for the ST Microelectronics SPEAr pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * Inspired from: | 7 | * Inspired from: |
| 8 | * - U300 Pinctl drivers | 8 | * - U300 Pinctl drivers |
diff --git a/drivers/pinctrl/spear/pinctrl-spear.h b/drivers/pinctrl/spear/pinctrl-spear.h index 9155783bb47f..d950eb78d939 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.h +++ b/drivers/pinctrl/spear/pinctrl-spear.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver header file for the ST Microelectronics SPEAr pinmux | 2 | * Driver header file for the ST Microelectronics SPEAr pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/pinctrl/spear/pinctrl-spear1310.c b/drivers/pinctrl/spear/pinctrl-spear1310.c index fff168be7f00..d6cca8c81b92 100644 --- a/drivers/pinctrl/spear/pinctrl-spear1310.c +++ b/drivers/pinctrl/spear/pinctrl-spear1310.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr1310 pinmux | 2 | * Driver for the ST Microelectronics SPEAr1310 pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
| @@ -2192,7 +2192,7 @@ static void __exit spear1310_pinctrl_exit(void) | |||
| 2192 | } | 2192 | } |
| 2193 | module_exit(spear1310_pinctrl_exit); | 2193 | module_exit(spear1310_pinctrl_exit); |
| 2194 | 2194 | ||
| 2195 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 2195 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 2196 | MODULE_DESCRIPTION("ST Microelectronics SPEAr1310 pinctrl driver"); | 2196 | MODULE_DESCRIPTION("ST Microelectronics SPEAr1310 pinctrl driver"); |
| 2197 | MODULE_LICENSE("GPL v2"); | 2197 | MODULE_LICENSE("GPL v2"); |
| 2198 | MODULE_DEVICE_TABLE(of, spear1310_pinctrl_of_match); | 2198 | MODULE_DEVICE_TABLE(of, spear1310_pinctrl_of_match); |
diff --git a/drivers/pinctrl/spear/pinctrl-spear1340.c b/drivers/pinctrl/spear/pinctrl-spear1340.c index a8ab2a6f51bf..a0eb057e55bd 100644 --- a/drivers/pinctrl/spear/pinctrl-spear1340.c +++ b/drivers/pinctrl/spear/pinctrl-spear1340.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr1340 pinmux | 2 | * Driver for the ST Microelectronics SPEAr1340 pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
| @@ -1983,7 +1983,7 @@ static void __exit spear1340_pinctrl_exit(void) | |||
| 1983 | } | 1983 | } |
| 1984 | module_exit(spear1340_pinctrl_exit); | 1984 | module_exit(spear1340_pinctrl_exit); |
| 1985 | 1985 | ||
| 1986 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 1986 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 1987 | MODULE_DESCRIPTION("ST Microelectronics SPEAr1340 pinctrl driver"); | 1987 | MODULE_DESCRIPTION("ST Microelectronics SPEAr1340 pinctrl driver"); |
| 1988 | MODULE_LICENSE("GPL v2"); | 1988 | MODULE_LICENSE("GPL v2"); |
| 1989 | MODULE_DEVICE_TABLE(of, spear1340_pinctrl_of_match); | 1989 | MODULE_DEVICE_TABLE(of, spear1340_pinctrl_of_match); |
diff --git a/drivers/pinctrl/spear/pinctrl-spear300.c b/drivers/pinctrl/spear/pinctrl-spear300.c index 9c82a35e4e78..4dfc2849b172 100644 --- a/drivers/pinctrl/spear/pinctrl-spear300.c +++ b/drivers/pinctrl/spear/pinctrl-spear300.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr300 pinmux | 2 | * Driver for the ST Microelectronics SPEAr300 pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
| @@ -702,7 +702,7 @@ static void __exit spear300_pinctrl_exit(void) | |||
| 702 | } | 702 | } |
| 703 | module_exit(spear300_pinctrl_exit); | 703 | module_exit(spear300_pinctrl_exit); |
| 704 | 704 | ||
| 705 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 705 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 706 | MODULE_DESCRIPTION("ST Microelectronics SPEAr300 pinctrl driver"); | 706 | MODULE_DESCRIPTION("ST Microelectronics SPEAr300 pinctrl driver"); |
| 707 | MODULE_LICENSE("GPL v2"); | 707 | MODULE_LICENSE("GPL v2"); |
| 708 | MODULE_DEVICE_TABLE(of, spear300_pinctrl_of_match); | 708 | MODULE_DEVICE_TABLE(of, spear300_pinctrl_of_match); |
diff --git a/drivers/pinctrl/spear/pinctrl-spear310.c b/drivers/pinctrl/spear/pinctrl-spear310.c index 1a9707605125..96883693fb7e 100644 --- a/drivers/pinctrl/spear/pinctrl-spear310.c +++ b/drivers/pinctrl/spear/pinctrl-spear310.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr310 pinmux | 2 | * Driver for the ST Microelectronics SPEAr310 pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
| @@ -425,7 +425,7 @@ static void __exit spear310_pinctrl_exit(void) | |||
| 425 | } | 425 | } |
| 426 | module_exit(spear310_pinctrl_exit); | 426 | module_exit(spear310_pinctrl_exit); |
| 427 | 427 | ||
| 428 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 428 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 429 | MODULE_DESCRIPTION("ST Microelectronics SPEAr310 pinctrl driver"); | 429 | MODULE_DESCRIPTION("ST Microelectronics SPEAr310 pinctrl driver"); |
| 430 | MODULE_LICENSE("GPL v2"); | 430 | MODULE_LICENSE("GPL v2"); |
| 431 | MODULE_DEVICE_TABLE(of, SPEAr310_pinctrl_of_match); | 431 | MODULE_DEVICE_TABLE(of, SPEAr310_pinctrl_of_match); |
diff --git a/drivers/pinctrl/spear/pinctrl-spear320.c b/drivers/pinctrl/spear/pinctrl-spear320.c index de726e6c283a..020b1e0bdb3e 100644 --- a/drivers/pinctrl/spear/pinctrl-spear320.c +++ b/drivers/pinctrl/spear/pinctrl-spear320.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr320 pinmux | 2 | * Driver for the ST Microelectronics SPEAr320 pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
| @@ -3462,7 +3462,7 @@ static void __exit spear320_pinctrl_exit(void) | |||
| 3462 | } | 3462 | } |
| 3463 | module_exit(spear320_pinctrl_exit); | 3463 | module_exit(spear320_pinctrl_exit); |
| 3464 | 3464 | ||
| 3465 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 3465 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 3466 | MODULE_DESCRIPTION("ST Microelectronics SPEAr320 pinctrl driver"); | 3466 | MODULE_DESCRIPTION("ST Microelectronics SPEAr320 pinctrl driver"); |
| 3467 | MODULE_LICENSE("GPL v2"); | 3467 | MODULE_LICENSE("GPL v2"); |
| 3468 | MODULE_DEVICE_TABLE(of, spear320_pinctrl_of_match); | 3468 | MODULE_DEVICE_TABLE(of, spear320_pinctrl_of_match); |
diff --git a/drivers/pinctrl/spear/pinctrl-spear3xx.c b/drivers/pinctrl/spear/pinctrl-spear3xx.c index 91c883bc46a6..0242378f7cb8 100644 --- a/drivers/pinctrl/spear/pinctrl-spear3xx.c +++ b/drivers/pinctrl/spear/pinctrl-spear3xx.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Driver for the ST Microelectronics SPEAr3xx pinmux | 2 | * Driver for the ST Microelectronics SPEAr3xx pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/pinctrl/spear/pinctrl-spear3xx.h b/drivers/pinctrl/spear/pinctrl-spear3xx.h index 5d5fdd8df7b8..31f44347f17c 100644 --- a/drivers/pinctrl/spear/pinctrl-spear3xx.h +++ b/drivers/pinctrl/spear/pinctrl-spear3xx.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Header file for the ST Microelectronics SPEAr3xx pinmux | 2 | * Header file for the ST Microelectronics SPEAr3xx pinmux |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2012 ST Microelectronics | 4 | * Copyright (C) 2012 ST Microelectronics |
| 5 | * Viresh Kumar <viresh.kumar@st.com> | 5 | * Viresh Kumar <viresh.linux@gmail.com> |
| 6 | * | 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public | 7 | * This file is licensed under the terms of the GNU General Public |
| 8 | * License version 2. This program is licensed "as is" without any | 8 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 46ef5fe51db5..0c73dd4f43a0 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
| @@ -801,7 +801,7 @@ static int omap2_mcspi_setup(struct spi_device *spi) | |||
| 801 | mcspi_dma = &mcspi->dma_channels[spi->chip_select]; | 801 | mcspi_dma = &mcspi->dma_channels[spi->chip_select]; |
| 802 | 802 | ||
| 803 | if (!cs) { | 803 | if (!cs) { |
| 804 | cs = devm_kzalloc(&spi->dev , sizeof *cs, GFP_KERNEL); | 804 | cs = kzalloc(sizeof *cs, GFP_KERNEL); |
| 805 | if (!cs) | 805 | if (!cs) |
| 806 | return -ENOMEM; | 806 | return -ENOMEM; |
| 807 | cs->base = mcspi->base + spi->chip_select * 0x14; | 807 | cs->base = mcspi->base + spi->chip_select * 0x14; |
| @@ -842,6 +842,7 @@ static void omap2_mcspi_cleanup(struct spi_device *spi) | |||
| 842 | cs = spi->controller_state; | 842 | cs = spi->controller_state; |
| 843 | list_del(&cs->node); | 843 | list_del(&cs->node); |
| 844 | 844 | ||
| 845 | kfree(cs); | ||
| 845 | } | 846 | } |
| 846 | 847 | ||
| 847 | if (spi->chip_select < spi->master->num_chipselect) { | 848 | if (spi->chip_select < spi->master->num_chipselect) { |
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 1c3d6386ea36..aeac1caba3f9 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
| 31 | #include <linux/usb.h> | 31 | #include <linux/usb.h> |
| 32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
| 33 | #include <linux/kconfig.h> | ||
| 33 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
| 34 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
| 35 | #include <linux/fcntl.h> | 36 | #include <linux/fcntl.h> |
| @@ -981,6 +982,8 @@ void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver, | |||
| 981 | } | 982 | } |
| 982 | EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister); | 983 | EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister); |
| 983 | 984 | ||
| 985 | #if IS_ENABLED(CONFIG_USB) | ||
| 986 | |||
| 984 | static int comedi_old_usb_auto_config(struct usb_interface *intf, | 987 | static int comedi_old_usb_auto_config(struct usb_interface *intf, |
| 985 | struct comedi_driver *driver) | 988 | struct comedi_driver *driver) |
| 986 | { | 989 | { |
| @@ -1043,3 +1046,5 @@ void comedi_usb_driver_unregister(struct comedi_driver *comedi_driver, | |||
| 1043 | comedi_driver_unregister(comedi_driver); | 1046 | comedi_driver_unregister(comedi_driver); |
| 1044 | } | 1047 | } |
| 1045 | EXPORT_SYMBOL_GPL(comedi_usb_driver_unregister); | 1048 | EXPORT_SYMBOL_GPL(comedi_usb_driver_unregister); |
| 1049 | |||
| 1050 | #endif | ||
diff --git a/drivers/staging/gdm72xx/netlink_k.c b/drivers/staging/gdm72xx/netlink_k.c index 292af0f7f451..51665132c61b 100644 --- a/drivers/staging/gdm72xx/netlink_k.c +++ b/drivers/staging/gdm72xx/netlink_k.c | |||
| @@ -104,7 +104,7 @@ struct sock *netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type, | |||
| 104 | 104 | ||
| 105 | void netlink_exit(struct sock *sock) | 105 | void netlink_exit(struct sock *sock) |
| 106 | { | 106 | { |
| 107 | sock_release(sock->sk_socket); | 107 | netlink_kernel_release(sock); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) | 110 | int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) |
diff --git a/drivers/staging/iio/Documentation/device.txt b/drivers/staging/iio/Documentation/device.txt index 0338c7cd0a8b..f03fbd3bb454 100644 --- a/drivers/staging/iio/Documentation/device.txt +++ b/drivers/staging/iio/Documentation/device.txt | |||
| @@ -29,8 +29,6 @@ Then fill in the following: | |||
| 29 | * info->driver_module: | 29 | * info->driver_module: |
| 30 | Set to THIS_MODULE. Used to ensure correct ownership | 30 | Set to THIS_MODULE. Used to ensure correct ownership |
| 31 | of various resources allocate by the core. | 31 | of various resources allocate by the core. |
| 32 | * info->num_interrupt_lines: | ||
| 33 | Number of event triggering hardware lines the device has. | ||
| 34 | * info->event_attrs: | 32 | * info->event_attrs: |
| 35 | Attributes used to enable / disable hardware events. | 33 | Attributes used to enable / disable hardware events. |
| 36 | * info->attrs: | 34 | * info->attrs: |
diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig index 2490dd25093b..8f1b3af02f29 100644 --- a/drivers/staging/iio/adc/Kconfig +++ b/drivers/staging/iio/adc/Kconfig | |||
| @@ -13,6 +13,7 @@ config AD7291 | |||
| 13 | config AD7298 | 13 | config AD7298 |
| 14 | tristate "Analog Devices AD7298 ADC driver" | 14 | tristate "Analog Devices AD7298 ADC driver" |
| 15 | depends on SPI | 15 | depends on SPI |
| 16 | select IIO_KFIFO_BUF if IIO_BUFFER | ||
| 16 | help | 17 | help |
| 17 | Say yes here to build support for Analog Devices AD7298 | 18 | Say yes here to build support for Analog Devices AD7298 |
| 18 | 8 Channel ADC with temperature sensor. | 19 | 8 Channel ADC with temperature sensor. |
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c index 10ab6dc823b9..a13afff2dfe6 100644 --- a/drivers/staging/iio/adc/ad7606_core.c +++ b/drivers/staging/iio/adc/ad7606_core.c | |||
| @@ -235,7 +235,8 @@ static const struct attribute_group ad7606_attribute_group_range = { | |||
| 235 | .indexed = 1, \ | 235 | .indexed = 1, \ |
| 236 | .channel = num, \ | 236 | .channel = num, \ |
| 237 | .address = num, \ | 237 | .address = num, \ |
| 238 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, \ | 238 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ |
| 239 | IIO_CHAN_INFO_SCALE_SHARED_BIT, \ | ||
| 239 | .scan_index = num, \ | 240 | .scan_index = num, \ |
| 240 | .scan_type = IIO_ST('s', 16, 16, 0), \ | 241 | .scan_type = IIO_ST('s', 16, 16, 0), \ |
| 241 | } | 242 | } |
diff --git a/drivers/staging/omapdrm/omap_fbdev.c b/drivers/staging/omapdrm/omap_fbdev.c index 11acd4c35ed2..8c6ed3b0c6f6 100644 --- a/drivers/staging/omapdrm/omap_fbdev.c +++ b/drivers/staging/omapdrm/omap_fbdev.c | |||
| @@ -208,7 +208,8 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, | |||
| 208 | */ | 208 | */ |
| 209 | ret = omap_gem_get_paddr(fbdev->bo, &paddr, true); | 209 | ret = omap_gem_get_paddr(fbdev->bo, &paddr, true); |
| 210 | if (ret) { | 210 | if (ret) { |
| 211 | dev_err(dev->dev, "could not map (paddr)!\n"); | 211 | dev_err(dev->dev, |
| 212 | "could not map (paddr)! Skipping framebuffer alloc\n"); | ||
| 212 | ret = -ENOMEM; | 213 | ret = -ENOMEM; |
| 213 | goto fail; | 214 | goto fail; |
| 214 | } | 215 | } |
| @@ -388,8 +389,11 @@ void omap_fbdev_free(struct drm_device *dev) | |||
| 388 | 389 | ||
| 389 | fbi = helper->fbdev; | 390 | fbi = helper->fbdev; |
| 390 | 391 | ||
| 391 | unregister_framebuffer(fbi); | 392 | /* only cleanup framebuffer if it is present */ |
| 392 | framebuffer_release(fbi); | 393 | if (fbi) { |
| 394 | unregister_framebuffer(fbi); | ||
| 395 | framebuffer_release(fbi); | ||
| 396 | } | ||
| 393 | 397 | ||
| 394 | drm_fb_helper_fini(helper); | 398 | drm_fb_helper_fini(helper); |
| 395 | 399 | ||
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 9bd18e2d0513..69f616c6964e 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c | |||
| @@ -102,6 +102,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { | |||
| 102 | /* - */ | 102 | /* - */ |
| 103 | {USB_DEVICE(0x20F4, 0x646B)}, | 103 | {USB_DEVICE(0x20F4, 0x646B)}, |
| 104 | {USB_DEVICE(0x083A, 0xC512)}, | 104 | {USB_DEVICE(0x083A, 0xC512)}, |
| 105 | {USB_DEVICE(0x25D4, 0x4CA1)}, | ||
| 106 | {USB_DEVICE(0x25D4, 0x4CAB)}, | ||
| 105 | 107 | ||
| 106 | /* RTL8191SU */ | 108 | /* RTL8191SU */ |
| 107 | /* Realtek */ | 109 | /* Realtek */ |
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c index 47d061b9ad4d..6e1958a325bd 100644 --- a/drivers/tty/serial/8250/8250.c +++ b/drivers/tty/serial/8250/8250.c | |||
| @@ -3113,7 +3113,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port * | |||
| 3113 | 3113 | ||
| 3114 | /** | 3114 | /** |
| 3115 | * serial8250_register_8250_port - register a serial port | 3115 | * serial8250_register_8250_port - register a serial port |
| 3116 | * @port: serial port template | 3116 | * @up: serial port template |
| 3117 | * | 3117 | * |
| 3118 | * Configure the serial port specified by the request. If the | 3118 | * Configure the serial port specified by the request. If the |
| 3119 | * port exists and is in use, it is hung up and unregistered | 3119 | * port exists and is in use, it is hung up and unregistered |
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 4ad721fb8405..c17923ec6e95 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
| @@ -133,6 +133,10 @@ struct pl011_dmatx_data { | |||
| 133 | struct uart_amba_port { | 133 | struct uart_amba_port { |
| 134 | struct uart_port port; | 134 | struct uart_port port; |
| 135 | struct clk *clk; | 135 | struct clk *clk; |
| 136 | /* Two optional pin states - default & sleep */ | ||
| 137 | struct pinctrl *pinctrl; | ||
| 138 | struct pinctrl_state *pins_default; | ||
| 139 | struct pinctrl_state *pins_sleep; | ||
| 136 | const struct vendor_data *vendor; | 140 | const struct vendor_data *vendor; |
| 137 | unsigned int dmacr; /* dma control reg */ | 141 | unsigned int dmacr; /* dma control reg */ |
| 138 | unsigned int im; /* interrupt mask */ | 142 | unsigned int im; /* interrupt mask */ |
| @@ -1312,6 +1316,14 @@ static int pl011_startup(struct uart_port *port) | |||
| 1312 | unsigned int cr; | 1316 | unsigned int cr; |
| 1313 | int retval; | 1317 | int retval; |
| 1314 | 1318 | ||
| 1319 | /* Optionaly enable pins to be muxed in and configured */ | ||
| 1320 | if (!IS_ERR(uap->pins_default)) { | ||
| 1321 | retval = pinctrl_select_state(uap->pinctrl, uap->pins_default); | ||
| 1322 | if (retval) | ||
| 1323 | dev_err(port->dev, | ||
| 1324 | "could not set default pins\n"); | ||
| 1325 | } | ||
| 1326 | |||
| 1315 | retval = clk_prepare(uap->clk); | 1327 | retval = clk_prepare(uap->clk); |
| 1316 | if (retval) | 1328 | if (retval) |
| 1317 | goto out; | 1329 | goto out; |
| @@ -1420,6 +1432,7 @@ static void pl011_shutdown(struct uart_port *port) | |||
| 1420 | { | 1432 | { |
| 1421 | struct uart_amba_port *uap = (struct uart_amba_port *)port; | 1433 | struct uart_amba_port *uap = (struct uart_amba_port *)port; |
| 1422 | unsigned int cr; | 1434 | unsigned int cr; |
| 1435 | int retval; | ||
| 1423 | 1436 | ||
| 1424 | /* | 1437 | /* |
| 1425 | * disable all interrupts | 1438 | * disable all interrupts |
| @@ -1462,6 +1475,14 @@ static void pl011_shutdown(struct uart_port *port) | |||
| 1462 | */ | 1475 | */ |
| 1463 | clk_disable(uap->clk); | 1476 | clk_disable(uap->clk); |
| 1464 | clk_unprepare(uap->clk); | 1477 | clk_unprepare(uap->clk); |
| 1478 | /* Optionally let pins go into sleep states */ | ||
| 1479 | if (!IS_ERR(uap->pins_sleep)) { | ||
| 1480 | retval = pinctrl_select_state(uap->pinctrl, uap->pins_sleep); | ||
| 1481 | if (retval) | ||
| 1482 | dev_err(port->dev, | ||
| 1483 | "could not set pins to sleep state\n"); | ||
| 1484 | } | ||
| 1485 | |||
| 1465 | 1486 | ||
| 1466 | if (uap->port.dev->platform_data) { | 1487 | if (uap->port.dev->platform_data) { |
| 1467 | struct amba_pl011_data *plat; | 1488 | struct amba_pl011_data *plat; |
| @@ -1792,6 +1813,14 @@ static int __init pl011_console_setup(struct console *co, char *options) | |||
| 1792 | if (!uap) | 1813 | if (!uap) |
| 1793 | return -ENODEV; | 1814 | return -ENODEV; |
| 1794 | 1815 | ||
| 1816 | /* Allow pins to be muxed in and configured */ | ||
| 1817 | if (!IS_ERR(uap->pins_default)) { | ||
| 1818 | ret = pinctrl_select_state(uap->pinctrl, uap->pins_default); | ||
| 1819 | if (ret) | ||
| 1820 | dev_err(uap->port.dev, | ||
| 1821 | "could not set default pins\n"); | ||
| 1822 | } | ||
| 1823 | |||
| 1795 | ret = clk_prepare(uap->clk); | 1824 | ret = clk_prepare(uap->clk); |
| 1796 | if (ret) | 1825 | if (ret) |
| 1797 | return ret; | 1826 | return ret; |
| @@ -1844,7 +1873,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) | |||
| 1844 | { | 1873 | { |
| 1845 | struct uart_amba_port *uap; | 1874 | struct uart_amba_port *uap; |
| 1846 | struct vendor_data *vendor = id->data; | 1875 | struct vendor_data *vendor = id->data; |
| 1847 | struct pinctrl *pinctrl; | ||
| 1848 | void __iomem *base; | 1876 | void __iomem *base; |
| 1849 | int i, ret; | 1877 | int i, ret; |
| 1850 | 1878 | ||
| @@ -1869,11 +1897,20 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) | |||
| 1869 | goto free; | 1897 | goto free; |
| 1870 | } | 1898 | } |
| 1871 | 1899 | ||
| 1872 | pinctrl = devm_pinctrl_get_select_default(&dev->dev); | 1900 | uap->pinctrl = devm_pinctrl_get(&dev->dev); |
| 1873 | if (IS_ERR(pinctrl)) { | 1901 | if (IS_ERR(uap->pinctrl)) { |
| 1874 | ret = PTR_ERR(pinctrl); | 1902 | ret = PTR_ERR(uap->pinctrl); |
| 1875 | goto unmap; | 1903 | goto unmap; |
| 1876 | } | 1904 | } |
| 1905 | uap->pins_default = pinctrl_lookup_state(uap->pinctrl, | ||
| 1906 | PINCTRL_STATE_DEFAULT); | ||
| 1907 | if (IS_ERR(uap->pins_default)) | ||
| 1908 | dev_err(&dev->dev, "could not get default pinstate\n"); | ||
| 1909 | |||
| 1910 | uap->pins_sleep = pinctrl_lookup_state(uap->pinctrl, | ||
| 1911 | PINCTRL_STATE_SLEEP); | ||
| 1912 | if (IS_ERR(uap->pins_sleep)) | ||
| 1913 | dev_dbg(&dev->dev, "could not get sleep pinstate\n"); | ||
| 1877 | 1914 | ||
| 1878 | uap->clk = clk_get(&dev->dev, NULL); | 1915 | uap->clk = clk_get(&dev->dev, NULL); |
| 1879 | if (IS_ERR(uap->clk)) { | 1916 | if (IS_ERR(uap->clk)) { |
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c index 34bd345da775..6ae2a58d62f2 100644 --- a/drivers/tty/serial/serial_txx9.c +++ b/drivers/tty/serial/serial_txx9.c | |||
| @@ -466,7 +466,7 @@ static void serial_txx9_break_ctl(struct uart_port *port, int break_state) | |||
| 466 | spin_unlock_irqrestore(&up->port.lock, flags); | 466 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | #if defined(CONFIG_SERIAL_TXX9_CONSOLE) || (CONFIG_CONSOLE_POLL) | 469 | #if defined(CONFIG_SERIAL_TXX9_CONSOLE) || defined(CONFIG_CONSOLE_POLL) |
| 470 | /* | 470 | /* |
| 471 | * Wait for transmitter & holding register to empty | 471 | * Wait for transmitter & holding register to empty |
| 472 | */ | 472 | */ |
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index afcd13676542..e4841c36798b 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Watchdog driver for ARM SP805 watchdog module | 4 | * Watchdog driver for ARM SP805 watchdog module |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2010 ST Microelectronics | 6 | * Copyright (C) 2010 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2 or later. This program is licensed "as is" without any | 10 | * License version 2 or later. This program is licensed "as is" without any |
| @@ -331,6 +331,6 @@ static struct amba_driver sp805_wdt_driver = { | |||
| 331 | 331 | ||
| 332 | module_amba_driver(sp805_wdt_driver); | 332 | module_amba_driver(sp805_wdt_driver); |
| 333 | 333 | ||
| 334 | MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>"); | 334 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
| 335 | MODULE_DESCRIPTION("ARM SP805 Watchdog Driver"); | 335 | MODULE_DESCRIPTION("ARM SP805 Watchdog Driver"); |
| 336 | MODULE_LICENSE("GPL"); | 336 | MODULE_LICENSE("GPL"); |
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 8f7d1237b7a0..7301cdb4b2cb 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
| @@ -179,61 +179,74 @@ static int __add_prelim_ref(struct list_head *head, u64 root_id, | |||
| 179 | 179 | ||
| 180 | static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path, | 180 | static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path, |
| 181 | struct ulist *parents, int level, | 181 | struct ulist *parents, int level, |
| 182 | struct btrfs_key *key, u64 time_seq, | 182 | struct btrfs_key *key_for_search, u64 time_seq, |
| 183 | u64 wanted_disk_byte, | 183 | u64 wanted_disk_byte, |
| 184 | const u64 *extent_item_pos) | 184 | const u64 *extent_item_pos) |
| 185 | { | 185 | { |
| 186 | int ret; | 186 | int ret = 0; |
| 187 | int slot = path->slots[level]; | 187 | int slot; |
| 188 | struct extent_buffer *eb = path->nodes[level]; | 188 | struct extent_buffer *eb; |
| 189 | struct btrfs_key key; | ||
| 189 | struct btrfs_file_extent_item *fi; | 190 | struct btrfs_file_extent_item *fi; |
| 190 | struct extent_inode_elem *eie = NULL; | 191 | struct extent_inode_elem *eie = NULL; |
| 191 | u64 disk_byte; | 192 | u64 disk_byte; |
| 192 | u64 wanted_objectid = key->objectid; | ||
| 193 | 193 | ||
| 194 | add_parent: | 194 | if (level != 0) { |
| 195 | if (level == 0 && extent_item_pos) { | 195 | eb = path->nodes[level]; |
| 196 | fi = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item); | 196 | ret = ulist_add(parents, eb->start, 0, GFP_NOFS); |
| 197 | ret = check_extent_in_eb(key, eb, fi, *extent_item_pos, &eie); | ||
| 198 | if (ret < 0) | 197 | if (ret < 0) |
| 199 | return ret; | 198 | return ret; |
| 200 | } | ||
| 201 | ret = ulist_add(parents, eb->start, (unsigned long)eie, GFP_NOFS); | ||
| 202 | if (ret < 0) | ||
| 203 | return ret; | ||
| 204 | |||
| 205 | if (level != 0) | ||
| 206 | return 0; | 199 | return 0; |
| 200 | } | ||
| 207 | 201 | ||
| 208 | /* | 202 | /* |
| 209 | * if the current leaf is full with EXTENT_DATA items, we must | 203 | * We normally enter this function with the path already pointing to |
| 210 | * check the next one if that holds a reference as well. | 204 | * the first item to check. But sometimes, we may enter it with |
| 211 | * ref->count cannot be used to skip this check. | 205 | * slot==nritems. In that case, go to the next leaf before we continue. |
| 212 | * repeat this until we don't find any additional EXTENT_DATA items. | ||
| 213 | */ | 206 | */ |
| 214 | while (1) { | 207 | if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) |
| 215 | eie = NULL; | ||
| 216 | ret = btrfs_next_old_leaf(root, path, time_seq); | 208 | ret = btrfs_next_old_leaf(root, path, time_seq); |
| 217 | if (ret < 0) | ||
| 218 | return ret; | ||
| 219 | if (ret) | ||
| 220 | return 0; | ||
| 221 | 209 | ||
| 210 | while (!ret) { | ||
| 222 | eb = path->nodes[0]; | 211 | eb = path->nodes[0]; |
| 223 | for (slot = 0; slot < btrfs_header_nritems(eb); ++slot) { | 212 | slot = path->slots[0]; |
| 224 | btrfs_item_key_to_cpu(eb, key, slot); | 213 | |
| 225 | if (key->objectid != wanted_objectid || | 214 | btrfs_item_key_to_cpu(eb, &key, slot); |
| 226 | key->type != BTRFS_EXTENT_DATA_KEY) | 215 | |
| 227 | return 0; | 216 | if (key.objectid != key_for_search->objectid || |
| 228 | fi = btrfs_item_ptr(eb, slot, | 217 | key.type != BTRFS_EXTENT_DATA_KEY) |
| 229 | struct btrfs_file_extent_item); | 218 | break; |
| 230 | disk_byte = btrfs_file_extent_disk_bytenr(eb, fi); | 219 | |
| 231 | if (disk_byte == wanted_disk_byte) | 220 | fi = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item); |
| 232 | goto add_parent; | 221 | disk_byte = btrfs_file_extent_disk_bytenr(eb, fi); |
| 222 | |||
| 223 | if (disk_byte == wanted_disk_byte) { | ||
| 224 | eie = NULL; | ||
| 225 | if (extent_item_pos) { | ||
| 226 | ret = check_extent_in_eb(&key, eb, fi, | ||
| 227 | *extent_item_pos, | ||
| 228 | &eie); | ||
| 229 | if (ret < 0) | ||
| 230 | break; | ||
| 231 | } | ||
| 232 | if (!ret) { | ||
| 233 | ret = ulist_add(parents, eb->start, | ||
| 234 | (unsigned long)eie, GFP_NOFS); | ||
| 235 | if (ret < 0) | ||
| 236 | break; | ||
| 237 | if (!extent_item_pos) { | ||
| 238 | ret = btrfs_next_old_leaf(root, path, | ||
| 239 | time_seq); | ||
| 240 | continue; | ||
| 241 | } | ||
| 242 | } | ||
| 233 | } | 243 | } |
| 244 | ret = btrfs_next_old_item(root, path, time_seq); | ||
| 234 | } | 245 | } |
| 235 | 246 | ||
| 236 | return 0; | 247 | if (ret > 0) |
| 248 | ret = 0; | ||
| 249 | return ret; | ||
| 237 | } | 250 | } |
| 238 | 251 | ||
| 239 | /* | 252 | /* |
| @@ -250,7 +263,6 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, | |||
| 250 | struct btrfs_path *path; | 263 | struct btrfs_path *path; |
| 251 | struct btrfs_root *root; | 264 | struct btrfs_root *root; |
| 252 | struct btrfs_key root_key; | 265 | struct btrfs_key root_key; |
| 253 | struct btrfs_key key = {0}; | ||
| 254 | struct extent_buffer *eb; | 266 | struct extent_buffer *eb; |
| 255 | int ret = 0; | 267 | int ret = 0; |
| 256 | int root_level; | 268 | int root_level; |
| @@ -295,11 +307,9 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, | |||
| 295 | goto out; | 307 | goto out; |
| 296 | } | 308 | } |
| 297 | 309 | ||
| 298 | if (level == 0) | 310 | ret = add_all_parents(root, path, parents, level, &ref->key_for_search, |
| 299 | btrfs_item_key_to_cpu(eb, &key, path->slots[0]); | 311 | time_seq, ref->wanted_disk_byte, |
| 300 | 312 | extent_item_pos); | |
| 301 | ret = add_all_parents(root, path, parents, level, &key, time_seq, | ||
| 302 | ref->wanted_disk_byte, extent_item_pos); | ||
| 303 | out: | 313 | out: |
| 304 | btrfs_free_path(path); | 314 | btrfs_free_path(path); |
| 305 | return ret; | 315 | return ret; |
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8b73b2d4deb7..fa5c45b39075 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
| @@ -2755,13 +2755,18 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, | |||
| 2755 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); | 2755 | int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); |
| 2756 | int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, | 2756 | int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, |
| 2757 | u64 time_seq); | 2757 | u64 time_seq); |
| 2758 | static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) | 2758 | static inline int btrfs_next_old_item(struct btrfs_root *root, |
| 2759 | struct btrfs_path *p, u64 time_seq) | ||
| 2759 | { | 2760 | { |
| 2760 | ++p->slots[0]; | 2761 | ++p->slots[0]; |
| 2761 | if (p->slots[0] >= btrfs_header_nritems(p->nodes[0])) | 2762 | if (p->slots[0] >= btrfs_header_nritems(p->nodes[0])) |
| 2762 | return btrfs_next_leaf(root, p); | 2763 | return btrfs_next_old_leaf(root, p, time_seq); |
| 2763 | return 0; | 2764 | return 0; |
| 2764 | } | 2765 | } |
| 2766 | static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) | ||
| 2767 | { | ||
| 2768 | return btrfs_next_old_item(root, p, 0); | ||
| 2769 | } | ||
| 2765 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); | 2770 | int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); |
| 2766 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); | 2771 | int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); |
| 2767 | int __must_check btrfs_drop_snapshot(struct btrfs_root *root, | 2772 | int __must_check btrfs_drop_snapshot(struct btrfs_root *root, |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index e1890b1d3075..7b845ff4af99 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -3426,6 +3426,7 @@ int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, | |||
| 3426 | mutex_unlock(&head->mutex); | 3426 | mutex_unlock(&head->mutex); |
| 3427 | btrfs_put_delayed_ref(ref); | 3427 | btrfs_put_delayed_ref(ref); |
| 3428 | 3428 | ||
| 3429 | spin_lock(&delayed_refs->lock); | ||
| 3429 | continue; | 3430 | continue; |
| 3430 | } | 3431 | } |
| 3431 | 3432 | ||
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a4f02501da40..d8bb0dbc4941 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -987,7 +987,7 @@ static noinline void async_cow_start(struct btrfs_work *work) | |||
| 987 | async_cow->start, async_cow->end, async_cow, | 987 | async_cow->start, async_cow->end, async_cow, |
| 988 | &num_added); | 988 | &num_added); |
| 989 | if (num_added == 0) { | 989 | if (num_added == 0) { |
| 990 | iput(async_cow->inode); | 990 | btrfs_add_delayed_iput(async_cow->inode); |
| 991 | async_cow->inode = NULL; | 991 | async_cow->inode = NULL; |
| 992 | } | 992 | } |
| 993 | } | 993 | } |
| @@ -1023,7 +1023,7 @@ static noinline void async_cow_free(struct btrfs_work *work) | |||
| 1023 | struct async_cow *async_cow; | 1023 | struct async_cow *async_cow; |
| 1024 | async_cow = container_of(work, struct async_cow, work); | 1024 | async_cow = container_of(work, struct async_cow, work); |
| 1025 | if (async_cow->inode) | 1025 | if (async_cow->inode) |
| 1026 | iput(async_cow->inode); | 1026 | btrfs_add_delayed_iput(async_cow->inode); |
| 1027 | kfree(async_cow); | 1027 | kfree(async_cow); |
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||
| @@ -819,10 +819,10 @@ static int exec_mmap(struct mm_struct *mm) | |||
| 819 | /* Notify parent that we're no longer interested in the old VM */ | 819 | /* Notify parent that we're no longer interested in the old VM */ |
| 820 | tsk = current; | 820 | tsk = current; |
| 821 | old_mm = current->mm; | 821 | old_mm = current->mm; |
| 822 | sync_mm_rss(old_mm); | ||
| 823 | mm_release(tsk, old_mm); | 822 | mm_release(tsk, old_mm); |
| 824 | 823 | ||
| 825 | if (old_mm) { | 824 | if (old_mm) { |
| 825 | sync_mm_rss(old_mm); | ||
| 826 | /* | 826 | /* |
| 827 | * Make sure that if there is a core dump in progress | 827 | * Make sure that if there is a core dump in progress |
| 828 | * for the old mm, we get out and die instead of going | 828 | * for the old mm, we get out and die instead of going |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 17ba6b995659..f005b5bebdc7 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
| @@ -207,7 +207,6 @@ error_0: | |||
| 207 | static void nfs4_shutdown_session(struct nfs_client *clp) | 207 | static void nfs4_shutdown_session(struct nfs_client *clp) |
| 208 | { | 208 | { |
| 209 | if (nfs4_has_session(clp)) { | 209 | if (nfs4_has_session(clp)) { |
| 210 | nfs4_deviceid_purge_client(clp); | ||
| 211 | nfs4_destroy_session(clp->cl_session); | 210 | nfs4_destroy_session(clp->cl_session); |
| 212 | nfs4_destroy_clientid(clp); | 211 | nfs4_destroy_clientid(clp); |
| 213 | } | 212 | } |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 3168f6e3d4d4..9a4cbfc85d81 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
| @@ -490,6 +490,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) | |||
| 490 | dreq->error = -EIO; | 490 | dreq->error = -EIO; |
| 491 | spin_unlock(cinfo.lock); | 491 | spin_unlock(cinfo.lock); |
| 492 | } | 492 | } |
| 493 | nfs_release_request(req); | ||
| 493 | } | 494 | } |
| 494 | nfs_pageio_complete(&desc); | 495 | nfs_pageio_complete(&desc); |
| 495 | 496 | ||
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index b5b86a05059c..864c51e4b400 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
| @@ -57,6 +57,11 @@ unsigned int nfs_idmap_cache_timeout = 600; | |||
| 57 | static const struct cred *id_resolver_cache; | 57 | static const struct cred *id_resolver_cache; |
| 58 | static struct key_type key_type_id_resolver_legacy; | 58 | static struct key_type key_type_id_resolver_legacy; |
| 59 | 59 | ||
| 60 | struct idmap { | ||
| 61 | struct rpc_pipe *idmap_pipe; | ||
| 62 | struct key_construction *idmap_key_cons; | ||
| 63 | struct mutex idmap_mutex; | ||
| 64 | }; | ||
| 60 | 65 | ||
| 61 | /** | 66 | /** |
| 62 | * nfs_fattr_init_names - initialise the nfs_fattr owner_name/group_name fields | 67 | * nfs_fattr_init_names - initialise the nfs_fattr owner_name/group_name fields |
| @@ -310,9 +315,11 @@ static ssize_t nfs_idmap_get_key(const char *name, size_t namelen, | |||
| 310 | name, namelen, type, data, | 315 | name, namelen, type, data, |
| 311 | data_size, NULL); | 316 | data_size, NULL); |
| 312 | if (ret < 0) { | 317 | if (ret < 0) { |
| 318 | mutex_lock(&idmap->idmap_mutex); | ||
| 313 | ret = nfs_idmap_request_key(&key_type_id_resolver_legacy, | 319 | ret = nfs_idmap_request_key(&key_type_id_resolver_legacy, |
| 314 | name, namelen, type, data, | 320 | name, namelen, type, data, |
| 315 | data_size, idmap); | 321 | data_size, idmap); |
| 322 | mutex_unlock(&idmap->idmap_mutex); | ||
| 316 | } | 323 | } |
| 317 | return ret; | 324 | return ret; |
| 318 | } | 325 | } |
| @@ -354,11 +361,6 @@ static int nfs_idmap_lookup_id(const char *name, size_t namelen, const char *typ | |||
| 354 | /* idmap classic begins here */ | 361 | /* idmap classic begins here */ |
| 355 | module_param(nfs_idmap_cache_timeout, int, 0644); | 362 | module_param(nfs_idmap_cache_timeout, int, 0644); |
| 356 | 363 | ||
| 357 | struct idmap { | ||
| 358 | struct rpc_pipe *idmap_pipe; | ||
| 359 | struct key_construction *idmap_key_cons; | ||
| 360 | }; | ||
| 361 | |||
| 362 | enum { | 364 | enum { |
| 363 | Opt_find_uid, Opt_find_gid, Opt_find_user, Opt_find_group, Opt_find_err | 365 | Opt_find_uid, Opt_find_gid, Opt_find_user, Opt_find_group, Opt_find_err |
| 364 | }; | 366 | }; |
| @@ -469,6 +471,7 @@ nfs_idmap_new(struct nfs_client *clp) | |||
| 469 | return error; | 471 | return error; |
| 470 | } | 472 | } |
| 471 | idmap->idmap_pipe = pipe; | 473 | idmap->idmap_pipe = pipe; |
| 474 | mutex_init(&idmap->idmap_mutex); | ||
| 472 | 475 | ||
| 473 | clp->cl_idmap = idmap; | 476 | clp->cl_idmap = idmap; |
| 474 | return 0; | 477 | return 0; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e605d695dbcb..f7296983eba6 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
| @@ -1530,7 +1530,6 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi) | |||
| 1530 | nfsi->delegation_state = 0; | 1530 | nfsi->delegation_state = 0; |
| 1531 | init_rwsem(&nfsi->rwsem); | 1531 | init_rwsem(&nfsi->rwsem); |
| 1532 | nfsi->layout = NULL; | 1532 | nfsi->layout = NULL; |
| 1533 | atomic_set(&nfsi->commit_info.rpcs_out, 0); | ||
| 1534 | #endif | 1533 | #endif |
| 1535 | } | 1534 | } |
| 1536 | 1535 | ||
| @@ -1545,6 +1544,7 @@ static void init_once(void *foo) | |||
| 1545 | INIT_LIST_HEAD(&nfsi->commit_info.list); | 1544 | INIT_LIST_HEAD(&nfsi->commit_info.list); |
| 1546 | nfsi->npages = 0; | 1545 | nfsi->npages = 0; |
| 1547 | nfsi->commit_info.ncommit = 0; | 1546 | nfsi->commit_info.ncommit = 0; |
| 1547 | atomic_set(&nfsi->commit_info.rpcs_out, 0); | ||
| 1548 | atomic_set(&nfsi->silly_count, 1); | 1548 | atomic_set(&nfsi->silly_count, 1); |
| 1549 | INIT_HLIST_HEAD(&nfsi->silly_list); | 1549 | INIT_HLIST_HEAD(&nfsi->silly_list); |
| 1550 | init_waitqueue_head(&nfsi->waitqueue); | 1550 | init_waitqueue_head(&nfsi->waitqueue); |
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index b8323aa7b543..bbc49caa7a82 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
| @@ -70,6 +70,10 @@ find_pnfs_driver(u32 id) | |||
| 70 | 70 | ||
| 71 | spin_lock(&pnfs_spinlock); | 71 | spin_lock(&pnfs_spinlock); |
| 72 | local = find_pnfs_driver_locked(id); | 72 | local = find_pnfs_driver_locked(id); |
| 73 | if (local != NULL && !try_module_get(local->owner)) { | ||
| 74 | dprintk("%s: Could not grab reference on module\n", __func__); | ||
| 75 | local = NULL; | ||
| 76 | } | ||
| 73 | spin_unlock(&pnfs_spinlock); | 77 | spin_unlock(&pnfs_spinlock); |
| 74 | return local; | 78 | return local; |
| 75 | } | 79 | } |
| @@ -80,6 +84,9 @@ unset_pnfs_layoutdriver(struct nfs_server *nfss) | |||
| 80 | if (nfss->pnfs_curr_ld) { | 84 | if (nfss->pnfs_curr_ld) { |
| 81 | if (nfss->pnfs_curr_ld->clear_layoutdriver) | 85 | if (nfss->pnfs_curr_ld->clear_layoutdriver) |
| 82 | nfss->pnfs_curr_ld->clear_layoutdriver(nfss); | 86 | nfss->pnfs_curr_ld->clear_layoutdriver(nfss); |
| 87 | /* Decrement the MDS count. Purge the deviceid cache if zero */ | ||
| 88 | if (atomic_dec_and_test(&nfss->nfs_client->cl_mds_count)) | ||
| 89 | nfs4_deviceid_purge_client(nfss->nfs_client); | ||
| 83 | module_put(nfss->pnfs_curr_ld->owner); | 90 | module_put(nfss->pnfs_curr_ld->owner); |
| 84 | } | 91 | } |
| 85 | nfss->pnfs_curr_ld = NULL; | 92 | nfss->pnfs_curr_ld = NULL; |
| @@ -115,10 +122,6 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh, | |||
| 115 | goto out_no_driver; | 122 | goto out_no_driver; |
| 116 | } | 123 | } |
| 117 | } | 124 | } |
| 118 | if (!try_module_get(ld_type->owner)) { | ||
| 119 | dprintk("%s: Could not grab reference on module\n", __func__); | ||
| 120 | goto out_no_driver; | ||
| 121 | } | ||
| 122 | server->pnfs_curr_ld = ld_type; | 125 | server->pnfs_curr_ld = ld_type; |
| 123 | if (ld_type->set_layoutdriver | 126 | if (ld_type->set_layoutdriver |
| 124 | && ld_type->set_layoutdriver(server, mntfh)) { | 127 | && ld_type->set_layoutdriver(server, mntfh)) { |
| @@ -127,6 +130,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh, | |||
| 127 | module_put(ld_type->owner); | 130 | module_put(ld_type->owner); |
| 128 | goto out_no_driver; | 131 | goto out_no_driver; |
| 129 | } | 132 | } |
| 133 | /* Bump the MDS count */ | ||
| 134 | atomic_inc(&server->nfs_client->cl_mds_count); | ||
| 130 | 135 | ||
| 131 | dprintk("%s: pNFS module for %u set\n", __func__, id); | 136 | dprintk("%s: pNFS module for %u set\n", __func__, id); |
| 132 | return; | 137 | return; |
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index 08a07a218d26..57ceaf33d177 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c | |||
| @@ -191,6 +191,8 @@ void nilfs_remove_all_gcinodes(struct the_nilfs *nilfs) | |||
| 191 | while (!list_empty(head)) { | 191 | while (!list_empty(head)) { |
| 192 | ii = list_first_entry(head, struct nilfs_inode_info, i_dirty); | 192 | ii = list_first_entry(head, struct nilfs_inode_info, i_dirty); |
| 193 | list_del_init(&ii->i_dirty); | 193 | list_del_init(&ii->i_dirty); |
| 194 | truncate_inode_pages(&ii->vfs_inode.i_data, 0); | ||
| 195 | nilfs_btnode_cache_clear(&ii->i_btnode_cache); | ||
| 194 | iput(&ii->vfs_inode); | 196 | iput(&ii->vfs_inode); |
| 195 | } | 197 | } |
| 196 | } | 198 | } |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 0e72ad6f22aa..88e11fb346b6 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
| @@ -2309,6 +2309,8 @@ nilfs_remove_written_gcinodes(struct the_nilfs *nilfs, struct list_head *head) | |||
| 2309 | if (!test_bit(NILFS_I_UPDATED, &ii->i_state)) | 2309 | if (!test_bit(NILFS_I_UPDATED, &ii->i_state)) |
| 2310 | continue; | 2310 | continue; |
| 2311 | list_del_init(&ii->i_dirty); | 2311 | list_del_init(&ii->i_dirty); |
| 2312 | truncate_inode_pages(&ii->vfs_inode.i_data, 0); | ||
| 2313 | nilfs_btnode_cache_clear(&ii->i_btnode_cache); | ||
| 2312 | iput(&ii->vfs_inode); | 2314 | iput(&ii->vfs_inode); |
| 2313 | } | 2315 | } |
| 2314 | } | 2316 | } |
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index aeb19e68e086..11a2aa2a56c4 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c | |||
| @@ -258,7 +258,7 @@ fail: | |||
| 258 | return rc; | 258 | return rc; |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | int pstore_fill_super(struct super_block *sb, void *data, int silent) | 261 | static int pstore_fill_super(struct super_block *sb, void *data, int silent) |
| 262 | { | 262 | { |
| 263 | struct inode *inode; | 263 | struct inode *inode; |
| 264 | 264 | ||
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 82c585f715e3..03ce7a9b81cc 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c | |||
| @@ -94,20 +94,15 @@ static const char *get_reason_str(enum kmsg_dump_reason reason) | |||
| 94 | * as we can from the end of the buffer. | 94 | * as we can from the end of the buffer. |
| 95 | */ | 95 | */ |
| 96 | static void pstore_dump(struct kmsg_dumper *dumper, | 96 | static void pstore_dump(struct kmsg_dumper *dumper, |
| 97 | enum kmsg_dump_reason reason, | 97 | enum kmsg_dump_reason reason) |
| 98 | const char *s1, unsigned long l1, | ||
| 99 | const char *s2, unsigned long l2) | ||
| 100 | { | 98 | { |
| 101 | unsigned long s1_start, s2_start; | 99 | unsigned long total = 0; |
| 102 | unsigned long l1_cpy, l2_cpy; | ||
| 103 | unsigned long size, total = 0; | ||
| 104 | char *dst; | ||
| 105 | const char *why; | 100 | const char *why; |
| 106 | u64 id; | 101 | u64 id; |
| 107 | int hsize, ret; | ||
| 108 | unsigned int part = 1; | 102 | unsigned int part = 1; |
| 109 | unsigned long flags = 0; | 103 | unsigned long flags = 0; |
| 110 | int is_locked = 0; | 104 | int is_locked = 0; |
| 105 | int ret; | ||
| 111 | 106 | ||
| 112 | why = get_reason_str(reason); | 107 | why = get_reason_str(reason); |
| 113 | 108 | ||
| @@ -119,30 +114,25 @@ static void pstore_dump(struct kmsg_dumper *dumper, | |||
| 119 | spin_lock_irqsave(&psinfo->buf_lock, flags); | 114 | spin_lock_irqsave(&psinfo->buf_lock, flags); |
| 120 | oopscount++; | 115 | oopscount++; |
| 121 | while (total < kmsg_bytes) { | 116 | while (total < kmsg_bytes) { |
| 117 | char *dst; | ||
| 118 | unsigned long size; | ||
| 119 | int hsize; | ||
| 120 | size_t len; | ||
| 121 | |||
| 122 | dst = psinfo->buf; | 122 | dst = psinfo->buf; |
| 123 | hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, part); | 123 | hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, part); |
| 124 | size = psinfo->bufsize - hsize; | 124 | size = psinfo->bufsize - hsize; |
| 125 | dst += hsize; | 125 | dst += hsize; |
| 126 | 126 | ||
| 127 | l2_cpy = min(l2, size); | 127 | if (!kmsg_dump_get_buffer(dumper, true, dst, size, &len)) |
| 128 | l1_cpy = min(l1, size - l2_cpy); | ||
| 129 | |||
| 130 | if (l1_cpy + l2_cpy == 0) | ||
| 131 | break; | 128 | break; |
| 132 | 129 | ||
| 133 | s2_start = l2 - l2_cpy; | ||
| 134 | s1_start = l1 - l1_cpy; | ||
| 135 | |||
| 136 | memcpy(dst, s1 + s1_start, l1_cpy); | ||
| 137 | memcpy(dst + l1_cpy, s2 + s2_start, l2_cpy); | ||
| 138 | |||
| 139 | ret = psinfo->write(PSTORE_TYPE_DMESG, reason, &id, part, | 130 | ret = psinfo->write(PSTORE_TYPE_DMESG, reason, &id, part, |
| 140 | hsize + l1_cpy + l2_cpy, psinfo); | 131 | hsize + len, psinfo); |
| 141 | if (ret == 0 && reason == KMSG_DUMP_OOPS && pstore_is_mounted()) | 132 | if (ret == 0 && reason == KMSG_DUMP_OOPS && pstore_is_mounted()) |
| 142 | pstore_new_entry = 1; | 133 | pstore_new_entry = 1; |
| 143 | l1 -= l1_cpy; | 134 | |
| 144 | l2 -= l2_cpy; | 135 | total += hsize + len; |
| 145 | total += l1_cpy + l2_cpy; | ||
| 146 | part++; | 136 | part++; |
| 147 | } | 137 | } |
| 148 | if (in_nmi()) { | 138 | if (in_nmi()) { |
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 9123cce28c1e..453030f9c5bc 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c | |||
| @@ -106,6 +106,8 @@ static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type, | |||
| 106 | time->tv_sec = 0; | 106 | time->tv_sec = 0; |
| 107 | time->tv_nsec = 0; | 107 | time->tv_nsec = 0; |
| 108 | 108 | ||
| 109 | /* Update old/shadowed buffer. */ | ||
| 110 | persistent_ram_save_old(prz); | ||
| 109 | size = persistent_ram_old_size(prz); | 111 | size = persistent_ram_old_size(prz); |
| 110 | *buf = kmalloc(size, GFP_KERNEL); | 112 | *buf = kmalloc(size, GFP_KERNEL); |
| 111 | if (*buf == NULL) | 113 | if (*buf == NULL) |
| @@ -184,6 +186,7 @@ static int ramoops_pstore_erase(enum pstore_type_id type, u64 id, | |||
| 184 | return -EINVAL; | 186 | return -EINVAL; |
| 185 | 187 | ||
| 186 | persistent_ram_free_old(cxt->przs[id]); | 188 | persistent_ram_free_old(cxt->przs[id]); |
| 189 | persistent_ram_zap(cxt->przs[id]); | ||
| 187 | 190 | ||
| 188 | return 0; | 191 | return 0; |
| 189 | } | 192 | } |
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 31f8d184f3a0..c5fbdbbf81ac 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c | |||
| @@ -250,23 +250,24 @@ static void notrace persistent_ram_update(struct persistent_ram_zone *prz, | |||
| 250 | persistent_ram_update_ecc(prz, start, count); | 250 | persistent_ram_update_ecc(prz, start, count); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | static void __init | 253 | void persistent_ram_save_old(struct persistent_ram_zone *prz) |
| 254 | persistent_ram_save_old(struct persistent_ram_zone *prz) | ||
| 255 | { | 254 | { |
| 256 | struct persistent_ram_buffer *buffer = prz->buffer; | 255 | struct persistent_ram_buffer *buffer = prz->buffer; |
| 257 | size_t size = buffer_size(prz); | 256 | size_t size = buffer_size(prz); |
| 258 | size_t start = buffer_start(prz); | 257 | size_t start = buffer_start(prz); |
| 259 | char *dest; | ||
| 260 | 258 | ||
| 261 | persistent_ram_ecc_old(prz); | 259 | if (!size) |
| 260 | return; | ||
| 262 | 261 | ||
| 263 | dest = kmalloc(size, GFP_KERNEL); | 262 | if (!prz->old_log) { |
| 264 | if (dest == NULL) { | 263 | persistent_ram_ecc_old(prz); |
| 264 | prz->old_log = kmalloc(size, GFP_KERNEL); | ||
| 265 | } | ||
| 266 | if (!prz->old_log) { | ||
| 265 | pr_err("persistent_ram: failed to allocate buffer\n"); | 267 | pr_err("persistent_ram: failed to allocate buffer\n"); |
| 266 | return; | 268 | return; |
| 267 | } | 269 | } |
| 268 | 270 | ||
| 269 | prz->old_log = dest; | ||
| 270 | prz->old_log_size = size; | 271 | prz->old_log_size = size; |
| 271 | memcpy(prz->old_log, &buffer->data[start], size - start); | 272 | memcpy(prz->old_log, &buffer->data[start], size - start); |
| 272 | memcpy(prz->old_log + size - start, &buffer->data[0], start); | 273 | memcpy(prz->old_log + size - start, &buffer->data[0], start); |
| @@ -319,6 +320,13 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz) | |||
| 319 | prz->old_log_size = 0; | 320 | prz->old_log_size = 0; |
| 320 | } | 321 | } |
| 321 | 322 | ||
| 323 | void persistent_ram_zap(struct persistent_ram_zone *prz) | ||
| 324 | { | ||
| 325 | atomic_set(&prz->buffer->start, 0); | ||
| 326 | atomic_set(&prz->buffer->size, 0); | ||
| 327 | persistent_ram_update_header_ecc(prz); | ||
| 328 | } | ||
| 329 | |||
| 322 | static void *persistent_ram_vmap(phys_addr_t start, size_t size) | 330 | static void *persistent_ram_vmap(phys_addr_t start, size_t size) |
| 323 | { | 331 | { |
| 324 | struct page **pages; | 332 | struct page **pages; |
| @@ -405,6 +413,7 @@ static int __init persistent_ram_post_init(struct persistent_ram_zone *prz, bool | |||
| 405 | " size %zu, start %zu\n", | 413 | " size %zu, start %zu\n", |
| 406 | buffer_size(prz), buffer_start(prz)); | 414 | buffer_size(prz), buffer_start(prz)); |
| 407 | persistent_ram_save_old(prz); | 415 | persistent_ram_save_old(prz); |
| 416 | return 0; | ||
| 408 | } | 417 | } |
| 409 | } else { | 418 | } else { |
| 410 | pr_info("persistent_ram: no valid data in buffer" | 419 | pr_info("persistent_ram: no valid data in buffer" |
| @@ -412,8 +421,7 @@ static int __init persistent_ram_post_init(struct persistent_ram_zone *prz, bool | |||
| 412 | } | 421 | } |
| 413 | 422 | ||
| 414 | prz->buffer->sig = PERSISTENT_RAM_SIG; | 423 | prz->buffer->sig = PERSISTENT_RAM_SIG; |
| 415 | atomic_set(&prz->buffer->start, 0); | 424 | persistent_ram_zap(prz); |
| 416 | atomic_set(&prz->buffer->size, 0); | ||
| 417 | 425 | ||
| 418 | return 0; | 426 | return 0; |
| 419 | } | 427 | } |
| @@ -448,7 +456,6 @@ struct persistent_ram_zone * __init persistent_ram_new(phys_addr_t start, | |||
| 448 | goto err; | 456 | goto err; |
| 449 | 457 | ||
| 450 | persistent_ram_post_init(prz, ecc); | 458 | persistent_ram_post_init(prz, ecc); |
| 451 | persistent_ram_update_header_ecc(prz); | ||
| 452 | 459 | ||
| 453 | return prz; | 460 | return prz; |
| 454 | err: | 461 | err: |
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 229641fb8e67..9d1aeb7e2734 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
| @@ -1080,6 +1080,7 @@ restart: | |||
| 1080 | goto restart; | 1080 | goto restart; |
| 1081 | } | 1081 | } |
| 1082 | 1082 | ||
| 1083 | xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); | ||
| 1083 | trace_xfs_alloc_size_neither(args); | 1084 | trace_xfs_alloc_size_neither(args); |
| 1084 | args->agbno = NULLAGBLOCK; | 1085 | args->agbno = NULLAGBLOCK; |
| 1085 | return 0; | 1086 | return 0; |
| @@ -2441,7 +2442,7 @@ xfs_alloc_vextent( | |||
| 2441 | DECLARE_COMPLETION_ONSTACK(done); | 2442 | DECLARE_COMPLETION_ONSTACK(done); |
| 2442 | 2443 | ||
| 2443 | args->done = &done; | 2444 | args->done = &done; |
| 2444 | INIT_WORK(&args->work, xfs_alloc_vextent_worker); | 2445 | INIT_WORK_ONSTACK(&args->work, xfs_alloc_vextent_worker); |
| 2445 | queue_work(xfs_alloc_wq, &args->work); | 2446 | queue_work(xfs_alloc_wq, &args->work); |
| 2446 | wait_for_completion(&done); | 2447 | wait_for_completion(&done); |
| 2447 | return args->result; | 2448 | return args->result; |
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index ae31c313a79e..8dad722c0041 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
| @@ -981,10 +981,15 @@ xfs_vm_writepage( | |||
| 981 | imap_valid = 0; | 981 | imap_valid = 0; |
| 982 | } | 982 | } |
| 983 | } else { | 983 | } else { |
| 984 | if (PageUptodate(page)) { | 984 | if (PageUptodate(page)) |
| 985 | ASSERT(buffer_mapped(bh)); | 985 | ASSERT(buffer_mapped(bh)); |
| 986 | imap_valid = 0; | 986 | /* |
| 987 | } | 987 | * This buffer is not uptodate and will not be |
| 988 | * written to disk. Ensure that we will put any | ||
| 989 | * subsequent writeable buffers into a new | ||
| 990 | * ioend. | ||
| 991 | */ | ||
| 992 | imap_valid = 0; | ||
| 988 | continue; | 993 | continue; |
| 989 | } | 994 | } |
| 990 | 995 | ||
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 172d3cc8f8cb..a4beb421018a 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
| @@ -201,14 +201,7 @@ xfs_buf_alloc( | |||
| 201 | bp->b_length = numblks; | 201 | bp->b_length = numblks; |
| 202 | bp->b_io_length = numblks; | 202 | bp->b_io_length = numblks; |
| 203 | bp->b_flags = flags; | 203 | bp->b_flags = flags; |
| 204 | 204 | bp->b_bn = blkno; | |
| 205 | /* | ||
| 206 | * We do not set the block number here in the buffer because we have not | ||
| 207 | * finished initialising the buffer. We insert the buffer into the cache | ||
| 208 | * in this state, so this ensures that we are unable to do IO on a | ||
| 209 | * buffer that hasn't been fully initialised. | ||
| 210 | */ | ||
| 211 | bp->b_bn = XFS_BUF_DADDR_NULL; | ||
| 212 | atomic_set(&bp->b_pin_count, 0); | 205 | atomic_set(&bp->b_pin_count, 0); |
| 213 | init_waitqueue_head(&bp->b_waiters); | 206 | init_waitqueue_head(&bp->b_waiters); |
| 214 | 207 | ||
| @@ -567,11 +560,6 @@ xfs_buf_get( | |||
| 567 | if (bp != new_bp) | 560 | if (bp != new_bp) |
| 568 | xfs_buf_free(new_bp); | 561 | xfs_buf_free(new_bp); |
| 569 | 562 | ||
| 570 | /* | ||
| 571 | * Now we have a workable buffer, fill in the block number so | ||
| 572 | * that we can do IO on it. | ||
| 573 | */ | ||
| 574 | bp->b_bn = blkno; | ||
| 575 | bp->b_io_length = bp->b_length; | 563 | bp->b_io_length = bp->b_length; |
| 576 | 564 | ||
| 577 | found: | 565 | found: |
| @@ -772,7 +760,7 @@ xfs_buf_get_uncached( | |||
| 772 | int error, i; | 760 | int error, i; |
| 773 | xfs_buf_t *bp; | 761 | xfs_buf_t *bp; |
| 774 | 762 | ||
| 775 | bp = xfs_buf_alloc(target, 0, numblks, 0); | 763 | bp = xfs_buf_alloc(target, XFS_BUF_DADDR_NULL, numblks, 0); |
| 776 | if (unlikely(bp == NULL)) | 764 | if (unlikely(bp == NULL)) |
| 777 | goto fail; | 765 | goto fail; |
| 778 | 766 | ||
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 6cdbf90c6f7b..d041d47d9d86 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
| @@ -505,6 +505,14 @@ xfs_inode_item_push( | |||
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | /* | 507 | /* |
| 508 | * Stale inode items should force out the iclog. | ||
| 509 | */ | ||
| 510 | if (ip->i_flags & XFS_ISTALE) { | ||
| 511 | rval = XFS_ITEM_PINNED; | ||
| 512 | goto out_unlock; | ||
| 513 | } | ||
| 514 | |||
| 515 | /* | ||
| 508 | * Someone else is already flushing the inode. Nothing we can do | 516 | * Someone else is already flushing the inode. Nothing we can do |
| 509 | * here but wait for the flush to finish and remove the item from | 517 | * here but wait for the flush to finish and remove the item from |
| 510 | * the AIL. | 518 | * the AIL. |
| @@ -514,15 +522,6 @@ xfs_inode_item_push( | |||
| 514 | goto out_unlock; | 522 | goto out_unlock; |
| 515 | } | 523 | } |
| 516 | 524 | ||
| 517 | /* | ||
| 518 | * Stale inode items should force out the iclog. | ||
| 519 | */ | ||
| 520 | if (ip->i_flags & XFS_ISTALE) { | ||
| 521 | xfs_ifunlock(ip); | ||
| 522 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | ||
| 523 | return XFS_ITEM_PINNED; | ||
| 524 | } | ||
| 525 | |||
| 526 | ASSERT(iip->ili_fields != 0 || XFS_FORCED_SHUTDOWN(ip->i_mount)); | 525 | ASSERT(iip->ili_fields != 0 || XFS_FORCED_SHUTDOWN(ip->i_mount)); |
| 527 | ASSERT(iip->ili_logged == 0 || XFS_FORCED_SHUTDOWN(ip->i_mount)); | 526 | ASSERT(iip->ili_logged == 0 || XFS_FORCED_SHUTDOWN(ip->i_mount)); |
| 528 | 527 | ||
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index f30d9807dc48..d90d4a388609 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
| @@ -38,13 +38,21 @@ | |||
| 38 | kmem_zone_t *xfs_log_ticket_zone; | 38 | kmem_zone_t *xfs_log_ticket_zone; |
| 39 | 39 | ||
| 40 | /* Local miscellaneous function prototypes */ | 40 | /* Local miscellaneous function prototypes */ |
| 41 | STATIC int xlog_commit_record(struct log *log, struct xlog_ticket *ticket, | 41 | STATIC int |
| 42 | xlog_in_core_t **, xfs_lsn_t *); | 42 | xlog_commit_record( |
| 43 | struct xlog *log, | ||
| 44 | struct xlog_ticket *ticket, | ||
| 45 | struct xlog_in_core **iclog, | ||
| 46 | xfs_lsn_t *commitlsnp); | ||
| 47 | |||
| 43 | STATIC xlog_t * xlog_alloc_log(xfs_mount_t *mp, | 48 | STATIC xlog_t * xlog_alloc_log(xfs_mount_t *mp, |
| 44 | xfs_buftarg_t *log_target, | 49 | xfs_buftarg_t *log_target, |
| 45 | xfs_daddr_t blk_offset, | 50 | xfs_daddr_t blk_offset, |
| 46 | int num_bblks); | 51 | int num_bblks); |
| 47 | STATIC int xlog_space_left(struct log *log, atomic64_t *head); | 52 | STATIC int |
| 53 | xlog_space_left( | ||
| 54 | struct xlog *log, | ||
| 55 | atomic64_t *head); | ||
| 48 | STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog); | 56 | STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog); |
| 49 | STATIC void xlog_dealloc_log(xlog_t *log); | 57 | STATIC void xlog_dealloc_log(xlog_t *log); |
| 50 | 58 | ||
| @@ -64,8 +72,10 @@ STATIC void xlog_state_switch_iclogs(xlog_t *log, | |||
| 64 | int eventual_size); | 72 | int eventual_size); |
| 65 | STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog); | 73 | STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog); |
| 66 | 74 | ||
| 67 | STATIC void xlog_grant_push_ail(struct log *log, | 75 | STATIC void |
| 68 | int need_bytes); | 76 | xlog_grant_push_ail( |
| 77 | struct xlog *log, | ||
| 78 | int need_bytes); | ||
| 69 | STATIC void xlog_regrant_reserve_log_space(xlog_t *log, | 79 | STATIC void xlog_regrant_reserve_log_space(xlog_t *log, |
| 70 | xlog_ticket_t *ticket); | 80 | xlog_ticket_t *ticket); |
| 71 | STATIC void xlog_ungrant_log_space(xlog_t *log, | 81 | STATIC void xlog_ungrant_log_space(xlog_t *log, |
| @@ -73,7 +83,9 @@ STATIC void xlog_ungrant_log_space(xlog_t *log, | |||
| 73 | 83 | ||
| 74 | #if defined(DEBUG) | 84 | #if defined(DEBUG) |
| 75 | STATIC void xlog_verify_dest_ptr(xlog_t *log, char *ptr); | 85 | STATIC void xlog_verify_dest_ptr(xlog_t *log, char *ptr); |
| 76 | STATIC void xlog_verify_grant_tail(struct log *log); | 86 | STATIC void |
| 87 | xlog_verify_grant_tail( | ||
| 88 | struct xlog *log); | ||
| 77 | STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog, | 89 | STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog, |
| 78 | int count, boolean_t syncing); | 90 | int count, boolean_t syncing); |
| 79 | STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog, | 91 | STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog, |
| @@ -89,9 +101,9 @@ STATIC int xlog_iclogs_empty(xlog_t *log); | |||
| 89 | 101 | ||
| 90 | static void | 102 | static void |
| 91 | xlog_grant_sub_space( | 103 | xlog_grant_sub_space( |
| 92 | struct log *log, | 104 | struct xlog *log, |
| 93 | atomic64_t *head, | 105 | atomic64_t *head, |
| 94 | int bytes) | 106 | int bytes) |
| 95 | { | 107 | { |
| 96 | int64_t head_val = atomic64_read(head); | 108 | int64_t head_val = atomic64_read(head); |
| 97 | int64_t new, old; | 109 | int64_t new, old; |
| @@ -115,9 +127,9 @@ xlog_grant_sub_space( | |||
| 115 | 127 | ||
| 116 | static void | 128 | static void |
| 117 | xlog_grant_add_space( | 129 | xlog_grant_add_space( |
| 118 | struct log *log, | 130 | struct xlog *log, |
| 119 | atomic64_t *head, | 131 | atomic64_t *head, |
| 120 | int bytes) | 132 | int bytes) |
| 121 | { | 133 | { |
| 122 | int64_t head_val = atomic64_read(head); | 134 | int64_t head_val = atomic64_read(head); |
| 123 | int64_t new, old; | 135 | int64_t new, old; |
| @@ -165,7 +177,7 @@ xlog_grant_head_wake_all( | |||
| 165 | 177 | ||
| 166 | static inline int | 178 | static inline int |
| 167 | xlog_ticket_reservation( | 179 | xlog_ticket_reservation( |
| 168 | struct log *log, | 180 | struct xlog *log, |
| 169 | struct xlog_grant_head *head, | 181 | struct xlog_grant_head *head, |
| 170 | struct xlog_ticket *tic) | 182 | struct xlog_ticket *tic) |
| 171 | { | 183 | { |
| @@ -182,7 +194,7 @@ xlog_ticket_reservation( | |||
| 182 | 194 | ||
| 183 | STATIC bool | 195 | STATIC bool |
| 184 | xlog_grant_head_wake( | 196 | xlog_grant_head_wake( |
| 185 | struct log *log, | 197 | struct xlog *log, |
| 186 | struct xlog_grant_head *head, | 198 | struct xlog_grant_head *head, |
| 187 | int *free_bytes) | 199 | int *free_bytes) |
| 188 | { | 200 | { |
| @@ -204,7 +216,7 @@ xlog_grant_head_wake( | |||
| 204 | 216 | ||
| 205 | STATIC int | 217 | STATIC int |
| 206 | xlog_grant_head_wait( | 218 | xlog_grant_head_wait( |
| 207 | struct log *log, | 219 | struct xlog *log, |
| 208 | struct xlog_grant_head *head, | 220 | struct xlog_grant_head *head, |
| 209 | struct xlog_ticket *tic, | 221 | struct xlog_ticket *tic, |
| 210 | int need_bytes) | 222 | int need_bytes) |
| @@ -256,7 +268,7 @@ shutdown: | |||
| 256 | */ | 268 | */ |
| 257 | STATIC int | 269 | STATIC int |
| 258 | xlog_grant_head_check( | 270 | xlog_grant_head_check( |
| 259 | struct log *log, | 271 | struct xlog *log, |
| 260 | struct xlog_grant_head *head, | 272 | struct xlog_grant_head *head, |
| 261 | struct xlog_ticket *tic, | 273 | struct xlog_ticket *tic, |
| 262 | int *need_bytes) | 274 | int *need_bytes) |
| @@ -323,7 +335,7 @@ xfs_log_regrant( | |||
| 323 | struct xfs_mount *mp, | 335 | struct xfs_mount *mp, |
| 324 | struct xlog_ticket *tic) | 336 | struct xlog_ticket *tic) |
| 325 | { | 337 | { |
| 326 | struct log *log = mp->m_log; | 338 | struct xlog *log = mp->m_log; |
| 327 | int need_bytes; | 339 | int need_bytes; |
| 328 | int error = 0; | 340 | int error = 0; |
| 329 | 341 | ||
| @@ -389,7 +401,7 @@ xfs_log_reserve( | |||
| 389 | bool permanent, | 401 | bool permanent, |
| 390 | uint t_type) | 402 | uint t_type) |
| 391 | { | 403 | { |
| 392 | struct log *log = mp->m_log; | 404 | struct xlog *log = mp->m_log; |
| 393 | struct xlog_ticket *tic; | 405 | struct xlog_ticket *tic; |
| 394 | int need_bytes; | 406 | int need_bytes; |
| 395 | int error = 0; | 407 | int error = 0; |
| @@ -465,7 +477,7 @@ xfs_log_done( | |||
| 465 | struct xlog_in_core **iclog, | 477 | struct xlog_in_core **iclog, |
| 466 | uint flags) | 478 | uint flags) |
| 467 | { | 479 | { |
| 468 | struct log *log = mp->m_log; | 480 | struct xlog *log = mp->m_log; |
| 469 | xfs_lsn_t lsn = 0; | 481 | xfs_lsn_t lsn = 0; |
| 470 | 482 | ||
| 471 | if (XLOG_FORCED_SHUTDOWN(log) || | 483 | if (XLOG_FORCED_SHUTDOWN(log) || |
| @@ -810,6 +822,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) | |||
| 810 | void | 822 | void |
| 811 | xfs_log_unmount(xfs_mount_t *mp) | 823 | xfs_log_unmount(xfs_mount_t *mp) |
| 812 | { | 824 | { |
| 825 | cancel_delayed_work_sync(&mp->m_sync_work); | ||
| 813 | xfs_trans_ail_destroy(mp); | 826 | xfs_trans_ail_destroy(mp); |
| 814 | xlog_dealloc_log(mp->m_log); | 827 | xlog_dealloc_log(mp->m_log); |
| 815 | } | 828 | } |
| @@ -838,7 +851,7 @@ void | |||
| 838 | xfs_log_space_wake( | 851 | xfs_log_space_wake( |
| 839 | struct xfs_mount *mp) | 852 | struct xfs_mount *mp) |
| 840 | { | 853 | { |
| 841 | struct log *log = mp->m_log; | 854 | struct xlog *log = mp->m_log; |
| 842 | int free_bytes; | 855 | int free_bytes; |
| 843 | 856 | ||
| 844 | if (XLOG_FORCED_SHUTDOWN(log)) | 857 | if (XLOG_FORCED_SHUTDOWN(log)) |
| @@ -916,7 +929,7 @@ xfs_lsn_t | |||
| 916 | xlog_assign_tail_lsn_locked( | 929 | xlog_assign_tail_lsn_locked( |
| 917 | struct xfs_mount *mp) | 930 | struct xfs_mount *mp) |
| 918 | { | 931 | { |
| 919 | struct log *log = mp->m_log; | 932 | struct xlog *log = mp->m_log; |
| 920 | struct xfs_log_item *lip; | 933 | struct xfs_log_item *lip; |
| 921 | xfs_lsn_t tail_lsn; | 934 | xfs_lsn_t tail_lsn; |
| 922 | 935 | ||
| @@ -965,7 +978,7 @@ xlog_assign_tail_lsn( | |||
| 965 | */ | 978 | */ |
| 966 | STATIC int | 979 | STATIC int |
| 967 | xlog_space_left( | 980 | xlog_space_left( |
| 968 | struct log *log, | 981 | struct xlog *log, |
| 969 | atomic64_t *head) | 982 | atomic64_t *head) |
| 970 | { | 983 | { |
| 971 | int free_bytes; | 984 | int free_bytes; |
| @@ -1277,7 +1290,7 @@ out: | |||
| 1277 | */ | 1290 | */ |
| 1278 | STATIC int | 1291 | STATIC int |
| 1279 | xlog_commit_record( | 1292 | xlog_commit_record( |
| 1280 | struct log *log, | 1293 | struct xlog *log, |
| 1281 | struct xlog_ticket *ticket, | 1294 | struct xlog_ticket *ticket, |
| 1282 | struct xlog_in_core **iclog, | 1295 | struct xlog_in_core **iclog, |
| 1283 | xfs_lsn_t *commitlsnp) | 1296 | xfs_lsn_t *commitlsnp) |
| @@ -1311,7 +1324,7 @@ xlog_commit_record( | |||
| 1311 | */ | 1324 | */ |
| 1312 | STATIC void | 1325 | STATIC void |
| 1313 | xlog_grant_push_ail( | 1326 | xlog_grant_push_ail( |
| 1314 | struct log *log, | 1327 | struct xlog *log, |
| 1315 | int need_bytes) | 1328 | int need_bytes) |
| 1316 | { | 1329 | { |
| 1317 | xfs_lsn_t threshold_lsn = 0; | 1330 | xfs_lsn_t threshold_lsn = 0; |
| @@ -1790,7 +1803,7 @@ xlog_write_start_rec( | |||
| 1790 | 1803 | ||
| 1791 | static xlog_op_header_t * | 1804 | static xlog_op_header_t * |
| 1792 | xlog_write_setup_ophdr( | 1805 | xlog_write_setup_ophdr( |
| 1793 | struct log *log, | 1806 | struct xlog *log, |
| 1794 | struct xlog_op_header *ophdr, | 1807 | struct xlog_op_header *ophdr, |
| 1795 | struct xlog_ticket *ticket, | 1808 | struct xlog_ticket *ticket, |
| 1796 | uint flags) | 1809 | uint flags) |
| @@ -1873,7 +1886,7 @@ xlog_write_setup_copy( | |||
| 1873 | 1886 | ||
| 1874 | static int | 1887 | static int |
| 1875 | xlog_write_copy_finish( | 1888 | xlog_write_copy_finish( |
| 1876 | struct log *log, | 1889 | struct xlog *log, |
| 1877 | struct xlog_in_core *iclog, | 1890 | struct xlog_in_core *iclog, |
| 1878 | uint flags, | 1891 | uint flags, |
| 1879 | int *record_cnt, | 1892 | int *record_cnt, |
| @@ -1958,7 +1971,7 @@ xlog_write_copy_finish( | |||
| 1958 | */ | 1971 | */ |
| 1959 | int | 1972 | int |
| 1960 | xlog_write( | 1973 | xlog_write( |
| 1961 | struct log *log, | 1974 | struct xlog *log, |
| 1962 | struct xfs_log_vec *log_vector, | 1975 | struct xfs_log_vec *log_vector, |
| 1963 | struct xlog_ticket *ticket, | 1976 | struct xlog_ticket *ticket, |
| 1964 | xfs_lsn_t *start_lsn, | 1977 | xfs_lsn_t *start_lsn, |
| @@ -2821,7 +2834,7 @@ _xfs_log_force( | |||
| 2821 | uint flags, | 2834 | uint flags, |
| 2822 | int *log_flushed) | 2835 | int *log_flushed) |
| 2823 | { | 2836 | { |
| 2824 | struct log *log = mp->m_log; | 2837 | struct xlog *log = mp->m_log; |
| 2825 | struct xlog_in_core *iclog; | 2838 | struct xlog_in_core *iclog; |
| 2826 | xfs_lsn_t lsn; | 2839 | xfs_lsn_t lsn; |
| 2827 | 2840 | ||
| @@ -2969,7 +2982,7 @@ _xfs_log_force_lsn( | |||
| 2969 | uint flags, | 2982 | uint flags, |
| 2970 | int *log_flushed) | 2983 | int *log_flushed) |
| 2971 | { | 2984 | { |
| 2972 | struct log *log = mp->m_log; | 2985 | struct xlog *log = mp->m_log; |
| 2973 | struct xlog_in_core *iclog; | 2986 | struct xlog_in_core *iclog; |
| 2974 | int already_slept = 0; | 2987 | int already_slept = 0; |
| 2975 | 2988 | ||
| @@ -3147,7 +3160,7 @@ xfs_log_ticket_get( | |||
| 3147 | */ | 3160 | */ |
| 3148 | xlog_ticket_t * | 3161 | xlog_ticket_t * |
| 3149 | xlog_ticket_alloc( | 3162 | xlog_ticket_alloc( |
| 3150 | struct log *log, | 3163 | struct xlog *log, |
| 3151 | int unit_bytes, | 3164 | int unit_bytes, |
| 3152 | int cnt, | 3165 | int cnt, |
| 3153 | char client, | 3166 | char client, |
| @@ -3278,7 +3291,7 @@ xlog_ticket_alloc( | |||
| 3278 | */ | 3291 | */ |
| 3279 | void | 3292 | void |
| 3280 | xlog_verify_dest_ptr( | 3293 | xlog_verify_dest_ptr( |
| 3281 | struct log *log, | 3294 | struct xlog *log, |
| 3282 | char *ptr) | 3295 | char *ptr) |
| 3283 | { | 3296 | { |
| 3284 | int i; | 3297 | int i; |
| @@ -3307,7 +3320,7 @@ xlog_verify_dest_ptr( | |||
| 3307 | */ | 3320 | */ |
| 3308 | STATIC void | 3321 | STATIC void |
| 3309 | xlog_verify_grant_tail( | 3322 | xlog_verify_grant_tail( |
| 3310 | struct log *log) | 3323 | struct xlog *log) |
| 3311 | { | 3324 | { |
| 3312 | int tail_cycle, tail_blocks; | 3325 | int tail_cycle, tail_blocks; |
| 3313 | int cycle, space; | 3326 | int cycle, space; |
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index 7d6197c58493..ddc4529d07d3 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | */ | 44 | */ |
| 45 | static struct xlog_ticket * | 45 | static struct xlog_ticket * |
| 46 | xlog_cil_ticket_alloc( | 46 | xlog_cil_ticket_alloc( |
| 47 | struct log *log) | 47 | struct xlog *log) |
| 48 | { | 48 | { |
| 49 | struct xlog_ticket *tic; | 49 | struct xlog_ticket *tic; |
| 50 | 50 | ||
| @@ -72,7 +72,7 @@ xlog_cil_ticket_alloc( | |||
| 72 | */ | 72 | */ |
| 73 | void | 73 | void |
| 74 | xlog_cil_init_post_recovery( | 74 | xlog_cil_init_post_recovery( |
| 75 | struct log *log) | 75 | struct xlog *log) |
| 76 | { | 76 | { |
| 77 | log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log); | 77 | log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log); |
| 78 | log->l_cilp->xc_ctx->sequence = 1; | 78 | log->l_cilp->xc_ctx->sequence = 1; |
| @@ -182,7 +182,7 @@ xlog_cil_prepare_log_vecs( | |||
| 182 | */ | 182 | */ |
| 183 | STATIC void | 183 | STATIC void |
| 184 | xfs_cil_prepare_item( | 184 | xfs_cil_prepare_item( |
| 185 | struct log *log, | 185 | struct xlog *log, |
| 186 | struct xfs_log_vec *lv, | 186 | struct xfs_log_vec *lv, |
| 187 | int *len, | 187 | int *len, |
| 188 | int *diff_iovecs) | 188 | int *diff_iovecs) |
| @@ -231,7 +231,7 @@ xfs_cil_prepare_item( | |||
| 231 | */ | 231 | */ |
| 232 | static void | 232 | static void |
| 233 | xlog_cil_insert_items( | 233 | xlog_cil_insert_items( |
| 234 | struct log *log, | 234 | struct xlog *log, |
| 235 | struct xfs_log_vec *log_vector, | 235 | struct xfs_log_vec *log_vector, |
| 236 | struct xlog_ticket *ticket) | 236 | struct xlog_ticket *ticket) |
| 237 | { | 237 | { |
| @@ -373,7 +373,7 @@ xlog_cil_committed( | |||
| 373 | */ | 373 | */ |
| 374 | STATIC int | 374 | STATIC int |
| 375 | xlog_cil_push( | 375 | xlog_cil_push( |
| 376 | struct log *log) | 376 | struct xlog *log) |
| 377 | { | 377 | { |
| 378 | struct xfs_cil *cil = log->l_cilp; | 378 | struct xfs_cil *cil = log->l_cilp; |
| 379 | struct xfs_log_vec *lv; | 379 | struct xfs_log_vec *lv; |
| @@ -601,7 +601,7 @@ xlog_cil_push_work( | |||
| 601 | */ | 601 | */ |
| 602 | static void | 602 | static void |
| 603 | xlog_cil_push_background( | 603 | xlog_cil_push_background( |
| 604 | struct log *log) | 604 | struct xlog *log) |
| 605 | { | 605 | { |
| 606 | struct xfs_cil *cil = log->l_cilp; | 606 | struct xfs_cil *cil = log->l_cilp; |
| 607 | 607 | ||
| @@ -629,7 +629,7 @@ xlog_cil_push_background( | |||
| 629 | 629 | ||
| 630 | static void | 630 | static void |
| 631 | xlog_cil_push_foreground( | 631 | xlog_cil_push_foreground( |
| 632 | struct log *log, | 632 | struct xlog *log, |
| 633 | xfs_lsn_t push_seq) | 633 | xfs_lsn_t push_seq) |
| 634 | { | 634 | { |
| 635 | struct xfs_cil *cil = log->l_cilp; | 635 | struct xfs_cil *cil = log->l_cilp; |
| @@ -683,7 +683,7 @@ xfs_log_commit_cil( | |||
| 683 | xfs_lsn_t *commit_lsn, | 683 | xfs_lsn_t *commit_lsn, |
| 684 | int flags) | 684 | int flags) |
| 685 | { | 685 | { |
| 686 | struct log *log = mp->m_log; | 686 | struct xlog *log = mp->m_log; |
| 687 | int log_flags = 0; | 687 | int log_flags = 0; |
| 688 | struct xfs_log_vec *log_vector; | 688 | struct xfs_log_vec *log_vector; |
| 689 | 689 | ||
| @@ -754,7 +754,7 @@ xfs_log_commit_cil( | |||
| 754 | */ | 754 | */ |
| 755 | xfs_lsn_t | 755 | xfs_lsn_t |
| 756 | xlog_cil_force_lsn( | 756 | xlog_cil_force_lsn( |
| 757 | struct log *log, | 757 | struct xlog *log, |
| 758 | xfs_lsn_t sequence) | 758 | xfs_lsn_t sequence) |
| 759 | { | 759 | { |
| 760 | struct xfs_cil *cil = log->l_cilp; | 760 | struct xfs_cil *cil = log->l_cilp; |
| @@ -833,7 +833,7 @@ xfs_log_item_in_current_chkpt( | |||
| 833 | */ | 833 | */ |
| 834 | int | 834 | int |
| 835 | xlog_cil_init( | 835 | xlog_cil_init( |
| 836 | struct log *log) | 836 | struct xlog *log) |
| 837 | { | 837 | { |
| 838 | struct xfs_cil *cil; | 838 | struct xfs_cil *cil; |
| 839 | struct xfs_cil_ctx *ctx; | 839 | struct xfs_cil_ctx *ctx; |
| @@ -869,7 +869,7 @@ xlog_cil_init( | |||
| 869 | 869 | ||
| 870 | void | 870 | void |
| 871 | xlog_cil_destroy( | 871 | xlog_cil_destroy( |
| 872 | struct log *log) | 872 | struct xlog *log) |
| 873 | { | 873 | { |
| 874 | if (log->l_cilp->xc_ctx) { | 874 | if (log->l_cilp->xc_ctx) { |
| 875 | if (log->l_cilp->xc_ctx->ticket) | 875 | if (log->l_cilp->xc_ctx->ticket) |
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 5bc33261f5be..72eba2201b14 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | #define __XFS_LOG_PRIV_H__ | 19 | #define __XFS_LOG_PRIV_H__ |
| 20 | 20 | ||
| 21 | struct xfs_buf; | 21 | struct xfs_buf; |
| 22 | struct log; | 22 | struct xlog; |
| 23 | struct xlog_ticket; | 23 | struct xlog_ticket; |
| 24 | struct xfs_mount; | 24 | struct xfs_mount; |
| 25 | 25 | ||
| @@ -352,7 +352,7 @@ typedef struct xlog_in_core { | |||
| 352 | struct xlog_in_core *ic_next; | 352 | struct xlog_in_core *ic_next; |
| 353 | struct xlog_in_core *ic_prev; | 353 | struct xlog_in_core *ic_prev; |
| 354 | struct xfs_buf *ic_bp; | 354 | struct xfs_buf *ic_bp; |
| 355 | struct log *ic_log; | 355 | struct xlog *ic_log; |
| 356 | int ic_size; | 356 | int ic_size; |
| 357 | int ic_offset; | 357 | int ic_offset; |
| 358 | int ic_bwritecnt; | 358 | int ic_bwritecnt; |
| @@ -409,7 +409,7 @@ struct xfs_cil_ctx { | |||
| 409 | * operations almost as efficient as the old logging methods. | 409 | * operations almost as efficient as the old logging methods. |
| 410 | */ | 410 | */ |
| 411 | struct xfs_cil { | 411 | struct xfs_cil { |
| 412 | struct log *xc_log; | 412 | struct xlog *xc_log; |
| 413 | struct list_head xc_cil; | 413 | struct list_head xc_cil; |
| 414 | spinlock_t xc_cil_lock; | 414 | spinlock_t xc_cil_lock; |
| 415 | struct xfs_cil_ctx *xc_ctx; | 415 | struct xfs_cil_ctx *xc_ctx; |
| @@ -487,7 +487,7 @@ struct xlog_grant_head { | |||
| 487 | * overflow 31 bits worth of byte offset, so using a byte number will mean | 487 | * overflow 31 bits worth of byte offset, so using a byte number will mean |
| 488 | * that round off problems won't occur when releasing partial reservations. | 488 | * that round off problems won't occur when releasing partial reservations. |
| 489 | */ | 489 | */ |
| 490 | typedef struct log { | 490 | typedef struct xlog { |
| 491 | /* The following fields don't need locking */ | 491 | /* The following fields don't need locking */ |
| 492 | struct xfs_mount *l_mp; /* mount point */ | 492 | struct xfs_mount *l_mp; /* mount point */ |
| 493 | struct xfs_ail *l_ailp; /* AIL log is working with */ | 493 | struct xfs_ail *l_ailp; /* AIL log is working with */ |
| @@ -553,9 +553,14 @@ extern int xlog_recover_finish(xlog_t *log); | |||
| 553 | extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int); | 553 | extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int); |
| 554 | 554 | ||
| 555 | extern kmem_zone_t *xfs_log_ticket_zone; | 555 | extern kmem_zone_t *xfs_log_ticket_zone; |
| 556 | struct xlog_ticket *xlog_ticket_alloc(struct log *log, int unit_bytes, | 556 | struct xlog_ticket * |
| 557 | int count, char client, bool permanent, | 557 | xlog_ticket_alloc( |
| 558 | xfs_km_flags_t alloc_flags); | 558 | struct xlog *log, |
| 559 | int unit_bytes, | ||
| 560 | int count, | ||
| 561 | char client, | ||
| 562 | bool permanent, | ||
| 563 | xfs_km_flags_t alloc_flags); | ||
| 559 | 564 | ||
| 560 | 565 | ||
| 561 | static inline void | 566 | static inline void |
| @@ -567,9 +572,14 @@ xlog_write_adv_cnt(void **ptr, int *len, int *off, size_t bytes) | |||
| 567 | } | 572 | } |
| 568 | 573 | ||
| 569 | void xlog_print_tic_res(struct xfs_mount *mp, struct xlog_ticket *ticket); | 574 | void xlog_print_tic_res(struct xfs_mount *mp, struct xlog_ticket *ticket); |
| 570 | int xlog_write(struct log *log, struct xfs_log_vec *log_vector, | 575 | int |
| 571 | struct xlog_ticket *tic, xfs_lsn_t *start_lsn, | 576 | xlog_write( |
| 572 | xlog_in_core_t **commit_iclog, uint flags); | 577 | struct xlog *log, |
| 578 | struct xfs_log_vec *log_vector, | ||
| 579 | struct xlog_ticket *tic, | ||
| 580 | xfs_lsn_t *start_lsn, | ||
| 581 | struct xlog_in_core **commit_iclog, | ||
| 582 | uint flags); | ||
| 573 | 583 | ||
| 574 | /* | 584 | /* |
| 575 | * When we crack an atomic LSN, we sample it first so that the value will not | 585 | * When we crack an atomic LSN, we sample it first so that the value will not |
| @@ -629,17 +639,23 @@ xlog_assign_grant_head(atomic64_t *head, int cycle, int space) | |||
| 629 | /* | 639 | /* |
| 630 | * Committed Item List interfaces | 640 | * Committed Item List interfaces |
| 631 | */ | 641 | */ |
| 632 | int xlog_cil_init(struct log *log); | 642 | int |
| 633 | void xlog_cil_init_post_recovery(struct log *log); | 643 | xlog_cil_init(struct xlog *log); |
| 634 | void xlog_cil_destroy(struct log *log); | 644 | void |
| 645 | xlog_cil_init_post_recovery(struct xlog *log); | ||
| 646 | void | ||
| 647 | xlog_cil_destroy(struct xlog *log); | ||
| 635 | 648 | ||
| 636 | /* | 649 | /* |
| 637 | * CIL force routines | 650 | * CIL force routines |
| 638 | */ | 651 | */ |
| 639 | xfs_lsn_t xlog_cil_force_lsn(struct log *log, xfs_lsn_t sequence); | 652 | xfs_lsn_t |
| 653 | xlog_cil_force_lsn( | ||
| 654 | struct xlog *log, | ||
| 655 | xfs_lsn_t sequence); | ||
| 640 | 656 | ||
| 641 | static inline void | 657 | static inline void |
| 642 | xlog_cil_force(struct log *log) | 658 | xlog_cil_force(struct xlog *log) |
| 643 | { | 659 | { |
| 644 | xlog_cil_force_lsn(log, log->l_cilp->xc_current_sequence); | 660 | xlog_cil_force_lsn(log, log->l_cilp->xc_current_sequence); |
| 645 | } | 661 | } |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index ca386909131a..a7be98abd6a9 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
| @@ -1471,8 +1471,8 @@ xlog_recover_add_item( | |||
| 1471 | 1471 | ||
| 1472 | STATIC int | 1472 | STATIC int |
| 1473 | xlog_recover_add_to_cont_trans( | 1473 | xlog_recover_add_to_cont_trans( |
| 1474 | struct log *log, | 1474 | struct xlog *log, |
| 1475 | xlog_recover_t *trans, | 1475 | struct xlog_recover *trans, |
| 1476 | xfs_caddr_t dp, | 1476 | xfs_caddr_t dp, |
| 1477 | int len) | 1477 | int len) |
| 1478 | { | 1478 | { |
| @@ -1517,8 +1517,8 @@ xlog_recover_add_to_cont_trans( | |||
| 1517 | */ | 1517 | */ |
| 1518 | STATIC int | 1518 | STATIC int |
| 1519 | xlog_recover_add_to_trans( | 1519 | xlog_recover_add_to_trans( |
| 1520 | struct log *log, | 1520 | struct xlog *log, |
| 1521 | xlog_recover_t *trans, | 1521 | struct xlog_recover *trans, |
| 1522 | xfs_caddr_t dp, | 1522 | xfs_caddr_t dp, |
| 1523 | int len) | 1523 | int len) |
| 1524 | { | 1524 | { |
| @@ -1588,8 +1588,8 @@ xlog_recover_add_to_trans( | |||
| 1588 | */ | 1588 | */ |
| 1589 | STATIC int | 1589 | STATIC int |
| 1590 | xlog_recover_reorder_trans( | 1590 | xlog_recover_reorder_trans( |
| 1591 | struct log *log, | 1591 | struct xlog *log, |
| 1592 | xlog_recover_t *trans, | 1592 | struct xlog_recover *trans, |
| 1593 | int pass) | 1593 | int pass) |
| 1594 | { | 1594 | { |
| 1595 | xlog_recover_item_t *item, *n; | 1595 | xlog_recover_item_t *item, *n; |
| @@ -1642,8 +1642,8 @@ xlog_recover_reorder_trans( | |||
| 1642 | */ | 1642 | */ |
| 1643 | STATIC int | 1643 | STATIC int |
| 1644 | xlog_recover_buffer_pass1( | 1644 | xlog_recover_buffer_pass1( |
| 1645 | struct log *log, | 1645 | struct xlog *log, |
| 1646 | xlog_recover_item_t *item) | 1646 | struct xlog_recover_item *item) |
| 1647 | { | 1647 | { |
| 1648 | xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr; | 1648 | xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr; |
| 1649 | struct list_head *bucket; | 1649 | struct list_head *bucket; |
| @@ -1696,7 +1696,7 @@ xlog_recover_buffer_pass1( | |||
| 1696 | */ | 1696 | */ |
| 1697 | STATIC int | 1697 | STATIC int |
| 1698 | xlog_check_buffer_cancelled( | 1698 | xlog_check_buffer_cancelled( |
| 1699 | struct log *log, | 1699 | struct xlog *log, |
| 1700 | xfs_daddr_t blkno, | 1700 | xfs_daddr_t blkno, |
| 1701 | uint len, | 1701 | uint len, |
| 1702 | ushort flags) | 1702 | ushort flags) |
| @@ -2689,9 +2689,9 @@ xlog_recover_free_trans( | |||
| 2689 | 2689 | ||
| 2690 | STATIC int | 2690 | STATIC int |
| 2691 | xlog_recover_commit_pass1( | 2691 | xlog_recover_commit_pass1( |
| 2692 | struct log *log, | 2692 | struct xlog *log, |
| 2693 | struct xlog_recover *trans, | 2693 | struct xlog_recover *trans, |
| 2694 | xlog_recover_item_t *item) | 2694 | struct xlog_recover_item *item) |
| 2695 | { | 2695 | { |
| 2696 | trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS1); | 2696 | trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS1); |
| 2697 | 2697 | ||
| @@ -2716,10 +2716,10 @@ xlog_recover_commit_pass1( | |||
| 2716 | 2716 | ||
| 2717 | STATIC int | 2717 | STATIC int |
| 2718 | xlog_recover_commit_pass2( | 2718 | xlog_recover_commit_pass2( |
| 2719 | struct log *log, | 2719 | struct xlog *log, |
| 2720 | struct xlog_recover *trans, | 2720 | struct xlog_recover *trans, |
| 2721 | struct list_head *buffer_list, | 2721 | struct list_head *buffer_list, |
| 2722 | xlog_recover_item_t *item) | 2722 | struct xlog_recover_item *item) |
| 2723 | { | 2723 | { |
| 2724 | trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS2); | 2724 | trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS2); |
| 2725 | 2725 | ||
| @@ -2753,7 +2753,7 @@ xlog_recover_commit_pass2( | |||
| 2753 | */ | 2753 | */ |
| 2754 | STATIC int | 2754 | STATIC int |
| 2755 | xlog_recover_commit_trans( | 2755 | xlog_recover_commit_trans( |
| 2756 | struct log *log, | 2756 | struct xlog *log, |
| 2757 | struct xlog_recover *trans, | 2757 | struct xlog_recover *trans, |
| 2758 | int pass) | 2758 | int pass) |
| 2759 | { | 2759 | { |
| @@ -2793,8 +2793,8 @@ out: | |||
| 2793 | 2793 | ||
| 2794 | STATIC int | 2794 | STATIC int |
| 2795 | xlog_recover_unmount_trans( | 2795 | xlog_recover_unmount_trans( |
| 2796 | struct log *log, | 2796 | struct xlog *log, |
| 2797 | xlog_recover_t *trans) | 2797 | struct xlog_recover *trans) |
| 2798 | { | 2798 | { |
| 2799 | /* Do nothing now */ | 2799 | /* Do nothing now */ |
| 2800 | xfs_warn(log->l_mp, "%s: Unmount LR", __func__); | 2800 | xfs_warn(log->l_mp, "%s: Unmount LR", __func__); |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 8b89c5ac72d9..90c1fc9eaea4 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
| @@ -53,7 +53,7 @@ typedef struct xfs_trans_reservations { | |||
| 53 | 53 | ||
| 54 | #include "xfs_sync.h" | 54 | #include "xfs_sync.h" |
| 55 | 55 | ||
| 56 | struct log; | 56 | struct xlog; |
| 57 | struct xfs_mount_args; | 57 | struct xfs_mount_args; |
| 58 | struct xfs_inode; | 58 | struct xfs_inode; |
| 59 | struct xfs_bmbt_irec; | 59 | struct xfs_bmbt_irec; |
| @@ -133,7 +133,7 @@ typedef struct xfs_mount { | |||
| 133 | uint m_readio_blocks; /* min read size blocks */ | 133 | uint m_readio_blocks; /* min read size blocks */ |
| 134 | uint m_writeio_log; /* min write size log bytes */ | 134 | uint m_writeio_log; /* min write size log bytes */ |
| 135 | uint m_writeio_blocks; /* min write size blocks */ | 135 | uint m_writeio_blocks; /* min write size blocks */ |
| 136 | struct log *m_log; /* log specific stuff */ | 136 | struct xlog *m_log; /* log specific stuff */ |
| 137 | int m_logbufs; /* number of log buffers */ | 137 | int m_logbufs; /* number of log buffers */ |
| 138 | int m_logbsize; /* size of each log buffer */ | 138 | int m_logbsize; /* size of each log buffer */ |
| 139 | uint m_rsumlevels; /* rt summary levels */ | 139 | uint m_rsumlevels; /* rt summary levels */ |
diff --git a/fs/xfs/xfs_sync.c b/fs/xfs/xfs_sync.c index c9d3409c5ca3..1e9ee064dbb2 100644 --- a/fs/xfs/xfs_sync.c +++ b/fs/xfs/xfs_sync.c | |||
| @@ -386,23 +386,23 @@ xfs_sync_worker( | |||
| 386 | * We shouldn't write/force the log if we are in the mount/unmount | 386 | * We shouldn't write/force the log if we are in the mount/unmount |
| 387 | * process or on a read only filesystem. The workqueue still needs to be | 387 | * process or on a read only filesystem. The workqueue still needs to be |
| 388 | * active in both cases, however, because it is used for inode reclaim | 388 | * active in both cases, however, because it is used for inode reclaim |
| 389 | * during these times. Use the s_umount semaphore to provide exclusion | 389 | * during these times. Use the MS_ACTIVE flag to avoid doing anything |
| 390 | * with unmount. | 390 | * during mount. Doing work during unmount is avoided by calling |
| 391 | * cancel_delayed_work_sync on this work queue before tearing down | ||
| 392 | * the ail and the log in xfs_log_unmount. | ||
| 391 | */ | 393 | */ |
| 392 | if (down_read_trylock(&mp->m_super->s_umount)) { | 394 | if (!(mp->m_super->s_flags & MS_ACTIVE) && |
| 393 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { | 395 | !(mp->m_flags & XFS_MOUNT_RDONLY)) { |
| 394 | /* dgc: errors ignored here */ | 396 | /* dgc: errors ignored here */ |
| 395 | if (mp->m_super->s_frozen == SB_UNFROZEN && | 397 | if (mp->m_super->s_frozen == SB_UNFROZEN && |
| 396 | xfs_log_need_covered(mp)) | 398 | xfs_log_need_covered(mp)) |
| 397 | error = xfs_fs_log_dummy(mp); | 399 | error = xfs_fs_log_dummy(mp); |
| 398 | else | 400 | else |
| 399 | xfs_log_force(mp, 0); | 401 | xfs_log_force(mp, 0); |
| 400 | 402 | ||
| 401 | /* start pushing all the metadata that is currently | 403 | /* start pushing all the metadata that is currently |
| 402 | * dirty */ | 404 | * dirty */ |
| 403 | xfs_ail_push_all(mp->m_ail); | 405 | xfs_ail_push_all(mp->m_ail); |
| 404 | } | ||
| 405 | up_read(&mp->m_super->s_umount); | ||
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | /* queue us up again */ | 408 | /* queue us up again */ |
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 7cf9d3529e51..caf5dabfd553 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
| @@ -32,7 +32,7 @@ struct xfs_da_node_entry; | |||
| 32 | struct xfs_dquot; | 32 | struct xfs_dquot; |
| 33 | struct xfs_log_item; | 33 | struct xfs_log_item; |
| 34 | struct xlog_ticket; | 34 | struct xlog_ticket; |
| 35 | struct log; | 35 | struct xlog; |
| 36 | struct xlog_recover; | 36 | struct xlog_recover; |
| 37 | struct xlog_recover_item; | 37 | struct xlog_recover_item; |
| 38 | struct xfs_buf_log_format; | 38 | struct xfs_buf_log_format; |
| @@ -762,7 +762,7 @@ DEFINE_DQUOT_EVENT(xfs_dqflush_force); | |||
| 762 | DEFINE_DQUOT_EVENT(xfs_dqflush_done); | 762 | DEFINE_DQUOT_EVENT(xfs_dqflush_done); |
| 763 | 763 | ||
| 764 | DECLARE_EVENT_CLASS(xfs_loggrant_class, | 764 | DECLARE_EVENT_CLASS(xfs_loggrant_class, |
| 765 | TP_PROTO(struct log *log, struct xlog_ticket *tic), | 765 | TP_PROTO(struct xlog *log, struct xlog_ticket *tic), |
| 766 | TP_ARGS(log, tic), | 766 | TP_ARGS(log, tic), |
| 767 | TP_STRUCT__entry( | 767 | TP_STRUCT__entry( |
| 768 | __field(dev_t, dev) | 768 | __field(dev_t, dev) |
| @@ -830,7 +830,7 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class, | |||
| 830 | 830 | ||
| 831 | #define DEFINE_LOGGRANT_EVENT(name) \ | 831 | #define DEFINE_LOGGRANT_EVENT(name) \ |
| 832 | DEFINE_EVENT(xfs_loggrant_class, name, \ | 832 | DEFINE_EVENT(xfs_loggrant_class, name, \ |
| 833 | TP_PROTO(struct log *log, struct xlog_ticket *tic), \ | 833 | TP_PROTO(struct xlog *log, struct xlog_ticket *tic), \ |
| 834 | TP_ARGS(log, tic)) | 834 | TP_ARGS(log, tic)) |
| 835 | DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm); | 835 | DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm); |
| 836 | DEFINE_LOGGRANT_EVENT(xfs_log_done_perm); | 836 | DEFINE_LOGGRANT_EVENT(xfs_log_done_perm); |
| @@ -1664,7 +1664,7 @@ DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); | |||
| 1664 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); | 1664 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); |
| 1665 | 1665 | ||
| 1666 | DECLARE_EVENT_CLASS(xfs_log_recover_item_class, | 1666 | DECLARE_EVENT_CLASS(xfs_log_recover_item_class, |
| 1667 | TP_PROTO(struct log *log, struct xlog_recover *trans, | 1667 | TP_PROTO(struct xlog *log, struct xlog_recover *trans, |
| 1668 | struct xlog_recover_item *item, int pass), | 1668 | struct xlog_recover_item *item, int pass), |
| 1669 | TP_ARGS(log, trans, item, pass), | 1669 | TP_ARGS(log, trans, item, pass), |
| 1670 | TP_STRUCT__entry( | 1670 | TP_STRUCT__entry( |
| @@ -1698,7 +1698,7 @@ DECLARE_EVENT_CLASS(xfs_log_recover_item_class, | |||
| 1698 | 1698 | ||
| 1699 | #define DEFINE_LOG_RECOVER_ITEM(name) \ | 1699 | #define DEFINE_LOG_RECOVER_ITEM(name) \ |
| 1700 | DEFINE_EVENT(xfs_log_recover_item_class, name, \ | 1700 | DEFINE_EVENT(xfs_log_recover_item_class, name, \ |
| 1701 | TP_PROTO(struct log *log, struct xlog_recover *trans, \ | 1701 | TP_PROTO(struct xlog *log, struct xlog_recover *trans, \ |
| 1702 | struct xlog_recover_item *item, int pass), \ | 1702 | struct xlog_recover_item *item, int pass), \ |
| 1703 | TP_ARGS(log, trans, item, pass)) | 1703 | TP_ARGS(log, trans, item, pass)) |
| 1704 | 1704 | ||
| @@ -1709,7 +1709,7 @@ DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail); | |||
| 1709 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover); | 1709 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover); |
| 1710 | 1710 | ||
| 1711 | DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class, | 1711 | DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class, |
| 1712 | TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), | 1712 | TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f), |
| 1713 | TP_ARGS(log, buf_f), | 1713 | TP_ARGS(log, buf_f), |
| 1714 | TP_STRUCT__entry( | 1714 | TP_STRUCT__entry( |
| 1715 | __field(dev_t, dev) | 1715 | __field(dev_t, dev) |
| @@ -1739,7 +1739,7 @@ DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class, | |||
| 1739 | 1739 | ||
| 1740 | #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \ | 1740 | #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \ |
| 1741 | DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \ | 1741 | DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \ |
| 1742 | TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), \ | 1742 | TP_PROTO(struct xlog *log, struct xfs_buf_log_format *buf_f), \ |
| 1743 | TP_ARGS(log, buf_f)) | 1743 | TP_ARGS(log, buf_f)) |
| 1744 | 1744 | ||
| 1745 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel); | 1745 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel); |
| @@ -1752,7 +1752,7 @@ DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf); | |||
| 1752 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf); | 1752 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf); |
| 1753 | 1753 | ||
| 1754 | DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class, | 1754 | DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class, |
| 1755 | TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), | 1755 | TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f), |
| 1756 | TP_ARGS(log, in_f), | 1756 | TP_ARGS(log, in_f), |
| 1757 | TP_STRUCT__entry( | 1757 | TP_STRUCT__entry( |
| 1758 | __field(dev_t, dev) | 1758 | __field(dev_t, dev) |
| @@ -1790,7 +1790,7 @@ DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class, | |||
| 1790 | ) | 1790 | ) |
| 1791 | #define DEFINE_LOG_RECOVER_INO_ITEM(name) \ | 1791 | #define DEFINE_LOG_RECOVER_INO_ITEM(name) \ |
| 1792 | DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \ | 1792 | DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \ |
| 1793 | TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), \ | 1793 | TP_PROTO(struct xlog *log, struct xfs_inode_log_format *in_f), \ |
| 1794 | TP_ARGS(log, in_f)) | 1794 | TP_ARGS(log, in_f)) |
| 1795 | 1795 | ||
| 1796 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover); | 1796 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover); |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 6f2b45a9b6bc..ff4947b7a976 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
| @@ -484,6 +484,16 @@ static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t *pmd) | |||
| 484 | /* | 484 | /* |
| 485 | * The barrier will stabilize the pmdval in a register or on | 485 | * The barrier will stabilize the pmdval in a register or on |
| 486 | * the stack so that it will stop changing under the code. | 486 | * the stack so that it will stop changing under the code. |
| 487 | * | ||
| 488 | * When CONFIG_TRANSPARENT_HUGEPAGE=y on x86 32bit PAE, | ||
| 489 | * pmd_read_atomic is allowed to return a not atomic pmdval | ||
| 490 | * (for example pointing to an hugepage that has never been | ||
| 491 | * mapped in the pmd). The below checks will only care about | ||
| 492 | * the low part of the pmd with 32bit PAE x86 anyway, with the | ||
| 493 | * exception of pmd_none(). So the important thing is that if | ||
| 494 | * the low part of the pmd is found null, the high part will | ||
| 495 | * be also null or the pmd_none() check below would be | ||
| 496 | * confused. | ||
| 487 | */ | 497 | */ |
| 488 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 498 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 489 | barrier(); | 499 | barrier(); |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index e5834aa24b9e..6a6d7aefe12d 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -47,9 +47,9 @@ | |||
| 47 | */ | 47 | */ |
| 48 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ | 48 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ |
| 49 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) | 49 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) |
| 50 | # define inline inline __attribute__((always_inline)) | 50 | # define inline inline __attribute__((always_inline)) notrace |
| 51 | # define __inline__ __inline__ __attribute__((always_inline)) | 51 | # define __inline__ __inline__ __attribute__((always_inline)) notrace |
| 52 | # define __inline __inline __attribute__((always_inline)) | 52 | # define __inline __inline __attribute__((always_inline)) notrace |
| 53 | #else | 53 | #else |
| 54 | /* A lot of inline functions can cause havoc with function tracing */ | 54 | /* A lot of inline functions can cause havoc with function tracing */ |
| 55 | # define inline inline notrace | 55 | # define inline inline notrace |
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h index 35f7237ec972..d6bd50110ec2 100644 --- a/include/linux/kmsg_dump.h +++ b/include/linux/kmsg_dump.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | * is passed to the kernel. | 21 | * is passed to the kernel. |
| 22 | */ | 22 | */ |
| 23 | enum kmsg_dump_reason { | 23 | enum kmsg_dump_reason { |
| 24 | KMSG_DUMP_UNDEF, | ||
| 24 | KMSG_DUMP_PANIC, | 25 | KMSG_DUMP_PANIC, |
| 25 | KMSG_DUMP_OOPS, | 26 | KMSG_DUMP_OOPS, |
| 26 | KMSG_DUMP_EMERG, | 27 | KMSG_DUMP_EMERG, |
| @@ -31,23 +32,37 @@ enum kmsg_dump_reason { | |||
| 31 | 32 | ||
| 32 | /** | 33 | /** |
| 33 | * struct kmsg_dumper - kernel crash message dumper structure | 34 | * struct kmsg_dumper - kernel crash message dumper structure |
| 34 | * @dump: The callback which gets called on crashes. The buffer is passed | ||
| 35 | * as two sections, where s1 (length l1) contains the older | ||
| 36 | * messages and s2 (length l2) contains the newer. | ||
| 37 | * @list: Entry in the dumper list (private) | 35 | * @list: Entry in the dumper list (private) |
| 36 | * @dump: Call into dumping code which will retrieve the data with | ||
| 37 | * through the record iterator | ||
| 38 | * @max_reason: filter for highest reason number that should be dumped | ||
| 38 | * @registered: Flag that specifies if this is already registered | 39 | * @registered: Flag that specifies if this is already registered |
| 39 | */ | 40 | */ |
| 40 | struct kmsg_dumper { | 41 | struct kmsg_dumper { |
| 41 | void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason, | ||
| 42 | const char *s1, unsigned long l1, | ||
| 43 | const char *s2, unsigned long l2); | ||
| 44 | struct list_head list; | 42 | struct list_head list; |
| 45 | int registered; | 43 | void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); |
| 44 | enum kmsg_dump_reason max_reason; | ||
| 45 | bool active; | ||
| 46 | bool registered; | ||
| 47 | |||
| 48 | /* private state of the kmsg iterator */ | ||
| 49 | u32 cur_idx; | ||
| 50 | u32 next_idx; | ||
| 51 | u64 cur_seq; | ||
| 52 | u64 next_seq; | ||
| 46 | }; | 53 | }; |
| 47 | 54 | ||
| 48 | #ifdef CONFIG_PRINTK | 55 | #ifdef CONFIG_PRINTK |
| 49 | void kmsg_dump(enum kmsg_dump_reason reason); | 56 | void kmsg_dump(enum kmsg_dump_reason reason); |
| 50 | 57 | ||
| 58 | bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, | ||
| 59 | char *line, size_t size, size_t *len); | ||
| 60 | |||
| 61 | bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, | ||
| 62 | char *buf, size_t size, size_t *len); | ||
| 63 | |||
| 64 | void kmsg_dump_rewind(struct kmsg_dumper *dumper); | ||
| 65 | |||
| 51 | int kmsg_dump_register(struct kmsg_dumper *dumper); | 66 | int kmsg_dump_register(struct kmsg_dumper *dumper); |
| 52 | 67 | ||
| 53 | int kmsg_dump_unregister(struct kmsg_dumper *dumper); | 68 | int kmsg_dump_unregister(struct kmsg_dumper *dumper); |
| @@ -56,6 +71,22 @@ static inline void kmsg_dump(enum kmsg_dump_reason reason) | |||
| 56 | { | 71 | { |
| 57 | } | 72 | } |
| 58 | 73 | ||
| 74 | static inline bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, | ||
| 75 | const char *line, size_t size, size_t *len) | ||
| 76 | { | ||
| 77 | return false; | ||
| 78 | } | ||
| 79 | |||
| 80 | static inline bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, | ||
| 81 | char *buf, size_t size, size_t *len) | ||
| 82 | { | ||
| 83 | return false; | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline void kmsg_dump_rewind(struct kmsg_dumper *dumper) | ||
| 87 | { | ||
| 88 | } | ||
| 89 | |||
| 59 | static inline int kmsg_dump_register(struct kmsg_dumper *dumper) | 90 | static inline int kmsg_dump_register(struct kmsg_dumper *dumper) |
| 60 | { | 91 | { |
| 61 | return -EINVAL; | 92 | return -EINVAL; |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index dad95bdd06d7..704a626d94a0 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -57,8 +57,18 @@ struct page { | |||
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | union { | 59 | union { |
| 60 | #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \ | ||
| 61 | defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE) | ||
| 60 | /* Used for cmpxchg_double in slub */ | 62 | /* Used for cmpxchg_double in slub */ |
| 61 | unsigned long counters; | 63 | unsigned long counters; |
| 64 | #else | ||
| 65 | /* | ||
| 66 | * Keep _count separate from slub cmpxchg_double data. | ||
| 67 | * As the rest of the double word is protected by | ||
| 68 | * slab_lock but _count is not. | ||
| 69 | */ | ||
| 70 | unsigned counters; | ||
| 71 | #endif | ||
| 62 | 72 | ||
| 63 | struct { | 73 | struct { |
| 64 | 74 | ||
diff --git a/include/linux/mmc/sdhci-spear.h b/include/linux/mmc/sdhci-spear.h index 5cdc96da9dd5..e78c0e236e9d 100644 --- a/include/linux/mmc/sdhci-spear.h +++ b/include/linux/mmc/sdhci-spear.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * SDHCI declarations specific to ST SPEAr platform | 4 | * SDHCI declarations specific to ST SPEAr platform |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2010 ST Microelectronics | 6 | * Copyright (C) 2010 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index fbb78fb09bd2..f58325a1d8fb 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -25,6 +25,7 @@ struct nfs41_impl_id; | |||
| 25 | */ | 25 | */ |
| 26 | struct nfs_client { | 26 | struct nfs_client { |
| 27 | atomic_t cl_count; | 27 | atomic_t cl_count; |
| 28 | atomic_t cl_mds_count; | ||
| 28 | int cl_cons_state; /* current construction state (-ve: init error) */ | 29 | int cl_cons_state; /* current construction state (-ve: init error) */ |
| 29 | #define NFS_CS_READY 0 /* ready to be used */ | 30 | #define NFS_CS_READY 0 /* ready to be used */ |
| 30 | #define NFS_CS_INITING 1 /* busy initialising */ | 31 | #define NFS_CS_INITING 1 /* busy initialising */ |
diff --git a/include/linux/pata_arasan_cf_data.h b/include/linux/pata_arasan_cf_data.h index a6ee9aa898bb..a7b4fc386e63 100644 --- a/include/linux/pata_arasan_cf_data.h +++ b/include/linux/pata_arasan_cf_data.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Arasan Compact Flash host controller platform data header file | 4 | * Arasan Compact Flash host controller platform data header file |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2011 ST Microelectronics | 6 | * Copyright (C) 2011 ST Microelectronics |
| 7 | * Viresh Kumar <viresh.kumar@st.com> | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
| 8 | * | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public | 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any | 10 | * License version 2. This program is licensed "as is" without any |
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 7ed7fd4dba49..3b823d49a85a 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h | |||
| @@ -69,12 +69,14 @@ struct persistent_ram_zone * __init persistent_ram_new(phys_addr_t start, | |||
| 69 | size_t size, | 69 | size_t size, |
| 70 | bool ecc); | 70 | bool ecc); |
| 71 | void persistent_ram_free(struct persistent_ram_zone *prz); | 71 | void persistent_ram_free(struct persistent_ram_zone *prz); |
| 72 | void persistent_ram_zap(struct persistent_ram_zone *prz); | ||
| 72 | struct persistent_ram_zone *persistent_ram_init_ringbuffer(struct device *dev, | 73 | struct persistent_ram_zone *persistent_ram_init_ringbuffer(struct device *dev, |
| 73 | bool ecc); | 74 | bool ecc); |
| 74 | 75 | ||
| 75 | int persistent_ram_write(struct persistent_ram_zone *prz, const void *s, | 76 | int persistent_ram_write(struct persistent_ram_zone *prz, const void *s, |
| 76 | unsigned int count); | 77 | unsigned int count); |
| 77 | 78 | ||
| 79 | void persistent_ram_save_old(struct persistent_ram_zone *prz); | ||
| 78 | size_t persistent_ram_old_size(struct persistent_ram_zone *prz); | 80 | size_t persistent_ram_old_size(struct persistent_ram_zone *prz); |
| 79 | void *persistent_ram_old(struct persistent_ram_zone *prz); | 81 | void *persistent_ram_old(struct persistent_ram_zone *prz); |
| 80 | void persistent_ram_free_old(struct persistent_ram_zone *prz); | 82 | void persistent_ram_free_old(struct persistent_ram_zone *prz); |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 72fcd3069a90..2097684cf194 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -255,12 +255,17 @@ int cgroup_lock_is_held(void) | |||
| 255 | 255 | ||
| 256 | EXPORT_SYMBOL_GPL(cgroup_lock_is_held); | 256 | EXPORT_SYMBOL_GPL(cgroup_lock_is_held); |
| 257 | 257 | ||
| 258 | static int css_unbias_refcnt(int refcnt) | ||
| 259 | { | ||
| 260 | return refcnt >= 0 ? refcnt : refcnt - CSS_DEACT_BIAS; | ||
| 261 | } | ||
| 262 | |||
| 258 | /* the current nr of refs, always >= 0 whether @css is deactivated or not */ | 263 | /* the current nr of refs, always >= 0 whether @css is deactivated or not */ |
| 259 | static int css_refcnt(struct cgroup_subsys_state *css) | 264 | static int css_refcnt(struct cgroup_subsys_state *css) |
| 260 | { | 265 | { |
| 261 | int v = atomic_read(&css->refcnt); | 266 | int v = atomic_read(&css->refcnt); |
| 262 | 267 | ||
| 263 | return v >= 0 ? v : v - CSS_DEACT_BIAS; | 268 | return css_unbias_refcnt(v); |
| 264 | } | 269 | } |
| 265 | 270 | ||
| 266 | /* convenient tests for these bits */ | 271 | /* convenient tests for these bits */ |
| @@ -4982,10 +4987,12 @@ EXPORT_SYMBOL_GPL(__css_tryget); | |||
| 4982 | void __css_put(struct cgroup_subsys_state *css) | 4987 | void __css_put(struct cgroup_subsys_state *css) |
| 4983 | { | 4988 | { |
| 4984 | struct cgroup *cgrp = css->cgroup; | 4989 | struct cgroup *cgrp = css->cgroup; |
| 4990 | int v; | ||
| 4985 | 4991 | ||
| 4986 | rcu_read_lock(); | 4992 | rcu_read_lock(); |
| 4987 | atomic_dec(&css->refcnt); | 4993 | v = css_unbias_refcnt(atomic_dec_return(&css->refcnt)); |
| 4988 | switch (css_refcnt(css)) { | 4994 | |
| 4995 | switch (v) { | ||
| 4989 | case 1: | 4996 | case 1: |
| 4990 | if (notify_on_release(cgrp)) { | 4997 | if (notify_on_release(cgrp)) { |
| 4991 | set_bit(CGRP_RELEASABLE, &cgrp->flags); | 4998 | set_bit(CGRP_RELEASABLE, &cgrp->flags); |
diff --git a/kernel/events/core.c b/kernel/events/core.c index f85c0154b333..d7d71d6ec972 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
| @@ -253,9 +253,9 @@ perf_cgroup_match(struct perf_event *event) | |||
| 253 | return !event->cgrp || event->cgrp == cpuctx->cgrp; | 253 | return !event->cgrp || event->cgrp == cpuctx->cgrp; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | static inline void perf_get_cgroup(struct perf_event *event) | 256 | static inline bool perf_tryget_cgroup(struct perf_event *event) |
| 257 | { | 257 | { |
| 258 | css_get(&event->cgrp->css); | 258 | return css_tryget(&event->cgrp->css); |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | static inline void perf_put_cgroup(struct perf_event *event) | 261 | static inline void perf_put_cgroup(struct perf_event *event) |
| @@ -484,7 +484,11 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event, | |||
| 484 | event->cgrp = cgrp; | 484 | event->cgrp = cgrp; |
| 485 | 485 | ||
| 486 | /* must be done before we fput() the file */ | 486 | /* must be done before we fput() the file */ |
| 487 | perf_get_cgroup(event); | 487 | if (!perf_tryget_cgroup(event)) { |
| 488 | event->cgrp = NULL; | ||
| 489 | ret = -ENOENT; | ||
| 490 | goto out; | ||
| 491 | } | ||
| 488 | 492 | ||
| 489 | /* | 493 | /* |
| 490 | * all events in a group must monitor | 494 | * all events in a group must monitor |
diff --git a/kernel/exit.c b/kernel/exit.c index 34867cc5b42a..2f59cc334516 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -72,6 +72,18 @@ static void __unhash_process(struct task_struct *p, bool group_dead) | |||
| 72 | list_del_rcu(&p->tasks); | 72 | list_del_rcu(&p->tasks); |
| 73 | list_del_init(&p->sibling); | 73 | list_del_init(&p->sibling); |
| 74 | __this_cpu_dec(process_counts); | 74 | __this_cpu_dec(process_counts); |
| 75 | /* | ||
| 76 | * If we are the last child process in a pid namespace to be | ||
| 77 | * reaped, notify the reaper sleeping zap_pid_ns_processes(). | ||
| 78 | */ | ||
| 79 | if (IS_ENABLED(CONFIG_PID_NS)) { | ||
| 80 | struct task_struct *parent = p->real_parent; | ||
| 81 | |||
| 82 | if ((task_active_pid_ns(parent)->child_reaper == parent) && | ||
| 83 | list_empty(&parent->children) && | ||
| 84 | (parent->flags & PF_EXITING)) | ||
| 85 | wake_up_process(parent); | ||
| 86 | } | ||
| 75 | } | 87 | } |
| 76 | list_del_rcu(&p->thread_group); | 88 | list_del_rcu(&p->thread_group); |
| 77 | } | 89 | } |
| @@ -643,6 +655,7 @@ static void exit_mm(struct task_struct * tsk) | |||
| 643 | mm_release(tsk, mm); | 655 | mm_release(tsk, mm); |
| 644 | if (!mm) | 656 | if (!mm) |
| 645 | return; | 657 | return; |
| 658 | sync_mm_rss(mm); | ||
| 646 | /* | 659 | /* |
| 647 | * Serialize with any possible pending coredump. | 660 | * Serialize with any possible pending coredump. |
| 648 | * We must hold mmap_sem around checking core_state | 661 | * We must hold mmap_sem around checking core_state |
| @@ -719,12 +732,6 @@ static struct task_struct *find_new_reaper(struct task_struct *father) | |||
| 719 | 732 | ||
| 720 | zap_pid_ns_processes(pid_ns); | 733 | zap_pid_ns_processes(pid_ns); |
| 721 | write_lock_irq(&tasklist_lock); | 734 | write_lock_irq(&tasklist_lock); |
| 722 | /* | ||
| 723 | * We can not clear ->child_reaper or leave it alone. | ||
| 724 | * There may by stealth EXIT_DEAD tasks on ->children, | ||
| 725 | * forget_original_parent() must move them somewhere. | ||
| 726 | */ | ||
| 727 | pid_ns->child_reaper = init_pid_ns.child_reaper; | ||
| 728 | } else if (father->signal->has_child_subreaper) { | 735 | } else if (father->signal->has_child_subreaper) { |
| 729 | struct task_struct *reaper; | 736 | struct task_struct *reaper; |
| 730 | 737 | ||
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 16b20e38c4a1..b3c7fd554250 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
| @@ -184,11 +184,31 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) | |||
| 184 | } | 184 | } |
| 185 | read_unlock(&tasklist_lock); | 185 | read_unlock(&tasklist_lock); |
| 186 | 186 | ||
| 187 | /* Firstly reap the EXIT_ZOMBIE children we may have. */ | ||
| 187 | do { | 188 | do { |
| 188 | clear_thread_flag(TIF_SIGPENDING); | 189 | clear_thread_flag(TIF_SIGPENDING); |
| 189 | rc = sys_wait4(-1, NULL, __WALL, NULL); | 190 | rc = sys_wait4(-1, NULL, __WALL, NULL); |
| 190 | } while (rc != -ECHILD); | 191 | } while (rc != -ECHILD); |
| 191 | 192 | ||
| 193 | /* | ||
| 194 | * sys_wait4() above can't reap the TASK_DEAD children. | ||
| 195 | * Make sure they all go away, see __unhash_process(). | ||
| 196 | */ | ||
| 197 | for (;;) { | ||
| 198 | bool need_wait = false; | ||
| 199 | |||
| 200 | read_lock(&tasklist_lock); | ||
| 201 | if (!list_empty(¤t->children)) { | ||
| 202 | __set_current_state(TASK_UNINTERRUPTIBLE); | ||
| 203 | need_wait = true; | ||
| 204 | } | ||
| 205 | read_unlock(&tasklist_lock); | ||
| 206 | |||
| 207 | if (!need_wait) | ||
| 208 | break; | ||
| 209 | schedule(); | ||
| 210 | } | ||
| 211 | |||
| 192 | if (pid_ns->reboot) | 212 | if (pid_ns->reboot) |
| 193 | current->signal->group_exit_code = pid_ns->reboot; | 213 | current->signal->group_exit_code = pid_ns->reboot; |
| 194 | 214 | ||
diff --git a/kernel/printk.c b/kernel/printk.c index 32462d2b364a..a2276b916769 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
| @@ -227,10 +227,10 @@ static u32 clear_idx; | |||
| 227 | #define LOG_LINE_MAX 1024 | 227 | #define LOG_LINE_MAX 1024 |
| 228 | 228 | ||
| 229 | /* record buffer */ | 229 | /* record buffer */ |
| 230 | #if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) | 230 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) |
| 231 | #define LOG_ALIGN 4 | 231 | #define LOG_ALIGN 4 |
| 232 | #else | 232 | #else |
| 233 | #define LOG_ALIGN 8 | 233 | #define LOG_ALIGN __alignof__(struct log) |
| 234 | #endif | 234 | #endif |
| 235 | #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) | 235 | #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) |
| 236 | static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN); | 236 | static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN); |
| @@ -414,7 +414,9 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf, | |||
| 414 | if (!user) | 414 | if (!user) |
| 415 | return -EBADF; | 415 | return -EBADF; |
| 416 | 416 | ||
| 417 | mutex_lock(&user->lock); | 417 | ret = mutex_lock_interruptible(&user->lock); |
| 418 | if (ret) | ||
| 419 | return ret; | ||
| 418 | raw_spin_lock(&logbuf_lock); | 420 | raw_spin_lock(&logbuf_lock); |
| 419 | while (user->seq == log_next_seq) { | 421 | while (user->seq == log_next_seq) { |
| 420 | if (file->f_flags & O_NONBLOCK) { | 422 | if (file->f_flags & O_NONBLOCK) { |
| @@ -878,7 +880,9 @@ static int syslog_print(char __user *buf, int size) | |||
| 878 | syslog_seq++; | 880 | syslog_seq++; |
| 879 | raw_spin_unlock_irq(&logbuf_lock); | 881 | raw_spin_unlock_irq(&logbuf_lock); |
| 880 | 882 | ||
| 881 | if (len > 0 && copy_to_user(buf, text, len)) | 883 | if (len > size) |
| 884 | len = -EINVAL; | ||
| 885 | else if (len > 0 && copy_to_user(buf, text, len)) | ||
| 882 | len = -EFAULT; | 886 | len = -EFAULT; |
| 883 | 887 | ||
| 884 | kfree(text); | 888 | kfree(text); |
| @@ -909,7 +913,7 @@ static int syslog_print_all(char __user *buf, int size, bool clear) | |||
| 909 | /* | 913 | /* |
| 910 | * Find first record that fits, including all following records, | 914 | * Find first record that fits, including all following records, |
| 911 | * into the user-provided buffer for this dump. | 915 | * into the user-provided buffer for this dump. |
| 912 | */ | 916 | */ |
| 913 | seq = clear_seq; | 917 | seq = clear_seq; |
| 914 | idx = clear_idx; | 918 | idx = clear_idx; |
| 915 | while (seq < log_next_seq) { | 919 | while (seq < log_next_seq) { |
| @@ -919,6 +923,8 @@ static int syslog_print_all(char __user *buf, int size, bool clear) | |||
| 919 | idx = log_next(idx); | 923 | idx = log_next(idx); |
| 920 | seq++; | 924 | seq++; |
| 921 | } | 925 | } |
| 926 | |||
| 927 | /* move first record forward until length fits into the buffer */ | ||
| 922 | seq = clear_seq; | 928 | seq = clear_seq; |
| 923 | idx = clear_idx; | 929 | idx = clear_idx; |
| 924 | while (len > size && seq < log_next_seq) { | 930 | while (len > size && seq < log_next_seq) { |
| @@ -929,7 +935,7 @@ static int syslog_print_all(char __user *buf, int size, bool clear) | |||
| 929 | seq++; | 935 | seq++; |
| 930 | } | 936 | } |
| 931 | 937 | ||
| 932 | /* last message in this dump */ | 938 | /* last message fitting into this dump */ |
| 933 | next_seq = log_next_seq; | 939 | next_seq = log_next_seq; |
| 934 | 940 | ||
| 935 | len = 0; | 941 | len = 0; |
| @@ -974,6 +980,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) | |||
| 974 | { | 980 | { |
| 975 | bool clear = false; | 981 | bool clear = false; |
| 976 | static int saved_console_loglevel = -1; | 982 | static int saved_console_loglevel = -1; |
| 983 | static DEFINE_MUTEX(syslog_mutex); | ||
| 977 | int error; | 984 | int error; |
| 978 | 985 | ||
| 979 | error = check_syslog_permissions(type, from_file); | 986 | error = check_syslog_permissions(type, from_file); |
| @@ -1000,11 +1007,17 @@ int do_syslog(int type, char __user *buf, int len, bool from_file) | |||
| 1000 | error = -EFAULT; | 1007 | error = -EFAULT; |
| 1001 | goto out; | 1008 | goto out; |
| 1002 | } | 1009 | } |
| 1010 | error = mutex_lock_interruptible(&syslog_mutex); | ||
| 1011 | if (error) | ||
| 1012 | goto out; | ||
| 1003 | error = wait_event_interruptible(log_wait, | 1013 | error = wait_event_interruptible(log_wait, |
| 1004 | syslog_seq != log_next_seq); | 1014 | syslog_seq != log_next_seq); |
| 1005 | if (error) | 1015 | if (error) { |
| 1016 | mutex_unlock(&syslog_mutex); | ||
| 1006 | goto out; | 1017 | goto out; |
| 1018 | } | ||
| 1007 | error = syslog_print(buf, len); | 1019 | error = syslog_print(buf, len); |
| 1020 | mutex_unlock(&syslog_mutex); | ||
| 1008 | break; | 1021 | break; |
| 1009 | /* Read/clear last kernel messages */ | 1022 | /* Read/clear last kernel messages */ |
| 1010 | case SYSLOG_ACTION_READ_CLEAR: | 1023 | case SYSLOG_ACTION_READ_CLEAR: |
| @@ -2300,48 +2313,210 @@ module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR); | |||
| 2300 | * kmsg_dump - dump kernel log to kernel message dumpers. | 2313 | * kmsg_dump - dump kernel log to kernel message dumpers. |
| 2301 | * @reason: the reason (oops, panic etc) for dumping | 2314 | * @reason: the reason (oops, panic etc) for dumping |
| 2302 | * | 2315 | * |
| 2303 | * Iterate through each of the dump devices and call the oops/panic | 2316 | * Call each of the registered dumper's dump() callback, which can |
| 2304 | * callbacks with the log buffer. | 2317 | * retrieve the kmsg records with kmsg_dump_get_line() or |
| 2318 | * kmsg_dump_get_buffer(). | ||
| 2305 | */ | 2319 | */ |
| 2306 | void kmsg_dump(enum kmsg_dump_reason reason) | 2320 | void kmsg_dump(enum kmsg_dump_reason reason) |
| 2307 | { | 2321 | { |
| 2308 | u64 idx; | ||
| 2309 | struct kmsg_dumper *dumper; | 2322 | struct kmsg_dumper *dumper; |
| 2310 | const char *s1, *s2; | ||
| 2311 | unsigned long l1, l2; | ||
| 2312 | unsigned long flags; | 2323 | unsigned long flags; |
| 2313 | 2324 | ||
| 2314 | if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump) | 2325 | if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump) |
| 2315 | return; | 2326 | return; |
| 2316 | 2327 | ||
| 2317 | /* Theoretically, the log could move on after we do this, but | 2328 | rcu_read_lock(); |
| 2318 | there's not a lot we can do about that. The new messages | 2329 | list_for_each_entry_rcu(dumper, &dump_list, list) { |
| 2319 | will overwrite the start of what we dump. */ | 2330 | if (dumper->max_reason && reason > dumper->max_reason) |
| 2331 | continue; | ||
| 2332 | |||
| 2333 | /* initialize iterator with data about the stored records */ | ||
| 2334 | dumper->active = true; | ||
| 2335 | |||
| 2336 | raw_spin_lock_irqsave(&logbuf_lock, flags); | ||
| 2337 | dumper->cur_seq = clear_seq; | ||
| 2338 | dumper->cur_idx = clear_idx; | ||
| 2339 | dumper->next_seq = log_next_seq; | ||
| 2340 | dumper->next_idx = log_next_idx; | ||
| 2341 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); | ||
| 2342 | |||
| 2343 | /* invoke dumper which will iterate over records */ | ||
| 2344 | dumper->dump(dumper, reason); | ||
| 2345 | |||
| 2346 | /* reset iterator */ | ||
| 2347 | dumper->active = false; | ||
| 2348 | } | ||
| 2349 | rcu_read_unlock(); | ||
| 2350 | } | ||
| 2351 | |||
| 2352 | /** | ||
| 2353 | * kmsg_dump_get_line - retrieve one kmsg log line | ||
| 2354 | * @dumper: registered kmsg dumper | ||
| 2355 | * @syslog: include the "<4>" prefixes | ||
| 2356 | * @line: buffer to copy the line to | ||
| 2357 | * @size: maximum size of the buffer | ||
| 2358 | * @len: length of line placed into buffer | ||
| 2359 | * | ||
| 2360 | * Start at the beginning of the kmsg buffer, with the oldest kmsg | ||
| 2361 | * record, and copy one record into the provided buffer. | ||
| 2362 | * | ||
| 2363 | * Consecutive calls will return the next available record moving | ||
| 2364 | * towards the end of the buffer with the youngest messages. | ||
| 2365 | * | ||
| 2366 | * A return value of FALSE indicates that there are no more records to | ||
| 2367 | * read. | ||
| 2368 | */ | ||
| 2369 | bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, | ||
| 2370 | char *line, size_t size, size_t *len) | ||
| 2371 | { | ||
| 2372 | unsigned long flags; | ||
| 2373 | struct log *msg; | ||
| 2374 | size_t l = 0; | ||
| 2375 | bool ret = false; | ||
| 2376 | |||
| 2377 | if (!dumper->active) | ||
| 2378 | goto out; | ||
| 2320 | 2379 | ||
| 2321 | raw_spin_lock_irqsave(&logbuf_lock, flags); | 2380 | raw_spin_lock_irqsave(&logbuf_lock, flags); |
| 2322 | if (syslog_seq < log_first_seq) | 2381 | if (dumper->cur_seq < log_first_seq) { |
| 2323 | idx = syslog_idx; | 2382 | /* messages are gone, move to first available one */ |
| 2324 | else | 2383 | dumper->cur_seq = log_first_seq; |
| 2325 | idx = log_first_idx; | 2384 | dumper->cur_idx = log_first_idx; |
| 2385 | } | ||
| 2386 | |||
| 2387 | /* last entry */ | ||
| 2388 | if (dumper->cur_seq >= log_next_seq) { | ||
| 2389 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); | ||
| 2390 | goto out; | ||
| 2391 | } | ||
| 2326 | 2392 | ||
| 2327 | if (idx > log_next_idx) { | 2393 | msg = log_from_idx(dumper->cur_idx); |
| 2328 | s1 = log_buf; | 2394 | l = msg_print_text(msg, syslog, |
| 2329 | l1 = log_next_idx; | 2395 | line, size); |
| 2330 | 2396 | ||
| 2331 | s2 = log_buf + idx; | 2397 | dumper->cur_idx = log_next(dumper->cur_idx); |
| 2332 | l2 = log_buf_len - idx; | 2398 | dumper->cur_seq++; |
| 2333 | } else { | 2399 | ret = true; |
| 2334 | s1 = ""; | 2400 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); |
| 2335 | l1 = 0; | 2401 | out: |
| 2402 | if (len) | ||
| 2403 | *len = l; | ||
| 2404 | return ret; | ||
| 2405 | } | ||
| 2406 | EXPORT_SYMBOL_GPL(kmsg_dump_get_line); | ||
| 2407 | |||
| 2408 | /** | ||
| 2409 | * kmsg_dump_get_buffer - copy kmsg log lines | ||
| 2410 | * @dumper: registered kmsg dumper | ||
| 2411 | * @syslog: include the "<4>" prefixes | ||
| 2412 | * @line: buffer to copy the line to | ||
| 2413 | * @size: maximum size of the buffer | ||
| 2414 | * @len: length of line placed into buffer | ||
| 2415 | * | ||
| 2416 | * Start at the end of the kmsg buffer and fill the provided buffer | ||
| 2417 | * with as many of the the *youngest* kmsg records that fit into it. | ||
| 2418 | * If the buffer is large enough, all available kmsg records will be | ||
| 2419 | * copied with a single call. | ||
| 2420 | * | ||
| 2421 | * Consecutive calls will fill the buffer with the next block of | ||
| 2422 | * available older records, not including the earlier retrieved ones. | ||
| 2423 | * | ||
| 2424 | * A return value of FALSE indicates that there are no more records to | ||
| 2425 | * read. | ||
| 2426 | */ | ||
| 2427 | bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, | ||
| 2428 | char *buf, size_t size, size_t *len) | ||
| 2429 | { | ||
| 2430 | unsigned long flags; | ||
| 2431 | u64 seq; | ||
| 2432 | u32 idx; | ||
| 2433 | u64 next_seq; | ||
| 2434 | u32 next_idx; | ||
| 2435 | size_t l = 0; | ||
| 2436 | bool ret = false; | ||
| 2437 | |||
| 2438 | if (!dumper->active) | ||
| 2439 | goto out; | ||
| 2440 | |||
| 2441 | raw_spin_lock_irqsave(&logbuf_lock, flags); | ||
| 2442 | if (dumper->cur_seq < log_first_seq) { | ||
| 2443 | /* messages are gone, move to first available one */ | ||
| 2444 | dumper->cur_seq = log_first_seq; | ||
| 2445 | dumper->cur_idx = log_first_idx; | ||
| 2446 | } | ||
| 2447 | |||
| 2448 | /* last entry */ | ||
| 2449 | if (dumper->cur_seq >= dumper->next_seq) { | ||
| 2450 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); | ||
| 2451 | goto out; | ||
| 2452 | } | ||
| 2453 | |||
| 2454 | /* calculate length of entire buffer */ | ||
| 2455 | seq = dumper->cur_seq; | ||
| 2456 | idx = dumper->cur_idx; | ||
| 2457 | while (seq < dumper->next_seq) { | ||
| 2458 | struct log *msg = log_from_idx(idx); | ||
| 2459 | |||
| 2460 | l += msg_print_text(msg, true, NULL, 0); | ||
| 2461 | idx = log_next(idx); | ||
| 2462 | seq++; | ||
| 2463 | } | ||
| 2336 | 2464 | ||
| 2337 | s2 = log_buf + idx; | 2465 | /* move first record forward until length fits into the buffer */ |
| 2338 | l2 = log_next_idx - idx; | 2466 | seq = dumper->cur_seq; |
| 2467 | idx = dumper->cur_idx; | ||
| 2468 | while (l > size && seq < dumper->next_seq) { | ||
| 2469 | struct log *msg = log_from_idx(idx); | ||
| 2470 | |||
| 2471 | l -= msg_print_text(msg, true, NULL, 0); | ||
| 2472 | idx = log_next(idx); | ||
| 2473 | seq++; | ||
| 2474 | } | ||
| 2475 | |||
| 2476 | /* last message in next interation */ | ||
| 2477 | next_seq = seq; | ||
| 2478 | next_idx = idx; | ||
| 2479 | |||
| 2480 | l = 0; | ||
| 2481 | while (seq < dumper->next_seq) { | ||
| 2482 | struct log *msg = log_from_idx(idx); | ||
| 2483 | |||
| 2484 | l += msg_print_text(msg, syslog, | ||
| 2485 | buf + l, size - l); | ||
| 2486 | |||
| 2487 | idx = log_next(idx); | ||
| 2488 | seq++; | ||
| 2339 | } | 2489 | } |
| 2490 | |||
| 2491 | dumper->next_seq = next_seq; | ||
| 2492 | dumper->next_idx = next_idx; | ||
| 2493 | ret = true; | ||
| 2340 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); | 2494 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); |
| 2495 | out: | ||
| 2496 | if (len) | ||
| 2497 | *len = l; | ||
| 2498 | return ret; | ||
| 2499 | } | ||
| 2500 | EXPORT_SYMBOL_GPL(kmsg_dump_get_buffer); | ||
| 2341 | 2501 | ||
| 2342 | rcu_read_lock(); | 2502 | /** |
| 2343 | list_for_each_entry_rcu(dumper, &dump_list, list) | 2503 | * kmsg_dump_rewind - reset the interator |
| 2344 | dumper->dump(dumper, reason, s1, l1, s2, l2); | 2504 | * @dumper: registered kmsg dumper |
| 2345 | rcu_read_unlock(); | 2505 | * |
| 2506 | * Reset the dumper's iterator so that kmsg_dump_get_line() and | ||
| 2507 | * kmsg_dump_get_buffer() can be called again and used multiple | ||
| 2508 | * times within the same dumper.dump() callback. | ||
| 2509 | */ | ||
| 2510 | void kmsg_dump_rewind(struct kmsg_dumper *dumper) | ||
| 2511 | { | ||
| 2512 | unsigned long flags; | ||
| 2513 | |||
| 2514 | raw_spin_lock_irqsave(&logbuf_lock, flags); | ||
| 2515 | dumper->cur_seq = clear_seq; | ||
| 2516 | dumper->cur_idx = clear_idx; | ||
| 2517 | dumper->next_seq = log_next_seq; | ||
| 2518 | dumper->next_idx = log_next_idx; | ||
| 2519 | raw_spin_unlock_irqrestore(&logbuf_lock, flags); | ||
| 2346 | } | 2520 | } |
| 2521 | EXPORT_SYMBOL_GPL(kmsg_dump_rewind); | ||
| 2347 | #endif | 2522 | #endif |
diff --git a/kernel/sys.c b/kernel/sys.c index f0ec44dcd415..e0c8ffc50d7f 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -2127,9 +2127,6 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | |||
| 2127 | else | 2127 | else |
| 2128 | return -EINVAL; | 2128 | return -EINVAL; |
| 2129 | break; | 2129 | break; |
| 2130 | case PR_GET_TID_ADDRESS: | ||
| 2131 | error = prctl_get_tid_address(me, (int __user **)arg2); | ||
| 2132 | break; | ||
| 2133 | default: | 2130 | default: |
| 2134 | return -EINVAL; | 2131 | return -EINVAL; |
| 2135 | } | 2132 | } |
| @@ -2147,6 +2144,9 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | |||
| 2147 | case PR_SET_MM: | 2144 | case PR_SET_MM: |
| 2148 | error = prctl_set_mm(arg2, arg3, arg4, arg5); | 2145 | error = prctl_set_mm(arg2, arg3, arg4, arg5); |
| 2149 | break; | 2146 | break; |
| 2147 | case PR_GET_TID_ADDRESS: | ||
| 2148 | error = prctl_get_tid_address(me, (int __user **)arg2); | ||
| 2149 | break; | ||
| 2150 | case PR_SET_CHILD_SUBREAPER: | 2150 | case PR_SET_CHILD_SUBREAPER: |
| 2151 | me->signal->is_child_subreaper = !!arg2; | 2151 | me->signal->is_child_subreaper = !!arg2; |
| 2152 | error = 0; | 2152 | error = 0; |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index 6805453c18e7..f7210ad6cffd 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
| @@ -101,6 +101,10 @@ static inline bool fail_stacktrace(struct fault_attr *attr) | |||
| 101 | 101 | ||
| 102 | bool should_fail(struct fault_attr *attr, ssize_t size) | 102 | bool should_fail(struct fault_attr *attr, ssize_t size) |
| 103 | { | 103 | { |
| 104 | /* No need to check any other properties if the probability is 0 */ | ||
| 105 | if (attr->probability == 0) | ||
| 106 | return false; | ||
| 107 | |||
| 104 | if (attr->task_filter && !fail_task(attr, current)) | 108 | if (attr->task_filter && !fail_task(attr, current)) |
| 105 | return false; | 109 | return false; |
| 106 | 110 | ||
diff --git a/mm/memblock.c b/mm/memblock.c index 32a0a5e4d79d..d4382095f8bd 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
| @@ -184,7 +184,24 @@ static void __init_memblock memblock_remove_region(struct memblock_type *type, u | |||
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | static int __init_memblock memblock_double_array(struct memblock_type *type) | 187 | /** |
| 188 | * memblock_double_array - double the size of the memblock regions array | ||
| 189 | * @type: memblock type of the regions array being doubled | ||
| 190 | * @new_area_start: starting address of memory range to avoid overlap with | ||
| 191 | * @new_area_size: size of memory range to avoid overlap with | ||
| 192 | * | ||
| 193 | * Double the size of the @type regions array. If memblock is being used to | ||
| 194 | * allocate memory for a new reserved regions array and there is a previously | ||
| 195 | * allocated memory range [@new_area_start,@new_area_start+@new_area_size] | ||
| 196 | * waiting to be reserved, ensure the memory used by the new array does | ||
| 197 | * not overlap. | ||
| 198 | * | ||
| 199 | * RETURNS: | ||
| 200 | * 0 on success, -1 on failure. | ||
| 201 | */ | ||
| 202 | static int __init_memblock memblock_double_array(struct memblock_type *type, | ||
| 203 | phys_addr_t new_area_start, | ||
| 204 | phys_addr_t new_area_size) | ||
| 188 | { | 205 | { |
| 189 | struct memblock_region *new_array, *old_array; | 206 | struct memblock_region *new_array, *old_array; |
| 190 | phys_addr_t old_size, new_size, addr; | 207 | phys_addr_t old_size, new_size, addr; |
| @@ -222,7 +239,18 @@ static int __init_memblock memblock_double_array(struct memblock_type *type) | |||
| 222 | new_array = kmalloc(new_size, GFP_KERNEL); | 239 | new_array = kmalloc(new_size, GFP_KERNEL); |
| 223 | addr = new_array ? __pa(new_array) : 0; | 240 | addr = new_array ? __pa(new_array) : 0; |
| 224 | } else { | 241 | } else { |
| 225 | addr = memblock_find_in_range(0, MEMBLOCK_ALLOC_ACCESSIBLE, new_size, sizeof(phys_addr_t)); | 242 | /* only exclude range when trying to double reserved.regions */ |
| 243 | if (type != &memblock.reserved) | ||
| 244 | new_area_start = new_area_size = 0; | ||
| 245 | |||
| 246 | addr = memblock_find_in_range(new_area_start + new_area_size, | ||
| 247 | memblock.current_limit, | ||
| 248 | new_size, sizeof(phys_addr_t)); | ||
| 249 | if (!addr && new_area_size) | ||
| 250 | addr = memblock_find_in_range(0, | ||
| 251 | min(new_area_start, memblock.current_limit), | ||
| 252 | new_size, sizeof(phys_addr_t)); | ||
| 253 | |||
| 226 | new_array = addr ? __va(addr) : 0; | 254 | new_array = addr ? __va(addr) : 0; |
| 227 | } | 255 | } |
| 228 | if (!addr) { | 256 | if (!addr) { |
| @@ -399,7 +427,7 @@ repeat: | |||
| 399 | */ | 427 | */ |
| 400 | if (!insert) { | 428 | if (!insert) { |
| 401 | while (type->cnt + nr_new > type->max) | 429 | while (type->cnt + nr_new > type->max) |
| 402 | if (memblock_double_array(type) < 0) | 430 | if (memblock_double_array(type, obase, size) < 0) |
| 403 | return -ENOMEM; | 431 | return -ENOMEM; |
| 404 | insert = true; | 432 | insert = true; |
| 405 | goto repeat; | 433 | goto repeat; |
| @@ -450,7 +478,7 @@ static int __init_memblock memblock_isolate_range(struct memblock_type *type, | |||
| 450 | 478 | ||
| 451 | /* we'll create at most two more regions */ | 479 | /* we'll create at most two more regions */ |
| 452 | while (type->cnt + 2 > type->max) | 480 | while (type->cnt + 2 > type->max) |
| 453 | if (memblock_double_array(type) < 0) | 481 | if (memblock_double_array(type, base, size) < 0) |
| 454 | return -ENOMEM; | 482 | return -ENOMEM; |
| 455 | 483 | ||
| 456 | for (i = 0; i < type->cnt; i++) { | 484 | for (i = 0; i < type->cnt; i++) { |
| @@ -540,9 +568,9 @@ int __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size) | |||
| 540 | * __next_free_mem_range - next function for for_each_free_mem_range() | 568 | * __next_free_mem_range - next function for for_each_free_mem_range() |
| 541 | * @idx: pointer to u64 loop variable | 569 | * @idx: pointer to u64 loop variable |
| 542 | * @nid: nid: node selector, %MAX_NUMNODES for all nodes | 570 | * @nid: nid: node selector, %MAX_NUMNODES for all nodes |
| 543 | * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL | 571 | * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL |
| 544 | * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL | 572 | * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL |
| 545 | * @p_nid: ptr to int for nid of the range, can be %NULL | 573 | * @out_nid: ptr to int for nid of the range, can be %NULL |
| 546 | * | 574 | * |
| 547 | * Find the first free area from *@idx which matches @nid, fill the out | 575 | * Find the first free area from *@idx which matches @nid, fill the out |
| 548 | * parameters, and update *@idx for the next iteration. The lower 32bit of | 576 | * parameters, and update *@idx for the next iteration. The lower 32bit of |
| @@ -616,9 +644,9 @@ void __init_memblock __next_free_mem_range(u64 *idx, int nid, | |||
| 616 | * __next_free_mem_range_rev - next function for for_each_free_mem_range_reverse() | 644 | * __next_free_mem_range_rev - next function for for_each_free_mem_range_reverse() |
| 617 | * @idx: pointer to u64 loop variable | 645 | * @idx: pointer to u64 loop variable |
| 618 | * @nid: nid: node selector, %MAX_NUMNODES for all nodes | 646 | * @nid: nid: node selector, %MAX_NUMNODES for all nodes |
| 619 | * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL | 647 | * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL |
| 620 | * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL | 648 | * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL |
| 621 | * @p_nid: ptr to int for nid of the range, can be %NULL | 649 | * @out_nid: ptr to int for nid of the range, can be %NULL |
| 622 | * | 650 | * |
| 623 | * Reverse of __next_free_mem_range(). | 651 | * Reverse of __next_free_mem_range(). |
| 624 | */ | 652 | */ |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ac35bccadb7b..f72b5e52451a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -1148,7 +1148,7 @@ bool __mem_cgroup_same_or_subtree(const struct mem_cgroup *root_memcg, | |||
| 1148 | { | 1148 | { |
| 1149 | if (root_memcg == memcg) | 1149 | if (root_memcg == memcg) |
| 1150 | return true; | 1150 | return true; |
| 1151 | if (!root_memcg->use_hierarchy) | 1151 | if (!root_memcg->use_hierarchy || !memcg) |
| 1152 | return false; | 1152 | return false; |
| 1153 | return css_is_ancestor(&memcg->css, &root_memcg->css); | 1153 | return css_is_ancestor(&memcg->css, &root_memcg->css); |
| 1154 | } | 1154 | } |
| @@ -1234,7 +1234,7 @@ int mem_cgroup_inactive_file_is_low(struct lruvec *lruvec) | |||
| 1234 | 1234 | ||
| 1235 | /** | 1235 | /** |
| 1236 | * mem_cgroup_margin - calculate chargeable space of a memory cgroup | 1236 | * mem_cgroup_margin - calculate chargeable space of a memory cgroup |
| 1237 | * @mem: the memory cgroup | 1237 | * @memcg: the memory cgroup |
| 1238 | * | 1238 | * |
| 1239 | * Returns the maximum amount of memory @mem can be charged with, in | 1239 | * Returns the maximum amount of memory @mem can be charged with, in |
| 1240 | * pages. | 1240 | * pages. |
| @@ -1508,7 +1508,7 @@ static unsigned long mem_cgroup_reclaim(struct mem_cgroup *memcg, | |||
| 1508 | 1508 | ||
| 1509 | /** | 1509 | /** |
| 1510 | * test_mem_cgroup_node_reclaimable | 1510 | * test_mem_cgroup_node_reclaimable |
| 1511 | * @mem: the target memcg | 1511 | * @memcg: the target memcg |
| 1512 | * @nid: the node ID to be checked. | 1512 | * @nid: the node ID to be checked. |
| 1513 | * @noswap : specify true here if the user wants flle only information. | 1513 | * @noswap : specify true here if the user wants flle only information. |
| 1514 | * | 1514 | * |
diff --git a/mm/memory.c b/mm/memory.c index 1b7dc662bf9f..2466d1250231 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -1225,7 +1225,15 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb, | |||
| 1225 | next = pmd_addr_end(addr, end); | 1225 | next = pmd_addr_end(addr, end); |
| 1226 | if (pmd_trans_huge(*pmd)) { | 1226 | if (pmd_trans_huge(*pmd)) { |
| 1227 | if (next - addr != HPAGE_PMD_SIZE) { | 1227 | if (next - addr != HPAGE_PMD_SIZE) { |
| 1228 | VM_BUG_ON(!rwsem_is_locked(&tlb->mm->mmap_sem)); | 1228 | #ifdef CONFIG_DEBUG_VM |
| 1229 | if (!rwsem_is_locked(&tlb->mm->mmap_sem)) { | ||
| 1230 | pr_err("%s: mmap_sem is unlocked! addr=0x%lx end=0x%lx vma->vm_start=0x%lx vma->vm_end=0x%lx\n", | ||
| 1231 | __func__, addr, end, | ||
| 1232 | vma->vm_start, | ||
| 1233 | vma->vm_end); | ||
| 1234 | BUG(); | ||
| 1235 | } | ||
| 1236 | #endif | ||
| 1229 | split_huge_page_pmd(vma->vm_mm, pmd); | 1237 | split_huge_page_pmd(vma->vm_mm, pmd); |
| 1230 | } else if (zap_huge_pmd(tlb, vma, pmd, addr)) | 1238 | } else if (zap_huge_pmd(tlb, vma, pmd, addr)) |
| 1231 | goto next; | 1239 | goto next; |
| @@ -1366,7 +1374,7 @@ void unmap_vmas(struct mmu_gather *tlb, | |||
| 1366 | /** | 1374 | /** |
| 1367 | * zap_page_range - remove user pages in a given range | 1375 | * zap_page_range - remove user pages in a given range |
| 1368 | * @vma: vm_area_struct holding the applicable pages | 1376 | * @vma: vm_area_struct holding the applicable pages |
| 1369 | * @address: starting address of pages to zap | 1377 | * @start: starting address of pages to zap |
| 1370 | * @size: number of bytes to zap | 1378 | * @size: number of bytes to zap |
| 1371 | * @details: details of nonlinear truncation or shared cache invalidation | 1379 | * @details: details of nonlinear truncation or shared cache invalidation |
| 1372 | * | 1380 | * |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index f15c1b24ca18..1d771e4200d2 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
| @@ -1177,7 +1177,7 @@ static long do_mbind(unsigned long start, unsigned long len, | |||
| 1177 | if (!list_empty(&pagelist)) { | 1177 | if (!list_empty(&pagelist)) { |
| 1178 | nr_failed = migrate_pages(&pagelist, new_vma_page, | 1178 | nr_failed = migrate_pages(&pagelist, new_vma_page, |
| 1179 | (unsigned long)vma, | 1179 | (unsigned long)vma, |
| 1180 | false, true); | 1180 | false, MIGRATE_SYNC); |
| 1181 | if (nr_failed) | 1181 | if (nr_failed) |
| 1182 | putback_lru_pages(&pagelist); | 1182 | putback_lru_pages(&pagelist); |
| 1183 | } | 1183 | } |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 416637f0e924..ac300c99baf6 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
| @@ -184,6 +184,7 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, | |||
| 184 | const nodemask_t *nodemask, unsigned long totalpages) | 184 | const nodemask_t *nodemask, unsigned long totalpages) |
| 185 | { | 185 | { |
| 186 | long points; | 186 | long points; |
| 187 | long adj; | ||
| 187 | 188 | ||
| 188 | if (oom_unkillable_task(p, memcg, nodemask)) | 189 | if (oom_unkillable_task(p, memcg, nodemask)) |
| 189 | return 0; | 190 | return 0; |
| @@ -192,7 +193,8 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, | |||
| 192 | if (!p) | 193 | if (!p) |
| 193 | return 0; | 194 | return 0; |
| 194 | 195 | ||
| 195 | if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) { | 196 | adj = p->signal->oom_score_adj; |
| 197 | if (adj == OOM_SCORE_ADJ_MIN) { | ||
| 196 | task_unlock(p); | 198 | task_unlock(p); |
| 197 | return 0; | 199 | return 0; |
| 198 | } | 200 | } |
| @@ -210,14 +212,11 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, | |||
| 210 | * implementation used by LSMs. | 212 | * implementation used by LSMs. |
| 211 | */ | 213 | */ |
| 212 | if (has_capability_noaudit(p, CAP_SYS_ADMIN)) | 214 | if (has_capability_noaudit(p, CAP_SYS_ADMIN)) |
| 213 | points -= 30 * totalpages / 1000; | 215 | adj -= 30; |
| 214 | 216 | ||
| 215 | /* | 217 | /* Normalize to oom_score_adj units */ |
| 216 | * /proc/pid/oom_score_adj ranges from -1000 to +1000 such that it may | 218 | adj *= totalpages / 1000; |
| 217 | * either completely disable oom killing or always prefer a certain | 219 | points += adj; |
| 218 | * task. | ||
| 219 | */ | ||
| 220 | points += p->signal->oom_score_adj * totalpages / 1000; | ||
| 221 | 220 | ||
| 222 | /* | 221 | /* |
| 223 | * Never return 0 for an eligible task regardless of the root bonus and | 222 | * Never return 0 for an eligible task regardless of the root bonus and |
| @@ -366,7 +365,7 @@ static struct task_struct *select_bad_process(unsigned int *ppoints, | |||
| 366 | 365 | ||
| 367 | /** | 366 | /** |
| 368 | * dump_tasks - dump current memory state of all system tasks | 367 | * dump_tasks - dump current memory state of all system tasks |
| 369 | * @mem: current's memory controller, if constrained | 368 | * @memcg: current's memory controller, if constrained |
| 370 | * @nodemask: nodemask passed to page allocator for mempolicy ooms | 369 | * @nodemask: nodemask passed to page allocator for mempolicy ooms |
| 371 | * | 370 | * |
| 372 | * Dumps the current memory state of all eligible tasks. Tasks not in the same | 371 | * Dumps the current memory state of all eligible tasks. Tasks not in the same |
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index 1ccbd714059c..eb750f851395 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c | |||
| @@ -392,7 +392,7 @@ static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t ent, | |||
| 392 | 392 | ||
| 393 | /** | 393 | /** |
| 394 | * swap_cgroup_cmpxchg - cmpxchg mem_cgroup's id for this swp_entry. | 394 | * swap_cgroup_cmpxchg - cmpxchg mem_cgroup's id for this swp_entry. |
| 395 | * @end: swap entry to be cmpxchged | 395 | * @ent: swap entry to be cmpxchged |
| 396 | * @old: old id | 396 | * @old: old id |
| 397 | * @new: new id | 397 | * @new: new id |
| 398 | * | 398 | * |
| @@ -422,7 +422,7 @@ unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | |||
| 422 | /** | 422 | /** |
| 423 | * swap_cgroup_record - record mem_cgroup for this swp_entry. | 423 | * swap_cgroup_record - record mem_cgroup for this swp_entry. |
| 424 | * @ent: swap entry to be recorded into | 424 | * @ent: swap entry to be recorded into |
| 425 | * @mem: mem_cgroup to be recorded | 425 | * @id: mem_cgroup to be recorded |
| 426 | * | 426 | * |
| 427 | * Returns old value at success, 0 at failure. | 427 | * Returns old value at success, 0 at failure. |
| 428 | * (Of course, old value can be 0.) | 428 | * (Of course, old value can be 0.) |
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index aa9701e12714..6c118d012bb5 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c | |||
| @@ -162,7 +162,6 @@ static int walk_hugetlb_range(struct vm_area_struct *vma, | |||
| 162 | 162 | ||
| 163 | /** | 163 | /** |
| 164 | * walk_page_range - walk a memory map's page tables with a callback | 164 | * walk_page_range - walk a memory map's page tables with a callback |
| 165 | * @mm: memory map to walk | ||
| 166 | * @addr: starting address | 165 | * @addr: starting address |
| 167 | * @end: ending address | 166 | * @end: ending address |
| 168 | * @walk: set of callbacks to invoke for each level of the tree | 167 | * @walk: set of callbacks to invoke for each level of the tree |
diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c index 405d331804c3..3707c71ae4cd 100644 --- a/mm/percpu-vm.c +++ b/mm/percpu-vm.c | |||
| @@ -360,7 +360,6 @@ err_free: | |||
| 360 | * @chunk: chunk to depopulate | 360 | * @chunk: chunk to depopulate |
| 361 | * @off: offset to the area to depopulate | 361 | * @off: offset to the area to depopulate |
| 362 | * @size: size of the area to depopulate in bytes | 362 | * @size: size of the area to depopulate in bytes |
| 363 | * @flush: whether to flush cache and tlb or not | ||
| 364 | * | 363 | * |
| 365 | * For each cpu, depopulate and unmap pages [@page_start,@page_end) | 364 | * For each cpu, depopulate and unmap pages [@page_start,@page_end) |
| 366 | * from @chunk. If @flush is true, vcache is flushed before unmapping | 365 | * from @chunk. If @flush is true, vcache is flushed before unmapping |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 0948c6b5a321..8b673dd4627f 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:"); | |||
| 83 | push(@signature_tags, "Reviewed-by:"); | 83 | push(@signature_tags, "Reviewed-by:"); |
| 84 | push(@signature_tags, "Acked-by:"); | 84 | push(@signature_tags, "Acked-by:"); |
| 85 | 85 | ||
| 86 | my $signature_pattern = "\(" . join("|", @signature_tags) . "\)"; | ||
| 87 | |||
| 86 | # rfc822 email address - preloaded methods go here. | 88 | # rfc822 email address - preloaded methods go here. |
| 87 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; | 89 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; |
| 88 | my $rfc822_char = '[\\000-\\377]'; | 90 | my $rfc822_char = '[\\000-\\377]'; |
| @@ -473,7 +475,6 @@ my @subsystem = (); | |||
| 473 | my @status = (); | 475 | my @status = (); |
| 474 | my %deduplicate_name_hash = (); | 476 | my %deduplicate_name_hash = (); |
| 475 | my %deduplicate_address_hash = (); | 477 | my %deduplicate_address_hash = (); |
| 476 | my $signature_pattern; | ||
| 477 | 478 | ||
| 478 | my @maintainers = get_maintainers(); | 479 | my @maintainers = get_maintainers(); |
| 479 | 480 | ||
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 146fd6147e84..d9834b362943 100644 --- a/tools/hv/hv_kvp_daemon.c +++ b/tools/hv/hv_kvp_daemon.c | |||
| @@ -701,14 +701,18 @@ int main(void) | |||
| 701 | pfd.fd = fd; | 701 | pfd.fd = fd; |
| 702 | 702 | ||
| 703 | while (1) { | 703 | while (1) { |
| 704 | struct sockaddr *addr_p = (struct sockaddr *) &addr; | ||
| 705 | socklen_t addr_l = sizeof(addr); | ||
| 704 | pfd.events = POLLIN; | 706 | pfd.events = POLLIN; |
| 705 | pfd.revents = 0; | 707 | pfd.revents = 0; |
| 706 | poll(&pfd, 1, -1); | 708 | poll(&pfd, 1, -1); |
| 707 | 709 | ||
| 708 | len = recv(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0); | 710 | len = recvfrom(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0, |
| 711 | addr_p, &addr_l); | ||
| 709 | 712 | ||
| 710 | if (len < 0) { | 713 | if (len < 0 || addr.nl_pid) { |
| 711 | syslog(LOG_ERR, "recv failed; error:%d", len); | 714 | syslog(LOG_ERR, "recvfrom failed; pid:%u error:%d %s", |
| 715 | addr.nl_pid, errno, strerror(errno)); | ||
| 712 | close(fd); | 716 | close(fd); |
| 713 | return -1; | 717 | return -1; |
| 714 | } | 718 | } |
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 262589991ea4..07b5c7703dd1 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -1179,6 +1179,12 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) | |||
| 1179 | fprintf(stderr, "cannot use both --output and --log-fd\n"); | 1179 | fprintf(stderr, "cannot use both --output and --log-fd\n"); |
| 1180 | usage_with_options(stat_usage, options); | 1180 | usage_with_options(stat_usage, options); |
| 1181 | } | 1181 | } |
| 1182 | |||
| 1183 | if (output_fd < 0) { | ||
| 1184 | fprintf(stderr, "argument to --log-fd must be a > 0\n"); | ||
| 1185 | usage_with_options(stat_usage, options); | ||
| 1186 | } | ||
| 1187 | |||
| 1182 | if (!output) { | 1188 | if (!output) { |
| 1183 | struct timespec tm; | 1189 | struct timespec tm; |
| 1184 | mode = append_file ? "a" : "w"; | 1190 | mode = append_file ? "a" : "w"; |
| @@ -1190,7 +1196,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) | |||
| 1190 | } | 1196 | } |
| 1191 | clock_gettime(CLOCK_REALTIME, &tm); | 1197 | clock_gettime(CLOCK_REALTIME, &tm); |
| 1192 | fprintf(output, "# started on %s\n", ctime(&tm.tv_sec)); | 1198 | fprintf(output, "# started on %s\n", ctime(&tm.tv_sec)); |
| 1193 | } else if (output_fd != 2) { | 1199 | } else if (output_fd > 0) { |
| 1194 | mode = append_file ? "a" : "w"; | 1200 | mode = append_file ? "a" : "w"; |
| 1195 | output = fdopen(output_fd, mode); | 1201 | output = fdopen(output_fd, mode); |
| 1196 | if (!output) { | 1202 | if (!output) { |
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 2dd5edf161b7..e909d43cf542 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
| @@ -1942,7 +1942,6 @@ int perf_file_header__read(struct perf_file_header *header, | |||
| 1942 | else | 1942 | else |
| 1943 | return -1; | 1943 | return -1; |
| 1944 | } else if (ph->needs_swap) { | 1944 | } else if (ph->needs_swap) { |
| 1945 | unsigned int i; | ||
| 1946 | /* | 1945 | /* |
| 1947 | * feature bitmap is declared as an array of unsigned longs -- | 1946 | * feature bitmap is declared as an array of unsigned longs -- |
| 1948 | * not good since its size can differ between the host that | 1947 | * not good since its size can differ between the host that |
| @@ -1958,14 +1957,17 @@ int perf_file_header__read(struct perf_file_header *header, | |||
| 1958 | * file), punt and fallback to the original behavior -- | 1957 | * file), punt and fallback to the original behavior -- |
| 1959 | * clearing all feature bits and setting buildid. | 1958 | * clearing all feature bits and setting buildid. |
| 1960 | */ | 1959 | */ |
| 1961 | for (i = 0; i < BITS_TO_LONGS(HEADER_FEAT_BITS); ++i) | 1960 | mem_bswap_64(&header->adds_features, |
| 1962 | header->adds_features[i] = bswap_64(header->adds_features[i]); | 1961 | BITS_TO_U64(HEADER_FEAT_BITS)); |
| 1963 | 1962 | ||
| 1964 | if (!test_bit(HEADER_HOSTNAME, header->adds_features)) { | 1963 | if (!test_bit(HEADER_HOSTNAME, header->adds_features)) { |
| 1965 | for (i = 0; i < BITS_TO_LONGS(HEADER_FEAT_BITS); ++i) { | 1964 | /* unswap as u64 */ |
| 1966 | header->adds_features[i] = bswap_64(header->adds_features[i]); | 1965 | mem_bswap_64(&header->adds_features, |
| 1967 | header->adds_features[i] = bswap_32(header->adds_features[i]); | 1966 | BITS_TO_U64(HEADER_FEAT_BITS)); |
| 1968 | } | 1967 | |
| 1968 | /* unswap as u32 */ | ||
| 1969 | mem_bswap_32(&header->adds_features, | ||
| 1970 | BITS_TO_U32(HEADER_FEAT_BITS)); | ||
| 1969 | } | 1971 | } |
| 1970 | 1972 | ||
| 1971 | if (!test_bit(HEADER_HOSTNAME, header->adds_features)) { | 1973 | if (!test_bit(HEADER_HOSTNAME, header->adds_features)) { |
| @@ -2091,6 +2093,35 @@ static int read_attr(int fd, struct perf_header *ph, | |||
| 2091 | return ret <= 0 ? -1 : 0; | 2093 | return ret <= 0 ? -1 : 0; |
| 2092 | } | 2094 | } |
| 2093 | 2095 | ||
| 2096 | static int perf_evsel__set_tracepoint_name(struct perf_evsel *evsel) | ||
| 2097 | { | ||
| 2098 | struct event_format *event = trace_find_event(evsel->attr.config); | ||
| 2099 | char bf[128]; | ||
| 2100 | |||
| 2101 | if (event == NULL) | ||
| 2102 | return -1; | ||
| 2103 | |||
| 2104 | snprintf(bf, sizeof(bf), "%s:%s", event->system, event->name); | ||
| 2105 | evsel->name = strdup(bf); | ||
| 2106 | if (event->name == NULL) | ||
| 2107 | return -1; | ||
| 2108 | |||
| 2109 | return 0; | ||
| 2110 | } | ||
| 2111 | |||
| 2112 | static int perf_evlist__set_tracepoint_names(struct perf_evlist *evlist) | ||
| 2113 | { | ||
| 2114 | struct perf_evsel *pos; | ||
| 2115 | |||
| 2116 | list_for_each_entry(pos, &evlist->entries, node) { | ||
| 2117 | if (pos->attr.type == PERF_TYPE_TRACEPOINT && | ||
| 2118 | perf_evsel__set_tracepoint_name(pos)) | ||
| 2119 | return -1; | ||
| 2120 | } | ||
| 2121 | |||
| 2122 | return 0; | ||
| 2123 | } | ||
| 2124 | |||
| 2094 | int perf_session__read_header(struct perf_session *session, int fd) | 2125 | int perf_session__read_header(struct perf_session *session, int fd) |
| 2095 | { | 2126 | { |
| 2096 | struct perf_header *header = &session->header; | 2127 | struct perf_header *header = &session->header; |
| @@ -2172,6 +2203,9 @@ int perf_session__read_header(struct perf_session *session, int fd) | |||
| 2172 | 2203 | ||
| 2173 | lseek(fd, header->data_offset, SEEK_SET); | 2204 | lseek(fd, header->data_offset, SEEK_SET); |
| 2174 | 2205 | ||
| 2206 | if (perf_evlist__set_tracepoint_names(session->evlist)) | ||
| 2207 | goto out_delete_evlist; | ||
| 2208 | |||
| 2175 | header->frozen = 1; | 2209 | header->frozen = 1; |
| 2176 | return 0; | 2210 | return 0; |
| 2177 | out_errno: | 2211 | out_errno: |
diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h index f1584833bd22..587a230d2075 100644 --- a/tools/perf/util/include/linux/bitops.h +++ b/tools/perf/util/include/linux/bitops.h | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | #define BITS_PER_LONG __WORDSIZE | 8 | #define BITS_PER_LONG __WORDSIZE |
| 9 | #define BITS_PER_BYTE 8 | 9 | #define BITS_PER_BYTE 8 |
| 10 | #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) | 10 | #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) |
| 11 | #define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64)) | ||
| 12 | #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32)) | ||
| 11 | 13 | ||
| 12 | #define for_each_set_bit(bit, addr, size) \ | 14 | #define for_each_set_bit(bit, addr, size) \ |
| 13 | for ((bit) = find_first_bit((addr), (size)); \ | 15 | for ((bit) = find_first_bit((addr), (size)); \ |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 2600916efa83..c3e399bcf18d 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
| @@ -442,6 +442,16 @@ static void perf_tool__fill_defaults(struct perf_tool *tool) | |||
| 442 | tool->finished_round = process_finished_round_stub; | 442 | tool->finished_round = process_finished_round_stub; |
| 443 | } | 443 | } |
| 444 | } | 444 | } |
| 445 | |||
| 446 | void mem_bswap_32(void *src, int byte_size) | ||
| 447 | { | ||
| 448 | u32 *m = src; | ||
| 449 | while (byte_size > 0) { | ||
| 450 | *m = bswap_32(*m); | ||
| 451 | byte_size -= sizeof(u32); | ||
| 452 | ++m; | ||
| 453 | } | ||
| 454 | } | ||
| 445 | 455 | ||
| 446 | void mem_bswap_64(void *src, int byte_size) | 456 | void mem_bswap_64(void *src, int byte_size) |
| 447 | { | 457 | { |
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 7a5434c00565..0c702e3f0a36 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
| @@ -80,6 +80,7 @@ struct branch_info *machine__resolve_bstack(struct machine *self, | |||
| 80 | bool perf_session__has_traces(struct perf_session *self, const char *msg); | 80 | bool perf_session__has_traces(struct perf_session *self, const char *msg); |
| 81 | 81 | ||
| 82 | void mem_bswap_64(void *src, int byte_size); | 82 | void mem_bswap_64(void *src, int byte_size); |
| 83 | void mem_bswap_32(void *src, int byte_size); | ||
| 83 | void perf_event__attr_swap(struct perf_event_attr *attr); | 84 | void perf_event__attr_swap(struct perf_event_attr *attr); |
| 84 | 85 | ||
| 85 | int perf_session__create_kernel_maps(struct perf_session *self); | 86 | int perf_session__create_kernel_maps(struct perf_session *self); |
