Message ID | 1604893209-18762-1-git-send-email-wangqing@vivo.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | sched/rt, powerpc: Prepare for PREEMPT_RT | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (80ecbe16c827714ce3741ed1f1d34488b903e717) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 22 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Mon, Nov 09, 2020 at 11:40:08AM +0800, Wang Qing wrote:
> Add PREEMPT_RT output to die().
That says what you did, but not why you are doing this.
Why are you doing this? That needs to go into the changelog text.
greg k-h
Quoting Wang Qing <wangqing@vivo.com>: > Add PREEMPT_RT output to die(). > > Signed-off-by: Wang Qing <wangqing@vivo.com> > --- > arch/powerpc/kernel/traps.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c > index 5006dcb..6dfe567 > --- a/arch/powerpc/kernel/traps.c > +++ b/arch/powerpc/kernel/traps.c > @@ -258,6 +258,14 @@ static char *get_mmu_str(void) > return ""; > } > > +#ifdef CONFIG_PREEMPT > +#define S_PREEMPT " PREEMPT" > +#elif defined(CONFIG_PREEMPT_RT) > +#define S_PREEMPT " PREEMPT_RT" > +#else > +#define S_PREEMPT "" > +#endif I don't like too much that forest of #ifdefs. IS_ENABLED() is prefered whenever possible. > + > static int __die(const char *str, struct pt_regs *regs, long err) > { > printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); > @@ -265,7 +273,7 @@ static int __die(const char *str, struct pt_regs > *regs, long err) > printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n", > IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE", > PAGE_SIZE / 1024, get_mmu_str(), > - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "", > + S_PREEMPT, > IS_ENABLED(CONFIG_SMP) ? " SMP" : "", > IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", > debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", > -- > 2.7.4 I'd prefer to remain in line with the existing and use IS_ENABLED() instead of #ifdefs, see below: diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 5006dcbe1d9f..dec7b81c72a4 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -262,10 +262,11 @@ static int __die(const char *str, struct pt_regs *regs, long err) { printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); - printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n", + 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, get_mmu_str(), IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "", + IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : "", IS_ENABLED(CONFIG_SMP) ? " SMP" : "", IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", --- Christophe
>Quoting Wang Qing <wangqing@vivo.com>: > >> Add PREEMPT_RT output to die(). >> >> Signed-off-by: Wang Qing <wangqing@vivo.com> >> --- >> arch/powerpc/kernel/traps.c | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c >> index 5006dcb..6dfe567 >> --- a/arch/powerpc/kernel/traps.c >> +++ b/arch/powerpc/kernel/traps.c >> @@ -258,6 +258,14 @@ static char *get_mmu_str(void) >> return ""; >> } >> >> +#ifdef CONFIG_PREEMPT >> +#define S_PREEMPT " PREEMPT" >> +#elif defined(CONFIG_PREEMPT_RT) >> +#define S_PREEMPT " PREEMPT_RT" >> +#else >> +#define S_PREEMPT "" >> +#endif > >I don't like too much that forest of #ifdefs. IS_ENABLED() is prefered >whenever possible. > >> + >> static int __die(const char *str, struct pt_regs *regs, long err) >> { >> printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); >> @@ -265,7 +273,7 @@ static int __die(const char *str, struct pt_regs >> *regs, long err) >> printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n", >> IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE", >> PAGE_SIZE / 1024, get_mmu_str(), >> - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "", >> + S_PREEMPT, >> IS_ENABLED(CONFIG_SMP) ? " SMP" : "", >> IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", >> debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", >> -- >> 2.7.4 > >I'd prefer to remain in line with the existing and use IS_ENABLED() >instead of #ifdefs, see below: > >diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c >index 5006dcbe1d9f..dec7b81c72a4 100644 >--- a/arch/powerpc/kernel/traps.c >+++ b/arch/powerpc/kernel/traps.c >@@ -262,10 +262,11 @@ static int __die(const char *str, struct pt_regs >*regs, long err) > { > printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); > >- printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n", >+ 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, get_mmu_str(), > IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "", >+ IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : "", > IS_ENABLED(CONFIG_SMP) ? " SMP" : "", > IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", > debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", >--- >Christophe Yeah, I agree with it. Wang Qing
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 5006dcb..6dfe567 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -258,6 +258,14 @@ static char *get_mmu_str(void) return ""; } +#ifdef CONFIG_PREEMPT +#define S_PREEMPT " PREEMPT" +#elif defined(CONFIG_PREEMPT_RT) +#define S_PREEMPT " PREEMPT_RT" +#else +#define S_PREEMPT "" +#endif + static int __die(const char *str, struct pt_regs *regs, long err) { printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); @@ -265,7 +273,7 @@ static int __die(const char *str, struct pt_regs *regs, long err) printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n", IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE", PAGE_SIZE / 1024, get_mmu_str(), - IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "", + S_PREEMPT, IS_ENABLED(CONFIG_SMP) ? " SMP" : "", IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
Add PREEMPT_RT output to die(). Signed-off-by: Wang Qing <wangqing@vivo.com> --- arch/powerpc/kernel/traps.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)