linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
@ 2016-02-12 17:30 Stephen Boyd
  2016-02-12 19:34 ` Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stephen Boyd @ 2016-02-12 17:30 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Kenneth Westfield,
	Kevin Hilman

This reverts commit 18560a4e3b07438113b50589e78532d95f907029.

The commit that caused us to specify LE device endianness here,
29bb45f25ff3 (regmap-mmio: Use native endianness for read/write,
2015-10-29), has been reverted in mainline so now when we specify
LE it actively breaks big endian kernels because the byte
swapping in regmap-mmio is incorrect. Let's revert this change
because it will 1) fix the big endian kernels and 2) be redundant
to specify LE because that will become the default soon.

Cc: Kenneth Westfield <kwestfie@codeaurora.org>
Cc: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 sound/soc/qcom/lpass-cpu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 00b6c9d039cf..e5101e0d2d37 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -355,7 +355,6 @@ static struct regmap_config lpass_cpu_regmap_config = {
 	.readable_reg = lpass_cpu_regmap_readable,
 	.volatile_reg = lpass_cpu_regmap_volatile,
 	.cache_type = REGCACHE_FLAT,
-	.val_format_endian = REGMAP_ENDIAN_LITTLE,
 };
 
 int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 17:30 [PATCH] Revert "ASoC: qcom: Specify LE device endianness" Stephen Boyd
@ 2016-02-12 19:34 ` Mark Brown
  2016-02-12 19:48 ` Arnd Bergmann
  2016-02-12 21:26 ` Mark Brown
  2 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2016-02-12 19:34 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Kenneth Westfield,
	Kevin Hilman

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

On Fri, Feb 12, 2016 at 09:30:17AM -0800, Stephen Boyd wrote:
> This reverts commit 18560a4e3b07438113b50589e78532d95f907029.

Please use subject lines matching the style for the subsystem and 
please include human readable descriptions of things like commits and
issues being discussed in e-mail in your mails, this makes them much
easier for humans to read especially when they have no internet access.
I do frequently catch up on my mail on flights or while otherwise
travelling so this is even more pressing for me than just being about
making things a bit easier to read.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 17:30 [PATCH] Revert "ASoC: qcom: Specify LE device endianness" Stephen Boyd
  2016-02-12 19:34 ` Mark Brown
@ 2016-02-12 19:48 ` Arnd Bergmann
  2016-02-12 20:03   ` Mark Brown
  2016-02-12 22:08   ` Stephen Boyd
  2016-02-12 21:26 ` Mark Brown
  2 siblings, 2 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-12 19:48 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Stephen Boyd, Mark Brown, linux-arm-msm, Kenneth Westfield,
	Kevin Hilman, linux-kernel

On Friday 12 February 2016 09:30:17 Stephen Boyd wrote:
> This reverts commit 18560a4e3b07438113b50589e78532d95f907029.
> 
> The commit that caused us to specify LE device endianness here,
> 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write,
> 2015-10-29), has been reverted in mainline so now when we specify
> LE it actively breaks big endian kernels because the byte
> swapping in regmap-mmio is incorrect. Let's revert this change
> because it will 1) fix the big endian kernels and 2) be redundant
> to specify LE because that will become the default soon.
> 
> Cc: Kenneth Westfield <kwestfie@codeaurora.org>
> Cc: Kevin Hilman <khilman@linaro.org>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Ah, too bad to have to revert a correct change until the infrastructure
is fixed properly, but I guess it's the easier way out here.

What about the other uses of REGMAP_ENDIAN_LITTLE in the kernel?
In particular I see 

drivers/clk/nxp/clk-lpc32xx.c:  .val_format_endian = REGMAP_ENDIAN_LITTLE,

drivers/clk/qcom/gcc-apq8084.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/gcc-ipq806x.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/gcc-msm8660.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/gcc-msm8916.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/gcc-msm8960.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/gcc-msm8960.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/gcc-msm8974.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/lcc-ipq806x.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/lcc-msm8960.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/mmcc-apq8084.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/mmcc-msm8960.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/mmcc-msm8960.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,
drivers/clk/qcom/mmcc-msm8974.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,

drivers/nvmem/qfprom.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,

and of course

drivers/mfd/syscon.c:   syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;

which all look like they are regmap_mmio users as well. Do they 
suffer from the same problem?

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 19:48 ` Arnd Bergmann
@ 2016-02-12 20:03   ` Mark Brown
  2016-02-12 20:35     ` Arnd Bergmann
  2016-02-12 22:08   ` Stephen Boyd
  1 sibling, 1 reply; 10+ messages in thread
From: Mark Brown @ 2016-02-12 20:03 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Stephen Boyd, linux-arm-msm, Kenneth Westfield,
	Kevin Hilman, linux-kernel

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

On Fri, Feb 12, 2016 at 08:48:58PM +0100, Arnd Bergmann wrote:

> which all look like they are regmap_mmio users as well. Do they 
> suffer from the same problem?

Probably, yes.  It's only a problem if they're in systems that might
otherwise run big endian successfully.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 20:03   ` Mark Brown
@ 2016-02-12 20:35     ` Arnd Bergmann
  2016-02-12 21:28       ` Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-12 20:35 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, Stephen Boyd, linux-arm-msm, Kenneth Westfield,
	Kevin Hilman, linux-kernel

On Friday 12 February 2016 20:03:11 Mark Brown wrote:
> On Fri, Feb 12, 2016 at 08:48:58PM +0100, Arnd Bergmann wrote:
> 
> > which all look like they are regmap_mmio users as well. Do they 
> > suffer from the same problem?
> 
> Probably, yes.  It's only a problem if they're in systems that might
> otherwise run big endian successfully.
> 

The affected clock drivers seem to include all the qcom platforms,
so I assumed that whatever platform uses sound/soc/qcom/lpass-cpu.c
has to use one of those as well. Same thing for drivers/nvmem/qfprom.c.

lpc32xx probably won't support big-endian.

syscon is probably fine because it only sets that flag based on the
"little-endian" DT property and I don't see anything setting that
(except the one platform that did so incorrectly).

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 17:30 [PATCH] Revert "ASoC: qcom: Specify LE device endianness" Stephen Boyd
  2016-02-12 19:34 ` Mark Brown
  2016-02-12 19:48 ` Arnd Bergmann
@ 2016-02-12 21:26 ` Mark Brown
  2016-02-12 22:04   ` Stephen Boyd
  2 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2016-02-12 21:26 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Kenneth Westfield,
	Kevin Hilman

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

On Fri, Feb 12, 2016 at 09:30:17AM -0800, Stephen Boyd wrote:
> This reverts commit 18560a4e3b07438113b50589e78532d95f907029.
> 
> The commit that caused us to specify LE device endianness here,
> 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write,
> 2015-10-29), has been reverted in mainline so now when we specify

So, I applied this to -next as that's where it applies but it seems that
you're trying to revert a commit that's in Linus' tree so should go as a
fix to him.  Can you send a fix against Linus' tree too please?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 20:35     ` Arnd Bergmann
@ 2016-02-12 21:28       ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2016-02-12 21:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Stephen Boyd, linux-arm-msm, Kenneth Westfield,
	Kevin Hilman, linux-kernel

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

On Fri, Feb 12, 2016 at 09:35:26PM +0100, Arnd Bergmann wrote:

> syscon is probably fine because it only sets that flag based on the
> "little-endian" DT property and I don't see anything setting that
> (except the one platform that did so incorrectly).

