[lkml]   [2008]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 18/23] sparc: use the new byteorder headers
From: Harvey Harrison <>
Date: Mon, 18 Aug 2008 17:48:17 -0700

> Signed-off-by: Harvey Harrison <>

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.

 \ /
  Last update: 2008-08-19 10:47    [W:0.043 / U:44.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site