summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-06-02 15:09:36 +0000
committerjhb <jhb@FreeBSD.org>2010-06-02 15:09:36 +0000
commit1e346ed45c5c026b00bf2a5b4ef9cf73f0a8859f (patch)
treefc6d292213444bad16e85fba39bd374bdbc2dc34 /sys/i386
parentef36c6939e66c9aa805e7cdf4b7411d5b3565f61 (diff)
downloadFreeBSD-src-1e346ed45c5c026b00bf2a5b4ef9cf73f0a8859f.zip
FreeBSD-src-1e346ed45c5c026b00bf2a5b4ef9cf73f0a8859f.tar.gz
MFamd64: Add a new macro PCPU_XEN_FIELDS to hold XEN-specific per-CPU
fields that is always included in PCPU_MD_FIELDS. The macro is empty for non-XEN kernels. This avoids duplicating non-XEN per-CPU fields in two places. While here, remove several unused fields from the XEN-specific structure. Reviewed by: kmacy, gibbs MFC after: 1 month
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/pcpu.h39
1 files changed, 11 insertions, 28 deletions
diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h
index 5345eb6..d80f8e1 100644
--- a/sys/i386/include/pcpu.h
+++ b/sys/i386/include/pcpu.h
@@ -62,36 +62,20 @@ struct shadow_time_info {
uint32_t version;
};
-
-#define PCPU_MD_FIELDS \
- char pc_monitorbuf[128] __aligned(128); /* cache line */ \
- struct pcpu *pc_prvspace; /* Self-reference */ \
- struct pmap *pc_curpmap; \
- struct i386tss pc_common_tss; \
- struct segment_descriptor pc_common_tssd; \
- struct segment_descriptor *pc_tss_gdt; \
- struct segment_descriptor *pc_fsgs_gdt; \
- vm_paddr_t *pc_pdir_shadow; \
- int pc_currentldt; \
- u_int pc_acpi_id; /* ACPI CPU id */ \
- u_int pc_apic_id; \
- int pc_private_tss; /* Flag indicating private tss*/\
- u_int pc_cmci_mask; /* MCx banks for CMCI */ \
- u_int pc_cr3; /* track cr3 for R1/R3*/ \
- u_int pc_pdir; \
- u_int pc_lazypmap; \
- u_int pc_rendezvous; \
- u_int pc_cpuast; \
- uint64_t pc_processed_system_time; \
+#define PCPU_XEN_FIELDS \
+ ; \
+ u_int pc_cr3; /* track cr3 for R1/R3*/ \
+ vm_paddr_t *pc_pdir_shadow; \
+ uint64_t pc_processed_system_time; \
struct shadow_time_info pc_shadow_time; \
int pc_resched_irq; \
int pc_callfunc_irq; \
- int pc_virq_to_irq[NR_VIRQS]; \
- int pc_ipi_to_irq[NR_IPIS]
-
-
-
+ int pc_virq_to_irq[NR_VIRQS]; \
+ int pc_ipi_to_irq[NR_IPIS]
#else
+#define PCPU_XEN_FIELDS
+#endif
+
#define PCPU_MD_FIELDS \
char pc_monitorbuf[128] __aligned(128); /* cache line */ \
struct pcpu *pc_prvspace; /* Self-reference */ \
@@ -105,8 +89,7 @@ struct shadow_time_info {
u_int pc_apic_id; \
int pc_private_tss; /* Flag indicating private tss*/\
u_int pc_cmci_mask /* MCx banks for CMCI */ \
-
-#endif
+ PCPU_XEN_FIELDS
#ifdef _KERNEL
OpenPOWER on IntegriCloud