lkml.org 
[lkml]   [2010]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/6] x86: Change get_max_mapped() to inline
From
On Wed, Dec 29, 2010 at 3:30 PM, Yinghai Lu <yinghai@kernel.org> wrote:

>>> Index: linux-2.6/arch/x86/include/asm/page_types.h
>>> ===================================================================
>>> --- linux-2.6.orig/arch/x86/include/asm/page_types.h
>>> +++ linux-2.6/arch/x86/include/asm/page_types.h
>>> @@ -45,6 +45,11 @@ extern int devmem_is_allowed(unsigned lo
>>>  extern unsigned long max_low_pfn_mapped;
>>>  extern unsigned long max_pfn_mapped;
>>>
>>> +static inline u64 get_max_mapped(void)
>>> +{
>>> +     return (u64)max_pfn_mapped<<PAGE_SHIFT;
>>> +}
>>> +
>>>  extern unsigned long init_memory_mapping(unsigned long start,
>>>                                        unsigned long end);
>>>
>>
>
>> Furthermore, it seems to me that it would make more
>> sense for this to be phys_addr_t instead of u64; would you agree?
>
> yes.

or could just use unsigned long instead.

on 32bit it will be under 4g
on 64bit unsigned long is 64bit already.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-12-30 00:39    [W:0.102 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site