forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/arch/parisc/kernel/setup.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Initial setup-routines for HP 9000 based hardware.
34 *
....@@ -9,21 +10,6 @@
910 * Modifications copyright 2001 Ryan Bradetich <rbradetich@uswest.net>
1011 *
1112 * Initial PA-RISC Version: 04-23-1999 by Helge Deller
12
- *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 2, or (at your option)
16
- * any later version.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
22
- *
23
- * You should have received a copy of the GNU General Public License
24
- * along with this program; if not, write to the Free Software
25
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
- *
2713 */
2814
2915 #include <linux/kernel.h>
....@@ -40,6 +26,7 @@
4026 #include <linux/sched/clock.h>
4127 #include <linux/start_kernel.h>
4228
29
+#include <asm/cacheflush.h>
4330 #include <asm/processor.h>
4431 #include <asm/sections.h>
4532 #include <asm/pdc.h>
....@@ -99,10 +86,6 @@
9986
10087 case pcxl2:
10188 pa7300lc_init();
102
- case pcxl: /* falls through */
103
- case pcxs:
104
- case pcxt:
105
- hppa_dma_ops = &dma_noncoherent_ops;
10689 break;
10790 default:
10891 break;
....@@ -166,10 +149,6 @@
166149
167150 #ifdef CONFIG_PA11
168151 dma_ops_init();
169
-#endif
170
-
171
-#if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
172
- conswitchp = &dummy_con; /* we use do_take_over_console() later ! */
173152 #endif
174153
175154 clear_sched_clock_stable();
....@@ -346,6 +325,13 @@
346325 boot_cpu_data.cpu_hz / 1000000,
347326 boot_cpu_data.cpu_hz % 1000000 );
348327
328
+#if defined(CONFIG_64BIT) && defined(CONFIG_SMP)
329
+ /* Don't serialize TLB flushes if we run on one CPU only. */
330
+ if (num_online_cpus() == 1)
331
+ pa_serialize_tlb_flushes = 0;
332
+#endif
333
+
334
+ apply_alternatives_all();
349335 parisc_setup_cache_timing();
350336
351337 /* These are in a non-obvious order, will fix when we have an iotree */