Browse Source

Merge branch '3.14-fixes' into mips-for-linux-next

Ralf Baechle 11 years ago
parent
commit
ade63aada7
100 changed files with 515 additions and 734 deletions
  1. 5 6
      Documentation/device-mapper/cache.txt
  2. 31 3
      Documentation/device-mapper/thin-provisioning.txt
  3. 2 2
      Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
  4. 1 0
      Documentation/devicetree/bindings/net/micrel-ks8851.txt
  5. 22 0
      Documentation/devicetree/bindings/net/opencores-ethoc.txt
  6. 4 4
      Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt
  7. 0 6
      Documentation/networking/can.txt
  8. 2 2
      Documentation/networking/netlink_mmap.txt
  9. 1 1
      Documentation/networking/packet_mmap.txt
  10. 32 20
      Documentation/networking/timestamping.txt
  11. 67 53
      MAINTAINERS
  12. 1 1
      Makefile
  13. 2 2
      arch/arc/mm/cache_arc700.c
  14. 3 0
      arch/arm/Kconfig
  15. 1 0
      arch/arm/boot/compressed/.gitignore
  16. 1 1
      arch/arm/boot/dts/bcm11351.dtsi
  17. 1 1
      arch/arm/boot/dts/keystone-clocks.dtsi
  18. 1 1
      arch/arm/boot/dts/omap3-gta04.dts
  19. 1 1
      arch/arm/boot/dts/omap3-igep0020.dts
  20. 1 1
      arch/arm/boot/dts/omap3-igep0030.dts
  21. 1 1
      arch/arm/boot/dts/sama5d36.dtsi
  22. 1 1
      arch/arm/boot/dts/sun4i-a10.dtsi
  23. 1 1
      arch/arm/boot/dts/sun5i-a10s.dtsi
  24. 1 1
      arch/arm/boot/dts/sun5i-a13.dtsi
  25. 6 6
      arch/arm/boot/dts/sun7i-a20.dtsi
  26. 3 0
      arch/arm/configs/tegra_defconfig
  27. 3 6
      arch/arm/include/asm/memory.h
  28. 12 0
      arch/arm/kernel/head-common.S
  29. 1 1
      arch/arm/kernel/head.S
  30. 2 0
      arch/arm/mach-omap2/cclock3xxx_data.c
  31. 5 3
      arch/arm/mach-omap2/cpuidle44xx.c
  32. 77 15
      arch/arm/mach-omap2/dpll3xxx.c
  33. 11 9
      arch/arm/mach-omap2/omap_hwmod.c
  34. 4 5
      arch/arm/mach-omap2/omap_hwmod_7xx_data.c
  35. 20 1
      arch/arm/mach-omap2/pdata-quirks.c
  36. 2 2
      arch/arm/mach-omap2/prminst44xx.c
  37. 2 0
      arch/arm/mach-sa1100/include/mach/collie.h
  38. 3 0
      arch/arm/mm/dump.c
  39. 1 0
      arch/c6x/include/asm/cache.h
  40. 1 1
      arch/cris/include/asm/bitops.h
  41. 1 1
      arch/ia64/kernel/uncached.c
  42. 18 11
      arch/mips/Kconfig
  43. 7 3
      arch/mips/Kconfig.debug
  44. 1 3
      arch/mips/alchemy/board-gpr.c
  45. 1 3
      arch/mips/alchemy/board-mtx1.c
  46. 1 0
      arch/mips/bcm47xx/board.c
  47. 1 1
      arch/mips/bcm47xx/nvram.c
  48. 12 10
      arch/mips/cavium-octeon/octeon-irq.c
  49. 13 2
      arch/mips/include/asm/asmmacro.h
  50. 1 1
      arch/mips/include/asm/fpu.h
  51. 10 10
      arch/mips/include/asm/ftrace.h
  52. 0 12
      arch/mips/include/asm/mach-au1x00/au1000.h
  53. 6 4
      arch/mips/include/asm/syscall.h
  54. 2 2
      arch/mips/include/uapi/asm/inst.h
  55. 2 3
      arch/mips/kernel/ftrace.c
  56. 8 8
      arch/mips/kernel/r4k_fpu.S
  57. 3 0
      arch/mips/kernel/rtlx-cmp.c
  58. 3 0
      arch/mips/kernel/rtlx-mt.c
  59. 3 3
      arch/mips/math-emu/cp1emu.c
  60. 1 1
      arch/mips/mti-malta/malta-amon.c
  61. 2 2
      arch/mips/mti-malta/malta-int.c
  62. 1 0
      arch/mips/pci/msi-octeon.c
  63. 1 0
      arch/mips/power/hibernate.S
  64. 0 11
      arch/parisc/include/asm/page.h
  65. 0 4
      arch/parisc/include/asm/spinlock.h
  66. 2 2
      arch/parisc/include/uapi/asm/unistd.h
  67. 0 64
      arch/parisc/kernel/cache.c
  68. 1 0
      arch/parisc/kernel/syscall_table.S
  69. 9 0
      arch/powerpc/kernel/process.c
  70. 1 0
      arch/powerpc/kernel/reloc_64.S
  71. 2 69
      arch/powerpc/kvm/book3s_hv_rmhandlers.S
  72. 2 1
      arch/powerpc/platforms/cell/ras.c
  73. 1 1
      arch/sh/include/cpu-sh2/cpu/cache.h
  74. 2 2
      arch/sh/include/cpu-sh2a/cpu/cache.h
  75. 1 1
      arch/sh/include/cpu-sh3/cpu/cache.h
  76. 1 1
      arch/sh/include/cpu-sh4/cpu/cache.h
  77. 2 2
      arch/sh/kernel/cpu/init.c
  78. 1 1
      arch/sh/mm/cache-debugfs.c
  79. 2 2
      arch/sh/mm/cache-sh2.c
  80. 4 2
      arch/sh/mm/cache-sh2a.c
  81. 2 2
      arch/sh/mm/cache-sh4.c
  82. 2 2
      arch/sh/mm/cache-shx3.c
  83. 2 2
      arch/sh/mm/cache.c
  84. 3 1
      arch/sparc/kernel/process_64.c
  85. 2 2
      arch/sparc/kernel/syscalls.S
  86. 1 1
      arch/sparc/mm/tsb.c
  87. 0 4
      arch/x86/Kconfig.cpu
  88. 2 6
      arch/x86/include/asm/barrier.h
  89. 1 0
      arch/x86/include/asm/efi.h
  90. 1 1
      arch/x86/include/asm/io.h
  91. 2 3
      arch/x86/include/asm/spinlock.h
  92. 1 19
      arch/x86/kernel/aperture_64.c
  93. 0 272
      arch/x86/kernel/cpu/centaur.c
  94. 2 1
      arch/x86/kernel/cpu/perf_event_intel_uncore.c
  95. 6 1
      arch/x86/kernel/head_32.S
  96. 5 1
      arch/x86/kernel/head_64.S
  97. 12 3
      arch/x86/kernel/i387.c
  98. 1 1
      arch/x86/kernel/quirks.c
  99. 2 8
      arch/x86/kernel/setup.c
  100. 3 3
      arch/x86/kvm/svm.c

+ 5 - 6
Documentation/device-mapper/cache.txt

@@ -124,12 +124,11 @@ the default being 204800 sectors (or 100MB).
 Updating on-disk metadata
 Updating on-disk metadata
 -------------------------
 -------------------------
 
 
-On-disk metadata is committed every time a REQ_SYNC or REQ_FUA bio is
-written.  If no such requests are made then commits will occur every
-second.  This means the cache behaves like a physical disk that has a
-write cache (the same is true of the thin-provisioning target).  If
-power is lost you may lose some recent writes.  The metadata should
-always be consistent in spite of any crash.
+On-disk metadata is committed every time a FLUSH or FUA bio is written.
+If no such requests are made then commits will occur every second.  This
+means the cache behaves like a physical disk that has a volatile write
+cache.  If power is lost you may lose some recent writes.  The metadata
+should always be consistent in spite of any crash.
 
 
 The 'dirty' state for a cache block changes far too frequently for us
 The 'dirty' state for a cache block changes far too frequently for us
 to keep updating it on the fly.  So we treat it as a hint.  In normal
 to keep updating it on the fly.  So we treat it as a hint.  In normal

+ 31 - 3
Documentation/device-mapper/thin-provisioning.txt

@@ -116,6 +116,35 @@ Resuming a device with a new table itself triggers an event so the
 userspace daemon can use this to detect a situation where a new table
 userspace daemon can use this to detect a situation where a new table
 already exceeds the threshold.
 already exceeds the threshold.
 
 
+A low water mark for the metadata device is maintained in the kernel and
+will trigger a dm event if free space on the metadata device drops below
+it.
+
+Updating on-disk metadata
+-------------------------
+
+On-disk metadata is committed every time a FLUSH or FUA bio is written.
+If no such requests are made then commits will occur every second.  This
+means the thin-provisioning target behaves like a physical disk that has
+a volatile write cache.  If power is lost you may lose some recent
+writes.  The metadata should always be consistent in spite of any crash.
+
+If data space is exhausted the pool will either error or queue IO
+according to the configuration (see: error_if_no_space).  If metadata
+space is exhausted or a metadata operation fails: the pool will error IO
+until the pool is taken offline and repair is performed to 1) fix any
+potential inconsistencies and 2) clear the flag that imposes repair.
+Once the pool's metadata device is repaired it may be resized, which
+will allow the pool to return to normal operation.  Note that if a pool
+is flagged as needing repair, the pool's data and metadata devices
+cannot be resized until repair is performed.  It should also be noted
+that when the pool's metadata space is exhausted the current metadata
+transaction is aborted.  Given that the pool will cache IO whose
+completion may have already been acknowledged to upper IO layers
+(e.g. filesystem) it is strongly suggested that consistency checks
+(e.g. fsck) be performed on those layers when repair of the pool is
+required.
+
 Thin provisioning
 Thin provisioning
 -----------------
 -----------------
 
 
@@ -258,10 +287,9 @@ ii) Status
 	should register for the event and then check the target's status.
 	should register for the event and then check the target's status.
 
 
     held metadata root:
     held metadata root:
-	The location, in sectors, of the metadata root that has been
+	The location, in blocks, of the metadata root that has been
 	'held' for userspace read access.  '-' indicates there is no
 	'held' for userspace read access.  '-' indicates there is no
-	held root.  This feature is not yet implemented so '-' is
-	always returned.
+	held root.
 
 
     discard_passdown|no_discard_passdown
     discard_passdown|no_discard_passdown
 	Whether or not discards are actually being passed down to the
 	Whether or not discards are actually being passed down to the

+ 2 - 2
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt

@@ -21,9 +21,9 @@ Required Properties:
     must appear in the same order as the output clocks.
     must appear in the same order as the output clocks.
   - #clock-cells: Must be 1
   - #clock-cells: Must be 1
   - clock-output-names: The name of the clocks as free-form strings
   - clock-output-names: The name of the clocks as free-form strings
-  - renesas,indices: Indices of the gate clocks into the group (0 to 31)
+  - renesas,clock-indices: Indices of the gate clocks into the group (0 to 31)
 
 
-The clocks, clock-output-names and renesas,indices properties contain one
+The clocks, clock-output-names and renesas,clock-indices properties contain one
 entry per gate clock. The MSTP groups are sparsely populated. Unimplemented
 entry per gate clock. The MSTP groups are sparsely populated. Unimplemented
 gate clocks must not be declared.
 gate clocks must not be declared.
 
 

+ 1 - 0
Documentation/devicetree/bindings/net/micrel-ks8851.txt

@@ -7,3 +7,4 @@ Required properties:
 
 
 Optional properties:
 Optional properties:
 - local-mac-address : Ethernet mac address to use
 - local-mac-address : Ethernet mac address to use
+- vdd-supply:	supply for Ethernet mac

+ 22 - 0
Documentation/devicetree/bindings/net/opencores-ethoc.txt

@@ -0,0 +1,22 @@
+* OpenCores MAC 10/100 Mbps
+
+Required properties:
+- compatible: Should be "opencores,ethoc".
+- reg: two memory regions (address and length),
+  first region is for the device registers and descriptor rings,
+  second is for the device packet memory.
+- interrupts: interrupt for the device.
+
+Optional properties:
+- clocks: phandle to refer to the clk used as per
+  Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Examples:
+
+	enet0: ethoc@fd030000 {
+		compatible = "opencores,ethoc";
+		reg = <0xfd030000 0x4000 0xfd800000 0x4000>;
+		interrupts = <1>;
+		local-mac-address = [00 50 c2 13 6f 00];
+		clocks = <&osc>;
+        };

+ 4 - 4
Documentation/devicetree/bindings/pinctrl/brcm,capri-pinctrl.txt → Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt

@@ -1,4 +1,4 @@
-Broadcom Capri Pin Controller
+Broadcom BCM281xx Pin Controller
 
 
 This is a pin controller for the Broadcom BCM281xx SoC family, which includes
 This is a pin controller for the Broadcom BCM281xx SoC family, which includes
 BCM11130, BCM11140, BCM11351, BCM28145, and BCM28155 SoCs.
 BCM11130, BCM11140, BCM11351, BCM28145, and BCM28155 SoCs.
@@ -7,14 +7,14 @@ BCM11130, BCM11140, BCM11351, BCM28145, and BCM28155 SoCs.
 
 
 Required Properties:
 Required Properties:
 
 
-- compatible:	Must be "brcm,capri-pinctrl".
+- compatible:	Must be "brcm,bcm11351-pinctrl"
 - reg:		Base address of the PAD Controller register block and the size
 - reg:		Base address of the PAD Controller register block and the size
 		of the block.
 		of the block.
 
 
 For example, the following is the bare minimum node:
 For example, the following is the bare minimum node:
 
 
 	pinctrl@35004800 {
 	pinctrl@35004800 {
-		compatible = "brcm,capri-pinctrl";
+		compatible = "brcm,bcm11351-pinctrl";
 		reg = <0x35004800 0x430>;
 		reg = <0x35004800 0x430>;
 	};
 	};
 
 
