[PATCH] 2.6.5- es7000 subarch update

From: Protasevich, Natalie
Date: Mon Apr 05 2004 - 11:13:50 EST


Hello,

ES7000 was failing to boot since first couple revisions of 2.6. The patch fixes the boot problem.
In the patch, some maintenance and cleanup was done for es7000 subarch, such as APIC destinations were corrected, missing initialization for the variable was added, extraneous file was removed, etc.
The patch was created against 2.6.5, compiled cleanly, and tested on the ES7000 system.

Thanks,
--Natalie
------------------------------------

diff -Naur linux6.5/arch/i386/mach-es7000/Makefile linux-2.6.5/arch/i386/mach-es7000/Makefile
--- linux6.5/arch/i386/mach-es7000/Makefile 2004-04-04 18:22:39.000000000 -0400
+++ linux-2.6.5/arch/i386/mach-es7000/Makefile 2004-04-05 00:07:13.000000000 -0400
@@ -2,4 +2,4 @@
# Makefile for the linux kernel.
#

-obj-y := setup.o topology.o es7000.o
+obj-y := setup.o es7000.o
diff -Naur linux6.5/arch/i386/mach-es7000/es7000.c linux-2.6.5/arch/i386/mach-es7000/es7000.c
--- linux6.5/arch/i386/mach-es7000/es7000.c 2004-04-04 18:22:39.000000000 -0400
+++ linux-2.6.5/arch/i386/mach-es7000/es7000.c 2004-04-05 00:07:13.000000000 -0400
@@ -82,6 +82,7 @@
host_addr = val;
host = (struct mip_reg *)val;
host_reg = __va(host);
+ mip_port = MIP_PORT(mi->mip_info);
val = MIP_RD_LO(mi->mip_reg);
mip_addr = val;
mip = (struct mip_reg *)val;
diff -Naur linux6.5/arch/i386/mach-es7000/es7000.h linux-2.6.5/arch/i386/mach-es7000/es7000.h
--- linux6.5/arch/i386/mach-es7000/es7000.h 2004-04-04 18:22:39.000000000 -0400
+++ linux-2.6.5/arch/i386/mach-es7000/es7000.h 2004-04-05 00:07:13.000000000 -0400
@@ -32,6 +32,7 @@
#define MIP_VALID 0x0100000000000000

#define MIP_RD_LO(VALUE) (VALUE & 0xffffffff)
+#define MIP_PORT(VALUE) ((VALUE >> 32) & 0xffff)

struct mip_reg_info {
unsigned long long mip_info;
diff -Naur linux6.5/arch/i386/mach-es7000/topology.c linux-2.6.5/arch/i386/mach-es7000/topology.c
--- linux6.5/arch/i386/mach-es7000/topology.c 2004-04-04 18:22:39.000000000 -0400
+++ linux-2.6.5/arch/i386/mach-es7000/topology.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,64 +0,0 @@
-/*
- * arch/i386/mach-generic/topology.c - Populate driverfs with topology information
- *
- * Written by: Matthew Dobson, IBM Corporation
- * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
- *
- * Copyright (C) 2002, IBM Corp.
- *
- * All rights reserved.
- *
- * 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, GOOD TITLE or
- * NON INFRINGEMENT. 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <colpatch@xxxxxxxxxx>
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <asm/cpu.h>
-
-struct i386_cpu cpu_devices[NR_CPUS];
-
-#ifdef CONFIG_NUMA
-#include <linux/mmzone.h>
-#include <asm/node.h>
-
-struct i386_node node_devices[MAX_NUMNODES];
-
-static int __init topology_init(void)
-{
- int i;
-
- for (i = 0; i < num_online_nodes(); i++)
- arch_register_node(i);
- for (i = 0; i < NR_CPUS; i++)
- if (cpu_possible(i)) arch_register_cpu(i);
- return 0;
-}
-
-#else /* !CONFIG_NUMA */
-
-static int __init topology_init(void)
-{
- int i;
-
- for (i = 0; i < NR_CPUS; i++)
- if (cpu_possible(i)) arch_register_cpu(i);
- return 0;
-}
-
-#endif /* CONFIG_NUMA */
-
-subsys_initcall(topology_init);
diff -Naur linux6.5/arch/i386/kernel/mpparse.c linux-2.6.5/arch/i386/kernel/mpparse.c
--- linux6.5/arch/i386/kernel/mpparse.c 2004-04-04 18:22:39.000000000 -0400
+++ linux-2.6.5/arch/i386/kernel/mpparse.c 2004-04-05 00:07:13.000000000 -0400
@@ -969,7 +969,7 @@
*/
for (i = 0; i < mp_irq_entries; i++) {
if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus)
- && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) {
+ && (mp_irqs[i].mpc_dstirq == intsrc.mpc_dstirq)) {
mp_irqs[i] = intsrc;
found = 1;
break;
diff -Naur linux6.5/include/asm-i386/mach-es7000/mach_apic.h linux-2.6.5/include/asm-i386/mach-es7000/mach_apic.h
--- linux6.5/include/asm-i386/mach-es7000/mach_apic.h 2004-04-04 18:22:46.000000000 -0400
+++ linux-2.6.5/include/asm-i386/mach-es7000/mach_apic.h 2004-04-05 00:11:50.000000000 -0400
@@ -39,7 +39,7 @@
#endif

#define APIC_BROADCAST_ID (0xff)
-#define NO_IOAPIC_CHECK (0)
+#define NO_IOAPIC_CHECK (1)

static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
@@ -166,10 +166,12 @@
int cpu;
int apicid;

+#if defined CONFIG_ES7000_CLUSTERED_APIC
+ return 0xFF;
+#endif
num_bits_set = cpus_weight_const(cpumask);
- /* Return id to all */
if (num_bits_set == NR_CPUS)
- return 0xFF;
+ return cpu_to_logical_apicid(0);
/*
* The cpus in the mask must all be on the apic cluster. If are not
* on the same apicid cluster return default value of TARGET_CPUS.
@@ -182,7 +184,7 @@
if (apicid_cluster(apicid) !=
apicid_cluster(new_apicid)){
printk ("%s: Not a valid mask!\n",__FUNCTION__);
- return 0xFF;
+ return cpu_to_logical_apicid(0);
}
apicid = new_apicid;
cpus_found++;

----------------------------------------------------


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/