cleanup
Hi!
Attached patch makes local functions static and removes unused functions.
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
xen/arch/x86/apic.c +3 -8
@@ -52,7 +52,7 @@ int x2apic_enabled __read_mostly = 0;static void apic_pm_activate (void ); -int modern_apic (void ) +static int modern_apic (void ) {unsigned int lvr, version;/* AMD systems use old APIC versions, so check the CPU */
@@ -995,7 +995,7 @@ void (*wait_timer_tick)(void) __initdata#define APIC_DIVISOR 1 -void __setup_APIC_LVTT (unsigned int clocks) +static void __setup_APIC_LVTT (unsigned int clocks) {unsigned int lvtt_value, tmp_value, ver;
@@ -1033,7 +1033,7 @@ static void __devinit setup_APIC_timer(u* APIC irq that way. */ -int __init calibrate_APIC_clock (void ) +static int __init calibrate_APIC_clock (void ) {unsigned long long t1 =0 , t2 =0 ;long tt1, tt2;
@@ -1107,11 +1107,6 @@ int __init calibrate_APIC_clock(void)return result; } -u32 get_apic_bus_cycle (void ) -{ -return bus_cycle; -} -static unsigned int calibration_result;void __init setup_boot_APIC_clock (void )
xen/arch/x86/cpu/intel.c +0 -20
@@ -69,26 +69,6 @@ void __devinit early_intel_workaround(st }/* -* Early probe support logic for ppro memory erratum #50 -* -* This is called before we do cpu ident work -*/ - -int __devinit ppro_with_ram_bug (void ) -{ -/* Uses data from early_cpu_detect now */ -if (boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL && - boot_cpu_data.x86 ==6 && - boot_cpu_data.x86_model ==1 && - boot_cpu_data.x86_mask <8 ) { -printk (KERN_INFO "Pentium Pro with Errata#50 detected. Taking evasive action.\n" ); -return 1 ; - } -return 0 ; -} - - -/* * P4 Xeon errata 037 workaround. * Hardware prefetcher may cause stale data to be loaded into the cache. */
xen/arch/x86/cpu/mcheck/amd_nonfatal.c +1 -1
@@ -80,7 +80,7 @@ static int variable_period = 1;* Collects information of correctable errors and notifies * Dom0 via an event. */ -void mce_amd_checkregs (void *info) +static void mce_amd_checkregs (void *info) {mctelem_cookie_t mctc;struct mca_summary bs;
xen/arch/x86/cpu/mcheck/mce_intel.c +1 -1
@@ -329,7 +331,7 @@ static int inject_mce(struct domain *d)return 0 ; } -void intel_UCR_handler (struct mcinfo_bank *bank, +static void intel_UCR_handler (struct mcinfo_bank *bank,struct mcinfo_global *global,struct mcinfo_extended *extension,struct mca_handle_result *result)
xen/arch/x86/genapic/x2apic.c +2 -2
@@ -29,13 +29,13 @@ boolean_param("x2apic", x2apic);static int x2apic_phys =0 ;/* By default we use logical cluster mode. */ boolean_param ("x2apic_phys" , x2apic_phys); -__init int probe_x2apic_phys (void ) +static int __init probe_x2apic_phys (void ) {return x2apic && x2apic_phys &&x2apic_is_available () &&iommu_supports_eim (); } -__init int probe_x2apic_cluster (void ) +static int __init probe_x2apic_cluster (void ) {return x2apic && !x2apic_phys &&x2apic_is_available () &&iommu_supports_eim ();
xen/arch/x86/hvm/i8254.c +1 -1
@@ -151,7 +151,7 @@ static void pit_set_gate(PITState *pit, s->gate = val; } -int pit_get_gate (PITState *pit,int channel) +static int pit_get_gate (PITState *pit,int channel) {ASSERT (spin_is_locked (&pit->lock));return pit->hw.channels[channel].gate;
xen/arch/x86/hvm/io.c +2 -2
@@ -244,7 +244,7 @@ void hvm_io_assist(void)vcpu_end_shutdown_deferral (curr); } -void dpci_ioport_read (uint32_t mport,ioreq_t *p) +static void dpci_ioport_read (uint32_t mport,ioreq_t *p) {int i, sign = p->df ?-1 :1 ;uint32_t data =0 ;
@@ -274,7 +274,7 @@ void dpci_ioport_read(uint32_t mport, io } } -void dpci_ioport_write (uint32_t mport,ioreq_t *p) +static void dpci_ioport_write (uint32_t mport,ioreq_t *p) {int i, sign = p->df ?-1 :1 ;uint32_t data;
xen/arch/x86/hvm/vlapic.c +2 -2
@@ -146,7 +146,7 @@ static int vlapic_find_highest_isr(strucreturn vlapic_find_highest_vector (&vlapic->regs->data[APIC_ISR ]); } -uint32_t vlapic_get_ppr (struct vlapic *vlapic) +static uint32_t vlapic_get_ppr (struct vlapic *vlapic) {uint32_t tpr, isrv, ppr;int isr;
@@ -531,7 +531,7 @@ static int vlapic_read(return X86EMUL_OKAY ; } -void vlapic_pt_cb (struct vcpu *v,void *data) +static void vlapic_pt_cb (struct vcpu *v,void *data) { *(s_time_t *)data =hvm_get_guest_time (v); }
xen/arch/x86/io_apic.c +2 -2
@@ -911,7 +913,7 @@ static inline void UNEXPECTED_IO_APIC(vo { } -void /*__init*/ __print_IO_APIC (void ) +static void /*__init*/ __print_IO_APIC (void ) {int apic, i;union IO_APIC_reg_00 reg_00;
@@ -2105,7 +2108,7 @@ static int ioapic_physbase_to_id(unsigneunsigned apic_gsi_base (int apic); -int apic_pin_2_gsi_irq (int apic,int pin) +static int apic_pin_2_gsi_irq (int apic,int pin) {int idx, irq;
xen/arch/x86/ioport_emulate.c +2 -2
@@ -42,7 +42,7 @@ static void ioemul_handle_proliant_quirk io_emul_stub[9 ] =0xc3 ; } -int __init proliant_quirk (struct dmi_system_id *d) +static int __init proliant_quirk (struct dmi_system_id *d) { ioemul_handle_quirk = ioemul_handle_proliant_quirk;return 0 ;
@@ -121,7 +121,7 @@ static struct dmi_system_id __initdata i { } }; -int __init ioport_quirks_init (void ) +static int __init ioport_quirks_init (void ) {dmi_check_system (ioport_quirks_tbl);return 0 ;
xen/arch/x86/irq.c +1 -1
@@ -147,7 +147,7 @@ out:return irq; } -void dynamic_irq_cleanup (unsigned int irq) +static void dynamic_irq_cleanup (unsigned int irq) {struct irq_desc *desc =irq_to_desc (irq);unsigned long flags;
xen/arch/x86/mm/hap/guest_walk.c +1 -0
@@ -24,6 +24,7 @@#include <xen/paging.h> #include <xen/config.h> #include <xen/sched.h> +#include "private.h" /* for hap_gva_to_gfn_* */ #define _hap_gva_to_gfn (levels) hap_gva_to_gfn_##levels##level#define hap_gva_to_gfn (levels) _hap_gva_to_gfn(levels)
xen/arch/x86/mm/hap/hap.c +8 -8
@@ -55,7 +55,7 @@/* HAP VRAM TRACKING SUPPORT */ /************************************************/ -int hap_enable_vram_tracking (struct domain *d) +static int hap_enable_vram_tracking (struct domain *d) {int i;struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
@@ -76,7 +76,7 @@ int hap_enable_vram_tracking(struct domareturn 0 ; } -int hap_disable_vram_tracking (struct domain *d) +static int hap_disable_vram_tracking (struct domain *d) {int i;struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
@@ -96,7 +96,7 @@ int hap_disable_vram_tracking(struct domreturn 0 ; } -void hap_clean_vram_tracking (struct domain *d) +static void hap_clean_vram_tracking (struct domain *d) {int i;struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
@@ -111,7 +111,7 @@ void hap_clean_vram_tracking(struct domaflush_tlb_mask (&d->domain_dirty_cpumask); } -void hap_vram_tracking_init (struct domain *d) +static void hap_vram_tracking_init (struct domain *d) { paging_log_dirty_init(d, hap_enable_vram_tracking, hap_disable_vram_tracking,
@@ -192,7 +192,7 @@ param_fail:/************************************************/ /* hap code to call when log_dirty is enable. return 0 if no problem found. */ -int hap_enable_log_dirty (struct domain *d) +static int hap_enable_log_dirty (struct domain *d) {/* turn on PG_log_dirty bit in paging mode */ hap_lock (d);
@@ -205,7 +205,7 @@ int hap_enable_log_dirty(struct domain *return 0 ; } -int hap_disable_log_dirty (struct domain *d) +static int hap_disable_log_dirty (struct domain *d) {hap_lock (d); d->arch.paging.mode &= ~PG_log_dirty;
@@ -216,7 +216,7 @@ int hap_disable_log_dirty(struct domainreturn 0 ; } -void hap_clean_dirty_bitmap (struct domain *d) +static void hap_clean_dirty_bitmap (struct domain *d) {/* set l1e entries of P2M table to be read-only. */ p2m_change_entry_type_global (d, p2m_ram_rw, p2m_ram_logdirty);
@@ -312,7 +312,7 @@ static struct page_info *hap_alloc_p2m_preturn pg; } -void hap_free_p2m_page (struct domain *d,struct page_info *pg) +static void hap_free_p2m_page (struct domain *d,struct page_info *pg) {hap_lock (d);ASSERT (page_get_owner (pg) == d);
xen/arch/x86/mm/p2m.c +1 -1
@@ -230,7 +230,7 @@ staticint set_p2m_entry (struct domain *d,unsigned long gfn,mfn_t mfn,unsigned int page_order,p2m_type_t p2mt); -int +static int p2m_pod_cache_add (struct domain *d,struct page_info *page,unsigned long order)
xen/arch/x86/mm/paging.c +1 -1
@@ -626,7 +628,7 @@ void paging_log_dirty_init(struct domain }/* This function fress log dirty bitmap resources. */ -void paging_log_dirty_teardown (struct domain *d) +static void paging_log_dirty_teardown (struct domain *d) {log_dirty_lock (d);paging_free_log_dirty_bitmap (d);
xen/arch/x86/traps.c +4 -3
@@ -63,6 +63,7 @@#include <asm/x86_emulate.h> #include <asm/traps.h> #include <asm/hvm/vpt.h> +#include <asm/hypercall.h> #include <public/arch-x86/cpuid.h> /*
@@ -383,7 +384,7 @@ void vcpu_show_execution_state(struct vcvcpu_unpause (v); } -char *trapstr (int trapnr) +static char *trapstr (int trapnr) {static char *strings[] = {"divide error" ,"debug" ,"nmi" ,"bkpt" ,"overflow" ,"bounds" ,
@@ -2872,7 +2878,7 @@ static void nmi_dom0_report(unsigned intsend_guest_trap (d,0 , TRAP_nmi); } -asmlinkage void mem_parity_error(struct cpu_user_regs *regs) +static void mem_parity_error (struct cpu_user_regs *regs) {switch ( opt_nmi[0 ] ) {
@@ -2891,7 +2897,7 @@ asmlinkage void mem_parity_error(structoutb ((inb (0x61 ) &0x0b ) |0x00 ,0x61 );/* enable parity check */ } -asmlinkage void io_check_error(struct cpu_user_regs *regs) +static void io_check_error (struct cpu_user_regs *regs) {switch ( opt_nmi[0 ] ) {
xen/arch/x86/x86_emulate/x86_emulate.c +2 -3
@@ -1183,9 +1183,8 @@ decode_register( }#define decode_segment_failed x86_seg_tr -enum x86_segment -decode_segment ( -uint8_t modrm_reg) +static enum x86_segment +decode_segment (uint8_t modrm_reg) {switch ( modrm_reg ) {
xen/common/sched_credit.c +1 -1
@@ -211,7 +211,7 @@ __runq_remove(struct csched_vcpu *svc)list_del_init (&svc->runq_elem); } -void burn_credits (struct csched_vcpu *svc,s_time_t now) +static void burn_credits (struct csched_vcpu *svc,s_time_t now) {s_time_t delta;
xen/crypto/vmac.c +0 -56
62 lines not on this page · raw message
xen/drivers/char/console.c +0 -10
@@ -721,16 +723,6 @@ void console_end_sync(void)atomic_dec (&print_everything); } -void console_putc (char c) -{ -serial_putc (sercon_handle, c); -} - -int console_getc (void ) -{ -return serial_getc (sercon_handle); -} -/* * printk rate limiting, lifted from Linux. *
xen/drivers/passthrough/amd/iommu_detect.c +1 -1
@@ -69,7 +69,7 @@ static int __init get_iommu_msi_capabilireturn 0 ; } -int __init get_iommu_capabilities (u8 bus,u8 dev,u8 func,u8 cap_ptr, +static int __init get_iommu_capabilities (u8 bus,u8 dev,u8 func,u8 cap_ptr,struct amd_iommu *iommu) {u32 cap_header, cap_range, misc_info;
xen/drivers/passthrough/amd/iommu_init.c +2 -2
@@ -508,7 +508,7 @@ static int set_iommu_interrupt_handler(sreturn irq; } -void enable_iommu (struct amd_iommu *iommu) +static void enable_iommu (struct amd_iommu *iommu) {unsigned long flags;
@@ -596,7 +596,7 @@ static int __init allocate_event_log(strreturn (allocate_iommu_table_struct (&iommu->event_log,"Event Log" )); } -int __init amd_iommu_init_one (struct amd_iommu *iommu) +static int __init amd_iommu_init_one (struct amd_iommu *iommu) {if (allocate_cmd_buffer (iommu) !=0 ) goto error_out;
xen/drivers/passthrough/amd/iommu_map.c +0 -10
@@ -404,16 +404,6 @@ void invalidate_dev_table_entry(struct asend_iommu_command (iommu, cmd); } -int amd_iommu_is_dte_page_translation_valid (u32 *entry) -{ -return (get_field_from_reg_u32 (entry[0 ], -IOMMU_DEV_TABLE_VALID_MASK , -IOMMU_DEV_TABLE_VALID_SHIFT ) && -get_field_from_reg_u32 (entry[0 ], -IOMMU_DEV_TABLE_TRANSLATION_VALID_MASK , -IOMMU_DEV_TABLE_TRANSLATION_VALID_SHIFT )); -} -static u64 iommu_l2e_from_pfn (struct page_info *table,int level,unsigned long io_pfn) {
xen/drivers/passthrough/vtd/intremap.c +1 -1
@@ -97,7 +97,7 @@ static int init_apic_pin_2_ir_idx(void)return 0 ; } -u16 apicid_to_bdf (int apic_id) +static u16 apicid_to_bdf (int apic_id) {struct acpi_drhd_unit *drhd =ioapic_to_drhd (apic_id);struct acpi_ioapic_unit *acpi_ioapic_unit;
xen/drivers/passthrough/vtd/iommu.c +6 -6
@@ -495,7 +495,7 @@ static int inline iommu_flush_iotlb_psi( flush_non_present_entry, flush_dev_iotlb); } -void iommu_flush_all (void ) +static void iommu_flush_all (void ) {struct acpi_drhd_unit *drhd;struct iommu *iommu;
@@ -1385,7 +1388,7 @@ void iommu_domain_teardown(struct domainiommu_domid_release (d); } -int intel_iommu_map_page ( +static int intel_iommu_map_page (struct domain *d,unsigned long gfn,unsigned long mfn) {struct hvm_iommu *hd =domain_hvm_iommu (d);
@@ -1446,7 +1449,7 @@ int intel_iommu_map_page(return 0 ; } -int intel_iommu_unmap_page (struct domain *d,unsigned long gfn) +static int intel_iommu_unmap_page (struct domain *d,unsigned long gfn) {struct acpi_drhd_unit *drhd;struct iommu *iommu;
@@ -1822,7 +1825,7 @@ int device_assigned(u8 bus, u8 devfn)return 0 ; } -int intel_iommu_assign_device (struct domain *d,u8 bus,u8 devfn) +static int intel_iommu_assign_device (struct domain *d,u8 bus,u8 devfn) {struct acpi_rmrr_unit *rmrr;int ret =0 , i;
@@ -1884,7 +1887,7 @@ static int intel_iommu_group_id(u8 bus, }static u32 iommu_state[MAX_IOMMUS ][MAX_IOMMU_REGS ]; -void vtd_suspend (void ) +static void vtd_suspend (void ) {struct acpi_drhd_unit *drhd;struct iommu *iommu;
@@ -1923,7 +1926,7 @@ void vtd_suspend(void) } } -void vtd_resume (void ) +static void vtd_resume (void ) {struct acpi_drhd_unit *drhd;struct iommu *iommu;
xen/drivers/passthrough/vtd/qinval.c +1 -1
@@ -332,7 +332,7 @@ int queue_invalidate_iec(struct iommu *ireturn ret; } -int __iommu_flush_iec (struct iommu *iommu,u8 granu,u8 im,u16 iidx) +static int __iommu_flush_iec (struct iommu *iommu,u8 granu,u8 im,u16 iidx) {int ret; ret =queue_invalidate_iec (iommu, granu, im, iidx);
xen/include/asm-x86/msi.h +2 -0
@@ -225,4 +225,6 @@ struct msg_address {__u32 hi_address; } __attribute__ ((packed)); +void msi_compose_msg (struct pci_dev *pdev,int irq, +struct msi_msg *msg);#endif /* __ASM_MSI_H */
xen/include/xen/xenoprof.h +1 -0
@@ -64,6 +64,7 @@ struct xenoprof {#endif struct domain ; +int is_passive (struct domain *d);void free_xenoprof_pages (struct domain *d);int do_xenoprof_op (int op,XEN_GUEST_HANDLE (void ) arg);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel