Re: IrDA driver fails on PXA255
From: David Rientjes
Date: Sat May 28 2011 - 22:24:27 EST
On Sun, 29 May 2011, Russell King - ARM Linux wrote:
> > The driver is attempting to allocate DMA memory and you have
> > CONFIG_ZONE_DMA disabled, which is the only reason you would get this
> > warning. If the allocation did not fail as a result of a197b59ae6e8, the
> > page allocator may return any memory in a higher zone that the driver may
> > not be expecting. If you had never noticed a problem before, it may be
> > possible that the driver doesn't actually have any zone restrictions and
> > GFP_DMA can be removed, but this code is pretty old. Otherwise, it'll
> > need to depend on ZONE_DMA in the Kconfig.
> >
> > Let's cc Nicolas and Russell as well.
>
> Ouch. We're probably going to have a pile of work to do to check that
> the DMA masks on all our devices are correct for the unrestricted case
> then. That's probably going to be a very _big_ patch.
>
There are probably a lot of drivers that are requesting DMA but don't
explicitly require its support. ARM has always been one of the exceptions
when it comes to enabling CONFIG_ZONE_DMA, most archs do by default (x86
_just_ made it configurable during this merge window), so this probably
isn't the last report you'll get now that it fails the allocation and
emits a warning.
$ grep -r GFP_DMA drivers/* | wc -l
299
arm, pxa2xx: enable DMA support for pxa2xx IRDA interface
The pxa2xx-ir driver allocates with GFP_DMA, so it must always have
ZONE_DMA.
Reported-by: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx>
Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
---
drivers/net/irda/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -374,6 +374,7 @@ config VIA_FIR
config PXA_FICP
tristate "Intel PXA2xx Internal FICP"
depends on ARCH_PXA && IRDA
+ select ZONE_DMA
help
Say Y or M here if you want to build support for the PXA2xx
built-in IRDA interface which can support both SIR and FIR.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/