flo: Put device-specific code behind #ifndef CONFIG_UML.

This is required to run net_test, which builds for ARCH=um.

Change-Id: I9329a3dbf68e788ecddf8c0ca12d0099508c8f52
This commit is contained in:
Lorenzo Colitti 2015-03-03 12:19:25 +09:00
parent e4aab2e329
commit 7dde48206b
4 changed files with 17 additions and 0 deletions

View File

@ -640,7 +640,9 @@ static void exit_mm(struct task_struct * tsk)
{
struct mm_struct *mm = tsk->mm;
struct core_state *core_state;
#ifndef CONFIG_UML
int mm_released;
#endif
mm_release(tsk, mm);
if (!mm)
@ -686,9 +688,11 @@ static void exit_mm(struct task_struct * tsk)
task_unlock(tsk);
mm_update_next_owner(mm);
#ifndef CONFIG_UML
mm_released = mmput(mm);
if (mm_released)
set_tsk_thread_flag(tsk, TIF_MM_RELEASED);
#endif
}
/*

View File

@ -44,7 +44,10 @@
#include <asm/uaccess.h>
#ifdef CONFIG_MSM_RTB
#include <mach/msm_rtb.h>
#endif
#define CREATE_TRACE_POINTS
#include <trace/events/printk.h>

View File

@ -1650,9 +1650,11 @@ stat:
out:
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
#ifndef CONFIG_UML
if (src_cpu != cpu && task_notify_on_migrate(p))
atomic_notifier_call_chain(&migration_notifier_head,
cpu, (void *)src_cpu);
#endif
return success;
}

View File

@ -186,10 +186,14 @@ static void *__alloc(struct mem_pool *mpool, unsigned long size,
if (!node)
goto out;
#ifndef CONFIG_UML
if (cached)
vaddr = ioremap_cached(paddr, aligned_size);
else
vaddr = ioremap(paddr, aligned_size);
#else
vaddr = NULL; /* hack to allow this to compile on ARCH=um */
#endif
if (!vaddr)
goto out_kfree;
@ -206,8 +210,10 @@ static void *__alloc(struct mem_pool *mpool, unsigned long size,
return vaddr;
out_kfree:
#ifndef CONFIG_UML
if (vaddr)
iounmap(vaddr);
#endif
kfree(node);
out:
gen_pool_free(mpool->gpool, paddr, aligned_size);
@ -221,8 +227,10 @@ static void __free(void *vaddr, bool unmap)
if (!node)
return;
#ifndef CONFIG_UML
if (unmap)
iounmap(node->vaddr);
#endif
gen_pool_free(node->mpool->gpool, node->paddr, node->len);
node->mpool->free += node->len;