blob: 6f18da09668b5f324ad8c32e6fd6058e5b837e2a [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
Will Deacon8a4e3a92013-02-28 17:47:36 +01008 atomic64_t id;
Catalin Marinasbdae73c2013-07-23 16:15:36 +01009#else
10 int switch_pending;
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#endif
Will Deacon8a4e3a92013-02-28 17:47:36 +010012 unsigned int vmalloc_seq;
Russell King48be69a2013-07-24 00:29:18 +010013 unsigned long sigpage;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014} mm_context_t;
15
Russell King516793c2007-05-17 10:19:23 +010016#ifdef CONFIG_CPU_HAS_ASID
Will Deaconb5466f82012-06-15 14:47:31 +010017#define ASID_BITS 8
18#define ASID_MASK ((~0ULL) << ASID_BITS)
Will Deacon8a4e3a92013-02-28 17:47:36 +010019#define ASID(mm) ((mm)->context.id.counter & ~ASID_MASK)
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#else
21#define ASID(mm) (0)
22#endif
23
Russell King002547b2006-06-20 20:46:52 +010024#else
25
26/*
27 * From nommu.h:
28 * Copyright (C) 2002, David McCullough <davidm@snapgear.com>
29 * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
30 */
31typedef struct {
Will Deacon8a4e3a92013-02-28 17:47:36 +010032 unsigned long end_brk;
Russell King002547b2006-06-20 20:46:52 +010033} mm_context_t;
34
35#endif
36
Linus Torvalds1da177e2005-04-16 15:20:36 -070037#endif