Re: [PATCH v3 2/9] kexec_file: Generalize kexec_add_buffer.

2016-07-04 Thread Dave Young
On 07/01/16 at 05:31pm, Thiago Jung Bauermann wrote: > Am Freitag, 01 Juli 2016, 17:02:23 schrieb Thiago Jung Bauermann: > > Am Freitag, 01 Juli 2016, 14:36:02 schrieb Dave Young: > > > On 07/01/16 at 02:51pm, Thiago Jung Bauermann wrote: > > > > Am Donnerstag, 30 Juni 2016, 17:43:57 schrieb Dave

Re: powerpc/mm: Add a parameter to disable 1TB segs

2016-07-04 Thread Michael Neuling
On Mon, 2016-07-04 at 16:09 +1000, Michael Ellerman wrote: > On Mon, 2016-04-07 at 00:44:04 UTC, Oliver O'Halloran wrote: > > > > This patch adds the kernel command line parameter "no_tb_segs" which > > forces the kernel to use 256MB rather than 1TB segments. Forcing the > > use > > of 256MB

Re: powerpc/mm: Add a parameter to disable 1TB segs

2016-07-04 Thread oliver
On Tue, Jul 5, 2016 at 10:24 AM, Michael Neuling wrote: > On Mon, 2016-07-04 at 16:09 +1000, Michael Ellerman wrote: >> On Mon, 2016-04-07 at 00:44:04 UTC, Oliver O'Halloran wrote: >> > >> > This patch adds the kernel command line parameter "no_tb_segs" which >> > forces the

[PATCH] powerpc: fix oops in pcibios_release_device() after pcibios_free_controller()

2016-07-04 Thread Mauricio Faria de Oliveira
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() -- as the memory it pointed to can be reused. If after reuse 'phb->controller_ops.release_device' is non-NULL it will be called, but it points to an

[PATCH v2] powerpc/mm: Add a parameter to disable 1TB segs

2016-07-04 Thread Oliver O'Halloran
This patch adds the kernel command line parameter "no_tb_segs" which forces the kernel to use 256MB rather than 1TB segments. Forcing the use of 256MB segments makes it considerably easier to test code that depends on an SLB miss occurring. Suggested-by: Michael Neuling

Re: [PATCH 1/2] qe/ic: move qe_ic_init from platforms to irqchip

