public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trivial ia64 numa/discontig fixes
@ 2003-10-22 21:46 Alex Williamson
  2003-10-22 21:58 ` Jesse Barnes
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2003-10-22 21:46 UTC (permalink / raw)
  To: linux-ia64


   I stumbled on a couple trivial bugs in ia64 numa/discontig support. 
The first just sets the default number of nodes to something reasonable
for a generic kernel, otherwise it's really easy to start walking over
your initdata (more error checking should probably be added).  The
second fixes a memcpy to a physical address.  Patch below, please
apply.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab

--- linux-2.5/include/asm-ia64/numnodes.h	Wed Oct 22 15:14:03 2003
+++ linux-2.5/include/asm-ia64/numnodes.h	Wed Oct 22 13:26:08 2003
@@ -4,7 +4,7 @@
 #ifdef CONFIG_IA64_DIG
 /* Max 8 Nodes */
 #define NODES_SHIFT	3
-#elif defined(CONFIG_IA64_SGI_SN2)
+#elif defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_GENERIC)
 /* Max 128 Nodes */
 #define NODES_SHIFT	7
 #endif
--- linux-2.5/arch/ia64/mm/discontig.c	Wed Oct 22 15:13:48 2003
+++ linux-2.5/arch/ia64/mm/discontig.c	Wed Oct 22 15:16:42 2003
@@ -186,7 +186,7 @@
 			 */
 			for (cpu = 0; cpu < NR_CPUS; cpu++) {
 				if (node = node_cpuid[cpu].nid) {
-					memcpy(cpu_data, __phys_per_cpu_start,
+					memcpy(__va(cpu_data), __phys_per_cpu_start,
 					       __per_cpu_end-__per_cpu_start);
 					__per_cpu_offset[cpu]  						(char*)__va(cpu_data) -



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] trivial ia64 numa/discontig fixes
  2003-10-22 21:46 [PATCH] trivial ia64 numa/discontig fixes Alex Williamson
@ 2003-10-22 21:58 ` Jesse Barnes
  0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2003-10-22 21:58 UTC (permalink / raw)
  To: linux-ia64

On Wed, Oct 22, 2003 at 03:46:21PM -0600, Alex Williamson wrote:
> --- linux-2.5/arch/ia64/mm/discontig.c	Wed Oct 22 15:13:48 2003
> +++ linux-2.5/arch/ia64/mm/discontig.c	Wed Oct 22 15:16:42 2003
> @@ -186,7 +186,7 @@
>  			 */
>  			for (cpu = 0; cpu < NR_CPUS; cpu++) {
>  				if (node = node_cpuid[cpu].nid) {
> -					memcpy(cpu_data, __phys_per_cpu_start,
> +					memcpy(__va(cpu_data), __phys_per_cpu_start,
>  					       __per_cpu_end-__per_cpu_start);
>  					__per_cpu_offset[cpu] >  						(char*)__va(cpu_data) -

If we put the __va() above where cpu_data is set, we can remove it from
both places in the loop...  Just thought that might be clearer since the
other assignments use __va() above.

Jesse

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-22 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-22 21:46 [PATCH] trivial ia64 numa/discontig fixes Alex Williamson
2003-10-22 21:58 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox