Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
Function
large_stringlengths
11
3.45k
Label
list
Chromium
third_party/libwebp/src/dsp/enc_mips_dsp_r2.c
static void Intra16Preds_MIPSdspR2(uint8_t *dst, const uint8_t *left, const uint8_t *top) { DCMode16(I16DC16 + dst, left, top); VerticalPred16(I16VE16 + dst, top); HorizontalPred16(I16HE16 + dst, left); TrueMotion16(I16TM16 + dst, left, top); }
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_mips_dsp_r2.c
static int SSE16x8_MIPSdspR2(const uint8_t *a, const uint8_t *b) { int count; int temp0, temp1, temp2, temp3; __asm__ volatile( "mult $zero, $zero \n\t" GET_SSE( 0 * BPS, 4 + 0 * BPS, 8 + 0 * BPS, 12 + 0 * BPS) GET_SSE(1 * BPS, 4 + 1 * BPS, 8 + 1 * BPS, 1...
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_mips_dsp_r2.c
static int SSE8x8_MIPSdspR2(const uint8_t *a, const uint8_t *b) { int count; int temp0, temp1, temp2, temp3; __asm__ volatile( "mult $zero, $zero \n\t" GET_SSE( 0 * BPS, 4 + 0 * BPS, 1 * BPS, 4 + 1 * BPS) GET_SSE(2 * BPS, 4 + 2 * BPS, 3 * BPS, 4 + 3 * BPS...
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_mips_dsp_r2.c
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitMIPSdspR2(void) { VP8FTransform = FTransform_MIPSdspR2; VP8FTransformWHT = FTransformWHT_MIPSdspR2; VP8ITransform = ITransform_MIPSdspR2; VP8TDisto4x4 = Disto4x4_MIPSdspR2; VP8TDisto16x16 = Disto16x16_MIPSdspR2; VP8EncPredLuma16 = Intra16Preds_MIPSdspR2; VP8En...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static void CollectHistogram_MSA(const uint8_t *ref, const uint8_t *pred, int start_block, int end_block, VP8Histogram *const histo) { int j; int distribution[MAX_COEFF_THRESH + 1] = {0}; for (j = start_block; j < end_block; ++j) { int16_t out[...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static WEBP_INLINE void HE4(uint8_t *dst, const uint8_t *top) { const int X = top[-1]; const int I = top[-2]; const int J = top[-3]; const int K = top[-4]; const int L = top[-5]; WebPUint32ToMem(dst + 0 * BPS, 0x01010101U * AVG3(X, I, J)); WebPUint32ToMem(dst + 1 * BPS, 0x01010101U * AVG3(I, J, K)); Web...
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static WEBP_INLINE void VR4(uint8_t *dst, const uint8_t *top) { const int X = top[-1]; const int I = top[-2]; const int J = top[-3]; const int K = top[-4]; const int A = top[0]; const int B = top[1]; const int C = top[2]; const int D = top[3]; DST(0, 0) = DST(1, 2) = AVG2(X, A); DST(1, 0) = DST(2, ...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static WEBP_INLINE void HD4(uint8_t *dst, const uint8_t *top) { const int X = top[-1]; const int I = top[-2]; const int J = top[-3]; const int K = top[-4]; const int L = top[-5]; const int A = top[0]; const int B = top[1]; const int C = top[2]; DST(0, 0) = DST(2, 1) = AVG2(I, X); DST(0, 1) = DST(2,...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static WEBP_INLINE void VerticalPred8x8(uint8_t *dst, const uint8_t *top) { if (top != NULL) { const uint64_t out = LD(top); STORE8x8(out, dst); } else { const uint64_t out = 0x7f7f7f7f7f7f7f7fULL; STORE8x8(out, dst); } }
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static WEBP_INLINE void DCMode8x8(uint8_t *dst, const uint8_t *left, const uint8_t *top) { uint64_t out; v16u8 src = {0}; if (top != NULL && left != NULL) { const uint64_t left_m = LD(left); const uint64_t top_m = LD(top); INSERT_D2_UB(left_m, top_m, src); CALC_DC...
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static int SSE16x8_MSA(const uint8_t *a, const uint8_t *b) { uint32_t sum; v16u8 src0, src1, src2, src3, src4, src5, src6, src7; v16u8 ref0, ref1, ref2, ref3, ref4, ref5, ref6, ref7; v4i32 out0, out1, out2, out3; LD_UB8(a, BPS, src0, src1, src2, src3, src4, src5, src6, src7); LD_UB8(b, BPS, ref0, ref1, re...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_msa.c
static int Quantize2Blocks_MSA(int16_t in[32], int16_t out[32], const VP8Matrix *const mtx) { int nz; nz = VP8EncQuantizeBlock(in + 0 * 16, out + 0 * 16, mtx) << 0; nz |= VP8EncQuantizeBlock(in + 1 * 16, out + 1 * 16, mtx) << 1; return nz; }
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
static uint8x16_t Load4x4_NEON(const uint8_t *src) { uint32x4_t out = vdupq_n_u32(0); out = vld1q_lane_u32((const uint32_t *)(src + 0 * BPS), out, 0); out = vld1q_lane_u32((const uint32_t *)(src + 1 * BPS), out, 1); out = vld1q_lane_u32((const uint32_t *)(src + 2 * BPS), out, 2); out = vld1q_lane_u32((const u...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
static WEBP_INLINE int16x8x4_t DistoVerticalPass_NEON(const uint8x8x4_t q4_in) { const int16x8_t q_a0 = vreinterpretq_s16_u16(vaddl_u8(q4_in.val[0], q4_in.val[2])); const int16x8_t q_a1 = vreinterpretq_s16_u16(vaddl_u8(q4_in.val[1], q4_in.val[3])); const int16x8_t q_a2 = vreinterpretq_s16_u16(v...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
static int Disto16x16_NEON(const uint8_t *const a, const uint8_t *const b, const uint16_t *const w) { int D = 0; int x, y; for (y = 0; y < 16 * BPS; y += 4 * BPS) { for (x = 0; x < 16; x += 4) { D += Disto4x4_NEON(a + x + y, b + x + y, w); } } return D; }
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
static void CollectHistogram_NEON(const uint8_t *ref, const uint8_t *pred, int start_block, int end_block, VP8Histogram *const histo) { const uint16x8_t max_coeff_thresh = vdupq_n_u16(MAX_COEFF_THRESH); int j; int distribution[MAX_COEFF_THRESH + ...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
static int SSE16x8_NEON(const uint8_t *a, const uint8_t *b) { uint32x4_t sum = vdupq_n_u32(0); int y; for (y = 0; y < 8; ++y) { AccumulateSSE16_NEON(a + y * BPS, b + y * BPS, &sum); } return SumToInt_NEON(sum); }
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
static int SSE4x4_NEON(const uint8_t *a, const uint8_t *b) { const uint8x16_t a0 = Load4x4_NEON(a); const uint8x16_t b0 = Load4x4_NEON(b); const uint8x16_t abs_diff = vabdq_u8(a0, b0); const uint16x8_t prod1 = vmull_u8(vget_low_u8(abs_diff), vget_low_u8(abs_diff)); const uint16x8_t prod2 = vmull_u...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_neon.c
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspInitNEON(void) { VP8ITransform = ITransform_NEON; VP8FTransform = FTransform_NEON; VP8FTransformWHT = FTransformWHT_NEON; VP8TDisto4x4 = Disto4x4_NEON; VP8TDisto16x16 = Disto16x16_NEON; VP8CollectHistogram = CollectHistogram_NEON; VP8SSE16x16 = SSE16x16_NEON; V...
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_sse2.c
static WEBP_INLINE void Fill_SSE2(uint8_t *dst, int value, int size) { if (size == 4) { int j; for (j = 0; j < 4; ++j) { memset(dst + j * BPS, value, 4); } } else if (size == 8) { Put8x8uv_SSE2(value, dst); } else { Put16_SSE2(value, dst); } }
[ 1, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_sse2.c
static WEBP_INLINE void VE8uv_SSE2(uint8_t *dst, const uint8_t *top) { int j; const __m128i top_values = _mm_loadl_epi64((const __m128i *)top); for (j = 0; j < 8; ++j) { _mm_storel_epi64((__m128i *)(dst + j * BPS), top_values); } }
[ 0, 0 ]
Chromium
third_party/libwebp/src/dsp/enc_sse2.c
static WEBP_INLINE void HE16_SSE2(uint8_t *dst, const uint8_t *left) { int j; for (j = 0; j < 16; ++j) { const __m128i values = _mm_set1_epi8(left[j]); _mm_store_si128((__m128i *)dst, values); dst += BPS; } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/crash_dump.c
void __init reserve_kdump_trampoline(void) { memblock_reserve(0, KDUMP_RESERVE_LIMIT); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/crash_dump.c
void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) { unsigned long addr; const __be32 *basep, *sizep; unsigned int rtas_start = 0, rtas_end = 0; basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); sizep = of_get_property(rtas.dev, "rtas-size", NULL); if (basep && sizep) { ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/dawr.c
static ssize_t dawr_write_file_bool(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct arch_hw_breakpoint null_brk = {0}; size_t rc; if (!dawr_force_enable && firmware_has_feature(FW_FEATURE_LPAR) && s...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dma-iommu.c
bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg, int nents) { struct scatterlist *s; int i; if (likely(!dev->bus_dma_limit)) return false; for_each_sg(sg, s, nents, i) { if (!is_direct_handle(dev, s->dma_address + s->length)) return false; ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dma-iommu.c
static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag, unsigned long attrs) { return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size, dma_handle, dev-...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dma-iommu.c
static void dma_iommu_unmap_page(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction, unsigned long attrs) { iommu_unmap_page(get_iommu_table_base(dev), dma_handle, size, direction, attrs); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dma-iommu.c
u64 dma_iommu_get_required_mask(struct device *dev) { struct iommu_table *tbl = get_iommu_table_base(dev); u64 mask; if (dev_is_pci(dev)) { u64 bypass_mask = dma_direct_get_required_mask(dev); if (dma_iommu_dma_supported(dev, bypass_mask)) { dev_info(dev, "%s: returning bypass mask 0x%llx\n", __f...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init feat_enable(struct dt_cpu_feature *f) { if (f->hv_support != HV_SUPPORT_NONE) { if (f->hfscr_bit_nr != -1) { u64 hfscr = mfspr(SPRN_HFSCR); hfscr |= 1UL << f->hfscr_bit_nr; mtspr(SPRN_HFSCR, hfscr); } } if (f->os_support != OS_SUPPORT_NONE) { if (f->fscr_bit_nr !=...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init feat_disable(struct dt_cpu_feature *f) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init feat_enable_pmu_power9(struct dt_cpu_feature *f) { hfscr_pmu_enable(); init_pmu_power9(); init_pmu_registers = init_pmu_power9; cur_cpu_spec->cpu_features |= CPU_FTR_MMCRA; cur_cpu_spec->cpu_user_features |= PPC_FEATURE_PSERIES_PERFMON_COMPAT; cur_cpu_spec->num_pmcs = 6; cur_cpu_spec...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static void init_pmu_power10(void) { init_pmu_power9(); mtspr(SPRN_MMCR3, 0); mtspr(SPRN_MMCRA, MMCRA_BHRB_DISABLE); mtspr(SPRN_MMCR0, MMCR0_FC | MMCR0_PMCCEXT); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init feat_enable_pmu_power10(struct dt_cpu_feature *f) { hfscr_pmu_enable(); init_pmu_power10(); init_pmu_registers = init_pmu_power10; cur_cpu_spec->cpu_features |= CPU_FTR_MMCRA; cur_cpu_spec->cpu_user_features |= PPC_FEATURE_PSERIES_PERFMON_COMPAT; cur_cpu_spec->num_pmcs = 6; cur_cpu_s...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init feat_enable_fp(struct dt_cpu_feature *f) { feat_enable(f); cur_cpu_spec->cpu_features &= ~CPU_FTR_FPU_UNAVAILABLE; return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init feat_enable_large_ci(struct dt_cpu_feature *f) { cur_cpu_spec->mmu_features |= MMU_FTR_CI_LARGE_PAGE; return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f) { const struct dt_cpu_feature_match *m; bool known = false; int i; for (i = 0; i < ARRAY_SIZE(dt_cpu_feature_match_table); i++) { m = &dt_cpu_feature_match_table[i]; if (!strcmp(f->name, m->name)) { known = true; if (...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init disabled_on_cmdline(void) { unsigned long root, chosen; const char *p; root = of_get_flat_dt_root(); chosen = of_get_flat_dt_subnode_by_name(root, "chosen"); if (chosen == -FDT_ERR_NOTFOUND) return false; p = of_get_flat_dt_prop(chosen, "bootargs", NULL); if (!p) return false;...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init fdt_find_cpu_features(unsigned long node, const char *uname, int depth, void *data) { if (of_flat_dt_is_compatible(node, "ibm,powerpc-cpu-features") && of_get_flat_dt_prop(node, "isa", NULL)) return 1; return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
bool __init dt_cpu_ftrs_init(void *fdt) { using_dt_cpu_ftrs = false; if (!early_init_dt_verify(fdt)) return false; if (!of_scan_flat_dt(fdt_find_cpu_features, NULL)) return false; if (disabled_on_cmdline()) return false; cpufeatures_setup_cpu(); using_dt_cpu_ftrs = true; return true; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static void __init cpufeatures_deps_enable(struct dt_cpu_feature *f) { const __be32 *prop; int len; int nr_deps; int i; if (f->enabled || f->disabled) return; prop = of_get_flat_dt_prop(f->node, "dependencies", &len); if (!prop) { pr_warn("%s: missing dependencies property", f->name); retur...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/dt_cpu_ftrs.c
static int __init dt_cpu_ftrs_scan_callback(unsigned long node, const char *uname, int depth, void *data) { const __be32 *prop; int count, i; u32 isa; if (!of_flat_dt_is_compatible(node, "ibm,powerpc-cpu-features")) ret...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static inline unsigned long eeh_token_to_phys(unsigned long token) { return ppc_find_vmap_phys(token); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
int eeh_check_failure(const volatile void __iomem *token) { unsigned long addr; struct eeh_dev *edev; addr = eeh_token_to_phys((unsigned long __force)token); edev = eeh_addr_cache_get_dev(addr); if (!edev) { eeh_stats.no_device++; return 0; } return eeh_dev_check_failure(edev); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) { struct eeh_dev *edev = pci_dev_to_eeh_dev(dev); struct eeh_pe *pe = eeh_dev_to_pe(edev); if (!pe) { pr_err("%s: No PE found on PCI device %s\n", __func__, pci_name(dev)); return -EINVAL; ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static void eeh_pe_refreeze_passed(struct eeh_pe *root) { struct eeh_pe *pe; int state; eeh_for_each_pe(root, pe) { if (eeh_pe_passed(pe)) { state = eeh_ops->get_state(pe, NULL); if (state & (EEH_STATE_MMIO_ACTIVE | EEH_STATE_MMIO_ENABLED)) { pr_info("EEH: Passed-through PE PHB#%x-PE#%x ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
int eeh_unfreeze_pe(struct eeh_pe *pe) { int ret; ret = eeh_pci_enable(pe, EEH_OPT_THAW_MMIO); if (ret) { pr_warn("%s: Failure %d enabling IO on PHB#%x-PE#%x\n", __func__, ret, pe->phb->global_number, pe->addr); return ret; } ret = eeh_pci_enable(pe, EEH_OPT_THAW_DMA); if (ret) { ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
int eeh_pe_get_state(struct eeh_pe *pe) { int result, ret = 0; bool rst_active, dma_en, mmio_en; if (!pe) return -ENODEV; if (!eeh_ops || !eeh_ops->get_state) return -ENOENT; /* * If the parent PE is owned by the host kernel and is undergoing * error recovery, we should return the PE state as...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
int eeh_pe_inject_err(struct eeh_pe *pe, int type, int func, unsigned long addr, unsigned long mask) { if (!pe) return -ENODEV; /* Unsupported operation ? */ if (!eeh_ops || !eeh_ops->err_inject) return -ENOENT; /* Check on PCI error type */ if (type != EEH_ERR_TYPE_32 && type...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static struct pci_dev *eeh_debug_lookup_pdev(struct file *filp, const char __user *user_buf, size_t count, loff_t *ppos) { uint32_t domain, bus, dev, fn; struct pci_dev *pdev; char buf[20]; int ret; memset(buf, 0, siz...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static int eeh_enable_dbgfs_set(void *data, u64 val) { if (val) eeh_clear_flag(EEH_FORCE_DISABLED); else eeh_add_flag(EEH_FORCE_DISABLED); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static int eeh_enable_dbgfs_get(void *data, u64 *val) { if (eeh_enabled()) *val = 0x1ul; else *val = 0x0ul; return 0; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static ssize_t eeh_force_recover_write(struct file *filp, const char __user *user_buf, size_t count, loff_t *ppos) { struct pci_controller *hose; uint32_t phbid, pe_no; struct eeh_pe *pe; char buf[20]; int ret; ret = simple_write...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh.c
static ssize_t eeh_debugfs_dev_usage(struct file *filp, char __user *user_buf, size_t count, loff_t *ppos) { static const char usage[] = "input format: <domain>:<bus>:<dev>.<fn>\n"; return simple_read_from_buffer(user_buf, count, ppos, usage, s...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_cache.c
static inline struct eeh_dev *__eeh_addr_cache_get_device(unsigned long addr) { struct rb_node *n = pci_io_addr_cache_root.rb_root.rb_node; while (n) { struct pci_io_addr_range *piar; piar = rb_entry(n, struct pci_io_addr_range, rb_node); if (addr < piar->addr_lo) n = n->rb_left; else if (a...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_cache.c
void eeh_addr_cache_init(void) { spin_lock_init(&pci_io_addr_cache_root.piar_lock); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static enum pci_ers_result pci_ers_merge_result(enum pci_ers_result old, enum pci_ers_result new) { if (eeh_result_priority(new) > eeh_result_priority(old)) return new; return old; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static bool eeh_dev_removed(struct eeh_dev *edev) { return !edev || (edev->mode & EEH_DEV_REMOVED); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static enum pci_ers_result eeh_report_error(struct eeh_dev *edev, struct pci_dev *pdev, struct pci_driver *driver) { enum pci_ers_result rc; if (!driver->err_handler->error_detected) return PCI_ERS_RESULT_NONE; eeh_edev_...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static enum pci_ers_result eeh_report_reset(struct eeh_dev *edev, struct pci_dev *pdev, struct pci_driver *driver) { if (!driver->err_handler->slot_reset || !edev->in_error) return PCI_ERS_RESULT_NONE; eeh_edev_info(edev, "I...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static enum pci_ers_result eeh_report_failure(struct eeh_dev *edev, struct pci_dev *pdev, struct pci_driver *driver) { enum pci_ers_result rc; if (!driver->err_handler->error_detected) return PCI_ERS_RESULT_NONE; eeh...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static void *eeh_add_virt_device(struct eeh_dev *edev) { struct pci_driver *driver; struct pci_dev *dev = eeh_dev_to_pci_dev(edev); if (!(edev->physfn)) { eeh_edev_warn(edev, "Not for VF\n"); return NULL; } driver = eeh_pcid_get(dev); if (driver) { if (driver->err_handler) { eeh_pcid_pu...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static void *eeh_pe_detach_dev(struct eeh_pe *pe, void *userdata) { struct eeh_dev *edev, *tmp; eeh_pe_for_each_dev(pe, edev, tmp) { if (!(edev->mode & EEH_DEV_DISCONNECTED)) continue; edev->mode &= ~(EEH_DEV_DISCONNECTED | EEH_DEV_IRQ_DISABLED); eeh_pe_tree_remove(edev); } return NULL; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_driver.c
static void eeh_clear_slot_attention(struct pci_dev *pdev) { const struct hotplug_slot_ops *ops; struct pci_slot *slot; if (!pdev) return; if (pdev->error_state == pci_channel_io_perm_failure) return; slot = pdev->slot; if (!slot || !slot->hotplug) return; ops = slot->hotplug->ops; if (...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_event.c
static int eeh_event_handler(void *dummy) { unsigned long flags; struct eeh_event *event; while (!kthread_should_stop()) { if (wait_for_completion_interruptible(&eeh_eventlist_event)) break; spin_lock_irqsave(&eeh_eventlist_lock, flags); event = NULL; if (!list_empty(&eeh_eventlist)) { ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_pe.c
static struct eeh_pe *eeh_pe_alloc(struct pci_controller *phb, int type) { struct eeh_pe *pe; size_t alloc_size; alloc_size = sizeof(struct eeh_pe); if (eeh_pe_aux_size) { alloc_size = ALIGN(alloc_size, cache_line_size()); alloc_size += eeh_pe_aux_size; } pe = kzalloc(alloc_size, GFP_KERNEL); if...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_pe.c
struct eeh_pe *eeh_pe_next(struct eeh_pe *pe, struct eeh_pe *root) { struct list_head *next = pe->child_list.next; if (next == &pe->child_list) { while (1) { if (pe == root) return NULL; next = pe->child.next; if (next != &pe->parent->child_list) break; pe = pe->parent; ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_pe.c
void eeh_pe_update_time_stamp(struct eeh_pe *pe) { time64_t tstamp; if (!pe) return; if (pe->freeze_count <= 0) { pe->freeze_count = 0; pe->tstamp = ktime_get_seconds(); } else { tstamp = ktime_get_seconds(); if (tstamp - pe->tstamp > 3600) { pe->tstamp = tstamp; pe->freeze_cou...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_pe.c
void eeh_pe_restore_bars(struct eeh_pe *pe) { eeh_pe_dev_traverse(pe, eeh_restore_one_device_bars, NULL); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_pe.c
struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe) { struct eeh_dev *edev; struct pci_dev *pdev; if (pe->type & EEH_PE_PHB) return pe->phb->bus; if (pe->state & EEH_PE_PRI_BUS) return pe->bus; /* Retrieve the parent PCI bus of first (top) PCI device */ edev = list_first_entry_or_null(&pe->edevs, s...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_sysfs.c
static ssize_t eeh_notify_resume_show(struct device *dev, struct device_attribute *attr, char *buf) { struct pci_dev *pdev = to_pci_dev(dev); struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); struct pci_dn *pdn = pci_get_pdn(pdev); if (...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/eeh_sysfs.c
void eeh_sysfs_add_device(struct pci_dev *pdev) { struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev); int rc = 0; if (!eeh_enabled()) return; if (edev && (edev->mode & EEH_DEV_SYSFS)) return; rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode); rc += device_create_file(&pdev->dev, &dev_attr_ee...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/epapr_paravirt.c
static int __init epapr_idle_init(void) { #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) if (epapr_has_idle) ppc_md.power_save = epapr_ev_idle; #endif return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static int __init fadump_cma_init(void) { unsigned long long base, size; int rc; if (!fw_dump.fadump_enabled) return 0; if (fw_dump.nocma) return 1; base = fw_dump.reserve_dump_area_start; size = fw_dump.boot_memory_size; if (!size) return 0; rc = cma_init_reserved_mem(base, size, 0, "f...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static int __init fadump_cma_init(void) { return 1; } #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static __init u64 fadump_calculate_reserve_size(void) { u64 base, size, bootmem_min; int ret; if (fw_dump.reserve_bootvar) pr_warn("'fadump_reserve_mem=' parameter is deprecated in favor of " "'crashkernel=' parameter.\n"); ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(), &...
[ 1, 1 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static int __init add_boot_mem_region(unsigned long rstart, unsigned long rsize) { int i = fw_dump.boot_mem_regs_cnt++; if (fw_dump.boot_mem_regs_cnt > FADUMP_MAX_MEM_REGS) { fw_dump.boot_mem_regs_cnt = FADUMP_MAX_MEM_REGS; return 0; } pr_debug("Added boot memory...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static bool __init overlaps_reserved_ranges(u64 base, u64 end, int *idx) { bool ret = false; int i; for (i = *idx; i < reserved_mrange_info.mem_range_cnt; i++) { u64 rbase = reserved_mrange_info.mem_ranges[i].base; u64 rend = rbase + reserved_mrange_info.mem_ranges[i].size; if (end <= rbase) b...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static void fadump_free_buffer(unsigned long vaddr, unsigned long size) { free_reserved_area((void *)vaddr, (void *)(vaddr + size), -1, NULL); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static inline int fadump_add_mem_range(struct fadump_mrange_info *mrange_info, u64 base, u64 end) { struct fadump_memory_range *mem_ranges = mrange_info->mem_ranges; bool is_adjacent = false; u64 start, size; if (base == end) return 0; if (mrange_info->mem_range_cn...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static inline unsigned long fadump_relocate(unsigned long paddr) { unsigned long raddr, rstart, rend, rlast, hole_size; int i; hole_size = 0; rlast = 0; raddr = paddr; for (i = 0; i < fw_dump.boot_mem_regs_cnt; i++) { rstart = fw_dump.boot_mem_addr[i]; rend = rstart + fw_dump.boot_mem_sz[i]; ho...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
void fadump_cleanup(void) { if (!fw_dump.fadump_supported) return; if (fw_dump.dump_active) { pr_debug("Invalidating firmware-assisted dump registration\n"); fw_dump.ops->fadump_invalidate(&fw_dump); } else if (fw_dump.dump_registered) { /* Un-register Firmware-assisted dump if it was registered....
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static void fadump_free_reserved_memory(unsigned long start_pfn, unsigned long end_pfn) { unsigned long pfn; unsigned long time_limit = jiffies + HZ; pr_info("freeing reserved memory (0x%llx - 0x%llx)\n", PFN_PHYS(start_pfn), PFN_PHYS(end_pfn)); for (pfn = st...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static void sort_and_merge_mem_ranges(struct fadump_mrange_info *mrange_info) { struct fadump_memory_range *mem_ranges; u64 base, size; int i, j, idx; if (!reserved_mrange_info.mem_range_cnt) return; mem_ranges = mrange_info->mem_ranges; for (i = 0; i < mrange_info->mem_range_cnt; i++) { idx = i; ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static void __init early_init_dt_scan_reserved_ranges(unsigned long node) { const __be32 *prop; int len, ret = -1; unsigned long i; if (reserved_mrange_info.mem_range_cnt != 0) return; prop = of_get_flat_dt_prop(node, "reserved-ranges", &len); if (!prop) return; /* * Each reserved range is a...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static void fadump_release_memory(u64 begin, u64 end) { u64 ra_start, ra_end, tstart; int i, ret; ra_start = fw_dump.reserve_dump_area_start; ra_end = ra_start + fw_dump.reserve_dump_area_size; if (reserved_mrange_info.mem_range_cnt == reserved_mrange_info.max_mem_ranges) reserved_mrange_info.mem_range_...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static ssize_t mem_reserved_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { return sprintf(buf, "%ld\n", fw_dump.reserve_dump_area_size); }
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
static void __init fadump_init_files(void) { int rc = 0; fadump_kobj = kobject_create_and_add("fadump", kernel_kobj); if (!fadump_kobj) { pr_err("failed to create fadump kobject\n"); return; } debugfs_create_file("fadump_region", 0444, arch_debugfs_dir, NULL, &fadump_region_fop...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/fadump.c
int __init early_init_dt_scan_fw_dump(unsigned long node, const char *uname, int depth, void *data) { if ((depth != 1) || (strcmp(uname, "ibm,opal") != 0)) return 0; opal_fadump_dt_scan(&fw_dump, node); return 1; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
static bool can_co_exist(struct breakpoint *b, struct perf_event *bp) { return !(alternate_infra_bp(b, bp) && bp_addr_range_overlap(b->bp, bp)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
int arch_reserve_bp_slot(struct perf_event *bp) { int ret; if (is_ptrace_bp(bp)) { if (all_cpu_bps_check(bp)) return -ENOSPC; if (same_task_bps_check(bp)) return -ENOSPC; return task_bps_add(bp); } /* perf breakpoint */ if (is_kernel_addr(bp->attr.bp_addr)) return 0; if (bp-...
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
void arch_release_bp_slot(struct perf_event *bp) { if (!is_kernel_addr(bp->attr.bp_addr)) { if (bp->hw.target) task_bps_remove(bp); if (bp->cpu != -1) cpu_bps_remove(bp); } }
[ 1, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
void arch_unregister_hw_breakpoint(struct perf_event *bp) { /* * If the breakpoint is unregistered between a hw_breakpoint_handler() * and the single_step_dabr_instruction(), then cleanup the breakpoint * restoration variables to prevent dangling pointers. * FIXME, this should not be using bp->ctx at all!...
[ 1, 1 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw) { return is_kernel_addr(hw->address); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
static bool is_octword_vsx_instr(int type, int size) { return ((type == LOAD_VSX || type == STORE_VSX) && size == 32); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint.c
static void larx_stcx_err(struct perf_event *bp, struct arch_hw_breakpoint *info) { printk_ratelimited("Breakpoint hit on instruction that can't be emulated. " "Breakpoint at 0x%lx will be disabled.\n", info->address); perf_event_disable_inatomic(...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint_constraints.c
static bool dar_in_user_range(unsigned long dar, struct arch_hw_breakpoint *info) { return ((info->address <= dar) && (dar - info->address < info->len)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint_constraints.c
static bool ea_user_range_overlaps(unsigned long ea, int size, struct arch_hw_breakpoint *info) { return ((ea < info->address + info->len) && (ea + size > info->address)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint_constraints.c
static bool check_dawrx_constraints(struct pt_regs *regs, int type, struct arch_hw_breakpoint *info) { if (OP_IS_LOAD(type) && !(info->type & HW_BRK_TYPE_READ)) return false; if ((OP_IS_STORE(type) || type == CACHEOP) && !(info->type & HW_BRK_TYPE_WRITE)) return fa...
[ 0, 0 ]
Linux Kernel
arch/powerpc/kernel/hw_breakpoint_constraints.c
void wp_get_instr_detail(struct pt_regs *regs, ppc_inst_t *instr, int *type, int *size, unsigned long *ea) { struct instruction_op op; if (__get_user_instr(*instr, (void __user *)regs->nip)) return; analyse_instr(&op, regs, *instr); *type = GETTYPE(op.type); *ea = op.ea; if ...
[ 1, 0 ]