mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Palmer <daniel@0x0f.com>
To: geert@linux-m68k.org, gerg@linux-m68k.org,
	linux-m68k@lists.linux-m68k.org
Cc: linux-kernel@vger.kernel.org, Daniel Palmer <daniel@0x0f.com>
Subject: [PATCH 4/4] m68k: show the 68060's PCR in /proc/cpuinfo
Date: Thu, 19 Nov 2026 21:35:58 +0900	[thread overview]
Message-ID: <20261119123558.2108296-5-daniel@0x0f.com> (raw)
In-Reply-To: <20261119123558.2108296-1-daniel@0x0f.com>

Add the revision information etc from the PCR to /proc/cpuinfo.
This is useful to confirm the 68060 you have is actually the
revision written on the chip.

My Amiga A4000 with a full 68060, revision 6 looks like this:

  CPU:		68060
  MMU:		68060
  FPU:		68060
  Clocking:	49.3MHz
  BogoMips:	98.71
  Calibration:	493568 loops
  PCR:		0x04300601 (ID 0x0430, revision 6, superscalar)

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/m68k/kernel/setup_mm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index 41b595256ad1..c61c00959c54 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -451,6 +451,16 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 		   clockfreq/1000000,(clockfreq/100000)%10,
 		   loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100,
 		   loops_per_jiffy);
+	if (CPU_IS_060) {
+		u32 pcr = m68060_get_pcr();
+		u32 id = FIELD_GET(M68060_PCR_ID, pcr);
+
+		seq_printf(m, "PCR:\t\t0x%08x (ID 0x%04x%s, revision %u%s%s)\n",
+			   pcr, id, id == M68060_PCR_ID_68LC060 ? " LC/EC" : "",
+			   (unsigned int)FIELD_GET(M68060_PCR_REVISION, pcr),
+			   pcr & M68060_PCR_ESS ? ", superscalar" : "",
+			   pcr & M68060_PCR_I14 ? ", I14 workaround" : "");
+	}
 	return 0;
 }
 
-- 
2.55.0


      parent reply	other threads:[~2026-11-19 12:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 12:35 [PATCH 0/4] m68k: Add 060 PCR info to /proc/cpuinfo Daniel Palmer
2026-11-19 12:35 ` [PATCH 1/4] m68k: Add and use wrapper for FPU inline asm Daniel Palmer
2026-11-19 12:35 ` [PATCH 2/4] m68k: Add and use defines for 68060 PCR register Daniel Palmer
2026-11-19 12:35 ` [PATCH 3/4] m68k: Add helpers to read and write the 68060's PCR Daniel Palmer
2026-11-19 12:35 ` Daniel Palmer [this message]

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=20261119123558.2108296-5-daniel@0x0f.com \
    --to=daniel@0x0f.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.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®