Skip to contentSkip to conversation

x86 fixes for 2.6.35-rc7

GIT PULL H. Peter Anvin 1 participant 1 message Jul 26, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

The following changes since commit f82c3d71d6fd2e6a3e3416f09099e29087e39abf:
Jacob Pan (1):
x86, pci, mrst: Add extra sanity check in walking the PCI extended cap chain

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

Adam Lackorzynski (1):
x86, i8259: Only register sysdev if we have a real 8259 PIC

Stefano Stabellini (1):
x86: Do not try to disable hpet if it hasn't been initialized before

 arch/x86/kernel/hpet.c  |    2 +-
 arch/x86/kernel/i8259.c |   25 +++++++++++++++----------
 2 files changed, 16 insertions(+), 11 deletions(-)
arch/x86/kernel/hpet.c +1 -1
index a198b7c..ba390d7 100644
@@ -964,7 +964,7 @@ fs_initcall(hpet_late_init);
 
 void hpet_disable(void)
 {
-	if (is_hpet_capable()) {
+	if (is_hpet_capable() && hpet_virt_address) {
 		unsigned int cfg = hpet_readl(HPET_CFG);
 
 		if (hpet_legacy_int_enabled) {
arch/x86/kernel/i8259.c +15 -10
index 7c9f02c..cafa7c8 100644
@@ -276,16 +276,6 @@ static struct sys_device device_i8259A = {
 	.cls	= &i8259_sysdev_class,
 };
 
-static int __init i8259A_init_sysfs(void)
-{
-	int error = sysdev_class_register(&i8259_sysdev_class);
-	if (!error)
-		error = sysdev_register(&device_i8259A);
-	return error;
-}
-
-device_initcall(i8259A_init_sysfs);
-
 static void mask_8259A(void)
 {
 	unsigned long flags;
@@ -407,3 +397,18 @@ struct legacy_pic default_legacy_pic = {
 };
 
 struct legacy_pic *legacy_pic = &default_legacy_pic;
+
+static int __init i8259A_init_sysfs(void)
+{
+	int error;
+
+	if (legacy_pic != &default_legacy_pic)
+		return 0;
+
+	error = sysdev_class_register(&i8259_sysdev_class);
+	if (!error)
+		error = sysdev_register(&device_i8259A);
+	return error;
+}
+
+device_initcall(i8259A_init_sysfs);