]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
Merge branch 'android-3.10' into dev-kernel-3.10
authorSumit Singh <sumsingh@nvidia.com>
Mon, 29 Sep 2014 11:02:38 +0000 (16:32 +0530)
committerSumit Singh <sumsingh@nvidia.com>
Fri, 10 Oct 2014 13:55:26 +0000 (19:25 +0530)
Conflicts:
arch/arm64/Kconfig
arch/arm64/include/asm/cputype.h
arch/arm64/include/asm/debug-monitors.h
arch/arm64/include/asm/elf.h
arch/arm64/include/asm/hwcap.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/debug-monitors.c
arch/arm64/kernel/entry.S
arch/arm64/kernel/hw_breakpoint.c
arch/arm64/kernel/kuser32.S
arch/arm64/kernel/ptrace.c
arch/arm64/kernel/setup.c
arch/arm64/mm/proc.S
drivers/usb/gadget/f_rndis.c
drivers/usb/gadget/u_ether.c

Bug 200041789

Change-Id: I7368875b5404fdda72510e22e562138e544a03f9
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
23 files changed:
1  2 
MAINTAINERS
arch/Kconfig
arch/arm/Kconfig
arch/arm64/Kconfig
arch/arm64/include/asm/compat.h
arch/arm64/include/asm/ptrace.h
arch/arm64/include/asm/syscall.h
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/hw_breakpoint.c
arch/arm64/kernel/kuser32.S
arch/arm64/kernel/process.c
arch/arm64/kernel/ptrace.c
arch/arm64/kernel/setup.c
arch/arm64/kernel/signal32.c
arch/arm64/kernel/sys_compat.c
drivers/usb/gadget/f_rndis.c
drivers/usb/gadget/u_ether.c
drivers/usb/gadget/u_ether.h
fs/exec.c
include/linux/syscalls.h
include/uapi/linux/audit.h
kernel/fork.c

diff --cc MAINTAINERS
Simple merge
diff --cc arch/Kconfig
Simple merge
index 4a909c79f0ffe3229118fd132694840f46f1400a,99887aaa04bb06c6d8d5774c3ae8d884f57661a0..2b7ffd01fdcb62b651e867b6e3229b389d779544
@@@ -20,9 -19,10 +20,9 @@@ config AR
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select HARDIRQS_SW_RESEND
 -      select HAVE_AOUT
        select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
        select HAVE_ARCH_KGDB
-       select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT)
+       select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_BPF_JIT
        select HAVE_C_RECORDMCOUNT
index 47707ff6b8f9d64077e8737da998961bb8dc8427,2221396c2a6c097eaf13847337000caf3a6c679e..4af221fc84baa6872d6033d4de40c1281d031f49
@@@ -10,28 -7,20 +10,30 @@@ config ARM6
        select ARM_AMBA
        select ARM_ARCH_TIMER
        select ARM_GIC
 +      select BUILDTIME_EXTABLE_SORT
+       select AUDIT_ARCH_COMPAT_GENERIC
        select CLONE_BACKWARDS
 -      select COMMON_CLK
 +#     select COMMON_CLK
 +      select CPU_PM if (SUSPEND || CPU_IDLE)
 +      select DCACHE_WORD_ACCESS
        select GENERIC_CLOCKEVENTS
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
        select GENERIC_CPU_AUTOPROBE
        select GENERIC_IOMAP
        select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
 +      select GENERIC_SCHED_CLOCK
        select GENERIC_SMP_IDLE_THREAD
 +      select GENERIC_STRNCPY_FROM_USER
 +      select GENERIC_STRNLEN_USER
        select GENERIC_TIME_VSYSCALL
        select HARDIRQS_SW_RESEND
 +      select GENERIC_PCI_IOMAP
 +      select HAVE_ARCH_JUMP_LABEL
 +      select HAVE_ARCH_KGDB
+       select HAVE_ARCH_AUDITSYSCALL
        select HAVE_ARCH_TRACEHOOK
 +      select HAVE_C_RECORDMCOUNT
        select HAVE_DEBUG_BUGVERBOSE
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_API_DEBUG
@@@ -251,26 -152,8 +253,51 @@@ config NR_CPU
        int "Maximum number of CPUs (2-32)"
        range 2 32
        depends on SMP
 -      default "4"
 +      # These have to remain sorted largest to smallest
 +      default "8"
 +
 +config HOTPLUG_CPU
 +      bool "Support for hot-pluggable CPUs"
 +      depends on SMP && HOTPLUG
 +      help
 +        Say Y here to experiment with turning CPUs off and on.  CPUs
 +        can be controlled through /sys/devices/system/cpu.
 +
 +        If you don't know what to do here, say N.
 +
 +config HOTPLUG_CPU0
 +      bool "Support for CPU0 hotplug"
 +      depends on HOTPLUG_CPU
 +      default n
 +      help
 +        CPU0 hotplug is not supported on all arm64 platforms. Select Y to
 +        enable CPU0 hotplug. If you're unsure, leave CPU0 hotplug disabled.
 +
