Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/powerpc/platforms/ps3/os-area.c
static unsigned int db_align_up(unsigned int val, unsigned int size) { return (val + (size - 1)) & (~(size - 1)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/os-area.c
void __init ps3_os_area_save_params(void) { int result; u64 lpar_addr; unsigned int size; struct os_area_header *header; struct os_area_params *params; struct os_area_db *db; pr_debug(" -> %s:%d\n", __func__, __LINE__); result = ps3_repository_read_boot_dat_info(&lpar_addr, &size); if (result) { ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/os-area.c
void ps3_os_area_set_rtc_diff(u64 rtc_diff) { if (saved_params.rtc_diff != rtc_diff) { saved_params.rtc_diff = rtc_diff; os_area_queue_work(); } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/os-area.c
enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void) { return saved_params.av_multi_out; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/platform.h
static inline void ps3_smp_cleanup_cpu(int cpu) {} #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/platform.h
static inline int ps3_repository_write_highmem_size(unsigned int region_index, u64 highmem_size) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int ps3_repository_read_dev_intr(unsigned int bus_index, unsigned int dev_index, unsigned int intr_index, enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id) { int result; u64 v1 = 0; u64 v2 = 0; res...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int __init ps3_repository_find_devices( enum ps3_bus_type bus_type, int (*callback)(const struct ps3_repository_device *repo)) { int result = 0; struct ps3_repository_device repo; pr_devel(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type); repo.bus_type = bus_type; result = ps3_reposit...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int __init ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from, unsigned int *bus_index) { unsigned int i; enum ps3_bus_type type; int error; for (i = from; i < 10; i++) { error = ps3_repository_read_bus_type(i, &type); if (error) { pr_devel("...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int ps3_repository_find_reg(const struct ps3_repository_device *repo, enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len) { int result = 0; unsigned int res_index; pr_devel("%s:%d: find reg_type %u\n", __func__, __LINE__, reg_type); *bus_addr = *len = ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int ps3_repository_read_highmem_size(unsigned int region_index, u64 *highmem_size) { return read_node(PS3_LPAR_ID_CURRENT, make_first_field("highmem", 0), make_field("region", region_index), make_field("size", 0), 0, highmem_size, NULL); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int ps3_repository_read_spu_resource_id( unsigned int res_index, enum ps3_spu_resource_type *resource_type, unsigned int *resource_id) { int result; u64 v1 = 0; u64 v2 = 0; result = read_node(PS3_LPAR_ID_CURRENT, make_first_field("bi", 0), make_field("spursv", 0), res_index, 0, &v1...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int __init ps3_repository_read_vuart_av_port(unsigned int *port) { int result; u64 v1 = 0; result = read_node(PS3_LPAR_ID_CURRENT, make_first_field("bi", 0), make_field("vir_uart", 0), make_field("port", 0), make_field("avset", 0), &v1, NULL); *port = v1; return res...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int ps3_repository_read_num_be(unsigned int *num_be) { int result; u64 v1 = 0; result = read_node(PS3_LPAR_ID_PME, make_first_field("ben", 0), 0, 0, 0, &v1, NULL); *num_be = v1; return result; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
static int create_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2) { int result; dump_node(0, n1, n2, n3, n4, v1, v2); result = lv1_create_repository_node(n1, n2, n3, n4, v1, v2); if (result) { pr_devel("%s:%d: lv1_create_repository_node failed: %s\n", __func__, __LINE__, ps3_result(res...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
static int write_node(u64 n1, u64 n2, u64 n3, u64 n4, u64 v1, u64 v2) { int result; result = create_node(n1, n2, n3, n4, v1, v2); if (!result) return 0; result = lv1_write_repository_node(n1, n2, n3, n4, v1, v2); if (result) { pr_devel("%s:%d: lv1_write_repository_node failed: %s\n", __func__, ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
static int ps3_repository_delete_highmem_size(unsigned int region_index) { return delete_node(make_first_field("highmem", 0), make_field("region", region_index), make_field("size", 0), 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
int ps3_repository_delete_highmem_info(unsigned int region_index) { int result; result = ps3_repository_delete_highmem_base(region_index); result += ps3_repository_delete_highmem_size(region_index); return result ? -1 : 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/repository.c
static int __init dump_device_info(struct ps3_repository_device *repo, unsigned int num_dev) { int result = 0; pr_devel(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index); for (repo->dev_index = 0; repo->dev_index < num_dev; repo->dev_index++) { result = ps3_rep...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/setup.c
static int __init early_parse_ps3flash(char *p) { if (!p) return 1; if (!strcmp(p, "off")) ps3flash_bounce_buffer.size = 0; return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/setup.c
static void __init ps3_setup_arch(void) { u64 tmp; DBG(" -> %s:%d\n", __func__, __LINE__); lv1_get_version_info(&ps3_firmware_version.raw, &tmp); snprintf(ps3_firmware_version_str, sizeof(ps3_firmware_version_str), "%u.%u.%u", ps3_firmware_version.major, ps3_firmware_version.minor, ps3...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/setup.c
void __init ps3_early_mm_init(void) { unsigned long htab_size; ps3_mm_init(); ps3_mm_vas_create(&htab_size); ps3_hpte_init(htab_size); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/smp.c
void __init smp_init_ps3(void) { DBG(" -> %s\n", __func__); smp_ops = &ps3_smp_ops; DBG(" <- %s\n", __func__); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static unsigned long __init get_vas_id(void) { u64 id; lv1_get_logical_ppe_id(&id); lv1_get_virtual_address_space_id_of_ppe(&id); return id; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static void spu_unmap(struct spu *spu) { iounmap(spu->priv2); iounmap(spu->problem); iounmap((__force u8 __iomem *)spu->local_store); iounmap(spu_pdata(spu)->shadow); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static int __init setup_areas(struct spu *spu) { struct table { char *name; unsigned long addr; unsigned long size; }; unsigned long shadow_flags = pgprot_val(pgprot_noncached_wc(PAGE_KERNEL_RO)); spu_pdata(spu)->shadow = ioremap_prot( spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), s...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static int ps3_init_affinity(void) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static u64 int_mask_get(struct spu *spu, int class) { return spu_pdata(spu)->cache.masks[class]; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static void int_stat_clear(struct spu *spu, int class, u64 stat) { lv1_clear_spe_interrupt_status(spu_pdata(spu)->spe_id, class, stat, 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static u64 mfc_dsisr_get(struct spu *spu) { return in_be64(&spu_pdata(spu)->shadow->mfc_dsisr_RW); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static u64 mfc_sr1_get(struct spu *spu) { return spu_pdata(spu)->cache.sr1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static u64 mfc_tclass_id_get(struct spu *spu) { return spu_pdata(spu)->cache.tclass_id; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static void resource_allocation_groupID_set(struct spu *spu, u64 id) {}
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/spu.c
static void resource_allocation_enable_set(struct spu *spu, u64 enable) {}
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static int ps3_close_hv_device_sb(struct ps3_system_bus_device *dev) { int result; BUG_ON(!dev->bus_id); mutex_lock(&usage_hack.mutex); if (ps3_is_device(dev, 1, 1)) { usage_hack.sb_11--; if (usage_hack.sb_11) { result = 0; goto done; } } if (ps3_is_device(dev, 1, 2)) { usage...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
int ps3_open_hv_device(struct ps3_system_bus_device *dev) { BUG_ON(!dev); pr_debug("%s:%d: match_id: %u\n", __func__, __LINE__, dev->match_id); switch (dev->match_id) { case PS3_MATCH_ID_EHCI: case PS3_MATCH_ID_OHCI: case PS3_MATCH_ID_GELIC: case PS3_MATCH_ID_STOR_DISK: case PS3_MATCH_ID_STOR_ROM: c...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static int ps3_ioc0_mmio_region_create(struct ps3_mmio_region *r) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static int ps3_sb_free_mmio_region(struct ps3_mmio_region *r) { int result; dump_mmio_region(r); result = lv1_unmap_device_mmio_region(r->dev->bus_id, r->dev->dev_id, r->lpar_addr); if (result) pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n", __func__, ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static int ps3_system_bus_probe(struct device *_dev) { int result = 0; struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); struct ps3_system_bus_driver *drv; BUG_ON(!dev); dev_dbg(_dev, "%s:%d\n", __func__, __LINE__); drv = ps3_system_bus_dev_to_system_bus_drv(dev); BUG_ON(!drv); if...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static ssize_t modalias_show(struct device *_dev, struct device_attribute *a, char *buf) { struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); int len = snprintf(buf, PAGE_SIZE, "ps3:%d:%d\n", dev->match_id, dev->match_sub_id); return (len >= PAGE_SIZE) ? (PAG...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static void *ps3_alloc_coherent(struct device *_dev, size_t size, dma_addr_t *dma_handle, gfp_t flag, unsigned long attrs) { int result; struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); unsigned long virt_addr; flag &= ~(__GFP_...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static void ps3_unmap_page(struct device *_dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction direction, unsigned long attrs) { struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); int result; result = ps3_dma_unmap(dev->d_region,...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, unsigned long attrs) { #if defined(CONFIG_PS3_DYNAMIC_DMA) BUG_ON("do"); #endif }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) { int result; static unsigned int dev_ioc0_count; static unsigned int dev_sb_count; static unsigned int dev_vuart_count; static unsigned int dev_lpm_count; if (!dev->core.parent) dev->core.parent = &ps3_system_bus; dev->core.bus = ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv) { int result; pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name); if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) return -ENODEV; drv->core.bus = &ps3_system_bus_type; result = driver_register(&drv->core); pr_debug(" ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/system-bus.c
void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv) { pr_debug(" -> %s:%d: %s\n", __func__, __LINE__, drv->core.name); driver_unregister(&drv->core); pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, drv->core.name); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/time.c
void __init ps3_calibrate_decr(void) { int result; u64 tmp; result = ps3_repository_read_be_tb_freq(0, &tmp); BUG_ON(result); ppc_tb_freq = tmp; ppc_proc_freq = ppc_tb_freq * 40; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/time.c
time64_t __init ps3_get_boot_time(void) { return read_rtc() + ps3_os_area_get_rtc_diff(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/ps3/time.c
static int __init ps3_rtc_init(void) { struct platform_device *pdev; if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) return -ENODEV; pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0); return PTR_ERR_OR_ZERO(pdev); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/cmm.c
static int cmm_oom_notify(struct notifier_block *self, unsigned long dummy, void *parm) { unsigned long *freed = parm; long nr = KB2PAGES(oom_kb); cmm_dbg("OOM processing started\n"); nr = cmm_free_pages(nr); loaned_pages_target = atomic_long_read(&loaned_pages); *freed += KB2PAGE...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/cmm.c
static ssize_t store_oom_pages(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { unsigned long val = simple_strtoul(buf, NULL, 10); if (!capable(CAP_SYS_ADMIN)) return -EPERM; if (val != 0) return -EBADMSG; ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/cmm.c
static void cmm_balloon_compaction_init(void) { balloon_devinfo_init(&b_dev_info); b_dev_info.migratepage = cmm_migratepage; } #else
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/cmm.c
static void cmm_exit(void) { if (cmm_thread_ptr) kthread_stop(cmm_thread_ptr); unregister_oom_notifier(&cmm_oom_nb); unregister_reboot_notifier(&cmm_reboot_nb); unregister_memory_notifier(&cmm_mem_nb); cmm_free_pages(atomic_long_read(&loaned_pages)); cmm_unregister_sysfs(&cmm_dev); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/cmm.c
static int cmm_set_disable(const char *val, const struct kernel_param *kp) { int disable = simple_strtoul(val, NULL, 10); if (disable != 0 && disable != 1) return -EINVAL; if (disable && !cmm_disabled) { if (cmm_thread_ptr) kthread_stop(cmm_thread_ptr); cmm_thread_ptr = NULL; cmm_free_page...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dlpar.c
void dlpar_free_cc_property(struct property *prop) { kfree(prop->name); kfree(prop->value); kfree(prop); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dlpar.c
int dlpar_acquire_drc(u32 drc_index) { int dr_status, rc; rc = rtas_get_sensor(DR_ENTITY_SENSE, drc_index, &dr_status); if (rc || dr_status != DR_ENTITY_UNUSABLE) return -1; rc = rtas_set_indicator(ALLOCATION_STATE, drc_index, ALLOC_USABLE); if (rc) return rc; rc = rtas_set_indicator(ISOLATION_S...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dlpar.c
static ssize_t dlpar_store(struct class *class, struct class_attribute *attr, const char *buf, size_t count) { struct pseries_hp_errorlog hp_elog; char *argbuf; char *args; int rc; args = argbuf = kstrdup(buf, GFP_KERNEL); if (!argbuf) return -ENOMEM; rc = dlpar_parse_reso...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dtl.c
static int dtl_start(struct dtl *dtl) { unsigned long addr; int ret, hwcpu; ((u32 *)dtl->buf)[1] = cpu_to_be32(DISPATCH_LOG_BYTES); hwcpu = get_hard_smp_processor_id(dtl->cpu); addr = __pa(dtl->buf); ret = register_dtl(hwcpu, addr); if (ret) { printk(KERN_WARNING "%s: DTL registration for cpu %d (hw...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dtl.c
static int dtl_enable(struct dtl *dtl) { long int n_entries; long int rc; struct dtl_entry *buf = NULL; if (!dtl_cache) return -ENOMEM; if (dtl->buf) return -EBUSY; /* ensure there are no other conflicting dtl users */ if (!read_trylock(&dtl_access_lock)) return -EBUSY; n_entries = dtl_b...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dtl.c
static void dtl_disable(struct dtl *dtl) { spin_lock(&dtl->lock); dtl_stop(dtl); kmem_cache_free(dtl_cache, dtl->buf); dtl->buf = NULL; dtl->buf_entries = 0; spin_unlock(&dtl->lock); read_unlock(&dtl_access_lock); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/dtl.c
static ssize_t dtl_file_read(struct file *filp, char __user *buf, size_t len, loff_t *pos) { long int rc, n_read, n_req, read_size; struct dtl *dtl; u64 cur_idx, last_idx, i; if ((len % sizeof(struct dtl_entry)) != 0) return -EINVAL; dtl = filp->private_data; n_req = len ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/eeh_pseries.c
static void pseries_pcibios_bus_add_device(struct pci_dev *pdev) { struct pci_dn *pdn = pci_get_pdn(pdev); if (eeh_has_flag(EEH_FORCE_DISABLED)) return; dev_dbg(&pdev->dev, "EEH: Setting up device\n"); #ifdef CONFIG_PCI_IOV if (pdev->is_virtfn) { pdn->device_id = pdev->device; pdn->vendor_id = pde...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/eeh_pseries.c
void pseries_eeh_init_edev_recursive(struct pci_dn *pdn) { struct pci_dn *n; if (!pdn) return; list_for_each_entry(n, &pdn->child_list, list) pseries_eeh_init_edev_recursive(n); pseries_eeh_init_edev(pdn); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/eeh_pseries.c
static int pseries_eeh_get_state(struct eeh_pe *pe, int *delay) { int ret; int rets[4]; int result; if (ibm_read_slot_reset_state2 != RTAS_UNKNOWN_SERVICE) { ret = rtas_call(ibm_read_slot_reset_state2, 3, 4, rets, pe->addr, BUID_HI(pe->phb->buid), BUID_LO(pe->phb->buid)); } else if (i...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/eeh_pseries.c
static int pseries_send_allow_unfreeze(struct pci_dn *pdn, u16 *vf_pe_array, int cur_vfs) { int rc; int ibm_allow_unfreeze = rtas_token("ibm,open-sriov-allow-unfreeze"); unsigned long buid, addr; addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); buid = pdn->phb->buid;...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/eeh_pseries.c
static int pseries_notify_resume(struct eeh_dev *edev) { if (!edev) return -EEXIST; if (rtas_token("ibm,open-sriov-allow-unfreeze") == RTAS_UNKNOWN_SERVICE) return -EINVAL; if (edev->pdev->is_physfn || edev->pdev->is_virtfn) return pseries_call_allow_unfreeze(edev); return 0; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/event_sources.c
void __init request_event_sources_irqs(struct device_node *np, irq_handler_t handler, const char *name) { int i, virq, rc; for (i = 0; i < 16; i++) { virq = of_irq_get(np, i); if (virq < 0) return; if (WARN(!virq, ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/firmware.c
static void __init fw_vec5_feature_init(const char *vec5, unsigned long len) { unsigned int index, feat; int i; pr_debug(" -> fw_vec5_feature_init()\n"); for (i = 0; i < ARRAY_SIZE(vec5_fw_features_table); i++) { index = OV5_INDX(vec5_fw_features_table[i].feature); feat = OV5_FEAT(vec5_fw_features_ta...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/firmware.c
void __init pseries_probe_fw_features(void) { of_scan_flat_dt(probe_fw_features, NULL); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static void pseries_cpu_die(unsigned int cpu) { int cpu_status = 1; unsigned int pcpu = get_hard_smp_processor_id(cpu); unsigned long timeout = jiffies + msecs_to_jiffies(120000); while (true) { cpu_status = smp_query_cpu_stopped(pcpu); if (cpu_status == QCSS_STOPPED || cpu_status == QCSS_HARDWARE_ERRO...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static void pseries_remove_processor(struct device_node *np) { unsigned int cpu; int len, nthreads, i; const __be32 *intserv; u32 thread; intserv = of_get_property(np, "ibm,ppc-interrupt-server#s", &len); if (!intserv) return; nthreads = len / sizeof(u32); cpu_maps_update_begin(); for (i = 0; i...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index) { bool found = false; int rc, index; if (of_find_property(parent, "ibm,drc-info", NULL)) return drc_info_valid_index(parent, drc_index); index = 1; while (!found) { u32 drc; rc = of_property_read_u32_index(parent, "ibm,d...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static int pseries_cpuhp_attach_nodes(struct device_node *dn) { struct of_changeset cs; int ret; for (of_changeset_init(&cs); dn != NULL; dn = dn->sibling) { ret = of_changeset_attach_node(&cs, dn); if (ret) goto out; } ret = of_changeset_apply(&cs); out: of_changeset_destroy(&cs); return ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static int pseries_cpuhp_detach_nodes(struct device_node *cpudn) { struct device_node *dn; struct of_changeset cs; int ret = 0; of_changeset_init(&cs); ret = of_changeset_detach_node(&cs, cpudn); if (ret) goto out; dn = cpudn; while ((dn = of_find_next_cache_node(dn))) { if (pseries_cpuhp_cac...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static struct device_node *cpu_drc_index_to_dn(u32 drc_index) { struct device_node *dn; u32 my_index; int rc; for_each_node_by_type(dn, "cpu") { rc = of_property_read_u32(dn, "ibm,my-drc-index", &my_index); if (rc) continue; if (my_index == drc_index) break; } return dn; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
int dlpar_cpu(struct pseries_hp_errorlog *hp_elog) { u32 drc_index; int rc; drc_index = hp_elog->_drc_u.drc_index; lock_device_hotplug(); switch (hp_elog->action) { case PSERIES_HP_ELOG_ACTION_REMOVE: if (hp_elog->id_type == PSERIES_HP_ELOG_ID_DRC_INDEX) { rc = dlpar_cpu_remove_by_index(drc_ind...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-cpu.c
static ssize_t dlpar_cpu_release(const char *buf, size_t count) { struct device_node *dn; u32 drc_index; int rc; dn = of_find_node_by_path(buf); if (!dn) return -EINVAL; rc = of_property_read_u32(dn, "ibm,my-drc-index", &drc_index); if (rc) { of_node_put(dn); return -EINVAL; } rc = dlp...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
unsigned long pseries_memory_block_size(void) { struct device_node *np; u64 memblock_size = MIN_MEMORY_BLOCK_SIZE; struct resource r; np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); if (np) { int len; int size_cells; const __be32 *prop; size_cells = of_n_size_cells(np); ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
static struct property *dlpar_clone_property(struct property *prop, u32 prop_size) { struct property *new_prop; new_prop = kzalloc(sizeof(*new_prop), GFP_KERNEL); if (!new_prop) return NULL; new_prop->name = kstrdup(prop->name, GFP_KERNEL); new_prop->value =...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
static int pseries_remove_mem_node(struct device_node *np) { const __be32 *prop; unsigned long base; unsigned long lmb_size; int ret = -EINVAL; int addr_cells, size_cells; if (!of_node_is_type(np, "memory")) return 0; /* * Find the base address and size of the memblock */ prop = of_get_prope...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
static int dlpar_remove_lmb(struct drmem_lmb *lmb) { struct memory_block *mem_block; unsigned long block_sz; int rc; if (!lmb_is_removable(lmb)) return -EINVAL; mem_block = lmb_to_memblock(lmb); if (mem_block == NULL) return -EINVAL; rc = dlpar_offline_lmb(lmb); if (rc) { put_device(&mem_...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
static inline int pseries_remove_memblock(unsigned long base, unsigned long memblock_size) { return -EOPNOTSUPP; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
static int pseries_memory_notifier(struct notifier_block *nb, unsigned long action, void *data) { struct of_reconfig_data *rd = data; int err = 0; switch (action) { case OF_RECONFIG_ATTACH_NODE: err = pseries_add_mem_node(rd->dn); break; case OF_RECONFIG_DETACH_NOD...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hotplug-memory.c
static int __init pseries_memory_hotplug_init(void) { if (firmware_has_feature(FW_FEATURE_LPAR)) of_reconfig_notifier_register(&pseries_mem_nb); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/hvcserver.c
int hvcs_register_connection(uint32_t unit_address, uint32_t p_partition_ID, uint32_t p_unit_address) { long retval; retval = plpar_hcall_norets(H_REGISTER_VTERM, unit_address, p_partition_ID, p_unit_address); return hvcs_convert(retval); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static void ibmebus_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction, unsigned long attrs) { return; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static int ibmebus_dma_supported(struct device *dev, u64 mask) { return mask == DMA_BIT_MASK(64); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static u64 ibmebus_dma_get_required_mask(struct device *dev) { return DMA_BIT_MASK(64); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
void ibmebus_unregister_driver(struct platform_driver *drv) { driver_unregister(&drv->driver); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
int ibmebus_request_irq(u32 ist, irq_handler_t handler, unsigned long irq_flags, const char *devname, void *dev_id) { unsigned int irq = irq_create_mapping(NULL, ist); if (!irq) return -EINVAL; return request_irq(irq, handler, irq_flags, devname, dev_id); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static int ibmebus_bus_bus_match(struct device *dev, struct device_driver *drv) { const struct of_device_id *matches = drv->of_match_table; if (!matches) return 0; return of_match_device(matches, dev) != NULL; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static int ibmebus_bus_device_probe(struct device *dev) { int error = -ENODEV; struct platform_driver *drv; struct platform_device *of_dev; drv = to_platform_driver(dev->driver); of_dev = to_platform_device(dev); if (!drv->probe) return error; get_device(dev); if (of_driver_match_device(dev, de...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static ssize_t devspec_show(struct device *dev, struct device_attribute *attr, char *buf) { struct platform_device *ofdev; ofdev = to_platform_device(dev); return sprintf(buf, "%pOF\n", ofdev->dev.of_node); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static ssize_t name_show(struct device *dev, struct device_attribute *attr, char *buf) { struct platform_device *ofdev; ofdev = to_platform_device(dev); return sprintf(buf, "%pOFn\n", ofdev->dev.of_node); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ibmebus.c
static int __init ibmebus_bus_init(void) { int err; printk(KERN_INFO "IBM eBus Device Driver\n"); err = bus_register(&ibmebus_bus_type); if (err) { printk(KERN_ERR "%s: failed to register IBM eBus.\n", __func__); return err; } err = device_register(&ibmebus_bus_device); if (err) { printk(K...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages) { __be64 *tcep; tcep = ((__be64 *)tbl->it_base) + index; while (npages--) *(tcep++) = 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static int tce_exchange_pseries(struct iommu_table *tbl, long index, unsigned long *tce, enum dma_data_direction *direction) { long rc; unsigned long ioba = (unsigned long)index << tbl->it_page_shift; unsigned long flags, oldtce = 0; u64 proto_tce ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static int __init disable_ddw_setup(char *str) { disable_ddw = 1; printk(KERN_INFO "ppc iommu: disabling ddw.\n"); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static void clean_dma_window(struct device_node *np, struct dynamic_dma_window_prop *dwp) { int ret; ret = tce_clearrange_multi_pSeriesLP( 0, 1ULL << (be32_to_cpu(dwp->window_shift) - PAGE_SHIFT), dwp); if (ret) pr_warn("%pOF failed to clear tces in window.\n", np); else...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static void find_existing_ddw_windows_named(const char *name) { int len; struct device_node *pdn; struct dma_win *window; const struct dynamic_dma_window_prop *dma64; for_each_node_with_property(pdn, name) { dma64 = of_get_property(pdn, name, &len); if (!dma64 || len < sizeof(*dma64)) { remove...
[ 1, 0 ]