Hi Greg,
On Wed, Apr 18, 2018 at 10:01:34AM +1000, Greg Ungerer wrote:
> Hi Angelo,
>
> On 18/04/18 06:53, Angelo Dureghello wrote:
> > thanks for this great job.
>
> :-)
>
>
> > On patch 10, PIC is PCI, right ?
>
> Yes, typo on my part. I even managed to get it wrong twice!
> I'll fix that.
>
>
> > In case you hae some time, am interested in understanding how those
> > guards
> >
> > #define xxx xxx
> >
> > works.
>
> In this particular case it is to allow local architecture code to
> have its own version of a function or macro and for the common
> kernel code to define it if it is not otherwise defined.
>
> Consider this example, in our local arch code we want an optimized
> "readb" function. If we just had:
>
> static inline u8 readb(void __iomem *addr)
> { ... }
>
> and the common code (such as include/asm-generic/io.h) had the
> common readb in a similar fashion:
>
> static inline u8 readb(void __iomem *addr)
> { ... }
>
> On compilation you are going to get readb multiply defined.
> If instead the common code had:
>
> #ifndef read
> #define readb readb
> static inline u8 readb(void __iomem *addr)
> { ... }
> #endif
>
> Then all we need to do in our local arch code is define "readb".
> If we defined it as a macro, then no problem that would just work.
> If we want it as a real function (preferable) then we just need to
> make sure that "readb" is somehow defined, so the simplest way is
> to just define it to be itself:
>
> #define read readb
>
> Obviously our local arch code has to be included first.
>
Thanks !
>
> > Is it ok to test the patch now in my mcf54415 based board ?
>
> Yes, please do. I expect it should fix the the issues you found,
> but lets confirm that is really the case.
>
> I will be issuing a v2 of the series - to fix the problems found by
> the autobuilder. But they are minor changes, and I would like to
> know that they actually fix your problems first.
>
Ok i tested it.
* applied all 15 patches
* enabled MMU
* compilied, there was 1 error
LDS arch/m68k/kernel/vmlinux.lds
CC arch/m68k/mm/init.o
CC arch/m68k/mm/cache.o
CC arch/m68k/mm/fault.o
CC arch/m68k/mm/kmap.o
arch/m68k/mm/kmap.c: In function '__ioremap':
arch/m68k/mm/kmap.c:129:6: error: implicit declaration of function
'__cf_internalio' [-Werror=implicit-function-declaration]
if (__cf_internalio(physaddr))
^
arch/m68k/mm/kmap.c: In function 'iounmap':
arch/m68k/mm/kmap.c:243:6: error: implicit declaration of function
'cf_internalio' [-Werror=implicit-function-declaration]
if (cf_internalio(addr))
^
cc1: some warnings being treated as errors
scripts/Makefile.build:312: set di istruzioni per l'obiettivo
"arch/m68k/mm/kmap.o" non riuscito
make[1]: *** [arch/m68k/mm/kmap.o] Errore 1
Makefile:1060: set di istruzioni per l'obiettivo "arch/m68k/mm" non riuscito
make: *** [arch/m68k/mm] Errore 2
Just to pass over the issue i changed line 20 of
from
#if defined(CONFIG_PCI) && defined(CONFIG_COLDFIRE)
to
#if defined(CONFIG_PCI) || defined(CONFIG_COLDFIRE)
Then it built fine.
So my dspi driver works fine with MMU enabled.
Tested-by: Angelo Dureghello <[email protected]>
>
> > Reviewed-by: Angelo Dureghello <[email protected]>
>
> Thanks for that. I will add that in.
>
> Regards
> Greg
>
>
Regards,
Angelo
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html