kern_intr.c (255362) | kern_intr.c (256377) |
---|---|
1/*- 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/kern_intr.c 255362 2013-09-07 14:15:13Z markm $"); | 28__FBSDID("$FreeBSD: head/sys/kern/kern_intr.c 256377 2013-10-12 12:57:57Z markm $"); |
29 30#include "opt_ddb.h" 31 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/conf.h> 35#include <sys/cpuset.h> 36#include <sys/rtprio.h> --- 859 unchanged lines hidden (view full) --- 896 * If any of the handlers for this ithread claim to be good 897 * sources of entropy, then gather some. 898 */ 899 if (harvest.interrupt && ie->ie_flags & IE_ENTROPY) { 900 CTR3(KTR_INTR, "%s: pid %d (%s) gathering entropy", __func__, 901 p->p_pid, td->td_name); 902 entropy.event = (uintptr_t)ie; 903 entropy.td = ctd; | 29 30#include "opt_ddb.h" 31 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/conf.h> 35#include <sys/cpuset.h> 36#include <sys/rtprio.h> --- 859 unchanged lines hidden (view full) --- 896 * If any of the handlers for this ithread claim to be good 897 * sources of entropy, then gather some. 898 */ 899 if (harvest.interrupt && ie->ie_flags & IE_ENTROPY) { 900 CTR3(KTR_INTR, "%s: pid %d (%s) gathering entropy", __func__, 901 p->p_pid, td->td_name); 902 entropy.event = (uintptr_t)ie; 903 entropy.td = ctd; |
904 random_harvest(&entropy, sizeof(entropy), 2, 0, | 904 random_harvest(&entropy, sizeof(entropy), 2, |
905 RANDOM_INTERRUPT); 906 } 907 908 KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name)); 909 910 /* 911 * Set it_need to tell the thread to keep running if it is already 912 * running. Then, lock the thread and see if we actually need to --- 137 unchanged lines hidden (view full) --- 1050 * If any of the handlers for this ithread claim to be good 1051 * sources of entropy, then gather some. 1052 */ 1053 if (harvest.interrupt && ie->ie_flags & IE_ENTROPY) { 1054 CTR3(KTR_INTR, "%s: pid %d (%s) gathering entropy", __func__, 1055 p->p_pid, td->td_name); 1056 entropy.event = (uintptr_t)ie; 1057 entropy.td = ctd; | 905 RANDOM_INTERRUPT); 906 } 907 908 KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name)); 909 910 /* 911 * Set it_need to tell the thread to keep running if it is already 912 * running. Then, lock the thread and see if we actually need to --- 137 unchanged lines hidden (view full) --- 1050 * If any of the handlers for this ithread claim to be good 1051 * sources of entropy, then gather some. 1052 */ 1053 if (harvest.interrupt && ie->ie_flags & IE_ENTROPY) { 1054 CTR3(KTR_INTR, "%s: pid %d (%s) gathering entropy", __func__, 1055 p->p_pid, td->td_name); 1056 entropy.event = (uintptr_t)ie; 1057 entropy.td = ctd; |
1058 random_harvest(&entropy, sizeof(entropy), 2, 0, | 1058 random_harvest(&entropy, sizeof(entropy), 2, |
1059 RANDOM_INTERRUPT); 1060 } 1061 1062 KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name)); 1063 1064 /* 1065 * Set it_need to tell the thread to keep running if it is already 1066 * running. Then, lock the thread and see if we actually need to --- 74 unchanged lines hidden (view full) --- 1141 CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name, 1142 ih->ih_need); 1143 1144 if (harvest.swi) { 1145 CTR2(KTR_INTR, "swi_sched: pid %d (%s) gathering entropy", 1146 curproc->p_pid, curthread->td_name); 1147 entropy.event = (uintptr_t)ih; 1148 entropy.td = curthread; | 1059 RANDOM_INTERRUPT); 1060 } 1061 1062 KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name)); 1063 1064 /* 1065 * Set it_need to tell the thread to keep running if it is already 1066 * running. Then, lock the thread and see if we actually need to --- 74 unchanged lines hidden (view full) --- 1141 CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name, 1142 ih->ih_need); 1143 1144 if (harvest.swi) { 1145 CTR2(KTR_INTR, "swi_sched: pid %d (%s) gathering entropy", 1146 curproc->p_pid, curthread->td_name); 1147 entropy.event = (uintptr_t)ih; 1148 entropy.td = curthread; |
1149 random_harvest(&entropy, sizeof(entropy), 1, 0, | 1149 random_harvest(&entropy, sizeof(entropy), 1, |
1150 RANDOM_SWI); 1151 } 1152 1153 /* 1154 * Set ih_need for this handler so that if the ithread is already 1155 * running it will execute this handler on the next pass. Otherwise, 1156 * it will execute it the next time it runs. 1157 */ --- 786 unchanged lines hidden --- | 1150 RANDOM_SWI); 1151 } 1152 1153 /* 1154 * Set ih_need for this handler so that if the ithread is already 1155 * running it will execute this handler on the next pass. Otherwise, 1156 * it will execute it the next time it runs. 1157 */ --- 786 unchanged lines hidden --- |