pcpu.h (6c47aaae12ea84af9d94e32796fccb873af36a0e) | pcpu.h (93ee134a24fa25fde49b66da24f4262f37bf3249) |
---|---|
1/*- 2 * Copyright (c) Peter Wemm 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 --- 31 unchanged lines hidden (view full) --- 40 41/* 42 * The SMP parts are setup in pmap.c and locore.s for the BSP, and 43 * mp_machdep.c sets up the data for the AP's to "see" when they awake. 44 * The reason for doing it via a struct is so that an array of pointers 45 * to each CPU's data can be set up for things like "check curproc on all 46 * other processors" 47 */ | 1/*- 2 * Copyright (c) Peter Wemm 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 --- 31 unchanged lines hidden (view full) --- 40 41/* 42 * The SMP parts are setup in pmap.c and locore.s for the BSP, and 43 * mp_machdep.c sets up the data for the AP's to "see" when they awake. 44 * The reason for doing it via a struct is so that an array of pointers 45 * to each CPU's data can be set up for things like "check curproc on all 46 * other processors" 47 */ |
48 49#ifdef XEN |
|
48#define PCPU_MD_FIELDS \ 49 char pc_monitorbuf[128] __aligned(128); /* cache line */ \ 50 struct pcpu *pc_prvspace; /* Self-reference */ \ 51 struct pmap *pc_curpmap; \ 52 struct i386tss pc_common_tss; \ 53 struct segment_descriptor pc_common_tssd; \ 54 struct segment_descriptor *pc_tss_gdt; \ 55 struct segment_descriptor *pc_fsgs_gdt; \ | 50#define PCPU_MD_FIELDS \ 51 char pc_monitorbuf[128] __aligned(128); /* cache line */ \ 52 struct pcpu *pc_prvspace; /* Self-reference */ \ 53 struct pmap *pc_curpmap; \ 54 struct i386tss pc_common_tss; \ 55 struct segment_descriptor pc_common_tssd; \ 56 struct segment_descriptor *pc_tss_gdt; \ 57 struct segment_descriptor *pc_fsgs_gdt; \ |
58 vm_paddr_t *pc_pdir_shadow; \ |
|
56 int pc_currentldt; \ 57 u_int pc_acpi_id; /* ACPI CPU id */ \ 58 u_int pc_apic_id; \ | 59 int pc_currentldt; \ 60 u_int pc_acpi_id; /* ACPI CPU id */ \ 61 u_int pc_apic_id; \ |
62 int pc_private_tss; /* Flag indicating private tss*/\ 63 u_int pc_cr3; /* track cr3 for R1/R3*/ \ 64 u_int pc_pdir; \ 65 u_int pc_lazypmap; \ 66 u_int pc_rendezvous; \ 67 u_int pc_cpuast 68 69 70#else 71#define PCPU_MD_FIELDS \ 72 char pc_monitorbuf[128] __aligned(128); /* cache line */ \ 73 struct pcpu *pc_prvspace; /* Self-reference */ \ 74 struct pmap *pc_curpmap; \ 75 struct i386tss pc_common_tss; \ 76 struct segment_descriptor pc_common_tssd; \ 77 struct segment_descriptor *pc_tss_gdt; \ 78 struct segment_descriptor *pc_fsgs_gdt; \ 79 int pc_currentldt; \ 80 u_int pc_acpi_id; /* ACPI CPU id */ \ 81 u_int pc_apic_id; \ |
|
59 int pc_private_tss /* Flag indicating private tss */ 60 | 82 int pc_private_tss /* Flag indicating private tss */ 83 |
84#endif |
|
61#ifdef lint 62 63extern struct pcpu *pcpup; 64 65#define PCPU_GET(member) (pcpup->pc_ ## member) 66#define PCPU_ADD(member, val) (pcpu->pc_ ## member += (val)) 67#define PCPU_INC(member) PCPU_ADD(member, 1) 68#define PCPU_PTR(member) (&pcpup->pc_ ## member) --- 141 unchanged lines hidden --- | 85#ifdef lint 86 87extern struct pcpu *pcpup; 88 89#define PCPU_GET(member) (pcpup->pc_ ## member) 90#define PCPU_ADD(member, val) (pcpu->pc_ ## member += (val)) 91#define PCPU_INC(member) PCPU_ADD(member, 1) 92#define PCPU_PTR(member) (&pcpup->pc_ ## member) --- 141 unchanged lines hidden --- |