summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-07-01 17:20:07 +0000
committerjhb <jhb@FreeBSD.org>2009-07-01 17:20:07 +0000
commit76256698a1223f7daae4d1340f06dfdda9147185 (patch)
treefb5e23052e350ca2b196f1a06067d0f6cf148b56 /sys/i386/isa
parent9f2c78b3f9e8fee455c43e6025959a41def8d05c (diff)
downloadFreeBSD-src-76256698a1223f7daae4d1340f06dfdda9147185.zip
FreeBSD-src-76256698a1223f7daae4d1340f06dfdda9147185.tar.gz
Improve the handling of cpuset with interrupts.
- For x86, change the interrupt source method to assign an interrupt source to a specific CPU to return an error value instead of void, thus allowing it to fail. - If moving an interrupt to a CPU fails due to a lack of IDT vectors in the destination CPU, fail the request with ENOSPC rather than panicing. - For MSI interrupts on x86 (but not MSI-X), only allow cpuset to be used on the first interrupt in a group. Moving the first interrupt in a group moves the entire group. - Use the icu_lock to protect intr_next_cpu() on x86 instead of the intr_table_lock to fix a LOR introduced in the last set of MSI changes. - Add a new privilege PRIV_SCHED_CPUSET_INTR for using cpuset with interrupts. Previously, binding an interrupt to a CPU only performed a privilege check if the interrupt had an interrupt thread. Interrupts without a thread could be bound by non-root users as a result. - If an interrupt event's assign_cpu method fails, then restore the original cpuset mask for the associated interrupt thread. Approved by: re (kib)
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/atpic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/isa/atpic.c b/sys/i386/isa/atpic.c
index dfeeb21..37a1285 100644
--- a/sys/i386/isa/atpic.c
+++ b/sys/i386/isa/atpic.c
@@ -161,7 +161,7 @@ static void atpic_resume(struct pic *pic);
static int atpic_source_pending(struct intsrc *isrc);
static int atpic_config_intr(struct intsrc *isrc, enum intr_trigger trig,
enum intr_polarity pol);
-static void atpic_assign_cpu(struct intsrc *isrc, u_int apic_id);
+static int atpic_assign_cpu(struct intsrc *isrc, u_int apic_id);
static void i8259_init(struct atpic *pic, int slave);
static struct atpic atpics[] = {
@@ -389,7 +389,7 @@ atpic_config_intr(struct intsrc *isrc, enum intr_trigger trig,
#endif /* PC98 */
}
-static void
+static int
atpic_assign_cpu(struct intsrc *isrc, u_int apic_id)
{
OpenPOWER on IntegriCloud