[powerpc:next-test] BUILD SUCCESS 824a2d10fcf429689cd20d7d36eeb24697466c9b

2020-04-01 Thread kbuild test robot
pariscgeneric-64bit_defconfig x86_64 randconfig-a001-20200401 x86_64 randconfig-a002-20200401 x86_64 randconfig-a003-20200401 i386 randconfig-a001-20200401 i386 randconfig-a002-20200401 i386

[powerpc:merge] BUILD SUCCESS d0c12846a3a24cd6d68b608c866712bc7e471634

2020-04-01 Thread kbuild test robot
generic-64bit_defconfig x86_64 randconfig-a001-20200401 x86_64 randconfig-a002-20200401 x86_64 randconfig-a003-20200401 i386 randconfig-a001-20200401 i386 randconfig-a002-20200401 i386

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

2020-04-01 Thread kbuild test robot
Hi Leonardo, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/locking/core] [also build test ERROR on powerpc/next paulus-powerpc/kvm-ppc-next v5.6 next-20200401] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system

RE: [PATCH v4 03/25] powerpc/powernv: Map & release OpenCAPI LPC memory

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:49 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; Arnd Bergmann > ; Greg

RE: [PATCH v4 02/25] mm/memory_hotplug: Allow check_hotplug_memory_addressable to be called from drivers

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; Arnd Bergmann > ; Greg

Re: [RFC PATCH 3/4] powerpc ppc-opcode: move ppc instuction encoding from test_emulate_step

2020-04-01 Thread Michael Ellerman
"Naveen N. Rao" writes: > Balamuruhan S wrote: >> Few ppc instructions are encoded in test_emulate_step.c, consolidate them to >> ppc-opcode.h, fix redefintion errors in bpf_jit caused due to this >> consolidation. >> Reuse the macros from ppc-opcode.h ... >> diff --git

Re: [PATCH v4 00/25] Add support for OpenCAPI Persistent Memory devices

2020-04-01 Thread Oliver O'Halloran
On Thu, Apr 2, 2020 at 2:42 PM Michael Ellerman wrote: > > "Alastair D'Silva" writes: > >> -Original Message- > >> From: Dan Williams > >> > >> On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva > >> wrote: > >> > > >> > *snip* > >> Are OPAL calls similar to ACPI DSMs? I.e. methods for

RE: [PATCH v4 00/25] Add support for OpenCAPI Persistent Memory devices

2020-04-01 Thread Michael Ellerman
"Alastair D'Silva" writes: >> -Original Message- >> From: Dan Williams >> >> On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva >> wrote: >> > >> > This series adds support for OpenCAPI Persistent Memory devices on >> > bare metal (arch/powernv), exposing them as nvdimms so that we can

Re: [PATCH v5 1/4] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-04-01 Thread Dan Williams
On Tue, Mar 31, 2020 at 7:33 AM Vaibhav Jain wrote: > > Implement support for fetching nvdimm health information via > H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair > of 64-bit big-endian integers which are then stored in 'struct > papr_scm_priv' and subsequently partially

Re: [PATCH v4 19/25] nvdimm/ocxl: Forward events to userspace

2020-04-01 Thread Dan Williams
On Tue, Mar 31, 2020 at 1:59 AM Alastair D'Silva wrote: > > Some of the interrupts that the card generates are better handled > by the userspace daemon, in particular: > Controller Hardware/Firmware Fatal > Controller Dump Available > Error Log available > > This patch allows a userspace

Re: [PATCH v4 08/25] ocxl: Emit a log message showing how much LPC memory was detected

2020-04-01 Thread Joe Perches
On Wed, 2020-04-01 at 01:49 -0700, Dan Williams wrote: > On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva > wrote: > > This patch emits a message showing how much LPC memory & special purpose > > memory was detected on an OCXL device. [] > > diff --git a/drivers/misc/ocxl/config.c

Re: [PATCH v4 15/25] nvdimm/ocxl: Register a character device for userspace to interact with

2020-04-01 Thread Dan Williams
On Sun, Mar 29, 2020 at 10:53 PM Alastair D'Silva wrote: > > This patch introduces a character device (/dev/ocxlpmemX) which further > patches will use to interact with userspace, such as error logs, > controller stats and card debug functionality. This was asked earlier, but I'll reiterate, I

Re: [PATCH v4 13/25] nvdimm/ocxl: Read the capability registers & wait for device ready