2016-07-04 Thread Jason Cooper
Hi Zhao Qiang, Please reword your subject line to conform to the standard in irqchip (since that's where the code is added). Also, please adjust the subject line to express *why* the change is being made. On Tue, Jul 05, 2016 at 09:46:58AM +0800, Zhao Qiang wrote: > The codes of qe_ic_init in

Re: [PATCH 04/14] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-04 Thread Andrew Donnellan
On 04/07/16 23:22, Ian Munsie wrote: From: Ian Munsie The Mellanox CX4 uses a model where the AFU is one physical function of the device, and is used by other peer physical functions of the same device. This will require those other devices to grab a reference on the AFU

Re: [PATCH 5/6] powerpc/perf: Power9 PMU support

2016-07-04 Thread Michael Neuling
On Sun, 2016-06-26 at 23:07 +0530, Madhavan Srinivasan wrote: > There is still identical code here between power8 and power9. Any reason you can't merge these too?  The two bhrb functions seem to be the same. Mikey > This patch adds base enablement for the power9 PMU. > > Signed-off-by:

[PATCH 2/2] qe/ic: refactor qe_ic to simplify

2016-07-04 Thread Zhao Qiang
there are init_qe_ic_sysfs and qeic_of_init, refactor them. Signed-off-by: Zhao Qiang --- drivers/irqchip/qe_ic.c| 83 +- include/soc/fsl/qe/qe_ic.h | 7 2 files changed, 45 insertions(+), 45 deletions(-) diff --git

Re: [PATCH V2] powerpc/mm: Add validation for platform reserved memory ranges

2016-07-04 Thread Michael Ellerman
Anshuman Khandual writes: > For partition running on PHYP, there can be a adjunct partition > which shares the virtual address range with the operating system. > Virtual address ranges which can be used by the adjunct partition > are communicated with virtual device

Re: [PATCH 5/6] powerpc/perf: Power9 PMU support

2016-07-04 Thread Madhavan Srinivasan
On Tuesday 05 July 2016 06:30 AM, Michael Neuling wrote: > On Sun, 2016-06-26 at 23:07 +0530, Madhavan Srinivasan wrote: > > There is still identical code here between power8 and power9. Any reason > you can't merge these too? The two bhrb functions seem to be the same. In PowerISA v3.0, more

Re: [PATCH v2] cxl: Refine slice error debug messages

2016-07-04 Thread Ian Munsie
I agree with Mikey - this needs a description. But otherwise it looks good to me, and I'll be happy if it stops any more AFU developers from reporting their bugs to us, so happy to add this now: Acked-by: Ian Munsie Excerpts from Philippe Bergheaud's message of 2016-07-04

Re: [PATCH] perf/core: Fix the mask in perf_output_sample_regs

2016-07-04 Thread Arnaldo Carvalho de Melo
Em Mon, Jul 04, 2016 at 10:19:06AM +0300, Yury Norov escreveu: > On Sun, Jul 03, 2016 at 11:31:58PM +0530, Madhavan Srinivasan wrote: > > When decoding the perf_regs mask in perf_output_sample_regs(), > > we loop through the mask using find_first_bit and find_next_bit functions. > > While the

Re: [PATCH 12/14] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-04 Thread Gavin Shan
On Mon, Jul 04, 2016 at 11:22:10PM +1000, Ian Munsie wrote: >From: Andrew Donnellan > >The cxl driver will use infrastructure from pnv_php to handle device tree >updates when switching bi-modal CAPI cards into CAPI mode. > >To enable this, export pnv_php_find_slot()

Re: [PATCH] powerpc: fix oops in pcibios_release_device() after pcibios_free_controller()

2016-07-04 Thread Benjamin Herrenschmidt
On Mon, 2016-07-04 at 22:44 -0300, Mauricio Faria de Oliveira wrote: > 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() -- > as the memory it pointed to can be reused. > > If after reuse

Re: [PATCH v2] cxl: Refine slice error debug messages

2016-07-04 Thread Michael Neuling
This needs a description.  How are you "refining it? Mikey On Mon, 2016-07-04 at 17:07 +0200, Philippe Bergheaud wrote: > Signed-off-by: Philippe Bergheaud > --- > Changes since v1: >   - Rebased on Ian's patch > "cxl: Abstract the differences between the PSL and

Re: [PATCH v3 3/4] perf annotate: add powerpc support

2016-07-04 Thread Ravi Bangoria
Hi Michael, On Friday 01 July 2016 02:13 PM, Ravi Bangoria wrote: Thanks Michael for your suggestion. On Thursday 30 June 2016 11:51 AM, Michael Ellerman wrote: On Thu, 2016-06-30 at 11:44 +0530, Ravi Bangoria wrote: diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index

Re: [PATCH 12/14] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-04 Thread Andrew Donnellan
On 05/07/16 10:03, Gavin Shan wrote: Andrew/Ian, it seems HOTPLUG_PCI_POWERNV_BASE isn't defined and we needn't it. Argh, thanks for picking that up! I removed that option and all its occurrences in the code based on your earlier private feedback but forgot to drop this. Will fix in V2.

[PATCH 1/2] qe/ic: move qe_ic_init from platforms to irqchip

2016-07-04 Thread Zhao Qiang
The codes of qe_ic_init in platforms are redundant, move them to qe_ic under irqchip Signed-off-by: Zhao Qiang --- arch/powerpc/platforms/83xx/misc.c| 15 --- arch/powerpc/platforms/85xx/corenet_generic.c | 9 -

Re: [RFC] arm64: kexec_file_load support

2016-07-04 Thread Dave Young
On 07/04/16 at 03:58pm, AKASHI Takahiro wrote: > Hi, > > On Fri, Jul 01, 2016 at 12:46:31PM -0300, Thiago Jung Bauermann wrote: > > Am Freitag, 01 Juli 2016, 14:11:12 schrieb AKASHI Takahiro: > > > I'm not sure whether there is any demand for kexec_file_load > > > support on arm64, but anyhow I'm

[PATCH] powerpc/pci: Fix build with PCI_IOV=y and EEH=n

2016-07-04 Thread Michael Ellerman
Despite attempting to fix this in commit fb36e9073693 ("powerpc/pci: Fix SRIOV not building without EEH enabled"), the build is still broken when PCI_IOV=y and EEH=n (eg. g5_defconfig with PCI_IOV=y): arch/powerpc/kernel/pci_dn.c: In function ‘remove_dev_pci_data’:

[PATCH 28/41] powerpc/85xx/mpc85xx_rdb: Don't use the flat device-tree after boot

2016-07-04 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 3f4dad1..761e504 100644

Re: [PATCH] powerpc/pci: Fix build with PCI_IOV=y and EEH=n

2016-07-04 Thread Benjamin Herrenschmidt
On Tue, 2016-07-05 at 14:30 +1000, Russell Currey wrote: > On Tue, 2016-07-05 at 14:13 +1000, Michael Ellerman wrote: > > Despite attempting to fix this in commit fb36e9073693 > ("powerpc/pci: Fix > > SRIOV not building without EEH enabled"), the build is still broken > when > > PCI_IOV=y and

[PATCH 26/41] powerpc/85xx/ge_imp3a: Don't use the flat device-tree after boot

2016-07-04 Thread Benjamin Herrenschmidt
ge_imp3a_pic_init() is called way beyond the unflattening of the tree, it shouldn't be using of_flat_dt_* Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/85xx/ge_imp3a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 10/41] powerpc: Add comment explaining the purpose of setup_kdump_trampoline()

2016-07-04 Thread Benjamin Herrenschmidt
Anything in early_setup() needs to be justified to be there, in this case, we need the trampolines before we can take exceptions and thus before we turn on the MMU. Also remove a pretty meaningless and misplaced debug message Signed-off-by: Benjamin Herrenschmidt ---

[PATCH 09/41] powerpc: Update obsolete comments in setup_32.c about entry conditions

2016-07-04 Thread Benjamin Herrenschmidt
early_init() is called in-place before kernel relocation and using whatever MMU setup exists at the point the kernel is entered. machine_init() is called after relocation and after some initial mapping of PAGE_OFFSET has been established (typically using BATs on 6xx/7xx/7xxx processors or some

[PATCH 07/41] powerpc: Move 64-bit memory reserves to setup_arch()

2016-07-04 Thread Benjamin Herrenschmidt
There is really no need to do them that early, early_setup() runs before MMU is on, we should do the strict minimum there to get the MMU going. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 22 +++--- 1 file changed, 11

[PATCH 24/41] powerpc: Move 64-bit probe_machine() to later in the boot process

2016-07-04 Thread Benjamin Herrenschmidt
We no long need the machine type that early, so we can move probe_machine() to after the device-tree has been expanded. This will allow further consolidation. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 6 +++---

[PATCH 21/41] powerpc/pmac: Remove spurrious machine type test

2016-07-04 Thread Benjamin Herrenschmidt
pmac_declare_of_platform_devices() is already a machine initcall, thus it won't be called on a non-powermac machine. Testing for chrp there is pointless. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/powermac/setup.c | 3 --- 1 file changed, 3

[PATCH 38/41] powerpc: Merge 32-bit and 64-bit setup_arch()

2016-07-04 Thread Benjamin Herrenschmidt
There is little enough differences now. Use a few __weak stubs for functions that may not be around in order to avoid too many ifdefs. Signed-off-by: Benjamin Herrenschmidt --- v2. Fix include problems with kvm_ppc.h on some CPU archs v3. Give up on fixing include

[PATCH 39/41] powerpc/mm: Fix build of Book3E/64 with 64K pages

2016-07-04 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/nohash/64/pgtable-64k.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/nohash/64/pgtable-64k.h b/arch/powerpc/include/asm/nohash/64/pgtable-64k.h index 570fb30..9083245

Re: [2/2] tty/hvc: Use opal irqchip interface if available

2016-07-04 Thread Michael Ellerman
On Tue, 2016-28-06 at 03:11:39 UTC, Sam Mendoza-Jonas wrote: > diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c > index b7cd0ae..8c53f5b 100644 > --- a/drivers/tty/hvc/hvc_opal.c > +++ b/drivers/tty/hvc/hvc_opal.c > @@ -214,7 +216,15 @@ static int hvc_opal_probe(struct

[PATCH 27/41] powerpc/85xx/mpc85xx_ds: Don't use the flat device-tree after boot

2016-07-04 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index f858306..64a7e8c 100644

[PATCH 13/41] powerpc: Put exception configuration in a common place

2016-07-04 Thread Benjamin Herrenschmidt
The various calls to establish exception endianness and AIL are now done from a single point using already established CPU and FW feature bits to decide what to do. Signed-off-by: Benjamin Herrenschmidt --- v3: Rework a bit, move error handling in the functions

[PATCH 37/41] powerpc/64: Make a few boot functions __init

2016-07-04 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index bb1b65e..46787d9 100644 ---

Re: [PATCH 2/2] qe/ic: refactor qe_ic to simplify

2016-07-04 Thread Jason Cooper
Hi Zhao Qiang, Same comment as previous patch regarding the subject line. On Tue, Jul 05, 2016 at 09:46:59AM +0800, Zhao Qiang wrote: > there are init_qe_ic_sysfs and qeic_of_init, refactor > them. Same comment from previous patch about commit log. > > Signed-off-by: Zhao Qiang

[PATCH 36/41] powerpc: Re-order setup_panic()

2016-07-04 Thread Benjamin Herrenschmidt
Do it right after probe_machine() since it's about testing ppc_md, and put the test in the common code. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 2 ++ arch/powerpc/kernel/setup_32.c | 5 ++--- arch/powerpc/kernel/setup_64.c

Re: [v2,1/2] refactor code parsing size based on memory range

2016-07-04 Thread Michael Ellerman
> On 06/24/2016 10:56 AM, Michael Ellerman wrote: >> On Wed, 2016-22-06 at 19:25:26 UTC, Hari Bathini wrote: ... > While the code is moved to kernel/params.c file, there is no change in logic > for crashkernel parameter parsing as the moved code is invoked with function > calls at appropriate

[PATCH 1/3] spapr: Disable ibm, pa-features HTM bit

2016-07-04 Thread Sam Bobroff
There are a few issues with our handling of the ibm,pa-features HTM bit: - We don't support transactional memory in PR KVM, so don't tell the OS that we do. - In full emulation we have a minimal implementation of HTM that always fails, so for performance reasons lets not tell the OS that we

[PATCH v2 00/41] Reorganize setup code and merge 32 and 64-bit setup_arch()

2016-07-04 Thread Benjamin Herrenschmidt
This series reorganizes the setup code, moving probe_machine() later than when it's currently done, and sync'ing 32-bit and 64-bit enough to merge their implementations of setup_arch(). We get rid of ppc64 setup_system() which is subsumed by the new setup_arch(). Note: The first 2 patches could

[PATCH 02/41] drm: Fix broken use of _PAGE_NO_CACHE on powerpc

2016-07-04 Thread Benjamin Herrenschmidt
That constant no longer exist. Use the proper accessor instead Signed-off-by: Benjamin Herrenschmidt --- drivers/gpu/drm/drm_memory.c | 2 +- drivers/gpu/drm/drm_scatter.c | 2 +- drivers/gpu/drm/drm_vm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 17/41] powerpc/mm/hash: Don't use machine_is() early during boot

2016-07-04 Thread Benjamin Herrenschmidt
Use the device-tree instead as we'll be moving probe_machine() out of early_setup Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/mm/hash_utils_64.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git

[PATCH 18/41] powerpc/rtas: Don't test for machine type in rtas_initialize()

2016-07-04 Thread Benjamin Herrenschmidt
The test is unnecessary, the FW_FEATURE_LPAR is sufficient as there exist no other LPAR type that has RTAS. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 30/41] powerpc: Get rid of ppc_md.init_early()

2016-07-04 Thread Benjamin Herrenschmidt
It is now called right after platform probe, so the probe function can just do the job. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/machdep.h| 1 - arch/powerpc/kernel/setup_32.c| 3 ---

[PATCH 25/41] powerpc/cell: Don't use flat device-tree after boot

2016-07-04 Thread Benjamin Herrenschmidt
Some bit of SPU code was using the FDT rather than the expanded device-tree. Fix it. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/cell/spu_manage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 41/41] powerpc: Fix build with CONFIG_MEMORY_HOTPLUG on some configs

