mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: treewide: drop debug-only helpers in release build
There are multiple helpers for collecting info to be printed on the ACRN uart console. They are unreachable code in release builds in which the uart console is removed. To define a precise boundary for safety-related activities, this patch wraps the declarations and definitions to these helpers with "#ifdef HV_DEBUG" so that these unreachable APIs will be dropped in release builds. v1 -> v2: * Fix coding style: no empty lines between #ifdef and the wrapped code. * Also drop get_rte_info() in ioapic.c, which is solely used by get_ioapic_info(). Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -70,7 +70,6 @@ extern spinlock_t softirq_dev_lock;
|
||||
void ptdev_softirq(__unused uint16_t cpu);
|
||||
void ptdev_init(void);
|
||||
void ptdev_release_all_entries(struct vm *vm);
|
||||
void get_ptdev_info(char *str, int str_max);
|
||||
|
||||
struct ptdev_remapping_info *ptdev_dequeue_softirq(void);
|
||||
struct ptdev_remapping_info *alloc_entry(struct vm *vm,
|
||||
@@ -81,4 +80,8 @@ struct ptdev_remapping_info *ptdev_activate_entry(
|
||||
int phys_irq, bool lowpri);
|
||||
void ptdev_deactivate_entry(struct ptdev_remapping_info *entry);
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_ptdev_info(char *str, int str_max);
|
||||
#endif /* HV_DEBUG */
|
||||
|
||||
#endif /* PTDEV_H */
|
||||
|
Reference in New Issue
Block a user