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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Tuesday, August 19, 2008 - 1:43 am

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


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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 18/23] sparc: use the new byteorder headers, Harvey Harrison, (Mon Aug 18, 5:48 pm)
Re: [PATCH 18/23] sparc: use the new byteorder headers, David Miller, (Tue Aug 19, 1:43 am)
Re: [PATCH 18/23] sparc: use the new byteorder headers, Harvey Harrison, (Tue Aug 19, 12:02 pm)