2016-07-04 Thread Benjamin Herrenschmidt
For memory hotplug to work, the MMU code needs to provide the functions create_section_mapping() and remove_section_mapping() to respectively map and unmap portions of the linear mapping. At the moment only hash64 provides these, so we provide weak stubs that just error out. This fixes the build

Re: [PATCH] powerpc/pci: Fix build with PCI_IOV=y and EEH=n

2016-07-04 Thread Russell Currey
On Tue, 2016-07-05 at 14:13 +1000, Michael Ellerman wrote: > Despite attempting to fix this in commit fb36e9073693 ("powerpc/pci: Fix > SRIOV not building without EEH enabled"), the build is still broken when > PCI_IOV=y and EEH=n (eg. g5_defconfig with PCI_IOV=y): > >  

[PATCH 29/41] powerpc: Move 32-bit probe() machine to later in the boot process

2016-07-04 Thread Benjamin Herrenschmidt
This converts all the 32-bit platforms to use the expanded device-tree which is a pretty mechanical change. Unlike 64-bit, the 32-bit kernel didn't rely on platform initializations to setup the MMU since it sets it up entirely before probe_machine() so the move has comparatively less consequences

[PATCH 32/41] powerpc/64: Move setting of {i, d}cache_bsize to initialize_cache_info()

2016-07-04 Thread Benjamin Herrenschmidt
Also remove the completely osbolete comment. We *do* look in the device-tree. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup_64.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c

[PATCH 2/3] Add KVM_CAP_PPC_HTM to linux/kvm.h

2016-07-04 Thread Sam Bobroff
Signed-off-by: Sam Bobroff --- linux-headers/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index e60e21b..37cb3e8 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -866,6

[PATCH 06/41] powerpc: Move 64-bit feature fixup earlier

2016-07-04 Thread Benjamin Herrenschmidt
Make it part of early_setup() as we really want the feature fixups to be applied before we turn on the MMU since they can have an impact on the various assembly path related to MMU management and interrupts. This makes 64-bit match what 32-bit does. Signed-off-by: Benjamin Herrenschmidt

[PATCH 05/41] powerpc: Factor do_feature_fixup calls

2016-07-04 Thread Benjamin Herrenschmidt
32 and 64-bit do a similar set of calls early on, we move it all to a single common function to make the boot code more readable. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/feature-fixups.h | 4 arch/powerpc/include/asm/synch.h |

[PATCH 19/41] powerpc: Don't test for machine type in smp_setup_cpu_maps()

2016-07-04 Thread Benjamin Herrenschmidt
The subsequent test for RTAS along with the LPAR test are sufficient Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup-common.c

