lkml.org 
[lkml]   [2012]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] char/mem: Make /dev/port less obviously broken (v0)
On Mon, Feb 06, 2012 at 06:02:02PM -0500, Adam Jackson wrote:
> Did you know /dev/port turns all reads and writes into a stream of inb
> and outb? Turns out hardware really does care about I/O cycle size
> though, and if you're trying to do an outl four outb's is very much not
> the same thing.
>
> However, someone somewhere probably built some code and hardware that
> relies on that behaviour. Plus, userspace needs to be able to tell
> whether the kernel will do the right thing, and fall back to raw port
> access if not. So add an ioctl to request new 'strict' semantics, which
> allows only exactly 1/2/4 byte cycles and translates them into the
> corresponding I/O cycle size. This matches the behaviour of sysfs's
> resourceN files for I/O BARs.

Who would use this new ioctl? And if it's been working ok until now,
why is it needed?

If you want something "new" like this, why not just create /dev/ioport
or something like that to always use the proper alignment and not need
an ioctl at all?

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-02-07 01:29    [from the cache]
©2003-2011 Jasper Spaans