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

Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued

Pull in latest drm-next from Dave Airlie to get at all the drm-misc
goodies, specifically:
- dma_fence error state handling rework (Chris needs that for error
  recovery)
- crc support locking changes (Tomeu's i915 crc patches need that).

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Daniel Vetter 8 жил өмнө
parent
commit
05adb1850a
100 өөрчлөгдсөн 688 нэмэгдсэн , 440 устгасан
  1. 12 1
      Documentation/admin-guide/kernel-parameters.txt
  2. 3 3
      Documentation/block/queue-sysfs.txt
  3. 3 1
      Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt
  4. 6 1
      Documentation/devicetree/bindings/power/supply/tps65217_charger.txt
  5. 0 15
      Documentation/driver-api/infrastructure.rst
  6. 29 11
      Documentation/gpu/drm-mm.rst
  7. 11 14
      Documentation/gpu/drm-uapi.rst
  8. 8 7
      Documentation/gpu/introduction.rst
  9. 2 2
      Documentation/networking/mpls-sysctl.txt
  10. 15 12
      Documentation/vfio-mediated-device.txt
  11. 16 6
      MAINTAINERS
  12. 1 1
      Makefile
  13. 1 2
      arch/arm/Kconfig
  14. 1 0
      arch/arm/boot/dts/Makefile
  15. 3 5
      arch/arm/boot/dts/am335x-bone-common.dtsi
  16. 1 0
      arch/arm/boot/dts/am33xx.dtsi
  17. 1 0
      arch/arm/boot/dts/am4372.dtsi
  18. 5 5
      arch/arm/boot/dts/am571x-idk.dts
  19. 9 5
      arch/arm/boot/dts/am572x-idk.dts
  20. 8 1
      arch/arm/boot/dts/am57xx-idk-common.dtsi
  21. 1 0
      arch/arm/boot/dts/dm814x.dtsi
  22. 1 0
      arch/arm/boot/dts/dm816x.dtsi
  23. 1 0
      arch/arm/boot/dts/dra7.dtsi
  24. 16 0
      arch/arm/boot/dts/dra72-evm-tps65917.dtsi
  25. 2 2
      arch/arm/boot/dts/imx31.dtsi
  26. 0 1
      arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
  27. 1 0
      arch/arm/boot/dts/imx6qdl.dtsi
  28. 1 0
      arch/arm/boot/dts/imx6sl.dtsi
  29. 1 0
      arch/arm/boot/dts/imx6sx.dtsi
  30. 1 0
      arch/arm/boot/dts/omap2.dtsi
  31. 2 0
      arch/arm/boot/dts/omap3-n900.dts
  32. 1 0
      arch/arm/boot/dts/omap3.dtsi
  33. 1 0
      arch/arm/boot/dts/omap4.dtsi
  34. 1 0
      arch/arm/boot/dts/omap5.dtsi
  35. 4 0
      arch/arm/boot/dts/qcom-apq8064.dtsi
  36. 1 1
      arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts
  37. 1 1
      arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
  38. 2 1
      arch/arm/boot/dts/vf610-zii-dev-rev-b.dts
  39. 6 6
      arch/arm/mach-davinci/clock.c
  40. 2 0
      arch/arm/mach-davinci/clock.h
  41. 30 2
      arch/arm/mach-davinci/da850.c
  42. 15 19
      arch/arm/mach-davinci/usb-da8xx.c
  43. 0 31
      arch/arm/mach-exynos/platsmp.c
  44. 0 1
      arch/arm/mach-imx/mach-imx1.c
  45. 1 1
      arch/arm/mach-omap2/Makefile
  46. 1 1
      arch/arm/mach-omap2/board-generic.c
  47. 0 160
      arch/arm/mach-omap2/gpio.c
  48. 4 4
      arch/arm/mach-omap2/omap_hwmod.c
  49. 0 4
      arch/arm/mach-omap2/omap_hwmod_common_data.h
  50. 1 3
      arch/arm/mach-omap2/prm_common.c
  51. 5 4
      arch/arm/mach-omap2/timer.c
  52. 76 0
      arch/arm/mach-s3c24xx/common.c
  53. 16 0
      arch/arm64/boot/dts/amlogic/meson-gx.dtsi
  54. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
  55. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
  56. 4 0
      arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
  57. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxl-nexbox-a95x.dts
  58. 5 1
      arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
  59. 16 0
      arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
  60. 4 0
      arch/arm64/boot/dts/amlogic/meson-gxm.dtsi
  61. 1 1
      arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
  62. 10 0
      arch/arm64/boot/dts/qcom/msm8996.dtsi
  63. 1 1
      arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
  64. 1 0
      arch/arm64/configs/defconfig
  65. 9 1
      arch/arm64/include/asm/current.h
  66. 2 1
      arch/arm64/mm/dma-mapping.c
  67. 4 4
      arch/arm64/mm/fault.c
  68. 2 1
      arch/arm64/mm/init.c
  69. 1 0
      arch/blackfin/include/asm/vga.h
  70. 4 1
      arch/mips/kvm/entry.c
  71. 2 2
      arch/mips/kvm/mips.c
  72. 2 0
      arch/openrisc/kernel/vmlinux.lds.S
  73. 0 1
      arch/parisc/include/asm/thread_info.h
  74. 20 3
      arch/parisc/kernel/time.c
  75. 1 1
      arch/parisc/mm/fault.c
  76. 8 0
      arch/s390/include/asm/asm-prototypes.h
  77. 4 4
      arch/s390/kernel/vtime.c
  78. 2 4
      arch/x86/kernel/pci-swiotlb.c
  79. 4 10
      arch/x86/kvm/vmx.c
  80. 7 2
      arch/x86/kvm/x86.c
  81. 1 1
      arch/x86/xen/pci-swiotlb-xen.c
  82. 3 3
      arch/x86/xen/setup.c
  83. 7 6
      block/blk-wbt.c
  84. 1 1
      drivers/acpi/acpi_watchdog.c
  85. 9 2
      drivers/acpi/glue.c
  86. 1 0
      drivers/acpi/internal.h
  87. 1 0
      drivers/acpi/scan.c
  88. 56 0
      drivers/acpi/sysfs.c
  89. 1 0
      drivers/base/power/domain.c
  90. 2 2
      drivers/clk/clk-stm32f4.c
  91. 22 5
      drivers/clk/renesas/clk-mstp.c
  92. 2 0
      drivers/cpufreq/cpufreq-dt-platdev.c
  93. 31 22
      drivers/cpufreq/intel_pstate.c
  94. 10 5
      drivers/devfreq/devfreq.c
  95. 1 1
      drivers/devfreq/exynos-bus.c
  96. 4 5
      drivers/dma-buf/dma-buf.c
  97. 26 0
      drivers/dma-buf/dma-fence.c
  98. 8 9
      drivers/dma-buf/sync_debug.c
  99. 2 4
      drivers/dma-buf/sync_file.c
  100. 8 2
      drivers/firmware/arm_scpi.c

+ 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
 --------------------------
 --------------------------
 
 

+ 29 - 11
Documentation/gpu/drm-mm.rst

@@ -34,25 +34,26 @@ TTM initialization
 ------------------
 ------------------
 
 
     **Warning**
     **Warning**
-
     This section is outdated.
     This section is outdated.
 
 
-Drivers wishing to support TTM must fill out a drm_bo_driver
-structure. The structure contains several fields with function pointers
-for initializing the TTM, allocating and freeing memory, waiting for
-command completion and fence synchronization, and memory migration. See
-the radeon_ttm.c file for an example of usage.
+Drivers wishing to support TTM must pass a filled :c:type:`ttm_bo_driver
+<ttm_bo_driver>` structure to ttm_bo_device_init, together with an
+initialized global reference to the memory manager.  The ttm_bo_driver
+structure contains several fields with function pointers for
+initializing the TTM, allocating and freeing memory, waiting for command
+completion and fence synchronization, and memory migration.
 
 
-The ttm_global_reference structure is made up of several fields:
+The :c:type:`struct drm_global_reference <drm_global_reference>` is made
+up of several fields:
 
 
 .. code-block:: c
 .. code-block:: c
 
 
-              struct ttm_global_reference {
+              struct drm_global_reference {
                       enum ttm_global_types global_type;
                       enum ttm_global_types global_type;
                       size_t size;
                       size_t size;
                       void *object;
                       void *object;
-                      int (*init) (struct ttm_global_reference *);
-                      void (*release) (struct ttm_global_reference *);
+                      int (*init) (struct drm_global_reference *);
+                      void (*release) (struct drm_global_reference *);
               };
               };
 
 
 
 
@@ -76,6 +77,12 @@ ttm_bo_global_release(), respectively. Also, like the previous
 object, ttm_global_item_ref() is used to create an initial reference
 object, ttm_global_item_ref() is used to create an initial reference
 count for the TTM, which will call your initialization function.
 count for the TTM, which will call your initialization function.
 
 
+See the radeon_ttm.c file for an example of usage.
+
+.. kernel-doc:: drivers/gpu/drm/drm_global.c
+   :export:
+
+
 The Graphics Execution Manager (GEM)
 The Graphics Execution Manager (GEM)
 ====================================
 ====================================
 
 
@@ -303,6 +310,17 @@ created.
 Drivers that want to map the GEM object upfront instead of handling page
 Drivers that want to map the GEM object upfront instead of handling page
 faults can implement their own mmap file operation handler.
 faults can implement their own mmap file operation handler.
 
 
+For platforms without MMU the GEM core provides a helper method
+:c:func:`drm_gem_cma_get_unmapped_area`. The mmap() routines will call
+this to get a proposed address for the mapping.
+
+To use :c:func:`drm_gem_cma_get_unmapped_area`, drivers must fill the
+struct :c:type:`struct file_operations <file_operations>` get_unmapped_area
+field with a pointer on :c:func:`drm_gem_cma_get_unmapped_area`.
+
+More detailed information about get_unmapped_area can be found in
+Documentation/nommu-mmap.txt
+
 Memory Coherency
 Memory Coherency
 ----------------
 ----------------
 
 
@@ -442,7 +460,7 @@ LRU Scan/Eviction Support
 -------------------------
 -------------------------
 
 
 .. kernel-doc:: drivers/gpu/drm/drm_mm.c
 .. kernel-doc:: drivers/gpu/drm/drm_mm.c
-   :doc: lru scan roaster
+   :doc: lru scan roster
 
 
 DRM MM Range Allocator Function References
 DRM MM Range Allocator Function References
 ------------------------------------------
 ------------------------------------------

+ 11 - 14
Documentation/gpu/drm-uapi.rst

@@ -156,8 +156,12 @@ other hand, a driver requires shared state between clients which is
 visible to user-space and accessible beyond open-file boundaries, they
 visible to user-space and accessible beyond open-file boundaries, they
 cannot support render nodes.
 cannot support render nodes.
 
 
+
+Testing and validation
+======================
+
 Validating changes with IGT
 Validating changes with IGT
-===========================
+---------------------------
 
 
 There's a collection of tests that aims to cover the whole functionality of
 There's a collection of tests that aims to cover the whole functionality of
 DRM drivers and that can be used to check that changes to DRM drivers or the
 DRM drivers and that can be used to check that changes to DRM drivers or the
@@ -193,6 +197,12 @@ run-tests.sh is a wrapper around piglit that will execute the tests matching
 the -t options. A report in HTML format will be available in
 the -t options. A report in HTML format will be available in
 ./results/html/index.html. Results can be compared with piglit.
 ./results/html/index.html. Results can be compared with piglit.
 
 
+Display CRC Support
+-------------------
+
+.. kernel-doc:: drivers/gpu/drm/drm_debugfs_crc.c
+   :doc: CRC ABI
+
 VBlank event handling
 VBlank event handling
 =====================
 =====================
 
 
@@ -209,16 +219,3 @@ DRM_IOCTL_MODESET_CTL
     mode setting, since on many devices the vertical blank counter is
     mode setting, since on many devices the vertical blank counter is
     reset to 0 at some point during modeset. Modern drivers should not
     reset to 0 at some point during modeset. Modern drivers should not
     call this any more since with kernel mode setting it is a no-op.
     call this any more since with kernel mode setting it is a no-op.
-
-This second part of the GPU Driver Developer's Guide documents driver
-code, implementation details and also all the driver-specific userspace
-interfaces. Especially since all hardware-acceleration interfaces to
-userspace are driver specific for efficiency and other reasons these
-interfaces can be rather substantial. Hence every driver has its own
-chapter.
-
-Testing and validation
-======================
-
-.. kernel-doc:: drivers/gpu/drm/drm_debugfs_crc.c
-   :doc: CRC ABI

+ 8 - 7
Documentation/gpu/introduction.rst

@@ -23,13 +23,12 @@ For consistency this documentation uses American English. Abbreviations
 are written as all-uppercase, for example: DRM, KMS, IOCTL, CRTC, and so
 are written as all-uppercase, for example: DRM, KMS, IOCTL, CRTC, and so
 on. To aid in reading, documentations make full use of the markup
 on. To aid in reading, documentations make full use of the markup
 characters kerneldoc provides: @parameter for function parameters,
 characters kerneldoc provides: @parameter for function parameters,
-@member for structure members, &structure to reference structures and
-function() for functions. These all get automatically hyperlinked if
-kerneldoc for the referenced objects exists. When referencing entries in
-function vtables please use ->vfunc(). Note that kerneldoc does not
-support referencing struct members directly, so please add a reference
-to the vtable struct somewhere in the same paragraph or at least
-section.
+@member for structure members (within the same structure), &struct structure to
+reference structures and function() for functions. These all get automatically
+hyperlinked if kerneldoc for the referenced objects exists. When referencing
+entries in function vtables (and structure members in general) please use
+&vtable_name.vfunc. Unfortunately this does not yet yield a direct link to the
+member, only the structure.
 
 
 Except in special situations (to separate locked from unlocked variants)
 Except in special situations (to separate locked from unlocked variants)
 locking requirements for functions aren't documented in the kerneldoc.
 locking requirements for functions aren't documented in the kerneldoc.
@@ -49,3 +48,5 @@ section name should be all upper-case or not, and whether it should end
 in a colon or not. Go with the file-local style. Other common section
 in a colon or not. Go with the file-local style. Other common section
 names are "Notes" with information for dangerous or tricky corner cases,
 names are "Notes" with information for dangerous or tricky corner cases,
 and "FIXME" where the interface could be cleaned up.
 and "FIXME" where the interface could be cleaned up.
+
+Also read the :ref:`guidelines for the kernel documentation at large <doc_guide>`.

+ 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

+ 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 = -rc2
+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

+ 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()

+ 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 - 0
arch/blackfin/include/asm/vga.h

@@ -0,0 +1 @@
+#include <asm-generic/vga.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();
 }
 }
 
 

