Searched refs:index (Results 1 - 200 of 6403) sorted by relevance

1234567891011>>

/linux-4.4.14/drivers/staging/xgifb/
H A Dvb_util.h3 static inline void xgifb_reg_set(unsigned long port, u8 index, u8 data) xgifb_reg_set() argument
5 outb(index, port); xgifb_reg_set()
9 static inline u8 xgifb_reg_get(unsigned long port, u8 index) xgifb_reg_get() argument
11 outb(index, port); xgifb_reg_get()
15 static inline void xgifb_reg_and_or(unsigned long port, u8 index, xgifb_reg_and_or() argument
20 temp = xgifb_reg_get(port, index); xgifb_reg_and_or()
22 xgifb_reg_set(port, index, temp); xgifb_reg_and_or()
25 static inline void xgifb_reg_and(unsigned long port, u8 index, unsigned data_and) xgifb_reg_and() argument
29 temp = xgifb_reg_get(port, index); xgifb_reg_and()
31 xgifb_reg_set(port, index, temp); xgifb_reg_and()
34 static inline void xgifb_reg_or(unsigned long port, u8 index, unsigned data_or) xgifb_reg_or() argument
38 temp = xgifb_reg_get(port, index); xgifb_reg_or()
40 xgifb_reg_set(port, index, temp); xgifb_reg_or()
/linux-4.4.14/arch/arm/boot/dts/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/arch/cris/boot/dts/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/arch/metag/boot/dts/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/arch/mips/boot/dts/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/arch/powerpc/boot/dts/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/arch/arm64/boot/dts/include/dt-bindings/clock/
H A Drockchip,rk808.h2 * This header provides constants clk index RK808 pmic clkout
7 /* CLOCKOUT index */
H A Dstih415-clks.h2 * This header provides constants clk index STMicroelectronics
H A Dstih416-clks.h2 * This header provides constants clk index STMicroelectronics
/linux-4.4.14/drivers/clk/spear/
H A Dclk.c18 int *index) clk_round_rate_index()
22 for (*index = 0; *index < rtbl_cnt; (*index)++) { clk_round_rate_index()
24 rate = calc_rate(hw, parent_rate, *index); clk_round_rate_index()
27 if (*index) { clk_round_rate_index()
29 (*index)--; clk_round_rate_index()
35 if ((*index) == rtbl_cnt) clk_round_rate_index()
36 (*index)--; clk_round_rate_index()
16 clk_round_rate_index(struct clk_hw *hw, unsigned long drate, unsigned long parent_rate, clk_calc_rate calc_rate, u8 rtbl_cnt, int *index) clk_round_rate_index() argument
/linux-4.4.14/lib/
H A Diommu-helper.c9 int iommu_is_span_boundary(unsigned int index, unsigned int nr, iommu_is_span_boundary() argument
15 shift = (shift + index) & (boundary_size - 1); iommu_is_span_boundary()
24 unsigned long index; iommu_area_alloc() local
29 index = bitmap_find_next_zero_area(map, size, start, nr, align_mask); iommu_area_alloc()
30 if (index < size) { iommu_area_alloc()
31 if (iommu_is_span_boundary(index, nr, shift, boundary_size)) { iommu_area_alloc()
33 start = index + 1; iommu_area_alloc()
36 bitmap_set(map, index, nr); iommu_area_alloc()
37 return index; iommu_area_alloc()
H A Dcpu_rmap.c56 rmap->near[cpu].index = cpu % size; for_each_possible_cpu()
105 rmap->near[cpu].index = rmap->near[neigh].index; for_each_cpu()
116 unsigned index; debug_print_rmap() local
122 index = rmap->near[cpu].index; for_each_possible_cpu()
124 cpu, index, rmap->near[cpu].dist); for_each_possible_cpu()
139 * Return index of object.
143 u16 index; cpu_rmap_add() local
146 index = rmap->used++; cpu_rmap_add()
147 rmap->obj[index] = obj; cpu_rmap_add()
148 return index; cpu_rmap_add()
155 * @index: Index of object whose affinity changed
158 int cpu_rmap_update(struct cpu_rmap *rmap, u16 index, cpu_rmap_update() argument
171 if (rmap->near[cpu].index == index) { for_each_online_cpu()
183 rmap->near[cpu].index = index; for_each_cpu()
219 u16 index; member in struct:irq_glue
231 u16 index; free_irq_cpu_rmap() local
236 for (index = 0; index < rmap->used; index++) { free_irq_cpu_rmap()
237 glue = rmap->obj[index]; free_irq_cpu_rmap()
259 rc = cpu_rmap_update(glue->rmap, glue->index, mask); irq_cpu_rmap_notify()
299 glue->index = cpu_rmap_add(rmap, glue); irq_cpu_rmap_add()
H A Dradix-tree.c56 * The worst case is a zero height tree with just a single item at index 0,
57 * and then inserting an item at index ULONG_MAX. This requires 2 new branches
324 * Extend a radix tree so it can store key @index.
326 static int radix_tree_extend(struct radix_tree_root *root, unsigned long index) radix_tree_extend() argument
335 while (index > radix_tree_maxindex(height)) radix_tree_extend()
377 * @index: index key
382 * at position @index in the radix tree @root.
390 int __radix_tree_create(struct radix_tree_root *root, unsigned long index, __radix_tree_create() argument
398 if (index > radix_tree_maxindex(root->height)) { __radix_tree_create()
399 error = radix_tree_extend(root, index); __radix_tree_create()
426 offset = (index >> shift) & RADIX_TREE_MAP_MASK; __radix_tree_create()
443 * @index: index key
446 * Insert an item into the radix tree at position @index.
449 unsigned long index, void *item) radix_tree_insert()
457 error = __radix_tree_create(root, index, &node, &slot); radix_tree_insert()
466 BUG_ON(tag_get(node, 0, index & RADIX_TREE_MAP_MASK)); radix_tree_insert()
467 BUG_ON(tag_get(node, 1, index & RADIX_TREE_MAP_MASK)); radix_tree_insert()
480 * @index: index key
484 * Lookup and return the item at position @index in the radix
491 void *__radix_tree_lookup(struct radix_tree_root *root, unsigned long index, __radix_tree_lookup() argument
503 if (index > 0) __radix_tree_lookup()
515 if (index > radix_tree_maxindex(height)) __radix_tree_lookup()
522 slot = node->slots + ((index >> shift) & RADIX_TREE_MAP_MASK); __radix_tree_lookup()
541 * @index: index key
543 * Returns: the slot corresponding to the position @index in the
551 void **radix_tree_lookup_slot(struct radix_tree_root *root, unsigned long index) radix_tree_lookup_slot() argument
555 if (!__radix_tree_lookup(root, index, NULL, &slot)) radix_tree_lookup_slot()
564 * @index: index key
566 * Lookup the item at the position @index in the radix tree @root.
573 void *radix_tree_lookup(struct radix_tree_root *root, unsigned long index) radix_tree_lookup() argument
575 return __radix_tree_lookup(root, index, NULL, NULL); radix_tree_lookup()
582 * @index: index key
583 * @tag: tag index
586 * corresponding to @index in the radix tree. From
593 unsigned long index, unsigned int tag) radix_tree_tag_set()
599 BUG_ON(index > radix_tree_maxindex(height)); radix_tree_tag_set()
607 offset = (index >> shift) & RADIX_TREE_MAP_MASK; radix_tree_tag_set()
627 * @index: index key
628 * @tag: tag index
631 * corresponding to @index in the radix tree. If
639 unsigned long index, unsigned int tag) radix_tree_tag_clear()
647 if (index > radix_tree_maxindex(height)) radix_tree_tag_clear()
658 offset = (index >> shift) & RADIX_TREE_MAP_MASK; radix_tree_tag_clear()
673 index >>= RADIX_TREE_MAP_SHIFT; radix_tree_tag_clear()
674 offset = index & RADIX_TREE_MAP_MASK; radix_tree_tag_clear()
690 * @index: index key
691 * @tag: tag index (< RADIX_TREE_MAX_TAGS)
703 unsigned long index, unsigned int tag) radix_tree_tag_get()
717 return (index == 0); radix_tree_tag_get()
721 if (index > radix_tree_maxindex(height)) radix_tree_tag_get()
732 offset = (index >> shift) & RADIX_TREE_MAP_MASK; radix_tree_tag_get()
749 * @flags: RADIX_TREE_ITER_* flags and tag index
757 unsigned long index, offset, height; radix_tree_next_chunk() local
763 * Catch next_index overflow after ~0UL. iter->index never overflows radix_tree_next_chunk()
771 index = iter->next_index; radix_tree_next_chunk()
772 if (!index && iter->index) radix_tree_next_chunk()
778 } else if (rnode && !index) { radix_tree_next_chunk()
780 iter->index = 0; radix_tree_next_chunk()
790 offset = index >> shift; radix_tree_next_chunk()
815 index &= ~((RADIX_TREE_MAP_SIZE << shift) - 1); radix_tree_next_chunk()
816 index += offset << shift; radix_tree_next_chunk()
818 if (!index) radix_tree_next_chunk()
832 offset = (index >> shift) & RADIX_TREE_MAP_MASK; radix_tree_next_chunk()
836 iter->index = index; radix_tree_next_chunk()
837 iter->next_index = (index | RADIX_TREE_MAP_MASK) + 1; radix_tree_next_chunk()
853 iter->next_index = index + BITS_PER_LONG; radix_tree_next_chunk()
865 * @first_indexp: pointer to a starting index of a range to scan
866 * @last_index: last index of a range to scan
868 * @iftag: tag index to test
869 * @settag: tag index to set if tested tag is set
879 * we can get to the leaf node and find that the index that has the iftag
884 * *first_indexp to the first unscanned index.
898 unsigned long index = *first_indexp; radix_tree_range_tag_if_tagged() local
901 if (index > last_index) radix_tree_range_tag_if_tagged()
922 offset = (index >> shift) & RADIX_TREE_MAP_MASK; radix_tree_range_tag_if_tagged()
940 upindex = index; radix_tree_range_tag_if_tagged()
963 index = ((index >> shift) + 1) << shift; radix_tree_range_tag_if_tagged()
965 if (index > last_index || !index) radix_tree_range_tag_if_tagged()
969 while (((index >> shift) & RADIX_TREE_MAP_MASK) == 0) { radix_tree_range_tag_if_tagged()
985 *first_indexp = index; radix_tree_range_tag_if_tagged()
998 * Performs an index-ascending scan of the tree for present items. Places
1045 * Performs an index-ascending scan of the tree for present items. Places
1070 indices[ret] = iter.index; radix_tree_gang_lookup_slot()
1086 * @tag: the tag index (< RADIX_TREE_MAX_TAGS)
1088 * Performs an index-ascending scan of the tree for present items which
1127 * @tag: the tag index (< RADIX_TREE_MAX_TAGS)
1129 * Performs an index-ascending scan of the tree for present items which
1162 unsigned long index, unsigned long *found_index) __locate()
1171 i = (index >> shift) & RADIX_TREE_MAP_MASK; __locate()
1175 index &= ~((1UL << shift) - 1); __locate()
1176 index += 1UL << shift; __locate()
1177 if (index == 0) __locate()
1193 *found_index = index + i; __locate()
1194 index = 0; __locate()
1198 index += RADIX_TREE_MAP_SIZE; __locate()
1200 return index; __locate()
1208 * Returns index where item was found, or -1 if not found.
1318 * @node: node containing @index
1320 * After clearing the slot at @index in @node from radix tree
1368 * @index: index key
1371 * Remove @item at @index from the radix tree rooted at @root.
1374 * or the entry at the given @index was not @item.
1377 unsigned long index, void *item) radix_tree_delete_item()
1385 entry = __radix_tree_lookup(root, index, &node, &slot); radix_tree_delete_item()
1398 offset = index & RADIX_TREE_MAP_MASK; radix_tree_delete_item()
1406 radix_tree_tag_clear(root, index, tag); radix_tree_delete_item()
1421 * @index: index key
1423 * Remove the item at @index from the radix tree rooted at @root.
1427 void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) radix_tree_delete() argument
1429 return radix_tree_delete_item(root, index, NULL); radix_tree_delete()
448 radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item) radix_tree_insert() argument
592 radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag) radix_tree_tag_set() argument
638 radix_tree_tag_clear(struct radix_tree_root *root, unsigned long index, unsigned int tag) radix_tree_tag_clear() argument
702 radix_tree_tag_get(struct radix_tree_root *root, unsigned long index, unsigned int tag) radix_tree_tag_get() argument
1161 __locate(struct radix_tree_node *slot, void *item, unsigned long index, unsigned long *found_index) __locate() argument
1376 radix_tree_delete_item(struct radix_tree_root *root, unsigned long index, void *item) radix_tree_delete_item() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/engine/
H A Dmpeg.h4 int nv31_mpeg_new(struct nvkm_device *, int index, struct nvkm_engine **);
5 int nv40_mpeg_new(struct nvkm_device *, int index, struct nvkm_engine **);
6 int nv44_mpeg_new(struct nvkm_device *, int index, struct nvkm_engine **);
7 int nv50_mpeg_new(struct nvkm_device *, int index, struct nvkm_engine **);
8 int g84_mpeg_new(struct nvkm_device *, int index, struct nvkm_engine **);
/linux-4.4.14/include/linux/
H A Dscx200_gpio.h1 u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear);
10 #define __SCx200_GPIO_BANK unsigned bank = index>>5
13 #define __SCx200_GPIO_INDEX index &= 31
19 static inline int scx200_gpio_get(unsigned index) { scx200_gpio_get() argument
24 return (inl(ioaddr) & (1<<index)) ? 1 : 0; scx200_gpio_get()
31 static inline int scx200_gpio_current(unsigned index) { scx200_gpio_current() argument
35 return (scx200_gpio_shadow[bank] & (1<<index)) ? 1 : 0; scx200_gpio_current()
40 static inline void scx200_gpio_set_high(unsigned index) { scx200_gpio_set_high() argument
45 set_bit(index, shadow); /* __set_bit()? */ scx200_gpio_set_high()
51 static inline void scx200_gpio_set_low(unsigned index) { scx200_gpio_set_low() argument
56 clear_bit(index, shadow); /* __clear_bit()? */ scx200_gpio_set_low()
62 static inline void scx200_gpio_set(unsigned index, int state) { scx200_gpio_set() argument
68 set_bit(index, shadow); scx200_gpio_set()
70 clear_bit(index, shadow); scx200_gpio_set()
75 static inline void scx200_gpio_change(unsigned index) { scx200_gpio_change() argument
80 change_bit(index, shadow); scx200_gpio_change()
H A Dcpu_rmap.h24 * @near: For each CPU, the index and distance to the nearest object,
32 u16 index; member in struct:cpu_rmap::__anon12204
42 extern int cpu_rmap_update(struct cpu_rmap *rmap, u16 index,
47 return rmap->near[cpu].index; cpu_rmap_lookup_index()
52 return rmap->obj[rmap->near[cpu].index]; cpu_rmap_lookup_obj()
H A Dof_gpio.h52 const char *list_name, int index, enum of_gpio_flags *flags);
68 const char *list_name, int index, enum of_gpio_flags *flags) of_get_named_gpio_flags()
121 static inline int of_get_gpio_flags(struct device_node *np, int index, of_get_gpio_flags() argument
124 return of_get_named_gpio_flags(np, "gpios", index, flags); of_get_gpio_flags()
131 * @index: index of the GPIO
137 const char *propname, int index) of_get_named_gpio()
139 return of_get_named_gpio_flags(np, propname, index, NULL); of_get_named_gpio()
145 * @index: index of the GPIO
150 static inline int of_get_gpio(struct device_node *np, int index) of_get_gpio() argument
152 return of_get_gpio_flags(np, index, NULL); of_get_gpio()
67 of_get_named_gpio_flags(struct device_node *np, const char *list_name, int index, enum of_gpio_flags *flags) of_get_named_gpio_flags() argument
136 of_get_named_gpio(struct device_node *np, const char *propname, int index) of_get_named_gpio() argument
H A Dsvga.h70 static inline void svga_wattr(void __iomem *regbase, u8 index, u8 data) svga_wattr() argument
73 vga_w(regbase, VGA_ATT_IW, index); svga_wattr()
79 static inline void svga_wseq_mask(void __iomem *regbase, u8 index, u8 data, u8 mask) svga_wseq_mask() argument
81 vga_wseq(regbase, index, (data & mask) | (vga_rseq(regbase, index) & ~mask)); svga_wseq_mask()
86 static inline void svga_wcrt_mask(void __iomem *regbase, u8 index, u8 data, u8 mask) svga_wcrt_mask() argument
88 vga_wcrt(regbase, index, (data & mask) | (vga_rcrt(regbase, index) & ~mask)); svga_wcrt_mask()
H A Dof_irq.h22 extern int of_irq_parse_oldworld(struct device_node *device, int index,
27 static inline int of_irq_parse_oldworld(struct device_node *device, int index, of_irq_parse_oldworld() argument
35 extern int of_irq_parse_one(struct device_node *device, int index,
38 extern int of_irq_to_resource(struct device_node *dev, int index,
45 extern int of_irq_get(struct device_node *dev, int index);
62 static inline int of_irq_get(struct device_node *dev, int index) of_irq_get() argument
107 extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
111 int index) irq_of_parse_and_map()
110 irq_of_parse_and_map(struct device_node *dev, int index) irq_of_parse_and_map() argument
/linux-4.4.14/arch/mips/cavium-octeon/crypto/
H A Docteon-crypto.h29 * The index can be 0-1 (MD5) or 0-2 (SHA1), 0-3 (SHA256).
31 #define write_octeon_64bit_hash_dword(value, index) \
34 "dmtc2 %[rt],0x0048+" STR(index) \
40 * The index can be 0-1 (MD5) or 0-2 (SHA1), 0-3 (SHA256).
42 #define read_octeon_64bit_hash_dword(index) \
47 "dmfc2 %[rt],0x0048+" STR(index) \
55 * The index can be 0-6.
57 #define write_octeon_64bit_block_dword(value, index) \
60 "dmtc2 %[rt],0x0040+" STR(index) \
103 * The index can be 0-7.
105 #define write_octeon_64bit_hash_sha512(value, index) \
108 "dmtc2 %[rt],0x0250+" STR(index) \
114 * The index can be 0-7.
116 #define read_octeon_64bit_hash_sha512(index) \
121 "dmfc2 %[rt],0x0250+" STR(index) \
129 * The index can be 0-14.
131 #define write_octeon_64bit_block_sha512(value, index) \
134 "dmtc2 %[rt],0x0240+" STR(index) \
177 * The index can be 0-7.
179 #define write_octeon_64bit_hash_sha512(value, index) \
182 "dmtc2 %[rt],0x0250+" STR(index) \
188 * The index can be 0-7.
190 #define read_octeon_64bit_hash_sha512(index) \
195 "dmfc2 %[rt],0x0250+" STR(index) \
203 * The index can be 0-14.
205 #define write_octeon_64bit_block_sha512(value, index) \
208 "dmtc2 %[rt],0x0240+" STR(index) \
/linux-4.4.14/arch/ia64/include/uapi/asm/
H A Dintel_intrin.h81 #define __ia64_set_dbr(index, val) \
82 __setIndReg(_IA64_REG_INDR_DBR, index, val)
83 #define ia64_set_ibr(index, val) \
84 __setIndReg(_IA64_REG_INDR_IBR, index, val)
85 #define ia64_set_pkr(index, val) \
86 __setIndReg(_IA64_REG_INDR_PKR, index, val)
87 #define ia64_set_pmc(index, val) \
88 __setIndReg(_IA64_REG_INDR_PMC, index, val)
89 #define ia64_set_pmd(index, val) \
90 __setIndReg(_IA64_REG_INDR_PMD, index, val)
91 #define ia64_native_set_rr(index, val) \
92 __setIndReg(_IA64_REG_INDR_RR, index, val)
94 #define ia64_native_get_cpuid(index) \
95 __getIndReg(_IA64_REG_INDR_CPUID, index)
96 #define __ia64_get_dbr(index) __getIndReg(_IA64_REG_INDR_DBR, index)
97 #define ia64_get_ibr(index) __getIndReg(_IA64_REG_INDR_IBR, index)
98 #define ia64_get_pkr(index) __getIndReg(_IA64_REG_INDR_PKR, index)
99 #define ia64_get_pmc(index) __getIndReg(_IA64_REG_INDR_PMC, index)
100 #define ia64_native_get_pmd(index) __getIndReg(_IA64_REG_INDR_PMD, index)
101 #define ia64_native_get_rr(index) __getIndReg(_IA64_REG_INDR_RR, index)
H A Dgcc_intrin.h424 #define __ia64_set_dbr(index, val) \
425 asm volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory")
427 #define ia64_set_ibr(index, val) \
428 asm volatile ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory")
430 #define ia64_set_pkr(index, val) \
431 asm volatile ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory")
433 #define ia64_set_pmc(index, val) \
434 asm volatile ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory")
436 #define ia64_set_pmd(index, val) \
437 asm volatile ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory")
439 #define ia64_native_set_rr(index, val) \
440 asm volatile ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory");
442 #define ia64_native_get_cpuid(index) \
445 asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \
449 #define __ia64_get_dbr(index) \
452 asm volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
456 #define ia64_get_ibr(index) \
459 asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
463 #define ia64_get_pkr(index) \
466 asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
470 #define ia64_get_pmc(index) \
473 asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
478 #define ia64_native_get_pmd(index) \
481 asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \
485 #define ia64_native_get_rr(index) \
488 asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \
/linux-4.4.14/arch/m68k/sun3x/
H A Ddvma.c44 #define dvma_entry_paddr(index) (iommu_pte[index] & IOMMU_ADDR_MASK)
45 #define dvma_entry_vaddr(index,paddr) ((index << DVMA_PAGE_SHIFT) | \
48 #define dvma_entry_set(index,addr) (iommu_pte[index] = \
52 #define dvma_entry_set(index,addr) (iommu_pte[index] = \
56 #define dvma_entry_clr(index) (iommu_pte[index] = IOMMU_DT_INVALID)
68 unsigned long index; dvma_print() local
70 index = dvma_addr >> DVMA_PAGE_SHIFT; dvma_print()
72 printk("idx %lx dvma_addr %08lx paddr %08lx\n", index, dvma_addr, dvma_print()
73 dvma_entry_paddr(index)); dvma_print()
154 unsigned long end, index; dvma_map_iommu() local
156 index = baddr >> DVMA_PAGE_SHIFT; dvma_map_iommu()
162 for(; index < end ; index++) { dvma_map_iommu()
163 // if(dvma_entry_use(index)) dvma_map_iommu()
165 // printk("mapping pa %lx to ba %lx\n", __pa(kaddr), index << DVMA_PAGE_SHIFT); dvma_map_iommu()
167 dvma_entry_set(index, __pa(kaddr)); dvma_map_iommu()
169 iommu_pte[index] |= IOMMU_FULL_BLOCK; dvma_map_iommu()
170 // dvma_entry_inc(index); dvma_map_iommu()
176 for(index = (baddr >> DVMA_PAGE_SHIFT); index < end; index++) dvma_map_iommu()
177 dvma_print(index << DVMA_PAGE_SHIFT); dvma_map_iommu()
186 int index, end; dvma_unmap_iommu() local
189 index = baddr >> DVMA_PAGE_SHIFT; dvma_unmap_iommu()
192 for(; index < end ; index++) { dvma_unmap_iommu()
194 printk("freeing bus mapping %08x\n", index << DVMA_PAGE_SHIFT); dvma_unmap_iommu()
197 if(!dvma_entry_use(index)) dvma_unmap_iommu()
199 index); dvma_unmap_iommu()
201 dvma_entry_dec(index); dvma_unmap_iommu()
203 dvma_entry_clr(index); dvma_unmap_iommu()
/linux-4.4.14/arch/m68k/coldfire/
H A Dintc-5272.c40 unsigned char index; member in struct:irqmap
45 /*MCF_IRQ_SPURIOUS*/ { .icr = 0, .index = 0, .ack = 0, },
46 /*MCF_IRQ_EINT1*/ { .icr = MCFSIM_ICR1, .index = 28, .ack = 1, },
47 /*MCF_IRQ_EINT2*/ { .icr = MCFSIM_ICR1, .index = 24, .ack = 1, },
48 /*MCF_IRQ_EINT3*/ { .icr = MCFSIM_ICR1, .index = 20, .ack = 1, },
49 /*MCF_IRQ_EINT4*/ { .icr = MCFSIM_ICR1, .index = 16, .ack = 1, },
50 /*MCF_IRQ_TIMER1*/ { .icr = MCFSIM_ICR1, .index = 12, .ack = 0, },
51 /*MCF_IRQ_TIMER2*/ { .icr = MCFSIM_ICR1, .index = 8, .ack = 0, },
52 /*MCF_IRQ_TIMER3*/ { .icr = MCFSIM_ICR1, .index = 4, .ack = 0, },
53 /*MCF_IRQ_TIMER4*/ { .icr = MCFSIM_ICR1, .index = 0, .ack = 0, },
54 /*MCF_IRQ_UART1*/ { .icr = MCFSIM_ICR2, .index = 28, .ack = 0, },
55 /*MCF_IRQ_UART2*/ { .icr = MCFSIM_ICR2, .index = 24, .ack = 0, },
56 /*MCF_IRQ_PLIP*/ { .icr = MCFSIM_ICR2, .index = 20, .ack = 0, },
57 /*MCF_IRQ_PLIA*/ { .icr = MCFSIM_ICR2, .index = 16, .ack = 0, },
58 /*MCF_IRQ_USB0*/ { .icr = MCFSIM_ICR2, .index = 12, .ack = 0, },
59 /*MCF_IRQ_USB1*/ { .icr = MCFSIM_ICR2, .index = 8, .ack = 0, },
60 /*MCF_IRQ_USB2*/ { .icr = MCFSIM_ICR2, .index = 4, .ack = 0, },
61 /*MCF_IRQ_USB3*/ { .icr = MCFSIM_ICR2, .index = 0, .ack = 0, },
62 /*MCF_IRQ_USB4*/ { .icr = MCFSIM_ICR3, .index = 28, .ack = 0, },
63 /*MCF_IRQ_USB5*/ { .icr = MCFSIM_ICR3, .index = 24, .ack = 0, },
64 /*MCF_IRQ_USB6*/ { .icr = MCFSIM_ICR3, .index = 20, .ack = 0, },
65 /*MCF_IRQ_USB7*/ { .icr = MCFSIM_ICR3, .index = 16, .ack = 0, },
66 /*MCF_IRQ_DMA*/ { .icr = MCFSIM_ICR3, .index = 12, .ack = 0, },
67 /*MCF_IRQ_ERX*/ { .icr = MCFSIM_ICR3, .index = 8, .ack = 0, },
68 /*MCF_IRQ_ETX*/ { .icr = MCFSIM_ICR3, .index = 4, .ack = 0, },
69 /*MCF_IRQ_ENTC*/ { .icr = MCFSIM_ICR3, .index = 0, .ack = 0, },
70 /*MCF_IRQ_QSPI*/ { .icr = MCFSIM_ICR4, .index = 28, .ack = 0, },
71 /*MCF_IRQ_EINT5*/ { .icr = MCFSIM_ICR4, .index = 24, .ack = 1, },
72 /*MCF_IRQ_EINT6*/ { .icr = MCFSIM_ICR4, .index = 20, .ack = 1, },
73 /*MCF_IRQ_SWTO*/ { .icr = MCFSIM_ICR4, .index = 16, .ack = 0, },
88 v = 0x8 << intc_irqmap[irq].index; intc_irq_mask()
100 v = 0xd << intc_irqmap[irq].index; intc_irq_unmask()
115 v &= (0x7 << intc_irqmap[irq].index); intc_irq_ack()
116 v |= (0x8 << intc_irqmap[irq].index); intc_irq_ack()
H A Dintc.c45 void mcf_setimr(int index) mcf_setimr() argument
49 __raw_writew(imr | (0x1 << index), MCFSIM_IMR); mcf_setimr()
52 void mcf_clrimr(int index) mcf_clrimr() argument
56 __raw_writew(imr & ~(0x1 << index), MCFSIM_IMR); mcf_clrimr()
69 void mcf_setimr(int index) mcf_setimr() argument
73 __raw_writel(imr | (0x1 << index), MCFSIM_IMR); mcf_setimr()
76 void mcf_clrimr(int index) mcf_clrimr() argument
80 __raw_writel(imr & ~(0x1 << index), MCFSIM_IMR); mcf_clrimr()
/linux-4.4.14/arch/s390/crypto/
H A Dsha_common.c25 unsigned int index; s390_sha_update() local
29 index = ctx->count & (bsize - 1); s390_sha_update()
32 if ((index + len) < bsize) s390_sha_update()
36 if (index) { s390_sha_update()
37 memcpy(ctx->buf + index, data, bsize - index); s390_sha_update()
41 data += bsize - index; s390_sha_update()
42 len -= bsize - index; s390_sha_update()
43 index = 0; s390_sha_update()
57 memcpy(ctx->buf + index , data, len); s390_sha_update()
68 unsigned int index, end, plen; s390_sha_final() local
75 index = ctx->count & (bsize - 1); s390_sha_final()
76 end = (index < bsize - plen) ? bsize : (2 * bsize); s390_sha_final()
79 ctx->buf[index] = 0x80; s390_sha_final()
80 index++; s390_sha_final()
83 memset(ctx->buf + index, 0x00, end - index - 8); s390_sha_final()
/linux-4.4.14/drivers/media/usb/cx231xx/
H A Dcx231xx-pcb-cfg.c33 INDEX_SELFPOWER_DIGITAL_ONLY, /* index */
42 0, /* analog index */
49 0, /* config index */
51 0, /* interrupt ep index */
52 1, /* ts1 index */
53 NOT_SUPPORTED, /* TS2 index */
77 0, /* config index */
79 0, /* interrupt ep index */
80 1, /* ts1 index */
81 NOT_SUPPORTED, /* TS2 index */
104 INDEX_SELFPOWER_DUAL_DIGITAL, /* index */
112 0, /* analog index */
119 0, /* config index */
121 0, /* interrupt ep index */
122 1, /* ts1 index */
123 2, /* TS2 index */
146 0, /* config index */
148 0, /* interrupt ep index */
149 1, /* ts1 index */
150 2, /* TS2 index */
173 INDEX_SELFPOWER_ANALOG_ONLY, /* index */
182 0, /* analog index */
189 0, /* config index */
191 0, /* interrupt ep index */
192 NOT_SUPPORTED, /* ts1 index */
193 NOT_SUPPORTED, /* TS2 index */
216 0, /* config index */
218 0, /* interrupt ep index */
219 NOT_SUPPORTED, /* ts1 index */
220 NOT_SUPPORTED, /* TS2 index */
243 INDEX_SELFPOWER_DUAL, /* index */
252 0, /* analog index */
258 0, /* config index */
260 0, /* interrupt ep index */
261 1, /* ts1 index */
262 NOT_SUPPORTED, /* TS2 index */
285 0, /* config index */
287 0, /* interrupt ep index */
288 1, /* ts1 index */
289 NOT_SUPPORTED, /* TS2 index */
312 INDEX_SELFPOWER_TRIPLE, /* index */
322 0, /* analog index */
328 0, /* config index */
330 0, /* interrupt ep index */
331 1, /* ts1 index */
332 2, /* TS2 index */
355 0, /* config index */
357 0, /* interrupt ep index */
358 1, /* ts1 index */
359 2, /* TS2 index */
382 INDEX_SELFPOWER_COMPRESSOR, /* index */
391 0, /* analog index */
397 0, /* config index */
399 0, /* interrupt ep index */
400 NOT_SUPPORTED, /* ts1 index */
401 1, /* TS2 index */
424 0, /* config index */
426 0, /* interrupt ep index */
427 NOT_SUPPORTED, /* ts1 index */
428 1, /* TS2 index */
451 INDEX_BUSPOWER_DIGITAL_ONLY, /* index */
460 0, /* analog index */
467 0, /* config index */
469 0, /* interrupt ep index = 2 */
470 1, /* ts1 index */
471 NOT_SUPPORTED, /* TS2 index */
494 0, /* config index */
496 0, /* interrupt ep index = 2 */
497 1, /* ts1 index */
498 NOT_SUPPORTED, /* TS2 index */
520 INDEX_BUSPOWER_ANALOG_ONLY, /* index */
528 0, /* analog index */
534 0, /* config index */
536 0, /* interrupt ep index */
537 NOT_SUPPORTED, /* ts1 index */
538 NOT_SUPPORTED, /* TS2 index */
560 0, /* config index */
562 0, /* interrupt ep index */
563 NOT_SUPPORTED, /* ts1 index */
564 NOT_SUPPORTED, /* TS2 index */
586 INDEX_BUSPOWER_DIF_ONLY, /* index */
595 0, /* analog index */
601 0, /* config index */
603 0, /* interrupt ep index */
604 1, /* ts1 index */
605 NOT_SUPPORTED, /* TS2 index */
627 0, /* config index */
629 0, /* interrupt ep index */
630 1, /* ts1 index */
631 NOT_SUPPORTED, /* TS2 index */
788 (dev->current_pcb_config.index) + 1); initialize_cx231xx()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/
H A Dvga.h10 u8 nvkm_rdvgas(struct nvkm_device *, int head, u8 index);
11 void nvkm_wrvgas(struct nvkm_device *, int head, u8 index, u8 value);
14 u8 nvkm_rdvgag(struct nvkm_device *, int head, u8 index);
15 void nvkm_wrvgag(struct nvkm_device *, int head, u8 index, u8 value);
18 u8 nvkm_rdvgac(struct nvkm_device *, int head, u8 index);
19 void nvkm_wrvgac(struct nvkm_device *, int head, u8 index, u8 value);
22 u8 nvkm_rdvgai(struct nvkm_device *, int head, u16 port, u8 index);
23 void nvkm_wrvgai(struct nvkm_device *, int head, u16 port, u8 index, u8 value);
/linux-4.4.14/kernel/sched/
H A Dcpuacct.h4 extern void cpuacct_account_field(struct task_struct *p, int index, u64 val);
13 cpuacct_account_field(struct task_struct *p, int index, u64 val) cpuacct_account_field() argument
/linux-4.4.14/arch/sparc/kernel/
H A Dcpumap.h6 int map_to_cpu(unsigned int index);
10 static inline int map_to_cpu(unsigned int index) map_to_cpu() argument
/linux-4.4.14/net/netfilter/
H A Dxt_set.c33 match_set(ip_set_id_t index, const struct sk_buff *skb, match_set() argument
37 if (ip_set_test(index, skb, par, opt)) match_set()
61 return match_set(info->match_set.index, skb, par, &opt, set_match_v0()
85 ip_set_id_t index; set_match_v0_checkentry() local
87 index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); set_match_v0_checkentry()
89 if (index == IPSET_INVALID_ID) { set_match_v0_checkentry()
91 info->match_set.index); set_match_v0_checkentry()
96 ip_set_nfnl_put(par->net, info->match_set.index); set_match_v0_checkentry()
111 ip_set_nfnl_put(par->net, info->match_set.index); set_match_v0_destroy()
127 return match_set(info->match_set.index, skb, par, &opt, set_match_v1()
135 ip_set_id_t index; set_match_v1_checkentry() local
137 index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); set_match_v1_checkentry()
139 if (index == IPSET_INVALID_ID) { set_match_v1_checkentry()
141 info->match_set.index); set_match_v1_checkentry()
146 ip_set_nfnl_put(par->net, info->match_set.index); set_match_v1_checkentry()
158 ip_set_nfnl_put(par->net, info->match_set.index); set_match_v1_destroy()
194 ret = match_set(info->match_set.index, skb, par, &opt, set_match_v3()
241 ret = match_set(info->match_set.index, skb, par, &opt, set_match_v4()
267 if (info->add_set.index != IPSET_INVALID_ID) set_target_v0()
268 ip_set_add(info->add_set.index, skb, par, &add_opt); set_target_v0()
269 if (info->del_set.index != IPSET_INVALID_ID) set_target_v0()
270 ip_set_del(info->del_set.index, skb, par, &del_opt); set_target_v0()
279 ip_set_id_t index; set_target_v0_checkentry() local
281 if (info->add_set.index != IPSET_INVALID_ID) { set_target_v0_checkentry()
282 index = ip_set_nfnl_get_byindex(par->net, info->add_set.index); set_target_v0_checkentry()
283 if (index == IPSET_INVALID_ID) { set_target_v0_checkentry()
284 pr_warn("Cannot find add_set index %u as target\n", set_target_v0_checkentry()
285 info->add_set.index); set_target_v0_checkentry()
290 if (info->del_set.index != IPSET_INVALID_ID) { set_target_v0_checkentry()
291 index = ip_set_nfnl_get_byindex(par->net, info->del_set.index); set_target_v0_checkentry()
292 if (index == IPSET_INVALID_ID) { set_target_v0_checkentry()
293 pr_warn("Cannot find del_set index %u as target\n", set_target_v0_checkentry()
294 info->del_set.index); set_target_v0_checkentry()
295 if (info->add_set.index != IPSET_INVALID_ID) set_target_v0_checkentry()
296 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v0_checkentry()
303 if (info->add_set.index != IPSET_INVALID_ID) set_target_v0_checkentry()
304 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v0_checkentry()
305 if (info->del_set.index != IPSET_INVALID_ID) set_target_v0_checkentry()
306 ip_set_nfnl_put(par->net, info->del_set.index); set_target_v0_checkentry()
322 if (info->add_set.index != IPSET_INVALID_ID) set_target_v0_destroy()
323 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v0_destroy()
324 if (info->del_set.index != IPSET_INVALID_ID) set_target_v0_destroy()
325 ip_set_nfnl_put(par->net, info->del_set.index); set_target_v0_destroy()
340 if (info->add_set.index != IPSET_INVALID_ID) set_target_v1()
341 ip_set_add(info->add_set.index, skb, par, &add_opt); set_target_v1()
342 if (info->del_set.index != IPSET_INVALID_ID) set_target_v1()
343 ip_set_del(info->del_set.index, skb, par, &del_opt); set_target_v1()
352 ip_set_id_t index; set_target_v1_checkentry() local
354 if (info->add_set.index != IPSET_INVALID_ID) { set_target_v1_checkentry()
355 index = ip_set_nfnl_get_byindex(par->net, info->add_set.index); set_target_v1_checkentry()
356 if (index == IPSET_INVALID_ID) { set_target_v1_checkentry()
357 pr_warn("Cannot find add_set index %u as target\n", set_target_v1_checkentry()
358 info->add_set.index); set_target_v1_checkentry()
363 if (info->del_set.index != IPSET_INVALID_ID) { set_target_v1_checkentry()
364 index = ip_set_nfnl_get_byindex(par->net, info->del_set.index); set_target_v1_checkentry()
365 if (index == IPSET_INVALID_ID) { set_target_v1_checkentry()
366 pr_warn("Cannot find del_set index %u as target\n", set_target_v1_checkentry()
367 info->del_set.index); set_target_v1_checkentry()
368 if (info->add_set.index != IPSET_INVALID_ID) set_target_v1_checkentry()
369 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v1_checkentry()
376 if (info->add_set.index != IPSET_INVALID_ID) set_target_v1_checkentry()
377 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v1_checkentry()
378 if (info->del_set.index != IPSET_INVALID_ID) set_target_v1_checkentry()
379 ip_set_nfnl_put(par->net, info->del_set.index); set_target_v1_checkentry()
391 if (info->add_set.index != IPSET_INVALID_ID) set_target_v1_destroy()
392 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v1_destroy()
393 if (info->del_set.index != IPSET_INVALID_ID) set_target_v1_destroy()
394 ip_set_nfnl_put(par->net, info->del_set.index); set_target_v1_destroy()
413 if (info->add_set.index != IPSET_INVALID_ID) set_target_v2()
414 ip_set_add(info->add_set.index, skb, par, &add_opt); set_target_v2()
415 if (info->del_set.index != IPSET_INVALID_ID) set_target_v2()
416 ip_set_del(info->del_set.index, skb, par, &del_opt); set_target_v2()
443 if (info->add_set.index != IPSET_INVALID_ID) set_target_v3()
444 ip_set_add(info->add_set.index, skb, par, &add_opt); set_target_v3()
445 if (info->del_set.index != IPSET_INVALID_ID) set_target_v3()
446 ip_set_del(info->del_set.index, skb, par, &del_opt); set_target_v3()
447 if (info->map_set.index != IPSET_INVALID_ID) { set_target_v3()
451 ret = match_set(info->map_set.index, skb, par, &map_opt, set_target_v3()
472 ip_set_id_t index; set_target_v3_checkentry() local
474 if (info->add_set.index != IPSET_INVALID_ID) { set_target_v3_checkentry()
475 index = ip_set_nfnl_get_byindex(par->net, set_target_v3_checkentry()
476 info->add_set.index); set_target_v3_checkentry()
477 if (index == IPSET_INVALID_ID) { set_target_v3_checkentry()
478 pr_warn("Cannot find add_set index %u as target\n", set_target_v3_checkentry()
479 info->add_set.index); set_target_v3_checkentry()
484 if (info->del_set.index != IPSET_INVALID_ID) { set_target_v3_checkentry()
485 index = ip_set_nfnl_get_byindex(par->net, set_target_v3_checkentry()
486 info->del_set.index); set_target_v3_checkentry()
487 if (index == IPSET_INVALID_ID) { set_target_v3_checkentry()
488 pr_warn("Cannot find del_set index %u as target\n", set_target_v3_checkentry()
489 info->del_set.index); set_target_v3_checkentry()
490 if (info->add_set.index != IPSET_INVALID_ID) set_target_v3_checkentry()
492 info->add_set.index); set_target_v3_checkentry()
497 if (info->map_set.index != IPSET_INVALID_ID) { set_target_v3_checkentry()
510 index = ip_set_nfnl_get_byindex(par->net, set_target_v3_checkentry()
511 info->map_set.index); set_target_v3_checkentry()
512 if (index == IPSET_INVALID_ID) { set_target_v3_checkentry()
513 pr_warn("Cannot find map_set index %u as target\n", set_target_v3_checkentry()
514 info->map_set.index); set_target_v3_checkentry()
515 if (info->add_set.index != IPSET_INVALID_ID) set_target_v3_checkentry()
517 info->add_set.index); set_target_v3_checkentry()
518 if (info->del_set.index != IPSET_INVALID_ID) set_target_v3_checkentry()
520 info->del_set.index); set_target_v3_checkentry()
529 if (info->add_set.index != IPSET_INVALID_ID) set_target_v3_checkentry()
530 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v3_checkentry()
531 if (info->del_set.index != IPSET_INVALID_ID) set_target_v3_checkentry()
532 ip_set_nfnl_put(par->net, info->del_set.index); set_target_v3_checkentry()
533 if (info->map_set.index != IPSET_INVALID_ID) set_target_v3_checkentry()
534 ip_set_nfnl_put(par->net, info->map_set.index); set_target_v3_checkentry()
546 if (info->add_set.index != IPSET_INVALID_ID) set_target_v3_destroy()
547 ip_set_nfnl_put(par->net, info->add_set.index); set_target_v3_destroy()
548 if (info->del_set.index != IPSET_INVALID_ID) set_target_v3_destroy()
549 ip_set_nfnl_put(par->net, info->del_set.index); set_target_v3_destroy()
550 if (info->map_set.index != IPSET_INVALID_ID) set_target_v3_destroy()
551 ip_set_nfnl_put(par->net, info->map_set.index); set_target_v3_destroy()
/linux-4.4.14/arch/tile/kernel/
H A Dtile-desc_64.c1041 BITFIELD(22, 9) /* index 0 */,
1158 BITFIELD(6, 2) /* index 513 */,
1160 BITFIELD(8, 2) /* index 518 */,
1162 BITFIELD(10, 2) /* index 523 */,
1164 BITFIELD(20, 2) /* index 528 */,
1166 BITFIELD(6, 2) /* index 533 */,
1168 BITFIELD(8, 2) /* index 538 */,
1170 BITFIELD(10, 2) /* index 543 */,
1172 BITFIELD(0, 2) /* index 548 */,
1174 BITFIELD(2, 2) /* index 553 */,
1176 BITFIELD(4, 2) /* index 558 */,
1178 BITFIELD(6, 2) /* index 563 */,
1180 BITFIELD(8, 2) /* index 568 */,
1182 BITFIELD(10, 2) /* index 573 */,
1184 BITFIELD(20, 2) /* index 578 */,
1186 BITFIELD(20, 2) /* index 583 */,
1189 BITFIELD(20, 2) /* index 588 */,
1192 BITFIELD(20, 2) /* index 593 */,
1195 BITFIELD(20, 2) /* index 598 */,
1197 BITFIELD(18, 4) /* index 603 */,
1202 BITFIELD(18, 4) /* index 620 */,
1209 BITFIELD(18, 4) /* index 637 */,
1216 BITFIELD(18, 4) /* index 654 */,
1223 BITFIELD(18, 4) /* index 671 */,
1229 BITFIELD(12, 2) /* index 688 */,
1231 BITFIELD(14, 2) /* index 693 */,
1233 BITFIELD(16, 2) /* index 698 */,
1235 BITFIELD(18, 4) /* index 703 */,
1241 BITFIELD(12, 4) /* index 720 */,
1245 BITFIELD(16, 2) /* index 737 */,
1247 BITFIELD(16, 2) /* index 742 */,
1249 BITFIELD(16, 2) /* index 747 */,
1251 BITFIELD(16, 2) /* index 752 */,
1253 BITFIELD(16, 2) /* index 757 */,
1255 BITFIELD(16, 2) /* index 762 */,
1257 BITFIELD(16, 2) /* index 767 */,
1259 BITFIELD(16, 2) /* index 772 */,
1261 BITFIELD(16, 2) /* index 777 */,
1263 BITFIELD(16, 2) /* index 782 */,
1265 BITFIELD(16, 2) /* index 787 */,
1267 BITFIELD(16, 2) /* index 792 */,
1269 BITFIELD(18, 4) /* index 797 */,
1275 BITFIELD(18, 4) /* index 814 */,
1281 BITFIELD(18, 4) /* index 831 */,
1287 BITFIELD(18, 4) /* index 848 */,
1293 BITFIELD(18, 3) /* index 865 */,
1296 BITFIELD(21, 1) /* index 874 */,
1298 BITFIELD(21, 1) /* index 877 */,
1300 BITFIELD(21, 1) /* index 880 */,
1302 BITFIELD(21, 1) /* index 883 */,
1304 BITFIELD(21, 1) /* index 886 */,
1306 BITFIELD(18, 4) /* index 889 */,
1312 BITFIELD(0, 2) /* index 906 */,
1315 BITFIELD(2, 2) /* index 911 */,
1318 BITFIELD(4, 2) /* index 916 */,
1321 BITFIELD(6, 2) /* index 921 */,
1324 BITFIELD(8, 2) /* index 926 */,
1327 BITFIELD(10, 2) /* index 931 */,
1334 BITFIELD(53, 9) /* index 0 */,
1452 BITFIELD(37, 2) /* index 513 */,
1454 BITFIELD(39, 2) /* index 518 */,
1456 BITFIELD(41, 2) /* index 523 */,
1458 BITFIELD(51, 2) /* index 528 */,
1460 BITFIELD(37, 2) /* index 533 */,
1462 BITFIELD(39, 2) /* index 538 */,
1464 BITFIELD(41, 2) /* index 543 */,
1466 BITFIELD(31, 2) /* index 548 */,
1468 BITFIELD(33, 2) /* index 553 */,
1470 BITFIELD(35, 2) /* index 558 */,
1472 BITFIELD(37, 2) /* index 563 */,
1474 BITFIELD(39, 2) /* index 568 */,
1476 BITFIELD(41, 2) /* index 573 */,
1478 BITFIELD(51, 2) /* index 578 */,
1480 BITFIELD(31, 2) /* index 583 */,
1482 BITFIELD(33, 2) /* index 588 */,
1484 BITFIELD(35, 2) /* index 593 */,
1487 BITFIELD(51, 2) /* index 598 */,
1489 BITFIELD(31, 2) /* index 603 */,
1491 BITFIELD(33, 2) /* index 608 */,
1493 BITFIELD(35, 2) /* index 613 */,
1496 BITFIELD(31, 2) /* index 618 */,
1498 BITFIELD(33, 2) /* index 623 */,
1500 BITFIELD(35, 2) /* index 628 */,
1503 BITFIELD(31, 2) /* index 633 */,
1505 BITFIELD(33, 2) /* index 638 */,
1507 BITFIELD(35, 2) /* index 643 */,
1510 BITFIELD(31, 2) /* index 648 */,
1512 BITFIELD(33, 2) /* index 653 */,
1514 BITFIELD(35, 2) /* index 658 */,
1517 BITFIELD(51, 2) /* index 663 */,
1520 BITFIELD(31, 2) /* index 668 */,
1522 BITFIELD(33, 2) /* index 673 */,
1524 BITFIELD(35, 2) /* index 678 */,
1527 BITFIELD(51, 2) /* index 683 */,
1530 BITFIELD(51, 2) /* index 688 */,
1532 BITFIELD(51, 2) /* index 693 */,
1534 BITFIELD(51, 2) /* index 698 */,
1537 BITFIELD(51, 2) /* index 703 */,
1540 BITFIELD(51, 2) /* index 708 */,
1543 BITFIELD(51, 2) /* index 713 */,
1546 BITFIELD(51, 2) /* index 718 */,
1548 BITFIELD(49, 4) /* index 723 */,
1554 BITFIELD(49, 4) /* index 740 */,
1560 BITFIELD(43, 2) /* index 757 */,
1562 BITFIELD(45, 2) /* index 762 */,
1564 BITFIELD(47, 2) /* index 767 */,
1566 BITFIELD(49, 4) /* index 772 */,
1572 BITFIELD(46, 7) /* index 789 */,
1610 BITFIELD(43, 3) /* index 918 */,
1613 BITFIELD(43, 3) /* index 927 */,
1616 BITFIELD(31, 2) /* index 936 */,
1618 BITFIELD(33, 2) /* index 941 */,
1620 BITFIELD(35, 2) /* index 946 */,
1622 BITFIELD(37, 2) /* index 951 */,
1624 BITFIELD(39, 2) /* index 956 */,
1626 BITFIELD(41, 2) /* index 961 */,
1628 BITFIELD(33, 2) /* index 966 */,
1630 BITFIELD(35, 2) /* index 971 */,
1632 BITFIELD(37, 2) /* index 976 */,
1634 BITFIELD(39, 2) /* index 981 */,
1636 BITFIELD(41, 2) /* index 986 */,
1638 BITFIELD(31, 2) /* index 991 */,
1640 BITFIELD(33, 2) /* index 996 */,
1642 BITFIELD(35, 2) /* index 1001 */,
1645 BITFIELD(43, 3) /* index 1006 */,
1648 BITFIELD(31, 2) /* index 1015 */,
1650 BITFIELD(33, 2) /* index 1020 */,
1652 BITFIELD(35, 2) /* index 1025 */,
1654 BITFIELD(31, 2) /* index 1030 */,
1656 BITFIELD(33, 2) /* index 1035 */,
1658 BITFIELD(35, 2) /* index 1040 */,
1661 BITFIELD(31, 2) /* index 1045 */,
1663 BITFIELD(33, 2) /* index 1050 */,
1665 BITFIELD(35, 2) /* index 1055 */,
1667 BITFIELD(31, 2) /* index 1060 */,
1669 BITFIELD(33, 2) /* index 1065 */,
1671 BITFIELD(35, 2) /* index 1070 */,
1674 BITFIELD(31, 2) /* index 1075 */,
1676 BITFIELD(33, 2) /* index 1080 */,
1678 BITFIELD(35, 2) /* index 1085 */,
1680 BITFIELD(43, 3) /* index 1090 */,
1683 BITFIELD(43, 3) /* index 1099 */,
1686 BITFIELD(49, 4) /* index 1108 */,
1692 BITFIELD(49, 4) /* index 1125 */,
1698 BITFIELD(49, 4) /* index 1142 */,
1704 BITFIELD(49, 4) /* index 1159 */,
1710 BITFIELD(31, 2) /* index 1176 */,
1713 BITFIELD(33, 2) /* index 1181 */,
1716 BITFIELD(35, 2) /* index 1186 */,
1719 BITFIELD(37, 2) /* index 1191 */,
1722 BITFIELD(39, 2) /* index 1196 */,
1725 BITFIELD(41, 2) /* index 1201 */,
1732 BITFIELD(27, 4) /* index 0 */,
1737 BITFIELD(6, 2) /* index 17 */,
1739 BITFIELD(8, 2) /* index 22 */,
1741 BITFIELD(10, 2) /* index 27 */,
1743 BITFIELD(0, 2) /* index 32 */,
1745 BITFIELD(2, 2) /* index 37 */,
1747 BITFIELD(4, 2) /* index 42 */,
1749 BITFIELD(6, 2) /* index 47 */,
1751 BITFIELD(8, 2) /* index 52 */,
1753 BITFIELD(10, 2) /* index 57 */,
1755 BITFIELD(18, 2) /* index 62 */,
1757 BITFIELD(15, 5) /* index 67 */,
1768 BITFIELD(12, 3) /* index 100 */,
1772 BITFIELD(12, 3) /* index 109 */,
1776 BITFIELD(18, 2) /* index 118 */,
1778 BITFIELD(18, 2) /* index 123 */,
1780 BITFIELD(18, 2) /* index 128 */,
1782 BITFIELD(18, 2) /* index 133 */,
1784 BITFIELD(12, 2) /* index 138 */,
1786 BITFIELD(14, 2) /* index 143 */,
1788 BITFIELD(16, 2) /* index 148 */,
1790 BITFIELD(18, 2) /* index 153 */,
1792 BITFIELD(18, 2) /* index 158 */,
1795 BITFIELD(18, 2) /* index 163 */,
1798 BITFIELD(18, 2) /* index 168 */,
1801 BITFIELD(18, 2) /* index 173 */,
1807 BITFIELD(58, 4) /* index 0 */,
1811 BITFIELD(37, 2) /* index 17 */,
1813 BITFIELD(39, 2) /* index 22 */,
1815 BITFIELD(41, 2) /* index 27 */,
1817 BITFIELD(31, 2) /* index 32 */,
1819 BITFIELD(33, 2) /* index 37 */,
1821 BITFIELD(35, 2) /* index 42 */,
1823 BITFIELD(37, 2) /* index 47 */,
1825 BITFIELD(39, 2) /* index 52 */,
1827 BITFIELD(41, 2) /* index 57 */,
1829 BITFIELD(49, 2) /* index 62 */,
1831 BITFIELD(47, 4) /* index 67 */,
1837 BITFIELD(43, 3) /* index 84 */,
1840 BITFIELD(46, 1) /* index 93 */,
1842 BITFIELD(46, 1) /* index 96 */,
1844 BITFIELD(46, 1) /* index 99 */,
1846 BITFIELD(46, 1) /* index 102 */,
1848 BITFIELD(46, 1) /* index 105 */,
1850 BITFIELD(46, 1) /* index 108 */,
1852 BITFIELD(46, 1) /* index 111 */,
1854 BITFIELD(46, 1) /* index 114 */,
1856 BITFIELD(49, 2) /* index 117 */,
1858 BITFIELD(49, 2) /* index 122 */,
1860 BITFIELD(49, 2) /* index 127 */,
1862 BITFIELD(49, 2) /* index 132 */,
1864 BITFIELD(43, 2) /* index 137 */,
1866 BITFIELD(45, 2) /* index 142 */,
1868 BITFIELD(47, 2) /* index 147 */,
1870 BITFIELD(49, 2) /* index 152 */,
1872 BITFIELD(49, 2) /* index 157 */,
1875 BITFIELD(49, 2) /* index 162 */,
1881 BITFIELD(62, 2) /* index 0 */,
1883 BITFIELD(55, 3) /* index 5 */,
1886 BITFIELD(26, 1) /* index 14 */,
1888 BITFIELD(26, 1) /* index 17 */,
1890 BITFIELD(51, 2) /* index 20 */,
1892 BITFIELD(53, 2) /* index 25 */,
1895 BITFIELD(51, 2) /* index 30 */,
1897 BITFIELD(53, 2) /* index 35 */,
1899 BITFIELD(26, 1) /* index 40 */,
1901 BITFIELD(26, 1) /* index 43 */,
1903 BITFIELD(51, 2) /* index 46 */,
1905 BITFIELD(53, 2) /* index 51 */,
1908 BITFIELD(51, 2) /* index 56 */,
1910 BITFIELD(53, 2) /* index 61 */,
1912 BITFIELD(56, 2) /* index 66 */,
1914 BITFIELD(26, 1) /* index 71 */,
1916 BITFIELD(26, 1) /* index 74 */,
1918 BITFIELD(51, 2) /* index 77 */,
1920 BITFIELD(53, 2) /* index 82 */,
1922 BITFIELD(55, 1) /* index 87 */,
1924 BITFIELD(26, 1) /* index 90 */,
1926 BITFIELD(26, 1) /* index 93 */,
1928 BITFIELD(51, 2) /* index 96 */,
1930 BITFIELD(53, 2) /* index 101 */,
1932 BITFIELD(55, 1) /* index 106 */,
1934 BITFIELD(26, 1) /* index 109 */,
1936 BITFIELD(57, 1) /* index 112 */,
1938 BITFIELD(57, 1) /* index 115 */,
2141 int index = 0; find_opcode() local
2145 unsigned short bitspec = table[index]; find_opcode()
2149 unsigned short next = table[index + 1 + bitfield]; find_opcode()
2153 index = next - TILEGX_OPC_NONE; find_opcode()
H A Dtile-desc_32.c1224 BITFIELD(22, 9) /* index 0 */,
1336 BITFIELD(18, 4) /* index 513 */,
1342 BITFIELD(18, 4) /* index 530 */,
1348 BITFIELD(18, 4) /* index 547 */,
1354 BITFIELD(18, 4) /* index 564 */,
1360 BITFIELD(12, 2) /* index 581 */,
1362 BITFIELD(14, 2) /* index 586 */,
1364 BITFIELD(16, 2) /* index 591 */,
1366 BITFIELD(18, 4) /* index 596 */,
1372 BITFIELD(18, 4) /* index 613 */,
1377 BITFIELD(18, 3) /* index 630 */,
1380 BITFIELD(21, 1) /* index 639 */,
1382 BITFIELD(21, 1) /* index 642 */,
1384 BITFIELD(21, 1) /* index 645 */,
1386 BITFIELD(21, 1) /* index 648 */,
1388 BITFIELD(21, 1) /* index 651 */,
1390 BITFIELD(21, 1) /* index 654 */,
1392 BITFIELD(21, 1) /* index 657 */,
1394 BITFIELD(21, 1) /* index 660 */,
1396 BITFIELD(18, 4) /* index 663 */,
1403 BITFIELD(18, 4) /* index 680 */,
1411 BITFIELD(18, 4) /* index 697 */,
1418 BITFIELD(18, 4) /* index 714 */,
1424 BITFIELD(12, 2) /* index 731 */,
1426 BITFIELD(14, 2) /* index 736 */,
1428 BITFIELD(16, 2) /* index 741 */,
1431 BITFIELD(18, 4) /* index 746 */,
1438 BITFIELD(18, 4) /* index 763 */,
1445 BITFIELD(18, 3) /* index 780 */,
1448 BITFIELD(21, 1) /* index 789 */,
1450 BITFIELD(21, 1) /* index 792 */,
1452 BITFIELD(21, 1) /* index 795 */,
1454 BITFIELD(21, 1) /* index 798 */,
1456 BITFIELD(21, 1) /* index 801 */,
1458 BITFIELD(21, 1) /* index 804 */,
1460 BITFIELD(21, 1) /* index 807 */,
1462 BITFIELD(21, 1) /* index 810 */,
1464 BITFIELD(6, 2) /* index 813 */,
1467 BITFIELD(8, 2) /* index 818 */,
1470 BITFIELD(10, 2) /* index 823 */,
1473 BITFIELD(6, 2) /* index 828 */,
1475 BITFIELD(8, 2) /* index 833 */,
1477 BITFIELD(10, 2) /* index 838 */,
1479 BITFIELD(0, 2) /* index 843 */,
1481 BITFIELD(2, 2) /* index 848 */,
1483 BITFIELD(4, 2) /* index 853 */,
1485 BITFIELD(6, 2) /* index 858 */,
1487 BITFIELD(8, 2) /* index 863 */,
1489 BITFIELD(10, 2) /* index 868 */,
1491 BITFIELD(20, 2) /* index 873 */,
1493 BITFIELD(20, 2) /* index 878 */,
1496 BITFIELD(20, 2) /* index 883 */,
1498 BITFIELD(6, 2) /* index 888 */,
1500 BITFIELD(8, 2) /* index 893 */,
1502 BITFIELD(10, 2) /* index 898 */,
1504 BITFIELD(20, 2) /* index 903 */,
1507 BITFIELD(20, 2) /* index 908 */,
1509 BITFIELD(20, 2) /* index 913 */,
1512 BITFIELD(20, 2) /* index 918 */,
1515 BITFIELD(20, 2) /* index 923 */,
1517 BITFIELD(6, 2) /* index 928 */,
1519 BITFIELD(8, 2) /* index 933 */,
1521 BITFIELD(10, 2) /* index 938 */,
1524 BITFIELD(20, 2) /* index 943 */,
1527 BITFIELD(20, 2) /* index 948 */,
1530 BITFIELD(20, 2) /* index 953 */,
1532 BITFIELD(0, 2) /* index 958 */,
1534 BITFIELD(2, 2) /* index 963 */,
1536 BITFIELD(4, 2) /* index 968 */,
1538 BITFIELD(6, 2) /* index 973 */,
1540 BITFIELD(8, 2) /* index 978 */,
1542 BITFIELD(10, 2) /* index 983 */,
1544 BITFIELD(20, 2) /* index 988 */,
1547 BITFIELD(17, 5) /* index 993 */,
1556 BITFIELD(12, 4) /* index 1026 */,
1561 BITFIELD(16, 1) /* index 1043 */,
1563 BITFIELD(16, 1) /* index 1046 */,
1565 BITFIELD(16, 1) /* index 1049 */,
1567 BITFIELD(16, 1) /* index 1052 */,
1569 BITFIELD(16, 1) /* index 1055 */,
1571 BITFIELD(16, 1) /* index 1058 */,
1573 BITFIELD(16, 1) /* index 1061 */,
1575 BITFIELD(16, 1) /* index 1064 */,
1577 BITFIELD(16, 1) /* index 1067 */,
1579 BITFIELD(16, 1) /* index 1070 */,
1581 BITFIELD(16, 1) /* index 1073 */,
1583 BITFIELD(17, 5) /* index 1076 */,
1593 BITFIELD(12, 4) /* index 1109 */,
1598 BITFIELD(16, 1) /* index 1126 */,
1600 BITFIELD(16, 1) /* index 1129 */,
1602 BITFIELD(16, 1) /* index 1132 */,
1604 BITFIELD(16, 1) /* index 1135 */,
1606 BITFIELD(16, 1) /* index 1138 */,
1608 BITFIELD(16, 1) /* index 1141 */,
1610 BITFIELD(16, 1) /* index 1144 */,
1612 BITFIELD(16, 1) /* index 1147 */,
1614 BITFIELD(16, 1) /* index 1150 */,
1620 BITFIELD(54, 9) /* index 0 */,
1735 BITFIELD(49, 5) /* index 513 */,
1744 BITFIELD(43, 2) /* index 546 */,
1746 BITFIELD(45, 2) /* index 551 */,
1748 BITFIELD(47, 2) /* index 556 */,
1750 BITFIELD(49, 5) /* index 561 */,
1760 BITFIELD(49, 4) /* index 594 */,
1765 BITFIELD(53, 1) /* index 611 */,
1767 BITFIELD(53, 1) /* index 614 */,
1769 BITFIELD(53, 1) /* index 617 */,
1771 BITFIELD(53, 1) /* index 620 */,
1773 BITFIELD(53, 1) /* index 623 */,
1775 BITFIELD(53, 1) /* index 626 */,
1777 BITFIELD(53, 1) /* index 629 */,
1779 BITFIELD(53, 1) /* index 632 */,
1781 BITFIELD(53, 1) /* index 635 */,
1783 BITFIELD(53, 1) /* index 638 */,
1785 BITFIELD(49, 5) /* index 641 */,
1796 BITFIELD(43, 2) /* index 674 */,
1798 BITFIELD(45, 2) /* index 679 */,
1800 BITFIELD(47, 2) /* index 684 */,
1803 BITFIELD(49, 5) /* index 689 */,
1815 BITFIELD(49, 4) /* index 722 */,
1820 BITFIELD(53, 1) /* index 739 */,
1822 BITFIELD(53, 1) /* index 742 */,
1824 BITFIELD(53, 1) /* index 745 */,
1826 BITFIELD(53, 1) /* index 748 */,
1828 BITFIELD(53, 1) /* index 751 */,
1830 BITFIELD(53, 1) /* index 754 */,
1832 BITFIELD(53, 1) /* index 757 */,
1834 BITFIELD(53, 1) /* index 760 */,
1836 BITFIELD(53, 1) /* index 763 */,
1838 BITFIELD(37, 2) /* index 766 */,
1841 BITFIELD(39, 2) /* index 771 */,
1844 BITFIELD(41, 2) /* index 776 */,
1847 BITFIELD(37, 2) /* index 781 */,
1849 BITFIELD(39, 2) /* index 786 */,
1851 BITFIELD(41, 2) /* index 791 */,
1853 BITFIELD(31, 2) /* index 796 */,
1855 BITFIELD(33, 2) /* index 801 */,
1857 BITFIELD(35, 2) /* index 806 */,
1859 BITFIELD(37, 2) /* index 811 */,
1861 BITFIELD(39, 2) /* index 816 */,
1863 BITFIELD(41, 2) /* index 821 */,
1865 BITFIELD(31, 4) /* index 826 */,
1870 BITFIELD(31, 4) /* index 843 */,
1877 BITFIELD(51, 3) /* index 860 */,
1880 BITFIELD(31, 2) /* index 869 */,
1882 BITFIELD(33, 2) /* index 874 */,
1884 BITFIELD(35, 2) /* index 879 */,
1886 BITFIELD(37, 2) /* index 884 */,
1888 BITFIELD(39, 2) /* index 889 */,
1890 BITFIELD(41, 2) /* index 894 */,
1892 BITFIELD(51, 3) /* index 899 */,
1895 BITFIELD(37, 2) /* index 908 */,
1897 BITFIELD(39, 2) /* index 913 */,
1899 BITFIELD(41, 2) /* index 918 */,
1901 BITFIELD(51, 3) /* index 923 */,
1905 BITFIELD(51, 3) /* index 932 */,
1909 BITFIELD(51, 3) /* index 941 */,
1913 BITFIELD(51, 3) /* index 950 */,
1917 BITFIELD(37, 2) /* index 959 */,
1919 BITFIELD(39, 2) /* index 964 */,
1921 BITFIELD(41, 2) /* index 969 */,
1924 BITFIELD(51, 3) /* index 974 */,
1928 BITFIELD(51, 3) /* index 983 */,
1932 BITFIELD(46, 7) /* index 992 */,
1963 BITFIELD(53, 1) /* index 1121 */,
1965 BITFIELD(53, 1) /* index 1124 */,
1967 BITFIELD(53, 1) /* index 1127 */,
1969 BITFIELD(53, 1) /* index 1130 */,
1971 BITFIELD(53, 1) /* index 1133 */,
1973 BITFIELD(53, 1) /* index 1136 */,
1975 BITFIELD(53, 1) /* index 1139 */,
1977 BITFIELD(53, 1) /* index 1142 */,
1979 BITFIELD(53, 1) /* index 1145 */,
1981 BITFIELD(53, 1) /* index 1148 */,
1983 BITFIELD(43, 3) /* index 1151 */,
1986 BITFIELD(53, 1) /* index 1160 */,
1988 BITFIELD(53, 1) /* index 1163 */,
1990 BITFIELD(53, 1) /* index 1166 */,
1992 BITFIELD(53, 1) /* index 1169 */,
1994 BITFIELD(53, 1) /* index 1172 */,
1996 BITFIELD(53, 1) /* index 1175 */,
1998 BITFIELD(31, 2) /* index 1178 */,
2000 BITFIELD(53, 1) /* index 1183 */,
2002 BITFIELD(33, 2) /* index 1186 */,
2004 BITFIELD(35, 2) /* index 1191 */,
2006 BITFIELD(37, 2) /* index 1196 */,
2008 BITFIELD(39, 2) /* index 1201 */,
2010 BITFIELD(41, 2) /* index 1206 */,
2012 BITFIELD(53, 1) /* index 1211 */,
2014 BITFIELD(33, 2) /* index 1214 */,
2016 BITFIELD(35, 2) /* index 1219 */,
2018 BITFIELD(37, 2) /* index 1224 */,
2020 BITFIELD(39, 2) /* index 1229 */,
2022 BITFIELD(41, 2) /* index 1234 */,
2024 BITFIELD(53, 1) /* index 1239 */,
2026 BITFIELD(43, 3) /* index 1242 */,
2029 BITFIELD(53, 1) /* index 1251 */,
2031 BITFIELD(53, 1) /* index 1254 */,
2033 BITFIELD(53, 1) /* index 1257 */,
2035 BITFIELD(31, 2) /* index 1260 */,
2037 BITFIELD(33, 2) /* index 1265 */,
2039 BITFIELD(35, 2) /* index 1270 */,
2041 BITFIELD(53, 1) /* index 1275 */,
2043 BITFIELD(53, 1) /* index 1278 */,
2045 BITFIELD(53, 1) /* index 1281 */,
2047 BITFIELD(53, 1) /* index 1284 */,
2049 BITFIELD(53, 1) /* index 1287 */,
2051 BITFIELD(43, 3) /* index 1290 */,
2054 BITFIELD(53, 1) /* index 1299 */,
2056 BITFIELD(53, 1) /* index 1302 */,
2058 BITFIELD(53, 1) /* index 1305 */,
2060 BITFIELD(53, 1) /* index 1308 */,
2062 BITFIELD(53, 1) /* index 1311 */,
2064 BITFIELD(53, 1) /* index 1314 */,
2066 BITFIELD(53, 1) /* index 1317 */,
2068 BITFIELD(53, 1) /* index 1320 */,
2070 BITFIELD(43, 2) /* index 1323 */,
2072 BITFIELD(45, 1) /* index 1328 */,
2074 BITFIELD(53, 1) /* index 1331 */,
2076 BITFIELD(46, 7) /* index 1334 */,
2107 BITFIELD(53, 1) /* index 1463 */,
2109 BITFIELD(53, 1) /* index 1466 */,
2111 BITFIELD(53, 1) /* index 1469 */,
2113 BITFIELD(53, 1) /* index 1472 */,
2115 BITFIELD(53, 1) /* index 1475 */,
2117 BITFIELD(53, 1) /* index 1478 */,
2119 BITFIELD(53, 1) /* index 1481 */,
2121 BITFIELD(53, 1) /* index 1484 */,
2123 BITFIELD(53, 1) /* index 1487 */,
2125 BITFIELD(53, 1) /* index 1490 */,
2127 BITFIELD(43, 3) /* index 1493 */,
2130 BITFIELD(53, 1) /* index 1502 */,
2132 BITFIELD(53, 1) /* index 1505 */,
2134 BITFIELD(53, 1) /* index 1508 */,
2136 BITFIELD(53, 1) /* index 1511 */,
2138 BITFIELD(53, 1) /* index 1514 */,
2140 BITFIELD(43, 3) /* index 1517 */,
2143 BITFIELD(53, 1) /* index 1526 */,
2145 BITFIELD(43, 2) /* index 1529 */,
2147 BITFIELD(45, 1) /* index 1534 */,
2149 BITFIELD(53, 1) /* index 1537 */,
2155 BITFIELD(27, 4) /* index 0 */,
2159 BITFIELD(18, 2) /* index 17 */,
2161 BITFIELD(18, 2) /* index 22 */,
2163 BITFIELD(18, 2) /* index 27 */,
2165 BITFIELD(12, 2) /* index 32 */,
2167 BITFIELD(14, 2) /* index 37 */,
2169 BITFIELD(16, 2) /* index 42 */,
2171 BITFIELD(18, 2) /* index 47 */,
2173 BITFIELD(18, 2) /* index 52 */,
2175 BITFIELD(18, 2) /* index 57 */,
2177 BITFIELD(18, 2) /* index 62 */,
2180 BITFIELD(18, 2) /* index 67 */,
2183 BITFIELD(0, 2) /* index 72 */,
2185 BITFIELD(2, 2) /* index 77 */,
2187 BITFIELD(4, 2) /* index 82 */,
2189 BITFIELD(6, 2) /* index 87 */,
2191 BITFIELD(8, 2) /* index 92 */,
2193 BITFIELD(10, 2) /* index 97 */,
2195 BITFIELD(6, 2) /* index 102 */,
2197 BITFIELD(8, 2) /* index 107 */,
2199 BITFIELD(10, 2) /* index 112 */,
2201 BITFIELD(15, 5) /* index 117 */,
2210 BITFIELD(12, 3) /* index 150 */,
2213 BITFIELD(12, 3) /* index 159 */,
2221 BITFIELD(59, 4) /* index 0 */,
2226 BITFIELD(49, 2) /* index 17 */,
2228 BITFIELD(49, 2) /* index 22 */,
2230 BITFIELD(49, 2) /* index 27 */,
2232 BITFIELD(43, 2) /* index 32 */,
2234 BITFIELD(45, 2) /* index 37 */,
2236 BITFIELD(47, 2) /* index 42 */,
2238 BITFIELD(49, 2) /* index 47 */,
2240 BITFIELD(49, 2) /* index 52 */,
2242 BITFIELD(49, 2) /* index 57 */,
2244 BITFIELD(31, 2) /* index 62 */,
2246 BITFIELD(33, 2) /* index 67 */,
2248 BITFIELD(35, 2) /* index 72 */,
2250 BITFIELD(37, 2) /* index 77 */,
2252 BITFIELD(39, 2) /* index 82 */,
2254 BITFIELD(41, 2) /* index 87 */,
2256 BITFIELD(37, 2) /* index 92 */,
2258 BITFIELD(39, 2) /* index 97 */,
2260 BITFIELD(41, 2) /* index 102 */,
2262 BITFIELD(48, 3) /* index 107 */,
2265 BITFIELD(43, 3) /* index 116 */,
2268 BITFIELD(46, 2) /* index 125 */,
2270 BITFIELD(46, 2) /* index 130 */,
2272 BITFIELD(46, 2) /* index 135 */,
2278 BITFIELD(56, 3) /* index 0 */,
2281 BITFIELD(20, 2) /* index 9 */,
2283 BITFIELD(22, 2) /* index 14 */,
2285 BITFIELD(24, 2) /* index 19 */,
2529 int index = 0; find_opcode() local
2533 unsigned short bitspec = table[index]; find_opcode()
2537 unsigned short next = table[index + 1 + bitfield]; find_opcode()
2541 index = next - TILEPRO_OPC_NONE; find_opcode()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Devent.h23 void (*init)(struct nvkm_event *, int type, int index);
24 void (*fini)(struct nvkm_event *, int type, int index);
30 void nvkm_event_get(struct nvkm_event *, u32 types, int index);
31 void nvkm_event_put(struct nvkm_event *, u32 types, int index);
32 void nvkm_event_send(struct nvkm_event *, u32 types, int index,
H A Dengine.h25 int (*sclass)(struct nvkm_oclass *, int index,
33 int (*sclass)(struct nvkm_oclass *, int index);
41 int index, u32 pmc_enable, bool enable,
44 int index, u32 pmc_enable, bool enable,
H A Dsubdev.h8 enum nvkm_devidx index; member in struct:nvkm_subdev
27 int index, u32 pmc_enable, struct nvkm_subdev *);
39 nvkm_subdev_name[_subdev->index], ##a); \
/linux-4.4.14/fs/ntfs/
H A Dindex.h2 * index.h - Defines for NTFS kernel index handling. Part of the Linux-NTFS
36 * @idx_ni: index inode containing the @entry described by this context
37 * @entry: index entry (points into @ir or @ia)
38 * @data: index entry data (points into @entry)
41 * @ir: index root if @is_in_root and NULL otherwise
44 * @ia: index block if @is_in_root is 'false' and NULL otherwise
47 * @idx_ni is the index inode this context belongs to.
49 * @entry is the index entry described by this context. @data and @data_len
50 * are the index entry data and its length in bytes, respectively. @data
53 * If @is_in_root is 'true', @entry is in the index root attribute @ir described
57 * If @is_in_root is 'false', @entry is in the index allocation attribute and @ia
58 * and @page point to the index allocation block and the mapped, locked page it
63 * We use this context to allow ntfs_index_lookup() to return the found index
70 * If the index entry was modified, call flush_dcache_index_entry_page()
97 * ntfs_index_entry_flush_dcache_page - flush_dcache_page() for index entries
98 * @ictx: ntfs index context describing the index entry
100 * Call flush_dcache_page() for the page in which an index entry resides.
102 * This must be called every time an index entry is modified, just after the
105 * If the index entry is in the index root attribute, simply flush the page
106 * containing the mft record containing the index root attribute.
108 * If the index entry is in an index block belonging to the index allocation
109 * attribute, simply flush the page cache page containing the index block.
120 * ntfs_index_entry_mark_dirty - mark an index entry dirty
121 * @ictx: ntfs index context describing the index entry
123 * Mark the index entry described by the index entry context @ictx dirty.
125 * If the index entry is in the index root attribute, simply mark the mft
126 * record containing the index root attribute dirty. This ensures the mft
127 * record, and hence the index root attribute, will be written out to disk
130 * If the index entry is in an index block belonging to the index allocation
131 * attribute, mark the buffers belonging to the index record as well as the
132 * page cache page the index block is in dirty. This automatically marks the
133 * VFS inode of the ntfs index inode to which the index entry belongs dirty,
135 * dirty index block, will be written out to disk later.
H A Dindex.c2 * index.c - NTFS kernel index handling. Part of the Linux-NTFS project.
27 #include "index.h"
31 * ntfs_index_ctx_get - allocate and initialize a new index context
32 * @idx_ni: ntfs index inode with which to initialize the context
34 * Allocate a new index context, initialize it with @idx_ni and return it.
37 * Locking: Caller must hold i_mutex on the index inode.
50 * ntfs_index_ctx_put - release an index context
51 * @ictx: index context to free
53 * Release the index context @ictx, releasing all associated resources.
55 * Locking: Caller must hold i_mutex on the index inode.
79 * ntfs_index_lookup - find a key in an index and return its index entry
80 * @key: [IN] key for which to search in the index
82 * @ictx: [IN/OUT] context describing the index and the returned entry
87 * Look for the @key in the index specified by the index lookup context @ictx.
88 * ntfs_index_lookup() walks the contents of the index looking for the @key.
90 * If the @key is found in the index, 0 is returned and @ictx is setup to
91 * describe the index entry containing the matching @key. @ictx->entry is the
92 * index entry and @ictx->data and @ictx->data_len are the index entry data and
95 * If the @key is not found in the index, -ENOENT is returned and @ictx is
96 * setup to describe the index entry whose key collates immediately after the
97 * search @key, i.e. this is the position in the index at which an index entry
106 * If the index entry was modified, call flush_dcache_index_entry_page()
111 * Locking: - Caller must hold i_mutex on the index inode.
112 * - Each page cache page in the index allocation mapping must be
145 idx_ni->itype.index.collation_rule)) { ntfs_index_lookup()
148 idx_ni->itype.index.collation_rule)); ntfs_index_lookup()
151 /* Get hold of the mft record for the index inode. */ ntfs_index_lookup()
163 /* Find the index root attribute in the mft record. */ ntfs_index_lookup()
174 /* Get to the index root value (it has been verified in read_inode). */ ntfs_index_lookup()
177 index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length); ntfs_index_lookup()
178 /* The first index entry. */ ntfs_index_lookup()
179 ie = (INDEX_ENTRY*)((u8*)&ir->index + ntfs_index_lookup()
180 le32_to_cpu(ir->index.entries_offset)); ntfs_index_lookup()
227 rc = ntfs_collate(vol, idx_ni->itype.index.collation_rule, key, ntfs_index_lookup()
231 * is definitely no such key in this index but we might need to ntfs_index_lookup()
245 * We have finished with this index without success. Check for the ntfs_index_lookup()
254 /* Consistency check: Verify that an index allocation exists. */ ntfs_index_lookup()
256 ntfs_error(sb, "No index allocation attribute but index entry " ntfs_index_lookup()
265 * We are done with the index root and the mft record. Release them, ntfs_index_lookup()
274 * Convert vcn to index into the index allocation attribute in units ntfs_index_lookup()
279 idx_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT); ntfs_index_lookup()
281 ntfs_error(sb, "Failed to map index page, error %ld.", ntfs_index_lookup()
289 /* Get to the index allocation block. */ ntfs_index_lookup()
291 idx_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK)); ntfs_index_lookup()
306 ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is " ntfs_index_lookup()
314 if (le32_to_cpu(ia->index.allocated_size) + 0x18 != ntfs_index_lookup()
315 idx_ni->itype.index.block_size) { ntfs_index_lookup()
317 "a size (%u) differing from the index " ntfs_index_lookup()
321 le32_to_cpu(ia->index.allocated_size) + 0x18, ntfs_index_lookup()
322 idx_ni->itype.index.block_size); ntfs_index_lookup()
325 index_end = (u8*)ia + idx_ni->itype.index.block_size; ntfs_index_lookup()
334 index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length); ntfs_index_lookup()
335 if (index_end > (u8*)ia + idx_ni->itype.index.block_size) { ntfs_index_lookup()
336 ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of inode " ntfs_index_lookup()
341 /* The first index entry. */ ntfs_index_lookup()
342 ie = (INDEX_ENTRY*)((u8*)&ia->index + ntfs_index_lookup()
343 le32_to_cpu(ia->index.entries_offset)); ntfs_index_lookup()
345 * Iterate similar to above big loop but applied to index buffer, thus ntfs_index_lookup()
390 rc = ntfs_collate(vol, idx_ni->itype.index.collation_rule, key, ntfs_index_lookup()
394 * is definitely no such key in this index but we might need to ntfs_index_lookup()
408 * We have finished with this index buffer without success. Check for ntfs_index_lookup()
416 if ((ia->index.flags & NODE_MASK) == LEAF_NODE) { ntfs_index_lookup()
452 ntfs_error(sb, "Corrupt index. Aborting lookup."); ntfs_index_lookup()
H A Ddir.c73 * - Each page cache page in the index allocation mapping must be
113 /* Find the index root attribute in the mft record. */ ntfs_lookup_inode_by_name()
125 /* Get to the index root value (it's been verified in read_inode). */ ntfs_lookup_inode_by_name()
128 index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length); ntfs_lookup_inode_by_name()
129 /* The first index entry. */ ntfs_lookup_inode_by_name()
130 ie = (INDEX_ENTRY*)((u8*)&ir->index + ntfs_lookup_inode_by_name()
131 le32_to_cpu(ir->index.entries_offset)); ntfs_lookup_inode_by_name()
253 * is definitely no such name in this index but we might need to ntfs_lookup_inode_by_name()
282 * We have finished with this index without success. Check for the ntfs_lookup_inode_by_name()
297 /* Consistency check: Verify that an index allocation exists. */ ntfs_lookup_inode_by_name()
299 ntfs_error(sb, "No index allocation attribute but index entry " ntfs_lookup_inode_by_name()
308 * We are done with the index root and the mft record. Release them, ntfs_lookup_inode_by_name()
317 * Convert vcn to index into the index allocation attribute in units ntfs_lookup_inode_by_name()
322 dir_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT); ntfs_lookup_inode_by_name()
324 ntfs_error(sb, "Failed to map directory index page, error %ld.", ntfs_lookup_inode_by_name()
332 /* Get to the index allocation block. */ ntfs_lookup_inode_by_name()
334 dir_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK)); ntfs_lookup_inode_by_name()
343 ntfs_error(sb, "Directory index record with vcn 0x%llx is " ntfs_lookup_inode_by_name()
349 ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is " ntfs_lookup_inode_by_name()
357 if (le32_to_cpu(ia->index.allocated_size) + 0x18 != ntfs_lookup_inode_by_name()
358 dir_ni->itype.index.block_size) { ntfs_lookup_inode_by_name()
364 le32_to_cpu(ia->index.allocated_size) + 0x18, ntfs_lookup_inode_by_name()
365 dir_ni->itype.index.block_size); ntfs_lookup_inode_by_name()
368 index_end = (u8*)ia + dir_ni->itype.index.block_size; ntfs_lookup_inode_by_name()
377 index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length); ntfs_lookup_inode_by_name()
378 if (index_end > (u8*)ia + dir_ni->itype.index.block_size) { ntfs_lookup_inode_by_name()
379 ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of directory " ntfs_lookup_inode_by_name()
384 /* The first index entry. */ ntfs_lookup_inode_by_name()
385 ie = (INDEX_ENTRY*)((u8*)&ia->index + ntfs_lookup_inode_by_name()
386 le32_to_cpu(ia->index.entries_offset)); ntfs_lookup_inode_by_name()
388 * Iterate similar to above big loop but applied to index buffer, thus ntfs_lookup_inode_by_name()
515 * is definitely no such name in this index but we might need to ntfs_lookup_inode_by_name()
544 * We have finished with this index buffer without success. Check for ntfs_lookup_inode_by_name()
548 if ((ia->index.flags & NODE_MASK) == LEAF_NODE) { ntfs_lookup_inode_by_name()
664 /* Find the index root attribute in the mft record. */
676 /* Get to the index root value (it's been verified in read_inode). */
679 index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
680 /* The first index entry. */
681 ie = (INDEX_ENTRY*)((u8*)&ir->index +
682 le32_to_cpu(ir->index.entries_offset));
738 * is definitely no such name in this index but we might need to
767 * We have finished with this index without success. Check for the
775 /* Consistency check: Verify that an index allocation exists. */
777 ntfs_error(sb, "No index allocation attribute but index entry "
786 * We are done with the index root and the mft record. Release them,
795 * Convert vcn to index into the index allocation attribute in units
800 dir_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT);
802 ntfs_error(sb, "Failed to map directory index page, error %ld.",
810 /* Get to the index allocation block. */
812 dir_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK));
821 ntfs_error(sb, "Directory index record with vcn 0x%llx is "
827 ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is "
835 if (le32_to_cpu(ia->index.allocated_size) + 0x18 !=
836 dir_ni->itype.index.block_size) {
842 le32_to_cpu(ia->index.allocated_size) + 0x18,
843 dir_ni->itype.index.block_size);
846 index_end = (u8*)ia + dir_ni->itype.index.block_size;
855 index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length);
856 if (index_end > (u8*)ia + dir_ni->itype.index.block_size) {
857 ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of directory "
862 /* The first index entry. */
863 ie = (INDEX_ENTRY*)((u8*)&ia->index +
864 le32_to_cpu(ia->index.entries_offset));
866 * Iterate similar to above big loop but applied to index buffer, thus
925 * is definitely no such name in this index but we might need to
954 * We have finished with this index buffer without success. Check for
958 if ((ia->index.flags & NODE_MASK) == LEAF_NODE) {
1008 * @ia_page: page in which the index allocation buffer @ie is in resides
1009 * @ie: current index entry
1016 * If @ia_page is not NULL it is the locked page containing the index
1017 * allocation block containing the index entry @ie.
1081 * index root entries and then the index allocation entries that are marked
1082 * as in use in the index bitmap.
1092 * - Each page cache page in the index allocation mapping must be
1139 /* Are we jumping straight into the index allocation attribute? */ ntfs_readdir()
1154 /* Get the offset into the index root attribute. */ ntfs_readdir()
1156 /* Find the index root attribute in the mft record. */ ntfs_readdir()
1165 * Copy the index root attribute value to a buffer so that we can put ntfs_readdir()
1180 /* Copy the index root value (it has been verified in read_inode). */ ntfs_readdir()
1187 index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length); ntfs_readdir()
1188 /* The first index entry. */ ntfs_readdir()
1189 ie = (INDEX_ENTRY*)((u8*)&ir->index + ntfs_readdir()
1190 le32_to_cpu(ir->index.entries_offset)); ntfs_readdir()
1197 ntfs_debug("In index root, offset 0x%zx.", (u8*)ie - (u8*)ir); ntfs_readdir()
1207 /* Skip index root entry if continuing previous readdir. */ ntfs_readdir()
1219 /* We are done with the index root and can free the buffer. */ ntfs_readdir()
1222 /* If there is no index allocation attribute we are finished. */ ntfs_readdir()
1225 /* Advance fpos to the beginning of the index allocation. */ ntfs_readdir()
1230 /* Get the offset into the index allocation attribute. */ ntfs_readdir()
1233 ntfs_debug("Inode 0x%lx, getting index bitmap.", vdir->i_ino); ntfs_readdir()
1242 bmp_pos = ia_pos >> ndir->itype.index.block_size_bits; ntfs_readdir()
1244 ntfs_error(sb, "Current index allocation position exceeds " ntfs_readdir()
1245 "index bitmap size."); ntfs_readdir()
1252 ntfs_debug("Reading bitmap with page index 0x%llx, bit ofs 0x%llx", ntfs_readdir()
1259 ntfs_error(sb, "Reading index bitmap failed."); ntfs_readdir()
1265 /* Find next index block in use. */ ntfs_readdir()
1283 ndir->itype.index.block_size_bits; ntfs_readdir()
1285 ntfs_debug("Handling index buffer 0x%llx.", ntfs_readdir()
1287 /* If the current index buffer is in the same page we reuse the page. */ ntfs_readdir()
1301 ntfs_error(sb, "Reading index allocation data failed."); ntfs_readdir()
1309 /* Get the current index buffer. */ ntfs_readdir()
1311 ~(s64)(ndir->itype.index.block_size - 1))); ntfs_readdir()
1320 ntfs_error(sb, "Directory index record with vcn 0x%llx is " ntfs_readdir()
1323 ndir->itype.index.vcn_size_bits, vdir->i_ino); ntfs_readdir()
1327 ~(s64)(ndir->itype.index.block_size - 1)) >> ntfs_readdir()
1328 ndir->itype.index.vcn_size_bits)) { ntfs_readdir()
1329 ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is " ntfs_readdir()
1335 ndir->itype.index.vcn_size_bits, vdir->i_ino); ntfs_readdir()
1338 if (unlikely(le32_to_cpu(ia->index.allocated_size) + 0x18 != ntfs_readdir()
1339 ndir->itype.index.block_size)) { ntfs_readdir()
1345 ndir->itype.index.vcn_size_bits, vdir->i_ino, ntfs_readdir()
1346 le32_to_cpu(ia->index.allocated_size) + 0x18, ntfs_readdir()
1347 ndir->itype.index.block_size); ntfs_readdir()
1350 index_end = (u8*)ia + ndir->itype.index.block_size; ntfs_readdir()
1356 ndir->itype.index.vcn_size_bits, vdir->i_ino); ntfs_readdir()
1359 ia_start = ia_pos & ~(s64)(ndir->itype.index.block_size - 1); ntfs_readdir()
1360 index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length); ntfs_readdir()
1361 if (unlikely(index_end > (u8*)ia + ndir->itype.index.block_size)) { ntfs_readdir()
1362 ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of directory " ntfs_readdir()
1365 ndir->itype.index.vcn_size_bits, vdir->i_ino); ntfs_readdir()
1368 /* The first index entry in this index buffer. */ ntfs_readdir()
1369 ie = (INDEX_ENTRY*)((u8*)&ia->index + ntfs_readdir()
1370 le32_to_cpu(ia->index.entries_offset)); ntfs_readdir()
1377 ntfs_debug("In index allocation, offset 0x%llx.", ntfs_readdir()
1389 /* Skip index block entry if continuing previous readdir. */ ntfs_readdir()
1395 ndir->itype.index.vcn_size_bits) + ntfs_readdir()
1455 * page cache page index. Doing it this way means we don't run into problems
1495 * TODO: We should probably also write all attribute/index inodes associated
/linux-4.4.14/drivers/hwmon/
H A Dw83795.c131 #define IN_LSB_REG(index, type) \
132 (((type) == 1) ? W83795_REG_IN_HL_LSB[(index)] \
133 : (W83795_REG_IN_HL_LSB[(index)] + 1))
163 #define W83795_REG_FAN(index) (0x2E + (index))
164 #define W83795_REG_FAN_MIN_HL(index) (0xB6 + (index))
165 #define W83795_REG_FAN_MIN_LSB(index) (0xC4 + (index) / 2)
166 #define W83795_REG_FAN_MIN_LSB_SHIFT(index) \
167 (((index) & 1) ? 4 : 0)
173 #define W83795_REG_ALARM(index) (0x41 + (index))
175 #define W83795_REG_BEEP(index) (0x50 + (index))
183 #define W83795_REG_TFMR(index) (0x202 + (index))
186 #define W83795_REG_TSS(index) (0x209 + (index))
201 #define W83795_REG_PWM(index, nr) (0x210 + (nr) * 8 + (index))
203 #define W83795_REG_FTSH(index) (0x240 + (index) * 2)
204 #define W83795_REG_FTSL(index) (0x241 + (index) * 2)
211 #define W83795_REG_TTTI(index) (0x260 + (index))
212 #define W83795_REG_CTFS(index) (0x268 + (index))
213 #define W83795_REG_HT(index) (0x270 + (index))
217 #define W83795_REG_SF4_TEMP(temp_num, index) \
218 (0x280 + 0x10 * (temp_num) + (index))
219 #define W83795_REG_SF4_PWM(temp_num, index) \
220 (0x288 + 0x10 * (temp_num) + (index))
224 #define W83795_REG_DTS(index) (0x26 + (index))
225 #define W83795_REG_PECI_TBASE(index) (0x320 + (index))
231 #define W83795_REG_DTS_EXT(index) (0xB2 + (index))
236 #define W83795_REG_SETUP_PWM(index) (0x20C + (index))
238 static inline u16 in_from_reg(u8 index, u16 val) in_from_reg() argument
241 if (index >= 12 && index <= 14) in_from_reg()
247 static inline u16 in_to_reg(u8 index, u16 val) in_to_reg() argument
249 if (index >= 12 && index <= 14) in_to_reg()
720 int index = sensor_attr->index >> 3; show_alarm_beep() local
721 int bit = sensor_attr->index & 0x07; show_alarm_beep()
725 val = (data->alarms[index] >> bit) & 1; show_alarm_beep()
727 val = (data->beeps[index] >> bit) & 1; show_alarm_beep()
740 int index = sensor_attr->index >> 3; store_beep() local
741 int shift = sensor_attr->index & 0x07; store_beep()
751 data->beeps[index] = w83795_read(client, W83795_REG_BEEP(index)); store_beep()
752 data->beeps[index] &= ~beep_bit; store_beep()
753 data->beeps[index] |= val << shift; store_beep()
754 w83795_write(client, W83795_REG_BEEP(index), data->beeps[index]); store_beep()
793 int index = sensor_attr->index; show_fan() local
798 val = data->fan[index] & 0x0fff; show_fan()
800 val = data->fan_min[index] & 0x0fff; show_fan()
811 int index = sensor_attr->index; store_fan_min() local
821 data->fan_min[index] = val; store_fan_min()
822 w83795_write(client, W83795_REG_FAN_MIN_HL(index), (val >> 4) & 0xff); store_fan_min()
824 if (index & 1) { store_fan_min()
826 val |= w83795_read(client, W83795_REG_FAN_MIN_LSB(index)) store_fan_min()
829 val |= w83795_read(client, W83795_REG_FAN_MIN_LSB(index)) store_fan_min()
832 w83795_write(client, W83795_REG_FAN_MIN_LSB(index), val & 0xff); store_fan_min()
845 int index = sensor_attr->index; show_pwm() local
853 val = time_from_reg(data->pwm[index][nr]); show_pwm()
856 val = pwm_freq_from_reg(data->pwm[index][nr], data->clkin); show_pwm()
859 val = data->pwm[index][nr]; show_pwm()
875 int index = sensor_attr->index; store_pwm() local
893 w83795_write(client, W83795_REG_PWM(index, nr), val); store_pwm()
894 data->pwm[index][nr] = val; store_pwm()
905 int index = sensor_attr->index; show_pwm_enable() local
909 if (data->pwm_fcms[0] & (1 << index)) { show_pwm_enable()
915 if (data->pwm_tfmr[tmp] & (1 << index)) { show_pwm_enable()
935 int index = sensor_attr->index; store_pwm_enable() local
956 data->pwm_fcms[0] &= ~(1 << index); store_pwm_enable()
960 data->pwm_tfmr[i] &= ~(1 << index); store_pwm_enable()
966 data->pwm_fcms[0] |= (1 << index); store_pwm_enable()
978 int index = to_sensor_dev_attr_2(attr)->index; show_pwm_mode() local
981 if (data->pwm_fomc & (1 << index)) show_pwm_mode()
1016 int index = sensor_attr->index; show_temp_src() local
1017 u8 tmp = data->temp_src[index / 2]; show_temp_src()
1019 if (index & 1) show_temp_src()
1025 if (tmp >= 4 || tss_map[tmp][index] == TSS_MAP_RESERVED) show_temp_src()
1028 return sprintf(buf, "%u\n", (unsigned int)tss_map[tmp][index] + 1); show_temp_src()
1039 int index = sensor_attr->index; store_temp_src() local
1042 u8 val = index / 2; store_temp_src()
1050 if (tss_map[tmp][index] == channel - 1) store_temp_src()
1057 if (index & 1) { store_temp_src()
1080 int index = sensor_attr->index; show_temp_pwm_enable() local
1085 tmp = (data->pwm_fcms[1] >> index) & 1; show_temp_pwm_enable()
1092 tmp = data->pwm_tfmr[index]; show_temp_pwm_enable()
1108 int index = sensor_attr->index; store_temp_pwm_enable() local
1120 data->pwm_fcms[1] &= ~(1 << index); store_temp_pwm_enable()
1121 data->pwm_fcms[1] |= tmp << index; store_temp_pwm_enable()
1128 w83795_write(client, W83795_REG_TFMR(index), tmp); store_temp_pwm_enable()
1129 data->pwm_tfmr[index] = tmp; store_temp_pwm_enable()
1145 int index = sensor_attr->index; show_fanin() local
1150 tmp = fan_from_reg(data->target_speed[index]); show_fanin()
1169 int index = sensor_attr->index; store_fanin() local
1179 w83795_write(client, W83795_REG_FTSH(index), val >> 4); store_fanin()
1180 w83795_write(client, W83795_REG_FTSL(index), (val << 4) & 0xf0); store_fanin()
1181 data->target_speed[index] = val; store_fanin()
1202 int index = sensor_attr->index; show_temp_pwm() local
1203 long tmp = temp_from_reg(data->pwm_temp[index][nr]); show_temp_pwm()
1217 int index = sensor_attr->index; store_temp_pwm() local
1229 w83795_write(client, W83795_REG_TTTI(index), val); store_temp_pwm()
1233 w83795_write(client, W83795_REG_CTFS(index), val); store_temp_pwm()
1237 tmp = w83795_read(client, W83795_REG_HT(index)); store_temp_pwm()
1240 w83795_write(client, W83795_REG_HT(index), tmp); store_temp_pwm()
1244 tmp = w83795_read(client, W83795_REG_HT(index)); store_temp_pwm()
1247 w83795_write(client, W83795_REG_HT(index), tmp); store_temp_pwm()
1250 data->pwm_temp[index][nr] = val; store_temp_pwm()
1263 int index = sensor_attr->index; show_sf4_pwm() local
1265 return sprintf(buf, "%u\n", data->sf4_reg[index][SF4_PWM][nr]); show_sf4_pwm()
1277 int index = sensor_attr->index; store_sf4_pwm() local
1284 w83795_write(client, W83795_REG_SF4_PWM(index, nr), val); store_sf4_pwm()
1285 data->sf4_reg[index][SF4_PWM][nr] = val; store_sf4_pwm()
1298 int index = sensor_attr->index; show_sf4_temp() local
1301 (data->sf4_reg[index][SF4_TEMP][nr]) * 1000); show_sf4_temp()
1313 int index = sensor_attr->index; store_sf4_temp() local
1321 w83795_write(client, W83795_REG_SF4_TEMP(index, nr), val); store_sf4_temp()
1322 data->sf4_reg[index][SF4_TEMP][nr] = val; store_sf4_temp()
1335 int index = sensor_attr->index; show_temp() local
1337 long temp = temp_from_reg(data->temp[index][nr]); show_temp()
1340 temp += (data->temp_read_vrlsb[index] >> 6) * 250; show_temp()
1351 int index = sensor_attr->index; store_temp() local
1360 data->temp[index][nr] = temp_to_reg(tmp, -128, 127); store_temp()
1361 w83795_write(client, W83795_REG_TEMP[index][nr], data->temp[index][nr]); store_temp()
1386 int index = sensor_attr->index; show_dts() local
1388 long temp = temp_from_reg(data->dts[index]); show_dts()
1390 temp += (data->dts_read_vrlsb[index] >> 6) * 250; show_dts()
1434 int index = sensor_attr->index; show_temp_mode() local
1437 if (data->temp_mode & (1 << index)) show_temp_mode()
1454 int index = sensor_attr->index; store_temp_mode() local
1468 data->temp_mode |= 1 << index; store_temp_mode()
1472 data->temp_mode &= ~(1 << index); store_temp_mode()
1475 reg_shift = 2 * index; store_temp_mode()
1493 int index = sensor_attr->index; show_in() local
1495 u16 val = data->in[index][nr]; show_in()
1501 if ((index >= 17) && show_in()
1502 !((data->has_gain >> (index - 17)) & 1)) show_in()
1507 lsb_idx = IN_LSB_SHIFT_IDX[index][IN_LSB_IDX]; show_in()
1510 IN_LSB_SHIFT_IDX[index][IN_LSB_SHIFT]) & 0x03; show_in()
1511 if ((index >= 17) && show_in()
1512 !((data->has_gain >> (index - 17)) & 1)) show_in()
1516 val = in_from_reg(index, val); show_in()
1528 int index = sensor_attr->index; store_in() local
1537 val = in_to_reg(index, val); store_in()
1539 if ((index >= 17) && store_in()
1540 !((data->has_gain >> (index - 17)) & 1)) store_in()
1545 lsb_idx = IN_LSB_SHIFT_IDX[index][IN_LSB_IDX]; store_in()
1547 tmp &= ~(0x03 << IN_LSB_SHIFT_IDX[index][IN_LSB_SHIFT]); store_in()
1548 tmp |= (val & 0x03) << IN_LSB_SHIFT_IDX[index][IN_LSB_SHIFT]; store_in()
1553 w83795_write(client, W83795_REG_IN[index][nr], tmp); store_in()
1554 data->in[index][nr] = tmp; store_in()
1619 * Don't change the attribute order, _max, _min and _beep are accessed by index
1622 #define SENSOR_ATTR_IN(index) { \
1623 SENSOR_ATTR_2(in##index##_input, S_IRUGO, show_in, NULL, \
1624 IN_READ, index), \
1625 SENSOR_ATTR_2(in##index##_max, S_IRUGO | S_IWUSR, show_in, \
1626 store_in, IN_MAX, index), \
1627 SENSOR_ATTR_2(in##index##_min, S_IRUGO | S_IWUSR, show_in, \
1628 store_in, IN_LOW, index), \
1629 SENSOR_ATTR_2(in##index##_alarm, S_IRUGO, show_alarm_beep, \
1630 NULL, ALARM_STATUS, index + ((index > 14) ? 1 : 0)), \
1631 SENSOR_ATTR_2(in##index##_beep, S_IWUSR | S_IRUGO, \
1633 index + ((index > 14) ? 1 : 0)) }
1636 * Don't change the attribute order, _beep is accessed by index
1639 #define SENSOR_ATTR_FAN(index) { \
1640 SENSOR_ATTR_2(fan##index##_input, S_IRUGO, show_fan, \
1641 NULL, FAN_INPUT, index - 1), \
1642 SENSOR_ATTR_2(fan##index##_min, S_IWUSR | S_IRUGO, \
1643 show_fan, store_fan_min, FAN_MIN, index - 1), \
1644 SENSOR_ATTR_2(fan##index##_alarm, S_IRUGO, show_alarm_beep, \
1645 NULL, ALARM_STATUS, index + 31), \
1646 SENSOR_ATTR_2(fan##index##_beep, S_IWUSR | S_IRUGO, \
1647 show_alarm_beep, store_beep, BEEP_ENABLE, index + 31) }
1649 #define SENSOR_ATTR_PWM(index) { \
1650 SENSOR_ATTR_2(pwm##index, S_IWUSR | S_IRUGO, show_pwm, \
1651 store_pwm, PWM_OUTPUT, index - 1), \
1652 SENSOR_ATTR_2(pwm##index##_enable, S_IWUSR | S_IRUGO, \
1653 show_pwm_enable, store_pwm_enable, NOT_USED, index - 1), \
1654 SENSOR_ATTR_2(pwm##index##_mode, S_IRUGO, \
1655 show_pwm_mode, NULL, NOT_USED, index - 1), \
1656 SENSOR_ATTR_2(pwm##index##_freq, S_IWUSR | S_IRUGO, \
1657 show_pwm, store_pwm, PWM_FREQ, index - 1), \
1658 SENSOR_ATTR_2(pwm##index##_nonstop, S_IWUSR | S_IRUGO, \
1659 show_pwm, store_pwm, PWM_NONSTOP, index - 1), \
1660 SENSOR_ATTR_2(pwm##index##_start, S_IWUSR | S_IRUGO, \
1661 show_pwm, store_pwm, PWM_START, index - 1), \
1662 SENSOR_ATTR_2(pwm##index##_stop_time, S_IWUSR | S_IRUGO, \
1663 show_pwm, store_pwm, PWM_STOP_TIME, index - 1), \
1664 SENSOR_ATTR_2(fan##index##_target, S_IWUSR | S_IRUGO, \
1665 show_fanin, store_fanin, FANIN_TARGET, index - 1) }
1668 * Don't change the attribute order, _beep is accessed by index
1671 #define SENSOR_ATTR_DTS(index) { \
1672 SENSOR_ATTR_2(temp##index##_type, S_IRUGO , \
1673 show_dts_mode, NULL, NOT_USED, index - 7), \
1674 SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_dts, \
1675 NULL, NOT_USED, index - 7), \
1676 SENSOR_ATTR_2(temp##index##_crit, S_IRUGO | S_IWUSR, show_dts_ext, \
1678 SENSOR_ATTR_2(temp##index##_crit_hyst, S_IRUGO | S_IWUSR, \
1680 SENSOR_ATTR_2(temp##index##_max, S_IRUGO | S_IWUSR, show_dts_ext, \
1682 SENSOR_ATTR_2(temp##index##_max_hyst, S_IRUGO | S_IWUSR, \
1684 SENSOR_ATTR_2(temp##index##_alarm, S_IRUGO, \
1685 show_alarm_beep, NULL, ALARM_STATUS, index + 17), \
1686 SENSOR_ATTR_2(temp##index##_beep, S_IWUSR | S_IRUGO, \
1687 show_alarm_beep, store_beep, BEEP_ENABLE, index + 17) }
1690 * Don't change the attribute order, _beep is accessed by index
1693 #define SENSOR_ATTR_TEMP(index) { \
1694 SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
1695 show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
1696 SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
1697 NULL, TEMP_READ, index - 1), \
1698 SENSOR_ATTR_2(temp##index##_crit, S_IRUGO | S_IWUSR, show_temp, \
1699 store_temp, TEMP_CRIT, index - 1), \
1700 SENSOR_ATTR_2(temp##index##_crit_hyst, S_IRUGO | S_IWUSR, \
1701 show_temp, store_temp, TEMP_CRIT_HYST, index - 1), \
1702 SENSOR_ATTR_2(temp##index##_max, S_IRUGO | S_IWUSR, show_temp, \
1703 store_temp, TEMP_WARN, index - 1), \
1704 SENSOR_ATTR_2(temp##index##_max_hyst, S_IRUGO | S_IWUSR, \
1705 show_temp, store_temp, TEMP_WARN_HYST, index - 1), \
1706 SENSOR_ATTR_2(temp##index##_alarm, S_IRUGO, \
1708 index + (index > 4 ? 11 : 17)), \
1709 SENSOR_ATTR_2(temp##index##_beep, S_IWUSR | S_IRUGO, \
1711 index + (index > 4 ? 11 : 17)), \
1712 SENSOR_ATTR_2(temp##index##_pwm_enable, S_IWUSR | S_IRUGO, \
1714 TEMP_PWM_ENABLE, index - 1), \
1715 SENSOR_ATTR_2(temp##index##_auto_channels_pwm, S_IWUSR | S_IRUGO, \
1717 TEMP_PWM_FAN_MAP, index - 1), \
1718 SENSOR_ATTR_2(thermal_cruise##index, S_IWUSR | S_IRUGO, \
1719 show_temp_pwm, store_temp_pwm, TEMP_PWM_TTTI, index - 1), \
1720 SENSOR_ATTR_2(temp##index##_warn, S_IWUSR | S_IRUGO, \
1721 show_temp_pwm, store_temp_pwm, TEMP_PWM_CTFS, index - 1), \
1722 SENSOR_ATTR_2(temp##index##_warn_hyst, S_IWUSR | S_IRUGO, \
1723 show_temp_pwm, store_temp_pwm, TEMP_PWM_HCT, index - 1), \
1724 SENSOR_ATTR_2(temp##index##_operation_hyst, S_IWUSR | S_IRUGO, \
1725 show_temp_pwm, store_temp_pwm, TEMP_PWM_HOT, index - 1), \
1726 SENSOR_ATTR_2(temp##index##_auto_point1_pwm, S_IRUGO | S_IWUSR, \
1727 show_sf4_pwm, store_sf4_pwm, 0, index - 1), \
1728 SENSOR_ATTR_2(temp##index##_auto_point2_pwm, S_IRUGO | S_IWUSR, \
1729 show_sf4_pwm, store_sf4_pwm, 1, index - 1), \
1730 SENSOR_ATTR_2(temp##index##_auto_point3_pwm, S_IRUGO | S_IWUSR, \
1731 show_sf4_pwm, store_sf4_pwm, 2, index - 1), \
1732 SENSOR_ATTR_2(temp##index##_auto_point4_pwm, S_IRUGO | S_IWUSR, \
1733 show_sf4_pwm, store_sf4_pwm, 3, index - 1), \
1734 SENSOR_ATTR_2(temp##index##_auto_point5_pwm, S_IRUGO | S_IWUSR, \
1735 show_sf4_pwm, store_sf4_pwm, 4, index - 1), \
1736 SENSOR_ATTR_2(temp##index##_auto_point6_pwm, S_IRUGO | S_IWUSR, \
1737 show_sf4_pwm, store_sf4_pwm, 5, index - 1), \
1738 SENSOR_ATTR_2(temp##index##_auto_point7_pwm, S_IRUGO | S_IWUSR, \
1739 show_sf4_pwm, store_sf4_pwm, 6, index - 1), \
1740 SENSOR_ATTR_2(temp##index##_auto_point1_temp, S_IRUGO | S_IWUSR,\
1741 show_sf4_temp, store_sf4_temp, 0, index - 1), \
1742 SENSOR_ATTR_2(temp##index##_auto_point2_temp, S_IRUGO | S_IWUSR,\
1743 show_sf4_temp, store_sf4_temp, 1, index - 1), \
1744 SENSOR_ATTR_2(temp##index##_auto_point3_temp, S_IRUGO | S_IWUSR,\
1745 show_sf4_temp, store_sf4_temp, 2, index - 1), \
1746 SENSOR_ATTR_2(temp##index##_auto_point4_temp, S_IRUGO | S_IWUSR,\
1747 show_sf4_temp, store_sf4_temp, 3, index - 1), \
1748 SENSOR_ATTR_2(temp##index##_auto_point5_temp, S_IRUGO | S_IWUSR,\
1749 show_sf4_temp, store_sf4_temp, 4, index - 1), \
1750 SENSOR_ATTR_2(temp##index##_auto_point6_temp, S_IRUGO | S_IWUSR,\
1751 show_sf4_temp, store_sf4_temp, 5, index - 1), \
1752 SENSOR_ATTR_2(temp##index##_auto_point7_temp, S_IRUGO | S_IWUSR,\
1753 show_sf4_temp, store_sf4_temp, 6, index - 1) }
H A Dw83793.c129 #define W83793_REG_BEEP(index) (0x53 + (index))
130 #define W83793_REG_ALARM(index) (0x4b + (index))
159 #define W83793_REG_FAN(index) (0x23 + 2 * (index)) /* High byte */
160 #define W83793_REG_FAN_MIN(index) (0x90 + 2 * (index)) /* High byte */
172 #define W83793_REG_PWM(index, nr) (((nr) == 0 ? 0xb3 : \
173 (nr) == 1 ? 0x220 : 0x218) + (index))
176 #define W83793_REG_TEMP_FAN_MAP(index) (0x201 + (index))
177 #define W83793_REG_TEMP_TOL(index) (0x208 + (index))
178 #define W83793_REG_TEMP_CRUISE(index) (0x210 + (index))
179 #define W83793_REG_PWM_STOP_TIME(index) (0x228 + (index))
180 #define W83793_REG_SF2_TEMP(index, nr) (0x230 + ((index) << 4) + (nr))
181 #define W83793_REG_SF2_PWM(index, nr) (0x238 + ((index) << 4) + (nr))
339 int index = sensor_attr->index; show_vid() local
341 return sprintf(buf, "%d\n", vid_from_reg(data->vid[index], data->vrm)); show_vid()
372 int index = sensor_attr->index >> 3; show_alarm_beep() local
373 int bit = sensor_attr->index & 0x07; show_alarm_beep()
377 val = (data->alarms[index] >> (bit)) & 1; show_alarm_beep()
379 val = (data->beeps[index] >> (bit)) & 1; show_alarm_beep()
393 int index = sensor_attr->index >> 3; store_beep() local
394 int shift = sensor_attr->index & 0x07; store_beep()
407 data->beeps[index] = w83793_read_value(client, W83793_REG_BEEP(index)); store_beep()
408 data->beeps[index] &= ~beep_bit; store_beep()
409 data->beeps[index] |= val << shift; store_beep()
410 w83793_write_value(client, W83793_REG_BEEP(index), data->beeps[index]); store_beep()
483 int index = sensor_attr->index; show_fan() local
488 val = data->fan[index] & 0x0fff; show_fan()
490 val = data->fan_min[index] & 0x0fff; show_fan()
501 int index = sensor_attr->index; store_fan_min() local
513 data->fan_min[index] = val; store_fan_min()
514 w83793_write_value(client, W83793_REG_FAN_MIN(index), store_fan_min()
516 w83793_write_value(client, W83793_REG_FAN_MIN(index) + 1, val & 0xff); store_fan_min()
530 int index = sensor_attr->index; show_pwm() local
533 val = TIME_FROM_REG(data->pwm_stop_time[index]); show_pwm()
535 val = (data->pwm[index][nr] & 0x3f) << 2; show_pwm()
549 int index = sensor_attr->index; store_pwm() local
560 data->pwm_stop_time[index] = val; store_pwm()
561 w83793_write_value(client, W83793_REG_PWM_STOP_TIME(index), store_pwm()
565 data->pwm[index][nr] = store_pwm()
566 w83793_read_value(client, W83793_REG_PWM(index, nr)) & 0xc0; store_pwm()
567 data->pwm[index][nr] |= val; store_pwm()
568 w83793_write_value(client, W83793_REG_PWM(index, nr), store_pwm()
569 data->pwm[index][nr]); store_pwm()
582 int index = sensor_attr->index; show_temp() local
584 long temp = TEMP_FROM_REG(data->temp[index][nr]); show_temp()
586 if (nr == TEMP_READ && index < 4) { /* Only TD1-TD4 have low bits */ show_temp()
587 int low = ((data->temp_low_bits >> (index * 2)) & 0x03) * 250; show_temp()
600 int index = sensor_attr->index; store_temp() local
611 data->temp[index][nr] = TEMP_TO_REG(tmp, -128, 127); store_temp()
612 w83793_write_value(client, W83793_REG_TEMP[index][nr], store_temp()
613 data->temp[index][nr]); store_temp()
641 int index = sensor_attr->index; show_temp_mode() local
642 u8 mask = (index < 4) ? 0x03 : 0x01; show_temp_mode()
643 u8 shift = (index < 4) ? (2 * index) : (index - 4); show_temp_mode()
645 index = (index < 4) ? 0 : 1; show_temp_mode()
647 tmp = (data->temp_mode[index] >> shift) & mask; show_temp_mode()
651 tmp = index == 0 ? 3 : 4; show_temp_mode()
666 int index = sensor_attr->index; store_temp_mode() local
667 u8 mask = (index < 4) ? 0x03 : 0x01; store_temp_mode()
668 u8 shift = (index < 4) ? (2 * index) : (index - 4); store_temp_mode()
677 if ((val == 6) && (index < 4)) { store_temp_mode()
679 } else if ((val == 3 && index < 4) store_temp_mode()
680 || (val == 4 && index >= 4)) { store_temp_mode()
687 index = (index < 4) ? 0 : 1; store_temp_mode()
689 data->temp_mode[index] = store_temp_mode()
690 w83793_read_value(client, W83793_REG_TEMP_MODE[index]); store_temp_mode()
691 data->temp_mode[index] &= ~(mask << shift); store_temp_mode()
692 data->temp_mode[index] |= val << shift; store_temp_mode()
693 w83793_write_value(client, W83793_REG_TEMP_MODE[index], store_temp_mode()
694 data->temp_mode[index]); store_temp_mode()
807 int index = sensor_attr->index; show_sf_ctrl() local
812 val = data->temp_fan_map[index]; show_sf_ctrl()
815 val = ((data->pwm_enable >> index) & 0x01) + 2; show_sf_ctrl()
817 val = TEMP_FROM_REG(data->temp_cruise[index] & 0x7f); show_sf_ctrl()
819 val = data->tolerance[index >> 1] >> ((index & 0x01) ? 4 : 0); show_sf_ctrl()
832 int index = sensor_attr->index; store_sf_ctrl() local
845 w83793_write_value(client, W83793_REG_TEMP_FAN_MAP(index), val); store_sf_ctrl()
846 data->temp_fan_map[index] = val; store_sf_ctrl()
852 data->pwm_enable |= 1 << index; store_sf_ctrl()
854 data->pwm_enable &= ~(1 << index); store_sf_ctrl()
862 data->temp_cruise[index] = store_sf_ctrl()
863 w83793_read_value(client, W83793_REG_TEMP_CRUISE(index)); store_sf_ctrl()
864 data->temp_cruise[index] &= 0x80; store_sf_ctrl()
865 data->temp_cruise[index] |= TEMP_TO_REG(val, 0, 0x7f); store_sf_ctrl()
867 w83793_write_value(client, W83793_REG_TEMP_CRUISE(index), store_sf_ctrl()
868 data->temp_cruise[index]); store_sf_ctrl()
870 int i = index >> 1; store_sf_ctrl()
871 u8 shift = (index & 0x01) ? 4 : 0; store_sf_ctrl()
891 int index = sensor_attr->index; show_sf2_pwm() local
894 return sprintf(buf, "%d\n", (data->sf2_pwm[index][nr] & 0x3f) << 2); show_sf2_pwm()
906 int index = sensor_attr->index; store_sf2_pwm() local
916 data->sf2_pwm[index][nr] = store_sf2_pwm()
917 w83793_read_value(client, W83793_REG_SF2_PWM(index, nr)) & 0xc0; store_sf2_pwm()
918 data->sf2_pwm[index][nr] |= val; store_sf2_pwm()
919 w83793_write_value(client, W83793_REG_SF2_PWM(index, nr), store_sf2_pwm()
920 data->sf2_pwm[index][nr]); store_sf2_pwm()
931 int index = sensor_attr->index; show_sf2_temp() local
935 TEMP_FROM_REG(data->sf2_temp[index][nr] & 0x7f)); show_sf2_temp()
947 int index = sensor_attr->index; store_sf2_temp() local
957 data->sf2_temp[index][nr] = store_sf2_temp()
958 w83793_read_value(client, W83793_REG_SF2_TEMP(index, nr)) & 0x80; store_sf2_temp()
959 data->sf2_temp[index][nr] |= val; store_sf2_temp()
960 w83793_write_value(client, W83793_REG_SF2_TEMP(index, nr), store_sf2_temp()
961 data->sf2_temp[index][nr]); store_sf2_temp()
973 int index = sensor_attr->index; show_in() local
975 u16 val = data->in[index][nr]; show_in()
977 if (index < 3) { show_in()
979 val += (data->in_low_bits[nr] >> (index * 2)) & 0x3; show_in()
982 val = val * scale_in[index] + scale_in_add[index]; show_in()
993 int index = sensor_attr->index; store_in() local
1002 val = (val + scale_in[index] / 2) / scale_in[index]; store_in()
1005 if (index > 2) { store_in()
1008 val -= scale_in_add[index] / scale_in[index]; store_in()
1014 data->in_low_bits[nr] &= ~(0x03 << (2 * index)); store_in()
1015 data->in_low_bits[nr] |= (val & 0x03) << (2 * index); store_in()
1020 data->in[index][nr] = val; store_in()
1021 w83793_write_value(client, W83793_REG_IN[index][nr], store_in()
1022 data->in[index][nr]); store_in()
1029 #define SENSOR_ATTR_IN(index) \
1030 SENSOR_ATTR_2(in##index##_input, S_IRUGO, show_in, NULL, \
1031 IN_READ, index), \
1032 SENSOR_ATTR_2(in##index##_max, S_IRUGO | S_IWUSR, show_in, \
1033 store_in, IN_MAX, index), \
1034 SENSOR_ATTR_2(in##index##_min, S_IRUGO | S_IWUSR, show_in, \
1035 store_in, IN_LOW, index), \
1036 SENSOR_ATTR_2(in##index##_alarm, S_IRUGO, show_alarm_beep, \
1037 NULL, ALARM_STATUS, index + ((index > 2) ? 1 : 0)), \
1038 SENSOR_ATTR_2(in##index##_beep, S_IWUSR | S_IRUGO, \
1040 index + ((index > 2) ? 1 : 0))
1042 #define SENSOR_ATTR_FAN(index) \
1043 SENSOR_ATTR_2(fan##index##_alarm, S_IRUGO, show_alarm_beep, \
1044 NULL, ALARM_STATUS, index + 17), \
1045 SENSOR_ATTR_2(fan##index##_beep, S_IWUSR | S_IRUGO, \
1046 show_alarm_beep, store_beep, BEEP_ENABLE, index + 17), \
1047 SENSOR_ATTR_2(fan##index##_input, S_IRUGO, show_fan, \
1048 NULL, FAN_INPUT, index - 1), \
1049 SENSOR_ATTR_2(fan##index##_min, S_IWUSR | S_IRUGO, \
1050 show_fan, store_fan_min, FAN_MIN, index - 1)
1052 #define SENSOR_ATTR_PWM(index) \
1053 SENSOR_ATTR_2(pwm##index, S_IWUSR | S_IRUGO, show_pwm, \
1054 store_pwm, PWM_DUTY, index - 1), \
1055 SENSOR_ATTR_2(pwm##index##_nonstop, S_IWUSR | S_IRUGO, \
1056 show_pwm, store_pwm, PWM_NONSTOP, index - 1), \
1057 SENSOR_ATTR_2(pwm##index##_start, S_IWUSR | S_IRUGO, \
1058 show_pwm, store_pwm, PWM_START, index - 1), \
1059 SENSOR_ATTR_2(pwm##index##_stop_time, S_IWUSR | S_IRUGO, \
1060 show_pwm, store_pwm, PWM_STOP_TIME, index - 1)
1062 #define SENSOR_ATTR_TEMP(index) \
1063 SENSOR_ATTR_2(temp##index##_type, S_IRUGO | S_IWUSR, \
1064 show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
1065 SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
1066 NULL, TEMP_READ, index - 1), \
1067 SENSOR_ATTR_2(temp##index##_max, S_IRUGO | S_IWUSR, show_temp, \
1068 store_temp, TEMP_CRIT, index - 1), \
1069 SENSOR_ATTR_2(temp##index##_max_hyst, S_IRUGO | S_IWUSR, \
1070 show_temp, store_temp, TEMP_CRIT_HYST, index - 1), \
1071 SENSOR_ATTR_2(temp##index##_warn, S_IRUGO | S_IWUSR, show_temp, \
1072 store_temp, TEMP_WARN, index - 1), \
1073 SENSOR_ATTR_2(temp##index##_warn_hyst, S_IRUGO | S_IWUSR, \
1074 show_temp, store_temp, TEMP_WARN_HYST, index - 1), \
1075 SENSOR_ATTR_2(temp##index##_alarm, S_IRUGO, \
1076 show_alarm_beep, NULL, ALARM_STATUS, index + 11), \
1077 SENSOR_ATTR_2(temp##index##_beep, S_IWUSR | S_IRUGO, \
1078 show_alarm_beep, store_beep, BEEP_ENABLE, index + 11), \
1079 SENSOR_ATTR_2(temp##index##_auto_channels_pwm, \
1081 TEMP_FAN_MAP, index - 1), \
1082 SENSOR_ATTR_2(temp##index##_pwm_enable, S_IWUSR | S_IRUGO, \
1084 index - 1), \
1085 SENSOR_ATTR_2(thermal_cruise##index, S_IRUGO | S_IWUSR, \
1086 show_sf_ctrl, store_sf_ctrl, TEMP_CRUISE, index - 1), \
1087 SENSOR_ATTR_2(tolerance##index, S_IRUGO | S_IWUSR, show_sf_ctrl,\
1088 store_sf_ctrl, TEMP_TOLERANCE, index - 1), \
1089 SENSOR_ATTR_2(temp##index##_auto_point1_pwm, S_IRUGO | S_IWUSR, \
1090 show_sf2_pwm, store_sf2_pwm, 0, index - 1), \
1091 SENSOR_ATTR_2(temp##index##_auto_point2_pwm, S_IRUGO | S_IWUSR, \
1092 show_sf2_pwm, store_sf2_pwm, 1, index - 1), \
1093 SENSOR_ATTR_2(temp##index##_auto_point3_pwm, S_IRUGO | S_IWUSR, \
1094 show_sf2_pwm, store_sf2_pwm, 2, index - 1), \
1095 SENSOR_ATTR_2(temp##index##_auto_point4_pwm, S_IRUGO | S_IWUSR, \
1096 show_sf2_pwm, store_sf2_pwm, 3, index - 1), \
1097 SENSOR_ATTR_2(temp##index##_auto_point5_pwm, S_IRUGO | S_IWUSR, \
1098 show_sf2_pwm, store_sf2_pwm, 4, index - 1), \
1099 SENSOR_ATTR_2(temp##index##_auto_point6_pwm, S_IRUGO | S_IWUSR, \
1100 show_sf2_pwm, store_sf2_pwm, 5, index - 1), \
1101 SENSOR_ATTR_2(temp##index##_auto_point7_pwm, S_IRUGO | S_IWUSR, \
1102 show_sf2_pwm, store_sf2_pwm, 6, index - 1), \
1103 SENSOR_ATTR_2(temp##index##_auto_point1_temp, S_IRUGO | S_IWUSR,\
1104 show_sf2_temp, store_sf2_temp, 0, index - 1), \
1105 SENSOR_ATTR_2(temp##index##_auto_point2_temp, S_IRUGO | S_IWUSR,\
1106 show_sf2_temp, store_sf2_temp, 1, index - 1), \
1107 SENSOR_ATTR_2(temp##index##_auto_point3_temp, S_IRUGO | S_IWUSR,\
1108 show_sf2_temp, store_sf2_temp, 2, index - 1), \
1109 SENSOR_ATTR_2(temp##index##_auto_point4_temp, S_IRUGO | S_IWUSR,\
1110 show_sf2_temp, store_sf2_temp, 3, index - 1), \
1111 SENSOR_ATTR_2(temp##index##_auto_point5_temp, S_IRUGO | S_IWUSR,\
1112 show_sf2_temp, store_sf2_temp, 4, index - 1), \
1113 SENSOR_ATTR_2(temp##index##_auto_point6_temp, S_IRUGO | S_IWUSR,\
1114 show_sf2_temp, store_sf2_temp, 5, index - 1), \
1115 SENSOR_ATTR_2(temp##index##_auto_point7_temp, S_IRUGO | S_IWUSR,\
1116 show_sf2_temp, store_sf2_temp, 6, index - 1)
H A Dadt7475.c129 /* Macros to easily index the registers */
195 static void adt7475_read_pwm(struct i2c_client *client, int index);
332 (data->alarms >> sattr->index) & 1); show_voltage()
334 val = data->voltage[sattr->nr][sattr->index]; show_voltage()
336 reg2volt(sattr->index, val, data->bypass_attn)); show_voltage()
355 data->voltage[sattr->nr][sattr->index] = set_voltage()
356 volt2reg(sattr->index, val, data->bypass_attn); set_voltage()
358 if (sattr->index < ADT7475_VOLTAGE_COUNT) { set_voltage()
360 reg = VOLTAGE_MIN_REG(sattr->index); set_voltage()
362 reg = VOLTAGE_MAX_REG(sattr->index); set_voltage()
371 data->voltage[sattr->nr][sattr->index] >> 2); set_voltage()
387 out = data->temp[sattr->nr][sattr->index]; show_temp()
388 if (sattr->index != 1) show_temp()
396 out = reg2temp(data, data->temp[THERM][sattr->index]) - show_temp()
407 out = (s8)data->temp[sattr->nr][sattr->index]; show_temp()
416 out = (data->alarms >> (sattr->index + 4)) & 1; show_temp()
421 out = !!(data->alarms & (sattr->index ? 0x8000 : 0x4000)); show_temp()
426 out = reg2temp(data, data->temp[sattr->nr][sattr->index]); show_temp()
455 out = data->temp[OFFSET][sattr->index] = val / 1000; set_temp()
458 out = data->temp[OFFSET][sattr->index] = val / 500; set_temp()
469 data->temp[THERM][sattr->index] = set_temp()
470 adt7475_read(TEMP_THERM_REG(sattr->index)) << 2; set_temp()
473 temp = reg2temp(data, data->temp[THERM][sattr->index]); set_temp()
477 if (sattr->index != 1) { set_temp()
478 data->temp[HYSTERSIS][sattr->index] &= 0xF0; set_temp()
479 data->temp[HYSTERSIS][sattr->index] |= (val & 0xF) << 4; set_temp()
481 data->temp[HYSTERSIS][sattr->index] &= 0x0F; set_temp()
482 data->temp[HYSTERSIS][sattr->index] |= (val & 0xF); set_temp()
485 out = data->temp[HYSTERSIS][sattr->index]; set_temp()
489 data->temp[sattr->nr][sattr->index] = temp2reg(data, val); set_temp()
495 out = (u8) (data->temp[sattr->nr][sattr->index] >> 2); set_temp()
500 reg = TEMP_MIN_REG(sattr->index); set_temp()
503 reg = TEMP_MAX_REG(sattr->index); set_temp()
506 reg = TEMP_OFFSET_REG(sattr->index); set_temp()
509 reg = TEMP_TMIN_REG(sattr->index); set_temp()
512 reg = TEMP_THERM_REG(sattr->index); set_temp()
515 if (sattr->index != 2) set_temp()
547 out = (data->range[sattr->index] >> 4) & 0x0F; show_point2()
548 val = reg2temp(data, data->temp[AUTOMIN][sattr->index]); show_point2()
570 data->temp[AUTOMIN][sattr->index] = set_point2()
571 adt7475_read(TEMP_TMIN_REG(sattr->index)) << 2; set_point2()
572 data->range[sattr->index] = set_point2()
573 adt7475_read(TEMP_TRANGE_REG(sattr->index)); set_point2()
579 temp = reg2temp(data, data->temp[AUTOMIN][sattr->index]); set_point2()
587 data->range[sattr->index] &= ~0xF0; set_point2()
588 data->range[sattr->index] |= val << 4; set_point2()
590 i2c_smbus_write_byte_data(client, TEMP_TRANGE_REG(sattr->index), set_point2()
591 data->range[sattr->index]); set_point2()
605 out = (data->alarms >> (sattr->index + 10)) & 1; show_tach()
607 out = tach2rpm(data->tach[sattr->nr][sattr->index]); show_tach()
626 data->tach[MIN][sattr->index] = rpm2tach(val); set_tach()
628 adt7475_write_word(client, TACH_MIN_REG(sattr->index), set_tach()
629 data->tach[MIN][sattr->index]); set_tach()
641 return sprintf(buf, "%d\n", data->pwm[sattr->nr][sattr->index]); show_pwm()
650 return sprintf(buf, "%d\n", data->pwmchan[sattr->index]); show_pwmchan()
659 return sprintf(buf, "%d\n", data->pwmctl[sattr->index]); show_pwmctrl()
680 data->pwm[CONTROL][sattr->index] = set_pwm()
681 adt7475_read(PWM_CONFIG_REG(sattr->index)); set_pwm()
687 if (((data->pwm[CONTROL][sattr->index] >> 5) & 7) != 7) { set_pwm()
692 reg = PWM_REG(sattr->index); set_pwm()
696 reg = PWM_MIN_REG(sattr->index); set_pwm()
700 reg = PWM_MAX_REG(sattr->index); set_pwm()
704 data->pwm[sattr->nr][sattr->index] = clamp_val(val, 0, 0xFF); set_pwm()
706 data->pwm[sattr->nr][sattr->index]); set_pwm()
715 static int hw_set_pwm(struct i2c_client *client, int index, hw_set_pwm() argument
758 data->pwmctl[index] = pwmctl; hw_set_pwm()
759 data->pwmchan[index] = pwmchan; hw_set_pwm()
761 data->pwm[CONTROL][index] &= ~0xE0; hw_set_pwm()
762 data->pwm[CONTROL][index] |= (val & 7) << 5; hw_set_pwm()
764 i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index), hw_set_pwm()
765 data->pwm[CONTROL][index]); hw_set_pwm()
784 adt7475_read_pwm(client, sattr->index); set_pwmchan()
785 r = hw_set_pwm(client, sattr->index, data->pwmctl[sattr->index], val); set_pwmchan()
807 adt7475_read_pwm(client, sattr->index); set_pwmctrl()
808 r = hw_set_pwm(client, sattr->index, val, data->pwmchan[sattr->index]); set_pwmctrl()
828 pwmfreq_table[data->range[sattr->index] & 7]); show_pwmfreq()
847 data->range[sattr->index] = set_pwmfreq()
848 adt7475_read(TEMP_TRANGE_REG(sattr->index)); set_pwmfreq()
849 data->range[sattr->index] &= ~7; set_pwmfreq()
850 data->range[sattr->index] |= out; set_pwmfreq()
852 i2c_smbus_write_byte_data(client, TEMP_TRANGE_REG(sattr->index), set_pwmfreq()
853 data->range[sattr->index]); set_pwmfreq()
1448 static void adt7475_read_pwm(struct i2c_client *client, int index) adt7475_read_pwm() argument
1453 data->pwm[CONTROL][index] = adt7475_read(PWM_CONFIG_REG(index)); adt7475_read_pwm()
1459 v = (data->pwm[CONTROL][index] >> 5) & 7; adt7475_read_pwm()
1462 data->pwmctl[index] = 0; adt7475_read_pwm()
1464 data->pwmctl[index] = 1; adt7475_read_pwm()
1471 data->pwm[INPUT][index] = 0; adt7475_read_pwm()
1472 data->pwm[CONTROL][index] &= ~0xE0; adt7475_read_pwm()
1473 data->pwm[CONTROL][index] |= (7 << 5); adt7475_read_pwm()
1475 i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index), adt7475_read_pwm()
1476 data->pwm[INPUT][index]); adt7475_read_pwm()
1478 i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index), adt7475_read_pwm()
1479 data->pwm[CONTROL][index]); adt7475_read_pwm()
1481 data->pwmctl[index] = 1; adt7475_read_pwm()
1483 data->pwmctl[index] = 2; adt7475_read_pwm()
1487 data->pwmchan[index] = 1; adt7475_read_pwm()
1490 data->pwmchan[index] = 2; adt7475_read_pwm()
1493 data->pwmchan[index] = 4; adt7475_read_pwm()
1496 data->pwmchan[index] = 6; adt7475_read_pwm()
1499 data->pwmchan[index] = 7; adt7475_read_pwm()
H A Dmax1668.c146 int index = to_sensor_dev_attr(devattr)->index; show_temp() local
152 return sprintf(buf, "%d\n", data->temp[index] * 1000); show_temp()
158 int index = to_sensor_dev_attr(devattr)->index; show_temp_max() local
164 return sprintf(buf, "%d\n", data->temp_max[index] * 1000); show_temp_max()
170 int index = to_sensor_dev_attr(devattr)->index; show_temp_min() local
176 return sprintf(buf, "%d\n", data->temp_min[index] * 1000); show_temp_min()
182 int index = to_sensor_dev_attr(attr)->index; show_alarm() local
188 return sprintf(buf, "%u\n", (data->alarms >> index) & 0x1); show_alarm()
194 int index = to_sensor_dev_attr(devattr)->index; show_fault() local
201 (data->alarms & (1 << 12)) && data->temp[index] == 127); show_fault()
208 int index = to_sensor_dev_attr(devattr)->index; set_temp_max() local
219 data->temp_max[index] = clamp_val(temp/1000, -128, 127); set_temp_max()
221 MAX1668_REG_LIMH_WR(index), set_temp_max()
222 data->temp_max[index]); set_temp_max()
234 int index = to_sensor_dev_attr(devattr)->index; set_temp_min() local
245 data->temp_min[index] = clamp_val(temp/1000, -128, 127); set_temp_min()
247 MAX1668_REG_LIML_WR(index), set_temp_min()
248 data->temp_min[index]); set_temp_min()
342 struct attribute *attr, int index) max1668_attribute_mode()
341 max1668_attribute_mode(struct kobject *kobj, struct attribute *attr, int index) max1668_attribute_mode() argument
H A Dlm95245.c218 int index = to_sensor_dev_attr(attr)->index; show_input() local
225 if (index == 0 || data->regs[index] & 0x80) show_input()
226 temp = temp_from_reg_signed(data->regs[index], show_input()
227 data->regs[index + 1]); show_input()
229 temp = temp_from_reg_unsigned(data->regs[index + 2], show_input()
230 data->regs[index + 3]); show_input()
239 int index = to_sensor_dev_attr(attr)->index; show_limit() local
242 data->regs[index] * 1000); show_limit()
249 int index = to_sensor_dev_attr(attr)->index; set_limit() local
258 val = clamp_val(val, 0, (index == 6 ? 127 : 255)); set_limit()
264 i2c_smbus_write_byte_data(client, lm95245_reg_address[index], val); set_limit()
275 int index = to_sensor_dev_attr(attr)->index; show_crit_hyst() local
276 int hyst = data->regs[index] - data->regs[8]; show_crit_hyst()
285 int index = to_sensor_dev_attr(attr)->index; set_crit_hyst() local
295 limit = i2c_smbus_read_byte_data(client, lm95245_reg_address[index]); set_crit_hyst()
351 int index = to_sensor_dev_attr(attr)->index; show_alarm() local
354 !!(data->regs[9] & index)); show_alarm()
/linux-4.4.14/arch/powerpc/xmon/
H A Dspu-dis.c57 const struct spu_opcode *index; get_index_for_opcode() local
65 if ((index = spu_disassemble_table[opcode & 0x780]) != 0 get_index_for_opcode()
66 && index->insn_type == RRR) get_index_for_opcode()
67 return index; get_index_for_opcode()
69 if ((index = spu_disassemble_table[opcode & 0x7f0]) != 0 get_index_for_opcode()
70 && (index->insn_type == RI18 || index->insn_type == LBT)) get_index_for_opcode()
71 return index; get_index_for_opcode()
73 if ((index = spu_disassemble_table[opcode & 0x7f8]) != 0 get_index_for_opcode()
74 && index->insn_type == RI10) get_index_for_opcode()
75 return index; get_index_for_opcode()
77 if ((index = spu_disassemble_table[opcode & 0x7fc]) != 0 get_index_for_opcode()
78 && (index->insn_type == RI16)) get_index_for_opcode()
79 return index; get_index_for_opcode()
81 if ((index = spu_disassemble_table[opcode & 0x7fe]) != 0 get_index_for_opcode()
82 && (index->insn_type == RI8)) get_index_for_opcode()
83 return index; get_index_for_opcode()
85 if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0) get_index_for_opcode()
86 return index; get_index_for_opcode()
98 const struct spu_opcode *index; print_insn_spu() local
101 index = get_index_for_opcode (insn); print_insn_spu()
103 if (index == 0) print_insn_spu()
111 tag = (enum spu_insns)(index - spu_opcodes); print_insn_spu()
112 printf("%s", index->mnemonic); print_insn_spu()
125 if (index->arg[0] != 0) print_insn_spu()
128 for (i = 1; i <= index->arg[0]; i++) print_insn_spu()
130 int arg = index->arg[i]; print_insn_spu()
/linux-4.4.14/samples/bpf/
H A Dtracex3_kern.c56 u32 index; bpf_prog2() local
67 /* the lines below are computing index = log10(delta)*10 bpf_prog2()
69 * index = 29 ~ 1 usec bpf_prog2()
70 * index = 59 ~ 1 msec bpf_prog2()
71 * index = 89 ~ 1 sec bpf_prog2()
72 * index = 99 ~ 10sec or more bpf_prog2()
77 index = (l * 64 + (delta - base) * 64 / base) * 3 / 64; bpf_prog2()
79 if (index >= SLOTS) bpf_prog2()
80 index = SLOTS - 1; bpf_prog2()
82 value = bpf_map_lookup_elem(&lat_map, &index); bpf_prog2()
H A Dsockex1_kern.c17 int index = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); bpf_prog1() local
23 value = bpf_map_lookup_elem(&my_map, &index); bpf_prog1()
/linux-4.4.14/arch/mips/fw/lib/
H A Dcmdline.c60 int i, yamon, index = 0; fw_getenv() local
62 yamon = (strchr(fw_envp(index), '=') == NULL); fw_getenv()
65 while (fw_envp(index)) { fw_getenv()
66 if (strncmp(envname, fw_envp(index), i) == 0) { fw_getenv()
68 result = fw_envp(index + 1); fw_getenv()
70 } else if (fw_envp(index)[i] == '=') { fw_getenv()
71 result = fw_envp(index) + i + 1; fw_getenv()
76 /* Increment array index. */ fw_getenv()
78 index += 2; fw_getenv()
80 index += 1; fw_getenv()
/linux-4.4.14/arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/
H A Diop_version_defs.h27 #define REG_RD_VECT( scope, inst, reg, index ) \
30 (index) * STRIDE_##scope##_##reg )
34 #define REG_WR_VECT( scope, inst, reg, index, val ) \
37 (index) * STRIDE_##scope##_##reg, (val) )
51 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
53 (index) * STRIDE_##scope##_##reg )
57 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
59 (index) * STRIDE_##scope##_##reg, (val) )
77 #define REG_ADDR_VECT( scope, inst, reg, index ) \
79 (index) * STRIDE_##scope##_##reg )
H A Diop_sap_in_defs.h27 #define REG_RD_VECT( scope, inst, reg, index ) \
30 (index) * STRIDE_##scope##_##reg )
34 #define REG_WR_VECT( scope, inst, reg, index, val ) \
37 (index) * STRIDE_##scope##_##reg, (val) )
51 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
53 (index) * STRIDE_##scope##_##reg )
57 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
59 (index) * STRIDE_##scope##_##reg, (val) )
77 #define REG_ADDR_VECT( scope, inst, reg, index ) \
79 (index) * STRIDE_##scope##_##reg )
/linux-4.4.14/arch/mips/cavium-octeon/executive/
H A Dcvmx-helper-sgmii.c45 void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block);
46 void __cvmx_interrupt_pcsxx_int_en_reg_enable(int index);
52 * @index: Index of prot on the interface
56 static int __cvmx_helper_sgmii_hardware_init_one_time(int interface, int index) __cvmx_helper_sgmii_hardware_init_one_time() argument
64 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_sgmii_hardware_init_one_time()
66 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64); __cvmx_helper_sgmii_hardware_init_one_time()
74 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface)); __cvmx_helper_sgmii_hardware_init_one_time()
76 cvmx_read_csr(CVMX_PCSX_LINKX_TIMER_COUNT_REG(index, interface)); __cvmx_helper_sgmii_hardware_init_one_time()
86 cvmx_write_csr(CVMX_PCSX_LINKX_TIMER_COUNT_REG(index, interface), __cvmx_helper_sgmii_hardware_init_one_time()
102 cvmx_read_csr(CVMX_PCSX_ANX_ADV_REG(index, interface)); __cvmx_helper_sgmii_hardware_init_one_time()
107 cvmx_write_csr(CVMX_PCSX_ANX_ADV_REG(index, interface), __cvmx_helper_sgmii_hardware_init_one_time()
112 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface)); __cvmx_helper_sgmii_hardware_init_one_time()
118 (index, interface)); __cvmx_helper_sgmii_hardware_init_one_time()
123 (index, interface), __cvmx_helper_sgmii_hardware_init_one_time()
137 * @index: Index of prot on the interface
141 static int __cvmx_helper_sgmii_hardware_init_link(int interface, int index) __cvmx_helper_sgmii_hardware_init_link() argument
154 cvmx_read_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface)); __cvmx_helper_sgmii_hardware_init_link()
157 cvmx_write_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface), __cvmx_helper_sgmii_hardware_init_link()
160 (CVMX_PCSX_MRX_CONTROL_REG(index, interface), __cvmx_helper_sgmii_hardware_init_link()
164 interface, index); __cvmx_helper_sgmii_hardware_init_link()
176 cvmx_write_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface), __cvmx_helper_sgmii_hardware_init_link()
186 CVMX_WAIT_FOR_FIELD64(CVMX_PCSX_MRX_STATUS_REG(index, interface), __cvmx_helper_sgmii_hardware_init_link()
189 /* cvmx_dprintf("SGMII%d: Port %d link timeout\n", interface, index); */ __cvmx_helper_sgmii_hardware_init_link()
200 * @index: Index of prot on the interface
206 int index, __cvmx_helper_sgmii_hardware_init_link_speed()
215 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_sgmii_hardware_init_link_speed()
218 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64); __cvmx_helper_sgmii_hardware_init_link_speed()
222 (CVMX_GMXX_PRTX_CFG(index, interface), union cvmx_gmxx_prtx_cfg, __cvmx_helper_sgmii_hardware_init_link_speed()
224 || CVMX_WAIT_FOR_FIELD64(CVMX_GMXX_PRTX_CFG(index, interface), __cvmx_helper_sgmii_hardware_init_link_speed()
229 interface, index); __cvmx_helper_sgmii_hardware_init_link_speed()
234 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_sgmii_hardware_init_link_speed()
241 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface)); __cvmx_helper_sgmii_hardware_init_link_speed()
261 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 64); __cvmx_helper_sgmii_hardware_init_link_speed()
262 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0); __cvmx_helper_sgmii_hardware_init_link_speed()
269 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 64); __cvmx_helper_sgmii_hardware_init_link_speed()
270 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0); __cvmx_helper_sgmii_hardware_init_link_speed()
277 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 512); __cvmx_helper_sgmii_hardware_init_link_speed()
278 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 8192); __cvmx_helper_sgmii_hardware_init_link_speed()
285 cvmx_write_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface), __cvmx_helper_sgmii_hardware_init_link_speed()
289 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64); __cvmx_helper_sgmii_hardware_init_link_speed()
292 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_sgmii_hardware_init_link_speed()
296 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64); __cvmx_helper_sgmii_hardware_init_link_speed()
313 int index; __cvmx_helper_sgmii_hardware_init() local
317 for (index = 0; index < num_ports; index++) { __cvmx_helper_sgmii_hardware_init()
318 int ipd_port = cvmx_helper_get_ipd_port(interface, index); __cvmx_helper_sgmii_hardware_init()
319 __cvmx_helper_sgmii_hardware_init_one_time(interface, index); __cvmx_helper_sgmii_hardware_init()
373 int index; __cvmx_helper_sgmii_enable() local
377 for (index = 0; index < num_ports; index++) { __cvmx_helper_sgmii_enable()
380 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_sgmii_enable()
382 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), __cvmx_helper_sgmii_enable()
384 __cvmx_interrupt_pcsx_intx_en_reg_enable(index, interface); __cvmx_helper_sgmii_enable()
406 int index = cvmx_helper_get_interface_index_num(ipd_port); __cvmx_helper_sgmii_link_get() local
420 cvmx_read_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface)); __cvmx_helper_sgmii_link_get()
430 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface)); __cvmx_helper_sgmii_link_get()
437 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface)); __cvmx_helper_sgmii_link_get()
449 (index, interface)); __cvmx_helper_sgmii_link_get()
452 (interface, index) != 0) __cvmx_helper_sgmii_link_get()
459 (index, interface)); __cvmx_helper_sgmii_link_get()
516 int index = cvmx_helper_get_interface_index_num(ipd_port); __cvmx_helper_sgmii_link_set() local
517 __cvmx_helper_sgmii_hardware_init_link(interface, index); __cvmx_helper_sgmii_link_set()
518 return __cvmx_helper_sgmii_hardware_init_link_speed(interface, index, __cvmx_helper_sgmii_link_set()
540 int index = cvmx_helper_get_interface_index_num(ipd_port); __cvmx_helper_sgmii_configure_loopback() local
545 cvmx_read_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface)); __cvmx_helper_sgmii_configure_loopback()
547 cvmx_write_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface), __cvmx_helper_sgmii_configure_loopback()
551 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface)); __cvmx_helper_sgmii_configure_loopback()
553 cvmx_write_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface), __cvmx_helper_sgmii_configure_loopback()
556 __cvmx_helper_sgmii_hardware_init_link(interface, index); __cvmx_helper_sgmii_configure_loopback()
205 __cvmx_helper_sgmii_hardware_init_link_speed(int interface, int index, cvmx_helper_link_info_t link_info) __cvmx_helper_sgmii_hardware_init_link_speed() argument
H A Dcvmx-helper-rgmii.c106 int index = port & 0xf; cvmx_helper_rgmii_internal_loopback() local
114 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 1); cvmx_helper_rgmii_internal_loopback()
115 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x200); cvmx_helper_rgmii_internal_loopback()
116 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0x2000); cvmx_helper_rgmii_internal_loopback()
117 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64); cvmx_helper_rgmii_internal_loopback()
119 cvmx_write_csr(CVMX_ASXX_PRT_LOOP(interface), (1 << index) | tmp); cvmx_helper_rgmii_internal_loopback()
121 cvmx_write_csr(CVMX_ASXX_TX_PRT_EN(interface), (1 << index) | tmp); cvmx_helper_rgmii_internal_loopback()
123 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(interface), (1 << index) | tmp); cvmx_helper_rgmii_internal_loopback()
125 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64); cvmx_helper_rgmii_internal_loopback()
273 int index = cvmx_helper_get_interface_index_num(ipd_port); __cvmx_helper_rgmii_link_get() local
277 if (asxx_prt_loop.s.int_loop & (1 << index)) { __cvmx_helper_rgmii_link_get()
306 int index = cvmx_helper_get_interface_index_num(ipd_port); __cvmx_helper_rgmii_link_set() local
321 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_rgmii_link_set()
327 ~(1 << index)); __cvmx_helper_rgmii_link_set()
345 gmx_tx_ovr_bp.s.bp &= ~(1 << index); __cvmx_helper_rgmii_link_set()
346 gmx_tx_ovr_bp.s.en |= 1 << index; __cvmx_helper_rgmii_link_set()
358 interface * 0x800 + index * 0x100 + 0x880); __cvmx_helper_rgmii_link_set()
366 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), new_gmx_cfg.u64); __cvmx_helper_rgmii_link_set()
367 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_rgmii_link_set()
393 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 50); __cvmx_helper_rgmii_link_set()
394 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x40); __cvmx_helper_rgmii_link_set()
395 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0); __cvmx_helper_rgmii_link_set()
397 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 5); __cvmx_helper_rgmii_link_set()
398 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x40); __cvmx_helper_rgmii_link_set()
399 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0); __cvmx_helper_rgmii_link_set()
401 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 1); __cvmx_helper_rgmii_link_set()
402 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x200); __cvmx_helper_rgmii_link_set()
403 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0x2000); __cvmx_helper_rgmii_link_set()
423 if (((index == 0) && (mode.s.p0mii == 1)) __cvmx_helper_rgmii_link_set()
424 || ((index != 0) && (mode.s.type == 1))) { __cvmx_helper_rgmii_link_set()
426 (index, interface), 1); __cvmx_helper_rgmii_link_set()
432 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_rgmii_link_set()
435 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), new_gmx_cfg.u64); __cvmx_helper_rgmii_link_set()
440 index)); __cvmx_helper_rgmii_link_set()
455 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), new_gmx_cfg.u64); __cvmx_helper_rgmii_link_set()
477 int index = cvmx_helper_get_interface_index_num(ipd_port); __cvmx_helper_rgmii_configure_loopback() local
483 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); __cvmx_helper_rgmii_configure_loopback()
492 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 1); __cvmx_helper_rgmii_configure_loopback()
493 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x200); __cvmx_helper_rgmii_configure_loopback()
494 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0x2000); __cvmx_helper_rgmii_configure_loopback()
496 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64); __cvmx_helper_rgmii_configure_loopback()
501 asxx_prt_loop.s.int_loop |= 1 << index; __cvmx_helper_rgmii_configure_loopback()
503 asxx_prt_loop.s.int_loop &= ~(1 << index); __cvmx_helper_rgmii_configure_loopback()
505 asxx_prt_loop.s.ext_loop |= 1 << index; __cvmx_helper_rgmii_configure_loopback()
507 asxx_prt_loop.s.ext_loop &= ~(1 << index); __cvmx_helper_rgmii_configure_loopback()
515 (1 << index) | tmp); __cvmx_helper_rgmii_configure_loopback()
518 (1 << index) | tmp); __cvmx_helper_rgmii_configure_loopback()
524 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64); __cvmx_helper_rgmii_configure_loopback()
/linux-4.4.14/drivers/staging/gdm72xx/
H A Dgdm_qos.c254 int index; gdm_qos_send_hci_pkt() local
277 index = get_qos_index(nic, (u8 *)iph, (u8 *)tcph); gdm_qos_send_hci_pkt()
278 if (index == -1) gdm_qos_send_hci_pkt()
279 index = qcb->qos_null_idx; gdm_qos_send_hci_pkt()
287 list_add_tail(&entry->list, &qcb->qos_list[index]); gdm_qos_send_hci_pkt()
331 int i, index, pos; gdm_recv_qos_hci_packet() local
349 index = get_csr(qcb, sfid, 0); gdm_recv_qos_hci_packet()
350 if (index == -1) { gdm_recv_qos_hci_packet()
355 qcb->csr[index].qos_buf_count = buf[(i*5)+10]; gdm_recv_qos_hci_packet()
371 index = get_csr(qcb, sfid, 1); gdm_recv_qos_hci_packet()
372 if (index == -1) { gdm_recv_qos_hci_packet()
374 "QoS ERROR: csr Update Error / Wrong index (%d)\n", gdm_recv_qos_hci_packet()
375 index); gdm_recv_qos_hci_packet()
380 netdev_dbg(nic->netdev, "QOS_ADD SFID = 0x%x, index=%d\n", gdm_recv_qos_hci_packet()
381 sfid, index); gdm_recv_qos_hci_packet()
384 qcb->csr[index].sfid = sfid; gdm_recv_qos_hci_packet()
385 qcb->csr[index].classifier_rule_en = ((buf[pos++]<<8)&0xff00); gdm_recv_qos_hci_packet()
386 qcb->csr[index].classifier_rule_en += buf[pos++]; gdm_recv_qos_hci_packet()
387 if (qcb->csr[index].classifier_rule_en == 0) gdm_recv_qos_hci_packet()
388 qcb->qos_null_idx = index; gdm_recv_qos_hci_packet()
389 qcb->csr[index].ip2s_mask = buf[pos++]; gdm_recv_qos_hci_packet()
390 qcb->csr[index].ip2s_lo = buf[pos++]; gdm_recv_qos_hci_packet()
391 qcb->csr[index].ip2s_hi = buf[pos++]; gdm_recv_qos_hci_packet()
392 qcb->csr[index].protocol = buf[pos++]; gdm_recv_qos_hci_packet()
393 qcb->csr[index].ipsrc_addrmask[0] = buf[pos++]; gdm_recv_qos_hci_packet()
394 qcb->csr[index].ipsrc_addrmask[1] = buf[pos++]; gdm_recv_qos_hci_packet()
395 qcb->csr[index].ipsrc_addrmask[2] = buf[pos++]; gdm_recv_qos_hci_packet()
396 qcb->csr[index].ipsrc_addrmask[3] = buf[pos++]; gdm_recv_qos_hci_packet()
397 qcb->csr[index].ipsrc_addr[0] = buf[pos++]; gdm_recv_qos_hci_packet()
398 qcb->csr[index].ipsrc_addr[1] = buf[pos++]; gdm_recv_qos_hci_packet()
399 qcb->csr[index].ipsrc_addr[2] = buf[pos++]; gdm_recv_qos_hci_packet()
400 qcb->csr[index].ipsrc_addr[3] = buf[pos++]; gdm_recv_qos_hci_packet()
401 qcb->csr[index].ipdst_addrmask[0] = buf[pos++]; gdm_recv_qos_hci_packet()
402 qcb->csr[index].ipdst_addrmask[1] = buf[pos++]; gdm_recv_qos_hci_packet()
403 qcb->csr[index].ipdst_addrmask[2] = buf[pos++]; gdm_recv_qos_hci_packet()
404 qcb->csr[index].ipdst_addrmask[3] = buf[pos++]; gdm_recv_qos_hci_packet()
405 qcb->csr[index].ipdst_addr[0] = buf[pos++]; gdm_recv_qos_hci_packet()
406 qcb->csr[index].ipdst_addr[1] = buf[pos++]; gdm_recv_qos_hci_packet()
407 qcb->csr[index].ipdst_addr[2] = buf[pos++]; gdm_recv_qos_hci_packet()
408 qcb->csr[index].ipdst_addr[3] = buf[pos++]; gdm_recv_qos_hci_packet()
409 qcb->csr[index].srcport_lo = ((buf[pos++]<<8)&0xff00); gdm_recv_qos_hci_packet()
410 qcb->csr[index].srcport_lo += buf[pos++]; gdm_recv_qos_hci_packet()
411 qcb->csr[index].srcport_hi = ((buf[pos++]<<8)&0xff00); gdm_recv_qos_hci_packet()
412 qcb->csr[index].srcport_hi += buf[pos++]; gdm_recv_qos_hci_packet()
413 qcb->csr[index].dstport_lo = ((buf[pos++]<<8)&0xff00); gdm_recv_qos_hci_packet()
414 qcb->csr[index].dstport_lo += buf[pos++]; gdm_recv_qos_hci_packet()
415 qcb->csr[index].dstport_hi = ((buf[pos++]<<8)&0xff00); gdm_recv_qos_hci_packet()
416 qcb->csr[index].dstport_hi += buf[pos++]; gdm_recv_qos_hci_packet()
421 netdev_dbg(nic->netdev, "QOS_CHANGE_DEL SFID = 0x%x, index=%d\n", gdm_recv_qos_hci_packet()
422 sfid, index); gdm_recv_qos_hci_packet()
427 qcb->csr[index].enabled = false; gdm_recv_qos_hci_packet()
431 list_for_each_entry_safe(entry, n, &qcb->qos_list[index], gdm_recv_qos_hci_packet()
/linux-4.4.14/drivers/scsi/
H A Dnsp32_io.h13 unsigned int index, nsp32_write1()
16 outb(val, (base + index)); nsp32_write1()
20 unsigned int index) nsp32_read1()
22 return inb(base + index); nsp32_read1()
26 unsigned int index, nsp32_write2()
29 outw(val, (base + index)); nsp32_write2()
33 unsigned int index) nsp32_read2()
35 return inw(base + index); nsp32_read2()
39 unsigned int index, nsp32_write4()
42 outl(val, (base + index)); nsp32_write4()
46 unsigned int index) nsp32_read4()
48 return inl(base + index); nsp32_read4()
54 unsigned int index, nsp32_mmio_write1()
59 ptr = (unsigned char *)(base + NSP32_MMIO_OFFSET + index); nsp32_mmio_write1()
65 unsigned int index) nsp32_mmio_read1()
69 ptr = (unsigned char *)(base + NSP32_MMIO_OFFSET + index); nsp32_mmio_read1()
75 unsigned int index, nsp32_mmio_write2()
80 ptr = (unsigned short *)(base + NSP32_MMIO_OFFSET + index); nsp32_mmio_write2()
86 unsigned int index) nsp32_mmio_read2()
90 ptr = (unsigned short *)(base + NSP32_MMIO_OFFSET + index); nsp32_mmio_read2()
96 unsigned int index, nsp32_mmio_write4()
101 ptr = (unsigned long *)(base + NSP32_MMIO_OFFSET + index); nsp32_mmio_write4()
107 unsigned int index) nsp32_mmio_read4()
111 ptr = (unsigned long *)(base + NSP32_MMIO_OFFSET + index); nsp32_mmio_read4()
12 nsp32_write1(unsigned int base, unsigned int index, unsigned char val) nsp32_write1() argument
19 nsp32_read1(unsigned int base, unsigned int index) nsp32_read1() argument
25 nsp32_write2(unsigned int base, unsigned int index, unsigned short val) nsp32_write2() argument
32 nsp32_read2(unsigned int base, unsigned int index) nsp32_read2() argument
38 nsp32_write4(unsigned int base, unsigned int index, unsigned long val) nsp32_write4() argument
45 nsp32_read4(unsigned int base, unsigned int index) nsp32_read4() argument
53 nsp32_mmio_write1(unsigned long base, unsigned int index, unsigned char val) nsp32_mmio_write1() argument
64 nsp32_mmio_read1(unsigned long base, unsigned int index) nsp32_mmio_read1() argument
74 nsp32_mmio_write2(unsigned long base, unsigned int index, unsigned short val) nsp32_mmio_write2() argument
85 nsp32_mmio_read2(unsigned long base, unsigned int index) nsp32_mmio_read2() argument
95 nsp32_mmio_write4(unsigned long base, unsigned int index, unsigned long val) nsp32_mmio_write4() argument
106 nsp32_mmio_read4(unsigned long base, unsigned int index) nsp32_mmio_read4() argument
/linux-4.4.14/drivers/media/pci/smipcie/
H A Dsmipcie-ir.c54 u8 index, current_bit, bit_count; smi_decode_rc5() local
61 for (index = 0; index < size; index++) { smi_decode_rc5()
63 current_bit = (pData[index] & 0x80) ? 1 : 0; smi_decode_rc5()
64 bit_count = pData[index] & 0x7f; smi_decode_rc5()
94 for (index = 0; index < (BITS_PER_COMMAND*GROUPS_PER_BIT); smi_decode_rc5()
95 index = index + 2) { smi_decode_rc5()
96 if ((group_array[index] == 1) && smi_decode_rc5()
97 (group_array[index+1] == 0)) { smi_decode_rc5()
99 (index/2) - 1)); smi_decode_rc5()
100 } else if ((group_array[index] == 0) && smi_decode_rc5()
101 (group_array[index+1] == 1)) { smi_decode_rc5()
120 u8 index, ucIRCount, readLoop, rc5_command, rc5_system, toggle; smi_ir_decode() local
132 for (index = 0; index < readLoop; index++) { smi_ir_decode()
133 dwIRData = smi_read(IR_DATA_BUFFER_BASE + (index*4)); smi_ir_decode()
135 ir->irData[index*4 + 0] = (u8)(dwIRData); smi_ir_decode()
136 ir->irData[index*4 + 1] = (u8)(dwIRData >> 8); smi_ir_decode()
137 ir->irData[index*4 + 2] = (u8)(dwIRData >> 16); smi_ir_decode()
138 ir->irData[index*4 + 3] = (u8)(dwIRData >> 24); smi_ir_decode()
/linux-4.4.14/drivers/staging/octeon/
H A Dethernet-spi.c31 static void cvm_oct_spxx_int_pr(union cvmx_spxx_int_reg spx_int_reg, int index) cvm_oct_spxx_int_pr() argument
34 pr_err("SPI%d: SRX Spi4 interface down\n", index); cvm_oct_spxx_int_pr()
36 pr_err("SPI%d: SRX Spi4 Calendar table parity error\n", index); cvm_oct_spxx_int_pr()
39 index); cvm_oct_spxx_int_pr()
41 pr_err("SPI%d: SRX Spi4 DIP4 error\n", index); cvm_oct_spxx_int_pr()
44 index); cvm_oct_spxx_int_pr()
47 index); cvm_oct_spxx_int_pr()
50 index); cvm_oct_spxx_int_pr()
53 index); cvm_oct_spxx_int_pr()
55 pr_err("SPI%d: SRX Spi4 async FIFO overflow\n", index); cvm_oct_spxx_int_pr()
58 index); cvm_oct_spxx_int_pr()
60 pr_err("SPI%d: SRX Port out of range\n", index); cvm_oct_spxx_int_pr()
63 static void cvm_oct_stxx_int_pr(union cvmx_stxx_int_reg stx_int_reg, int index) cvm_oct_stxx_int_pr() argument
67 index); cvm_oct_stxx_int_pr()
70 index); cvm_oct_stxx_int_pr()
72 pr_err("SPI%d: STX Unexpected framing sequence\n", index); cvm_oct_stxx_int_pr()
75 index); cvm_oct_stxx_int_pr()
78 index); cvm_oct_stxx_int_pr()
80 pr_err("SPI%d: STX Spi4 FIFO overflow error\n", index); cvm_oct_stxx_int_pr()
82 pr_err("SPI%d: STX Transmit packet burst too big\n", index); cvm_oct_stxx_int_pr()
85 index, 1); cvm_oct_stxx_int_pr()
88 index, 0); cvm_oct_stxx_int_pr()
91 static irqreturn_t cvm_oct_spi_spx_int(int index) cvm_oct_spi_spx_int() argument
96 spx_int_reg.u64 = cvmx_read_csr(CVMX_SPXX_INT_REG(index)); cvm_oct_spi_spx_int()
97 cvmx_write_csr(CVMX_SPXX_INT_REG(index), spx_int_reg.u64); cvm_oct_spi_spx_int()
98 if (!need_retrain[index]) { cvm_oct_spi_spx_int()
99 spx_int_reg.u64 &= cvmx_read_csr(CVMX_SPXX_INT_MSK(index)); cvm_oct_spi_spx_int()
100 cvm_oct_spxx_int_pr(spx_int_reg, index); cvm_oct_spi_spx_int()
103 stx_int_reg.u64 = cvmx_read_csr(CVMX_STXX_INT_REG(index)); cvm_oct_spi_spx_int()
104 cvmx_write_csr(CVMX_STXX_INT_REG(index), stx_int_reg.u64); cvm_oct_spi_spx_int()
105 if (!need_retrain[index]) { cvm_oct_spi_spx_int()
106 stx_int_reg.u64 &= cvmx_read_csr(CVMX_STXX_INT_MSK(index)); cvm_oct_spi_spx_int()
107 cvm_oct_stxx_int_pr(stx_int_reg, index); cvm_oct_spi_spx_int()
110 cvmx_write_csr(CVMX_SPXX_INT_MSK(index), 0); cvm_oct_spi_spx_int()
111 cvmx_write_csr(CVMX_STXX_INT_MSK(index), 0); cvm_oct_spi_spx_int()
112 need_retrain[index] = 1; cvm_oct_spi_spx_int()
H A Dethernet-rgmii.c41 int index = INDEX(priv->port); cvm_oct_set_hw_preamble() local
44 gmxx_rxx_frm_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RXX_FRM_CTL(index, cvm_oct_set_hw_preamble()
47 cvmx_write_csr(CVMX_GMXX_RXX_FRM_CTL(index, interface), cvm_oct_set_hw_preamble()
60 gmxx_rxx_int_reg.u64 = cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(index, cvm_oct_set_hw_preamble()
62 cvmx_write_csr(CVMX_GMXX_RXX_INT_REG(index, interface), cvm_oct_set_hw_preamble()
92 int index = INDEX(priv->port); cvm_oct_rgmii_poll() local
97 (index, interface)); cvm_oct_rgmii_poll()
151 int index; cmv_oct_rgmii_gmx_interrupt() local
155 for (index = 0; cmv_oct_rgmii_gmx_interrupt()
156 index < cvmx_helper_ports_on_interface(interface); cmv_oct_rgmii_gmx_interrupt()
157 index++) { cmv_oct_rgmii_gmx_interrupt()
162 (index, interface)); cmv_oct_rgmii_gmx_interrupt()
164 (index, interface)); cmv_oct_rgmii_gmx_interrupt()
171 (interface, index)]; cmv_oct_rgmii_gmx_interrupt()
182 cvmx_write_csr(CVMX_GMXX_RXX_INT_REG(index, interface), cmv_oct_rgmii_gmx_interrupt()
255 int index = INDEX(priv->port); cvm_oct_rgmii_init() local
265 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(index, interface), cvm_oct_rgmii_init()
291 int index = INDEX(priv->port); cvm_oct_rgmii_uninit() local
299 (index, interface)); cvm_oct_rgmii_uninit()
303 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(index, interface), cvm_oct_rgmii_uninit()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/mspdec/
H A Dpriv.h6 int index, struct nvkm_engine **);
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/msppp/
H A Dpriv.h6 int index, struct nvkm_engine **);
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/msvld/
H A Dpriv.h6 int index, struct nvkm_engine **);
/linux-4.4.14/drivers/gpu/drm/nouveau/dispnv04/
H A Dcursor.c11 nv_show_cursor(nv_crtc->base.dev, nv_crtc->index, true); nv04_cursor_show()
17 nv_show_cursor(nv_crtc->base.dev, nv_crtc->index, false); nv04_cursor_hide()
24 NVWriteRAMDAC(nv_crtc->base.dev, nv_crtc->index, nv04_cursor_set_pos()
31 crtc_wr_cio_state(struct drm_crtc *crtc, struct nv04_crtc_reg *crtcstate, int index) crtc_wr_cio_state() argument
33 NVWriteVgaCrtc(crtc->dev, nouveau_crtc(crtc)->index, index, crtc_wr_cio_state()
34 crtcstate->CRTC[index]); crtc_wr_cio_state()
42 struct nv04_crtc_reg *regp = &nv04_display(dev)->mode_reg.crtc_reg[nv_crtc->index]; nv04_cursor_set_offset()
59 nv_fix_nv40_hw_cursor(dev, nv_crtc->index); nv04_cursor_set_offset()
/linux-4.4.14/arch/x86/include/asm/
H A Dmsidef.h54 #define MSI_ADDR_IR_INDEX1(index) ((index & 0x8000) >> 13)
55 #define MSI_ADDR_IR_INDEX2(index) ((index & 0x7fff) << 5)
/linux-4.4.14/drivers/cpufreq/
H A Dblackfin-cpufreq.c63 int index; bfin_init_tables() local
80 for (index = 0; (cclk >> index) >= min_cclk && csel <= 3 && index < 3; index++, csel++) { bfin_init_tables()
81 bfin_freq_table[index].frequency = cclk >> index; bfin_init_tables()
83 dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */ bfin_init_tables()
85 dpm_state_table[index].csel = csel; bfin_init_tables()
87 dpm_state_table[index].tscale = (TIME_SCALE >> index) - 1; bfin_init_tables()
90 bfin_freq_table[index].frequency, bfin_init_tables()
91 dpm_state_table[index].csel, bfin_init_tables()
92 dpm_state_table[index].tscale); bfin_init_tables()
100 unsigned int index = *(unsigned int *)info; bfin_adjust_core_timer() local
103 tscale = dpm_state_table[index].tscale; bfin_adjust_core_timer()
130 static int bfin_target(struct cpufreq_policy *policy, unsigned int index) bfin_target() argument
145 new_freq = bfin_freq_table[index].frequency; bfin_target()
148 plldiv = (bfin_read_PLL_DIV() & SSEL) | dpm_state_table[index].csel; bfin_target()
157 on_each_cpu(bfin_adjust_core_timer, &index, 1); bfin_target()
162 __bfin_cycles_off += (cycles << __bfin_cycles_mod) - (cycles << index); bfin_target()
163 __bfin_cycles_mod = index; bfin_target()
/linux-4.4.14/drivers/gpu/drm/fsl-dcu/
H A Dfsl_dcu_drm_plane.c29 unsigned int index; fsl_dcu_drm_plane_index() local
31 index = drm_plane_index(plane); fsl_dcu_drm_plane_index()
32 if (index < total_layer) fsl_dcu_drm_plane_index()
33 return total_layer - index - 1; fsl_dcu_drm_plane_index()
62 int index, ret; fsl_dcu_drm_plane_atomic_disable() local
64 index = fsl_dcu_drm_plane_index(plane); fsl_dcu_drm_plane_atomic_disable()
65 if (index < 0) fsl_dcu_drm_plane_atomic_disable()
68 ret = regmap_read(fsl_dev->regmap, DCU_CTRLDESCLN(index, 4), &value); fsl_dcu_drm_plane_atomic_disable()
72 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 4), value); fsl_dcu_drm_plane_atomic_disable()
86 int index, ret; fsl_dcu_drm_plane_atomic_update() local
91 index = fsl_dcu_drm_plane_index(plane); fsl_dcu_drm_plane_atomic_update()
92 if (index < 0) fsl_dcu_drm_plane_atomic_update()
126 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 1), fsl_dcu_drm_plane_atomic_update()
131 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 2), fsl_dcu_drm_plane_atomic_update()
137 DCU_CTRLDESCLN(index, 3), gem->paddr); fsl_dcu_drm_plane_atomic_update()
140 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 4), fsl_dcu_drm_plane_atomic_update()
147 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 5), fsl_dcu_drm_plane_atomic_update()
153 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 6), fsl_dcu_drm_plane_atomic_update()
159 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 7), 0); fsl_dcu_drm_plane_atomic_update()
162 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 8), fsl_dcu_drm_plane_atomic_update()
166 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 9), fsl_dcu_drm_plane_atomic_update()
171 ret = regmap_write(fsl_dev->regmap, DCU_CTRLDESCLN(index, 10), fsl_dcu_drm_plane_atomic_update()
/linux-4.4.14/drivers/infiniband/hw/mthca/
H A Dmthca_mcg.c54 * If GID is found in MGM or MGM is empty, *index = *hash, *prev = -1
57 * if GID is found in AMGM, *index = index in AMGM, *prev = index of
60 * If no AMGM exists for given gid, *index = -1, *prev = index of last
65 u16 *hash, int *prev, int *index) find_mgm()
88 *index = *hash; find_mgm()
92 err = mthca_READ_MGM(dev, *index, mgm_mailbox); find_mgm()
99 if (*index != *hash) { find_mgm()
109 *prev = *index; find_mgm()
110 *index = be32_to_cpu(mgm->next_gid_index) >> 6; find_mgm()
111 } while (*index); find_mgm()
113 *index = -1; find_mgm()
126 int index, prev; mthca_multicast_attach() local
138 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); mthca_multicast_attach()
142 if (index != -1) { mthca_multicast_attach()
148 index = mthca_alloc(&dev->mcg_table.alloc); mthca_multicast_attach()
149 if (index == -1) { mthca_multicast_attach()
155 err = mthca_READ_MGM(dev, index, mailbox); mthca_multicast_attach()
176 mthca_err(dev, "MGM at index %x is full.\n", index); mthca_multicast_attach()
181 err = mthca_WRITE_MGM(dev, index, mailbox); mthca_multicast_attach()
197 mgm->next_gid_index = cpu_to_be32(index << 6); mthca_multicast_attach()
204 if (err && link && index != -1) { mthca_multicast_attach()
205 BUG_ON(index < dev->limits.num_mgms); mthca_multicast_attach()
206 mthca_free(&dev->mcg_table.alloc, index); mthca_multicast_attach()
220 int prev, index; mthca_multicast_detach() local
231 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); mthca_multicast_detach()
235 if (index == -1) { mthca_multicast_detach()
257 err = mthca_WRITE_MGM(dev, index, mailbox); mthca_multicast_detach()
279 err = mthca_WRITE_MGM(dev, index, mailbox); mthca_multicast_detach()
304 BUG_ON(index < dev->limits.num_mgms); mthca_multicast_detach()
305 mthca_free(&dev->mcg_table.alloc, index); mthca_multicast_detach()
63 find_mgm(struct mthca_dev *dev, u8 *gid, struct mthca_mailbox *mgm_mailbox, u16 *hash, int *prev, int *index) find_mgm() argument
/linux-4.4.14/drivers/net/wireless/ath/wil6210/
H A Dtrace.h159 TP_PROTO(u16 index, struct vring_rx_desc *d),
160 TP_ARGS(index, d),
162 __field(u16, index)
173 __entry->index = index;
183 TP_printk("index %d len %d mid %d cid %d tid %d mcs %d seq 0x%03x"
184 " type 0x%1x subtype 0x%1x", __entry->index, __entry->len,
190 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags),
191 TP_ARGS(vring, index, len, frags),
195 __field(u16, index)
201 __entry->index = index;
204 TP_printk("vring %d index %d len %d frags %d",
205 __entry->vring, __entry->index, __entry->len, __entry->frags)
209 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err),
210 TP_ARGS(vring, index, len, err),
214 __field(u16, index)
219 __entry->index = index;
223 TP_printk("vring %d index %d len %d err 0x%02x",
224 __entry->vring, __entry->index, __entry->len,
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/disp/
H A Dchangf119.c27 gf119_disp_chan_uevent_fini(struct nvkm_event *event, int type, int index) gf119_disp_chan_uevent_fini() argument
31 nvkm_mask(device, 0x610090, 0x00000001 << index, 0x00000000 << index); gf119_disp_chan_uevent_fini()
32 nvkm_wr32(device, 0x61008c, 0x00000001 << index); gf119_disp_chan_uevent_fini()
36 gf119_disp_chan_uevent_init(struct nvkm_event *event, int types, int index) gf119_disp_chan_uevent_init() argument
40 nvkm_wr32(device, 0x61008c, 0x00000001 << index); gf119_disp_chan_uevent_init()
41 nvkm_mask(device, 0x610090, 0x00000001 << index, 0x00000001 << index); gf119_disp_chan_uevent_init()
H A Dpriv.h8 int index, int heads, struct nvkm_disp *);
10 int index, int heads, struct nvkm_disp **);
14 int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
16 int (* tv)(struct nvkm_disp *, int index, struct dcb_output *,
18 int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
20 int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
22 int (* dp)(struct nvkm_disp *, int index, struct dcb_output *,
H A Dconn.h11 int index; member in struct:nvkm_connector
19 int nvkm_connector_new(struct nvkm_disp *, int index, struct nvbios_connE *,
28 _conn->index, _conn->info.location, _conn->info.type, ##a); \
H A Dnv50.h52 int index, int heads, struct nvkm_disp **);
54 int index, struct nvkm_disp **);
57 int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
59 int (* tv)(struct nvkm_disp *, int index, struct dcb_output *,
61 int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
63 int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
65 int (* dp)(struct nvkm_disp *, int index, struct dcb_output *,
H A Dvga.c69 nvkm_rdvgas(struct nvkm_device *device, int head, u8 index) nvkm_rdvgas() argument
71 nvkm_wrport(device, head, 0x03c4, index); nvkm_rdvgas()
76 nvkm_wrvgas(struct nvkm_device *device, int head, u8 index, u8 value) nvkm_wrvgas() argument
78 nvkm_wrport(device, head, 0x03c4, index); nvkm_wrvgas()
83 nvkm_rdvgag(struct nvkm_device *device, int head, u8 index) nvkm_rdvgag() argument
85 nvkm_wrport(device, head, 0x03ce, index); nvkm_rdvgag()
90 nvkm_wrvgag(struct nvkm_device *device, int head, u8 index, u8 value) nvkm_wrvgag() argument
92 nvkm_wrport(device, head, 0x03ce, index); nvkm_wrvgag()
97 nvkm_rdvgac(struct nvkm_device *device, int head, u8 index) nvkm_rdvgac() argument
99 nvkm_wrport(device, head, 0x03d4, index); nvkm_rdvgac()
104 nvkm_wrvgac(struct nvkm_device *device, int head, u8 index, u8 value) nvkm_wrvgac() argument
106 nvkm_wrport(device, head, 0x03d4, index); nvkm_wrvgac()
111 nvkm_rdvgai(struct nvkm_device *device, int head, u16 port, u8 index) nvkm_rdvgai() argument
113 if (port == 0x03c4) return nvkm_rdvgas(device, head, index); nvkm_rdvgai()
114 if (port == 0x03ce) return nvkm_rdvgag(device, head, index); nvkm_rdvgai()
115 if (port == 0x03d4) return nvkm_rdvgac(device, head, index); nvkm_rdvgai()
120 nvkm_wrvgai(struct nvkm_device *device, int head, u16 port, u8 index, u8 value) nvkm_wrvgai() argument
122 if (port == 0x03c4) nvkm_wrvgas(device, head, index, value); nvkm_wrvgai()
123 else if (port == 0x03ce) nvkm_wrvgag(device, head, index, value); nvkm_wrvgai()
124 else if (port == 0x03d4) nvkm_wrvgac(device, head, index, value); nvkm_wrvgai()
/linux-4.4.14/arch/powerpc/platforms/powernv/
H A Dopal-nvram.c29 static ssize_t opal_nvram_read(char *buf, size_t count, loff_t *index) opal_nvram_read() argument
34 if (*index >= nvram_size) opal_nvram_read()
36 off = *index; opal_nvram_read()
42 *index += count; opal_nvram_read()
46 static ssize_t opal_nvram_write(char *buf, size_t count, loff_t *index) opal_nvram_write() argument
51 if (*index >= nvram_size) opal_nvram_write()
53 off = *index; opal_nvram_write()
62 *index += count; opal_nvram_write()
/linux-4.4.14/arch/arm64/include/asm/
H A Dcpuidle.h8 extern int arm_cpuidle_suspend(int index);
15 static inline int arm_cpuidle_suspend(int index) arm_cpuidle_suspend() argument
/linux-4.4.14/drivers/video/
H A Dof_videomode.c17 * of_get_videomode - get the videomode #<index> from devicetree
20 * @index - index into list of display_timings
26 * specified by index into *vm. This function should only be used, if
32 int index) of_get_videomode()
43 if (index == OF_USE_NATIVE_MODE) of_get_videomode()
44 index = disp->native_mode; of_get_videomode()
46 ret = videomode_from_timings(disp, vm, index); of_get_videomode()
31 of_get_videomode(struct device_node *np, struct videomode *vm, int index) of_get_videomode() argument
/linux-4.4.14/drivers/macintosh/
H A Dwindfarm_pid.c50 st->index = 0; wf_pid_run()
52 st->index = (st->index + 1) % hlen; wf_pid_run()
53 st->samples[st->index] = new_sample; wf_pid_run()
54 st->errors[st->index] = error; wf_pid_run()
59 integ += st->errors[(st->index + hlen - i) % hlen]; wf_pid_run()
63 deriv = st->errors[st->index] - wf_pid_run()
64 st->errors[(st->index + hlen - 1) % hlen]; wf_pid_run()
106 st->index = st->tindex = 0; wf_cpu_pid_run()
108 st->index = (st->index + 1) % hlen; wf_cpu_pid_run()
109 st->powers[st->index] = new_power; wf_cpu_pid_run()
110 st->errors[st->index] = error; wf_cpu_pid_run()
117 integ += st->errors[(st->index + hlen - i) % hlen]; wf_cpu_pid_run()
/linux-4.4.14/fs/squashfs/
H A Dfile.c32 * larger), the code implements an index cache that caches the mapping from
33 * block index to datablock location on disk.
35 * The index cache allows Squashfs to handle large files (up to 1.75 TiB) while
39 * The index cache is designed to be memory efficient, and by default uses
57 * Locate cache slot in range [offset, index] for specified inode. If
58 * there's more than one return the slot closest to index.
61 int index) locate_meta_index()
69 TRACE("locate_meta_index: index %d, offset %d\n", index, offset); locate_meta_index()
77 msblk->meta_index[i].offset <= index && locate_meta_index()
97 * Find and initialise an empty cache slot for index offset.
112 * First time cache index has been used, allocate and empty_meta_index()
113 * initialise. The cache index could be allocated at empty_meta_index()
213 * Each cache index slot has SQUASHFS_META_ENTRIES, each of which
214 * can cache one index -> datablock/blocklist-block mapping. We wish
215 * to distribute these over the length of the file, entry[0] maps index x,
216 * entry[1] maps index x + skip, entry[2] maps index x + 2 * skip, and so on.
232 * Search and grow the index cache for the specified inode, returning the
234 * <index_block, index_offset> for index (scaled to nearest cache index).
236 static int fill_meta_index(struct inode *inode, int index, fill_meta_index() argument
250 * Scale index to cache index (cache slot entry) fill_meta_index()
252 index /= SQUASHFS_META_INDEXES * skip; fill_meta_index()
254 while (offset < index) { fill_meta_index()
255 meta = locate_meta_index(inode, offset + 1, index); fill_meta_index()
262 offset = index < meta->offset + meta->entries ? index : fill_meta_index()
279 * slot is extended up to index or to the end of the slot, in fill_meta_index()
282 for (i = meta->offset + meta->entries; i <= index && fill_meta_index()
321 * Scale cache index (cache slot entry) to index fill_meta_index()
333 * specified by index. Fill_meta_index() does most of the work.
335 static int read_blocklist(struct inode *inode, int index, u64 *block) read_blocklist() argument
341 int res = fill_meta_index(inode, index, &start, &offset, block); read_blocklist()
343 TRACE("read_blocklist: res %d, index %d, start 0x%llx, offset" read_blocklist()
344 " 0x%x, block 0x%llx\n", res, index, start, offset, read_blocklist()
351 * res contains the index of the mapping returned by fill_meta_index(), read_blocklist()
352 * this will likely be less than the desired index (because the read_blocklist()
356 if (res < index) { read_blocklist()
357 blks = read_indexes(inode->i_sb, index - res, &start, &offset); read_blocklist()
364 * Read length of block specified by index. read_blocklist()
381 int start_index = page->index & ~mask, end_index = start_index | mask; squashfs_copy_cache()
396 push_page = (i == page->index) ? page : squashfs_copy_cache()
413 if (i != page->index) squashfs_copy_cache()
441 static int squashfs_readpage_sparse(struct page *page, int index, int file_end) squashfs_readpage_sparse() argument
445 int bytes = index == file_end ? squashfs_readpage_sparse()
457 int index = page->index >> (msblk->block_log - PAGE_CACHE_SHIFT); squashfs_readpage() local
462 TRACE("Entered squashfs_readpage, page index %lx, start block %llx\n", squashfs_readpage()
463 page->index, squashfs_i(inode)->start); squashfs_readpage()
465 if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> squashfs_readpage()
469 if (index < file_end || squashfs_i(inode)->fragment_block == squashfs_readpage()
472 int bsize = read_blocklist(inode, index, &block); squashfs_readpage()
477 res = squashfs_readpage_sparse(page, index, file_end); squashfs_readpage()
60 locate_meta_index(struct inode *inode, int offset, int index) locate_meta_index() argument
H A Dnamei.c42 * Directories are sorted, and can contain a directory index to speed up
44 * storing the index/filename mapping to the first directory header
46 * and at lookup the index is scanned linearly looking for the first filename
49 * The general idea of the index is ensure only one metadata block needs to be
69 * Lookup name in the directory index, returning the location of the metadata
70 * block containing it, and the directory index this represents.
72 * If we get an error reading the index then return the part of the index
73 * (if any) we have managed to read - the index isn't essential, just
84 struct squashfs_dir_index *index; get_dir_index_using_name() local
89 index = kmalloc(sizeof(*index) + SQUASHFS_NAME_LEN * 2 + 2, GFP_KERNEL); get_dir_index_using_name()
90 if (index == NULL) { get_dir_index_using_name()
95 str = &index->name[SQUASHFS_NAME_LEN + 1]; get_dir_index_using_name()
100 err = squashfs_read_metadata(sb, index, &index_start, get_dir_index_using_name()
101 &index_offset, sizeof(*index)); get_dir_index_using_name()
106 size = le32_to_cpu(index->size) + 1; get_dir_index_using_name()
110 err = squashfs_read_metadata(sb, index->name, &index_start, get_dir_index_using_name()
115 index->name[size] = '\0'; get_dir_index_using_name()
117 if (strcmp(index->name, str) > 0) get_dir_index_using_name()
120 length = le32_to_cpu(index->index); get_dir_index_using_name()
121 *next_block = le32_to_cpu(index->start_block) + get_dir_index_using_name()
126 kfree(index); get_dir_index_using_name()
130 * Return index (f_pos) of the looked up metadata block. Translate get_dir_index_using_name()
H A Dsymlink.c51 int index = page->index << PAGE_CACHE_SHIFT; squashfs_symlink_readpage() local
54 int length = min_t(int, i_size_read(inode) - index, PAGE_CACHE_SIZE); squashfs_symlink_readpage()
59 TRACE("Entered squashfs_symlink_readpage, page index %ld, start block " squashfs_symlink_readpage()
60 "%llx, offset %x\n", page->index, block, offset); squashfs_symlink_readpage()
63 * Skip index bytes into symlink metadata. squashfs_symlink_readpage()
65 if (index) { squashfs_symlink_readpage()
67 index); squashfs_symlink_readpage()
/linux-4.4.14/include/trace/events/
H A Dvb2.h18 __field(u32, index)
28 __entry->index = vb->index;
33 TP_printk("owner = %p, queued = %u, owned_by_drv = %d, index = %u, "
37 __entry->index, __entry->type,
H A Dfilemap.h23 __field(unsigned long, index)
30 __entry->index = page->index;
42 __entry->index << PAGE_SHIFT)
/linux-4.4.14/arch/cris/include/arch-v32/arch/hwregs/iop/
H A Diop_version_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Diop_fifo_in_extra_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Diop_fifo_out_extra_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Diop_scrc_in_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Diop_scrc_out_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Diop_trigger_grp_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
/linux-4.4.14/arch/cris/include/arch-v32/arch/hwregs/
H A Dirq_nmi_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Dstrcop_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Dconfig_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Drt_trace_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
/linux-4.4.14/arch/cris/include/arch-v32/mach-a3/mach/hwregs/
H A Dstrmux_defs.h27 #define REG_RD_VECT( scope, inst, reg, index ) \
30 (index) * STRIDE_##scope##_##reg )
34 #define REG_WR_VECT( scope, inst, reg, index, val ) \
37 (index) * STRIDE_##scope##_##reg, (val) )
51 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
53 (index) * STRIDE_##scope##_##reg )
57 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
59 (index) * STRIDE_##scope##_##reg, (val) )
77 #define REG_ADDR_VECT( scope, inst, reg, index ) \
79 (index) * STRIDE_##scope##_##reg )
H A Dclkgen_defs.h27 #define REG_RD_VECT( scope, inst, reg, index ) \
30 (index) * STRIDE_##scope##_##reg )
34 #define REG_WR_VECT( scope, inst, reg, index, val ) \
37 (index) * STRIDE_##scope##_##reg, (val) )
51 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
53 (index) * STRIDE_##scope##_##reg )
57 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
59 (index) * STRIDE_##scope##_##reg, (val) )
77 #define REG_ADDR_VECT( scope, inst, reg, index ) \
79 (index) * STRIDE_##scope##_##reg )
H A Dl2cache_defs.h27 #define REG_RD_VECT( scope, inst, reg, index ) \
30 (index) * STRIDE_##scope##_##reg )
34 #define REG_WR_VECT( scope, inst, reg, index, val ) \
37 (index) * STRIDE_##scope##_##reg, (val) )
51 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
53 (index) * STRIDE_##scope##_##reg )
57 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
59 (index) * STRIDE_##scope##_##reg, (val) )
77 #define REG_ADDR_VECT( scope, inst, reg, index ) \
79 (index) * STRIDE_##scope##_##reg )
/linux-4.4.14/arch/ia64/sn/pci/pcibr/
H A Dpcibr_ate.c24 int index; mark_ate() local
27 for (index = start; length < number; index++, length++) mark_ate()
28 ate[index] = value; mark_ate()
32 * find_free_ate: Find the first free ate index starting from the given
33 * index for the desired consecutive count.
39 int index; find_free_ate() local
42 for (index = start; index < ate_resource->num_ate;) { find_free_ate()
43 if (!ate[index]) { find_free_ate()
47 start_free = index; /* Found start free ate */ find_free_ate()
53 index = i + 1; find_free_ate()
60 index++; /* Try next ate */ find_free_ate()
113 * Return the start index on success, -1 on failure.
160 void pcibr_ate_free(struct pcibus_info *pcibus_info, int index) pcibr_ate_free() argument
169 ate = *pcibr_ate_addr(pcibus_info, index); pcibr_ate_free()
170 count = pcibus_info->pbi_int_ate_resource.ate[index]; pcibr_ate_free()
171 ate_write(pcibus_info, index, count, (ate & ~PCI32_ATE_V)); pcibr_ate_free()
175 free_ate_resource(&pcibus_info->pbi_int_ate_resource, index); pcibr_ate_free()
/linux-4.4.14/drivers/gpu/drm/rcar-du/
H A Drcar_du_plane.c32 unsigned int index, u32 reg) rcar_du_plane_read()
35 rgrp->mmio_offset + index * PLANE_OFF + reg); rcar_du_plane_read()
39 unsigned int index, u32 reg, u32 data) rcar_du_plane_write()
41 rcar_du_write(rgrp->dev, rgrp->mmio_offset + index * PLANE_OFF + reg, rcar_du_plane_write()
53 unsigned int index = state->hwindex; rcar_du_plane_setup_fb() local
72 rcar_du_plane_write(rgrp, index, PnMWR, mwr); rcar_du_plane_setup_fb()
86 rcar_du_plane_write(rgrp, index, PnSPXR, src_x); rcar_du_plane_setup_fb()
87 rcar_du_plane_write(rgrp, index, PnSPYR, src_y * rcar_du_plane_setup_fb()
91 rcar_du_plane_write(rgrp, index, PnDSA0R, gem->paddr + fb->offsets[0]); rcar_du_plane_setup_fb()
94 index = (index + 1) % 8; rcar_du_plane_setup_fb()
96 rcar_du_plane_write(rgrp, index, PnMWR, fb->pitches[0]); rcar_du_plane_setup_fb()
98 rcar_du_plane_write(rgrp, index, PnSPXR, src_x); rcar_du_plane_setup_fb()
99 rcar_du_plane_write(rgrp, index, PnSPYR, src_y * rcar_du_plane_setup_fb()
103 rcar_du_plane_write(rgrp, index, PnDSA0R, rcar_du_plane_setup_fb()
109 unsigned int index) rcar_du_plane_setup_mode()
127 rcar_du_plane_write(rgrp, index, PnALPHAR, PnALPHAR_ABIT_0); rcar_du_plane_setup_mode()
129 rcar_du_plane_write(rgrp, index, PnALPHAR, rcar_du_plane_setup_mode()
145 rcar_du_plane_write(rgrp, index, PnMR, pnmr); rcar_du_plane_setup_mode()
152 rcar_du_plane_write(rgrp, index, PnTC2R, colorkey); rcar_du_plane_setup_mode()
160 rcar_du_plane_write(rgrp, index, PnTC2R, colorkey); rcar_du_plane_setup_mode()
165 rcar_du_plane_write(rgrp, index, PnTC3R, rcar_du_plane_setup_mode()
172 unsigned int index) __rcar_du_plane_setup()
185 ddcr4 = rcar_du_plane_read(rgrp, index, PnDDCR4); __rcar_du_plane_setup()
189 rcar_du_plane_setup_mode(plane, index); __rcar_du_plane_setup()
192 if (state->hwindex != index) { __rcar_du_plane_setup()
206 rcar_du_plane_write(rgrp, index, PnDDCR2, ddcr2); __rcar_du_plane_setup()
207 rcar_du_plane_write(rgrp, index, PnDDCR4, ddcr4); __rcar_du_plane_setup()
210 rcar_du_plane_write(rgrp, index, PnDSXR, plane->plane.state->crtc_w); __rcar_du_plane_setup()
211 rcar_du_plane_write(rgrp, index, PnDSYR, plane->plane.state->crtc_h); __rcar_du_plane_setup()
212 rcar_du_plane_write(rgrp, index, PnDPXR, plane->plane.state->crtc_x); __rcar_du_plane_setup()
213 rcar_du_plane_write(rgrp, index, PnDPYR, plane->plane.state->crtc_y); __rcar_du_plane_setup()
216 rcar_du_plane_write(rgrp, index, PnWASPR, 0); __rcar_du_plane_setup()
217 rcar_du_plane_write(rgrp, index, PnWAMWR, 4095); __rcar_du_plane_setup()
218 rcar_du_plane_write(rgrp, index, PnBTR, 0); __rcar_du_plane_setup()
219 rcar_du_plane_write(rgrp, index, PnMLR, 0); __rcar_du_plane_setup()
401 crtcs = ((1 << rcdu->num_crtcs) - 1) & (3 << (2 * rgrp->index)); rcar_du_planes_init()
31 rcar_du_plane_read(struct rcar_du_group *rgrp, unsigned int index, u32 reg) rcar_du_plane_read() argument
38 rcar_du_plane_write(struct rcar_du_group *rgrp, unsigned int index, u32 reg, u32 data) rcar_du_plane_write() argument
108 rcar_du_plane_setup_mode(struct rcar_du_plane *plane, unsigned int index) rcar_du_plane_setup_mode() argument
171 __rcar_du_plane_setup(struct rcar_du_plane *plane, unsigned int index) __rcar_du_plane_setup() argument
/linux-4.4.14/drivers/staging/rtl8712/
H A Dusb_ops.c42 u16 index; usb_read8() local
49 index = 0; usb_read8()
52 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_read8()
62 u16 index; usb_read16() local
69 index = 0; usb_read16()
72 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_read16()
82 u16 index; usb_read32() local
89 index = 0; usb_read32()
92 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_read32()
102 u16 index; usb_write8() local
109 index = 0; usb_write8()
114 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_write8()
123 u16 index; usb_write16() local
130 index = 0; usb_write16()
135 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_write16()
144 u16 index; usb_write32() local
151 index = 0; usb_write32()
155 r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, usb_write32()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/ce/
H A Dgm204.c38 gm204_ce_new(struct nvkm_device *device, int index, gm204_ce_new() argument
41 if (index == NVKM_ENGINE_CE0) { gm204_ce_new()
42 return nvkm_engine_new_(&gm204_ce, device, index, gm204_ce_new()
45 if (index == NVKM_ENGINE_CE1) { gm204_ce_new()
46 return nvkm_engine_new_(&gm204_ce, device, index, gm204_ce_new()
49 if (index == NVKM_ENGINE_CE2) { gm204_ce_new()
50 return nvkm_engine_new_(&gm204_ce, device, index, gm204_ce_new()
H A Dgf100.c33 const int index = ce->engine.subdev.index - NVKM_ENGINE_CE0; gf100_ce_init() local
34 nvkm_wr32(device, ce->addr + 0x084, index); gf100_ce_init()
68 gf100_ce_new(struct nvkm_device *device, int index, gf100_ce_new() argument
71 if (index == NVKM_ENGINE_CE0) { gf100_ce_new()
72 return nvkm_falcon_new_(&gf100_ce0, device, index, true, gf100_ce_new()
75 if (index == NVKM_ENGINE_CE1) { gf100_ce_new()
76 return nvkm_falcon_new_(&gf100_ce1, device, index, true, gf100_ce_new()
H A Dgk104.c31 const u32 base = (ce->subdev.index - NVKM_ENGINE_CE0) * 0x1000; gk104_ce_intr()
51 gk104_ce_new(struct nvkm_device *device, int index, gk104_ce_new() argument
54 if (index == NVKM_ENGINE_CE0) { gk104_ce_new()
55 return nvkm_engine_new_(&gk104_ce, device, index, gk104_ce_new()
58 if (index == NVKM_ENGINE_CE1) { gk104_ce_new()
59 return nvkm_engine_new_(&gk104_ce, device, index, gk104_ce_new()
62 if (index == NVKM_ENGINE_CE2) { gk104_ce_new()
63 return nvkm_engine_new_(&gk104_ce, device, index, gk104_ce_new()
/linux-4.4.14/fs/fscache/
H A Dhistogram.c29 unsigned long index; fscache_histogram_show() local
40 index = (unsigned long) v - 3; fscache_histogram_show()
41 n[0] = atomic_read(&fscache_obj_instantiate_histogram[index]); fscache_histogram_show()
42 n[1] = atomic_read(&fscache_ops_histogram[index]); fscache_histogram_show()
43 n[2] = atomic_read(&fscache_objs_histogram[index]); fscache_histogram_show()
44 n[3] = atomic_read(&fscache_retrieval_delay_histogram[index]); fscache_histogram_show()
45 n[4] = atomic_read(&fscache_retrieval_histogram[index]); fscache_histogram_show()
49 t = (index * 1000) / HZ; fscache_histogram_show()
52 index, t, n[0], n[1], n[2], n[3], n[4]); fscache_histogram_show()
H A Dfsdef.c1 /* Filesystem index definition
28 * The root index is owned by FS-Cache itself.
31 * already exist, create an entry in the root index with the key being the name
32 * of the netfs ("AFS" for example), and the auxiliary data holding the index
46 * The new entry will be an index, and a cookie referring to it will be passed
48 * cache. It can create whatever objects it likes in that index, including
67 * Definition of an entry in the root index. Each entry is an index, keyed to
68 * a specific netfs and only applicable to a particular version of the index
80 * get the key data for an FSDEF index record - this is the name of the netfs
100 * get the auxiliary data for an FSDEF index record - this is the index
120 * check that the index structure version number stored in the auxiliary data
/linux-4.4.14/drivers/video/fbdev/core/
H A Dfb_draw.h100 static inline u32 fb_shifted_pixels_mask_u32(struct fb_info *p, u32 index, fb_shifted_pixels_mask_u32() argument
106 mask = FB_SHIFT_HIGH(p, ~(u32)0, index); fb_shifted_pixels_mask_u32()
109 mask = FB_SHIFT_LOW(p, mask, index & (bswapmask)) & mask; fb_shifted_pixels_mask_u32()
110 mask = FB_SHIFT_HIGH(p, mask, index & ~(bswapmask)); fb_shifted_pixels_mask_u32()
113 if(index + bswapmask < 32) fb_shifted_pixels_mask_u32()
116 (index + bswapmask) & ~(bswapmask)); fb_shifted_pixels_mask_u32()
122 u32 index, fb_shifted_pixels_mask_long()
128 mask = FB_SHIFT_HIGH(p, ~0UL, index); fb_shifted_pixels_mask_long()
131 mask = FB_SHIFT_LOW(p, mask, index & (bswapmask)) & mask; fb_shifted_pixels_mask_long()
132 mask = FB_SHIFT_HIGH(p, mask, index & ~(bswapmask)); fb_shifted_pixels_mask_long()
135 if(index + bswapmask < BITS_PER_LONG) fb_shifted_pixels_mask_long()
138 (index + bswapmask) & ~(bswapmask)); fb_shifted_pixels_mask_long()
121 fb_shifted_pixels_mask_long(struct fb_info *p, u32 index, u32 bswapmask) fb_shifted_pixels_mask_long() argument
/linux-4.4.14/drivers/md/persistent-data/
H A Ddm-btree-remove.c111 static void delete_at(struct btree_node *n, unsigned index) delete_at() argument
114 unsigned nr_to_copy = nr_entries - (index + 1); delete_at()
116 BUG_ON(index >= nr_entries); delete_at()
119 memmove(key_ptr(n, index), delete_at()
120 key_ptr(n, index + 1), delete_at()
123 memmove(value_ptr(n, index), delete_at()
124 value_ptr(n, index + 1), delete_at()
137 unsigned index; member in struct:child
144 unsigned index, struct child *result) init_child()
149 result->index = index; init_child()
150 root = value64(parent, index); init_child()
162 *((__le64 *) value_ptr(parent, index)) = init_child()
214 delete_at(parent, r->index); __rebalance2()
227 *key_ptr(parent, r->index) = right->keys[0]; __rebalance2()
282 *key_ptr(parent, r->index) = right->keys[0]; delete_center_node()
284 delete_at(parent, c->index); delete_center_node()
285 r->index--; delete_center_node()
337 *key_ptr(parent, c->index) = center->keys[0]; redistribute3()
338 *key_ptr(parent, r->index) = right->keys[0]; redistribute3()
445 static int do_leaf(struct btree_node *n, uint64_t key, unsigned *index) do_leaf() argument
454 *index = i; do_leaf()
461 * call delete_at() to remove the entry at index.
465 uint64_t key, unsigned *index) remove_raw()
467 int i = *index, r; remove_raw()
489 return do_leaf(n, key, index); remove_raw()
497 return do_leaf(n, key, index); remove_raw()
516 int index = 0, r = 0; dm_btree_remove() local
527 root, keys[level], (unsigned *)&index); dm_btree_remove()
533 root = value64(n, index); dm_btree_remove()
537 BUG_ON(index < 0 || index >= le32_to_cpu(n->header.nr_entries)); dm_btree_remove()
541 value_ptr(n, index)); dm_btree_remove()
543 delete_at(n, index); dm_btree_remove()
557 uint64_t key, int *index) remove_nearest()
559 int i = *index, r; remove_nearest()
581 *index = lower_bound(n, key); remove_nearest()
591 *index = lower_bound(n, key); remove_nearest()
613 int index = 0, r = 0; remove_one() local
623 root, keys[level], (unsigned *) &index); remove_one()
628 root = value64(n, index); remove_one()
632 root, keys[last_level], &index); remove_one()
638 if (index < 0) remove_one()
639 index = 0; remove_one()
641 if (index >= le32_to_cpu(n->header.nr_entries)) { remove_one()
646 k = le64_to_cpu(n->keys[index]); remove_one()
650 value_ptr(n, index)); remove_one()
652 delete_at(n, index); remove_one()
142 init_child(struct dm_btree_info *info, struct dm_btree_value_type *vt, struct btree_node *parent, unsigned index, struct child *result) init_child() argument
463 remove_raw(struct shadow_spine *s, struct dm_btree_info *info, struct dm_btree_value_type *vt, dm_block_t root, uint64_t key, unsigned *index) remove_raw() argument
555 remove_nearest(struct shadow_spine *s, struct dm_btree_info *info, struct dm_btree_value_type *vt, dm_block_t root, uint64_t key, int *index) remove_nearest() argument
H A Ddm-space-map-metadata.h17 * We have one block of index, which can hold 255 index entries. Each
18 * index entry contains allocation info about ~16k metadata blocks.
H A Ddm-bitset.c105 uint32_t index, dm_block_t *new_root) get_array_entry()
108 unsigned array_index = index / BITS_PER_ARRAY_ENTRY; get_array_entry()
123 uint32_t index, dm_block_t *new_root) dm_bitset_set_bit()
126 unsigned b = index % BITS_PER_ARRAY_ENTRY; dm_bitset_set_bit()
128 r = get_array_entry(info, root, index, new_root); dm_bitset_set_bit()
140 uint32_t index, dm_block_t *new_root) dm_bitset_clear_bit()
143 unsigned b = index % BITS_PER_ARRAY_ENTRY; dm_bitset_clear_bit()
145 r = get_array_entry(info, root, index, new_root); dm_bitset_clear_bit()
157 uint32_t index, dm_block_t *new_root, bool *result) dm_bitset_test_bit()
160 unsigned b = index % BITS_PER_ARRAY_ENTRY; dm_bitset_test_bit()
162 r = get_array_entry(info, root, index, new_root); dm_bitset_test_bit()
104 get_array_entry(struct dm_disk_bitset *info, dm_block_t root, uint32_t index, dm_block_t *new_root) get_array_entry() argument
122 dm_bitset_set_bit(struct dm_disk_bitset *info, dm_block_t root, uint32_t index, dm_block_t *new_root) dm_bitset_set_bit() argument
139 dm_bitset_clear_bit(struct dm_disk_bitset *info, dm_block_t root, uint32_t index, dm_block_t *new_root) dm_bitset_clear_bit() argument
156 dm_bitset_test_bit(struct dm_disk_bitset *info, dm_block_t root, uint32_t index, dm_block_t *new_root, bool *result) dm_bitset_test_bit() argument
/linux-4.4.14/drivers/clk/
H A Dclk-conf.c20 int index, rc, num_parents; __set_clk_parents() local
29 for (index = 0; index < num_parents; index++) { __set_clk_parents()
31 "#clock-cells", index, &clkspec); __set_clk_parents()
44 index, node->full_name); __set_clk_parents()
49 "#clock-cells", index, &clkspec); __set_clk_parents()
59 index, node->full_name); __set_clk_parents()
82 int rc, index = 0; __set_clk_rates() local
89 "#clock-cells", index, &clkspec); __set_clk_rates()
103 index, node->full_name); __set_clk_rates()
114 index++; __set_clk_rates()
/linux-4.4.14/arch/powerpc/sysdev/
H A Dmmio_nvram.c37 static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index) mmio_nvram_read() argument
41 if (*index >= mmio_nvram_len) mmio_nvram_read()
43 if (*index + count > mmio_nvram_len) mmio_nvram_read()
44 count = mmio_nvram_len - *index; mmio_nvram_read()
48 memcpy_fromio(buf, mmio_nvram_start + *index, count); mmio_nvram_read()
52 *index += count; mmio_nvram_read()
73 static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) mmio_nvram_write() argument
77 if (*index >= mmio_nvram_len) mmio_nvram_write()
79 if (*index + count > mmio_nvram_len) mmio_nvram_write()
80 count = mmio_nvram_len - *index; mmio_nvram_write()
84 memcpy_toio(mmio_nvram_start + *index, buf, count); mmio_nvram_write()
88 *index += count; mmio_nvram_write()
/linux-4.4.14/drivers/net/ethernet/mellanox/mlxsw/
H A Ditem.h58 __mlxsw_item_offset(struct mlxsw_item *item, unsigned short index, __mlxsw_item_offset() argument
61 BUG_ON(index && !item->step); __mlxsw_item_offset()
71 return ((item->offset + item->step * index + item->in_step_offset) / __mlxsw_item_offset()
76 unsigned short index) __mlxsw_item_get16()
78 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u16)); __mlxsw_item_get16()
91 unsigned short index, u16 val) __mlxsw_item_set16()
93 unsigned int offset = __mlxsw_item_offset(item, index, __mlxsw_item_set16()
109 unsigned short index) __mlxsw_item_get32()
111 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u32)); __mlxsw_item_get32()
124 unsigned short index, u32 val) __mlxsw_item_set32()
126 unsigned int offset = __mlxsw_item_offset(item, index, __mlxsw_item_set32()
142 unsigned short index) __mlxsw_item_get64()
144 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u64)); __mlxsw_item_get64()
157 unsigned short index, u64 val) __mlxsw_item_set64()
159 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(u64)); __mlxsw_item_set64()
175 unsigned short index) __mlxsw_item_memcpy_from()
177 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(char)); __mlxsw_item_memcpy_from()
184 unsigned short index) __mlxsw_item_memcpy_to()
186 unsigned int offset = __mlxsw_item_offset(item, index, sizeof(char)); __mlxsw_item_memcpy_to()
192 __mlxsw_item_bit_array_offset(struct mlxsw_item *item, u16 index, u8 *shift) __mlxsw_item_bit_array_offset() argument
198 BUG_ON(index && !item->element_size); __mlxsw_item_bit_array_offset()
207 be_index = max_index - index; __mlxsw_item_bit_array_offset()
209 in_byte_index = index % (BITS_PER_BYTE / item->element_size); __mlxsw_item_bit_array_offset()
216 u16 index) __mlxsw_item_bit_array_get()
219 u16 offset = __mlxsw_item_bit_array_offset(item, index, &shift); __mlxsw_item_bit_array_get()
228 u16 index, u8 val) __mlxsw_item_bit_array_set()
231 u16 offset = __mlxsw_item_bit_array_offset(item, index, &shift); __mlxsw_item_bit_array_set()
278 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, unsigned short index) \
281 index); \
284 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
288 index, val); \
319 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, unsigned short index) \
322 index); \
325 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
329 index, val); \
360 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, unsigned short index) \
363 index); \
366 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
370 index, val); \
403 unsigned short index, \
407 &__ITEM_NAME(_type, _cname, _iname), index); \
411 unsigned short index, \
415 &__ITEM_NAME(_type, _cname, _iname), index); \
427 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, u16 index) \
431 index); \
434 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 index, u8 val) \
438 index, val); \
75 __mlxsw_item_get16(char *buf, struct mlxsw_item *item, unsigned short index) __mlxsw_item_get16() argument
90 __mlxsw_item_set16(char *buf, struct mlxsw_item *item, unsigned short index, u16 val) __mlxsw_item_set16() argument
108 __mlxsw_item_get32(char *buf, struct mlxsw_item *item, unsigned short index) __mlxsw_item_get32() argument
123 __mlxsw_item_set32(char *buf, struct mlxsw_item *item, unsigned short index, u32 val) __mlxsw_item_set32() argument
141 __mlxsw_item_get64(char *buf, struct mlxsw_item *item, unsigned short index) __mlxsw_item_get64() argument
156 __mlxsw_item_set64(char *buf, struct mlxsw_item *item, unsigned short index, u64 val) __mlxsw_item_set64() argument
173 __mlxsw_item_memcpy_from(char *buf, char *dst, struct mlxsw_item *item, unsigned short index) __mlxsw_item_memcpy_from() argument
182 __mlxsw_item_memcpy_to(char *buf, const char *src, struct mlxsw_item *item, unsigned short index) __mlxsw_item_memcpy_to() argument
215 __mlxsw_item_bit_array_get(char *buf, struct mlxsw_item *item, u16 index) __mlxsw_item_bit_array_get() argument
227 __mlxsw_item_bit_array_set(char *buf, struct mlxsw_item *item, u16 index, u8 val) __mlxsw_item_bit_array_set() argument
/linux-4.4.14/include/rdma/
H A Dib_cache.h44 * @index: The index into the cached GID table to query.
45 * @gid: The GID value found at the specified index.
46 * @attr: The GID attribute found at the specified index (only in RoCE).
54 int index,
59 * ib_find_cached_gid - Returns the port number and GID table index where
65 * @index: The index into the cached GID table where the GID was found. This
75 u16 *index);
78 * ib_find_cached_gid_by_port - Returns the GID table index where a specified
85 * @index: The index into the cached GID table where the GID was found. This
95 u16 *index);
103 void *context, u16 *index);
108 * @index: The index into the cached PKey table to query.
109 * @pkey: The PKey value found at the specified index.
116 int index,
120 * ib_find_cached_pkey - Returns the PKey table index where a specified
125 * @index: The index into the cached PKey table where the PKey was found.
133 u16 *index);
136 * ib_find_exact_cached_pkey - Returns the PKey table index where a specified
141 * @index: The index into the cached PKey table where the PKey was found.
149 u16 *index);
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/pm/
H A Dnv40.h12 int index, struct nvkm_pm **);
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/
H A Dpriv.h11 int index, struct nvkm_fuse **);
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/
H A Dpriv.h14 int nvkm_mxm_new_(struct nvkm_device *, int index, struct nvkm_mxm **);
/linux-4.4.14/include/video/
H A Dof_videomode.h16 int index);
H A Dvideomode.h50 * @index: index into the list of display timings in devicetree
56 struct videomode *vm, unsigned int index);
/linux-4.4.14/kernel/printk/
H A Dconsole_cmdline.h7 int index; /* Minor dev. to use */ member in struct:console_cmdline
/linux-4.4.14/include/linux/usb/
H A Datmel_usba_udc.h9 int index; member in struct:usba_ep_data
/linux-4.4.14/arch/mips/include/asm/fw/
H A Dfw.h21 #define fw_argv(index) ((char *)(long)_fw_argv[(index)])
22 #define fw_envp(index) ((char *)(long)_fw_envp[(index)])
/linux-4.4.14/arch/mips/include/asm/mach-bcm63xx/
H A Dbcm63xx_dev_usb_usbd.h11 /* 0-based port index, for chips with >1 USB PHY */
/linux-4.4.14/arch/mips/kernel/
H A Drtlx.c89 int rtlx_open(int index, int can_sleep) rtlx_open() argument
96 if (index >= RTLX_CHANNELS) { rtlx_open()
97 pr_debug("rtlx_open index out of range\n"); rtlx_open()
101 if (atomic_inc_return(&channel_wqs[index].in_open) > 1) { rtlx_open()
102 pr_debug("rtlx_open channel %d already opened\n", index); rtlx_open()
112 channel_wqs[index].lx_queue, rtlx_open()
130 &channel_wqs[index].lx_queue, rtlx_open()
142 finish_wait(&channel_wqs[index].lx_queue, rtlx_open()
163 chan = &rtlx->channel[index]; rtlx_open()
173 atomic_dec(&channel_wqs[index].in_open); rtlx_open()
180 int rtlx_release(int index) rtlx_release() argument
186 rtlx->channel[index].lx_state = RTLX_STATE_UNUSED; rtlx_release()
190 unsigned int rtlx_read_poll(int index, int can_sleep) rtlx_read_poll() argument
197 chan = &rtlx->channel[index]; rtlx_read_poll()
203 channel_wqs[index].lx_queue, rtlx_read_poll()
232 unsigned int rtlx_write_poll(int index) rtlx_write_poll() argument
234 struct rtlx_channel *chan = &rtlx->channel[index]; rtlx_write_poll()
240 ssize_t rtlx_read(int index, void __user *buff, size_t count) rtlx_read() argument
249 lx = &rtlx->channel[index]; rtlx_read()
251 mutex_lock(&channel_wqs[index].mutex); rtlx_read()
277 mutex_unlock(&channel_wqs[index].mutex); rtlx_read()
282 ssize_t rtlx_write(int index, const void __user *buffer, size_t count) rtlx_write() argument
292 rt = &rtlx->channel[index]; rtlx_write()
294 mutex_lock(&channel_wqs[index].mutex); rtlx_write()
319 mutex_unlock(&channel_wqs[index].mutex); rtlx_write()
/linux-4.4.14/tools/perf/tests/
H A Dllvm.h17 enum test_llvm__testcase index, bool force);
/linux-4.4.14/arch/powerpc/mm/
H A Dmmu_context_hash64.c35 int index; __init_new_context() local
43 err = ida_get_new_above(&mmu_context_ida, 1, &index); __init_new_context()
51 if (index > MAX_USER_CONTEXT) { __init_new_context()
53 ida_remove(&mmu_context_ida, index); __init_new_context()
58 return index; __init_new_context()
64 int index; init_new_context() local
66 index = __init_new_context(); init_new_context()
67 if (index < 0) init_new_context()
68 return index; init_new_context()
77 mm->context.id = index; init_new_context()
81 __destroy_context(index); init_new_context()
H A Dicswx_pid.c32 int index; new_cop_pid() local
40 err = ida_get_new_above(ida, min_id, &index); new_cop_pid()
48 if (index > max_id) { new_cop_pid()
50 ida_remove(ida, index); new_cop_pid()
55 return index; new_cop_pid()
H A Dfsl_booke_mmu.c108 static void settlbcam(int index, unsigned long virt, phys_addr_t phys, settlbcam() argument
120 TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index) | MAS0_NV(index+1); settlbcam()
121 TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid); settlbcam()
122 TLBCAM[index].MAS2 = virt & PAGE_MASK; settlbcam()
124 TLBCAM[index].MAS2 |= (flags & _PAGE_WRITETHRU) ? MAS2_W : 0; settlbcam()
125 TLBCAM[index].MAS2 |= (flags & _PAGE_NO_CACHE) ? MAS2_I : 0; settlbcam()
126 TLBCAM[index].MAS2 |= (flags & _PAGE_COHERENT) ? MAS2_M : 0; settlbcam()
127 TLBCAM[index].MAS2 |= (flags & _PAGE_GUARDED) ? MAS2_G : 0; settlbcam()
128 TLBCAM[index].MAS2 |= (flags & _PAGE_ENDIAN) ? MAS2_E : 0; settlbcam()
130 TLBCAM[index].MAS3 = (phys & MAS3_RPN) | MAS3_SX | MAS3_SR; settlbcam()
131 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0); settlbcam()
133 TLBCAM[index].MAS7 = (u64)phys >> 32; settlbcam()
137 TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR; settlbcam()
138 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0); settlbcam()
141 tlbcam_addrs[index].start = virt; settlbcam()
142 tlbcam_addrs[index].limit = virt + size - 1; settlbcam()
143 tlbcam_addrs[index].phys = phys; settlbcam()
/linux-4.4.14/drivers/media/platform/exynos4-is/
H A Dfimc-is-param.c221 unsigned int index = is->config_index; __is_set_frame_size() local
226 isp = &is->config[index].isp; __is_set_frame_size()
227 drc = &is->config[index].drc; __is_set_frame_size()
228 fd = &is->config[index].fd; __is_set_frame_size()
245 &is->config[index].p_region_index[0])) __is_set_frame_size()
268 unsigned int index = is->config_index; __is_set_sensor() local
272 sensor = &is->config[index].sensor; __is_set_sensor()
273 isp = &is->config[index].isp; __is_set_sensor()
313 unsigned int index = is->config_index; __is_set_isp_flash() local
314 struct isp_param *isp = &is->config[index].isp; __is_set_isp_flash()
325 unsigned int index = is->config_index; __is_set_isp_awb() local
328 isp = &is->config[index].isp; __is_set_isp_awb()
339 unsigned int index = is->config_index; __is_set_isp_effect() local
342 isp = &is->config[index].isp; __is_set_isp_effect()
352 unsigned int index = is->config_index; __is_set_isp_iso() local
355 isp = &is->config[index].isp; __is_set_isp_iso()
366 unsigned int index = is->config_index; __is_set_isp_adjust() local
370 p_index = &is->config[index].p_region_index[0]; __is_set_isp_adjust()
371 isp = &is->config[index].isp; __is_set_isp_adjust()
413 unsigned int index = is->config_index; __is_set_isp_metering() local
417 p_index = &is->config[index].p_region_index[0]; __is_set_isp_metering()
418 isp = &is->config[index].isp; __is_set_isp_metering()
448 unsigned int index = is->config_index; __is_set_isp_afc() local
451 isp = &is->config[index].isp; __is_set_isp_afc()
462 unsigned int index = is->config_index; __is_set_drc_control() local
465 drc = &is->config[index].drc; __is_set_drc_control()
474 unsigned int index = is->config_index; __is_set_fd_control() local
478 p_index = &is->config[index].p_region_index[1]; __is_set_fd_control()
479 fd = &is->config[index].fd; __is_set_fd_control()
489 unsigned int index = is->config_index; __is_set_fd_config_maxface() local
493 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_maxface()
494 fd = &is->config[index].fd; __is_set_fd_config_maxface()
509 unsigned int index = is->config_index; __is_set_fd_config_rollangle() local
513 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_rollangle()
514 fd = &is->config[index].fd; __is_set_fd_config_rollangle()
529 unsigned int index = is->config_index; __is_set_fd_config_yawangle() local
533 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_yawangle()
534 fd = &is->config[index].fd; __is_set_fd_config_yawangle()
549 unsigned int index = is->config_index; __is_set_fd_config_smilemode() local
553 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_smilemode()
554 fd = &is->config[index].fd; __is_set_fd_config_smilemode()
569 unsigned int index = is->config_index; __is_set_fd_config_blinkmode() local
573 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_blinkmode()
574 fd = &is->config[index].fd; __is_set_fd_config_blinkmode()
589 unsigned int index = is->config_index; __is_set_fd_config_eyedetect() local
593 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_eyedetect()
594 fd = &is->config[index].fd; __is_set_fd_config_eyedetect()
609 unsigned int index = is->config_index; __is_set_fd_config_mouthdetect() local
613 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_mouthdetect()
614 fd = &is->config[index].fd; __is_set_fd_config_mouthdetect()
629 unsigned int index = is->config_index; __is_set_fd_config_orientation() local
633 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_orientation()
634 fd = &is->config[index].fd; __is_set_fd_config_orientation()
649 unsigned int index = is->config_index; __is_set_fd_config_orientation_val() local
653 p_index = &is->config[index].p_region_index[1]; __is_set_fd_config_orientation_val()
654 fd = &is->config[index].fd; __is_set_fd_config_orientation_val()
674 unsigned int index; fimc_is_set_initial_params() local
676 index = is->config_index; fimc_is_set_initial_params()
677 global = &is->config[index].global; fimc_is_set_initial_params()
678 isp = &is->config[index].isp; fimc_is_set_initial_params()
679 drc = &is->config[index].drc; fimc_is_set_initial_params()
680 fd = &is->config[index].fd; fimc_is_set_initial_params()
681 p_index = &is->config[index].p_region_index[0]; fimc_is_set_initial_params()
/linux-4.4.14/drivers/video/fbdev/nvidia/
H A Dnv_proto.h8 void NVWriteCrtc(struct nvidia_par *par, u8 index, u8 value);
9 u8 NVReadCrtc(struct nvidia_par *par, u8 index);
10 void NVWriteGr(struct nvidia_par *par, u8 index, u8 value);
11 u8 NVReadGr(struct nvidia_par *par, u8 index);
12 void NVWriteSeq(struct nvidia_par *par, u8 index, u8 value);
13 u8 NVReadSeq(struct nvidia_par *par, u8 index);
14 void NVWriteAttr(struct nvidia_par *par, u8 index, u8 value);
15 u8 NVReadAttr(struct nvidia_par *par, u8 index);
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
H A Di2c.h23 u16 dcb_i2c_entry(struct nvkm_bios *, u8 index, u8 *ver, u8 *len);
24 int dcb_i2c_parse(struct nvkm_bios *, u8 index, struct dcb_i2c_entry *);
H A Ddcb.h15 int index; /* may not be raw dcb index if merging has happened */ member in struct:dcb_output
64 (struct nvkm_bios *, void *, int index, u16 entry));
/linux-4.4.14/arch/mips/sgi-ip27/
H A Dip27-klconfig.c19 int index, j; find_component() local
22 index = 0; find_component()
27 index = j; find_component()
28 if (index == KLCF_NUM_COMPS(brd)) { find_component()
32 index++; /* next component */ find_component()
35 for (; index < KLCF_NUM_COMPS(brd); index++) { find_component()
36 kli = KLCF_COMP(brd, index); find_component()
/linux-4.4.14/arch/arm/mach-tegra/
H A Dcpuidle-tegra30.c39 int index);
68 int index) tegra30_cpu_cluster_power_down()
90 int index) tegra30_cpu_core_power_down()
105 int index) tegra30_cpu_core_power_down()
113 int index) tegra30_idle_lp2()
126 index); tegra30_idle_lp2()
130 entered_lp2 = tegra30_cpu_core_power_down(dev, drv, index); tegra30_idle_lp2()
140 return (entered_lp2) ? index : 0; tegra30_idle_lp2()
66 tegra30_cpu_cluster_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_cpu_cluster_power_down() argument
88 tegra30_cpu_core_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_cpu_core_power_down() argument
103 tegra30_cpu_core_power_down(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_cpu_core_power_down() argument
111 tegra30_idle_lp2(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) tegra30_idle_lp2() argument
/linux-4.4.14/drivers/vfio/platform/
H A Dvfio_platform_irq.c50 unsigned index, unsigned start, vfio_platform_set_irq_mask()
57 if (!(vdev->irqs[index].flags & VFIO_IRQ_INFO_MASKABLE)) vfio_platform_set_irq_mask()
64 return vfio_virqfd_enable((void *) &vdev->irqs[index], vfio_platform_set_irq_mask()
67 &vdev->irqs[index].mask, fd); vfio_platform_set_irq_mask()
69 vfio_virqfd_disable(&vdev->irqs[index].mask); vfio_platform_set_irq_mask()
74 vfio_platform_mask(&vdev->irqs[index]); vfio_platform_set_irq_mask()
80 vfio_platform_mask(&vdev->irqs[index]); vfio_platform_set_irq_mask()
110 unsigned index, unsigned start, vfio_platform_set_irq_unmask()
117 if (!(vdev->irqs[index].flags & VFIO_IRQ_INFO_MASKABLE)) vfio_platform_set_irq_unmask()
124 return vfio_virqfd_enable((void *) &vdev->irqs[index], vfio_platform_set_irq_unmask()
127 &vdev->irqs[index].unmask, vfio_platform_set_irq_unmask()
130 vfio_virqfd_disable(&vdev->irqs[index].unmask); vfio_platform_set_irq_unmask()
135 vfio_platform_unmask(&vdev->irqs[index]); vfio_platform_set_irq_unmask()
141 vfio_platform_unmask(&vdev->irqs[index]); vfio_platform_set_irq_unmask()
180 static int vfio_set_trigger(struct vfio_platform_device *vdev, int index, vfio_set_trigger() argument
183 struct vfio_platform_irq *irq = &vdev->irqs[index]; vfio_set_trigger()
227 unsigned index, unsigned start, vfio_platform_set_irq_trigger()
231 struct vfio_platform_irq *irq = &vdev->irqs[index]; vfio_platform_set_irq_trigger()
234 if (vdev->irqs[index].flags & VFIO_IRQ_INFO_AUTOMASKED) vfio_platform_set_irq_trigger()
240 return vfio_set_trigger(vdev, index, -1, handler); vfio_platform_set_irq_trigger()
248 return vfio_set_trigger(vdev, index, fd, handler); vfio_platform_set_irq_trigger()
265 uint32_t flags, unsigned index, unsigned start, vfio_platform_set_irqs_ioctl()
268 int (*func)(struct vfio_platform_device *vdev, unsigned index, vfio_platform_set_irqs_ioctl()
287 return func(vdev, index, start, count, flags, data); vfio_platform_set_irqs_ioctl()
49 vfio_platform_set_irq_mask(struct vfio_platform_device *vdev, unsigned index, unsigned start, unsigned count, uint32_t flags, void *data) vfio_platform_set_irq_mask() argument
109 vfio_platform_set_irq_unmask(struct vfio_platform_device *vdev, unsigned index, unsigned start, unsigned count, uint32_t flags, void *data) vfio_platform_set_irq_unmask() argument
226 vfio_platform_set_irq_trigger(struct vfio_platform_device *vdev, unsigned index, unsigned start, unsigned count, uint32_t flags, void *data) vfio_platform_set_irq_trigger() argument
264 vfio_platform_set_irqs_ioctl(struct vfio_platform_device *vdev, uint32_t flags, unsigned index, unsigned start, unsigned count, void *data) vfio_platform_set_irqs_ioctl() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/core/
H A Dclient.c52 nvkm_client_notify_put(struct nvkm_client *client, int index) nvkm_client_notify_put() argument
54 if (index < ARRAY_SIZE(client->notify)) { nvkm_client_notify_put()
55 if (client->notify[index]) { nvkm_client_notify_put()
56 nvkm_notify_put(&client->notify[index]->n); nvkm_client_notify_put()
64 nvkm_client_notify_get(struct nvkm_client *client, int index) nvkm_client_notify_get() argument
66 if (index < ARRAY_SIZE(client->notify)) { nvkm_client_notify_get()
67 if (client->notify[index]) { nvkm_client_notify_get()
68 nvkm_notify_get(&client->notify[index]->n); nvkm_client_notify_get()
76 nvkm_client_notify_del(struct nvkm_client *client, int index) nvkm_client_notify_del() argument
78 if (index < ARRAY_SIZE(client->notify)) { nvkm_client_notify_del()
79 if (client->notify[index]) { nvkm_client_notify_del()
80 nvkm_notify_fini(&client->notify[index]->n); nvkm_client_notify_del()
81 kfree(client->notify[index]); nvkm_client_notify_del()
82 client->notify[index] = NULL; nvkm_client_notify_del()
98 u8 index, reply; nvkm_client_notify_new() local
101 for (index = 0; index < ARRAY_SIZE(client->notify); index++) { nvkm_client_notify_new()
102 if (!client->notify[index]) nvkm_client_notify_new()
106 if (index == ARRAY_SIZE(client->notify)) nvkm_client_notify_new()
130 client->notify[index] = notify; nvkm_client_notify_new()
132 return index; nvkm_client_notify_new()
186 nvkm_client_child_get(struct nvkm_object *object, int index, nvkm_client_child_get() argument
191 switch (index) { nvkm_client_child_get()
H A Devent.c26 nvkm_event_put(struct nvkm_event *event, u32 types, int index) nvkm_event_put() argument
31 if (--event->refs[index * event->types_nr + type] == 0) { nvkm_event_put()
33 event->func->fini(event, 1 << type, index); nvkm_event_put()
39 nvkm_event_get(struct nvkm_event *event, u32 types, int index) nvkm_event_get() argument
44 if (++event->refs[index * event->types_nr + type] == 1) { nvkm_event_get()
46 event->func->init(event, 1 << type, index); nvkm_event_get()
52 nvkm_event_send(struct nvkm_event *event, u32 types, int index, nvkm_event_send() argument
58 if (!event->refs || WARN_ON(index >= event->index_nr)) nvkm_event_send()
63 if (notify->index == index && (notify->types & types)) { nvkm_event_send()
/linux-4.4.14/arch/sparc/prom/
H A Dmemory.c19 int index; prom_meminit_v0() local
21 index = 0; prom_meminit_v0()
23 sp_banks[index].base_addr = (unsigned long) p->start_adr; prom_meminit_v0()
24 sp_banks[index].num_bytes = p->num_bytes; prom_meminit_v0()
25 index++; prom_meminit_v0()
28 return index; prom_meminit_v0()
/linux-4.4.14/fs/xfs/libxfs/
H A Dxfs_alloc_btree.h41 #define XFS_ALLOC_REC_ADDR(mp, block, index) \
45 (((index) - 1) * sizeof(xfs_alloc_rec_t))))
47 #define XFS_ALLOC_KEY_ADDR(mp, block, index) \
51 ((index) - 1) * sizeof(xfs_alloc_key_t)))
53 #define XFS_ALLOC_PTR_ADDR(mp, block, index, maxrecs) \
58 ((index) - 1) * sizeof(xfs_alloc_ptr_t)))
H A Dxfs_ialloc_btree.h41 #define XFS_INOBT_REC_ADDR(mp, block, index) \
45 (((index) - 1) * sizeof(xfs_inobt_rec_t))))
47 #define XFS_INOBT_KEY_ADDR(mp, block, index) \
51 ((index) - 1) * sizeof(xfs_inobt_key_t)))
53 #define XFS_INOBT_PTR_ADDR(mp, block, index, maxrecs) \
58 ((index) - 1) * sizeof(xfs_inobt_ptr_t)))
H A Dxfs_bmap_btree.h42 #define XFS_BMBT_REC_ADDR(mp, block, index) \
46 ((index) - 1) * sizeof(xfs_bmbt_rec_t)))
48 #define XFS_BMBT_KEY_ADDR(mp, block, index) \
52 ((index) - 1) * sizeof(xfs_bmbt_key_t)))
54 #define XFS_BMBT_PTR_ADDR(mp, block, index, maxrecs) \
59 ((index) - 1) * sizeof(xfs_bmbt_ptr_t)))
61 #define XFS_BMDR_REC_ADDR(block, index) \
65 ((index) - 1) * sizeof(xfs_bmdr_rec_t)))
67 #define XFS_BMDR_KEY_ADDR(block, index) \
71 ((index) - 1) * sizeof(xfs_bmdr_key_t)))
73 #define XFS_BMDR_PTR_ADDR(block, index, maxrecs) \
78 ((index) - 1) * sizeof(xfs_bmdr_ptr_t)))
/linux-4.4.14/arch/mips/include/asm/
H A Drtlx.h33 int rtlx_open(int index, int can_sleep);
34 int rtlx_release(int index);
35 ssize_t rtlx_read(int index, void __user *buff, size_t count);
36 ssize_t rtlx_write(int index, const void __user *buffer, size_t count);
37 unsigned int rtlx_read_poll(int index, int can_sleep);
38 unsigned int rtlx_write_poll(int index);
H A Dvpe.h86 int index; member in struct:tc
111 int vpe_notify(int index, struct vpe_notifications *notify);
113 void *vpe_get_shared(int index);
114 char *vpe_getcwd(int index);
117 struct tc *get_tc(int index);
119 struct tc *alloc_tc(int index);
/linux-4.4.14/drivers/misc/altera-stapl/
H A Daltera.c262 u32 index; altera_execute() local
936 index = 7 + 1; altera_execute()
937 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
938 long_tmp = stack[stack_ptr - index]; altera_execute()
939 stack[stack_ptr - index] = stack[stack_ptr - 1]; altera_execute()
951 index = 6 + 1; altera_execute()
952 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
953 long_tmp = stack[stack_ptr - index]; altera_execute()
954 stack[stack_ptr - index] = stack[stack_ptr - 1]; altera_execute()
959 index = 8 + 1; altera_execute()
960 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
961 stack[stack_ptr] = stack[stack_ptr - index]; altera_execute()
966 index = 2 + 1; altera_execute()
967 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
968 long_tmp = stack[stack_ptr - index]; altera_execute()
969 stack[stack_ptr - index] = stack[stack_ptr - 1]; altera_execute()
981 index = 6 + 1; altera_execute()
982 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
983 stack[stack_ptr] = stack[stack_ptr - index]; altera_execute()
988 index = 6 + 1; altera_execute()
989 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
990 stack[stack_ptr] = stack[stack_ptr - index]; altera_execute()
1091 index = (args[0]) + 1; altera_execute()
1092 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
1093 long_tmp = stack[stack_ptr - index]; altera_execute()
1094 stack[stack_ptr - index] = stack[stack_ptr - 1]; altera_execute()
1103 index = (args[0]) + 1; altera_execute()
1104 if (altera_check_stack(stack_ptr, index, &status)) { altera_execute()
1105 stack[stack_ptr] = stack[stack_ptr - index]; altera_execute()
1123 * ...stack 0 is array index altera_execute()
1173 /* pop the array index */ altera_execute()
1174 index = stack[--stack_ptr]; altera_execute()
1177 longptr_tmp[index] = stack[--stack_ptr]; altera_execute()
1186 * ...stack 1 is array index altera_execute()
1258 /* pop the array index */ altera_execute()
1265 * stack 0 = array right index altera_execute()
1266 * stack 1 = array left index altera_execute()
1326 * ...stack 0 is array index altera_execute()
1336 * stack 0 = array right index altera_execute()
1337 * stack 1 = array left index altera_execute()
1395 * ...stack 0 is array index altera_execute()
1400 index = stack[--stack_ptr]; altera_execute()
1405 * stack 0 = array right index altera_execute()
1406 * stack 1 = array left index altera_execute()
1408 count = 1 + count - index; altera_execute()
1411 status = altera_set_dr_pre(&astate->js, count, index, altera_execute()
1418 * ...stack 0 is array index altera_execute()
1423 index = stack[--stack_ptr]; altera_execute()
1428 * stack 0 = array right index altera_execute()
1429 * stack 1 = array left index altera_execute()
1431 count = 1 + count - index; altera_execute()
1434 status = altera_set_dr_post(&astate->js, count, index, altera_execute()
1441 * ...stack 0 is array index altera_execute()
1446 index = stack[--stack_ptr]; altera_execute()
1451 * stack 0 = array right index altera_execute()
1452 * stack 1 = array left index altera_execute()
1454 count = 1 + count - index; altera_execute()
1457 status = altera_set_ir_pre(&astate->js, count, index, altera_execute()
1465 * ...stack 0 is array index altera_execute()
1470 index = stack[--stack_ptr]; altera_execute()
1475 * stack 0 = array right index altera_execute()
1476 * stack 1 = array left index altera_execute()
1478 count = 1 + count - index; altera_execute()
1481 status = altera_set_ir_post(&astate->js, count, index, altera_execute()
1501 * ...stack 0 is array index altera_execute()
1506 index = stack[stack_ptr - 1]; altera_execute()
1512 stack[stack_ptr - 1] = longptr_tmp[index]; altera_execute()
1516 (index * sizeof(long)); altera_execute()
1528 * ...stack 1 is array index altera_execute()
1545 /* pop the array index */ altera_execute()
1546 index = stack[stack_ptr - 1]; altera_execute()
1550 * stack 0 = array right index altera_execute()
1551 * stack 1 = array left index altera_execute()
1553 count = 1 + count - index; altera_execute()
1563 if (charptr_tmp[(i + index) >> 3] & altera_execute()
1564 (1 << ((i + index) & 7))) altera_execute()
1623 for (index = 0; index < count; ++index) altera_execute()
1624 charptr_tmp[index] = 0; altera_execute()
1634 * ...stack 1 is array right index altera_execute()
1635 * ...stack 2 is array left index altera_execute()
1700 * ...stack 1 is dest index altera_execute()
1701 * ...stack 2 is source index altera_execute()
1722 * stack 0 = source right index altera_execute()
1723 * stack 1 = source left index altera_execute()
1724 * stack 2 = destination right index altera_execute()
1725 * stack 3 = destination left index altera_execute()
1733 /* copy_index = source start index */ altera_execute()
1736 /* source start index */ altera_execute()
1744 /* destination start index */ altera_execute()
1767 index = copy_index; altera_execute()
1835 if (charptr_tmp2[index >> 3] & altera_execute()
1836 (1 << (index & 7))) altera_execute()
1843 ++index; altera_execute()
1859 * ...stack 0 is capture index altera_execute()
1860 * ...stack 1 is scan data index altera_execute()
1877 * stack 0 = capture right index altera_execute()
1878 * stack 1 = capture left index altera_execute()
1879 * stack 2 = scan right index altera_execute()
1880 * stack 3 = scan left index altera_execute()
2018 * ...stack 0 is source 1 index altera_execute()
2019 * ...stack 1 is source 2 index altera_execute()
2020 * ...stack 2 is mask index altera_execute()
2041 * stack 0 = source 1 right index altera_execute()
2042 * stack 1 = source 1 left index altera_execute()
2043 * stack 2 = source 2 right index altera_execute()
2044 * stack 3 = source 2 left index altera_execute()
2045 * stack 4 = mask right index altera_execute()
2046 * stack 5 = mask left index altera_execute()
2058 /* source 2 start index */ altera_execute()
2060 /* mask start index */ altera_execute()
2334 int index, altera_get_act_info()
2370 if (index >= action_count) altera_get_act_info()
2373 act_name_id = get_unaligned_be32(&p[action_table + (12 * index)]); altera_get_act_info()
2374 act_desc_id = get_unaligned_be32(&p[action_table + (12 * index) + 4]); altera_get_act_info()
2375 act_proc_id = get_unaligned_be32(&p[action_table + (12 * index) + 8]); altera_get_act_info()
2431 int index = 0; altera_init() local
2474 for (index = 0; index < action_count; ++index) { altera_init()
2476 index, &action_name, altera_init()
2332 altera_get_act_info(u8 *p, s32 program_size, int index, char **name, char **description, struct altera_procinfo **proc_list) altera_get_act_info() argument
/linux-4.4.14/drivers/media/usb/dvb-usb/
H A Daz6027.c302 u16 value, u16 index, u8 *b, int blen) az6027_usb_in_op()
313 index, az6027_usb_in_op()
324 deb_xfer("in: req. %02x, val: %04x, ind: %04x, buffer: ", req, value, index); az6027_usb_in_op()
334 u16 index, az6027_usb_out_op()
340 deb_xfer("out: req. %02x, val: %04x, ind: %04x, buffer: ", req, value, index); az6027_usb_out_op()
351 index, az6027_usb_out_op()
371 u16 index; az6027_streaming_ctrl() local
378 index = 0; az6027_streaming_ctrl()
381 ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); az6027_streaming_ctrl()
418 u16 index; az6027_ci_read_attribute_mem() local
433 index = 0; az6027_ci_read_attribute_mem()
436 ret = az6027_usb_in_op(d, req, value, index, b, blen); az6027_ci_read_attribute_mem()
460 u16 index; az6027_ci_write_attribute_mem() local
470 index = value; az6027_ci_write_attribute_mem()
473 ret = az6027_usb_out_op(d, req, value1, index, NULL, blen); az6027_ci_write_attribute_mem()
491 u16 index; az6027_ci_read_cam_control() local
506 index = 0; az6027_ci_read_cam_control()
509 ret = az6027_usb_in_op(d, req, value, index, b, blen); az6027_ci_read_cam_control()
537 u16 index; az6027_ci_write_cam_control() local
546 index = value; az6027_ci_write_cam_control()
549 ret = az6027_usb_out_op(d, req, value1, index, NULL, blen); az6027_ci_write_cam_control()
567 u16 index; CI_CamReady() local
577 index = 0; CI_CamReady()
580 ret = az6027_usb_in_op(d, req, value, index, b, blen); CI_CamReady()
599 u16 index; az6027_ci_slot_reset() local
606 index = 0; az6027_ci_slot_reset()
609 ret = az6027_usb_out_op(d, req, value, index, NULL, blen); az6027_ci_slot_reset()
618 index = 0; az6027_ci_slot_reset()
621 ret = az6027_usb_out_op(d, req, value, index, NULL, blen); az6027_ci_slot_reset()
655 u16 index; az6027_ci_slot_ts_enable() local
662 index = 0; az6027_ci_slot_ts_enable()
665 ret = az6027_usb_out_op(d, req, value, index, NULL, blen); az6027_ci_slot_ts_enable()
683 u16 index; az6027_ci_poll_slot_status() local
694 index = 0; az6027_ci_poll_slot_status()
697 ret = az6027_usb_in_op(d, req, value, index, b, blen); az6027_ci_poll_slot_status()
828 u16 index; az6027_frontend_poweron() local
833 index = 3; az6027_frontend_poweron()
836 ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); az6027_frontend_poweron()
847 u16 index; az6027_frontend_reset() local
853 index = 3; az6027_frontend_reset()
856 ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); az6027_frontend_reset()
862 index = 3; az6027_frontend_reset()
866 ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); az6027_frontend_reset()
874 index = 3; az6027_frontend_reset()
877 ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); az6027_frontend_reset()
890 u16 index; az6027_frontend_tsbypass() local
896 index = 0; az6027_frontend_tsbypass()
899 ret = az6027_usb_out_op(adap->dev, req, value, index, NULL, blen); az6027_frontend_tsbypass()
957 u16 index; az6027_i2c_xfer() local
979 index = 0; az6027_i2c_xfer()
982 az6027_usb_out_op(d, req, value, index, data, length); az6027_i2c_xfer()
989 index = (((msg[i].buf[0] << 8) & 0xff00) | (msg[i].buf[1] & 0x00ff)); az6027_i2c_xfer()
992 az6027_usb_in_op(d, req, value, index, data, length); az6027_i2c_xfer()
1002 index = (((msg[i].buf[0] << 8) & 0xff00) | (msg[i].buf[1] & 0x00ff)); az6027_i2c_xfer()
1008 az6027_usb_out_op(d, req, value, index, data, length); az6027_i2c_xfer()
1016 index = 0x0; az6027_i2c_xfer()
1019 az6027_usb_in_op(d, req, value, index, data, length); az6027_i2c_xfer()
1027 index = msg[i].buf[0] & 0x00FF; az6027_i2c_xfer()
1035 az6027_usb_out_op(d, req, value, index, data, length); az6027_i2c_xfer()
301 az6027_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) az6027_usb_in_op() argument
331 az6027_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) az6027_usb_out_op() argument
H A Ddvb-usb-remote.c16 unsigned int index; legacy_dvb_usb_get_keymap_index() local
20 index = ke->index; legacy_dvb_usb_get_keymap_index()
26 for (index = 0; index < keymap_size; index++) legacy_dvb_usb_get_keymap_index()
27 if (keymap[index].scancode == scancode) legacy_dvb_usb_get_keymap_index()
31 if (index >= keymap_size) { legacy_dvb_usb_get_keymap_index()
32 for (index = 0; index < keymap_size; index++) { legacy_dvb_usb_get_keymap_index()
33 if (keymap[index].keycode == KEY_RESERVED || legacy_dvb_usb_get_keymap_index()
34 keymap[index].keycode == KEY_UNKNOWN) { legacy_dvb_usb_get_keymap_index()
41 return index; legacy_dvb_usb_get_keymap_index()
50 unsigned int index; legacy_dvb_usb_getkeycode() local
52 index = legacy_dvb_usb_get_keymap_index(ke, keymap, keymap_size); legacy_dvb_usb_getkeycode()
53 if (index >= keymap_size) legacy_dvb_usb_getkeycode()
56 ke->keycode = keymap[index].keycode; legacy_dvb_usb_getkeycode()
59 ke->len = sizeof(keymap[index].scancode); legacy_dvb_usb_getkeycode()
60 memcpy(&ke->scancode, &keymap[index].scancode, ke->len); legacy_dvb_usb_getkeycode()
61 ke->index = index; legacy_dvb_usb_getkeycode()
73 unsigned int index; legacy_dvb_usb_setkeycode() local
75 index = legacy_dvb_usb_get_keymap_index(ke, keymap, keymap_size); legacy_dvb_usb_setkeycode()
83 if (index >= keymap_size) legacy_dvb_usb_setkeycode()
86 *old_keycode = keymap[index].keycode; legacy_dvb_usb_setkeycode()
92 for (index = 0; index < keymap_size; index++) { legacy_dvb_usb_setkeycode()
93 if (keymap[index].keycode == *old_keycode) { legacy_dvb_usb_setkeycode()
/linux-4.4.14/arch/powerpc/kernel/
H A Dlegacy_serial.c80 int index; add_legacy_port() local
95 /* If we have a location index, then try to use it */ add_legacy_port()
97 index = want_index; add_legacy_port()
99 index = legacy_serial_count; add_legacy_port()
101 /* if our index is still out of range, that mean that add_legacy_port()
105 if (index >= MAX_LEGACY_SERIAL_PORTS) add_legacy_port()
107 if (index >= legacy_serial_count) add_legacy_port()
108 legacy_serial_count = index + 1; add_legacy_port()
111 if (legacy_serial_infos[index].np != NULL) { add_legacy_port()
115 index, legacy_serial_count); add_legacy_port()
117 legacy_serial_ports[index]; add_legacy_port()
119 legacy_serial_infos[index]; add_legacy_port()
122 printk(KERN_DEBUG "Replacing legacy port %d\n", index); add_legacy_port()
127 memset(&legacy_serial_ports[index], 0, add_legacy_port()
130 legacy_serial_ports[index].iobase = base; add_legacy_port()
132 legacy_serial_ports[index].mapbase = base; add_legacy_port()
134 legacy_serial_ports[index].iotype = iotype; add_legacy_port()
135 legacy_serial_ports[index].uartclk = clock; add_legacy_port()
136 legacy_serial_ports[index].irq = irq; add_legacy_port()
137 legacy_serial_ports[index].flags = flags; add_legacy_port()
138 legacy_serial_ports[index].regshift = shift; add_legacy_port()
139 legacy_serial_infos[index].taddr = taddr; add_legacy_port()
140 legacy_serial_infos[index].np = of_node_get(np); add_legacy_port()
141 legacy_serial_infos[index].clock = clock; add_legacy_port()
142 legacy_serial_infos[index].speed = spd ? be32_to_cpup(spd) : 0; add_legacy_port()
143 legacy_serial_infos[index].irq_check_parent = irq_check_parent; add_legacy_port()
146 legacy_serial_ports[index].serial_in = tsi_serial_in; add_legacy_port()
147 legacy_serial_ports[index].serial_out = tsi_serial_out; add_legacy_port()
151 index, np->full_name); add_legacy_port()
155 legacy_serial_ports[index].uartclk, add_legacy_port()
156 legacy_serial_infos[index].speed); add_legacy_port()
158 return index; add_legacy_port()
207 int index = -1; add_legacy_isa_port() local
226 /* If we have a location index, then use it */ add_legacy_isa_port()
228 index = simple_strtol(typep+1, NULL, 0) - 1; add_legacy_isa_port()
244 return add_legacy_port(np, index, UPIO_PORT, be32_to_cpu(reg[1]), add_legacy_isa_port()
256 int iotype, index = -1, lindex = 0; add_legacy_pci_port() local
289 /* Try to guess an index... If we have subdevices of the pci dev, add_legacy_pci_port()
295 index = lindex = be32_to_cpup(reg); add_legacy_pci_port()
298 /* Local index means it's the Nth port in the PCI chip. Unfortunately add_legacy_pci_port()
317 return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, add_legacy_pci_port()
367 int index; find_legacy_serial_ports() local
388 index = add_legacy_soc_port(np, np); find_legacy_serial_ports()
389 if (index >= 0 && np == stdout) find_legacy_serial_ports()
390 legacy_serial_console = index; find_legacy_serial_ports()
402 index = add_legacy_isa_port(np, isa); find_legacy_serial_ports()
403 if (index >= 0 && np == stdout) find_legacy_serial_ports()
404 legacy_serial_console = index; find_legacy_serial_ports()
435 index = add_legacy_pci_port(np, pci); find_legacy_serial_ports()
436 if (index >= 0 && np == stdout) find_legacy_serial_ports()
437 legacy_serial_console = index; find_legacy_serial_ports()
456 static void __init fixup_port_irq(int index, fixup_port_irq() argument
462 DBG("fixup_port_irq(%d)\n", index); fixup_port_irq()
465 if (virq == NO_IRQ && legacy_serial_infos[index].irq_check_parent) { fixup_port_irq()
483 static void __init fixup_port_pio(int index, fixup_port_pio() argument
490 DBG("fixup_port_pio(%d)\n", index); fixup_port_pio()
501 index, port->iobase, port->iobase + offset); fixup_port_pio()
507 static void __init fixup_port_mmio(int index, fixup_port_mmio() argument
511 DBG("fixup_port_mmio(%d)\n", index); fixup_port_mmio()
H A Dptrace32.c42 /* Macros to workout the correct index for the FPR in the thread struct */
86 int index; compat_arch_ptrace() local
90 /* convert to index and check */ compat_arch_ptrace()
91 index = (unsigned long) addr >> 2; compat_arch_ptrace()
92 if ((addr & 3) || (index > PT_FPSCR32)) compat_arch_ptrace()
96 if (index < PT_FPR0) { compat_arch_ptrace()
97 ret = ptrace_get_reg(child, index, &tmp); compat_arch_ptrace()
105 * index passed in is based on this assumption. compat_arch_ptrace()
108 [FPRINDEX(index)]; compat_arch_ptrace()
123 u32 index; compat_arch_ptrace() local
131 index = (u64)addr >> 2; compat_arch_ptrace()
132 numReg = index / 2; compat_arch_ptrace()
134 if (index % 2) compat_arch_ptrace()
190 unsigned long index; compat_arch_ptrace() local
193 /* convert to index and check */ compat_arch_ptrace()
194 index = (unsigned long) addr >> 2; compat_arch_ptrace()
195 if ((addr & 3) || (index > PT_FPSCR32)) compat_arch_ptrace()
199 if (index < PT_FPR0) { compat_arch_ptrace()
200 ret = ptrace_put_reg(child, index, data); compat_arch_ptrace()
206 * index passed in is based on this assumption. compat_arch_ptrace()
209 [FPRINDEX(index)] = data; compat_arch_ptrace()
223 u32 index; compat_arch_ptrace() local
228 index = (u64)addr >> 2; compat_arch_ptrace()
229 numReg = index / 2; compat_arch_ptrace()
243 if (index % 2) compat_arch_ptrace()
254 ((u32 *)tmp)[index % 2] = data; compat_arch_ptrace()
/linux-4.4.14/arch/s390/kernel/
H A Dirq.c120 int index = *(loff_t *) v; show_interrupts() local
124 if (index == 0) { show_interrupts()
130 if (index < NR_IRQS) { show_interrupts()
131 if (index >= NR_IRQS_BASE) show_interrupts()
133 seq_printf(p, "%s: ", irqclass_main_desc[index].name); show_interrupts()
134 irq = irqclass_main_desc[index].irq; show_interrupts()
140 for (index = 0; index < NR_ARCH_IRQS; index++) { show_interrupts()
141 seq_printf(p, "%s: ", irqclass_sub_desc[index].name); show_interrupts()
142 irq = irqclass_sub_desc[index].irq; show_interrupts()
146 if (irqclass_sub_desc[index].desc) show_interrupts()
147 seq_printf(p, " %s", irqclass_sub_desc[index].desc); show_interrupts()
189 * ext_int_hash[index] is the list head for all external interrupts that hash
190 * to this index.
215 int index; register_external_irq() local
222 index = ext_hash(code); register_external_irq()
225 hlist_add_head_rcu(&p->entry, &ext_int_hash[index]); register_external_irq()
235 int index = ext_hash(code); unregister_external_irq() local
238 hlist_for_each_entry_rcu(p, &ext_int_hash[index], entry) { unregister_external_irq()
254 int index; do_ext_interrupt() local
260 index = ext_hash(ext_code.code); do_ext_interrupt()
262 hlist_for_each_entry_rcu(p, &ext_int_hash[index], entry) { do_ext_interrupt()
/linux-4.4.14/drivers/media/platform/coda/
H A Dtrace.h58 __field(int, index)
64 __entry->index = buf->vb2_buf.index;
68 TP_printk("minor = %d, index = %d, ctx = %d",
69 __entry->minor, __entry->index, __entry->ctx)
90 __field(int, index)
98 __entry->index = buf->vb2_buf.index;
104 TP_printk("minor = %d, index = %d, start = 0x%x, end = 0x%x, ctx = %d",
105 __entry->minor, __entry->index, __entry->start, __entry->end,
/linux-4.4.14/arch/cris/include/arch-v32/mach-fs/mach/hwregs/
H A Dconfig_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
H A Dstrmux_defs.h30 #define REG_RD_VECT( scope, inst, reg, index ) \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
40 (index) * STRIDE_##scope##_##reg, (val) )
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 (index) * STRIDE_##scope##_##reg )
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 (index) * STRIDE_##scope##_##reg, (val) )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 (index) * STRIDE_##scope##_##reg )
/linux-4.4.14/arch/alpha/kernel/
H A Dcore_tsunami.c180 tsunami_pchip *pchip = hose->index ? TSUNAMI_pchip1 : TSUNAMI_pchip0; tsunami_pci_tbi()
248 tsunami_init_one_pchip(tsunami_pchip *pchip, int index) tsunami_init_one_pchip()
256 if (index == 0) tsunami_init_one_pchip()
268 = (TSUNAMI_MEM(index) & 0xffffffffffL) | 0x80000000000L; tsunami_init_one_pchip()
270 = (TSUNAMI_IO(index) & 0xffffffffffL) | 0x80000000000L; tsunami_init_one_pchip()
272 hose->config_space_base = TSUNAMI_CONF(index); tsunami_init_one_pchip()
273 hose->index = index; tsunami_init_one_pchip()
275 hose->io_space->start = TSUNAMI_IO(index) - TSUNAMI_IO_BIAS; tsunami_init_one_pchip()
277 hose->io_space->name = pci_io_names[index]; tsunami_init_one_pchip()
280 hose->mem_space->start = TSUNAMI_MEM(index) - TSUNAMI_MEM_BIAS; tsunami_init_one_pchip()
282 hose->mem_space->name = pci_mem_names[index]; tsunami_init_one_pchip()
286 printk(KERN_ERR "Failed to request IO on hose %d\n", index); tsunami_init_one_pchip()
288 printk(KERN_ERR "Failed to request MEM on hose %d\n", index); tsunami_init_one_pchip()
295 saved_config[index].wsba[0] = pchip->wsba[0].csr; tsunami_init_one_pchip()
296 saved_config[index].wsm[0] = pchip->wsm[0].csr; tsunami_init_one_pchip()
297 saved_config[index].tba[0] = pchip->tba[0].csr; tsunami_init_one_pchip()
299 saved_config[index].wsba[1] = pchip->wsba[1].csr; tsunami_init_one_pchip()
300 saved_config[index].wsm[1] = pchip->wsm[1].csr; tsunami_init_one_pchip()
301 saved_config[index].tba[1] = pchip->tba[1].csr; tsunami_init_one_pchip()
303 saved_config[index].wsba[2] = pchip->wsba[2].csr; tsunami_init_one_pchip()
304 saved_config[index].wsm[2] = pchip->wsm[2].csr; tsunami_init_one_pchip()
305 saved_config[index].tba[2] = pchip->tba[2].csr; tsunami_init_one_pchip()
307 saved_config[index].wsba[3] = pchip->wsba[3].csr; tsunami_init_one_pchip()
308 saved_config[index].wsm[3] = pchip->wsm[3].csr; tsunami_init_one_pchip()
309 saved_config[index].tba[3] = pchip->tba[3].csr; tsunami_init_one_pchip()
424 tsunami_kill_one_pchip(tsunami_pchip *pchip, int index) tsunami_kill_one_pchip()
426 pchip->wsba[0].csr = saved_config[index].wsba[0]; tsunami_kill_one_pchip()
427 pchip->wsm[0].csr = saved_config[index].wsm[0]; tsunami_kill_one_pchip()
428 pchip->tba[0].csr = saved_config[index].tba[0]; tsunami_kill_one_pchip()
430 pchip->wsba[1].csr = saved_config[index].wsba[1]; tsunami_kill_one_pchip()
431 pchip->wsm[1].csr = saved_config[index].wsm[1]; tsunami_kill_one_pchip()
432 pchip->tba[1].csr = saved_config[index].tba[1]; tsunami_kill_one_pchip()
434 pchip->wsba[2].csr = saved_config[index].wsba[2]; tsunami_kill_one_pchip()
435 pchip->wsm[2].csr = saved_config[index].wsm[2]; tsunami_kill_one_pchip()
436 pchip->tba[2].csr = saved_config[index].tba[2]; tsunami_kill_one_pchip()
438 pchip->wsba[3].csr = saved_config[index].wsba[3]; tsunami_kill_one_pchip()
439 pchip->wsm[3].csr = saved_config[index].wsm[3];
440 pchip->tba[3].csr = saved_config[index].tba[3];
246 tsunami_init_one_pchip(tsunami_pchip *pchip, int index) tsunami_init_one_pchip() argument
422 tsunami_kill_one_pchip(tsunami_pchip *pchip, int index) tsunami_kill_one_pchip() argument
/linux-4.4.14/drivers/staging/lustre/lustre/libcfs/
H A Dlibcfs_lock.c85 * \a index != CFS_PERCPT_LOCK_EX
86 * hold private lock indexed by \a index
88 * \a index == CFS_PERCPT_LOCK_EX
92 cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index) cfs_percpt_lock() argument
97 LASSERT(index >= CFS_PERCPT_LOCK_EX && index < ncpt); cfs_percpt_lock()
100 index = 0; cfs_percpt_lock()
106 if (likely(index != CFS_PERCPT_LOCK_EX)) { cfs_percpt_lock()
107 spin_lock(pcl->pcl_locks[index]); cfs_percpt_lock()
126 cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index) cfs_percpt_unlock() argument
131 index = ncpt == 1 ? 0 : index; cfs_percpt_unlock()
133 if (likely(index != CFS_PERCPT_LOCK_EX)) { cfs_percpt_unlock()
134 spin_unlock(pcl->pcl_locks[index]); cfs_percpt_unlock()
/linux-4.4.14/drivers/scsi/snic/
H A Dvnic_wq.c27 unsigned int index, enum vnic_res_type res_type) vnic_wq_get_ctrl()
29 wq->ctrl = svnic_dev_get_res(vdev, res_type, index); vnic_wq_get_ctrl()
37 unsigned int index, unsigned int desc_count, unsigned int desc_size) vnic_wq_alloc_ring()
61 buf->index = i * VNIC_WQ_BUF_DFLT_BLK_ENTRIES + j; vnic_wq_alloc_bufs()
63 wq->ring.desc_size * buf->index; vnic_wq_alloc_bufs()
64 if (buf->index + 1 == count) { vnic_wq_alloc_bufs()
104 wq->index = 0; vnic_wq_devcmd2_alloc()
124 unsigned int index, unsigned int desc_count, unsigned int desc_size) svnic_wq_alloc()
128 wq->index = index; svnic_wq_alloc()
131 err = vnic_wq_get_ctrl(vdev, wq, index, RES_TYPE_WQ); svnic_wq_alloc()
133 pr_err("Failed to hook WQ[%d] resource\n", index); svnic_wq_alloc()
140 err = vnic_wq_alloc_ring(vdev, wq, index, desc_count, desc_size); svnic_wq_alloc()
208 pr_err("Failed to disable WQ[%d]\n", wq->index); svnic_wq_disable()
26 vnic_wq_get_ctrl(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index, enum vnic_res_type res_type) vnic_wq_get_ctrl() argument
36 vnic_wq_alloc_ring(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index, unsigned int desc_count, unsigned int desc_size) vnic_wq_alloc_ring() argument
123 svnic_wq_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, unsigned int index, unsigned int desc_count, unsigned int desc_size) svnic_wq_alloc() argument
H A Dvnic_intr.c32 unsigned int index) svnic_intr_alloc()
34 intr->index = index; svnic_intr_alloc()
37 intr->ctrl = svnic_dev_get_res(vdev, RES_TYPE_INTR_CTRL, index); svnic_intr_alloc()
40 index); svnic_intr_alloc()
31 svnic_intr_alloc(struct vnic_dev *vdev, struct vnic_intr *intr, unsigned int index) svnic_intr_alloc() argument
/linux-4.4.14/drivers/extcon/
H A Dextcon.c94 * Returns 0 if nothing violates. Returns the index + 1 for the first
121 /* Find the the index of extcon cable in edev->supported_cable */ find_cable_index_by_id()
266 int index; extcon_update_state() local
288 for (index = 0; index < edev->max_supported; index++) { extcon_update_state()
289 if (is_extcon_changed(old_state, edev->state, index, extcon_update_state()
291 raw_notifier_call_chain(&edev->nh[index], extcon_update_state()
360 int index; extcon_get_cable_state_() local
365 index = find_cable_index_by_id(edev, id); extcon_get_cable_state_()
366 if (index < 0) extcon_get_cable_state_()
367 return index; extcon_get_cable_state_()
369 if (edev->max_supported && edev->max_supported <= index) extcon_get_cable_state_()
372 return !!(edev->state & (1 << index)); extcon_get_cable_state_()
407 int index; extcon_set_cable_state_() local
412 index = find_cable_index_by_id(edev, id); extcon_set_cable_state_()
413 if (index < 0) extcon_set_cable_state_()
414 return index; extcon_set_cable_state_()
416 if (edev->max_supported && edev->max_supported <= index) extcon_set_cable_state_()
419 state = cable_state ? (1 << index) : 0; extcon_set_cable_state_()
420 return extcon_update_state(edev, 1 << index, state); extcon_set_cable_state_()
767 int ret, index = 0; extcon_dev_register() local
779 for (; edev->supported_cable[index] != EXTCON_NONE; index++); extcon_dev_register()
781 edev->max_supported = index; extcon_dev_register()
782 if (index > SUPPORTED_CABLE_MAX) { extcon_dev_register()
811 for (index = 0; index < edev->max_supported; index++) { extcon_dev_register()
812 cable = &edev->cables[index]; extcon_dev_register()
814 snprintf(buf, 10, "cable.%d", index); extcon_dev_register()
818 for (index--; index >= 0; index--) { extcon_dev_register()
819 cable = &edev->cables[index]; extcon_dev_register()
829 cable->cable_index = index; extcon_dev_register()
853 for (index = 0; edev->mutually_exclusive[index]; index++) extcon_dev_register()
857 (index + 1), GFP_KERNEL); extcon_dev_register()
864 index, GFP_KERNEL); extcon_dev_register()
871 for (index = 0; edev->mutually_exclusive[index]; index++) { extcon_dev_register()
872 sprintf(buf, "0x%x", edev->mutually_exclusive[index]); extcon_dev_register()
876 for (index--; index >= 0; index--) { extcon_dev_register()
877 kfree(edev->d_attrs_muex[index].attr. extcon_dev_register()
886 sysfs_attr_init(&edev->d_attrs_muex[index].attr); extcon_dev_register()
887 edev->d_attrs_muex[index].attr.name = name; extcon_dev_register()
888 edev->d_attrs_muex[index].attr.mode = 0000; extcon_dev_register()
889 edev->attrs_muex[index] = &edev->d_attrs_muex[index] extcon_dev_register()
909 for (index = 0; index < edev->max_supported; index++) extcon_dev_register()
910 edev->extcon_dev_type.groups[index] = extcon_dev_register()
911 &edev->cables[index].attr_g; extcon_dev_register()
913 edev->extcon_dev_type.groups[index] = extcon_dev_register()
938 for (index = 0; index < edev->max_supported; index++) extcon_dev_register()
939 RAW_INIT_NOTIFIER_HEAD(&edev->nh[index]); extcon_dev_register()
955 for (index = 0; edev->mutually_exclusive[index]; index++) extcon_dev_register()
956 kfree(edev->d_attrs_muex[index].attr.name); extcon_dev_register()
961 for (index = 0; index < edev->max_supported; index++) extcon_dev_register()
962 kfree(edev->cables[index].attr_g.name); extcon_dev_register()
980 int index; extcon_dev_unregister() local
998 for (index = 0; edev->mutually_exclusive[index]; extcon_dev_unregister()
999 index++) extcon_dev_unregister()
1000 kfree(edev->d_attrs_muex[index].attr.name); extcon_dev_unregister()
1005 for (index = 0; index < edev->max_supported; index++) extcon_dev_unregister()
1006 kfree(edev->cables[index].attr_g.name); extcon_dev_unregister()
1082 * @index - index into list of extcon_dev
1086 struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) extcon_get_edev_by_phandle() argument
1099 node = of_parse_phandle(dev->of_node, "extcon", index); extcon_get_edev_by_phandle()
1118 struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) extcon_get_edev_by_phandle() argument
/linux-4.4.14/drivers/acpi/acpica/
H A Ddsmthdat.c56 u32 index, struct acpi_walk_state *walk_state);
60 u32 index,
67 u32 index, struct acpi_walk_state *walk_state);
139 u32 index; acpi_ds_method_data_delete_all() local
145 for (index = 0; index < ACPI_METHOD_NUM_LOCALS; index++) { acpi_ds_method_data_delete_all()
146 if (walk_state->local_variables[index].object) { acpi_ds_method_data_delete_all()
148 index, acpi_ds_method_data_delete_all()
149 walk_state->local_variables[index]. acpi_ds_method_data_delete_all()
155 local_variables[index]); acpi_ds_method_data_delete_all()
161 for (index = 0; index < ACPI_METHOD_NUM_ARGS; index++) { acpi_ds_method_data_delete_all()
162 if (walk_state->arguments[index].object) { acpi_ds_method_data_delete_all()
164 index, acpi_ds_method_data_delete_all()
165 walk_state->arguments[index].object)); acpi_ds_method_data_delete_all()
169 acpi_ns_detach_object(&walk_state->arguments[index]); acpi_ds_method_data_delete_all()
198 u32 index = 0; acpi_ds_method_data_init_args() local
210 while ((index < ACPI_METHOD_NUM_ARGS) && acpi_ds_method_data_init_args()
211 (index < max_param_count) && params[index]) { acpi_ds_method_data_init_args()
217 status = acpi_ds_method_data_set_value(ACPI_REFCLASS_ARG, index, acpi_ds_method_data_init_args()
218 params[index], acpi_ds_method_data_init_args()
224 index++; acpi_ds_method_data_init_args()
227 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%u args passed to method\n", index)); acpi_ds_method_data_init_args()
237 * index - Which Local or Arg whose type to get
249 u32 index, acpi_ds_method_data_get_node()
261 if (index > ACPI_METHOD_MAX_LOCAL) { acpi_ds_method_data_get_node()
263 "Local index %u is invalid (max %u)", acpi_ds_method_data_get_node()
264 index, ACPI_METHOD_MAX_LOCAL)); acpi_ds_method_data_get_node()
270 *node = &walk_state->local_variables[index]; acpi_ds_method_data_get_node()
275 if (index > ACPI_METHOD_MAX_ARG) { acpi_ds_method_data_get_node()
277 "Arg index %u is invalid (max %u)", acpi_ds_method_data_get_node()
278 index, ACPI_METHOD_MAX_ARG)); acpi_ds_method_data_get_node()
284 *node = &walk_state->arguments[index]; acpi_ds_method_data_get_node()
302 * index - Which Local or Arg to get
315 u32 index, acpi_ds_method_data_set_value()
331 status = acpi_ds_method_data_get_node(type, index, walk_state, &node); acpi_ds_method_data_set_value()
356 * index - Which localVar or argument to get
369 u32 index, acpi_ds_method_data_get_value()
388 status = acpi_ds_method_data_get_node(type, index, walk_state, &node); acpi_ds_method_data_get_value()
427 index, node)); acpi_ds_method_data_get_value()
463 * index - Which localVar or argument to delete
475 u32 index, struct acpi_walk_state *walk_state) acpi_ds_method_data_delete_value()
485 status = acpi_ds_method_data_get_node(type, index, walk_state, &node); acpi_ds_method_data_delete_value()
520 * index - Which Local or Arg to set
534 u32 index, acpi_ds_store_object_to_local()
545 type, index, obj_desc)); acpi_ds_store_object_to_local()
555 status = acpi_ds_method_data_get_node(type, index, walk_state, &node); acpi_ds_store_object_to_local()
647 acpi_ds_method_data_delete_value(type, index, walk_state); acpi_ds_store_object_to_local()
656 acpi_ds_method_data_set_value(type, index, new_obj_desc, acpi_ds_store_object_to_local()
674 * index - Which Local or Arg whose type to get
685 u32 index, struct acpi_walk_state *walk_state) acpi_ds_method_data_get_type()
695 status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node); acpi_ds_method_data_get_type()
248 acpi_ds_method_data_get_node(u8 type, u32 index, struct acpi_walk_state *walk_state, struct acpi_namespace_node **node) acpi_ds_method_data_get_node() argument
314 acpi_ds_method_data_set_value(u8 type, u32 index, union acpi_operand_object *object, struct acpi_walk_state *walk_state) acpi_ds_method_data_set_value() argument
368 acpi_ds_method_data_get_value(u8 type, u32 index, struct acpi_walk_state *walk_state, union acpi_operand_object **dest_desc) acpi_ds_method_data_get_value() argument
474 acpi_ds_method_data_delete_value(u8 type, u32 index, struct acpi_walk_state *walk_state) acpi_ds_method_data_delete_value() argument
533 acpi_ds_store_object_to_local(u8 type, u32 index, union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state) acpi_ds_store_object_to_local() argument
684 acpi_ds_method_data_get_type(u16 opcode, u32 index, struct acpi_walk_state *walk_state) acpi_ds_method_data_get_type() argument
/linux-4.4.14/fs/cachefiles/
H A Dproc.c26 unsigned long index; cachefiles_histogram_show() local
37 index = (unsigned long) v - 3; cachefiles_histogram_show()
38 x = atomic_read(&cachefiles_lookup_histogram[index]); cachefiles_histogram_show()
39 y = atomic_read(&cachefiles_mkdir_histogram[index]); cachefiles_histogram_show()
40 z = atomic_read(&cachefiles_create_histogram[index]); cachefiles_histogram_show()
44 t = (index * 1000) / HZ; cachefiles_histogram_show()
46 seq_printf(m, "%4lu 0.%03u %9u %9u %9u\n", index, t, x, y, z); cachefiles_histogram_show()
/linux-4.4.14/drivers/watchdog/
H A Dcpwd.c200 * index - sub-device index, or -1 for 'all'
203 static void cpwd_toggleintr(struct cpwd *p, int index, int enable) cpwd_toggleintr() argument
207 (index == -1) ? cpwd_toggleintr()
209 (p->devs[index].intr_mask); cpwd_toggleintr()
222 static void cpwd_resetbrokentimer(struct cpwd *p, int index) cpwd_resetbrokentimer() argument
224 cpwd_toggleintr(p, index, WD_INTR_ON); cpwd_resetbrokentimer()
225 cpwd_writew(WD_BLIMIT, p->devs[index].regs + WD_LIMIT); cpwd_resetbrokentimer()
261 static void cpwd_pingtimer(struct cpwd *p, int index) cpwd_pingtimer() argument
263 if (cpwd_readb(p->devs[index].regs + WD_STATUS) & WD_S_RUNNING) cpwd_pingtimer()
264 cpwd_readw(p->devs[index].regs + WD_DCNTR); cpwd_pingtimer()
271 static void cpwd_stoptimer(struct cpwd *p, int index) cpwd_stoptimer() argument
273 if (cpwd_readb(p->devs[index].regs + WD_STATUS) & WD_S_RUNNING) { cpwd_stoptimer()
274 cpwd_toggleintr(p, index, WD_INTR_OFF); cpwd_stoptimer()
277 p->devs[index].runstatus |= WD_STAT_BSTOP; cpwd_stoptimer()
290 static void cpwd_starttimer(struct cpwd *p, int index) cpwd_starttimer() argument
293 p->devs[index].runstatus &= ~WD_STAT_BSTOP; cpwd_starttimer()
295 p->devs[index].runstatus &= ~WD_STAT_SVCD; cpwd_starttimer()
297 cpwd_writew(p->devs[index].timeout, p->devs[index].regs + WD_LIMIT); cpwd_starttimer()
298 cpwd_toggleintr(p, index, WD_INTR_ON); cpwd_starttimer()
301 static int cpwd_getstatus(struct cpwd *p, int index) cpwd_getstatus() argument
303 unsigned char stat = cpwd_readb(p->devs[index].regs + WD_STATUS); cpwd_getstatus()
304 unsigned char intr = cpwd_readb(p->devs[index].regs + PLD_IMASK); cpwd_getstatus()
315 if (intr & p->devs[index].intr_mask) { cpwd_getstatus()
330 (p->devs[index].runstatus & WD_STAT_BSTOP)) { cpwd_getstatus()
331 if (p->devs[index].runstatus & WD_STAT_SVCD) { cpwd_getstatus()
345 if (p->devs[index].runstatus & WD_STAT_SVCD) cpwd_getstatus()
414 int index = iminor(inode) - WD0_MINOR; cpwd_ioctl() local
432 cpwd_pingtimer(p, index); cpwd_ioctl()
442 cpwd_stoptimer(p, index); cpwd_ioctl()
444 cpwd_starttimer(p, index); cpwd_ioctl()
452 setopt = cpwd_getstatus(p, index); cpwd_ioctl()
458 cpwd_starttimer(p, index); cpwd_ioctl()
465 cpwd_stoptimer(p, index); cpwd_ioctl()
503 int index = iminor(inode); cpwd_write() local
506 cpwd_pingtimer(p, index); cpwd_write()
/linux-4.4.14/include/linux/fsl/bestcomm/
H A Dbestcomm.h55 unsigned short index; member in struct:bcom_task
100 /** _bcom_next_index - Get next input index.
108 return ((tsk->index + 1) == tsk->num_bd) ? 0 : tsk->index + 1; _bcom_next_index()
111 /** _bcom_next_outdex - Get next output index.
129 return tsk->index == tsk->outdex; bcom_queue_empty()
145 * index: Index of the BD to fetch
148 *bcom_get_bd(struct bcom_task *tsk, unsigned int index) bcom_get_bd() argument
152 return ((void *)tsk->bd) + (index * tsk->bd_size); bcom_get_bd()
181 bd = bcom_get_bd(tsk, tsk->index); bcom_prepare_next_buffer()
189 struct bcom_bd *bd = bcom_get_bd(tsk, tsk->index); bcom_submit_next_buffer()
191 tsk->cookie[tsk->index] = cookie; bcom_submit_next_buffer()
194 tsk->index = _bcom_next_index(tsk); bcom_submit_next_buffer()
/linux-4.4.14/arch/parisc/kernel/
H A Dftrace.c27 int index; push_return_trace() local
38 index = ++current->curr_ret_stack; push_return_trace()
40 current->ret_stack[index].ret = ret; push_return_trace()
41 current->ret_stack[index].func = func; push_return_trace()
42 current->ret_stack[index].calltime = time; push_return_trace()
43 *depth = index; push_return_trace()
51 int index; pop_return_trace() local
53 index = current->curr_ret_stack; pop_return_trace()
55 if (unlikely(index < 0)) { pop_return_trace()
64 *ret = current->ret_stack[index].ret; pop_return_trace()
65 trace->func = current->ret_stack[index].func; pop_return_trace()
66 trace->calltime = current->ret_stack[index].calltime; pop_return_trace()
68 trace->depth = index; pop_return_trace()
/linux-4.4.14/drivers/block/zram/
H A Dzram_drv.c37 /* idr index must be protected */
78 static int zram_test_flag(struct zram_meta *meta, u32 index, zram_test_flag() argument
81 return meta->table[index].value & BIT(flag); zram_test_flag()
84 static void zram_set_flag(struct zram_meta *meta, u32 index, zram_set_flag() argument
87 meta->table[index].value |= BIT(flag); zram_set_flag()
90 static void zram_clear_flag(struct zram_meta *meta, u32 index, zram_clear_flag() argument
93 meta->table[index].value &= ~BIT(flag); zram_clear_flag()
96 static size_t zram_get_obj_size(struct zram_meta *meta, u32 index) zram_get_obj_size() argument
98 return meta->table[index].value & (BIT(ZRAM_FLAG_SHIFT) - 1); zram_get_obj_size()
102 u32 index, size_t size) zram_set_obj_size()
104 unsigned long flags = meta->table[index].value >> ZRAM_FLAG_SHIFT; zram_set_obj_size()
106 meta->table[index].value = (flags << ZRAM_FLAG_SHIFT) | size; zram_set_obj_size()
138 static void update_position(u32 *index, int *offset, struct bio_vec *bvec) update_position() argument
141 (*index)++; update_position()
485 size_t index; zram_meta_free() local
488 for (index = 0; index < num_pages; index++) { zram_meta_free()
489 unsigned long handle = meta->table[index].handle; zram_meta_free()
532 * To protect concurrent access to the same index entry,
533 * caller should hold this table index entry's bit_spinlock to
534 * indicate this index entry is accessing.
536 static void zram_free_page(struct zram *zram, size_t index) zram_free_page() argument
539 unsigned long handle = meta->table[index].handle; zram_free_page()
546 if (zram_test_flag(meta, index, ZRAM_ZERO)) { zram_free_page()
547 zram_clear_flag(meta, index, ZRAM_ZERO); zram_free_page()
555 atomic64_sub(zram_get_obj_size(meta, index), zram_free_page()
559 meta->table[index].handle = 0; zram_free_page()
560 zram_set_obj_size(meta, index, 0); zram_free_page()
563 static int zram_decompress_page(struct zram *zram, char *mem, u32 index) zram_decompress_page() argument
571 bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); zram_decompress_page()
572 handle = meta->table[index].handle; zram_decompress_page()
573 size = zram_get_obj_size(meta, index); zram_decompress_page()
575 if (!handle || zram_test_flag(meta, index, ZRAM_ZERO)) { zram_decompress_page()
576 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_decompress_page()
587 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_decompress_page()
591 pr_err("Decompression failed! err=%d, page=%u\n", ret, index); zram_decompress_page()
599 u32 index, int offset) zram_bvec_read()
607 bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_read()
608 if (unlikely(!meta->table[index].handle) || zram_bvec_read()
609 zram_test_flag(meta, index, ZRAM_ZERO)) { zram_bvec_read()
610 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_read()
614 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_read()
630 ret = zram_decompress_page(zram, uncmem, index); zram_bvec_read()
648 static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, zram_bvec_write() argument
671 ret = zram_decompress_page(zram, uncmem, index); zram_bvec_write()
692 bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_write()
693 zram_free_page(zram, index); zram_bvec_write()
694 zram_set_flag(meta, index, ZRAM_ZERO); zram_bvec_write()
695 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_write()
723 index, clen); zram_bvec_write()
755 bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_write()
756 zram_free_page(zram, index); zram_bvec_write()
758 meta->table[index].handle = handle; zram_bvec_write()
759 zram_set_obj_size(meta, index, clen); zram_bvec_write()
760 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_bvec_write()
775 * @index: physical block index in PAGE_SIZE units
778 static void zram_bio_discard(struct zram *zram, u32 index, zram_bio_discard() argument
799 index++; zram_bio_discard()
803 bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); zram_bio_discard()
804 zram_free_page(zram, index); zram_bio_discard()
805 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_bio_discard()
807 index++; zram_bio_discard()
812 static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index, zram_bvec_rw() argument
823 ret = zram_bvec_read(zram, bvec, index, offset); zram_bvec_rw()
826 ret = zram_bvec_write(zram, bvec, index, offset); zram_bvec_rw()
844 u32 index; __zram_make_request() local
848 index = bio->bi_iter.bi_sector >> SECTORS_PER_PAGE_SHIFT; __zram_make_request()
853 zram_bio_discard(zram, index, offset, bio); __zram_make_request()
873 if (zram_bvec_rw(zram, &bv, index, offset, rw) < 0) bio_for_each_segment()
878 if (zram_bvec_rw(zram, &bv, index + 1, 0, rw) < 0) bio_for_each_segment()
881 if (zram_bvec_rw(zram, &bvec, index, offset, rw) < 0) bio_for_each_segment()
884 update_position(&index, &offset, &bvec); bio_for_each_segment()
923 unsigned long index) zram_slot_free_notify()
931 bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value); zram_slot_free_notify()
932 zram_free_page(zram, index); zram_slot_free_notify()
933 bit_spin_unlock(ZRAM_ACCESS, &meta->table[index].value); zram_slot_free_notify()
941 u32 index; zram_rw_page() local
955 index = sector >> SECTORS_PER_PAGE_SHIFT; zram_rw_page()
962 err = zram_bvec_rw(zram, &bv, index, offset, rw); zram_rw_page()
101 zram_set_obj_size(struct zram_meta *meta, u32 index, size_t size) zram_set_obj_size() argument
598 zram_bvec_read(struct zram *zram, struct bio_vec *bvec, u32 index, int offset) zram_bvec_read() argument
922 zram_slot_free_notify(struct block_device *bdev, unsigned long index) zram_slot_free_notify() argument
/linux-4.4.14/drivers/scsi/fnic/
H A Dvnic_wq_copy.h28 unsigned int index; member in struct:vnic_wq_copy
69 static inline void vnic_wq_copy_desc_process(struct vnic_wq_copy *wq, u16 index) vnic_wq_copy_desc_process() argument
73 if (wq->to_clean_index <= index) vnic_wq_copy_desc_process()
74 cnt = (index - wq->to_clean_index) + 1; vnic_wq_copy_desc_process()
76 cnt = wq->ring.desc_count - wq->to_clean_index + index + 1; vnic_wq_copy_desc_process()
78 wq->to_clean_index = ((index + 1) % wq->ring.desc_count); vnic_wq_copy_desc_process()
100 /* increment the to-clean index so that we start vnic_wq_copy_service()
101 * with an unprocessed index next time we enter the loop vnic_wq_copy_service()
120 unsigned int index, unsigned int desc_count, unsigned int desc_size);
H A Dvnic_intr.c33 unsigned int index) vnic_intr_alloc()
35 intr->index = index; vnic_intr_alloc()
38 intr->ctrl = vnic_dev_get_res(vdev, RES_TYPE_INTR_CTRL, index); vnic_intr_alloc()
41 index); vnic_intr_alloc()
32 vnic_intr_alloc(struct vnic_dev *vdev, struct vnic_intr *intr, unsigned int index) vnic_intr_alloc() argument
/linux-4.4.14/drivers/base/
H A Dmap.c37 unsigned index = MAJOR(dev); kobj_map() local
57 for (i = 0, p -= n; i < n; i++, p++, index++) { kobj_map()
58 struct probe **s = &domain->probes[index % 255]; kobj_map()
71 unsigned index = MAJOR(dev); kobj_unmap() local
79 for (i = 0; i < n; i++, index++) { kobj_unmap()
81 for (s = &domain->probes[index % 255]; *s; s = &(*s)->next) { kobj_unmap()
95 struct kobject *kobj_lookup(struct kobj_map *domain, dev_t dev, int *index) kobj_lookup() argument
118 *index = dev - p->dev; kobj_lookup()
124 kobj = probe(dev, index, data); kobj_lookup()
/linux-4.4.14/arch/x86/kvm/
H A Dmtrr.c286 int index; fixed_mtrr_addr_seg_to_range_index() local
289 index = mtrr_seg->range_start; fixed_mtrr_addr_seg_to_range_index()
290 index += (addr - mtrr_seg->start) >> mtrr_seg->range_shift; fixed_mtrr_addr_seg_to_range_index()
291 return index; fixed_mtrr_addr_seg_to_range_index()
294 static u64 fixed_mtrr_range_end_addr(int seg, int index) fixed_mtrr_range_end_addr() argument
297 int pos = index - mtrr_seg->range_start; fixed_mtrr_range_end_addr()
320 int index; update_mtrr() local
338 index = (msr - 0x200) / 2; update_mtrr()
339 var_mtrr_range(&mtrr_state->var_ranges[index], &start, &end); update_mtrr()
354 int index, is_mtrr_mask; set_var_mtrr_msr() local
356 index = (msr - 0x200) / 2; set_var_mtrr_msr()
357 is_mtrr_mask = msr - 0x200 - 2 * index; set_var_mtrr_msr()
358 cur = &mtrr_state->var_ranges[index]; set_var_mtrr_msr()
362 list_del(&mtrr_state->var_ranges[index].node); set_var_mtrr_msr()
384 int index; kvm_mtrr_set_msr() local
389 index = fixed_msr_to_range_index(msr); kvm_mtrr_set_msr()
390 if (index >= 0) kvm_mtrr_set_msr()
391 *(u64 *)&vcpu->arch.mtrr_state.fixed_ranges[index] = data; kvm_mtrr_set_msr()
405 int index; kvm_mtrr_get_msr() local
422 index = fixed_msr_to_range_index(msr); kvm_mtrr_get_msr()
423 if (index >= 0) kvm_mtrr_get_msr()
424 *pdata = *(u64 *)&vcpu->arch.mtrr_state.fixed_ranges[index]; kvm_mtrr_get_msr()
432 index = (msr - 0x200) / 2; kvm_mtrr_get_msr()
433 is_mtrr_mask = msr - 0x200 - 2 * index; kvm_mtrr_get_msr()
435 *pdata = vcpu->arch.mtrr_state.var_ranges[index].base; kvm_mtrr_get_msr()
437 *pdata = vcpu->arch.mtrr_state.var_ranges[index].mask; kvm_mtrr_get_msr()
467 int index; member in struct:mtrr_iter::__anon3191::__anon3192
484 int seg, index; mtrr_lookup_fixed_start() local
494 index = fixed_mtrr_addr_seg_to_range_index(iter->start, seg); mtrr_lookup_fixed_start()
495 iter->index = index; mtrr_lookup_fixed_start()
550 if (fixed_mtrr_range_end_addr(iter->seg, iter->index) >= iter->end) { mtrr_lookup_fixed_next()
556 iter->index++; mtrr_lookup_fixed_next()
559 if (iter->index >= ARRAY_SIZE(iter->mtrr_state->fixed_ranges)) mtrr_lookup_fixed_next()
563 if (iter->index > fixed_mtrr_seg_end_range_index(iter->seg)) mtrr_lookup_fixed_next()
600 iter->mem_type = iter->mtrr_state->fixed_ranges[iter->index]; mtrr_lookup_okay()
/linux-4.4.14/security/selinux/ss/
H A Debitmap.h90 unsigned int index = EBITMAP_NODE_INDEX(n, bit); ebitmap_node_get_bit() local
93 BUG_ON(index >= EBITMAP_UNIT_NUMS); ebitmap_node_get_bit()
94 if ((n->maps[index] & (EBITMAP_BIT << ofs))) ebitmap_node_get_bit()
102 unsigned int index = EBITMAP_NODE_INDEX(n, bit); ebitmap_node_set_bit() local
105 BUG_ON(index >= EBITMAP_UNIT_NUMS); ebitmap_node_set_bit()
106 n->maps[index] |= (EBITMAP_BIT << ofs); ebitmap_node_set_bit()
112 unsigned int index = EBITMAP_NODE_INDEX(n, bit); ebitmap_node_clr_bit() local
115 BUG_ON(index >= EBITMAP_UNIT_NUMS); ebitmap_node_clr_bit()
116 n->maps[index] &= ~(EBITMAP_BIT << ofs); ebitmap_node_clr_bit()
/linux-4.4.14/drivers/net/ethernet/cisco/enic/
H A Dvnic_intr.c36 unsigned int index) vnic_intr_alloc()
38 intr->index = index; vnic_intr_alloc()
41 intr->ctrl = vnic_dev_get_res(vdev, RES_TYPE_INTR_CTRL, index); vnic_intr_alloc()
43 vdev_err("Failed to hook INTR[%d].ctrl resource\n", index); vnic_intr_alloc()
35 vnic_intr_alloc(struct vnic_dev *vdev, struct vnic_intr *intr, unsigned int index) vnic_intr_alloc() argument
/linux-4.4.14/fs/udf/
H A Dunicode.c433 int index, newIndex = 0, needsCRC = 0; udf_translate_to_linux() local
444 for (index = 0; index < udfLen; index++) { udf_translate_to_linux()
445 curr = udfName[index]; udf_translate_to_linux()
449 while (index + 1 < udfLen && udf_translate_to_linux()
450 (udfName[index + 1] == '/' || udf_translate_to_linux()
451 udfName[index + 1] == 0)) udf_translate_to_linux()
452 index++; udf_translate_to_linux()
455 (udfLen - index - 1) <= EXT_SIZE) { udf_translate_to_linux()
456 if (udfLen == index + 1) udf_translate_to_linux()
460 extIndex = index; udf_translate_to_linux()
476 for (index = 0; udf_translate_to_linux()
477 index < EXT_SIZE && extIndex + index + 1 < udfLen; udf_translate_to_linux()
478 index++) { udf_translate_to_linux()
479 curr = udfName[extIndex + index + 1]; udf_translate_to_linux()
484 while (extIndex + index + 2 < udfLen && udf_translate_to_linux()
485 (index + 1 < EXT_SIZE && udf_translate_to_linux()
486 (udfName[extIndex + index + 2] == '/' || udf_translate_to_linux()
487 udfName[extIndex + index + 2] == 0))) udf_translate_to_linux()
488 index++; udf_translate_to_linux()
508 for (index = 0; index < localExtIndex; index++) udf_translate_to_linux()
509 newName[newIndex++] = ext[index]; udf_translate_to_linux()
/linux-4.4.14/drivers/clk/berlin/
H A Dberlin2-avpll.c218 u8 index; member in struct:berlin2_avpll_channel
228 if (ch->index == 7) berlin2_avpll_channel_is_enabled()
232 reg &= VCO_POWERUP_CH1 << ch->index; berlin2_avpll_channel_is_enabled()
243 reg |= VCO_POWERUP_CH1 << ch->index; berlin2_avpll_channel_enable()
255 reg &= ~(VCO_POWERUP_CH1 << ch->index); berlin2_avpll_channel_disable()
270 if ((reg & (VCO_DPLL_CH1_ENABLE << ch->index)) == 0) berlin2_avpll_channel_recalc_rate()
278 reg = readl_relaxed(ch->base + VCO_SYNC1n(ch->index)); berlin2_avpll_channel_recalc_rate()
280 if (ch->flags & BERLIN2_AVPLL_BIT_QUIRK && ch->index == 0) berlin2_avpll_channel_recalc_rate()
284 reg = readl_relaxed(ch->base + VCO_SYNC2n(ch->index)); berlin2_avpll_channel_recalc_rate()
288 if (ch->index == 7) berlin2_avpll_channel_recalc_rate()
296 reg = (reg >> (ch->index * 3)); berlin2_avpll_channel_recalc_rate()
304 if (ch->index == 0) { berlin2_avpll_channel_recalc_rate()
309 reg >>= (ch->index-1) * 3; berlin2_avpll_channel_recalc_rate()
318 if (ch->index < 2) { berlin2_avpll_channel_recalc_rate()
320 reg >>= 18 + (ch->index * 7); berlin2_avpll_channel_recalc_rate()
321 } else if (ch->index < 7) { berlin2_avpll_channel_recalc_rate()
323 reg >>= (ch->index - 2) * 7; berlin2_avpll_channel_recalc_rate()
336 if (ch->index < 6) { berlin2_avpll_channel_recalc_rate()
338 reg >>= 7 + (ch->index * 4); berlin2_avpll_channel_recalc_rate()
363 * and a translation table for the index.
368 const char *name, u8 index, const char *parent_name, berlin2_avpll_channel_register()
380 ch->index = quirk_index[index]; berlin2_avpll_channel_register()
382 ch->index = index; berlin2_avpll_channel_register()
367 berlin2_avpll_channel_register(void __iomem *base, const char *name, u8 index, const char *parent_name, u8 ch_flags, unsigned long flags) berlin2_avpll_channel_register() argument
/linux-4.4.14/drivers/staging/rtl8188eu/hal/
H A Drf.c160 u8 index, u32 *powerbase0, u32 *powerbase1, get_rx_power_val_by_reg()
173 u8 j = index + (rf ? 8 : 0); get_rx_power_val_by_reg()
178 write_val = hal_data->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf ? 8 : 0)] + get_rx_power_val_by_reg()
179 ((index < 2) ? powerbase0[rf] : powerbase1[rf]); get_rx_power_val_by_reg()
199 write_val = hal_data->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf ? 8 : 0)] + get_rx_power_val_by_reg()
200 ((index < 2) ? powerbase0[rf] : powerbase1[rf]); get_rx_power_val_by_reg()
204 write_val = (index < 2) ? powerbase0[rf] : powerbase1[rf]; get_rx_power_val_by_reg()
210 if (index < 2) get_rx_power_val_by_reg()
236 write_val = customer_limit + ((index < 2) ? powerbase0[rf] : powerbase1[rf]); get_rx_power_val_by_reg()
241 ((index < 2) ? powerbase0[rf] : powerbase1[rf]); get_rx_power_val_by_reg()
257 static void write_ofdm_pwr_reg(struct adapter *adapt, u8 index, u32 *pvalue) write_ofdm_pwr_reg() argument
280 regoffset = regoffset_a[index]; write_ofdm_pwr_reg()
282 regoffset = regoffset_b[index]; write_ofdm_pwr_reg()
296 u8 index = 0; rtl88eu_phy_rf6052_set_ofdm_txpower() local
304 for (index = 0; index < 6; index++) { rtl88eu_phy_rf6052_set_ofdm_txpower()
305 get_rx_power_val_by_reg(adapt, channel, index, rtl88eu_phy_rf6052_set_ofdm_txpower()
316 write_ofdm_pwr_reg(adapt, index, &write_val[0]); rtl88eu_phy_rf6052_set_ofdm_txpower()
159 get_rx_power_val_by_reg(struct adapter *adapt, u8 channel, u8 index, u32 *powerbase0, u32 *powerbase1, u32 *out_val) get_rx_power_val_by_reg() argument
/linux-4.4.14/drivers/staging/lustre/lustre/include/
H A Dlustre_cfg.h125 __u32 index, lustre_cfg_bufs_set()
129 if (index >= LUSTRE_CFG_MAX_BUFCOUNT) lustre_cfg_bufs_set()
134 if (bufs->lcfg_bufcount <= index) lustre_cfg_bufs_set()
135 bufs->lcfg_bufcount = index + 1; lustre_cfg_bufs_set()
137 bufs->lcfg_buf[index] = buf; lustre_cfg_bufs_set()
138 bufs->lcfg_buflen[index] = buflen; lustre_cfg_bufs_set()
142 __u32 index, lustre_cfg_bufs_set_string()
145 lustre_cfg_bufs_set(bufs, index, str, str ? strlen(str) + 1 : 0); lustre_cfg_bufs_set_string()
155 static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, int index) lustre_cfg_buf() argument
162 LASSERT (index >= 0); lustre_cfg_buf()
165 if (index >= bufcount) lustre_cfg_buf()
169 for (i = 0; i < index; i++) lustre_cfg_buf()
186 static inline char *lustre_cfg_string(struct lustre_cfg *lcfg, int index) lustre_cfg_string() argument
190 if (lcfg->lcfg_buflens[index] == 0) lustre_cfg_string()
193 s = lustre_cfg_buf(lcfg, index); lustre_cfg_string()
201 if (s[lcfg->lcfg_buflens[index] - 1] != '\0') { lustre_cfg_string()
202 int last = min((int)lcfg->lcfg_buflens[index], lustre_cfg_string()
203 cfs_size_round(lcfg->lcfg_buflens[index]) - 1); lustre_cfg_string()
209 index, s, lost); lustre_cfg_string()
124 lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs, __u32 index, void *buf, __u32 buflen) lustre_cfg_bufs_set() argument
141 lustre_cfg_bufs_set_string(struct lustre_cfg_bufs *bufs, __u32 index, char *str) lustre_cfg_bufs_set_string() argument
/linux-4.4.14/drivers/gpu/drm/shmobile/
H A Dshmob_drm_plane.c29 unsigned int index; member in struct:shmob_drm_plane
120 splane->index, #reg, \ __shmob_drm_plane_setup()
121 lcdc_read(sdev, reg(splane->index)), \ __shmob_drm_plane_setup()
122 lcdc_read(sdev, reg(splane->index) + LCDC_SIDE_B_OFFSET)) __shmob_drm_plane_setup()
131 lcdc_write(sdev, LDBCR, LDBCR_UPC(splane->index)); __shmob_drm_plane_setup()
132 dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x\n", __func__, splane->index, __shmob_drm_plane_setup()
135 lcdc_write(sdev, LDBnBSIFR(splane->index), format); __shmob_drm_plane_setup()
137 lcdc_write(sdev, LDBnBSSZR(splane->index), __shmob_drm_plane_setup()
140 lcdc_write(sdev, LDBnBLOCR(splane->index), __shmob_drm_plane_setup()
143 lcdc_write(sdev, LDBnBSMWR(splane->index), __shmob_drm_plane_setup()
148 lcdc_write(sdev, LDBnBSAYR(splane->index), splane->dma[0]); __shmob_drm_plane_setup()
150 lcdc_write(sdev, LDBnBSACR(splane->index), splane->dma[1]); __shmob_drm_plane_setup()
153 LDBCR_UPF(splane->index) | LDBCR_UPD(splane->index)); __shmob_drm_plane_setup()
154 dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x\n", __func__, splane->index, __shmob_drm_plane_setup()
218 lcdc_write(sdev, LDBnBSIFR(splane->index), 0); shmob_drm_plane_disable()
246 int shmob_drm_plane_create(struct shmob_drm_device *sdev, unsigned int index) shmob_drm_plane_create() argument
255 splane->index = index; shmob_drm_plane_create()
/linux-4.4.14/drivers/net/ethernet/intel/i40e/
H A Di40e_hmc.h99 u16 first_sd_index; /* index of the first available SD */
119 * @sd_index: segment descriptor index
140 * @sd_index: segment descriptor index
159 * @sd_idx: segment descriptor index
160 * @pd_idx: page descriptor index
168 * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit
171 * @index: starting index for the object
173 * @sd_idx: pointer to return index of the segment descriptor in question
176 * This function calculates the segment descriptor index and index limit
179 #define I40E_FIND_SD_INDEX_LIMIT(hmc_info, type, index, cnt, sd_idx, sd_limit)\
183 (hmc_info)->hmc_obj[(type)].size * (index); \
192 * I40E_FIND_PD_INDEX_LIMIT - finds page descriptor index limit
195 * @idx: starting index for the object
197 * @pd_index: pointer to return page descriptor index
198 * @pd_limit: pointer to return page descriptor index limit
200 * Calculates the page descriptor index and index limit for the resource
/linux-4.4.14/drivers/net/ethernet/intel/i40evf/
H A Di40e_hmc.h99 u16 first_sd_index; /* index of the first available SD */
119 * @sd_index: segment descriptor index
140 * @sd_index: segment descriptor index
159 * @sd_idx: segment descriptor index
160 * @pd_idx: page descriptor index
168 * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit
171 * @index: starting index for the object
173 * @sd_idx: pointer to return index of the segment descriptor in question
176 * This function calculates the segment descriptor index and index limit
179 #define I40E_FIND_SD_INDEX_LIMIT(hmc_info, type, index, cnt, sd_idx, sd_limit)\
183 (hmc_info)->hmc_obj[(type)].size * (index); \
192 * I40E_FIND_PD_INDEX_LIMIT - finds page descriptor index limit
195 * @idx: starting index for the object
197 * @pd_index: pointer to return page descriptor index
198 * @pd_limit: pointer to return page descriptor index limit
200 * Calculates the page descriptor index and index limit for the resource
/linux-4.4.14/fs/jfs/
H A Djfs_dtree.c37 * each directory page maintains a sorted entry index table
38 * which stores the start slot index of sorted entries
117 s16 index; member in struct:dtsplit
185 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
203 * Reads a page of a directory's index table.
245 * index and pointer to its entry.
249 static struct dir_table_slot *find_index(struct inode *ip, u32 index, find_index() argument
259 if (index < 2) { find_index()
261 jfs_warn("find_entry called with index = %d", index); find_index()
267 if (index >= jfs_ip->next_index) { find_index()
268 jfs_warn("find_entry called with index >= next_index"); find_index()
277 slot = &jfs_ip->i_dirtable[index - 2]; find_index()
279 offset = (index - 2) * sizeof(struct dir_table_slot); find_index()
305 u32 index) lock_index()
314 if (llck->index >= llck->maxcnt) lock_index()
316 lv = &llck->lv[llck->index]; lock_index()
322 lv->offset = ((index - 2) & 511) >> 1; lock_index()
324 llck->index++; lock_index()
330 * Adds an entry to the directory index table. This is used to provide
331 * each directory entry with a persistent index in which to resume
341 u32 index; add_index() local
358 index = jfs_ip->next_index++; add_index()
360 if (index <= MAX_INLINE_DIRTABLE_ENTRY) { add_index()
362 * i_size reflects size of index table, or 8 bytes per entry. add_index()
364 ip->i_size = (loff_t) (index - 1) << 3; add_index()
369 dirtab_slot = &jfs_ip->i_dirtable[index-2]; add_index()
376 return index; add_index()
378 if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) { add_index()
427 ASSERT(llck->index == 0); add_index()
432 llck->index++; add_index()
445 offset = (index - 2) * sizeof(struct dir_table_slot); add_index()
471 lock_index(tid, ip, mp, index); add_index()
482 return index; add_index()
494 * Marks an entry to the directory index table as free.
496 static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next) free_index() argument
502 dirtab_slot = find_index(ip, index, &mp, &lblock); free_index()
512 lock_index(tid, ip, mp, index); free_index()
522 * Changes an entry in the directory index table
524 static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, modify_index() argument
529 dirtab_slot = find_index(ip, index, mp, lblock); modify_index()
538 lock_index(tid, ip, *mp, index); modify_index()
549 static int read_index(struct inode *ip, u32 index, read_index() argument
556 slot = find_index(ip, index, &mp, &lblock); read_index()
589 int base, index, lim; dtSearch() local
627 * greater than K so that the returned index is the position of dtSearch()
646 index = base + (lim >> 1); dtSearch()
651 ciCompare(&ciKey, p, stbl[index], dtSearch()
656 cmp = dtCompare(&ciKey, p, stbl[index]); dtSearch()
669 ((struct ldtentry *) & p->slot[stbl[index]])->inumber); dtSearch()
706 btsp->index = index; dtSearch()
720 base = index + 1; dtSearch()
728 * base is the smallest index with key (Kj) greater than dtSearch()
729 * search key (K) and may be zero or (maxindex + 1) index. dtSearch()
755 btsp->index = base; dtSearch()
768 index = base ? base - 1 : base; dtSearch()
786 /* push (bn, index) of the parent page/entry */ dtSearch()
787 BT_PUSH(btstack, bn, index); dtSearch()
790 pxd = (pxd_t *) & p->slot[stbl[index]]; dtSearch()
826 dtpage_t *p; /* base B+-tree index page */ dtInsert()
828 int index; dtInsert() local
839 * dtSearch() returns (leaf page pinned, index at which to insert). dtInsert()
840 * n.b. dtSearch() may return index of (maxindex + 1) of dtInsert()
843 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); dtInsert()
871 split.index = index; dtInsert()
890 ASSERT(dtlck->index == 0); dtInsert()
896 dtlck->index++; dtInsert()
898 dtInsertEntry(p, index, name, &data, &dtlck); dtInsert()
902 if (dtlck->index >= dtlck->maxcnt) dtInsert()
904 lv = & dtlck->lv[dtlck->index]; dtInsert()
905 n = index >> L2DTSLOTSIZE; dtInsert()
909 dtlck->index++; dtInsert()
942 int skip; /* index of entry of insertion */ dtSplitUp()
1074 * new index page(s) to cover page split(s) dtSplitUp()
1111 * of (bn of parent page, index of child page entry in parent page) dtSplitUp()
1146 * The new key entry goes ONE AFTER the index of parent entry, dtSplitUp()
1149 skip = parent->index + 1; dtSplitUp()
1235 split->index = skip; /* index at insert */ dtSplitUp()
1267 ASSERT(dtlck->index == 0); dtSplitUp()
1273 dtlck->index++; dtSplitUp()
1283 dtlck->index++; dtSplitUp()
1401 ASSERT(sdtlck->index == 0); dtSplitPage()
1405 sdtlck->index++; dtSplitPage()
1446 if (nextbn == 0 && split->index == sp->header.nextindex) { dtSplitPage()
1448 rlv = & rdtlck->lv[rdtlck->index]; dtSplitPage()
1451 rdtlck->index++; dtSplitPage()
1491 lv = & dtlck->lv[dtlck->index]; dtSplitPage()
1494 dtlck->index++; dtSplitPage()
1504 skip = split->index; dtSplitPage()
1560 rlv = & rdtlck->lv[rdtlck->index]; dtSplitPage()
1563 rdtlck->index++; dtSplitPage()
1579 * Update directory index table for entries now in right page dtSplitPage()
1588 modify_index(tid, ip, le32_to_cpu(ldtentry->index), dtSplitPage()
1596 * the skipped index was on the left page, dtSplitPage()
1603 if (sdtlck->index >= sdtlck->maxcnt) dtSplitPage()
1605 slv = & sdtlck->lv[sdtlck->index]; dtSplitPage()
1610 sdtlck->index++; dtSplitPage()
1613 * the skipped index was on the right page, dtSplitPage()
1616 /* adjust the skip index to reflect the new position */ dtSplitPage()
1700 pxdlock->index = 1; dtExtendPage()
1703 * Update directory index table to reflect new page address dtExtendPage()
1714 le32_to_cpu(ldtentry->index), dtExtendPage()
1759 dtlck->index++; dtExtendPage()
1774 dtlck->index++; dtExtendPage()
1821 dtInsertEntry(sp, split->index, split->key, split->data, &dtlck); dtExtendPage()
1841 lv = & dtlck->lv[dtlck->index]; dtExtendPage()
1846 dtlck->index++; dtExtendPage()
1946 ASSERT(dtlck->index == 0); dtSplitRoot()
1950 dtlck->index++; dtSplitRoot()
1993 * Update directory index table for entries now in right page dtSplitRoot()
2003 modify_index(tid, ip, le32_to_cpu(ldtentry->index), dtSplitRoot()
2011 * (skip index in the new right page will not change) dtSplitRoot()
2013 dtInsertEntry(rp, split->index, split->key, split->data, &dtlck); dtSplitRoot()
2032 ASSERT(dtlck->index == 0); dtSplitRoot()
2036 dtlck->index++; dtSplitRoot()
2089 int index; dtDelete() local
2104 * dtSearch() returns (leaf page pinned, index at which to delete). dtDelete()
2110 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); dtDelete()
2113 * We need to find put the index of the next entry into the dtDelete()
2114 * directory index table in order to resume a readdir from this dtDelete()
2119 ldtentry = (struct ldtentry *) & p->slot[stbl[index]]; dtDelete()
2120 table_index = le32_to_cpu(ldtentry->index); dtDelete()
2121 if (index == (p->header.nextindex - 1)) { dtDelete()
2140 le32_to_cpu(ldtentry->index); dtDelete()
2146 (struct ldtentry *) & p->slot[stbl[index + 1]]; dtDelete()
2147 next_index = le32_to_cpu(ldtentry->index); dtDelete()
2172 * Do not assume that dtlck->index will be zero. During a dtDelete()
2178 if (dtlck->index >= dtlck->maxcnt) dtDelete()
2180 lv = & dtlck->lv[dtlck->index]; dtDelete()
2183 dtlck->index++; dtDelete()
2187 if (dtlck->index >= dtlck->maxcnt) dtDelete()
2189 lv = & dtlck->lv[dtlck->index]; dtDelete()
2190 i = index >> L2DTSLOTSIZE; dtDelete()
2195 dtlck->index++; dtDelete()
2199 dtDeleteEntry(p, index, &dtlck); dtDelete()
2202 * Update directory index table for entries moved in stbl dtDelete()
2204 if (DO_INDEX(ip) && index < p->header.nextindex) { dtDelete()
2209 for (i = index; i < p->header.nextindex; i++) { dtDelete()
2213 le32_to_cpu(ldtentry->index), dtDelete()
2243 int index, nextindex; dtDeleteUp() local
2282 pxdlock->index = 1; dtDeleteUp()
2315 index = parent->index; dtDeleteUp()
2358 pxdlock->index = 1; dtDeleteUp()
2394 if (dtlck->index >= dtlck->maxcnt) dtDeleteUp()
2396 lv = & dtlck->lv[dtlck->index]; dtDeleteUp()
2399 dtlck->index++; dtDeleteUp()
2403 if (dtlck->index < dtlck->maxcnt) dtDeleteUp()
2409 i = index >> L2DTSLOTSIZE; dtDeleteUp()
2414 dtlck->index++; dtDeleteUp()
2418 dtDeleteEntry(p, index, &dtlck); dtDeleteUp()
2421 if (index == 0 && dtDeleteUp()
2452 int index; dtRelocate() local
2479 DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); dtRelocate()
2529 ASSERT(dtlck->index == 0); dtRelocate()
2533 dtlck->index++; dtRelocate()
2543 ASSERT(dtlck->index == 0); dtRelocate()
2547 dtlck->index++; dtRelocate()
2565 ASSERT(dtlck->index == 0); dtRelocate()
2577 dtlck->index++; dtRelocate()
2604 pxdlock->index = 1; dtRelocate()
2615 lv = & dtlck->lv[dtlck->index]; dtRelocate()
2619 pxd = (pxd_t *) & pp->slot[stbl[index]]; dtRelocate()
2621 lv->offset = stbl[index]; dtRelocate()
2623 dtlck->index++; dtRelocate()
2709 btsp->index = i; dtSearchNode()
2777 if (dtlck->index >= dtlck->maxcnt) dtRelink()
2779 lv = & dtlck->lv[dtlck->index]; dtRelink()
2782 dtlck->index++; dtRelink()
2806 if (dtlck->index >= dtlck->maxcnt) dtRelink()
2808 lv = & dtlck->lv[dtlck->index]; dtRelink()
2811 dtlck->index++; dtRelink()
2881 ASSERT(dtlck->index == 0); dtInitRoot()
2885 dtlck->index++; dtInitRoot()
2914 * function: Fix dtree page in which one or more entries has an invalid index.
2916 * Called from jfs_readdir when bad index is detected.
2923 uint index; add_missing_indices() local
2953 index = le32_to_cpu(d->index); add_missing_indices()
2954 if ((index < 2) || (index >= JFS_IP(inode)->next_index)) { add_missing_indices()
2955 d->index = cpu_to_le32(add_index(tid, inode, bn, i)); add_missing_indices()
2956 if (dtlck->index >= dtlck->maxcnt) add_missing_indices()
2958 lv = &dtlck->lv[dtlck->index]; add_missing_indices()
2961 dtlck->index++; add_missing_indices()
3002 * return: offset = (pn, index) of start entry
3013 s16 index; jfs_readdir() member in struct:dtoffset
3019 int index; jfs_readdir() local
3034 static int unique_pos = 2; /* If we can't fix broken index */ jfs_readdir()
3041 * persistent index is stored in directory entries. jfs_readdir()
3088 index = dirtab_slot.slot; jfs_readdir()
3095 jfs_err("jfs_readdir: bad index table"); jfs_readdir()
3127 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); jfs_readdir()
3133 * pn = 0; index = 1: First entry "." jfs_readdir()
3134 * pn = 0; index = 2: Second entry ".." jfs_readdir()
3136 * pn = index = -1: No more entries jfs_readdir()
3144 dtoffset->index = 2; jfs_readdir()
3149 if (dtoffset->index == 2) { jfs_readdir()
3158 dtoffset->index = 0; jfs_readdir()
3173 /* get start leaf page and index */ jfs_readdir()
3174 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); jfs_readdir()
3198 for (i = index; i < p->header.nextindex; i++) { jfs_readdir()
3204 index = i; jfs_readdir()
3215 jfs_dirent->position = le32_to_cpu(d->index); jfs_readdir()
3217 * d->index should always be valid, but it jfs_readdir()
3219 * directory index for the lost+found jfs_readdir()
3230 * index to i will cause the jfs_readdir()
3235 index = i; jfs_readdir()
3241 * We add 1 to the index because we may jfs_readdir()
3265 "JFS:Dtree error: ino = %ld, bn=%lld, index = %d\n", jfs_readdir()
3283 dtoffset->index++; jfs_readdir()
3292 index = 0; jfs_readdir()
3293 /* update offset (pn:index) for new page */ jfs_readdir()
3296 dtoffset->index = 0; jfs_readdir()
3374 btsp->index = 0; dtReadFirst()
3389 /* push (bn, index) of the parent page/entry */ dtReadFirst()
3409 * function: get the page of the specified offset (pn:index)
3413 * note: if index > nextindex of the target leaf page,
3422 s16 index; dtReadNext() member in struct:dtoffset
3428 int index; dtReadNext() local
3441 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); dtReadNext()
3443 /* get the start offset (pn:index) */ dtReadNext()
3445 index = dtoffset->index; dtReadNext()
3450 if (index < p->header.nextindex) dtReadNext()
3460 dtoffset->index = index = 0; dtReadNext()
3549 if (index >= p->header.nextindex) { dtReadNext()
3568 dtoffset->index = 0; dtReadNext()
3575 btsp->index = dtoffset->index; dtReadNext()
3595 { /* entry slot index */ dtCompare()
3609 * (? if/when dtSearch() narrows down to 1st entry (index = 0), dtCompare()
3614 * if (e->index == 0 && h->prevpg == P_INVALID && !(h->flags & BT_LEAF)) dtCompare()
3670 int si, /* entry slot index */ ciCompare()
3688 * (? if/when dtSearch() narrows down to 1st entry (index = 0), ciCompare()
3693 * if (e->index == 0 && h->prevpg == P_INVALID && !(h->flags & BT_LEAF)) ciCompare()
3843 static void dtGetKey(dtpage_t * p, int i, /* entry index */ dtGetKey()
3905 * return: entry slot index
3907 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, dtInsertEntry() argument
3934 if (dtlck->index >= dtlck->maxcnt) dtInsertEntry()
3937 lv = & dtlck->lv[dtlck->index]; dtInsertEntry()
3951 lh->index = cpu_to_le32(add_index(data->leaf.tid, dtInsertEntry()
3953 bn, index)); dtInsertEntry()
3985 dtlck->index++; dtInsertEntry()
3988 if (dtlck->index < dtlck->maxcnt) dtInsertEntry()
4010 dtlck->index++; dtInsertEntry()
4028 if (index < nextindex) { dtInsertEntry()
4029 memmove(stbl + index + 1, stbl + index, nextindex - index); dtInsertEntry()
4039 for (n = index + 1; n <= nextindex; n++) { dtInsertEntry()
4042 le32_to_cpu(lh->index), bn, n, dtInsertEntry()
4050 stbl[index] = hsi; dtInsertEntry()
4052 /* advance next available entry index of stbl */ dtInsertEntry()
4069 int ssi, next; /* src slot index */ dtMoveEntry()
4070 int di; /* dst entry index */ dtMoveEntry()
4071 int dsi; /* dst slot index */ dtMoveEntry()
4089 dlv = & ddtlck->lv[ddtlck->index]; dtMoveEntry()
4093 slv = & sdtlck->lv[sdtlck->index]; dtMoveEntry()
4109 sdtlck->index++; dtMoveEntry()
4112 if (sdtlck->index < sdtlck->maxcnt) dtMoveEntry()
4139 dlh->index = slh->index; /* little-endian */ dtMoveEntry()
4181 sdtlck->index++; dtMoveEntry()
4184 if (sdtlck->index < sdtlck->maxcnt) dtMoveEntry()
4236 sdtlck->index++; dtMoveEntry()
4240 ddtlck->index++; dtMoveEntry()
4268 int fsi; /* free entry slot index */ dtDeleteEntry()
4276 /* get free entry slot index */ dtDeleteEntry()
4281 if (dtlck->index >= dtlck->maxcnt) dtDeleteEntry()
4283 lv = & dtlck->lv[dtlck->index]; dtDeleteEntry()
4305 dtlck->index++; dtDeleteEntry()
4308 if (dtlck->index < dtlck->maxcnt) dtDeleteEntry()
4330 dtlck->index++; dtDeleteEntry()
4363 int tsi; /* truncate entry slot index */ dtTruncateEntry()
4371 /* get free entry slot index */ dtTruncateEntry()
4376 if (dtlck->index >= dtlck->maxcnt) dtTruncateEntry()
4378 lv = & dtlck->lv[dtlck->index]; dtTruncateEntry()
4400 dtlck->index++; dtTruncateEntry()
4403 if (dtlck->index < dtlck->maxcnt) dtTruncateEntry()
4425 dtlck->index++; dtTruncateEntry()
4442 int m, /* max slot index */ dtLinelockFreelist()
4445 int fsi; /* free entry slot index */ dtLinelockFreelist()
4452 /* get free entry slot index */ dtLinelockFreelist()
4456 if (dtlck->index >= dtlck->maxcnt) dtLinelockFreelist()
4458 lv = & dtlck->lv[dtlck->index]; dtLinelockFreelist()
4474 dtlck->index++; dtLinelockFreelist()
4477 if (dtlck->index < dtlck->maxcnt) dtLinelockFreelist()
4497 dtlck->index++; dtLinelockFreelist()
4528 int index; dtModify() local
4534 int entry_si; /* entry slot index */ dtModify()
4540 * dtSearch() returns (leaf page pinned, index at which to modify). dtModify()
4546 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); dtModify()
4555 /* get slot index of the entry */ dtModify()
4557 entry_si = stbl[index]; dtModify()
4560 ASSERT(dtlck->index == 0); dtModify()
4564 dtlck->index++; dtModify()
304 lock_index(tid_t tid, struct inode *ip, struct metapage * mp, u32 index) lock_index() argument
/linux-4.4.14/sound/soc/fsl/
H A Dfsl_asrc.c28 dev_err(&asrc_priv->pdev->dev, "Pair %c: " fmt, 'A' + index, ##__VA_ARGS__)
31 dev_dbg(&asrc_priv->pdev->dev, "Pair %c: " fmt, 'A' + index, ##__VA_ARGS__)
95 enum asrc_pair_index index = ASRC_INVALID_PAIR; fsl_asrc_request_pair() local
107 index = i; fsl_asrc_request_pair()
113 if (index == ASRC_INVALID_PAIR) { fsl_asrc_request_pair()
121 asrc_priv->pair[index] = pair; fsl_asrc_request_pair()
123 pair->index = index; fsl_asrc_request_pair()
139 enum asrc_pair_index index = pair->index; fsl_asrc_release_pair() local
144 ASRCTR_ASRCEi_MASK(index), 0); fsl_asrc_release_pair()
149 asrc_priv->pair[index] = NULL; fsl_asrc_release_pair()
161 enum asrc_pair_index index = pair->index; fsl_asrc_set_watermarks() local
163 regmap_update_bits(asrc_priv->regmap, REG_ASRMCR(index), fsl_asrc_set_watermarks()
197 enum asrc_pair_index index = pair->index; fsl_asrc_set_ideal_ratio() local
225 regmap_write(asrc_priv->regmap, REG_ASRIDRL(index), ratio); fsl_asrc_set_ideal_ratio()
226 regmap_write(asrc_priv->regmap, REG_ASRIDRH(index), ratio >> 24); fsl_asrc_set_ideal_ratio()
242 enum asrc_pair_index index = pair->index; fsl_asrc_config_pair() local
325 ASRCNCR_ANCi_MASK(index, asrc_priv->channel_bits), fsl_asrc_config_pair()
326 ASRCNCR_ANCi(index, channels, asrc_priv->channel_bits)); fsl_asrc_config_pair()
330 ASRCTR_ATSi_MASK(index), ASRCTR_ATS(index)); fsl_asrc_config_pair()
332 ASRCTR_USRi_MASK(index), 0); fsl_asrc_config_pair()
336 ASRCSR_AICSi_MASK(index) | ASRCSR_AOCSi_MASK(index), fsl_asrc_config_pair()
337 ASRCSR_AICS(index, clk_index[IN]) | fsl_asrc_config_pair()
338 ASRCSR_AOCS(index, clk_index[OUT])); fsl_asrc_config_pair()
345 regmap_update_bits(asrc_priv->regmap, REG_ASRCDR(index), fsl_asrc_config_pair()
346 ASRCDRi_AOCPi_MASK(index) | ASRCDRi_AICPi_MASK(index) | fsl_asrc_config_pair()
347 ASRCDRi_AOCDi_MASK(index) | ASRCDRi_AICDi_MASK(index), fsl_asrc_config_pair()
348 ASRCDRi_AOCP(index, outdiv) | ASRCDRi_AICP(index, indiv)); fsl_asrc_config_pair()
351 regmap_update_bits(asrc_priv->regmap, REG_ASRMCR1(index), fsl_asrc_config_pair()
357 regmap_update_bits(asrc_priv->regmap, REG_ASRMCR(index), fsl_asrc_config_pair()
370 ASRCTR_ATSi_MASK(index), 0); fsl_asrc_config_pair()
374 ASRCTR_IDRi_MASK(index) | ASRCTR_USRi_MASK(index), fsl_asrc_config_pair()
375 ASRCTR_IDR(index) | ASRCTR_USR(index)); fsl_asrc_config_pair()
379 ASRCFG_PREMODi_MASK(index) | ASRCFG_POSTMODi_MASK(index), fsl_asrc_config_pair()
380 ASRCFG_PREMOD(index, process_option[in][out][0]) | fsl_asrc_config_pair()
381 ASRCFG_POSTMOD(index, process_option[in][out][1])); fsl_asrc_config_pair()
394 enum asrc_pair_index index = pair->index; fsl_asrc_start_pair() local
399 ASRCTR_ASRCEi_MASK(index), ASRCTR_ASRCE(index)); fsl_asrc_start_pair()
405 reg &= ASRCFG_INIRQi_MASK(index); fsl_asrc_start_pair()
411 regmap_write(asrc_priv->regmap, REG_ASRDI(index), 0); fsl_asrc_start_pair()
423 enum asrc_pair_index index = pair->index; fsl_asrc_stop_pair() local
427 ASRCTR_ASRCEi_MASK(index), 0); fsl_asrc_stop_pair()
436 enum asrc_pair_index index = pair->index; fsl_asrc_get_dma_channel() local
439 sprintf(name, "%cx%c", dir == IN ? 'r' : 't', index + 'a'); fsl_asrc_get_dma_channel()
476 config.pair = pair->index; fsl_asrc_dai_hw_params()
761 enum asrc_pair_index index; fsl_asrc_isr() local
774 for (index = ASRC_PAIR_A; index < ASRC_PAIR_MAX_NUM; index++) { fsl_asrc_isr()
775 if (!asrc_priv->pair[index]) fsl_asrc_isr()
779 asrc_priv->pair[index]->error |= ASRC_TASK_Q_OVERLOAD; fsl_asrc_isr()
783 if (status & ASRSTR_AOOL(index)) { fsl_asrc_isr()
784 asrc_priv->pair[index]->error |= ASRC_OUTPUT_TASK_OVERLOAD; fsl_asrc_isr()
788 if (status & ASRSTR_AIOL(index)) { fsl_asrc_isr()
789 asrc_priv->pair[index]->error |= ASRC_INPUT_TASK_OVERLOAD; fsl_asrc_isr()
793 if (status & ASRSTR_AODO(index)) { fsl_asrc_isr()
794 asrc_priv->pair[index]->error |= ASRC_OUTPUT_BUFFER_OVERFLOW; fsl_asrc_isr()
798 if (status & ASRSTR_AIDU(index)) { fsl_asrc_isr()
799 asrc_priv->pair[index]->error |= ASRC_INPUT_BUFFER_UNDERRUN; fsl_asrc_isr()
/linux-4.4.14/drivers/net/ethernet/hisilicon/hns/
H A Dhns_dsaf_rcb.c229 *@port_idx:port index
245 *@port_idx:port index
266 *@port_idx:port index
476 ring_pair_cb->index = i; hns_rcb_get_cfg()
493 *@comm_index:port index
507 *@comm_index:port index
520 *@comm_index: comm :index
672 int index = 0; hns_rcb_common_get_paddr() local
675 index = 2; hns_rcb_common_get_paddr()
678 index = 1; hns_rcb_common_get_paddr()
682 tmp_addr = of_get_address(np, index, &size, NULL); hns_rcb_common_get_paddr()
742 PPE_COM_HIS_RX_PKT_QID_OK_CNT_REG + 4 * ring->index); hns_rcb_update_stats()
744 PPE_COM_HIS_RX_PKT_QID_DROP_CNT_REG + 4 * ring->index); hns_rcb_update_stats()
751 PPE_COM_HIS_TX_PKT_QID_OK_CNT_REG + 4 * ring->index); hns_rcb_update_stats()
753 PPE_COM_HIS_TX_PKT_QID_ERR_CNT_REG + 4 * ring->index); hns_rcb_update_stats()
836 *@stringset:string set index
838 *@index:queue index
840 void hns_rcb_get_strings(int stringset, u8 *data, int index) hns_rcb_get_strings() argument
847 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_rcb_pkt_num", index); hns_rcb_get_strings()
849 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_ppe_tx_pkt_num", index); hns_rcb_get_strings()
851 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_ppe_drop_pkt_num", index); hns_rcb_get_strings()
853 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_fbd_num", index); hns_rcb_get_strings()
856 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_pkt_num", index); hns_rcb_get_strings()
858 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_bytes", index); hns_rcb_get_strings()
860 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_err_cnt", index); hns_rcb_get_strings()
862 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_io_err", index); hns_rcb_get_strings()
864 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_sw_err", index); hns_rcb_get_strings()
866 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_seg_pkt", index); hns_rcb_get_strings()
868 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_restart_queue", index); hns_rcb_get_strings()
870 snprintf(buff, ETH_GSTRING_LEN, "tx_ring%d_tx_busy", index); hns_rcb_get_strings()
873 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_rcb_pkt_num", index); hns_rcb_get_strings()
875 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_ppe_pkt_num", index); hns_rcb_get_strings()
877 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_ppe_drop_pkt_num", index); hns_rcb_get_strings()
879 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_fbd_num", index); hns_rcb_get_strings()
882 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_pkt_num", index); hns_rcb_get_strings()
884 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_bytes", index); hns_rcb_get_strings()
886 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_err_cnt", index); hns_rcb_get_strings()
888 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_io_err", index); hns_rcb_get_strings()
890 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_sw_err", index); hns_rcb_get_strings()
892 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_seg_pkt", index); hns_rcb_get_strings()
894 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_reuse_pg", index); hns_rcb_get_strings()
896 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_len_err", index); hns_rcb_get_strings()
898 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_non_vld_desc_err", index); hns_rcb_get_strings()
900 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_bd_num_err", index); hns_rcb_get_strings()
902 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_l2_err", index); hns_rcb_get_strings()
904 snprintf(buff, ETH_GSTRING_LEN, "rx_ring%d_l3l4csum_err", index); hns_rcb_get_strings()
1020 regs[i] = 0xcccccc00 + ring_pair->index; hns_rcb_get_ring_regs()
/linux-4.4.14/drivers/crypto/qat/qat_common/
H A Dadf_hw_arbiter.c62 #define WRITE_CSR_ARB_RINGSRVARBEN(csr_addr, index, value) \
64 (ADF_ARB_REG_SLOT * index), value)
66 #define WRITE_CSR_ARB_RESPORDERING(csr_addr, index, value) \
68 ADF_ARB_RO_EN_OFFSET) + (ADF_ARB_REG_SIZE * index), value)
70 #define WRITE_CSR_ARB_WEIGHT(csr_addr, arb, index, value) \
73 (ADF_ARB_REG_SIZE * index), value)
75 #define WRITE_CSR_ARB_SARCONFIG(csr_addr, index, value) \
77 (ADF_ARB_REG_SIZE * index), value)
79 #define WRITE_CSR_ARB_WRK_2_SER_MAP(csr_addr, index, value) \
82 (ADF_ARB_REG_SIZE * index), value)
84 #define WRITE_CSR_ARB_WQCFG(csr_addr, index, value) \
86 ADF_ARB_WQCFG_OFFSET) + (ADF_ARB_REG_SIZE * index), value)
/linux-4.4.14/arch/powerpc/platforms/pseries/
H A Dnvram.c45 static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index) pSeries_nvram_read() argument
57 if (*index >= nvram_size) pSeries_nvram_read()
60 i = *index; pSeries_nvram_read()
85 *index = i; pSeries_nvram_read()
89 static ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index) pSeries_nvram_write() argument
100 if (*index >= nvram_size) pSeries_nvram_write()
103 i = *index; pSeries_nvram_write()
127 *index = i; pSeries_nvram_write()
176 if (rtas_log_partition.index == -1) nvram_clear_error_log()
179 tmp_index = rtas_log_partition.index; nvram_clear_error_log()
201 return (oops_log_partition.index == rtas_log_partition.index clobbering_unread_rtas_event()
/linux-4.4.14/arch/arm/include/asm/
H A Dcpuidle.h8 struct cpuidle_driver *drv, int index);
11 struct cpuidle_driver *drv, int index) { return -ENODEV; }
47 extern int arm_cpuidle_suspend(int index);
10 arm_cpuidle_simple_enter(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) arm_cpuidle_simple_enter() argument
/linux-4.4.14/arch/x86/include/asm/xen/
H A Dinterface_32.h18 #define FLAT_RING1_CS 0xe019 /* GDT index 259 */
19 #define FLAT_RING1_DS 0xe021 /* GDT index 260 */
20 #define FLAT_RING1_SS 0xe021 /* GDT index 260 */
21 #define FLAT_RING3_CS 0xe02b /* GDT index 261 */
22 #define FLAT_RING3_DS 0xe033 /* GDT index 262 */
23 #define FLAT_RING3_SS 0xe033 /* GDT index 262 */
/linux-4.4.14/arch/arm/mach-davinci/
H A Dmux.c33 int davinci_cfg_reg(const unsigned long index) davinci_cfg_reg() argument
51 if (index >= soc_info->pinmux_pins_num) { davinci_cfg_reg()
52 pr_err("Invalid pin mux index: %lu (%lu)\n", davinci_cfg_reg()
53 index, soc_info->pinmux_pins_num); davinci_cfg_reg()
58 cfg = &soc_info->pinmux_pins[index]; davinci_cfg_reg()
61 pr_err("No entry for the specified index\n"); davinci_cfg_reg()
/linux-4.4.14/drivers/net/can/c_can/
H A Dc_can_pci.c51 enum reg index) c_can_pci_read_reg_aligned_to_16bit()
53 return readw(priv->base + priv->regs[index]); c_can_pci_read_reg_aligned_to_16bit()
57 enum reg index, u16 val) c_can_pci_write_reg_aligned_to_16bit()
59 writew(val, priv->base + priv->regs[index]); c_can_pci_write_reg_aligned_to_16bit()
63 enum reg index) c_can_pci_read_reg_aligned_to_32bit()
65 return readw(priv->base + 2 * priv->regs[index]); c_can_pci_read_reg_aligned_to_32bit()
69 enum reg index, u16 val) c_can_pci_write_reg_aligned_to_32bit()
71 writew(val, priv->base + 2 * priv->regs[index]); c_can_pci_write_reg_aligned_to_32bit()
75 enum reg index) c_can_pci_read_reg_32bit()
77 return (u16)ioread32(priv->base + 2 * priv->regs[index]); c_can_pci_read_reg_32bit()
81 enum reg index, u16 val) c_can_pci_write_reg_32bit()
83 iowrite32((u32)val, priv->base + 2 * priv->regs[index]); c_can_pci_write_reg_32bit()
86 static u32 c_can_pci_read_reg32(const struct c_can_priv *priv, enum reg index) c_can_pci_read_reg32() argument
90 val = priv->read_reg(priv, index); c_can_pci_read_reg32()
91 val |= ((u32) priv->read_reg(priv, index + 1)) << 16; c_can_pci_read_reg32()
96 static void c_can_pci_write_reg32(const struct c_can_priv *priv, enum reg index, c_can_pci_write_reg32() argument
99 priv->write_reg(priv, index + 1, val >> 16); c_can_pci_write_reg32()
100 priv->write_reg(priv, index, val); c_can_pci_write_reg32()
50 c_can_pci_read_reg_aligned_to_16bit(const struct c_can_priv *priv, enum reg index) c_can_pci_read_reg_aligned_to_16bit() argument
56 c_can_pci_write_reg_aligned_to_16bit(const struct c_can_priv *priv, enum reg index, u16 val) c_can_pci_write_reg_aligned_to_16bit() argument
62 c_can_pci_read_reg_aligned_to_32bit(const struct c_can_priv *priv, enum reg index) c_can_pci_read_reg_aligned_to_32bit() argument
68 c_can_pci_write_reg_aligned_to_32bit(const struct c_can_priv *priv, enum reg index, u16 val) c_can_pci_write_reg_aligned_to_32bit() argument
74 c_can_pci_read_reg_32bit(const struct c_can_priv *priv, enum reg index) c_can_pci_read_reg_32bit() argument
80 c_can_pci_write_reg_32bit(const struct c_can_priv *priv, enum reg index, u16 val) c_can_pci_write_reg_32bit() argument
/linux-4.4.14/drivers/gpu/drm/radeon/
H A Dr600_dpm.h155 void r600_set_tc(struct radeon_device *rdev, u32 index, u32 u_t, u32 d_t);
173 u32 index, bool enable);
175 u32 index, bool enable);
177 u32 index, bool enable);
179 u32 index, u32 divider);
181 u32 index, u32 divider);
183 u32 index, u32 divider);
185 u32 index, u32 step_time);
192 enum r600_power_level index, u64 pins);
196 enum r600_power_level index, bool enable);
198 enum r600_power_level index, u32 voltage_index);
200 enum r600_power_level index, u32 mem_clock_index);
202 enum r600_power_level index, u32 eng_clock_index);
204 enum r600_power_level index,
207 enum r600_power_level index, bool compatible);
211 enum r600_power_level index);
213 enum r600_power_level index);
215 enum r600_power_level index);
/linux-4.4.14/drivers/pci/hotplug/
H A Dcpqphp_sysfs.c45 int index; show_ctrl() local
49 index = 11; show_ctrl()
51 while (res && index--) { show_ctrl()
56 index = 11; show_ctrl()
58 while (res && index--) { show_ctrl()
63 index = 11; show_ctrl()
65 while (res && index--) { show_ctrl()
70 index = 11; show_ctrl()
72 while (res && index--) { show_ctrl()
83 int index; show_dev() local
95 index = 11; show_dev()
97 while (res && index--) { show_dev()
102 index = 11; show_dev()
104 while (res && index--) { show_dev()
109 index = 11; show_dev()
111 while (res && index--) { show_dev()
116 index = 11; show_dev()
118 while (res && index--) { show_dev()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/gr/
H A Dbase.c53 nvkm_gr_oclass_get(struct nvkm_oclass *oclass, int index) nvkm_gr_oclass_get() argument
59 int ret = gr->func->object_get(gr, index, &oclass->base); nvkm_gr_oclass_get()
61 return index; nvkm_gr_oclass_get()
66 if (c++ == index) { nvkm_gr_oclass_get()
67 oclass->base = gr->func->sclass[index]; nvkm_gr_oclass_get()
68 return index; nvkm_gr_oclass_get()
131 int index, u32 pmc_enable, bool enable, struct nvkm_gr *gr) nvkm_gr_ctor()
134 return nvkm_engine_ctor(&nvkm_gr, device, index, pmc_enable, nvkm_gr_ctor()
130 nvkm_gr_ctor(const struct nvkm_gr_func *func, struct nvkm_device *device, int index, u32 pmc_enable, bool enable, struct nvkm_gr *gr) nvkm_gr_ctor() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
H A Dpriv.h7 int index, struct nvkm_volt *);
9 int index, struct nvkm_volt **);
/linux-4.4.14/arch/powerpc/include/asm/
H A Dxics.h94 int index; member in struct:xics_cppr
103 if (WARN_ON(os_cppr->index >= MAX_NUM_PRIORITIES - 1)) xics_push_cppr()
107 os_cppr->stack[++os_cppr->index] = IPI_PRIORITY; xics_push_cppr()
109 os_cppr->stack[++os_cppr->index] = DEFAULT_PRIORITY; xics_push_cppr()
116 if (WARN_ON(os_cppr->index < 1)) xics_pop_cppr()
119 return os_cppr->stack[--os_cppr->index]; xics_pop_cppr()
129 WARN_ON(os_cppr->index != 0); xics_set_base_cppr()
138 return os_cppr->stack[os_cppr->index]; xics_cppr_top()
/linux-4.4.14/arch/arm/mach-imx/
H A Dcpuidle-imx5.c14 struct cpuidle_driver *drv, int index) imx5_cpuidle_enter()
17 return index; imx5_cpuidle_enter()
13 imx5_cpuidle_enter(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) imx5_cpuidle_enter() argument
H A Dcpuidle-imx6sl.c17 struct cpuidle_driver *drv, int index) imx6sl_enter_wait()
29 return index; imx6sl_enter_wait()
16 imx6sl_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) imx6sl_enter_wait() argument

Completed in 4508 milliseconds

1234567891011>>