2006-03-16 15:42:30

by Brian D. McGrew

[permalink] [raw]
Subject: remap_page_range() vs. remap_pfn_range()

I've seen the change in the kernel for this call so I changed my device
drive to use the new call and now every time I access the device the
machine gets really unstable and crashes after a minute or so.

When changing over the call, what else do I need to change? All I did
was change the one call to the other. Do I have to do anything else?

If someone can't help me, can anybody recommend a consultant that I can
hire to get this working? I've already wasted three months on something
that is way beyond me.

TIA,

:b!

Brian D. McGrew { [email protected] || [email protected] }
--
> Those of you who think you know it all,
really annoy those of us who do!


2006-03-16 15:50:58

by Arjan van de Ven

[permalink] [raw]
Subject: Re: remap_page_range() vs. remap_pfn_range()

On Thu, 2006-03-16 at 07:42 -0800, Brian D. McGrew wrote:
> I've seen the change in the kernel for this call so I changed my device
> drive to use the new call and now every time I access the device the
> machine gets really unstable and crashes after a minute or so.

you forgot to post the URL to your source code, so how can we help you?



2006-03-16 16:13:21

by linux-os (Dick Johnson)

[permalink] [raw]
Subject: Re: remap_page_range() vs. remap_pfn_range()


On Thu, 16 Mar 2006, Brian D. McGrew wrote:

> I've seen the change in the kernel for this call so I changed my device
> drive to use the new call and now every time I access the device the
> machine gets really unstable and crashes after a minute or so.
>
> When changing over the call, what else do I need to change? All I did
> was change the one call to the other. Do I have to do anything else?
>
> If someone can't help me, can anybody recommend a consultant that I can
> hire to get this working? I've already wasted three months on something
> that is way beyond me.
>
> TIA,
>
> :b!
>
> Brian D. McGrew { [email protected] || [email protected] }
> --
>> Those of you who think you know it all,
> really annoy those of us who do!

Look at the prototype(s)! One takes elements from a structure. The
newer(s) one take both elements from a structure PLUS a pointer to
the structure itself ... plus .... !

Here are some macros for various kernel versions....

Linux-2.6.10 to linux-current
#define REMAP(a,b,c,d,e) remap_pfn_range((a), (b), (c) >> PAGE_SHIFT, (d), (e))

Linux-2.6.9 Linux-2.6.8
#define REMAP(a,b,c,d,e) remap_page_range((a), (b), (c), (d), (e))

Linux-2.4.n to linux-2.6.5
#define REMAP(a,b,c,d,e) remap_page_range((b), (c), (d), (e))


Cheers,
Dick Johnson
Penguin : Linux version 2.6.15.4 on an i686 machine (5589.54 BogoMips).
Warning : 98.36% of all statistics are fiction, book release in April.
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.

2006-03-16 16:25:02

by Randy Dunlap

[permalink] [raw]
Subject: Re: remap_page_range() vs. remap_pfn_range()

On Thu, 16 Mar 2006 16:50:55 +0100 Arjan van de Ven wrote:

> On Thu, 2006-03-16 at 07:42 -0800, Brian D. McGrew wrote:
> > I've seen the change in the kernel for this call so I changed my device
> > drive to use the new call and now every time I access the device the
> > machine gets really unstable and crashes after a minute or so.
>
> you forgot to post the URL to your source code, so how can we help you?

You changed the function name and didn't change any parameters?

The page parameter must also be modified to become
a <pfn> parameter, e.g., change <page> to
page >> PAGE_SHIFT

however, yes, any other help would need source code.

---
~Randy