lkml.org 
[lkml]   [2019]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 15/16] locking/rwsem: Merge owner into count on x86-64
On Sat, Apr 13, 2019 at 01:22:58PM -0400, Waiman Long wrote:
> +#ifdef CONFIG_X86_64
> +#define RWSEM_MERGE_OWNER_TO_COUNT
> +#endif

> +#ifdef RWSEM_MERGE_OWNER_TO_COUNT
> +
> +#ifdef __PHYSICAL_MASK_SHIFT
> +#define RWSEM_PA_MASK_SHIFT __PHYSICAL_MASK_SHIFT
> +#else
> +#define RWSEM_PA_MASK_SHIFT 52
> +#endif

I really dislike how this hardcodes x86_64.

It would be much better to have a CONFIG variable that gives us the
PA_BITS. Then all an architecture needs to do is set that right.

FWIW:

arch/arm64/Kconfig:config ARM64_PA_BITS_48
arch/arm64/Kconfig:config ARM64_PA_BITS_52

So ARM64 could also use this -- provided we get that overflow thing
sorted.

\
 
 \ /
  Last update: 2019-04-18 16:29    [W:0.583 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site