Re: [PATCH 02/23] arm: use the new byteorder headers

From: David Woodhouse
Date: Fri Sep 05 2008 - 10:06:23 EST


On Fri, 2008-09-05 at 11:25 +0100, Russell King wrote:
> On Fri, Sep 05, 2008 at 10:49:29AM +0100, David Woodhouse wrote:
> > On Tue, 2008-08-19 at 12:03 -0700, Harvey Harrison wrote:
> > > include/linux/swab.h, include/linux/byteorder.h are in current
> > > mainline which is all that these patches depend on.
> >
> > Er, it also depends on the patch which exports those headers to
> > userspace, which isn't in Linus' tree yet.
>
> How useful. If those generic headers are already in Linus' tree, and
> are required for architectures to convert, why hasn't the patch which
> exports them to userspace already been submitted?

Because they weren't being used by anything exported to userspace yet.
The patch has been seen, but wasn't destined for 2.6.27...

> However, another question: why should userspace be using a kernel header
> file for byteswapping?

... mostly (on my part, at least) because of that question.

Given my druthers, I'd revert the ARM part of the patch for now, and we
can have a _serious_ think about whether we really need to export these
functions to userspace.

A quick survey shows that the following user-visible headers currently
use cpu_to_xxx() and xxx_to_cpu():

linux/romfs_fs.h
linux/bfs_fs.h
linux/ext2_fs.h
linux/reiserfs_fs.h
linux/msdos_fs.h
linux/ncp.h
linux/ncp_no.h

Of those, most of them use the form without underscores, which isn't
visible in userspace _anyway_ and would be broken even if the new header
is exported. I suspect that they should all just be dropped from the
list of exported headers.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@xxxxxxxxx Intel Corporation



--
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/