diff mbox series

[2/2] dma-mapping: Add header file for ARCH_DMA_MINALIGN

Message ID 20200530102901.2.If199dabafae549dee591e7cfbd7df2be1b306d08@changeid
State Accepted
Commit 6d39fccc176051bd970f97df9bb7e578f9854677
Headers show
Series [1/2] usb: ohci: Add header file for ARCH_DMA_MINALIGN | expand

Commit Message

Simon Glass May 30, 2020, 4:29 p.m. UTC
This is defined in the asm/cache.h header file. Update this header file to
include it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 include/linux/dma-mapping.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini May 30, 2020, 5:20 p.m. UTC | #1
On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:

> This is defined in the asm/cache.h header file. Update this header file to
> include it.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Tom Rini <trini at konsulko.com>

There's also drivers/usb/host/ohci.h and lib/elf.c which also reference
ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.
Tom Rini May 30, 2020, 5:27 p.m. UTC | #2
On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote:
> On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
> 
> > This is defined in the asm/cache.h header file. Update this header file to
> > include it.
> > 
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> 
> Reviewed-by: Tom Rini <trini at konsulko.com>
> 
> There's also drivers/usb/host/ohci.h and lib/elf.c which also reference
> ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.

Dunno how I missed that 1/2 is what fixed that one, sorry.  And
lib/elf.c is a problem in theory but would be a fail to build if not
pulled in logically so I'll leave it be for now.
Adam Ford May 30, 2020, 6:15 p.m. UTC | #3
On Sat, May 30, 2020 at 12:27 PM Tom Rini <trini at konsulko.com> wrote:
>
> On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote:
> > On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
> >
> > > This is defined in the asm/cache.h header file. Update this header file to
> > > include it.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> >

Tested-by: Adam Ford <aford173 at gmail.com> #da850-evm

> > Reviewed-by: Tom Rini <trini at konsulko.com>
> >
> > There's also drivers/usb/host/ohci.h and lib/elf.c which also reference
> > ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.
>
> Dunno how I missed that 1/2 is what fixed that one, sorry.  And
> lib/elf.c is a problem in theory but would be a fail to build if not
> pulled in logically so I'll leave it be for now.
>
> --
> Tom
Simon Glass May 31, 2020, 2:10 p.m. UTC | #4
Hi Tom,

On Sat, 30 May 2020 at 11:27, Tom Rini <trini at konsulko.com> wrote:
>
> On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote:
> > On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
> >
> > > This is defined in the asm/cache.h header file. Update this header file to
> > > include it.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> >
> > Reviewed-by: Tom Rini <trini at konsulko.com>
> >
> > There's also drivers/usb/host/ohci.h and lib/elf.c which also reference
> > ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.
>
> Dunno how I missed that 1/2 is what fixed that one, sorry.  And
> lib/elf.c is a problem in theory but would be a fail to build if not
> pulled in logically so I'll leave it be for now.

Yes I think the issue is the #ifdef default. Probably that should be
removed at some point as it is quite risky to have that sort of thing.

Regards,
Simon
diff mbox series

Patch

diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 20b6d60dd8..6a107d52e0 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -2,6 +2,7 @@ 
 #ifndef _LINUX_DMA_MAPPING_H
 #define _LINUX_DMA_MAPPING_H
 
+#include <asm/cache.h>
 #include <linux/dma-direction.h>
 #include <linux/types.h>
 #include <asm/dma-mapping.h>