]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Mar 2010 22:45:49 +0000 (14:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Mar 2010 22:45:49 +0000 (14:45 -0800)
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems
  x86, UV: Fix target_cpus() in x2apic_uv_x.c
  x86: Reduce per cpu warning boot up messages
  x86: Reduce per cpu MCA boot up messages
  x86_64, cpa: Don't work hard in preserving kernel 2M mappings when using 4K already

1  2 
arch/x86/Kconfig
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/kernel/process.c

diff --combined arch/x86/Kconfig
index 93936de67796a2e7bed3539ef7cef978e4f6616d,ddb52b8d38a7e13606854c32622439421c6451e5..0eacb1ffb42135b02435fa2f0a1897eca651a7dd
@@@ -31,7 -31,6 +31,7 @@@ config X8
        select ARCH_WANT_FRAME_POINTERS
        select HAVE_DMA_ATTRS
        select HAVE_KRETPROBES
 +      select HAVE_OPTPROBES
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FUNCTION_TRACER
@@@ -46,7 -45,6 +46,7 @@@
        select HAVE_GENERIC_DMA_COHERENT if X86_32
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
        select USER_STACKTRACE_SUPPORT
 +      select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_DMA_API_DEBUG
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_BZIP2
@@@ -102,9 -100,6 +102,9 @@@ config ZONE_DM
  config SBUS
        bool
  
 +config NEED_DMA_MAP_STATE
 +       def_bool (X86_64 || DMAR || DMA_API_DEBUG)
 +
  config GENERIC_ISA_DMA
        def_bool y
  
@@@ -188,9 -183,6 +188,9 @@@ config ARCH_SUPPORTS_OPTIMIZED_INLININ
  config ARCH_SUPPORTS_DEBUG_PAGEALLOC
        def_bool y
  
 +config HAVE_EARLY_RES
 +      def_bool y
 +
  config HAVE_INTEL_TXT
        def_bool y
        depends on EXPERIMENTAL && DMAR && ACPI
@@@ -396,12 -388,8 +396,12 @@@ config X86_ELA
  
  config X86_MRST
         bool "Moorestown MID platform"
 +      depends on PCI
 +      depends on PCI_GOANY
        depends on X86_32
        depends on X86_EXTENDED_PLATFORM
 +      depends on X86_IO_APIC
 +      select APB_TIMER
        ---help---
          Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
          Internet Device(MID) platform. Moorestown consists of two chips:
@@@ -436,7 -424,6 +436,7 @@@ config X86_32_NON_STANDAR
  config X86_NUMAQ
        bool "NUMAQ (IBM/Sequent)"
        depends on X86_32_NON_STANDARD
 +      depends on PCI
        select NUMA
        select X86_MPPARSE
        ---help---
@@@ -581,18 -568,6 +581,18 @@@ config PARAVIRT_DEBU
          Enable to debug paravirt_ops internals.  Specifically, BUG if
          a paravirt_op is missing when it is called.
  
 +config NO_BOOTMEM
 +      default y
 +      bool "Disable Bootmem code"
 +      ---help---
 +        Use early_res directly instead of bootmem before slab is ready.
 +              - allocator (buddy) [generic]
 +              - early allocator (bootmem) [generic]
 +              - very early allocator (reserve_early*()) [x86]
 +              - very very early allocator (early brk model) [x86]
 +        So reduce one layer between early allocator to final allocator
 +
 +
  config MEMTEST
        bool "Memtest"
        ---help---
@@@ -637,16 -612,6 +637,16 @@@ config HPET_EMULATE_RT
        def_bool y
        depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
  
 +config APB_TIMER
 +       def_bool y if MRST
 +       prompt "Langwell APB Timer Support" if X86_MRST
 +       help
 +         APB timer is the replacement for 8254, HPET on X86 MID platforms.
 +         The APBT provides a stable time base on SMP
 +         systems, unlike the TSC, but it is more expensive to access,
 +         as it is off-chip. APB timers are always running regardless of CPU
 +         C states, they are used as per CPU clockevent device when possible.
 +
  # Mark as embedded because too many people got it wrong.
  # The code disables itself when not needed.
  config DMI
@@@ -662,7 -627,7 +662,7 @@@ config GART_IOMM
        bool "GART IOMMU support" if EMBEDDED
        default y
        select SWIOTLB
-       depends on X86_64 && PCI
+       depends on X86_64 && PCI && K8_NB
        ---help---
          Support for full DMA access of devices with 32bit memory access only
          on systems with more than 3GB. This is usually needed for USB,
@@@ -2061,7 -2026,7 +2061,7 @@@ endif # X86_3
  
  config K8_NB
        def_bool y
-       depends on AGP_AMD64 || (X86_64 && (GART_IOMMU || (PCI && NUMA)))
+       depends on CPU_SUP_AMD && PCI
  
  source "drivers/pcmcia/Kconfig"
  
index 3740c8a4eae7d8afa65c86785b2a3004c7dff871,af0ca80e38a9967662dc595b6aa1bca4b8ce2e07..49dbeaef2a27b03f092b2eb267d26b6028b9c382
@@@ -5,7 -5,7 +5,7 @@@
   *
   * SGI UV APIC functions (note: not an Intel compatible APIC)
   *
 - * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
 + * Copyright (C) 2007-2009 Silicon Graphics, Inc. All rights reserved.
   */
  #include <linux/cpumask.h>
  #include <linux/hardirq.h>
@@@ -20,8 -20,6 +20,8 @@@
  #include <linux/cpu.h>
  #include <linux/init.h>
  #include <linux/io.h>
 +#include <linux/pci.h>
 +#include <linux/kdebug.h>
  
  #include <asm/uv/uv_mmrs.h>
  #include <asm/uv/uv_hub.h>
  
  DEFINE_PER_CPU(int, x2apic_extra_bits);
  
 +#define PR_DEVEL(fmt, args...)        pr_devel("%s: " fmt, __func__, args)
 +
  static enum uv_system_type uv_system_type;
  static u64 gru_start_paddr, gru_end_paddr;
  int uv_min_hub_revision_id;
  EXPORT_SYMBOL_GPL(uv_min_hub_revision_id);
 +static DEFINE_SPINLOCK(uv_nmi_lock);
  
  static inline bool is_GRU_range(u64 start, u64 end)
  {
@@@ -76,7 -71,6 +76,7 @@@ static int __init uv_acpi_madt_oem_chec
        if (!strcmp(oem_id, "SGI")) {
                nodeid = early_get_nodeid();
                x86_platform.is_untracked_pat_range =  uv_is_untracked_pat_range;
 +              x86_platform.nmi_init = uv_nmi_init;
                if (!strcmp(oem_table_id, "UVL"))
                        uv_system_type = UV_LEGACY_APIC;
                else if (!strcmp(oem_table_id, "UVX"))
@@@ -120,11 -114,9 +120,9 @@@ EXPORT_SYMBOL_GPL(uv_possible_blades)
  unsigned long sn_rtc_cycles_per_second;
  EXPORT_SYMBOL(sn_rtc_cycles_per_second);
  
- /* Start with all IRQs pointing to boot CPU.  IRQ balancing will shift them. */
  static const struct cpumask *uv_target_cpus(void)
  {
-       return cpumask_of(0);
+       return cpu_online_mask;
  }
  
  static void uv_vector_allocation_domain(int cpu, struct cpumask *retmask)
@@@ -488,7 -480,7 +486,7 @@@ static void uv_heartbeat(unsigned long 
  
  static void __cpuinit uv_heartbeat_enable(int cpu)
  {
 -      if (!uv_cpu_hub_info(cpu)->scir.enabled) {
 +      while (!uv_cpu_hub_info(cpu)->scir.enabled) {
                struct timer_list *timer = &uv_cpu_hub_info(cpu)->scir.timer;
  
                uv_set_cpu_scir_bits(cpu, SCIR_CPU_HEARTBEAT|SCIR_CPU_ACTIVITY);
                timer->expires = jiffies + SCIR_CPU_HB_INTERVAL;
                add_timer_on(timer, cpu);
                uv_cpu_hub_info(cpu)->scir.enabled = 1;
 -      }
  
 -      /* check boot cpu */
 -      if (!uv_cpu_hub_info(0)->scir.enabled)
 -              uv_heartbeat_enable(0);
 +              /* also ensure that boot cpu is enabled */
 +              cpu = 0;
 +      }
  }
  
  #ifdef CONFIG_HOTPLUG_CPU
@@@ -558,30 -551,6 +556,30 @@@ late_initcall(uv_init_heartbeat)
  
  #endif /* !CONFIG_HOTPLUG_CPU */
  
 +/* Direct Legacy VGA I/O traffic to designated IOH */
 +int uv_set_vga_state(struct pci_dev *pdev, bool decode,
 +                    unsigned int command_bits, bool change_bridge)
 +{
 +      int domain, bus, rc;
 +
 +      PR_DEVEL("devfn %x decode %d cmd %x chg_brdg %d\n",
 +                      pdev->devfn, decode, command_bits, change_bridge);
 +
 +      if (!change_bridge)
 +              return 0;
 +
 +      if ((command_bits & PCI_COMMAND_IO) == 0)
 +              return 0;
 +
 +      domain = pci_domain_nr(pdev->bus);
 +      bus = pdev->bus->number;
 +
 +      rc = uv_bios_set_legacy_vga_target(decode, domain, bus);
 +      PR_DEVEL("vga decode %d %x:%x, rc: %d\n", decode, domain, bus, rc);
 +
 +      return rc;
 +}
 +
  /*
   * Called on each cpu to initialize the per_cpu UV data area.
   * FIXME: hotplug not supported yet
@@@ -598,46 -567,6 +596,46 @@@ void __cpuinit uv_cpu_init(void
                set_x2apic_extra_bits(uv_hub_info->pnode);
  }
  
 +/*
 + * When NMI is received, print a stack trace.
 + */
 +int uv_handle_nmi(struct notifier_block *self, unsigned long reason, void *data)
 +{
 +      if (reason != DIE_NMI_IPI)
 +              return NOTIFY_OK;
 +      /*
 +       * Use a lock so only one cpu prints at a time
 +       * to prevent intermixed output.
 +       */
 +      spin_lock(&uv_nmi_lock);
 +      pr_info("NMI stack dump cpu %u:\n", smp_processor_id());
 +      dump_stack();
 +      spin_unlock(&uv_nmi_lock);
 +
 +      return NOTIFY_STOP;
 +}
 +
 +static struct notifier_block uv_dump_stack_nmi_nb = {
 +      .notifier_call  = uv_handle_nmi
 +};
 +
 +void uv_register_nmi_notifier(void)
 +{
 +      if (register_die_notifier(&uv_dump_stack_nmi_nb))
 +              printk(KERN_WARNING "UV NMI handler failed to register\n");
 +}
 +
 +void uv_nmi_init(void)
 +{
 +      unsigned int value;
 +
 +      /*
 +       * Unmask NMI on all cpus
 +       */
 +      value = apic_read(APIC_LVT1) | APIC_DM_NMI;
 +      value &= ~APIC_LVT_MASKED;
 +      apic_write(APIC_LVT1, value);
 +}
  
  void __init uv_system_init(void)
  {
        }
  
        uv_bios_init();
 -      uv_bios_get_sn_info(0, &uv_type, &sn_partition_id,
 -                          &sn_coherency_id, &sn_region_size);
 +      uv_bios_get_sn_info(0, &uv_type, &sn_partition_id, &sn_coherency_id,
 +                          &sn_region_size, &system_serial_number);
        uv_rtc_init();
  
        for_each_present_cpu(cpu) {
  
        uv_cpu_init();
        uv_scir_register_cpu_notifier();
 +      uv_register_nmi_notifier();
        proc_mkdir("sgi_uv", NULL);
 +
 +      /* register Legacy VGA I/O redirection handler */
 +      pci_register_set_vga_state(uv_set_vga_state);
  }
index 02d678065d7d1f8a9d43a7c6efd58b5e83c61604,4e8cb4ee9fcb60973355adb0703a43bc2ff3bae2..ad9540676fccb7138917dc6520cdf88dd95b10f8
@@@ -92,13 -92,6 +92,13 @@@ void exit_thread(void
        }
  }
  
 +void show_regs(struct pt_regs *regs)
 +{
 +      show_registers(regs);
 +      show_trace(NULL, regs, (unsigned long *)kernel_stack_pointer(regs),
 +                 regs->bp);
 +}
 +
  void show_regs_common(void)
  {
        const char *board, *product;
@@@ -607,7 -600,7 +607,7 @@@ void __cpuinit select_idle_routine(cons
  {
  #ifdef CONFIG_SMP
        if (pm_idle == poll_idle && smp_num_siblings > 1) {
-               printk(KERN_WARNING "WARNING: polling idle and HT enabled,"
+               printk_once(KERN_WARNING "WARNING: polling idle and HT enabled,"
                        " performance may degrade.\n");
        }
  #endif