mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 16:15:00 +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:
@@ -20,7 +20,6 @@
|
||||
#define GSI_SET_RTE(irq, rte) ioapic_set_rte((irq), (rte))
|
||||
|
||||
void setup_ioapic_irq(void);
|
||||
int get_ioapic_info(char *str, int str_max_len);
|
||||
|
||||
bool irq_is_gsi(uint32_t irq);
|
||||
uint32_t irq_gsi_num(void);
|
||||
@@ -36,4 +35,9 @@ void resume_ioapic(void);
|
||||
|
||||
extern uint16_t legacy_irq_to_pin[];
|
||||
extern uint16_t pic_ioapic_pin_map[];
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
int get_ioapic_info(char *str, int str_max_len);
|
||||
#endif /* HV_DEBUG */
|
||||
|
||||
#endif /* IOAPIC_H */
|
||||
|
||||
Reference in New Issue
Block a user