[PATCH] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Qiujun Huang
Here needs a NULL check. Issue found by coccinelle. Signed-off-by: Qiujun Huang --- arch/powerpc/platforms/powernv/opal.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 2b3dfd0b6cdd..09443ae3a86e 1006

[PATCH] KVM: PPC: Book3S HV: Remove NULL check before kfree

2020-04-05 Thread Qiujun Huang
NULL check before kfree is unnecessary, so remove it. This issue was detected by using the Coccinelle software. Signed-off-by: Qiujun Huang --- 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 b/arch/p

Re: [PATCH] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Christophe Leroy
Le 05/04/2020 à 09:51, Qiujun Huang a écrit : Here needs a NULL check. Issue found by coccinelle. Signed-off-by: Qiujun Huang --- arch/powerpc/platforms/powernv/opal.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms

Re: [PATCH] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Qiujun Huang
On Sun, Apr 5, 2020 at 6:13 PM Christophe Leroy wrote: > > > > Le 05/04/2020 à 09:51, Qiujun Huang a écrit : > > Here needs a NULL check. > > > > Issue found by coccinelle. > > > > Signed-off-by: Qiujun Huang > > --- > > arch/powerpc/platforms/powernv/opal.c | 5 + > > 1 file changed, 5 in

[PATCH v2] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Qiujun Huang
Here needs a NULL check. Issue found by coccinelle. Signed-off-by: Qiujun Huang --- arch/powerpc/platforms/powernv/opal.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 2b3dfd0b6cdd..5b

Re: [PATCH v2] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Christophe Leroy
Le 05/04/2020 à 12:30, Qiujun Huang a écrit : Here needs a NULL check. Issue found by coccinelle. Signed-off-by: Qiujun Huang --- arch/powerpc/platforms/powernv/opal.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/po

Re: [PATCH v2] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Qiujun Huang
On Sun, Apr 5, 2020 at 8:12 PM Christophe Leroy wrote: > > > > Le 05/04/2020 à 12:30, Qiujun Huang a écrit : > > Here needs a NULL check. > > > > Issue found by coccinelle. > > > > Signed-off-by: Qiujun Huang > > --- > > arch/powerpc/platforms/powernv/opal.c | 5 - > > 1 file changed, 4 in

[PATCH v3] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Qiujun Huang
Here needs a NULL check. Issue found by coccinelle. Signed-off-by: Qiujun Huang --- arch/powerpc/platforms/powernv/opal.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 2b3dfd0b6cd

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

2020-04-05 Thread Anshuman Khandual
On 03/31/2020 06:00 PM, Gerald Schaefer wrote: > On Tue, 24 Mar 2020 10:52:52 +0530 > Anshuman Khandual wrote: > >> This series adds more arch page table helper tests. The new tests here are >> either related to core memory functions and advanced arch pgtable helpers. >> This also creates a docum

[GIT PULL] Please pull powerpc/linux.git powerpc-5.7-1 tag

