[PATCH 5/10] ppc64 iSeries: remove LparData.h

Stephen Rothwell sfr at canb.auug.org.au
Fri Jun 3 18:17:36 EST 2005


Hi Andrew,

include/asm-ppc64/iSeries/LparData.h just included a whole lot of other
files to declare variables that would be better declared in those other
files.  So, remove it.  This will reduce that number of things needed to
be included in most cases to access the relevant variables.

Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au
>
-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/HvLpEvent.c linus-iSeries-headers.5/arch/ppc64/kernel/HvLpEvent.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/HvLpEvent.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/HvLpEvent.c	2005-06-02 15:17:50.000000000 +1000
@@ -12,7 +12,7 @@
 #include <asm/system.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/iSeries/HvCallEvent.h>
-#include <asm/iSeries/LparData.h>
+#include <asm/iSeries/ItLpNaca.h>
 
 /* Array of LpEvent handler functions */
 LpEventHandler lpEventHandler[HvLpEvent_Type_NumTypes];
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/ItLpQueue.c linus-iSeries-headers.5/arch/ppc64/kernel/ItLpQueue.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/ItLpQueue.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/ItLpQueue.c	2005-06-02 16:07:50.000000000 +1000
@@ -16,7 +16,6 @@
 #include <asm/iSeries/ItLpQueue.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/iSeries/HvCallEvent.h>
-#include <asm/iSeries/LparData.h>
 
 static __inline__ int set_inUse( struct ItLpQueue * lpQueue )
 {
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_VpdInfo.c linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_VpdInfo.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_VpdInfo.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_VpdInfo.c	2005-06-02 16:08:05.000000000 +1000
@@ -35,7 +35,6 @@
 #include <asm/iSeries/HvCallPci.h>
 #include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/mf.h>
-#include <asm/iSeries/LparData.h>
 #include <asm/iSeries/iSeries_pci.h>
 #include "pci.h"
 
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_pci.c linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_pci.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_pci.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_pci.c	2005-06-02 16:16:36.000000000 +1000
@@ -40,7 +40,6 @@
 #include <asm/iSeries/HvCallPci.h>
 #include <asm/iSeries/HvCallSm.h>
 #include <asm/iSeries/HvCallXm.h>
-#include <asm/iSeries/LparData.h>
 #include <asm/iSeries/iSeries_irq.h>
 #include <asm/iSeries/iSeries_pci.h>
 #include <asm/iSeries/mf.h>
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_proc.c linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_proc.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_proc.c	2005-06-01 17:53:28.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_proc.c	2005-06-02 16:08:14.000000000 +1000
@@ -28,7 +28,7 @@
 #include <asm/iSeries/ItLpQueue.h>
 #include <asm/iSeries/HvCallXm.h>
 #include <asm/iSeries/IoHriMainStore.h>
-#include <asm/iSeries/LparData.h>
+#include <asm/iSeries/IoHriProcessorVpd.h>
 
 static int __init iseries_proc_create(void)
 {
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_setup.c linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_setup.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_setup.c	2005-06-03 09:24:03.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_setup.c	2005-06-03 09:25:15.000000000 +1000
@@ -47,7 +47,7 @@
 #include <asm/paca.h>
 #include <asm/cache.h>
 #include <asm/sections.h>
-#include <asm/iSeries/LparData.h>
+#include <asm/abs_addr.h>
 #include <asm/iSeries/HvCallHpt.h>
 #include <asm/iSeries/HvLpConfig.h>
 #include <asm/iSeries/HvCallEvent.h>
@@ -58,6 +58,9 @@
 #include <asm/iSeries/mf.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/iSeries/iSeries_irq.h>
+#include <asm/iSeries/IoHriProcessorVpd.h>
+#include <asm/iSeries/ItVpdAreas.h>
+#include <asm/iSeries/LparMap.h>
 
 extern void hvlog(char *fmt, ...);
 
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_smp.c linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_smp.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/iSeries_smp.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/iSeries_smp.c	2005-06-02 16:18:02.000000000 +1000
@@ -38,7 +38,6 @@
 #include <asm/io.h>
 #include <asm/smp.h>
 #include <asm/paca.h>
-#include <asm/iSeries/LparData.h>
 #include <asm/iSeries/HvCall.h>
 #include <asm/iSeries/HvCallCfg.h>
 #include <asm/time.h>
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/irq.c linus-iSeries-headers.5/arch/ppc64/kernel/irq.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/irq.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/irq.c	2005-06-02 15:48:09.000000000 +1000
@@ -52,7 +52,7 @@
 #include <asm/cache.h>
 #include <asm/prom.h>
 #include <asm/ptrace.h>
-#include <asm/iSeries/LparData.h>
+#include <asm/iSeries/ItLpQueue.h>
 #include <asm/machdep.h>
 #include <asm/paca.h>
 
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/lparcfg.c linus-iSeries-headers.5/arch/ppc64/kernel/lparcfg.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/lparcfg.c	2005-05-20 09:03:13.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/lparcfg.c	2005-06-02 16:08:22.000000000 +1000
@@ -28,12 +28,12 @@
 #include <asm/uaccess.h>
 #include <asm/iSeries/HvLpConfig.h>
 #include <asm/lppaca.h>
-#include <asm/iSeries/LparData.h>
 #include <asm/hvcall.h>
 #include <asm/cputable.h>
 #include <asm/rtas.h>
 #include <asm/system.h>
 #include <asm/time.h>
+#include <asm/iSeries/ItExtVpdPanel.h>
 
 #define MODULE_VERS "1.6"
 #define MODULE_NAME "lparcfg"
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/ras.c linus-iSeries-headers.5/arch/ppc64/kernel/ras.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/ras.c	2005-05-20 09:03:14.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/ras.c	2005-06-02 16:07:59.000000000 +1000
@@ -47,7 +47,6 @@
 #include <asm/cache.h>
 #include <asm/prom.h>
 #include <asm/ptrace.h>
-#include <asm/iSeries/LparData.h>
 #include <asm/machdep.h>
 #include <asm/rtas.h>
 #include <asm/ppcdebug.h>
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/rtc.c linus-iSeries-headers.5/arch/ppc64/kernel/rtc.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/rtc.c	2005-05-26 10:44:08.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/rtc.c	2005-06-02 16:18:54.000000000 +1000
@@ -42,7 +42,6 @@
 #include <asm/time.h>
 #include <asm/rtas.h>
 
-#include <asm/iSeries/LparData.h>
 #include <asm/iSeries/mf.h>
 #include <asm/machdep.h>
 #include <asm/iSeries/ItSpCommArea.h>
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/setup.c linus-iSeries-headers.5/arch/ppc64/kernel/setup.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/setup.c	2005-06-03 09:03:05.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/setup.c	2005-06-03 09:26:21.000000000 +1000
@@ -41,7 +41,6 @@
 #include <asm/smp.h>
 #include <asm/elf.h>
 #include <asm/machdep.h>
-#include <asm/iSeries/LparData.h>
 #include <asm/paca.h>
 #include <asm/ppcdebug.h>
 #include <asm/time.h>
@@ -57,6 +56,8 @@
 #include <asm/cache.h>
 #include <asm/page.h>
 #include <asm/mmu.h>
+#include <asm/lmb.h>
+#include <asm/iSeries/ItLpNaca.h>
 
 #ifdef DEBUG
 #define DBG(fmt...) udbg_printf(fmt)
diff -ruNp linus-iSeries-headers.4/arch/ppc64/kernel/viopath.c linus-iSeries-headers.5/arch/ppc64/kernel/viopath.c
--- linus-iSeries-headers.4/arch/ppc64/kernel/viopath.c	2005-06-01 17:54:00.000000000 +1000
+++ linus-iSeries-headers.5/arch/ppc64/kernel/viopath.c	2005-06-02 16:19:39.000000000 +1000
@@ -43,7 +43,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/LparData.h>
+#include <asm/iSeries/ItExtVpdPanel.h>
 #include <asm/iSeries/HvLpEvent.h>
 #include <asm/iSeries/HvLpConfig.h>
 #include <asm/iSeries/HvCallCfg.h>
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/HvLpConfig.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/HvLpConfig.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/HvLpConfig.h	2005-06-01 16:08:25.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/HvLpConfig.h	2005-06-02 16:21:09.000000000 +1000
@@ -27,7 +27,6 @@
 #include <asm/iSeries/HvCallCfg.h>
 #include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/LparData.h>
 
 extern HvLpIndex HvLpConfig_getLpIndex_outline(void);
 
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/HvReleaseData.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/HvReleaseData.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/HvReleaseData.h	2005-06-01 16:39:29.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/HvReleaseData.h	2005-06-02 15:07:40.000000000 +1000
@@ -58,4 +58,6 @@ struct HvReleaseData {
 	char	xRsvd3[20];	/* Reserved			x2C-x3F */
 };
 
+extern struct HvReleaseData	hvReleaseData;
+
 #endif /* _HVRELEASEDATA_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/IoHriMainStore.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/IoHriMainStore.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/IoHriMainStore.h	2005-06-01 16:47:55.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/IoHriMainStore.h	2005-06-02 16:06:25.000000000 +1000
@@ -161,4 +161,6 @@ struct IoHriMainStoreSegment5 {
 	u64	reserved3;
 };
 
+extern u64	xMsVpd[];
+
 #endif	/* _IOHRIMAINSTORE_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/IoHriProcessorVpd.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/IoHriProcessorVpd.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/IoHriProcessorVpd.h	2005-06-01 16:50:11.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/IoHriProcessorVpd.h	2005-06-02 15:27:50.000000000 +1000
@@ -81,4 +81,6 @@ struct IoHriProcessorVpd {
 	char	xProcSrc[72];		// CSP format SRC		xB8-xFF
 };
 
+extern struct IoHriProcessorVpd	xIoHriProcessorVpd[];
+
 #endif /* _IOHRIPROCESSORVPD_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItExtVpdPanel.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItExtVpdPanel.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItExtVpdPanel.h	2005-06-01 16:51:48.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItExtVpdPanel.h	2005-06-02 15:22:18.000000000 +1000
@@ -47,4 +47,6 @@ struct ItExtVpdPanel {
 	u8	xRsvd2[48];
 };
 
+extern struct ItExtVpdPanel	xItExtVpdPanel;
+
 #endif /* _ITEXTVPDPANEL_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItIplParmsReal.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItIplParmsReal.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItIplParmsReal.h	2005-06-01 16:53:52.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItIplParmsReal.h	2005-06-02 15:05:43.000000000 +1000
@@ -66,4 +66,6 @@ struct ItIplParmsReal {
 	u64	xRsvd13;		// Reserved			x38-x3F
 };
 
+extern struct ItIplParmsReal	xItIplParmsReal;
+
 #endif /* _ITIPLPARMSREAL_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItLpNaca.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItLpNaca.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItLpNaca.h	2005-06-01 16:58:28.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItLpNaca.h	2005-06-02 15:10:27.000000000 +1000
@@ -19,6 +19,8 @@
 #ifndef _ITLPNACA_H
 #define _ITLPNACA_H
 
+#include <linux/types.h>
+
 /*
  *	This control block contains the data that is shared between the
  *	hypervisor (PLIC) and the OS.
@@ -73,4 +75,6 @@ struct ItLpNaca {
 	u64	xInterruptHdlr[32];	// Interrupt handlers		300-x3FF
 };
 
+extern struct ItLpNaca		itLpNaca;
+
 #endif /* _ITLPNACA_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItVpdAreas.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItVpdAreas.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/ItVpdAreas.h	2005-06-01 17:11:03.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/ItVpdAreas.h	2005-06-02 16:22:09.000000000 +1000
@@ -90,4 +90,6 @@ struct ItVpdAreas {
 	void	*xSlicVpdAdrs[ItVpdMaxEntries];// Array of VPD buffers	130-1EF
 };
 
+extern struct ItVpdAreas	itVpdAreas;
+
 #endif /* _ITVPDAREAS_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/LparData.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/LparData.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/LparData.h	2005-06-01 17:12:42.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/LparData.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,48 +0,0 @@
-/*
- * LparData.h
- * Copyright (C) 2001  Mike Corrigan IBM Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- */
-
-#ifndef _LPARDATA_H
-#define _LPARDATA_H
-
-#include <asm/types.h>
-#include <asm/page.h>
-#include <asm/abs_addr.h>
-
-#include <asm/iSeries/ItLpNaca.h>
-#include <asm/iSeries/ItLpRegSave.h>
-#include <asm/iSeries/HvReleaseData.h>
-#include <asm/iSeries/LparMap.h>
-#include <asm/iSeries/ItVpdAreas.h>
-#include <asm/iSeries/ItIplParmsReal.h>
-#include <asm/iSeries/ItExtVpdPanel.h>
-#include <asm/iSeries/ItLpQueue.h>
-#include <asm/iSeries/IoHriProcessorVpd.h>
-
-extern struct LparMap		xLparMap;
-extern struct HvReleaseData	hvReleaseData;
-extern struct ItLpNaca		itLpNaca;
-extern struct ItIplParmsReal	xItIplParmsReal;
-extern struct ItExtVpdPanel	xItExtVpdPanel;
-extern struct IoHriProcessorVpd	xIoHriProcessorVpd[];
-extern struct ItLpQueue		xItLpQueue;
-extern struct ItVpdAreas	itVpdAreas;
-extern u64			xMsVpd[];
-extern struct msChunks		msChunks;
-
-#endif /* _LPARDATA_H */
diff -ruNp linus-iSeries-headers.4/include/asm-ppc64/iSeries/LparMap.h linus-iSeries-headers.5/include/asm-ppc64/iSeries/LparMap.h
--- linus-iSeries-headers.4/include/asm-ppc64/iSeries/LparMap.h	2005-06-01 17:14:45.000000000 +1000
+++ linus-iSeries-headers.5/include/asm-ppc64/iSeries/LparMap.h	2005-06-02 15:21:09.000000000 +1000
@@ -64,4 +64,6 @@ struct LparMap {
 	u64	xVPN;		// Virtual Page Number (0x000C000000000000)
 };
 
+extern struct LparMap		xLparMap;
+
 #endif /* _LPARMAP_H */



More information about the Linuxppc64-dev mailing list