Эх сурвалжийг харах

Merge tag 'asoc-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v4.2

The big thing this release has been Liam's addition of topology support
to the core.  We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.

 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares.
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring.
 - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
   TAS2552 drivers.
 - Support for TI TAS571x power amplifiers.
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
 - Support for x86 systems with RT5650 and Qualcomm Storm.
Takashi Iwai 10 жил өмнө
parent
commit
8ffc57093b
100 өөрчлөгдсөн 937 нэмэгдсэн , 391 устгасан
  1. 1 1
      Documentation/ABI/testing/sysfs-devices-system-cpu
  2. 3 1
      Documentation/devicetree/bindings/clock/silabs,si5351.txt
  3. 3 3
      Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
  4. 2 1
      Documentation/devicetree/bindings/net/cdns-emac.txt
  5. 4 0
      Documentation/devicetree/bindings/sound/adi,adau1701.txt
  6. 13 0
      Documentation/devicetree/bindings/sound/bt-sco.txt
  7. 13 0
      Documentation/devicetree/bindings/sound/gtm601.txt
  8. 6 0
      Documentation/devicetree/bindings/sound/max98090.txt
  9. 12 1
      Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
  10. 2 1
      Documentation/devicetree/bindings/sound/renesas,rsnd.txt
  11. 2 0
      Documentation/devicetree/bindings/sound/rt5677.txt
  12. 41 0
      Documentation/devicetree/bindings/sound/tas571x.txt
  13. 11 0
      Documentation/devicetree/bindings/sound/wm8741.txt
  14. 44 0
      Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
  15. 28 0
      Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
  16. 1 0
      Documentation/devicetree/bindings/vendor-prefixes.txt
  17. 1 1
      Documentation/hwmon/tmp401
  18. 3 0
      Documentation/serial/tty.txt
  19. 7 26
      Documentation/target/tcmu-design.txt
  20. 14 4
      Documentation/virtual/kvm/mmu.txt
  21. 50 22
      MAINTAINERS
  22. 1 1
      Makefile
  23. 10 6
      arch/alpha/boot/Makefile
  24. 0 1
      arch/alpha/boot/main.c
  25. 306 0
      arch/alpha/boot/stdio.c
  26. 3 0
      arch/alpha/boot/tools/objstrip.c
  27. 0 1
      arch/alpha/include/asm/types.h
  28. 1 1
      arch/alpha/include/asm/unistd.h
  29. 3 0
      arch/alpha/include/uapi/asm/unistd.h
  30. 0 1
      arch/alpha/kernel/err_ev6.c
  31. 0 1
      arch/alpha/kernel/irq.c
  32. 1 2
      arch/alpha/kernel/osf_sys.c
  33. 3 4
      arch/alpha/kernel/process.c
  34. 1 7
      arch/alpha/kernel/smp.c
  35. 1 2
      arch/alpha/kernel/srmcons.c
  36. 1 1
      arch/alpha/kernel/sys_marvel.c
  37. 3 0
      arch/alpha/kernel/systbls.S
  38. 0 1
      arch/alpha/kernel/traps.c
  39. 0 1
      arch/alpha/oprofile/op_model_ev4.c
  40. 0 1
      arch/alpha/oprofile/op_model_ev5.c
  41. 0 1
      arch/alpha/oprofile/op_model_ev6.c
  42. 0 1
      arch/alpha/oprofile/op_model_ev67.c
  43. 0 13
      arch/arc/Kconfig.debug
  44. 1 1
      arch/arc/include/asm/atomic.h
  45. 2 2
      arch/arc/mm/cache_arc700.c
  46. 1 1
      arch/arm/boot/dts/Makefile
  47. 0 4
      arch/arm/boot/dts/am335x-boneblack.dts
  48. 1 1
      arch/arm/boot/dts/am335x-evmsk.dts
  49. 1 1
      arch/arm/boot/dts/armada-375.dtsi
  50. 1 1
      arch/arm/boot/dts/armada-38x.dtsi
  51. 1 1
      arch/arm/boot/dts/armada-39x.dtsi
  52. 1 0
      arch/arm/boot/dts/dove-cubox.dts
  53. 1 1
      arch/arm/boot/dts/exynos4412-trats2.dts
  54. 1 0
      arch/arm/boot/dts/exynos5420-peach-pit.dts
  55. 1 0
      arch/arm/boot/dts/exynos5800-peach-pi.dts
  56. 1 1
      arch/arm/boot/dts/imx27.dtsi
  57. 2 0
      arch/arm/boot/dts/omap3-devkit8000.dts
  58. 4 4
      arch/arm/boot/dts/tegra124.dtsi
  59. 1 0
      arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
  60. 7 4
      arch/arm/boot/dts/vexpress-v2p-ca9.dts
  61. 2 2
      arch/arm/boot/dts/zynq-7000.dtsi
  62. 1 1
      arch/arm/configs/multi_v7_defconfig
  63. 3 1
      arch/arm/kernel/entry-common.S
  64. 5 4
      arch/arm/kernel/perf_event_cpu.c
  65. 2 0
      arch/arm/mach-exynos/common.h
  66. 27 0
      arch/arm/mach-exynos/exynos.c
  67. 2 37
      arch/arm/mach-exynos/platsmp.c
  68. 2 2
      arch/arm/mach-exynos/pm_domains.c
  69. 6 1
      arch/arm/mach-exynos/suspend.c
  70. 3 1
      arch/arm/mach-gemini/common.h
  71. 3 1
      arch/arm/mach-gemini/reset.c
  72. 13 3
      arch/arm/mach-imx/gpc.c
  73. 14 54
      arch/arm/mach-omap2/omap_hwmod.c
  74. 70 0
      arch/arm/mach-omap2/omap_hwmod_43xx_data.c
  75. 2 1
      arch/arm/mach-omap2/prcm43xx.h
  76. 7 13
      arch/arm/mach-omap2/prminst44xx.c
  77. 5 8
      arch/arm/mach-omap2/timer.c
  78. 1 1
      arch/arm/mach-pxa/pxa_cplds_irqs.c
  79. 0 26
      arch/arm/mach-rockchip/pm.c
  80. 0 4
      arch/arm/mach-rockchip/pm.h
  81. 10 10
      arch/arm/mm/mmu.c
  82. 39 3
      arch/arm/net/bpf_jit_32.c
  83. 1 0
      arch/arm/xen/enlighten.c
  84. 27 4
      arch/arm64/boot/dts/arm/juno-motherboard.dtsi
  85. 19 3
      arch/arm64/crypto/crc32-arm64.c
  86. 3 0
      arch/arm64/crypto/sha1-ce-glue.c
  87. 3 0
      arch/arm64/crypto/sha2-ce-glue.c
  88. 1 52
      arch/arm64/kernel/alternative.c
  89. 4 4
      arch/arm64/kernel/perf_event.c
  90. 2 0
      arch/arm64/mm/dump.c
  91. 1 1
      arch/arm64/net/bpf_jit_comp.c
  92. 10 3
      arch/ia64/pci/pci.c
  93. 1 1
      arch/mips/Makefile
  94. 3 0
      arch/mips/ath79/prom.c
  95. 1 1
      arch/mips/configs/fuloong2e_defconfig
  96. 2 2
      arch/mips/include/asm/elf.h
  97. 1 1
      arch/mips/include/asm/smp.h
  98. 17 15
      arch/mips/kernel/elf.c
  99. 1 1
      arch/mips/kernel/irq.c
  100. 1 1
      arch/mips/kernel/ptrace.c

+ 1 - 1
Documentation/ABI/testing/sysfs-devices-system-cpu

@@ -162,7 +162,7 @@ Description:	Discover CPUs in the same CPU frequency coordination domain
 What:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
 What:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
 Date:		August 2008
 Date:		August 2008
 KernelVersion:	2.6.27
 KernelVersion:	2.6.27
-Contact:	discuss@x86-64.org
+Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
 Description:	Disable L3 cache indices
 Description:	Disable L3 cache indices
 
 
 		These files exist in every CPU's cache/index3 directory. Each
 		These files exist in every CPU's cache/index3 directory. Each

+ 3 - 1
Documentation/devicetree/bindings/clock/silabs,si5351.txt

@@ -17,7 +17,8 @@ Required properties:
 - #clock-cells: from common clock binding; shall be set to 1.
 - #clock-cells: from common clock binding; shall be set to 1.
 - clocks: from common clock binding; list of parent clock
 - clocks: from common clock binding; list of parent clock
   handles, shall be xtal reference clock or xtal and clkin for
   handles, shall be xtal reference clock or xtal and clkin for
-  si5351c only.
+  si5351c only. Corresponding clock input names are "xtal" and
+  "clkin" respectively.
 - #address-cells: shall be set to 1.
 - #address-cells: shall be set to 1.
 - #size-cells: shall be set to 0.
 - #size-cells: shall be set to 0.
 
 
@@ -71,6 +72,7 @@ i2c-master-node {
 
 
 		/* connect xtal input to 25MHz reference */
 		/* connect xtal input to 25MHz reference */
 		clocks = <&ref25>;
 		clocks = <&ref25>;
+		clock-names = "xtal";
 
 
 		/* connect xtal input as source of pll0 and pll1 */
 		/* connect xtal input as source of pll0 and pll1 */
 		silabs,pll-source = <0 0>, <1 0>;
 		silabs,pll-source = <0 0>, <1 0>;

+ 3 - 3
Documentation/devicetree/bindings/mtd/m25p80.txt → Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt

@@ -8,8 +8,8 @@ Required properties:
                is not Linux-only, but in case of Linux, see the "m25p_ids"
                is not Linux-only, but in case of Linux, see the "m25p_ids"
                table in drivers/mtd/devices/m25p80.c for the list of supported
                table in drivers/mtd/devices/m25p80.c for the list of supported
                chips.
                chips.
-               Must also include "nor-jedec" for any SPI NOR flash that can be
-               identified by the JEDEC READ ID opcode (0x9F).
+               Must also include "jedec,spi-nor" for any SPI NOR flash that can
+               be identified by the JEDEC READ ID opcode (0x9F).
 - reg : Chip-Select number
 - reg : Chip-Select number
 - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
 - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
 
 
@@ -25,7 +25,7 @@ Example:
 	flash: m25p80@0 {
 	flash: m25p80@0 {
 		#address-cells = <1>;
 		#address-cells = <1>;
 		#size-cells = <1>;
 		#size-cells = <1>;
-		compatible = "spansion,m25p80", "nor-jedec";
+		compatible = "spansion,m25p80", "jedec,spi-nor";
 		reg = <0>;
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 		spi-max-frequency = <40000000>;
 		m25p,fast-read;
 		m25p,fast-read;

+ 2 - 1
Documentation/devicetree/bindings/net/cdns-emac.txt

@@ -3,7 +3,8 @@
 Required properties:
 Required properties:
 - compatible: Should be "cdns,[<chip>-]{emac}"
 - compatible: Should be "cdns,[<chip>-]{emac}"
   Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
   Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
-  or the generic form: "cdns,emac".
+  Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
+  Or the generic form: "cdns,emac".
 - reg: Address and length of the register set for the device
 - reg: Address and length of the register set for the device
 - interrupts: Should contain macb interrupt
 - interrupts: Should contain macb interrupt
 - phy-mode: see ethernet.txt file in the same directory.
 - phy-mode: see ethernet.txt file in the same directory.

+ 4 - 0
Documentation/devicetree/bindings/sound/adi,adau1701.txt

@@ -20,6 +20,8 @@ Optional properties:
 			pin configurations as described in the datasheet,
 			pin configurations as described in the datasheet,
 			table 53. Note that the value of this property has
 			table 53. Note that the value of this property has
 			to be prefixed with '/bits/ 8'.
 			to be prefixed with '/bits/ 8'.
+ - avdd-supply: 	Power supply for AVDD, providing 3.3V
+ - dvdd-supply: 	Power supply for DVDD, providing 3.3V
 
 
 Examples:
 Examples:
 
 
@@ -28,6 +30,8 @@ Examples:
 			compatible = "adi,adau1701";
 			compatible = "adi,adau1701";
 			reg = <0x34>;
 			reg = <0x34>;
 			reset-gpio = <&gpio 23 0>;
 			reset-gpio = <&gpio 23 0>;
+			avdd-supply = <&vdd_3v3_reg>;
+			dvdd-supply = <&vdd_3v3_reg>;
 			adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>;
 			adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>;
 			adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4
 			adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4
                                                    0x4 0x4 0x4 0x4 0x4 0x4>;
                                                    0x4 0x4 0x4 0x4 0x4 0x4>;

+ 13 - 0
Documentation/devicetree/bindings/sound/bt-sco.txt

@@ -0,0 +1,13 @@
+Bluetooth-SCO audio CODEC
+
+This device support generic Bluetooth SCO link.
+
+Required properties:
+
+  - compatible : "delta,dfbmcs320"
+
+Example:
+
+codec: bt_sco {
+	compatible = "delta,dfbmcs320";
+};

+ 13 - 0
Documentation/devicetree/bindings/sound/gtm601.txt

@@ -0,0 +1,13 @@
+GTM601 UMTS modem audio interface CODEC
+
+This device has no configuration interface. Sample rate is fixed - 8kHz.
+
+Required properties:
+
+  - compatible : "option,gtm601"
+
+Example:
+
+codec: gtm601_codec {
+	compatible = "option,gtm601";
+};

+ 6 - 0
Documentation/devicetree/bindings/sound/max98090.txt

@@ -18,6 +18,12 @@ Optional properties:
 
 
 - maxim,dmic-freq: Frequency at which to clock DMIC
 - maxim,dmic-freq: Frequency at which to clock DMIC
 
 
+- maxim,micbias: Micbias voltage applies to the analog mic, valid voltages value are:
+	0 - 2.2v
+	1 - 2.55v
+	2 - 2.4v
+	3 - 2.8v
+
 Pins on the device (for linking into audio routes):
 Pins on the device (for linking into audio routes):
 
 
   * MIC1
   * MIC1

+ 12 - 1
Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt

@@ -4,12 +4,21 @@ This node models the Qualcomm Technologies Low-Power Audio SubSystem (LPASS).
 
 
 Required properties:
 Required properties:
 
 
-- compatible		: "qcom,lpass-cpu"
+- compatible		: "qcom,lpass-cpu" or "qcom,apq8016-lpass-cpu"
 - clocks		: Must contain an entry for each entry in clock-names.
 - clocks		: Must contain an entry for each entry in clock-names.
 - clock-names		: A list which must include the following entries:
 - clock-names		: A list which must include the following entries:
 				* "ahbix-clk"
 				* "ahbix-clk"
 				* "mi2s-osr-clk"
 				* "mi2s-osr-clk"
 				* "mi2s-bit-clk"
 				* "mi2s-bit-clk"
+			: required clocks for "qcom,lpass-cpu-apq8016"
+				* "ahbix-clk"
+				* "mi2s-bit-clk0"
+				* "mi2s-bit-clk1"
+				* "mi2s-bit-clk2"
+				* "mi2s-bit-clk3"
+				* "pcnoc-mport-clk"
+				* "pcnoc-sway-clk"
+
 - interrupts		: Must contain an entry for each entry in
 - interrupts		: Must contain an entry for each entry in
 			  interrupt-names.
 			  interrupt-names.
 - interrupt-names	: A list which must include the following entries:
 - interrupt-names	: A list which must include the following entries:
@@ -22,6 +31,8 @@ Required properties:
 - reg-names		: A list which must include the following entries:
 - reg-names		: A list which must include the following entries:
 				* "lpass-lpaif"
 				* "lpass-lpaif"
 
 
+
+
 Optional properties:
 Optional properties:
 
 
 - qcom,adsp		: Phandle for the audio DSP node
 - qcom,adsp		: Phandle for the audio DSP node

+ 2 - 1
Documentation/devicetree/bindings/sound/renesas,rsnd.txt

@@ -5,6 +5,7 @@ Required properties:
 				  "renesas,rcar_sound-gen1" if generation1, and
 				  "renesas,rcar_sound-gen1" if generation1, and
 				  "renesas,rcar_sound-gen2" if generation2
 				  "renesas,rcar_sound-gen2" if generation2
 				  Examples with soctypes are:
 				  Examples with soctypes are:
+				    - "renesas,rcar_sound-r8a7778" (R-Car M1A)
 				    - "renesas,rcar_sound-r8a7790" (R-Car H2)
 				    - "renesas,rcar_sound-r8a7790" (R-Car H2)
 				    - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
 				    - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
 - reg				: Should contain the register physical address.
 - reg				: Should contain the register physical address.
@@ -47,7 +48,7 @@ DAI subnode properties:
 
 
 Example:
 Example:
 
 
-rcar_sound: rcar_sound@ec500000 {
+rcar_sound: sound@ec500000 {
 	#sound-dai-cells = <1>;
 	#sound-dai-cells = <1>;
 	compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
 	compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
 	reg =	<0 0xec500000 0 0x1000>, /* SCU */
 	reg =	<0 0xec500000 0 0x1000>, /* SCU */

+ 2 - 0
Documentation/devicetree/bindings/sound/rt5677.txt

@@ -18,6 +18,7 @@ Required properties:
 Optional properties:
 Optional properties:
 
 
 - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin.
 - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin.
+- realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin.
 
 
 - realtek,in1-differential
 - realtek,in1-differential
 - realtek,in2-differential
 - realtek,in2-differential
@@ -70,6 +71,7 @@ rt5677 {
 
 
 	realtek,pow-ldo2-gpio =
 	realtek,pow-ldo2-gpio =
 		<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
 		<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
+	realtek,reset-gpio = <&gpio TEGRA_GPIO(BB, 3) GPIO_ACTIVE_LOW>;
 	realtek,in1-differential = "true";
 	realtek,in1-differential = "true";
 	realtek,gpio-config = /bits/ 8  <0 0 0 0 0 2>;   /* pull up GPIO6 */
 	realtek,gpio-config = /bits/ 8  <0 0 0 0 0 2>;   /* pull up GPIO6 */
 	realtek,jd2-gpio = <3>;  /* Enables Jack detection for GPIO6 */
 	realtek,jd2-gpio = <3>;  /* Enables Jack detection for GPIO6 */

+ 41 - 0
Documentation/devicetree/bindings/sound/tas571x.txt

@@ -0,0 +1,41 @@
+Texas Instruments TAS5711/TAS5717/TAS5719 stereo power amplifiers
+
+The codec is controlled through an I2C interface.  It also has two other
+signals that can be wired up to GPIOs: reset (strongly recommended), and
+powerdown (optional).
+
+Required properties:
+
+- compatible: "ti,tas5711", "ti,tas5717", or "ti,tas5719"
+- reg: The I2C address of the device
+- #sound-dai-cells: must be equal to 0
+
+Optional properties:
+
+- reset-gpios: GPIO specifier for the TAS571x's active low reset line
+- pdn-gpios: GPIO specifier for the TAS571x's active low powerdown line
+- clocks: clock phandle for the MCLK input
+- clock-names: should be "mclk"
+- AVDD-supply: regulator phandle for the AVDD supply (all chips)
+- DVDD-supply: regulator phandle for the DVDD supply (all chips)
+- HPVDD-supply: regulator phandle for the HPVDD supply (5717/5719)
+- PVDD_AB-supply: regulator phandle for the PVDD_AB supply (5717/5719)
+- PVDD_CD-supply: regulator phandle for the PVDD_CD supply (5717/5719)
+- PVDD_A-supply: regulator phandle for the PVDD_A supply (5711)
+- PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
+- PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
+- PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
+
+Example:
+
+	tas5717: audio-codec@2a {
+		compatible = "ti,tas5717";
+		reg = <0x2a>;
+		#sound-dai-cells = <0>;
+
+		reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
+		pdn-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
+
+		clocks = <&clk_core CLK_I2S>;
+		clock-names = "mclk";
+	};

+ 11 - 0
Documentation/devicetree/bindings/sound/wm8741.txt

@@ -10,9 +10,20 @@ Required properties:
   - reg : the I2C address of the device for I2C, the chip select
   - reg : the I2C address of the device for I2C, the chip select
           number for SPI.
           number for SPI.
 
 
+Optional properties:
+
+  - diff-mode: Differential output mode configuration. Default value for field
+    DIFF in register R8 (MODE_CONTROL_2). If absent, the default is 0, shall be:
+    0 = stereo
+    1 = mono left
+    2 = stereo reversed
+    3 = mono right
+
 Example:
 Example:
 
 
 codec: wm8741@1a {
 codec: wm8741@1a {
 	compatible = "wlf,wm8741";
 	compatible = "wlf,wm8741";
 	reg = <0x1a>;
 	reg = <0x1a>;
+
+	diff-mode = <3>;
 };
 };

+ 44 - 0
Documentation/devicetree/bindings/sound/zte,zx-i2s.txt

@@ -0,0 +1,44 @@
+ZTE ZX296702 I2S controller
+
+Required properties:
+ - compatible : Must be "zte,zx296702-i2s"
+ - reg : Must contain I2S core's registers location and length
+ - clocks : Pairs of phandle and specifier referencing the controller's clocks.
+ - clock-names: "tx" for the clock to the I2S interface.
+ - dmas: Pairs of phandle and specifier for the DMA channel that is used by
+   the core. The core expects two dma channels for transmit.
+ - dma-names : Must be "tx" and "rx"
+
+For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
+please check:
+	* resource-names.txt
+	* clock/clock-bindings.txt
+	* dma/dma.txt
+
+Example:
+	i2s0: i2s0@0b005000 {
+		#sound-dai-cells = <0>;
+		compatible = "zte,zx296702-i2s";
+		reg = <0x0b005000 0x1000>;
+		clocks = <&lsp0clk ZX296702_I2S0_DIV>;
+		clock-names = "tx";
+		interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+		dmas = <&dma 5>, <&dma 6>;
+		dma-names = "tx", "rx";
+		status = "okay";
+	};
+
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "zx296702_snd";
+		simple-audio-card,format = "left_j";
+		simple-audio-card,bitclock-master = <&sndcodec>;
+		simple-audio-card,frame-master = <&sndcodec>;
+		sndcpu: simple-audio-card,cpu {
+			sound-dai = <&i2s0>;
+		};
+
+		sndcodec: simple-audio-card,codec {
+			sound-dai = <&acodec>;
+		};
+	};

+ 28 - 0
Documentation/devicetree/bindings/sound/zte,zx-spdif.txt

@@ -0,0 +1,28 @@
+ZTE ZX296702 SPDIF controller
+
+Required properties:
+ - compatible : Must be "zte,zx296702-spdif"
+ - reg : Must contain SPDIF core's registers location and length
+ - clocks : Pairs of phandle and specifier referencing the controller's clocks.
+ - clock-names: "tx" for the clock to the SPDIF interface.
+ - dmas: Pairs of phandle and specifier for the DMA channel that is used by
+   the core. The core expects one dma channel for transmit.
+ - dma-names : Must be "tx"
+
+For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
+please check:
+	* resource-names.txt
+	* clock/clock-bindings.txt
+	* dma/dma.txt
+
+Example:
+	spdif0: spdif0@0b004000 {
+		compatible = "zte,zx296702-spdif";
+		reg = <0x0b004000 0x1000>;
+		clocks = <&lsp0clk ZX296702_SPDIF0_DIV>;
+		clock-names = "tx";
+		interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+		dmas = <&dma 4>;
+		dma-names = "tx";
+		status = "okay";
+	};

+ 1 - 0
Documentation/devicetree/bindings/vendor-prefixes.txt

@@ -54,6 +54,7 @@ cosmic	Cosmic Circuits
 crystalfontz	Crystalfontz America, Inc.
 crystalfontz	Crystalfontz America, Inc.
 dallas	Maxim Integrated Products (formerly Dallas Semiconductor)
 dallas	Maxim Integrated Products (formerly Dallas Semiconductor)
 davicom	DAVICOM Semiconductor, Inc.
 davicom	DAVICOM Semiconductor, Inc.
+delta	Delta Electronics, Inc.
 denx	Denx Software Engineering
 denx	Denx Software Engineering
 digi	Digi International Inc.
 digi	Digi International Inc.
 digilent	Diglent, Inc.
 digilent	Diglent, Inc.

+ 1 - 1
Documentation/hwmon/tmp401

@@ -20,7 +20,7 @@ Supported chips:
     Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
     Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
   * Texas Instruments TMP435
   * Texas Instruments TMP435
     Prefix: 'tmp435'
     Prefix: 'tmp435'
-    Addresses scanned: I2C 0x37, 0x48 - 0x4f
+    Addresses scanned: I2C 0x48 - 0x4f
     Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
     Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
 
 
 Authors:
 Authors:

+ 3 - 0
Documentation/serial/tty.txt

@@ -198,6 +198,9 @@ TTY_IO_ERROR		If set, causes all subsequent userspace read/write
 
 
 TTY_OTHER_CLOSED	Device is a pty and the other side has closed.
 TTY_OTHER_CLOSED	Device is a pty and the other side has closed.
 
 
+TTY_OTHER_DONE		Device is a pty and the other side has closed and
+			all pending input processing has been completed.
+
 TTY_NO_WRITE_SPLIT	Prevent driver from splitting up writes into
 TTY_NO_WRITE_SPLIT	Prevent driver from splitting up writes into
 			smaller chunks.
 			smaller chunks.
 
 

+ 7 - 26
Documentation/target/tcmu-design.txt

@@ -15,8 +15,7 @@ Contents:
   a) Discovering and configuring TCMU uio devices
   a) Discovering and configuring TCMU uio devices
   b) Waiting for events on the device(s)
   b) Waiting for events on the device(s)
   c) Managing the command ring
   c) Managing the command ring
-3) Command filtering and pass_level
-4) A final note
+3) A final note
 
 
 
 
 TCM Userspace Design
 TCM Userspace Design
@@ -324,7 +323,7 @@ int handle_device_events(int fd, void *map)
   /* Process events from cmd ring until we catch up with cmd_head */
   /* Process events from cmd ring until we catch up with cmd_head */
   while (ent != (void *)mb + mb->cmdr_off + mb->cmd_head) {
   while (ent != (void *)mb + mb->cmdr_off + mb->cmd_head) {
 
 
-    if (tcmu_hdr_get_op(&ent->hdr) == TCMU_OP_CMD) {
+    if (tcmu_hdr_get_op(ent->hdr.len_op) == TCMU_OP_CMD) {
       uint8_t *cdb = (void *)mb + ent->req.cdb_off;
       uint8_t *cdb = (void *)mb + ent->req.cdb_off;
       bool success = true;
       bool success = true;
 
 
@@ -339,8 +338,12 @@ int handle_device_events(int fd, void *map)
         ent->rsp.scsi_status = SCSI_CHECK_CONDITION;
         ent->rsp.scsi_status = SCSI_CHECK_CONDITION;
       }
       }
     }
     }
+    else if (tcmu_hdr_get_op(ent->hdr.len_op) != TCMU_OP_PAD) {
+      /* Tell the kernel we didn't handle unknown opcodes */
+      ent->hdr.uflags |= TCMU_UFLAG_UNKNOWN_OP;
+    }
     else {
     else {
-      /* Do nothing for PAD entries */
+      /* Do nothing for PAD entries except update cmd_tail */
     }
     }
 
 
     /* update cmd_tail */
     /* update cmd_tail */
@@ -360,28 +363,6 @@ int handle_device_events(int fd, void *map)
 }
 }
 
 
 
 
-Command filtering and pass_level
---------------------------------
-
-TCMU supports a "pass_level" option with valid values of 0 or 1.  When
-the value is 0 (the default), nearly all SCSI commands received for
-the device are passed through to the handler. This allows maximum
-flexibility but increases the amount of code required by the handler,
-to support all mandatory SCSI commands. If pass_level is set to 1,
-then only IO-related commands are presented, and the rest are handled
-by LIO's in-kernel command emulation. The commands presented at level
-1 include all versions of:
-
-READ
-WRITE
-WRITE_VERIFY
-XDWRITEREAD
-WRITE_SAME
-COMPARE_AND_WRITE
-SYNCHRONIZE_CACHE
-UNMAP
-
-
 A final note
 A final note
 ------------
 ------------
 
 

+ 14 - 4
Documentation/virtual/kvm/mmu.txt

@@ -169,6 +169,10 @@ Shadow pages contain the following information:
     Contains the value of cr4.smep && !cr0.wp for which the page is valid
     Contains the value of cr4.smep && !cr0.wp for which the page is valid
     (pages for which this is true are different from other pages; see the
     (pages for which this is true are different from other pages; see the
     treatment of cr0.wp=0 below).
     treatment of cr0.wp=0 below).
+  role.smap_andnot_wp:
+    Contains the value of cr4.smap && !cr0.wp for which the page is valid
+    (pages for which this is true are different from other pages; see the
+    treatment of cr0.wp=0 below).
   gfn:
   gfn:
     Either the guest page table containing the translations shadowed by this
     Either the guest page table containing the translations shadowed by this
     page, or the base page frame for linear translations.  See role.direct.
     page, or the base page frame for linear translations.  See role.direct.
