2005-04-17 00:20:36 +02:00
|
|
|
#ifndef __ARM_MMU_H
|
|
|
|
#define __ARM_MMU_H
|
|
|
|
|
2006-06-20 21:46:52 +02:00
|
|
|
#ifdef CONFIG_MMU
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
typedef struct {
|
2007-05-17 11:19:23 +02:00
|
|
|
#ifdef CONFIG_CPU_HAS_ASID
|
2005-04-17 00:20:36 +02:00
|
|
|
unsigned int id;
|
2009-07-03 15:44:46 +02:00
|
|
|
raw_spinlock_t id_lock;
|
2005-04-17 00:20:36 +02:00
|
|
|
#endif
|
2006-06-29 21:17:15 +02:00
|
|
|
unsigned int kvm_seq;
|
2005-04-17 00:20:36 +02:00
|
|
|
} mm_context_t;
|
|
|
|
|
2007-05-17 11:19:23 +02:00
|
|
|
#ifdef CONFIG_CPU_HAS_ASID
|
2005-04-17 00:20:36 +02:00
|
|
|
#define ASID(mm) ((mm)->context.id & 255)
|
2010-11-23 11:39:23 +01:00
|
|
|
|
|
|
|
/* init_mm.context.id_lock should be initialized. */
|
|
|
|
#define INIT_MM_CONTEXT(name) \
|
2009-07-03 15:44:46 +02:00
|
|
|
.context.id_lock = __RAW_SPIN_LOCK_UNLOCKED(name.context.id_lock),
|
2005-04-17 00:20:36 +02:00
|
|
|
#else
|
|
|
|
#define ASID(mm) (0)
|
|
|
|
#endif
|
|
|
|
|
2006-06-20 21:46:52 +02:00
|
|
|
#else
|
|
|
|
|
|
|
|
/*
|
|
|
|
* From nommu.h:
|
|
|
|
* Copyright (C) 2002, David McCullough <davidm@snapgear.com>
|
|
|
|
* modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
|
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
unsigned long end_brk;
|
|
|
|
} mm_context_t;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2012-03-28 19:30:01 +02:00
|
|
|
/*
|
|
|
|
* switch_mm() may do a full cache flush over the context switch,
|
|
|
|
* so enable interrupts over the context switch to avoid high
|
|
|
|
* latency.
|
|
|
|
*/
|
|
|
|
#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
#endif
|