linux/arch/x86/kernel/apic/vector.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Local APIC related interfaces to support IOAPIC, MSI, etc.
 *
 * Copyright (C) 1997, 1998, 1999, 2000, 2009 Ingo Molnar, Hajnalka Szabo
 *	Moved from arch/x86/kernel/apic/io_apic.c.
 * Jiang Liu <[email protected]>
 *	Enable support of hierarchical irqdomains
 */
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/seq_file.h>
#include <linux/init.h>
#include <linux/compiler.h>
#include <linux/slab.h>
#include <asm/irqdomain.h>
#include <asm/hw_irq.h>
#include <asm/traps.h>
#include <asm/apic.h>
#include <asm/i8259.h>
#include <asm/desc.h>
#include <asm/irq_remapping.h>

#include <asm/trace/irq_vectors.h>

struct apic_chip_data {};

struct irq_domain *x86_vector_domain;
EXPORT_SYMBOL_GPL();
static DEFINE_RAW_SPINLOCK(vector_lock);
static cpumask_var_t vector_searchmask;
static struct irq_chip lapic_controller;
static struct irq_matrix *vector_matrix;
#ifdef CONFIG_SMP

static void vector_cleanup_callback(struct timer_list *tmr);

struct vector_cleanup {};

static DEFINE_PER_CPU(struct vector_cleanup, vector_cleanup) =;
#endif

void lock_vector_lock(void)
{}

void unlock_vector_lock(void)
{}

void init_irq_alloc_info(struct irq_alloc_info *info,
			 const struct cpumask *mask)
{}

void copy_irq_alloc_info(struct irq_alloc_info *dst, struct irq_alloc_info *src)
{}

static struct apic_chip_data *apic_chip_data(struct irq_data *irqd)
{}

struct irq_cfg *irqd_cfg(struct irq_data *irqd)
{}
EXPORT_SYMBOL_GPL();

struct irq_cfg *irq_cfg(unsigned int irq)
{}

static struct apic_chip_data *alloc_apic_chip_data(int node)
{}

static void free_apic_chip_data(struct apic_chip_data *apicd)
{}

static void apic_update_irq_cfg(struct irq_data *irqd, unsigned int vector,
				unsigned int cpu)
{}

static void apic_update_vector(struct irq_data *irqd, unsigned int newvec,
			       unsigned int newcpu)
{}

static void vector_assign_managed_shutdown(struct irq_data *irqd)
{}

static int reserve_managed_vector(struct irq_data *irqd)
{}

static void reserve_irq_vector_locked(struct irq_data *irqd)
{}

static int reserve_irq_vector(struct irq_data *irqd)
{}

static int
assign_vector_locked(struct irq_data *irqd, const struct cpumask *dest)
{}

static int assign_irq_vector(struct irq_data *irqd, const struct cpumask *dest)
{}

static int assign_irq_vector_any_locked(struct irq_data *irqd)
{}

static int
assign_irq_vector_policy(struct irq_data *irqd, struct irq_alloc_info *info)
{}

static int
assign_managed_vector(struct irq_data *irqd, const struct cpumask *dest)
{}

static void clear_irq_vector(struct irq_data *irqd)
{}

static void x86_vector_deactivate(struct irq_domain *dom, struct irq_data *irqd)
{}

static int activate_reserved(struct irq_data *irqd)
{}

static int activate_managed(struct irq_data *irqd)
{}

static int x86_vector_activate(struct irq_domain *dom, struct irq_data *irqd,
			       bool reserve)
{}

static void vector_free_reserved_and_managed(struct irq_data *irqd)
{}

static void x86_vector_free_irqs(struct irq_domain *domain,
				 unsigned int virq, unsigned int nr_irqs)
{}

static bool vector_configure_legacy(unsigned int virq, struct irq_data *irqd,
				    struct apic_chip_data *apicd)
{}

static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,
				 unsigned int nr_irqs, void *arg)
{}

#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
static void x86_vector_debug_show(struct seq_file *m, struct irq_domain *d,
				  struct irq_data *irqd, int ind)
{}
#endif

int x86_fwspec_is_ioapic(struct irq_fwspec *fwspec)
{}

int x86_fwspec_is_hpet(struct irq_fwspec *fwspec)
{}

static int x86_vector_select(struct irq_domain *d, struct irq_fwspec *fwspec,
			     enum irq_domain_bus_token bus_token)
{}

static const struct irq_domain_ops x86_vector_domain_ops =;

int __init arch_probe_nr_irqs(void)
{}

void lapic_assign_legacy_vector(unsigned int irq, bool replace)
{}

void __init lapic_update_legacy_vectors(void)
{}

void __init lapic_assign_system_vectors(void)
{}

int __init arch_early_irq_init(void)
{}

#ifdef CONFIG_SMP

static struct irq_desc *__setup_vector_irq(int vector)
{}

/* Online the local APIC infrastructure and initialize the vectors */
void lapic_online(void)
{}

static void __vector_cleanup(struct vector_cleanup *cl, bool check_irr);

void lapic_offline(void)
{}

static int apic_set_affinity(struct irq_data *irqd,
			     const struct cpumask *dest, bool force)
{}

#else
#define apic_set_affinity
#endif

static int apic_retrigger_irq(struct irq_data *irqd)
{}

void apic_ack_irq(struct irq_data *irqd)
{}

void apic_ack_edge(struct irq_data *irqd)
{}

static void x86_vector_msi_compose_msg(struct irq_data *data,
				       struct msi_msg *msg)
{}

static struct irq_chip lapic_controller =;

#ifdef CONFIG_SMP

static void free_moved_vector(struct apic_chip_data *apicd)
{}

static void __vector_cleanup(struct vector_cleanup *cl, bool check_irr)
{}

static void vector_cleanup_callback(struct timer_list *tmr)
{}

static void __vector_schedule_cleanup(struct apic_chip_data *apicd)
{}

void vector_schedule_cleanup(struct irq_cfg *cfg)
{}

void irq_complete_move(struct irq_cfg *cfg)
{}

/*
 * Called from fixup_irqs() with @desc->lock held and interrupts disabled.
 */
void irq_force_complete_move(struct irq_desc *desc)
{}

#ifdef CONFIG_HOTPLUG_CPU
/*
 * Note, this is not accurate accounting, but at least good enough to
 * prevent that the actual interrupt move will run out of vectors.
 */
int lapic_can_unplug_cpu(void)
{}
#endif /* HOTPLUG_CPU */
#endif /* SMP */

static void __init print_APIC_field(int base)
{}

static void __init print_local_APIC(void *dummy)
{}

static void __init print_local_APICs(int maxcpu)
{}

static void __init print_PIC(void)
{}

static int show_lapic __initdata =;
static __init int setup_show_lapic(char *arg)
{}
__setup();

static int __init print_ICs(void)
{}

late_initcall(print_ICs);