All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: carsteno@de.ibm.com
Cc: Jes Sorensen <jes@sgi.com>, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [patch] mspec - special memory driver and do_no_pfn handler
Date: Fri, 17 Mar 2006 13:56:02 +0000	[thread overview]
Message-ID: <441ABFF2.5060400@yahoo.com.au> (raw)
In-Reply-To: <441ABEDD.4070003@de.ibm.com>

Carsten Otte wrote:
> Jes Sorensen wrote:
> 
>>Index: linux-2.6/include/linux/mm.h
>>=================================>>--- linux-2.6.orig/include/linux/mm.h
>>+++ linux-2.6/include/linux/mm.h
>>@@ -199,6 +199,7 @@
>> 	void (*open)(struct vm_area_struct * area);
>> 	void (*close)(struct vm_area_struct * area);
>> 	struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
>>+	long (*nopfn)(struct vm_area_struct * area, unsigned long address, int *type);
>> 	int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
>> #ifdef CONFIG_NUMA
>> 	int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
> 
> If you use address as parameter to nopfn, it won't work with highmem
> on 32bit systems. Alternative would be to use (unsigned long) phys. page
> frame number.
> 

It is vaddr, so that should be OK. Return is pfn, which is the important one.

> Your work in memory.c looks like the right thing to do.
> Afaics it will work for xip as well once I figure how to
> do COW. Cool stuff :-).
> 

I think you may be able to use VM_PFNMAP in much the same way as remap_pfn_range
does. You won't be able to support get_user_pages, of course.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: carsteno@de.ibm.com
Cc: Jes Sorensen <jes@sgi.com>, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [patch] mspec - special memory driver and do_no_pfn handler
Date: Sat, 18 Mar 2006 00:56:02 +1100	[thread overview]
Message-ID: <441ABFF2.5060400@yahoo.com.au> (raw)
In-Reply-To: <441ABEDD.4070003@de.ibm.com>

Carsten Otte wrote:
> Jes Sorensen wrote:
> 
>>Index: linux-2.6/include/linux/mm.h
>>===================================================================
>>--- linux-2.6.orig/include/linux/mm.h
>>+++ linux-2.6/include/linux/mm.h
>>@@ -199,6 +199,7 @@
>> 	void (*open)(struct vm_area_struct * area);
>> 	void (*close)(struct vm_area_struct * area);
>> 	struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
>>+	long (*nopfn)(struct vm_area_struct * area, unsigned long address, int *type);
>> 	int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
>> #ifdef CONFIG_NUMA
>> 	int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
> 
> If you use address as parameter to nopfn, it won't work with highmem
> on 32bit systems. Alternative would be to use (unsigned long) phys. page
> frame number.
> 

It is vaddr, so that should be OK. Return is pfn, which is the important one.

> Your work in memory.c looks like the right thing to do.
> Afaics it will work for xip as well once I figure how to
> do COW. Cool stuff :-).
> 

I think you may be able to use VM_PFNMAP in much the same way as remap_pfn_range
does. You won't be able to support get_user_pages, of course.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

  parent reply	other threads:[~2006-03-17 13:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16 16:55 [patch] mspec - special memory driver and do_no_pfn handler Jes Sorensen
2006-03-16 16:55 ` Jes Sorensen
2006-03-17  0:37 ` Andrew Morton
2006-03-17  0:37   ` Andrew Morton
2006-03-17  1:04   ` Linus Torvalds
2006-03-17  1:04     ` Linus Torvalds
2006-03-17  2:13     ` Robin Holt
2006-03-17  2:13       ` Robin Holt
2006-03-17  4:58     ` Benjamin Herrenschmidt
2006-03-17  4:58       ` Benjamin Herrenschmidt
2006-03-17  9:15       ` Jes Sorensen
2006-03-17  9:15         ` Jes Sorensen
2006-03-17 13:29         ` Carsten Otte
2006-03-17 13:29           ` Carsten Otte
2006-03-17 18:03           ` Christoph Hellwig
2006-03-17 18:03             ` Christoph Hellwig
2006-03-17  9:42     ` Jes Sorensen
2006-03-17  9:42       ` Jes Sorensen
2006-03-17 12:29     ` Carsten Otte
2006-03-17 12:29       ` Carsten Otte
2006-03-17 12:28   ` [patch 1/2] do_no_pfn handler (was: Re: [patch] mspec - special memory driver and do_no_pfn handler) Jes Sorensen
2006-03-17 12:28     ` Jes Sorensen
2006-03-17 12:38   ` [patch 2/2] mspec driver " Jes Sorensen
2006-03-17 12:38     ` Jes Sorensen
2006-03-17 13:36     ` [patch 2/2] mspec driver Nick Piggin
2006-03-17 13:36       ` Nick Piggin
2006-03-17 14:04       ` Jes Sorensen
2006-03-17 14:04         ` Jes Sorensen
2006-03-17 14:09         ` Nick Piggin
2006-03-17 14:09           ` Nick Piggin
2006-03-17 14:11           ` Jes Sorensen
2006-03-17 14:11             ` Jes Sorensen
2006-03-17 14:16             ` Nick Piggin
2006-03-17 14:16               ` Nick Piggin
2006-03-17 13:51 ` [patch] mspec - special memory driver and do_no_pfn handler Carsten Otte
2006-03-17 13:51   ` Carsten Otte
2006-03-17 13:53   ` Carsten Otte
2006-03-17 13:53     ` Carsten Otte
2006-03-17 13:56   ` Nick Piggin [this message]
2006-03-17 13:56     ` Nick Piggin
2006-03-17 13:58   ` Jes Sorensen
2006-03-17 13:58     ` Jes Sorensen

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=441ABFF2.5060400@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=carsteno@de.ibm.com \
    --cc=hch@lst.de \
    --cc=jes@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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.