/linux/include/linux/ |
H A D | find.h | 21 extern unsigned long _find_first_bit(const unsigned long *addr, unsigned long size); 22 unsigned long __find_nth_bit(const unsigned long *addr, unsigned long size, unsigned long n); 24 unsigned long size, unsigned long n); 26 unsigned long size, unsigned long n); 28 const unsigned long *addr3, unsigned long size, 31 const unsigned long *addr2, unsigned long size); 33 const unsigned long *addr3, unsigned long size); 34 extern unsigned long _find_first_zero_bit(const unsigned long *addr, unsigned long size); 35 extern unsigned long _find_last_bit(const unsigned long *addr, unsigned long size); 38 unsigned long _find_first_zero_bit_le(const unsigned long *addr, unsigned long size); [all …]
|
/linux/scripts/coccinelle/api/ |
H A D | kvmalloc.cocci | 24 expression E, E1, size; 33 * if (size cmp E1 || ...)@p { 37 * (..., size, \(flags\|GFP_KERNEL\|\(GFP_KERNEL\|flags\)|__GFP_NOWARN\), ...) 41 * E = \(vmalloc\|vzalloc\|vmalloc_node\|vzalloc_node\)(..., size, ...) 47 * (..., size, \(flags\|GFP_KERNEL\|\(GFP_KERNEL\|flags\)|__GFP_NOWARN\), ...) 49 when != size = E1 53 * E = \(vmalloc\|vzalloc\|vmalloc_node\|vzalloc_node\)(..., size, ...) 59 * (..., size, \(flags\|GFP_KERNEL\|\(GFP_KERNEL\|flags\)|__GFP_NOWARN\), ...); 61 when != size = E1 65 * x = \(vmalloc\|vzalloc\|vmalloc_node\|vzalloc_node\)(..., size, ...) [all …]
|
/linux/scripts/ |
H A D | extract_xc3028.pl | 51 # Calc chunk size 131 my $size = ord(substr($out,$i,1))*256+ord(substr($out,$i+1,1)); 135 if ($size>0 && $size <0x8000) { 136 for (my $j=0;$j<$size;$j++) { 139 $i+=$size; 163 # Firmware 0, type: BASE FW F8MHZ (0x00000003), id: (0000000000000000), size: 6635 168 write_le32(6635); # Size 172 # Firmware 1, type: BASE FW F8MHZ MTS (0x00000007), id: (0000000000000000), size: 6635 177 write_le32(6635); # Size 181 # Firmware 2, type: BASE FW FM (0x00000401), id: (0000000000000000), size: 6525 [all …]
|
/linux/tools/include/linux/ |
H A D | find.h | 17 extern unsigned long _find_first_bit(const unsigned long *addr, unsigned long size); 19 const unsigned long *addr2, unsigned long size); 20 extern unsigned long _find_first_zero_bit(const unsigned long *addr, unsigned long size); 26 * @size: The bitmap size in bits 30 * If no bits are set, returns @size. 33 unsigned long find_next_bit(const unsigned long *addr, unsigned long size, in find_next_bit() argument 36 if (small_const_nbits(size)) { in find_next_bit() 39 if (unlikely(offset >= size)) in find_next_bit() 40 return size; in find_next_bit() 42 val = *addr & GENMASK(size - 1, offset); in find_next_bit() [all …]
|
/linux/tools/testing/selftests/exec/ |
H A D | binfmt_script.py | 14 SIZE=256 variable 35 # @size: bytes for bprm->buf line, including hashbang but not newline 42 # @fill: character to fill between @root and @target to reach @size bytes 43 # @newline: character to use as newline, not counted towards @size 45 def test(name, size, good=True, leading="", root="./", target="/perl", argument 54 remaining = size - len(hashbang) - len(leading) - len(root) - len(target) - len(arg) 117 test(name="too-big", size=SIZE+80, good=False) 118 # Path is right at max size, making it impossible to tell if it was truncated. 119 test(name="exact", size=SIZE, good=False) 121 test(name="exact-space", size=SIZE, good=False, leading=" ") [all …]
|
/linux/arch/arm/boot/dts/aspeed/ |
H A D | aspeed-bmc-facebook-cmm.dts | 334 #size-cells = <0>; 341 #size-cells = <0>; 347 #size-cells = <0>; 353 #size-cells = <0>; 358 #size-cells = <0>; 363 #size-cells = <0>; 368 #size-cells = <0>; 373 #size-cells = <0>; 378 #size-cells = <0>; 383 #size-cells = <0>; [all …]
|
H A D | aspeed-bmc-facebook-fuji.dts | 219 data-size = <16>; 239 #size-cells = <0>; 245 #size-cells = <0>; 252 #size-cells = <0>; 259 #size-cells = <0>; 265 #size-cells = <0>; 271 #size-cells = <0>; 277 #size-cells = <0>; 283 #size-cells = <0>; 289 #size-cells = <0>; [all …]
|
H A D | aspeed-bmc-facebook-minipack.dts | 249 #size-cells = <1>; 299 #size-cells = <1>; 350 #size-cells = <0>; 356 #size-cells = <0>; 362 #size-cells = <0>; 368 #size-cells = <0>; 374 #size-cells = <0>; 380 #size-cells = <0>; 386 #size-cells = <0>; 392 #size-cells = <0>; [all …]
|
/linux/fs/bcachefs/ |
H A D | eytzinger.h | 49 static inline unsigned eytzinger1_first(unsigned size) in eytzinger1_first() argument 51 return size ? rounddown_pow_of_two(size) : 0; in eytzinger1_first() 54 static inline unsigned eytzinger1_last(unsigned size) in eytzinger1_last() argument 56 return rounddown_pow_of_two(size + 1) - 1; in eytzinger1_last() 69 static inline unsigned eytzinger1_next(unsigned i, unsigned size) in eytzinger1_next() argument 71 EYTZINGER_BUG_ON(i > size); in eytzinger1_next() 73 if (eytzinger1_right_child(i) <= size) { in eytzinger1_next() 76 i <<= __fls(size + 1) - __fls(i); in eytzinger1_next() 77 i >>= i > size; in eytzinger1_next() 85 static inline unsigned eytzinger1_prev(unsigned i, unsigned size) in eytzinger1_prev() argument [all …]
|
/linux/arch/riscv/boot/dts/sophgo/ |
H A D | sg2042-cpus.dtsi | 9 #size-cells = <0>; 265 i-cache-block-size = <64>; 266 i-cache-size = <65536>; 268 d-cache-block-size = <64>; 269 d-cache-size = <65536>; 290 i-cache-block-size = <64>; 291 i-cache-size = <65536>; 293 d-cache-block-size = <64>; 294 d-cache-size = <65536>; 315 i-cache-block-size = <64>; [all …]
|
/linux/tools/testing/memblock/tests/ |
H A D | basic_api.c | 37 * and size to the collection of available memory regions (memblock.memory). 49 .size = SZ_4M in memblock_add_simple_check() 55 memblock_add(r.base, r.size); in memblock_add_simple_check() 58 ASSERT_EQ(rgn->size, r.size); in memblock_add_simple_check() 61 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_simple_check() 69 * A simple test that adds a memory block of a specified base address, size, 82 .size = SZ_16M in memblock_add_node_simple_check() 88 memblock_add_node(r.base, r.size, 1, MEMBLOCK_HOTPLUG); in memblock_add_node_simple_check() 91 ASSERT_EQ(rgn->size, r.size); in memblock_add_node_simple_check() 98 ASSERT_EQ(memblock.memory.total_size, r.size); in memblock_add_node_simple_check() [all …]
|
H A D | alloc_nid_api.c | 30 static inline void *run_memblock_alloc_nid(phys_addr_t size, in run_memblock_alloc_nid() argument 42 return memblock_alloc_exact_nid_raw(size, align, min_addr, in run_memblock_alloc_nid() 45 return memblock_alloc_try_nid_raw(size, align, min_addr, in run_memblock_alloc_nid() 47 return memblock_alloc_try_nid(size, align, min_addr, max_addr, nid); in run_memblock_alloc_nid() 68 phys_addr_t size = SZ_128; in alloc_nid_top_down_simple_check() local 79 allocated_ptr = run_memblock_alloc_nid(size, SMP_CACHE_BYTES, in alloc_nid_top_down_simple_check() 82 rgn_end = rgn->base + rgn->size; in alloc_nid_top_down_simple_check() 85 assert_mem_content(allocated_ptr, size, alloc_nid_test_flags); in alloc_nid_top_down_simple_check() 87 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_simple_check() 88 ASSERT_EQ(rgn->base, max_addr - size); in alloc_nid_top_down_simple_check() [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | mseal_test.c | 26 int size = 0; in get_vma_size() local 38 size = addr_end - addr_start; in get_vma_size() 50 return size; in get_vma_size() 65 static int sys_mprotect(void *ptr, size_t size, unsigned long prot) in sys_mprotect() argument 70 sret = syscall(__NR_mprotect, ptr, size, prot); in sys_mprotect() 74 static int sys_mprotect_pkey(void *ptr, size_t size, unsigned long orig_prot, in sys_mprotect_pkey() argument 80 sret = syscall(__NR_pkey_mprotect, ptr, size, orig_prot, pkey); in sys_mprotect_pkey() 84 static int sys_munmap(void *ptr, size_t size) in sys_munmap() argument 89 sret = syscall(__NR_munmap, ptr, size); in sys_munmap() 170 static void setup_single_address(int size, voi argument 178 setup_single_address_rw(int size,void ** ptrOut) setup_single_address_rw() argument 187 clean_single_address(void * ptr,int size) clean_single_address() argument 194 seal_single_address(void * ptr,int size) seal_single_address() argument 234 unsigned long size = 4 * page_size; test_seal_addseal() local 250 unsigned long size = 4 * page_size; test_seal_unmapped_start() local 278 unsigned long size = 4 * page_size; test_seal_unmapped_middle() local 310 unsigned long size = 4 * page_size; test_seal_unmapped_end() local 339 unsigned long size = 4 * page_size; test_seal_multiple_vmas() local 370 unsigned long size = 4 * page_size; test_seal_split_start() local 395 unsigned long size = 4 * page_size; test_seal_split_end() local 419 unsigned long size = 4 * page_size; test_seal_invalid_input() local 454 unsigned long size = 4 * page_size; test_seal_zero_length() local 478 unsigned long size = 4 * page_size; test_seal_zero_address() local 505 unsigned long size = 4 * page_size; test_seal_twice() local 524 unsigned long size = 4 * page_size; test_seal_mprotect() local 548 unsigned long size = 4 * page_size; test_seal_start_mprotect() local 578 unsigned long size = 4 * page_size; test_seal_end_mprotect() local 608 unsigned long size = 4 * page_size; test_seal_mprotect_unalign_len() local 637 unsigned long size = 4 * page_size; test_seal_mprotect_unalign_len_variant_2() local 665 unsigned long size = 4 * page_size; test_seal_mprotect_two_vma() local 700 unsigned long size = 4 * page_size; test_seal_mprotect_two_vma_with_split() local 747 unsigned long size = 4 * page_size; test_seal_mprotect_partial_mprotect() local 773 unsigned long size = 2 * page_size; test_seal_mprotect_partial_mprotect_tail() local 809 unsigned long size = 4 * page_size; test_seal_mprotect_two_vma_with_gap() local 852 unsigned long size = 4 * page_size; test_seal_mprotect_split() local 889 unsigned long size = 4 * page_size; test_seal_mprotect_merge() local 923 unsigned long size = 4 * page_size; test_seal_munmap() local 954 unsigned long size = 4 * page_size; test_seal_munmap_two_vma() local 995 unsigned long size = 4 * page_size; test_seal_munmap_vma_with_gap() local 1026 unsigned long size = 2 * page_size; test_seal_munmap_partial_across_vmas() local 1056 unsigned long size = 4 * page_size; test_munmap_start_freed() local 1096 unsigned long size = 4 * page_size; test_munmap_end_freed() local 1126 unsigned long size = 4 * page_size; test_munmap_middle_freed() local 1170 unsigned long size = 4 * page_size; test_seal_mremap_shrink() local 1199 unsigned long size = 4 * page_size; test_seal_mremap_expand() local 1231 unsigned long size = page_size; test_seal_mremap_move() local 1264 unsigned long size = page_size; test_seal_mmap_overwrite_prot() local 1292 unsigned long size = 12 * page_size; test_seal_mmap_expand() local 1323 unsigned long size = 12 * page_size; test_seal_mmap_shrink() local 1352 unsigned long size = 4 * page_size; test_seal_mremap_shrink_fixed() local 1383 unsigned long size = 4 * page_size; test_seal_mremap_expand_fixed() local 1414 unsigned long size = 4 * page_size; test_seal_mremap_move_fixed() local 1443 unsigned long size = 4 * page_size; test_seal_mremap_move_fixed_zero() local 1474 unsigned long size = 4 * page_size; test_seal_mremap_move_dontunmap() local 1503 unsigned long size = 4 * page_size; test_seal_mremap_move_dontunmap_anyaddr() local 1544 unsigned long size; test_seal_merge_and_split() local 1636 unsigned long size = 4 * page_size; test_seal_discard_ro_anon_on_rw() local 1665 unsigned long size = 4 * page_size; test_seal_discard_ro_anon_on_pkey() local 1712 unsigned long size = 4 * page_size; test_seal_discard_ro_anon_on_filebacked() local 1749 unsigned long size = 4 * page_size; test_seal_discard_ro_anon_on_shared() local 1778 unsigned long size = 4 * page_size; test_seal_discard_ro_anon() local 1808 unsigned long size = 2 * page_size; test_seal_discard_across_vmas() local 1839 unsigned long size = 4 * page_size; test_seal_madvise_nodiscard() local [all...] |
H A D | hmm-tests.c | 40 unsigned long size; member 211 munmap(buffer->ptr, buffer->size); in hmm_buffer_free() 219 static int hmm_create_file(unsigned long size) in hmm_create_file() argument 230 r = ftruncate(fd, size); in hmm_create_file() 296 unsigned long size; in TEST_F() local 304 size = npages << self->page_shift; in TEST_F() 310 buffer->size = size; in TEST_F() 311 buffer->mirror = malloc(size); in TEST_F() 314 buffer->ptr = mmap(NULL, size, in TEST_F() 325 for (ptr = buffer->ptr; i < size / sizeof(*ptr); ++i) in TEST_F() [all …]
|
/linux/arch/arm64/boot/dts/amazon/ |
H A D | alpine-v3.dtsi | 17 #size-cells = <2>; 21 #size-cells = <0>; 28 d-cache-size = <0x8000>; 29 d-cache-line-size = <64>; 31 i-cache-size = <0xc000>; 32 i-cache-line-size = <64>; 42 d-cache-size = <0x8000>; 43 d-cache-line-size = <64>; 45 i-cache-size = <0xc000>; 46 i-cache-line-size = <64>; [all …]
|
/linux/tools/perf/trace/beauty/ |
H A D | beauty.h | 30 size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const char *intfmt, bool sho… 31 size_t strarray__scnprintf_suffix(struct strarray *sa, char *bf, size_t size, const char *intfmt, b… 32 size_t strarray__scnprintf_flags(struct strarray *sa, char *bf, size_t size, bool show_prefix, unsi… 34 bool strarray__strtoul(struct strarray *sa, char *bf, size_t size, u64 *ret); 35 bool strarray__strtoul_flags(struct strarray *sa, char *bf, size_t size, u64 *ret); 57 size_t strarrays__scnprintf(struct strarrays *sas, char *bf, size_t size, const char *intfmt, bool … 59 bool strarrays__strtoul(struct strarrays *sas, char *bf, size_t size, u64 *ret); 61 size_t pid__scnprintf_fd(struct trace *trace, pid_t pid, int fd, char *bf, size_t size); 79 * @size: 8 if all we need is an integer, otherwise all of the augmented arg. 84 int size; member [all …]
|
/linux/drivers/mtd/tests/ |
H A D | mtd_nandecctest.c | 48 size_t size) in single_bit_error_data() argument 50 unsigned int offset = get_random_u32_below(size * BITS_PER_BYTE); in single_bit_error_data() 52 memcpy(error_data, correct_data, size); in single_bit_error_data() 57 size_t size) in double_bit_error_data() argument 61 offset[0] = get_random_u32_below(size * BITS_PER_BYTE); in double_bit_error_data() 63 offset[1] = get_random_u32_below(size * BITS_PER_BYTE); in double_bit_error_data() 66 memcpy(error_data, correct_data, size); in double_bit_error_data() 72 static unsigned int random_ecc_bit(size_t size) in random_ecc_bit() argument 76 if (size == 256) { in random_ecc_bit() 89 size_t size) in single_bit_error_ecc() argument [all …]
|
/linux/arch/arm/mm/ |
H A D | dma-mapping.c | 43 size_t size; member 53 size_t size; member 107 static void __dma_clear_buffer(struct page *page, size_t size, int coherent_flag) in __dma_clear_buffer() argument 115 phys_addr_t end = base + size; in __dma_clear_buffer() 116 while (size > 0) { in __dma_clear_buffer() 123 size -= PAGE_SIZE; in __dma_clear_buffer() 129 memset(ptr, 0, size); in __dma_clear_buffer() 131 dmac_flush_range(ptr, ptr + size); in __dma_clear_buffer() 132 outer_flush_range(__pa(ptr), __pa(ptr) + size); in __dma_clear_buffer() 138 * Allocate a DMA buffer for 'dev' of size 'size' using the [all …]
|
/linux/arch/arm/boot/dts/broadcom/ |
H A D | bcm2836.dtsi | 40 #size-cells = <0>; 43 /* Source for d/i-cache-line-size and d/i-cache-sets 47 * Source for d/i-cache-size 56 d-cache-size = <0x8000>; 57 d-cache-line-size = <64>; 58 d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set 59 i-cache-size = <0x8000>; 60 i-cache-line-size = <32>; 61 i-cache-sets = <512>; // 32KiB(size)/32(line-size)=1024ways/2-way set 70 d-cache-size = <0x8000>; [all …]
|
H A D | bcm2837.dtsi | 39 #size-cells = <0>; 42 /* Source for d/i-cache-line-size and d/i-cache-sets 46 * Source for d/i-cache-size 55 d-cache-size = <0x8000>; 56 d-cache-line-size = <64>; 57 d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set 58 i-cache-size = <0x8000>; 59 i-cache-line-size = <64>; 60 i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set 70 d-cache-size = <0x8000>; [all …]
|
/linux/kernel/ |
H A D | stacktrace.c | 40 * @size: Size of the print buffer 47 int stack_trace_snprint(char *buf, size_t size, const unsigned long *entries, in stack_trace_snprint() argument 55 for (i = 0; i < nr_entries && size; i++) { in stack_trace_snprint() 56 generated = snprintf(buf, size, "%*c%pS\n", 1 + spaces, ' ', in stack_trace_snprint() 60 if (generated >= size) { in stack_trace_snprint() 61 buf += size; in stack_trace_snprint() 62 size = 0; in stack_trace_snprint() 65 size -= generated; in stack_trace_snprint() 77 unsigned int size; member 86 if (c->len >= c->size) in stack_trace_consume_entry() [all …]
|
/linux/arch/arm64/boot/dts/amd/ |
H A D | amd-seattle-cpus.dtsi | 6 #size-cells = <0x0>; 49 i-cache-size = <0xC000>; 50 i-cache-line-size = <64>; 52 d-cache-size = <0x8000>; 53 d-cache-line-size = <64>; 65 i-cache-size = <0xC000>; 66 i-cache-line-size = <64>; 68 d-cache-size = <0x8000>; 69 d-cache-line-size = <64>; 80 i-cache-size = <0xC000>; [all …]
|
/linux/lib/ |
H A D | usercopy_kunit.c | 37 size_t size; member 40 static bool is_zeroed(void *from, size_t size) in is_zeroed() argument 42 return memchr_inv(from, 0x0, size) == NULL; in is_zeroed() 52 size_t size = priv->size; in usercopy_test_check_nonzero_user() local 54 KUNIT_ASSERT_GE_MSG(test, size, 2 * PAGE_SIZE, "buffer too small"); in usercopy_test_check_nonzero_user() 58 * effectively. We also don't want to make the size we scan too large, in usercopy_test_check_nonzero_user() 62 size = 1024; in usercopy_test_check_nonzero_user() 63 start = PAGE_SIZE - (size / 2); in usercopy_test_check_nonzero_user() 68 zero_start = size / 4; in usercopy_test_check_nonzero_user() 69 zero_end = size - zero_start; in usercopy_test_check_nonzero_user() [all …]
|
/linux/kernel/dma/ |
H A D | mapping.c | 34 size_t size; member 44 dma_free_attrs(dev, this->size, this->vaddr, this->dma_handle, in dmam_release() 53 WARN_ON(this->size != match->size || in dmam_match() 63 * @size: Size of allocation 69 void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, in dmam_free_coherent() argument 72 struct dma_devres match_data = { size, vaddr, dma_handle }; in dmam_free_coherent() 75 dma_free_coherent(dev, size, vaddr, dma_handle); in dmam_free_coherent() 82 * @size: Size of allocation 93 void *dmam_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, in dmam_alloc_attrs() argument 103 vaddr = dma_alloc_attrs(dev, size, dma_handle, gfp, attrs); in dmam_alloc_attrs() [all …]
|
/linux/lib/crypto/mpi/ |
H A D | mpih-mul.c | 21 #define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) \ argument 23 if ((size) < KARATSUBA_THRESHOLD) \ 24 mul_n_basecase(prodp, up, vp, size); \ 26 mul_n(prodp, up, vp, size, tspace); \ 29 #define MPN_SQR_N_RECURSE(prodp, up, size, tspace) \ argument 31 if ((size) < KARATSUBA_THRESHOLD) \ 32 mpih_sqr_n_basecase(prodp, up, size); \ 34 mpih_sqr_n(prodp, up, size, tspace); \ 38 * both with SIZE limbs, and store the result at PRODP. 2 * SIZE limbs are 55 mul_n_basecase(mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, mpi_size_t size) in mul_n_basecase() argument [all …]
|