Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310463 > unrolled thread
| Started by | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| First post | 2016-01-15 22:10 +0100 |
| Last post | 2016-01-22 04:10 +0100 |
| Articles | 20 on this page of 26 — 7 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: linux-next: build failure after merge of the akpm tree Andrew Morton <akpm@linux-foundation.org> - 2016-01-15 22:10 +0100
Re: linux-next: build failure after merge of the akpm tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-16 00:10 +0100
Re: linux-next: build failure after merge of the akpm tree Andrew Morton <akpm@linux-foundation.org> - 2016-01-16 00:20 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-16 10:00 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-20 15:20 +0100
Re: linux-next: build failure after merge of the akpm tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-20 21:40 +0100
Re: linux-next: build failure after merge of the akpm tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-22 01:30 +0100
Re: linux-next: build failure after merge of the akpm tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-22 03:50 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-25 10:40 +0100
Re: linux-next: build failure after merge of the akpm tree Michael Ellerman <mpe@ellerman.id.au> - 2016-01-25 10:50 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-25 11:20 +0100
Re: linux-next: build failure after merge of the akpm tree Vinod Koul <vinod.koul@intel.com> - 2016-01-25 11:40 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-25 11:50 +0100
Re: linux-next: build failure after merge of the akpm tree Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-01-25 11:50 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-25 12:10 +0100
Re: linux-next: build failure after merge of the akpm tree Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-01-25 12:20 +0100
Re: linux-next: build failure after merge of the akpm tree Mark Brown <broonie@kernel.org> - 2016-01-25 12:50 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-25 14:20 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-25 14:50 +0100
Re: linux-next: build failure after merge of the akpm tree Mark Brown <broonie@kernel.org> - 2016-01-25 15:00 +0100
Re: linux-next: build failure after merge of the akpm tree Vinod Koul <vinod.koul@intel.com> - 2016-01-26 13:50 +0100
Re: linux-next: build failure after merge of the akpm tree Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-01-25 15:10 +0100
Re: linux-next: build failure after merge of the akpm tree Vinod Koul <vinod.koul@intel.com> - 2016-01-26 13:30 +0100
Re: linux-next: build failure after merge of the akpm tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-26 22:00 +0100
Re: linux-next: build failure after merge of the akpm tree Takashi Iwai <tiwai@suse.de> - 2016-01-26 22:30 +0100
Re: linux-next: build failure after merge of the akpm tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-01-22 04:10 +0100
Page 1 of 2 [1] 2 Next page →
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2016-01-15 22:10 +0100 |
| Subject | Re: linux-next: build failure after merge of the akpm tree |
| Message-ID | <qRjN8-39u-7@gated-at.bofh.it> |
On Thu, 14 Jan 2016 15:15:41 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> On Thu, 31 Dec 2015 23:22:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the akpm tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> >
> > sound/core/compress_offload.c: In function 'snd_compr_ioctl':
> > /home/sfr/next/next/sound/core/compress_offload.c:804:2: error: case label does not reduce to an integer constant
> > case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
> > ^
> >
> > I have no idea what caused that and have just left it broken for now.
>
> I am still getting this. Something in mmotm is causing or exposing this.
I'm getting this as well. If I do
--- a/include/uapi/sound/compress_offload.h~a
+++ a/include/uapi/sound/compress_offload.h
@@ -163,8 +163,7 @@ struct snd_compr_metadata {
*/
#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
-#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11,\
- struct snd_compr_codec_caps)
+#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_caps)
#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\
then it compiles OK. So there's something special about `struct
snd_compr_codec_caps' which is confusing the compiler.
Looking at the cpp output:
case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x10)) << 0) | (((((sizeof(struct snd_compr_caps) == sizeof(struct snd_compr_caps[1]) && sizeof(struct snd_compr_caps) < (1 << 13)) ? sizeof(struct snd_compr_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
retval = snd_compr_get_caps(stream, arg);
break;
^^ this is SNDRV_COMPRESS_GET_CAPS and it works OK
case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x11)) << 0) | (((((sizeof(struct snd_compr_codec_caps) == sizeof(struct snd_compr_codec_caps[1]) && sizeof(struct snd_compr_codec_caps) < (1 << 13)) ? sizeof(struct snd_compr_codec_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
retval = snd_compr_get_codec_caps(stream, arg);
^^ this is SNDRV_COMPRESS_GET_CODEC_CAPS and it fails
And they are identical apart from 0x10 vs 0x11 and the struct name.
It happens in vanilla linux-next as well, without the -mm patch pile.
Confused.
[toc] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-01-16 00:10 +0100 |
| Message-ID | <qRlFf-4qa-3@gated-at.bofh.it> |
| In reply to | #1310463 |
Hi Andrew,
On Fri, 15 Jan 2016 13:05:27 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 14 Jan 2016 15:15:41 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > On Thu, 31 Dec 2015 23:22:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > After merging the akpm tree, today's linux-next build (powerpc
> > > allyesconfig) failed like this:
> > >
> > > sound/core/compress_offload.c: In function 'snd_compr_ioctl':
> > > /home/sfr/next/next/sound/core/compress_offload.c:804:2: error: case label does not reduce to an integer constant
> > > case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
> > > ^
> > >
> > > I have no idea what caused that and have just left it broken for now.
> >
> > I am still getting this. Something in mmotm is causing or exposing this.
>
> I'm getting this as well. If I do
>
> --- a/include/uapi/sound/compress_offload.h~a
> +++ a/include/uapi/sound/compress_offload.h
> @@ -163,8 +163,7 @@ struct snd_compr_metadata {
> */
> #define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
> #define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
> -#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11,\
> - struct snd_compr_codec_caps)
> +#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_caps)
> #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
> #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
> #define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\
>
> then it compiles OK. So there's something special about `struct
> snd_compr_codec_caps' which is confusing the compiler.
Its very big (hint, I think it is bigger than 1 << 13).
> Looking at the cpp output:
>
> case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x10)) << 0) | (((((sizeof(struct snd_compr_caps) == sizeof(struct snd_compr_caps[1]) && sizeof(struct snd_compr_caps) < (1 << 13)) ? sizeof(struct snd_compr_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
> retval = snd_compr_get_caps(stream, arg);
> break;
>
> ^^ this is SNDRV_COMPRESS_GET_CAPS and it works OK
>
> case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x11)) << 0) | (((((sizeof(struct snd_compr_codec_caps) == sizeof(struct snd_compr_codec_caps[1]) && sizeof(struct snd_compr_codec_caps) < (1 << 13)) ? sizeof(struct snd_compr_codec_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
> retval = snd_compr_get_codec_caps(stream, arg);
>
> ^^ this is SNDRV_COMPRESS_GET_CODEC_CAPS and it fails
>
> And they are identical apart from 0x10 vs 0x11 and the struct name.
>
> It happens in vanilla linux-next as well, without the -mm patch pile.
Interesting ... what config. I get this in my powerpc allyesconfig
builds but only after I have added your patches. So I guess maybe some
kconfig has changed due to your patches that enable this driver to
build.
> Confused.
Me as well :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[toc] | [prev] | [next] | [standalone]
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2016-01-16 00:20 +0100 |
| Message-ID | <qRlOV-4t7-5@gated-at.bofh.it> |
| In reply to | #1310520 |
On Sat, 16 Jan 2016 10:00:47 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
> > +#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_caps)
> > #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
> > #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
> > #define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\
> >
> > then it compiles OK. So there's something special about `struct
> > snd_compr_codec_caps' which is confusing the compiler.
>
> Its very big (hint, I think it is bigger than 1 << 13).
ah-hah.
sizeof(struct snd_compr_codec_caps) is 11144 on x86_64
allyesconfig, but x86_64 uses (1<<14), not (1<<13) - x86_64 has more
space in the ioctl payload.
So. Sound guys: your struct snd_compr_codec_caps is too large for
powerpc ioctls.
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-16 10:00 +0100 |
| Message-ID | <qRuSe-22h-7@gated-at.bofh.it> |
| In reply to | #1310523 |
On Sat, 16 Jan 2016 00:14:01 +0100,
Andrew Morton wrote:
>
> On Sat, 16 Jan 2016 10:00:47 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > Hi Andrew,
> > > +#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_caps)
> > > #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
> > > #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
> > > #define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\
> > >
> > > then it compiles OK. So there's something special about `struct
> > > snd_compr_codec_caps' which is confusing the compiler.
> >
> > Its very big (hint, I think it is bigger than 1 << 13).
>
> ah-hah.
>
> sizeof(struct snd_compr_codec_caps) is 11144 on x86_64
> allyesconfig, but x86_64 uses (1<<14), not (1<<13) - x86_64 has more
> space in the ioctl payload.
>
>
> So. Sound guys: your struct snd_compr_codec_caps is too large for
> powerpc ioctls.
Ouch, this was what I was concerned. I thought we did calculate it at
the time writing API, alas, we failed. We need to do math drills
again...
There are a few ways to fix this, but all are not comfortable.
A. Disable compress API for powerpc.
B. Disable this ioctl for powerpc and keep it for others while
providing yet a new ioctl for the similar functionality.
B1. Pass the same struct via a pointer: this needs a special
compat_ioctl handling
B2. Reduce the size of struct snd_compr_codec_caps, e.g. set
MAX_NUM_CODEC_DESCRIPTORS to 16.
C. What else?
Takashi
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-20 15:20 +0100 |
| Message-ID | <qT1M6-7FE-17@gated-at.bofh.it> |
| In reply to | #1310910 |
On Sat, 16 Jan 2016 09:51:29 +0100,
Takashi Iwai wrote:
>
> On Sat, 16 Jan 2016 00:14:01 +0100,
> Andrew Morton wrote:
> >
> > On Sat, 16 Jan 2016 10:00:47 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > > Hi Andrew,
> > > > +#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_caps)
> > > > #define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
> > > > #define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
> > > > #define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\
> > > >
> > > > then it compiles OK. So there's something special about `struct
> > > > snd_compr_codec_caps' which is confusing the compiler.
> > >
> > > Its very big (hint, I think it is bigger than 1 << 13).
> >
> > ah-hah.
> >
> > sizeof(struct snd_compr_codec_caps) is 11144 on x86_64
> > allyesconfig, but x86_64 uses (1<<14), not (1<<13) - x86_64 has more
> > space in the ioctl payload.
> >
> >
> > So. Sound guys: your struct snd_compr_codec_caps is too large for
> > powerpc ioctls.
>
> Ouch, this was what I was concerned. I thought we did calculate it at
> the time writing API, alas, we failed. We need to do math drills
> again...
>
> There are a few ways to fix this, but all are not comfortable.
>
> A. Disable compress API for powerpc.
>
> B. Disable this ioctl for powerpc and keep it for others while
> providing yet a new ioctl for the similar functionality.
>
> B1. Pass the same struct via a pointer: this needs a special
> compat_ioctl handling
> B2. Reduce the size of struct snd_compr_codec_caps, e.g. set
> MAX_NUM_CODEC_DESCRIPTORS to 16.
>
> C. What else?
Vinod, what's your take?
Takashi
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-01-20 21:40 +0100 |
| Message-ID | <qT7HQ-3eL-23@gated-at.bofh.it> |
| In reply to | #1313242 |
Hi Takashi, On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote: > > On Sat, 16 Jan 2016 09:51:29 +0100, > Takashi Iwai wrote: > > > > There are a few ways to fix this, but all are not comfortable. > > > > A. Disable compress API for powerpc. This also affects alpha, mips and (maybe) sparc. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-01-22 01:30 +0100 |
| Message-ID | <qTxLX-4qP-5@gated-at.bofh.it> |
| In reply to | #1313517 |
Hi all,
On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> >
> > On Sat, 16 Jan 2016 09:51:29 +0100,
> > Takashi Iwai wrote:
> > >
> > > There are a few ways to fix this, but all are not comfortable.
> > >
> > > A. Disable compress API for powerpc.
>
> This also affects alpha, mips and (maybe) sparc.
This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
UBSAN support") which is in Linus' tree as of this morning. The only
relevant change that made was in the compiler flags (I tested this by
building the file without that commit but with these new compiler flags:
-fsanitize=shift -fsanitize=integer-divide-by-zero
-fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
-fsanitize=signed-integer-overflow -fsanitize=bounds
-fsanitize=object-size -fsanitize=returns-nonnull-attribute
-fsanitize=bool -fsanitize=enum -fsanitize=alignment
The preprocessed file is the same in both cases, but with these flags
the compiler errors.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-01-22 03:50 +0100 |
| Message-ID | <qTzXs-5Rs-7@gated-at.bofh.it> |
| In reply to | #1314660 |
Hi all,
On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> > >
> > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > Takashi Iwai wrote:
> > > >
> > > > There are a few ways to fix this, but all are not comfortable.
> > > >
> > > > A. Disable compress API for powerpc.
> >
> > This also affects alpha, mips and (maybe) sparc.
>
> This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> UBSAN support") which is in Linus' tree as of this morning. The only
> relevant change that made was in the compiler flags (I tested this by
> building the file without that commit but with these new compiler flags:
>
> -fsanitize=shift -fsanitize=integer-divide-by-zero
> -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> -fsanitize=signed-integer-overflow -fsanitize=bounds
> -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> -fsanitize=bool -fsanitize=enum -fsanitize=alignment
>
> The preprocessed file is the same in both cases, but with these flags
> the compiler errors.
So for now I have suppressed the error using the following patch (which
I will keep in my fixes tree until some other fix is applied):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 22 Jan 2016 13:24:57 +1100
Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
for now
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
sound/soc/codecs/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 50693c867e71..ee5f36b9c787 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -13,6 +13,7 @@ menu "CODEC drivers"
config SND_SOC_ALL_CODECS
tristate "Build all ASoC CODEC drivers"
depends on COMPILE_TEST
+ depends on !PPC
select SND_SOC_88PM860X if MFD_88PM860X
select SND_SOC_L3
select SND_SOC_AB8500_CODEC if ABX500_CORE
--
2.6.4
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-25 10:40 +0100 |
| Message-ID | <qULMS-1T9-5@gated-at.bofh.it> |
| In reply to | #1314717 |
On Fri, 22 Jan 2016 03:40:45 +0100,
Stephen Rothwell wrote:
>
> Hi all,
>
> On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> > > >
> > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > Takashi Iwai wrote:
> > > > >
> > > > > There are a few ways to fix this, but all are not comfortable.
> > > > >
> > > > > A. Disable compress API for powerpc.
> > >
> > > This also affects alpha, mips and (maybe) sparc.
> >
> > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > UBSAN support") which is in Linus' tree as of this morning. The only
> > relevant change that made was in the compiler flags (I tested this by
> > building the file without that commit but with these new compiler flags:
> >
> > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> >
> > The preprocessed file is the same in both cases, but with these flags
> > the compiler errors.
>
> So for now I have suppressed the error using the following patch (which
> I will keep in my fixes tree until some other fix is applied):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 22 Jan 2016 13:24:57 +1100
> Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> for now
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> sound/soc/codecs/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 50693c867e71..ee5f36b9c787 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -13,6 +13,7 @@ menu "CODEC drivers"
> config SND_SOC_ALL_CODECS
> tristate "Build all ASoC CODEC drivers"
> depends on COMPILE_TEST
> + depends on !PPC
> select SND_SOC_88PM860X if MFD_88PM860X
> select SND_SOC_L3
> select SND_SOC_AB8500_CODEC if ABX500_CORE
Suppressing this whole is an overreaction, IMO. It should suffice
just to disable compile-testing Intel driver.
How about the patch below?
thanks,
Takashi
-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
Since some ioctl in compress offload API is broken for PPC (the struct
size overflows), now we get actually the build error.
Until we get the proper solution (e.g. alternative ioctl), let's
disable the build of Intel ASoC driver that is the only driver who
enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
mainline tree.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/intel/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 803f95e40679..d854cd66e090 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
tristate
select SND_SOC_INTEL_SST_ACPI if ACPI
depends on (X86 || COMPILE_TEST)
+ # FIXME: a part of compress API is broken for PPC
+ depends on !PPC
config SND_SOC_INTEL_SST_ACPI
tristate
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-01-25 10:50 +0100 |
| Message-ID | <qULWz-1WT-23@gated-at.bofh.it> |
| In reply to | #1316323 |
On Mon, 2016-01-25 at 10:29 +0100, Takashi Iwai wrote: > On Fri, 22 Jan 2016 03:40:45 +0100, Stephen Rothwell wrote: > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig > > index 50693c867e71..ee5f36b9c787 100644 > > --- a/sound/soc/codecs/Kconfig > > +++ b/sound/soc/codecs/Kconfig > > @@ -13,6 +13,7 @@ menu "CODEC drivers" > > config SND_SOC_ALL_CODECS > > tristate "Build all ASoC CODEC drivers" > > depends on COMPILE_TEST > > + depends on !PPC > > select SND_SOC_88PM860X if MFD_88PM860X > > select SND_SOC_L3 > > select SND_SOC_AB8500_CODEC if ABX500_CORE > > Suppressing this whole is an overreaction, IMO. It should suffice > just to disable compile-testing Intel driver. > How about the patch below? > > > thanks, > > Takashi > > -- 8< -- > From: Takashi Iwai <tiwai@suse.de> > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC > > Since some ioctl in compress offload API is broken for PPC (the struct > size overflows), now we get actually the build error. > > Until we get the proper solution (e.g. alternative ioctl), let's > disable the build of Intel ASoC driver that is the only driver who > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the > mainline tree. > > Signed-off-by: Takashi Iwai <tiwai@suse.de> > --- > sound/soc/intel/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig > index 803f95e40679..d854cd66e090 100644 > --- a/sound/soc/intel/Kconfig > +++ b/sound/soc/intel/Kconfig > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST > tristate > select SND_SOC_INTEL_SST_ACPI if ACPI > depends on (X86 || COMPILE_TEST) > + # FIXME: a part of compress API is broken for PPC > + depends on !PPC > > config SND_SOC_INTEL_SST_ACPI > tristate That's fine by me. Acked-by: Michael Ellerman <mpe@ellerman.id.au> Though it looks like alpha and mips would also be broken, but perhaps they can't build that code for some other reason. arch/alpha/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS 13 arch/mips/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS 13 cheers
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-25 11:20 +0100 |
| Message-ID | <qUMpC-2q9-63@gated-at.bofh.it> |
| In reply to | #1316335 |
On Mon, 25 Jan 2016 10:40:14 +0100, Michael Ellerman wrote: > > On Mon, 2016-01-25 at 10:29 +0100, Takashi Iwai wrote: > > On Fri, 22 Jan 2016 03:40:45 +0100, Stephen Rothwell wrote: > > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig > > > index 50693c867e71..ee5f36b9c787 100644 > > > --- a/sound/soc/codecs/Kconfig > > > +++ b/sound/soc/codecs/Kconfig > > > @@ -13,6 +13,7 @@ menu "CODEC drivers" > > > config SND_SOC_ALL_CODECS > > > tristate "Build all ASoC CODEC drivers" > > > depends on COMPILE_TEST > > > + depends on !PPC > > > select SND_SOC_88PM860X if MFD_88PM860X > > > select SND_SOC_L3 > > > select SND_SOC_AB8500_CODEC if ABX500_CORE > > > > Suppressing this whole is an overreaction, IMO. It should suffice > > just to disable compile-testing Intel driver. > > How about the patch below? > > > > > > thanks, > > > > Takashi > > > > -- 8< -- > > From: Takashi Iwai <tiwai@suse.de> > > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC > > > > Since some ioctl in compress offload API is broken for PPC (the struct > > size overflows), now we get actually the build error. > > > > Until we get the proper solution (e.g. alternative ioctl), let's > > disable the build of Intel ASoC driver that is the only driver who > > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the > > mainline tree. > > > > Signed-off-by: Takashi Iwai <tiwai@suse.de> > > --- > > sound/soc/intel/Kconfig | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig > > index 803f95e40679..d854cd66e090 100644 > > --- a/sound/soc/intel/Kconfig > > +++ b/sound/soc/intel/Kconfig > > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST > > tristate > > select SND_SOC_INTEL_SST_ACPI if ACPI > > depends on (X86 || COMPILE_TEST) > > + # FIXME: a part of compress API is broken for PPC > > + depends on !PPC > > > > config SND_SOC_INTEL_SST_ACPI > > tristate > > > That's fine by me. > > Acked-by: Michael Ellerman <mpe@ellerman.id.au> > > > Though it looks like alpha and mips would also be broken, but perhaps they > can't build that code for some other reason. > > arch/alpha/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS 13 > arch/mips/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS 13 OK, I'll resubmit the patch including these other archs. thanks, Takashi
[toc] | [prev] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2016-01-25 11:40 +0100 |
| Message-ID | <qUMIV-2z3-5@gated-at.bofh.it> |
| In reply to | #1316323 |
On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> On Fri, 22 Jan 2016 03:40:45 +0100,
> Stephen Rothwell wrote:
> >
> > Hi all,
> >
> > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> > > > >
> > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > Takashi Iwai wrote:
> > > > > >
> > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > >
> > > > > > A. Disable compress API for powerpc.
> > > >
> > > > This also affects alpha, mips and (maybe) sparc.
> > >
> > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > UBSAN support") which is in Linus' tree as of this morning. The only
> > > relevant change that made was in the compiler flags (I tested this by
> > > building the file without that commit but with these new compiler flags:
> > >
> > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > >
> > > The preprocessed file is the same in both cases, but with these flags
> > > the compiler errors.
> >
> > So for now I have suppressed the error using the following patch (which
> > I will keep in my fixes tree until some other fix is applied):
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > for now
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> > sound/soc/codecs/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > index 50693c867e71..ee5f36b9c787 100644
> > --- a/sound/soc/codecs/Kconfig
> > +++ b/sound/soc/codecs/Kconfig
> > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > config SND_SOC_ALL_CODECS
> > tristate "Build all ASoC CODEC drivers"
> > depends on COMPILE_TEST
> > + depends on !PPC
> > select SND_SOC_88PM860X if MFD_88PM860X
> > select SND_SOC_L3
> > select SND_SOC_AB8500_CODEC if ABX500_CORE
>
> Suppressing this whole is an overreaction, IMO. It should suffice
> just to disable compile-testing Intel driver.
> How about the patch below?
Takashi,
This wont fix it as we have WM driver using this as well. SND_SOC_WM_ADSP
uses SND_SOC_COMPRESS.
So the better fix would be to do so in either SND_SOC_COMPRESS or even
better in SND_COMPRESS_OFFLOAD..
I think this has been exposed by WM driver as Intel driver depends on X86 so
compress core wouldn't be compiled as none of the drivers select this :)
--
Thanks
~Vinod
>
>
> thanks,
>
> Takashi
>
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
>
> Since some ioctl in compress offload API is broken for PPC (the struct
> size overflows), now we get actually the build error.
>
> Until we get the proper solution (e.g. alternative ioctl), let's
> disable the build of Intel ASoC driver that is the only driver who
> enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> mainline tree.
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/soc/intel/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 803f95e40679..d854cd66e090 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> tristate
> select SND_SOC_INTEL_SST_ACPI if ACPI
> depends on (X86 || COMPILE_TEST)
> + # FIXME: a part of compress API is broken for PPC
> + depends on !PPC
>
> config SND_SOC_INTEL_SST_ACPI
> tristate
> --
> 2.7.0
>
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-25 11:50 +0100 |
| Message-ID | <qUMSE-2CU-59@gated-at.bofh.it> |
| In reply to | #1316445 |
On Mon, 25 Jan 2016 11:41:12 +0100,
Vinod Koul wrote:
>
> On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > On Fri, 22 Jan 2016 03:40:45 +0100,
> > Stephen Rothwell wrote:
> > >
> > > Hi all,
> > >
> > > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > >
> > > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> > > > > >
> > > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > > Takashi Iwai wrote:
> > > > > > >
> > > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > > >
> > > > > > > A. Disable compress API for powerpc.
> > > > >
> > > > > This also affects alpha, mips and (maybe) sparc.
> > > >
> > > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > > UBSAN support") which is in Linus' tree as of this morning. The only
> > > > relevant change that made was in the compiler flags (I tested this by
> > > > building the file without that commit but with these new compiler flags:
> > > >
> > > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > > >
> > > > The preprocessed file is the same in both cases, but with these flags
> > > > the compiler errors.
> > >
> > > So for now I have suppressed the error using the following patch (which
> > > I will keep in my fixes tree until some other fix is applied):
> > >
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > > for now
> > >
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > > sound/soc/codecs/Kconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > > config SND_SOC_ALL_CODECS
> > > tristate "Build all ASoC CODEC drivers"
> > > depends on COMPILE_TEST
> > > + depends on !PPC
> > > select SND_SOC_88PM860X if MFD_88PM860X
> > > select SND_SOC_L3
> > > select SND_SOC_AB8500_CODEC if ABX500_CORE
> >
> > Suppressing this whole is an overreaction, IMO. It should suffice
> > just to disable compile-testing Intel driver.
> > How about the patch below?
>
> Takashi,
>
> This wont fix it as we have WM driver using this as well. SND_SOC_WM_ADSP
> uses SND_SOC_COMPRESS.
Yes, but SND_SOC_WM_ADSP isn't selected at all in the mainline, so
my patch should work actually alone.
> So the better fix would be to do so in either SND_SOC_COMPRESS or even
> better in SND_COMPRESS_OFFLOAD..
No, it won't work because it's reverse-selected. You can't put
depends there. It's a known limitation of the current Kconfig stuff.
Takashi
> I think this has been exposed by WM driver as Intel driver depends on X86 so
> compress core wouldn't be compiled as none of the drivers select this :)
>
> --
> Thanks
> ~Vinod
> >
> >
> > thanks,
> >
> > Takashi
> >
> > -- 8< --
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> >
> > Since some ioctl in compress offload API is broken for PPC (the struct
> > size overflows), now we get actually the build error.
> >
> > Until we get the proper solution (e.g. alternative ioctl), let's
> > disable the build of Intel ASoC driver that is the only driver who
> > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> > mainline tree.
> >
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> > sound/soc/intel/Kconfig | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > index 803f95e40679..d854cd66e090 100644
> > --- a/sound/soc/intel/Kconfig
> > +++ b/sound/soc/intel/Kconfig
> > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> > tristate
> > select SND_SOC_INTEL_SST_ACPI if ACPI
> > depends on (X86 || COMPILE_TEST)
> > + # FIXME: a part of compress API is broken for PPC
> > + depends on !PPC
> >
> > config SND_SOC_INTEL_SST_ACPI
> > tristate
> > --
> > 2.7.0
> >
>
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-01-25 11:50 +0100 |
| Message-ID | <qUMSC-2CU-9@gated-at.bofh.it> |
| In reply to | #1316323 |
On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> On Fri, 22 Jan 2016 03:40:45 +0100,
> Stephen Rothwell wrote:
> >
> > Hi all,
> >
> > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> > > > >
> > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > Takashi Iwai wrote:
> > > > > >
> > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > >
> > > > > > A. Disable compress API for powerpc.
> > > >
> > > > This also affects alpha, mips and (maybe) sparc.
> > >
> > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > UBSAN support") which is in Linus' tree as of this morning. The only
> > > relevant change that made was in the compiler flags (I tested this by
> > > building the file without that commit but with these new compiler flags:
> > >
> > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > >
> > > The preprocessed file is the same in both cases, but with these flags
> > > the compiler errors.
> >
> > So for now I have suppressed the error using the following patch (which
> > I will keep in my fixes tree until some other fix is applied):
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > for now
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> > sound/soc/codecs/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > index 50693c867e71..ee5f36b9c787 100644
> > --- a/sound/soc/codecs/Kconfig
> > +++ b/sound/soc/codecs/Kconfig
> > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > config SND_SOC_ALL_CODECS
> > tristate "Build all ASoC CODEC drivers"
> > depends on COMPILE_TEST
> > + depends on !PPC
> > select SND_SOC_88PM860X if MFD_88PM860X
> > select SND_SOC_L3
> > select SND_SOC_AB8500_CODEC if ABX500_CORE
>
> Suppressing this whole is an overreaction, IMO. It should suffice
> just to disable compile-testing Intel driver.
> How about the patch below?
>
>
> thanks,
>
> Takashi
>
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
>
> Since some ioctl in compress offload API is broken for PPC (the struct
> size overflows), now we get actually the build error.
>
> Until we get the proper solution (e.g. alternative ioctl), let's
> disable the build of Intel ASoC driver that is the only driver who
> enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> mainline tree.
Sorry, but this does not fix the build failure.
I can still see SND_COMPRESS_OFFLOAD=m in .config and the build fails.
But the following does fix it for powerpc:
diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
index 7ea66ee..b92d286 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -31,6 +31,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
config SND_SOC_COMPRESS
bool
+ depends on !PPC
select SND_COMPRESS_OFFLOAD
config SND_SOC_TOPOLOGY
--
I will just check with alpha and see if that is also affected.
regards
sudip
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-25 12:10 +0100 |
| Message-ID | <qUNbX-30x-13@gated-at.bofh.it> |
| In reply to | #1316452 |
On Mon, 25 Jan 2016 11:45:56 +0100,
Sudip Mukherjee wrote:
>
> On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > On Fri, 22 Jan 2016 03:40:45 +0100,
> > Stephen Rothwell wrote:
> > >
> > > Hi all,
> > >
> > > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > >
> > > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> > > > > >
> > > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > > Takashi Iwai wrote:
> > > > > > >
> > > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > > >
> > > > > > > A. Disable compress API for powerpc.
> > > > >
> > > > > This also affects alpha, mips and (maybe) sparc.
> > > >
> > > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > > UBSAN support") which is in Linus' tree as of this morning. The only
> > > > relevant change that made was in the compiler flags (I tested this by
> > > > building the file without that commit but with these new compiler flags:
> > > >
> > > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > > >
> > > > The preprocessed file is the same in both cases, but with these flags
> > > > the compiler errors.
> > >
> > > So for now I have suppressed the error using the following patch (which
> > > I will keep in my fixes tree until some other fix is applied):
> > >
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > > for now
> > >
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > > sound/soc/codecs/Kconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > > config SND_SOC_ALL_CODECS
> > > tristate "Build all ASoC CODEC drivers"
> > > depends on COMPILE_TEST
> > > + depends on !PPC
> > > select SND_SOC_88PM860X if MFD_88PM860X
> > > select SND_SOC_L3
> > > select SND_SOC_AB8500_CODEC if ABX500_CORE
> >
> > Suppressing this whole is an overreaction, IMO. It should suffice
> > just to disable compile-testing Intel driver.
> > How about the patch below?
> >
> >
> > thanks,
> >
> > Takashi
> >
> > -- 8< --
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> >
> > Since some ioctl in compress offload API is broken for PPC (the struct
> > size overflows), now we get actually the build error.
> >
> > Until we get the proper solution (e.g. alternative ioctl), let's
> > disable the build of Intel ASoC driver that is the only driver who
> > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> > mainline tree.
>
> Sorry, but this does not fix the build failure.
> I can still see SND_COMPRESS_OFFLOAD=m in .config and the build fails.
Who sets this config? SND_COMPRESS_OFFLOAD has no prompt, so this
should be default off.
> But the following does fix it for powerpc:
>
> diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
> index 7ea66ee..b92d286 100644
> --- a/sound/soc/Kconfig
> +++ b/sound/soc/Kconfig
> @@ -31,6 +31,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
>
> config SND_SOC_COMPRESS
> bool
> + depends on !PPC
> select SND_COMPRESS_OFFLOAD
>
> config SND_SOC_TOPOLOGY
It has a reverse-selection, and the reverse-selection ignores Depends,
AFAIK. If that long-standing problem were already fixed, it's
great...
Takashi
>
> --
>
> I will just check with alpha and see if that is also affected.
>
> regards
> sudip
>
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-01-25 12:20 +0100 |
| Message-ID | <qUNlD-33Y-3@gated-at.bofh.it> |
| In reply to | #1316483 |
On Mon, Jan 25, 2016 at 12:03:54PM +0100, Takashi Iwai wrote: > On Mon, 25 Jan 2016 11:45:56 +0100, > Sudip Mukherjee wrote: > > > > On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote: > > > On Fri, 22 Jan 2016 03:40:45 +0100, > > > Stephen Rothwell wrote: > > > > > > > > Hi all, > > > > <snip> > > > > > > > > From: Stephen Rothwell <sfr@canb.auug.org.au> > > > > Date: Fri, 22 Jan 2016 13:24:57 +1100 > > > > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC > > > > for now > > > > > > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > > > > --- > > > > sound/soc/codecs/Kconfig | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig > > > > index 50693c867e71..ee5f36b9c787 100644 > > > > --- a/sound/soc/codecs/Kconfig > > > > +++ b/sound/soc/codecs/Kconfig > > > > @@ -13,6 +13,7 @@ menu "CODEC drivers" > > > > config SND_SOC_ALL_CODECS > > > > tristate "Build all ASoC CODEC drivers" > > > > depends on COMPILE_TEST > > > > + depends on !PPC > > > > select SND_SOC_88PM860X if MFD_88PM860X > > > > select SND_SOC_L3 > > > > select SND_SOC_AB8500_CODEC if ABX500_CORE > > > > > > Suppressing this whole is an overreaction, IMO. It should suffice > > > just to disable compile-testing Intel driver. > > > How about the patch below? > > > > > > > > > thanks, > > > > > > Takashi > > > > > > -- 8< -- > > > From: Takashi Iwai <tiwai@suse.de> > > > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC > > > > > > Since some ioctl in compress offload API is broken for PPC (the struct > > > size overflows), now we get actually the build error. > > > > > > Until we get the proper solution (e.g. alternative ioctl), let's > > > disable the build of Intel ASoC driver that is the only driver who > > > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the > > > mainline tree. > > > > Sorry, but this does not fix the build failure. > > I can still see SND_COMPRESS_OFFLOAD=m in .config and the build fails. > > Who sets this config? SND_COMPRESS_OFFLOAD has no prompt, so this > should be default off. I think when we are doing allmodconfig SND_SOC_COMPRESS will be selected which in turn will select SND_COMPRESS_OFFLOAD as SND_SOC_COMPRESS depends only on SND_SOC. And alpha is not affected. It builds fine. regards sudip
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-01-25 12:50 +0100 |
| Message-ID | <qUNOH-3ga-39@gated-at.bofh.it> |
| In reply to | #1316323 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote: > Stephen Rothwell wrote: > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig > > index 50693c867e71..ee5f36b9c787 100644 > > --- a/sound/soc/codecs/Kconfig > > +++ b/sound/soc/codecs/Kconfig > > @@ -13,6 +13,7 @@ menu "CODEC drivers" > > config SND_SOC_ALL_CODECS > > tristate "Build all ASoC CODEC drivers" > > depends on COMPILE_TEST > > + depends on !PPC > > select SND_SOC_88PM860X if MFD_88PM860X > > select SND_SOC_L3 > > select SND_SOC_AB8500_CODEC if ABX500_CORE > Suppressing this whole is an overreaction, IMO. It should suffice > just to disable compile-testing Intel driver. Please send patches and reports to maintainers :( I agree that this is an absurdly wide change. > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig > index 803f95e40679..d854cd66e090 100644 > --- a/sound/soc/intel/Kconfig > +++ b/sound/soc/intel/Kconfig > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST > tristate > select SND_SOC_INTEL_SST_ACPI if ACPI > depends on (X86 || COMPILE_TEST) > + # FIXME: a part of compress API is broken for PPC > + depends on !PPC Why is an Intel CPU thing being enabled by SND_SOC_ALL_CODECS? I'm also unclear why this will help when we're selecting in the drivers so their dependencies will be ignored.
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-25 14:20 +0100 |
| Message-ID | <qUPdP-4ol-59@gated-at.bofh.it> |
| In reply to | #1316545 |
On Mon, 25 Jan 2016 12:41:50 +0100,
Mark Brown wrote:
>
> On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > Stephen Rothwell wrote:
>
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > > config SND_SOC_ALL_CODECS
> > > tristate "Build all ASoC CODEC drivers"
> > > depends on COMPILE_TEST
> > > + depends on !PPC
> > > select SND_SOC_88PM860X if MFD_88PM860X
> > > select SND_SOC_L3
> > > select SND_SOC_AB8500_CODEC if ABX500_CORE
>
> > Suppressing this whole is an overreaction, IMO. It should suffice
> > just to disable compile-testing Intel driver.
>
> Please send patches and reports to maintainers :( I agree that this is
> an absurdly wide change.
>
> > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > index 803f95e40679..d854cd66e090 100644
> > --- a/sound/soc/intel/Kconfig
> > +++ b/sound/soc/intel/Kconfig
> > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> > tristate
> > select SND_SOC_INTEL_SST_ACPI if ACPI
> > depends on (X86 || COMPILE_TEST)
> > + # FIXME: a part of compress API is broken for PPC
> > + depends on !PPC
>
> Why is an Intel CPU thing being enabled by SND_SOC_ALL_CODECS? I'm also
> unclear why this will help when we're selecting in the drivers so their
> dependencies will be ignored.
Yeah, obviously papering over a wrong place.
In anyway, thinking of this workaround again, I don't think it being
the best way. The easier and safer workaround is to just avoid the
corresponding ioctl being handled. The untested patch is attached
below.
thanks,
Takashi
-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
architectures
Some architectures like PowerPC can handle the maximum struct size in
an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit. This
problem was revealed recently by a powerpc change, as it's now treated
as a fatal build error.
This patch is a workaround for that: for architectures with less than
14 bit ioctl struct size, get rid of the handling of the relevant
ioctl. We should provide an alternative equivalent ioctl code later,
but for now just paper over it. Luckily, the compress API hasn't been
used on such architectures, so the impact must be effectively zero.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/core/compress_offload.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 18b8dc45bb8f..36b0083fd9f4 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -46,6 +46,13 @@
#include <sound/compress_offload.h>
#include <sound/compress_driver.h>
+/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
+ * architectures, so we need to disable the relevant ioctls.
+ */
+#if _IOC_SIZEBITS < 13
+#define COMPR_CODEC_CAPS_OVERFLOW
+#endif
+
/* TODO:
* - add substream support for multiple devices in case of
* SND_DYNAMIC_MINORS is not used
@@ -440,6 +447,7 @@ out:
return retval;
}
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
static int
snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
{
@@ -463,6 +471,7 @@ out:
kfree(caps);
return retval;
}
+#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
/* revisit this with snd_pcm_preallocate_xxx */
static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
@@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
retval = snd_compr_get_caps(stream, arg);
break;
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
retval = snd_compr_get_codec_caps(stream, arg);
break;
+#endif
case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
retval = snd_compr_set_params(stream, arg);
break;
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2016-01-25 14:50 +0100 |
| Message-ID | <qUPGO-4CU-3@gated-at.bofh.it> |
| In reply to | #1316698 |
On Mon, 25 Jan 2016 14:10:37 +0100,
Takashi Iwai wrote:
>
> On Mon, 25 Jan 2016 12:41:50 +0100,
> Mark Brown wrote:
> >
> > On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > > Stephen Rothwell wrote:
> >
> > > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > > index 50693c867e71..ee5f36b9c787 100644
> > > > --- a/sound/soc/codecs/Kconfig
> > > > +++ b/sound/soc/codecs/Kconfig
> > > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > > > config SND_SOC_ALL_CODECS
> > > > tristate "Build all ASoC CODEC drivers"
> > > > depends on COMPILE_TEST
> > > > + depends on !PPC
> > > > select SND_SOC_88PM860X if MFD_88PM860X
> > > > select SND_SOC_L3
> > > > select SND_SOC_AB8500_CODEC if ABX500_CORE
> >
> > > Suppressing this whole is an overreaction, IMO. It should suffice
> > > just to disable compile-testing Intel driver.
> >
> > Please send patches and reports to maintainers :( I agree that this is
> > an absurdly wide change.
> >
> > > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > > index 803f95e40679..d854cd66e090 100644
> > > --- a/sound/soc/intel/Kconfig
> > > +++ b/sound/soc/intel/Kconfig
> > > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> > > tristate
> > > select SND_SOC_INTEL_SST_ACPI if ACPI
> > > depends on (X86 || COMPILE_TEST)
> > > + # FIXME: a part of compress API is broken for PPC
> > > + depends on !PPC
> >
> > Why is an Intel CPU thing being enabled by SND_SOC_ALL_CODECS? I'm also
> > unclear why this will help when we're selecting in the drivers so their
> > dependencies will be ignored.
>
> Yeah, obviously papering over a wrong place.
>
> In anyway, thinking of this workaround again, I don't think it being
> the best way. The easier and safer workaround is to just avoid the
> corresponding ioctl being handled. The untested patch is attached
> below.
>
>
> thanks,
>
> Takashi
>
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
> architectures
>
> Some architectures like PowerPC can handle the maximum struct size in
> an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
> SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit. This
> problem was revealed recently by a powerpc change, as it's now treated
> as a fatal build error.
>
> This patch is a workaround for that: for architectures with less than
> 14 bit ioctl struct size, get rid of the handling of the relevant
> ioctl. We should provide an alternative equivalent ioctl code later,
> but for now just paper over it. Luckily, the compress API hasn't been
> used on such architectures, so the impact must be effectively zero.
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/core/compress_offload.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index 18b8dc45bb8f..36b0083fd9f4 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -46,6 +46,13 @@
> #include <sound/compress_offload.h>
> #include <sound/compress_driver.h>
>
> +/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
> + * architectures, so we need to disable the relevant ioctls.
> + */
> +#if _IOC_SIZEBITS < 13
Argh, a typo here. I forgot to refresh the patch, sorry.
Below is the revised one.
Takashi
-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
architectures
Some architectures like PowerPC can handle the maximum struct size in
an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit. This
problem was revealed recently by a powerpc change, as it's now treated
as a fatal build error.
This patch is a workaround for that: for architectures with less than
14 bit ioctl struct size, get rid of the handling of the relevant
ioctl. We should provide an alternative equivalent ioctl code later,
but for now just paper over it. Luckily, the compress API hasn't been
used on such architectures, so the impact must be effectively zero.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/core/compress_offload.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 18b8dc45bb8f..0609e618107a 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -46,6 +46,13 @@
#include <sound/compress_offload.h>
#include <sound/compress_driver.h>
+/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
+ * architectures, so we need to disable the relevant ioctls.
+ */
+#if _IOC_SIZEBITS < 14
+#define COMPR_CODEC_CAPS_OVERFLOW
+#endif
+
/* TODO:
* - add substream support for multiple devices in case of
* SND_DYNAMIC_MINORS is not used
@@ -440,6 +447,7 @@ out:
return retval;
}
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
static int
snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
{
@@ -463,6 +471,7 @@ out:
kfree(caps);
return retval;
}
+#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
/* revisit this with snd_pcm_preallocate_xxx */
static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
@@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
retval = snd_compr_get_caps(stream, arg);
break;
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
retval = snd_compr_get_codec_caps(stream, arg);
break;
+#endif
case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
retval = snd_compr_set_params(stream, arg);
break;
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-01-25 15:00 +0100 |
| Message-ID | <qUPQu-4Ie-19@gated-at.bofh.it> |
| In reply to | #1316713 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Jan 25, 2016 at 02:45:55PM +0100, Takashi Iwai wrote: > Argh, a typo here. I forgot to refresh the patch, sorry. > Below is the revised one. This makes sense to me. Reviwed-by: Mark Brown <broonie@kernel.org> though we will need to come up with an alternative solution for the affected architectures if anyone ends up caring (MIPS or PowerPC might possibly).
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web