Browse Source

Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux

Merging 4.10-rc3 so that the cryptodev tree builds on ARM64.
Herbert Xu 8 years ago
parent
commit
4cf0662888
100 changed files with 637 additions and 433 deletions
  1. 1 1
      Documentation/DocBook/Makefile
  2. 12 1
      Documentation/admin-guide/kernel-parameters.txt
  3. 3 3
      Documentation/block/queue-sysfs.txt
  4. 3 1
      Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt
  5. 6 1
      Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
  6. 0 15
      Documentation/driver-api/infrastructure.rst
  7. 2 2
      Documentation/networking/mpls-sysctl.txt
  8. 1 1
      Documentation/unaligned-memory-access.txt
  9. 15 12
      Documentation/vfio-mediated-device.txt
  10. 16 6
      MAINTAINERS
  11. 1 1
      Makefile
  12. 1 2
      arch/arm/Kconfig
  13. 1 0
      arch/arm/boot/dts/Makefile
  14. 3 5
      arch/arm/boot/dts/am335x-bone-common.dtsi
  15. 1 0
      arch/arm/boot/dts/am33xx.dtsi
  16. 1 0
      arch/arm/boot/dts/am4372.dtsi
  17. 5 5
      arch/arm/boot/dts/am571x-idk.dts
  18. 9 5
      arch/arm/boot/dts/am572x-idk.dts
  19. 8 1
      arch/arm/boot/dts/am57xx-idk-common.dtsi
  20. 1 0
      arch/arm/boot/dts/dm814x.dtsi
  21. 1 0
      arch/arm/boot/dts/dm816x.dtsi
  22. 1 0
      arch/arm/boot/dts/dra7.dtsi
  23. 16 0
      arch/arm/boot/dts/dra72-evm-tps65917.dtsi
  24. 2 2
      arch/arm/boot/dts/imx31.dtsi
  25. 0 1
      arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
  26. 1 0
      arch/arm/boot/dts/imx6qdl.dtsi
  27. 1 0
      arch/arm/boot/dts/imx6sl.dtsi
  28. 1 0
      arch/arm/boot/dts/imx6sx.dtsi
  29. 1 0
      arch/arm/boot/dts/omap2.dtsi
  30. 2 0
      arch/arm/boot/dts/omap3-n900.dts
  31. 1 0
      arch/arm/boot/dts/omap3.dtsi
  32. 1 0
      arch/arm/boot/dts/omap4.dtsi
  33. 1 0
      arch/arm/boot/dts/omap5.dtsi
  34. 4 0
      arch/arm/boot/dts/qcom-apq8064.dtsi
  35. 1 1
      arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts
  36. 1 1
      arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
  37. 2 1
      arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
  38. 6 6
      arch/arm/mach-davinci/clock.c
  39. 2 0
      arch/arm/mach-davinci/clock.h
  40. 30 2
      arch/arm/mach-davinci/da850.c
  41. 15 19
      arch/arm/mach-davinci/usb-da8xx.c
  42. 0 31
      arch/arm/mach-exynos/platsmp.c
  43. 0 1
      arch/arm/mach-imx/mach-imx1.c
  44. 1 1
      arch/arm/mach-omap2/Makefile
  45. 1 1
      arch/arm/mach-omap2/board-generic.c
  46. 0 160
      arch/arm/mach-omap2/gpio.c
  47. 4 4
      arch/arm/mach-omap2/omap_hwmod.c
  48. 0 4
      arch/arm/mach-omap2/omap_hwmod_common_data.h
  49. 1 3
      arch/arm/mach-omap2/prm_common.c
  50. 5 4
      arch/arm/mach-omap2/timer.c
  51. 76 0
      arch/arm/mach-s3c24xx/common.c
  52. 16 0
      arch/arm64/boot/dts/amlogic/meson-gx.dtsi
  53. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
  54. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
  55. 4 0
      arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
  56. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxl-nexbox-a95x.dts
  57. 5 1
      arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
  58. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
  59. 4 0
      arch/arm64/boot/dts/amlogic/meson-gxm.dtsi
  60. 1 1
      arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
  61. 10 0
      arch/arm64/boot/dts/qcom/msm8996.dtsi
  62. 1 1
      arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
  63. 1 0
      arch/arm64/configs/defconfig
  64. 65 0
      arch/arm64/include/asm/asm-uaccess.h
  65. 9 1
      arch/arm64/include/asm/current.h
  66. 0 64
      arch/arm64/include/asm/uaccess.h
  67. 1 1
      arch/arm64/kernel/entry.S
  68. 1 1
      arch/arm64/lib/clear_user.S
  69. 1 1
      arch/arm64/lib/copy_from_user.S
  70. 1 1
      arch/arm64/lib/copy_in_user.S
  71. 1 1
      arch/arm64/lib/copy_to_user.S
  72. 1 1
      arch/arm64/mm/cache.S
  73. 2 1
      arch/arm64/mm/dma-mapping.c
  74. 4 4
      arch/arm64/mm/fault.c
  75. 2 1
      arch/arm64/mm/init.c
  76. 1 1
      arch/arm64/xen/hypercall.S
  77. 4 1
      arch/mips/kvm/entry.c
  78. 2 2
      arch/mips/kvm/mips.c
  79. 2 0
      arch/openrisc/kernel/vmlinux.lds.S
  80. 0 1
      arch/parisc/include/asm/thread_info.h
  81. 20 3
      arch/parisc/kernel/time.c
  82. 1 1
      arch/parisc/mm/fault.c
  83. 8 0
      arch/s390/include/asm/asm-prototypes.h
  84. 4 4
      arch/s390/kernel/vtime.c
  85. 13 0
      arch/x86/include/asm/bitops.h
  86. 3 0
      arch/x86/kernel/cpu/mcheck/mce_amd.c
  87. 2 4
      arch/x86/kernel/pci-swiotlb.c
  88. 4 10
      arch/x86/kvm/vmx.c
  89. 7 2
      arch/x86/kvm/x86.c
  90. 1 1
      arch/x86/xen/pci-swiotlb-xen.c
  91. 3 3
      arch/x86/xen/setup.c
  92. 7 6
      block/blk-wbt.c
  93. 1 1
      drivers/acpi/acpi_watchdog.c
  94. 9 2
      drivers/acpi/glue.c
  95. 1 0
      drivers/acpi/internal.h
  96. 1 0
      drivers/acpi/scan.c
  97. 56 0
      drivers/acpi/sysfs.c
  98. 1 0
      drivers/base/power/domain.c
  99. 2 2
      drivers/clk/clk-stm32f4.c
  100. 22 5
      drivers/clk/renesas/clk-mstp.c

+ 1 - 1
Documentation/DocBook/Makefile

@@ -12,7 +12,7 @@ DOCBOOKS := z8530book.xml  \
 	    kernel-api.xml filesystems.xml lsm.xml kgdb.xml \
 	    kernel-api.xml filesystems.xml lsm.xml kgdb.xml \
 	    gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
 	    gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
 	    genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
 	    genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
-	    80211.xml sh.xml regulator.xml w1.xml \
+	    sh.xml regulator.xml w1.xml \
 	    writing_musb_glue_layer.xml iio.xml
 	    writing_musb_glue_layer.xml iio.xml
 
 
 ifeq ($(DOCBOOKS),)
 ifeq ($(DOCBOOKS),)

+ 12 - 1
Documentation/admin-guide/kernel-parameters.txt

@@ -106,6 +106,16 @@
 			use by PCI
 			use by PCI
 			Format: <irq>,<irq>...
 			Format: <irq>,<irq>...
 
 
+	acpi_mask_gpe=  [HW,ACPI]
+			Due to the existence of _Lxx/_Exx, some GPEs triggered
+			by unsupported hardware/firmware features can result in
+                        GPE floodings that cannot be automatically disabled by
+                        the GPE dispatcher.
+			This facility can be used to prevent such uncontrolled
+			GPE floodings.
+			Format: <int>
+			Support masking of GPEs numbered from 0x00 to 0x7f.
+
 	acpi_no_auto_serialize	[HW,ACPI]
 	acpi_no_auto_serialize	[HW,ACPI]
 			Disable auto-serialization of AML methods
 			Disable auto-serialization of AML methods
 			AML control methods that contain the opcodes to create
 			AML control methods that contain the opcodes to create
@@ -3811,10 +3821,11 @@
 			it if 0 is given (See Documentation/cgroup-v1/memory.txt)
 			it if 0 is given (See Documentation/cgroup-v1/memory.txt)
 
 
 	swiotlb=	[ARM,IA-64,PPC,MIPS,X86]
 	swiotlb=	[ARM,IA-64,PPC,MIPS,X86]
-			Format: { <int> | force }
+			Format: { <int> | force | noforce }
 			<int> -- Number of I/O TLB slabs
 			<int> -- Number of I/O TLB slabs
 			force -- force using of bounce buffers even if they
 			force -- force using of bounce buffers even if they
 			         wouldn't be automatically used by the kernel
 			         wouldn't be automatically used by the kernel
+			noforce -- Never use bounce buffers (for debugging)
 
 
 	switches=	[HW,M68k]
 	switches=	[HW,M68k]
 
 

+ 3 - 3
Documentation/block/queue-sysfs.txt

@@ -54,9 +54,9 @@ This is the hardware sector size of the device, in bytes.
 
 
 io_poll (RW)
 io_poll (RW)
 ------------
 ------------
-When read, this file shows the total number of block IO polls and how
-many returned success.  Writing '0' to this file will disable polling
-for this device.  Writing any non-zero value will enable this feature.
+When read, this file shows whether polling is enabled (1) or disabled
+(0).  Writing '0' to this file will disable polling for this device.
+Writing any non-zero value will enable this feature.
 
 
 io_poll_delay (RW)
 io_poll_delay (RW)
 ------------------
 ------------------

+ 3 - 1
Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt

@@ -8,8 +8,9 @@ This driver provides a simple power button event via an Interrupt.
 Required properties:
 Required properties:
 - compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"
 - compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"
 
 
-Required properties for TPS65218:
+Required properties:
 - interrupts: should be one of the following
 - interrupts: should be one of the following
+   - <2>: For controllers compatible with tps65217
    - <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218
    - <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218
 
 
 Examples:
 Examples:
@@ -17,6 +18,7 @@ Examples:
 &tps {
 &tps {
 	tps65217-pwrbutton {
 	tps65217-pwrbutton {
 		compatible = "ti,tps65217-pwrbutton";
 		compatible = "ti,tps65217-pwrbutton";
+		interrupts = <2>;
 	};
 	};
 };
 };
 
 

+ 6 - 1
Documentation/devicetree/bindings/power/supply/tps65217_charger.txt

@@ -2,11 +2,16 @@ TPS65217 Charger
 
 
 Required Properties:
 Required Properties:
 -compatible: "ti,tps65217-charger"
 -compatible: "ti,tps65217-charger"
+-interrupts: TPS65217 interrupt numbers for the AC and USB charger input change.
+             Should be <0> for the USB charger and <1> for the AC adapter.
+-interrupt-names: Should be "USB" and "AC"
 
 
 This node is a subnode of the tps65217 PMIC.
 This node is a subnode of the tps65217 PMIC.
 
 
 Example:
 Example:
 
 
 	tps65217-charger {
 	tps65217-charger {
-		compatible = "ti,tps65090-charger";
+		compatible = "ti,tps65217-charger";
+		interrupts = <0>, <1>;
+		interrupt-names = "USB", "AC";
 	};
 	};

+ 0 - 15
Documentation/driver-api/infrastructure.rst

@@ -55,21 +55,6 @@ Device Drivers DMA Management
 .. kernel-doc:: drivers/base/dma-mapping.c
 .. kernel-doc:: drivers/base/dma-mapping.c
    :export:
    :export:
 
 
-Device Drivers Power Management
--------------------------------
-
-.. kernel-doc:: drivers/base/power/main.c
-   :export:
-
-Device Drivers ACPI Support
----------------------------
-
-.. kernel-doc:: drivers/acpi/scan.c
-   :export:
-
-.. kernel-doc:: drivers/acpi/scan.c
-   :internal:
-
 Device drivers PnP support
 Device drivers PnP support
 --------------------------
 --------------------------
 
 

+ 2 - 2
Documentation/networking/mpls-sysctl.txt

@@ -5,8 +5,8 @@ platform_labels - INTEGER
 	possible to configure forwarding for label values equal to or
 	possible to configure forwarding for label values equal to or
 	greater than the number of platform labels.
 	greater than the number of platform labels.
 
 
-	A dense utliziation of the entries in the platform label table
-	is possible and expected aas the platform labels are locally
+	A dense utilization of the entries in the platform label table
+	is possible and expected as the platform labels are locally
 	allocated.
 	allocated.
 
 
 	If the number of platform label table entries is set to 0 no
 	If the number of platform label table entries is set to 0 no

+ 1 - 1
Documentation/unaligned-memory-access.txt

@@ -151,7 +151,7 @@ bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
 #else
 #else
 	const u16 *a = (const u16 *)addr1;
 	const u16 *a = (const u16 *)addr1;
 	const u16 *b = (const u16 *)addr2;
 	const u16 *b = (const u16 *)addr2;
-	return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
+	return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0;
 #endif
 #endif
 }
 }
 
 

+ 15 - 12
Documentation/vfio-mediated-device.txt

@@ -127,22 +127,22 @@ the VFIO when devices are unbound from the driver.
 Physical Device Driver Interface
 Physical Device Driver Interface
 --------------------------------
 --------------------------------
 
 
-The physical device driver interface provides the parent_ops[3] structure to
-define the APIs to manage work in the mediated core driver that is related to
-the physical device.
+The physical device driver interface provides the mdev_parent_ops[3] structure
+to define the APIs to manage work in the mediated core driver that is related
+to the physical device.
 
 
-The structures in the parent_ops structure are as follows:
+The structures in the mdev_parent_ops structure are as follows:
 
 
 * dev_attr_groups: attributes of the parent device
 * dev_attr_groups: attributes of the parent device
 * mdev_attr_groups: attributes of the mediated device
 * mdev_attr_groups: attributes of the mediated device
 * supported_config: attributes to define supported configurations
 * supported_config: attributes to define supported configurations
 
 
-The functions in the parent_ops structure are as follows:
+The functions in the mdev_parent_ops structure are as follows:
 
 
 * create: allocate basic resources in a driver for a mediated device
 * create: allocate basic resources in a driver for a mediated device
 * remove: free resources in a driver when a mediated device is destroyed
 * remove: free resources in a driver when a mediated device is destroyed
 
 
-The callbacks in the parent_ops structure are as follows:
+The callbacks in the mdev_parent_ops structure are as follows:
 
 
 * open: open callback of mediated device
 * open: open callback of mediated device
 * close: close callback of mediated device
 * close: close callback of mediated device
@@ -151,14 +151,14 @@ The callbacks in the parent_ops structure are as follows:
 * write: write emulation callback
 * write: write emulation callback
 * mmap: mmap emulation callback
 * mmap: mmap emulation callback
 
 
-A driver should use the parent_ops structure in the function call to register
-itself with the mdev core driver:
+A driver should use the mdev_parent_ops structure in the function call to
+register itself with the mdev core driver:
 
 
 extern int  mdev_register_device(struct device *dev,
 extern int  mdev_register_device(struct device *dev,
-                                 const struct parent_ops *ops);
+                                 const struct mdev_parent_ops *ops);
 
 
-However, the parent_ops structure is not required in the function call that a
-driver should use to unregister itself with the mdev core driver:
+However, the mdev_parent_ops structure is not required in the function call
+that a driver should use to unregister itself with the mdev core driver:
 
 
 extern void mdev_unregister_device(struct device *dev);
 extern void mdev_unregister_device(struct device *dev);
 
 
@@ -223,6 +223,9 @@ Directories and files under the sysfs for Each Physical Device
 
 
 	sprintf(buf, "%s-%s", dev_driver_string(parent->dev), group->name);
 	sprintf(buf, "%s-%s", dev_driver_string(parent->dev), group->name);
 
 
+  (or using mdev_parent_dev(mdev) to arrive at the parent device outside
+   of the core mdev code)
+
 * device_api
 * device_api
 
 
   This attribute should show which device API is being created, for example,
   This attribute should show which device API is being created, for example,
@@ -394,5 +397,5 @@ References
 
 
 [1] See Documentation/vfio.txt for more information on VFIO.
 [1] See Documentation/vfio.txt for more information on VFIO.
 [2] struct mdev_driver in include/linux/mdev.h
 [2] struct mdev_driver in include/linux/mdev.h
-[3] struct parent_ops in include/linux/mdev.h
+[3] struct mdev_parent_ops in include/linux/mdev.h
 [4] struct vfio_iommu_driver_ops in include/linux/vfio.h
 [4] struct vfio_iommu_driver_ops in include/linux/vfio.h

+ 16 - 6
MAINTAINERS

@@ -3800,6 +3800,7 @@ F:	include/linux/devcoredump.h
 DEVICE FREQUENCY (DEVFREQ)
 DEVICE FREQUENCY (DEVFREQ)
 M:	MyungJoo Ham <myungjoo.ham@samsung.com>
 M:	MyungJoo Ham <myungjoo.ham@samsung.com>
 M:	Kyungmin Park <kyungmin.park@samsung.com>
 M:	Kyungmin Park <kyungmin.park@samsung.com>
+R:	Chanwoo Choi <cw00.choi@samsung.com>
 L:	linux-pm@vger.kernel.org
 L:	linux-pm@vger.kernel.org
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git
 S:	Maintained
 S:	Maintained
@@ -5080,9 +5081,11 @@ F:	drivers/net/wan/dlci.c
 F:	drivers/net/wan/sdla.c
 F:	drivers/net/wan/sdla.c
 
 
 FRAMEBUFFER LAYER
 FRAMEBUFFER LAYER
+M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-fbdev@vger.kernel.org
 L:	linux-fbdev@vger.kernel.org
+T:	git git://github.com/bzolnier/linux.git
 Q:	http://patchwork.kernel.org/project/linux-fbdev/list/
 Q:	http://patchwork.kernel.org/project/linux-fbdev/list/
-S:	Orphan
+S:	Maintained
 F:	Documentation/fb/
 F:	Documentation/fb/
 F:	drivers/video/
 F:	drivers/video/
 F:	include/video/
 F:	include/video/
@@ -5504,6 +5507,7 @@ M:	Alex Elder <elder@kernel.org>
 M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 S:	Maintained
 S:	Maintained
 F:	drivers/staging/greybus/
 F:	drivers/staging/greybus/
+L:	greybus-dev@lists.linaro.org
 
 
 GREYBUS AUDIO PROTOCOLS DRIVERS
 GREYBUS AUDIO PROTOCOLS DRIVERS
 M:	Vaibhav Agarwal <vaibhav.sr@gmail.com>
 M:	Vaibhav Agarwal <vaibhav.sr@gmail.com>
@@ -5961,6 +5965,7 @@ F:	drivers/media/platform/sti/hva
 Hyper-V CORE AND DRIVERS
 Hyper-V CORE AND DRIVERS
 M:	"K. Y. Srinivasan" <kys@microsoft.com>
 M:	"K. Y. Srinivasan" <kys@microsoft.com>
 M:	Haiyang Zhang <haiyangz@microsoft.com>
 M:	Haiyang Zhang <haiyangz@microsoft.com>
+M:	Stephen Hemminger <sthemmin@microsoft.com>
 L:	devel@linuxdriverproject.org
 L:	devel@linuxdriverproject.org
 S:	Maintained
 S:	Maintained
 F:	arch/x86/include/asm/mshyperv.h
 F:	arch/x86/include/asm/mshyperv.h
@@ -8852,17 +8857,22 @@ F:	drivers/video/fbdev/nvidia/
 NVM EXPRESS DRIVER
 NVM EXPRESS DRIVER
 M:	Keith Busch <keith.busch@intel.com>
 M:	Keith Busch <keith.busch@intel.com>
 M:	Jens Axboe <axboe@fb.com>
 M:	Jens Axboe <axboe@fb.com>
+M:	Christoph Hellwig <hch@lst.de>
+M:	Sagi Grimberg <sagi@grimberg.me>
 L:	linux-nvme@lists.infradead.org
 L:	linux-nvme@lists.infradead.org
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
-W:	https://kernel.googlesource.com/pub/scm/linux/kernel/git/axboe/linux-block/
+T:	git://git.infradead.org/nvme.git
+W:	http://git.infradead.org/nvme.git
 S:	Supported
 S:	Supported
 F:	drivers/nvme/host/
 F:	drivers/nvme/host/
 F:	include/linux/nvme.h
 F:	include/linux/nvme.h
+F:	include/uapi/linux/nvme_ioctl.h
 
 
 NVM EXPRESS TARGET DRIVER
 NVM EXPRESS TARGET DRIVER
 M:	Christoph Hellwig <hch@lst.de>
 M:	Christoph Hellwig <hch@lst.de>
 M:	Sagi Grimberg <sagi@grimberg.me>
 M:	Sagi Grimberg <sagi@grimberg.me>
 L:	linux-nvme@lists.infradead.org
 L:	linux-nvme@lists.infradead.org
+T:	git://git.infradead.org/nvme.git
+W:	http://git.infradead.org/nvme.git
 S:	Supported
 S:	Supported
 F:	drivers/nvme/target/
 F:	drivers/nvme/target/
 
 
@@ -9842,7 +9852,7 @@ M:	Mark Rutland <mark.rutland@arm.com>
 M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 L:	linux-arm-kernel@lists.infradead.org
 L:	linux-arm-kernel@lists.infradead.org
 S:	Maintained
 S:	Maintained
-F:	drivers/firmware/psci.c
+F:	drivers/firmware/psci*.c
 F:	include/linux/psci.h
 F:	include/linux/psci.h
 F:	include/uapi/linux/psci.h
 F:	include/uapi/linux/psci.h
 
 
@@ -13527,11 +13537,11 @@ F:	arch/x86/xen/*swiotlb*
 F:	drivers/xen/*swiotlb*
 F:	drivers/xen/*swiotlb*
 
 
 XFS FILESYSTEM
 XFS FILESYSTEM
-M:	Dave Chinner <david@fromorbit.com>
+M:	Darrick J. Wong <darrick.wong@oracle.com>
 M:	linux-xfs@vger.kernel.org
 M:	linux-xfs@vger.kernel.org
 L:	linux-xfs@vger.kernel.org
 L:	linux-xfs@vger.kernel.org
 W:	http://xfs.org/
 W:	http://xfs.org/
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git
+T:	git git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git
 S:	Supported
 S:	Supported
 F:	Documentation/filesystems/xfs.txt
 F:	Documentation/filesystems/xfs.txt
 F:	fs/xfs/
 F:	fs/xfs/

+ 1 - 1
Makefile

@@ -1,7 +1,7 @@
 VERSION = 4
 VERSION = 4
 PATCHLEVEL = 10
 PATCHLEVEL = 10
 SUBLEVEL = 0
 SUBLEVEL = 0
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc3
 NAME = Roaring Lionus
 NAME = Roaring Lionus
 
 
 # *DOCUMENTATION*
 # *DOCUMENTATION*

+ 1 - 2
arch/arm/Kconfig

@@ -1502,8 +1502,7 @@ source kernel/Kconfig.preempt
 
 
 config HZ_FIXED
 config HZ_FIXED
 	int
 	int
-	default 200 if ARCH_EBSA110 || ARCH_S3C24XX || \
-		ARCH_S5PV210 || ARCH_EXYNOS4
+	default 200 if ARCH_EBSA110
 	default 128 if SOC_AT91RM9200
 	default 128 if SOC_AT91RM9200
 	default 0
 	default 0
 
 

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

@@ -501,6 +501,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
 	am3517-evm.dtb \
 	am3517-evm.dtb \
 	am3517_mt_ventoux.dtb \
 	am3517_mt_ventoux.dtb \
 	logicpd-torpedo-37xx-devkit.dtb \
 	logicpd-torpedo-37xx-devkit.dtb \
+	logicpd-som-lv-37xx-devkit.dtb \
 	omap3430-sdp.dtb \
 	omap3430-sdp.dtb \
 	omap3-beagle.dtb \
 	omap3-beagle.dtb \
 	omap3-beagle-xm.dtb \
 	omap3-beagle-xm.dtb \

+ 3 - 5
arch/arm/boot/dts/am335x-bone-common.dtsi

@@ -6,8 +6,6 @@
  * published by the Free Software Foundation.
  * published by the Free Software Foundation.
  */
  */
 
 
-#include <dt-bindings/mfd/tps65217.h>
-
 / {
 / {
 	cpus {
 	cpus {
 		cpu@0 {
 		cpu@0 {
@@ -319,13 +317,13 @@
 	ti,pmic-shutdown-controller;
 	ti,pmic-shutdown-controller;
 
 
 	charger {
 	charger {
-		interrupts = <TPS65217_IRQ_AC>, <TPS65217_IRQ_USB>;
-		interrupts-names = "AC", "USB";
+		interrupts = <0>, <1>;
+		interrupt-names = "USB", "AC";
 		status = "okay";
 		status = "okay";
 	};
 	};
 
 
 	pwrbutton {
 	pwrbutton {
-		interrupts = <TPS65217_IRQ_PB>;
+		interrupts = <2>;
 		status = "okay";
 		status = "okay";
 	};
 	};
 
 

+ 1 - 0
arch/arm/boot/dts/am33xx.dtsi

@@ -16,6 +16,7 @@
 	interrupt-parent = <&intc>;
 	interrupt-parent = <&intc>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c0;
 		i2c0 = &i2c0;

+ 1 - 0
arch/arm/boot/dts/am4372.dtsi

@@ -16,6 +16,7 @@
 	interrupt-parent = <&wakeupgen>;
 	interrupt-parent = <&wakeupgen>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	memory@0 {
 	memory@0 {
 		device_type = "memory";
 		device_type = "memory";

+ 5 - 5
arch/arm/boot/dts/am571x-idk.dts

@@ -62,11 +62,6 @@
 			linux,default-trigger = "mmc0";
 			linux,default-trigger = "mmc0";
 		};
 		};
 	};
 	};
-
-	extcon_usb2: extcon_usb2 {
-	     compatible = "linux,extcon-usb-gpio";
-	     id-gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
-	};
 };
 };
 
 
 &mmc1 {
 &mmc1 {
@@ -79,3 +74,8 @@
 &omap_dwc3_2 {
 &omap_dwc3_2 {
 	extcon = <&extcon_usb2>;
 	extcon = <&extcon_usb2>;
 };
 };
+
+&extcon_usb2 {
+	id-gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
+	vbus-gpio = <&gpio7 22 GPIO_ACTIVE_HIGH>;
+};

+ 9 - 5
arch/arm/boot/dts/am572x-idk.dts

@@ -23,11 +23,6 @@
 		reg = <0x0 0x80000000 0x0 0x80000000>;
 		reg = <0x0 0x80000000 0x0 0x80000000>;
 	};
 	};
 
 
-	extcon_usb2: extcon_usb2 {
-		compatible = "linux,extcon-usb-gpio";
-		id-gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>;
-	};
-
 	status-leds {
 	status-leds {
 		compatible = "gpio-leds";
 		compatible = "gpio-leds";
 		cpu0-led {
 		cpu0-led {
@@ -76,6 +71,11 @@
 	extcon = <&extcon_usb2>;
 	extcon = <&extcon_usb2>;
 };
 };
 
 
+&extcon_usb2 {
+	id-gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+	vbus-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>;
+};
+
 &mmc1 {
 &mmc1 {
 	status = "okay";
 	status = "okay";
 	vmmc-supply = <&v3_3d>;
 	vmmc-supply = <&v3_3d>;
@@ -87,3 +87,7 @@
 &sn65hvs882 {
 &sn65hvs882 {
 	load-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
 	load-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
 };
 };
+
+&pcie1 {
+	gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
+};

+ 8 - 1
arch/arm/boot/dts/am57xx-idk-common.dtsi

@@ -303,6 +303,13 @@
 			gpio-controller;
 			gpio-controller;
 			#gpio-cells = <2>;
 			#gpio-cells = <2>;
 		};
 		};
+
+		extcon_usb2: tps659038_usb {
+			compatible = "ti,palmas-usb-vid";
+			ti,enable-vbus-detection;
+			ti,enable-id-detection;
+			/* ID & VBUS GPIOs provided in board dts */
+		};
 	};
 	};
 };
 };
 
 
@@ -369,7 +376,7 @@
 };
 };
 
 
 &usb2 {
 &usb2 {
-	dr_mode = "otg";
+	dr_mode = "peripheral";
 };
 };
 
 
 &mmc2 {
 &mmc2 {

+ 1 - 0
arch/arm/boot/dts/dm814x.dtsi

@@ -12,6 +12,7 @@
 	interrupt-parent = <&intc>;
 	interrupt-parent = <&intc>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c1;
 		i2c0 = &i2c1;

+ 1 - 0
arch/arm/boot/dts/dm816x.dtsi

@@ -12,6 +12,7 @@
 	interrupt-parent = <&intc>;
 	interrupt-parent = <&intc>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c1;
 		i2c0 = &i2c1;

+ 1 - 0
arch/arm/boot/dts/dra7.dtsi

@@ -18,6 +18,7 @@
 
 
 	compatible = "ti,dra7xx";
 	compatible = "ti,dra7xx";
 	interrupt-parent = <&crossbar_mpu>;
 	interrupt-parent = <&crossbar_mpu>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c1;
 		i2c0 = &i2c1;

+ 16 - 0
arch/arm/boot/dts/dra72-evm-tps65917.dtsi

@@ -132,3 +132,19 @@
 		ti,palmas-long-press-seconds = <6>;
 		ti,palmas-long-press-seconds = <6>;
 	};
 	};
 };
 };
+
+&usb2_phy1 {
+	phy-supply = <&ldo4_reg>;
+};
+
+&usb2_phy2 {
+	phy-supply = <&ldo4_reg>;
+};
+
+&dss {
+	vdda_video-supply = <&ldo5_reg>;
+};
+
+&mmc1 {
+	vmmc_aux-supply = <&ldo1_reg>;
+};

+ 2 - 2
arch/arm/boot/dts/imx31.dtsi

@@ -31,11 +31,11 @@
 		};
 		};
 	};
 	};
 
 
-	avic: avic-interrupt-controller@60000000 {
+	avic: interrupt-controller@68000000 {
 		compatible = "fsl,imx31-avic", "fsl,avic";
 		compatible = "fsl,imx31-avic", "fsl,avic";
 		interrupt-controller;
 		interrupt-controller;
 		#interrupt-cells = <1>;
 		#interrupt-cells = <1>;
-		reg = <0x60000000 0x100000>;
+		reg = <0x68000000 0x100000>;
 	};
 	};
 
 
 	soc {
 	soc {

+ 0 - 1
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi

@@ -533,7 +533,6 @@
 				MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x17071
 				MX6QDL_PAD_SD2_DAT1__SD2_DATA1		0x17071
 				MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x17071
 				MX6QDL_PAD_SD2_DAT2__SD2_DATA2		0x17071
 				MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x17071
 				MX6QDL_PAD_SD2_DAT3__SD2_DATA3		0x17071
-				MX6QDL_PAD_NANDF_CS2__GPIO6_IO15	0x000b0
 			>;
 			>;
 		};
 		};
 
 

+ 1 - 0
arch/arm/boot/dts/imx6qdl.dtsi

@@ -1100,6 +1100,7 @@
 				interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
 				interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6QDL_CLK_EIM_SLOW>;
 				clocks = <&clks IMX6QDL_CLK_EIM_SLOW>;
 				fsl,weim-cs-gpr = <&gpr>;
 				fsl,weim-cs-gpr = <&gpr>;
+				status = "disabled";
 			};
 			};
 
 
 			ocotp: ocotp@021bc000 {
 			ocotp: ocotp@021bc000 {

+ 1 - 0
arch/arm/boot/dts/imx6sl.dtsi

@@ -900,6 +900,7 @@
 				reg = <0x021b8000 0x4000>;
 				reg = <0x021b8000 0x4000>;
 				interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
 				interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
 				fsl,weim-cs-gpr = <&gpr>;
 				fsl,weim-cs-gpr = <&gpr>;
+				status = "disabled";
 			};
 			};
 
 
 			ocotp: ocotp@021bc000 {
 			ocotp: ocotp@021bc000 {

+ 1 - 0
arch/arm/boot/dts/imx6sx.dtsi

@@ -977,6 +977,7 @@
 				interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
 				interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SX_CLK_EIM_SLOW>;
 				clocks = <&clks IMX6SX_CLK_EIM_SLOW>;
 				fsl,weim-cs-gpr = <&gpr>;
 				fsl,weim-cs-gpr = <&gpr>;
+				status = "disabled";
 			};
 			};
 
 
 			ocotp: ocotp@021bc000 {
 			ocotp: ocotp@021bc000 {

+ 1 - 0
arch/arm/boot/dts/omap2.dtsi

@@ -17,6 +17,7 @@
 	interrupt-parent = <&intc>;
 	interrupt-parent = <&intc>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		serial0 = &uart1;
 		serial0 = &uart1;

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

@@ -734,6 +734,8 @@
 	vmmc_aux-supply = <&vsim>;
 	vmmc_aux-supply = <&vsim>;
 	bus-width = <8>;
 	bus-width = <8>;
 	non-removable;
 	non-removable;
+	no-sdio;
+	no-sd;
 };
 };
 
 
 &mmc3 {
 &mmc3 {

+ 1 - 0
arch/arm/boot/dts/omap3.dtsi

@@ -17,6 +17,7 @@
 	interrupt-parent = <&intc>;
 	interrupt-parent = <&intc>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c1;
 		i2c0 = &i2c1;

+ 1 - 0
arch/arm/boot/dts/omap4.dtsi

@@ -15,6 +15,7 @@
 	interrupt-parent = <&wakeupgen>;
 	interrupt-parent = <&wakeupgen>;
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c1;
 		i2c0 = &i2c1;

+ 1 - 0
arch/arm/boot/dts/omap5.dtsi

@@ -17,6 +17,7 @@
 
 
 	compatible = "ti,omap5";
 	compatible = "ti,omap5";
 	interrupt-parent = <&wakeupgen>;
 	interrupt-parent = <&wakeupgen>;
+	chosen { };
 
 
 	aliases {
 	aliases {
 		i2c0 = &i2c1;
 		i2c0 = &i2c1;

+ 4 - 0
arch/arm/boot/dts/qcom-apq8064.dtsi

@@ -4,6 +4,7 @@
 #include <dt-bindings/clock/qcom,gcc-msm8960.h>
 #include <dt-bindings/clock/qcom,gcc-msm8960.h>
 #include <dt-bindings/reset/qcom,gcc-msm8960.h>
 #include <dt-bindings/reset/qcom,gcc-msm8960.h>
 #include <dt-bindings/clock/qcom,mmcc-msm8960.h>
 #include <dt-bindings/clock/qcom,mmcc-msm8960.h>
+#include <dt-bindings/clock/qcom,rpmcc.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -303,6 +304,9 @@
 	firmware {
 	firmware {
 		scm {
 		scm {
 			compatible = "qcom,scm-apq8064";
 			compatible = "qcom,scm-apq8064";
+
+			clocks = <&rpmcc RPM_DAYTONA_FABRIC_CLK>;
+			clock-names = "core";
 		};
 		};
 	};
 	};
 
 

+ 1 - 1
arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts

@@ -81,7 +81,7 @@
 		#address-cells = <0>;
 		#address-cells = <0>;
 		interrupt-controller;
 		interrupt-controller;
 		reg = <0 0x2c001000 0 0x1000>,
 		reg = <0 0x2c001000 0 0x1000>,
-		      <0 0x2c002000 0 0x1000>,
+		      <0 0x2c002000 0 0x2000>,
 		      <0 0x2c004000 0 0x2000>,
 		      <0 0x2c004000 0 0x2000>,
 		      <0 0x2c006000 0 0x2000>;
 		      <0 0x2c006000 0 0x2000>;
 		interrupts = <1 9 0xf04>;
 		interrupts = <1 9 0xf04>;

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

@@ -131,7 +131,7 @@
 		#address-cells = <0>;
 		#address-cells = <0>;
 		interrupt-controller;
 		interrupt-controller;
 		reg = <0 0x2c001000 0 0x1000>,
 		reg = <0 0x2c001000 0 0x1000>,
-		      <0 0x2c002000 0 0x1000>,
+		      <0 0x2c002000 0 0x2000>,
 		      <0 0x2c004000 0 0x2000>,
 		      <0 0x2c004000 0 0x2000>,
 		      <0 0x2c006000 0 0x2000>;
 		      <0 0x2c006000 0 0x2000>;
 		interrupts = <1 9 0xf04>;
 		interrupts = <1 9 0xf04>;

+ 2 - 1
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts

@@ -153,7 +153,8 @@
 					switch0phy1: switch1phy0@1 {
 					switch0phy1: switch1phy0@1 {
 						reg = <1>;
 						reg = <1>;
 						interrupt-parent = <&switch0>;
 						interrupt-parent = <&switch0>;
-						interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;					};
+						interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+					};
 					switch0phy2: switch1phy0@2 {
 					switch0phy2: switch1phy0@2 {
 						reg = <2>;
 						reg = <2>;
 						interrupt-parent = <&switch0>;
 						interrupt-parent = <&switch0>;

+ 6 - 6
arch/arm/mach-davinci/clock.c

@@ -31,10 +31,10 @@ static LIST_HEAD(clocks);
 static DEFINE_MUTEX(clocks_mutex);
 static DEFINE_MUTEX(clocks_mutex);
 static DEFINE_SPINLOCK(clockfw_lock);
 static DEFINE_SPINLOCK(clockfw_lock);
 
 
-static void __clk_enable(struct clk *clk)
+void davinci_clk_enable(struct clk *clk)
 {
 {
 	if (clk->parent)
 	if (clk->parent)
-		__clk_enable(clk->parent);
+		davinci_clk_enable(clk->parent);
 	if (clk->usecount++ == 0) {
 	if (clk->usecount++ == 0) {
 		if (clk->flags & CLK_PSC)
 		if (clk->flags & CLK_PSC)
 			davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
 			davinci_psc_config(clk->domain, clk->gpsc, clk->lpsc,
@@ -44,7 +44,7 @@ static void __clk_enable(struct clk *clk)
 	}
 	}
 }
 }
 
 
-static void __clk_disable(struct clk *clk)
+void davinci_clk_disable(struct clk *clk)
 {
 {
 	if (WARN_ON(clk->usecount == 0))
 	if (WARN_ON(clk->usecount == 0))
 		return;
 		return;
@@ -56,7 +56,7 @@ static void __clk_disable(struct clk *clk)
 			clk->clk_disable(clk);
 			clk->clk_disable(clk);
 	}
 	}
 	if (clk->parent)
 	if (clk->parent)
-		__clk_disable(clk->parent);
+		davinci_clk_disable(clk->parent);
 }
 }
 
 
 int davinci_clk_reset(struct clk *clk, bool reset)
 int davinci_clk_reset(struct clk *clk, bool reset)
@@ -103,7 +103,7 @@ int clk_enable(struct clk *clk)
 		return -EINVAL;
 		return -EINVAL;
 
 
 	spin_lock_irqsave(&clockfw_lock, flags);
 	spin_lock_irqsave(&clockfw_lock, flags);
-	__clk_enable(clk);
+	davinci_clk_enable(clk);
 	spin_unlock_irqrestore(&clockfw_lock, flags);
 	spin_unlock_irqrestore(&clockfw_lock, flags);
 
 
 	return 0;
 	return 0;
@@ -118,7 +118,7 @@ void clk_disable(struct clk *clk)
 		return;
 		return;
 
 
 	spin_lock_irqsave(&clockfw_lock, flags);
 	spin_lock_irqsave(&clockfw_lock, flags);
-	__clk_disable(clk);
+	davinci_clk_disable(clk);
 	spin_unlock_irqrestore(&clockfw_lock, flags);
 	spin_unlock_irqrestore(&clockfw_lock, flags);
 }
 }
 EXPORT_SYMBOL(clk_disable);
 EXPORT_SYMBOL(clk_disable);

+ 2 - 0
arch/arm/mach-davinci/clock.h

@@ -132,6 +132,8 @@ int davinci_set_sysclk_rate(struct clk *clk, unsigned long rate);
 int davinci_set_refclk_rate(unsigned long rate);
 int davinci_set_refclk_rate(unsigned long rate);
 int davinci_simple_set_rate(struct clk *clk, unsigned long rate);
 int davinci_simple_set_rate(struct clk *clk, unsigned long rate);
 int davinci_clk_reset(struct clk *clk, bool reset);
 int davinci_clk_reset(struct clk *clk, bool reset);
+void davinci_clk_enable(struct clk *clk);
+void davinci_clk_disable(struct clk *clk);
 
 
 extern struct platform_device davinci_wdt_device;
 extern struct platform_device davinci_wdt_device;
 extern void davinci_watchdog_reset(struct platform_device *);
 extern void davinci_watchdog_reset(struct platform_device *);

+ 30 - 2
arch/arm/mach-davinci/da850.c

@@ -319,6 +319,16 @@ static struct clk emac_clk = {
 	.gpsc		= 1,
 	.gpsc		= 1,
 };
 };
 
 
+/*
+ * In order to avoid adding the emac_clk to the clock lookup table twice (and
+ * screwing up the linked list in the process) create a separate clock for
+ * mdio inheriting the rate from emac_clk.
+ */
+static struct clk mdio_clk = {
+	.name		= "mdio",
+	.parent		= &emac_clk,
+};
+
 static struct clk mcasp_clk = {
 static struct clk mcasp_clk = {
 	.name		= "mcasp",
 	.name		= "mcasp",
 	.parent		= &async3_clk,
 	.parent		= &async3_clk,
@@ -367,6 +377,16 @@ static struct clk aemif_clk = {
 	.flags		= ALWAYS_ENABLED,
 	.flags		= ALWAYS_ENABLED,
 };
 };
 
 
+/*
+ * In order to avoid adding the aemif_clk to the clock lookup table twice (and
+ * screwing up the linked list in the process) create a separate clock for
+ * nand inheriting the rate from aemif_clk.
+ */
+static struct clk aemif_nand_clk = {
+	.name		= "nand",
+	.parent		= &aemif_clk,
+};
+
 static struct clk usb11_clk = {
 static struct clk usb11_clk = {
 	.name		= "usb11",
 	.name		= "usb11",
 	.parent		= &pll0_sysclk4,
 	.parent		= &pll0_sysclk4,
@@ -529,7 +549,7 @@ static struct clk_lookup da850_clks[] = {
 	CLK(NULL,		"arm",		&arm_clk),
 	CLK(NULL,		"arm",		&arm_clk),
 	CLK(NULL,		"rmii",		&rmii_clk),
 	CLK(NULL,		"rmii",		&rmii_clk),
 	CLK("davinci_emac.1",	NULL,		&emac_clk),
 	CLK("davinci_emac.1",	NULL,		&emac_clk),
-	CLK("davinci_mdio.0",	"fck",		&emac_clk),
+	CLK("davinci_mdio.0",	"fck",		&mdio_clk),
 	CLK("davinci-mcasp.0",	NULL,		&mcasp_clk),
 	CLK("davinci-mcasp.0",	NULL,		&mcasp_clk),
 	CLK("davinci-mcbsp.0",	NULL,		&mcbsp0_clk),
 	CLK("davinci-mcbsp.0",	NULL,		&mcbsp0_clk),
 	CLK("davinci-mcbsp.1",	NULL,		&mcbsp1_clk),
 	CLK("davinci-mcbsp.1",	NULL,		&mcbsp1_clk),
@@ -537,7 +557,15 @@ static struct clk_lookup da850_clks[] = {
 	CLK("da830-mmc.0",	NULL,		&mmcsd0_clk),
 	CLK("da830-mmc.0",	NULL,		&mmcsd0_clk),
 	CLK("da830-mmc.1",	NULL,		&mmcsd1_clk),
 	CLK("da830-mmc.1",	NULL,		&mmcsd1_clk),
 	CLK("ti-aemif",		NULL,		&aemif_clk),
 	CLK("ti-aemif",		NULL,		&aemif_clk),
-	CLK(NULL,		"aemif",	&aemif_clk),
+	/*
+	 * The only user of this clock is davinci_nand and it get's it through
+	 * con_id. The nand node itself is created from within the aemif
+	 * driver to guarantee that it's probed after the aemif timing
+	 * parameters are configured. of_dev_auxdata is not accessible from
+	 * the aemif driver and can't be passed to of_platform_populate(). For
+	 * that reason we're leaving the dev_id here as NULL.
+	 */
+	CLK(NULL,		"aemif",	&aemif_nand_clk),
 	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
 	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
 	CLK("musb-da8xx",	"usb20",	&usb20_clk),
 	CLK("musb-da8xx",	"usb20",	&usb20_clk),
 	CLK("spi_davinci.0",	NULL,		&spi0_clk),
 	CLK("spi_davinci.0",	NULL,		&spi0_clk),

+ 15 - 19
arch/arm/mach-davinci/usb-da8xx.c

@@ -22,6 +22,8 @@
 #define DA8XX_USB0_BASE		0x01e00000
 #define DA8XX_USB0_BASE		0x01e00000
 #define DA8XX_USB1_BASE		0x01e25000
 #define DA8XX_USB1_BASE		0x01e25000
 
 
+static struct clk *usb20_clk;
+
 static struct platform_device da8xx_usb_phy = {
 static struct platform_device da8xx_usb_phy = {
 	.name		= "da8xx-usb-phy",
 	.name		= "da8xx-usb-phy",
 	.id		= -1,
 	.id		= -1,
@@ -158,26 +160,13 @@ int __init da8xx_register_usb_refclkin(int rate)
 
 
 static void usb20_phy_clk_enable(struct clk *clk)
 static void usb20_phy_clk_enable(struct clk *clk)
 {
 {
-	struct clk *usb20_clk;
-	int err;
 	u32 val;
 	u32 val;
 	u32 timeout = 500000; /* 500 msec */
 	u32 timeout = 500000; /* 500 msec */
 
 
 	val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
 	val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
 
 
-	usb20_clk = clk_get(&da8xx_usb20_dev.dev, "usb20");
-	if (IS_ERR(usb20_clk)) {
-		pr_err("could not get usb20 clk: %ld\n", PTR_ERR(usb20_clk));
-		return;
-	}
-
 	/* The USB 2.O PLL requires that the USB 2.O PSC is enabled as well. */
 	/* The USB 2.O PLL requires that the USB 2.O PSC is enabled as well. */
-	err = clk_prepare_enable(usb20_clk);
-	if (err) {
-		pr_err("failed to enable usb20 clk: %d\n", err);
-		clk_put(usb20_clk);
-		return;
-	}
+	davinci_clk_enable(usb20_clk);
 
 
 	/*
 	/*
 	 * Turn on the USB 2.0 PHY, but just the PLL, and not OTG. The USB 1.1
 	 * Turn on the USB 2.0 PHY, but just the PLL, and not OTG. The USB 1.1
@@ -197,8 +186,7 @@ static void usb20_phy_clk_enable(struct clk *clk)
 
 
 	pr_err("Timeout waiting for USB 2.0 PHY clock good\n");
 	pr_err("Timeout waiting for USB 2.0 PHY clock good\n");
 done:
 done:
-	clk_disable_unprepare(usb20_clk);
-	clk_put(usb20_clk);
+	davinci_clk_disable(usb20_clk);
 }
 }
 
 
 static void usb20_phy_clk_disable(struct clk *clk)
 static void usb20_phy_clk_disable(struct clk *clk)
@@ -285,11 +273,19 @@ static struct clk_lookup usb20_phy_clk_lookup =
 int __init da8xx_register_usb20_phy_clk(bool use_usb_refclkin)
 int __init da8xx_register_usb20_phy_clk(bool use_usb_refclkin)
 {
 {
 	struct clk *parent;
 	struct clk *parent;
-	int ret = 0;
+	int ret;
+
+	usb20_clk = clk_get(&da8xx_usb20_dev.dev, "usb20");
+	ret = PTR_ERR_OR_ZERO(usb20_clk);
+	if (ret)
+		return ret;
 
 
 	parent = clk_get(NULL, use_usb_refclkin ? "usb_refclkin" : "pll0_aux");
 	parent = clk_get(NULL, use_usb_refclkin ? "usb_refclkin" : "pll0_aux");
-	if (IS_ERR(parent))
-		return PTR_ERR(parent);
+	ret = PTR_ERR_OR_ZERO(parent);
+	if (ret) {
+		clk_put(usb20_clk);
+		return ret;
+	}
 
 
 	usb20_phy_clk.parent = parent;
 	usb20_phy_clk.parent = parent;
 	ret = clk_register(&usb20_phy_clk);
 	ret = clk_register(&usb20_phy_clk);

+ 0 - 31
arch/arm/mach-exynos/platsmp.c

@@ -385,36 +385,6 @@ fail:
 	return pen_release != -1 ? ret : 0;
 	return pen_release != -1 ? ret : 0;
 }
 }
 
 
-/*
- * Initialise the CPU possible map early - this describes the CPUs
- * which may be present or become present in the system.
- */
-
-static void __init exynos_smp_init_cpus(void)
-{
-	void __iomem *scu_base = scu_base_addr();
-	unsigned int i, ncores;
-
-	if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
-		ncores = scu_base ? scu_get_core_count(scu_base) : 1;
-	else
-		/*
-		 * CPU Nodes are passed thru DT and set_cpu_possible
-		 * is set by "arm_dt_init_cpu_maps".
-		 */
-		return;
-
-	/* sanity check */
-	if (ncores > nr_cpu_ids) {
-		pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
-			ncores, nr_cpu_ids);
-		ncores = nr_cpu_ids;
-	}
-
-	for (i = 0; i < ncores; i++)
-		set_cpu_possible(i, true);
-}
-
 static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
 static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
 {
 {
 	int i;
 	int i;
@@ -479,7 +449,6 @@ static void exynos_cpu_die(unsigned int cpu)
 #endif /* CONFIG_HOTPLUG_CPU */
 #endif /* CONFIG_HOTPLUG_CPU */
 
 
 const struct smp_operations exynos_smp_ops __initconst = {
 const struct smp_operations exynos_smp_ops __initconst = {
-	.smp_init_cpus		= exynos_smp_init_cpus,
 	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
 	.smp_prepare_cpus	= exynos_smp_prepare_cpus,
 	.smp_secondary_init	= exynos_secondary_init,
 	.smp_secondary_init	= exynos_secondary_init,
 	.smp_boot_secondary	= exynos_boot_secondary,
 	.smp_boot_secondary	= exynos_boot_secondary,

+ 0 - 1
arch/arm/mach-imx/mach-imx1.c

@@ -37,7 +37,6 @@ static const char * const imx1_dt_board_compat[] __initconst = {
 };
 };
 
 
 DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)")
 DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)")
-	.map_io		= debug_ll_io_init,
 	.init_early	= imx1_init_early,
 	.init_early	= imx1_init_early,
 	.init_irq	= imx1_init_irq,
 	.init_irq	= imx1_init_irq,
 	.dt_compat	= imx1_dt_board_compat,
 	.dt_compat	= imx1_dt_board_compat,

+ 1 - 1
arch/arm/mach-omap2/Makefile

@@ -7,7 +7,7 @@ ccflags-y := -I$(srctree)/$(src)/include \
 
 
 # Common support
 # Common support
 obj-y := id.o io.o control.o devices.o fb.o timer.o pm.o \
 obj-y := id.o io.o control.o devices.o fb.o timer.o pm.o \
-	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
+	 common.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
 	 omap_device.o omap-headsmp.o sram.o drm.o
 	 omap_device.o omap-headsmp.o sram.o drm.o
 
 
 hwmod-common				= omap_hwmod.o omap_hwmod_reset.o \
 hwmod-common				= omap_hwmod.o omap_hwmod_reset.o \

+ 1 - 1
arch/arm/mach-omap2/board-generic.c

@@ -304,7 +304,7 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
 	.init_late	= am43xx_init_late,
 	.init_late	= am43xx_init_late,
 	.init_irq	= omap_gic_of_init,
 	.init_irq	= omap_gic_of_init,
 	.init_machine	= omap_generic_init,
 	.init_machine	= omap_generic_init,
-	.init_time	= omap4_local_timer_init,
+	.init_time	= omap3_gptimer_timer_init,
 	.dt_compat	= am43_boards_compat,
 	.dt_compat	= am43_boards_compat,
 	.restart	= omap44xx_restart,
 	.restart	= omap44xx_restart,
 MACHINE_END
 MACHINE_END

+ 0 - 160
arch/arm/mach-omap2/gpio.c

@@ -1,160 +0,0 @@
-/*
- * OMAP2+ specific gpio initialization
- *
- * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
- *
- * Author:
- *	Charulatha V <charu@ti.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <linux/gpio.h>
-#include <linux/err.h>
-#include <linux/slab.h>
-#include <linux/interrupt.h>
-#include <linux/of.h>
-#include <linux/platform_data/gpio-omap.h>
-
-#include "soc.h"
-#include "omap_hwmod.h"
-#include "omap_device.h"
-#include "omap-pm.h"
-
-#include "powerdomain.h"
-
-static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
-{
-	struct platform_device *pdev;
-	struct omap_gpio_platform_data *pdata;
-	struct omap_gpio_dev_attr *dev_attr;
-	char *name = "omap_gpio";
-	int id;
-	struct powerdomain *pwrdm;
-
-	/*
-	 * extract the device id from name field available in the
-	 * hwmod database and use the same for constructing ids for
-	 * gpio devices.
-	 * CAUTION: Make sure the name in the hwmod database does
-	 * not change. If changed, make corresponding change here
-	 * or make use of static variable mechanism to handle this.
-	 */
-	sscanf(oh->name, "gpio%d", &id);
-
-	pdata = kzalloc(sizeof(struct omap_gpio_platform_data), GFP_KERNEL);
-	if (!pdata) {
-		pr_err("gpio%d: Memory allocation failed\n", id);
-		return -ENOMEM;
-	}
-
-	dev_attr = (struct omap_gpio_dev_attr *)oh->dev_attr;
-	pdata->bank_width = dev_attr->bank_width;
-	pdata->dbck_flag = dev_attr->dbck_flag;
-	pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
-	pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
-	if (!pdata->regs) {
-		pr_err("gpio%d: Memory allocation failed\n", id);
-		kfree(pdata);
-		return -ENOMEM;
-	}
-
-	switch (oh->class->rev) {
-	case 0:
-		if (id == 1)
-			/* non-wakeup GPIO pins for OMAP2 Bank1 */
-			pdata->non_wakeup_gpios = 0xe203ffc0;
-		else if (id == 2)
-			/* non-wakeup GPIO pins for OMAP2 Bank2 */
-			pdata->non_wakeup_gpios = 0x08700040;
-		/* fall through */
-
-	case 1:
-		pdata->regs->revision = OMAP24XX_GPIO_REVISION;
-		pdata->regs->direction = OMAP24XX_GPIO_OE;
-		pdata->regs->datain = OMAP24XX_GPIO_DATAIN;
-		pdata->regs->dataout = OMAP24XX_GPIO_DATAOUT;
-		pdata->regs->set_dataout = OMAP24XX_GPIO_SETDATAOUT;
-		pdata->regs->clr_dataout = OMAP24XX_GPIO_CLEARDATAOUT;
-		pdata->regs->irqstatus = OMAP24XX_GPIO_IRQSTATUS1;
-		pdata->regs->irqstatus2 = OMAP24XX_GPIO_IRQSTATUS2;
-		pdata->regs->irqenable = OMAP24XX_GPIO_IRQENABLE1;
-		pdata->regs->irqenable2 = OMAP24XX_GPIO_IRQENABLE2;
-		pdata->regs->set_irqenable = OMAP24XX_GPIO_SETIRQENABLE1;
-		pdata->regs->clr_irqenable = OMAP24XX_GPIO_CLEARIRQENABLE1;
-		pdata->regs->debounce = OMAP24XX_GPIO_DEBOUNCE_VAL;
-		pdata->regs->debounce_en = OMAP24XX_GPIO_DEBOUNCE_EN;
-		pdata->regs->ctrl = OMAP24XX_GPIO_CTRL;
-		pdata->regs->wkup_en = OMAP24XX_GPIO_WAKE_EN;
-		pdata->regs->leveldetect0 = OMAP24XX_GPIO_LEVELDETECT0;
-		pdata->regs->leveldetect1 = OMAP24XX_GPIO_LEVELDETECT1;
-		pdata->regs->risingdetect = OMAP24XX_GPIO_RISINGDETECT;
-		pdata->regs->fallingdetect = OMAP24XX_GPIO_FALLINGDETECT;
-		break;
-	case 2:
-		pdata->regs->revision = OMAP4_GPIO_REVISION;
-		pdata->regs->direction = OMAP4_GPIO_OE;
-		pdata->regs->datain = OMAP4_GPIO_DATAIN;
-		pdata->regs->dataout = OMAP4_GPIO_DATAOUT;
-		pdata->regs->set_dataout = OMAP4_GPIO_SETDATAOUT;
-		pdata->regs->clr_dataout = OMAP4_GPIO_CLEARDATAOUT;
-		pdata->regs->irqstatus_raw0 = OMAP4_GPIO_IRQSTATUSRAW0;
-		pdata->regs->irqstatus_raw1 = OMAP4_GPIO_IRQSTATUSRAW1;
-		pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0;
-		pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1;
-		pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0;
-		pdata->regs->irqenable2 = OMAP4_GPIO_IRQSTATUSSET1;
-		pdata->regs->set_irqenable = OMAP4_GPIO_IRQSTATUSSET0;
-		pdata->regs->clr_irqenable = OMAP4_GPIO_IRQSTATUSCLR0;
-		pdata->regs->debounce = OMAP4_GPIO_DEBOUNCINGTIME;
-		pdata->regs->debounce_en = OMAP4_GPIO_DEBOUNCENABLE;
-		pdata->regs->ctrl = OMAP4_GPIO_CTRL;
-		pdata->regs->wkup_en = OMAP4_GPIO_IRQWAKEN0;
-		pdata->regs->leveldetect0 = OMAP4_GPIO_LEVELDETECT0;
-		pdata->regs->leveldetect1 = OMAP4_GPIO_LEVELDETECT1;
-		pdata->regs->risingdetect = OMAP4_GPIO_RISINGDETECT;
-		pdata->regs->fallingdetect = OMAP4_GPIO_FALLINGDETECT;
-		break;
-	default:
-		WARN(1, "Invalid gpio bank_type\n");
-		kfree(pdata->regs);
-		kfree(pdata);
-		return -EINVAL;
-	}
-
-	pwrdm = omap_hwmod_get_pwrdm(oh);
-	pdata->loses_context = pwrdm_can_ever_lose_context(pwrdm);
-
-	pdev = omap_device_build(name, id - 1, oh, pdata, sizeof(*pdata));
-	kfree(pdata);
-
-	if (IS_ERR(pdev)) {
-		WARN(1, "Can't build omap_device for %s:%s.\n",
-					name, oh->name);
-		return PTR_ERR(pdev);
-	}
-
-	return 0;
-}
-
-/*
- * gpio_init needs to be done before
- * machine_init functions access gpio APIs.
- * Hence gpio_init is a omap_postcore_initcall.
- */
-static int __init omap2_gpio_init(void)
-{
-	/* If dtb is there, the devices will be created dynamically */
-	if (of_have_populated_dt())
-		return -ENODEV;
-
-	return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
-}
-omap_postcore_initcall(omap2_gpio_init);

+ 4 - 4
arch/arm/mach-omap2/omap_hwmod.c

@@ -741,14 +741,14 @@ static int _init_main_clk(struct omap_hwmod *oh)
 	int ret = 0;
 	int ret = 0;
 	char name[MOD_CLK_MAX_NAME_LEN];
 	char name[MOD_CLK_MAX_NAME_LEN];
 	struct clk *clk;
 	struct clk *clk;
+	static const char modck[] = "_mod_ck";
 
 
-	/* +7 magic comes from '_mod_ck' suffix */
-	if (strlen(oh->name) + 7 > MOD_CLK_MAX_NAME_LEN)
+	if (strlen(oh->name) >= MOD_CLK_MAX_NAME_LEN - strlen(modck))
 		pr_warn("%s: warning: cropping name for %s\n", __func__,
 		pr_warn("%s: warning: cropping name for %s\n", __func__,
 			oh->name);
 			oh->name);
 
 
-	strncpy(name, oh->name, MOD_CLK_MAX_NAME_LEN - 7);
-	strcat(name, "_mod_ck");
+	strlcpy(name, oh->name, MOD_CLK_MAX_NAME_LEN - strlen(modck));
+	strlcat(name, modck, MOD_CLK_MAX_NAME_LEN);
 
 
 	clk = clk_get(NULL, name);
 	clk = clk_get(NULL, name);
 	if (!IS_ERR(clk)) {
 	if (!IS_ERR(clk)) {

+ 0 - 4
arch/arm/mach-omap2/omap_hwmod_common_data.h

@@ -121,10 +121,6 @@ extern struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_dispc_irqs[];
 extern struct omap_hwmod_irq_info omap2_dispc_irqs[];
 extern struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[];
-extern struct omap_hwmod_irq_info omap2_gpio1_irqs[];
-extern struct omap_hwmod_irq_info omap2_gpio2_irqs[];
-extern struct omap_hwmod_irq_info omap2_gpio3_irqs[];
-extern struct omap_hwmod_irq_info omap2_gpio4_irqs[];
 extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
 extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
 extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];
 extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];

+ 1 - 3
arch/arm/mach-omap2/prm_common.c

@@ -295,10 +295,8 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
 		GFP_KERNEL);
 		GFP_KERNEL);
 
 
 	if (!prcm_irq_chips || !prcm_irq_setup->saved_mask ||
 	if (!prcm_irq_chips || !prcm_irq_setup->saved_mask ||
-	    !prcm_irq_setup->priority_mask) {
-		pr_err("PRCM: kzalloc failed\n");
+	    !prcm_irq_setup->priority_mask)
 		goto err;
 		goto err;
-	}
 
 
 	memset(mask, 0, sizeof(mask));
 	memset(mask, 0, sizeof(mask));
 
 

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

@@ -510,18 +510,19 @@ void __init omap3_secure_sync32k_timer_init(void)
 }
 }
 #endif /* CONFIG_ARCH_OMAP3 */
 #endif /* CONFIG_ARCH_OMAP3 */
 
 
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) || \
+	defined(CONFIG_SOC_AM43XX)
 void __init omap3_gptimer_timer_init(void)
 void __init omap3_gptimer_timer_init(void)
 {
 {
 	__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
 	__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
 			1, "timer_sys_ck", "ti,timer-alwon", true);
 			1, "timer_sys_ck", "ti,timer-alwon", true);
-
-	clocksource_probe();
+	if (of_have_populated_dt())
+		clocksource_probe();
 }
 }
 #endif
 #endif
 
 
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) ||		\
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) ||		\
-	defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX)
+	defined(CONFIG_SOC_DRA7XX)
 static void __init omap4_sync32k_timer_init(void)
 static void __init omap4_sync32k_timer_init(void)
 {
 {
 	__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
 	__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",

+ 76 - 0
arch/arm/mach-s3c24xx/common.c

@@ -345,10 +345,40 @@ static struct s3c24xx_dma_channel s3c2410_dma_channels[DMACH_MAX] = {
 	[DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 3), },
 	[DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 3), },
 };
 };
 
 
