Home
last modified time | relevance | path

Searched +full:byte +full:- +full:len (Results 1 – 25 of 1067) sorted by relevance

12345678910>>...43

/Linux-v6.1/tools/perf/util/intel-pt-decoder/
Dintel-pt-pkt-decoder.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (c) 2013-2014, Intel Corporation.
13 #include "intel-pt-pkt-decoder.h"
77 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument
83 if (len < 8) in intel_pt_get_long_tnt()
88 for (count = 47; count; count--) { in intel_pt_get_long_tnt()
94 packet->type = INTEL_PT_TNT; in intel_pt_get_long_tnt()
95 packet->count = count; in intel_pt_get_long_tnt()
96 packet->payload = payload << 1; in intel_pt_get_long_tnt()
100 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument
[all …]
/Linux-v6.1/arch/ia64/lib/
Dclear_user.S1 /* 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 …]
Dcopy_user.S1 /* 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-v6.1/arch/xtensa/lib/
Dstrncpy_user.S8 * 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
53 # a2/ dst, a3/ src, a4/ len
55 beqz a4, .Lret # if len is zero
56 movi a5, MASK0 # mask for byte 0
57 movi a6, MASK1 # mask for byte 1
58 movi a7, MASK2 # mask for byte 2
59 movi a8, MASK3 # mask for byte 3
60 bbsi.l a3, 0, .Lsrc1mod2 # if only 8-bit aligned
[all …]
Dchecksum.S1 /* 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 …]
Dstrnlen_user.S19 * 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 …]
Dusercopy.S8 * 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
69 # a2/ dst, a3/ src, a4/ len
71 mov a11, a4 # preserve original len for error case
80 __ssa8 a3 # set shift amount from byte offset
82 movi a2, 0 # return success for len==0
89 .Ldst1mod2: # dst is only byte aligned
90 bltui a4, 7, .Lbytecopy # do short copies byte by byte
[all …]
/Linux-v6.1/drivers/tty/
Dehv_bytechan.c1 // 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-v6.1/net/sunrpc/auth_gss/
Dgss_krb5_keys.c69 * 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-v6.1/lib/
Dasn1_encoder.c1 // SPDX-License-Identifier: GPL-2.0-only
14 * asn1_encode_integer() - encode positive integer to ASN.1
16 * @end_data: end of data pointer, points one beyond last usable byte in @data
27 int data_len = end_data - data; in asn1_encode_integer()
34 return ERR_PTR(-EINVAL); in asn1_encode_integer()
41 return ERR_PTR(-EINVAL); in asn1_encode_integer()
44 data_len -= 2; in asn1_encode_integer()
52 for (i = sizeof(integer); i > 0 ; i--) { in asn1_encode_integer()
53 int byte = integer >> (8 * (i - 1)); in asn1_encode_integer() local
55 if (!found && byte == 0) in asn1_encode_integer()
[all …]
/Linux-v6.1/drivers/staging/media/deprecated/tm6000/
Dtm6000-i2c.c1 // 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>
21 /* ----------------------------------------------------------- */
29 dev->name, __func__, ##args); } while (0)
32 __u8 reg, char *buf, int len) in tm6000_i2c_send_regs() argument
37 if (dev->dev_type == TM6010) in tm6000_i2c_send_regs()
[all …]
/Linux-v6.1/fs/ntfs/
Dbitmap.c1 // 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-v6.1/drivers/parport/
Dieee1284_ops.c1 // 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-v6.1/drivers/i2c/
Di2c-stub.c1 // 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>
10 #define pr_fmt(fmt) "i2c-stub: " fmt
47 module_param_array(bank_reg, byte, NULL, S_IRUGO);
51 module_param_array(bank_mask, byte, NULL, S_IRUGO);
55 module_param_array(bank_start, byte, NULL, S_IRUGO);
59 module_param_array(bank_end, byte, NULL, S_IRUGO);
65 u8 len; member
71 u16 words[256]; /* Byte operations use the LSB as per SMBus
[all …]
Di2c-core-smbus.c1 // 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>
20 #include "i2c-core.h"
42 * i2c_smbus_pec - Incremental CRC8 over the given input data array
59 /* Assume a 7-bit address, which is reasonable for SMBus */
67 return i2c_smbus_pec(pec, msg->buf, msg->len); in i2c_smbus_msg_pec()
73 msg->buf[msg->len] = i2c_smbus_msg_pec(0, msg); in i2c_smbus_add_pec()
74 msg->len++; in i2c_smbus_add_pec()
[all …]
/Linux-v6.1/drivers/media/usb/cx231xx/
Dcx231xx-i2c.c1 // 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-v6.1/drivers/infiniband/hw/hfi1/
Dqsfp.h1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
10 /* 128 byte pages, per SFF 8636 rev 2.4 */
25 /* Reads/writes cannot cross 128 byte boundaries */
33 /* Byte 0 is Identifier, not checked */
34 /* Byte 1 is reserved "status MSB" */
37 #define QSFP_MONITOR_RANGE (QSFP_MONITOR_VAL_END - QSFP_MONITOR_VAL_START + 1)
43 /* Byte 128 is Identifier: must be 0x0c for QSFP, or 0x0d for QSFP+ */
46 * Byte 129 is "Extended Identifier".
51 /* Byte 130 is Connector type. Not Intel req'd */
53 /* Byte 139 is encoding. code 0x01 is 8b10b. Not Intel req'd */
[all …]
/Linux-v6.1/Documentation/hid/
Dhidraw.rst2 HIDRAW - Raw Access to USB and Bluetooth Human Interface Devices
15 Hidraw is also useful for communicating with non-conformant HID devices
19 communication with these non-conformant devices is impossible using hiddev.
21 these non-conformant devices.
31 directly under /dev (eg: /dev/hidraw0). As this location is distribution-
32 and udev rule-dependent, applications should use libudev to locate hidraw
40 ---------------
43 -------
47 a report available to be read. read() can be made non-blocking, by passing
51 On a device which uses numbered reports, the first byte of the returned data
[all …]
/Linux-v6.1/arch/arm64/lib/
Dstrlen.S1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2013-2021, Arm Limited.
6 * https://github.com/ARM-software/optimized-routines/blob/98e4d6a5c13c8e54/string/aarch64/strlen.S
11 #include <asm/mte-def.h>
15 * ARMv8-a, AArch64, unaligned accesses, min page size 4k.
22 #define len x0 macro
36 /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
37 (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
39 (X - 1) & 0x80 is zero for non-NUL ASCII characters, but gives
48 * (16-byte) granularity, and we must ensure that no access straddles this
[all …]
/Linux-v6.1/drivers/nfc/st21nfca/
Di2c.c1 // SPDX-License-Identifier: GPL-2.0-only
9 #include <linux/crc-ccitt.h>
30 * called byte stuffing has been introduced.
32 * if byte == ST21NFCA_SOF_EOF or ST21NFCA_ESCAPE_BYTE_STUFFING
33 * - insert ST21NFCA_ESCAPE_BYTE_STUFFING (escape byte)
34 * - xor byte with ST21NFCA_BYTE_STUFFING_MASK
84 16, 1, (skb)->data, (skb)->len, 0); \
98 int i, r = -1; in st21nfca_hci_platform_init()
101 r = i2c_master_send(phy->i2c_dev, reboot_cmd, in st21nfca_hci_platform_init()
111 r = -1; in st21nfca_hci_platform_init()
[all …]
/Linux-v6.1/Documentation/input/devices/
Diforce-protocol.rst7 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-v6.1/drivers/pci/
Dsyscall.c1 // 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
24 err = -EPERM; in SYSCALL_DEFINE5()
29 err = -ENODEV; in SYSCALL_DEFINE5()
34 switch (len) { in SYSCALL_DEFINE5()
36 cfg_ret = pci_user_read_config_byte(dev, off, &byte); in SYSCALL_DEFINE5()
45 err = -EINVAL; in SYSCALL_DEFINE5()
49 err = -EIO; in SYSCALL_DEFINE5()
[all …]
/Linux-v6.1/arch/x86/crypto/
Daesni-intel_asm.S1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Implement AES algorithm in Intel AES-NI instructions.
5 * The white paper of AES-NI instructions can be downloaded from:
6 * http://softwarecommunity.intel.com/isn/downloads/intelavx/AES-Instructions-Set_WP.pdf
13 * Added RFC4106 AES-GCM support for 128-bit keys under the AEAD
14 * interface for 64-bit kernels.
30 #include <asm/nospec-branch.h>
33 * The following macros are used to move an (un)aligned 16 byte value to/from
37 * since Nehalem (original Core i7) was released. However, the movaps is a byte
153 #define LEN %rcx macro
[all …]
/Linux-v6.1/include/linux/
Dhighmem.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #include "highmem-internal.h"
17 * kmap - Map a page for long term usage
40 * kunmap - Unmap the virtual address mapped by kmap()
49 * kmap_to_page - Get the page for a kmap'ed address
57 * kmap_flush_unused - Flush all unused kmap mappings in order to
63 * kmap_local_page - Map a page for temporary usage
99 * kmap_local_folio - Map a page in this folio for temporary usage
101 * @offset: The byte offset within the folio which identifies the page.
136 * kmap_atomic - Atomically map a page for temporary usage - Deprecated!
[all …]
/Linux-v6.1/drivers/media/platform/mediatek/jpeg/
Dmtk_jpeg_dec_parse.c1 // 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 …]

12345678910>>...43