Re: [PATCH V4 3/6] powerpc/powernv: use one M64 BAR in Single PE mode for one VF BAR

2015-10-08 Thread Wei Yang
On Fri, Oct 02, 2015 at 07:29:29PM +1000, Alexey Kardashevskiy wrote: >On 08/19/2015 12:01 PM, Wei Yang wrote: >>In current implementation, when VF BAR is bigger than 64MB, it uses 4 M64 >>BARs in Single PE mode to cover the number of VFs required to be enabled. >>By doing so, several VFs would be

Re: [PATCH V4 5/6] powerpc/powernv: boundary the total VF BAR size instead of the individual one

2015-10-08 Thread Wei Yang
On Fri, Oct 02, 2015 at 07:51:17PM +1000, Alexey Kardashevskiy wrote: >On 08/19/2015 12:01 PM, Wei Yang wrote: >>Each VF could have 6 BARs at most. When the total BAR size exceeds the >>gate, after expanding it will also exhaust the M64 Window. >> >>This patch limits the boundary by checking the to

Re: [PATCH V4 6/6] powerpc/powernv: allocate sparse PE# when using M64 BAR in Single PE mode

2015-10-08 Thread Wei Yang
On Fri, Oct 02, 2015 at 08:05:47PM +1000, Alexey Kardashevskiy wrote: >On 08/19/2015 12:01 PM, Wei Yang wrote: >>When M64 BAR is set to Single PE mode, the PE# assigned to VF could be >>sparse. >> >>This patch restructures the patch to allocate sparse PE# for VFs when M64 > >This patch restructures

Re: [kbuild-all] [PATCH 4/5 v2] pseries/iommu: implement DDW-aware dma_get_page_shift

2015-10-08 Thread Christoph Hellwig
Hi Fengguang, I think this proactive testing does a little more harm than good in it's current form. While offering testing for patches that aren't in git trees and or by people that don't even have a git tree that the build bots known about does seem useful, blindly doing it for every patch agai

[PATCH V2] powerpc: Fix _ALIGN_* errors due to type difference.

2015-10-08 Thread Aneesh Kumar K.V
This avoid errors like unsigned int usize = 1 << 30; int size = 1 << 30; unsigned long addr = 64UL << 30 ; value = _ALIGN_DOWN(addr, usize); -> 0 value = _ALIGN_DOWN(addr, size); -> 0x10 Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/boot/page

Re: [PATCH v9 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-10-08 Thread Hemant Kumar
Hi David, On 10/07/2015 09:41 PM, David Ahern wrote: On 10/6/15 8:25 PM, Hemant Kumar wrote: @@ -358,7 +357,12 @@ static bool handle_end_event(struct perf_kvm_stat *kvm, time_diff = sample->time - time_begin; if (kvm->duration && time_diff > kvm->duration) { -char decode[

Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation

2015-10-08 Thread Peter Zijlstra
On Thu, Oct 08, 2015 at 02:50:36PM +1100, Michael Ellerman wrote: > On Wed, 2015-10-07 at 08:25 -0700, Paul E. McKenney wrote: > > Currently, we do need smp_mb__after_unlock_lock() to be after the > > acquisition on PPC -- putting it between the unlock and the lock > > of course doesn't cut it for

Re: [PATCH v2 05/25] powerpc/8xx: Fix vaddr for IMMR early remap

2015-10-08 Thread Christophe Leroy
Le 29/09/2015 01:39, Scott Wood a écrit : On Tue, Sep 22, 2015 at 06:50:38PM +0200, Christophe Leroy wrote: Memory: 124428K/131072K available (3748K kernel code, 188K rwdata, 648K rodata, 508K init, 290K bss, 6644K reserved) Kernel virtual memory layout: * 0xfffdf000..0xf000 : fixmap

Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation

2015-10-08 Thread Will Deacon
On Thu, Oct 08, 2015 at 01:16:38PM +0200, Peter Zijlstra wrote: > On Thu, Oct 08, 2015 at 02:50:36PM +1100, Michael Ellerman wrote: > > On Wed, 2015-10-07 at 08:25 -0700, Paul E. McKenney wrote: > > > > Currently, we do need smp_mb__after_unlock_lock() to be after the > > > acquisition on PPC -- p

Re: [PATCH V8 00/28] Add new powerpc specific ELF core notes

2015-10-08 Thread Anshuman Khandual
On 05/19/2015 08:37 PM, Anshuman Khandual wrote: > Test Result > --- > ptrace-ebbPASS > ptrace-gprPASS > ptrace-tm-gpr PASS > ptrace-tm-spd-gpr PASS > ptrace-tarFAIL > ptrace-tm-tar FAIL > ptrace-tm-spd-tar FAIL > ptrace-vsx

[PATCH V9 00/28] Add new powerpc specific ELF core notes

2015-10-08 Thread Anshuman Khandual
This patch series adds twelve new ELF core note sections which can be used with existing ptrace request PTRACE_GETREGSET-SETREGSET for accessing various transactional memory and other miscellaneous debug register sets on powerpc platform. Test Result (All tests pass on both BE and LE)

[PATCH V9 01/28] elf: Add powerpc specific core note sections

2015-10-08 Thread Anshuman Khandual
This patch adds twelve ELF core note sections for powerpc architecture for various registers and register sets which need to be accessed from ptrace interface and then gdb. These additions include special purpose registers like TAR, PPR, DSCR, TM running and checkpointed state for various register

[PATCH V9 02/28] powerpc, process: Add the function flush_tmregs_to_thread

2015-10-08 Thread Anshuman Khandual
This patch creates a function flush_tmregs_to_thread which will then be used by subsequent patches in this series. The function checks for self tracing ptrace interface attempts while in the TM context and logs appropriate warning message. Signed-off-by: Anshuman Khandual --- arch/powerpc/includ

[PATCH V9 03/28] powerpc, ptrace: Enable in transaction NT_PRFPREG ptrace requests

2015-10-08 Thread Anshuman Khandual
This patch enables in transaction NT_PRFPREG ptrace requests. The function fpr_get which gets the running value of all FPR registers and the function fpr_set which sets the running value of of all FPR registers work on the running set of FPR registers whose location will be different if transaction

[PATCH V9 04/28] powerpc, ptrace: Enable in transaction NT_PPC_VMX ptrace requests

2015-10-08 Thread Anshuman Khandual
This patch enables in transaction NT_PPC_VMX ptrace requests. The function vr_get which gets the running value of all VMX registers and the function vr_set which sets the running value of of all VMX registers work on the running set of VMX registers whose location will be different if transaction i

[PATCH V9 05/28] powerpc, ptrace: Enable in transaction NT_PPC_VSX ptrace requests

2015-10-08 Thread Anshuman Khandual
This patch enables in transaction NT_PPC_VSX ptrace requests. The function vsr_get which gets the running value of all VSX registers and the function vsr_set which sets the running value of of all VSX registers work on the running set of VMX registers whose location will be different if transaction

[PATCH V9 06/28] powerpc, ptrace: Adapt gpr32_get, gpr32_set functions for transaction

2015-10-08 Thread Anshuman Khandual
This patch splits gpr32_get, gpr32_set functions to accommodate in transaction ptrace requests implemented in patches later in the series. Signed-off-by: Anshuman Khandual --- arch/powerpc/kernel/ptrace.c | 64 +++- 1 file changed, 51 insertions(+), 13 del

[PATCH V9 07/28] powerpc, ptrace: Enable support for NT_PPC_CGPR

2015-10-08 Thread Anshuman Khandual
This patch enables support for TM checkpointed GPR register set ELF core note NT_PPC_CGPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CGPR in powerpc corresponding to the ELF core note section added. It implements the

[PATCH V9 08/28] powerpc, ptrace: Enable support for NT_PPC_CFPR

2015-10-08 Thread Anshuman Khandual
This patch enables support for TM checkpointed FPR register set ELF core note NT_PPC_CFPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CFPR in powerpc corresponding to the ELF core note section added. It implements the

[PATCH V9 09/28] powerpc, ptrace: Enable support for NT_PPC_CVMX

2015-10-08 Thread Anshuman Khandual
This patch enables support for TM checkpointed VMX register set ELF core note NT_PPC_CVMX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVMX in powerpc corresponding to the ELF core note section added. It implements the

[PATCH V9 10/28] powerpc, ptrace: Enable support for NT_PPC_CVSX

2015-10-08 Thread Anshuman Khandual
This patch enables support for TM checkpointed VSX register set ELF core note NT_PPC_CVSX based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_CVSX in powerpc corresponding to the ELF core note section added. It implements the

[PATCH V9 11/28] powerpc, ptrace: Enable support for TM SPR state

2015-10-08 Thread Anshuman Khandual
This patch enables support for TM SPR state related ELF core note NT_PPC_TM_SPR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding a register set REGSET_TM_SPR in powerpc corresponding to the ELF core note section added. It implements the get, se

[PATCH V9 12/28] powerpc, ptrace: Enable NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR

2015-10-08 Thread Anshuman Khandual
This patch enables support for all three TM checkpointed SPR states related ELF core note NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET_TM_CTAR, REGSET_TM_CPPR a

[PATCH V9 13/28] powerpc, ptrace: Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR

2015-10-08 Thread Anshuman Khandual
This patch enables support for running TAR, PPR, DSCR registers related ELF core notes NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding three new register sets REGSET_TAR, REGSET_PPR, REGSET_DSCR in powerpc

[PATCH V9 15/28] selftests, powerpc: Move 'reg.h' file outside of 'ebb' sub directory

2015-10-08 Thread Anshuman Khandual
This patch moves 'reg.h' file from pmu 'ebb' sub directory to the powerpc root directory to make all the register definitions and instructions available for tests present in other subsystems. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/pmu/ebb/ebb.c | 2 +- tools/t

[PATCH V9 14/28] powerpc, ptrace: Enable support for EBB registers

2015-10-08 Thread Anshuman Khandual
This patch enables support for EBB state registers related ELF core note NT_PPC_EBB based ptrace requests through PTRACE_GETREGSET, PTRACE_SETREGSET calls. This is achieved through adding one new register sets REGSET_EBB in powerpc corresponding to the ELF core note sections added in this regard. I

[PATCH V9 16/28] selftests, powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h'

2015-10-08 Thread 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: Anshuman Khandual --- tools/testing/selftests/powerpc/reg.h | 21 + 1 file changed, 2

[PATCH V9 17/28] selftests, powerpc: Add ptrace tests for EBB

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for EBB specific registers. This also adds some generic ptrace interface based helper functions to be used by other patches later on in the series. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/Makefile | 2 +- tools/testin

[PATCH V9 18/28] selftests, powerpc: Add ptrace tests for GPR/FPR registers

2015-10-08 Thread 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 registers. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 5

[PATCH V9 19/28] selftests, powerpc: Add ptrace tests for GPR/FPR registers in TM

2015-10-08 Thread 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 Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 3 +- .../selftests/powerpc/ptrace/

[PATCH V9 20/28] selftests, powerpc: Add ptrace tests for GPR/FPR registers in suspended TM

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for GPR/FPR registers inside suspended TM context. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 2 +- .../selftests/powerpc/ptrace/ptrace-tm-spd-gpr.c | 319 + 2 files changed, 320 insertio

[PATCH V9 21/28] selftests, powerpc: Add ptrace tests for TAR, PPR, DSCR registers

2015-10-08 Thread 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 Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 3 +- .../testing/selftests/powerpc/pt

[PATCH V9 22/28] selftests, powerpc: Add ptrace tests for TAR, PPR, DSCR in TM

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for TAR, PPR, DSCR registers inside TM context. This also adds ptrace interface based helper functions related to checkpointed TAR, PPR, DSCR register access. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 2 +- .

[PATCH V9 23/28] selftests, powerpc: Add ptrace tests for TAR, PPR, DSCR in suspended TM

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for TAR, PPR, DSCR registers inside suspended TM context. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 2 +- .../selftests/powerpc/ptrace/ptrace-tm-spd-tar.c | 184 + 2 files changed, 185 i

[PATCH V9 24/28] selftests, powerpc: Add ptrace tests for VSX, VMX registers

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for VSX, VMX registers. This also adds ptrace interface based helper functions related to VSX, VMX registers access. This also adds some assembly helper functions related to VSX and VMX registers. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/

[PATCH V9 25/28] selftests, powerpc: Add ptrace tests for VSX, VMX registers in TM

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for VSX, VMX registers inside TM context. This also adds ptrace interface based helper functions related to chckpointed VSX, VMX registers access. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 3 +- .../selftests

[PATCH V9 26/28] selftests, powerpc: Add ptrace tests for VSX, VMX registers in suspended TM

2015-10-08 Thread Anshuman Khandual
This patch adds ptrace interface test for VSX, VMX registers inside suspended TM context. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 3 +- .../selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c | 212 + 2 files changed, 214 inserti

[PATCH V9 27/28] selftests, powerpc: Add ptrace tests for TM SPR registers

2015-10-08 Thread 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. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/Makefile| 2 +- .../selftests/powerpc/ptrace/ptrace-tm-spr.c

[PATCH V9 28/28] selftests, powerpc: Add .gitignore file for ptrace executables

2015-10-08 Thread Anshuman Khandual
This patch adds a .gitignore file for all the executables in the ptrace test directory thus making invisible with git status query. Signed-off-by: Anshuman Khandual --- tools/testing/selftests/powerpc/ptrace/.gitignore | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 tools/

Re: [PATCH v2 2/2] powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case

2015-10-08 Thread Guilherme G. Piccoli
On 09/15/2015 01:18 PM, Bjorn Helgaas wrote: We could also argue that when CONFIG_PCI_MSI=n, dev->msi[x]_cap should not even exist, so we could catch that a build-time instead of run-time. My personal opinion is that it's not a big deal, and the existing code that includes dev->msi[x]_cap and in

[PATCH v2 00/13] Enable building all dtb files

2015-10-08 Thread Rob Herring
This series enables building all the dtb files in the kernel mostly independent of the kernel config. The option is only dependent on COMPILE_TEST, OF, and the new OF_ALL_DTBS options. This ensures that allyesconfig builds can build all dtb files although most arches have to build "dtbs" target

[PATCH v2 12/13] powerpc: enable building of all dtbs

2015-10-08 Thread Rob Herring
Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs are not really dependent on a platform being enabled or any other kernel config, so for testing coverage it is convenient to build all of the dtbs. This builds all dts files in the tree, not just targets listed. Supporting

Re: Time to remove platforms/cell?

2015-10-08 Thread Geoff Levand
> Hi, > > > On Mon, 2015-10-05 at 12:27 +0200, Marc Dietrich wrote: > > > I tried with ps3-queue and still no luck. Petitboot just says > > > "Booting kernel > > > ..." thats all - no output. > > > > > > FW is 3.15 of course > > > Petitboot says (white-09.09.01-15.56) > > I spent a few minutes o

Re: [GIT PULL] strscpy powerpc fix for 3.4

2015-10-08 Thread Guenter Roeck
On Wed, Oct 07, 2015 at 08:27:38PM -0400, Chris Metcalf wrote: > On 10/7/2015 6:44 PM, Stephen Rothwell wrote: > >Hi Linus, > > > >After merging Linus' tree, today's linux-next build (powerpc > >ppc64_defconfig) failed like this: > > > >lib/string.c: In function 'strscpy': > >lib/string.c:209:4: er

[PATCH] powerpc/pseries/hvcserver: don't memset pi_buff if it is null

2015-10-08 Thread Colin King
From: Colin Ian King pi_buff is being memset before it is sanity checked. Move the memset after the null pi_buff sanity check to avoid an oops. Signed-off-by: Colin Ian King --- arch/powerpc/platforms/pseries/hvcserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-10-08 Thread Scott Wood
On Wed, 2015-10-07 at 14:49 +0200, Christophe Leroy wrote: > Le 29/09/2015 02:29, Scott Wood a écrit : > > On Tue, Sep 22, 2015 at 06:51:13PM +0200, Christophe Leroy wrote: > > > flush/clean/invalidate _dcache_range() functions are all very > > > similar and are quite short. They are mainly used in

Re: [PATCH v2 05/25] powerpc/8xx: Fix vaddr for IMMR early remap

2015-10-08 Thread Scott Wood
On Thu, 2015-10-08 at 14:34 +0200, Christophe Leroy wrote: > Le 29/09/2015 01:39, Scott Wood a écrit : > > On Tue, Sep 22, 2015 at 06:50:38PM +0200, Christophe Leroy wrote: > > > Memory: 124428K/131072K available (3748K kernel code, 188K rwdata, > > > 648K rodata, 508K init, 290K bss, 6644K reserve

[GIT PULL] strscpy powerpc fix for 4.3 - not 3.4 :-)

2015-10-08 Thread Chris Metcalf
On 10/08/2015 02:45 PM, Guenter Roeck wrote: On Wed, Oct 07, 2015 at 08:27:38PM -0400, Chris Metcalf wrote: On 10/7/2015 6:44 PM, Stephen Rothwell wrote: Hi Linus, After merging Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: lib/string.c: In function 'strscp

[PATCH 1/6] powerpc/kconfig: Move NR_IRQS into "Kernel Options"

2015-10-08 Thread Michael Ellerman
Currently the NR_IRQS option sits at the top level, which is ugly in menuconfig. It's not something users will commonly need to worry about so move it into "Kernel Options". Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 20 ++-- 1 file changed, 10 insertions(+), 10 d

[PATCH 2/6] powerpc/kconfig: Move sysdev Kconfig later

2015-10-08 Thread Michael Ellerman
Things in sysdev are generally not what we want near the top of the menuconfig, so move them down later in the list. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index c6f1

[PATCH 3/6] powerpc/kconfig: Move bitness & endian options to the top

2015-10-08 Thread Michael Ellerman
We want the 64/32-bit choice, and the little/big endian choice to be at the very top of the menuconfig. That is because they have the most effect on what other options are available, so it makes sense to set them first. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig |

[PATCH 4/6] powerpc/kconfig: Move SCOM_DEBUGFS into "Kernel Hacking"

2015-10-08 Thread Michael Ellerman
Currently SCOM_DEBUGFS appears at the top level in menuconfig, but it's not particularly important so shouldn't really be there. Move it under "Kernel Hacking" which seems more appropriate. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig.debug | 5 + arch/powerpc/sysdev/Kconfig | 5

[PATCH 5/6] powerpc/kconfig: Move cpu options after platform options

2015-10-08 Thread Michael Ellerman
In general platforms are a more important configuration decision than cpus, so the platforms should come first. My basis for saying that is that our cpu selection options are generally just about tuning for a cpu, rather than enabling/disabling support for a cpu. On the other hand disabling a plat

[PATCH 6/6] powerpc/kconfig: Cell CPU options should depend on PPC_CELL

2015-10-08 Thread Michael Ellerman
If none of the Cell platforms are enabled then the resulting kernel can never boot on a Cell machine, and so there's no sense offering to tune or build for Cell CPUs. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/Kconfig.cputype | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH 1/6] powerpc/kconfig: Move NR_IRQS into "Kernel Options"

2015-10-08 Thread Arnd Bergmann
On Friday 09 October 2015 08:09:12 Michael Ellerman wrote: > Currently the NR_IRQS option sits at the top level, which is ugly in > menuconfig. It's not something users will commonly need to worry about > so move it into "Kernel Options". > > Signed-off-by: Michael Ellerman > Is this option act

[PATCH v7 09/60] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2015-10-08 Thread Yinghai Lu
For device resource PREF bit setting under bridge 64-bit pref resource, we need to make sure only set PREF for 64bit resource, so set IORESOUCE_MEM_64 for 64bit resource during of device resource flags parsing. Link: https://bugzilla.kernel.org/show_bug.cgi?id=96261 Link: https://bugzilla.kernel.o

Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation

2015-10-08 Thread Paul E. McKenney
On Thu, Oct 08, 2015 at 01:16:38PM +0200, Peter Zijlstra wrote: > On Thu, Oct 08, 2015 at 02:50:36PM +1100, Michael Ellerman wrote: > > On Wed, 2015-10-07 at 08:25 -0700, Paul E. McKenney wrote: > > > > Currently, we do need smp_mb__after_unlock_lock() to be after the > > > acquisition on PPC -- p

[PATCH v7 51/60] PCI: Unify skip_ioresource_align()

2015-10-08 Thread Yinghai Lu
There are powerpc generic version and x86 local version for skip_ioresource_align(). Move the powerpc version to setup-bus.c, and kill x86 local version. Also kill dummy version in microblaze. Cc: Michal Simek Cc: Paul Mackerras Cc: Michael Ellerman Cc: Arnd Bergmann Cc: linuxppc-dev@lists.o

Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation

2015-10-08 Thread Paul E. McKenney
On Thu, Oct 08, 2015 at 01:59:38PM +0100, Will Deacon wrote: > On Thu, Oct 08, 2015 at 01:16:38PM +0200, Peter Zijlstra wrote: > > On Thu, Oct 08, 2015 at 02:50:36PM +1100, Michael Ellerman wrote: > > > On Wed, 2015-10-07 at 08:25 -0700, Paul E. McKenney wrote: > > > > > > Currently, we do need sm

[PATCH v7 58/60] PCI: Introduce resource_disabled()

2015-10-08 Thread Yinghai Lu
Current is using !flags, and we are going to use IORESOURCE_DISABLED instead of clearing resource flags. Let's convert all !flags to helper function resource_disabled(). resource_disabled will check !flags and IORESOURCE_DISABLED both. Cc: linux-al...@vger.kernel.org Cc: linux-i...@vger.kernel.or

[PATCH V5 1/6] powerpc/powernv: don't enable SRIOV when VF BAR has non 64bit-prefetchable BAR

2015-10-08 Thread Wei Yang
On PHB_IODA2, we enable SRIOV devices by mapping IOV BAR with M64 BARs. If a SRIOV device's IOV BAR is not 64bit-prefetchable, this is not assigned from 64bit prefetchable window, which means M64 BAR can't work on it. The reason is PCI bridges support only 2 windows and the kernel code programs br

[PATCH V5 0/6] Redesign SR-IOV on PowerNV

2015-10-08 Thread Wei Yang
In original design, it tries to group VFs to enable more number of VFs in the system, when VF BAR is bigger than 64MB. This design has a flaw in which one error on a VF will interfere other VFs in the same group. This patch series change this design by using M64 BAR in Single PE mode to cover only

[PATCH V5 2/6] powerpc/powernv: simplify the calculation of iov resource alignment

2015-10-08 Thread Wei Yang
The alignment of IOV BAR on PowerNV platform is the total size of the IOV BAR. No matter whether the IOV BAR is extended with number of roundup_pow_of_two(total_vfs) or number of max PE number (256), the total size could be calculated by (vfs_expanded * VF_BAR_size). This patch simplifies the pnv_

[PATCH V5 4/6] powerpc/powernv: replace the hard coded boundary with gate

2015-10-08 Thread Wei Yang
At the moment 64bit-prefetchable window can be maximum 64GB, which is currently got from device tree. This means that in shared mode the maximum supported VF BAR size is 64GB/256=256MB. While this size could exhaust the whole 64bit-prefetchable window. This is a design decision to set a boundary to

[PATCH V5 5/6] powerpc/powernv: boundary the total VF BAR size instead of the individual one

2015-10-08 Thread Wei Yang
Each VF could have 6 BARs at most. When the total BAR size exceeds the gate, after expanding it will also exhaust the M64 Window. This patch limits the boundary by checking the total VF BAR size instead of the individual BAR. Signed-off-by: Wei Yang Reviewed-by: Gavin Shan Acked-by: Alexey Kard

[PATCH V5 3/6] powerpc/powernv: use one M64 BAR in Single PE mode for one VF BAR

2015-10-08 Thread Wei Yang
In current implementation, when VF BAR is bigger than 64MB, it uses 4 M64 BARs in Single PE mode to cover the number of VFs required to be enabled. By doing so, several VFs would be in one VF Group and leads to interference between VFs in the same group. And in this patch, m64_wins is renamed to m

[PATCH V5 6/6] powerpc/powernv: allocate sparse PE# when using M64 BAR in Single PE mode

2015-10-08 Thread Wei Yang
When M64 BAR is set to Single PE mode, the PE# assigned to VF could be sparse. This patch restructures the code to allocate sparse PE# for VFs when M64 BAR is set to Single PE mode. Also it rename the offset to pe_num_map to reflect the content is the PE number. Signed-off-by: Wei Yang Reviewed-

[PATCH] powerpc: Quick fix upstream main line build error on PowerPC

2015-10-08 Thread Dongsheng Wang
From: Wang Dongsheng This issue caused on 'commit 990486c8af04 ("strscpy: zero any trailing garbage bytes in the destination")'. zero_bytemask is not implemented on PowerPC. So copy the zero_bytemask of BIG_ENDIAN implementation from include/asm-generic/word-at-a-time.h to arch/powerpc/include/a

[PATCH] powerpc/mm: Differentiate between hugetlb and THP during page walk

2015-10-08 Thread Aneesh Kumar K.V
We need to properly identify whether a hugepage is an explicit or a transparent hugepage in follow_huge_addr(). We used to depend on hugepage shift argument to do that. But in some case that can result in wrong results. For ex: On finding a transparent hugepage we set hugepage shift to PMD_SHIFT.

Re: [PATCH 5/6] powerpc/kconfig: Move cpu options after platform options

2015-10-08 Thread Thomas Huth
On 08/10/15 23:09, Michael Ellerman wrote: > In general platforms are a more important configuration decision than > cpus, so the platforms should come first. > > My basis for saying that is that our cpu selection options are generally > just about tuning for a cpu, rather than enabling/disabling

Re: [PATCH 6/6] powerpc/kconfig: Cell CPU options should depend on PPC_CELL

2015-10-08 Thread Thomas Huth
On 08/10/15 23:09, Michael Ellerman wrote: > If none of the Cell platforms are enabled then the resulting kernel can > never boot on a Cell machine, and so there's no sense offering to tune > or build for Cell CPUs. > > Signed-off-by: Michael Ellerman > --- > arch/powerpc/platforms/Kconfig.cputy

Re: [PATCH 2/6] powerpc/kconfig: Move sysdev Kconfig later

2015-10-08 Thread Thomas Huth
On 08/10/15 23:09, Michael Ellerman wrote: > Things in sysdev are generally not what we want near the top of the > menuconfig, so move them down later in the list. > > Signed-off-by: Michael Ellerman > --- > arch/powerpc/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -