Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Aug 2014 17:05:29 +0000 (10:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Aug 2014 17:05:29 +0000 (10:05 -0700)
Pull ARM updates from Russell King:
 "Included in this update:

   - perf updates from Will Deacon:

     The main changes are callchain stability fixes from Jean Pihet and
     event mapping and PMU name rework from Mark Rutland

     The latter is preparatory work for enabling some code re-use with
     arm64 in the future.

   - updates for nommu from Uwe Kleine-König:

     Two different fixes for the same problem making some ARM nommu
     configurations not boot since 3.6-rc1.  The problem is that
     user_addr_max returned the biggest available RAM address which
     makes some copy_from_user variants fail to read from XIP memory.

   - deprecate legacy OMAP DMA API, in preparation for it's removal.

     The popular drivers have been converted over, leaving a very small
     number of rarely used drivers, which hopefully can be converted
     during the next cycle with a bit more visibility (and hopefully
     people popping out of the woodwork to help test)

   - more tweaks for BE systems, particularly with the kernel image
     format.  In connection with this, I've cleaned up the way we
     generate the linker script for the decompressor.

   - removal of hard-coded assumptions of the kernel stack size, making
     everywhere depend on the value of THREAD_SIZE_ORDER.

   - MCPM updates from Nicolas Pitre.

   - Make it easier for proper CPU part number checks (which should
     always include the vendor field).

   - Assembly code optimisation - use the "bx" instruction when
     returning from a function on ARMv6+ rather than "mov pc, reg".

   - Save the last kernel misaligned fault location and report it via
     the procfs alignment file.

   - Clean up the way we create the initial stack frame, which is a
     repeated pattern in several different locations.

   - Support for 8-byte get_user(), needed for some DRM implementations.

   - mcs locking from Will Deacon.

   - Save and restore a few more Cortex-A9 registers (for errata
     workarounds)

   - Fix various aspects of the SWP emulation, and the ELF hwcap for the
     SWP instruction.

   - Update LPAE logic for pte_write and pmd_write to make it more
     correct.

   - Support for Broadcom Brahma15 CPU cores.

   - ARM assembly crypto updates from Ard Biesheuvel"

* 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (53 commits)
  ARM: add comments to the early page table remap code
  ARM: 8122/1: smp_scu: enable SCU standby support
  ARM: 8121/1: smp_scu: use macro for SCU enable bit
  ARM: 8120/1: crypto: sha512: add ARM NEON implementation
  ARM: 8119/1: crypto: sha1: add ARM NEON implementation
  ARM: 8118/1: crypto: sha1/make use of common SHA-1 structures
  ARM: 8113/1: remove remaining definitions of PLAT_PHYS_OFFSET from <mach/memory.h>
  ARM: 8111/1: Enable erratum 798181 for Broadcom Brahma-B15
  ARM: 8110/1: do CPU-specific init for Broadcom Brahma15 cores
  ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE
  ARM: 8108/1: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
  ARM: hwcap: disable HWCAP_SWP if the CPU advertises it has exclusives
  ARM: SWP emulation: only initialise on ARMv7 CPUs
  ARM: SWP emulation: always enable when SMP is enabled
  ARM: 8103/1: save/restore Cortex-A9 CP15 registers on suspend/resume
  ARM: 8098/1: mcs lock: implement wfe-based polling for MCS locking
  ARM: 8091/2: add get_user() support for 8 byte types
  ARM: 8097/1: unistd.h: relocate comments back to place
  ARM: 8096/1: Describe required sort order for textofs-y (TEXT_OFFSET)
  ARM: 8090/1: add revision info for PL310 errata 588369 and 727915
  ...

1  2 
arch/arm/Kconfig
arch/arm/mach-exynos/platsmp.c
arch/arm/mach-mvebu/headsmp-a9.S
crypto/Kconfig

diff --combined arch/arm/Kconfig
index 290f02ee0157492ec037494c8db8bd5d036360dd,75b3b721347c06f210cd6fd039620a778b64530d..1e14b9068a390447967960f0d0b95606951e5ba9
@@@ -6,7 -6,6 +6,7 @@@ config AR
        select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
        select ARCH_HAVE_CUSTOM_GPIO_H
        select ARCH_MIGHT_HAVE_PC_PARPORT
 +      select ARCH_SUPPORTS_ATOMIC_RMW
        select ARCH_USE_BUILTIN_BSWAP
        select ARCH_USE_CMPXCHG_LOCKREF
        select ARCH_WANT_IPC_PARSE_VERSION
@@@ -263,8 -262,22 +263,22 @@@ config NEED_MACH_MEMORY_
  
  config PHYS_OFFSET
        hex "Physical address of main memory" if MMU
-       depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H
+       depends on !ARM_PATCH_PHYS_VIRT
        default DRAM_BASE if !MMU
+       default 0x00000000 if ARCH_EBSA110 || \
+                       EP93XX_SDCE3_SYNC_PHYS_OFFSET || \
+                       ARCH_FOOTBRIDGE || \
+                       ARCH_INTEGRATOR || \
+                       ARCH_IOP13XX || \
+                       ARCH_KS8695 || \
+                       (ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET)
+       default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
+       default 0x20000000 if ARCH_S5PV210
+       default 0x70000000 if REALVIEW_HIGH_PHYS_OFFSET
+       default 0xc0000000 if EP93XX_SDCE0_PHYS_OFFSET || ARCH_SA1100
+       default 0xd0000000 if EP93XX_SDCE1_PHYS_OFFSET
+       default 0xe0000000 if EP93XX_SDCE2_PHYS_OFFSET
+       default 0xf0000000 if EP93XX_SDCE3_ASYNC_PHYS_OFFSET
        help
          Please provide the physical address corresponding to the
          location of main memory in your system.
@@@ -436,7 -449,6 +450,6 @@@ config ARCH_EP93X
        select ARM_VIC
        select CLKDEV_LOOKUP
        select CPU_ARM920T
-       select NEED_MACH_MEMORY_H
        help
          This enables support for the Cirrus EP93xx series of CPUs.
  
index 50b9aad5e27b729acc2aa060be4d604d866ef07b,8dc1d3a3a8bf2f0a19041bb910babb3cd7890273..70d1e65a51d8f580d3db73eabe9f29cf6ca49e06
@@@ -90,8 -90,7 +90,8 @@@ static void exynos_secondary_init(unsig
  static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
  {
        unsigned long timeout;
 -      unsigned long phys_cpu = cpu_logical_map(cpu);
 +      u32 mpidr = cpu_logical_map(cpu);
 +      u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
        int ret = -ENOSYS;
  
        /*
         * the holding pen - release it, then wait for it to flag
         * that it has been released by resetting pen_release.
         *
 -       * Note that "pen_release" is the hardware CPU ID, whereas
 +       * Note that "pen_release" is the hardware CPU core ID, whereas
         * "cpu" is Linux's internal ID.
         */
 -      write_pen_release(phys_cpu);
 +      write_pen_release(core_id);
  
 -      if (!exynos_cpu_power_state(cpu)) {
 -              exynos_cpu_power_up(cpu);
 +      if (!exynos_cpu_power_state(core_id)) {
 +              exynos_cpu_power_up(core_id);
                timeout = 10;
  
                /* wait max 10 ms until cpu1 is on */
 -              while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN) {
 +              while (exynos_cpu_power_state(core_id)
 +                     != S5P_CORE_LOCAL_PWR_EN) {
                        if (timeout-- == 0)
                                break;
  
                 * Try to set boot address using firmware first
                 * and fall back to boot register if it fails.
                 */
 -              ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr);
 +              ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr);
                if (ret && ret != -ENOSYS)
                        goto fail;
                if (ret == -ENOSYS) {
 -                      void __iomem *boot_reg = cpu_boot_reg(phys_cpu);
 +                      void __iomem *boot_reg = cpu_boot_reg(core_id);
  
                        if (IS_ERR(boot_reg)) {
                                ret = PTR_ERR(boot_reg);
                                goto fail;
                        }
 -                      __raw_writel(boot_addr, cpu_boot_reg(phys_cpu));
 +                      __raw_writel(boot_addr, cpu_boot_reg(core_id));
                }
  
 -              call_firmware_op(cpu_boot, phys_cpu);
 +              call_firmware_op(cpu_boot, core_id);
  
                arch_send_wakeup_ipi_mask(cpumask_of(cpu));
  
@@@ -190,7 -188,7 +190,7 @@@ static void __init exynos_smp_init_cpus
        void __iomem *scu_base = scu_base_addr();
        unsigned int i, ncores;
  
-       if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
+       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
                ncores = scu_base ? scu_get_core_count(scu_base) : 1;
        else
                /*
@@@ -216,7 -214,7 +216,7 @@@ static void __init exynos_smp_prepare_c
  
        exynos_sysram_init();
  
-       if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
+       if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
                scu_enable(scu_base_addr());
  
        /*
         * boot register if it fails.
         */
        for (i = 1; i < max_cpus; ++i) {
 -              unsigned long phys_cpu;
                unsigned long boot_addr;
 +              u32 mpidr;
 +              u32 core_id;
                int ret;
  
 -              phys_cpu = cpu_logical_map(i);
 +              mpidr = cpu_logical_map(i);
 +              core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
                boot_addr = virt_to_phys(exynos4_secondary_startup);
  
 -              ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr);
 +              ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr);
                if (ret && ret != -ENOSYS)
                        break;
                if (ret == -ENOSYS) {
 -                      void __iomem *boot_reg = cpu_boot_reg(phys_cpu);
 +                      void __iomem *boot_reg = cpu_boot_reg(core_id);
  
                        if (IS_ERR(boot_reg))
                                break;
 -                      __raw_writel(boot_addr, cpu_boot_reg(phys_cpu));
 +                      __raw_writel(boot_addr, cpu_boot_reg(core_id));
                }
        }
  }
index da5bb292b91cf3fe55b5217e5ae8db626b10072f,7c91ddb6f1f71bb3996e826e20a85be1e1d46f14..2c3c7fc65e284a7d5805afcb04c087bf98165fa0
@@@ -14,7 -14,6 +14,7 @@@
  
  #include <linux/linkage.h>
  #include <linux/init.h>
 +
  #include <asm/assembler.h>
  
        __CPUINIT
  .global armada_375_smp_cpu1_enable_code_end
  
  armada_375_smp_cpu1_enable_code_start:
 -      ldr     r0, [pc, #4]
 +ARM_BE8(setend        be)
 +      adr     r0, 1f
 +      ldr     r0, [r0]
        ldr     r1, [r0]
-       mov     pc, r1
 +ARM_BE8(rev   r1, r1)
+       ret     r1
 +1:
        .word   CPU_RESUME_ADDR_REG
  armada_375_smp_cpu1_enable_code_end:
  
  ENTRY(mvebu_cortex_a9_secondary_startup)
 +ARM_BE8(setend        be)
        bl      v7_invalidate_l1
        b       secondary_startup
  ENDPROC(mvebu_cortex_a9_secondary_startup)
diff --combined crypto/Kconfig
index 6345c470650df7f442e9972732ea768ccf90d2dd,749b1e05c490ce4adeda0ac8f8971bd955e1a2f8..00b5906f57b783232b689af4693d1a9e39b2ad39
@@@ -23,8 -23,7 +23,8 @@@ comment "Crypto core or helper
  
  config CRYPTO_FIPS
        bool "FIPS 200 compliance"
 -      depends on CRYPTO_ANSI_CPRNG && !CRYPTO_MANAGER_DISABLE_TESTS
 +      depends on (CRYPTO_ANSI_CPRNG || CRYPTO_DRBG) && !CRYPTO_MANAGER_DISABLE_TESTS
 +      depends on MODULE_SIG
        help
          This options enables the fips boot option which is
          required if you want to system to operate in a FIPS 200
@@@ -541,6 -540,17 +541,17 @@@ config CRYPTO_SHA1_AR
          SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
          using optimized ARM assembler.
  
+ config CRYPTO_SHA1_ARM_NEON
+       tristate "SHA1 digest algorithm (ARM NEON)"
+       depends on ARM && KERNEL_MODE_NEON && !CPU_BIG_ENDIAN
+       select CRYPTO_SHA1_ARM
+       select CRYPTO_SHA1
+       select CRYPTO_HASH
+       help
+         SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
+         using optimized ARM NEON assembly, when NEON instructions are
+         available.
  config CRYPTO_SHA1_PPC
        tristate "SHA1 digest algorithm (powerpc)"
        depends on PPC
@@@ -590,6 -600,21 +601,21 @@@ config CRYPTO_SHA512_SPARC6
          SHA-512 secure hash standard (DFIPS 180-2) implemented
          using sparc64 crypto instructions, when available.
  
+ config CRYPTO_SHA512_ARM_NEON
+       tristate "SHA384 and SHA512 digest algorithm (ARM NEON)"
+       depends on ARM && KERNEL_MODE_NEON && !CPU_BIG_ENDIAN
+       select CRYPTO_SHA512
+       select CRYPTO_HASH
+       help
+         SHA-512 secure hash standard (DFIPS 180-2) implemented
+         using ARM NEON instructions, when available.
+         This version of SHA implements a 512 bit hash with 256 bits of
+         security against collision attacks.
+         This code also includes SHA-384, a 384 bit hash with 192 bits
+         of security against collision attacks.
  config CRYPTO_TGR192
        tristate "Tiger digest algorithms"
        select CRYPTO_HASH
@@@ -1020,19 -1045,6 +1046,19 @@@ config CRYPTO_DES_SPARC6
          DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3),
          optimized using SPARC64 crypto opcodes.
  
 +config CRYPTO_DES3_EDE_X86_64
 +      tristate "Triple DES EDE cipher algorithm (x86-64)"
 +      depends on X86 && 64BIT
 +      select CRYPTO_ALGAPI
 +      select CRYPTO_DES
 +      help
 +        Triple DES EDE (FIPS 46-3) algorithm.
 +
 +        This module provides implementation of the Triple DES EDE cipher
 +        algorithm that is optimized for x86-64 processors. Two versions of
 +        algorithm are provided; regular processing one input block and
 +        one that processes three blocks parallel.
 +
  config CRYPTO_FCRYPT
        tristate "FCrypt cipher algorithm"
        select CRYPTO_ALGAPI
@@@ -1394,40 -1406,6 +1420,40 @@@ config CRYPTO_ANSI_CPRN
          ANSI X9.31 A.2.4. Note that this option must be enabled if
          CRYPTO_FIPS is selected
  
 +menuconfig CRYPTO_DRBG_MENU
 +      tristate "NIST SP800-90A DRBG"
 +      help
 +        NIST SP800-90A compliant DRBG. In the following submenu, one or
 +        more of the DRBG types must be selected.
 +
 +if CRYPTO_DRBG_MENU
 +
 +config CRYPTO_DRBG_HMAC
 +      bool "Enable HMAC DRBG"
 +      default y
 +      select CRYPTO_HMAC
 +      help
 +        Enable the HMAC DRBG variant as defined in NIST SP800-90A.
 +
 +config CRYPTO_DRBG_HASH
 +      bool "Enable Hash DRBG"
 +      select CRYPTO_HASH
 +      help
 +        Enable the Hash DRBG variant as defined in NIST SP800-90A.
 +
 +config CRYPTO_DRBG_CTR
 +      bool "Enable CTR DRBG"
 +      select CRYPTO_AES
 +      help
 +        Enable the CTR DRBG variant as defined in NIST SP800-90A.
 +
 +config CRYPTO_DRBG
 +      tristate
 +      default CRYPTO_DRBG_MENU if (CRYPTO_DRBG_HMAC || CRYPTO_DRBG_HASH || CRYPTO_DRBG_CTR)
 +      select CRYPTO_RNG
 +
 +endif # if CRYPTO_DRBG_MENU
 +
  config CRYPTO_USER_API
        tristate