+ 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);
 
 

+ 2 - 0
drivers/cpufreq/cpufreq-dt-platdev.c

@@ -26,6 +26,8 @@ static const struct of_device_id machines[] __initconst = {
 	{ .compatible = "allwinner,sun8i-a83t", },
 	{ .compatible = "allwinner,sun8i-a83t", },
 	{ .compatible = "allwinner,sun8i-h3", },
 	{ .compatible = "allwinner,sun8i-h3", },
 
 
+	{ .compatible = "apm,xgene-shadowcat", },
+
 	{ .compatible = "arm,integrator-ap", },
 	{ .compatible = "arm,integrator-ap", },
 	{ .compatible = "arm,integrator-cp", },
 	{ .compatible = "arm,integrator-cp", },
 
 

+ 31 - 22
drivers/cpufreq/intel_pstate.c

@@ -857,13 +857,13 @@ static struct freq_attr *hwp_cpufreq_attrs[] = {
 	NULL,
 	NULL,
 };
 };
 
 
-static void intel_pstate_hwp_set(const struct cpumask *cpumask)
+static void intel_pstate_hwp_set(struct cpufreq_policy *policy)
 {
 {
 	int min, hw_min, max, hw_max, cpu, range, adj_range;
 	int min, hw_min, max, hw_max, cpu, range, adj_range;
 	struct perf_limits *perf_limits = limits;
 	struct perf_limits *perf_limits = limits;
 	u64 value, cap;
 	u64 value, cap;
 
 
-	for_each_cpu(cpu, cpumask) {
+	for_each_cpu(cpu, policy->cpus) {
 		int max_perf_pct, min_perf_pct;
 		int max_perf_pct, min_perf_pct;
 		struct cpudata *cpu_data = all_cpu_data[cpu];
 		struct cpudata *cpu_data = all_cpu_data[cpu];
 		s16 epp;
 		s16 epp;
@@ -949,7 +949,7 @@ skip_epp:
 static int intel_pstate_hwp_set_policy(struct cpufreq_policy *policy)
 static int intel_pstate_hwp_set_policy(struct cpufreq_policy *policy)
 {
 {
 	if (hwp_active)
 	if (hwp_active)
-		intel_pstate_hwp_set(policy->cpus);
+		intel_pstate_hwp_set(policy);
 
 
 	return 0;
 	return 0;
 }
 }
@@ -968,19 +968,28 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy)
 
 
 static int intel_pstate_resume(struct cpufreq_policy *policy)
 static int intel_pstate_resume(struct cpufreq_policy *policy)
 {
 {
+	int ret;
+
 	if (!hwp_active)
 	if (!hwp_active)
 		return 0;
 		return 0;
 
 
+	mutex_lock(&intel_pstate_limits_lock);
+
 	all_cpu_data[policy->cpu]->epp_policy = 0;
 	all_cpu_data[policy->cpu]->epp_policy = 0;
 
 
-	return intel_pstate_hwp_set_policy(policy);
+	ret = intel_pstate_hwp_set_policy(policy);
+
+	mutex_unlock(&intel_pstate_limits_lock);
+
+	return ret;
 }
 }
 
 
-static void intel_pstate_hwp_set_online_cpus(void)
+static void intel_pstate_update_policies(void)
 {
 {
-	get_online_cpus();
-	intel_pstate_hwp_set(cpu_online_mask);
-	put_online_cpus();
+	int cpu;
+
+	for_each_possible_cpu(cpu)
+		cpufreq_update_policy(cpu);
 }
 }
 
 
 /************************** debugfs begin ************************/
 /************************** debugfs begin ************************/
@@ -1018,10 +1027,6 @@ static void __init intel_pstate_debug_expose_params(void)
 	struct dentry *debugfs_parent;
 	struct dentry *debugfs_parent;
 	int i = 0;
 	int i = 0;
 
 
-	if (hwp_active ||
-	    pstate_funcs.get_target_pstate == get_target_pstate_use_cpu_load)
-		return;
-
 	debugfs_parent = debugfs_create_dir("pstate_snb", NULL);
 	debugfs_parent = debugfs_create_dir("pstate_snb", NULL);
 	if (IS_ERR_OR_NULL(debugfs_parent))
 	if (IS_ERR_OR_NULL(debugfs_parent))
 		return;
 		return;
@@ -1105,11 +1110,10 @@ static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
 
 
 	limits->no_turbo = clamp_t(int, input, 0, 1);
 	limits->no_turbo = clamp_t(int, input, 0, 1);
 
 
-	if (hwp_active)
-		intel_pstate_hwp_set_online_cpus();
-
 	mutex_unlock(&intel_pstate_limits_lock);
 	mutex_unlock(&intel_pstate_limits_lock);
 
 
+	intel_pstate_update_policies();
+
 	return count;
 	return count;
 }
 }
 
 
@@ -1134,11 +1138,10 @@ static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
 				   limits->max_perf_pct);
 				   limits->max_perf_pct);
 	limits->max_perf = div_ext_fp(limits->max_perf_pct, 100);
 	limits->max_perf = div_ext_fp(limits->max_perf_pct, 100);
 
 
-	if (hwp_active)
-		intel_pstate_hwp_set_online_cpus();
-
 	mutex_unlock(&intel_pstate_limits_lock);
 	mutex_unlock(&intel_pstate_limits_lock);
 
 
+	intel_pstate_update_policies();
+
 	return count;
 	return count;
 }
 }
 
 
@@ -1163,11 +1166,10 @@ static ssize_t store_min_perf_pct(struct kobject *a, struct attribute *b,
 				   limits->min_perf_pct);
 				   limits->min_perf_pct);
 	limits->min_perf = div_ext_fp(limits->min_perf_pct, 100);
 	limits->min_perf = div_ext_fp(limits->min_perf_pct, 100);
 
 
-	if (hwp_active)
-		intel_pstate_hwp_set_online_cpus();
-
 	mutex_unlock(&intel_pstate_limits_lock);
 	mutex_unlock(&intel_pstate_limits_lock);
 
 
+	intel_pstate_update_policies();
+
 	return count;
 	return count;
 }
 }
 
 
@@ -2153,8 +2155,12 @@ static int intel_cpufreq_verify_policy(struct cpufreq_policy *policy)
 	if (per_cpu_limits)
 	if (per_cpu_limits)
 		perf_limits = cpu->perf_limits;
 		perf_limits = cpu->perf_limits;
 
 
+	mutex_lock(&intel_pstate_limits_lock);
+
 	intel_pstate_update_perf_limits(policy, perf_limits);
 	intel_pstate_update_perf_limits(policy, perf_limits);
 
 
+	mutex_unlock(&intel_pstate_limits_lock);
+
 	return 0;
 	return 0;
 }
 }
 
 
@@ -2487,7 +2493,10 @@ hwp_cpu_matched:
 	if (rc)
 	if (rc)
 		goto out;
 		goto out;
 
 
-	intel_pstate_debug_expose_params();
+	if (intel_pstate_driver == &intel_pstate && !hwp_active &&
+	    pstate_funcs.get_target_pstate != get_target_pstate_use_cpu_load)
+		intel_pstate_debug_expose_params();
+
 	intel_pstate_sysfs_expose_params();
 	intel_pstate_sysfs_expose_params();
 
 
 	if (hwp_active)
 	if (hwp_active)

+ 10 - 5
drivers/devfreq/devfreq.c

@@ -593,11 +593,16 @@ struct devfreq *devfreq_add_device(struct device *dev,
 	list_add(&devfreq->node, &devfreq_list);
 	list_add(&devfreq->node, &devfreq_list);
 
 
 	governor = find_devfreq_governor(devfreq->governor_name);
 	governor = find_devfreq_governor(devfreq->governor_name);
-	if (!IS_ERR(governor))
-		devfreq->governor = governor;
-	if (devfreq->governor)
-		err = devfreq->governor->event_handler(devfreq,
-					DEVFREQ_GOV_START, NULL);
+	if (IS_ERR(governor)) {
+		dev_err(dev, "%s: Unable to find governor for the device\n",
+			__func__);
+		err = PTR_ERR(governor);
+		goto err_init;
+	}
+
+	devfreq->governor = governor;
+	err = devfreq->governor->event_handler(devfreq, DEVFREQ_GOV_START,
+						NULL);
 	if (err) {
 	if (err) {
 		dev_err(dev, "%s: Unable to start governor for the device\n",
 		dev_err(dev, "%s: Unable to start governor for the device\n",
 			__func__);
 			__func__);

+ 1 - 1
drivers/devfreq/exynos-bus.c

@@ -497,7 +497,7 @@ passive:
 	if (IS_ERR(bus->devfreq)) {
 	if (IS_ERR(bus->devfreq)) {
 		dev_err(dev,
 		dev_err(dev,
 			"failed to add devfreq dev with passive governor\n");
 			"failed to add devfreq dev with passive governor\n");
-		ret = -EPROBE_DEFER;
+		ret = PTR_ERR(bus->devfreq);
 		goto err;
 		goto err;
 	}
 	}
 
 

+ 4 - 5
drivers/dma-buf/dma-buf.c

@@ -128,7 +128,7 @@ static loff_t dma_buf_llseek(struct file *file, loff_t offset, int whence)
  * DOC: fence polling
  * DOC: fence polling
  *
  *
  * To support cross-device and cross-driver synchronization of buffer access
  * To support cross-device and cross-driver synchronization of buffer access
- * implicit fences (represented internally in the kernel with struct &fence) can
+ * implicit fences (represented internally in the kernel with &struct fence) can
  * be attached to a &dma_buf. The glue for that and a few related things are
  * be attached to a &dma_buf. The glue for that and a few related things are
  * provided in the &reservation_object structure.
  * provided in the &reservation_object structure.
  *
  *
@@ -373,7 +373,7 @@ static inline int is_dma_buf_file(struct file *file)
  * Additionally, provide a name string for exporter; useful in debugging.
  * Additionally, provide a name string for exporter; useful in debugging.
  *
  *
  * @exp_info:	[in]	holds all the export related information provided
  * @exp_info:	[in]	holds all the export related information provided
- *			by the exporter. see struct &dma_buf_export_info
+ *			by the exporter. see &struct dma_buf_export_info
  *			for further details.
  *			for further details.
  *
  *
  * Returns, on success, a newly created dma_buf object, which wraps the
  * Returns, on success, a newly created dma_buf object, which wraps the
@@ -516,9 +516,8 @@ EXPORT_SYMBOL_GPL(dma_buf_get);
  * Uses file's refcounting done implicitly by fput().
  * Uses file's refcounting done implicitly by fput().
  *
  *
  * If, as a result of this call, the refcount becomes 0, the 'release' file
  * If, as a result of this call, the refcount becomes 0, the 'release' file
- * operation related to this fd is called. It calls the release operation of
- * struct &dma_buf_ops in turn, and frees the memory allocated for dmabuf when
- * exported.
+ * operation related to this fd is called. It calls &dma_buf_ops.release vfunc
+ * in turn, and frees the memory allocated for dmabuf when exported.
  */
  */
 void dma_buf_put(struct dma_buf *dmabuf)
 void dma_buf_put(struct dma_buf *dmabuf)
 {
 {

+ 26 - 0
drivers/dma-buf/dma-fence.c

@@ -281,6 +281,31 @@ int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
 }
 }
 EXPORT_SYMBOL(dma_fence_add_callback);
 EXPORT_SYMBOL(dma_fence_add_callback);
 
 
+/**
+ * dma_fence_get_status - returns the status upon completion
+ * @fence: [in]	the dma_fence to query
+ *
+ * This wraps dma_fence_get_status_locked() to return the error status
+ * condition on a signaled fence. See dma_fence_get_status_locked() for more
+ * details.
+ *
+ * Returns 0 if the fence has not yet been signaled, 1 if the fence has
+ * been signaled without an error condition, or a negative error code
+ * if the fence has been completed in err.
+ */
+int dma_fence_get_status(struct dma_fence *fence)
+{
+	unsigned long flags;
+	int status;
+
+	spin_lock_irqsave(fence->lock, flags);
+	status = dma_fence_get_status_locked(fence);
+	spin_unlock_irqrestore(fence->lock, flags);
+
+	return status;
+}
+EXPORT_SYMBOL(dma_fence_get_status);
+
 /**
 /**
  * dma_fence_remove_callback - remove a callback from the signaling list
  * dma_fence_remove_callback - remove a callback from the signaling list
  * @fence:	[in]	the fence to wait on
  * @fence:	[in]	the fence to wait on
@@ -541,6 +566,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
 	fence->context = context;
 	fence->context = context;
 	fence->seqno = seqno;
 	fence->seqno = seqno;
 	fence->flags = 0UL;
 	fence->flags = 0UL;
+	fence->error = 0;
 
 
 	trace_dma_fence_init(fence);
 	trace_dma_fence_init(fence);
 }
 }

+ 8 - 9
drivers/dma-buf/sync_debug.c

@@ -62,30 +62,29 @@ void sync_file_debug_remove(struct sync_file *sync_file)
 
 
 static const char *sync_status_str(int status)
 static const char *sync_status_str(int status)
 {
 {
-	if (status == 0)
-		return "signaled";
+	if (status < 0)
+		return "error";
 
 
 	if (status > 0)
 	if (status > 0)
-		return "active";
+		return "signaled";
 
 
-	return "error";
+	return "active";
 }
 }
 
 
 static void sync_print_fence(struct seq_file *s,
 static void sync_print_fence(struct seq_file *s,
 			     struct dma_fence *fence, bool show)
 			     struct dma_fence *fence, bool show)
 {
 {
-	int status = 1;
 	struct sync_timeline *parent = dma_fence_parent(fence);
 	struct sync_timeline *parent = dma_fence_parent(fence);
+	int status;
 
 
-	if (dma_fence_is_signaled_locked(fence))
-		status = fence->status;
+	status = dma_fence_get_status_locked(fence);
 
 
 	seq_printf(s, "  %s%sfence %s",
 	seq_printf(s, "  %s%sfence %s",
 		   show ? parent->name : "",
 		   show ? parent->name : "",
 		   show ? "_" : "",
 		   show ? "_" : "",
 		   sync_status_str(status));
 		   sync_status_str(status));
 
 
-	if (status <= 0) {
+	if (status) {
 		struct timespec64 ts64 =
 		struct timespec64 ts64 =
 			ktime_to_timespec64(fence->timestamp);
 			ktime_to_timespec64(fence->timestamp);
 
 
@@ -136,7 +135,7 @@ static void sync_print_sync_file(struct seq_file *s,
 	int i;
 	int i;
 
 
 	seq_printf(s, "[%p] %s: %s\n", sync_file, sync_file->name,
 	seq_printf(s, "[%p] %s: %s\n", sync_file, sync_file->name,
-		   sync_status_str(!dma_fence_is_signaled(sync_file->fence)));
+		   sync_status_str(dma_fence_get_status(sync_file->fence)));
 
 
 	if (dma_fence_is_array(sync_file->fence)) {
 	if (dma_fence_is_array(sync_file->fence)) {
 		struct dma_fence_array *array = to_dma_fence_array(sync_file->fence);
 		struct dma_fence_array *array = to_dma_fence_array(sync_file->fence);

+ 2 - 4
drivers/dma-buf/sync_file.c

@@ -373,10 +373,8 @@ static void sync_fill_fence_info(struct dma_fence *fence,
 		sizeof(info->obj_name));
 		sizeof(info->obj_name));
 	strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
 	strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
 		sizeof(info->driver_name));
 		sizeof(info->driver_name));
-	if (dma_fence_is_signaled(fence))
-		info->status = fence->status >= 0 ? 1 : fence->status;
-	else
-		info->status = 0;
+
+	info->status = dma_fence_get_status(fence);
 	info->timestamp_ns = ktime_to_ns(fence->timestamp);
 	info->timestamp_ns = ktime_to_ns(fence->timestamp);
 }
 }
 
 

+ 8 - 2
drivers/firmware/arm_scpi.c

@@ -721,11 +721,17 @@ static int scpi_sensor_get_value(u16 sensor, u64 *val)
 
 
 	ret = scpi_send_message(CMD_SENSOR_VALUE, &id, sizeof(id),
 	ret = scpi_send_message(CMD_SENSOR_VALUE, &id, sizeof(id),
 				&buf, sizeof(buf));
 				&buf, sizeof(buf));
-	if (!ret)
+	if (ret)
+		return ret;
+
+	if (scpi_info->is_legacy)
+		/* only 32-bits supported, hi_val can be junk */
+		*val = le32_to_cpu(buf.lo_val);
+	else
 		*val = (u64)le32_to_cpu(buf.hi_val) << 32 |
 		*val = (u64)le32_to_cpu(buf.hi_val) << 32 |
 			le32_to_cpu(buf.lo_val);
 			le32_to_cpu(buf.lo_val);
 
 
-	return ret;
+	return 0;
 }
 }
 
 
 static int scpi_device_get_power_state(u16 dev_id)
 static int scpi_device_get_power_state(u16 dev_id)

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