2020-04-01 Thread Dan Williams
On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva wrote: > > This patch reads timeouts & firmware version from the controller, and > uses those timeouts to wait for the controller to report that it is ready > before handing the memory over to libnvdimm. > > Signed-off-by: Alastair D'Silva > ---

Re: [PATCH v3 1/1] ppc/crash: Reset spinlocks during crash

2020-04-01 Thread Leonardo Bras
Hello Peter, On Wed, 2020-04-01 at 11:26 +0200, Peter Zijlstra wrote: > You might want to add a note to your asm/spinlock.h that you rely on > spin_unlock() unconditionally clearing a lock. > > This isn't naturally true for all lock implementations. Consider ticket > locks, doing a surplus

Re: [PATCH v4 03/16] powerpc: Use a datatype for instructions

2020-04-01 Thread Jordan Niethe
On Wed, Apr 1, 2020 at 9:32 PM Balamuruhan S wrote: > > On Fri, 2020-03-20 at 16:17 +1100, Jordan Niethe wrote: > > Currently unsigned ints are used to represent instructions on powerpc. > > This has worked well as instructions have always been 4 byte words. > > However, a future ISA version will

Re: linux-next: manual merge of the net-next tree with the powerpc tree

2020-04-01 Thread Stephen Rothwell
Hi all, On Fri, 6 Mar 2020 10:21:58 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the net-next tree got a conflict in: > > fs/sysfs/group.c > > between commit: > > 9255782f7061 ("sysfs: Wrap __compat_only_sysfs_link_entry_to_kobj function > to change the symlink name") >

RE: [PATCH v4 01/25] powerpc/powernv: Add OPAL calls for LPC memory alloc/release

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; Arnd Bergmann > ; Greg

RE: [PATCH v4 00/25] Add support for OpenCAPI Persistent Memory devices

2020-04-01 Thread Alastair D'Silva
> -Original Message- > From: Dan Williams > Sent: Wednesday, 1 April 2020 7:48 PM > To: Alastair D'Silva > Cc: Aneesh Kumar K . V ; Oliver O'Halloran > ; Benjamin Herrenschmidt > ; Paul Mackerras ; Michael > Ellerman ; Frederic Barrat ; > Andrew Donnellan ; Arnd Bergmann > ; Greg

Re: [PATCH v2 1/1] vfio-pci/nvlink2: Allow fallback to ibm,mmio-atsd[0]

2020-04-01 Thread Alex Williamson
On Tue, 31 Mar 2020 15:12:46 +1100 Sam Bobroff wrote: > Older versions of skiboot only provide a single value in the device > tree property "ibm,mmio-atsd", even when multiple Address Translation > Shoot Down (ATSD) registers are present. This prevents NVLink2 devices > (other than the first)

[PATCH v5 6/9] crypto/nx: Make enable code generic to add new GZIP compression type

2020-04-01 Thread Haren Myneni
(Sorry for reposting. version number is missed in subject) Make setup and enable code generic to support new GZIP compression type. Changed nx842 reference to nx and moved some code to new functions. Functionality is not changed except sparse warning fix - setting NULL instead of 0 for per_cpu

[PATCH v9 06/13] powerpc/vas: Take reference to PID and mm for user space windows

2020-04-01 Thread Haren Myneni
(sorry reposting. version string missed) When process opens a window, its pid and tgid will be saved in the vas_window struct. This window will be closed when the process exits. The kernel handles NX faults by updating CSB or send SEGV signal to pid of the process if the user space csb addr is

[PATCH v5 9/9] Documentation/powerpc: VAS API

2020-04-01 Thread Haren Myneni
Power9 introduced Virtual Accelerator Switchboard (VAS) which allows user space to communicate with Nest Accelerator (NX) directly. But kernel has to establish channel to NX for user space. This document describes user space API that application can use to establish communication channel.

[PATCH v5 8/9] crypto/nx: Remove 'pid' in vas_tx_win_attr struct

2020-04-01 Thread Haren Myneni
When window is opened, pid reference is taken for user space windows. Not needed for kernel windows. So remove 'pid' in vas_tx_win_attr struct. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- arch/powerpc/include/asm/vas.h| 1 - drivers/crypto/nx/nx-common-powernv.c | 1 - 2

[PATCH v5 7/9] crypto/nx: Enable and setup GZIP compression type

2020-04-01 Thread Haren Myneni
Changes to probe GZIP device-tree nodes, open RX windows and setup GZIP compression type. No plans to provide GZIP usage in kernel right now, but this patch enables GZIP for user space usage. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/nx-common-powernv.c | 43

