blob: 221e7095473d383348d57c9389f5f7be146ac34f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * arch/sh/mm/tlb-sh4.c
3 *
4 * SH-4 specific TLB operations
5 *
6 * Copyright (C) 1999 Niibe Yutaka
7 * Copyright (C) 2002 Paul Mundt
8 *
9 * Released under the terms of the GNU GPL v2.0.
10 */
Paul Mundt26b7a782006-12-28 10:31:48 +090011#include <linux/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <asm/system.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <asm/mmu_context.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Paul Mundtea9af692006-12-25 19:28:54 +090015void local_flush_tlb_one(unsigned long asid, unsigned long page)
Linus Torvalds1da177e2005-04-16 15:20:36 -070016{
17 unsigned long addr, data;
18
19 /*
20 * NOTE: PTEH.ASID should be set to this MM
21 * _AND_ we need to write ASID to the array.
22 *
23 * It would be simple if we didn't need to set PTEH.ASID...
24 */
25 addr = MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT;
26 data = page | asid; /* VALID bit is off */
27 jump_to_P2();
28 ctrl_outl(data, addr);
29 back_to_P1();
30}