Re: remove set_fs calls from the exec and coredump code v2

2020-04-19 Thread Christoph Hellwig
On Fri, Apr 17, 2020 at 05:41:52PM -0500, Eric W. Biederman wrote: > > this series gets rid of playing with the address limit in the exec and > > coredump code. Most of this was fairly trivial, the biggest changes are > > those to the spufs coredump code. > > > > Changes since v1: > > - properly

Re: [PATCH] KVM: X86: Fix compile error in svm/sev.c

2020-04-19 Thread Xiaoyao Li
On 4/19/2020 3:30 PM, Tianjia Zhang wrote: The compiler reported the following compilation errors: arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’: arch/x86/kvm/svm/sev.c:361:3: error: implicit declaration of function ‘release_pages’ [-Werror=implicit-function-declaration]

Re: [PATCH 8/8] exec: open code copy_string_kernel

2020-04-19 Thread Christophe Leroy
Le 19/04/2020 à 10:06, Christoph Hellwig a écrit : On Sat, Apr 18, 2020 at 10:15:42AM +0200, Christophe Leroy wrote: Le 14/04/2020 à 09:01, Christoph Hellwig a écrit : Currently copy_string_kernel is just a wrapper around copy_strings that simplifies the calling conventions and uses

[PATCH v2] misc: new driver sram_uapi for user level SRAM access

2020-04-19 Thread Wang Wenhu
A generic User-Kernel interface that allows a misc device created by it to support file-operations of ioctl and mmap to access SRAM memory from user level. Different kinds of SRAM alloction and free APIs could be registered by specific SRAM hardware level driver to the available list and then be

[PATCH] KVM: X86: Fix compile error in svm/sev.c

2020-04-19 Thread Tianjia Zhang
The compiler reported the following compilation errors: arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’: arch/x86/kvm/svm/sev.c:361:3: error: implicit declaration of function ‘release_pages’ [-Werror=implicit-function-declaration] release_pages(pages, npinned); ^ The

Re: [PATCH 2/8] signal: clean up __copy_siginfo_to_user32

2020-04-19 Thread Christoph Hellwig
On Fri, Apr 17, 2020 at 04:08:23PM -0500, Eric W. Biederman wrote: > This bothers me because it makes all architectures pay for the sins of > x32. Further it starts burying the details of the what is happening in > architecture specific helpers. Hiding the fact that there is only > one niche

Re: [PATCH 1/2] signal: Factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-19 Thread Christophe Leroy
Le 19/04/2020 à 10:13, Christoph Hellwig a écrit : On Sat, Apr 18, 2020 at 06:55:56AM -0500, Eric W. Biederman wrote: Is that really an issue to use that set_fs() in the coredump code ? Using set_fs() is pretty bad and something that we would like to remove from the kernel entirely. The

[PATCHv3 00/50] Add log level to show_stack()

2020-04-19 Thread Dmitry Safonov
Changes to v3: - Collected more architectual Acks and Reviewed-by - Fixed compilation on sparc64 Changes to v2: - Removed excessive pr_cont("\n") (nits by Senozhatsky) - Leave backtrace debugging messages with pr_debug() (noted by Russell King and Will Deacon) - Correct

[PATCH 7/7] KVM: MIPS: clean up redundant kvm_run parameters in assembly

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

[PATCH 5/7] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

Re: [PATCH v6,4/4] drivers: misc: new driver sram_uapi for user level SRAM access

2020-04-19 Thread 王文虎
>> A generic User-Kernel interface that allows a misc device created >> by it to support file-operations of ioctl and mmap to access SRAM >> memory from user level. Different kinds of SRAM alloction and free >> APIs could be added to the available array and could be configured >> from user level.

[PATCH 4/7] KVM: PPC: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

[PATCH 6/7] KVM: MIPS: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

[PATCH] tools/testing/selftests/powerpc/tm: Remove duplicate headers

2020-04-19 Thread jagdsh . linux
From: Jagadeesh Pagadala Code cleanup: Remove duplicate headers which are included twice. Signed-off-by: Jagadeesh Pagadala --- tools/testing/selftests/powerpc/tm/tm-poison.c | 1 - tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c | 1 - 2 files changed, 2 deletions(-) diff --git

Re: [PATCH v3 00/50] Add log level to show_stack()

2020-04-19 Thread Markus Elfring
> Changes to v3: > - Collected more architectual Acks and Reviewed-by * I suggest to avoid a typo in this description. * Please separate the tag “PATCH” from the version descriptor in the subject.

Re: [PATCH 1/2] signal: Factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-19 Thread Christoph Hellwig
On Sat, Apr 18, 2020 at 06:55:56AM -0500, Eric W. Biederman wrote: > > Is that really an issue to use that set_fs() in the coredump code ? > > Using set_fs() is pretty bad and something that we would like to remove > from the kernel entirely. The fewer instances of set_fs() we have the > better.

Re: remove set_fs calls from the exec and coredump code v2

2020-04-19 Thread Eric W. Biederman
Christoph Hellwig writes: > On Fri, Apr 17, 2020 at 05:41:52PM -0500, Eric W. Biederman wrote: >> > this series gets rid of playing with the address limit in the exec and >> > coredump code. Most of this was fairly trivial, the biggest changes are >> > those to the spufs coredump code. >> > >>

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Joerg Roedel
On Sun, Apr 19, 2020 at 10:00:58AM +0200, Christoph Hellwig wrote: > The difference is that NULL ops mean imply the direct mapping is always > used, dma_ops_bypass means a direct mapping is used if no bounce buffering > using swiotlb is needed, which should also answer your first question. > The

[PATCH 3/7] KVM: PPC: Remove redundant kvm_run from vcpu_arch

2020-04-19 Thread Tianjia Zhang
The 'kvm_run' field already exists in the 'vcpu' structure, which is the same structure as the 'kvm_run' in the 'vcpu_arch' and should be deleted. Signed-off-by: Tianjia Zhang --- arch/powerpc/include/asm/kvm_host.h | 1 - arch/powerpc/kvm/book3s_hv.c| 6 ++

[PATCH 1/7] KVM: s390: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

Re: [PATCH 1/2] signal: Factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-19 Thread Christoph Hellwig
On Sat, Apr 18, 2020 at 10:05:19AM +0200, Christophe Leroy wrote: > > > Le 17/04/2020 à 23:09, Eric W. Biederman a écrit : >> >> To remove the use of set_fs in the coredump code there needs to be a >> way to convert a kernel siginfo to a userspace compat siginfo. >> >> Call that function

