hv:unify spin_lock initialization
will follow this convention for spin lock initialization: -- for simple global variable locks, use this style: static spinlock_t xxx_spinlock = {.head = 0U, .tail = 0U,} -- for the locks inside a data structure, need to call spinlock_init to initialize. Tracked-On: #4958 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
parent
7b32fce06f
commit
7751c7933d
|
@ -19,7 +19,7 @@
|
|||
|
||||
static struct gsi_table gsi_table_data[NR_MAX_GSI];
|
||||
static uint32_t ioapic_max_nr_gsi;
|
||||
static spinlock_t ioapic_lock;
|
||||
static spinlock_t ioapic_lock = { .head = 0U, .tail = 0U, };
|
||||
|
||||
static union ioapic_rte saved_rte[CONFIG_MAX_IOAPIC_NUM][CONFIG_MAX_IOAPIC_LINES];
|
||||
|
||||
|
@ -425,8 +425,6 @@ void ioapic_setup_irqs(void)
|
|||
uint32_t gsi = 0U;
|
||||
uint32_t vr;
|
||||
|
||||
spinlock_init(&ioapic_lock);
|
||||
|
||||
for (ioapic_id = 0U;
|
||||
ioapic_id < ioapic_num; ioapic_id++) {
|
||||
void *addr;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define PTIRQ_BITMAP_ARRAY_SIZE INT_DIV_ROUNDUP(CONFIG_MAX_PT_IRQ_ENTRIES, 64U)
|
||||
struct ptirq_remapping_info ptirq_entries[CONFIG_MAX_PT_IRQ_ENTRIES];
|
||||
static uint64_t ptirq_entry_bitmaps[PTIRQ_BITMAP_ARRAY_SIZE];
|
||||
spinlock_t ptdev_lock;
|
||||
spinlock_t ptdev_lock = { .head = 0U, .tail = 0U, };
|
||||
|
||||
static struct ptirq_entry_head {
|
||||
struct hlist_head list;
|
||||
|
@ -223,7 +223,6 @@ void ptirq_deactivate_entry(struct ptirq_remapping_info *entry)
|
|||
void ptdev_init(void)
|
||||
{
|
||||
if (get_pcpu_id() == BSP_CPU_ID) {
|
||||
spinlock_init(&ptdev_lock);
|
||||
register_softirq(SOFTIRQ_PTDEV, ptirq_softirq);
|
||||
}
|
||||
INIT_LIST_HEAD(&get_cpu_var(softirq_dev_entry_list));
|
||||
|
|
Loading…
Reference in New Issue