Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: suspend/resume broken by interrupt changes



M.Drochner%fz-juelich.de@localhost said:
> The problem seems to be:
> (gdb) print ci
> $1 = (struct cpu_info *) 0x0

And with this patch I can suspend/resume again.
I didn't look into details to tell whether this just
cures a symptom but hides a deeper bug.
At least it helps.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [ae1dd5e0a4cc3b3cca3a2196512c6b666e42b0ef]
#
# patch "sys/arch/x86/x86/ioapic.c"
#  from [1273391b7e24aec616476b6432d02e9fcecf1524]
#    to [3955044b589edf49f2ff98fb6250e6b35e68b044]
#
============================================================
--- sys/arch/x86/x86/ioapic.c   1273391b7e24aec616476b6432d02e9fcecf1524
+++ sys/arch/x86/x86/ioapic.c   3955044b589edf49f2ff98fb6250e6b35e68b044
@@ -401,7 +401,7 @@ apic_set_redir(struct ioapic_softc *sc, 
               struct cpu_info *ci)
 {
        uint32_t redlo;
-       uint32_t redhi;
+       uint32_t redhi = 0;
        int delmode;
        struct ioapic_pin *pp;
        struct mp_intr_map *map;
@@ -410,13 +410,13 @@ apic_set_redir(struct ioapic_softc *sc, 
        map = pp->ip_map;
        redlo = map == NULL ? IOAPIC_REDLO_MASK : map->redir;
        delmode = (redlo & IOAPIC_REDLO_DEL_MASK) >> IOAPIC_REDLO_DEL_SHIFT;
-       redhi = (ci->ci_cpuid << IOAPIC_REDHI_DEST_SHIFT);
 
        if (delmode == IOAPIC_REDLO_DEL_FIXED ||
            delmode == IOAPIC_REDLO_DEL_LOPRI) {
                if (pp->ip_type == IST_NONE) {
                        redlo |= IOAPIC_REDLO_MASK;
                } else {
+                       redhi = (ci->ci_cpuid << IOAPIC_REDHI_DEST_SHIFT);
                        redlo |= (idt_vec & 0xff);
                        redlo |= 
(IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT);
                        redlo &= ~IOAPIC_REDLO_DSTMOD;


Home | Main Index | Thread Index | Old Index