Re: powerpc: remove unnecessary unlikely()

2019-01-23 Thread Michael Ellerman
On Fri, 2018-09-07 at 15:35:26 UTC, Igor Stoppa wrote: > WARN_ON() already contains an unlikely(), so it's not necessary to > wrap it into another. > > Signed-off-by: Igor Stoppa > Cc: Arseny Solokha > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc:

Re: powerpc: Allow CPU selection of G4/74xx variant

2019-01-23 Thread Michael Ellerman
On Mon, 2019-01-14 at 20:13:04 UTC, Mathieu Malaterre wrote: > GCC supports -mcpu=G4 > > This patch gives the opportunity to select ALTIVEC for this variant. > > Signed-off-by: Mathieu Malaterre Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/9bd10b649826774bb5e1e7fb67544e65

Re: [kernel] powerpc/powernv/npu: Remove obsolete comment about TCE_KILL_INVAL_ALL

2019-01-23 Thread Michael Ellerman
On Mon, 2019-01-14 at 00:41:38 UTC, Alexey Kardashevskiy wrote: > TCE_KILL_INVAL_ALL has moved long ago but the comment was forgotted so > finish the move and remove the comment. > > Fixes: 0bbcdb437da0c4a "powerpc/powernv/npu: TCE Kill helpers cleanup" > Signed-off-by: Alexey Kardashevskiy

Re: [kernel] powerpc/powernv: Remove never used pnv_power9_force_smt4

2019-01-23 Thread Michael Ellerman
On Mon, 2019-01-14 at 00:40:27 UTC, Alexey Kardashevskiy wrote: > This removes never used symbol - pnv_power9_force_smt4. > > Note that we might still want to add stubs for: > void pnv_power9_force_smt4_catch(void); > void pnv_power9_force_smt4_release(void); > > Fixes: 7672691a08c88

Re: [kernel] KVM: PPC: Fix compile when CONFIG_PPC_RADIX_MMU is not defined

2019-01-23 Thread Michael Ellerman
On Mon, 2019-01-14 at 00:38:49 UTC, Alexey Kardashevskiy wrote: > This adds some stubs for hash only configs. > > Signed-off-by: Alexey Kardashevskiy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/cd6b8a631c5de3a6b7c8ef30337fd02b cheers

Re: [1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node

2019-01-23 Thread Michael Ellerman
On Sat, 2019-01-12 at 16:21:23 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote: > The Hollywood GPIO controller is connected to the Hollywood PIC () > at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access > by the PPC, 11 for GPIO lines that are configured for access by the >

Re: [1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node

2019-01-23 Thread Michael Ellerman
On Sat, 2019-01-12 at 16:21:23 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote: > The Hollywood GPIO controller is connected to the Hollywood PIC () > at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access > by the PPC, 11 for GPIO lines that are configured for access by the >

Re: powerpc: Use ALIGN instead of BLOCK

2019-01-23 Thread Michael Ellerman
On Fri, 2019-01-11 at 23:50:56 UTC, Joel Stanley wrote: > In the ld documentation under Builtin Functions: > > BLOCK(exp) > > This is a synonym for ALIGN, for compatibility with older linker scripts. > > Clang's linker (lld) doesn't know about BLOCK so remove this use of it. > > Link:

Re: [1/3] KVM: powerpc: remove -I. header search paths

2019-01-23 Thread Michael Ellerman
On Fri, 2019-01-11 at 03:22:31 UTC, Masahiro Yamada wrote: > The header search path -I. in kernel Makefiles is very suspicious; > it allows the compiler to search for headers in the top of $(srctree), > where obviously no header file exists. > > Commit 46f43c6ee022 ("KVM: powerpc: convert marker

Re: [v2,1/3] powerpc: Stop using pr_cont() in __die()

2019-01-23 Thread Michael Ellerman
On Thu, 2019-01-10 at 11:57:35 UTC, Michael Ellerman wrote: > Using pr_cont() risks having our output interleaved with other output > from other CPUs. Instead print everything in a single printk() call. > > Signed-off-by: Michael Ellerman > Reviewed-by: Christophe Leroy Series applied to

Re: [-next] powerpc/mm: Fix debugfs_simple_attr.cocci warnings

2019-01-23 Thread Michael Ellerman
On Wed, 2019-01-09 at 12:10:58 UTC, YueHaibing wrote: > Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE > for debugfs files. > > Semantic patch information: > Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() > imposes some significant overhead as compared to >

Re: powerpc/ps3: Use struct_size() in kzalloc()

2019-01-23 Thread Michael Ellerman
On Tue, 2019-01-08 at 21:00:10 UTC, "Gustavo A. R. Silva" wrote: > One of the more common cases of allocation size calculations is finding the > size of a structure that has a zero-sized array at the end, along with memory > for some number of elements for that array. For example: > > struct foo

Re: powerpc/spufs: use struct_size() in kmalloc()

2019-01-23 Thread Michael Ellerman
On Tue, 2019-01-08 at 18:37:20 UTC, "Gustavo A. R. Silva" wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo

Re: powerpc/ipic: drop unused functions

2019-01-23 Thread Michael Ellerman
On Tue, 2019-01-08 at 15:08:00 UTC, Christophe Leroy wrote: > ipic_set_highest_priority(), ipic_enable_mcp() and ipic_disable_mcp() > are unused. This patch drops them. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: powerpc: build virtex dtb

2019-01-23 Thread Michael Ellerman
On Tue, 2019-01-08 at 12:52:50 UTC, Corentin Labbe wrote: > I wanted to test the virtex440-ml507 qemu machine and found that the dtb > for it was not builded. > All powerpc DTB are only built when CONFIG_OF_ALL_DTBS is set which depend on > COMPILE_TEST. > > This patchs adds build of virtex dtbs

Re: powerpc/irq: drop arch_early_irq_init()

2019-01-23 Thread Michael Ellerman
On Tue, 2019-01-08 at 11:37:19 UTC, Christophe Leroy wrote: > arch_early_irq_init() does nothing different than > the weak arch_early_irq_init() in kernel/softirq.c > > Fixes: 089fb442f301 ("powerpc: Use ARCH_IRQ_INIT_FLAGS") > Cc: Thomas Gleixner > Signed-off-by: Christophe Leroy > Acked-by:

Re: [v4] selftests/powerpc: New TM signal self test

2019-01-23 Thread Michael Ellerman
On Tue, 2019-01-08 at 11:31:21 UTC, Breno Leitao wrote: > A new self test that forces MSR[TS] to be set without calling any TM > instruction. This test also tries to cause a page fault at a signal > handler, exactly between MSR[TS] set and tm_recheckpoint(), forcing > thread->texasr to be

Re: powerpc: use a CONSOLE_LOGLEVEL_DEBUG macro

2019-01-23 Thread Michael Ellerman
On Mon, 2019-01-07 at 09:57:20 UTC, Sergey Senozhatsky wrote: > Use a CONSOLE_LOGLEVEL_DEBUG macro for console_loglevel rather > than a naked number. > > Signed-off-by: Sergey Senozhatsky Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/fae1383b38a105a0454acab19b094c51 cheers

Re: [02/12] powerpc/hvsi: fix typo

2019-01-23 Thread Michael Ellerman
On Fri, 2019-01-04 at 21:31:52 UTC, Matteo Croce wrote: > Fix spelling mistake: "lenght" -> "length" > > Signed-off-by: Matteo Croce Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/3b702ddd066813952154c22dd76d3b0c cheers

Re: [PATCH -next] usb: host: drop pointless static qualifier

2019-01-23 Thread YueHaibing
On 2019/1/24 0:09, Alan Stern wrote: > On Wed, 23 Jan 2019, YueHaibing wrote: > >> There is no need to have the 'dummy_mask' variable static since new >> value always be assigned before use it. >> >> Signed-off-by: YueHaibing >> --- >> drivers/usb/host/ehci-ps3.c | 2 +- >>

Re: [PATCH v13 00/10] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2019-01-23 Thread Michael Ellerman
Christophe Leroy writes: > Le 12/01/2019 à 10:55, Christophe Leroy a écrit : >> The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which >> moves the thread_info into task_struct. >> >> Moving thread_info into task_struct has the following advantages: >> - It protects

Re: [PATCH v13 00/10] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2019-01-23 Thread Michael Ellerman
Christophe Leroy writes: > Le 19/01/2019 à 11:23, Michael Ellerman a écrit : >> Christophe Leroy writes: >> >>> The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which >>> moves the thread_info into task_struct. >>> >>> Moving thread_info into task_struct has the following

Re: [PATCH v13 00/10] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2019-01-23 Thread Michael Ellerman
LEROY Christophe writes: > Michael Ellerman a écrit : > >> Christophe Leroy writes: >> >>> The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which >>> moves the thread_info into task_struct. >>> >>> Moving thread_info into task_struct has the following advantages: >>> - It

Re: [PATCH kernel] vfio-pci/nvlink2: Fix ancient gcc warnings

2019-01-23 Thread Michael Ellerman
Geert Uytterhoeven writes: > Hi Alex, > > On Wed, Jan 23, 2019 at 5:30 AM Alex Williamson > wrote: >> The below patch comes about from the build regressions and improvements >> list you've sent out, but something doesn't add up that we'd be testing >> with an old compiler where initialization

Re: [PATCH -next] usb: host: drop pointless static qualifier

2019-01-23 Thread Alan Stern
On Wed, 23 Jan 2019, YueHaibing wrote: > There is no need to have the 'dummy_mask' variable static since new > value always be assigned before use it. > > Signed-off-by: YueHaibing > --- > drivers/usb/host/ehci-ps3.c | 2 +- > drivers/usb/host/ohci-ps3.c | 2 +- > 2 files changed, 2

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-23 Thread Benjamin Herrenschmidt
On Wed, 2019-01-23 at 21:30 +1100, Paul Mackerras wrote: > > Afaik bcs we change the mapping to point to the real HW irq ESB page > > instead of the "IPI" that was there at VM init time. > > So that makes it sound like there is a whole lot going on that hasn't > even been hinted at in the patch

[PATCH] powerpc/pseries: Check for ceded CPU's during LPAR migration

2019-01-23 Thread Michael Bringmann
This patch is to check for cede'ed CPUs during LPM. Some extreme tests encountered a problem ehere Linux has put some threads to sleep (possibly to save energy or something), LPM was attempted, and the Linux kernel didn't awaken the sleeping threads, but issued the H_JOIN for the active threads.

Re: [PATCH kernel] vfio-pci/nvlink2: Fix ancient gcc warnings

2019-01-23 Thread Alex Williamson
On Wed, 23 Jan 2019 15:07:11 +1100 Alexey Kardashevskiy wrote: > Using the {0} construct as a generic initializer is perfectly fine in C, > however due to a bug in old gcc there is a warning: > > + /kisskb/src/drivers/vfio/pci/vfio_pci_nvlink2.c: warning: (near > initialization for

Re: [PATCH 00/19] KVM: PPC: Book3S HV: add XIVE native exploitation mode

2019-01-23 Thread Cédric Le Goater
On 1/22/19 5:46 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 07:43:12PM +0100, Cédric Le Goater wrote: >> Hello, >> >> On the POWER9 processor, the XIVE interrupt controller can control >> interrupt sources using MMIO to trigger events, to EOI or to turn off >> the sources. Priority

Re: [PATCH 19/19] KVM: introduce a KVM_DELETE_DEVICE ioctl

2019-01-23 Thread Cédric Le Goater
On 1/22/19 6:42 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 08:10:06PM +0100, Cédric Le Goater wrote: >> This will be used to destroy the KVM XICS or XIVE device when the >> sPAPR machine is reseted. When the VM boots, the CAS negotiation >> process will determine which interrupt mode to

Re: [PATCH 06/19] KVM: PPC: Book3S HV: add a GET_ESB_FD control to the XIVE native device

2019-01-23 Thread Cédric Le Goater
On 1/22/19 6:09 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 07:43:18PM +0100, Cédric Le Goater wrote: >> This will let the guest create a memory mapping to expose the ESB MMIO >> regions used to control the interrupt sources, to trigger events, to >> EOI or to turn off the sources. >> >>

Re: [PATCH 08/19] KVM: PPC: Book3S HV: add a VC_BASE control to the XIVE native device

2019-01-23 Thread Cédric Le Goater
On 1/22/19 6:14 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 07:43:20PM +0100, Cédric Le Goater wrote: >> The ESB MMIO region controls the interrupt sources of the guest. QEMU >> will query an fd (GET_ESB_FD ioctl) and map this region at a specific >> address for the guest to use. The guest

Re: [PATCH 05/19] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode

2019-01-23 Thread Cédric Le Goater
On 1/22/19 6:05 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 07:43:17PM +0100, Cédric Le Goater wrote: >> This is the basic framework for the new KVM device supporting the XIVE >> native exploitation mode. The user interface exposes a new capability >> and a new KVM device to be used by

Re: [PATCH 03/19] KVM: PPC: Book3S HV: check the IRQ controller type

2019-01-23 Thread Cédric Le Goater
On 1/22/19 5:56 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 07:43:15PM +0100, Cédric Le Goater wrote: >> We will have different KVM devices for interrupts, one for the >> XICS-over-XIVE mode and one for the XIVE native exploitation >> mode. Let's add some checks to make sure we are not

Re: [PATCH v4] kbuild: Add support for DT binding schema checks

2019-01-23 Thread Geert Uytterhoeven
Hi Rob, On Tue, Dec 11, 2018 at 9:24 PM Rob Herring wrote: > This adds the build infrastructure for checking DT binding schema > documents and validating dts files using the binding schema. > > Check DT binding schema documents: > make dt_binding_check > > Build dts files and check using DT

Re: [PATCH] tools/testing/selftests/powerpc: Add Anton's null_syscall benchmark to the selftests

2019-01-23 Thread Christophe Leroy
Le 27/09/2016 à 16:10, Rui Teng a écrit : From: Anton Blanchard Pull in a version of Anton's null_syscall benchmark: http://ozlabs.org/~anton/junkcode/null_syscall.c Into tools/testing/selftests/powerpc/benchmarks. Suggested-by: Michael Ellerman Signed-off-by: Anton Blanchard

Re: use generic DMA mapping code in powerpc V4

2019-01-23 Thread Christian Zigotzky
Hi Christoph, I also compiled a kernel (zImage) for the X1000  from your Git 'powerpc-dma.6-debug' (both patches) today. It boots and the P.A. Semi Ethernet works! I will test just the first patch tomorrow. Thanks, Christian On 21 January 2019 at 3:38PM, Christian Zigotzky wrote: Hello

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-23 Thread Cédric Le Goater
On 1/23/19 11:30 AM, Paul Mackerras wrote: > On Wed, Jan 23, 2019 at 05:45:24PM +1100, Benjamin Herrenschmidt wrote: >> On Tue, 2019-01-22 at 16:26 +1100, Paul Mackerras wrote: >>> On Mon, Jan 07, 2019 at 08:10:05PM +0100, Cédric Le Goater wrote: Clear the ESB pages from the VMA of the IRQ

Re: [PATCH 11/19] KVM: PPC: Book3S HV: add support for the XIVE native exploitation mode hcalls

2019-01-23 Thread Cédric Le Goater
On 1/23/19 11:26 AM, Paul Mackerras wrote: > On Wed, Jan 23, 2019 at 09:48:31AM +0100, Cédric Le Goater wrote: >> On 1/23/19 7:44 AM, Benjamin Herrenschmidt wrote: >>> On Tue, 2019-01-22 at 16:23 +1100, Paul Mackerras wrote: Why do we need to provide real-mode versions of these hypercall

Re: [PATCH 11/19] KVM: PPC: Book3S HV: add support for the XIVE native exploitation mode hcalls

2019-01-23 Thread Paul Mackerras
On Wed, Jan 23, 2019 at 09:48:31AM +0100, Cédric Le Goater wrote: > On 1/23/19 7:44 AM, Benjamin Herrenschmidt wrote: > > On Tue, 2019-01-22 at 16:23 +1100, Paul Mackerras wrote: > >> Why do we need to provide real-mode versions of these hypercall > >> handlers? I thought these hypercalls would

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-23 Thread Paul Mackerras
On Wed, Jan 23, 2019 at 05:45:24PM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2019-01-22 at 16:26 +1100, Paul Mackerras wrote: > > On Mon, Jan 07, 2019 at 08:10:05PM +0100, Cédric Le Goater wrote: > > > Clear the ESB pages from the VMA of the IRQ being pass through to the > > > guest and let

Re: [PATCH v13 00/10] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2019-01-23 Thread Christophe Leroy
Le 12/01/2019 à 10:55, Christophe Leroy a écrit : The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from corruption in the case of stack

Re: [PATCH 4/4] powerpc/64s: Support shrinking the SLB for debugging

2019-01-23 Thread Aneesh Kumar K.V
Michael Ellerman writes: > On machines with 1TB segments and a 32-entry SLB it's quite hard to > cause sufficient SLB pressure to trigger bugs caused due to badly > timed SLB faults. > > We have seen this in the past and a few years ago added the > disable_1tb_segments command line option to

Re: [PATCH 3/4] powerpc/64s: Move SLB init into hash_utils_64.c

2019-01-23 Thread Aneesh Kumar K.V
Michael Ellerman writes: > The SLB initialisation code is spread around a bit between prom.c and > hash_utils_64.c. Consolidate it all in hash_utils_64.c. > > This slightly changes the timing of when mmu_slb_size is initialised, > but that should have no effect. Reviewed-by: Aneesh Kumar K.V

Re: [PATCH 2/4] powerpc/64s: Add slb_full_bitmap rather than hard-coding U32_MAX

2019-01-23 Thread Aneesh Kumar K.V
Michael Ellerman writes: > The recent rewrite of the SLB code into C included the assumption that > all CPUs we run on have at least 32 SLB entries. This is currently > true but a bit fragile as the SLB size is actually defined by the > device tree and so could theoretically change at any time.

Re: [PATCH 1/4] powerpc/64s: Always set mmu_slb_size using slb_set_size()

2019-01-23 Thread Aneesh Kumar K.V
Michael Ellerman writes: > It's easier to reason about the code if we only set mmu_slb_size in > one place, so convert open-coded assignments to use slb_set_size(). > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Michael Ellerman > --- > arch/powerpc/kernel/prom.c | 2 +- >

Re: [PATCH] powerpc/traps: fix recoverability of machine check handling on book3s/32

2019-01-23 Thread Nicholas Piggin
Christophe Leroy's on January 23, 2019 12:11 am: > Looks like book3s/32 doesn't set RI on machine check, so > checking RI before calling die() will always be fatal > allthought this is not an issue in most cases. Oh good catch, this is a fix for powerpc/64 as well. I think actually the panic was

Re: [PATCH 11/19] KVM: PPC: Book3S HV: add support for the XIVE native exploitation mode hcalls

2019-01-23 Thread Cédric Le Goater
On 1/23/19 7:44 AM, Benjamin Herrenschmidt wrote: > On Tue, 2019-01-22 at 16:23 +1100, Paul Mackerras wrote: >> >> Which ones of these could be implemented in QEMU? Are there any that >> can't possibly be implemented in QEMU because they need to do things >> that require calling internal

Re: [PATCH 2/2] selftests/powerpc: benchmarks/context_switch.c use vector instructions/types

2019-01-23 Thread Christophe Leroy
Hi Cyril, On 03/03/2016 11:06 PM, Cyril Bur wrote: Currently it doesn't appear the resulting binary actually uses any Altivec or VSX instructions the solution is to explicitly tell GCC to use vector instructions and use vector types in the code. Part of this this issue can be GCC version

Re: [PATCH 4/4] powerpc/64s: Support shrinking the SLB for debugging

2019-01-23 Thread Nicholas Piggin
Michael Ellerman's on January 19, 2019 8:27 pm: > Michal Suchánek writes: > >> On Thu, 17 Jan 2019 23:13:28 +1100 >> Michael Ellerman wrote: >> >>> On machines with 1TB segments and a 32-entry SLB it's quite hard to >>> cause sufficient SLB pressure to trigger bugs caused due to badly >>> timed

[PATCH -next] usb: host: drop pointless static qualifier

2019-01-23 Thread YueHaibing
There is no need to have the 'dummy_mask' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/usb/host/ehci-ps3.c | 2 +- drivers/usb/host/ohci-ps3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] powerpc/64s: Remove MSR_RI optimisation in system_call_exit()

2019-01-23 Thread Nicholas Piggin
Michael Ellerman's on January 17, 2019 9:35 pm: > Currently in system_call_exit() we have an optimisation where we > disable MSR_RI (recoverable interrupt) and MSR_EE (external interrupt > enable) in a single mtmsrd instruction. > > Unfortunately this will no longer work with THREAD_INFO_IN_TASK,

Re: [PATCH kernel] vfio-pci/nvlink2: Fix ancient gcc warnings

2019-01-23 Thread Geert Uytterhoeven
Hi Alex, On Wed, Jan 23, 2019 at 5:30 AM Alex Williamson wrote: > The below patch comes about from the build regressions and improvements > list you've sent out, but something doesn't add up that we'd be testing > with an old compiler where initialization with { 0 } generates a > "missing braces

Re: [PATCH] arch/powerpc/radix: Fix kernel crash with mremap

2019-01-23 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > With support for split pmd lock, we use pmd page pmd_huge_pte pointer to store > the deposited page table. In those config when we move page tables we need to > make sure we move the depoisted page table to the right pmd page. Otherwise > this > can result in crash