Re: [PATCH] EDAC, mv64x60: Remove some code duplication

2018-01-14 Thread Chris Packham
Hi Christophe, On 14/01/18 06:17, Christophe JAILLET wrote: > Le 13/01/2018 à 15:22, Borislav Petkov a écrit : >> + Chris Packham who's been fixing some stuff in here too. >> >> On Sat, Jan 13, 2018 at 08:28:21AM +0100, Christophe JAILLET wrote: >>> Reorder the error handling code in order to

Re: [cryptodev:master 130/134] aes_generic.c:undefined reference to `_restgpr_31_x'

2018-01-14 Thread Arnd Bergmann
On Fri, Jan 12, 2018 at 11:10 PM, Segher Boessenkool wrote: > On Fri, Jan 12, 2018 at 10:45:31PM +0100, Arnd Bergmann wrote: >> > I guess you could enable the _x routines whenever you use ubsan? Ubsan >> > will cause much bigger code growth than the handful of insns

[GIT PULL] Please pull powerpc/linux.git powerpc-4.15-7 tag

2018-01-14 Thread Michael Ellerman
Hi Linus, Please pull some more powerpc fixes for 4.15, sorry these are so late. The following changes since commit ecb101aed86156ec7cd71e5dca668e09146e6994: powerpc/mm: Fix SEGV on mapped region to return SEGV_ACCERR (2018-01-02 21:12:33 +1100) are available in the Git repository at:

Re: [PATCH v2 04/16] ASoC: fsl_ssi: Rename fsl_ssi_disable_val macro

2018-01-14 Thread Maciej S. Szmigiero
On 11.01.2018 07:43, Nicolin Chen wrote: > The define of fsl_ssi_disable_val is not so clear as it mixes two > steps of calculations together. And those parameter names are also > a bit long to read. > > Since it just tries to exclude the shared bits from the regvals of > current stream while the

Re: [cryptodev:master 130/134] aes_generic.c:undefined reference to `_restgpr_31_x'

2018-01-14 Thread Segher Boessenkool
On Sun, Jan 14, 2018 at 10:40:36PM +0100, Arnd Bergmann wrote: > Right. I've done some more investigation anyway, starting over with the > analysis of the gcc options that change it. I've found now that turning > off '-fcode-hoisting' but leaving on the other options I had suspected > earlier (-O2

Re: [PATCH v2 13/16] ASoC: fsl_ssi: Clean up _fsl_ssi_set_dai_fmt()

2018-01-14 Thread Maciej S. Szmigiero
On 11.01.2018 07:43, Nicolin Chen wrote: > The _fsl_ssi_set_dai_fmt() is a helper function being called from > fsl_ssi_set_dai_fmt() as an ASoC operation and fsl_ssi_hw_init() > mainly for AC97 format initialization. > > This patch cleans the _fsl_ssi_set_dai_fmt() in following ways: > * Removing

Re: [PATCH v2 14/16] ASoC: fsl_ssi: Remove cpu_dai_drv from fsl_ssi structure

2018-01-14 Thread Maciej S. Szmigiero
On 11.01.2018 07:43, Nicolin Chen wrote: > The cpu_dai_drv is only used for symmetric_rates. So this patch replaces > it with a synchronous boolean flag. You make cpu_dai_drv common to all SSI instances instead of per-instance. What if you have multiple SSIs in the system with different

Re: [PATCH v2 03/16] ASoC: fsl_ssi: Maintain a mask of active streams

2018-01-14 Thread Nicolin Chen
On Sun, Jan 14, 2018 at 11:34:01PM +0100, Maciej S. Szmigiero wrote: > > + bool dir = (>regvals[TX] == vals) ? TX : RX; > Using a bool variable for a bit index (and array index in other parts > of code) looks just wrong. > > Even a simple int would look better IMHO here (and in patch 5 that >

Re: [PATCH v2 04/16] ASoC: fsl_ssi: Rename fsl_ssi_disable_val macro

2018-01-14 Thread Nicolin Chen
On Sun, Jan 14, 2018 at 11:34:37PM +0100, Maciej S. Szmigiero wrote: > > + /* Check if the opposite stream is active */ > > + aactive = ssi->streams & BIT(!dir); >^ > Here an implicit assumption that either RX == 0, TX == 1 or > RX == 1, TX == 0 still

Re: [PATCH v2 13/16] ASoC: fsl_ssi: Clean up _fsl_ssi_set_dai_fmt()

2018-01-14 Thread Nicolin Chen
On Sun, Jan 14, 2018 at 11:40:31PM +0100, Maciej S. Szmigiero wrote: > > case SND_SOC_DAIFMT_I2S: > > - regmap_update_bits(regs, REG_SSI_STCCR, > > - SSI_SxCCR_DC_MASK, SSI_SxCCR_DC(2)); > > - regmap_update_bits(regs, REG_SSI_SRCCR, > > -

Re: [PATCH v2 14/16] ASoC: fsl_ssi: Remove cpu_dai_drv from fsl_ssi structure

2018-01-14 Thread Nicolin Chen
On Sun, Jan 14, 2018 at 11:42:59PM +0100, Maciej S. Szmigiero wrote: > On 11.01.2018 07:43, Nicolin Chen wrote: > > The cpu_dai_drv is only used for symmetric_rates. So this patch replaces > > it with a synchronous boolean flag. > > You make cpu_dai_drv common to all SSI instances instead of

Re: [PATCH v2 03/16] ASoC: fsl_ssi: Maintain a mask of active streams

2018-01-14 Thread Maciej S. Szmigiero
On 11.01.2018 07:43, Nicolin Chen wrote: > Checking TE and RE bits in SCR register doesn't work for AC97 mode > which enables SSIEN, TE and RE in the fsl_ssi_setup_ac97() that's > called during probe(). > > So when running into the trigger(), it will always get the result > of both TE and RE

Re: [PATCH v2 06/16] ASoC: fsl_ssi: Clean up helper functions of trigger()

2018-01-14 Thread Maciej S. Szmigiero
On 11.01.2018 07:43, Nicolin Chen wrote: > The trigger() calls fsl_ssi_tx_config() and fsl_ssi_rx_config(), > and both of them jump to fsl_ssi_config(). And fsl_ssi_config() > later calls another fsl_ssi_rxtx_config(). > > However, the whole routine, especially fsl_ssi_config() function, > is too

[PATCH 2/6] powerpc: wii: Explicitly configure GPIO owner for poweroff pin

2018-01-14 Thread Jonathan Neuschäfer
The Hollywood chipset's GPIO controller has two sets of registers: One for access by the PowerPC CPU, and one for access by the ARM coprocessor (but both are accessible from the PPC because the memory firewall (AHBPROT) is usually disabled when booting Linux, today). The wii_power_off function

[PATCH 5/6] powerpc: wii.dts: Add ngpios property

2018-01-14 Thread Jonathan Neuschäfer
The Hollywood GPIO controller supports 32 GPIOs, but on the Wii, only 24 are used. Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts index

[PATCH 0/6] Nintendo Wii GPIO driver

2018-01-14 Thread Jonathan Neuschäfer
This series adds a driver for the GPIO controller used in the Nintendo Wii game console. The driver itself, and the related devicetree work should be pretty uncontroversial, but due to the system architecture of the Wii, I also had to extend an old resource allocation hack to kernel/resource.c:

[PATCH v3 04/17] ASoC: fsl_ssi: Maintain a mask of active streams

2018-01-14 Thread Nicolin Chen
Checking TE and RE bits in SCR register doesn't work for AC97 mode which enables SSIEN, TE and RE in the fsl_ssi_setup_ac97() that's called during probe(). So when running into the trigger(), it will always get the result of both TE and RE being enabled already, even if actually there is no

[PATCH v3 06/17] ASoC: fsl_ssi: Clear FIFO directly in fsl_ssi_config()

2018-01-14 Thread Nicolin Chen
The FIFO clear helper function is just one line of code now. So it could be cleaned up by removing it and calling regmap directly. Meanwhile, FIFO clear could be applied to all use cases, not confined to AC97. So this patch also moves FIFO clear in the trigger() to fsl_ssi_config() and removes

[PATCH v3 08/17] ASoC: fsl_ssi: Add DAIFMT define for AC97

2018-01-14 Thread Nicolin Chen
The _fsl_ssi_set_dai_fmt() bypasses an undefined format for AC97 mode. However, it's not really necessary if AC97 has its complete format defined. So this patch adds a DAIFMT macro of complete format including a clock direction and polarity. Signed-off-by: Nicolin Chen

[PATCH v3 15/17] ASoC: fsl_ssi: Add bool synchronous to mark synchronous mode

2018-01-14 Thread Nicolin Chen
Using symmetric_rates in the cpu_dai_drv is a bit implicit, so this patch adds a bool synchronous instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- Changelog v3 * Removed all cpu_dai_drv changes in PATCH-15 sound/soc/fsl/fsl_ssi.c | 13

Re: [RFC] powerpc/mm: Enable TLB flush during native_register_proc_table()

2018-01-14 Thread Aneesh Kumar K.V
Anshuman Khandual writes: > From: Anshuman Khandual > > Any changes to the partition table must be followed by appropriate TLB > flush which is not happening at present in native_register_proc_table() > path. Fix this by calling

[PATCH 4/6] dt-bindings: gpio: Add binding for Wii GPIO controller

2018-01-14 Thread Jonathan Neuschäfer
Signed-off-by: Jonathan Neuschäfer --- .../bindings/gpio/nintendo,hollywood-gpio.txt | 27 ++ .../devicetree/bindings/powerpc/nintendo/wii.txt | 9 +--- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644

[PATCH v3 02/17] ASoC: fsl_ssi: Keep ssi->i2s_net updated

2018-01-14 Thread Nicolin Chen
The hw_params() overwrites i2s_net settings for special cases like mono-channel support, however, it doesn't update ssi->i2s_net as set_dai_fmt() does. This patch removes the local i2s_net variable and directly updates ssi->i2s_net in the hw_params() so that the driver can simply look up the

[PATCH v3 07/17] ASoC: fsl_ssi: Clean up helper functions of trigger()

2018-01-14 Thread Nicolin Chen
The trigger() calls fsl_ssi_tx_config() and fsl_ssi_rx_config(), and both of them jump to fsl_ssi_config(). And fsl_ssi_config() later calls another fsl_ssi_rxtx_config(). However, the whole routine, especially fsl_ssi_config() function, is too complicated because of the folowing reasons: 1) It

[PATCH v3 09/17] ASoC: fsl_ssi: Clean up fsl_ssi_setup_regvals()

2018-01-14 Thread Nicolin Chen
This patch cleans fsl_ssi_setup_regvals() by following changes: 1) Moving DBG bits to the first lines. 2) Setting SSIE, RE/TE as default and cleaning it for AC97 Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- sound/soc/fsl/fsl_ssi.c | 17

[PATCH v3 12/17] ASoC: fsl_ssi: Move one-time configurations to probe()

2018-01-14 Thread Nicolin Chen
The probe() could handle some one-time configurations since they will not be changed once being configured. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- Changelog v2 * Moved all to fsl_ssi_hw_init() in platform probe()

[PATCH v3 11/17] ASoC: fsl_ssi: Use snd_soc_init_dma_data instead

2018-01-14 Thread Nicolin Chen
Since there is a helper function, use it to help readability. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- sound/soc/fsl/fsl_ssi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c

[PATCH 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-01-14 Thread Jonathan Neuschäfer
The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller that supports a configurable number of pins (up to 32), interrupts, and some special mechanisms to share the controller between the system's security processor (an ARM926) and the PowerPC CPU. Pin multiplexing is not supported.

[PATCH 6/6] powerpc: wii.dts: Add GPIO line names

2018-01-14 Thread Jonathan Neuschäfer
These are the GPIO line names on a Nintendo Wii, as documented in: https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs Signed-off-by: Jonathan Neuschäfer --- arch/powerpc/boot/dts/wii.dts | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v3 01/17] ASoC: fsl_ssi: Redefine RX and TX macros

2018-01-14 Thread Nicolin Chen
The RX and TX macros were defined implicitly and there was a potential risk if someone changes their values. Since they were defined to index the array ssi->regvals[2], this patch moves these two macros to fsl_ssi.c, closer to its owner ssi->regvals. And it also puts some comments here to limit

[PATCH v3 03/17] ASoC: fsl_ssi: Clean up set_dai_tdm_slot()

2018-01-14 Thread Nicolin Chen
This patch replaces the register read with ssi->i2s_net for simplification. It also removes masking SSIEN from scr value since it's handled later by regmap_update_bits() to set this scr value back. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome ---

[PATCH v3 10/17] ASoC: fsl_ssi: Set xFEN0 and xFEN1 together

2018-01-14 Thread Nicolin Chen
It'd be safer to enable both FIFOs for TX or RX at the same time. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- 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 14/17] ASoC: fsl_ssi: Clean up _fsl_ssi_set_dai_fmt()

2018-01-14 Thread Nicolin Chen
The _fsl_ssi_set_dai_fmt() is a helper function being called from fsl_ssi_set_dai_fmt() as an ASoC operation and fsl_ssi_hw_init() mainly for AC97 format initialization. This patch cleans the _fsl_ssi_set_dai_fmt() in following ways: * Removing *dev pointer in the parameters as it's included in

[PATCH v3 13/17] ASoC: fsl_ssi: Setup AC97 in fsl_ssi_hw_init()

2018-01-14 Thread Nicolin Chen
AC97 configures most of registers earlier to start a communication with CODECs in order to successfully initialize CODEC. Currently, _fsl_ssi_set_dai_fmt() and fsl_ssi_setup_ac97() are called to get all SSI registers properly set. Since now the driver has a fsl_ssi_hw_init() to handle all

[PATCH 1/6] resource: Extend the PPC32 reserved memory hack

2018-01-14 Thread Jonathan Neuschäfer
On the Nintendo Wii, there are two ranges of physical memory, and MMIO in between, but Linux on ppc32 doesn't support discontiguous memory. Therefore a hack was introduced in commit c5df7f775148 ("powerpc: allow ioremap within reserved memory regions") and commit de32400dd26e ("wii: use both mem1

[PATCH v3 00/17] ASoC: fsl_ssi: Clean up - program flow level

2018-01-14 Thread Nicolin Chen
==Change log== v3 * Reworked the series by taking suggestions from Maciej + Added PATCH-01 to make RX and TX more clearly defined + Replaced "bool dir" with "int dir" in PATCH-04 + Replaced "!dir" with "int adir" in PATCH-05 + Put CBM_CFS behind the baudclk check to keep the same

[PATCH v3 05/17] ASoC: fsl_ssi: Rename fsl_ssi_disable_val macro

2018-01-14 Thread Nicolin Chen
The define of fsl_ssi_disable_val is not so clear as it mixes two steps of calculations together. And those parameter names are also a bit long to read. Since it just tries to exclude the shared bits from the regvals of current stream while the opposite stream is active, it's better to use

[PATCH v3 16/17] ASoC: fsl_ssi: Move DT related code to a separate probe()

2018-01-14 Thread Nicolin Chen
This patch cleans up probe() function by moving all Device Tree related code into a separate function. It allows the probe() to be Device Tree independent. This will be very useful for future integration of imx-ssi driver which has similar functionalities while exists only because it supports

[PATCH v3 17/17] ASoC: fsl_ssi: Use ssi->streams instead of reading register

2018-01-14 Thread Nicolin Chen
Since ssi->streams is being updated along with SCR register and its SSIEN bit, it's simpler to use it instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- sound/soc/fsl/fsl_ssi.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-)

Re: [PATCH V7] cxl: Add support for ASB_Notify on POWER9

2018-01-14 Thread Andrew Donnellan
On 11/01/18 19:55, Christophe Lombard wrote: 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.