public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Baumann <baumann@optivus.com>
To: linux-kernel@vger.kernel.org
Subject: Problem trying to implement mmap for device on 2.4
Date: Wed, 6 Oct 2004 09:50:39 -0700	[thread overview]
Message-ID: <200410060950.39483.baumann@optivus.com> (raw)

Sorry if this is too much of a noob question - do point me to the right place
if you can.
System: PPC on VME
Attempting driver for 3rd party NVRAM board - it's meant to be used as
a data-store/system-state recorder. Will be used by more than one
processor in the system - each processor is to use a "chunk" of the RAM
as it's scratch space. Or that's the plan.

Based on what I thought I understood from Rubini&Corbet 2nd Edition
I created a simple module, that provided a mmap method - after reserving
the region via request_mem_region.

mapping was done with a simple remap_page_range() 

In userland, the mmap system call is made, with MAP_FIXED
and the kernel immediately fails the call with "cannot allocate memory" - 
never even getting to my implementation of the mmap call. Apparently
dying somewhere during "the good deal of work" Rubini talks about.
If I don't use MAP_FIXED, things 'work', but I need that fixed location,
I'm obviously trying to map the RAM into user space for access.


I'm assuming I'm missing something simple in the setup, somewhere.
Any help/pointers/ even insults accepted - I'm in a tough spot here.

 
-- 
--
#include <std_disclaimer>
Michael Baumann   9518974841
Optivus Technology, Inc.

             reply	other threads:[~2004-10-06 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06 16:50 Michael Baumann [this message]
2004-10-06 17:16 ` Problem trying to implement mmap for device on 2.4 Richard B. Johnson

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=200410060950.39483.baumann@optivus.com \
    --to=baumann@optivus.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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