Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/x86/kernel/apic/apic_flat_64.c |
static int flat_probe(void) { return 1; } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_flat_64.c |
static int physflat_probe(void) {
if (apic == &apic_physflat || num_possible_cpus() > 8 || jailhouse_paravirt())
return 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_noop.c | static void noop_send_IPI_mask_allbutself(const struct cpumask *cpumask,
int vector) {} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_noop.c |
static int noop_phys_pkg_id(int cpuid_apic, int index_msb) { return 0; } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_noop.c |
static u32 noop_apic_read(u32 reg) {
WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_APIC) && !disable_apic);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_noop.c | static int noop_x86_32_early_logical_apicid(int cpu) { return BAD_APICID; }
#endif | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_numachip.c |
static unsigned int numachip1_get_apic_id(unsigned long x) {
unsigned long value;
unsigned int id = (x >> 24) & 0xff;
if (static_cpu_has(X86_FEATURE_NODEID_MSR)) {
rdmsrl(MSR_FAM10H_NODE_ID, value);
id |= (value << 2) & 0xff00;
}
return id;
} | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_numachip.c |
static unsigned int numachip2_get_apic_id(unsigned long x) {
u64 mcfg;
rdmsrl(MSR_FAM10H_MMIO_CONF_BASE, mcfg);
return ((mcfg >> (28 - 8)) & 0xfff00) | (x >> 24);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_numachip.c |
static int numachip_wakeup_secondary(int phys_apicid, unsigned long start_rip) {
numachip_apic_icr_write(phys_apicid, APIC_DM_INIT);
numachip_apic_icr_write(phys_apicid, APIC_DM_STARTUP | (start_rip >> 12));
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_numachip.c |
static void numachip_send_IPI_all(int vector) {
numachip_send_IPI_mask(cpu_online_mask, vector);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_numachip.c |
static int numachip2_acpi_madt_oem_check(char *oem_id, char *oem_table_id) {
if ((strncmp(oem_id, "NUMASC", 6) != 0) ||
(strncmp(oem_table_id, "NCONECT2", 8) != 0))
return 0;
numachip_system = 2;
return 1;
} | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/apic_numachip.c | static void numachip_apic_wait_icr_idle(void) {} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/bigsmp_32.c |
static int bigsmp_check_phys_apicid_present(int phys_apicid) { return 1; } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/hw_nmi.c |
void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self) {
nmi_trigger_cpumask_backtrace(mask, exclude_self, nmi_raise_cpu_backtrace);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/hw_nmi.c |
static int nmi_cpu_backtrace_handler(unsigned int cmd, struct pt_regs *regs) {
if (nmi_cpu_backtrace(regs))
return NMI_HANDLED;
return NMI_DONE;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
unsigned int mpc_ioapic_addr(int ioapic_idx) {
return ioapics[ioapic_idx].mp_config.apicaddr;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static inline struct mp_ioapic_gsi *mp_ioapic_gsi_routing(int ioapic_idx) {
return &ioapics[ioapic_idx].gsi_config;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static inline u32 mp_pin_to_gsi(int ioapic, int pin) {
return mp_ioapic_gsi_routing(ioapic)->gsi_base + pin;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static void free_ioapic_saved_registers(int idx) {
kfree(ioapics[idx].saved_registers);
ioapics[idx].saved_registers = NULL;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
int __init arch_early_ioapic_init(void) {
int i;
if (!nr_legacy_irqs())
io_apic_irqs = ~0UL;
for_each_ioapic(i) alloc_ioapic_saved_registers(i);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
unsigned int native_io_apic_read(unsigned int apic, unsigned int reg) {
struct io_apic __iomem *io_apic = io_apic_base(apic);
writel(reg, &io_apic->index);
return readl(&io_apic->data);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static struct IO_APIC_route_entry __ioapic_read_entry(int apic, int pin) {
struct IO_APIC_route_entry entry;
entry.w1 = io_apic_read(apic, 0x10 + 2 * pin);
entry.w2 = io_apic_read(apic, 0x11 + 2 * pin);
return entry;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static int __add_pin_to_irq_node(struct mp_chip_data *data, int node, int apic,
int pin) {
struct irq_pin_list *entry;
for_each_irq_pin(entry, data->irq_2_pin) if (entry->apic == apic &&
entry->pin == pin) return 0;
entry = kzalloc_... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static void add_pin_to_irq_node(struct mp_chip_data *data, int node, int apic,
int pin) {
if (__add_pin_to_irq_node(data, node, apic, pin))
panic("IO-APIC: failed to add irq-pin. Can not proceed\n");
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static void io_apic_modify_irq(struct mp_chip_data *data, bool masked,
void (*final)(struct irq_pin_list *entry)) {
struct irq_pin_list *entry;
data->entry.masked = masked;
for_each_irq_pin(entry, data->irq_2_pin) {
io_apic_write(entry->apic, 0x10 + 2 * entry->pin, data->entr... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static void __unmask_ioapic(struct mp_chip_data *data) {
io_apic_modify_irq(data, false, NULL);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static void __eoi_ioapic_pin(int apic, int pin, int vector) {
if (mpc_ioapic_ver(apic) >= 0x20) {
io_apic_eoi(apic, vector);
} else {
struct IO_APIC_route_entry entry, entry1;
entry = entry1 = __ioapic_read_entry(apic, pin);
entry1.masked = true;
entry1.is_level = false;
__ioapic_write_en... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) {
struct IO_APIC_route_entry entry;
entry = ioapic_read_entry(apic, pin);
if (entry.delivery_mode == APIC_DELIVERY_MODE_SMI)
return;
/*
* Make sure the entry is masked and re-read the contents to check
* if it is a level triggered pi... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | void mask_ioapic_entries(void) {
int apic, pin;
for_each_ioapic(apic) {
if (!ioapics[apic].saved_registers)
continue;
for_each_pin(apic, pin) {
struct IO_APIC_route_entry entry;
entry = ioapics[apic].saved_registers[pin];
if (!entry.masked) {
entry.masked = true;
i... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | int restore_ioapic_entries(void) {
int apic, pin;
for_each_ioapic(apic) {
if (!ioapics[apic].saved_registers)
continue;
for_each_pin(apic, pin)
ioapic_write_entry(apic, pin, ioapics[apic].saved_registers[pin]);
}
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static bool eisa_irq_is_level(int idx, int bus, bool level) {
switch (mp_bus_id_to_type[bus]) {
case MP_BUS_PCI:
case MP_BUS_ISA:
return level;
case MP_BUS_EISA:
return EISA_ELCR(mp_irqs[idx].srcbusirq);
}
pr_warn("IOAPIC: Invalid srcbus: %d defaulting to level\n", bus);
return true;
}
#else | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static bool irq_is_level(int idx) {
int bus = mp_irqs[idx].srcbus;
bool level;
switch (mp_irqs[idx].irqflag & MP_IRQTRIG_MASK) {
case MP_IRQTRIG_DEFAULT:
/*
* Conforms to spec, ie. bus-type dependent trigger
* mode. PCI defaults to level, ISA to edge.
*/
level = !test_bit(bus, mp_bus_not... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static int __acpi_get_override_irq(u32 gsi, bool *trigger, bool *polarity) {
int ioapic, pin, idx;
if (skip_ioapic_setup)
return -1;
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0)
return -1;
pin = mp_find_ioapic_pin(ioapic, gsi);
if (pin < 0)
return -1;
idx = find_irq_entry(ioapic, pin, mp... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static int alloc_isa_irq_from_domain(struct irq_domain *domain, int irq,
int ioapic, int pin,
struct irq_alloc_info *info) {
struct mp_chip_data *data;
struct irq_data *irq_data = irq_get_irq_data(irq);
int node = ioapic_alloc_attr_node(inf... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin,
unsigned int flags, struct irq_alloc_info *info) {
int irq;
bool legacy = false;
struct irq_alloc_info tmp;
struct mp_chip_data *data;
struct irq_domain *domain = mp_ioapic_irqdomain(ioapic);
if (!domain)
r... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
void ioapic_zap_locks(void) { raw_spin_lock_init(&ioapic_lock); } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static void __init delay_without_tsc(void) {
unsigned long end = jiffies + 4;
int band = 1;
do {
__delay(((1U << band++) * 10000000UL) / HZ);
} while (band < 12 && time_before_eq(jiffies, end));
} | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static inline void ioapic_finish_move(struct irq_data *data, bool moveit) {
if (unlikely(moveit)) {
if (!io_apic_level_ack_pending(data->chip_data))
irq_move_masked_irq(data);
/* If the IRQ is masked in the core, leave it: */
if (!irqd_irq_masked(data))
unmask_ioapic_irq(data);
}
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static inline void ioapic_finish_move(struct irq_data *data, bool moveit) {}
#endif | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static void ioapic_ir_ack_level(struct irq_data *irq_data) {
struct mp_chip_data *data = irq_data->chip_data;
apic_ack_irq(irq_data);
eoi_ioapic_pin(data->entry.vector, data);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static void ioapic_configure_entry(struct irq_data *irqd) {
struct mp_chip_data *mpd = irqd->chip_data;
struct irq_pin_list *entry;
ioapic_setup_msg_from_msi(irqd, &mpd->entry);
for_each_irq_pin(entry, mpd->irq_2_pin)
__ioapic_write_entry(entry->apic, entry->pin, mpd->entry);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static int mp_alloc_timer_irq(int ioapic, int pin) {
int irq = -1;
struct irq_domain *domain = mp_ioapic_irqdomain(ioapic);
if (domain) {
struct irq_alloc_info info;
ioapic_set_alloc_attr(&info, NUMA_NO_NODE, 0, 0);
info.devid = mpc_ioapic_id(ioapic);
info.ioapic.pin = pin;
mutex_lock(&ioap... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
static void resume_ioapic_id(int ioapic_idx) {
unsigned long flags;
union IO_APIC_reg_00 reg_00;
raw_spin_lock_irqsave(&ioapic_lock, flags);
reg_00.raw = io_apic_read(ioapic_idx, 0);
if (reg_00.bits.ID != mpc_ioapic_id(ioapic_idx)) {
reg_00.bits.ID = mpc_ioapic_id(ioapic_idx);
io_apic_write(ioapic_i... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
void __init io_apic_init_mappings(void) {
unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
struct resource *ioapic_res;
int i;
ioapic_res = ioapic_setup_resources();
for_each_ioapic(i) {
if (smp_found_config) {
ioapic_phys = mpc_ioapic_addr(i);
#ifdef CONFIG_X86_32
if (!ioapic_phys) {
... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
void __init ioapic_insert_resources(void) {
int i;
struct resource *r = ioapic_resources;
if (!r) {
if (nr_ioapics > 0)
printk(KERN_ERR "IO APIC resources couldn't be allocated.\n");
return;
}
for_each_ioapic(i) {
insert_resource(&iomem_resource, r);
r++;
}
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | int mp_find_ioapic(u32 gsi) {
int i;
if (nr_ioapics == 0)
return -1;
for_each_ioapic(i) {
struct mp_ioapic_gsi *gsi_cfg = mp_ioapic_gsi_routing(i);
if (gsi >= gsi_cfg->gsi_base && gsi <= gsi_cfg->gsi_end)
return i;
}
printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi);
r... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c | static void mp_irqdomain_get_attr(u32 gsi, struct mp_chip_data *data,
struct irq_alloc_info *info) {
if (info && info->ioapic.valid) {
data->is_level = info->ioapic.is_level;
data->active_low = info->ioapic.active_low;
} else if (__acpi_get_override_irq(gsi, &data->is_level... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
void mp_irqdomain_free(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs) {
struct irq_data *irq_data;
struct mp_chip_data *data;
BUG_ON(nr_irqs != 1);
irq_data = irq_domain_get_irq_data(domain, virq);
if (irq_data && irq_data->chip_data) {
data = irq_data->chip_d... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/io_apic.c |
int mp_irqdomain_ioapic_idx(struct irq_domain *domain) {
return (int)(long)domain->host_data;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c |
static __init int apic_ipi_shorthand(char *str) {
get_option(&str, &apic_ipi_shorthand_off);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void apic_smt_update(void) {
if (apic_ipi_shorthand_off || num_online_cpus() == 1 ||
!cpumask_equal(cpu_present_mask, &cpus_booted_once_mask)) {
static_branch_disable(&apic_use_ipi_shorthand);
} else {
static_branch_enable(&apic_use_ipi_shorthand);
}
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c |
static inline int __prepare_ICR2(unsigned int mask) {
return SET_XAPIC_DEST_FIELD(mask);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c |
static inline void __xapic_wait_icr_idle(void) {
while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
cpu_relax();
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void __default_send_IPI_shortcut(unsigned int shortcut, int vector) {
unsigned int cfg;
/*
* Wait for idle.
*/
if (unlikely(vector == NMI_VECTOR))
safe_apic_wait_icr_idle();
else
__xapic_wait_icr_idle();
/*
* No need to touch the target chip field. Also the destination
* mode is ignored... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void default_send_IPI_mask_sequence_phys(const struct cpumask *mask,
int vector) {
unsigned long query_cpu;
unsigned long flags;
/*
* Hack. The clustered APIC addressing mode doesn't allow us to send
* to an arbitrary mask, so I do a unicast to each CPU instead.
... | [
0,
1
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask,
int vector) {
unsigned int this_cpu = smp_processor_id();
unsigned int query_cpu;
unsigned long flags;
/* See Hack comment above */
local_irq_save(flags);
for_each_cpu(query_cpu, mask) {
i... | [
1,
1
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void default_send_IPI_single(int cpu, int vector) {
apic->send_IPI_mask(cpumask_of(cpu), vector);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void default_send_IPI_mask_allbutself_logical(const struct cpumask *mask,
int vector) {
unsigned long flags;
unsigned int query_cpu;
unsigned int this_cpu = smp_processor_id();
/* See Hack comment above */
local_irq_save(flags);
for_each_cpu(query_cpu, mask) {... | [
1,
1
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector) {
unsigned long mask = cpumask_bits(cpumask)[0];
unsigned long flags;
if (!mask)
return;
local_irq_save(flags);
WARN_ON(mask & ~cpumask_bits(cpu_online_mask)[0]);
__default_send_IPI_dest_field(mask, vector, APIC_DEST_LOGICAL... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/ipi.c | static int convert_apicid_to_cpu(int apic_id) {
int i;
for_each_possible_cpu(i) {
if (per_cpu(x86_cpu_to_apicid, i) == apic_id)
return i;
}
return -1;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/msi.c |
int dmar_alloc_hwirq(int id, int node, void *arg) {
struct irq_domain *domain = dmar_get_irq_domain();
struct irq_alloc_info info;
if (!domain)
return -1;
init_irq_alloc_info(&info, NULL);
info.type = X86_IRQ_ALLOC_TYPE_DMAR;
info.devid = id;
info.hwirq = id;
info.data = arg;
return irq_domain... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/msi.c |
void dmar_free_hwirq(int irq) { irq_domain_free_irqs(irq, 1); }
#endif | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/probe_32.c |
static void setup_apic_flat_routing(void) {
#ifdef CONFIG_X86_IO_APIC
printk(KERN_INFO "Enabling APIC mode: Flat. Using %d I/O APICs\n",
nr_ioapics);
#endif
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/probe_32.c | static void default_init_apic_ldr(void) {
unsigned long val;
apic_write(APIC_DFR, APIC_DFR_VALUE);
val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
apic_write(APIC_LDR, val);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/probe_32.c |
static int default_phys_pkg_id(int cpuid_apic, int index_msb) {
return cpuid_apic >> index_msb;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/probe_32.c | void __init generic_apic_probe(void) {
if (!cmdline_apic) {
struct apic **drv;
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
if ((*drv)->probe()) {
apic = *drv;
break;
}
}
if (drv == __apicdrivers_end)
panic("Didn't find an APIC driver");
}
printk(... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/probe_32.c | int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id) {
struct apic **drv;
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
if (!(*drv)->acpi_madt_oem_check)
continue;
if (!(*drv)->acpi_madt_oem_check(oem_id, oem_table_id))
continue;
if (!cmdline_apic) {
... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/probe_64.c |
int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id) {
struct apic **drv;
for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
if ((*drv)->acpi_madt_oem_check(oem_id, oem_table_id)) {
if (apic != *drv) {
apic = *drv;
pr_info("Setting APIC routing to %s.\n", api... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | void lock_vector_lock(void) { raw_spin_lock(&vector_lock); } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
void unlock_vector_lock(void) { raw_spin_unlock(&vector_lock); } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static struct apic_chip_data *apic_chip_data(struct irq_data *irqd) {
if (!irqd)
return NULL;
while (irqd->parent_data)
irqd = irqd->parent_data;
return irqd->chip_data;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static void free_apic_chip_data(struct apic_chip_data *apicd) { kfree(apicd); } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static void vector_assign_managed_shutdown(struct irq_data *irqd) {
unsigned int cpu = cpumask_first(cpu_online_mask);
apic_update_irq_cfg(irqd, MANAGED_IRQ_SHUTDOWN_VECTOR, cpu);
} | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static int reserve_irq_vector(struct irq_data *irqd) {
unsigned long flags;
raw_spin_lock_irqsave(&vector_lock, flags);
reserve_irq_vector_locked(irqd);
raw_spin_unlock_irqrestore(&vector_lock, flags);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | static int assign_vector_locked(struct irq_data *irqd,
const struct cpumask *dest) {
struct apic_chip_data *apicd = apic_chip_data(irqd);
bool resvd = apicd->has_reserved;
unsigned int cpu = apicd->cpu;
int vector = apicd->vector;
lockdep_assert_held(&vector_lock);
if (vect... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | static int assign_irq_vector_any_locked(struct irq_data *irqd) {
const struct cpumask *affmsk = irq_data_get_affinity_mask(irqd);
int node = irq_data_get_node(irqd);
if (node != NUMA_NO_NODE) {
/* Try the intersection of @affmsk and node mask */
cpumask_and(vector_searchmask, cpumask_of_node(node), affm... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | static int assign_managed_vector(struct irq_data *irqd,
const struct cpumask *dest) {
const struct cpumask *affmsk = irq_data_get_affinity_mask(irqd);
struct apic_chip_data *apicd = apic_chip_data(irqd);
int vector, cpu;
cpumask_and(vector_searchmask, dest, affmsk);
if (apic... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | static void x86_vector_deactivate(struct irq_domain *dom,
struct irq_data *irqd) {
struct apic_chip_data *apicd = apic_chip_data(irqd);
unsigned long flags;
trace_vector_deactivate(irqd->irq, apicd->is_managed, apicd->can_reserve,
false);
if (!apicd-... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | int __init arch_probe_nr_irqs(void) {
int nr;
if (nr_irqs > (NR_VECTORS * nr_cpu_ids))
nr_irqs = NR_VECTORS * nr_cpu_ids;
nr = (gsi_top + nr_legacy_irqs()) + 8 * nr_cpu_ids;
#if defined(CONFIG_PCI_MSI)
if (gsi_top <= NR_IRQS_LEGACY)
nr += 8 * nr_cpu_ids;
else
nr += gsi_top * 16;
#endif
if (nr... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | static struct irq_desc *__setup_vector_irq(int vector) {
int isairq = vector - ISA_IRQ_VECTOR(0);
if (isairq < 0 || isairq >= nr_legacy_irqs())
return VECTOR_UNUSED;
/* Check whether the irq is handled by the IOAPIC */
if (test_bit(isairq, &io_apic_irqs))
return VECTOR_UNUSED;
return irq_to_desc(isai... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static int apic_retrigger_irq(struct irq_data *irqd) {
struct apic_chip_data *apicd = apic_chip_data(irqd);
unsigned long flags;
raw_spin_lock_irqsave(&vector_lock, flags);
apic->send_IPI(apicd->cpu, apicd->vector);
raw_spin_unlock_irqrestore(&vector_lock, flags);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c | int lapic_can_unplug_cpu(void) {
unsigned int rsvd, avl, tomove, cpu = smp_processor_id();
int ret = 0;
raw_spin_lock(&vector_lock);
tomove = irq_matrix_allocated(vector_matrix);
avl = irq_matrix_available(vector_matrix, true);
if (avl < tomove) {
pr_warn("CPU %u has %u vectors, %u available. Cannot di... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static void __init print_APIC_field(int base) {
int i;
printk(KERN_DEBUG);
for (i = 0; i < 8; i++)
pr_cont("%08x", apic_read(base + i * 0x10));
pr_cont("\n");
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/vector.c |
static void __init print_PIC(void) {
unsigned int v;
unsigned long flags;
if (!nr_legacy_irqs())
return;
pr_debug("\nprinting PIC contents\n");
raw_spin_lock_irqsave(&i8259A_lock, flags);
v = inb(0xa1) << 8 | inb(0x21);
pr_debug("... PIC IMR: %04x\n", v);
v = inb(0xa0) << 8 | inb(0x20);
pr_... | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_cluster.c |
static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask,
int vector) {
__x2apic_send_IPI_mask(mask, vector, APIC_DEST_ALLBUT);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c | static void x2apic_send_IPI(int cpu, int vector) {
u32 dest = per_cpu(x86_cpu_to_apicid, cpu);
weak_wrmsr_fence();
__x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c |
static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) {
__x2apic_send_IPI_mask(mask, vector, APIC_DEST_ALLINC);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c |
static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask,
int vector) {
__x2apic_send_IPI_mask(mask, vector, APIC_DEST_ALLBUT);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c |
static void x2apic_send_IPI_all(int vector) {
__x2apic_send_IPI_shorthand(vector, APIC_DEST_ALLINC);
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c | int x2apic_apic_id_valid(u32 apicid) {
if (x2apic_max_apicid && apicid > x2apic_max_apicid)
return 0;
return 1;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c |
void __x2apic_send_IPI_dest(unsigned int apicid, int vector,
unsigned int dest) {
unsigned long cfg = __prepare_ICR(0, vector, dest);
native_x2apic_icr_write(cfg, apicid);
} | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c |
unsigned int x2apic_get_apic_id(unsigned long id) { return id; } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_phys.c |
int x2apic_phys_pkg_id(int initial_apicid, int index_msb) {
return initial_apicid >> index_msb;
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c |
enum uv_system_type get_uv_system_type(void) { return uv_system_type; } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c |
static int is_uv_hubless(int uvtype) { return (uv_hubless_system & uvtype); } | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c | static __init void set_block_size(void) {
unsigned int order = ffs(mem_block_size);
if (order) {
set_memory_block_size_order(order - 1);
pr_info("UV: mem_block_size set to 0x%lx\n", mem_block_size);
} else {
/* bad or zero value, default to 1UL << 31 (2GB) */
pr_err("UV: mem_block_size error wit... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c |
static void uv_init_apic_ldr(void) {} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c |
static unsigned int uv_read_apic_id(void) {
return x2apic_get_apic_id(apic_read(APIC_ID));
} | [
0,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c |
static __init void get_lowmem_redirect(unsigned long *base,
unsigned long *size) {
union uvh_rh_gam_alias_2_overlay_config_u alias;
union uvh_rh_gam_alias_2_redirect_config_u redirect;
unsigned long m_redirect;
unsigned long m_overlay;
int i;
for (i = 0; i < UVH_RH_G... | [
1,
0
] |
Linux Kernel | arch/x86/kernel/apic/x2apic_uv_x.c |
static __init void map_gru_high(int max_pnode) {
union uvh_rh_gam_gru_overlay_config_u gru;
unsigned long mask, base;
int shift;
if (UVH_RH_GAM_GRU_OVERLAY_CONFIG) {
gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG);
shift = UVH_RH_GAM_GRU_OVERLAY_CONFIG_BASE_SHFT;
mask = UVH_RH_GAM_GRU_OVE... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.