It is currently Sat, 24 Oct 2020 17:48:21 GMT



 
Author Message
 DMI/APIC updates 1 of 4: boot-time-fixmaps
Linus,

This is part 1 of 4 of a patch set for 2.5.2-pre6 to move the
x86 DMI scan to an earlier point in the boot sequence. This is
motivated by the UP APIC code, which must be disabled on some
machines with broken BIOSen, but there are also other cases that
would benefit from it. Tested. Please apply.

This first patch (patch-boot-time-fixmaps) augments the FIXMAP
mechanism with a set of temporary boot-time maps. These maps are
recycled later, so the address space is not lost permanently.
arch/i386/mm/init.c:set_pte_phys() [used by __set_fixmap()] is
changed to permit reassigning temporary boot-time maps. PAGE_KERNEL
is no longer added automatically, but this is safe since all
callers include it anyway (see <asm-i386/fixmap.h>).

/Mikael

diff -ruN linux-2.5.2-pre6/arch/i386/mm/init.c linux-2.5.2-pre6.boot-time-fixmaps/arch/i386/mm/init.c
--- linux-2.5.2-pre6/arch/i386/mm/init.c        Tue Dec 18 00:40:11 2001
+++ linux-2.5.2-pre6.boot-time-fixmaps/arch/i386/mm/init.c      Wed Jan  2 00:54:04 2002
@@ -128,7 +128,6 @@
 static inline void set_pte_phys (unsigned long vaddr,
                        unsigned long phys, pgprot_t flags)
 {
-       pgprot_t prot;
        pgd_t *pgd;
        pmd_t *pmd;
        pte_t *pte;
@@ -144,10 +143,8 @@
                return;
        }
        pte = pte_offset(pmd, vaddr);
-       if (pte_val(*pte))
-               pte_ERROR(*pte);
-       pgprot_val(prot) = pgprot_val(PAGE_KERNEL) | pgprot_val(flags);
-       set_pte(pte, mk_pte_phys(phys, prot));
+       /* <phys,flags> stored as-is, to permit clearing entries */
+       set_pte(pte, mk_pte_phys(phys, flags));

        /*
         * It's enough to flush this one mapping.
diff -ruN linux-2.5.2-pre6/include/asm-i386/fixmap.h linux-2.5.2-pre6.boot-time-fixmaps/include/asm-i386/fixmap.h
--- linux-2.5.2-pre6/include/asm-i386/fixmap.h  Thu Nov 22 20:46:19 2001
+++ linux-2.5.2-pre6.boot-time-fixmaps/include/asm-i386/fixmap.h        Wed Jan  2 00:54:04 2002
@@ -65,6 +65,11 @@
        FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
        FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
 #endif
+       __end_of_permanent_fixed_addresses,
+       /* temporary boot-time mappings, used before ioremap() is functional */
+#define NR_FIX_BTMAPS  16
+       FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
+       FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1,
        __end_of_fixed_addresses
 };

@@ -86,8 +91,8 @@
  * at the top of mem..
  */
 #define FIXADDR_TOP    (0xffffe000UL)
-#define FIXADDR_SIZE   (__end_of_fixed_addresses << PAGE_SHIFT)
-#define FIXADDR_START  (FIXADDR_TOP - FIXADDR_SIZE)
+#define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
+#define FIXADDR_START  (FIXADDR_TOP - __FIXADDR_SIZE)

 #define __fix_to_virt(x)       (FIXADDR_TOP - ((x) << PAGE_SHIFT))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at   http://www.**-**.com/
Please read the FAQ at   http://www.**-**.com/



 Mon, 21 Jun 2004 03:10:10 GMT   
 
   [ 1 post ] 

Similar Threads

1. DMI/APIC updates 4 of 4: dmi-apic-fixups

2. DMI / local APIC fixes updated

3. Trouble booting: time for BIOS update?

4. unexpected IO-APIC update

5. PATCH] unexpected IO-APIC update

6. [2.5.71] local APIC blacklist rules updates

7. update unexpected IO APIC detection

8. KT333, IO-APIC, Promise Fasttrak, Initrd [UPDATE]

9. 2.4.1-ac UP-APIC updates

10. how to change the bdflush(update) 's update time


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software