mp_machdep.c (271053) | mp_machdep.c (271192) |
---|---|
1/*- 2 * Copyright (c) 1996, by Steve Passe 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 --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1996, by Steve Passe 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 --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/i386/i386/mp_machdep.c 271053 2014-09-03 21:17:09Z jhb $"); | 27__FBSDID("$FreeBSD: head/sys/i386/i386/mp_machdep.c 271192 2014-09-06 15:23:28Z jhb $"); |
28 29#include "opt_apic.h" 30#include "opt_cpu.h" 31#include "opt_kstack_pages.h" 32#include "opt_pmap.h" 33#include "opt_sched.h" 34#include "opt_smp.h" 35 --- 106 unchanged lines hidden (view full) --- 142char *bootSTK; 143static int bootAP; 144 145/* Free these after use */ 146void *bootstacks[MAXCPU]; 147static void *dpcpu; 148 149struct pcb stoppcbs[MAXCPU]; | 28 29#include "opt_apic.h" 30#include "opt_cpu.h" 31#include "opt_kstack_pages.h" 32#include "opt_pmap.h" 33#include "opt_sched.h" 34#include "opt_smp.h" 35 --- 106 unchanged lines hidden (view full) --- 142char *bootSTK; 143static int bootAP; 144 145/* Free these after use */ 146void *bootstacks[MAXCPU]; 147static void *dpcpu; 148 149struct pcb stoppcbs[MAXCPU]; |
150struct pcb **susppcbs = NULL; | 150struct susppcb **susppcbs; |
151 152/* Variables needed for SMP tlb shootdown. */ 153vm_offset_t smp_tlb_addr1; 154vm_offset_t smp_tlb_addr2; 155volatile int smp_tlb_wait; 156 157#ifdef COUNT_IPIS 158/* Interrupt counts. */ --- 1357 unchanged lines hidden (view full) --- 1516void 1517cpususpend_handler(void) 1518{ 1519 u_int cpu; 1520 1521 mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); 1522 1523 cpu = PCPU_GET(cpuid); | 151 152/* Variables needed for SMP tlb shootdown. */ 153vm_offset_t smp_tlb_addr1; 154vm_offset_t smp_tlb_addr2; 155volatile int smp_tlb_wait; 156 157#ifdef COUNT_IPIS 158/* Interrupt counts. */ --- 1357 unchanged lines hidden (view full) --- 1516void 1517cpususpend_handler(void) 1518{ 1519 u_int cpu; 1520 1521 mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); 1522 1523 cpu = PCPU_GET(cpuid); |
1524 if (savectx(susppcbs[cpu])) { 1525 npxsuspend(&susppcbs[cpu]->pcb_fpususpend); | 1524 if (savectx(&susppcbs[cpu]->sp_pcb)) { 1525 npxsuspend(&susppcbs[cpu]->sp_fpususpend); |
1526 wbinvd(); 1527 CPU_SET_ATOMIC(cpu, &suspended_cpus); 1528 } else { | 1526 wbinvd(); 1527 CPU_SET_ATOMIC(cpu, &suspended_cpus); 1528 } else { |
1529 npxresume(&susppcbs[cpu]->pcb_fpususpend); | 1529 npxresume(&susppcbs[cpu]->sp_fpususpend); |
1530 pmap_init_pat(); 1531 PCPU_SET(switchtime, 0); 1532 PCPU_SET(switchticks, ticks); 1533 1534 /* Indicate that we are resumed */ 1535 CPU_CLR_ATOMIC(cpu, &suspended_cpus); 1536 } 1537 --- 130 unchanged lines hidden --- | 1530 pmap_init_pat(); 1531 PCPU_SET(switchtime, 0); 1532 PCPU_SET(switchticks, ticks); 1533 1534 /* Indicate that we are resumed */ 1535 CPU_CLR_ATOMIC(cpu, &suspended_cpus); 1536 } 1537 --- 130 unchanged lines hidden --- |