Skip to contentSkip to conversation

MIPS: Make CP0 config registers readable via sysfs.

PATCH Superseded Steven J. Hill 1 participant 1 message Dec 13, 2012 MIPS

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 MIPS: Make CP0 config registers readable via sysfs.

From: "Steven J. Hill" <[email protected]>

Allow reading of CP0 config registers via sysfs for each core in the system. The registers will show up in sysfs at the path:

/sys/devices/system/cpu/cpuX/configX

Only CP0 config registers 0 through 7 are currently supported.

---
 arch/mips/kernel/Makefile |    1 +
 arch/mips/kernel/sysfs.c  |   93 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)
 create mode 100644 arch/mips/kernel/sysfs.c
arch/mips/kernel/Makefile +1 -0
index cc5eec6..0c3eb97 100644
@@ -97,6 +97,7 @@ obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o
 obj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_mipsxx.o
 
 obj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
+obj-y				+= sysfs.o
 
 ifeq ($(CONFIG_CPU_MIPS32), y)
 #
arch/mips/kernel/sysfs.c new file +93 -0

93 lines not on this page · raw message

Signature · 1 line
1.7.9.5