From: Dmitriy Tochansky <toch@dfpost.ru>
To: linux-mips@linux-mips.org
Subject: mmap problem another :)
Date: Wed, 8 Dec 2004 19:40:14 +0300 [thread overview]
Message-ID: <20041208194014.1302df6f.toch@dfpost.ru> (raw)
Ok. I did as you say and got that mmap func:
static int
mdrv_mmap (struct file *file, struct vm_area_struct *vma)
{
unsigned long offset = 0;
int ret;
struct inode *inode;
inode = file->f_dentry->d_inode;
struct pci_dev *curdev = NULL;
int minor = MINOR (inode->i_rdev);
printk("minor = 0x%X\n",minor);
curdev = (devs[minor]);
unsigned long start = vma->vm_start;
unsigned long size = (vma->vm_end - vma->vm_start);
offset = pci_resource_start (curdev, IOMEM0);
printk("offset = 0x%X\n",(unsigned int)offset);
ret = remap_page_range_high (start, offset, size, vma->vm_page_prot);
return ret;
}
And it works fine but... but when I try to do mmap not /dev/mboard0 but /dev/mboard1 Im again
have the "bad" result. :( Is there something specific to mmap several devices?
next reply other threads:[~2004-12-08 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 16:40 Dmitriy Tochansky [this message]
2004-12-08 17:27 ` mmap problem another :) Dan Malek
2004-12-08 18:20 ` Pete Popov
2004-12-09 6:56 ` Dmitriy Tochansky
-- strict thread matches above, loose matches on Subject: below --
2004-12-09 13:12 Dmitriy Tochansky
2004-12-09 14:36 ` Dan Malek
2004-12-14 7:51 ` Dmitriy Tochansky
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=20041208194014.1302df6f.toch@dfpost.ru \
--to=toch@dfpost.ru \
--cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.