mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/11] PPC64: remove the page table size from the naca
Date: Tue, 4 Jan 2005 15:08:33 +1100	[thread overview]
Message-ID: <20050104150833.5d3f3722.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20050104150410.199b132e.sfr@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 5553 bytes --]

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 <sfr@canb.auug.org.au>
-- 
Cheers,
Stephen Rothwell                    sfr@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 <asm/mmu_context.h>
 #include <asm/ppcdebug.h>
 #include <asm/iommu.h>
-#include <asm/naca.h>
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
 #include <asm/prom.h>
@@ -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 <asm/iommu.h>
 #include <asm/serial.h>
 #include <asm/cache.h>
+#include <asm/page.h>
 
 #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 <asm/types.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/naca.h>
 #include <asm/machdep.h>
 #include <asm/lmb.h>
 #include <asm/abs_addr.h>
@@ -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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-01-04  4:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-04  3:53 PPC64 cleanups 0/11 Stephen Rothwell
2005-01-04  4:04 ` [PATCH 1/11] PPC64: Consolidate cache sizing variables Stephen Rothwell
2005-01-04  4:08   ` Stephen Rothwell [this message]
2005-01-04  4:12     ` [PATCH 3/11] PPC64: remove interrupt_controller from naca Stephen Rothwell
2005-01-04  4:19       ` [PATCH 4/11] PPC64: remove /proc/ppc64/{naca,paca/xx} Stephen Rothwell
2005-01-04  4:23         ` [PATCH 5/11] PPC64: remove the paca pointer form the naca Stephen Rothwell
2005-01-04  4:27           ` [PATCH 6/11] PPC64: remove serialPortAddr from " Stephen Rothwell
2005-01-04  4:31             ` [PATCH 7/11] PPC64: remove debug_switch " Stephen Rothwell
2005-01-04  4:34               ` [PATCH 8/11] PPC64: remove the naca from all but iSeries Stephen Rothwell
2005-01-04  4:37                 ` [PATCH 9/11] PPC64: use xPMCRegsInUse Stephen Rothwell
2005-01-04  4:40                   ` [PATCH 10/11] PPC64: move the lppaca defining header file Stephen Rothwell
2005-01-04  4:43                     ` [PATCH 11/11] PPC64: remove StudlyCaps from lppaca structure Stephen Rothwell
2005-01-04 11:58                       ` [PATCH] PPC64: use c99 initializers Stephen Rothwell
2005-01-04 12:05                         ` [PATCH] PPC64: tidy up the htab_data structure Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050104150833.5d3f3722.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®