+static const struct dma_slave_map s3c2410_dma_slave_map[] = {
+	{ "s3c2410-sdi", "rx-tx", (void *)DMACH_SDI },
+	{ "s3c2410-spi.0", "rx", (void *)DMACH_SPI0_RX },
+	{ "s3c2410-spi.0", "tx", (void *)DMACH_SPI0_TX },
+	{ "s3c2410-spi.1", "rx", (void *)DMACH_SPI1_RX },
+	{ "s3c2410-spi.1", "tx", (void *)DMACH_SPI1_TX },
+	/*
+	 * The DMA request source[1] (DMACH_UARTx_SRC2) are
+	 * not used in the UART driver.
+	 */
+	{ "s3c2410-uart.0", "rx", (void *)DMACH_UART0 },
+	{ "s3c2410-uart.0", "tx", (void *)DMACH_UART0 },
+	{ "s3c2410-uart.1", "rx", (void *)DMACH_UART1 },
+	{ "s3c2410-uart.1", "tx", (void *)DMACH_UART1 },
+	{ "s3c2410-uart.2", "rx", (void *)DMACH_UART2 },
+	{ "s3c2410-uart.2", "tx", (void *)DMACH_UART2 },
+	{ "s3c24xx-iis", "rx", (void *)DMACH_I2S_IN },
+	{ "s3c24xx-iis", "tx", (void *)DMACH_I2S_OUT },
+	{ "s3c-hsudc", "rx0", (void *)DMACH_USB_EP1 },
+	{ "s3c-hsudc", "tx0", (void *)DMACH_USB_EP1 },
+	{ "s3c-hsudc", "rx1", (void *)DMACH_USB_EP2 },
+	{ "s3c-hsudc", "tx1", (void *)DMACH_USB_EP2 },
+	{ "s3c-hsudc", "rx2", (void *)DMACH_USB_EP3 },
+	{ "s3c-hsudc", "tx2", (void *)DMACH_USB_EP3 },
+	{ "s3c-hsudc", "rx3", (void *)DMACH_USB_EP4 },
+	{ "s3c-hsudc", "tx3", (void *)DMACH_USB_EP4 }
+};
+
 static struct s3c24xx_dma_platdata s3c2410_dma_platdata = {
 static struct s3c24xx_dma_platdata s3c2410_dma_platdata = {
 	.num_phy_channels = 4,
 	.num_phy_channels = 4,
 	.channels = s3c2410_dma_channels,
 	.channels = s3c2410_dma_channels,
 	.num_channels = DMACH_MAX,
 	.num_channels = DMACH_MAX,
+	.slave_map = s3c2410_dma_slave_map,
+	.slavecnt = ARRAY_SIZE(s3c2410_dma_slave_map),
 };
 };
 
 
 struct platform_device s3c2410_device_dma = {
 struct platform_device s3c2410_device_dma = {
@@ -388,10 +418,36 @@ static struct s3c24xx_dma_channel s3c2412_dma_channels[DMACH_MAX] = {
 	[DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, 16 },
 	[DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, 16 },
 };
 };
 
 
+static const struct dma_slave_map s3c2412_dma_slave_map[] = {
+	{ "s3c2412-sdi", "rx-tx", (void *)DMACH_SDI },
+	{ "s3c2412-spi.0", "rx", (void *)DMACH_SPI0_RX },
+	{ "s3c2412-spi.0", "tx", (void *)DMACH_SPI0_TX },
+	{ "s3c2412-spi.1", "rx", (void *)DMACH_SPI1_RX },
+	{ "s3c2412-spi.1", "tx", (void *)DMACH_SPI1_TX },
+	{ "s3c2440-uart.0", "rx", (void *)DMACH_UART0 },
+	{ "s3c2440-uart.0", "tx", (void *)DMACH_UART0 },
+	{ "s3c2440-uart.1", "rx", (void *)DMACH_UART1 },
+	{ "s3c2440-uart.1", "tx", (void *)DMACH_UART1 },
+	{ "s3c2440-uart.2", "rx", (void *)DMACH_UART2 },
+	{ "s3c2440-uart.2", "tx", (void *)DMACH_UART2 },
+	{ "s3c2412-iis", "rx", (void *)DMACH_I2S_IN },
+	{ "s3c2412-iis", "tx", (void *)DMACH_I2S_OUT },
+	{ "s3c-hsudc", "rx0", (void *)DMACH_USB_EP1 },
+	{ "s3c-hsudc", "tx0", (void *)DMACH_USB_EP1 },
+	{ "s3c-hsudc", "rx1", (void *)DMACH_USB_EP2 },
+	{ "s3c-hsudc", "tx1", (void *)DMACH_USB_EP2 },
+	{ "s3c-hsudc", "rx2", (void *)DMACH_USB_EP3 },
+	{ "s3c-hsudc", "tx2", (void *)DMACH_USB_EP3 },
+	{ "s3c-hsudc", "rx3", (void *)DMACH_USB_EP4 },
+	{ "s3c-hsudc", "tx3", (void *)DMACH_USB_EP4 }
+};
+
 static struct s3c24xx_dma_platdata s3c2412_dma_platdata = {
 static struct s3c24xx_dma_platdata s3c2412_dma_platdata = {
 	.num_phy_channels = 4,
 	.num_phy_channels = 4,
 	.channels = s3c2412_dma_channels,
 	.channels = s3c2412_dma_channels,
 	.num_channels = DMACH_MAX,
 	.num_channels = DMACH_MAX,
+	.slave_map = s3c2412_dma_slave_map,
+	.slavecnt = ARRAY_SIZE(s3c2412_dma_slave_map),
 };
 };
 
 
 struct platform_device s3c2412_device_dma = {
 struct platform_device s3c2412_device_dma = {
@@ -534,10 +590,30 @@ static struct s3c24xx_dma_channel s3c2443_dma_channels[DMACH_MAX] = {
 	[DMACH_MIC_IN] = { S3C24XX_DMA_APB, true, 29 },
 	[DMACH_MIC_IN] = { S3C24XX_DMA_APB, true, 29 },
 };
 };
 
 
+static const struct dma_slave_map s3c2443_dma_slave_map[] = {
+	{ "s3c2440-sdi", "rx-tx", (void *)DMACH_SDI },
+	{ "s3c2443-spi.0", "rx", (void *)DMACH_SPI0_RX },
+	{ "s3c2443-spi.0", "tx", (void *)DMACH_SPI0_TX },
+	{ "s3c2443-spi.1", "rx", (void *)DMACH_SPI1_RX },
+	{ "s3c2443-spi.1", "tx", (void *)DMACH_SPI1_TX },
+	{ "s3c2440-uart.0", "rx", (void *)DMACH_UART0 },
+	{ "s3c2440-uart.0", "tx", (void *)DMACH_UART0 },
+	{ "s3c2440-uart.1", "rx", (void *)DMACH_UART1 },
+	{ "s3c2440-uart.1", "tx", (void *)DMACH_UART1 },
+	{ "s3c2440-uart.2", "rx", (void *)DMACH_UART2 },
+	{ "s3c2440-uart.2", "tx", (void *)DMACH_UART2 },
+	{ "s3c2440-uart.3", "rx", (void *)DMACH_UART3 },
+	{ "s3c2440-uart.3", "tx", (void *)DMACH_UART3 },
+	{ "s3c24xx-iis", "rx", (void *)DMACH_I2S_IN },
+	{ "s3c24xx-iis", "tx", (void *)DMACH_I2S_OUT },
+};
+
 static struct s3c24xx_dma_platdata s3c2443_dma_platdata = {
 static struct s3c24xx_dma_platdata s3c2443_dma_platdata = {
 	.num_phy_channels = 6,
 	.num_phy_channels = 6,
 	.channels = s3c2443_dma_channels,
 	.channels = s3c2443_dma_channels,
 	.num_channels = DMACH_MAX,
 	.num_channels = DMACH_MAX,
+	.slave_map = s3c2443_dma_slave_map,
+	.slavecnt = ARRAY_SIZE(s3c2443_dma_slave_map),
 };
 };
 
 
 struct platform_device s3c2443_device_dma = {
 struct platform_device s3c2443_device_dma = {

+ 16 - 0
arch/arm64/boot/dts/amlogic/meson-gx.dtsi

@@ -356,5 +356,21 @@
 				status = "disabled";
 				status = "disabled";
 			};
 			};
 		};
 		};
+
+		vpu: vpu@d0100000 {
+			compatible = "amlogic,meson-gx-vpu";
+			reg = <0x0 0xd0100000 0x0 0x100000>,
+			      <0x0 0xc883c000 0x0 0x1000>,
+			      <0x0 0xc8838000 0x0 0x1000>;
+			reg-names = "vpu", "hhi", "dmc";
+			interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			/* CVBS VDAC output port */
+			cvbs_vdac_port: port@0 {
+				reg = <0>;
+			};
+		};
 	};
 	};
 };
 };

+ 16 - 0
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts

@@ -142,6 +142,16 @@
 		clocks = <&wifi32k>;
 		clocks = <&wifi32k>;
 		clock-names = "ext_clock";
 		clock-names = "ext_clock";
 	};
 	};
+
+	cvbs-connector {
+		compatible = "composite-video-connector";
+
+		port {
+			cvbs_connector_in: endpoint {
+				remote-endpoint = <&cvbs_vdac_out>;
+			};
+		};
+	};
 };
 };
 
 
 &uart_AO {
 &uart_AO {
@@ -229,3 +239,9 @@
 	clocks = <&clkc CLKID_FCLK_DIV4>;
 	clocks = <&clkc CLKID_FCLK_DIV4>;
 	clock-names = "clkin0";
 	clock-names = "clkin0";
 };
 };
+
+&cvbs_vdac_port {
+	cvbs_vdac_out: endpoint {
+		remote-endpoint = <&cvbs_connector_in>;
+	};
+};

+ 16 - 0
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi

@@ -125,6 +125,16 @@
 		clocks = <&wifi32k>;
 		clocks = <&wifi32k>;
 		clock-names = "ext_clock";
 		clock-names = "ext_clock";
 	};
 	};
+
+	cvbs-connector {
+		compatible = "composite-video-connector";
+
+		port {
+			cvbs_connector_in: endpoint {
+				remote-endpoint = <&cvbs_vdac_out>;
+			};
+		};
+	};
 };
 };
 
 
 /* This UART is brought out to the DB9 connector */
 /* This UART is brought out to the DB9 connector */
@@ -234,3 +244,9 @@
 	clocks = <&clkc CLKID_FCLK_DIV4>;
 	clocks = <&clkc CLKID_FCLK_DIV4>;
 	clock-names = "clkin0";
 	clock-names = "clkin0";
 };
 };
+
+&cvbs_vdac_port {
+	cvbs_vdac_out: endpoint {
+		remote-endpoint = <&cvbs_connector_in>;
+	};
+};

+ 4 - 0
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi

@@ -506,3 +506,7 @@
 		 <&clkc CLKID_FCLK_DIV2>;
 		 <&clkc CLKID_FCLK_DIV2>;
 	clock-names = "core", "clkin0", "clkin1";
 	clock-names = "core", "clkin0", "clkin1";
 };
 };
+
+&vpu {
+	compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
+};

+ 16 - 0
arch/arm64/boot/dts/amlogic/meson-gxl-nexbox-a95x.dts

@@ -117,6 +117,16 @@
 		clocks = <&wifi32k>;
 		clocks = <&wifi32k>;
 		clock-names = "ext_clock";
 		clock-names = "ext_clock";
 	};
 	};
+
+	cvbs-connector {
+		compatible = "composite-video-connector";
+
+		port {
+			cvbs_connector_in: endpoint {
+				remote-endpoint = <&cvbs_vdac_out>;
+			};
+		};
+	};
 };
 };
 
 
 &uart_AO {
 &uart_AO {
@@ -203,3 +213,9 @@
 	clocks = <&clkc CLKID_FCLK_DIV4>;
 	clocks = <&clkc CLKID_FCLK_DIV4>;
 	clock-names = "clkin0";
 	clock-names = "clkin0";
 };
 };
+
+&cvbs_vdac_port {
+	cvbs_vdac_out: endpoint {
+		remote-endpoint = <&cvbs_connector_in>;
+	};
+};

+ 5 - 1
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi

@@ -43,7 +43,7 @@
 
 
 #include "meson-gx.dtsi"
 #include "meson-gx.dtsi"
 #include <dt-bindings/clock/gxbb-clkc.h>
 #include <dt-bindings/clock/gxbb-clkc.h>
-#include <dt-bindings/gpio/meson-gxbb-gpio.h>
+#include <dt-bindings/gpio/meson-gxl-gpio.h>
 
 
 / {
 / {
 	compatible = "amlogic,meson-gxl";
 	compatible = "amlogic,meson-gxl";
@@ -299,3 +299,7 @@
 		 <&clkc CLKID_FCLK_DIV2>;
 		 <&clkc CLKID_FCLK_DIV2>;
 	clock-names = "core", "clkin0", "clkin1";
 	clock-names = "core", "clkin0", "clkin1";
 };
 };
+
+&vpu {
+	compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
+};

+ 16 - 0
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts

@@ -90,6 +90,16 @@
 		compatible = "mmc-pwrseq-emmc";
 		compatible = "mmc-pwrseq-emmc";
 		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
 		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
 	};
 	};
+
+	cvbs-connector {
+		compatible = "composite-video-connector";
+
+		port {
+			cvbs_connector_in: endpoint {
+				remote-endpoint = <&cvbs_vdac_out>;
+			};
+		};
+	};
 };
 };
 
 
 /* This UART is brought out to the DB9 connector */
 /* This UART is brought out to the DB9 connector */
@@ -167,3 +177,9 @@
 		max-speed = <1000>;
 		max-speed = <1000>;
 	};
 	};
 };
 };
+
+&cvbs_vdac_port {
+	cvbs_vdac_out: endpoint {
+		remote-endpoint = <&cvbs_connector_in>;
+	};
+};

+ 4 - 0
arch/arm64/boot/dts/amlogic/meson-gxm.dtsi

@@ -112,3 +112,7 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&vpu {
+	compatible = "amlogic,meson-gxm-vpu", "amlogic,meson-gx-vpu";
+};

+ 1 - 1
arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts

@@ -81,7 +81,7 @@
 		#address-cells = <0>;
 		#address-cells = <0>;
 		interrupt-controller;
 		interrupt-controller;
 		reg = <0x0 0x2c001000 0 0x1000>,
 		reg = <0x0 0x2c001000 0 0x1000>,
-		      <0x0 0x2c002000 0 0x1000>,
+		      <0x0 0x2c002000 0 0x2000>,
 		      <0x0 0x2c004000 0 0x2000>,
 		      <0x0 0x2c004000 0 0x2000>,
 		      <0x0 0x2c006000 0 0x2000>;
 		      <0x0 0x2c006000 0 0x2000>;
 		interrupts = <1 9 0xf04>;
 		interrupts = <1 9 0xf04>;

+ 10 - 0
arch/arm64/boot/dts/qcom/msm8996.dtsi

@@ -64,6 +64,16 @@
 			reg = <0x0 0x86000000 0x0 0x200000>;
 			reg = <0x0 0x86000000 0x0 0x200000>;
 			no-map;
 			no-map;
 		};
 		};
+
+		memory@85800000 {
+			reg = <0x0 0x85800000 0x0 0x800000>;
+			no-map;
+		};
+
+		memory@86200000 {
+			reg = <0x0 0x86200000 0x0 0x2600000>;
+			no-map;
+		};
 	};
 	};
 
 
 	cpus {
 	cpus {

+ 1 - 1
arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts

@@ -169,7 +169,7 @@
 		power-source = <3300>;
 		power-source = <3300>;
 	};
 	};
 
 
-	sdhi0_pins_uhs: sd0 {
+	sdhi0_pins_uhs: sd0_uhs {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
 		function = "sdhi0";
 		power-source = <1800>;
 		power-source = <1800>;

+ 1 - 0
arch/arm64/configs/defconfig

@@ -331,6 +331,7 @@ CONFIG_DRM_VC4=m
 CONFIG_DRM_PANEL_SIMPLE=m
 CONFIG_DRM_PANEL_SIMPLE=m
 CONFIG_DRM_I2C_ADV7511=m
 CONFIG_DRM_I2C_ADV7511=m
 CONFIG_DRM_HISI_KIRIN=m
 CONFIG_DRM_HISI_KIRIN=m
+CONFIG_DRM_MESON=m
 CONFIG_FB=y
 CONFIG_FB=y
 CONFIG_FB_ARMCLCD=y
 CONFIG_FB_ARMCLCD=y
 CONFIG_BACKLIGHT_GENERIC=m
 CONFIG_BACKLIGHT_GENERIC=m

+ 65 - 0
arch/arm64/include/asm/asm-uaccess.h

@@ -0,0 +1,65 @@
+#ifndef __ASM_ASM_UACCESS_H
+#define __ASM_ASM_UACCESS_H
+
+#include <asm/alternative.h>
+#include <asm/kernel-pgtable.h>
+#include <asm/sysreg.h>
+#include <asm/assembler.h>
+
+/*
+ * User access enabling/disabling macros.
+ */
+#ifdef CONFIG_ARM64_SW_TTBR0_PAN
+	.macro	__uaccess_ttbr0_disable, tmp1
+	mrs	\tmp1, ttbr1_el1		// swapper_pg_dir
+	add	\tmp1, \tmp1, #SWAPPER_DIR_SIZE	// reserved_ttbr0 at the end of swapper_pg_dir
+	msr	ttbr0_el1, \tmp1		// set reserved TTBR0_EL1
+	isb
+	.endm
+
+	.macro	__uaccess_ttbr0_enable, tmp1
+	get_thread_info \tmp1
+	ldr	\tmp1, [\tmp1, #TSK_TI_TTBR0]	// load saved TTBR0_EL1
+	msr	ttbr0_el1, \tmp1		// set the non-PAN TTBR0_EL1
+	isb
+	.endm
+
+	.macro	uaccess_ttbr0_disable, tmp1
+alternative_if_not ARM64_HAS_PAN
+	__uaccess_ttbr0_disable \tmp1
+alternative_else_nop_endif
+	.endm
+
+	.macro	uaccess_ttbr0_enable, tmp1, tmp2
+alternative_if_not ARM64_HAS_PAN
+	save_and_disable_irq \tmp2		// avoid preemption
+	__uaccess_ttbr0_enable \tmp1
+	restore_irq \tmp2
+alternative_else_nop_endif
+	.endm
+#else
+	.macro	uaccess_ttbr0_disable, tmp1
+	.endm
+
+	.macro	uaccess_ttbr0_enable, tmp1, tmp2
+	.endm
+#endif
+
+/*
+ * These macros are no-ops when UAO is present.
+ */
+	.macro	uaccess_disable_not_uao, tmp1
+	uaccess_ttbr0_disable \tmp1
+alternative_if ARM64_ALT_PAN_NOT_UAO
+	SET_PSTATE_PAN(1)
+alternative_else_nop_endif
+	.endm
+
+	.macro	uaccess_enable_not_uao, tmp1, tmp2
+	uaccess_ttbr0_enable \tmp1, \tmp2
+alternative_if ARM64_ALT_PAN_NOT_UAO
+	SET_PSTATE_PAN(0)
+alternative_else_nop_endif
+	.endm
+
+#endif

+ 9 - 1
arch/arm64/include/asm/current.h

@@ -9,9 +9,17 @@
 
 
 struct task_struct;
 struct task_struct;
 
 
+/*
+ * We don't use read_sysreg() as we want the compiler to cache the value where
+ * possible.
+ */
 static __always_inline struct task_struct *get_current(void)
 static __always_inline struct task_struct *get_current(void)
 {
 {
-	return (struct task_struct *)read_sysreg(sp_el0);
+	unsigned long sp_el0;
+
+	asm ("mrs %0, sp_el0" : "=r" (sp_el0));
+
+	return (struct task_struct *)sp_el0;
 }
 }
 
 
 #define current get_current()
 #define current get_current()

+ 0 - 64
arch/arm64/include/asm/uaccess.h

@@ -22,8 +22,6 @@
 #include <asm/kernel-pgtable.h>
 #include <asm/kernel-pgtable.h>
 #include <asm/sysreg.h>
 #include <asm/sysreg.h>
 
 
-#ifndef __ASSEMBLY__
-
 /*
 /*
  * User space memory access functions
  * User space memory access functions
  */
  */
@@ -424,66 +422,4 @@ extern long strncpy_from_user(char *dest, const char __user *src, long count);
 extern __must_check long strlen_user(const char __user *str);
 extern __must_check long strlen_user(const char __user *str);
 extern __must_check long strnlen_user(const char __user *str, long n);
 extern __must_check long strnlen_user(const char __user *str, long n);
 
 
-#else	/* __ASSEMBLY__ */
-
-#include <asm/assembler.h>
-
-/*
- * User access enabling/disabling macros.
- */
-#ifdef CONFIG_ARM64_SW_TTBR0_PAN
-	.macro	__uaccess_ttbr0_disable, tmp1
-	mrs	\tmp1, ttbr1_el1		// swapper_pg_dir
-	add	\tmp1, \tmp1, #SWAPPER_DIR_SIZE	// reserved_ttbr0 at the end of swapper_pg_dir
-	msr	ttbr0_el1, \tmp1		// set reserved TTBR0_EL1
-	isb
-	.endm
-
-	.macro	__uaccess_ttbr0_enable, tmp1
-	get_thread_info \tmp1
-	ldr	\tmp1, [\tmp1, #TSK_TI_TTBR0]	// load saved TTBR0_EL1
-	msr	ttbr0_el1, \tmp1		// set the non-PAN TTBR0_EL1
-	isb
-	.endm
-
-	.macro	uaccess_ttbr0_disable, tmp1
-alternative_if_not ARM64_HAS_PAN
-	__uaccess_ttbr0_disable \tmp1
-alternative_else_nop_endif
-	.endm
-
-	.macro	uaccess_ttbr0_enable, tmp1, tmp2
-alternative_if_not ARM64_HAS_PAN
-	save_and_disable_irq \tmp2		// avoid preemption
-	__uaccess_ttbr0_enable \tmp1
-	restore_irq \tmp2
-alternative_else_nop_endif
-	.endm
-#else
-	.macro	uaccess_ttbr0_disable, tmp1
-	.endm
-
-	.macro	uaccess_ttbr0_enable, tmp1, tmp2
-	.endm
-#endif
-
-/*
- * These macros are no-ops when UAO is present.
- */
-	.macro	uaccess_disable_not_uao, tmp1
-	uaccess_ttbr0_disable \tmp1
-alternative_if ARM64_ALT_PAN_NOT_UAO
-	SET_PSTATE_PAN(1)
-alternative_else_nop_endif
-	.endm
-
-	.macro	uaccess_enable_not_uao, tmp1, tmp2
-	uaccess_ttbr0_enable \tmp1, \tmp2
-alternative_if ARM64_ALT_PAN_NOT_UAO
-	SET_PSTATE_PAN(0)
-alternative_else_nop_endif
-	.endm
-
-#endif	/* __ASSEMBLY__ */
-
 #endif /* __ASM_UACCESS_H */
 #endif /* __ASM_UACCESS_H */

+ 1 - 1
arch/arm64/kernel/entry.S

@@ -31,7 +31,7 @@
 #include <asm/memory.h>
 #include <asm/memory.h>
 #include <asm/ptrace.h>
 #include <asm/ptrace.h>
 #include <asm/thread_info.h>
 #include <asm/thread_info.h>
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 #include <asm/unistd.h>
 #include <asm/unistd.h>
 
 
 /*
 /*

+ 1 - 1
arch/arm64/lib/clear_user.S

@@ -17,7 +17,7 @@
  */
  */
 #include <linux/linkage.h>
 #include <linux/linkage.h>
 
 
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 
 
 	.text
 	.text
 
 

+ 1 - 1
arch/arm64/lib/copy_from_user.S

@@ -17,7 +17,7 @@
 #include <linux/linkage.h>
 #include <linux/linkage.h>
 
 
 #include <asm/cache.h>
 #include <asm/cache.h>
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 
 
 /*
 /*
  * Copy from user space to a kernel buffer (alignment handled by the hardware)
  * Copy from user space to a kernel buffer (alignment handled by the hardware)

+ 1 - 1
arch/arm64/lib/copy_in_user.S

@@ -19,7 +19,7 @@
 #include <linux/linkage.h>
 #include <linux/linkage.h>
 
 
 #include <asm/cache.h>
 #include <asm/cache.h>
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 
 
 /*
 /*
  * Copy from user space to user space (alignment handled by the hardware)
  * Copy from user space to user space (alignment handled by the hardware)

+ 1 - 1
arch/arm64/lib/copy_to_user.S

@@ -17,7 +17,7 @@
 #include <linux/linkage.h>
 #include <linux/linkage.h>
 
 
 #include <asm/cache.h>
 #include <asm/cache.h>
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 
 
 /*
 /*
  * Copy to user space from a kernel buffer (alignment handled by the hardware)
  * Copy to user space from a kernel buffer (alignment handled by the hardware)

+ 1 - 1
arch/arm64/mm/cache.S

@@ -23,7 +23,7 @@
 #include <asm/assembler.h>
 #include <asm/assembler.h>
 #include <asm/cpufeature.h>
 #include <asm/cpufeature.h>
 #include <asm/alternative.h>
 #include <asm/alternative.h>
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 
 
 /*
 /*
  *	flush_icache_range(start,end)
  *	flush_icache_range(start,end)

+ 2 - 1
arch/arm64/mm/dma-mapping.c

@@ -524,7 +524,8 @@ EXPORT_SYMBOL(dummy_dma_ops);
 
 
 static int __init arm64_dma_init(void)
 static int __init arm64_dma_init(void)
 {
 {
-	if (swiotlb_force || max_pfn > (arm64_dma_phys_limit >> PAGE_SHIFT))
+	if (swiotlb_force == SWIOTLB_FORCE ||
+	    max_pfn > (arm64_dma_phys_limit >> PAGE_SHIFT))
 		swiotlb = 1;
 		swiotlb = 1;
 
 
 	return atomic_pool_init();
 	return atomic_pool_init();

+ 4 - 4
arch/arm64/mm/fault.c

@@ -88,21 +88,21 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
 			break;
 			break;
 
 
 		pud = pud_offset(pgd, addr);
 		pud = pud_offset(pgd, addr);
-		printk(", *pud=%016llx", pud_val(*pud));
+		pr_cont(", *pud=%016llx", pud_val(*pud));
 		if (pud_none(*pud) || pud_bad(*pud))
 		if (pud_none(*pud) || pud_bad(*pud))
 			break;
 			break;
 
 
 		pmd = pmd_offset(pud, addr);
 		pmd = pmd_offset(pud, addr);
-		printk(", *pmd=%016llx", pmd_val(*pmd));
+		pr_cont(", *pmd=%016llx", pmd_val(*pmd));
 		if (pmd_none(*pmd) || pmd_bad(*pmd))
 		if (pmd_none(*pmd) || pmd_bad(*pmd))
 			break;
 			break;
 
 
 		pte = pte_offset_map(pmd, addr);
 		pte = pte_offset_map(pmd, addr);
-		printk(", *pte=%016llx", pte_val(*pte));
+		pr_cont(", *pte=%016llx", pte_val(*pte));
 		pte_unmap(pte);
 		pte_unmap(pte);
 	} while(0);
 	} while(0);
 
 
-	printk("\n");
+	pr_cont("\n");
 }
 }
 
 
 #ifdef CONFIG_ARM64_HW_AFDBM
 #ifdef CONFIG_ARM64_HW_AFDBM

+ 2 - 1
arch/arm64/mm/init.c

@@ -401,7 +401,8 @@ static void __init free_unused_memmap(void)
  */
  */
 void __init mem_init(void)
 void __init mem_init(void)
 {
 {
-	if (swiotlb_force || max_pfn > (arm64_dma_phys_limit >> PAGE_SHIFT))
+	if (swiotlb_force == SWIOTLB_FORCE ||
+	    max_pfn > (arm64_dma_phys_limit >> PAGE_SHIFT))
 		swiotlb_init(1);
 		swiotlb_init(1);
 
 
 	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
 	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);

+ 1 - 1
arch/arm64/xen/hypercall.S

@@ -49,7 +49,7 @@
 
 
 #include <linux/linkage.h>
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/assembler.h>
-#include <linux/uaccess.h>
+#include <asm/asm-uaccess.h>
 #include <xen/interface/xen.h>
 #include <xen/interface/xen.h>
 
 
 
 

+ 4 - 1
arch/mips/kvm/entry.c

@@ -521,6 +521,9 @@ void *kvm_mips_build_exit(void *addr)
 	uasm_i_and(&p, V0, V0, AT);
 	uasm_i_and(&p, V0, V0, AT);
 	uasm_i_lui(&p, AT, ST0_CU0 >> 16);
 	uasm_i_lui(&p, AT, ST0_CU0 >> 16);
 	uasm_i_or(&p, V0, V0, AT);
 	uasm_i_or(&p, V0, V0, AT);
+#ifdef CONFIG_64BIT
+	uasm_i_ori(&p, V0, V0, ST0_SX | ST0_UX);
+#endif
 	uasm_i_mtc0(&p, V0, C0_STATUS);
 	uasm_i_mtc0(&p, V0, C0_STATUS);
 	uasm_i_ehb(&p);
 	uasm_i_ehb(&p);
 
 
@@ -643,7 +646,7 @@ static void *kvm_mips_build_ret_to_guest(void *addr)
 
 
 	/* Setup status register for running guest in UM */
 	/* Setup status register for running guest in UM */
 	uasm_i_ori(&p, V1, V1, ST0_EXL | KSU_USER | ST0_IE);
 	uasm_i_ori(&p, V1, V1, ST0_EXL | KSU_USER | ST0_IE);
-	UASM_i_LA(&p, AT, ~(ST0_CU0 | ST0_MX));
+	UASM_i_LA(&p, AT, ~(ST0_CU0 | ST0_MX | ST0_SX | ST0_UX));
 	uasm_i_and(&p, V1, V1, AT);
 	uasm_i_and(&p, V1, V1, AT);
 	uasm_i_mtc0(&p, V1, C0_STATUS);
 	uasm_i_mtc0(&p, V1, C0_STATUS);
 	uasm_i_ehb(&p);
 	uasm_i_ehb(&p);

+ 2 - 2
arch/mips/kvm/mips.c

@@ -360,8 +360,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
 	dump_handler("kvm_exit", gebase + 0x2000, vcpu->arch.vcpu_run);
 	dump_handler("kvm_exit", gebase + 0x2000, vcpu->arch.vcpu_run);
 
 
 	/* Invalidate the icache for these ranges */
 	/* Invalidate the icache for these ranges */
-	local_flush_icache_range((unsigned long)gebase,
-				(unsigned long)gebase + ALIGN(size, PAGE_SIZE));
+	flush_icache_range((unsigned long)gebase,
+			   (unsigned long)gebase + ALIGN(size, PAGE_SIZE));
 
 
 	/*
 	/*
 	 * Allocate comm page for guest kernel, a TLB will be reserved for
 	 * Allocate comm page for guest kernel, a TLB will be reserved for

+ 2 - 0
arch/openrisc/kernel/vmlinux.lds.S

@@ -44,6 +44,8 @@ SECTIONS
         /* Read-only sections, merged into text segment: */
         /* Read-only sections, merged into text segment: */
         . = LOAD_BASE ;
         . = LOAD_BASE ;
 
 
+	_text = .;
+
 	/* _s_kernel_ro must be page aligned */
 	/* _s_kernel_ro must be page aligned */
 	. = ALIGN(PAGE_SIZE);
 	. = ALIGN(PAGE_SIZE);
 	_s_kernel_ro = .;
 	_s_kernel_ro = .;

+ 0 - 1
arch/parisc/include/asm/thread_info.h

@@ -49,7 +49,6 @@ struct thread_info {
 #define TIF_POLLING_NRFLAG	3	/* true if poll_idle() is polling TIF_NEED_RESCHED */
 #define TIF_POLLING_NRFLAG	3	/* true if poll_idle() is polling TIF_NEED_RESCHED */
 #define TIF_32BIT               4       /* 32 bit binary */
 #define TIF_32BIT               4       /* 32 bit binary */
 #define TIF_MEMDIE		5	/* is terminating due to OOM killer */
 #define TIF_MEMDIE		5	/* is terminating due to OOM killer */
-#define TIF_RESTORE_SIGMASK	6	/* restore saved signal mask */
 #define TIF_SYSCALL_AUDIT	7	/* syscall auditing active */
 #define TIF_SYSCALL_AUDIT	7	/* syscall auditing active */
 #define TIF_NOTIFY_RESUME	8	/* callback before returning to user */
 #define TIF_NOTIFY_RESUME	8	/* callback before returning to user */
 #define TIF_SINGLESTEP		9	/* single stepping? */
 #define TIF_SINGLESTEP		9	/* single stepping? */

+ 20 - 3
arch/parisc/kernel/time.c

@@ -235,9 +235,26 @@ void __init time_init(void)
 
 
 	cr16_hz = 100 * PAGE0->mem_10msec;  /* Hz */
 	cr16_hz = 100 * PAGE0->mem_10msec;  /* Hz */
 
 
-	/* register at clocksource framework */
-	clocksource_register_hz(&clocksource_cr16, cr16_hz);
-
 	/* register as sched_clock source */
 	/* register as sched_clock source */
 	sched_clock_register(read_cr16_sched_clock, BITS_PER_LONG, cr16_hz);
 	sched_clock_register(read_cr16_sched_clock, BITS_PER_LONG, cr16_hz);
 }
 }
+
+static int __init init_cr16_clocksource(void)
+{
+	/*
+	 * The cr16 interval timers are not syncronized across CPUs, so mark
+	 * them unstable and lower rating on SMP systems.
+	 */
+	if (num_online_cpus() > 1) {
+		clocksource_cr16.flags = CLOCK_SOURCE_UNSTABLE;
+		clocksource_cr16.rating = 0;
+	}
+
+	/* register at clocksource framework */
+	clocksource_register_hz(&clocksource_cr16,
+		100 * PAGE0->mem_10msec);
+
+	return 0;
+}
+
+device_initcall(init_cr16_clocksource);

+ 1 - 1
arch/parisc/mm/fault.c

@@ -234,7 +234,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long code,
 	    tsk->comm, code, address);
 	    tsk->comm, code, address);
 	print_vma_addr(KERN_CONT " in ", regs->iaoq[0]);
 	print_vma_addr(KERN_CONT " in ", regs->iaoq[0]);
 
 
-	pr_cont(" trap #%lu: %s%c", code, trap_name(code),
+	pr_cont("\ntrap #%lu: %s%c", code, trap_name(code),
 		vma ? ',':'\n');
 		vma ? ',':'\n');
 
 
 	if (vma)
 	if (vma)

+ 8 - 0
arch/s390/include/asm/asm-prototypes.h

@@ -0,0 +1,8 @@
+#ifndef _ASM_S390_PROTOTYPES_H
+
+#include <linux/kvm_host.h>
+#include <linux/ftrace.h>
+#include <asm/fpu/api.h>
+#include <asm-generic/asm-prototypes.h>
+
+#endif /* _ASM_S390_PROTOTYPES_H */

+ 4 - 4
arch/s390/kernel/vtime.c

@@ -94,7 +94,7 @@ static void update_mt_scaling(void)
  * Update process times based on virtual cpu times stored by entry.S
  * Update process times based on virtual cpu times stored by entry.S
  * to the lowcore fields user_timer, system_timer & steal_clock.
  * to the lowcore fields user_timer, system_timer & steal_clock.
  */
  */
-static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
+static int do_account_vtime(struct task_struct *tsk)
 {
 {
 	u64 timer, clock, user, system, steal;
 	u64 timer, clock, user, system, steal;
 	u64 user_scaled, system_scaled;
 	u64 user_scaled, system_scaled;
@@ -138,7 +138,7 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
 	}
 	}
 	account_user_time(tsk, user);
 	account_user_time(tsk, user);
 	tsk->utimescaled += user_scaled;
 	tsk->utimescaled += user_scaled;
-	account_system_time(tsk, hardirq_offset, system);
+	account_system_time(tsk, 0, system);
 	tsk->stimescaled += system_scaled;
 	tsk->stimescaled += system_scaled;
 
 
 	steal = S390_lowcore.steal_timer;
 	steal = S390_lowcore.steal_timer;
@@ -152,7 +152,7 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
 
 
 void vtime_task_switch(struct task_struct *prev)
 void vtime_task_switch(struct task_struct *prev)
 {
 {
-	do_account_vtime(prev, 0);
+	do_account_vtime(prev);
 	prev->thread.user_timer = S390_lowcore.user_timer;
 	prev->thread.user_timer = S390_lowcore.user_timer;
 	prev->thread.system_timer = S390_lowcore.system_timer;
 	prev->thread.system_timer = S390_lowcore.system_timer;
 	S390_lowcore.user_timer = current->thread.user_timer;
 	S390_lowcore.user_timer = current->thread.user_timer;
@@ -166,7 +166,7 @@ void vtime_task_switch(struct task_struct *prev)
  */
  */
 void vtime_account_user(struct task_struct *tsk)
 void vtime_account_user(struct task_struct *tsk)
 {
 {
-	if (do_account_vtime(tsk, HARDIRQ_OFFSET))
+	if (do_account_vtime(tsk))
 		virt_timer_expire();
 		virt_timer_expire();
 }
 }
 
 

+ 13 - 0
arch/x86/include/asm/bitops.h

@@ -139,6 +139,19 @@ static __always_inline void __clear_bit(long nr, volatile unsigned long *addr)
 	asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
 	asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
 }
 }
 
 
+static __always_inline bool clear_bit_unlock_is_negative_byte(long nr, volatile unsigned long *addr)
+{
+	bool negative;
+	asm volatile(LOCK_PREFIX "andb %2,%1\n\t"
+		CC_SET(s)
+		: CC_OUT(s) (negative), ADDR
+		: "ir" ((char) ~(1 << nr)) : "memory");
+	return negative;
+}
+
+// Let everybody know we have it
+#define clear_bit_unlock_is_negative_byte clear_bit_unlock_is_negative_byte
+
 /*
 /*
  * __clear_bit_unlock - Clears a bit in memory
  * __clear_bit_unlock - Clears a bit in memory
  * @nr: Bit to clear
  * @nr: Bit to clear

+ 3 - 0
arch/x86/kernel/cpu/mcheck/mce_amd.c

@@ -1182,6 +1182,9 @@ static int threshold_create_bank(unsigned int cpu, unsigned int bank)
 	const char *name = get_name(bank, NULL);
 	const char *name = get_name(bank, NULL);
 	int err = 0;
 	int err = 0;
 
 
+	if (!dev)
+		return -ENODEV;
+
 	if (is_shared_bank(bank)) {
 	if (is_shared_bank(bank)) {
 		nb = node_to_amd_nb(amd_get_nb_id(cpu));
 		nb = node_to_amd_nb(amd_get_nb_id(cpu));
 
 

+ 2 - 4
arch/x86/kernel/pci-swiotlb.c

@@ -68,12 +68,10 @@ static struct dma_map_ops swiotlb_dma_ops = {
  */
  */
 int __init pci_swiotlb_detect_override(void)
 int __init pci_swiotlb_detect_override(void)
 {
 {
-	int use_swiotlb = swiotlb | swiotlb_force;
-
-	if (swiotlb_force)
+	if (swiotlb_force == SWIOTLB_FORCE)
 		swiotlb = 1;
 		swiotlb = 1;
 
 
-	return use_swiotlb;
+	return swiotlb;
 }
 }
 IOMMU_INIT_FINISH(pci_swiotlb_detect_override,
 IOMMU_INIT_FINISH(pci_swiotlb_detect_override,
 		  pci_xen_swiotlb_detect,
 		  pci_xen_swiotlb_detect,

+ 4 - 10
arch/x86/kvm/vmx.c

@@ -132,12 +132,6 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO);
 
 
 #define VMX_MISC_EMULATED_PREEMPTION_TIMER_RATE 5
 #define VMX_MISC_EMULATED_PREEMPTION_TIMER_RATE 5
 
 
-#define VMX_VPID_EXTENT_SUPPORTED_MASK		\
-	(VMX_VPID_EXTENT_INDIVIDUAL_ADDR_BIT |	\
-	VMX_VPID_EXTENT_SINGLE_CONTEXT_BIT |	\
-	VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT |	\
-	VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT)
-
 /*
 /*
  * Hyper-V requires all of these, so mark them as supported even though
  * Hyper-V requires all of these, so mark them as supported even though
  * they are just treated the same as all-context.
  * they are just treated the same as all-context.
@@ -10473,12 +10467,12 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
 	    !nested_guest_cr4_valid(vcpu, vmcs12->guest_cr4)) {
 	    !nested_guest_cr4_valid(vcpu, vmcs12->guest_cr4)) {
 		nested_vmx_entry_failure(vcpu, vmcs12,
 		nested_vmx_entry_failure(vcpu, vmcs12,
 			EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
 			EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
-		goto out;
+		return 1;
 	}
 	}
 	if (vmcs12->vmcs_link_pointer != -1ull) {
 	if (vmcs12->vmcs_link_pointer != -1ull) {
 		nested_vmx_entry_failure(vcpu, vmcs12,
 		nested_vmx_entry_failure(vcpu, vmcs12,
 			EXIT_REASON_INVALID_STATE, ENTRY_FAIL_VMCS_LINK_PTR);
 			EXIT_REASON_INVALID_STATE, ENTRY_FAIL_VMCS_LINK_PTR);
-		goto out;
+		return 1;
 	}
 	}
 
 
 	/*
 	/*
@@ -10498,7 +10492,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
 		     ia32e != !!(vmcs12->guest_ia32_efer & EFER_LME))) {
 		     ia32e != !!(vmcs12->guest_ia32_efer & EFER_LME))) {
 			nested_vmx_entry_failure(vcpu, vmcs12,
 			nested_vmx_entry_failure(vcpu, vmcs12,
 				EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
 				EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
-			goto out;
+			return 1;
 		}
 		}
 	}
 	}
 
 
@@ -10516,7 +10510,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
 		    ia32e != !!(vmcs12->host_ia32_efer & EFER_LME)) {
 		    ia32e != !!(vmcs12->host_ia32_efer & EFER_LME)) {
 			nested_vmx_entry_failure(vcpu, vmcs12,
 			nested_vmx_entry_failure(vcpu, vmcs12,
 				EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
 				EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
-			goto out;
+			return 1;
 		}
 		}
 	}
 	}
 
 

+ 7 - 2
arch/x86/kvm/x86.c

@@ -3070,6 +3070,8 @@ static void kvm_vcpu_ioctl_x86_get_vcpu_events(struct kvm_vcpu *vcpu,
 	memset(&events->reserved, 0, sizeof(events->reserved));
 	memset(&events->reserved, 0, sizeof(events->reserved));
 }
 }
 
 
+static void kvm_set_hflags(struct kvm_vcpu *vcpu, unsigned emul_flags);
+
 static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
 static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
 					      struct kvm_vcpu_events *events)
 					      struct kvm_vcpu_events *events)
 {
 {
@@ -3106,10 +3108,13 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
 		vcpu->arch.apic->sipi_vector = events->sipi_vector;
 		vcpu->arch.apic->sipi_vector = events->sipi_vector;
 
 
 	if (events->flags & KVM_VCPUEVENT_VALID_SMM) {
 	if (events->flags & KVM_VCPUEVENT_VALID_SMM) {
+		u32 hflags = vcpu->arch.hflags;
 		if (events->smi.smm)
 		if (events->smi.smm)
-			vcpu->arch.hflags |= HF_SMM_MASK;
+			hflags |= HF_SMM_MASK;
 		else
 		else
-			vcpu->arch.hflags &= ~HF_SMM_MASK;
+			hflags &= ~HF_SMM_MASK;
+		kvm_set_hflags(vcpu, hflags);
+
 		vcpu->arch.smi_pending = events->smi.pending;
 		vcpu->arch.smi_pending = events->smi.pending;
 		if (events->smi.smm_inside_nmi)
 		if (events->smi.smm_inside_nmi)
 			vcpu->arch.hflags |= HF_SMM_INSIDE_NMI_MASK;
 			vcpu->arch.hflags |= HF_SMM_INSIDE_NMI_MASK;

+ 1 - 1
arch/x86/xen/pci-swiotlb-xen.c

@@ -48,7 +48,7 @@ int __init pci_xen_swiotlb_detect(void)
 	 * activate this IOMMU. If running as PV privileged, activate it
 	 * activate this IOMMU. If running as PV privileged, activate it
 	 * irregardless.
 	 * irregardless.
 	 */
 	 */
-	if ((xen_initial_domain() || swiotlb || swiotlb_force))
+	if (xen_initial_domain() || swiotlb || swiotlb_force == SWIOTLB_FORCE)
 		xen_swiotlb = 1;
 		xen_swiotlb = 1;
 
 
 	/* If we are running under Xen, we MUST disable the native SWIOTLB.
 	/* If we are running under Xen, we MUST disable the native SWIOTLB.

+ 3 - 3
arch/x86/xen/setup.c

@@ -713,10 +713,9 @@ static void __init xen_reserve_xen_mfnlist(void)
 		size = PFN_PHYS(xen_start_info->nr_p2m_frames);
 		size = PFN_PHYS(xen_start_info->nr_p2m_frames);
 	}
 	}
 
 
-	if (!xen_is_e820_reserved(start, size)) {
-		memblock_reserve(start, size);
+	memblock_reserve(start, size);
+	if (!xen_is_e820_reserved(start, size))
 		return;
 		return;
-	}
 
 
 #ifdef CONFIG_X86_32
 #ifdef CONFIG_X86_32
 	/*
 	/*
@@ -727,6 +726,7 @@ static void __init xen_reserve_xen_mfnlist(void)
 	BUG();
 	BUG();
 #else
 #else
 	xen_relocate_p2m();
 	xen_relocate_p2m();
+	memblock_free(start, size);
 #endif
 #endif
 }
 }
 
 

+ 7 - 6
block/blk-wbt.c

@@ -544,6 +544,8 @@ static inline bool may_queue(struct rq_wb *rwb, struct rq_wait *rqw,
  * the timer to kick off queuing again.
  * the timer to kick off queuing again.
  */
  */
 static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
 static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
+	__releases(lock)
+	__acquires(lock)
 {
 {
 	struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd());
 	struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd());
 	DEFINE_WAIT(wait);
 	DEFINE_WAIT(wait);
@@ -558,13 +560,12 @@ static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
 		if (may_queue(rwb, rqw, &wait, rw))
 		if (may_queue(rwb, rqw, &wait, rw))
 			break;
 			break;
 
 
-		if (lock)
+		if (lock) {
 			spin_unlock_irq(lock);
 			spin_unlock_irq(lock);
-
-		io_schedule();
-
-		if (lock)
+			io_schedule();
 			spin_lock_irq(lock);
 			spin_lock_irq(lock);
+		} else
+			io_schedule();
 	} while (1);
 	} while (1);
 
 
 	finish_wait(&rqw->wait, &wait);
 	finish_wait(&rqw->wait, &wait);
@@ -595,7 +596,7 @@ static inline bool wbt_should_throttle(struct rq_wb *rwb, struct bio *bio)
  * in an irq held spinlock, if it holds one when calling this function.
  * in an irq held spinlock, if it holds one when calling this function.
  * If we do sleep, we'll release and re-grab it.
  * If we do sleep, we'll release and re-grab it.
  */
  */
-unsigned int wbt_wait(struct rq_wb *rwb, struct bio *bio, spinlock_t *lock)
+enum wbt_flags wbt_wait(struct rq_wb *rwb, struct bio *bio, spinlock_t *lock)
 {
 {
 	unsigned int ret = 0;
 	unsigned int ret = 0;
 
 

+ 1 - 1
drivers/acpi/acpi_watchdog.c

@@ -114,7 +114,7 @@ void __init acpi_watchdog_init(void)
 	pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
 	pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
 					       resources, nresources);
 					       resources, nresources);
 	if (IS_ERR(pdev))
 	if (IS_ERR(pdev))
-		pr_err("Failed to create platform device\n");
+		pr_err("Device creation failed: %ld\n", PTR_ERR(pdev));
 
 
 	kfree(resources);
 	kfree(resources);
 
 

+ 9 - 2
drivers/acpi/glue.c

@@ -98,7 +98,15 @@ static int find_child_checks(struct acpi_device *adev, bool check_children)
 	if (check_children && list_empty(&adev->children))
 	if (check_children && list_empty(&adev->children))
 		return -ENODEV;
 		return -ENODEV;
 
 
-	return sta_present ? FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE;
+	/*
+	 * If the device has a _HID (or _CID) returning a valid ACPI/PNP
+	 * device ID, it is better to make it look less attractive here, so that
+	 * the other device with the same _ADR value (that may not have a valid
+	 * device ID) can be matched going forward.  [This means a second spec
+	 * violation in a row, so whatever we do here is best effort anyway.]
+	 */
+	return sta_present && list_empty(&adev->pnp.ids) ?
+			FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE;
 }
 }
 
 
 struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
 struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
