[PATCH] powerpc/setup: display reason for not booting

2018-12-17 Thread Christophe Leroy
When no machine description matches, display it clearly before looping forever. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c

[PATCH v2] powerpc/perf: Fix loop exit condition in nest_imc_event_init

2018-12-17 Thread Anju T Sudhakar
The data structure (i.e struct imc_mem_info) to hold the memory address information for nest imc units is allocated based on the number of nodes in the system. nest_imc_event_init() traverse this struct array to calculate the memory base address for the event-cpu. If we fail to find a match for

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-17 Thread Jonathan Neuschäfer
On Mon, Dec 17, 2018 at 10:29:18AM +0100, Christophe Leroy wrote: > > With patches 1-3: > > [0.00] setbat(0, c000, , 0100, 311) > > [0.00] setbat(2, c100, 0100, 0080, 311) > > [0.00] setbat(4, d000, 1000, 0200, 791) > > What we see

Re: [PATCH] KVM: PPC: Book3S PR: Set hflag to indicate that POWER9 supports 1T segments

2018-12-17 Thread Paul Mackerras
On Fri, Dec 07, 2018 at 02:43:18PM +1100, Suraj Jitindar Singh wrote: > When booting a kvm-pr guest on a POWER9 machine the following message is > observed: > "qemu-system-ppc64: KVM does not support 1TiB segments which guest expects" > > This is because the guest is expecting to be able to use

Re: [PATCH] KVM: PPC: Book3S HV: Change to use DEFINE_SHOW_ATTRIBUTE macro

2018-12-17 Thread Paul Mackerras
On Mon, Nov 05, 2018 at 09:47:17AM -0500, Yangtao Li wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li Thanks, patch applied to my kvm-ppc-next branch. Paul.

Re: [PATCH V4 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests

2018-12-17 Thread Paul Mackerras
On Fri, Dec 14, 2018 at 04:29:02PM +1100, Suraj Jitindar Singh wrote: > This patch series allows for emulated devices to be passed through to nested > guests, irrespective of at which level the device is being emulated. > > Note that the emulated device must be using dma, not virtio. > > For

Re: [PATCH 7/8] powerpc/dma: split the two __dma_alloc_coherent implementations

2018-12-17 Thread Gerhard Pircher
Am 2018-12-17 um 08:35 schrieb Christoph Hellwig: > On Mon, Dec 17, 2018 at 07:51:05AM +0100, Christophe Leroy wrote: >> >> >> Le 16/12/2018 à 18:19, Christoph Hellwig a écrit : >>> The implemementation for the CONFIG_NOT_COHERENT_CACHE case doesn't share >>> any code with the one for systems with

Re: [PATCH 2/2] s390/pci: handle function enumeration after sriov enablement

2018-12-17 Thread Christoph Hellwig
On Mon, Dec 17, 2018 at 06:30:18PM +0100, Sebastian Ott wrote: > Something like this: > https://lore.kernel.org/linux-pci/20181212215453.gj99...@google.com/T/#m649d86ea3c65f669c74d048f89afbaf473876ac3 No, I literally meant a flag to skip the work. Think about it: there is a standard way to probe

Re: [PATCH 2/2] s390/pci: handle function enumeration after sriov enablement

2018-12-17 Thread Sebastian Ott
On Fri, 14 Dec 2018, Christoph Hellwig wrote: > On Fri, Dec 14, 2018 at 05:12:45AM -0800, Christoph Hellwig wrote: > > On Thu, Dec 13, 2018 at 06:54:28PM +0100, Sebastian Ott wrote: > > > Implement pcibios_sriov_{add|del}_vfs as empty functions. VF > > > creation will be triggered by the hotplug

Re: [RESEND PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-17 Thread Christoph Hellwig
Thanks, applied to the dma-mapping for-linus tree.

Re: [PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-17 Thread Lendacky, Thomas
On 12/16/2018 05:41 PM, Tom Lendacky wrote: > On 12/15/2018 04:55 AM, Christoph Hellwig wrote: >> The mail seems to be so oddly encoded so that git-am fails on it. Can >> you resend as plain text? > > Hmmm... not sure what happened with that, but yeah, looking at the message > source shows

[RESEND PATCH] kernel/dma/direct: Do not include SME mask in the DMA supported check

2018-12-17 Thread Lendacky, Thomas
The dma_direct_supported() function intends to check the DMA mask against specific values. However, the phys_to_dma() function includes the SME encryption mask, which defeats the intended purpose of the check. This results in drivers that support less than 48-bit DMA (SME encryption mask is bit

[PATCH] powerpc/prom: move the device tree if not in declared memory.

2018-12-17 Thread Christophe Leroy
If the device tree doesn't reside in the memory which is declared inside it, it has to be moved as well as this memory will not be mapped by the kernel. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/prom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v5 0/5] powerpc: system call table generation support

2018-12-17 Thread Michael Ellerman
Firoz Khan writes: > Hi Michael, > > On Mon, 17 Dec 2018 at 16:01, Michael Ellerman wrote: >> No it's fine if it applies on next. >> >> I can also fix up minor merge conflicts if there are any. > > Ohh. I already rebased and sent v6. That's OK. cheers

Re: [PATCH NEXT v2 1/4] powerpc/pasemi: Add PCI initialisation for Nemo board.

2018-12-17 Thread Michael Ellerman
Darren Stevens writes: > Michael, > > Any comments on these? Hi Darren, I guess in general we'd like more of this to come from the device tree. But I'll merge this series as-is, because I don't think it helps anyone to have this code out-of-tree. We can always clean things up further in

Re: [PATCH v2] powerpc/mm: make NULL pointer deferences explicit on bad page faults.

2018-12-17 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c > index 01b9bcc7fa85..3398291f4785 100644 > --- a/arch/powerpc/mm/fault.c > +++ b/arch/powerpc/mm/fault.c > @@ -636,21 +636,24 @@ void bad_page_fault(struct pt_regs *regs, unsigned long > address, int sig)

Re: [PATCH v1 3/9] powerpc/vdso: don't clear PG_reserved

2018-12-17 Thread Michael Ellerman
David Hildenbrand writes: > The VDSO is part of the kernel image and therefore the struct pages are > marked as reserved during boot. > > As we install a special mapping, the actual struct pages will never be > exposed to MM via the page tables. We can therefore leave the pages > marked as

Re: [PATCH 2/8] powerpc/dma: properly wire up the unmap_page and unmap_sg methods

2018-12-17 Thread Michael Ellerman
Christoph Hellwig writes: > diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c > index dbfc7056d7df..d442d23e182b 100644 > --- a/arch/powerpc/kernel/dma.c > +++ b/arch/powerpc/kernel/dma.c > @@ -247,6 +252,8 @@ static inline void dma_nommu_unmap_page(struct device > *dev, >

Re: [PATCH] powerpc/mm: make NULL pointer deferences explicit on bad page faults.

2018-12-17 Thread Michael Ellerman
Christophe Leroy writes: > Hi Michael, > > Le 14/12/2018 à 01:57, Michael Ellerman a écrit : >> Hi Christophe, >> >> You know it's the trivial patches that are going to get lots of review >> comments :) > > I'm so happy to get comments. Haha :) >> Christophe Leroy writes: >>> As several other

Re: [PATCH] powerpc/ptrace: cleanup do_syscall_trace_enter

2018-12-17 Thread Oleg Nesterov
On 12/16, Dmitry V. Levin wrote: > > long do_syscall_trace_enter(struct pt_regs *regs) > { > + u32 cached_flags; > + > user_exit(); > > - if (test_thread_flag(TIF_SYSCALL_EMU)) { > - /* > - * A nonzero return code from tracehook_report_syscall_entry() > -

Re: [PATCH] powerpc/ptrace: cleanup do_syscall_trace_enter

2018-12-17 Thread Dmitry V. Levin
Hi, On Mon, Dec 17, 2018 at 10:20:26PM +1100, Michael Ellerman wrote: > "Dmitry V. Levin" writes: > > Invoke tracehook_report_syscall_entry once. > > Thanks. > > > Signed-off-by: Dmitry V. Levin > > --- > > arch/powerpc/kernel/ptrace.c | 54 +--- > > 1 file

Re: [PATCH] powerpc/ptrace: cleanup do_syscall_trace_enter

2018-12-17 Thread Michael Ellerman
"Dmitry V. Levin" writes: > Invoke tracehook_report_syscall_entry once. Thanks. > Signed-off-by: Dmitry V. Levin > --- > arch/powerpc/kernel/ptrace.c | 54 +--- > 1 file changed, 31 insertions(+), 23 deletions(-) > > diff --git a/arch/powerpc/kernel/ptrace.c

Re: [PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-17 Thread Michael Ellerman
Hi Frank, frowand.l...@gmail.com writes: > From: Frank Rowand > > Non-overlay dynamic devicetree node removal may leave the node in > the phandle cache. Subsequent calls to of_find_node_by_phandle() > will incorrectly find the stale entry. Remove the node from the > cache. > > Add paranoia

Re: [PATCH v2 1/2] of: of_node_get()/of_node_put() nodes held in phandle cache

2018-12-17 Thread Michael Ellerman
Hi Frank, frowand.l...@gmail.com writes: > From: Frank Rowand > > The phandle cache contains struct device_node pointers. The refcount > of the pointers was not incremented while in the cache, allowing use > after free error after kfree() of the node. Add the proper increment > and decrement

Re: [PATCH v5 0/5] powerpc: system call table generation support

2018-12-17 Thread Firoz Khan
Hi Michael, On Mon, 17 Dec 2018 at 16:01, Michael Ellerman wrote: > No it's fine if it applies on next. > > I can also fix up minor merge conflicts if there are any. Ohh. I already rebased and sent v6. Thanks Firoz

[PATCH v6 5/5] powerpc: generate uapi header and system call table files

2018-12-17 Thread Firoz Khan
System call table generation script must be run to gener- ate unistd_32/64.h and syscall_table_32/64/c32/spu.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table- _32/64/c32/spu.h files by the syscall table generation

[PATCH v6 4/5] powerpc: split compat syscall table out from native table

2018-12-17 Thread Firoz Khan
PowerPC uses a syscall table with native and compat calls interleaved, which is a slightly simpler way to define two matching tables. As we move to having the tables generated, that advantage is no longer important, but the interleaved table gets in the way of using the same scripts as on the

[PATCH v6 3/5] powerpc: add system call table generation support

2018-12-17 Thread Firoz Khan
The system call tables are in different format in all architecture and it will be difficult to manually add or modify the system calls in the respective files. To make it easy by keeping a script and which will generate the uapi header and syscall table file. This change will also help to unify

[PATCH v6 2/5] powerpc: move macro definition from asm/systbl.h

2018-12-17 Thread Firoz Khan
Move the macro definition for compat_sys_sigsuspend from asm/systbl.h to the file which it is getting included. One of the patch in this patch series is generating uapi header and syscall table files. In order to come up with a common implimentation across all architecture, we need to do this

[PATCH v6 1/5] powerpc: add __NR_syscalls along with NR_syscalls

2018-12-17 Thread Firoz Khan
NR_syscalls macro holds the number of system call exist in powerpc architecture. We have to change the value of NR_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file

[PATCH v6 0/5] powerpc: system call table generation support

2018-12-17 Thread Firoz Khan
The purpose of this patch series is, we can easily add/modify/delete system call table support by cha- nging entry in syscall.tbl file instead of manually changing many files. The other goal is to unify the system call table generation support implementation across all the architectures. The

Re: [PATCH v5 0/5] powerpc: system call table generation support

2018-12-17 Thread Michael Ellerman
Satheesh Rajendran writes: > Hi Firoz, > > On Thu, Dec 13, 2018 at 02:32:45PM +0530, Firoz Khan wrote: >> The purpose of this patch series is, we can easily >> add/modify/delete system call table support by cha- >> nging entry in syscall.tbl file instead of manually >> changing many files. The

Re: [PATCH v5 0/5] powerpc: system call table generation support

2018-12-17 Thread Firoz Khan
Hi Satheesh, On Mon, 17 Dec 2018 at 13:39, Satheesh Rajendran wrote: > > Hi Firoz, > > On Thu, Dec 13, 2018 at 02:32:45PM +0530, Firoz Khan wrote: > Tried to apply on linus "master" and > linuxppc-dev(https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git) > "merge" branch, > both

Re: [PATCH v1 9/9] mm: better document PG_reserved

2018-12-17 Thread David Hildenbrand
On 15.12.18 01:12, Randy Dunlap wrote: > On 12/14/18 3:10 AM, David Hildenbrand wrote: >> The usage of PG_reserved and how PG_reserved pages are to be treated is >> buried deep down in different parts of the kernel. Let's shine some light >> onto these details by documenting current users and

Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram()

2018-12-17 Thread Christophe Leroy
Le 17/12/2018 à 02:28, Jonathan Neuschäfer a écrit : Hi, thanks for your reply. On Thu, Dec 13, 2018 at 03:51:32PM +0100, Christophe Leroy wrote: Hi Again, Le 13/12/2018 à 13:16, Christophe Leroy a écrit : [...] Can you tell/provide the .config and dts used ? I'm using wii.dts and

Re: [PATCH 2/8] powerpc/dma: properly wire up the unmap_page and unmap_sg methods

2018-12-17 Thread Christoph Hellwig
On Mon, Dec 17, 2018 at 08:39:17AM +0100, Christophe Leroy wrote: > I can help you with powerpc 8xx actually. Below is a patch that implements the proper scheme on top of the series in this thread. Compile tested with tqm8xx_defconfig and tqm8xx_defconfig + CONFIG_HIGHMEM only. diff --git

Re: [PATCH v5 0/5] powerpc: system call table generation support

2018-12-17 Thread Satheesh Rajendran
Hi Firoz, On Thu, Dec 13, 2018 at 02:32:45PM +0530, Firoz Khan wrote: > The purpose of this patch series is, we can easily > add/modify/delete system call table support by cha- > nging entry in syscall.tbl file instead of manually > changing many files. The other goal is to unify the > system

[PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-17 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. Remove the node from the cache. Add paranoia checks in of_find_node_by_phandle() as a second level of