lkml.org 
[lkml]   [2011]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Fix order_base_2(0)
Date

David Howells wrote:
> Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Does anybody actually *want* order_base_2(0)?
>
> There aren't actually that many users:
..

> | arch/powerpc/platforms/pseries/iommu.c: len = order_base_2(max_addr);
>
> Not sure. Doesn't look likely, but can memory_hotplug_max() be 0 if hotplug
> is not supported?

arch/powerpc/include/asm/mmzone.h has the declaration or #define, and
arch/powerpc/mm/numa.c has the definiton when not defined. All have
memblock_end_of_DRAM() as the minimum value, so it will never be 0.

(The usage is to get the number of bits needed to cover all possible
memory that could be allocated to the OS to size the iommu table).

milton


\
 
 \ /
  Last update: 2011-12-18 08:35    [W:0.039 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site