lkml.org 
[lkml]   [2002]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kexec for 2.5.44 (Who do I send this to?)
Hi!

> The kexec code has gone through a fairly decent review, and all known bugs
> are resolved. There are still BIOS's that don't work after you have
> run a kernel but that is an entirely different problem.

Looks good... Few comments follow.

> @@ -1128,6 +1159,26 @@
> printk (KERN_INFO "APIC error on CPU%d: %02lx(%02lx)\n",
> smp_processor_id(), v , v1);
> irq_exit();
> +}
> +
> +void stop_apics(void)
> +{
> + /* By resetting the APIC's we disable the nmi watchdog */
> +#if CONFIG_SMP
> + /*
> + * Stop all CPUs and turn off local APICs and the IO-APIC, so
> + * other OSs see a clean IRQ state.
> + */
> + smp_send_stop();
> +#else
> + disable_local_APIC();
> +#endif
> +#if defined(CONFIG_X86_IO_APIC)
> + if (smp_found_config) {
> + disable_IO_APIC();
> + }
> +#endif
> + disconnect_bsp_APIC();
> }
>

Perhaps this should be done using driverfs callbacks?

> --- linux-2.5.44/arch/i386/kernel/i8259.c Fri Oct 11 22:22:19 2002
> +++ linux-2.5.44.x86kexec/arch/i386/kernel/i8259.c Sat Oct 19 01:04:36 2002
> @@ -246,10 +246,34 @@
> return 0;
> }
>
> +static void i8259A_remove(struct device *dev)
> +{
> + /* Restore the i8259A to it's legacy dos setup.
> + * The kernel won't be using it any more, and it
> + * just might make reboots, and kexec type applications
> + * more stable.
> + */
> + outb(0xff, 0x21); /* mask all of 8259A-1 */
> + outb(0xff, 0xA1); /* mask all of 8259A-1 */
> +
> + outb_p(0x11, 0x20); /* ICW1: select 8259A-1 init */
> + outb_p(0x08, 0x21); /* ICW2: 8259A-1 IR0-7 mappend to 0x8-0xf */
> + outb_p(0x01, 0x21); /* Normal 8086 auto EOI mode */
> +
> + outb_p(0x11, 0xA0); /* ICW1: select 8259A-2 init */
> + outb_p(0x08, 0xA1); /* ICW2: 8259A-2 IR0-7 mappend to 0x70-0x77 */
> + outb_p(0x01, 0xA1); /* Normal 8086 auto EOI mode */
> +
> + udelay(100); /* wait for 8259A to initialize */
> +
> + /* Should I unmask interrupts here? */
> +}
> +
> static struct device_driver i8259A_driver = {
> .name = "pic",
> .bus = &system_bus_type,
> .resume = i8259A_resume,
> + .remove = i8259A_remove,
> };
>

Here you did it right.
Pavel
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.198 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site