++config SWP_EMULATE
++      bool "Emulate SWP/SWPB instructions"
++      help
++        ARMv6 architecture deprecates use of the SWP/SWPB instructions. ARMv8
++        oblosetes the use of SWP/SWPB instructions. ARMv7 multiprocessing
++        extensions introduce the ability to disable these instructions,
++        triggering an undefined instruction exception when executed. Say Y
++        here to enable software emulation of these instructions for userspace
++        (not kernel) using LDREX/STREX. Also creates /proc/cpu/swp_emulation
++        for statistics.
++
++        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, LDREX/STREX 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 SWP_EMULATE
        bool "Emulate SWP/SWPB instructions"
        help
Simple merge
Simple merge
Simple merge
Simple merge
index a0f96eb99f43d40683a8a635a9baed779804173a,3c93e1a9ea8ddb4d59790eefbbd809279403e6d1..71eb4475e2863c2b5f3e292ba3e37c169f22e0b8
@@@ -685,15 -658,10 +684,14 @@@ ENDPROC(ret_from_fork
         * This is the really slow path.  We're going to be doing context
         * switches, and waiting for our parent to respond.
         */
 +ni_sys_systrace:
 +      mov     x0, sp
 +      bl      do_ni_syscall
 +      b       __sys_trace_return
 +
  __sys_trace:
-       mov     x1, sp
-       mov     w0, #0                          // trace entry
-       bl      syscall_trace
+       mov     x0, sp
+       bl      syscall_trace_enter
 -      adr     lr, __sys_trace_return          // return address
        uxtw    scno, w0                        // syscall number (possibly new)
        mov     x1, sp                          // pointer to regs
        cmp     scno, sc_nr                     // check upper syscall limit
index 07341011f5abf9353cab4861654c76110bda9d64,68e371ea1bdae794e3da5636f00677cb513986ea..621723703868e9a222ca147eb046f3bac5074ce3
@@@ -20,7 -20,7 +20,8 @@@
  
  #define pr_fmt(fmt) "hw-breakpoint: " fmt
  
 +#include <linux/cpu_pm.h>
+ #include <linux/compat.h>
  #include <linux/errno.h>
  #include <linux/hw_breakpoint.h>
  #include <linux/perf_event.h>
index 7787208e8cc6af3a4ff55226fb85ef6b8f8d30ba,2f5b3ff7e30dfc7ba3b5cc228a639950245cabda..fc2981e74aaee8ec88c6463e1c796d71c85c83e1
@@@ -28,7 -28,7 +28,8 @@@
   * See Documentation/arm/kernel_user_helpers.txt for formal definitions.
   */
  
 +#include <asm/unistd32.h>
+ #include <asm/unistd.h>
  
        .align  5
        .globl  __kuser_helper_start
index 5deca6e3e7baef758ed511e055e76e21b1b9f512,977ca8aa7dd10064af262b1e53800d2b23ca5acd..5bb30f00550bfd6225ba0748b9d7124c4fe947f0
@@@ -154,20 -142,73 +155,84 @@@ void machine_restart(char *cmd
        while (1);
  }
  
+ /*
+  * dump a block of kernel memory from around the given address
+  */
+ static void show_data(unsigned long addr, int nbytes, const char *name)
+ {
+       int     i, j;
+       int     nlines;
+       u32     *p;
+       /*
+        * don't attempt to dump non-kernel addresses or
+        * values that are probably just small negative numbers
+        */
+       if (addr < PAGE_OFFSET || addr > -256UL)
+               return;
+       printk("\n%s: %#lx:\n", name, addr);
+       /*
+        * round address down to a 32 bit boundary
+        * and always dump a multiple of 32 bytes
+        */
+       p = (u32 *)(addr & ~(sizeof(u32) - 1));
+       nbytes += (addr & (sizeof(u32) - 1));
+       nlines = (nbytes + 31) / 32;
+       for (i = 0; i < nlines; i++) {
+               /*
+                * just display low 16 bits of address to keep
+                * each line of the dump < 80 characters
+                */
+               printk("%04lx ", (unsigned long)p & 0xffff);
+               for (j = 0; j < 8; j++) {
+                       u32     data;
+                       if (probe_kernel_address(p, data)) {
+                               printk(" ********");
+                       } else {
+                               printk(" %08x", data);
+                       }
+                       ++p;
+               }
+               printk("\n");
+       }
+ }
+ static void show_extra_register_data(struct pt_regs *regs, int nbytes)
+ {
+       mm_segment_t fs;
+       unsigned int i;
+       fs = get_fs();
+       set_fs(KERNEL_DS);
+       show_data(regs->pc - nbytes, nbytes * 2, "PC");
+       show_data(regs->regs[30] - nbytes, nbytes * 2, "LR");
+       show_data(regs->sp - nbytes, nbytes * 2, "SP");
+       for (i = 0; i < 30; i++) {
+               char name[4];
+               snprintf(name, sizeof(name), "X%u", i);
+               show_data(regs->regs[i] - nbytes, nbytes * 2, name);
+       }
+       set_fs(fs);
+ }
  void __show_regs(struct pt_regs *regs)
  {
 -      int i;
 +      int i, top_reg;
 +      u64 lr, sp;
 +
 +      if (compat_user_mode(regs)) {
 +              lr = regs->compat_lr;
 +              sp = regs->compat_sp;
 +              top_reg = 12;
 +      } else {
 +              lr = regs->regs[30];
 +              sp = regs->sp;
 +              top_reg = 29;
 +      }
  
        show_regs_print_info(KERN_DEFAULT);
        print_symbol("PC is at %s\n", instruction_pointer(regs));
Simple merge
index 2d95bcecf4580b8a37ca797e5b2535c0e250eb93,06aeec407b20e5c5d29ad91706981d3f271cc969..faaa7ee1670c321009b81f96ace6a169fd1ac7b3
@@@ -72,22 -68,11 +72,23 @@@ EXPORT_SYMBOL_GPL(elf_hwcap)
                                 COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\
                                 COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV)
  unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT;
+ unsigned int compat_elf_hwcap2 __read_mostly;
  #endif
  
 -static const char *cpu_name;
  static const char *machine_name;
 +
 +unsigned int system_rev;
 +EXPORT_SYMBOL(system_rev);
 +
 +unsigned int system_serial_low;
 +EXPORT_SYMBOL(system_serial_low);
 +
 +unsigned int system_serial_high;
 +EXPORT_SYMBOL(system_serial_high);
 +
 +#ifdef CONFIG_ARM64_MACH_FRAMEWORK
 +struct machine_desc *machine_desc __initdata;
 +#endif
  phys_addr_t __fdt_pointer __initdata;
  
  /*
@@@ -243,13 -163,41 +245,45 @@@ static void __init setup_processor(void
        block = (features >> 16) & 0xf;
        if (block && !(block & 0x8))
                elf_hwcap |= HWCAP_CRC32;
+ #ifdef CONFIG_COMPAT
+       /*
+        * ID_ISAR5_EL1 carries similar information as above, but pertaining to
+        * the Aarch32 32-bit execution state.
+        */
+       features = read_cpuid(ID_ISAR5_EL1);
+       block = (features >> 4) & 0xf;
+       if (!(block & 0x8)) {
+               switch (block) {
+               default:
+               case 2:
+                       compat_elf_hwcap2 |= COMPAT_HWCAP2_PMULL;
+               case 1:
+                       compat_elf_hwcap2 |= COMPAT_HWCAP2_AES;
+               case 0:
+                       break;
+               }
+       }
+       block = (features >> 8) & 0xf;
+       if (block && !(block & 0x8))
+               compat_elf_hwcap2 |= COMPAT_HWCAP2_SHA1;
+       block = (features >> 12) & 0xf;
+       if (block && !(block & 0x8))
+               compat_elf_hwcap2 |= COMPAT_HWCAP2_SHA2;
+       block = (features >> 16) & 0xf;
+       if (block && !(block & 0x8))
+               compat_elf_hwcap2 |= COMPAT_HWCAP2_CRC32;
+ #endif
  }
  
 +#ifdef CONFIG_ARM64_MACH_FRAMEWORK
 +static struct machine_desc * __init setup_machine_fdt(phys_addr_t dt_phys)
 +#else
  static void __init setup_machine_fdt(phys_addr_t dt_phys)
 +#endif
  {
        struct boot_param_header *devtree;
        unsigned long dt_root;
Simple merge
index 1baf7eba79c36ff688e7dac330f319921253e23c,de2b0226e06df34fd7aaa4bb55e014fc33f9cddf..6dd9799a4b9801fdf382868f623682d55d3ab5dc
@@@ -25,9 -25,8 +25,9 @@@
  #include <linux/syscalls.h>
  #include <linux/uaccess.h>
  
 +#include <asm/cachetype.h>
  #include <asm/cacheflush.h>
- #include <asm/unistd32.h>
+ #include <asm/unistd.h>
  
  static inline void
  do_compat_cache_op(unsigned long start, unsigned long end, int flags)
Simple merge
index ccba28860ccc980ff6aa4138dabd51c93f5aed84,14f587efc0f6eb66c97fbfd924c86a9d17adac18..af31ec302c677bdbbe74561e3171f3a48990a448
@@@ -1177,3 -1166,23 +1178,23 @@@ void gether_disconnect(struct gether *l
        dev->port_usb = NULL;
        spin_unlock(&dev->lock);
  }
 -module_init(gether_init);
+ static int __init gether_init(void)
+ {
+       uether_wq  = create_singlethread_workqueue("uether");
+       if (!uether_wq) {
+               pr_err("%s: Unable to create workqueue: uether\n", __func__);
+               return -ENOMEM;
+       }
+       return 0;
+ }
 -module_exit(gether_exit);
++__initcall(gether_init);
+ static void __exit gether_exit(void)
+ {
+       destroy_workqueue(uether_wq);
+ }
++__exitcall(gether_exit);
+ MODULE_DESCRIPTION("ethernet over USB driver");
+ MODULE_LICENSE("GPL v2");
Simple merge
diff --cc fs/exec.c
Simple merge
Simple merge
Simple merge
diff --cc kernel/fork.c
Simple merge