diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-14 12:26:20 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-14 12:26:20 +0200 |
commit | 2c4aff7e10734e214fc651a840cd9cc9aa2617ae (patch) | |
tree | 243b6046637a99a65df5217f17a5a81861efd1ac /xen/include/asm-x86/mach-generic | |
parent | 9cff0937b26fde65ae0077e1d4589a8b0926c816 (diff) | |
download | xen-2c4aff7e10734e214fc651a840cd9cc9aa2617ae.tar.gz xen-2c4aff7e10734e214fc651a840cd9cc9aa2617ae.tar.bz2 xen-2c4aff7e10734e214fc651a840cd9cc9aa2617ae.zip |
x86: clean up physid_mask_t handling
This eliminates passing and returning by value of this type (making it
unnecessary for the compiler to create temporary variables for doing so
on the stack), thus dramatically reducing the stack frame sizes of a
couple of functions (was in one case over 12k for a 4095-CPU build).
In one case a local variable gets converted to a static one, possible
because the function gets called at most once (during early boot).
Some accessors get eliminated altogether as being unused or as being
equally well open coded at the place of use.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/mach-generic')
-rw-r--r-- | xen/include/asm-x86/mach-generic/mach_apic.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h b/xen/include/asm-x86/mach-generic/mach_apic.h index 509d997a98..ef764564ff 100644 --- a/xen/include/asm-x86/mach-generic/mach_apic.h +++ b/xen/include/asm-x86/mach-generic/mach_apic.h @@ -58,29 +58,24 @@ static inline int apic_id_registered(void) phys_cpu_present_map); } -static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) +static inline void ioapic_phys_id_map(physid_mask_t *map) { - return phys_map; + *map = phys_cpu_present_map; } -static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) +static inline int check_apicid_used(const physid_mask_t *map, int apicid) { - return physid_isset(apicid, bitmap); + return physid_isset(apicid, *map); } -static inline unsigned long check_apicid_present(int apicid) +static inline int check_apicid_present(int apicid) { return physid_isset(apicid, phys_cpu_present_map); } -static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) +static inline void set_apicid(int phys_apicid, physid_mask_t *map) { - return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); -} - -static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) -{ - return physid_mask_of_physid(phys_apicid); + physid_set(phys_apicid, *map); } #endif /* __ASM_MACH_APIC_H */ |