@@ -250,7 +258,6 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev)
 	return 0;
 	return 0;
 
 
  err:
  err:
-	acpi_dma_deconfigure(dev);
 	ACPI_COMPANION_SET(dev, NULL);
 	ACPI_COMPANION_SET(dev, NULL);
 	put_device(dev);
 	put_device(dev);
 	put_device(&acpi_dev->dev);
 	put_device(&acpi_dev->dev);

+ 1 - 0
drivers/acpi/internal.h

@@ -37,6 +37,7 @@ void acpi_amba_init(void);
 static inline void acpi_amba_init(void) {}
 static inline void acpi_amba_init(void) {}
 #endif
 #endif
 int acpi_sysfs_init(void);
 int acpi_sysfs_init(void);
+void acpi_gpe_apply_masked_gpes(void);
 void acpi_container_init(void);
 void acpi_container_init(void);
 void acpi_memory_hotplug_init(void);
 void acpi_memory_hotplug_init(void);
 #ifdef	CONFIG_ACPI_HOTPLUG_IOAPIC
 #ifdef	CONFIG_ACPI_HOTPLUG_IOAPIC

+ 1 - 0
drivers/acpi/scan.c

@@ -2074,6 +2074,7 @@ int __init acpi_scan_init(void)
 		}
 		}
 	}
 	}
 
 
+	acpi_gpe_apply_masked_gpes();
 	acpi_update_all_gpes();
 	acpi_update_all_gpes();
 	acpi_ec_ecdt_start();
 	acpi_ec_ecdt_start();
 
 

+ 56 - 0
drivers/acpi/sysfs.c

@@ -708,6 +708,62 @@ end:
 	return result ? result : size;
 	return result ? result : size;
 }
 }
 
 
+/*
+ * A Quirk Mechanism for GPE Flooding Prevention:
+ *
+ * Quirks may be needed to prevent GPE flooding on a specific GPE. The
+ * flooding typically cannot be detected and automatically prevented by
+ * ACPI_GPE_DISPATCH_NONE check because there is a _Lxx/_Exx prepared in
+ * the AML tables. This normally indicates a feature gap in Linux, thus
+ * instead of providing endless quirk tables, we provide a boot parameter
+ * for those who want this quirk. For example, if the users want to prevent
+ * the GPE flooding for GPE 00, they need to specify the following boot
+ * parameter:
+ *   acpi_mask_gpe=0x00
+ * The masking status can be modified by the following runtime controlling
+ * interface:
+ *   echo unmask > /sys/firmware/acpi/interrupts/gpe00
+ */
+
+/*
+ * Currently, the GPE flooding prevention only supports to mask the GPEs
+ * numbered from 00 to 7f.
+ */
+#define ACPI_MASKABLE_GPE_MAX	0x80
+
+static u64 __initdata acpi_masked_gpes;
+
+static int __init acpi_gpe_set_masked_gpes(char *val)
+{
+	u8 gpe;
+
+	if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
+		return -EINVAL;
+	acpi_masked_gpes |= ((u64)1<<gpe);
+
+	return 1;
+}
+__setup("acpi_mask_gpe=", acpi_gpe_set_masked_gpes);
+
+void __init acpi_gpe_apply_masked_gpes(void)
+{
+	acpi_handle handle;
+	acpi_status status;
+	u8 gpe;
+
+	for (gpe = 0;
+	     gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count);
+	     gpe++) {
+		if (acpi_masked_gpes & ((u64)1<<gpe)) {
+			status = acpi_get_gpe_device(gpe, &handle);
+			if (ACPI_SUCCESS(status)) {
+				pr_info("Masking GPE 0x%x.\n", gpe);
+				(void)acpi_mask_gpe(handle, gpe, TRUE);
+			}
+		}
+	}
+}
+
 void acpi_irq_stats_init(void)
 void acpi_irq_stats_init(void)
 {
 {
 	acpi_status status;
 	acpi_status status;

+ 1 - 0
drivers/base/power/domain.c

@@ -626,6 +626,7 @@ static int genpd_runtime_resume(struct device *dev)
 
 
  out:
  out:
 	/* Measure resume latency. */
 	/* Measure resume latency. */
+	time_start = 0;
 	if (timed && runtime_pm)
 	if (timed && runtime_pm)
 		time_start = ktime_get();
 		time_start = ktime_get();
 
 

+ 2 - 2
drivers/clk/clk-stm32f4.c

@@ -768,5 +768,5 @@ fail:
 	kfree(clks);
 	kfree(clks);
 	iounmap(base);
 	iounmap(base);
 }
 }
-CLK_OF_DECLARE(stm32f42xx_rcc, "st,stm32f42xx-rcc", stm32f4_rcc_init);
-CLK_OF_DECLARE(stm32f46xx_rcc, "st,stm32f469-rcc", stm32f4_rcc_init);
+CLK_OF_DECLARE_DRIVER(stm32f42xx_rcc, "st,stm32f42xx-rcc", stm32f4_rcc_init);
+CLK_OF_DECLARE_DRIVER(stm32f46xx_rcc, "st,stm32f469-rcc", stm32f4_rcc_init);

+ 22 - 5
drivers/clk/renesas/clk-mstp.c

@@ -37,12 +37,14 @@
  * @smstpcr: module stop control register
  * @smstpcr: module stop control register
  * @mstpsr: module stop status register (optional)
  * @mstpsr: module stop status register (optional)
  * @lock: protects writes to SMSTPCR
  * @lock: protects writes to SMSTPCR
+ * @width_8bit: registers are 8-bit, not 32-bit
  */
  */
 struct mstp_clock_group {
 struct mstp_clock_group {
 	struct clk_onecell_data data;
 	struct clk_onecell_data data;
 	void __iomem *smstpcr;
 	void __iomem *smstpcr;
 	void __iomem *mstpsr;
 	void __iomem *mstpsr;
 	spinlock_t lock;
 	spinlock_t lock;
+	bool width_8bit;
 };
 };
 
 
 /**
 /**
@@ -59,6 +61,18 @@ struct mstp_clock {
 
 
 #define to_mstp_clock(_hw) container_of(_hw, struct mstp_clock, hw)
 #define to_mstp_clock(_hw) container_of(_hw, struct mstp_clock, hw)
 
 
+static inline u32 cpg_mstp_read(struct mstp_clock_group *group,
+				u32 __iomem *reg)
+{
+	return group->width_8bit ? readb(reg) : clk_readl(reg);
+}
+
+static inline void cpg_mstp_write(struct mstp_clock_group *group, u32 val,
+				  u32 __iomem *reg)
+{
+	group->width_8bit ? writeb(val, reg) : clk_writel(val, reg);
+}
+
 static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
 static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
 {
 {
 	struct mstp_clock *clock = to_mstp_clock(hw);
 	struct mstp_clock *clock = to_mstp_clock(hw);
@@ -70,12 +84,12 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
 
 
 	spin_lock_irqsave(&group->lock, flags);
 	spin_lock_irqsave(&group->lock, flags);
 
 
-	value = clk_readl(group->smstpcr);
+	value = cpg_mstp_read(group, group->smstpcr);
 	if (enable)
 	if (enable)
 		value &= ~bitmask;
 		value &= ~bitmask;
 	else
 	else
 		value |= bitmask;
 		value |= bitmask;
-	clk_writel(value, group->smstpcr);
+	cpg_mstp_write(group, value, group->smstpcr);
 
 
 	spin_unlock_irqrestore(&group->lock, flags);
 	spin_unlock_irqrestore(&group->lock, flags);
 
 
@@ -83,7 +97,7 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
 		return 0;
 		return 0;
 
 
 	for (i = 1000; i > 0; --i) {
 	for (i = 1000; i > 0; --i) {
-		if (!(clk_readl(group->mstpsr) & bitmask))
+		if (!(cpg_mstp_read(group, group->mstpsr) & bitmask))
 			break;
 			break;
 		cpu_relax();
 		cpu_relax();
 	}
 	}
@@ -114,9 +128,9 @@ static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
 	u32 value;
 	u32 value;
 
 
 	if (group->mstpsr)
 	if (group->mstpsr)
-		value = clk_readl(group->mstpsr);
+		value = cpg_mstp_read(group, group->mstpsr);
 	else
 	else
-		value = clk_readl(group->smstpcr);
+		value = cpg_mstp_read(group, group->smstpcr);
 
 
 	return !(value & BIT(clock->bit_index));
 	return !(value & BIT(clock->bit_index));
 }
 }
@@ -188,6 +202,9 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
 		return;
 		return;
 	}
 	}
 
 
+	if (of_device_is_compatible(np, "renesas,r7s72100-mstp-clocks"))
+		group->width_8bit = true;
+
 	for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
 	for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
 		clks[i] = ERR_PTR(-ENOENT);
 		clks[i] = ERR_PTR(-ENOENT);
 
 

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