linux-2.6.33/switch_mm()(arm)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#b0c0642b]
#backlinks
*説明 [#b2900452]
-パス: [[linux-2.6.33/arch/arm/include/asm/mmu_context.h]]
-FIXME: これは何?
--説明
--MMU が無効の場合は何もしない。
**引数 [#gd491879]
-struct mm_struct *prev
--
--[[linux-2.6.33/mm_struct]]
-struct mm_struct *next
--
-struct task_struct *tsk
--
--[[linux-2.6.33/task_struct]]
**返り値 [#z0186999]
-なし
**参考 [#i2f813c5]
*実装 [#d2628da8]
/*
* This is the actual mm switch as far as the scheduler
* is concerned. No registers are touched. We avoid
* calling the CPU specific function when the mm hasn't
* actually changed.
*/
static inline void
switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
#ifdef CONFIG_MMU
-MMU 有効の場合
--[[linux-2.6.33/CONFIG_MMU]]
unsigned int cpu = smp_processor_id();
-
--[[linux-2.6.33/smp_processor_id()]]
#ifdef CONFIG_SMP
-SMP 有効の場合
--[[linux-2.6.33/CONFIG_SMP]]
/* check for possible thread migration */
if (!cpumask_empty(mm_cpumask(next)) &&
!cpumask_test_cpu(cpu, mm_cpumask(next)))
__flush_icache_all();
-
--[[linux-2.6.33/cpumask_empty()]]
-
--[[linux-2.6.33/mm_cpumask()]]
-
--[[linux-2.6.33/cpumask_test_cpu()]]
-
--[[linux-2.6.33/__flush_icache_all()]]
#endif
if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) ||...
check_context(next);
cpu_switch_mm(next->pgd, next);
if (cache_is_vivt())
cpumask_clear_cpu(cpu, mm_cpumask(prev));
}
-
--[[linux-2.6.33/cpumask_test_and_set_cpu()]]
-
--[[linux-2.6.33/check_context()]]
-
--[[linux-2.6.33/cpu_switch_mm()]]
-
--[[linux-2.6.33/cache_is_virt()]]
-
--[[linux-2.6.33/cpumask_clear_cpu()]]
#endif
}
*コメント [#w53fc92d]
終了行:
*参照元 [#b0c0642b]
#backlinks
*説明 [#b2900452]
-パス: [[linux-2.6.33/arch/arm/include/asm/mmu_context.h]]
-FIXME: これは何?
--説明
--MMU が無効の場合は何もしない。
**引数 [#gd491879]
-struct mm_struct *prev
--
--[[linux-2.6.33/mm_struct]]
-struct mm_struct *next
--
-struct task_struct *tsk
--
--[[linux-2.6.33/task_struct]]
**返り値 [#z0186999]
-なし
**参考 [#i2f813c5]
*実装 [#d2628da8]
/*
* This is the actual mm switch as far as the scheduler
* is concerned. No registers are touched. We avoid
* calling the CPU specific function when the mm hasn't
* actually changed.
*/
static inline void
switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
#ifdef CONFIG_MMU
-MMU 有効の場合
--[[linux-2.6.33/CONFIG_MMU]]
unsigned int cpu = smp_processor_id();
-
--[[linux-2.6.33/smp_processor_id()]]
#ifdef CONFIG_SMP
-SMP 有効の場合
--[[linux-2.6.33/CONFIG_SMP]]
/* check for possible thread migration */
if (!cpumask_empty(mm_cpumask(next)) &&
!cpumask_test_cpu(cpu, mm_cpumask(next)))
__flush_icache_all();
-
--[[linux-2.6.33/cpumask_empty()]]
-
--[[linux-2.6.33/mm_cpumask()]]
-
--[[linux-2.6.33/cpumask_test_cpu()]]
-
--[[linux-2.6.33/__flush_icache_all()]]
#endif
if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) ||...
check_context(next);
cpu_switch_mm(next->pgd, next);
if (cache_is_vivt())
cpumask_clear_cpu(cpu, mm_cpumask(prev));
}
-
--[[linux-2.6.33/cpumask_test_and_set_cpu()]]
-
--[[linux-2.6.33/check_context()]]
-
--[[linux-2.6.33/cpu_switch_mm()]]
-
--[[linux-2.6.33/cache_is_virt()]]
-
--[[linux-2.6.33/cpumask_clear_cpu()]]
#endif
}
*コメント [#w53fc92d]
ページ名: