* [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t
@ 2020-04-21 17:11 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2020-04-21 17:11 UTC (permalink / raw)
To: tsbogend; +Cc: broonie, linux-mips, alsa-devel
Looks like I misread the Kconfig magic and this driver can be compiled
into 32-bit kernels. Add back the hack to extent the range of the
resource_size_t, and include the header with the txx9-specific ioremap
magic for that.
Fixes: acfaaf52ebfd ("ASoC: txx9: don't work around too small resource_size_t")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
sound/soc/txx9/txx9aclc-ac97.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 7402448bdb09..d9e348444bd0 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -14,6 +14,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/gfp.h>
+#include <asm/mach-tx39xx/ioremap.h> /* for TXX9_DIRECTMAP_BASE */
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -175,8 +176,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
int err;
int irq;
- BUILD_BUG_ON(sizeof(drvdata->physbase) > sizeof(r->start));
-
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
@@ -192,6 +191,10 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start;
+ if (sizeof(drvdata->physbase) > sizeof(r->start) &&
+ r->start >= TXX9_DIRECTMAP_BASE &&
+ r->start < TXX9_DIRECTMAP_BASE + 0x400000)
+ drvdata->physbase |= 0xf00000000ull;
err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
0, dev_name(&pdev->dev), drvdata);
if (err < 0)
--
2.26.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t
@ 2020-04-21 17:11 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2020-04-21 17:11 UTC (permalink / raw)
To: tsbogend; +Cc: alsa-devel, broonie, linux-mips
Looks like I misread the Kconfig magic and this driver can be compiled
into 32-bit kernels. Add back the hack to extent the range of the
resource_size_t, and include the header with the txx9-specific ioremap
magic for that.
Fixes: acfaaf52ebfd ("ASoC: txx9: don't work around too small resource_size_t")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
sound/soc/txx9/txx9aclc-ac97.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 7402448bdb09..d9e348444bd0 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -14,6 +14,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/gfp.h>
+#include <asm/mach-tx39xx/ioremap.h> /* for TXX9_DIRECTMAP_BASE */
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -175,8 +176,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
int err;
int irq;
- BUILD_BUG_ON(sizeof(drvdata->physbase) > sizeof(r->start));
-
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
@@ -192,6 +191,10 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start;
+ if (sizeof(drvdata->physbase) > sizeof(r->start) &&
+ r->start >= TXX9_DIRECTMAP_BASE &&
+ r->start < TXX9_DIRECTMAP_BASE + 0x400000)
+ drvdata->physbase |= 0xf00000000ull;
err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
0, dev_name(&pdev->dev), drvdata);
if (err < 0)
--
2.26.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t
2020-04-21 17:11 ` Christoph Hellwig
@ 2020-04-21 17:19 ` Mark Brown
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-04-21 17:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: tsbogend, linux-mips, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
On Tue, Apr 21, 2020 at 07:11:36PM +0200, Christoph Hellwig wrote:
> Looks like I misread the Kconfig magic and this driver can be compiled
> into 32-bit kernels. Add back the hack to extent the range of the
> resource_size_t, and include the header with the txx9-specific ioremap
> magic for that.
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t
@ 2020-04-21 17:19 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-04-21 17:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: alsa-devel, tsbogend, linux-mips
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
On Tue, Apr 21, 2020 at 07:11:36PM +0200, Christoph Hellwig wrote:
> Looks like I misread the Kconfig magic and this driver can be compiled
> into 32-bit kernels. Add back the hack to extent the range of the
> resource_size_t, and include the header with the txx9-specific ioremap
> magic for that.
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t
2020-04-21 17:11 ` Christoph Hellwig
@ 2020-04-21 18:31 ` Thomas Bogendoerfer
-1 siblings, 0 replies; 6+ messages in thread
From: Thomas Bogendoerfer @ 2020-04-21 18:31 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: broonie, linux-mips, alsa-devel
On Tue, Apr 21, 2020 at 07:11:36PM +0200, Christoph Hellwig wrote:
> Looks like I misread the Kconfig magic and this driver can be compiled
> into 32-bit kernels. Add back the hack to extent the range of the
> resource_size_t, and include the header with the txx9-specific ioremap
> magic for that.
>
> Fixes: acfaaf52ebfd ("ASoC: txx9: don't work around too small resource_size_t")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> sound/soc/txx9/txx9aclc-ac97.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t
@ 2020-04-21 18:31 ` Thomas Bogendoerfer
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Bogendoerfer @ 2020-04-21 18:31 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: alsa-devel, broonie, linux-mips
On Tue, Apr 21, 2020 at 07:11:36PM +0200, Christoph Hellwig wrote:
> Looks like I misread the Kconfig magic and this driver can be compiled
> into 32-bit kernels. Add back the hack to extent the range of the
> resource_size_t, and include the header with the txx9-specific ioremap
> magic for that.
>
> Fixes: acfaaf52ebfd ("ASoC: txx9: don't work around too small resource_size_t")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> sound/soc/txx9/txx9aclc-ac97.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-21 18:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 17:11 [PATCH] ASoC: txx9: add back the hack for a too small resource_size_t Christoph Hellwig
2020-04-21 17:11 ` Christoph Hellwig
2020-04-21 17:19 ` Mark Brown
2020-04-21 17:19 ` Mark Brown
2020-04-21 18:31 ` Thomas Bogendoerfer
2020-04-21 18:31 ` Thomas Bogendoerfer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.