* Re: [PATCH 1/7] iseries: Use device tree /system-id in /proc/iSeries/config
From: Stephen Rothwell @ 2006-07-13 8:30 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
Hi Paulus,
On Thu, 13 Jul 2006 17:52:01 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
> ...
I can stage all these iSeries patches through my git tree if you like
(after Michael fixes 7/7), as I have some other iSeries patches that I
need to send you as well (some already sent yesterday).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* RE: Problems of Compiling Kernel with linux-2.4.27 and linux-2.6.17 for PowerPC405EP Board (Gerhard Jaeger)
From: zhangshaobo @ 2006-07-13 8:14 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
gvb mention that "machine check exception" is caused by memory map problems
which lead to bus error , now I meet a problem under MPC5200, there is a
peripherally pci netcard named "e100" , when application to use it,
sometimes system will enter into machine check .
would you meet the same problem, can you give me a more detail ?
thanks!
[-- Attachment #2: Type: text/html, Size: 2492 bytes --]
^ permalink raw reply
* [PATCH 3/3] iseries: Fix a compiler warning in platforms/iseries/vpdinfo.c
From: Michael Ellerman @ 2006-07-13 7:54 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777279.500377.573076823663.qpush@concordia>
PhbId might be used unitialised, so set it to 0xff (nothing) always.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/vpdinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: to-merge/arch/powerpc/platforms/iseries/vpdinfo.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/vpdinfo.c
+++ to-merge/arch/powerpc/platforms/iseries/vpdinfo.c
@@ -188,7 +188,7 @@ static void __init iSeries_Parse_Vpd(u8
{
u8 *TagPtr = VpdData;
int DataLen = VpdDataLen - 3;
- u8 PhbId;
+ u8 PhbId = 0xff;
while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) {
int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256);
^ permalink raw reply
* [PATCH 2/3] Fix a compiler warning in mm/tlb_64.c
From: Michael Ellerman @ 2006-07-13 7:54 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777279.500377.573076823663.qpush@concordia>
The compiler doesn't understand that BUG() never returns, so complains that
psize isn't set. Just set it to the normal value, which seems to produce nice
code and keeps gcc happy.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/mm/tlb_64.c | 1 +
1 file changed, 1 insertion(+)
Index: to-merge/arch/powerpc/mm/tlb_64.c
===================================================================
--- to-merge.orig/arch/powerpc/mm/tlb_64.c
+++ to-merge/arch/powerpc/mm/tlb_64.c
@@ -146,6 +146,7 @@ void hpte_update(struct mm_struct *mm, u
psize = mmu_huge_psize;
#else
BUG();
+ psize = pte_pagesize_index(pte); /* shutup gcc */
#endif
} else
psize = pte_pagesize_index(pte);
^ permalink raw reply
* [PATCH 1/3] iseries: Fix a compiler warning in platforms/iseries/vpdinfo.c
From: Michael Ellerman @ 2006-07-13 7:54 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
iSeries_Get_Location_Code() has error paths, but currently returns void, so
give it a return code and only print the output if it returns successfully.
Gcc isn't smart enough to be quiet though, so set frame to 0 to shut it up.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/vpdinfo.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
Index: to-merge/arch/powerpc/platforms/iseries/vpdinfo.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/vpdinfo.c
+++ to-merge/arch/powerpc/platforms/iseries/vpdinfo.c
@@ -205,15 +205,16 @@ static void __init iSeries_Parse_Vpd(u8
}
}
-static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
+static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
u8 *frame, char card[4])
{
+ int status = 0;
int BusVpdLen = 0;
u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
if (BusVpdPtr == NULL) {
printk("PCI: Bus VPD Buffer allocation failure.\n");
- return;
+ return 0;
}
BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr),
BUS_VPDSIZE);
@@ -228,8 +229,10 @@ static void __init iSeries_Get_Location_
goto out_free;
}
iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card);
+ status = 1;
out_free:
kfree(BusVpdPtr);
+ return status;
}
/*
@@ -246,7 +249,7 @@ void __init iSeries_Device_Information(s
struct device_node *DevNode = PciDev->sysdata;
struct pci_dn *pdn;
u16 bus;
- u8 frame;
+ u8 frame = 0;
char card[4];
HvSubBusNumber subbus;
HvAgentId agent;
@@ -262,10 +265,11 @@ void __init iSeries_Device_Information(s
subbus = pdn->bussubno;
agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
- iSeries_Get_Location_Code(bus, agent, &frame, card);
- printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, Card %4s ",
- count, bus, PCI_SLOT(PciDev->devfn), PciDev->vendor,
- frame, card);
- printk("0x%04X\n", (int)(PciDev->class >> 8));
+ if (iSeries_Get_Location_Code(bus, agent, &frame, card)) {
+ printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, "
+ "Card %4s 0x%04X\n", count, bus,
+ PCI_SLOT(PciDev->devfn), PciDev->vendor, frame,
+ card, (int)(PciDev->class >> 8));
+ }
}
^ permalink raw reply
* [PATCH 7/7] iseries: Move iommu_table_cb into platforms/iseries
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
Although we pass the address of an iommu_table_cb to HvCallXm_getTceTableParms,
we don't actually need the structure definition anywhere except in the
iseries iommu code, so move the struct in there.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/iommu.c | 1 +
arch/powerpc/platforms/iseries/iommu.h | 17 +++++++++++++++++
include/asm-powerpc/iseries/hv_call_xm.h | 17 -----------------
3 files changed, 18 insertions(+), 17 deletions(-)
Index: to-merge/arch/powerpc/platforms/iseries/iommu.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/iommu.c
+++ to-merge/arch/powerpc/platforms/iseries/iommu.c
@@ -36,6 +36,7 @@
#include <asm/pci-bridge.h>
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/iommu.h>
+#include "iommu.h"
static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
unsigned long uaddr, enum dma_data_direction direction)
Index: to-merge/arch/powerpc/platforms/iseries/iommu.h
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/iommu.h
+++ to-merge/arch/powerpc/platforms/iseries/iommu.h
@@ -32,4 +32,21 @@ extern void iommu_table_getparms_iSeries
unsigned char slotno, unsigned char virtbus,
struct iommu_table *tbl);
+/*
+ * Structure passed to HvCallXm_getTceTableParms
+ */
+struct iommu_table_cb {
+ unsigned long itc_busno; /* Bus number for this tce table */
+ unsigned long itc_start; /* Will be NULL for secondary */
+ unsigned long itc_totalsize; /* Size (in pages) of whole table */
+ unsigned long itc_offset; /* Index into real tce table of the
+ start of our section */
+ unsigned long itc_size; /* Size (in pages) of our section */
+ unsigned long itc_index; /* Index of this tce table */
+ unsigned short itc_maxtables; /* Max num of tables for partition */
+ unsigned char itc_virtbus; /* Flag to indicate virtual bus */
+ unsigned char itc_slotno; /* IOA Tce Slot Index */
+ unsigned char itc_rsvd[4];
+};
+
#endif /* _PLATFORMS_ISERIES_IOMMU_H */
Index: to-merge/include/asm-powerpc/iseries/hv_call_xm.h
===================================================================
--- to-merge.orig/include/asm-powerpc/iseries/hv_call_xm.h
+++ to-merge/include/asm-powerpc/iseries/hv_call_xm.h
@@ -16,23 +16,6 @@
#define HvCallXmSetTce HvCallXm + 11
#define HvCallXmSetTces HvCallXm + 13
-/*
- * Structure passed to HvCallXm_getTceTableParms
- */
-struct iommu_table_cb {
- unsigned long itc_busno; /* Bus number for this tce table */
- unsigned long itc_start; /* Will be NULL for secondary */
- unsigned long itc_totalsize; /* Size (in pages) of whole table */
- unsigned long itc_offset; /* Index into real tce table of the
- start of our section */
- unsigned long itc_size; /* Size (in pages) of our section */
- unsigned long itc_index; /* Index of this tce table */
- unsigned short itc_maxtables; /* Max num of tables for partition */
- unsigned char itc_virtbus; /* Flag to indicate virtual bus */
- unsigned char itc_slotno; /* IOA Tce Slot Index */
- unsigned char itc_rsvd[4];
-};
-
static inline void HvCallXm_getTceTableParms(u64 cb)
{
HvCall1(HvCallXmGetTceTableParms, cb);
^ permalink raw reply
* [PATCH 6/7] iseries: Move ItLpNaca into platforms/iseries
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
Move ItLpNaca into platforms/iseries now that it's not used elsewhere.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/setup_64.c | 1
arch/powerpc/platforms/iseries/hvlpconfig.c | 2
arch/powerpc/platforms/iseries/it_lp_naca.h | 80 ++++++++++++++++++++++++++++
arch/powerpc/platforms/iseries/lpardata.c | 3 -
arch/powerpc/platforms/iseries/lpevents.c | 2
arch/powerpc/platforms/iseries/setup.c | 2
include/asm-powerpc/iseries/it_lp_naca.h | 80 ----------------------------
7 files changed, 84 insertions(+), 86 deletions(-)
Index: to-merge/arch/powerpc/kernel/setup_64.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/setup_64.c
+++ to-merge/arch/powerpc/kernel/setup_64.c
@@ -56,7 +56,6 @@
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/lmb.h>
-#include <asm/iseries/it_lp_naca.h>
#include <asm/firmware.h>
#include <asm/xmon.h>
#include <asm/udbg.h>
Index: to-merge/arch/powerpc/platforms/iseries/hvlpconfig.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/hvlpconfig.c
+++ to-merge/arch/powerpc/platforms/iseries/hvlpconfig.c
@@ -18,7 +18,7 @@
#include <linux/module.h>
#include <asm/iseries/hv_lp_config.h>
-#include <asm/iseries/it_lp_naca.h>
+#include "it_lp_naca.h"
HvLpIndex HvLpConfig_getLpIndex_outline(void)
{
Index: to-merge/arch/powerpc/platforms/iseries/it_lp_naca.h
===================================================================
--- /dev/null
+++ to-merge/arch/powerpc/platforms/iseries/it_lp_naca.h
@@ -0,0 +1,80 @@
+/*
+ * 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 _PLATFORMS_ISERIES_IT_LP_NACA_H
+#define _PLATFORMS_ISERIES_IT_LP_NACA_H
+
+#include <linux/types.h>
+
+/*
+ * This control block contains the data that is shared between the
+ * hypervisor (PLIC) and the OS.
+ */
+
+struct ItLpNaca {
+// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
+ u32 xDesc; // Eye catcher x00-x03
+ u16 xSize; // Size of this class x04-x05
+ u16 xIntHdlrOffset; // Offset to IntHdlr array x06-x07
+ u8 xMaxIntHdlrEntries; // Number of entries in array x08-x08
+ u8 xPrimaryLpIndex; // LP Index of Primary x09-x09
+ u8 xServiceLpIndex; // LP Ind of Service Focal Pointx0A-x0A
+ u8 xLpIndex; // LP Index x0B-x0B
+ u16 xMaxLpQueues; // Number of allocated queues x0C-x0D
+ u16 xLpQueueOffset; // Offset to start of LP queues x0E-x0F
+ u8 xPirEnvironMode; // Piranha or hardware x10-x10
+ u8 xPirConsoleMode; // Piranha console indicator x11-x11
+ u8 xPirDasdMode; // Piranha dasd indicator x12-x12
+ u8 xRsvd1_0[5]; // Reserved for Piranha related x13-x17
+ u8 flags; // flags, see below x18-x1F
+ u8 xSpVpdFormat; // VPD areas are in CSP format ...
+ u8 xIntProcRatio; // Ratio of int procs to procs ...
+ u8 xRsvd1_2[5]; // Reserved ...
+ u16 xRsvd1_3; // Reserved x20-x21
+ u16 xPlicVrmIndex; // VRM index of PLIC x22-x23
+ u16 xMinSupportedSlicVrmInd;// Min supported OS VRM index x24-x25
+ u16 xMinCompatableSlicVrmInd;// Min compatible OS VRM index x26-x27
+ u64 xLoadAreaAddr; // ER address of load area x28-x2F
+ u32 xLoadAreaChunks; // Chunks for the load area x30-x33
+ u32 xPaseSysCallCRMask; // Mask used to test CR before x34-x37
+ // doing an ASR switch on PASE
+ // system call.
+ u64 xSlicSegmentTablePtr; // Pointer to Slic seg table. x38-x3f
+ u8 xRsvd1_4[64]; // x40-x7F
+
+// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
+ u8 xRsvd2_0[128]; // Reserved x00-x7F
+
+// CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators
+// NB: Padding required to keep xInterrruptHdlr at x300 which is required
+// for v4r4 PLIC.
+ u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F
+ u8 xRsvd3_0[384]; // Reserved 180-2FF
+
+// CACHE_LINE_7-8 0x0300 - 0x03FF Contains the address of the OS interrupt
+// handlers
+ u64 xInterruptHdlr[32]; // Interrupt handlers 300-x3FF
+};
+
+extern struct ItLpNaca itLpNaca;
+
+#define ITLPNACA_LPAR 0x80 /* Is LPAR installed on the system */
+#define ITLPNACA_PARTITIONED 0x40 /* Is the system partitioned */
+#define ITLPNACA_HWSYNCEDTBS 0x20 /* Hardware synced TBs */
+#define ITLPNACA_HMTINT 0x10 /* Utilize MHT for interrupts */
+
+#endif /* _PLATFORMS_ISERIES_IT_LP_NACA_H */
Index: to-merge/arch/powerpc/platforms/iseries/lpardata.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/lpardata.c
+++ to-merge/arch/powerpc/platforms/iseries/lpardata.c
@@ -13,7 +13,6 @@
#include <asm/processor.h>
#include <asm/ptrace.h>
#include <asm/abs_addr.h>
-#include <asm/iseries/it_lp_naca.h>
#include <asm/lppaca.h>
#include <asm/iseries/it_lp_reg_save.h>
#include <asm/paca.h>
@@ -27,6 +26,7 @@
#include "processor_vpd.h"
#include "release_data.h"
#include "it_exp_vpd_panel.h"
+#include "it_lp_naca.h"
/* The HvReleaseData is the root of the information shared between
* the hypervisor and Linux.
@@ -127,7 +127,6 @@ struct ItLpNaca itLpNaca = {
(u64)instruction_access_slb_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")));
Index: to-merge/arch/powerpc/platforms/iseries/lpevents.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/lpevents.c
+++ to-merge/arch/powerpc/platforms/iseries/lpevents.c
@@ -20,7 +20,7 @@
#include <asm/iseries/it_lp_queue.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/hv_call_event.h>
-#include <asm/iseries/it_lp_naca.h>
+#include "it_lp_naca.h"
/*
* The LpQueue is used to pass event data from the hypervisor to
Index: to-merge/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/setup.c
+++ to-merge/arch/powerpc/platforms/iseries/setup.c
@@ -48,7 +48,6 @@
#include <asm/iseries/hv_call_event.h>
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/it_lp_queue.h>
-#include <asm/iseries/it_lp_naca.h>
#include <asm/iseries/mf.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/lpar_map.h>
@@ -60,6 +59,7 @@
#include "irq.h"
#include "vpd_areas.h"
#include "processor_vpd.h"
+#include "it_lp_naca.h"
#include "main_store.h"
#include "call_sm.h"
#include "call_hpt.h"
Index: to-merge/include/asm-powerpc/iseries/it_lp_naca.h
===================================================================
--- to-merge.orig/include/asm-powerpc/iseries/it_lp_naca.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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 _ASM_POWERPC_ISERIES_IT_LP_NACA_H
-#define _ASM_POWERPC_ISERIES_IT_LP_NACA_H
-
-#include <linux/types.h>
-
-/*
- * This control block contains the data that is shared between the
- * hypervisor (PLIC) and the OS.
- */
-
-struct ItLpNaca {
-// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
- u32 xDesc; // Eye catcher x00-x03
- u16 xSize; // Size of this class x04-x05
- u16 xIntHdlrOffset; // Offset to IntHdlr array x06-x07
- u8 xMaxIntHdlrEntries; // Number of entries in array x08-x08
- u8 xPrimaryLpIndex; // LP Index of Primary x09-x09
- u8 xServiceLpIndex; // LP Ind of Service Focal Pointx0A-x0A
- u8 xLpIndex; // LP Index x0B-x0B
- u16 xMaxLpQueues; // Number of allocated queues x0C-x0D
- u16 xLpQueueOffset; // Offset to start of LP queues x0E-x0F
- u8 xPirEnvironMode; // Piranha or hardware x10-x10
- u8 xPirConsoleMode; // Piranha console indicator x11-x11
- u8 xPirDasdMode; // Piranha dasd indicator x12-x12
- u8 xRsvd1_0[5]; // Reserved for Piranha related x13-x17
- u8 flags; // flags, see below x18-x1F
- u8 xSpVpdFormat; // VPD areas are in CSP format ...
- u8 xIntProcRatio; // Ratio of int procs to procs ...
- u8 xRsvd1_2[5]; // Reserved ...
- u16 xRsvd1_3; // Reserved x20-x21
- u16 xPlicVrmIndex; // VRM index of PLIC x22-x23
- u16 xMinSupportedSlicVrmInd;// Min supported OS VRM index x24-x25
- u16 xMinCompatableSlicVrmInd;// Min compatible OS VRM index x26-x27
- u64 xLoadAreaAddr; // ER address of load area x28-x2F
- u32 xLoadAreaChunks; // Chunks for the load area x30-x33
- u32 xPaseSysCallCRMask; // Mask used to test CR before x34-x37
- // doing an ASR switch on PASE
- // system call.
- u64 xSlicSegmentTablePtr; // Pointer to Slic seg table. x38-x3f
- u8 xRsvd1_4[64]; // x40-x7F
-
-// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
- u8 xRsvd2_0[128]; // Reserved x00-x7F
-
-// CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators
-// NB: Padding required to keep xInterrruptHdlr at x300 which is required
-// for v4r4 PLIC.
- u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F
- u8 xRsvd3_0[384]; // Reserved 180-2FF
-
-// CACHE_LINE_7-8 0x0300 - 0x03FF Contains the address of the OS interrupt
-// handlers
- u64 xInterruptHdlr[32]; // Interrupt handlers 300-x3FF
-};
-
-extern struct ItLpNaca itLpNaca;
-
-#define ITLPNACA_LPAR 0x80 /* Is LPAR installed on the system */
-#define ITLPNACA_PARTITIONED 0x40 /* Is the system partitioned */
-#define ITLPNACA_HWSYNCEDTBS 0x20 /* Hardware synced TBs */
-#define ITLPNACA_HMTINT 0x10 /* Utilize MHT for interrupts */
-
-#endif /* _ASM_POWERPC_ISERIES_IT_LP_NACA_H */
^ permalink raw reply
* [PATCH 5/7] iseries: Make HvLpConfig_get(Primary)LpIndex functions
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
HvLpConfig_get(Primary)LpIndex are currently static inlines that return
fields from the itLpNaca, if we make them real functions we can make the
itLpNaca private to iSeries.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/hvlpconfig.c | 13 +++++++++++++
arch/powerpc/platforms/iseries/setup.c | 1 +
include/asm-powerpc/iseries/hv_lp_config.h | 13 ++-----------
3 files changed, 16 insertions(+), 11 deletions(-)
Index: to-merge/arch/powerpc/platforms/iseries/hvlpconfig.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/hvlpconfig.c
+++ to-merge/arch/powerpc/platforms/iseries/hvlpconfig.c
@@ -18,9 +18,22 @@
#include <linux/module.h>
#include <asm/iseries/hv_lp_config.h>
+#include <asm/iseries/it_lp_naca.h>
HvLpIndex HvLpConfig_getLpIndex_outline(void)
{
return HvLpConfig_getLpIndex();
}
EXPORT_SYMBOL(HvLpConfig_getLpIndex_outline);
+
+HvLpIndex HvLpConfig_getLpIndex(void)
+{
+ return itLpNaca.xLpIndex;
+}
+EXPORT_SYMBOL(HvLpConfig_getLpIndex);
+
+HvLpIndex HvLpConfig_getPrimaryLpIndex(void)
+{
+ return itLpNaca.xPrimaryLpIndex;
+}
+EXPORT_SYMBOL_GPL(HvLpConfig_getPrimaryLpIndex);
Index: to-merge/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/setup.c
+++ to-merge/arch/powerpc/platforms/iseries/setup.c
@@ -48,6 +48,7 @@
#include <asm/iseries/hv_call_event.h>
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/it_lp_queue.h>
+#include <asm/iseries/it_lp_naca.h>
#include <asm/iseries/mf.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/lpar_map.h>
Index: to-merge/include/asm-powerpc/iseries/hv_lp_config.h
===================================================================
--- to-merge.orig/include/asm-powerpc/iseries/hv_lp_config.h
+++ to-merge/include/asm-powerpc/iseries/hv_lp_config.h
@@ -25,7 +25,6 @@
#include <asm/iseries/hv_call_sc.h>
#include <asm/iseries/hv_types.h>
-#include <asm/iseries/it_lp_naca.h>
enum {
HvCallCfg_Cur = 0,
@@ -44,16 +43,8 @@ enum {
#define HvCallCfgGetHostingLpIndex HvCallCfg + 32
extern HvLpIndex HvLpConfig_getLpIndex_outline(void);
-
-static inline HvLpIndex HvLpConfig_getLpIndex(void)
-{
- return itLpNaca.xLpIndex;
-}
-
-static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void)
-{
- return itLpNaca.xPrimaryLpIndex;
-}
+extern HvLpIndex HvLpConfig_getLpIndex(void);
+extern HvLpIndex HvLpConfig_getPrimaryLpIndex(void);
static inline u64 HvLpConfig_getMsChunks(void)
{
^ permalink raw reply
* [PATCH 4/7] iseries: Make ItExtVpdPanel private to iSeries
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
No one outside platforms/iseries needs ItExtVpdPanel anymore, so move
it in there. It used to be needed by lparcfg, and so was exported, but
isn't needed anymore, so unexport it.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/lparcfg.c | 1
arch/powerpc/platforms/iseries/dt.c | 2
arch/powerpc/platforms/iseries/it_exp_vpd_panel.h | 51 ++++++++++++++++++++++
arch/powerpc/platforms/iseries/lpardata.c | 3 -
include/asm-powerpc/iseries/it_exp_vpd_panel.h | 51 ----------------------
5 files changed, 53 insertions(+), 55 deletions(-)
Index: to-merge/arch/powerpc/kernel/lparcfg.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/lparcfg.c
+++ to-merge/arch/powerpc/kernel/lparcfg.c
@@ -32,7 +32,6 @@
#include <asm/rtas.h>
#include <asm/system.h>
#include <asm/time.h>
-#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/prom.h>
#include <asm/vdso_datapage.h>
Index: to-merge/arch/powerpc/platforms/iseries/dt.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/dt.c
+++ to-merge/arch/powerpc/platforms/iseries/dt.c
@@ -34,13 +34,13 @@
#include <asm/iseries/hv_types.h>
#include <asm/iseries/hv_lp_config.h>
#include <asm/iseries/hv_call_xm.h>
-#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/udbg.h>
#include "processor_vpd.h"
#include "call_hpt.h"
#include "call_pci.h"
#include "pci.h"
+#include "it_exp_vpd_panel.h"
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
Index: to-merge/arch/powerpc/platforms/iseries/it_exp_vpd_panel.h
===================================================================
--- /dev/null
+++ to-merge/arch/powerpc/platforms/iseries/it_exp_vpd_panel.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2002 Dave Boutcher 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 _PLATFORMS_ISERIES_IT_EXT_VPD_PANEL_H
+#define _PLATFORMS_ISERIES_IT_EXT_VPD_PANEL_H
+
+/*
+ * This struct maps the panel information
+ *
+ * Warning:
+ * This data must match the architecture for the panel information
+ */
+
+#include <asm/types.h>
+
+struct ItExtVpdPanel {
+ /* Definition of the Extended Vpd On Panel Data Area */
+ char systemSerial[8];
+ char mfgID[4];
+ char reserved1[24];
+ char machineType[4];
+ char systemID[6];
+ char somUniqueCnt[4];
+ char serialNumberCount;
+ char reserved2[7];
+ u16 bbu3;
+ u16 bbu2;
+ u16 bbu1;
+ char xLocationLabel[8];
+ u8 xRsvd1[6];
+ u16 xFrameId;
+ u8 xRsvd2[48];
+};
+
+extern struct ItExtVpdPanel xItExtVpdPanel;
+
+#endif /* _PLATFORMS_ISERIES_IT_EXT_VPD_PANEL_H */
Index: to-merge/arch/powerpc/platforms/iseries/lpardata.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/lpardata.c
+++ to-merge/arch/powerpc/platforms/iseries/lpardata.c
@@ -18,7 +18,6 @@
#include <asm/iseries/it_lp_reg_save.h>
#include <asm/paca.h>
#include <asm/iseries/lpar_map.h>
-#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/iseries/it_lp_queue.h>
#include "naca.h"
@@ -27,6 +26,7 @@
#include "ipl_parms.h"
#include "processor_vpd.h"
#include "release_data.h"
+#include "it_exp_vpd_panel.h"
/* The HvReleaseData is the root of the information shared between
* the hypervisor and Linux.
@@ -134,7 +134,6 @@ struct ItIplParmsReal xItIplParmsReal __
/* 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
Index: to-merge/include/asm-powerpc/iseries/it_exp_vpd_panel.h
===================================================================
--- to-merge.orig/include/asm-powerpc/iseries/it_exp_vpd_panel.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2002 Dave Boutcher 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 _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H
-#define _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H
-
-/*
- * This struct maps the panel information
- *
- * Warning:
- * This data must match the architecture for the panel information
- */
-
-#include <asm/types.h>
-
-struct ItExtVpdPanel {
- /* Definition of the Extended Vpd On Panel Data Area */
- char systemSerial[8];
- char mfgID[4];
- char reserved1[24];
- char machineType[4];
- char systemID[6];
- char somUniqueCnt[4];
- char serialNumberCount;
- char reserved2[7];
- u16 bbu3;
- u16 bbu2;
- u16 bbu1;
- char xLocationLabel[8];
- u8 xRsvd1[6];
- u16 xFrameId;
- u8 xRsvd2[48];
-};
-
-extern struct ItExtVpdPanel xItExtVpdPanel;
-
-#endif /* _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H */
^ permalink raw reply
* [PATCH 3/7] iseries: Cleanup e2a() and strne2a()
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
e2a() was formally used by lparcfg, and so had to be exported, but isn't
anymore, so don't.
e2a() and strne2a() can both be static, and __init.
And e2a can be made much more concise if we use x ... y case labels, while
we're there add support for lower case letters.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/dt.c | 92 ++++++------------------------------
1 file changed, 17 insertions(+), 75 deletions(-)
Index: to-merge/arch/powerpc/platforms/iseries/dt.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/dt.c
+++ to-merge/arch/powerpc/platforms/iseries/dt.c
@@ -80,87 +80,29 @@ static char __initdata device_type_vscsi
/* EBCDIC to ASCII conversion routines */
-unsigned char e2a(unsigned char x)
+static unsigned char __init e2a(unsigned char x)
{
switch (x) {
- case 0xF0:
- return '0';
- case 0xF1:
- return '1';
- case 0xF2:
- return '2';
- case 0xF3:
- return '3';
- case 0xF4:
- return '4';
- case 0xF5:
- return '5';
- case 0xF6:
- return '6';
- case 0xF7:
- return '7';
- case 0xF8:
- return '8';
- case 0xF9:
- return '9';
- case 0xC1:
- return 'A';
- case 0xC2:
- return 'B';
- case 0xC3:
- return 'C';
- case 0xC4:
- return 'D';
- case 0xC5:
- return 'E';
- case 0xC6:
- return 'F';
- case 0xC7:
- return 'G';
- case 0xC8:
- return 'H';
- case 0xC9:
- return 'I';
- case 0xD1:
- return 'J';
- case 0xD2:
- return 'K';
- case 0xD3:
- return 'L';
- case 0xD4:
- return 'M';
- case 0xD5:
- return 'N';
- case 0xD6:
- return 'O';
- case 0xD7:
- return 'P';
- case 0xD8:
- return 'Q';
- case 0xD9:
- return 'R';
- case 0xE2:
- return 'S';
- case 0xE3:
- return 'T';
- case 0xE4:
- return 'U';
- case 0xE5:
- return 'V';
- case 0xE6:
- return 'W';
- case 0xE7:
- return 'X';
- case 0xE8:
- return 'Y';
- case 0xE9:
- return 'Z';
+ case 0x81 ... 0x89:
+ return x - 0x81 + 'a';
+ case 0x91 ... 0x99:
+ return x - 0x91 + 'j';
+ case 0xA2 ... 0xA9:
+ return x - 0xA2 + 's';
+ case 0xC1 ... 0xC9:
+ return x - 0xC1 + 'A';
+ case 0xD1 ... 0xD9:
+ return x - 0xD1 + 'J';
+ case 0xE2 ... 0xE9:
+ return x - 0xE2 + 'S';
+ case 0xF0 ... 0xF9:
+ return x - 0xF0 + '0';
}
return ' ';
}
-EXPORT_SYMBOL(e2a);
-unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n)
+static unsigned char * __init strne2a(unsigned char *dest,
+ const unsigned char *src, size_t n)
{
int i;
^ permalink raw reply
* [PATCH 2/7] iseries: Move e2a()/strne2a() into their only caller
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <1152777121.430402.3949688126.qpush@concordia>
The ASCII -> EBCDIC functions, e2a() and strne2a() are now only used in
dt.c, so move them in there.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/lib/Makefile | 1
arch/powerpc/lib/e2a.c | 116 ------------------------------------
arch/powerpc/platforms/iseries/dt.c | 98 ++++++++++++++++++++++++++++++
include/asm-powerpc/system.h | 5 -
4 files changed, 97 insertions(+), 123 deletions(-)
Index: to-merge/arch/powerpc/lib/Makefile
===================================================================
--- to-merge.orig/arch/powerpc/lib/Makefile
+++ to-merge/arch/powerpc/lib/Makefile
@@ -14,7 +14,6 @@ endif
obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
memcpy_64.o usercopy_64.o mem_64.o string.o \
strcase.o
-obj-$(CONFIG_PPC_ISERIES) += e2a.o
obj-$(CONFIG_XMON) += sstep.o
ifeq ($(CONFIG_PPC64),y)
Index: to-merge/arch/powerpc/lib/e2a.c
===================================================================
--- to-merge.orig/arch/powerpc/lib/e2a.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * EBCDIC to ASCII conversion
- *
- * This function moved here from arch/powerpc/platforms/iseries/viopath.c
- *
- * (C) Copyright 2000-2004 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) anyu 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
- *
- */
-
-#include <linux/module.h>
-
-unsigned char e2a(unsigned char x)
-{
- switch (x) {
- case 0xF0:
- return '0';
- case 0xF1:
- return '1';
- case 0xF2:
- return '2';
- case 0xF3:
- return '3';
- case 0xF4:
- return '4';
- case 0xF5:
- return '5';
- case 0xF6:
- return '6';
- case 0xF7:
- return '7';
- case 0xF8:
- return '8';
- case 0xF9:
- return '9';
- case 0xC1:
- return 'A';
- case 0xC2:
- return 'B';
- case 0xC3:
- return 'C';
- case 0xC4:
- return 'D';
- case 0xC5:
- return 'E';
- case 0xC6:
- return 'F';
- case 0xC7:
- return 'G';
- case 0xC8:
- return 'H';
- case 0xC9:
- return 'I';
- case 0xD1:
- return 'J';
- case 0xD2:
- return 'K';
- case 0xD3:
- return 'L';
- case 0xD4:
- return 'M';
- case 0xD5:
- return 'N';
- case 0xD6:
- return 'O';
- case 0xD7:
- return 'P';
- case 0xD8:
- return 'Q';
- case 0xD9:
- return 'R';
- case 0xE2:
- return 'S';
- case 0xE3:
- return 'T';
- case 0xE4:
- return 'U';
- case 0xE5:
- return 'V';
- case 0xE6:
- return 'W';
- case 0xE7:
- return 'X';
- case 0xE8:
- return 'Y';
- case 0xE9:
- return 'Z';
- }
- return ' ';
-}
-EXPORT_SYMBOL(e2a);
-
-unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n)
-{
- int i;
-
- n = strnlen(src, n);
-
- for (i = 0; i < n; i++)
- dest[i] = e2a(src[i]);
-
- return dest;
-}
Index: to-merge/arch/powerpc/platforms/iseries/dt.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/dt.c
+++ to-merge/arch/powerpc/platforms/iseries/dt.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2005-2006 Michael Ellerman, IBM Corporation
+ * Copyright (C) 2005-2006 Michael Ellerman, IBM Corporation
+ * Copyright (C) 2000-2004, IBM Corporation
*
* Description:
* This file contains all the routines to build a flattened device
@@ -76,6 +77,101 @@ static char __initdata device_type_pci[]
static char __initdata device_type_vdevice[] = "vdevice";
static char __initdata device_type_vscsi[] = "vscsi";
+
+/* EBCDIC to ASCII conversion routines */
+
+unsigned char e2a(unsigned char x)
+{
+ switch (x) {
+ case 0xF0:
+ return '0';
+ case 0xF1:
+ return '1';
+ case 0xF2:
+ return '2';
+ case 0xF3:
+ return '3';
+ case 0xF4:
+ return '4';
+ case 0xF5:
+ return '5';
+ case 0xF6:
+ return '6';
+ case 0xF7:
+ return '7';
+ case 0xF8:
+ return '8';
+ case 0xF9:
+ return '9';
+ case 0xC1:
+ return 'A';
+ case 0xC2:
+ return 'B';
+ case 0xC3:
+ return 'C';
+ case 0xC4:
+ return 'D';
+ case 0xC5:
+ return 'E';
+ case 0xC6:
+ return 'F';
+ case 0xC7:
+ return 'G';
+ case 0xC8:
+ return 'H';
+ case 0xC9:
+ return 'I';
+ case 0xD1:
+ return 'J';
+ case 0xD2:
+ return 'K';
+ case 0xD3:
+ return 'L';
+ case 0xD4:
+ return 'M';
+ case 0xD5:
+ return 'N';
+ case 0xD6:
+ return 'O';
+ case 0xD7:
+ return 'P';
+ case 0xD8:
+ return 'Q';
+ case 0xD9:
+ return 'R';
+ case 0xE2:
+ return 'S';
+ case 0xE3:
+ return 'T';
+ case 0xE4:
+ return 'U';
+ case 0xE5:
+ return 'V';
+ case 0xE6:
+ return 'W';
+ case 0xE7:
+ return 'X';
+ case 0xE8:
+ return 'Y';
+ case 0xE9:
+ return 'Z';
+ }
+ return ' ';
+}
+EXPORT_SYMBOL(e2a);
+
+unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n)
+{
+ int i;
+
+ n = strnlen(src, n);
+
+ for (i = 0; i < n; i++)
+ dest[i] = e2a(src[i]);
+
+ return dest;
+}
+
static struct iseries_flat_dt * __init dt_init(void)
{
struct iseries_flat_dt *dt;
Index: to-merge/include/asm-powerpc/system.h
===================================================================
--- to-merge.orig/include/asm-powerpc/system.h
+++ to-merge/include/asm-powerpc/system.h
@@ -169,11 +169,6 @@ extern u32 booke_wdt_enabled;
extern u32 booke_wdt_period;
#endif /* CONFIG_BOOKE_WDT */
-/* EBCDIC -> ASCII conversion for [0-9A-Z] on iSeries */
-extern unsigned char e2a(unsigned char);
-extern unsigned char* strne2a(unsigned char *dest,
- const unsigned char *src, size_t n);
-
struct device_node;
extern void note_scsi_host(struct device_node *, void *);
^ permalink raw reply
* [PATCH 1/7] iseries: Use device tree /system-id in /proc/iSeries/config
From: Michael Ellerman @ 2006-07-13 7:52 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
We export a bunch of info in /proc/iSeries/config. Currently we pull it
directly out of some iSeries specific structs, but we could use the device
tree instead, this saves decoding it twice and is a little neater.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/iseries/viopath.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
Index: to-merge/arch/powerpc/platforms/iseries/viopath.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/viopath.c
+++ to-merge/arch/powerpc/platforms/iseries/viopath.c
@@ -41,8 +41,8 @@
#include <asm/system.h>
#include <asm/uaccess.h>
+#include <asm/prom.h>
#include <asm/iseries/hv_types.h>
-#include <asm/iseries/it_exp_vpd_panel.h>
#include <asm/iseries/hv_lp_event.h>
#include <asm/iseries/hv_lp_config.h>
#include <asm/iseries/mf.h>
@@ -116,6 +116,7 @@ static int proc_viopath_show(struct seq_
dma_addr_t handle;
HvLpEvent_Rc hvrc;
DECLARE_MUTEX_LOCKED(Semaphore);
+ struct device_node *node;
buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL);
if (!buf)
@@ -143,20 +144,26 @@ static int proc_viopath_show(struct seq_
buf[HW_PAGE_SIZE-1] = '\0';
seq_printf(m, "%s", buf);
- seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap);
- seq_printf(m, "SRLNBR=%c%c%c%c%c%c%c\n",
- e2a(xItExtVpdPanel.mfgID[2]),
- e2a(xItExtVpdPanel.mfgID[3]),
- e2a(xItExtVpdPanel.systemSerial[1]),
- e2a(xItExtVpdPanel.systemSerial[2]),
- e2a(xItExtVpdPanel.systemSerial[3]),
- e2a(xItExtVpdPanel.systemSerial[4]),
- e2a(xItExtVpdPanel.systemSerial[5]));
dma_unmap_single(iSeries_vio_dev, handle, HW_PAGE_SIZE,
DMA_FROM_DEVICE);
kfree(buf);
+ seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap);
+
+ node = of_find_node_by_path("/");
+ buf = NULL;
+ if (node != NULL)
+ buf = get_property(node, "system-id", NULL);
+
+ if (buf == NULL)
+ seq_printf(m, "SRLNBR=<UNKNOWN>\n");
+ else
+ /* Skip "IBM," on front of serial number, see dt.c */
+ seq_printf(m, "SRLNBR=%s\n", buf + 4);
+
+ of_node_put(node);
+
return 0;
}
^ permalink raw reply
* Re: [PATCH] powerpc: simplify dma_ops bug conditions
From: Muli Ben-Yehuda @ 2006-07-13 6:39 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev
In-Reply-To: <20060713063252.1D35867B58@ozlabs.org>
On Thu, Jul 13, 2006 at 04:32:52PM +1000, Jeremy Kerr wrote:
> Use BUG_ON rather than BUG to simplify the dma_ops handing,
> and remove the now-unnecessary return cases.
>
> Booted on pseries.
Is the BUG_ON() necessary? the next line just goes and deref's it,
which should lead to a shiny NULL pointer deref.
Cheers,
Muli
^ permalink raw reply
* [PATCH] powerpc: simplify dma_ops bug conditions
From: Jeremy Kerr @ 2006-07-13 6:32 UTC (permalink / raw)
To: linuxppc-dev
Use BUG_ON rather than BUG to simplify the dma_ops handing,
and remove the now-unnecessary return cases.
Booted on pseries.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
dma_64.c | 65 +++++++++++++++++++++++++++------------------------------------
1 file changed, 28 insertions(+), 37 deletions(-)
Index: linux-2.6/arch/powerpc/kernel/dma_64.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/dma_64.c
+++ linux-2.6/arch/powerpc/kernel/dma_64.c
@@ -35,10 +35,9 @@ int dma_supported(struct device *dev, u6
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- return dma_ops->dma_supported(dev, mask);
- BUG();
- return 0;
+ BUG_ON(!dma_ops);
+
+ return dma_ops->dma_supported(dev, mask);
}
EXPORT_SYMBOL(dma_supported);
@@ -66,10 +65,9 @@ void *dma_alloc_coherent(struct device *
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- return dma_ops->alloc_coherent(dev, size, dma_handle, flag);
- BUG();
- return NULL;
+ BUG_ON(!dma_ops);
+
+ return dma_ops->alloc_coherent(dev, size, dma_handle, flag);
}
EXPORT_SYMBOL(dma_alloc_coherent);
@@ -78,10 +76,9 @@ void dma_free_coherent(struct device *de
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
- else
- BUG();
+ BUG_ON(!dma_ops);
+
+ dma_ops->free_coherent(dev, size, cpu_addr, dma_handle);
}
EXPORT_SYMBOL(dma_free_coherent);
@@ -90,10 +87,9 @@ dma_addr_t dma_map_single(struct device
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- return dma_ops->map_single(dev, cpu_addr, size, direction);
- BUG();
- return (dma_addr_t)0;
+ BUG_ON(!dma_ops);
+
+ return dma_ops->map_single(dev, cpu_addr, size, direction);
}
EXPORT_SYMBOL(dma_map_single);
@@ -102,10 +98,9 @@ void dma_unmap_single(struct device *dev
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- dma_ops->unmap_single(dev, dma_addr, size, direction);
- else
- BUG();
+ BUG_ON(!dma_ops);
+
+ dma_ops->unmap_single(dev, dma_addr, size, direction);
}
EXPORT_SYMBOL(dma_unmap_single);
@@ -115,11 +110,10 @@ dma_addr_t dma_map_page(struct device *d
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- return dma_ops->map_single(dev,
- (page_address(page) + offset), size, direction);
- BUG();
- return (dma_addr_t)0;
+ BUG_ON(!dma_ops);
+
+ return dma_ops->map_single(dev, page_address(page) + offset, size,
+ direction);
}
EXPORT_SYMBOL(dma_map_page);
@@ -128,10 +122,9 @@ void dma_unmap_page(struct device *dev,
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- dma_ops->unmap_single(dev, dma_address, size, direction);
- else
- BUG();
+ BUG_ON(!dma_ops);
+
+ dma_ops->unmap_single(dev, dma_address, size, direction);
}
EXPORT_SYMBOL(dma_unmap_page);
@@ -140,10 +133,9 @@ int dma_map_sg(struct device *dev, struc
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- return dma_ops->map_sg(dev, sg, nents, direction);
- BUG();
- return 0;
+ BUG_ON(!dma_ops);
+
+ return dma_ops->map_sg(dev, sg, nents, direction);
}
EXPORT_SYMBOL(dma_map_sg);
@@ -152,9 +144,8 @@ void dma_unmap_sg(struct device *dev, st
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
- if (dma_ops)
- dma_ops->unmap_sg(dev, sg, nhwentries, direction);
- else
- BUG();
+ BUG_ON(!dma_ops);
+
+ dma_ops->unmap_sg(dev, sg, nhwentries, direction);
}
EXPORT_SYMBOL(dma_unmap_sg);
^ permalink raw reply
* Problem in PCI resource allocation with MPC8245
From: Kenny @ 2006-07-13 3:40 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I have a Freescale MPC8245 machine running Montavista Linux (kernel 2.4.20).
There are two devices connected to the PCI bus:
a USB host controller (VIA VT6212L) and a single-chip network switch
(Broadcom BCM5650).
Now BCM5650 is working but VT6212L is not.
I tried to modify the PCI code but met some problems.
Here are the PCI information and boot message:
Bus 0, device 0, devfn 0 (id 1057-0006, headertype 0x00)
region 0: mask 0x00000008, now at 0x00000000
region 0: type mem, size 0 (0MB)
region 1: mask 0xfffff000, now at 0x00000000
region 1: type mem, size 4096 (4KB)
region 2: mask 0x00000008, now at 0x00000000
region 2: type mem, size 0 (0MB)
Bus 0, device 16, devfn 0 (id 14e4-5650, headertype 0x00) <-- BCM5650
region 0: mask 0xffff0004, now at 0xbfff0000
region 0: type mem, size 65536 (64KB)
region 1: mask 0x000000ff, now at 0x00000000
region 1: type I/O, size 65284 (65284B)
Bus 0, device 17, devfn 0 (id 1106-3038, headertype 0x00) <-- VT6212L
(UHCI 1)
region 4: mask 0xffffffe1, now at 0x00bfffe0
region 4: type I/O, size 32 (32B)
Bus 0, device 17, devfn 1 (id 1106-3038, headertype 0x00) <-- VT6212L
(UHCI 2)
region 4: mask 0xffffffe1, now at 0x00bfffc0
region 4: type I/O, size 32 (32B)
Bus 0, device 17, devfn 2 (id 1106-3104, headertype 0x00) <-- VT6212L
(EHCI)
region 0: mask 0xffffff00, now at 0xbffeff00
region 0: type mem, size 256 (256B)
--
PCI: Probing PCI hardware
PCI:00:00.0 Resource 0 [00000000-ffffffff] is unassigned
PCI:00:00.0 Resource 1 [00000000-00000fff] is unassigned
PCI:00:00.0 Resource 2 [00000000-ffffffff] is unassigned
PCI: bridge rsrc 0..bfffff (100), parent c0179de4
PCI: bridge rsrc 80000000..fcffffff (200), parent c0179e00
PCI:00:10.0: Resource 0: bfff0000-bfffffff (f=204) <-- BCM5650
PCI:00:11.0: Resource 4: 00bfffe0-00bfffff (f=101) <-- VT6212L (UHCI 1)
PCI:00:11.1: Resource 4: 00bfffc0-00bfffdf (f=101) <-- VT6212L (UHCI 2)
PCI:00:11.2: Resource 0: bffeff00-bffeffff (f=200) <-- VT6212L (EHCI)
--
It seems no problem with the allocated resource regions for VT6212L, but I
got "Timeout" message printed by USB driver.
So, I modify the function "mpc10x_bridge_set_resources" in
"arch/ppc/kernel/mpc10x_common.c":
case MPC10X_MEM_MAP_B:
pci_init_resource(&hose->io_resource,
0x00000000,
0xffff, /*
original value: 0x00bfffff, */
IORESOURCE_IO,
"PCI host bridge");
--
and the defination of MPC10X_MAPB_PCI_IO_END in "include/asm/mpc10x.h":
#define MPC10X_MAPB_PCI_IO_END (0x00010000 - 1) /* original
value: (0x00c00000 - 1) */
--
After modification, the USB 1.x driver (UHCI) is working, and EHCI is still
not working.
BUT I don't know why the UHCI works if I do the above modification?
The PCI information after modification is shown below:
Bus 0, device 17, function 0:
Class 0c03: PCI device 1106:3038 (rev 97).
IRQ 1.
Master Capable. Latency=128.
I/O at 0xffe0 [0xffff]. <-- I/O change to
0xffe0
Bus 0, device 17, function 1:
Class 0c03: PCI device 1106:3038 (rev 97).
IRQ 1.
Master Capable. Latency=128.
I/O at 0xffc0 [0xffdf]. <-- I/O change to
0xffc0
Bus 0, device 17, function 2:
Class 0c03: PCI device 1106:3104 (rev 99).
IRQ 1.
Master Capable. Latency=128.
Non-prefetchable 32 bit memory at 0xbffeff00 [0xbffeffff].
--
I do the modification for the PCI memory configuration similar to the
modification for PCI I/O configuration:
[arch/ppc/kernel/mpc10x_common.c]
case MPC10X_MEM_MAP_B:
... snipped
pci_init_resource (&hose->mem_resources[0],
0x00000000, /*
original value: 0x80000000, */
0x000fffff, /*
original value: 0xfcffffff, */
IORESOURCE_MEM,
"PCI host bridge");
--
[include/asm/mpc10x.h]
#define MPC10X_MAPB_ISA_MEM_BASE 0x00000000 /* original value:
0x80000000 */
... snipped
#define MPC10X_MAPB_PCI_MEM_START 0x00000000 /* original value:
0x80000000 */
#define MPC10X_MAPB_PCI_MEM_END (0x00100000 - 1) /* original value:
(0xC0000000 - 1) */
--
Surprisingly, after this modification, the USB2.0 driver (EHCI) can work.
BUT, the BCM5650 driver failed...
Here are the PCI information and boot message:
Bus 0, device 16, function 0:
Class 0280: PCI device 14e4:5650 (rev 17).
Master Capable. Latency=128.
Non-prefetchable 64 bit memory at 0xf0000 [0xfffff]. <-- BCM5650 PCI
memory address change to 0xf0000
Bus 0, device 17, function 0:
Class 0c03: PCI device 1106:3038 (rev 97).
IRQ 1.
Master Capable. Latency=128.
I/O at 0xffe0 [0xffff].
Bus 0, device 17, function 1:
Class 0c03: PCI device 1106:3038 (rev 97).
IRQ 1.
Master Capable. Latency=128.
I/O at 0xffc0 [0xffdf].
Bus 0, device 17, function 2:
Class 0c03: PCI device 1106:3104 (rev 99).
IRQ 1.
Master Capable. Latency=128.
Non-prefetchable 32 bit memory at 0xeff00 [0xeffff]. <-- EHCI PCI
memory address change to 0xeff00
--
PCI: bridge rsrc 0..ffff (100), parent c016fde4
PCI: bridge rsrc 0..fffff (200), parent c016fe00
PCI:00:10.0: Resource 0: 000f0000-000fffff (f=204)
PCI:00:11.0: Resource 4: 0000ffe0-0000ffff (f=101)
PCI:00:11.1: Resource 4: 0000ffc0-0000ffdf (f=101)
PCI:00:11.2: Resource 0: 000eff00-000effff (f=200)
--
And the failure message during inserting BCM5650 driver into kernel is:
__ioremap(): phys addr f0000 is RAM lr c0011db0
Oops: kernel access of bad area, sig: 11
NIP: C4881164 XER: 20000000 LR: C4887EDC SP: C3729C90 REGS: c3729be0 TRAP:
0300
Not tainted
MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 00000148, DSISR: 22000000
TASK = c3728000[109] 'insmod' Last syscall: 128
... snipped
--
I have really no idea about this problem because I'm pretty new to PowerPC
and PCI architecture :'(
(So I think my modification may not reasonable)
Can anyone help me solve this problem ?
Any pointers and help would be greatly appreciated.
Thank you!
Kenny
^ permalink raw reply
* re:Linux on Virtex4
From: Yoshio Kashiwagi @ 2006-07-13 2:00 UTC (permalink / raw)
To: Ale\x9A Gorki\xE8 , linuxppc-embedded
In-Reply-To: <6F0BA2FFAAB8204981CAE60F79FAD32A011B8E77@postar.fs.uni-lj.si>
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
Hi,
I am also operating Linux by Avnet V4FX12MM of a MPMC2+GSRD design.
However, V4FX and a PHY chips get very hot, and this design may
malfunction and may output oops.
Therefore, like an attached photo, my V4FX12MM applies a heat sink
and FAN, and is operating them.
Is it stabilizing and operating by your design?
Best Regards,
Yoshio Kashiwagi - Nissin Systems
> Hi Rick,
>
> I saw on linuxppc-embedded at ozlabs.org that you are trying to port
(or better you did) monta vista linux to Avnet's V4FX Mini-Module. I
will try to deal with the same thing. My design is basically the same:
all features of MM incorporated in CoreConnect style architecture. I
also tried with Multi Port Memory Controller (MPMC2) and ported (memory
works, but for LAN I still need phy datasheet) the Gigabit System
Reference Design (GSRD2) to Mini-Module.
> By using the MPMC2 memory core you can connect PPC directly to memory
using two PLBs (data and instruction separated). This way you might
solve the CPU cache errata. The problem with MPMC2 is that it consumes A
LOT of BRAM and logic. I tried to build a full featured system, but
V4FX12 lacks logic for the purpose.
> Is there a way that you can help me with running MV linux on my system?
>
> Cheers,
>
>
> Ales Gorkic
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
[-- Attachment #2: V4FX12MM.jpg --]
[-- Type: image/jpeg, Size: 30745 bytes --]
^ permalink raw reply
* Help: problem with gdb
From: Bizhan Gholikhamseh (bgholikh) @ 2006-07-12 21:47 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
HI,
We are running Linux 2.6.11 on our platform with MPC8541.
One of the application gets segmentation fault and creates core dump
upon exit.
I moved the core dump to the development environment and when I try to
run
gdb on the core dump I get the following gdb internal errors. If you
have
any idea to help I greatly apprieciate. Many thanks in advance,
[bizhan@vs ~]$ powerpc-linux-gdb app core.app.9707
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "--host=i386-pc-linux-gnu
--target=powerpc-linux"...
(no debugging symbols found)...
Core was generated by `/usr/local/bin/cma'.
Program terminated with signal 11, Segmentation fault.
../../../gdb-5.3/gdb/regcache.c:472: gdb-internal-error:
set_register_cached: Assertion `regnum <
current_regcache->descr->nr_raw_registers' failed.
An internal GDB error was detected. This may make further
debugging unreliable. Quit this debugging session? (y or n)
[-- Attachment #2: Type: text/html, Size: 2307 bytes --]
^ permalink raw reply
* ppc_8xx-addr2line on vmlinux
From: Antonio Di Bacco @ 2006-07-12 21:12 UTC (permalink / raw)
To: linuxppc-embedded
Anyone knows if it is possible to use the ppc_8xx-addr2line on the linux
kernel. I used the vmlinux but it didn't work.
Bye,
Antonio.
^ permalink raw reply
* sig 11 in hdlc_enet_rx
From: Antonio Di Bacco @ 2006-07-12 18:46 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I'm using the driver hdlc_enet.c in denx kernel 2.4.25 on a MPC880 using scc3.
I disabled ARP that causes a lot of packet losses but from time to time I
receive a kernel sig 11 in hdlc_enet_rx. I saw this behaviour when working
with ENET_BIG_BUFFERS. During the night I'm doing some tests with SMALL
BUFFERS. Anyone had the same problem?
Bye,
Antonio.
^ permalink raw reply
* Re: some problems on the SystemACE driver.
From: Ameet Patil @ 2006-07-12 18:22 UTC (permalink / raw)
To: Ming Liu; +Cc: akonovalov, linuxppc-embedded
In-Reply-To: <BAY110-F290517A86325ADABA1B020B2690@phx.gbl>
Hi Ming,
Thanks for testing the driver patch! The errors you get when
compiling both - SysAce and TEMAC are reasonable. My ignorance or call
it me being lazy. I recollect now... I was also working on the Xilinx
Ethernet driver and forgot to cleanup that code before creating the
patch for the SysAce driver. Thus, it so happens that code for the
ethernet driver in my patch also gets compiled along with the TEMAC. I
have deleted the unnecessary code files and updated the patch (name
changed). Find the new one here:
https://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.1.patch
Let me know if it works for you now?
-Ameet
Ming Liu wrote:
> Dear Ameet (and Andrei),
> I have tested the new patch for SystemACE driver. With respect to the
> single SystemACE driver, it works well. I can boot my linux in ML403
> board. (I tried both 2.6.16-rc5 and 2.6.17.1 versions) So first
> congratulations and thanks for your hard work!
>
> However, when I tried to implemented Temac (with and without SystemACE.
> TWO conditions.), some errors happened. Here is the compilation
> information:
>
> CC init/do_mounts.o
> LD init/mounts.o
> CC init/initramfs.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> drivers/built-in.o(.sdata+0x2c): multiple definition of `XWaitInAssert'
> arch/ppc/platforms/4xx/built-in.o(.sdata+0x0): first defined here
> drivers/built-in.o(.text+0x3e480): In function `XPacketFifoV200a_WriteDre':
> : multiple definition of `XPacketFifoV200a_WriteDre'
> arch/ppc/platforms/4xx/built-in.o(.text+0x1b14): first defined here
> drivers/built-in.o(.text+0x3e158): In function `XPacketFifoV200a_SelfTest':
> : multiple definition of `XPacketFifoV200a_SelfTest'
> arch/ppc/platforms/4xx/built-in.o(.text+0x17ec): first defined here
> drivers/built-in.o(.sbss+0x18c): multiple definition of `XAssertStatus'
> arch/ppc/platforms/4xx/built-in.o(.sbss+0x8): first defined here
> drivers/built-in.o(.text+0x3e798): In function `XPacketFifoV200a_L0Write':
> : multiple definition of `XPacketFifoV200a_L0Write'
> arch/ppc/platforms/4xx/built-in.o(.text+0x1e2c): first defined here
> drivers/built-in.o(.text+0x3e280): In function `XPacketFifoV200a_Read':
> : multiple definition of `XPacketFifoV200a_Read'
> arch/ppc/platforms/4xx/built-in.o(.text+0x1914): first defined here
> drivers/built-in.o(.text+0x3e55c): In function `XPacketFifoV200a_L0Read':
> : multiple definition of `XPacketFifoV200a_L0Read'
> arch/ppc/platforms/4xx/built-in.o(.text+0x1bf0): first defined here
> drivers/built-in.o(.text+0x3e380): In function `XPacketFifoV200a_Write':
> : multiple definition of `XPacketFifoV200a_Write'
> arch/ppc/platforms/4xx/built-in.o(.text+0x1a14): first defined here
> drivers/built-in.o(.text+0x3e0cc): In function `XAssertSetCallback':
> : multiple definition of `XAssertSetCallback'
> arch/ppc/platforms/4xx/built-in.o(.text+0x44): first defined here
> drivers/built-in.o(.text+0x3e9fc): In function
> `XPacketFifoV200a_L0WriteDre':
> : multiple definition of `XPacketFifoV200a_L0WriteDre'
> arch/ppc/platforms/4xx/built-in.o(.text+0x2090): first defined here
> drivers/built-in.o(.text+0x3e0dc): In function
> `XPacketFifoV200a_Initialize':
> : multiple definition of `XPacketFifoV200a_Initialize'
> arch/ppc/platforms/4xx/built-in.o(.text+0x1770): first defined here
> drivers/built-in.o(.text+0x3e088): In function `XAssert':
> : multiple definition of `XAssert'
> arch/ppc/platforms/4xx/built-in.o(.text+0x0): first defined here
> drivers/built-in.o(.text+0x3e0d8): In function `XNullHandler':
> : multiple definition of `XNullHandler'
> arch/ppc/platforms/4xx/built-in.o(.text+0x50): first defined here
> make: *** [.tmp_vmlinux1] Error 1
>
> It looks like that your patch affect some symbols which are used by
> Temac. (When I use the old patch for SystemACE, there is no problem like
> this if I only choose Temac. ) So let's find out the problem together.
> Also, I don't know if this is a problem from SystemACE or Temac , I
> would like to invite Andrei to look at this altogether. If any
> suggestion, please feel free to announce. Thanks for both your help.
> Regards
> Ming
>
>
>
>> From: Ameet Patil <ammubhai@gmail.com>
>> To: Ming Liu <eemingliu@hotmail.com>
>> CC: linuxppc-embedded@ozlabs.org
>> Subject: Re: some problems on the SystemACE driver.
>> Date: Wed, 12 Jul 2006 10:54:13 +0100
>>
>> Hi Ming,
>>
>> > I heard that you have tested this driver. Have you got this problem?
>> > Why there are so many strange problems for me while you have tested
>> > without problem?
>>
>> Yes, that is right! When I say... I have tested - "it really means I
>> have tested". So what's the problem? It works for me but not you? The
>> obvious difference: mine is a ML300 configuration and yours ML403.
>>
>> There were some files which unknowing were made dependant on ML300
>> target. I have now made them compile for both targets. It should work
>> fine for you now (Hopefully!). Download the updated patch from the same
>> location.
>>
>> http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17_sysace.patch
>>
>
>>
>> Since I don't have ML403 board, theres no way I can test this patch on
>> it. I rely on you in doing this... and thanks for letting me know the
>> issues.
>>
>> WARNING: There might be more issues. :-)
>>
>> Please DONOT hesitate to raise any issues with the driver. I am more
>> than happy to fix them.
>>
>> -Ameet
>>
>> Ming Liu wrote:
>> > Dear Ameet,
>> > Sorry to bother you again but I am totally confused on the systemACE
>> > driver. First let me show you the problem.
>> >
>> > 1. I downloaded the linux kernel of 2.6.17.1, also the patch for
>> > SystemACE driver. Applied the patch to the kernel. Replaced the
>> > xparameters_ml403.h with the generated file xparameters_ml300.h from
>> > Xilinx EDK. Make menuconfig, make dep and make zImage. Then the error
>> > shows like this:
>> >
>> > drivers/block/xilinx_sysace/xsysace.c:120:6: warning:
>> > "XPAR_XSYSACE_MEM_WIDTH" is not defined
>> > drivers/block/xilinx_sysace/xsysace.c: In function
> `XSysAce_LookupConfig':
>> > drivers/block/xilinx_sysace/xsysace.c:366: error:
>> > `XPAR_XSYSACE_NUM_INSTANCES' undeclared (first use in this function)
>> > drivers/block/xilinx_sysace/xsysace.c:366: error: (Each undeclared
>> > identifier is reported only once
>> > drivers/block/xilinx_sysace/xsysace.c:366: error: for each function it
>> > appears in.)
>> > make[3]: *** [drivers/block/xilinx_sysace/xsysace.o] Error 1
>> > make[2]: *** [drivers/block/xilinx_sysace] Error 2
>> > make[1]: *** [drivers/block] Error 2
>> > make: *** [drivers] Error 2
>> >
>> > I think this is because of the no inclusion of the xparameters header
>> > file. So I change #include "xparameters.h" into #include "
>> >
> /home/mingliu/linux-2.6.17.1/arch/ppc/platforms/4xx/xparameters/xparameters.h"
>
>
>> > in the files of xsysace.c and xsysace_g.c, using the full address to
>> > specify the header file. In fact, this is not a serious problem and it
>> > often happens. But, after the modification, another problem happened:
>> > GEN .version
>> > CHK include/linux/compile.h
>> > UPD include/linux/compile.h
>> > CC init/version.o
>> > LD init/built-in.o
>> > LD .tmp_vmlinux1
>> > drivers/built-in.o(.text+0x2234a): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x2235e): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x22364): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssert'
>> > drivers/built-in.o(.text+0x22372): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x2237a): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x22394): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssert'
>> > drivers/built-in.o(.text+0x223a2): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x223aa): In function `XSysAce_GetCfgAddr':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x22cd6): In function `XSysAce_Initialize':
>> > : undefined reference to `XAssertStatus'
>> > drivers/built-in.o(.text+0x22cdc): In function `XSysAce_Initialize':
>> > : undefined reference to `XAssert'
>> > drivers/built-in.o(.text+0x22cea): In function `XSysAce_Initialize':
>> > : undefined reference to `XAssertStatus'
>> >
>> > ......( a long information to say that undefined reference to the
>> > XAssert things.)
>> >
>> > Also, I tried this in the kernel 2.6.16-rc5. (In fact I prefer this
>> > version because the temac driver is for this version. ) The same
> problem
>> > happened. I checked the source code. The problem happened in the file
>> > driver/block/xilinx_sysace/adapter.c, etc. Also, the XAssert things are
>> > defined in the file arch/ppc/platforms/4xx/xilinx_ocp/xbasic_types.c.
>> > (In 2.6.16 kernel, it is also defined in
>> > driver/xilinx_edk/xbasic_types.c. There are two copies of this file. )
> I
>> > think the problem is, the systemACE files cannot link together with the
>> > xbasic_types.c file.
>> > I heard that you have tested this driver. Have you got this problem?
> Why
>> > there are so many strange problems for me while you have tested without
>> > problem? Without the CF card, I cannot try the Temac driver and my work
>> > is totally blocked. So I have to ask for your suggestion. Really
> anxious
>> > for your useful guidance. Thanks a lot!!!!!!
>> >
>> > Regards
>> > Ming
>> >
>> > _________________________________________________________________
>> > 与联机的朋友进行交流,请使用 MSN Messenger:
> http://messenger.msn.com/cn
>> >
>
> _________________________________________________________________
> 免费下载 MSN Explorer: http://explorer.msn.com/lccn/
>
^ permalink raw reply
* Re: [PATCH 0/3] powerpc: Instrument Hypervisor Calls
From: Mike Kravetz @ 2006-07-12 18:05 UTC (permalink / raw)
To: linuxppc-dev
Cc: Bryan Rosenburg, Christopher Yeoh, Nathan Lynch, Arnd Bergmann
In-Reply-To: <20060710203510.GA30793@w-mikek2.ibm.com>
On Mon, Jul 10, 2006 at 01:35:10PM -0700, Mike Kravetz wrote:
> #ifdef CONFIG_HCALL_STATS
> #define plpar_hcall_*() plpar_hcall_*_inst()
To answer my own question, this won't work because plpar_hcall_*()
routines are exported. So, marcros can't be used. Still thinking
about the best way to juggle function names for instrumentation.
--
Mike
^ permalink raw reply
* Re: some problems on the SystemACE driver.
From: Ming Liu @ 2006-07-12 15:55 UTC (permalink / raw)
To: ammubhai; +Cc: akonovalov, linuxppc-embedded
In-Reply-To: <44B4C6C5.1040007@gmail.com>
Dear Ameet (and Andrei),
I have tested the new patch for SystemACE driver. With respect to the
single SystemACE driver, it works well. I can boot my linux in ML403 board.
(I tried both 2.6.16-rc5 and 2.6.17.1 versions) So first congratulations
and thanks for your hard work!
However, when I tried to implemented Temac (with and without SystemACE. TWO
conditions.), some errors happened. Here is the compilation information:
CC init/do_mounts.o
LD init/mounts.o
CC init/initramfs.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o(.sdata+0x2c): multiple definition of `XWaitInAssert'
arch/ppc/platforms/4xx/built-in.o(.sdata+0x0): first defined here
drivers/built-in.o(.text+0x3e480): In function `XPacketFifoV200a_WriteDre':
: multiple definition of `XPacketFifoV200a_WriteDre'
arch/ppc/platforms/4xx/built-in.o(.text+0x1b14): first defined here
drivers/built-in.o(.text+0x3e158): In function `XPacketFifoV200a_SelfTest':
: multiple definition of `XPacketFifoV200a_SelfTest'
arch/ppc/platforms/4xx/built-in.o(.text+0x17ec): first defined here
drivers/built-in.o(.sbss+0x18c): multiple definition of `XAssertStatus'
arch/ppc/platforms/4xx/built-in.o(.sbss+0x8): first defined here
drivers/built-in.o(.text+0x3e798): In function `XPacketFifoV200a_L0Write':
: multiple definition of `XPacketFifoV200a_L0Write'
arch/ppc/platforms/4xx/built-in.o(.text+0x1e2c): first defined here
drivers/built-in.o(.text+0x3e280): In function `XPacketFifoV200a_Read':
: multiple definition of `XPacketFifoV200a_Read'
arch/ppc/platforms/4xx/built-in.o(.text+0x1914): first defined here
drivers/built-in.o(.text+0x3e55c): In function `XPacketFifoV200a_L0Read':
: multiple definition of `XPacketFifoV200a_L0Read'
arch/ppc/platforms/4xx/built-in.o(.text+0x1bf0): first defined here
drivers/built-in.o(.text+0x3e380): In function `XPacketFifoV200a_Write':
: multiple definition of `XPacketFifoV200a_Write'
arch/ppc/platforms/4xx/built-in.o(.text+0x1a14): first defined here
drivers/built-in.o(.text+0x3e0cc): In function `XAssertSetCallback':
: multiple definition of `XAssertSetCallback'
arch/ppc/platforms/4xx/built-in.o(.text+0x44): first defined here
drivers/built-in.o(.text+0x3e9fc): In function
`XPacketFifoV200a_L0WriteDre':
: multiple definition of `XPacketFifoV200a_L0WriteDre'
arch/ppc/platforms/4xx/built-in.o(.text+0x2090): first defined here
drivers/built-in.o(.text+0x3e0dc): In function
`XPacketFifoV200a_Initialize':
: multiple definition of `XPacketFifoV200a_Initialize'
arch/ppc/platforms/4xx/built-in.o(.text+0x1770): first defined here
drivers/built-in.o(.text+0x3e088): In function `XAssert':
: multiple definition of `XAssert'
arch/ppc/platforms/4xx/built-in.o(.text+0x0): first defined here
drivers/built-in.o(.text+0x3e0d8): In function `XNullHandler':
: multiple definition of `XNullHandler'
arch/ppc/platforms/4xx/built-in.o(.text+0x50): first defined here
make: *** [.tmp_vmlinux1] Error 1
It looks like that your patch affect some symbols which are used by Temac.
(When I use the old patch for SystemACE, there is no problem like this if I
only choose Temac. ) So let's find out the problem together. Also, I don't
know if this is a problem from SystemACE or Temac , I would like to invite
Andrei to look at this altogether. If any suggestion, please feel free to
announce. Thanks for both your help.
Regards
Ming
>From: Ameet Patil <ammubhai@gmail.com>
>To: Ming Liu <eemingliu@hotmail.com>
>CC: linuxppc-embedded@ozlabs.org
>Subject: Re: some problems on the SystemACE driver.
>Date: Wed, 12 Jul 2006 10:54:13 +0100
>
>Hi Ming,
>
> > I heard that you have tested this driver. Have you got this problem?
> > Why there are so many strange problems for me while you have tested
> > without problem?
>
>Yes, that is right! When I say... I have tested - "it really means I
>have tested". So what's the problem? It works for me but not you? The
>obvious difference: mine is a ML300 configuration and yours ML403.
>
>There were some files which unknowing were made dependant on ML300
>target. I have now made them compile for both targets. It should work
>fine for you now (Hopefully!). Download the updated patch from the same
>location.
>
>http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17_sysace.patch
>
>Since I don't have ML403 board, theres no way I can test this patch on
>it. I rely on you in doing this... and thanks for letting me know the
>issues.
>
>WARNING: There might be more issues. :-)
>
>Please DONOT hesitate to raise any issues with the driver. I am more
>than happy to fix them.
>
>-Ameet
>
>Ming Liu wrote:
> > Dear Ameet,
> > Sorry to bother you again but I am totally confused on the systemACE
> > driver. First let me show you the problem.
> >
> > 1. I downloaded the linux kernel of 2.6.17.1, also the patch for
> > SystemACE driver. Applied the patch to the kernel. Replaced the
> > xparameters_ml403.h with the generated file xparameters_ml300.h from
> > Xilinx EDK. Make menuconfig, make dep and make zImage. Then the error
> > shows like this:
> >
> > drivers/block/xilinx_sysace/xsysace.c:120:6: warning:
> > "XPAR_XSYSACE_MEM_WIDTH" is not defined
> > drivers/block/xilinx_sysace/xsysace.c: In function
`XSysAce_LookupConfig':
> > drivers/block/xilinx_sysace/xsysace.c:366: error:
> > `XPAR_XSYSACE_NUM_INSTANCES' undeclared (first use in this function)
> > drivers/block/xilinx_sysace/xsysace.c:366: error: (Each undeclared
> > identifier is reported only once
> > drivers/block/xilinx_sysace/xsysace.c:366: error: for each function it
> > appears in.)
> > make[3]: *** [drivers/block/xilinx_sysace/xsysace.o] Error 1
> > make[2]: *** [drivers/block/xilinx_sysace] Error 2
> > make[1]: *** [drivers/block] Error 2
> > make: *** [drivers] Error 2
> >
> > I think this is because of the no inclusion of the xparameters header
> > file. So I change #include "xparameters.h" into #include "
> >
/home/mingliu/linux-2.6.17.1/arch/ppc/platforms/4xx/xparameters/xparameters.h"
> > in the files of xsysace.c and xsysace_g.c, using the full address to
> > specify the header file. In fact, this is not a serious problem and it
> > often happens. But, after the modification, another problem happened:
> > GEN .version
> > CHK include/linux/compile.h
> > UPD include/linux/compile.h
> > CC init/version.o
> > LD init/built-in.o
> > LD .tmp_vmlinux1
> > drivers/built-in.o(.text+0x2234a): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x2235e): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x22364): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssert'
> > drivers/built-in.o(.text+0x22372): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x2237a): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x22394): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssert'
> > drivers/built-in.o(.text+0x223a2): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x223aa): In function `XSysAce_GetCfgAddr':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x22cd6): In function `XSysAce_Initialize':
> > : undefined reference to `XAssertStatus'
> > drivers/built-in.o(.text+0x22cdc): In function `XSysAce_Initialize':
> > : undefined reference to `XAssert'
> > drivers/built-in.o(.text+0x22cea): In function `XSysAce_Initialize':
> > : undefined reference to `XAssertStatus'
> >
> > ......( a long information to say that undefined reference to the
> > XAssert things.)
> >
> > Also, I tried this in the kernel 2.6.16-rc5. (In fact I prefer this
> > version because the temac driver is for this version. ) The same
problem
> > happened. I checked the source code. The problem happened in the file
> > driver/block/xilinx_sysace/adapter.c, etc. Also, the XAssert things are
> > defined in the file arch/ppc/platforms/4xx/xilinx_ocp/xbasic_types.c.
> > (In 2.6.16 kernel, it is also defined in
> > driver/xilinx_edk/xbasic_types.c. There are two copies of this file. )
I
> > think the problem is, the systemACE files cannot link together with the
> > xbasic_types.c file.
> > I heard that you have tested this driver. Have you got this problem?
Why
> > there are so many strange problems for me while you have tested without
> > problem? Without the CF card, I cannot try the Temac driver and my work
> > is totally blocked. So I have to ask for your suggestion. Really
anxious
> > for your useful guidance. Thanks a lot!!!!!!
> >
> > Regards
> > Ming
> >
> > _________________________________________________________________
> > 与联机的朋友进行交流,请使用 MSN Messenger:
http://messenger.msn.com/cn
> >
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/
^ permalink raw reply
* Re: weird behavior for jffs2 on PQ2FADS-VR board
From: Lei Sun @ 2006-07-12 14:38 UTC (permalink / raw)
To: Li Yang-r58472; +Cc: linuxppc-embedded
In-Reply-To: <4879B0C6C249214CBE7AB04453F84E4D0300BA@zch01exm20.fsl.freescale.net>
Hi Dave and Liu:
Thanks for your reply!
I will give it a try tonight, I did figure out it's endianess issue
last night, I wrote a little test program writting to /dev/mtd3 and
read it back, they got swapped !
lei
^ permalink raw reply
* Compatibility Problem between linux-2.4.25 and RedBoot
From: wei.li4 @ 2006-07-12 14:11 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <mailman.1562.1152709667.11183.linuxppc-embedded@ozlabs.org>
Hi All,
I am working on AdderII-MPC875 evaluation board(preinstalled RedBoot
Monitor) with Linux OS, I can use adderII_defconfig(in linux-2.4.25) to
compile and link to build up the image, and I can load it at
0x00380000, but it can't be executed. If I use its original image
coming with this board, it seems to relocate to another address from
0x00380000, and then decompress, execute, so is there anyone who can
help me figure it out? any suggestion? Thanks.
Wei
^ permalink raw reply
* Re: Problems of Compiling Kernel with linux-2.4.27 and linux-2.6.17 for PowerPC405EP Board
From: Jerry Van Baren @ 2006-07-12 13:49 UTC (permalink / raw)
To: Zhou Rui; +Cc: linuxppc-dev, der.herr, linuxppc-embedded
In-Reply-To: <20060712130102.40670.qmail@web15604.mail.cnb.yahoo.com>
Zhou Rui wrote:
> Hi,
> Yesterday I tried to compile kernel with linux-2.4.27 and linux-2.6.17
> for PowerPC405EP board. Both of the kernel images were created
> successfully, but when I tested them in ram from u-boot with NFS used.
> Both of the images could not booted from ram. The two kernel .config
> files are attached.
>
> For the 2.4.27 kernel, after running bootm in u-boot and "Uncompressing
> Kernel Image ... OK" printed on the screen. There are
> "vector: 200 at pc = c0197d4c, lr = c0197d40
> msr = 1030, sp = c0181fb0 [c0181f00]
> current = c0180020, pid = 0, comm = swapper
> mon>".
> It seemd the booting process had entered a monitor, but I didn't know
> what it was.
>
> For the 2.6.17 kernel, after running bootm in u-boot, the booting
> process stops at "Uncompressing Kernel Image ... OK". No other output
> after this sentence on the screen.
>
> Would you like to give some advice about this? Thanks a lot.
>
> Zhou Rui
> Distributed & Embedded System Lab
> School of Information Science & Engineering
> Lanzhou University, P. R. China
> http://dslab.lzu.edu.cn/~zr/
Exception 200 is "Machine Check". If you are getting this on linux
start up it is usually due to a double bus fault which is usually due to
a memory map problem. Silent boot failures are also often caused by
memory map problems... switching from physical memory mapping to virtual
(turning on the MMU).
gvb
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox