From david at gibson.dropbear.id.au Sun Jan 2 09:33:45 2005 From: david at gibson.dropbear.id.au (David Gibson) Date: Sun, 2 Jan 2005 09:33:45 +1100 Subject: [PATCH] sparse fixes for cpu feature constants In-Reply-To: <1104381206.16694.38.camel@localhost.localdomain> References: <1104381206.16694.38.camel@localhost.localdomain> Message-ID: <20050101223345.GC2297@zax> On Wed, Dec 29, 2004 at 10:33:26PM -0600, Nathan Lynch wrote: > Hi- > > I've been playing around with sparse a little and saw that it gives a > lot of warnings like this: > > arch/ppc64/mm/init.c:755:35: warning: constant 0x0000020000000000 is so > big it is long > > It looks like we get such a warning for every expression of the form > "(cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE)" -- basically, > every time the code checks for a cpu feature. > > Following is an attempt to clean these up by defining the cpu feature > constants using the ASM_CONST macro from ppc64's page.h. I believe this > is consistent with the intentions for ASM_CONST's use. > > There's some fallout: > > flush_icache_range() was already using ASM_CONST on one of the > constants, so that is fixed up. > > switch_mm() uses a BEGIN_FTR_SECTION ... > END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) which gets broken by the change > since 0x0000000000000008UL winds up in the generated assembly. I > couldn't find the BEGIN/END_FTR_SECTION construct used in any other C > code, so I replaced this with the usual bitwise 'and' conditional (I > hope someone else will verify that this is equivalent :). > > So, does this look like the right thing to do? It eliminates 129 sparse > warnings from a defconfig 2.6.10 build. Hurrah! You beat me to it... > Index: 2.6.10/include/asm-ppc64/cputable.h > =================================================================== > +++ 2.6.10/include/asm-ppc64/cputable.h 2004-12-30 04:04:09.463979408 +0000 > @@ -16,6 +16,7 @@ > #define __ASM_PPC_CPUTABLE_H > > #include > +#include /* for ASM_CONST */ Have you double checked that this won't cause a nasty #include loop? The CPU constants are used in quite a few places, as is page.h -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist. NOT _the_ _other_ _way_ | _around_! http://www.ozlabs.org/people/dgibson From nathanl at austin.ibm.com Tue Jan 4 00:16:24 2005 From: nathanl at austin.ibm.com (Nathan Lynch) Date: Mon, 03 Jan 2005 07:16:24 -0600 Subject: [PATCH] sparse fixes for cpu feature constants In-Reply-To: <20050101223345.GC2297@zax> References: <1104381206.16694.38.camel@localhost.localdomain> <20050101223345.GC2297@zax> Message-ID: <1104758184.15200.6.camel@localhost.localdomain> On Sun, 2005-01-02 at 09:33 +1100, David Gibson wrote: > On Wed, Dec 29, 2004 at 10:33:26PM -0600, Nathan Lynch wrote: > > > > Index: 2.6.10/include/asm-ppc64/cputable.h > > =================================================================== > > +++ 2.6.10/include/asm-ppc64/cputable.h 2004-12-30 04:04:09.463979408 +0000 > > @@ -16,6 +16,7 @@ > > #define __ASM_PPC_CPUTABLE_H > > > > #include > > +#include /* for ASM_CONST */ > > Have you double checked that this won't cause a nasty #include loop? > The CPU constants are used in quite a few places, as is page.h I think it's ok -- page.h includes the following: - linux/config.h, which includes linux/autoconf.h - asm-ppc64/naca.h, which includes asm-ppc64/types.h and asm-ppc64/systemcfg.h. So I don't see any way that cputable.h could be pulled in before ASM_CONST is defined. Thanks, Nathan From jdl at freescale.com Tue Jan 4 05:56:39 2005 From: jdl at freescale.com (Jon Loeliger) Date: Mon, 03 Jan 2005 12:56:39 -0600 Subject: PATCH uninorth3 (G5) agp support In-Reply-To: <41D00564.6010507@free.fr> References: <41CEC6B0.5020106@free.fr> <1104137527.5615.20.camel@gaston> <41D00564.6010507@free.fr> Message-ID: <1104778599.14049.64.camel@cashmere.sps.mot.com> On Mon, 2004-12-27 at 06:51, Jerome Glisse wrote: > /* My understanding of UniNorth AGP as of UniNorth rev 1.0x, > * revision 1.5 (x4 AGP) may need further changes. > diff -Naur linux/include/linux/pci_ids.h linux-new/include/linux/pci_ids.h > --- linux/include/linux/pci_ids.h 2004-12-26 14:40:05.000000000 +0100 > +++ linux-new/include/linux/pci_ids.h 2004-12-27 13:40:50.121003792 +0100 > @@ -842,6 +842,7 @@ > #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032 > #define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033 > #define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034 > +#define PCI_DEVICE_ID_APPLE_U3_AGP 0x0059 > #define PCI_DEVICE_ID_APPLE_IPID_ATA100 0x003b > #define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e > #define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043 So, did 0x0033's symbol need to be spelled consistently too? NB: PCI_DEVIEC_ Thanks, jdl From david at gibson.dropbear.id.au Tue Jan 4 11:07:23 2005 From: david at gibson.dropbear.id.au (David Gibson) Date: Tue, 4 Jan 2005 11:07:23 +1100 Subject: [PATCH] sparse fixes for cpu feature constants In-Reply-To: <1104758184.15200.6.camel@localhost.localdomain> References: <1104381206.16694.38.camel@localhost.localdomain> <20050101223345.GC2297@zax> <1104758184.15200.6.camel@localhost.localdomain> Message-ID: <20050104000723.GB6745@zax> On Mon, Jan 03, 2005 at 07:16:24AM -0600, Nathan Lynch wrote: > On Sun, 2005-01-02 at 09:33 +1100, David Gibson wrote: > > On Wed, Dec 29, 2004 at 10:33:26PM -0600, Nathan Lynch wrote: > > > > > > Index: 2.6.10/include/asm-ppc64/cputable.h > > > =================================================================== > > > +++ 2.6.10/include/asm-ppc64/cputable.h 2004-12-30 04:04:09.463979408 +0000 > > > @@ -16,6 +16,7 @@ > > > #define __ASM_PPC_CPUTABLE_H > > > > > > #include > > > +#include /* for ASM_CONST */ > > > > Have you double checked that this won't cause a nasty #include loop? > > The CPU constants are used in quite a few places, as is page.h > > I think it's ok -- page.h includes the following: > > - linux/config.h, which includes linux/autoconf.h > > - asm-ppc64/naca.h, which includes asm-ppc64/types.h and > asm-ppc64/systemcfg.h. > > So I don't see any way that cputable.h could be pulled in before > ASM_CONST is defined. Ok, sounds good. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist. NOT _the_ _other_ _way_ | _around_! http://www.ozlabs.org/people/dgibson From sfr at canb.auug.org.au Tue Jan 4 14:53:56 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 14:53:56 +1100 Subject: PPC64 cleanups 0/11 Message-ID: <20050104145356.4d5333dd.sfr@canb.auug.org.au> Hi Andrew, The following series of patches are mainly just cleanups of the ppc64 code in order to eliminate the naca structure. In the end, the naca only exists for legacy iseries kernels. One of the more intrusive parts of these patches is the renaming of the fields of the lppaca structure to eliminate another set of StudyCaps. These patches (in total) have been built on iSeries, pSeries and pmac and booted on iSeries and pSeries. Please apply and send upstream. -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/340c1852/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:04:10 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:04:10 +1100 Subject: [PATCH 1/11] PPC64: Consolidate cache sizing variables In-Reply-To: <20050104145356.4d5333dd.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> Message-ID: <20050104150410.199b132e.sfr@canb.auug.org.au> Hi Andrew, This patch consolidates the variables that define the PPC64 cache sizes into a single structure (the were in the naca and the systemcfg structures). Those that were in the systemcfg structure are left there just because they are exported to user mode through /proc. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk/arch/ppc64/kernel/asm-offsets.c linus-bk-naca.1/arch/ppc64/kernel/asm-offsets.c --- linus-bk/arch/ppc64/kernel/asm-offsets.c 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/asm-offsets.c 2004-12-31 14:52:14.000000000 +1100 @@ -35,6 +35,7 @@ #include #include #include +#include #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -69,12 +70,12 @@ /* naca */ DEFINE(PACA, offsetof(struct naca_struct, paca)); - DEFINE(DCACHEL1LINESIZE, offsetof(struct systemcfg, dCacheL1LineSize)); - DEFINE(DCACHEL1LOGLINESIZE, offsetof(struct naca_struct, dCacheL1LogLineSize)); - DEFINE(DCACHEL1LINESPERPAGE, offsetof(struct naca_struct, dCacheL1LinesPerPage)); - DEFINE(ICACHEL1LINESIZE, offsetof(struct systemcfg, iCacheL1LineSize)); - DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct naca_struct, iCacheL1LogLineSize)); - DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct naca_struct, iCacheL1LinesPerPage)); + DEFINE(DCACHEL1LINESIZE, offsetof(struct ppc64_caches, dline_size)); + DEFINE(DCACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_dline_size)); + DEFINE(DCACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, dlines_per_page)); + DEFINE(ICACHEL1LINESIZE, offsetof(struct ppc64_caches, iline_size)); + DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_iline_size)); + DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page)); DEFINE(PLATFORM, offsetof(struct systemcfg, platform)); /* paca */ diff -ruN linus-bk/arch/ppc64/kernel/eeh.c linus-bk-naca.1/arch/ppc64/kernel/eeh.c --- linus-bk/arch/ppc64/kernel/eeh.c 2004-10-26 16:06:41.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/eeh.c 2004-12-31 14:52:14.000000000 +1100 @@ -32,6 +32,7 @@ #include #include #include +#include #include "pci.h" #undef DEBUG diff -ruN linus-bk/arch/ppc64/kernel/iSeries_setup.c linus-bk-naca.1/arch/ppc64/kernel/iSeries_setup.c --- linus-bk/arch/ppc64/kernel/iSeries_setup.c 2004-11-12 09:09:48.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/iSeries_setup.c 2004-12-31 14:52:14.000000000 +1100 @@ -44,6 +44,7 @@ #include "iSeries_setup.h" #include #include +#include #include #include #include @@ -560,33 +561,36 @@ unsigned int i, n; unsigned int procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex; - systemcfg->iCacheL1Size = - xIoHriProcessorVpd[procIx].xInstCacheSize * 1024; - systemcfg->iCacheL1LineSize = + systemcfg->icache_size = + ppc64_caches.isize = xIoHriProcessorVpd[procIx].xInstCacheSize * 1024; + systemcfg->icache_line_size = + ppc64_caches.iline_size = xIoHriProcessorVpd[procIx].xInstCacheOperandSize; - systemcfg->dCacheL1Size = + systemcfg->dcache_size = + ppc64_caches.dsize = xIoHriProcessorVpd[procIx].xDataL1CacheSizeKB * 1024; - systemcfg->dCacheL1LineSize = + systemcfg->dcache_line_size = + ppc64_caches.dline_size = xIoHriProcessorVpd[procIx].xDataCacheOperandSize; - naca->iCacheL1LinesPerPage = PAGE_SIZE / systemcfg->iCacheL1LineSize; - naca->dCacheL1LinesPerPage = PAGE_SIZE / systemcfg->dCacheL1LineSize; + ppc64_caches.ilines_per_page = PAGE_SIZE / ppc64_caches.iline_size; + ppc64_caches.dlines_per_page = PAGE_SIZE / ppc64_caches.dline_size; - i = systemcfg->iCacheL1LineSize; + i = ppc64_caches.iline_size; n = 0; while ((i = (i / 2))) ++n; - naca->iCacheL1LogLineSize = n; + ppc64_caches.log_iline_size = n; - i = systemcfg->dCacheL1LineSize; + i = ppc64_caches.dline_size; n = 0; while ((i = (i / 2))) ++n; - naca->dCacheL1LogLineSize = n; + ppc64_caches.log_dline_size = n; printk("D-cache line size = %d\n", - (unsigned int)systemcfg->dCacheL1LineSize); + (unsigned int)ppc64_caches.dline_size); printk("I-cache line size = %d\n", - (unsigned int)systemcfg->iCacheL1LineSize); + (unsigned int)ppc64_caches.iline_size); } /* diff -ruN linus-bk/arch/ppc64/kernel/idle.c linus-bk-naca.1/arch/ppc64/kernel/idle.c --- linus-bk/arch/ppc64/kernel/idle.c 2004-10-27 07:32:57.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/idle.c 2004-12-31 14:52:14.000000000 +1100 @@ -32,6 +32,7 @@ #include #include #include +#include extern void power4_idle(void); diff -ruN linus-bk/arch/ppc64/kernel/misc.S linus-bk-naca.1/arch/ppc64/kernel/misc.S --- linus-bk/arch/ppc64/kernel/misc.S 2004-11-12 09:09:48.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/misc.S 2004-12-31 14:52:14.000000000 +1100 @@ -189,6 +189,11 @@ isync blr + .section ".toc","aw" +PPC64_CACHES: + .tc ppc64_caches[TC],ppc64_caches + .section ".text" + /* * Write any modified data cache blocks out to memory * and invalidate the corresponding instruction cache blocks. @@ -207,11 +212,8 @@ * and in some cases i-cache and d-cache line sizes differ from * each other. */ - LOADADDR(r10,naca) /* Get Naca address */ - ld r10,0(r10) - LOADADDR(r11,systemcfg) /* Get systemcfg address */ - ld r11,0(r11) - lwz r7,DCACHEL1LINESIZE(r11)/* Get cache line size */ + ld r10,PPC64_CACHES at toc(r2) + lwz r7,DCACHEL1LINESIZE(r10)/* Get cache line size */ addi r5,r7,-1 andc r6,r3,r5 /* round low to line bdy */ subf r8,r6,r4 /* compute length */ @@ -227,7 +229,7 @@ /* Now invalidate the instruction cache */ - lwz r7,ICACHEL1LINESIZE(r11) /* Get Icache line size */ + lwz r7,ICACHEL1LINESIZE(r10) /* Get Icache line size */ addi r5,r7,-1 andc r6,r3,r5 /* round low to line bdy */ subf r8,r6,r4 /* compute length */ @@ -256,11 +258,8 @@ * * Different systems have different cache line sizes */ - LOADADDR(r10,naca) /* Get Naca address */ - ld r10,0(r10) - LOADADDR(r11,systemcfg) /* Get systemcfg address */ - ld r11,0(r11) - lwz r7,DCACHEL1LINESIZE(r11) /* Get dcache line size */ + ld r10,PPC64_CACHES at toc(r2) + lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */ addi r5,r7,-1 andc r6,r3,r5 /* round low to line bdy */ subf r8,r6,r4 /* compute length */ @@ -286,11 +285,8 @@ * flush all bytes from start to stop-1 inclusive */ _GLOBAL(flush_dcache_phys_range) - LOADADDR(r10,naca) /* Get Naca address */ - ld r10,0(r10) - LOADADDR(r11,systemcfg) /* Get systemcfg address */ - ld r11,0(r11) - lwz r7,DCACHEL1LINESIZE(r11) /* Get dcache line size */ + ld r10,PPC64_CACHES at toc(r2) + lwz r7,DCACHEL1LINESIZE(r10) /* Get dcache line size */ addi r5,r7,-1 andc r6,r3,r5 /* round low to line bdy */ subf r8,r6,r4 /* compute length */ @@ -332,13 +328,10 @@ */ /* Flush the dcache */ - LOADADDR(r7,naca) - ld r7,0(r7) - LOADADDR(r8,systemcfg) /* Get systemcfg address */ - ld r8,0(r8) + ld r7,PPC64_CACHES at toc(r2) clrrdi r3,r3,12 /* Page align */ lwz r4,DCACHEL1LINESPERPAGE(r7) /* Get # dcache lines per page */ - lwz r5,DCACHEL1LINESIZE(r8) /* Get dcache line size */ + lwz r5,DCACHEL1LINESIZE(r7) /* Get dcache line size */ mr r6,r3 mtctr r4 0: dcbst 0,r6 @@ -349,7 +342,7 @@ /* Now invalidate the icache */ lwz r4,ICACHEL1LINESPERPAGE(r7) /* Get # icache lines per page */ - lwz r5,ICACHEL1LINESIZE(r8) /* Get icache line size */ + lwz r5,ICACHEL1LINESIZE(r7) /* Get icache line size */ mtctr r4 1: icbi 0,r3 add r3,r3,r5 diff -ruN linus-bk/arch/ppc64/kernel/nvram.c linus-bk-naca.1/arch/ppc64/kernel/nvram.c --- linus-bk/arch/ppc64/kernel/nvram.c 2004-11-16 16:05:10.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/nvram.c 2004-12-31 14:52:14.000000000 +1100 @@ -31,6 +31,7 @@ #include #include #include +#include #undef DEBUG_NVRAM diff -ruN linus-bk/arch/ppc64/kernel/pSeries_iommu.c linus-bk-naca.1/arch/ppc64/kernel/pSeries_iommu.c --- linus-bk/arch/ppc64/kernel/pSeries_iommu.c 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/pSeries_iommu.c 2004-12-31 14:52:14.000000000 +1100 @@ -43,6 +43,7 @@ #include #include #include +#include #include "pci.h" diff -ruN linus-bk/arch/ppc64/kernel/pacaData.c linus-bk-naca.1/arch/ppc64/kernel/pacaData.c --- linus-bk/arch/ppc64/kernel/pacaData.c 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/pacaData.c 2004-12-31 14:52:14.000000000 +1100 @@ -10,6 +10,8 @@ #include #include #include +#include + #include #include #include @@ -20,7 +22,9 @@ #include struct naca_struct *naca; +EXPORT_SYMBOL(naca); struct systemcfg *systemcfg; +EXPORT_SYMBOL(systemcfg); /* This symbol is provided by the linker - let it fill in the paca * field correctly */ diff -ruN linus-bk/arch/ppc64/kernel/pmac_setup.c linus-bk-naca.1/arch/ppc64/kernel/pmac_setup.c --- linus-bk/arch/ppc64/kernel/pmac_setup.c 2004-10-25 18:18:33.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/pmac_setup.c 2004-12-31 14:52:14.000000000 +1100 @@ -70,6 +70,7 @@ #include #include #include +#include #include "pmac.h" #include "mpic.h" diff -ruN linus-bk/arch/ppc64/kernel/ppc_ksyms.c linus-bk-naca.1/arch/ppc64/kernel/ppc_ksyms.c --- linus-bk/arch/ppc64/kernel/ppc_ksyms.c 2004-10-21 07:17:18.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/ppc_ksyms.c 2004-12-31 14:52:14.000000000 +1100 @@ -67,7 +67,6 @@ EXPORT_SYMBOL(__down_interruptible); EXPORT_SYMBOL(__up); -EXPORT_SYMBOL(naca); EXPORT_SYMBOL(__down); #ifdef CONFIG_PPC_ISERIES EXPORT_SYMBOL(itLpNaca); @@ -162,4 +161,3 @@ EXPORT_SYMBOL(tb_ticks_per_usec); EXPORT_SYMBOL(paca); EXPORT_SYMBOL(cur_cpu_spec); -EXPORT_SYMBOL(systemcfg); diff -ruN linus-bk/arch/ppc64/kernel/rtas-proc.c linus-bk-naca.1/arch/ppc64/kernel/rtas-proc.c --- linus-bk/arch/ppc64/kernel/rtas-proc.c 2004-10-21 07:17:18.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/rtas-proc.c 2004-12-31 14:52:14.000000000 +1100 @@ -31,6 +31,7 @@ #include #include /* for ppc_md */ #include +#include /* Token for Sensors */ #define KEY_SWITCH 0x0001 diff -ruN linus-bk/arch/ppc64/kernel/rtas.c linus-bk-naca.1/arch/ppc64/kernel/rtas.c --- linus-bk/arch/ppc64/kernel/rtas.c 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/rtas.c 2004-12-31 14:52:14.000000000 +1100 @@ -29,6 +29,7 @@ #include #include #include +#include struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; diff -ruN linus-bk/arch/ppc64/kernel/rtasd.c linus-bk-naca.1/arch/ppc64/kernel/rtasd.c --- linus-bk/arch/ppc64/kernel/rtasd.c 2004-11-16 16:05:10.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/rtasd.c 2004-12-31 14:52:14.000000000 +1100 @@ -26,6 +26,7 @@ #include #include #include +#include #if 0 #define DEBUG(A...) printk(KERN_ERR A) diff -ruN linus-bk/arch/ppc64/kernel/setup.c linus-bk-naca.1/arch/ppc64/kernel/setup.c --- linus-bk/arch/ppc64/kernel/setup.c 2004-12-14 04:07:06.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/setup.c 2004-12-31 16:22:00.000000000 +1100 @@ -54,6 +54,7 @@ #include #include #include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -111,6 +112,8 @@ int boot_cpuid_phys = 0; dev_t boot_dev; +struct ppc64_caches ppc64_caches; + /* * These are used in binfmt_elf.c to put aux entries on the stack * for each elf executable being started. @@ -489,15 +492,15 @@ lsizep = (u32 *) get_property(np, dc, NULL); if (lsizep != NULL) lsize = *lsizep; - if (sizep == 0 || lsizep == 0) DBG("Argh, can't find dcache properties ! " "sizep: %p, lsizep: %p\n", sizep, lsizep); - systemcfg->dCacheL1Size = size; - systemcfg->dCacheL1LineSize = lsize; - naca->dCacheL1LogLineSize = __ilog2(lsize); - naca->dCacheL1LinesPerPage = PAGE_SIZE/(lsize); + systemcfg->dcache_size = ppc64_caches.dsize = size; + systemcfg->dcache_line_size = + ppc64_caches.dline_size = lsize; + ppc64_caches.log_dline_size = __ilog2(lsize); + ppc64_caches.dlines_per_page = PAGE_SIZE / lsize; size = 0; lsize = cur_cpu_spec->icache_bsize; @@ -511,11 +514,11 @@ DBG("Argh, can't find icache properties ! " "sizep: %p, lsizep: %p\n", sizep, lsizep); - systemcfg->iCacheL1Size = size; - systemcfg->iCacheL1LineSize = lsize; - naca->iCacheL1LogLineSize = __ilog2(lsize); - naca->iCacheL1LinesPerPage = PAGE_SIZE/(lsize); - + systemcfg->icache_size = ppc64_caches.isize = size; + systemcfg->icache_line_size = + ppc64_caches.iline_size = lsize; + ppc64_caches.log_iline_size = __ilog2(lsize); + ppc64_caches.ilines_per_page = PAGE_SIZE / lsize; } } @@ -664,8 +667,10 @@ printk("systemcfg->platform = 0x%x\n", systemcfg->platform); printk("systemcfg->processorCount = 0x%lx\n", systemcfg->processorCount); printk("systemcfg->physicalMemorySize = 0x%lx\n", systemcfg->physicalMemorySize); - printk("systemcfg->dCacheL1LineSize = 0x%x\n", systemcfg->dCacheL1LineSize); - printk("systemcfg->iCacheL1LineSize = 0x%x\n", systemcfg->iCacheL1LineSize); + printk("ppc64_caches.dcache_line_size = 0x%x\n", + ppc64_caches.dline_size); + printk("ppc64_caches.icache_line_size = 0x%x\n", + ppc64_caches.iline_size); printk("htab_data.htab = 0x%p\n", htab_data.htab); printk("htab_data.num_ptegs = 0x%lx\n", htab_data.htab_num_ptegs); printk("-----------------------------------------------------\n"); @@ -1000,8 +1005,8 @@ * Systems with OF can look in the properties on the cpu node(s) * for a possibly more accurate value. */ - dcache_bsize = systemcfg->dCacheL1LineSize; - icache_bsize = systemcfg->iCacheL1LineSize; + dcache_bsize = ppc64_caches.dline_size; + icache_bsize = ppc64_caches.iline_size; /* reboot on panic */ panic_timeout = 180; diff -ruN linus-bk/arch/ppc64/kernel/sys_ppc32.c linus-bk-naca.1/arch/ppc64/kernel/sys_ppc32.c --- linus-bk/arch/ppc64/kernel/sys_ppc32.c 2004-10-28 16:57:54.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/sys_ppc32.c 2004-12-31 14:52:14.000000000 +1100 @@ -73,6 +73,7 @@ #include #include #include +#include #include "pci.h" diff -ruN linus-bk/arch/ppc64/kernel/sysfs.c linus-bk-naca.1/arch/ppc64/kernel/sysfs.c --- linus-bk/arch/ppc64/kernel/sysfs.c 2004-11-16 16:05:10.000000000 +1100 +++ linus-bk-naca.1/arch/ppc64/kernel/sysfs.c 2004-12-31 14:52:14.000000000 +1100 @@ -13,6 +13,7 @@ #include #include #include +#include /* SMT stuff */ diff -ruN linus-bk/arch/ppc64/kernel/time.c linus-bk-naca.1/arch/ppc64/kernel/time.c --- linus-bk/arch/ppc64/kernel/time.c 2004-10-21 07:17:18.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/time.c 2004-12-31 14:52:14.000000000 +1100 @@ -66,6 +66,7 @@ #include #include #include +#include void smp_local_timer_interrupt(struct pt_regs *); diff -ruN linus-bk/arch/ppc64/kernel/traps.c linus-bk-naca.1/arch/ppc64/kernel/traps.c --- linus-bk/arch/ppc64/kernel/traps.c 2004-09-09 09:59:49.000000000 +1000 +++ linus-bk-naca.1/arch/ppc64/kernel/traps.c 2004-12-31 14:52:14.000000000 +1100 @@ -37,6 +37,7 @@ #include #include #include +#include #ifdef CONFIG_PPC_PSERIES /* This is true if we are using the firmware NMI handler (typically LPAR) */ diff -ruN linus-bk/include/asm-ppc64/cache.h linus-bk-naca.1/include/asm-ppc64/cache.h --- linus-bk/include/asm-ppc64/cache.h 2002-08-28 06:04:10.000000000 +1000 +++ linus-bk-naca.1/include/asm-ppc64/cache.h 2004-12-31 14:52:14.000000000 +1100 @@ -7,6 +7,8 @@ #ifndef __ARCH_PPC64_CACHE_H #define __ARCH_PPC64_CACHE_H +#include + /* bytes per L1 cache line */ #define L1_CACHE_SHIFT 7 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) @@ -14,4 +16,21 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */ +#ifndef __ASSEMBLY__ + +struct ppc64_caches { + u32 dsize; /* L1 d-cache size */ + u32 dline_size; /* L1 d-cache line size */ + u32 log_dline_size; + u32 dlines_per_page; + u32 isize; /* L1 i-cache size */ + u32 iline_size; /* L1 i-cache line size */ + u32 log_iline_size; + u32 ilines_per_page; +}; + +extern struct ppc64_caches ppc64_caches; + +#endif + #endif diff -ruN linus-bk/include/asm-ppc64/naca.h linus-bk-naca.1/include/asm-ppc64/naca.h --- linus-bk/include/asm-ppc64/naca.h 2004-09-16 21:51:58.000000000 +1000 +++ linus-bk-naca.1/include/asm-ppc64/naca.h 2004-12-31 14:52:14.000000000 +1100 @@ -16,11 +16,7 @@ #ifndef __ASSEMBLY__ struct naca_struct { - /*================================================================== - * Cache line 1: 0x0000 - 0x007F - * Kernel only data - undefined for user space - *================================================================== - */ + /* Kernel only data - undefined for user space */ void *xItVpdAreas; /* VPD Data 0x00 */ void *xRamDisk; /* iSeries ramdisk 0x08 */ u64 xRamDiskSize; /* In pages 0x10 */ @@ -32,12 +28,6 @@ u64 interrupt_controller; /* Type of int controller 0x40 */ u64 unused1; /* was SLB size in entries 0x48 */ u64 pftSize; /* Log 2 of page table size 0x50 */ - void *systemcfg; /* Pointer to systemcfg data 0x58 */ - u32 dCacheL1LogLineSize; /* L1 d-cache line size Log2 0x60 */ - u32 dCacheL1LinesPerPage; /* L1 d-cache lines / page 0x64 */ - u32 iCacheL1LogLineSize; /* L1 i-cache line size Log2 0x68 */ - u32 iCacheL1LinesPerPage; /* L1 i-cache lines / page 0x6c */ - u8 resv0[15]; /* Reserved 0x71 - 0x7F */ }; extern struct naca_struct *naca; diff -ruN linus-bk/include/asm-ppc64/page.h linus-bk-naca.1/include/asm-ppc64/page.h --- linus-bk/include/asm-ppc64/page.h 2004-10-29 07:03:22.000000000 +1000 +++ linus-bk-naca.1/include/asm-ppc64/page.h 2004-12-31 14:52:14.000000000 +1100 @@ -93,7 +93,7 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ -#include +#include #undef STRICT_MM_TYPECHECKS @@ -106,8 +106,8 @@ { unsigned long lines, line_size; - line_size = systemcfg->dCacheL1LineSize; - lines = naca->dCacheL1LinesPerPage; + line_size = ppc64_caches.dline_size; + lines = ppc64_caches.dlines_per_page; __asm__ __volatile__( "mtctr %1 # clear_page\n\ diff -ruN linus-bk/include/asm-ppc64/processor.h linus-bk-naca.1/include/asm-ppc64/processor.h --- linus-bk/include/asm-ppc64/processor.h 2004-12-29 18:05:40.000000000 +1100 +++ linus-bk-naca.1/include/asm-ppc64/processor.h 2004-12-31 15:01:17.000000000 +1100 @@ -19,6 +19,7 @@ #endif #include #include +#include /* Machine State Register (MSR) Fields */ #define MSR_SF_LG 63 /* Enable 64 bit mode */ diff -ruN linus-bk/include/asm-ppc64/systemcfg.h linus-bk-naca.1/include/asm-ppc64/systemcfg.h --- linus-bk/include/asm-ppc64/systemcfg.h 2004-09-29 08:25:16.000000000 +1000 +++ linus-bk-naca.1/include/asm-ppc64/systemcfg.h 2004-12-31 14:52:14.000000000 +1100 @@ -15,14 +15,6 @@ * End Change Activity */ - -#ifndef __KERNEL__ -#include -#include -#include -#include -#endif - /* * If the major version changes we are incompatible. * Minor version changes are a hint. @@ -50,10 +42,11 @@ __u64 tb_update_count; /* Timebase atomicity ctr 0x50 */ __u32 tz_minuteswest; /* Minutes west of Greenwich 0x58 */ __u32 tz_dsttime; /* Type of dst correction 0x5C */ - __u32 dCacheL1Size; /* L1 d-cache size 0x60 */ - __u32 dCacheL1LineSize; /* L1 d-cache line size 0x64 */ - __u32 iCacheL1Size; /* L1 i-cache size 0x68 */ - __u32 iCacheL1LineSize; /* L1 i-cache line size 0x6C */ + /* next four are no longer used except to be exported to /proc */ + __u32 dcache_size; /* L1 d-cache size 0x60 */ + __u32 dcache_line_size; /* L1 d-cache line size 0x64 */ + __u32 icache_size; /* L1 i-cache size 0x68 */ + __u32 icache_line_size; /* L1 i-cache line size 0x6C */ __u8 reserved0[3984]; /* Reserve rest of page 0x70 */ }; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/ee27c294/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:08:33 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:08:33 +1100 Subject: [PATCH 2/11] PPC64: remove the page table size from the naca In-Reply-To: <20050104150410.199b132e.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> Message-ID: <20050104150833.5d3f3722.sfr@canb.auug.org.au> Hi Andrew, This patch just removes the page table size field from the naca (and makes it ppc64_pft_size instead). Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.1/arch/ppc64/kernel/pSeries_lpar.c linus-bk-naca.2/arch/ppc64/kernel/pSeries_lpar.c --- linus-bk-naca.1/arch/ppc64/kernel/pSeries_lpar.c 2004-12-14 04:07:06.000000000 +1100 +++ linus-bk-naca.2/arch/ppc64/kernel/pSeries_lpar.c 2004-12-31 15:16:48.000000000 +1100 @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -368,7 +367,7 @@ static void pSeries_lpar_hptab_clear(void) { - unsigned long size_bytes = 1UL << naca->pftSize; + unsigned long size_bytes = 1UL << ppc64_pft_size; unsigned long hpte_count = size_bytes >> 4; unsigned long dummy1, dummy2; int i; diff -ruN linus-bk-naca.1/arch/ppc64/kernel/prom.c linus-bk-naca.2/arch/ppc64/kernel/prom.c --- linus-bk-naca.1/arch/ppc64/kernel/prom.c 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.2/arch/ppc64/kernel/prom.c 2004-12-31 14:52:56.000000000 +1100 @@ -844,12 +844,12 @@ /* On LPAR, look for the first ibm,pft-size property for the hash table size */ - if (systemcfg->platform == PLATFORM_PSERIES_LPAR && naca->pftSize == 0) { + if (systemcfg->platform == PLATFORM_PSERIES_LPAR && ppc64_pft_size == 0) { u32 *pft_size; pft_size = (u32 *)get_flat_dt_prop(node, "ibm,pft-size", NULL); if (pft_size != NULL) { /* pft_size[0] is the NUMA CEC cookie */ - naca->pftSize = pft_size[1]; + ppc64_pft_size = pft_size[1]; } } @@ -1018,7 +1018,7 @@ initial_boot_params = params; /* By default, hash size is not set */ - naca->pftSize = 0; + ppc64_pft_size = 0; /* Retreive various informations from the /chosen node of the * device-tree, including the platform type, initrd location and @@ -1047,7 +1047,7 @@ /* If hash size wasn't obtained above, we calculate it now based on * the total RAM size */ - if (naca->pftSize == 0) { + if (ppc64_pft_size == 0) { unsigned long rnd_mem_size, pteg_count; /* round mem_size up to next power of 2 */ @@ -1058,10 +1058,10 @@ /* # pages / 2 */ pteg_count = (rnd_mem_size >> (12 + 1)); - naca->pftSize = __ilog2(pteg_count << 7); + ppc64_pft_size = __ilog2(pteg_count << 7); } - DBG("Hash pftSize: %x\n", (int)naca->pftSize); + DBG("Hash pftSize: %x\n", (int)ppc64_pft_size); DBG(" <- early_init_devtree()\n"); } diff -ruN linus-bk-naca.1/arch/ppc64/kernel/setup.c linus-bk-naca.2/arch/ppc64/kernel/setup.c --- linus-bk-naca.1/arch/ppc64/kernel/setup.c 2004-12-31 16:22:00.000000000 +1100 +++ linus-bk-naca.2/arch/ppc64/kernel/setup.c 2004-12-31 16:22:49.000000000 +1100 @@ -55,6 +55,7 @@ #include #include #include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -111,6 +112,7 @@ int boot_cpuid = 0; int boot_cpuid_phys = 0; dev_t boot_dev; +u64 ppc64_pft_size; struct ppc64_caches ppc64_caches; @@ -660,7 +662,7 @@ printk("-----------------------------------------------------\n"); printk("naca = 0x%p\n", naca); - printk("naca->pftSize = 0x%lx\n", naca->pftSize); + printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); printk("naca->debug_switch = 0x%lx\n", naca->debug_switch); printk("naca->interrupt_controller = 0x%ld\n", naca->interrupt_controller); printk("systemcfg = 0x%p\n", systemcfg); diff -ruN linus-bk-naca.1/arch/ppc64/mm/hash_utils.c linus-bk-naca.2/arch/ppc64/mm/hash_utils.c --- linus-bk-naca.1/arch/ppc64/mm/hash_utils.c 2004-10-29 07:03:21.000000000 +1000 +++ linus-bk-naca.2/arch/ppc64/mm/hash_utils.c 2004-12-31 14:52:56.000000000 +1100 @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -147,7 +146,7 @@ * Calculate the required size of the htab. We want the number of * PTEGs to equal one half the number of real pages. */ - htab_size_bytes = 1UL << naca->pftSize; + htab_size_bytes = 1UL << ppc64_pft_size; pteg_count = htab_size_bytes >> 7; /* For debug, make the HTAB 1/8 as big as it normally would be. */ diff -ruN linus-bk-naca.1/include/asm-ppc64/naca.h linus-bk-naca.2/include/asm-ppc64/naca.h --- linus-bk-naca.1/include/asm-ppc64/naca.h 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.2/include/asm-ppc64/naca.h 2004-12-31 14:52:56.000000000 +1100 @@ -26,8 +26,6 @@ u64 log; /* Ptr to log buffer 0x30 */ u64 serialPortAddr; /* Phy addr of serial port 0x38 */ u64 interrupt_controller; /* Type of int controller 0x40 */ - u64 unused1; /* was SLB size in entries 0x48 */ - u64 pftSize; /* Log 2 of page table size 0x50 */ }; extern struct naca_struct *naca; diff -ruN linus-bk-naca.1/include/asm-ppc64/page.h linus-bk-naca.2/include/asm-ppc64/page.h --- linus-bk-naca.1/include/asm-ppc64/page.h 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.2/include/asm-ppc64/page.h 2004-12-31 14:52:56.000000000 +1100 @@ -183,6 +183,8 @@ extern int page_is_ram(unsigned long pfn); +extern u64 ppc64_pft_size; /* Log 2 of page table size */ + #endif /* __ASSEMBLY__ */ #ifdef MODULE -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/29fa9153/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:12:29 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:12:29 +1100 Subject: [PATCH 3/11] PPC64: remove interrupt_controller from naca In-Reply-To: <20050104150833.5d3f3722.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> Message-ID: <20050104151229.521e8083.sfr@canb.auug.org.au> Hi Andrew, This patch just moves the interrupt_controller field of the naca into a global variable. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.2/arch/ppc64/kernel/irq.c linus-bk-naca.3/arch/ppc64/kernel/irq.c --- linus-bk-naca.2/arch/ppc64/kernel/irq.c 2004-10-21 07:17:18.000000000 +1000 +++ linus-bk-naca.3/arch/ppc64/kernel/irq.c 2004-12-31 14:53:21.000000000 +1100 @@ -65,6 +65,7 @@ int __irq_offset_value; int ppc_spurious_interrupts; unsigned long lpevent_count; +u64 ppc64_interrupt_controller; int show_interrupts(struct seq_file *p, void *v) { @@ -360,7 +361,7 @@ unsigned int virq, first_virq; static int warned; - if (naca->interrupt_controller == IC_OPEN_PIC) + if (ppc64_interrupt_controller == IC_OPEN_PIC) return real_irq; /* no mapping for openpic (for now) */ /* don't map interrupts < MIN_VIRT_IRQ */ diff -ruN linus-bk-naca.2/arch/ppc64/kernel/maple_setup.c linus-bk-naca.3/arch/ppc64/kernel/maple_setup.c --- linus-bk-naca.2/arch/ppc64/kernel/maple_setup.c 2004-10-30 08:33:22.000000000 +1000 +++ linus-bk-naca.3/arch/ppc64/kernel/maple_setup.c 2004-12-31 14:53:21.000000000 +1100 @@ -155,7 +155,7 @@ } /* Setup interrupt mapping options */ - naca->interrupt_controller = IC_OPEN_PIC; + ppc64_interrupt_controller = IC_OPEN_PIC; DBG(" <- maple_init_early\n"); } diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pSeries_pci.c linus-bk-naca.3/arch/ppc64/kernel/pSeries_pci.c --- linus-bk-naca.2/arch/ppc64/kernel/pSeries_pci.c 2004-11-16 16:05:10.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/pSeries_pci.c 2004-12-31 14:53:21.000000000 +1100 @@ -353,7 +353,7 @@ unsigned int *opprop = NULL; struct device_node *root = of_find_node_by_path("/"); - if (naca->interrupt_controller == IC_OPEN_PIC) { + if (ppc64_interrupt_controller == IC_OPEN_PIC) { opprop = (unsigned int *)get_property(root, "platform-open-pic", NULL); } @@ -375,7 +375,7 @@ pci_process_bridge_OF_ranges(phb, node); pci_setup_phb_io(phb, index == 0); - if (naca->interrupt_controller == IC_OPEN_PIC && pSeries_mpic) { + if (ppc64_interrupt_controller == IC_OPEN_PIC && pSeries_mpic) { int addr = root_size_cells * (index + 2) - 1; mpic_assign_isu(pSeries_mpic, index, opprop[addr]); } diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pSeries_setup.c linus-bk-naca.3/arch/ppc64/kernel/pSeries_setup.c --- linus-bk-naca.2/arch/ppc64/kernel/pSeries_setup.c 2004-12-14 04:07:06.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/pSeries_setup.c 2004-12-31 15:22:17.000000000 +1100 @@ -196,7 +196,7 @@ static void __init pSeries_setup_arch(void) { /* Fixup ppc_md depending on the type of interrupt controller */ - if (naca->interrupt_controller == IC_OPEN_PIC) { + if (ppc64_interrupt_controller == IC_OPEN_PIC) { ppc_md.init_IRQ = pSeries_init_mpic; ppc_md.get_irq = mpic_get_irq; /* Allocate the mpic now, so that find_and_init_phbs() can @@ -308,13 +308,13 @@ * to properly parse the OF interrupt tree & do the virtual irq mapping */ __irq_offset_value = NUM_ISA_INTERRUPTS; - naca->interrupt_controller = IC_INVALID; + ppc64_interrupt_controller = IC_INVALID; for (np = NULL; (np = of_find_node_by_name(np, "interrupt-controller"));) { typep = (char *)get_property(np, "compatible", NULL); if (strstr(typep, "open-pic")) - naca->interrupt_controller = IC_OPEN_PIC; + ppc64_interrupt_controller = IC_OPEN_PIC; else if (strstr(typep, "ppc-xicp")) - naca->interrupt_controller = IC_PPC_XIC; + ppc64_interrupt_controller = IC_PPC_XIC; else printk("initialize_naca: failed to recognize" " interrupt-controller\n"); diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pSeries_smp.c linus-bk-naca.3/arch/ppc64/kernel/pSeries_smp.c --- linus-bk-naca.2/arch/ppc64/kernel/pSeries_smp.c 2004-12-14 04:07:06.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/pSeries_smp.c 2004-12-31 15:22:45.000000000 +1100 @@ -348,7 +348,7 @@ DBG(" -> smp_init_pSeries()\n"); - if (naca->interrupt_controller == IC_OPEN_PIC) + if (ppc64_interrupt_controller == IC_OPEN_PIC) smp_ops = &pSeries_mpic_smp_ops; else smp_ops = &pSeries_xics_smp_ops; diff -ruN linus-bk-naca.2/arch/ppc64/kernel/pmac_setup.c linus-bk-naca.3/arch/ppc64/kernel/pmac_setup.c --- linus-bk-naca.2/arch/ppc64/kernel/pmac_setup.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/pmac_setup.c 2004-12-31 14:53:21.000000000 +1100 @@ -70,7 +70,6 @@ #include #include #include -#include #include "pmac.h" #include "mpic.h" @@ -316,7 +315,7 @@ } /* Setup interrupt mapping options */ - naca->interrupt_controller = IC_OPEN_PIC; + ppc64_interrupt_controller = IC_OPEN_PIC; DBG(" <- pmac_init_early\n"); } diff -ruN linus-bk-naca.2/arch/ppc64/kernel/prom.c linus-bk-naca.3/arch/ppc64/kernel/prom.c --- linus-bk-naca.2/arch/ppc64/kernel/prom.c 2004-12-31 14:52:56.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/prom.c 2004-12-31 14:53:21.000000000 +1100 @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -557,7 +556,7 @@ DBG(" -> finish_device_tree\n"); - if (naca->interrupt_controller == IC_INVALID) { + if (ppc64_interrupt_controller == IC_INVALID) { DBG("failed to configure interrupt controller type\n"); panic("failed to configure interrupt controller type\n"); } diff -ruN linus-bk-naca.2/arch/ppc64/kernel/setup.c linus-bk-naca.3/arch/ppc64/kernel/setup.c --- linus-bk-naca.2/arch/ppc64/kernel/setup.c 2004-12-31 16:22:49.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/setup.c 2004-12-31 16:23:03.000000000 +1100 @@ -664,7 +664,7 @@ printk("naca = 0x%p\n", naca); printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); printk("naca->debug_switch = 0x%lx\n", naca->debug_switch); - printk("naca->interrupt_controller = 0x%ld\n", naca->interrupt_controller); + printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); printk("systemcfg = 0x%p\n", systemcfg); printk("systemcfg->platform = 0x%x\n", systemcfg->platform); printk("systemcfg->processorCount = 0x%lx\n", systemcfg->processorCount); diff -ruN linus-bk-naca.2/arch/ppc64/kernel/xics.c linus-bk-naca.3/arch/ppc64/kernel/xics.c --- linus-bk-naca.2/arch/ppc64/kernel/xics.c 2004-12-14 04:07:06.000000000 +1100 +++ linus-bk-naca.3/arch/ppc64/kernel/xics.c 2004-12-31 15:24:20.000000000 +1100 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -575,7 +574,7 @@ */ static int __init xics_setup_i8259(void) { - if (naca->interrupt_controller == IC_PPC_XIC && + if (ppc64_interrupt_controller == IC_PPC_XIC && xics_irq_8259_cascade != -1) { if (request_irq(irq_offset_up(xics_irq_8259_cascade), no_action, 0, "8259 cascade", NULL)) diff -ruN linus-bk-naca.2/include/asm-ppc64/naca.h linus-bk-naca.3/include/asm-ppc64/naca.h --- linus-bk-naca.2/include/asm-ppc64/naca.h 2004-12-31 14:52:56.000000000 +1100 +++ linus-bk-naca.3/include/asm-ppc64/naca.h 2004-12-31 14:53:21.000000000 +1100 @@ -25,7 +25,6 @@ u64 banner; /* Ptr to banner string 0x28 */ u64 log; /* Ptr to log buffer 0x30 */ u64 serialPortAddr; /* Phy addr of serial port 0x38 */ - u64 interrupt_controller; /* Type of int controller 0x40 */ }; extern struct naca_struct *naca; diff -ruN linus-bk-naca.2/include/asm-ppc64/processor.h linus-bk-naca.3/include/asm-ppc64/processor.h --- linus-bk-naca.2/include/asm-ppc64/processor.h 2004-12-31 15:01:17.000000000 +1100 +++ linus-bk-naca.3/include/asm-ppc64/processor.h 2004-12-31 15:25:17.000000000 +1100 @@ -484,6 +484,7 @@ #ifdef __KERNEL__ extern int have_of; +extern u64 ppc64_interrupt_controller; struct task_struct; void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp); -------------- next part -------------- A non-text attachment was scrubbed... Name: 00000000.mimetmp Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/d720c248/attachment.pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/d720c248/attachment-0001.pgp From sfr at canb.auug.org.au Tue Jan 4 15:19:06 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:19:06 +1100 Subject: [PATCH 4/11] PPC64: remove /proc/ppc64/{naca,paca/xx} In-Reply-To: <20050104151229.521e8083.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> Message-ID: <20050104151906.6e50f1d2.sfr@canb.auug.org.au> Hi Andrew, This patch removes the (unused) /proc entries for the naca and the (per cpu) pacas. Also it removes a lot of no longer necessary includes of . Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.3/arch/ppc64/kernel/iSeries_pci.c linus-bk-naca.4/arch/ppc64/kernel/iSeries_pci.c --- linus-bk-naca.3/arch/ppc64/kernel/iSeries_pci.c 2004-11-16 16:05:10.000000000 +1100 +++ linus-bk-naca.4/arch/ppc64/kernel/iSeries_pci.c 2004-12-10 16:26:54.000000000 +1100 @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/kernel/iSeries_proc.c linus-bk-naca.4/arch/ppc64/kernel/iSeries_proc.c --- linus-bk-naca.3/arch/ppc64/kernel/iSeries_proc.c 2004-10-22 07:00:21.000000000 +1000 +++ linus-bk-naca.4/arch/ppc64/kernel/iSeries_proc.c 2004-12-10 16:26:54.000000000 +1100 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/kernel/iSeries_smp.c linus-bk-naca.4/arch/ppc64/kernel/iSeries_smp.c --- linus-bk-naca.3/arch/ppc64/kernel/iSeries_smp.c 2004-10-30 08:33:22.000000000 +1000 +++ linus-bk-naca.4/arch/ppc64/kernel/iSeries_smp.c 2004-12-10 16:26:54.000000000 +1100 @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/kernel/pSeries_pci.c linus-bk-naca.4/arch/ppc64/kernel/pSeries_pci.c --- linus-bk-naca.3/arch/ppc64/kernel/pSeries_pci.c 2004-12-31 14:53:21.000000000 +1100 +++ linus-bk-naca.4/arch/ppc64/kernel/pSeries_pci.c 2004-12-10 16:26:54.000000000 +1100 @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/kernel/pSeries_smp.c linus-bk-naca.4/arch/ppc64/kernel/pSeries_smp.c --- linus-bk-naca.3/arch/ppc64/kernel/pSeries_smp.c 2004-12-31 15:22:45.000000000 +1100 +++ linus-bk-naca.4/arch/ppc64/kernel/pSeries_smp.c 2004-12-31 15:27:45.000000000 +1100 @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/kernel/pci_dn.c linus-bk-naca.4/arch/ppc64/kernel/pci_dn.c --- linus-bk-naca.3/arch/ppc64/kernel/pci_dn.c 2004-10-25 18:18:33.000000000 +1000 +++ linus-bk-naca.4/arch/ppc64/kernel/pci_dn.c 2004-12-10 16:26:54.000000000 +1100 @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "pci.h" diff -ruN linus-bk-naca.3/arch/ppc64/kernel/proc_ppc64.c linus-bk-naca.4/arch/ppc64/kernel/proc_ppc64.c --- linus-bk-naca.3/arch/ppc64/kernel/proc_ppc64.c 2004-10-27 07:32:57.000000000 +1000 +++ linus-bk-naca.4/arch/ppc64/kernel/proc_ppc64.c 2004-12-10 16:26:54.000000000 +1100 @@ -25,8 +25,6 @@ #include #include -#include -#include #include #include #include @@ -58,26 +56,6 @@ #endif /* - * NOTE: since paca data is always in flux the values will never be a - * consistant set. - */ -static void __init proc_create_paca(struct proc_dir_entry *dir, int num) -{ - struct proc_dir_entry *ent; - struct paca_struct *lpaca = paca + num; - char buf[16]; - - sprintf(buf, "%02x", num); - ent = create_proc_entry(buf, S_IRUSR, dir); - if (ent) { - ent->nlink = 1; - ent->data = lpaca; - ent->size = 4096; - ent->proc_fops = &page_map_fops; - } -} - -/* * Create the ppc64 and ppc64/rtas directories early. This allows us to * assume that they have been previously created in drivers. */ @@ -104,17 +82,8 @@ static int __init proc_ppc64_init(void) { - unsigned long i; struct proc_dir_entry *pde; - pde = create_proc_entry("ppc64/naca", S_IRUSR, NULL); - if (!pde) - return 1; - pde->nlink = 1; - pde->data = naca; - pde->size = 4096; - pde->proc_fops = &page_map_fops; - pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); if (!pde) return 1; @@ -123,13 +92,6 @@ pde->size = 4096; pde->proc_fops = &page_map_fops; - /* /proc/ppc64/paca/XX -- raw paca contents. Only readable to root */ - pde = proc_mkdir("ppc64/paca", NULL); - if (!pde) - return 1; - for_each_cpu(i) - proc_create_paca(pde, i); - #ifdef CONFIG_PPC_PSERIES if ((systemcfg->platform & PLATFORM_PSERIES)) proc_ppc64_create_ofdt(); diff -ruN linus-bk-naca.3/arch/ppc64/kernel/prom_init.c linus-bk-naca.4/arch/ppc64/kernel/prom_init.c --- linus-bk-naca.3/arch/ppc64/kernel/prom_init.c 2004-12-08 12:07:34.000000000 +1100 +++ linus-bk-naca.4/arch/ppc64/kernel/prom_init.c 2004-12-10 16:26:54.000000000 +1100 @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/kernel/smp.c linus-bk-naca.4/arch/ppc64/kernel/smp.c --- linus-bk-naca.3/arch/ppc64/kernel/smp.c 2004-12-14 04:07:06.000000000 +1100 +++ linus-bk-naca.4/arch/ppc64/kernel/smp.c 2004-12-31 15:29:14.000000000 +1100 @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/mm/init.c linus-bk-naca.4/arch/ppc64/mm/init.c --- linus-bk-naca.3/arch/ppc64/mm/init.c 2004-11-04 16:05:08.000000000 +1100 +++ linus-bk-naca.4/arch/ppc64/mm/init.c 2004-12-10 16:26:54.000000000 +1100 @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include diff -ruN linus-bk-naca.3/arch/ppc64/mm/slb.c linus-bk-naca.4/arch/ppc64/mm/slb.c --- linus-bk-naca.3/arch/ppc64/mm/slb.c 2004-09-06 10:19:04.000000000 +1000 +++ linus-bk-naca.4/arch/ppc64/mm/slb.c 2004-12-10 16:26:54.000000000 +1100 @@ -19,7 +19,6 @@ #include #include #include -#include #include extern void slb_allocate(unsigned long ea); diff -ruN linus-bk-naca.3/arch/ppc64/mm/stab.c linus-bk-naca.4/arch/ppc64/mm/stab.c --- linus-bk-naca.3/arch/ppc64/mm/stab.c 2004-09-16 21:51:57.000000000 +1000 +++ linus-bk-naca.4/arch/ppc64/mm/stab.c 2004-12-10 16:26:54.000000000 +1100 @@ -17,7 +17,6 @@ #include #include #include -#include #include /* Both the segment table and SLB code uses the following cache */ diff -ruN linus-bk-naca.3/include/asm-ppc64/iSeries/LparData.h linus-bk-naca.4/include/asm-ppc64/iSeries/LparData.h --- linus-bk-naca.3/include/asm-ppc64/iSeries/LparData.h 2002-09-18 12:00:50.000000000 +1000 +++ linus-bk-naca.4/include/asm-ppc64/iSeries/LparData.h 2004-12-10 16:26:54.000000000 +1100 @@ -24,11 +24,9 @@ #include #include -#include #include #include #include -#include #include #include #include -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/c799e8f4/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:23:40 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:23:40 +1100 Subject: [PATCH 5/11] PPC64: remove the paca pointer form the naca In-Reply-To: <20050104151906.6e50f1d2.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> Message-ID: <20050104152340.67219ccf.sfr@canb.auug.org.au> Hi Andrew, The only place that was using the paca pointer that was in the naca was some assembler that used it to find a parameter to pass to some C code. That C code did not even declare that parameter! Remove the paca pointer. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.4/arch/ppc64/kernel/asm-offsets.c linus-bk-naca.5/arch/ppc64/kernel/asm-offsets.c --- linus-bk-naca.4/arch/ppc64/kernel/asm-offsets.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.5/arch/ppc64/kernel/asm-offsets.c 2004-12-10 17:27:14.000000000 +1100 @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -68,8 +67,6 @@ #endif /* CONFIG_ALTIVEC */ DEFINE(MM, offsetof(struct task_struct, mm)); - /* naca */ - DEFINE(PACA, offsetof(struct naca_struct, paca)); DEFINE(DCACHEL1LINESIZE, offsetof(struct ppc64_caches, dline_size)); DEFINE(DCACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_dline_size)); DEFINE(DCACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, dlines_per_page)); diff -ruN linus-bk-naca.4/arch/ppc64/kernel/head.S linus-bk-naca.5/arch/ppc64/kernel/head.S --- linus-bk-naca.4/arch/ppc64/kernel/head.S 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.5/arch/ppc64/kernel/head.S 2004-12-10 18:40:24.000000000 +1100 @@ -517,12 +517,7 @@ __start_naca: #ifdef CONFIG_PPC_ISERIES .llong itVpdAreas -#else - .llong 0x0 #endif - .llong 0x0 - .llong 0x0 - .llong paca . = SYSTEMCFG_PHYS_ADDR .globl __end_naca @@ -1241,6 +1236,7 @@ #endif #endif b 3b /* Loop until told to go */ + #ifdef CONFIG_PPC_ISERIES _STATIC(__start_initialization_iSeries) /* Clear out the BSS */ @@ -1278,10 +1274,6 @@ SET_REG_TO_CONST(r4, NACA_VIRT_ADDR) std r4,0(r9) /* set the naca pointer */ - /* Get the pointer to the segment table */ - ld r6,PACA(r4) /* Get the base paca pointer */ - ld r4,PACASTABVIRT(r6) - bl .iSeries_early_setup /* relocation is on at this point */ diff -ruN linus-bk-naca.4/include/asm-ppc64/naca.h linus-bk-naca.5/include/asm-ppc64/naca.h --- linus-bk-naca.4/include/asm-ppc64/naca.h 2004-12-31 14:53:21.000000000 +1100 +++ linus-bk-naca.5/include/asm-ppc64/naca.h 2004-12-10 18:42:14.000000000 +1100 @@ -11,7 +11,6 @@ */ #include -#include #ifndef __ASSEMBLY__ @@ -20,7 +19,6 @@ void *xItVpdAreas; /* VPD Data 0x00 */ void *xRamDisk; /* iSeries ramdisk 0x08 */ u64 xRamDiskSize; /* In pages 0x10 */ - struct paca_struct *paca; /* Ptr to an array of pacas 0x18 */ u64 debug_switch; /* Debug print control 0x20 */ u64 banner; /* Ptr to banner string 0x28 */ u64 log; /* Ptr to log buffer 0x30 */ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/3e8e9116/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:27:05 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:27:05 +1100 Subject: [PATCH 6/11] PPC64: remove serialPortAddr from the naca In-Reply-To: <20050104152340.67219ccf.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> <20050104152340.67219ccf.sfr@canb.auug.org.au> Message-ID: <20050104152705.6030abc5.sfr@canb.auug.org.au> Hi Andrew, The serialPortAddr field of the naca was only being used locally, remove it. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.5/arch/ppc64/kernel/maple_setup.c linus-bk-naca.6/arch/ppc64/kernel/maple_setup.c --- linus-bk-naca.5/arch/ppc64/kernel/maple_setup.c 2004-12-31 14:53:21.000000000 +1100 +++ linus-bk-naca.6/arch/ppc64/kernel/maple_setup.c 2004-12-11 00:53:42.000000000 +1100 @@ -75,7 +75,8 @@ extern void maple_pci_init(void); extern void maple_pcibios_fixup(void); extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel); -extern void generic_find_legacy_serial_ports(unsigned int *default_speed); +extern void generic_find_legacy_serial_ports(u64 *physport, + unsigned int *default_speed); static void maple_restart(char *cmd) @@ -129,6 +130,7 @@ static void __init maple_init_early(void) { unsigned int default_speed; + u64 physport; DBG(" -> maple_init_early\n"); @@ -138,14 +140,14 @@ hpte_init_native(); /* Find the serial port */ - generic_find_legacy_serial_ports(&default_speed); + generic_find_legacy_serial_ports(&physport, &default_speed); - DBG("naca->serialPortAddr: %lx\n", (long)naca->serialPortAddr); + DBG("phys port addr: %lx\n", (long)physport); - if (naca->serialPortAddr) { + if (physport) { void *comport; /* Map the uart for udbg. */ - comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE); + comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE); udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; diff -ruN linus-bk-naca.5/arch/ppc64/kernel/pSeries_setup.c linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c --- linus-bk-naca.5/arch/ppc64/kernel/pSeries_setup.c 2004-12-31 15:22:17.000000000 +1100 +++ linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c 2004-12-31 15:35:13.000000000 +1100 @@ -81,7 +81,8 @@ extern int pSeries_set_rtc_time(struct rtc_time *rtc_time); extern void find_udbg_vterm(void); extern void SystemReset_FWNMI(void), MachineCheck_FWNMI(void); /* from head.S */ -extern void generic_find_legacy_serial_ports(unsigned int *default_speed); +extern void generic_find_legacy_serial_ports(u64 *physport, + unsigned int *default_speed); int fwnmi_active; /* TRUE if an FWNMI handler is present */ @@ -344,6 +345,7 @@ void *comport; int iommu_off = 0; unsigned int default_speed; + u64 physport; DBG(" -> pSeries_init_early()\n"); @@ -357,13 +359,13 @@ get_property(of_chosen, "linux,iommu-off", NULL)); } - generic_find_legacy_serial_ports(&default_speed); + generic_find_legacy_serial_ports(&physport, &default_speed); if (systemcfg->platform & PLATFORM_LPAR) find_udbg_vterm(); - else if (naca->serialPortAddr) { + else if (physport) { /* Map the uart for udbg. */ - comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE); + comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE); udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; diff -ruN linus-bk-naca.5/arch/ppc64/kernel/setup.c linus-bk-naca.6/arch/ppc64/kernel/setup.c --- linus-bk-naca.5/arch/ppc64/kernel/setup.c 2004-12-31 16:24:54.000000000 +1100 +++ linus-bk-naca.6/arch/ppc64/kernel/setup.c 2004-12-31 16:23:30.000000000 +1100 @@ -1154,7 +1154,8 @@ static struct plat_serial8250_port serial_ports[MAX_LEGACY_SERIAL_PORTS+1]; static unsigned int old_serial_count; -void __init generic_find_legacy_serial_ports(unsigned int *default_speed) +void __init generic_find_legacy_serial_ports(u64 *physport, + unsigned int *default_speed) { struct device_node *np; u32 *sizeprop; @@ -1172,7 +1173,7 @@ DBG(" -> generic_find_legacy_serial_port()\n"); - naca->serialPortAddr = 0; + *physport = 0; if (default_speed) *default_speed = 0; @@ -1294,7 +1295,7 @@ io_base = (io_base << 32) | rangesp[4]; } if (io_base != 0) { - naca->serialPortAddr = io_base + reg->address; + *physport = io_base + reg->address; if (default_speed && spd) *default_speed = *spd; } diff -ruN linus-bk-naca.5/include/asm-ppc64/naca.h linus-bk-naca.6/include/asm-ppc64/naca.h --- linus-bk-naca.5/include/asm-ppc64/naca.h 2004-12-10 18:42:14.000000000 +1100 +++ linus-bk-naca.6/include/asm-ppc64/naca.h 2004-12-11 00:03:55.000000000 +1100 @@ -22,7 +22,6 @@ u64 debug_switch; /* Debug print control 0x20 */ u64 banner; /* Ptr to banner string 0x28 */ u64 log; /* Ptr to log buffer 0x30 */ - u64 serialPortAddr; /* Phy addr of serial port 0x38 */ }; extern struct naca_struct *naca; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/e06bdbb4/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:31:02 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:31:02 +1100 Subject: [PATCH 7/11] PPC64: remove debug_switch from the naca In-Reply-To: <20050104152705.6030abc5.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> <20050104152340.67219ccf.sfr@canb.auug.org.au> <20050104152705.6030abc5.sfr@canb.auug.org.au> Message-ID: <20050104153102.67284491.sfr@canb.auug.org.au> Hi Andrew, The patch moves the debug_switch from the naca to a global variable. Also, a couple of trivial naming tidy ups. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c linus-bk-naca.7/arch/ppc64/kernel/pSeries_setup.c --- linus-bk-naca.6/arch/ppc64/kernel/pSeries_setup.c 2004-12-31 15:35:13.000000000 +1100 +++ linus-bk-naca.7/arch/ppc64/kernel/pSeries_setup.c 2004-12-31 15:39:01.000000000 +1100 @@ -56,7 +56,6 @@ #include #include #include -#include #include #include @@ -317,7 +316,7 @@ else if (strstr(typep, "ppc-xicp")) ppc64_interrupt_controller = IC_PPC_XIC; else - printk("initialize_naca: failed to recognize" + printk("pSeries_discover_pic: failed to recognize" " interrupt-controller\n"); break; } diff -ruN linus-bk-naca.6/arch/ppc64/kernel/setup.c linus-bk-naca.7/arch/ppc64/kernel/setup.c --- linus-bk-naca.6/arch/ppc64/kernel/setup.c 2004-12-31 16:23:30.000000000 +1100 +++ linus-bk-naca.7/arch/ppc64/kernel/setup.c 2004-12-31 16:25:02.000000000 +1100 @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -113,6 +112,7 @@ int boot_cpuid_phys = 0; dev_t boot_dev; u64 ppc64_pft_size; +u64 ppc64_debug_switch; struct ppc64_caches ppc64_caches; @@ -161,7 +161,7 @@ */ void __init ppcdbg_initialize(void) { - naca->debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */ + ppc64_debug_switch = PPC_DEBUG_DEFAULT; /* | PPCDBG_BUSWALK | */ /* PPCDBG_PHBINIT | PPCDBG_MM | PPCDBG_MMINIT | PPCDBG_TCEINIT | PPCDBG_TCE */; } @@ -399,7 +399,7 @@ DBG(" -> early_setup()\n"); /* - * Fill the default DBG level in naca (do we want to keep + * Fill the default DBG level (do we want to keep * that old mecanism around forever ?) */ ppcdbg_initialize(); @@ -453,17 +453,17 @@ /* - * Initialize some remaining members of the naca and systemcfg structures + * Initialize some remaining members of the ppc64_caches and systemcfg structures * (at least until we get rid of them completely). This is mostly some * cache informations about the CPU that will be used by cache flush * routines and/or provided to userland */ -static void __init initialize_naca(void) +static void __init initialize_cache_info(void) { struct device_node *np; unsigned long num_cpus = 0; - DBG(" -> initialize_naca()\n"); + DBG(" -> initialize_cache_info()\n"); for (np = NULL; (np = of_find_node_by_type(np, "cpu"));) { num_cpus += 1; @@ -530,7 +530,7 @@ systemcfg->version.minor = SYSTEMCFG_MINOR; systemcfg->processor = mfspr(SPRN_PVR); - DBG(" <- initialize_naca()\n"); + DBG(" <- initialize_cache_info()\n"); } static void __init check_for_initrd(void) @@ -591,7 +591,7 @@ unflatten_device_tree(); /* - * Fill the naca & systemcfg structures with informations + * Fill the ppc64_caches & systemcfg structures with informations * retreived from the device-tree. Need to be called before * finish_device_tree() since the later requires some of the * informations filled up here to properly parse the interrupt @@ -600,7 +600,7 @@ * routines like flush_icache_range (used by the hash init * later on). */ - initialize_naca(); + initialize_cache_info(); #ifdef CONFIG_PPC_PSERIES /* @@ -661,9 +661,8 @@ printk("Starting Linux PPC64 %s\n", UTS_RELEASE); printk("-----------------------------------------------------\n"); - printk("naca = 0x%p\n", naca); printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); - printk("naca->debug_switch = 0x%lx\n", naca->debug_switch); + printk("ppc64_debug_switch = 0x%lx\n", ppc64_debug_switch); printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); printk("systemcfg = 0x%p\n", systemcfg); printk("systemcfg->platform = 0x%x\n", systemcfg->platform); diff -ruN linus-bk-naca.6/arch/ppc64/kernel/udbg.c linus-bk-naca.7/arch/ppc64/kernel/udbg.c --- linus-bk-naca.6/arch/ppc64/kernel/udbg.c 2004-11-22 14:05:02.000000000 +1100 +++ linus-bk-naca.7/arch/ppc64/kernel/udbg.c 2004-12-11 02:31:17.000000000 +1100 @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -323,7 +322,7 @@ /* Special print used by PPCDBG() macro */ void udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...) { - unsigned long active_debugs = debug_flags & naca->debug_switch; + unsigned long active_debugs = debug_flags & ppc64_debug_switch; if (active_debugs) { va_list ap; @@ -357,5 +356,5 @@ unsigned long udbg_ifdebug(unsigned long flags) { - return (flags & naca->debug_switch); + return (flags & ppc64_debug_switch); } diff -ruN linus-bk-naca.6/arch/ppc64/xmon/xmon.c linus-bk-naca.7/arch/ppc64/xmon/xmon.c --- linus-bk-naca.6/arch/ppc64/xmon/xmon.c 2004-11-26 12:08:51.000000000 +1100 +++ linus-bk-naca.7/arch/ppc64/xmon/xmon.c 2004-12-11 02:33:00.000000000 +1100 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -2360,9 +2359,9 @@ if (cmd == '\n') { /* show current state */ unsigned long i; - printf("naca->debug_switch = 0x%lx\n", naca->debug_switch); + printf("ppc64_debug_switch = 0x%lx\n", ppc64_debug_switch); for (i = 0; i < PPCDBG_NUM_FLAGS ;i++) { - on = PPCDBG_BITVAL(i) & naca->debug_switch; + on = PPCDBG_BITVAL(i) & ppc64_debug_switch; printf("%02x %s %12s ", i, on ? "on " : "off", trace_names[i] ? trace_names[i] : ""); if (((i+1) % 3) == 0) printf("\n"); @@ -2376,7 +2375,7 @@ on = (cmd == '+'); cmd = inchar(); if (cmd == ' ' || cmd == '\n') { /* Turn on or off based on + or - */ - naca->debug_switch = on ? PPCDBG_ALL:PPCDBG_NONE; + ppc64_debug_switch = on ? PPCDBG_ALL:PPCDBG_NONE; printf("Setting all values to %s...\n", on ? "on" : "off"); if (cmd == '\n') return; else cmd = skipbl(); @@ -2391,10 +2390,10 @@ return; } if (on) { - naca->debug_switch |= PPCDBG_BITVAL(val); + ppc64_debug_switch |= PPCDBG_BITVAL(val); printf("enable debug %x %s\n", val, trace_names[val] ? trace_names[val] : ""); } else { - naca->debug_switch &= ~PPCDBG_BITVAL(val); + ppc64_debug_switch &= ~PPCDBG_BITVAL(val); printf("disable debug %x %s\n", val, trace_names[val] ? trace_names[val] : ""); } cmd = skipbl(); diff -ruN linus-bk-naca.6/include/asm-ppc64/naca.h linus-bk-naca.7/include/asm-ppc64/naca.h --- linus-bk-naca.6/include/asm-ppc64/naca.h 2004-12-11 00:03:55.000000000 +1100 +++ linus-bk-naca.7/include/asm-ppc64/naca.h 2004-12-11 02:41:18.000000000 +1100 @@ -19,9 +19,6 @@ void *xItVpdAreas; /* VPD Data 0x00 */ void *xRamDisk; /* iSeries ramdisk 0x08 */ u64 xRamDiskSize; /* In pages 0x10 */ - u64 debug_switch; /* Debug print control 0x20 */ - u64 banner; /* Ptr to banner string 0x28 */ - u64 log; /* Ptr to log buffer 0x30 */ }; extern struct naca_struct *naca; diff -ruN linus-bk-naca.6/include/asm-ppc64/ppcdebug.h linus-bk-naca.7/include/asm-ppc64/ppcdebug.h --- linus-bk-naca.6/include/asm-ppc64/ppcdebug.h 2004-02-16 08:19:48.000000000 +1100 +++ linus-bk-naca.7/include/asm-ppc64/ppcdebug.h 2004-12-13 12:05:25.000000000 +1100 @@ -16,13 +16,14 @@ ********************************************************************/ #include +#include #include #include #define PPCDBG_BITVAL(X) ((1UL)<<((unsigned long)(X))) /* Defined below are the bit positions of various debug flags in the - * debug_switch variable (defined in naca.h). + * ppc64_debug_switch variable. * -- When adding new values, please enter them into trace names below -- * * Values 62 & 63 can be used to stress the hardware page table management @@ -64,6 +65,8 @@ #define PPCDBG_NUM_FLAGS 64 +extern u64 ppc64_debug_switch; + #ifdef WANT_PPCDBG_TAB /* A table of debug switch names to allow name lookup in xmon * (and whoever else wants it. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/a19eb844/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:34:45 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:34:45 +1100 Subject: [PATCH 8/11] PPC64: remove the naca from all but iSeries In-Reply-To: <20050104153102.67284491.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> <20050104152340.67219ccf.sfr@canb.auug.org.au> <20050104152705.6030abc5.sfr@canb.auug.org.au> <20050104153102.67284491.sfr@canb.auug.org.au> Message-ID: <20050104153445.3777e689.sfr@canb.auug.org.au> Hi Andrew, This patch finally removes the naca from all architectures except legacy iSeries and in the process makes it a structure instead of a pointer. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.7/arch/ppc64/kernel/LparData.c linus-bk-naca.8/arch/ppc64/kernel/LparData.c --- linus-bk-naca.7/arch/ppc64/kernel/LparData.c 2004-10-26 16:06:41.000000000 +1000 +++ linus-bk-naca.8/arch/ppc64/kernel/LparData.c 2004-12-11 02:49:48.000000000 +1100 @@ -44,7 +44,7 @@ 0xc8a5d9c4, /* desc = "HvRD" ebcdic */ sizeof(struct HvReleaseData), offsetof(struct naca_struct, xItVpdAreas), - (struct naca_struct *)(NACA_VIRT_ADDR), /* 64-bit Naca address */ + &naca, /* 64-bit Naca address */ 0x6000, /* offset of LparMap within loadarea (see head.S) */ 0, 1, /* tags inactive */ diff -ruN linus-bk-naca.7/arch/ppc64/kernel/head.S linus-bk-naca.8/arch/ppc64/kernel/head.S --- linus-bk-naca.7/arch/ppc64/kernel/head.S 2004-12-10 18:40:24.000000000 +1100 +++ linus-bk-naca.8/arch/ppc64/kernel/head.S 2004-12-11 02:56:12.000000000 +1100 @@ -512,17 +512,15 @@ */ . = NACA_PHYS_ADDR .globl __end_interrupts - .globl __start_naca __end_interrupts: -__start_naca: #ifdef CONFIG_PPC_ISERIES + .globl naca +naca: .llong itVpdAreas #endif . = SYSTEMCFG_PHYS_ADDR - .globl __end_naca .globl __start_systemcfg -__end_naca: __start_systemcfg: . = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE) .globl __end_systemcfg @@ -1270,10 +1268,6 @@ SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR) std r4,0(r9) /* set the systemcfg pointer */ - LOADADDR(r9,naca) - SET_REG_TO_CONST(r4, NACA_VIRT_ADDR) - std r4,0(r9) /* set the naca pointer */ - bl .iSeries_early_setup /* relocation is on at this point */ @@ -1873,12 +1867,6 @@ li r27,SYSTEMCFG_PHYS_ADDR std r27,0(r6) /* set the value of systemcfg */ - /* setup the naca pointer which is needed by *tab_initialize */ - LOADADDR(r6,naca) - sub r6,r6,r26 /* addr of the variable naca */ - li r27,NACA_PHYS_ADDR - std r27,0(r6) /* set the value of naca */ - #ifdef CONFIG_HMT /* Start up the second thread on cpu 0 */ mfspr r3,PVR @@ -2015,11 +2003,6 @@ SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR) std r8,0(r9) - /* setup the naca pointer */ - LOADADDR(r9,naca) - SET_REG_TO_CONST(r8, NACA_VIRT_ADDR) - std r8,0(r9) /* set the value of the naca ptr */ - LOADADDR(r26, boot_cpuid) lwz r26,0(r26) diff -ruN linus-bk-naca.7/arch/ppc64/kernel/iSeries_setup.c linus-bk-naca.8/arch/ppc64/kernel/iSeries_setup.c --- linus-bk-naca.7/arch/ppc64/kernel/iSeries_setup.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.8/arch/ppc64/kernel/iSeries_setup.c 2004-12-11 02:51:17.000000000 +1100 @@ -314,13 +314,13 @@ * If the init RAM disk has been configured and there is * a non-zero starting address for it, set it up */ - if (naca->xRamDisk) { - initrd_start = (unsigned long)__va(naca->xRamDisk); - initrd_end = initrd_start + naca->xRamDiskSize * PAGE_SIZE; + if (naca.xRamDisk) { + initrd_start = (unsigned long)__va(naca.xRamDisk); + initrd_end = initrd_start + naca.xRamDiskSize * PAGE_SIZE; initrd_below_start_ok = 1; // ramdisk in kernel space ROOT_DEV = Root_RAM0; - if (((rd_size * 1024) / PAGE_SIZE) < naca->xRamDiskSize) - rd_size = (naca->xRamDiskSize * PAGE_SIZE) / 1024; + if (((rd_size * 1024) / PAGE_SIZE) < naca.xRamDiskSize) + rd_size = (naca.xRamDiskSize * PAGE_SIZE) / 1024; } else #endif /* CONFIG_BLK_DEV_INITRD */ { @@ -813,9 +813,9 @@ * Change klimit to take into account any ram disk * that may be included */ - if (naca->xRamDisk) - klimit = KERNELBASE + (u64)naca->xRamDisk + - (naca->xRamDiskSize * PAGE_SIZE); + if (naca.xRamDisk) + klimit = KERNELBASE + (u64)naca.xRamDisk + + (naca.xRamDiskSize * PAGE_SIZE); else { /* * No ram disk was included - check and see if there diff -ruN linus-bk-naca.7/arch/ppc64/kernel/pacaData.c linus-bk-naca.8/arch/ppc64/kernel/pacaData.c --- linus-bk-naca.7/arch/ppc64/kernel/pacaData.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.8/arch/ppc64/kernel/pacaData.c 2004-12-11 02:50:23.000000000 +1100 @@ -18,11 +18,8 @@ #include #include -#include #include -struct naca_struct *naca; -EXPORT_SYMBOL(naca); struct systemcfg *systemcfg; EXPORT_SYMBOL(systemcfg); diff -ruN linus-bk-naca.7/include/asm-ppc64/iSeries/HvReleaseData.h linus-bk-naca.8/include/asm-ppc64/iSeries/HvReleaseData.h --- linus-bk-naca.7/include/asm-ppc64/iSeries/HvReleaseData.h 2004-01-20 08:20:26.000000000 +1100 +++ linus-bk-naca.8/include/asm-ppc64/iSeries/HvReleaseData.h 2004-12-11 02:52:05.000000000 +1100 @@ -26,6 +26,7 @@ // address of the OS's NACA). // #include +#include //============================================================================= // diff -ruN linus-bk-naca.7/include/asm-ppc64/naca.h linus-bk-naca.8/include/asm-ppc64/naca.h --- linus-bk-naca.7/include/asm-ppc64/naca.h 2004-12-11 02:41:18.000000000 +1100 +++ linus-bk-naca.8/include/asm-ppc64/naca.h 2004-12-11 02:54:02.000000000 +1100 @@ -21,12 +21,11 @@ u64 xRamDiskSize; /* In pages 0x10 */ }; -extern struct naca_struct *naca; +extern struct naca_struct naca; #endif /* __ASSEMBLY__ */ #define NACA_PAGE 0x4 #define NACA_PHYS_ADDR (NACA_PAGE< References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> <20050104152340.67219ccf.sfr@canb.auug.org.au> <20050104152705.6030abc5.sfr@canb.auug.org.au> <20050104153102.67284491.sfr@canb.auug.org.au> <20050104153445.3777e689.sfr@canb.auug.org.au> Message-ID: <20050104153740.56622b4f.sfr@canb.auug.org.au> Hi Andrew, This fixes an aweful piece of code that could have just referenced xPMCRegsInUse in the lppaca structure. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.8/arch/ppc64/kernel/sysfs.c linus-bk-naca.9/arch/ppc64/kernel/sysfs.c --- linus-bk-naca.8/arch/ppc64/kernel/sysfs.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.9/arch/ppc64/kernel/sysfs.c 2004-12-13 14:49:37.000000000 +1100 @@ -14,6 +14,8 @@ #include #include #include +#include +#include /* SMT stuff */ @@ -154,10 +156,8 @@ #ifdef CONFIG_PPC_PSERIES /* instruct hypervisor to maintain PMCs */ - if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - char *ptr = (char *)&paca[smp_processor_id()].lppaca; - ptr[0xBB] = 1; - } + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) + get_paca()->lppaca.xPMCRegsInUse = 1; /* * On SMT machines we have to set the run latch in the ctrl register -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/ea16f4d5/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:40:25 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:40:25 +1100 Subject: [PATCH 10/11] PPC64: move the lppaca defining header file In-Reply-To: <20050104153740.56622b4f.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> <20050104152340.67219ccf.sfr@canb.auug.org.au> <20050104152705.6030abc5.sfr@canb.auug.org.au> <20050104153102.67284491.sfr@canb.auug.org.au> <20050104153445.3777e689.sfr@canb.auug.org.au> <20050104153740.56622b4f.sfr@canb.auug.org.au> Message-ID: <20050104154025.63a1b9fb.sfr@canb.auug.org.au> Hi Andrew, This patch just renames asm/iSeries/ItLpPaca.h to asm/lppaca.h as the lppaca structure is no longer just legacy iSeries specific. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.9/arch/ppc64/kernel/LparData.c linus-bk-naca.10/arch/ppc64/kernel/LparData.c --- linus-bk-naca.9/arch/ppc64/kernel/LparData.c 2004-12-11 02:49:48.000000000 +1100 +++ linus-bk-naca.10/arch/ppc64/kernel/LparData.c 2004-12-13 15:01:55.000000000 +1100 @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff -ruN linus-bk-naca.9/arch/ppc64/kernel/asm-offsets.c linus-bk-naca.10/arch/ppc64/kernel/asm-offsets.c --- linus-bk-naca.9/arch/ppc64/kernel/asm-offsets.c 2004-12-10 17:27:14.000000000 +1100 +++ linus-bk-naca.10/arch/ppc64/kernel/asm-offsets.c 2004-12-13 15:02:03.000000000 +1100 @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff -ruN linus-bk-naca.9/arch/ppc64/kernel/iSeries_proc.c linus-bk-naca.10/arch/ppc64/kernel/iSeries_proc.c --- linus-bk-naca.9/arch/ppc64/kernel/iSeries_proc.c 2004-12-10 16:26:54.000000000 +1100 +++ linus-bk-naca.10/arch/ppc64/kernel/iSeries_proc.c 2004-12-13 15:02:14.000000000 +1100 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff -ruN linus-bk-naca.9/arch/ppc64/kernel/lparcfg.c linus-bk-naca.10/arch/ppc64/kernel/lparcfg.c --- linus-bk-naca.9/arch/ppc64/kernel/lparcfg.c 2004-11-20 12:05:26.000000000 +1100 +++ linus-bk-naca.10/arch/ppc64/kernel/lparcfg.c 2004-12-13 15:02:29.000000000 +1100 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff -ruN linus-bk-naca.9/arch/ppc64/kernel/pacaData.c linus-bk-naca.10/arch/ppc64/kernel/pacaData.c --- linus-bk-naca.9/arch/ppc64/kernel/pacaData.c 2004-12-11 02:50:23.000000000 +1100 +++ linus-bk-naca.10/arch/ppc64/kernel/pacaData.c 2004-12-13 15:02:07.000000000 +1100 @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff -ruN linus-bk-naca.9/arch/ppc64/kernel/sysfs.c linus-bk-naca.10/arch/ppc64/kernel/sysfs.c --- linus-bk-naca.9/arch/ppc64/kernel/sysfs.c 2004-12-13 14:49:37.000000000 +1100 +++ linus-bk-naca.10/arch/ppc64/kernel/sysfs.c 2004-12-13 15:01:19.000000000 +1100 @@ -15,7 +15,7 @@ #include #include #include -#include +#include /* SMT stuff */ diff -ruN linus-bk-naca.9/include/asm-ppc64/iSeries/ItLpPaca.h linus-bk-naca.10/include/asm-ppc64/iSeries/ItLpPaca.h --- linus-bk-naca.9/include/asm-ppc64/iSeries/ItLpPaca.h 2004-01-20 08:20:26.000000000 +1100 +++ linus-bk-naca.10/include/asm-ppc64/iSeries/ItLpPaca.h 1970-01-01 10:00:00.000000000 +1000 @@ -1,134 +0,0 @@ -/* - * ItLpPaca.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 _ITLPPACA_H -#define _ITLPPACA_H - -//============================================================================= -// -// This control block contains the data that is shared between the -// hypervisor (PLIC) and the OS. -// -// -//---------------------------------------------------------------------------- -#include - -struct ItLpPaca -{ -//============================================================================= -// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data -// NOTE: The xDynXyz fields are fields that will be dynamically changed by -// PLIC when preparing to bring a processor online or when dispatching a -// virtual processor! -//============================================================================= - u32 xDesc; // Eye catcher 0xD397D781 x00-x03 - u16 xSize; // Size of this struct x04-x05 - u16 xRsvd1_0; // Reserved x06-x07 - u16 xRsvd1_1:14; // Reserved x08-x09 - u8 xSharedProc:1; // Shared processor indicator ... - u8 xSecondaryThread:1; // Secondary thread indicator ... - volatile u8 xDynProcStatus:8; // Dynamic Status of this proc x0A-x0A - u8 xSecondaryThreadCnt; // Secondary thread count x0B-x0B - volatile u16 xDynHvPhysicalProcIndex;// Dynamic HV Physical Proc Index0C-x0D - volatile u16 xDynHvLogicalProcIndex;// Dynamic HV Logical Proc Indexx0E-x0F - u32 xDecrVal; // Value for Decr programming x10-x13 - u32 xPMCVal; // Value for PMC regs x14-x17 - volatile u32 xDynHwNodeId; // Dynamic Hardware Node id x18-x1B - volatile u32 xDynHwProcId; // Dynamic Hardware Proc Id x1C-x1F - volatile u32 xDynPIR; // Dynamic ProcIdReg value x20-x23 - u32 xDseiData; // DSEI data x24-x27 - u64 xSPRG3; // SPRG3 value x28-x2F - u8 xRsvd1_3[80]; // Reserved x30-x7F - -//============================================================================= -// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data -//============================================================================= - // This Dword contains a byte for each type of interrupt that can occur. - // The IPI is a count while the others are just a binary 1 or 0. - union { - u64 xAnyInt; - struct { - u16 xRsvd; // Reserved - cleared by #mpasmbl - u8 xXirrInt; // Indicates xXirrValue is valid or Immed IO - u8 xIpiCnt; // IPI Count - u8 xDecrInt; // DECR interrupt occurred - u8 xPdcInt; // PDC interrupt occurred - u8 xQuantumInt; // Interrupt quantum reached - u8 xOldPlicDeferredExtInt; // Old PLIC has a deferred XIRR pending - } xFields; - } xIntDword; - - // Whenever any fields in this Dword are set then PLIC will defer the - // processing of external interrupts. Note that PLIC will store the - // XIRR directly into the xXirrValue field so that another XIRR will - // not be presented until this one clears. The layout of the low - // 4-bytes of this Dword is upto SLIC - PLIC just checks whether the - // entire Dword is zero or not. A non-zero value in the low order - // 2-bytes will result in SLIC being granted the highest thread - // priority upon return. A 0 will return to SLIC as medium priority. - u64 xPlicDeferIntsArea; // Entire Dword - - // Used to pass the real SRR0/1 from PLIC to SLIC as well as to - // pass the target SRR0/1 from SLIC to PLIC on a SetAsrAndRfid. - u64 xSavedSrr0; // Saved SRR0 x10-x17 - u64 xSavedSrr1; // Saved SRR1 x18-x1F - - // Used to pass parms from the OS to PLIC for SetAsrAndRfid - u64 xSavedGpr3; // Saved GPR3 x20-x27 - u64 xSavedGpr4; // Saved GPR4 x28-x2F - u64 xSavedGpr5; // Saved GPR5 x30-x37 - - u8 xRsvd2_1; // Reserved x38-x38 - u8 xCpuCtlsTaskAttributes; // Task attributes for cpuctls x39-x39 - u8 xFPRegsInUse; // FP regs in use x3A-x3A - u8 xPMCRegsInUse; // PMC regs in use x3B-x3B - volatile u32 xSavedDecr; // Saved Decr Value x3C-x3F - volatile u64 xEmulatedTimeBase;// Emulated TB for this thread x40-x47 - volatile u64 xCurPLICLatency; // Unaccounted PLIC latency x48-x4F - u64 xTotPLICLatency; // Accumulated PLIC latency x50-x57 - u64 xWaitStateCycles; // Wait cycles for this proc x58-x5F - u64 xEndOfQuantum; // TB at end of quantum x60-x67 - u64 xPDCSavedSPRG1; // Saved SPRG1 for PMC int x68-x6F - u64 xPDCSavedSRR0; // Saved SRR0 for PMC int x70-x77 - volatile u32 xVirtualDecr; // Virtual DECR for shared procsx78-x7B - u16 xSLBCount; // # of SLBs to maintain x7C-x7D - u8 xIdle; // Indicate OS is idle x7E - u8 xRsvd2_2; // Reserved x7F - - -//============================================================================= -// CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors -//============================================================================= - // This is the xYieldCount. An "odd" value (low bit on) means that - // the processor is yielded (either because of an OS yield or a PLIC - // preempt). An even value implies that the processor is currently - // executing. - // NOTE: This value will ALWAYS be zero for dedicated processors and - // will NEVER be zero for shared processors (ie, initialized to a 1). - volatile u32 xYieldCount; // PLIC increments each dispatchx00-x03 - u8 xRsvd3_0[124]; // Reserved x04-x7F - -//============================================================================= -// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data -//============================================================================= - u8 xPmcSaveArea[256]; // PMC interrupt Area x00-xFF - - -}; - -#endif /* _ITLPPACA_H */ diff -ruN linus-bk-naca.9/include/asm-ppc64/iSeries/LparData.h linus-bk-naca.10/include/asm-ppc64/iSeries/LparData.h --- linus-bk-naca.9/include/asm-ppc64/iSeries/LparData.h 2004-12-10 16:26:54.000000000 +1100 +++ linus-bk-naca.10/include/asm-ppc64/iSeries/LparData.h 2004-12-13 15:03:03.000000000 +1100 @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff -ruN linus-bk-naca.9/include/asm-ppc64/lppaca.h linus-bk-naca.10/include/asm-ppc64/lppaca.h --- linus-bk-naca.9/include/asm-ppc64/lppaca.h 1970-01-01 10:00:00.000000000 +1000 +++ linus-bk-naca.10/include/asm-ppc64/lppaca.h 2004-12-13 15:04:43.000000000 +1100 @@ -0,0 +1,134 @@ +/* + * lppaca.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 _ASM_LPPACA_H +#define _ASM_LPPACA_H + +//============================================================================= +// +// This control block contains the data that is shared between the +// hypervisor (PLIC) and the OS. +// +// +//---------------------------------------------------------------------------- +#include + +struct ItLpPaca +{ +//============================================================================= +// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data +// NOTE: The xDynXyz fields are fields that will be dynamically changed by +// PLIC when preparing to bring a processor online or when dispatching a +// virtual processor! +//============================================================================= + u32 xDesc; // Eye catcher 0xD397D781 x00-x03 + u16 xSize; // Size of this struct x04-x05 + u16 xRsvd1_0; // Reserved x06-x07 + u16 xRsvd1_1:14; // Reserved x08-x09 + u8 xSharedProc:1; // Shared processor indicator ... + u8 xSecondaryThread:1; // Secondary thread indicator ... + volatile u8 xDynProcStatus:8; // Dynamic Status of this proc x0A-x0A + u8 xSecondaryThreadCnt; // Secondary thread count x0B-x0B + volatile u16 xDynHvPhysicalProcIndex;// Dynamic HV Physical Proc Index0C-x0D + volatile u16 xDynHvLogicalProcIndex;// Dynamic HV Logical Proc Indexx0E-x0F + u32 xDecrVal; // Value for Decr programming x10-x13 + u32 xPMCVal; // Value for PMC regs x14-x17 + volatile u32 xDynHwNodeId; // Dynamic Hardware Node id x18-x1B + volatile u32 xDynHwProcId; // Dynamic Hardware Proc Id x1C-x1F + volatile u32 xDynPIR; // Dynamic ProcIdReg value x20-x23 + u32 xDseiData; // DSEI data x24-x27 + u64 xSPRG3; // SPRG3 value x28-x2F + u8 xRsvd1_3[80]; // Reserved x30-x7F + +//============================================================================= +// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data +//============================================================================= + // This Dword contains a byte for each type of interrupt that can occur. + // The IPI is a count while the others are just a binary 1 or 0. + union { + u64 xAnyInt; + struct { + u16 xRsvd; // Reserved - cleared by #mpasmbl + u8 xXirrInt; // Indicates xXirrValue is valid or Immed IO + u8 xIpiCnt; // IPI Count + u8 xDecrInt; // DECR interrupt occurred + u8 xPdcInt; // PDC interrupt occurred + u8 xQuantumInt; // Interrupt quantum reached + u8 xOldPlicDeferredExtInt; // Old PLIC has a deferred XIRR pending + } xFields; + } xIntDword; + + // Whenever any fields in this Dword are set then PLIC will defer the + // processing of external interrupts. Note that PLIC will store the + // XIRR directly into the xXirrValue field so that another XIRR will + // not be presented until this one clears. The layout of the low + // 4-bytes of this Dword is upto SLIC - PLIC just checks whether the + // entire Dword is zero or not. A non-zero value in the low order + // 2-bytes will result in SLIC being granted the highest thread + // priority upon return. A 0 will return to SLIC as medium priority. + u64 xPlicDeferIntsArea; // Entire Dword + + // Used to pass the real SRR0/1 from PLIC to SLIC as well as to + // pass the target SRR0/1 from SLIC to PLIC on a SetAsrAndRfid. + u64 xSavedSrr0; // Saved SRR0 x10-x17 + u64 xSavedSrr1; // Saved SRR1 x18-x1F + + // Used to pass parms from the OS to PLIC for SetAsrAndRfid + u64 xSavedGpr3; // Saved GPR3 x20-x27 + u64 xSavedGpr4; // Saved GPR4 x28-x2F + u64 xSavedGpr5; // Saved GPR5 x30-x37 + + u8 xRsvd2_1; // Reserved x38-x38 + u8 xCpuCtlsTaskAttributes; // Task attributes for cpuctls x39-x39 + u8 xFPRegsInUse; // FP regs in use x3A-x3A + u8 xPMCRegsInUse; // PMC regs in use x3B-x3B + volatile u32 xSavedDecr; // Saved Decr Value x3C-x3F + volatile u64 xEmulatedTimeBase;// Emulated TB for this thread x40-x47 + volatile u64 xCurPLICLatency; // Unaccounted PLIC latency x48-x4F + u64 xTotPLICLatency; // Accumulated PLIC latency x50-x57 + u64 xWaitStateCycles; // Wait cycles for this proc x58-x5F + u64 xEndOfQuantum; // TB at end of quantum x60-x67 + u64 xPDCSavedSPRG1; // Saved SPRG1 for PMC int x68-x6F + u64 xPDCSavedSRR0; // Saved SRR0 for PMC int x70-x77 + volatile u32 xVirtualDecr; // Virtual DECR for shared procsx78-x7B + u16 xSLBCount; // # of SLBs to maintain x7C-x7D + u8 xIdle; // Indicate OS is idle x7E + u8 xRsvd2_2; // Reserved x7F + + +//============================================================================= +// CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors +//============================================================================= + // This is the xYieldCount. An "odd" value (low bit on) means that + // the processor is yielded (either because of an OS yield or a PLIC + // preempt). An even value implies that the processor is currently + // executing. + // NOTE: This value will ALWAYS be zero for dedicated processors and + // will NEVER be zero for shared processors (ie, initialized to a 1). + volatile u32 xYieldCount; // PLIC increments each dispatchx00-x03 + u8 xRsvd3_0[124]; // Reserved x04-x7F + +//============================================================================= +// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data +//============================================================================= + u8 xPmcSaveArea[256]; // PMC interrupt Area x00-xFF + + +}; + +#endif /* _ASM_LPPACA_H */ diff -ruN linus-bk-naca.9/include/asm-ppc64/paca.h linus-bk-naca.10/include/asm-ppc64/paca.h --- linus-bk-naca.9/include/asm-ppc64/paca.h 2004-12-13 18:05:08.000000000 +1100 +++ linus-bk-naca.10/include/asm-ppc64/paca.h 2004-12-31 15:48:57.000000000 +1100 @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/75de8b11/attachment.pgp From sfr at canb.auug.org.au Tue Jan 4 15:43:19 2005 From: sfr at canb.auug.org.au (Stephen Rothwell) Date: Tue, 4 Jan 2005 15:43:19 +1100 Subject: [PATCH 11/11] PPC64: remove StudlyCaps from lppaca structure In-Reply-To: <20050104154025.63a1b9fb.sfr@canb.auug.org.au> References: <20050104145356.4d5333dd.sfr@canb.auug.org.au> <20050104150410.199b132e.sfr@canb.auug.org.au> <20050104150833.5d3f3722.sfr@canb.auug.org.au> <20050104151229.521e8083.sfr@canb.auug.org.au> <20050104151906.6e50f1d2.sfr@canb.auug.org.au> <20050104152340.67219ccf.sfr@canb.auug.org.au> <20050104152705.6030abc5.sfr@canb.auug.org.au> <20050104153102.67284491.sfr@canb.auug.org.au> <20050104153445.3777e689.sfr@canb.auug.org.au> <20050104153740.56622b4f.sfr@canb.auug.org.au> <20050104154025.63a1b9fb.sfr@canb.auug.org.au> Message-ID: <20050104154319.505b1197.sfr@canb.auug.org.au> Hi Andrew, This patch just renames all the fields (and the structure name) of the lppaca structure to rid us of some more StudyCaps. Signed-off-by: Stephen Rothwell -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ diff -ruN linus-bk-naca.10/arch/ppc64/kernel/asm-offsets.c linus-bk-naca.11/arch/ppc64/kernel/asm-offsets.c --- linus-bk-naca.10/arch/ppc64/kernel/asm-offsets.c 2004-12-13 15:02:03.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/asm-offsets.c 2004-12-31 15:51:16.000000000 +1100 @@ -102,10 +102,10 @@ DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); DEFINE(PACALPPACA, offsetof(struct paca_struct, lppaca)); DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); - DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0)); - DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1)); - DEFINE(LPPACAANYINT, offsetof(struct ItLpPaca, xIntDword.xAnyInt)); - DEFINE(LPPACADECRINT, offsetof(struct ItLpPaca, xIntDword.xFields.xDecrInt)); + DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); + DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); + DEFINE(LPPACAANYINT, offsetof(struct lppaca, int_dword.any_int)); + DEFINE(LPPACADECRINT, offsetof(struct lppaca, int_dword.fields.decr_int)); /* RTAS */ DEFINE(RTASBASE, offsetof(struct rtas_t, base)); diff -ruN linus-bk-naca.10/arch/ppc64/kernel/iSeries_setup.c linus-bk-naca.11/arch/ppc64/kernel/iSeries_setup.c --- linus-bk-naca.10/arch/ppc64/kernel/iSeries_setup.c 2004-12-11 02:51:17.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/iSeries_setup.c 2004-12-13 15:31:14.000000000 +1100 @@ -559,7 +559,7 @@ static void __init setup_iSeries_cache_sizes(void) { unsigned int i, n; - unsigned int procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex; + unsigned int procIx = get_paca()->lppaca.dyn_hv_phys_proc_index; systemcfg->icache_size = ppc64_caches.isize = xIoHriProcessorVpd[procIx].xInstCacheSize * 1024; @@ -656,7 +656,7 @@ void __init iSeries_setup_arch(void) { void *eventStack; - unsigned procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex; + unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index; /* Add an eye catcher and the systemcfg layout version number */ strcpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64"); diff -ruN linus-bk-naca.10/arch/ppc64/kernel/iSeries_smp.c linus-bk-naca.11/arch/ppc64/kernel/iSeries_smp.c --- linus-bk-naca.10/arch/ppc64/kernel/iSeries_smp.c 2004-12-10 16:26:54.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/iSeries_smp.c 2004-12-13 15:29:16.000000000 +1100 @@ -90,7 +90,7 @@ np = 0; for (i=0; i < NR_CPUS; ++i) { - if (paca[i].lppaca.xDynProcStatus < 2) { + if (paca[i].lppaca.dyn_proc_status < 2) { cpu_set(i, cpu_possible_map); cpu_set(i, cpu_present_map); cpu_set(i, cpu_sibling_map[i]); @@ -106,7 +106,7 @@ unsigned np = 0; for (i=0; i < NR_CPUS; ++i) { - if (paca[i].lppaca.xDynProcStatus < 2) { + if (paca[i].lppaca.dyn_proc_status < 2) { /*paca[i].active = 1;*/ ++np; } @@ -120,7 +120,7 @@ BUG_ON(nr < 0 || nr >= NR_CPUS); /* Verify that our partition has a processor nr */ - if (paca[nr].lppaca.xDynProcStatus >= 2) + if (paca[nr].lppaca.dyn_proc_status >= 2) return; /* The processor is currently spinning, waiting diff -ruN linus-bk-naca.10/arch/ppc64/kernel/idle.c linus-bk-naca.11/arch/ppc64/kernel/idle.c --- linus-bk-naca.10/arch/ppc64/kernel/idle.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/idle.c 2004-12-13 16:06:18.000000000 +1100 @@ -67,7 +67,7 @@ * The decrementer stops during the yield. Force a fake decrementer * here and let the timer_interrupt code sort out the actual time. */ - get_paca()->lppaca.xIntDword.xFields.xDecrInt = 1; + get_paca()->lppaca.int_dword.fields.decr_int = 1; process_iSeries_events(); } @@ -86,7 +86,7 @@ lpaca = get_paca(); while (1) { - if (lpaca->lppaca.xSharedProc) { + if (lpaca->lppaca.shared_proc) { if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr)) process_iSeries_events(); if (!need_resched()) @@ -173,7 +173,7 @@ * Indicate to the HV that we are idle. Now would be * a good time to find other work to dispatch. */ - lpaca->lppaca.xIdle = 1; + lpaca->lppaca.idle = 1; oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); if (!oldval) { @@ -194,7 +194,7 @@ HMT_medium(); - if (!(ppaca->lppaca.xIdle)) { + if (!(ppaca->lppaca.idle)) { local_irq_disable(); /* @@ -233,7 +233,7 @@ } HMT_medium(); - lpaca->lppaca.xIdle = 0; + lpaca->lppaca.idle = 0; schedule(); if (cpu_is_offline(cpu) && system_state == SYSTEM_RUNNING) cpu_die(); @@ -251,7 +251,7 @@ * Indicate to the HV that we are idle. Now would be * a good time to find other work to dispatch. */ - lpaca->lppaca.xIdle = 1; + lpaca->lppaca.idle = 1; while (!need_resched() && !cpu_is_offline(cpu)) { local_irq_disable(); @@ -273,7 +273,7 @@ } HMT_medium(); - lpaca->lppaca.xIdle = 0; + lpaca->lppaca.idle = 0; schedule(); if (cpu_is_offline(smp_processor_id()) && system_state == SYSTEM_RUNNING) @@ -352,7 +352,7 @@ #ifdef CONFIG_PPC_PSERIES if (systemcfg->platform & PLATFORM_PSERIES) { if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - if (get_paca()->lppaca.xSharedProc) { + if (get_paca()->lppaca.shared_proc) { printk(KERN_INFO "Using shared processor idle loop\n"); idle_loop = shared_idle; } else { diff -ruN linus-bk-naca.10/arch/ppc64/kernel/irq.c linus-bk-naca.11/arch/ppc64/kernel/irq.c --- linus-bk-naca.10/arch/ppc64/kernel/irq.c 2004-12-31 14:53:21.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/irq.c 2004-12-13 15:43:22.000000000 +1100 @@ -259,8 +259,8 @@ lpaca = get_paca(); #ifdef CONFIG_SMP - if (lpaca->lppaca.xIntDword.xFields.xIpiCnt) { - lpaca->lppaca.xIntDword.xFields.xIpiCnt = 0; + if (lpaca->lppaca.int_dword.fields.ipi_cnt) { + lpaca->lppaca.int_dword.fields.ipi_cnt = 0; iSeries_smp_message_recv(regs); } #endif /* CONFIG_SMP */ @@ -270,8 +270,8 @@ irq_exit(); - if (lpaca->lppaca.xIntDword.xFields.xDecrInt) { - lpaca->lppaca.xIntDword.xFields.xDecrInt = 0; + if (lpaca->lppaca.int_dword.fields.decr_int) { + lpaca->lppaca.int_dword.fields.decr_int = 0; /* Signal a fake decrementer interrupt */ timer_interrupt(regs); } diff -ruN linus-bk-naca.10/arch/ppc64/kernel/lparcfg.c linus-bk-naca.11/arch/ppc64/kernel/lparcfg.c --- linus-bk-naca.10/arch/ppc64/kernel/lparcfg.c 2004-12-13 15:02:29.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/lparcfg.c 2004-12-13 16:00:00.000000000 +1100 @@ -72,7 +72,7 @@ /* * For iSeries legacy systems, the PPA purr function is available from the - * xEmulatedTimeBase field in the paca. + * emulated_time_base field in the paca. */ static unsigned long get_purr(void) { @@ -82,11 +82,11 @@ for_each_cpu(cpu) { lpaca = paca + cpu; - sum_purr += lpaca->lppaca.xEmulatedTimeBase; + sum_purr += lpaca->lppaca.emulated_time_base; #ifdef PURR_DEBUG printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n", - cpu, lpaca->lppaca.xEmulatedTimeBase); + cpu, lpaca->lppaca.emulated_time_base); #endif } return sum_purr; @@ -107,7 +107,7 @@ seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); - shared = (int)(lpaca->lppaca_ptr->xSharedProc); + shared = (int)(lpaca->lppaca_ptr->shared_proc); seq_printf(m, "serial_number=%c%c%c%c%c%c%c\n", e2a(xItExtVpdPanel.mfgID[2]), e2a(xItExtVpdPanel.mfgID[3]), @@ -395,7 +395,7 @@ (h_resource >> 0 * 8) & 0xffff); /* pool related entries are apropriate for shared configs */ - if (paca[0].lppaca.xSharedProc) { + if (paca[0].lppaca.shared_proc) { h_pic(&pool_idle_time, &pool_procs); @@ -444,7 +444,7 @@ seq_printf(m, "partition_potential_processors=%d\n", partition_potential_processors); - seq_printf(m, "shared_processor_mode=%d\n", paca[0].lppaca.xSharedProc); + seq_printf(m, "shared_processor_mode=%d\n", paca[0].lppaca.shared_proc); return 0; } diff -ruN linus-bk-naca.10/arch/ppc64/kernel/pacaData.c linus-bk-naca.11/arch/ppc64/kernel/pacaData.c --- linus-bk-naca.10/arch/ppc64/kernel/pacaData.c 2004-12-13 15:02:07.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/pacaData.c 2004-12-13 16:05:34.000000000 +1100 @@ -28,7 +28,7 @@ extern unsigned long __toc_start; /* The Paca is an array with one entry per processor. Each contains an - * ItLpPaca, which contains the information shared between the + * lppaca, which contains the information shared between the * hypervisor and Linux. Each also contains an ItLpRegSave area which * is used by the hypervisor to save registers. * On systems with hardware multi-threading, there are two threads @@ -61,13 +61,13 @@ .cpu_start = (start), /* Processor start */ \ .hw_cpu_id = 0xffff, \ .lppaca = { \ - .xDesc = 0xd397d781, /* "LpPa" */ \ - .xSize = sizeof(struct ItLpPaca), \ - .xFPRegsInUse = 1, \ - .xDynProcStatus = 2, \ - .xDecrVal = 0x00ff0000, \ - .xEndOfQuantum = 0xfffffffffffffffful, \ - .xSLBCount = 64, \ + .desc = 0xd397d781, /* "LpPa" */ \ + .size = sizeof(struct lppaca), \ + .dyn_proc_status = 2, \ + .decr_val = 0x00ff0000, \ + .fpregs_in_use = 1, \ + .end_of_quantum = 0xfffffffffffffffful, \ + .slb_count = 64, \ }, \ EXTRA_INITS((number), (lpq)) \ } diff -ruN linus-bk-naca.10/arch/ppc64/kernel/sysfs.c linus-bk-naca.11/arch/ppc64/kernel/sysfs.c --- linus-bk-naca.10/arch/ppc64/kernel/sysfs.c 2004-12-13 15:01:19.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/sysfs.c 2004-12-13 15:58:30.000000000 +1100 @@ -157,7 +157,7 @@ #ifdef CONFIG_PPC_PSERIES /* instruct hypervisor to maintain PMCs */ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) - get_paca()->lppaca.xPMCRegsInUse = 1; + get_paca()->lppaca.pmcregs_in_use = 1; /* * On SMT machines we have to set the run latch in the ctrl register diff -ruN linus-bk-naca.10/arch/ppc64/kernel/time.c linus-bk-naca.11/arch/ppc64/kernel/time.c --- linus-bk-naca.10/arch/ppc64/kernel/time.c 2004-12-31 14:52:14.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/kernel/time.c 2004-12-13 15:43:28.000000000 +1100 @@ -230,7 +230,7 @@ /* * For iSeries shared processors, we have to let the hypervisor * set the hardware decrementer. We set a virtual decrementer - * in the ItLpPaca and call the hypervisor if the virtual + * in the lppaca and call the hypervisor if the virtual * decrementer is less than the current value in the hardware * decrementer. (almost always the new decrementer value will * be greater than the current hardware decementer so the hypervisor @@ -256,7 +256,7 @@ profile_tick(CPU_PROFILING, regs); #endif - lpaca->lppaca.xIntDword.xFields.xDecrInt = 0; + lpaca->lppaca.int_dword.fields.decr_int = 0; while (lpaca->next_jiffy_update_tb <= (cur_tb = get_tb())) { diff -ruN linus-bk-naca.10/arch/ppc64/lib/locks.c linus-bk-naca.11/arch/ppc64/lib/locks.c --- linus-bk-naca.10/arch/ppc64/lib/locks.c 2004-09-16 21:51:57.000000000 +1000 +++ linus-bk-naca.11/arch/ppc64/lib/locks.c 2004-12-13 16:08:05.000000000 +1100 @@ -34,7 +34,7 @@ holder_cpu = lock_value & 0xffff; BUG_ON(holder_cpu >= NR_CPUS); holder_paca = &paca[holder_cpu]; - yield_count = holder_paca->lppaca.xYieldCount; + yield_count = holder_paca->lppaca.yield_count; if ((yield_count & 1) == 0) return; /* virtual cpu is currently running */ rmb(); @@ -66,7 +66,7 @@ holder_cpu = lock_value & 0xffff; BUG_ON(holder_cpu >= NR_CPUS); holder_paca = &paca[holder_cpu]; - yield_count = holder_paca->lppaca.xYieldCount; + yield_count = holder_paca->lppaca.yield_count; if ((yield_count & 1) == 0) return; /* virtual cpu is currently running */ rmb(); diff -ruN linus-bk-naca.10/arch/ppc64/xmon/xmon.c linus-bk-naca.11/arch/ppc64/xmon/xmon.c --- linus-bk-naca.10/arch/ppc64/xmon/xmon.c 2004-12-11 02:33:00.000000000 +1100 +++ linus-bk-naca.11/arch/ppc64/xmon/xmon.c 2004-12-13 15:50:52.000000000 +1100 @@ -1489,7 +1489,7 @@ unsigned long val; #ifdef CONFIG_PPC_ISERIES struct paca_struct *ptrPaca = NULL; - struct ItLpPaca *ptrLpPaca = NULL; + struct lppaca *ptrLpPaca = NULL; struct ItLpRegSave *ptrLpRegSave = NULL; #endif @@ -1513,10 +1513,10 @@ printf(" Local Processor Control Area (LpPaca): \n"); ptrLpPaca = ptrPaca->lppaca_ptr; printf(" Saved Srr0=%.16lx Saved Srr1=%.16lx \n", - ptrLpPaca->xSavedSrr0, ptrLpPaca->xSavedSrr1); + ptrLpPaca->saved_srr0, ptrLpPaca->saved_srr1); printf(" Saved Gpr3=%.16lx Saved Gpr4=%.16lx \n", - ptrLpPaca->xSavedGpr3, ptrLpPaca->xSavedGpr4); - printf(" Saved Gpr5=%.16lx \n", ptrLpPaca->xSavedGpr5); + ptrLpPaca->saved_gpr3, ptrLpPaca->saved_gpr4); + printf(" Saved Gpr5=%.16lx \n", ptrLpPaca->saved_gpr5); printf(" Local Processor Register Save Area (LpRegSave): \n"); ptrLpRegSave = ptrPaca->reg_save_ptr; diff -ruN linus-bk-naca.10/include/asm-ppc64/lppaca.h linus-bk-naca.11/include/asm-ppc64/lppaca.h --- linus-bk-naca.10/include/asm-ppc64/lppaca.h 2004-12-13 15:04:43.000000000 +1100 +++ linus-bk-naca.11/include/asm-ppc64/lppaca.h 2004-12-13 16:09:08.000000000 +1100 @@ -28,7 +28,7 @@ //---------------------------------------------------------------------------- #include -struct ItLpPaca +struct lppaca { //============================================================================= // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data @@ -36,24 +36,24 @@ // PLIC when preparing to bring a processor online or when dispatching a // virtual processor! //============================================================================= - u32 xDesc; // Eye catcher 0xD397D781 x00-x03 - u16 xSize; // Size of this struct x04-x05 - u16 xRsvd1_0; // Reserved x06-x07 - u16 xRsvd1_1:14; // Reserved x08-x09 - u8 xSharedProc:1; // Shared processor indicator ... - u8 xSecondaryThread:1; // Secondary thread indicator ... - volatile u8 xDynProcStatus:8; // Dynamic Status of this proc x0A-x0A - u8 xSecondaryThreadCnt; // Secondary thread count x0B-x0B - volatile u16 xDynHvPhysicalProcIndex;// Dynamic HV Physical Proc Index0C-x0D - volatile u16 xDynHvLogicalProcIndex;// Dynamic HV Logical Proc Indexx0E-x0F - u32 xDecrVal; // Value for Decr programming x10-x13 - u32 xPMCVal; // Value for PMC regs x14-x17 - volatile u32 xDynHwNodeId; // Dynamic Hardware Node id x18-x1B - volatile u32 xDynHwProcId; // Dynamic Hardware Proc Id x1C-x1F - volatile u32 xDynPIR; // Dynamic ProcIdReg value x20-x23 - u32 xDseiData; // DSEI data x24-x27 - u64 xSPRG3; // SPRG3 value x28-x2F - u8 xRsvd1_3[80]; // Reserved x30-x7F + u32 desc; // Eye catcher 0xD397D781 x00-x03 + u16 size; // Size of this struct x04-x05 + u16 reserved1; // Reserved x06-x07 + u16 reserved2:14; // Reserved x08-x09 + u8 shared_proc:1; // Shared processor indicator ... + u8 secondary_thread:1; // Secondary thread indicator ... + volatile u8 dyn_proc_status:8; // Dynamic Status of this proc x0A-x0A + u8 secondary_thread_count; // Secondary thread count x0B-x0B + volatile u16 dyn_hv_phys_proc_index;// Dynamic HV Physical Proc Index0C-x0D + volatile u16 dyn_hv_log_proc_index;// Dynamic HV Logical Proc Indexx0E-x0F + u32 decr_val; // Value for Decr programming x10-x13 + u32 pmc_val; // Value for PMC regs x14-x17 + volatile u32 dyn_hw_node_id; // Dynamic Hardware Node id x18-x1B + volatile u32 dyn_hw_proc_id; // Dynamic Hardware Proc Id x1C-x1F + volatile u32 dyn_pir; // Dynamic ProcIdReg value x20-x23 + u32 dsei_data; // DSEI data x24-x27 + u64 sprg3; // SPRG3 value x28-x2F + u8 reserved3[80]; // Reserved x30-x7F //============================================================================= // CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data @@ -61,17 +61,17 @@ // This Dword contains a byte for each type of interrupt that can occur. // The IPI is a count while the others are just a binary 1 or 0. union { - u64 xAnyInt; + u64 any_int; struct { - u16 xRsvd; // Reserved - cleared by #mpasmbl - u8 xXirrInt; // Indicates xXirrValue is valid or Immed IO - u8 xIpiCnt; // IPI Count - u8 xDecrInt; // DECR interrupt occurred - u8 xPdcInt; // PDC interrupt occurred - u8 xQuantumInt; // Interrupt quantum reached - u8 xOldPlicDeferredExtInt; // Old PLIC has a deferred XIRR pending - } xFields; - } xIntDword; + u16 reserved; // Reserved - cleared by #mpasmbl + u8 xirr_int; // Indicates xXirrValue is valid or Immed IO + u8 ipi_cnt; // IPI Count + u8 decr_int; // DECR interrupt occurred + u8 pdc_int; // PDC interrupt occurred + u8 quantum_int; // Interrupt quantum reached + u8 old_plic_deferred_ext_int; // Old PLIC has a deferred XIRR pending + } fields; + } int_dword; // Whenever any fields in this Dword are set then PLIC will defer the // processing of external interrupts. Note that PLIC will store the @@ -81,54 +81,52 @@ // entire Dword is zero or not. A non-zero value in the low order // 2-bytes will result in SLIC being granted the highest thread // priority upon return. A 0 will return to SLIC as medium priority. - u64 xPlicDeferIntsArea; // Entire Dword + u64 plic_defer_ints_area; // Entire Dword // Used to pass the real SRR0/1 from PLIC to SLIC as well as to // pass the target SRR0/1 from SLIC to PLIC on a SetAsrAndRfid. - u64 xSavedSrr0; // Saved SRR0 x10-x17 - u64 xSavedSrr1; // Saved SRR1 x18-x1F + u64 saved_srr0; // Saved SRR0 x10-x17 + u64 saved_srr1; // Saved SRR1 x18-x1F // Used to pass parms from the OS to PLIC for SetAsrAndRfid - u64 xSavedGpr3; // Saved GPR3 x20-x27 - u64 xSavedGpr4; // Saved GPR4 x28-x2F - u64 xSavedGpr5; // Saved GPR5 x30-x37 - - u8 xRsvd2_1; // Reserved x38-x38 - u8 xCpuCtlsTaskAttributes; // Task attributes for cpuctls x39-x39 - u8 xFPRegsInUse; // FP regs in use x3A-x3A - u8 xPMCRegsInUse; // PMC regs in use x3B-x3B - volatile u32 xSavedDecr; // Saved Decr Value x3C-x3F - volatile u64 xEmulatedTimeBase;// Emulated TB for this thread x40-x47 - volatile u64 xCurPLICLatency; // Unaccounted PLIC latency x48-x4F - u64 xTotPLICLatency; // Accumulated PLIC latency x50-x57 - u64 xWaitStateCycles; // Wait cycles for this proc x58-x5F - u64 xEndOfQuantum; // TB at end of quantum x60-x67 - u64 xPDCSavedSPRG1; // Saved SPRG1 for PMC int x68-x6F - u64 xPDCSavedSRR0; // Saved SRR0 for PMC int x70-x77 - volatile u32 xVirtualDecr; // Virtual DECR for shared procsx78-x7B - u16 xSLBCount; // # of SLBs to maintain x7C-x7D - u8 xIdle; // Indicate OS is idle x7E - u8 xRsvd2_2; // Reserved x7F + u64 saved_gpr3; // Saved GPR3 x20-x27 + u64 saved_gpr4; // Saved GPR4 x28-x2F + u64 saved_gpr5; // Saved GPR5 x30-x37 + + u8 reserved4; // Reserved x38-x38 + u8 cpuctls_task_attrs; // Task attributes for cpuctls x39-x39 + u8 fpregs_in_use; // FP regs in use x3A-x3A + u8 pmcregs_in_use; // PMC regs in use x3B-x3B + volatile u32 saved_decr; // Saved Decr Value x3C-x3F + volatile u64 emulated_time_base;// Emulated TB for this thread x40-x47 + volatile u64 cur_plic_latency; // Unaccounted PLIC latency x48-x4F + u64 tot_plic_latency; // Accumulated PLIC latency x50-x57 + u64 wait_state_cycles; // Wait cycles for this proc x58-x5F + u64 end_of_quantum; // TB at end of quantum x60-x67 + u64 pdc_saved_sprg1; // Saved SPRG1 for PMC int x68-x6F + u64 pdc_saved_srr0; // Saved SRR0 for PMC int x70-x77 + volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B + u16 slb_count; // # of SLBs to maintain x7C-x7D + u8 idle; // Indicate OS is idle x7E + u8 reserved5; // Reserved x7F //============================================================================= // CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors //============================================================================= - // This is the xYieldCount. An "odd" value (low bit on) means that + // This is the yield_count. An "odd" value (low bit on) means that // the processor is yielded (either because of an OS yield or a PLIC // preempt). An even value implies that the processor is currently // executing. // NOTE: This value will ALWAYS be zero for dedicated processors and // will NEVER be zero for shared processors (ie, initialized to a 1). - volatile u32 xYieldCount; // PLIC increments each dispatchx00-x03 - u8 xRsvd3_0[124]; // Reserved x04-x7F + volatile u32 yield_count; // PLIC increments each dispatchx00-x03 + u8 reserved6[124]; // Reserved x04-x7F //============================================================================= // CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data //============================================================================= - u8 xPmcSaveArea[256]; // PMC interrupt Area x00-xFF - - + u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF }; #endif /* _ASM_LPPACA_H */ diff -ruN linus-bk-naca.10/include/asm-ppc64/paca.h linus-bk-naca.11/include/asm-ppc64/paca.h --- linus-bk-naca.10/include/asm-ppc64/paca.h 2004-12-31 15:48:57.000000000 +1100 +++ linus-bk-naca.11/include/asm-ppc64/paca.h 2004-12-31 15:54:35.000000000 +1100 @@ -34,8 +34,8 @@ * * This structure is not directly accessed by firmware or the service * processor except for the first two pointers that point to the - * ItLpPaca area and the ItLpRegSave area for this CPU. Both the - * ItLpPaca and ItLpRegSave objects are currently contained within the + * lppaca area and the ItLpRegSave area for this CPU. Both the + * lppaca and ItLpRegSave objects are currently contained within the * PACA but they do not need to be. */ struct paca_struct { @@ -50,7 +50,7 @@ * MAGIC: These first two pointers can't be moved - they're * accessed by the firmware */ - struct ItLpPaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */ + struct lppaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */ struct ItLpRegSave *reg_save_ptr; /* Pointer to LpRegSave for PLIC */ /* @@ -109,7 +109,7 @@ * alignment will suffice to ensure that it doesn't * cross a page boundary. */ - struct ItLpPaca lppaca __attribute__((__aligned__(0x400))); + struct lppaca lppaca __attribute__((__aligned__(0x400))); #ifdef CONFIG_PPC_ISERIES struct ItLpRegSave reg_save; #endif diff -ruN linus-bk-naca.10/include/asm-ppc64/spinlock.h linus-bk-naca.11/include/asm-ppc64/spinlock.h --- linus-bk-naca.10/include/asm-ppc64/spinlock.h 2004-09-09 09:59:50.000000000 +1000 +++ linus-bk-naca.11/include/asm-ppc64/spinlock.h 2004-12-13 15:25:23.000000000 +1100 @@ -57,7 +57,7 @@ #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) /* We only yield to the hypervisor if we are in shared processor mode */ -#define SHARED_PROCESSOR (get_paca()->lppaca.xSharedProc) +#define SHARED_PROCESSOR (get_paca()->lppaca.shared_proc) extern void __spin_yield(spinlock_t *lock); extern void __rw_yield(rwlock_t *lock); #else /* SPLPAR || ISERIES */ diff -ruN linus-bk-naca.10/include/asm-ppc64/time.h linus-bk-naca.11/include/asm-ppc64/time.h --- linus-bk-naca.10/include/asm-ppc64/time.h 2004-07-05 11:49:20.000000000 +1000 +++ linus-bk-naca.11/include/asm-ppc64/time.h 2004-12-13 16:05:02.000000000 +1100 @@ -78,8 +78,8 @@ struct paca_struct *lpaca = get_paca(); int cur_dec; - if (lpaca->lppaca.xSharedProc) { - lpaca->lppaca.xVirtualDecr = val; + if (lpaca->lppaca.shared_proc) { + lpaca->lppaca.virtual_decr = val; cur_dec = get_dec(); if (cur_dec > val) HvCall_setVirtualDecr(); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050104/90f4646f/attachment.pgp From anton at samba.org Tue Jan 4 16:01:15 2005 From: anton at samba.org (Anton Blanchard) Date: Tue, 4 Jan 2005 16:01:15 +1100 Subject: [PATCH] ppc64: Clarify rtasd printk Message-ID: <20050104050115.GG7335@krispykreme.ozlabs.ibm.com> Hi, On machines with RTAS but without event-scan support we would incorrectly claim there was no RTAS on the system. Signed-off-by: Anton Blanchard ===== rtasd.c 1.34 vs edited ===== --- 1.34/arch/ppc64/kernel/rtasd.c 2004-11-16 14:29:11 +11:00 +++ edited/rtasd.c 2004-12-26 13:36:56 +11:00 @@ -486,7 +486,7 @@ /* No RTAS, only warn if we are on a pSeries box */ if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { if (systemcfg->platform & PLATFORM_PSERIES); - printk(KERN_ERR "rtasd: no RTAS on system\n"); + printk(KERN_ERR "rtasd: no event-scan on system\n"); return 1; } From anton at samba.org Tue Jan 4 16:07:27 2005 From: anton at samba.org (Anton Blanchard) Date: Tue, 4 Jan 2005 16:07:27 +1100 Subject: [PATCH] ppc64: fix some compiler warnings Message-ID: <20050104050727.GH7335@krispykreme.ozlabs.ibm.com> Fix some compiler warnings: - The first two are spurious gcc warnings, but quieten them up regardless - Add a missing include - Use register_sysrq_key instead of __sysrq_put_key_op Signed-off-by: Anton Blanchard diff -puN arch/ppc64/mm/hash_native.c~remove_compiler_warnings arch/ppc64/mm/hash_native.c --- gr_work/arch/ppc64/mm/hash_native.c~remove_compiler_warnings 2004-12-25 21:44:00.112288718 -0600 +++ gr_work-anton/arch/ppc64/mm/hash_native.c 2004-12-25 21:44:35.782093438 -0600 @@ -242,7 +242,7 @@ static long native_hpte_updatepp(unsigne */ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea) { - unsigned long vsid, va, vpn, flags; + unsigned long vsid, va, vpn, flags = 0; long slot; HPTE *hptep; int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); diff -puN arch/ppc64/kernel/pSeries_lpar.c~remove_compiler_warnings arch/ppc64/kernel/pSeries_lpar.c --- gr_work/arch/ppc64/kernel/pSeries_lpar.c~remove_compiler_warnings 2004-12-25 21:44:48.291973925 -0600 +++ gr_work-anton/arch/ppc64/kernel/pSeries_lpar.c 2004-12-25 21:45:08.829912888 -0600 @@ -504,7 +504,7 @@ void pSeries_lpar_flush_hash_range(unsig int local) { int i; - unsigned long flags; + unsigned long flags = 0; struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); diff -puN arch/ppc64/kernel/pSeries_setup.c~remove_compiler_warnings arch/ppc64/kernel/pSeries_setup.c --- gr_work/arch/ppc64/kernel/pSeries_setup.c~remove_compiler_warnings 2004-12-25 21:46:35.016298826 -0600 +++ gr_work-anton/arch/ppc64/kernel/pSeries_setup.c 2004-12-25 21:47:05.188173311 -0600 @@ -59,6 +59,7 @@ #include #include #include +#include #include "i8259.h" #include diff -puN arch/ppc64/xmon/start.c~remove_compiler_warnings arch/ppc64/xmon/start.c --- gr_work/arch/ppc64/xmon/start.c~remove_compiler_warnings 2004-12-25 21:48:27.578625901 -0600 +++ gr_work-anton/arch/ppc64/xmon/start.c 2004-12-25 21:48:55.121385858 -0600 @@ -40,7 +40,7 @@ static struct sysrq_key_op sysrq_xmon_op static int __init setup_xmon_sysrq(void) { - __sysrq_put_key_op('x', &sysrq_xmon_op); + register_sysrq_key('x', &sysrq_xmon_op); return 0; } __initcall(setup_xmon_sysrq); _ From anton at samba.org Tue Jan 4 16:13:35 2005 From: anton at samba.org (Anton Blanchard