Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13734
b: refs/heads/master
c: 87655ff
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Nov 10, 2005
1 parent 871e32f commit 2c740d8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1449ed956ae29129bde3e5137dde1d579d585ff
refs/heads/master: 87655ff26817993932b7d049c4df226fb2c0ac5f
18 changes: 14 additions & 4 deletions trunk/arch/powerpc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*
*/

#undef DEBUG

#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
Expand Down Expand Up @@ -64,6 +66,12 @@
#include <asm/vdso.h>
#include <asm/imalloc.h>

#ifdef DEBUG
#define DBG(fmt...) printk(fmt)
#else
#define DBG(fmt...)
#endif

#if PGTABLE_RANGE > USER_VSID_RANGE
#warning Limited user VSID range means pagetable space is wasted
#endif
Expand Down Expand Up @@ -188,14 +196,14 @@ static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags)
}

#ifdef CONFIG_PPC_64K_PAGES
static const int pgtable_cache_size[2] = {
PTE_TABLE_SIZE, PGD_TABLE_SIZE
static const unsigned int pgtable_cache_size[3] = {
PTE_TABLE_SIZE, PMD_TABLE_SIZE, PGD_TABLE_SIZE
};
static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
"pte_pmd_cache", "pgd_cache",
"pte_pmd_cache", "pmd_cache", "pgd_cache",
};
#else
static const int pgtable_cache_size[2] = {
static const unsigned int pgtable_cache_size[2] = {
PTE_TABLE_SIZE, PMD_TABLE_SIZE
};
static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
Expand All @@ -213,6 +221,8 @@ void pgtable_cache_init(void)
int size = pgtable_cache_size[i];
const char *name = pgtable_cache_name[i];

DBG("Allocating page table cache %s (#%d) "
"for size: %08x...\n", name, i, size);
pgtable_cache[i] = kmem_cache_create(name,
size, size,
SLAB_HWCACHE_ALIGN |
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/asm-ppc64/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ extern kmem_cache_t *pgtable_cache[];

#ifdef CONFIG_PPC_64K_PAGES
#define PTE_CACHE_NUM 0
#define PMD_CACHE_NUM 0
#define PGD_CACHE_NUM 1
#define PMD_CACHE_NUM 1
#define PGD_CACHE_NUM 2
#else
#define PTE_CACHE_NUM 0
#define PMD_CACHE_NUM 1
Expand Down

0 comments on commit 2c740d8

Please sign in to comment.