Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Dec 2014 22:48:22 +0000 (14:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Dec 2014 22:48:22 +0000 (14:48 -0800)
Pull ARM SoC driver updates from Arnd Bergmann:
 "These are changes for drivers that are intimately tied to some SoC and
  for some reason could not get merged through the respective subsystem
  maintainer tree.

  The largest single change here this time around is the Tegra
  iommu/memory controller driver, which gets updated to the new iommu DT
  binding.  More drivers like this are likely to follow for the
  following merge window, but we should be able to do those through the
  iommu maintainer.

  Other notable changes are:
   - reset controller drivers from the reset maintainer (socfpga, sti,
     berlin)
   - fixes for the keystone navigator driver merged last time
   - at91 rtc driver changes related to the at91 cleanups
   - ARM perf driver changes from Will Deacon
   - updates for the brcmstb_gisb driver"

* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits)
  clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
  clocksource: arch_timer: Fix code to use physical timers when requested
  memory: Add NVIDIA Tegra memory controller support
  bus: brcmstb_gisb: Add register offset tables for older chips
  bus: brcmstb_gisb: Look up register offsets in a table
  bus: brcmstb_gisb: Introduce wrapper functions for MMIO accesses
  bus: brcmstb_gisb: Make the driver buildable on MIPS
  of: Add NVIDIA Tegra memory controller binding
  ARM: tegra: Move AHB Kconfig to drivers/amba
  amba: Add Kconfig file
  clk: tegra: Implement memory-controller clock
  serial: samsung: Fix serial config dependencies for exynos7
  bus: brcmstb_gisb: resolve section mismatch
  ARM: common: edma: edma_pm_resume may be unused
  ARM: common: edma: add suspend resume hook
  powerpc/iommu: Rename iommu_[un]map_sg functions
  rtc: at91sam9: add DT bindings documentation
  rtc: at91sam9: use clk API instead of relying on AT91_SLOW_CLOCK
  ARM: at91: add clk_lookup entry for RTT devices
  rtc: at91sam9: rework the Kconfig description
  ...

1  2 
arch/arm/Kconfig
arch/arm/common/edma.c
arch/arm64/Kconfig

diff --combined arch/arm/Kconfig
index 8db9dc07f8accfce5f6d9f36d927d9eae1fee4a1,643567258f92ebfee1a8d7ca7ed2d54ad00fa2f0..c8424a85bc0453748103518743f3bab68f81d77b
@@@ -320,6 -320,24 +320,6 @@@ config ARCH_MULTIPLATFOR
        select SPARSE_IRQ
        select USE_OF
  
 -config ARCH_INTEGRATOR
 -      bool "ARM Ltd. Integrator family"
 -      select ARM_AMBA
 -      select ARM_PATCH_PHYS_VIRT if MMU
 -      select AUTO_ZRELADDR
 -      select COMMON_CLK
 -      select COMMON_CLK_VERSATILE
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_TCM
 -      select ICST
 -      select MULTI_IRQ_HANDLER
 -      select PLAT_VERSATILE
 -      select SPARSE_IRQ
 -      select USE_OF
 -      select VERSATILE_FPGA_IRQ
 -      help
 -        Support for ARM's Integrator platform.
 -
  config ARCH_REALVIEW
        bool "ARM Ltd. RealView family"
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ICST
        select NEED_MACH_MEMORY_H
        select PLAT_VERSATILE
 +      select PLAT_VERSATILE_SCHED_CLOCK
        help
          This enables support for ARM Ltd RealView boards.
  
@@@ -348,7 -365,6 +348,7 @@@ config ARCH_VERSATIL
        select ICST
        select PLAT_VERSATILE
        select PLAT_VERSATILE_CLOCK
 +      select PLAT_VERSATILE_SCHED_CLOCK
        select VERSATILE_FPGA_IRQ
        help
          This enables support for ARM Ltd Versatile board.
@@@ -839,8 -855,6 +839,8 @@@ config ARCH_VIR
  #
  source "arch/arm/mach-mvebu/Kconfig"
  
 +source "arch/arm/mach-asm9260/Kconfig"
 +
  source "arch/arm/mach-at91/Kconfig"
  
  source "arch/arm/mach-axxia/Kconfig"
@@@ -1246,9 -1260,6 +1246,6 @@@ source "arch/arm/common/Kconfig
  
  menu "Bus support"
  
- config ARM_AMBA
-       bool
  config ISA
        bool
        help
