lkml.org 
[lkml]   [2023]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/17] m68k: Implement xor_unlock_is_negative_byte
On Tue, Sep 19, 2023 at 03:22:25PM +0000, David Laight wrote:
> > Anyway, that's not the brief. We're looking to (eg) clear bit 0
> > and test whether bit 7 was set. So it's the sign bit of the byte,
> > not the sign bit of the int.
>
> Use the address of the byte as an int and xor with 1u<<24.
> The xor will do a rmw on the three bytes following, but I
> doubt that matters.

Bet you a shiny penny that Coldfire takes an unaligned access trap ...
and besides, this is done on _every_ call to unlock_page(). That might
cross not only a cacheline boundary but also a page boundary. I cannot
believe that would be a high-performing solution. It might be just fine
on m68000 but I bet even by the 030 it's lower performing.

\
 
 \ /
  Last update: 2023-09-19 17:48    [W:0.110 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site