From: Sam Ravnborg via B4 Relay <devnull+sam.ravnborg.org@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Arnd Bergmann <arnd@kernel.org>,
Andreas Larsson <andreas@gaisler.com>
Cc: Helge Deller <deller@gmx.de>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-sound@vger.kernel.org,
Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 23/27] sparc32: Drop unused trampoline code
Date: Tue, 19 Dec 2023 23:03:28 +0100 [thread overview]
Message-ID: <20231219-sam-sparc32-sunset-v3-v1-23-64bb44b598c5@ravnborg.org> (raw)
In-Reply-To: <20231219-sam-sparc32-sunset-v3-v1-0-64bb44b598c5@ravnborg.org>
From: Sam Ravnborg <sam@ravnborg.org>
Drop the sun4m and sun4d code from trampoline_32
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Andreas Larsson <andreas@gaisler.com>
---
arch/sparc/kernel/kernel.h | 3 +-
arch/sparc/kernel/trampoline_32.S | 127 +-------------------------------------
2 files changed, 3 insertions(+), 127 deletions(-)
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h
index 30adbec894f7..aea96b6b881c 100644
--- a/arch/sparc/kernel/kernel.h
+++ b/arch/sparc/kernel/kernel.h
@@ -112,8 +112,7 @@ extern unsigned int real_irq_entry[];
extern unsigned int smp4d_ticker[];
/* trampoline_32.S */
-extern unsigned long sun4m_cpu_startup;
-extern unsigned long sun4d_cpu_startup;
+void leon_smp_cpu_startup(int boot_cpu);
/* signal_32.c */
asmlinkage void do_sigreturn(struct pt_regs *regs);
diff --git a/arch/sparc/kernel/trampoline_32.S b/arch/sparc/kernel/trampoline_32.S
index 82fafeeb3a62..685b20923f6b 100644
--- a/arch/sparc/kernel/trampoline_32.S
+++ b/arch/sparc/kernel/trampoline_32.S
@@ -15,136 +15,12 @@
#include <asm/contregs.h>
#include <asm/thread_info.h>
- .globl sun4m_cpu_startup
- .globl sun4d_cpu_startup
-
- .align 4
-
/* When we start up a cpu for the first time it enters this routine.
* This initializes the chip from whatever state the prom left it
* in and sets PIL in %psr to 15, no irqs.
*/
-
-sun4m_cpu_startup:
-cpu1_startup:
- sethi %hi(trapbase_cpu1), %g3
- b 1f
- or %g3, %lo(trapbase_cpu1), %g3
-
-cpu2_startup:
- sethi %hi(trapbase_cpu2), %g3
- b 1f
- or %g3, %lo(trapbase_cpu2), %g3
-
-cpu3_startup:
- sethi %hi(trapbase_cpu3), %g3
- b 1f
- or %g3, %lo(trapbase_cpu3), %g3
-
-1:
- /* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */
- set (PSR_PIL | PSR_S | PSR_PS), %g1
- wr %g1, 0x0, %psr ! traps off though
- WRITE_PAUSE
-
- /* Our %wim is one behind CWP */
- mov 2, %g1
- wr %g1, 0x0, %wim
- WRITE_PAUSE
-
- /* This identifies "this cpu". */
- wr %g3, 0x0, %tbr
- WRITE_PAUSE
-
- /* Give ourselves a stack and curptr. */
- set current_set, %g5
- srl %g3, 10, %g4
- and %g4, 0xc, %g4
- ld [%g5 + %g4], %g6
-
- sethi %hi(THREAD_SIZE - STACKFRAME_SZ), %sp
- or %sp, %lo(THREAD_SIZE - STACKFRAME_SZ), %sp
- add %g6, %sp, %sp
-
- /* Turn on traps (PSR_ET). */
- rd %psr, %g1
- wr %g1, PSR_ET, %psr ! traps on
- WRITE_PAUSE
-
- /* Init our caches, etc. */
- set poke_srmmu, %g5
- ld [%g5], %g5
- call %g5
- nop
-
- /* Start this processor. */
- call smp_callin
- nop
-
- b,a smp_panic
-
.text
.align 4
-
-smp_panic:
- call cpu_panic
- nop
-
-/* CPUID in bootbus can be found at PA 0xff0140000 */
-#define SUN4D_BOOTBUS_CPUID 0xf0140000
-
- .align 4
-
-sun4d_cpu_startup:
- /* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */
- set (PSR_PIL | PSR_S | PSR_PS), %g1
- wr %g1, 0x0, %psr ! traps off though
- WRITE_PAUSE
-
- /* Our %wim is one behind CWP */
- mov 2, %g1
- wr %g1, 0x0, %wim
- WRITE_PAUSE
-
- /* Set tbr - we use just one trap table. */
- set trapbase, %g1
- wr %g1, 0x0, %tbr
- WRITE_PAUSE
-
- /* Get our CPU id out of bootbus */
- set SUN4D_BOOTBUS_CPUID, %g3
- lduba [%g3] ASI_M_CTL, %g3
- and %g3, 0xf8, %g3
- srl %g3, 3, %g1
- sta %g1, [%g0] ASI_M_VIKING_TMP1
-
- /* Give ourselves a stack and curptr. */
- set current_set, %g5
- srl %g3, 1, %g4
- ld [%g5 + %g4], %g6
-
- sethi %hi(THREAD_SIZE - STACKFRAME_SZ), %sp
- or %sp, %lo(THREAD_SIZE - STACKFRAME_SZ), %sp
- add %g6, %sp, %sp
-
- /* Turn on traps (PSR_ET). */
- rd %psr, %g1
- wr %g1, PSR_ET, %psr ! traps on
- WRITE_PAUSE
-
- /* Init our caches, etc. */
- set poke_srmmu, %g5
- ld [%g5], %g5
- call %g5
- nop
-
- /* Start this processor. */
- call smp_callin
- nop
-
- b,a smp_panic
-
- .align 4
.global leon_smp_cpu_startup, smp_penguin_ctable
leon_smp_cpu_startup:
@@ -198,4 +74,5 @@ leon_smp_cpu_startup:
call smp_callin
nop
- b,a smp_panic
+ b,a cpu_panic
+ nop
--
2.34.1
next prev parent reply other threads:[~2023-12-19 22:03 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 22:03 [PATCH 00/27] sparc32: sunset sun4m and sun4d Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 01/27] sparc32: Update defconfig to LEON SMP Sam Ravnborg via B4 Relay
2023-12-19 22:23 ` Arnd Bergmann
2023-12-20 6:43 ` Sam Ravnborg
2023-12-20 8:37 ` Arnd Bergmann
2023-12-19 22:03 ` [PATCH 02/27] sparc32: Drop sun4m/sun4d support from head_32.S Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 03/27] sparc32: Drop floppy support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 04/27] sparc32: Drop sun4m specific led driver Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 05/27] sparc32: Drop sun specific power management drivers Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 06/27] sparc32: Drop auxio support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 07/27] sparc32: Drop run-time patching of ipi trap Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 08/27] sparc32: Drop patching of interrupt vector Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 09/27] sparc32: Drop sun4m/sun4d specific irq handling Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 10/27] sparc32: Drop sun4d/sun4m smp support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 11/27] sparc32: Drop pcic support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 12/27] sparc32: Drop mbus support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 13/27] sparc32: Drop unused function __get_{phys,iospace} Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 14/27] sparc32: Drop unused mmu models Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 15/27] sparc32: Drop check for sparc_model Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 16/27] sparc32: Drop use of sparc_config Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 17/27] sparc32: Drop run-time patching of ASI instructions Sam Ravnborg via B4 Relay
2024-02-16 17:12 ` Andreas Larsson
2024-02-17 11:59 ` Sam Ravnborg
2023-12-19 22:03 ` [PATCH 18/27] sparc32: Drop support for 7 register windows Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 19/27] sparc32: Drop additional sun4d bits Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 20/27] sparc32: Drop unused prom ranges support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 21/27] sparc32: Drop unused iommu support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 22/27] sparc32: Drop sun4m irq support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` Sam Ravnborg via B4 Relay [this message]
2023-12-19 22:03 ` [PATCH 24/27] sparc32: Drop config SPARC_LEON Sam Ravnborg via B4 Relay
2023-12-20 5:52 ` Greg Kroah-Hartman
2023-12-19 22:03 ` [PATCH 25/27] sparc32: Drop sbus support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 26/27] sbus: char: Drop now unused uctrl driver Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 27/27] fbdev/p9100: Drop now unused driver p9100 Sam Ravnborg via B4 Relay
2024-01-02 8:26 ` Thomas Zimmermann
2024-01-02 16:31 ` Sam Ravnborg
2023-12-20 8:36 ` [PATCH 00/27] sparc32: sunset sun4m and sun4d Arnd Bergmann
2023-12-20 9:28 ` John Paul Adrian Glaubitz
2023-12-20 9:34 ` David Laight
2023-12-20 9:51 ` Arnd Bergmann
2023-12-20 9:54 ` John Paul Adrian Glaubitz
2023-12-20 10:47 ` Arnd Bergmann
2023-12-20 11:30 ` Mark Cave-Ayland
2023-12-20 15:22 ` Sam Ravnborg
2023-12-20 17:25 ` John Paul Adrian Glaubitz
2023-12-22 15:27 ` Andreas Larsson
2023-12-20 14:42 ` Kjetil Oftedal
2024-02-04 19:21 ` Sam Ravnborg
2024-02-05 5:12 ` John Paul Adrian Glaubitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231219-sam-sparc32-sunset-v3-v1-23-64bb44b598c5@ravnborg.org \
--to=devnull+sam.ravnborg.org@kernel.org \
--cc=andreas@gaisler.com \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tiwai@suse.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).