Skip to contentSkip to conversation

HPET init/add fixes

PATCH New Bjorn Helgaas 1 participant 1 message Oct 29, 2004

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

PATCH 1/1 HPET init/add fixes

Cleanup/bugfix HPET driver:

- hpet_init() could return failure with driver still registered with ACPI
- driver add() functions were marked __init, but can be called any time until driver is unregistered (not a real problem until HPETs can be hotplugged)
- time interpolator registration now done in driver add() path, so we can support removal of HPETs someday
- physical MMIO address should be printed, not ioremapped address

Cleanup/bugfix HPET driver:

- hpet_init() could return failure with driver still registered with ACPI
- driver add() functions were marked __init, but can be called any time until driver is unregistered (not a real problem until HPETs can be hotplugged)
- time interpolator registration now done in driver add() path, so we can support removal of HPETs someday
- physical MMIO address should be printed, not ioremapped address

arch/i386/kernel/time_hpet.c +1 -0
diff -u -ur 2.6.10-rc1-mm2/arch/i386/kernel/time_hpet.c acpi-register2/arch/i386/kernel/time_hpet.c
@@ -161,6 +161,7 @@
 		 * Register with driver.
 		 * Timer0 and Timer1 is used by platform.
 		 */
+		hd.hd_phys_address = hpet_address;
 		hd.hd_address = hpet_virt_address;
 		hd.hd_nirqs = ntimer;
 		hd.hd_flags = HPET_DATA_PLATFORM;
arch/x86_64/kernel/time.c +1 -0
diff -u -ur 2.6.10-rc1-mm2/arch/x86_64/kernel/time.c acpi-register2/arch/x86_64/kernel/time.c
@@ -746,6 +746,7 @@
 	 * Register with driver.
 	 * Timer0 and Timer1 is used by platform.
 	 */
+	hd.hd_phys_address = vxtime.hpet_address;
 	hd.hd_address = (void *)fix_to_virt(FIX_HPET_BASE);
 	hd.hd_nirqs = ntimer;
 	hd.hd_flags = HPET_DATA_PLATFORM;
drivers/char/hpet.c +50 -38

176 lines not on this page · raw message

include/linux/hpet.h +1 -0
diff -u -ur 2.6.10-rc1-mm2/include/linux/hpet.h acpi-register2/include/linux/hpet.h
@@ -112,6 +112,7 @@
 };
 
 struct hpet_data {
+	unsigned long hd_phys_address;
 	void __iomem *hd_address;
 	unsigned short hd_nirqs;
 	unsigned short hd_flags;