forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm/mm/proc-v7.S
....@@ -1,22 +1,19 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/arch/arm/mm/proc-v7.S
34 *
45 * Copyright (C) 2001 Deep Blue Solutions Ltd.
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 as
8
- * published by the Free Software Foundation.
96 *
107 * This is the "shell" of the ARMv7 processor support.
118 */
129 #include <linux/arm-smccc.h>
1310 #include <linux/init.h>
1411 #include <linux/linkage.h>
12
+#include <linux/pgtable.h>
1513 #include <asm/assembler.h>
1614 #include <asm/asm-offsets.h>
1715 #include <asm/hwcap.h>
1816 #include <asm/pgtable-hwdef.h>
19
-#include <asm/pgtable.h>
2017 #include <asm/memory.h>
2118
2219 #include "proc-macros.S"
....@@ -392,6 +389,11 @@
392389 orr r10, r10, #1 << 24 @ set bit #24
393390 mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
394391 #endif
392
+#ifdef CONFIG_ARM_ERRATA_857271
393
+ mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
394
+ orr r10, r10, #3 << 10 @ set bits #10 and #11
395
+ mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
396
+#endif
395397 b __errata_finish
396398
397399 __ca17_errata:
....@@ -406,6 +408,11 @@
406408 mrcle p15, 0, r10, c15, c0, 1 @ read diagnostic register
407409 orrle r10, r10, #1 << 12 @ set bit #12
408410 mcrle p15, 0, r10, c15, c0, 1 @ write diagnostic register
411
+#endif
412
+#ifdef CONFIG_ARM_ERRATA_857272
413
+ mrc p15, 0, r10, c15, c0, 1 @ read diagnostic register
414
+ orr r10, r10, #3 << 10 @ set bits #10 and #11
415
+ mcr p15, 0, r10, c15, c0, 1 @ write diagnostic register
409416 #endif
410417 b __errata_finish
411418
....@@ -637,7 +644,7 @@
637644 string cpu_elf_name, "v7"
638645 .align
639646
640
- .section ".proc.info.init", #alloc
647
+ .section ".proc.info.init", "a"
641648
642649 /*
643650 * Standard v7 proc info content