Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/li…
Browse files Browse the repository at this point in the history
…nux-2.6

* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
  [PATCH] x86-64: no paravirt for X86_VOYAGER or X86_VISWS
  [PATCH] i386: Fix io_apic.c warning
  [PATCH] i386: export smp_num_siblings for oprofile
  [PATCH] x86: Work around gcc 4.2 over aggressive optimizer
  [PATCH] x86: Fix boot hang due to nmi watchdog init code
  [PATCH] x86: Fix verify_quirk_intel_irqbalance()
  [PATCH] i386: Update defconfig
  [PATCH] x86-64: Update defconfig
  • Loading branch information
Linus Torvalds committed Dec 9, 2006
2 parents 9b3a89f + f0f32fc commit af1713e
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 28 deletions.
1 change: 1 addition & 0 deletions arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ endchoice
config PARAVIRT
bool "Paravirtualization support (EXPERIMENTAL)"
depends on EXPERIMENTAL
depends on !(X86_VISWS || X86_VOYAGER)
help
Paravirtualization is a way of running multiple instances of
Linux on the same machine, under a hypervisor. This option
Expand Down
28 changes: 21 additions & 7 deletions arch/i386/defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.19-git7
# Wed Dec 6 23:50:49 2006
# Linux kernel version: 2.6.19-git14
# Sat Dec 9 21:23:14 2006
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
Expand All @@ -12,6 +12,7 @@ CONFIG_X86=y
CONFIG_MMU=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
Expand Down Expand Up @@ -141,6 +142,8 @@ CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
Expand Down Expand Up @@ -203,6 +206,7 @@ CONFIG_MTRR=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
# CONFIG_KEXEC is not set
Expand Down Expand Up @@ -563,6 +567,7 @@ CONFIG_IDEDMA_AUTO=y
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
# CONFIG_SCSI_PROC_FS is not set

Expand All @@ -583,6 +588,7 @@ CONFIG_CHR_DEV_SG=y
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set

#
# SCSI Transports
Expand Down Expand Up @@ -642,6 +648,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set

#
# Serial ATA (prod) and Parallel ATA (experimental) drivers
Expand Down Expand Up @@ -1082,10 +1089,7 @@ CONFIG_SOUND=y
# Open Sound System
#
CONFIG_SOUND_PRIME=y
CONFIG_OSS_OBSOLETE_DRIVER=y
# CONFIG_SOUND_BT878 is not set
# CONFIG_SOUND_EMU10K1 is not set
# CONFIG_SOUND_FUSION is not set
# CONFIG_SOUND_ES1371 is not set
CONFIG_SOUND_ICH=y
# CONFIG_SOUND_TRIDENT is not set
Expand All @@ -1094,6 +1098,11 @@ CONFIG_SOUND_ICH=y
# CONFIG_SOUND_VIA82CXXX is not set
# CONFIG_SOUND_OSS is not set

#
# HID Devices
#
CONFIG_HID=y

#
# USB support
#
Expand Down Expand Up @@ -1158,8 +1167,7 @@ CONFIG_USB_STORAGE=y
# USB Input Devices
#
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_USB_HID_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_AIPTEK is not set
Expand Down Expand Up @@ -1443,6 +1451,11 @@ CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y

#
# Distributed Lock Manager
#
# CONFIG_DLM is not set

#
# Instrumentation Support
#
Expand Down Expand Up @@ -1509,6 +1522,7 @@ CONFIG_DOUBLEFAULT=y
#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
CONFIG_CRC32=y
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ device_initcall(ioapic_init_sysfs);
int create_irq(void)
{
/* Allocate an unused irq */
int irq, new, vector;
int irq, new, vector = 0;
unsigned long flags;

irq = -ENOSPC;
Expand Down
8 changes: 4 additions & 4 deletions arch/i386/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,29 +195,29 @@ static __cpuinit inline int nmi_known_cpu(void)
return 0;
}

static int endflag __initdata = 0;

#ifdef CONFIG_SMP
/* The performance counters used by NMI_LOCAL_APIC don't trigger when
* the CPU is idle. To make sure the NMI watchdog really ticks on all
* CPUs during the test make them busy.
*/
static __init void nmi_cpu_busy(void *data)
{
volatile int *endflag = data;
local_irq_enable_in_hardirq();
/* Intentionally don't use cpu_relax here. This is
to make sure that the performance counter really ticks,
even if there is a simulator or similar that catches the
pause instruction. On a real HT machine this is fine because
all other CPUs are busy with "useless" delay loops and don't
care if they get somewhat less cycles. */
while (*endflag == 0)
barrier();
while (endflag == 0)
mb();
}
#endif

static int __init check_nmi_watchdog(void)
{
volatile int endflag = 0;
unsigned int *prev_nmi_count;
int cpu;

Expand Down
33 changes: 29 additions & 4 deletions arch/i386/kernel/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,38 @@
#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI)
static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev)
{
u8 config, rev;
u32 word;

/* BIOS may enable hardware IRQ balancing for
* E7520/E7320/E7525(revision ID 0x9 and below)
* based platforms.
* For those platforms, make sure that the genapic is set to 'flat'
*/
pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);
if (rev > 0x9)
return;

/* enable access to config space*/
pci_read_config_byte(dev, 0xf4, &config);
pci_write_config_byte(dev, 0xf4, config|0x2);

