lkml.org 
[lkml]   [2021]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] softirq/s390: Use the generic local_softirq_pending()
On Mon, May 24, 2021 at 08:39:17PM +0800, Yejune Deng wrote:
> Defined local_softirq_pending_ref macro and get rid of {local, set, or}
> _softirq_pending macros. use {local, set, or}_softirq_pending
> in <linux/interrupt.h> that rely on per-CPU mutators.
>
> Signed-off-by: Yejune Deng <yejunedeng@gmail.com>
> ---
> arch/s390/include/asm/hardirq.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/s390/include/asm/hardirq.h b/arch/s390/include/asm/hardirq.h
> index 58668ff..ea643d6 100644
> --- a/arch/s390/include/asm/hardirq.h
> +++ b/arch/s390/include/asm/hardirq.h
> @@ -13,9 +13,7 @@
>
> #include <asm/lowcore.h>
>
> -#define local_softirq_pending() (S390_lowcore.softirq_pending)
> -#define set_softirq_pending(x) (S390_lowcore.softirq_pending = (x))
> -#define or_softirq_pending(x) (S390_lowcore.softirq_pending |= (x))
> +#define local_softirq_pending_ref S390_lowcore.softirq_pending

S390_lowcore is not a per-CPU variable, so it cannot be accessed with
__this_cpu_read/write...

"lowcore" is a kind of hardware "per-CPU" area on s390. Each cpu accessing
first 2 pages at the real address 0 is actually touching pages at the
"absolute" address specified by prefix register of this cpu.

\
 
 \ /
  Last update: 2021-05-27 02:07    [W:0.048 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site