2 * Intel & MS High Precision Event Timer Implementation.
8 #include <linux/config.h>
9 #include <linux/interrupt.h>
10 #include <linux/module.h>
11 #include <linux/kernel.h>
12 #include <linux/types.h>
13 #include <linux/miscdevice.h>
14 #include <linux/major.h>
15 #include <linux/ioport.h>
16 #include <linux/fcntl.h>
17 #include <linux/init.h>
18 #include <linux/poll.h>
19 #include <linux/proc_fs.h>
20 #include <linux/spinlock.h>
21 #include <linux/sysctl.h>
22 #include <linux/wait.h>
23 #include <linux/bcd.h>
24 #include <linux/seq_file.h>
26 #include <asm/current.h>
27 #include <asm/uaccess.h>
28 #include <asm/system.h>
31 #include <asm/bitops.h>
32 #include <asm/div64.h>
34 #include <linux/acpi.h>
35 #include <acpi/acpi_bus.h>
36 #include <linux/hpet.h>
39 * The High Precision Event Timer driver.
40 * This driver is closely modelled after the rtc.c driver.
41 * http://www.intel.com/labs/platcomp/hpet/hpetspec.htm
43 #define HPET_USER_FREQ (64)
44 #define HPET_DRIFT (500)
46 static u32 hpet_ntimer, hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
48 /* A lock for concurrent access by app and isr hpet activity. */
49 static spinlock_t hpet_lock = SPIN_LOCK_UNLOCKED;
50 /* A lock for concurrent intermodule access to hpet and isr hpet activity. */
51 static spinlock_t hpet_task_lock = SPIN_LOCK_UNLOCKED;
54 struct hpets *hd_hpets;
56 struct hpet_timer *hd_timer;
57 unsigned long hd_ireqfreq;
58 unsigned long hd_irqdata;
59 wait_queue_head_t hd_waitqueue;
60 struct fasync_struct *hd_async_queue;
61 struct hpet_task *hd_task;
62 unsigned int hd_flags;
64 unsigned int hd_hdwirq;
68 struct hpets *hp_next;
70 unsigned long hp_period;
71 unsigned long hp_delta;
72 unsigned int hp_ntimer;
73 unsigned int hp_which;
74 struct hpet_dev hp_dev[1];
77 static struct hpets *hpets;
79 #define HPET_OPEN 0x0001
80 #define HPET_IE 0x0002 /* interrupt enabled */
81 #define HPET_PERIODIC 0x0004
83 #if BITS_PER_LONG == 64
84 #define write_counter(V, MC) writeq(V, MC)
85 #define read_counter(MC) readq(MC)
87 #define write_counter(V, MC) writel(V, MC)
88 #define read_counter(MC) readl(MC)
92 static unsigned long long __inline readq(void *addr)
94 return readl(addr) | (((unsigned long long)readl(addr + 4)) << 32LL);
99 static void __inline writeq(unsigned long long v, void *addr)
101 writel(v & 0xffffffff, addr);
102 writel(v >> 32, addr + 4);
106 static irqreturn_t hpet_interrupt(int irq, void *data, struct pt_regs *regs)
108 struct hpet_dev *devp;
113 spin_lock(&hpet_lock);
117 * For non-periodic timers, increment the accumulator.
118 * This has the effect of treating non-periodic like periodic.
120 if ((devp->hd_flags & (HPET_IE | HPET_PERIODIC)) == HPET_IE) {
123 t = devp->hd_ireqfreq;
124 m = read_counter(&devp->hd_hpet->hpet_mc);
125 write_counter(t + m + devp->hd_hpets->hp_delta,
126 &devp->hd_timer->hpet_compare);
129 isr = (1 << (devp - devp->hd_hpets->hp_dev));
130 writeq(isr, &devp->hd_hpet->hpet_isr);
131 spin_unlock(&hpet_lock);
133 spin_lock(&hpet_task_lock);
135 devp->hd_task->ht_func(devp->hd_task->ht_data);
136 spin_unlock(&hpet_task_lock);
138 wake_up_interruptible(&devp->hd_waitqueue);
140 kill_fasync(&devp->hd_async_queue, SIGIO, POLL_IN);
145 static int hpet_open(struct inode *inode, struct file *file)
147 struct hpet_dev *devp;
151 spin_lock_irq(&hpet_lock);
153 for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
154 for (i = 0; i < hpetp->hp_ntimer; i++)
155 if (hpetp->hp_dev[i].hd_flags & HPET_OPEN
156 || hpetp->hp_dev[i].hd_task)
159 devp = &hpetp->hp_dev[i];
164 spin_unlock_irq(&hpet_lock);
168 file->private_data = devp;
169 devp->hd_irqdata = 0;
170 devp->hd_flags |= HPET_OPEN;
171 spin_unlock_irq(&hpet_lock);
177 hpet_read(struct file *file, char *buf, size_t count, loff_t * ppos)
179 DECLARE_WAITQUEUE(wait, current);
182 struct hpet_dev *devp;
184 devp = file->private_data;
185 if (!devp->hd_ireqfreq)
188 if (count < sizeof(unsigned long))
191 add_wait_queue(&devp->hd_waitqueue, &wait);
194 __set_current_state(TASK_INTERRUPTIBLE);
196 spin_lock_irq(&hpet_lock);
197 data = devp->hd_irqdata;
198 devp->hd_irqdata = 0;
199 spin_unlock_irq(&hpet_lock);
203 else if (file->f_flags & O_NONBLOCK) {
206 } else if (signal_pending(current)) {
207 retval = -ERESTARTSYS;
215 retval = put_user(data, (unsigned long *)buf);
217 retval = sizeof(unsigned long);
219 current->state = TASK_RUNNING;
220 remove_wait_queue(&devp->hd_waitqueue, &wait);
225 static unsigned int hpet_poll(struct file *file, poll_table * wait)
228 struct hpet_dev *devp;
230 devp = file->private_data;
232 if (!devp->hd_ireqfreq)
235 poll_wait(file, &devp->hd_waitqueue, wait);
237 spin_lock_irq(&hpet_lock);
238 v = devp->hd_irqdata;
239 spin_unlock_irq(&hpet_lock);
242 return POLLIN | POLLRDNORM;
247 static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
249 #ifdef CONFIG_HPET_NOMMAP
252 struct hpet_dev *devp;
255 if (((vma->vm_end - vma->vm_start) != PAGE_SIZE) || vma->vm_pgoff)
258 if (vma->vm_flags & VM_WRITE)
261 devp = file->private_data;
262 addr = (unsigned long)devp->hd_hpet;
264 if (addr & (PAGE_SIZE - 1))
267 vma->vm_flags |= VM_IO;
268 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
272 (vma, vma->vm_start, addr, PAGE_SIZE, vma->vm_page_prot)) {
273 printk(KERN_ERR "remap_page_range failed in hpet.c\n");
281 static int hpet_fasync(int fd, struct file *file, int on)
283 struct hpet_dev *devp;
285 devp = file->private_data;
287 if (fasync_helper(fd, file, on, &devp->hd_async_queue) >= 0)
293 static int hpet_release(struct inode *inode, struct file *file)
295 struct hpet_dev *devp;
296 struct hpet_timer *timer;
299 devp = file->private_data;
300 timer = devp->hd_timer;
302 spin_lock_irq(&hpet_lock);
304 writeq((readq(&timer->hpet_config) & ~Tn_INT_ENB_CNF_MASK),
305 &timer->hpet_config);
310 devp->hd_ireqfreq = 0;
312 if (devp->hd_flags & HPET_PERIODIC
313 && readq(&timer->hpet_config) & Tn_TYPE_CNF_MASK) {
316 v = readq(&timer->hpet_config);
317 v ^= Tn_TYPE_CNF_MASK;
318 writeq(v, &timer->hpet_config);
321 devp->hd_flags &= ~(HPET_OPEN | HPET_IE | HPET_PERIODIC);
322 spin_unlock_irq(&hpet_lock);
327 if (file->f_flags & FASYNC)
328 hpet_fasync(-1, file, 0);
330 file->private_data = 0;
334 static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int);
337 hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
340 struct hpet_dev *devp;
342 devp = file->private_data;
343 return hpet_ioctl_common(devp, cmd, arg, 0);
346 static int hpet_ioctl_ieon(struct hpet_dev *devp)
348 struct hpet_timer *timer;
352 unsigned long g, v, t, m;
353 unsigned long flags, isr;
355 timer = devp->hd_timer;
356 hpet = devp->hd_hpet;
357 hpetp = devp->hd_hpets;
359 v = readq(&timer->hpet_config);
360 spin_lock_irq(&hpet_lock);
362 if (devp->hd_flags & HPET_IE) {
363 spin_unlock_irq(&hpet_lock);
367 devp->hd_flags |= HPET_IE;
368 spin_unlock_irq(&hpet_lock);
370 t = readq(&timer->hpet_config);
371 irq = devp->hd_hdwirq;
376 sprintf(name, "hpet%d", (int)(devp - hpetp->hp_dev));
379 (irq, hpet_interrupt, SA_INTERRUPT, name, (void *)devp)) {
380 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq);
386 spin_lock_irq(&hpet_lock);
387 devp->hd_flags ^= HPET_IE;
388 spin_unlock_irq(&hpet_lock);
393 t = devp->hd_ireqfreq;
394 v = readq(&timer->hpet_config);
395 g = v | Tn_INT_ENB_CNF_MASK;
397 if (devp->hd_flags & HPET_PERIODIC) {
398 write_counter(t, &timer->hpet_compare);
399 g |= Tn_TYPE_CNF_MASK;
400 v |= Tn_TYPE_CNF_MASK;
401 writeq(v, &timer->hpet_config);
402 v |= Tn_VAL_SET_CNF_MASK;
403 writeq(v, &timer->hpet_config);
404 local_irq_save(flags);
405 m = read_counter(&hpet->hpet_mc);
406 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
408 local_irq_save(flags);
409 m = read_counter(&hpet->hpet_mc);
410 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
413 isr = (1 << (devp - hpets->hp_dev));
414 writeq(isr, &hpet->hpet_isr);
415 writeq(g, &timer->hpet_config);
416 local_irq_restore(flags);
421 static inline unsigned long hpet_time_div(unsigned long dis)
423 unsigned long long m = 1000000000000000ULL;
427 return (unsigned long)m;
431 hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
433 struct hpet_timer *timer;
445 timer = devp->hd_timer;
446 hpet = devp->hd_hpet;
447 hpetp = devp->hd_hpets;
450 return hpet_ioctl_ieon(devp);
459 if ((devp->hd_flags & HPET_IE) == 0)
461 v = readq(&timer->hpet_config);
462 v &= ~Tn_INT_ENB_CNF_MASK;
463 writeq(v, &timer->hpet_config);
465 free_irq(devp->hd_irq, devp);
468 devp->hd_flags ^= HPET_IE;
472 struct hpet_info info;
474 info.hi_ireqfreq = hpet_time_div(hpetp->hp_period *
477 readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
478 info.hi_hpet = devp->hd_hpets->hp_which;
479 info.hi_timer = devp - devp->hd_hpets->hp_dev;
480 if (copy_to_user((void *)arg, &info, sizeof(info)))
485 v = readq(&timer->hpet_config);
486 if ((v & Tn_PER_INT_CAP_MASK) == 0) {
490 devp->hd_flags |= HPET_PERIODIC;
493 v = readq(&timer->hpet_config);
494 if ((v & Tn_PER_INT_CAP_MASK) == 0) {
498 if (devp->hd_flags & HPET_PERIODIC &&
499 readq(&timer->hpet_config) & Tn_TYPE_CNF_MASK) {
500 v = readq(&timer->hpet_config);
501 v ^= Tn_TYPE_CNF_MASK;
502 writeq(v, &timer->hpet_config);
504 devp->hd_flags &= ~HPET_PERIODIC;
507 if (!kernel && (arg > hpet_max_freq) &&
508 !capable(CAP_SYS_RESOURCE)) {
513 if (arg & (arg - 1)) {
518 devp->hd_ireqfreq = hpet_time_div(hpetp->hp_period * arg);
524 static struct file_operations hpet_fops = {
525 .owner = THIS_MODULE,
531 .release = hpet_release,
532 .fasync = hpet_fasync,
536 EXPORT_SYMBOL(hpet_alloc);
537 EXPORT_SYMBOL(hpet_register);
538 EXPORT_SYMBOL(hpet_unregister);
539 EXPORT_SYMBOL(hpet_control);
541 int hpet_register(struct hpet_task *tp, int periodic)
545 struct hpet_timer *timer;
546 struct hpet_dev *devp;
551 mask = Tn_PER_INT_CAP_MASK;
560 spin_lock_irq(&hpet_task_lock);
561 spin_lock(&hpet_lock);
563 for (devp = 0, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
564 for (timer = hpetp->hp_hpet->hpet_timers, i = 0;
565 i < hpetp->hp_ntimer; i++, timer++) {
566 if ((readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK)
570 devp = &hpetp->hp_dev[i];
572 if (devp->hd_flags & HPET_OPEN || devp->hd_task) {
577 tp->ht_opaque = devp;
582 spin_unlock(&hpet_lock);
583 spin_unlock_irq(&hpet_task_lock);
591 static inline int hpet_tpcheck(struct hpet_task *tp)
593 struct hpet_dev *devp;
596 devp = tp->ht_opaque;
601 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
602 if (devp >= hpetp->hp_dev
603 && devp < (hpetp->hp_dev + hpetp->hp_ntimer)
604 && devp->hd_hpet == hpetp->hp_hpet)
610 int hpet_unregister(struct hpet_task *tp)
612 struct hpet_dev *devp;
613 struct hpet_timer *timer;
616 if ((err = hpet_tpcheck(tp)))
619 spin_lock_irq(&hpet_task_lock);
620 spin_lock(&hpet_lock);
622 devp = tp->ht_opaque;
623 if (devp->hd_task != tp) {
624 spin_unlock(&hpet_lock);
625 spin_unlock_irq(&hpet_task_lock);
629 timer = devp->hd_timer;
630 writeq((readq(&timer->hpet_config) & ~Tn_INT_ENB_CNF_MASK),
631 &timer->hpet_config);
632 devp->hd_flags &= ~(HPET_IE | HPET_PERIODIC);
634 spin_unlock(&hpet_lock);
635 spin_unlock_irq(&hpet_task_lock);
640 int hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
642 struct hpet_dev *devp;
645 if ((err = hpet_tpcheck(tp)))
648 spin_lock_irq(&hpet_lock);
649 devp = tp->ht_opaque;
650 if (devp->hd_task != tp) {
651 spin_unlock_irq(&hpet_lock);
654 spin_unlock_irq(&hpet_lock);
655 return hpet_ioctl_common(devp, cmd, arg, 1);
658 #ifdef CONFIG_TIME_INTERPOLATION
660 static unsigned long hpet_offset, last_wall_hpet;
661 static long hpet_nsecs_per_cycle, hpet_cycles_per_sec;
663 static unsigned long hpet_getoffset(void)
665 return hpet_offset + (read_counter(&hpets->hp_hpet->hpet_mc) -
666 last_wall_hpet) * hpet_nsecs_per_cycle;
669 static void hpet_update(long delta)
672 unsigned long offset;
674 mc = read_counter(&hpets->hp_hpet->hpet_mc);
675 offset = hpet_offset + (mc - last_wall_hpet) * hpet_nsecs_per_cycle;
677 if (delta < 0 || (unsigned long)delta < offset)
678 hpet_offset = offset - delta;
684 static void hpet_reset(void)
687 last_wall_hpet = read_counter(&hpets->hp_hpet->hpet_mc);
690 static struct time_interpolator hpet_interpolator = {
691 .get_offset = hpet_getoffset,
692 .update = hpet_update,
698 static ctl_table hpet_table[] = {
701 .procname = "max-user-freq",
702 .data = &hpet_max_freq,
703 .maxlen = sizeof(int),
705 .proc_handler = &proc_dointvec,
710 static ctl_table hpet_root[] = {
721 static ctl_table dev_root[] = {
732 static struct ctl_table_header *sysctl_header;
734 static void *hpet_start(struct seq_file *s, loff_t * pos)
739 for (n = *pos, hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
746 static void *hpet_next(struct seq_file *s, void *v, loff_t * pos)
752 return hpetp->hp_next;
755 static void hpet_stop(struct seq_file *s, void *v)
760 static int hpet_show(struct seq_file *s, void *v)
764 u64 cap, vendor, period;
767 hpet = hpetp->hp_hpet;
769 cap = readq(&hpet->hpet_cap);
770 period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >>
771 HPET_COUNTER_CLK_PERIOD_SHIFT;
772 vendor = (cap & HPET_VENDOR_ID_MASK) >> HPET_VENDOR_ID_SHIFT;
775 "HPET%d period = %d 10**-15 vendor = 0x%x number timer = %d\n",
776 hpetp->hp_which, (u32) period, (u32) vendor,
782 static struct seq_operations hpet_seq_ops = {
789 static int hpet_proc_open(struct inode *inode, struct file *file)
791 return seq_open(file, &hpet_seq_ops);
794 static struct file_operations hpet_proc_fops = {
795 .open = hpet_proc_open,
798 .release = seq_release
802 * Adjustment for when arming the timer with
803 * initial conditions. That is, main counter
804 * ticks expired before interrupts are enabled.
806 #define TICK_CALIBRATE (1000UL)
808 static unsigned long __init hpet_calibrate(struct hpets *hpetp)
810 struct hpet_timer *timer;
811 unsigned long t, m, count, i, flags, start;
812 struct hpet_dev *devp;
816 for (timer = 0, j = 0, devp = hpetp->hp_dev; j < hpetp->hp_ntimer;
818 if ((devp->hd_flags & HPET_OPEN) == 0) {
819 timer = devp->hd_timer;
826 hpet = hpets->hp_hpet;
827 t = read_counter(&timer->hpet_compare);
830 count = hpet_time_div(hpetp->hp_period * TICK_CALIBRATE);
832 local_irq_save(flags);
834 start = read_counter(&hpet->hpet_mc);
837 m = read_counter(&hpet->hpet_mc);
838 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
839 } while (i++, (m - start) < count);
841 local_irq_restore(flags);
843 return (m - start) / i;
846 int __init hpet_alloc(struct hpet_data *hdp)
849 struct hpet_dev *devp;
854 static struct hpets *last __initdata = (struct hpets *)0;
857 * hpet_alloc can be called by platform dependent code.
858 * if platform dependent code has allocated the hpet
859 * ACPI also reports hpet, then we catch it here.
861 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
862 if (hpetp->hp_hpet == (struct hpet *)(hdp->hd_address))
865 siz = sizeof(struct hpets) + ((hdp->hd_nirqs - 1) *
866 sizeof(struct hpet_dev));
868 hpetp = kmalloc(siz, GFP_KERNEL);
873 memset(hpetp, 0, siz);
875 hpetp->hp_which = hpet_nhpet++;
876 hpetp->hp_hpet = (struct hpet *)hdp->hd_address;
878 hpetp->hp_ntimer = hdp->hd_nirqs;
880 for (i = 0; i < hdp->hd_nirqs; i++)
881 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i];
883 hpet = hpetp->hp_hpet;
885 cap = readq(&hpet->hpet_cap);
887 ntimer = ((cap & HPET_NUM_TIM_CAP_MASK) >> HPET_NUM_TIM_CAP_SHIFT) + 1;
889 if (hpetp->hp_ntimer != ntimer) {
890 printk(KERN_WARNING "hpet: number irqs doesn't agree"
891 " with number of timers\n");
897 last->hp_next = hpetp;
903 hpetp->hp_period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >>
904 HPET_COUNTER_CLK_PERIOD_SHIFT;
906 mcfg = readq(&hpet->hpet_config);
907 if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {
908 write_counter(0L, &hpet->hpet_mc);
909 mcfg |= HPET_ENABLE_CNF_MASK;
910 writeq(mcfg, &hpet->hpet_config);
913 for (i = 0, devp = hpetp->hp_dev; i < hpetp->hp_ntimer;
914 i++, hpet_ntimer++, devp++) {
916 struct hpet_timer *timer;
918 timer = &hpet->hpet_timers[devp - hpetp->hp_dev];
919 v = readq(&timer->hpet_config);
921 devp->hd_hpets = hpetp;
922 devp->hd_hpet = hpet;
923 devp->hd_timer = timer;
926 * If the timer was reserved by platform code,
927 * then make timer unavailable for opens.
929 if (hdp->hd_state & (1 << i)) {
930 devp->hd_flags = HPET_OPEN;
934 init_waitqueue_head(&devp->hd_waitqueue);
937 hpetp->hp_delta = hpet_calibrate(hpetp);
942 static acpi_status __init hpet_resources(struct acpi_resource *res, void *data)
944 struct hpet_data *hdp;
946 struct acpi_resource_address64 addr;
951 status = acpi_resource_to_address64(res, &addr);
953 if (ACPI_SUCCESS(status)) {
956 size = addr.max_address_range - addr.min_address_range + 1;
958 (unsigned long)ioremap(addr.min_address_range, size);
960 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
961 if (hpetp->hp_hpet == (struct hpet *)(hdp->hd_address))
963 } else if (res->id == ACPI_RSTYPE_EXT_IRQ) {
964 struct acpi_resource_ext_irq *irqp;
967 irqp = &res->data.extended_irq;
969 if (irqp->number_of_interrupts > 0) {
970 hdp->hd_nirqs = irqp->number_of_interrupts;
972 for (i = 0; i < hdp->hd_nirqs; i++)
975 acpi_register_gsi(irqp->interrupts[i],
977 irqp->active_high_low);
979 hdp->hd_irq[i] = irqp->interrupts[i];
987 static int __init hpet_acpi_add(struct acpi_device *device)
990 struct hpet_data data;
992 memset(&data, 0, sizeof(data));
995 acpi_walk_resources(device->handle, METHOD_NAME__CRS,
996 hpet_resources, &data);
998 if (ACPI_FAILURE(result))
1001 if (!data.hd_address || !data.hd_nirqs) {
1002 printk("%s: no address or irqs in _CRS\n", __FUNCTION__);
1006 return hpet_alloc(&data);
1009 static int __init hpet_acpi_remove(struct acpi_device *device, int type)
1014 static struct acpi_driver hpet_acpi_driver __initdata = {
1019 .add = hpet_acpi_add,
1020 .remove = hpet_acpi_remove,
1024 static struct miscdevice hpet_misc = { HPET_MINOR, "hpet", &hpet_fops };
1026 static int __init hpet_init(void)
1028 struct proc_dir_entry *entry;
1030 (void)acpi_bus_register_driver(&hpet_acpi_driver);
1033 if (misc_register(&hpet_misc))
1036 entry = create_proc_entry("driver/hpet", 0, 0);
1039 entry->proc_fops = &hpet_proc_fops;
1041 sysctl_header = register_sysctl_table(dev_root, 0);
1043 #ifdef CONFIG_TIME_INTERPOLATION
1047 hpet = hpets->hp_hpet;
1048 hpet_cycles_per_sec = hpet_time_div(hpets->hp_period);
1049 hpet_interpolator.frequency = hpet_cycles_per_sec;
1050 hpet_interpolator.drift = hpet_cycles_per_sec *
1051 HPET_DRIFT / 1000000;
1052 hpet_nsecs_per_cycle = 1000000000 / hpet_cycles_per_sec;
1053 register_time_interpolator(&hpet_interpolator);
1061 static void __exit hpet_exit(void)
1063 acpi_bus_unregister_driver(&hpet_acpi_driver);
1066 unregister_sysctl_table(sysctl_header);
1067 remove_proc_entry("driver/hpet", NULL);
1073 module_init(hpet_init);
1074 module_exit(hpet_exit);
1075 MODULE_AUTHOR("Bob Picco <Robert.Picco@hp.com>");
1076 MODULE_LICENSE("GPL");