Commit 3c732c3b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] HPET 1/6: Support for HPET based timer

From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>

High Precision Event Timer (HPET) is next generation timer
hardware and has various advantages over legacy 8254
(PIT) timer, like:
- Associated registers are mapped to memory space. So, we no
  longer require in and out on legacy ioports
- Memory map address is reported by ACPI (and are not
  hard-coded)
- Each timer can be configured to generate separate interrupts,
  even sharing lines with PCI devices
- HPET has a minimum period of 100 nanosecs and is not fixed.
  Giving a flexibility of increasing the resolution in future.
- Most current implementations has 3 counters, but in future,
  we can have as many as 32 timers per block, and 8
  HPET timer blocks (total 256 timers)
- Can support 32bit and 64bit counting

(Refer to http://www.intel.com/labs/platcomp/hpet/hpetspec.htm
 for complete specs)

The patchset that follow adds support for High Precision Event
Timer (HPET) based timer in kernel. This uses the HPET in
LegacyReplacement mode (so that counter 0 will be tied to IRQ0,
and counter 1 will be tied to IRQ 8). In this mode, HPET overrides
PIT and RTC interrupt lines. The patch will enable HPET by default,
on systems where ACPI tables reports this feature. The patch will
have no impact on systems that do not support this feature.




A major change from previous version is elimination of fixmap for HPET. 
Based on Andrew Morton's suggestion, we have a new hook in init/main.c for
late_time_init(), at which time we can use ioremap, in place of fixmap. 
Impact on other archs: Calibrate_delay() (and hence loops_per_jiffy
calculation) has moved down in main.c, from after time_init() to after
kmem_cache_init().

1/6 - hpet1.patch - main.c change to introduce late_time_init()
parent b94a6563
......@@ -102,6 +102,8 @@ int system_running = 0;
#define MAX_INIT_ENVS 8
extern void time_init(void);
/* Default late time init is NULL. archs can override this later. */
void (*late_time_init)(void) = NULL;
extern void softirq_init(void);
int rows, cols;
......@@ -417,7 +419,6 @@ asmlinkage void __init start_kernel(void)
console_init();
profile_init();
local_irq_enable();
calibrate_delay();
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&
initrd_start < min_low_pfn << PAGE_SHIFT) {
......@@ -429,6 +430,9 @@ asmlinkage void __init start_kernel(void)
page_address_init();
mem_init();
kmem_cache_init();
if (late_time_init)
late_time_init();
calibrate_delay();
pidmap_init();
pgtable_cache_init();
pte_chain_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment