]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'linus' into x86/x2apic
authorIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 09:19:20 +0000 (11:19 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 09:19:20 +0000 (11:19 +0200)
Conflicts:

arch/x86/kernel/genapic_64.c

Manual merge:

arch/x86/kernel/genx2apic_uv_x.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
Documentation/kernel-parameters.txt
arch/x86/Kconfig
arch/x86/kernel/genx2apic_uv_x.c
arch/x86/kernel/setup.c
arch/x86/lguest/boot.c
kernel/irq/manage.c

index 4328307a875c3d1717bea9ad8ece6568e894e91d,e7bea3e853044e54f3ee863ad3d295b0df84a522..0f130a4f9ba3195ab21305a656df222990599c61
@@@ -1420,12 -1420,6 +1420,12 @@@ and is between 256 and 4096 characters
  
        nolapic_timer   [X86-32,APIC] Do not use the local APIC timer.
  
 +      nox2apic        [X86-64,APIC] Do not enable x2APIC mode.
 +
 +      x2apic_phys     [X86-64,APIC] Use x2apic physical mode instead of
 +                      default x2apic cluster mode on platforms
 +                      supporting x2apic.
 +
        noltlbs         [PPC] Do not use large page/tlb entries for kernel
                        lowmem mapping on PPC40x.
  
                        <deci-seconds>: poll all this frequency
                        0: no polling (default)
  
-       tipar.timeout=  [HW,PPT]
-                       Set communications timeout in tenths of a second
-                       (default 15).
-       tipar.delay=    [HW,PPT]
-                       Set inter-bit delay in microseconds (default 10).
        tmscsim=        [HW,SCSI]
                        See comment before function dc390_setup() in
                        drivers/scsi/tmscsim.c.
diff --combined arch/x86/Kconfig
index 7d17421b2a2e8c53eb52fe044fb92265fc845bdf,3d0f2b6a5a16e6edd6f349b4b19756a5d2cecff7..608a12ff483ac2a9066f39560d0fdab336ebf449
@@@ -22,12 -22,16 +22,16 @@@ config X8
        select HAVE_IDE
        select HAVE_OPROFILE
        select HAVE_IOREMAP_PROT
+       select HAVE_GET_USER_PAGES_FAST
        select HAVE_KPROBES
+       select ARCH_WANT_OPTIONAL_GPIOLIB
        select HAVE_KRETPROBES
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FTRACE
        select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
        select HAVE_ARCH_KGDB if !X86_VOYAGER
+       select HAVE_GENERIC_DMA_COHERENT if X86_32
+       select HAVE_EFFICIENT_UNALIGNED_ACCESS
  
  config ARCH_DEFCONFIG
        string
@@@ -330,20 -334,6 +334,6 @@@ config X86_BIGSM
  
  endif
  
- config X86_RDC321X
-       bool "RDC R-321x SoC"
-       depends on X86_32
-       select M486
-       select X86_REBOOTFIXUPS
-       select GENERIC_GPIO
-       select LEDS_CLASS
-       select LEDS_GPIO
-       select NEW_LEDS
-       help
-         This option is needed for RDC R-321x system-on-chip, also known
-         as R-8610-(G).
-         If you don't have one of these chips, you should say N here.
  config X86_VSMP
        bool "Support for ScaleMP vSMP"
        select PARAVIRT
@@@ -367,6 -357,16 +357,16 @@@ config X86_VISW
          A kernel compiled for the Visual Workstation will run on general
          PCs as well. See <file:Documentation/sgi-visws.txt> for details.
  
+ config X86_RDC321X
+       bool "RDC R-321x SoC"
+       depends on X86_32
+       select M486
+       select X86_REBOOTFIXUPS
+       help
+         This option is needed for RDC R-321x system-on-chip, also known
+         as R-8610-(G).
+         If you don't have one of these chips, you should say N here.
  config SCHED_NO_NO_OMIT_FRAME_POINTER
        def_bool y
        prompt "Single-depth WCHAN output"
@@@ -1277,6 -1277,14 +1277,14 @@@ config CRASH_DUM
          (CONFIG_RELOCATABLE=y).
          For more details see Documentation/kdump/kdump.txt
  
+ config KEXEC_JUMP
+       bool "kexec jump (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       depends on KEXEC && HIBERNATION && X86_32
+       help
+         Jump between original kernel and kexeced kernel and invoke
+         code in physical address mode via KEXEC
  config PHYSICAL_START
        hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
        default "0x1000000" if X86_NUMAQ
@@@ -1650,14 -1658,6 +1658,14 @@@ config DMAR_FLOPPY_W
         workaround will setup a 1:1 mapping for the first
         16M to make floppy (an ISA device) work.
  
 +config INTR_REMAP
 +      bool "Support for Interrupt Remapping (EXPERIMENTAL)"
 +      depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
 +      help
 +       Supports Interrupt remapping for IO-APIC and MSI devices.
 +       To use x2apic mode in the CPU's which support x2APIC enhancements or
 +       to support platforms with CPU's having > 8 bit APIC ID, say Y.
 +
  source "drivers/pci/pcie/Kconfig"
  
  source "drivers/pci/Kconfig"
index 3fe472223a993b88ed95a8bea114466cdc488e62,2cfcbded888a0b91eece817e0eb3f49e865154fd..16a93ed7baf185199180658360ca857c059eea70
  #include <linux/threads.h>
  #include <linux/cpumask.h>
  #include <linux/string.h>
 -#include <linux/kernel.h>
  #include <linux/ctype.h>
  #include <linux/init.h>
  #include <linux/sched.h>
  #include <linux/bootmem.h>
  #include <linux/module.h>
 +#include <linux/hardirq.h>
  #include <asm/smp.h>
  #include <asm/ipi.h>
  #include <asm/genapic.h>
  #include <asm/uv/uv_hub.h>
  #include <asm/uv/bios.h>
  
 +DEFINE_PER_CPU(int, x2apic_extra_bits);
 +
 +static enum uv_system_type uv_system_type;
 +
 +static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 +{
 +      if (!strcmp(oem_id, "SGI")) {
 +              if (!strcmp(oem_table_id, "UVL"))
 +                      uv_system_type = UV_LEGACY_APIC;
 +              else if (!strcmp(oem_table_id, "UVX"))
 +                      uv_system_type = UV_X2APIC;
 +              else if (!strcmp(oem_table_id, "UVH")) {
 +                      uv_system_type = UV_NON_UNIQUE_APIC;
 +                      return 1;
 +              }
 +      }
 +      return 0;
 +}
 +
 +enum uv_system_type get_uv_system_type(void)
 +{
 +      return uv_system_type;
 +}
 +
 +int is_uv_system(void)
 +{
 +      return uv_system_type != UV_NONE;
 +}
++EXPORT_SYMBOL_GPL(is_uv_system);
 +
  DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
  EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
  
@@@ -152,10 -123,6 +153,10 @@@ static int uv_apic_id_registered(void
        return 1;
  }
  
 +static void uv_init_apic_ldr(void)
 +{
 +}
 +
  static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask)
  {
        int cpu;
                return BAD_APICID;
  }
  
 +static unsigned int get_apic_id(unsigned long x)
 +{
 +      unsigned int id;
 +
 +      WARN_ON(preemptible() && num_online_cpus() > 1);
 +      id = x | __get_cpu_var(x2apic_extra_bits);
 +
 +      return id;
 +}
 +
 +static unsigned long set_apic_id(unsigned int id)
 +{
 +      unsigned long x;
 +
 +      /* maskout x2apic_extra_bits ? */
 +      x = id;
 +      return x;
 +}
 +
 +static unsigned int uv_read_apic_id(void)
 +{
 +
 +      return get_apic_id(apic_read(APIC_ID));
 +}
 +
  static unsigned int phys_pkg_id(int index_msb)
  {
 -      return GET_APIC_ID(read_apic_id()) >> index_msb;
 +      return uv_read_apic_id() >> index_msb;
  }
  
  #ifdef ZZZ            /* Needs x2apic patch */
@@@ -210,22 -152,17 +211,22 @@@ static void uv_send_IPI_self(int vector
  
  struct genapic apic_x2apic_uv_x = {
        .name = "UV large system",
 +      .acpi_madt_oem_check = uv_acpi_madt_oem_check,
        .int_delivery_mode = dest_Fixed,
        .int_dest_mode = (APIC_DEST_PHYSICAL != 0),
        .target_cpus = uv_target_cpus,
        .vector_allocation_domain = uv_vector_allocation_domain,/* Fixme ZZZ */
        .apic_id_registered = uv_apic_id_registered,
 +      .init_apic_ldr = uv_init_apic_ldr,
        .send_IPI_all = uv_send_IPI_all,
        .send_IPI_allbutself = uv_send_IPI_allbutself,
        .send_IPI_mask = uv_send_IPI_mask,
        /* ZZZ.send_IPI_self = uv_send_IPI_self, */
        .cpu_mask_to_apicid = uv_cpu_mask_to_apicid,
        .phys_pkg_id = phys_pkg_id,     /* Fixme ZZZ */
 +      .get_apic_id = get_apic_id,
 +      .set_apic_id = set_apic_id,
 +      .apic_id_mask = (0xFFFFFFFFu),
  };
  
  static __cpuinit void set_x2apic_extra_bits(int pnode)
@@@ -462,5 -399,3 +463,5 @@@ void __cpuinit uv_cpu_init(void
        if (get_uv_system_type() == UV_NON_UNIQUE_APIC)
                set_x2apic_extra_bits(uv_hub_info->pnode);
  }
 +
 +
diff --combined arch/x86/kernel/setup.c
index 792b87853a7691b59f9767d743ad204a451e6850,2d888586385d2599dce70e99e1b4603714155e9f..60e8de19644b0aae3e2763dfa6c08fe3275053dc
@@@ -731,8 -731,6 +731,8 @@@ void __init setup_arch(char **cmdline_p
        num_physpages = max_pfn;
  
        check_efer();
 +      if (cpu_has_x2apic)
 +              check_x2apic();
  
        /* How many end-of-memory variables you have, grandma! */
        /* need this before calling reserve_initrd */
  
        initmem_init(0, max_pfn);
  
- #ifdef CONFIG_X86_64
-       dma32_reserve_bootmem();
- #endif
  #ifdef CONFIG_ACPI_SLEEP
        /*
         * Reserve low memory region for sleep support.
  #endif
        reserve_crashkernel();
  
+ #ifdef CONFIG_X86_64
+       /*
+        * dma32_reserve_bootmem() allocates bootmem which may conflict
+        * with the crashkernel command line, so do that after
+        * reserve_crashkernel()
+        */
+       dma32_reserve_bootmem();
+ #endif
        reserve_ibft_region();
  
  #ifdef CONFIG_KVM_CLOCK
diff --combined arch/x86/lguest/boot.c
index 756fc489652beb8353e04ac619f3d5ec395a4621,d9249a882aa5b0c2204fc16724e0848e8184d543..65f0b8a47bed0dd2ccdd31e507cdfd70846c4d48
@@@ -55,7 -55,6 +55,7 @@@
  #include <linux/lguest_launcher.h>
  #include <linux/virtio_console.h>
  #include <linux/pm.h>
 +#include <asm/apic.h>
  #include <asm/lguest.h>
  #include <asm/paravirt.h>
  #include <asm/param.h>
@@@ -784,44 -783,14 +784,44 @@@ static void lguest_wbinvd(void
   * code qualifies for Advanced.  It will also never interrupt anything.  It
   * does, however, allow us to get through the Linux boot code. */
  #ifdef CONFIG_X86_LOCAL_APIC
 -static void lguest_apic_write(unsigned long reg, u32 v)
 +static void lguest_apic_write(u32 reg, u32 v)
  {
  }
  
 -static u32 lguest_apic_read(unsigned long reg)
 +static u32 lguest_apic_read(u32 reg)
  {
        return 0;
  }
 +
 +static u64 lguest_apic_icr_read(void)
 +{
 +      return 0;
 +}
 +
 +static void lguest_apic_icr_write(u32 low, u32 id)
 +{
 +      /* Warn to see if there's any stray references */
 +      WARN_ON(1);
 +}
 +
 +static void lguest_apic_wait_icr_idle(void)
 +{
 +      return;
 +}
 +
 +static u32 lguest_apic_safe_wait_icr_idle(void)
 +{
 +      return 0;
 +}
 +
 +static struct apic_ops lguest_basic_apic_ops = {
 +      .read = lguest_apic_read,
 +      .write = lguest_apic_write,
 +      .icr_read = lguest_apic_icr_read,
 +      .icr_write = lguest_apic_icr_write,
 +      .wait_icr_idle = lguest_apic_wait_icr_idle,
 +      .safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle,
 +};
  #endif
  
  /* STOP!  Until an interrupt comes in. */
@@@ -1021,7 -990,8 +1021,7 @@@ __init void lguest_init(void
  
  #ifdef CONFIG_X86_LOCAL_APIC
        /* apic read/write intercepts */
 -      pv_apic_ops.apic_write = lguest_apic_write;
 -      pv_apic_ops.apic_read = lguest_apic_read;
 +      apic_ops = &lguest_basic_apic_ops;
  #endif
  
        /* time operations */
        init_pg_tables_start = __pa(pg0);
        init_pg_tables_end = __pa(pg0);
  
+       /* As described in head_32.S, we map the first 128M of memory. */
+       max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT;
        /* Load the %fs segment register (the per-cpu segment register) with
         * the normal data segment to get through booting. */
        asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory");
diff --combined kernel/irq/manage.c
index 63b93a9355656d99fd216d59a6734b30c8517f93,0314074fa232e72370db9e62b50cdc98a8d53f6a..60c49e324390bca07f9109fc2bb09d0ecf18f5c6
@@@ -89,14 -89,7 +89,14 @@@ int irq_set_affinity(unsigned int irq, 
        set_balance_irq_affinity(irq, cpumask);
  
  #ifdef CONFIG_GENERIC_PENDING_IRQ
 -      set_pending_irq(irq, cpumask);
 +      if (desc->status & IRQ_MOVE_PCNTXT) {
 +              unsigned long flags;
 +
 +              spin_lock_irqsave(&desc->lock, flags);
 +              desc->chip->set_affinity(irq, cpumask);
 +              spin_unlock_irqrestore(&desc->lock, flags);
 +      } else
 +              set_pending_irq(irq, cpumask);
  #else
        desc->affinity = cpumask;
        desc->chip->set_affinity(irq, cpumask);
@@@ -184,8 -177,7 +184,7 @@@ static void __enable_irq(struct irq_des
  {
        switch (desc->depth) {
        case 0:
-               printk(KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
-               WARN_ON(1);
+               WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
                break;
        case 1: {
                unsigned int status = desc->status & ~IRQ_DISABLED;
@@@ -267,9 -259,7 +266,7 @@@ int set_irq_wake(unsigned int irq, unsi
                }
        } else {
                if (desc->wake_depth == 0) {
-                       printk(KERN_WARNING "Unbalanced IRQ %d "
-                                       "wake disable\n", irq);
-                       WARN_ON(1);
+                       WARN(1, "Unbalanced IRQ %d wake disable\n", irq);
                } else if (--desc->wake_depth == 0) {
                        ret = set_irq_wake_real(irq, on);
                        if (ret)
@@@ -333,7 -323,8 +330,8 @@@ static int __irq_set_trigger(struct irq
        ret = chip->set_type(irq, flags & IRQF_TRIGGER_MASK);
  
        if (ret)
-               pr_err("setting flow type for irq %u failed (%pF)\n",
+               pr_err("setting trigger mode %d for irq %u failed (%pF)\n",
+                               (int)(flags & IRQF_TRIGGER_MASK),
                                irq, chip->set_type);
  
        return ret;