2020-04-05 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull powerpc updates for 5.7. Slightly late as I had to rebase mid-week to insert a bug fix. There is one conflict in fs/sysfs/group.c, between our: 9255782f7061 ("sysfs: Wrap __compat_only_sysfs_link_entry_to_kobj function to

Re: [PATCH v2 01/22] powerpc/pkeys: Avoid using lockless page table walk

2020-04-05 Thread Aneesh Kumar K.V
Ram Pai writes: > On Thu, Mar 19, 2020 at 09:25:48AM +0530, Aneesh Kumar K.V wrote: >> Fetch pkey from vma instead of linux page table. Also document the fact that >> in >> some cases the pkey returned in siginfo won't be the same as the one we took >> keyfault on. Even with linux page table wal

Re: [mm/debug] f675f2f91d: WARNING:at_mm/debug_vm_pgtable.c:#debug_vm_pgtable

2020-04-05 Thread Anshuman Khandual
On 03/30/2020 02:26 PM, kernel test robot wrote: > [ 283.486118] WARNING: CPU: 1 PID: 1 at mm/debug_vm_pgtable.c:371 > debug_vm_pgtable+0x4dc/0x7e3 > [ 283.487342] Modules linked in: > [ 283.487752] CPU: 1 PID: 1 Comm: swapper/0 Not tainted > 5.6.0-rc7-next-20200323-1-gf675f2f91d045 #1 > [

[RFC PATCH v2 03/13] powerpc/8xx: Create C version of kuap_restore() and kuap_check()

2020-04-05 Thread Christophe Leroy
In preparation of porting PPC32 to C syscall entry/exit, create C version of kuap_restore() and kuap_check() on 8xx Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/kup-8xx.h | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/powerpc/include/asm/nohash/

[RFC PATCH v2 02/13] powerpc/32s: Create C version of kuap_restore() and kuap_check()

2020-04-05 Thread Christophe Leroy
In preparation of porting PPC32 to C syscall entry/exit, create C version of kuap_restore() and kuap_check() on book3s/32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/kup.h | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/powerpc/include/

[RFC PATCH v2 04/13] powerpc/irq: Add new helpers to play with MSR_EE and MSR_RI on PPC32

2020-04-05 Thread Christophe Leroy
In preparation of porting PPC32 to C syscall entry/exit, add PPC32 version of following helpers: __hard_irq_enable() __hard_irq_disable() __hard_EE_RI_disable() __hard_RI_enable() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/hw_irq.h | 15 +

[RFC PATCH v2 01/13] powerpc/radix: Make kuap_check_amr() and kuap_restore_amr() generic

2020-04-05 Thread Christophe Leroy
In preparation of porting powerpc32 to C syscall entry/exit, rename kuap_check_amr() and kuap_restore_amr() as kuap_check() and kuap_restore(), and move the stub for when CONFIG_PPC_KUAP is not selected in the generic asm/kup.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/

[RFC PATCH v2 05/13] powerpc/syscall: Rename syscall_64.c into syscall.c

2020-04-05 Thread Christophe Leroy
syscall_64.c will be reused almost as is for PPC32. Rename it syscall.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile| 2 +- arch/powerpc/kernel/{syscall_64.c => syscall.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename arch/powerpc/kernel/{sy

[RFC PATCH v2 08/13] powerpc/syscall: Save r3 in regs->orig_r3

2020-04-05 Thread Christophe Leroy
Save r3 in regs->orig_r3 in system_call_exception() Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_64.S | 1 - arch/powerpc/kernel/syscall.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index

[RFC PATCH v2 07/13] powerpc/syscall: Use is_compat_task()

2020-04-05 Thread Christophe Leroy
Instead of hard comparing task flags with _TIF_32BIT, use is_compat_task(). The advantage is that it returns 0 on PPC32 allthough _TIF_32BIT is always set. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arc

[RFC PATCH v2 06/13] powerpc/syscall: Make syscall_64.c buildable on PPC32

2020-04-05 Thread Christophe Leroy
ifdef out specific PPC64 stuff to allow building syscall_64.c on PPC32. Modify Makefile to always build syscall.o Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile | 5 ++--- arch/powerpc/kernel/syscall.c | 10 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff

[RFC PATCH v2 09/13] powerpc/syscall: Selectively check MSR_RI and MSR_PR on syscall entry

2020-04-05 Thread Christophe Leroy
In system_call_exception(), MSR_RI needs to also be checked on 8xx. Only book3e doesn't have MSR_RI. On PPC32, MSR_PR is checked in real mode to avoid clobbering the stack, so no need to check and panic in system_call_exception(). Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/syscall.

[RFC PATCH v2 10/13] powerpc/syscall: system call implement entry/exit logic in C for PPC32

2020-04-05 Thread Christophe Leroy
That's port of PPC64 syscall entry/exit logic in C to PPC32. Performancewise: Before : 311 cycles on null_syscall After : 353 cycles on null_syscall Note: before the patch, if calling NVGPRS all the time as well, we have 335 cycles on null_syscall Signed-off-by: Christophe Leroy --- arch/powe

[RFC PATCH v2 11/13] powerpc/syscall: Avoid stack frame in likely part of syscall_call_exception()

2020-04-05 Thread Christophe Leroy
When r3 is not modified, reload it from regs->orig_r3 to free volatile registers. This avoids a stack frame for the likely part of syscall_call_exception() Before : 353 cycles on null_syscall After : 347 cycles on null_syscall Before the patch: c000b4d4 : c000b4d4: 7c 08 02 a6 mflr

[RFC PATCH v2 12/13] powerpc/kernel: Do not inconditionally save non volatile registers on system call

2020-04-05 Thread Christophe Leroy
Before : 347 cycles on null_syscall After : 327 cycles on null_syscall Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 15 +++ arch/powerpc/kernel/head_32.h | 3 +-- arch/powerpc/kernel/syscall.c | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) dif

[RFC PATCH v2 13/13] powerpc/kernel: Do not use READ_ONCE() to access current thread_info flags

2020-04-05 Thread Christophe Leroy
current is a volatile pointer hold by r2 register. READ_ONCE() is not required. Before: 327 cycles on null_syscall Before: 325 cycles on null_syscall Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/p

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.7-1 tag

2020-04-05 Thread Linus Torvalds
On Sun, Apr 5, 2020 at 5:53 AM Michael Ellerman wrote: > > There is one conflict in fs/sysfs/group.c, between our: > > 9255782f7061 ("sysfs: Wrap __compat_only_sysfs_link_entry_to_kobj function > to change the symlink name") [...] The conflict was trivial. But I want to kvetch a bit about tha

Re: [PATCH v2 5/5] uaccess: Rename user_access_begin/end() to user_full_access_begin/end()

2020-04-05 Thread Christophe Leroy
Le 03/04/2020 à 20:01, Linus Torvalds a écrit : On Fri, Apr 3, 2020 at 12:21 AM Christophe Leroy wrote: Now we have user_read_access_begin() and user_write_access_begin() in addition to user_access_begin(). I realize Al asked for this, but I don't think it really adds anything to the seri

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

2020-04-05 Thread Christophe Leroy
Le 03/04/2020 à 09:33, Nicholas Piggin a écrit : Christophe Leroy's on April 1, 2020 9:48 pm: 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()

Re: [PATCH v3] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Markus Elfring
> Here needs a NULL check. I find this change description questionable (despite of a reasonable patch subject). > Issue found by coccinelle. Would an information like “Generated by: scripts/coccinelle/null/kmerr.cocci” be nicer? > --- Will a patch change log be helpful here? Regards, Markus

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.7-1 tag

2020-04-05 Thread pr-tracker-bot
The pull request you sent on Sun, 05 Apr 2020 22:53:02 +1000: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.7-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d38c07afc356ddebaa3ed8ecb3f553340e05c969 Thank you! -- Deet-doot-do

Re: [PATCH] KVM: PPC: Book3S HV: Remove NULL check before kfree

2020-04-05 Thread Markus Elfring
> NULL check before kfree is unnecessary, so remove it. Would you like to take similar update suggestions into account? * 2019-09-04 KVM: PPC: Book3S HV: Delete an unnecessary check before kfree() in __kvmhv_nested_page_fault() * [-next] KVM: PPC: Book3S HV: remove redundant NULL check https

[Bug 207129] New: PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760"

2020-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207129 Bug ID: 207129 Summary: PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760" Product: Platform Specific/Hardw

[Bug 199561] sungem: RX MAC fifo overflow smac[03910440]

2020-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=199561 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #280931|0 |1 is obsolete|

[Bug 199561] sungem: RX MAC fifo overflow smac[03910440]

2020-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=199561 --- Comment #6 from Erhard F. (erhar...@mailbox.org) --- Created attachment 288225 --> https://bugzilla.kernel.org/attachment.cgi?id=288225&action=edit kernel .config (5.6.2, PowerMac G4 DP) -- You are receiving this mail because: You are on t

[PATCH] Fix: buffer overflow during hvc_alloc().

2020-04-05 Thread andrew
From: Andrew Melnychenko If there is a lot(more then 16) of virtio-console devices or virtio_console module is reloaded - buffers 'vtermnos' and 'cons_ops' are overflowed. In older kernels it overruns spinlock which leads to kernel freezing: https://bugzilla.redhat.com/show_bug.cgi?id=1786239 Si

[powerpc:next] BUILD SUCCESS 6ba4a2d3591039aea1cb45c7c42262d26351a2fa

2020-04-05 Thread kbuild test robot
allyesconfig mips malta_kvm_defconfig parisc allyesconfig pariscgeneric-32bit_defconfig i386 randconfig-a003-20200405 x86_64 randconfig-a001-20200405 x86_64 randconfig-a002-20200405 x86_64

[powerpc:merge] BUILD SUCCESS 2c0ce4ff35994a7b12cc9879ced52c9e7c2e6667

2020-04-05 Thread kbuild test robot
fuloong2e_defconfig mips malta_kvm_defconfig parisc allyesconfig pariscgeneric-32bit_defconfig pariscgeneric-64bit_defconfig x86_64 randconfig-a001-20200405 x86_64 randconfig-a002-20200405 x86_64

Re: [PATCH] Fix: buffer overflow during hvc_alloc().

2020-04-05 Thread Andrew Donnellan
On 6/4/20 6:40 am, and...@daynix.com wrote: From: Andrew Melnychenko If there is a lot(more then 16) of virtio-console devices or virtio_console module is reloaded - buffers 'vtermnos' and 'cons_ops' are overflowed. In older kernels it overruns spinlock which leads to kernel freezing: https://b

Re: [PATCH v3] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-05 Thread Qiujun Huang
On Mon, Apr 6, 2020 at 3:06 AM Markus Elfring wrote: > > > Here needs a NULL check. quite obvious? > > I find this change description questionable > (despite of a reasonable patch subject). > > > > Issue found by coccinelle. > > Would an information like “Generated by: scripts/coccinelle/null/kmer

Re: [PATCH] KVM: PPC: Book3S HV: Remove NULL check before kfree

2020-04-05 Thread Qiujun Huang
Sorry about noise, please just ignore it. On Mon, Apr 6, 2020 at 4:50 AM Markus Elfring wrote: > > > NULL check before kfree is unnecessary, so remove it. > > Would you like to take similar update suggestions into account? > * 2019-09-04 > KVM: PPC: Book3S HV: Delete an unnecessary check before

Re: [RFC PATCH v2 12/13] powerpc/kernel: Do not inconditionally save non volatile registers on system call

2020-04-05 Thread Nicholas Piggin
Christophe Leroy's on April 6, 2020 3:44 am: > Before : 347 cycles on null_syscall > After : 327 cycles on null_syscall The problem I had doing this is that signal delivery wnats full regs, and you don't know if you have a signal pending ahead of time if you have interrupts enabled. I began to t

Re: [RFC PATCH v2 11/13] powerpc/syscall: Avoid stack frame in likely part of syscall_call_exception()

2020-04-05 Thread Nicholas Piggin
Christophe Leroy's on April 6, 2020 3:44 am: > When r3 is not modified, reload it from regs->orig_r3 to free > volatile registers. This avoids a stack frame for the likely part > of syscall_call_exception() > > Before : 353 cycles on null_syscall > After : 347 cycles on null_syscall > > Before t

Re: [RFC PATCH v2 13/13] powerpc/kernel: Do not use READ_ONCE() to access current thread_info flags

2020-04-05 Thread Nicholas Piggin
Christophe Leroy's on April 6, 2020 3:44 am: > current is a volatile pointer hold by r2 register. > > READ_ONCE() is not required. > > Before: 327 cycles on null_syscall > Before: 325 cycles on null_syscall Patches against Michael's next-test branch have a few small changes here. I need to look

Re: [RFC PATCH v2 01/13] powerpc/radix: Make kuap_check_amr() and kuap_restore_amr() generic

2020-04-05 Thread Nicholas Piggin
Christophe Leroy's on April 6, 2020 3:44 am: > In preparation of porting powerpc32 to C syscall entry/exit, > rename kuap_check_amr() and kuap_restore_amr() as kuap_check() > and kuap_restore(), and move the stub for when CONFIG_PPC_KUAP is > not selected in the generic asm/kup.h I have no problem

Re: [RFC PATCH v2 05/13] powerpc/syscall: Rename syscall_64.c into syscall.c

2020-04-05 Thread Nicholas Piggin
Christophe Leroy's on April 6, 2020 3:44 am: > syscall_64.c will be reused almost as is for PPC32. > > Rename it syscall.c Don't mind this, but I wonder if we can rename it to interrupt.c. A system call is a type of interrupt. Thanks, Nick

Re: [RFC PATCH v2 06/13] powerpc/syscall: Make syscall_64.c buildable on PPC32

2020-04-05 Thread Nicholas Piggin
Christophe Leroy's on April 6, 2020 3:44 am: > ifdef out specific PPC64 stuff to allow building > syscall_64.c on PPC32. > > Modify Makefile to always build syscall.o > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/Makefile | 5 ++--- > arch/powerpc/kernel/syscall.c | 10 +

Re: [PATCH] powerpc/mce: Add MCE notification chain

2020-04-05 Thread Nicholas Piggin
Ganesh's on April 4, 2020 11:05 pm: > On 4/3/20 7:38 AM, Nicholas Piggin wrote: > >> Ganesh Goudar's on March 30, 2020 5:12 pm: >>> From: Santosh S >>> >>> Introduce notification chain which lets know about uncorrected memory >>> errors(UE). This would help prospective users in pmem or nvdimm sub

Re: [PATCH 1/2] cpufreq: qoriq: convert to a platform driver

2020-04-05 Thread Viresh Kumar
On 03-04-20, 23:21, Mian Yousaf Kaukab wrote: > The driver has to be manually loaded if it is built as a module. It > is neither exporting MODULE_DEVICE_TABLE nor MODULE_ALIAS. Moreover, > no platform-device is created (and thus no uevent is sent) for the > clockgen nodes it depends on. > > Conver

[PATCH 1/7] powerpc/powernv/npu: Clean up compound table group initialisation

2020-04-05 Thread Oliver O'Halloran
Re-work the control flow a bit so what's going on is a little clearer. This also ensures the table_group is only initialised once in the P9 case. This shouldn't be a functional change since all the GPU PCI devices should have the same table_group configuration, but it does look strange. Cc: Alexey

Make PowerNV IOMMU group setup saner (and fix it for hotpug)

2020-04-05 Thread Oliver O'Halloran
Currently on PowerNV the IOMMU group of a device is initialised in boot-time fixup which runs after devices are probed. Because this is only run at boot time hotplugged devices do not recieve an iommu group assignment which prevents them from being passed through to a guest. This series fixes that

[PATCH 2/7] powerpc/powernv/iov: Don't add VFs to iommu group during PE config

2020-04-05 Thread Oliver O'Halloran
In pnv_ioda_setup_vf_PE() we register an iommu group for the VF PE then call pnv_ioda_setup_bus_iommu_group() to add devices to that group. However, this function is called before the VFs are scanned so there's no devices to add. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powern

[PATCH 3/7] powerpc/powernv/pci: Register iommu group at PE DMA setup

2020-04-05 Thread Oliver O'Halloran
Move the registration of IOMMU groups out of the post-phb init fixup and into when we configure DMA for a PE. For most devices this doesn't result in any functional changes, but for NVLink attached GPUs it requires a bit of care. When the GPU is probed an IOMMU group would be created for the PE tha

[PATCH 4/7] powerpc/powernv/pci: Add device to iommu group during dma_dev_setup()

2020-04-05 Thread Oliver O'Halloran
Historically adding devices to their respective iommu group has been handled by the post-init phb fixup for most devices. This was done because: 1) The IOMMU group is tied to the PE (usually) so we can only setup the iommu groups after we've done resource allocation since BAR location determ

[PATCH 5/7] powerpc/powernv/pci: Delete old iommu recursive iommu setup

2020-04-05 Thread Oliver O'Halloran
No longer used. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda.c | 32 --- 1 file changed, 32 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 9198b7882b57..8b45b8e561e9 10064

[PATCH 6/7] powerpc/powernv/pci: Move tce size parsing to pci-ioda-tce.c

2020-04-05 Thread Oliver O'Halloran
Move it in with the rest of the TCE wrangling rather than carting around a static prototype in pci-ioda.c Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci-ioda-tce.c | 28 + arch/powerpc/platforms/powernv/pci-ioda.c | 30 --- arch/powerp

[PATCH 7/7] powerpc/powernv/npu: Move IOMMU group setup into npu-dma.c

2020-04-05 Thread Oliver O'Halloran
The NVlink IOMMU group setup is only relevant to NVLink devices so move it into the NPU containment zone. This let us remove some prototypes in pci.h and staticfy some function definitions. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/npu-dma.c | 54 +++-

[RFC PATCH v0 1/5] powerpc/pseries/hotplug-memory: Set DRCONF_MEM_HOTREMOVABLE for hot-plugged mem

2020-04-05 Thread Bharata B Rao
In addition to setting DRCONF_MEM_HOTREMOVABLE for boot-time hot-plugged memory, we should set the same too for the memory that gets hot-plugged post-boot. This ensures that correct LMB flags value is reflected in ibm,dynamic-memory-vN property. Signed-off-by: Bharata B Rao --- arch/powerpc/plat

[RFC PATCH v0 0/5] powerpc/mm/radix: Memory unplug fixes

2020-04-05 Thread Bharata B Rao
Memory unplug has a few bugs which I had attempted to fix ealier at https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-July/194087.html Now with Leonardo's patch for PAPR changes that add a separate flag bit to LMB flags for explicitly identifying hot-removable memory (https://lore.kernel.org/li

[RFC PATCH v0 2/5] powerpc/mm/radix: Create separate mappings for hot-plugged memory

2020-04-05 Thread Bharata B Rao
Memory that gets hot-plugged _during_ boot (and not the memory that gets plugged in after boot), is mapped with 1G mappings and will undergo splitting when it is unplugged. The splitting code has a few issues: 1. Recursive locking Memory unplug path takes cpu_hotplug_lock and

[RFC PATCH v0 3/5] powerpc/mm/radix: Fix PTE/PMD fragment count for early page table mappings

2020-04-05 Thread Bharata B Rao
We can hit the following BUG_ON during memory unplug kernel BUG at arch/powerpc/mm/book3s64/pgtable.c:344! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries NIP [c0097d48] pmd_fragment_free+0x48/0xd0 LR [c16aaefc] remove_pagetable+

[RFC PATCH v0 5/5] powerpc/mm/radix: Remove split_kernel_mapping()

2020-04-05 Thread Bharata B Rao
With hot-plugged memory getting mapped with 2M mappings always, there will be no need to split any mappings during unplug. Hence remove split_kernel_mapping() and associated code. This essentially is a revert of commit 4dd5f8a99e791 ("powerpc/mm/radix: Split linear mapping on hot-unplug") Signed-

[RFC PATCH v0 4/5] powerpc/mm/radix: Free PUD table when freeing pagetable

2020-04-05 Thread Bharata B Rao
remove_pagetable() isn't freeing PUD table. This causes memory leak during memory unplug. Fix this. Signed-off-by: Bharata B Rao --- arch/powerpc/mm/book3s64/radix_pgtable.c | 16 1 file changed, 16 insertions(+) diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/pow

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

2020-04-05 Thread Gautham R Shenoy
On Fri, Apr 03, 2020 at 04:04:56PM +0530, Naveen N. Rao wrote: > Gautham R Shenoy wrote: > >On Wed, Apr 01, 2020 at 03:12:53PM +0530, Naveen N. Rao wrote: > >>Hi Gautham, > >> > >>Gautham R. Shenoy wrote: > >>>From: "Gautham R. Shenoy" > >>> > >>>+ > >>>+static inline u64 read_this_idle_purr(void)

[Bug 207129] PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760"

2020-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207129 --- Comment #1 from Christophe Leroy (christophe.le...@c-s.fr) --- So it hands in show_stack(). Does it also hang without CONFIG_DEBUG_STACKOVERFLOW ? If not, it means we have a problem with check_stack_overflow() Regardless of the result above,

Re: [RFC/PATCH 2/3] pseries/kvm: Clear PSSCR[ESL|EC] bits before guest entry

2020-04-05 Thread Gautham R Shenoy
On Fri, Apr 03, 2020 at 12:20:26PM +1000, Nicholas Piggin wrote: > Gautham R. Shenoy's on March 31, 2020 10:10 pm: > > From: "Gautham R. Shenoy" > > > > ISA v3.0 allows the guest to execute a stop instruction. For this, the > > PSSCR[ESL|EC] bits need to be cleared by the hypervisor before > > sc