Re: [PATCH kernel] powerpc/npu: Do not try invalidating 32bit table when 64bit table is enabled

2018-03-14 Thread Alistair Popple
I must admit I haven't really looked at the iommu_table_group code in depth so don't fully understand it, but I was wondering why we don't hit this for NVLink1 as well? The error that Skiboot is printing is because the requested page size doesn't match expected so I guess there is a possibility

[PATCHv5 3/3] ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit.

2018-03-14 Thread Pingfan Liu
From: Mahesh Salgaonkar The kernel boot parameter 'nr_cpus=' allows one to specify number of possible cpus in the system. In the normal scenario the first cpu (cpu0) that shows up is the boot cpu and hence it gets covered under nr_cpus limit. But this assumption will

[PATCHv5 2/3] powerpc, cpu: handling the special case when boot_cpuid greater than nr_cpus

2018-03-14 Thread Pingfan Liu
For kexec -p, after boot_cpuid is mapping into the range of [0, threads_per_core), then if nr_cpus is small, we will have the bitmap [0,..., nr_cpus, ..., boot_cpuid, ...). This patch chooses cpus inside the range of [boot_cpuid - nr_cpus +1, ..., boot_cpuid] to be online. With this patch and the

[PATCHv5 1/3] powerpc, cpu: partially unbind the mapping between cpu logical id and its seq in dt

2018-03-14 Thread Pingfan Liu
For kexec -p, the boot cpu can be not the cpu0, this causes the problem to alloc paca[]. In theory, there is no requirement to assign cpu's logical id as its present seq by device tree. But we have something like cpu_first_thread_sibling(), which makes assumption on the mapping inside a core.

[PATCHv5 0/3] enable nr_cpus for powerpc

2018-03-14 Thread Pingfan Liu
This topic has a very long history. It comes from Mahesh Salgaonkar For v3: https://patchwork.ozlabs.org/patch/834860/ I hope we can acquire it for "kexec -p" soon. V4->V5: improve the [1/3] implementation based on Benjamin's suggestion. Mahesh Salgaonkar (1):

