Dave, this patch is against 2.6.24-rc6-mm1. You said git-drm had rewritten this area,
but the patch didn't have any rejects and seems to run fine here (although I'm not
exactly sure how to exercise drm too well).Anyway, please apply.
--
drm: nopage
Convert drm from nopage to fault.
Remove redundant vma range checks.Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: airlied@linux.ie
Cc: linux-kernel@vger.kernel.org
---
drivers/char/drm/drm_vm.c | 131 +++++++++++++++++++++-------------------------
1 file changed, 61 insertions(+), 70 deletions(-)Index: linux-2.6/drivers/char/drm/drm_vm.c
===================================================================
--- linux-2.6.orig/drivers/char/drm/drm_vm.c
+++ linux-2.6/drivers/char/drm/drm_vm.c
@@ -70,7 +70,7 @@ static pgprot_t drm_io_prot(uint32_t map
}/**
- * \c nopage method for AGP virtual memory.
+ * \c fault method for AGP virtual memory.
*
* \param vma virtual memory area.
* \param address access address.
@@ -80,8 +80,8 @@ static pgprot_t drm_io_prot(uint32_t map
* map, get the page, increment the use count and return it.
*/
#if __OS_HAS_AGP
-static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma,
- unsigned long address)
+static __inline__ int drm_do_vm_fault(struct vm_area_struct *vma,
+ struct vm_fault *vmf)
{
struct drm_file *priv = vma->vm_file->private_data;
struct drm_device *dev = priv->head->dev;
@@ -93,19 +93,24 @@ static __inline__ struct page *drm_do_vm
* Find the right map
*/
if (!drm_core_has_AGP(dev))
- goto vm_nopage_error;
+ goto vm_fault_error;if (!dev->agp || !dev->agp->cant_use_aperture)
- goto vm_nopage_error;
+ goto vm_fault_error;if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash))
- goto vm_nopage_error;
+ goto vm_fault_error;r_list = drm_hash_entry(hash, struct drm_map_list, hash);
map = r_list->map;if (map && map->type == ...
Hi Nick,
there should be a new nopage method added though which you need to
convert..--
Well they're all gone.. ;)
There is a nopfn method which I converted in a subsequent patch I sent you.
Maybe that's what you mean?Thanks,
--
Ah thats what it was, we added a nopfn not a nopage..
Thanks,
--
Patch against 2.6.24-rc6-mm1... nothing in your tree appears to use nopage.
This patch should transfer without rejects upstream, so it shouldn't be too
difficult.Would be nice to get in 2.6.25 if we can.
---
mm: remove nopage
Nothing in the tree uses nopage any more. Remove support for it in the
core mm code and documentation (and a few stray references to it in comments).Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
Documentation/feature-removal-schedule.txt | 9 --------
Documentation/filesystems/Locking | 3 --
drivers/media/video/vino.c | 2 -
drivers/video/vermilion/vermilion.c | 5 ++--
include/linux/mm.h | 8 -------
mm/memory.c | 32 ++++++++++-------------------
mm/mincore.c | 2 -
mm/mmap.c | 20 +++++++++---------
mm/rmap.c | 1
9 files changed, 27 insertions(+), 55 deletions(-)Index: linux-2.6/include/linux/mm.h
===================================================================
--- linux-2.6.orig/include/linux/mm.h
+++ linux-2.6/include/linux/mm.h
@@ -166,8 +166,6 @@ struct vm_operations_struct {
void (*open)(struct vm_area_struct * area);
void (*close)(struct vm_area_struct * area);
int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
- struct page *(*nopage)(struct vm_area_struct *area,
- unsigned long address, int *type);
unsigned long (*nopfn)(struct vm_area_struct *area,
unsigned long address);@@ -642,12 +640,6 @@ static inline int page_mapped(struct pag
}/*
- * Error return values for the *_nopage functions
- */
-#define NOPAGE_SIGBUS (NULL)
-#define NOPAGE_OOM ((struct page *) (-1))
-
-/*
* Error return values for the *_nopfn functions
*/
#define NOPFN_SIGBUS ((unsigned long) -1)
Index: linux-2.6/mm/memory.c
===============...
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
