2023-01-13 00:17:54

by Paul E. McKenney

[permalink] [raw]
Subject: [PATCH rcu v2 15/20] kernel/notifier: Remove CONFIG_SRCU

Now that the SRCU Kconfig option is unconditionally selected, there is
no longer any point in conditional compilation based on CONFIG_SRCU.
Therefore, remove the #ifdef.

Signed-off-by: Paul E. McKenney <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: "Michał Mirosław" <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Alan Stern <[email protected]>
Reviewed-by: John Ogness <[email protected]>
---
kernel/notifier.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/notifier.c b/kernel/notifier.c
index ab75637fd904f..d353e4b5402d7 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -456,7 +456,6 @@ int raw_notifier_call_chain(struct raw_notifier_head *nh,
}
EXPORT_SYMBOL_GPL(raw_notifier_call_chain);

-#ifdef CONFIG_SRCU
/*
* SRCU notifier chain routines. Registration and unregistration
* use a mutex, and call_chain is synchronized by SRCU (no locks).
@@ -573,8 +572,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh)
}
EXPORT_SYMBOL_GPL(srcu_init_notifier_head);

-#endif /* CONFIG_SRCU */
-
static ATOMIC_NOTIFIER_HEAD(die_chain);

int notrace notify_die(enum die_val val, const char *str,
--
2.31.1.189.g2e36527f23


2023-01-13 11:53:27

by Wysocki, Rafael J

[permalink] [raw]
Subject: Re: [PATCH rcu v2 15/20] kernel/notifier: Remove CONFIG_SRCU


On 1/13/2023 1:11 AM, Paul E. McKenney wrote:
> Now that the SRCU Kconfig option is unconditionally selected, there is
> no longer any point in conditional compilation based on CONFIG_SRCU.
> Therefore, remove the #ifdef.
>
> Signed-off-by: Paul E. McKenney <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: "Michał Mirosław" <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: Alan Stern <[email protected]>
> Reviewed-by: John Ogness <[email protected]>

Acked-by: Rafael J. Wysocki <[email protected]>


> ---
> kernel/notifier.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/kernel/notifier.c b/kernel/notifier.c
> index ab75637fd904f..d353e4b5402d7 100644
> --- a/kernel/notifier.c
> +++ b/kernel/notifier.c
> @@ -456,7 +456,6 @@ int raw_notifier_call_chain(struct raw_notifier_head *nh,
> }
> EXPORT_SYMBOL_GPL(raw_notifier_call_chain);
>
> -#ifdef CONFIG_SRCU
> /*
> * SRCU notifier chain routines. Registration and unregistration
> * use a mutex, and call_chain is synchronized by SRCU (no locks).
> @@ -573,8 +572,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh)
> }
> EXPORT_SYMBOL_GPL(srcu_init_notifier_head);
>
> -#endif /* CONFIG_SRCU */
> -
> static ATOMIC_NOTIFIER_HEAD(die_chain);
>
> int notrace notify_die(enum die_val val, const char *str,

2023-01-13 19:50:20

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH rcu v2 15/20] kernel/notifier: Remove CONFIG_SRCU

On Fri, Jan 13, 2023 at 12:25:48PM +0100, Wysocki, Rafael J wrote:
>
> On 1/13/2023 1:11 AM, Paul E. McKenney wrote:
> > Now that the SRCU Kconfig option is unconditionally selected, there is
> > no longer any point in conditional compilation based on CONFIG_SRCU.
> > Therefore, remove the #ifdef.
> >
> > Signed-off-by: Paul E. McKenney <[email protected]>
> > Cc: "Rafael J. Wysocki" <[email protected]>
> > Cc: "Michał Mirosław" <[email protected]>
> > Cc: Borislav Petkov <[email protected]>
> > Cc: Alan Stern <[email protected]>
> > Reviewed-by: John Ogness <[email protected]>
>
> Acked-by: Rafael J. Wysocki <[email protected]>

Thank you! I will apply both of your acks on my next rebase.

Thanx, Paul

> > ---
> > kernel/notifier.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/kernel/notifier.c b/kernel/notifier.c
> > index ab75637fd904f..d353e4b5402d7 100644
> > --- a/kernel/notifier.c
> > +++ b/kernel/notifier.c
> > @@ -456,7 +456,6 @@ int raw_notifier_call_chain(struct raw_notifier_head *nh,
> > }
> > EXPORT_SYMBOL_GPL(raw_notifier_call_chain);
> > -#ifdef CONFIG_SRCU
> > /*
> > * SRCU notifier chain routines. Registration and unregistration
> > * use a mutex, and call_chain is synchronized by SRCU (no locks).
> > @@ -573,8 +572,6 @@ void srcu_init_notifier_head(struct srcu_notifier_head *nh)
> > }
> > EXPORT_SYMBOL_GPL(srcu_init_notifier_head);
> > -#endif /* CONFIG_SRCU */
> > -
> > static ATOMIC_NOTIFIER_HEAD(die_chain);
> > int notrace notify_die(enum die_val val, const char *str,