powerpc: Replace mem_init_done with slab_is_available()
We have a powerpc specific global called mem_init_done which is "set on boot once kmalloc can be called". But that's not *quite* true. We set it at the bottom of mem_init(), and rely on the fact that mm_init() calls kmem_cache_init() immediately after that, and nothing is running in parallel. So replace it with the generic and 100% correct slab_is_available(). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
@@ -231,7 +231,7 @@ void __iomem * __ioremap_caller(phys_addr_t addr, unsigned long size,
|
||||
if ((size == 0) || (paligned == 0))
|
||||
return NULL;
|
||||
|
||||
if (mem_init_done) {
|
||||
if (slab_is_available()) {
|
||||
struct vm_struct *area;
|
||||
|
||||
area = __get_vm_area_caller(size, VM_IOREMAP,
|
||||
@@ -315,7 +315,7 @@ void __iounmap(volatile void __iomem *token)
|
||||
{
|
||||
void *addr;
|
||||
|
||||
if (!mem_init_done)
|
||||
if (!slab_is_available())
|
||||
return;
|
||||
|
||||
addr = (void *) ((unsigned long __force)
|
||||
|
Reference in New Issue
Block a user