From: Magnus Lindholm <linmag7@gmail.com>
To: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org
Cc: richard.henderson@linaro.org, mattst88@gmail.com, arnd@arndb.de,
paulmck@kernel.org, glaubitz@physik.fu-berlin.de,
macro@redhat.com, mcree@orcon.net.nz, ink@unseen.parts,
Magnus Lindholm <linmag7@gmail.com>
Subject: [PATCH 4/7] alpha: machine check handler for tsunami
Date: Mon, 24 Mar 2025 23:21:36 +0100 [thread overview]
Message-ID: <20250324222643.32085-5-linmag7@gmail.com> (raw)
In-Reply-To: <20250324222643.32085-1-linmag7@gmail.com>
Move functions tsunami_pci_clr_err_1, tsunami_pci_clr_err,
tsunami_machine_check to err_tsunami.c and enable pchip
errors by seting perrmask in tsunami_init_arch().
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/kernel/core_tsunami.c | 37 +++-----------------------------
1 file changed, 3 insertions(+), 34 deletions(-)
diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c
index fc1ab73f23de..7a6c1aab5f8b 100644
--- a/arch/alpha/kernel/core_tsunami.c
+++ b/arch/alpha/kernel/core_tsunami.c
@@ -346,6 +346,9 @@ tsunami_init_one_pchip(tsunami_pchip *pchip, int index)
pchip->wsba[3].csr = 0;
+ /* Enable pchip error */
+ pchip->perrmask.csr = 0x0fff;
+
/* Enable the Monster Window to make DAC pci64 possible. */
pchip->pctl.csr |= pctl_m_mwin;
@@ -448,37 +451,3 @@ tsunami_kill_arch(int mode)
if (TSUNAMI_cchip->csc.csr & 1L<<14)
tsunami_kill_one_pchip(TSUNAMI_pchip1, 1);
}
-
-static inline void
-tsunami_pci_clr_err_1(tsunami_pchip *pchip)
-{
- pchip->perror.csr;
- pchip->perror.csr = 0x040;
- mb();
- pchip->perror.csr;
-}
-
-static inline void
-tsunami_pci_clr_err(void)
-{
- tsunami_pci_clr_err_1(TSUNAMI_pchip0);
-
- /* TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10) */
- if (TSUNAMI_cchip->csc.csr & 1L<<14)
- tsunami_pci_clr_err_1(TSUNAMI_pchip1);
-}
-
-void
-tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
-{
- /* Clear error before any reporting. */
- mb();
- mb(); /* magic */
- draina();
- tsunami_pci_clr_err();
- wrmces(0x7);
- mb();
-
- process_mcheck_info(vector, la_ptr, "TSUNAMI",
- mcheck_expected(smp_processor_id()));
-}
--
2.45.3
next prev parent reply other threads:[~2025-03-24 22:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 22:21 [PATCH 0/7] " Magnus Lindholm
2025-03-24 22:21 ` [PATCH 1/7] " Magnus Lindholm
2025-03-24 22:21 ` [PATCH 2/7] " Magnus Lindholm
2025-03-24 22:21 ` [PATCH 3/7] " Magnus Lindholm
2025-03-24 22:21 ` Magnus Lindholm [this message]
2025-03-24 22:21 ` [PATCH 5/7] " Magnus Lindholm
2025-03-24 22:21 ` [PATCH 6/7] " Magnus Lindholm
2025-03-24 22:21 ` [PATCH 7/7] " Magnus Lindholm
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=20250324222643.32085-5-linmag7@gmail.com \
--to=linmag7@gmail.com \
--cc=arnd@arndb.de \
--cc=glaubitz@physik.fu-berlin.de \
--cc=ink@unseen.parts \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@redhat.com \
--cc=mattst88@gmail.com \
--cc=mcree@orcon.net.nz \
--cc=paulmck@kernel.org \
--cc=richard.henderson@linaro.org \
/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
all inboxes | Powered by JetHome®