/linux-5.10/tools/perf/util/intel-pt-decoder/ |
D | intel-pt-pkt-decoder.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (c) 2013-2014, Intel Corporation. 13 #include "intel-pt-pkt-decoder.h" 76 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument 82 if (len < 8) in intel_pt_get_long_tnt() 87 for (count = 47; count; count--) { in intel_pt_get_long_tnt() 93 packet->type = INTEL_PT_TNT; in intel_pt_get_long_tnt() 94 packet->count = count; in intel_pt_get_long_tnt() 95 packet->payload = payload << 1; in intel_pt_get_long_tnt() 99 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument [all …]
|
/linux-5.10/arch/ia64/lib/ |
D | clear_user.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 11 * Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co 22 #define len r33 macro 37 // - we check whether or not the buffer is small, i.e., less than 17 38 // in which case we do the byte by byte loop. 40 // - Otherwise we go progressively from 1 byte store to 8byte store in 41 // the head part, the body is a 16byte store loop and we finish we the 60 cmp.eq p6,p0=r0,len // check for zero length 65 adds tmp=-1,len // br.ctop is repeat/until 66 mov ret0=len // return value is length at this point [all …]
|
D | copy_user.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 23 * Copyright (C) 2000-2001 Hewlett-Packard Co 27 * - handle the case where we have more than 16 bytes and the alignment 29 * - more benchmarking 30 * - fix extraneous stop bit introduced by the EX() macro. 39 #define COPY_BREAK 16 // we do byte copy below (must be >=16) 42 #define EPI p[PIPE_DEPTH-1] 49 #define len in2 macro 83 adds len2=-1,len // br.ctop is repeat/until 86 ;; // RAW of cfm when len=0 [all …]
|
/linux-5.10/tools/perf/util/arm-spe-decoder/ |
D | arm-spe-pkt-decoder.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2017-2018, Arm Ltd. 12 #include "arm-spe-pkt-decoder.h" 63 [ARM_SPE_OP_TYPE] = "OP-TYPE", 65 [ARM_SPE_DATA_SOURCE] = "DATA-SOURCE", 74 * which is in bits 5:4 of the byte. 75 * 00 : byte 80 static int payloadlen(unsigned char byte) in payloadlen() argument 82 return 1 << ((byte & 0x30) >> 4); in payloadlen() 85 static int arm_spe_get_payload(const unsigned char *buf, size_t len, in arm_spe_get_payload() argument [all …]
|
/linux-5.10/arch/xtensa/lib/ |
D | strncpy_user.S | 8 * Returns: -EFAULT if exception before terminator, N if the entire 20 * char *__strncpy_user(char *dst, const char *src, size_t len) 40 # a4/ len 54 # a2/ dst, a3/ src, a4/ len 56 beqz a4, .Lret # if len is zero 57 movi a5, MASK0 # mask for byte 0 58 movi a6, MASK1 # mask for byte 1 59 movi a7, MASK2 # mask for byte 2 60 movi a8, MASK3 # mask for byte 3 61 bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned [all …]
|
D | checksum.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 23 * unsigned int csum_partial(const unsigned char *buf, int len, 26 * a3 = len 29 * This function assumes 2- or 4-byte alignment. Other alignments will fail! 32 /* ONES_ADD converts twos-complement math to ones-complement. */ 44 * is aligned on either a 2-byte or 4-byte boundary. 48 bnez a5, 8f /* branch if 2-byte aligned */ 49 /* Fall-through on common case, 4-byte alignment */ 51 srli a5, a3, 5 /* 32-byte chunks */ 57 add a5, a5, a2 /* a5 = end of last 32-byte chunk */ [all …]
|
D | strnlen_user.S | 19 * size_t __strnlen_user(const char *s, size_t len) 36 # a3/ len 49 # a2/ s, a3/ len 50 addi a4, a2, -4 # because we overincrement at the end; 52 movi a5, MASK0 # mask for byte 0 53 movi a6, MASK1 # mask for byte 1 54 movi a7, MASK2 # mask for byte 2 55 movi a8, MASK3 # mask for byte 3 56 bbsi.l a2, 0, .L1mod2 # if only 8-bit aligned 57 bbsi.l a2, 1, .L2mod4 # if only 16-bit aligned [all …]
|
D | usercopy.S | 8 * of the Xtensa link-time HAL, and those files may differ per 11 * could lose the special functionality for accessing user-space 24 * size_t __xtensa_copy_user (void *dst, const void *src, size_t len); 37 * This code tries to use fall-through braches for the common 64 # a2/ dst, a3/ src, a4/ len 66 mov a11, a4 # preserve original len for error case 75 __ssa8 a3 # set shift amount from byte offset 77 movi a2, 0 # return success for len==0 84 .Ldst1mod2: # dst is only byte aligned 85 bltui a4, 7, .Lbytecopy # do short copies byte by byte [all …]
|
/linux-5.10/drivers/tty/ |
D | ehv_bytechan.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* ePAPR hypervisor byte channel device driver 4 * Copyright 2009-2011 Freescale Semiconductor, Inc. 9 * ePAPR hypervisor byte channels. 11 * 1) An early-console (udbg) driver. This provides early console output 12 * through a byte channel. The byte channel handle must be specified in a 15 * 2) A normal console driver. Output is sent to the byte channel designated 19 * 3) A tty driver, which is used to handle user-space input and output. The 20 * byte channel used for the console is designated as the default tty. 43 /* Per-byte channel private data */ [all …]
|
/linux-5.10/net/sunrpc/auth_gss/ |
D | gss_krb5_keys.c | 69 * This is the n-fold function as described in rfc3961, sec 5.1 77 int byte, i, msbit; in krb5_nfold() local 91 byte = 0; in krb5_nfold() 95 for (i = ulcm-1; i >= 0; i--) { in krb5_nfold() 96 /* compute the msbit in k which gets added into this byte */ in krb5_nfold() 99 * unrotated byte */ in krb5_nfold() 100 ((inbits << 3) - 1) in krb5_nfold() 101 /* then, for each byte, shift to the right in krb5_nfold() 104 /* last, pick out the correct byte within in krb5_nfold() 106 + ((inbits - (i % inbits)) << 3) in krb5_nfold() [all …]
|
/linux-5.10/drivers/media/usb/tm6000/ |
D | tm6000-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // tm6000-i2c.c - driver for TM5600/TM6000/TM6010 USB video capture devices 4 // Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@kernel.org> 7 // - Fix SMBus Read Byte command 15 #include "tm6000-regs.h" 16 #include <media/v4l2-common.h> 18 #include "tuner-xc2028.h" 21 /* ----------------------------------------------------------- */ 29 dev->name, __func__, ##args); } while (0) 32 __u8 reg, char *buf, int len) in tm6000_i2c_send_regs() argument [all …]
|
/linux-5.10/fs/ntfs/ |
D | bitmap.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * bitmap.c - NTFS kernel bitmap handling. Part of the Linux-NTFS project. 5 * Copyright (c) 2004-2005 Anton Altaparmakov 18 * __ntfs_bitmap_set_bits_in_run - set a run of bits in a bitmap to a value 31 * Return 0 on success and -errno on error. 41 int pos, len; in __ntfs_bitmap_set_bits_in_run() local 46 "value %u.%s", vi->i_ino, (unsigned long long)start_bit, in __ntfs_bitmap_set_bits_in_run() 54 * bits, i.e. @start_bit and @start_bit + @cnt - 1, respectively. in __ntfs_bitmap_set_bits_in_run() 57 end_index = (start_bit + cnt - 1) >> (3 + PAGE_SHIFT); in __ntfs_bitmap_set_bits_in_run() 60 mapping = vi->i_mapping; in __ntfs_bitmap_set_bits_in_run() [all …]
|
/linux-5.10/drivers/parport/ |
D | ieee1284_ops.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* IEEE-1284 operations for parport. 5 * they are used by the low-level drivers. If they have a special way 7 * the function pointers in port->ops); if not, they can just use these 31 * One-way data transfer functions. * 36 const void *buffer, size_t len, in parport_ieee1284_write_compat() argument 42 unsigned char byte; in parport_ieee1284_write_compat() local 43 struct pardevice *dev = port->physport->cad; in parport_ieee1284_write_compat() 47 if (port->irq != PARPORT_IRQ_NONE) { in parport_ieee1284_write_compat() 52 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA; in parport_ieee1284_write_compat() [all …]
|
/linux-5.10/drivers/i2c/ |
D | i2c-stub.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 i2c-stub.c - I2C/SMBus chip emulator 6 Copyright (C) 2007-2014 Jean Delvare <jdelvare@suse.de> 11 #define pr_fmt(fmt) "i2c-stub: " fmt 48 module_param_array(bank_reg, byte, NULL, S_IRUGO); 52 module_param_array(bank_mask, byte, NULL, S_IRUGO); 56 module_param_array(bank_start, byte, NULL, S_IRUGO); 60 module_param_array(bank_end, byte, NULL, S_IRUGO); 66 u8 len; member 72 u16 words[256]; /* Byte operations use the LSB as per SMBus [all …]
|
D | i2c-core-smbus.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * (e.g. smbalert) are handled in a separate i2c-smbus module. 9 * All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> 16 #include <linux/i2c-smbus.h> 19 #include "i2c-core.h" 50 /* Assume a 7-bit address, which is reasonable for SMBus */ 58 return i2c_smbus_pec(pec, msg->buf, msg->len); in i2c_smbus_msg_pec() 64 msg->buf[msg->len] = i2c_smbus_msg_pec(0, msg); in i2c_smbus_add_pec() 65 msg->len++; in i2c_smbus_add_pec() 72 message length to hide the CRC byte from the caller). */ [all …]
|
/linux-5.10/drivers/media/usb/cx231xx/ |
D | cx231xx-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 cx231xx-i2c.c - driver for Conexant Cx23100/101/102 USB video capture devices 15 #include <linux/i2c-mux.h> 16 #include <media/v4l2-common.h> 20 /* ----------------------------------------------------------- */ 41 dev->name, __func__ , ##args); \ 48 return dev->port_3_switch_enabled ? I2C_1_MUX_3 : I2C_1_MUX_1; in get_real_i2c_port() 55 int i2c_port = get_real_i2c_port(dev, bus->nr); in is_tuner() 57 if (i2c_port != dev->board.tuner_i2c_master) in is_tuner() 60 if (msg->addr != dev->board.tuner_addr) in is_tuner() [all …]
|
/linux-5.10/drivers/gpu/drm/amd/amdkfd/ |
D | kfd_smi_events.c | 63 struct kfd_smi_client *client = filep->private_data; in kfd_smi_ev_poll() 66 poll_wait(filep, &client->wait_queue, wait); in kfd_smi_ev_poll() 68 spin_lock(&client->lock); in kfd_smi_ev_poll() 69 if (!kfifo_is_empty(&client->fifo)) in kfd_smi_ev_poll() 71 spin_unlock(&client->lock); in kfd_smi_ev_poll() 81 struct kfd_smi_client *client = filep->private_data; in kfd_smi_ev_read() 86 return -ENOMEM; in kfd_smi_ev_read() 91 spin_lock(&client->lock); in kfd_smi_ev_read() 92 to_copy = kfifo_len(&client->fifo); in kfd_smi_ev_read() 94 spin_unlock(&client->lock); in kfd_smi_ev_read() [all …]
|
/linux-5.10/drivers/net/wan/ |
D | sdla.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * multi-protocol PC interface card. Initial offering is with 76 #define SDLA_WINDOW(dev,addr) outb((((addr) >> 13) & 0x1F), (dev)->base_addr + SDLA_REG_Z80_WINDOW) 78 static void __sdla_read(struct net_device *dev, int addr, void *buf, short len) in __sdla_read() argument 85 while(len) in __sdla_read() 88 bytes = offset + len > SDLA_WINDOW_SIZE ? SDLA_WINDOW_SIZE - offset : len; in __sdla_read() 89 base = (const void *) (dev->mem_start + offset); in __sdla_read() 96 len -= bytes; in __sdla_read() 100 static void sdla_read(struct net_device *dev, int addr, void *buf, short len) in sdla_read() argument 104 __sdla_read(dev, addr, buf, len); in sdla_read() [all …]
|
/linux-5.10/drivers/nfc/st21nfca/ |
D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/crc-ccitt.h> 32 * called byte stuffing has been introduced. 34 * if byte == ST21NFCA_SOF_EOF or ST21NFCA_ESCAPE_BYTE_STUFFING 35 * - insert ST21NFCA_ESCAPE_BYTE_STUFFING (escape byte) 36 * - xor byte with ST21NFCA_BYTE_STUFFING_MASK 86 16, 1, (skb)->data, (skb)->len, 0); \ 100 int i, r = -1; in st21nfca_hci_platform_init() 103 r = i2c_master_send(phy->i2c_dev, reboot_cmd, in st21nfca_hci_platform_init() 113 r = -1; in st21nfca_hci_platform_init() [all …]
|
/linux-5.10/drivers/infiniband/hw/hfi1/ |
D | qsfp.h | 24 * - Redistributions of source code must retain the above copyright 26 * - Redistributions in binary form must reproduce the above copyright 30 * - Neither the name of Intel Corporation nor the names of its 52 /* 128 byte pages, per SFF 8636 rev 2.4 */ 67 /* Reads/writes cannot cross 128 byte boundaries */ 75 /* Byte 0 is Identifier, not checked */ 76 /* Byte 1 is reserved "status MSB" */ 79 #define QSFP_MONITOR_RANGE (QSFP_MONITOR_VAL_END - QSFP_MONITOR_VAL_START + 1) 85 /* Byte 128 is Identifier: must be 0x0c for QSFP, or 0x0d for QSFP+ */ 88 * Byte 129 is "Extended Identifier". [all …]
|
/linux-5.10/Documentation/input/devices/ |
D | iforce-protocol.rst | 7 Home page at `<http://web.archive.org/web/*/http://www.esil.univ-mrs.fr>`_ 16 specify force effects to I-Force 2.0 devices. None of this information comes 25 send data to your I-Force device based on what you read in this document. 30 All values are hexadecimal with big-endian encoding (msb on the left). Beware, 31 values inside packets are encoded using little-endian. Bytes whose roles are 35 ------------------------ 40 2B OP LEN DATA CS 51 The 2B, LEN and CS fields have disappeared, probably because USB handles 63 LEN= Varies from device to device 64 00 X-Axis lsb [all …]
|
/linux-5.10/lib/zstd/ |
D | zstd_opt.h | 2 * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc. 5 * This source code is licensed under the BSD-style license found in the 12 * Free Software Foundation. This program is dual-licensed; you may select 26 /*-************************************* 31 ssPtr->log2matchLengthSum = ZSTD_highbit32(ssPtr->matchLengthSum + 1); in ZSTD_setLog2Prices() 32 ssPtr->log2litLengthSum = ZSTD_highbit32(ssPtr->litLengthSum + 1); in ZSTD_setLog2Prices() 33 ssPtr->log2litSum = ZSTD_highbit32(ssPtr->litSum + 1); in ZSTD_setLog2Prices() 34 ssPtr->log2offCodeSum = ZSTD_highbit32(ssPtr->offCodeSum + 1); in ZSTD_setLog2Prices() 35 …ssPtr->factor = 1 + ((ssPtr->litSum >> 5) / ssPtr->litLengthSum) + ((ssPtr->litSum << 1) / (ssPtr-… in ZSTD_setLog2Prices() 38 ZSTD_STATIC void ZSTD_rescaleFreqs(seqStore_t *ssPtr, const BYTE *src, size_t srcSize) in ZSTD_rescaleFreqs() [all …]
|
/linux-5.10/net/dsa/ |
D | tag_ksz.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * net/dsa/tag_ksz.c - Microchip KSZ Switch tag format handling 13 /* Typically only one byte is used for tail tag. */ 18 struct net_device *dev, int len) in ksz_common_xmit() argument 23 padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; in ksz_common_xmit() 25 if (skb_tailroom(skb) >= padlen + len) { in ksz_common_xmit() 27 if (__skb_put_padto(skb, skb->len + padlen, false)) in ksz_common_xmit() 32 nskb = alloc_skb(NET_IP_ALIGN + skb->len + in ksz_common_xmit() 33 padlen + len, GFP_ATOMIC); in ksz_common_xmit() 40 skb_network_header(skb) - skb->head); in ksz_common_xmit() [all …]
|
/linux-5.10/drivers/pci/ |
D | syscall.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * stuff - it would probably be preferable on PCs too, but there people 16 unsigned long, off, unsigned long, len, void __user *, buf) in SYSCALL_DEFINE5() argument 19 u8 byte; in SYSCALL_DEFINE5() local 26 return -EPERM; in SYSCALL_DEFINE5() 28 err = -ENODEV; in SYSCALL_DEFINE5() 33 switch (len) { in SYSCALL_DEFINE5() 35 cfg_ret = pci_user_read_config_byte(dev, off, &byte); in SYSCALL_DEFINE5() 44 err = -EINVAL; in SYSCALL_DEFINE5() 48 err = -EIO; in SYSCALL_DEFINE5() [all …]
|
/linux-5.10/drivers/media/platform/mtk-jpeg/ |
D | mtk_jpeg_dec_parse.c | 1 // SPDX-License-Identifier: GPL-2.0-only 27 if (stream->curr >= stream->size) in read_byte() 28 return -1; in read_byte() 29 return stream->addr[stream->curr++]; in read_byte() 35 int byte; in read_word_be() local 37 byte = read_byte(stream); in read_word_be() 38 if (byte == -1) in read_word_be() 39 return -1; in read_word_be() 40 temp = byte << 8; in read_word_be() 41 byte = read_byte(stream); in read_word_be() [all …]
|