/* * Switch an MMU context. * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2001 - 2013 Tensilica Inc.
*/
/* * NO_CONTEXT is the invalid ASID value that we don't ever assign to * any user or kernel context. We use the reserved values in the * ASID_INSERT macro below. * * 0 invalid * 1 kernel * 2 reserved * 3 reserved * 4...255 available
*/
/* * Initialize the context related info for a new mm_struct * instance. Valid cpu values are 0..(NR_CPUS-1), so initializing * to -1 says the process has never run on any core.
*/
staticinlinevoid switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
{ unsignedint cpu = smp_processor_id(); int migrated = next->context.cpu != cpu; /* Flush the icache if we migrated to a new core. */ if (migrated) {
__invalidate_icache_all();
next->context.cpu = cpu;
} if (migrated || prev != next)
activate_context(next, cpu);
}
/* * Destroy context related info for an mm_struct that is about * to be put to rest.
*/ #define destroy_context destroy_context staticinlinevoid destroy_context(struct mm_struct *mm)
{
invalidate_page_directory();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.