Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/powerpc/sysdev/mpic.c
static int mpic_host_match(struct irq_domain *h, struct device_node *node, enum irq_domain_bus_token bus_token) { struct device_node *of_node = irq_domain_get_of_node(h); return of_node == NULL || of_node == node; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic.c
static u32 fsl_mpic_get_version(struct mpic *mpic) { u32 brr1; if (!(mpic->flags & MPIC_FSL)) return 0; brr1 = _mpic_read(mpic->reg_type, &mpic->thiscpuregs, MPIC_FSL_BRR1); return brr1 & MPIC_FSL_BRR1_VER; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic.c
void mpic_cpu_set_priority(int prio) { struct mpic *mpic = mpic_primary; prio &= MPIC_CPU_TASKPRI_MASK; mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), prio); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic.c
unsigned int mpic_get_coreint_irq(void) { #ifdef CONFIG_BOOKE struct mpic *mpic = mpic_primary; u32 src; BUG_ON(mpic == NULL); src = mfspr(SPRN_EPR); if (unlikely(src == mpic->spurious_vec)) { if (mpic->flags & MPIC_SPV_EOI) mpic_eoi(mpic); return 0; } if (unlikely(mpic->protected && tes...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic.c
void __init mpic_request_ipis(void) { struct mpic *mpic = mpic_primary; int i; BUG_ON(mpic == NULL); printk(KERN_INFO "mpic: requesting IPIs...\n"); for (i = 0; i < 4; i++) { unsigned int vipi = irq_create_mapping(mpic->irqhost, mpic->ipi_vecs[0] + i); if (!vipi) { printk(KERN_ERR "Fai...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic.c
void smp_mpic_message_pass(int cpu, int msg) { struct mpic *mpic = mpic_primary; u32 physmask; BUG_ON(mpic == NULL); if ((unsigned int)msg > 3) { printk("SMP %d: smp_message_pass: unknown msg %d\n", smp_processor_id(), msg); return; } #ifdef DEBUG_IPI DBG("%s: send_ipi(ipi_no: %d)\n", ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic.c
static void mpic_resume(void) { struct mpic *mpic = mpics; while (mpic) { mpic_resume_one(mpic); mpic = mpic->next; } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_msgr.c
struct mpic_msgr *mpic_msgr_get(unsigned int reg_num) { unsigned long flags; struct mpic_msgr *msgr; msgr = ERR_PTR(-EBUSY); if (reg_num >= mpic_msgr_count) return ERR_PTR(-ENODEV); raw_spin_lock_irqsave(&msgrs_lock, flags); msgr = mpic_msgrs[reg_num]; if (msgr->in_use == MSGR_FREE) msgr->in_us...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_msgr.c
void mpic_msgr_put(struct mpic_msgr *msgr) { unsigned long flags; raw_spin_lock_irqsave(&msgr->lock, flags); msgr->in_use = MSGR_FREE; _mpic_msgr_disable(msgr); raw_spin_unlock_irqrestore(&msgr->lock, flags); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_msgr.c
void mpic_msgr_disable(struct mpic_msgr *msgr) { unsigned long flags; raw_spin_lock_irqsave(&msgr->lock, flags); _mpic_msgr_disable(msgr); raw_spin_unlock_irqrestore(&msgr->lock, flags); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_msgr.c
static __init int mpic_msgr_init(void) { return platform_driver_register(&mpic_msgr_driver); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_timer.c
void mpic_get_remain_time(struct mpic_timer *handle, time64_t *time) { struct timer_group_priv *priv = container_of(handle, struct timer_group_priv, timer[handle->num]); struct cascade_priv *casc_priv; u64 ticks; u32 tmp_ticks; casc_priv = priv->timer[handle->num].cascade_handle; if (casc_priv) { ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_timer.c
static void mpic_timer_resume(void) { struct timer_group_priv *priv; list_for_each_entry(priv, &timer_group_list, node) { if (priv->flags & FSL_GLOBAL_TIMER) setbits32(priv->group_tcr, MPIC_TIMER_TCR_CLKDIV); } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_timer.c
static int __init mpic_timer_init(void) { struct device_node *np = NULL; for_each_matching_node(np, mpic_timer_ids) timer_group_init(np); register_syscore_ops(&mpic_timer_syscore_ops); if (list_empty(&timer_group_list)) return -ENODEV; return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_u3msi.c
static void mpic_u3msi_unmask_irq(struct irq_data *data) { mpic_unmask_irq(data); pci_msi_unmask_irq(data); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/mpic_u3msi.c
static u64 find_u4_magic_addr(struct pci_dev *pdev, unsigned int hwirq) { struct pci_controller *hose = pci_bus_to_host(pdev->bus); if (of_device_is_compatible(hose->dn, "u4-pcie") || of_device_is_compatible(hose->dn, "U4-pcie")) return 0xf8004000 | (hwirq << 4); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/msi_bitmap.c
int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num) { unsigned long flags; int offset, order = get_count_order(num); spin_lock_irqsave(&bmp->lock, flags); offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, num, (1 << order) - 1); if (offset > ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/msi_bitmap.c
void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset, unsigned int num) { unsigned long flags; pr_debug("msi_bitmap: freeing 0x%x at offset 0x%x\n", num, offset); spin_lock_irqsave(&bmp->lock, flags); bitmap_clear(bmp->bitmap, offset, num); spin_unlock_irqrest...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/msi_bitmap.c
void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq) { unsigned long flags; pr_debug("msi_bitmap: reserving hwirq 0x%x\n", hwirq); spin_lock_irqsave(&bmp->lock, flags); bitmap_allocate_region(bmp->bitmap, hwirq, 0); spin_unlock_irqrestore(&bmp->lock, flags); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/pmi.c
static int pmi_of_probe(struct platform_device *dev) { struct device_node *np = dev->dev.of_node; int rc; if (data) { printk(KERN_ERR "pmi: driver has already been initialized.\n"); rc = -EBUSY; goto out; } data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL); if (!data) { printk(KERN_ERR ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/pmi.c
int pmi_send_message(pmi_message_t msg) { unsigned long flags; DECLARE_COMPLETION_ONSTACK(completion); if (!data) return -ENODEV; mutex_lock(&data->msg_mutex); data->msg = msg; pr_debug("pmi_send_message: msg is %08x\n", *(u32 *)&msg); data->completion = &completion; spin_lock_irqsave(&data->p...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/pmi.c
int pmi_register_handler(struct pmi_handler *handler) { if (!data) return -ENODEV; spin_lock(&data->handler_spinlock); list_add_tail(&handler->node, &data->handler); spin_unlock(&data->handler_spinlock); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/rtc_cmos_setup.c
static int __init add_rtc(void) { struct device_node *np; struct platform_device *pd; struct resource res[2]; unsigned int num_res = 1; int ret; memset(&res, 0, sizeof(res)); np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00"); if (!np) return -ENODEV; ret = of_address_to_resource(np, 0, &re...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/tsi108_pci.c
static void tsi108_pci_irq_mask(struct irq_data *d) { tsi108_pci_int_mask(d->irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/tsi108_pci.c
void tsi108_irq_cascade(struct irq_desc *desc) { struct irq_chip *chip = irq_desc_get_chip(desc); unsigned int cascade_irq = get_pci_source(); if (cascade_irq) generic_handle_irq(cascade_irq); chip->irq_eoi(&desc->irq_data); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/udbg_memcons.c
int memcons_getc_poll(void) { char c; char *new_input_pos; if (*memcons.input_pos) { c = *memcons.input_pos; new_input_pos = memcons.input_pos + 1; if (new_input_pos >= memcons.input_end) new_input_pos = memcons.input_start; else if (*new_input_pos == '\0') new_input_pos = memcons.i...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/udbg_memcons.c
int memcons_getc(void) { int c; while (1) { c = memcons_getc_poll(); if (c == -1) cpu_relax(); else break; } return c; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/udbg_memcons.c
void __init udbg_init_memcons(void) { udbg_putc = memcons_putc; udbg_getc = memcons_getc; udbg_getc_poll = memcons_getc_poll; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-hv.c
static inline void icp_hv_set_xirr(unsigned int value) { long rc = plpar_hcall_norets(H_EOI, value); if (rc != H_SUCCESS) { pr_err("%s: bad return code eoi xirr=0x%x returned %ld\n", __func__, value, rc); WARN_ON_ONCE(1); icp_hv_set_cppr(value >> 24); } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-hv.c
static unsigned int icp_hv_get_irq(void) { unsigned int xirr = icp_hv_get_xirr(xics_cppr_top()); unsigned int vec = xirr & 0x00ffffff; unsigned int irq; if (vec == XICS_IRQ_SPURIOUS) return 0; irq = irq_find_mapping(xics_host, vec); if (likely(irq)) { xics_push_cppr(vec); return irq; } xi...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-hv.c
static void icp_hv_set_cpu_priority(unsigned char cppr) { xics_set_base_cppr(cppr); icp_hv_set_cppr(cppr); iosync(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-native.c
static inline void icp_native_set_xirr(unsigned int value) { int cpu = smp_processor_id(); out_be32(&icp_native_regs[cpu]->xirr.word, value); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-native.c
static unsigned int icp_native_get_irq(void) { unsigned int xirr = icp_native_get_xirr(); unsigned int vec = xirr & 0x00ffffff; unsigned int irq; if (vec == XICS_IRQ_SPURIOUS) return 0; irq = irq_find_mapping(xics_host, vec); if (likely(irq)) { xics_push_cppr(vec); return irq; } xics_mask...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-native.c
void icp_native_flush_interrupt(void) { unsigned int xirr = icp_native_get_xirr(); unsigned int vec = xirr & 0x00ffffff; if (vec == XICS_IRQ_SPURIOUS) return; if (vec == XICS_IPI) { int cpu = smp_processor_id(); kvmppc_clear_host_ipi(cpu); icp_native_set_qirr(cpu, 0xff); } else { pr_err(...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-native.c
void xics_wake_cpu(int cpu) { icp_native_set_qirr(cpu, IPI_PRIORITY); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-opal.c
static unsigned int icp_opal_get_irq(void) { unsigned int xirr; unsigned int vec; unsigned int irq; xirr = icp_opal_get_xirr(); vec = xirr & 0x00ffffff; if (vec == XICS_IRQ_SPURIOUS) return 0; irq = irq_find_mapping(xics_host, vec); if (likely(irq)) { xics_push_cppr(vec); return irq; } ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/icp-opal.c
static void icp_opal_cause_ipi(int cpu) { int hw_cpu = get_hard_smp_processor_id(cpu); kvmppc_set_host_ipi(cpu); opal_int_set_mfrr(hw_cpu, IPI_PRIORITY); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/ics-native.c
static void __iomem *ics_native_xive(struct ics_native *in, unsigned int vec) { return in->base + 0x800 + ((vec - in->ibase) << 2); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/ics-native.c
static unsigned int ics_native_startup(struct irq_data *d) { #ifdef CONFIG_PCI_MSI if (irq_data_get_msi_desc(d)) pci_msi_unmask_irq(d); #endif /* unmask it */ ics_native_unmask_irq(d); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/ics-native.c
static void ics_native_do_mask(struct ics_native *in, unsigned int vec) { out_be32(ics_native_xive(in, vec), 0xff); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/ics-opal.c
static void ics_opal_mask_real_irq(unsigned int hw_irq) { int server = ics_opal_mangle_server(xics_default_server); int64_t rc; if (hw_irq == XICS_IPI) return; rc = opal_set_xive(hw_irq, server, 0xff); if (rc != OPAL_SUCCESS) pr_err("%s: opal_set_xive(0xff) irq=%u returned %lld\n", __func__, hw_irq,...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/ics-rtas.c
static void ics_rtas_mask_irq(struct irq_data *d) { unsigned int hw_irq = (unsigned int)irqd_to_hwirq(d); pr_devel("xics: mask virq %d [hw 0x%x]\n", d->irq, hw_irq); if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) return; ics_rtas_mask_real_irq(hw_irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
void xics_set_cpu_giq(unsigned int gserver, unsigned int join) { #ifdef CONFIG_PPC_RTAS int index; int status; if (!rtas_indicator_present(GLOBAL_INTERRUPT_QUEUE, NULL)) return; index = (1UL << xics_interrupt_server_size) - 1 - gserver; status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE, index, jo...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
void xics_mask_unknown_vec(unsigned int vec) { pr_err("Interrupt 0x%x (real) is invalid, disabling it.\n", vec); if (WARN_ON(!xics_ics)) return; xics_ics->mask_unknown(xics_ics, vec); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
noinstr void xics_kexec_teardown_cpu(int secondary) { xics_teardown_cpu(); icp_ops->flush_ipi(); if (secondary) xics_set_cpu_giq(xics_default_distrib_server, 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
static void xics_ipi_mask(struct irq_data *d) {}
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
static int xics_host_map(struct irq_domain *domain, unsigned int virq, irq_hw_number_t hwirq) { pr_devel("xics: map virq %d, hwirq 0x%lx\n", virq, hwirq); irq_clear_status_flags(virq, IRQ_LEVEL); /* Don't call into ICS for IPIs */ if (hwirq == XICS_IPI) { irq_set_chip_and_handler(...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
int xics_set_irq_type(struct irq_data *d, unsigned int flow_type) { if (flow_type == IRQ_TYPE_DEFAULT || flow_type == IRQ_TYPE_NONE) flow_type = IRQ_TYPE_EDGE_RISING; if (flow_type != IRQ_TYPE_EDGE_RISING && flow_type != IRQ_TYPE_LEVEL_LOW) return -EINVAL; irqd_set_trigger_type(d, flow_type); return...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xics/xics-common.c
int xics_retrigger(struct irq_data *data) { xics_push_cppr(0); /* Tell the core to do a soft retrigger */ return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
void xmon_xive_get_irq_all(void) { unsigned int i; struct irq_desc *desc; for_each_irq_desc(i, desc) { struct irq_data *d = irq_domain_get_irq_data(xive_irq_domain, i); if (d) xmon_xive_get_irq_config(irqd_to_hwirq(d), d); } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static void xive_dec_target_count(int cpu) { struct xive_cpu *xc = per_cpu(xive_cpu, cpu); struct xive_q *q = &xc->queue[xive_irq_priority]; if (WARN_ON(cpu < 0 || !xc)) { pr_err("%s: cpu=%d xc=%p\n", __func__, cpu, xc); return; } atomic_inc(&q->pending_count); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_find_target_in_mask(const struct cpumask *mask, unsigned int fuzz) { int cpu, first, num, i; num = min_t(int, cpumask_weight(mask), nr_cpu_ids); first = fuzz % num; /* Locate it */ cpu = cpumask_first(mask); for (i = 0; i < first && cpu < nr_cpu_ids; i++...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static void xive_irq_mask(struct irq_data *d) { struct xive_irq_data *xd = irq_data_get_irq_handler_data(d); pr_debug("%s: irq %d data @%p\n", __func__, d->irq, xd); xive_do_source_set_mask(xd, true); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_irq_set_type(struct irq_data *d, unsigned int flow_type) { struct xive_irq_data *xd = irq_data_get_irq_handler_data(d); if (flow_type == IRQ_TYPE_DEFAULT || flow_type == IRQ_TYPE_NONE) flow_type = IRQ_TYPE_EDGE_RISING; if (flow_type != IRQ_TYPE_EDGE_RISING && flow_type != IRQ_TYPE_LEVEL_LOW)...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_irq_retrigger(struct irq_data *d) { struct xive_irq_data *xd = irq_data_get_irq_handler_data(d); if (WARN_ON(xd->flags & XIVE_IRQ_FLAG_LSI)) return 0; /* * To perform a retrigger, we first set the PQ bits to * 11, then perform an EOI. */ xive_esb_read(xd, XIVE_ESB_SET_PQ_11); xi...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static void xive_cause_ipi(int cpu) { struct xive_cpu *xc; struct xive_irq_data *xd; xc = per_cpu(xive_cpu, cpu); DBG_VERBOSE("IPI CPU %d -> %d (HW IRQ 0x%x)\n", smp_processor_id(), cpu, xc->hw_ipi); xd = &xc->ipi_data; if (WARN_ON(!xd->trig_mmio)) return; out_be64(xd->trig_mmio, 0);...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static void xive_ipi_eoi(struct irq_data *d) { struct xive_cpu *xc = __this_cpu_read(xive_cpu); if (!xc) return; DBG_VERBOSE("IPI eoi: irq=%d [0x%lx] (HW IRQ 0x%x) pending=%02x\n", d->irq, irqd_to_hwirq(d), xc->hw_ipi, xc->pending_prio); xive_do_source_eoi(&xc->ipi_data); xive_do_queue_eo...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int __init xive_init_ipis(void) { struct fwnode_handle *fwnode; struct irq_domain *ipi_domain; unsigned int node; int ret = -ENOMEM; fwnode = irq_domain_alloc_named_fwnode("XIVE-IPI"); if (!fwnode) goto out; ipi_domain = irq_domain_create_linear(fwnode, nr_node_ids, ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_setup_cpu_ipi(unsigned int cpu) { unsigned int xive_ipi_irq = xive_ipi_cpu_to_irq(cpu); struct xive_cpu *xc; int rc; pr_debug("Setting up IPI for CPU %d\n", cpu); xc = per_cpu(xive_cpu, cpu); if (xc->hw_ipi != XIVE_BAD_IRQ) return 0; /* Register the IPI */ xive_request_ipi(cpu); ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
noinstr static void xive_cleanup_cpu_ipi(unsigned int cpu, struct xive_cpu *xc) { unsigned int xive_ipi_irq = xive_ipi_cpu_to_irq(cpu); /* Already cleaned up ? */ if (xc->hw_ipi == XIVE_BAD_IRQ) return; /* TODO: clear IPI mapping */ /* Mask the IPI */ xive_do_...
[ 1, 1 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_irq_domain_xlate(struct irq_domain *h, struct device_node *ct, const u32 *intspec, unsigned int intsize, irq_hw_number_t *out_hwirq, unsigned int *out_flags) { *out_hwirq = intspec[0]; if (intsize > ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs, void *arg) { struct irq_fwspec *fwspec = arg; irq_hw_number_t hwirq; unsigned int type = IRQ_TYPE_NONE; int i, rc; rc = xive_irq_domain_translate(domain, fwspec, &hwirq, &type...
[ 1, 1 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static void xive_cleanup_cpu_queues(unsigned int cpu, struct xive_cpu *xc) { if (xc->queue[xive_irq_priority].qpage) xive_ops->cleanup_queue(cpu, xc, xive_irq_priority); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
int xive_smp_prepare_cpu(unsigned int cpu) { int rc; rc = xive_prepare_cpu(cpu); if (rc) return rc; /* Allocate and setup IPI for the new CPU */ return xive_setup_cpu_ipi(cpu); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int __init xive_store_eoi_cmdline(char *arg) { if (!arg) return 1; if (strncmp(arg, "off", 3) == 0) { pr_info("StoreEOI disabled on kernel command line\n"); xive_store_eoi = false; } return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static void xive_debug_show_irq(struct seq_file *m, struct irq_data *d) { unsigned int hw_irq = (unsigned int)irqd_to_hwirq(d); int rc; u32 target; u8 prio; u32 lirq; char buffer[128]; rc = xive_ops->get_irq_config(hw_irq, &target, &prio, &lirq); if (rc) { seq_printf(m, "IRQ 0x%08x : no config rc=...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
static int xive_eq_debug_show(struct seq_file *m, void *private) { int cpu = (long)m->private; struct xive_cpu *xc = per_cpu(xive_cpu, cpu); if (xc) xive_eq_debug_show_one(m, &xc->queue[xive_irq_priority], xive_irq_priority); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/common.c
int xive_core_debug_init(void) { if (xive_enabled() && IS_ENABLED(CONFIG_DEBUG_FS)) xive_core_debugfs_create(); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
int xive_native_configure_irq(u32 hw_irq, u32 target, u8 prio, u32 sw_irq) { s64 rc; for (;;) { rc = opal_xive_set_irq_config(hw_irq, target, prio, sw_irq); if (rc != OPAL_BUSY) break; msleep(OPAL_BUSY_DELAY_MS); } return rc == 0 ? 0 : -ENXIO; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static void __xive_native_disable_queue(u32 vp_id, struct xive_q *q, u8 prio) { s64 rc; for (;;) { rc = opal_xive_set_queue_info(vp_id, prio, 0, 0, 0); if (rc != OPAL_BUSY) break; msleep(OPAL_BUSY_DELAY_MS); } if (rc) vp_err(vp_id, "Failed to disable queue %d : %lld\n", prio, rc); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static int xive_native_setup_queue(unsigned int cpu, struct xive_cpu *xc, u8 prio) { struct xive_q *q = &xc->queue[prio]; __be32 *qpage; qpage = xive_queue_page_alloc(cpu, xive_queue_shift); if (IS_ERR(qpage)) return PTR_ERR(qpage); return xive_native_configure_queue(...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static void xive_native_cleanup_queue(unsigned int cpu, struct xive_cpu *xc, u8 prio) { struct xive_q *q = &xc->queue[prio]; unsigned int alloc_order; __xive_native_disable_queue(get_hard_smp_processor_id(cpu), q, prio); alloc_order = xive_alloc_order(xive_queue_shift); ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static bool xive_native_match(struct device_node *node) { return of_device_is_compatible(node, "ibm,opal-xive-vc"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static void xive_native_shutdown(void) { opal_xive_reset(OPAL_XIVE_MODE_EMU); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static void xive_native_prepare_cpu(unsigned int cpu, struct xive_cpu *xc) { xc->chip_id = cpu_to_chip_id(cpu); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
void xive_native_sync_source(u32 hw_irq) { opal_xive_sync(XIVE_SYNC_EAS, hw_irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
void xive_native_sync_queue(u32 hw_irq) { opal_xive_sync(XIVE_SYNC_QUEUE, hw_irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
static bool xive_native_provision_pages(void) { u32 i; void *p; for (i = 0; i < xive_provision_chip_count; i++) { u32 chip = xive_provision_chips[i]; /* * XXX TODO: Try to make the allocation local to the node where * the chip resides. */ p = kmem_cache_alloc(xive_provision_cache, GFP...
[ 0, 1 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
u32 xive_native_alloc_vp_block(u32 max_vcpus) { s64 rc; u32 order; order = fls(max_vcpus) - 1; if (max_vcpus > (1 << order)) order++; pr_debug("VP block alloc, for max VCPUs %d use order %d\n", max_vcpus, order); for (;;) { rc = opal_xive_alloc_vp_block(order); switch (rc) { case OPAL_BU...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
int xive_native_get_vp_info(u32 vp_id, u32 *out_cam_id, u32 *out_chip_id) { __be64 vp_cam_be; __be32 vp_chip_id_be; s64 rc; rc = opal_xive_get_vp_info(vp_id, NULL, &vp_cam_be, NULL, &vp_chip_id_be); if (rc) { vp_err(vp_id, "Failed to get VP info : %lld\n", rc); return -EIO; } *out_cam_id = be64_...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
bool xive_native_has_save_restore(void) { return xive_has_save_restore; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
int xive_native_get_queue_state(u32 vp_id, u32 prio, u32 *qtoggle, u32 *qindex) { __be32 opal_qtoggle; __be32 opal_qindex; s64 rc; rc = opal_xive_get_queue_state(vp_id, prio, &opal_qtoggle, &opal_qindex); if (rc) { vp_err(vp_id, "failed to get queue %d state : %lld\n", pr...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/native.c
int xive_native_set_queue_state(u32 vp_id, u32 prio, u32 qtoggle, u32 qindex) { s64 rc; rc = opal_xive_set_queue_state(vp_id, prio, qtoggle, qindex); if (rc) { vp_err(vp_id, "failed to set queue %d state : %lld\n", prio, rc); return -EIO; } return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static int __init xive_irq_bitmap_add(int base, int count) { struct xive_irq_bitmap *xibm; xibm = kzalloc(sizeof(*xibm), GFP_KERNEL); if (!xibm) return -ENOMEM; spin_lock_init(&xibm->lock); xibm->base = base; xibm->count = count; xibm->bitmap = bitmap_zalloc(xibm->count, GFP_KERNEL); if (!xibm->b...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static long plpar_int_reset(unsigned long flags) { long rc; do { rc = plpar_hcall_norets(H_INT_RESET, flags); } while (plpar_busy_delay(rc)); if (rc) pr_err("H_INT_RESET failed %ld\n", rc); return rc; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static long plpar_int_set_source_config(unsigned long flags, unsigned long lisn, unsigned long target, unsigned long prio, unsigned long sw_irq) { long rc; pr_debug("H_INT_SET_SOURCE_CONFIG flag...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static long plpar_int_get_source_config(unsigned long flags, unsigned long lisn, unsigned long *target, unsigned long *prio, unsigned long *sw_irq) { unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; lo...
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static int xive_spapr_configure_queue(u32 target, struct xive_q *q, u8 prio, __be32 *qpage, u32 order) { s64 rc = 0; unsigned long esn_page; unsigned long esn_size; u64 flags, qpage_phys; if (order) { if (WARN_ON(!qpage)) return -EINVAL; qpage_phys = __pa(q...
[ 0, 1 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static int xive_spapr_get_ipi(unsigned int cpu, struct xive_cpu *xc) { int irq = xive_irq_bitmap_alloc(); if (irq < 0) { pr_err("Failed to allocate IPI on CPU %d\n", cpu); return -ENXIO; } xc->hw_ipi = irq; return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static void xive_spapr_shutdown(void) { plpar_int_reset(0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/spapr.c
static bool __init xive_get_max_prio(u8 *max_prio) { struct device_node *rootdn; const __be32 *reg; u32 len; int prio, found; rootdn = of_find_node_by_path("/"); if (!rootdn) { pr_err("not root node found !\n"); return false; } reg = of_get_property(rootdn, "ibm,plat-res-int-priorities", &len)...
[ 1, 0 ]
Linux Kernel
arch/powerpc/sysdev/xive/xive-internal.h
static inline u32 xive_alloc_order(u32 queue_shift) { return (queue_shift > PAGE_SHIFT) ? (queue_shift - PAGE_SHIFT) : 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/nonstdio.c
static int xmon_write(const char *ptr, int nb) { int rv = 0; const char *p = ptr, *q; const char msg[] = "[Hit a key (a:all, q:truncate, any:next page)]"; if (nb <= 0) return rv; if (paginating && paginate_skipping) return nb; if (paginate_lpp) { while (paginating && (q = strchr(p, '\n'))) { ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/nonstdio.c
void xmon_puts(const char *str) { xmon_write(str, strlen(str)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-dis.c
static int skip_optional_operands(const unsigned char *opindex, unsigned long insn, ppc_cpu_t dialect) { const struct powerpc_operand *operand; for (; *opindex != 0; opindex++) { operand = &powerpc_operands[*opindex]; if ((operand->flags & PPC_OPERAND_NEXT) != 0 || ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_ary(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { if (value >= 8 && value < 24) return insn | (((value - 8) & 0xf) << 4); else { *errmsg = _("invalid reg...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_ry(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { int value = (insn >> 4) & 0xf; if (value >= 0 && value < 8) return value; else return value + 16; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_bba(unsigned long insn, long value ATTRIBUTE_UNUSED, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { return insn | (((insn >> 16) & 0x1f) << 11); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_bdp(unsigned long insn, long value, ppc_cpu_t dialect, const char **errmsg ATTRIBUTE_UNUSED) { if ((dialect & ISA_V2) == 0) { if ((value & 0x8000) == 0) insn |= 1 << 21; } else { if ((insn & (0x14 << 21)) == (0...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static inline int valid_bo_pre_v2(long value) { if ((value & 0x14) == 0) return 1; else if ((value & 0x14) == 0x4) return (value & 0x2) == 0; else if ((value & 0x14) == 0x10) return (value & 0x8) == 0; else return value == 0x14; }
[ 1, 0 ]