[PATCH 6/9] crypto/nx: Make enable code generic to add new GZIP compression type

2020-04-01 Thread Haren Myneni
Make setup and enable code generic to support new GZIP compression type. Changed nx842 reference to nx and moved some code to new functions. Functionality is not changed except sparse warning fix - setting NULL instead of 0 for per_cpu send window in nx_delete_coprocs(). Signed-off-by: Haren

[PATCH v5 5/9] crypto/nx: Rename nx-842-powernv file name to nx-common-powernv

2020-04-01 Thread Haren Myneni
Rename nx-842-powernv.c to nx-common-powernv.c to add code for setup and enable new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni Acked-by: Herbert Xu --- drivers/crypto/nx/Makefile|2 +-

[PATCH v5 4/9] crypto/nx: Initialize coproc entry with kzalloc

2020-04-01 Thread Haren Myneni
coproc entry is initialized during NX probe on power9, but not on P8. nx842_delete_coprocs() is used for both and frees receive window if it is allocated. Getting crash for rmmod on P8 since coproc->vas.rxwin is not initialized. This patch replaces kmalloc with kzalloc in nx842_powernv_probe()

[PATCH v5 3/9] powerpc/vas: Add VAS user space API

2020-04-01 Thread Haren Myneni
On power9, user space can send GZIP compression requests directly to NX once kernel establishes NX channel / window with VAS. This patch provides user space API which allows user space to establish channel using open VAS_TX_WIN_OPEN ioctl, mmap and close operations. Each window corresponds to

[PATCH v5 2/9] powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API

2020-04-01 Thread Haren Myneni
Define the VAS_TX_WIN_OPEN ioctl interface for NX GZIP access from user space. This interface is used to open GZIP send window and mmap region which can be used by user space to send requests to NX directly with copy/paste instructions. Signed-off-by: Haren Myneni ---

[PATCH v5 1/9] powerpc/vas: Initialize window attributes for GZIP coprocessor type

2020-04-01 Thread Haren Myneni
Initialize send and receive window attributes for GZIP high and normal priority types. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c

[PATCH v5 0/9] crypto/nx: Enable GZIP engine and provide userpace API

2020-04-01 Thread Haren Myneni
Power9 processor supports Virtual Accelerator Switchboard (VAS) which allows kernel and userspace to send compression requests to Nest Accelerator (NX) directly. The NX unit comprises of 2 842 compression engines and 1 GZIP engine. Linux kernel already has 842 compression support on kernel. This

[PATCH v2] sched/core: fix illegal RCU from offline CPUs

2020-04-01 Thread Qian Cai
From: Peter Zijlstra In the CPU-offline process, it calls mmdrop() after idle entry and the subsequent call to cpuhp_report_idle_dead(). Once execution passes the call to rcu_report_dead(), RCU is ignoring the CPU, which results in lockdep complaining when mmdrop() uses RCU from either memcg or

Re: [PATCH v2] powerpc/pseries: Fix MCE handling on pseries

2020-04-01 Thread Ganesh
On 3/20/20 4:31 PM, Ganesh Goudar wrote: MCE handling on pSeries platform fails as recent rework to use common code for pSeries and PowerNV in machine check error handling tries to access per-cpu variables in realmode. The per-cpu variables may be outside the RMO region on pSeries platform and

[PATCH v9 13/13] powerpc/vas: Free send window in VAS instance after credits returned

2020-04-01 Thread Haren Myneni
NX may be processing requests while trying to close window. Wait until all credits are returned and then free send window from VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v9 12/13] powerpc/vas: Display process stuck message

2020-04-01 Thread Haren Myneni
Process can not close send window until all requests are processed. Means wait until window state is not busy and send credits are returned. Display debug messages in case taking longer to close the window. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 28

[PATCH v9 11/13] powerpc/vas: Do not use default credits for receive window

2020-04-01 Thread Haren Myneni
System checkstops if RxFIFO overruns with more requests than the maximum possible number of CRBs allowed in FIFO at any time. So max credits value (rxattr.wcreds_max) is set and is passed to vas_rx_win_open() by the the driver. Signed-off-by: Haren Myneni ---

[PATCH v9 10/13] powerpc/vas: Print CRB and FIFO values

2020-04-01 Thread Haren Myneni
Dump FIFO entries if could not find send window and print CRB for debugging. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 41 ++ 1 file changed, 41 insertions(+) diff --git

[PATCH v9 09/13] powerpc/vas: Return credits after handling fault

2020-04-01 Thread Haren Myneni
NX uses credit mechanism to control the number of requests issued on a specific window at any point of time. Only send windows and fault window are used credits. When the request is issued on a given window, a credit is taken. This credit will be returned after that request is processed. If

[PATCH v9 08/13] powerpc/vas: Update CSB and notify process for fault CRBs

2020-04-01 Thread Haren Myneni
Applications polls on CSB for the status update after requests are issued. NX process these requests and update the CSB with the status. If it encounters translation error, pastes CRB in fault FIFO and raises an interrupt. The kernel handles fault by reading CRB from fault FIFO and process the

[PATCH v9 07/13] powerpc/vas: Setup thread IRQ handler per VAS instance

2020-04-01 Thread Haren Myneni
When NX encounters translation error on CRB and any request buffer, raises an interrupt on the CPU to handle the fault. It can raise one interrupt for multiple faults. Expects OS to handle these faults and return credits for fault window after processing faults. Setup thread IRQ handler and IRQ

[PATCH 06/13] powerpc/vas: Take reference to PID and mm for user space windows

2020-04-01 Thread Haren Myneni
When process opens a window, its pid and tgid will be saved in the vas_window struct. This window will be closed when the process exits. The kernel handles NX faults by updating CSB or send SEGV signal to pid of the process if the userspace csb addr is invalid. In multi-thread applications, a

[PATCH v9 05/13] powerpc/vas: Register NX with fault window ID and IRQ port value

2020-04-01 Thread Haren Myneni
For each user space send window, register NX with fault window ID and port value so that NX paste CRBs in this fault FIFO when it sees fault on the request buffer. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 15

[PATCH v9 04/13] powerpc/vas: Setup fault window per VAS instance

2020-04-01 Thread Haren Myneni
Setup fault window for each VAS instance. When NX gets a fault on request buffer, pastes fault CRB in the corresponding fault FIFO and then raises an interrupt to the OS. The kernel handles this fault and process faults CRB from this FIFO. Signed-off-by: Sukadev Bhattiprolu Signed-off-by:

[PATCH v9 03/13] powerpc/vas: Alloc and setup IRQ and trigger port address

2020-04-01 Thread Haren Myneni
Allocate a xive irq on each chip with a vas instance. The NX coprocessor raises a host CPU interrupt via vas if it encounters page fault on user space request buffer. Subsequent patches register the trigger port with the NX coprocessor, and create a vas fault handler for this interrupt mapping.

[PATCH v9 02/13] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-04-01 Thread Haren Myneni
Kernel sets fault address and status in CRB for NX page fault on user space address after processing page fault. User space gets the signal and handles the fault mentioned in CRB by bringing the page in to memory and send NX request again. Signed-off-by: Sukadev Bhattiprolu Signed-off-by:

[PATCH v9 01/13] powerpc/xive: Define xive_native_alloc_irq_on_chip()

2020-04-01 Thread Haren Myneni
This function allocates IRQ on a specific chip. VAS needs per chip IRQ allocation and will have IRQ handler per VAS instance. Signed-off-by: Haren Myneni Reviewed-by: Cédric Le Goater --- arch/powerpc/include/asm/xive.h | 9 - arch/powerpc/sysdev/xive/native.c | 6 +++--- 2 files

[PATCH v9 00/13] powerpc/vas: Page fault handling for user space NX requests

2020-04-01 Thread Haren Myneni
On power9, Virtual Accelerator Switchboard (VAS) allows user space or kernel to communicate with Nest Accelerator (NX) directly using COPY/PASTE instructions. NX provides various functionalities such as compression, encryption and etc. But only compression (842 and GZIP formats) is supported in

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

2020-04-01 Thread Arnd Bergmann
On Tue, Mar 31, 2020 at 7:51 PM Segher Boessenkool wrote: > > On Tue, Mar 31, 2020 at 08:56:23AM +0200, Christophe Leroy wrote: > > While we are at it, can we also remove the 601 ? This one is also full > > of workarounds and diverges a bit from other 6xx. > > > > I'm unable to find its end of

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

2020-04-01 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 v8 6/7] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-04-01 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 v8 5/7] perf/tests/expr: Added test for runtime param in metric expression

2020-04-01 Thread Kajol Jain
Added test case for parsing "?" in metric expression. Signed-off-by: Kajol Jain --- tools/perf/tests/expr.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index 516504cf0ea5..f9e8e5628836 100644 --- a/tools/perf/tests/expr.c +++

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

2020-04-01 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 v8 3/7] perf/tools: Refactoring metricgroup__add_metric function

2020-04-01 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 | 60 --- 1 file changed, 35 insertions(+), 25 deletions(-)

[PATCH v8 2/7] perf expr: Add expr_scanner_ctx object

2020-04-01 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 v8 1/7] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-04-01 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 v8 0/7] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-04-01 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: [PATCH v4 12/25] nvdimm/ocxl: Add register addresses & status values to the header

2020-04-01 Thread Dan Williams
On Sun, Mar 29, 2020 at 10:53 PM Alastair D'Silva wrote: > > These values have been taken from the device specifications. Link to specification?

Re: [PATCH v4 11/25] powerpc: Enable the OpenCAPI Persistent Memory driver for powernv_defconfig

2020-04-01 Thread Dan Williams
On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva wrote: > > This patch enables the OpenCAPI Persistent Memory driver, as well > as DAX support, for the 'powernv' defconfig. > > DAX is not a strict requirement for the functioning of the driver, but it > is likely that a user will want to create a

Re: [PATCH v4 10/25] nvdimm: Add driver for OpenCAPI Persistent Memory

2020-04-01 Thread Dan Williams
On Wed, Apr 1, 2020 at 1:49 AM Dan Williams wrote: > > On Sun, Mar 29, 2020 at 10:23 PM Alastair D'Silva > wrote: > > > > This driver exposes LPC memory on OpenCAPI pmem cards > > as an NVDIMM, allowing the existing nvram infrastructure > > to be used. > > > > Namespace metadata is stored on

Re: [PATCH v2 4/4] hugetlbfs: clean up command line processing

2020-04-01 Thread Randy Dunlap
On 4/1/20 11:38 AM, Mike Kravetz wrote: > With all hugetlb page processing done in a single file clean up code. > - Make code match desired semantics > - Update documentation with semantics > - Make all warnings and errors messages start with 'HugeTLB:'. > - Consistently name command line

[PATCH v2 0/4] Clean up hugetlb boot command line processing

2020-04-01 Thread Mike Kravetz
v2 - Fix build errors with patch 1 (Will) Change arch_hugetlb_valid_size arg to unsigned long and remove irrelevant 'extern' keyword (Christophe) Documentation and other misc changes (Randy, Christophe, Mina) Do not process command line options if !hugepages_supported()

[PATCH v2 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-04-01 Thread Mike Kravetz
The architecture independent routine hugetlb_default_setup sets up the default huge pages size. It has no way to verify if the passed value is valid, so it accepts it and attempts to validate at a later time. This requires undocumented cooperation between the arch specific and arch independent

[PATCH v2 3/4] hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate

2020-04-01 Thread Mike Kravetz
The routine hugetlb_add_hstate prints a warning if the hstate already exists. This was originally done as part of kernel command line parsing. If 'hugepagesz=' was specified more than once, the warning pr_warn("hugepagesz= specified twice, ignoring\n"); would be printed. Some

[PATCH v2 4/4] hugetlbfs: clean up command line processing

2020-04-01 Thread Mike Kravetz
With all hugetlb page processing done in a single file clean up code. - Make code match desired semantics - Update documentation with semantics - Make all warnings and errors messages start with 'HugeTLB:'. - Consistently name command line parsing routines. - Check for hugepages_supported()

[PATCH v2 2/4] hugetlbfs: move hugepagesz= parsing to arch independent code

2020-04-01 Thread Mike Kravetz
Now that architectures provide arch_hugetlb_valid_size(), parsing of "hugepagesz=" can be done in architecture independent code. Create a single routine to handle hugepagesz= parsing and remove all arch specific routines. We can also remove the interface hugetlb_bad_size() as this is no longer

Re: [PATCHv4] powerpc/crashkernel: take "mem=" option into account

2020-04-01 Thread Hari Bathini
On 01/04/20 7:30 PM, Pingfan Liu wrote: > 'mem=" option is an easy way to put high pressure on memory during some > test. Hence after applying the memory limit, instead of total mem, the > actual usable memory should be considered when reserving mem for > crashkernel. Otherwise the boot up may

Re: [RFC PATCH 3/4] powerpc ppc-opcode: move ppc instuction encoding from test_emulate_step

2020-04-01 Thread Naveen N. Rao
Balamuruhan S wrote: Few ppc instructions are encoded in test_emulate_step.c, consolidate them to ppc-opcode.h, fix redefintion errors in bpf_jit caused due to this consolidation. Reuse the macros from ppc-opcode.h Signed-off-by: Balamuruhan S --- arch/powerpc/include/asm/ppc-opcode.h | 34

[PATCH 4.14 037/148] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-04-01 Thread Greg Kroah-Hartman
From: Vlastimil Babka commit 0715e6c516f106ed553828a671d30ad9a3431536 upstream. Sachin reports [1] a crash in SLUB __slab_alloc(): BUG: Kernel NULL pointer dereference on read at 0x73b0 Faulting instruction address: 0xc03d55f4 Oops: Kernel access of bad area, sig: 11 [#1]

[PATCH 4.9 026/102] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-04-01 Thread Greg Kroah-Hartman
From: Vlastimil Babka commit 0715e6c516f106ed553828a671d30ad9a3431536 upstream. Sachin reports [1] a crash in SLUB __slab_alloc(): BUG: Kernel NULL pointer dereference on read at 0x73b0 Faulting instruction address: 0xc03d55f4 Oops: Kernel access of bad area, sig: 11 [#1]

[PATCH 4.4 24/91] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-04-01 Thread Greg Kroah-Hartman
From: Vlastimil Babka commit 0715e6c516f106ed553828a671d30ad9a3431536 upstream. Sachin reports [1] a crash in SLUB __slab_alloc(): BUG: Kernel NULL pointer dereference on read at 0x73b0 Faulting instruction address: 0xc03d55f4 Oops: Kernel access of bad area, sig: 11 [#1]

Re: [RFC PATCH v2 1/1] powerpc/kernel: Enables memory hot-remove after reboot on pseries guests

2020-04-01 Thread Leonardo Bras
On Thu, 2020-03-05 at 20:32 -0300, Leonardo Bras wrote: > --- > The new flag was already proposed on Power Architecture documentation, > and it's waiting for approval. > > I would like to get your comments on this change, but it's still not > ready for being merged. New flag got approved on the

[PATCHv4] powerpc/crashkernel: take "mem=" option into account

2020-04-01 Thread Pingfan Liu
'mem=" option is an easy way to put high pressure on memory during some test. Hence after applying the memory limit, instead of total mem, the actual usable memory should be considered when reserving mem for crashkernel. Otherwise the boot up may experience OOM issue. E.g. it would reserve 4G

Re: [PATCH 10/16] powerpc: prefer __section and __printf from compiler_attributes.h

2020-04-01 Thread Miguel Ojeda
Hi Michael, On Wed, Apr 1, 2020 at 2:53 PM Michael Ellerman wrote: > > On Mon, 2019-08-12 at 21:50:43 UTC, Nick Desaulniers wrote: > > Reported-by: Sedat Dilek > > Suggested-by: Josh Poimboeuf > > Signed-off-by: Nick Desaulniers > > Applied to powerpc next, thanks. Missed this one from

[PATCH -next] KVM: PPC: Book3S HV: remove redundant NULL check

2020-04-01 Thread Chen Zhou
Free function kfree() already does NULL check, so the additional check is unnecessary, just remove it. Signed-off-by: Chen Zhou --- arch/powerpc/kvm/book3s_hv_nested.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_nested.c

Re: [PATCH] powerpc/64/tm: Don't let userspace set regs->trap via sigreturn

2020-04-01 Thread Michael Ellerman
On Wed, 2020-04-01 at 02:38:36 UTC, Michael Ellerman wrote: > In restore_tm_sigcontexts() we take the trap value directly from the > user sigcontext with no checking: > > err |= __get_user(regs->trap, >gp_regs[PT_TRAP]); > > This means we can be in the kernel with an arbitrary regs->trap

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

2020-04-01 Thread Michael Ellerman
On Fri, 2020-03-27 at 09:53:19 UTC, Michael Ellerman wrote: > 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

Re: [PATCH v3] powerpc: Make setjmp/longjmp signature standard

2020-04-01 Thread Michael Ellerman
On Mon, 2020-03-30 at 08:03:56 UTC, 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

Re: [PATCH v4] powerpc/pseries: Handle UE event for memcpy_mcsafe

2020-04-01 Thread Michael Ellerman
On Thu, 2020-03-26 at 18:49:16 UTC, Ganesh Goudar wrote: > memcpy_mcsafe has been implemented for power machines which is used > by pmem infrastructure, so that an UE encountered during memcpy from > pmem devices would not result in panic instead a right error code > is returned. The

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

2020-04-01 Thread Michael Ellerman
On Wed, 2020-03-25 at 16:42:57 UTC, 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 since binutils-gdb > 5ca547dc2399a0a5d9f20626d4bf5547c3ccfddd (1996). Clang integrated > assembler let the last win

Re: [PATCH v2] powerpc/64: mark emergency stacks valid to unwind

2020-04-01 Thread Michael Ellerman
On Wed, 2020-03-25 at 10:41:44 UTC, Nicholas Piggin wrote: > Before: > > WARNING: CPU: 0 PID: 494 at arch/powerpc/kernel/irq.c:343 > CPU: 0 PID: 494 Comm: a Tainted: GW > NIP: c001ed2c LR: c0d13190 CTR: c003f910 > REGS: c001fffd3870 TRAP: 0700

Re: [PATCH] arch/powerpc/64: Avoid isync in flush_dcache_range

2020-04-01 Thread Michael Ellerman
On Fri, 2020-03-20 at 10:32:42 UTC, "Aneesh Kumar K.V" wrote: > As per ISA and isync is only needed on instruction cache > block invalidate. Remove the same from dcache invalidate. > > Signed-off-by: Aneesh Kumar K.V Applied to powerpc next, thanks.

Re: [PATCH 1/2] powerpc/smp: Drop superfluous NULL check

2020-04-01 Thread Michael Ellerman
On Fri, 2020-03-13 at 11:20:19 UTC, Michael Ellerman wrote: > We don't need the NULL check of np, the result is the same because the > OF helpers cope with NULL, of_node_to_nid(NULL) == NUMA_NO_NODE (-1). > > Signed-off-by: Michael Ellerman Series applied to powerpc next.

Re: [PATCH 1/4] powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs

2020-04-01 Thread Michael Ellerman
On Fri, 2020-03-06 at 15:01:40 UTC, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= wrote: > When a CPU is brought up, an IPI number is allocated and recorded > under the XIVE CPU structure. Invalid IPI numbers are tracked with > interrupt number 0x0. > > On the PowerNV platform, the interrupt number space

Re: [PATCH 1/2] powerpc: Drop -fno-dwarf2-cfi-asm

2020-04-01 Thread Michael Ellerman
On Thu, 2020-03-05 at 14:35:29 UTC, "Naveen N. Rao" wrote: > The original commit/discussion adding -fno-dwarf2-cfi-asm refers to > R_PPC64_REL32 relocations not being handled by our module loader: > http://lkml.kernel.org/r/20090224065112.ga6...@bombadil.infradead.org > > However, that is now

Re: [PATCH v5 01/13] powerpc: move ptrace into a subdirectory.

2020-04-01 Thread Michael Ellerman
On Fri, 2020-02-28 at 00:14:37 UTC, Christophe Leroy wrote: > In order to allow splitting of ptrace depending on the > different CONFIG_ options, create a subdirectory dedicated to > ptrace and move ptrace.c and ptrace32.c into it. > > Signed-off-by: Christophe Leroy Series applied to powerpc

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

2020-04-01 Thread Michael Ellerman
On Thu, 2020-02-27 at 04:59:32 UTC, 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 we try to discard it the build

Re: [PATCH v3 01/32] powerpc/64s/exception: Introduce INT_DEFINE parameter block for code generation

2020-04-01 Thread Michael Ellerman
On Tue, 2020-02-25 at 17:35:10 UTC, Nicholas Piggin wrote: > The code generation macro arguments are difficult to read, and > defaults can't easily be used. > > This introduces a block where parameters can be set for interrupt > handler code generation by the subsequent macros, and adds the first

Re: [PATCH 1/8] powerpc: Update MAINTAINERS

2020-04-01 Thread Michael Ellerman
On Mon, 2020-02-24 at 23:31:39 UTC, Michael Ellerman wrote: > A while back Paul pointed out I'd been maintaining the tree more or > less solo for over five years, so perhaps it's time to update the > MAINTAINERS entry. > > Ben & Paul still wrote most of the code, so keep them as Reviewers so >

Re: [PATCH] powernv/opal-sensor-groups: Add documentation for the sysfs interfaces

2020-04-01 Thread Michael Ellerman
On Tue, 2019-11-26 at 13:51:14 UTC, "Gautham R. Shenoy" wrote: > From: Shilpasri G Bhat > > Commit bf9571550f52 ("powerpc/powernv: Add support to clear sensor > groups data") added a mechanism to clear sensor-group data via a sysfs > interface. However, the ABI for that interface has not been >

Re: [PATCH 1/1] powerpc/cputable: Remove unnecessary copy of cpu_spec->oprofile_type

2020-04-01 Thread Michael Ellerman
On Sat, 2020-02-15 at 05:36:37 UTC, Leonardo Bras wrote: > Before checking for cpu_type == NULL, this same copy happens, so doing > it here will just write the same value to the t->oprofile_type > again. > > Remove the repeated copy, as it is unnecessary. > > Signed-off-by: Leonardo Bras

Re: [PATCH] powerpc/32: drop unused ISA_DMA_THRESHOLD

2020-04-01 Thread Michael Ellerman
On Mon, 2019-11-25 at 09:20:33 UTC, Mike Rapoport wrote: > From: Mike Rapoport > > The ISA_DMA_THRESHOLD variable is set by several platforms but never > referenced. > Remove it. > > Signed-off-by: Mike Rapoport Applied to powerpc next, thanks.

Re: [PATCH 10/16] powerpc: prefer __section and __printf from compiler_attributes.h

2020-04-01 Thread Michael Ellerman
On Mon, 2019-08-12 at 21:50:43 UTC, Nick Desaulniers wrote: > Reported-by: Sedat Dilek > Suggested-by: Josh Poimboeuf > Signed-off-by: Nick Desaulniers Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/a7032637b54186e5649917679727d7feaec932b1 cheers

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

2020-04-01 Thread Gautham R Shenoy
Hello Naveen, On Wed, Apr 01, 2020 at 03:28:48PM +0530, Naveen N. Rao wrote: > Gautham R. Shenoy wrote: > >From: "Gautham R. Shenoy" > > [..snip..] > >-static DEVICE_ATTR(spurr, 0400, show_spurr, NULL); > >-static DEVICE_ATTR(purr, 0400, show_purr, store_purr); > > static DEVICE_ATTR(pir,

Re: [RFC WIP PATCH] powerpc/32: system call implement entry/exit logic in C

2020-04-01 Thread Christophe Leroy
Le 31/03/2020 à 17:22, Christophe Leroy a écrit : That's first try to port PPC64 syscall entry/exit logic in C to PPC32. I've do the minimum to get it work. I have not reworked calls to sys_fork() and friends for instance. For the time being, it seems to work more or less but: - ping reports

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

2020-04-01 Thread Michal Simek
On 01. 04. 20 12:38, Takashi Iwai wrote: > On Wed, 01 Apr 2020 12:35:16 +0200, > Michael Ellerman wrote: >> >> Michal Simek writes: >>> On 01. 04. 20 4:07, Michael Ellerman wrote: Michal Simek writes: > Hi, > > recently we wanted to update xilinx intc driver and we found that

Re: [PATCH v3 3/3] powerpc test_emulate_step: add testcases for divde[.] and divdeu[.] instructions

2020-04-01 Thread Balamuruhan S
On Wed, 2020-04-01 at 16:26 +0530, Naveen N. Rao wrote: > Balamuruhan S wrote: > > add testcases for divde, divde., divdeu, divdeu. emulated > > instructions to cover few scenarios, > > * with same dividend and divisor to have undefine RT > > for divdeu[.] > > * with

Re: [PATCH v3 3/3] powerpc test_emulate_step: add testcases for divde[.] and divdeu[.] instructions

2020-04-01 Thread Naveen N. Rao
Balamuruhan S wrote: add testcases for divde, divde., divdeu, divdeu. emulated instructions to cover few scenarios, * with same dividend and divisor to have undefine RT for divdeu[.] * with divide by zero to have undefine RT for both divde[.] and divdeu[.]

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

2020-04-01 Thread Takashi Iwai
On Wed, 01 Apr 2020 12:35:16 +0200, Michael Ellerman wrote: > > Michal Simek writes: > > On 01. 04. 20 4:07, Michael Ellerman wrote: > >> Michal Simek writes: > >>> Hi, > >>> > >>> recently we wanted to update xilinx intc driver and we found that function > >>> which we wanted to remove is

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

2020-04-01 Thread Michael Ellerman
Michal Simek writes: > On 01. 04. 20 4:07, Michael Ellerman wrote: >> Michal Simek writes: >>> 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.

Re: [PATCH v4 03/16] powerpc: Use a datatype for instructions

2020-04-01 Thread Balamuruhan S
On Fri, 2020-03-20 at 16:17 +1100, Jordan Niethe wrote: > Currently unsigned ints are used to represent instructions on powerpc. > This has worked well as instructions have always been 4 byte words. > However, a future ISA version will introduce some changes to > instructions that mean this scheme

  1   2   >