Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Jul 2005 05:12:57 +0000 (22:12 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Jul 2005 05:12:57 +0000 (22:12 -0700)
61 files changed:
Documentation/x86_64/boot-options.txt
Makefile
arch/i386/kernel/cpu/intel_cacheinfo.c
arch/i386/kernel/numaq.c
arch/um/drivers/Makefile
arch/um/drivers/mconsole_kern.c
arch/um/kernel/exitcode.c
arch/um/kernel/process.c
arch/um/kernel/process_kern.c
arch/um/kernel/skas/process.c
arch/um/kernel/skas/trap_user.c
arch/um/kernel/time_kern.c
arch/um/os-Linux/user_syms.c
arch/um/sys-i386/stub_segv.c
arch/x86_64/Kconfig
arch/x86_64/Makefile
arch/x86_64/defconfig
arch/x86_64/ia32/Makefile
arch/x86_64/ia32/syscall32.c
arch/x86_64/ia32/syscall32_syscall.S [new file with mode: 0644]
arch/x86_64/kernel/entry.S
arch/x86_64/kernel/genapic.c
arch/x86_64/kernel/genapic_flat.c
arch/x86_64/kernel/head.S
arch/x86_64/kernel/irq.c
arch/x86_64/kernel/mce.c
arch/x86_64/kernel/mpparse.c
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/setup64.c
arch/x86_64/kernel/smp.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/traps.c
arch/x86_64/lib/delay.c
arch/x86_64/mm/fault.c
arch/x86_64/mm/numa.c
arch/x86_64/mm/srat.c
arch/x86_64/pci/k8-bus.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/video/fbsysfs.c
fs/hostfs/hostfs.h
fs/hostfs/hostfs_kern.c
fs/hostfs/hostfs_user.c
include/asm-generic/sections.h
include/asm-i386/smp.h
include/asm-um/vm86.h [new file with mode: 0644]
include/asm-x86_64/bitops.h
include/asm-x86_64/bug.h
include/asm-x86_64/desc.h
include/asm-x86_64/ipi.h
include/asm-x86_64/irq.h
include/asm-x86_64/msr.h
include/asm-x86_64/smp.h
include/asm-x86_64/system.h
include/asm-x86_64/tlbflush.h
init/main.c
kernel/posix-timers.c
kernel/softirq.c
scripts/kconfig/gconf.c
scripts/kconfig/gconf.glade
security/selinux/hooks.c

index b9e6be00cadfbc1f2e767076c467ccb6f6ad28e6..476c0c22fbb7e43788b543380c0aaf82f9c7dba3 100644 (file)
@@ -47,7 +47,7 @@ Timing
   notsc
   Don't use the CPU time stamp counter to read the wall time.
   This can be used to work around timing problems on multiprocessor systems
-  with not properly synchronized CPUs. Only useful with a SMP kernel
+  with not properly synchronized CPUs.
 
   report_lost_ticks
   Report when timer interrupts are lost because some code turned off
@@ -74,6 +74,9 @@ Idle loop
   event. This will make the CPUs eat a lot more power, but may be useful
   to get slightly better performance in multiprocessor benchmarks. It also
   makes some profiling using performance counters more accurate.
+  Please note that on systems with MONITOR/MWAIT support (like Intel EM64T
+  CPUs) this option has no performance advantage over the normal idle loop.
+  It may also interact badly with hyperthreading.
 
 Rebooting
 
@@ -178,6 +181,5 @@ Debugging
 Misc
 
   noreplacement  Don't replace instructions with more appropiate ones
-                                for the CPU. This may be useful on asymmetric MP systems
-                                where some CPU have less capabilities than the others.
-
+                for the CPU. This may be useful on asymmetric MP systems
+                where some CPU have less capabilities than the others.
index cf34a6b5c6eb77470f88f8d962f3173296e04783..717b9b9192d5f535da43fbc658fed341cbde4c6c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 13
-EXTRAVERSION =-rc3
+EXTRAVERSION =-rc4
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
index 1d768b263269b0d8b728e57f9675ea1950efb8c6..6c55b50cf048af7bef9df49bb78b6daa8b71c4ac 100644 (file)
@@ -128,7 +128,7 @@ static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le
        cpuid_count(4, index, &eax, &ebx, &ecx, &edx);
        cache_eax.full = eax;
        if (cache_eax.split.type == CACHE_TYPE_NULL)
-               return -1;
+               return -EIO; /* better error ? */
 
        this_leaf->eax.full = eax;
        this_leaf->ebx.full = ebx;
@@ -334,6 +334,7 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
        struct _cpuid4_info     *this_leaf;
        unsigned long           j;
        int                     retval;
+       cpumask_t               oldmask;
 
        if (num_cache_leaves == 0)
                return -ENOENT;
@@ -345,19 +346,26 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
        memset(cpuid4_info[cpu], 0,
            sizeof(struct _cpuid4_info) * num_cache_leaves);
 
+       oldmask = current->cpus_allowed;
+       retval = set_cpus_allowed(current, cpumask_of_cpu(cpu));
+       if (retval)
+               goto out;
+
        /* Do cpuid and store the results */
+       retval = 0;
        for (j = 0; j < num_cache_leaves; j++) {
                this_leaf = CPUID4_INFO_IDX(cpu, j);
                retval = cpuid4_cache_lookup(j, this_leaf);
                if (unlikely(retval < 0))
-                       goto err_out;
+                       break;
                cache_shared_cpu_map_setup(cpu, j);
        }
-       return 0;
+       set_cpus_allowed(current, oldmask);
 
-err_out:
-       free_cache_attributes(cpu);
-       return -ENOMEM;
+out:
+       if (retval)
+               free_cache_attributes(cpu);
+       return retval;
 }
 
 #ifdef CONFIG_SYSFS
index e51edf0a656487c2100ffe293ff1a0cc6c0dd0fd..5f5b075f860a8c97ceddf6fed27f45ef153f4622 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/nodemask.h>
 #include <asm/numaq.h>
 #include <asm/topology.h>
+#include <asm/processor.h>
 
 #define        MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT))
 
@@ -77,3 +78,11 @@ int __init get_memcfg_numaq(void)
        smp_dump_qct();
        return 1;
 }
+
+static int __init numaq_dsc_disable(void)
+{
+       printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
+       tsc_disable = 1;
+       return 0;
+}
+core_initcall(numaq_dsc_disable);
index d6c31a95b88712b8afce002e8329a90ea1eb4338..de17d4c6e02db13309752ca26a99c2536f5f0163 100644 (file)
@@ -19,6 +19,8 @@ harddog-objs := harddog_kern.o harddog_user.o
 
 LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a)
 
+targets := pcap_kern.o pcap_user.o
+
 $(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o
        $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_pcap.o)
 #XXX: The call below does not work because the flags are added before the
@@ -26,7 +28,7 @@ $(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o
 #$(call if_changed,ld)
 
 # When the above is fixed, don't forget to add this too!
-#targets := $(obj)/pcap.o
+#targets += $(obj)/pcap.o
 
 obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o
 obj-$(CONFIG_SSL) += ssl.o
index 404de41a4f677cf664b740ff38a3a2e327e42a4e..c190c24141972399fa2ec328181f002939c60d36 100644 (file)
@@ -557,7 +557,7 @@ static int create_proc_mconsole(void)
 
        ent = create_proc_entry("mconsole", S_IFREG | 0200, NULL);
        if(ent == NULL){
-               printk("create_proc_mconsole : create_proc_entry failed\n");
+               printk(KERN_INFO "create_proc_mconsole : create_proc_entry failed\n");
                return(0);
        }
 
index 0ea87f24b36fdefe558d8486baf41f4849ad3661..d21ebad666b4246f45c99d2667dbcc82702b6f6c 100644 (file)
@@ -48,7 +48,7 @@ static int make_proc_exitcode(void)
 
        ent = create_proc_entry("exitcode", 0600, &proc_root);
        if(ent == NULL){
-               printk("make_proc_exitcode : Failed to register "
+               printk(KERN_WARNING "make_proc_exitcode : Failed to register "
                       "/proc/exitcode\n");
                return(0);
        }
index 8b01a5584e805f6f0de9a8ab0b59f33e3f4ca9f6..67acd92c5322f14cc96c6186a7336df51906718d 100644 (file)
@@ -131,7 +131,7 @@ int start_fork_tramp(void *thread_arg, unsigned long temp_stack,
        return(arg.pid);
 }
 
-static int ptrace_child(void)
+static int ptrace_child(void *arg)
 {
        int ret;
        int pid = os_getpid(), ppid = getppid();
@@ -160,16 +160,20 @@ static int ptrace_child(void)
        _exit(ret);
 }
 
-static int start_ptraced_child(void)
+static int start_ptraced_child(void **stack_out)
 {
+       void *stack;
+       unsigned long sp;
        int pid, n, status;
        
-       pid = fork();
-       if(pid == 0)
-               ptrace_child();
-
+       stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
+                    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+       if(stack == MAP_FAILED)
+               panic("check_ptrace : mmap failed, errno = %d", errno);
+       sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *);
+       pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL);
        if(pid < 0)
-               panic("check_ptrace : fork failed, errno = %d", errno);
+               panic("check_ptrace : clone failed, errno = %d", errno);
        CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
        if(n < 0)
                panic("check_ptrace : wait failed, errno = %d", errno);
@@ -177,6 +181,7 @@ static int start_ptraced_child(void)
                panic("check_ptrace : expected SIGSTOP, got status = %d",
                      status);
 
+       *stack_out = stack;
        return(pid);
 }
 
@@ -184,12 +189,12 @@ static int start_ptraced_child(void)
  * just avoid using sysemu, not panic, but only if SYSEMU features are broken.
  * So only for SYSEMU features we test mustpanic, while normal host features
  * must work anyway!*/
-static int stop_ptraced_child(int pid, int exitcode, int mustexit)
+static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic)
 {
        int status, n, ret = 0;
 
        if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
-               panic("stop_ptraced_child : ptrace failed, errno = %d", errno);
+               panic("check_ptrace : ptrace failed, errno = %d", errno);
        CATCH_EINTR(n = waitpid(pid, &status, 0));
        if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
                int exit_with = WEXITSTATUS(status);
@@ -200,13 +205,15 @@ static int stop_ptraced_child(int pid, int exitcode, int mustexit)
                printk("check_ptrace : child exited with exitcode %d, while "
                      "expecting %d; status 0x%x", exit_with,
                      exitcode, status);
-               if (mustexit)
+               if (mustpanic)
                        panic("\n");
                else
                        printk("\n");
                ret = -1;
        }
 
+       if(munmap(stack, PAGE_SIZE) < 0)
+               panic("check_ptrace : munmap failed, errno = %d", errno);
        return ret;
 }
 
@@ -242,11 +249,12 @@ __uml_setup("nosysemu", nosysemu_cmd_param,
 
 static void __init check_sysemu(void)
 {
+       void *stack;
        int pid, syscall, n, status, count=0;
 
        printk("Checking syscall emulation patch for ptrace...");
        sysemu_supported = 0;
-       pid = start_ptraced_child();
+       pid = start_ptraced_child(&stack);
 
        if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0)
                goto fail;
@@ -264,7 +272,7 @@ static void __init check_sysemu(void)
                panic("check_sysemu : failed to modify system "
                      "call return, errno = %d", errno);
 
-       if (stop_ptraced_child(pid, 0, 0) < 0)
+       if (stop_ptraced_child(pid, stack, 0, 0) < 0)
                goto fail_stopped;
 
        sysemu_supported = 1;
@@ -272,7 +280,7 @@ static void __init check_sysemu(void)
        set_using_sysemu(!force_sysemu_disabled);
 
        printk("Checking advanced syscall emulation patch for ptrace...");
-       pid = start_ptraced_child();
+       pid = start_ptraced_child(&stack);
        while(1){
                count++;
                if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0)
@@ -297,7 +305,7 @@ static void __init check_sysemu(void)
                        break;
                }
        }
-       if (stop_ptraced_child(pid, 0, 0) < 0)
+       if (stop_ptraced_child(pid, stack, 0, 0) < 0)
                goto fail_stopped;
 
        sysemu_supported = 2;
@@ -308,17 +316,18 @@ static void __init check_sysemu(void)
        return;
 
 fail:
-       stop_ptraced_child(pid, 1, 0);
+       stop_ptraced_child(pid, stack, 1, 0);
 fail_stopped:
        printk("missing\n");
 }
 
 void __init check_ptrace(void)
 {
+       void *stack;
        int pid, syscall, n, status;
 
        printk("Checking that ptrace can change system call numbers...");
-       pid = start_ptraced_child();
+       pid = start_ptraced_child(&stack);
 
        if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
                panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
@@ -345,7 +354,7 @@ void __init check_ptrace(void)
                        break;
                }
        }
-       stop_ptraced_child(pid, 0, 1);
+       stop_ptraced_child(pid, stack, 0, 1);
        printk("OK\n");
        check_sysemu();
 }
@@ -380,10 +389,11 @@ extern void *__syscall_stub_start, __syscall_stub_end;
 static inline void check_skas3_ptrace_support(void)
 {
        struct ptrace_faultinfo fi;
+       void *stack;
        int pid, n;
 
        printf("Checking for the skas3 patch in the host...");
-       pid = start_ptraced_child();
+       pid = start_ptraced_child(&stack);
 
        n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi);
        if (n < 0) {
@@ -402,7 +412,7 @@ static inline void check_skas3_ptrace_support(void)
        }
 
        init_registers(pid);
-       stop_ptraced_child(pid, 1, 1);
+       stop_ptraced_child(pid, stack, 1, 1);
 }
 
 int can_do_skas(void)
index d4036ed680bcd408e82f1afd6871d77915792939..c23d8a08d0ff5403df391fbdd04ca86baa89a391 100644 (file)
@@ -412,7 +412,7 @@ int __init make_proc_sysemu(void)
 
        if (ent == NULL)
        {
-               printk("Failed to register /proc/sysemu\n");
+               printk(KERN_WARNING "Failed to register /proc/sysemu\n");
                return(0);
        }
 
index ba671dab8878485d605e0cc6b4dd1617328cbb54..6dd9e5bf18ed7e92f38bb89a08ceafca56d8b757 100644 (file)
@@ -64,7 +64,7 @@ void wait_stub_done(int pid, int sig, char * fname)
                 (WSTOPSIG(status) == SIGVTALRM));
 
         if((n < 0) || !WIFSTOPPED(status) ||
-           (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status != SIGTRAP))){
+           (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){
                 panic("%s : failed to wait for SIGUSR1/SIGTRAP, "
                       "pid = %d, n = %d, errno = %d, status = 0x%x\n",
                       fname, pid, n, errno, status);
index 0dee1d95c806be4be14ed475008d51e1992e01fb..9950a6716fe5b015dd51365adfa312c5c2226d60 100644 (file)
@@ -58,7 +58,6 @@ void user_signal(int sig, union uml_pt_regs *regs, int pid)
         int segv = ((sig == SIGFPE) || (sig == SIGSEGV) || (sig == SIGBUS) ||
                     (sig == SIGILL) || (sig == SIGTRAP));
 
-       regs->skas.is_user = 1;
        if (segv)
                get_skas_faultinfo(pid, &regs->skas.faultinfo);
        info = &sig_info[sig];
index a8b4ef601f5964d236360e8ae5bb1d4f49dbc56d..4e08f7545d63d6df96558ff6506a764db1b7e4ca 100644 (file)
@@ -137,7 +137,10 @@ long um_stime(int __user *tptr)
 void timer_handler(int sig, union uml_pt_regs *regs)
 {
        local_irq_disable();
-       update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), (regs)->skas.is_user));
+       irq_enter();
+       update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)),
+                                        (regs)->skas.is_user));
+       irq_exit();
        local_irq_enable();
        if(current_thread->cpu == 0)
                timer_irq(regs);
index 75d7af9ae1d2268ae145be5c02fc41dec739d423..56d3f870926b8214a99899135d1f87f777a6b463 100644 (file)
@@ -83,6 +83,9 @@ EXPORT_SYMBOL_PROTO(statfs64);
 
 EXPORT_SYMBOL_PROTO(getuid);
 
+EXPORT_SYMBOL_PROTO(fsync);
+EXPORT_SYMBOL_PROTO(fdatasync);
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
index b251442ad0b1916ad5c05eefb6dfef04d24720b8..68aeabe3a654703b76d20633ba7b3d36832060a4 100644 (file)
@@ -21,10 +21,10 @@ stub_segv_handler(int sig)
        __asm__("movl %0, %%eax ; int $0x80": : "g" (__NR_getpid));
        __asm__("movl %%eax, %%ebx ; movl %0, %%eax ; movl %1, %%ecx ;"
                "int $0x80": : "g" (__NR_kill), "g" (SIGUSR1));
-       /* Pop the frame pointer and return address since we need to leave
+       /* Load pointer to sigcontext into esp, since we need to leave
         * the stack in its original form when we do the sigreturn here, by
         * hand.
         */
-       __asm__("popl %%eax ; popl %%eax ; popl %%eax ; movl %0, %%eax ; "
-               "int $0x80" : : "g" (__NR_sigreturn));
+       __asm__("mov %0,%%esp ; movl %1, %%eax ; "
+               "int $0x80" : : "a" (sc), "g" (__NR_sigreturn));
 }
index 4b8326177c52fba07bc4d9399d186da6609b946a..660a03a89e6663bf7f04bd83c163c441210e8dc1 100644 (file)
@@ -329,12 +329,15 @@ config HPET_EMULATE_RTC
 
 config GART_IOMMU
        bool "IOMMU support"
+       default y
        depends on PCI
        help
-         Support the K8 IOMMU. Needed to run systems with more than 4GB of memory
+         Support the IOMMU. Needed to run systems with more than 3GB of memory
          properly with 32-bit PCI devices that do not support DAC (Double Address
          Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter.
          Normally the kernel will take the right choice by itself.
+         This option includes a driver for the AMD Opteron/Athlon64 IOMMU
+         and a software emulation used on some other systems.
          If unsure, say Y.
 
 # need this always enabled with GART_IOMMU for the VIA workaround
index 4289156976751580dbf2895f086b4eaad0345003..4c6ed96d5f7c52356ecdb73aaafefe2ced07fce3 100644 (file)
 #
 # $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
 
-#
-# early bootup linking needs 32bit. You can either use real 32bit tools
-# here or 64bit tools in 32bit mode.
-#
-IA32_CC := $(CC) $(CPPFLAGS) -m32 -O2 -fomit-frame-pointer
-IA32_LD := $(LD) -m elf_i386
-IA32_AS := $(CC) $(AFLAGS) -m32 -Wa,--32 -traditional -c
-IA32_OBJCOPY := $(CROSS_COMPILE)objcopy
-IA32_CPP := $(CROSS_COMPILE)gcc -m32 -E
-export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP
-
-
 LDFLAGS                := -m elf_x86_64
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=
index 569595b74c7ccfc5412053959f5cd68891122848..776f3c866b7092d30dfa515f61deea41ff0cef04 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc4
-# Fri May 13 06:39:11 2005
+# Linux kernel version: 2.6.13-rc3
+# Fri Jul 22 16:47:31 2005
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -84,14 +84,27 @@ CONFIG_X86_IO_APIC=y
 CONFIG_X86_LOCAL_APIC=y
 CONFIG_MTRR=y
 CONFIG_SMP=y
-# CONFIG_PREEMPT is not set
 CONFIG_SCHED_SMT=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
 CONFIG_K8_NUMA=y
 # CONFIG_NUMA_EMU is not set
-CONFIG_DISCONTIGMEM=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_NUMA=y
+CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_HAVE_DEC_LOCK=y
-CONFIG_NR_CPUS=8
+CONFIG_NR_CPUS=32
 CONFIG_HPET_TIMER=y
 CONFIG_X86_PM_TIMER=y
 CONFIG_HPET_EMULATE_RTC=y
@@ -99,7 +112,13 @@ CONFIG_GART_IOMMU=y
 CONFIG_SWIOTLB=y
 CONFIG_X86_MCE=y
 CONFIG_X86_MCE_INTEL=y
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_KEXEC is not set
 CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_ISA_DMA_API=y
@@ -118,12 +137,11 @@ CONFIG_PM_STD_PARTITION=""
 CONFIG_ACPI=y
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
 CONFIG_ACPI_AC=y
 CONFIG_ACPI_BATTERY=y
 CONFIG_ACPI_BUTTON=y
 # CONFIG_ACPI_VIDEO is not set
+CONFIG_ACPI_HOTKEY=m
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_THERMAL=y
@@ -154,6 +172,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
 
 #
 # CPUFreq processor drivers
@@ -203,6 +222,76 @@ CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
 CONFIG_UID16=y
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+CONFIG_IP_TCPDIAG_IPV6=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+
 #
 # Device Drivers
 #
@@ -308,6 +397,7 @@ CONFIG_BLK_DEV_AMD74XX=y
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 CONFIG_BLK_DEV_PIIX=y
+# CONFIG_BLK_DEV_IT821X is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_PDC202XX_OLD is not set
 CONFIG_BLK_DEV_PDC202XX_NEW=y
@@ -338,6 +428,7 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_CHR_DEV_OSST is not set
 # CONFIG_BLK_DEV_SR is not set
 # CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -372,7 +463,6 @@ CONFIG_AIC79XX_DEBUG_MASK=0
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 CONFIG_SCSI_SATA=y
-# CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_SVW is not set
 CONFIG_SCSI_ATA_PIIX=y
 # CONFIG_SCSI_SATA_NV is not set
@@ -410,14 +500,21 @@ CONFIG_SCSI_QLA2XXX=y
 #
 # Multi-device support (RAID and LVM)
 #
-# CONFIG_MD is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_CRYPT is not set
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+# CONFIG_DM_MULTIPATH is not set
 
 #
 # Fusion MPT device support
 #
-CONFIG_FUSION=y
-CONFIG_FUSION_MAX_SGE=40
-# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -430,75 +527,8 @@ CONFIG_FUSION_MAX_SGE=40
 # CONFIG_I2O is not set
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-CONFIG_IP_TCPDIAG_IPV6=y
-CONFIG_IPV6=y
-# CONFIG_IPV6_PRIVACY is not set
-# CONFIG_INET6_AH is not set
-# CONFIG_INET6_ESP is not set
-# CONFIG_INET6_IPCOMP is not set
-# CONFIG_INET6_TUNNEL is not set
-# CONFIG_IPV6_TUNNEL is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
+# Network device support
 #
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -517,7 +547,9 @@ CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=y
+# CONFIG_TYPHOON is not set
 
 #
 # Tulip family network device support
@@ -532,7 +564,7 @@ CONFIG_NET_PCI=y
 CONFIG_FORCEDETH=y
 # CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
-# CONFIG_E100 is not set
+CONFIG_E100=y
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
@@ -553,14 +585,15 @@ CONFIG_8139TOO=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
-# CONFIG_E1000_NAPI is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SKGE is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
+# CONFIG_BNX2 is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -647,7 +680,6 @@ CONFIG_SERIO_I8042=y
 CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
@@ -716,12 +748,19 @@ CONFIG_MAX_RAW_DEVS=256
 # I2C support
 #
 # CONFIG_I2C is not set
+# CONFIG_I2C_SENSOR is not set
 
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
 #
 # Misc devices
 #
@@ -808,6 +847,7 @@ CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_OHCI_BIG_ENDIAN is not set
 CONFIG_USB_OHCI_LITTLE_ENDIAN=y
@@ -846,12 +886,15 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
 # CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
 # CONFIG_USB_MTOUCH is not set
+# CONFIG_USB_ITMTOUCH is not set
 # CONFIG_USB_EGALAX is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
 
 #
 # USB Imaging devices
@@ -902,10 +945,11 @@ CONFIG_USB_MON=y
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
 
 #
-# USB ATM/DSL drivers
+# USB DSL modem support
 #
 
 #
@@ -923,6 +967,10 @@ CONFIG_USB_MON=y
 #
 # CONFIG_INFINIBAND is not set
 
+#
+# SN Devices
+#
+
 #
 # Firmware Drivers
 #
@@ -935,6 +983,7 @@ CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 CONFIG_EXT2_FS_POSIX_ACL=y
 # CONFIG_EXT2_FS_SECURITY is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
@@ -957,6 +1006,7 @@ CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
@@ -986,7 +1036,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_XATTR is not set
@@ -1016,15 +1065,18 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
 # CONFIG_NFSD_V4 is not set
 CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
index a12b19da4b59ea061d42d0491b86cb410eeff1d9..f76217d8f5799dd3ca888d6da91680182bf746d5 100644 (file)
@@ -4,14 +4,14 @@
 
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
        ia32_signal.o tls32.o \
-       ia32_binfmt.o fpu32.o ptrace32.o syscall32.o
+       ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
 obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
 
 obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
 
-$(obj)/syscall32.o: $(src)/syscall32.c \
+$(obj)/syscall32_syscall.o: \
        $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
 
 # Teach kbuild about targets
index 816a3b89f13d870865d0a85353ae7a58c7386b65..adbc5f8089e9a209707087ca86048c8358caa93e 100644 (file)
 #include <asm/tlbflush.h>
 #include <asm/ia32_unistd.h>
 
-/* 32bit VDSOs mapped into user space. */ 
-asm(".section \".init.data\",\"aw\"\n"
-    "syscall32_syscall:\n"
-    ".incbin \"arch/x86_64/ia32/vsyscall-syscall.so\"\n"
-    "syscall32_syscall_end:\n"
-    "syscall32_sysenter:\n"
-    ".incbin \"arch/x86_64/ia32/vsyscall-sysenter.so\"\n"
-    "syscall32_sysenter_end:\n"
-    ".previous");
-
 extern unsigned char syscall32_syscall[], syscall32_syscall_end[];
 extern unsigned char syscall32_sysenter[], syscall32_sysenter_end[];
 extern int sysctl_vsyscall32;
diff --git a/arch/x86_64/ia32/syscall32_syscall.S b/arch/x86_64/ia32/syscall32_syscall.S
new file mode 100644 (file)
index 0000000..8f8271b
--- /dev/null
@@ -0,0 +1,17 @@
+/* 32bit VDSOs mapped into user space. */
+
+       .section ".init.data","aw"
+
+       .globl syscall32_syscall
+       .globl syscall32_syscall_end
+
+syscall32_syscall:
+       .incbin "arch/x86_64/ia32/vsyscall-syscall.so"
+syscall32_syscall_end:
+
+       .globl syscall32_sysenter
+       .globl syscall32_sysenter_end
+
+syscall32_sysenter:
+       .incbin "arch/x86_64/ia32/vsyscall-sysenter.so"
+syscall32_sysenter_end:
index 28817490fdc69510a527c9974be8bb550aa2a5b6..096d470e280f38d6e64eb179a23525ecaa1252e5 100644 (file)
@@ -76,7 +76,7 @@
 
        .macro FAKE_STACK_FRAME child_rip
        /* push in order ss, rsp, eflags, cs, rip */
-       xorq %rax, %rax
+       xorl %eax, %eax
        pushq %rax /* ss */
        CFI_ADJUST_CFA_OFFSET   8
        pushq %rax /* rsp */
@@ -423,7 +423,7 @@ ENTRY(stub_rt_sigreturn)
        testl $3,CS(%rdi)
        je 1f
        swapgs  
-1:     addl $1,%gs:pda_irqcount        # RED-PEN should check preempt count
+1:     incl    %gs:pda_irqcount        # RED-PEN should check preempt count
        movq %gs:pda_irqstackptr,%rax
        cmoveq %rax,%rsp                                                        
        pushq %rdi                      # save old stack        
@@ -436,7 +436,7 @@ ENTRY(common_interrupt)
 ret_from_intr:         
        popq  %rdi
        cli     
-       subl $1,%gs:pda_irqcount
+       decl %gs:pda_irqcount
 #ifdef CONFIG_DEBUG_INFO
        movq RBP(%rdi),%rbp
 #endif
@@ -494,7 +494,7 @@ retint_signal:
        sti
        SAVE_REST
        movq $-1,ORIG_RAX(%rsp)                         
-       xorq %rsi,%rsi          # oldset
+       xorl %esi,%esi          # oldset
        movq %rsp,%rdi          # &pt_regs
        call do_notify_resume
        RESTORE_REST
@@ -752,7 +752,7 @@ child_rip:
        movq %rsi, %rdi
        call *%rax
        # exit
-       xorq %rdi, %rdi
+       xorl %edi, %edi
        call do_exit
 
 /*
@@ -918,3 +918,15 @@ ENTRY(machine_check)
 ENTRY(call_debug)
        zeroentry do_call_debug
 
+ENTRY(call_softirq)
+       movq %gs:pda_irqstackptr,%rax
+       pushq %r15
+       movq %rsp,%r15
+       incl %gs:pda_irqcount
+       cmove %rax,%rsp
+       call __do_softirq
+       movq %r15,%rsp
+       decl %gs:pda_irqcount
+       popq %r15
+       ret
+
index 69b9c25a8fc4ee5399b76b4a5d0967fc9c520f33..30c843a5efddf7cb2c3ed9312e2aadcbfb16d95d 100644 (file)
@@ -31,6 +31,7 @@ u8 x86_cpu_to_log_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID };
 
 extern struct genapic apic_cluster;
 extern struct genapic apic_flat;
+extern struct genapic apic_physflat;
 
 struct genapic *genapic = &apic_flat;
 
@@ -44,12 +45,7 @@ void __init clustered_apic_check(void)
        u8 clusters, max_cluster;
        u8 id;
        u8 cluster_cnt[NUM_APIC_CLUSTERS];
-
-       if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
-               /* AMD always uses flat mode right now */
-               genapic = &apic_flat;
-               goto print;
-       }
+       int num_cpus = 0;
 
 #if defined(CONFIG_ACPI_BUS)
        /*
@@ -64,15 +60,34 @@ void __init clustered_apic_check(void)
 #endif
 
        memset(cluster_cnt, 0, sizeof(cluster_cnt));
-
        for (i = 0; i < NR_CPUS; i++) {
                id = bios_cpu_apicid[i];
-               if (id != BAD_APICID)
-                       cluster_cnt[APIC_CLUSTERID(id)]++;
+               if (id == BAD_APICID)
+                       continue;
+               num_cpus++;
+               cluster_cnt[APIC_CLUSTERID(id)]++;
        }
 
+       /* Don't use clustered mode on AMD platforms. */
+       if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
+               genapic = &apic_physflat;
+#ifndef CONFIG_CPU_HOTPLUG
+               /* In the CPU hotplug case we cannot use broadcast mode
+                  because that opens a race when a CPU is removed.
+                  Stay at physflat mode in this case.
+                  It is bad to do this unconditionally though. Once
+                  we have ACPI platform support for CPU hotplug
+                  we should detect hotplug capablity from ACPI tables and
+                  only do this when really needed. -AK */
+               if (num_cpus <= 8)
+                       genapic = &apic_flat;
+#endif
+               goto print;
+       }
+
        clusters = 0;
        max_cluster = 0;
