Merge branches 'armv7', 'at91', 'misc' and 'omap' into devel
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Wed, 9 May 2007 09:41:28 +0000 (10:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 9 May 2007 09:41:28 +0000 (10:41 +0100)
1  2  3  4 
arch/arm/Kconfig
arch/arm/mm/context.c
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/common.c

diff --combined arch/arm/Kconfig
@@@@@ -29,10 -29,6 -29,10 -29,6 +29,10 @@@@@ config GENERIC_TIM
        bool
        default n
    
 + +config GENERIC_CLOCKEVENTS
 + +    bool
 + +    default n
 + +
    config MMU
        bool
        default y
@@@@@ -71,14 -67,6 -71,14 -67,6 +71,14 @@@@@ config GENERIC_HARDIRQ
        bool
        default y
    
 + +config STACKTRACE_SUPPORT
 + +    bool
 + +    default y
 + +
 + +config LOCKDEP_SUPPORT
 + +    bool
 + +    default y
 + +
    config TRACE_IRQFLAGS_SUPPORT
        bool
        default y
@@@@@ -174,8 -162,6 -174,8 -162,6 +174,8 @@@@@ config ARCH_VERSATIL
        select ARM_AMBA
        select ARM_VIC
        select ICST307
 + +    select GENERIC_TIME
 + +    select GENERIC_CLOCKEVENTS
        help
          This enables support for ARM Ltd Versatile board.
    
@@@@@ -269,7 -255,6 -269,7 -255,6 +269,7 @@@@@ config ARCH_IOP13X
        depends on MMU
        select PLAT_IOP
        select PCI
 + +    select ARCH_SUPPORTS_MSI
        help
          Support for Intel's IOP13XX (XScale) family of processors.
    
@@@@@ -277,7 -262,6 -277,7 -262,6 +277,7 @@@@@ config ARCH_IXP4X
        bool "IXP4xx-based"
        depends on MMU
        select GENERIC_TIME
 + +    select GENERIC_CLOCKEVENTS
        help
          Support for Intel's IXP4XX (XScale) family of processors.
    
@@@@@ -354,6 -338,6 -354,6 -338,7 +354,7 @@@@@ config ARCH_SA110
    config ARCH_S3C2410
        bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
        select GENERIC_GPIO
+++     select GENERIC_TIME
        help
          Samsung S3C2410X CPU based systems, such as the Simtec Electronics
          BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@@@@ -379,7 -363,6 -379,7 -364,6 +380,7 @@@@@ config ARCH_LH7A40
    config ARCH_OMAP
        bool "TI OMAP"
        select GENERIC_GPIO
 + +    select GENERIC_TIME
        help
          Support for TI's OMAP platform (OMAP1 and OMAP2).
    
@@@@@ -530,8 -513,6 -530,8 -514,6 +531,8 @@@@@ endmen
    
    menu "Kernel Features"
    
 + +source "kernel/time/Kconfig"
 + +
    config SMP
        bool "Symmetric Multi-Processing (EXPERIMENTAL)"
        depends on EXPERIMENTAL && REALVIEW_MPCORE
@@@@@ -591,7 -572,6 -591,7 -573,6 +592,7 @@@@@ config PREEMP
    
    config NO_IDLE_HZ
        bool "Dynamic tick timer"
 + +    depends on !GENERIC_CLOCKEVENTS
        help
          Select this option if you want to disable continuous timer ticks
          and have them programmed to occur as required. This option saves
@@@@@ -689,7 -669,6 -689,7 -670,6 +690,7 @@@@@ config LEDS_TIME
        bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \
                            MACH_OMAP_H2 || MACH_OMAP_PERSEUS2
        depends on LEDS
 + +    depends on !GENERIC_CLOCKEVENTS
        default y if ARCH_EBSA110
        help
          If you say Y here, one of the system LEDs (the green one on the
diff --combined arch/arm/mm/context.c
    #include <asm/mmu_context.h>
    #include <asm/tlbflush.h>
    
-- -unsigned int cpu_last_asid = { 1 << ASID_BITS };
++ +static DEFINE_SPINLOCK(cpu_asid_lock);
++ +unsigned int cpu_last_asid = ASID_FIRST_VERSION;
    
    /*
     * We fork()ed a process, and we need a new context for the child
@@@@@ -31,15 -31,15 -32,16 -31,15 +32,16 @@@@@ void __new_context(struct mm_struct *mm
    {
        unsigned int asid;
    
++ +    spin_lock(&cpu_asid_lock);
        asid = ++cpu_last_asid;
        if (asid == 0)
-- -            asid = cpu_last_asid = 1 << ASID_BITS;
++ +            asid = cpu_last_asid = ASID_FIRST_VERSION;
    
        /*
         * If we've used up all our ASIDs, we need
         * to start a new version and flush the TLB.
         */
-- -    if ((asid & ~ASID_MASK) == 0) {
++ +    if (unlikely((asid & ~ASID_MASK) == 0)) {
                asid = ++cpu_last_asid;
                /* set the reserved ASID before flushing the TLB */
                asm("mcr        p15, 0, %0, c13, c0, 1  @ set reserved context ID\n"
                    : "r" (0));
                isb();
                flush_tlb_all();
 +++            if (icache_is_vivt_asid_tagged()) {
 +++                    asm("mcr        p15, 0, %0, c7, c5, 0   @ invalidate I-cache\n"
 +++                        "mcr        p15, 0, %0, c7, c5, 6   @ flush BTAC/BTB\n"
 +++                        :
 +++                        : "r" (0));
 +++                    dsb();
 +++            }
        }
++ +    spin_unlock(&cpu_asid_lock);
    
++ +    mm->cpu_vm_mask = cpumask_of_cpu(smp_processor_id());
        mm->context.id = asid;
    }
@@@@@ -11,7 -11,6 -11,7 -11,6 +11,7 @@@@@ choic
    
    config ARCH_OMAP1
        bool "TI OMAP1"
 + +    select GENERIC_CLOCKEVENTS
    
    config ARCH_OMAP2
        bool "TI OMAP2"
@@@@@ -20,6 -19,6 -20,6 -19,11 +20,11 @@@@@ endchoic
    
    comment "OMAP Feature Selections"
    
+++ config OMAP_DEBUG_LEDS
+++     bool
+++     help
+++       For debug card leds on TI reference boards.
+++ 
    config OMAP_RESET_CLOCKS
        bool "Reset unused clocks during boot"
        depends on ARCH_OMAP
@@@@@ -58,6 -57,6 -58,6 -62,14 +63,14 @@@@@ config OMAP_MUX_WARNING
          to change the pin multiplexing setup.  When there are no warnings
          printed, it's safe to deselect OMAP_MUX for your product.
    
+++ config OMAP_MCBSP
+++     bool "McBSP support"
+++     depends on ARCH_OMAP
+++     default y
+++     help
+++       Say Y here if you want support for the OMAP Multichannel
+++       Buffered Serial Port.
+++ 
    choice
            prompt "System timer"
        default OMAP_MPU_TIMER
@@@@@ -93,8 -93,8 -93,8 -93,12 +93,12 @@@@@ static const void *get_config(u16 tag, 
         * in the kernel. */
        for (i = 0; i < omap_board_config_size; i++) {
                if (omap_board_config[i].tag == tag) {
---                     kinfo = &omap_board_config[i];
---                     break;
+++                     if (skip == 0) {
+++                             kinfo = &omap_board_config[i];
+++                             break;
+++                     } else {
+++                             skip--;
+++                     }
                }
        }
        if (kinfo == NULL)
@@@@@ -156,53 -156,3 -156,53 -160,3 +160,53 @@@@@ static int __init omap_add_serial_conso
        return add_preferred_console("ttyS", line, opt);
    }
    console_initcall(omap_add_serial_console);
 + +
 + +
 + +/*
 + + * 32KHz clocksource ... always available, on pretty most chips except
 + + * OMAP 730 and 1510.  Other timers could be used as clocksources, with
 + + * higher resolution in free-running counter modes (e.g. 12 MHz xtal),
 + + * but systems won't necessarily want to spend resources that way.
 + + */
 + +
 + +#if defined(CONFIG_ARCH_OMAP16XX)
 + +#define TIMER_32K_SYNCHRONIZED              0xfffbc410
 + +#elif defined(CONFIG_ARCH_OMAP24XX)
 + +#define TIMER_32K_SYNCHRONIZED              0x48004010
 + +#endif
 + +
 + +#ifdef      TIMER_32K_SYNCHRONIZED
 + +
 + +#include <linux/clocksource.h>
 + +
 + +static cycle_t omap_32k_read(void)
 + +{
 + +    return omap_readl(TIMER_32K_SYNCHRONIZED);
 + +}
 + +
 + +static struct clocksource clocksource_32k = {
 + +    .name           = "32k_counter",
 + +    .rating         = 250,
 + +    .read           = omap_32k_read,
 + +    .mask           = CLOCKSOURCE_MASK(32),
 + +    .shift          = 10,
 + +    .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 + +};
 + +
 + +static int __init omap_init_clocksource_32k(void)
 + +{
 + +    static char err[] __initdata = KERN_ERR
 + +                    "%s: can't register clocksource!\n";
 + +
 + +    if (cpu_is_omap16xx() || cpu_is_omap24xx()) {
 + +            clocksource_32k.mult = clocksource_hz2mult(32768,
 + +                                        clocksource_32k.shift);
 + +
 + +            if (clocksource_register(&clocksource_32k))
 + +                    printk(err, clocksource_32k.name);
 + +    }
 + +    return 0;
 + +}
 + +arch_initcall(omap_init_clocksource_32k);
 + +
 + +#endif      /* TIMER_32K_SYNCHRONIZED */