[PATCH 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

[PATCH 0/7] clean up redundant 'kvm_run' parameters

2020-04-19 Thread Tianjia Zhang
In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. Earlier than historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters.

Re: [PATCH 8/8] exec: open code copy_string_kernel

2020-04-19 Thread Christoph Hellwig
On Sat, Apr 18, 2020 at 10:15:42AM +0200, Christophe Leroy wrote: > > > Le 14/04/2020 à 09:01, Christoph Hellwig a écrit : >> Currently copy_string_kernel is just a wrapper around copy_strings that >> simplifies the calling conventions and uses set_fs to allow passing a >> kernel pointer. But due

Re: [PATCH 1/2] signal: Factor copy_siginfo_to_external32 from copy_siginfo_to_user32

2020-04-19 Thread Christophe Leroy
Le 18/04/2020 à 13:55, Eric W. Biederman a écrit : Christophe Leroy writes: Le 17/04/2020 à 23:09, Eric W. Biederman a écrit : To remove the use of set_fs in the coredump code there needs to be a way to convert a kernel siginfo to a userspace compat siginfo. Call that function

[PATCH] tools/testing/selftests/powerpc/mm: Remove duplicate headers

2020-04-19 Thread jagdsh . linux
From: Jagadeesh Pagadala Code cleanup: Remove duplicate headers which are included twice. Signed-off-by: Jagadeesh Pagadala --- tools/testing/selftests/powerpc/mm/tlbie_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/mm/tlbie_test.c

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Christoph Hellwig
On Sat, Apr 18, 2020 at 02:42:05PM +0200, Joerg Roedel wrote: > Hi Christoph, > > On Tue, Apr 14, 2020 at 02:25:05PM +0200, Christoph Hellwig wrote: > > +static inline bool dma_map_direct(struct device *dev, > > + const struct dma_map_ops *ops) > > +{ > > + if (likely(!ops)) > > +

[PATCH 07/10] powerpc/book3s64/pkeys: Convert execute key support to static key

2020-04-19 Thread Aneesh Kumar K.V
Convert the bool to a static key like pkey_disabled. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index

[PATCH 10/10] powerpc/book3s64/pkeys: Make initial_allocation_mask static

2020-04-19 Thread Aneesh Kumar K.V
initial_allocation_mask is not used outside this file. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 1 - arch/powerpc/mm/book3s64/pkeys.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/pkeys.h

Re: [PATCH] powerpc/book3s64/kuap: SPRN_AMR modification need CSI instructions before and after

2020-04-19 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of April 19, 2020 11:53 pm: > As per the ISA, context synchronizing instructions is needed before and after > SPRN_AMR update. Use isync before and the CSI after is implied by the rfid > that we will use to switch to a new context. Not entirely sure if we

[Bug 207359] MegaRAID SAS 9361 controller hang/reset

2020-04-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207359 gyakov...@gentoo.org changed: What|Removed |Added CC||gyakov...@gentoo.org --- Comment

Re: [PATCH AUTOSEL 5.5 73/75] ocxl: Add PCI hotplug dependency to Kconfig

2020-04-19 Thread Sasha Levin
On Mon, Apr 20, 2020 at 02:32:19AM +1000, Andrew Donnellan wrote: On 19/4/20 12:09 am, Sasha Levin wrote: From: Frederic Barrat [ Upstream commit 49ce94b8677c7d7a15c4d7cbbb9ff1cd8387827b ] The PCI hotplug framework is used to update the devices when a new image is written to the FPGA.

[Bug 207359] MegaRAID SAS 9361 controller hang/reset

2020-04-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207359 --- Comment #2 from Cameron (c...@neo-zeon.de) --- Looking at bug 206123 above, it's worth noting that the amd64 box I'm using for comparison has SATA disks, though this is probably still a PPC specific issue. -- You are receiving this mail

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Nicholas Piggin
Excerpts from Szabolcs Nagy's message of April 16, 2020 7:58 pm: > * Nicholas Piggin via Libc-alpha [2020-04-16 > 10:16:54 +1000]: >> Well it would have to test HWCAP and patch in or branch to two >> completely different sequences including register save/restores yes. >> You could have the same

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Nicholas Piggin
Excerpts from Adhemerval Zanella's message of April 17, 2020 4:52 am: > > > On 16/04/2020 15:31, Rich Felker wrote: >> On Thu, Apr 16, 2020 at 03:18:42PM -0300, Adhemerval Zanella wrote: >>> >>> >>> On 16/04/2020 14:59, Rich Felker wrote: On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 17, 2020 4:31 am: > On Thu, Apr 16, 2020 at 03:18:42PM -0300, Adhemerval Zanella wrote: >> >> >> On 16/04/2020 14:59, Rich Felker wrote: >> > On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: >> >> >> >> >> >> On 16/04/2020 12:37,

[PATCH 09/10] powerpc/book3s64/pkeys: Convert pkey_total to max_pkey

2020-04-19 Thread Aneesh Kumar K.V
max_pkey now represents max key value that userspace can allocate. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 7 +-- arch/powerpc/mm/book3s64/pkeys.c | 14 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git

Re: [PATCH AUTOSEL 5.5 73/75] ocxl: Add PCI hotplug dependency to Kconfig

2020-04-19 Thread Andrew Donnellan
On 19/4/20 12:09 am, Sasha Levin wrote: From: Frederic Barrat [ Upstream commit 49ce94b8677c7d7a15c4d7cbbb9ff1cd8387827b ] The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan

[PATCH] powerpc/book3s64/kuap: SPRN_AMR modification need CSI instructions before and after

2020-04-19 Thread Aneesh Kumar K.V
As per the ISA, context synchronizing instructions is needed before and after SPRN_AMR update. Use isync before and the CSI after is implied by the rfid that we will use to switch to a new context. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup-radix.h | 9 -

[PATCH 02/10] powerpc/book3s64/pkeys: pkeys are supported only on hash on book3s.

2020-04-19 Thread Aneesh Kumar K.V
Move them to hash specific file and add BUG() for radix path. --- .../powerpc/include/asm/book3s/64/hash-pkey.h | 32 arch/powerpc/include/asm/book3s/64/pkeys.h| 25 + arch/powerpc/include/asm/pkeys.h | 37 --- 3 files changed, 64

Re: [PATCH 3/4] dma-mapping: add a dma_ops_bypass flag to struct device

2020-04-19 Thread Alexey Kardashevskiy
On 19/04/2020 22:25, Joerg Roedel wrote: > On Sun, Apr 19, 2020 at 10:00:58AM +0200, Christoph Hellwig wrote: >> The difference is that NULL ops mean imply the direct mapping is always >> used, dma_ops_bypass means a direct mapping is used if no bounce buffering >> using swiotlb is needed,

[PATCH 03/10] powerpc/book3s64/pkeys: Move pkey related bits in the linux page table

2020-04-19 Thread Aneesh Kumar K.V
To keep things simple, all the pkey related bits are kept together in linux page table for 64K config with hash translation. With hash-4k kernel requires 4 bits to store slots details. This is done by overloading some of the RPN bits for storing the slot details. Due to this PKEY_BIT0 on the 4K

[PATCH 05/10] powerpc/book3s64/pkeys: Simplify the key initialization

2020-04-19 Thread Aneesh Kumar K.V
Add documentation explaining the execute_only_key. The reservation and initialization mask details are also explained in this patch. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 187 ++- 1 file changed,

[PATCH 01/10] powerpc/book3s64/pkeys: Fixup bit numbering

2020-04-19 Thread Aneesh Kumar K.V
This number the pkey bit such that it is easy to follow. PKEY_BIT0 is the lower order bit. This makes further changes easy to follow. No functional change in this patch other than linux page table for hash translation now maps pkeys differently. Signed-off-by: Aneesh Kumar K.V ---

[PATCH 04/10] powerpc/book3s64/pkeys: Explain key 1 reservation details

2020-04-19 Thread Aneesh Kumar K.V
This explains the details w.r.t key 1. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 1199fc2bfaec..d60e6bfa3e03 100644 ---

[PATCH 08/10] powerpc/book3s64/pkeys: Simplify pkey disable branch

2020-04-19 Thread Aneesh Kumar K.V
Make the default value FALSE (pkey enabled) and set to TRUE when we find the total number of keys supported to be zero. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 2 +- arch/powerpc/mm/book3s64/pkeys.c | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-)

[Bug 207359] New: MegaRAID SAS 9361 controller hang/reset

2020-04-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207359 Bug ID: 207359 Summary: MegaRAID SAS 9361 controller hang/reset Product: Platform Specific/Hardware Version: 2.5 Kernel Version: >=v5.4 Hardware: PPC-64 OS: Linux

[PATCH 06/10] powerpc/book3s64/pkeys: kill cpu feature key CPU_FTR_PKEY

2020-04-19 Thread Aneesh Kumar K.V
We don't use CPU_FTR_PKEY anymore. Remove the feature bit and mark it free. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/cputable.h | 10 +- arch/powerpc/kernel/dt_cpu_ftrs.c | 6 -- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Rich Felker
On Mon, Apr 20, 2020 at 10:27:58AM +1000, Nicholas Piggin wrote: > Excerpts from Szabolcs Nagy's message of April 16, 2020 7:58 pm: > > * Nicholas Piggin via Libc-alpha [2020-04-16 > > 10:16:54 +1000]: > >> Well it would have to test HWCAP and patch in or branch to two > >> completely different

[PATCH v2, RESEND] misc: new driver sram_uapi for user level SRAM access

2020-04-19 Thread Wang Wenhu
A generic User-Kernel interface that allows a misc device created by it to support file-operations of ioctl and mmap to access SRAM memory from user level. Different kinds of SRAM alloction and free APIs could be registered by specific SRAM hardware level driver to the available list and then be

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Rich Felker
On Mon, Apr 20, 2020 at 12:32:21PM +1000, Nicholas Piggin wrote: > Excerpts from Rich Felker's message of April 20, 2020 11:34 am: > > On Mon, Apr 20, 2020 at 11:10:25AM +1000, Nicholas Piggin wrote: > >> Excerpts from Rich Felker's message of April 17, 2020 4:31 am: > >> > Note that because lr is

Re: [PATCH] powerpc/book3s64/kuap: SPRN_AMR modification need CSI instructions before and after

2020-04-19 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of April 20, 2020 10:17 am: > Excerpts from Aneesh Kumar K.V's message of April 19, 2020 11:53 pm: >> As per the ISA, context synchronizing instructions is needed before and after >> SPRN_AMR update. Use isync before and the CSI after is implied by the rfid

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 20, 2020 11:29 am: > On Mon, Apr 20, 2020 at 10:27:58AM +1000, Nicholas Piggin wrote: >> Excerpts from Szabolcs Nagy's message of April 16, 2020 7:58 pm: >> > * Nicholas Piggin via Libc-alpha [2020-04-16 >> > 10:16:54 +1000]: >> >> Well it would have

Re: [PATCH] powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure

2020-04-19 Thread Christophe Leroy
Le 20/04/2020 à 07:29, Christophe Leroy a écrit : WRITE_RO lkdtm test works. But when selecting CONFIG_DEBUG_RODATA_TEST, the kernel reports rodata_test: test data was not read only This is because when rodata test runs, there are still old entries in TLB. Flush TLB after setting

[PATCH v2 2/2] powerpc/eeh: Release EEH device state synchronously

2020-04-19 Thread Sam Bobroff
EEH device state is currently removed (by eeh_remove_device()) during the device release handler, which is invoked as the device's reference count drops to zero. This may take some time, or forever, as other threads may hold references. However, the PCI device state is released synchronously by

Re: [PATCH] papr/scm: Add bad memory ranges to nvdimm bad ranges

2020-04-19 Thread Philip Li
On Mon, Apr 13, 2020 at 04:50:38PM +0530, Santosh Sivaraj wrote: > kbuild test robot writes: > > > Hi Santosh, > > > > Thank you for the patch! Yet something to improve: > > > > [auto build test ERROR on powerpc/next] > > [also build test ERROR on v5.7-rc1 next-20200412] > > [if your patch is

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 20, 2020 2:09 pm: > On Mon, Apr 20, 2020 at 12:32:21PM +1000, Nicholas Piggin wrote: >> Excerpts from Rich Felker's message of April 20, 2020 11:34 am: >> > On Mon, Apr 20, 2020 at 11:10:25AM +1000, Nicholas Piggin wrote: >> >> Excerpts from Rich

Re: [PATCH 2/2] powerpc/fadump: consider reserved ranges while reserving memory

2020-04-19 Thread Mahesh J Salgaonkar
On 2020-03-11 01:57:10 Wed, Hari Bathini wrote: > Commit 0962e8004e97 ("powerpc/prom: Scan reserved-ranges node for > memory reservations") enabled support to parse reserved-ranges DT > node and reserve kernel memory falling in these ranges for F/W > purposes. Memory reserved for FADump should not

[PATCH] powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure

2020-04-19 Thread Christophe Leroy
WRITE_RO lkdtm test works. But when selecting CONFIG_DEBUG_RODATA_TEST, the kernel reports rodata_test: test data was not read only This is because when rodata test runs, there are still old entries in TLB. Flush TLB after setting kernel pages RO or NX. Fixes: d5f17ee96447

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Rich Felker
On Mon, Apr 20, 2020 at 11:10:25AM +1000, Nicholas Piggin wrote: > Excerpts from Rich Felker's message of April 17, 2020 4:31 am: > > Note that because lr is clobbered we need at least once normally > > call-clobbered register that's not syscall clobbered to save lr in. > > Otherwise stack frame

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-19 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 20, 2020 11:34 am: > On Mon, Apr 20, 2020 at 11:10:25AM +1000, Nicholas Piggin wrote: >> Excerpts from Rich Felker's message of April 17, 2020 4:31 am: >> > Note that because lr is clobbered we need at least once normally >> > call-clobbered register

Re: [PATCH v2] powerpc/setup_64: Set cache-line-size based on cache-block-size

2020-04-19 Thread Michael Ellerman
Chris Packham writes: > On Thu, 2020-04-16 at 21:43 +1000, Michael Ellerman wrote: >> Chris Packham writes: >> > On Wed, 2020-03-25 at 16:18 +1300, Chris Packham wrote: >> > > If {i,d}-cache-block-size is set and {i,d}-cache-line-size is >> > > not, >> > > use >> > > the block-size value for

Re: [PATCH] iommu: spapr_tce: Disable compile testing to fix build on book3s_32 config

2020-04-19 Thread Michael Ellerman
Christophe Leroy writes: > On 04/14/2020 02:26 PM, Krzysztof Kozlowski wrote: >> Although SPAPR_TCE_IOMMU itself can be compile tested on certain PowerPC >> configurations, its presence makes arch/powerpc/kvm/Makefile to select >> modules which do not build in such configuration. >> >> The

Re: [PATCH 1/2] powerpc/fadump: use static allocation for reserved memory ranges

2020-04-19 Thread Mahesh J Salgaonkar
On 2020-03-11 01:57:00 Wed, Hari Bathini wrote: > At times, memory ranges have to be looked up during early boot, when > kernel couldn't be initialized for dynamic memory allocation. In fact, > reserved-ranges look up is needed during FADump memory reservation. > Without accounting for

[PATCH v2] powerpc/8xx: Fix STRICT_KERNEL_RWX startup test failure

2020-04-19 Thread Christophe Leroy
WRITE_RO lkdtm test works. But when selecting CONFIG_DEBUG_RODATA_TEST, the kernel reports rodata_test: test data was not read only This is because when rodata test runs, there are still old entries in TLB. Flush TLB after setting kernel pages RO or NX. Fixes: d5f17ee96447

[PATCH v2 1/2] powerpc/eeh: fix pseries_eeh_configure_bridge()

2020-04-19 Thread Sam Bobroff
If a device is hot unplgged during EEH recovery, it's possible for the RTAS call to ibm,configure-pe in pseries_eeh_configure() to return parameter error (-3), however negative return values are not checked for and this leads to an infinite loop. Fix this by correctly bailing out on negative

[PATCH v2 0/2] powerpc/eeh: Release EEH device state synchronously

2020-04-19 Thread Sam Bobroff
Hi everyone, Here are some fixes and cleanups that have come from other work but that I think stand on their own. Only one patch ("Release EEH device state synchronously", suggested by Oliver O'Halloran) is a significant change: it moves the cleanup of some EEH device data out of the (possibly