Re: [RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()

2024-12-22 Thread IBM
Thorsten Blum writes: > Remove hard-coded strings by using the str_on_off() helper function. > > Signed-off-by: Thorsten Blum > --- > arch/powerpc/kernel/setup-common.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/setup-common.c > b/arch/powe

[RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()

2024-12-20 Thread Thorsten Blum
Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum --- arch/powerpc/kernel/setup-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 6fa17944

[PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()

2024-12-10 Thread Thorsten Blum
Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum --- arch/powerpc/kernel/setup-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 6fa17944

Re: [PATCH] powerpc: Use str_enabled_disabled() helper function

2024-11-17 Thread Michael Ellerman
On Sun, 27 Oct 2024 23:22:17 +0100, Thorsten Blum wrote: > Remove hard-coded strings by using the str_enabled_disabled() helper > function. > > Applied to powerpc/next. [1/1] powerpc: Use str_enabled_disabled() helper function https://git.kernel.org/powerpc/c/19e0a70e6c3c1bf800b8ce9eb4586

Re: [PATCH] powerpc: Use str_enabled_disabled() helper function

2024-10-27 Thread IBM
Thorsten Blum writes: > Remove hard-coded strings by using the str_enabled_disabled() helper > function. > Looks like now a days LKP also reports this - e.g. [1] "opportunity for str_enabled_disabled(enable)" [1]: https://lore.kernel.org/all/202410071601.tfpxoqgw-...@intel.com/ I see more su

[PATCH] powerpc: Use str_enabled_disabled() helper function

2024-10-27 Thread Thorsten Blum
Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum --- arch/powerpc/kernel/secure_boot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c index

Re: [PATCH] powerpc: Use printk instead of WARN in change_memory_attr

2024-08-30 Thread Michael Ellerman
Christophe Leroy writes: > Le 27/08/2024 à 11:12, Ritesh Harjani (IBM) a écrit : >> [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. >> Découvrez pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Use pr_warn_once instead of WARN_ON_ONCE as

Re: [PATCH] powerpc: Use printk instead of WARN in change_memory_attr

2024-08-27 Thread IBM
Christophe Leroy writes: > Le 27/08/2024 à 11:12, Ritesh Harjani (IBM) a écrit : >> [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. >> Découvrez pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Use pr_warn_once instead of WARN_ON_ONCE a

Re: [PATCH] powerpc: Use printk instead of WARN in change_memory_attr

2024-08-27 Thread Christophe Leroy
Le 27/08/2024 à 11:12, Ritesh Harjani (IBM) a écrit : [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Use pr_warn_once instead of WARN_ON_ONCE as discussed here [1] for printing possib

[PATCH] powerpc: Use printk instead of WARN in change_memory_attr

2024-08-27 Thread Ritesh Harjani (IBM)
Use pr_warn_once instead of WARN_ON_ONCE as discussed here [1] for printing possible use of set_memory_* on linear map on Hash. [1]: https://lore.kernel.org/all/877cc2fpi2.fsf@mail.lhotse/#t Signed-off-by: Ritesh Harjani (IBM) --- arch/powerpc/mm/pageattr.c | 5 - 1 file changed, 4 insertio

Re: [PATCH] powerpc: Use of_property_present()

2024-08-12 Thread Michael Ellerman
On Wed, 31 Jul 2024 13:12:47 -0600, Rob Herring (Arm) wrote: > Use of_property_present() to test for property presence rather than > of_get_property(). This is part of a larger effort to remove callers > of of_get_property() and similar functions. of_get_property() leaks > the DT property data poin

[PATCH] powerpc: Use of_property_present()

2024-07-31 Thread Rob Herring (Arm)
Use of_property_present() to test for property presence rather than of_get_property(). This is part of a larger effort to remove callers of of_get_property() and similar functions. of_get_property() leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be f

Re: [PATCH] powerpc: Use str_plural() to fix Coccinelle warning

2024-04-22 Thread Michael Ellerman
On Mon, 01 Apr 2024 00:22:50 +0200, Thorsten Blum wrote: > Fixes the following Coccinelle/coccicheck warning reported by > string_choices.cocci: > > opportunity for str_plural(tpc) > > Applied to powerpc/next. [1/1] powerpc: Use str_plural() to fix Coccinelle warning https://git.ke

[PATCH] powerpc: Use str_plural() to fix Coccinelle warning

2024-03-31 Thread Thorsten Blum
Fixes the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_plural(tpc) Signed-off-by: Thorsten Blum --- arch/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup-common.c

Re: [PATCH] powerpc: Use swapper_pg_dir instead of init_mm->pgd

2024-03-16 Thread Christophe Leroy
Le 09/10/2022 à 19:31, Christophe Leroy a écrit : > init_mm->pgd is always swapper_pg_dir[] which is known > at build time. > > Directly use the later instead of loading it from init_mm > struct at every time. > > Signed-off-by: Christophe Leroy Dropping this patch after feedback from Michael

Re: [PATCH] powerpc: Use user_mode() macro when possible

2024-03-13 Thread Michael Ellerman
On Fri, 16 Feb 2024 11:10:36 +0100, Christophe Leroy wrote: > There is a nice macro to check user mode. > > Use it instead of open coding anding with MSR_PR to increase > readability and avoid having to comment what that anding is for. > > Applied to powerpc/next. [1/1] powerpc: Use user_mode(

[PATCH] powerpc: Use user_mode() macro when possible

2024-02-16 Thread Christophe Leroy
There is a nice macro to check user mode. Use it instead of open coding anding with MSR_PR to increase readability and avoid having to comment what that anding is for. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 2 +- arch/powerpc/kernel/syscall.c| 2 +-

Patch "powerpc: Use always instead of always-y in for crtsavres.o" has been added to the 5.4-stable tree

2024-01-26 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc: Use always instead of always-y in for crtsavres.o to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Patch "powerpc: Use always instead of always-y in for crtsavres.o" has been added to the 4.19-stable tree

2024-01-26 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc: Use always instead of always-y in for crtsavres.o to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Re: [PATCH] powerpc: Use ARRAY_SIZE for array length

2023-11-22 Thread Michael Ellerman
Jiapeng Chong writes: > Use of macro ARRAY_SIZE to calculate array size minimizes > the redundant code and improves code reusability. > > ./arch/powerpc/xmon/ppc-opc.c:957:67-68: WARNING: Use ARRAY_SIZE. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7612 >

[PATCH] powerpc: Use ARRAY_SIZE for array length

2023-11-22 Thread Jiapeng Chong
Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./arch/powerpc/xmon/ppc-opc.c:957:67-68: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7612 Signed-off-by: Jiapeng Chong --- ar

Re: [PATCH] powerpc: Use shared font data

2023-08-02 Thread Dr. David Alan Gilbert
* Randy Dunlap (rdun...@infradead.org) wrote: > > > On 8/2/23 05:19, Michael Ellerman wrote: > > "Dr. David Alan Gilbert" writes: > >> * Michael Ellerman (m...@ellerman.id.au) wrote: > >>> li...@treblig.org writes: > From: "Dr. David Alan Gilbert" > > PowerPC has a 'btext' font u

Re: [PATCH] powerpc: Use shared font data

2023-08-02 Thread Randy Dunlap
On 8/2/23 05:19, Michael Ellerman wrote: > "Dr. David Alan Gilbert" writes: >> * Michael Ellerman (m...@ellerman.id.au) wrote: >>> li...@treblig.org writes: From: "Dr. David Alan Gilbert" PowerPC has a 'btext' font used for the console which is almost identical to the share

Re: [PATCH] powerpc: Use shared font data

2023-08-02 Thread Michael Ellerman
"Dr. David Alan Gilbert" writes: > * Michael Ellerman (m...@ellerman.id.au) wrote: >> li...@treblig.org writes: >> > From: "Dr. David Alan Gilbert" >> > >> > PowerPC has a 'btext' font used for the console which is almost identical >> > to the shared font_sun8x16, so use it rather than duplicatin

Re: [PATCH] powerpc: Use shared font data

2023-07-28 Thread Dr. David Alan Gilbert
* Michael Ellerman (m...@ellerman.id.au) wrote: > li...@treblig.org writes: > > From: "Dr. David Alan Gilbert" > > > > PowerPC has a 'btext' font used for the console which is almost identical > > to the shared font_sun8x16, so use it rather than duplicating the data. > > > > They were actually id

Re: [PATCH] powerpc: Use shared font data

2023-07-27 Thread Michael Ellerman
li...@treblig.org writes: > From: "Dr. David Alan Gilbert" > > PowerPC has a 'btext' font used for the console which is almost identical > to the shared font_sun8x16, so use it rather than duplicating the data. > > They were actually identical until about a decade ago when >commit bcfbeecea11c

Re: [PATCH] powerpc: Use shared font data

2023-07-25 Thread Sam Ravnborg
Hi David, On Tue, Jul 25, 2023 at 01:01:41AM +0100, li...@treblig.org wrote: > From: "Dr. David Alan Gilbert" > > PowerPC has a 'btext' font used for the console which is almost identical > to the shared font_sun8x16, so use it rather than duplicating the data. > > They were actually identical

Re: [PATCH] powerpc: Use shared font data

2023-07-25 Thread Dr. David Alan Gilbert
* Sam Ravnborg (s...@ravnborg.org) wrote: > Hi David, > > On Tue, Jul 25, 2023 at 01:01:41AM +0100, li...@treblig.org wrote: > > From: "Dr. David Alan Gilbert" > > > > PowerPC has a 'btext' font used for the console which is almost identical > > to the shared font_sun8x16, so use it rather than

[PATCH] powerpc: Use shared font data

2023-07-24 Thread linux
From: "Dr. David Alan Gilbert" PowerPC has a 'btext' font used for the console which is almost identical to the shared font_sun8x16, so use it rather than duplicating the data. They were actually identical until about a decade ago when commit bcfbeecea11c ("drivers: console: font_: Change a g

[PATCH] powerpc: use appropriate error codes

2023-06-03 Thread mirimmad
From: Immad Mir This patch replaces use of returning -1 by appropiate error codes. Signed-off-by: Immad Mir --- arch/powerpc/platforms/powernv/opal-elog.c | 4 ++-- arch/powerpc/platforms/powernv/opal-xscom.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerp

Re: [PATCH] powerpc: Use of_address_to_resource()

2023-04-05 Thread Michael Ellerman
Michael Ellerman writes: > On Sun, 19 Mar 2023 11:31:53 -0500, Rob Herring wrote: >> Replace open coded reading of "reg" or of_get_address()/ >> of_translate_address() calls with a single call to >> of_address_to_resource(). >> >> > > Applied to powerpc/next. > > [1/1] powerpc: Use of_address_to

Re: [PATCH] powerpc: Use of_property_read_bool() for boolean properties

2023-04-05 Thread Michael Ellerman
On Fri, 10 Mar 2023 08:46:57 -0600, Rob Herring wrote: > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. > Convert reading boolean properties to to of_property_read

Re: [PATCH] powerpc: Use of_property_present() for testing DT property presence

2023-04-05 Thread Michael Ellerman
On Fri, 10 Mar 2023 08:46:56 -0600, Rob Herring wrote: > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. As > part of this, convert of_get_property/of_find_property

Re: [PATCH] powerpc: Use of_address_to_resource()

2023-04-05 Thread Michael Ellerman
On Sun, 19 Mar 2023 11:31:53 -0500, Rob Herring wrote: > Replace open coded reading of "reg" or of_get_address()/ > of_translate_address() calls with a single call to > of_address_to_resource(). > > Applied to powerpc/next. [1/1] powerpc: Use of_address_to_resource() https://git.kernel.or

Re: [PATCH] powerpc: Use of_address_to_resource()

2023-03-20 Thread kernel test robot
patch link: https://lore.kernel.org/r/20230319163154.225597-1-robh%40kernel.org patch subject: [PATCH] powerpc: Use of_address_to_resource() config: powerpc-mpc7448_hpc2_defconfig (https://download.01.org/0day-ci/archive/20230321/202303211421.vzx1l2qw-...@intel.com/config) compiler: powerpc-linu

[PATCH] powerpc: Use of_address_to_resource()

2023-03-19 Thread Rob Herring
Replace open coded reading of "reg" or of_get_address()/ of_translate_address() calls with a single call to of_address_to_resource(). Signed-off-by: Rob Herring --- arch/powerpc/mm/numa.c| 21 +++-- arch/powerpc/platforms/52xx/lite5200_pm.c | 9 ++-- arch/powerpc

[PATCH] powerpc: Use of_property_read_bool() for boolean properties

2023-03-10 Thread Rob Herring
It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring --- arch/powerpc/kernel/

[PATCH] powerpc: Use of_property_present() for testing DT property presence

2023-03-10 Thread Rob Herring
It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when

Re: [PATCH] powerpc: Use "grep -E" instead of "egrep"

2022-11-30 Thread Michael Ellerman
On Fri, 18 Nov 2022 17:40:29 +0800, Tiezhu Yang wrote: > The latest version of grep claims the egrep is now obsolete so the build > now contains warnings that look like: > egrep: warning: egrep is obsolescent; using grep -E > fix this up by moving the related file to use "grep -E" instead. >

[PATCH] powerpc: Use "grep -E" instead of "egrep"

2022-11-18 Thread Tiezhu Yang
The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl arch/powerpc` H

[PATCH] powerpc: Use swapper_pg_dir instead of init_mm->pgd

2022-10-09 Thread Christophe Leroy
init_mm->pgd is always swapper_pg_dir[] which is known at build time. Directly use the later instead of loading it from init_mm struct at every time. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/includ

Re: [PATCH] powerpc: Use rol32() instead of opencoding in csum_fold()

2022-05-15 Thread Michael Ellerman
On Wed, 9 Mar 2022 08:56:14 +0100, Christophe Leroy wrote: > rol32(x, 16) will do the rotate using rlwinm. > > No need to open code using inline assembly. > > Applied to powerpc/next. [1/1] powerpc: Use rol32() instead of opencoding in csum_fold() https://git.kernel.org/powerpc/c/a1ae431

RE: [PATCH] powerpc: Use rol32() instead of opencoding in csum_fold()

2022-03-09 Thread David Laight
From: Christophe Leroy > Sent: 09 March 2022 07:56 ... > diff --git a/arch/powerpc/include/asm/checksum.h > b/arch/powerpc/include/asm/checksum.h > index 8321f6053a67..4b573a3b7e17 100644 > --- a/arch/powerpc/include/asm/checksum.h > +++ b/arch/powerpc/include/asm/checksum.h > @@ -38,14 +38,15 @@

[PATCH] powerpc: Use rol32() instead of opencoding in csum_fold()

2022-03-08 Thread Christophe Leroy
rol32(x, 16) will do the rotate using rlwinm. No need to open code using inline assembly. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/checksum.h b/arch/pow

Re: [PATCH] powerpc: Use the newly added is_tsk_32bit_task() macro

2022-02-16 Thread Michael Ellerman
On Fri, 21 Jan 2022 07:58:47 +, Christophe Leroy wrote: > Two places deserve using the macro is_tsk_32bit_task() added by > commit 252745240ba0 ("powerpc/audit: Fix syscall_get_arch()") > > Applied to powerpc/next. [1/1] powerpc: Use the newly added is_tsk_32bit_task() macro https://g

[PATCH] powerpc: Use the newly added is_tsk_32bit_task() macro

2022-01-20 Thread Christophe Leroy
Two places deserve using the macro is_tsk_32bit_task() added by commit 252745240ba0 ("powerpc/audit: Fix syscall_get_arch()") Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace-view.c | 2 +- arch/powerpc/perf/perf_regs.c| 8 +++- 2 files changed, 4 insertions(

Re: [PATCH] powerpc: use swap() to make code cleaner

2021-12-26 Thread Michael Ellerman
On Sat, 18 Dec 2021 09:59:17 +0800, davidcomponent...@gmail.com wrote: > From: Yang Guang > > Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid > opencoding it. > > Applied to powerpc/next. [1/1] powerpc: use swap() to make code cleaner https://git.kernel.org/powerpc/c

RE: [PATCH] powerpc: use strscpy to copy strings

2021-12-20 Thread David Laight
From: Jason Wang > Sent: 20 December 2021 03:24 > > The strlcpy should not be used because it doesn't limit the source > length. So that it will lead some potential bugs. > > But the strscpy doesn't require reading memory from the src string > beyond the specified "count" bytes, and since the ret

[PATCH] powerpc: use strscpy to copy strings

2021-12-19 Thread Jason Wang
The strlcpy should not be used because it doesn't limit the source length. So that it will lead some potential bugs. But the strscpy doesn't require reading memory from the src string beyond the specified "count" bytes, and since the return value is easier to error-check than strlcpy()'s. In addit

[PATCH] powerpc: use swap() to make code cleaner

2021-12-17 Thread davidcomponentone
From: Yang Guang Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid opencoding it. Reported-by: Zeal Robot Signed-off-by: David Yang Signed-off-by: Yang Guang --- arch/powerpc/platforms/powermac/pic.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ar

Re: [PATCH] powerpc: use swap() to make code cleaner

2021-11-04 Thread Stephen Rothwell
Hi Segher, On Thu, 4 Nov 2021 06:33:51 -0500 Segher Boessenkool wrote: > > On Thu, Nov 04, 2021 at 09:06:56PM +1100, Stephen Rothwell wrote: > > On Thu, 4 Nov 2021 14:17:09 +0800 davidcomponent...@gmail.com wrote: > > > From: Yang Guang > > > > > > Use the macro 'swap()' defined in 'include

Re: [PATCH] powerpc: use swap() to make code cleaner

2021-11-04 Thread Segher Boessenkool
On Thu, Nov 04, 2021 at 09:06:56PM +1100, Stephen Rothwell wrote: > On Thu, 4 Nov 2021 14:17:09 +0800 davidcomponent...@gmail.com wrote: > > From: Yang Guang > > > > Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid > > opencoding it. > > So if swap() is in the above include f

Re: [PATCH] powerpc: use swap() to make code cleaner

2021-11-04 Thread Stephen Rothwell
Hi, On Thu, 4 Nov 2021 14:17:09 +0800 davidcomponent...@gmail.com wrote: > > From: Yang Guang > > Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid > opencoding it. So if swap() is in the above include file, then you should include it. -- Cheers, Stephen Rothwell pgpRINbe

[PATCH] powerpc: use swap() to make code cleaner

2021-11-03 Thread davidcomponentone
From: Yang Guang Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid opencoding it. Reported-by: Zeal Robot Signed-off-by: Yang Guang --- arch/powerpc/kernel/fadump.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/po

[PATCH] powerpc: use swap() to make code cleaner

2021-11-03 Thread davidcomponentone
From: Yang Guang Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid opencoding it. Reported-by: Zeal Robot Signed-off-by: Yang Guang --- arch/powerpc/platforms/powermac/pic.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powerm

Re: [PATCH] powerpc: use IRQF_NO_DEBUG for IPIs

2021-08-18 Thread Michael Ellerman
On Mon, 19 Jul 2021 15:06:14 +0200, Cédric Le Goater wrote: > There is no need to use the lockup detector ("noirqdebug") for IPIs. > The ipistorm benchmark measures a ~10% improvement on high systems > when this flag is set. Applied to powerpc/next. [1/1] powerpc: use IRQF_NO_DEBUG for IPIs

[PATCH] powerpc: use strscpy to replace strlcpy

2021-08-07 Thread Jason Wang
The strlcpy should not be used because it doesn't limit the source length. As linus says, it's a completely useless function if you can't implicitly trust the source string - but that is almost always why people think they should use it! All in all the BSD function will lead some potential bugs. B

Re: [PATCH] powerpc: use IRQF_NO_DEBUG for IPIs

2021-07-20 Thread Thomas Gleixner
On Mon, Jul 19 2021 at 15:06, Cédric Le Goater wrote: > There is no need to use the lockup detector ("noirqdebug") for IPIs. > The ipistorm benchmark measures a ~10% improvement on high systems > when this flag is set. > > Cc: Thomas Gleixner > Signed-off-by: Cédric Le Goater Reviewed-by: Thomas

[PATCH] powerpc: use IRQF_NO_DEBUG for IPIs

2021-07-19 Thread Cédric Le Goater
There is no need to use the lockup detector ("noirqdebug") for IPIs. The ipistorm benchmark measures a ~10% improvement on high systems when this flag is set. Cc: Thomas Gleixner Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xics/xics-common.c | 2 +- arch/powerpc/sysdev/xive/common.c

Re: [PATCH] powerpc: use ARRAY_SIZE instead of division operation

2021-02-21 Thread Daniel Axtens
Hi Yang, > This eliminates the following coccicheck warning: > ./arch/powerpc/boot/mktree.c:130:31-32: WARNING: Use ARRAY_SIZE > > Reported-by: Abaci Robot > Signed-off-by: Yang Li > --- > arch/powerpc/boot/mktree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/p

[PATCH] powerpc: use ARRAY_SIZE instead of division operation

2021-02-20 Thread Yang Li
This eliminates the following coccicheck warning: ./arch/powerpc/boot/mktree.c:130:31-32: WARNING: Use ARRAY_SIZE Reported-by: Abaci Robot Signed-off-by: Yang Li --- arch/powerpc/boot/mktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/mktree.c b/arch/

Re: [PATCH] powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro

2020-12-10 Thread Michael Ellerman
On Fri, 27 Nov 2020 15:07:37 +0800, Youling Tang wrote: > Use the common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro rule for > the linker script in an effort. Applied to powerpc/next. [1/1] powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro https://git.kernel.org/p

[PATCH] powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro

2020-11-26 Thread Youling Tang
Use the common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro rule for the linker script in an effort. Signed-off-by: Youling Tang --- arch/powerpc/kernel/vdso32/vdso32.lds.S | 42 - arch/powerpc/kernel/vdso64/vdso64.lds.S | 42 -

Re: [PATCH] powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S

2020-11-25 Thread Michael Ellerman
On Wed, 4 Nov 2020 18:59:10 +0800, Youling Tang wrote: > Use the common INIT_DATA_SECTION rule for the linker script in an effort > to regularize the linker script. Applied to powerpc/next. [1/1] powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S https://git.kernel.org/powerpc

Re: [PATCH] powerpc: Use asm_goto_volatile for put_user()

2020-11-08 Thread Michael Ellerman
On Wed, 4 Nov 2020 22:17:42 +1100, Michael Ellerman wrote: > Andreas reported that commit ee0a49a6870e ("powerpc/uaccess: Switch > __put_user_size_allowed() to __put_user_asm_goto()") broke > CLONE_CHILD_SETTID. > > Further inspection showed that the put_user() in schedule_tail() was > missing ent

[PATCH] powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S

2020-11-04 Thread Youling Tang
Use the common INIT_DATA_SECTION rule for the linker script in an effort to regularize the linker script. Signed-off-by: Youling Tang --- arch/powerpc/kernel/vmlinux.lds.S | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b

Re: [PATCH] powerpc: Use asm_goto_volatile for put_user()

2020-11-04 Thread Andreas Schwab
With that patch the kernel is working again. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

[PATCH] powerpc: Use asm_goto_volatile for put_user()

2020-11-04 Thread Michael Ellerman
Andreas reported that commit ee0a49a6870e ("powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()") broke CLONE_CHILD_SETTID. Further inspection showed that the put_user() in schedule_tail() was missing entirely, the store not emitted by the compiler. <.schedule_tail>:

[RFC PATCH] powerpc: Use ppu_intrinsics.h instead of opencoding

2020-03-27 Thread Christophe Leroy
ppu_intrinsics.h already includes helpers for things like sync(), isync(), dcbX(), etc ... Use it instead of opencoding. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/barrier.h | 11 +++ arch/powerpc/include/asm/cache.h| 25 ++--- arch/powerpc/inc

Re: [PATCH] powerpc: use

2019-11-14 Thread Michael Ellerman
On Wed, 2019-08-07 at 15:07:52 UTC, Christoph Hellwig wrote: > The powerpc version of dma-mapping.h only contains a version of > get_arch_dma_ops that always return NULL. Replace it with the > asm-generic version that does the same. > > Signed-off-by: Christoph Hellwig Applied to powerpc next,

Re: [PATCH] powerpc: use

2019-09-27 Thread Christoph Hellwig
ping? On Wed, Aug 07, 2019 at 06:07:52PM +0300, Christoph Hellwig wrote: > The powerpc version of dma-mapping.h only contains a version of > get_arch_dma_ops that always return NULL. Replace it with the > asm-generic version that does the same. > > Signed-off-by: Christoph Hellwig > --- > arch

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-09-01 Thread Michael Ellerman
On Wed, 2019-08-14 at 13:22:30 UTC, Christoph Hellwig wrote: > This switches to using common code for the DMA allocations, including > potential use of the CMA allocator if configured. > > Switching to the generic code enables DMA allocations from atomic > context, which is required by the DMA API

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-29 Thread Michael Ellerman
Christoph Hellwig writes: > On Wed, Aug 28, 2019 at 11:34:09PM +1000, Michael Ellerman wrote: >> Christoph Hellwig writes: >> > Michael, >> > >> > do oyu plan to pick this up? Otherwise I'd love to pick it up through >> > the dma-mapping tree as that would avoid one trivial conflict with >> > an

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-28 Thread Christoph Hellwig
On Wed, Aug 28, 2019 at 11:34:09PM +1000, Michael Ellerman wrote: > Christoph Hellwig writes: > > Michael, > > > > do oyu plan to pick this up? Otherwise I'd love to pick it up through > > the dma-mapping tree as that would avoid one trivial conflict with > > another pending patch. > > It confli

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-28 Thread Michael Ellerman
Christoph Hellwig writes: > Michael, > > do oyu plan to pick this up? Otherwise I'd love to pick it up through > the dma-mapping tree as that would avoid one trivial conflict with > another pending patch. It conflicts a bit with the ioremap changes I already have in next. And it would be good f

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-27 Thread Christoph Hellwig
Michael, do oyu plan to pick this up? Otherwise I'd love to pick it up through the dma-mapping tree as that would avoid one trivial conflict with another pending patch.

Re: [RFC PATCH] powerpc: use __builtin_trap() in BUG/WARN macros.

2019-08-18 Thread Segher Boessenkool
Hi Christophe, On Sat, Aug 17, 2019 at 06:37:50PM +, Christophe Leroy wrote: > #define BUG() do { \ > + __builtin_trap(); \ GCC will optimise away all code after this, it knows it is unreachable. But you want

[RFC PATCH] powerpc: use __builtin_trap() in BUG/WARN macros.

2019-08-17 Thread Christophe Leroy
The below exemples of use of WARN_ON() show that the result is sub-optimal in regard of the capabilities of powerpc. void test_warn1(unsigned long long a) { WARN_ON(a); } void test_warn2(unsigned long a) { WARN_ON(a); } void test_warn3(unsigned long a, unsigned long b) {

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-14 Thread Christoph Hellwig
On Wed, Aug 14, 2019 at 04:20:34PM +0200, Christophe Leroy wrote: >> index 56a7c814160d..afe71b89dec3 100644 >> --- a/arch/powerpc/platforms/Kconfig.cputype >> +++ b/arch/powerpc/platforms/Kconfig.cputype >> @@ -450,8 +450,10 @@ config NOT_COHERENT_CACHE >> depends on 4xx || PPC_8xx || E200 ||

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-14 Thread Christophe Leroy
Le 14/08/2019 à 15:22, Christoph Hellwig a écrit : This switches to using common code for the DMA allocations, including potential use of the CMA allocator if configured. Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation,

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-14 Thread Christophe Leroy
Le 14/08/2019 à 15:22, Christoph Hellwig a écrit : This switches to using common code for the DMA allocations, including potential use of the CMA allocator if configured. Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation,

[PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-14 Thread Christoph Hellwig
This switches to using common code for the DMA allocations, including potential use of the CMA allocator if configured. Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation, and also adds various other minor features drivers star

[PATCH] powerpc: use

2019-08-07 Thread Christoph Hellwig
The powerpc version of dma-mapping.h only contains a version of get_arch_dma_ops that always return NULL. Replace it with the asm-generic version that does the same. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/Kbuild| 1 + arch/powerpc/include/asm/dma-mapping.h | 18 -

Re: [PATCH] powerpc: Use nid as fallback for chip_id

2019-07-31 Thread Srikar Dronamraju
* Michael Ellerman [2019-07-29 22:41:55]: > > > > + chip_id = of_get_ibm_chip_id(np); > > + if (chip_id == -1) > > + chip_id = of_node_to_nid(np); > > + > > of_node_put(np); > > - return of_get_ibm_chip_id(np); > > + return chip_id; > > } > > A nid is not a chip-id. >

Re: [PATCH] powerpc: Use nid as fallback for chip_id

2019-07-29 Thread Michael Ellerman
Srikar Dronamraju writes: > One of the uses of chip_id is to find out all cores that are part of the same > chip. However ibm,chip_id property is not present in device-tree of PowerVM > Lpars. Hence lscpu output shows one core per socket and multiple cores. > > Before the patch. > # lscpu > Archit

[PATCH] powerpc: Use nid as fallback for chip_id

2019-07-02 Thread Srikar Dronamraju
One of the uses of chip_id is to find out all cores that are part of the same chip. However ibm,chip_id property is not present in device-tree of PowerVM Lpars. Hence lscpu output shows one core per socket and multiple cores. Before the patch. # lscpu Architecture:ppc64le Byte Order:

Patch "powerpc: Use barrier_nospec in copy_from_user()" has been added to the 4.4-stable tree

2019-04-29 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc: Use barrier_nospec in copy_from_user() to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc

Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-03-15 Thread Masahiro Yamada
On Thu, Mar 14, 2019 at 11:27 AM Michael Ellerman wrote: > > Mathieu Malaterre writes: > > On Sat, Feb 16, 2019 at 3:26 AM Masahiro Yamada > > wrote: > >> > >> On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre wrote: > >> > > >> > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada > >> > wrote:

Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-03-13 Thread Michael Ellerman
Mathieu Malaterre writes: > On Sat, Feb 16, 2019 at 3:26 AM Masahiro Yamada > wrote: >> >> On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre wrote: >> > >> > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada >> > wrote: >> > > >> > > I often test all Kconfig commands for all architectures. To ea

Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-03-13 Thread Mathieu Malaterre
On Sat, Feb 16, 2019 at 3:26 AM Masahiro Yamada wrote: > > On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre wrote: > > > > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada > > wrote: > > > > > > I often test all Kconfig commands for all architectures. To ease my > > > workflow, I want 'make def

Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-02-15 Thread Masahiro Yamada
On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre wrote: > > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada > wrote: > > > > I often test all Kconfig commands for all architectures. To ease my > > workflow, I want 'make defconfig' at least working without any cross > > compiler. > > > > Current

Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-02-15 Thread Mathieu Malaterre
On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada wrote: > > I often test all Kconfig commands for all architectures. To ease my > workflow, I want 'make defconfig' at least working without any cross > compiler. > > Currently, arch/powerpc/Makefile checks CROSS_COMPILE to decide the > default defco

[PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG

2019-02-15 Thread Masahiro Yamada
I often test all Kconfig commands for all architectures. To ease my workflow, I want 'make defconfig' at least working without any cross compiler. Currently, arch/powerpc/Makefile checks CROSS_COMPILE to decide the default defconfig source. If CROSS_COMPILE is unset, it is likely to be the native

[PATCH] powerpc: Use ALIGN instead of BLOCK

2019-01-11 Thread Joel Stanley
In the ld documentation under Builtin Functions: BLOCK(exp) This is a synonym for ALIGN, for compatibility with older linker scripts. Clang's linker (lld) doesn't know about BLOCK so remove this use of it. Link: https://github.com/ClangBuiltLinux/linux/issues/253 Signed-off-by: Joel Stanl

[PATCH] powerpc: use a CONSOLE_LOGLEVEL_DEBUG macro

2019-01-07 Thread Sergey Senozhatsky
Use a CONSOLE_LOGLEVEL_DEBUG macro for console_loglevel rather than a naked number. Signed-off-by: Sergey Senozhatsky --- arch/powerpc/kernel/udbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 7cc38b5b58bc..8db

[PATCH] powerpc: use mm zones more sensibly

2018-12-16 Thread Christoph Hellwig
Powerpc has somewhat odd usage where ZONE_DMA is used for all memory on common 64-bit configfs, and ZONE_DMA32 is used for 31-bit schemes. Move to a scheme closer to what other architectures use (and I dare to say the intent of the system): - ZONE_DMA: optionally for memory < 31-bit (64-bit embe

[PATCH] powerpc: Use of_node_name_eq for node name comparisons

2018-12-05 Thread Rob Herring
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. A couple of open coded iterating thru the child node names are converted to use for_each_child_of_node() instead. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc

[PATCH] powerpc: Use device_type helpers to access the node type

2018-11-16 Thread Rob Herring
Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Replace the open coded iterating over child nodes with for_each_child_of_node() while we're here. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ell

[PATCH] powerpc: Use SWITCH_FRAME_SIZE for prom and rtas entry

2018-10-11 Thread Joel Stanley
Commit 6c1719942e19 ("powerpc/of: Remove useless register save/restore when calling OF back") removed the saving of srr0 and srr1 when calling into OpenFirmware. Commit e31aa453bbc4 ("powerpc: Use LOAD_REG_IMMEDIATE only for constants on 64-bit") did the same for rtas. This means we don't need to

Re: [PATCH] powerpc: use PTRRELOC during early init

2018-10-03 Thread Andreas Schwab
On Okt 03 2018, Christophe LEROY wrote: > Did you try my proposed fix https://patchwork.ozlabs.org/patch/977195/ ? That works as well. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely d

  1   2   3   >