Re: [PATCH 1/4] Add linux/io.h to make it compile

Greg Ungerer
2012-10-16T04:56:12Z

Hi Philippe,

On 16/10/12 00:39, Philippe De Muyter wrote:
> On Mon, Oct 15, 2012 at 04:06:47PM +0200, Stany MARCEL wrote:
>> Hello Philippe,
>>
>> It does not compile with my config (MMU on), io.h header is missing for __raw_* operations.
>
> Actually, the problem seems to be more in the .h files, that should
> provide the same set of macros/functions regardless of CONFIG_MMU
> or not.
>
> I have a similar problem with out_be32 available from asm/io.h in
> CONFIG_MMU mode, but not without CONFIG_MMU.
>
> Greg, Geert ?

Yeah, the m68k io.h family of headers is all a bit messy.
It is on my list of things to merge and clean up. It is intended
that they should supply the same set of definitions.

But in this case any driver that uses any of the read/write family
of functions should include linux/io.h. The m54xx_wdt.c code
doesn't, it is just getting definitions by accident. (As it turns
out it is getting it because asm/pgtable.h includes asm/pgtable_no.h
which includes asm/io.h -- asm/pgtable_mm.h doesn't).

Regards
Greg

>>
>> But it might compile with MMU disabled.
>>
>> Regards
>>
>> -----Message d'origine-----
>> DeÃ¡: Philippe De Muyter [mailto:phdm@macqel.be]
>> EnvoyÃšÃ¡: lundi 15 octobre 2012 15:58
>> â””Ã¡: Stany MARCEL
>> CcÃ¡: linux-m68k@vger.kernel.org; gerg@uclinux.org
>> ObjetÃ¡: Re: [PATCH 1/4] Add linux/io.h to make it compile
>>
>> Hello Stany,
>>
>> On Mon, Oct 15, 2012 at 02:54:37PM +0200, Stany MARCEL wrote:
>>
>>> [PATCH 1/4] Add linux/io.h to make it compile
>>
>> You could probably be more precise in your patch title :)
>>
>> What error message did you get without your patch ?
>>
>> I compile m54xx_wdt.c without CONFIG_MMU without error.
>>
>> Best regards
>>
>> Philippe
>

--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com