hc
2024-10-16 50a212ec906f7524620675f0c57357691c26c81f
kernel/arch/arc/include/asm/mmu.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
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 as
6
- * published by the Free Software Foundation.
74 */
85
96 #ifndef _ASM_ARC_MMU_H
....@@ -43,6 +40,10 @@
4340 #define ARC_REG_SCRATCH_DATA0 0x46c
4441 #endif
4542
43
+#if defined(CONFIG_ISA_ARCV2) || !defined(CONFIG_SMP)
44
+#define ARC_USE_SCRATCH_REG
45
+#endif
46
+
4647 /* Bits in MMU PID register */
4748 #define __TLB_ENABLE (1 << 31)
4849 #define __PROG_ENABLE (1 << 30)
....@@ -66,6 +67,8 @@
6667 #if (CONFIG_ARC_MMU_VER >= 2)
6768 #define TLBWriteNI 0x5 /* write JTLB without inv uTLBs */
6869 #define TLBIVUTLB 0x6 /* explicitly inv uTLBs */
70
+#else
71
+#define TLBWriteNI TLBWrite /* Not present in hardware, fallback */
6972 #endif
7073
7174 #if (CONFIG_ARC_MMU_VER >= 4)