RE: [PATCH 0/6] Kill setup_irq()

2020-03-27 Thread Brian Cain
> -Original Message- > From: linux-hexagon-ow...@vger.kernel.org ow...@vger.kernel.org> On Behalf Of afzal mohammed > Sent: Friday, March 27, 2020 11:08 AM > To: Thomas Gleixner > Cc: linux-ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; > linux-samsung-...@vger.kernel.org;

Re: [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval

2020-03-27 Thread Yu-cheng Yu
On Thu, 2020-02-06 at 04:55 -0800, H.J. Lu wrote: > On Wed, Feb 5, 2020 at 7:26 PM Michael Ellerman wrote: > > "H.J. Lu" writes: > > > On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot wrote: > > > > tree: https://github.com/yyu168/linux_cet.git cet > > > > head:

[PATCH 6/9] powerpc/ps3: Set CONFIG_UEVENT_HELPER=y in ps3_defconfig

2020-03-27 Thread Geoff Levand
Set CONFIG_UEVENT_HELPER=y in ps3_defconfig. commit 1be01d4a57142ded23bdb9e0c8d9369e693b26cc (driver: base: Disable CONFIG_UEVENT_HELPER by default) disabled the CONFIG_UEVENT_HELPER option that is needed for hotplug and module loading by most older 32bit powerpc distributions that users

[PATCH 2/9] drivers/ps3: Remove duplicate error messages

2020-03-27 Thread Geoff Levand
From: Markus Elfring Remove duplicate memory allocation failure error messages. Signed-off-by: Markus Elfring Signed-off-by: Geoff Levand --- drivers/ps3/ps3-lpm.c | 2 -- drivers/ps3/ps3-vuart.c | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/ps3/ps3-lpm.c

[PATCH 5/9] ps3disk: use the default segment boundary

2020-03-27 Thread Geoff Levand
From: Emmanuel Nicolet Hi, since commit dcebd755926b ("block: use bio_for_each_bvec() to compute multi-page bvec count"), the kernel will bug_on on the PS3 because bio_split() is called with sectors == 0: kernel BUG at block/bio.c:1853! Oops: Exception in kernel mode, sig: 5 [#1] BE

[PATCH 9/9] powerpc/ps3: Add udbg_panic

2020-03-27 Thread Geoff Levand
BUG_ON() won't work in the early init code, so replace it with a new routine udbg_panic() that uses udbg_printf() and lv1_panic(). Signed-off-by: Geoff Levand --- arch/powerpc/platforms/ps3/mm.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 3/9] net/ps3_gelic_net: Remove duplicate error message

2020-03-27 Thread Geoff Levand
From: Markus Elfring Remove an extra message for a memory allocation failure in function gelic_descr_prepare_rx(). Signed-off-by: Markus Elfring Signed-off-by: Geoff Levand --- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 8/9] powerpc/ps3: Add lv1_panic

2020-03-27 Thread Geoff Levand
lv1_panic takes a single parameter, 0=halt, 1=reboot, and it will never return. Signed-off-by: Geoff Levand --- arch/powerpc/boot/ppc_asm.h| 6 ++ arch/powerpc/include/asm/ppc_asm.h | 6 ++ 2 files changed, 12 insertions(+) diff --git a/arch/powerpc/boot/ppc_asm.h

[PATCH 0/9] PS3 patches for v5.7

2020-03-27 Thread Geoff Levand
Hi Michael, Here are a few PS3 specific patches. A few remove some reduntant messages, a few add some minor debugging support, and a few fix some problems during system boot. Please consider for v5.7. -Geoff The following changes since commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e: Linux

[PATCH 4/9] powerpc/ps3: remove an unneeded NULL check

2020-03-27 Thread Geoff Levand
From: Dan Carpenter Static checkers don't like the inconsistent NULL checking on "ops". This function is only called once and "ops" isn't NULL so the check can be removed. Signed-off-by: Dan Carpenter Signed-off-by: Geoff Levand --- drivers/ps3/sys-manager-core.c | 2 +- 1 file changed, 1

[PATCH 7/9] powerpc/ps3: Add check for otheros image size

2020-03-27 Thread Geoff Levand
The ps3's otheros flash loader has a size limit of 16 MiB for the uncompressed image. If that limit will be reached output the flash image file as 'otheros-too-big.bld'. Signed-off-by: Geoff Levand --- arch/powerpc/boot/wrapper | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH 1/9] powerpc/ps3: Remove duplicate error messages

2020-03-27 Thread Geoff Levand
From: Markus Elfring Remove duplicate memory allocation failure error messages. Signed-off-by: Markus Elfring Signed-off-by: Geoff Levand --- arch/powerpc/platforms/ps3/os-area.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/ps3/os-area.c

Re: [PATCH v2] powerpc xmon: use `dcbf` inplace of `dcbi` instruction for 64bit Book3S

2020-03-27 Thread Christophe Leroy
Le 27/03/2020 à 19:19, Segher Boessenkool a écrit : On Fri, Mar 27, 2020 at 04:12:13PM +0100, Christophe Leroy wrote: Maybe you could also change invalidate_dcache_range(): for (i = 0; i < size >> shift; i++, addr += bytes) { if (IS_ENABLED(CONFIG_PPC_BOOK3S_64))

Re: [patch V3 12/20] powerpc/ps3: Convert half completion to rcuwait

2020-03-27 Thread Geoff Levand
Hi, On 3/21/20 4:25 AM, Thomas Gleixner wrote: > From: Thomas Gleixner > > The PS3 notification interrupt and kthread use a hacked up completion to > communicate. Since we're wanting to change the completion implementation and > this is abuse anyway, replace it with a simple rcuwait since there

Re: [PATCH v2] powerpc/boot: Delete unneeded .globl _zimage_start

2020-03-27 Thread Segher Boessenkool
On Fri, Mar 27, 2020 at 09:50:54AM -0700, Fangrui Song wrote: > We aim for compatibility with GNU in many aspects to make it easier for > people to switch over. However, just because there is a subtle behavior > in GNU toolchain does not mean we need to emulate that behavior. It isn't subtle. It

Re: [PATCH v1] powerpc: Make setjmp/longjump signature standard

2020-03-27 Thread Nathan Chancellor
On Fri, Mar 27, 2020 at 06:45:21PM +0100, Christophe Leroy wrote: > Subject line, change longjump to longjmp > > Le 27/03/2020 à 11:07, Clement Courbet a écrit : > > Declaring setjmp()/longjmp() as taking longs makes the signature > > non-standard, and makes clang complain. In the past, this has

Re: [PATCH v2] powerpc xmon: use `dcbf` inplace of `dcbi` instruction for 64bit Book3S

2020-03-27 Thread Segher Boessenkool
On Fri, Mar 27, 2020 at 04:12:13PM +0100, Christophe Leroy wrote: > Maybe you could also change invalidate_dcache_range(): > > for (i = 0; i < size >> shift; i++, addr += bytes) { > if (IS_ENABLED(CONFIG_PPC_BOOK3S_64)) > dcbf(addr); > else

[PATCH V2 5/5] selftests/powerpc: Add README for GZIP engine tests

2020-03-27 Thread Raphael Moreira Zinsly
Include a README file with the instructions to use the testcases at selftests/powerpc/nx-gzip. Signed-off-by: Bulent Abali Signed-off-by: Raphael Moreira Zinsly --- .../powerpc/nx-gzip/99-nx-gzip.rules | 1 + .../testing/selftests/powerpc/nx-gzip/README | 44 +++ 2

[PATCH V2 4/5] selftests/powerpc: Add NX-GZIP engine decompress testcase

2020-03-27 Thread Raphael Moreira Zinsly
Include a decompression testcase for the powerpc NX-GZIP engine. Signed-off-by: Bulent Abali Signed-off-by: Raphael Moreira Zinsly --- .../selftests/powerpc/nx-gzip/Makefile|7 +- .../selftests/powerpc/nx-gzip/gunz_test.c | 1078 + 2 files changed, 1082

[PATCH V2 2/5] selftests/powerpc: Add header files for NX compresion/decompression

2020-03-27 Thread Raphael Moreira Zinsly
Add files to be able to compress and decompress files using the powerpc NX-GZIP engine. Signed-off-by: Bulent Abali Signed-off-by: Raphael Moreira Zinsly --- .../powerpc/nx-gzip/inc/copy-paste.h | 54 ++ .../selftests/powerpc/nx-gzip/inc/nx_dbg.h| 95 +++

[PATCH V2 3/5] selftests/powerpc: Add NX-GZIP engine compress testcase

2020-03-27 Thread Raphael Moreira Zinsly
Add a compression testcase for the powerpc NX-GZIP engine. Signed-off-by: Bulent Abali Signed-off-by: Raphael Moreira Zinsly --- .../selftests/powerpc/nx-gzip/Makefile| 21 + .../selftests/powerpc/nx-gzip/gzfht_test.c| 489 ++

[PATCH V2 1/5] selftests/powerpc: Add header files for GZIP engine test

2020-03-27 Thread Raphael Moreira Zinsly
Add files to access the powerpc NX-GZIP engine in user space. Signed-off-by: Bulent Abali Signed-off-by: Raphael Moreira Zinsly --- .../selftests/powerpc/nx-gzip/inc/crb.h | 159 ++ .../selftests/powerpc/nx-gzip/inc/nx-gzip.h | 27 +++

[PATCH V2 0/5] selftests/powerpc: Add NX-GZIP engine testcase

2020-03-27 Thread Raphael Moreira Zinsly
This patch series are intended to test the POWER9 Nest Accelerator (NX) GZIP engine that is being introduced by https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-March/205659.html More information about how to access the NX can be found in that patch, also a complete userspace library and more

Re: [PATCH v2 1/1] ppc/crash: Skip spinlocks during crash

2020-03-27 Thread Leonardo Bras
Hello Michael, On Fri, 2020-03-27 at 14:50 +1100, Michael Ellerman wrote: > Hi Leonardo, > > Leonardo Bras writes: > > During a crash, there is chance that the cpus that handle the NMI IPI > > are holding a spin_lock. If this spin_lock is needed by crashing_cpu it > > will cause a deadlock.

[PATCH 1/3] powerpc/head_check: Automatic verbosity

2020-03-27 Thread Geoff Levand
To aid debugging build problems turn on shell tracing for the head_check script when the build is verbose. Signed-off-by: Geoff Levand --- arch/powerpc/tools/head_check.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/tools/head_check.sh

[PATCH 0/3] powerpc: Minor updates to improve build debugging

2020-03-27 Thread Geoff Levand
Hi Michael, Here are a few minor updates to the powerpc build files that make debugging build problems a little easier. Please consider. -Geoff The following changes since commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e: Linux 5.6-rc7 (2020-03-22 18:31:56 -0700) are available in the Git

[PATCH 3/3] powerpc/head_check: Avoid broken pipe

2020-03-27 Thread Geoff Levand
Remove the '-m4' option to grep to allow grep to process all of nm's output. This avoids the nm warning: nm terminated with signal 13 [Broken pipe] Signed-off-by: Geoff Levand --- arch/powerpc/tools/head_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/3] powerpc/wrapper: Output linker map file

2020-03-27 Thread Geoff Levand
To aid debugging wrapper troubles, output a linker map file 'wrapper.map' when the build is verbose. Signed-off-by: Geoff Levand --- arch/powerpc/boot/wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index

[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 ++---

Re: [PATCH v1] powerpc: Make setjmp/longjump signature standard

2020-03-27 Thread Christophe Leroy
Subject line, change longjump to longjmp Le 27/03/2020 à 11:07, Clement Courbet a écrit : Declaring setjmp()/longjmp() as taking longs makes the signature non-standard, and makes clang complain. In the past, this has been worked around by adding -ffreestanding to the compile flags. The

RFA [PPC kernel] Avoid upcoming PPC kernel build failure

2020-03-27 Thread H.J. Lu
On Fri, Mar 27, 2020 at 7:54 AM Yu-cheng Yu wrote: > > On Thu, 2020-02-06 at 04:55 -0800, H.J. Lu wrote: > > On Wed, Feb 5, 2020 at 7:26 PM Michael Ellerman wrote: > > > "H.J. Lu" writes: > > > > On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot wrote: > > > > > tree:

Re: [PATCH v1] powerpc: Make setjmp/longjump signature standard

2020-03-27 Thread Nathan Chancellor
On Fri, Mar 27, 2020 at 10:10:44AM -0700, Nick Desaulniers wrote: > On Fri, Mar 27, 2020 at 3:08 AM Clement Courbet wrote: > > > > Declaring setjmp()/longjmp() as taking longs makes the signature > > non-standard, and makes clang complain. In the past, this has been > > worked around by adding

Re: [PATCH v1] powerpc: Make setjmp/longjump signature standard

2020-03-27 Thread Nick Desaulniers
On Fri, Mar 27, 2020 at 3:08 AM Clement Courbet wrote: > > Declaring setjmp()/longjmp() as taking longs makes the signature > non-standard, and makes clang complain. In the past, this has been > worked around by adding -ffreestanding to the compile flags. > > The implementation looks like it only

Re: [PATCH] x86: Alias memset to __builtin_memset.

2020-03-27 Thread Segher Boessenkool
Hi! On Thu, Mar 26, 2020 at 01:38:39PM +0100, Clement Courbet wrote: > --- a/arch/powerpc/include/asm/setjmp.h > +++ b/arch/powerpc/include/asm/setjmp.h > @@ -12,7 +12,9 @@ > > #define JMP_BUF_LEN23 > -extern long setjmp(long *); > -extern void longjmp(long *, long); > +typedef long *

[PATCH] soc: fsl: qe: clean up an indentation issue

2020-03-27 Thread Colin King
From: Colin Ian King There is a statement that not indented correctly, remove the extraneous space. Signed-off-by: Colin Ian King --- drivers/soc/fsl/qe/ucc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/ucc.c b/drivers/soc/fsl/qe/ucc.c index

[PATCH 0/6] Kill setup_irq()

2020-03-27 Thread afzal mohammed
Hi Thomas, As compared to the situation mentioned earlier[1], now powerpc patch is also in -next, and the pending ARM patches has been picked up by ARM SoC maintainers today and is expected to show up in next -next. All other subsytem patches has been picked by relevant maintainers & are already

Re: [PATCH 1/1] ppc/crash: Skip spinlocks during crash

2020-03-27 Thread Leonardo Bras
Hello Christophe, thanks for the feedback. I noticed an error in this patch and sent a v2, that can be seen here: http://patchwork.ozlabs.org/patch/1262468/ Comments inline:: On Fri, 2020-03-27 at 07:50 +0100, Christophe Leroy wrote: > > @@ -142,6 +144,8 @@ static inline void

Re: [PATCH v2] powerpc/boot: Delete unneeded .globl _zimage_start

2020-03-27 Thread Segher Boessenkool
On Thu, Mar 26, 2020 at 03:26:12PM -0700, Fangrui Song wrote: > On 2020-03-26, Segher Boessenkool wrote: > >On Wed, Mar 25, 2020 at 09:42:57AM -0700, Fangrui Song wrote: > >>.globl sets the symbol binding to STB_GLOBAL while .weak sets the > >>binding to STB_WEAK. GNU as let .weak override .globl

Re: [PATCH v2] powerpc xmon: use `dcbf` inplace of `dcbi` instruction for 64bit Book3S

2020-03-27 Thread Christophe Leroy
Le 27/03/2020 à 10:03, Balamuruhan S a écrit : On Fri, 2020-03-27 at 07:48 +0100, Christophe Leroy wrote: Le 26/03/2020 à 07:15, Balamuruhan S a écrit : Data Cache Block Invalidate (dcbi) instruction was implemented back in PowerPC architecture version 2.03. It is obsolete and attempt to

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Andy Shevchenko
On Fri, Mar 27, 2020 at 02:22:55PM +0100, Arnd Bergmann wrote: > On Fri, Mar 27, 2020 at 2:15 PM Andy Shevchenko > wrote: > > On Fri, Mar 27, 2020 at 03:10:26PM +0200, Andy Shevchenko wrote: > > > On Fri, Mar 27, 2020 at 01:54:33PM +0100, Arnd Bergmann wrote: > > > > On Fri, Mar 27, 2020 at 1:12

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Arnd Bergmann
On Fri, Mar 27, 2020 at 2:15 PM Andy Shevchenko wrote: > On Fri, Mar 27, 2020 at 03:10:26PM +0200, Andy Shevchenko wrote: > > On Fri, Mar 27, 2020 at 01:54:33PM +0100, Arnd Bergmann wrote: > > > On Fri, Mar 27, 2020 at 1:12 PM Michal Simek > > > wrote: > > > > > > > > recently we wanted to

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Andy Shevchenko
On Fri, Mar 27, 2020 at 03:10:26PM +0200, Andy Shevchenko wrote: > On Fri, Mar 27, 2020 at 01:54:33PM +0100, Arnd Bergmann wrote: > > On Fri, Mar 27, 2020 at 1:12 PM Michal Simek > > wrote: > > > > > > recently we wanted to update xilinx intc driver and we found that function > > > which we

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Andy Shevchenko
On Fri, Mar 27, 2020 at 01:54:33PM +0100, Arnd Bergmann wrote: > On Fri, Mar 27, 2020 at 1:12 PM Michal Simek wrote: > > > > recently we wanted to update xilinx intc driver and we found that function > > which we wanted to remove is still wired by ancient Xilinx PowerPC > > platforms. Here is the

Re: [PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Arnd Bergmann
On Fri, Mar 27, 2020 at 1:12 PM Michal Simek wrote: > > recently we wanted to update xilinx intc driver and we found that function > which we wanted to remove is still wired by ancient Xilinx PowerPC > platforms. Here is the thread about it. >

Re: [patch V3 03/20] usb: gadget: Use completion interface instead of open coding it

2020-03-27 Thread Sebastian Siewior
On 2020-03-25 10:37:57 [+0200], Felipe Balbi wrote: > Do you want to carry it via your tree? If so: We would like to do so. > Acked-by: Felipe Balbi Thank you. > Otherwise, let me know and I'll pick this patch. Sebastian

[PATCH 2/2] powerpc: Remove Xilinx PPC405/PPC440 support

2020-03-27 Thread Michal Simek
The latest Xilinx design tools called ISE and EDK has been released in October 2013. New tool doesn't support any PPC405/PPC440 new designs. These platforms are no longer supported and tested. PowerPC 405/440 port is orphan from 2013 by commit cdeb89943bfc ("MAINTAINERS: Fix incorrect status

[PATCH 0/2] powerpc: Remove support for ppc405/440 Xilinx platforms

2020-03-27 Thread Michal Simek
Hi, recently we wanted to update xilinx intc driver and we found that function which we wanted to remove is still wired by ancient Xilinx PowerPC platforms. Here is the thread about it. https://lore.kernel.org/linux-next/48d3232d-0f1d-42ea-3109-f44bbabfa...@xilinx.com/ I have been talking about

Re: [PATCH v3] powerpc/perf: Use SIER_USER_MASK while updating SPRN_SIER for EBB events

2020-03-27 Thread Athira Rajeev
> On 19-Mar-2020, at 4:22 PM, Michael Ellerman wrote: > > Hi Athira, > > Athira Rajeev writes: >> Sampled Instruction Event Register (SIER), is a PMU register, > ^ >

[PATCH v4 4/6] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On Pseries LPARs, to calculate utilization, we need to know the [S]PURR ticks when the CPUs were busy or idle. The total PURR and SPURR ticks are already exposed via the per-cpu sysfs files "purr" and "spurr". This patch adds support for exposing the idle PURR and

[PATCH v4 6/6] pseries/sysfs: Minimise IPI noise while reading [idle_][s]purr

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently purr, spurr, idle_purr, idle_spurr are exposed for every CPU via the sysfs interface /sys/devices/system/cpu/cpuX/[idle_][s]purr. Each sysfs read currently generates an IPI to obtain the desired value from the target CPU X. Since these aforementioned sysfs are

[PATCH v4 5/6] Documentation: Document sysfs interfaces purr, spurr, idle_purr, idle_spurr

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Add documentation for the following sysfs interfaces: /sys/devices/system/cpu/cpuX/purr /sys/devices/system/cpu/cpuX/spurr /sys/devices/system/cpu/cpuX/idle_purr /sys/devices/system/cpu/cpuX/idle_spurr Signed-off-by: Gautham R. Shenoy ---

[PATCH v4 1/6] powerpc: Move idle_loop_prolog()/epilog() functions to header file

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently prior to entering an idle state on a Linux Guest, the pseries cpuidle driver implement an idle_loop_prolog() and idle_loop_epilog() functions which ensure that idle_purr is correctly computed, and the hypervisor is informed that the CPU cycles have been

[PATCH v4 3/6] powerpc/pseries: Account for SPURR ticks on idle CPUs

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On Pseries LPARs, to calculate utilization, we need to know the [S]PURR ticks when the CPUs were busy or idle. Via pseries_idle_prolog(), pseries_idle_epilog(), we track the idle PURR ticks in the VPA variable "wait_state_cycles". This patch extends the support to

[PATCH v4 2/6] powerpc/idle: Add accessor function to always read latest idle PURR

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently when CPU goes idle, we take a snapshot of PURR via pseries_idle_prolog() which is used at the CPU idle exit to compute the idle PURR cycles via the function pseries_idle_epilog(). Thus, the value of idle PURR cycle thus read before pseries_idle_prolog() and

[PATCH v4 0/6] [PATCH v4 0/6] Track and expose idle PURR and SPURR ticks

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the fourth version of the patches to track and expose idle PURR and SPURR ticks. These patches are required by tools such as lparstat to compute system utilization for capacity planning purposes. The previous versions can be found here: v3:

[PATCH v7 6/6] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-03-27 Thread Kajol Jain
The hv_24×7 feature in IBM® POWER9™ processor-based servers provide the facility to continuously collect large numbers of hardware performance metrics efficiently and accurately. This patch adds hv_24x7 metric file for different Socket/chip resources. Result: power9 platform: command:# ./perf

[PATCH v7 5/6] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-03-27 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: Kajol Jain --- tools/perf/util/stat-display.c | 2

[PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-27 Thread Kajol Jain
Patch enhances current metric infrastructure to handle "?" in the metric expression. The "?" can be use for parameters whose value not known while creating metric events and which can be replace later at runtime to the proper value. It also add flexibility to create multiple events out of single

[PATCH v7 3/6] perf/tools: Refactoring metricgroup__add_metric function

2020-03-27 Thread Kajol Jain
This patch refactor metricgroup__add_metric function where some part of it move to function metricgroup__add_metric_param. No logic change. Signed-off-by: Kajol Jain --- tools/perf/util/metricgroup.c | 61 +-- 1 file changed, 36 insertions(+), 25 deletions(-)

[PATCH v7 2/6] perf expr: Add expr_scanner_ctx object

2020-03-27 Thread Kajol Jain
From: Jiri Olsa Adding expr_scanner_ctx object to hold user data for the expr scanner. Currently it holds only start_token, Kajol Jain will use it to hold 24x7 runtime param. Signed-off-by: Jiri Olsa --- tools/perf/util/expr.c | 6 -- tools/perf/util/expr.h | 4

[PATCH v7 1/6] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-03-27 Thread Kajol Jain
From: Jiri Olsa Adding expr_ prefix for parse_ctx and parse_id, to straighten out the expr* namespace. There's no functional change. Signed-off-by: Jiri Olsa --- tools/perf/tests/expr.c | 4 ++-- tools/perf/util/expr.c| 10 +- tools/perf/util/expr.h| 12

[PATCH v7 0/6] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-27 Thread Kajol Jain
Patchset adds json file metric support for the hv_24x7 socket/chip level events. "hv_24x7" pmu interface events needs system dependent parameter like socket/chip/core. For example, hv_24x7 chip level events needs specific chip-id to which the data is requested should be added as part of pmu

Re: hardcoded SIGSEGV in __die() ?

2020-03-27 Thread Joakim Tjernlund
On Thu, 2020-03-26 at 11:28 +1100, Michael Ellerman wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Joakim Tjernlund writes: > > On Mon, 2020-03-23 at 15:45

Re: [PATCH v6 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-27 Thread kajoljain
On 3/24/20 6:41 PM, Jiri Olsa wrote: > On Fri, Mar 20, 2020 at 06:24:04PM +0530, Kajol Jain wrote: >> Patch enhances current metric infrastructure to handle "?" in the metric >> expression. The "?" can be use for parameters whose value not known while >> creating metric events and which can be

[PATCH] selftests/powerpc: Fix try-run when source tree is not writable

2020-03-27 Thread Michael Ellerman
We added a usage of try-run to pmu/ebb/Makefile to detect if the toolchain supported the -no-pie option. This fails if we build out-of-tree and the source tree is not writable, as try-run tries to write its temporary files to the current directory. That leads to the -no-pie option being silently

Re: [PATCH v2] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-27 Thread David Hildenbrand
On 26.03.20 14:32, Aneesh Kumar K.V wrote: > Fixes the below crash > > BUG: Kernel NULL pointer dereference on read at 0x > Faulting instruction address: 0xc0c3447c > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries > CPU: 11

Re: [PATCH 1/2] powerpc/vmlinux.lds: Explicitly retain .gnu.hash

2020-03-27 Thread Michael Ellerman
Alan Modra writes: > On Thu, Feb 27, 2020 at 03:59:32PM +1100, Michael Ellerman wrote: >> Relocatable kernel builds produce a warning about .gnu.hash being an >> orphan section: >> >> ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed >> in section `.gnu.hash' >> >> If

Re: [PATCH 2/2] powerpc/vmlinux.lds: Discard .interp section

2020-03-27 Thread Michael Ellerman
Alan Modra writes: > On Thu, Feb 27, 2020 at 03:59:33PM +1100, Michael Ellerman wrote: >> The .interp section specifies which "interpreter", ie. dynamic loader, >> the kernel requests. But that doesn't make any sense, the kernel is >> not a regular binary that is run with an interpreter. >> >>

Re: [PATCH v2] powerpc/kprobes: Blacklist functions running with MMU disabled on PPC32

2020-03-27 Thread Naveen N. Rao
Christophe Leroy wrote: kprobe does not handle events happening in real mode, all functions running with MMU disabled have to be blacklisted. As already done for PPC64, do it for PPC32. Signed-off-by: Christophe Leroy --- v2: - Don't rename nonrecoverable as local, mark it noprobe instead. -

Re: [PATCH v2] powerpc xmon: use `dcbf` inplace of `dcbi` instruction for 64bit Book3S

2020-03-27 Thread Balamuruhan S
On Fri, 2020-03-27 at 07:48 +0100, Christophe Leroy wrote: > > Le 26/03/2020 à 07:15, Balamuruhan S a écrit : > > Data Cache Block Invalidate (dcbi) instruction was implemented back in > > PowerPC > > architecture version 2.03. It is obsolete and attempt to use of this > > illegal > > instruction

Re: [PATCH 3/4] powerpc/uaccess: evaluate macro arguments once, before user access is allowed

2020-03-27 Thread Christophe Leroy
Le 27/03/2020 à 08:02, Nicholas Piggin a écrit : get/put_user can be called with nontrivial arguments. fs/proc/page.c has a good example: if (put_user(stable_page_flags(ppage), out)) { stable_page_flags is quite a lot of code, including spin locks in the page allocator. Ensure these

Re: [PATCH 1/4] powerpc/64s: implement probe_kernel_read/write without touching AMR

2020-03-27 Thread Christophe Leroy
Le 27/03/2020 à 08:02, Nicholas Piggin a écrit : There is no need to allow user accesses when probing kernel addresses. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/uaccess.h | 25 ++- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/uaccess.c

[PATCH 3/4] powerpc/uaccess: evaluate macro arguments once, before user access is allowed

2020-03-27 Thread Nicholas Piggin
get/put_user can be called with nontrivial arguments. fs/proc/page.c has a good example: if (put_user(stable_page_flags(ppage), out)) { stable_page_flags is quite a lot of code, including spin locks in the page allocator. Ensure these arguments are evaluated before user access is allowed.

[PATCH 2/4] powerpc/64s: use mmu_has_feature in set_kuap() and get_kuap()

2020-03-27 Thread Nicholas Piggin
Commit 8150a153c013 ("powerpc/64s: Use early_mmu_has_feature() in set_kuap()"), had to switch to using the _early feature test, because probe_kernel_read was being called very early. After the previous patch, probe_kernel_read no longer touches kuap, so it can go back to using the non-_early

[PATCH 1/4] powerpc/64s: implement probe_kernel_read/write without touching AMR

2020-03-27 Thread Nicholas Piggin
There is no need to allow user accesses when probing kernel addresses. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/uaccess.h | 25 ++- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/uaccess.c | 50 ++ 3 files changed,

Re: [PATCH V2 0/3] mm/debug: Add more arch page table helper tests

2020-03-27 Thread Christophe Leroy
On 03/27/2020 06:46 AM, Anshuman Khandual wrote: On 03/26/2020 08:53 PM, Christophe Leroy wrote: Le 26/03/2020 à 03:23, Anshuman Khandual a écrit : On 03/24/2020 10:52 AM, Anshuman Khandual wrote: This series adds more arch page table helper tests. The new tests here are either

Re: [PATCH 1/1] ppc/crash: Skip spinlocks during crash

2020-03-27 Thread Christophe Leroy
Le 26/03/2020 à 23:28, Leonardo Bras a écrit : During a crash, there is chance that the cpus that handle the NMI IPI are holding a spin_lock. If this spin_lock is needed by crashing_cpu it will cause a deadlock. (rtas_lock and printk logbuf_log as of today) This is a problem if the system

Re: [PATCH v2] powerpc xmon: use `dcbf` inplace of `dcbi` instruction for 64bit Book3S

2020-03-27 Thread Christophe Leroy
Le 26/03/2020 à 07:15, Balamuruhan S a écrit : Data Cache Block Invalidate (dcbi) instruction was implemented back in PowerPC architecture version 2.03. It is obsolete and attempt to use of this illegal instruction results in a hypervisor emulation assistance interrupt. So, ifdef it out the

Re: [PATCH V2 0/3] mm/debug: Add more arch page table helper tests

2020-03-27 Thread Anshuman Khandual
On 03/26/2020 08:53 PM, Christophe Leroy wrote: > > > Le 26/03/2020 à 03:23, Anshuman Khandual a écrit : >> >> >> On 03/24/2020 10:52 AM, Anshuman Khandual wrote: >>> This series adds more arch page table helper tests. The new tests here are >>> either related to core memory functions and

[PATCH v7 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-03-27 Thread Kajol Jain
Function 'read_sys_info_pseries()' is added to get system parameter values like number of sockets and chips per socket. and it gets these details via rtas_call with token "PROCESSOR_MODULE_INFO". Incase lpar migrate from one system to another, system parameter details like chips per sockets or

[PATCH v7 4/5] Documentation/ABI: Add ABI documentation for chips and sockets

2020-03-27 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PATCH v7 3/5] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-03-27 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 22

[PATCH v7 2/5] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-03-27 Thread Kajol Jain
For hv_24x7 socket/chip level events, specific chip-id to which the data requested should be added as part of pmu events. But number of chips/socket in the system details are not exposed. Patch implements read_sys_info_pseries() to get system parameter values like number of sockets and chips per

[PATCH v7 1/5] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-03-27 Thread Kajol Jain
Commit 2b206ee6b0df ("powerpc/perf/hv-24x7: Display change in counter values")' added to print _change_ in the counter value rather then raw value for 24x7 counters. Incase of transactions, the event count is set to 0 at the beginning of the transaction. It also sets the event's prev_count to the

[PATCH v7 0/5] powerpc/hv-24x7: Expose chip/sockets info to add json file metric support for the hv_24x7 socket/chip level events

2020-03-27 Thread Kajol Jain
Patchset fixes the inconsistent results we are getting when we run multiple 24x7 events. "hv_24x7" pmu interface events needs system dependent parameter like socket/chip/core. For example, hv_24x7 chip level events needs specific chip-id to which the data is requested should be added as part of