]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-jeff' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6
authorJeff Garzik <jgarzik@pobox.com>
Fri, 17 Feb 2006 21:11:47 +0000 (16:11 -0500)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 17 Feb 2006 21:11:47 +0000 (16:11 -0500)
76 files changed:
Documentation/cpu-hotplug.txt
Documentation/kernel-parameters.txt
arch/arm/kernel/calls.S
arch/arm/kernel/setup.c
arch/arm/kernel/smp.c
arch/arm/kernel/sys_oabi-compat.c
arch/arm/mach-integrator/platsmp.c
arch/arm/mach-iop3xx/iop321-setup.c
arch/arm/mach-iop3xx/iop331-setup.c
arch/arm/mach-ixp4xx/nslu2-setup.c
arch/arm/mach-realview/platsmp.c
arch/arm/plat-omap/pm.c
arch/i386/kernel/cpu/transmeta.c
arch/ia64/kernel/acpi.c
arch/ia64/kernel/entry.S
arch/ia64/kernel/ia64_ksyms.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/smpboot.c
arch/ia64/kernel/time.c
arch/ia64/kernel/traps.c
arch/ia64/sn/kernel/io_init.c
arch/ia64/sn/kernel/setup.c
arch/ia64/sn/kernel/sn2/prominfo_proc.c
arch/ia64/sn/kernel/sn2/sn2_smp.c
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
arch/ia64/sn/kernel/sn2/timer.c
arch/ia64/sn/kernel/sn2/timer_interrupt.c
arch/ia64/sn/kernel/tiocx.c
arch/ia64/sn/kernel/xpc_channel.c
arch/ia64/sn/kernel/xpc_main.c
arch/ia64/sn/pci/pci_dma.c
arch/ia64/sn/pci/pcibr/pcibr_ate.c
arch/ia64/sn/pci/pcibr/pcibr_dma.c
arch/ia64/sn/pci/pcibr/pcibr_provider.c
arch/x86_64/defconfig
arch/x86_64/kernel/apic.c
arch/x86_64/kernel/entry.S
arch/x86_64/kernel/head.S
arch/x86_64/kernel/io_apic.c
arch/x86_64/kernel/nmi.c
arch/x86_64/kernel/time.c
arch/x86_64/mm/k8topology.c
arch/x86_64/mm/srat.c
drivers/ide/pci/sgiioc4.c
drivers/mmc/mmci.c
drivers/net/wireless/atmel.c
drivers/serial/8250.c
drivers/serial/Kconfig
drivers/video/gbefb.c
drivers/video/s3c2410fb.c
fs/ocfs2/dlm/dlmcommon.h
fs/ocfs2/dlm/dlmconvert.c
fs/ocfs2/dlm/dlmlock.c
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/dlm/dlmrecovery.c
fs/ocfs2/journal.c
fs/ocfs2/journal.h
include/asm-arm/smp.h
include/asm-arm/unistd.h
include/asm-i386/thread_info.h
include/asm-ia64/acpi.h
include/asm-ia64/machvec_sn2.h
include/asm-ia64/sn/arch.h
include/asm-ia64/sn/bte.h
include/asm-ia64/sn/pcibr_provider.h
include/asm-ia64/sn/sn_feature_sets.h
include/asm-ia64/sn/xpc.h
include/asm-ia64/timex.h
include/asm-x86_64/proto.h
include/linux/kernel.h
include/linux/mm.h
include/linux/timex.h
kernel/sysctl.c
kernel/timer.c
mm/memory.c
mm/mempolicy.c

index 08c5d04f308600fca7688eeb0ae51cda9e1d3006..e05278087ffaa04c90afd11bf85ff5629f814507 100644 (file)
@@ -44,10 +44,20 @@ maxcpus=n    Restrict boot time cpus to n. Say if you have 4 cpus, using
              maxcpus=2 will only boot 2. You can choose to bring the
              other cpus later online, read FAQ's for more info.
 
-additional_cpus=n      [x86_64 only] use this to limit hotpluggable cpus.
-                        This option sets
+additional_cpus*=n     Use this to limit hotpluggable cpus. This option sets
                        cpu_possible_map = cpu_present_map + additional_cpus
 
+(*) Option valid only for following architectures
+- x86_64, ia64
+
+ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT
+to determine the number of potentially hot-pluggable cpus. The implementation
+should only rely on this to count the #of cpus, but *MUST* not rely on the
+apicid values in those tables for disabled apics. In the event BIOS doesnt
+mark such hot-pluggable cpus as disabled entries, one could use this
+parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
+
+
 CPU maps and such
 -----------------
 [More on cpumaps and primitive to manipulate, please check
index ac75b57edf2e71050d4eacd1b1b91d2aaa987076..b874771385cda9df928fc651dee1e7585c6a08ff 100644 (file)
@@ -1638,6 +1638,9 @@ running once the system is up.
                        Format:
                        <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
 
+       norandmaps      Don't use address space randomization
+                       Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space
+
 
 ______________________________________________________________________
 Changelog:
index 8c3035d5ffc9c28c7c6ae416397b6341184c203b..3173924a9b6022f6e4b30e00f414e7e5e9e2dbde 100644 (file)
                CALL(sys_statfs)
 /* 100 */      CALL(sys_fstatfs)
                CALL(sys_ni_syscall)
-               CALL(OBSOLETE(sys_socketcall))
+               CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
                CALL(sys_syslog)
                CALL(sys_setitimer)
 /* 105 */      CALL(sys_getitimer)
index c45d10d07bde95f73034f47fd26877c41548ba08..68273b4dc8820b39a3e3c87456203fbecd65dde1 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/root_dev.h>
 #include <linux/cpu.h>
 #include <linux/interrupt.h>
+#include <linux/smp.h>
 
 #include <asm/cpu.h>
 #include <asm/elf.h>
@@ -771,6 +772,10 @@ void __init setup_arch(char **cmdline_p)
        paging_init(&meminfo, mdesc);
        request_standard_resources(&meminfo, mdesc);
 
+#ifdef CONFIG_SMP
+       smp_init_cpus();
+#endif
+
        cpu_init();
 
        /*
index 7338948bd7d38046e355807e73c44413d3db40d7..02aa300c46337fede228bf70d302433f4a12c548 100644 (file)
@@ -338,7 +338,6 @@ void __init smp_prepare_boot_cpu(void)
 
        per_cpu(cpu_data, cpu).idle = current;
 
-       cpu_set(cpu, cpu_possible_map);
        cpu_set(cpu, cpu_present_map);
        cpu_set(cpu, cpu_online_map);
 }
index 9d4b76409c6446a99173a160d6e4a4349a015dd3..8e2f9bc3368b0600f99c6eef4ae6c3cc70db1fe3 100644 (file)
@@ -64,6 +64,7 @@
  * sys_connect:
  * sys_sendmsg:
  * sys_sendto:
+ * sys_socketcall:
  *
  *   struct sockaddr_un loses its padding with EABI.  Since the size of the
  *   structure is used as a validation test in unix_mkname(), we need to
@@ -78,6 +79,7 @@
 #include <linux/eventpoll.h>
 #include <linux/sem.h>
 #include <linux/socket.h>
+#include <linux/net.h>
 #include <asm/ipc.h>
 #include <asm/uaccess.h>
 
@@ -408,3 +410,31 @@ asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned fla
        return sys_sendmsg(fd, msg, flags);
 }
 
+asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args)
+{
+       unsigned long r = -EFAULT, a[6];
+
+       switch (call) {
+       case SYS_BIND:
+               if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
+                       r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]);
+               break;
+       case SYS_CONNECT:
+               if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
+                       r = sys_oabi_connect(a[0], (struct sockaddr __user *)a[1], a[2]);
+               break;
+       case SYS_SENDTO:
+               if (copy_from_user(a, args, 6 * sizeof(long)) == 0)
+                       r = sys_oabi_sendto(a[0], (void __user *)a[1], a[2], a[3],
+                                           (struct sockaddr __user *)a[4], a[5]);
+               break;
+       case SYS_SENDMSG:
+               if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
+                       r = sys_oabi_sendmsg(a[0], (struct msghdr __user *)a[1], a[2]);
+               break;
+       default:
+               r = sys_socketcall(call, args);
+       }
+
+       return r;
+}
index ea10bd8c972c4bf4d6df17c0ef0faf77871f4f7f..1bc8534ef0c696d5fca65a19dbe10b47be3f7d66 100644 (file)
@@ -140,6 +140,18 @@ static void __init poke_milo(void)
        mb();
 }
 
+/*
+ * Initialise the CPU possible map early - this describes the CPUs
+ * which may be present or become present in the system.
+ */
+void __init smp_init_cpus(void)
+{
+       unsigned int i, ncores = get_core_count();
+
+       for (i = 0; i < ncores; i++)
+               cpu_set(i, cpu_possible_map);
+}
+
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned int ncores = get_core_count();
@@ -176,14 +188,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                max_cpus = ncores;
 
        /*
-        * Initialise the possible/present maps.
-        * cpu_possible_map describes the set of CPUs which may be present
-        * cpu_present_map describes the set of CPUs populated
+        * Initialise the present map, which describes the set of CPUs
+        * actually populated at the present time.
         */
-       for (i = 0; i < max_cpus; i++) {
-               cpu_set(i, cpu_possible_map);
+       for (i = 0; i < max_cpus; i++)
                cpu_set(i, cpu_present_map);
-       }
 
        /*
         * Do we need any more CPUs? If so, then let them know where
index e4f4c52d93d44a4606f4bdb8ba36d91b5355b4f6..0ebbcb20c6ae2ab3a43177a019c51ec254d16400 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/config.h>
-#include <linux/init.h>
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/platform_device.h>
index 63585485123e50ae208e5ea9426efe0e50780296..2d6abe5be14df2a8e41dd8f8c3ee1ec39c0df582 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/config.h>
-#include <linux/init.h>
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/platform_device.h>
index da9340a5343419c926b52a195ad3782c76cdcc3b..f260a9d34f707637142865a8962d6784b8ff341a 100644 (file)
@@ -27,8 +27,6 @@ static struct flash_platform_data nslu2_flash_data = {
 };
 
 static struct resource nslu2_flash_resource = {
-       .start                  = NSLU2_FLASH_BASE,
-       .end                    = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
        .flags                  = IORESOURCE_MEM,
 };
 
@@ -116,6 +114,10 @@ static void __init nslu2_init(void)
 {
        ixp4xx_sys_init();
 
+       nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
+       nslu2_flash_resource.end =
+               IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
+
        pm_power_off = nslu2_power_off;
 
        platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
index a8fbd76d8be5855e97eea74502f949cde0abf828..b8484e15dacb7f3e8f3d69ca09ea58334ea47b42 100644 (file)
@@ -143,6 +143,18 @@ static void __init poke_milo(void)
        mb();
 }
 
+/*
+ * Initialise the CPU possible map early - this describes the CPUs
+ * which may be present or become present in the system.
+ */
+void __init smp_init_cpus(void)
+{
+       unsigned int i, ncores = get_core_count();
+
+       for (i = 0; i < ncores; i++)
+               cpu_set(i, cpu_possible_map);
+}
+
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned int ncores = get_core_count();
@@ -179,14 +191,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
        local_timer_setup(cpu);
 
        /*
-        * Initialise the possible/present maps.
-        * cpu_possible_map describes the set of CPUs which may be present
-        * cpu_present_map describes the set of CPUs populated
+        * Initialise the present map, which describes the set of CPUs
+        * actually populated at the present time.
         */
-       for (i = 0; i < max_cpus; i++) {
-               cpu_set(i, cpu_possible_map);
+       for (i = 0; i < max_cpus; i++)
                cpu_set(i, cpu_present_map);
-       }
 
        /*
         * Do we need any more CPUs? If so, then let them know where
index 1a24e2c10714e498942cdaae1d3386af6f9f7b37..093efd786f211c9ffbdba88646c7485531882aed 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/pm.h>
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
-#include <linux/pm.h>
 #include <linux/interrupt.h>
 
 #include <asm/io.h>
index bdbeb77f4e22fa9e7f6636cf03c03e8bb59c4dd6..7214c9b577ab91329ecdb261926e2cdde6e729fd 100644 (file)
@@ -1,4 +1,5 @@
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include <linux/init.h>
 #include <asm/processor.h>
 #include <asm/msr.h>
index d2702c419cf830450ad63621bccec1e50842e718..ecd44bdc8394fee371fc944af433163d0adb3952 100644 (file)
@@ -761,6 +761,59 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
        return (0);
 }
 
+int additional_cpus __initdata = -1;
+
+static __init int setup_additional_cpus(char *s)
+{
+       if (s)
+               additional_cpus = simple_strtol(s, NULL, 0);
+
+       return 0;
+}
+
+early_param("additional_cpus", setup_additional_cpus);
+
+/*
+ * cpu_possible_map should be static, it cannot change as cpu's
+ * are onlined, or offlined. The reason is per-cpu data-structures
+ * are allocated by some modules at init time, and dont expect to
+ * do this dynamically on cpu arrival/departure.
+ * cpu_present_map on the other hand can change dynamically.
+ * In case when cpu_hotplug is not compiled, then we resort to current
+ * behaviour, which is cpu_possible == cpu_present.
+ * - Ashok Raj
+ *
+ * Three ways to find out the number of additional hotplug CPUs:
+ * - If the BIOS specified disabled CPUs in ACPI/mptables use that.
+ * - The user can overwrite it with additional_cpus=NUM
+ * - Otherwise don't reserve additional CPUs.
+ */
+__init void prefill_possible_map(void)
+{
+       int i;
+       int possible, disabled_cpus;
+
+       disabled_cpus = total_cpus - available_cpus;
+
+       if (additional_cpus == -1) {
+               if (disabled_cpus > 0)
+                       additional_cpus = disabled_cpus;
+               else
+                       additional_cpus = 0;
+       }
+
+       possible = available_cpus + additional_cpus;
+
+       if (possible > NR_CPUS)
+               possible = NR_CPUS;
+
+       printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
+               possible, max((possible - available_cpus), 0));
+
+       for (i = 0; i < possible; i++)
+               cpu_set(i, cpu_possible_map);
+}
+
 int acpi_map_lsapic(acpi_handle handle, int *pcpu)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
index 27b222c277e4d77049b35c6bf972dd2995156f4f..930fdfca6ddb610092a92f692419469fe4cab39d 100644 (file)
@@ -569,7 +569,9 @@ GLOBAL_ENTRY(ia64_trace_syscall)
 .mem.offset 0,0; st8.spill [r2]=r8             // store return value in slot for r8
 .mem.offset 8,0; st8.spill [r3]=r10            // clear error indication in slot for r10
        br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value
-.ret3: br.cond.sptk .work_pending_syscall_end
+.ret3:
+(pUStk)        cmp.eq.unc p6,p0=r0,r0                  // p6 <- pUStk
+       br.cond.sptk .work_pending_syscall_end
 
 strace_error:
        ld8 r3=[r2]                             // load pt_regs.r8
index e72de580ebbf8b9a41801c08b7e09da4d9d33a7c..bbcfd08378a6c37d1389433f6d92c5d54a33e893 100644 (file)
 
 #include <linux/string.h>
 EXPORT_SYMBOL(memset);
-EXPORT_SYMBOL(memchr);
-EXPORT_SYMBOL(memcmp);
 EXPORT_SYMBOL(memcpy);
-EXPORT_SYMBOL(memmove);
-EXPORT_SYMBOL(memscan);
-EXPORT_SYMBOL(strcat);
-EXPORT_SYMBOL(strchr);
-EXPORT_SYMBOL(strcmp);
-EXPORT_SYMBOL(strcpy);
 EXPORT_SYMBOL(strlen);
-EXPORT_SYMBOL(strncat);
-EXPORT_SYMBOL(strncmp);
-EXPORT_SYMBOL(strncpy);
-EXPORT_SYMBOL(strnlen);
-EXPORT_SYMBOL(strrchr);
-EXPORT_SYMBOL(strstr);
-EXPORT_SYMBOL(strpbrk);
 
 #include <asm/checksum.h>
 EXPORT_SYMBOL(ip_fast_csum);           /* hand-coded assembly */
index 35f7835294a38bc10bff199ec3c6e8d78f4485b6..3258e09278d07ca440c77b211e4cc67f3c5c4616 100644 (file)
@@ -430,6 +430,7 @@ setup_arch (char **cmdline_p)
        if (early_console_setup(*cmdline_p) == 0)
                mark_bsp_online();
 
+       parse_early_param();
 #ifdef CONFIG_ACPI
        /* Initialize the ACPI boot-time table parser */
        acpi_table_init();
@@ -688,6 +689,9 @@ void
 setup_per_cpu_areas (void)
 {
        /* start_kernel() requires this... */
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
+       prefill_possible_map();
+#endif
 }
 
 /*
index 8f44e7d2df66eb8e0d052132ab8fe7a390587212..b681ef34a86e13a5ecab3a7e1ec2eb6b7378e847 100644 (file)
@@ -129,7 +129,7 @@ DEFINE_PER_CPU(int, cpu_state);
 /* Bitmasks of currently online, and possible CPUs */
 cpumask_t cpu_online_map;
 EXPORT_SYMBOL(cpu_online_map);
-cpumask_t cpu_possible_map;
+cpumask_t cpu_possible_map = CPU_MASK_NONE;
 EXPORT_SYMBOL(cpu_possible_map);
 
 cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned;
@@ -506,9 +506,6 @@ smp_build_cpu_map (void)
 
        for (cpu = 0; cpu < NR_CPUS; cpu++) {
                ia64_cpu_to_sapicid[cpu] = -1;
-#ifdef CONFIG_HOTPLUG_CPU
-               cpu_set(cpu, cpu_possible_map);
-#endif
        }
 
        ia64_cpu_to_sapicid[0] = boot_cpu_id;
index a094ec49ccfab6fe8822771f9335def7a51cacf8..307d01e15b2ea359c043d11c5e19a0bc57bd1002 100644 (file)
@@ -250,32 +250,27 @@ time_init (void)
        set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
 }
 
-#define SMALLUSECS 100
-
-void
-udelay (unsigned long usecs)
+/*
+ * Generic udelay assumes that if preemption is allowed and the thread
+ * migrates to another CPU, that the ITC values are synchronized across
+ * all CPUs.
+ */
+static void
+ia64_itc_udelay (unsigned long usecs)
 {
-       unsigned long start;
-       unsigned long cycles;
-       unsigned long smallusecs;
+       unsigned long start = ia64_get_itc();
+       unsigned long end = start + usecs*local_cpu_data->cyc_per_usec;
 
-       /*
-        * 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 (time_before(ia64_get_itc(), end))
+               cpu_relax();
+}
 
-               while (ia64_get_itc() - start < cycles)
-                       cpu_relax();
+void (*ia64_udelay)(unsigned long usecs) = &ia64_itc_udelay;
 
-               preempt_enable();
-               usecs -= smallusecs;
-       }
+void
+udelay (unsigned long usecs)
+{
+       (*ia64_udelay)(usecs);
 }
 EXPORT_SYMBOL(udelay);
 
index 55391901b0137f17184a7e8203d5087581ecd14e..dabd6c32641ecc412d81d35f423813c3c72aa4b3 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>       /* for EXPORT_SYMBOL */
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
+#include <linux/delay.h>               /* for ssleep() */
 
 #include <asm/fpswa.h>
 #include <asm/ia32.h>
@@ -116,6 +117,13 @@ die (const char *str, struct pt_regs *regs, long err)
        bust_spinlocks(0);
        die.lock_owner = -1;
        spin_unlock_irq(&die.lock);
+
+       if (panic_on_oops) {
+               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
+               ssleep(5);
+               panic("Fatal exception");
+       }
+
        do_exit(SIGSEGV);
 }
 
index 3437c2390429daff50c60e1700dde33e66645198..3edef0d32f8653559bec1a09a6df96ff57bd7e1e 100644 (file)
 #include "xtalk/hubdev.h"
 #include "xtalk/xwidgetdev.h"
 
+
+extern void sn_init_cpei_timer(void);
+extern void register_sn_procfs(void);
+
 static struct list_head sn_sysdata_list;
 
 /* sysdata list struct */
@@ -40,12 +44,12 @@ struct brick {
        struct slab_info slab_info[MAX_SLABS + 1];
 };
 
-int sn_ioif_inited = 0;                /* SN I/O infrastructure initialized? */
+int sn_ioif_inited;            /* SN I/O infrastructure initialized? */
 
 struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES];      /* indexed by asic type */
 
-static int max_segment_number = 0; /* Default highest segment number */
-static int max_pcibus_number = 255; /* Default highest pci bus number */
+static int max_segment_number;          /* Default highest segment number */
+static int max_pcibus_number = 255;    /* Default highest pci bus number */
 
 /*
  * Hooks and struct for unsupported pci providers
@@ -84,7 +88,6 @@ static inline u64
 sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
                             u64 address)
 {
-
        struct ia64_sal_retval ret_stuff;
        ret_stuff.status = 0;
        ret_stuff.v0 = 0;
@@ -94,7 +97,6 @@ sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
                        (u64) nasid, (u64) widget_num,
                        (u64) device_num, (u64) address, 0, 0, 0);
        return ret_stuff.status;
-
 }
 
 /*
@@ -102,7 +104,6 @@ sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
  */
 static inline u64 sal_get_hubdev_info(u64 handle, u64 address)
 {
-
        struct ia64_sal_retval ret_stuff;
        ret_stuff.status = 0;
        ret_stuff.v0 = 0;
@@ -118,7 +119,6 @@ static inline u64 sal_get_hubdev_info(u64 handle, u64 address)
  */
 static inline u64 sal_get_pcibus_info(u64 segment, u64 busnum, u64 address)
 {
-
        struct ia64_sal_retval ret_stuff;
        ret_stuff.status = 0;
        ret_stuff.v0 = 0;
@@ -215,7 +215,7 @@ static void __init sn_fixup_ionodes(void)
        struct hubdev_info *hubdev;
        u64 status;
        u64 nasid;
-       int i, widget, device;
+       int i, widget, device, size;
 
        /*
         * Get SGI Specific HUB chipset information.
@@ -251,48 +251,37 @@ static void __init sn_fixup_ionodes(void)
                if (!hubdev->hdi_flush_nasid_list.widget_p)
                        continue;
 
+               size = (HUB_WIDGET_ID_MAX + 1) *
+                       sizeof(struct sn_flush_device_kernel *);
                hubdev->hdi_flush_nasid_list.widget_p =
-                   kmalloc((HUB_WIDGET_ID_MAX + 1) *
-                           sizeof(struct sn_flush_device_kernel *),
-                           GFP_KERNEL);
-               memset(hubdev->hdi_flush_nasid_list.widget_p, 0x0,
-                      (HUB_WIDGET_ID_MAX + 1) *
-                      sizeof(struct sn_flush_device_kernel *));
+                       kzalloc(size, GFP_KERNEL);
+               if (!hubdev->hdi_flush_nasid_list.widget_p)
+                       BUG();
 
                for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {
-                       sn_flush_device_kernel = kmalloc(DEV_PER_WIDGET *
-                                                        sizeof(struct
-                                                       sn_flush_device_kernel),
-                                                       GFP_KERNEL);
+                       size = DEV_PER_WIDGET *
+                               sizeof(struct sn_flush_device_kernel);
+                       sn_flush_device_kernel = kzalloc(size, GFP_KERNEL);
                        if (!sn_flush_device_kernel)
                                BUG();
-                       memset(sn_flush_device_kernel, 0x0,
-                              DEV_PER_WIDGET *
-                              sizeof(struct sn_flush_device_kernel));
 
                        dev_entry = sn_flush_device_kernel;
                        for (device = 0; device < DEV_PER_WIDGET;
                             device++,dev_entry++) {
-                               dev_entry->common = kmalloc(sizeof(struct
-                                                       sn_flush_device_common),
-                                                           GFP_KERNEL);
+                               size = sizeof(struct sn_flush_device_common);
+                               dev_entry->common = kzalloc(size, GFP_KERNEL);
                                if (!dev_entry->common)
                                        BUG();
-                               memset(dev_entry->common, 0x0, sizeof(struct
-                                                      sn_flush_device_common));
 
                                if (sn_prom_feature_available(
                                                       PRF_DEVICE_FLUSH_LIST))
                                        status = sal_get_device_dmaflush_list(
-                                                                         nasid,
-                                                                        widget,
-                                                                        device,
-                                                     (u64)(dev_entry->common));
+                                                    nasid, widget, device,
+                                                    (u64)(dev_entry->common));
                                else
                                        status = sn_device_fixup_war(nasid,
-                                                                    widget,
-                                                                    device,
-                                                            dev_entry->common);
+                                                    widget, device,
+                                                    dev_entry->common);
                                if (status != SALRET_OK)
                                        panic("SAL call failed: %s\n",
                                              ia64_sal_strerror(status));
@@ -383,13 +372,12 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
 
        pci_dev_get(dev); /* for the sysdata pointer */
        pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
-       if (pcidev_info <= 0)
+       if (!pcidev_info)
                BUG();          /* Cannot afford to run out of memory */
 
-       sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
-       if (sn_irq_info <= 0)
+       sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
+       if (!sn_irq_info)
                BUG();          /* Cannot afford to run out of memory */
-       memset(sn_irq_info, 0, sizeof(struct sn_irq_info));
 
        /* Call to retrieve pci device information needed by kernel. */
        status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, 
@@ -482,13 +470,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
  */
 void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 {
-       int status = 0;
+       int status;
        int nasid, cnode;
        struct pci_controller *controller;
        struct sn_pci_controller *sn_controller;
        struct pcibus_bussoft *prom_bussoft_ptr;
        struct hubdev_info *hubdev_info;
-       void *provider_soft = NULL;
+       void *provider_soft;
        struct sn_pcibus_provider *provider;
 
        status = sal_get_pcibus_info((u64) segment, (u64) busnum,
@@ -535,6 +523,8 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
        bus->sysdata = controller;
        if (provider->bus_fixup)
                provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller);
+       else
+               provider_soft = NULL;
 
        if (provider_soft == NULL) {
                /* fixup failed or not applicable */
@@ -638,13 +628,8 @@ void sn_bus_free_sysdata(void)
 
 static int __init sn_pci_init(void)
 {
-       int i = 0;
-       int j = 0;
+       int i, j;
        struct pci_dev *pci_dev = NULL;
-       extern void sn_init_cpei_timer(void);
-#ifdef CONFIG_PROC_FS
-       extern void register_sn_procfs(void);
-#endif
 
        if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM())
                return 0;
@@ -700,32 +685,29 @@ static int __init sn_pci_init(void)
  */
 void hubdev_init_node(nodepda_t * npda, cnodeid_t node)
 {
-
        struct hubdev_info *hubdev_info;
+       int size;
+       pg_data_t *pg;
+
+       size = sizeof(struct hubdev_info);
 
        if (node >= num_online_nodes()) /* Headless/memless IO nodes */
-               hubdev_info =
-                   (struct hubdev_info *)alloc_bootmem_node(NODE_DATA(0),
-                                                            sizeof(struct
-                                                                   hubdev_info));
+               pg = NODE_DATA(0);
        else
-               hubdev_info =
-                   (struct hubdev_info *)alloc_bootmem_node(NODE_DATA(node),
-                                                            sizeof(struct
-                                                                   hubdev_info));
-       npda->pdinfo = (void *)hubdev_info;
+               pg = NODE_DATA(node);
 
+       hubdev_info = (struct hubdev_info *)alloc_bootmem_node(pg, size);
+
+       npda->pdinfo = (void *)hubdev_info;
 }
 
 geoid_t
 cnodeid_get_geoid(cnodeid_t cnode)
 {
-
        struct hubdev_info *hubdev;
 
        hubdev = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
        return hubdev->hdi_geoid;
-
 }
 
 subsys_initcall(sn_pci_init);
@@ -734,3 +716,4 @@ EXPORT_SYMBOL(sn_pci_unfixup_slot);
 EXPORT_SYMBOL(sn_pci_controller_fixup);
 EXPORT_SYMBOL(sn_bus_store_sysdata);
 EXPORT_SYMBOL(sn_bus_free_sysdata);
+EXPORT_SYMBOL(sn_pcidev_info_get);
index 48645ac120fc3d0b8b7855de1f0d965b5694a2d4..5b84836c2171b1a53c3dddc0cc060055c1433a15 100644 (file)
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second);
 DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
 EXPORT_PER_CPU_SYMBOL(__sn_hub_info);
 
-DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]);
+DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
 EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid);
 
 DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda);
@@ -317,6 +317,7 @@ struct pcdp_vga_device {
 #define PCDP_PCI_TRANS_IOPORT  0x02
 #define PCDP_PCI_TRANS_MMIO    0x01
 
+#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
 static void
 sn_scan_pcdp(void)
 {
@@ -358,6 +359,7 @@ sn_scan_pcdp(void)
                break; /* once we find the primary, we're done */
        }
 }
+#endif
 
 static unsigned long sn2_rtc_initial;
 
index 81c63b2f8ae99b525f9f82168a4e7073494d711b..6ae276d5d50c858d213c25513d4c0748599151b8 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1999,2001-2004 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (C) 1999,2001-2004, 2006 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * Module to export the system's Firmware Interface Tables, including
  * PROM revision numbers and banners, in /proc
@@ -190,7 +190,7 @@ static int
 read_version_entry(char *page, char **start, off_t off, int count, int *eof,
                   void *data)
 {
-       int len = 0;
+       int len;
 
        /* data holds the NASID of the node */
        len = dump_version(page, (unsigned long)data);
@@ -202,7 +202,7 @@ static int
 read_fit_entry(char *page, char **start, off_t off, int count, int *eof,
               void *data)
 {
-       int len = 0;
+       int len;
 
        /* data holds the NASID of the node */
        len = dump_fit(page, (unsigned long)data);
@@ -229,13 +229,16 @@ int __init prominfo_init(void)
        struct proc_dir_entry *p;
        cnodeid_t cnodeid;
        unsigned long nasid;
+       int size;
        char name[NODE_NAME_LEN];
 
        if (!ia64_platform_is("sn2"))
                return 0;
 
-       proc_entries = kmalloc(num_online_nodes() * sizeof(struct proc_dir_entry *),
-                              GFP_KERNEL);
+       size = num_online_nodes() * sizeof(struct proc_dir_entry *);
+       proc_entries = kzalloc(size, GFP_KERNEL);
+       if (!proc_entries)
+               return -ENOMEM;
 
        sgi_prominfo_entry = proc_mkdir("sgi_prominfo", NULL);
 
@@ -244,14 +247,12 @@ int __init prominfo_init(void)
                sprintf(name, "node%d", cnodeid);
                *entp = proc_mkdir(name, sgi_prominfo_entry);
                nasid = cnodeid_to_nasid(cnodeid);
-               p = create_proc_read_entry(
-                       "fit", 0, *entp, read_fit_entry,
-                       (void *)nasid);
+               p = create_proc_read_entry("fit", 0, *entp, read_fit_entry,
+                                          (void *)nasid);
                if (p)
                        p->owner = THIS_MODULE;
-               p = create_proc_read_entry(
-                       "version", 0, *entp, read_version_entry,
-                       (void *)nasid);
+               p = create_proc_read_entry("version", 0, *entp,
+                                          read_version_entry, (void *)nasid);
                if (p)
                        p->owner = THIS_MODULE;
                entp++;
@@ -263,7 +264,7 @@ int __init prominfo_init(void)
 void __exit prominfo_exit(void)
 {
        struct proc_dir_entry **entp;
-       unsigned cnodeid;
+       unsigned int cnodeid;
        char name[NODE_NAME_LEN];
 
        entp = proc_entries;
index f153a4c35c70b206cbcbb450de72feb943d3be16..24eefb2fc55ffd56360209316e6c9b6a1f421e2a 100644 (file)
@@ -46,8 +46,14 @@ DECLARE_PER_CPU(struct ptc_stats, ptcstats);
 
 static  __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock);
 
-void sn2_ptc_deadlock_recovery(short *, short, short, int, volatile unsigned long *, unsigned long,
-       volatile unsigned long *, unsigned long);
+extern unsigned long
+sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long,
+                              volatile unsigned long *, unsigned long,
+                              volatile unsigned long *, unsigned long);
+void
+sn2_ptc_deadlock_recovery(short *, short, short, int,
+                         volatile unsigned long *, unsigned long,
+                         volatile unsigned long *, unsigned long);
 
 /*
  * Note: some is the following is captured here to make degugging easier
@@ -59,16 +65,6 @@ void sn2_ptc_deadlock_recovery(short *, short, short, int, volatile unsigned lon
 #define reset_max_active_on_deadlock() 1
 #define PTC_LOCK(sh1)                  ((sh1) ? &sn2_global_ptc_lock : &sn_nodepda->ptc_lock)
 
-static inline void ptc_lock(int sh1, unsigned long *flagp)
-{
-       spin_lock_irqsave(PTC_LOCK(sh1), *flagp);
-}
-
-static inline void ptc_unlock(int sh1, unsigned long flags)
-{
-       spin_unlock_irqrestore(PTC_LOCK(sh1), flags);
-}
-
 struct ptc_stats {
        unsigned long ptc_l;
        unsigned long change_rid;
@@ -82,6 +78,8 @@ struct ptc_stats {
        unsigned long shub_ptc_flushes_not_my_mm;
 };
 
+#define sn2_ptctest    0
+
 static inline unsigned long wait_piowc(void)
 {
        volatile unsigned long *piows;
@@ -200,7 +198,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
        max_active = max_active_pio(shub1);
 
        itc = ia64_get_itc();
-       ptc_lock(shub1, &flags);
+       spin_lock_irqsave(PTC_LOCK(shub1), flags);
        itc2 = ia64_get_itc();
 
        __get_cpu_var(ptcstats).lock_itc_clocks += itc2 - itc;
@@ -258,7 +256,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
                ia64_srlz_d();
        }
 
-       ptc_unlock(shub1, flags);
+       spin_unlock_irqrestore(PTC_LOCK(shub1), flags);
 
        preempt_enable();
 }
@@ -270,11 +268,12 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
  * TLB flush transaction.  The recovery sequence is somewhat tricky & is
  * coded in assembly language.
  */
-void sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid, volatile unsigned long *ptc0, unsigned long data0,
-       volatile unsigned long *ptc1, unsigned long data1)
+
+void
+sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid,
+                         volatile unsigned long *ptc0, unsigned long data0,
+                         volatile unsigned long *ptc1, unsigned long data1)
 {
-       extern unsigned long sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long,
-               volatile unsigned long *, unsigned long, volatile unsigned long *, unsigned long);
        short nasid, i;
        unsigned long *piows, zeroval, n;
 
index a06719d752a03112e697b0a060864ec99267e012..c686d9c12f7b1dc3c66b49f72acbd128466339bb 100644 (file)
@@ -6,11 +6,11 @@
  * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved.
  */
 #include <linux/config.h>
-#include <asm/uaccess.h>
 
 #ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <asm/uaccess.h>
 #include <asm/sn/sn_sal.h>
 
 static int partition_id_show(struct seq_file *s, void *p)
@@ -90,10 +90,10 @@ static int coherence_id_open(struct inode *inode, struct file *file)
        return single_open(file, coherence_id_show, NULL);
 }
 
-static struct proc_dir_entry *sn_procfs_create_entry(
-       const char *name, struct proc_dir_entry *parent,
-       int (*openfunc)(struct inode *, struct file *),
-       int (*releasefunc)(struct inode *, struct file *))
+static struct proc_dir_entry
+*sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent,
+                       int (*openfunc)(struct inode *, struct file *),
+                       int (*releasefunc)(struct inode *, struct file *))
 {
        struct proc_dir_entry *e = create_proc_entry(name, 0444, parent);
 
@@ -126,24 +126,24 @@ void register_sn_procfs(void)
                return;
 
        sn_procfs_create_entry("partition_id", sgi_proc_dir,
-               partition_id_open, single_release);
+                              partition_id_open, single_release);
 
        sn_procfs_create_entry("system_serial_number", sgi_proc_dir,
-               system_serial_number_open, single_release);
+                              system_serial_number_open, single_release);
 
        sn_procfs_create_entry("licenseID", sgi_proc_dir, 
-               licenseID_open, single_release);
+                              licenseID_open, single_release);
 
        e = sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, 
-               sn_force_interrupt_open, single_release);
+                                  sn_force_interrupt_open, single_release);
        if (e) 
                e->proc_fops->write = sn_force_interrupt_write_proc;
 
        sn_procfs_create_entry("coherence_id", sgi_proc_dir, 
-               coherence_id_open, single_release);
+                              coherence_id_open, single_release);
        
        sn_procfs_create_entry("sn_topology", sgi_proc_dir,
-               sn_topology_open, sn_topology_release);
+                              sn_topology_open, sn_topology_release);
 }
 
 #endif /* CONFIG_PROC_FS */
index deb9baf4d4735f8562f16726a2d49b0075aff293..56a88b6df4b41fbca0df635ab5fc23988b0298b4 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <asm/hw_irq.h>
 #include <asm/system.h>
+#include <asm/timex.h>
 
 #include <asm/sn/leds.h>
 #include <asm/sn/shub_mmr.h>
@@ -28,9 +29,27 @@ static struct time_interpolator sn2_interpolator = {
        .source = TIME_SOURCE_MMIO64
 };
 
+/*
+ * sn udelay uses the RTC instead of the ITC because the ITC is not
+ * synchronized across all CPUs, and the thread may migrate to another CPU
+ * if preemption is enabled.
+ */
+static void
+ia64_sn_udelay (unsigned long usecs)
+{
+       unsigned long start = rtc_time();
+       unsigned long end = start +
+                       usecs * sn_rtc_cycles_per_second / 1000000;
+
+       while (time_before((unsigned long)rtc_time(), end))
+               cpu_relax();
+}
+
 void __init sn_timer_init(void)
 {
        sn2_interpolator.frequency = sn_rtc_cycles_per_second;
        sn2_interpolator.addr = RTC_COUNTER_ADDR;
        register_time_interpolator(&sn2_interpolator);
+
+       ia64_udelay = &ia64_sn_udelay;
 }
index adf5db2e2afeb4e2742457b40c062e0546e42972..fa7f69945917dd4b80ae5a5d6dc9897b19d1a9b8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
  *
- * Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2005, 2006 Silicon Graphics, Inc.  All Rights Reserved.
  * 
  * This program is free software; you can redistribute it and/or modify it 
  * under the terms of version 2 of the GNU General Public License 
  * License along with this program; if not, write the Free Software 
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  * 
- * Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, 
- * Mountain View, CA  94043, or:
- * 
- * http://www.sgi.com 
- * 
  * For further information regarding this notice, see: 
  * 
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan
index d263d3e8fbb91b7067ec3e137a9a2c085d048b05..8a56f8b5ffa2243d633f06dae80f7d0e53056e55 100644 (file)
@@ -284,12 +284,10 @@ struct sn_irq_info *tiocx_irq_alloc(nasid_t nasid, int widget, int irq,
        if ((nasid & 1) == 0)
                return NULL;
 
-       sn_irq_info = kmalloc(sn_irq_size, GFP_KERNEL);
+       sn_irq_info = kzalloc(sn_irq_size, GFP_KERNEL);
        if (sn_irq_info == NULL)
                return NULL;
 
-       memset(sn_irq_info, 0x0, sn_irq_size);
-
        status = tiocx_intr_alloc(nasid, widget, __pa(sn_irq_info), irq,
                                  req_nasid, slice);
        if (status) {
index 36e5437a0fb6bdc281e104340b4b9ec8f4358a3a..cdf6856ce089c07c4344f6150439e1bd4ef29523 100644 (file)
@@ -738,7 +738,9 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags)
 
        /* make sure all activity has settled down first */
 
-       if (atomic_read(&ch->references) > 0) {
+       if (atomic_read(&ch->references) > 0 ||
+                       ((ch->flags & XPC_C_CONNECTEDCALLOUT_MADE) &&
+                       !(ch->flags & XPC_C_DISCONNECTINGCALLOUT_MADE))) {
                return;
        }
        DBUG_ON(atomic_read(&ch->kthreads_assigned) != 0);
@@ -775,7 +777,7 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags)
 
        /* both sides are disconnected now */
 
-       if (ch->flags & XPC_C_CONNECTCALLOUT) {
+       if (ch->flags & XPC_C_DISCONNECTINGCALLOUT_MADE) {
                spin_unlock_irqrestore(&ch->lock, *irq_flags);
                xpc_disconnect_callout(ch, xpcDisconnected);
                spin_lock_irqsave(&ch->lock, *irq_flags);
@@ -1300,7 +1302,7 @@ xpc_process_msg_IPI(struct xpc_partition *part, int ch_number)
                                "delivered=%d, partid=%d, channel=%d\n",
                                nmsgs_sent, ch->partid, ch->number);
 
-                       if (ch->flags & XPC_C_CONNECTCALLOUT) {
+                       if (ch->flags & XPC_C_CONNECTEDCALLOUT_MADE) {
                                xpc_activate_kthreads(ch, nmsgs_sent);
                        }
                }
index 9cd460dfe27ef71b0e0a1517114b54812b490c54..8cbf164325703048ecd277ebf141efb432e8b075 100644 (file)
@@ -750,12 +750,16 @@ xpc_daemonize_kthread(void *args)
                /* let registerer know that connection has been established */
 
                spin_lock_irqsave(&ch->lock, irq_flags);
-               if (!(ch->flags & XPC_C_CONNECTCALLOUT)) {
-                       ch->flags |= XPC_C_CONNECTCALLOUT;
+               if (!(ch->flags & XPC_C_CONNECTEDCALLOUT)) {
+                       ch->flags |= XPC_C_CONNECTEDCALLOUT;
                        spin_unlock_irqrestore(&ch->lock, irq_flags);
 
                        xpc_connected_callout(ch);
 
+                       spin_lock_irqsave(&ch->lock, irq_flags);
+                       ch->flags |= XPC_C_CONNECTEDCALLOUT_MADE;
+                       spin_unlock_irqrestore(&ch->lock, irq_flags);
+
                        /*
                         * It is possible that while the callout was being
                         * made that the remote partition sent some messages.
@@ -777,15 +781,17 @@ xpc_daemonize_kthread(void *args)
 
        if (atomic_dec_return(&ch->kthreads_assigned) == 0) {
                spin_lock_irqsave(&ch->lock, irq_flags);
-               if ((ch->flags & XPC_C_CONNECTCALLOUT) &&
-                               !(ch->flags & XPC_C_DISCONNECTCALLOUT)) {
-                       ch->flags |= XPC_C_DISCONNECTCALLOUT;
+               if ((ch->flags & XPC_C_CONNECTEDCALLOUT_MADE) &&
+                               !(ch->flags & XPC_C_DISCONNECTINGCALLOUT)) {
+                       ch->flags |= XPC_C_DISCONNECTINGCALLOUT;
                        spin_unlock_irqrestore(&ch->lock, irq_flags);
 
                        xpc_disconnect_callout(ch, xpcDisconnecting);
-               } else {
-                       spin_unlock_irqrestore(&ch->lock, irq_flags);
+
+                       spin_lock_irqsave(&ch->lock, irq_flags);
+                       ch->flags |= XPC_C_DISCONNECTINGCALLOUT_MADE;
                }
+               spin_unlock_irqrestore(&ch->lock, irq_flags);
                if (atomic_dec_return(&part->nchannels_engaged) == 0) {
                        xpc_mark_partition_disengaged(part);
                        xpc_IPI_send_disengage(part);
index 5a36292388eb79d420db590c0ab0655bd9649afa..b4b84c269210b134495b864ecd8a40c5a22573ab 100644 (file)
@@ -335,10 +335,10 @@ int sn_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
         */
 
        SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,
-               pci_domain_nr(bus), bus->number,
-               0, /* io */
-               0, /* read */
-               port, size, __pa(val));
+                pci_domain_nr(bus), bus->number,
+                0, /* io */
+                0, /* read */
+                port, size, __pa(val));
 
        if (isrv.status == 0)
                return size;
@@ -381,10 +381,10 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
         */
 
        SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,
-               pci_domain_nr(bus), bus->number,
-               0, /* io */
-               1, /* write */
-               port, size, __pa(&val));
+                pci_domain_nr(bus), bus->number,
+                0, /* io */
+                1, /* write */
+                port, size, __pa(&val));
 
        if (isrv.status == 0)
                return size;
index aa3fa5152a32c52f36704477adf9519fb9c4045c..1f0253bfe0a0473f1a8b83046a4ca317204d0bf4 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 2001-2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 2001-2006 Silicon Graphics, Inc. All rights reserved.
  */
 
 #include <linux/types.h>
@@ -12,7 +12,7 @@
 #include <asm/sn/pcibus_provider_defs.h>
 #include <asm/sn/pcidev.h>
 
-int pcibr_invalidate_ate = 0;  /* by default don't invalidate ATE on free */
+int pcibr_invalidate_ate;      /* by default don't invalidate ATE on free */
 
 /*
  * mark_ate: Mark the ate as either free or inuse.
@@ -20,14 +20,12 @@ int pcibr_invalidate_ate = 0;       /* by default don't invalidate ATE on free */
 static void mark_ate(struct ate_resource *ate_resource, int start, int number,
                     u64 value)
 {
-
        u64 *ate = ate_resource->ate;
        int index;
        int length = 0;
 
        for (index = start; length < number; index++, length++)
                ate[index] = value;
-
 }
 
 /*
@@ -37,7 +35,6 @@ static void mark_ate(struct ate_resource *ate_resource, int start, int number,
 static int find_free_ate(struct ate_resource *ate_resource, int start,
                         int count)
 {
-
        u64 *ate = ate_resource->ate;
        int index;
        int start_free;
@@ -70,12 +67,10 @@ static int find_free_ate(struct ate_resource *ate_resource, int start,
 static inline void free_ate_resource(struct ate_resource *ate_resource,
                                     int start)
 {
-
        mark_ate(ate_resource, start, ate_resource->ate[start], 0);
        if ((ate_resource->lowest_free_index > start) ||
            (ate_resource->lowest_free_index < 0))
                ate_resource->lowest_free_index = start;
-
 }
 
 /*
@@ -84,7 +79,6 @@ static inline void free_ate_resource(struct ate_resource *ate_resource,
 static inline int alloc_ate_resource(struct ate_resource *ate_resource,
                                     int ate_needed)
 {
-
        int start_index;
 
        /*
@@ -118,19 +112,12 @@ static inline int alloc_ate_resource(struct ate_resource *ate_resource,
  */
 int pcibr_ate_alloc(struct pcibus_info *pcibus_info, int count)
 {
-       int status = 0;
-       u64 flag;
+       int status;
+       unsigned long flags;
 
-       flag = pcibr_lock(pcibus_info);
+       spin_lock_irqsave(&pcibus_info->pbi_lock, flags);
        status = alloc_ate_resource(&pcibus_info->pbi_int_ate_resource, count);
-
-       if (status < 0) {
-               /* Failed to allocate */
-               pcibr_unlock(pcibus_info, flag);
-               return -1;
-       }
-
-       pcibr_unlock(pcibus_info, flag);
+       spin_unlock_irqrestore(&pcibus_info->pbi_lock, flags);
 
        return status;
 }
@@ -182,7 +169,7 @@ void pcibr_ate_free(struct pcibus_info *pcibus_info, int index)
                ate_write(pcibus_info, index, count, (ate & ~PCI32_ATE_V));
        }
 
-       flags = pcibr_lock(pcibus_info);
+       spin_lock_irqsave(&pcibus_info->pbi_lock, flags);
        free_ate_resource(&pcibus_info->pbi_int_ate_resource, index);
-       pcibr_unlock(pcibus_info, flags);
+       spin_unlock_irqrestore(&pcibus_info->pbi_lock, flags);
 }
index 54ce5b7ceed27e3ec0b29254b3e4f00f02edd83e..9f86bb6519aa6bbfc4511e63959d2530bfbcc867 100644 (file)
@@ -137,14 +137,12 @@ pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr,
                pci_addr |= PCI64_ATTR_VIRTUAL;
 
        return pci_addr;
-
 }
 
 static dma_addr_t
 pcibr_dmatrans_direct32(struct pcidev_info * info,
                        u64 paddr, size_t req_size, u64 flags)
 {
-
        struct pcidev_info *pcidev_info = info->pdi_host_pcidev_info;
        struct pcibus_info *pcibus_info = (struct pcibus_info *)pcidev_info->
            pdi_pcibus_info;
@@ -171,7 +169,6 @@ pcibr_dmatrans_direct32(struct pcidev_info * info,
        }
 
        return PCI32_DIRECT_BASE | offset;
-
 }
 
 /*
@@ -218,9 +215,8 @@ void sn_dma_flush(u64 addr)
        u64 flags;
        u64 itte;
        struct hubdev_info *hubinfo;
-       volatile struct sn_flush_device_kernel *p;
-       volatile struct sn_flush_device_common *common;
-
+       struct sn_flush_device_kernel *p;
+       struct sn_flush_device_common *common;
        struct sn_flush_nasid_entry *flush_nasid_list;
 
        if (!sn_ioif_inited)
@@ -310,8 +306,7 @@ void sn_dma_flush(u64 addr)
                                             (common->sfdl_slot - 1));
                }
        } else {
-               spin_lock_irqsave((spinlock_t *)&p->sfdl_flush_lock,
-                                 flags);
+               spin_lock_irqsave(&p->sfdl_flush_lock, flags);
                *common->sfdl_flush_addr = 0;
 
                /* force an interrupt. */
@@ -322,8 +317,7 @@ void sn_dma_flush(u64 addr)
                        cpu_relax();
 
                /* okay, everything is synched up. */
-               spin_unlock_irqrestore((spinlock_t *)&p->sfdl_flush_lock,
-                                      flags);
+               spin_unlock_irqrestore(&p->sfdl_flush_lock, flags);
        }
        return;
 }
index 2fac27049bf62eda7323fee737217db830250fc8..98f716bd92f0ce414d414f8c1c6cf68523d01f7f 100644 (file)
@@ -163,9 +163,12 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
        /* Setup the PMU ATE map */
        soft->pbi_int_ate_resource.lowest_free_index = 0;
        soft->pbi_int_ate_resource.ate =
-           kmalloc(soft->pbi_int_ate_size * sizeof(u64), GFP_KERNEL);
-       memset(soft->pbi_int_ate_resource.ate, 0,
-              (soft->pbi_int_ate_size * sizeof(u64)));
+           kzalloc(soft->pbi_int_ate_size * sizeof(u64), GFP_KERNEL);
+
+       if (!soft->pbi_int_ate_resource.ate) {
+               kfree(soft);
+               return NULL;
+       }
 
        if (prom_bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) {
                /* TIO PCI Bridge: find nearest node with CPUs */
index 56832929a54398279bcd4f218b264d12dd793e10..b337136f28b6ff0e854eb7efee86a661c50f0b39 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16-rc1-git2
-# Thu Jan 19 10:05:21 2006
+# Linux kernel version: 2.6.16-rc3
+# Mon Feb 13 22:31:24 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -21,7 +21,6 @@ CONFIG_DMI=y
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
@@ -267,6 +266,7 @@ CONFIG_NET=y
 #
 # Networking options
 #
+# CONFIG_NETDEBUG is not set
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
@@ -446,7 +446,6 @@ CONFIG_BLK_DEV_PIIX=y
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_PDC202XX_OLD is not set
 CONFIG_BLK_DEV_PDC202XX_NEW=y
-# CONFIG_PDC202XX_FORCE is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
 # CONFIG_BLK_DEV_SIS5513 is not set
@@ -573,7 +572,33 @@ CONFIG_FUSION_MAX_SGE=128
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
+CONFIG_IEEE1394=y
+
+#
+# Subsystem Options
+#
+# CONFIG_IEEE1394_VERBOSEDEBUG is not set
+# CONFIG_IEEE1394_OUI_DB is not set
+# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
+# CONFIG_IEEE1394_EXPORT_FULL_API is not set
+
+#
+# Device Drivers
+#
+
+#
+# Texas Instruments PCILynx requires I2C
+#
+CONFIG_IEEE1394_OHCI1394=y
+
+#
+# Protocol Drivers
+#
+# CONFIG_IEEE1394_VIDEO1394 is not set
+# CONFIG_IEEE1394_SBP2 is not set
+# CONFIG_IEEE1394_ETH1394 is not set
+# CONFIG_IEEE1394_DV1394 is not set
+CONFIG_IEEE1394_RAWIO=y
 
 #
 # I2O device support
@@ -772,6 +797,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -871,6 +897,7 @@ CONFIG_HPET_MMAP=y
 #
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
 # CONFIG_SENSORS_HDAPS is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
@@ -1101,7 +1128,6 @@ CONFIG_USB_MON=y
 # EDAC - error detection and reporting (RAS)
 #
 # CONFIG_EDAC is not set
-# CONFIG_EDAC_POLL is not set
 
 #
 # Firmware Drivers
@@ -1291,14 +1317,12 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_FRAME_POINTER is not set
 # CONFIG_FORCED_INLINING is not set
-# CONFIG_UNWIND_INFO is not set
 # CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_INIT_DEBUG=y
 # CONFIG_DEBUG_RODATA is not set
 # CONFIG_IOMMU_DEBUG is not set
 
index 7a0a3e8d5d7265ed23e1f0cf0ae1f108b64645e8..e5b14c57eaa0644fa8e4106a445b58e3d1f51e1d 100644 (file)
@@ -1152,6 +1152,7 @@ __setup("noapicmaintimer", setup_noapicmaintimer);
 static __init int setup_apicpmtimer(char *s)
 {
        apic_calibrate_pmtmr = 1;
+       notsc_setup(NULL);
        return setup_apicmaintimer(NULL);
 }
 __setup("apicpmtimer", setup_apicpmtimer);
index b150c87a08c6b3131909d8af5b567699e58ce098..7c10e9009d611173d13fddf90650a9dfe78ec7db 100644 (file)
@@ -554,6 +554,7 @@ iret_label:
        /* running with kernel gs */
 bad_iret:
        movq $-9999,%rdi        /* better code? */
+       sti
        jmp do_exit                     
        .previous       
        
index 692c737feddb05393525c3753e0ab285adc7164b..02fc7fa0ea28e26445015a743c919681e3b6dead 100644 (file)
@@ -213,6 +213,11 @@ ENTRY(early_idt_handler)
        cmpl $2,early_recursion_flag(%rip)
        jz  1f
        call dump_stack
+#ifdef CONFIG_KALLSYMS 
+       leaq early_idt_ripmsg(%rip),%rdi
+       movq 8(%rsp),%rsi       # get rip again
+       call __print_symbol
+#endif
 1:     hlt
        jmp 1b
 early_recursion_flag:
@@ -220,6 +225,8 @@ early_recursion_flag:
 
 early_idt_msg:
        .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n"
+early_idt_ripmsg:
+       .asciz "RIP %s\n"
 
 .code32
 ENTRY(no_long_mode)
index 4282d72b2a260e28c2aa2c9c272b8b8ef8621d7b..2585c1d92b26bd2b9443433f9a1b83c25e36dc3e 100644 (file)
@@ -30,6 +30,9 @@
 #include <linux/mc146818rtc.h>
 #include <linux/acpi.h>
 #include <linux/sysdev.h>
+#ifdef CONFIG_ACPI
+#include <acpi/acpi_bus.h>
+#endif
 
 #include <asm/io.h>
 #include <asm/smp.h>
@@ -260,6 +263,8 @@ __setup("apic", enable_ioapic_setup);
 
    And another hack to disable the IOMMU on VIA chipsets.
 
+   ... and others. Really should move this somewhere else.
+
    Kludge-O-Rama. */
 void __init check_ioapic(void) 
 { 
@@ -307,6 +312,17 @@ void __init check_ioapic(void)
                                case PCI_VENDOR_ID_ATI:
                                        if (apic_runs_main_timer != 0)
                                                break;
+#ifdef CONFIG_ACPI
+                                       /* Don't do this for laptops right
+                                          right now because their timer
+                                          doesn't necessarily tick in C2/3 */
+                                       if (acpi_fadt.revision >= 3 &&
+                       (acpi_fadt.plvl2_lat + acpi_fadt.plvl3_lat) < 1100) {
+                                               printk(KERN_INFO
+"ATI board detected, but seems to be a laptop. Timer might be shakey, sorry\n");
+                                               break;
+                                       }
+#endif                                 
                                        printk(KERN_INFO
             "ATI board detected. Using APIC/PM timer.\n");
                                        apic_runs_main_timer = 1;
index 8be407a1f62d11db0c06fc73cb4e0208037e986d..5bf17e41cd2d2622138e030dc8f90ccc0d499d7f 100644 (file)
@@ -236,6 +236,7 @@ static void enable_lapic_nmi_watchdog(void)
 {
        if (nmi_active < 0) {
                nmi_watchdog = NMI_LOCAL_APIC;
+               touch_nmi_watchdog();
                setup_apic_nmi_watchdog();
        }
 }
@@ -456,15 +457,17 @@ static DEFINE_PER_CPU(int, nmi_touch);
 
 void touch_nmi_watchdog (void)
 {
-       int i;
+       if (nmi_watchdog > 0) {
+               unsigned cpu;
 
-       /*
-        * Tell other CPUs to reset their alert counters. We cannot
-        * do it ourselves because the alert count increase is not
-        * atomic.
-        */
-       for (i = 0; i < NR_CPUS; i++)
-               per_cpu(nmi_touch, i) = 1;
+               /*
+                * Tell other CPUs to reset their alert counters. We cannot
+                * do it ourselves because the alert count increase is not
+                * atomic.
+                */
+               for_each_present_cpu (cpu)
+                       per_cpu(nmi_touch, cpu) = 1;
+       }
 
        touch_softlockup_watchdog();
 }
index 3c58c30506a104c00d505b234b6261947fc4c8a3..67841d11ed1ff978aada750c1445b93001e20d1e 100644 (file)
@@ -1327,8 +1327,7 @@ static int __init nohpet_setup(char *s)
 
 __setup("nohpet", nohpet_setup);
 
-
-static int __init notsc_setup(char *s)
+int __init notsc_setup(char *s)
 {
        notsc = 1;
        return 0;
index a5663e0bb01cad0a23fb9deab8b415829256c10f..dd60e71fdba6fe827a2c61028cd88ad0cb5f9abe 100644 (file)
@@ -155,7 +155,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
        if (!found)
                return -1; 
 
-       memnode_shift = compute_hash_shift(nodes, numnodes);
+       memnode_shift = compute_hash_shift(nodes, 8);
        if (memnode_shift < 0) { 
                printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); 
                return -1; 
index cd25300726fc7ac184009b3cf926f758eeb4c1bb..482c2576736942a3f41d75737caeb3b458d2dbcc 100644 (file)
@@ -228,7 +228,8 @@ static int nodes_cover_memory(void)
        }
 
        e820ram = end_pfn - e820_hole_size(0, end_pfn);
-       if (pxmram < e820ram) {
+       /* We seem to lose 3 pages somewhere. Allow a bit of slack. */
+       if ((long)(e820ram - pxmram) >= 1*1024*1024) {
                printk(KERN_ERR
        "SRAT: PXMs only cover %luMB of your %luMB e820 RAM. Not used.\n",
                        (pxmram << PAGE_SHIFT) >> 20,
@@ -270,7 +271,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
                return -1;
        }
 
-       memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed));
+       memnode_shift = compute_hash_shift(nodes, MAX_NUMNODES);
        if (memnode_shift < 0) {
                printk(KERN_ERR
                     "SRAT: No NUMA node hash function found. Contact maintainer\n");
index 2b286e8651632fcd1f4af7dead2fc67d7a5eefcf..43b96e298363ac9d441235206c33020ab133269a 100644 (file)
  * License along with this program; if not, write the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  *
- * Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
  * For further information regarding this notice, see:
  *
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan
index 37ee7f8dc82fe305195472e0ad5dd281e5c5f219..9fef29d978b5e676fead18b320f86cbd19c533b4 100644 (file)
@@ -97,6 +97,13 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
        if (data->flags & MMC_DATA_READ) {
                datactrl |= MCI_DPSM_DIRECTION;
                irqmask = MCI_RXFIFOHALFFULLMASK;
+
+               /*
+                * If we have less than a FIFOSIZE of bytes to transfer,
+                * trigger a PIO interrupt as soon as any data is available.
+                */
+               if (host->size < MCI_FIFOSIZE)
+                       irqmask |= MCI_RXDATAAVLBLMASK;
        } else {
                /*
                 * We don't actually need to include "FIFO empty" here
index 98a76f10a0f71f29f09ef031b000659dbbccb09c..dfc24016ba81735a721b169d561e4993dcf3bdb1 100644 (file)
@@ -1872,7 +1872,7 @@ static int atmel_set_encodeext(struct net_device *dev,
        struct atmel_private *priv = netdev_priv(dev);
        struct iw_point *encoding = &wrqu->encoding;
        struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
-       int idx, key_len;
+       int idx, key_len, alg = ext->alg, set_key = 1;
 
        /* Determine and validate the key index */
        idx = encoding->flags & IW_ENCODE_INDEX;
@@ -1883,39 +1883,42 @@ static int atmel_set_encodeext(struct net_device *dev,
        } else
                idx = priv->default_key;
 
-       if ((encoding->flags & IW_ENCODE_DISABLED) ||
-           ext->alg == IW_ENCODE_ALG_NONE) {
-               priv->wep_is_on = 0;
-               priv->encryption_level = 0;
-               priv->pairwise_cipher_suite = CIPHER_SUITE_NONE;
-       }
+       if (encoding->flags & IW_ENCODE_DISABLED)
+           alg = IW_ENCODE_ALG_NONE;
 
-       if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
+       if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
                priv->default_key = idx;
+               set_key = ext->key_len > 0 ? 1 : 0;
+       }
 
-       /* Set the requested key */
-       switch (ext->alg) {
-       case IW_ENCODE_ALG_NONE:
-               break;
-       case IW_ENCODE_ALG_WEP:
-               if (ext->key_len > 5) {
-                       priv->wep_key_len[idx] = 13;
-                       priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
-                       priv->encryption_level = 2;
-               } else if (ext->key_len > 0) {
-                       priv->wep_key_len[idx] = 5;
-                       priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
-                       priv->encryption_level = 1;
-               } else {
+       if (set_key) {
+               /* Set the requested key first */
+               switch (alg) {
+               case IW_ENCODE_ALG_NONE:
+                       priv->wep_is_on = 0;
+                       priv->encryption_level = 0;
+                       priv->pairwise_cipher_suite = CIPHER_SUITE_NONE;
+                       break;
+               case IW_ENCODE_ALG_WEP:
+                       if (ext->key_len > 5) {
+                               priv->wep_key_len[idx] = 13;
+                               priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128;
+                               priv->encryption_level = 2;
+                       } else if (ext->key_len > 0) {
+                               priv->wep_key_len[idx] = 5;
+                               priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64;
+                               priv->encryption_level = 1;
+                       } else {
+                               return -EINVAL;
+                       }
+                       priv->wep_is_on = 1;
+                       memset(priv->wep_keys[idx], 0, 13);
+                       key_len = min ((int)ext->key_len, priv->wep_key_len[idx]);
+                       memcpy(priv->wep_keys[idx], ext->key, key_len);
+                       break;
+               default:
                        return -EINVAL;
                }
-               priv->wep_is_on = 1;
-               memset(priv->wep_keys[idx], 0, 13);
-               key_len = min ((int)ext->key_len, priv->wep_key_len[idx]);
-               memcpy(priv->wep_keys[idx], ext->key, key_len);
-               break;
-       default:
-               return -EINVAL;
        }
 
        return -EINPROGRESS;
@@ -3061,17 +3064,26 @@ static void authenticate(struct atmel_private *priv, u16 frame_len)
        }
 
        if (status == C80211_MGMT_SC_Success && priv->wep_is_on) {
+               int should_associate = 0;
                /* WEP */
                if (trans_seq_no != priv->ExpectedAuthentTransactionSeqNum)
                        return;
 
-               if (trans_seq_no == 0x0002 &&
-                   auth->el_id == C80211_MGMT_ElementID_ChallengeText) {
-                       send_authentication_request(priv, system, auth->chall_text, auth->chall_text_len);
-                       return;
+               if (system == C80211_MGMT_AAN_OPENSYSTEM) {
+                       if (trans_seq_no == 0x0002) {
+                               should_associate = 1;
+                       }
+               } else if (system == C80211_MGMT_AAN_SHAREDKEY) {
+                       if (trans_seq_no == 0x0002 &&
+                           auth->el_id == C80211_MGMT_ElementID_ChallengeText) {
+                               send_authentication_request(priv, system, auth->chall_text, auth->chall_text_len);
+                               return;
+                       } else if (trans_seq_no == 0x0004) {
+                               should_associate = 1;
+                       }
                }
 
-               if (trans_seq_no == 0x0004) {
+               if (should_associate) {
                        if(priv->station_was_associated) {
                                atmel_enter_state(priv, STATION_STATE_REASSOCIATING);
                                send_association_request(priv, 1);
@@ -3084,11 +3096,13 @@ static void authenticate(struct atmel_private *priv, u16 frame_len)
                }
        }
 
-       if (status == C80211_MGMT_SC_AuthAlgNotSupported) {
+       if (status == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) {
                /* Do opensystem first, then try sharedkey */
-               if (system ==  C80211_MGMT_AAN_OPENSYSTEM) {
+               if (system == WLAN_AUTH_OPEN) {
                        priv->CurrentAuthentTransactionSeqNum = 0x001;
-                       send_authentication_request(priv, C80211_MGMT_AAN_SHAREDKEY, NULL, 0);
+                       priv->exclude_unencrypted = 1;
+                       send_authentication_request(priv, WLAN_AUTH_SHARED_KEY, NULL, 0);
+                       return;
                } else if (priv->connect_to_any_BSS) {
                        int bss_index;
 
@@ -3439,10 +3453,13 @@ static void atmel_management_timer(u_long a)
                        priv->AuthenticationRequestRetryCnt = 0;
                        restart_search(priv);
                } else {
+                       int auth = C80211_MGMT_AAN_OPENSYSTEM;
                        priv->AuthenticationRequestRetryCnt++;
                        priv->CurrentAuthentTransactionSeqNum = 0x0001;
                        mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);
-                       send_authentication_request(priv, C80211_MGMT_AAN_OPENSYSTEM, NULL, 0);
+                       if (priv->wep_is_on && priv->exclude_unencrypted)
+                               auth = C80211_MGMT_AAN_SHAREDKEY;
+                       send_authentication_request(priv, auth, NULL, 0);
          }
          break;
 
@@ -3541,12 +3558,15 @@ static void atmel_command_irq(struct atmel_private *priv)
                                priv->station_was_associated = priv->station_is_associated;
                                atmel_enter_state(priv, STATION_STATE_READY);
                        } else {
+                               int auth = C80211_MGMT_AAN_OPENSYSTEM;
                                priv->AuthenticationRequestRetryCnt = 0;
                                atmel_enter_state(priv, STATION_STATE_AUTHENTICATING);
 
                                mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);
                                priv->CurrentAuthentTransactionSeqNum = 0x0001;
-                               send_authentication_request(priv, C80211_MGMT_AAN_SHAREDKEY, NULL, 0);
+                               if (priv->wep_is_on && priv->exclude_unencrypted)
+                                       auth = C80211_MGMT_AAN_SHAREDKEY;
+                               send_authentication_request(priv, auth, NULL, 0);
                        }
                        return;
                }
index b1fc97d5f643ea4772b44e22b148b642b279670d..244e8ff119777d1c9a237ae89209441fd9350c52 100644 (file)
@@ -2198,7 +2198,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
        touch_nmi_watchdog();
 
        /*
-        *      First save the UER then disable the interrupts
+        *      First save the IER then disable the interrupts
         */
        ier = serial_in(up, UART_IER);
 
index 0f4361c8466b3d495442e9ca69fd17250606b0ef..b3c561abe3f6c0c4bc6a0f2aef69c78b10a4f7b7 100644 (file)
@@ -902,8 +902,8 @@ config SERIAL_JSM
          something like this to connect more than two modems to your Linux
          box, for instance in order to become a dial-in server. This driver
          supports PCI boards only.
-         If you have a card like this, say Y here and read the file
-         <file:Documentation/jsm.txt>.
+
+         If you have a card like this, say Y here, otherwise say N.
 
          To compile this driver as a module, choose M here: the
          module will be called jsm.
index 38d22729b129ad713f49b66b068b699d5c609906..c9a7cdf6d543e8edc9bb749d8de2413912c04dfe 100644 (file)
@@ -1243,7 +1243,7 @@ static int __devexit gbefb_remove(struct platform_device* p_dev)
                          (void *)gbe_tiles.cpu, gbe_tiles.dma);
        release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));
        iounmap(gbe);
-       gbefb_remove_sysfs(dev);
+       gbefb_remove_sysfs(&p_dev->dev);
        framebuffer_release(info);
 
        return 0;
index d574dd3c9c8aabe3f9f779dff79cb36aa85d9e07..9451932fbaf263d7270f9f613c4aeedc243621ea 100644 (file)
@@ -82,7 +82,6 @@
 #include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
-#include <linux/string.h>
 #include <linux/interrupt.h>
 #include <linux/workqueue.h>
 #include <linux/wait.h>
index 42eb53b5293be362df0b5d3a608c5f360a004122..23ceaa7127b4c117fbd3fa738a42665f4c612ab6 100644 (file)
@@ -208,6 +208,9 @@ static inline void __dlm_set_joining_node(struct dlm_ctxt *dlm,
 #define DLM_LOCK_RES_IN_PROGRESS          0x00000010
 #define DLM_LOCK_RES_MIGRATING            0x00000020
 
+/* max milliseconds to wait to sync up a network failure with a node death */
+#define DLM_NODE_DEATH_WAIT_MAX (5 * 1000)
+
 #define DLM_PURGE_INTERVAL_MS   (8 * 1000)
 
 struct dlm_lock_resource
@@ -658,6 +661,7 @@ int dlm_launch_recovery_thread(struct dlm_ctxt *dlm);
 void dlm_complete_recovery_thread(struct dlm_ctxt *dlm);
 void dlm_wait_for_recovery(struct dlm_ctxt *dlm);
 int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node);
+int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout);
 
 void dlm_put(struct dlm_ctxt *dlm);
 struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm);
index 6001b22a997d819a617c2703f5439d3722555348..f66e2d818ccdefa2c4eb20625fc77d417e464e37 100644 (file)
@@ -392,6 +392,11 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm,
        } else {
                mlog_errno(tmpret);
                if (dlm_is_host_down(tmpret)) {
+                       /* instead of logging the same network error over
+                        * and over, sleep here and wait for the heartbeat
+                        * to notice the node is dead.  times out after 5s. */
+                       dlm_wait_for_node_death(dlm, res->owner, 
+                                               DLM_NODE_DEATH_WAIT_MAX);
                        ret = DLM_RECOVERING;
                        mlog(0, "node %u died so returning DLM_RECOVERING "
                             "from convert message!\n", res->owner);
@@ -421,7 +426,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
        struct dlm_lockstatus *lksb;
        enum dlm_status status = DLM_NORMAL;
        u32 flags;
-       int call_ast = 0, kick_thread = 0;
+       int call_ast = 0, kick_thread = 0, ast_reserved = 0;
 
        if (!dlm_grab(dlm)) {
                dlm_error(DLM_REJECTED);
@@ -490,6 +495,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data)
        status = __dlm_lockres_state_to_status(res);
        if (status == DLM_NORMAL) {
                __dlm_lockres_reserve_ast(res);
+               ast_reserved = 1;
                res->state |= DLM_LOCK_RES_IN_PROGRESS;
                status = __dlmconvert_master(dlm, res, lock, flags,
                                             cnv->requested_type,
@@ -512,10 +518,10 @@ leave:
        else
                dlm_lock_put(lock);
 
-       /* either queue the ast or release it */
+       /* either queue the ast or release it, if reserved */
        if (call_ast)
                dlm_queue_ast(dlm, lock);
-       else
+       else if (ast_reserved)
                dlm_lockres_release_ast(dlm, res);
 
        if (kick_thread)
index d1a0038557a32fa2cc5ab8d698c50fb390d5fc7f..671d4ff222cc083c15aa63ed33048c899da2d26b 100644 (file)
@@ -220,6 +220,17 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
                        dlm_error(status);
                dlm_revert_pending_lock(res, lock);
                dlm_lock_put(lock);
+       } else if (dlm_is_recovery_lock(res->lockname.name, 
+                                       res->lockname.len)) {
+               /* special case for the $RECOVERY lock.
+                * there will never be an AST delivered to put
+                * this lock on the proper secondary queue
+                * (granted), so do it manually. */
+               mlog(0, "%s: $RECOVERY lock for this node (%u) is "
+                    "mastered by %u; got lock, manually granting (no ast)\n",
+                    dlm->name, dlm->node_num, res->owner);
+               list_del_init(&lock->list);
+               list_add_tail(&lock->list, &res->granted);
        }
        spin_unlock(&res->spinlock);
 
@@ -646,7 +657,19 @@ retry_lock:
                        mlog(0, "retrying lock with migration/"
                             "recovery/in progress\n");
                        msleep(100);
-                       dlm_wait_for_recovery(dlm);
+                       /* no waiting for dlm_reco_thread */
+                       if (recovery) {
+                               if (status == DLM_RECOVERING) {
+                                       mlog(0, "%s: got RECOVERING "
+                                            "for $REOCVERY lock, master "
+                                            "was %u\n", dlm->name, 
+                                            res->owner);
+                                       dlm_wait_for_node_death(dlm, res->owner, 
+                                                       DLM_NODE_DEATH_WAIT_MAX);
+                               }
+                       } else {
+                               dlm_wait_for_recovery(dlm);
+                       }
                        goto retry_lock;
                }
 
index a3194fe173d97b498b5753777e85306569ed094b..2e2e95e6949924f99c81ff9d368c5852437e5ece 100644 (file)
@@ -2482,7 +2482,9 @@ top:
                                atomic_set(&mle->woken, 1);
                                spin_unlock(&mle->spinlock);
                                wake_up(&mle->wq);
-                               /* final put will take care of list removal */
+                               /* do not need events any longer, so detach 
+                                * from heartbeat */
+                               __dlm_mle_detach_hb_events(dlm, mle);
                                __dlm_put_mle(mle);
                        }
                        continue;
@@ -2537,6 +2539,9 @@ top:
                        spin_unlock(&res->spinlock);
                        dlm_lockres_put(res);
 
+                       /* about to get rid of mle, detach from heartbeat */
+                       __dlm_mle_detach_hb_events(dlm, mle);
+
                        /* dump the mle */
                        spin_lock(&dlm->master_lock);
                        __dlm_put_mle(mle);
index 186e9a76aa5807565ad09e31e0bd0fa7584dcab5..ed76bda1a5344c4abb53072c08667617f7e05461 100644 (file)
@@ -278,6 +278,24 @@ int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node)
        return dead;
 }
 
