Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static int find_existing_ddw_windows(void) { if (!firmware_has_feature(FW_FEATURE_LPAR)) return 0; find_existing_ddw_windows_named(DIRECT64_PROPNAME); find_existing_ddw_windows_named(DMA64_PROPNAME); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action, void *data) { struct dma_win *window; struct memory_notify *arg = data; int ret = 0; switch (action) { case MEM_GOING_ONLINE: spin_lock(&dma_win_list_lock); list_for_each_entry(window, &dma_wi...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static int __init disable_multitce(char *str) { if (strcmp(str, "off") == 0 && firmware_has_feature(FW_FEATURE_LPAR) && (firmware_has_feature(FW_FEATURE_PUT_TCE_IND) || firmware_has_feature(FW_FEATURE_STUFF_TCE))) { printk(KERN_INFO "Disabling MULTITCE firmware feature\n"); powerpc_firmware_feat...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/iommu.c
static int __init tce_iommu_bus_notifier_init(void) { bus_register_notifier(&pci_bus_type, &tce_iommu_bus_nb); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/io_event_irq.c
static struct pseries_io_event *ioei_find_event(struct rtas_error_log *elog) { struct pseries_errorlog *sect; if (unlikely(rtas_error_type(elog) != RTAS_TYPE_IO)) { printk_once(KERN_WARNING "io_event_irq: Unexpected event type %d", rtas_error_type(elog)); return NULL; } sect = get_pser...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/io_event_irq.c
static int __init ioei_init(void) { struct device_node *np; ioei_check_exception_token = rtas_token("check-exception"); if (ioei_check_exception_token == RTAS_UNKNOWN_SERVICE) return -ENODEV; np = of_find_node_by_path("/event-sources/ibm,io-events"); if (np) { request_event_sources_irqs(np, ioei_in...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/kexec.c
void pseries_kexec_cpu_down(int crash_shutdown, int secondary) { /* * Don't risk a hypervisor call if we're crashing * XXX: Why? The hypervisor is not crashing. It might be better * to at least attempt unregister to avoid the hypervisor stepping * on our memory. */ if (firmware_has_feature(FW_FEATURE...
[ 0, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/kexec.c
void pseries_machine_kexec(struct kimage *image) { if (firmware_has_feature(FW_FEATURE_SET_MODE)) pseries_disable_reloc_on_exc(); default_machine_kexec(image); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static __be32 *get_pcpu_associativity(int cpu) { return __get_cpu_associativity(cpu, pcpu_associativity, VPHN_FLAG_PCPU); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static __be32 *get_vcpu_associativity(int cpu) { return __get_cpu_associativity(cpu, vcpu_associativity, VPHN_FLAG_VCPU); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static int dtl_worker_online(unsigned int cpu) { struct dtl_worker *d = &per_cpu(dtl_workers, cpu); memset(d, 0, sizeof(*d)); INIT_DELAYED_WORK(&d->work, process_dtl_buffer); d->cpu = cpu; #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE per_cpu(dtl_entry_ridx, cpu) = 0; register_dtl_buffer(cpu); #else per_cp...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static ssize_t vcpudispatch_stats_write(struct file *file, const char __user *p, size_t count, loff_t *ppos) { unsigned long time_limit = jiffies + HZ; struct vcpu_dispatch_data *disp; int rc, cmd, cpu; char buf[16]; if (count > 15) return -EINVAL; if (copy_fro...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static ssize_t vcpudispatch_stats_freq_write(struct file *file, const char __user *p, size_t count, loff_t *ppos) { int rc, freq; char buf[16]; if (count > 15) return -EINVAL; if (copy_from_user(buf, p, count)) ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
void vpa_init(int cpu) { int hwcpu = get_hard_smp_processor_id(cpu); unsigned long addr; long ret; WARN_ON(cpu != smp_processor_id()); if (cpu_has_feature(CPU_FTR_ALTIVEC)) lppaca_of(cpu).vmxregs_in_use = 1; if (cpu_has_feature(CPU_FTR_ARCH_207S)) lppaca_of(cpu).ebb_regs_in_use = 1; addr = __p...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static int __init pseries_lpar_register_process_table( unsigned long base, unsigned long page_size, unsigned long table_size) { long rc; unsigned long flags = 0; if (table_size) flags |= PROC_TABLE_NEW; if (radix_enabled()) { flags |= PROC_TABLE_RADIX; if (mmu_has_feature(MMU_FTR_GTSE)) ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static notrace void manual_hpte_clear_all(void) { unsigned long size_bytes = 1UL << ppc64_pft_size; unsigned long hpte_count = size_bytes >> 4; struct { unsigned long pteh; unsigned long ptel; } ptes[4]; long lpar_rc; unsigned long i, j; for (i = 0; i < hpte_count; i += 4) { lpar_rc = plpar_p...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long vpn, int psize, int apsize, int ssize, int local) { unsigned long want_v; unsigned long lpar_rc; unsigned long dummy1, dummy2; pr_devel(" inval : slot=...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static void hugepage_bulk_invalidate(unsigned long *slot, unsigned long *vpn, int count, int psize, int ssize) { unsigned long param[PLPAR_HCALL9_BUFSIZE]; int i = 0, pix = 0, rc; for (i = 0; i < count; i++) { if (!firmware_has_feature(FW_FEATURE_BULK_REMOVE)) { p...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static void pSeries_lpar_hugepage_invalidate(unsigned long vsid, unsigned long addr, unsigned char *hpte_slot_array, int psize, int ssize, int local) { int i, index = 0; unsigned lo...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static void do_block_remove(unsigned long number, struct ppc64_tlb_batch *batch, unsigned long *param) { unsigned long vpn; unsigned long i, pix = 0; unsigned long index, shift, slot, current_vpgb, vpgb; real_pte_t pte; int psize, ssize; psize = batch->psize; ssize = batch->ss...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
void __init radix_init_pseries(void) { pr_info("Using radix MMU under hypervisor\n"); pseries_lpar_register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12); } #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
void arch_free_page(struct page *page, int order) { if (radix_enabled()) return; if (!cmo_free_hint_flag || !firmware_has_feature(FW_FEATURE_CMO)) return; pSeries_set_page_state(page, order, H_PAGE_SET_UNUSED); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
notrace void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf) { unsigned long flags; unsigned int *depth; local_irq_save(flags); depth = this_cpu_ptr(&hcall_trace_depth); if (*depth) goto out; (*depth)++; trace_hcall_exit(opcode, retval, retbuf); ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
int h_get_mpp(struct hvcall_mpp_data *mpp_data) { int rc; unsigned long retbuf[PLPAR_HCALL9_BUFSIZE]; rc = plpar_hcall9(H_GET_MPP, retbuf); mpp_data->entitled_mem = retbuf[0]; mpp_data->mapped_mem = retbuf[1]; mpp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff; mpp_data->pool_num = retbuf[2] & 0xffff;...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static unsigned long __init vsid_unscramble(unsigned long vsid, int ssize) { unsigned long protovsid; unsigned long va_bits = VA_BITS; unsigned long modinv, vsid_modulus; unsigned long max_mod_inv, tmp_modinv; if (!mmu_has_feature(MMU_FTR_68_BIT_VA)) va_bits = 65; if (ssize == MMU_SEGSIZE_256M) { ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lpar.c
static int __init vpa_debugfs_init(void) { char name[16]; long i; struct dentry *vpa_dir; if (!firmware_has_feature(FW_FEATURE_SPLPAR)) return 0; vpa_dir = debugfs_create_dir("vpa", arch_debugfs_dir); for_each_possible_cpu(i) { sprintf(name, "cpu-%ld", i); debugfs_create_file(name, 0400, vpa_...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static int read_dt_lpar_name(struct seq_file *m) { const char *name; if (of_property_read_string(of_root, "ibm,partition-name", &name)) return -ENOENT; seq_printf(m, "partition_name=%s\n", name); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static int lparcfg_count_active_processors(void) { struct device_node *cpus_dn; int count = 0; for_each_node_by_type(cpus_dn, "cpu") { #ifdef LPARCFG_DEBUG printk(KERN_ERR "cpus_dn %p\n", cpus_dn); #endif count++; } return count; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static void pseries_cmo_data(struct seq_file *m) { int cpu; unsigned long cmo_faults = 0; unsigned long cmo_fault_time = 0; seq_printf(m, "cmo_enabled=%d\n", firmware_has_feature(FW_FEATURE_CMO)); if (!firmware_has_feature(FW_FEATURE_CMO)) return; for_each_possible_cpu(cpu) { cmo_faults += be64_...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static void parse_em_data(struct seq_file *m) { unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; if (firmware_has_feature(FW_FEATURE_LPAR) && plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static ssize_t update_ppp(u64 *entitlement, u8 *weight) { struct hvcall_ppp_data ppp_data; u8 new_weight; u64 new_entitled; ssize_t retval; retval = h_get_ppp(&ppp_data); if (retval) return retval; if (entitlement) { new_weight = ppp_data.weight; new_entitled = *entitlement; } else if (wei...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static ssize_t update_mpp(u64 *entitlement, u8 *weight) { struct hvcall_mpp_data mpp_data; u64 new_entitled; u8 new_weight; ssize_t rc; if (entitlement) { rc = vio_cmo_entitlement_update(*entitlement); if (rc) return rc; } rc = h_get_mpp(&mpp_data); if (rc) return rc; if (entitle...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/lparcfg.c
static int lparcfg_data(struct seq_file *m, void *v) { struct device_node *rootdn; const char *model = ""; const char *system_id = ""; const char *tmp; const __be32 *lp_index_ptr; unsigned int lp_index = 0; seq_printf(m, "%s %s\n", MODULE_NAME, MODULE_VERS); rootdn = of_find_node_by_path("/"); if (...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static int __init register_nmi_wd_lpm_factor_sysctl(void) { register_sysctl_table(nmi_wd_lpm_factor_sysctl_root); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static int delete_dt_node(struct device_node *dn) { struct device_node *pdn; bool is_platfac; pdn = of_get_parent(dn); is_platfac = of_node_is_type(dn, "ibm,platform-facilities") || of_node_is_type(pdn, "ibm,platform-facilities"); of_node_put(pdn); if (is_platfac) { pr_notice("ignoring ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
void post_mobility_fixup(void) { int rc; rtas_activate_firmware(); cpus_read_lock(); /* * It's common for the destination firmware to replace cache * nodes. Release all of the cacheinfo hierarchy's references * before updating the device tree. */ cacheinfo_teardown(); rc = pseries_devicetre...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static int poll_vasi_state(u64 handle, unsigned long *res) { unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; long hvrc; int ret; hvrc = plpar_hcall(H_VASI_STATE, retbuf, handle); switch (hvrc) { case H_SUCCESS: ret = 0; *res = retbuf[0]; break; case H_PARAMETER: ret = -EINVAL; break; ca...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static int do_join(void *arg) { struct pseries_suspend_info *info = arg; atomic_t *counter = &info->counter; long hvrc; int ret; retry: hard_irq_disable(); hvrc = plpar_hcall_norets(H_JOIN); switch (hvrc) { case H_CONTINUE: /* * All other CPUs are offline or in H_JOIN. This CPU * attemp...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static void pseries_cancel_migration(u64 handle, int err) { u32 reason_code; u32 detail; u8 entity; long hvrc; entity = MIGRATING_PARTITION; detail = abs(err) & 0xffffff; reason_code = (entity << 24) | detail; hvrc = plpar_hcall_norets(H_VASI_SIGNAL, handle, H_VASI_SIGNAL_CANCEL, ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static int pseries_suspend(u64 handle) { const unsigned int max_attempts = 5; unsigned int retry_interval_ms = 1; unsigned int attempt = 1; int ret; while (true) { struct pseries_suspend_info info; unsigned long vasi_state; int vasi_err; info = (struct pseries_suspend_info){ .counter...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/mobility.c
static int __init mobility_sysfs_init(void) { int rc; mobility_kobj = kobject_create_and_add("mobility", kernel_kobj); if (!mobility_kobj) return -ENOMEM; rc = sysfs_create_file(mobility_kobj, &class_attr_migration.attr); if (rc) pr_err("unable to create migration sysfs file (%d)\n", rc); rc = s...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/msi.c
static int rtas_query_irq_number(struct pci_dn *pdn, int offset) { u32 addr, rtas_ret[2]; unsigned long buid; int rc; addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); buid = pdn->phb->buid; do { rc = rtas_call(query_token, 4, 3, rtas_ret, addr, BUID_HI(buid), BUID_LO(buid), offs...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/msi.c
static int check_req_msi(struct pci_dev *pdev, int nvec) { return check_req(pdev, nvec, "ibm,req#msi"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/msi.c
static int check_req_msix(struct pci_dev *pdev, int nvec) { return check_req(pdev, nvec, "ibm,req#msi-x"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/msi.c
static int msi_quota_for_device(struct pci_dev *dev, int request) { struct device_node *pe_dn; struct msi_counts counts; int total; pr_debug("rtas_msi: calc quota for %s, request %d\n", pci_name(dev), request); pe_dn = find_pe_total_msi(dev, &total); if (!pe_dn) pe_dn = find_pe_dn(dev, &total); if ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/msi.c
static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev, int nvec, msi_alloc_info_t *arg) { struct pci_dev *pdev = to_pci_dev(dev); int type = pdev->msix_enabled ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI; return rtas_prepare...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/msi.c
static int pseries_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs, void *arg) { struct pci_controller *phb = domain->host_data; msi_alloc_info_t *info = arg; struct msi_desc *desc = info->desc; struct pc...
[ 0, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/nvram.c
int nvram_clear_error_log(void) { loff_t tmp_index; int clear_word = ERR_FLAG_ALREADY_LOGGED; int rc; if (rtas_log_partition.index == -1) return -1; tmp_index = rtas_log_partition.index; rc = ppc_md.nvram_write((char *)&clear_word, sizeof(int), &tmp_index); if (rc <= 0) { printk(KERN_ERR "nvram...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/nvram.c
int clobbering_unread_rtas_event(void) { return (oops_log_partition.index == rtas_log_partition.index && last_unread_rtas_event && ktime_get_real_seconds() - last_unread_rtas_event <= NVRAM_RTAS_READ_TIMEOUT); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/nvram.c
static int __init pseries_nvram_init_log_partitions(void) { int rc; nvram_scan_partitions(); rc = nvram_init_os_partition(&rtas_log_partition); nvram_init_oops_partition(rc == 0); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/nvram.c
int __init pSeries_nvram_init(void) { struct device_node *nvram; const __be32 *nbytes_p; unsigned int proplen; nvram = of_find_node_by_type(NULL, "nvram"); if (nvram == NULL) return -ENODEV; nbytes_p = of_get_property(nvram, "#bytes", &proplen); if (nbytes_p == NULL || proplen != sizeof(unsigned in...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_platform_attributes.c
static int papr_get_attr(u64 id, struct energy_scale_attribute *esi) { int esi_buf_size = ESI_HDR_SIZE + (CURR_MAX_ESI_ATTRS * ESI_ATTR_SIZE); int ret, max_esi_attrs = CURR_MAX_ESI_ATTRS; struct energy_scale_attribute *curr_esi; struct h_energy_scale_info_hdr *hdr; char *buf; buf = kmalloc(esi_buf_size, GF...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_platform_attributes.c
static ssize_t desc_show(struct kobject *kobj, struct kobj_attribute *kobj_attr, char *buf) { struct papr_attr *pattr = container_of(kobj_attr, struct papr_attr, kobj_attr); struct energy_scale_attribute esi; int ret; ret = papr_get_attr(pattr->id, &esi); if (ret) return re...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_platform_attributes.c
static ssize_t val_desc_show(struct kobject *kobj, struct kobj_attribute *kobj_attr, char *buf) { struct papr_attr *pattr = container_of(kobj_attr, struct papr_attr, kobj_attr); struct energy_scale_attribute esi; int ret; ret = papr_get_attr(pattr->id, &esi); if (ret) r...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int papr_scm_pmu_get_value(struct perf_event *event, struct device *dev, u64 *count) { struct papr_scm_perf_stat *stat; struct papr_scm_perf_stats *stats; struct papr_scm_priv *p = dev_get_drvdata(dev); int rc, size; if (event->attr.config == 0 || event->attr.co...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static void papr_scm_pmu_del(struct perf_event *event, int flags) { papr_scm_pmu_read(event); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static void papr_scm_pmu_register(struct papr_scm_priv *p) {}
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int __drc_pmem_query_health(struct papr_scm_priv *p) { unsigned long ret[PLPAR_HCALL_BUFSIZE]; u64 bitmap = 0; long rc; rc = plpar_hcall(H_SCM_HEALTH, ret, p->drc_index); if (rc == H_SUCCESS) bitmap = ret[0] & ret[1]; else if (rc == H_FUNCTION) dev_info_once( &p->pdev->dev, "...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int papr_scm_meta_get(struct papr_scm_priv *p, struct nd_cmd_get_config_data_hdr *hdr) { unsigned long data[PLPAR_HCALL_BUFSIZE]; unsigned long offset, data_offset; int len, read; int64_t ret; if ((hdr->in_offset + hdr->in_length) > p->metadata_size) return -EINVAL; ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int is_cmd_valid(struct nvdimm *nvdimm, unsigned int cmd, void *buf, unsigned int buf_len) { unsigned long cmd_mask = PAPR_SCM_DIMM_CMD_MASK; struct nd_cmd_pkg *nd_cmd; struct papr_scm_priv *p; enum papr_pdsm pdsm; if (!nvdimm) return -EINVAL; /* get the provider data fr...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int papr_pdsm_dsc(struct papr_scm_priv *p, union nd_pdsm_payload *payload) { payload->health.extension_flags |= PDSM_DIMM_DSC_VALID; payload->health.dimm_dsc = p->dirty_shutdown_counter; return sizeof(struct nd_papr_pdsm_health); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int papr_pdsm_smart_inject(struct papr_scm_priv *p, union nd_pdsm_payload *payload) { int rc; u32 supported_flags = 0; u64 inject_mask = 0, clear_mask = 0; u64 mask; if (payload->smart_inject.flags & PDSM_SMART_INJECT_HEALTH_FATAL) { supported_flags |= PDSM_SMART_...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int papr_scm_ndctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc) { struct nd_cmd_get_config_size *get_size_hdr; struct nd_cmd_pkg *call_pkg = NULL; struct papr_scm_priv *p; ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static ssize_t dirty_shutdown_show(struct device *dev, struct device_attribute *attr, char *buf) { struct nvdimm *dimm = to_nvdimm(dev); struct papr_scm_priv *p = nvdimm_provider_data(dimm); return sysfs_emit(buf, "%llu\n", p->dirty_shutdown_counter); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static int __init papr_scm_init(void) { int ret; ret = platform_driver_register(&papr_scm_driver); if (!ret) mce_register_notifier(&mce_ue_nb); return ret; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/papr_scm.c
static void __exit papr_scm_exit(void) { mce_unregister_notifier(&mce_ue_nb); platform_driver_unregister(&papr_scm_driver); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pci.c
static int pseries_send_map_pe(struct pci_dev *pdev, u16 num_vfs, struct pe_map_bar_entry *vf_pe_array) { struct pci_dn *pdn; int rc; unsigned long buid, addr; int ibm_map_pes = rtas_token("ibm,open-sriov-map-pe-number"); if (ibm_map_pes == RTAS_UNKNOWN_SERVICE) return -EI...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pci.c
static int pseries_pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs) { add_sriov_vf_pdns(pdev); return pseries_pci_sriov_enable(pdev, num_vfs); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pci.c
static void __init pSeries_request_regions(void) { if (!isa_io_base) return; request_region(0x20, 0x20, "pic1"); request_region(0xa0, 0x20, "pic2"); request_region(0x00, 0x20, "dma1"); request_region(0x40, 0x20, "timer"); request_region(0x80, 0x10, "dma page reg"); request_region(0xc0, 0x20, "dma2")...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pci.c
static void fixup_winbond_82c105(struct pci_dev *dev) { int i; unsigned int reg; if (!machine_is(pseries)) return; printk("Using INTC for W82c105 IDE controller.\n"); pci_read_config_dword(dev, 0x40, &reg); pci_write_config_dword(dev, 0x40, reg | (1 << 11)); for (i = 0; i < DEVICE_COUNT_RESOURCE; ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/plpks.c
int plpks_read_os_var(struct plpks_var *var) { return plpks_read_var(PKS_OS_OWNER, var); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/plpks.c
static __init int pseries_plpks_init(void) { int rc; rc = _plpks_get_config(); if (rc) { pr_err("POWER LPAR Platform KeyStore is not supported or enabled\n"); return rc; } rc = plpks_gen_password(); if (rc) pr_err("Failed setting POWER LPAR Platform KeyStore Password\n"); else pr_info(...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pseries.h
static inline int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog) { return -EOPNOTSUPP; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pseries_energy.c
static ssize_t get_best_energy_list(char *page, int activate) { int rc, cnt, i, cpu; unsigned long retbuf[PLPAR_HCALL9_BUFSIZE]; unsigned long flags = 0; u32 *buf_page; char *s = page; buf_page = (u32 *)get_zeroed_page(GFP_KERNEL); if (!buf_page) return -ENOMEM; flags = FLAGS_MODE1; if (activate...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pseries_energy.c
static ssize_t cpu_deactivate_hint_list_show(struct device *dev, struct device_attribute *attr, char *page) { return get_best_energy_list(page, 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/pseries_energy.c
static int __init pseries_energy_init(void) { int cpu, err; struct device *cpu_dev; if (!firmware_has_feature(FW_FEATURE_BEST_ENERGY)) return 0; /* Create the sysfs files */ err = device_create_file(cpu_subsys.dev_root, &attr_cpu_activate_hint_list); if (!err) err = device_create_file(cpu_...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
static int __init init_ras_IRQ(void) { struct device_node *np; ras_check_exception_token = rtas_token("check-exception"); np = of_find_node_by_path("/event-sources/internal-errors"); if (np != NULL) { request_event_sources_irqs(np, ras_error_interrupt, "RAS_ERROR"); of_node_put(np); } /* EPOW Eve...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
static void rtas_parse_epow_errlog(struct rtas_error_log *log) { struct pseries_errorlog *pseries_log; struct epow_errorlog *epow_log; char action_code; char modifier; pseries_log = get_pseries_errorlog(log, PSERIES_ELOG_SECT_ID_EPOW); if (pseries_log == NULL) return; epow_log = (struct epow_errorlo...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
static irqreturn_t ras_hotplug_interrupt(int irq, void *dev_id) { struct pseries_errorlog *pseries_log; struct pseries_hp_errorlog *hp_elog; spin_lock(&ras_log_buf_lock); rtas_call(ras_check_exception_token, 6, 1, NULL, RTAS_VECTOR_EXTERNAL_INTERRUPT, virq_to_hw(irq), RTAS_HOTPLUG_EVEN...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
static inline struct rtas_error_log *fwnmi_get_errlog(void) { return (struct rtas_error_log *)local_paca->mce_data_buf; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
static __be64 *fwnmi_get_savep(struct pt_regs *regs) { unsigned long savep_ra; savep_ra = regs->gpr[3] & ~(0x3UL << 62); if (!VALID_FWNMI_BUFFER(savep_ra)) { printk(KERN_ERR "FWNMI: corrupt r3 0x%016lx\n", regs->gpr[3]); return NULL; } return __va(savep_ra); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
static int recover_mce(struct pt_regs *regs, struct machine_check_event *evt) { int recovered = 0; if (regs_is_unrecoverable(regs)) { pr_err("Machine check interrupt unrecoverable: MSR(RI=0)\n"); recovered = 0; } else if (evt->disposition == MCE_DISPOSITION_RECOVERED) { /* Platform corrected itself ...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/ras.c
long pseries_machine_check_realmode(struct pt_regs *regs) { struct rtas_error_log *errp; int disposition; if (fwnmi_active) { errp = fwnmi_get_errinfo(regs); disposition = mce_handle_error(regs, errp); fwnmi_release_errinfo(); if (disposition == RTAS_DISP_FULLY_RECOVERED) return 1; } ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/reconfig.c
static char *parse_node(char *buf, size_t bufsize, struct device_node **npp) { char *handle_str; phandle handle; *npp = NULL; handle_str = buf; buf = strchr(buf, ' '); if (!buf) return NULL; *buf = '\0'; buf++; handle = simple_strtoul(handle_str, NULL, 0); *npp = of_find_node_by_phandle(han...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/reconfig.c
static int do_update_property(char *buf, size_t bufsize) { struct device_node *np; unsigned char *value; char *name, *end, *next_prop; int length; struct property *newprop; buf = parse_node(buf, bufsize, &np); end = buf + bufsize; if (!np) return -ENODEV; next_prop = parse_next_property(buf, en...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/reconfig.c
static int proc_ppc64_create_ofdt(void) { struct proc_dir_entry *ent; ent = proc_create("powerpc/ofdt", 0200, NULL, &ofdt_proc_ops); if (ent) proc_set_size(ent, 0); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/rng.c
static int pseries_get_random_long(unsigned long *v) { unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; if (plpar_hcall(H_RANDOM, retbuf) == H_SUCCESS) { *v = retbuf[0]; return 1; } return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/rtas-fadump.c
static void rtas_fadump_update_config(struct fw_dump *fadump_conf, const struct rtas_fadump_mem_struct *fdm) { fadump_conf->boot_mem_dest_addr = be64_to_cpu(fdm->rmr_region.destination_address); fadump_conf->fadumphdr_addr = (fadump_conf->boot_mem_dest_addr + fadump_conf->boo...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/rtas-fadump.c
static int rtas_fadump_register(struct fw_dump *fadump_conf) { unsigned int wait_time; int rc, err = -EIO; /* TODO: Add upper time limit for the delay */ do { rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1, NULL, FADUMP_REGISTER, &fdm, sizeof(struct rtas_fadump_mem_st...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/rtas-fadump.c
static int rtas_fadump_invalidate(struct fw_dump *fadump_conf) { unsigned int wait_time; int rc; /* TODO: Add upper time limit for the delay */ do { rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1, NULL, FADUMP_INVALIDATE, fdm_active, sizeof(struct rtas_fad...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/pseries/rtas-fadump.c
static void rtas_fadump_region_show(struct fw_dump *fadump_conf, struct seq_file *m) { const struct rtas_fadump_section *cpu_data_section; const struct rtas_fadump_mem_struct *fdm_ptr; if (fdm_active) fdm_ptr = fdm_active; else fdm_ptr = &fdm; cpu_data_section = &...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static void __init pseries_setup_i8259_cascade(void) { struct device_node *np, *old, *found = NULL; unsigned int cascade; const u32 *addrp; unsigned long intack = 0; int naddr; for_each_node_by_type(np, "interrupt-controller") { if (of_device_is_compatible(np, "chrp,iic")) { found = np; br...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *data) { struct of_reconfig_data *rd = data; struct device_node *parent, *np = rd->dn; struct pci_dn *pdn; int err = NOTIFY_OK; switch (action) { case OF_RECONFIG_ATTACH_NODE: ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static void pseries_lpar_idle(void) { if (!prep_irq_for_idle()) return; /* Indicate to hypervisor that we are idle. */ pseries_idle_prolog(); /* * Yield the processor to the hypervisor. We return if * an external interrupt occurs (which are driven prior * to returning here) or if a prod occurs ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
void __init pseries_little_endian_exceptions(void) { long rc; while (1) { rc = enable_little_endian_exceptions(); if (!H_IS_LONG_BUSY(rc)) break; mdelay(get_longbusy_msecs(rc)); } if (rc) { ppc_md.progress("H_SET_MODE LE exception fail", 0); panic("Could not enable little endian exce...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static resource_size_t pseries_get_iov_fw_value(struct pci_dev *dev, int resno, enum get_iov_fw_value_index value) { const int *indexes; struct device_node *dn = pci_device_to_OF_node(dev); int i, num_res, ret = 0; indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); if...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static int pseries_set_xdabr(unsigned long dabr, unsigned long dabrx) { if (dabrx == 0 && dabr == 0) dabrx = DABRX_USER; /* PAPR says we can only set kernel and user bits */ dabrx &= DABRX_KERNEL | DABRX_USER; return plpar_hcall_norets(H_SET_XDABR, dabr, dabrx); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static void __init pseries_add_hw_description(void) { struct device_node *dn; const char *s; dn = of_find_node_by_path("/openprom"); if (dn) { if (of_property_read_string(dn, "model", &s) == 0) seq_buf_printf(&ppc_hw_desc, "of:%s ", s); of_node_put(dn); } dn = of_find_node_by_path("/hyperv...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static void __init pseries_init(void) { pr_debug(" -> pseries_init()\n"); pseries_add_hw_description(); #ifdef CONFIG_HVC_CONSOLE if (firmware_has_feature(FW_FEATURE_LPAR)) hvc_vio_init_early(); #endif if (firmware_has_feature(FW_FEATURE_XDABR)) ppc_md.set_dabr = pseries_set_xdabr; else if (firmware...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/pseries/setup.c
static int pSeries_pci_probe_mode(struct pci_bus *bus) { if (firmware_has_feature(FW_FEATURE_LPAR)) return PCI_PROBE_DEVTREE; return PCI_PROBE_NORMAL; }
[ 0, 0 ]