]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 16 Dec 2005 22:43:57 +0000 (14:43 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 16 Dec 2005 22:43:57 +0000 (14:43 -0800)
arch/ia64/configs/sn2_defconfig
arch/ia64/kernel/time.c
arch/ia64/kernel/uncached.c
arch/ia64/kernel/vmlinux.lds.S
arch/ia64/sn/kernel/sn2/sn2_smp.c
include/asm-ia64/delay.h
include/linux/cache.h

index e1924cc9687b91c385ab494116b53217df3ba2da..ff8bb3770c9da0487c91bfa96261ced45d68e43a 100644 (file)
@@ -113,7 +113,7 @@ CONFIG_IOSAPIC=y
 CONFIG_IA64_SGI_SN_XP=m
 CONFIG_FORCE_MAX_ZONEORDER=17
 CONFIG_SMP=y
-CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS=1024
 # CONFIG_HOTPLUG_CPU is not set
 CONFIG_SCHED_SMT=y
 CONFIG_PREEMPT=y
index 5b7e736f3b4924beb5e779a92b3c93a7f2a606f2..028a2b95936c1fa48ca316921c65b1023b9e1585 100644 (file)
@@ -249,3 +249,32 @@ time_init (void)
         */
        set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
 }
+
+#define SMALLUSECS 100
+
+void
+udelay (unsigned long usecs)
+{
+       unsigned long start;
+       unsigned long cycles;
+       unsigned long smallusecs;
+
+       /*
+        * Execute the non-preemptible delay loop (because the ITC might
+        * not be synchronized between CPUS) in relatively short time
+        * chunks, allowing preemption between the chunks.
+        */
+       while (usecs > 0) {
+               smallusecs = (usecs > SMALLUSECS) ? SMALLUSECS : usecs;
+               preempt_disable();
+               cycles = smallusecs*local_cpu_data->cyc_per_usec;
+               start = ia64_get_itc();
+
+               while (ia64_get_itc() - start < cycles)
+                       cpu_relax();
+
+               preempt_enable();
+               usecs -= smallusecs;
+       }
+}
+EXPORT_SYMBOL(udelay);
index c6d40446c2c4a37a1347b464ecf1b340c5f832d7..b631cf86ed445b60d4417b2ad37f8cfec506744d 100644 (file)
@@ -53,7 +53,7 @@ static void uncached_ipi_visibility(void *data)
        if ((status != PAL_VISIBILITY_OK) &&
            (status != PAL_VISIBILITY_OK_REMOTE_NEEDED))
                printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on "
-                      "CPU %i\n", status, get_cpu());
+                      "CPU %i\n", status, raw_smp_processor_id());
 }
 
 
@@ -63,7 +63,7 @@ static void uncached_ipi_mc_drain(void *data)
        status = ia64_pal_mc_drain();
        if (status)
                printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on "
-                      "CPU %i\n", status, get_cpu());
+                      "CPU %i\n", status, raw_smp_processor_id());
 }
 
 
@@ -105,7 +105,7 @@ uncached_get_new_chunk(struct gen_pool *poolp)
        status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
 
        dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n",
-               status, get_cpu());
+               status, raw_smp_processor_id());
 
        if (!status) {
                status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);
index 30d8564e96032bd9b7cc9735721457627db9ff7d..73af6267d2efa52d32d0d019089f22b99b659de9 100644 (file)
@@ -177,6 +177,9 @@ SECTIONS
        }
   . = ALIGN(PAGE_SIZE);                /* make sure the gate page doesn't expose kernel data */
 
+  .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
+        { *(.data.read_mostly) }
+
   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
         { *(.data.cacheline_aligned) }
 
index 5d54f5f4e92672b3b1b8f33b8f880154bdd83a43..471bbaa65d1b66b2762d0882aab345764bf0cdc7 100644 (file)
@@ -202,7 +202,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
                     unsigned long end, unsigned long nbits)
 {
        int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
-       int mymm = (mm == current->active_mm);
+       int mymm = (mm == current->active_mm && current->mm);
        volatile unsigned long *ptc0, *ptc1;
        unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value;
        short nasids[MAX_NUMNODES], nix;
index 57182d6f2b9a10c3f3f9f288d1e6f4613a9121bd..bba70207639103caaa05d0a0815b90d6eb4d3fa2 100644 (file)
@@ -84,14 +84,6 @@ __delay (unsigned long loops)
        ia64_delay_loop (loops - 1);
 }
 
-static __inline__ void
-udelay (unsigned long usecs)
-{
-       unsigned long start = ia64_get_itc();
-       unsigned long cycles = usecs*local_cpu_data->cyc_per_usec;
-
-       while (ia64_get_itc() - start < cycles)
-               cpu_relax();
-}
+extern void udelay (unsigned long usecs);
 
 #endif /* _ASM_IA64_DELAY_H */
index f6b5a46c5f827dbfa02f20252f4fcbf9d72100f9..0b7ecf3af78a70a854cefbac1d7e814a5000baf5 100644 (file)
@@ -13,7 +13,7 @@
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 #endif
 
-#if defined(CONFIG_X86) || defined(CONFIG_SPARC64)
+#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64)
 #define __read_mostly __attribute__((__section__(".data.read_mostly")))
 #else
 #define __read_mostly