summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/asids-debugfs.c
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2026-08-31 14:43:51 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-09-13 18:17:31 -0700
commit55fc280e951ab2b39f3dcb640edc1b1eebc6d173 (patch)
treef0b5f37b42fc13b9908a31b657c646b024231cdd /arch/sh/mm/asids-debugfs.c
downloadlinux-stable-55fc280e951ab2b39f3dcb640edc1b1eebc6d173.tar.gz
linux-stable-55fc280e951ab2b39f3dcb640edc1b1eebc6d173.zip
Input: tsc2007 - read "ti,poll-period" as u32grafted
The "ti,poll-period" property is documented as a normal uint32 cell. The driver used a u64 helper, which makes the helper type disagree with the schema even though the stored value is still small. Read "ti,poll-period" with the u32 helper matching the documented DT cell size. Assisted-by: Codex:gpt-5-5 Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260831194352.1185860-1-robh@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'arch/sh/mm/asids-debugfs.c')
-rw-r--r--arch/sh/mm/asids-debugfs.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/sh/mm/asids-debugfs.c b/arch/sh/mm/asids-debugfs.c
new file mode 100644
index 000000000..d16d6f5ec
--- /dev/null
+++ b/arch/sh/mm/asids-debugfs.c
@@ -0,0 +1,59 @@
+/*
+ * debugfs ops for process ASIDs
+ *
+ * Copyright (C) 2000, 2001 Paolo Alberelli
+ * Copyright (C) 2003 - 2008 Paul Mundt
+ * Copyright (C) 2003, 2004 Richard Curnow
+ *
+ * Provides a debugfs file that lists out the ASIDs currently associated
+ * with the processes.
+ *
+ * In the SH-5 case, if the DM.PC register is examined through the debug
+ * link, this shows ASID + PC. To make use of this, the PID->ASID
+ * relationship needs to be known. This is primarily for debugging.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/init.h>
+#include <linux/debugfs.h>
+#include <linux/seq_file.h>
+#include <linux/spinlock.h>
+#include <linux/sched/signal.h>
+#include <linux/sched/task.h>
+
+#include <asm/processor.h>
+#include <asm/mmu_context.h>
+
+static int asids_debugfs_show(struct seq_file *file, void *iter)
+{
+ struct task_struct *p;
+
+ read_lock(&tasklist_lock);
+
+ for_each_process(p) {
+ int pid = p->pid;
+
+ if (unlikely(!pid))
+ continue;
+
+ if (p->mm)
+ seq_printf(file, "%5d : %04lx\n", pid,
+ cpu_asid(smp_processor_id(), p->mm));
+ }
+
+ read_unlock(&tasklist_lock);
+
+ return 0;
+}
+
+DEFINE_SHOW_ATTRIBUTE(asids_debugfs);
+
+static int __init asids_debugfs_init(void)
+{
+ debugfs_create_file("asids", S_IRUSR, arch_debugfs_dir, NULL,
+ &asids_debugfs_fops);
+ return 0;
+}
+device_initcall(asids_debugfs_init);