Re: [PATCH tip/locking/core v4 1/6] powerpc: atomic: Make *xchg and *cmpxchg a full barrier

2015-10-20 Thread Boqun Feng
On Wed, Oct 14, 2015 at 01:19:17PM -0700, Paul E. McKenney wrote: > > Am I missing something here? If not, it seems to me that you need > the leading lwsync to instead be a sync. > > Of course, if I am not missing something, then this applies also to the > value-returning RMW atomic operations

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

2015-10-20 Thread Boqun Feng
On Mon, Oct 19, 2015 at 12:23:24PM +0200, Peter Zijlstra wrote: > On Mon, Oct 19, 2015 at 09:17:18AM +0800, Boqun Feng wrote: > > This is confusing me right now. ;-) > > > > Let's use a simple example for only one primitive, as I understand it, > > if we say a primitive A is "fully ordered", we

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

2015-10-20 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

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

2015-10-20 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

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

2015-10-20 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

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

2015-10-20 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

Re: [PATCH tip/locking/core v4 1/6] powerpc: atomic: Make *xchg and *cmpxchg a full barrier

2015-10-20 Thread Peter Zijlstra
On Tue, Oct 20, 2015 at 03:15:32PM +0800, Boqun Feng wrote: > On Wed, Oct 14, 2015 at 01:19:17PM -0700, Paul E. McKenney wrote: > > > > Am I missing something here? If not, it seems to me that you need > > the leading lwsync to instead be a sync. > > > > Of course, if I am not missing

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

2015-10-20 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

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

2015-10-20 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:

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

2015-10-20 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

Re: [RFC][PATCH 3/3]perf/powerpc :add support for sampling intr machine state

2015-10-20 Thread AnjuTSudhakar
On Tuesday 20 October 2015 09:50 AM, Madhavan Srinivasan wrote: On Monday 19 October 2015 05:48 PM, Anju T wrote: From: Anju The registers to sample are passed through the sample_regs_intr bitmask. The name and bit position for each register is defined in

Re: [PATCH 1/3] perf/powerpc:add ability to sample intr machine state in power

2015-10-20 Thread AnjuTSudhakar
Hi maddy, On Tuesday 20 October 2015 09:46 AM, Madhavan Srinivasan wrote: On Monday 19 October 2015 05:48 PM, Anju T wrote: From: Anju The enum definition assigns an 'id' to each register in power. I guess it should be "each register in "struct pt_regs" of

Re: linux-next: build warning after merge of the powerpc tree

2015-10-20 Thread Michael Ellerman
On Tue, 2015-10-20 at 16:21 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the powerpc tree, today's linux-next build (powerpc > allyesconfig) produced this warning: > > WARNING: vmlinux.o(.text+0x9367c): Section mismatch in reference from the > function .msi_bitmap_alloc() to the

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

2015-10-20 Thread Boqun Feng
On Mon, Oct 12, 2015 at 04:30:48PM -0700, Paul E. McKenney wrote: > On Fri, Oct 09, 2015 at 07:33:28PM +0100, Will Deacon wrote: > > On Fri, Oct 09, 2015 at 10:43:27AM -0700, Paul E. McKenney wrote: > > > On Fri, Oct 09, 2015 at 10:51:29AM +0100, Will Deacon wrote: [snip] > > > > > We could also

Re: [PATCH 0/5] drivers/tty: make more bool drivers explicitly non-modular

2015-10-20 Thread Alexandre Belloni
On 18/10/2015 at 18:21:13 -0400, Paul Gortmaker wrote : > The one common thread here for all the patches is that we also > scrap the .remove functions which would only be used for module > unload (impossible) and driver unbind. For the drivers here, there > doesn't seem to be a sensible unbind

[RFC PATCH 5/7] powerpc/mm: update frag size

2015-10-20 Thread Aneesh Kumar K.V
--- arch/powerpc/include/asm/book3s/64/hash-64k.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h index 5062c6d423fd..a28dbfe2baed 100644 ---

[RFC PATCH 3/7] powerpc/nohash: Update 64K nohash config to have 32 pte fragement

2015-10-20 Thread Aneesh Kumar K.V
They don't need to track 4k subpage slot details and hence don't need second half of pgtable_t. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/nohash/64/pgtable-64k.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[RFC PATCH 7/7] powerpc/mm: getrid of real_pte_t

2015-10-20 Thread Aneesh Kumar K.V
Now that we don't track 4k subpage slot details, get rid of real_pte Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h| 15 - arch/powerpc/include/asm/book3s/64/pgtable.h | 24

Re: linux-next: build warning after merge of the powerpc tree

2015-10-20 Thread Stephen Rothwell
Hi Michael, On Tue, 20 Oct 2015 21:06:51 +1100 Michael Ellerman wrote: > > On Tue, 2015-10-20 at 16:21 +1100, Stephen Rothwell wrote: > > > After merging the powerpc tree, today's linux-next build (powerpc > > allyesconfig) produced this warning: > > > > WARNING:

[RFC PATCH 4/7] powerpc/mm: Don't track 4k subpage information with 64k linux page size

2015-10-20 Thread Aneesh Kumar K.V
We search the hash table to find the slot information. This slows down the lookup, but we do that only for 4k subpage config Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 33 +--

[RESEND PATCH 1/2] powerpc: platforms: mpc52xx_lpbfifo: Fix module autoload for OF platform driver

2015-10-20 Thread Luis de Bethencourt
From: Luis de Bethencourt This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 1

[RFC PATCH 1/7] powerpc/mm: Don't hardcode page table size

2015-10-20 Thread Aneesh Kumar K.V
pte and pmd table size are dependent on config items. Don't hard code the same. This make sure we use the right value when masking pmd entries and also while checking pmd_bad Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h|

[RESEND PATCH] powerpc: rackmeter: Fix module autoload for OF platform driver

2015-10-20 Thread Luis de Bethencourt
From: Luis de Bethencourt This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- Hi, This is a resend of a patch sent September

Re: [PATCH tip/locking/core v4 1/6] powerpc: atomic: Make *xchg and *cmpxchg a full barrier

2015-10-20 Thread Paul E. McKenney
On Tue, Oct 20, 2015 at 11:21:47AM +0200, Peter Zijlstra wrote: > On Tue, Oct 20, 2015 at 03:15:32PM +0800, Boqun Feng wrote: > > On Wed, Oct 14, 2015 at 01:19:17PM -0700, Paul E. McKenney wrote: > > > > > > Am I missing something here? If not, it seems to me that you need > > > the leading

[RFC PATCH 0/7] Remove 4k subpage tracking with hash 64K config

2015-10-20 Thread Aneesh Kumar K.V
Hi, This patch series is on top of the series posted at https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-October/135299.html "[PATCH V4 00/31] powerpc/mm: Update page table format for book3s 64". In this series we remove 4k subpage tracking with 64K config. Instead we do a hash table lookup

[RFC PATCH 2/7] powerpc/mm: Don't hardcode the hash pte slot shift

2015-10-20 Thread Aneesh Kumar K.V
Use the #define instead of open-coding the same Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +- arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- 3 files changed,

[RESEND PATCH 0/2] powerpc: Fix module autoload for OF platform drivers

2015-10-20 Thread Luis de Bethencourt
Hi, This is a resend of this patch series. It was posted on September 18 [0] These patches add the missing MODULE_DEVICE_TABLE() for OF to export the information so modules have the correct aliases built-in and autoloading works correctly. A longer explanation by Javier Canillas can be found

[RFC PATCH 6/7] powerpc/mm: Update pte_iterate_hashed_subpaes args

2015-10-20 Thread Aneesh Kumar K.V
Now that we don't really use real_pte_t drop them from iterator argument list. The follow up patch will remove real_pte_t completely Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 5 +++--

[RESEND PATCH 2/2] powerpc: axonram: Fix module autoload for OF platform driver

2015-10-20 Thread Luis de Bethencourt
From: Luis de Bethencourt This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- arch/powerpc/sysdev/axonram.c | 1 + 1 file

Re: [PATCH 0/5] drivers/tty: make more bool drivers explicitly non-modular

2015-10-20 Thread Paul Gortmaker
[Re: [PATCH 0/5] drivers/tty: make more bool drivers explicitly non-modular] On 20/10/2015 (Tue 17:10) Alexandre Belloni wrote: > On 18/10/2015 at 18:21:13 -0400, Paul Gortmaker wrote : > > The one common thread here for all the patches is that we also > > scrap the .remove functions which would

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

2015-10-20 Thread Gavin Shan
On Tue, Oct 20, 2015 at 05:03:00PM +0800, Wei Yang wrote: >On PHB_IODA2, we enable SRIOV devices by mapping IOV BAR with M64 BARs. If ^ s/PHB_IODA2/PHB3 or s/PHB_IODA2/IODA2 PHB >a SRIOV device's IOV BAR is not 64bit-prefetchable, this is not assigned >from 64bit prefetchable window,

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

2015-10-20 Thread Paul E. McKenney
On Mon, Oct 19, 2015 at 09:17:18AM +0800, Boqun Feng wrote: > On Fri, Oct 09, 2015 at 10:40:39AM +0100, Will Deacon wrote: > > On Fri, Oct 09, 2015 at 10:31:38AM +0200, Peter Zijlstra wrote: > [snip] > > > > > > So lots of little confusions added up to complete fail :-{ > > > > > > Mostly I

[PATCH v3] powerpc/prom: Avoid reference to potentially freed memory

2015-10-20 Thread Christophe JAILLET
of_get_property() is used inside the loop, but then the reference to the node is dropped before dereferencing the prop pointer, which could by then point to junk if the node has been freed. Instead use of_property_read_u32() to actually read the property value before dropping the reference. Use

Re: [PATCH v6 22/22] of/platform: Defer probes of registered devices

2015-10-20 Thread Scott Wood
On Mon, 2015-09-21 at 16:03 +0200, Tomeu Vizoso wrote: > Instead of trying to match and probe platform and AMBA devices right > after each is registered, delay their probes until device_initcall_sync. > > This means that devices will start probing once all built-in drivers > have registered, and

[PATCH] powerpc/msi: fix section mismatch warning

2015-10-20 Thread Denis Kirjanov
Building with CONFIG_DEBUG_SECTION_MISMATCH gives the following warning: WARNING: vmlinux.o(.text+0x41fa8): Section mismatch in reference from the function .msi_bitmap_alloc() to the function .init.text:.memblock_virt_alloc_try_nid() The function .msi_bitmap_alloc() references the function __init