+
        for (i = 0; i < NUM_APIC_CLUSTERS; i++) {
                if (cluster_cnt[i] > 0) {
                        ++clusters;
index 282846965080ee90ac4388618de7a4b2a2fbedae..adc96282a9e2186f637f85576afdff2d6f4756be 100644 (file)
@@ -2,13 +2,11 @@
  * Copyright 2004 James Cleverdon, IBM.
  * Subject to the GNU Public License, v.2
  *
- * Flat APIC subarch code.  Maximum 8 CPUs, logical delivery.
+ * Flat APIC subarch code.
  *
  * Hacked for x86-64 by James Cleverdon from i386 architecture code by
  * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
  * James Cleverdon.
- * Ashok Raj <ashok.raj@intel.com>
- *     Removed IPI broadcast shortcut to support CPU hotplug
  */
 #include <linux/config.h>
 #include <linux/threads.h>
 #include <asm/smp.h>
 #include <asm/ipi.h>
 
-/*
- * The following permit choosing broadcast IPI shortcut v.s sending IPI only
- * to online cpus via the send_IPI_mask varient.
- * The mask version is my preferred option, since it eliminates a lot of
- * other extra code that would need to be written to cleanup intrs sent
- * to a CPU while offline.
- *
- * Sending broadcast introduces lots of trouble in CPU hotplug situations.
- * These IPI's are delivered to cpu's irrespective of their offline status
- * and could pickup stale intr data when these CPUS are turned online.
- *
- * Not using broadcast is a cleaner approach IMO, but Andi Kleen disagrees with
- * the idea of not using broadcast IPI's anymore. Hence the run time check
- * is introduced, on his request so we can choose an alternate mechanism.
- *
- * Initial wacky performance tests that collect cycle counts show
- * no increase in using mask v.s broadcast version. In fact they seem
- * identical in terms of cycle counts.
- *
- * if we need to use broadcast, we need to do the following.
- *
- * cli;
- * hold call_lock;
- * clear any pending IPI, just ack and clear all pending intr
- * set cpu_online_map;
- * release call_lock;
- * sti;
- *
- * The complicated dummy irq processing shown above is not required if
- * we didnt sent IPI's to wrong CPU's in the first place.
- *
- * - Ashok Raj <ashok.raj@intel.com>
- */
-#ifdef CONFIG_HOTPLUG_CPU
-#define DEFAULT_SEND_IPI       (1)
-#else
-#define DEFAULT_SEND_IPI       (0)
-#endif
-
-static int no_broadcast=DEFAULT_SEND_IPI;
-
 static cpumask_t flat_target_cpus(void)
 {
        return cpu_online_map;
@@ -119,37 +76,15 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector)
        local_irq_restore(flags);
 }
 
-static inline void __local_flat_send_IPI_allbutself(int vector)
-{
-       if (no_broadcast) {
-               cpumask_t mask = cpu_online_map;
-               int this_cpu = get_cpu();
-
-               cpu_clear(this_cpu, mask);
-               flat_send_IPI_mask(mask, vector);
-               put_cpu();
-       }
-       else
-               __send_IPI_shortcut(APIC_DEST_ALLBUT, vector, APIC_DEST_LOGICAL);
-}
-
-static inline void __local_flat_send_IPI_all(int vector)
-{
-       if (no_broadcast)
-               flat_send_IPI_mask(cpu_online_map, vector);
-       else
-               __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
-}
-
 static void flat_send_IPI_allbutself(int vector)
 {
        if (((num_online_cpus()) - 1) >= 1)
-               __local_flat_send_IPI_allbutself(vector);
+               __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL);
 }
 
 static void flat_send_IPI_all(int vector)
 {
-       __local_flat_send_IPI_all(vector);
+       __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
 }
 
 static int flat_apic_id_registered(void)
@@ -170,16 +105,6 @@ static unsigned int phys_pkg_id(int index_msb)
        return ((ebx >> 24) & 0xFF) >> index_msb;
 }
 
-static __init int no_ipi_broadcast(char *str)
-{
-       get_option(&str, &no_broadcast);
-       printk ("Using %s mode\n", no_broadcast ? "No IPI Broadcast" :
-                                                                                       "IPI Broadcast");
-       return 1;
-}
-
-__setup("no_ipi_broadcast", no_ipi_broadcast);
-
 struct genapic apic_flat =  {
        .name = "flat",
        .int_delivery_mode = dest_LowestPrio,
@@ -195,11 +120,62 @@ struct genapic apic_flat =  {
        .phys_pkg_id = phys_pkg_id,
 };
 
-static int __init print_ipi_mode(void)
+/*
+ * Physflat mode is used when there are more than 8 CPUs on a AMD system.
+ * We cannot use logical delivery in this case because the mask
+ * overflows, so use physical mode.
+ */
+
+static cpumask_t physflat_target_cpus(void)
+{
+       return cpumask_of_cpu(0);
+}
+
+static void physflat_send_IPI_mask(cpumask_t cpumask, int vector)
+{
+       send_IPI_mask_sequence(cpumask, vector);
+}
+
+static void physflat_send_IPI_allbutself(int vector)
+{
+       cpumask_t allbutme = cpu_online_map;
+       int me = get_cpu();
+       cpu_clear(me, allbutme);
+       physflat_send_IPI_mask(allbutme, vector);
+       put_cpu();
+}
+
+static void physflat_send_IPI_all(int vector)
 {
-       printk ("Using IPI %s mode\n", no_broadcast ? "No-Shortcut" :
-                                                                                       "Shortcut");
-       return 0;
+       physflat_send_IPI_mask(cpu_online_map, vector);
 }
 
-late_initcall(print_ipi_mode);
+static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask)
+{
+       int cpu;
+
+       /*
+        * We're using fixed IRQ delivery, can only return one phys APIC ID.
+        * May as well be the first.
+        */
+       cpu = first_cpu(cpumask);
+       if ((unsigned)cpu < NR_CPUS)
+               return x86_cpu_to_apicid[cpu];
+       else
+               return BAD_APICID;
+}
+
+struct genapic apic_physflat =  {
+       .name = "physical flat",
+       .int_delivery_mode = dest_LowestPrio,
+       .int_dest_mode = (APIC_DEST_PHYSICAL != 0),
+       .int_delivery_dest = APIC_DEST_PHYSICAL | APIC_DM_LOWEST,
+       .target_cpus = physflat_target_cpus,
+       .apic_id_registered = flat_apic_id_registered,
+       .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/
+       .send_IPI_all = physflat_send_IPI_all,
+       .send_IPI_allbutself = physflat_send_IPI_allbutself,
+       .send_IPI_mask = physflat_send_IPI_mask,
+       .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid,
+       .phys_pkg_id = phys_pkg_id,
+};
index 8d765aa77a266e980c8edaae33a8c11ffdd42e9c..98ff5eb32b9af5db22035c0da04cfe2bf9764367 100644 (file)
@@ -137,14 +137,14 @@ startup_64:
        wrmsr
 
        /* Setup cr0 */
-       xorq    %rax, %rax
-       btsq    $31, %rax                       /* Enable paging */
-       btsq    $0, %rax                        /* Enable protected mode */
-       btsq    $1, %rax                        /* Enable MP */
-       btsq    $4, %rax                        /* Enable ET */
-       btsq    $5, %rax                        /* Enable NE */
-       btsq    $16, %rax                       /* Enable WP */
-       btsq    $18, %rax                       /* Enable AM */
+#define CR0_PM                         1               /* protected mode */
+#define CR0_MP                         (1<<1)
+#define CR0_ET                         (1<<4)
+#define CR0_NE                         (1<<5)
+#define CR0_WP                         (1<<16)
+#define CR0_AM                         (1<<18)
+#define CR0_PAGING                     (1<<31)
+       movl $CR0_PM|CR0_MP|CR0_ET|CR0_NE|CR0_WP|CR0_AM|CR0_PAGING,%eax
        /* Make changes effective */
        movq    %rax, %cr0
 
