Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 May 2010 18:36:03 +0000 (11:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 May 2010 18:36:03 +0000 (11:36 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (127 commits)
  sh: update defconfigs.
  sh: Fix up the NUMA build for recent LMB changes.
  sh64: provide a stub per_cpu_trap_init() definition.
  sh: fix up CONFIG_KEXEC=n build.
  sh: fixup the docbook paths for clock framework shuffling.
  driver core: Early dev_name() depends on slab_is_available().
  sh: simplify WARN usage in SH clock driver
  sh: Check return value of clk_get on ms7724
  sh: Check return value of clk_get on ecovec24
  sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c
  sh: move sh clock.c contents to drivers/sh/clk.
  sh: move sh asm/clock.h contents to linux/sh_clk.h V2
  sh: remove unused clock lookup
  sh: switch boards to clkdev
  sh: switch sh4-202 to clkdev
  sh: switch shx3 to clkdev
  sh: switch sh7757 to clkdev
  sh: switch sh7763 to clkdev
  sh: switch sh7780 to clkdev
  sh: switch sh7786 to clkdev
  ...

1  2 
arch/sh/Kconfig
arch/sh/include/asm/hw_breakpoint.h
arch/sh/kernel/hw_breakpoint.c
drivers/base/platform.c

diff --combined arch/sh/Kconfig
@@@ -44,7 -44,6 +44,7 @@@ config SUPERH3
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_ARCH_KGDB
        select HAVE_HW_BREAKPOINT
 +      select HAVE_MIXED_BREAKPOINTS_REGS
        select PERF_EVENTS if HAVE_HW_BREAKPOINT
        select ARCH_HIBERNATION_POSSIBLE if MMU
  
@@@ -158,7 -157,6 +158,6 @@@ config LOCKDEP_SUPPOR
  
  config HAVE_LATENCYTOP_SUPPORT
        def_bool y
-       depends on !SMP
  
  config ARCH_HAS_ILOG2_U32
        def_bool n
@@@ -238,6 -236,8 +237,8 @@@ config CPU_SHX
  config CPU_SHX3
        bool
        select DMA_COHERENT
+       select SYS_SUPPORTS_SMP
+       select SYS_SUPPORTS_NUMA
  
  config ARCH_SHMOBILE
        bool
@@@ -454,18 -454,12 +455,12 @@@ config CPU_SUBTYPE_SH778
        select CPU_SH4A
        select CPU_SHX3
        select CPU_HAS_PTEAEX
-       select ARCH_SPARSEMEM_ENABLE
-       select SYS_SUPPORTS_NUMA
-       select SYS_SUPPORTS_SMP
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
  
  config CPU_SUBTYPE_SHX3
        bool "Support SH-X3 processor"
        select CPU_SH4A
        select CPU_SHX3
-       select ARCH_SPARSEMEM_ENABLE
-       select SYS_SUPPORTS_NUMA
-       select SYS_SUPPORTS_SMP
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
  
  # SH4AL-DSP Processor Support
@@@ -635,7 -629,7 +630,7 @@@ config KEXE
  
  config CRASH_DUMP
        bool "kernel crash dumps (EXPERIMENTAL)"
-       depends on SUPERH32 && EXPERIMENTAL
+       depends on SUPERH32 && EXPERIMENTAL && BROKEN_ON_SMP
        help
          Generate crash dump after being started by kexec.
          This should be normally only set in special crash dump kernels
@@@ -707,6 -701,13 +702,13 @@@ config NR_CPU
          This is purely to save memory - each supported CPU adds
          approximately eight kilobytes to the kernel image.
  
+ config HOTPLUG_CPU
+       bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
+       depends on SMP && HOTPLUG && EXPERIMENTAL
+       help
+         Say Y here to experiment with turning CPUs off and on.  CPUs
+         can be controlled through /sys/devices/system/cpu.
  source "kernel/Kconfig.preempt"
  
  config GUSA
@@@ -733,6 -734,8 +735,8 @@@ config GUSA_R
          LLSC, this should be more efficient than the other alternative of
          disabling interrupts around the atomic sequence.
  
+ source "drivers/sh/Kconfig"
  endmenu
  
  menu "Boot options"
@@@ -864,4 -867,20 +868,20 @@@ source "security/Kconfig
  
  source "crypto/Kconfig"
  
+ menuconfig VIRTUALIZATION
+       bool "Virtualization"
+       default n
+       ---help---
+         Say Y here to get to see options for using your Linux host to run other
+         operating systems inside virtual machines (guests).
+         This option alone does not add any kernel code.
+         If you say N, all options in this submenu will be skipped and disabled.
+ if VIRTUALIZATION
+ source drivers/virtio/Kconfig
+ endif # VIRTUALIZATION
  source "lib/Kconfig"
@@@ -46,21 -46,16 +46,20 @@@ struct pmu
  /* Maximum number of UBC channels */
  #define HBP_NUM               2
  
 +static inline int hw_breakpoint_slots(int type)
 +{
 +      return HBP_NUM;
 +}
 +
  /* arch/sh/kernel/hw_breakpoint.c */
 -extern int arch_check_va_in_userspace(unsigned long va, u16 hbp_len);
 -extern int arch_validate_hwbkpt_settings(struct perf_event *bp,
 -                                       struct task_struct *tsk);
 +extern int arch_check_bp_in_kernelspace(struct perf_event *bp);
 +extern int arch_validate_hwbkpt_settings(struct perf_event *bp);
  extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
                                           unsigned long val, void *data);
  
  int arch_install_hw_breakpoint(struct perf_event *bp);
  void arch_uninstall_hw_breakpoint(struct perf_event *bp);
  void hw_breakpoint_pmu_read(struct perf_event *bp);
- void hw_breakpoint_pmu_unthrottle(struct perf_event *bp);
  
  extern void arch_fill_perf_breakpoint(struct perf_event *bp);
  extern int register_sh_ubc(struct sh_ubc *);
@@@ -119,17 -119,26 +119,17 @@@ static int get_hbp_len(u16 hbp_len
        return len_in_bytes;
  }
  
 -/*
 - * Check for virtual address in user space.
 - */
 -int arch_check_va_in_userspace(unsigned long va, u16 hbp_len)
 -{
 -      unsigned int len;
 -
 -      len = get_hbp_len(hbp_len);
 -
 -      return (va <= TASK_SIZE - len);
 -}
 -
  /*
   * Check for virtual address in kernel space.
   */
 -static int arch_check_va_in_kernelspace(unsigned long va, u8 hbp_len)
 +int arch_check_bp_in_kernelspace(struct perf_event *bp)
  {
        unsigned int len;
 +      unsigned long va;
 +      struct arch_hw_breakpoint *info = counter_arch_bp(bp);
  
 -      len = get_hbp_len(hbp_len);
 +      va = info->address;
 +      len = get_hbp_len(info->len);
  
        return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
  }
@@@ -217,7 -226,8 +217,7 @@@ static int arch_build_bp_info(struct pe
  /*
   * Validate the arch-specific HW Breakpoint register settings
   */
 -int arch_validate_hwbkpt_settings(struct perf_event *bp,
 -                                struct task_struct *tsk)
 +int arch_validate_hwbkpt_settings(struct perf_event *bp)
  {
        struct arch_hw_breakpoint *info = counter_arch_bp(bp);
        unsigned int align;
        if (info->address & align)
                return -EINVAL;
  
 -      /* Check that the virtual address is in the proper range */
 -      if (tsk) {
 -              if (!arch_check_va_in_userspace(info->address, info->len))
 -                      return -EFAULT;
 -      } else {
 -              if (!arch_check_va_in_kernelspace(info->address, info->len))
 -                      return -EFAULT;
 -      }
 -
        return 0;
  }
  
@@@ -344,7 -363,8 +344,7 @@@ static int __kprobes hw_breakpoint_hand
                perf_bp_event(bp, args->regs);
  
                /* Deliver the signal to userspace */
 -              if (arch_check_va_in_userspace(bp->attr.bp_addr,
 -                                             bp->attr.bp_len)) {
 +              if (!arch_check_bp_in_kernelspace(bp)) {
                        siginfo_t info;
  
                        info.si_signo = args->signr;
@@@ -405,11 -425,6 +405,6 @@@ void hw_breakpoint_pmu_read(struct perf
        /* TODO */
  }
  
- void hw_breakpoint_pmu_unthrottle(struct perf_event *bp)
- {
-       /* TODO */
- }
  int register_sh_ubc(struct sh_ubc *ubc)
  {
        /* Bail if it's already assigned */
diff --combined drivers/base/platform.c
@@@ -187,7 -187,7 +187,7 @@@ EXPORT_SYMBOL_GPL(platform_device_alloc
   * released.
   */
  int platform_device_add_resources(struct platform_device *pdev,
 -                                struct resource *res, unsigned int num)
 +                                const struct resource *res, unsigned int num)
  {
        struct resource *r;
  
@@@ -367,7 -367,7 +367,7 @@@ EXPORT_SYMBOL_GPL(platform_device_unreg
   */
  struct platform_device *platform_device_register_simple(const char *name,
                                                        int id,
 -                                                      struct resource *res,
 +                                                      const struct resource *res,
                                                        unsigned int num)
  {
        struct platform_device *pdev;
@@@ -1254,6 -1254,26 +1254,26 @@@ static int __init early_platform_driver
                }
  
                if (match) {
+                       /*
+                        * Set up a sensible init_name to enable
+                        * dev_name() and others to be used before the
+                        * rest of the driver core is initialized.
+                        */
+                       if (!match->dev.init_name && slab_is_available()) {
+                               if (match->id != -1)
+                                       match->dev.init_name =
+                                               kasprintf(GFP_KERNEL, "%s.%d",
+                                                         match->name,
+                                                         match->id);
+                               else
+                                       match->dev.init_name =
+                                               kasprintf(GFP_KERNEL, "%s",
+                                                         match->name);
+                               if (!match->dev.init_name)
+                                       return -ENOMEM;
+                       }
                        if (epdrv->pdrv->probe(match))
                                pr_warning("%s: unable to probe %s early.\n",
                                           class_str, match->name);