summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/intr_machdep.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-10-10 23:23:12 +0000
committerjhb <jhb@FreeBSD.org>2006-10-10 23:23:12 +0000
commit920b219fcf73ff01950bf272923fd4b46e75fb62 (patch)
treeeb9c93770a076684865872d673c762161b0390f7 /sys/i386/include/intr_machdep.h
parent98af27d199c605e0cfa80eee1e631093cf1bf30a (diff)
downloadFreeBSD-src-920b219fcf73ff01950bf272923fd4b46e75fb62.zip
FreeBSD-src-920b219fcf73ff01950bf272923fd4b46e75fb62.tar.gz
Change the x86 interrupt code to suspend/resume interrupt controllers
(PICs) rather than interrupt sources. This allows interrupt controllers with no interrupt pics (such as the 8259As when APIC is in use) to participate in suspend/resume. - Always register the 8259A PICs even if we don't use any of their pins. - Explicitly reset the 8259As on resume on amd64 if 'device atpic' isn't included. - Add a "dummy" PIC for the local APIC on the BSP to reset the local APIC on resume. This gets suspend/resume working with APIC on UP systems. SMP still needs more work to bring the APs back to life. The MFC after is tentative. Tested by: anholt (i386) Submitted by: Andrea Bittau <a.bittau at cs.ucl.ac.uk> (3) MFC after: 1 week
Diffstat (limited to 'sys/i386/include/intr_machdep.h')
-rw-r--r--sys/i386/include/intr_machdep.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/include/intr_machdep.h b/sys/i386/include/intr_machdep.h
index 886811c..4884fd5 100644
--- a/sys/i386/include/intr_machdep.h
+++ b/sys/i386/include/intr_machdep.h
@@ -81,11 +81,12 @@ struct pic {
void (*pic_enable_intr)(struct intsrc *);
int (*pic_vector)(struct intsrc *);
int (*pic_source_pending)(struct intsrc *);
- void (*pic_suspend)(struct intsrc *);
- void (*pic_resume)(struct intsrc *);
+ void (*pic_suspend)(struct pic *);
+ void (*pic_resume)(struct pic *);
int (*pic_config_intr)(struct intsrc *, enum intr_trigger,
enum intr_polarity);
void (*pic_assign_cpu)(struct intsrc *, u_int apic_id);
+ STAILQ_ENTRY(pic) pics;
};
/* Flags for pic_disable_source() */
@@ -130,6 +131,7 @@ int intr_config_intr(int vector, enum intr_trigger trig,
enum intr_polarity pol);
void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
struct intsrc *intr_lookup_source(int vector);
+int intr_register_pic(struct pic *pic);
int intr_register_source(struct intsrc *isrc);
int intr_remove_handler(void *cookie);
void intr_resume(void);
OpenPOWER on IntegriCloud