public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arno Geissel <jgeissel@gmx•net>
To: linuxppc-embedded@ozlabs•org
Subject: Re: Bigphysarea vs. kernel 2.4.32 and PPC405GPr
Date: Mon, 15 May 2006 08:35:48 +0200	[thread overview]
Message-ID: <200605150835.48745.jgeissel@gmx.net> (raw)
In-Reply-To: <e435rv$62q$1@sea.gmane.org>

Try

      rc = remap_page_range(vma->vm_start,
 			    virt_to_phys(heap_map_base),
 			    npages*PAGE_SIZE,
 			    vma->vm_page_prot);

Arno

> I'm trying to use the bigphysarea patch to help me allocate big
> physical chunks of memory for use by some custom embedded devices.
> I've applied the bigphysarea-2.4.20 patch and built, no trouble,
> and I've got it to config for my PPC. I can see at boot time that
> the bigphysarea is getting its pages.
>
> I'm trying to use a mmap call to the driver to map a chunk of this
> memory into the process. The mmap for the driver has this:
>
>       pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
>       vma->vm_flags |= VM_RESERVED;
>
>       npages = (vma->vm_end - vma->vm_start) / PAGE_SIZE;
>       heap_map_base = bigphysarea_alloc_pages(npages, 1, GFP_KERNEL);
>
>       printk("XXXX Map base=%p, %ld pages\n", heap_map_base, npages);
>
>       rc = remap_page_range(vma->vm_start,
> 			    (unsigned long)heap_map_base,
> 			    npages*PAGE_SIZE,
> 			    vma->vm_page_prot);
>
> The mmap returns without an error, but any access to the mapped
> region gets me an immediate "Oops: machine check, sig: 7". I don't
> see it. Where is the stupid mistake that I'm invariably making?

  reply	other threads:[~2006-05-15  6:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-12 23:31 Bigphysarea vs. kernel 2.4.32 and PPC405GPr Stephen Williams
2006-05-15  6:35 ` Arno Geissel [this message]
2006-05-17 17:07   ` Stephen Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605150835.48745.jgeissel@gmx.net \
    --to=jgeissel@gmx$(echo .)net \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox