LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* RE: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Li.Xiubo @ 2014-08-19  9:00 UTC (permalink / raw)
  To: shengjiu.wang@freescale.com
  Cc: Fabio.Estevam@freescale.com, sfr@canb.auug.org.au,
	alsa-devel@alsa-project.org, Lars-Peter Clausen, timur@tabi.org,
	arnd@arndb.de, shc_work@mail.ru, tiwai@suse.de,
	linux-kernel@vger.kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	nicoleotsuka@gmail.com, broonie@kernel.org, xobs@kosagi.com,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20140819082108.GB5806@audiosh1>

How about the following :


diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 5ae777a..d42f18c 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -15,7 +15,7 @@ config SND_SOC_FSL_ASRC
 config SND_SOC_FSL_SAI
        tristate "Synchronous Audio Interface (SAI) module support"
        select REGMAP_MMIO
-       select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
+       select SND_SOC_IMX_PCM_DMA
        select SND_SOC_GENERIC_DMAENGINE_PCM
        help
          Say Y if you want to add Synchronous Audio Interface (SAI)
@@ -25,7 +25,7 @@ config SND_SOC_FSL_SAI

 config SND_SOC_FSL_SSI
        tristate "Synchronous Serial Interface module support"
-       select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
+       select SND_SOC_IMX_PCM_DMA
        select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC !=3D n && (MXC_TZIC || MX=
C_AVIC)
        select REGMAP_MMIO
        help
@@ -37,7 +37,7 @@ config SND_SOC_FSL_SSI
 config SND_SOC_FSL_SPDIF
        tristate "Sony/Philips Digital Interface module support"
        select REGMAP_MMIO
-       select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
+       select SND_SOC_IMX_PCM_DMA
        select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC !=3D n && (MXC_TZIC || MX=
C_AVIC)
        help
          Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
@@ -48,7 +48,7 @@ config SND_SOC_FSL_SPDIF
 config SND_SOC_FSL_ESAI
        tristate "Enhanced Serial Audio Interface (ESAI) module support"
        select REGMAP_MMIO
-       select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
+       select SND_SOC_IMX_PCM_DMA
        help
          Say Y if you want to add Enhanced Synchronous Audio Interface
          (ESAI) support for the Freescale CPUs.
@@ -76,6 +76,7 @@ config SND_SOC_FSL_ASOC_CARD

 config SND_SOC_IMX_PCM_DMA
        tristate
+       depends on SND_IMX_SOC
        select SND_SOC_GENERIC_DMAENGINE_PCM

 config SND_SOC_IMX_AUDMUX

Thanks,


BRs
Xiubo



> -----Original Message-----
> From: Shengjiu Wang [mailto:shengjiu.wang@freescale.com]
> Sent: Tuesday, August 19, 2014 4:21 PM
> To: Xiubo Li-B47053
> Cc: Lars-Peter Clausen; lgirdwood@gmail.com; broonie@kernel.org;
> perex@perex.cz; tiwai@suse.de; nicoleotsuka@gmail.com; shc_work@mail.ru;
> Estevam Fabio-R49496; xobs@kosagi.com; arnd@arndb.de; sfr@canb.auug.org.a=
u;
> timur@tabi.org; alsa-devel@alsa-project.org; linuxppc-dev@lists.ozlabs.or=
g;
> linux-kernel@vger.kernel.org
> Subject: Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove depen=
dence
> of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
>=20
> On Tue, Aug 19, 2014 at 04:13:15PM +0800, Xiubo Li-B47053 wrote:
> > > Subject: Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove
> dependence
> > > of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
> > >
> > > On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
> > > > On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
> > > > >Build kernel with SND_SOC_IMC_PCM_DMA=3Dm && SND_IMX_SOC=3Dn leads=
 the
> > > following
> > > > >error:
> > > > >
> > > > >    sound/built-in.o: In function `fsl_sai_probe':
> > > > >>>fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_i=
nit'
> > > > >    sound/built-in.o: In function `fsl_esai_probe':
> > > > >>>fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_=
init'
> > > > >
> > > > >Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init'
> which is
> > > > >defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, b=
ut it
> > > depends
> > > > >on SND_IMX_SOC, if SND_IMX_SOC=3Dn, then SND_SOC_IMX_PCM_DMA will =
not be
> > > > >selected.
> > > > >So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
> > > > >
> > > > >Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > > > >Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> > > >
> > > > Those if conditions where just added[1] by Arnd to avoid other buil=
d
> > > > failures. So just removing them again makes little sense.
> > > >
> > > > As far as I can see imx_pcm_dma_init() should be stubbed out when
> > > > SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
> > > >
> > > > [1]
> > >
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=
=3Dff40
> > > 260f79dc0436604452bccd449bffd25ebafb
> > > >
> > > Lars-Peter Clausen & Arnd
> > >
> > > The purpose of Arnd's patch is same with me, which is to resolve the =
build
> > > error when SND_SOC_IMX_PCM_DMA=3Dm & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=
=3Dy, the
> > > error is "undefined reference to `imx_pcm_dma_init'".
> > > But Arnd's patch didn't involve this situation that SND_IMX_SOC=3Dn &
> > > SND_SOC_IMX_PCM_DMA=3Dm.
> > >
> > > Currently I think out a solution for this issue is to change
> > >
> > > select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
> > >
> > > to
> > >
> > > depends on SND_SOC_IMX_PCM_DMA !=3D m
> > >
> > > How do you think about this?
> > >
> >
> > What will happen if to build both SAI/ESAI and IMX_PCM_DMA as modules a=
t the
> same
> > time ?
> >
> > Thanks,
> >
> > BRs
> > Xiubo
>=20
> I didn't find error/warning when SAI/ESAI and IMX_PCM_DMA are as modules.=
 The
> build is successful.
>=20
> >
> >
> > > best regards
> > > Wang shengjiu

^ permalink raw reply related

* Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Shengjiu Wang @ 2014-08-19  8:55 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: fabio.estevam, sfr, alsa-devel, arnd, shc_work, tiwai,
	linux-kernel, broonie, timur, lgirdwood, nicoleotsuka, Li.Xiubo,
	xobs, linuxppc-dev
In-Reply-To: <53F30E90.8080902@metafoo.de>

On Tue, Aug 19, 2014 at 10:45:04AM +0200, Lars-Peter Clausen wrote:
> On 08/19/2014 10:36 AM, Lars-Peter Clausen wrote:
> >On 08/19/2014 09:41 AM, Shengjiu Wang wrote:
> >>On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
> >>>On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
> >>>>Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the
> >>>>following
> >>>>error:
> >>>>
> >>>>    sound/built-in.o: In function `fsl_sai_probe':
> >>>>>>fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
> >>>>    sound/built-in.o: In function `fsl_esai_probe':
> >>>>>>fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'
> >>>>
> >>>>Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init' which is
> >>>>defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, but it
> >>>>depends
> >>>>on SND_IMX_SOC, if SND_IMX_SOC=n, then SND_SOC_IMX_PCM_DMA will not be
> >>>>selected.
> >>>>So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
> >>>>
> >>>>Reported-by: kbuild test robot <fengguang.wu@intel.com>
> >>>>Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> >>>
> >>>Those if conditions where just added[1] by Arnd to avoid other build
> >>>failures. So just removing them again makes little sense.
> >>>
> >>>As far as I can see imx_pcm_dma_init() should be stubbed out when
> >>>SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
> >>>
> >>>[1]
> >>>http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ff40260f79dc0436604452bccd449bffd25ebafb
> >>>
> >>>
> >>Lars-Peter Clausen & Arnd
> >>
> >>The purpose of Arnd's patch is same with me, which is to resolve the build
> >>error when SND_SOC_IMX_PCM_DMA=m & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=y, the
> >>error is "undefined reference to `imx_pcm_dma_init'".
> >>But Arnd's patch didn't involve this situation that SND_IMX_SOC=n &
> >>SND_SOC_IMX_PCM_DMA=m.
> >
> >Having SND_SOC_IMX_PCM_DMA selected if SND_IMX_SOC is not selected makes no
> >sense. I think the proper fix is to find out why it is selected and make
> >sure that it is not selected when SND_IMX_SOC is not selected.
> 
> 
> I guess the issue happens if SND_SOC_FSL_ASOC_CARD=m and
> SND_SOC_FSL_{ESAI,SAI,SSI}=y. In this case the fix is simply to drop
> the select SND_SOC_IMX_PCM_DMA from SND_SOC_FSL_ASOC_CARD.
> 
> - Lars
>

Yes, you are right. Thanks. I will send another patch.

best regards
wang shengjiu 

^ permalink raw reply

* Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Lars-Peter Clausen @ 2014-08-19  8:45 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: fabio.estevam, sfr, alsa-devel, arnd, shc_work, tiwai,
	linux-kernel, broonie, timur, lgirdwood, nicoleotsuka, Li.Xiubo,
	xobs, linuxppc-dev
In-Reply-To: <53F30C91.7080700@metafoo.de>

On 08/19/2014 10:36 AM, Lars-Peter Clausen wrote:
> On 08/19/2014 09:41 AM, Shengjiu Wang wrote:
>> On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
>>> On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
>>>> Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the
>>>> following
>>>> error:
>>>>
>>>>     sound/built-in.o: In function `fsl_sai_probe':
>>>>>> fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
>>>>     sound/built-in.o: In function `fsl_esai_probe':
>>>>>> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'
>>>>
>>>> Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init' which is
>>>> defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, but it
>>>> depends
>>>> on SND_IMX_SOC, if SND_IMX_SOC=n, then SND_SOC_IMX_PCM_DMA will not be
>>>> selected.
>>>> So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
>>>>
>>>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>>>> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
>>>
>>> Those if conditions where just added[1] by Arnd to avoid other build
>>> failures. So just removing them again makes little sense.
>>>
>>> As far as I can see imx_pcm_dma_init() should be stubbed out when
>>> SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
>>>
>>> [1]
>>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ff40260f79dc0436604452bccd449bffd25ebafb
>>>
>>>
>> Lars-Peter Clausen & Arnd
>>
>> The purpose of Arnd's patch is same with me, which is to resolve the build
>> error when SND_SOC_IMX_PCM_DMA=m & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=y, the
>> error is "undefined reference to `imx_pcm_dma_init'".
>> But Arnd's patch didn't involve this situation that SND_IMX_SOC=n &
>> SND_SOC_IMX_PCM_DMA=m.
>
> Having SND_SOC_IMX_PCM_DMA selected if SND_IMX_SOC is not selected makes no
> sense. I think the proper fix is to find out why it is selected and make
> sure that it is not selected when SND_IMX_SOC is not selected.


I guess the issue happens if SND_SOC_FSL_ASOC_CARD=m and 
SND_SOC_FSL_{ESAI,SAI,SSI}=y. In this case the fix is simply to drop the 
select SND_SOC_IMX_PCM_DMA from SND_SOC_FSL_ASOC_CARD.

- Lars

^ permalink raw reply

* Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Lars-Peter Clausen @ 2014-08-19  8:36 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: fabio.estevam, sfr, alsa-devel, timur, arnd, shc_work, tiwai,
	Li.Xiubo, lgirdwood, perex, nicoleotsuka, broonie, xobs,
	linuxppc-dev, linux-kernel
In-Reply-To: <20140819074103.GA5806@audiosh1>

On 08/19/2014 09:41 AM, Shengjiu Wang wrote:
> On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
>> On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
>>> Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the following
>>> error:
>>>
>>>     sound/built-in.o: In function `fsl_sai_probe':
>>>>> fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
>>>     sound/built-in.o: In function `fsl_esai_probe':
>>>>> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'
>>>
>>> Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init' which is
>>> defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, but it depends
>>> on SND_IMX_SOC, if SND_IMX_SOC=n, then SND_SOC_IMX_PCM_DMA will not be
>>> selected.
>>> So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
>>>
>>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>>> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
>>
>> Those if conditions where just added[1] by Arnd to avoid other build
>> failures. So just removing them again makes little sense.
>>
>> As far as I can see imx_pcm_dma_init() should be stubbed out when
>> SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
>>
>> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ff40260f79dc0436604452bccd449bffd25ebafb
>>
> Lars-Peter Clausen & Arnd
>
> The purpose of Arnd's patch is same with me, which is to resolve the build
> error when SND_SOC_IMX_PCM_DMA=m & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=y, the
> error is "undefined reference to `imx_pcm_dma_init'".
> But Arnd's patch didn't involve this situation that SND_IMX_SOC=n &
> SND_SOC_IMX_PCM_DMA=m.

Having SND_SOC_IMX_PCM_DMA selected if SND_IMX_SOC is not selected makes no 
sense. I think the proper fix is to find out why it is selected and make 
sure that it is not selected when SND_IMX_SOC is not selected.

>
> Currently I think out a solution for this issue is to change
>
> select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
>
> to
>
> depends on SND_SOC_IMX_PCM_DMA != m
>
> How do you think about this?

No, that has the dependencies in reverse.

^ permalink raw reply

* RE: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Li.Xiubo @ 2014-08-19  8:31 UTC (permalink / raw)
  To: shengjiu.wang@freescale.com
  Cc: Fabio.Estevam@freescale.com, sfr@canb.auug.org.au,
	alsa-devel@alsa-project.org, Lars-Peter Clausen, timur@tabi.org,
	arnd@arndb.de, shc_work@mail.ru, tiwai@suse.de,
	linux-kernel@vger.kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	nicoleotsuka@gmail.com, broonie@kernel.org, xobs@kosagi.com,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20140819082108.GB5806@audiosh1>

> > > Lars-Peter Clausen & Arnd
> > >
> > > The purpose of Arnd's patch is same with me, which is to resolve the =
build
> > > error when SND_SOC_IMX_PCM_DMA=3Dm & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=
=3Dy, the
> > > error is "undefined reference to `imx_pcm_dma_init'".
> > > But Arnd's patch didn't involve this situation that SND_IMX_SOC=3Dn &
> > > SND_SOC_IMX_PCM_DMA=3Dm.
> > >
> > > Currently I think out a solution for this issue is to change
> > >
> > > select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
> > >
> > > to
> > >
> > > depends on SND_SOC_IMX_PCM_DMA !=3D m
> > >
> > > How do you think about this?
> > >
> >
> > What will happen if to build both SAI/ESAI and IMX_PCM_DMA as modules a=
t the
> same
> > time ?
> >
> > Thanks,
> >
> > BRs
> > Xiubo
>=20
> I didn't find error/warning when SAI/ESAI and IMX_PCM_DMA are as modules.=
 The
> build is successful.
>=20

Yes, but if IMX_PCM_DMA =3D=3D m, the SAI/ESAI will be invisible in menucon=
fig....
Does it matter here ?

BRs
Xiubo


> >
> >
> > > best regards
> > > Wang shengjiu

^ permalink raw reply

* RE: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Li.Xiubo @ 2014-08-19  8:13 UTC (permalink / raw)
  To: shengjiu.wang@freescale.com, Lars-Peter Clausen
  Cc: Fabio.Estevam@freescale.com, sfr@canb.auug.org.au,
	alsa-devel@alsa-project.org, timur@tabi.org, arnd@arndb.de,
	shc_work@mail.ru, tiwai@suse.de, linux-kernel@vger.kernel.org,
	lgirdwood@gmail.com, perex@perex.cz, nicoleotsuka@gmail.com,
	broonie@kernel.org, xobs@kosagi.com,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20140819074103.GA5806@audiosh1>

> Subject: Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove depen=
dence
> of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
>=20
> On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
> > On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
> > >Build kernel with SND_SOC_IMC_PCM_DMA=3Dm && SND_IMX_SOC=3Dn leads the
> following
> > >error:
> > >
> > >    sound/built-in.o: In function `fsl_sai_probe':
> > >>>fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
> > >    sound/built-in.o: In function `fsl_esai_probe':
> > >>>fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init=
'
> > >
> > >Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init' whi=
ch is
> > >defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, but i=
t
> depends
> > >on SND_IMX_SOC, if SND_IMX_SOC=3Dn, then SND_SOC_IMX_PCM_DMA will not =
be
> > >selected.
> > >So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
> > >
> > >Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > >Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> >
> > Those if conditions where just added[1] by Arnd to avoid other build
> > failures. So just removing them again makes little sense.
> >
> > As far as I can see imx_pcm_dma_init() should be stubbed out when
> > SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
> >
> > [1]
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=
=3Dff40
> 260f79dc0436604452bccd449bffd25ebafb
> >
> Lars-Peter Clausen & Arnd
>=20
> The purpose of Arnd's patch is same with me, which is to resolve the buil=
d
> error when SND_SOC_IMX_PCM_DMA=3Dm & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=3Dy, =
the
> error is "undefined reference to `imx_pcm_dma_init'".
> But Arnd's patch didn't involve this situation that SND_IMX_SOC=3Dn &
> SND_SOC_IMX_PCM_DMA=3Dm.
>=20
> Currently I think out a solution for this issue is to change
>=20
> select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC !=3D n
>=20
> to
>=20
> depends on SND_SOC_IMX_PCM_DMA !=3D m
>=20
> How do you think about this?
>=20

What will happen if to build both SAI/ESAI and IMX_PCM_DMA as modules at th=
e same
time ?

Thanks,

BRs
Xiubo


> best regards
> Wang shengjiu

^ permalink raw reply

* Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Shengjiu Wang @ 2014-08-19  8:21 UTC (permalink / raw)
  To: Xiubo Li-B47053
  Cc: Estevam Fabio-R49496, sfr@canb.auug.org.au,
	alsa-devel@alsa-project.org, Lars-Peter Clausen, timur@tabi.org,
	arnd@arndb.de, shc_work@mail.ru, tiwai@suse.de,
	linux-kernel@vger.kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	nicoleotsuka@gmail.com, broonie@kernel.org, xobs@kosagi.com,
	linuxppc-dev@lists.ozlabs.org
In-Reply-To: <d7b06608abcc4f098789f63cb9f36eef@BN1PR0301MB0609.namprd03.prod.outlook.com>

On Tue, Aug 19, 2014 at 04:13:15PM +0800, Xiubo Li-B47053 wrote:
> > Subject: Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence
> > of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
> > 
> > On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
> > > On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
> > > >Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the
> > following
> > > >error:
> > > >
> > > >    sound/built-in.o: In function `fsl_sai_probe':
> > > >>>fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
> > > >    sound/built-in.o: In function `fsl_esai_probe':
> > > >>>fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'
> > > >
> > > >Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init' which is
> > > >defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, but it
> > depends
> > > >on SND_IMX_SOC, if SND_IMX_SOC=n, then SND_SOC_IMX_PCM_DMA will not be
> > > >selected.
> > > >So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
> > > >
> > > >Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > > >Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> > >
> > > Those if conditions where just added[1] by Arnd to avoid other build
> > > failures. So just removing them again makes little sense.
> > >
> > > As far as I can see imx_pcm_dma_init() should be stubbed out when
> > > SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
> > >
> > > [1]
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ff40
> > 260f79dc0436604452bccd449bffd25ebafb
> > >
> > Lars-Peter Clausen & Arnd
> > 
> > The purpose of Arnd's patch is same with me, which is to resolve the build
> > error when SND_SOC_IMX_PCM_DMA=m & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=y, the
> > error is "undefined reference to `imx_pcm_dma_init'".
> > But Arnd's patch didn't involve this situation that SND_IMX_SOC=n &
> > SND_SOC_IMX_PCM_DMA=m.
> > 
> > Currently I think out a solution for this issue is to change
> > 
> > select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
> > 
> > to
> > 
> > depends on SND_SOC_IMX_PCM_DMA != m
> > 
> > How do you think about this?
> > 
> 
> What will happen if to build both SAI/ESAI and IMX_PCM_DMA as modules at the same
> time ?
> 
> Thanks,
> 
> BRs
> Xiubo

I didn't find error/warning when SAI/ESAI and IMX_PCM_DMA are as modules. The 
build is successful.

> 
> 
> > best regards
> > Wang shengjiu

^ permalink raw reply

* Re: [PATCH 1/2] PCI/MSI/PPC: Remove arch_msi_check_device()
From: Alexander Gordeev @ 2014-08-19  7:50 UTC (permalink / raw)
  To: linux-kernel, Michael Ellerman, Benjamin Herrenschmidt
  Cc: linux-pci, linuxppc-dev
