Messages in this thread | | | From | Milton Miller <> | Subject | Re: [PATCH] Fix order_base_2(0) | Date | Sun, 18 Dec 2011 01:15:31 -0600 |
| |
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
| |