summaryrefslogtreecommitdiffstats
path: root/arch/i386/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /arch/i386/mm
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'arch/i386/mm')
-rw-r--r--arch/i386/mm/fault.c6
-rw-r--r--arch/i386/mm/init.c9
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index c4955d724..358ff5033 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -6,7 +6,6 @@
#include <linux/signal.h>
#include <linux/sched.h>
-#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
@@ -76,7 +75,8 @@ bad_area:
return 0;
}
-asmlinkage void do_invalid_op (struct pt_regs *, unsigned long);
+asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
+extern unsigned long idt;
/*
* This routine handles page faults. It determines the address,
@@ -186,7 +186,7 @@ bad_area:
if (boot_cpu_data.f00f_bug) {
unsigned long nr;
- nr = (address - (unsigned long) idt) >> 3;
+ nr = (address - idt) >> 3;
if (nr == 6) {
do_invalid_op(regs, 0);
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index b4cba8730..aed7ecc55 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -7,7 +7,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
-#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
@@ -220,7 +219,7 @@ static unsigned long __init fixmap_init(unsigned long start_mem)
for (idx=1; idx <= __end_of_fixed_addresses; idx += PTRS_PER_PTE)
{
- address = fix_to_virt(__end_of_fixed_addresses-idx);
+ address = __fix_to_virt(__end_of_fixed_addresses-idx);
pg_dir = swapper_pg_dir + (address >> PGDIR_SHIFT);
memset((void *)start_mem, 0, PAGE_SIZE);
pgd_val(*pg_dir) = _PAGE_TABLE | __pa(start_mem);
@@ -246,8 +245,12 @@ static void set_pte_phys (unsigned long vaddr, unsigned long phys)
void set_fixmap (enum fixed_addresses idx, unsigned long phys)
{
- unsigned long address = fix_to_virt(idx);
+ unsigned long address = __fix_to_virt(idx);
+ if (idx >= __end_of_fixed_addresses) {
+ printk("Invalid set_fixmap\n");
+ return;
+ }
set_pte_phys (address,phys);
}