* [PATCH 02/23] arm: use the new byteorder headers @ 2008-08-19 0:47 Harvey Harrison 2008-08-19 7:27 ` Russell King 0 siblings, 1 reply; 7+ messages in thread From: Harvey Harrison @ 2008-08-19 0:47 UTC (permalink / raw) To: Andrew Morton; +Cc: Russell King, LKML Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> --- arch/arm/include/asm/byteorder.h | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h index 4fbfb22..d04a7a2 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h @@ -18,7 +18,15 @@ #include <linux/compiler.h> #include <asm/types.h> -static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) +#ifdef __ARMEB__ +# define __BIG_ENDIAN +#else +# define __LITTLE_ENDIAN +#endif + +#define __SWAB_64_THRU_32__ + +static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { __u32 t; @@ -40,19 +48,8 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) return x; } +#define __arch_swab32 __arch_swab32 -#define __arch__swab32(x) ___arch__swab32(x) - -#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __BYTEORDER_HAS_U64__ -# define __SWAB_64_THRU_32__ -#endif - -#ifdef __ARMEB__ -#include <linux/byteorder/big_endian.h> -#else -#include <linux/byteorder/little_endian.h> -#endif +#include <linux/byteorder.h> #endif - -- 1.6.0.274.g8aacc ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 02/23] arm: use the new byteorder headers 2008-08-19 0:47 [PATCH 02/23] arm: use the new byteorder headers Harvey Harrison @ 2008-08-19 7:27 ` Russell King 2008-08-19 19:03 ` Harvey Harrison 0 siblings, 1 reply; 7+ messages in thread From: Russell King @ 2008-08-19 7:27 UTC (permalink / raw) To: Harvey Harrison; +Cc: Andrew Morton, LKML On Mon, Aug 18, 2008 at 05:47:55PM -0700, Harvey Harrison wrote: > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> > --- > arch/arm/include/asm/byteorder.h | 25 +++++++++++-------------- > 1 files changed, 11 insertions(+), 14 deletions(-) You keep posting this, and it's the only bit I see, but... what about the other bits that it depends on, which without them, it's impossible to test this patch with? -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/23] arm: use the new byteorder headers 2008-08-19 7:27 ` Russell King @ 2008-08-19 19:03 ` Harvey Harrison 2008-09-05 9:49 ` David Woodhouse 0 siblings, 1 reply; 7+ messages in thread From: Harvey Harrison @ 2008-08-19 19:03 UTC (permalink / raw) To: Russell King; +Cc: Andrew Morton, LKML On Tue, 2008-08-19 at 08:27 +0100, Russell King wrote: > On Mon, Aug 18, 2008 at 05:47:55PM -0700, Harvey Harrison wrote: > > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> > > --- > > arch/arm/include/asm/byteorder.h | 25 +++++++++++-------------- > > 1 files changed, 11 insertions(+), 14 deletions(-) > > You keep posting this, and it's the only bit I see, but... what about > the other bits that it depends on, which without them, it's impossible > to test this patch with? > include/linux/swab.h, include/linux/byteorder.h are in current mainline which is all that these patches depend on. Harvey ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/23] arm: use the new byteorder headers 2008-08-19 19:03 ` Harvey Harrison @ 2008-09-05 9:49 ` David Woodhouse 2008-09-05 10:25 ` Russell King 0 siblings, 1 reply; 7+ messages in thread From: David Woodhouse @ 2008-09-05 9:49 UTC (permalink / raw) To: Harvey Harrison; +Cc: Russell King, Andrew Morton, LKML, Khem Raj 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. So merging this for ARM (between -rc4 and rc5!) has broken the exported headers on ARM -- as noted by Khem. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/23] arm: use the new byteorder headers 2008-09-05 9:49 ` David Woodhouse @ 2008-09-05 10:25 ` Russell King 2008-09-05 14:06 ` David Woodhouse 0 siblings, 1 reply; 7+ messages in thread From: Russell King @ 2008-09-05 10:25 UTC (permalink / raw) To: David Woodhouse; +Cc: Harvey Harrison, Andrew Morton, LKML, Khem Raj 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? However, another question: why should userspace be using a kernel header file for byteswapping? -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/23] arm: use the new byteorder headers 2008-09-05 10:25 ` Russell King @ 2008-09-05 14:06 ` David Woodhouse 2008-09-05 14:37 ` Russell King 0 siblings, 1 reply; 7+ messages in thread From: David Woodhouse @ 2008-09-05 14:06 UTC (permalink / raw) To: Russell King; +Cc: Harvey Harrison, Andrew Morton, LKML, Khem Raj 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@intel.com Intel Corporation ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 02/23] arm: use the new byteorder headers 2008-09-05 14:06 ` David Woodhouse @ 2008-09-05 14:37 ` Russell King 0 siblings, 0 replies; 7+ messages in thread From: Russell King @ 2008-09-05 14:37 UTC (permalink / raw) To: David Woodhouse; +Cc: Harvey Harrison, Andrew Morton, LKML, Khem Raj On Fri, Sep 05, 2008 at 03:06:06PM +0100, David Woodhouse wrote: > 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. I'll revert it, and if it's resubmitted, I'll ignore it until after the next merge window - since my tree for the upcoming merge window currently pre-dates the revert, so effectively continues to carry it until it's merged. I'm not sure what went wrong, other than being continuously bugged by Harvey to apply his patch. If his patches are inappropriate, surely that should've been pointed out to Harvey before he got the first of his series merged? Maybe more of his patches need reverting if some have been applied? -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-05 14:42 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-19 0:47 [PATCH 02/23] arm: use the new byteorder headers Harvey Harrison 2008-08-19 7:27 ` Russell King 2008-08-19 19:03 ` Harvey Harrison 2008-09-05 9:49 ` David Woodhouse 2008-09-05 10:25 ` Russell King 2008-09-05 14:06 ` David Woodhouse 2008-09-05 14:37 ` Russell King
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox