[PATCH 1/2] powerpc/crash: Remove the test for cpu_online in the IPI callback

2017-12-13 Thread Balbir Singh
Our check was extra cautious, we've audited crash_send_ipi and it sends an IPI only to online CPU's. Removal of this check should have not functional impact on crash kdump. Signed-off-by: Balbir Singh --- arch/powerpc/kernel/crash.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powe

[PATCH 2/2] powernv/kdump: Fix cases where the kdump kernel can get HMI's

2017-12-13 Thread Balbir Singh
Certain HMI's such as malfunction error propagate through all threads/core on the system. If a thread was offline prior to us crashing the system and jumping to the kdump kernel, bad things happen when it wakes up due to an HMI in the kdump kernel. There are several possible ways to solve this pro

Re: [PATCH 2/2] powernv/kdump: Fix cases where the kdump kernel can get HMI's

2017-12-13 Thread Nicholas Piggin
This is looking pretty nice now... On Wed, 13 Dec 2017 19:08:28 +1100 Balbir Singh wrote: > @@ -543,7 +543,25 @@ void smp_send_debugger_break(void) > #ifdef CONFIG_KEXEC_CORE > void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)) > { > + int cpu; > + > smp_send_nmi_ipi(

[PATCH] powerpc/sysdev: change CPM GPIO to platform_device

2017-12-13 Thread Christophe Leroy
Since commit 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors"), gpio chips have to have a parent, otherwise devprop_gpiochip_set_names() prematurely exists with message "GPIO chip parent is NULL" and doesn't proceed 'gpio-line-names' DT property. This patch wr

[PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-13 Thread Abhishek Goel
Frequency-domain indicates group of CPUs that would share same frequency. It is detected using device-tree node "frequency-domain-indicator". frequency-domain-indicator is a bitmask which will have different value depending upon the generation of the processor. CPUs of the same chip for which the

[PATCH v1 0/7] SR-IOV Enablement on PowerVM

2017-12-13 Thread Bryant G. Ly
This patch series will enable SR-IOV on PowerVM. A specific set of lids for PFW/PHYP is required. They are planned to release with 920 at the moment. For IBM internal testers let me know of a system you want to test on and we can put on the lids required or we can provide a system to run the tests

[PATCH v1 1/7] platform/pseries: Update VF config space after EEH

2017-12-13 Thread Bryant G. Ly
Add EEH platform operations for pseries to update VF config space. With this change after EEH, the VF will have updated config space for pseries platform. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/platforms/pseries/eeh_pseries.c | 85 +++

[PATCH v1 3/7] platforms/pseries: Set eeh_pe of EEH_PE_VF type

2017-12-13 Thread Bryant G. Ly
To correctly use EEH code one has to make sure that the EEH_PE_VF is set for dynamic created VFs. Therefore this patch allocates an eeh_pe of eeh type EEH_PE_VF and associates PE with parent. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/include/asm/pci-bridge.h

[PATCH v1 5/7] powerpc/kernel: Add EEH notify resume sysfs

2017-12-13 Thread Bryant G. Ly
Introduce a method for notify resume to be called from sysfs. In this patch one can now call notify resume from sysfs when is supported by platform. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/kernel/eeh_sysfs.c | 46 - 1 f

[PATCH v1 4/7] powerpc/kernel Add EEH operations to notify resume

2017-12-13 Thread Bryant G. Ly
When pseries SR-IOV is enabled and after a PF driver has resumed from EEH, platform has to be notified of the event so the child VFs can be allowed to resume their normal recovery path. This patch makes the EEH operation allow unfreeze platform dependent code and adds the call to pseries EEH code.

[PATCH v1 7/7] pseries/setup: Add Initialization of VF Bars

2017-12-13 Thread Bryant G. Ly
When enabling SR-IOV in pseries platform, the VF bar properties for a PF are reported on the device node in the device tree. This patch adds the IOV Bar resources to Linux structures from the device tree for later use when configuring SR-IOV by PF driver. Signed-off-by: Bryant G. Ly Signed-off-b

[PATCH v1 6/7] pseries/pci: Associate PEs to VFs in configure SR-IOV

2017-12-13 Thread Bryant G. Ly
After initial validation of SR-IOV resources, firmware will associate PEs to the dynamic VFs created within this call. This patch adds the association of PEs to the PF array of PE numbers indexed by VF. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/platforms/pserie

[PATCH v1 2/7] powerpc/kernel: Add uevents in EEH error/resume

2017-12-13 Thread Bryant G. Ly
Devices can go offline when EEH is reported. This patch adds a change to the kernel object and lets udev know of error. When device resumes a change is also set reporting device as online. Therefore, EEH events are better propagated to user space for devices in powerpc arch. Signed-off-by: Bryant

[PATCH V3] cxl: Add support for ASB_Notify on POWER9

2017-12-13 Thread Christophe Lombard
The POWER9 core supports a new feature: ASB_Notify which requires the support of the Special Purpose Register: TIDR. The ASB_Notify command, generated by the AFU, will attempt to wake-up the host thread identified by the particular LPID:PID:TID. This patch assign a unique TIDR (thread id) for the

[PATCH 0/3] SoC/FSL/QE: Adjustments for three function implementations

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 18:28:38 +0100 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete an error message for a failed memory allocation in three functions Improve a size determination in two functions Use comm

[PATCH 1/3] soc/fsl/qe: Delete an error message for a failed memory allocation in three functions

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 17:45:23 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/soc/fsl/qe/gpio.c | 4 +--- drivers/soc/fsl/qe/ucc_fast.

[PATCH 2/3] soc/fsl/qe: Improve a size determination in two functions

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 17:51:21 +0100 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detec

[PATCH 3/3] soc/fsl/qe: Use common error handling code in ucc_fast_init()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 18:18:56 +0100 Add jump targets so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/soc/fsl/qe/ucc_fast.c | 32 1 file changed, 16 insertions

Re: [PATCH v2 03/11] ASoC: fsl_ssi: Refine all comments

2017-12-13 Thread Maciej S. Szmigiero
On 13.12.2017 07:34, Nicolin Chen wrote: > This patch refines the comments by: > 1) Removing all out-of-date comments > 2) Removing all not-so-useful comments > 3) Unifying the styles of all comments > 4) Simplifying over-descriptive comments > 5) Adding comments to improve code readablity > 6) Mov

Re: [PATCH v2 05/11] ASoC: fsl_ssi: Refine indentations and wrappings

2017-12-13 Thread Maciej S. Szmigiero
On 13.12.2017 07:34, Nicolin Chen wrote: > This patch just simply unifies the coding style. > > Signed-off-by: Nicolin Chen > --- > > Changelog > v1->v2 > * Added two missing indentation changes > * Removed two extra blank lines. > > sound/soc/fsl/fsl_ssi.c | 239 > +

Re: [PATCH v2 05/11] ASoC: fsl_ssi: Refine indentations and wrappings

2017-12-13 Thread Nicolin Chen
On Wed, Dec 13, 2017 at 11:30:31PM +0100, Maciej S. Szmigiero wrote: > On 13.12.2017 07:34, Nicolin Chen wrote: > > This patch just simply unifies the coding style. > > > > Signed-off-by: Nicolin Chen > > --- > > > > Changelog > > v1->v2 > > * Added two missing indentation changes > > * Remove

Re: [PATCH v2 03/11] ASoC: fsl_ssi: Refine all comments

2017-12-13 Thread Nicolin Chen
On Wed, Dec 13, 2017 at 11:28:51PM +0100, Maciej S. Szmigiero wrote: > > - /* > > -* If we're in synchronous mode, and the SSI is already enabled, > > -* then STCCR is already set properly. > > -*/ > > + /* To support simultaneous TX and RX, bypass it if SSI is enabled */ > > i

Re: [PATCH v2 00/11] ASoC: fsl_ssi: Clean up - coding style level

2017-12-13 Thread Maciej S. Szmigiero
On 13.12.2017 07:34, Nicolin Chen wrote: > ==Changelog== > v1->v2 > * Dropped one patch to remove "struct device" > * Revised PATCH-03 "Refine all comments" > * Revised PATCH-05 "Refine indentations and wrappings" > * Rebased all other patches > * Added PATCH-10 "Rename i2smode to i2s_net" >

[PATCH v3 00/11] ASoC: fsl_ssi: Clean up - coding style level

2017-12-13 Thread Nicolin Chen
==Changelog== v2->v3 * Added Tested-by and Reviewed-by from Maciej * Revised PATCH-03 "Refine all comments" by adding Maciej advice * Revised PATCH-05 "Refine indentations and wrappings" v1->v2 * Dropped one patch to remove "struct device" * Revised PATCH-03 "Refine all comments" * Revised PA

[PATCH v3 01/11] ASoC: fsl_ssi: Rename fsl_ssi_private to fsl_ssi

2017-12-13 Thread Nicolin Chen
Shorten the private data structure to save some wrapped lines. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 456 +++- 1 file changed, 220 insertions(+), 236 deletions(-) di

[PATCH v3 02/11] ASoC: fsl_ssi: Cache pdev->dev pointer

2017-12-13 Thread Nicolin Chen
There should be no trouble to understand dev = pdev->dev. This can save some space to have more print info or save some wrapped lines. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 64 --

[PATCH v3 03/11] ASoC: fsl_ssi: Refine all comments

2017-12-13 Thread Nicolin Chen
This patch refines the comments by: 1) Removing all out-of-date comments 2) Removing all not-so-useful comments 3) Unifying the styles of all comments 4) Simplifying over-descriptive comments 5) Adding comments to improve code readablity 6) Moving all register related comments to fsl_ssi.h 7) Addin

[PATCH v3 04/11] ASoC: fsl_ssi: Rename registers and fields macros

2017-12-13 Thread Nicolin Chen
This patch renames CCSR_SSI_xxx to REG_SSI_xxx and SSI_xxx_yyy style. It also slightly reduces the length of them to save some space. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 374 +-

[PATCH v3 06/11] ASoC: fsl_ssi: Refine printk outputs

2017-12-13 Thread Nicolin Chen
This patches unifies the error message in the "failed to " format. It also reduces the length of one line and adds spaces to an operator. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 16 1 file c

[PATCH v3 05/11] ASoC: fsl_ssi: Refine indentations and wrappings

2017-12-13 Thread Nicolin Chen
This patch just simply unifies the coding style. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 239 +--- sound/soc/fsl/fsl_ssi.h | 2 +- sound/soc/fsl/fsl_ssi_dbg.c |

[PATCH v3 07/11] ASoC: fsl_ssi: Rename cpu_dai parameter to dai

2017-12-13 Thread Nicolin Chen
Shortens the variable name to save space, useful for dev_err outputs. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/s

[PATCH v3 08/11] ASoC: fsl_ssi: Rename scr_val to scr

2017-12-13 Thread Nicolin Chen
Simplify the variable name. This reduces one over-80-character line. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c

[PATCH v3 09/11] ASoC: fsl_ssi: Replace fsl_ssi_rxtx_reg_val with fsl_ssi_regvals

2017-12-13 Thread Nicolin Chen
The name fsl_ssi_rxtx_reg_val is too long to read comfortably. So this patch shortens it by using an array (fsl_ssi_regvals, renamed from fsl_ssi_reg_val). To do that, it also introduces two macros (TX and RX) to replace the wrapper structure. This will also help further cleanups. Meanwhile, it un

[PATCH v3 10/11] ASoC: fsl_ssi: Rename i2smode to i2s_net

2017-12-13 Thread Nicolin Chen
Since this i2smode also includes the setting of Network mode, it should have it in the name. This patch also adds its MASK define. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 24 sound/soc/fs

[PATCH v3 11/11] ASoC: fsl_ssi: Define ternary macros to simplify code

2017-12-13 Thread Nicolin Chen
Some regmap code looks redudant. So simplify it. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 27 +++ sound/soc/fsl/fsl_ssi.h | 4 2 files changed, 15 insertions(+), 16 deletions(-) diff

Re: [PATCH 2/2] powernv/kdump: Fix cases where the kdump kernel can get HMI's

2017-12-13 Thread Balbir Singh
On Wed, 13 Dec 2017 20:51:01 +1000 Nicholas Piggin wrote: > This is looking pretty nice now... > > On Wed, 13 Dec 2017 19:08:28 +1100 > Balbir Singh wrote: > > > @@ -543,7 +543,25 @@ void smp_send_debugger_break(void) > > #ifdef CONFIG_KEXEC_CORE > > void crash_send_ipi(void (*crash_ipi_call

[PATCH v2] powerpc/npu: Cleanup MMIO ATSD flushing

2017-12-13 Thread Balbir Singh
While reviewing the code I found that the flush assumes all pages are of mmu_linear_psize, which is not correct. The patch uses find_linux_pte to find the right page size and uses that for launching the ATSD invalidation. A new helper is added to abstract the invalidation from the various notifiers

Re: [PATCH 2/2] powernv/kdump: Fix cases where the kdump kernel can get HMI's

2017-12-13 Thread Nicholas Piggin
On Thu, 14 Dec 2017 11:12:13 +1100 Balbir Singh wrote: > On Wed, 13 Dec 2017 20:51:01 +1000 > Nicholas Piggin wrote: > > > This is looking pretty nice now... > > > > On Wed, 13 Dec 2017 19:08:28 +1100 > > Balbir Singh wrote: > > > > > @@ -543,7 +543,25 @@ void smp_send_debugger_break(void)

Re: [PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-13 Thread Viresh Kumar
+ Gautham, @Gautham: Can you please help reviewing this one ? On 13-12-17, 13:49, Abhishek Goel wrote: > @@ -693,6 +746,8 @@ static int powernv_cpufreq_target_index(struct > cpufreq_policy *policy, > { > struct powernv_smp_call_data freq_data; > unsigned int cur_msec, gpstate_idx; >