index cc3fb85f51459141be2519243b8e752d5371f3d9..849a20aec7ca05e4cb5067f44010e2ca830f34e6 100644 (file)
@@ -135,3 +135,22 @@ void fixup_irqs(cpumask_t map)
        local_irq_disable();
 }
 #endif
+
+extern void call_softirq(void);
+
+asmlinkage void do_softirq(void)
+{
+       __u32 pending;
+       unsigned long flags;
+
+       if (in_interrupt())
+               return;
+
+       local_irq_save(flags);
+       pending = local_softirq_pending();
+       /* Switch to interrupt stack */
+       if (pending)
+               call_softirq();
+       local_irq_restore(flags);
+}
+EXPORT_SYMBOL(do_softirq);
index 21e70625a4953e26361c060c432f1803393952c5..3b267c91bb0c711bde04a1efd619ad3da8c2b6eb 100644 (file)
@@ -15,6 +15,8 @@
 #include <linux/sysdev.h>
 #include <linux/miscdevice.h>
 #include <linux/fs.h>
+#include <linux/cpu.h>
+#include <linux/percpu.h>
 #include <asm/processor.h> 
 #include <asm/msr.h>
 #include <asm/mce.h>
@@ -514,10 +516,7 @@ static struct sysdev_class mce_sysclass = {
        set_kset_name("machinecheck"),
 };
 
-static struct sys_device device_mce = {
-       .id     = 0,
-       .cls    = &mce_sysclass,
-};
+static DEFINE_PER_CPU(struct sys_device, device_mce);
 
 /* Why are there no generic functions for this? */
 #define ACCESSOR(name, var, start) \
@@ -542,27 +541,83 @@ ACCESSOR(bank4ctl,bank[4],mce_restart())
 ACCESSOR(tolerant,tolerant,)
 ACCESSOR(check_interval,check_interval,mce_restart())
 
-static __cpuinit int mce_init_device(void)
+/* Per cpu sysdev init.  All of the cpus still share the same ctl bank */
+static __cpuinit int mce_create_device(unsigned int cpu)
 {
        int err;
+       if (!mce_available(&cpu_data[cpu]))
+               return -EIO;
+
+       per_cpu(device_mce,cpu).id = cpu;
+       per_cpu(device_mce,cpu).cls = &mce_sysclass;
+
+       err = sysdev_register(&per_cpu(device_mce,cpu));
+
+       if (!err) {
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_bank0ctl);
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_bank1ctl);
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_bank2ctl);
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_bank3ctl);
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_bank4ctl);
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_tolerant);
+               sysdev_create_file(&per_cpu(device_mce,cpu), &attr_check_interval);
+       }
+       return err;
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+static __cpuinit void mce_remove_device(unsigned int cpu)
+{
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_bank0ctl);
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_bank1ctl);
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_bank2ctl);
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_bank3ctl);
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_bank4ctl);
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_tolerant);
+       sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval);
+       sysdev_unregister(&per_cpu(device_mce,cpu));
+}
+#endif
+
+/* Get notified when a cpu comes on/off. Be hotplug friendly. */
+static __cpuinit int
+mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
+{
+       unsigned int cpu = (unsigned long)hcpu;
+
+       switch (action) {
+       case CPU_ONLINE:
+               mce_create_device(cpu);
+               break;
+#ifdef CONFIG_HOTPLUG_CPU
+       case CPU_DEAD:
+               mce_remove_device(cpu);
+               break;
+#endif
+       }
+       return NOTIFY_OK;
+}
+
+static struct notifier_block mce_cpu_notifier = {
+       .notifier_call = mce_cpu_callback,
+};
+
+static __init int mce_init_device(void)
+{
+       int err;
+       int i = 0;
+
        if (!mce_available(&boot_cpu_data))
                return -EIO;
        err = sysdev_class_register(&mce_sysclass);
-       if (!err)
-               err = sysdev_register(&device_mce);
-       if (!err) { 
-               /* could create per CPU objects, but it is not worth it. */
-               sysdev_create_file(&device_mce, &attr_bank0ctl); 
-               sysdev_create_file(&device_mce, &attr_bank1ctl); 
-               sysdev_create_file(&device_mce, &attr_bank2ctl); 
-               sysdev_create_file(&device_mce, &attr_bank3ctl); 
-               sysdev_create_file(&device_mce, &attr_bank4ctl); 
-               sysdev_create_file(&device_mce, &attr_tolerant); 
-               sysdev_create_file(&device_mce, &attr_check_interval);
-       } 
-       
+
+       for_each_online_cpu(i) {
+               mce_create_device(i);
+       }
+
+       register_cpu_notifier(&mce_cpu_notifier);
        misc_register(&mce_log_device);
        return err;
-
 }
+
 device_initcall(mce_init_device);
index 9c5aa2a790c71f3abd26a92dd1b0021969104dd9..08abf9f5b159276b43efd3b19b930e50ebbc22ab 100644 (file)
@@ -109,7 +109,7 @@ static int __init mpf_checksum(unsigned char *mp, int len)
 
 static void __init MP_processor_info (struct mpc_config_processor *m)
 {
-       int ver;
+       int ver, cpu;
        static int found_bsp=0;
 
        if (!(m->mpc_cpuflag & CPU_ENABLED))
@@ -131,7 +131,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
                return;
        }
 
-       num_processors++;
+       cpu = num_processors++;
 
        if (m->mpc_apicid > MAX_APICS) {
                printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
@@ -155,13 +155,18 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
                 * in same order as logical cpu numbers. Hence the first
                 * entry is BSP, and so on.
                 */
+               cpu = 0;
+
                bios_cpu_apicid[0] = m->mpc_apicid;
                x86_cpu_to_apicid[0] = m->mpc_apicid;
                found_bsp = 1;
-       } else {
-               bios_cpu_apicid[num_processors - found_bsp] = m->mpc_apicid;
-               x86_cpu_to_apicid[num_processors - found_bsp] = m->mpc_apicid;
-       }
+       } else
+               cpu = num_processors - found_bsp;
+       bios_cpu_apicid[cpu] = m->mpc_apicid;
+       x86_cpu_to_apicid[cpu] = m->mpc_apicid;
+
+       cpu_set(cpu, cpu_possible_map);
+       cpu_set(cpu, cpu_present_map);
 }
 
 static void __init MP_bus_info (struct mpc_config_bus *m)
index 5fd03225058aa410bb60e461bb149db048844583..0aa526298e92948cb5bd909304ff635e575f2360 100644 (file)
@@ -765,8 +765,6 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
        int cpu = smp_processor_id();
        int node = 0;
        unsigned bits;
-       if (c->x86_num_cores == 1)
-               return;
 
        bits = 0;
        while ((1 << bits) < c->x86_num_cores)
@@ -1081,8 +1079,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
        else
                mtrr_ap_init();
 #ifdef CONFIG_NUMA
-       if (c != &boot_cpu_data)
-               numa_add_cpu(c - cpu_data);
+       numa_add_cpu(smp_processor_id());
 #endif
 }
  
index f2b9c6bc999a09753d75bd6e07390913f88e8702..34082c1cc41e397f4254de5a6d22ba474ffeb90d 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/string.h>
 #include <linux/bootmem.h>
 #include <linux/bitops.h>
+#include <linux/module.h>
 #include <asm/bootsetup.h>
 #include <asm/pda.h>
 #include <asm/pgtable.h>
 #include <asm/smp.h>
 #include <asm/i387.h>
 #include <asm/percpu.h>
-#include <asm/mtrr.h>
 #include <asm/proto.h>
-#include <asm/mman.h>
-#include <asm/numa.h>
+#include <asm/sections.h>
 
 char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
 
@@ -33,11 +32,6 @@ cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
 struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; 
 
-extern struct task_struct init_task;
-
-extern unsigned char __per_cpu_start[], __per_cpu_end[]; 
-
-extern struct desc_ptr cpu_gdt_descr[];
 struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; 
 
 char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
@@ -101,7 +95,7 @@ void __init setup_per_cpu_areas(void)
 #endif
 
        for (i = 0; i < NR_CPUS; i++) { 
-               unsigned char *ptr;
+               char *ptr;
 
                if (!NODE_DATA(cpu_to_node(i))) {
                        printk("cpu with no node %d, num_online_nodes %d\n",
@@ -190,11 +184,7 @@ void __cpuinit check_efer(void)
  */
 void __cpuinit cpu_init (void)
 {
-#ifdef CONFIG_SMP
        int cpu = stack_smp_processor_id();
-#else
-       int cpu = smp_processor_id();
-#endif
        struct tss_struct *t = &per_cpu(init_tss, cpu);
        unsigned long v; 
        char *estacks = NULL; 
@@ -214,7 +204,7 @@ void __cpuinit cpu_init (void)
 
        printk("Initializing CPU#%d\n", cpu);
 
-               clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
+       clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
 
        /*
         * Initialize the per-CPU GDT with the boot GDT,
index ccae392886af214cdb5c54f8dc261798ac0fe0b2..6ee74db523030fda5c038565d8082c6bbd0dffc2 100644 (file)
@@ -129,10 +129,9 @@ asmlinkage void smp_invalidate_interrupt (void)
                } else
                        leave_mm(cpu);
        }
+out:
        ack_APIC_irq();
        cpu_clear(cpu, flush_cpumask);
-
-out:
        put_cpu_no_resched();
 }
 
index e773a794ec459a9d018afa0346dfd3f90a659489..6d23354443c03225cb7248312ab71ef512b75439 100644 (file)
@@ -112,24 +112,6 @@ struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ;
 #define get_idle_for_cpu(x)     (idle_thread_array[(x)])
 #define set_idle_for_cpu(x,p)   (idle_thread_array[(x)] = (p))
 
-/*
- * 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.
- * If cpu-hotplug is supported, then we need to preallocate for all
- * those NR_CPUS, hence cpu_possible_map represents entire NR_CPUS range.
- * - Ashok Raj
- */
-#ifdef CONFIG_HOTPLUG_CPU
-#define fixup_cpu_possible_map(x)      cpu_set((x), cpu_possible_map)
-#else
-#define fixup_cpu_possible_map(x)
-#endif
-
 /*
  * Currently trivial. Write the real->protected mode
  * bootstrap into the page concerned. The caller
@@ -773,8 +755,9 @@ do_rest:
        initial_code = start_secondary;
        clear_ti_thread_flag(c_idle.idle->thread_info, TIF_FORK);
 
-       printk(KERN_INFO "Booting processor %d/%d rip %lx rsp %lx\n", cpu, apicid,
-              start_rip, init_rsp);
+       printk(KERN_INFO "Booting processor %d/%d APIC 0x%x\n", cpu,
+               cpus_weight(cpu_present_map),
+               apicid);
 
        /*
         * This grunge runs the startup process for
@@ -924,6 +907,27 @@ static __init void enforce_max_cpus(unsigned max_cpus)
        }
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
+/*
+ * 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.
+ * If cpu-hotplug is supported, then we need to preallocate for all
+ * those NR_CPUS, hence cpu_possible_map represents entire NR_CPUS range.
+ * - Ashok Raj
+ */
+static void prefill_possible_map(void)
+{
+       int i;
+       for (i = 0; i < NR_CPUS; i++)
+               cpu_set(i, cpu_possible_map);
+}
+#endif
+
 /*
  * Various sanity checks.
  */
@@ -987,25 +991,15 @@ static int __init smp_sanity_check(unsigned max_cpus)
  */
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
-       int i;
-
        nmi_watchdog_default();
        current_cpu_data = boot_cpu_data;
        current_thread_info()->cpu = 0;  /* needed? */
 
        enforce_max_cpus(max_cpus);
 
-       /*
-        * Fill in cpu_present_mask
-        */
-       for (i = 0; i < NR_CPUS; i++) {
-               int apicid = cpu_present_to_apicid(i);
-               if (physid_isset(apicid, phys_cpu_present_map)) {
-                       cpu_set(i, cpu_present_map);
-                       cpu_set(i, cpu_possible_map);
-               }
-               fixup_cpu_possible_map(i);
-       }
+#ifdef CONFIG_HOTPLUG_CPU
+       prefill_possible_map();
+#endif
 
        if (smp_sanity_check(max_cpus) < 0) {
                printk(KERN_INFO "SMP disabled\n");
@@ -1189,8 +1183,7 @@ void __cpu_die(unsigned int cpu)
                        printk ("CPU %d is now offline\n", cpu);
                        return;
                }
-               current->state = TASK_UNINTERRUPTIBLE;
-               schedule_timeout(HZ/10);
+               msleep(100);
        }
        printk(KERN_ERR "CPU %u didn't die...\n", cpu);
 }
index 1027366300022f8846f9bd9a573d0c528f4261e0..6ead433a38851783a915e1abd44269a69cd90d90 100644 (file)
@@ -594,9 +594,6 @@ asmlinkage void default_do_nmi(struct pt_regs *regs)
        if (!cpu)
                reason = get_nmi_reason();
 
-       if (!cpu_online(cpu))
-               return;
-
        if (!(reason & 0xc0)) {
                if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT)
                                                                == NOTIFY_STOP)
index 33a873a3c223f82416a9ed2ea239cc15c928a5bd..841bd738a189821c4046b85870d02f75ee4699e6 100644 (file)
@@ -18,8 +18,6 @@
 #include <asm/smp.h>
 #endif
 
-int x86_udelay_tsc = 0;                /* Delay via TSC */
-
 int read_current_timer(unsigned long *timer_value)
 {
        rdtscll(*timer_value);
index 2f187986f940b6e6bfe8f6a475b6658571d2cabe..13792721037e1692670732b49d7c92b6d39b68fa 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/vt_kern.h>             /* For unblank_screen() */
 #include <linux/compiler.h>
 #include <linux/module.h>
-#include <linux/kprobes.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
index ac61c186eb0218862f59e8638bef6ef918e11064..70cb2904a90f9dd8c9310bb368976bc67124d784 100644 (file)
@@ -36,34 +36,36 @@ int numa_off __initdata;
 int __init compute_hash_shift(struct node *nodes, int numnodes)
 {
        int i; 
-       int shift = 24;
-       u64 addr;
+       int shift = 20;
+       unsigned long addr,maxend=0;
        
-       /* When in doubt use brute force. */
-       while (shift < 48) { 
-               memset(memnodemap,0xff,sizeof(*memnodemap) * NODEMAPSIZE); 
-               for (i = 0; i < numnodes; i++) {
-                       if (nodes[i].start == nodes[i].end) 
-                               continue;
-                       for (addr = nodes[i].start; 
-                            addr < nodes[i].end; 
-                            addr += (1UL << shift)) {
-                               if (memnodemap[addr >> shift] != 0xff && 
-                                   memnodemap[addr >> shift] != i) { 
-                                       printk(KERN_INFO 
-                                           "node %d shift %d addr %Lx conflict %d\n", 
-                                              i, shift, addr, memnodemap[addr>>shift]);
-                                       goto next; 
-                               } 
-                               memnodemap[addr >> shift] = i; 
+       for (i = 0; i < numnodes; i++)
+               if ((nodes[i].start != nodes[i].end) && (nodes[i].end > maxend))
+                               maxend = nodes[i].end;
+
+       while ((1UL << shift) <  (maxend / NODEMAPSIZE))
+               shift++;
+
+       printk (KERN_DEBUG"Using %d for the hash shift. Max adder is %lx \n",
+                       shift,maxend);
+       memset(memnodemap,0xff,sizeof(*memnodemap) * NODEMAPSIZE);
+       for (i = 0; i < numnodes; i++) {
+               if (nodes[i].start == nodes[i].end)
+                       continue;
+               for (addr = nodes[i].start;
+                    addr < nodes[i].end;
+                    addr += (1UL << shift)) {
+                       if (memnodemap[addr >> shift] != 0xff) {
+                               printk(KERN_INFO
+       "Your memory is not aligned you need to rebuild your kernel "
+       "with a bigger NODEMAPSIZE shift=%d adder=%lu\n",
+                                       shift,addr);
+                               return -1;
                        } 
+                       memnodemap[addr >> shift] = i;
                } 
-               return shift; 
-       next:
-               shift++; 
        } 
-       memset(memnodemap,0,sizeof(*memnodemap) * NODEMAPSIZE); 
-       return -1; 
+       return shift;
 }
 
 #ifdef CONFIG_SPARSEMEM
index 5d01b31472e1f325a711894d9e402183b6388700..8e3d097a9ddddc5ef1c179cd24ae28a6d7902163 100644 (file)
@@ -20,6 +20,9 @@
 
 static struct acpi_table_slit *acpi_slit;
 
+/* Internal processor count */
+static unsigned int __initdata num_processors = 0;
+
 static nodemask_t nodes_parsed __initdata;
 static nodemask_t nodes_found __initdata;
 static struct node nodes[MAX_NUMNODES] __initdata;
@@ -101,16 +104,18 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
                bad_srat();
                return;
        }
-       if (pa->apic_id >= NR_CPUS) {
-               printk(KERN_ERR "SRAT: lapic %u too large.\n",
-                      pa->apic_id);
+       if (num_processors >= NR_CPUS) {
+               printk(KERN_ERR "SRAT: Processor #%d (lapic %u) INVALID. (Max ID: %d).\n",
+                       num_processors, pa->apic_id, NR_CPUS);
                bad_srat();
                return;
        }
-       cpu_to_node[pa->apic_id] = node;
+       cpu_to_node[num_processors] = node;
        acpi_numa = 1;
-       printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
-              pxm, pa->apic_id, node);
+       printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> CPU %u -> Node %u\n",
+              pxm, pa->apic_id, num_processors, node);
+
+       num_processors++;
 }
 
 /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
@@ -124,7 +129,6 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
 
        if (srat_disabled() || ma->flags.enabled == 0)
                return;
-       /* hotplug bit is ignored for now */
        pxm = ma->proximity_domain;
        node = setup_node(pxm);
        if (node < 0) {
@@ -134,6 +138,10 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
        }
        start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32);
        end = start + (ma->length_lo | ((u64)ma->length_hi << 32));
+       /* It is fine to add this area to the nodes data it will be used later*/
+       if (ma->flags.hot_pluggable == 1)
+               printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n",
+                               start, end);
        i = conflicting_nodes(start, end);
        if (i >= 0) {
                printk(KERN_ERR
index 7e7d0c2a0025bff7d2c73f28451d0adbb00969a5..c2c38b579939432627a006cb8b2307ca6b9cd6c1 100644 (file)
@@ -29,7 +29,7 @@ __init static int
 fill_mp_bus_to_cpumask(void)
 {
        struct pci_dev *nb_dev = NULL;
-       int i, j, printed;
+       int i, j;
        u32 ldtbus, nid;
        static int lbnr[3] = {
                LDT_BUS_NUMBER_REGISTER_0,
index a5a4c0ed8a143fb274d13dd3d9e56500d6fac098..a6d3baa46f6168e7f9143191abe22ffa5e2a65c2 100644 (file)
@@ -869,11 +869,17 @@ static void suspend_targets(struct dm_table *t, unsigned postsuspend)
 
 void dm_table_presuspend_targets(struct dm_table *t)
 {
+       if (!t)
+               return;
+
        return suspend_targets(t, 0);
 }
 
 void dm_table_postsuspend_targets(struct dm_table *t)
 {
+       if (!t)
+               return;
+
        return suspend_targets(t, 1);
 }
 
index 54fabbf06678d838407a11e203e2b2c7fea6fb33..d487d9deb98e1c04ddb4bc152e2a47d880c3332d 100644 (file)
@@ -55,10 +55,10 @@ union map_info *dm_get_mapinfo(struct bio *bio)
  */
 #define DMF_BLOCK_IO 0
 #define DMF_SUSPENDED 1
-#define DMF_FS_LOCKED 2
 
 struct mapped_device {
-       struct rw_semaphore lock;
+       struct rw_semaphore io_lock;
+       struct semaphore suspend_lock;
        rwlock_t map_lock;
        atomic_t holders;
 
@@ -248,16 +248,16 @@ static inline void free_tio(struct mapped_device *md, struct target_io *tio)
  */
 static int queue_io(struct mapped_device *md, struct bio *bio)
 {
-       down_write(&md->lock);
+       down_write(&md->io_lock);
 
        if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
-               up_write(&md->lock);
+               up_write(&md->io_lock);
                return 1;
        }
 
        bio_list_add(&md->deferred, bio);
 
-       up_write(&md->lock);
+       up_write(&md->io_lock);
        return 0;               /* deferred successfully */
 }
 
@@ -568,14 +568,14 @@ static int dm_request(request_queue_t *q, struct bio *bio)
        int r;
        struct mapped_device *md = q->queuedata;
 
-       down_read(&md->lock);
+       down_read(&md->io_lock);
 
        /*
         * If we're suspended we have to queue
         * this io for later.
         */
        while (test_bit(DMF_BLOCK_IO, &md->flags)) {
-               up_read(&md->lock);
+               up_read(&md->io_lock);
 
                if (bio_rw(bio) == READA) {
                        bio_io_error(bio, bio->bi_size);
@@ -594,11 +594,11 @@ static int dm_request(request_queue_t *q, struct bio *bio)
                 * We're in a while loop, because someone could suspend
                 * before we get to the following read lock.
                 */
-               down_read(&md->lock);
+               down_read(&md->io_lock);
        }
 
        __split_bio(md, bio);
-       up_read(&md->lock);
+       up_read(&md->io_lock);
        return 0;
 }
 
@@ -610,7 +610,7 @@ static int dm_flush_all(request_queue_t *q, struct gendisk *disk,
        int ret = -ENXIO;
 
        if (map) {
-               ret = dm_table_flush_all(md->map);
+               ret = dm_table_flush_all(map);
                dm_table_put(map);
        }
 
@@ -747,7 +747,8 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
                goto bad1;
 
        memset(md, 0, sizeof(*md));
-       init_rwsem(&md->lock);
+       init_rwsem(&md->io_lock);
+       init_MUTEX(&md->suspend_lock);
        rwlock_init(&md->map_lock);
        atomic_set(&md->holders, 1);
        atomic_set(&md->event_nr, 0);
@@ -825,18 +826,13 @@ static void event_callback(void *context)
        wake_up(&md->eventq);
 }
 
-static void __set_size(struct gendisk *disk, sector_t size)
+static void __set_size(struct mapped_device *md, sector_t size)
 {
-       struct block_device *bdev;
-
-       set_capacity(disk, size);
-       bdev = bdget_disk(disk, 0);
-       if (bdev) {
-               down(&bdev->bd_inode->i_sem);
-               i_size_write(bdev->bd_inode, (loff_t)size << SECTOR_SHIFT);
-               up(&bdev->bd_inode->i_sem);
-               bdput(bdev);
-       }
+       set_capacity(md->disk, size);
+
+       down(&md->frozen_bdev->bd_inode->i_sem);
+       i_size_write(md->frozen_bdev->bd_inode, (loff_t)size << SECTOR_SHIFT);
+       up(&md->frozen_bdev->bd_inode->i_sem);
 }
 
 static int __bind(struct mapped_device *md, struct dm_table *t)
@@ -845,17 +841,18 @@ static int __bind(struct mapped_device *md, struct dm_table *t)
        sector_t size;
 
        size = dm_table_get_size(t);
-       __set_size(md->disk, size);
+       __set_size(md, size);
        if (size == 0)
                return 0;
 
+       dm_table_get(t);
+       dm_table_event_callback(t, event_callback, md);
+
        write_lock(&md->map_lock);
        md->map = t;
+       dm_table_set_restrictions(t, q);
        write_unlock(&md->map_lock);
 
-       dm_table_get(t);
-       dm_table_event_callback(md->map, event_callback, md);
-       dm_table_set_restrictions(t, q);
        return 0;
 }
 
@@ -935,7 +932,7 @@ void dm_put(struct mapped_device *md)
        struct dm_table *map = dm_get_table(md);
 
        if (atomic_dec_and_test(&md->holders)) {
-               if (!test_bit(DMF_SUSPENDED, &md->flags) && map) {
+               if (!dm_suspended(md)) {
                        dm_table_presuspend_targets(map);
                        dm_table_postsuspend_targets(map);
                }
@@ -968,17 +965,17 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table)
 {
        int r = -EINVAL;
 
-       down_write(&md->lock);
+       down(&md->suspend_lock);
 
        /* device must be suspended */
-       if (!test_bit(DMF_SUSPENDED, &md->flags))
+       if (!dm_suspended(md))
                goto out;
 
        __unbind(md);
        r = __bind(md, table);
 
 out:
-       up_write(&md->lock);
+       up(&md->suspend_lock);
        return r;
 }
 
@@ -986,16 +983,13 @@ out:
  * Functions to lock and unlock any filesystem running on the
  * device.
  */
-static int __lock_fs(struct mapped_device *md)
+static int lock_fs(struct mapped_device *md)
 {
-       int error = -ENOMEM;
-
-       if (test_and_set_bit(DMF_FS_LOCKED, &md->flags))
-               return 0;
+       int r = -ENOMEM;
 
        md->frozen_bdev = bdget_disk(md->disk, 0);
        if (!md->frozen_bdev) {
-               DMWARN("bdget failed in __lock_fs");
+               DMWARN("bdget failed in lock_fs");
                goto out;
        }
 
@@ -1003,13 +997,13 @@ static int __lock_fs(struct mapped_device *md)
 
        md->frozen_sb = freeze_bdev(md->frozen_bdev);
        if (IS_ERR(md->frozen_sb)) {
-               error = PTR_ERR(md->frozen_sb);
+               r = PTR_ERR(md->frozen_sb);
                goto out_bdput;
        }
 
        /* don't bdput right now, we don't want the bdev
         * to go away while it is locked.  We'll bdput
-        * in __unlock_fs
+        * in unlock_fs
         */
        return 0;
 
@@ -1018,15 +1012,11 @@ out_bdput:
        md->frozen_sb = NULL;
        md->frozen_bdev = NULL;
 out:
-       clear_bit(DMF_FS_LOCKED, &md->flags);
-       return error;
+       return r;
 }
 
-static void __unlock_fs(struct mapped_device *md)
+static void unlock_fs(struct mapped_device *md)
 {
-       if (!test_and_clear_bit(DMF_FS_LOCKED, &md->flags))
-               return;
-
        thaw_bdev(md->frozen_bdev, md->frozen_sb);
        bdput(md->frozen_bdev);
 
@@ -1043,50 +1033,37 @@ static void __unlock_fs(struct mapped_device *md)
  */
 int dm_suspend(struct mapped_device *md)
 {
-       struct dm_table *map;
+       struct dm_table *map = NULL;
        DECLARE_WAITQUEUE(wait, current);
-       int error = -EINVAL;
+       int r = -EINVAL;
 
-       /* Flush I/O to the device. */
-       down_read(&md->lock);
-       if (test_bit(DMF_BLOCK_IO, &md->flags))
-               goto out_read_unlock;
+       down(&md->suspend_lock);
+
+       if (dm_suspended(md))
+               goto out;
 
        map = dm_get_table(md);
-       if (map)
-               /* This does not get reverted if there's an error later. */
-               dm_table_presuspend_targets(map);
 
-       error = __lock_fs(md);
-       if (error) {
-               dm_table_put(map);
-               goto out_read_unlock;
-       }
+       /* This does not get reverted if there's an error later. */
+       dm_table_presuspend_targets(map);
 
-       up_read(&md->lock);
+       /* Flush I/O to the device. */
+       r = lock_fs(md);
+       if (r)
+               goto out;
 
        /*
         * First we set the BLOCK_IO flag so no more ios will be mapped.
-        *
-        * If the flag is already set we know another thread is trying to
-        * suspend as well, so we leave the fs locked for this thread.
         */
-       error = -EINVAL;
-       down_write(&md->lock);
-       if (test_and_set_bit(DMF_BLOCK_IO, &md->flags)) {
-               if (map)
-                       dm_table_put(map);
-               goto out_write_unlock;
-       }
+       down_write(&md->io_lock);
+       set_bit(DMF_BLOCK_IO, &md->flags);
 
        add_wait_queue(&md->wait, &wait);
-       up_write(&md->lock);
+       up_write(&md->io_lock);
 
        /* unplug */
-       if (map) {
+       if (map)
                dm_table_unplug_all(map);
-               dm_table_put(map);
-       }
 
        /*
         * Then we wait for the already mapped ios to
@@ -1102,62 +1079,67 @@ int dm_suspend(struct mapped_device *md)
        }
        set_current_state(TASK_RUNNING);
 
-       down_write(&md->lock);
+       down_write(&md->io_lock);
        remove_wait_queue(&md->wait, &wait);
 
        /* were we interrupted ? */
-       error = -EINTR;
-       if (atomic_read(&md->pending))
-               goto out_unfreeze;
-
-       set_bit(DMF_SUSPENDED, &md->flags);
+       r = -EINTR;
+       if (atomic_read(&md->pending)) {
+               up_write(&md->io_lock);
+               unlock_fs(md);
+               clear_bit(DMF_BLOCK_IO, &md->flags);
+               goto out;
+       }
+       up_write(&md->io_lock);
 
-       map = dm_get_table(md);
-       if (map)
-               dm_table_postsuspend_targets(map);
-       dm_table_put(map);
-       up_write(&md->lock);
+       dm_table_postsuspend_targets(map);
 
-       return 0;
+       set_bit(DMF_SUSPENDED, &md->flags);
 
-out_unfreeze:
-       __unlock_fs(md);
-       clear_bit(DMF_BLOCK_IO, &md->flags);
-out_write_unlock:
-       up_write(&md->lock);
-       return error;
+       r = 0;
 
-out_read_unlock:
-       up_read(&md->lock);
-       return error;
+out:
+       dm_table_put(map);
+       up(&md->suspend_lock);
+       return r;
 }
 
 int dm_resume(struct mapped_device *md)
 {
+       int r = -EINVAL;
        struct bio *def;
-       struct dm_table *map = dm_get_table(md);
+       struct dm_table *map = NULL;
 
-       down_write(&md->lock);
-       if (!map ||
-           !test_bit(DMF_SUSPENDED, &md->flags) ||
-           !dm_table_get_size(map)) {
-               up_write(&md->lock);
-               dm_table_put(map);
-               return -EINVAL;
-       }
+       down(&md->suspend_lock);
+       if (!dm_suspended(md))
+               goto out;
+
+       map = dm_get_table(md);
+       if (!map || !dm_table_get_size(map))
+               goto out;
 
        dm_table_resume_targets(map);
-       clear_bit(DMF_SUSPENDED, &md->flags);
+
+       down_write(&md->io_lock);
        clear_bit(DMF_BLOCK_IO, &md->flags);
 
        def = bio_list_get(&md->deferred);
        __flush_deferred_io(md, def);
-       up_write(&md->lock);
-       __unlock_fs(md);
+       up_write(&md->io_lock);
+
+       unlock_fs(md);
+
+       clear_bit(DMF_SUSPENDED, &md->flags);
+
        dm_table_unplug_all(map);
+
+       r = 0;
+
+out:
        dm_table_put(map);
+       up(&md->suspend_lock);
 
-       return 0;
+       return r;
 }
 
 /*-----------------------------------------------------------------
index 63b505cce4ec084d84967a3609520de0e5a32fa8..ed1d4d1ac4f709bed6172bb827cb892c369311d2 100644 (file)
@@ -244,15 +244,15 @@ static ssize_t show_virtual(struct class_device *class_device, char *buf)
 
 /* Format for cmap is "%02x%c%4x%4x%4x\n" */
 /* %02x entry %c transp %4x red %4x blue %4x green \n */
-/* 255 rows at 16 chars equals 4096 */
-/* PAGE_SIZE can be 4096 or larger */
+/* 256 rows at 16 chars equals 4096, the normal page size */
+/* the code will automatically adjust for different page sizes */
 static ssize_t store_cmap(struct class_device *class_device, const char *buf,
                          size_t count)
 {
        struct fb_info *fb_info = (struct fb_info *)class_get_devdata(class_device);
        int rc, i, start, length, transp = 0;
 
-       if ((count > 4096) || ((count % 16) != 0) || (PAGE_SIZE < 4096))
+       if ((count > PAGE_SIZE) || ((count % 16) != 0))
                return -EINVAL;
 
        if (!fb_info->fbops->fb_setcolreg && !fb_info->fbops->fb_setcmap)
@@ -317,18 +317,18 @@ static ssize_t show_cmap(struct class_device *class_device, char *buf)
           !fb_info->cmap.green)
                return -EINVAL;
 
-       if (PAGE_SIZE < 4096)
+       if (fb_info->cmap.len > PAGE_SIZE / 16)
                return -EINVAL;
 
        /* don't mess with the format, the buffer is PAGE_SIZE */
-       /* 255 entries at 16 chars per line equals 4096 = PAGE_SIZE */
+       /* 256 entries at 16 chars per line equals 4096 = PAGE_SIZE */
        for (i = 0; i < fb_info->cmap.len; i++) {
-               sprintf(&buf[ i * 16], "%02x%c%4x%4x%4x\n", i + fb_info->cmap.start,
+               snprintf(&buf[ i * 16], PAGE_SIZE - i * 16, "%02x%c%4x%4x%4x\n", i + fb_info->cmap.start,
                        ((fb_info->cmap.transp && fb_info->cmap.transp[i]) ? '*' : ' '),
                        fb_info->cmap.red[i], fb_info->cmap.blue[i],
                        fb_info->cmap.green[i]);
        }
-       return 4096;
+       return 16 * fb_info->cmap.len;
 }
 
 static ssize_t store_blank(struct class_device *class_device, const char * buf,
index c1516d013bf63719b12c10959751d4fa0b9b1b97..67bca0d4a33ba5977a94c6a3d71b636010ac67a7 100644 (file)
@@ -69,6 +69,7 @@ extern int read_file(int fd, unsigned long long *offset, char *buf, int len);
 extern int write_file(int fd, unsigned long long *offset, const char *buf,
                      int len);
 extern int lseek_file(int fd, long long offset, int whence);
+extern int fsync_file(int fd, int datasync);
 extern int file_create(char *name, int ur, int uw, int ux, int gr,
                       int gw, int gx, int or, int ow, int ox);
 extern int set_attr(const char *file, struct hostfs_iattr *attrs);
index 88e68caa378467192109254f389febfb47ec725f..b2d18200a003f0feb8cdd41fb7ad9cb0ed18dc15 100644 (file)
@@ -382,7 +382,7 @@ int hostfs_file_open(struct inode *ino, struct file *file)
 
 int hostfs_fsync(struct file *file, struct dentry *dentry, int datasync)
 {
-       return(0);
+       return fsync_file(HOSTFS_I(dentry->d_inode)->fd, datasync);
 }
 
 static struct file_operations hostfs_file_fops = {
index 4796e8490f7d47705e1a1401ba2e4f77f2e38fb7..b97809deba66ce63e2644bf698fdc0ac851fe1bf 100644 (file)
@@ -153,10 +153,24 @@ int lseek_file(int fd, long long offset, int whence)
        int ret;
 
        ret = lseek64(fd, offset, whence);
-       if(ret < 0) return(-errno);
+       if(ret < 0)
+               return(-errno);
        return(0);
 }
 
+int fsync_file(int fd, int datasync)
+{
+       int ret;
+       if (datasync)
+               ret = fdatasync(fd);
+       else
+               ret = fsync(fd);
+
+       if (ret < 0)
+               return -errno;
+       return 0;
+}
+
 void close_file(void *stream)
 {
        close(*((int *) stream));
index 195ccdc069e6c229dc22024a9d96d0b790f07735..450eae22c39a3e2a517dea059a7e3b01bb7ce6d6 100644 (file)
@@ -11,5 +11,6 @@ extern char _sinittext[], _einittext[];
 extern char _sextratext[] __attribute__((weak));
 extern char _eextratext[] __attribute__((weak));
 extern char _end[];
+extern char __per_cpu_start[], __per_cpu_end[];
 
 #endif /* _ASM_GENERIC_SECTIONS_H_ */
index edad9b4712fafe5ffbc9fed0cd1d075bf6cc1a79..a283738b80b30bbc9defb338b16c4f70971d7ffc 100644 (file)
@@ -37,9 +37,6 @@ extern int smp_num_siblings;
 extern cpumask_t cpu_sibling_map[];
 extern cpumask_t cpu_core_map[];
 
-extern void smp_flush_tlb(void);
-extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
-extern void smp_invalidate_rcv(void);          /* Process an NMI */
 extern void (*mtrr_hook) (void);
 extern void zap_low_mappings (void);
 extern void lock_ipi_call_lock(void);
diff --git a/include/asm-um/vm86.h b/include/asm-um/vm86.h
new file mode 100644 (file)
index 0000000..7801f82
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef __UM_VM86_H
+#define __UM_VM86_H
+
+#include "asm/arch/vm86.h"
+
+#endif
index a31bb99be53ff0dfc531cb1ac0e849c43062466c..05a0d374404b0fb5ae24cfff181f6cf77aec6a75 100644 (file)
@@ -348,8 +348,7 @@ static inline int sched_find_first_bit(const unsigned long *b)
                return __ffs(b[0]);
        if (b[1])
                return __ffs(b[1]) + 64;
-       if (b[2])
-               return __ffs(b[2]) + 128;
+       return __ffs(b[2]) + 128;
 }
 
 /**
index 3d2a666a5dd536f95239f2637c1ee87c4bb48376..eed785667289fa34b0e287ba7240db98ab9866d3 100644 (file)
@@ -8,17 +8,24 @@
  * this frame.
  */
 struct bug_frame {
-       unsigned char ud2[2];
+       unsigned char ud2[2];
+       unsigned char mov;
        /* should use 32bit offset instead, but the assembler doesn't 
           like it */
        char *filename;
+       unsigned char ret;
        unsigned short line;
 } __attribute__((packed));
 
 #ifdef CONFIG_BUG
 #define HAVE_ARCH_BUG
-#define BUG() \
-       asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \
+/* We turn the bug frame into valid instructions to not confuse
+   the disassembler. Thanks to Jan Beulich & Suresh Siddha
+   for nice instruction selection.
+   The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
+#define BUG()                                                          \
+       asm volatile(                                                   \
+       "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" ::     \
                     "i"(__LINE__), "i" (__stringify(__FILE__)))
 void out_of_line_bug(void);
 #else
index 6aefb9c0280d5d82c1c58592d0f7cb31207840d0..c89b58bebee24619f9ae2b5ad903b752f5e1ec12 100644 (file)
@@ -75,6 +75,7 @@ struct desc_ptr {
  */
 extern struct desc_struct default_ldt[];
 extern struct gate_struct idt_table[]; 
+extern struct desc_ptr cpu_gdt_descr[];
 
 static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist)  
 {
index d1841847ed899990d0d8cc7215c2bb39ec4358ef..5e166b9d3bdeb766cb406eaeea764ef9402fb47d 100644 (file)
@@ -82,30 +82,27 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
         */
        local_irq_save(flags);
 
-       for (query_cpu = 0; query_cpu < NR_CPUS; ++query_cpu) {
-               if (cpu_isset(query_cpu, mask)) {
-
-                       /*
-                        * Wait for idle.
-                        */
-                       apic_wait_icr_idle();
-
-                       /*
-                        * prepare target chip field
-                        */
-                       cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]);
-                       apic_write_around(APIC_ICR2, cfg);
-
-                       /*
-                        * program the ICR
-                        */
-                       cfg = __prepare_ICR(0, vector, APIC_DEST_PHYSICAL);
-
-                       /*
-                        * Send the IPI. The write to APIC_ICR fires this off.
-                        */
-                       apic_write_around(APIC_ICR, cfg);
-               }
+       for_each_cpu_mask(query_cpu, mask) {
+               /*
+                * Wait for idle.
+                */
+               apic_wait_icr_idle();
+
+               /*
+                * prepare target chip field
+                */
+               cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]);
+               apic_write_around(APIC_ICR2, cfg);
+
+               /*
+                * program the ICR
+                */
+               cfg = __prepare_ICR(0, vector, APIC_DEST_PHYSICAL);
+
+               /*
+                * Send the IPI. The write to APIC_ICR fires this off.
+                */
+               apic_write_around(APIC_ICR, cfg);
        }
        local_irq_restore(flags);
 }
index eb3b7aa9eb9f2c4ea0bc34b6a72522a36a8a1041..4482657777bbdbe2a576c3d073ac39eab113dada 100644 (file)
@@ -57,4 +57,6 @@ int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
 extern void fixup_irqs(cpumask_t map);
 #endif
 
+#define __ARCH_HAS_DO_SOFTIRQ 1
+
 #endif /* _ASM_IRQ_H */
index bc700232728d8c2c754fc7aebdaf9b745eee95a1..ba15279a79d02f826e2c8d79f58d14d50671bfdf 100644 (file)
@@ -218,7 +218,7 @@ extern inline unsigned int cpuid_edx(unsigned int op)
 #define MSR_K7_PERFCTR3            0xC0010007
 #define MSR_K8_TOP_MEM1                   0xC001001A
 #define MSR_K8_TOP_MEM2                   0xC001001D
-#define MSR_K8_SYSCFG             0xC0000010   
+#define MSR_K8_SYSCFG             0xC0010010
 
 /* K6 MSRs */
 #define MSR_K6_EFER                    0xC0000080
index aeb1b73e21e117eb24a5ea341bdc2e1f80eb3774..18ac762e1ab8e3411626ca54e59af82182b15632 100644 (file)
@@ -46,10 +46,7 @@ extern int pic_mode;
 extern void lock_ipi_call_lock(void);
 extern void unlock_ipi_call_lock(void);
 extern int smp_num_siblings;
-extern void smp_flush_tlb(void);
-extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
 extern void smp_send_reschedule(int cpu);
-extern void smp_invalidate_rcv(void);          /* Process an NMI */
 extern void zap_low_mappings(void);
 void smp_stop_cpu(void);
 extern cpumask_t cpu_sibling_map[NR_CPUS];
index 76165736e43a8c1b913c11ab224c907efe351577..8606e170a7dc825c40d10d4101a2c721ff20f536 100644 (file)
@@ -116,12 +116,12 @@ struct alt_instr {
 /*
  * Alternative inline assembly with input.
  * 
- * Pecularities:
+ * Peculiarities:
  * No memory clobber here. 
  * Argument numbers start with 1.
  * Best is to use constraints that are fixed size (like (%1) ... "r")
  * If you use variable sized constraints like "m" or "g" in the 
- * replacement maake sure to pad to the worst case length.
+ * replacement make sure to pad to the worst case length.
  */
 #define alternative_input(oldinstr, newinstr, feature, input...)       \
        asm volatile ("661:\n\t" oldinstr "\n662:\n"                    \
@@ -335,9 +335,6 @@ void cpu_idle_wait(void);
 void disable_hlt(void);
 void enable_hlt(void);
 
-#define HAVE_EAT_KEY
-void eat_key(void);
-
 extern unsigned long arch_align_stack(unsigned long sp);
 
 #endif
index 061742382520ecfe4cf416a5be91cba6b8b51f18..505b0cf906ded2658ff91da72b9d51e54e80adcc 100644 (file)
@@ -56,8 +56,9 @@ extern unsigned long pgkern_mask;
  *  - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
  *  - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
  *
- * ..but the x86_64 has somewhat limited tlb flushing capabilities,
- * and page-granular flushes are available only on i486 and up.
+ * x86-64 can only flush individual pages or full VMs. For a range flush
+ * we always do the full VM. Might be worth trying if for a small
+ * range a few INVLPGs in a row are a win.
  */
 
 #ifndef CONFIG_SMP
@@ -115,7 +116,9 @@ static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long st
 static inline void flush_tlb_pgtables(struct mm_struct *mm,
                                      unsigned long start, unsigned long end)
 {
-       /* x86_64 does not keep any page table caches in TLB */
+       /* x86_64 does not keep any page table caches in a software TLB.
+          The CPUs do in their hardware TLBs, but they are handled
+          by the normal TLB flushing algorithms. */
 }
 
 #endif /* _X8664_TLBFLUSH_H */
index b5e421e39ede7ec40d61da8345e8115a749dc0df..c9c311cf1771362a349c177e5662140640370e36 100644 (file)
@@ -51,6 +51,7 @@
 #include <asm/io.h>
 #include <asm/bugs.h>
 #include <asm/setup.h>
+#include <asm/sections.h>
 
 /*
  * This is one of the first .c files built. Error out early
@@ -323,8 +324,6 @@ static void __init setup_per_cpu_areas(void)
 {
        unsigned long size, i;
        char *ptr;
-       /* Created by linker magic */
-       extern char __per_cpu_start[], __per_cpu_end[];
 
        /* Copy section for each CPU (we discard the original) */
        size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
index 5b7b4736d82b6afc50c3f5f7028e8c6f69645de6..10b2ad749d146de67f2e210adb5a4fb4846ba8c5 100644 (file)
@@ -896,21 +896,10 @@ static int adjust_abs_time(struct k_clock *clock, struct timespec *tp,
                        jiffies_64_f = get_jiffies_64();
                }
                /*
-                * Take away now to get delta
+                * Take away now to get delta and normalize
                 */
-               oc.tv_sec -= now.tv_sec;
-               oc.tv_nsec -= now.tv_nsec;
-               /*
-                * Normalize...
-                */
-               while ((oc.tv_nsec - NSEC_PER_SEC) >= 0) {
-                       oc.tv_nsec -= NSEC_PER_SEC;
-                       oc.tv_sec++;
-               }
-               while ((oc.tv_nsec) < 0) {
-                       oc.tv_nsec += NSEC_PER_SEC;
-                       oc.tv_sec--;
-               }
+               set_normalized_timespec(&oc, oc.tv_sec - now.tv_sec,
+                                       oc.tv_nsec - now.tv_nsec);
        }else{
                jiffies_64_f = get_jiffies_64();
        }
index b4ab6af1dea8513147c19694a8eff8a4353c69e0..31007d6542cccbf6c4df2607a848802d13b5fd63 100644 (file)
@@ -86,7 +86,7 @@ restart:
        /* Reset the pending bitmask before enabling irqs */
        local_softirq_pending() = 0;
 
-       local_irq_enable();
+       //local_irq_enable();
 
        h = softirq_vec;
 
@@ -99,7 +99,7 @@ restart:
                pending >>= 1;
        } while (pending);
 
-       local_irq_disable();
+       //local_irq_disable();
 
        pending = local_softirq_pending();
        if (pending && --max_restart)
index ad6b120438748e1604c6c2115e4d08218538a55d..9f5aabd58fa96cdb86220a4fe322855d8194f6e1 100644 (file)
@@ -178,17 +178,31 @@ const char *dbg_print_ptype(int val)
 }
 
 
-/* Main Window Initialization */
+void replace_button_icon(GladeXML * xml, GdkDrawable * window,
+                        GtkStyle * style, gchar * btn_name, gchar ** xpm)
+{
+       GdkPixmap *pixmap;
+       GdkBitmap *mask;
+       GtkToolButton *button;
+       GtkWidget *image;
 
+       pixmap = gdk_pixmap_create_from_xpm_d(window, &mask,
+                                             &style->bg[GTK_STATE_NORMAL],
+                                             xpm);
+
+       button = GTK_TOOL_BUTTON(glade_xml_get_widget(xml, btn_name));
+       image = gtk_image_new_from_pixmap(pixmap, mask);
+       gtk_widget_show(image);
+       gtk_tool_button_set_icon_widget(button, image);
+}
 
+/* Main Window Initialization */
 void init_main_window(const gchar * glade_file)
 {
        GladeXML *xml;
        GtkWidget *widget;
        GtkTextBuffer *txtbuf;
        char title[256];
-       GdkPixmap *pixmap;
-       GdkBitmap *mask;
        GtkStyle *style;
 
        xml = glade_xml_new(glade_file, "window1", NULL);
@@ -221,36 +235,22 @@ void init_main_window(const gchar * glade_file)
        style = gtk_widget_get_style(main_wnd);
        widget = glade_xml_get_widget(xml, "toolbar1");
 
-       pixmap = gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,
-                                             &style->bg[GTK_STATE_NORMAL],
-                                             (gchar **) xpm_single_view);
-       gtk_image_set_from_pixmap(GTK_IMAGE
-                                 (((GtkToolbarChild
-                                    *) (g_list_nth(GTK_TOOLBAR(widget)->
-                                                   children,
-                                                   5)->data))->icon),
-                                 pixmap, mask);
-       pixmap =
-           gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,
-                                        &style->bg[GTK_STATE_NORMAL],
-                                        (gchar **) xpm_split_view);
-       gtk_image_set_from_pixmap(GTK_IMAGE
-                                 (((GtkToolbarChild
-                                    *) (g_list_nth(GTK_TOOLBAR(widget)->
-                                                   children,
-                                                   6)->data))->icon),
-                                 pixmap, mask);
-       pixmap =
-           gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask,
-                                        &style->bg[GTK_STATE_NORMAL],
-                                        (gchar **) xpm_tree_view);
-       gtk_image_set_from_pixmap(GTK_IMAGE
-                                 (((GtkToolbarChild
-                                    *) (g_list_nth(GTK_TOOLBAR(widget)->
-                                                   children,
-                                                   7)->data))->icon),
-                                 pixmap, mask);
-
+#if 0  /* Use stock Gtk icons instead */
+       replace_button_icon(xml, main_wnd->window, style,
+                           "button1", (gchar **) xpm_back);
+       replace_button_icon(xml, main_wnd->window, style,
+                           "button2", (gchar **) xpm_load);
+       replace_button_icon(xml, main_wnd->window, style,
+                           "button3", (gchar **) xpm_save);
+#endif
+       replace_button_icon(xml, main_wnd->window, style,
+                           "button4", (gchar **) xpm_single_view);
+       replace_button_icon(xml, main_wnd->window, style,
+                           "button5", (gchar **) xpm_split_view);
+       replace_button_icon(xml, main_wnd->window, style,
+                           "button6", (gchar **) xpm_tree_view);
+
+#if 0
        switch (view_mode) {
        case SINGLE_VIEW:
                widget = glade_xml_get_widget(xml, "button4");
@@ -265,7 +265,7 @@ void init_main_window(const gchar * glade_file)
                g_signal_emit_by_name(widget, "clicked");
                break;
        }
-
+#endif
        txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
        tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1",
                                          "foreground", "red",
@@ -322,7 +322,7 @@ void init_left_tree(void)
        gtk_tree_view_set_model(view, model1);
        gtk_tree_view_set_headers_visible(view, TRUE);
        gtk_tree_view_set_rules_hint(view, FALSE);
-       
+
        column = gtk_tree_view_column_new();
        gtk_tree_view_append_column(view, column);
        gtk_tree_view_column_set_title(column, _("Options"));
@@ -334,11 +334,11 @@ void init_left_tree(void)
                                            renderer,
                                            "active", COL_BTNACT,
                                            "inconsistent", COL_BTNINC,
-                                           "visible", COL_BTNVIS, 
+                                           "visible", COL_BTNVIS,
                                            "radio", COL_BTNRAD, NULL);
        renderer = gtk_cell_renderer_text_new();
        gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
-                                       renderer, FALSE);       
+                                       renderer, FALSE);
        gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
                                            renderer,
                                            "text", COL_OPTION,
@@ -386,7 +386,7 @@ void init_right_tree(void)
                                            renderer,
                                            "active", COL_BTNACT,
                                            "inconsistent", COL_BTNINC,
-                                           "visible", COL_BTNVIS, 
+                                           "visible", COL_BTNVIS,
                                            "radio", COL_BTNRAD, NULL);
        /*g_signal_connect(G_OBJECT(renderer), "toggled",
           G_CALLBACK(renderer_toggled), NULL); */
