mmap problem another :)
Ok. I did as you say and got that mmap func:
static intmdrv_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?
Quoted 1 line · Dmitriy Tochansky
ret = remap_page_range_high (start, offset, size, vma->vm_page_prot);
Hmmm....this is in 2.4? Did you apply all of the 36-bit IO patch as Pete Popov has mentioned in past e-mail messages? Did you make sure you enabled CONFIG_64BIT_PHYS_ADDR?
I know this does work. In fact, you should just use io_remap_page_range(). If that doesn't work, something is wrong with the kernel configuration.
-- Dan
Quoted 8 lines · Dan Malek
Quoted 1 line · Dmitriy Tochansky
ret = remap_page_range_high (start, offset, size, vma->vm_page_prot);Hmmm....this is in 2.4? Did you apply all of the 36-bit IO patch as Pete Popov has mentioned in past e-mail messages?
The 36 bit patch is integrated in 2.4, and now in 2.6. The above code looks like 2.4.
Pete
Quoted 10 lines
Did you make sure you enabled
CONFIG_64BIT_PHYS_ADDR?I know this does work. In fact, you should just use
io_remap_page_range(). If that doesn't work, something is wrong with the kernel configuration.-- Dan
Quoted 8 lines · On Wed, 8 Dec 2004 12:27:02 -0500 Dan Malek <[email protected]> wrote:
Quoted 2 lines · Dmitriy Tochansky
ret =
remap_page_range_high(start, offset, size,vma->vm_page_prot);Hmmm....this is in 2.4? Did you apply all of the 36-bit IO patch as Pete Popov has mentioned in past e-mail messages?
Could you please direct me where it is exectly? In this maillist? May be on the web?
Quoted 1 line
Did you make sure you enabled
CONFIG_64BIT_PHYS_ADDR?
Yes. I'm sure.