+ vm-agp-remove-private-page-protection-map.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     vm/agp: remove private page protection map

has been added to the -mm tree.  Its filename is

     vm-agp-remove-private-page-protection-map.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: vm/agp: remove private page protection map
From: Dave Airlie <airlied@xxxxxxxx>

AGP keeps its own copy of the protection_map, upcoming DRM changes will
also require access to this map from modules.

Signed-off-by: Dave Airlie <airlied@xxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Cc: Hugh Dickins <hugh@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/agp/frontend.c |    8 +-------
 include/linux/mm.h          |    1 +
 mm/mmap.c                   |    6 ++++++
 3 files changed, 8 insertions(+), 7 deletions(-)

diff -puN drivers/char/agp/frontend.c~vm-agp-remove-private-page-protection-map drivers/char/agp/frontend.c
--- a/drivers/char/agp/frontend.c~vm-agp-remove-private-page-protection-map
+++ a/drivers/char/agp/frontend.c
@@ -157,12 +157,6 @@ static void agp_add_seg_to_client(struct
  * some routine which does the conversion for you
  */
 
-static const pgprot_t my_protect_map[16] =
-{
-	__P000, __P001, __P010, __P011, __P100, __P101, __P110, __P111,
-	__S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111
-};
-
 static pgprot_t agp_convert_mmap_flags(int prot)
 {
 #define _trans(x,bit1,bit2) \
@@ -177,7 +171,7 @@ static pgprot_t agp_convert_mmap_flags(i
 
 	prot_bits |= VM_SHARED;
 
-	temp = my_protect_map[prot_bits & 0x0000000f];
+	temp = vm_get_page_prot(prot_bits & 0x0000000f);
 
 	return temp;
 }
diff -puN include/linux/mm.h~vm-agp-remove-private-page-protection-map include/linux/mm.h
--- a/include/linux/mm.h~vm-agp-remove-private-page-protection-map
+++ a/include/linux/mm.h
@@ -1053,6 +1053,7 @@ static inline unsigned long vma_pages(st
 	return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
 }
 
+pgprot_t vm_get_page_prot(u8 vm_flags);
 struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
 struct page *vmalloc_to_page(void *addr);
 unsigned long vmalloc_to_pfn(void *addr);
diff -puN mm/mmap.c~vm-agp-remove-private-page-protection-map mm/mmap.c
--- a/mm/mmap.c~vm-agp-remove-private-page-protection-map
+++ a/mm/mmap.c
@@ -60,6 +60,12 @@ pgprot_t protection_map[16] = {
 	__S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111
 };
 
+pgprot_t vm_get_page_prot(u8 vm_flags)
+{
+	return protection_map[vm_flags];
+}
+EXPORT_SYMBOL(vm_get_page_prot);
+
 int sysctl_overcommit_memory = OVERCOMMIT_GUESS;  /* heuristic overcommit */
 int sysctl_overcommit_ratio = 50;	/* default is 50% */
 int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
_

Patches currently in -mm which might be from airlied@xxxxxxxx are

vm-agp-remove-private-page-protection-map.patch
allow-drm-detection-of-new-via-chipsets.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux