* [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION
[not found] <20191015191821.11479-1-bigeasy@linutronix.de>
@ 2019-10-15 19:17 ` Sebastian Andrzej Siewior
2019-10-16 4:57 ` Christophe Leroy
0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-10-15 19:17 UTC (permalink / raw)
To: linux-kernel
Cc: Sebastian Andrzej Siewior, Paul Mackerras, tglx, linuxppc-dev
From: Thomas Gleixner <tglx@linutronix.de>
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
Both PREEMPT and PREEMPT_RT require the same functionality which today
depends on CONFIG_PREEMPT.
Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT
output in __die().
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: +traps.c, Kconfig]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/entry_32.S | 4 ++--
arch/powerpc/kernel/entry_64.S | 4 ++--
arch/powerpc/kernel/traps.c | 7 ++++++-
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3e56c9c2f16ee..8ead8d6e1cbc8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -106,7 +106,7 @@ config LOCKDEP_SUPPORT
config GENERIC_LOCKBREAK
bool
default y
- depends on SMP && PREEMPT
+ depends on SMP && PREEMPTION
config GENERIC_HWEIGHT
bool
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index d60908ea37fb9..e1a4c39b83b86 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -897,7 +897,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* check current_thread_info->preempt_count */
lwz r0,TI_PREEMPT(r2)
cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
@@ -921,7 +921,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
*/
bl trace_hardirqs_on
#endif
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
restore_kuap:
kuap_restore r1, r2, r9, r10, r0
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 6467bdab8d405..83733376533e8 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -840,7 +840,7 @@ _GLOBAL(ret_from_except_lite)
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* Check if we need to preempt */
andi. r0,r4,_TIF_NEED_RESCHED
beq+ restore
@@ -871,7 +871,7 @@ _GLOBAL(ret_from_except_lite)
li r10,MSR_RI
mtmsrd r10,1 /* Update machine state */
#endif /* CONFIG_PPC_BOOK3E */
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
.globl fast_exc_return_irq
fast_exc_return_irq:
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 82f43535e6867..23d2f20be4f2e 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -252,14 +252,19 @@ NOKPROBE_SYMBOL(oops_end);
static int __die(const char *str, struct pt_regs *regs, long err)
{
+ const char *pr = "";
+
printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
+ if (IS_ENABLED(CONFIG_PREEMPTION))
+ pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
+
printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s%s %s\n",
IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
PAGE_SIZE / 1024,
early_radix_enabled() ? " MMU=Radix" : "",
early_mmu_has_feature(MMU_FTR_HPTE_TABLE) ? " MMU=Hash" : "",
- IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
+ pr,
IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
--
2.23.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION
2019-10-15 19:17 ` [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION Sebastian Andrzej Siewior
@ 2019-10-16 4:57 ` Christophe Leroy
2019-10-16 7:48 ` Sebastian Andrzej Siewior
2019-10-16 9:33 ` Michael Ellerman
0 siblings, 2 replies; 9+ messages in thread
From: Christophe Leroy @ 2019-10-16 4:57 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, linux-kernel
Cc: linuxppc-dev, tglx, Paul Mackerras
Le 15/10/2019 à 21:17, Sebastian Andrzej Siewior a écrit :
> From: Thomas Gleixner <tglx@linutronix.de>
>
> CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
> Both PREEMPT and PREEMPT_RT require the same functionality which today
> depends on CONFIG_PREEMPT.
>
> Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT
> output in __die().
powerpc doesn't select ARCH_SUPPORTS_RT, so this change is useless as
CONFIG_PREEMPT_RT cannot be selected.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> [bigeasy: +traps.c, Kconfig]
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> arch/powerpc/Kconfig | 2 +-
> arch/powerpc/kernel/entry_32.S | 4 ++--
> arch/powerpc/kernel/entry_64.S | 4 ++--
> arch/powerpc/kernel/traps.c | 7 ++++++-
> 4 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 3e56c9c2f16ee..8ead8d6e1cbc8 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -106,7 +106,7 @@ config LOCKDEP_SUPPORT
> config GENERIC_LOCKBREAK
> bool
> default y
> - depends on SMP && PREEMPT
> + depends on SMP && PREEMPTION
>
> config GENERIC_HWEIGHT
> bool
> diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
> index d60908ea37fb9..e1a4c39b83b86 100644
> --- a/arch/powerpc/kernel/entry_32.S
> +++ b/arch/powerpc/kernel/entry_32.S
> @@ -897,7 +897,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
> bne- 0b
> 1:
>
> -#ifdef CONFIG_PREEMPT
> +#ifdef CONFIG_PREEMPTION
> /* check current_thread_info->preempt_count */
> lwz r0,TI_PREEMPT(r2)
> cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
> @@ -921,7 +921,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
> */
> bl trace_hardirqs_on
> #endif
> -#endif /* CONFIG_PREEMPT */
> +#endif /* CONFIG_PREEMPTION */
> restore_kuap:
> kuap_restore r1, r2, r9, r10, r0
>
> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> index 6467bdab8d405..83733376533e8 100644
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -840,7 +840,7 @@ _GLOBAL(ret_from_except_lite)
> bne- 0b
> 1:
>
> -#ifdef CONFIG_PREEMPT
> +#ifdef CONFIG_PREEMPTION
> /* Check if we need to preempt */
> andi. r0,r4,_TIF_NEED_RESCHED
> beq+ restore
> @@ -871,7 +871,7 @@ _GLOBAL(ret_from_except_lite)
> li r10,MSR_RI
> mtmsrd r10,1 /* Update machine state */
> #endif /* CONFIG_PPC_BOOK3E */
> -#endif /* CONFIG_PREEMPT */
> +#endif /* CONFIG_PREEMPTION */
>
> .globl fast_exc_return_irq
> fast_exc_return_irq:
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index 82f43535e6867..23d2f20be4f2e 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -252,14 +252,19 @@ NOKPROBE_SYMBOL(oops_end);
>
> static int __die(const char *str, struct pt_regs *regs, long err)
> {
> + const char *pr = "";
> +
Please follow the same approach as already existing. Don't add a local
var for that.
> printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
>
> + if (IS_ENABLED(CONFIG_PREEMPTION))
> + pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
> +
drop
> printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s%s %s\n",
Add one %s
> IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
> PAGE_SIZE / 1024,
> early_radix_enabled() ? " MMU=Radix" : "",
> early_mmu_has_feature(MMU_FTR_HPTE_TABLE) ? " MMU=Hash" : "",
> - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
Replace by: IS_ENABLED(CONFIG_PREEMPTION) ? " PREEMPT" : ""
> + pr,
add something like: IS_ENABLED(CONFIG_PREEMPT_RT) ? "_RT" : ""
> IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
> IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
> debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>
Christophe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION
2019-10-16 4:57 ` Christophe Leroy
@ 2019-10-16 7:48 ` Sebastian Andrzej Siewior
2019-10-16 9:33 ` Michael Ellerman
1 sibling, 0 replies; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-10-16 7:48 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linux-kernel, Paul Mackerras, tglx, linuxppc-dev
On 2019-10-16 06:57:48 [+0200], Christophe Leroy wrote:
>
>
> Le 15/10/2019 à 21:17, Sebastian Andrzej Siewior a écrit :
> > From: Thomas Gleixner <tglx@linutronix.de>
> >
> > CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
> > Both PREEMPT and PREEMPT_RT require the same functionality which today
> > depends on CONFIG_PREEMPT.
> >
> > Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT
> > output in __die().
>
> powerpc doesn't select ARCH_SUPPORTS_RT, so this change is useless as
> CONFIG_PREEMPT_RT cannot be selected.
No it is not. It makes it possible for PowerPC to select it one day and
I have patches for it today. Also, if other ARCH copies code from
PowerPC it will copy the correct thing (as in distinguish between the
flavour PREEMPT and the functionality PREEMPTION).
> > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> > index 82f43535e6867..23d2f20be4f2e 100644
> > --- a/arch/powerpc/kernel/traps.c
> > +++ b/arch/powerpc/kernel/traps.c
> > @@ -252,14 +252,19 @@ NOKPROBE_SYMBOL(oops_end);
> > static int __die(const char *str, struct pt_regs *regs, long err)
> > {
> > + const char *pr = "";
> > +
>
> Please follow the same approach as already existing. Don't add a local var
> for that.
I would leave it to the maintainer to comment on that and decide which
one they want. My eyes find it more readable and the compiles does not
create more code.
> > printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
> > + if (IS_ENABLED(CONFIG_PREEMPTION))
> > + pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
> > +
>
> drop
>
> > printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s%s %s\n",
>
> Add one %s
>
> > IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
> > PAGE_SIZE / 1024,
> > early_radix_enabled() ? " MMU=Radix" : "",
> > early_mmu_has_feature(MMU_FTR_HPTE_TABLE) ? " MMU=Hash" : "",
> > - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
>
> Replace by: IS_ENABLED(CONFIG_PREEMPTION) ? " PREEMPT" : ""
>
> > + pr,
>
> add something like: IS_ENABLED(CONFIG_PREEMPT_RT) ? "_RT" : ""
this on the other hand will create more code which is not strictly
required.
> > IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
> > IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
> > debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
> >
>
> Christophe
Sebastian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION
2019-10-16 4:57 ` Christophe Leroy
2019-10-16 7:48 ` Sebastian Andrzej Siewior
@ 2019-10-16 9:33 ` Michael Ellerman
2019-10-16 9:35 ` Sebastian Andrzej Siewior
2019-10-24 13:59 ` [PATCH 03/34 v2] " Sebastian Andrzej Siewior
1 sibling, 2 replies; 9+ messages in thread
From: Michael Ellerman @ 2019-10-16 9:33 UTC (permalink / raw)
To: Christophe Leroy, Sebastian Andrzej Siewior, linux-kernel
Cc: Paul Mackerras, tglx, linuxppc-dev
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> Le 15/10/2019 à 21:17, Sebastian Andrzej Siewior a écrit :
>> From: Thomas Gleixner <tglx@linutronix.de>
>>
>> CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
>> Both PREEMPT and PREEMPT_RT require the same functionality which today
>> depends on CONFIG_PREEMPT.
>>
>> Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT
>> output in __die().
>
> powerpc doesn't select ARCH_SUPPORTS_RT, so this change is useless as
> CONFIG_PREEMPT_RT cannot be selected.
Yeah I don't think there's any point adding the "_RT" to the __die()
output until/if we ever start supporting PREEMPT_RT.
cheers
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 3e56c9c2f16ee..8ead8d6e1cbc8 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -106,7 +106,7 @@ config LOCKDEP_SUPPORT
>> config GENERIC_LOCKBREAK
>> bool
>> default y
>> - depends on SMP && PREEMPT
>> + depends on SMP && PREEMPTION
>>
>> config GENERIC_HWEIGHT
>> bool
>> diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
>> index d60908ea37fb9..e1a4c39b83b86 100644
>> --- a/arch/powerpc/kernel/entry_32.S
>> +++ b/arch/powerpc/kernel/entry_32.S
>> @@ -897,7 +897,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
>> bne- 0b
>> 1:
>>
>> -#ifdef CONFIG_PREEMPT
>> +#ifdef CONFIG_PREEMPTION
>> /* check current_thread_info->preempt_count */
>> lwz r0,TI_PREEMPT(r2)
>> cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
>> @@ -921,7 +921,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
>> */
>> bl trace_hardirqs_on
>> #endif
>> -#endif /* CONFIG_PREEMPT */
>> +#endif /* CONFIG_PREEMPTION */
>> restore_kuap:
>> kuap_restore r1, r2, r9, r10, r0
>>
>> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
>> index 6467bdab8d405..83733376533e8 100644
>> --- a/arch/powerpc/kernel/entry_64.S
>> +++ b/arch/powerpc/kernel/entry_64.S
>> @@ -840,7 +840,7 @@ _GLOBAL(ret_from_except_lite)
>> bne- 0b
>> 1:
>>
>> -#ifdef CONFIG_PREEMPT
>> +#ifdef CONFIG_PREEMPTION
>> /* Check if we need to preempt */
>> andi. r0,r4,_TIF_NEED_RESCHED
>> beq+ restore
>> @@ -871,7 +871,7 @@ _GLOBAL(ret_from_except_lite)
>> li r10,MSR_RI
>> mtmsrd r10,1 /* Update machine state */
>> #endif /* CONFIG_PPC_BOOK3E */
>> -#endif /* CONFIG_PREEMPT */
>> +#endif /* CONFIG_PREEMPTION */
>>
>> .globl fast_exc_return_irq
>> fast_exc_return_irq:
>> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
>> index 82f43535e6867..23d2f20be4f2e 100644
>> --- a/arch/powerpc/kernel/traps.c
>> +++ b/arch/powerpc/kernel/traps.c
>> @@ -252,14 +252,19 @@ NOKPROBE_SYMBOL(oops_end);
>>
>> static int __die(const char *str, struct pt_regs *regs, long err)
>> {
>> + const char *pr = "";
>> +
>
> Please follow the same approach as already existing. Don't add a local
> var for that.
>
>> printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
>>
>> + if (IS_ENABLED(CONFIG_PREEMPTION))
>> + pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
>> +
>
> drop
>
>> printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s%s %s\n",
>
> Add one %s
>
>> IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
>> PAGE_SIZE / 1024,
>> early_radix_enabled() ? " MMU=Radix" : "",
>> early_mmu_has_feature(MMU_FTR_HPTE_TABLE) ? " MMU=Hash" : "",
>> - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
>
> Replace by: IS_ENABLED(CONFIG_PREEMPTION) ? " PREEMPT" : ""
>
>> + pr,
>
> add something like: IS_ENABLED(CONFIG_PREEMPT_RT) ? "_RT" : ""
>
>> IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
>> IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
>> debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>>
>
> Christophe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION
2019-10-16 9:33 ` Michael Ellerman
@ 2019-10-16 9:35 ` Sebastian Andrzej Siewior
2019-10-24 13:59 ` [PATCH 03/34 v2] " Sebastian Andrzej Siewior
1 sibling, 0 replies; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-10-16 9:35 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Paul Mackerras, tglx, linuxppc-dev, linux-kernel
On 2019-10-16 20:33:08 [+1100], Michael Ellerman wrote:
> Christophe Leroy <christophe.leroy@c-s.fr> writes:
> > Le 15/10/2019 à 21:17, Sebastian Andrzej Siewior a écrit :
> >> From: Thomas Gleixner <tglx@linutronix.de>
> >>
> >> CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
> >> Both PREEMPT and PREEMPT_RT require the same functionality which today
> >> depends on CONFIG_PREEMPT.
> >>
> >> Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT
> >> output in __die().
> >
> > powerpc doesn't select ARCH_SUPPORTS_RT, so this change is useless as
> > CONFIG_PREEMPT_RT cannot be selected.
>
> Yeah I don't think there's any point adding the "_RT" to the __die()
> output until/if we ever start supporting PREEMPT_RT.
so jut the PREEMPT -> PREEMPTION bits then?
> cheers
Sebastian
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/34 v2] powerpc: Use CONFIG_PREEMPTION
2019-10-16 9:33 ` Michael Ellerman
2019-10-16 9:35 ` Sebastian Andrzej Siewior
@ 2019-10-24 13:59 ` Sebastian Andrzej Siewior
2019-10-24 16:04 ` [PATCH 03/34 v3] " Sebastian Andrzej Siewior
1 sibling, 1 reply; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-10-24 13:59 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Paul Mackerras, tglx, linuxppc-dev, linux-kernel
From: Thomas Gleixner <tglx@linutronix.de>
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
Both PREEMPT and PREEMPT_RT require the same functionality which today
depends on CONFIG_PREEMPT.
Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT
output in __die().
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: +Kconfig]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
v1…v2: Remove the changes to die.c
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/entry_32.S | 4 ++--
arch/powerpc/kernel/entry_64.S | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3e56c9c2f16ee..8ead8d6e1cbc8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -106,7 +106,7 @@ config LOCKDEP_SUPPORT
config GENERIC_LOCKBREAK
bool
default y
- depends on SMP && PREEMPT
+ depends on SMP && PREEMPTION
config GENERIC_HWEIGHT
bool
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index d60908ea37fb9..e1a4c39b83b86 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -897,7 +897,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* check current_thread_info->preempt_count */
lwz r0,TI_PREEMPT(r2)
cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
@@ -921,7 +921,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
*/
bl trace_hardirqs_on
#endif
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
restore_kuap:
kuap_restore r1, r2, r9, r10, r0
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 6467bdab8d405..83733376533e8 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -840,7 +840,7 @@ _GLOBAL(ret_from_except_lite)
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* Check if we need to preempt */
andi. r0,r4,_TIF_NEED_RESCHED
beq+ restore
@@ -871,7 +871,7 @@ _GLOBAL(ret_from_except_lite)
li r10,MSR_RI
mtmsrd r10,1 /* Update machine state */
#endif /* CONFIG_PPC_BOOK3E */
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
.globl fast_exc_return_irq
fast_exc_return_irq:
--
2.23.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 03/34 v3] powerpc: Use CONFIG_PREEMPTION
2019-10-24 13:59 ` [PATCH 03/34 v2] " Sebastian Andrzej Siewior
@ 2019-10-24 16:04 ` Sebastian Andrzej Siewior
2019-11-12 12:38 ` Michael Ellerman
2019-12-08 14:58 ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
0 siblings, 2 replies; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-10-24 16:04 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Paul Mackerras, tglx, linuxppc-dev, linux-kernel
From: Thomas Gleixner <tglx@linutronix.de>
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
Both PREEMPT and PREEMPT_RT require the same functionality which today
depends on CONFIG_PREEMPT.
Switch the entry code over to use CONFIG_PREEMPTION.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: +Kconfig]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
v2…v3: Don't mention die.c changes in the description.
v1…v2: Remove the changes to die.c.
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/entry_32.S | 4 ++--
arch/powerpc/kernel/entry_64.S | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3e56c9c2f16ee..8ead8d6e1cbc8 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -106,7 +106,7 @@ config LOCKDEP_SUPPORT
config GENERIC_LOCKBREAK
bool
default y
- depends on SMP && PREEMPT
+ depends on SMP && PREEMPTION
config GENERIC_HWEIGHT
bool
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index d60908ea37fb9..e1a4c39b83b86 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -897,7 +897,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* check current_thread_info->preempt_count */
lwz r0,TI_PREEMPT(r2)
cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
@@ -921,7 +921,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
*/
bl trace_hardirqs_on
#endif
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
restore_kuap:
kuap_restore r1, r2, r9, r10, r0
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 6467bdab8d405..83733376533e8 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -840,7 +840,7 @@ _GLOBAL(ret_from_except_lite)
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* Check if we need to preempt */
andi. r0,r4,_TIF_NEED_RESCHED
beq+ restore
@@ -871,7 +871,7 @@ _GLOBAL(ret_from_except_lite)
li r10,MSR_RI
mtmsrd r10,1 /* Update machine state */
#endif /* CONFIG_PPC_BOOK3E */
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
.globl fast_exc_return_irq
fast_exc_return_irq:
--
2.23.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 03/34 v3] powerpc: Use CONFIG_PREEMPTION
2019-10-24 16:04 ` [PATCH 03/34 v3] " Sebastian Andrzej Siewior
@ 2019-11-12 12:38 ` Michael Ellerman
2019-12-08 14:58 ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
1 sibling, 0 replies; 9+ messages in thread
From: Michael Ellerman @ 2019-11-12 12:38 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Paul Mackerras, tglx, linuxppc-dev, linux-kernel
Sebastian Andrzej Siewior <bigeasy@linutronix.de> writes:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
> Both PREEMPT and PREEMPT_RT require the same functionality which today
> depends on CONFIG_PREEMPT.
>
> Switch the entry code over to use CONFIG_PREEMPTION.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> [bigeasy: +Kconfig]
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> v2…v3: Don't mention die.c changes in the description.
> v1…v2: Remove the changes to die.c.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 9+ messages in thread
* [tip: sched/urgent] sched/rt, powerpc: Use CONFIG_PREEMPTION
2019-10-24 16:04 ` [PATCH 03/34 v3] " Sebastian Andrzej Siewior
2019-11-12 12:38 ` Michael Ellerman
@ 2019-12-08 14:58 ` tip-bot2 for Thomas Gleixner
1 sibling, 0 replies; 9+ messages in thread
From: tip-bot2 for Thomas Gleixner @ 2019-12-08 14:58 UTC (permalink / raw)
To: linux-tip-commits
Cc: Peter Zijlstra, Sebastian Andrzej Siewior, x86, linuxppc-dev,
LKML, Paul Mackerras, Thomas Gleixner, Linus Torvalds,
Ingo Molnar
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: fdc5569eaba997852e0bfb57d11af496e4c1fa9a
Gitweb: https://git.kernel.org/tip/fdc5569eaba997852e0bfb57d11af496e4c1fa9a
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 24 Oct 2019 18:04:58 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Sun, 08 Dec 2019 14:37:32 +01:00
sched/rt, powerpc: Use CONFIG_PREEMPTION
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
Both PREEMPT and PREEMPT_RT require the same functionality which today
depends on CONFIG_PREEMPT.
Switch the entry code over to use CONFIG_PREEMPTION.
[bigeasy: +Kconfig]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20191024160458.vlnf3wlcyjl2ich7@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/powerpc/Kconfig | 2 +-
arch/powerpc/kernel/entry_32.S | 4 ++--
arch/powerpc/kernel/entry_64.S | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index e446bb5..c781170 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -106,7 +106,7 @@ config LOCKDEP_SUPPORT
config GENERIC_LOCKBREAK
bool
default y
- depends on SMP && PREEMPT
+ depends on SMP && PREEMPTION
config GENERIC_HWEIGHT
bool
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index d60908e..e1a4c39 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -897,7 +897,7 @@ resume_kernel:
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* check current_thread_info->preempt_count */
lwz r0,TI_PREEMPT(r2)
cmpwi 0,r0,0 /* if non-zero, just restore regs and return */
@@ -921,7 +921,7 @@ resume_kernel:
*/
bl trace_hardirqs_on
#endif
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
restore_kuap:
kuap_restore r1, r2, r9, r10, r0
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 3fd3ef3..a9a1d3c 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -846,7 +846,7 @@ resume_kernel:
bne- 0b
1:
-#ifdef CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPTION
/* Check if we need to preempt */
andi. r0,r4,_TIF_NEED_RESCHED
beq+ restore
@@ -877,7 +877,7 @@ resume_kernel:
li r10,MSR_RI
mtmsrd r10,1 /* Update machine state */
#endif /* CONFIG_PPC_BOOK3E */
-#endif /* CONFIG_PREEMPT */
+#endif /* CONFIG_PREEMPTION */
.globl fast_exc_return_irq
fast_exc_return_irq:
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-12-08 15:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20191015191821.11479-1-bigeasy@linutronix.de>
2019-10-15 19:17 ` [PATCH 03/34] powerpc: Use CONFIG_PREEMPTION Sebastian Andrzej Siewior
2019-10-16 4:57 ` Christophe Leroy
2019-10-16 7:48 ` Sebastian Andrzej Siewior
2019-10-16 9:33 ` Michael Ellerman
2019-10-16 9:35 ` Sebastian Andrzej Siewior
2019-10-24 13:59 ` [PATCH 03/34 v2] " Sebastian Andrzej Siewior
2019-10-24 16:04 ` [PATCH 03/34 v3] " Sebastian Andrzej Siewior
2019-11-12 12:38 ` Michael Ellerman
2019-12-08 14:58 ` [tip: sched/urgent] sched/rt, " tip-bot2 for Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).