> On Mon, Sep 17, 2001 at 03:11:26PM -0400, John Weber wrote:
> > David Fries wrote:
> > >
> > > I'm using the TSC of the Pentium processors to get some precise timing
> > > delays for writing to a eeprom (bit banging bus operations), and it
> > > works just fine, but the cpu_khz variable isn't exported to a kernel
> > > module, so I hardcoded in my module. It works fine for that one
> > > system, but obviously I don't want to hard code it for the general
> > > case. I guess I could write my own routine to figure out what the
> > > cpu_khz is, but it is already done, so how do I get access to it?
> >
> > I don't know of any official way of doing this, but here's some
> > code (written by aa) that accomplishes this.
>
> For a user space program you could just read /proc/cpuinfo, I'm
> actually writing a kernel driver, maybe I wasn't clear enough. I'm
> just frustrated because the variable I'm after, cpu_khz is already
> calculated at boot time (that's where /proc/cpuinfo gets its data) and
> that variable doesn't appear to be exported to the rest of the kernel,
> either that or I'm just missing something, which I would rather be the
> case at this point.
>
Ask Alan to export it by default. If no-go, export it in your
configuration.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
I was going to compile a list of innovations that could be
attributed to Microsoft. Once I realized that Ctrl-Alt-Del
was handled in the BIOS, I found that there aren't any.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/