Re: [PATCH 4/4] powerpc/powernv: Fix little endian issues OPAL error log code

2014-03-27 Thread Stewart Smith
Anton Blanchard an...@samba.org writes: Fix little endian issues with the OPAL error log code. Signed-off-by: Anton Blanchard an...@samba.org Reviewed-by: Stewart Smith stew...@linux.vnet.ibm.com Do we also need any magic for the getting of error logs themselves? You may want to check the

Re: [PATCH 1/1] mm: move FAULT_AROUND_ORDER to arch/

2014-03-27 Thread Madhavan Srinivasan
On Tuesday 25 March 2014 11:06 PM, Kirill A. Shutemov wrote: On Tue, Mar 25, 2014 at 12:20:15PM +0530, Madhavan Srinivasan wrote: Kirill A. Shutemov with the commit 96bacfe542 introduced vm_ops-map_pages() for mapping easy accessible pages around fault address in hope to reduce number of minor

[PATCH] phy/at8031: enable at8031 to work on interrupt mode

2014-03-27 Thread Zhao Qiang
The at8031 can work on polling mode and interrupt mode. Add ack_interrupt and config intr funcs to enable interrupt mode for it. Signed-off-by: Zhao Qiang b45...@freescale.com --- drivers/net/phy/at803x.c | 30 ++ 1 file changed, 30 insertions(+) diff --git

Re: [PATCH v4] powernv: Dynamic Frequency Scaling Enablement

2014-03-27 Thread Benjamin Herrenschmidt
On Thu, 2014-03-27 at 11:08 +0530, Viresh Kumar wrote: On 26 March 2014 22:25, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: This is the v4 of the patchset to enable Dynamic Frequency Scaling on IBM PowerNV Platforms. I have incorporated the review comments from the previous version (can

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Viresh Kumar
Cc'ing Rafael. On 26 March 2014 22:25, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Backend driver to dynamically set voltage and frequency on IBM POWER non-virtualized platforms. Power management SPRs are used to set the required

Re: [PATCH v4] powernv: Dynamic Frequency Scaling Enablement

2014-03-27 Thread Viresh Kumar
On 27 March 2014 11:58, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: Any other comment ? :-) Just gave on the patch.. Because it depends on some other stuff in -next, I think it's best if this gets merged via Rafael's tree, unless someone can point me at the necessary

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Gautham R Shenoy
On Thu, Mar 27, 2014 at 12:09:53PM +0530, Viresh Kumar wrote: Cc'ing Rafael. Thanks. It was a lapse on my part by not Cc'ing Rafael in the first place. On 26 March 2014 22:25, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com

RE: [PATCH] ASoC: fsl_sai: Add isr to deal with error flag

2014-03-27 Thread David Laight
From: Mark Brown On Wed, Mar 26, 2014 at 11:59:53AM +, David Laight wrote: From: Nicolin Chen + regmap_read(sai-regmap, FSL_SAI_TCSR, xcsr); + regmap_write(sai-regmap, FSL_SAI_TCSR, xcsr); Assuming these are 'write to clear' bits, you might want to make the write (above) and

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Viresh Kumar
On 27 March 2014 15:00, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: As of now, I prefer this patch be based on code that is in the -next tree. I'll get rid of the per-core locking once the serialization patch of the core is accepted. Okay.. Then divide this patch into two parts, second one

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Vaidyanathan Srinivasan
* Gautham R Shenoy e...@linux.vnet.ibm.com [2014-03-27 15:00:50]: [snip] + u32 len_ids, len_freqs; + + power_mgt = of_find_node_by_path(/ibm,opal/power-mgt); + if (!power_mgt) { + pr_warn(power-mgt node not found\n); + return

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Srivatsa S. Bhat
On 03/27/2014 03:29 PM, Viresh Kumar wrote: On 27 March 2014 15:00, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: As of now, I prefer this patch be based on code that is in the -next tree. I'll get rid of the per-core locking once the serialization patch of the core is accepted. [...] +

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Viresh Kumar
On 27 March 2014 15:41, Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com wrote: Why do you need to get these from DT? And not find that yourself here instead? DT provides the values that we should use. Ideally these are the upper and lower limits of the PState table, however as per the

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Viresh Kumar
On 27 March 2014 15:51, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: smp_processor_id() maps to debug_smp_processor_id() only if CONFIG_DEBUG_PREEMPT is set. Otherwise, it is same as raw_smp_processor_id(). So I think its best to keep it as it is. That was the case in .configs and

MPC8641 based custom board Kernel stuck at 1000Mhz core clock

2014-03-27 Thread Ashish
Hi, I am using MPC8641-HPCN based custom board and able to boot linux at MPX clock 400Mhz and core clock 800mhz. When I am increasing core frequency ie MPX clock at 400Mhz and core at 1Ghz, kernel stuck. Does any body have faced this kind of issue ? Or any idea how to resolve this?

Re: [PATCH] ASoC: fsl_sai: Add isr to deal with error flag

2014-03-27 Thread Mark Brown
On Thu, Mar 27, 2014 at 11:57:27AM +0800, Nicolin Chen wrote: On Thu, Mar 27, 2014 at 12:06:53PM +0800, Xiubo Li-B47053 wrote: I have checked in the Vybrid and LS1 SoC datasheets, and they are all the Same as above, and nothing else. Have I missed ? What i.MX IC team told me is SAI

[PATCH v2] ASoC: fsl_sai: Add isr to deal with error flag

2014-03-27 Thread Nicolin Chen
It's quite cricial to clear error flags because SAI might hang if getting FIFO underrun during playback (I haven't confirmed the same issue on Rx overflow though). So this patch enables those irq and adds isr() to clear the flags so as to keep playback entirely safe. Signed-off-by: Nicolin Chen

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Benjamin Herrenschmidt
On Thu, 2014-03-27 at 15:00 +0530, Gautham R Shenoy wrote: --- a/arch/powerpc/configs/pseries_le_defconfig +++ b/arch/powerpc/configs/pseries_le_defconfig @@ -350,3 +350,4 @@ CONFIG_CRYPTO_LZO=m # CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_DEV_NX=y

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Gautham R Shenoy
On Thu, Mar 27, 2014 at 03:29:36PM +0530, Viresh Kumar wrote: On 27 March 2014 15:00, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: As of now, I prefer this patch be based on code that is in the -next tree. I'll get rid of the per-core locking once the serialization patch of the core is

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Viresh Kumar
On 27 March 2014 16:50, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: (That said, in the future if we want to export additional information, say pertaining to the voltage, we will have to keep a separate array anyway :-) ) Lets handle that once it comes. However, as of now, I am wary about

Re: [PATCH] phy/at8031: enable at8031 to work on interrupt mode

2014-03-27 Thread Sergei Shtylyov
Hello. On 27-03-2014 10:18, Zhao Qiang wrote: The at8031 can work on polling mode and interrupt mode. Add ack_interrupt and config intr funcs to enable interrupt mode for it. Signed-off-by: Zhao Qiang b45...@freescale.com --- drivers/net/phy/at803x.c | 30 ++

[PATCH 1/2] video/fsl: Fix the sleep function for FSL DIU module

2014-03-27 Thread Jason Jin
For deep sleep, the diu module will power off, when wake up from the deep sleep, more registers need to be reinitialized. Signed-off-by: Wang Dongsheng dongsheng.w...@freescale.com Signed-off-by: Jason Jin jason@freescale.com --- V2: Coding style clean up based on Timur's comments.

[PATCH 2/2] Make the diu driver work without board level initilization

2014-03-27 Thread Jason Jin
So far the DIU driver does not have a mechanism to do the board specific initialization. So on some platforms, such as P1022, 8610 and 5121, The board specific initialization is implmented in the platform file such p10222_ds. Actually, the DIU is already intialized in the u-boot, the pin sharing

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Benjamin Herrenschmidt
On Thu, 2014-03-27 at 16:50 +0530, Gautham R Shenoy wrote: Well, in the scenarios that we're interested in, it is highly unlikely that CONFIG_PREMPT is set. Hence we'll default to raw_smp_processor_id() anyway. So, I think we can retain smp_processor_id(). We don't know that. Some people

Re: [PATCH] ASoC: fsl_sai: Add isr to deal with error flag

2014-03-27 Thread Mark Brown
On Thu, Mar 27, 2014 at 09:41:20AM +, David Laight wrote: From: Mark Brown The trace is already conditional? I'd also expect to see the driver only acknowledging sources it knows about and only reporting that the interrupt was handled if it saw one of them - right now all interrupts

[PATCH] ALSA: snd-aoa: Add another layout entry for PowerBook6,5

2014-03-27 Thread Adam Smith
Either one or a combination of commits 3a3dd0186f619b74e61e6f29dddcaf59af7d3cac Improve detection of devices from device-tree and 26b0d14106954ae46d2f4f7eec3481828a210f7d Adapt to new i2c probing scheme broke the snd-powermac module for my PowerBook6,5 machine (12 iBook late 2004). As I

Re: [PATCH v2] ASoC: fsl_sai: Add isr to deal with error flag

2014-03-27 Thread Mark Brown
On Thu, Mar 27, 2014 at 07:06:59PM +0800, Nicolin Chen wrote: It's quite cricial to clear error flags because SAI might hang if getting FIFO underrun during playback (I haven't confirmed the same issue on Rx overflow though). So this patch enables those irq and adds isr() to clear the flags

Re: Bug in reclaim logic with exhausted nodes?

2014-03-27 Thread Nishanth Aravamudan
Hi Christoph, On 25.03.2014 [13:25:30 -0500], Christoph Lameter wrote: On Tue, 25 Mar 2014, Nishanth Aravamudan wrote: On power, very early, we find the 16G pages (gpages in the powerpc arch code) in the device-tree: early_setup - early_init_mmu - htab_initialize -

Re: [PATCH 4/4] powerpc/powernv: Fix little endian issues OPAL error log code

2014-03-27 Thread Anton Blanchard
Hi Stewart, Do we also need any magic for the getting of error logs themselves? You may want to check the md5 of the logs themselves on be and le. Good idea. An md5 of the logs in LE and BE on this box checks out, so I think we are good. Anton

[PATCH 1/2] powerpc/powernv: Fix endian issues with OPAL async code

2014-03-27 Thread Anton Blanchard
Byteswap struct opal_msg in one place instead of requiring all the callers to do it. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h +++

[PATCH 2/2] powerpc/powernv: Fix endian issues with sensor code

2014-03-27 Thread Anton Blanchard
One OPAL call and one device tree property needed byte swapping. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/platforms/powernv/opal-sensor.c === --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++

Re: [PATCH 1/2] powerpc/powernv: Fix endian issues with OPAL async code

2014-03-27 Thread Benjamin Herrenschmidt
On Fri, 2014-03-28 at 09:17 +1100, Anton Blanchard wrote: Byteswap struct opal_msg in one place instead of requiring all the callers to do it. This will clash with us making opal.h something clean and identical between OPAL and clients. Can you rename the converted version instead ? (yeah I

[PATCH 0/2] OPAL message log interface

2014-03-27 Thread Joel Stanley
These two patches add support for the message log, and expose a new OPAL call called opal_invalid that allow me to cause OPAL to inject messages into the log. The naming is a bit mixed, as our device tree node is opal-memcons and I retained the naming of the header structure 'struct memcons', but

[PATCH 1/2] powerpc/powernv: Add OPAL message log interface

2014-03-27 Thread Joel Stanley
OPAL provides an in-memory circular buffer containing a message log populated with various runtime messages produced by the firmware. Provide a sysfs interface /sys/firmware/opal/messages for userspace to view the messages. Signed-off-by: Joel Stanley j...@jms.id.au ---

[PATCH 2/2] powerpc/powernv: Add invalid OPAL call

2014-03-27 Thread Joel Stanley
This call will not be understood by OPAL, and cause it to add an error to it's log. Among other things, this is useful for testing the behaviour of the log as it fills up. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm/opal.h| 2 ++

Re: MPC8641 based custom board Kernel stuck at 1000Mhz core clock

2014-03-27 Thread Valdis . Kletnieks
On Thu, 27 Mar 2014 16:04:37 +0530, Ashish said: Hi, I am using MPC8641-HPCN based custom board and able to boot linux at MPX clock 400Mhz and core clock 800mhz. When I am increasing core frequency ie MPX clock at 400Mhz and core at 1Ghz, kernel stuck. Step 0: Prove to us that your core

[PATCH 2/7] powerpc: Make boot_cpuid common between 32 and 64-bit

2014-03-27 Thread Benjamin Herrenschmidt
Move the definition to setup-common.c and set the init value to -1 on both 32 and 64-bit (it was 0 on 64-bit). Additionally add a check to prom.c to garantee that the init value has been udpated after the DT scan. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org ---

[PATCH 5/7] powerpc/ppc64: Do not turn AIL (reloc-on interrupts) too early

2014-03-27 Thread Benjamin Herrenschmidt
Turn them on at the same time as we allow MSR_IR/DR in the paca kernel MSR, ie, after the MMU has been setup enough to be able to handle relocated access to the linear mapping. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/kernel/cpu_setup_power.S | 2 --

[PATCH 3/7] powerpc/prom: early_init_dt_scan_cpus() updates cpu features only once

2014-03-27 Thread Benjamin Herrenschmidt
All our cpu feature updates were done for every CPU in the device-tree, thus overwriting the cputable bits over and over again. Instead do them only for the boot CPU. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/kernel/prom.c | 52

[PATCH 4/7] powerpc/ppc64: Gracefully handle early interrupts

2014-03-27 Thread Benjamin Herrenschmidt
If we take an interrupt such as a trap caused by a BUG_ON before the MMU has been setup, the interrupt handlers try to enable virutal mode and cause a recursive crash, making the original problem very hard to debug. This fixes it by adjusting the kernel_msr value in the PACA so that it only has

[PATCH 6/7] powerpc/powernv: Add opal_notifier_unregister() and export to modules

2014-03-27 Thread Benjamin Herrenschmidt
opal_notifier_register() is missing a pending unregister variant and should be exposed to modules. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/include/asm/opal.h | 2 ++ arch/powerpc/platforms/powernv/opal.c | 14 ++ 2 files changed, 16

[PATCH 1/7] powerpc: Adjust CPU_FTR_SMT on all platforms

2014-03-27 Thread Benjamin Herrenschmidt
For historical reasons that code was under #ifdef CONFIG_PPC_PSERIES but it applies equally to all 64-bit platforms. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/kernel/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 7/7] tty/hvc_opal: Kick the HVC thread on OPAL console events

2014-03-27 Thread Benjamin Herrenschmidt
The firmware can notify us when new input data is available, so let's make sure we wakeup the HVC thread in that case. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- drivers/tty/hvc/hvc_opal.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-)

Re: [PATCH v2] ASoC: fsl_sai: Add isr to deal with error flag

2014-03-27 Thread Nicolin Chen
On Thu, Mar 27, 2014 at 01:26:27PM +, Mark Brown wrote: On Thu, Mar 27, 2014 at 07:06:59PM +0800, Nicolin Chen wrote: It's quite cricial to clear error flags because SAI might hang if getting FIFO underrun during playback (I haven't confirmed the same issue on Rx overflow though).

Re: [PATCH 3/7] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-03-27 Thread Hongbo Zhang
On 03/11/2014 07:06 PM, Vinod Koul wrote: On Thu, Jan 16, 2014 at 01:47:22PM +0800, hongbo.zh...@freescale.com wrote: From: Hongbo Zhang hongbo.zh...@freescale.com There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Viresh Kumar
On 27 March 2014 15:00, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: As of now, I prefer this patch be based on code that is in the -next tree. I'll get rid of the per-core locking once the serialization patch of the core is accepted. Okay, its pushed in -next now :)

[PATCH 1/2] powerpc/powernv: Fix endian issues with OPAL async code

2014-03-27 Thread Anton Blanchard
OPAL defines opal_msg as a big endian struct so we have to byte swap it on little endian builds. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/include/asm/opal.h === --- a/arch/powerpc/include/asm/opal.h

[PATCH 2/2] powerpc/powernv: Fix endian issues with sensor code

2014-03-27 Thread Anton Blanchard
One OPAL call and one device tree property needed byte swapping. Signed-off-by: Anton Blanchard an...@samba.org --- Index: b/arch/powerpc/platforms/powernv/opal-sensor.c === --- a/arch/powerpc/platforms/powernv/opal-sensor.c +++

[PATCH 1/3] powerpc/tm: Disable IRQ in tm_recheckpoint

2014-03-27 Thread Michael Neuling
We can't take an IRQ when we're about to do a trechkpt as our GPR state is set to user GPR values. We've hit this when running some IBM Java stress tests in the lab resulting in the following dump: cpu 0x3f: Vector: 700 (Program Check) at [c7eb3d40] pc: c0050074:

[PATCH 2/3] powerpc/tm: Remove unnecessary r1 save

2014-03-27 Thread Michael Neuling
We save r1 to the scratch SPR and restore it from there after the trechkpt so saving r1 to the paca is not needed. Signed-off-by: Michael Neuling mi...@neuling.org --- arch/powerpc/kernel/tm.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/tm.S

[PATCH 3/3] powerpc/tm: Add checking to treclaim/trechkpt

2014-03-27 Thread Michael Neuling
If we do a treclaim and we are not in TM suspend mode, it results in a TM bad thing (ie. a 0x700 program check). Similarly if we do a trechkpt and we have an active transaction or TEXASR Failure Summary (FS) is not set, we also take a TM bad thing. This should never happen, but if it does (ie. a

[PATCH] powerpc: Remove dead code in sycall entry

2014-03-27 Thread Michael Neuling
In: commit 742415d6b66bf09e3e73280178ef7ec85c90b7ee Author: Michael Neuling mi...@neuling.org powerpc: Turn syscall handler into macros We converted the syscall entry code onto macros, but in doing this we introduced some cruft that's never run and should never have been added. This