diff -urN gnumach/ChangeLog gnumach_test/ChangeLog --- gnumach/ChangeLog 2007-04-02 14:47:01.000000000 +0500 +++ gnumach_test/ChangeLog 2007-04-04 00:08:06.000000000 +0500 @@ -1,3 +1,10 @@ +2007-04-03 Muhammad Aamir Mughal + + * i386/i386/ast_check.c: Remove file as it did nothing + * kern/thread.c: Remove call to cause_ast_check() + * kern/sched_prim.c: Likewise. + * kern/machine.c: Remove call to init_ast_check() + 2007-04-02 Thomas Schwinge * i386/i386/io_emulate.c: Remove file. diff -urN gnumach/i386/i386/ast_check.c gnumach_test/i386/i386/ast_check.c --- gnumach/i386/i386/ast_check.c 2006-10-15 19:59:03.000000000 +0500 +++ gnumach_test/i386/i386/ast_check.c 1970-01-01 05:00:00.000000000 +0500 @@ -1,59 +0,0 @@ -/* - * Mach Operating System - * Copyright (c) 1991,1990 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -#if NCPUS > 1 - -/* - * Handle signalling ASTs on other processors. - * - * Initial i386 implementation does nothing. - */ - -#include - -/* - * Initialize for remote invocation of ast_check. - */ -init_ast_check(processor) - processor_t processor; -{ -#ifdef lint - processor++; -#endif /* lint */ -} - -/* - * Cause remote invocation of ast_check. Caller is at splsched(). - */ -cause_ast_check(processor) - processor_t processor; -{ -#ifdef lint - processor++; -#endif /* lint */ -} - -#endif /* NCPUS > 1 */ diff -urN gnumach/i386/i386at/autoconf.c gnumach_test/i386/i386at/autoconf.c --- gnumach/i386/i386at/autoconf.c 2006-11-10 04:33:44.000000000 +0500 +++ gnumach_test/i386/i386at/autoconf.c 2007-04-03 16:26:01.000000000 +0500 @@ -154,19 +154,3 @@ } -void take_ctlr_irq( - struct bus_ctlr *ctlr) -{ - int pic = ctlr->sysdep1; - if (intpri[pic] == 0) { - iunit[pic] = ctlr->unit; - ivect[pic] = ctlr->intr; - intpri[pic] = (int)ctlr->sysdep; - form_pic_mask(); - } else { - printf("The device below will clobber IRQ %d.\n", pic); - printf("You have two devices at the same IRQ. This won't work.\n"); - printf("Reconfigure your hardware and try again.\n"); - while (1); - } -} diff -urN gnumach/i386/i386at/autoconf.c~ gnumach_test/i386/i386at/autoconf.c~ --- gnumach/i386/i386at/autoconf.c~ 1970-01-01 05:00:00.000000000 +0500 +++ gnumach_test/i386/i386at/autoconf.c~ 2006-11-10 04:33:44.000000000 +0500 @@ -0,0 +1,172 @@ +/* + * Mach Operating System + * Copyright (c) 1993,1992,1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +#include +#ifdef MACH_KERNEL +#include +#else /* MACH_KERNEL */ +#include +#include +#include +#include +#include +#include +#endif /* MACH_KERNEL */ +#ifdef LINUX_DEV +#include +#endif +#include +#include + +/* initialization typecasts */ +#define SPL_FIVE (vm_offset_t)SPL5 +#define SPL_SIX (vm_offset_t)SPL6 +#define SPL_TTY (vm_offset_t)SPLTTY + + +#if NCOM > 0 +extern struct bus_driver comdriver; +extern int comintr(); +#endif /* NCOM */ + +#if NLPR > 0 +extern struct bus_driver lprdriver; +extern int lprintr(); +#endif /* NLPR */ + +struct bus_ctlr bus_master_init[] = { + +/* driver name unit intr address len phys_address + adaptor alive flags spl pic */ + + 0 +}; + + +struct bus_device bus_device_init[] = { + +/* driver name unit intr address am phys_address + adaptor alive ctlr slave flags *mi *next sysdep sysdep */ + +#if NCOM > 0 + {&comdriver, "com", 0, comintr, 0x3f8, 8, 0x3f8, + '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 4}, + {&comdriver, "com", 1, comintr, 0x2f8, 8, 0x2f8, + '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 3}, + {&comdriver, "com", 2, comintr, 0x3e8, 8, 0x3e8, + '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 5}, +#endif /* NCOM > 0 */ + +#ifdef MACH_LPR +#if NLPR > 0 + {&lprdriver, "lpr", 0, lprintr, 0x378, 3, 0x378, + '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7}, + {&lprdriver, "lpr", 0, lprintr, 0x278, 3, 0x278, + '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7}, + {&lprdriver, "lpr", 0, lprintr, 0x3bc, 3, 0x3bc, + '?', 0, -1, -1, 0, 0, 0, SPL_TTY, 7}, +#endif /* NLPR > 0 */ +#endif /* MACH_LPR */ + + 0 +}; + +/* + * probeio: + * + * Probe and subsequently attach devices out on the AT bus. + * + * + */ +void probeio(void) +{ + register struct bus_device *device; + register struct bus_ctlr *master; + int i = 0; + + for (master = bus_master_init; master->driver; master++) + { + if (configure_bus_master(master->name, master->address, + master->phys_address, i, "atbus")) + i++; + } + + for (device = bus_device_init; device->driver; device++) + { + /* ignore what we (should) have found already */ + if (device->alive || device->ctlr >= 0) + continue; + if (configure_bus_device(device->name, device->address, + device->phys_address, i, "atbus")) + i++; + } + +#if MACH_TTD + /* + * Initialize Remote kernel debugger. + */ + ttd_init(); +#endif /* MACH_TTD */ +} + +void take_dev_irq( + struct bus_device *dev) +{ + int pic = (int)dev->sysdep1; + + if (intpri[pic] == 0) { + iunit[pic] = dev->unit; + ivect[pic] = dev->intr; + intpri[pic] = (int)dev->sysdep; + form_pic_mask(); + } else { + printf("The device below will clobber IRQ %d.\n", pic); + printf("You have two devices at the same IRQ.\n"); + printf("This won't work. Reconfigure your hardware and try again.\n"); + printf("%s%d: port = %x, spl = %d, pic = %d.\n", + dev->name, dev->unit, dev->address, + dev->sysdep, dev->sysdep1); + while (1); + } + +} + +void take_ctlr_irq( + struct bus_ctlr *ctlr) +{ + int pic = ctlr->sysdep1; + if (intpri[pic] == 0) { + iunit[pic] = ctlr->unit; + ivect[pic] = ctlr->intr; + intpri[pic] = (int)ctlr->sysdep; + form_pic_mask(); + } else { + printf("The device below will clobber IRQ %d.\n", pic); + printf("You have two devices at the same IRQ. This won't work.\n"); + printf("Reconfigure your hardware and try again.\n"); + while (1); + } +} diff -urN gnumach/i386/Makefrag.am gnumach_test/i386/Makefrag.am --- gnumach/i386/Makefrag.am 2007-04-02 14:47:01.000000000 +0500 +++ gnumach_test/i386/Makefrag.am 2007-04-03 23:49:20.000000000 +0500 @@ -64,7 +64,6 @@ libkernel_a_SOURCES += \ i386/i386/ast.h \ - i386/i386/ast_check.c \ i386/i386/ast_types.h \ i386/i386/cpu_number.h \ i386/i386/cswitch.S \ diff -urN gnumach/kern/machine.c gnumach_test/kern/machine.c --- gnumach/kern/machine.c 2006-11-11 06:20:01.000000000 +0500 +++ gnumach_test/kern/machine.c 2007-04-03 23:53:23.000000000 +0500 @@ -136,9 +136,6 @@ pset_lock(&default_pset); s = splsched(); processor_lock(processor); -#if NCPUS > 1 - init_ast_check(processor); -#endif /* NCPUS > 1 */ ms = &machine_slot[cpu]; ms->running = TRUE; machine_info.avail_cpus++; diff -urN gnumach/kern/sched_prim.c gnumach_test/kern/sched_prim.c --- gnumach/kern/sched_prim.c 2007-02-07 13:47:09.000000000 +0500 +++ gnumach_test/kern/sched_prim.c 2007-04-03 23:51:34.000000000 +0500 @@ -1366,9 +1366,7 @@ ast_on(cpu_number(), AST_BLOCK); } else if ((processor != master_processor) && - (processor->state != PROCESSOR_OFF_LINE)) { - cause_ast_check(processor); - } + (processor->state != PROCESSOR_OFF_LINE)) {} } #else /* NCPUS > 1 */ /* diff -urN gnumach/kern/thread.c gnumach_test/kern/thread.c --- gnumach/kern/thread.c 2007-02-07 13:47:09.000000000 +0500 +++ gnumach_test/kern/thread.c 2007-04-03 23:52:53.000000000 +0500 @@ -1242,15 +1242,6 @@ thread->wake_active = FALSE; break; } -#if NCPUS > 1 - /* - * The thread must be running, so make its - * processor execute ast_check(). This - * should cause the thread to take an ast and - * context switch to suspend for us. - */ - cause_ast_check(thread->last_processor); -#endif /* NCPUS > 1 */ /* * Fall through to wait for thread to stop.