/*1* Copyright 2010 Tilera Corporation. All Rights Reserved.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation, version 2.6*7* This program is distributed in the hope that it will be useful, but8* WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or10* NON INFRINGEMENT. See the GNU General Public License for11* more details.12*13* Structure definitions for migration, exposed here for use by14* arch/tile/kernel/asm-offsets.c.15*/1617#ifndef MM_MIGRATE_H18#define MM_MIGRATE_H1920#include <linux/cpumask.h>21#include <hv/hypervisor.h>2223/*24* This function is used as a helper when setting up the initial25* page table (swapper_pg_dir).26*/27extern int flush_and_install_context(HV_PhysAddr page_table, HV_PTE access,28HV_ASID asid,29const unsigned long *cpumask);3031/*32* This function supports migration as a "helper" as follows:33*34* - Set the stack PTE itself to "migrating".35* - Do a global TLB flush for (va,length) and the specified ASIDs.36* - Do a cache-evict on all necessary cpus.37* - Write the new stack PTE.38*39* Note that any non-NULL pointers must not point to the page that40* is handled by the stack_pte itself.41*/42extern int homecache_migrate_stack_and_flush(pte_t stack_pte, unsigned long va,43size_t length, pte_t *stack_ptep,44const struct cpumask *cache_cpumask,45const struct cpumask *tlb_cpumask,46HV_Remote_ASID *asids,47int asidcount);4849#endif /* MM_MIGRATE_H */505152