lkml.org 
[lkml]   [2013]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] include/asm-generic/io.h: add 'UML' case just like 'no-MMU'
On 06/26/2013 04:39 PM, Richard Weinberger wrote:
>>>>> >>>> The drivers internal code has already check the related return value,
>>>>> >>>> so it is the architecture's duty to 'tell' the driver whether support
>>>>> >>>> io memory (e.g. define ioremap, but return NULL).
>>> >> It does so already by setting CONFIG_HAS_IOMEM=n
>> >
>> > Excuse me, I use "grep -rn ioremap *" under "include/" and "arch/um/"
>> > directory, but can not find the related definition for 'ioremap'.
>> >
>> > Is there another declaration or definition way which I don't know ?
>> > (maybe it is).
> Both UML and s390 (in the !CONFIG_PCI) do not define ioremap() because
> without io memory you cannot have a ioremap().
>

I assume if ioremap() return NULL, it means "without io memory", is it
correct ?

If it is correct, "define a dummy ioremap(), and return NULL" is just
the meaning that you mentioned above.

If so, for UML, it is not requirement, but recommend to define a dummy
ioremap() which return NULL, so can be generic enough to mach all cases.


>> > For our case, the ".config" file does not define 'CONFIG_HAS_IOMEM', can
>> > I assume it means "CONFIG_HAS_IOMEM=n" ?
> If I'm not mistaken it works the other way around.
> All archs except UML and s390 set CONFIG_HAS_IOMEM=y.

I guess so, too.


Thanks.
--
Chen Gang

Asianux Corporation


\
 
 \ /
  Last update: 2013-06-26 13:21    [W:0.275 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site