[PATCH 4.14, 4.9] crypto: talitos - fix Kernel Oops on hashing an empty file

2018-02-21 Thread Christophe Leroy
Upstream 87a81dce53b1ea61acaeefa5191a0376a2d1d721 Performing the hash of an empty file leads to a kernel Oops [ 44.504600] Unable to handle kernel paging request for data at address 0x000c [ 44.512819] Faulting instruction address: 0xc02d2be8 [ 44.524088] Oops: Kernel access of bad

Re: [PATCH v12 01/22] selftests/x86: Move protecton key selftest to arch neutral directory

2018-02-21 Thread Ingo Molnar
* Ram Pai wrote: > cc: Dave Hansen > cc: Florian Weimer > Signed-off-by: Ram Pai > --- > tools/testing/selftests/vm/Makefile |1 + > tools/testing/selftests/vm/pkey-helpers.h | 223 >

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Balbir Singh
On Thu, Feb 22, 2018 at 2:51 PM, Alastair D'Silva wrote: > On Thu, 2018-02-22 at 14:46 +1100, Balbir Singh wrote: > >> lpc_size could be added. It's currently useless to the library, but >> > doesn't >> > hurt. The one which was giving me troubles on a previous version of

Re: [PATCH v3 2/2] ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL

2018-02-21 Thread Andrew Donnellan
On 22/02/18 15:17, Alastair D'Silva wrote: From: Alastair D'Silva Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM

Re: [PATCH v3 1/2] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Andrew Donnellan
On 22/02/18 15:17, Alastair D'Silva wrote: From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communicated via sysfs, which saves some parsing

Re: [PATCH 21/23] gcc-plugins: move GCC version check for PowerPC to Kconfig

2018-02-21 Thread Andrew Donnellan
On 17/02/18 05:38, Masahiro Yamada wrote: For PowerPC, GCC 5.2 is the requirement for GCC plugins. Move the version check to Kconfig, and remove the ugly checker. Signed-off-by: Masahiro Yamada The old checker was as non-ugly as I could make it. :) Acked-by:

[PATCH v3 1/2] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communicated via sysfs, which saves some parsing effort in userspace. Signed-off-by: Alastair

[PATCH v3 2/2] ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL

2018-02-21 Thread Alastair D'Silva
From: Alastair D'Silva Signed-off-by: Alastair D'Silva --- Documentation/accelerators/ocxl.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/ocxl.rst index

[PATCH v3 0/2] Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
From: Alastair D'Silva This series adds a new IOCTL for OpenCAPI, which exposes adapter metadata to userspace. --- v1->v2: - Document the new IOCTL v2->v3: - Rename metadata struct - Document a couple of struct members that are not immediately obvious Alastair

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Thu, 2018-02-22 at 14:46 +1100, Balbir Singh wrote: > lpc_size could be added. It's currently useless to the library, but > > doesn't > > hurt. The one which was giving me troubles on a previous version of > > this > > patch was the lpc numa node ID, since that was experimental code > > and

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Thu, 2018-02-22 at 14:41 +1100, Balbir Singh wrote: > On Thu, Feb 22, 2018 at 10:32 AM, Alastair D'Silva com> wrote: > > > > On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: > > > On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > > bm.c > > > om>

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Andrew Donnellan
On 22/02/18 14:41, Balbir Singh wrote: Setting it to 0 is for the reader, not the compiler. I'm not clear on the benefit of starting the version at 1, could you clarify? How do I distinguish between version number never set and 0? The ioctl won't exist without a version number set. --

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Balbir Singh
On Wed, Feb 21, 2018 at 10:25 PM, Frederic Barrat wrote: > > > Le 21/02/2018 à 07:43, Balbir Singh a écrit : >> >> On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva >> wrote: >>> >>> From: Alastair D'Silva >>> >>> Some

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Balbir Singh
On Thu, Feb 22, 2018 at 10:32 AM, Alastair D'Silva wrote: > > On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: >> On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > om> wrote: >> > From: Alastair D'Silva >> > >> > Some

