[folded] lib-genallocc-add-support-for-specifying-the-physical-address-v2.patch removed from -mm tree

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

 



The patch titled
     lib-genallocc-add-support-for-specifying-the-physical-address-v2
has been removed from the -mm tree.  Its filename was
     lib-genallocc-add-support-for-specifying-the-physical-address-v2.patch

This patch was dropped because it was folded into lib-genallocc-add-support-for-specifying-the-physical-address.patch

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: lib-genallocc-add-support-for-specifying-the-physical-address-v2
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>

	update documentation
	use phys_addr_t for physical addr

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
Cc: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>
Cc: Patrice VILCHEZ <patrice.vilchez@xxxxxxxxx>
Cc: Jes Sorensen <jes@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/genalloc.h |   10 ++++++----
 lib/genalloc.c           |   12 ++++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff -puN include/linux/genalloc.h~lib-genallocc-add-support-for-specifying-the-physical-address-v2 include/linux/genalloc.h
--- a/include/linux/genalloc.h~lib-genallocc-add-support-for-specifying-the-physical-address-v2
+++ a/include/linux/genalloc.h
@@ -26,15 +26,15 @@ struct gen_pool {
 struct gen_pool_chunk {
 	spinlock_t lock;
 	struct list_head next_chunk;	/* next chunk in pool */
-	unsigned long phys_addr;	/* physical starting address of memory chunk */
+	phys_addr_t phys_addr;		/* physical starting address of memory chunk */
 	unsigned long start_addr;	/* starting address of memory chunk */
 	unsigned long end_addr;		/* ending address of memory chunk */
 	unsigned long bits[0];		/* bitmap for allocating memory chunk */
 };
 
 extern struct gen_pool *gen_pool_create(int, int);
-extern unsigned long gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long);
-extern int gen_pool_add_virt(struct gen_pool *, unsigned long, unsigned long,
+extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long);
+extern int gen_pool_add_virt(struct gen_pool *, unsigned long, phys_addr_t,
 			     size_t, int);
 /**
  * gen_pool_add - add a new chunk of special memory to the pool
@@ -45,11 +45,13 @@ extern int gen_pool_add_virt(struct gen_
  *       allocated on, or -1
  *
  * Add a new chunk of special memory to the specified pool.
+ *
+ * Returns 0 on success or a -ve errno on failure.
  */
 static inline int gen_pool_add(struct gen_pool *pool, unsigned long addr,
 			       size_t size, int nid)
 {
-	return gen_pool_add_virt(pool, addr, 0, size, nid);
+	return gen_pool_add_virt(pool, addr, -1, size, nid);
 }
 extern void gen_pool_destroy(struct gen_pool *);
 extern unsigned long gen_pool_alloc(struct gen_pool *, size_t);
diff -puN lib/genalloc.c~lib-genallocc-add-support-for-specifying-the-physical-address-v2 lib/genalloc.c
--- a/lib/genalloc.c~lib-genallocc-add-support-for-specifying-the-physical-address-v2
+++ a/lib/genalloc.c
@@ -48,8 +48,10 @@ EXPORT_SYMBOL(gen_pool_create);
  *       allocated on, or -1
  *
  * Add a new chunk of special memory to the specified pool.
+ *
+ * Returns 0 on success or a -ve errno on failure.
  */
-int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, unsigned long phys,
+int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phys,
 		 size_t size, int nid)
 {
 	struct gen_pool_chunk *chunk;
@@ -59,7 +61,7 @@ int gen_pool_add_virt(struct gen_pool *p
 
 	chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid);
 	if (unlikely(chunk == NULL))
-		return -1;
+		return -ENOMEM;
 
 	spin_lock_init(&chunk->lock);
 	chunk->phys_addr = phys;
@@ -78,8 +80,10 @@ EXPORT_SYMBOL(gen_pool_add_virt);
  * gen_pool_virt_to_phys - return the physical address of memory
  * @pool: pool to allocate from
  * @addr: starting address of memory
+ *
+ * Returns the physical address on success, or -1 on error.
  */
-unsigned long gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long addr)
+phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long addr)
 {
 	struct list_head *_chunk;
 	struct gen_pool_chunk *chunk;
@@ -93,7 +97,7 @@ unsigned long gen_pool_virt_to_phys(stru
 	}
 	read_unlock(&pool->lock);
 
-	return ~0UL;
+	return -1;
 }
 EXPORT_SYMBOL(gen_pool_virt_to_phys);
 
_

Patches currently in -mm which might be from plagnioj@xxxxxxxxxxxx are

origin.patch
include-linux-genalloch-add-multiple-inclusion-guards.patch
lib-genallocc-add-support-for-specifying-the-physical-address.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