Skip to contentSkip to conversation

powerpc/chrp: Use the same RTAS daemon as pSeries

PATCH Benjamin Herrenschmidt 1 participant 1 message Sep 25, 2009 PowerPC

lore
Share & tools
lore
#0 lore raw

The CHRP code has some fishy timer based code to scan the RTAS event log, which uses a 1KB stack buffer and doesn't even use the results.

The pSeries code as a nicer daemon that allows userspace to read the event log and basically uses the same RTAS interface

This patch moves rtasd.c out of platform/pseries and makes it usable by CHRP, after removing the old crufty event log mechanism in there.

The nvram logging part of the daemon is still only available on 64-bit since the underlying nvram management routines aren't currently shared.

---

arch/powerpc/kernel/Makefile +1 -0
index 3faa391..c002b04 100644
@@ -46,6 +46,7 @@ procfs-y			:= proc_powerpc.o
 obj-$(CONFIG_PROC_FS)		+= $(procfs-y)
 rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI)	:= rtas_pci.o
 obj-$(CONFIG_PPC_RTAS)		+= rtas.o rtas-rtc.o $(rtaspci-y-y)
+obj-$(CONFIG_PPC_RTAS_DAEMON)	+= rtasd.o
 obj-$(CONFIG_RTAS_FLASH)	+= rtas_flash.o
 obj-$(CONFIG_RTAS_PROC)		+= rtas-proc.o
 obj-$(CONFIG_LPARCFG)		+= lparcfg.o
arch/powerpc/kernel/rtasd.c new file +539 -0

539 lines not on this page · raw message

arch/powerpc/platforms/Kconfig +5 -0
index 04a8061..56bf126 100644
@@ -86,6 +86,11 @@ config RTAS_ERROR_LOGGING
 	depends on PPC_RTAS
 	default n
 
+config PPC_RTAS_DAEMON
+	bool
+	depends on PPC_RTAS
+	default n
+
 config RTAS_PROC
 	bool "Proc interface to RTAS"
 	depends on PPC_RTAS
arch/powerpc/platforms/chrp/Kconfig +2 -0
index 37d438b..bc0b0ef 100644
@@ -5,6 +5,8 @@ config PPC_CHRP
 	select PPC_I8259
 	select PPC_INDIRECT_PCI
 	select PPC_RTAS
+	select PPC_RTAS_DAEMON
+	select RTAS_ERROR_LOGGING
 	select PPC_MPC106
 	select PPC_UDBG_16550
 	select PPC_NATIVE
arch/powerpc/platforms/chrp/setup.c +0 -50

68 lines not on this page · raw message

arch/powerpc/platforms/pseries/Kconfig +1 -0
index f0e6f28..26a24bd 100644
@@ -4,6 +4,7 @@ config PPC_PSERIES
 	select MPIC
 	select PPC_I8259
 	select PPC_RTAS
+	select PPC_RTAS_DAEMON
 	select RTAS_ERROR_LOGGING
 	select PPC_UDBG_16550
 	select PPC_NATIVE
arch/powerpc/platforms/pseries/Makefile +1 -1
index 790c0b8..4b1c422 100644
@@ -7,7 +7,7 @@ EXTRA_CFLAGS		+= -DDEBUG
 endif
 
 obj-y			:= lpar.o hvCall.o nvram.o reconfig.o \
-			   setup.o iommu.o ras.o rtasd.o \
+			   setup.o iommu.o ras.o \
 			   firmware.o power.o
 obj-$(CONFIG_SMP)	+= smp.o
 obj-$(CONFIG_XICS)	+= xics.o
arch/powerpc/platforms/pseries/rtasd.c deleted +0 -519

519 lines not on this page · raw message