[PATCH v2] powerpc/powernv: Initialise nest mmu

2016-12-01 Thread Alistair Popple
POWER9 contains an off core mmu called the nest mmu (NMMU). This is used by other hardware units on the chip to translate virtual addresses into real addresses. The unit attempting an address translation provides the majority of the context required for the translation request except for the base

Re: [PATCH] powerpc: cputime: fix a compile warning

2016-12-01 Thread yjin
On 2016年12月02日 13:15, Pan Xinhui wrote: 在 2016/12/2 12:35, yjin 写道: On 2016年12月02日 12:22, Balbir Singh wrote: On Fri, Dec 2, 2016 at 3:15 PM, Michael Ellerman wrote: yanjiang@windriver.com writes: diff --git a/arch/powerpc/include/asm/cputime.h

Re: [PATCH] powerpc: cputime: fix a compile warning

2016-12-01 Thread Pan Xinhui
在 2016/12/2 12:35, yjin 写道: On 2016年12月02日 12:22, Balbir Singh wrote: On Fri, Dec 2, 2016 at 3:15 PM, Michael Ellerman wrote: yanjiang@windriver.com writes: diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index

Re: [PATCH 1/2] powerpc: Remove Mac-on-Linux hooks

2016-12-01 Thread Ben Hutchings
On Fri, Dec 02, 2016 at 02:56:47PM +1100, Michael Ellerman wrote: > Ben Hutchings writes: > > > [ Unknown signature status ] > > The symbols exported for use by MOL aren't getting CRCs and I was > > about to fix that. But MOL is dead upstream, and the latest work on > > it

Re: [PATCH] powerpc: cputime: fix a compile warning

2016-12-01 Thread yjin
On 2016年12月02日 12:22, Balbir Singh wrote: On Fri, Dec 2, 2016 at 3:15 PM, Michael Ellerman wrote: yanjiang@windriver.com writes: diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index 4f60db0..4423e97 100644 ---

Re: [PATCH] powerpc: cputime: fix a compile warning

2016-12-01 Thread Balbir Singh
On Fri, Dec 2, 2016 at 3:15 PM, Michael Ellerman wrote: > yanjiang@windriver.com writes: > >> diff --git a/arch/powerpc/include/asm/cputime.h >> b/arch/powerpc/include/asm/cputime.h >> index 4f60db0..4423e97 100644 >> --- a/arch/powerpc/include/asm/cputime.h >> +++

Re: [PATCH] powerpc: cputime: fix a compile warning

2016-12-01 Thread Michael Ellerman
yanjiang@windriver.com writes: > diff --git a/arch/powerpc/include/asm/cputime.h > b/arch/powerpc/include/asm/cputime.h > index 4f60db0..4423e97 100644 > --- a/arch/powerpc/include/asm/cputime.h > +++ b/arch/powerpc/include/asm/cputime.h > @@ -228,7 +228,8 @@ static inline cputime_t

Re: [PATCH v2] adb: properly mark continued kernel messages

2016-12-01 Thread Michael Ellerman
Andreas Schwab writes: > Use pr_cont where appropriate, and switch to pr_foo throughout. > Additionally, lower messages in adb_probe_task to debug level. > > Signed-off-by: Andreas Schwab > --- > drivers/macintosh/adb.c| 24 +---

Re: [PATCH 1/2] powerpc: Remove Mac-on-Linux hooks

2016-12-01 Thread Michael Ellerman
Ben Hutchings writes: > [ Unknown signature status ] > The symbols exported for use by MOL aren't getting CRCs and I was > about to fix that. But MOL is dead upstream, and the latest work on > it was to make it use KVM instead of its own kernel module. So remove > them

Re: [PATCH kernel v7 7/7] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-12-01 Thread David Gibson
On Wed, Nov 30, 2016 at 05:52:05PM +1100, Alexey Kardashevskiy wrote: > At the moment the userspace tool is expected to request pinning of > the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. > When the userspace process finishes, all the pinned pages need to > be put; this is done

Re: [PATCH kernel v7 6/7] vfio/spapr: Reference mm in tce_container

2016-12-01 Thread David Gibson
On Wed, Nov 30, 2016 at 05:52:04PM +1100, Alexey Kardashevskiy wrote: > In some situations the userspace memory context may live longer than > the userspace process itself so if we need to do proper memory context > cleanup, we better have tce_container take a reference to mm_struct and > use it

Re: [PATCH] KVM: PPC: Book3S: Move prototypes for KVM functions into kvm_ppc.h

2016-12-01 Thread Daniel Axtens
>> This moves the prototypes for functions that are only called from >> assembler code out of asm/asm-prototypes.h into asm/kvm_ppc.h. >> The prototypes were added in commit ebe4535fbe7a ("KVM: PPC: >> Book3S HV: sparse: prototypes for functions called from assembler", >> 2016-10-10), but given

[PATCH 2/2] powerpc: Fix missing CRCs, add yet more asm-prototypes.h declarations

2016-12-01 Thread Ben Hutchings
Add declarations for: - __mfdcr, __mtdcr (if CONFIG_PPC_DCR_NATIVE=y; through ) - switch_mmu_context (if CONFIG_PPC_BOOK3S_64=n; through ) Signed-off-by: Ben Hutchings --- I checked all the symbols potentially exported from assembly under arch/powerpc, and these seem to be

[PATCH 1/2] powerpc: Remove Mac-on-Linux hooks

2016-12-01 Thread Ben Hutchings
The symbols exported for use by MOL aren't getting CRCs and I was about to fix that. But MOL is dead upstream, and the latest work on it was to make it use KVM instead of its own kernel module. So remove them instead. Signed-off-by: Ben Hutchings ---

Re: [PATCH] KVM: PPC: Book3S: Move prototypes for KVM functions into kvm_ppc.h

2016-12-01 Thread Michael Ellerman
Paul Mackerras writes: > This moves the prototypes for functions that are only called from > assembler code out of asm/asm-prototypes.h into asm/kvm_ppc.h. > The prototypes were added in commit ebe4535fbe7a ("KVM: PPC: > Book3S HV: sparse: prototypes for functions called from

[PATCH v4 4/4] powerpc/perf: macros for power9 format encoding

2016-12-01 Thread Madhavan Srinivasan
Patch to add macros and contants to support the power9 raw event encoding format. Couple of functions added since some of the bits fields like PMCxCOMB and THRESH_CMP has different width and location within MMCR* in power9. Signed-off-by: Madhavan Srinivasan ---

[PATCH v4 3/4] powerpc/perf: power9 raw event format encoding

2016-12-01 Thread Madhavan Srinivasan
Patch to update the power9 raw event encoding format information and add support for the same in power9-pmu.c. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/power9-pmu.c | 134 + 1 file changed, 134 insertions(+) diff

[PATCH v4 2/4] powerpc/perf: update attribute_group data structure

2016-12-01 Thread Madhavan Srinivasan
Rename the power_pmu and attribute_group variables that support PowerISA v2.07. Add a cpu feature flag check to pick the PowerISA v2.07 format structures to support. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/power9-pmu.c | 13 - 1 file

[PATCH v4 1/4] powerpc/perf: factor out the event format field

2016-12-01 Thread Madhavan Srinivasan
Factor out the format field structure for PowerISA v2.07. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/isa207-common.c | 34 ++ arch/powerpc/perf/power8-pmu.c| 39 ---

[PATCH v4 0/4] Support power9 PMU Raw event format

2016-12-01 Thread Madhavan Srinivasan
Patchset to factor out the PowerISA v2.07 PMU raw event format encoding and add support to the power9 PMU raw event format encoding. Changelog v3: 1)Rename the raw event format to power9 from PowerISA v3.0 2)Modified the new helper functions suggested by mpe Changelog v2: 1)Initialized return

Re: [PATCH v4 0/7] Disable VF's memory space on updating IOV BARs

2016-12-01 Thread Bjorn Helgaas
On Mon, Nov 28, 2016 at 10:13:41PM -0600, Bjorn Helgaas wrote: > This is a v4 of Gavin's series for handling VF BAR updates. The > important piece is the first patch ("PCI: Do any VF BAR updates before > enabling the BARs"). That makes sure that if we update VF BARs, we do > it before enabling

Re: [PATCH kernel v7 6/7] vfio/spapr: Reference mm in tce_container

2016-12-01 Thread Alex Williamson
On Wed, 30 Nov 2016 17:52:04 +1100 Alexey Kardashevskiy wrote: > In some situations the userspace memory context may live longer than > the userspace process itself so if we need to do proper memory context > cleanup, we better have tce_container take a reference to mm_struct and

Re: [PATCH kernel v7 7/7] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-12-01 Thread Alex Williamson
On Wed, 30 Nov 2016 17:52:05 +1100 Alexey Kardashevskiy wrote: > At the moment the userspace tool is expected to request pinning of > the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. > When the userspace process finishes, all the pinned pages need to > be put;

[RFC PATCH] PCI: designware: add host_init() error handling

2016-12-01 Thread Srinivas Kandagatla
This patch add support to return value from host_init() callback from drivers,so that the designware library can handle or pass it to proper place. Issue with void return type is that errors or error handling within host_init() callback are never know to designware code, which could go ahead and

Re: [PATCH kernel v7 2/7] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-12-01 Thread Alex Williamson
On Wed, 30 Nov 2016 17:52:00 +1100 Alexey Kardashevskiy wrote: > This changes mm_iommu_xxx helpers to take mm_struct as a parameter > instead of getting it from @current which in some situations may > not have a valid reference to mm. > > This changes helpers to receive @mm and

Re: [PATCH kernel v7 3/7] vfio/spapr: Postpone allocation of userspace version of TCE table

2016-12-01 Thread Alex Williamson
On Wed, 30 Nov 2016 17:52:01 +1100 Alexey Kardashevskiy wrote: > The iommu_table struct manages a hardware TCE table and a vmalloc'd > table with corresponding userspace addresses. Both are allocated when > the default DMA window is created and this happens when the very first >

Re: [PATCH kernel v7 4/7] vfio/spapr: Add a helper to create default DMA window

2016-12-01 Thread Alex Williamson
On Wed, 30 Nov 2016 17:52:02 +1100 Alexey Kardashevskiy wrote: > There is already a helper to create a DMA window which does allocate > a table and programs it to the IOMMU group. However > tce_iommu_take_ownership_ddw() did not use it and did these 2 calls > itself to simplify

Re: [PATCH kernel v7 5/7] vfio/spapr: Postpone default window creation

2016-12-01 Thread Alex Williamson
On Wed, 30 Nov 2016 17:52:03 +1100 Alexey Kardashevskiy wrote: > We are going to allow the userspace to configure container in > one memory context and pass container fd to another so > we are postponing memory allocations accounted against > the locked memory limit. One of

Re: [PATCH][DOC] ppc/idle: Add documentation for powersave=off

2016-12-01 Thread Jonathan Corbet
On Fri, 2 Dec 2016 00:08:26 +1100 Balbir Singh wrote: > Update kernel-parameters.txt to add Documentation > for powersave=off. Applied to docs-next, thanks. jon

[PATCH][DOC] ppc/idle: Add documentation for powersave=off

2016-12-01 Thread Balbir Singh
Update kernel-parameters.txt to add Documentation for powersave=off. Signed-off-by: Balbir Singh <bsinghar...@gmail.com> --- Applies of top of linux-next 20161201 Documentation/admin-guide/kernel-parameters.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation

[PATCH v2 2/2] powerpc: Make selects of IBM_EMAC_* depend on IBM_EMAC

2016-12-01 Thread Michael Ellerman
We have a bunch of Kconfig symbols which select various IBM_EMAC_* symbols. These all cause warnings when IBM_EMAC is not selected. eg. warning: (PPC_CELL_NATIVE && BLUESTONE && CANYONLANDS && GLACIER && EIGER && 440EPX && 440GRX && 440GX && 460SX && 405EX) selects IBM_EMAC_RGMII which has

[PATCH v2 1/2] powerpc/cell: Drop select of MEMORY_HOTPLUG

2016-12-01 Thread Michael Ellerman
SPU_FS selects MEMORY_HOTPLUG, which is problematic because MEMORY_HOTPLUG is user selectable, meaning we can end up with a broken .config where MEMORY_HOTPLUG is enabled but its dependencies are not, leading to build breakages. The select of MEMORY_HOTPLUG for SPU_FS was added back in 2006, in

[PATCH 2/2] powerpc/powernv/opal-dump : Use IRQ_HANDLED instead of numbers in interrupt handler

2016-12-01 Thread Mukesh Ojha
Converts all the return explicit number to a more proper IRQ_HANDLED, which looks proper incase of interrupt handler returning case. Signed-off-by: Mukesh Ojha Reviewed-by: Vasant Hegde --- arch/powerpc/platforms/powernv/opal-dump.c

[PATCH 1/2] powerpc/powernv/opal-dump : Handles opal_dump_info properly

2016-12-01 Thread Mukesh Ojha
Moves the return value check of 'opal_dump_info' to a proper place which was previously unnecessarily filling all the dump info even on failure. Signed-off-by: Mukesh Ojha --- arch/powerpc/platforms/powernv/opal-dump.c | 9 ++--- 1 file changed, 6 insertions(+),

[PATCH] powerpc/mm: Fix page table dump build on non-Book3S

2016-12-01 Thread Michael Ellerman
In the recent commit 1515ab932156 ("powerpc/mm: Dump hash table") we added code to dump the hage page table. Currently this can be selected to build on any platform. However it breaks the build if we're building for a non-Book3S platform, because none of the hash page table related defines and so