Re: [PATCH 18/23] sparc: use the new byteorder headers

From: David Miller
Date: Tue Aug 19 2008 - 04:44:02 EST


From: Harvey Harrison <harvey.harrison@xxxxxxxxx>
Date: Mon, 18 Aug 2008 17:48:17 -0700

> Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>

I'm not so sure about this.

If I understand the ___swab*() inlines in linux/swab.h,
it has the following priority of swapping methods:

1) If arch defines __arch_swab*(), this is used.

2) If arch defines __arch_swab*p(), variable is popped onto
the stack and we do the pointer based operation.

3) Else normal C version is used.

Case #2 is totally disagree with.

Especially for small swaps such as 16-bit the inline expansion
of the portable C code is going to be much better than popping
the variable onto and then back off the stack.

Sparc 64-bit only provides the __arch_swab*p() routines so
#2 is what will in fact be used here.

So NACK based upon that analysis.
--
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/