+int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout)
+{
+       if (timeout) {
+               mlog(ML_NOTICE, "%s: waiting %dms for notification of "
+                    "death of node %u\n", dlm->name, timeout, node);
+               wait_event_timeout(dlm->dlm_reco_thread_wq,
+                          dlm_is_node_dead(dlm, node),
+                          msecs_to_jiffies(timeout));
+       } else {
+               mlog(ML_NOTICE, "%s: waiting indefinitely for notification "
+                    "of death of node %u\n", dlm->name, node);
+               wait_event(dlm->dlm_reco_thread_wq,
+                          dlm_is_node_dead(dlm, node));
+       }
+       /* for now, return 0 */
+       return 0;
+}
+
 /* callers of the top-level api calls (dlmlock/dlmunlock) should
  * block on the dlm->reco.event when recovery is in progress.
  * the dlm recovery thread will set this state when it begins
@@ -2032,6 +2050,30 @@ again:
                             dlm->reco.new_master);
                        status = -EEXIST;
                } else {
+                       status = 0;
+
+                       /* see if recovery was already finished elsewhere */
+                       spin_lock(&dlm->spinlock);
+                       if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
+                               status = -EINVAL;       
+                               mlog(0, "%s: got reco EX lock, but "
+                                    "node got recovered already\n", dlm->name);
+                               if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) {
+                                       mlog(ML_ERROR, "%s: new master is %u "
+                                            "but no dead node!\n", 
+                                            dlm->name, dlm->reco.new_master);
+                                       BUG();
+                               }
+                       }
+                       spin_unlock(&dlm->spinlock);
+               }
+
+               /* if this node has actually become the recovery master,
+                * set the master and send the messages to begin recovery */
+               if (!status) {
+                       mlog(0, "%s: dead=%u, this=%u, sending "
+                            "begin_reco now\n", dlm->name, 
+                            dlm->reco.dead_node, dlm->node_num);
                        status = dlm_send_begin_reco_message(dlm,
                                      dlm->reco.dead_node);
                        /* this always succeeds */
index fa0bcac5ceaef0aeef8539f45a4b7ace3c6be648..d329c9df90ae8f19f03d03af7d8bd4036b22bf94 100644 (file)
@@ -1584,10 +1584,9 @@ static int ocfs2_commit_thread(void *arg)
        while (!(kthread_should_stop() &&
                 atomic_read(&journal->j_num_trans) == 0)) {
 
-               wait_event_interruptible_timeout(osb->checkpoint_event,
-                                                atomic_read(&journal->j_num_trans)
-                                                || kthread_should_stop(),
-                                                OCFS2_CHECKPOINT_INTERVAL);
+               wait_event_interruptible(osb->checkpoint_event,
+                                        atomic_read(&journal->j_num_trans)
+                                        || kthread_should_stop());
 
                status = ocfs2_commit_cache(osb);
                if (status < 0)
index 7d0a816184fa79cffa300c8ee6bcd391f6a97972..2f3a6acdac452e590e67e1235e3225c8975aeb8e 100644 (file)
@@ -29,8 +29,6 @@
 #include <linux/fs.h>
 #include <linux/jbd.h>
 
-#define OCFS2_CHECKPOINT_INTERVAL        (8 * HZ)
-
 enum ocfs2_journal_state {
        OCFS2_JOURNAL_FREE = 0,
        OCFS2_JOURNAL_LOADED,
index 5a72e50ca9fc0ab5f1640d5ba975ee155851e14e..fe45f7f612230be865e49497809f5ecf1aa68021 100644 (file)
@@ -41,6 +41,11 @@ extern void show_ipi_list(struct seq_file *p);
  */
 asmlinkage void do_IPI(struct pt_regs *regs);
 
+/*
+ * Setup the SMP cpu_possible_map
+ */
+extern void smp_init_cpus(void);
+
 /*
  * Move global data into per-processor storage.
  */
index 77430d6178aee6d47ca145de21b6422057542b3b..8f331bbd39a84abc06be91d31dba783feae2e322 100644 (file)
 #define __NR_mq_getsetattr             (__NR_SYSCALL_BASE+279)
 #define __NR_waitid                    (__NR_SYSCALL_BASE+280)
 
-#if 0 /* reserve these for un-muxing socketcall */
+#if defined(__ARM_EABI__)  /* reserve these for un-muxing socketcall */
 #define __NR_socket                    (__NR_SYSCALL_BASE+281)
 #define __NR_bind                      (__NR_SYSCALL_BASE+282)
 #define __NR_connect                   (__NR_SYSCALL_BASE+283)
 #define __NR_recvmsg                   (__NR_SYSCALL_BASE+297)
 #endif
 
-#if 0 /* reserve these for un-muxing ipc */
+#if defined(__ARM_EABI__)  /* reserve these for un-muxing ipc */
 #define __NR_semop                     (__NR_SYSCALL_BASE+298)
 #define __NR_semget                    (__NR_SYSCALL_BASE+299)
 #define __NR_semctl                    (__NR_SYSCALL_BASE+300)
 #define __NR_request_key               (__NR_SYSCALL_BASE+310)
 #define __NR_keyctl                    (__NR_SYSCALL_BASE+311)
 
-#if 0 /* reserved for un-muxing ipc */
+#if defined(__ARM_EABI__)  /* reserved for un-muxing ipc */
 #define __NR_semtimedop                        (__NR_SYSCALL_BASE+312)
 #endif
 
index e20e99551d710e73f634664731ea48be50bc6ab9..1f7d48c9ba3f5b284a71733f4dd552e9455c9da4 100644 (file)
@@ -158,8 +158,8 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__;
 
 /* work to do on interrupt/exception return */
 #define _TIF_WORK_MASK \
-  (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\
-                 _TIF_SECCOMP|_TIF_SYSCALL_EMU))
+  (0x0000FFFF & ~(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
+                 _TIF_SECCOMP | _TIF_SYSCALL_EMU))
 /* work to do on any return to u-space */
 #define _TIF_ALLWORK_MASK      (0x0000FFFF & ~_TIF_SECCOMP)
 
index 3a544ffc500860f5f1c166e3e2b9bff57e7e11b5..f7a517654308e03f4c0ee880dc5cb88fbfaad615 100644 (file)
@@ -106,6 +106,8 @@ extern unsigned int can_cpei_retarget(void);
 extern unsigned int is_cpu_cpei_target(unsigned int cpu);
 extern void set_cpei_target_cpu(unsigned int cpu);
 extern unsigned int get_cpei_target_cpu(void);
+extern void prefill_possible_map(void);
+extern int additional_cpus;
 
 #ifdef CONFIG_ACPI_NUMA
 /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
index e1b6cd63f49e637e2d6752ae4802963632d1c5c9..03d00faf03b5c414a473b8a28d4e793a9e63787b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2002-2003, 2006 Silicon Graphics, Inc.  All Rights Reserved.
  * 
  * This program is free software; you can redistribute it and/or modify it 
  * under the terms of version 2 of the GNU General Public License 
  * License along with this program; if not, write the Free Software 
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  * 
- * Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, 
- * Mountain View, CA  94043, or:
- * 
- * http://www.sgi.com 
- * 
  * For further information regarding this notice, see: 
  * 
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan
index 1a3831c04af607fdcde43dc2a74909130459d34d..91c31be87b13d1734afd63176912b661e96f4f20 100644 (file)
@@ -70,7 +70,7 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
  * Compact node ID to nasid mappings kept in the per-cpu data areas of each
  * cpu.
  */
-DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]);
+DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
 #define sn_cnodeid_to_nasid    (&__get_cpu_var(__sn_cnodeid_to_nasid[0]))
 
 
index 01e5b41032357a1c615c8326d7c7a7ea12df5882..5335d87ca5f8e080b756ec6dec7478822c87be1f 100644 (file)
@@ -46,7 +46,7 @@
 #define BTES_PER_NODE (is_shub2() ? 4 : 2)
 #define MAX_BTES_PER_NODE 4
 