[PATCH 04/41] powerpc: Make PTRRELOC() 32-bit only

2016-07-04 Thread Benjamin Herrenschmidt
PTRRELOC is only used by 32-bit code since on 32-bit systems, early_init can be run with relocation off and running at an offset. Define it to identity on 64-bit Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/setup.h | 4 1 file changed, 4

[PATCH 01/41] dt: Add of_device_compatible_match()

2016-07-04 Thread Benjamin Herrenschmidt
This provides an equivalent of of_fdt_match() for non-flat trees. This is more practical than matching an array of of_device_id structs when converting a bunch of existing users of of_fdt_match(). Signed-off-by: Benjamin Herrenschmidt --- drivers/of/base.c | 22

[PATCH 15/41] powerpc/64: Move MMU backend selection out of platform code

2016-07-04 Thread Benjamin Herrenschmidt
We move it into early_mmu_init() based on firmware features. For PS3, we have to move the setting of these into early_init_devtree(). Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/ps3.h | 2 ++ arch/powerpc/kernel/prom.c | 7

[PATCH 36/41] powerpc: Re-order setup_panic()

2016-07-04 Thread Benjamin Herrenschmidt
Do it right after probe_machine() since it's about testing ppc_md, and put the test in the common code. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 2 ++ arch/powerpc/kernel/setup_32.c | 5 ++--- arch/powerpc/kernel/setup_64.c

[PATCH 35/41] powerpc: Re-order the call to smp_setup_cpu_maps()

2016-07-04 Thread Benjamin Herrenschmidt
It makes more sense to do it before intializing xmon() as xmon might use the info in there. We do want to register the console early though in case we want some functioning printk's in the cpu map setup. Signed-off-by: Benjamin Herrenschmidt ---

[PATCH 3/3] spapr: Set ibm, pa-features HTM from KVM_CAP_PPC_HTM

2016-07-04 Thread Sam Bobroff
Advertise HTM support in ibm, pa-features if KVM indicates support when queried via a new capability (KVM_CAP_PPC_HTM). If KVM returns false for the capability (which may indicate that the host kernel doesn't support the capability itself) attempt to determine availability using a fallback method

[PATCH 0/3] Rework spapr: Better handling of ibm, pa-features TM bit

2016-07-04 Thread Sam Bobroff
Hi David, Anton asked me to have a look at this, so here is an attempt at a re-implementation of his: "spapr: Better handling of ibm, pa-features TM bit" addressing your comments and those from Paul Mackerras. I've broken the patch into one to unconditionally disable the HTM bit in pa-features

[PATCH 08/41] powerpc: Move epapr_paravirt_early_init() to early_init_devtree()

2016-07-04 Thread Benjamin Herrenschmidt
The function is called by both 32-bit and 64-bit early setup right after early_init_devtree(). All it does is run yet another early DT parser which is precisely what early_init_devtree() is about, so move it in there. Signed-off-by: Benjamin Herrenschmidt ---

[PATCH 03/41] powerpc/prom_init: PTRRELOC is not needed

2016-07-04 Thread Benjamin Herrenschmidt
There's one line of code still using PTRRELOC in prom_init, it shouldn't be necessary since that code is relocatable. Take it out. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 40/41] powerpc/pci: Fix build of Book3E/64 without EEH

2016-07-04 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/pci_dn.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index ecdccce..4fc6ede 100644 ---

Re: [PATCH 36/41] powerpc: Re-order setup_panic()

2016-07-04 Thread Benjamin Herrenschmidt
On Tue, 2016-07-05 at 15:04 +1000, Benjamin Herrenschmidt wrote: > Do it right after probe_machine() since it's about testing ppc_md, > and put the test in the common code. Ignore the second copy of that patch,  they are identical, my SSH tunnel broke down half way through sending the series.

Re: [PATCH v2] cxl: Refine slice error debug messages

2016-07-04 Thread Frederic Barrat
Le 04/07/2016 17:07, Philippe Bergheaud a écrit : Signed-off-by: Philippe Bergheaud --- Changes since v1: - Rebased on Ian's patch "cxl: Abstract the differences between the PSL and XSL" Thanks! Reviewed-by: Frederic Barrat

RE: [PATCH][v2] driver/memory: Update dependency of IFC for Layerscape

2016-07-04 Thread Raghav Dogra
Scott uses the updated email id and is already added. Regards, Raghav > -Original Message- > From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org] > Sent: Monday, July 04, 2016 3:19 PM > To: Boris Brezillon ; Raghav Dogra

[PATCH 08/14] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-04 Thread Ian Munsie
From: Ian Munsie These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware limitation, which will be used in a future

[PATCH 12/14] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-04 Thread Ian Munsie
From: Andrew Donnellan The cxl driver will use infrastructure from pnv_php to handle device tree updates when switching bi-modal CAPI cards into CAPI mode. To enable this, export pnv_php_find_slot() and pnv_php_set_slot_power_state(), and add corresponding

[PATCH 07/14] cxl: Add support for using the kernel API with a real PHB

2016-07-04 Thread Ian Munsie
From: Ian Munsie This hooks up support for using the kernel API with a real PHB. After the AFU initialisation has completed it calls into the PHB code to pass it the AFU that will be used by other peer physical functions on the adapter. The cxl_pci_to_afu API is extended to

[PATCH 02/14] cxl: Add cxl_slot_is_supported API

2016-07-04 Thread Ian Munsie
From: Ian Munsie This extends the check that the adapter is in a CAPI capable slot so that it may be called by external users in the kernel API. This will be used by the upcoming Mellanox CX4 support, which needs to know ahead of time if the card can be switched to cxl mode

[PATCH 06/14] powerpc/powernv: Add support for the cxl kernel api on the real phb

2016-07-04 Thread Ian Munsie
From: Ian Munsie This adds support for the peer model of the cxl kernel api to the PowerNV PHB, and exports APIs to enable the mode, check if a PCI device is attached to a PHB in this mode, and to set and get the peer AFU for this mode. The cxl driver will enable this mode

[PATCH 11/14] cxl: Workaround PE=0 hardware limitation in Mellanox CX4

2016-07-04 Thread Ian Munsie
From: Ian Munsie The CX4 card cannot cope with a context with PE=0 due to a hardware limitation, resulting in: [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 [ 34.166580] mlx5_core :01:00.1: Failed allocating uar, aborting Since the

[PATCH 14/14] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-04 Thread Ian Munsie
From: Andrew Donnellan Add a new API, cxl_check_and_switch_mode() to allow for switching of bi-modal CAPI cards, such as the Mellanox CX-4 network card. When a driver requests to switch a card to CAPI mode, use PCI hotplug infrastructure to remove all PCI devices

[PATCH 04/14] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-04 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 uses a model where the AFU is one physical function of the device, and is used by other peer physical functions of the same device. This will require those other devices to grab a reference on the AFU when they are initialised to make sure

[PATCH v2] cxl: Refine slice error debug messages

2016-07-04 Thread Philippe Bergheaud
Signed-off-by: Philippe Bergheaud --- Changes since v1: - Rebased on Ian's patch "cxl: Abstract the differences between the PSL and XSL" drivers/misc/cxl/cxl.h| 15 +++ drivers/misc/cxl/guest.c | 9 ++--- drivers/misc/cxl/irq.c| 29

[PATCH 09/14] cxl: Add preliminary workaround for CX4 interrupt limitation

2016-07-04 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 has a hardware limitation where only 4 bits of the AFU interrupt number can be passed to the XSL when sending an interrupt, limiting it to only 15 interrupts per context (AFU interrupt number 0 is invalid). In order to overcome this, we

[PATCH 13/14] PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state

2016-07-04 Thread Ian Munsie
From: Andrew Donnellan When calling pnv_php_set_slot_power_state() with state == OPAL_PCI_SLOT_OFFLINE, remove devices from the device tree as if we're dealing with OPAL_PCI_SLOT_POWER_OFF. Cc: Gavin Shan Cc: linux-...@vger.kernel.org

[PATCH 10/14] cxl: Add support for interrupts on the Mellanox CX4

2016-07-04 Thread Ian Munsie
From: Ian Munsie The Mellanox CX4 in cxl mode uses a hybrid interrupt model, where interrupts are routed from the networking hardware to the XSL using the MSIX table, and from there will be transformed back into an MSIX interrupt using the cxl style interrupts (i.e. using

Re: [PATCH][v2] driver/memory: Update dependency of IFC for Layerscape

2016-07-04 Thread Boris Brezillon
+PPC maintainers. Hi Raghav, Since you're touching powerpc drivers, the least you could do is add ppc maintainers in Cc, so that they can ack/review your patch... On Fri, 1 Jul 2016 21:32:30 +0530 Raghav Dogra wrote: > This patch enables IFC NAND support on ARM

Re: [PATCH 6/6] powerpc/sparse: Make ppc_md.{halt, restart} __noreturn

2016-07-04 Thread kbuild test robot
-annotations/20160704-152727 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-allyesconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp

Re: [PATCH][v2] driver/memory: Update dependency of IFC for Layerscape

2016-07-04 Thread Benjamin Herrenschmidt
On Mon, 2016-07-04 at 11:29 +0200, Boris Brezillon wrote: > +PPC maintainers. + Scott for FSL stuff > Hi Raghav, > > Since you're touching powerpc drivers, the least you could do is add > ppc maintainers in Cc, so that they can ack/review your patch... > > On Fri, 1 Jul 2016 21:32:30 +0530 >

Re: [PATCH v5] cpuidle: Fix last_residency division

2016-07-04 Thread Rafael J. Wysocki
On Mon, Jul 4, 2016 at 8:10 AM, Balbir Singh wrote: > > > On 02/07/16 00:24, Shreyas B. Prabhu wrote: >> Snooze is a poll idle state in powernv and pseries platforms. Snooze >> has a timeout so that if a cpu stays in snooze for more than target >> residency of the next

Re: [PATCH] powerpc/opal: Wake up kopald polling thread before waiting for events

2016-07-04 Thread Michael Neuling
On Mon, 2016-07-04 at 14:51 +1000, Benjamin Herrenschmidt wrote: > On some environments (prototype machines, some simulators, etc...) > there is no functional interrupt source to signal completion, so > we rely on the fairly slow OPAL heartbeat. > > In a number of cases, the calls complete very

Re: [PATCH] cxl: remove dead Kconfig options

2016-07-04 Thread Ian Munsie
Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

powerpc / cxl: Add support for the Mellanox CX4 in cxl mode

2016-07-04 Thread Ian Munsie
This series adds support for the Mellanox CX4 network adapter operating in cxl mode to the cxl driver and the PowerNV PHB code. The Mellanox developers will submit a separate patch series that makes use of this in the mlx5 driver. The CX4 card can operate in either pci mode, or cxl mode. In cxl

[PATCH 01/14] powerpc/powernv: Split cxl code out into a separate file

2016-07-04 Thread Ian Munsie
From: Ian Munsie The support for using the Mellanox CX4 in cxl mode will require additions to the PHB code. In preparation for this, move the existing cxl code out of pci-ioda.c into a separate pci-cxl.c file to keep things more organised. Signed-off-by: Ian Munsie

[PATCH 05/14] cxl: Allow a default context to be associated with an external pci_dev

2016-07-04 Thread Ian Munsie
From: Ian Munsie The cxl kernel API has a concept of a default context associated with each PCI device under the virtual PHB. The Mellanox CX4 will also use the cxl kernel API, but it does not use a virtual PHB - rather, the AFU appears as a physical function as a peer to

[PATCH 03/14] cxl: Enable bus mastering for devices using CAPP DMA mode

2016-07-04 Thread Ian Munsie
From: Ian Munsie Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus master to be enabled in order for the CAPI traffic to flow. This should be harmless to enable for other cxl devices, so unconditionally enable it in the adapter init flow. Signed-off-by:

Re: [PATCH 5/6] powerpc/sparse: Pass endianness to sparse

2016-07-04 Thread Andrew Donnellan
On 04/07/16 17:09, Daniel Axtens wrote: Explicitly give sparse an endianness in the Makefile, so that it doesn't get confused. Normally we have #ifdef one and #else the other, so it doesn't usually matter, but we have been bitten by it before, and indeed this patch fixes a number of sparse

Re: [PATCH 3/6] powerpc/xics: Fully qualify cast to silence sparse

2016-07-04 Thread Arnd Bergmann
On Monday, July 4, 2016 5:09:39 PM CEST Daniel Axtens wrote: > Make the cast fully line up with what out_rm8 expects. > > Signed-off-by: Daniel Axtens > --- > arch/powerpc/sysdev/xics/icp-native.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 4/6] powerpc/kernel: Clean up some sparse warnings

2016-07-04 Thread Arnd Bergmann
On Monday, July 4, 2016 5:09:40 PM CEST Daniel Axtens wrote: > diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c > index 2a2b4aeab80f..3f70b7dccee8 100644 > --- a/arch/powerpc/kernel/io.c > +++ b/arch/powerpc/kernel/io.c > @@ -37,7 +37,7 @@ void _insb(const volatile u8 __iomem

Re: [PATCH 5/6] powerpc/sparse: Pass endianness to sparse

2016-07-04 Thread Arnd Bergmann
On Monday, July 4, 2016 5:09:41 PM CEST Daniel Axtens wrote: > --- > arch/powerpc/Makefile | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 709a22a3e824..8617c71c3bdb 100644 > --- a/arch/powerpc/Makefile > +++

Re: powerpc/opal: Wake up kopald polling thread before waiting for events

2016-07-04 Thread Benjamin Herrenschmidt
On Mon, 2016-07-04 at 16:11 +1000, Michael Ellerman wrote: > On Mon, 2016-04-07 at 04:51:44 UTC, Benjamin Herrenschmidt wrote: > > On some environments (prototype machines, some simulators, etc...) > > there is no functional interrupt source to signal completion, so > > we rely on the fairly slow

Re: [PATCH v5] cpuidle: Fix last_residency division

2016-07-04 Thread Balbir Singh
On 02/07/16 00:24, Shreyas B. Prabhu wrote: > Snooze is a poll idle state in powernv and pseries platforms. Snooze > has a timeout so that if a cpu stays in snooze for more than target > residency of the next available idle state, then it would exit thereby > giving chance to the cpuidle

Re: powerpc/mm: Add a parameter to disable 1TB segs

2016-07-04 Thread Michael Ellerman
On Mon, 2016-04-07 at 00:44:04 UTC, Oliver O'Halloran wrote: > This patch adds the kernel command line parameter "no_tb_segs" which > forces the kernel to use 256MB rather than 1TB segments. Forcing the use > of 256MB segments makes it considerably easier to test code that depends > on an SLB miss

Re: powerpc/opal: Wake up kopald polling thread before waiting for events

2016-07-04 Thread Michael Ellerman
On Mon, 2016-04-07 at 04:51:44 UTC, Benjamin Herrenschmidt wrote: > On some environments (prototype machines, some simulators, etc...) > there is no functional interrupt source to signal completion, so > we rely on the fairly slow OPAL heartbeat. > > In a number of cases, the calls complete very

[PATCH 1/6] powerpc/kvm: Clarify __user annotations

2016-07-04 Thread Daniel Axtens
kvmppc_h_put_tce_indirect labels a u64 pointer as __user. It also labelled the u64 where get_user puts the result as __user. This isn't a pointer and so doesn't need to be labelled __user. Split the u64 value definition onto a new line to make it clear that it doesn't get the annotation.

[PATCH 3/6] powerpc/xics: Fully qualify cast to silence sparse

2016-07-04 Thread Daniel Axtens
Make the cast fully line up with what out_rm8 expects. Signed-off-by: Daniel Axtens --- arch/powerpc/sysdev/xics/icp-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xics/icp-native.c b/arch/powerpc/sysdev/xics/icp-native.c index

[PATCH 4/6] powerpc/kernel: Clean up some sparse warnings

2016-07-04 Thread Daniel Axtens
In hw_breakpoint.c, mark a user NIP as __user before passing it to __get_user_inatomic. In process.c, 7b051f665c32 ("powerpc: Use probe_kernel_address in show_instructions") changed a call from __get_user to probe_kernel_address. The address space annotations for that are different: it no longer

[PATCH 6/6] powerpc/sparse: Make ppc_md.{halt, restart} __noreturn

2016-07-04 Thread Daniel Axtens
PowerNV marks it's halt and restart calls as __noreturn. However, ppc_md does not have this annotation. Add the annotation to ppc_md, and then to every halt/restart function that is missing it. Additionally, I have verified that all of these functions do not return. Occasionally I have added a

  1   2   >