Re: [Y2038] [PATCH v4 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-14 Thread Deepa Dinamani
On Wed, Mar 14, 2018 at 1:52 PM, Arnd Bergmann wrote: > On Wed, Mar 14, 2018 at 4:50 AM, Deepa Dinamani > wrote: >> The file arch/arm64/kernel/process.c needs asm/compat.h also to be >> included directly since this is included conditionally from >>

[TESTS] Create 'enabled_flush_types' boot option, and short-circuit LPM

2018-03-14 Thread Mauricio Faria de Oliveira
fallback -> fallback: # dmesg -c | grep rfi-flush [0.00] rfi-flush (debug): enabled flush types: 0x0 [0.00] rfi-flush: fallback displacement flush available [0.00] rfi-flush: patched 8 locations (fallback displacement flush) # echo >

[PATCH v3 5/5] rfi-flush: Call setup_rfi_flush() after LPM migration

2018-03-14 Thread Mauricio Faria de Oliveira
From: Michael Ellerman We might have migrated to a machine that uses a different flush type, or doesn't need flushing at all. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira ---

[PATCH v3 4/5] rfi-flush: Differentiate enabled and patched flush types

2018-03-14 Thread Mauricio Faria de Oliveira
Currently the rfi-flush messages print 'Using flush' for all enabled_flush_types, but that is not necessarily true -- as now the fallback flush is always enabled on pseries, but the fixup function overwrites its nop/branch slot with other flush types, if available. So, replace the 'Using flush'

[PATCH v3 3/5] rfi-flush: Always enable fallback flush on pseries

2018-03-14 Thread Mauricio Faria de Oliveira
From: Michael Ellerman This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off-by: Michael Ellerman

[PATCH v3 2/5] rfi-flush: Make it possible to call setup_rfi_flush() again

2018-03-14 Thread Mauricio Faria de Oliveira
From: Michael Ellerman For PowerVM migration we want to be able to call setup_rfi_flush() again after we've migrated the partition. To support that we need to check that we're not trying to allocate the fallback flush area after memblock has gone away (i.e., boot-time

[PATCH v3 1/5] rfi-flush: Move the logic to avoid a redo into the debugfs code

2018-03-14 Thread Mauricio Faria de Oliveira
From: Michael Ellerman rfi_flush_enable() includes a check to see if we're already enabled (or disabled), and in that case does nothing. But that means calling setup_rfi_flush() a 2nd time doesn't actually work, which is a bit confusing. Move that check into the debugfs

[PATCH v3 0/5] Setup RFI flush after PowerVM LPM migration

2018-03-14 Thread Mauricio Faria de Oliveira
This patchset allows for setup_rfi_flush() to be called again after PowerVM LPM (live partition mobility) aka LPAR migration, in order to possibly switch to a different flush method. The patches are mostly from Michael Ellerman, I have rebased to powerpc/linux.git merge branch as of commit

Re: [RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-14 Thread Cédric Le Goater
On 03/14/2018 05:58 PM, Frederic Barrat wrote: > If a driver has called free_irq() but an irq is waiting in a queue, an > error is logged when a cpu processes it: > > irq 232, desc: 44e5941a, depth: 1, count: 9823, unhandled: 0 > ->handle_irq(): 23f2e352, >

Re: [PATCH] powerpc: Use common error handling code in setup_new_fdt()

2018-03-14 Thread Thiago Jung Bauermann
SF Markus Elfring writes: > From: Markus Elfring > Date: Sun, 11 Mar 2018 09:03:42 +0100 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. > > This issue was detected by

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes Augusto Nunes do Rosário
On 03/14/2018 03:55 PM, Bjorn Helgaas wrote: As far as I'm concerned, we can just remove these messages completely. I don't think there's any real value there. After I found out that this was happening to all PCI devices on powerpc due to the __weak pcibios_default_alignment() interface

[PATCH, pci, v2] pci: Delete PCI disabling informational messages

2018-03-14 Thread Desnes A. Nunes do Rosario
The disabling informational messages on the PCI subsystem should be deleted since they do not represent any real value for the system logs. These messages are either not presented, or presented for all PCI devices (e.g., powerpc now realigns all PCI devices to its page size). Thus, they are

[PATCH v3] powerpc: treat pkey-0 special

2018-03-14 Thread Ram Pai
Applications need the ability to associate an address-range with some key and latter revert to its initial default key. Pkey-0 comes close to providing this function but falls short, because the current implementation disallows applications to explicitly associate pkey-0 to the address range.

[PATCH v3] x86: treat pkey-0 special

2018-03-14 Thread Ram Pai
Applications need the ability to associate an address-range with some key and latter revert to its initial default key. Pkey-0 comes close to providing this function but falls short, because the current implementation disallows applications to explicitly associate pkey-0 to the address range.

Re: [Y2038] [PATCH v4 02/10] include: Move compat_timespec/ timeval to compat_time.h

2018-03-14 Thread Arnd Bergmann
On Wed, Mar 14, 2018 at 4:50 AM, Deepa Dinamani wrote: > The file arch/arm64/kernel/process.c needs asm/compat.h also to be > included directly since this is included conditionally from > include/compat.h. This does seem to be typical of arm64 as I was not > completely

Re: [GIT PULL] Please pull JSON files for POWR9 PMU events

2018-03-14 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 13, 2018 at 03:46:47PM -0700, Sukadev Bhattiprolu escreveu: > > Hi Arnaldo, > > Please pull an update to the JSON files for POWER9 PMU events. Can you please be a bit more verbose in the next pull requets, something like describing what is the nature of this specific pull request,

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 11:54 AM, Ram Pai wrote: >>> (e) it bypasses key-permission checks when assigned. >> I don't think this is necessary. I think the only rule we *need* is: >> >> pkey-0 is allocated implicitly at execve() time. You do not >> need to call pkey_alloc() to allocate it. > And

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Ram Pai
On Wed, Mar 14, 2018 at 10:51:26AM -0700, Dave Hansen wrote: > On 03/14/2018 10:14 AM, Ram Pai wrote: > > I look at key-0 as 'the key'. It has special status. > > (a) It always exist. > > Do you mean "is always allocated"? always allocated and cannot be freed. Hence always exists. If we let it

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Bjorn Helgaas
On Wed, Mar 14, 2018 at 03:22:44PM -0300, Desnes Augusto Nunes do Rosário wrote: > Hello Bjorn, > > On 03/14/2018 03:06 PM, Bjorn Helgaas wrote: > > On Wed, Mar 14, 2018 at 01:34:54PM -0300, Desnes A. Nunes do Rosario wrote: > > > Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to

Re: [PATCH 0/5] DPAA Ethernet fixes

2018-03-14 Thread Joakim Tjernlund
On Wed, 2018-03-14 at 08:37 -0500, Madalin Bucur wrote: > Hi, > > This patch set is addressing several issues in the DPAA Ethernet > driver suite: > > - module unload crash caused by wrong reference to device being left >in the cleanup code after the DSA related changes > - scheduling wile

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes Augusto Nunes do Rosário
Hello Bjorn, On 03/14/2018 03:06 PM, Bjorn Helgaas wrote: On Wed, Mar 14, 2018 at 01:34:54PM -0300, Desnes A. Nunes do Rosario wrote: Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to silent PCI realignment messages if the flag is turned on by a driver. Signed-off-by: Desnes

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes Augusto Nunes do Rosário
Hello Andy, On 03/14/2018 02:41 PM, Andy Shevchenko wrote: On Wed, Mar 14, 2018 at 6:34 PM, Desnes A. Nunes do Rosario wrote: Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to silent PCI realignment messages if the flag is turned on by a driver.

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Bjorn Helgaas
On Wed, Mar 14, 2018 at 01:34:54PM -0300, Desnes A. Nunes do Rosario wrote: > Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to > silent PCI realignment messages if the flag is turned on by a driver. > > Signed-off-by: Desnes A. Nunes do Rosario > ---

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 10:14 AM, Ram Pai wrote: > I look at key-0 as 'the key'. It has special status. > (a) It always exist. Do you mean "is always allocated"? > (b) it cannot be freed. This is the one I'm questioning. > (c) it is assigned by default. I agree on this totally. :) > (d) its

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Andy Shevchenko
On Wed, Mar 14, 2018 at 7:41 PM, Andy Shevchenko wrote: > I would rather name it _NO_PCI_REALIGN_MSG I meant _NO_REALIGN_MSG of course (PCI is already at the beginning). -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Andy Shevchenko
On Wed, Mar 14, 2018 at 6:34 PM, Desnes A. Nunes do Rosario wrote: > Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to > silent PCI realignment messages if the flag is turned on by a driver. It doesn't explain "Why?" Why the driver needs that?

Re: [PATCH 0/5] DPAA Ethernet fixes

2018-03-14 Thread David Miller
From: Madalin Bucur Date: Wed, 14 Mar 2018 08:37:27 -0500 > This patch set is addressing several issues in the DPAA Ethernet > driver suite: > > - module unload crash caused by wrong reference to device being left >in the cleanup code after the DSA related changes >

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Ram Pai
On Wed, Mar 14, 2018 at 07:19:23AM -0700, Dave Hansen wrote: > On 03/14/2018 12:46 AM, Ram Pai wrote: > > Once an address range is associated with an allocated pkey, it cannot be > > reverted back to key-0. There is no valid reason for the above behavior. On > > the contrary applications need the

[PATCH] powerpc/xive: Fix wrong xmon output caused by typo

2018-03-14 Thread Frederic Barrat
Signed-off-by: Frederic Barrat --- arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 40c06110821c..3459015092fa 100644 ---

[RFC] powerpc/xive: Remove irq from queue when it is shutdown

2018-03-14 Thread Frederic Barrat
If a driver has called free_irq() but an irq is waiting in a queue, an error is logged when a cpu processes it: irq 232, desc: 44e5941a, depth: 1, count: 9823, unhandled: 0 ->handle_irq(): 23f2e352, handle_bad_irq+0x0/0x2e0 ->irq_data.chip(): 7fd7bf50,

Re: [RESEND PATCH] Input: joystick/analog - Use get_cycles() on PPC

2018-03-14 Thread Dmitry Torokhov
On Wed, Mar 14, 2018 at 10:17:52PM +1100, Michael Ellerman wrote: > The analog joystick driver spits a warning at us: > > drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer > not defined for this architecture. > > PPC has get_cycles() so use that. > > Signed-off-by:

[PATCH 2/2, powerpc/powernv] powerpc/powernv: Tweak PCI_DEV_FLAGS_QUIET_PCI_REALIGN on/off during boot

2018-03-14 Thread Desnes A. Nunes do Rosario
Turn on PCI_DEV_FLAGS_QUIET_PCI_REALIGN flag on powernv's pci driver to silent PCI realignment messages through a early stage hook, and turn it off right before the pci device is enabled with a final stage hook. Fixes: 38274637699 ("powerpc/powernv: Override pcibios_default_alignment() to force

[PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Desnes A. Nunes do Rosario
Add PCI_DEV_FLAGS_QUIET_PCI_REALIGN to pci_dev_flags and use it to silent PCI realignment messages if the flag is turned on by a driver. Signed-off-by: Desnes A. Nunes do Rosario --- drivers/pci/pci.c | 3 ++- drivers/pci/setup-res.c | 3 ++-

[PATCH 0/2] Silent PCI realignment messages during boot

2018-03-14 Thread Desnes A. Nunes do Rosario
This patchset introduces PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute in pci_dev_flags which informs the pci subsystem to suppress all realignment messages. Powerpc has aligned all of its PCI resources to its PAGE_SIZE, and this feature can be easily used on any other arch through the __weak

Re: [PATCH 44/47] tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers

2018-03-14 Thread Greg Kroah-Hartman
On Wed, Mar 14, 2018 at 04:35:57PM +0100, Arnd Bergmann wrote: > The blackfin architecture is getting removed, so these drivers > are not needed any more. > > Signed-off-by: Arnd Bergmann > --- > drivers/tty/Kconfig | 13 -- > drivers/tty/Makefile| 1 -

Re: [PATCH 45/47] tty: hvc: remove tile driver

2018-03-14 Thread Greg Kroah-Hartman
On Wed, Mar 14, 2018 at 04:35:58PM +0100, Arnd Bergmann wrote: > The Tile architecture is obsolete and getting removed from the kernel, > this removes the corresponding console driver as well. > > Signed-off-by: Arnd Bergmann > --- > drivers/tty/hvc/Makefile | 1 - >

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-03-14 Thread Laurent Dufour
On 14/03/2018 09:48, Peter Zijlstra wrote: > On Tue, Mar 13, 2018 at 06:59:47PM +0100, Laurent Dufour wrote: >> This change is inspired by the Peter's proposal patch [1] which was >> protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in >> that particular case, and it is

Re: [PATCH v5 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion

2018-03-14 Thread Arnd Bergmann
On Wed, Mar 14, 2018 at 5:03 AM, Deepa Dinamani wrote: > The series is a preparation series for individual architectures > to use 64 bit time_t syscalls in compat and 32 bit emulation modes. > > This is a follow up to the series Arnd Bergmann posted: >

[PATCH 44/47] tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers

2018-03-14 Thread Arnd Bergmann
The blackfin architecture is getting removed, so these drivers are not needed any more. Signed-off-by: Arnd Bergmann --- drivers/tty/Kconfig | 13 -- drivers/tty/Makefile| 1 - drivers/tty/bfin_jtag_comm.c| 353

[PATCH 45/47] tty: hvc: remove tile driver

2018-03-14 Thread Arnd Bergmann
The Tile architecture is obsolete and getting removed from the kernel, this removes the corresponding console driver as well. Signed-off-by: Arnd Bergmann --- drivers/tty/hvc/Makefile | 1 - drivers/tty/hvc/hvc_tile.c | 196 - 2

Re: [PATCH 1/1 v2] x86: pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 12:46 AM, Ram Pai wrote: > Once an address range is associated with an allocated pkey, it cannot be > reverted back to key-0. There is no valid reason for the above behavior. On > the contrary applications need the ability to do so. I'm trying to remember why we cared in the first

Re: [PATCH] x86, powerpc : pkey-mprotect must allow pkey-0

2018-03-14 Thread Dave Hansen
On 03/14/2018 01:00 AM, Florian Weimer wrote: > ... but not the key which is used for PROT_EXEC emulation, which is still > reserved The PROT_EXEC key is dynamically allocated. There is no "the key".

[PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter

2018-03-14 Thread Madalin Bucur
From: Camelia Groza The tx_errors counter is incremented by the dpaa_xmit caller. Signed-off-by: Camelia Groza Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 - 1 file changed, 1

[PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed

2018-03-14 Thread Madalin Bucur
From: Camelia Groza Signed-off-by: Camelia Groza --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

[PATCH 3/5] dpaa_eth: remove duplicate initialization

2018-03-14 Thread Madalin Bucur
From: Camelia Groza The fd_format has already been initialized at this point. Signed-off-by: Camelia Groza --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 2/5] dpaa_eth: fix error in dpaa_remove()

2018-03-14 Thread Madalin Bucur
The recent changes that make the driver probing compatible with DSA were not propagated in the dpa_remove() function, breaking the module unload function. Using the proper device to address the issue. Signed-off-by: Madalin Bucur ---

[PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe()

2018-03-14 Thread Madalin Bucur
The wait_for_completion() call in qman_delete_cgr_safe() was triggering a scheduling while atomic bug, replacing the kthread with a smp_call_function_single() call to fix it. Signed-off-by: Madalin Bucur Signed-off-by: Roy Pledge ---

[PATCH 0/5] DPAA Ethernet fixes

2018-03-14 Thread Madalin Bucur
Hi, This patch set is addressing several issues in the DPAA Ethernet driver suite: - module unload crash caused by wrong reference to device being left in the cleanup code after the DSA related changes - scheduling wile atomic bug in QMan code revealed during dpaa_eth module unload - a

Re: [PATCH v9 00/24] Speculative page faults

2018-03-14 Thread Laurent Dufour
On 14/03/2018 14:11, Michal Hocko wrote: > On Tue 13-03-18 18:59:30, Laurent Dufour wrote: >> Changes since v8: >> - Don't check PMD when locking the pte when THP is disabled >>Thanks to Daniel Jordan for reporting this. >> - Rebase on 4.16 > > Is this really worth reposting the whole pile?

Re: [PATCH v9 00/24] Speculative page faults

2018-03-14 Thread Michal Hocko
On Tue 13-03-18 18:59:30, Laurent Dufour wrote: > Changes since v8: > - Don't check PMD when locking the pte when THP is disabled >Thanks to Daniel Jordan for reporting this. > - Rebase on 4.16 Is this really worth reposting the whole pile? I mean this is at v9, each doing little changes.

[RESEND PATCH] Input: joystick/analog - Use get_cycles() on PPC

2018-03-14 Thread Michael Ellerman
The analog joystick driver spits a warning at us: drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. PPC has get_cycles() so use that. Signed-off-by: Michael Ellerman --- drivers/input/joystick/analog.c | 2 +- 1

Re: [PATCH 04/21] powerpc: Mark both tmp variables as unused

2018-03-14 Thread Christophe LEROY
Le 25/02/2018 à 18:22, Mathieu Malaterre a écrit : Since the value of `tmp` is never intended to be read, declare both `tmp` variables as unused. Fix warning (treated as error in W=1): What about using fault_in_pages_readable() instead ? Christophe CC

Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’ not a constant

2018-03-14 Thread Abdul Haleem
gt; Machine Type: Power8 Baremetal > > gcc: 4.8.5 > > > > > > Builds fine when below patch is reverted > > c7c133f3 kernel.h: skip single-eval logic on literals in min()/max() > > Those patches have been removed from today's linux-next (next-20180314). -- Regard's Abdul Haleem IBM Linux Technology Centre

Re: PCI/hotplug: ppc: correct a php_slot usage after free

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 08:46:04 UTC, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > In pnv_php_unregister_one(), pnv_php_put_slot() might kfree > php_slot structure. But there is pci_hp_deregister() after > that with php_slot reference. > > This patch moves

Re: [1/4] powerpc/pseries: Move smp_query_cpu_stopped() etc. out of plpar_wrappers.h

2018-03-14 Thread Michael Ellerman
On Thu, 2018-03-08 at 02:54:39 UTC, Michael Ellerman wrote: > smp_query_cpu_stopped() and related #defines are currently in > plpar_wrappers.h. The function actually does an RTAS call, not an > hcall, and basically has nothing to do with plpar_wrappers.h > > Move it into pseries.h, where it can

Re: powerpc/powernv/mce: Don't silently restart the machine

2018-03-14 Thread Michael Ellerman
On Thu, 2018-03-08 at 00:36:06 UTC, Balbir Singh wrote: > On MCE the current code will restart the machine with > ppc_md.restart(). This case was extremely unlikely since > prior to that a skiboot call is made and that resulted in > a checkstop for analysis. > > With newer skiboots, on P9 we

Re: [v2] xmon: Setup xmon debugger hooks when first break-point is set

2018-03-14 Thread Michael Ellerman
On Sun, 2018-03-04 at 17:30:25 UTC, Vaibhav Jain wrote: > Presently sysrq key for xmon('x') is registered during kernel init > irrespective of the value of kernel param 'xmon'. Thus xmon is enabled > even if 'xmon=off' is passed on the kernel command line. However this > doesn't enable the kernel

Re: [v2, 01/10] powerpc/mm/slice: Simplify and optimise slice context initialisation

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 01:37:09 UTC, Nicholas Piggin wrote: > The slice state of an mm gets zeroed then initialised upon exec. > This is the only caller of slice_set_user_psize now, so that can be > removed and instead implement a faster and simplified approach that > requires no locking or

Re: selftests/powerpc: Skip tm-unavailable if TM is not enabled

2018-03-14 Thread Michael Ellerman
On Mon, 2018-03-05 at 20:48:55 UTC, Gustavo Romero wrote: > Some processor revisions do not support transactional memory, and > additionally kernel support can be disabled. In either case the > tm-unavailable test should be skipped, otherwise it will fail with > a SIGILL. > > That commit also

Re: xmon: Clear all breakpoints when xmon is disabled via debugfs

2018-03-14 Thread Michael Ellerman
On Sun, 2018-03-04 at 17:31:32 UTC, Vaibhav Jain wrote: > Presently when xmon is disabled by debugfs any existing > instruction/data-access breakpoints set are not disabled. This may > lead to kernel oops when those breakpoints are hit as the necessary > debugger hooks aren't installed. > > Hence

Re: [v2, 06/21] powerpc: Avoid comparison of unsigned long >= 0 in __access_ok

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 19:50:51 UTC, Mathieu Malaterre wrote: > Rewrite function-like macro into regular static inline function to avoid a > warning during macro expansion. > Fix warning (treated as error in W=1): > > CC arch/powerpc/kernel/signal_32.o > In file included from

Re: [v2, 05/21] powerpc: Avoid comparison of unsigned long >= 0 in pfn_valid

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 20:34:35 UTC, Mathieu Malaterre wrote: > Rewrite comparison since all values compared are of type `unsigned long`. > > Instead of using unsigned properties and rewriting the original code as: > (originally suggested by Segher Boessenkool ) > >

Re: powerpc/mm: Drop the function native_register_proc_table()

2018-03-14 Thread Michael Ellerman
On Sat, 2018-03-03 at 09:24:02 UTC, Anshuman Khandual wrote: > This is left over from the segment table implementation and not getting > called from any where now. Hence just drop it. > > Suggested-by: Aneesh Kumar K.V > Signed-off-by: Anshuman Khandual

Re: [v2,15/21] powerpc: Make function MMU_setup static

2018-03-14 Thread Michael Ellerman
On Wed, 2018-03-07 at 20:32:55 UTC, Mathieu Malaterre wrote: > Since function `MMU_setup` is not meant to be exported, change the > signature to `static`. Fix warning (treated as error with W=1): > > CC kernel/sys.o > arch/powerpc/mm/init_32.c:102:13: error: no previous prototype for >

Re: powerpc/8xx: fix cpm_cascade() dual end of interrupt

2018-03-14 Thread Michael Ellerman
On Tue, 2018-02-27 at 11:25:55 UTC, Christophe Leroy wrote: > cpm_cascade() doesn't have to call eoi() as it is already called > by handle_fasteoi_irq() > > And cpm_get_irq() will always return an unsigned int so the test > is useless > > Signed-off-by: Christophe Leroy

Re: [v2,01/21] powerpc: Remove warning on array size when empty

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 19:49:18 UTC, Mathieu Malaterre wrote: > When neither CONFIG_ALTIVEC, nor CONFIG_VSX or CONFIG_PPC64 is defined, the > array feature_properties is defined as an empty array, which in turn > triggers the following warning (treated as error on W=1): > > CC

Re: [v3] powerpc/npu-dma.c: Fix deadlock in mmio_invalidate

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 05:18:45 UTC, Alistair Popple wrote: > When sending TLB invalidates to the NPU we need to send extra flushes due > to a hardware issue. The original implementation would lock the all the > ATSD MMIO registers sequentially before unlocking and relocking each of > them

Re: [v10,1/2] powerpc/powernv: Enable tunneled operations

2018-03-14 Thread Michael Ellerman
On Fri, 2018-03-02 at 09:56:11 UTC, Philippe Bergheaud wrote: > P9 supports PCI tunneled operations (atomics and as_notify). This > patch adds support for tunneled operations on powernv, with a new > API, to be called by device drivers: > > pnv_pci_enable_tunnel() >Enable tunnel operations,

Re: [21/21] powerpc: Add missing prototypes in setup_32.c

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:36 UTC, Mathieu Malaterre wrote: > This commit add the prototypes for the following function: > > - early_init > - machine_init > - ppc_setup_l2cr > - ppc_setup_l3cr > - ppc_init > > the other missing ones were already added in setup.h previously. Fix the > following

Re: [08/21] powerpc: Make function __giveup_fpu static

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:23 UTC, Mathieu Malaterre wrote: > When CONFIG_PPC_FPU is defined the prototype exposed in asm/switch_to.h is: > > extern void giveup_fpu(struct task_struct *); > > Change the function prototype of __giveup_fpu to static. Fix warning > (treated as error in W=1): >

Re: [20/21] powerpc: Add missing prototypes for ppc_select & ppc_fadvise64_64

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:35 UTC, Mathieu Malaterre wrote: > Add missing prototypes for ppc_select & ppc_fadvise64_64 to header > asm-prototypes.h. Fix the following warnings (treated as errors in W=1) > > CC arch/powerpc/kernel/syscalls.o > arch/powerpc/kernel/syscalls.c:87:1: error: no

Re: [19/21] powerpc: Add missing prototypes for hw_breakpoint_handler & arch_unregister_hw_breakpoint

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:34 UTC, Mathieu Malaterre wrote: > In commit 5aae8a537080 ("powerpc, hw_breakpoints: Implement hw_breakpoints > for 64-bit server processors") function hw_breakpoint_handler and > arch_unregister_hw_breakpoint were added without function prototypes in > hw_breakpoint.h

Re: [17/21] powerpc: Add missing prototype for sys_debug_setcontext

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:32 UTC, Mathieu Malaterre wrote: > In commit 81e7009ea46c ("powerpc: merge ppc signal.c and ppc64 signal32.c") > the function sys_debug_setcontext was added without a prototype. > > Fix compilation warning (treated as error in W=1): > > CC

Re: [18/21] powerpc: Add missing prototypes for sys_sigreturn & sys_rt_sigreturn

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:33 UTC, Mathieu Malaterre wrote: > Two functions did not have a prototype defined in signal.h header. Fix the > following two warnings (treated as errors in W=1): > > CC arch/powerpc/kernel/signal_32.o > arch/powerpc/kernel/signal_32.c:1135:6: error: no previous

Re: [16/21] powerpc: Add missing prototype for init_IRQ

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:31 UTC, Mathieu Malaterre wrote: > A function init_IRQ was added without a prototype declared in header irq.h. > Fix the following warning (treated as error in W=1): > > CC arch/powerpc/kernel/irq.o > arch/powerpc/kernel/irq.c:662:13: error: no previous

Re: [13/21] powerpc: Add missing prototype for arch_dup_task_struct

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:28 UTC, Mathieu Malaterre wrote: > In commit 55ccf3fe3f9a ("fork: move the real prepare_to_copy() users to > arch_dup_task_struct()") a new arch_dup_task_struct was added without a > prototype declared in thread_info.h header. Fix the following warning > (treated as

Re: [14/21] powerpc: Add missing prototype for arch_irq_work_raise

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:29 UTC, Mathieu Malaterre wrote: > In commit 4f8b50bbbe63 ("irq_work, ppc: Fix up arch hooks") a new function > arch_irq_work_raise was added without a prototype in header irq_work.h. > > Fix the following warning (treated as error in W=1): > > CC

Re: [12/21] powerpc: Add missing prototype for time_init

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:27 UTC, Mathieu Malaterre wrote: > The function time_init did not have a prototype defined in the time.h > header. Fix the following warning (treated as error in W=1): > > CC arch/powerpc/kernel/time.o > arch/powerpc/kernel/time.c:1068:13: error: no previous

Re: [11/21] powerpc: Add missing prototype for hdec_interrupt

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:26 UTC, Mathieu Malaterre wrote: > In commit dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts > their own handler") an empty body function was added, but no prototype was > declared. Fix warning (treated as error in W=1): > > CC

Re: [10/21] powerpc: Add missing prototype for slb_miss_bad_addr

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:25 UTC, Mathieu Malaterre wrote: > In commit f0f558b131db ("powerpc/mm: Preserve CFAR value on SLB miss caused > by access to bogus address"), the function slb_miss_bad_addr was added > without a prototype. This commit adds it. > > Fix a warning (treated as error in

Re: [07/21] powerpc: Make functions flipper_pic_init & ug_udbg_putc static

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:22 UTC, Mathieu Malaterre wrote: > Change signature of two functions, adding static keyword to prevent the > following two warnings (treated as errors on W=1): > > CC kernel/sys.o > arch/powerpc/platforms/embedded6xx/flipper-pic.c:135:28: error: no previous >

Re: [04/21] powerpc: Mark both tmp variables as unused

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:19 UTC, Mathieu Malaterre wrote: > Since the value of `tmp` is never intended to be read, declare both `tmp` > variables as unused. Fix warning (treated as error in W=1): > > CC arch/powerpc/kernel/signal_32.o > arch/powerpc/kernel/signal_32.c: In function

Re: [02/21] powerpc: Move the inline keyword at the beginning of function declaration

2018-03-14 Thread Michael Ellerman
On Sun, 2018-02-25 at 17:22:17 UTC, Mathieu Malaterre wrote: > The inline keyword was not at the beginning of the function declaration. > Fix the following warning (treated as error in W=1) > > CC kernel/sys.o > arch/powerpc/lib/sstep.c:283:1: error: ‘inline’ is not at beginning of >

Re: [v2] cxl: Check if PSL data-cache is available before issue flush request

2018-03-14 Thread Michael Ellerman
On Thu, 2018-02-15 at 15:49:24 UTC, Vaibhav Jain wrote: > PSL9D doesn't have a data-cache that needs to be flushed before > resetting the card. However when cxl tries to flush data-cache on such > a card, it times-out as PSL_Control register never indicates flush > operation complete due to

Re: [v2] cxl: Remove function write_timebase_ctrl_psl9() for PSL9

2018-03-14 Thread Michael Ellerman
On Thu, 2018-02-15 at 06:19:36 UTC, Vaibhav Jain wrote: > For PSL9 the contents of PSL_TB_CTLSTAT register have changed in PSL9 > and all of the register is now readonly. Hence we don't need an sl_ops > implementation for 'write_timebase_ctrl' for to populate this register > for PSL9. > > Hence

Re: [v2] powerpc/via-pmu: Fix section mismatch warning

2018-03-14 Thread Michael Ellerman
On Wed, 2018-02-14 at 21:15:18 UTC, Mathieu Malaterre wrote: > Make the struct via_pmu_driver const to avoid following warning: > > WARNING: vmlinux.o(.data+0x4739c): Section mismatch in reference from the > variable via_pmu_driver to the function .init.text:pmu_init() > The variable

Re: cxl: Enable NORST bit in PSL_DEBUG register for PSL9

2018-03-14 Thread Michael Ellerman
On Fri, 2018-02-09 at 04:09:16 UTC, Vaibhav Jain wrote: > We enable the NORST bit by default for debug afu images to prevent > reset of AFU trace-data on a PCI link drop. For production AFU images > this bit is always ignored and PSL gets reconfigured anyways thereby > resetting the trace data. So

Re: powerpc/epapr: Move register keyword at the beginning of declaration

2018-03-14 Thread Michael Ellerman
On Wed, 2018-01-31 at 07:54:43 UTC, Mathieu Malaterre wrote: > Fix warning for all register unsigned long (0,3-12) that appear during W=1 > compilation: > > ./arch/powerpc/include/asm/epapr_hcalls.h:479:2: warning: ‘register’ is > not at beginning of declaration [-Wold-style-declaration] >

Re: [v2] macintosh: Add module license to ans-lcd

2018-03-14 Thread Michael Ellerman
On Tue, 2018-01-30 at 14:23:51 UTC, Larry Finger wrote: > In kernel 4.15, the modprobe step on my PowerBook G4 started complaining that > there was no module license for ans-lcd. > > Signed-off-by: Larry Finger Applied to powerpc next, thanks.

Re: [1/5] powerpc/vas: Remove a stray line in Makefile

2018-03-14 Thread Michael Ellerman
On Wed, 2018-01-17 at 02:50:39 UTC, Sukadev Bhattiprolu wrote: > Remove a bogus line from arch/powerpc/platforms/powernv/Makefile that > was added by commit ece4e51 ("powerpc/vas: Export HVWC to debugfs"). > > Signed-off-by: Sukadev Bhattiprolu Applied to powerpc

Re: [1/1] vas: vas_window_init_dbgdir: fix order of cleanup.

2018-03-14 Thread Michael Ellerman
On Wed, 2017-12-20 at 01:10:29 UTC, Sukadev Bhattiprolu wrote: > Fix the order of cleanup to ensure we free the name buffer in case > of an error creating 'hvwc' or 'info' files. > > Signed-off-by: Sukadev Bhattiprolu Applied to powerpc next, thanks.

Re: selftest/powerpc: Add test for sigreturn in transaction

2018-03-14 Thread Michael Ellerman
On Mon, 2016-08-22 at 16:53:02 UTC, Laurent Dufour wrote: > Ensure that kernel is throwing away the suspended transaction when > sigreturn() is called otherwise it if fails to restore the signal > frame's TM SPRS. > > Signed-off-by: Laurent Dufour > Reviewed-by: Cyril

Re: powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features

2018-03-14 Thread Michael Ellerman
On Tue, 2018-03-13 at 23:14:11 UTC, Michael Ellerman wrote: > When running virtualised the powerpc kernel is able to run the system > in "compat mode" - which means the kernel and hardware are pretending > to userspace that the CPU is an older version than it actually is. > > AT_BASE_PLATFORM is

Re: [PATCH v9 17/24] mm: Protect mm_rb tree with a rwlock

2018-03-14 Thread Peter Zijlstra
On Tue, Mar 13, 2018 at 06:59:47PM +0100, Laurent Dufour wrote: > This change is inspired by the Peter's proposal patch [1] which was > protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in > that particular case, and it is introducing major performance degradation > due to

Re: [linux-next][bisected c7c133f3][gcc 4.8.5] build fail with error: first argument to ‘__builtin_choose_expr’ not a constant

2018-03-14 Thread Stephen Rothwell
19: note: in expansion of macro ‘__max’ > #define max(x, y) __max(typeof(x), typeof(y), x, y) > > Machine Type: Power8 Baremetal > gcc: 4.8.5 > > > Builds fine when below patch is reverted > c7c133f3 kernel.h: skip single-eval logic on literals in min()/max() Those pa

  1   2   >