All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20060425155051.GA19248@sgi.com>

diff --git a/a/1.txt b/N1/1.txt
index b6893ec..d1a3ede 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -30,8 +30,8 @@ On Mon, Apr 24, 2006 at 06:16:26PM -0700, Andrew Morton wrote:
 > > gen_pool allocator not write to the memory being managed. See the
 > > following:
 > > 
-> >   http://marc.theaimsgroup.com/?l=linux-kernel&m\x113518602713125&w=2
-> >   http://marc.theaimsgroup.com/?l=linux-kernel&m\x113533568827916&w=2
+> >   http://marc.theaimsgroup.com/?l=linux-kernel&m=113518602713125&w=2
+> >   http://marc.theaimsgroup.com/?l=linux-kernel&m=113533568827916&w=2
 > 
 > hm, fair enough.
 > 
@@ -59,12 +59,12 @@ test boundary conditions with various contiguous bit lengths.
 Done.
 
 > > +	if (nbytes > PAGE_SIZE) {
-> > +		if (nid = GENALLOC_NID_NONE)
+> > +		if (nid == GENALLOC_NID_NONE)
 > > +			chunk = vmalloc(nbytes);
 > > +		else
 > > +			chunk = vmalloc_node(nbytes, nid);
 > > +	} else {
-> > +		if (nid = GENALLOC_NID_NONE)
+> > +		if (nid == GENALLOC_NID_NONE)
 > > +			chunk = kmalloc(nbytes, GFP_KERNEL);
 > > +		else
 > > +			chunk = kmalloc_node(nbytes, GFP_KERNEL, nid);
@@ -98,7 +98,8 @@ Dean
 
 
 Index: linux-2.6/lib/genalloc.c
-=================================--- linux-2.6.orig/lib/genalloc.c	2006-04-24 12:25:38.086534031 -0500
+===================================================================
+--- linux-2.6.orig/lib/genalloc.c	2006-04-24 12:25:38.086534031 -0500
 +++ linux-2.6/lib/genalloc.c	2006-04-25 10:23:50.568443903 -0500
 @@ -4,10 +4,6 @@
   * Uses for this includes on-device special memory, uncached memory
@@ -224,7 +225,7 @@ Index: linux-2.6/lib/genalloc.c
 +		chunk = kmalloc_node(nbytes, GFP_KERNEL, nid);
 +	}
 +
-+	if (unlikely(chunk = NULL))
++	if (unlikely(chunk == NULL))
 +		return -1;
 +
 +	memset(chunk, 0, nbytes);
@@ -258,7 +259,7 @@ Index: linux-2.6/lib/genalloc.c
 +	int order = pool->min_alloc_order;
 +	int nbits, bit, start_bit, end_bit;
 +
-+	if (size = 0)
++	if (size == 0)
  		return 0;
  
 -	size = max(size, 1 << ALLOC_MIN_SHIFT);
@@ -268,7 +269,7 @@ Index: linux-2.6/lib/genalloc.c
 -
 -	spin_lock_irqsave(&poolp->lock, flags);
 -	while (!h[j].next) {
--		if (s = max_chunk_size) {
+-		if (s == max_chunk_size) {
 -			struct gen_pool_link *ptr;
 -			spin_unlock_irqrestore(&poolp->lock, flags);
 -			ptr = (struct gen_pool_link *)poolp->get_new_chunk(poolp);
@@ -366,7 +367,7 @@ Index: linux-2.6/lib/genalloc.c
 -
 -	spin_lock_irqsave(&poolp->lock, flags);
 -	while (1) {
--		if (s = max_chunk_size) {
+-		if (s == max_chunk_size) {
 -			((struct gen_pool_link *)a)->next = h[i].next;
 -			h[i].next = (struct gen_pool_link *)a;
 -			break;
@@ -412,7 +413,8 @@ Index: linux-2.6/lib/genalloc.c
  }
  EXPORT_SYMBOL(gen_pool_free);
 Index: linux-2.6/include/linux/genalloc.h
-=================================--- linux-2.6.orig/include/linux/genalloc.h	2006-04-24 12:25:38.086534031 -0500
+===================================================================
+--- linux-2.6.orig/include/linux/genalloc.h	2006-04-24 12:25:38.086534031 -0500
 +++ linux-2.6/include/linux/genalloc.h	2006-04-25 09:52:37.038959411 -0500
 @@ -4,37 +4,32 @@
   * Uses for this includes on-device special memory, uncached memory
@@ -468,7 +470,8 @@ Index: linux-2.6/include/linux/genalloc.h
 +extern unsigned long gen_pool_alloc(struct gen_pool *, size_t);
 +extern void gen_pool_free(struct gen_pool *, unsigned long, size_t);
 Index: linux-2.6/arch/ia64/kernel/uncached.c
-=================================--- linux-2.6.orig/arch/ia64/kernel/uncached.c	2006-04-24 12:25:36.230717497 -0500
+===================================================================
+--- linux-2.6.orig/arch/ia64/kernel/uncached.c	2006-04-24 12:25:36.230717497 -0500
 +++ linux-2.6/arch/ia64/kernel/uncached.c	2006-04-24 12:27:56.012899026 -0500
 @@ -1,5 +1,5 @@
  /*
@@ -654,16 +657,16 @@ Index: linux-2.6/arch/ia64/kernel/uncached.c
 +		if (!node_online(nid))
 +			continue;
 +		pool = uncached_pool[nid];
-+		if (pool = NULL)
++		if (pool == NULL)
 +			continue;
 +		do {
 +			uc_addr = gen_pool_alloc(pool, PAGE_SIZE);
 +			if (uc_addr != 0)
 +				return uc_addr;
-+		} while (uncached_add_chunk(pool, nid) = 0);
++		} while (uncached_add_chunk(pool, nid) == 0);
  
 -		for (i = MAX_NUMNODES - 1; i >= 0; i--) {
--			if (i = nid || !node_online(i))
+-			if (i == nid || !node_online(i))
 -				continue;
 -			maddr = gen_pool_alloc(uncached_pool[i], PAGE_SIZE);
 -			dprintk(KERN_DEBUG "uncached_alloc_page alternate search "
@@ -699,7 +702,7 @@ Index: linux-2.6/arch/ia64/kernel/uncached.c
 +	struct gen_pool *pool = uncached_pool[nid];
  
 -	dprintk(KERN_DEBUG "uncached_free_page(%lx) on node %i\n", maddr, node);
-+	if (unlikely(pool = NULL))
++	if (unlikely(pool == NULL))
 +		return;
  
 -	if ((maddr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET)
@@ -775,7 +778,8 @@ Index: linux-2.6/arch/ia64/kernel/uncached.c
  }
  
 Index: linux-2.6/arch/ia64/sn/kernel/sn2/cache.c
-=================================--- linux-2.6.orig/arch/ia64/sn/kernel/sn2/cache.c	2006-04-24 12:25:36.234717101 -0500
+===================================================================
+--- linux-2.6.orig/arch/ia64/sn/kernel/sn2/cache.c	2006-04-24 12:25:36.234717101 -0500
 +++ linux-2.6/arch/ia64/sn/kernel/sn2/cache.c	2006-04-24 12:27:56.012899026 -0500
 @@ -3,11 +3,12 @@
   * License.  See the file "COPYING" in the main directory of this archive
@@ -805,7 +809,7 @@ Index: linux-2.6/arch/ia64/sn/kernel/sn2/cache.c
 +	unsigned long addr = flush_addr;
 +
 +	/* SHub1 requires a cached address */
-+	if (is_shub1() && (addr & RGN_BITS) = RGN_BASE(RGN_UNCACHED))
++	if (is_shub1() && (addr & RGN_BITS) == RGN_BASE(RGN_UNCACHED))
 +		addr = (addr - RGN_BASE(RGN_UNCACHED)) + RGN_BASE(RGN_KERNEL);
 +
 +	flush_icache_range(addr, addr + bytes);
diff --git a/a/content_digest b/N1/content_digest
index 3b07648..aad3b34 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -2,7 +2,7 @@
  "ref\020060424181626.09966912.akpm@osdl.org\0"
  "From\0Dean Nelson <dcn@sgi.com>\0"
  "Subject\0Re: [PATCH] change gen_pool allocator to not touch managed memory\0"
- "Date\0Tue, 25 Apr 2006 15:50:51 +0000\0"
+ "Date\0Tue, 25 Apr 2006 10:50:51 -0500\0"
  "To\0Andrew Morton <akpm@osdl.org>\0"
  "Cc\0tony.luck@intel.com"
   jes@sgi.com
@@ -43,8 +43,8 @@
  "> > gen_pool allocator not write to the memory being managed. See the\n"
  "> > following:\n"
  "> > \n"
- "> >   http://marc.theaimsgroup.com/?l=linux-kernel&m\0213518602713125&w=2\n"
- "> >   http://marc.theaimsgroup.com/?l=linux-kernel&m\0213533568827916&w=2\n"
+ "> >   http://marc.theaimsgroup.com/?l=linux-kernel&m=113518602713125&w=2\n"
+ "> >   http://marc.theaimsgroup.com/?l=linux-kernel&m=113533568827916&w=2\n"
  "> \n"
  "> hm, fair enough.\n"
  "> \n"
@@ -72,12 +72,12 @@
  "Done.\n"
  "\n"
  "> > +\tif (nbytes > PAGE_SIZE) {\n"
- "> > +\t\tif (nid = GENALLOC_NID_NONE)\n"
+ "> > +\t\tif (nid == GENALLOC_NID_NONE)\n"
  "> > +\t\t\tchunk = vmalloc(nbytes);\n"
  "> > +\t\telse\n"
  "> > +\t\t\tchunk = vmalloc_node(nbytes, nid);\n"
  "> > +\t} else {\n"
- "> > +\t\tif (nid = GENALLOC_NID_NONE)\n"
+ "> > +\t\tif (nid == GENALLOC_NID_NONE)\n"
  "> > +\t\t\tchunk = kmalloc(nbytes, GFP_KERNEL);\n"
  "> > +\t\telse\n"
  "> > +\t\t\tchunk = kmalloc_node(nbytes, GFP_KERNEL, nid);\n"
@@ -111,7 +111,8 @@
  "\n"
  "\n"
  "Index: linux-2.6/lib/genalloc.c\n"
- "=================================--- linux-2.6.orig/lib/genalloc.c\t2006-04-24 12:25:38.086534031 -0500\n"
+ "===================================================================\n"
+ "--- linux-2.6.orig/lib/genalloc.c\t2006-04-24 12:25:38.086534031 -0500\n"
  "+++ linux-2.6/lib/genalloc.c\t2006-04-25 10:23:50.568443903 -0500\n"
  "@@ -4,10 +4,6 @@\n"
  "  * Uses for this includes on-device special memory, uncached memory\n"
@@ -237,7 +238,7 @@
  "+\t\tchunk = kmalloc_node(nbytes, GFP_KERNEL, nid);\n"
  "+\t}\n"
  "+\n"
- "+\tif (unlikely(chunk = NULL))\n"
+ "+\tif (unlikely(chunk == NULL))\n"
  "+\t\treturn -1;\n"
  "+\n"
  "+\tmemset(chunk, 0, nbytes);\n"
@@ -271,7 +272,7 @@
  "+\tint order = pool->min_alloc_order;\n"
  "+\tint nbits, bit, start_bit, end_bit;\n"
  "+\n"
- "+\tif (size = 0)\n"
+ "+\tif (size == 0)\n"
  " \t\treturn 0;\n"
  " \n"
  "-\tsize = max(size, 1 << ALLOC_MIN_SHIFT);\n"
@@ -281,7 +282,7 @@
  "-\n"
  "-\tspin_lock_irqsave(&poolp->lock, flags);\n"
  "-\twhile (!h[j].next) {\n"
- "-\t\tif (s = max_chunk_size) {\n"
+ "-\t\tif (s == max_chunk_size) {\n"
  "-\t\t\tstruct gen_pool_link *ptr;\n"
  "-\t\t\tspin_unlock_irqrestore(&poolp->lock, flags);\n"
  "-\t\t\tptr = (struct gen_pool_link *)poolp->get_new_chunk(poolp);\n"
@@ -379,7 +380,7 @@
  "-\n"
  "-\tspin_lock_irqsave(&poolp->lock, flags);\n"
  "-\twhile (1) {\n"
- "-\t\tif (s = max_chunk_size) {\n"
+ "-\t\tif (s == max_chunk_size) {\n"
  "-\t\t\t((struct gen_pool_link *)a)->next = h[i].next;\n"
  "-\t\t\th[i].next = (struct gen_pool_link *)a;\n"
  "-\t\t\tbreak;\n"
@@ -425,7 +426,8 @@
  " }\n"
  " EXPORT_SYMBOL(gen_pool_free);\n"
  "Index: linux-2.6/include/linux/genalloc.h\n"
- "=================================--- linux-2.6.orig/include/linux/genalloc.h\t2006-04-24 12:25:38.086534031 -0500\n"
+ "===================================================================\n"
+ "--- linux-2.6.orig/include/linux/genalloc.h\t2006-04-24 12:25:38.086534031 -0500\n"
  "+++ linux-2.6/include/linux/genalloc.h\t2006-04-25 09:52:37.038959411 -0500\n"
  "@@ -4,37 +4,32 @@\n"
  "  * Uses for this includes on-device special memory, uncached memory\n"
@@ -481,7 +483,8 @@
  "+extern unsigned long gen_pool_alloc(struct gen_pool *, size_t);\n"
  "+extern void gen_pool_free(struct gen_pool *, unsigned long, size_t);\n"
  "Index: linux-2.6/arch/ia64/kernel/uncached.c\n"
- "=================================--- linux-2.6.orig/arch/ia64/kernel/uncached.c\t2006-04-24 12:25:36.230717497 -0500\n"
+ "===================================================================\n"
+ "--- linux-2.6.orig/arch/ia64/kernel/uncached.c\t2006-04-24 12:25:36.230717497 -0500\n"
  "+++ linux-2.6/arch/ia64/kernel/uncached.c\t2006-04-24 12:27:56.012899026 -0500\n"
  "@@ -1,5 +1,5 @@\n"
  " /*\n"
@@ -667,16 +670,16 @@
  "+\t\tif (!node_online(nid))\n"
  "+\t\t\tcontinue;\n"
  "+\t\tpool = uncached_pool[nid];\n"
- "+\t\tif (pool = NULL)\n"
+ "+\t\tif (pool == NULL)\n"
  "+\t\t\tcontinue;\n"
  "+\t\tdo {\n"
  "+\t\t\tuc_addr = gen_pool_alloc(pool, PAGE_SIZE);\n"
  "+\t\t\tif (uc_addr != 0)\n"
  "+\t\t\t\treturn uc_addr;\n"
- "+\t\t} while (uncached_add_chunk(pool, nid) = 0);\n"
+ "+\t\t} while (uncached_add_chunk(pool, nid) == 0);\n"
  " \n"
  "-\t\tfor (i = MAX_NUMNODES - 1; i >= 0; i--) {\n"
- "-\t\t\tif (i = nid || !node_online(i))\n"
+ "-\t\t\tif (i == nid || !node_online(i))\n"
  "-\t\t\t\tcontinue;\n"
  "-\t\t\tmaddr = gen_pool_alloc(uncached_pool[i], PAGE_SIZE);\n"
  "-\t\t\tdprintk(KERN_DEBUG \"uncached_alloc_page alternate search \"\n"
@@ -712,7 +715,7 @@
  "+\tstruct gen_pool *pool = uncached_pool[nid];\n"
  " \n"
  "-\tdprintk(KERN_DEBUG \"uncached_free_page(%lx) on node %i\\n\", maddr, node);\n"
- "+\tif (unlikely(pool = NULL))\n"
+ "+\tif (unlikely(pool == NULL))\n"
  "+\t\treturn;\n"
  " \n"
  "-\tif ((maddr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET)\n"
@@ -788,7 +791,8 @@
  " }\n"
  " \n"
  "Index: linux-2.6/arch/ia64/sn/kernel/sn2/cache.c\n"
- "=================================--- linux-2.6.orig/arch/ia64/sn/kernel/sn2/cache.c\t2006-04-24 12:25:36.234717101 -0500\n"
+ "===================================================================\n"
+ "--- linux-2.6.orig/arch/ia64/sn/kernel/sn2/cache.c\t2006-04-24 12:25:36.234717101 -0500\n"
  "+++ linux-2.6/arch/ia64/sn/kernel/sn2/cache.c\t2006-04-24 12:27:56.012899026 -0500\n"
  "@@ -3,11 +3,12 @@\n"
  "  * License.  See the file \"COPYING\" in the main directory of this archive\n"
@@ -818,7 +822,7 @@
  "+\tunsigned long addr = flush_addr;\n"
  "+\n"
  "+\t/* SHub1 requires a cached address */\n"
- "+\tif (is_shub1() && (addr & RGN_BITS) = RGN_BASE(RGN_UNCACHED))\n"
+ "+\tif (is_shub1() && (addr & RGN_BITS) == RGN_BASE(RGN_UNCACHED))\n"
  "+\t\taddr = (addr - RGN_BASE(RGN_UNCACHED)) + RGN_BASE(RGN_KERNEL);\n"
  "+\n"
  "+\tflush_icache_range(addr, addr + bytes);\n"
@@ -833,4 +837,4 @@
  " }\n"
   EXPORT_SYMBOL(sn_flush_all_caches);
 
-f7499112cadb7f8c82bbd2537b525c31fe780acbdb1a287ab6af62965c25b02c
+a967161d1adfb4e212dc7d2fb9598ee06869e17f09a6482952b63928f313a32e

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.