@@ -119,7 +119,7 @@ Optional Properties (for HDMI pins):
 Example:
 Example:
 // pin controller node
 // pin controller node
 pinctrl@35004800 {
 pinctrl@35004800 {
-	compatible = "brcm,capri-pinctrl";
+	compatible = "brcmbcm11351-pinctrl";
 	reg = <0x35004800 0x430>;
 	reg = <0x35004800 0x430>;
 
 
 	// pin configuration node
 	// pin configuration node

+ 0 - 6
Documentation/networking/can.txt

@@ -554,12 +554,6 @@ solution for a couple of reasons:
   not specified in the struct can_frame and therefore it is only valid in
   not specified in the struct can_frame and therefore it is only valid in
   CANFD_MTU sized CAN FD frames.
   CANFD_MTU sized CAN FD frames.
 
 
-  As long as the payload length is <=8 the received CAN frames from CAN FD
-  capable CAN devices can be received and read by legacy sockets too. When
-  user-generated CAN FD frames have a payload length <=8 these can be send
-  by legacy CAN network interfaces too. Sending CAN FD frames with payload
-  length > 8 to a legacy CAN network interface returns an -EMSGSIZE error.
-
   Implementation hint for new CAN applications:
   Implementation hint for new CAN applications:
 
 
   To build a CAN FD aware application use struct canfd_frame as basic CAN
   To build a CAN FD aware application use struct canfd_frame as basic CAN

+ 2 - 2
Documentation/networking/netlink_mmap.txt

@@ -226,9 +226,9 @@ Ring setup:
 	void *rx_ring, *tx_ring;
 	void *rx_ring, *tx_ring;
 
 
 	/* Configure ring parameters */
 	/* Configure ring parameters */
-	if (setsockopt(fd, NETLINK_RX_RING, &req, sizeof(req)) < 0)
+	if (setsockopt(fd, SOL_NETLINK, NETLINK_RX_RING, &req, sizeof(req)) < 0)
 		exit(1);
 		exit(1);
-	if (setsockopt(fd, NETLINK_TX_RING, &req, sizeof(req)) < 0)
+	if (setsockopt(fd, SOL_NETLINK, NETLINK_TX_RING, &req, sizeof(req)) < 0)
 		exit(1)
 		exit(1)
 
 
 	/* Calculate size of each individual ring */
 	/* Calculate size of each individual ring */

+ 1 - 1
Documentation/networking/packet_mmap.txt

@@ -453,7 +453,7 @@ TP_STATUS_COPY        : This flag indicates that the frame (and associated
                         enabled previously with setsockopt() and 
                         enabled previously with setsockopt() and 
                         the PACKET_COPY_THRESH option. 
                         the PACKET_COPY_THRESH option. 
 
 
-                        The number of frames than can be buffered to 
+                        The number of frames that can be buffered to
                         be read with recvfrom is limited like a normal socket.
                         be read with recvfrom is limited like a normal socket.
                         See the SO_RCVBUF option in the socket (7) man page.
                         See the SO_RCVBUF option in the socket (7) man page.
 
 

+ 32 - 20
Documentation/networking/timestamping.txt

@@ -21,26 +21,38 @@ has such a feature).
 
 
 SO_TIMESTAMPING:
 SO_TIMESTAMPING:
 
 
-Instructs the socket layer which kind of information is wanted. The
-parameter is an integer with some of the following bits set. Setting
-other bits is an error and doesn't change the current state.
-
-SOF_TIMESTAMPING_TX_HARDWARE:  try to obtain send time stamp in hardware
-SOF_TIMESTAMPING_TX_SOFTWARE:  if SOF_TIMESTAMPING_TX_HARDWARE is off or
-                               fails, then do it in software
-SOF_TIMESTAMPING_RX_HARDWARE:  return the original, unmodified time stamp
-                               as generated by the hardware
-SOF_TIMESTAMPING_RX_SOFTWARE:  if SOF_TIMESTAMPING_RX_HARDWARE is off or
-                               fails, then do it in software
-SOF_TIMESTAMPING_RAW_HARDWARE: return original raw hardware time stamp
-SOF_TIMESTAMPING_SYS_HARDWARE: return hardware time stamp transformed to
-                               the system time base
-SOF_TIMESTAMPING_SOFTWARE:     return system time stamp generated in
-                               software
-
-SOF_TIMESTAMPING_TX/RX determine how time stamps are generated.
-SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the
-following control message:
+Instructs the socket layer which kind of information should be collected
+and/or reported.  The parameter is an integer with some of the following
+bits set. Setting other bits is an error and doesn't change the current
+state.
+
+Four of the bits are requests to the stack to try to generate
+timestamps.  Any combination of them is valid.
+
+SOF_TIMESTAMPING_TX_HARDWARE:  try to obtain send time stamps in hardware
+SOF_TIMESTAMPING_TX_SOFTWARE:  try to obtain send time stamps in software
+SOF_TIMESTAMPING_RX_HARDWARE:  try to obtain receive time stamps in hardware
+SOF_TIMESTAMPING_RX_SOFTWARE:  try to obtain receive time stamps in software
+
+The other three bits control which timestamps will be reported in a
+generated control message.  If none of these bits are set or if none of
+the set bits correspond to data that is available, then the control
+message will not be generated:
+
+SOF_TIMESTAMPING_SOFTWARE:     report systime if available
+SOF_TIMESTAMPING_SYS_HARDWARE: report hwtimetrans if available
+SOF_TIMESTAMPING_RAW_HARDWARE: report hwtimeraw if available
+
+It is worth noting that timestamps may be collected for reasons other
+than being requested by a particular socket with
+SOF_TIMESTAMPING_[TR]X_(HARD|SOFT)WARE.  For example, most drivers that
+can generate hardware receive timestamps ignore
+SOF_TIMESTAMPING_RX_HARDWARE.  It is still a good idea to set that flag
+in case future drivers pay attention.
+
+If timestamps are reported, they will appear in a control message with
+cmsg_level==SOL_SOCKET, cmsg_type==SO_TIMESTAMPING, and a payload like
+this:
 
 
 struct scm_timestamping {
 struct scm_timestamping {
 	struct timespec systime;
 	struct timespec systime;

+ 67 - 53
MAINTAINERS

@@ -73,7 +73,8 @@ Descriptions of section entries:
 	L: Mailing list that is relevant to this area
 	L: Mailing list that is relevant to this area
 	W: Web-page with status/info
 	W: Web-page with status/info
 	Q: Patchwork web based patch tracking system site
 	Q: Patchwork web based patch tracking system site
-	T: SCM tree type and location.  Type is one of: git, hg, quilt, stgit, topgit.
+	T: SCM tree type and location.
+	   Type is one of: git, hg, quilt, stgit, topgit
 	S: Status, one of the following:
 	S: Status, one of the following:
 	   Supported:	Someone is actually paid to look after this.
 	   Supported:	Someone is actually paid to look after this.
 	   Maintained:	Someone actually looks after it.
 	   Maintained:	Someone actually looks after it.
@@ -473,7 +474,7 @@ F:	net/rxrpc/af_rxrpc.c
 
 
 AGPGART DRIVER
 AGPGART DRIVER
 M:	David Airlie <airlied@linux.ie>
 M:	David Airlie <airlied@linux.ie>
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
+T:	git git://people.freedesktop.org/~airlied/linux (part of drm maint)
 S:	Maintained
 S:	Maintained
 F:	drivers/char/agp/
 F:	drivers/char/agp/
 F:	include/linux/agp*
 F:	include/linux/agp*
@@ -910,11 +911,11 @@ F:	arch/arm/include/asm/hardware/dec21285.h
 F:	arch/arm/mach-footbridge/
 F:	arch/arm/mach-footbridge/
 
 
 ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
 ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
-M:	Shawn Guo <shawn.guo@linaro.org>
+M:	Shawn Guo <shawn.guo@freescale.com>
 M:	Sascha Hauer <kernel@pengutronix.de>
 M:	Sascha Hauer <kernel@pengutronix.de>
 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
-T:	git git://git.linaro.org/people/shawnguo/linux-2.6.git
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
 F:	arch/arm/mach-imx/
 F:	arch/arm/mach-imx/
 F:	arch/arm/boot/dts/imx*
 F:	arch/arm/boot/dts/imx*
 F:	arch/arm/configs/imx*_defconfig
 F:	arch/arm/configs/imx*_defconfig
@@ -1612,11 +1613,11 @@ S:	Maintained
 F:	drivers/net/wireless/atmel*
 F:	drivers/net/wireless/atmel*
 
 
 ATTO EXPRESSSAS SAS/SATA RAID SCSI DRIVER
 ATTO EXPRESSSAS SAS/SATA RAID SCSI DRIVER
-M:      Bradley Grove <linuxdrivers@attotech.com>
-L:      linux-scsi@vger.kernel.org
-W:      http://www.attotech.com
-S:      Supported
-F:      drivers/scsi/esas2r
+M:	Bradley Grove <linuxdrivers@attotech.com>
+L:	linux-scsi@vger.kernel.org
+W:	http://www.attotech.com
+S:	Supported
+F:	drivers/scsi/esas2r
 
 
 AUDIT SUBSYSTEM
 AUDIT SUBSYSTEM
 M:	Eric Paris <eparis@redhat.com>
 M:	Eric Paris <eparis@redhat.com>
@@ -1737,6 +1738,7 @@ F:	include/uapi/linux/bfs_fs.h
 BLACKFIN ARCHITECTURE
 BLACKFIN ARCHITECTURE
 M:	Steven Miao <realmz6@gmail.com>
 M:	Steven Miao <realmz6@gmail.com>
 L:	adi-buildroot-devel@lists.sourceforge.net
 L:	adi-buildroot-devel@lists.sourceforge.net
+T:	git git://git.code.sf.net/p/adi-linux/code
 W:	http://blackfin.uclinux.org
 W:	http://blackfin.uclinux.org
 S:	Supported
 S:	Supported
 F:	arch/blackfin/
 F:	arch/blackfin/
@@ -2159,7 +2161,7 @@ F:	Documentation/zh_CN/
 
 
 CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
 CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
 M:	Peter Chen <Peter.Chen@freescale.com>
 M:	Peter Chen <Peter.Chen@freescale.com>
-T:	git://github.com/hzpeterchen/linux-usb.git
+T:	git git://github.com/hzpeterchen/linux-usb.git
 L:	linux-usb@vger.kernel.org
 L:	linux-usb@vger.kernel.org
 S:	Maintained
 S:	Maintained
 F:	drivers/usb/chipidea/
 F:	drivers/usb/chipidea/
@@ -2179,9 +2181,9 @@ S:	Supported
 F:	drivers/net/ethernet/cisco/enic/
 F:	drivers/net/ethernet/cisco/enic/
 
 
 CISCO VIC LOW LATENCY NIC DRIVER
 CISCO VIC LOW LATENCY NIC DRIVER
-M:      Upinder Malhi <umalhi@cisco.com>
-S:      Supported
-F:      drivers/infiniband/hw/usnic
+M:	Upinder Malhi <umalhi@cisco.com>
+S:	Supported
+F:	drivers/infiniband/hw/usnic
 
 
 CIRRUS LOGIC EP93XX ETHERNET DRIVER
 CIRRUS LOGIC EP93XX ETHERNET DRIVER
 M:	Hartley Sweeten <hsweeten@visionengravers.com>
 M:	Hartley Sweeten <hsweeten@visionengravers.com>
@@ -2378,20 +2380,20 @@ F:	drivers/cpufreq/arm_big_little.c
 F:	drivers/cpufreq/arm_big_little_dt.c
 F:	drivers/cpufreq/arm_big_little_dt.c
 
 
 CPUIDLE DRIVER - ARM BIG LITTLE
 CPUIDLE DRIVER - ARM BIG LITTLE
-M:      Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
-M:      Daniel Lezcano <daniel.lezcano@linaro.org>
-L:      linux-pm@vger.kernel.org
-L:      linux-arm-kernel@lists.infradead.org
-T:      git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
-S:      Maintained
-F:      drivers/cpuidle/cpuidle-big_little.c
+M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
+M:	Daniel Lezcano <daniel.lezcano@linaro.org>
+L:	linux-pm@vger.kernel.org
+L:	linux-arm-kernel@lists.infradead.org
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
+S:	Maintained
+F:	drivers/cpuidle/cpuidle-big_little.c
 
 
 CPUIDLE DRIVERS
 CPUIDLE DRIVERS
 M:	Rafael J. Wysocki <rjw@rjwysocki.net>
 M:	Rafael J. Wysocki <rjw@rjwysocki.net>
 M:	Daniel Lezcano <daniel.lezcano@linaro.org>
 M:	Daniel Lezcano <daniel.lezcano@linaro.org>
 L:	linux-pm@vger.kernel.org
 L:	linux-pm@vger.kernel.org
 S:	Maintained
 S:	Maintained
-T:	git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
 F:	drivers/cpuidle/*
 F:	drivers/cpuidle/*
 F:	include/linux/cpuidle.h
 F:	include/linux/cpuidle.h
 
 
@@ -2458,9 +2460,9 @@ S:	Maintained
 F:	sound/pci/cs5535audio/
 F:	sound/pci/cs5535audio/
 
 
 CW1200 WLAN driver
 CW1200 WLAN driver
-M:     Solomon Peachy <pizza@shaftnet.org>
-S:     Maintained
-F:     drivers/net/wireless/cw1200/
+M:	Solomon Peachy <pizza@shaftnet.org>
+S:	Maintained
+F:	drivers/net/wireless/cw1200/
 
 
 CX18 VIDEO4LINUX DRIVER
 CX18 VIDEO4LINUX DRIVER
 M:	Andy Walls <awalls@md.metrocast.net>
 M:	Andy Walls <awalls@md.metrocast.net>
@@ -3095,6 +3097,8 @@ F:	fs/ecryptfs/
 
 
 EDAC-CORE
 EDAC-CORE
 M:	Doug Thompson <dougthompson@xmission.com>
 M:	Doug Thompson <dougthompson@xmission.com>
+M:	Borislav Petkov <bp@alien8.de>
+M:	Mauro Carvalho Chehab <m.chehab@samsung.com>
 L:	linux-edac@vger.kernel.org
 L:	linux-edac@vger.kernel.org
 W:	bluesmoke.sourceforge.net
 W:	bluesmoke.sourceforge.net
 S:	Supported
 S:	Supported
@@ -4541,6 +4545,7 @@ M:	Greg Rose <gregory.v.rose@intel.com>
 M:	Alex Duyck <alexander.h.duyck@intel.com>
 M:	Alex Duyck <alexander.h.duyck@intel.com>
 M:	John Ronciak <john.ronciak@intel.com>
 M:	John Ronciak <john.ronciak@intel.com>
 M:	Mitch Williams <mitch.a.williams@intel.com>
 M:	Mitch Williams <mitch.a.williams@intel.com>
+M:	Linux NICS <linux.nics@intel.com>
 L:	e1000-devel@lists.sourceforge.net
 L:	e1000-devel@lists.sourceforge.net
 W:	http://www.intel.com/support/feedback.htm
 W:	http://www.intel.com/support/feedback.htm
 W:	http://e1000.sourceforge.net/
 W:	http://e1000.sourceforge.net/
@@ -4558,6 +4563,7 @@ F:	Documentation/networking/ixgbevf.txt
 F:	Documentation/networking/i40e.txt
 F:	Documentation/networking/i40e.txt
 F:	Documentation/networking/i40evf.txt
 F:	Documentation/networking/i40evf.txt
 F:	drivers/net/ethernet/intel/
 F:	drivers/net/ethernet/intel/
+F:	drivers/net/ethernet/intel/*/
 
 
 INTEL-MID GPIO DRIVER
 INTEL-MID GPIO DRIVER
 M:	David Cohen <david.a.cohen@linux.intel.com>
 M:	David Cohen <david.a.cohen@linux.intel.com>
@@ -4914,7 +4920,7 @@ F:	drivers/staging/ktap/
 KCONFIG
 KCONFIG
 M:	"Yann E. MORIN" <yann.morin.1998@free.fr>
 M:	"Yann E. MORIN" <yann.morin.1998@free.fr>
 L:	linux-kbuild@vger.kernel.org
 L:	linux-kbuild@vger.kernel.org
-T:	git://gitorious.org/linux-kconfig/linux-kconfig
+T:	git git://gitorious.org/linux-kconfig/linux-kconfig
 S:	Maintained
 S:	Maintained
 F:	Documentation/kbuild/kconfig-language.txt
 F:	Documentation/kbuild/kconfig-language.txt
 F:	scripts/kconfig/
 F:	scripts/kconfig/
@@ -5471,11 +5477,11 @@ S:	Maintained
 F:	drivers/media/tuners/m88ts2022*
 F:	drivers/media/tuners/m88ts2022*
 
 
 MA901 MASTERKIT USB FM RADIO DRIVER
 MA901 MASTERKIT USB FM RADIO DRIVER
-M:      Alexey Klimov <klimov.linux@gmail.com>
-L:      linux-media@vger.kernel.org
-T:      git git://linuxtv.org/media_tree.git
-S:      Maintained
-F:      drivers/media/radio/radio-ma901.c
+M:	Alexey Klimov <klimov.linux@gmail.com>
+L:	linux-media@vger.kernel.org
+T:	git git://linuxtv.org/media_tree.git
+S:	Maintained
+F:	drivers/media/radio/radio-ma901.c
 
 
 MAC80211
 MAC80211
 M:	Johannes Berg <johannes@sipsolutions.net>
 M:	Johannes Berg <johannes@sipsolutions.net>
@@ -5636,7 +5642,7 @@ F:	drivers/scsi/megaraid/
 
 
 MELLANOX ETHERNET DRIVER (mlx4_en)
 MELLANOX ETHERNET DRIVER (mlx4_en)
 M:	Amir Vadai <amirv@mellanox.com>
 M:	Amir Vadai <amirv@mellanox.com>
-L: 	netdev@vger.kernel.org
+L:	netdev@vger.kernel.org
 S:	Supported
 S:	Supported
 W:	http://www.mellanox.com
 W:	http://www.mellanox.com
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
@@ -5677,7 +5683,7 @@ F:	include/linux/mtd/
 F:	include/uapi/mtd/
 F:	include/uapi/mtd/
 
 
 MEN A21 WATCHDOG DRIVER
 MEN A21 WATCHDOG DRIVER
-M:  	Johannes Thumshirn <johannes.thumshirn@men.de>
+M:	Johannes Thumshirn <johannes.thumshirn@men.de>
 L:	linux-watchdog@vger.kernel.org
 L:	linux-watchdog@vger.kernel.org
 S:	Supported
 S:	Supported
 F:	drivers/watchdog/mena21_wdt.c
 F:	drivers/watchdog/mena21_wdt.c
@@ -5733,20 +5739,20 @@ L:	linux-rdma@vger.kernel.org
 W:	http://www.mellanox.com
 W:	http://www.mellanox.com
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 Q:	http://patchwork.kernel.org/project/linux-rdma/list/
 Q:	http://patchwork.kernel.org/project/linux-rdma/list/
-T:	git://openfabrics.org/~eli/connect-ib.git
+T:	git git://openfabrics.org/~eli/connect-ib.git
 S:	Supported
 S:	Supported
 F:	drivers/net/ethernet/mellanox/mlx5/core/
 F:	drivers/net/ethernet/mellanox/mlx5/core/
 F:	include/linux/mlx5/
 F:	include/linux/mlx5/
 
 
 Mellanox MLX5 IB driver
 Mellanox MLX5 IB driver
-M:      Eli Cohen <eli@mellanox.com>
-L:      linux-rdma@vger.kernel.org
-W:      http://www.mellanox.com
-Q:      http://patchwork.kernel.org/project/linux-rdma/list/
-T:      git://openfabrics.org/~eli/connect-ib.git
-S:      Supported
-F:      include/linux/mlx5/
-F:      drivers/infiniband/hw/mlx5/
+M:	Eli Cohen <eli@mellanox.com>
+L:	linux-rdma@vger.kernel.org
+W:	http://www.mellanox.com
+Q:	http://patchwork.kernel.org/project/linux-rdma/list/
+T:	git git://openfabrics.org/~eli/connect-ib.git
+S:	Supported
+F:	include/linux/mlx5/
+F:	drivers/infiniband/hw/mlx5/
 
 
 MODULE SUPPORT
 MODULE SUPPORT
 M:	Rusty Russell <rusty@rustcorp.com.au>
 M:	Rusty Russell <rusty@rustcorp.com.au>
@@ -5998,6 +6004,8 @@ F:	include/linux/netdevice.h
 F:	include/uapi/linux/in.h
 F:	include/uapi/linux/in.h
 F:	include/uapi/linux/net.h
 F:	include/uapi/linux/net.h
 F:	include/uapi/linux/netdevice.h
 F:	include/uapi/linux/netdevice.h
+F:	tools/net/
+F:	tools/testing/selftests/net/
 
 
 NETWORKING [IPv4/IPv6]
 NETWORKING [IPv4/IPv6]
 M:	"David S. Miller" <davem@davemloft.net>
 M:	"David S. Miller" <davem@davemloft.net>
@@ -6171,6 +6179,12 @@ S:	Supported
 F:	drivers/block/nvme*
 F:	drivers/block/nvme*
 F:	include/linux/nvme.h
 F:	include/linux/nvme.h
 
 
+NXP TDA998X DRM DRIVER
+M:	Russell King <rmk+kernel@arm.linux.org.uk>
+S:	Supported
+F:	drivers/gpu/drm/i2c/tda998x_drv.c
+F:	include/drm/i2c/tda998x.h
+
 OMAP SUPPORT
 OMAP SUPPORT
 M:	Tony Lindgren <tony@atomide.com>
 M:	Tony Lindgren <tony@atomide.com>
 L:	linux-omap@vger.kernel.org
 L:	linux-omap@vger.kernel.org
@@ -8700,17 +8714,17 @@ S:	Maintained
 F:	drivers/media/radio/radio-raremono.c
 F:	drivers/media/radio/radio-raremono.c
 
 
 THERMAL
 THERMAL
-M:      Zhang Rui <rui.zhang@intel.com>
-M:      Eduardo Valentin <eduardo.valentin@ti.com>
-L:      linux-pm@vger.kernel.org
-T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
-T:      git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
-Q:      https://patchwork.kernel.org/project/linux-pm/list/
-S:      Supported
-F:      drivers/thermal/
-F:      include/linux/thermal.h
-F:      include/linux/cpu_cooling.h
-F:      Documentation/devicetree/bindings/thermal/
+M:	Zhang Rui <rui.zhang@intel.com>
+M:	Eduardo Valentin <eduardo.valentin@ti.com>
+L:	linux-pm@vger.kernel.org
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
+Q:	https://patchwork.kernel.org/project/linux-pm/list/
+S:	Supported
+F:	drivers/thermal/
+F:	include/linux/thermal.h
+F:	include/linux/cpu_cooling.h
+F:	Documentation/devicetree/bindings/thermal/
 
 
 THINGM BLINK(1) USB RGB LED DRIVER
 THINGM BLINK(1) USB RGB LED DRIVER
 M:	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
 M:	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
@@ -9812,7 +9826,7 @@ ZR36067 VIDEO FOR LINUX DRIVER
 L:	mjpeg-users@lists.sourceforge.net
 L:	mjpeg-users@lists.sourceforge.net
 L:	linux-media@vger.kernel.org
 L:	linux-media@vger.kernel.org
 W:	http://mjpeg.sourceforge.net/driver-zoran/
 W:	http://mjpeg.sourceforge.net/driver-zoran/
-T:	Mercurial http://linuxtv.org/hg/v4l-dvb
+T:	hg http://linuxtv.org/hg/v4l-dvb
 S:	Odd Fixes
 S:	Odd Fixes
 F:	drivers/media/pci/zoran/
 F:	drivers/media/pci/zoran/
 
 

+ 1 - 1
Makefile

@@ -1,7 +1,7 @@
 VERSION = 3
 VERSION = 3
 PATCHLEVEL = 14
 PATCHLEVEL = 14
 SUBLEVEL = 0
 SUBLEVEL = 0
-EXTRAVERSION = -rc5
+EXTRAVERSION = -rc8
 NAME = Shuffling Zombie Juror
 NAME = Shuffling Zombie Juror
 
 
 # *DOCUMENTATION*
 # *DOCUMENTATION*

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

@@ -282,7 +282,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
 #else
 #else
 	/* if V-P const for loop, PTAG can be written once outside loop */
 	/* if V-P const for loop, PTAG can be written once outside loop */
 	if (full_page_op)
 	if (full_page_op)
-		write_aux_reg(ARC_REG_DC_PTAG, paddr);
+		write_aux_reg(aux_tag, paddr);
 #endif
 #endif
 
 
 	while (num_lines-- > 0) {
 	while (num_lines-- > 0) {
@@ -296,7 +296,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
 		write_aux_reg(aux_cmd, vaddr);
 		write_aux_reg(aux_cmd, vaddr);
 		vaddr += L1_CACHE_BYTES;
 		vaddr += L1_CACHE_BYTES;
 #else
 #else
-		write_aux_reg(aux, paddr);
+		write_aux_reg(aux_cmd, paddr);
 		paddr += L1_CACHE_BYTES;
 		paddr += L1_CACHE_BYTES;
 #endif
 #endif
 	}
 	}

+ 3 - 0
arch/arm/Kconfig

@@ -1578,6 +1578,7 @@ config BL_SWITCHER_DUMMY_IF
 
 
 choice
 choice
 	prompt "Memory split"
 	prompt "Memory split"
+	depends on MMU
 	default VMSPLIT_3G
 	default VMSPLIT_3G
 	help
 	help
 	  Select the desired split between kernel and user memory.
 	  Select the desired split between kernel and user memory.
@@ -1595,6 +1596,7 @@ endchoice
 
 
 config PAGE_OFFSET
 config PAGE_OFFSET
 	hex
 	hex
+	default PHYS_OFFSET if !MMU
 	default 0x40000000 if VMSPLIT_1G
 	default 0x40000000 if VMSPLIT_1G
 	default 0x80000000 if VMSPLIT_2G
 	default 0x80000000 if VMSPLIT_2G
 	default 0xC0000000
 	default 0xC0000000
@@ -1903,6 +1905,7 @@ config XEN
 	depends on ARM && AEABI && OF
 	depends on ARM && AEABI && OF
 	depends on CPU_V7 && !CPU_V6
 	depends on CPU_V7 && !CPU_V6
 	depends on !GENERIC_ATOMIC64
 	depends on !GENERIC_ATOMIC64
+	depends on MMU
 	select ARM_PSCI
 	select ARM_PSCI
 	select SWIOTLB_XEN
 	select SWIOTLB_XEN
 	select ARCH_DMA_ADDR_T_64BIT
 	select ARCH_DMA_ADDR_T_64BIT

+ 1 - 0
arch/arm/boot/compressed/.gitignore

@@ -1,4 +1,5 @@
 ashldi3.S
 ashldi3.S
+bswapsdi2.S
 font.c
 font.c
 lib1funcs.S
 lib1funcs.S
 hyp-stub.S
 hyp-stub.S

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

@@ -147,7 +147,7 @@
 	};
 	};
 
 
 	pinctrl@35004800 {
 	pinctrl@35004800 {
-		compatible = "brcm,capri-pinctrl";
+		compatible = "brcm,bcm11351-pinctrl";
 		reg = <0x35004800 0x430>;
 		reg = <0x35004800 0x430>;
 	};
 	};
 
 

+ 1 - 1
arch/arm/boot/dts/keystone-clocks.dtsi

@@ -612,7 +612,7 @@ clocks {
 		compatible = "ti,keystone,psc-clock";
 		compatible = "ti,keystone,psc-clock";
 		clocks = <&chipclk13>;
 		clocks = <&chipclk13>;
 		clock-output-names = "vcp-3";
 		clock-output-names = "vcp-3";
-		reg = <0x0235000a8 0xb00>, <0x02350060 0x400>;
+		reg = <0x023500a8 0xb00>, <0x02350060 0x400>;
 		reg-names = "control", "domain";
 		reg-names = "control", "domain";
 		domain-id = <24>;
 		domain-id = <24>;
 	};
 	};

+ 1 - 1
arch/arm/boot/dts/omap3-gta04.dts

@@ -13,7 +13,7 @@
 
 
 / {
 / {
 	model = "OMAP3 GTA04";
 	model = "OMAP3 GTA04";
-	compatible = "ti,omap3-gta04", "ti,omap3";
+	compatible = "ti,omap3-gta04", "ti,omap36xx", "ti,omap3";
 
 
 	cpus {
 	cpus {
 		cpu@0 {
 		cpu@0 {

+ 1 - 1
arch/arm/boot/dts/omap3-igep0020.dts

@@ -14,7 +14,7 @@
 
 
 / {
 / {
 	model = "IGEPv2 (TI OMAP AM/DM37x)";
 	model = "IGEPv2 (TI OMAP AM/DM37x)";
-	compatible = "isee,omap3-igep0020", "ti,omap3";
+	compatible = "isee,omap3-igep0020", "ti,omap36xx", "ti,omap3";
 
 
 	leds {
 	leds {
 		pinctrl-names = "default";
 		pinctrl-names = "default";

+ 1 - 1
arch/arm/boot/dts/omap3-igep0030.dts

@@ -13,7 +13,7 @@
 
 
 / {
 / {
 	model = "IGEP COM MODULE (TI OMAP AM/DM37x)";
 	model = "IGEP COM MODULE (TI OMAP AM/DM37x)";
-	compatible = "isee,omap3-igep0030", "ti,omap3";
+	compatible = "isee,omap3-igep0030", "ti,omap36xx", "ti,omap3";
 
 
 	leds {
 	leds {
 		pinctrl-names = "default";
 		pinctrl-names = "default";

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

@@ -8,8 +8,8 @@
  */
  */
 #include "sama5d3.dtsi"
 #include "sama5d3.dtsi"
 #include "sama5d3_can.dtsi"
 #include "sama5d3_can.dtsi"
-#include "sama5d3_emac.dtsi"
 #include "sama5d3_gmac.dtsi"
 #include "sama5d3_gmac.dtsi"
+#include "sama5d3_emac.dtsi"
 #include "sama5d3_lcd.dtsi"
 #include "sama5d3_lcd.dtsi"
 #include "sama5d3_mci2.dtsi"
 #include "sama5d3_mci2.dtsi"
 #include "sama5d3_tcb1.dtsi"
 #include "sama5d3_tcb1.dtsi"

+ 1 - 1
arch/arm/boot/dts/sun4i-a10.dtsi

@@ -426,7 +426,7 @@
 		};
 		};
 
 
 		rtp: rtp@01c25000 {
 		rtp: rtp@01c25000 {
-			compatible = "allwinner,sun4i-ts";
+			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			reg = <0x01c25000 0x100>;
 			interrupts = <29>;
 			interrupts = <29>;
 		};
 		};

+ 1 - 1
arch/arm/boot/dts/sun5i-a10s.dtsi

@@ -383,7 +383,7 @@
 		};
 		};
 
 
 		rtp: rtp@01c25000 {
 		rtp: rtp@01c25000 {
-			compatible = "allwinner,sun4i-ts";
+			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			reg = <0x01c25000 0x100>;
 			interrupts = <29>;
 			interrupts = <29>;
 		};
 		};

+ 1 - 1
arch/arm/boot/dts/sun5i-a13.dtsi

@@ -346,7 +346,7 @@
 		};
 		};
 
 
 		rtp: rtp@01c25000 {
 		rtp: rtp@01c25000 {
-			compatible = "allwinner,sun4i-ts";
+			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			reg = <0x01c25000 0x100>;
 			interrupts = <29>;
 			interrupts = <29>;
 		};
 		};

+ 6 - 6
arch/arm/boot/dts/sun7i-a20.dtsi

@@ -454,7 +454,7 @@
 		rtc: rtc@01c20d00 {
 		rtc: rtc@01c20d00 {
 			compatible = "allwinner,sun7i-a20-rtc";
 			compatible = "allwinner,sun7i-a20-rtc";
 			reg = <0x01c20d00 0x20>;
 			reg = <0x01c20d00 0x20>;
-			interrupts = <0 24 1>;
+			interrupts = <0 24 4>;
 		};
 		};
 
 
 		sid: eeprom@01c23800 {
 		sid: eeprom@01c23800 {
@@ -463,7 +463,7 @@
 		};
 		};
 
 
 		rtp: rtp@01c25000 {
 		rtp: rtp@01c25000 {
-			compatible = "allwinner,sun4i-ts";
+			compatible = "allwinner,sun4i-a10-ts";
 			reg = <0x01c25000 0x100>;
 			reg = <0x01c25000 0x100>;
 			interrupts = <0 29 4>;
 			interrupts = <0 29 4>;
 		};
 		};
@@ -596,10 +596,10 @@
 		hstimer@01c60000 {
 		hstimer@01c60000 {
 			compatible = "allwinner,sun7i-a20-hstimer";
 			compatible = "allwinner,sun7i-a20-hstimer";
 			reg = <0x01c60000 0x1000>;
 			reg = <0x01c60000 0x1000>;
-			interrupts = <0 81 1>,
-				     <0 82 1>,
-				     <0 83 1>,
-				     <0 84 1>;
+			interrupts = <0 81 4>,
+				     <0 82 4>,
+				     <0 83 4>,
+				     <0 84 4>;
 			clocks = <&ahb_gates 28>;
 			clocks = <&ahb_gates 28>;
 		};
 		};
 
 

+ 3 - 0
arch/arm/configs/tegra_defconfig

@@ -204,7 +204,10 @@ CONFIG_MMC_BLOCK_MINORS=16
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_SDHCI_TEGRA=y
 CONFIG_MMC_SDHCI_TEGRA=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_ONESHOT=y
 CONFIG_LEDS_TRIGGER_ONESHOT=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y

+ 3 - 6
arch/arm/include/asm/memory.h

@@ -30,14 +30,15 @@
  */
  */
 #define UL(x) _AC(x, UL)
 #define UL(x) _AC(x, UL)
 
 
+/* PAGE_OFFSET - the virtual address of the start of the kernel image */
+#define PAGE_OFFSET		UL(CONFIG_PAGE_OFFSET)
+
 #ifdef CONFIG_MMU
 #ifdef CONFIG_MMU
 
 
 /*
 /*
- * PAGE_OFFSET - the virtual address of the start of the kernel image
  * TASK_SIZE - the maximum size of a user space task.
  * TASK_SIZE - the maximum size of a user space task.
  * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
  * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
  */
  */
-#define PAGE_OFFSET		UL(CONFIG_PAGE_OFFSET)
 #define TASK_SIZE		(UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M))
 #define TASK_SIZE		(UL(CONFIG_PAGE_OFFSET) - UL(SZ_16M))
 #define TASK_UNMAPPED_BASE	ALIGN(TASK_SIZE / 3, SZ_16M)
 #define TASK_UNMAPPED_BASE	ALIGN(TASK_SIZE / 3, SZ_16M)
 
 
@@ -104,10 +105,6 @@
 #define END_MEM     		(UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
 #define END_MEM     		(UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
 #endif
 #endif
 
 
-#ifndef PAGE_OFFSET
-#define PAGE_OFFSET		PLAT_PHYS_OFFSET
-#endif
-
 /*
 /*
  * The module can be at any place in ram in nommu mode.
  * The module can be at any place in ram in nommu mode.
  */
  */

+ 12 - 0
arch/arm/kernel/head-common.S

@@ -177,6 +177,18 @@ __lookup_processor_type_data:
 	.long	__proc_info_end
 	.long	__proc_info_end
 	.size	__lookup_processor_type_data, . - __lookup_processor_type_data
 	.size	__lookup_processor_type_data, . - __lookup_processor_type_data
 
 
+__error_lpae:
+#ifdef CONFIG_DEBUG_LL
+	adr	r0, str_lpae
+	bl 	printascii
+	b	__error
+str_lpae: .asciz "\nError: Kernel with LPAE support, but CPU does not support LPAE.\n"
+#else
+	b	__error
+#endif
+	.align
+ENDPROC(__error_lpae)
+
 __error_p:
 __error_p:
 #ifdef CONFIG_DEBUG_LL
 #ifdef CONFIG_DEBUG_LL
 	adr	r0, str_p1
 	adr	r0, str_p1

+ 1 - 1
arch/arm/kernel/head.S

@@ -102,7 +102,7 @@ ENTRY(stext)
 	and	r3, r3, #0xf			@ extract VMSA support
 	and	r3, r3, #0xf			@ extract VMSA support
 	cmp	r3, #5				@ long-descriptor translation table format?
 	cmp	r3, #5				@ long-descriptor translation table format?
  THUMB( it	lo )				@ force fixup-able long branch encoding
  THUMB( it	lo )				@ force fixup-able long branch encoding
-	blo	__error_p			@ only classic page table format
+	blo	__error_lpae			@ only classic page table format
 #endif
 #endif
 
 
 #ifndef CONFIG_XIP_KERNEL
 #ifndef CONFIG_XIP_KERNEL

+ 2 - 0
arch/arm/mach-omap2/cclock3xxx_data.c

@@ -433,7 +433,9 @@ static const struct clk_ops dpll4_m5x2_ck_ops = {
 	.enable		= &omap2_dflt_clk_enable,
 	.enable		= &omap2_dflt_clk_enable,
 	.disable	= &omap2_dflt_clk_disable,
 	.disable	= &omap2_dflt_clk_disable,
 	.is_enabled	= &omap2_dflt_clk_is_enabled,
 	.is_enabled	= &omap2_dflt_clk_is_enabled,
+	.set_rate	= &omap3_clkoutx2_set_rate,
 	.recalc_rate	= &omap3_clkoutx2_recalc,
 	.recalc_rate	= &omap3_clkoutx2_recalc,
+	.round_rate	= &omap3_clkoutx2_round_rate,
 };
 };
 
 
 static const struct clk_ops dpll4_m5x2_ck_3630_ops = {
 static const struct clk_ops dpll4_m5x2_ck_3630_ops = {

+ 5 - 3
arch/arm/mach-omap2/cpuidle44xx.c

@@ -23,6 +23,8 @@
 #include "prm.h"
 #include "prm.h"
 #include "clockdomain.h"
 #include "clockdomain.h"
 
 
+#define MAX_CPUS	2
+
 /* Machine specific information */
 /* Machine specific information */
 struct idle_statedata {
 struct idle_statedata {
 	u32 cpu_state;
 	u32 cpu_state;
@@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = {
 	},
 	},
 };
 };
 
 
-static struct powerdomain *mpu_pd, *cpu_pd[NR_CPUS];
-static struct clockdomain *cpu_clkdm[NR_CPUS];
+static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS];
+static struct clockdomain *cpu_clkdm[MAX_CPUS];
 
 
 static atomic_t abort_barrier;
 static atomic_t abort_barrier;
-static bool cpu_done[NR_CPUS];
+static bool cpu_done[MAX_CPUS];
 static struct idle_statedata *state_ptr = &omap4_idle_data[0];
 static struct idle_statedata *state_ptr = &omap4_idle_data[0];
 
 
 /* Private functions */
 /* Private functions */

+ 77 - 15
arch/arm/mach-omap2/dpll3xxx.c

@@ -623,6 +623,32 @@ void omap3_dpll_deny_idle(struct clk_hw_omap *clk)
 
 
 /* Clock control for DPLL outputs */
 /* Clock control for DPLL outputs */
 
 
+/* Find the parent DPLL for the given clkoutx2 clock */
+static struct clk_hw_omap *omap3_find_clkoutx2_dpll(struct clk_hw *hw)
+{
+	struct clk_hw_omap *pclk = NULL;
+	struct clk *parent;
+
+	/* Walk up the parents of clk, looking for a DPLL */
+	do {
+		do {
+			parent = __clk_get_parent(hw->clk);
+			hw = __clk_get_hw(parent);
+		} while (hw && (__clk_get_flags(hw->clk) & CLK_IS_BASIC));
+		if (!hw)
+			break;
+		pclk = to_clk_hw_omap(hw);
+	} while (pclk && !pclk->dpll_data);
+
+	/* clk does not have a DPLL as a parent?  error in the clock data */
+	if (!pclk) {
+		WARN_ON(1);
+		return NULL;
+	}
+
+	return pclk;
+}
+
 /**
 /**
  * omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate
  * omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate
  * @clk: DPLL output struct clk
  * @clk: DPLL output struct clk
@@ -637,27 +663,14 @@ unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw,
 	unsigned long rate;
 	unsigned long rate;
 	u32 v;
 	u32 v;
 	struct clk_hw_omap *pclk = NULL;
 	struct clk_hw_omap *pclk = NULL;
-	struct clk *parent;
 
 
 	if (!parent_rate)
 	if (!parent_rate)
 		return 0;
 		return 0;
 
 
-	/* Walk up the parents of clk, looking for a DPLL */
-	do {
-		do {
-			parent = __clk_get_parent(hw->clk);
-			hw = __clk_get_hw(parent);
-		} while (hw && (__clk_get_flags(hw->clk) & CLK_IS_BASIC));
-		if (!hw)
-			break;
-		pclk = to_clk_hw_omap(hw);
-	} while (pclk && !pclk->dpll_data);
+	pclk = omap3_find_clkoutx2_dpll(hw);
 
 
-	/* clk does not have a DPLL as a parent?  error in the clock data */
-	if (!pclk) {
-		WARN_ON(1);
+	if (!pclk)
 		return 0;
 		return 0;
-	}
 
 
 	dd = pclk->dpll_data;
 	dd = pclk->dpll_data;
 
 
@@ -672,6 +685,55 @@ unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw,
 	return rate;
 	return rate;
 }
 }
 
 
+int omap3_clkoutx2_set_rate(struct clk_hw *hw, unsigned long rate,
+					unsigned long parent_rate)
+{
+	return 0;
+}
+
+long omap3_clkoutx2_round_rate(struct clk_hw *hw, unsigned long rate,
+		unsigned long *prate)
+{
+	const struct dpll_data *dd;
+	u32 v;
+	struct clk_hw_omap *pclk = NULL;
+
+	if (!*prate)
+		return 0;
+
+	pclk = omap3_find_clkoutx2_dpll(hw);
+
+	if (!pclk)
+		return 0;
+
+	dd = pclk->dpll_data;
+
+	/* TYPE J does not have a clkoutx2 */
+	if (dd->flags & DPLL_J_TYPE) {
+		*prate = __clk_round_rate(__clk_get_parent(pclk->hw.clk), rate);
+		return *prate;
+	}
+
+	WARN_ON(!dd->enable_mask);
+
+	v = omap2_clk_readl(pclk, dd->control_reg) & dd->enable_mask;
+	v >>= __ffs(dd->enable_mask);
+
+	/* If in bypass, the rate is fixed to the bypass rate*/
+	if (v != OMAP3XXX_EN_DPLL_LOCKED)
+		return *prate;
+
+	if (__clk_get_flags(hw->clk) & CLK_SET_RATE_PARENT) {
+		unsigned long best_parent;
+
+		best_parent = (rate / 2);
+		*prate = __clk_round_rate(__clk_get_parent(hw->clk),
+				best_parent);
+	}
+
+	return *prate * 2;
+}
+
 /* OMAP3/4 non-CORE DPLL clkops */
 /* OMAP3/4 non-CORE DPLL clkops */
 const struct clk_hw_omap_ops clkhwops_omap3_dpll = {
 const struct clk_hw_omap_ops clkhwops_omap3_dpll = {
 	.allow_idle	= omap3_dpll_allow_idle,
 	.allow_idle	= omap3_dpll_allow_idle,

+ 11 - 9
arch/arm/mach-omap2/omap_hwmod.c

@@ -1946,30 +1946,32 @@ static int _ocp_softreset(struct omap_hwmod *oh)
 	if (ret)
 	if (ret)
 		goto dis_opt_clks;
 		goto dis_opt_clks;
 
 
-	_write_sysconfig(v, oh);
-	ret = _clear_softreset(oh, &v);
-	if (ret)
-		goto dis_opt_clks;
-
 	_write_sysconfig(v, oh);
 	_write_sysconfig(v, oh);
 
 
 	if (oh->class->sysc->srst_udelay)
 	if (oh->class->sysc->srst_udelay)
 		udelay(oh->class->sysc->srst_udelay);
 		udelay(oh->class->sysc->srst_udelay);
 
 
 	c = _wait_softreset_complete(oh);
 	c = _wait_softreset_complete(oh);
-	if (c == MAX_MODULE_SOFTRESET_WAIT)
+	if (c == MAX_MODULE_SOFTRESET_WAIT) {
 		pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
 		pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
 			   oh->name, MAX_MODULE_SOFTRESET_WAIT);
 			   oh->name, MAX_MODULE_SOFTRESET_WAIT);
-	else
+		ret = -ETIMEDOUT;
+		goto dis_opt_clks;
+	} else {
 		pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c);
 		pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c);
+	}
+
+	ret = _clear_softreset(oh, &v);
+	if (ret)
+		goto dis_opt_clks;
+
+	_write_sysconfig(v, oh);
 
 
 	/*
 	/*
 	 * XXX add _HWMOD_STATE_WEDGED for modules that don't come back from
 	 * XXX add _HWMOD_STATE_WEDGED for modules that don't come back from
 	 * _wait_target_ready() or _reset()
 	 * _wait_target_ready() or _reset()
 	 */
 	 */
 
 
-	ret = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0;
-
 dis_opt_clks:
 dis_opt_clks:
 	if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET)
 	if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET)
 		_disable_optional_clocks(oh);
 		_disable_optional_clocks(oh);

+ 4 - 5
arch/arm/mach-omap2/omap_hwmod_7xx_data.c

@@ -1365,11 +1365,10 @@ static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
 	.rev_offs	= 0x0000,
 	.rev_offs	= 0x0000,
 	.sysc_offs	= 0x0010,
 	.sysc_offs	= 0x0010,
 	.syss_offs	= 0x0014,
 	.syss_offs	= 0x0014,
-	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
-			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
-			   SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
-	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
-			   SIDLE_SMART_WKUP),
+	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
+			   SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+			   SYSS_HAS_RESET_STATUS),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
 	.sysc_fields	= &omap_hwmod_sysc_type1,
 	.sysc_fields	= &omap_hwmod_sysc_type1,
 };
 };
 
 

+ 20 - 1
arch/arm/mach-omap2/pdata-quirks.c

@@ -22,6 +22,8 @@
 #include "common-board-devices.h"
 #include "common-board-devices.h"
 #include "dss-common.h"
 #include "dss-common.h"
 #include "control.h"
 #include "control.h"
+#include "omap-secure.h"
+#include "soc.h"
 
 
 struct pdata_init {
 struct pdata_init {
 	const char *compatible;
 	const char *compatible;
@@ -169,6 +171,22 @@ static void __init am3517_evm_legacy_init(void)
 	omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
 	omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
 	omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
 	omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
 }
 }
+
+static void __init nokia_n900_legacy_init(void)
+{
+	hsmmc2_internal_input_clk();
+
+	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
+		if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
+			pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
+			/* set IBE to 1 */
+			rx51_secure_update_aux_cr(BIT(6), 0);
+		} else {
+			pr_warning("RX-51: Not enabling ARM errata 430973 workaround\n");
+			pr_warning("Thumb binaries may crash randomly without this workaround\n");
+		}
+	}
+}
 #endif /* CONFIG_ARCH_OMAP3 */
 #endif /* CONFIG_ARCH_OMAP3 */
 
 
 #ifdef CONFIG_ARCH_OMAP4
 #ifdef CONFIG_ARCH_OMAP4
@@ -239,6 +257,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
 #endif
 #endif
 #ifdef CONFIG_ARCH_OMAP3
 #ifdef CONFIG_ARCH_OMAP3
 	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
 	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
+	OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata),
 	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
 	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
 	/* Only on am3517 */
 	/* Only on am3517 */
 	OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
 	OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
@@ -259,7 +278,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
 static struct pdata_init pdata_quirks[] __initdata = {
 static struct pdata_init pdata_quirks[] __initdata = {
 #ifdef CONFIG_ARCH_OMAP3
 #ifdef CONFIG_ARCH_OMAP3
 	{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
 	{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
-	{ "nokia,omap3-n900", hsmmc2_internal_input_clk, },
+	{ "nokia,omap3-n900", nokia_n900_legacy_init, },
 	{ "nokia,omap3-n9", hsmmc2_internal_input_clk, },
 	{ "nokia,omap3-n9", hsmmc2_internal_input_clk, },
 	{ "nokia,omap3-n950", hsmmc2_internal_input_clk, },
 	{ "nokia,omap3-n950", hsmmc2_internal_input_clk, },
 	{ "isee,omap3-igep0020", omap3_igep0020_legacy_init, },
 	{ "isee,omap3-igep0020", omap3_igep0020_legacy_init, },

+ 2 - 2
arch/arm/mach-omap2/prminst44xx.c

@@ -183,11 +183,11 @@ void omap4_prminst_global_warm_sw_reset(void)
 					OMAP4_PRM_RSTCTRL_OFFSET);
 					OMAP4_PRM_RSTCTRL_OFFSET);
 	v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK;
 	v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK;
 	omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION,
 	omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION,
-				 OMAP4430_PRM_DEVICE_INST,
+				 dev_inst,
 				 OMAP4_PRM_RSTCTRL_OFFSET);
 				 OMAP4_PRM_RSTCTRL_OFFSET);
 
 
 	/* OCP barrier */
 	/* OCP barrier */
 	v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
 	v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
-				    OMAP4430_PRM_DEVICE_INST,
+				    dev_inst,
 				    OMAP4_PRM_RSTCTRL_OFFSET);
 				    OMAP4_PRM_RSTCTRL_OFFSET);
 }
 }

+ 2 - 0
arch/arm/mach-sa1100/include/mach/collie.h

@@ -13,6 +13,8 @@
 #ifndef __ASM_ARCH_COLLIE_H
 #ifndef __ASM_ARCH_COLLIE_H
 #define __ASM_ARCH_COLLIE_H
 #define __ASM_ARCH_COLLIE_H
 
 
+#include "hardware.h" /* Gives GPIO_MAX */
+
 extern void locomolcd_power(int on);
 extern void locomolcd_power(int on);
 
 
 #define COLLIE_SCOOP_GPIO_BASE	(GPIO_MAX + 1)
 #define COLLIE_SCOOP_GPIO_BASE	(GPIO_MAX + 1)

+ 3 - 0
arch/arm/mm/dump.c

@@ -264,6 +264,9 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
 			note_page(st, addr, 3, pmd_val(*pmd));
 			note_page(st, addr, 3, pmd_val(*pmd));
 		else
 		else
 			walk_pte(st, pmd, addr);
 			walk_pte(st, pmd, addr);
+
+		if (SECTION_SIZE < PMD_SIZE && pmd_large(pmd[1]))
+			note_page(st, addr + SECTION_SIZE, 3, pmd_val(pmd[1]));
 	}
 	}
 }
 }
 
 

+ 1 - 0
arch/c6x/include/asm/cache.h

@@ -12,6 +12,7 @@
 #define _ASM_C6X_CACHE_H
 #define _ASM_C6X_CACHE_H
 
 
 #include <linux/irqflags.h>
 #include <linux/irqflags.h>
+#include <linux/init.h>
 
 
 /*
 /*
  * Cache line size
  * Cache line size

+ 1 - 1
arch/cris/include/asm/bitops.h

@@ -144,7 +144,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
  * definition, which doesn't have the same semantics.  We don't want to
  * definition, which doesn't have the same semantics.  We don't want to
  * use -fno-builtin, so just hide the name ffs.
  * use -fno-builtin, so just hide the name ffs.
  */
  */
-#define ffs kernel_ffs
+#define ffs(x) kernel_ffs(x)
 
 
 #include <asm-generic/bitops/fls.h>
 #include <asm-generic/bitops/fls.h>
 #include <asm-generic/bitops/__fls.h>
 #include <asm-generic/bitops/__fls.h>

+ 1 - 1
arch/ia64/kernel/uncached.c

@@ -98,7 +98,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
 	/* attempt to allocate a granule's worth of cached memory pages */
 	/* attempt to allocate a granule's worth of cached memory pages */
 
 
 	page = alloc_pages_exact_node(nid,
 	page = alloc_pages_exact_node(nid,
-				GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
+				GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE,
 				IA64_GRANULE_SHIFT-PAGE_SHIFT);
 				IA64_GRANULE_SHIFT-PAGE_SHIFT);
 	if (!page) {
 	if (!page) {
 		mutex_unlock(&uc_pool->add_chunk_mutex);
 		mutex_unlock(&uc_pool->add_chunk_mutex);

+ 18 - 11
arch/mips/Kconfig

@@ -125,7 +125,7 @@ config BCM47XX
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_HAS_EARLY_PRINTK
 	select SYS_HAS_EARLY_PRINTK
-	select EARLY_PRINTK_8250 if EARLY_PRINTK
+	select USE_GENERIC_EARLY_PRINTK_8250
 	help
 	help
 	 Support for BCM47XX based boards
 	 Support for BCM47XX based boards
 
 
@@ -152,7 +152,6 @@ config MIPS_COBALT
 	select CSRC_R4K
 	select CSRC_R4K
 	select CEVT_GT641XX
 	select CEVT_GT641XX
 	select DMA_NONCOHERENT
 	select DMA_NONCOHERENT
-	select EARLY_PRINTK_8250 if EARLY_PRINTK
 	select HW_HAS_PCI
 	select HW_HAS_PCI
 	select I8253
 	select I8253
 	select I8259
 	select I8259
@@ -165,6 +164,7 @@ config MIPS_COBALT
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_64BIT_KERNEL
 	select SYS_SUPPORTS_64BIT_KERNEL
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_SUPPORTS_LITTLE_ENDIAN
+	select USE_GENERIC_EARLY_PRINTK_8250
 
 
 config MACH_DECSTATION
 config MACH_DECSTATION
 	bool "DECstations"
 	bool "DECstations"
@@ -677,6 +677,7 @@ config SNI_RM
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_HIGHMEM
 	select SYS_SUPPORTS_HIGHMEM
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 	select SYS_SUPPORTS_LITTLE_ENDIAN
+	select USE_GENERIC_EARLY_PRINTK_8250
 	help
 	help
 	  The SNI RM200/300/400 are MIPS-based machines manufactured by
 	  The SNI RM200/300/400 are MIPS-based machines manufactured by
 	  Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid
 	  Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid
@@ -1824,12 +1825,12 @@ endchoice
 
 
 config FORCE_MAX_ZONEORDER
 config FORCE_MAX_ZONEORDER
 	int "Maximum zone order"
 	int "Maximum zone order"
-	range 14 64 if HUGETLB_PAGE && PAGE_SIZE_64KB
-	default "14" if HUGETLB_PAGE && PAGE_SIZE_64KB
-	range 13 64 if HUGETLB_PAGE && PAGE_SIZE_32KB
-	default "13" if HUGETLB_PAGE && PAGE_SIZE_32KB
-	range 12 64 if HUGETLB_PAGE && PAGE_SIZE_16KB
-	default "12" if HUGETLB_PAGE && PAGE_SIZE_16KB
+	range 14 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
+	default "14" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
+	range 13 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
+	default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
+	range 12 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
+	default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
 	range 11 64
 	range 11 64
 	default "11"
 	default "11"
 	help
 	help
@@ -2456,9 +2457,8 @@ config SECCOMP
 	  If unsure, say Y. Only embedded should say N here.
 	  If unsure, say Y. Only embedded should say N here.
 
 
 config MIPS_O32_FP64_SUPPORT
 config MIPS_O32_FP64_SUPPORT
-	bool "Support for O32 binaries using 64-bit FP"
+	bool "Support for O32 binaries using 64-bit FP (EXPERIMENTAL)"
 	depends on 32BIT || MIPS32_O32
 	depends on 32BIT || MIPS32_O32
-	default y
 	help
 	help
 	  When this is enabled, the kernel will support use of 64-bit floating
 	  When this is enabled, the kernel will support use of 64-bit floating
 	  point registers with binaries using the O32 ABI along with the
 	  point registers with binaries using the O32 ABI along with the
@@ -2470,7 +2470,14 @@ config MIPS_O32_FP64_SUPPORT
 	  of your kernel & potentially improve FP emulation performance by
 	  of your kernel & potentially improve FP emulation performance by
 	  saying N here.
 	  saying N here.
 
 
-	  If unsure, say Y.
+	  Although binutils currently supports use of this flag the details
+	  concerning its effect upon the O32 ABI in userland are still being
+	  worked on. In order to avoid userland becoming dependant upon current
+	  behaviour before the details have been finalised, this option should
+	  be considered experimental and only enabled by those working upon
+	  said details.
+
+	  If unsure, say N.
 
 
 config USE_OF
 config USE_OF
 	bool
 	bool

+ 7 - 3
arch/mips/Kconfig.debug

@@ -21,13 +21,17 @@ config EARLY_PRINTK
 	  unless you want to debug such a crash.
 	  unless you want to debug such a crash.
 
 
 config EARLY_PRINTK_8250
 config EARLY_PRINTK_8250
-	bool "8250/16550 and compatible serial early printk driver"
-	depends on EARLY_PRINTK
-	default n
+	bool
+	depends on EARLY_PRINTK && USE_GENERIC_EARLY_PRINTK_8250
+	default y
 	help
 	help
+	  "8250/16550 and compatible serial early printk driver"
 	  If you say Y here, it will be possible to use a 8250/16550 serial
 	  If you say Y here, it will be possible to use a 8250/16550 serial
 	  port as the boot console.
 	  port as the boot console.
 
 
+config USE_GENERIC_EARLY_PRINTK_8250
+	bool
+
 config CMDLINE_BOOL
 config CMDLINE_BOOL
 	bool "Built-in kernel command line"
 	bool "Built-in kernel command line"
 	default n
 	default n

+ 1 - 3
arch/mips/alchemy/board-gpr.c

@@ -53,10 +53,8 @@ void __init prom_init(void)
 	prom_init_cmdline();
 	prom_init_cmdline();
 
 
 	memsize_str = prom_getenv("memsize");
 	memsize_str = prom_getenv("memsize");
-	if (!memsize_str)
+	if (!memsize_str || kstrtoul(memsize_str, 0, &memsize))
 		memsize = 0x04000000;
 		memsize = 0x04000000;
-	else
-		strict_strtoul(memsize_str, 0, &memsize);
 	add_memory_region(0, memsize, BOOT_MEM_RAM);
 	add_memory_region(0, memsize, BOOT_MEM_RAM);
 }
 }
 
 

+ 1 - 3
arch/mips/alchemy/board-mtx1.c

@@ -52,10 +52,8 @@ void __init prom_init(void)
 	prom_init_cmdline();
 	prom_init_cmdline();
 
 
 	memsize_str = prom_getenv("memsize");
 	memsize_str = prom_getenv("memsize");
-	if (!memsize_str)
+	if (!memsize_str || kstrtoul(memsize_str, 0, &memsize))
 		memsize = 0x04000000;
 		memsize = 0x04000000;
-	else
-		strict_strtoul(memsize_str, 0, &memsize);
 	add_memory_region(0, memsize, BOOT_MEM_RAM);
 	add_memory_region(0, memsize, BOOT_MEM_RAM);
 }
 }
 
 

+ 1 - 0
arch/mips/bcm47xx/board.c

@@ -1,3 +1,4 @@
+#include <linux/errno.h>
 #include <linux/export.h>
 #include <linux/export.h>
 #include <linux/string.h>
 #include <linux/string.h>
 #include <bcm47xx_board.h>
 #include <bcm47xx_board.h>

+ 1 - 1
arch/mips/bcm47xx/nvram.c

@@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name)
 	char nvram_var[10];
 	char nvram_var[10];
 	char buf[30];
 	char buf[30];
 
 
-	for (i = 0; i < 16; i++) {
+	for (i = 0; i < 32; i++) {
 		err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
 		err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
 		if (err <= 0)
 		if (err <= 0)
 			continue;
 			continue;

+ 12 - 10
arch/mips/cavium-octeon/octeon-irq.c

@@ -975,10 +975,6 @@ static int octeon_irq_ciu_xlat(struct irq_domain *d,
 	if (ciu > 1 || bit > 63)
 	if (ciu > 1 || bit > 63)
 		return -EINVAL;
 		return -EINVAL;
 
 
-	/* These are the GPIO lines */
-	if (ciu == 0 && bit >= 16 && bit < 32)
-		return -EINVAL;
-
 	*out_hwirq = (ciu << 6) | bit;
 	*out_hwirq = (ciu << 6) | bit;
 	*out_type = 0;
 	*out_type = 0;
 
 
@@ -1007,6 +1003,10 @@ static int octeon_irq_ciu_map(struct irq_domain *d,
 	if (!octeon_irq_virq_in_range(virq))
 	if (!octeon_irq_virq_in_range(virq))
 		return -EINVAL;
 		return -EINVAL;
 
 
+	/* Don't map irq if it is reserved for GPIO. */
+	if (line == 0 && bit >= 16 && bit <32)
+		return 0;
+
 	if (line > 1 || octeon_irq_ciu_to_irq[line][bit] != 0)
 	if (line > 1 || octeon_irq_ciu_to_irq[line][bit] != 0)
 		return -EINVAL;
 		return -EINVAL;
 
 
@@ -1525,10 +1525,6 @@ static int octeon_irq_ciu2_xlat(struct irq_domain *d,
 	ciu = intspec[0];
 	ciu = intspec[0];
 	bit = intspec[1];
 	bit = intspec[1];
 
 
-	/* Line 7  are the GPIO lines */
-	if (ciu > 6 || bit > 63)
-		return -EINVAL;
-
 	*out_hwirq = (ciu << 6) | bit;
 	*out_hwirq = (ciu << 6) | bit;
 	*out_type = 0;
 	*out_type = 0;
 
 
@@ -1570,8 +1566,14 @@ static int octeon_irq_ciu2_map(struct irq_domain *d,
 	if (!octeon_irq_virq_in_range(virq))
 	if (!octeon_irq_virq_in_range(virq))
 		return -EINVAL;
 		return -EINVAL;
 
 
-	/* Line 7  are the GPIO lines */
-	if (line > 6 || octeon_irq_ciu_to_irq[line][bit] != 0)
+	/*
+	 * Don't map irq if it is reserved for GPIO.
+	 * (Line 7 are the GPIO lines.)
+	 */
+	if (line == 7)
+		return 0;
+
+	if (line > 7 || octeon_irq_ciu_to_irq[line][bit] != 0)
 		return -EINVAL;
 		return -EINVAL;
 
 
 	if (octeon_irq_ciu2_is_edge(line, bit))
 	if (octeon_irq_ciu2_is_edge(line, bit))

+ 13 - 2
arch/mips/include/asm/asmmacro.h

@@ -9,6 +9,7 @@
 #define _ASM_ASMMACRO_H
 #define _ASM_ASMMACRO_H
 
 
 #include <asm/hazards.h>
 #include <asm/hazards.h>
+#include <asm/asm-offsets.h>
 
 
 #ifdef CONFIG_32BIT
 #ifdef CONFIG_32BIT
 #include <asm/asmmacro-32.h>
 #include <asm/asmmacro-32.h>
@@ -54,11 +55,21 @@
 	.endm
 	.endm
 
 
 	.macro	local_irq_disable reg=t0
 	.macro	local_irq_disable reg=t0
+#ifdef CONFIG_PREEMPT
+	lw      \reg, TI_PRE_COUNT($28)
+	addi    \reg, \reg, 1
+	sw      \reg, TI_PRE_COUNT($28)
+#endif
 	mfc0	\reg, CP0_STATUS
 	mfc0	\reg, CP0_STATUS
 	ori	\reg, \reg, 1
 	ori	\reg, \reg, 1
 	xori	\reg, \reg, 1
 	xori	\reg, \reg, 1
 	mtc0	\reg, CP0_STATUS
 	mtc0	\reg, CP0_STATUS
 	irq_disable_hazard
 	irq_disable_hazard
+#ifdef CONFIG_PREEMPT
+	lw      \reg, TI_PRE_COUNT($28)
+	addi    \reg, \reg, -1
+	sw      \reg, TI_PRE_COUNT($28)
+#endif
 	.endm
 	.endm
 #endif /* CONFIG_MIPS_MT_SMTC */
 #endif /* CONFIG_MIPS_MT_SMTC */
 
 
@@ -106,7 +117,7 @@
 	.endm
 	.endm
 
 
 	.macro	fpu_save_double thread status tmp
 	.macro	fpu_save_double thread status tmp
-#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	sll	\tmp, \status, 5
 	sll	\tmp, \status, 5
 	bgez	\tmp, 10f
 	bgez	\tmp, 10f
 	fpu_save_16odd \thread
 	fpu_save_16odd \thread
@@ -159,7 +170,7 @@
 	.endm
 	.endm
 
 
 	.macro	fpu_restore_double thread status tmp
 	.macro	fpu_restore_double thread status tmp
-#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	sll	\tmp, \status, 5
 	sll	\tmp, \status, 5
 	bgez	\tmp, 10f				# 16 register mode?
 	bgez	\tmp, 10f				# 16 register mode?
 
 

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

@@ -57,7 +57,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
 		return 0;
 		return 0;
 
 
 	case FPU_64BIT:
 	case FPU_64BIT:
-#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_MIPS64))
+#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_64BIT))
 		/* we only have a 32-bit FPU */
 		/* we only have a 32-bit FPU */
 		return SIGFPE;
 		return SIGFPE;
 #endif
 #endif

+ 10 - 10
arch/mips/include/asm/ftrace.h

@@ -22,12 +22,12 @@ extern void _mcount(void);
 #define safe_load(load, src, dst, error)		\
 #define safe_load(load, src, dst, error)		\
 do {							\
 do {							\
 	asm volatile (					\
 	asm volatile (					\
-		"1: " load " %[" STR(dst) "], 0(%[" STR(src) "])\n"\
-		"   li %[" STR(error) "], 0\n"		\
+		"1: " load " %[tmp_dst], 0(%[tmp_src])\n"	\
+		"   li %[tmp_err], 0\n"			\
 		"2:\n"					\
 		"2:\n"					\
 							\
 							\
 		".section .fixup, \"ax\"\n"		\
 		".section .fixup, \"ax\"\n"		\
-		"3: li %[" STR(error) "], 1\n"		\
+		"3: li %[tmp_err], 1\n"			\
 		"   j 2b\n"				\
 		"   j 2b\n"				\
 		".previous\n"				\
 		".previous\n"				\
 							\
 							\
@@ -35,8 +35,8 @@ do {							\
 		STR(PTR) "\t1b, 3b\n\t"			\
 		STR(PTR) "\t1b, 3b\n\t"			\
 		".previous\n"				\
 		".previous\n"				\
 							\
 							\
-		: [dst] "=&r" (dst), [error] "=r" (error)\
-		: [src] "r" (src)			\
+		: [tmp_dst] "=&r" (dst), [tmp_err] "=r" (error)\
+		: [tmp_src] "r" (src)			\
 		: "memory"				\
 		: "memory"				\
 	);						\
 	);						\
 } while (0)
 } while (0)
@@ -44,12 +44,12 @@ do {							\
 #define safe_store(store, src, dst, error)	\
 #define safe_store(store, src, dst, error)	\
 do {						\
 do {						\
 	asm volatile (				\
 	asm volatile (				\
-		"1: " store " %[" STR(src) "], 0(%[" STR(dst) "])\n"\
-		"   li %[" STR(error) "], 0\n"	\
+		"1: " store " %[tmp_src], 0(%[tmp_dst])\n"\
+		"   li %[tmp_err], 0\n"		\
 		"2:\n"				\
 		"2:\n"				\
 						\
 						\
 		".section .fixup, \"ax\"\n"	\
 		".section .fixup, \"ax\"\n"	\
-		"3: li %[" STR(error) "], 1\n"	\
+		"3: li %[tmp_err], 1\n"		\
 		"   j 2b\n"			\
 		"   j 2b\n"			\
 		".previous\n"			\
 		".previous\n"			\
 						\
 						\
@@ -57,8 +57,8 @@ do {						\
 		STR(PTR) "\t1b, 3b\n\t"		\
 		STR(PTR) "\t1b, 3b\n\t"		\
 		".previous\n"			\
 		".previous\n"			\
 						\
 						\
-		: [error] "=r" (error)		\
-		: [dst] "r" (dst), [src] "r" (src)\
+		: [tmp_err] "=r" (error)	\
+		: [tmp_dst] "r" (dst), [tmp_src] "r" (src)\
 		: "memory"			\
 		: "memory"			\
 	);					\
 	);					\
 } while (0)
 } while (0)

+ 0 - 12
arch/mips/include/asm/mach-au1x00/au1000.h

@@ -1161,18 +1161,6 @@ enum soc_au1200_ints {
 #define MAC_RX_BUFF3_STATUS	0x30
 #define MAC_RX_BUFF3_STATUS	0x30
 #define MAC_RX_BUFF3_ADDR	0x34
 #define MAC_RX_BUFF3_ADDR	0x34
 
 
-#define UART_RX		0	/* Receive buffer */
-#define UART_TX		4	/* Transmit buffer */
-#define UART_IER	8	/* Interrupt Enable Register */
-#define UART_IIR	0xC	/* Interrupt ID Register */
-#define UART_FCR	0x10	/* FIFO Control Register */
-#define UART_LCR	0x14	/* Line Control Register */
-#define UART_MCR	0x18	/* Modem Control Register */
-#define UART_LSR	0x1C	/* Line Status Register */
-#define UART_MSR	0x20	/* Modem Status Register */
-#define UART_CLK	0x28	/* Baud Rate Clock Divider */
-#define UART_MOD_CNTRL	0x100	/* Module Control */
-
 /* SSIO */
 /* SSIO */
 #define SSI0_STATUS		0xB1600000
 #define SSI0_STATUS		0xB1600000
 #  define SSI_STATUS_BF		(1 << 4)
 #  define SSI_STATUS_BF		(1 << 4)

+ 6 - 4
arch/mips/include/asm/syscall.h

@@ -13,6 +13,7 @@
 #ifndef __ASM_MIPS_SYSCALL_H
 #ifndef __ASM_MIPS_SYSCALL_H
 #define __ASM_MIPS_SYSCALL_H
 #define __ASM_MIPS_SYSCALL_H
 
 
+#include <linux/compiler.h>
 #include <linux/audit.h>
 #include <linux/audit.h>
 #include <linux/elf-em.h>
 #include <linux/elf-em.h>
 #include <linux/kernel.h>
 #include <linux/kernel.h>
@@ -50,14 +51,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
 
 
 #ifdef CONFIG_32BIT
 #ifdef CONFIG_32BIT
 	case 4: case 5: case 6: case 7:
 	case 4: case 5: case 6: case 7:
-		return get_user(*arg, (int *)usp + 4 * n);
+		return get_user(*arg, (int *)usp + n);
 #endif
 #endif
 
 
 #ifdef CONFIG_64BIT
 #ifdef CONFIG_64BIT
 	case 4: case 5: case 6: case 7:
 	case 4: case 5: case 6: case 7:
 #ifdef CONFIG_MIPS32_O32
 #ifdef CONFIG_MIPS32_O32
 		if (test_thread_flag(TIF_32BIT_REGS))
 		if (test_thread_flag(TIF_32BIT_REGS))
-			return get_user(*arg, (int *)usp + 4 * n);
+			return get_user(*arg, (int *)usp + n);
 		else
 		else
 #endif
 #endif
 			*arg = regs->regs[4 + n];
 			*arg = regs->regs[4 + n];
@@ -68,6 +69,8 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
 	default:
 	default:
 		BUG();
 		BUG();
 	}
 	}
+
+	unreachable();
 }
 }
 
 
 static inline long syscall_get_return_value(struct task_struct *task,
 static inline long syscall_get_return_value(struct task_struct *task,
@@ -100,7 +103,6 @@ static inline void syscall_get_arguments(struct task_struct *task,
 					 unsigned int i, unsigned int n,
 					 unsigned int i, unsigned int n,
 					 unsigned long *args)
 					 unsigned long *args)
 {
 {
-	unsigned long arg;
 	int ret;
 	int ret;
 	/* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */
 	/* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */
 	if ((config_enabled(CONFIG_32BIT) ||
 	if ((config_enabled(CONFIG_32BIT) ||
@@ -111,7 +113,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
 	}
 	}
 
 
 	while (n--)
 	while (n--)
-		ret |= mips_get_syscall_arg(&arg, task, regs, i++);
+		ret |= mips_get_syscall_arg(args++, task, regs, i++);
 
 
 	/*
 	/*
 	 * No way to communicate an error because this is a void function.
 	 * No way to communicate an error because this is a void function.

+ 2 - 2
arch/mips/include/uapi/asm/inst.h

@@ -170,8 +170,8 @@ enum cop1_sdw_func {
  */
  */
 enum cop1x_func {
 enum cop1x_func {
 	lwxc1_op     =	0x00, ldxc1_op	   =  0x01,
 	lwxc1_op     =	0x00, ldxc1_op	   =  0x01,
-	pfetch_op    =	0x07, swxc1_op	   =  0x08,
-	sdxc1_op     =	0x09, madd_s_op	   =  0x20,
+	swxc1_op     =  0x08, sdxc1_op	   =  0x09,
+	pfetch_op    =	0x0f, madd_s_op	   =  0x20,
 	madd_d_op    =	0x21, madd_e_op	   =  0x22,
 	madd_d_op    =	0x21, madd_e_op	   =  0x22,
 	msub_s_op    =	0x28, msub_d_op	   =  0x29,
 	msub_s_op    =	0x28, msub_d_op	   =  0x29,
 	msub_e_op    =	0x2a, nmadd_s_op   =  0x30,
 	msub_e_op    =	0x2a, nmadd_s_op   =  0x30,

+ 2 - 3
arch/mips/kernel/ftrace.c

@@ -115,11 +115,10 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
 	safe_store_code(new_code1, ip, faulted);
 	safe_store_code(new_code1, ip, faulted);
 	if (unlikely(faulted))
 	if (unlikely(faulted))
 		return -EFAULT;
 		return -EFAULT;
-	ip += 4;
-	safe_store_code(new_code2, ip, faulted);
+	safe_store_code(new_code2, ip + 4, faulted);
 	if (unlikely(faulted))
 	if (unlikely(faulted))
 		return -EFAULT;
 		return -EFAULT;
-	flush_icache_range(ip, ip + 8); /* original ip + 12 */
+	flush_icache_range(ip, ip + 8);
 	return 0;
 	return 0;
 }
 }
 #endif
 #endif

+ 8 - 8
arch/mips/kernel/r4k_fpu.S

@@ -36,9 +36,9 @@
 LEAF(_save_fp_context)
 LEAF(_save_fp_context)
 	cfc1	t1, fcr31
 	cfc1	t1, fcr31
 
 
-#if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	.set	push
 	.set	push
-#ifdef CONFIG_MIPS32_R2
+#ifdef CONFIG_CPU_MIPS32_R2
 	.set	mips64r2
 	.set	mips64r2
 	mfc0	t0, CP0_STATUS
 	mfc0	t0, CP0_STATUS
 	sll	t0, t0, 5
 	sll	t0, t0, 5
@@ -147,11 +147,11 @@ LEAF(_save_fp_context32)
  *  - cp1 status/control register
  *  - cp1 status/control register
  */
  */
 LEAF(_restore_fp_context)
 LEAF(_restore_fp_context)
-	EX	lw t0, SC_FPC_CSR(a0)
+	EX	lw t1, SC_FPC_CSR(a0)
 
 
-#if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2)
+#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
 	.set	push
 	.set	push
-#ifdef CONFIG_MIPS32_R2
+#ifdef CONFIG_CPU_MIPS32_R2
 	.set	mips64r2
 	.set	mips64r2
 	mfc0	t0, CP0_STATUS
 	mfc0	t0, CP0_STATUS
 	sll	t0, t0, 5
 	sll	t0, t0, 5
@@ -192,7 +192,7 @@ LEAF(_restore_fp_context)
 	EX	ldc1 $f26, SC_FPREGS+208(a0)
 	EX	ldc1 $f26, SC_FPREGS+208(a0)
 	EX	ldc1 $f28, SC_FPREGS+224(a0)
 	EX	ldc1 $f28, SC_FPREGS+224(a0)
 	EX	ldc1 $f30, SC_FPREGS+240(a0)
 	EX	ldc1 $f30, SC_FPREGS+240(a0)
-	ctc1	t0, fcr31
+	ctc1	t1, fcr31
 	jr	ra
 	jr	ra
 	 li	v0, 0					# success
 	 li	v0, 0					# success
 	END(_restore_fp_context)
 	END(_restore_fp_context)
@@ -200,7 +200,7 @@ LEAF(_restore_fp_context)
 #ifdef CONFIG_MIPS32_COMPAT
 #ifdef CONFIG_MIPS32_COMPAT
 LEAF(_restore_fp_context32)
 LEAF(_restore_fp_context32)
 	/* Restore an o32 sigcontext.  */
 	/* Restore an o32 sigcontext.  */
-	EX	lw t0, SC32_FPC_CSR(a0)
+	EX	lw t1, SC32_FPC_CSR(a0)
 
 
 	mfc0	t0, CP0_STATUS
 	mfc0	t0, CP0_STATUS
 	sll	t0, t0, 5
 	sll	t0, t0, 5
@@ -240,7 +240,7 @@ LEAF(_restore_fp_context32)
 	EX	ldc1 $f26, SC32_FPREGS+208(a0)
 	EX	ldc1 $f26, SC32_FPREGS+208(a0)
 	EX	ldc1 $f28, SC32_FPREGS+224(a0)
 	EX	ldc1 $f28, SC32_FPREGS+224(a0)
 	EX	ldc1 $f30, SC32_FPREGS+240(a0)
 	EX	ldc1 $f30, SC32_FPREGS+240(a0)
-	ctc1	t0, fcr31
+	ctc1	t1, fcr31
 	jr	ra
 	jr	ra
 	 li	v0, 0					# success
 	 li	v0, 0					# success
 	END(_restore_fp_context32)
 	END(_restore_fp_context32)

+ 3 - 0
arch/mips/kernel/rtlx-cmp.c

@@ -112,5 +112,8 @@ void __exit rtlx_module_exit(void)
 
 
 	for (i = 0; i < RTLX_CHANNELS; i++)
 	for (i = 0; i < RTLX_CHANNELS; i++)
 		device_destroy(mt_class, MKDEV(major, i));
 		device_destroy(mt_class, MKDEV(major, i));
+
 	unregister_chrdev(major, RTLX_MODULE_NAME);
 	unregister_chrdev(major, RTLX_MODULE_NAME);
+
+	aprp_hook = NULL;
 }
 }

+ 3 - 0
arch/mips/kernel/rtlx-mt.c

@@ -144,5 +144,8 @@ void __exit rtlx_module_exit(void)
 
 
 	for (i = 0; i < RTLX_CHANNELS; i++)
 	for (i = 0; i < RTLX_CHANNELS; i++)
 		device_destroy(mt_class, MKDEV(major, i));
 		device_destroy(mt_class, MKDEV(major, i));
+
 	unregister_chrdev(major, RTLX_MODULE_NAME);
 	unregister_chrdev(major, RTLX_MODULE_NAME);
+
+	aprp_hook = NULL;
 }
 }

+ 3 - 3
arch/mips/math-emu/cp1emu.c

@@ -1561,10 +1561,10 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
 		break;
 		break;
 	}
 	}
 
 
-	case 0x7:		/* 7 */
-		if (MIPSInst_FUNC(ir) != pfetch_op) {
+	case 0x3:
+		if (MIPSInst_FUNC(ir) != pfetch_op)
 			return SIGILL;
 			return SIGILL;
-		}
+
 		/* ignore prefx operation */
 		/* ignore prefx operation */
 		break;
 		break;
 
 

+ 1 - 1
arch/mips/mti-malta/malta-amon.c

@@ -72,7 +72,7 @@ int amon_cpu_start(int cpu,
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_MIPS_VPE_LOADER
+#ifdef CONFIG_MIPS_VPE_LOADER_CMP
 int vpe_run(struct vpe *v)
 int vpe_run(struct vpe *v)
 {
 {
 	struct vpe_notifications *n;
 	struct vpe_notifications *n;

+ 2 - 2
arch/mips/mti-malta/malta-int.c

@@ -117,7 +117,7 @@ static void malta_hw0_irqdispatch(void)
 
 
 	do_IRQ(MALTA_INT_BASE + irq);
 	do_IRQ(MALTA_INT_BASE + irq);
 
 
-#ifdef MIPS_VPE_APSP_API
+#ifdef CONFIG_MIPS_VPE_APSP_API_MT
 	if (aprp_hook)
 	if (aprp_hook)
 		aprp_hook();
 		aprp_hook();
 #endif
 #endif
@@ -311,7 +311,7 @@ static void ipi_call_dispatch(void)
 
 
 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
 {
 {
-#ifdef MIPS_VPE_APSP_API
+#ifdef CONFIG_MIPS_VPE_APSP_API_CMP
 	if (aprp_hook)
 	if (aprp_hook)
 		aprp_hook();
 		aprp_hook();
 #endif
 #endif

+ 1 - 0
arch/mips/pci/msi-octeon.c

@@ -150,6 +150,7 @@ msi_irq_allocated:
 		msg.address_lo =
 		msg.address_lo =
 			((128ul << 20) + CVMX_PCI_MSI_RCV) & 0xffffffff;
 			((128ul << 20) + CVMX_PCI_MSI_RCV) & 0xffffffff;
 		msg.address_hi = ((128ul << 20) + CVMX_PCI_MSI_RCV) >> 32;
 		msg.address_hi = ((128ul << 20) + CVMX_PCI_MSI_RCV) >> 32;
+		break;
 	case OCTEON_DMA_BAR_TYPE_BIG:
 	case OCTEON_DMA_BAR_TYPE_BIG:
 		/* When using big bar, Bar 0 is based at 0 */
 		/* When using big bar, Bar 0 is based at 0 */
 		msg.address_lo = (0 + CVMX_PCI_MSI_RCV) & 0xffffffff;
 		msg.address_lo = (0 + CVMX_PCI_MSI_RCV) & 0xffffffff;

+ 1 - 0
arch/mips/power/hibernate.S

@@ -43,6 +43,7 @@ LEAF(swsusp_arch_resume)
 	bne t1, t3, 1b
 	bne t1, t3, 1b
 	PTR_L t0, PBE_NEXT(t0)
 	PTR_L t0, PBE_NEXT(t0)
 	bnez t0, 0b
 	bnez t0, 0b
+	jal local_flush_tlb_all /* Avoid TLB mismatch after kernel resume */
 	PTR_LA t0, saved_regs
 	PTR_LA t0, saved_regs
 	PTR_L ra, PT_R31(t0)
 	PTR_L ra, PT_R31(t0)
 	PTR_L sp, PT_R29(t0)
 	PTR_L sp, PT_R29(t0)

+ 0 - 11
arch/parisc/include/asm/page.h

@@ -32,17 +32,6 @@ void copy_page_asm(void *to, void *from);
 void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
 void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
 			struct page *pg);
 			struct page *pg);
 
 
-/* #define CONFIG_PARISC_TMPALIAS */
-
-#ifdef CONFIG_PARISC_TMPALIAS
-void clear_user_highpage(struct page *page, unsigned long vaddr);
-#define clear_user_highpage clear_user_highpage
-struct vm_area_struct;
-void copy_user_highpage(struct page *to, struct page *from,
-	unsigned long vaddr, struct vm_area_struct *vma);
-#define __HAVE_ARCH_COPY_USER_HIGHPAGE
-#endif
-
 /*
 /*
  * These are used to make use of C type-checking..
  * These are used to make use of C type-checking..
  */
  */

+ 0 - 4
arch/parisc/include/asm/spinlock.h

@@ -191,8 +191,4 @@ static __inline__ int arch_write_can_lock(arch_rwlock_t *rw)
 #define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
 #define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
 #define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
 #define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
 
 
-#define arch_spin_relax(lock)	cpu_relax()
-#define arch_read_relax(lock)	cpu_relax()
-#define arch_write_relax(lock)	cpu_relax()
-
 #endif /* __ASM_SPINLOCK_H */
 #endif /* __ASM_SPINLOCK_H */

+ 2 - 2
arch/parisc/include/uapi/asm/unistd.h

@@ -828,13 +828,13 @@
 #define __NR_finit_module	(__NR_Linux + 333)
 #define __NR_finit_module	(__NR_Linux + 333)
 #define __NR_sched_setattr	(__NR_Linux + 334)
 #define __NR_sched_setattr	(__NR_Linux + 334)
 #define __NR_sched_getattr	(__NR_Linux + 335)
 #define __NR_sched_getattr	(__NR_Linux + 335)
+#define __NR_utimes		(__NR_Linux + 336)
 
 
-#define __NR_Linux_syscalls	(__NR_sched_getattr + 1)
+#define __NR_Linux_syscalls	(__NR_utimes + 1)
 
 
 
 
 #define __IGNORE_select		/* newselect */
 #define __IGNORE_select		/* newselect */
 #define __IGNORE_fadvise64	/* fadvise64_64 */
 #define __IGNORE_fadvise64	/* fadvise64_64 */
-#define __IGNORE_utimes		/* utime */
 
 
 
 
 #define HPUX_GATEWAY_ADDR       0xC0000004
 #define HPUX_GATEWAY_ADDR       0xC0000004

+ 0 - 64
arch/parisc/kernel/cache.c

@@ -581,67 +581,3 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long
 		__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
 		__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
 	}
 	}
 }
 }
-
-#ifdef CONFIG_PARISC_TMPALIAS
-
-void clear_user_highpage(struct page *page, unsigned long vaddr)
-{
-	void *vto;
-	unsigned long flags;
-
-	/* Clear using TMPALIAS region.  The page doesn't need to
-	   be flushed but the kernel mapping needs to be purged.  */
-
-	vto = kmap_atomic(page);
-
-	/* The PA-RISC 2.0 Architecture book states on page F-6:
-	   "Before a write-capable translation is enabled, *all*
-	   non-equivalently-aliased translations must be removed
-	   from the page table and purged from the TLB.  (Note
-	   that the caches are not required to be flushed at this
-	   time.)  Before any non-equivalent aliased translation
-	   is re-enabled, the virtual address range for the writeable
-	   page (the entire page) must be flushed from the cache,
-	   and the write-capable translation removed from the page
-	   table and purged from the TLB."  */
-
-	purge_kernel_dcache_page_asm((unsigned long)vto);
-	purge_tlb_start(flags);
-	pdtlb_kernel(vto);
-	purge_tlb_end(flags);
-	preempt_disable();
-	clear_user_page_asm(vto, vaddr);
-	preempt_enable();
-
-	pagefault_enable();		/* kunmap_atomic(addr, KM_USER0); */
-}
-
-void copy_user_highpage(struct page *to, struct page *from,
-	unsigned long vaddr, struct vm_area_struct *vma)
-{
-	void *vfrom, *vto;
-	unsigned long flags;
-
-	/* Copy using TMPALIAS region.  This has the advantage
-	   that the `from' page doesn't need to be flushed.  However,
-	   the `to' page must be flushed in copy_user_page_asm since
-	   it can be used to bring in executable code.  */
-
-	vfrom = kmap_atomic(from);
-	vto = kmap_atomic(to);
-
-	purge_kernel_dcache_page_asm((unsigned long)vto);
-	purge_tlb_start(flags);
-	pdtlb_kernel(vto);
-	pdtlb_kernel(vfrom);
-	purge_tlb_end(flags);
-	preempt_disable();
-	copy_user_page_asm(vto, vfrom, vaddr);
-	flush_dcache_page_asm(__pa(vto), vaddr);
-	preempt_enable();
-
-	pagefault_enable();		/* kunmap_atomic(addr, KM_USER1); */
-	pagefault_enable();		/* kunmap_atomic(addr, KM_USER0); */
-}
-
-#endif /* CONFIG_PARISC_TMPALIAS */

+ 1 - 0
arch/parisc/kernel/syscall_table.S

@@ -431,6 +431,7 @@
 	ENTRY_SAME(finit_module)
 	ENTRY_SAME(finit_module)
 	ENTRY_SAME(sched_setattr)
 	ENTRY_SAME(sched_setattr)
 	ENTRY_SAME(sched_getattr)	/* 335 */
 	ENTRY_SAME(sched_getattr)	/* 335 */
+	ENTRY_COMP(utimes)
 
 
 	/* Nothing yet */
 	/* Nothing yet */
 
 

+ 9 - 0
arch/powerpc/kernel/process.c

@@ -1048,6 +1048,15 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
 	flush_altivec_to_thread(src);
 	flush_altivec_to_thread(src);
 	flush_vsx_to_thread(src);
 	flush_vsx_to_thread(src);
 	flush_spe_to_thread(src);
 	flush_spe_to_thread(src);
+	/*
+	 * Flush TM state out so we can copy it.  __switch_to_tm() does this
+	 * flush but it removes the checkpointed state from the current CPU and
+	 * transitions the CPU out of TM mode.  Hence we need to call
+	 * tm_recheckpoint_new_task() (on the same task) to restore the
+	 * checkpointed state back and the TM mode.
+	 */
+	__switch_to_tm(src);
+	tm_recheckpoint_new_task(src);
 
 
 	*dst = *src;
 	*dst = *src;
 
 

+ 1 - 0
arch/powerpc/kernel/reloc_64.S

@@ -81,6 +81,7 @@ _GLOBAL(relocate)
 
 
 6:	blr
 6:	blr
 
 
+.balign 8
 p_dyn:	.llong	__dynamic_start - 0b
 p_dyn:	.llong	__dynamic_start - 0b
 p_rela:	.llong	__rela_dyn_start - 0b
 p_rela:	.llong	__rela_dyn_start - 0b
 p_st:	.llong	_stext - 0b
 p_st:	.llong	_stext - 0b

+ 2 - 69
arch/powerpc/kvm/book3s_hv_rmhandlers.S

@@ -1504,73 +1504,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
 1:	addi	r8,r8,16
 1:	addi	r8,r8,16
 	.endr
 	.endr
 
 
-	/* Save DEC */
-	mfspr	r5,SPRN_DEC
-	mftb	r6
-	extsw	r5,r5
-	add	r5,r5,r6
-	std	r5,VCPU_DEC_EXPIRES(r9)
-
-BEGIN_FTR_SECTION
-	b	8f
-END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)
-	/* Turn on TM so we can access TFHAR/TFIAR/TEXASR */
-	mfmsr	r8
-	li	r0, 1
-	rldimi	r8, r0, MSR_TM_LG, 63-MSR_TM_LG
-	mtmsrd	r8
-
-	/* Save POWER8-specific registers */
-	mfspr	r5, SPRN_IAMR
-	mfspr	r6, SPRN_PSPB
-	mfspr	r7, SPRN_FSCR
-	std	r5, VCPU_IAMR(r9)
-	stw	r6, VCPU_PSPB(r9)
-	std	r7, VCPU_FSCR(r9)
-	mfspr	r5, SPRN_IC
-	mfspr	r6, SPRN_VTB
-	mfspr	r7, SPRN_TAR
-	std	r5, VCPU_IC(r9)
-	std	r6, VCPU_VTB(r9)
-	std	r7, VCPU_TAR(r9)
-#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
-	mfspr	r5, SPRN_TFHAR
-	mfspr	r6, SPRN_TFIAR
-	mfspr	r7, SPRN_TEXASR
-	std	r5, VCPU_TFHAR(r9)
-	std	r6, VCPU_TFIAR(r9)
-	std	r7, VCPU_TEXASR(r9)
-#endif
-	mfspr	r8, SPRN_EBBHR
-	std	r8, VCPU_EBBHR(r9)
-	mfspr	r5, SPRN_EBBRR
-	mfspr	r6, SPRN_BESCR
-	mfspr	r7, SPRN_CSIGR
-	mfspr	r8, SPRN_TACR
-	std	r5, VCPU_EBBRR(r9)
-	std	r6, VCPU_BESCR(r9)
-	std	r7, VCPU_CSIGR(r9)
-	std	r8, VCPU_TACR(r9)
-	mfspr	r5, SPRN_TCSCR
-	mfspr	r6, SPRN_ACOP
-	mfspr	r7, SPRN_PID
-	mfspr	r8, SPRN_WORT
-	std	r5, VCPU_TCSCR(r9)
-	std	r6, VCPU_ACOP(r9)
-	stw	r7, VCPU_GUEST_PID(r9)
-	std	r8, VCPU_WORT(r9)
-8:
-
-	/* Save and reset AMR and UAMOR before turning on the MMU */
-BEGIN_FTR_SECTION
-	mfspr	r5,SPRN_AMR
-	mfspr	r6,SPRN_UAMOR
-	std	r5,VCPU_AMR(r9)
-	std	r6,VCPU_UAMOR(r9)
-	li	r6,0
-	mtspr	SPRN_AMR,r6
-END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
-
 	/* Unset guest mode */
 	/* Unset guest mode */
 	li	r0, KVM_GUEST_MODE_NONE
 	li	r0, KVM_GUEST_MODE_NONE
 	stb	r0, HSTATE_IN_GUEST(r13)
 	stb	r0, HSTATE_IN_GUEST(r13)
@@ -2203,7 +2136,7 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 #endif
 #endif
 	mfspr	r6,SPRN_VRSAVE
 	mfspr	r6,SPRN_VRSAVE
-	stw	r6,VCPU_VRSAVE(r3)
+	stw	r6,VCPU_VRSAVE(r31)
 	mtlr	r30
 	mtlr	r30
 	mtmsrd	r5
 	mtmsrd	r5
 	isync
 	isync
@@ -2240,7 +2173,7 @@ BEGIN_FTR_SECTION
 	bl	.load_vr_state
 	bl	.load_vr_state
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 #endif
 #endif
-	lwz	r7,VCPU_VRSAVE(r4)
+	lwz	r7,VCPU_VRSAVE(r31)
 	mtspr	SPRN_VRSAVE,r7
 	mtspr	SPRN_VRSAVE,r7
 	mtlr	r30
 	mtlr	r30
 	mr	r4,r31
 	mr	r4,r31

+ 2 - 1
arch/powerpc/platforms/cell/ras.c

@@ -123,7 +123,8 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
 
 
 	area->nid = nid;
 	area->nid = nid;
 	area->order = order;
 	area->order = order;
-	area->pages = alloc_pages_exact_node(area->nid, GFP_KERNEL|GFP_THISNODE,
+	area->pages = alloc_pages_exact_node(area->nid,
+						GFP_KERNEL|__GFP_THISNODE,
 						area->order);
 						area->order);
 
 
 	if (!area->pages) {
 	if (!area->pages) {

+ 1 - 1
arch/sh/include/cpu-sh2/cpu/cache.h

@@ -18,7 +18,7 @@
 #define SH_CACHE_ASSOC		8
 #define SH_CACHE_ASSOC		8
 
 
 #if defined(CONFIG_CPU_SUBTYPE_SH7619)
 #if defined(CONFIG_CPU_SUBTYPE_SH7619)
-#define CCR		0xffffffec
+#define SH_CCR		0xffffffec
 
 
 #define CCR_CACHE_CE	0x01	/* Cache enable */
 #define CCR_CACHE_CE	0x01	/* Cache enable */
 #define CCR_CACHE_WT	0x02    /* CCR[bit1=1,bit2=1] */
 #define CCR_CACHE_WT	0x02    /* CCR[bit1=1,bit2=1] */

+ 2 - 2
arch/sh/include/cpu-sh2a/cpu/cache.h

@@ -17,8 +17,8 @@
 #define SH_CACHE_COMBINED	4
 #define SH_CACHE_COMBINED	4
 #define SH_CACHE_ASSOC		8
 #define SH_CACHE_ASSOC		8
 
 
-#define CCR		0xfffc1000 /* CCR1 */
-#define CCR2		0xfffc1004
+#define SH_CCR		0xfffc1000 /* CCR1 */
+#define SH_CCR2		0xfffc1004
 
 
 /*
 /*
  * Most of the SH-2A CCR1 definitions resemble the SH-4 ones. All others not
  * Most of the SH-2A CCR1 definitions resemble the SH-4 ones. All others not

+ 1 - 1
arch/sh/include/cpu-sh3/cpu/cache.h

@@ -17,7 +17,7 @@
 #define SH_CACHE_COMBINED	4
 #define SH_CACHE_COMBINED	4
 #define SH_CACHE_ASSOC		8
 #define SH_CACHE_ASSOC		8
 
 
-#define CCR		0xffffffec	/* Address of Cache Control Register */
+#define SH_CCR		0xffffffec	/* Address of Cache Control Register */
 
 
 #define CCR_CACHE_CE	0x01	/* Cache Enable */
 #define CCR_CACHE_CE	0x01	/* Cache Enable */
 #define CCR_CACHE_WT	0x02	/* Write-Through (for P0,U0,P3) (else writeback) */
 #define CCR_CACHE_WT	0x02	/* Write-Through (for P0,U0,P3) (else writeback) */

+ 1 - 1
arch/sh/include/cpu-sh4/cpu/cache.h

@@ -17,7 +17,7 @@
 #define SH_CACHE_COMBINED	4
 #define SH_CACHE_COMBINED	4
 #define SH_CACHE_ASSOC		8
 #define SH_CACHE_ASSOC		8
 
 
-#define CCR		0xff00001c	/* Address of Cache Control Register */
+#define SH_CCR		0xff00001c	/* Address of Cache Control Register */
 #define CCR_CACHE_OCE	0x0001	/* Operand Cache Enable */
 #define CCR_CACHE_OCE	0x0001	/* Operand Cache Enable */
 #define CCR_CACHE_WT	0x0002	/* Write-Through (for P0,U0,P3) (else writeback)*/
 #define CCR_CACHE_WT	0x0002	/* Write-Through (for P0,U0,P3) (else writeback)*/
 #define CCR_CACHE_CB	0x0004	/* Copy-Back (for P1) (else writethrough) */
 #define CCR_CACHE_CB	0x0004	/* Copy-Back (for P1) (else writethrough) */

+ 2 - 2
arch/sh/kernel/cpu/init.c

@@ -112,7 +112,7 @@ static void cache_init(void)
 	unsigned long ccr, flags;
 	unsigned long ccr, flags;
 
 
 	jump_to_uncached();
 	jump_to_uncached();
-	ccr = __raw_readl(CCR);
+	ccr = __raw_readl(SH_CCR);
 
 
 	/*
 	/*
 	 * At this point we don't know whether the cache is enabled or not - a
 	 * At this point we don't know whether the cache is enabled or not - a
@@ -189,7 +189,7 @@ static void cache_init(void)
 
 
 	l2_cache_init();
 	l2_cache_init();
 
 
-	__raw_writel(flags, CCR);
+	__raw_writel(flags, SH_CCR);
 	back_to_cached();
 	back_to_cached();
 }
 }
 #else
 #else

+ 1 - 1
arch/sh/mm/cache-debugfs.c

@@ -36,7 +36,7 @@ static int cache_seq_show(struct seq_file *file, void *iter)
 	 */
 	 */
 	jump_to_uncached();
 	jump_to_uncached();
 
 
-	ccr = __raw_readl(CCR);
+	ccr = __raw_readl(SH_CCR);
 	if ((ccr & CCR_CACHE_ENABLE) == 0) {
 	if ((ccr & CCR_CACHE_ENABLE) == 0) {
 		back_to_cached();
 		back_to_cached();
 
 

+ 2 - 2
arch/sh/mm/cache-sh2.c

@@ -63,9 +63,9 @@ static void sh2__flush_invalidate_region(void *start, int size)
 	local_irq_save(flags);
 	local_irq_save(flags);
 	jump_to_uncached();
 	jump_to_uncached();
 
 
-	ccr = __raw_readl(CCR);
+	ccr = __raw_readl(SH_CCR);
 	ccr |= CCR_CACHE_INVALIDATE;
 	ccr |= CCR_CACHE_INVALIDATE;
-	__raw_writel(ccr, CCR);
+	__raw_writel(ccr, SH_CCR);
 
 
 	back_to_cached();
 	back_to_cached();
 	local_irq_restore(flags);
 	local_irq_restore(flags);

+ 4 - 2
arch/sh/mm/cache-sh2a.c

@@ -134,7 +134,8 @@ static void sh2a__flush_invalidate_region(void *start, int size)
 
 
 	/* If there are too many pages then just blow the cache */
 	/* If there are too many pages then just blow the cache */
 	if (((end - begin) >> PAGE_SHIFT) >= MAX_OCACHE_PAGES) {
 	if (((end - begin) >> PAGE_SHIFT) >= MAX_OCACHE_PAGES) {
-		__raw_writel(__raw_readl(CCR) | CCR_OCACHE_INVALIDATE, CCR);
+		__raw_writel(__raw_readl(SH_CCR) | CCR_OCACHE_INVALIDATE,
+			     SH_CCR);
 	} else {
 	} else {
 		for (v = begin; v < end; v += L1_CACHE_BYTES)
 		for (v = begin; v < end; v += L1_CACHE_BYTES)
 			sh2a_invalidate_line(CACHE_OC_ADDRESS_ARRAY, v);
 			sh2a_invalidate_line(CACHE_OC_ADDRESS_ARRAY, v);
@@ -167,7 +168,8 @@ static void sh2a_flush_icache_range(void *args)
 	/* I-Cache invalidate */
 	/* I-Cache invalidate */
 	/* If there are too many pages then just blow the cache */
 	/* If there are too many pages then just blow the cache */
 	if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) {
 	if (((end - start) >> PAGE_SHIFT) >= MAX_ICACHE_PAGES) {
-		__raw_writel(__raw_readl(CCR) | CCR_ICACHE_INVALIDATE, CCR);
+		__raw_writel(__raw_readl(SH_CCR) | CCR_ICACHE_INVALIDATE,
+			     SH_CCR);
 	} else {
 	} else {
 		for (v = start; v < end; v += L1_CACHE_BYTES)
 		for (v = start; v < end; v += L1_CACHE_BYTES)
 			sh2a_invalidate_line(CACHE_IC_ADDRESS_ARRAY, v);
 			sh2a_invalidate_line(CACHE_IC_ADDRESS_ARRAY, v);

+ 2 - 2
arch/sh/mm/cache-sh4.c

@@ -133,9 +133,9 @@ static void flush_icache_all(void)
 	jump_to_uncached();
 	jump_to_uncached();
 
 
 	/* Flush I-cache */
 	/* Flush I-cache */
-	ccr = __raw_readl(CCR);
+	ccr = __raw_readl(SH_CCR);
 	ccr |= CCR_CACHE_ICI;
 	ccr |= CCR_CACHE_ICI;
-	__raw_writel(ccr, CCR);
+	__raw_writel(ccr, SH_CCR);
 
 
 	/*
 	/*
 	 * back_to_cached() will take care of the barrier for us, don't add
 	 * back_to_cached() will take care of the barrier for us, don't add

+ 2 - 2
arch/sh/mm/cache-shx3.c

@@ -19,7 +19,7 @@ void __init shx3_cache_init(void)
 {
 {
 	unsigned int ccr;
 	unsigned int ccr;
 
 
-	ccr = __raw_readl(CCR);
+	ccr = __raw_readl(SH_CCR);
 
 
 	/*
 	/*
 	 * If we've got cache aliases, resolve them in hardware.
 	 * If we've got cache aliases, resolve them in hardware.
@@ -40,5 +40,5 @@ void __init shx3_cache_init(void)
 	ccr |= CCR_CACHE_IBE;
 	ccr |= CCR_CACHE_IBE;
 #endif
 #endif
 
 
-	writel_uncached(ccr, CCR);
+	writel_uncached(ccr, SH_CCR);
 }
 }

+ 2 - 2
arch/sh/mm/cache.c

@@ -285,8 +285,8 @@ void __init cpu_cache_init(void)
 {
 {
 	unsigned int cache_disabled = 0;
 	unsigned int cache_disabled = 0;
 
 
-#ifdef CCR
-	cache_disabled = !(__raw_readl(CCR) & CCR_CACHE_ENABLE);
+#ifdef SH_CCR
+	cache_disabled = !(__raw_readl(SH_CCR) & CCR_CACHE_ENABLE);
 #endif
 #endif
 
 
 	compute_alias(&boot_cpu_data.icache);
 	compute_alias(&boot_cpu_data.icache);

+ 3 - 1
arch/sparc/kernel/process_64.c

@@ -58,9 +58,12 @@ void arch_cpu_idle(void)
 {
 {
 	if (tlb_type != hypervisor) {
 	if (tlb_type != hypervisor) {
 		touch_nmi_watchdog();
 		touch_nmi_watchdog();
+		local_irq_enable();
 	} else {
 	} else {
 		unsigned long pstate;
 		unsigned long pstate;
 
 
+		local_irq_enable();
+
                 /* The sun4v sleeping code requires that we have PSTATE.IE cleared over
                 /* The sun4v sleeping code requires that we have PSTATE.IE cleared over
                  * the cpu sleep hypervisor call.
                  * the cpu sleep hypervisor call.
                  */
                  */
@@ -82,7 +85,6 @@ void arch_cpu_idle(void)
 			: "=&r" (pstate)
 			: "=&r" (pstate)
 			: "i" (PSTATE_IE));
 			: "i" (PSTATE_IE));
 	}
 	}
-	local_irq_enable();
 }
 }
 
 
 #ifdef CONFIG_HOTPLUG_CPU
 #ifdef CONFIG_HOTPLUG_CPU

+ 2 - 2
arch/sparc/kernel/syscalls.S

@@ -189,7 +189,8 @@ linux_sparc_syscall32:
 	 mov	%i0, %l5				! IEU1
 	 mov	%i0, %l5				! IEU1
 5:	call	%l7					! CTI	Group brk forced
 5:	call	%l7					! CTI	Group brk forced
 	 srl	%i5, 0, %o5				! IEU1
 	 srl	%i5, 0, %o5				! IEU1
-	ba,a,pt	%xcc, 3f
+	ba,pt	%xcc, 3f
+	 sra	%o0, 0, %o0
 
 
 	/* Linux native system calls enter here... */
 	/* Linux native system calls enter here... */
 	.align	32
 	.align	32
@@ -217,7 +218,6 @@ linux_sparc_syscall:
 3:	stx	%o0, [%sp + PTREGS_OFF + PT_V9_I0]
 3:	stx	%o0, [%sp + PTREGS_OFF + PT_V9_I0]
 ret_sys_call:
 ret_sys_call:
 	ldx	[%sp + PTREGS_OFF + PT_V9_TSTATE], %g3
 	ldx	[%sp + PTREGS_OFF + PT_V9_TSTATE], %g3
-	sra	%o0, 0, %o0
 	mov	%ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
 	mov	%ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
 	sllx	%g2, 32, %g2
 	sllx	%g2, 32, %g2
 
 

+ 1 - 1
arch/sparc/mm/tsb.c

@@ -273,7 +273,7 @@ void __init pgtable_cache_init(void)
 		prom_halt();
 		prom_halt();
 	}
 	}
 
 
-	for (i = 0; i < 8; i++) {
+	for (i = 0; i < ARRAY_SIZE(tsb_cache_names); i++) {
 		unsigned long size = 8192 << i;
 		unsigned long size = 8192 << i;
 		const char *name = tsb_cache_names[i];
 		const char *name = tsb_cache_names[i];
 
 

+ 0 - 4
arch/x86/Kconfig.cpu

@@ -341,10 +341,6 @@ config X86_USE_3DNOW
 	def_bool y
 	def_bool y
 	depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
 	depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
 
 
-config X86_OOSTORE
-	def_bool y
-	depends on (MWINCHIP3D || MWINCHIPC6) && MTRR
-
 #
 #
 # P6_NOPs are a relatively minor optimization that require a family >=
 # P6_NOPs are a relatively minor optimization that require a family >=
 # 6 processor, except that it is broken on certain VIA chips.
 # 6 processor, except that it is broken on certain VIA chips.

+ 2 - 6
arch/x86/include/asm/barrier.h

@@ -85,11 +85,7 @@
 #else
 #else
 # define smp_rmb()	barrier()
 # define smp_rmb()	barrier()
 #endif
 #endif
-#ifdef CONFIG_X86_OOSTORE
-# define smp_wmb() 	wmb()
-#else
-# define smp_wmb()	barrier()
-#endif
+#define smp_wmb()	barrier()
 #define smp_read_barrier_depends()	read_barrier_depends()
 #define smp_read_barrier_depends()	read_barrier_depends()
 #define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
 #define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
 #else /* !SMP */
 #else /* !SMP */
@@ -100,7 +96,7 @@
 #define set_mb(var, value) do { var = value; barrier(); } while (0)
 #define set_mb(var, value) do { var = value; barrier(); } while (0)
 #endif /* SMP */
 #endif /* SMP */
 
 
-#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
+#if defined(CONFIG_X86_PPRO_FENCE)
 
 
 /*
 /*
  * For either of these options x86 doesn't have a strong TSO memory
  * For either of these options x86 doesn't have a strong TSO memory

+ 1 - 0
arch/x86/include/asm/efi.h

@@ -134,6 +134,7 @@ extern void efi_setup_page_tables(void);
 extern void __init old_map_region(efi_memory_desc_t *md);
 extern void __init old_map_region(efi_memory_desc_t *md);
 extern void __init runtime_code_page_mkexec(void);
 extern void __init runtime_code_page_mkexec(void);
 extern void __init efi_runtime_mkexec(void);
 extern void __init efi_runtime_mkexec(void);
+extern void __init efi_apply_memmap_quirks(void);
 
 
 struct efi_setup_data {
 struct efi_setup_data {
 	u64 fw_vendor;
 	u64 fw_vendor;

+ 1 - 1
arch/x86/include/asm/io.h

@@ -237,7 +237,7 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
 
 
 static inline void flush_write_buffers(void)
 static inline void flush_write_buffers(void)
 {
 {
-#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
+#if defined(CONFIG_X86_PPRO_FENCE)
 	asm volatile("lock; addl $0,0(%%esp)": : :"memory");
 	asm volatile("lock; addl $0,0(%%esp)": : :"memory");
 #endif
 #endif
 }
 }

+ 2 - 3
arch/x86/include/asm/spinlock.h

@@ -26,10 +26,9 @@
 # define LOCK_PTR_REG "D"
 # define LOCK_PTR_REG "D"
 #endif
 #endif
 
 
-#if defined(CONFIG_X86_32) && \
-	(defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE))
+#if defined(CONFIG_X86_32) && (defined(CONFIG_X86_PPRO_FENCE))
 /*
 /*
- * On PPro SMP or if we are using OOSTORE, we use a locked operation to unlock
+ * On PPro SMP, we use a locked operation to unlock
  * (PPro errata 66, 92)
  * (PPro errata 66, 92)
  */
  */
 # define UNLOCK_LOCK_PREFIX LOCK_PREFIX
 # define UNLOCK_LOCK_PREFIX LOCK_PREFIX

+ 1 - 19
arch/x86/kernel/aperture_64.c

@@ -18,7 +18,6 @@
 #include <linux/pci_ids.h>
 #include <linux/pci_ids.h>
 #include <linux/pci.h>
 #include <linux/pci.h>
 #include <linux/bitops.h>
 #include <linux/bitops.h>
-#include <linux/ioport.h>
 #include <linux/suspend.h>
 #include <linux/suspend.h>
 #include <asm/e820.h>
 #include <asm/e820.h>
 #include <asm/io.h>
 #include <asm/io.h>
@@ -54,18 +53,6 @@ int fallback_aper_force __initdata;
 
 
 int fix_aperture __initdata = 1;
 int fix_aperture __initdata = 1;
 
 
-static struct resource gart_resource = {
-	.name	= "GART",
-	.flags	= IORESOURCE_MEM,
-};
-
-static void __init insert_aperture_resource(u32 aper_base, u32 aper_size)
-{
-	gart_resource.start = aper_base;
-	gart_resource.end = aper_base + aper_size - 1;
-	insert_resource(&iomem_resource, &gart_resource);
-}
-
 /* This code runs before the PCI subsystem is initialized, so just
 /* This code runs before the PCI subsystem is initialized, so just
    access the northbridge directly. */
    access the northbridge directly. */
 
 
@@ -96,7 +83,6 @@ static u32 __init allocate_aperture(void)
 	memblock_reserve(addr, aper_size);
 	memblock_reserve(addr, aper_size);
 	printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n",
 	printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n",
 			aper_size >> 10, addr);
 			aper_size >> 10, addr);
-	insert_aperture_resource((u32)addr, aper_size);
 	register_nosave_region(addr >> PAGE_SHIFT,
 	register_nosave_region(addr >> PAGE_SHIFT,
 			       (addr+aper_size) >> PAGE_SHIFT);
 			       (addr+aper_size) >> PAGE_SHIFT);
 
 
@@ -444,12 +430,8 @@ int __init gart_iommu_hole_init(void)
 
 
 out:
 out:
 	if (!fix && !fallback_aper_force) {
 	if (!fix && !fallback_aper_force) {
-		if (last_aper_base) {
-			unsigned long n = (32 * 1024 * 1024) << last_aper_order;
-
-			insert_aperture_resource((u32)last_aper_base, n);
+		if (last_aper_base)
 			return 1;
 			return 1;
-		}
 		return 0;
 		return 0;
 	}
 	}
 
 

+ 0 - 272
arch/x86/kernel/cpu/centaur.c

@@ -8,236 +8,6 @@
 
 
 #include "cpu.h"
 #include "cpu.h"
 
 
-#ifdef CONFIG_X86_OOSTORE
-
-static u32 power2(u32 x)
-{
-	u32 s = 1;
-
-	while (s <= x)
-		s <<= 1;
-
-	return s >>= 1;
-}
-
-
-/*
- * Set up an actual MCR
- */
-static void centaur_mcr_insert(int reg, u32 base, u32 size, int key)
-{
-	u32 lo, hi;
-
-	hi = base & ~0xFFF;
-	lo = ~(size-1);		/* Size is a power of 2 so this makes a mask */
-	lo &= ~0xFFF;		/* Remove the ctrl value bits */
-	lo |= key;		/* Attribute we wish to set */
-	wrmsr(reg+MSR_IDT_MCR0, lo, hi);
-	mtrr_centaur_report_mcr(reg, lo, hi);	/* Tell the mtrr driver */
-}
-
-/*
- * Figure what we can cover with MCR's
- *
- * Shortcut: We know you can't put 4Gig of RAM on a winchip
- */
-static u32 ramtop(void)
-{
-	u32 clip = 0xFFFFFFFFUL;
-	u32 top = 0;
-	int i;
-
-	for (i = 0; i < e820.nr_map; i++) {
-		unsigned long start, end;
-
-		if (e820.map[i].addr > 0xFFFFFFFFUL)
-			continue;
-		/*
-		 * Don't MCR over reserved space. Ignore the ISA hole
-		 * we frob around that catastrophe already
-		 */
-		if (e820.map[i].type == E820_RESERVED) {
-			if (e820.map[i].addr >= 0x100000UL &&
-			    e820.map[i].addr < clip)
-				clip = e820.map[i].addr;
-			continue;
-		}
-		start = e820.map[i].addr;
-		end = e820.map[i].addr + e820.map[i].size;
-		if (start >= end)
-			continue;
-		if (end > top)
-			top = end;
-	}
-	/*
-	 * Everything below 'top' should be RAM except for the ISA hole.
-	 * Because of the limited MCR's we want to map NV/ACPI into our
-	 * MCR range for gunk in RAM
-	 *
-	 * Clip might cause us to MCR insufficient RAM but that is an
-	 * acceptable failure mode and should only bite obscure boxes with
-	 * a VESA hole at 15Mb
-	 *
-	 * The second case Clip sometimes kicks in is when the EBDA is marked
-	 * as reserved. Again we fail safe with reasonable results
-	 */
-	if (top > clip)
-		top = clip;
-
-	return top;
-}
-
-/*
- * Compute a set of MCR's to give maximum coverage
- */
-static int centaur_mcr_compute(int nr, int key)
-{
-	u32 mem = ramtop();
-	u32 root = power2(mem);
-	u32 base = root;
-	u32 top = root;
-	u32 floor = 0;
-	int ct = 0;
-
-	while (ct < nr) {
-		u32 fspace = 0;
-		u32 high;
-		u32 low;
-
-		/*
-		 * Find the largest block we will fill going upwards
-		 */
-		high = power2(mem-top);
-
-		/*
-		 * Find the largest block we will fill going downwards
-		 */
-		low = base/2;
-
-		/*
-		 * Don't fill below 1Mb going downwards as there
-		 * is an ISA hole in the way.
-		 */
-		if (base <= 1024*1024)
-			low = 0;
-
-		/*
-		 * See how much space we could cover by filling below
-		 * the ISA hole
-		 */
-
-		if (floor == 0)
-			fspace = 512*1024;
-		else if (floor == 512*1024)
-			fspace = 128*1024;
-
-		/* And forget ROM space */
-
-		/*
-		 * Now install the largest coverage we get
-		 */
-		if (fspace > high && fspace > low) {
-			centaur_mcr_insert(ct, floor, fspace, key);
-			floor += fspace;
-		} else if (high > low) {
-			centaur_mcr_insert(ct, top, high, key);
-			top += high;
-		} else if (low > 0) {
-			base -= low;
-			centaur_mcr_insert(ct, base, low, key);
-		} else
-			break;
-		ct++;
-	}
-	/*
-	 * We loaded ct values. We now need to set the mask. The caller
-	 * must do this bit.
-	 */
-	return ct;
-}
-
-static void centaur_create_optimal_mcr(void)
-{
-	int used;
-	int i;
-
-	/*
-	 * Allocate up to 6 mcrs to mark as much of ram as possible
-	 * as write combining and weak write ordered.
-	 *
-	 * To experiment with: Linux never uses stack operations for
-	 * mmio spaces so we could globally enable stack operation wc
-	 *
-	 * Load the registers with type 31 - full write combining, all
-	 * writes weakly ordered.
-	 */
-	used = centaur_mcr_compute(6, 31);
-
-	/*
-	 * Wipe unused MCRs
-	 */
-	for (i = used; i < 8; i++)
-		wrmsr(MSR_IDT_MCR0+i, 0, 0);
-}
-
-static void winchip2_create_optimal_mcr(void)
-{
-	u32 lo, hi;
-	int used;
-	int i;
-
-	/*
-	 * Allocate up to 6 mcrs to mark as much of ram as possible
-	 * as write combining, weak store ordered.
-	 *
-	 * Load the registers with type 25
-	 *	8	-	weak write ordering
-	 *	16	-	weak read ordering
-	 *	1	-	write combining
-	 */
-	used = centaur_mcr_compute(6, 25);
-
-	/*
-	 * Mark the registers we are using.
-	 */
-	rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
-	for (i = 0; i < used; i++)
-		lo |= 1<<(9+i);
-	wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
-
-	/*
-	 * Wipe unused MCRs
-	 */
-
-	for (i = used; i < 8; i++)
-		wrmsr(MSR_IDT_MCR0+i, 0, 0);
-}
-
-/*
- * Handle the MCR key on the Winchip 2.
- */
-static void winchip2_unprotect_mcr(void)
-{
-	u32 lo, hi;
-	u32 key;
-
-	rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
-	lo &= ~0x1C0;	/* blank bits 8-6 */
-	key = (lo>>17) & 7;
-	lo |= key<<6;	/* replace with unlock key */
-	wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
-}
-
-static void winchip2_protect_mcr(void)
-{
-	u32 lo, hi;
-
-	rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
-	lo &= ~0x1C0;	/* blank bits 8-6 */
-	wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
-}
-#endif /* CONFIG_X86_OOSTORE */
-
 #define ACE_PRESENT	(1 << 6)
 #define ACE_PRESENT	(1 << 6)
 #define ACE_ENABLED	(1 << 7)
 #define ACE_ENABLED	(1 << 7)
 #define ACE_FCR		(1 << 28)	/* MSR_VIA_FCR */
 #define ACE_FCR		(1 << 28)	/* MSR_VIA_FCR */
@@ -362,20 +132,6 @@ static void init_centaur(struct cpuinfo_x86 *c)
 			fcr_clr = DPDC;
 			fcr_clr = DPDC;
 			printk(KERN_NOTICE "Disabling bugged TSC.\n");
 			printk(KERN_NOTICE "Disabling bugged TSC.\n");
 			clear_cpu_cap(c, X86_FEATURE_TSC);
 			clear_cpu_cap(c, X86_FEATURE_TSC);
-#ifdef CONFIG_X86_OOSTORE
-			centaur_create_optimal_mcr();
-			/*
-			 * Enable:
-			 *	write combining on non-stack, non-string
-			 *	write combining on string, all types
-			 *	weak write ordering
-			 *
-			 * The C6 original lacks weak read order
-			 *
-			 * Note 0x120 is write only on Winchip 1
-			 */
-			wrmsr(MSR_IDT_MCR_CTRL, 0x01F0001F, 0);
-#endif
 			break;
 			break;
 		case 8:
 		case 8:
 			switch (c->x86_mask) {
 			switch (c->x86_mask) {
@@ -392,40 +148,12 @@ static void init_centaur(struct cpuinfo_x86 *c)
 			fcr_set = ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|
 			fcr_set = ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|
 				  E2MMX|EAMD3D;
 				  E2MMX|EAMD3D;
 			fcr_clr = DPDC;
 			fcr_clr = DPDC;
-#ifdef CONFIG_X86_OOSTORE
-			winchip2_unprotect_mcr();
-			winchip2_create_optimal_mcr();
-			rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
-			/*
-			 * Enable:
-			 *	write combining on non-stack, non-string
-			 *	write combining on string, all types
-			 *	weak write ordering
-			 */
-			lo |= 31;
-			wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
-			winchip2_protect_mcr();
-#endif
 			break;
 			break;
 		case 9:
 		case 9:
 			name = "3";
 			name = "3";
 			fcr_set = ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|
 			fcr_set = ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|
 				  E2MMX|EAMD3D;
 				  E2MMX|EAMD3D;
 			fcr_clr = DPDC;
 			fcr_clr = DPDC;
-#ifdef CONFIG_X86_OOSTORE
-			winchip2_unprotect_mcr();
-			winchip2_create_optimal_mcr();
-			rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
-			/*
-			 * Enable:
-			 *	write combining on non-stack, non-string
-			 *	write combining on string, all types
-			 *	weak write ordering
-			 */
-			lo |= 31;
-			wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
-			winchip2_protect_mcr();
-#endif
 			break;
 			break;
 		default:
 		default:
 			name = "??";
 			name = "??";

+ 2 - 1
arch/x86/kernel/cpu/perf_event_intel_uncore.c

@@ -3334,6 +3334,8 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
 	if (!pmus)
 	if (!pmus)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
+	type->pmus = pmus;
+
 	type->unconstrainted = (struct event_constraint)
 	type->unconstrainted = (struct event_constraint)
 		__EVENT_CONSTRAINT(0, (1ULL << type->num_counters) - 1,
 		__EVENT_CONSTRAINT(0, (1ULL << type->num_counters) - 1,
 				0, type->num_counters, 0, 0);
 				0, type->num_counters, 0, 0);
@@ -3369,7 +3371,6 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
 	}
 	}
 
 
 	type->pmu_group = &uncore_pmu_attr_group;
 	type->pmu_group = &uncore_pmu_attr_group;
-	type->pmus = pmus;
 	return 0;
 	return 0;
 fail:
 fail:
 	uncore_type_exit(type);
 	uncore_type_exit(type);

+ 6 - 1
arch/x86/kernel/head_32.S

@@ -544,6 +544,10 @@ ENDPROC(early_idt_handlers)
 	/* This is global to keep gas from relaxing the jumps */
 	/* This is global to keep gas from relaxing the jumps */
 ENTRY(early_idt_handler)
 ENTRY(early_idt_handler)
 	cld
 	cld
+
+	cmpl $2,(%esp)		# X86_TRAP_NMI
+	je is_nmi		# Ignore NMI
+
 	cmpl $2,%ss:early_recursion_flag
 	cmpl $2,%ss:early_recursion_flag
 	je hlt_loop
 	je hlt_loop
 	incl %ss:early_recursion_flag
 	incl %ss:early_recursion_flag
@@ -594,8 +598,9 @@ ex_entry:
 	pop %edx
 	pop %edx
 	pop %ecx
 	pop %ecx
 	pop %eax
 	pop %eax
-	addl $8,%esp		/* drop vector number and error code */
 	decl %ss:early_recursion_flag
 	decl %ss:early_recursion_flag
+is_nmi:
+	addl $8,%esp		/* drop vector number and error code */
 	iret
 	iret
 ENDPROC(early_idt_handler)
 ENDPROC(early_idt_handler)
 
 

+ 5 - 1
arch/x86/kernel/head_64.S

@@ -343,6 +343,9 @@ early_idt_handlers:
 ENTRY(early_idt_handler)
 ENTRY(early_idt_handler)
 	cld
 	cld
 
 
+	cmpl $2,(%rsp)		# X86_TRAP_NMI
+	je is_nmi		# Ignore NMI
+
 	cmpl $2,early_recursion_flag(%rip)
 	cmpl $2,early_recursion_flag(%rip)
 	jz  1f
 	jz  1f
 	incl early_recursion_flag(%rip)
 	incl early_recursion_flag(%rip)
@@ -405,8 +408,9 @@ ENTRY(early_idt_handler)
 	popq %rdx
 	popq %rdx
 	popq %rcx
 	popq %rcx
 	popq %rax
 	popq %rax
-	addq $16,%rsp		# drop vector number and error code
 	decl early_recursion_flag(%rip)
 	decl early_recursion_flag(%rip)
+is_nmi:
+	addq $16,%rsp		# drop vector number and error code
 	INTERRUPT_RETURN
 	INTERRUPT_RETURN
 ENDPROC(early_idt_handler)
 ENDPROC(early_idt_handler)
 
 

+ 12 - 3
arch/x86/kernel/i387.c

@@ -86,10 +86,19 @@ EXPORT_SYMBOL(__kernel_fpu_begin);
 
 
 void __kernel_fpu_end(void)
 void __kernel_fpu_end(void)
 {
 {
-	if (use_eager_fpu())
-		math_state_restore();
-	else
+	if (use_eager_fpu()) {
+		/*
+		 * For eager fpu, most the time, tsk_used_math() is true.
+		 * Restore the user math as we are done with the kernel usage.
+		 * At few instances during thread exit, signal handling etc,
+		 * tsk_used_math() is false. Those few places will take proper
+		 * actions, so we don't need to restore the math here.
+		 */
+		if (likely(tsk_used_math(current)))
+			math_state_restore();
+	} else {
 		stts();
 		stts();
+	}
 }
 }
 EXPORT_SYMBOL(__kernel_fpu_end);
 EXPORT_SYMBOL(__kernel_fpu_end);
 
 

+ 1 - 1
arch/x86/kernel/quirks.c

@@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev)
 		return;
 		return;
 
 
 	pci_read_config_dword(nb_ht, 0x60, &val);
 	pci_read_config_dword(nb_ht, 0x60, &val);
-	node = val & 7;
+	node = pcibus_to_node(dev->bus) | (val & 7);
 	/*
 	/*
 	 * Some hardware may return an invalid node ID,
 	 * Some hardware may return an invalid node ID,
 	 * so check it first:
 	 * so check it first:

+ 2 - 8
arch/x86/kernel/setup.c

@@ -1239,14 +1239,8 @@ void __init setup_arch(char **cmdline_p)
 	register_refined_jiffies(CLOCK_TICK_RATE);
 	register_refined_jiffies(CLOCK_TICK_RATE);
 
 
 #ifdef CONFIG_EFI
 #ifdef CONFIG_EFI
-	/* Once setup is done above, unmap the EFI memory map on
-	 * mismatched firmware/kernel archtectures since there is no
-	 * support for runtime services.
-	 */
-	if (efi_enabled(EFI_BOOT) && !efi_is_native()) {
-		pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
-		efi_unmap_memmap();
-	}
+	if (efi_enabled(EFI_BOOT))
+		efi_apply_memmap_quirks();
 #endif
 #endif
 }
 }
 
 

+ 3 - 3
arch/x86/kvm/svm.c

@@ -3002,10 +3002,8 @@ static int cr8_write_interception(struct vcpu_svm *svm)
 	u8 cr8_prev = kvm_get_cr8(&svm->vcpu);
 	u8 cr8_prev = kvm_get_cr8(&svm->vcpu);
 	/* instruction emulation calls kvm_set_cr8() */
 	/* instruction emulation calls kvm_set_cr8() */
 	r = cr_interception(svm);
 	r = cr_interception(svm);
-	if (irqchip_in_kernel(svm->vcpu.kvm)) {
-		clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);
+	if (irqchip_in_kernel(svm->vcpu.kvm))
 		return r;
 		return r;
-	}
 	if (cr8_prev <= kvm_get_cr8(&svm->vcpu))
 	if (cr8_prev <= kvm_get_cr8(&svm->vcpu))
 		return r;
 		return r;
 	kvm_run->exit_reason = KVM_EXIT_SET_TPR;
 	kvm_run->exit_reason = KVM_EXIT_SET_TPR;
@@ -3567,6 +3565,8 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr)
 	if (is_guest_mode(vcpu) && (vcpu->arch.hflags & HF_VINTR_MASK))
 	if (is_guest_mode(vcpu) && (vcpu->arch.hflags & HF_VINTR_MASK))
 		return;
 		return;
 
 
+	clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);
+
 	if (irr == -1)
 	if (irr == -1)
 		return;
 		return;
 
 

Some files were not shown because too many files changed in this diff