Home
last modified time | relevance | path

Searched refs:nr (Results 1 – 25 of 376) sorted by relevance

12345678910>>...16

/linux-4.19.296/include/asm-generic/bitops/
Dnon-atomic.h16 static inline void __set_bit(int nr, volatile unsigned long *addr) in __set_bit() argument
18 unsigned long mask = BIT_MASK(nr); in __set_bit()
19 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __set_bit()
24 static inline void __clear_bit(int nr, volatile unsigned long *addr) in __clear_bit() argument
26 unsigned long mask = BIT_MASK(nr); in __clear_bit()
27 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __clear_bit()
41 static inline void __change_bit(int nr, volatile unsigned long *addr) in __change_bit() argument
43 unsigned long mask = BIT_MASK(nr); in __change_bit()
44 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __change_bit()
58 static inline int __test_and_set_bit(int nr, volatile unsigned long *addr) in __test_and_set_bit() argument
[all …]
Datomic.h14 static inline void set_bit(unsigned int nr, volatile unsigned long *p) in set_bit() argument
16 p += BIT_WORD(nr); in set_bit()
17 atomic_long_or(BIT_MASK(nr), (atomic_long_t *)p); in set_bit()
20 static inline void clear_bit(unsigned int nr, volatile unsigned long *p) in clear_bit() argument
22 p += BIT_WORD(nr); in clear_bit()
23 atomic_long_andnot(BIT_MASK(nr), (atomic_long_t *)p); in clear_bit()
26 static inline void change_bit(unsigned int nr, volatile unsigned long *p) in change_bit() argument
28 p += BIT_WORD(nr); in change_bit()
29 atomic_long_xor(BIT_MASK(nr), (atomic_long_t *)p); in change_bit()
32 static inline int test_and_set_bit(unsigned int nr, volatile unsigned long *p) in test_and_set_bit() argument
[all …]
Dle.h53 static inline int test_bit_le(int nr, const void *addr) in test_bit_le() argument
55 return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); in test_bit_le()
58 static inline void set_bit_le(int nr, void *addr) in set_bit_le() argument
60 set_bit(nr ^ BITOP_LE_SWIZZLE, addr); in set_bit_le()
63 static inline void clear_bit_le(int nr, void *addr) in clear_bit_le() argument
65 clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); in clear_bit_le()
68 static inline void __set_bit_le(int nr, void *addr) in __set_bit_le() argument
70 __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); in __set_bit_le()
73 static inline void __clear_bit_le(int nr, void *addr) in __clear_bit_le() argument
75 __clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); in __clear_bit_le()
[all …]
Dlock.h18 static inline int test_and_set_bit_lock(unsigned int nr, in test_and_set_bit_lock() argument
22 unsigned long mask = BIT_MASK(nr); in test_and_set_bit_lock()
24 p += BIT_WORD(nr); in test_and_set_bit_lock()
40 static inline void clear_bit_unlock(unsigned int nr, volatile unsigned long *p) in clear_bit_unlock() argument
42 p += BIT_WORD(nr); in clear_bit_unlock()
43 atomic_long_fetch_andnot_release(BIT_MASK(nr), (atomic_long_t *)p); in clear_bit_unlock()
57 static inline void __clear_bit_unlock(unsigned int nr, in __clear_bit_unlock() argument
62 p += BIT_WORD(nr); in __clear_bit_unlock()
64 old &= ~BIT_MASK(nr); in __clear_bit_unlock()
78 static inline bool clear_bit_unlock_is_negative_byte(unsigned int nr, in clear_bit_unlock_is_negative_byte() argument
[all …]
/linux-4.19.296/include/uapi/asm-generic/
Dioctl.h69 #define _IOC(dir,type,nr,size) \ argument
72 ((nr) << _IOC_NRSHIFT) | \
85 #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) argument
86 #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) argument
87 #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) argument
88 #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) argument
89 #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) argument
90 #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) argument
91 #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) argument
94 #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) argument
[all …]
/linux-4.19.296/include/linux/
Dbits.h8 #define BIT(nr) (UL(1) << (nr)) argument
9 #define BIT_ULL(nr) (ULL(1) << (nr)) argument
10 #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG)) argument
11 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) argument
12 #define BIT_ULL_MASK(nr) (ULL(1) << ((nr) % BITS_PER_LONG_LONG)) argument
13 #define BIT_ULL_WORD(nr) ((nr) / BITS_PER_LONG_LONG) argument
Dquotaops.h298 static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) in dquot_alloc_space_nodirty() argument
300 return __dquot_alloc_space(inode, nr, DQUOT_SPACE_WARN); in dquot_alloc_space_nodirty()
303 static inline void dquot_alloc_space_nofail(struct inode *inode, qsize_t nr) in dquot_alloc_space_nofail() argument
305 __dquot_alloc_space(inode, nr, DQUOT_SPACE_WARN|DQUOT_SPACE_NOFAIL); in dquot_alloc_space_nofail()
309 static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) in dquot_alloc_space() argument
313 ret = dquot_alloc_space_nodirty(inode, nr); in dquot_alloc_space()
325 static inline int dquot_alloc_block_nodirty(struct inode *inode, qsize_t nr) in dquot_alloc_block_nodirty() argument
327 return dquot_alloc_space_nodirty(inode, nr << inode->i_blkbits); in dquot_alloc_block_nodirty()
330 static inline void dquot_alloc_block_nofail(struct inode *inode, qsize_t nr) in dquot_alloc_block_nofail() argument
332 dquot_alloc_space_nofail(inode, nr << inode->i_blkbits); in dquot_alloc_block_nofail()
[all …]
Dsbitmap.h244 unsigned int nr; in __sbitmap_for_each_set() local
250 nr = SB_NR_TO_BIT(sb, start); in __sbitmap_for_each_set()
254 unsigned int depth = min_t(unsigned int, word->depth - nr, in __sbitmap_for_each_set()
266 depth += nr; in __sbitmap_for_each_set()
268 nr = find_next_bit(&word->word, depth, nr); in __sbitmap_for_each_set()
269 if (nr >= depth) in __sbitmap_for_each_set()
271 if (!fn(sb, (index << sb->shift) + nr, data)) in __sbitmap_for_each_set()
274 nr++; in __sbitmap_for_each_set()
277 nr = 0; in __sbitmap_for_each_set()
421 int nr; in sbitmap_queue_get() local
[all …]
Dquicklist.h34 static inline void *quicklist_alloc(int nr, gfp_t flags, void (*ctor)(void *)) in quicklist_alloc() argument
39 q =&get_cpu_var(quicklist)[nr]; in quicklist_alloc()
56 static inline void __quicklist_free(int nr, void (*dtor)(void *), void *p, in __quicklist_free() argument
61 q = &get_cpu_var(quicklist)[nr]; in __quicklist_free()
68 static inline void quicklist_free(int nr, void (*dtor)(void *), void *pp) in quicklist_free() argument
70 __quicklist_free(nr, dtor, pp, virt_to_page(pp)); in quicklist_free()
73 static inline void quicklist_free_page(int nr, void (*dtor)(void *), in quicklist_free_page() argument
76 __quicklist_free(nr, dtor, page_address(page), page); in quicklist_free_page()
79 void quicklist_trim(int nr, void (*dtor)(void *),
Dpid.h53 int nr; member
104 extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
105 extern struct pid *find_vpid(int nr);
110 extern struct pid *find_get_pid(int nr);
111 extern struct pid *find_ge_pid(int nr, struct pid_namespace *);
144 return pid->numbers[pid->level].nr == 1; in is_child_reaper()
160 pid_t nr = 0; in pid_nr() local
162 nr = pid->numbers[0].nr; in pid_nr()
163 return nr; in pid_nr()
Dpage_ref.h91 static inline void page_ref_add(struct page *page, int nr) in page_ref_add() argument
93 atomic_add(nr, &page->_refcount); in page_ref_add()
95 __page_ref_mod(page, nr); in page_ref_add()
98 static inline void page_ref_sub(struct page *page, int nr) in page_ref_sub() argument
100 atomic_sub(nr, &page->_refcount); in page_ref_sub()
102 __page_ref_mod(page, -nr); in page_ref_sub()
119 static inline int page_ref_sub_and_test(struct page *page, int nr) in page_ref_sub_and_test() argument
121 int ret = atomic_sub_and_test(nr, &page->_refcount); in page_ref_sub_and_test()
124 __page_ref_mod_and_test(page, -nr, ret); in page_ref_sub_and_test()
155 static inline int page_ref_add_unless(struct page *page, int nr, int u) in page_ref_add_unless() argument
[all …]
/linux-4.19.296/drivers/gpio/
Dgpio-vx855.c97 unsigned int nr) in vx855gpio_direction_input() argument
104 if (nr < NR_VX855_GPI) in vx855gpio_direction_input()
108 if (nr < NR_VX855_GPInO) in vx855gpio_direction_input()
114 reg_out |= gpio_o_bit(nr - NR_VX855_GPInO); in vx855gpio_direction_input()
121 static int vx855gpio_get(struct gpio_chip *gpio, unsigned int nr) in vx855gpio_get() argument
127 if (nr < NR_VX855_GPI) { in vx855gpio_get()
129 if (reg_in & gpi_i_bit(nr)) in vx855gpio_get()
131 } else if (nr < NR_VX855_GPInO) { in vx855gpio_get()
135 if (reg_in & gpo_o_bit(nr - NR_VX855_GPI)) in vx855gpio_get()
139 if (reg_in & gpio_i_bit(nr - NR_VX855_GPInO)) in vx855gpio_get()
[all …]
Dgpio-ich.c118 static int ichx_write_bit(int reg, unsigned nr, int val, int verify) in ichx_write_bit() argument
122 int reg_nr = nr / 32; in ichx_write_bit()
123 int bit = nr & 0x1f; in ichx_write_bit()
153 static int ichx_read_bit(int reg, unsigned nr) in ichx_read_bit() argument
157 int reg_nr = nr / 32; in ichx_read_bit()
158 int bit = nr & 0x1f; in ichx_read_bit()
173 static bool ichx_gpio_check_available(struct gpio_chip *gpio, unsigned nr) in ichx_gpio_check_available() argument
175 return !!(ichx_priv.use_gpio & BIT(nr / 32)); in ichx_gpio_check_available()
178 static int ichx_gpio_get_direction(struct gpio_chip *gpio, unsigned nr) in ichx_gpio_get_direction() argument
180 return ichx_read_bit(GPIO_IO_SEL, nr); in ichx_gpio_get_direction()
[all …]
Dgpio-sta2x11.c66 static void gsta_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) in gsta_gpio_set() argument
69 struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; in gsta_gpio_set()
70 u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); in gsta_gpio_set()
78 static int gsta_gpio_get(struct gpio_chip *gpio, unsigned nr) in gsta_gpio_get() argument
81 struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; in gsta_gpio_get()
82 u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); in gsta_gpio_get()
87 static int gsta_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, in gsta_gpio_direction_output() argument
91 struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; in gsta_gpio_direction_output()
92 u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); in gsta_gpio_direction_output()
103 static int gsta_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) in gsta_gpio_direction_input() argument
[all …]
/linux-4.19.296/drivers/isdn/hardware/eicon/
Ddiva_dma.c59 int nr, void *virt, dword phys, in diva_init_dma_map_entry() argument
61 pmap[nr].phys_bus_addr = phys; in diva_init_dma_map_entry()
62 pmap[nr].local_ram_addr = virt; in diva_init_dma_map_entry()
63 pmap[nr].addr_handle = addr_handle; in diva_init_dma_map_entry()
81 void diva_free_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr) { in diva_free_dma_map_entry() argument
82 pmap[nr].busy = 0; in diva_free_dma_map_entry()
87 void diva_get_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr, in diva_get_dma_map_entry() argument
89 *pphys = pmap[nr].phys_bus_addr; in diva_get_dma_map_entry()
90 *pvirt = pmap[nr].local_ram_addr; in diva_get_dma_map_entry()
92 void *diva_get_entry_handle(struct _diva_dma_map_entry *pmap, int nr) { in diva_get_entry_handle() argument
[all …]
/linux-4.19.296/fs/minix/
Dminix.h107 #define minix_test_and_set_bit(nr, addr) \ argument
108 __test_and_set_bit((nr), (unsigned long *)(addr))
109 #define minix_set_bit(nr, addr) \ argument
110 __set_bit((nr), (unsigned long *)(addr))
111 #define minix_test_and_clear_bit(nr, addr) \ argument
112 __test_and_clear_bit((nr), (unsigned long *)(addr))
113 #define minix_test_bit(nr, addr) \ argument
114 test_bit((nr), (unsigned long *)(addr))
142 #define minix_test_and_set_bit(nr, addr) \ argument
143 __test_and_set_bit((nr) ^ 16, (unsigned long *)(addr))
[all …]
Ditree_common.c84 int nr = minix_new_block(inode); in alloc_branch() local
85 if (!nr) in alloc_branch()
87 branch[n].key = cpu_to_block(nr); in alloc_branch()
90 minix_free_block(inode, nr); in alloc_branch()
102 parent = nr; in alloc_branch()
265 unsigned long nr; in free_data() local
268 nr = block_to_cpu(*p); in free_data()
269 if (nr) { in free_data()
271 minix_free_block(inode, nr); in free_data()
279 unsigned long nr; in free_branches() local
[all …]
/linux-4.19.296/lib/
Dsbitmap.c86 int nr; in __sbitmap_get_word() local
89 nr = find_next_zero_bit(word, depth, hint); in __sbitmap_get_word()
90 if (unlikely(nr >= depth)) { in __sbitmap_get_word()
103 if (!test_and_set_bit_lock(nr, word)) in __sbitmap_get_word()
106 hint = nr + 1; in __sbitmap_get_word()
111 return nr; in __sbitmap_get_word()
117 int nr = -1; in sbitmap_get() local
122 nr = __sbitmap_get_word(&sb->map[index].word, in sbitmap_get()
126 if (nr != -1) { in sbitmap_get()
127 nr += index << sb->shift; in sbitmap_get()
[all …]
Dgenalloc.c86 static int bitmap_set_ll(unsigned long *map, unsigned long start, unsigned long nr) in bitmap_set_ll() argument
89 const unsigned long size = start + nr; in bitmap_set_ll()
93 while (nr >= bits_to_set) { in bitmap_set_ll()
95 return nr; in bitmap_set_ll()
96 nr -= bits_to_set; in bitmap_set_ll()
101 if (nr) { in bitmap_set_ll()
104 return nr; in bitmap_set_ll()
122 bitmap_clear_ll(unsigned long *map, unsigned long start, unsigned long nr) in bitmap_clear_ll() argument
125 const unsigned long size = start + nr; in bitmap_clear_ll()
129 while (nr >= bits_to_clear) { in bitmap_clear_ll()
[all …]
/linux-4.19.296/fs/ext4/
Dindirect.c927 ext4_fsblk_t nr; /* Current block # */ in ext4_free_data() local
942 nr = le32_to_cpu(*p); in ext4_free_data()
943 if (nr) { in ext4_free_data()
946 block_to_free = nr; in ext4_free_data()
949 } else if (nr == block_to_free + count) { in ext4_free_data()
957 block_to_free = nr; in ext4_free_data()
1007 ext4_fsblk_t nr; in ext4_free_branches() local
1018 nr = le32_to_cpu(*p); in ext4_free_branches()
1019 if (!nr) in ext4_free_branches()
1022 if (!ext4_inode_block_valid(inode, nr, 1)) { in ext4_free_branches()
[all …]
/linux-4.19.296/drivers/xen/
Darm-device.c28 unsigned int i, j, nr; in xen_unmap_device_mmio() local
35 nr = DIV_ROUND_UP(resource_size(r), XEN_PAGE_SIZE); in xen_unmap_device_mmio()
36 if ((resource_type(r) != IORESOURCE_MEM) || (nr == 0)) in xen_unmap_device_mmio()
39 for (j = 0; j < nr; j++) { in xen_unmap_device_mmio()
55 unsigned int i, j, nr; in xen_map_device_mmio() local
69 nr = DIV_ROUND_UP(resource_size(r), XEN_PAGE_SIZE); in xen_map_device_mmio()
70 if ((resource_type(r) != IORESOURCE_MEM) || (nr == 0)) in xen_map_device_mmio()
73 gpfns = kcalloc(nr, sizeof(xen_pfn_t), GFP_KERNEL); in xen_map_device_mmio()
74 idxs = kcalloc(nr, sizeof(xen_ulong_t), GFP_KERNEL); in xen_map_device_mmio()
75 errs = kcalloc(nr, sizeof(int), GFP_KERNEL); in xen_map_device_mmio()
[all …]
/linux-4.19.296/fs/ubifs/
Dshrinker.c70 static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) in shrink_tnc() argument
93 while (znode && total_freed < nr && in shrink_tnc()
156 static int shrink_tnc_trees(int nr, int age, int *contention) in shrink_tnc_trees() argument
199 freed += shrink_tnc(c, nr, age, contention); in shrink_tnc_trees()
210 if (freed >= nr) in shrink_tnc_trees()
294 unsigned long nr = sc->nr_to_scan; in ubifs_shrink_scan() local
311 freed = shrink_tnc_trees(nr, OLD_ZNODE_AGE, &contention); in ubifs_shrink_scan()
312 if (freed >= nr) in ubifs_shrink_scan()
316 freed += shrink_tnc_trees(nr - freed, YOUNG_ZNODE_AGE, &contention); in ubifs_shrink_scan()
317 if (freed >= nr) in ubifs_shrink_scan()
[all …]
/linux-4.19.296/fs/ocfs2/
Dblockcheck.c107 u32 ocfs2_hamming_encode(u32 parity, void *data, unsigned int d, unsigned int nr) in ocfs2_hamming_encode() argument
128 b = calc_code_bit(nr + i, &p); in ocfs2_hamming_encode()
166 void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr, in ocfs2_hamming_fix() argument
184 if (fix >= calc_code_bit(nr + d, NULL)) in ocfs2_hamming_fix()
192 b = calc_code_bit(nr, NULL); in ocfs2_hamming_fix()
483 void ocfs2_block_check_compute_bhs(struct buffer_head **bhs, int nr, in ocfs2_block_check_compute_bhs() argument
489 BUG_ON(nr < 0); in ocfs2_block_check_compute_bhs()
491 if (!nr) in ocfs2_block_check_compute_bhs()
496 for (i = 0, crc = ~0, ecc = 0; i < nr; i++) { in ocfs2_block_check_compute_bhs()
527 int ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr, in ocfs2_block_check_validate_bhs() argument
[all …]
Dblockcheck.h48 struct buffer_head **bhs, int nr,
51 struct buffer_head **bhs, int nr,
60 void ocfs2_block_check_compute_bhs(struct buffer_head **bhs, int nr,
62 int ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr,
89 unsigned int nr);
100 void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr,
Dbuffer_head_io.c106 unsigned int nr, struct buffer_head *bhs[]) in ocfs2_read_blocks_sync() argument
113 trace_ocfs2_read_blocks_sync((unsigned long long)block, nr); in ocfs2_read_blocks_sync()
115 if (!nr) in ocfs2_read_blocks_sync()
123 for (i = 0 ; i < nr ; i++) { in ocfs2_read_blocks_sync()
170 for (i = nr; i > 0; i--) { in ocfs2_read_blocks_sync()
209 int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, in ocfs2_read_blocks() argument
220 trace_ocfs2_read_blocks_begin(ci, (unsigned long long)block, nr, flags); in ocfs2_read_blocks()
232 if (nr < 0) { in ocfs2_read_blocks()
233 mlog(ML_ERROR, "asked to read %d blocks!\n", nr); in ocfs2_read_blocks()
239 if (nr == 0) { in ocfs2_read_blocks()
[all …]

12345678910>>...16