Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99838
b: refs/heads/master
c: 7c7e6e0
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jun 20, 2008
1 parent 2368371 commit a8fb496
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 26 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: 944256e00a5466ae6b7a11fdb3a47d092f2f62c1
refs/heads/master: 7c7e6e07e2a7c0d2d96389f4f0540e44a80ecdaa
12 changes: 0 additions & 12 deletions trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,6 @@ void __init cleanup_highmap(void)
}
}

/* NOTE: this is meant to be run only at boot */
void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
{
unsigned long address = __fix_to_virt(idx);

if (idx >= __end_of_fixed_addresses) {
printk(KERN_ERR "Invalid __set_fixmap\n");
return;
}
set_pte_phys(address, phys, prot);
}

static unsigned long __initdata table_start;
static unsigned long __meminitdata table_end;

Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/x86/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,17 @@ int ptep_clear_flush_young(struct vm_area_struct *vma,

return young;
}

int fixmaps_set;

void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
{
unsigned long address = __fix_to_virt(idx);

if (idx >= __end_of_fixed_addresses) {
BUG();
return;
}
set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
fixmaps_set++;
}
14 changes: 1 addition & 13 deletions trunk/arch/x86/mm/pgtable_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,6 @@ static int fixmaps;
unsigned long __FIXADDR_TOP = 0xfffff000;
EXPORT_SYMBOL(__FIXADDR_TOP);

void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
{
unsigned long address = __fix_to_virt(idx);

if (idx >= __end_of_fixed_addresses) {
BUG();
return;
}
set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
fixmaps++;
}

/**
* reserve_top_address - reserves a hole in the top of kernel address space
* @reserve - size of hole to reserve
Expand All @@ -166,7 +154,7 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
*/
void reserve_top_address(unsigned long reserve)
{
BUG_ON(fixmaps > 0);
BUG_ON(fixmaps_set > 0);
printk(KERN_INFO "Reserving virtual address space above 0x%08x\n",
(int)-reserve);
__FIXADDR_TOP = -reserve - PAGE_SIZE;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# include "fixmap_64.h"
#endif

extern int fixmaps_set;

extern void __set_fixmap(enum fixed_addresses idx,
unsigned long phys, pgprot_t flags);
#define set_fixmap(idx, phys) \
Expand Down

0 comments on commit a8fb496

Please sign in to comment.