r1150 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches

Dann Frazier dannf@haydn.debian.org
Mon, 16 Aug 2004 09:11:46 -0600


Author: dannf
Date: 2004-08-16 09:11:36 -0600 (Mon, 16 Aug 2004)
New Revision: 1150

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-2
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/ia64-generic-no-smp-1-to-2.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
Log:
add latest version of generic-no-smp patch from jbarnes as an incremental
to the previous


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-16 14:44:26 UTC (rev 1149)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-16 15:11:36 UTC (rev 1150)
@@ -1,3 +1,9 @@
+kernel-source-2.6.8 (2.6.8-2) unstable; urgency=high
+
+  * Add updated fix for generic UP kernel builds on IA64 (dann frazier).
+
+ -- dann frazier<dannf@debian.org>  Mon, 16 Aug 2004 09:07:36 -0600
+
 kernel-source-2.6.8 (2.6.8-1) unstable; urgency=high
 
   * New upstream release.

Copied: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-2 (from rev 1149, trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-1)
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-1	2004-08-16 14:44:26 UTC (rev 1149)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-2	2004-08-16 15:11:36 UTC (rev 1150)
@@ -0,0 +1,31 @@
+alpha-epoch-comment
+alpha-termbits
+doc-post_halloween
+drivers-ftape
+drivers-ide-dma-blacklist-toshiba
+drivers-input-hiddev-HIDIOCGUCODE
+drivers-input-psaux-hacks
+drivers-net-8139too-locking
+drivers-net-tg3-readd
+drivers-scsi_changer
+drivers-scsi-generic_proc_info
+extraversion
+fs-asfs
+include-missing-includes
+ipsec-missing_wakeup
+modular-ide
+modular-ide-pnp
+modular-vesafb
+remove-references-to-removed-drivers
+x86-i486_emu
+marvell-mm
+marvell-pegasos
+powerpc-pegasos
+nfs-fix
+SG_IO-cap
+ia64-generic-no-smp
+ptmx-fix
+powerpc-ibm-240-e30
+xfs-ioctl32
+drivers-scsi-sym53c8xx_revert
+ia64-generic-no-smp-1-to-2

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/ia64-generic-no-smp-1-to-2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/ia64-generic-no-smp-1-to-2.dpatch	2004-08-16 14:44:26 UTC (rev 1149)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/ia64-generic-no-smp-1-to-2.dpatch	2004-08-16 15:11:36 UTC (rev 1150)
@@ -0,0 +1,210 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix CONFIG_IA64_GENERIC compilation for UP (rev 2)
+## DP: Patch author: Jesse Barnes <jbarnes@sgi.com>
+## DP: Upstream status: submitted
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/acpi.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/acpi.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/acpi.c	2004-08-13 23:36:58.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/acpi.c	2004-08-15 15:49:38.000000000 -0600
+@@ -618,9 +618,11 @@
+ 			if (smp_boot_data.cpu_phys_id[cpu] != hard_smp_processor_id())
+ 				node_cpuid[i++].phys_id = smp_boot_data.cpu_phys_id[cpu];
+ 	}
+-	build_cpu_to_node_map();
+ # endif
+ #endif
++#ifdef CONFIG_ACPI_NUMA
++	build_cpu_to_node_map();
++#endif
+ 	/* Make boot-up look pretty */
+ 	printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, total_cpus);
+ 	return 0;
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/cyclone.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/cyclone.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/cyclone.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/cyclone.c	2004-08-15 15:49:31.000000000 -0600
+@@ -1,8 +1,6 @@
+-#include <linux/module.h>
+ #include <linux/smp.h>
+ #include <linux/time.h>
+ #include <linux/errno.h>
+-#include <asm/io.h>
+ 
+ /* IBM Summit (EXA) Cyclone counter code*/
+ #define CYCLONE_CBAR_ADDR 0xFEB00CD0
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/numa.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/numa.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/numa.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/numa.c	2004-08-15 15:49:38.000000000 -0600
+@@ -1,46 +1,57 @@
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ * ia64 kernel NUMA specific stuff
++ *
++ * Copyright (C) 2002 Erich Focht <efocht@ess.nec.de>
++ * Copyright (C) 2004 Silicon Graphics, Inc.
++ *   Jesse Barnes <jbarnes@sgi.com>
++ */
+ #include <linux/config.h>
+ #include <linux/topology.h>
+ #include <linux/module.h>
+ #include <asm/processor.h>
+ #include <asm/smp.h>
+ 
+-#ifdef CONFIG_NUMA
+-
+-/* on which node is each logical CPU (one cacheline even for 64 CPUs) */
+ u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+ EXPORT_SYMBOL(cpu_to_node_map);
+-/* which logical CPUs are on which nodes */
++
+ cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
+ 
+-/*
+- * Build cpu to node mapping and initialize the per node cpu masks.
++/**
++ * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
++ *
++ * Build cpu to node mapping and initialize the per node cpu masks using
++ * info from the node_cpuid array handed to us by ACPI.
+  */
+-void __init
+-build_cpu_to_node_map (void)
++void __init build_cpu_to_node_map(void)
+ {
+ 	int cpu, i, node;
+ 
+-	for(node=0; node<MAX_NUMNODES; node++)
++	for(node=0; node < MAX_NUMNODES; node++)
+ 		cpus_clear(node_to_cpu_mask[node]);
++
+ 	for(cpu = 0; cpu < NR_CPUS; ++cpu) {
+-		/*
+-		 * All Itanium NUMA platforms I know use ACPI, so maybe we
+-		 * can drop this ifdef completely.                    [EF]
+-		 */
+-#ifdef CONFIG_ACPI_NUMA
+ 		node = -1;
+ 		for (i = 0; i < NR_CPUS; ++i)
+ 			if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) {
+ 				node = node_cpuid[i].nid;
+ 				break;
+ 			}
+-#else
+-#		error Fixme: Dunno how to build CPU-to-node map.
+-#endif
+ 		cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
+ 		if (node >= 0)
+ 			cpu_set(cpu, node_to_cpu_mask[node]);
+ 	}
+ }
+-
+-#endif /* CONFIG_NUMA */
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/kernel/setup.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/setup.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/kernel/setup.c	2004-08-13 23:36:17.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/kernel/setup.c	2004-08-15 15:49:38.000000000 -0600
+@@ -317,11 +317,9 @@
+ 	machvec_init(acpi_get_sysname());
+ #endif
+ 
+-#ifdef CONFIG_SMP
+ 	/* If we register an early console, allow CPU 0 to printk */
+ 	if (!early_console_setup())
+ 		cpu_set(smp_processor_id(), cpu_online_map);
+-#endif
+ 
+ #ifdef CONFIG_ACPI_BOOT
+ 	/* Initialize the ACPI boot-time table parser */
+diff -urN kernel-source-2.6.8.defconfig/arch/ia64/mm/discontig.c kernel-source-2.6.8.newupfix.defconfig/arch/ia64/mm/discontig.c
+--- kernel-source-2.6.8.defconfig/arch/ia64/mm/discontig.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/arch/ia64/mm/discontig.c	2004-08-15 15:49:38.000000000 -0600
+@@ -398,8 +398,8 @@
+  */
+ static void __init initialize_pernode_data(void)
+ {
+-	int cpu, node;
+ 	pg_data_t *pgdat_list[NR_NODES];
++	int cpu, node;
+ 
+ 	for (node = 0; node < numnodes; node++)
+ 		pgdat_list[node] = mem_data[node].pgdat;
+@@ -409,12 +409,22 @@
+ 		memcpy(mem_data[node].node_data->pg_data_ptrs, pgdat_list,
+ 		       sizeof(pgdat_list));
+ 	}
+-
++#ifdef CONFIG_SMP
+ 	/* Set the node_data pointer for each per-cpu struct */
+ 	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ 		node = node_cpuid[cpu].nid;
+ 		per_cpu(cpu_info, cpu).node_data = mem_data[node].node_data;
+ 	}
++#else
++	{
++		struct cpuinfo_ia64 *cpu0_cpu_info;
++		cpu = 0;
++		node = node_cpuid[cpu].nid;
++		cpu0_cpu_info = (struct cpuinfo_ia64 *)(__phys_per_cpu_start +
++			((char *)&per_cpu__cpu_info - __per_cpu_start));
++		cpu0_cpu_info->node_data = mem_data[node].node_data;
++	}
++#endif /* CONFIG_SMP */
+ }
+ 
+ /**
+@@ -489,12 +499,11 @@
+ {
+ 	int cpu;
+ 
+-	if (smp_processor_id() == 0) {
+-		for (cpu = 0; cpu < NR_CPUS; cpu++) {
+-			per_cpu(local_per_cpu_offset, cpu) =
+-				__per_cpu_offset[cpu];
+-		}
+-	}
++	if (smp_processor_id() != 0)
++		return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
++
++	for (cpu = 0; cpu < NR_CPUS; cpu++)
++		per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
+ 
+ 	return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
+ }
+diff -urN kernel-source-2.6.8.defconfig/drivers/serial/sn_console.c kernel-source-2.6.8.newupfix.defconfig/drivers/serial/sn_console.c
+--- kernel-source-2.6.8.defconfig/drivers/serial/sn_console.c	2004-08-14 13:07:37.000000000 -0600
++++ kernel-source-2.6.8.newupfix.defconfig/drivers/serial/sn_console.c	2004-08-15 15:49:31.000000000 -0600
+@@ -50,7 +50,6 @@
+ #include <linux/miscdevice.h>
+ #include <linux/serial_core.h>
+ 
+-#include <asm/io.h>
+ #include <asm/sn/simulator.h>
+ #include <asm/sn/sn2/sn_private.h>
+ #include <asm/sn/sn_sal.h>
+@@ -1086,9 +1085,7 @@
+ 			spin_unlock_irqrestore(&port->sc_port.lock, flags);
+ 
+ 			puts_raw_fixed(port->sc_ops->sal_puts_raw, s, count);
+-#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
+ 		}
+-#endif
+ 	}
+ 	else {
+ 		/* Not yet registered with serial core - simple case */