[PATCH] PCI/hotplug: Take two seconds as settlement time after power-on

2016-08-09 Thread Gavin Shan
The PCI adapter's firmware isn't fully functional when the PCIe bus link is up. 1.8 seconds are needed for the firmware to be completely functional according to the PCI bus settlement time (after reset) we have in EEH code (EEH_PE_RST_SETTLE_TIME). Without the delay, the driver fails to initialize

Re: [PATCH] fadump: Register the memory reserved by fadump

2016-08-09 Thread Michael Ellerman
Srikar Dronamraju writes: >> >> > Conceptually it would be cleaner, if expensive, to calculate the real >> > memblock reserves if HASH_EARLY and ditch the dma_reserve, memory_reserve >> > and nr_kernel_pages entirely. >> >> Why is it expensive? memblock tracks the totals for all memory and >> r

Re: [PATCH] powerpc: ptrace: tm_reclaim_current() in flush_tmregs_to_thread()

2016-08-09 Thread Michael Ellerman
Cyril Bur writes: > There was an assumption that flush_tmregs_to_thread() would only be > called for a task which is not current. And a warning could be shown > to indicate that current is being ptraced. > > In the event of a core dump the current threads state is needed. This > means that flush_

Re: [PATCH] fadump: Register the memory reserved by fadump

2016-08-09 Thread Srikar Dronamraju
> > > Conceptually it would be cleaner, if expensive, to calculate the real > > memblock reserves if HASH_EARLY and ditch the dma_reserve, memory_reserve > > and nr_kernel_pages entirely. > > Why is it expensive? memblock tracks the totals for all memory and > reserved memory AFAIK, so it should

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Ludovic Desroches
On Tue, Aug 09, 2016 at 01:36:17PM +0200, Wolfram Sang wrote: > The core will do this for us now. > > Signed-off-by: Wolfram Sang > --- [...] > drivers/i2c/busses/i2c-at91.c | 2 -- Acked-by: Ludovic Desroches [...] > diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses

Re: [PATCH] fadump: Register the memory reserved by fadump

2016-08-09 Thread Michael Ellerman
Mel Gorman writes: > On Fri, Aug 05, 2016 at 07:25:03PM +1000, Michael Ellerman wrote: >> > One way to do that would be to walk through the different memory >> > reserved blocks and calculate the size. But Mel feels thats an >> > overhead (from his reply to the other thread) esp for just one use

[PATCH] powerpc: ptrace: tm_reclaim_current() in flush_tmregs_to_thread()

2016-08-09 Thread Cyril Bur
There was an assumption that flush_tmregs_to_thread() would only be called for a task which is not current. And a warning could be shown to indicate that current is being ptraced. In the event of a core dump the current threads state is needed. This means that flush_tmregs_to_thread() must do its

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-09 Thread Alexey Kardashevskiy
On 09/08/16 22:16, Alex Williamson wrote: > On Tue, 9 Aug 2016 15:19:39 +1000 > Alexey Kardashevskiy wrote: > >> On 09/08/16 02:43, Alex Williamson wrote: >>> On Wed, 3 Aug 2016 18:40:55 +1000 >>> Alexey Kardashevskiy wrote: >>> This exports helpers which are needed to keep a VFIO conta

Re: 4.8.0-rc1: Invalid memory access at $SRR0: 0140f86c $SRR1: 00003030

2016-08-09 Thread Christian Kujau
On Wed, 10 Aug 2016, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > On Tue, 2016-08-09 at 02:06 -0700, Christian Kujau wrote: > >> On Mon, 8 Aug 2016, Christian Kujau wrote: > >> > > >> > while trying to upgrade this PowerBook G4 from 4.7-rc7 to 4.8-rc1, > >> > it's  > >> > unable t

Re: [PATCH] powerpc/Makefile: Use cflags-y/aflags-y for setting endian options

2016-08-09 Thread Michael Ellerman
Nicholas Piggin writes: > On Tue, 9 Aug 2016 22:43:46 +1000 > Michael Ellerman wrote: >> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> index ca254546cd05..1934707bf321 100644 >> --- a/arch/powerpc/Makefile >> +++ b/arch/powerpc/Makefile >> @@ -66,29 +66,28 @@ endif >> UTS_MACHI

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Thiago Jung Bauermann
Am Mittwoch, 10 August 2016, 13:41:08 schrieb Michael Ellerman: > Thiago Jung Bauermann writes: > > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > >> > Mimi Zohar writes: > >> > > +/* Some details preceding the binary s

Re: 4.8.0-rc1: Invalid memory access at $SRR0: 0140f86c $SRR1: 00003030

2016-08-09 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Tue, 2016-08-09 at 02:06 -0700, Christian Kujau wrote: >> On Mon, 8 Aug 2016, Christian Kujau wrote: >> > >> > while trying to upgrade this PowerBook G4 from 4.7-rc7 to 4.8-rc1, >> > it's  >> > unable to boot the Yaboot (v1.3.16 from Debian/stable) boot loader

Re: [PATCH v2 2/2] powerpc: update pci_controller.refcount for PCI devices and buses

2016-08-09 Thread Andrew Donnellan
On 10/08/16 10:44, Mauricio Faria de Oliveira wrote: This patch employs the refcount in struct pci_controller to track the references from PCI devices and buses (struct pci_dev/pci_bus). In order to do that without modifying any PCI scan/probe approach (e.g., PCI_PROBE_DEVTREE and PCI_PROBE_NORM

Re: [PATCH v3] powerpc: Do not make the entire heap executable

2016-08-09 Thread Michael Ellerman
Denys Vlasenko writes: > On 32-bit powerps the ELF PLT sections of binaries (built with --bss-plt, > or with a toolchain which defaults to it) look like this: ... > > arch/powerpc/include/asm/page.h| 10 +- > arch/powerpc/include/asm/page_32.h | 2 -- > arch/powerpc/include/asm/page

Re: [PATCH] cpufreq: powernv: Fix crash in gpstate_timer_handler

2016-08-09 Thread Michael Ellerman
Viresh Kumar writes: > On 04-08-16, 20:59, Akshay Adiga wrote: >> 'commit 09ca4c9b5958 ("cpufreq: powernv: Replacing pstate_id with >> frequency table index")' changes calc_global_pstate() to use >> cpufreq_table index instead of pstate_id. >> >> But in gpstate_timer_handler() pstate_id was bein

RE: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Zhang, Sonic
For i2c-bfin-twi.c Acked-by: Sonic Zhang Sonic -Original Message- From: Neil Horman [mailto:nhor...@tuxdriver.com] Sent: Tuesday, August 09, 2016 8:55 PM To: Wolfram Sang Cc: linux-ker...@vger.kernel.org; linux-...@vger.kernel.org; Jean Delvare; Wolfram Sang; Ludovic Desroches; Ray Ju

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: >> On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: >> > Mimi Zohar writes: >> > > diff --git a/security/integrity/ima/ima.h >> > > b/security/integrity/ima/ima.h >> > > index b5728da..84e8d36 100

Re: [PATCH v2 1/2] powerpc: add refcount to struct pci_controller

2016-08-09 Thread Andrew Donnellan
On 10/08/16 10:44, Mauricio Faria de Oliveira wrote: This commit introduces the 'refcount' field in struct pci_controller, along with the corresponding functions 'controller_(get|put|free)()'. The functions 'pcibios_(alloc|free)_controller()' are modified to use that in a backwards compatible ma

Re: 4.8.0-rc1: Invalid memory access at $SRR0: 0140f86c $SRR1: 00003030

2016-08-09 Thread Christian Kujau
On Tue, 9 Aug 2016, Benjamin Herrenschmidt wrote: > On Tue, 2016-08-09 at 02:06 -0700, Christian Kujau wrote: > > On Mon, 8 Aug 2016, Christian Kujau wrote: > > > > > > while trying to upgrade this PowerBook G4 from 4.7-rc7 to 4.8-rc1, > > > it's  > > > unable to boot the Yaboot (v1.3.16 from Debi

Re: [PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-08-09 Thread Nicholas Piggin
On Tue, 9 Aug 2016 11:47:37 -0700 Andrey Smirnov wrote: > On Sun, Jul 31, 2016 at 9:03 PM, Nicholas Piggin wrote: > > On Thu, 28 Jul 2016 16:07:18 -0700 > > Andrey Smirnov wrote: > > > >> Convert fsl_rstcr_restart into a function to be registered with > >> register_reset_handler(). > >> > >>

Re: [PATCH v2 1/3] powerpc: Factor out common code in setup-common.c

2016-08-09 Thread Nicholas Piggin
On Tue, 9 Aug 2016 09:30:54 -0700 Andrey Smirnov wrote: > On Sun, Jul 31, 2016 at 8:40 PM, Nicholas Piggin wrote: > > On Thu, 28 Jul 2016 16:07:16 -0700 > > Andrey Smirnov wrote: > > > >> Factor out a small bit of common code in machine_restart(), > >> machine_power_off() and machine_halt().

[PATCH v2 2/2] powerpc: update pci_controller.refcount for PCI devices and buses

2016-08-09 Thread Mauricio Faria de Oliveira
This patch employs the refcount in struct pci_controller to track the references from PCI devices and buses (struct pci_dev/pci_bus). In order to do that without modifying any PCI scan/probe approach (e.g., PCI_PROBE_DEVTREE and PCI_PROBE_NORMAL), it leverages some of the PCI arch-specific callbac

[PATCH v2 1/2] powerpc: add refcount to struct pci_controller

2016-08-09 Thread Mauricio Faria de Oliveira
This commit introduces the 'refcount' field in struct pci_controller, along with the corresponding functions 'controller_(get|put|free)()'. The functions 'pcibios_(alloc|free)_controller()' are modified to use that in a backwards compatible manner. (i.e., kfree(phb) is performed when pcibios_free_

[PATCH v2 0/2] powerpc: fix oops in pcibios_release_device() after pcibios_free_controller()

2016-08-09 Thread Mauricio Faria de Oliveira
This patchset addresses the problem/suggestion discussed previously [1], by adding a kref reference counting to the PHB (struct pci_controller): > It's possible to hit an oops/crash if pcibios_release_device() accesses the > phb struct and it had been freed earlier -- by pcibios_free_controller()

Re: [PATCH 2/5] kbuild: allow archs to select build for link dead code/data elimination

2016-08-09 Thread Andi Kleen
On Wed, Aug 10, 2016 at 12:29:29AM +0200, Arnd Bergmann wrote: > On Monday, August 8, 2016 8:16:05 PM CEST Andi Kleen wrote: > > > I don't understand what led Andi Kleen to also move .text.hot and > > > .text.unlikely together with .text [2], but this may have > > > been a related issue. > > > > >

[PATCH 6/6] cxlflash: Update documentation

2016-08-09 Thread Matthew R. Ochs
Update the block library link in the API documentation. Signed-off-by: Matthew R. Ochs --- Documentation/powerpc/cxlflash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/powerpc/cxlflash.txt b/Documentation/powerpc/cxlflash.txt index f4c1190..6d9a2ed 100644

[PATCH 5/6] cxlflash: Remove adapter file descriptor cache

2016-08-09 Thread Matthew R. Ochs
The adapter file descriptor was previously cached within the kernel for a given context in order to support performing a close on behalf of an application. This is no longer needed as applications are now required to perform a close on the adapter file descriptor. Inspired-by: Al Viro Signed-off-

[PATCH 4/6] cxlflash: Transition to application close model

2016-08-09 Thread Matthew R. Ochs
Caching the adapter file descriptor and performing a close on behalf of an application is a poor design. This is due to the fact that once a file descriptor in installed, it is free to be altered without the knowledge of the cxlflash driver. This can lead to inconsistencies between the application

[PATCH 3/6] cxlflash: Add kref to context

2016-08-09 Thread Matthew R. Ochs
Currently, context user references are tracked via the list of LUNs that have attached to the context. While convenient, this is not intuitive without a deep study of the code and is inconsistent with the existing reference tracking patterns within the kernel. This design choice can lead to future

[PATCH 2/6] cxlflash: Cache owning adapter within context

2016-08-09 Thread Matthew R. Ochs
The context removal routine requires access to the owning adapter structure to reset the context within the AFU as part of the tear down sequence. In order to support kref adoption, the owning adapter must be accessible from the release handler. As the kref framework only provides the kref referenc

[PATCH 1/6] cxlflash: Avoid mutex when destroying context

2016-08-09 Thread Matthew R. Ochs
Context information structures are protected by a mutex that is held when accessing/manipulating the context. When the code that manages these structures was authored, a decision was made to include taking the mutex as part of the allocation/initialization sequence and also handle the scenario wher

[PATCH 0/6] cxlflash: Improvements and cleanup

2016-08-09 Thread Matthew R. Ochs
This patch set contains various code improvements and cleanups that were inspired by Al Viro upon reviewing the cxlflash driver. The core improvement is that the driver will no longer cache the adapter file descriptor associated with a context. This results in a user API change that is documented a

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Samuel Mendoza-Jonas
On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > > > > Mimi Zohar writes: > > > > > > > > diff --git a/security/integrity/ima/ima.h > > > > b/secur

Re: [PATCH 2/5] kbuild: allow archs to select build for link dead code/data elimination

2016-08-09 Thread Andi Kleen
On Wed, Aug 10, 2016 at 12:29:29AM +0200, Arnd Bergmann wrote: > On Monday, August 8, 2016 8:16:05 PM CEST Andi Kleen wrote: > > > I don't understand what led Andi Kleen to also move .text.hot and > > > .text.unlikely together with .text [2], but this may have > > > been a related issue. > > > > >

Re: [PATCH v3] powerpc: Do not make the entire heap executable

2016-08-09 Thread Kees Cook
On Tue, Aug 9, 2016 at 12:08 PM, Denys Vlasenko wrote: > On 32-bit powerps the ELF PLT sections of binaries (built with --bss-plt, Typo: powerps -> powerpc > or with a toolchain which defaults to it) look like this: > > [17] .sbss NOBITS 0002aff8 01aff8 14 00 WA 0

Re: [PATCH 2/5] kbuild: allow archs to select build for link dead code/data elimination

2016-08-09 Thread Arnd Bergmann
On Monday, August 8, 2016 8:16:05 PM CEST Andi Kleen wrote: > > I don't understand what led Andi Kleen to also move .text.hot and > > .text.unlikely together with .text [2], but this may have > > been a related issue. > > > > [2] https://lkml.org/lkml/2015/7/19/377 > > The goal was just to move .ho

Re: [PATCH 2/5] kbuild: allow archs to select build for link dead code/data elimination

2016-08-09 Thread Arnd Bergmann
On Tuesday, August 9, 2016 9:20:16 AM CEST Alan Modra wrote: > On Mon, Aug 08, 2016 at 05:14:27PM +0200, Arnd Bergmann wrote: > > I have reverted that patch now, so ARM uses ".fixup" again like every > > other architecture does, and now "*(.fixup) *(.text .text.*)" works > > correctly, while ""*(.f

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Joachim Eastwood
On 9 August 2016 at 13:36, Wolfram Sang wrote: > Since v4.8-rc1, the I2C core will print detailed information when adding an > I2C > adapter fails. So, drivers can skip this now. > > I am still undecided if I apply this as a single patch or break it out. But > for > reviewing, avoiding the patch

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Ray Jui
Hi Wolfram, On 8/9/2016 4:36 AM, Wolfram Sang wrote: The core will do this for us now. Signed-off-by: Wolfram Sang [...] diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 19c843828fe2ca..8e3477f9297eda 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.

[PATCH v3] powerpc: Do not make the entire heap executable

2016-08-09 Thread Denys Vlasenko
On 32-bit powerps the ELF PLT sections of binaries (built with --bss-plt, or with a toolchain which defaults to it) look like this: [17] .sbss NOBITS 0002aff8 01aff8 14 00 WA 0 0 4 [18] .plt NOBITS 0002b00c 01aff8 84 00 WAX 0 0 4 [1

Re: [PATCH v2] powerpc: Do not make the entire heap executable

2016-08-09 Thread Denys Vlasenko
On 08/08/2016 09:07 PM, Kees Cook wrote: On Mon, Aug 8, 2016 at 7:55 AM, Denys Vlasenko wrote: On 32-bit powerps the ELF PLT sections of binaries (built with --bss-plt, or with a toolchain which defaults to it) look like this: [17] .sbss NOBITS 0002aff8 01aff8 14 0

Re: [PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-08-09 Thread Andrey Smirnov
On Sun, Jul 31, 2016 at 9:03 PM, Nicholas Piggin wrote: > On Thu, 28 Jul 2016 16:07:18 -0700 > Andrey Smirnov wrote: > >> Convert fsl_rstcr_restart into a function to be registered with >> register_reset_handler(). >> >> Signed-off-by: Andrey Smirnov >> --- >> >> Changes since v1: >> >> -

Re: [PATCH v2 2/3] powerpc: Call chained reset handlers during reset

2016-08-09 Thread Andrey Smirnov
On Sun, Jul 31, 2016 at 8:47 PM, Nicholas Piggin wrote: > On Thu, 28 Jul 2016 16:07:17 -0700 > Andrey Smirnov wrote: > >> Call out to all restart handlers that were added via >> register_restart_handler() API when restarting the machine. >> >> Signed-off-by: Andrey Smirnov >> --- >> >> No change

Re: [PATCH 2/2] powerpc/pseries: Dynamically increase RMA size

2016-08-09 Thread Sukadev Bhattiprolu
Paul Clarke [p...@us.ibm.com] wrote: > Only nits from me...(see below) Paul, I agree with your comments and fixed them. Here is the updated patch. --- >From f9e9e8460206bc3fa7eaa741b9a2bde22870b9e0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Aug 2016 23:13:37 -0400 Subject: [PATCH 2/2] po

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Vladimir Zapolskiy
On 09.08.2016 14:36, Wolfram Sang wrote: > The core will do this for us now. > > Signed-off-by: Wolfram Sang > --- For > drivers/i2c/busses/i2c-pnx.c| 4 +--- [snip] > diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c > index 7ea67aa46fb730..fd5f9d2bf6d94e

Re: [PATCH v2 1/3] powerpc: Factor out common code in setup-common.c

2016-08-09 Thread Andrey Smirnov
On Sun, Jul 31, 2016 at 8:40 PM, Nicholas Piggin wrote: > On Thu, 28 Jul 2016 16:07:16 -0700 > Andrey Smirnov wrote: > >> Factor out a small bit of common code in machine_restart(), >> machine_power_off() and machine_halt(). >> >> Signed-off-by: Andrey Smirnov >> --- >> >> No changes compared to

Re: [PATCH] cxl: Set psl_fir_cntl to production environment value

2016-08-09 Thread Uma Krishnan
Reviewed-by: Uma Krishnan On 8/8/2016 4:57 AM, Frederic Barrat wrote: Switch the setting of psl_fir_cntl from debug to production environment recommended value. It mostly affects the PSL behavior when an error is raised in psl_fir1/2. Tested with cxlflash. Signed-off-by: Frederic Barrat ---

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Wolfram Sang
> >@@ -550,15 +550,10 @@ static int uniphier_fi2c_probe(struct platform_device > >*pdev) > > } > > > > ret = i2c_add_adapter(&priv->adap); > >-if (ret) { > >-dev_err(dev, "failed to add I2C adapter\n"); > >-goto err; > >-} > >- > >-err: > > if (ret) > >

Re: [PATCH] powerpc/Makefile: Use cflags-y/aflags-y for setting endian options

2016-08-09 Thread Nicholas Piggin
On Tue, 9 Aug 2016 22:43:46 +1000 Michael Ellerman wrote: > When we introduced the little endian support, we added the endian flags > to CC directly using override. I don't know the history of why we did > that, I suspect no one does. > > Although this mostly works, it has one bug, which is tha

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 09:55 -0400, Mimi Zohar wrote: > On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > > Mimi Zohar writes: > > > > > diff --git a/se

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 13:35 +, David Laight wrote: > Also why '__packed' - guarantees sub-optimal code generation. > Much better to include explicit padding to align everything. This patch set does not define a new format, but piggy backs on top of the existing /ima/binary_runtime_measurement

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 10:19 -0300, Thiago Jung Bauermann wrote: > Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > > Mimi Zohar writes: > > > > diff --git a/security/integrity/ima/ima.h > > > > b/security/integrity/ima/ima

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Wolfram Sang
On Tue, Aug 09, 2016 at 01:57:40PM +0200, Uwe Kleine-König wrote: > Hello Wolfram, > > On Tue, Aug 09, 2016 at 01:36:17PM +0200, Wolfram Sang wrote: > > The core will do this for us now. > > Would be nice to point out the relevant commit that changed the core in > the commit log. I agree, but it

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Neil Horman
On Tue, Aug 09, 2016 at 01:36:17PM +0200, Wolfram Sang wrote: > The core will do this for us now. > > Signed-off-by: Wolfram Sang > --- > drivers/i2c/busses/i2c-amd756.c | 5 + > drivers/i2c/busses/i2c-at91.c | 2 -- > drivers/i2c/busses/i2c-axxia.c | 8 +--- >

RE: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread David Laight
From: Thiago Jung Bauermann > Sent: 09 August 2016 14:19 ... > > > > +/* Some details preceding the binary serialized measurement list */ > > > > +struct ima_kexec_hdr { > > > > + unsigned short version; > > > > + unsigned long buffer_size; > > > > + unsigned long count; > > > > +

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Grygorii Strashko
On 08/09/2016 02:36 PM, Wolfram Sang wrote: The core will do this for us now. Signed-off-by: Wolfram Sang --- For: drivers/i2c/busses/i2c-davinci.c| 4 +--- drivers/i2c/busses/i2c-omap.c | 4 +--- Reviewed-by: Grygorii Strashko -- regards, -grygorii

[PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Wolfram Sang
Since v4.8-rc1, the I2C core will print detailed information when adding an I2C adapter fails. So, drivers can skip this now. I am still undecided if I apply this as a single patch or break it out. But for reviewing, avoiding the patch bomb is probably a good thing. Should go via subsystem tree,

[PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Wolfram Sang
The core will do this for us now. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-amd756.c | 5 + drivers/i2c/busses/i2c-at91.c | 2 -- drivers/i2c/busses/i2c-axxia.c | 8 +--- drivers/i2c/busses/i2c-bcm-iproc.c | 8 +--- drivers/i2c/busses/i2c-

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Guenter Roeck
On 08/09/2016 04:36 AM, Wolfram Sang wrote: The core will do this for us now. Signed-off-by: Wolfram Sang --- [ ... ] diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index aeead0d27d1007..64318e69089439 100644 --- a/drivers/i2c/busses/i2c-uniphier-f.c

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Thiago Jung Bauermann
Am Dienstag, 09 August 2016, 09:01:13 schrieb Mimi Zohar: > On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > > Mimi Zohar writes: > > > diff --git a/security/integrity/ima/ima.h > > > b/security/integrity/ima/ima.h > > > index b5728da..84e8d36 100644 > > > --- a/security/integrity/ima/

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 20:59 +1000, Michael Ellerman wrote: > Mimi Zohar writes: > > > diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h > > index b5728da..84e8d36 100644 > > --- a/security/integrity/ima/ima.h > > +++ b/security/integrity/ima/ima.h > > @@ -102,6 +102,13 @@ s

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Thierry Reding
On Tue, Aug 09, 2016 at 01:36:17PM +0200, Wolfram Sang wrote: [...] > diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c > index b126dbaa47e370..d9979da11485ae 100644 > --- a/drivers/i2c/busses/i2c-tegra.c > +++ b/drivers/i2c/busses/i2c-tegra.c > @@ -932,10 +932,8 @@ stati

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Heiko Stübner
Am Dienstag, 9. August 2016, 13:36:17 schrieb Wolfram Sang: > The core will do this for us now. > > Signed-off-by: Wolfram Sang > --- [...] > diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c > index 2bc8b01153d619..3b87afe82f6394 100644 > --- a/drivers/i2c/busses/i2c-r

[PATCH] powerpc/Makefile: Use cflags-y/aflags-y for setting endian options

2016-08-09 Thread Michael Ellerman
When we introduced the little endian support, we added the endian flags to CC directly using override. I don't know the history of why we did that, I suspect no one does. Although this mostly works, it has one bug, which is that CROSS32CC doesn't get -mbig-endian. That means when the compiler is l

Re: [PATCH 0/7] ima: carry the measurement list across kexec

2016-08-09 Thread Mimi Zohar
On Tue, 2016-08-09 at 15:19 +1000, Balbir Singh wrote: > > On 04/08/16 22:24, Mimi Zohar wrote: > > The TPM PCRs are only reset on a hard reboot. In order to validate a > > TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list > > of the running kernel must be saved and then re

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Uwe Kleine-König
Hello Wolfram, On Tue, Aug 09, 2016 at 01:36:17PM +0200, Wolfram Sang wrote: > The core will do this for us now. Would be nice to point out the relevant commit that changed the core in the commit log. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König

Re: [PATCH kernel 14/15] vfio/spapr_tce: Export container API for external users

2016-08-09 Thread Alex Williamson
On Tue, 9 Aug 2016 15:19:39 +1000 Alexey Kardashevskiy wrote: > On 09/08/16 02:43, Alex Williamson wrote: > > On Wed, 3 Aug 2016 18:40:55 +1000 > > Alexey Kardashevskiy wrote: > > > >> This exports helpers which are needed to keep a VFIO container in > >> memory while there are external user

Re: 4.8.0-rc1: Invalid memory access at $SRR0: 0140f86c $SRR1: 00003030

2016-08-09 Thread Benjamin Herrenschmidt
On Tue, 2016-08-09 at 02:06 -0700, Christian Kujau wrote: > On Mon, 8 Aug 2016, Christian Kujau wrote: > > > > while trying to upgrade this PowerBook G4 from 4.7-rc7 to 4.8-rc1, > > it's  > > unable to boot the Yaboot (v1.3.16 from Debian/stable) boot loader: There should already be a fix for tha

Re: [PATCH] i2c: don't print error when adding adapter fails

2016-08-09 Thread Peter Korsgaard
> "Wolfram" == Wolfram Sang writes: > The core will do this for us now. > Signed-off-by: Wolfram Sang > --- > drivers/i2c/busses/i2c-ocores.c | 4 +--- For i2c-ocores.c: Acked-by: Peter Korsgaard -- Bye, Peter Korsgaard

Re: powerpc/eeh: trivial fix to non-conventional PCI address output on EEH log

2016-08-09 Thread Michael Ellerman
On Fri, 2016-22-07 at 17:05:29 UTC, "Guilherme G. Piccoli" wrote: > This is a very minor/trivial fix for the output of PCI address on EEH logs. > The PCI address on "OF node" field currently is using ":" as a separator > for the function, but the usual separator is ".". This patch changes the > sep

Re: powerpc/xics: Properly set Edge/Level type and enable resend

2016-08-09 Thread Michael Ellerman
On Tue, 2016-02-08 at 02:39:43 UTC, Benjamin Herrenschmidt wrote: > This sets the type of the interrupt appropriately. We set it as follow: > > - If not mapped from the device-tree, we use edge. This is the case > of the virtual interrupts and PCI MSIs for example. > > - If mapped from the devi

Re: ppc/cell: missing error code in spufs_mkgang()

2016-08-09 Thread Michael Ellerman
On Thu, 2016-04-08 at 05:37:03 UTC, Dan Carpenter wrote: > We should return -ENOMEM if alloc_spu_gang() fails. > > Signed-off-by: Dan Carpenter > Acked-by: Arnd Bergmann Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/54a94fcf2f00c9deb9491d5ab2 cheers

Re: powerpc: vdso: Add missing include file

2016-08-09 Thread Michael Ellerman
On Sat, 2016-06-08 at 22:54:12 UTC, Guenter Roeck wrote: > Some powerpc builds fail with the following buld error. > > In file included from ./arch/powerpc/include/asm/mmu_context.h:11:0, > from arch/powerpc/kernel/vdso.c:28: > arch/powerpc/include/asm/cputhreads.h: In function 'g

Re: powerpc: Fix unused function warning 'lmb_to_memblock'

2016-08-09 Thread Michael Ellerman
On Mon, 2016-01-08 at 06:32:51 UTC, Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch fixes the following warning: > arch/powerpc/platforms/pseries/hotplug-memory.c:323:29: error: > 'lmb_to_memblock' defined but not used [-Werror=unused-function] > static struct memory_block *lmb_t

Re: powernv: Load correct TOC pointer while waking up from winkle.

2016-08-09 Thread Michael Ellerman
On Fri, 2016-05-08 at 13:43:12 UTC, Mahesh Salgaonkar wrote: > From: Mahesh Salgaonkar > > The function pnv_restore_hyp_resource() loads the TOC into r2 from > the invalid PACA pointer before fixing r13 value. This do not affect > POWER ISA 3.0 but it does have an impact on POWER ISA 2.07 or less

Re: pasemi: Fix coherent_dma_mask for dma engine

2016-08-09 Thread Michael Ellerman
On Wed, 2016-27-07 at 14:41:29 UTC, Darren Stevens wrote: > Commit 817820b0226a ("powerpc/iommu: Support "hybrid" iommu/direct DMA > ops for coherent_mask < dma_mask) adds a check of coherent_dma_mask > for dma allocations. > Unfortunately current PASemi code does not set this value for

Re: [kernel, 04/15] powerpc/powernv/ioda: Fix TCE invalidate to work in real mode again

2016-08-09 Thread Michael Ellerman
On Wed, 2016-03-08 at 08:40:45 UTC, Alexey Kardashevskiy wrote: > "powerpc/powernv/pci: Rework accessing the TCE invalidate register" > broke TCE invalidation on IODA2/PHB3 for real mode. > > This makes invalidate work again. > > Fixes: fd141d1a99a3 > Signed-off-by: Alexey Kardashevskiy Applied

Re: powerpc/pci: Fix endian bug in fixed PHB numbering

2016-08-09 Thread Michael Ellerman
On Tue, 2016-09-08 at 06:55:41 UTC, Michael Ellerman wrote: > The recent commit 63a72284b159 ("powerpc/pci: Assign fixed PHB number > based on device-tree properties"), added code to read a 64-bit property > from the device tree, and if not found read a 32-bit property (reg). > > There was a bug i

Re: [v2] cxl: Use fixed width predefined types in data structure.

2016-08-09 Thread Michael Ellerman
On Fri, 2016-05-08 at 12:02:00 UTC, Philippe Bergheaud wrote: > This patch fixes a regression introduced by commit b810253. > > It substitutes the type __u8 to u8 in the uapi header cxl.h, > because the latter is not always defined in userland build > environments, in particular when cross-compili

Re: cxl: fix sparse warnings

2016-08-09 Thread Michael Ellerman
On Fri, 2016-22-07 at 09:01:36 UTC, Andrew Donnellan wrote: > Make native_irq_wait() static and use NULL rather than 0 to initialise > phb->cfg_data in cxl_pci_vphb_add() to remove sparse warnings. > > Signed-off-by: Andrew Donnellan > Reviewed-by: Matthew R. Ochs > Acked-by: Ian Munsie Applie

Re: cxl: fix NULL dereference in cxl_context_init() on PowerVM guests

2016-08-09 Thread Michael Ellerman
On Thu, 2016-28-07 at 05:39:41 UTC, Andrew Donnellan wrote: > Commit f67a6722d650 ("cxl: Workaround PE=0 hardware limitation in Mellanox > CX4") added a "min_pe" field to struct cxl_service_layer_ops, to allow us > to work around a Mellanox CX-4 hardware limitation. > > When allocating the PE numb

Re: crypto: crc32c-vpmsum - Convert to CPU feature based module autoloading

2016-08-09 Thread Michael Ellerman
On Thu, 2016-04-08 at 06:38:15 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > This patch utilises the GENERIC_CPU_AUTOPROBE infrastructure > to automatically load the crc32c-vpmsum module if the CPU supports > it. > > Signed-off-by: Anton Blanchard Applied to powerpc fixes, thanks. h

Re: [v3, 2/2] powernv: Fix MCE handler to avoid trashing CR0/CR1 registers.

2016-08-09 Thread Michael Ellerman
On Fri, 2016-05-08 at 12:04:13 UTC, Mahesh Salgaonkar wrote: > From: Mahesh Salgaonkar > > The current implementation of MCE early handling modifies CR0/1 registers > without saving its old values. Fix this by moving early check for > powersaving mode to machine_check_handle_early(). > > The pow

Re: [v3,1/2] powernv: Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h

2016-08-09 Thread Michael Ellerman
On Fri, 2016-05-08 at 12:04:04 UTC, Mahesh Salgaonkar wrote: > From: Mahesh Salgaonkar > > Move IDLE_STATE_ENTER_SEQ macro to cpuidle.h so that MCE handler changes > in subsequent patch can use it. > > No functionality change. > > Signed-off-by: Mahesh Salgaonkar Applied to powerpc fixes, tha

Re: [PATCH] powerpc/pci: Only do fixed PHB numbering on powernv

2016-08-09 Thread Guilherme G. Piccoli
On 08/09/2016 01:44 AM, Michael Ellerman wrote: "Guilherme G. Piccoli" writes: On 08/08/2016 09:32 PM, Michael Ellerman wrote: "Guilherme G. Piccoli" writes: (i) What is the specific issue? Do you have some logs or at least a "high-level" description of the problem in Xorg? I took a look

Re: [PATCH] cxl: Set psl_fir_cntl to production environment value

2016-08-09 Thread Frederic Barrat
Le 09/08/2016 à 12:53, Michael Ellerman a écrit : Frederic Barrat writes: Switch the setting of psl_fir_cntl from debug to production environment recommended value. It mostly affects the PSL behavior when an error is raised in psl_fir1/2. Tested with cxlflash. Is this a fix you want in rc

Re: [PATCH 1/7] ima: on soft reboot, restore the measurement list

2016-08-09 Thread Michael Ellerman
Mimi Zohar writes: > diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h > index b5728da..84e8d36 100644 > --- a/security/integrity/ima/ima.h > +++ b/security/integrity/ima/ima.h > @@ -102,6 +102,13 @@ struct ima_queue_entry { > }; > extern struct list_head ima_measurements

Re: [PATCH] cxl: Set psl_fir_cntl to production environment value

2016-08-09 Thread Michael Ellerman
Frederic Barrat writes: > Switch the setting of psl_fir_cntl from debug to production > environment recommended value. It mostly affects the PSL behavior when > an error is raised in psl_fir1/2. > > Tested with cxlflash. Is this a fix you want in rc1, or something for 4.9 ? cheers

Re: [PATCH] powerpc/64be: must build vdso32 as BE on LE host

2016-08-09 Thread Michael Ellerman
Nicholas Piggin writes: > vdso32 should be built with `gcc -m32 --big-endian` when compiling a big > endian kernel. I think I have a better solution. Patch coming RSN. cheers

Re: [PATCH] powerpc: rebuild vdsos correctly

2016-08-09 Thread Michael Ellerman
Nicholas Piggin writes: > On Tue, 09 Aug 2016 14:49:25 +1000 > Michael Ellerman wrote: > >> Nicholas Piggin writes: >> >> > diff --git a/arch/powerpc/kernel/vdso32/Makefile >> > b/arch/powerpc/kernel/vdso32/Makefile >> > index cbabd14..ae1f245 100644 >> > --- a/arch/powerpc/kernel/vdso32/Make

[PATCH stable 4.6 4/4] powerpc/tm: Avoid SLB faults in treclaim/trecheckpoint when RI=0

2016-08-09 Thread Michael Ellerman
From: Michael Neuling commit 190ce8693c23eae09ba5f303a83bf2fbeb6478b1 upstream. Currently we have 2 segments that are bolted for the kernel linear mapping (ie 0xc000... addresses). This is 0 to 1TB and also the kernel stacks. Anything accessed outside of these regions may need to be faulted in.

[PATCH stable 4.6 3/4] powerpc/eeh: Fix wrong argument passed to eeh_rmv_device()

2016-08-09 Thread Michael Ellerman
From: Gavin Shan commit cca0e542e02e48cce541a49c4046ec094ec27c1e upstream. When calling eeh_rmv_device() in eeh_reset_device() for partial hotplug case, @rmv_data instead of its address is the proper argument. Otherwise, the stack frame is corrupted when writing to @rmv_data (actually its addres

[PATCH stable 4.6 2/4] powerpc/bpf/jit: Disable classic BPF JIT on ppc64le

2016-08-09 Thread Michael Ellerman
From: "Naveen N. Rao" commit 844e3be47693f92a108cb1fb3b0606bf25e9c7a6 upstream. Backport required due to rename of HAVE_BPF_JIT to HAVE_CBPF_JIT upstream - mpe. Classic BPF JIT was never ported completely to work on little endian powerpc. However, it can be enabled and will crash the system whe

[PATCH stable 4.6 1/4] powerpc/eeh: Fix invalid cached PE primary bus

2016-08-09 Thread Michael Ellerman
From: Gavin Shan commit a3aa256b7258b3d19f8b44557cc64525a993b941 upstream. Backport required due to rename of pcibios_add_pci_devices() to pci_hp_add_devices() upstream - mpe. The PE primary bus cannot be got from its child devices when having full hotplug in error recovery. The PE primary bus

[PATCH stable 4.6 0/4] powerpc patches for 4.6 stable

2016-08-09 Thread Michael Ellerman
This is the set of patches I have so far tagged for 4.6 stable. Please let me know if any of these *shouldn't* go to stable. Gavin Shan (2): powerpc/eeh: Fix invalid cached PE primary bus powerpc/eeh: Fix wrong argument passed to eeh_rmv_device() Michael Neuling (1): powerpc/tm: Avoid SLB

Re: [PATCH v2] crypto: powerpc - CRYPT_CRC32C_VPMSUM should depend on ALTIVEC

2016-08-09 Thread Herbert Xu
On Tue, Aug 09, 2016 at 08:46:15AM +1000, Michael Ellerman wrote: > The optimised crc32c implementation depends on VMX (aka. Altivec) > instructions, so the kernel must be built with Altivec support in order > for the crc32c code to build. > > Fixes: 6dd7a82cc54e ("crypto: powerpc - Add POWER8 opt

Re: 4.8.0-rc1: Invalid memory access at $SRR0: 0140f86c $SRR1: 00003030

2016-08-09 Thread Christian Kujau
On Mon, 8 Aug 2016, Christian Kujau wrote: > while trying to upgrade this PowerBook G4 from 4.7-rc7 to 4.8-rc1, it's > unable to boot the Yaboot (v1.3.16 from Debian/stable) boot loader: > > > copying OF device tree... > Building dt