Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread Gabriel Paubert
On Fri, Feb 07, 2014 at 02:49:40PM -0600, James Yang wrote: > On Fri, 7 Feb 2014, Gabriel Paubert wrote: > > > Hi Stephen, > > > > On Fri, Feb 07, 2014 at 11:27:57AM +1000, Stephen N Chivers wrote: > > > Gabriel Paubert wrote on 02/06/2014 07:26:37 PM: > > > > > > > From: Gabriel Paubert >

RE: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread David Laight
> > However, your other solutions are better. > > > > > > > > > > > > > > mask = (FM & 1); > > > > > mask |= (FM << 3) & 0x10; > > > > > mask |= (FM << 6) & 0x100; > > > > > mask |= (FM << 9) & 0x1000; > > > > > mask |= (FM << 12) & 0x1; > > > > > mask |= (FM << 15) & 0x10; > > > > > mask |

Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread Gabriel Paubert
On Mon, Feb 10, 2014 at 11:17:38AM +, David Laight wrote: > > > However, your other solutions are better. > > > > > > > > > > > > > > > > > > mask = (FM & 1); > > > > > > mask |= (FM << 3) & 0x10; > > > > > > mask |= (FM << 6) & 0x100; > > > > > > mask |= (FM << 9) & 0x1000; > > > > > > mask |=

RE: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread David Laight
> I disagree, perhaps mostly because the compiler is not clever enough, but > right > now the code for solution 1 is (actually I have rewritten the code > and it reads: > > mask = (FM & 1) > | ((FM << 3) & 0x10) > | ((FM << 6) & 0x100) >

Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread Gabriel Paubert
On Mon, Feb 10, 2014 at 12:32:18PM +, David Laight wrote: > > I disagree, perhaps mostly because the compiler is not clever enough, but > > right > > now the code for solution 1 is (actually I have rewritten the code > > and it reads: > > > > mask = (FM & 1) > > | ((FM

Re: [PATCH v2] powerpc ticket locks

2014-02-10 Thread Torsten Duwe
On Mon, Feb 10, 2014 at 02:10:23PM +1100, Benjamin Herrenschmidt wrote: > On Fri, 2014-02-07 at 17:58 +0100, Torsten Duwe wrote: > > typedef struct { > > - volatile unsigned int slock; > > -} arch_spinlock_t; > > + union { > > + __ticketpair_t head_tail; > > +

Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread James Yang
On Sun, 9 Feb 2014, Stephen N Chivers wrote: > James Yang wrote on 02/08/2014 07:49:40 AM: > > > From: James Yang > > To: Gabriel Paubert > > Cc: Stephen N Chivers , Chris Proctor > > , > > Date: 02/08/2014 07:49 AM > > Subject: Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask? > > > > On

Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread James Yang
On Mon, 10 Feb 2014, Gabriel Paubert wrote: > On Fri, Feb 07, 2014 at 02:49:40PM -0600, James Yang wrote: > > On Fri, 7 Feb 2014, Gabriel Paubert wrote: > > > > > Hi Stephen, > > > > > > On Fri, Feb 07, 2014 at 11:27:57AM +1000, Stephen N Chivers wrote: > > > > Gabriel Paubert wrote on 02/06/

Re: [PATCH v2] powerpc ticket locks

2014-02-10 Thread Peter Zijlstra
On Mon, Feb 10, 2014 at 04:52:17PM +0100, Torsten Duwe wrote: > Opinions, anyone? Since the holder thing is a performance thing, not a correctness thing; one thing you could do is something like: static const int OWNER_HASH_SIZE = CONFIG_NR_CPUS * 4; static const int OWNER_HASH_BITS = ilog2(OWNER

Re: [PATCH] mtd: m25p80: Make the name of mtd_info fixed

2014-02-10 Thread Brian Norris
Hi Hou, On Thu, Jan 23, 2014 at 03:29:41AM +, b48...@freescale.com wrote: > > -Original Message- > > From: Brian Norris [mailto:computersforpe...@gmail.com] > > Sent: Thursday, January 23, 2014 10:12 AM > > To: Hou Zhiqiang-B48286 > > Cc: linux-...@lists.infradead.org; linuxppc-...@ozl

Re: [RFC PATCH 2/3] topology: support node_numa_mem() for determining the fallback node

2014-02-10 Thread Nishanth Aravamudan
Hi Christoph, On 07.02.2014 [12:51:07 -0600], Christoph Lameter wrote: > Here is a draft of a patch to make this work with memoryless nodes. > > The first thing is that we modify node_match to also match if we hit an > empty node. In that case we simply take the current slab if its there. > > If

Re: [PATCH v2] mtd: m25p80: Make the name of mtd_info fixed

2014-02-10 Thread Brian Norris
On Sun, Jan 26, 2014 at 02:16:43PM +0800, Hou Zhiqiang wrote: > To give spi flash layout using "mtdparts=..." in cmdline, we must > give mtd_info a fixed name,because the cmdlinepart's parser will > match the name given in cmdline with the mtd_info. > > Now, if use OF node, mtd_info's name will be

[RFT][PATCH 04/12] drivers/macintosh/adb: change platform power management to use dev_pm_ops

2014-02-10 Thread Shuah Khan
Change adb platform driver to register pm ops using dev_pm_ops instead of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces by passing in the right pm state. Signed-off-by: Shuah Khan --- drivers/macintosh/adb.c | 41 - 1 file c

[RFT][PATCH 00/12] change drivers power management to use dev_pm_ops

2014-02-10 Thread Shuah Khan
Change drivers to register pm ops using dev_pm_ops instead of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces by passing in the right pm state. Bus drivers suspend and resume routines call .pm driver hooks if found. Shuah Khan (12): arm: change locomo platform and bus

Re: [PATCH] Handle vmalloc addresses

2014-02-10 Thread Benjamin Herrenschmidt
Hi Nathan ! Please do a better submission :-) Your subject is to be honest, crap. Something like [PATCH] crypto/nx/nx-842: Fix handling of vmalloc addresses Would have been much more informative. Additionally, this is a patch for drivers/crypto, and while that driver is powerpc-specific meanin

[PATCH] powerpc/powernv: Add iommu DMA bypass support for IODA2

2014-02-10 Thread Benjamin Herrenschmidt
this patch adds the support for to create a direct iommu "bypass" window on IODA2 bridges (such as Power8) allowing to bypass iommu page translation completely for 64-bit DMA capable devices, thus significantly improving DMA performances. Additionally, this adds a hook to the struct iommu_table so

Re: [PATCH v2] powerpc ticket locks

2014-02-10 Thread Benjamin Herrenschmidt
(Linus, Al, a question for you down there about lockref "ref" size) On Mon, 2014-02-10 at 16:52 +0100, Torsten Duwe wrote: > What if I squeeze the bits a little? > 4k vCPUs, and 256 physical, as a limit to stay within 32 bits? > At the cost that unlock may become an ll/sc operation again. > I cou

Re: [PATCH v2] powerpc ticket locks

2014-02-10 Thread Al Viro
On Tue, Feb 11, 2014 at 01:44:20PM +1100, Benjamin Herrenschmidt wrote: > That leaves us with 32 bits to put the ref and the owner. The question > is how big the ref really has to be and can we have a reasonable failure > mode if it overflows ? > > If we limit ourselves to, for example, 16-bit for

Re: [PATCH v2] powerpc ticket locks

2014-02-10 Thread Benjamin Herrenschmidt
On Tue, 2014-02-11 at 02:56 +, Al Viro wrote: > > So the question is, is it reasonable to have the ref smaller than > > 32-bit... > > Every time you open a file, you bump dentry refcount. Something like > libc or ld.so will be opened on just about every execve(), so I'd say > that 16 bits is

[PATCH] powerpc/spufs: Remove MAX_USER_PRIO define

2014-02-10 Thread Jeremy Kerr
Current ppc64_defconfig fails with: arch/powerpc/platforms/cell/spufs/sched.c:86:0: error: "MAX_USER_PRIO" redefined [-Werror] cc1: all warnings being treated as errors 6b6350f1 introduced a generic MAX_USER_PRIO macro to sched/prio.h, which is causing the conflit. Use that one instead of our

[PATCH v1 0/2] powernv: cpufreq support for IBM POWERNV platform

2014-02-10 Thread Vaidyanathan Srinivasan
Hi, The following patch series implements the platform driver to support dynamic CPU frequency scaling on IBM POWERNV platforms. This patch series is based on Linux kernel 3.14-rc2 and tested on OPAL v3 based IBM POWERNV platform and IBM POWER8 processor. --Vaidy --- Srivatsa S. Bhat (1):

[PATCH v1 2/2] powernv, cpufreq: Add per-core locking to serialize frequency transitions

2014-02-10 Thread Vaidyanathan Srinivasan
From: Srivatsa S. Bhat On POWER systems, the CPU frequency is controlled at a core-level and hence we need to serialize so that only one of the threads in the core switches the core's frequency at a time. Using a global mutex lock would needlessly serialize _all_ frequency transitions in the sys

[PATCH v1 1/2] powernv: cpufreq driver for powernv platform

2014-02-10 Thread Vaidyanathan Srinivasan
Backend driver to dynamically set voltage and frequency on IBM POWER non-virtualized platforms. Power management SPRs are used to set the required PState. This driver works in conjunction with cpufreq governors like 'ondemand' to provide a demand based frequency and voltage setting on IBM POWER n

Re: [RFC PATCH 2/3] topology: support node_numa_mem() for determining the fallback node

2014-02-10 Thread Joonsoo Kim
On Mon, Feb 10, 2014 at 11:13:21AM -0800, Nishanth Aravamudan wrote: > Hi Christoph, > > On 07.02.2014 [12:51:07 -0600], Christoph Lameter wrote: > > Here is a draft of a patch to make this work with memoryless nodes. > > > > The first thing is that we modify node_match to also match if we hit an

Re: arch/powerpc/math-emu/mtfsf.c - incorrect mask?

2014-02-10 Thread Gabriel Paubert
Hi James, On Mon, Feb 10, 2014 at 11:03:07AM -0600, James Yang wrote: [snipped] > > Ok, if you have measured that method1 is faster than method2, let us go for > > it. > > I believe method2 would be faster if you had a large out-of-order execution > > window, because more parallelism can