Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Thu, 29 Mar 2012 23:53:48 +0000 (16:53 -0700)]
Pull more ARM updates from Russell King.

This got a fair number of conflicts with the <asm/system.h> split, but
also with some other sparse-irq and header file include cleanups.  They
all looked pretty trivial, though.

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (59 commits)
  ARM: fix Kconfig warning for HAVE_BPF_JIT
  ARM: 7361/1: provide XIP_VIRT_ADDR for no-MMU builds
  ARM: 7349/1: integrator: convert to sparse irqs
  ARM: 7259/3: net: JIT compiler for packet filters
  ARM: 7334/1: add jump label support
  ARM: 7333/2: jump label: detect %c support for ARM
  ARM: 7338/1: add support for early console output via semihosting
  ARM: use set_current_blocked() and block_sigmask()
  ARM: exec: remove redundant set_fs(USER_DS)
  ARM: 7332/1: extract out code patch function from kprobes
  ARM: 7331/1: extract out insn generation code from ftrace
  ARM: 7330/1: ftrace: use canonical Thumb-2 wide instruction format
  ARM: 7351/1: ftrace: remove useless memory checks
  ARM: 7316/1: kexec: EOI active and mask all interrupts in kexec crash path
  ARM: Versatile Express: add NO_IOPORT
  ARM: get rid of asm/irq.h in asm/prom.h
  ARM: 7319/1: Print debug info for SIGBUS in user faults
  ARM: 7318/1: gic: refactor irq_start assignment
  ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
  ARM: 7315/1: perf: add support for the Cortex-A7 PMU
  ...

56 files changed:
1  2 
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/Makefile
arch/arm/common/gic.c
arch/arm/include/asm/perf_event.h
arch/arm/include/asm/processor.h
arch/arm/kernel/Makefile
arch/arm/kernel/irq.c
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/process.c
arch/arm/kernel/setup.c
arch/arm/kernel/signal.c
arch/arm/kernel/smp.c
arch/arm/kernel/traps.c
arch/arm/mach-highbank/highbank.c
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/pci.c
arch/arm/mach-integrator/pci_v3.c
arch/arm/mach-mmp/aspenite.c
arch/arm/mach-mmp/tavorevb.c
arch/arm/mach-mmp/ttc_dkb.c
arch/arm/mach-msm/timer.c
arch/arm/mach-pxa/cm-x300.c
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/devices.c
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/viper.c
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-bonito.c
arch/arm/mach-shmobile/board-g3evm.c
arch/arm/mach-shmobile/board-g4evm.c
arch/arm/mach-shmobile/board-kota2.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/board-marzen.c
arch/arm/mach-shmobile/intc-sh73a0.c
arch/arm/mach-shmobile/setup-r8a7740.c
arch/arm/mach-shmobile/setup-r8a7779.c
arch/arm/mach-shmobile/setup-sh7367.c
arch/arm/mach-shmobile/setup-sh7372.c
arch/arm/mach-shmobile/setup-sh7377.c
arch/arm/mach-shmobile/setup-sh73a0.c
arch/arm/mm/copypage-v4mc.c
arch/arm/mm/copypage-v6.c
arch/arm/mm/copypage-xscale.c
arch/arm/mm/fault.c
arch/arm/mm/flush.c
arch/arm/mm/highmem.c
arch/arm/mm/init.c
arch/arm/mm/mmu.c
arch/c6x/Kconfig
arch/powerpc/Kconfig
arch/sh/Kconfig
arch/x86/Kconfig
kernel/irq/Kconfig

@@@ -847,9 -836,9 +841,8 @@@ config ARCH_S5PV21
        select HAVE_CLK
        select CLKDEV_LOOKUP
        select CLKSRC_MMIO
 -      select ARM_L1_CACHE_SHIFT_6
        select ARCH_HAS_CPUFREQ
        select GENERIC_CLOCKEVENTS
-       select HAVE_SCHED_CLOCK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
Simple merge
Simple merge
@@@ -686,13 -697,12 +686,12 @@@ void __init gic_init_bases(unsigned in
         * For primary GICs, skip over SGIs.
         * For secondary GICs, skip over PPIs, too.
         */
-       hwirq_base = 32;
-       if (gic_nr == 0) {
-               if ((irq_start & 31) > 0) {
-                       hwirq_base = 16;
-                       if (irq_start != -1)
-                               irq_start = (irq_start & ~31) + 16;
-               }
+       if (gic_nr == 0 && (irq_start & 31) > 0) {
 -              domain->hwirq_base = 16;
++              hwirq_base = 16;
+               if (irq_start != -1)
+                       irq_start = (irq_start & ~31) + 16;
+       } else {
 -              domain->hwirq_base = 32;
++              hwirq_base = 32;
        }
  
        /*
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -528,17 -531,36 +528,35 @@@ unsigned long arch_randomize_brk(struc
  #ifdef CONFIG_MMU
  /*
   * The vectors page is always readable from user space for the
-  * atomic helpers and the signal restart code.  Let's declare a mapping
-  * for it so it is visible through ptrace and /proc/<pid>/mem.
+  * atomic helpers and the signal restart code. Insert it into the
+  * gate_vma so that it is visible through ptrace and /proc/<pid>/mem.
   */
+ static struct vm_area_struct gate_vma;
  
- int vectors_user_mapping(void)
+ static int __init gate_vma_init(void)
  {
-       struct mm_struct *mm = current->mm;
-       return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
-                                      VM_READ | VM_EXEC |
-                                      VM_MAYREAD | VM_MAYEXEC | VM_RESERVED,
-                                      NULL);
+       gate_vma.vm_start       = 0xffff0000;
+       gate_vma.vm_end         = 0xffff0000 + PAGE_SIZE;
+       gate_vma.vm_page_prot   = PAGE_READONLY_EXEC;
+       gate_vma.vm_flags       = VM_READ | VM_EXEC |
 -                                VM_MAYREAD | VM_MAYEXEC |
 -                                VM_ALWAYSDUMP;
++                                VM_MAYREAD | VM_MAYEXEC;
+       return 0;
+ }
+ arch_initcall(gate_vma_init);
+ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
+ {
+       return &gate_vma;
+ }
+ int in_gate_area(struct mm_struct *mm, unsigned long addr)
+ {
+       return (addr >= gate_vma.vm_start) && (addr < gate_vma.vm_end);
+ }
+ int in_gate_area_no_mm(unsigned long addr)
+ {
+       return in_gate_area(NULL, addr);
  }
  
  const char *arch_vma_name(struct vm_area_struct *vma)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
  
  #include <mach/hardware.h>
  #include <mach/platform.h>
- #include <asm/irq.h>
  #include <mach/cm.h>
+ #include <mach/irqs.h>
 -#include <asm/system.h>
  #include <asm/leds.h>
  #include <asm/mach-types.h>
  #include <asm/mach/time.h>
@@@ -26,7 -26,7 +26,6 @@@
  #include <linux/interrupt.h>
  #include <linux/init.h>
  
- #include <asm/irq.h>
 -#include <asm/system.h>
  #include <asm/mach/pci.h>
  #include <asm/mach-types.h>
  
  
  #include <mach/hardware.h>
  #include <mach/platform.h>
- #include <asm/irq.h>
+ #include <mach/irqs.h>
  #include <asm/signal.h>
 -#include <asm/system.h>
  #include <asm/mach/pci.h>
  #include <asm/irq_regs.h>
  
Simple merge
Simple merge
Simple merge
@@@ -127,45 -128,11 +128,50 @@@ static struct clocksource msm_clocksour
        .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
  };
  
 +#ifdef CONFIG_LOCAL_TIMERS
 +static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt)
 +{
 +      /* Use existing clock_event for cpu 0 */
 +      if (!smp_processor_id())
 +              return 0;
 +
 +      writel_relaxed(0, event_base + TIMER_ENABLE);
 +      writel_relaxed(0, event_base + TIMER_CLEAR);
 +      writel_relaxed(~0, event_base + TIMER_MATCH_VAL);
 +      evt->irq = msm_clockevent.irq;
 +      evt->name = "local_timer";
 +      evt->features = msm_clockevent.features;
 +      evt->rating = msm_clockevent.rating;
 +      evt->set_mode = msm_timer_set_mode;
 +      evt->set_next_event = msm_timer_set_next_event;
 +      evt->shift = msm_clockevent.shift;
 +      evt->mult = div_sc(GPT_HZ, NSEC_PER_SEC, evt->shift);
 +      evt->max_delta_ns = clockevent_delta2ns(0xf0000000, evt);
 +      evt->min_delta_ns = clockevent_delta2ns(4, evt);
 +
 +      *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
 +      clockevents_register_device(evt);
 +      enable_percpu_irq(evt->irq, 0);
 +      return 0;
 +}
 +
 +static void msm_local_timer_stop(struct clock_event_device *evt)
 +{
 +      evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
 +      disable_percpu_irq(evt->irq);
 +}
 +
 +static struct local_timer_ops msm_local_timer_ops __cpuinitdata = {
 +      .setup  = msm_local_timer_setup,
 +      .stop   = msm_local_timer_stop,
 +};
 +#endif /* CONFIG_LOCAL_TIMERS */
 +
+ static notrace u32 msm_sched_clock_read(void)
+ {
+       return msm_clocksource.read(&msm_clocksource);
+ }
  static void __init msm_timer_init(void)
  {
        struct clock_event_device *ce = &msm_clockevent;
@@@ -232,8 -195,44 +238,10 @@@ err
        res = clocksource_register_hz(cs, dgt_hz);
        if (res)
                pr_err("clocksource_register failed\n");
+       setup_sched_clock(msm_sched_clock_read,
+                       cpu_is_msm7x01() ? 32 - MSM_DGT_SHIFT : 32, dgt_hz);
  }
  
 -#ifdef CONFIG_LOCAL_TIMERS
 -int __cpuinit local_timer_setup(struct clock_event_device *evt)
 -{
 -      /* Use existing clock_event for cpu 0 */
 -      if (!smp_processor_id())
 -              return 0;
 -
 -      writel_relaxed(0, event_base + TIMER_ENABLE);
 -      writel_relaxed(0, event_base + TIMER_CLEAR);
 -      writel_relaxed(~0, event_base + TIMER_MATCH_VAL);
 -      evt->irq = msm_clockevent.irq;
 -      evt->name = "local_timer";
 -      evt->features = msm_clockevent.features;
 -      evt->rating = msm_clockevent.rating;
 -      evt->set_mode = msm_timer_set_mode;
 -      evt->set_next_event = msm_timer_set_next_event;
 -      evt->shift = msm_clockevent.shift;
 -      evt->mult = div_sc(GPT_HZ, NSEC_PER_SEC, evt->shift);
 -      evt->max_delta_ns = clockevent_delta2ns(0xf0000000, evt);
 -      evt->min_delta_ns = clockevent_delta2ns(4, evt);
 -
 -      *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
 -      clockevents_register_device(evt);
 -      enable_percpu_irq(evt->irq, 0);
 -      return 0;
 -}
 -
 -void local_timer_stop(struct clock_event_device *evt)
 -{
 -      evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt);
 -      disable_percpu_irq(evt->irq);
 -}
 -#endif /* CONFIG_LOCAL_TIMERS */
 -
  struct sys_timer msm_timer = {
        .init = msm_timer_init
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
  #include <mach/hardware.h>
  #include <mach/r8a7779.h>
  #include <mach/common.h>
+ #include <mach/irqs.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 -#include <asm/mach/map.h>
 -#include <asm/mach/time.h>
  #include <asm/hardware/gic.h>
  #include <asm/traps.h>
  
Simple merge
  #include <linux/serial_sci.h>
  #include <linux/sh_timer.h>
  #include <mach/r8a7740.h>
 +#include <mach/common.h>
+ #include <mach/irqs.h>
  #include <asm/mach-types.h>
 +#include <asm/mach/map.h>
  #include <asm/mach/arch.h>
 +#include <asm/mach/time.h>
 +
 +static struct map_desc r8a7740_io_desc[] __initdata = {
 +       /*
 +        * for CPGA/INTC/PFC
 +        * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
 +        */
 +      {
 +              .virtual        = 0xe6000000,
 +              .pfn            = __phys_to_pfn(0xe6000000),
 +              .length         = 160 << 20,
 +              .type           = MT_DEVICE_NONSHARED
 +      },
 +#ifdef CONFIG_CACHE_L2X0
 +      /*
 +       * for l2x0_init()
 +       * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
 +       */
 +      {
 +              .virtual        = 0xf0002000,
 +              .pfn            = __phys_to_pfn(0xf0100000),
 +              .length         = PAGE_SIZE,
 +              .type           = MT_DEVICE_NONSHARED
 +      },
 +#endif
 +};
 +
 +void __init r8a7740_map_io(void)
 +{
 +      iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
 +}
  
  /* SCIFA0 */
  static struct plat_sci_port scif0_platform_data = {
  #include <linux/serial_sci.h>
  #include <linux/sh_timer.h>
  #include <mach/hardware.h>
 +#include <mach/common.h>
+ #include <mach/irqs.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 +#include <asm/mach/map.h>
 +#include <asm/mach/time.h>
 +
 +static struct map_desc sh7367_io_desc[] __initdata = {
 +      /* create a 1:1 entity map for 0xe6xxxxxx
 +       * used by CPGA, INTC and PFC.
 +       */
 +      {
 +              .virtual        = 0xe6000000,
 +              .pfn            = __phys_to_pfn(0xe6000000),
 +              .length         = 256 << 20,
 +              .type           = MT_DEVICE_NONSHARED
 +      },
 +};
 +
 +void __init sh7367_map_io(void)
 +{
 +      iotable_init(sh7367_io_desc, ARRAY_SIZE(sh7367_io_desc));
 +}
  
  /* SCIFA0 */
  static struct plat_sci_port scif0_platform_data = {
  #include <linux/sh_intc.h>
  #include <linux/sh_timer.h>
  #include <linux/pm_domain.h>
 +#include <linux/dma-mapping.h>
  #include <mach/hardware.h>
+ #include <mach/irqs.h>
  #include <mach/sh7372.h>
 +#include <mach/common.h>
 +#include <asm/mach/map.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 +#include <asm/mach/time.h>
 +
 +static struct map_desc sh7372_io_desc[] __initdata = {
 +      /* create a 1:1 entity map for 0xe6xxxxxx
 +       * used by CPGA, INTC and PFC.
 +       */
 +      {
 +              .virtual        = 0xe6000000,
 +              .pfn            = __phys_to_pfn(0xe6000000),
 +              .length         = 256 << 20,
 +              .type           = MT_DEVICE_NONSHARED
 +      },
 +};
 +
 +void __init sh7372_map_io(void)
 +{
 +      iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
 +
 +      /*
 +       * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
 +       * enough to allocate the frame buffer memory.
 +       */
 +      init_consistent_dma_size(12 << 20);
 +}
  
  /* SCIFA0 */
  static struct plat_sci_port scif0_platform_data = {
  #include <linux/sh_intc.h>
  #include <linux/sh_timer.h>
  #include <mach/hardware.h>
 +#include <mach/common.h>
 +#include <asm/mach/map.h>
+ #include <mach/irqs.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 +#include <asm/mach/time.h>
 +
 +static struct map_desc sh7377_io_desc[] __initdata = {
 +      /* create a 1:1 entity map for 0xe6xxxxxx
 +       * used by CPGA, INTC and PFC.
 +       */
 +      {
 +              .virtual        = 0xe6000000,
 +              .pfn            = __phys_to_pfn(0xe6000000),
 +              .length         = 256 << 20,
 +              .type           = MT_DEVICE_NONSHARED
 +      },
 +};
 +
 +void __init sh7377_map_io(void)
 +{
 +      iotable_init(sh7377_io_desc, ARRAY_SIZE(sh7377_io_desc));
 +}
  
  /* SCIFA0 */
  static struct plat_sci_port scif0_platform_data = {
  #include <linux/sh_intc.h>
  #include <linux/sh_timer.h>
  #include <mach/hardware.h>
+ #include <mach/irqs.h>
  #include <mach/sh73a0.h>
 +#include <mach/common.h>
  #include <asm/mach-types.h>
 +#include <asm/mach/map.h>
  #include <asm/mach/arch.h>
 +#include <asm/mach/time.h>
 +
 +static struct map_desc sh73a0_io_desc[] __initdata = {
 +      /* create a 1:1 entity map for 0xe6xxxxxx
 +       * used by CPGA, INTC and PFC.
 +       */
 +      {
 +              .virtual        = 0xe6000000,
 +              .pfn            = __phys_to_pfn(0xe6000000),
 +              .length         = 256 << 20,
 +              .type           = MT_DEVICE_NONSHARED
 +      },
 +};
 +
 +void __init sh73a0_map_io(void)
 +{
 +      iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
 +}
  
  static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xe6c40000,
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -11,8 -11,7 +11,8 @@@ config TMS320C6
        select HAVE_DMA_API_DEBUG
        select HAVE_GENERIC_HARDIRQS
        select HAVE_MEMBLOCK
-       select HAVE_SPARSE_IRQ
+       select SPARSE_IRQ
 +      select IRQ_DOMAIN
        select OF
        select OF_EARLY_FLATTREE
  
@@@ -133,10 -133,8 +133,9 @@@ config PP
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
        select HAVE_GENERIC_HARDIRQS
-       select HAVE_SPARSE_IRQ
 -      select MAY_HAVE_SPARSE_IRQ
 +      select SPARSE_IRQ
        select IRQ_PER_CPU
 +      select IRQ_DOMAIN
        select GENERIC_IRQ_SHOW
        select GENERIC_IRQ_SHOW_LEVEL
        select IRQ_FORCED_THREADING
diff --cc arch/sh/Kconfig
Simple merge
Simple merge
Simple merge