]> git.hungrycats.org Git - linux/commitdiff
ia64: Patch by Arun Sharma: fix allocation/handling of GDT shared page (the old code
authorDavid Mosberger <davidm@tiger.hpl.hp.com>
Tue, 21 Oct 2003 12:32:29 +0000 (05:32 -0700)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Tue, 21 Oct 2003 12:32:29 +0000 (05:32 -0700)
was inconsistent and in places still assumed there is both a GDT and a TSS
shared page, but the latter was removed a long time ago).

arch/ia64/ia32/binfmt_elf32.c
arch/ia64/ia32/ia32_support.c

index 07938b26c17808ae7b029f3d940d72d3aee1e87a..6511c85a26e752034f3a75c12dc7180bbc939036 100644 (file)
@@ -62,10 +62,7 @@ extern unsigned long *ia32_gdt;
 struct page *
 ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int no_share)
 {
-#      define NUM_SHARED_PAGES (PAGE_SIZE > IA32_PAGE_SIZE ? 1 : 2)
-       struct page *pg = ia32_shared_page[NUM_SHARED_PAGES * smp_processor_id()
-                                          + (address - vma->vm_start)/PAGE_SIZE];
-
+       struct page *pg = ia32_shared_page[smp_processor_id()];
        get_page(pg);
        return pg;
 }
@@ -80,7 +77,7 @@ ia64_elf32_init (struct pt_regs *regs)
        struct vm_area_struct *vma;
 
        /*
-        * Map GDT and TSS below 4GB, where the processor can find them.  We need to map
+        * Map GDT below 4GB, where the processor can find it.  We need to map
         * it with privilege level 3 because the IVE uses non-privileged accesses to these
         * tables.  IA-32 segmentation is used to protect against IA-32 accesses to them.
         */
@@ -88,7 +85,7 @@ ia64_elf32_init (struct pt_regs *regs)
        if (vma) {
                vma->vm_mm = current->mm;
                vma->vm_start = IA32_GDT_OFFSET;
-               vma->vm_end = vma->vm_start + max(PAGE_SIZE, 2*IA32_PAGE_SIZE);
+               vma->vm_end = vma->vm_start + PAGE_SIZE;
                vma->vm_page_prot = PAGE_SHARED;
                vma->vm_flags = VM_READ|VM_MAYREAD;
                vma->vm_ops = &ia32_shared_page_vm_ops;
index 6f32b4e519d9e7be8419bdcc5b6915efb6ecbfc2..9b7f8dfa28c1a3107cc6ee28613d12852f2afe1d 100644 (file)
@@ -30,7 +30,7 @@
 extern void die_if_kernel (char *str, struct pt_regs *regs, long err);
 
 struct exec_domain ia32_exec_domain;
-struct page *ia32_shared_page[(PAGE_ALIGN(IA32_PAGE_SIZE)/PAGE_SIZE) * NR_CPUS];
+struct page *ia32_shared_page[NR_CPUS];
 unsigned long *ia32_boot_gdt;
 unsigned long *cpu_gdt_table[NR_CPUS];