@@ -344,10 +348,16 @@ on fault type:
 
 
 (user write faults generate a #PF)
 (user write faults generate a #PF)
 
 
-In the first case there is an additional complication if CR4.SMEP is
-enabled: since we've turned the page into a kernel page, the kernel may now
-execute it.  We handle this by also setting spte.nx.  If we get a user
-fetch or read fault, we'll change spte.u=1 and spte.nx=gpte.nx back.
+In the first case there are two additional complications:
+- if CR4.SMEP is enabled: since we've turned the page into a kernel page,
+  the kernel may now execute it.  We handle this by also setting spte.nx.
+  If we get a user fetch or read fault, we'll change spte.u=1 and
+  spte.nx=gpte.nx back.
+- if CR4.SMAP is disabled: since the page has been changed to a kernel
+  page, it can not be reused when CR4.SMAP is enabled. We set
+  CR4.SMAP && !CR0.WP into shadow page's role to avoid this case. Note,
+  here we do not care the case that CR4.SMAP is enabled since KVM will
+  directly inject #PF to guest due to failed permission check.
 
 
 To prevent an spte that was converted into a kernel page with cr0.wp=0
 To prevent an spte that was converted into a kernel page with cr0.wp=0
 from being written by the kernel after cr0.wp has changed to 1, we make
 from being written by the kernel after cr0.wp has changed to 1, we make

+ 50 - 22
MAINTAINERS

@@ -974,7 +974,7 @@ S:	Maintained
 ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
 ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
 M:	Hans Ulli Kroll <ulli.kroll@googlemail.com>
 M:	Hans Ulli Kroll <ulli.kroll@googlemail.com>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-T:	git git://git.berlios.de/gemini-board
+T:	git git://github.com/ulli-kroll/linux.git
 S:	Maintained
 S:	Maintained
 F:	arch/arm/mach-gemini/
 F:	arch/arm/mach-gemini/
 
 
@@ -1193,7 +1193,7 @@ ARM/MAGICIAN MACHINE SUPPORT
 M:	Philipp Zabel <philipp.zabel@gmail.com>
 M:	Philipp Zabel <philipp.zabel@gmail.com>
 S:	Maintained
 S:	Maintained
 
 
-ARM/Marvell Armada 370 and Armada XP SOC support
+ARM/Marvell Kirkwood and Armada 370, 375, 38x, XP SOC support
 M:	Jason Cooper <jason@lakedaemon.net>
 M:	Jason Cooper <jason@lakedaemon.net>
 M:	Andrew Lunn <andrew@lunn.ch>
 M:	Andrew Lunn <andrew@lunn.ch>
 M:	Gregory Clement <gregory.clement@free-electrons.com>
 M:	Gregory Clement <gregory.clement@free-electrons.com>
@@ -1202,12 +1202,17 @@ L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
 S:	Maintained
 F:	arch/arm/mach-mvebu/
 F:	arch/arm/mach-mvebu/
 F:	drivers/rtc/rtc-armada38x.c
 F:	drivers/rtc/rtc-armada38x.c
+F:	arch/arm/boot/dts/armada*
+F:	arch/arm/boot/dts/kirkwood*
+
 
 
 ARM/Marvell Berlin SoC support
 ARM/Marvell Berlin SoC support
 M:	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 M:	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
 S:	Maintained
 F:	arch/arm/mach-berlin/
 F:	arch/arm/mach-berlin/
+F:	arch/arm/boot/dts/berlin*
+
 
 
 ARM/Marvell Dove/MV78xx0/Orion SOC support
 ARM/Marvell Dove/MV78xx0/Orion SOC support
 M:	Jason Cooper <jason@lakedaemon.net>
 M:	Jason Cooper <jason@lakedaemon.net>
@@ -1220,6 +1225,9 @@ F:	arch/arm/mach-dove/
 F:	arch/arm/mach-mv78xx0/
 F:	arch/arm/mach-mv78xx0/
 F:	arch/arm/mach-orion5x/
 F:	arch/arm/mach-orion5x/
 F:	arch/arm/plat-orion/
 F:	arch/arm/plat-orion/
+F:	arch/arm/boot/dts/dove*
+F:	arch/arm/boot/dts/orion5x*
+
 
 
 ARM/Orion SoC/Technologic Systems TS-78xx platform support
 ARM/Orion SoC/Technologic Systems TS-78xx platform support
 M:	Alexander Clouter <alex@digriz.org.uk>
 M:	Alexander Clouter <alex@digriz.org.uk>
@@ -1371,6 +1379,7 @@ N:	rockchip
 
 
 ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
 ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
 M:	Kukjin Kim <kgene@kernel.org>
 M:	Kukjin Kim <kgene@kernel.org>
+M:	Krzysztof Kozlowski <k.kozlowski@samsung.com>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 S:	Maintained
 S:	Maintained
@@ -1935,7 +1944,7 @@ S:	Maintained
 F:	drivers/net/wireless/b43legacy/
 F:	drivers/net/wireless/b43legacy/
 
 
 BACKLIGHT CLASS/SUBSYSTEM
 BACKLIGHT CLASS/SUBSYSTEM
-M:	Jingoo Han <jg1.han@samsung.com>
+M:	Jingoo Han <jingoohan1@gmail.com>
 M:	Lee Jones <lee.jones@linaro.org>
 M:	Lee Jones <lee.jones@linaro.org>
 S:	Maintained
 S:	Maintained
 F:	drivers/video/backlight/
 F:	drivers/video/backlight/
@@ -2418,7 +2427,6 @@ L:	linux-security-module@vger.kernel.org
 S:	Supported
 S:	Supported
 F:	include/linux/capability.h
 F:	include/linux/capability.h
 F:	include/uapi/linux/capability.h
 F:	include/uapi/linux/capability.h
-F:	security/capability.c
 F:	security/commoncap.c
 F:	security/commoncap.c
 F:	kernel/capability.c
 F:	kernel/capability.c
 
 
@@ -3816,10 +3824,11 @@ M:	David Woodhouse <dwmw2@infradead.org>
 L:	linux-embedded@vger.kernel.org
 L:	linux-embedded@vger.kernel.org
 S:	Maintained
 S:	Maintained
 
 
-EMULEX LPFC FC SCSI DRIVER
-M:	James Smart <james.smart@emulex.com>
+EMULEX/AVAGO LPFC FC/FCOE SCSI DRIVER
+M:	James Smart <james.smart@avagotech.com>
+M:	Dick Kennedy <dick.kennedy@avagotech.com>
 L:	linux-scsi@vger.kernel.org
 L:	linux-scsi@vger.kernel.org
-W:	http://sourceforge.net/projects/lpfcxxxx
+W:	http://www.avagotech.com
 S:	Supported
 S:	Supported
 F:	drivers/scsi/lpfc/
 F:	drivers/scsi/lpfc/
 
 
@@ -3918,7 +3927,7 @@ F:	drivers/extcon/
 F:	Documentation/extcon/
 F:	Documentation/extcon/
 
 
 EXYNOS DP DRIVER
 EXYNOS DP DRIVER
-M:	Jingoo Han <jg1.han@samsung.com>
+M:	Jingoo Han <jingoohan1@gmail.com>
 L:	dri-devel@lists.freedesktop.org
 L:	dri-devel@lists.freedesktop.org
 S:	Maintained
 S:	Maintained
 F:	drivers/gpu/drm/exynos/exynos_dp*
 F:	drivers/gpu/drm/exynos/exynos_dp*
@@ -4377,11 +4386,10 @@ F:	fs/gfs2/
 F:	include/uapi/linux/gfs2_ondisk.h
 F:	include/uapi/linux/gfs2_ondisk.h
 
 
 GIGASET ISDN DRIVERS
 GIGASET ISDN DRIVERS
-M:	Hansjoerg Lipp <hjlipp@web.de>
-M:	Tilman Schmidt <tilman@imap.cc>
+M:	Paul Bolle <pebolle@tiscali.nl>
 L:	gigaset307x-common@lists.sourceforge.net
 L:	gigaset307x-common@lists.sourceforge.net
 W:	http://gigaset307x.sourceforge.net/
 W:	http://gigaset307x.sourceforge.net/
-S:	Maintained
+S:	Odd Fixes
 F:	Documentation/isdn/README.gigaset
 F:	Documentation/isdn/README.gigaset
 F:	drivers/isdn/gigaset/
 F:	drivers/isdn/gigaset/
 F:	include/uapi/linux/gigaset_dev.h
 F:	include/uapi/linux/gigaset_dev.h
@@ -4528,7 +4536,7 @@ M:	Jean Delvare <jdelvare@suse.de>
 M:	Guenter Roeck <linux@roeck-us.net>
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	lm-sensors@lm-sensors.org
 L:	lm-sensors@lm-sensors.org
 W:	http://www.lm-sensors.org/
 W:	http://www.lm-sensors.org/
-T:	quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/
+T:	quilt http://jdelvare.nerim.net/devel/linux/jdelvare-hwmon/
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
 S:	Maintained
 S:	Maintained
 F:	Documentation/hwmon/
 F:	Documentation/hwmon/
@@ -5054,7 +5062,7 @@ M:	Hal Rosenstock <hal.rosenstock@gmail.com>
 L:	linux-rdma@vger.kernel.org
 L:	linux-rdma@vger.kernel.org
 W:	http://www.openfabrics.org/
 W:	http://www.openfabrics.org/
 Q:	http://patchwork.kernel.org/project/linux-rdma/list/
 Q:	http://patchwork.kernel.org/project/linux-rdma/list/
-T:	git git://github.com/dledford/linux.git
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
 S:	Supported
 S:	Supported
 F:	Documentation/infiniband/
 F:	Documentation/infiniband/
 F:	drivers/infiniband/
 F:	drivers/infiniband/
@@ -6959,6 +6967,17 @@ T:	git git://git.rocketboards.org/linux-socfpga-next.git
 S:	Maintained
 S:	Maintained
 F:	arch/nios2/
 F:	arch/nios2/
 
 
+NOKIA N900 POWER SUPPLY DRIVERS
+M:	Pali Rohár <pali.rohar@gmail.com>
+S:	Maintained
+F:	include/linux/power/bq2415x_charger.h
+F:	include/linux/power/bq27x00_battery.h
+F:	include/linux/power/isp1704_charger.h
+F:	drivers/power/bq2415x_charger.c
+F:	drivers/power/bq27x00_battery.c
+F:	drivers/power/isp1704_charger.c
+F:	drivers/power/rx51_battery.c
+
 NTB DRIVER
 NTB DRIVER
 M:	Jon Mason <jdmason@kudzu.us>
 M:	Jon Mason <jdmason@kudzu.us>
 M:	Dave Jiang <dave.jiang@intel.com>
 M:	Dave Jiang <dave.jiang@intel.com>
@@ -7547,7 +7566,7 @@ S:	Maintained
 F:	drivers/pci/host/*rcar*
 F:	drivers/pci/host/*rcar*
 
 
 PCI DRIVER FOR SAMSUNG EXYNOS
 PCI DRIVER FOR SAMSUNG EXYNOS
-M:	Jingoo Han <jg1.han@samsung.com>
+M:	Jingoo Han <jingoohan1@gmail.com>
 L:	linux-pci@vger.kernel.org
 L:	linux-pci@vger.kernel.org
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
@@ -7555,7 +7574,7 @@ S:	Maintained
 F:	drivers/pci/host/pci-exynos.c
 F:	drivers/pci/host/pci-exynos.c
 
 
 PCI DRIVER FOR SYNOPSIS DESIGNWARE
 PCI DRIVER FOR SYNOPSIS DESIGNWARE
-M:	Jingoo Han <jg1.han@samsung.com>
+M:	Jingoo Han <jingoohan1@gmail.com>
 L:	linux-pci@vger.kernel.org
 L:	linux-pci@vger.kernel.org
 S:	Maintained
 S:	Maintained
 F:	drivers/pci/host/*designware*
 F:	drivers/pci/host/*designware*
@@ -8511,7 +8530,7 @@ S:	Supported
 F:	sound/soc/samsung/
 F:	sound/soc/samsung/
 
 
 SAMSUNG FRAMEBUFFER DRIVER
 SAMSUNG FRAMEBUFFER DRIVER
-M:	Jingoo Han <jg1.han@samsung.com>
+M:	Jingoo Han <jingoohan1@gmail.com>
 L:	linux-fbdev@vger.kernel.org
 L:	linux-fbdev@vger.kernel.org
 S:	Maintained
 S:	Maintained
 F:	drivers/video/fbdev/s3c-fb.c
 F:	drivers/video/fbdev/s3c-fb.c
@@ -8810,16 +8829,19 @@ F:	drivers/misc/phantom.c
 F:	include/uapi/linux/phantom.h
 F:	include/uapi/linux/phantom.h
 
 
 SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
 SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
-M:	Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
+M:	Jayamohan Kallickal <jayamohan.kallickal@avagotech.com>
+M:	Minh Tran <minh.tran@avagotech.com>
+M:	John Soni Jose <sony.john-n@avagotech.com>
 L:	linux-scsi@vger.kernel.org
 L:	linux-scsi@vger.kernel.org
-W:	http://www.emulex.com
+W:	http://www.avagotech.com
 S:	Supported
 S:	Supported
 F:	drivers/scsi/be2iscsi/
 F:	drivers/scsi/be2iscsi/
 
 
-SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
-M:	Sathya Perla <sathya.perla@emulex.com>
-M:	Subbu Seetharaman <subbu.seetharaman@emulex.com>
-M:	Ajit Khaparde <ajit.khaparde@emulex.com>
+Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER
+M:	Sathya Perla <sathya.perla@avagotech.com>
+M:	Ajit Khaparde <ajit.khaparde@avagotech.com>
+M:	Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
+M:	Sriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
 L:	netdev@vger.kernel.org
 L:	netdev@vger.kernel.org
 W:	http://www.emulex.com
 W:	http://www.emulex.com
 S:	Supported
 S:	Supported
@@ -9900,6 +9922,12 @@ L:	netdev@vger.kernel.org
 S:	Maintained
 S:	Maintained
 F:	drivers/net/ethernet/ti/netcp*
 F:	drivers/net/ethernet/ti/netcp*
 
 
+TI TAS571X FAMILY ASoC CODEC DRIVER
+M:	Kevin Cernekee <cernekee@chromium.org>
+L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
+S:	Odd Fixes
+F:	sound/soc/codecs/tas571x*
+
 TI TWL4030 SERIES SOC CODEC DRIVER
 TI TWL4030 SERIES SOC CODEC DRIVER
 M:	Peter Ujfalusi <peter.ujfalusi@ti.com>
 M:	Peter Ujfalusi <peter.ujfalusi@ti.com>
 L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
 L:	alsa-devel@alsa-project.org (moderated for non-subscribers)

+ 1 - 1
Makefile

@@ -1,7 +1,7 @@
 VERSION = 4
 VERSION = 4
 PATCHLEVEL = 1
 PATCHLEVEL = 1
 SUBLEVEL = 0
 SUBLEVEL = 0
-EXTRAVERSION = -rc3
+EXTRAVERSION = -rc6
 NAME = Hurr durr I'ma sheep
 NAME = Hurr durr I'ma sheep
 
 
 # *DOCUMENTATION*
 # *DOCUMENTATION*

+ 10 - 6
arch/alpha/boot/Makefile

@@ -14,6 +14,9 @@ targets		:= vmlinux.gz vmlinux \
 		   tools/bootpzh bootloader bootpheader bootpzheader 
 		   tools/bootpzh bootloader bootpheader bootpzheader 
 OBJSTRIP	:= $(obj)/tools/objstrip
 OBJSTRIP	:= $(obj)/tools/objstrip
 
 
+HOSTCFLAGS	:= -Wall -I$(objtree)/usr/include
+BOOTCFLAGS	+= -I$(obj) -I$(srctree)/$(obj)
+
 # SRM bootable image.  Copy to offset 512 of a partition.
 # SRM bootable image.  Copy to offset 512 of a partition.
 $(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh
 $(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh
 	( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@ 
 	( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@ 
@@ -96,13 +99,14 @@ $(obj)/tools/bootph: $(obj)/bootpheader $(OBJSTRIP) FORCE
 $(obj)/tools/bootpzh: $(obj)/bootpzheader $(OBJSTRIP) FORCE
 $(obj)/tools/bootpzh: $(obj)/bootpzheader $(OBJSTRIP) FORCE
 	$(call if_changed,objstrip)
 	$(call if_changed,objstrip)
 
 
-LDFLAGS_bootloader   := -static -uvsprintf -T  #-N -relax
-LDFLAGS_bootpheader  := -static -uvsprintf -T  #-N -relax
-LDFLAGS_bootpzheader := -static -uvsprintf -T  #-N -relax
+LDFLAGS_bootloader   := -static -T # -N -relax
+LDFLAGS_bootloader   := -static -T # -N -relax
+LDFLAGS_bootpheader  := -static -T # -N -relax
+LDFLAGS_bootpzheader := -static -T # -N -relax
 
 
-OBJ_bootlx   := $(obj)/head.o $(obj)/main.o
-OBJ_bootph   := $(obj)/head.o $(obj)/bootp.o
-OBJ_bootpzh  := $(obj)/head.o $(obj)/bootpz.o $(obj)/misc.o
+OBJ_bootlx   := $(obj)/head.o $(obj)/stdio.o $(obj)/main.o
+OBJ_bootph   := $(obj)/head.o $(obj)/stdio.o $(obj)/bootp.o
+OBJ_bootpzh  := $(obj)/head.o $(obj)/stdio.o $(obj)/bootpz.o $(obj)/misc.o
 
 
 $(obj)/bootloader: $(obj)/bootloader.lds $(OBJ_bootlx) $(LIBS_Y) FORCE
 $(obj)/bootloader: $(obj)/bootloader.lds $(OBJ_bootlx) $(LIBS_Y) FORCE
 	$(call if_changed,ld)
 	$(call if_changed,ld)

+ 0 - 1
arch/alpha/boot/main.c

@@ -19,7 +19,6 @@
 
 
 #include "ksize.h"
 #include "ksize.h"
 
 
-extern int vsprintf(char *, const char *, va_list);
 extern unsigned long switch_to_osf_pal(unsigned long nr,
 extern unsigned long switch_to_osf_pal(unsigned long nr,
 	struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
 	struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa,
 	unsigned long *vptb);
 	unsigned long *vptb);

+ 306 - 0
arch/alpha/boot/stdio.c

@@ -0,0 +1,306 @@
+/*
+ * Copyright (C) Paul Mackerras 1997.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#include <stdarg.h>
+#include <stddef.h>
+
+size_t strnlen(const char * s, size_t count)
+{
+	const char *sc;
+
+	for (sc = s; count-- && *sc != '\0'; ++sc)
+		/* nothing */;
+	return sc - s;
+}
+
+# define do_div(n, base) ({						\
+	unsigned int __base = (base);					\
+	unsigned int __rem;						\
+	__rem = ((unsigned long long)(n)) % __base;			\
+	(n) = ((unsigned long long)(n)) / __base;			\
+	__rem;								\
+})
+
+
+static int skip_atoi(const char **s)
+{
+	int i, c;
+
+	for (i = 0; '0' <= (c = **s) && c <= '9'; ++*s)
+		i = i*10 + c - '0';
+	return i;
+}
+
+#define ZEROPAD	1		/* pad with zero */
+#define SIGN	2		/* unsigned/signed long */
+#define PLUS	4		/* show plus */
+#define SPACE	8		/* space if plus */
+#define LEFT	16		/* left justified */
+#define SPECIAL	32		/* 0x */
+#define LARGE	64		/* use 'ABCDEF' instead of 'abcdef' */
+
+static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)
+{
+	char c,sign,tmp[66];
+	const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
+	int i;
+
+	if (type & LARGE)
+		digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+	if (type & LEFT)
+		type &= ~ZEROPAD;
+	if (base < 2 || base > 36)
+		return 0;
+	c = (type & ZEROPAD) ? '0' : ' ';
+	sign = 0;
+	if (type & SIGN) {
+		if ((signed long long)num < 0) {
+			sign = '-';
+			num = - (signed long long)num;
+			size--;
+		} else if (type & PLUS) {
+			sign = '+';
+			size--;
+		} else if (type & SPACE) {
+			sign = ' ';
+			size--;
+		}
+	}
+	if (type & SPECIAL) {
+		if (base == 16)
+			size -= 2;
+		else if (base == 8)
+			size--;
+	}
+	i = 0;
+	if (num == 0)
+		tmp[i++]='0';
+	else while (num != 0) {
+		tmp[i++] = digits[do_div(num, base)];
+	}
+	if (i > precision)
+		precision = i;
+	size -= precision;
+	if (!(type&(ZEROPAD+LEFT)))
+		while(size-->0)
+			*str++ = ' ';
+	if (sign)
+		*str++ = sign;
+	if (type & SPECIAL) {
+		if (base==8)
+			*str++ = '0';
+		else if (base==16) {
+			*str++ = '0';
+			*str++ = digits[33];
+		}
+	}
+	if (!(type & LEFT))
+		while (size-- > 0)
+			*str++ = c;
+	while (i < precision--)
+		*str++ = '0';
+	while (i-- > 0)
+		*str++ = tmp[i];
+	while (size-- > 0)
+		*str++ = ' ';
+	return str;
+}
+
+int vsprintf(char *buf, const char *fmt, va_list args)
+{
+	int len;
+	unsigned long long num;
+	int i, base;
+	char * str;
+	const char *s;
+
+	int flags;		/* flags to number() */
+
+	int field_width;	/* width of output field */
+	int precision;		/* min. # of digits for integers; max
+				   number of chars for from string */
+	int qualifier;		/* 'h', 'l', or 'L' for integer fields */
+	                        /* 'z' support added 23/7/1999 S.H.    */
+				/* 'z' changed to 'Z' --davidm 1/25/99 */
+
+
+	for (str=buf ; *fmt ; ++fmt) {
+		if (*fmt != '%') {
+			*str++ = *fmt;
+			continue;
+		}
+
+		/* process flags */
+		flags = 0;
+		repeat:
+			++fmt;		/* this also skips first '%' */
+			switch (*fmt) {
+				case '-': flags |= LEFT; goto repeat;
+				case '+': flags |= PLUS; goto repeat;
+				case ' ': flags |= SPACE; goto repeat;
+				case '#': flags |= SPECIAL; goto repeat;
+				case '0': flags |= ZEROPAD; goto repeat;
+				}
+
+		/* get field width */
+		field_width = -1;
+		if ('0' <= *fmt && *fmt <= '9')
+			field_width = skip_atoi(&fmt);
+		else if (*fmt == '*') {
+			++fmt;
+			/* it's the next argument */
+			field_width = va_arg(args, int);
+			if (field_width < 0) {
+				field_width = -field_width;
+				flags |= LEFT;
+			}
+		}
+
+		/* get the precision */
+		precision = -1;
+		if (*fmt == '.') {
+			++fmt;
+			if ('0' <= *fmt && *fmt <= '9')
+				precision = skip_atoi(&fmt);
+			else if (*fmt == '*') {
+				++fmt;
+				/* it's the next argument */
+				precision = va_arg(args, int);
+			}
+			if (precision < 0)
+				precision = 0;
+		}
+
+		/* get the conversion qualifier */
+		qualifier = -1;
+		if (*fmt == 'l' && *(fmt + 1) == 'l') {
+			qualifier = 'q';
+			fmt += 2;
+		} else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L'
+			|| *fmt == 'Z') {
+			qualifier = *fmt;
+			++fmt;
+		}
+
+		/* default base */
+		base = 10;
+
+		switch (*fmt) {
+		case 'c':
+			if (!(flags & LEFT))
+				while (--field_width > 0)
+					*str++ = ' ';
+			*str++ = (unsigned char) va_arg(args, int);
+			while (--field_width > 0)
+				*str++ = ' ';
+			continue;
+
+		case 's':
+			s = va_arg(args, char *);
+			if (!s)
+				s = "<NULL>";
+
+			len = strnlen(s, precision);
+
+			if (!(flags & LEFT))
+				while (len < field_width--)
+					*str++ = ' ';
+			for (i = 0; i < len; ++i)
+				*str++ = *s++;
+			while (len < field_width--)
+				*str++ = ' ';
+			continue;
+
+		case 'p':
+			if (field_width == -1) {
+				field_width = 2*sizeof(void *);
+				flags |= ZEROPAD;
+			}
+			str = number(str,
+				(unsigned long) va_arg(args, void *), 16,
+				field_width, precision, flags);
+			continue;
+
+
+		case 'n':
+			if (qualifier == 'l') {
+				long * ip = va_arg(args, long *);
+				*ip = (str - buf);
+			} else if (qualifier == 'Z') {
+				size_t * ip = va_arg(args, size_t *);
+				*ip = (str - buf);
+			} else {
+				int * ip = va_arg(args, int *);
+				*ip = (str - buf);
+			}
+			continue;
+
+		case '%':
+			*str++ = '%';
+			continue;
+
+		/* integer number formats - set up the flags and "break" */
+		case 'o':
+			base = 8;
+			break;
+
+		case 'X':
+			flags |= LARGE;
+		case 'x':
+			base = 16;
+			break;
+
+		case 'd':
+		case 'i':
+			flags |= SIGN;
+		case 'u':
+			break;
+
+		default:
+			*str++ = '%';
+			if (*fmt)
+				*str++ = *fmt;
+			else
+				--fmt;
+			continue;
+		}
+		if (qualifier == 'l') {
+			num = va_arg(args, unsigned long);
+			if (flags & SIGN)
+				num = (signed long) num;
+		} else if (qualifier == 'q') {
+			num = va_arg(args, unsigned long long);
+			if (flags & SIGN)
+				num = (signed long long) num;
+		} else if (qualifier == 'Z') {
+			num = va_arg(args, size_t);
+		} else if (qualifier == 'h') {
+			num = (unsigned short) va_arg(args, int);
+			if (flags & SIGN)
+				num = (signed short) num;
+		} else {
+			num = va_arg(args, unsigned int);
+			if (flags & SIGN)
+				num = (signed int) num;
+		}
+		str = number(str, num, base, field_width, precision, flags);
+	}
+	*str = '\0';
+	return str-buf;
+}
+
+int sprintf(char * buf, const char *fmt, ...)
+{
+	va_list args;
+	int i;
+
+	va_start(args, fmt);
+	i=vsprintf(buf,fmt,args);
+	va_end(args);
+	return i;
+}

+ 3 - 0
arch/alpha/boot/tools/objstrip.c

@@ -27,6 +27,9 @@
 #include <linux/param.h>
 #include <linux/param.h>
 #ifdef __ELF__
 #ifdef __ELF__
 # include <linux/elf.h>
 # include <linux/elf.h>
+# define elfhdr elf64_hdr
+# define elf_phdr elf64_phdr
+# define elf_check_arch(x) ((x)->e_machine == EM_ALPHA)
 #endif
 #endif
 
 
 /* bootfile size must be multiple of BLOCK_SIZE: */
 /* bootfile size must be multiple of BLOCK_SIZE: */

+ 0 - 1
arch/alpha/include/asm/types.h

@@ -2,6 +2,5 @@
 #define _ALPHA_TYPES_H
 #define _ALPHA_TYPES_H
 
 
 #include <asm-generic/int-ll64.h>
 #include <asm-generic/int-ll64.h>
-#include <uapi/asm/types.h>
 
 
 #endif /* _ALPHA_TYPES_H */
 #endif /* _ALPHA_TYPES_H */

+ 1 - 1
arch/alpha/include/asm/unistd.h

@@ -3,7 +3,7 @@
 
 
 #include <uapi/asm/unistd.h>
 #include <uapi/asm/unistd.h>
 
 
-#define NR_SYSCALLS			511
+#define NR_SYSCALLS			514
 
 
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_STAT64
 #define __ARCH_WANT_STAT64

+ 3 - 0
arch/alpha/include/uapi/asm/unistd.h

@@ -472,5 +472,8 @@
 #define __NR_sched_setattr		508
 #define __NR_sched_setattr		508
 #define __NR_sched_getattr		509
 #define __NR_sched_getattr		509
 #define __NR_renameat2			510
 #define __NR_renameat2			510
+#define __NR_getrandom			511
+#define __NR_memfd_create		512
+#define __NR_execveat			513
 
 
 #endif /* _UAPI_ALPHA_UNISTD_H */
 #endif /* _UAPI_ALPHA_UNISTD_H */

+ 0 - 1
arch/alpha/kernel/err_ev6.c

@@ -6,7 +6,6 @@
  *	Error handling code supporting Alpha systems
  *	Error handling code supporting Alpha systems
  */
  */
 
 
-#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/sched.h>
 
 
 #include <asm/io.h>
 #include <asm/io.h>

+ 0 - 1
arch/alpha/kernel/irq.c

@@ -19,7 +19,6 @@
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>
 #include <linux/interrupt.h>
 #include <linux/interrupt.h>
 #include <linux/random.h>
 #include <linux/random.h>
-#include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/seq_file.h>

+ 1 - 2
arch/alpha/kernel/osf_sys.c

@@ -1019,14 +1019,13 @@ SYSCALL_DEFINE2(osf_settimeofday, struct timeval32 __user *, tv,
  	if (tv) {
  	if (tv) {
 		if (get_tv32((struct timeval *)&kts, tv))
 		if (get_tv32((struct timeval *)&kts, tv))
 			return -EFAULT;
 			return -EFAULT;
+		kts.tv_nsec *= 1000;
 	}
 	}
 	if (tz) {
 	if (tz) {
 		if (copy_from_user(&ktz, tz, sizeof(*tz)))
 		if (copy_from_user(&ktz, tz, sizeof(*tz)))
 			return -EFAULT;
 			return -EFAULT;
 	}
 	}
 
 
-	kts.tv_nsec *= 1000;
-
 	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
 	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
 }
 }
 
 

+ 3 - 4
arch/alpha/kernel/process.c

@@ -236,12 +236,11 @@ release_thread(struct task_struct *dead_task)
 }
 }
 
 
 /*
 /*
- * Copy an alpha thread..
+ * Copy architecture-specific thread state
  */
  */
-
 int
 int
 copy_thread(unsigned long clone_flags, unsigned long usp,
 copy_thread(unsigned long clone_flags, unsigned long usp,
-	    unsigned long arg,
+	    unsigned long kthread_arg,
 	    struct task_struct *p)
 	    struct task_struct *p)
 {
 {
 	extern void ret_from_fork(void);
 	extern void ret_from_fork(void);
@@ -262,7 +261,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
 			sizeof(struct switch_stack) + sizeof(struct pt_regs));
 			sizeof(struct switch_stack) + sizeof(struct pt_regs));
 		childstack->r26 = (unsigned long) ret_from_kernel_thread;
 		childstack->r26 = (unsigned long) ret_from_kernel_thread;
 		childstack->r9 = usp;	/* function */
 		childstack->r9 = usp;	/* function */
-		childstack->r10 = arg;
+		childstack->r10 = kthread_arg;
 		childregs->hae = alpha_mv.hae_cache,
 		childregs->hae = alpha_mv.hae_cache,
 		childti->pcb.usp = 0;
 		childti->pcb.usp = 0;
 		return 0;
 		return 0;

+ 1 - 7
arch/alpha/kernel/smp.c

@@ -63,7 +63,6 @@ static struct {
 enum ipi_message_type {
 enum ipi_message_type {
 	IPI_RESCHEDULE,
 	IPI_RESCHEDULE,
 	IPI_CALL_FUNC,
 	IPI_CALL_FUNC,
-	IPI_CALL_FUNC_SINGLE,
 	IPI_CPU_STOP,
 	IPI_CPU_STOP,
 };
 };
 
 
@@ -506,7 +505,6 @@ setup_profiling_timer(unsigned int multiplier)
 	return -EINVAL;
 	return -EINVAL;
 }
 }
 
 
-
 static void
 static void
 send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
 send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
 {
 {
@@ -552,10 +550,6 @@ handle_ipi(struct pt_regs *regs)
 			generic_smp_call_function_interrupt();
 			generic_smp_call_function_interrupt();
 			break;
 			break;
 
 
-		case IPI_CALL_FUNC_SINGLE:
-			generic_smp_call_function_single_interrupt();
-			break;
-
 		case IPI_CPU_STOP:
 		case IPI_CPU_STOP:
 			halt();
 			halt();
 
 
@@ -606,7 +600,7 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
 
 
 void arch_send_call_function_single_ipi(int cpu)
 void arch_send_call_function_single_ipi(int cpu)
 {
 {
-	send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
+	send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC);
 }
 }
 
 
 static void
 static void

+ 1 - 2
arch/alpha/kernel/srmcons.c

@@ -237,8 +237,7 @@ srmcons_init(void)
 
 
 	return -ENODEV;
 	return -ENODEV;
 }
 }
-
-module_init(srmcons_init);
+device_initcall(srmcons_init);
 
 
 
 
 /*
 /*

+ 1 - 1
arch/alpha/kernel/sys_marvel.c

@@ -331,7 +331,7 @@ marvel_map_irq(const struct pci_dev *cdev, u8 slot, u8 pin)
 	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline);
 	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &intline);
 	irq = intline;
 	irq = intline;
 
 
-	msi_loc = pci_find_capability(dev, PCI_CAP_ID_MSI);
+	msi_loc = dev->msi_cap;
 	msg_ctl = 0;
 	msg_ctl = 0;
 	if (msi_loc) 
 	if (msi_loc) 
 		pci_read_config_word(dev, msi_loc + PCI_MSI_FLAGS, &msg_ctl);
 		pci_read_config_word(dev, msi_loc + PCI_MSI_FLAGS, &msg_ctl);

+ 3 - 0
arch/alpha/kernel/systbls.S

@@ -529,6 +529,9 @@ sys_call_table:
 	.quad sys_sched_setattr
 	.quad sys_sched_setattr
 	.quad sys_sched_getattr
 	.quad sys_sched_getattr
 	.quad sys_renameat2			/* 510 */
 	.quad sys_renameat2			/* 510 */
+	.quad sys_getrandom
+	.quad sys_memfd_create
+	.quad sys_execveat
 
 
 	.size sys_call_table, . - sys_call_table
 	.size sys_call_table, . - sys_call_table
 	.type sys_call_table, @object
 	.type sys_call_table, @object

+ 0 - 1
arch/alpha/kernel/traps.c

@@ -14,7 +14,6 @@
 #include <linux/tty.h>
 #include <linux/tty.h>
 #include <linux/delay.h>
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/kallsyms.h>
 #include <linux/kallsyms.h>
 #include <linux/ratelimit.h>
 #include <linux/ratelimit.h>
 
 

+ 0 - 1
arch/alpha/oprofile/op_model_ev4.c

@@ -8,7 +8,6 @@
  */
  */
 
 
 #include <linux/oprofile.h>
 #include <linux/oprofile.h>
-#include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
 #include <asm/ptrace.h>
 #include <asm/ptrace.h>
 
 

+ 0 - 1
arch/alpha/oprofile/op_model_ev5.c

@@ -8,7 +8,6 @@
  */
  */
 
 
 #include <linux/oprofile.h>
 #include <linux/oprofile.h>
-#include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
 #include <asm/ptrace.h>
 #include <asm/ptrace.h>
 
 

+ 0 - 1
arch/alpha/oprofile/op_model_ev6.c

@@ -8,7 +8,6 @@
  */
  */
 
 
 #include <linux/oprofile.h>
 #include <linux/oprofile.h>
-#include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
 #include <asm/ptrace.h>
 #include <asm/ptrace.h>
 
 

+ 0 - 1
arch/alpha/oprofile/op_model_ev67.c

@@ -9,7 +9,6 @@
  */
  */
 
 
 #include <linux/oprofile.h>
 #include <linux/oprofile.h>
-#include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/smp.h>
 #include <asm/ptrace.h>
 #include <asm/ptrace.h>
 
 

+ 0 - 13
arch/arc/Kconfig.debug

@@ -2,19 +2,6 @@ menu "Kernel hacking"
 
 
 source "lib/Kconfig.debug"
 source "lib/Kconfig.debug"
 
 
-config EARLY_PRINTK
-	bool "Early printk" if EMBEDDED
-	default y
-	help
-	  Write kernel log output directly into the VGA buffer or to a serial
-	  port.
-
-	  This is useful for kernel debugging when your machine crashes very
-	  early before the console code is initialized. For normal operation
-	  it is not recommended because it looks ugly and doesn't cooperate
-	  with klogd/syslogd or the X server. You should normally N here,
-	  unless you want to debug such a crash.
-
 config 16KSTACKS
 config 16KSTACKS
 	bool "Use 16Kb for kernel stacks instead of 8Kb"
 	bool "Use 16Kb for kernel stacks instead of 8Kb"
 	help
 	help

+ 1 - 1
arch/arc/include/asm/atomic.h

@@ -99,7 +99,7 @@ static inline void atomic_##op(int i, atomic_t *v)			\
 	atomic_ops_unlock(flags);					\
 	atomic_ops_unlock(flags);					\
 }
 }
 
 
-#define ATOMIC_OP_RETURN(op, c_op)					\
+#define ATOMIC_OP_RETURN(op, c_op, asm_op)				\
 static inline int atomic_##op##_return(int i, atomic_t *v)		\
 static inline int atomic_##op##_return(int i, atomic_t *v)		\
 {									\
 {									\
 	unsigned long flags;						\
 	unsigned long flags;						\

+ 2 - 2
arch/arc/mm/cache_arc700.c

@@ -266,7 +266,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
  * Machine specific helpers for Entire D-Cache or Per Line ops
  * Machine specific helpers for Entire D-Cache or Per Line ops
  */
  */
 
 
-static unsigned int __before_dc_op(const int op)
+static inline unsigned int __before_dc_op(const int op)
 {
 {
 	unsigned int reg = reg;
 	unsigned int reg = reg;
 
 
@@ -284,7 +284,7 @@ static unsigned int __before_dc_op(const int op)
 	return reg;
 	return reg;
 }
 }
 
 
-static void __after_dc_op(const int op, unsigned int reg)
+static inline void __after_dc_op(const int op, unsigned int reg)
 {
 {
 	if (op & OP_FLUSH)	/* flush / flush-n-inv both wait */
 	if (op & OP_FLUSH)	/* flush / flush-n-inv both wait */
 		while (read_aux_reg(ARC_REG_DC_CTRL) & DC_CTRL_FLUSH_STATUS);
 		while (read_aux_reg(ARC_REG_DC_CTRL) & DC_CTRL_FLUSH_STATUS);

+ 1 - 1
arch/arm/boot/dts/Makefile

@@ -223,7 +223,7 @@ dtb-$(CONFIG_SOC_IMX25) += \
 	imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dtb \
 	imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dtb \
 	imx25-karo-tx25.dtb \
 	imx25-karo-tx25.dtb \
 	imx25-pdk.dtb
 	imx25-pdk.dtb
-dtb-$(CONFIG_SOC_IMX31) += \
+dtb-$(CONFIG_SOC_IMX27) += \
 	imx27-apf27.dtb \
 	imx27-apf27.dtb \
 	imx27-apf27dev.dtb \
 	imx27-apf27dev.dtb \
 	imx27-eukrea-mbimxsd27-baseboard.dtb \
 	imx27-eukrea-mbimxsd27-baseboard.dtb \

+ 0 - 4
arch/arm/boot/dts/am335x-boneblack.dts

@@ -80,7 +80,3 @@
 		status = "okay";
 		status = "okay";
 	};
 	};
 };
 };
-
-&rtc {
-	system-power-controller;
-};

+ 1 - 1
arch/arm/boot/dts/am335x-evmsk.dts

@@ -654,7 +654,7 @@
 	wlcore: wlcore@2 {
 	wlcore: wlcore@2 {
 		compatible = "ti,wl1271";
 		compatible = "ti,wl1271";
 		reg = <2>;
 		reg = <2>;
-		interrupt-parent = <&gpio1>;
+		interrupt-parent = <&gpio0>;
 		interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; /* gpio 31 */
 		interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; /* gpio 31 */
 		ref-clock-frequency = <38400000>;
 		ref-clock-frequency = <38400000>;
 	};
 	};

+ 1 - 1
arch/arm/boot/dts/armada-375.dtsi

@@ -69,7 +69,7 @@
 		mainpll: mainpll {
 		mainpll: mainpll {
 			compatible = "fixed-clock";
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			#clock-cells = <0>;
-			clock-frequency = <2000000000>;
+			clock-frequency = <1000000000>;
 		};
 		};
 		/* 25 MHz reference crystal */
 		/* 25 MHz reference crystal */
 		refclk: oscillator {
 		refclk: oscillator {

+ 1 - 1
arch/arm/boot/dts/armada-38x.dtsi

@@ -585,7 +585,7 @@
 		mainpll: mainpll {
 		mainpll: mainpll {
 			compatible = "fixed-clock";
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			#clock-cells = <0>;
-			clock-frequency = <2000000000>;
+			clock-frequency = <1000000000>;
 		};
 		};
 
 
 		/* 25 MHz reference crystal */
 		/* 25 MHz reference crystal */

+ 1 - 1
arch/arm/boot/dts/armada-39x.dtsi

@@ -502,7 +502,7 @@
 		mainpll: mainpll {
 		mainpll: mainpll {
 			compatible = "fixed-clock";
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			#clock-cells = <0>;
-			clock-frequency = <2000000000>;
+			clock-frequency = <1000000000>;
 		};
 		};
 	};
 	};
 };
 };

+ 1 - 0
arch/arm/boot/dts/dove-cubox.dts

@@ -87,6 +87,7 @@
 
 
 		/* connect xtal input to 25MHz reference */
 		/* connect xtal input to 25MHz reference */
 		clocks = <&ref25>;
 		clocks = <&ref25>;
+		clock-names = "xtal";
 
 
 		/* connect xtal input as source of pll0 and pll1 */
 		/* connect xtal input as source of pll0 and pll1 */
 		silabs,pll-source = <0 0>, <1 0>;
 		silabs,pll-source = <0 0>, <1 0>;

+ 1 - 1
arch/arm/boot/dts/exynos4412-trats2.dts

@@ -736,7 +736,7 @@
 
 
 			display-timings {
 			display-timings {
 				timing-0 {
 				timing-0 {
-					clock-frequency = <0>;
+					clock-frequency = <57153600>;
 					hactive = <720>;
 					hactive = <720>;
 					vactive = <1280>;
 					vactive = <1280>;
 					hfront-porch = <5>;
 					hfront-porch = <5>;

+ 1 - 0
arch/arm/boot/dts/exynos5420-peach-pit.dts

@@ -711,6 +711,7 @@
 	num-slots = <1>;
 	num-slots = <1>;
 	broken-cd;
 	broken-cd;
 	cap-sdio-irq;
 	cap-sdio-irq;
+	keep-power-in-suspend;
 	card-detect-delay = <200>;
 	card-detect-delay = <200>;
 	clock-frequency = <400000000>;
 	clock-frequency = <400000000>;
 	samsung,dw-mshc-ciu-div = <1>;
 	samsung,dw-mshc-ciu-div = <1>;

+ 1 - 0
arch/arm/boot/dts/exynos5800-peach-pi.dts

@@ -674,6 +674,7 @@
 	num-slots = <1>;
 	num-slots = <1>;
 	broken-cd;
 	broken-cd;
 	cap-sdio-irq;
 	cap-sdio-irq;
+	keep-power-in-suspend;
 	card-detect-delay = <200>;
 	card-detect-delay = <200>;
 	clock-frequency = <400000000>;
 	clock-frequency = <400000000>;
 	samsung,dw-mshc-ciu-div = <1>;
 	samsung,dw-mshc-ciu-div = <1>;

+ 1 - 1
arch/arm/boot/dts/imx27.dtsi

@@ -533,7 +533,7 @@
 
 
 			fec: ethernet@1002b000 {
 			fec: ethernet@1002b000 {
 				compatible = "fsl,imx27-fec";
 				compatible = "fsl,imx27-fec";
-				reg = <0x1002b000 0x4000>;
+				reg = <0x1002b000 0x1000>;
 				interrupts = <50>;
 				interrupts = <50>;
 				clocks = <&clks IMX27_CLK_FEC_IPG_GATE>,
 				clocks = <&clks IMX27_CLK_FEC_IPG_GATE>,
 					 <&clks IMX27_CLK_FEC_AHB_GATE>;
 					 <&clks IMX27_CLK_FEC_AHB_GATE>;

+ 2 - 0
arch/arm/boot/dts/omap3-devkit8000.dts

@@ -110,6 +110,8 @@
 	nand@0,0 {
 	nand@0,0 {
 		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
 		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
 		nand-bus-width = <16>;
 		nand-bus-width = <16>;
+		gpmc,device-width = <2>;
+		ti,nand-ecc-opt = "sw";
 
 
 		gpmc,sync-clk-ps = <0>;
 		gpmc,sync-clk-ps = <0>;
 		gpmc,cs-on-ns = <0>;
 		gpmc,cs-on-ns = <0>;

+ 4 - 4
arch/arm/boot/dts/tegra124.dtsi

@@ -826,7 +826,7 @@
 			 <&tegra_car TEGRA124_CLK_PLL_U>,
 			 <&tegra_car TEGRA124_CLK_PLL_U>,
 			 <&tegra_car TEGRA124_CLK_USBD>;
 			 <&tegra_car TEGRA124_CLK_USBD>;
 		clock-names = "reg", "pll_u", "utmi-pads";
 		clock-names = "reg", "pll_u", "utmi-pads";
-		resets = <&tegra_car 59>, <&tegra_car 22>;
+		resets = <&tegra_car 22>, <&tegra_car 22>;
 		reset-names = "usb", "utmi-pads";
 		reset-names = "usb", "utmi-pads";
 		nvidia,hssync-start-delay = <0>;
 		nvidia,hssync-start-delay = <0>;
 		nvidia,idle-wait-delay = <17>;
 		nvidia,idle-wait-delay = <17>;
@@ -838,6 +838,7 @@
 		nvidia,hssquelch-level = <2>;
 		nvidia,hssquelch-level = <2>;
 		nvidia,hsdiscon-level = <5>;
 		nvidia,hsdiscon-level = <5>;
 		nvidia,xcvr-hsslew = <12>;
 		nvidia,xcvr-hsslew = <12>;
+		nvidia,has-utmi-pad-registers;
 		status = "disabled";
 		status = "disabled";
 	};
 	};
 
 
@@ -862,7 +863,7 @@
 			 <&tegra_car TEGRA124_CLK_PLL_U>,
 			 <&tegra_car TEGRA124_CLK_PLL_U>,
 			 <&tegra_car TEGRA124_CLK_USBD>;
 			 <&tegra_car TEGRA124_CLK_USBD>;
 		clock-names = "reg", "pll_u", "utmi-pads";
 		clock-names = "reg", "pll_u", "utmi-pads";
-		resets = <&tegra_car 22>, <&tegra_car 22>;
+		resets = <&tegra_car 58>, <&tegra_car 22>;
 		reset-names = "usb", "utmi-pads";
 		reset-names = "usb", "utmi-pads";
 		nvidia,hssync-start-delay = <0>;
 		nvidia,hssync-start-delay = <0>;
 		nvidia,idle-wait-delay = <17>;
 		nvidia,idle-wait-delay = <17>;
@@ -874,7 +875,6 @@
 		nvidia,hssquelch-level = <2>;
 		nvidia,hssquelch-level = <2>;
 		nvidia,hsdiscon-level = <5>;
 		nvidia,hsdiscon-level = <5>;
 		nvidia,xcvr-hsslew = <12>;
 		nvidia,xcvr-hsslew = <12>;
-		nvidia,has-utmi-pad-registers;
 		status = "disabled";
 		status = "disabled";
 	};
 	};
 
 
@@ -899,7 +899,7 @@
 			 <&tegra_car TEGRA124_CLK_PLL_U>,
 			 <&tegra_car TEGRA124_CLK_PLL_U>,
 			 <&tegra_car TEGRA124_CLK_USBD>;
 			 <&tegra_car TEGRA124_CLK_USBD>;
 		clock-names = "reg", "pll_u", "utmi-pads";
 		clock-names = "reg", "pll_u", "utmi-pads";
-		resets = <&tegra_car 58>, <&tegra_car 22>;
+		resets = <&tegra_car 59>, <&tegra_car 22>;
 		reset-names = "usb", "utmi-pads";
 		reset-names = "usb", "utmi-pads";
 		nvidia,hssync-start-delay = <0>;
 		nvidia,hssync-start-delay = <0>;
 		nvidia,idle-wait-delay = <17>;
 		nvidia,idle-wait-delay = <17>;

+ 1 - 0
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts

@@ -191,6 +191,7 @@
 		compatible = "arm,cortex-a15-pmu";
 		compatible = "arm,cortex-a15-pmu";
 		interrupts = <0 68 4>,
 		interrupts = <0 68 4>,
 			     <0 69 4>;
 			     <0 69 4>;
+		interrupt-affinity = <&cpu0>, <&cpu1>;
 	};
 	};
 
 
 	oscclk6a: oscclk6a {
 	oscclk6a: oscclk6a {

+ 7 - 4
arch/arm/boot/dts/vexpress-v2p-ca9.dts

@@ -33,28 +33,28 @@
 		#address-cells = <1>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 		#size-cells = <0>;
 
 
-		cpu@0 {
+		A9_0: cpu@0 {
 			device_type = "cpu";
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			compatible = "arm,cortex-a9";
 			reg = <0>;
 			reg = <0>;
 			next-level-cache = <&L2>;
 			next-level-cache = <&L2>;
 		};
 		};
 
 
-		cpu@1 {
+		A9_1: cpu@1 {
 			device_type = "cpu";
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			compatible = "arm,cortex-a9";
 			reg = <1>;
 			reg = <1>;
 			next-level-cache = <&L2>;
 			next-level-cache = <&L2>;
 		};
 		};
 
 
-		cpu@2 {
+		A9_2: cpu@2 {
 			device_type = "cpu";
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			compatible = "arm,cortex-a9";
 			reg = <2>;
 			reg = <2>;
 			next-level-cache = <&L2>;
 			next-level-cache = <&L2>;
 		};
 		};
 
 
-		cpu@3 {
+		A9_3: cpu@3 {
 			device_type = "cpu";
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			compatible = "arm,cortex-a9";
 			reg = <3>;
 			reg = <3>;
@@ -170,6 +170,7 @@
 		compatible = "arm,pl310-cache";
 		compatible = "arm,pl310-cache";
 		reg = <0x1e00a000 0x1000>;
 		reg = <0x1e00a000 0x1000>;
 		interrupts = <0 43 4>;
 		interrupts = <0 43 4>;
+		cache-unified;
 		cache-level = <2>;
 		cache-level = <2>;
 		arm,data-latency = <1 1 1>;
 		arm,data-latency = <1 1 1>;
 		arm,tag-latency = <1 1 1>;
 		arm,tag-latency = <1 1 1>;
@@ -181,6 +182,8 @@
 			     <0 61 4>,
 			     <0 61 4>,
 			     <0 62 4>,
 			     <0 62 4>,
 			     <0 63 4>;
 			     <0 63 4>;
+		interrupt-affinity = <&A9_0>, <&A9_1>, <&A9_2>, <&A9_3>;
+
 	};
 	};
 
 
 	dcc {
 	dcc {

+ 2 - 2
arch/arm/boot/dts/zynq-7000.dtsi

@@ -193,7 +193,7 @@
 		};
 		};
 
 
 		gem0: ethernet@e000b000 {
 		gem0: ethernet@e000b000 {
-			compatible = "cdns,gem";
+			compatible = "cdns,zynq-gem";
 			reg = <0xe000b000 0x1000>;
 			reg = <0xe000b000 0x1000>;
 			status = "disabled";
 			status = "disabled";
 			interrupts = <0 22 4>;
 			interrupts = <0 22 4>;
@@ -204,7 +204,7 @@
 		};
 		};
 
 
 		gem1: ethernet@e000c000 {
 		gem1: ethernet@e000c000 {
-			compatible = "cdns,gem";
+			compatible = "cdns,zynq-gem";
 			reg = <0xe000c000 0x1000>;
 			reg = <0xe000c000 0x1000>;
 			status = "disabled";
 			status = "disabled";
 			interrupts = <0 45 4>;
 			interrupts = <0 45 4>;

+ 1 - 1
arch/arm/configs/multi_v7_defconfig

@@ -429,7 +429,7 @@ CONFIG_USB_EHCI_EXYNOS=y
 CONFIG_USB_EHCI_TEGRA=y
 CONFIG_USB_EHCI_TEGRA=y
 CONFIG_USB_EHCI_HCD_STI=y
 CONFIG_USB_EHCI_HCD_STI=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
-CONFIG_USB_ISP1760_HCD=y
+CONFIG_USB_ISP1760=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_STI=y
 CONFIG_USB_OHCI_HCD_STI=y
 CONFIG_USB_OHCI_HCD_PLATFORM=y
 CONFIG_USB_OHCI_HCD_PLATFORM=y

+ 3 - 1
arch/arm/kernel/entry-common.S

@@ -33,7 +33,9 @@ ret_fast_syscall:
  UNWIND(.fnstart	)
  UNWIND(.fnstart	)
  UNWIND(.cantunwind	)
  UNWIND(.cantunwind	)
 	disable_irq				@ disable interrupts
 	disable_irq				@ disable interrupts
-	ldr	r1, [tsk, #TI_FLAGS]
+	ldr	r1, [tsk, #TI_FLAGS]		@ re-check for syscall tracing
+	tst	r1, #_TIF_SYSCALL_WORK
+	bne	__sys_trace_return
 	tst	r1, #_TIF_WORK_MASK
 	tst	r1, #_TIF_WORK_MASK
 	bne	fast_work_pending
 	bne	fast_work_pending
 	asm_trace_hardirqs_on
 	asm_trace_hardirqs_on

+ 5 - 4
arch/arm/kernel/perf_event_cpu.c

@@ -304,16 +304,17 @@ static int probe_current_pmu(struct arm_pmu *pmu)
 static int of_pmu_irq_cfg(struct platform_device *pdev)
 static int of_pmu_irq_cfg(struct platform_device *pdev)
 {
 {
 	int i, irq;
 	int i, irq;
-	int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
-
-	if (!irqs)
-		return -ENOMEM;
+	int *irqs;
 
 
 	/* Don't bother with PPIs; they're already affine */
 	/* Don't bother with PPIs; they're already affine */
 	irq = platform_get_irq(pdev, 0);
 	irq = platform_get_irq(pdev, 0);
 	if (irq >= 0 && irq_is_percpu(irq))
 	if (irq >= 0 && irq_is_percpu(irq))
 		return 0;
 		return 0;
 
 
+	irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
+	if (!irqs)
+		return -ENOMEM;
+
 	for (i = 0; i < pdev->num_resources; ++i) {
 	for (i = 0; i < pdev->num_resources; ++i) {
 		struct device_node *dn;
 		struct device_node *dn;
 		int cpu;
 		int cpu;

+ 2 - 0
arch/arm/mach-exynos/common.h

@@ -159,6 +159,8 @@ extern void exynos_enter_aftr(void);
 
 
 extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
 extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
 
 
+extern void exynos_set_delayed_reset_assertion(bool enable);
+
 extern void s5p_init_cpu(void __iomem *cpuid_addr);
 extern void s5p_init_cpu(void __iomem *cpuid_addr);
 extern unsigned int samsung_rev(void);
 extern unsigned int samsung_rev(void);
 extern void __iomem *cpu_boot_reg_base(void);
 extern void __iomem *cpu_boot_reg_base(void);

+ 27 - 0
arch/arm/mach-exynos/exynos.c

@@ -166,6 +166,33 @@ static void __init exynos_init_io(void)
 	exynos_map_io();
 	exynos_map_io();
 }
 }
 
 
+/*
+ * Set or clear the USE_DELAYED_RESET_ASSERTION option. Used by smp code
+ * and suspend.
+ *
+ * This is necessary only on Exynos4 SoCs. When system is running
+ * USE_DELAYED_RESET_ASSERTION should be set so the ARM CLK clock down
+ * feature could properly detect global idle state when secondary CPU is
+ * powered down.
+ *
+ * However this should not be set when such system is going into suspend.
+ */
+void exynos_set_delayed_reset_assertion(bool enable)
+{
+	if (of_machine_is_compatible("samsung,exynos4")) {
+		unsigned int tmp, core_id;
+
+		for (core_id = 0; core_id < num_possible_cpus(); core_id++) {
+			tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
+			if (enable)
+				tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
+			else
+				tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
+			pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
+		}
+	}
+}
+
 /*
 /*
  * Apparently, these SoCs are not able to wake-up from suspend using
  * Apparently, these SoCs are not able to wake-up from suspend using
  * the PMU. Too bad. Should they suddenly become capable of such a
  * the PMU. Too bad. Should they suddenly become capable of such a

+ 2 - 37
arch/arm/mach-exynos/platsmp.c

@@ -34,30 +34,6 @@
 
 
 extern void exynos4_secondary_startup(void);
 extern void exynos4_secondary_startup(void);
 
 
-/*
- * Set or clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs
- * during hot-(un)plugging CPUx.
- *
- * The feature can be cleared safely during first boot of secondary CPU.
- *
- * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION during powering
- * down a CPU so the CPU idle clock down feature could properly detect global
- * idle state when CPUx is off.
- */
-static void exynos_set_delayed_reset_assertion(u32 core_id, bool enable)
-{
-	if (soc_is_exynos4()) {
-		unsigned int tmp;
-
-		tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
-		if (enable)
-			tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
-		else
-			tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
-		pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
-	}
-}
-
 #ifdef CONFIG_HOTPLUG_CPU
 #ifdef CONFIG_HOTPLUG_CPU
 static inline void cpu_leave_lowpower(u32 core_id)
 static inline void cpu_leave_lowpower(u32 core_id)
 {
 {
@@ -73,8 +49,6 @@ static inline void cpu_leave_lowpower(u32 core_id)
 	  : "=&r" (v)
 	  : "=&r" (v)
 	  : "Ir" (CR_C), "Ir" (0x40)
 	  : "Ir" (CR_C), "Ir" (0x40)
 	  : "cc");
 	  : "cc");
-
-	 exynos_set_delayed_reset_assertion(core_id, false);
 }
 }
 
 
 static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
@@ -87,14 +61,6 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 		/* Turn the CPU off on next WFI instruction. */
 		/* Turn the CPU off on next WFI instruction. */
 		exynos_cpu_power_down(core_id);
 		exynos_cpu_power_down(core_id);
 
 
-		/*
-		 * Exynos4 SoCs require setting
-		 * USE_DELAYED_RESET_ASSERTION so the CPU idle
-		 * clock down feature could properly detect
-		 * global idle state when CPUx is off.
-		 */
-		exynos_set_delayed_reset_assertion(core_id, true);
-
 		wfi();
 		wfi();
 
 
 		if (pen_release == core_id) {
 		if (pen_release == core_id) {
@@ -371,9 +337,6 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
 		udelay(10);
 		udelay(10);
 	}
 	}
 
 
-	/* No harm if this is called during first boot of secondary CPU */
-	exynos_set_delayed_reset_assertion(core_id, false);
-
 	/*
 	/*
 	 * now the secondary core is starting up let it run its
 	 * now the secondary core is starting up let it run its
 	 * calibrations, then wait for it to finish
 	 * calibrations, then wait for it to finish
@@ -420,6 +383,8 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
 
 
 	exynos_sysram_init();
 	exynos_sysram_init();
 
 
+	exynos_set_delayed_reset_assertion(true);
+
 	if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
 	if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
 		scu_enable(scu_base_addr());
 		scu_enable(scu_base_addr());
 
 

+ 2 - 2
arch/arm/mach-exynos/pm_domains.c

@@ -188,7 +188,7 @@ no_clk:
 		args.np = np;
 		args.np = np;
 		args.args_count = 0;
 		args.args_count = 0;
 		child_domain = of_genpd_get_from_provider(&args);
 		child_domain = of_genpd_get_from_provider(&args);
-		if (!child_domain)
+		if (IS_ERR(child_domain))
 			continue;
 			continue;
 
 
 		if (of_parse_phandle_with_args(np, "power-domains",
 		if (of_parse_phandle_with_args(np, "power-domains",
@@ -196,7 +196,7 @@ no_clk:
 			continue;
 			continue;
 
 
 		parent_domain = of_genpd_get_from_provider(&args);
 		parent_domain = of_genpd_get_from_provider(&args);
-		if (!parent_domain)
+		if (IS_ERR(parent_domain))
 			continue;
 			continue;
 
 
 		if (pm_genpd_add_subdomain(parent_domain, child_domain))
 		if (pm_genpd_add_subdomain(parent_domain, child_domain))

+ 6 - 1
arch/arm/mach-exynos/suspend.c

@@ -342,6 +342,8 @@ static void exynos_pm_enter_sleep_mode(void)
 
 
 static void exynos_pm_prepare(void)
 static void exynos_pm_prepare(void)
 {
 {
+	exynos_set_delayed_reset_assertion(false);
+
 	/* Set wake-up mask registers */
 	/* Set wake-up mask registers */
 	exynos_pm_set_wakeup_mask();
 	exynos_pm_set_wakeup_mask();
 
 
@@ -482,6 +484,7 @@ early_wakeup:
 
 
 	/* Clear SLEEP mode set in INFORM1 */
 	/* Clear SLEEP mode set in INFORM1 */
 	pmu_raw_writel(0x0, S5P_INFORM1);
 	pmu_raw_writel(0x0, S5P_INFORM1);
+	exynos_set_delayed_reset_assertion(true);
 }
 }
 
 
 static void exynos3250_pm_resume(void)
 static void exynos3250_pm_resume(void)
@@ -723,8 +726,10 @@ void __init exynos_pm_init(void)
 		return;
 		return;
 	}
 	}
 
 
-	if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL)))
+	if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
 		pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
 		pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
+		return;
+	}
 
 
 	pm_data = (const struct exynos_pm_data *) match->data;
 	pm_data = (const struct exynos_pm_data *) match->data;
 
 

+ 3 - 1
arch/arm/mach-gemini/common.h

@@ -12,6 +12,8 @@
 #ifndef __GEMINI_COMMON_H__
 #ifndef __GEMINI_COMMON_H__
 #define __GEMINI_COMMON_H__
 #define __GEMINI_COMMON_H__
 
 
+#include <linux/reboot.h>
+
 struct mtd_partition;
 struct mtd_partition;
 
 
 extern void gemini_map_io(void);
 extern void gemini_map_io(void);
@@ -26,6 +28,6 @@ extern int platform_register_pflash(unsigned int size,
 				    struct mtd_partition *parts,
 				    struct mtd_partition *parts,
 				    unsigned int nr_parts);
 				    unsigned int nr_parts);
 
 
-extern void gemini_restart(char mode, const char *cmd);
+extern void gemini_restart(enum reboot_mode mode, const char *cmd);
 
 
 #endif /* __GEMINI_COMMON_H__ */
 #endif /* __GEMINI_COMMON_H__ */

+ 3 - 1
arch/arm/mach-gemini/reset.c

@@ -14,7 +14,9 @@
 #include <mach/hardware.h>
 #include <mach/hardware.h>
 #include <mach/global_reg.h>
 #include <mach/global_reg.h>
 
 
-void gemini_restart(char mode, const char *cmd)
+#include "common.h"
+
+void gemini_restart(enum reboot_mode mode, const char *cmd)
 {
 {
 	__raw_writel(RESET_GLOBAL | RESET_CPU1,
 	__raw_writel(RESET_GLOBAL | RESET_CPU1,
 		     IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET);
 		     IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET);

+ 13 - 3
arch/arm/mach-imx/gpc.c

@@ -280,9 +280,15 @@ void __init imx_gpc_check_dt(void)
 	struct device_node *np;
 	struct device_node *np;
 
 
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc");
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc");
-	if (WARN_ON(!np ||
-		    !of_find_property(np, "interrupt-controller", NULL)))
-		pr_warn("Outdated DT detected, system is about to crash!!!\n");
+	if (WARN_ON(!np))
+		return;
+
+	if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
+		pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
+
+		/* map GPC, so that at least CPUidle and WARs keep working */
+		gpc_base = of_iomap(np, 0);
+	}
 }
 }
 
 
 #ifdef CONFIG_PM_GENERIC_DOMAINS
 #ifdef CONFIG_PM_GENERIC_DOMAINS
@@ -443,6 +449,10 @@ static int imx_gpc_probe(struct platform_device *pdev)
 	struct regulator *pu_reg;
 	struct regulator *pu_reg;
 	int ret;
 	int ret;
 
 
+	/* bail out if DT too old and doesn't provide the necessary info */
+	if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells"))
+		return 0;
+
 	pu_reg = devm_regulator_get_optional(&pdev->dev, "pu");
 	pu_reg = devm_regulator_get_optional(&pdev->dev, "pu");
 	if (PTR_ERR(pu_reg) == -ENODEV)
 	if (PTR_ERR(pu_reg) == -ENODEV)
 		pu_reg = NULL;
 		pu_reg = NULL;

+ 14 - 54
arch/arm/mach-omap2/omap_hwmod.c

@@ -171,6 +171,12 @@
  */
  */
 #define LINKS_PER_OCP_IF		2
 #define LINKS_PER_OCP_IF		2
 
 
+/*
+ * Address offset (in bytes) between the reset control and the reset
+ * status registers: 4 bytes on OMAP4
+ */
+#define OMAP4_RST_CTRL_ST_OFFSET	4
+
 /**
 /**
  * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations
  * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations
  * @enable_module: function to enable a module (via MODULEMODE)
  * @enable_module: function to enable a module (via MODULEMODE)
@@ -3016,10 +3022,12 @@ static int _omap4_deassert_hardreset(struct omap_hwmod *oh,
 	if (ohri->st_shift)
 	if (ohri->st_shift)
 		pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
 		pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
 		       oh->name, ohri->name);
 		       oh->name, ohri->name);
-	return omap_prm_deassert_hardreset(ohri->rst_shift, 0,
+	return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->rst_shift,
 					   oh->clkdm->pwrdm.ptr->prcm_partition,
 					   oh->clkdm->pwrdm.ptr->prcm_partition,
 					   oh->clkdm->pwrdm.ptr->prcm_offs,
 					   oh->clkdm->pwrdm.ptr->prcm_offs,
-					   oh->prcm.omap4.rstctrl_offs, 0);
+					   oh->prcm.omap4.rstctrl_offs,
+					   oh->prcm.omap4.rstctrl_offs +
+					   OMAP4_RST_CTRL_ST_OFFSET);
 }
 }
 
 
 /**
 /**
@@ -3047,27 +3055,6 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh,
 					      oh->prcm.omap4.rstctrl_offs);
 					      oh->prcm.omap4.rstctrl_offs);
 }
 }
 
 
-/**
- * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args
- * @oh: struct omap_hwmod * to assert hardreset
- * @ohri: hardreset line data
- *
- * Call am33xx_prminst_assert_hardreset() with parameters extracted
- * from the hwmod @oh and the hardreset line data @ohri.  Only
- * intended for use as an soc_ops function pointer.  Passes along the
- * return value from am33xx_prminst_assert_hardreset().  XXX This
- * function is scheduled for removal when the PRM code is moved into
- * drivers/.
- */
-static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
-				   struct omap_hwmod_rst_info *ohri)
-
-{
-	return omap_prm_assert_hardreset(ohri->rst_shift, 0,
-					 oh->clkdm->pwrdm.ptr->prcm_offs,
-					 oh->prcm.omap4.rstctrl_offs);
-}
-
 /**
 /**
  * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args
  * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args
  * @oh: struct omap_hwmod * to deassert hardreset
  * @oh: struct omap_hwmod * to deassert hardreset
@@ -3083,32 +3070,13 @@ static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
 static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
 static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
 				     struct omap_hwmod_rst_info *ohri)
 				     struct omap_hwmod_rst_info *ohri)
 {
 {
-	return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift, 0,
+	return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift,
+					   oh->clkdm->pwrdm.ptr->prcm_partition,
 					   oh->clkdm->pwrdm.ptr->prcm_offs,
 					   oh->clkdm->pwrdm.ptr->prcm_offs,
 					   oh->prcm.omap4.rstctrl_offs,
 					   oh->prcm.omap4.rstctrl_offs,
 					   oh->prcm.omap4.rstst_offs);
 					   oh->prcm.omap4.rstst_offs);
 }
 }
 
 
-/**
- * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args
- * @oh: struct omap_hwmod * to test hardreset
- * @ohri: hardreset line data
- *
- * Call am33xx_prminst_is_hardreset_asserted() with parameters
- * extracted from the hwmod @oh and the hardreset line data @ohri.
- * Only intended for use as an soc_ops function pointer.  Passes along
- * the return value from am33xx_prminst_is_hardreset_asserted().  XXX
- * This function is scheduled for removal when the PRM code is moved
- * into drivers/.
- */
-static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
-					struct omap_hwmod_rst_info *ohri)
-{
-	return omap_prm_is_hardreset_asserted(ohri->rst_shift, 0,
-					      oh->clkdm->pwrdm.ptr->prcm_offs,
-					      oh->prcm.omap4.rstctrl_offs);
-}
-
 /* Public functions */
 /* Public functions */
 
 
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
@@ -3908,21 +3876,13 @@ void __init omap_hwmod_init(void)
 		soc_ops.init_clkdm = _init_clkdm;
 		soc_ops.init_clkdm = _init_clkdm;
 		soc_ops.update_context_lost = _omap4_update_context_lost;
 		soc_ops.update_context_lost = _omap4_update_context_lost;
 		soc_ops.get_context_lost = _omap4_get_context_lost;
 		soc_ops.get_context_lost = _omap4_get_context_lost;
-	} else if (soc_is_am43xx()) {
+	} else if (cpu_is_ti816x() || soc_is_am33xx() || soc_is_am43xx()) {
 		soc_ops.enable_module = _omap4_enable_module;
 		soc_ops.enable_module = _omap4_enable_module;
 		soc_ops.disable_module = _omap4_disable_module;
 		soc_ops.disable_module = _omap4_disable_module;
 		soc_ops.wait_target_ready = _omap4_wait_target_ready;
 		soc_ops.wait_target_ready = _omap4_wait_target_ready;
 		soc_ops.assert_hardreset = _omap4_assert_hardreset;
 		soc_ops.assert_hardreset = _omap4_assert_hardreset;
-		soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
-		soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
-		soc_ops.init_clkdm = _init_clkdm;
-	} else if (cpu_is_ti816x() || soc_is_am33xx()) {
-		soc_ops.enable_module = _omap4_enable_module;
-		soc_ops.disable_module = _omap4_disable_module;
-		soc_ops.wait_target_ready = _omap4_wait_target_ready;
-		soc_ops.assert_hardreset = _am33xx_assert_hardreset;
 		soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
 		soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
-		soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;
+		soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
 		soc_ops.init_clkdm = _init_clkdm;
 		soc_ops.init_clkdm = _init_clkdm;
 	} else {
 	} else {
 		WARN(1, "omap_hwmod: unknown SoC type\n");
 		WARN(1, "omap_hwmod: unknown SoC type\n");

+ 70 - 0
arch/arm/mach-omap2/omap_hwmod_43xx_data.c

@@ -544,6 +544,44 @@ static struct omap_hwmod am43xx_hdq1w_hwmod = {
 	},
 	},
 };
 };
 
 
+static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = {
+	.rev_offs       = 0x0,
+	.sysc_offs      = 0x104,
+	.sysc_flags     = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE,
+	.idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+				MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO),
+	.sysc_fields    = &omap_hwmod_sysc_type2,
+};
+
+static struct omap_hwmod_class am43xx_vpfe_hwmod_class = {
+	.name           = "vpfe",
+	.sysc           = &am43xx_vpfe_sysc,
+};
+
+static struct omap_hwmod am43xx_vpfe0_hwmod = {
+	.name           = "vpfe0",
+	.class          = &am43xx_vpfe_hwmod_class,
+	.clkdm_name     = "l3s_clkdm",
+	.prcm           = {
+		.omap4  = {
+			.modulemode     = MODULEMODE_SWCTRL,
+			.clkctrl_offs   = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET,
+		},
+	},
+};
+
+static struct omap_hwmod am43xx_vpfe1_hwmod = {
+	.name           = "vpfe1",
+	.class          = &am43xx_vpfe_hwmod_class,
+	.clkdm_name     = "l3s_clkdm",
+	.prcm           = {
+		.omap4  = {
+			.modulemode     = MODULEMODE_SWCTRL,
+			.clkctrl_offs   = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET,
+		},
+	},
+};
+
 /* Interfaces */
 /* Interfaces */
 static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
 static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
 	.master		= &am33xx_l3_main_hwmod,
 	.master		= &am33xx_l3_main_hwmod,
@@ -825,6 +863,34 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__hdq1w = {
 	.user           = OCP_USER_MPU | OCP_USER_SDMA,
 	.user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 };
 
 
+static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = {
+	.master         = &am43xx_vpfe0_hwmod,
+	.slave          = &am33xx_l3_main_hwmod,
+	.clk            = "l3_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = {
+	.master         = &am43xx_vpfe1_hwmod,
+	.slave          = &am33xx_l3_main_hwmod,
+	.clk            = "l3_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe0 = {
+	.master         = &am33xx_l4_ls_hwmod,
+	.slave          = &am43xx_vpfe0_hwmod,
+	.clk            = "l4ls_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
+	.master         = &am33xx_l4_ls_hwmod,
+	.slave          = &am43xx_vpfe1_hwmod,
+	.clk            = "l4ls_gclk",
+	.user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l4_wkup__synctimer,
 	&am33xx_l4_wkup__synctimer,
 	&am43xx_l4_ls__timer8,
 	&am43xx_l4_ls__timer8,
@@ -925,6 +991,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
 	&am43xx_l4_ls__dss_dispc,
 	&am43xx_l4_ls__dss_dispc,
 	&am43xx_l4_ls__dss_rfbi,
 	&am43xx_l4_ls__dss_rfbi,
 	&am43xx_l4_ls__hdq1w,
 	&am43xx_l4_ls__hdq1w,
+	&am43xx_l3__vpfe0,
+	&am43xx_l3__vpfe1,
+	&am43xx_l4_ls__vpfe0,
+	&am43xx_l4_ls__vpfe1,
 	NULL,
 	NULL,
 };
 };
 
 

+ 2 - 1
arch/arm/mach-omap2/prcm43xx.h

@@ -144,5 +144,6 @@
 #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET	0x05C0
 #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET	0x05C0
 #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET		0x0a20
 #define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET		0x0a20
 #define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET		0x04a0
 #define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET		0x04a0
-
+#define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET		0x0068
+#define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET		0x0070
 #endif
 #endif

+ 7 - 13
arch/arm/mach-omap2/prminst44xx.c

@@ -87,12 +87,6 @@ u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
 	return v;
 	return v;
 }
 }
 
 
-/*
- * Address offset (in bytes) between the reset control and the reset
- * status registers: 4 bytes on OMAP4
- */
-#define OMAP4_RST_CTRL_ST_OFFSET		4
-
 /**
 /**
  * omap4_prminst_is_hardreset_asserted - read the HW reset line state of
  * omap4_prminst_is_hardreset_asserted - read the HW reset line state of
  * submodules contained in the hwmod module
  * submodules contained in the hwmod module
@@ -141,11 +135,11 @@ int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
  * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and
  * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and
  * wait
  * wait
  * @shift: register bit shift corresponding to the reset line to deassert
  * @shift: register bit shift corresponding to the reset line to deassert
- * @st_shift: status bit offset, not used for OMAP4+
+ * @st_shift: status bit offset corresponding to the reset line
  * @part: PRM partition
  * @part: PRM partition
  * @inst: PRM instance offset
  * @inst: PRM instance offset
  * @rstctrl_offs: reset register offset
  * @rstctrl_offs: reset register offset
- * @st_offs: reset status register offset, not used for OMAP4+
+ * @rstst_offs: reset status register offset
  *
  *
  * Some IPs like dsp, ipu or iva contain processors that require an HW
  * Some IPs like dsp, ipu or iva contain processors that require an HW
  * reset line to be asserted / deasserted in order to fully enable the
  * reset line to be asserted / deasserted in order to fully enable the
@@ -157,11 +151,11 @@ int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
  * of reset, or -EBUSY if the submodule did not exit reset promptly.
  * of reset, or -EBUSY if the submodule did not exit reset promptly.
  */
  */
 int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst,
 int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst,
-				     u16 rstctrl_offs, u16 st_offs)
+				     u16 rstctrl_offs, u16 rstst_offs)
 {
 {
 	int c;
 	int c;
 	u32 mask = 1 << shift;
 	u32 mask = 1 << shift;
-	u16 rstst_offs = rstctrl_offs + OMAP4_RST_CTRL_ST_OFFSET;
+	u32 st_mask = 1 << st_shift;
 
 
 	/* Check the current status to avoid de-asserting the line twice */
 	/* Check the current status to avoid de-asserting the line twice */
 	if (omap4_prminst_is_hardreset_asserted(shift, part, inst,
 	if (omap4_prminst_is_hardreset_asserted(shift, part, inst,
@@ -169,13 +163,13 @@ int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst,
 		return -EEXIST;
 		return -EEXIST;
 
 
 	/* Clear the reset status by writing 1 to the status bit */
 	/* Clear the reset status by writing 1 to the status bit */
-	omap4_prminst_rmw_inst_reg_bits(0xffffffff, mask, part, inst,
+	omap4_prminst_rmw_inst_reg_bits(0xffffffff, st_mask, part, inst,
 					rstst_offs);
 					rstst_offs);
 	/* de-assert the reset control line */
 	/* de-assert the reset control line */
 	omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs);
 	omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs);
 	/* wait the status to be set */
 	/* wait the status to be set */
-	omap_test_timeout(omap4_prminst_is_hardreset_asserted(shift, part, inst,
-							      rstst_offs),
+	omap_test_timeout(omap4_prminst_is_hardreset_asserted(st_shift, part,
+							      inst, rstst_offs),
 			  MAX_MODULE_HARDRESET_WAIT, c);
 			  MAX_MODULE_HARDRESET_WAIT, c);
 
 
 	return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;
 	return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;

+ 5 - 8
arch/arm/mach-omap2/timer.c

@@ -298,14 +298,11 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
 	if (IS_ERR(src))
 	if (IS_ERR(src))
 		return PTR_ERR(src);
 		return PTR_ERR(src);
 
 
-	if (clk_get_parent(timer->fclk) != src) {
-		r = clk_set_parent(timer->fclk, src);
-		if (r < 0) {
-			pr_warn("%s: %s cannot set source\n", __func__,
-				oh->name);
-			clk_put(src);
-			return r;
-		}
+	r = clk_set_parent(timer->fclk, src);
+	if (r < 0) {
+		pr_warn("%s: %s cannot set source\n", __func__, oh->name);
+		clk_put(src);
+		return r;
 	}
 	}
 
 
 	clk_put(src);
 	clk_put(src);

+ 1 - 1
arch/arm/mach-pxa/pxa_cplds_irqs.c

@@ -107,7 +107,7 @@ static int cplds_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct resource *res;
 	struct cplds *fpga;
 	struct cplds *fpga;
 	int ret;
 	int ret;
-	unsigned int base_irq = 0;
+	int base_irq;
 	unsigned long irqflags = 0;
 	unsigned long irqflags = 0;
 
 
 	fpga = devm_kzalloc(&pdev->dev, sizeof(*fpga), GFP_KERNEL);
 	fpga = devm_kzalloc(&pdev->dev, sizeof(*fpga), GFP_KERNEL);

+ 0 - 26
arch/arm/mach-rockchip/pm.c

@@ -44,11 +44,9 @@ static void __iomem *rk3288_bootram_base;
 static phys_addr_t rk3288_bootram_phy;
 static phys_addr_t rk3288_bootram_phy;
 
 
 static struct regmap *pmu_regmap;
 static struct regmap *pmu_regmap;
-static struct regmap *grf_regmap;
 static struct regmap *sgrf_regmap;
 static struct regmap *sgrf_regmap;
 
 
 static u32 rk3288_pmu_pwr_mode_con;
 static u32 rk3288_pmu_pwr_mode_con;
-static u32 rk3288_grf_soc_con0;
 static u32 rk3288_sgrf_soc_con0;
 static u32 rk3288_sgrf_soc_con0;
 
 
 static inline u32 rk3288_l2_config(void)
 static inline u32 rk3288_l2_config(void)
@@ -72,25 +70,11 @@ static void rk3288_slp_mode_set(int level)
 {
 {
 	u32 mode_set, mode_set1;
 	u32 mode_set, mode_set1;
 
 
-	regmap_read(grf_regmap, RK3288_GRF_SOC_CON0, &rk3288_grf_soc_con0);
-
 	regmap_read(sgrf_regmap, RK3288_SGRF_SOC_CON0, &rk3288_sgrf_soc_con0);
 	regmap_read(sgrf_regmap, RK3288_SGRF_SOC_CON0, &rk3288_sgrf_soc_con0);
 
 
 	regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON,
 	regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON,
 		    &rk3288_pmu_pwr_mode_con);
 		    &rk3288_pmu_pwr_mode_con);
 
 
-	/*
-	 * We need set this bit GRF_FORCE_JTAG here, for the debug module,
-	 * otherwise, it may become inaccessible after resume.
-	 * This creates a potential security issue, as the sdmmc pins may
-	 * accept jtag data for a short time during resume if no card is
-	 * inserted.
-	 * But this is of course also true for the regular boot, before we
-	 * turn of the jtag/sdmmc autodetect.
-	 */
-	regmap_write(grf_regmap, RK3288_GRF_SOC_CON0, GRF_FORCE_JTAG |
-		     GRF_FORCE_JTAG_WRITE);
-
 	/*
 	/*
 	 * SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR
 	 * SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR
 	 * PCLK_WDT_GATE - disable WDT during suspend.
 	 * PCLK_WDT_GATE - disable WDT during suspend.
@@ -151,9 +135,6 @@ static void rk3288_slp_mode_set_resume(void)
 	regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
 	regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
 		     rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE
 		     rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE
 		     | SGRF_FAST_BOOT_EN_WRITE);
 		     | SGRF_FAST_BOOT_EN_WRITE);
-
-	regmap_write(grf_regmap, RK3288_GRF_SOC_CON0, rk3288_grf_soc_con0 |
-		     GRF_FORCE_JTAG_WRITE);
 }
 }
 
 
 static int rockchip_lpmode_enter(unsigned long arg)
 static int rockchip_lpmode_enter(unsigned long arg)
@@ -212,13 +193,6 @@ static int rk3288_suspend_init(struct device_node *np)
 		return PTR_ERR(pmu_regmap);
 		return PTR_ERR(pmu_regmap);
 	}
 	}
 
 
-	grf_regmap = syscon_regmap_lookup_by_compatible(
-				"rockchip,rk3288-grf");
-	if (IS_ERR(grf_regmap)) {
-		pr_err("%s: could not find grf regmap\n", __func__);
-		return PTR_ERR(pmu_regmap);
-	}
-
 	sram_np = of_find_compatible_node(NULL, NULL,
 	sram_np = of_find_compatible_node(NULL, NULL,
 					  "rockchip,rk3288-pmu-sram");
 					  "rockchip,rk3288-pmu-sram");
 	if (!sram_np) {
 	if (!sram_np) {

+ 0 - 4
arch/arm/mach-rockchip/pm.h

@@ -48,10 +48,6 @@ static inline void rockchip_suspend_init(void)
 #define RK3288_PMU_WAKEUP_RST_CLR_CNT	0x44
 #define RK3288_PMU_WAKEUP_RST_CLR_CNT	0x44
 #define RK3288_PMU_PWRMODE_CON1		0x90
 #define RK3288_PMU_PWRMODE_CON1		0x90
 
 
-#define RK3288_GRF_SOC_CON0		0x244
-#define GRF_FORCE_JTAG			BIT(12)
-#define GRF_FORCE_JTAG_WRITE		BIT(28)
-
 #define RK3288_SGRF_SOC_CON0		(0x0000)
 #define RK3288_SGRF_SOC_CON0		(0x0000)
 #define RK3288_SGRF_FAST_BOOT_ADDR	(0x0120)
 #define RK3288_SGRF_FAST_BOOT_ADDR	(0x0120)
 #define SGRF_PCLK_WDT_GATE		BIT(6)
 #define SGRF_PCLK_WDT_GATE		BIT(6)

+ 10 - 10
arch/arm/mm/mmu.c

@@ -1112,22 +1112,22 @@ void __init sanity_check_meminfo(void)
 			}
 			}
 
 
 			/*
 			/*
-			 * Find the first non-section-aligned page, and point
+			 * Find the first non-pmd-aligned page, and point
 			 * memblock_limit at it. This relies on rounding the
 			 * memblock_limit at it. This relies on rounding the
-			 * limit down to be section-aligned, which happens at
-			 * the end of this function.
+			 * limit down to be pmd-aligned, which happens at the
+			 * end of this function.
 			 *
 			 *
 			 * With this algorithm, the start or end of almost any
 			 * With this algorithm, the start or end of almost any
-			 * bank can be non-section-aligned. The only exception
-			 * is that the start of the bank 0 must be section-
+			 * bank can be non-pmd-aligned. The only exception is
+			 * that the start of the bank 0 must be section-
 			 * aligned, since otherwise memory would need to be
 			 * aligned, since otherwise memory would need to be
 			 * allocated when mapping the start of bank 0, which
 			 * allocated when mapping the start of bank 0, which
 			 * occurs before any free memory is mapped.
 			 * occurs before any free memory is mapped.
 			 */
 			 */
 			if (!memblock_limit) {
 			if (!memblock_limit) {
-				if (!IS_ALIGNED(block_start, SECTION_SIZE))
+				if (!IS_ALIGNED(block_start, PMD_SIZE))
 					memblock_limit = block_start;
 					memblock_limit = block_start;
-				else if (!IS_ALIGNED(block_end, SECTION_SIZE))
+				else if (!IS_ALIGNED(block_end, PMD_SIZE))
 					memblock_limit = arm_lowmem_limit;
 					memblock_limit = arm_lowmem_limit;
 			}
 			}
 
 
@@ -1137,12 +1137,12 @@ void __init sanity_check_meminfo(void)
 	high_memory = __va(arm_lowmem_limit - 1) + 1;
 	high_memory = __va(arm_lowmem_limit - 1) + 1;
 
 
 	/*
 	/*
-	 * Round the memblock limit down to a section size.  This
+	 * Round the memblock limit down to a pmd size.  This
 	 * helps to ensure that we will allocate memory from the
 	 * helps to ensure that we will allocate memory from the
-	 * last full section, which should be mapped.
+	 * last full pmd, which should be mapped.
 	 */
 	 */
 	if (memblock_limit)
 	if (memblock_limit)
-		memblock_limit = round_down(memblock_limit, SECTION_SIZE);
+		memblock_limit = round_down(memblock_limit, PMD_SIZE);
 	if (!memblock_limit)
 	if (!memblock_limit)
 		memblock_limit = arm_lowmem_limit;
 		memblock_limit = arm_lowmem_limit;
 
 

+ 39 - 3
arch/arm/net/bpf_jit_32.c

@@ -54,6 +54,7 @@
 #define SEEN_DATA		(1 << (BPF_MEMWORDS + 3))
 #define SEEN_DATA		(1 << (BPF_MEMWORDS + 3))
 
 
 #define FLAG_NEED_X_RESET	(1 << 0)
 #define FLAG_NEED_X_RESET	(1 << 0)
+#define FLAG_IMM_OVERFLOW	(1 << 1)
 
 
 struct jit_ctx {
 struct jit_ctx {
 	const struct bpf_prog *skf;
 	const struct bpf_prog *skf;
@@ -293,6 +294,15 @@ static u16 imm_offset(u32 k, struct jit_ctx *ctx)
 	/* PC in ARM mode == address of the instruction + 8 */
 	/* PC in ARM mode == address of the instruction + 8 */
 	imm = offset - (8 + ctx->idx * 4);
 	imm = offset - (8 + ctx->idx * 4);
 
 
+	if (imm & ~0xfff) {
+		/*
+		 * literal pool is too far, signal it into flags. we
+		 * can only detect it on the second pass unfortunately.
+		 */
+		ctx->flags |= FLAG_IMM_OVERFLOW;
+		return 0;
+	}
+
 	return imm;
 	return imm;
 }
 }
 
 
@@ -449,10 +459,21 @@ static inline void emit_udiv(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx)
 		return;
 		return;
 	}
 	}
 #endif
 #endif
-	if (rm != ARM_R0)
-		emit(ARM_MOV_R(ARM_R0, rm), ctx);
+
+	/*
+	 * For BPF_ALU | BPF_DIV | BPF_K instructions, rm is ARM_R4
+	 * (r_A) and rn is ARM_R0 (r_scratch) so load rn first into
+	 * ARM_R1 to avoid accidentally overwriting ARM_R0 with rm
+	 * before using it as a source for ARM_R1.
+	 *
+	 * For BPF_ALU | BPF_DIV | BPF_X rm is ARM_R4 (r_A) and rn is
+	 * ARM_R5 (r_X) so there is no particular register overlap
+	 * issues.
+	 */
 	if (rn != ARM_R1)
 	if (rn != ARM_R1)
 		emit(ARM_MOV_R(ARM_R1, rn), ctx);
 		emit(ARM_MOV_R(ARM_R1, rn), ctx);
+	if (rm != ARM_R0)
+		emit(ARM_MOV_R(ARM_R0, rm), ctx);
 
 
 	ctx->seen |= SEEN_CALL;
 	ctx->seen |= SEEN_CALL;
 	emit_mov_i(ARM_R3, (u32)jit_udiv, ctx);
 	emit_mov_i(ARM_R3, (u32)jit_udiv, ctx);
@@ -855,6 +876,14 @@ b_epilogue:
 		default:
 		default:
 			return -1;
 			return -1;
 		}
 		}
+
+		if (ctx->flags & FLAG_IMM_OVERFLOW)
+			/*
+			 * this instruction generated an overflow when
+			 * trying to access the literal pool, so
+			 * delegate this filter to the kernel interpreter.
+			 */
+			return -1;
 	}
 	}
 
 
 	/* compute offsets only during the first pass */
 	/* compute offsets only during the first pass */
@@ -917,7 +946,14 @@ void bpf_jit_compile(struct bpf_prog *fp)
 	ctx.idx = 0;
 	ctx.idx = 0;
 
 
 	build_prologue(&ctx);
 	build_prologue(&ctx);
-	build_body(&ctx);
+	if (build_body(&ctx) < 0) {
+#if __LINUX_ARM_ARCH__ < 7
+		if (ctx.imm_count)
+			kfree(ctx.imms);
+#endif
+		bpf_jit_binary_free(header);
+		goto out;
+	}
 	build_epilogue(&ctx);
 	build_epilogue(&ctx);
 
 
 	flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx));
 	flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx));

+ 1 - 0
arch/arm/xen/enlighten.c

@@ -272,6 +272,7 @@ void xen_arch_pre_suspend(void) { }
 void xen_arch_post_suspend(int suspend_cancelled) { }
 void xen_arch_post_suspend(int suspend_cancelled) { }
 void xen_timer_resume(void) { }
 void xen_timer_resume(void) { }
 void xen_arch_resume(void) { }
 void xen_arch_resume(void) { }
+void xen_arch_suspend(void) { }
 
 
 
 
 /* In the hypervisor.S file. */
 /* In the hypervisor.S file. */

+ 27 - 4
arch/arm64/boot/dts/arm/juno-motherboard.dtsi

@@ -21,6 +21,20 @@
 			clock-output-names = "juno_mb:clk25mhz";
 			clock-output-names = "juno_mb:clk25mhz";
 		};
 		};
 
 
+		v2m_refclk1mhz: refclk1mhz {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <1000000>;
+			clock-output-names = "juno_mb:refclk1mhz";
+		};
+
+		v2m_refclk32khz: refclk32khz {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+			clock-output-names = "juno_mb:refclk32khz";
+		};
+
 		motherboard {
 		motherboard {
 			compatible = "arm,vexpress,v2p-p1", "simple-bus";
 			compatible = "arm,vexpress,v2p-p1", "simple-bus";
 			#address-cells = <2>;  /* SMB chipselect number and offset */
 			#address-cells = <2>;  /* SMB chipselect number and offset */
@@ -66,6 +80,15 @@
 				#size-cells = <1>;
 				#size-cells = <1>;
 				ranges = <0 3 0 0x200000>;
 				ranges = <0 3 0 0x200000>;
 
 
+				v2m_sysctl: sysctl@020000 {
+					compatible = "arm,sp810", "arm,primecell";
+					reg = <0x020000 0x1000>;
+					clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&mb_clk24mhz>;
+					clock-names = "refclk", "timclk", "apb_pclk";
+					#clock-cells = <1>;
+					clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3";
+				};
+
 				mmci@050000 {
 				mmci@050000 {
 					compatible = "arm,pl180", "arm,primecell";
 					compatible = "arm,pl180", "arm,primecell";
 					reg = <0x050000 0x1000>;
 					reg = <0x050000 0x1000>;
@@ -106,16 +129,16 @@
 					compatible = "arm,sp804", "arm,primecell";
 					compatible = "arm,sp804", "arm,primecell";
 					reg = <0x110000 0x10000>;
 					reg = <0x110000 0x10000>;
 					interrupts = <9>;
 					interrupts = <9>;
-					clocks = <&mb_clk24mhz>, <&soc_smc50mhz>;
-					clock-names = "timclken1", "apb_pclk";
+					clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&mb_clk24mhz>;
+					clock-names = "timclken1", "timclken2", "apb_pclk";
 				};
 				};
 
 
 				v2m_timer23: timer@120000 {
 				v2m_timer23: timer@120000 {
 					compatible = "arm,sp804", "arm,primecell";
 					compatible = "arm,sp804", "arm,primecell";
 					reg = <0x120000 0x10000>;
 					reg = <0x120000 0x10000>;
 					interrupts = <9>;
 					interrupts = <9>;
-					clocks = <&mb_clk24mhz>, <&soc_smc50mhz>;
-					clock-names = "timclken1", "apb_pclk";
+					clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&mb_clk24mhz>;
+					clock-names = "timclken1", "timclken2", "apb_pclk";
 				};
 				};
 
 
 				rtc@170000 {
 				rtc@170000 {

+ 19 - 3
arch/arm64/crypto/crc32-arm64.c

@@ -147,13 +147,21 @@ static int chksum_final(struct shash_desc *desc, u8 *out)
 {
 {
 	struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
 	struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
 
 
+	put_unaligned_le32(ctx->crc, out);
+	return 0;
+}
+
+static int chksumc_final(struct shash_desc *desc, u8 *out)
+{
+	struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
+
 	put_unaligned_le32(~ctx->crc, out);
 	put_unaligned_le32(~ctx->crc, out);
 	return 0;
 	return 0;
 }
 }
 
 
 static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out)
 static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out)
 {
 {
-	put_unaligned_le32(~crc32_arm64_le_hw(crc, data, len), out);
+	put_unaligned_le32(crc32_arm64_le_hw(crc, data, len), out);
 	return 0;
 	return 0;
 }
 }
 
 
@@ -199,6 +207,14 @@ static int crc32_cra_init(struct crypto_tfm *tfm)
 {
 {
 	struct chksum_ctx *mctx = crypto_tfm_ctx(tfm);
 	struct chksum_ctx *mctx = crypto_tfm_ctx(tfm);
 
 
+	mctx->key = 0;
+	return 0;
+}
+
+static int crc32c_cra_init(struct crypto_tfm *tfm)
+{
+	struct chksum_ctx *mctx = crypto_tfm_ctx(tfm);
+
 	mctx->key = ~0;
 	mctx->key = ~0;
 	return 0;
 	return 0;
 }
 }
@@ -229,7 +245,7 @@ static struct shash_alg crc32c_alg = {
 	.setkey			=	chksum_setkey,
 	.setkey			=	chksum_setkey,
 	.init			=	chksum_init,
 	.init			=	chksum_init,
 	.update			=	chksumc_update,
 	.update			=	chksumc_update,
-	.final			=	chksum_final,
+	.final			=	chksumc_final,
 	.finup			=	chksumc_finup,
 	.finup			=	chksumc_finup,
 	.digest			=	chksumc_digest,
 	.digest			=	chksumc_digest,
 	.descsize		=	sizeof(struct chksum_desc_ctx),
 	.descsize		=	sizeof(struct chksum_desc_ctx),
@@ -241,7 +257,7 @@ static struct shash_alg crc32c_alg = {
 		.cra_alignmask		=	0,
 		.cra_alignmask		=	0,
 		.cra_ctxsize		=	sizeof(struct chksum_ctx),
 		.cra_ctxsize		=	sizeof(struct chksum_ctx),
 		.cra_module		=	THIS_MODULE,
 		.cra_module		=	THIS_MODULE,
-		.cra_init		=	crc32_cra_init,
+		.cra_init		=	crc32c_cra_init,
 	}
 	}
 };
 };
 
 

+ 3 - 0
arch/arm64/crypto/sha1-ce-glue.c

@@ -74,6 +74,9 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,
 
 
 static int sha1_ce_final(struct shash_desc *desc, u8 *out)
 static int sha1_ce_final(struct shash_desc *desc, u8 *out)
 {
 {
+	struct sha1_ce_state *sctx = shash_desc_ctx(desc);
+
+	sctx->finalize = 0;
 	kernel_neon_begin_partial(16);
 	kernel_neon_begin_partial(16);
 	sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform);
 	sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform);
 	kernel_neon_end();
 	kernel_neon_end();

+ 3 - 0
arch/arm64/crypto/sha2-ce-glue.c

@@ -75,6 +75,9 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data,
 
 
 static int sha256_ce_final(struct shash_desc *desc, u8 *out)
 static int sha256_ce_final(struct shash_desc *desc, u8 *out)
 {
 {
+	struct sha256_ce_state *sctx = shash_desc_ctx(desc);
+
+	sctx->finalize = 0;
 	kernel_neon_begin_partial(28);
 	kernel_neon_begin_partial(28);
 	sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform);
 	sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform);
 	kernel_neon_end();
 	kernel_neon_end();

+ 1 - 52
arch/arm64/kernel/alternative.c

@@ -24,7 +24,6 @@
 #include <asm/cacheflush.h>
 #include <asm/cacheflush.h>
 #include <asm/alternative.h>
 #include <asm/alternative.h>
 #include <asm/cpufeature.h>
 #include <asm/cpufeature.h>
-#include <asm/insn.h>
 #include <linux/stop_machine.h>
 #include <linux/stop_machine.h>
 
 
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
@@ -34,48 +33,6 @@ struct alt_region {
 	struct alt_instr *end;
 	struct alt_instr *end;
 };
 };
 
 
-/*
- * Decode the imm field of a b/bl instruction, and return the byte
- * offset as a signed value (so it can be used when computing a new
- * branch target).
- */
-static s32 get_branch_offset(u32 insn)
-{
-	s32 imm = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_26, insn);
-
-	/* sign-extend the immediate before turning it into a byte offset */
-	return (imm << 6) >> 4;
-}
-
-static u32 get_alt_insn(u8 *insnptr, u8 *altinsnptr)
-{
-	u32 insn;
-
-	aarch64_insn_read(altinsnptr, &insn);
-
-	/* Stop the world on instructions we don't support... */
-	BUG_ON(aarch64_insn_is_cbz(insn));
-	BUG_ON(aarch64_insn_is_cbnz(insn));
-	BUG_ON(aarch64_insn_is_bcond(insn));
-	/* ... and there is probably more. */
-
-	if (aarch64_insn_is_b(insn) || aarch64_insn_is_bl(insn)) {
-		enum aarch64_insn_branch_type type;
-		unsigned long target;
-
-		if (aarch64_insn_is_b(insn))
-			type = AARCH64_INSN_BRANCH_NOLINK;
-		else
-			type = AARCH64_INSN_BRANCH_LINK;
-
-		target = (unsigned long)altinsnptr + get_branch_offset(insn);
-		insn = aarch64_insn_gen_branch_imm((unsigned long)insnptr,
-						   target, type);
-	}
-
-	return insn;
-}
-
 static int __apply_alternatives(void *alt_region)
 static int __apply_alternatives(void *alt_region)
 {
 {
 	struct alt_instr *alt;
 	struct alt_instr *alt;
@@ -83,9 +40,6 @@ static int __apply_alternatives(void *alt_region)
 	u8 *origptr, *replptr;
 	u8 *origptr, *replptr;
 
 
 	for (alt = region->begin; alt < region->end; alt++) {
 	for (alt = region->begin; alt < region->end; alt++) {
-		u32 insn;
-		int i;
-
 		if (!cpus_have_cap(alt->cpufeature))
 		if (!cpus_have_cap(alt->cpufeature))
 			continue;
 			continue;
 
 
@@ -95,12 +49,7 @@ static int __apply_alternatives(void *alt_region)
 
 
 		origptr = (u8 *)&alt->orig_offset + alt->orig_offset;
 		origptr = (u8 *)&alt->orig_offset + alt->orig_offset;
 		replptr = (u8 *)&alt->alt_offset + alt->alt_offset;
 		replptr = (u8 *)&alt->alt_offset + alt->alt_offset;
-
-		for (i = 0; i < alt->alt_len; i += sizeof(insn)) {
-			insn = get_alt_insn(origptr + i, replptr + i);
-			aarch64_insn_write(origptr + i, insn);
-		}
-
+		memcpy(origptr, replptr, alt->alt_len);
 		flush_icache_range((uintptr_t)origptr,
 		flush_icache_range((uintptr_t)origptr,
 				   (uintptr_t)(origptr + alt->alt_len));
 				   (uintptr_t)(origptr + alt->alt_len));
 	}
 	}

+ 4 - 4
arch/arm64/kernel/perf_event.c

@@ -1315,15 +1315,15 @@ static int armpmu_device_probe(struct platform_device *pdev)
 	if (!cpu_pmu)
 	if (!cpu_pmu)
 		return -ENODEV;
 		return -ENODEV;
 
 
-	irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
-	if (!irqs)
-		return -ENOMEM;
-
 	/* Don't bother with PPIs; they're already affine */
 	/* Don't bother with PPIs; they're already affine */
 	irq = platform_get_irq(pdev, 0);
 	irq = platform_get_irq(pdev, 0);
 	if (irq >= 0 && irq_is_percpu(irq))
 	if (irq >= 0 && irq_is_percpu(irq))
 		return 0;
 		return 0;
 
 
+	irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
+	if (!irqs)
+		return -ENOMEM;
+
 	for (i = 0; i < pdev->num_resources; ++i) {
 	for (i = 0; i < pdev->num_resources; ++i) {
 		struct device_node *dn;
 		struct device_node *dn;
 		int cpu;
 		int cpu;

+ 2 - 0
arch/arm64/mm/dump.c

@@ -328,10 +328,12 @@ static int ptdump_init(void)
 			for (j = 0; j < pg_level[i].num; j++)
 			for (j = 0; j < pg_level[i].num; j++)
 				pg_level[i].mask |= pg_level[i].bits[j].mask;
 				pg_level[i].mask |= pg_level[i].bits[j].mask;
 
 
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
 	address_markers[VMEMMAP_START_NR].start_address =
 	address_markers[VMEMMAP_START_NR].start_address =
 				(unsigned long)virt_to_page(PAGE_OFFSET);
 				(unsigned long)virt_to_page(PAGE_OFFSET);
 	address_markers[VMEMMAP_END_NR].start_address =
 	address_markers[VMEMMAP_END_NR].start_address =
 				(unsigned long)virt_to_page(high_memory);
 				(unsigned long)virt_to_page(high_memory);
+#endif
 
 
 	pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL,
 	pe = debugfs_create_file("kernel_page_tables", 0400, NULL, NULL,
 				 &ptdump_fops);
 				 &ptdump_fops);

+ 1 - 1
arch/arm64/net/bpf_jit_comp.c

@@ -487,7 +487,7 @@ emit_cond_jmp:
 			return -EINVAL;
 			return -EINVAL;
 		}
 		}
 
 
-		imm64 = (u64)insn1.imm << 32 | imm;
+		imm64 = (u64)insn1.imm << 32 | (u32)imm;
 		emit_a64_mov_i64(dst, imm64, ctx);
 		emit_a64_mov_i64(dst, imm64, ctx);
 
 
 		return 1;
 		return 1;

+ 10 - 3
arch/ia64/pci/pci.c

@@ -478,9 +478,16 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
 
 
 int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
 int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
 {
 {
-	struct pci_controller *controller = bridge->bus->sysdata;
-
-	ACPI_COMPANION_SET(&bridge->dev, controller->companion);
+	/*
+	 * We pass NULL as parent to pci_create_root_bus(), so if it is not NULL
+	 * here, pci_create_root_bus() has been called by someone else and
+	 * sysdata is likely to be different from what we expect.  Let it go in
+	 * that case.
+	 */
+	if (!bridge->dev.parent) {
+		struct pci_controller *controller = bridge->bus->sysdata;
+		ACPI_COMPANION_SET(&bridge->dev, controller->companion);
+	}
 	return 0;
 	return 0;
 }
 }
 
 

+ 1 - 1
arch/mips/Makefile

@@ -277,7 +277,7 @@ LDFLAGS			+= -m $(ld-emul)
 ifdef CONFIG_MIPS
 ifdef CONFIG_MIPS
 CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
 CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
 	egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
 	egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
-	sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/")
+	sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
 ifdef CONFIG_64BIT
 ifdef CONFIG_64BIT
 CHECKFLAGS		+= -m64
 CHECKFLAGS		+= -m64
 endif
 endif

+ 3 - 0
arch/mips/ath79/prom.c

@@ -1,6 +1,7 @@
 /*
 /*
  *  Atheros AR71XX/AR724X/AR913X specific prom routines
  *  Atheros AR71XX/AR724X/AR913X specific prom routines
  *
  *
+ *  Copyright (C) 2015 Laurent Fasnacht <l@libres.ch>
  *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
  *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
  *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  *
  *
@@ -25,12 +26,14 @@ void __init prom_init(void)
 {
 {
 	fw_init_cmdline();
 	fw_init_cmdline();
 
 
+#ifdef CONFIG_BLK_DEV_INITRD
 	/* Read the initrd address from the firmware environment */
 	/* Read the initrd address from the firmware environment */
 	initrd_start = fw_getenvl("initrd_start");
 	initrd_start = fw_getenvl("initrd_start");
 	if (initrd_start) {
 	if (initrd_start) {
 		initrd_start = KSEG0ADDR(initrd_start);
 		initrd_start = KSEG0ADDR(initrd_start);
 		initrd_end = initrd_start + fw_getenvl("initrd_size");
 		initrd_end = initrd_start + fw_getenvl("initrd_size");
 	}
 	}
+#endif
 }
 }
 
 
 void __init prom_free_prom_memory(void)
 void __init prom_free_prom_memory(void)

+ 1 - 1
arch/mips/configs/fuloong2e_defconfig

@@ -194,7 +194,7 @@ CONFIG_USB_WUSB_CBAF=m
 CONFIG_USB_C67X00_HCD=m
 CONFIG_USB_C67X00_HCD=m
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_ISP1760_HCD=m
+CONFIG_USB_ISP1760=m
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_UHCI_HCD=m
 CONFIG_USB_UHCI_HCD=m
 CONFIG_USB_R8A66597_HCD=m
 CONFIG_USB_R8A66597_HCD=m

+ 2 - 2
arch/mips/include/asm/elf.h

@@ -304,7 +304,7 @@ do {									\
 									\
 									\
 	current->thread.abi = &mips_abi;				\
 	current->thread.abi = &mips_abi;				\
 									\
 									\
-	current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31;		\
+	current->thread.fpu.fcr31 = boot_cpu_data.fpu_csr31;		\
 } while (0)
 } while (0)
 
 
 #endif /* CONFIG_32BIT */
 #endif /* CONFIG_32BIT */
@@ -366,7 +366,7 @@ do {									\
 	else								\
 	else								\
 		current->thread.abi = &mips_abi;			\
 		current->thread.abi = &mips_abi;			\
 									\
 									\
-	current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31;		\
+	current->thread.fpu.fcr31 = boot_cpu_data.fpu_csr31;		\
 									\
 									\
 	p = personality(current->personality);				\
 	p = personality(current->personality);				\
 	if (p != PER_LINUX32 && p != PER_LINUX)				\
 	if (p != PER_LINUX32 && p != PER_LINUX)				\

+ 1 - 1
arch/mips/include/asm/smp.h

@@ -45,7 +45,7 @@ extern int __cpu_logical_map[NR_CPUS];
 #define SMP_DUMP		0x8
 #define SMP_DUMP		0x8
 #define SMP_ASK_C0COUNT		0x10
 #define SMP_ASK_C0COUNT		0x10
 
 
-extern volatile cpumask_t cpu_callin_map;
+extern cpumask_t cpu_callin_map;
 
 
 /* Mask of CPUs which are currently definitely operating coherently */
 /* Mask of CPUs which are currently definitely operating coherently */
 extern cpumask_t cpu_coherent_mask;
 extern cpumask_t cpu_coherent_mask;

+ 17 - 15
arch/mips/kernel/elf.c

@@ -76,14 +76,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
 
 
 	/* Lets see if this is an O32 ELF */
 	/* Lets see if this is an O32 ELF */
 	if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) {
 	if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) {
-		/* FR = 1 for N32 */
-		if (ehdr32->e_flags & EF_MIPS_ABI2)
-			state->overall_fp_mode = FP_FR1;
-		else
-			/* Set a good default FPU mode for O32 */
-			state->overall_fp_mode = cpu_has_mips_r6 ?
-				FP_FRE : FP_FR0;
-
 		if (ehdr32->e_flags & EF_MIPS_FP64) {
 		if (ehdr32->e_flags & EF_MIPS_FP64) {
 			/*
 			/*
 			 * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it
 			 * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it
@@ -104,9 +96,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
 				  (char *)&abiflags,
 				  (char *)&abiflags,
 				  sizeof(abiflags));
 				  sizeof(abiflags));
 	} else {
 	} else {
-		/* FR=1 is really the only option for 64-bit */
-		state->overall_fp_mode = FP_FR1;
-
 		if (phdr64->p_type != PT_MIPS_ABIFLAGS)
 		if (phdr64->p_type != PT_MIPS_ABIFLAGS)
 			return 0;
 			return 0;
 		if (phdr64->p_filesz < sizeof(abiflags))
 		if (phdr64->p_filesz < sizeof(abiflags))
@@ -137,6 +126,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
 	struct elf32_hdr *ehdr = _ehdr;
 	struct elf32_hdr *ehdr = _ehdr;
 	struct mode_req prog_req, interp_req;
 	struct mode_req prog_req, interp_req;
 	int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
 	int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
+	bool is_mips64;
 
 
 	if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
 	if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
 		return 0;
 		return 0;
@@ -152,10 +142,22 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
 		abi0 = abi1 = fp_abi;
 		abi0 = abi1 = fp_abi;
 	}
 	}
 
 
-	/* ABI limits. O32 = FP_64A, N32/N64 = FP_SOFT */
-	max_abi = ((ehdr->e_ident[EI_CLASS] == ELFCLASS32) &&
-		   (!(ehdr->e_flags & EF_MIPS_ABI2))) ?
-		MIPS_ABI_FP_64A : MIPS_ABI_FP_SOFT;
+	is_mips64 = (ehdr->e_ident[EI_CLASS] == ELFCLASS64) ||
+		    (ehdr->e_flags & EF_MIPS_ABI2);
+
+	if (is_mips64) {
+		/* MIPS64 code always uses FR=1, thus the default is easy */
+		state->overall_fp_mode = FP_FR1;
+
+		/* Disallow access to the various FPXX & FP64 ABIs */
+		max_abi = MIPS_ABI_FP_SOFT;
+	} else {
+		/* Default to a mode capable of running code expecting FR=0 */
+		state->overall_fp_mode = cpu_has_mips_r6 ? FP_FRE : FP_FR0;
+
+		/* Allow all ABIs we know about */
+		max_abi = MIPS_ABI_FP_64A;
+	}
 
 
 	if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) ||
 	if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) ||
 	    (abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN))
 	    (abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN))

+ 1 - 1
arch/mips/kernel/irq.c

@@ -29,7 +29,7 @@
 int kgdb_early_setup;
 int kgdb_early_setup;
 #endif
 #endif
 
 
-static unsigned long irq_map[NR_IRQS / BITS_PER_LONG];
+static DECLARE_BITMAP(irq_map, NR_IRQS);
 
 
 int allocate_irqno(void)
 int allocate_irqno(void)
 {
 {

+ 1 - 1
arch/mips/kernel/ptrace.c

@@ -176,7 +176,7 @@ int ptrace_setfpregs(struct task_struct *child, __u32 __user *data)
 
 
 	__get_user(value, data + 64);
 	__get_user(value, data + 64);
 	fcr31 = child->thread.fpu.fcr31;
 	fcr31 = child->thread.fpu.fcr31;
-	mask = current_cpu_data.fpu_msk31;
+	mask = boot_cpu_data.fpu_msk31;
 	child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask);
 	child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask);
 
 
 	/* FIR may not be written.  */
 	/* FIR may not be written.  */

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно