lkml.org 
[lkml]   [2004]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u]
    From
    Date
    On Sun, 2004-10-17 at 12:00 -0700, William Lee Irwin III wrote:
    > On Sun, 2004-10-17 at 02:30 -0700, William Lee Irwin III wrote:
    > >> You need to right shift the argument by PAGE_SHIFT.
    >
    > On Sun, Oct 17, 2004 at 08:35:31PM +0200, Martin Schlemmer [c] wrote:
    > > I am trying to get vesafb-tng to work with rc4-mm1, but are not sure
    > > when to shift the argument by PAGE_SHIFT, and when not to. The patches
    > > from you in rc4-mm1 sometimes shifts the second arg, other times the
    > > third, and other times not at all. Is there a easy way for a mostly
    > > clueless person to figure out when to shift what argument and when not?
    >
    > Please point out where these inconsistencies occur and I will repair
    > them.
    >
    > Only the third argument changed, from a physical address to a pfn.
    >

    Its the vesafb-tng patch
    (http://dev.gentoo.org/~spock/projects/vesafb-tng/)
    Relevant part:

    ----
    vma.vm_mm = current->active_mm;
    vma.vm_page_prot.pgprot = PROT_READ | PROT_EXEC | PROT_WRITE;

    ret = remap_page_range(&vma, 0x000000, __pa(mem), REAL_MEM_SIZE, vma.vm_page_prot);
    ret += remap_page_range(&vma, 0x0a0000, 0x0a0000, 0x100000 - 0x0a0000, vma.vm_page_prot);
    ----

    I did it as:

    ----
    vma.vm_mm = current->active_mm;
    vma.vm_page_prot.pgprot = PROT_READ | PROT_EXEC | PROT_WRITE;

    ret = remap_pfn_range(&vma, 0x000000, __pa(mem) >> PAGE_SHIFT, REAL_MEM_SIZE, vma.vm_page_prot);
    ret += remap_pfn_range(&vma, 0x0a0000, 0x0a0000, 0x100000 - 0x0a0000, vma.vm_page_prot);
    ----


    Thanks,
    --
    Martin Schlemmer

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:0.023 / U:61.104 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site