Re: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
On Tue, Apr 29, 2014 at 07:18:25PM +0800, Xia Kaixu wrote: > From: Arnd Bergmann > > dma_addr_t may be 64 bit wide, which causes a build failure > when doing a division on it. Here it is safe to cast to an > u32 type, which avoids the problem. Applied, thanks. signature.asc Description: Digital signature
Re: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
On Tue, Apr 29, 2014 at 07:18:25PM +0800, Xia Kaixu wrote: From: Arnd Bergmann a...@arndb.de dma_addr_t may be 64 bit wide, which causes a build failure when doing a division on it. Here it is safe to cast to an u32 type, which avoids the problem. Applied, thanks. signature.asc Description: Digital signature
Re: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
On 04/29/2014 04:48 PM, Xia Kaixu wrote: > From: Arnd Bergmann > > dma_addr_t may be 64 bit wide, which causes a build failure > when doing a division on it. Here it is safe to cast to an > u32 type, which avoids the problem. > > Signed-off-by: Arnd Bergmann > Signed-off-by: Xia Kaixu > Cc: Mark Brown > Cc: Liam Girdwood > Cc: Ben Dooks > Cc: Kukjin Kim > Cc: Sangbeom Kim > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-samsung-...@vger.kernel.org > Cc: alsa-de...@alsa-project.org > --- Tested with ARM_LPAE enabled. Without this patch, getting following error. sound/built-in.o: In function `iis_irq': sound/soc/samsung/idma.c:277: undefined reference to `__aeabi_uldivmod' Tested-by: Tushar Behera > sound/soc/samsung/idma.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c > index 3d5cf15..e9891b4 100644 > --- a/sound/soc/samsung/idma.c > +++ b/sound/soc/samsung/idma.c > @@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id) > > addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr; > addr += prtd->periodsz; > - addr %= (prtd->end - prtd->start); > + addr %= (u32)(prtd->end - prtd->start); > addr += idma.lp_tx_addr; > > writel(addr, idma.regs + I2SLVL0ADDR); > -- Tushar Behera -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
From: Arnd Bergmann dma_addr_t may be 64 bit wide, which causes a build failure when doing a division on it. Here it is safe to cast to an u32 type, which avoids the problem. Signed-off-by: Arnd Bergmann Signed-off-by: Xia Kaixu Cc: Mark Brown Cc: Liam Girdwood Cc: Ben Dooks Cc: Kukjin Kim Cc: Sangbeom Kim Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc: alsa-de...@alsa-project.org --- sound/soc/samsung/idma.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 3d5cf15..e9891b4 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id) addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr; addr += prtd->periodsz; - addr %= (prtd->end - prtd->start); + addr %= (u32)(prtd->end - prtd->start); addr += idma.lp_tx_addr; writel(addr, idma.regs + I2SLVL0ADDR); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
From: Arnd Bergmann a...@arndb.de dma_addr_t may be 64 bit wide, which causes a build failure when doing a division on it. Here it is safe to cast to an u32 type, which avoids the problem. Signed-off-by: Arnd Bergmann a...@arndb.de Signed-off-by: Xia Kaixu kaixu@linaro.org Cc: Mark Brown broo...@kernel.org Cc: Liam Girdwood lgirdw...@gmail.com Cc: Ben Dooks ben-li...@fluff.org Cc: Kukjin Kim kgene@samsung.com Cc: Sangbeom Kim sbki...@samsung.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc: alsa-de...@alsa-project.org --- sound/soc/samsung/idma.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 3d5cf15..e9891b4 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id) addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr; addr += prtd-periodsz; - addr %= (prtd-end - prtd-start); + addr %= (u32)(prtd-end - prtd-start); addr += idma.lp_tx_addr; writel(addr, idma.regs + I2SLVL0ADDR); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
On 04/29/2014 04:48 PM, Xia Kaixu wrote: From: Arnd Bergmann a...@arndb.de dma_addr_t may be 64 bit wide, which causes a build failure when doing a division on it. Here it is safe to cast to an u32 type, which avoids the problem. Signed-off-by: Arnd Bergmann a...@arndb.de Signed-off-by: Xia Kaixu kaixu@linaro.org Cc: Mark Brown broo...@kernel.org Cc: Liam Girdwood lgirdw...@gmail.com Cc: Ben Dooks ben-li...@fluff.org Cc: Kukjin Kim kgene@samsung.com Cc: Sangbeom Kim sbki...@samsung.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc: alsa-de...@alsa-project.org --- Tested with ARM_LPAE enabled. Without this patch, getting following error. sound/built-in.o: In function `iis_irq': sound/soc/samsung/idma.c:277: undefined reference to `__aeabi_uldivmod' Tested-by: Tushar Behera tushar.beh...@linaro.org sound/soc/samsung/idma.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 3d5cf15..e9891b4 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id) addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr; addr += prtd-periodsz; - addr %= (prtd-end - prtd-start); + addr %= (u32)(prtd-end - prtd-start); addr += idma.lp_tx_addr; writel(addr, idma.regs + I2SLVL0ADDR); -- Tushar Behera -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/