Quantcast
Channel: lkml.org : Ganesh Sittampalam
Viewing all articles
Browse latest Browse all 627

Re: [PATCH] bitmap: fix memset optimization on big-endian systems

$
0
0
Linus Torvalds writes: (Summary) This is wrong on big-endian systems;
Ugh, yes.
Ugh, yes.
In retrospect, I do wish I had just made the bitmap types be byte-based, but we had strong reasons for those "unsigned long" array semantics.
semantics.
The traditional problem - and the reason why it is byte-order dependent - was that we often mix bitmap operations with "unsigned long flags" style operations.
long flags" style operations.
We should probably have at least switched it to "unsigned long int" with the whole 64-bit transition, but never did even that, so the bitmap format is not just byte order dependent, but dependent on the size of "long".
size of "long".
I guess the "unsigned long flag" issue still exists in several places, and we're stuck with it, probably forever.

Viewing all articles
Browse latest Browse all 627

Trending Articles