Re: [PATCH] HPET driver

From: Andrew Morton
Date: Thu May 13 2004 - 18:46:31 EST


Andrew Morton <akpm@xxxxxxxx> wrote:
>
> hm, I'm trying to decrypt how the driver accesses the hardware. It's
> taking copies of kernel virtual addresses based off hpet_virt_address, but
> there are no readl's or writel's in there. Is the actual device access
> done over in time_hpet.c?
>

Oh. That's why the volatiles are there.

+static int
+hpet_release (struct inode *inode, struct file *file)
+{
+ struct hpet_dev *devp;
+ volatile struct hpet_timer *timer;
+
+ devp = file->private_data;
+ timer = devp->hd_timer;
+
+ spin_lock_irq(&hpet_lock);
+
+ timer->hpet_config &= ~Tn_INT_ENB_CNF_MASK;

local variable `timer' points at hardware.

Methinks this all should be converted to readl and friends, no?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/