lkml.org 
[lkml]   [2009]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[Bug Fix]: Do 32-bit table calculations in pre-processor
    Date
    Here is one I have found useful in my VIA processor bug hunting:

    diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
    index 3068388..2303d86 100644
    --- a/arch/x86/kernel/head_32.S
    +++ b/arch/x86/kernel/head_32.S
    @@ -61,7 +61,7 @@

    /* Enough space to fit pagetables for the low memory linear map */
    MAPPING_BEYOND_END = \
    - PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
    + PAGE_TABLE_SIZE((1<<20) - (__PAGE_OFFSET >> PAGE_SHIFT)) << PAGE_SHIFT

    /*
    * Worst-case size of the kernel mapping we need to make:
    = = =

    Before:

    #5 [0000010000 - 0000011000] PGTABLE ==> [0000010000 - 0000011000]
    #6 [0000011000 - 0000015000] BOOTMAP ==> [0000011000 - 0000015000]
    After:

    #5 [0000010000 - 000007d000] PGTABLE ==> [0000010000 - 000007d000]
    #6 [000007d000 - 0000081000] BOOTMAP ==> [000007d000 - 0000081000]
    Someone who knows mm check which is the reasonable value please.

    Mike


    \
     
     \ /
      Last update: 2009-07-03 20:17    [W:4.060 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site