Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/powerpc/platforms/pseries/smp.c | int smp_query_cpu_stopped(unsigned int pcpu) {
int cpu_status, status;
int qcss_tok = rtas_token("query-cpu-stopped-state");
if (qcss_tok == RTAS_UNKNOWN_SERVICE) {
printk_once(KERN_INFO "Firmware doesn't support query-cpu-stopped-state\n");
return QCSS_HARDWARE_ERROR;
}
status = rtas_call(qcss_tok,... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/suspend.c | static int pseries_suspend_begin(u64 stream_id) {
long vasi_state, rc;
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
rc = plpar_hcall(H_VASI_STATE, retbuf, stream_id);
vasi_state = retbuf[0];
if (rc) {
pr_err("pseries_suspend_begin: vasi_state returned %ld\n", rc);
return rc;
} else if (vasi_state =... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/suspend.c | static int pseries_suspend_enter(suspend_state_t state) {
return rtas_ibm_suspend_me(NULL);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/suspend.c | static int __init pseries_suspend_init(void) {
int rc;
if (!firmware_has_feature(FW_FEATURE_LPAR))
return 0;
if ((rc = pseries_suspend_sysfs_register(&suspend_dev)))
return rc;
suspend_set_ops(&pseries_suspend_ops);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/svm.c | int set_memory_decrypted(unsigned long addr, int numpages) {
if (!cc_platform_has(CC_ATTR_MEM_ENCRYPT))
return 0;
if (!PAGE_ALIGNED(addr))
return -EINVAL;
uv_share_page(PHYS_PFN(__pa(addr)), numpages);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c | static ssize_t update_total_credits_store(struct vas_cop_feat_caps *caps,
const char *buf, size_t count) {
int err;
u16 creds;
err = kstrtou16(buf, 0, &creds);
if (!err)
err = vas_reconfig_capabilties(caps->win_type, creds);
if (err)
return -EINVAL;
pr_i... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c |
static ssize_t vas_type_store(struct kobject *kobj, struct attribute *attr,
const char *buf, size_t count) {
struct vas_caps_entry *centry;
struct vas_cop_feat_caps *caps;
struct vas_sysfs_entry *entry;
centry = to_caps_entry(kobj);
caps = centry->caps;
entry = container_of(a... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c |
static void vas_type_release(struct kobject *kobj) {
struct vas_caps_entry *centry = to_caps_entry(kobj);
kfree(centry);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c |
static char *vas_caps_kobj_name(struct vas_caps_entry *centry,
struct kobject **kobj) {
struct vas_cop_feat_caps *caps = centry->caps;
if (caps->descriptor == VAS_GZIP_QOS_CAPABILITIES) {
kobject_init(¢ry->kobj, &vas_qos_attr_type);
*kobj = gzip_caps_kobj;
return "q... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c | int sysfs_add_vas_caps(struct vas_cop_feat_caps *caps) {
struct vas_caps_entry *centry;
struct kobject *kobj = NULL;
int ret = 0;
char *name;
centry = kzalloc(sizeof(*centry), GFP_KERNEL);
if (!centry)
return -ENOMEM;
centry->caps = caps;
name = vas_caps_kobj_name(centry, &kobj);
if (kobj) {
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c | int __init sysfs_pseries_vas_init(struct vas_all_caps *vas_caps) {
int ret;
ret = misc_register(&vas_miscdev);
if (ret < 0) {
pr_err("%s: register vas misc device failed\n", __func__);
return ret;
}
pseries_vas_kobj =
kobject_create_and_add("vas0", &vas_miscdev.this_device->kobj);
if (!pseri... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas-sysfs.c | int sysfs_add_vas_caps(struct vas_cop_feat_caps *caps) { return 0; } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c | static long hcall_return_busy_check(long rc) {
if (H_IS_LONG_BUSY(rc)) {
msleep(get_longbusy_msecs(rc));
rc = H_BUSY;
} else if (rc == H_BUSY) {
cond_resched();
}
return rc;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c | static int h_modify_vas_window(struct pseries_vas_window *win) {
long rc;
do {
rc = plpar_hcall_norets(H_MODIFY_VAS_WINDOW, win->vas_win.winid, win->pid,
0, VAS_MOD_WIN_FLAGS, 0);
rc = hcall_return_busy_check(rc);
} while (rc == H_BUSY);
if (rc == H_SUCCESS)
return 0;
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c | static int allocate_setup_window(struct pseries_vas_window *txwin, u64 *domain,
u8 wintype) {
int rc;
rc = h_allocate_vas_window(txwin, domain, wintype, DEF_WIN_CREDS);
if (rc)
return rc;
txwin->fault_virq = irq_create_mapping(NULL, txwin->fault_irq);
if (!txwin->fault_v... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c |
static inline void free_irq_setup(struct pseries_vas_window *txwin) {
free_irq(txwin->fault_virq, txwin);
kfree(txwin->name);
irq_dispose_mapping(txwin->fault_virq);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c |
void vas_unregister_api_pseries(void) { vas_unregister_coproc_api(); } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c | static int pseries_vas_notifier(struct notifier_block *nb, unsigned long action,
void *data) {
struct of_reconfig_data *rd = data;
struct device_node *dn = rd->dn;
const __be32 *intserv = NULL;
int len;
if (is_shared_processor())
return NOTIFY_OK;
if ((action == OF_RECO... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.c | static int __init pseries_vas_init(void) {
struct hv_vas_all_caps *hv_caps;
int rc = 0;
if (!radix_enabled()) {
pr_err("API is supported only with radix page tables\n");
return -ENOTSUPP;
}
hv_caps = kmalloc(sizeof(*hv_caps), GFP_KERNEL);
if (!hv_caps)
return -ENOMEM;
/*
* Get VAS overall... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vas.h | static inline int pseries_vas_dlpar_cpu(void) { return 0; } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c |
static ssize_t cmo_high_show(struct bus_type *bt, char *buf) {
return sprintf(buf, "%lu\n", vio_cmo.high);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c | static void __init vio_cmo_sysfs_init(void) {
vio_bus_type.dev_groups = vio_cmo_dev_groups;
vio_bus_type.bus_groups = vio_bus_groups;
}
#else | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c | static int vio_cmo_bus_probe(struct vio_dev *viodev) { return 0; } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c | static int vio_bus_probe(struct device *dev) {
struct vio_dev *viodev = to_vio_dev(dev);
struct vio_driver *viodrv = to_vio_driver(dev->driver);
const struct vio_device_id *id;
int error = -ENODEV;
if (!viodrv->probe)
return error;
id = vio_match_device(viodrv->id_table, viodev);
if (id) {
memse... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c | int __vio_register_driver(struct vio_driver *viodrv, struct module *owner,
const char *mod_name) {
if (!machine_is(pseries))
return -ENODEV;
pr_debug("%s: driver %s registering\n", __func__, viodrv->name);
/* fill in 'struct driver' fields */
viodrv->driver.name = viodrv->name;
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c | static void vio_dev_release(struct device *dev) {
struct iommu_table *tbl = get_iommu_table_base(dev);
if (tbl)
iommu_tce_table_put(tbl);
of_node_put(dev->of_node);
kfree(to_vio_dev(dev));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c | static void __init vio_bus_scan_register_devices(char *root_name) {
struct device_node *node_root, *node_child;
if (!root_name)
return;
node_root = of_find_node_by_name(NULL, root_name);
if (node_root) {
node_child = of_get_next_child(node_root, NULL);
while (node_child) {
vio_register_devi... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c |
static int __init vio_device_init(void) {
vio_bus_scan_register_devices("vdevice");
vio_bus_scan_register_devices("ibm,platform-facilities");
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/pseries/vio.c |
void vio_unregister_device(struct vio_dev *viodev) {
device_unregister(&viodev->dev);
if (viodev->family == VDEVICE)
irq_dispose_mapping(viodev->irq);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/cpm2.c | void __cpm2_setbrg(uint brg, uint rate, uint clk, int div16, int src) {
u32 __iomem *bp;
u32 val;
if (brg < 4) {
bp = cpm2_map_size(im_brgc1, 16);
} else {
bp = cpm2_map_size(im_brgc5, 16);
brg -= 4;
}
bp += brg;
/* Round the clock divider to the nearest integer. */
val = (((clk * 2 / rate)... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/cpm2_pic.c |
static void cpm2_mask_irq(struct irq_data *d) {
int bit, word;
unsigned int irq_nr = irqd_to_hwirq(d);
bit = irq_to_siubit[irq_nr];
word = irq_to_siureg[irq_nr];
ppc_cached_irq_mask[word] &= ~(1 << bit);
out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/cpm2_pic.c | unsigned int cpm2_get_irq(void) {
int irq;
unsigned long bits;
bits = in_be32(&cpm2_intctl->ic_sivec);
irq = bits >> 26;
if (irq == 0)
return (-1);
return irq_linear_revmap(cpm2_pic_host, irq);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/cpm_common.c |
int cpm2_gpiochip_add32(struct device *dev) {
struct device_node *np = dev->of_node;
struct cpm2_gpio32_chip *cpm2_gc;
struct of_mm_gpio_chip *mm_gc;
struct gpio_chip *gc;
cpm2_gc = kzalloc(sizeof(*cpm2_gc), GFP_KERNEL);
if (!cpm2_gc)
return -ENOMEM;
spin_lock_init(&cpm2_gc->lock);
mm_gc = &cpm2... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/cpm_gpio.c |
static int __init cpm_gpio_init(void) {
return platform_driver_register(&cpm_gpio_driver);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/dart_iommu.c | static inline void dart_tlb_invalidate_all(void) {
unsigned long l = 0;
unsigned int reg, inv_bit;
unsigned long limit;
unsigned long flags;
spin_lock_irqsave(&invalidate_lock, flags);
DBG("dart: flush\n");
limit = 0;
inv_bit = dart_is_u4 ? DART_CNTL_U4_FLUSHTLB : DART_CNTL_U3_FLUSHTLB;
retry:
l =... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/dart_iommu.c |
static bool iommu_bypass_supported_dart(struct pci_dev *dev, u64 mask) {
return dart_is_u4 && dart_device_on_pcie(&dev->dev) &&
mask >= DMA_BIT_MASK(40);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/dart_iommu.c | static void iommu_dart_restore(void) {
dart_cache_sync(dart_tablebase, dart_tablesize / sizeof(u32));
dart_tlb_invalidate_all();
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/dcr.c | u32 dcr_read_generic(dcr_host_t host, unsigned int dcr_n) {
if (host.type == DCR_HOST_NATIVE)
return dcr_read_native(host.host.native, dcr_n);
else if (host.type == DCR_HOST_MMIO)
return dcr_read_mmio(host.host.mmio, dcr_n);
else
WARN_ON(true);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/ehv_pic.c |
void ehv_pic_mask_irq(struct irq_data *d) {
unsigned int src = virq_to_hw(d->irq);
ev_int_set_mask(src, 1);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ehv_pic.c |
int ehv_pic_set_affinity(struct irq_data *d, const struct cpumask *dest,
bool force) {
unsigned int src = virq_to_hw(d->irq);
unsigned int config, prio, cpu_dest;
int cpuid = irq_choose_cpu(dest);
unsigned long flags;
spin_lock_irqsave(&ehv_pic_lock, flags);
ev_int_get_config(src,... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ehv_pic.c | int ehv_pic_set_irq_type(struct irq_data *d, unsigned int flow_type) {
unsigned int src = virq_to_hw(d->irq);
unsigned int vecpri, vold, vnew, prio, cpu_dest;
unsigned long flags;
if (flow_type == IRQ_TYPE_NONE)
flow_type = IRQ_TYPE_LEVEL_LOW;
irqd_set_trigger_type(d, flow_type);
vecpri = ehv_pic_typ... | [
1,
1
] |
Linux Kernel | arch/powerpc/sysdev/ehv_pic.c | static int ehv_pic_host_map(struct irq_domain *h, unsigned int virq,
irq_hw_number_t hw) {
struct ehv_pic *ehv_pic = h->host_data;
struct irq_chip *chip;
chip = &ehv_pic->hc_irq;
if (mpic_percpu_base_vaddr)
if (hwirq_intspec[hw] & IRQ_TYPE_MPIC_DIRECT)
chip = &ehv_pic_dir... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/ehv_pic.c |
void __init ehv_pic_init(void) {
struct device_node *np, *np2;
struct ehv_pic *ehv_pic;
int coreint_flag = 1;
np = of_find_compatible_node(NULL, NULL, "epapr,hv-pic");
if (!np) {
pr_err("ehv_pic_init: could not find epapr,hv-pic node\n");
return;
}
if (!of_find_property(np, "has-external-proxy"... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_gtm.c | struct gtm_timer *gtm_get_specific_timer16(struct gtm *gtm,
unsigned int timer) {
struct gtm_timer *ret = ERR_PTR(-EBUSY);
if (timer > 3)
return ERR_PTR(-EINVAL);
spin_lock_irq(>m->lock);
if (gtm->timers[timer].requested)
goto out;
ret = >m->timers[ti... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_gtm.c | static int __init fsl_gtm_init(void) {
struct device_node *np;
for_each_compatible_node(np, NULL, "fsl,gtm") {
int i;
struct gtm *gtm;
const u32 *clock;
int size;
gtm = kzalloc(sizeof(*gtm), GFP_KERNEL);
if (!gtm) {
pr_err("%pOF: unable to allocate memory\n", np);
continue;
... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_lbc.c | u32 fsl_lbc_addr(phys_addr_t addr_base) {
struct device_node *np = fsl_lbc_ctrl_dev->dev->of_node;
u32 addr = addr_base & 0xffff8000;
if (of_device_is_compatible(np, "fsl,elbc"))
return addr;
return addr | ((addr_base & 0x300000000ull) >> 19);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_lbc.c | int fsl_lbc_find(phys_addr_t addr_base) {
int i;
struct fsl_lbc_regs __iomem *lbc;
if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
return -ENODEV;
lbc = fsl_lbc_ctrl_dev->regs;
for (i = 0; i < ARRAY_SIZE(lbc->bank); i++) {
u32 br = in_be32(&lbc->bank[i].br);
u32 or = in_be32(&lbc->bank[i].or);... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_lbc.c | int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar) {
int ret = 0;
unsigned long flags;
if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
return -ENODEV;
spin_lock_irqsave(&fsl_lbc_lock, flags);
out_be32(&fsl_lbc_ctrl_dev->regs->mar, mar);
switch (upm->width) {
case 8:
... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_mpic_err.c |
static inline u32 mpic_fsl_err_read(u32 __iomem *base, unsigned int err_reg) {
return in_be32(base + (err_reg >> 2));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_mpic_err.c |
static inline void mpic_fsl_err_write(u32 __iomem *base, u32 value) {
out_be32(base + (MPIC_ERR_INT_EIMR >> 2), value);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_mpic_err.c |
static void fsl_mpic_unmask_err(struct irq_data *d) {
u32 eimr;
struct mpic *mpic = irq_data_get_irq_chip_data(d);
unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0];
eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR);
eimr &= ~(1 << (31 - src));
mpic_fsl_err_write(mpic->err_regs, eimr... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_mpic_err.c | void __init mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum) {
unsigned int virq;
int ret;
virq = irq_create_mapping(mpic->irqhost, irqnum);
if (!virq) {
pr_err("Error interrupt setup failed\n");
return;
}
mpic_fsl_err_write(mpic->err_regs, ~0);
ret = request_irq(virq, fsl_error_int... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_mpic_timer_wakeup.c |
static ssize_t fsl_timer_wakeup_show(struct device *dev,
struct device_attribute *attr, char *buf) {
time64_t interval = 0;
mutex_lock(&sysfs_lock);
if (fsl_wakeup->timer) {
mpic_get_remain_time(fsl_wakeup->timer, &interval);
interval++;
}
mutex_unlock(&sysfs_loc... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_mpic_timer_wakeup.c |
static ssize_t fsl_timer_wakeup_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count) {
time64_t interval;
int ret;
if (kstrtoll(buf, 0, &interval))
return -EINVAL;
mutex_lock(&sysfs_lock);
if... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_msi.c |
static inline u32 fsl_msi_read(u32 __iomem *base, unsigned int reg) {
return in_be32(base + (reg >> 2));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_msi.c |
static void fsl_msi_print_chip(struct irq_data *irqd, struct seq_file *p) {
struct fsl_msi *msi_data = irqd->domain->host_data;
irq_hw_number_t hwirq = irqd_to_hwirq(irqd);
int cascade_virq, srs;
srs = (hwirq >> msi_data->srs_shift) & MSI_SRS_MASK;
cascade_virq = msi_data->cascade_array[srs]->virq;
seq_p... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_msi.c |
static int fsl_msi_host_map(struct irq_domain *h, unsigned int virq,
irq_hw_number_t hw) {
struct fsl_msi *msi_data = h->host_data;
struct irq_chip *chip = &fsl_msi_chip;
irq_set_status_flags(virq, IRQ_TYPE_EDGE_FALLING);
irq_set_chip_data(virq, msi_data);
irq_set_chip_and_handl... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_msi.c |
static void fsl_teardown_msi_irqs(struct pci_dev *pdev) {
struct msi_desc *entry;
struct fsl_msi *msi_data;
irq_hw_number_t hwirq;
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) {
hwirq = virq_to_hw(entry->irq);
msi_data = irq_get_chip_data(entry->irq);
irq_set_msi_desc(entry->irq, NULL... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_msi.c |
static int fsl_of_msi_remove(struct platform_device *ofdev) {
struct fsl_msi *msi = platform_get_drvdata(ofdev);
int virq, i;
if (msi->list.prev != NULL)
list_del(&msi->list);
for (i = 0; i < NR_MSI_REG_MAX; i++) {
if (msi->cascade_array[i]) {
virq = msi->cascade_array[i]->virq;
BUG_ON(!v... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_pci.c | static int fsl_pcie_check_link(struct pci_controller *hose) {
u32 val = 0;
if (hose->indirect_type & PPC_INDIRECT_TYPE_FSL_CFG_REG_LINK) {
if (hose->ops->read == fsl_indirect_read_config)
__indirect_read_config(hose, hose->first_busno, 0, PCIE_LTSSM, 4, &val);
else
early_read_config_dword(hose,... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_pci.c |
static int fsl_indirect_read_config(struct pci_bus *bus, unsigned int devfn,
int offset, int len, u32 *val) {
struct pci_controller *hose = pci_bus_to_host(bus);
if (fsl_pcie_check_link(hose))
hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
else
hose->indirect_... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_pci.c | static void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev) {
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
pdev->dev.bus_dma_limit =
hose->dma_window_base_cur + hose->dma_window_size - 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_pci.c | static int mpc83xx_pcie_exclude_device(struct pci_bus *bus,
unsigned int devfn) {
struct pci_controller *hose = pci_bus_to_host(bus);
if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)
return PCIBIOS_DEVICE_NOT_FOUND;
if (bus->number == hose->first_busno || bus-... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_pci.c | int fsl_pci_mcheck_exception(struct pt_regs *regs) {
u32 inst;
int ret;
phys_addr_t addr = 0;
if (regs->msr & MSR_GS)
return 0;
#ifdef CONFIG_PHYS_64BIT
addr = mfspr(SPRN_MCARU);
addr <<= 32;
#endif
addr += mfspr(SPRN_MCAR);
if (is_in_pci_mem_space(addr)) {
if (user_mode(regs))
ret =
... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_pmc.c |
static int pmc_suspend_valid(suspend_state_t state) {
if (state != PM_SUSPEND_STANDBY)
return 0;
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rcpm.c | static void rcpm_v2_cpu_die(int cpu) {
#ifdef CONFIG_PPC64
int primary;
if (threads_per_core == 2) {
primary = cpu_first_thread_sibling(cpu);
if (cpu_is_offline(primary) && cpu_is_offline(primary + 1)) {
rcpm_v2_cpu_enter_state(cpu, E500_PM_PH20);
} else {
/* if only one thread is offline,... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rcpm.c |
static void rcpm_v1_cpu_exit_state(int cpu, int state) {
int hw_cpu = get_hard_smp_processor_id(cpu);
unsigned int mask = 1 << hw_cpu;
switch (state) {
case E500_PM_PH10:
clrbits32(&rcpm_v1_regs->cdozcr, mask);
break;
case E500_PM_PH15:
clrbits32(&rcpm_v1_regs->cnapcr, mask);
break;
defaul... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rcpm.c | static int rcpm_v2_plat_enter_state(int state) {
u32 *pmcsr_reg = &rcpm_v2_regs->powmgtcsr;
int ret = 0;
int result;
switch (state) {
case PLAT_PM_LPM20:
setbits32(pmcsr_reg, RCPM_POWMGTCSR_P_LPM20_ST);
/* enter LPM20 status */
setbits32(pmcsr_reg, RCPM_POWMGTCSR_LPM20_RQ);
/* At this point... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rcpm.c | static void rcpm_common_freeze_time_base(u32 *tben_reg, int freeze) {
static u32 mask;
if (freeze) {
mask = in_be32(tben_reg);
clrbits32(tben_reg, mask);
} else {
setbits32(tben_reg, mask);
}
in_be32(tben_reg);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rio.c | static int fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid,
u8 hopcount, u32 offset, int len, u32 *val) {
struct rio_priv *priv = mport->priv;
unsigned long flags;
u8 *data;
u32 rval, err = 0;
pr_debug("fsl_rio_config_read:"
" index %d destid %d ho... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rio.c | static inline void fsl_rio_info(struct device *dev, u32 ccsr) {
const char *str;
if (ccsr & 1) {
switch (ccsr >> 30) {
case 0:
str = "1";
break;
case 1:
str = "4";
break;
default:
str = "Unknown";
break;
}
dev_info(dev, "Hardware port width: %s\n", str);
... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rmu.c | static irqreturn_t fsl_rio_rx_handler(int irq, void *dev_instance) {
int isr;
struct rio_mport *port = (struct rio_mport *)dev_instance;
struct fsl_rmu *rmu = GET_RMM_HANDLE(port);
isr = in_be32(&rmu->msg_regs->isr);
if (isr & RIO_MSG_ISR_TE) {
pr_info("RIO: inbound message reception error\n");
out_... | [
0,
1
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rmu.c | int fsl_add_inb_buffer(struct rio_mport *mport, int mbox, void *buf) {
int rc = 0;
struct fsl_rmu *rmu = GET_RMM_HANDLE(mport);
pr_debug("RIO: fsl_add_inb_buffer(), msg_rx_ring.rx_slot %d\n",
rmu->msg_rx_ring.rx_slot);
if (rmu->msg_rx_ring.virt_buffer[rmu->msg_rx_ring.rx_slot]) {
printk(KERN_ER... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_rmu.c | int fsl_rio_doorbell_init(struct fsl_rio_dbell *dbell) {
int rc = 0;
dbell->dbell_ring.virt =
dma_alloc_coherent(dbell->dev, 512 * DOORBELL_MESSAGE_SIZE,
&dbell->dbell_ring.phys, GFP_KERNEL);
if (!dbell->dbell_ring.virt) {
printk(KERN_ERR "RIO: unable allocate inbound doorbell ... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_soc.c |
phys_addr_t get_immrbase(void) {
struct device_node *soc;
if (immrbase != -1)
return immrbase;
soc = of_find_node_by_type(NULL, "soc");
if (soc) {
int size;
u32 naddr;
const __be32 *prop = of_get_property(soc, "#address-cells", &size);
if (prop && size == 4)
naddr = be32_to_cpup(pr... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_soc.c |
u32 get_baudrate(void) {
static u32 fs_baudrate = -1;
struct device_node *node;
if (fs_baudrate != -1)
return fs_baudrate;
node = of_find_node_by_type(NULL, "serial");
if (node) {
of_property_read_u32(node, "current-speed", &fs_baudrate);
of_node_put(node);
}
return fs_baudrate;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/fsl_soc.c | void __noreturn fsl_hv_halt(void) {
pr_info("hv exit\n");
fh_partition_stop(-1);
while (1)
;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/ge/ge_pic.c | static void gef_pic_cascade(struct irq_desc *desc) {
struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned int cascade_irq;
cascade_irq = gef_pic_get_irq();
if (cascade_irq)
generic_handle_irq(cascade_irq);
chip->irq_eoi(&desc->irq_data);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/ge/ge_pic.c |
static void gef_pic_mask(struct irq_data *d) {
unsigned long flags;
unsigned int hwirq = irqd_to_hwirq(d);
u32 mask;
raw_spin_lock_irqsave(&gef_pic_lock, flags);
mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
mask &= ~(1 << hwirq);
out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ge/ge_pic.c |
static void gef_pic_unmask(struct irq_data *d) {
unsigned long flags;
unsigned int hwirq = irqd_to_hwirq(d);
u32 mask;
raw_spin_lock_irqsave(&gef_pic_lock, flags);
mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
mask |= (1 << hwirq);
out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mas... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ge/ge_pic.c | void __init gef_pic_init(struct device_node *np) {
unsigned long flags;
gef_pic_irq_reg_base = of_iomap(np, 0);
raw_spin_lock_irqsave(&gef_pic_lock, flags);
/* Initialise everything as masked. */
out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_INTR_MASK, 0);
out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_INTR... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/ge/ge_pic.c | unsigned int gef_pic_get_irq(void) {
u32 cause, mask, active;
unsigned int virq = 0;
int hwirq;
cause = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_STATUS);
mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));
active = cause & mask;
if (active) {
for (hwirq = GEF_PIC_NUM_IRQS - 1; hwirq > ... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/grackle.c |
static inline void grackle_set_loop_snoop(struct pci_controller *bp,
int enable) {
unsigned int val;
out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8));
val = in_le32(bp->cfg_data);
val = enable ? (val | GRACKLE_PICR1_LOOPSNOOP)
: (val & ~GRACKLE_PICR1_LOO... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/i8259.c | static int i8259_host_map(struct irq_domain *h, unsigned int virq,
irq_hw_number_t hw) {
pr_debug("i8259_host_map(%d, 0x%lx)\n", virq, hw);
if (hw == 2)
irq_set_status_flags(virq, IRQ_NOREQUEST);
/* We use the level handler only for now, we might want to
* be more cautious here ... | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/indirect_pci.c |
void setup_indirect_pci(struct pci_controller *hose, resource_size_t cfg_addr,
resource_size_t cfg_data, u32 flags) {
resource_size_t base = cfg_addr & PAGE_MASK;
void __iomem *mbase;
mbase = ioremap(base, PAGE_SIZE);
hose->cfg_addr = mbase + (cfg_addr & ~PAGE_MASK);
if ((cfg_data & ... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ipic.c | static void ipic_mask_irq(struct irq_data *d) {
struct ipic *ipic = ipic_from_irq(d->irq);
unsigned int src = irqd_to_hwirq(d);
unsigned long flags;
u32 temp;
raw_spin_lock_irqsave(&ipic_lock, flags);
temp = ipic_read(ipic->regs, ipic_info[src].mask);
temp &= ~(1 << (31 - ipic_info[src].bit));
ipic_wr... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ipic.c | static void ipic_mask_irq_and_ack(struct irq_data *d) {
struct ipic *ipic = ipic_from_irq(d->irq);
unsigned int src = irqd_to_hwirq(d);
unsigned long flags;
u32 temp;
raw_spin_lock_irqsave(&ipic_lock, flags);
temp = ipic_read(ipic->regs, ipic_info[src].mask);
temp &= ~(1 << (31 - ipic_info[src].bit));
... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/ipic.c | static int ipic_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/ipic.c | static int ipic_host_map(struct irq_domain *h, unsigned int virq,
irq_hw_number_t hw) {
struct ipic *ipic = h->host_data;
irq_set_chip_data(virq, ipic);
irq_set_chip_and_handler(virq, &ipic_level_irq_chip, handle_level_irq);
irq_set_irq_type(virq, IRQ_TYPE_NONE);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c |
static inline void _mpic_tm_write(struct mpic *mpic, unsigned int tm,
u32 value) {
unsigned int offset = mpic_tm_offset(mpic, tm) + MPIC_INFO(TIMER_VECTOR_PRI);
_mpic_write(mpic->reg_type, &mpic->tmregs, offset, value);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source) {
if (source >= 128 || !mpic->fixups)
return 0;
return mpic->fixups[source].base != NULL;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static void mpic_startup_ht_interrupt(struct mpic *mpic, unsigned int source,
bool level) {
struct mpic_irq_fixup *fixup = &mpic->fixups[source];
unsigned long flags;
u32 tmp;
if (fixup->base == NULL)
return;
DBG("startup_ht_interrupt(0x%x) index: %d\n", source, fix... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static void __init mpic_scan_ht_pics(struct mpic *mpic) {}
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static struct mpic *mpic_find(unsigned int irq) {
if (irq < NR_IRQS_LEGACY)
return NULL;
return irq_get_chip_data(irq);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static unsigned int mpic_is_ipi(struct mpic *mpic, unsigned int src) {
return (src >= mpic->ipi_vecs[0] && src <= mpic->ipi_vecs[3]);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static inline struct mpic *mpic_from_irq(unsigned int irq) {
return irq_get_chip_data(irq);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | static inline void mpic_eoi(struct mpic *mpic) {
mpic_cpu_write(MPIC_INFO(CPU_EOI), 0);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | void mpic_unmask_irq(struct irq_data *d) {
unsigned int loops = 100000;
struct mpic *mpic = mpic_from_irq_data(d);
unsigned int src = irqd_to_hwirq(d);
DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, d->irq, src);
mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
mpic_irq_read(src, ... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | void mpic_mask_irq(struct irq_data *d) {
unsigned int loops = 100000;
struct mpic *mpic = mpic_from_irq_data(d);
unsigned int src = irqd_to_hwirq(d);
DBG("%s: disable_irq: %d (src %d)\n", mpic->name, d->irq, src);
mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI),
mpic_irq_read(src, MPIC_INFO(I... | [
1,
0
] |
Linux Kernel | arch/powerpc/sysdev/mpic.c | void mpic_end_irq(struct irq_data *d) {
struct mpic *mpic = mpic_from_irq_data(d);
#ifdef DEBUG_IRQ
DBG("%s: end_irq: %d\n", mpic->name, d->irq);
#endif
mpic_eoi(mpic);
} | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.