/openbmc/qemu/include/qemu/ |
H A D | bitops.h | 9 * See the COPYING.LIB file in the top-level directory. 16 #include "host-utils.h" 28 (((~0ULL) >> (64 - (length))) << (shift)) 33 * We provide a set of functions which work on arbitrary-length arrays of 37 * - Bits stored in an array of 'unsigned long': set_bit(), clear_bit(), etc 38 * - Bits stored in an array of 'uint32_t': set_bit32(), clear_bit32(), etc 43 * be some guest-visible register view of the bit array. 63 * set_bit - Set a bit in memory 65 * @addr: the address to start counting from 76 * set_bit_atomic - Set a bit in memory atomically [all …]
|
/openbmc/u-boot/common/ |
H A D | iotrace.c | 1 // SPDX-License-Identifier: GPL-2.0+ 15 * struct iotrace - current trace status and checksum 17 * @start: Start address of iotrace buffer 23 * @crc32: Current value of CRC chceksum of trace records 27 ulong start; member 37 static void add_record(int flags, const void *ptr, ulong value) in add_record() argument 44 * this we would need to set the iotrace buffer at build-time. See in add_record() 47 if (!(gd->flags & GD_FLG_RELOC) || !iotrace.enabled) in add_record() 58 iotrace.start + iotrace.offset, in add_record() 59 sizeof(value)); in add_record() [all …]
|
/openbmc/u-boot/cmd/ |
H A D | ini.c | 1 // SPDX-License-Identifier: BSD-3-Clause 3 * inih -- simple .INI file parser 43 while (p > s && isspace(*--p)) in rstrip() 48 /* Return pointer to first non-whitespace char in given string. */ 70 /* Version of strncpy that ensures dest (size bytes) is null-terminated. */ 74 dest[size - 1] = '\0'; in strncpy0() 92 len = min((end - *mem) + newline, num); in memgets() 98 *memsize -= (end - *mem) + newline; in memgets() 99 *mem += (end - *mem) + newline; in memgets() 104 /* Parse given INI-style file. May have [section]s, name=value pairs [all …]
|
/openbmc/linux/include/linux/ |
H A D | bitmap.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 23 * specific are in various include/asm-<arch>/bitops.h headers 36 * compile-time and at most BITS_PER_LONG. 78 * bitmap_get_value8(map, start) Get 8bit value from map at start 79 * bitmap_set_value8(map, value, start) Set 8bit value to map at start 80 * bitmap_read(map, start, nbits) Read an nbits-sized value from 81 * map at start 82 * bitmap_write(map, value, start, nbits) Write an nbits-sized value to 83 * map at start 101 * test_and_set_bit(bit, addr) Set bit and return old value [all …]
|
H A D | minmax.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 13 * - Avoid multiple evaluations of the arguments (so side-effects like 14 * "x++" happen only once) when non-constant. 15 * - Retain result as a constant expressions when called with only 18 * - Perform signed v unsigned type-checking (to generate compile 20 * - Unsigned char/short are always promoted to signed int and can be 22 * - Unsigned arguments can be compared against non-negative signed constants. 23 * - Comparison of a signed argument against an unsigned constant fails 34 /* True for a non-negative signed int constant */ 36 (__builtin_choose_expr(__is_constexpr(x) && __is_signed(x), x, -1) >= 0) [all …]
|
/openbmc/linux/arch/csky/mm/ |
H A D | cachev1.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 8 /* for L1-cache */ 17 /* for L2-cache */ 32 static void cache_op_all(unsigned int value, unsigned int l2) in cache_op_all() argument 34 mtcr("cr17", value | CACHE_CLR); in cache_op_all() 38 mtcr("cr24", value | CACHE_CLR); in cache_op_all() 44 unsigned int start, in cache_op_range() argument 46 unsigned int value, in cache_op_range() argument 50 unsigned int val = value | CACHE_CLR | CACHE_OMS; in cache_op_range() [all …]
|
/openbmc/u-boot/arch/arm/mach-tegra/tegra210/ |
H A D | xusb-padctl.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 6 #define pr_fmt(fmt) "tegra-xusb-padctl: " fmt 13 #include "../xusb-padctl-common.h" 17 #include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> 36 "pcie-x1", 37 "pcie-x4", 74 TEGRA210_LANE("otg-0", 0x004, 0, 0x3, 0, otg), 75 TEGRA210_LANE("otg-1", 0x004, 2, 0x3, 0, otg), 76 TEGRA210_LANE("otg-2", 0x004, 4, 0x3, 0, otg), [all …]
|
/openbmc/linux/tools/testing/fault-injection/ |
H A D | failcmd.sh | 2 # SPDX-License-Identifier: GPL-2.0 5 # failcmd.sh - run a command with injecting slab/page allocation failures 8 # failcmd.sh --help 24 -p percent 25 --probability=percent 27 Default value is 1 29 -t value 30 --times=value 32 Default value is 1 34 --oom-kill-allocating-task=value [all …]
|
/openbmc/linux/Documentation/netlink/ |
H A D | netlink-raw.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/netlink-raw.yaml# 5 $schema: https://json-schema.org/draft-07/schema 12 len-or-define: 14 pattern: ^[0-9A-Za-z_]+( - 1)?$ 21 required: [ name, doc, attribute-sets, operations ] 31 enum: [ netlink-raw ] # Trim 32 # Start netlink-raw 34 description: Protocol number to use for netlink-raw [all …]
|
H A D | genetlink-legacy.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml# 5 $schema: https://json-schema.org/draft-07/schema 12 len-or-define: 14 pattern: ^[0-9A-Za-z_]+( - 1)?$ 21 required: [ name, doc, attribute-sets, operations ] 35 enum: [ genetlink, genetlink-c, genetlink-legacy ] # Trim 36 uapi-header: 37 description: Path to the uAPI header, default is linux/${family-name}.h [all …]
|
/openbmc/linux/tools/lib/ |
H A D | string.c | 1 // SPDX-License-Identifier: GPL-2.0 24 * memdup - duplicate region of memory 40 * strtobool - convert common user inputs into boolean values 45 * [oO][NnFf] for "on" and "off". Otherwise it will return -EINVAL. Value 51 return -EINVAL; in strtobool() 82 return -EINVAL; in strtobool() 86 * strlcpy - Copy a C-string into a sized buffer 92 * NUL-terminated string that fits in the buffer (unless, 101 #pragma clang diagnostic ignored "-Wignored-attributes" 108 size_t len = (ret >= size) ? size - 1 : ret; in strlcpy() [all …]
|
/openbmc/u-boot/include/ |
H A D | iotrace.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 25 * struct iotrace_record - Holds a single I/O trace record 30 * @value: Value written or read 36 iovalue_t value; member 71 void iotrace_writel(ulong value, const void *ptr); 73 void iotrace_writew(ulong value, const void *ptr); 75 void iotrace_writeb(ulong value, const void *ptr); 78 * iotrace_reset_checksum() - Reset the iotrace checksum 83 * iotrace_get_checksum() - Get the current checksum value 85 * @return currect checksum value [all …]
|
/openbmc/linux/arch/powerpc/lib/ |
H A D | feature-fixups.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 #include <asm/code-patching.h> 30 unsigned long value; member 41 * the start of the alt_entry, to support the VDSO. This in calc_addr() 70 static int patch_feature_section_mask(unsigned long value, unsigned long mask, in patch_feature_section_mask() argument 73 u32 *start, *end, *alt_start, *alt_end, *src, *dest; in patch_feature_section_mask() local 75 start = calc_addr(fcur, fcur->start_off); in patch_feature_section_mask() 76 end = calc_addr(fcur, fcur->end_off); in patch_feature_section_mask() 77 alt_start = calc_addr(fcur, fcur->alt_start_off); in patch_feature_section_mask() 78 alt_end = calc_addr(fcur, fcur->alt_end_off); in patch_feature_section_mask() [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/sparx5/ |
H A D | sparx5_vcap_impl.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * https://github.com/microchip-ung/sparx-5_reginfo 66 .vtype = VCAP_TYPE_IS0, /* CLM-0 */ 72 .last_cid = SPARX5_VCAP_CID_IS0_L2 - 1, 73 .blockno = 8, /* Maps block 8-9 */ 78 .vtype = VCAP_TYPE_IS0, /* CLM-1 */ 84 .last_cid = SPARX5_VCAP_CID_IS0_L4 - 1, 85 .blockno = 6, /* Maps block 6-7 */ 90 .vtype = VCAP_TYPE_IS0, /* CLM-2 */ 97 .blockno = 4, /* Maps block 4-5 */ [all …]
|
/openbmc/u-boot/doc/device-tree-bindings/exynos/ |
H A D | tmu.txt | 5 - compatible : Should be "samsung,exynos-tmu" for TMU 6 - samsung,min-temp : Minimum temperature value (25 degree celsius) 7 - Current temperature of SoC should be more than this value. 8 - samsung,max-temp : Maximum temperature value (125 degree celsius) 9 - Current temperature of SoC should be less than this value. 10 - samsung,start-warning : Temperature at which TMU starts giving warning (degree celsius) 11 - samsung,start-tripping : Temperature at which TMU shuts down the system (degree celsius) 12 - samsung,hw-tripping : Temperature at which hardware tripping should happen 14 - samsung,efuse-min-value : SOC efuse min value (Constant 40) 15 - efuse-value should be more than this value. [all …]
|
/openbmc/qemu/hw/watchdog/ |
H A D | wdt_imx2.c | 9 * See the COPYING file in the top-level directory. 17 #include "hw/qdev-properties.h" 28 s->wicr |= IMX2_WDT_WICR_WTIS; in imx2_wdt_interrupt() 29 qemu_set_irq(s->irq, 1); in imx2_wdt_interrupt() 38 s->wrsr = IMX2_WDT_WRSR_TOUT; in imx2_wdt_expired() 41 if (s->wcr & IMX2_WDT_WCR_WDE) { in imx2_wdt_expired() 50 ptimer_transaction_begin(s->timer); in imx2_wdt_reset() 51 ptimer_stop(s->timer); in imx2_wdt_reset() 52 ptimer_transaction_commit(s->timer); in imx2_wdt_reset() 54 if (s->pretimeout_support) { in imx2_wdt_reset() [all …]
|
/openbmc/linux/fs/xfs/libxfs/ |
H A D | xfs_rtbitmap.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2000-2005 Silicon Graphics, Inc. 66 int error; /* error value */ in xfs_rtbuf_get() 68 ip = issum ? mp->m_rsumip : mp->m_rbmip; in xfs_rtbuf_get() 75 return -EFSCORRUPTED; in xfs_rtbuf_get() 78 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, in xfs_rtbuf_get() 80 mp->m_bsize, 0, &bp, &xfs_rtbuf_ops); in xfs_rtbuf_get() 91 * Searching backward from start to limit, find the first block whose 92 * allocated/free state is different from start's. 98 xfs_rtblock_t start, /* starting block to look at */ in xfs_rtfind_back() argument [all …]
|
/openbmc/u-boot/arch/arm/mach-tegra/tegra124/ |
H A D | xusb-padctl.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 6 #define pr_fmt(fmt) "tegra-xusb-padctl: " fmt 13 #include "../xusb-padctl-common.h" 15 #include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> 94 TEGRA124_LANE("otg-0", 0x004, 0, 0x3, 0, otg), 95 TEGRA124_LANE("otg-1", 0x004, 2, 0x3, 0, otg), 96 TEGRA124_LANE("otg-2", 0x004, 4, 0x3, 0, otg), 97 TEGRA124_LANE("ulpi-0", 0x004, 12, 0x1, 0, usb), 98 TEGRA124_LANE("hsic-0", 0x004, 14, 0x1, 0, usb), [all …]
|
/openbmc/linux/drivers/gpu/drm/i915/display/ |
H A D | dvo_ns2501.c | 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 89 * The higher the value, the lower the dithering depth. 102 #define NS2501_REG1C 0x1c /* low-part of the second register */ 103 #define NS2501_REG1D 0x1d /* high-part of the second register */ 108 * 2^16/control-value. The low-byte comes first. 110 #define NS2501_REG10 0x10 /* low-byte vertical scaler */ 111 #define NS2501_REG11 0x11 /* high-byte vertical scaler */ 112 #define NS2501_REGB8 0xb8 /* low-byte horizontal scaler */ 113 #define NS2501_REGB9 0xb9 /* high-byte horizontal scaler */ 117 * per dimension. One register pair defines the start of the [all …]
|
/openbmc/linux/drivers/nvmem/ |
H A D | stm32-bsec-optee-ta.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * OP-TEE STM32MP BSEC PTA interface, used by STM32 ROMEM driver 5 * Copyright (C) 2022, STMicroelectronics - All Rights Reserved 10 #include "stm32-bsec-optee-ta.h" 15 * [in] value[0].a OTP start offset in byte 16 * [in] value[0].b Access type (0:shadow, 1:fuse, 2:lock) 21 * TEE_SUCCESS - Invoke command success 22 * TEE_ERROR_BAD_PARAMETERS - Incorrect input param 23 * TEE_ERROR_ACCESS_DENIED - OTP not accessible by caller 30 * [in] value[0].a OTP start offset in byte [all …]
|
/openbmc/linux/drivers/net/ethernet/rocker/ |
H A D | rocker_tlv.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * drivers/net/ethernet/rocker/rocker_tlv.h - Rocker switch device driver 4 * Copyright (c) 2014-2016 Jiri Pirko <jiri@mellanox.com> 18 (((len) + ROCKER_TLV_ALIGNTO - 1) & ~(ROCKER_TLV_ALIGNTO - 1)) 21 /* <------- ROCKER_TLV_HDRLEN -------> <--- ROCKER_TLV_ALIGN(payload) ---> 22 * +-----------------------------+- - -+- - - - - - - - - - - - - - -+- - -+ 25 * +-----------------------------+- - -+- - - - - - - - - - - - - - -+- - -+ 26 * <--------------------------- tlv->len --------------------------> 32 int totlen = ROCKER_TLV_ALIGN(tlv->len); in rocker_tlv_next() 34 *remaining -= totlen; in rocker_tlv_next() [all …]
|
/openbmc/linux/drivers/gpu/drm/meson/ |
H A D | meson_overlay.c | 1 // SPDX-License-Identifier: GPL-2.0+ 42 #define VD_X_START(value) FIELD_PREP(GENMASK(14, 0), value) argument 43 #define VD_X_END(value) FIELD_PREP(GENMASK(30, 16), value) argument 46 #define VD_Y_START(value) FIELD_PREP(GENMASK(12, 0), value) argument 47 #define VD_Y_END(value) FIELD_PREP(GENMASK(28, 16), value) argument 50 #define VD_COLOR_MAP(value) FIELD_PREP(GENMASK(1, 0), value) argument 53 #define VD_HORZ_Y_C_RATIO(value) FIELD_PREP(GENMASK(22, 21), value) argument 56 #define VD_VERT_INITIAL_PHASE(value) FIELD_PREP(GENMASK(11, 8), value) argument 57 #define VD_VERT_PHASE_STEP(value) FIELD_PREP(GENMASK(7, 1), value) argument 61 #define VD_H_END(value) FIELD_PREP(GENMASK(11, 0), value) argument [all …]
|
/openbmc/qemu/hw/net/rocker/ |
H A D | rocker_tlv.h | 2 * QEMU rocker switch emulation - TLV parsing and composing 22 (((len) + ROCKER_TLV_ALIGNTO - 1) & ~(ROCKER_TLV_ALIGNTO - 1)) 26 * <------- ROCKER_TLV_HDRLEN -------> <--- ROCKER_TLV_ALIGN(payload) ---> 27 * +-----------------------------+- - -+- - - - - - - - - - - - - - -+- - -+ 30 * +-----------------------------+- - -+- - - - - - - - - - - - - - -+- - -+ 31 * <--------------------------- tlv->len --------------------------> 36 int totlen = ROCKER_TLV_ALIGN(le16_to_cpu(tlv->len)); in rocker_tlv_next() 38 *remaining -= totlen; in rocker_tlv_next() 45 le16_to_cpu(tlv->len) >= ROCKER_TLV_HDRLEN && in rocker_tlv_ok() 46 le16_to_cpu(tlv->len) <= remaining; in rocker_tlv_ok() [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
H A D | dr_ste_v0.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 116 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L2_1, .start = 16, .end = 47, 119 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L2_1, .start = 0, .end = 15, 122 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L2_2, .start = 32, .end = 47, 125 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L2_0, .start = 16, .end = 47, 128 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L2_0, .start = 0, .end = 15, 131 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L3_1, .start = 0, .end = 5, 134 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L4_0, .start = 48, .end = 56, 138 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L4_0, .start = 0, .end = 15, 142 .hw_field = DR_STE_V0_ACTION_MDFY_FLD_L4_0, .start = 16, .end = 31, [all …]
|
/openbmc/linux/arch/riscv/kernel/ |
H A D | sbi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 unsigned long start, unsigned long size, 46 ret.value = a1; in sbi_ecall() 58 return -EPERM; in sbi_err_map_linux_errno() 60 return -EINVAL; in sbi_err_map_linux_errno() 62 return -EFAULT; in sbi_err_map_linux_errno() 66 return -ENOTSUPP; in sbi_err_map_linux_errno() 78 * There is no maximum hartid concept in RISC-V and NR_CPUS must not be in __sbi_v01_cpumask_to_hartmask() 97 * sbi_console_putchar() - Writes given character to the console device. 109 * sbi_console_getchar() - Reads a byte from console device. [all …]
|