Re: Exposing ROM's though sysfs

Martin Mares
2004-07-30T20:11:27Z

Hello!

> So normal hardware would never ask for the cache since it isn't needed.
> In the normal hardware case direct ROM access is used. If the
> minimalistic hardware is using a user space driver it won't ask for the
> cache either. The only time you get cached is on minimal hardware and
> when the driver asks for it. Since the driver is asking for the cache
> you have to assume that it needs it so the memory isn't wasted.

No, we are speaking about sysfs access to the ROM and the driver itself
is unable to predict whether anybody will ever want to use that sysfs file,
so it would have to cache always.

Do I understand it correctly that the ROM-in-sysfs hack is intended only
for debugging? If it is so, I do not see why we should do anything complicated
in order to avoid root shooting himself in the foot.

Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Immanuel doesn't pun, he Kant.