/openbmc/linux/tools/testing/radix-tree/ |
H A D | benchmark.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/radix-tree.h> 38 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_iter() 39 (finish.tv_nsec - start.tv_nsec); in benchmark_iter() 53 unsigned long size, unsigned long step) in benchmark_insert() argument 61 for (index = 0 ; index < size ; index += step) in benchmark_insert() 66 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert() 67 (finish.tv_nsec - start.tv_nsec); in benchmark_insert() 69 printv(2, "Size: %8ld, step: %8ld, insertion: %15lld ns\n", in benchmark_insert() 70 size, step, nsec); in benchmark_insert() [all …]
|
/openbmc/linux/drivers/gpu/drm/i915/ |
H A D | intel_step.c | 1 // SPDX-License-Identifier: MIT 145 u8 step = gmd->step + STEP_A0; in gmd_to_intel_step() local 147 if (step >= STEP_FUTURE) { in gmd_to_intel_step() 148 drm_dbg(&i915->drm, "Using future steppings\n"); in gmd_to_intel_step() 152 return step; in gmd_to_intel_step() 160 int size = 0; in intel_step_init() local 162 struct intel_step_info step = {}; in intel_step_init() local 165 step.graphics_step = gmd_to_intel_step(i915, in intel_step_init() 166 &RUNTIME_INFO(i915)->graphics.ip); in intel_step_init() 167 step.media_step = gmd_to_intel_step(i915, in intel_step_init() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/mtd/ |
H A D | hisi504-nand.txt | 5 - compatible: Should be "hisilicon,504-nfc". 6 - reg: The first contains base physical address and size of 8 physical address and size of NAND controller's buffer. 9 - interrupts: Interrupt number for nfc. 10 - nand-bus-width: See nand-controller.yaml. 11 - nand-ecc-mode: Support none and hw ecc mode. 12 - #address-cells: Partition address, should be set 1. 13 - #size-cells: Partition size, should be set 1. 17 - nand-ecc-strength: Number of bits to correct per ECC step. 18 - nand-ecc-step-size: Number of data bytes covered by a single ECC step. [all …]
|
H A D | mediatek,mtk-nfc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/mtd/mediatek,mtk-nfc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Xiangsheng Hou <xiangsheng.hou@mediatek.com> 15 - mediatek,mt2701-nfc 16 - mediatek,mt2712-nfc 17 - mediatek,mt7622-nfc 21 - description: Base physical address and size of NFI. 25 - description: NFI interrupt [all …]
|
H A D | vf610-nfc.txt | 7 - compatible: Should be set to "fsl,vf610-nfc". 8 - reg: address range of the NFC. 9 - interrupts: interrupt of the NFC. 10 - #address-cells: shall be set to 1. Encode the nand CS. 11 - #size-cells : shall be set to 0. 12 - assigned-clocks: main clock from the SoC, for Vybrid <&clks VF610_CLK_NFC>; 13 - assigned-clock-rates: The NAND bus timing is derived from this clock 19 - #address-cells, #size-cells : Must be present if the device has sub-nodes 27 - compatible: Should be set to "fsl,vf610-nfc-cs". 28 - nand-bus-width: see nand-controller.yaml [all …]
|
/openbmc/linux/arch/powerpc/platforms/cell/spufs/ |
H A D | spu_save.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * SPU-side context save sequence outlined in 29 /* Save, Step 2: in save_event_mask() 40 /* Save, Step 3: in save_tag_mask() 51 unsigned int size = sizeof(dma_list); in save_upper_240kb() local 55 /* Save, Step 7: in save_upper_240kb() 62 spu_writech(MFC_Size, size); in save_upper_240kb() 72 /* Save, Step 9: in save_fpcr() 73 * Issue the floating-point status and control register in save_fpcr() 84 /* Save, Step 10: in save_decr() [all …]
|
H A D | spu_utils.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * utils.h: Utilities for SPU-side of the context switch operation. 12 * 64-bit safe EA. 20 * 128-bit register template. 31 unsigned int size; member 36 * Declare storage for 8-byte aligned DMA list. 51 ((char *)(&(dummy->_field)) - (char *)(&(dummy->gprs[0].slot[0]))) 58 /* Save, Step 4: in set_event_mask() 59 * Restore, Step 1: in set_event_mask() 70 /* Save, Step 5: in set_tag_mask() [all …]
|
H A D | spu_restore.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * SPU-side context restore sequence outlined in 25 #define BR_INSTR 0x327fff80 /* br -4 */ 35 unsigned int size = sizeof(regs_spill); in fetch_regs_from_mem() local 42 spu_writech(MFC_Size, size); in fetch_regs_from_mem() 51 unsigned int size = sizeof(dma_list); in restore_upper_240kb() local 55 /* Restore, Step 4: in restore_upper_240kb() 62 spu_writech(MFC_Size, size); in restore_upper_240kb() 73 /* Restore, Step 6(moved): in restore_decr() 92 /* Restore, Step 11: in write_ppu_mb() [all …]
|
H A D | switch.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Host-side part of SPU context switch sequence outlined in 66 /* Save, Step 1: in acquire_spu_lock() 67 * Restore, Step 1: in acquire_spu_lock() 68 * Acquire SPU-specific mutual exclusion lock. in acquire_spu_lock() 75 /* Restore, Step 76: in release_spu_lock() 76 * Release SPU-specific mutual exclusion lock. in release_spu_lock() 83 struct spu_problem __iomem *prob = spu->problem; in check_spu_isolate() 86 /* Save, Step 2: in check_spu_isolate() 87 * Save, Step 6: in check_spu_isolate() [all …]
|
/openbmc/linux/drivers/gpu/drm/i915/gt/ |
H A D | selftest_ring.c | 1 // SPDX-License-Identifier: GPL-2.0 14 kref_init(&ring->ref); in mock_ring() 15 ring->size = sz; in mock_ring() 16 ring->wrap = BITS_PER_TYPE(ring->size) - ilog2(sz); in mock_ring() 17 ring->effective_size = sz; in mock_ring() 18 ring->vaddr = (void *)(ring + 1); in mock_ring() 19 atomic_set(&ring->pin_count, 1); in mock_ring() 39 result = -1; in check_ring_direction() 46 return -EINVAL; in check_ring_direction() 52 static int check_ring_step(struct intel_ring *ring, u32 x, u32 step) in check_ring_step() argument [all …]
|
/openbmc/phosphor-net-ipmid/test/ |
H A D | cipher.cpp | 18 * Step-1 Generate Integrity Data for the packet, using the implemented API in TEST() 32 auto response = algoPtr->generateIntegrityData(packet); in TEST() 34 EXPECT_EQ(true, (response.size() == in TEST() 38 * Step-2 Generate Integrity data using OpenSSL SHA1 algorithm in TEST() 48 if (HMAC(EVP_sha1(), sik.data(), sik.size(), const1.data(), const1.size(), in TEST() 56 size_t length = packet.size() - message::parser::RMCP_SESSION_HEADER_SIZE; in TEST() 58 if (HMAC(EVP_sha1(), k1.data(), k1.size(), in TEST() 68 * Step-3 Check if the integrity data we generated using the implemented API in TEST() 78 * Step-1 Generate Integrity data using OpenSSL SHA1 algorithm in TEST() 96 if (HMAC(EVP_sha1(), sik.data(), sik.size(), const1.data(), const1.size(), in TEST() [all …]
|
/openbmc/linux/drivers/mtd/nand/ |
H A D | ecc-mxic.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/dma-mapping.h> 19 #include <linux/mtd/nand-ecc-mxic.h> 53 /* ECC Chunk Size */ 55 /* Main Data Size */ 57 /* Spare Data Size */ 126 struct nand_ecc_engine *eng = nand->ecc.engine; in nand_to_mxic() 128 if (eng->integration == NAND_ECC_ENGINE_INTEGRATION_EXTERNAL) in nand_to_mxic() 140 if (section < 0 || section >= ctx->steps) in mxic_ecc_ooblayout_ecc() 141 return -ERANGE; in mxic_ecc_ooblayout_ecc() [all …]
|
/openbmc/u-boot/fs/cbfs/ |
H A D | cbfs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 43 dest->magic = be32_to_cpu(src->magic); in swap_header() 44 dest->version = be32_to_cpu(src->version); in swap_header() 45 dest->rom_size = be32_to_cpu(src->rom_size); in swap_header() 46 dest->boot_block_size = be32_to_cpu(src->boot_block_size); in swap_header() 47 dest->align = be32_to_cpu(src->align); in swap_header() 48 dest->offset = be32_to_cpu(src->offset); in swap_header() 55 memcpy(&dest->magic, &src->magic, sizeof(dest->magic)); in swap_file_header() 56 dest->len = be32_to_cpu(src->len); in swap_file_header() 57 dest->type = be32_to_cpu(src->type); in swap_file_header() [all …]
|
/openbmc/linux/Documentation/userspace-api/media/v4l/ |
H A D | ext-ctrls-fm-tx.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 3 .. _fm-tx-controls: 15 .. _fm-tx-control-id: 27 step are driver-specific. 34 to 31 pre-defined programme types. 46 always contain a string with size multiple of 8. 52 programme-related information or any other text. In these cases, 60 The result is it must always contain a string with size multiple of 98 frequencies so check the array size. 103 receiver-generated distortion and prevent overmodulation. [all …]
|
H A D | vidioc-enum-framesizes.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 13 VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes 47 - **Discrete:** The function returns success if the given index value 48 (zero-based) is valid. The application should increase the index by 54 - **Step-wise:** The function returns success if the given index value 60 - **Continuous:** This is a special case of the step-wise type above. 68 the ``type`` field to determine the type of frame size enumeration the 81 other ioctl calls while it runs the frame size enumeration. 92 .. flat-table:: struct v4l2_frmsize_discrete 93 :header-rows: 0 [all …]
|
H A D | vidioc-enum-frameintervals.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 13 VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals 30 that contains a pixel format and size and receives a frame interval. 36 device supports for the given pixel format and frame size. 46 - **Discrete:** The function returns success if the given index value 47 (zero-based) is valid. The application should increase the index by 53 - **Step-wise:** The function returns success if the given index value 59 - **Continuous:** This is a special case of the step-wise type above. 63 the union only the ``stepwise`` member is valid and the ``step`` 102 .. flat-table:: struct v4l2_frmival_stepwise [all …]
|
H A D | vidioc-queryctrl.rst | 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 13 VIDIOC_QUERYCTRL - VIDIOC_QUERY_EXT_CTRL - VIDIOC_QUERYMENU - Enumerate controls and menu control i… 42 of a struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` and call the 60 driver returns the next supported non-compound control, or ``EINVAL`` if 72 :ref:`v4l2_queryctrl <v4l2-queryctrl>` since that structure is full. 80 fields of struct :ref:`v4l2_querymenu <v4l2-querymenu>` and call the 85 :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``minimum`` to ``maximum``, 99 .. _v4l2-queryctrl: 103 .. flat-table:: struct v4l2_queryctrl 104 :header-rows: 0 [all …]
|
/openbmc/linux/tools/perf/util/ |
H A D | bpf-utils.c | 1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) 12 #include "bpf-utils.h" 18 int size_offset; /* > 0: offset of rec size, 19 * < 0: fix size of -size_offset 27 -1, 32 -1, 37 -(int)sizeof(__u32), 42 -(int)sizeof(__u64), 47 -(int)sizeof(__u32), 67 -(int)sizeof(__u8) * BPF_TAG_SIZE, [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | item.h | 1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 2 /* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */ 13 short step; /* step in bytes for indexed items */ member 14 unsigned short in_step_offset; /* offset within one step */ 16 unsigned char element_size; /* size of element in bit array */ 21 } size; member 29 BUG_ON(index && !item->step); in __mlxsw_item_offset() 30 if (item->offset % typesize != 0 || in __mlxsw_item_offset() 31 item->step % typesize != 0 || in __mlxsw_item_offset() 32 item->in_step_offset % typesize != 0) { in __mlxsw_item_offset() [all …]
|
/openbmc/linux/tools/perf/ui/ |
H A D | progress.c | 1 // SPDX-License-Identifier: GPL-2.0 18 u64 last = p->curr; in ui_progress__update() 20 p->curr += adv; in ui_progress__update() 22 if (p->curr >= p->next) { in ui_progress__update() 23 u64 nr = DIV_ROUND_UP(p->curr - last, p->step); in ui_progress__update() 25 p->next += nr * p->step; in ui_progress__update() 26 ui_progress__ops->update(p); in ui_progress__update() 31 const char *title, bool size) in __ui_progress__init() argument 33 p->curr = 0; in __ui_progress__init() 34 p->next = p->step = total / 16 ?: 1; in __ui_progress__init() [all …]
|
/openbmc/qemu/net/ |
H A D | filter-rewriter.c | 9 * later. See the COPYING file in the top-level directory. 17 #include "qemu/error-report.h" 19 #include "qemu/main-loop.h" 26 #define TYPE_FILTER_REWRITER "filter-rewriter" 43 s->failover_mode = FAILOVER_MODE_ON; in filter_rewriter_failover_mode() 50 if (!qemu_net_queue_flush(s->incoming_queue)) { in filter_rewriter_flush() 52 qemu_net_queue_purge(s->incoming_queue, nf->netdev); in filter_rewriter_flush() 63 pkt->ip->ip_p == IPPROTO_TCP) { in is_tcp_packet() 77 tcp_pkt = (struct tcp_hdr *)pkt->transport_header; in handle_primary_tcp_pkt() 80 inet_ntoa(pkt->ip->ip_src), inet_ntoa(pkt->ip->ip_dst), in handle_primary_tcp_pkt() [all …]
|
/openbmc/linux/drivers/media/pci/mantis/ |
H A D | mantis_dma.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 35 #define RISC_INSTR(risc_pos, opcode) (mantis->risc_cpu[risc_pos++] = cpu_to_le32(opcode)) 48 if (mantis->buf_cpu) { in mantis_dma_exit() 50 "DMA=0x%lx cpu=0x%p size=%d", in mantis_dma_exit() 51 (unsigned long) mantis->buf_dma, in mantis_dma_exit() 52 mantis->buf_cpu, in mantis_dma_exit() 55 dma_free_coherent(&mantis->pdev->dev, MANTIS_BUF_SIZE, in mantis_dma_exit() 56 mantis->buf_cpu, mantis->buf_dma); in mantis_dma_exit() 58 mantis->buf_cpu = NULL; in mantis_dma_exit() 60 if (mantis->risc_cpu) { in mantis_dma_exit() [all …]
|
/openbmc/linux/sound/core/oss/ |
H A D | pcm_plugin.c | 2 * PCM Plug-In shared (kernel/library) code 4 * Copyright (c) 2000 by Abramo Bagnara <abramo@alsa-project.org> 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 35 #define snd_pcm_plug_first(plug) ((plug)->runtime->oss.plugin_first) 36 #define snd_pcm_plug_last(plug) ((plug)->runtime->oss.plugin_last) 40 * all "resampling" requests within +-5% 53 size_t size; in snd_pcm_plugin_alloc() local 57 if (plugin->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_pcm_plugin_alloc() 58 format = &plugin->src_format; in snd_pcm_plugin_alloc() 60 format = &plugin->dst_format; in snd_pcm_plugin_alloc() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/map_tests/ |
H A D | htab_map_batch_ops.c | 1 // SPDX-License-Identifier: GPL-2.0 84 int err, step, value_size; in __test_map_lookup_and_delete_batch() local 94 CHECK(map_fd == -1, in __test_map_lookup_and_delete_batch() 107 /* test 1: lookup/delete an empty hash table, -ENOENT */ in __test_map_lookup_and_delete_batch() 135 /* bpf_map_get_next_key() should return -ENOENT for an empty map. */ in __test_map_lookup_and_delete_batch() 141 for (step = 1; step < max_entries; step++) { in __test_map_lookup_and_delete_batch() 146 /* iteratively lookup/delete elements with 'step' in __test_map_lookup_and_delete_batch() 149 count = step; in __test_map_lookup_and_delete_batch() 158 /* It is possible that we are failing due to buffer size in __test_map_lookup_and_delete_batch() 160 * go with large steps. Not that a buffer size with in __test_map_lookup_and_delete_batch() [all …]
|
/openbmc/u-boot/lib/rsa/ |
H A D | rsa-verify.c | 1 // SPDX-License-Identifier: GPL-2.0+ 20 #include <u-boot/rsa-mod-exp.h> 21 #include <u-boot/rsa.h> 27 * rsa_verify_padding() - Verify RSA message padding is valid 48 ff_len = pad_len - algo->der_len - 3; in rsa_verify_padding() 50 ret |= memcmp(msg, msg+1, ff_len-1); in rsa_verify_padding() 55 ret |= memcmp(msg, algo->der_prefix, algo->der_len); in rsa_verify_padding() 64 struct checksum_algo *checksum = info->checksum; in padding_pkcs_15_verify() 65 int ret, pad_len = msg_len - checksum->checksum_len; in padding_pkcs_15_verify() 71 return -EINVAL; in padding_pkcs_15_verify() [all …]
|