Commit 7ed2df0c authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64: use c99 initializers

This patch is just more clean up in the ppc64 arch.  It uses c99 initializers
for various iSeries structures that are used to pass information to the
hypervisor.  Also itLpNaca is not used by any code that could be in a module,
so don't export it.

Built and booted.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 19628d6b
...@@ -41,24 +41,22 @@ struct ItLpQueue xItLpQueue __attribute__((__section__(".data"))); ...@@ -41,24 +41,22 @@ struct ItLpQueue xItLpQueue __attribute__((__section__(".data")));
*/ */
struct HvReleaseData hvReleaseData = { struct HvReleaseData hvReleaseData = {
0xc8a5d9c4, /* desc = "HvRD" ebcdic */ .xDesc = 0xc8a5d9c4, /* "HvRD" ebcdic */
sizeof(struct HvReleaseData), .xSize = sizeof(struct HvReleaseData),
offsetof(struct naca_struct, xItVpdAreas), .xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas),
&naca, /* 64-bit Naca address */ .xSlicNacaAddr = &naca, /* 64-bit Naca address */
0x6000, /* offset of LparMap within loadarea (see head.S) */ .xMsNucDataOffset = 0x6000, /* offset of LparMap within loadarea (see head.S) */
0, .xTagsMode = 1, /* tags inactive */
1, /* tags inactive */ .xAddressSize = 0, /* 64 bit */
0, /* 64 bit */ .xNoSharedProcs = 0, /* shared processors */
0, /* shared processors */ .xNoHMT = 0, /* HMT allowed */
0, /* HMT allowed */ .xRsvd2 = 6, /* TEMP: This allows non-GA driver */
6, /* TEMP: This allows non-GA driver */ .xVrmIndex = 4, /* We are v5r2m0 */
4, /* We are v5r2m0 */ .xMinSupportedPlicVrmIndex = 3, /* v5r1m0 */
3, /* Min supported PLIC = v5r1m0 */ .xMinCompatablePlicVrmIndex = 3, /* v5r1m0 */
3, /* Min usable PLIC = v5r1m0 */ .xVrmName = { 0xd3, 0x89, 0x95, 0xa4, /* "Linux 2.4.64" ebcdic */
{ 0xd3, 0x89, 0x95, 0xa4, /* "Linux 2.4 "*/ 0xa7, 0x40, 0xf2, 0x4b,
0xa7, 0x40, 0xf2, 0x4b, 0xf4, 0x4b, 0xf6, 0xf4 },
0xf4, 0x4b, 0xf6, 0xf4 },
{0}
}; };
extern void SystemReset_Iseries(void); extern void SystemReset_Iseries(void);
...@@ -80,26 +78,33 @@ extern void DataAccessSLB_Iseries(void); ...@@ -80,26 +78,33 @@ extern void DataAccessSLB_Iseries(void);
extern void InstructionAccessSLB_Iseries(void); extern void InstructionAccessSLB_Iseries(void);
struct ItLpNaca itLpNaca = { struct ItLpNaca itLpNaca = {
0xd397d581, /* desc = "LpNa" ebcdic */ .xDesc = 0xd397d581, /* "LpNa" ebcdic */
0x0400, /* size of ItLpNaca */ .xSize = 0x0400, /* size of ItLpNaca */
0x0300, 19, /* offset to int array, # ents */ .xIntHdlrOffset = 0x0300, /* offset to int array */
0, 0, 0, /* Part # of primary, serv, me */ .xMaxIntHdlrEntries = 19, /* # ents */
0, 0x100, /* # of LP queues, offset */ .xPrimaryLpIndex = 0, /* Part # of primary */
0, 0, 0, /* Piranha stuff */ .xServiceLpIndex = 0, /* Part # of serv */
{ 0,0,0,0,0 }, /* reserved */ .xLpIndex = 0, /* Part # of me */
0,0,0,0,0,0,0, /* stuff */ .xMaxLpQueues = 0, /* # of LP queues */
{ 0,0,0,0,0 }, /* reserved */ .xLpQueueOffset = 0x100, /* offset of start of LP queues */
0, /* reserved */ .xPirEnvironMode = 0, /* Piranha stuff */
0, /* VRM index of PLIC */ .xPirConsoleMode = 0,
0, 0, /* min supported, compat SLIC */ .xPirDasdMode = 0,
0, /* 64-bit addr of load area */ .xLparInstalled = 0,
0, /* chunks for load area */ .xSysPartitioned = 0,
0, 0, /* PASE mask, seg table */ .xHwSyncedTBs = 0,
{ 0 }, /* 64 reserved bytes */ .xIntProcUtilHmt = 0,
{ 0 }, /* 128 reserved bytes */ .xSpVpdFormat = 0,
{ 0 }, /* Old LP Queue */ .xIntProcRatio = 0,
{ 0 }, /* 384 reserved bytes */ .xPlicVrmIndex = 0, /* VRM index of PLIC */
{ .xMinSupportedSlicVrmInd = 0, /* min supported SLIC */
.xMinCompatableSlicVrmInd = 0, /* min compat SLIC */
.xLoadAreaAddr = 0, /* 64-bit addr of load area */
.xLoadAreaChunks = 0, /* chunks for load area */
.xPaseSysCallCRMask = 0, /* PASE mask */
.xSlicSegmentTablePtr = 0, /* seg table */
.xOldLpQueue = { 0 }, /* Old LP Queue */
.xInterruptHdlr = {
(u64)SystemReset_Iseries, /* 0x100 System Reset */ (u64)SystemReset_Iseries, /* 0x100 System Reset */
(u64)MachineCheck_Iseries, /* 0x200 Machine Check */ (u64)MachineCheck_Iseries, /* 0x200 Machine Check */
(u64)DataAccess_Iseries, /* 0x300 Data Access */ (u64)DataAccess_Iseries, /* 0x300 Data Access */
...@@ -153,10 +158,8 @@ u64 xMsVpd[3400] __attribute__((__section__(".data"))); ...@@ -153,10 +158,8 @@ u64 xMsVpd[3400] __attribute__((__section__(".data")));
u64 xRecoveryLogBuffer[32] __attribute__((__section__(".data"))); u64 xRecoveryLogBuffer[32] __attribute__((__section__(".data")));
struct SpCommArea xSpCommArea = { struct SpCommArea xSpCommArea = {
0xE2D7C3C2, .xDesc = 0xE2D7C3C2,
1, .xFormat = 1,
{0},
0, 0, 0, 0, {0}
}; };
/* The LparMap data is now located at offset 0x6000 in head.S /* The LparMap data is now located at offset 0x6000 in head.S
...@@ -168,22 +171,21 @@ struct SpCommArea xSpCommArea = { ...@@ -168,22 +171,21 @@ struct SpCommArea xSpCommArea = {
* offset into the Naca of the pointer to the ItVpdAreas. * offset into the Naca of the pointer to the ItVpdAreas.
*/ */
struct ItVpdAreas itVpdAreas = { struct ItVpdAreas itVpdAreas = {
0xc9a3e5c1, /* "ItVA" */ .xSlicDesc = 0xc9a3e5c1, /* "ItVA" */
sizeof( struct ItVpdAreas ), .xSlicSize = sizeof(struct ItVpdAreas),
0, 0, .xSlicVpdEntries = ItVpdMaxEntries, /* # VPD array entries */
26, /* # VPD array entries */ .xSlicDmaEntries = ItDmaMaxEntries, /* # DMA array entries */
10, /* # DMA array entries */ .xSlicMaxLogicalProcs = NR_CPUS * 2, /* Max logical procs */
NR_CPUS*2, maxPhysicalProcessors, /* Max logical, physical procs */ .xSlicMaxPhysicalProcs = maxPhysicalProcessors, /* Max physical procs */
offsetof(struct ItVpdAreas,xPlicDmaToks),/* offset to DMA toks */ .xSlicDmaToksOffset = offsetof(struct ItVpdAreas, xPlicDmaToks),
offsetof(struct ItVpdAreas,xSlicVpdAdrs),/* offset to VPD addrs */ .xSlicVpdAdrsOffset = offsetof(struct ItVpdAreas, xSlicVpdAdrs),
offsetof(struct ItVpdAreas,xPlicDmaLens),/* offset to DMA lens */ .xSlicDmaLensOffset = offsetof(struct ItVpdAreas, xPlicDmaLens),
offsetof(struct ItVpdAreas,xSlicVpdLens),/* offset to VPD lens */ .xSlicVpdLensOffset = offsetof(struct ItVpdAreas, xSlicVpdLens),
0, /* max slot labels */ .xSlicMaxSlotLabels = 0, /* max slot labels */
1, /* max LP queues */ .xSlicMaxLpQueues = 1, /* max LP queues */
{0}, {0}, /* reserved */ .xPlicDmaLens = { 0 }, /* DMA lengths */
{0}, /* DMA lengths */ .xPlicDmaToks = { 0 }, /* DMA tokens */
{0}, /* DMA tokens */ .xSlicVpdLens = { /* VPD lengths */
{ /* VPD lengths */
0,0,0, /* 0 - 2 */ 0,0,0, /* 0 - 2 */
sizeof(xItExtVpdPanel), /* 3 Extended VPD */ sizeof(xItExtVpdPanel), /* 3 Extended VPD */
sizeof(struct paca_struct), /* 4 length of Paca */ sizeof(struct paca_struct), /* 4 length of Paca */
...@@ -201,7 +203,7 @@ struct ItVpdAreas itVpdAreas = { ...@@ -201,7 +203,7 @@ struct ItVpdAreas itVpdAreas = {
sizeof(struct ItLpQueue),/* 23 length of Lp Queue */ sizeof(struct ItLpQueue),/* 23 length of Lp Queue */
0,0 /* 24 - 25 */ 0,0 /* 24 - 25 */
}, },
{ /* VPD addresses */ .xSlicVpdAdrs = { /* VPD addresses */
0,0,0, /* 0 - 2 */ 0,0,0, /* 0 - 2 */
&xItExtVpdPanel, /* 3 Extended VPD */ &xItExtVpdPanel, /* 3 Extended VPD */
&paca[0], /* 4 first Paca */ &paca[0], /* 4 first Paca */
......
...@@ -68,9 +68,6 @@ EXPORT_SYMBOL(strncmp); ...@@ -68,9 +68,6 @@ EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(__down_interruptible); EXPORT_SYMBOL(__down_interruptible);
EXPORT_SYMBOL(__up); EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__down); EXPORT_SYMBOL(__down);
#ifdef CONFIG_PPC_ISERIES
EXPORT_SYMBOL(itLpNaca);
#endif
EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(csum_partial_copy_generic);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment