Page MenuHomeFreeBSD

D11525.diff
No OneTemporary

D11525.diff

Index: sys/kern/kern_cpuset.c
===================================================================
--- sys/kern/kern_cpuset.c
+++ sys/kern/kern_cpuset.c
@@ -462,6 +462,8 @@
return (0);
}
case CPU_WHICH_IRQ:
+ case CPU_WHICH_INTRHANDLER:
+ case CPU_WHICH_ITHREAD:
case CPU_WHICH_DOMAIN:
return (0);
default:
Index: sys/kern/kern_intr.c
===================================================================
--- sys/kern/kern_intr.c
+++ sys/kern/kern_intr.c
@@ -439,6 +439,7 @@
struct thread *td;
struct proc *p;
cpuset_t *mask;
+ struct cpuset *set;
lwpid_t id;
int error;
@@ -467,12 +468,13 @@
} else {
id = ie->ie_thread->it_thread->td_tid;
mtx_unlock(&ie->ie_lock);
- error = cpuset_which(CPU_WHICH_TID, id, &p, &td, NULL);
+ error = cpuset_which(CPU_WHICH_TID, id, &p, &td, &set);
if (error != 0)
return (error);
CPU_COPY(&td->td_cpuset->cs_mask, mask);
PROC_UNLOCK(p);
}
+ break;
default:
return (EINVAL);
}
Index: usr.bin/cpuset/cpuset.1
===================================================================
--- usr.bin/cpuset/cpuset.1
+++ usr.bin/cpuset/cpuset.1
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 29, 2016
+.Dd July 7, 2017
.Dt CPUSET 1
.Os
.Sh NAME
@@ -48,11 +48,11 @@
.Nm
.Op Fl c
.Op Fl l Ar cpu-list
-.Op Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq
+.Op Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl IXx Ar irq
.Nm
.Fl g
.Op Fl cir
-.Op Fl d Ar domain | Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq
+.Op Fl d Ar domain | Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl IXx Ar irq
.Sh DESCRIPTION
The
.Nm
@@ -140,7 +140,11 @@
.It Fl t Ar tid
Specifies a thread id as the target of the operation.
.It Fl x Ar irq
-Specifies an irq as the target of the operation.
+Specifies all resources associated with an interrupt as the target of the operation.
+.It Fl X Ar irq
+Specifies the hardware interrupt vector as the target of the operation.
+.It Fl I Ar irq
+Specifies dedicated threads associated with an interrupt as the target of the operation.
.El
.Sh EXIT STATUS
.Ex -std
Index: usr.bin/cpuset/cpuset.c
===================================================================
--- usr.bin/cpuset/cpuset.c
+++ usr.bin/cpuset/cpuset.c
@@ -208,7 +208,7 @@
level = CPU_LEVEL_WHICH;
which = CPU_WHICH_PID;
id = pid = tid = setid = -1;
- while ((ch = getopt(argc, argv, "Ccd:gij:l:p:rs:t:x:")) != -1) {
+ while ((ch = getopt(argc, argv, "Ccd:gij:l:p:rs:t:x:X:I:")) != -1) {
switch (ch) {
case 'C':
Cflag = 1;
@@ -261,6 +261,16 @@
which = CPU_WHICH_IRQ;
id = atoi(optarg);
break;
+ case 'X':
+ xflag = 1;
+ which = CPU_WHICH_INTRHANDLER;
+ id = atoi(optarg);
+ break;
+ case 'I':
+ xflag = 1;
+ which = CPU_WHICH_ITHREAD;
+ id = atoi(optarg);
+ break;
default:
usage();
}
@@ -357,9 +367,10 @@
fprintf(stderr,
" cpuset [-c] [-l cpu-list] -C -p pid\n");
fprintf(stderr,
- " cpuset [-c] [-l cpu-list] [-j jailid | -p pid | -t tid | -s setid | -x irq]\n");
+ " cpuset [-c] [-l cpu-list] [-j jailid | -p pid | -t tid | -s setid |\n"
+ " -IXx irq]\n");
fprintf(stderr,
" cpuset -g [-cir] [-d domain | -j jailid | -p pid | -t tid | -s setid |\n"
- " -x irq]\n");
+ " -IXx irq]\n");
exit(1);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 1, 12:23 AM (9 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27425377
Default Alt Text
D11525.diff (3 KB)

Event Timeline