Date: Wed, 2 Jun 2010 15:09:36 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208742 - head/sys/i386/include Message-ID: <201006021509.o52F9aJN089123@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Jun 2 15:09:36 2010 New Revision: 208742 URL: http://svn.freebsd.org/changeset/base/208742 Log: 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 Modified: head/sys/i386/include/pcpu.h Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Wed Jun 2 11:21:35 2010 (r208741) +++ head/sys/i386/include/pcpu.h Wed Jun 2 15:09:36 2010 (r208742) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006021509.o52F9aJN089123>