-#define BTE2OFF_CTRL   (0)
+#define BTE2OFF_CTRL   0
 #define BTE2OFF_SRC    (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0)
 #define BTE2OFF_DEST   (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0)
 #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0)
                : base + (BTEOFF_NOTIFY/8))
 
 /* Define hardware modes */
-#define BTE_NOTIFY (IBCT_NOTIFY)
+#define BTE_NOTIFY IBCT_NOTIFY
 #define BTE_NORMAL BTE_NOTIFY
 #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE)
 /* Use a reserved bit to let the caller specify a wait for any BTE */
-#define BTE_WACQUIRE (0x4000)
+#define BTE_WACQUIRE 0x4000
 /* Use the BTE on the node with the destination memory */
 #define BTE_USE_DEST (BTE_WACQUIRE << 1)
 /* Use any available BTE interface on any node for the transfer */
index 9334078b089a0c46eab8bbdceae51e4b22c027e7..a601d3af39b6a47dacec545524bdf7dacf58478f 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 1992-1997,2000-2006 Silicon Graphics, Inc. All rights reserved.
  */
 #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H
 #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H
@@ -115,18 +115,6 @@ struct pcibus_info {
        spinlock_t              pbi_lock;
 };
 
-/*
- * pcibus_info structure locking macros
- */
-inline static unsigned long
-pcibr_lock(struct pcibus_info *pcibus_info)
-{
-       unsigned long flag;
-       spin_lock_irqsave(&pcibus_info->pbi_lock, flag);
-       return(flag);
-}
-#define pcibr_unlock(pcibus_info, flag)  spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag)
-
 extern int  pcibr_init_provider(void);
 extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *);
 extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t);
index 9ca642cad33878a0a3de28c74ae639998099ea86..ff33e3bd3f8e337a471e3e20fa57ccb04e8c715d 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 
-#include <asm/types.h>
-#include <asm/bitops.h>
-
 /* --------------------- PROM Features -----------------------------*/
 extern int sn_prom_feature_available(int id);
 
index 0c36928ffd8b56c1e67ff1090124b8b902be126c..df7f5f4f3cde2d7e68f8360ca771554c0039227e 100644 (file)
@@ -508,19 +508,24 @@ struct xpc_channel {
 #define        XPC_C_OPENREQUEST       0x00000010 /* local open channel request */
 
 #define        XPC_C_SETUP             0x00000020 /* channel's msgqueues are alloc'd */
-#define        XPC_C_CONNECTCALLOUT    0x00000040 /* channel connected callout made */
-#define        XPC_C_CONNECTED         0x00000080 /* local channel is connected */
-#define        XPC_C_CONNECTING        0x00000100 /* channel is being connected */
-
-#define        XPC_C_RCLOSEREPLY       0x00000200 /* remote close channel reply */
-#define        XPC_C_CLOSEREPLY        0x00000400 /* local close channel reply */
-#define        XPC_C_RCLOSEREQUEST     0x00000800 /* remote close channel request */
-#define        XPC_C_CLOSEREQUEST      0x00001000 /* local close channel request */
-
-#define        XPC_C_DISCONNECTED      0x00002000 /* channel is disconnected */
-#define        XPC_C_DISCONNECTING     0x00004000 /* channel is being disconnected */
-#define        XPC_C_DISCONNECTCALLOUT 0x00008000 /* chan disconnected callout made */
-#define        XPC_C_WDISCONNECT       0x00010000 /* waiting for channel disconnect */
+#define        XPC_C_CONNECTEDCALLOUT  0x00000040 /* connected callout initiated */
+#define        XPC_C_CONNECTEDCALLOUT_MADE \
+                               0x00000080 /* connected callout completed */
+#define        XPC_C_CONNECTED         0x00000100 /* local channel is connected */
+#define        XPC_C_CONNECTING        0x00000200 /* channel is being connected */
+
+#define        XPC_C_RCLOSEREPLY       0x00000400 /* remote close channel reply */
+#define        XPC_C_CLOSEREPLY        0x00000800 /* local close channel reply */
+#define        XPC_C_RCLOSEREQUEST     0x00001000 /* remote close channel request */
+#define        XPC_C_CLOSEREQUEST      0x00002000 /* local close channel request */
+
+#define        XPC_C_DISCONNECTED      0x00004000 /* channel is disconnected */
+#define        XPC_C_DISCONNECTING     0x00008000 /* channel is being disconnected */
+#define        XPC_C_DISCONNECTINGCALLOUT \
+                               0x00010000 /* disconnecting callout initiated */
+#define        XPC_C_DISCONNECTINGCALLOUT_MADE \
+                               0x00020000 /* disconnecting callout completed */
+#define        XPC_C_WDISCONNECT       0x00040000 /* waiting for channel disconnect */
 
 
 
index 414aae06044093b474033f1824c4734c2bcc5008..05a6baf8a472a5daef978db6858c35a9a0e664bb 100644 (file)
@@ -15,6 +15,8 @@
 
 typedef unsigned long cycles_t;
 
+extern void (*ia64_udelay)(unsigned long usecs);
+
 /*
  * For performance reasons, we don't want to define CLOCK_TICK_TRATE as
  * local_cpu_data->itc_rate.  Fortunately, we don't have to, either: according to George
index c99832e7bf3f76a0b531e8d9ae913fc17fcb3f40..eca3f2d633dbb67368e57cdd0e550218f1ea4516 100644 (file)
@@ -133,6 +133,7 @@ extern int fix_aperture;
 extern int force_iommu;
 
 extern int reboot_force;
+extern int notsc_setup(char *);
 
 extern void smp_local_timer_interrupt(struct pt_regs * regs);
 
index b49affa0ac5a4d4b779d2e0b9a8967fec7640bec..3b507bf05d098313503270a757175af101af6f57 100644 (file)
@@ -326,12 +326,6 @@ struct sysinfo {
 /* Force a compilation error if condition is true */
 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
 
-#ifdef CONFIG_SYSCTL
-extern int randomize_va_space;
-#else
-#define randomize_va_space 1
-#endif
-
 /* Trap pasters of __FUNCTION__ at compile-time */
 #define __FUNCTION__ (__func__)
 
index 75e9f0724997e631806ceb7dd3733dfd7b2d8cc1..26e1663a5cbe474597b6fe75f5d2b00f2c09e20a 100644 (file)
@@ -1051,5 +1051,7 @@ int shrink_slab(unsigned long scanned, gfp_t gfp_mask,
 void drop_pagecache(void);
 void drop_slab(void);
 
+extern int randomize_va_space;
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
index 04a4a8cb4ed37ab150b6575b3ae9f9268967e5e7..b7ca1204e42ac6efedc5ad6a5fd78dfb8e67c549 100644 (file)
@@ -345,6 +345,9 @@ time_interpolator_reset(void)
 
 #endif /* !CONFIG_TIME_INTERPOLATION */
 
+/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
+extern u64 current_tick_length(void);
+
 #endif /* KERNEL */
 
 #endif /* LINUX_TIMEX_H */
index 71dd6f62efec11ce623d64ef31ec565a78084763..7654d55c47f50c8a476fcca89d6e28c709461870 100644 (file)
@@ -126,8 +126,6 @@ extern int sysctl_hz_timer;
 extern int acct_parm[];
 #endif
 
-int randomize_va_space = 1;
-
 static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t,
                       ctl_table *, void **);
 static int proc_doutsstring(ctl_table *table, int write, struct file *filp,
index b9dad3994676948f114e757a59f18c29f950e5f7..fe3a9a9f832849bddbb3bf1be92268af99287aa9 100644 (file)
@@ -717,12 +717,16 @@ static void second_overflow(void)
 #endif
 }
 
-/* in the NTP reference this is called "hardclock()" */
-static void update_wall_time_one_tick(void)
+/*
+ * Returns how many microseconds we need to add to xtime this tick
+ * in doing an adjustment requested with adjtime.
+ */
+static long adjtime_adjustment(void)
 {
-       long time_adjust_step, delta_nsec;
+       long time_adjust_step;
 
-       if ((time_adjust_step = time_adjust) != 0 ) {
+       time_adjust_step = time_adjust;
+       if (time_adjust_step) {
                /*
                 * We are doing an adjtime thing.  Prepare time_adjust_step to
                 * be within bounds.  Note that a positive time_adjust means we
@@ -733,10 +737,19 @@ static void update_wall_time_one_tick(void)
                 */
                time_adjust_step = min(time_adjust_step, (long)tickadj);
                time_adjust_step = max(time_adjust_step, (long)-tickadj);
+       }
+       return time_adjust_step;
+}
 
+/* in the NTP reference this is called "hardclock()" */
+static void update_wall_time_one_tick(void)
+{
+       long time_adjust_step, delta_nsec;
+
+       time_adjust_step = adjtime_adjustment();
+       if (time_adjust_step)
                /* Reduce by this step the amount of time left  */
                time_adjust -= time_adjust_step;
-       }
        delta_nsec = tick_nsec + time_adjust_step * 1000;
        /*
         * Advance the phase, once it gets to one microsecond, then
@@ -758,6 +771,22 @@ static void update_wall_time_one_tick(void)
        }
 }
 
+/*
+ * Return how long ticks are at the moment, that is, how much time
+ * update_wall_time_one_tick will add to xtime next time we call it
+ * (assuming no calls to do_adjtimex in the meantime).
+ * The return value is in fixed-point nanoseconds with SHIFT_SCALE-10
+ * bits to the right of the binary point.
+ * This function has no side-effects.
+ */
+u64 current_tick_length(void)
+{
+       long delta_nsec;
+
+       delta_nsec = tick_nsec + adjtime_adjustment() * 1000;
+       return ((u64) delta_nsec << (SHIFT_SCALE - 10)) + time_adj;
+}
+
 /*
  * Using a loop looks inefficient, but "ticks" is
  * usually just one (we shouldn't be losing ticks,
index 2bee1f21aa8aa92294ef481778b3c370063413fb..9abc6008544baae37d9d88a4416a4ec81e966132 100644 (file)
@@ -82,6 +82,16 @@ EXPORT_SYMBOL(num_physpages);
 EXPORT_SYMBOL(high_memory);
 EXPORT_SYMBOL(vmalloc_earlyreserve);
 
+int randomize_va_space __read_mostly = 1;
+
+static int __init disable_randmaps(char *s)
+{
+       randomize_va_space = 0;
+       return 0;
+}
+__setup("norandmaps", disable_randmaps);
+
+
 /*
  * If a p?d_bad entry is found while walking page tables, report
  * the error, before resetting entry to p?d_none.  Usually (but
index 3bd7fb7e4b759923524073d662085605b04d6087..323fdcf128c407a77719436a2c4b49a420a521e6 100644 (file)
@@ -132,19 +132,29 @@ static int mpol_check_policy(int mode, nodemask_t *nodes)
        }
        return nodes_subset(*nodes, node_online_map) ? 0 : -EINVAL;
 }
+
 /* Generate a custom zonelist for the BIND policy. */
 static struct zonelist *bind_zonelist(nodemask_t *nodes)
 {
        struct zonelist *zl;
-       int num, max, nd;
+       int num, max, nd, k;
 
        max = 1 + MAX_NR_ZONES * nodes_weight(*nodes);
-       zl = kmalloc(sizeof(void *) * max, GFP_KERNEL);
+       zl = kmalloc(sizeof(struct zone *) * max, GFP_KERNEL);
        if (!zl)
                return NULL;
        num = 0;
-       for_each_node_mask(nd, *nodes)
-               zl->zones[num++] = &NODE_DATA(nd)->node_zones[policy_zone];
+       /* First put in the highest zones from all nodes, then all the next 
+          lower zones etc. Avoid empty zones because the memory allocator
+          doesn't like them. If you implement node hot removal you
+          have to fix that. */
+       for (k = policy_zone; k >= 0; k--) { 
+               for_each_node_mask(nd, *nodes) { 
+                       struct zone *z = &NODE_DATA(nd)->node_zones[k];
+                       if (z->present_pages > 0) 
+                               zl->zones[num++] = z;
+               }
+       }
        zl->zones[num] = NULL;
        return zl;
 }