Home
last modified time | relevance | path

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

12345678910>>...42

/linux/tools/perf/util/intel-pt-decoder/
H A Dintel-pt-pkt-decoder.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (c) 2013-2014, Intel Corporation.
15 #include "intel-pt-pkt-decoder.h"
73 static int intel_pt_get_long_tnt(const unsigned char *buf, size_t len, in intel_pt_get_long_tnt() argument
79 if (len < 8) in intel_pt_get_long_tnt()
84 for (count = 47; count; count--) { in intel_pt_get_long_tnt()
90 packet->type = INTEL_PT_TNT; in intel_pt_get_long_tnt()
91 packet->count = count; in intel_pt_get_long_tnt()
92 packet->payload = payload << 1; in intel_pt_get_long_tnt()
96 static int intel_pt_get_pip(const unsigned char *buf, size_t len, in intel_pt_get_pip() argument
[all …]
/linux/arch/xtensa/lib/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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/drivers/tty/
H A 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/lib/
H A 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/drivers/parport/
H A 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/drivers/i2c/
H A 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 …]
H A 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/net/sunrpc/auth_gss/
H A Dgss_krb5_keys.c73 * krb5_nfold - n-fold function
79 * This is the n-fold function as described in rfc3961, sec 5.1
86 int byte, i, msbit; in krb5_nfold() local
100 byte = 0; in krb5_nfold()
104 for (i = ulcm-1; i >= 0; i--) { in krb5_nfold()
105 /* compute the msbit in k which gets added into this byte */ in krb5_nfold()
108 * unrotated byte */ in krb5_nfold()
109 ((inbits << 3) - 1) in krb5_nfold()
110 /* then, for each byte, shift to the right in krb5_nfold()
113 /* last, pick out the correct byte within in krb5_nfold()
[all …]
/linux/drivers/s390/crypto/
H A Dpkey_pckmo.c1 // SPDX-License-Identifier: GPL-2.0
37 switch (hdr->type) { in is_pckmo_key()
39 switch (hdr->version) { in is_pckmo_key()
41 switch (t->keytype) { in is_pckmo_key()
87 int keysize, rc = -EINVAL; in pckmo_clr2protkey()
94 /* 16 byte key, 32 byte aes wkvp, total 48 bytes */ in pckmo_clr2protkey()
100 /* 24 byte key, 32 byte aes wkvp, total 56 bytes */ in pckmo_clr2protkey()
106 /* 32 byte key, 32 byte aes wkvp, total 64 bytes */ in pckmo_clr2protkey()
112 /* 32 byte key, 32 byte aes wkvp, total 64 bytes */ in pckmo_clr2protkey()
118 /* 48 byte key, 32 byte aes wkvp, total 80 bytes */ in pckmo_clr2protkey()
[all …]
/linux/Documentation/netlink/specs/
H A Dovs_flow.yaml1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
5 protocol: genetlink-legacy
6 uapi-header: linux/openvswitch.h
12 -
13 name: ovs-header
18 -
19 name: dp-ifindex
24 -
25 name: ovs-flow-stats
28 -
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A 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/Documentation/hid/
H A 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/drivers/nfc/st21nfca/
H A 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/arch/arm64/lib/
H A 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/include/linux/
H A 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.
135 * kmap_atomic - Atomically map a page for temporary usage - Deprecated!
[all …]
/linux/Documentation/input/devices/
H A 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/drivers/platform/chrome/
H A Dcros_ec_i2c.c1 // SPDX-License-Identifier: GPL-2.0
21 * byte 0 0xda (EC_COMMAND_PROTOCOL_3)
22 * byte 1-8 struct ec_host_request
23 * byte 10- response data
34 * byte 0 result code
35 * byte 1 packet_length
36 * byte 2-9 struct ec_host_response
37 * byte 10- response data
55 struct i2c_client *client = ec_dev->priv; in cros_ec_pkt_xfer_i2c()
56 int ret = -ENOMEM; in cros_ec_pkt_xfer_i2c()
[all …]
/linux/fs/unicode/
H A Dutf8-norm.c1 // SPDX-License-Identifier: GPL-2.0-only
11 int i = um->tables->utf8agetab_size - 1; in utf8version_is_supported()
13 while (i >= 0 && um->tables->utf8agetab[i] != 0) { in utf8version_is_supported()
14 if (version == um->tables->utf8agetab[i]) in utf8version_is_supported()
16 i--; in utf8version_is_supported()
22 * UTF-8 valid ranges.
24 * The UTF-8 encoding spreads the bits of a 32bit word over several
35 * There is an additional requirement on UTF-8, in that only the
47 * Actual unicode characters are limited to the range 0x0 - 0x10FFFF,
51 * 0 - 0x7F: 0 - 0x7F
[all …]
/linux/lib/zlib_deflate/
H A Ddefutil.h49 ush len; /* length of bit string */ member
56 #define Len dl.len macro
76 Byte *pending_buf; /* output still pending */
78 Byte *pending_out; /* next pending byte to output to the stream */
81 Byte data_type; /* UNKNOWN, BINARY or ASCII */
82 Byte method; /* STORED (for zip only) or DEFLATED */
89 uInt w_mask; /* w_size - 1 */
91 Byte *window;
95 * wSize-MAX_MATCH bytes, but this ensures that IO is always
117 uInt hash_mask; /* hash_size-1 */
[all …]
/linux/drivers/pci/
H A 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/drivers/i2c/busses/
H A Di2c-brcmstb.c1 // SPDX-License-Identifier: GPL-2.0-only
19 * PER_I2C/BSC count register mask depends on 1 byte/4 byte data register
20 * size. Cable modem and DSL SoCs with Peripheral i2c cores use 1 byte per
21 * data register whereas STB SoCs use 4 byte per data register transfer,
176 __bsc_readl(_dev->base + offsetof(struct bsc_regs, _reg))
179 __bsc_writel(_val, _dev->base + offsetof(struct bsc_regs, _reg))
183 return (N_DATA_REGS * dev->data_regsz); in brcmstb_i2c_get_xfersz()
188 return dev->data_regsz; in brcmstb_i2c_get_data_regsz()
197 dev->bsc_regmap->ctl_reg |= BSC_CTL_REG_INT_EN_MASK; in brcmstb_i2c_enable_disable_irq()
200 dev->bsc_regmap->ctl_reg &= ~BSC_CTL_REG_INT_EN_MASK; in brcmstb_i2c_enable_disable_irq()
[all …]
/linux/drivers/media/platform/mediatek/jpeg/
H A Dmtk_jpeg_dec_parse.c1 // SPDX-License-Identifier: GPL-2.0-only
22 if (stream->curr >= stream->size) in read_byte()
23 return -1; in read_byte()
24 return stream->addr[stream->curr++]; in read_byte()
30 int byte; in read_word_be() local
32 byte = read_byte(stream); in read_word_be()
33 if (byte == -1) in read_word_be()
34 return -1; in read_word_be()
35 temp = byte << 8; in read_word_be()
36 byte = read_byte(stream); in read_word_be()
[all …]

12345678910>>...42