Make set_pte_at and set_pte_at_sync macros instead of inline functions.

This avoids having to include sched.h to get a definition of init_mm.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
chris@ubuntu.eng.hq.xensource.com committed 2005-12-13 19:04:14 -07:00
1 parent 056647a91c
commit 45fb552eb2
3 files changed
+29 -47

No files matched your search

@@ -15,26 +15,19 @@
*/
#define set_pte(pteptr, pteval) (*(pteptr) = pteval)
inline static void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t val )
{
if ( ((mm != current->mm) && (mm != &init_mm)) ||
HYPERVISOR_update_va_mapping( (addr), (val), 0 ) )
{
set_pte(ptep, val);
}
}
#define set_pte_at(_mm,addr,ptep,pteval) do { \
if (((_mm) != current->mm && (_mm) != &init_mm) || \
HYPERVISOR_update_va_mapping((addr), (pteval), 0)) \
set_pte((ptep), (pteval)); \
} while (0)
inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t val )
{
if ( ((mm != current->mm) && (mm != &init_mm)) ||
HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) )
{
set_pte(ptep, val);
xen_invlpg(addr);
}
}
#define set_pte_at_sync(_mm,addr,ptep,pteval) do { \
if (((_mm) != current->mm && (_mm) != &init_mm) || \
HYPERVISOR_update_va_mapping((addr), (pteval), UVMF_INVLPG)) { \
set_pte((ptep), (pteval)); \
xen_invlpg((addr)); \
} \
} while (0)
#define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
@@ -69,26 +69,19 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
# define set_pte_atomic(pteptr,pteval) set_pte(pteptr,pteval)
#endif
inline static void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t val )
{
if ( ((mm != current->mm) && (mm != &init_mm)) ||
HYPERVISOR_update_va_mapping( (addr), (val), 0 ) )
{
set_pte(ptep, val);
}
}
#define set_pte_at(_mm,addr,ptep,pteval) do { \
if (((_mm) != current->mm && (_mm) != &init_mm) || \
HYPERVISOR_update_va_mapping((addr), (pteval), 0)) \
set_pte((ptep), (pteval)); \
} while (0)
inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t val )
{
if ( ((mm != current->mm) && (mm != &init_mm)) ||
HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) )
{
set_pte(ptep, val);
xen_invlpg(addr);
}
}
#define set_pte_at_sync(_mm,addr,ptep,pteval) do { \
if (((_mm) != current->mm && (_mm) != &init_mm) || \
HYPERVISOR_update_va_mapping((addr), (pteval), UVMF_INVLPG)) { \
set_pte((ptep), (pteval)); \
xen_invlpg((addr)); \
} \
} while (0)
#ifdef CONFIG_XEN_SHADOW_MODE
# define set_pmd(pmdptr,pmdval) \
@@ -266,15 +266,11 @@ static inline unsigned long pud_bad(pud_t pud)
return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED);
}
inline static void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t val )
{
if ( ((mm != current->mm) && (mm != &init_mm)) ||
HYPERVISOR_update_va_mapping( (addr), (val), 0 ) )
{
set_pte(ptep, val);
}
}
#define set_pte_at(_mm,addr,ptep,pteval) do { \
if (((_mm) != current->mm && (_mm) != &init_mm) || \
HYPERVISOR_update_va_mapping((addr), (pteval), 0)) \
set_pte((ptep), (pteval)); \
} while (0)
#define pte_none(x) (!(x).pte)
#define pte_present(x) ((x).pte & (_PAGE_PRESENT | _PAGE_PROTNONE))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.