[PATCH] powernv/pci: Fix m64 checks for SR-IOV and window alignment

2016-09-13 Thread Russell Currey
Commit 5958d19a143e checks for prefetchable m64 BARs by comparing the addresses instead of using resource flags. This broke SR-IOV as the m64 check in pnv_pci_ioda_fixup_iov_resources() fails. The condition in pnv_pci_window_alignment() also changed to checking only IORESOURCE_MEM_64 instead of b

Re: [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-13 Thread Ingo Molnar
* Michael Ellerman wrote: > Jiri Olsa writes: > > > On Wed, Aug 31, 2016 at 09:15:30AM -0700, Andi Kleen wrote: > >> > > > >> > > > > >> > > > I've already made some changes in pmu-events/* to support > >> > > > this hierarchy to see how bad the change would be.. and > >> > > > it's not that

Re: [RFC] KVM: PPC: Book3S HV: Fall back to same size HPT in allocation ioctl

2016-09-13 Thread Anshuman Khandual
On 09/14/2016 05:27 AM, Michael Ellerman wrote: > Anshuman Khandual writes: Not sure whether this mail ever went. Sending it again. > >> > When the HPT size is explicitly passed on from the userspace, currently >> > the KVM_PPC_ALLOCATE_HTAB will try to allocate the requested size of HPT >> > f

Re: [PATCH v14 13/15] selftests/powerpc: Add ptrace tests for TM SPR registers

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for TM SPR registers. This > also adds ptrace interface based helper functions related to TM > SPR registers access. > I'm seeing this one fail a lot, it does oc

Re: [PATCH] powerpc/powernv: Initialise nest mmu

2016-09-13 Thread Alistair Popple
On Mon, 15 Aug 2016 04:51:59 PM Alistair Popple wrote: > 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 con

Re: [PATCH v14 15/15] selftests/powerpc: Fix a build issue

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > Fixes the following build failure - > > cp_abort.c:90:3: error: ‘for’ loop initial declarations are only > allowed in C99 or C11 mode >    for (int i = 0; i < NUM_LOOPS; i++) { >    ^ > cp_abort.c:90:

Re: [PATCH v14 07/15] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for TAR, PPR, DSCR > registers. This also adds ptrace interface based helper > functions related to TAR, PPR, DSCR register access. > > Signed-off-by: Anshuman Kh

Re: [PATCH v14 05/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers in TM

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for GPR/FPR registers > inside TM context. This adds ptrace interface based helper > functions related to checkpointed GPR/FPR access. > > Signed-off-by: Anshuman

Re: [PATCH v14 04/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds ptrace interface test for GPR/FPR registers. > This adds ptrace interface based helper functions related to > GPR/FPR access and some assembly helper functions related to > GPR/FPR regi

Re: [PATCH v14 01/15] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h'

2016-09-13 Thread Cyril Bur
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.si...@gmail.com wrote: > From: Anshuman Khandual > > This patch adds SPR number for TAR, PPR, DSCR special > purpose registers. It also adds TM, VSX, VMX related > instructions which will then be used by patches later > in the series. > > Signed-off-by:

Re: [PATCH v14 00/15] selftests/powerpc: Add ptrace tests for ppc registers

2016-09-13 Thread Cyril Bur
On Tue, 2016-09-13 at 01:01 +0800, Simon Guo wrote: > Hi Cyril, > On Tue, Sep 13, 2016 at 03:49:10PM +1000, Cyril Bur wrote: > > > > Thanks for putting the effort in to get these merged! I have a few > > remarks that apply to more than one patch which I'll say here. > > > > I'm not sure #defining

Re: [RFC] KVM: PPC: Book3S HV: Fall back to same size HPT in allocation ioctl

2016-09-13 Thread Anshuman Khandual
On 09/14/2016 05:42 AM, Paul Mackerras wrote: > On Wed, Sep 14, 2016 at 09:57:48AM +1000, Michael Ellerman wrote: >> > Anshuman Khandual writes: >> > >>> > > When the HPT size is explicitly passed on from the userspace, currently >>> > > the KVM_PPC_ALLOCATE_HTAB will try to allocate the requeste

Re: [RFC] KVM: PPC: Book3S HV: Fall back to same size HPT in allocation ioctl

2016-09-13 Thread Anshuman Khandual
On 09/14/2016 05:27 AM, Michael Ellerman wrote: > Anshuman Khandual writes: > >> When the HPT size is explicitly passed on from the userspace, currently >> the KVM_PPC_ALLOCATE_HTAB will try to allocate the requested size of HPT >> from reserved CMA area and if that is not possible, the allocatio

[PATCH] powerpc/64: syscall ABI

2016-09-13 Thread Nicholas Piggin
Add some documentation for the 64-bit syscall ABI, which doesn't seem to be documented elsewhere. This attempts to documented existing practice. The only small discrepancy is glibc clobbers not quite matching the kernel (e.g., xer, some vsyscalls trash cr1 whereas glibc only clobbers cr0). These w

[PATCH] powerpc/64: replay hypervisor maintenance priority

2016-09-13 Thread Nicholas Piggin
The hmi is defined to be higher priority than other maskable interrupts, so replay it first, as a best-effort to replay according to hardware priorities. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/irq.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH] powerpc/64: whitelist unresolved modversions CRCs

2016-09-13 Thread Nicholas Piggin
These are a symptom of CRC generation failure in generic build code, and not powerpc specific. Signed-off-by: Nicholas Piggin --- Hi Michal, Please merge this via your trees with Al's patches. I have a patch that can catch crc generation failure generically, and both Arnd and I have some ideas

Re: [RFC] fs: add userspace critical mounts event support

2016-09-13 Thread Rob Landley
On 09/02/2016 07:20 PM, Luis R. Rodriguez wrote: > kernel_read_file_from_path() can try to read a file from > the system's filesystem. This is typically done for firmware > for instance, which lives in /lib/firmware. One issue with > this is that the kernel cannot know for sure when the real > fina

Re: [PATCH] hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Sep 06, 2016 at 01:58:39PM +0530, PrasannaKumar Muralidharan wrote: >> Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. >> >> Signed-off-by: PrasannaKumar Muralidharan > > Patch applied. Thanks. Oops I merged it too, my bad. Hopefully git will

Re: [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-13 Thread Michael Ellerman
Jiri Olsa writes: > On Wed, Aug 31, 2016 at 09:15:30AM -0700, Andi Kleen wrote: >> > > >> > > > >> > > > I've already made some changes in pmu-events/* to support >> > > > this hierarchy to see how bad the change would be.. and >> > > > it's not that bad ;-) >> > > >> > > Everything has to be

Re: [RFC] KVM: PPC: Book3S HV: Fall back to same size HPT in allocation ioctl

2016-09-13 Thread Paul Mackerras
On Wed, Sep 14, 2016 at 09:57:48AM +1000, Michael Ellerman wrote: > Anshuman Khandual writes: > > > When the HPT size is explicitly passed on from the userspace, currently > > the KVM_PPC_ALLOCATE_HTAB will try to allocate the requested size of HPT > > from reserved CMA area and if that is not po

Re: [PATCH v2 2/5] powerpc/sparse: Make a bunch of things static

2016-09-13 Thread Michael Ellerman
Daniel Axtens writes: > diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c > b/arch/powerpc/kvm/book3s_64_mmu_hv.c > index 05f09ae82587..95abca69b168 100644 > --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c > +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c > @@ -1608,7 +1608,7 @@ static ssize_t debugfs_htab_re

Re: [RFC] KVM: PPC: Book3S HV: Fall back to same size HPT in allocation ioctl

2016-09-13 Thread Michael Ellerman
Anshuman Khandual writes: > When the HPT size is explicitly passed on from the userspace, currently > the KVM_PPC_ALLOCATE_HTAB will try to allocate the requested size of HPT > from reserved CMA area and if that is not possible, the allocation just > fails. With the commit 572abd563befd56 ("KVM:

Re: [v11, 5/8] soc: fsl: add GUTS driver for QorIQ platforms

2016-09-13 Thread Scott Wood
On Tue, 2016-09-13 at 07:23 +, Y.B. Lu wrote: > > > > > > -Original Message- > > From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc- > > ow...@vger.kernel.org] On Behalf Of Scott Wood > > Sent: Tuesday, September 13, 2016 7:25 AM > > To: Y.B. Lu; linux-...@vger.kernel.org; ulf.

Re: [PATCH] net: Remove NO_IRQ from powerpc-only network drivers

2016-09-13 Thread David Miller
From: Michael Ellerman Date: Sat, 10 Sep 2016 19:59:05 +1000 > We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it > from powerpc-only drivers. > > Signed-off-by: Michael Ellerman Applied to net-next, thanks.

Re: [PATCH] hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Herbert Xu
On Tue, Sep 06, 2016 at 01:58:39PM +0530, PrasannaKumar Muralidharan wrote: > Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. > > Signed-off-by: PrasannaKumar Muralidharan Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

Re: powerpc: set used_vsr/used_vr/used_spe in sigreturn path when MSR bits are active

2016-09-13 Thread Michael Ellerman
On Tue, 2016-26-07 at 08:06:01 UTC, Simon Guo wrote: > From: Simon Guo > > Normally, when MSR[VSX/VR/SPE] bits = 1, the used_vsr/used_vr/used_spe > bit have already been set. However signal frame locates at user space > and it is controlled by user application. It is up to kernel to make > sure u

Re: hwrng: pasemi-rng - Use linux/io.h instead of asm/io.h

2016-09-13 Thread Michael Ellerman
On Tue, 2016-06-09 at 08:28:39 UTC, PrasannaKumar Muralidharan wrote: > Checkpatch.pl warns about usage of asm/io.h. Use linux/io.h instead. > > Signed-off-by: PrasannaKumar Muralidharan Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/63019f3cab99c7acd27df5a5b8 cheers

Re: powerpc/ps3: fix spelling mistake in function name

2016-09-13 Thread Michael Ellerman
On Sun, 2016-28-08 at 10:59:00 UTC, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in dev_warn message and remove > extraneous trailing whitespace at end of the message. > > Signed-off-by: Colin Ian King Applied to powerpc next, thanks. https://git.kernel.org/pow

Re: [v2] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common()

2016-09-13 Thread Michael Ellerman
On Sun, 2016-11-09 at 13:44:13 UTC, Simon Guo wrote: > From: Simon Guo > > The ckpt_regs usage in gpr32_set_common/gpr32_get_common() will lead to > following cppcheck error at ifndef CONFIG_PPC_TRANSACTIONAL_MEM case: > > [arch/powerpc/kernel/ptrace.c:2062]: > (error) Uninitialized variable: ck

Re: powerpc/xmon: Don't use ld on 32-bit

2016-09-13 Thread Michael Ellerman
On Fri, 2016-09-09 at 05:54:37 UTC, Michael Ellerman wrote: > In commit 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and > add command to dump SPRs") I added two uses of the "ld" instruction in > spr_access.S. "ld" is a 64-bit instruction, so shouldn't be used on > 32-bit CPUs. > > Rep

Re: cxl: Fix informational message

2016-09-13 Thread Michael Ellerman
On Mon, 2016-12-09 at 10:37:43 UTC, Frederic Barrat wrote: > When set_sl_ops() is called, the adapter data structure is not fully > initialized yet. Therefore the device name is not showing up in the > trace. Fix is simply to get the device name from the pci_dev > structure. > > Fixes: 6d382616ac2

Re: powerpc/32: add missing \n at end of printk warning message

2016-09-13 Thread Michael Ellerman
On Mon, 2016-12-09 at 10:12:24 UTC, Colin King wrote: > From: Colin Ian King > > The message is missing a \n, add it. > > Signed-off-by: Colin Ian King Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/3daf3c206992891ac0cec6a54a cheers

Re: [v2,5/5] powerpc/sparse: Add more assembler prototypes

2016-09-13 Thread Michael Ellerman
On Tue, 2016-06-09 at 05:32:43 UTC, Daniel Axtens wrote: > Another set of things that are only called from assembler and so need > prototypes to keep sparse happy. > > Signed-off-by: Daniel Axtens Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/0545d5436aefddff7ca417adc1 chee

Re: [v2,4/5] powerpc/fadump: Make ELF eflags depend on endian

2016-09-13 Thread Michael Ellerman
On Tue, 2016-06-09 at 05:32:42 UTC, Daniel Axtens wrote: > Firmware Assisted Dump is a facility to dump kernel core with assistance > from firmware. As part of this process the kernel ELF version is > stored. > > Currently, fadump.h defines this to 0 if it is not already defined. This > clashes w

Re: [v2,2/5] powerpc/sparse: Make a bunch of things static

2016-09-13 Thread Michael Ellerman
On Tue, 2016-06-09 at 05:32:40 UTC, Daniel Axtens wrote: > Squash a bunch of sparse warnings by making things static. > > Reviewed-by: Andrew Donnellan > Signed-off-by: Daniel Axtens Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7c98bd72081c44670e2d0b60ae cheers

Re: [2/3] powerpc/mm: Preserve CFAR value on SLB miss caused by access to bogus address

2016-09-13 Thread Michael Ellerman
On Fri, 2016-02-09 at 11:49:21 UTC, Paul Mackerras wrote: > Currently, if userspace or the kernel accesses a completely bogus address, > for example with any of bits 46-59 set, we first take an SLB miss interrupt, > install a corresponding SLB entry with VSID 0, retry the instruction, then > take a

Re: [2/2] powerpc/64: Do load of PACAKBASE in LOAD_HANDLER

2016-09-13 Thread Michael Ellerman
On Tue, 2016-26-07 at 05:29:30 UTC, Michael Ellerman wrote: > The LOAD_HANDLER macro requires that you have previously loaded "reg" > with PACAKBASE. Although that gives callers flexibility to get PACAKBASE > in some interesting way, none of the callers actually do that. So fold > the load of PACAK

Re: [v2,1/5] powerpc/cell: drop unused iic_get_irq_host()

2016-09-13 Thread Michael Ellerman
On Tue, 2016-06-09 at 05:32:39 UTC, Daniel Axtens wrote: > Sparse checking revealed that it is no longer used. > There is an EXPORT_SYMBOL_GPL, but there's no header that > provides a prototype, so nothing should be using it anyway. > > Remove it. > > Signed-off-by: Daniel Axtens > Reviewed-by:

Re: [1/5] powerpc/Makefile: CROSS32AS is unused, remove it

2016-09-13 Thread Michael Ellerman
On Thu, 2016-11-08 at 06:03:11 UTC, Michael Ellerman wrote: > In fact it makes no sense at all to have this defined on little endian > builds. Since we disabled the 32-bit VDSO on little endian, we don't > build any 32-bit code when building a little endian kernel. > > Signed-off-by: Michael Eller

Re: [1/4] powerpc/book3s: Add a cpu table entry for different POWER9 revs

2016-09-13 Thread Michael Ellerman
On Wed, 2016-24-08 at 09:33:36 UTC, "Aneesh Kumar K.V" wrote: > Signed-off-by: Aneesh Kumar K.V > Acked-by: Michael Neuling Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7dccfbc325bb59f94521d544a8 cheers

Re: [RFC,1/3] powerpc/pasemi: Add Nemo motherboard config option.

2016-09-13 Thread Michael Ellerman
On Wed, 2016-31-08 at 12:24:34 UTC, Darren Stevens wrote: > Add config option for the Nemo motherboard used in the Amigaone X1000. > This is a custom PASemi board with an AMD SB600 southbridge, and needs > some patches to it device tree. This option will be used to build these > into th

Re: [1/2] powerpc/64: Correct comment on LOAD_HANDLER()

2016-09-13 Thread Michael Ellerman
On Tue, 2016-26-07 at 05:29:29 UTC, Michael Ellerman wrote: > The comment for LOAD_HANDLER() was wrong. The part about kdump has not > been true since 1f6a93e4c35e ("powerpc: Make it possible to move the > interrupt handlers away from the kernel"). > > Describe how it currently works, and combine

Re: [PATCH v14 00/15] selftests/powerpc: Add ptrace tests for ppc registers

2016-09-13 Thread Simon Guo
Hi Cyril, On Tue, Sep 13, 2016 at 03:49:10PM +1000, Cyril Bur wrote: > Thanks for putting the effort in to get these merged! I have a few > remarks that apply to more than one patch which I'll say here. > > I'm not sure #defining the TM instructions as .long for the selftests > is useful. Compiler

Re: [Openipmi-developer] [PATCH 3/4] ipmi: allow dynamic BMC version information

2016-09-13 Thread Jeremy Kerr
Hi Corey, > In all, this looks good. I have two minor nits inline below, and > two more major comments here: > > I would prefer if it always queried the data, even if the device id > information is provided by the lower level driver. OK, can do. I was concerned that the SMI driver may want to p

Re: [RFC] KVM: PPC: Book3S HV: Fall back to same size HPT in allocation ioctl

2016-09-13 Thread Balbir Singh
On Tue, Sep 13, 2016 at 3:49 PM, Anshuman Khandual wrote: > On 09/13/2016 10:04 AM, Balbir Singh wrote: >> >> >> On 13/09/16 14:07, Anshuman Khandual wrote: >>> On 09/12/2016 05:03 PM, Balbir Singh wrote: On Mon, Sep 12, 2016 at 9:13 PM, Anshuman Khandual wrote: >> When the HPT size

Re: [PATCH 3/8] powerpc/pseries: exception vector macros

2016-09-13 Thread Nicholas Piggin
y-ci/linux/commits/Nicholas-Piggin/powerpc-64-use-asm-sections-for-head-exception-layout/20160913-113052 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: powerpc-defconfig (attached as .config) > compiler: powerpc64-linux-gnu-gcc (Debian 5.4.0-6)

Re: linux-next: manual merge of the kbuild tree with Linus' tree

2016-09-13 Thread Nicholas Piggin
On Tue, 13 Sep 2016 09:48:03 +0200 Arnd Bergmann wrote: > On Tuesday, September 13, 2016 2:02:57 PM CEST Stephen Rothwell wrote: > > [For the new cc's, we are discussing the "thin archives" and "link dead > > code/data elimination" patches in the kbuild tree.] > > > > On Tue, 13 Sep 2016 09:39:4

[PATCH v5 4/4] PCI: Add a macro to set default alignment for all PCI devices

2016-09-13 Thread Yongji Xie
When vfio passthroughs a PCI device of which MMIO BARs are smaller than PAGE_SIZE, guest will not handle the mmio accesses to the BARs which leads to mmio emulations in host. This is because vfio will not allow to passthrough one BAR's mmio page which may be shared with other BARs. Otherwise, ther

[PATCH v5 3/4] PCI: Add a new option for resource_alignment to reassign alignment

2016-09-13 Thread Yongji Xie
When using resource_alignment kernel parameter, the current implement reassigns the alignment by changing resources' size which can potentially break some drivers. For example, the driver uses the size to locate some register whose length is related to the size. This patch adds a new option "nores

[PATCH v5 2/4] PCI: Ignore enforced alignment to VF BARs

2016-09-13 Thread Yongji Xie
VF BARs are read-only zeroes according to SRIOV spec, the normal way(writing BARs) of allocating resources wouldn't be applied to VFs. The VFs' resources would be allocated when we enable SR-IOV capability. So we should not try to reassign alignment after we enable VFs. It's meaningless and will re

[PATCH v5 1/4] PCI: Ignore enforced alignment when kernel uses existing firmware setup

2016-09-13 Thread Yongji Xie
PCI resources allocator will use firmware setup and not try to reassign resource when PCI_PROBE_ONLY or IORESOURCE_PCI_FIXED is set. The enforced alignment in pci_reassigndev_resource_alignment() should be ignored in this case. Otherwise, some PCI devices' resources would be released here and not

[PATCH v5 0/4] PCI: Introduce a way to enforce all MMIO BARs not to share PAGE_SIZE

2016-09-13 Thread Yongji Xie
This series introduces a way for PCI resource allocator to force MMIO BARs not to share PAGE_SIZE. This would make sense to VFIO driver. Because current VFIO implementation disallows to mmap sub-page(size < PAGE_SIZE) MMIO BARs which may share the same page with other BARs for security reasons. Thu

Re: linux-next: manual merge of the kbuild tree with Linus' tree

2016-09-13 Thread Arnd Bergmann
On Tuesday, September 13, 2016 2:02:57 PM CEST Stephen Rothwell wrote: > [For the new cc's, we are discussing the "thin archives" and "link dead > code/data elimination" patches in the kbuild tree.] > > On Tue, 13 Sep 2016 09:39:45 +1000 Stephen Rothwell > wrote: > > > > On Mon, 12 Sep 2016 11:0

RE: [v11, 5/8] soc: fsl: add GUTS driver for QorIQ platforms

2016-09-13 Thread Y.B. Lu
> -Original Message- > From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc- > ow...@vger.kernel.org] On Behalf Of Scott Wood > Sent: Tuesday, September 13, 2016 7:25 AM > To: Y.B. Lu; linux-...@vger.kernel.org; ulf.hans...@linaro.org; Arnd > Bergmann > Cc: linuxppc-dev@lists.ozlabs.org;