Re: [PATCH] bpf, powerpc: fix jit for seccomp_data access

2018-02-21 Thread Michael Ellerman
"Naveen N. Rao" writes: > Mark Lord wrote: >> On 18-02-21 07:52 AM, Mark Lord wrote: >>> On 18-02-21 03:35 AM, Naveen N. Rao wrote: >> .. Looks good to me, but I am not able to apply this patch. There seems to be whitespace damage. >>> >>> Here

Re: [PATCH] bpf, powerpc: fix jit for seccomp_data access

2018-02-21 Thread Michael Ellerman
Daniel Borkmann writes: > On 02/21/2018 01:33 AM, Michael Ellerman wrote: >> Mark Lord writes: >> >>> I am using SECCOMP to filter syscalls on a ppc32 platform, >>> and noticed that the JIT compiler was failing on the BPF >>> even though the interpreter

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Michael Ellerman
Masahiro Yamada writes: > > > (Case 3) > Compiler flag -foo is sensitive to endian-ness. > > > config CC_NEEDS_BIG_ENDIAN > def_bool $(cc-option -mbig-endian) && CPU_BIG_ENDIAN > > config CC_NEEDS_LITTLE_ENDIAN > def_bool $(cc-option

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Michael Ellerman
"Alastair D'Silva" writes: > On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: >> On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > om> wrote: >> > From: Alastair D'Silva >> > ... >> > diff --git a/include/uapi/misc/ocxl.h

[PATCH v2 1/2] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communicated via sysfs, which saves some parsing effort in userspace. Signed-off-by: Alastair

[PATCH v2 2/2] ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL

2018-02-21 Thread Alastair D'Silva
From: Alastair D'Silva Signed-off-by: Alastair D'Silva --- Documentation/accelerators/ocxl.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/ocxl.rst index

[PATCH v2 0/2] Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
From: Alastair D'Silva This series adds a new IOCTL for OpenCAPI, which exposes adapter metadata to userspace. --- v1->v2: - Document the new IOCTL Alastair D'Silva (2): ocxl: Add get_metadata IOCTL to share OCXL information to userspace ocxl: Document the

[PATCH v12 22/22] selftests/vm: Fix deadlock in protection_keys.c

2018-02-21 Thread Ram Pai
From: Thiago Jung Bauermann The sig_chld() handler calls dprintf2() taking care of setting dprint_in_signal so that sigsafe_printf() won't call printf(). Unfortunately, this precaution is is negated by dprintf_level(), which has a call to fflush(). This function

[PATCH v12 21/22] selftests/vm: sub-page allocator

2018-02-21 Thread Ram Pai
introduce a new allocator that allocates 4k hardware-pages to back 64k linux-page. This allocator is only applicable on powerpc. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai ---

[PATCH v12 20/22] selftests/vm: testcases must restore pkey-permissions

2018-02-21 Thread Ram Pai
Generally the signal handler restores the state of the pkey register before returning. However there are times when the read/write operation can legitamely fail without invoking the signal handler. Eg: A sys_read() operaton to a write-protected page should be disallowed. In such a case the state

[PATCH v12 19/22] selftests/vm: detect write violation on a mapped access-denied-key page

2018-02-21 Thread Ram Pai
detect write-violation on a page to which access-disabled key is associated much after the page is mapped. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 13

[PATCH v12 18/22] selftests/vm: associate key on a mapped page and detect write violation

2018-02-21 Thread Ram Pai
detect write-violation on a page to which write-disabled key is associated much after the page is mapped. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 12

[PATCH v12 17/22] selftests/vm: associate key on a mapped page and detect access violation

2018-02-21 Thread Ram Pai
detect access-violation on a page to which access-disabled key is associated much after the page is mapped. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 19

[PATCH v12 16/22] selftests/vm: fix an assertion in test_pkey_alloc_exhaust()

2018-02-21 Thread Ram Pai
The maximum number of keys that can be allocated has to take into consideration, that some keys are reserved by the architecture for specific purpose. Hence cannot be allocated. Fix the assertion in test_pkey_alloc_exhaust() cc: Dave Hansen cc: Florian Weimer

[PATCH v12 15/22] selftests/vm: powerpc implementation to check support for pkey

2018-02-21 Thread Ram Pai
pkey subsystem is supported if the hardware and kernel has support. We determine that by checking if allocation of a key succeeds or not. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai ---

[PATCH v12 14/22] selftests/vm: clear the bits in shadow reg when a pkey is freed.

2018-02-21 Thread Ram Pai
When a key is freed, the key is no more effective. Clear the bits corresponding to the pkey in the shadow register. Otherwise it will carry some spurious bits which can trigger false-positive asserts. cc: Dave Hansen cc: Florian Weimer

[PATCH v12 13/22] selftests/vm: powerpc implementation for generic abstraction

2018-02-21 Thread Ram Pai
Introduce powerpc implementation for the various abstractions. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 128 ++

[PATCH v12 12/22] selftests/vm: generic cleanup

2018-02-21 Thread Ram Pai
cleanup the code to satisfy coding styles. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 81 ++ 1 files changed, 43 insertions(+), 38

[PATCH v12 11/22] selftests/vm: pkey register should match shadow pkey

2018-02-21 Thread Ram Pai
expected_pkey_fault() is comparing the contents of pkey register with 0. This may not be true all the time. There could be bits set by default by the architecture which can never be changed. Hence compare the value against shadow pkey register, which is supposed to track the bits accurately all

[PATCH v12 10/22] selftests/vm: introduce two arch independent abstraction

2018-02-21 Thread Ram Pai
open_hugepage_file() <- opens the huge page file get_start_key() <-- provides the first non-reserved key. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 11

[PATCH v12 09/22] selftests/vm: fix alloc_random_pkey() to make it really random

2018-02-21 Thread Ram Pai
alloc_random_pkey() was allocating the same pkey every time. Not all pkeys were geting tested. fixed it. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 10 +++---

[PATCH v12 08/22] selftests/vm: clear the bits in shadow reg when a pkey is freed.

2018-02-21 Thread Ram Pai
When a key is freed, the key is no more effective. Clear the bits corresponding to the pkey in the shadow register. Otherwise it will carry some spurious bits which can trigger false-positive asserts. cc: Dave Hansen cc: Florian Weimer

[PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear()

2018-02-21 Thread Ram Pai
instead of clearing the bits, pkey_disable_clear() was setting the bits. Fixed it. Also fixed a wrong assertion in that function. When bits are cleared, the resulting bit value will be less than the original. cc: Dave Hansen cc: Florian Weimer

[PATCH v12 06/22] selftests/vm: fix the wrong assert in pkey_disable_set()

2018-02-21 Thread Ram Pai
If the flag is 0, no bits will be set. Hence we cant expect the resulting bitmap to have a higher value than what it was earlier. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai ---

[PATCH v12 05/22] selftests/vm: generic function to handle shadow key register

2018-02-21 Thread Ram Pai
helper functions to handler shadow pkey register cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 27 tools/testing/selftests/vm/protection_keys.c

[PATCH v12 04/22] selftests/vm: typecast the pkey register

2018-02-21 Thread Ram Pai
This is in preparation to accomadate a differing size register across architectures. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 27 +-

[PATCH v12 03/22] selftests/vm: move generic definitions to header file

2018-02-21 Thread Ram Pai
Moved all the generic definition and helper functions to the header file cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 62 ++--

[PATCH v12 02/22] selftests/vm: rename all references to pkru to a generic name

2018-02-21 Thread Ram Pai
some pkru references are named to pkey_reg and some prku references are renamed to pkey cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 85 +-

[PATCH v12 01/22] selftests/x86: Move protecton key selftest to arch neutral directory

2018-02-21 Thread Ram Pai
cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/Makefile |1 + tools/testing/selftests/vm/pkey-helpers.h | 223 tools/testing/selftests/vm/protection_keys.c | 1407

[PATCH v12 00/22] selftests, powerpc, x86 : Memory Protection Keys

2018-02-21 Thread Ram Pai
Memory protection keys enables an application to protect its address space from inadvertent access by its own code. This feature is now enabled on powerpc architecture and integrated in 4.16-rc1. The patches move the selftests to arch neutral directory and enhance their test coverage. Test

[PATCH RFC 1/1] powerpc/pseries: fix EEH recovery of IOV devices

2018-02-21 Thread Sam Bobroff
Currently EEH recovery will fail on pSeries platforms for passed-through physical devices that support IOV, when CONFIG_PCI_IOV is set and the hypervisor doesn't provide a device tree node "ibm,open-sriov-vf-bar-info" for the device. (Found on an IOV capable device using the ipr driver.) EEH

[PATCH v12 3/3] mm, x86, powerpc: display pkey in smaps only if arch supports pkeys

2018-02-21 Thread Ram Pai
Currently the architecture specific code is expected to display the protection keys in smap for a given vma. This can lead to redundant code and possibly to divergent formats in which the key gets displayed. This patch changes the implementation. It displays the pkey only if the

[PATCH v12 1/3] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled

2018-02-21 Thread Ram Pai
VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is enabled. Powerpc also needs these bits. Hence lets define the VM_PKEY_BITx bits for any architecture that enables CONFIG_ARCH_HAS_PKEYS. cc: Dave Hansen cc: Michael Ellermen

[PATCH v12 2/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey

2018-02-21 Thread Ram Pai
Currently only 4bits are allocated in the vma flags to hold 16 keys. This is sufficient for x86. PowerPC supports 32 keys, which needs 5bits. This patch allocates an additional bit. cc: Dave Hansen cc: Michael Ellermen cc: Benjamin Herrenschmidt

[PATCH v12 0/3] mm, x86, powerpc: Enhancements to Memory Protection Keys.

2018-02-21 Thread Ram Pai
This patch series provides arch-neutral enhancements to enable memory-keys on new architecutes, and the corresponding changes in x86 and powerpc specific code to support that. a) Provides ability to support upto 32 keys. PowerPC can handle 32 keys and hence needs this. b) Arch-neutral

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Wed, 2018-02-21 at 12:25 +0100, Frederic Barrat wrote: > > Le 21/02/2018 à 07:43, Balbir Singh a écrit : > > On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > .com> wrote: > > > From: Alastair D'Silva > > > > > > Some required information is not

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: > On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva om> wrote: > > From: Alastair D'Silva > > > > Some required information is not exposed to userspace currently > > (eg. the > > PASID), pass this

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 04:02:25PM +0100, Christophe LEROY wrote: [...] > > > My question might me stupid, as I don't know PCC64 in deep, but when > > > looking > > > at page_is_ram() in arch/powerpc/mm/mem.c, I have the feeling the PPC64 > > > implements ram by blocks. Isn't it what you are

[PATCH v12 00/11] Application Data Integrity feature introduced by SPARC M7

2018-02-21 Thread Khalid Aziz
V12 changes: This series is same as v10 and v11 and was simply rebased on 4.16-rc2 kernel and patch 11 was added to update signal delivery code to use the new helper functions added by Eric Biederman. Can mm maintainers please review patches 2, 7, 8 and 9 which are arch independent, and

[PATCH] powerpc/time: stop validating rtc_time in .read_time

2018-02-21 Thread Alexandre Belloni
The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni --- arch/powerpc/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Ulf Magnusson
On Wed, Feb 21, 2018 at 09:57:03PM +0900, Masahiro Yamada wrote: > 2018-02-21 19:52 GMT+09:00 Arnd Bergmann : > > On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada > > wrote: > >> 2018-02-21 18:56 GMT+09:00 Arnd Bergmann : > >>> On Wed,

Re: [PATCH] powerpc/pseries: Fix duplicate firmware feature for DRC_INFO

2018-02-21 Thread Tyrel Datwyler
On 02/21/2018 05:05 AM, Michael Ellerman wrote: > We had a mid-air collision between two new firmware features, DRMEM_V2 > and DRC_INFO, and they ended up with the same value. > > No one's actually reported any problems, presumably because the new > firmware that supports both properties is not

[PATCH v12 07/11] mm: Add address parameter to arch_validate_prot()

2018-02-21 Thread Khalid Aziz
A protection flag may not be valid across entire address space and hence arch_validate_prot() might need the address a protection bit is being set on to ensure it is a valid protection flag. For example, sparc processors support memory corruption detection (as part of ADI feature) flag on memory

Re: [PATCH v3] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread Johannes Thumshirn
On Wed, Feb 21, 2018 at 01:27:34PM +0100, Marcus Folkesson wrote: > - Add SPDX identifier > - Remove boiler plate license text > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate > license [...] > drivers/watchdog/mena21_wdt.c | 4 +-- Acked-by: Johannes

Re: [PATCH 5/6] powerpc: Implement DISCONTIGMEM and allow selection on PPC32

2018-02-21 Thread christophe leroy
Le 21/02/2018 à 17:08, Jonathan Neuschäfer a écrit : On Wed, Feb 21, 2018 at 07:46:28AM +0800, kbuild test robot wrote: [...] include/linux/mmzone.h:1239:19: error: conflicting types for 'pfn_valid' static inline int pfn_valid(unsigned long pfn) ^ In

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 04:02:25PM +0100, Christophe LEROY wrote: [...] > > > My question might me stupid, as I don't know PCC64 in deep, but when > > > looking > > > at page_is_ram() in arch/powerpc/mm/mem.c, I have the feeling the PPC64 > > > implements ram by blocks. Isn't it what you are

Re: [PATCH 5/6] powerpc: Implement DISCONTIGMEM and allow selection on PPC32

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 07:46:28AM +0800, kbuild test robot wrote: [...] > >> include/linux/mmzone.h:1239:19: error: conflicting types for 'pfn_valid' > static inline int pfn_valid(unsigned long pfn) > ^ >In file included from include/linux/mmzone.h:912:0, >

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Arnd Bergmann
On Wed, Feb 21, 2018 at 1:57 PM, Masahiro Yamada wrote: > 2018-02-21 19:52 GMT+09:00 Arnd Bergmann : >> On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada >> wrote: >>> 2018-02-21 18:56 GMT+09:00 Arnd Bergmann

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Christophe LEROY
Le 21/02/2018 à 15:42, Jonathan Neuschäfer a écrit : Hi, On Wed, Feb 21, 2018 at 08:06:10AM +0100, Christophe LEROY wrote: Le 20/02/2018 à 17:14, Jonathan Neuschäfer a écrit : This patchset adds support for DISCONTIGMEM on 32-bit PowerPC. This is required to properly support the Nintendo

[PATCH V2] powerpc/powernv : Add support to enable sensor groups

2018-02-21 Thread Shilpasri G Bhat
Adds support to enable/disable a sensor group. This can be used to select the sensor groups that needs to be copied to main memory by OCC. Sensor groups like power, temperature, current, voltage, frequency, utilization can be enabled/disabled at runtime. Signed-off-by: Shilpasri G Bhat

Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 02:51:19PM +0100, Jonathan Neuschäfer wrote: [...] > While looking through arch/powerpc/mm, I noticed that there's a > page_is_ram function, which simply uses the memblocks directly, on > PPC32. Oops, I misread the code here. memblock is used on PPC64. > It seems like a

Re: [PATCH 0/6] DISCONTIGMEM support for PPC32

2018-02-21 Thread Jonathan Neuschäfer
Hi, On Wed, Feb 21, 2018 at 08:06:10AM +0100, Christophe LEROY wrote: > > > Le 20/02/2018 à 17:14, Jonathan Neuschäfer a écrit : > > This patchset adds support for DISCONTIGMEM on 32-bit PowerPC. This is > > required to properly support the Nintendo Wii's memory layout, in which > > there are

Re: [PATCH] bpf, powerpc: fix jit for seccomp_data access

2018-02-21 Thread Naveen N. Rao
Mark Lord wrote: On 18-02-21 07:52 AM, Mark Lord wrote: On 18-02-21 03:35 AM, Naveen N. Rao wrote: .. Looks good to me, but I am not able to apply this patch. There seems to be whitespace damage. Here (attached) is a clean copy. Again, this time with the commit message included!

Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-21 Thread Jonathan Neuschäfer
Hello Christophe, On Tue, Feb 20, 2018 at 06:45:09PM +0100, christophe leroy wrote: [...] > > - if (slab_is_available() && (p < virt_to_phys(high_memory)) && > > + if (slab_is_available() && pfn_valid(__phys_to_pfn(p)) && > > I'm not sure this is equivalent: > > high_memory = (void *)

Re: powerpc/eeh: Add conditional check on notify_resume

2018-02-21 Thread Michael Ellerman
On Thu, 2018-02-15 at 18:49:51 UTC, "Bryant G. Ly" wrote: > From: "Juan J. Alvarez" > > EEH structure is not populated with function > notify resume when running on systems that do not support > it, i.e: BMC. Hence adding a conditional check for NULL for > systems

Re: ocxl: Fix potential bad errno on irq allocation

2018-02-21 Thread Michael Ellerman
On Fri, 2018-02-16 at 13:01:18 UTC, Frederic Barrat wrote: > Fix some issues found by a static checker: > > When allocating an AFU interrupt, if the driver cannot copy the output > parameters to userland, the errno value was not set to EFAULT > > Remove a (now) useless cast. > > Reported-by:

Re: [PATCH] bpf, powerpc: fix jit for seccomp_data access

2018-02-21 Thread Mark Lord
On 18-02-21 07:52 AM, Mark Lord wrote: > On 18-02-21 03:35 AM, Naveen N. Rao wrote: .. >> Looks good to me, but I am not able to apply this patch. There seems to be >> whitespace damage. > > Here (attached) is a clean copy. Again, this time with the commit message included! I am using SECCOMP

Re: [RFC PATCH v0 0/2] ibm,dynamic-memory-v2 fix

2018-02-21 Thread Bharata B Rao
On Wed, Feb 21, 2018 at 11:27:20PM +1100, Balbir Singh wrote: > On Wed, Feb 21, 2018 at 9:36 PM, Bharata B Rao > wrote: > > Patch 1 fixes a bug that results in unexpected flag bit in > > ibm,dynamic-memory-v2 DT property and wrong number of entries > > getting created

RE: [PATCH v3] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread Winkler, Tomas
> > - Add SPDX identifier > - Remove boiler plate license text > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate > license > > Signed-off-by: Marcus Folkesson > Acked-by: Adam Thomson > Acked-by:

Re: [RFC PATCH v0 1/2] powerpc, drmem: Fix unexpected flag value in ibm, dynamic-memory-v2

2018-02-21 Thread Bharata B Rao
On Wed, Feb 21, 2018 at 10:48:18PM +1100, Michael Ellerman wrote: > Bharata B Rao writes: > > > Memory addtion and removal by count and indexed-count methods > > temporarily mark the LMBs that are being added/removed by a special > > flag value DRMEM_LMB_RESERVED.

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Rafael J. Wysocki
On Wed, Feb 21, 2018 at 2:13 PM, Michael Ellerman wrote: > "Rafael J. Wysocki" writes: > >> On Wed, Feb 21, 2018 at 6:54 AM, Viresh Kumar >> wrote: >>> On 21-02-18, 16:39, Michael Ellerman wrote: Viresh Kumar

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Michael Ellerman
"Rafael J. Wysocki" writes: > On Wed, Feb 21, 2018 at 6:54 AM, Viresh Kumar wrote: >> On 21-02-18, 16:39, Michael Ellerman wrote: >>> Viresh Kumar writes: >> >>> > AFAICT, you will get -1 here only if the freq table had no

[PATCH] powerpc/pseries: Fix duplicate firmware feature for DRC_INFO

2018-02-21 Thread Michael Ellerman
We had a mid-air collision between two new firmware features, DRMEM_V2 and DRC_INFO, and they ended up with the same value. No one's actually reported any problems, presumably because the new firmware that supports both properties is not widely available, and the two properties tend to be enabled

Re: [PATCH v3] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread Patrice CHOTARD
HI Marcus On 02/21/2018 01:27 PM, Marcus Folkesson wrote: > - Add SPDX identifier > - Remove boiler plate license text > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate >license > > Signed-off-by: Marcus Folkesson > Acked-by: Adam Thomson

Re: [PATCH] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread Patrice CHOTARD
Hi Marcus On 02/20/2018 10:31 AM, Marcus Folkesson wrote: > - Add SPDX identifier > - Remove boiler plate license text > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate >license > > Signed-off-by: Marcus Folkesson > --- > > Notes: >

[PATCH v3] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread Marcus Folkesson
- Add SPDX identifier - Remove boiler plate license text - If MODULE_LICENSE and boiler plate does not match, go for boiler plate license Signed-off-by: Marcus Folkesson Acked-by: Adam Thomson Acked-by: Charles Keepax

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Masahiro Yamada
2018-02-21 19:52 GMT+09:00 Arnd Bergmann : > On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada > wrote: >> 2018-02-21 18:56 GMT+09:00 Arnd Bergmann : >>> On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada >>>

Re: [PATCH v3] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread Baruch Siach
Hi Marcus, On Wed, Feb 21, 2018 at 01:27:34PM +0100, Marcus Folkesson wrote: > - Add SPDX identifier > - Remove boiler plate license text > - If MODULE_LICENSE and boiler plate does not match, go for boiler plate > license > > Signed-off-by: Marcus Folkesson >

Re: [PATCH] bpf, powerpc: fix jit for seccomp_data access

2018-02-21 Thread Mark Lord
On 18-02-21 03:35 AM, Naveen N. Rao wrote: > Mark Lord wrote: >> I am using SECCOMP to filter syscalls on a ppc32 platform, >> and noticed that the JIT compiler was failing on the BPF >> even though the interpreter was working fine. >> >> The issue was that the compiler was missing one of the

Re: [PATCH v3] watchdog: add SPDX identifiers for watchdog subsystem

2018-02-21 Thread William Breathitt Gray
On Wed, Feb 21, 2018 at 01:27:34PM +0100, Marcus Folkesson wrote: >- Add SPDX identifier >- Remove boiler plate license text >- If MODULE_LICENSE and boiler plate does not match, go for boiler plate > license > >Signed-off-by: Marcus Folkesson >Acked-by: Adam Thomson

Re: [RFC PATCH v0 0/2] ibm,dynamic-memory-v2 fix

2018-02-21 Thread Balbir Singh
On Wed, Feb 21, 2018 at 9:36 PM, Bharata B Rao wrote: > Patch 1 fixes a bug that results in unexpected flag bit in > ibm,dynamic-memory-v2 DT property and wrong number of entries > getting created in the same property during hotplug. > Could you please elaborate on

Re: [PATCH 3/9] powerpc/64s: kbuild set assembler machine type to POWER4

2018-02-21 Thread Nicholas Piggin
! Yet something to improve: > > [auto build test ERROR on powerpc/next] > [also build test ERROR on v4.16-rc2 next-20180221] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/li

Re: [RFC PATCH v0 1/2] powerpc, drmem: Fix unexpected flag value in ibm, dynamic-memory-v2

2018-02-21 Thread Michael Ellerman
Bharata B Rao writes: > Memory addtion and removal by count and indexed-count methods > temporarily mark the LMBs that are being added/removed by a special > flag value DRMEM_LMB_RESERVED. Accessing flags value directly at > a few places without proper accessor method

Re: [PATCH 3/9] powerpc/64s: kbuild set assembler machine type to POWER4

2018-02-21 Thread kbuild test robot
Hi Nicholas, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.16-rc2 next-20180221] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Frederic Barrat
Le 21/02/2018 à 07:43, Balbir Singh a écrit : On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva wrote: From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Arnd Bergmann
On Wed, Feb 21, 2018 at 11:20 AM, Masahiro Yamada wrote: > 2018-02-21 18:56 GMT+09:00 Arnd Bergmann : >> On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada >> wrote: >>> 2018-02-20 0:18 GMT+09:00 Ulf Magnusson

[RFC PATCH v0 0/2] ibm,dynamic-memory-v2 fix

2018-02-21 Thread Bharata B Rao
Patch 1 fixes a bug that results in unexpected flag bit in ibm,dynamic-memory-v2 DT property and wrong number of entries getting created in the same property during hotplug. Patch 2 can be optionally considered. It renames DRMEM_LMB_RESERVED to DRMEM_LMB_ISOLATED. May be it could be renamed to

[RFC PATCH v0 2/2] powerpc, drmem: Rename DRMEM_LMB_RESERVED to DRMEM_LMB_ISOLATED

2018-02-21 Thread Bharata B Rao
Memory hotplug code uses a temporary LMB flags bit DRMEM_LMB_RESERVED to mark the LMB which is currently undergoing hotplug or unplug. It is easy to confuse DRMEM_LMB_RESERVED to mean the LMB is reserved for which a separate flag bit already exists DRCONF_MEM_RESERVED. Since both

[RFC PATCH v0 1/2] powerpc, drmem: Fix unexpected flag value in ibm, dynamic-memory-v2

2018-02-21 Thread Bharata B Rao
Memory addtion and removal by count and indexed-count methods temporarily mark the LMBs that are being added/removed by a special flag value DRMEM_LMB_RESERVED. Accessing flags value directly at a few places without proper accessor method is causing two unexpected side-effects: -

Re: [PATCH V6] cxl: Fix timebase synchronization status on P9

2018-02-21 Thread christophe lombard
Le 21/02/2018 à 03:43, Michael Ellerman a écrit : Christophe Lombard writes: The PSL Timebase register is updated by the PSL to maintain the timebase. On P9, the Timebase value is only provided by the CAPP as received the last time a timebase request was

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Masahiro Yamada
2018-02-21 18:56 GMT+09:00 Arnd Bergmann : > On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada > wrote: >> 2018-02-20 0:18 GMT+09:00 Ulf Magnusson : >> I'm not happy that we in one context can reference CONFIG variables

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Viresh Kumar
On 21-02-18, 11:17, Rafael J. Wysocki wrote: > The driver is expected to call cpufreq_table_validate_and_show() at > ->init() time and fail ->init() if that fails. > > That's kind of fragile, because it depends on the driver to do the right > thing. That's exactly what I am trying to explore

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Rafael J. Wysocki
On Wed, Feb 21, 2018 at 11:02 AM, Viresh Kumar wrote: > On 21-02-18, 10:27, Rafael J. Wysocki wrote: >> To be precise, ->init() should fail as that's where the table is >> created. The registration fails as a result then. >> >> But what if the bug is that ->init()

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Viresh Kumar
On 21-02-18, 10:27, Rafael J. Wysocki wrote: > To be precise, ->init() should fail as that's where the table is > created. The registration fails as a result then. > > But what if the bug is that ->init() doesn't fail when it should? > > I guess the core could double check the frequency table

Re: [PATCH 00/23] kconfig: move compiler capability tests to Kconfig

2018-02-21 Thread Arnd Bergmann
On Wed, Feb 21, 2018 at 8:38 AM, Masahiro Yamada wrote: > 2018-02-20 0:18 GMT+09:00 Ulf Magnusson : > >>> >>> I'm not happy that we in one context can reference CONFIG variables >>> directly, but inside the $(call ...) and $(shell ...) needs the

Re: [PATCH v9 2/2] cxl: read PHB indications from the device tree

2018-02-21 Thread Frederic Barrat
Le 20/02/2018 à 16:51, Philippe Bergheaud a écrit : Configure the P9 XSL_DSNCTL register with PHB indications found in the device tree, or else use legacy hard-coded values. Signed-off-by: Philippe Bergheaud --- Reviewed-by: Frederic Barrat

  1   2   >