@@ -806,7 +806,7 @@ void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
 }
 
 
-void on_back_pressed(GtkButton * button, gpointer user_data)
+void on_back_clicked(GtkButton * button, gpointer user_data)
 {
        enum prop_type ptype;
 
@@ -821,13 +821,13 @@ void on_back_pressed(GtkButton * button, gpointer user_data)
 }
 
 
-void on_load_pressed(GtkButton * button, gpointer user_data)
+void on_load_clicked(GtkButton * button, gpointer user_data)
 {
        on_load1_activate(NULL, user_data);
 }
 
 
-void on_save_pressed(GtkButton * button, gpointer user_data)
+void on_save_clicked(GtkButton * button, gpointer user_data)
 {
        on_save1_activate(NULL, user_data);
 }
@@ -850,9 +850,12 @@ void on_split_clicked(GtkButton * button, gpointer user_data)
        gtk_widget_show(tree1_w);
        gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
        gtk_paned_set_position(GTK_PANED(hpaned), w / 2);
-       if (tree2)      
+       if (tree2)
                gtk_tree_store_clear(tree2);
        display_list();
+
+       /* Disable back btn, like in full mode. */
+       gtk_widget_set_sensitive(back_btn, FALSE);
 }
 
 
@@ -868,13 +871,13 @@ void on_full_clicked(GtkButton * button, gpointer user_data)
 }
 
 
-void on_collapse_pressed(GtkButton * button, gpointer user_data)
+void on_collapse_clicked(GtkButton * button, gpointer user_data)
 {
        gtk_tree_view_collapse_all(GTK_TREE_VIEW(tree2_w));
 }
 
 
-void on_expand_pressed(GtkButton * button, gpointer user_data)
+void on_expand_clicked(GtkButton * button, gpointer user_data)
 {
        gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w));
 }
@@ -1242,13 +1245,13 @@ static gchar **fill_row(struct menu *menu)
                        row[COL_VALUE] =
                            g_strdup(menu_get_prompt(def_menu));
        }
-       if(sym->flags & SYMBOL_CHOICEVAL)
+       if (sym->flags & SYMBOL_CHOICEVAL)
                row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);
 
        stype = sym_get_type(sym);
        switch (stype) {
        case S_BOOLEAN:
-               if(GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE)
+               if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE)
                        row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
                if (sym_is_choice(sym))
                        break;
@@ -1423,7 +1426,7 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
                                                                 child2);
                                gtk_tree_store_remove(tree2, &tmp);
                                if (!valid)
-                                       return; // next parent 
+                                       return; // next parent
                                else
                                        goto reparse;   // next child
                        } else
@@ -1448,7 +1451,7 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
                                                                 child2);
                                gtk_tree_store_remove(tree2, &tmp);
                                if (!valid)
-                                       return; // next parent 
+                                       return; // next parent
                                else
                                        goto reparse;   // next child
                        }
@@ -1486,12 +1489,12 @@ static void display_tree(struct menu *menu)
                if (sym)
                        sym->flags &= ~SYMBOL_CHANGED;
 
-               if ((view_mode == SPLIT_VIEW) && !(child->flags & MENU_ROOT) &&
-                   (tree == tree1))
+               if ((view_mode == SPLIT_VIEW)
+                   && !(child->flags & MENU_ROOT) && (tree == tree1))
                        continue;
 
-               if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT) &&
-                   (tree == tree2))
+               if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT)
+                   && (tree == tree2))
                        continue;
 
                if (menu_is_visible(child) || show_all)
@@ -1513,11 +1516,12 @@ static void display_tree(struct menu *menu)
                    && (tree == tree2))
                        continue;
 /*
-               if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) ||
-                   (view_mode == FULL_VIEW)
+                if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
+                   || (view_mode == FULL_VIEW)
                    || (view_mode == SPLIT_VIEW))*/
                if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
-                   || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW)) {
+                   || (view_mode == FULL_VIEW)
+                   || (view_mode == SPLIT_VIEW)) {
                        indent++;
                        display_tree(child);
                        indent--;
@@ -1530,9 +1534,9 @@ static void display_tree_part(void)
 {
        if (tree2)
                gtk_tree_store_clear(tree2);
-       if(view_mode == SINGLE_VIEW)
+       if (view_mode == SINGLE_VIEW)
                display_tree(current);
-       else if(view_mode == SPLIT_VIEW)
+       else if (view_mode == SPLIT_VIEW)
                display_tree(browsed);
        gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w));
 }
@@ -1551,24 +1555,22 @@ static void display_list(void)
 
 void fixup_rootmenu(struct menu *menu)
 {
-        struct menu *child;
-        static int menu_cnt = 0;
-
-        menu->flags |= MENU_ROOT;
-        for (child = menu->list; child; child = child->next) {
-                if (child->prompt && child->prompt->type == P_MENU) {
-                        menu_cnt++;
-                        fixup_rootmenu(child);
-                        menu_cnt--;
-                } else if (!menu_cnt)
-                        fixup_rootmenu(child);
-        }
+       struct menu *child;
+       static int menu_cnt = 0;
+
+       menu->flags |= MENU_ROOT;
+       for (child = menu->list; child; child = child->next) {
+               if (child->prompt && child->prompt->type == P_MENU) {
+                       menu_cnt++;
+                       fixup_rootmenu(child);
+                       menu_cnt--;
+               } else if (!menu_cnt)
+                       fixup_rootmenu(child);
+       }
 }
 
 
 /* Main */
-
-
 int main(int ac, char *av[])
 {
        const char *name;
index ace4706ab251a405fe793936e1c07e9b1ded266c..f8744ed64967add665e453ee721174e4a9c2ccb3 100644 (file)
   <property name="default_height">480</property>
   <property name="resizable">True</property>
   <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <signal name="destroy" handler="on_window1_destroy" object="window1"/>
   <signal name="size_request" handler="on_window1_size_request" object="vpaned1" last_modification_time="Fri, 11 Jan 2002 16:17:11 GMT"/>
   <signal name="delete_event" handler="on_window1_delete_event" object="window1" last_modification_time="Sun, 09 Mar 2003 19:42:46 GMT"/>
@@ -46,7 +51,7 @@
                      <accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image27">
+                       <widget class="GtkImage" id="image39">
                          <property name="visible">True</property>
                          <property name="stock">gtk-open</property>
                          <property name="icon_size">1</property>
@@ -69,7 +74,7 @@
                      <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image28">
+                       <widget class="GtkImage" id="image40">
                          <property name="visible">True</property>
                          <property name="stock">gtk-save</property>
                          <property name="icon_size">1</property>
@@ -91,7 +96,7 @@
                      <signal name="activate" handler="on_save_as1_activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image29">
+                       <widget class="GtkImage" id="image41">
                          <property name="visible">True</property>
                          <property name="stock">gtk-save-as</property>
                          <property name="icon_size">1</property>
                  </child>
 
                  <child>
-                   <widget class="GtkMenuItem" id="separator1">
+                   <widget class="GtkSeparatorMenuItem" id="separator1">
                      <property name="visible">True</property>
                    </widget>
                  </child>
                      <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image30">
+                       <widget class="GtkImage" id="image42">
                          <property name="visible">True</property>
                          <property name="stock">gtk-quit</property>
                          <property name="icon_size">1</property>
                  </child>
 
                  <child>
-                   <widget class="GtkMenuItem" id="separator2">
+                   <widget class="GtkSeparatorMenuItem" id="separator2">
                      <property name="visible">True</property>
                    </widget>
                  </child>
                      <accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image31">
+                       <widget class="GtkImage" id="image43">
                          <property name="visible">True</property>
                          <property name="stock">gtk-dialog-question</property>
                          <property name="icon_size">1</property>
                      <accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image32">
+                       <widget class="GtkImage" id="image44">
                          <property name="visible">True</property>
                          <property name="stock">gtk-properties</property>
                          <property name="icon_size">1</property>
                      <signal name="activate" handler="on_license1_activate" last_modification_time="Fri, 15 Nov 2002 20:26:30 GMT"/>
 
                      <child internal-child="image">
-                       <widget class="GtkImage" id="image33">
+                       <widget class="GtkImage" id="image45">
                          <property name="visible">True</property>
                          <property name="stock">gtk-justify-fill</property>
                          <property name="icon_size">1</property>
              <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
              <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
              <property name="tooltips">True</property>
+             <property name="show_arrow">True</property>
 
              <child>
-               <widget class="button" id="button1">
+               <widget class="GtkToolButton" id="button1">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Goes up of one level (single view)</property>
                  <property name="label" translatable="yes">Back</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-undo</property>
-                 <signal name="pressed" handler="on_back_pressed"/>
+                 <property name="stock_id">gtk-undo</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_back_clicked"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="GtkVSeparator" id="vseparator1">
+               <widget class="GtkToolItem" id="toolitem1">
                  <property name="visible">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+
+                 <child>
+                   <widget class="GtkVSeparator" id="vseparator1">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button2">
+               <widget class="GtkToolButton" id="button2">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Load a config file</property>
                  <property name="label" translatable="yes">Load</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-open</property>
-                 <signal name="pressed" handler="on_load_pressed"/>
+                 <property name="stock_id">gtk-open</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_load_clicked"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button3">
+               <widget class="GtkToolButton" id="button3">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Save a config file</property>
                  <property name="label" translatable="yes">Save</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-save</property>
-                 <signal name="pressed" handler="on_save_pressed"/>
+                 <property name="stock_id">gtk-save</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_save_clicked"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="GtkVSeparator" id="vseparator2">
+               <widget class="GtkToolItem" id="toolitem2">
                  <property name="visible">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+
+                 <child>
+                   <widget class="GtkVSeparator" id="vseparator2">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button4">
+               <widget class="GtkToolButton" id="button4">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Single view</property>
                  <property name="label" translatable="yes">Single</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-missing-image</property>
+                 <property name="stock_id">gtk-missing-image</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                  <signal name="clicked" handler="on_single_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:39 GMT"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button5">
+               <widget class="GtkToolButton" id="button5">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Split view</property>
                  <property name="label" translatable="yes">Split</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-missing-image</property>
+                 <property name="stock_id">gtk-missing-image</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                  <signal name="clicked" handler="on_split_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:45 GMT"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button6">
+               <widget class="GtkToolButton" id="button6">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Full view</property>
                  <property name="label" translatable="yes">Full</property>
                  <property name="use_underline">True</property>
-                 <property name="stock_pixmap">gtk-missing-image</property>
+                 <property name="stock_id">gtk-missing-image</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
                  <signal name="clicked" handler="on_full_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:50 GMT"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="GtkVSeparator" id="vseparator3">
+               <widget class="GtkToolItem" id="toolitem3">
                  <property name="visible">True</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+
+                 <child>
+                   <widget class="GtkVSeparator" id="vseparator3">
+                     <property name="visible">True</property>
+                   </widget>
+                 </child>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">False</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button7">
+               <widget class="GtkToolButton" id="button7">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Collapse the whole tree in the right frame</property>
                  <property name="label" translatable="yes">Collapse</property>
                  <property name="use_underline">True</property>
-                 <signal name="pressed" handler="on_collapse_pressed"/>
+                 <property name="stock_id">gtk-remove</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_collapse_clicked"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
 
              <child>
-               <widget class="button" id="button8">
+               <widget class="GtkToolButton" id="button8">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Expand the whole tree in the right frame</property>
                  <property name="label" translatable="yes">Expand</property>
                  <property name="use_underline">True</property>
-                 <signal name="pressed" handler="on_expand_pressed"/>
+                 <property name="stock_id">gtk-add</property>
+                 <property name="visible_horizontal">True</property>
+                 <property name="visible_vertical">True</property>
+                 <property name="is_important">False</property>
+                 <signal name="clicked" handler="on_expand_clicked"/>
                </widget>
+               <packing>
+                 <property name="expand">False</property>
+                 <property name="homogeneous">True</property>
+               </packing>
              </child>
            </widget>
          </child>
                      <property name="visible">True</property>
                      <property name="can_focus">True</property>
                      <property name="editable">False</property>
+                     <property name="overwrite">False</property>
+                     <property name="accepts_tab">True</property>
                      <property name="justification">GTK_JUSTIFY_LEFT</property>
                      <property name="wrap_mode">GTK_WRAP_WORD</property>
                      <property name="cursor_visible">True</property>
index 10fd51c9056d260eb4ff11b0c7d186873447a3cd..2253f388234ff7b2e031c5d30da29f5f0c1a6831 100644 (file)
@@ -3126,12 +3126,12 @@ static int selinux_socket_connect(struct socket *sock, struct sockaddr *address,
 
                if (sk->sk_family == PF_INET) {
                        addr4 = (struct sockaddr_in *)address;
-                       if (addrlen != sizeof(struct sockaddr_in))
+                       if (addrlen < sizeof(struct sockaddr_in))
                                return -EINVAL;
                        snum = ntohs(addr4->sin_port);
                } else {
                        addr6 = (struct sockaddr_in6 *)address;
-                       if (addrlen != sizeof(struct sockaddr_in6))
+                       if (addrlen < SIN6_LEN_RFC2133)
                                return -EINVAL;
                        snum = ntohs(addr6->sin6_port);
                }