Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138739
b: refs/heads/master
c: 698609b
h: refs/heads/master
i:
  138737: 076febf
  138735: b425fe7
v: v3
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Mar 13, 2009
1 parent 2675ce7 commit 7804dde
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 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: 5c0e6f035df983210e4d22213aed624ced502d3d
refs/heads/master: 698609bdcd35d0641f4c6622c83680ab1a6d67cb
19 changes: 16 additions & 3 deletions trunk/arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,12 @@ static int __init early_ioremap_debug_setup(char *str)
early_param("early_ioremap_debug", early_ioremap_debug_setup);

static __initdata int after_paging_init;
static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss;
#define __FIXADDR_TOP (-PAGE_SIZE)
static pte_t bm_pte[(__fix_to_virt(FIX_DBGP_BASE)
^ __fix_to_virt(FIX_BTMAP_BEGIN)) >> PMD_SHIFT
? PAGE_SIZE / sizeof(pte_t) : 0] __page_aligned_bss;
#undef __FIXADDR_TOP
static __initdata pte_t *bm_ptep;

static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
{
Expand All @@ -502,6 +507,8 @@ static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)

static inline pte_t * __init early_ioremap_pte(unsigned long addr)
{
if (!sizeof(bm_pte))
return &bm_ptep[pte_index(addr)];
return &bm_pte[pte_index(addr)];
}

Expand All @@ -519,8 +526,14 @@ void __init early_ioremap_init(void)
slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);

pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
memset(bm_pte, 0, sizeof(bm_pte));
pmd_populate_kernel(&init_mm, pmd, bm_pte);
if (sizeof(bm_pte)) {
memset(bm_pte, 0, sizeof(bm_pte));
pmd_populate_kernel(&init_mm, pmd, bm_pte);
} else {
bm_ptep = pte_offset_kernel(pmd, 0);
if (early_ioremap_debug)
printk(KERN_INFO "bm_ptep=%p\n", bm_ptep);
}

/*
* The boot-ioremap range spans multiple pmds, for which
Expand Down

0 comments on commit 7804dde

Please sign in to comment.