/* read xTPR register */
raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);

if (!(word & (1 << 13))) {
#ifdef CONFIG_X86_64
if (genapic != &apic_flat)
panic("APIC mode must be flat on this system\n");
if (genapic != &apic_flat)
panic("APIC mode must be flat on this system\n");
#elif defined(CONFIG_X86_GENERICARCH)
if (genapic != &apic_default)
panic("APIC mode must be default(flat) on this system. Use apic=default\n");
if (genapic != &apic_default)
panic("APIC mode must be default(flat) on this system. Use apic=default\n");
#endif
}

/* put back the original value for config space*/
if (!(config & 0x2))
pci_write_config_byte(dev, 0xf4, config);
}

void __init quirk_intel_irqbalance(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static int __devinitdata smp_b_stepping;

/* Number of siblings per CPU package */
int smp_num_siblings = 1;
#ifdef CONFIG_X86_HT
#ifdef CONFIG_SMP
EXPORT_SYMBOL(smp_num_siblings);
#endif

Expand Down
1 change: 1 addition & 0 deletions arch/i386/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(phys_startup_32)
jiffies = jiffies_64;
_proxy_pda = 0;

PHDRS {
text PT_LOAD FLAGS(5); /* R_E */
Expand Down
29 changes: 22 additions & 7 deletions arch/x86_64/defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.19-git7
# Wed Dec 6 23:50:47 2006
# Linux kernel version: 2.6.19-git14
# Sat Dec 9 21:23:09 2006
#
CONFIG_X86_64=y
CONFIG_64BIT=y
Expand All @@ -22,6 +22,9 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_DMI=y
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
Expand Down Expand Up @@ -170,6 +173,7 @@ CONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
# CONFIG_REORDER is not set
Expand Down Expand Up @@ -514,6 +518,7 @@ CONFIG_IDEDMA_AUTO=y
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
# CONFIG_SCSI_PROC_FS is not set

Expand All @@ -534,6 +539,7 @@ CONFIG_CHR_DEV_SG=y
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set

#
# SCSI Transports
Expand Down Expand Up @@ -587,6 +593,7 @@ CONFIG_MEGARAID_SAS=y
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set

#
# Serial ATA (prod) and Parallel ATA (experimental) drivers
Expand Down Expand Up @@ -1106,10 +1113,7 @@ CONFIG_SOUND=y
# Open Sound System
#
CONFIG_SOUND_PRIME=y
CONFIG_OSS_OBSOLETE_DRIVER=y
# CONFIG_SOUND_BT878 is not set
# CONFIG_SOUND_EMU10K1 is not set
# CONFIG_SOUND_FUSION is not set
# CONFIG_SOUND_ES1371 is not set
CONFIG_SOUND_ICH=y
# CONFIG_SOUND_TRIDENT is not set
Expand All @@ -1118,6 +1122,11 @@ CONFIG_SOUND_ICH=y
# CONFIG_SOUND_VIA82CXXX is not set
# CONFIG_SOUND_OSS is not set

#
# HID Devices
#
CONFIG_HID=y

#
# USB support
#
Expand Down Expand Up @@ -1182,8 +1191,7 @@ CONFIG_USB_STORAGE=y
# USB Input Devices
#
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_USB_HID_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set
# CONFIG_USB_AIPTEK is not set
Expand Down Expand Up @@ -1474,6 +1482,11 @@ CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y

#
# Distributed Lock Manager
#
# CONFIG_DLM is not set

#
# Instrumentation Support
#
Expand Down Expand Up @@ -1504,6 +1517,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_VM is not set
Expand Down Expand Up @@ -1534,6 +1548,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
CONFIG_CRC32=y
Expand Down
9 changes: 5 additions & 4 deletions arch/x86_64/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,29 +193,29 @@ void nmi_watchdog_default(void)
nmi_watchdog = NMI_IO_APIC;
}

static int endflag __initdata = 0;

#ifdef CONFIG_SMP
/* The performance counters used by NMI_LOCAL_APIC don't trigger when
* the CPU is idle. To make sure the NMI watchdog really ticks on all
* CPUs during the test make them busy.
*/
static __init void nmi_cpu_busy(void *data)
{
volatile int *endflag = data;
local_irq_enable_in_hardirq();
/* Intentionally don't use cpu_relax here. This is
to make sure that the performance counter really ticks,
even if there is a simulator or similar that catches the
pause instruction. On a real HT machine this is fine because
all other CPUs are busy with "useless" delay loops and don't
care if they get somewhat less cycles. */
while (*endflag == 0)
barrier();
while (endflag == 0)
mb();
}
#endif

int __init check_nmi_watchdog (void)
{
volatile int endflag = 0;
int *counts;
int cpu;

Expand Down Expand Up @@ -256,6 +256,7 @@ int __init check_nmi_watchdog (void)
if (!atomic_read(&nmi_active)) {
kfree(counts);
atomic_set(&nmi_active, -1);
endflag = 1;
return -1;
}
endflag = 1;
Expand Down
1 change: 1 addition & 0 deletions arch/x86_64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(phys_startup_64)
jiffies_64 = jiffies;
_proxy_pda = 0;
PHDRS {
text PT_LOAD FLAGS(5); /* R_E */
data PT_LOAD FLAGS(7); /* RWE */
Expand Down

0 comments on commit af1713e

Please sign in to comment.