Skip to contentSkip to conversation

lparcfg seq_file updates (pass 3)

PATCH New will schmidt 1 participant 1 message Jul 6, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lparcfg seq_file updates (pass 3)

Hi All,

Pass # 3 updates...
- Correcting my previously incorrect description of the lparcfg_count_active_processors() function..
This is for the cases where we have some number of virtual processors that are different than the total number of threads in the system. (i.e. systemcfg->processorcount isnt the desired value for partition_active_processors)
- moved e2a function into its own file in arch/ppc64/lib.
- changed lparcfg_count_active_processors() to use a while loop instead of a for loop.
- removed redundant of_node_put in lparcfg_count_active_processors().
- removed unneeded parms from get-system-parameter rtas_call.

Pass # 2 updates..
- Per Pauls request I've removed the vpurr references, and left just a stub function get_purr().
- this should apply clean to latest linus tree. (test-applied against 2.6.7-rc3).

This patch includes updates and cleanup for the PPC64 proc/lparcfg interface.
- use seq_file's seq_printf for output
- remove redundant e2a function. (use viopath.c's instead)
- change to Kconfig to allow building as a module.
- export required symbols from LparData.c

diffstat:

 Kconfig           |    2
 kernel/LparData.c |    3
 kernel/lparcfg.c  |  501 +++++++++++++++++++++++++-----------------------------
 kernel/viopath.c  |   82 --------
 lib/Makefile      |    6
 lib/e2a.c         |  108 +++++++++++
 6 files changed, 356 insertions(+), 346 deletions(-)

compiled for and tested on both iSeries and pSeries boxes.

Please apply. (or provide comments..)
Thanks,
-Will

arch/ppc64/Kconfig +1 -1
diff -urN linux-2.6.7.orig/arch/ppc64/Kconfig linux-2.6.7.lparcfg/arch/ppc64/Kconfig
@@ -226,7 +226,7 @@
 	depends on PPC_RTAS
 
 config LPARCFG
-	bool "LPAR Configuration Data"
+	tristate "LPAR Configuration Data"
 	help
 	Provide system capacity information via human readable
 	<key word>=<value> pairs through a /proc/ppc64/lparcfg interface.
arch/ppc64/kernel/LparData.c +3 -0
diff -urN linux-2.6.7.orig/arch/ppc64/kernel/LparData.c linux-2.6.7.lparcfg/arch/ppc64/kernel/LparData.c
@@ -10,6 +10,7 @@
 #include <asm/page.h>
 #include <stddef.h>
 #include <linux/threads.h>
+#include <linux/module.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/naca.h>
@@ -123,12 +124,14 @@
 		(u64)InstructionAccessSLB_Iseries /* 0x480 I-SLB */
 	}
 };
+EXPORT_SYMBOL(itLpNaca);
 
 /* May be filled in by the hypervisor so cannot end up in the BSS */
 struct ItIplParmsReal xItIplParmsReal __attribute__((__section__(".data")));
 
 /* May be filled in by the hypervisor so cannot end up in the BSS */
 struct ItExtVpdPanel xItExtVpdPanel __attribute__((__section__(".data")));
+EXPORT_SYMBOL(xItExtVpdPanel);
 
 #define maxPhysicalProcessors 32
 
arch/ppc64/kernel/lparcfg.c +235 -266

647 lines not on this page · raw message

arch/ppc64/kernel/viopath.c +3 -79

94 lines not on this page · raw message

arch/ppc64/lib/Makefile +6 -0
diff -urN linux-2.6.7.orig/arch/ppc64/lib/Makefile linux-2.6.7.lparcfg/arch/ppc64/lib/Makefile
@@ -9,3 +9,9 @@
 # for non-SMP configs. Don't build the real versions.
 
 lib-$(CONFIG_SMP) += locks.o
+
+# e2a provides EBCDIC to ASCII conversions.
+ifdef CONFIG_PPC_ISERIES
+obj-$(CONFIG_PCI)	+= e2a.o
+endif
+
arch/ppc64/lib/e2a.c +108 -0

108 lines not on this page · raw message