rpms/kernel/devel linux-2.6-export-shmem-bits-for-gem.patch, NONE, 1.1 kernel.spec, 1.732, 1.733 linux-2.6-ia64-export-account_system_vtime.patch, 1.1, NONE

Kristian Høgsberg (krh) fedora-extras-commits at redhat.com
Thu Jul 3 23:07:49 UTC 2008


Author: krh

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25346

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-export-shmem-bits-for-gem.patch 
Removed Files:
	linux-2.6-ia64-export-account_system_vtime.patch 
Log Message:
* Thu Jul  3 2008 Kristian Høgsberg <krh at redhat.com>
- Add linux-2.6-export-shmem-bits-for-gem.patch to export
  shmmem_getpage and shmem_file_setup for GEM.  For now this will let
  use GEM from the drm tree against the system kernel, but eventually
  we'll pull in the GEM patches here.
- Drop account_system_vtime export patch, now upstream.


linux-2.6-export-shmem-bits-for-gem.patch:

--- NEW FILE linux-2.6-export-shmem-bits-for-gem.patch ---
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c31a9cd..d3466e9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -713,6 +713,17 @@ static inline int shmem_lock(struct file *file, int lock,
 #endif
 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
 
+/* Flag allocation requirements to shmem_getpage and shmem_swp_alloc */
+enum sgp_type {
+	SGP_READ,	/* don't exceed i_size, don't allocate page */
+	SGP_CACHE,	/* don't exceed i_size, may allocate page */
+	SGP_DIRTY,	/* like SGP_CACHE, but set new page dirty */
+	SGP_WRITE,	/* may exceed i_size, may allocate page */
+};
+
+extern int shmem_getpage(struct inode *inode, unsigned long idx,
+			 struct page **pagep, enum sgp_type sgp, int *type);
+
 int shmem_zero_setup(struct vm_area_struct *);
 
 #ifndef CONFIG_MMU
diff --git a/mm/shmem.c b/mm/shmem.c
index e2a6ae1..b283554 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -77,14 +77,6 @@
 /* Pretend that each entry is of this size in directory's i_size */
 #define BOGO_DIRENT_SIZE 20
 
-/* Flag allocation requirements to shmem_getpage and shmem_swp_alloc */
-enum sgp_type {
-	SGP_READ,	/* don't exceed i_size, don't allocate page */
-	SGP_CACHE,	/* don't exceed i_size, may allocate page */
-	SGP_DIRTY,	/* like SGP_CACHE, but set new page dirty */
-	SGP_WRITE,	/* may exceed i_size, may allocate page */
-};
-
 #ifdef CONFIG_TMPFS
 static unsigned long shmem_default_max_blocks(void)
 {
@@ -97,9 +89,6 @@ static unsigned long shmem_default_max_inodes(void)
 }
 #endif
 
-static int shmem_getpage(struct inode *inode, unsigned long idx,
-			 struct page **pagep, enum sgp_type sgp, int *type);
-
 static inline struct page *shmem_dir_alloc(gfp_t gfp_mask)
 {
 	/*
@@ -1173,8 +1162,8 @@ static inline struct mempolicy *shmem_get_sbmpol(struct shmem_sb_info *sbinfo)
  * vm. If we swap it in we mark it dirty since we also free the swap
  * entry since a page cannot live in both the swap and page cache
  */
-static int shmem_getpage(struct inode *inode, unsigned long idx,
-			struct page **pagep, enum sgp_type sgp, int *type)
+int shmem_getpage(struct inode *inode, unsigned long idx,
+		  struct page **pagep, enum sgp_type sgp, int *type)
 {
 	struct address_space *mapping = inode->i_mapping;
 	struct shmem_inode_info *info = SHMEM_I(inode);
@@ -1421,6 +1410,7 @@ failed:
 	}
 	return error;
 }
+EXPORT_SYMBOL(shmem_getpage);
 
 static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
@@ -2558,6 +2548,7 @@ put_memory:
 	shmem_unacct_size(flags, size);
 	return ERR_PTR(error);
 }
+EXPORT_SYMBOL(shmem_file_setup);
 
 /**
  * shmem_zero_setup - setup a shared anonymous mapping


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.732
retrieving revision 1.733
diff -u -r1.732 -r1.733
--- kernel.spec	3 Jul 2008 17:54:55 -0000	1.732
+++ kernel.spec	3 Jul 2008 23:06:54 -0000	1.733
@@ -633,6 +633,7 @@
 Patch1515: linux-2.6-lirc.patch
 
 # nouveau + drm fixes
+Patch1800: linux-2.6-export-shmem-bits-for-gem.patch
 Patch1801: linux-2.6-drm-git-mm.patch
 Patch1803: nouveau-drm.patch
 Patch1804: nouveau-drm-update.patch
@@ -665,8 +666,6 @@
 Patch2600: linux-2.6-merge-efifb-imacfb.patch
 Patch2610: linux-2.6-x86-efi-fix-low-mappings.patch
 
-Patch2700: linux-2.6-ia64-export-account_system_vtime.patch
-
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1172,6 +1171,8 @@
 #ApplyPatch linux-2.6-netdev-atl2.patch
 
 # Nouveau DRM + drm fixes
+ApplyPatch linux-2.6-export-shmem-bits-for-gem.patch
+
 #ApplyPatch linux-2.6-drm-git-mm.patch
 #ApplyPatch nouveau-drm.patch
 #ApplyPatch nouveau-drm-update.patch
@@ -1200,9 +1201,6 @@
 # fix efi boot
 ApplyPatch linux-2.6-x86-efi-fix-low-mappings.patch
 
-# export account_system_vtime() on IA64
-ApplyPatch linux-2.6-ia64-export-account_system_vtime.patch
-
 # ---------- below all scheduled for 2.6.24 -----------------
 
 # END OF PATCH APPLICATIONS
@@ -1796,6 +1794,13 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Thu Jul  3 2008 Kristian Høgsberg <krh at redhat.com>
+- Add linux-2.6-export-shmem-bits-for-gem.patch to export
+  shmmem_getpage and shmem_file_setup for GEM.  For now this will let
+  use GEM from the drm tree against the system kernel, but eventually
+  we'll pull in the GEM patches here.
+- Drop account_system_vtime export patch, now upstream.
+
 * Thu Jul 03 2008 John W. Linville <linville at redhat.com>
 - Upstream wireless fixes from 2008-07-02
   (http://marc.info/?l=linux-netdev&m=121503163124089&w=2)


--- linux-2.6-ia64-export-account_system_vtime.patch DELETED ---




More information about the fedora-extras-commits mailing list