blob: 68870c7766712a4778b32278e64f82484d12f5e5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ARM_MMU_H
2#define __ARM_MMU_H
3
Russell King002547b2006-06-20 20:46:52 +01004#ifdef CONFIG_MMU
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006typedef struct {
Russell King516793c2007-05-17 10:19:23 +01007#ifdef CONFIG_CPU_HAS_ASID
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 unsigned int id;
Catalin Marinas11805bc2010-01-26 19:09:42 +01009 spinlock_t id_lock;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#endif
Russell Kingff0daca2006-06-29 20:17:15 +010011 unsigned int kvm_seq;
Linus Torvalds1da177e2005-04-16 15:20:36 -070012} mm_context_t;
13
Russell King516793c2007-05-17 10:19:23 +010014#ifdef CONFIG_CPU_HAS_ASID
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#define ASID(mm) ((mm)->context.id & 255)
16#else
17#define ASID(mm) (0)
18#endif
19
Russell King002547b2006-06-20 20:46:52 +010020#else
21
22/*
23 * From nommu.h:
24 * Copyright (C) 2002, David McCullough <davidm@snapgear.com>
25 * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
26 */
27typedef struct {
Russell King002547b2006-06-20 20:46:52 +010028 unsigned long end_brk;
29} mm_context_t;
30
31#endif
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033#endif