aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon/include
diff options
context:
space:
mode:
authorRichard Kuo <rkuo@codeaurora.org>2011-10-31 19:52:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 10:34:20 -0400
commit5df87c1556515dfae504da342990821f407a8c99 (patch)
tree9cd922340f301d0ab18cf3280b5c1c9f2df5e4cb /arch/hexagon/include
parent2d3cbc780437ae4e81f09d0efdd6769852bce5f5 (diff)
Hexagon: Implement basic TLB management routines for Hexagon.
Mostly all stubs, as the TLB is managed by the hypervisor. Signed-off-by: Richard Kuo <rkuo@codeaurora.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/hexagon/include')
-rw-r--r--arch/hexagon/include/asm/tlb.h39
-rw-r--r--arch/hexagon/include/asm/tlbflush.h58
2 files changed, 97 insertions, 0 deletions
diff --git a/arch/hexagon/include/asm/tlb.h b/arch/hexagon/include/asm/tlb.h
new file mode 100644
index 000000000000..473abde01d62
--- /dev/null
+++ b/arch/hexagon/include/asm/tlb.h
@@ -0,0 +1,39 @@
1/*
2 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 * 02110-1301, USA.
17 */
18
19#ifndef _ASM_TLB_H
20#define _ASM_TLB_H
21
22#include <linux/pagemap.h>
23#include <asm/tlbflush.h>
24
25/*
26 * We don't need any special per-pte or per-vma handling...
27 */
28#define tlb_start_vma(tlb, vma) do { } while (0)
29#define tlb_end_vma(tlb, vma) do { } while (0)
30#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
31
32/*
33 * .. because we flush the whole mm when it fills up
34 */
35#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
36
37#include <asm-generic/tlb.h>
38
39#endif
diff --git a/arch/hexagon/include/asm/tlbflush.h b/arch/hexagon/include/asm/tlbflush.h
new file mode 100644
index 000000000000..b89a90251225
--- /dev/null
+++ b/arch/hexagon/include/asm/tlbflush.h
@@ -0,0 +1,58 @@
1/*
2 * TLB flush support for Hexagon
3 *
4 * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and
8 * only version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA.
19 */
20
21#ifndef _ASM_TLBFLUSH_H
22#define _ASM_TLBFLUSH_H
23
24#include <linux/mm.h>
25#include <asm/processor.h>
26
27/*
28 * TLB flushing -- in "SMP", these routines get defined to be the
29 * ones from smp.c, else they are some local flavors.
30 */
31
32/*
33 * These functions are commonly macros, but in the interests of
34 * VM vs. native implementation and code size, we simply declare
35 * the function prototypes here.
36 */
37extern void tlb_flush_all(void);
38extern void flush_tlb_mm(struct mm_struct *mm);
39extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
40extern void flush_tlb_range(struct vm_area_struct *vma,
41 unsigned long start, unsigned long end);
42extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
43extern void flush_tlb_one(unsigned long);
44
45/*
46 * "This is called in munmap when we have freed up some page-table pages.
47 * We don't need to do anything here..."
48 *
49 * The VM kernel doesn't walk page tables, and they are passed to the VMM
50 * by logical address. There doesn't seem to be any possibility that they
51 * could be referenced by the VM kernel based on a stale mapping, since
52 * they would only be located by consulting the mm structure, and they
53 * will have been purged from that structure by the munmap. Seems like
54 * a noop on HVM as well.
55 */
56#define flush_tlb_pgtables(mm, start, end)
57
58#endif