]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 19 Mar 2016 23:09:43 +0000 (16:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 19 Mar 2016 23:09:43 +0000 (16:09 -0700)
Pull arch/sh updates from Rich Felker:
 "This includes minor cleanups, a fix for a crash that likely affects
  all sh models with MMU, and introduction of a framework for boards
  described by device tree, which sets the stage for future J2 support"

* tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh:
  sched/preempt, sh: kmap_coherent relies on disabled preemption
  sh: add SMP method selection to device tree pseudo-board
  sh: add device tree support and generic board using device tree
  sh: remove arch-specific localtimer and use generic one
  sh: make MMU-specific SMP code conditional on CONFIG_MMU
  sh: provide unified syscall trap compatible with all SH models
  sh: New gcc support
  sh: Disable trace for kernel uncompressing.
  sh: Use generic clkdev.h header

1  2 
arch/sh/Kconfig
arch/sh/kernel/setup.c
arch/sh/kernel/smp.c

diff --combined arch/sh/Kconfig
index 17a4f1593d6564bcfb2f09e4c677f31931725516,9aabc96aed03733ac3061eb67c90ef77f83c528b..7ed20fc3fc81b1eee367e81cae239d89deeecf97
@@@ -1,5 -1,6 +1,6 @@@
  config SUPERH
        def_bool y
+       select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
        select ARCH_MIGHT_HAVE_PC_PARPORT
        select HAVE_PATA_PLATFORM
        select CLKDEV_LOOKUP
@@@ -847,10 -848,14 +848,10 @@@ config PC
  config PCI_DOMAINS
        bool
  
 -source "drivers/pci/pcie/Kconfig"
 -
  source "drivers/pci/Kconfig"
  
  source "drivers/pcmcia/Kconfig"
  
 -source "drivers/pci/hotplug/Kconfig"
 -
  endmenu
  
  menu "Executable file formats"
diff --combined arch/sh/kernel/setup.c
index 3f1c18b28e8af5fc414c13ebeb29ccbf04cd63a5,efb60ce720a79f4e6c4bc108f326c458c6ebe825..5d34605b58b5d6b01e3b444fe349b243c2e397f9
@@@ -29,6 -29,8 +29,8 @@@
  #include <linux/delay.h>
  #include <linux/platform_device.h>
  #include <linux/memblock.h>
+ #include <linux/of.h>
+ #include <linux/of_fdt.h>
  #include <asm/uaccess.h>
  #include <asm/io.h>
  #include <asm/page.h>
@@@ -78,17 -80,17 +80,17 @@@ static char __initdata command_line[COM
  
  static struct resource code_resource = {
        .name = "Kernel code",
 -      .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
 +      .flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM,
  };
  
  static struct resource data_resource = {
        .name = "Kernel data",
 -      .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
 +      .flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM,
  };
  
  static struct resource bss_resource = {
        .name   = "Kernel bss",
 -      .flags  = IORESOURCE_BUSY | IORESOURCE_MEM,
 +      .flags  = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM,
  };
  
  unsigned long memory_start;
@@@ -172,6 -174,7 +174,7 @@@ disable
  #endif
  }
  
+ #ifndef CONFIG_GENERIC_CALIBRATE_DELAY
  void calibrate_delay(void)
  {
        struct clk *clk = clk_get(NULL, "cpu_clk");
                         (loops_per_jiffy/(5000/HZ)) % 100,
                         loops_per_jiffy);
  }
+ #endif
  
  void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
                                                unsigned long end_pfn)
        res->name = "System RAM";
        res->start = start;
        res->end = end - 1;
 -      res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 +      res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
  
        if (request_resource(&iomem_resource, res)) {
                pr_err("unable to request memory_resource 0x%lx 0x%lx\n",
@@@ -238,6 -242,29 +242,29 @@@ void __init __weak plat_early_device_se
  {
  }
  
+ #ifdef CONFIG_OF
+ void __ref sh_fdt_init(phys_addr_t dt_phys)
+ {
+       static int done = 0;
+       void *dt_virt;
+       /* Avoid calling an __init function on secondary cpus. */
+       if (done) return;
+       dt_virt = phys_to_virt(dt_phys);
+       if (!dt_virt || !early_init_dt_scan(dt_virt)) {
+               pr_crit("Error: invalid device tree blob"
+                       " at physical address %p\n", (void *)dt_phys);
+               while (true)
+                       cpu_relax();
+       }
+       done = 1;
+ }
+ #endif
  void __init setup_arch(char **cmdline_p)
  {
        enable_mmu();
diff --combined arch/sh/kernel/smp.c
index 13f633add29ac46f21850400d63e6dafdc3d63c8,cbfb988023780031cb3e8e3322162109294e90c5..38e7860845db1e37f7519881337a5161f59afdfd
@@@ -22,6 -22,7 +22,7 @@@
  #include <linux/interrupt.h>
  #include <linux/sched.h>
  #include <linux/atomic.h>
+ #include <linux/clockchips.h>
  #include <asm/processor.h>
  #include <asm/mmu_context.h>
  #include <asm/smp.h>
@@@ -140,17 -141,14 +141,14 @@@ int __cpu_disable(void
         */
        migrate_irqs();
  
-       /*
-        * Stop the local timer for this CPU.
-        */
-       local_timer_stop(cpu);
        /*
         * Flush user cache and TLB mappings, and then remove this CPU
         * from the vm mask set of all processes.
         */
        flush_cache_all();
+ #ifdef CONFIG_MMU
        local_flush_tlb_all();
+ #endif
  
        clear_tasks_mm_cpumask(cpu);
  
@@@ -183,8 -181,10 +181,10 @@@ asmlinkage void start_secondary(void
        atomic_inc(&mm->mm_count);
        atomic_inc(&mm->mm_users);
        current->active_mm = mm;
+ #ifdef CONFIG_MMU
        enter_lazy_tlb(mm, current);
        local_flush_tlb_all();
+ #endif
  
        per_cpu_trap_init();
  
  
        local_irq_enable();
  
-       /* Enable local timers */
-       local_timer_setup(cpu);
        calibrate_delay();
  
        smp_store_cpu_info(cpu);
        set_cpu_online(cpu, true);
        per_cpu(cpu_state, cpu) = CPU_ONLINE;
  
 -      cpu_startup_entry(CPUHP_ONLINE);
 +      cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
  }
  
  extern struct {
@@@ -285,7 -283,8 +283,8 @@@ void arch_send_call_function_single_ipi
        mp_ops->send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE);
  }
  
- void smp_timer_broadcast(const struct cpumask *mask)
+ #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
+ void tick_broadcast(const struct cpumask *mask)
  {
        int cpu;
  
  static void ipi_timer(void)
  {
        irq_enter();
-       local_timer_interrupt();
+       tick_receive_broadcast();
        irq_exit();
  }
+ #endif
  
  void smp_message_recv(unsigned int msg)
  {
        case SMP_MSG_FUNCTION_SINGLE:
                generic_smp_call_function_single_interrupt();
                break;
+ #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
        case SMP_MSG_TIMER:
                ipi_timer();
                break;
+ #endif
        default:
                printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n",
                       smp_processor_id(), __func__, msg);
@@@ -328,6 -330,8 +330,8 @@@ int setup_profiling_timer(unsigned int 
        return 0;
  }
  
+ #ifdef CONFIG_MMU
  static void flush_tlb_all_ipi(void *info)
  {
        local_flush_tlb_all();
@@@ -467,3 -471,5 +471,5 @@@ void flush_tlb_one(unsigned long asid, 
        smp_call_function(flush_tlb_one_ipi, (void *)&fd, 1);
        local_flush_tlb_one(asid, vaddr);
  }
+ #endif