diff --combined arch/arm/common/edma.c
index 72041f002b7ea46447a3b060e4e3c96b6b6f8c85,e093f2fcee7a08e18af7a0a36246127eefbb5c92..5662a872689b39c04e09eef6ac80b9f81d168107
@@@ -26,7 -26,6 +26,7 @@@
  #include <linux/io.h>
  #include <linux/slab.h>
  #include <linux/edma.h>
 +#include <linux/dma-mapping.h>
  #include <linux/of_address.h>
  #include <linux/of_device.h>
  #include <linux/of_dma.h>
@@@ -245,6 -244,8 +245,8 @@@ struct edma 
        /* list of channels with no even trigger; terminated by "-1" */
        const s8        *noevent;
  
+       struct edma_soc_info *info;
        /* The edma_inuse bit for each PaRAM slot is clear unless the
         * channel is in use ... by ARM or DSP, for QDMA, or whatever.
         */
@@@ -296,7 -297,7 +298,7 @@@ static void map_dmach_queue(unsigned ct
                        ~(0x7 << bit), queue_no << bit);
  }
  
- static void __init assign_priority_to_queue(unsigned ctlr, int queue_no,
+ static void assign_priority_to_queue(unsigned ctlr, int queue_no,
                int priority)
  {
        int bit = queue_no * 4;
   * included in that particular EDMA variant (Eg : dm646x)
   *
   */
- static void __init map_dmach_param(unsigned ctlr)
+ static void map_dmach_param(unsigned ctlr)
  {
        int i;
        for (i = 0; i < EDMA_MAX_DMACH; i++)
@@@ -1624,11 -1625,6 +1626,11 @@@ static int edma_probe(struct platform_d
        struct device_node      *node = pdev->dev.of_node;
        struct device           *dev = &pdev->dev;
        int                     ret;
 +      struct platform_device_info edma_dev_info = {
 +              .name = "edma-dma-engine",
 +              .dma_mask = DMA_BIT_MASK(32),
 +              .parent = &pdev->dev,
 +      };
  
        if (node) {
                /* Check if this is a second instance registered */
                        edma_write_array2(j, EDMA_DRAE, i, 1, 0x0);
                        edma_write_array(j, EDMA_QRAE, i, 0x0);
                }
+               edma_cc[j]->info = info[j];
                arch_num_cc++;
 +
 +              edma_dev_info.id = j;
 +              platform_device_register_full(&edma_dev_info);
        }
  
        return 0;
  }
  
+ #ifdef CONFIG_PM_SLEEP
+ static int edma_pm_resume(struct device *dev)
+ {
+       int i, j;
+       for (j = 0; j < arch_num_cc; j++) {
+               struct edma *cc = edma_cc[j];
+               s8 (*queue_priority_mapping)[2];
+               queue_priority_mapping = cc->info->queue_priority_mapping;
+               /* Event queue priority mapping */
+               for (i = 0; queue_priority_mapping[i][0] != -1; i++)
+                       assign_priority_to_queue(j,
+                                                queue_priority_mapping[i][0],
+                                                queue_priority_mapping[i][1]);
+               /*
+                * Map the channel to param entry if channel mapping logic
+                * exist
+                */
+               if (edma_read(j, EDMA_CCCFG) & CHMAP_EXIST)
+                       map_dmach_param(j);
+               for (i = 0; i < cc->num_channels; i++) {
+                       if (test_bit(i, cc->edma_inuse)) {
+                               /* ensure access through shadow region 0 */
+                               edma_or_array2(j, EDMA_DRAE, 0, i >> 5,
+                                              BIT(i & 0x1f));
+                               setup_dma_interrupt(i,
+                                                   cc->intr_data[i].callback,
+                                                   cc->intr_data[i].data);
+                       }
+               }
+       }
+       return 0;
+ }
+ #endif
+ static const struct dev_pm_ops edma_pm_ops = {
+       SET_LATE_SYSTEM_SLEEP_PM_OPS(NULL, edma_pm_resume)
+ };
  static struct platform_driver edma_driver = {
        .driver = {
                .name   = "edma",
+               .pm     = &edma_pm_ops,
                .of_match_table = edma_of_ids,
        },
        .probe = edma_probe,
diff --combined arch/arm64/Kconfig
index 7c79c649437986a71ab1425dd08d3bd6c9fe0db7,db1aa5446a571d63a2a8994ae2ed767b627bbb96..6caad542817839bcbef0c951c41f0f38cf5b6cb4
@@@ -34,16 -34,13 +34,16 @@@ config ARM6
        select GENERIC_TIME_VSYSCALL
        select HANDLE_DOMAIN_IRQ
        select HARDIRQS_SW_RESEND
 +      select HAVE_ALIGNED_STRUCT_PAGE if SLUB
        select HAVE_ARCH_AUDITSYSCALL
        select HAVE_ARCH_JUMP_LABEL
        select HAVE_ARCH_KGDB
 +      select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_BPF_JIT
        select HAVE_C_RECORDMCOUNT
        select HAVE_CC_STACKPROTECTOR
 +      select HAVE_CMPXCHG_DOUBLE
        select HAVE_DEBUG_BUGVERBOSE
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_API_DEBUG
@@@ -169,9 -166,6 +169,6 @@@ endmen
  
  menu "Bus support"
  
- config ARM_AMBA
-       bool
  config PCI
        bool "PCI support"
        help
@@@ -196,114 -190,6 +193,114 @@@ endmen
  
  menu "Kernel Features"
  
 +menu "ARM errata workarounds via the alternatives framework"
 +
 +config ARM64_ERRATUM_826319
 +      bool "Cortex-A53: 826319: System might deadlock if a write cannot complete until read data is accepted"
 +      default y
 +      help
 +        This option adds an alternative code sequence to work around ARM
 +        erratum 826319 on Cortex-A53 parts up to r0p2 with an AMBA 4 ACE or
 +        AXI master interface and an L2 cache.
 +
 +        If a Cortex-A53 uses an AMBA AXI4 ACE interface to other processors
 +        and is unable to accept a certain write via this interface, it will
 +        not progress on read data presented on the read data channel and the
 +        system can deadlock.
 +
 +        The workaround promotes data cache clean instructions to
 +        data cache clean-and-invalidate.
 +        Please note that this does not necessarily enable the workaround,
 +        as it depends on the alternative framework, which will only patch
 +        the kernel if an affected CPU is detected.
 +
 +        If unsure, say Y.
 +
 +config ARM64_ERRATUM_827319
 +      bool "Cortex-A53: 827319: Data cache clean instructions might cause overlapping transactions to the interconnect"
 +      default y
 +      help
 +        This option adds an alternative code sequence to work around ARM
 +        erratum 827319 on Cortex-A53 parts up to r0p2 with an AMBA 5 CHI
 +        master interface and an L2 cache.
 +
 +        Under certain conditions this erratum can cause a clean line eviction
 +        to occur at the same time as another transaction to the same address
 +        on the AMBA 5 CHI interface, which can cause data corruption if the
 +        interconnect reorders the two transactions.
 +
 +        The workaround promotes data cache clean instructions to
 +        data cache clean-and-invalidate.
 +        Please note that this does not necessarily enable the workaround,
 +        as it depends on the alternative framework, which will only patch
 +        the kernel if an affected CPU is detected.
 +
 +        If unsure, say Y.
 +
 +config ARM64_ERRATUM_824069
 +      bool "Cortex-A53: 824069: Cache line might not be marked as clean after a CleanShared snoop"
 +      default y
 +      help
 +        This option adds an alternative code sequence to work around ARM
 +        erratum 824069 on Cortex-A53 parts up to r0p2 when it is connected
 +        to a coherent interconnect.
 +
 +        If a Cortex-A53 processor is executing a store or prefetch for
 +        write instruction at the same time as a processor in another
 +        cluster is executing a cache maintenance operation to the same
 +        address, then this erratum might cause a clean cache line to be
 +        incorrectly marked as dirty.
 +
 +        The workaround promotes data cache clean instructions to
 +        data cache clean-and-invalidate.
 +        Please note that this option does not necessarily enable the
 +        workaround, as it depends on the alternative framework, which will
 +        only patch the kernel if an affected CPU is detected.
 +
 +        If unsure, say Y.
 +
 +config ARM64_ERRATUM_819472
 +      bool "Cortex-A53: 819472: Store exclusive instructions might cause data corruption"
 +      default y
 +      help
 +        This option adds an alternative code sequence to work around ARM
 +        erratum 819472 on Cortex-A53 parts up to r0p1 with an L2 cache
 +        present when it is connected to a coherent interconnect.
 +
 +        If the processor is executing a load and store exclusive sequence at
 +        the same time as a processor in another cluster is executing a cache
 +        maintenance operation to the same address, then this erratum might
 +        cause data corruption.
 +
 +        The workaround promotes data cache clean instructions to
 +        data cache clean-and-invalidate.
 +        Please note that this does not necessarily enable the workaround,
 +        as it depends on the alternative framework, which will only patch
 +        the kernel if an affected CPU is detected.
 +
 +        If unsure, say Y.
 +
 +config ARM64_ERRATUM_832075
 +      bool "Cortex-A57: 832075: possible deadlock on mixing exclusive memory accesses with device loads"
 +      default y
 +      help
 +        This option adds an alternative code sequence to work around ARM
 +        erratum 832075 on Cortex-A57 parts up to r1p2.
 +
 +        Affected Cortex-A57 parts might deadlock when exclusive load/store
 +        instructions to Write-Back memory are mixed with Device loads.
 +
 +        The workaround is to promote device loads to use Load-Acquire
 +        semantics.
 +        Please note that this does not necessarily enable the workaround,
 +        as it depends on the alternative framework, which will only patch
 +        the kernel if an affected CPU is detected.
 +
 +        If unsure, say Y.
 +
 +endmenu
 +
 +
  choice
        prompt "Page size"
        default ARM64_4K_PAGES
@@@ -456,19 -342,6 +453,19 @@@ config ARCH_HAS_CACHE_LINE_SIZ
  
  source "mm/Kconfig"
  
 +config SECCOMP
 +      bool "Enable seccomp to safely compute untrusted bytecode"
 +      ---help---
 +        This kernel feature is useful for number crunching applications
 +        that may need to compute untrusted bytecode during their
 +        execution. By using pipes or other transports made available to
 +        the process as file descriptors supporting the read/write
 +        syscalls, it's possible to isolate those applications in
 +        their own address space using seccomp. Once seccomp is
 +        enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
 +        and the task is only allowed to execute a few safe syscalls
 +        defined by each seccomp mode.
 +
  config XEN_DOM0
        def_bool y
        depends on XEN
@@@ -485,58 -358,6 +482,58 @@@ config FORCE_MAX_ZONEORDE
        default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
        default "11"
  
 +menuconfig ARMV8_DEPRECATED
 +      bool "Emulate deprecated/obsolete ARMv8 instructions"
 +      depends on COMPAT
 +      help
 +        Legacy software support may require certain instructions
 +        that have been deprecated or obsoleted in the architecture.
 +
 +        Enable this config to enable selective emulation of these
 +        features.
 +
 +        If unsure, say Y
 +
 +if ARMV8_DEPRECATED
 +
 +config SWP_EMULATION
 +      bool "Emulate SWP/SWPB instructions"
 +      help
 +        ARMv8 obsoletes the use of A32 SWP/SWPB instructions such that
 +        they are always undefined. Say Y here to enable software
 +        emulation of these instructions for userspace using LDXR/STXR.
 +
 +        In some older versions of glibc [<=2.8] SWP is used during futex
 +        trylock() operations with the assumption that the code will not
 +        be preempted. This invalid assumption may be more likely to fail
 +        with SWP emulation enabled, leading to deadlock of the user
 +        application.
 +
 +        NOTE: when accessing uncached shared regions, LDXR/STXR rely
 +        on an external transaction monitoring block called a global
 +        monitor to maintain update atomicity. If your system does not
 +        implement a global monitor, this option can cause programs that
 +        perform SWP operations to uncached memory to deadlock.
 +
 +        If unsure, say Y
 +
 +config CP15_BARRIER_EMULATION
 +      bool "Emulate CP15 Barrier instructions"
 +      help
 +        The CP15 barrier instructions - CP15ISB, CP15DSB, and
 +        CP15DMB - are deprecated in ARMv8 (and ARMv7). It is
 +        strongly recommended to use the ISB, DSB, and DMB
 +        instructions instead.
 +
 +        Say Y here to enable software emulation of these
 +        instructions for AArch32 userspace code. When this option is
 +        enabled, CP15 barrier usage is traced which can help
 +        identify software that needs updating.
 +
 +        If unsure, say Y
 +
 +endif
 +
  endmenu
  
  menu "Boot options"
@@@ -577,17 -398,6 +574,17 @@@ config EF
          allow the kernel to be booted as an EFI application. This
          is only useful on systems that have UEFI firmware.
  
 +config DMI
 +      bool "Enable support for SMBIOS (DMI) tables"
 +      depends on EFI
 +      default y
 +      help
 +        This enables SMBIOS/DMI feature for systems.
 +
 +        This option is only useful on systems that have UEFI firmware.
 +        However, even with this option, the resultant kernel should
 +        continue to boot on existing non-UEFI platforms.
 +
  endmenu
  
  menu "Userspace binary formats"