: { 2.5 } Correcting comment in include/asm-i386/tlbflush.h

: { 2.5 } Correcting comment in include/asm-i386/tlbflush.h

Post by Manik Rain » Tue, 02 Jul 2002 20:40:06



    TLB flush happens when the CR3 register is written to. Comment is
misleading ....

[ tlb.diff 1K ]
diff -u -U 6 -r linux-2.5.24/include/asm-i386/tlbflush.h nice/include/asm-i386/tlbflush.h
--- linux-2.5.24/include/asm-i386/tlbflush.h    Fri Jun 21 04:23:51 2002

 #define __flush_tlb()                                                  \
        do {                                                            \
                unsigned int tmpreg;                                    \
                                                                        \
                __asm__ __volatile__(                                   \
-                       "movl %%cr3, %0;  # flush TLB \n"             \
-                       "movl %0, %%cr3;              \n"             \
+                       "movl %%cr3, %0;              \n"             \
+                       "movl %0, %%cr3;  # flush TLB \n"             \
                        : "=r" (tmpreg)                                       \
                        :: "memory");                                 \
        } while (0)

 /*

 #define __flush_tlb_global()                                           \
        do {                                                            \
                unsigned int tmpreg;                                    \
                                                                        \
                __asm__ __volatile__(                                   \
                        "movl %1, %%cr4;  # turn off PGE     \n"      \
-                       "movl %%cr3, %0;  # flush TLB        \n"      \
-                       "movl %0, %%cr3;                     \n"      \
+                       "movl %%cr3, %0;                     \n"      \
+                       "movl %0, %%cr3;  # flush TLB        \n"      \
                        "movl %2, %%cr4;  # turn PGE back on \n"      \
                        : "=&r" (tmpreg)                          \
                        : "r" (mmu_cr4_features & ~X86_CR4_PGE),  \
                          "r" (mmu_cr4_features)                      \
                        : "memory");                                  \
        } while (0)