Though it should be able to remove that as the regmap code will also
parse the property.  Probably worth double checking that works as
intended though.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 21:26 ` Mark Brown
@ 2016-02-12 22:04   ` Stephen Boyd
  2016-02-12 22:25     ` Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Boyd @ 2016-02-12 22:04 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Kenneth Westfield,
	Kevin Hilman

On 02/12, Mark Brown wrote:
> On Fri, Feb 12, 2016 at 09:30:17AM -0800, Stephen Boyd wrote:
> > This reverts commit 18560a4e3b07438113b50589e78532d95f907029.
> > 
> > The commit that caused us to specify LE device endianness here,
> > 29bb45f25ff3 (regmap-mmio: Use native endianness for read/write,
> > 2015-10-29), has been reverted in mainline so now when we specify
> 
> So, I applied this to -next as that's where it applies but it seems that
> you're trying to revert a commit that's in Linus' tree so should go as a
> fix to him.  Can you send a fix against Linus' tree too please?

Did you want me to send the fix directly to Linus? The patch
applies to both -next and Linus' tree, although you're right I
generated this patch against -next. If I apply it to Linus' tree
and then git format-patch it's exactly the same except for the
commit hash:

$ diff linus next
1c1
< From 4f7c654bfcd159b3068b01e3b522e8af88069cb9 Mon Sep 17 00:00:00 2001
---
> From 798212b523668d5a37a977c660554827aa0d89ed Mon Sep 17 00:00:00 2001

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 19:48 ` Arnd Bergmann
  2016-02-12 20:03   ` Mark Brown
@ 2016-02-12 22:08   ` Stephen Boyd
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2016-02-12 22:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Mark Brown, linux-arm-msm, Kenneth Westfield,
	Kevin Hilman, linux-kernel

On 02/12, Arnd Bergmann wrote:
> 
> drivers/clk/qcom/gcc-apq8084.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/gcc-ipq806x.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/gcc-msm8660.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/gcc-msm8916.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/gcc-msm8960.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/gcc-msm8960.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/gcc-msm8974.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/lcc-ipq806x.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/lcc-msm8960.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/mmcc-apq8084.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/mmcc-msm8960.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/mmcc-msm8960.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,
> drivers/clk/qcom/mmcc-msm8974.c:        .val_format_endian = REGMAP_ENDIAN_LITTLE,

These are taken care of.

> 
> drivers/nvmem/qfprom.c: .val_format_endian = REGMAP_ENDIAN_LITTLE,

I don't plan on reverting this one because it's only in -next. It
is redundant, but it's not actively breaking anything when the
driver tree and the regmap tree are merged together.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Revert "ASoC: qcom: Specify LE device endianness"
  2016-02-12 22:04   ` Stephen Boyd
@ 2016-02-12 22:25     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2016-02-12 22:25 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-kernel, linux-arm-msm, linux-arm-kernel, Kenneth Westfield,
	Kevin Hilman

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

On Fri, Feb 12, 2016 at 02:04:54PM -0800, Stephen Boyd wrote:
> On 02/12, Mark Brown wrote:

> > So, I applied this to -next as that's where it applies but it seems that
> > you're trying to revert a commit that's in Linus' tree so should go as a
> > fix to him.  Can you send a fix against Linus' tree too please?

> Did you want me to send the fix directly to Linus? The patch
> applies to both -next and Linus' tree, although you're right I
> generated this patch against -next. If I apply it to Linus' tree
> and then git format-patch it's exactly the same except for the
> commit hash:

No, of course not!  Send it to me.  What I'm looking for is something
that I can apply - it doesn't apply to my current Qualcomm fixes branch.  
Looking again I see that the issue is that that branch is based on
v4.4, I pulled it over now.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-12 22:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 17:30 [PATCH] Revert "ASoC: qcom: Specify LE device endianness" Stephen Boyd
2016-02-12 19:34 ` Mark Brown
2016-02-12 19:48 ` Arnd Bergmann
2016-02-12 20:03   ` Mark Brown
2016-02-12 20:35     ` Arnd Bergmann
2016-02-12 21:28       ` Mark Brown
2016-02-12 22:08   ` Stephen Boyd
2016-02-12 21:26 ` Mark Brown
2016-02-12 22:04   ` Stephen Boyd
2016-02-12 22:25     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).