In-Reply-To: <20140731135333.GA10517@dhcp-26-207.brq.redhat.com>

On Thu, Jul 31, 2014 at 03:53:33PM +0200, Alexander Gordeev wrote:
> Michael, Ben,
> 
> Any feedback?

Michael, Ben?

> Thanks!

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

^ permalink raw reply

* Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA
From: Shengjiu Wang @ 2014-08-19  7:41 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: fabio.estevam, sfr, alsa-devel, timur, arnd, shc_work, tiwai,
	Li.Xiubo, lgirdwood, perex, nicoleotsuka, broonie, xobs,
	linuxppc-dev, linux-kernel
In-Reply-To: <53F22F5E.2090601@metafoo.de>

On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote:
> On 08/18/2014 10:38 AM, Shengjiu Wang wrote:
> >Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the following
> >error:
> >
> >    sound/built-in.o: In function `fsl_sai_probe':
> >>>fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
> >    sound/built-in.o: In function `fsl_esai_probe':
> >>>fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'
> >
> >Most cpu driver in soc/fsl has use the function 'imx_pcm_dma_init' which is
> >defined in imx-pcm-dma.c, so need to select SND_SOC_IMX_PCM_DMA, but it depends
> >on SND_IMX_SOC, if SND_IMX_SOC=n, then SND_SOC_IMX_PCM_DMA will not be
> >selected.
> >So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA.
> >
> >Reported-by: kbuild test robot <fengguang.wu@intel.com>
> >Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> 
> Those if conditions where just added[1] by Arnd to avoid other build
> failures. So just removing them again makes little sense.
> 
> As far as I can see imx_pcm_dma_init() should be stubbed out when
> SND_SOC_IMX_PCM_DMA is not selected. So what's going on here?
> 
> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ff40260f79dc0436604452bccd449bffd25ebafb
>
Lars-Peter Clausen & Arnd

The purpose of Arnd's patch is same with me, which is to resolve the build
error when SND_SOC_IMX_PCM_DMA=m & SND_SOC_FSL_SSI/SAI/ESAI/SPDIF=y, the
error is "undefined reference to `imx_pcm_dma_init'".
But Arnd's patch didn't involve this situation that SND_IMX_SOC=n &
SND_SOC_IMX_PCM_DMA=m. 

Currently I think out a solution for this issue is to change

select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n 

to

depends on SND_SOC_IMX_PCM_DMA != m

How do you think about this?

best regards
Wang shengjiu

^ permalink raw reply

* Re: [PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp
From: Michael Neuling @ 2014-08-19  5:36 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: kvm-ppc, linuxppc-dev, Alexander Graf, kvm
In-Reply-To: <20140819052407.GA30652@drongo>

On Tue, 2014-08-19 at 15:24 +1000, Paul Mackerras wrote:
> On Tue, Aug 19, 2014 at 02:59:29PM +1000, Michael Neuling wrote:
> > This cleans up kvmppc_load/save_fp.  It removes unnecessary isyncs.
>=20
> NAK - they are necessary on PPC970, which we (still) support.  You
> could put them in a feature section if they are really annoying you.

I'm not fussed, but we should at least have a comment there for why we
need them.

> >  It also
> > removes the unnecessary resetting of the MSR bits on exit of kvmppc_sav=
e_fp.
>=20
> ... except it doesn't. :)  That got folded into e4e38121507a ("KVM:
> PPC: Book3S HV: Add transactional memory support").

Arrh, thanks.  This patch was cleaning up stuff from an old local tree
and couldn't see where it had been upstreamed.  I missed this.

Mikey

^ permalink raw reply

* Re: [PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp
From: Paul Mackerras @ 2014-08-19  5:24 UTC (permalink / raw)
  To: Michael Neuling; +Cc: kvm-ppc, linuxppc-dev, Alexander Graf, kvm
In-Reply-To: <1408424370-16960-1-git-send-email-mikey@neuling.org>

On Tue, Aug 19, 2014 at 02:59:29PM +1000, Michael Neuling wrote:
> This cleans up kvmppc_load/save_fp.  It removes unnecessary isyncs.

NAK - they are necessary on PPC970, which we (still) support.  You
could put them in a feature section if they are really annoying you.

>  It also
> removes the unnecessary resetting of the MSR bits on exit of kvmppc_save_fp.

... except it doesn't. :)  That got folded into e4e38121507a ("KVM:
PPC: Book3S HV: Add transactional memory support").

Paul.

^ permalink raw reply

* [PATCH 2/2] KVM: PPC: Book3S HV: Add register name when loading toc
From: Michael Neuling @ 2014-08-19  4:59 UTC (permalink / raw)
  To: Alexander Graf, Paul Mackerras; +Cc: linuxppc-dev, kvm-ppc, kvm
In-Reply-To: <1408424370-16960-1-git-send-email-mikey@neuling.org>

Add 'r' to register name r2 in kvmppc_hv_enter.

Also update comment at the top of kvmppc_hv_enter to indicate that R2/TOC is
non-volatile.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index c4bd2d7..1e8c480 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -355,6 +355,7 @@ kvmppc_hv_entry:
 	 * MSR = ~IR|DR
 	 * R13 = PACA
 	 * R1 = host R1
+	 * R2 = TOC
 	 * all other volatile GPRS = free
 	 */
 	mflr	r0
@@ -503,7 +504,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
 toc_tlbie_lock:
 	.tc	native_tlbie_lock[TC],native_tlbie_lock
 	.previous
-	ld	r3,toc_tlbie_lock@toc(2)
+	ld	r3,toc_tlbie_lock@toc(r2)
 #ifdef __BIG_ENDIAN__
 	lwz	r8,PACA_LOCK_TOKEN(r13)
 #else
-- 
1.9.1

^ permalink raw reply related

* [PATCH 1/2] KVM: PPC: Book3S HV: Cleanup kvmppc_load/save_fp
From: Michael Neuling @ 2014-08-19  4:59 UTC (permalink / raw)
  To: Alexander Graf, Paul Mackerras; +Cc: linuxppc-dev, kvm-ppc, kvm

This cleans up kvmppc_load/save_fp.  It removes unnecessary isyncs.  It also
removes the unnecessary resetting of the MSR bits on exit of kvmppc_save_fp.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index f0c4db7..c4bd2d7 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -2434,7 +2434,6 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_VSX)
 #endif
 	mtmsrd	r8
-	isync
 	addi	r3,r3,VCPU_FPRS
 	bl	store_fp_state
 #ifdef CONFIG_ALTIVEC
@@ -2470,7 +2469,6 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_VSX)
 #endif
 	mtmsrd	r8
-	isync
 	addi	r3,r4,VCPU_FPRS
 	bl	load_fp_state
 #ifdef CONFIG_ALTIVEC
-- 
1.9.1

^ permalink raw reply related

* [PATCH 4/4] powerpc/powernv: Check OPAL dump calls exist before using
From: Michael Neuling @ 2014-08-19  4:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Ellerman; +Cc: Stewart Smith, linuxppc-dev
In-Reply-To: <1408423682-14297-1-git-send-email-mikey@neuling.org>

Check that the OPAL_DUMP_READ token exists before initalising the elog
infrastructure.

This avoids littering the OPAL console with:
  "OPAL: Called with bad token 91"

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 arch/powerpc/platforms/powernv/opal-dump.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 85bb8ff..c7577f9 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -423,6 +423,10 @@ void __init opal_platform_dump_init(void)
 {
 	int rc;
 
+	/* ELOG not supported by firmware */
+	if (!opal_check_token(OPAL_DUMP_READ))
+		return;
+
 	dump_kset = kset_create_and_add("dump", NULL, opal_kobj);
 	if (!dump_kset) {
 		pr_warn("%s: Failed to create dump kset\n", __func__);
-- 
1.9.1

^ permalink raw reply related

* [PATCH 3/4] powerpc/powernv: Check OPAL elog calls exist before using
From: Michael Neuling @ 2014-08-19  4:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Ellerman; +Cc: Stewart Smith, linuxppc-dev
In-Reply-To: <1408423682-14297-1-git-send-email-mikey@neuling.org>

Check that the OPAL_ELOG_READ token exists before initalising the elog
infrastructure.

This avoids littering the OPAL console with:
  "OPAL: Called with bad token 74"

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 arch/powerpc/platforms/powernv/opal-elog.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index bbdb3ff..518fe95 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -295,6 +295,10 @@ int __init opal_elog_init(void)
 {
 	int rc = 0;
 
+	/* ELOG not supported by firmware */
+	if (!opal_check_token(OPAL_ELOG_READ))
+		return -1;
+
 	elog_kset = kset_create_and_add("elog", NULL, opal_kobj);
 	if (!elog_kset) {
 		pr_warn("%s: failed to create elog kset\n", __func__);
-- 
1.9.1

^ permalink raw reply related

* [PATCH 2/4] powerpc/powernv: Check OPAL RTC calls exists before using
From: Michael Neuling @ 2014-08-19  4:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Ellerman; +Cc: Stewart Smith, linuxppc-dev
In-Reply-To: <1408423682-14297-1-git-send-email-mikey@neuling.org>

Check that the OPAL_RTC_READ token exists before we use the OPAL RTC.

Refactors the code a little to merge error paths.

This avoids littering the OPAL console with:
  "OPAL: Called with bad token 3".

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 arch/powerpc/platforms/powernv/opal-rtc.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal-rtc.c b/arch/powerpc/platforms/powernv/opal-rtc.c
index b1885db..499707d 100644
--- a/arch/powerpc/platforms/powernv/opal-rtc.c
+++ b/arch/powerpc/platforms/powernv/opal-rtc.c
@@ -42,6 +42,9 @@ unsigned long __init opal_get_boot_time(void)
 	__be64 __h_m_s_ms;
 	long rc = OPAL_BUSY;
 
+	if (!opal_check_token(OPAL_RTC_READ))
+		goto out;
+
 	while (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT) {
 		rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms);
 		if (rc == OPAL_BUSY_EVENT)
@@ -49,16 +52,18 @@ unsigned long __init opal_get_boot_time(void)
 		else
 			mdelay(10);
 	}
-	if (rc != OPAL_SUCCESS) {
-		ppc_md.get_rtc_time = NULL;
-		ppc_md.set_rtc_time = NULL;
-		return 0;
-	}
+	if (rc != OPAL_SUCCESS)
+		goto out;
+
 	y_m_d = be32_to_cpu(__y_m_d);
 	h_m_s_ms = be64_to_cpu(__h_m_s_ms);
 	opal_to_tm(y_m_d, h_m_s_ms, &tm);
 	return mktime(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
 		      tm.tm_hour, tm.tm_min, tm.tm_sec);
+out:
+	ppc_md.get_rtc_time = NULL;
+	ppc_md.set_rtc_time = NULL;
+	return 0;
 }
 
 void opal_get_rtc_time(struct rtc_time *tm)
-- 
1.9.1

^ permalink raw reply related

* [PATCH 1/4] powerpc/powernv: Add OPAL check token call
From: Michael Neuling @ 2014-08-19  4:47 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Ellerman; +Cc: Stewart Smith, linuxppc-dev

Currently there is no way to generically check if an OPAL call exists or not
from the host kernel.

This adds an OPAL call opal_check_token() which tells you if the given token is
present in OPAL or not.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 arch/powerpc/include/asm/opal.h                | 7 +++++++
 arch/powerpc/platforms/powernv/opal-wrappers.S | 1 +
 2 files changed, 8 insertions(+)

diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 86055e5..4593a93 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -135,6 +135,7 @@ struct opal_sg_list {
 #define OPAL_FLASH_MANAGE			77
 #define OPAL_FLASH_UPDATE			78
 #define OPAL_RESYNC_TIMEBASE			79
+#define OPAL_CHECK_TOKEN			80
 #define OPAL_DUMP_INIT				81
 #define OPAL_DUMP_INFO				82
 #define OPAL_DUMP_READ				83
@@ -417,6 +418,11 @@ struct opal_msg {
 	__be64 params[8];
 };
 
+enum OpalCheckTokenStatus {
+       OPAL_TOKEN_ABSENT = 0,
+       OPAL_TOKEN_PRESENT = 1
+};
+
 struct opal_machine_check_event {
 	enum OpalMCE_Version	version:8;	/* 0x00 */
 	uint8_t			in_use;		/* 0x01 */
@@ -887,6 +893,7 @@ int64_t opal_pci_next_error(uint64_t phb_id, __be64 *first_frozen_pe,
 			    __be16 *pci_error_type, __be16 *severity);
 int64_t opal_pci_poll(uint64_t phb_id);
 int64_t opal_return_cpu(void);
+int64_t opal_check_token(uint64_t token);
 int64_t opal_reinit_cpus(uint64_t flags);
 
 int64_t opal_xscom_read(uint32_t gcid, uint64_t pcb_addr, __be64 *val);
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index 2e6ce1b..5718855 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -232,6 +232,7 @@ OPAL_CALL(opal_validate_flash,			OPAL_FLASH_VALIDATE);
 OPAL_CALL(opal_manage_flash,			OPAL_FLASH_MANAGE);
 OPAL_CALL(opal_update_flash,			OPAL_FLASH_UPDATE);
 OPAL_CALL(opal_resync_timebase,			OPAL_RESYNC_TIMEBASE);
+OPAL_CALL(opal_check_token,			OPAL_CHECK_TOKEN);
 OPAL_CALL(opal_dump_init,			OPAL_DUMP_INIT);
 OPAL_CALL(opal_dump_info,			OPAL_DUMP_INFO);
 OPAL_CALL(opal_dump_info2,			OPAL_DUMP_INFO2);
-- 
1.9.1

^ permalink raw reply related

* [PATCH] powerpc/eeh: fix crashing when passing VF
From: Wei Yang @ 2014-08-19  2:27 UTC (permalink / raw)
  To: gwshan; +Cc: Wei Yang, linuxppc-dev

When doing vfio passthrough a VF, the kernel will crash with following
message:

[  442.656459] Unable to handle kernel paging request for data at address 0x00000060
[  442.656593] Faulting instruction address: 0xc000000000038b88
[  442.656706] Oops: Kernel access of bad area, sig: 11 [#1]
[  442.656798] SMP NR_CPUS=1024 NUMA PowerNV
[  442.656890] Modules linked in: vfio_pci mlx4_core nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6t_REJECT xt_conntrack bnep bluetooth rfkill ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw tg3 nfsd be2net nfs_acl ses lockd ptp enclosure pps_core kvm_hv kvm_pr shpchp binfmt_misc kvm sunrpc uinput lpfc scsi_transport_fc ipr scsi_tgt [last unloaded: mlx4_core]
[  442.658152] CPU: 40 PID: 14948 Comm: qemu-system-ppc Not tainted 3.10.42yw-pkvm+ #37
[  442.658219] task: c000000f7e2a9a00 ti: c000000f6dc3c000 task.ti: c000000f6dc3c000
[  442.658287] NIP: c000000000038b88 LR: c0000000004435a8 CTR: c000000000455bc0
[  442.658352] REGS: c000000f6dc3f580 TRAP: 0300   Not tainted  (3.10.42yw-pkvm+)
[  442.658419] MSR: 9000000000009032 <SF,HV,EE,ME,IR,DR,RI>  CR: 28004882  XER: 20000000
[  442.658577] CFAR: c00000000000908c DAR: 0000000000000060 DSISR: 40000000 SOFTE: 1
GPR00: c0000000004435a8 c000000f6dc3f800 c0000000012b1c10 c00000000da24000
GPR04: 0000000000000003 0000000000001004 00000000000015b3 000000000000ffff
GPR08: c00000000127f5d8 0000000000000000 000000000000ffff 0000000000000000
GPR12: c000000000068078 c00000000fdd6800 000001003c320c80 000001003c3607f0
GPR16: 0000000000000001 00000000105480c8 000000001055aaa8 000001003c31ab18
GPR20: 000001003c10fb40 000001003c360ae8 000000001063bcf0 000000001063bdb0
GPR24: 000001003c15ed70 0000000010548f40 c000001fe5514c88 c000001fe5514cb0
GPR28: c00000000da24000 0000000000000000 c00000000da24000 0000000000000003
[  442.659471] NIP [c000000000038b88] .pcibios_set_pcie_reset_state+0x28/0x130
[  442.659530] LR [c0000000004435a8] .pci_set_pcie_reset_state+0x28/0x40
[  442.659585] Call Trace:
[  442.659610] [c000000f6dc3f800] [00000000000719e0] 0x719e0 (unreliable)
[  442.659677] [c000000f6dc3f880] [c0000000004435a8] .pci_set_pcie_reset_state+0x28/0x40
[  442.659757] [c000000f6dc3f900] [c000000000455bf8] .reset_fundamental+0x38/0x80
[  442.659835] [c000000f6dc3f980] [c0000000004562a8] .pci_dev_specific_reset+0xa8/0xf0
[  442.659913] [c000000f6dc3fa00] [c0000000004448c4] .__pci_dev_reset+0x44/0x430
[  442.659980] [c000000f6dc3fab0] [c000000000444d5c] .pci_reset_function+0x7c/0xc0
[  442.660059] [c000000f6dc3fb30] [d00000001c141ab8] .vfio_pci_open+0xe8/0x2b0 [vfio_pci]
[  442.660139] [c000000f6dc3fbd0] [c000000000586c30] .vfio_group_fops_unl_ioctl+0x3a0/0x630
[  442.660219] [c000000f6dc3fc90] [c000000000255fbc] .do_vfs_ioctl+0x4ec/0x7c0
[  442.660286] [c000000f6dc3fd80] [c000000000256364] .SyS_ioctl+0xd4/0xf0
[  442.660354] [c000000f6dc3fe30] [c000000000009e54] syscall_exit+0x0/0x98
[  442.660420] Instruction dump:
[  442.660454] 4bfffce9 4bfffee4 7c0802a6 fbc1fff0 fbe1fff8 f8010010 f821ff81 7c7e1b78
[  442.660566] 7c9f2378 60000000 60000000 e93e02c8 <e8690060> 2fa30000 41de00c4 2b9f0002
[  442.660679] ---[ end trace a64ac9546bcf0328 ]---
[  442.660724]

The reason is current VF is not EEH enabled.

This patch is a quick fix for this problem.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 0ba4392..d2d2130 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -630,7 +630,7 @@ int eeh_pci_enable(struct eeh_pe *pe, int function)
 int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
 {
 	struct eeh_dev *edev = pci_dev_to_eeh_dev(dev);
-	struct eeh_pe *pe = edev->pe;
+	struct eeh_pe *pe = edev ? edev->pe:NULL;
 
 	if (!pe) {
 		pr_err("%s: No PE found on PCI device %s\n",
-- 
1.7.9.5

^ permalink raw reply related

* Re: [PATCH] tools/perf/powerpc: Fix build break
From: Sukadev Bhattiprolu @ 2014-08-18 23:25 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <1408004299-18986-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

I posted a patch for this to LKML last week:

	https://lkml.org/lkml/2014/8/7/77

Aneesh Kumar K.V [aneesh.kumar@linux.vnet.ibm.com] wrote:
|   CC       arch/powerpc/util/skip-callchain-idx.o
| arch/powerpc/util/skip-callchain-idx.c: In function =E2=80=98check_return=
_reg=E2=80=99:
| arch/powerpc/util/skip-callchain-idx.c:55:3: error: implicit declaration =
of function =E2=80=98pr_debug=E2=80=99 [-Werror=3Dimplicit-function-declara=
tion]
|    pr_debug("dwarf_frame_register() %s\n", dwarf_errmsg(-1));
|=20
| Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| ---
|  tools/perf/arch/powerpc/util/skip-callchain-idx.c | 1 +
|  1 file changed, 1 insertion(+)
|=20
| diff --git a/tools/perf/arch/powerpc/util/skip-callchain-idx.c b/tools/pe=
rf/arch/powerpc/util/skip-callchain-idx.c
| index a7c23a4b3778..d73ef8bb08c7 100644
| --- a/tools/perf/arch/powerpc/util/skip-callchain-idx.c
| +++ b/tools/perf/arch/powerpc/util/skip-callchain-idx.c
| @@ -15,6 +15,7 @@
| =20
|  #include "util/thread.h"
|  #include "util/callchain.h"
| +#include "util/debug.h"
| =20
|  /*
|   * When saving the callchain on Power, the kernel conservatively saves
| --=20
| 1.9.1
|=20
| _______________________________________________
| Linuxppc-dev mailing list
| Linuxppc-dev@lists.ozlabs.org
| https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply

* [PATCH v2] ppc: Fix build error with CONFIG_PCI=n
From: Pranith Kumar @ 2014-08-18 21:13 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	open list:LINUX FOR POWERPC..., open list
  Cc: Andrew Morton, geert

Fix ppc 32 build failure as reported here:

http://kisskb.ellerman.id.au/kisskb/buildresult/11663513/

The error is as follows:

arch/powerpc/include/asm/floppy.h:142:20: error: 'isa_bridge_pcidev' undeclared
(first use in this function)

This is happening since floppy.o is enabled by BLK_DEV_FD which depends on
ARCH_MAY_HAVE_PC_FDC which is in-turn enabled if PPC_PSERIES=n. 

The following commit changes the dependency so that ARCH_MAY_HAVE_PC_FDC is
dependent exclusively on PCI since otherwise it will not compile.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Andrew Morton <akpm@linux-foundation.org>
---
 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a577609f..9c1aa77 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -182,7 +182,7 @@ config SCHED_OMIT_FRAME_POINTER
 
 config ARCH_MAY_HAVE_PC_FDC
 	bool
-	default !PPC_PSERIES || PCI
+	default PCI
 
 config PPC_OF
 	def_bool y
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH] powerpc: Fix build failure for PPC_32
From: Pranith Kumar @ 2014-08-18 21:08 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, Stephen Rothwell, Mahesh Salgaonkar, Gerhard Sittig,
	open list, Paul Mackerras, Andrew Morton,
	open list:LINUX FOR POWERPC...
In-Reply-To: <CAMuHMdXxpnXPqoo6cT2tmXxHmFc1syMxWnrc-khGxytVi81s0g@mail.gmail.com>

On Mon, Aug 18, 2014 at 4:57 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Note that PowerPC supports multi-platform kernels.
> A kernel with PPC_PSERIES and something else with PCI may still want to
> have floppy support.

OK, I tested with your change and it works. I needed to make one more
change for it compile all the way through though.

I will send both of the patches shortly.

-- 
Pranith

^ permalink raw reply

* Re: [PATCH] powerpc: Fix build failure for PPC_32
From: Geert Uytterhoeven @ 2014-08-18 20:57 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Rob Herring, Stephen Rothwell, Mahesh Salgaonkar, Gerhard Sittig,
	open list, Paul Mackerras, Andrew Morton,
	open list:LINUX FOR POWERPC...
In-Reply-To: <CAJhHMCDE8e019oLvO7QEcAB-=yqkmgF4OS2VwRrJNV+vvXOe5Q@mail.gmail.com>

Hi Pranith,

On Mon, Aug 18, 2014 at 10:52 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> On Mon, Aug 18, 2014 at 3:28 PM, Geert Uytterhoeven <geert@linux-m68k.org>
> wrote:
>> On Mon, Aug 18, 2014 at 9:01 PM, Pranith Kumar <bobby.prani@gmail.com>
>> wrote:
>> > Fix ppc 32 build failure as reported here:
>> >
>> > http://kisskb.ellerman.id.au/kisskb/buildresult/11663513/
>>
>> | arch/powerpc/include/asm/floppy.h:142:20: error: 'isa_bridge_pcidev'
>> undeclared (first use in this function)
>> | make[3]: *** [drivers/block/floppy.o] Error 1
>>
>> The definition of isa_bridge_pcidev is only available if CONFIG_PCI=y...
>>
>> > The error is that pci_32.o was not being built for PPC_32. Fix error by
>> > adding
>> > it in the Makefile. Tested using the ppc cross compiler.
>>
>> ... so how can adding this make the floppy.h error go away?
>
> So the definition which you are talking about within CONFIG_PCI=y is an
> extern definition
>
> arch/powerpc/include/asm/ppc-pci.h:28:extern struct pci_dev
> *isa_bridge_pcidev;
>
> If you build pci_32.o unconditionally, there is an
>
> EXPORT_SYMBOL(isa_bridge_pcidev);
>
> which supplies the required symbol.

Yes, but the error in floppy.h is from the compiler, not from the linker.
Supplying the symbol for the linker doesn't help the compiler when
building floppy.c.

> But yes, you are right in that we should not unconditionally compile
> pci_32.o. Making floppy depend on PCI is the right thing to do. However,
>>
>> Note that arch/powerpc/kernel/Makefile does add
>> pci_$(CONFIG_WORD_SIZE).o, but only if CONFIG_PCI=y.
>>
>> So, thanks for your patch, but I don't think your fix is the right
>> solution.
>>
>> However, drivers/block/floppy.o is enabled by BLK_DEV_FD, which
>> depends on ARCH_MAY_HAVE_PC_FDC.
>>
>> arch/powerpc/Kconfig has:
>>
>> config ARCH_MAY_HAVE_PC_FDC
>>         bool
>>         default !PPC_PSERIES || PCI
>>
>> PCI is not set, and PPC_PSERIES is also not set, so this
>> defaults to y, which is obviously not correct, as floppy.h needs PCI.
>>
>> As this symbol doesn't enable floppy support in-se, probably it should
>> just
>> be:
>>
>> config ARCH_MAY_HAVE_PC_FDC
>>         bool
>>         depends on PCI
>
> the right thing I guess here is to depend on !PPC_PSERIES && PCI since I
> guess pSeries does not support floppy.h (hence the original condition
> check?).

Note that PowerPC supports multi-platform kernels.
A kernel with PPC_PSERIES and something else with PCI may still want to
have floppy support.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* Re: [PATCH] powerpc: Fix build failure for PPC_32
From: Pranith Kumar @ 2014-08-18 20:52 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, Stephen Rothwell, Mahesh Salgaonkar, Gerhard Sittig,
	open list, Paul Mackerras, Andrew Morton,
	open list:LINUX FOR POWERPC...
In-Reply-To: <CAMuHMdXutLPeyDYHdRJ6Heb4vhtg=zMTpwOpKq1h4Yyk8exUSQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2574 bytes --]

On Mon, Aug 18, 2014 at 3:28 PM, Geert Uytterhoeven <geert@linux-m68k.org>
wrote:

> Hi Pranith,
>
> On Mon, Aug 18, 2014 at 9:01 PM, Pranith Kumar <bobby.prani@gmail.com>
> wrote:
> > Fix ppc 32 build failure as reported here:
> >
> > http://kisskb.ellerman.id.au/kisskb/buildresult/11663513/
>
> | arch/powerpc/include/asm/floppy.h:142:20: error: 'isa_bridge_pcidev'
> undeclared (first use in this function)
> | make[3]: *** [drivers/block/floppy.o] Error 1
>
> The definition of isa_bridge_pcidev is only available if CONFIG_PCI=y...
>
> > The error is that pci_32.o was not being built for PPC_32. Fix error by
> adding
> > it in the Makefile. Tested using the ppc cross compiler.
>
> ... so how can adding this make the floppy.h error go away?
>

So the definition which you are talking about within CONFIG_PCI=y is an
extern definition

arch/powerpc/include/asm/ppc-pci.h:28:extern struct pci_dev
*isa_bridge_pcidev;

If you build pci_32.o unconditionally, there is an

EXPORT_SYMBOL(isa_bridge_pcidev);

which supplies the required symbol.

But yes, you are right in that we should not unconditionally compile
pci_32.o. Making floppy depend on PCI is the right thing to do. However,


>
> Note that arch/powerpc/kernel/Makefile does add
> pci_$(CONFIG_WORD_SIZE).o, but only if CONFIG_PCI=y.
>
> So, thanks for your patch, but I don't think your fix is the right
> solution.
>
> However, drivers/block/floppy.o is enabled by BLK_DEV_FD, which
> depends on ARCH_MAY_HAVE_PC_FDC.
>
> arch/powerpc/Kconfig has:
>
> config ARCH_MAY_HAVE_PC_FDC
>         bool
>         default !PPC_PSERIES || PCI
>
> PCI is not set, and PPC_PSERIES is also not set, so this
> defaults to y, which is obviously not correct, as floppy.h needs PCI.
>
> As this symbol doesn't enable floppy support in-se, probably it should just
> be:
>
> config ARCH_MAY_HAVE_PC_FDC
>         bool
>         depends on PCI
>

the right thing I guess here is to depend on !PPC_PSERIES && PCI since I
guess pSeries does not support floppy.h (hence the original condition
check?).

Note that there are other unrelated errors which do not let me complete the
PPC 32 build with the config there yet. I just verified this symbol error.


> This config line was last touched by
> commit bed59275810a55500e885cbdc5c2a0507f13c00e
> Author: Stephen Rothwell <sfr@canb.auug.org.au>
> Date:   Sun Mar 4 17:04:44 2007 +1100
>
>     [POWERPC] Allow pSeries to build without CONFIG_PCI
>
>     Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>     Signed-off-by: Paul Mackerras <paulus@samba.org>
>


-- 
Pranith

[-- Attachment #2: Type: text/html, Size: 3905 bytes --]

^ permalink raw reply

* Re: [PATCH] powerpc: Fix build failure for PPC_32
From: Geert Uytterhoeven @ 2014-08-18 19:28 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Rob Herring, Stephen Rothwell, Mahesh Salgaonkar, Gerhard Sittig,
	open list, Paul Mackerras, Andrew Morton,
	open list:LINUX FOR POWERPC...
In-Reply-To: <1408388465-26577-1-git-send-email-bobby.prani@gmail.com>

Hi Pranith,

On Mon, Aug 18, 2014 at 9:01 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> Fix ppc 32 build failure as reported here:
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/11663513/

| arch/powerpc/include/asm/floppy.h:142:20: error: 'isa_bridge_pcidev'
undeclared (first use in this function)
| make[3]: *** [drivers/block/floppy.o] Error 1

The definition of isa_bridge_pcidev is only available if CONFIG_PCI=y...

> The error is that pci_32.o was not being built for PPC_32. Fix error by adding
> it in the Makefile. Tested using the ppc cross compiler.

... so how can adding this make the floppy.h error go away?

Note that arch/powerpc/kernel/Makefile does add
pci_$(CONFIG_WORD_SIZE).o, but only if CONFIG_PCI=y.

So, thanks for your patch, but I don't think your fix is the right solution.

However, drivers/block/floppy.o is enabled by BLK_DEV_FD, which
depends on ARCH_MAY_HAVE_PC_FDC.

arch/powerpc/Kconfig has:

config ARCH_MAY_HAVE_PC_FDC
        bool
        default !PPC_PSERIES || PCI

PCI is not set, and PPC_PSERIES is also not set, so this
defaults to y, which is obviously not correct, as floppy.h needs PCI.

As this symbol doesn't enable floppy support in-se, probably it should just
be:

config ARCH_MAY_HAVE_PC_FDC
        bool
        depends on PCI

This config line was last touched by
commit bed59275810a55500e885cbdc5c2a0507f13c00e
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date:   Sun Mar 4 17:04:44 2007 +1100

    [POWERPC] Allow pSeries to build without CONFIG_PCI

    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Paul Mackerras <paulus@samba.org>

> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> CC: Andrew Morton <akpm@linux-foundation.org>
> ---
>  arch/powerpc/kernel/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
> index 670c312..3206ba1 100644
> --- a/arch/powerpc/kernel/Makefile
> +++ b/arch/powerpc/kernel/Makefile
> @@ -89,7 +89,7 @@ extra-y                               += vmlinux.lds
>
>  obj-$(CONFIG_RELOCATABLE_PPC32)        += reloc_32.o
>
> -obj-$(CONFIG_PPC32)            += entry_32.o setup_32.o
> +obj-$(CONFIG_PPC32)            += entry_32.o setup_32.o pci_32.o
>  obj-$(CONFIG_PPC64)            += dma-iommu.o iommu.o
>  obj-$(CONFIG_KGDB)             += kgdb.o
>  obj-$(CONFIG_MODULES)          += ppc_ksyms.o

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* [PATCH] powerpc: Fix build failure for PPC_32
From: Pranith Kumar @ 2014-08-18 19:01 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Mahesh Salgaonkar, Gerhard Sittig, Rob Herring,
	open list:LINUX FOR POWERPC..., open list
  Cc: Andrew Morton

Fix ppc 32 build failure as reported here:

http://kisskb.ellerman.id.au/kisskb/buildresult/11663513/

The error is that pci_32.o was not being built for PPC_32. Fix error by adding
it in the Makefile. Tested using the ppc cross compiler.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Andrew Morton <akpm@linux-foundation.org>
---
 arch/powerpc/kernel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 670c312..3206ba1 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -89,7 +89,7 @@ extra-y				+= vmlinux.lds
 
 obj-$(CONFIG_RELOCATABLE_PPC32)	+= reloc_32.o
 
-obj-$(CONFIG_PPC32)		+= entry_32.o setup_32.o
+obj-$(CONFIG_PPC32)		+= entry_32.o setup_32.o pci_32.o
 obj-$(CONFIG_PPC64)		+= dma-iommu.o iommu.o
 obj-$(CONFIG_KGDB)		+= kgdb.o
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
-- 
1.9.1

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox