Searched refs:func (Results 1 - 200 of 1476) sorted by relevance

12345678

/linux-4.4.14/arch/powerpc/kernel/
H A Dsystbl.S20 #define SYSCALL(func) .llong DOTSYM(sys_##func),DOTSYM(sys_##func)
21 #define COMPAT_SYS(func) .llong DOTSYM(sys_##func),DOTSYM(compat_sys_##func)
22 #define PPC_SYS(func) .llong DOTSYM(ppc_##func),DOTSYM(ppc_##func)
23 #define OLDSYS(func) .llong DOTSYM(sys_ni_syscall),DOTSYM(sys_ni_syscall)
24 #define SYS32ONLY(func) .llong DOTSYM(sys_ni_syscall),DOTSYM(compat_sys_##func)
25 #define PPC64ONLY(func) .llong DOTSYM(ppc_##func),DOTSYM(sys_ni_syscall)
28 #define SYSCALL(func) .long sys_##func
29 #define COMPAT_SYS(func) .long sys_##func
30 #define PPC_SYS(func) .long ppc_##func
31 #define OLDSYS(func) .long sys_##func
32 #define SYS32ONLY(func) .long sys_##func
33 #define PPC64ONLY(func) .long sys_ni_syscall
36 #define SYSCALL_SPU(func) SYSCALL(func)
37 #define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
38 #define PPC_SYS_SPU(func) PPC_SYS(func)
H A Dsystbl_chk.c18 #define SYSCALL(func) __NR_##func
19 #define COMPAT_SYS(func) __NR_##func
20 #define PPC_SYS(func) __NR_##func
22 #define OLDSYS(func) -1
23 #define SYS32ONLY(func) -1
24 #define PPC64ONLY(func) __NR_##func
26 #define OLDSYS(func) __NR_old##func
27 #define SYS32ONLY(func) __NR_##func
28 #define PPC64ONLY(func) -1
32 #define SYSCALL_SPU(func) SYSCALL(func)
33 #define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
34 #define PPC_SYS_SPU(func) PPC_SYS(func)
/linux-4.4.14/tools/perf/arch/x86/tests/
H A Darch-tests.c8 .func = test__rdpmc,
12 .func = test__perf_time_to_tsc,
17 .func = test__dwarf_unwind,
23 .func = test__insn_x86,
28 .func = test__intel_cqm_count_nmi_context,
31 .func = NULL,
/linux-4.4.14/drivers/mmc/core/
H A Dsdio_bus.c38 struct sdio_func *func; \
40 func = dev_to_sdio_func (dev); \
41 return sprintf (buf, format_string, func->field); \
51 struct sdio_func *func = dev_to_sdio_func (dev); modalias_show() local
54 func->class, func->vendor, func->device); modalias_show()
67 static const struct sdio_device_id *sdio_match_one(struct sdio_func *func, sdio_match_one() argument
70 if (id->class != (__u8)SDIO_ANY_ID && id->class != func->class) sdio_match_one()
72 if (id->vendor != (__u16)SDIO_ANY_ID && id->vendor != func->vendor) sdio_match_one()
74 if (id->device != (__u16)SDIO_ANY_ID && id->device != func->device) sdio_match_one()
79 static const struct sdio_device_id *sdio_match_device(struct sdio_func *func, sdio_match_device() argument
88 if (sdio_match_one(func, ids)) sdio_match_device()
99 struct sdio_func *func = dev_to_sdio_func(dev); sdio_bus_match() local
102 if (sdio_match_device(func, sdrv)) sdio_bus_match()
111 struct sdio_func *func = dev_to_sdio_func(dev); sdio_bus_uevent() local
114 "SDIO_CLASS=%02X", func->class)) sdio_bus_uevent()
118 "SDIO_ID=%04X:%04X", func->vendor, func->device)) sdio_bus_uevent()
123 func->class, func->vendor, func->device)) sdio_bus_uevent()
132 struct sdio_func *func = dev_to_sdio_func(dev); sdio_bus_probe() local
136 id = sdio_match_device(func, drv); sdio_bus_probe()
150 if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) { sdio_bus_probe()
158 sdio_claim_host(func); sdio_bus_probe()
159 ret = sdio_set_block_size(func, 0); sdio_bus_probe()
160 sdio_release_host(func); sdio_bus_probe()
164 ret = drv->probe(func, id); sdio_bus_probe()
171 if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) sdio_bus_probe()
180 struct sdio_func *func = dev_to_sdio_func(dev); sdio_bus_remove() local
184 if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) sdio_bus_remove()
187 drv->remove(func); sdio_bus_remove()
189 if (func->irq_handler) { sdio_bus_remove()
192 sdio_claim_host(func); sdio_bus_remove()
193 sdio_release_irq(func); sdio_bus_remove()
194 sdio_release_host(func); sdio_bus_remove()
198 if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) sdio_bus_remove()
202 if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) sdio_bus_remove()
264 struct sdio_func *func = dev_to_sdio_func(dev); sdio_release_func() local
266 sdio_free_func_cis(func); sdio_release_func()
268 kfree(func->info); sdio_release_func()
270 kfree(func); sdio_release_func()
278 struct sdio_func *func; sdio_alloc_func() local
280 func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL); sdio_alloc_func()
281 if (!func) sdio_alloc_func()
284 func->card = card; sdio_alloc_func()
286 device_initialize(&func->dev); sdio_alloc_func()
288 func->dev.parent = &card->dev; sdio_alloc_func()
289 func->dev.bus = &sdio_bus_type; sdio_alloc_func()
290 func->dev.release = sdio_release_func; sdio_alloc_func()
292 return func; sdio_alloc_func()
296 static void sdio_acpi_set_handle(struct sdio_func *func) sdio_acpi_set_handle() argument
298 struct mmc_host *host = func->card->host; sdio_acpi_set_handle()
299 u64 addr = ((u64)host->slotno << 16) | func->num; sdio_acpi_set_handle()
301 acpi_preset_companion(&func->dev, ACPI_COMPANION(host->parent), addr); sdio_acpi_set_handle()
304 static inline void sdio_acpi_set_handle(struct sdio_func *func) {} sdio_acpi_set_handle() argument
307 static void sdio_set_of_node(struct sdio_func *func) sdio_set_of_node() argument
309 struct mmc_host *host = func->card->host; sdio_set_of_node()
311 func->dev.of_node = mmc_of_find_child_device(host, func->num); sdio_set_of_node()
317 int sdio_add_func(struct sdio_func *func) sdio_add_func() argument
321 dev_set_name(&func->dev, "%s:%d", mmc_card_id(func->card), func->num); sdio_add_func()
323 sdio_set_of_node(func); sdio_add_func()
324 sdio_acpi_set_handle(func); sdio_add_func()
325 ret = device_add(&func->dev); sdio_add_func()
327 sdio_func_set_present(func); sdio_add_func()
338 void sdio_remove_func(struct sdio_func *func) sdio_remove_func() argument
340 if (!sdio_func_present(func)) sdio_remove_func()
343 device_del(&func->dev); sdio_remove_func()
344 of_node_put(func->dev.of_node); sdio_remove_func()
345 put_device(&func->dev); sdio_remove_func()
H A Dsdio_io.c22 * @func: SDIO function that will be accessed
27 void sdio_claim_host(struct sdio_func *func) sdio_claim_host() argument
29 BUG_ON(!func); sdio_claim_host()
30 BUG_ON(!func->card); sdio_claim_host()
32 mmc_claim_host(func->card->host); sdio_claim_host()
38 * @func: SDIO function that was accessed
43 void sdio_release_host(struct sdio_func *func) sdio_release_host() argument
45 BUG_ON(!func); sdio_release_host()
46 BUG_ON(!func->card); sdio_release_host()
48 mmc_release_host(func->card->host); sdio_release_host()
54 * @func: SDIO function to enable
59 int sdio_enable_func(struct sdio_func *func) sdio_enable_func() argument
65 BUG_ON(!func); sdio_enable_func()
66 BUG_ON(!func->card); sdio_enable_func()
68 pr_debug("SDIO: Enabling device %s...\n", sdio_func_id(func)); sdio_enable_func()
70 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IOEx, 0, &reg); sdio_enable_func()
74 reg |= 1 << func->num; sdio_enable_func()
76 ret = mmc_io_rw_direct(func->card, 1, 0, SDIO_CCCR_IOEx, reg, NULL); sdio_enable_func()
80 timeout = jiffies + msecs_to_jiffies(func->enable_timeout); sdio_enable_func()
83 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, &reg); sdio_enable_func()
86 if (reg & (1 << func->num)) sdio_enable_func()
93 pr_debug("SDIO: Enabled device %s\n", sdio_func_id(func)); sdio_enable_func()
98 pr_debug("SDIO: Failed to enable device %s\n", sdio_func_id(func)); sdio_enable_func()
105 * @func: SDIO function to disable
110 int sdio_disable_func(struct sdio_func *func) sdio_disable_func() argument
115 BUG_ON(!func); sdio_disable_func()
116 BUG_ON(!func->card); sdio_disable_func()
118 pr_debug("SDIO: Disabling device %s...\n", sdio_func_id(func)); sdio_disable_func()
120 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IOEx, 0, &reg); sdio_disable_func()
124 reg &= ~(1 << func->num); sdio_disable_func()
126 ret = mmc_io_rw_direct(func->card, 1, 0, SDIO_CCCR_IOEx, reg, NULL); sdio_disable_func()
130 pr_debug("SDIO: Disabled device %s\n", sdio_func_id(func)); sdio_disable_func()
135 pr_debug("SDIO: Failed to disable device %s\n", sdio_func_id(func)); sdio_disable_func()
142 * @func: SDIO function to change
159 int sdio_set_block_size(struct sdio_func *func, unsigned blksz) sdio_set_block_size() argument
163 if (blksz > func->card->host->max_blk_size) sdio_set_block_size()
167 blksz = min(func->max_blksize, func->card->host->max_blk_size); sdio_set_block_size()
171 ret = mmc_io_rw_direct(func->card, 1, 0, sdio_set_block_size()
172 SDIO_FBR_BASE(func->num) + SDIO_FBR_BLKSIZE, sdio_set_block_size()
176 ret = mmc_io_rw_direct(func->card, 1, 0, sdio_set_block_size()
177 SDIO_FBR_BASE(func->num) + SDIO_FBR_BLKSIZE + 1, sdio_set_block_size()
181 func->cur_blksize = blksz; sdio_set_block_size()
189 static inline unsigned int sdio_max_byte_size(struct sdio_func *func) sdio_max_byte_size() argument
191 unsigned mval = func->card->host->max_blk_size; sdio_max_byte_size()
193 if (mmc_blksz_for_byte_mode(func->card)) sdio_max_byte_size()
194 mval = min(mval, func->cur_blksize); sdio_max_byte_size()
196 mval = min(mval, func->max_blksize); sdio_max_byte_size()
198 if (mmc_card_broken_byte_mode_512(func->card)) sdio_max_byte_size()
206 * @func: SDIO function
218 unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz) sdio_align_size() argument
231 sz = mmc_align_data_size(func->card, sz); sdio_align_size()
237 if (sz <= sdio_max_byte_size(func)) sdio_align_size()
240 if (func->card->cccr.multi_block) { sdio_align_size()
244 if ((sz % func->cur_blksize) == 0) sdio_align_size()
251 blk_sz = ((sz + func->cur_blksize - 1) / sdio_align_size()
252 func->cur_blksize) * func->cur_blksize; sdio_align_size()
253 blk_sz = mmc_align_data_size(func->card, blk_sz); sdio_align_size()
259 if ((blk_sz % func->cur_blksize) == 0) sdio_align_size()
266 byte_sz = mmc_align_data_size(func->card, sdio_align_size()
267 sz % func->cur_blksize); sdio_align_size()
268 if (byte_sz <= sdio_max_byte_size(func)) { sdio_align_size()
269 blk_sz = sz / func->cur_blksize; sdio_align_size()
270 return blk_sz * func->cur_blksize + byte_sz; sdio_align_size()
277 chunk_sz = mmc_align_data_size(func->card, sdio_align_size()
278 sdio_max_byte_size(func)); sdio_align_size()
279 if (chunk_sz == sdio_max_byte_size(func)) { sdio_align_size()
285 byte_sz = mmc_align_data_size(func->card, sdio_align_size()
303 static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, sdio_io_rw_ext_helper() argument
311 if (func->card->cccr.multi_block && (size > sdio_max_byte_size(func))) { sdio_io_rw_ext_helper()
314 max_blocks = min(func->card->host->max_blk_count, 511u); sdio_io_rw_ext_helper()
316 while (remainder >= func->cur_blksize) { sdio_io_rw_ext_helper()
319 blocks = remainder / func->cur_blksize; sdio_io_rw_ext_helper()
322 size = blocks * func->cur_blksize; sdio_io_rw_ext_helper()
324 ret = mmc_io_rw_extended(func->card, write, sdio_io_rw_ext_helper()
325 func->num, addr, incr_addr, buf, sdio_io_rw_ext_helper()
326 blocks, func->cur_blksize); sdio_io_rw_ext_helper()
339 size = min(remainder, sdio_max_byte_size(func)); sdio_io_rw_ext_helper()
342 ret = mmc_io_rw_extended(func->card, write, func->num, addr, sdio_io_rw_ext_helper()
357 * @func: SDIO function to access
365 u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret) sdio_readb() argument
370 BUG_ON(!func); sdio_readb()
375 ret = mmc_io_rw_direct(func->card, 0, func->num, addr, 0, &val); sdio_readb()
388 * @func: SDIO function to access
397 void sdio_writeb(struct sdio_func *func, u8 b, unsigned int addr, int *err_ret) sdio_writeb() argument
401 BUG_ON(!func); sdio_writeb()
403 ret = mmc_io_rw_direct(func->card, 1, func->num, addr, b, NULL); sdio_writeb()
411 * @func: SDIO function to access
422 u8 sdio_writeb_readb(struct sdio_func *func, u8 write_byte, sdio_writeb_readb() argument
428 ret = mmc_io_rw_direct(func->card, 1, func->num, addr, sdio_writeb_readb()
441 * @func: SDIO function to access
449 int sdio_memcpy_fromio(struct sdio_func *func, void *dst, sdio_memcpy_fromio() argument
452 return sdio_io_rw_ext_helper(func, 0, addr, 1, dst, count); sdio_memcpy_fromio()
458 * @func: SDIO function to access
466 int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, sdio_memcpy_toio() argument
469 return sdio_io_rw_ext_helper(func, 1, addr, 1, src, count); sdio_memcpy_toio()
475 * @func: SDIO function to access
483 int sdio_readsb(struct sdio_func *func, void *dst, unsigned int addr, sdio_readsb() argument
486 return sdio_io_rw_ext_helper(func, 0, addr, 0, dst, count); sdio_readsb()
492 * @func: SDIO function to access
500 int sdio_writesb(struct sdio_func *func, unsigned int addr, void *src, sdio_writesb() argument
503 return sdio_io_rw_ext_helper(func, 1, addr, 0, src, count); sdio_writesb()
509 * @func: SDIO function to access
517 u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret) sdio_readw() argument
524 ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 2); sdio_readw()
531 return le16_to_cpup((__le16 *)func->tmpbuf); sdio_readw()
537 * @func: SDIO function to access
546 void sdio_writew(struct sdio_func *func, u16 b, unsigned int addr, int *err_ret) sdio_writew() argument
550 *(__le16 *)func->tmpbuf = cpu_to_le16(b); sdio_writew()
552 ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 2); sdio_writew()
560 * @func: SDIO function to access
569 u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret) sdio_readl() argument
576 ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 4); sdio_readl()
583 return le32_to_cpup((__le32 *)func->tmpbuf); sdio_readl()
589 * @func: SDIO function to access
598 void sdio_writel(struct sdio_func *func, u32 b, unsigned int addr, int *err_ret) sdio_writel() argument
602 *(__le32 *)func->tmpbuf = cpu_to_le32(b); sdio_writel()
604 ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 4); sdio_writel()
612 * @func: an SDIO function of the card
620 unsigned char sdio_f0_readb(struct sdio_func *func, unsigned int addr, sdio_f0_readb() argument
626 BUG_ON(!func); sdio_f0_readb()
631 ret = mmc_io_rw_direct(func->card, 0, 0, addr, 0, &val); sdio_f0_readb()
644 * @func: an SDIO function of the card
656 void sdio_f0_writeb(struct sdio_func *func, unsigned char b, unsigned int addr, sdio_f0_writeb() argument
661 BUG_ON(!func); sdio_f0_writeb()
663 if ((addr < 0xF0 || addr > 0xFF) && (!mmc_card_lenient_fn0(func->card))) { sdio_f0_writeb()
669 ret = mmc_io_rw_direct(func->card, 1, 0, addr, b, NULL); sdio_f0_writeb()
677 * @func: SDIO function attached to host
685 mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func) sdio_get_host_pm_caps() argument
687 BUG_ON(!func); sdio_get_host_pm_caps()
688 BUG_ON(!func->card); sdio_get_host_pm_caps()
690 return func->card->host->pm_caps; sdio_get_host_pm_caps()
696 * @func: SDIO function attached to host
706 int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags) sdio_set_host_pm_flags() argument
710 BUG_ON(!func); sdio_set_host_pm_flags()
711 BUG_ON(!func->card); sdio_set_host_pm_flags()
713 host = func->card->host; sdio_set_host_pm_flags()
H A Dsdio_irq.c36 struct sdio_func *func; process_sdio_pending_irqs() local
43 func = card->sdio_single_irq; process_sdio_pending_irqs()
44 if (func && host->sdio_irq_pending) { process_sdio_pending_irqs()
45 func->irq_handler(func); process_sdio_pending_irqs()
70 func = card->sdio_func[i - 1]; process_sdio_pending_irqs()
71 if (!func) { process_sdio_pending_irqs()
75 } else if (func->irq_handler) { process_sdio_pending_irqs()
76 func->irq_handler(func); process_sdio_pending_irqs()
80 sdio_func_id(func)); process_sdio_pending_irqs()
234 struct sdio_func *func; sdio_single_irq_set() local
241 func = card->sdio_func[i]; sdio_single_irq_set()
242 if (func && func->irq_handler) { sdio_single_irq_set()
243 card->sdio_single_irq = func; sdio_single_irq_set()
251 * @func: SDIO function
259 int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler) sdio_claim_irq() argument
264 BUG_ON(!func); sdio_claim_irq()
265 BUG_ON(!func->card); sdio_claim_irq()
267 pr_debug("SDIO: Enabling IRQ for %s...\n", sdio_func_id(func)); sdio_claim_irq()
269 if (func->irq_handler) { sdio_claim_irq()
270 pr_debug("SDIO: IRQ for %s already in use.\n", sdio_func_id(func)); sdio_claim_irq()
274 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, &reg); sdio_claim_irq()
278 reg |= 1 << func->num; sdio_claim_irq()
282 ret = mmc_io_rw_direct(func->card, 1, 0, SDIO_CCCR_IENx, reg, NULL); sdio_claim_irq()
286 func->irq_handler = handler; sdio_claim_irq()
287 ret = sdio_card_irq_get(func->card); sdio_claim_irq()
289 func->irq_handler = NULL; sdio_claim_irq()
290 sdio_single_irq_set(func->card); sdio_claim_irq()
298 * @func: SDIO function
302 int sdio_release_irq(struct sdio_func *func) sdio_release_irq() argument
307 BUG_ON(!func); sdio_release_irq()
308 BUG_ON(!func->card); sdio_release_irq()
310 pr_debug("SDIO: Disabling IRQ for %s...\n", sdio_func_id(func)); sdio_release_irq()
312 if (func->irq_handler) { sdio_release_irq()
313 func->irq_handler = NULL; sdio_release_irq()
314 sdio_card_irq_put(func->card); sdio_release_irq()
315 sdio_single_irq_set(func->card); sdio_release_irq()
318 ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, &reg); sdio_release_irq()
322 reg &= ~(1 << func->num); sdio_release_irq()
328 ret = mmc_io_rw_direct(func->card, 1, 0, SDIO_CCCR_IENx, reg, NULL); sdio_release_irq()
H A Dsdio_cis.c27 static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func, cistpl_vers_1() argument
63 if (func) { cistpl_vers_1()
64 func->num_info = nr_strings; cistpl_vers_1()
65 func->info = (const char**)buffer; cistpl_vers_1()
74 static int cistpl_manfid(struct mmc_card *card, struct sdio_func *func, cistpl_manfid() argument
85 if (func) { cistpl_manfid()
86 func->vendor = vendor; cistpl_manfid()
87 func->device = device; cistpl_manfid()
111 static int cis_tpl_parse(struct mmc_card *card, struct sdio_func *func, cis_tpl_parse() argument
127 ret = tpl->parse(card, func, buf, size); cis_tpl_parse()
146 static int cistpl_funce_common(struct mmc_card *card, struct sdio_func *func, cistpl_funce_common() argument
150 if (func) cistpl_funce_common()
163 static int cistpl_funce_func(struct mmc_card *card, struct sdio_func *func, cistpl_funce_func() argument
170 if (!func) cistpl_funce_func()
177 vsn = func->card->cccr.sdio_vsn; cistpl_funce_func()
184 func->max_blksize = buf[12] | (buf[13] << 8); cistpl_funce_func()
188 func->enable_timeout = (buf[28] | (buf[29] << 8)) * 10; cistpl_funce_func()
190 func->enable_timeout = jiffies_to_msecs(HZ); cistpl_funce_func()
208 static int cistpl_funce(struct mmc_card *card, struct sdio_func *func, cistpl_funce() argument
214 return cis_tpl_parse(card, func, "CISTPL_FUNCE", cistpl_funce()
228 static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func) sdio_read_cis() argument
242 if (func) sdio_read_cis()
243 fn = func->num; sdio_read_cis()
254 if (func) sdio_read_cis()
255 prev = &func->tuples; sdio_read_cis()
300 ret = cis_tpl_parse(card, func, "CIS", sdio_read_cis()
340 if (func) sdio_read_cis()
366 int sdio_read_func_cis(struct sdio_func *func) sdio_read_func_cis() argument
370 ret = sdio_read_cis(func->card, func); sdio_read_func_cis()
378 get_device(&func->card->dev); sdio_read_func_cis()
384 if (func->vendor == 0) { sdio_read_func_cis()
385 func->vendor = func->card->cis.vendor; sdio_read_func_cis()
386 func->device = func->card->cis.device; sdio_read_func_cis()
392 void sdio_free_func_cis(struct sdio_func *func) sdio_free_func_cis() argument
396 tuple = func->tuples; sdio_free_func_cis()
398 while (tuple && tuple != func->card->tuples) { sdio_free_func_cis()
404 func->tuples = NULL; sdio_free_func_cis()
410 put_device(&func->card->dev); sdio_free_func_cis()
H A Dsdio_bus.h15 int sdio_add_func(struct sdio_func *func);
16 void sdio_remove_func(struct sdio_func *func);
H A Dsdio_cis.h20 int sdio_read_func_cis(struct sdio_func *func);
21 void sdio_free_func_cis(struct sdio_func *func);
/linux-4.4.14/arch/sparc/include/asm/
H A Dmemctrl.h6 int register_dimm_printer(dimm_printer_t func);
7 void unregister_dimm_printer(dimm_printer_t func);
H A Dsmp_32.h59 void (*cross_call)(smpfunc_t func, cpumask_t mask, unsigned long arg1,
68 static inline void xc0(smpfunc_t func) xc0() argument
70 sparc32_ipi_ops->cross_call(func, *cpu_online_mask, 0, 0, 0, 0); xc0()
73 static inline void xc1(smpfunc_t func, unsigned long arg1) xc1() argument
75 sparc32_ipi_ops->cross_call(func, *cpu_online_mask, arg1, 0, 0, 0); xc1()
77 static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) xc2() argument
79 sparc32_ipi_ops->cross_call(func, *cpu_online_mask, arg1, arg2, 0, 0); xc2()
82 static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, xc3() argument
85 sparc32_ipi_ops->cross_call(func, *cpu_online_mask, xc3()
89 static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, xc4() argument
92 sparc32_ipi_ops->cross_call(func, *cpu_online_mask, xc4()
113 #define MSG_CROSS_CALL 0x0005 /* run func on cpus */
/linux-4.4.14/drivers/hwmon/pmbus/
H A Dmax34440.c224 .func[0] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
226 .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
228 .func[2] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
230 .func[3] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
232 .func[4] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
234 .func[5] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
236 .func[6] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
237 .func[7] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
238 .func[8] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
239 .func[9] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
240 .func[10] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
241 .func[11] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
242 .func[12] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
243 .func[13] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
270 .func[0] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
272 .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
274 .func[2] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
276 .func[3] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
278 .func[4] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
280 .func[5] = PMBUS_HAVE_FAN12 | PMBUS_HAVE_STATUS_FAN12,
281 .func[6] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
282 .func[7] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
283 .func[8] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
284 .func[9] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
285 .func[10] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
286 .func[11] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
313 .func[0] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
315 .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
317 .func[2] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
319 .func[3] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
321 .func[4] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
322 .func[5] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
323 .func[6] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
338 .func[0] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
339 .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
340 .func[2] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
341 .func[3] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
342 .func[4] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
343 .func[5] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
344 .func[6] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
345 .func[7] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
346 .func[8] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
347 .func[9] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
348 .func[10] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
349 .func[11] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
350 .func[13] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
351 .func[14] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
352 .func[15] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
353 .func[16] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
354 .func[17] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
369 .func[0] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
370 .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
371 .func[2] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
372 .func[3] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
373 .func[4] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
374 .func[5] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
375 .func[6] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
376 .func[7] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
377 .func[8] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
378 .func[9] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
379 .func[10] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
380 .func[11] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
381 .func[12] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
382 .func[13] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
383 .func[14] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
384 .func[15] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
386 .func[17] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
387 .func[18] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
388 .func[19] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
389 .func[20] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
390 .func[21] = PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
H A Dpmbus.c40 info->func[0] |= PMBUS_HAVE_VIN; pmbus_find_sensor_groups()
42 info->func[0] |= PMBUS_HAVE_VCAP; pmbus_find_sensor_groups()
44 info->func[0] |= PMBUS_HAVE_IIN; pmbus_find_sensor_groups()
46 info->func[0] |= PMBUS_HAVE_PIN; pmbus_find_sensor_groups()
47 if (info->func[0] pmbus_find_sensor_groups()
49 info->func[0] |= PMBUS_HAVE_STATUS_INPUT; pmbus_find_sensor_groups()
52 info->func[0] |= PMBUS_HAVE_FAN12; pmbus_find_sensor_groups()
54 info->func[0] |= PMBUS_HAVE_STATUS_FAN12; pmbus_find_sensor_groups()
58 info->func[0] |= PMBUS_HAVE_FAN34; pmbus_find_sensor_groups()
60 info->func[0] |= PMBUS_HAVE_STATUS_FAN34; pmbus_find_sensor_groups()
63 info->func[0] |= PMBUS_HAVE_TEMP; pmbus_find_sensor_groups()
65 info->func[0] |= PMBUS_HAVE_TEMP2; pmbus_find_sensor_groups()
67 info->func[0] |= PMBUS_HAVE_TEMP3; pmbus_find_sensor_groups()
68 if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 pmbus_find_sensor_groups()
72 info->func[0] |= PMBUS_HAVE_STATUS_TEMP; pmbus_find_sensor_groups()
77 info->func[page] |= PMBUS_HAVE_VOUT; pmbus_find_sensor_groups()
80 info->func[page] |= PMBUS_HAVE_STATUS_VOUT; pmbus_find_sensor_groups()
83 info->func[page] |= PMBUS_HAVE_IOUT; pmbus_find_sensor_groups()
86 info->func[page] |= PMBUS_HAVE_STATUS_IOUT; pmbus_find_sensor_groups()
89 info->func[page] |= PMBUS_HAVE_POUT; pmbus_find_sensor_groups()
H A Dmax16064.c91 .func[0] = PMBUS_HAVE_VOUT | PMBUS_HAVE_TEMP
93 .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
94 .func[2] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
95 .func[3] = PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT,
/linux-4.4.14/arch/x86/pci/
H A Dearly.c10 u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset) read_pci_config() argument
13 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); read_pci_config()
18 u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset) read_pci_config_byte() argument
21 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); read_pci_config_byte()
26 u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset) read_pci_config_16() argument
29 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); read_pci_config_16()
34 void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, write_pci_config() argument
37 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); write_pci_config()
41 void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) write_pci_config_byte() argument
43 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); write_pci_config_byte()
47 void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val) write_pci_config_16() argument
49 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); write_pci_config_16()
59 void early_dump_pci_device(u8 bus, u8 slot, u8 func) early_dump_pci_device() argument
66 bus, slot, func); early_dump_pci_device()
72 val = read_pci_config(bus, slot, func, i); early_dump_pci_device()
83 unsigned bus, slot, func; early_dump_pci_devices() local
90 for (func = 0; func < 8; func++) { early_dump_pci_devices()
94 class = read_pci_config(bus, slot, func, early_dump_pci_devices()
99 early_dump_pci_device(bus, slot, func); early_dump_pci_devices()
101 if (func == 0) { early_dump_pci_devices()
103 func, early_dump_pci_devices()
H A Dbroadcom_bus.c22 static void __init cnb20le_res(u8 bus, u8 slot, u8 func) cnb20le_res() argument
31 fbus = read_pci_config_byte(bus, slot, func, 0x44); cnb20le_res()
32 lbus = read_pci_config_byte(bus, slot, func, 0x45); cnb20le_res()
50 word1 = read_pci_config_16(bus, slot, func, 0xc0); cnb20le_res()
51 word2 = read_pci_config_16(bus, slot, func, 0xc2); cnb20le_res()
60 word1 = read_pci_config_16(bus, slot, func, 0xc4); cnb20le_res()
61 word2 = read_pci_config_16(bus, slot, func, 0xc6); cnb20le_res()
70 word1 = read_pci_config_16(bus, slot, func, 0xd0); cnb20le_res()
71 word2 = read_pci_config_16(bus, slot, func, 0xd2); cnb20le_res()
/linux-4.4.14/drivers/net/wireless/ti/wl1251/
H A Dsdio.c44 struct sdio_func *func; member in struct:wl1251_sdio
51 return wl_sdio->func; wl_to_func()
54 static void wl1251_sdio_interrupt(struct sdio_func *func) wl1251_sdio_interrupt() argument
56 struct wl1251 *wl = sdio_get_drvdata(func); wl1251_sdio_interrupt()
75 struct sdio_func *func = wl_to_func(wl); wl1251_sdio_read() local
77 sdio_claim_host(func); wl1251_sdio_read()
78 ret = sdio_memcpy_fromio(func, buf, addr, len); wl1251_sdio_read()
81 sdio_release_host(func); wl1251_sdio_read()
88 struct sdio_func *func = wl_to_func(wl); wl1251_sdio_write() local
90 sdio_claim_host(func); wl1251_sdio_write()
91 ret = sdio_memcpy_toio(func, addr, buf, len); wl1251_sdio_write()
94 sdio_release_host(func); wl1251_sdio_write()
101 struct sdio_func *func = wl_sdio->func; wl1251_sdio_read_elp() local
109 sdio_claim_host(func); wl1251_sdio_read_elp()
110 *val = sdio_writeb_readb(func, wl_sdio->elp_val, addr, &ret); wl1251_sdio_read_elp()
111 sdio_release_host(func); wl1251_sdio_read_elp()
121 struct sdio_func *func = wl_sdio->func; wl1251_sdio_write_elp() local
123 sdio_claim_host(func); wl1251_sdio_write_elp()
124 sdio_writeb(func, val, addr, &ret); wl1251_sdio_write_elp()
125 sdio_release_host(func); wl1251_sdio_write_elp()
139 struct sdio_func *func = wl_to_func(wl); wl1251_sdio_enable_irq() local
141 sdio_claim_host(func); wl1251_sdio_enable_irq()
142 sdio_claim_irq(func, wl1251_sdio_interrupt); wl1251_sdio_enable_irq()
143 sdio_release_host(func); wl1251_sdio_enable_irq()
148 struct sdio_func *func = wl_to_func(wl); wl1251_sdio_disable_irq() local
150 sdio_claim_host(func); wl1251_sdio_disable_irq()
151 sdio_release_irq(func); wl1251_sdio_disable_irq()
152 sdio_release_host(func); wl1251_sdio_disable_irq()
177 struct sdio_func *func = wl_to_func(wl); wl1251_sdio_set_power() local
190 ret = pm_runtime_get_sync(&func->dev); wl1251_sdio_set_power()
192 pm_runtime_put_sync(&func->dev); wl1251_sdio_set_power()
196 sdio_claim_host(func); wl1251_sdio_set_power()
197 sdio_enable_func(func); wl1251_sdio_set_power()
198 sdio_release_host(func); wl1251_sdio_set_power()
200 sdio_claim_host(func); wl1251_sdio_set_power()
201 sdio_disable_func(func); wl1251_sdio_set_power()
202 sdio_release_host(func); wl1251_sdio_set_power()
204 ret = pm_runtime_put_sync(&func->dev); wl1251_sdio_set_power()
225 static int wl1251_sdio_probe(struct sdio_func *func, wl1251_sdio_probe() argument
246 sdio_claim_host(func); wl1251_sdio_probe()
247 ret = sdio_enable_func(func); wl1251_sdio_probe()
251 sdio_set_block_size(func, 512); wl1251_sdio_probe()
252 sdio_release_host(func); wl1251_sdio_probe()
254 SET_IEEE80211_DEV(hw, &func->dev); wl1251_sdio_probe()
255 wl_sdio->func = func; wl1251_sdio_probe()
267 ret = devm_gpio_request(&func->dev, wl->power_gpio, wl1251_sdio_probe()
300 sdio_set_drvdata(func, wl); wl1251_sdio_probe()
303 pm_runtime_put_noidle(&func->dev); wl1251_sdio_probe()
311 sdio_claim_host(func); wl1251_sdio_probe()
312 sdio_disable_func(func); wl1251_sdio_probe()
314 sdio_release_host(func); wl1251_sdio_probe()
321 static void wl1251_sdio_remove(struct sdio_func *func) wl1251_sdio_remove() argument
323 struct wl1251 *wl = sdio_get_drvdata(func); wl1251_sdio_remove()
327 pm_runtime_get_noresume(&func->dev); wl1251_sdio_remove()
334 sdio_claim_host(func); wl1251_sdio_remove()
335 sdio_release_irq(func); wl1251_sdio_remove()
336 sdio_disable_func(func); wl1251_sdio_remove()
337 sdio_release_host(func); wl1251_sdio_remove()
/linux-4.4.14/drivers/net/wireless/b43/
H A Dsdio.c53 static void b43_sdio_interrupt_dispatcher(struct sdio_func *func) b43_sdio_interrupt_dispatcher() argument
55 struct b43_sdio *sdio = sdio_get_drvdata(func); b43_sdio_interrupt_dispatcher()
61 sdio_release_host(func); b43_sdio_interrupt_dispatcher()
63 sdio_claim_host(func); b43_sdio_interrupt_dispatcher()
70 struct sdio_func *func = bus->host_sdio; b43_sdio_request_irq() local
71 struct b43_sdio *sdio = sdio_get_drvdata(func); b43_sdio_request_irq()
76 sdio_claim_host(func); b43_sdio_request_irq()
77 err = sdio_claim_irq(func, b43_sdio_interrupt_dispatcher); b43_sdio_request_irq()
78 sdio_release_host(func); b43_sdio_request_irq()
86 struct sdio_func *func = bus->host_sdio; b43_sdio_free_irq() local
87 struct b43_sdio *sdio = sdio_get_drvdata(func); b43_sdio_free_irq()
89 sdio_claim_host(func); b43_sdio_free_irq()
90 sdio_release_irq(func); b43_sdio_free_irq()
91 sdio_release_host(func); b43_sdio_free_irq()
96 static int b43_sdio_probe(struct sdio_func *func, b43_sdio_probe() argument
105 tuple = func->tuples; b43_sdio_probe()
115 dev_info(&func->dev, "Chip ID %04x:%04x\n", b43_sdio_probe()
132 sdio_claim_host(func); b43_sdio_probe()
133 error = sdio_set_block_size(func, B43_SDIO_BLOCK_SIZE); b43_sdio_probe()
135 dev_err(&func->dev, "failed to set block size to %u bytes," b43_sdio_probe()
139 error = sdio_enable_func(func); b43_sdio_probe()
141 dev_err(&func->dev, "failed to enable func, error %d\n", error); b43_sdio_probe()
144 sdio_release_host(func); b43_sdio_probe()
149 dev_err(&func->dev, "failed to allocate ssb bus\n"); b43_sdio_probe()
152 error = ssb_bus_sdiobus_register(&sdio->ssb, func, b43_sdio_probe()
155 dev_err(&func->dev, "failed to register ssb sdio bus," b43_sdio_probe()
159 sdio_set_drvdata(func, sdio); b43_sdio_probe()
166 sdio_claim_host(func); b43_sdio_probe()
167 sdio_disable_func(func); b43_sdio_probe()
169 sdio_release_host(func); b43_sdio_probe()
174 static void b43_sdio_remove(struct sdio_func *func) b43_sdio_remove() argument
176 struct b43_sdio *sdio = sdio_get_drvdata(func); b43_sdio_remove()
179 sdio_claim_host(func); b43_sdio_remove()
180 sdio_disable_func(func); b43_sdio_remove()
181 sdio_release_host(func); b43_sdio_remove()
183 sdio_set_drvdata(func, NULL); b43_sdio_remove()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
H A Dfanpwm.c34 struct dcb_gpio_func func; member in struct:nvkm_fanpwm
47 ret = therm->func->pwm_get(therm, fan->func.line, &divs, &duty); nvkm_fanpwm_get()
50 if (card_type <= NV_40 || (fan->func.log[0] & 1)) nvkm_fanpwm_get()
55 return nvkm_gpio_get(gpio, 0, fan->func.func, fan->func.line) * 100; nvkm_fanpwm_get()
69 if (therm->func->pwm_clock) nvkm_fanpwm_set()
70 divs = therm->func->pwm_clock(therm, fan->func.line); nvkm_fanpwm_set()
75 if (card_type <= NV_40 || (fan->func.log[0] & 1)) nvkm_fanpwm_set()
78 ret = therm->func->pwm_set(therm, fan->func.line, divs, duty); nvkm_fanpwm_set()
80 ret = therm->func->pwm_ctrl(therm, fan->func.line, true); nvkm_fanpwm_set()
85 nvkm_fanpwm_create(struct nvkm_therm *therm, struct dcb_gpio_func *func) nvkm_fanpwm_create() argument
95 if (!nvkm_boolopt(device->cfgopt, "NvFanPWM", func->param) || nvkm_fanpwm_create()
96 !therm->func->pwm_ctrl || info.type == NVBIOS_THERM_FAN_TOGGLE || nvkm_fanpwm_create()
97 therm->func->pwm_get(therm, func->line, &divs, &duty) == -ENODEV) nvkm_fanpwm_create()
108 fan->func = *func; nvkm_fanpwm_create()
H A Dfantog.c35 struct dcb_gpio_func func; member in struct:nvkm_fantog
84 if (therm->func->pwm_ctrl) nvkm_fantog_set()
85 therm->func->pwm_ctrl(therm, fan->func.line, false); nvkm_fantog_set()
91 nvkm_fantog_create(struct nvkm_therm *therm, struct dcb_gpio_func *func) nvkm_fantog_create() argument
96 if (therm->func->pwm_ctrl) { nvkm_fantog_create()
97 ret = therm->func->pwm_ctrl(therm, func->line, false); nvkm_fantog_create()
113 fan->func = *func; nvkm_fantog_create()
H A Dbase.c29 if (therm->func->temp_get) nvkm_therm_temp_get()
30 return therm->func->temp_get(therm); nvkm_therm_temp_get()
40 u8 temp = therm->func->temp_get(therm); nvkm_therm_update_trip()
71 u8 temp = therm->func->temp_get(therm); nvkm_therm_update_linear()
184 therm->func->temp_get(therm) < 0) nvkm_therm_fan_mode()
249 therm->func->program_alarms(therm); nvkm_therm_attr_set()
253 therm->func->program_alarms(therm); nvkm_therm_attr_set()
257 therm->func->program_alarms(therm); nvkm_therm_attr_set()
261 therm->func->program_alarms(therm); nvkm_therm_attr_set()
265 therm->func->program_alarms(therm); nvkm_therm_attr_set()
269 therm->func->program_alarms(therm); nvkm_therm_attr_set()
273 therm->func->program_alarms(therm); nvkm_therm_attr_set()
277 therm->func->program_alarms(therm); nvkm_therm_attr_set()
288 if (therm->func->intr) nvkm_therm_intr()
289 therm->func->intr(therm); nvkm_therm_intr()
297 if (therm->func->fini) nvkm_therm_fini()
298 therm->func->fini(therm); nvkm_therm_fini()
328 therm->func->init(therm); nvkm_therm_init()
361 nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device, nvkm_therm_new_() argument
370 therm->func = func; nvkm_therm_new_()
H A Dfan.c132 if (therm->func->fan_sense) nvkm_therm_fan_sense()
133 return therm->func->fan_sense(therm); nvkm_therm_fan_sense()
135 if (therm->fan->tach.func == DCB_GPIO_UNUSED) nvkm_therm_fan_sense()
143 prev = nvkm_gpio_get(gpio, 0, therm->fan->tach.func, nvkm_therm_fan_sense()
149 cur = nvkm_gpio_get(gpio, 0, therm->fan->tach.func, nvkm_therm_fan_sense()
229 struct dcb_gpio_func func; nvkm_therm_fan_ctor() local
233 ret = nvkm_gpio_find(gpio, 0, DCB_GPIO_FAN, 0xff, &func); nvkm_therm_fan_ctor()
236 if (func.line != 16 && func.log[0] & DCB_GPIO_LOG_DIR_IN) { nvkm_therm_fan_ctor()
240 ret = nvkm_fanpwm_create(therm, &func); nvkm_therm_fan_ctor()
242 ret = nvkm_fantog_create(therm, &func); nvkm_therm_fan_ctor()
262 therm->fan->tach.func = DCB_GPIO_UNUSED; nvkm_therm_fan_ctor()
/linux-4.4.14/drivers/staging/rts5208/
H A Dtrace.c8 void _rtsx_trace(struct rtsx_chip *chip, const char *file, const char *func, _rtsx_trace() argument
14 dev_dbg(rtsx_dev(chip), "[%s][%s]:[%d]\n", file, func, line); _rtsx_trace() local
17 strncpy(msg->func, func, MSG_FUNC_LEN - 1); _rtsx_trace()
/linux-4.4.14/include/linux/
H A Dtask_work.h10 init_task_work(struct callback_head *twork, task_work_func_t func) init_task_work() argument
12 twork->func = func; init_task_work()
H A Dirq_work.h23 void (*func)(struct irq_work *); member in struct:irq_work
27 void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) init_irq_work()
30 work->func = func; init_irq_work()
33 #define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), }
H A Donce.h13 * once, where DO_ONCE() can live in the fast-path. After @func has
20 * DO_ONCE(func, arg);
21 * DO_ONCE(func, arg);
27 * DO_ONCE(func, arg);
37 #define DO_ONCE(func, ...) \
46 func(__VA_ARGS__); \
H A Dsmp.h19 smp_call_func_t func; member in struct:call_single_data
27 int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
33 int on_each_cpu(smp_call_func_t func, void *info, int wait);
39 void on_each_cpu_mask(const struct cpumask *mask, smp_call_func_t func,
48 smp_call_func_t func, void *info, bool wait,
95 int smp_call_function(smp_call_func_t func, void *info, int wait);
97 smp_call_func_t func, void *info, bool wait);
100 smp_call_func_t func, void *info, int wait);
131 static inline int up_smp_call_function(smp_call_func_t func, void *info) up_smp_call_function() argument
135 #define smp_call_function(func, info, wait) \
136 (up_smp_call_function(func, info))
140 #define smp_call_function_many(mask, func, info, wait) \
141 (up_smp_call_function(func, info)) call_function_init()
145 smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, smp_call_function_any() argument
148 return smp_call_function_single(0, func, info, wait); smp_call_function_any()
H A Dcacheinfo.h77 * Helpers to make sure "func" is executed on the cpu whose cache
80 #define DEFINE_SMP_CALL_CACHE_FUNCTION(func) \
81 static inline void _##func(void *ret) \
84 *(int *)ret = __##func(cpu); \
87 int func(unsigned int cpu) \
90 smp_call_function_single(cpu, _##func, &ret, true); \
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/gr/
H A Dbase.c32 if (gr->func->tile) nvkm_gr_tile()
33 gr->func->tile(gr, region, tile); nvkm_gr_tile()
39 if (gr->func->units) nvkm_gr_units()
40 return gr->func->units(gr); nvkm_gr_units()
47 if (gr->func->tlb_flush) nvkm_gr_tlb_flush()
48 return gr->func->tlb_flush(gr); nvkm_gr_tlb_flush()
58 if (gr->func->object_get) { nvkm_gr_oclass_get()
59 int ret = gr->func->object_get(gr, index, &oclass->base); nvkm_gr_oclass_get()
65 while (gr->func->sclass[c].oclass) { nvkm_gr_oclass_get()
67 oclass->base = gr->func->sclass[index]; nvkm_gr_oclass_get()
81 if (gr->func->chan_new) nvkm_gr_cclass_new()
82 return gr->func->chan_new(gr, chan, oclass, pobject); nvkm_gr_cclass_new()
90 gr->func->intr(gr); nvkm_gr_intr()
97 if (gr->func->oneinit) nvkm_gr_oneinit()
98 return gr->func->oneinit(gr); nvkm_gr_oneinit()
106 return gr->func->init(gr); nvkm_gr_init()
113 if (gr->func->dtor) nvkm_gr_dtor()
114 return gr->func->dtor(gr); nvkm_gr_dtor()
130 nvkm_gr_ctor(const struct nvkm_gr_func *func, struct nvkm_device *device, nvkm_gr_ctor() argument
133 gr->func = func; nvkm_gr_ctor()
H A Dnv04.c760 bool (*func)(struct nvkm_device *, u32, u32); nv03_gr_mthd_gdi()
762 case 0x0184: func = nv01_gr_mthd_bind_patt; break; nv03_gr_mthd_gdi()
763 case 0x0188: func = nv04_gr_mthd_bind_rop; break; nv03_gr_mthd_gdi()
764 case 0x018c: func = nv04_gr_mthd_bind_beta1; break; nv03_gr_mthd_gdi()
765 case 0x0190: func = nv04_gr_mthd_bind_surf_dst; break; nv03_gr_mthd_gdi()
766 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv03_gr_mthd_gdi()
770 return func(device, inst, data); nv03_gr_mthd_gdi()
776 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_gdi()
778 case 0x0188: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_gdi()
779 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_gdi()
780 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_gdi()
781 case 0x0194: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_gdi()
782 case 0x0198: func = nv04_gr_mthd_bind_surf2d; break; nv04_gr_mthd_gdi()
783 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_gdi()
787 return func(device, inst, data); nv04_gr_mthd_gdi()
793 bool (*func)(struct nvkm_device *, u32, u32); nv01_gr_mthd_blit()
795 case 0x0184: func = nv01_gr_mthd_bind_chroma; break; nv01_gr_mthd_blit()
796 case 0x0188: func = nv01_gr_mthd_bind_clip; break; nv01_gr_mthd_blit()
797 case 0x018c: func = nv01_gr_mthd_bind_patt; break; nv01_gr_mthd_blit()
798 case 0x0190: func = nv04_gr_mthd_bind_rop; break; nv01_gr_mthd_blit()
799 case 0x0194: func = nv04_gr_mthd_bind_beta1; break; nv01_gr_mthd_blit()
800 case 0x0198: func = nv04_gr_mthd_bind_surf_dst; break; nv01_gr_mthd_blit()
801 case 0x019c: func = nv04_gr_mthd_bind_surf_src; break; nv01_gr_mthd_blit()
802 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv01_gr_mthd_blit()
806 return func(device, inst, data); nv01_gr_mthd_blit()
812 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_blit()
814 case 0x0184: func = nv01_gr_mthd_bind_chroma; break; nv04_gr_mthd_blit()
815 case 0x0188: func = nv01_gr_mthd_bind_clip; break; nv04_gr_mthd_blit()
816 case 0x018c: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_blit()
817 case 0x0190: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_blit()
818 case 0x0194: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_blit()
819 case 0x0198: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_blit()
820 case 0x019c: func = nv04_gr_mthd_bind_surf2d; break; nv04_gr_mthd_blit()
821 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_blit()
825 return func(device, inst, data); nv04_gr_mthd_blit()
831 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_iifc()
833 case 0x0188: func = nv01_gr_mthd_bind_chroma; break; nv04_gr_mthd_iifc()
834 case 0x018c: func = nv01_gr_mthd_bind_clip; break; nv04_gr_mthd_iifc()
835 case 0x0190: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_iifc()
836 case 0x0194: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_iifc()
837 case 0x0198: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_iifc()
838 case 0x019c: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_iifc()
839 case 0x01a0: func = nv04_gr_mthd_bind_surf2d_swzsurf; break; nv04_gr_mthd_iifc()
840 case 0x03e4: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_iifc()
844 return func(device, inst, data); nv04_gr_mthd_iifc()
850 bool (*func)(struct nvkm_device *, u32, u32); nv01_gr_mthd_ifc()
852 case 0x0184: func = nv01_gr_mthd_bind_chroma; break; nv01_gr_mthd_ifc()
853 case 0x0188: func = nv01_gr_mthd_bind_clip; break; nv01_gr_mthd_ifc()
854 case 0x018c: func = nv01_gr_mthd_bind_patt; break; nv01_gr_mthd_ifc()
855 case 0x0190: func = nv04_gr_mthd_bind_rop; break; nv01_gr_mthd_ifc()
856 case 0x0194: func = nv04_gr_mthd_bind_beta1; break; nv01_gr_mthd_ifc()
857 case 0x0198: func = nv04_gr_mthd_bind_surf_dst; break; nv01_gr_mthd_ifc()
858 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv01_gr_mthd_ifc()
862 return func(device, inst, data); nv01_gr_mthd_ifc()
868 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_ifc()
870 case 0x0184: func = nv01_gr_mthd_bind_chroma; break; nv04_gr_mthd_ifc()
871 case 0x0188: func = nv01_gr_mthd_bind_clip; break; nv04_gr_mthd_ifc()
872 case 0x018c: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_ifc()
873 case 0x0190: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_ifc()
874 case 0x0194: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_ifc()
875 case 0x0198: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_ifc()
876 case 0x019c: func = nv04_gr_mthd_bind_surf2d; break; nv04_gr_mthd_ifc()
877 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_ifc()
881 return func(device, inst, data); nv04_gr_mthd_ifc()
887 bool (*func)(struct nvkm_device *, u32, u32); nv03_gr_mthd_sifc()
889 case 0x0184: func = nv01_gr_mthd_bind_chroma; break; nv03_gr_mthd_sifc()
890 case 0x0188: func = nv01_gr_mthd_bind_patt; break; nv03_gr_mthd_sifc()
891 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv03_gr_mthd_sifc()
892 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv03_gr_mthd_sifc()
893 case 0x0194: func = nv04_gr_mthd_bind_surf_dst; break; nv03_gr_mthd_sifc()
894 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv03_gr_mthd_sifc()
898 return func(device, inst, data); nv03_gr_mthd_sifc()
904 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_sifc()
906 case 0x0184: func = nv01_gr_mthd_bind_chroma; break; nv04_gr_mthd_sifc()
907 case 0x0188: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_sifc()
908 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_sifc()
909 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_sifc()
910 case 0x0194: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_sifc()
911 case 0x0198: func = nv04_gr_mthd_bind_surf2d; break; nv04_gr_mthd_sifc()
912 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_sifc()
916 return func(device, inst, data); nv04_gr_mthd_sifc()
922 bool (*func)(struct nvkm_device *, u32, u32); nv03_gr_mthd_sifm()
924 case 0x0188: func = nv01_gr_mthd_bind_patt; break; nv03_gr_mthd_sifm()
925 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv03_gr_mthd_sifm()
926 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv03_gr_mthd_sifm()
927 case 0x0194: func = nv04_gr_mthd_bind_surf_dst; break; nv03_gr_mthd_sifm()
928 case 0x0304: func = nv04_gr_mthd_set_operation; break; nv03_gr_mthd_sifm()
932 return func(device, inst, data); nv03_gr_mthd_sifm()
938 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_sifm()
940 case 0x0188: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_sifm()
941 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_sifm()
942 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_sifm()
943 case 0x0194: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_sifm()
944 case 0x0198: func = nv04_gr_mthd_bind_surf2d; break; nv04_gr_mthd_sifm()
945 case 0x0304: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_sifm()
949 return func(device, inst, data); nv04_gr_mthd_sifm()
955 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_surf3d()
957 case 0x02f8: func = nv04_gr_mthd_surf3d_clip_h; break; nv04_gr_mthd_surf3d()
958 case 0x02fc: func = nv04_gr_mthd_surf3d_clip_v; break; nv04_gr_mthd_surf3d()
962 return func(device, inst, data); nv04_gr_mthd_surf3d()
968 bool (*func)(struct nvkm_device *, u32, u32); nv03_gr_mthd_ttri()
970 case 0x0188: func = nv01_gr_mthd_bind_clip; break; nv03_gr_mthd_ttri()
971 case 0x018c: func = nv04_gr_mthd_bind_surf_color; break; nv03_gr_mthd_ttri()
972 case 0x0190: func = nv04_gr_mthd_bind_surf_zeta; break; nv03_gr_mthd_ttri()
976 return func(device, inst, data); nv03_gr_mthd_ttri()
982 bool (*func)(struct nvkm_device *, u32, u32); nv01_gr_mthd_prim()
984 case 0x0184: func = nv01_gr_mthd_bind_clip; break; nv01_gr_mthd_prim()
985 case 0x0188: func = nv01_gr_mthd_bind_patt; break; nv01_gr_mthd_prim()
986 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv01_gr_mthd_prim()
987 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv01_gr_mthd_prim()
988 case 0x0194: func = nv04_gr_mthd_bind_surf_dst; break; nv01_gr_mthd_prim()
989 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv01_gr_mthd_prim()
993 return func(device, inst, data); nv01_gr_mthd_prim()
999 bool (*func)(struct nvkm_device *, u32, u32); nv04_gr_mthd_prim()
1001 case 0x0184: func = nv01_gr_mthd_bind_clip; break; nv04_gr_mthd_prim()
1002 case 0x0188: func = nv04_gr_mthd_bind_patt; break; nv04_gr_mthd_prim()
1003 case 0x018c: func = nv04_gr_mthd_bind_rop; break; nv04_gr_mthd_prim()
1004 case 0x0190: func = nv04_gr_mthd_bind_beta1; break; nv04_gr_mthd_prim()
1005 case 0x0194: func = nv04_gr_mthd_bind_beta4; break; nv04_gr_mthd_prim()
1006 case 0x0198: func = nv04_gr_mthd_bind_surf2d; break; nv04_gr_mthd_prim()
1007 case 0x02fc: func = nv04_gr_mthd_set_operation; break; nv04_gr_mthd_prim()
1011 return func(device, inst, data); nv04_gr_mthd_prim()
1017 bool (*func)(struct nvkm_device *, u32, u32, u32); nv04_gr_mthd()
1020 func = nv01_gr_mthd_prim; break; nv04_gr_mthd()
1021 case 0x1f: func = nv01_gr_mthd_blit; break; nv04_gr_mthd()
1022 case 0x21: func = nv01_gr_mthd_ifc; break; nv04_gr_mthd()
1023 case 0x36: func = nv03_gr_mthd_sifc; break; nv04_gr_mthd()
1024 case 0x37: func = nv03_gr_mthd_sifm; break; nv04_gr_mthd()
1025 case 0x48: func = nv03_gr_mthd_ttri; break; nv04_gr_mthd()
1026 case 0x4a: func = nv04_gr_mthd_gdi; break; nv04_gr_mthd()
1027 case 0x4b: func = nv03_gr_mthd_gdi; break; nv04_gr_mthd()
1028 case 0x53: func = nv04_gr_mthd_surf3d; break; nv04_gr_mthd()
1030 func = nv04_gr_mthd_prim; break; nv04_gr_mthd()
1031 case 0x5f: func = nv04_gr_mthd_blit; break; nv04_gr_mthd()
1032 case 0x60: func = nv04_gr_mthd_iifc; break; nv04_gr_mthd()
1033 case 0x61: func = nv04_gr_mthd_ifc; break; nv04_gr_mthd()
1034 case 0x76: func = nv04_gr_mthd_sifc; break; nv04_gr_mthd()
1035 case 0x77: func = nv04_gr_mthd_sifm; break; nv04_gr_mthd()
1039 return func(device, inst, mthd, data); nv04_gr_mthd()
/linux-4.4.14/arch/x86/include/asm/
H A Dpci-direct.h9 extern u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset);
10 extern u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset);
11 extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset);
12 extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val);
13 extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val);
14 extern void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val);
19 extern void early_dump_pci_device(u8 bus, u8 slot, u8 func);
H A Dapm.h26 static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in, apm_bios_call_asm() argument
44 : "a" (func), "b" (ebx_in), "c" (ecx_in) apm_bios_call_asm()
48 static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in, apm_bios_call_simple_asm() argument
68 : "a" (func), "b" (ebx_in), "c" (ecx_in) apm_bios_call_simple_asm()
/linux-4.4.14/arch/powerpc/math-emu/
H A Dmath.c232 int (*func)(void *, void *, void *, void *); do_mathemu()
240 case LFS: func = lfs; type = D; break; do_mathemu()
241 case LFSU: func = lfs; type = DU; break; do_mathemu()
242 case LFD: func = lfd; type = D; break; do_mathemu()
243 case LFDU: func = lfd; type = DU; break; do_mathemu()
244 case STFS: func = stfs; type = D; break; do_mathemu()
245 case STFSU: func = stfs; type = DU; break; do_mathemu()
246 case STFD: func = stfd; type = D; break; do_mathemu()
247 case STFDU: func = stfd; type = DU; break; do_mathemu()
251 case LFSX: func = lfs; type = XE; break; do_mathemu()
252 case LFSUX: func = lfs; type = XEU; break; do_mathemu()
253 case LFDX: func = lfd; type = XE; break; do_mathemu()
254 case LFDUX: func = lfd; type = XEU; break; do_mathemu()
255 case STFSX: func = stfs; type = XE; break; do_mathemu()
256 case STFSUX: func = stfs; type = XEU; break; do_mathemu()
257 case STFDX: func = stfd; type = XE; break; do_mathemu()
258 case STFDUX: func = stfd; type = XEU; break; do_mathemu()
259 case STFIWX: func = stfiwx; type = XE; break; do_mathemu()
267 case FDIVS: func = fdivs; type = AB; break; do_mathemu()
268 case FSUBS: func = fsubs; type = AB; break; do_mathemu()
269 case FADDS: func = fadds; type = AB; break; do_mathemu()
270 case FSQRTS: func = fsqrts; type = XB; break; do_mathemu()
271 case FRES: func = fres; type = XB; break; do_mathemu()
272 case FMULS: func = fmuls; type = AC; break; do_mathemu()
273 case FRSQRTES: func = frsqrtes;type = XB; break; do_mathemu()
274 case FMSUBS: func = fmsubs; type = ABC; break; do_mathemu()
275 case FMADDS: func = fmadds; type = ABC; break; do_mathemu()
276 case FNMSUBS: func = fnmsubs; type = ABC; break; do_mathemu()
277 case FNMADDS: func = fnmadds; type = ABC; break; do_mathemu()
286 case FDIV: func = fdiv; type = AB; break; do_mathemu()
287 case FSUB: func = fsub; type = AB; break; do_mathemu()
288 case FADD: func = fadd; type = AB; break; do_mathemu()
289 case FSQRT: func = fsqrt; type = XB; break; do_mathemu()
290 case FRE: func = fre; type = XB; break; do_mathemu()
291 case FSEL: func = fsel; type = ABC; break; do_mathemu()
292 case FMUL: func = fmul; type = AC; break; do_mathemu()
293 case FRSQRTE: func = frsqrte; type = XB; break; do_mathemu()
294 case FMSUB: func = fmsub; type = ABC; break; do_mathemu()
295 case FMADD: func = fmadd; type = ABC; break; do_mathemu()
296 case FNMSUB: func = fnmsub; type = ABC; break; do_mathemu()
297 case FNMADD: func = fnmadd; type = ABC; break; do_mathemu()
305 case FCMPU: func = fcmpu; type = XCR; break; do_mathemu()
306 case FRSP: func = frsp; type = XB; break; do_mathemu()
307 case FCTIW: func = fctiw; type = XB; break; do_mathemu()
308 case FCTIWZ: func = fctiwz; type = XB; break; do_mathemu()
309 case FCMPO: func = fcmpo; type = XCR; break; do_mathemu()
310 case MTFSB1: func = mtfsb1; type = XCRB; break; do_mathemu()
311 case FNEG: func = fneg; type = XB; break; do_mathemu()
312 case MCRFS: func = mcrfs; type = XCRL; break; do_mathemu()
313 case MTFSB0: func = mtfsb0; type = XCRB; break; do_mathemu()
314 case FMR: func = fmr; type = XB; break; do_mathemu()
315 case MTFSFI: func = mtfsfi; type = XCRI; break; do_mathemu()
316 case FNABS: func = fnabs; type = XB; break; do_mathemu()
317 case FABS: func = fabs; type = XB; break; do_mathemu()
318 case MFFS: func = mffs; type = X; break; do_mathemu()
319 case MTFSF: func = mtfsf; type = XFLB; break; do_mathemu()
434 eflag = func(op0, op1, op2, op3); do_mathemu()
H A Dmath_efp.c185 unsigned long type, func, fc, fa, fb, src, speinsn; do_spe_mathemu() local
197 func = speinsn & 0x7ff; do_spe_mathemu()
236 switch (func) { do_spe_mathemu()
283 SB_e += (func == EFSCTSF ? 31 : 32); do_spe_mathemu()
285 (func == EFSCTSF)); do_spe_mathemu()
308 ((func & 0x3) != 0)); do_spe_mathemu()
319 ((func & 0x3) != 0)); do_spe_mathemu()
366 switch (func) { do_spe_mathemu()
413 DB_e += (func == EFDCTSF ? 31 : 32); do_spe_mathemu()
415 (func == EFDCTSF)); do_spe_mathemu()
438 ((func & 0x1) == 0)); do_spe_mathemu()
449 ((func & 0x3) != 0)); do_spe_mathemu()
460 ((func & 0x3) != 0)); do_spe_mathemu()
518 switch (func) { do_spe_mathemu()
572 SB0_e += (func == EVFSCTSF ? 31 : 32); do_spe_mathemu()
574 (func == EVFSCTSF)); do_spe_mathemu()
580 SB1_e += (func == EVFSCTSF ? 31 : 32); do_spe_mathemu()
582 (func == EVFSCTSF)); do_spe_mathemu()
593 ((func & 0x3) != 0)); do_spe_mathemu()
600 ((func & 0x3) != 0)); do_spe_mathemu()
611 ((func & 0x3) != 0)); do_spe_mathemu()
618 ((func & 0x3) != 0)); do_spe_mathemu()
732 unsigned long speinsn, type, fb, fc, fptype, func; speround_handler() local
739 func = speinsn & 0x7ff; speround_handler()
740 type = insn_type(func); speround_handler()
761 switch (func) { speround_handler()
/linux-4.4.14/drivers/media/mmc/siano/
H A Dsmssdio.c82 struct sdio_func *func; member in struct:smssdio_device
100 sdio_claim_host(smsdev->func); smssdio_sendrequest()
103 while (size >= smsdev->func->cur_blksize) { smssdio_sendrequest()
104 ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA, smssdio_sendrequest()
105 buffer, smsdev->func->cur_blksize); smssdio_sendrequest()
109 buffer += smsdev->func->cur_blksize; smssdio_sendrequest()
110 size -= smsdev->func->cur_blksize; smssdio_sendrequest()
114 ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA, smssdio_sendrequest()
119 sdio_release_host(smsdev->func); smssdio_sendrequest()
128 static void smssdio_interrupt(struct sdio_func *func) smssdio_interrupt() argument
137 smsdev = sdio_get_drvdata(func); smssdio_interrupt()
143 (void)sdio_readb(func, SMSSDIO_INT, &ret); smssdio_interrupt()
156 ret = sdio_memcpy_fromio(smsdev->func, smssdio_interrupt()
172 if (hdr->msg_length > smsdev->func->cur_blksize) smssdio_interrupt()
173 size = hdr->msg_length - smsdev->func->cur_blksize; smssdio_interrupt()
191 BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE); smssdio_interrupt()
196 ret = sdio_memcpy_fromio(smsdev->func, smssdio_interrupt()
215 ret = sdio_memcpy_fromio(smsdev->func, smssdio_interrupt()
217 smsdev->func->cur_blksize); smssdio_interrupt()
225 buffer += smsdev->func->cur_blksize; smssdio_interrupt()
226 if (size > smsdev->func->cur_blksize) smssdio_interrupt()
227 size -= smsdev->func->cur_blksize; smssdio_interrupt()
241 static int smssdio_probe(struct sdio_func *func, smssdio_probe() argument
256 smsdev->func = func; smssdio_probe()
260 params.device = &func->dev; smssdio_probe()
266 "sdio\\%s", sdio_func_id(func)); smssdio_probe()
288 sdio_claim_host(func); smssdio_probe()
290 ret = sdio_enable_func(func); smssdio_probe()
294 ret = sdio_set_block_size(func, SMSSDIO_BLOCK_SIZE); smssdio_probe()
298 ret = sdio_claim_irq(func, smssdio_interrupt); smssdio_probe()
302 sdio_set_drvdata(func, smsdev); smssdio_probe()
304 sdio_release_host(func); smssdio_probe()
313 sdio_claim_host(func); smssdio_probe()
314 sdio_release_irq(func); smssdio_probe()
316 sdio_disable_func(func); smssdio_probe()
318 sdio_release_host(func); smssdio_probe()
326 static void smssdio_remove(struct sdio_func *func) smssdio_remove() argument
330 smsdev = sdio_get_drvdata(func); smssdio_remove()
338 sdio_claim_host(func); smssdio_remove()
339 sdio_release_irq(func); smssdio_remove()
340 sdio_disable_func(func); smssdio_remove()
341 sdio_release_host(func); smssdio_remove()
/linux-4.4.14/drivers/bluetooth/
H A Dbtsdio.c59 struct sdio_func *func; member in struct:btsdio_data
91 err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len); btsdio_tx_packet()
94 sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL); btsdio_tx_packet()
113 sdio_claim_host(data->func); btsdio_work()
124 sdio_release_host(data->func); btsdio_work()
135 err = sdio_readsb(data->func, hdr, REG_RDAT, 4); btsdio_rx_packet()
153 err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4); btsdio_rx_packet()
167 sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); btsdio_rx_packet()
172 static void btsdio_interrupt(struct sdio_func *func) btsdio_interrupt() argument
174 struct btsdio_data *data = sdio_get_drvdata(func); btsdio_interrupt()
179 intrd = sdio_readb(func, REG_INTRD, NULL); btsdio_interrupt()
181 sdio_writeb(func, 0x01, REG_CL_INTRD, NULL); btsdio_interrupt()
185 sdio_writeb(data->func, 0x01, REG_PC_RRT, NULL); btsdio_interrupt()
197 sdio_claim_host(data->func); btsdio_open()
199 err = sdio_enable_func(data->func); btsdio_open()
203 err = sdio_claim_irq(data->func, btsdio_interrupt); btsdio_open()
205 sdio_disable_func(data->func); btsdio_open()
209 if (data->func->class == SDIO_CLASS_BT_B) btsdio_open()
210 sdio_writeb(data->func, 0x00, REG_MD_SET, NULL); btsdio_open()
212 sdio_writeb(data->func, 0x01, REG_EN_INTRD, NULL); btsdio_open()
215 sdio_release_host(data->func); btsdio_open()
226 sdio_claim_host(data->func); btsdio_close()
228 sdio_writeb(data->func, 0x00, REG_EN_INTRD, NULL); btsdio_close()
230 sdio_release_irq(data->func); btsdio_close()
231 sdio_disable_func(data->func); btsdio_close()
233 sdio_release_host(data->func); btsdio_close()
279 static int btsdio_probe(struct sdio_func *func, btsdio_probe() argument
284 struct sdio_func_tuple *tuple = func->tuples; btsdio_probe()
287 BT_DBG("func %p id %p class 0x%04x", func, id, func->class); btsdio_probe()
294 data = devm_kzalloc(&func->dev, sizeof(*data), GFP_KERNEL); btsdio_probe()
298 data->func = func; btsdio_probe()
318 SET_HCIDEV_DEV(hdev, &func->dev); btsdio_probe()
325 if (func->vendor == 0x0104 && func->device == 0x00c5) btsdio_probe()
334 sdio_set_drvdata(func, data); btsdio_probe()
339 static void btsdio_remove(struct sdio_func *func) btsdio_remove() argument
341 struct btsdio_data *data = sdio_get_drvdata(func); btsdio_remove()
344 BT_DBG("func %p", func); btsdio_remove()
351 sdio_set_drvdata(func, NULL); btsdio_remove()
H A Dbtmrvl_sdio.c259 reg = sdio_readb(card->func, card->reg->card_rx_unit, &ret); btmrvl_sdio_get_rx_unit()
273 fws0 = sdio_readb(card->func, card->reg->card_fw_status0, &ret); btmrvl_sdio_read_fw_status()
277 fws1 = sdio_readb(card->func, card->reg->card_fw_status1, &ret); btmrvl_sdio_read_fw_status()
291 reg = sdio_readb(card->func, card->reg->card_rx_len, &ret); btmrvl_sdio_read_rx_len()
303 sdio_writeb(card->func, mask, card->reg->host_int_mask, &ret); btmrvl_sdio_enable_host_int_mask()
318 host_int_mask = sdio_readb(card->func, card->reg->host_int_mask, &ret); btmrvl_sdio_disable_host_int_mask()
324 sdio_writeb(card->func, host_int_mask, card->reg->host_int_mask, &ret); btmrvl_sdio_disable_host_int_mask()
340 status = sdio_readb(card->func, card->reg->card_status, &ret); btmrvl_sdio_poll_card_status()
365 sdio_claim_host(card->func); btmrvl_sdio_verify_fw_download()
367 sdio_release_host(card->func); btmrvl_sdio_verify_fw_download()
391 &card->func->dev); btmrvl_sdio_download_helper()
448 ret = sdio_writesb(card->func, card->ioport, helperbuf, btmrvl_sdio_download_helper()
463 ret = sdio_writesb(card->func, card->ioport, helperbuf, btmrvl_sdio_download_helper()
491 &card->func->dev); btmrvl_sdio_download_fw_w_helper()
532 base0 = sdio_readb(card->func, btmrvl_sdio_download_fw_w_helper()
542 base1 = sdio_readb(card->func, btmrvl_sdio_download_fw_w_helper()
596 ret = sdio_writesb(card->func, card->ioport, fwbuf, btmrvl_sdio_download_fw_w_helper()
602 sdio_writeb(card->func, HOST_CMD53_FIN, btmrvl_sdio_download_fw_w_helper()
631 if (!card || !card->func) { btmrvl_sdio_card_to_host()
672 ret = sdio_readsb(card->func, payload, card->ioport, btmrvl_sdio_card_to_host()
755 sdio_claim_host(card->func); btmrvl_sdio_process_int_status()
767 sdio_release_host(card->func); btmrvl_sdio_process_int_status()
777 ret = sdio_readsb(card->func, adapter->hw_regs, 0, SDIO_BLOCK_SIZE); btmrvl_sdio_read_to_clear()
793 *ireg = sdio_readb(card->func, card->reg->host_intstatus, &ret); btmrvl_sdio_write_to_clear()
807 sdio_writeb(card->func, ~(*ireg) & (DN_LD_HOST_INT_STATUS | btmrvl_sdio_write_to_clear()
819 static void btmrvl_sdio_interrupt(struct sdio_func *func) btmrvl_sdio_interrupt() argument
827 card = sdio_get_drvdata(func); btmrvl_sdio_interrupt()
830 func, card); btmrvl_sdio_interrupt()
856 struct sdio_func *func; btmrvl_sdio_register_dev() local
860 if (!card || !card->func) { btmrvl_sdio_register_dev()
866 func = card->func; btmrvl_sdio_register_dev()
868 sdio_claim_host(func); btmrvl_sdio_register_dev()
870 ret = sdio_enable_func(func); btmrvl_sdio_register_dev()
877 ret = sdio_claim_irq(func, btmrvl_sdio_interrupt); btmrvl_sdio_register_dev()
884 ret = sdio_set_block_size(card->func, SDIO_BLOCK_SIZE); btmrvl_sdio_register_dev()
891 reg = sdio_readb(func, card->reg->io_port_0, &ret); btmrvl_sdio_register_dev()
899 reg = sdio_readb(func, card->reg->io_port_1, &ret); btmrvl_sdio_register_dev()
907 reg = sdio_readb(func, card->reg->io_port_2, &ret); btmrvl_sdio_register_dev()
915 BT_DBG("SDIO FUNC%d IO port: 0x%x", func->num, card->ioport); btmrvl_sdio_register_dev()
918 reg = sdio_readb(func, card->reg->host_int_rsr, &ret); btmrvl_sdio_register_dev()
923 sdio_writeb(func, reg | 0x3f, card->reg->host_int_rsr, &ret); btmrvl_sdio_register_dev()
929 reg = sdio_readb(func, card->reg->card_misc_cfg, &ret); btmrvl_sdio_register_dev()
934 sdio_writeb(func, reg | 0x10, card->reg->card_misc_cfg, &ret); btmrvl_sdio_register_dev()
941 sdio_set_drvdata(func, card); btmrvl_sdio_register_dev()
943 sdio_release_host(func); btmrvl_sdio_register_dev()
948 sdio_release_irq(func); btmrvl_sdio_register_dev()
951 sdio_disable_func(func); btmrvl_sdio_register_dev()
954 sdio_release_host(func); btmrvl_sdio_register_dev()
962 if (card && card->func) { btmrvl_sdio_unregister_dev()
963 sdio_claim_host(card->func); btmrvl_sdio_unregister_dev()
964 sdio_release_irq(card->func); btmrvl_sdio_unregister_dev()
965 sdio_disable_func(card->func); btmrvl_sdio_unregister_dev()
966 sdio_release_host(card->func); btmrvl_sdio_unregister_dev()
967 sdio_set_drvdata(card->func, NULL); btmrvl_sdio_unregister_dev()
977 if (!card || !card->func) btmrvl_sdio_enable_host_int()
980 sdio_claim_host(card->func); btmrvl_sdio_enable_host_int()
986 sdio_release_host(card->func); btmrvl_sdio_enable_host_int()
995 if (!card || !card->func) btmrvl_sdio_disable_host_int()
998 sdio_claim_host(card->func); btmrvl_sdio_disable_host_int()
1002 sdio_release_host(card->func); btmrvl_sdio_disable_host_int()
1019 if (!card || !card->func) { btmrvl_sdio_host_to_card()
1037 sdio_claim_host(card->func); btmrvl_sdio_host_to_card()
1041 ret = sdio_writesb(card->func, card->ioport, buf, btmrvl_sdio_host_to_card()
1056 sdio_release_host(card->func); btmrvl_sdio_host_to_card()
1068 if (!card || !card->func) { btmrvl_sdio_download_fw()
1078 sdio_claim_host(card->func); btmrvl_sdio_download_fw()
1081 fws0 = sdio_readb(card->func, card->reg->card_fw_status0, &ret); btmrvl_sdio_download_fw()
1118 sdio_release_host(card->func); btmrvl_sdio_download_fw()
1123 sdio_release_host(card->func); btmrvl_sdio_download_fw()
1132 if (!card || !card->func) { btmrvl_sdio_wakeup_fw()
1137 sdio_claim_host(card->func); btmrvl_sdio_wakeup_fw()
1139 sdio_writeb(card->func, HOST_POWER_UP, card->reg->cfg, &ret); btmrvl_sdio_wakeup_fw()
1141 sdio_release_host(card->func); btmrvl_sdio_wakeup_fw()
1154 u8 loop, func, data; btmrvl_sdio_dump_regs() local
1158 sdio_claim_host(card->func); btmrvl_sdio_dump_regs()
1166 func = loop; btmrvl_sdio_dump_regs()
1170 func = 2; btmrvl_sdio_dump_regs()
1176 func, reg_start, reg_end); btmrvl_sdio_dump_regs()
1178 if (func == 0) btmrvl_sdio_dump_regs()
1179 data = sdio_f0_readb(card->func, reg, &ret); btmrvl_sdio_dump_regs()
1181 data = sdio_readb(card->func, reg, &ret); btmrvl_sdio_dump_regs()
1194 sdio_release_host(card->func); btmrvl_sdio_dump_regs()
1206 sdio_writeb(card->func, FW_DUMP_HOST_READY, card->reg->fw_dump_ctrl, btmrvl_sdio_rdwr_firmware()
1215 ctrl_data = sdio_readb(card->func, card->reg->fw_dump_ctrl, btmrvl_sdio_rdwr_firmware()
1229 sdio_writeb(card->func, FW_DUMP_HOST_READY, btmrvl_sdio_rdwr_firmware()
1277 sdio_claim_host(card->func); btmrvl_sdio_dump_firmware()
1287 dump_num = sdio_readb(card->func, reg, &ret); btmrvl_sdio_dump_firmware()
1305 read_reg = sdio_readb(card->func, reg, &ret); btmrvl_sdio_dump_firmware()
1316 sdio_writeb(card->func, FW_DUMP_READ_DONE, btmrvl_sdio_dump_firmware()
1354 *dbg_ptr = sdio_readb(card->func, reg, &ret); btmrvl_sdio_dump_firmware()
1379 sdio_release_host(card->func); btmrvl_sdio_dump_firmware()
1420 dev_coredumpv(&card->func->dev, fw_dump_data, fw_dump_len, GFP_KERNEL); btmrvl_sdio_dump_firmware()
1424 static int btmrvl_sdio_probe(struct sdio_func *func, btmrvl_sdio_probe() argument
1432 id->vendor, id->device, id->class, func->num); btmrvl_sdio_probe()
1434 card = devm_kzalloc(&func->dev, sizeof(*card), GFP_KERNEL); btmrvl_sdio_probe()
1438 card->func = func; btmrvl_sdio_probe()
1496 static void btmrvl_sdio_remove(struct sdio_func *func) btmrvl_sdio_remove() argument
1500 if (func) { btmrvl_sdio_remove()
1501 card = sdio_get_drvdata(func); btmrvl_sdio_remove()
1521 struct sdio_func *func = dev_to_sdio_func(dev); btmrvl_sdio_suspend() local
1527 if (func) { btmrvl_sdio_suspend()
1528 pm_flags = sdio_get_host_pm_caps(func); btmrvl_sdio_suspend()
1529 BT_DBG("%s: suspend: PM flags = 0x%x", sdio_func_id(func), btmrvl_sdio_suspend()
1533 sdio_func_id(func)); btmrvl_sdio_suspend()
1536 card = sdio_get_drvdata(func); btmrvl_sdio_suspend()
1564 return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); btmrvl_sdio_suspend()
1573 struct sdio_func *func = dev_to_sdio_func(dev); btmrvl_sdio_resume() local
1579 if (func) { btmrvl_sdio_resume()
1580 pm_flags = sdio_get_host_pm_caps(func); btmrvl_sdio_resume()
1581 BT_DBG("%s: resume: PM flags = 0x%x", sdio_func_id(func), btmrvl_sdio_resume()
1583 card = sdio_get_drvdata(func); btmrvl_sdio_resume()
/linux-4.4.14/drivers/staging/wilc1000/
H A Dlinux_wlan_sdio.c25 struct sdio_func *func; member in struct:wilc_sdio
42 static void wilc_sdio_interrupt(struct sdio_func *func) wilc_sdio_interrupt() argument
46 wl_sdio = sdio_get_drvdata(func); wilc_sdio_interrupt()
49 sdio_release_host(func); wilc_sdio_interrupt()
51 sdio_claim_host(func); wilc_sdio_interrupt()
58 struct sdio_func *func = g_linux_wlan->wilc_sdio_func; linux_sdio_cmd52() local
62 sdio_claim_host(func); linux_sdio_cmd52()
64 func->num = cmd->function; linux_sdio_cmd52()
67 sdio_writeb(func, cmd->data, cmd->address, &ret); linux_sdio_cmd52()
68 data = sdio_readb(func, cmd->address, &ret); linux_sdio_cmd52()
71 sdio_writeb(func, cmd->data, cmd->address, &ret); linux_sdio_cmd52()
74 data = sdio_readb(func, cmd->address, &ret); linux_sdio_cmd52()
78 sdio_release_host(func); linux_sdio_cmd52()
90 struct sdio_func *func = g_linux_wlan->wilc_sdio_func; linux_sdio_cmd53() local
93 sdio_claim_host(func); linux_sdio_cmd53()
95 func->num = cmd->function; linux_sdio_cmd53()
96 func->cur_blksize = cmd->block_size; linux_sdio_cmd53()
103 ret = sdio_memcpy_toio(func, cmd->address, (void *)cmd->buffer, size); linux_sdio_cmd53()
105 ret = sdio_memcpy_fromio(func, (void *)cmd->buffer, cmd->address, size); linux_sdio_cmd53()
108 sdio_release_host(func); linux_sdio_cmd53()
119 static int linux_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) linux_sdio_probe() argument
130 local_sdio_func = func; linux_sdio_probe()
136 wl_sdio->func = func; linux_sdio_probe()
138 sdio_set_drvdata(func, wl_sdio); linux_sdio_probe()
144 static void linux_sdio_remove(struct sdio_func *func) linux_sdio_remove() argument
148 wl_sdio = sdio_get_drvdata(func); linux_sdio_remove()
H A Dwilc_wlan_cfg.h37 int wilc_wlan_cfg_init(wilc_debug_func func);
/linux-4.4.14/tools/perf/tests/
H A Dbuiltin-test.c19 .func = NULL,
26 .func = test__vmlinux_matches_kallsyms,
30 .func = test__openat_syscall_event,
34 .func = test__openat_syscall_event_on_all_cpus,
38 .func = test__basic_mmap,
42 .func = test__parse_events,
46 .func = test__PERF_RECORD,
50 .func = test__pmu,
54 .func = test__dso_data,
58 .func = test__dso_data_cache,
62 .func = test__dso_data_reopen,
66 .func = test__perf_evsel__roundtrip_name_test,
70 .func = test__perf_evsel__tp_sched_test,
74 .func = test__syscall_openat_tp_fields,
78 .func = test__attr,
82 .func = test__hists_link,
86 .func = test__python_use,
90 .func = test__bp_signal,
94 .func = test__bp_signal_overflow,
98 .func = test__task_exit,
102 .func = test__sw_clock_freq,
106 .func = test__code_reading,
110 .func = test__sample_parsing,
114 .func = test__keep_tracking,
118 .func = test__parse_no_sample_id_all,
122 .func = test__hists_filter,
126 .func = test__mmap_thread_lookup,
130 .func = test__thread_mg_share,
134 .func = test__hists_output,
138 .func = test__hists_cumulate,
142 .func = test__switch_tracking,
146 .func = test__fdarray__filter,
150 .func = test__fdarray__add,
154 .func = test__kmod_path__parse,
158 .func = test__thread_map,
162 .func = test__llvm,
166 .func = test_session_topology,
170 .func = test__bpf,
173 .func = NULL,
219 err = test->func(); run_test()
238 for (t = &tests[j][0]; t->func; t++)
H A Dbpf-script-test-kbuild.c14 SEC("func=vfs_llseek") bpf_func__vfs_llseek()
/linux-4.4.14/drivers/staging/gdm72xx/
H A Dsdio_boot.c42 static int ack_ready(struct sdio_func *func) ack_ready() argument
49 val = sdio_readb(func, 0x13, &ret); ack_ready()
58 static int download_image(struct sdio_func *func, const char *img_name) download_image() argument
66 ret = request_firmware(&firm, img_name, &func->dev); download_image()
68 dev_err(&func->dev, download_image()
100 ret = sdio_memcpy_toio(func, 0, buf, len + TYPE_A_HEADER_SIZE); download_image()
102 dev_err(&func->dev, download_image()
110 if (!ack_ready(func)) { download_image()
112 dev_err(&func->dev, "Ack is not ready.\n"); download_image()
115 ret = sdio_memcpy_fromio(func, buf, 0, TYPE_A_LOOKAHEAD_SIZE); download_image()
117 dev_err(&func->dev, download_image()
122 sdio_writeb(func, 0x01, 0x13, &ret); download_image()
123 sdio_writeb(func, 0x00, 0x10, &ret); /* PCRRT */ download_image()
135 int sdio_boot(struct sdio_func *func) sdio_boot() argument
145 ret = download_image(func, krn_name); sdio_boot()
148 dev_info(&func->dev, "GCT: Kernel download success.\n"); sdio_boot()
150 ret = download_image(func, rfs_name); sdio_boot()
153 dev_info(&func->dev, "GCT: Filesystem download success.\n"); sdio_boot()
H A Dgdm_sdio.c213 static void send_sdio_pkt(struct sdio_func *func, u8 *data, int len) send_sdio_pkt() argument
217 sdio_claim_host(func); send_sdio_pkt()
219 blocks = len / func->cur_blksize; send_sdio_pkt()
220 n = blocks * func->cur_blksize; send_sdio_pkt()
222 ret = sdio_memcpy_toio(func, 0, data, n); send_sdio_pkt()
225 dev_err(&func->dev, send_sdio_pkt()
235 ret = sdio_memcpy_toio(func, 0, data + n, remain); send_sdio_pkt()
238 dev_err(&func->dev, send_sdio_pkt()
245 sdio_release_host(func); send_sdio_pkt()
248 static void send_sdu(struct sdio_func *func, struct tx_cxt *tx) send_sdu() argument
279 dev_dbg(&func->dev, "sdio_send: %*ph\n", aggr_len - TYPE_A_HEADER_SIZE, send_sdu()
291 send_sdio_pkt(func, buf, len + TYPE_A_HEADER_SIZE); send_sdu()
310 static void send_hci(struct sdio_func *func, struct tx_cxt *tx, send_hci() argument
315 dev_dbg(&func->dev, "sdio_send: %*ph\n", t->len - TYPE_A_HEADER_SIZE, send_hci()
318 send_sdio_pkt(func, t->buf, t->len); send_hci()
330 struct sdio_func *func = sdev->func; do_tx() local
372 send_sdu(func, tx); do_tx()
374 send_hci(func, tx, t); do_tx()
452 dev_dbg(&sdev->func->dev, "WIMAX ==> STOP SDU TX\n"); control_sdu_tx_flow()
455 dev_dbg(&sdev->func->dev, "WIMAX ==> START SDU TX\n"); control_sdu_tx_flow()
472 static void gdm_sdio_irq(struct sdio_func *func) gdm_sdio_irq() argument
474 struct phy_dev *phy_dev = sdio_get_drvdata(func); gdm_sdio_irq()
485 val = sdio_readb(func, 0x13, &ret); gdm_sdio_irq()
487 sdio_writeb(func, 0x01, 0x13, &ret); /* clear interrupt */ gdm_sdio_irq()
491 ret = sdio_memcpy_fromio(func, hdr, 0x0, TYPE_A_LOOKAHEAD_SIZE); gdm_sdio_irq()
493 dev_err(&func->dev, gdm_sdio_irq()
494 "Cannot read from function %d\n", func->num); gdm_sdio_irq()
500 dev_err(&func->dev, "Too big Type-A size: %d\n", len); gdm_sdio_irq()
513 dev_dbg(&func->dev, "Ack... %0x\n", ntohl(*ack_seq)); gdm_sdio_irq()
525 blocks = remain / func->cur_blksize; gdm_sdio_irq()
528 n = blocks * func->cur_blksize; gdm_sdio_irq()
529 ret = sdio_memcpy_fromio(func, buf, 0x0, n); gdm_sdio_irq()
531 dev_err(&func->dev, gdm_sdio_irq()
532 "Cannot read from function %d\n", func->num); gdm_sdio_irq()
540 ret = sdio_memcpy_fromio(func, buf, 0x0, remain); gdm_sdio_irq()
542 dev_err(&func->dev, gdm_sdio_irq()
543 "Cannot read from function %d\n", func->num); gdm_sdio_irq()
549 dev_dbg(&func->dev, "sdio_receive: %*ph\n", len, rx->rx_buf); gdm_sdio_irq()
568 sdio_writeb(func, 0x00, 0x10, &ret); /* PCRRT */ gdm_sdio_irq()
570 register_wimax_device(phy_dev, &func->dev); gdm_sdio_irq()
598 static int sdio_wimax_probe(struct sdio_func *func, sdio_wimax_probe() argument
605 dev_info(&func->dev, "Found GDM SDIO VID = 0x%04x PID = 0x%04x...\n", sdio_wimax_probe()
606 func->vendor, func->device); sdio_wimax_probe()
607 dev_info(&func->dev, "GCT WiMax driver version %s\n", DRIVER_VERSION); sdio_wimax_probe()
609 sdio_claim_host(func); sdio_wimax_probe()
610 sdio_enable_func(func); sdio_wimax_probe()
611 sdio_claim_irq(func, gdm_sdio_irq); sdio_wimax_probe()
613 ret = sdio_boot(func); sdio_wimax_probe()
636 sdev->func = func; sdio_wimax_probe()
638 sdio_writeb(func, 1, 0x14, &ret); /* Enable interrupt */ sdio_wimax_probe()
639 sdio_release_host(func); sdio_wimax_probe()
643 sdio_set_drvdata(func, phy_dev); sdio_wimax_probe()
653 static void sdio_wimax_remove(struct sdio_func *func) sdio_wimax_remove() argument
655 struct phy_dev *phy_dev = sdio_get_drvdata(func); sdio_wimax_remove()
661 sdio_claim_host(func); sdio_wimax_remove()
662 sdio_release_irq(func); sdio_wimax_remove()
663 sdio_disable_func(func); sdio_wimax_remove()
664 sdio_release_host(func); sdio_wimax_remove()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/
H A Dbase.c32 if (init->func->mmio) nvkm_devinit_mmio()
33 addr = init->func->mmio(init, addr); nvkm_devinit_mmio()
40 return init->func->pll_set(init, type, khz); nvkm_devinit_pll_set()
46 if (init->func->meminit) nvkm_devinit_meminit()
47 init->func->meminit(init); nvkm_devinit_meminit()
53 if (init && init->func->disable) nvkm_devinit_disable()
54 return init->func->disable(init); nvkm_devinit_disable()
62 if (init && init->func->post) nvkm_devinit_post()
63 ret = init->func->post(init, init->post); nvkm_devinit_post()
83 if (init->func->preinit) nvkm_devinit_preinit()
84 init->func->preinit(init); nvkm_devinit_preinit()
95 if (init->func->init) nvkm_devinit_init()
96 init->func->init(init); nvkm_devinit_init()
106 if (init->func->dtor) nvkm_devinit_dtor()
107 data = init->func->dtor(init); nvkm_devinit_dtor()
123 nvkm_devinit_ctor(const struct nvkm_devinit_func *func, nvkm_devinit_ctor() argument
128 init->func = func; nvkm_devinit_ctor()
/linux-4.4.14/drivers/net/wireless/cw1200/
H A Dcw1200_sdio.c48 struct sdio_func *func; member in struct:hwbus_priv
72 return sdio_memcpy_fromio(self->func, dst, addr, count); cw1200_sdio_memcpy_fromio()
79 return sdio_memcpy_toio(self->func, addr, (void *)src, count); cw1200_sdio_memcpy_toio()
84 sdio_claim_host(self->func); cw1200_sdio_lock()
89 sdio_release_host(self->func); cw1200_sdio_unlock()
92 static void cw1200_sdio_irq_handler(struct sdio_func *func) cw1200_sdio_irq_handler() argument
94 struct hwbus_priv *self = sdio_get_drvdata(func); cw1200_sdio_irq_handler()
125 cccr = sdio_f0_readb(self->func, SDIO_CCCR_IENx, &ret); cw1200_request_irq()
133 cccr |= BIT(self->func->num); cw1200_request_irq()
135 sdio_f0_writeb(self->func, cccr, SDIO_CCCR_IENx, &ret); cw1200_request_irq()
162 sdio_claim_host(self->func); cw1200_sdio_irq_subscribe()
166 ret = sdio_claim_irq(self->func, cw1200_sdio_irq_handler); cw1200_sdio_irq_subscribe()
168 sdio_release_host(self->func); cw1200_sdio_irq_subscribe()
182 sdio_claim_host(self->func); cw1200_sdio_irq_unsubscribe()
183 ret = sdio_release_irq(self->func); cw1200_sdio_irq_unsubscribe()
184 sdio_release_host(self->func); cw1200_sdio_irq_unsubscribe()
254 size = sdio_align_size(self->func, size); cw1200_sdio_align_size()
278 static int cw1200_sdio_probe(struct sdio_func *func, cw1200_sdio_probe() argument
287 if (func->num != 0x01) cw1200_sdio_probe()
296 func->card->quirks |= MMC_QUIRK_LENIENT_FN0; cw1200_sdio_probe()
299 self->func = func; cw1200_sdio_probe()
300 sdio_set_drvdata(func, self); cw1200_sdio_probe()
301 sdio_claim_host(func); cw1200_sdio_probe()
302 sdio_enable_func(func); cw1200_sdio_probe()
303 sdio_release_host(func); cw1200_sdio_probe()
308 self, &func->dev, &self->core, cw1200_sdio_probe()
315 sdio_claim_host(func); cw1200_sdio_probe()
316 sdio_disable_func(func); cw1200_sdio_probe()
317 sdio_release_host(func); cw1200_sdio_probe()
318 sdio_set_drvdata(func, NULL); cw1200_sdio_probe()
328 static void cw1200_sdio_disconnect(struct sdio_func *func) cw1200_sdio_disconnect() argument
330 struct hwbus_priv *self = sdio_get_drvdata(func); cw1200_sdio_disconnect()
338 sdio_claim_host(func); cw1200_sdio_disconnect()
339 sdio_disable_func(func); cw1200_sdio_disconnect()
340 sdio_release_host(func); cw1200_sdio_disconnect()
341 sdio_set_drvdata(func, NULL); cw1200_sdio_disconnect()
350 struct sdio_func *func = dev_to_sdio_func(dev); cw1200_sdio_suspend() local
351 struct hwbus_priv *self = sdio_get_drvdata(func); cw1200_sdio_suspend()
357 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); cw1200_sdio_suspend()
H A Dcw1200_spi.c39 struct spi_device *func; member in struct:hwbus_priv
92 if (self->func->bits_per_word == 8) cw1200_spi_memcpy_fromio()
99 ret = spi_sync(self->func, &m); cw1200_spi_memcpy_fromio()
115 if (self->func->bits_per_word == 8) cw1200_spi_memcpy_fromio()
157 if (self->func->bits_per_word == 8) cw1200_spi_memcpy_toio()
179 rval = spi_sync(self->func, &m); cw1200_spi_memcpy_toio()
187 if (self->func->bits_per_word == 8) cw1200_spi_memcpy_toio()
255 ret = request_threaded_irq(self->func->irq, NULL, cw1200_spi_irq_subscribe()
262 ret = enable_irq_wake(self->func->irq); cw1200_spi_irq_subscribe()
269 free_irq(self->func->irq, self); cw1200_spi_irq_subscribe()
279 disable_irq_wake(self->func->irq); cw1200_spi_irq_unsubscribe()
280 free_irq(self->func->irq, self); cw1200_spi_irq_unsubscribe()
352 return irq_set_irq_wake(self->func->irq, suspend); cw1200_spi_pm()
365 static int cw1200_spi_probe(struct spi_device *func) cw1200_spi_probe() argument
368 dev_get_platdata(&func->dev); cw1200_spi_probe()
373 if (func->max_speed_hz > 52000000) cw1200_spi_probe()
374 func->max_speed_hz = 52000000; cw1200_spi_probe()
375 if (func->max_speed_hz < 1000000) cw1200_spi_probe()
376 func->max_speed_hz = 1000000; cw1200_spi_probe()
380 func->bits_per_word = plat_data->spi_bits_per_word; cw1200_spi_probe()
381 if (!func->bits_per_word) cw1200_spi_probe()
382 func->bits_per_word = 16; cw1200_spi_probe()
385 func->mode = SPI_MODE_0; cw1200_spi_probe()
388 func->chip_select, func->mode, func->bits_per_word, cw1200_spi_probe()
389 func->max_speed_hz); cw1200_spi_probe()
396 if (spi_setup(func)) { cw1200_spi_probe()
401 self = devm_kzalloc(&func->dev, sizeof(*self), GFP_KERNEL); cw1200_spi_probe()
408 self->func = func; cw1200_spi_probe()
411 spi_set_drvdata(func, self); cw1200_spi_probe()
418 self, &func->dev, &self->core, cw1200_spi_probe()
433 static int cw1200_spi_disconnect(struct spi_device *func) cw1200_spi_disconnect() argument
435 struct hwbus_priv *self = spi_get_drvdata(func); cw1200_spi_disconnect()
444 cw1200_spi_off(dev_get_platdata(&func->dev)); cw1200_spi_disconnect()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Dmemory.h15 const struct nvkm_memory_func *func; member in struct:nvkm_memory
35 #define nvkm_memory_target(p) (p)->func->target(p)
36 #define nvkm_memory_addr(p) (p)->func->addr(p)
37 #define nvkm_memory_size(p) (p)->func->size(p)
38 #define nvkm_memory_boot(p,v) (p)->func->boot((p),(v))
39 #define nvkm_memory_map(p,v,o) (p)->func->map((p),(v),(o))
44 #define nvkm_kmap(o) (o)->func->acquire(o)
45 #define nvkm_ro32(o,a) (o)->func->rd32((o), (a))
46 #define nvkm_wo32(o,a,d) (o)->func->wr32((o), (a), (d))
52 #define nvkm_done(o) (o)->func->release(o)
H A Devent.h8 const struct nvkm_event_func *func; member in struct:nvkm_event
27 int nvkm_event_init(const struct nvkm_event_func *func, int types_nr,
H A Doproxy.h7 const struct nvkm_oproxy_func *func; member in struct:nvkm_oproxy
H A Dnotify.h15 int (*func)(struct nvkm_notify *); member in struct:nvkm_notify
31 int (*func)(struct nvkm_notify *), bool work,
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/core/
H A Dobject.c31 if (likely(object->func->mthd)) nvkm_object_mthd()
32 return object->func->mthd(object, mthd, data, size); nvkm_object_mthd()
40 if (likely(object->func->ntfy)) nvkm_object_ntfy()
41 return object->func->ntfy(object, mthd, pevent); nvkm_object_ntfy()
48 if (likely(object->func->map)) nvkm_object_map()
49 return object->func->map(object, addr, size); nvkm_object_map()
56 if (likely(object->func->rd08)) nvkm_object_rd08()
57 return object->func->rd08(object, addr, data); nvkm_object_rd08()
64 if (likely(object->func->rd16)) nvkm_object_rd16()
65 return object->func->rd16(object, addr, data); nvkm_object_rd16()
72 if (likely(object->func->rd32)) nvkm_object_rd32()
73 return object->func->rd32(object, addr, data); nvkm_object_rd32()
80 if (likely(object->func->wr08)) nvkm_object_wr08()
81 return object->func->wr08(object, addr, data); nvkm_object_wr08()
88 if (likely(object->func->wr16)) nvkm_object_wr16()
89 return object->func->wr16(object, addr, data); nvkm_object_wr16()
96 if (likely(object->func->wr32)) nvkm_object_wr32()
97 return object->func->wr32(object, addr, data); nvkm_object_wr32()
105 if (object->func->bind) nvkm_object_bind()
106 return object->func->bind(object, gpuobj, align, pgpuobj); nvkm_object_bind()
127 if (object->func->fini) { nvkm_object_fini()
128 ret = object->func->fini(object, suspend); nvkm_object_fini()
141 if (object->func->init) { nvkm_object_fini()
142 int rret = object->func->init(object); nvkm_object_fini()
162 if (object->func->init) { nvkm_object_init()
163 ret = object->func->init(object); nvkm_object_init()
184 if (object->func->fini) nvkm_object_init()
185 object->func->fini(object, false); nvkm_object_init()
203 if (object->func->dtor) nvkm_object_dtor()
204 data = object->func->dtor(object); nvkm_object_dtor()
215 if (object && !WARN_ON(!object->func)) { nvkm_object_del()
225 nvkm_object_ctor(const struct nvkm_object_func *func, nvkm_object_ctor() argument
228 object->func = func; nvkm_object_ctor()
240 nvkm_object_new_(const struct nvkm_object_func *func, nvkm_object_new_() argument
247 nvkm_object_ctor(func, oclass, *pobject); nvkm_object_new_()
261 const struct nvkm_object_func *func = nvkm_object_new() local
262 oclass->base.func ? oclass->base.func : &nvkm_object_func; nvkm_object_new()
263 return nvkm_object_new_(func, oclass, data, size, pobject); nvkm_object_new()
H A Doproxy.c95 if (!oproxy->object->func->sclass) nvkm_oproxy_sclass()
97 return oproxy->object->func->sclass(oproxy->object, index, oclass); nvkm_oproxy_sclass()
106 if (oproxy->func->fini[0]) { nvkm_oproxy_fini()
107 ret = oproxy->func->fini[0](oproxy, suspend); nvkm_oproxy_fini()
112 if (oproxy->object->func->fini) { nvkm_oproxy_fini()
113 ret = oproxy->object->func->fini(oproxy->object, suspend); nvkm_oproxy_fini()
118 if (oproxy->func->fini[1]) { nvkm_oproxy_fini()
119 ret = oproxy->func->fini[1](oproxy, suspend); nvkm_oproxy_fini()
133 if (oproxy->func->init[0]) { nvkm_oproxy_init()
134 ret = oproxy->func->init[0](oproxy); nvkm_oproxy_init()
139 if (oproxy->object->func->init) { nvkm_oproxy_init()
140 ret = oproxy->object->func->init(oproxy->object); nvkm_oproxy_init()
145 if (oproxy->func->init[1]) { nvkm_oproxy_init()
146 ret = oproxy->func->init[1](oproxy); nvkm_oproxy_init()
158 if (oproxy->func->dtor[0]) nvkm_oproxy_dtor()
159 oproxy->func->dtor[0](oproxy); nvkm_oproxy_dtor()
161 if (oproxy->func->dtor[1]) nvkm_oproxy_dtor()
162 oproxy->func->dtor[1](oproxy); nvkm_oproxy_dtor()
185 nvkm_oproxy_ctor(const struct nvkm_oproxy_func *func, nvkm_oproxy_ctor() argument
189 oproxy->func = func; nvkm_oproxy_ctor()
193 nvkm_oproxy_new_(const struct nvkm_oproxy_func *func, nvkm_oproxy_new_() argument
198 nvkm_oproxy_ctor(func, oclass, *poproxy); nvkm_oproxy_new_()
H A Dengine.c65 if (engine->func->tile) nvkm_engine_tile()
66 engine->func->tile(engine, region, &fb->tile.region[region]); nvkm_engine_tile()
73 if (engine->func->intr) nvkm_engine_intr()
74 engine->func->intr(engine); nvkm_engine_intr()
81 if (engine->func->fini) nvkm_engine_fini()
82 return engine->func->fini(engine, suspend); nvkm_engine_fini()
99 if (engine->func->oneinit && !engine->subdev.oneinit) { nvkm_engine_init()
102 ret = engine->func->oneinit(engine); nvkm_engine_init()
113 if (engine->func->init) nvkm_engine_init()
114 ret = engine->func->init(engine); nvkm_engine_init()
125 if (engine->func->dtor) nvkm_engine_dtor()
126 return engine->func->dtor(engine); nvkm_engine_dtor()
139 nvkm_engine_ctor(const struct nvkm_engine_func *func, nvkm_engine_ctor() argument
145 engine->func = func; nvkm_engine_ctor()
157 nvkm_engine_new_(const struct nvkm_engine_func *func, nvkm_engine_new_() argument
163 return nvkm_engine_ctor(func, device, index, pmc_enable, nvkm_engine_new_()
H A Dsubdev.c78 if (subdev->func->intr) nvkm_subdev_intr()
79 subdev->func->intr(subdev); nvkm_subdev_intr()
93 if (subdev->func->fini) { nvkm_subdev_fini()
94 int ret = subdev->func->fini(subdev, suspend); nvkm_subdev_fini()
121 if (subdev->func->preinit) { nvkm_subdev_preinit()
122 int ret = subdev->func->preinit(subdev); nvkm_subdev_preinit()
143 if (subdev->func->oneinit && !subdev->oneinit) { nvkm_subdev_init()
147 ret = subdev->func->oneinit(subdev); nvkm_subdev_init()
158 if (subdev->func->init) { nvkm_subdev_init()
159 ret = subdev->func->init(subdev); nvkm_subdev_init()
177 if (subdev && !WARN_ON(!subdev->func)) { nvkm_subdev_del()
180 if (subdev->func->dtor) nvkm_subdev_del()
181 *psubdev = subdev->func->dtor(subdev); nvkm_subdev_del()
190 nvkm_subdev_ctor(const struct nvkm_subdev_func *func, nvkm_subdev_ctor() argument
195 subdev->func = func; nvkm_subdev_ctor()
H A Devent.c32 if (event->func->fini) nvkm_event_put()
33 event->func->fini(event, 1 << type, index); nvkm_event_put()
45 if (event->func->init) nvkm_event_get()
46 event->func->init(event, 1 << type, index); nvkm_event_get()
64 if (event->func->send) { nvkm_event_send()
65 event->func->send(data, size, notify); nvkm_event_send()
84 nvkm_event_init(const struct nvkm_event_func *func, int types_nr, int index_nr, nvkm_event_init() argument
92 event->func = func; nvkm_event_init()
H A Dmemory.c28 nvkm_memory_ctor(const struct nvkm_memory_func *func, nvkm_memory_ctor() argument
31 memory->func = func; nvkm_memory_ctor()
38 if (memory && !WARN_ON(!memory->func)) { nvkm_memory_del()
39 if (memory->func->dtor) nvkm_memory_del()
40 *pmemory = memory->func->dtor(memory); nvkm_memory_del()
/linux-4.4.14/drivers/misc/
H A Dvexpress-syscfg.c56 static int vexpress_syscfg_exec(struct vexpress_syscfg_func *func, vexpress_syscfg_exec() argument
59 struct vexpress_syscfg *syscfg = func->syscfg; vexpress_syscfg_exec()
64 if (WARN_ON(index > func->num_templates)) vexpress_syscfg_exec()
71 command = func->template[index]; vexpress_syscfg_exec()
79 dev_dbg(syscfg->dev, "func %p, command %x, data %x\n", vexpress_syscfg_exec()
80 func, command, *data); vexpress_syscfg_exec()
111 dev_dbg(syscfg->dev, "func %p, read data %x\n", func, *data); vexpress_syscfg_exec()
120 struct vexpress_syscfg_func *func = context; vexpress_syscfg_read() local
122 return vexpress_syscfg_exec(func, index, false, val); vexpress_syscfg_read()
128 struct vexpress_syscfg_func *func = context; vexpress_syscfg_write() local
130 return vexpress_syscfg_exec(func, index, true, &val); vexpress_syscfg_write()
150 struct vexpress_syscfg_func *func; vexpress_syscfg_regmap_init() local
164 "arm,vexpress-sysreg,func", NULL); vexpress_syscfg_regmap_init()
185 func = kzalloc(sizeof(*func) + sizeof(*func->template) * num, vexpress_syscfg_regmap_init()
187 if (!func) vexpress_syscfg_regmap_init()
190 func->syscfg = syscfg; vexpress_syscfg_regmap_init()
191 func->num_templates = num; vexpress_syscfg_regmap_init()
199 dev_dbg(dev, "func %p: %u/%u/%u/%u/%u\n", vexpress_syscfg_regmap_init()
200 func, site, position, dcc, vexpress_syscfg_regmap_init()
203 func->template[i] = SYS_CFGCTRL_DCC(dcc); vexpress_syscfg_regmap_init()
204 func->template[i] |= SYS_CFGCTRL_SITE(site); vexpress_syscfg_regmap_init()
205 func->template[i] |= SYS_CFGCTRL_POSITION(position); vexpress_syscfg_regmap_init()
206 func->template[i] |= SYS_CFGCTRL_FUNC(function); vexpress_syscfg_regmap_init()
207 func->template[i] |= SYS_CFGCTRL_DEVICE(device); vexpress_syscfg_regmap_init()
212 func->regmap = regmap_init(dev, NULL, func, vexpress_syscfg_regmap_init()
215 if (IS_ERR(func->regmap)) { vexpress_syscfg_regmap_init()
216 void *err = func->regmap; vexpress_syscfg_regmap_init()
218 kfree(func); vexpress_syscfg_regmap_init()
222 list_add(&func->list, &syscfg->funcs); vexpress_syscfg_regmap_init()
224 return func->regmap; vexpress_syscfg_regmap_init()
230 struct vexpress_syscfg_func *func, *tmp; vexpress_syscfg_regmap_exit() local
234 list_for_each_entry_safe(func, tmp, &syscfg->funcs, list) { vexpress_syscfg_regmap_exit()
235 if (func->regmap == regmap) { vexpress_syscfg_regmap_exit()
237 kfree(func); vexpress_syscfg_regmap_exit()
/linux-4.4.14/arch/powerpc/platforms/cell/
H A Dspu_callbacks.c37 #define SYSCALL(func) sys_ni_syscall,
38 #define COMPAT_SYS(func) sys_ni_syscall,
39 #define PPC_SYS(func) sys_ni_syscall,
40 #define OLDSYS(func) sys_ni_syscall,
41 #define SYS32ONLY(func) sys_ni_syscall,
42 #define PPC64ONLY(func) sys_ni_syscall,
45 #define SYSCALL_SPU(func) sys_##func,
46 #define COMPAT_SYS_SPU(func) sys_##func,
47 #define PPC_SYS_SPU(func) ppc_##func,
/linux-4.4.14/drivers/pci/hotplug/
H A Dcpqphp_pci.c84 int cpqhp_configure_device (struct controller *ctrl, struct pci_func *func) cpqhp_configure_device() argument
91 if (func->pci_dev == NULL) cpqhp_configure_device()
92 func->pci_dev = pci_get_bus_and_slot(func->bus,PCI_DEVFN(func->device, func->function)); cpqhp_configure_device()
95 if (func->pci_dev == NULL) { cpqhp_configure_device()
98 num = pci_scan_slot(ctrl->pci_dev->bus, PCI_DEVFN(func->device, func->function)); cpqhp_configure_device()
102 func->pci_dev = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, func->function)); cpqhp_configure_device()
103 if (func->pci_dev == NULL) { cpqhp_configure_device()
109 if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { cpqhp_configure_device()
110 pci_hp_add_bridge(func->pci_dev); cpqhp_configure_device()
111 child = func->pci_dev->subordinate; cpqhp_configure_device()
116 pci_dev_put(func->pci_dev); cpqhp_configure_device()
124 int cpqhp_unconfigure_device(struct pci_func *func) cpqhp_unconfigure_device() argument
128 dbg("%s: bus/dev/func = %x/%x/%x\n", __func__, func->bus, func->device, func->function); cpqhp_unconfigure_device()
132 struct pci_dev *temp = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, j)); cpqhp_unconfigure_device()
552 int cpqhp_save_base_addr_length(struct controller *ctrl, struct pci_func *func) cpqhp_save_base_addr_length() argument
567 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_save_base_addr_length()
569 while (func != NULL) { cpqhp_save_base_addr_length()
570 pci_bus->number = func->bus; cpqhp_save_base_addr_length()
571 devfn = PCI_DEVFN(func->device, func->function); cpqhp_save_base_addr_length()
590 pci_bus->number = func->bus; cpqhp_save_base_addr_length()
624 func->base_length[(cloop - 0x10) >> 2] = cpqhp_save_base_addr_length()
626 func->base_type[(cloop - 0x10) >> 2] = type; cpqhp_save_base_addr_length()
664 func->base_length[(cloop - 0x10) >> 2] = base; cpqhp_save_base_addr_length()
665 func->base_type[(cloop - 0x10) >> 2] = type; cpqhp_save_base_addr_length()
673 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_save_base_addr_length()
689 int cpqhp_save_used_resources (struct controller *ctrl, struct pci_func *func) cpqhp_save_used_resources() argument
712 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_save_used_resources()
714 while ((func != NULL) && func->is_a_board) { cpqhp_save_used_resources()
715 pci_bus->number = func->bus; cpqhp_save_used_resources()
716 devfn = PCI_DEVFN(func->device, func->function); cpqhp_save_used_resources()
742 bus_node->next = func->bus_head; cpqhp_save_used_resources()
743 func->bus_head = bus_node; cpqhp_save_used_resources()
757 io_node->next = func->io_head; cpqhp_save_used_resources()
758 func->io_head = io_node; cpqhp_save_used_resources()
773 mem_node->next = func->mem_head; cpqhp_save_used_resources()
774 func->mem_head = mem_node; cpqhp_save_used_resources()
789 p_mem_node->next = func->p_mem_head; cpqhp_save_used_resources()
790 func->p_mem_head = p_mem_node; cpqhp_save_used_resources()
822 io_node->next = func->io_head; cpqhp_save_used_resources()
823 func->io_head = io_node; cpqhp_save_used_resources()
839 p_mem_node->next = func->p_mem_head; cpqhp_save_used_resources()
840 func->p_mem_head = p_mem_node; cpqhp_save_used_resources()
856 mem_node->next = func->mem_head; cpqhp_save_used_resources()
857 func->mem_head = mem_node; cpqhp_save_used_resources()
893 io_node->next = func->io_head; cpqhp_save_used_resources()
894 func->io_head = io_node; cpqhp_save_used_resources()
910 p_mem_node->next = func->p_mem_head; cpqhp_save_used_resources()
911 func->p_mem_head = p_mem_node; cpqhp_save_used_resources()
927 mem_node->next = func->mem_head; cpqhp_save_used_resources()
928 func->mem_head = mem_node; cpqhp_save_used_resources()
936 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_save_used_resources()
952 int cpqhp_configure_board(struct controller *ctrl, struct pci_func *func) cpqhp_configure_board() argument
965 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_configure_board()
967 while (func != NULL) { cpqhp_configure_board()
968 pci_bus->number = func->bus; cpqhp_configure_board()
969 devfn = PCI_DEVFN(func->device, func->function); cpqhp_configure_board()
975 pci_bus_write_config_dword (pci_bus, devfn, cloop, func->config_space[cloop >> 2]); cpqhp_configure_board()
1003 if (temp != func->config_space[cloop >> 2]) { cpqhp_configure_board()
1005 dbg("bus = %x, device = %x, function = %x\n", func->bus, func->device, func->function); cpqhp_configure_board()
1006 dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop >> 2]); cpqhp_configure_board()
1012 func->configured = 1; cpqhp_configure_board()
1014 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_configure_board()
1030 int cpqhp_valid_replace(struct controller *ctrl, struct pci_func *func) cpqhp_valid_replace() argument
1044 if (!func->is_a_board) cpqhp_valid_replace()
1047 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_valid_replace()
1049 while (func != NULL) { cpqhp_valid_replace()
1050 pci_bus->number = func->bus; cpqhp_valid_replace()
1051 devfn = PCI_DEVFN(func->device, func->function); cpqhp_valid_replace()
1059 if (temp_register != func->config_space[0]) cpqhp_valid_replace()
1066 if (temp_register != func->config_space[0x08 >> 2]) cpqhp_valid_replace()
1078 temp_register = func->config_space[0x18 >> 2]; cpqhp_valid_replace()
1099 if (temp_register != func->config_space[0x2C >> 2]) { cpqhp_valid_replace()
1104 if (!((func->config_space[0] == 0xAE100E11) cpqhp_valid_replace()
1138 if (func->base_length[(cloop - 0x10) >> 2] != base) cpqhp_valid_replace()
1141 if (func->base_type[(cloop - 0x10) >> 2] != type) cpqhp_valid_replace()
1155 func = cpqhp_slot_find(func->bus, func->device, index++); cpqhp_valid_replace()
1179 struct pci_func *func = NULL; cpqhp_find_available_resources() local
1276 func = cpqhp_slot_find(primary_bus, dev_func >> 3, 0); cpqhp_find_available_resources()
1278 while (func && (func->function != (dev_func & 0x07))) { cpqhp_find_available_resources()
1279 dbg("func = %p (bus, dev, fun) = (%d, %d, %d)\n", func, primary_bus, dev_func >> 3, index); cpqhp_find_available_resources()
1280 func = cpqhp_slot_find(primary_bus, dev_func >> 3, index++); cpqhp_find_available_resources()
1284 if (!func) { cpqhp_find_available_resources()
1321 io_node->next = func->io_head; cpqhp_find_available_resources()
1322 func->io_head = io_node; cpqhp_find_available_resources()
1344 mem_node->next = func->mem_head; cpqhp_find_available_resources()
1345 func->mem_head = mem_node; cpqhp_find_available_resources()
1369 p_mem_node->next = func->p_mem_head; cpqhp_find_available_resources()
1370 func->p_mem_head = p_mem_node; cpqhp_find_available_resources()
1392 bus_node->next = func->bus_head; cpqhp_find_available_resources()
1393 func->bus_head = bus_node; cpqhp_find_available_resources()
1422 int cpqhp_return_board_resources(struct pci_func *func, struct resource_lists *resources) cpqhp_return_board_resources() argument
1429 if (!func) cpqhp_return_board_resources()
1432 node = func->io_head; cpqhp_return_board_resources()
1433 func->io_head = NULL; cpqhp_return_board_resources()
1440 node = func->mem_head; cpqhp_return_board_resources()
1441 func->mem_head = NULL; cpqhp_return_board_resources()
1448 node = func->p_mem_head; cpqhp_return_board_resources()
1449 func->p_mem_head = NULL; cpqhp_return_board_resources()
1456 node = func->bus_head; cpqhp_return_board_resources()
1457 func->bus_head = NULL; cpqhp_return_board_resources()
1525 void cpqhp_destroy_board_resources (struct pci_func *func) cpqhp_destroy_board_resources() argument
1529 res = func->io_head; cpqhp_destroy_board_resources()
1530 func->io_head = NULL; cpqhp_destroy_board_resources()
1538 res = func->mem_head; cpqhp_destroy_board_resources()
1539 func->mem_head = NULL; cpqhp_destroy_board_resources()
1547 res = func->p_mem_head; cpqhp_destroy_board_resources()
1548 func->p_mem_head = NULL; cpqhp_destroy_board_resources()
1556 res = func->bus_head; cpqhp_destroy_board_resources()
1557 func->bus_head = NULL; cpqhp_destroy_board_resources()
H A Dcpqphp_ctrl.c42 static u32 configure_new_device(struct controller *ctrl, struct pci_func *func,
44 static int configure_new_function(struct controller *ctrl, struct pci_func *func,
72 struct pci_func *func; handle_switch_change() local
86 func = cpqhp_slot_find(ctrl->bus, handle_switch_change()
99 func->presence_save = (temp_word >> hp_slot) & 0x01; handle_switch_change()
100 func->presence_save |= (temp_word >> (hp_slot + 7)) & 0x02; handle_switch_change()
107 func->switch_save = 0; handle_switch_change()
115 func->switch_save = 0x10; handle_switch_change()
147 struct pci_func *func; handle_presence_change() local
165 func = cpqhp_slot_find(ctrl->bus, handle_presence_change()
181 if (func->switch_save && (ctrl->push_button == 1)) { handle_presence_change()
186 if (temp_byte != func->presence_save) { handle_presence_change()
216 func->presence_save = (temp_word >> hp_slot) & 0x01; handle_presence_change()
217 func->presence_save |= (temp_word >> (hp_slot + 7)) & 0x02; handle_presence_change()
239 struct pci_func *func; handle_power_fault() local
256 func = cpqhp_slot_find(ctrl->bus, handle_power_fault()
269 func->status = 0x00; handle_power_fault()
297 func->status = 0xFF; handle_power_fault()
1084 struct pci_func *func; cpqhp_slot_find() local
1086 func = cpqhp_slot_list[bus]; cpqhp_slot_find()
1088 if ((func == NULL) || ((func->device == device) && (index == 0))) cpqhp_slot_find()
1089 return func; cpqhp_slot_find()
1091 if (func->device == device) cpqhp_slot_find()
1094 while (func->next != NULL) { cpqhp_slot_find()
1095 func = func->next; cpqhp_slot_find()
1097 if (func->device == device) cpqhp_slot_find()
1101 return func; cpqhp_slot_find()
1110 static int is_bridge(struct pci_func *func) is_bridge() argument
1113 if (((func->config_space[0x03] >> 16) & 0xFF) == 0x01) is_bridge()
1261 * @func: PCI device/function information
1270 static u32 board_replaced(struct pci_func *func, struct controller *ctrl) board_replaced() argument
1278 hp_slot = func->device - ctrl->slot_device_offset; board_replaced()
1348 if (func->status == 0xFF) { board_replaced()
1351 func->status = 0; board_replaced()
1353 rc = cpqhp_valid_replace(ctrl, func); board_replaced()
1358 rc = cpqhp_configure_board(ctrl, func); board_replaced()
1363 * called for the "base" bus/dev/func of an board_replaced()
1390 * bus/dev/func of an adapter. board_replaced()
1415 * @func: PCI device/function info
1421 static u32 board_added(struct pci_func *func, struct controller *ctrl) board_added() argument
1434 hp_slot = func->device - ctrl->slot_device_offset; board_added()
1435 dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n", board_added()
1436 __func__, func->device, ctrl->slot_device_offset, hp_slot); board_added()
1512 dbg("%s: func status = %x\n", __func__, func->status); board_added()
1514 if (func->status == 0xFF) { board_added()
1519 func->status = 0; board_added()
1522 ctrl->pci_bus->number = func->bus; board_added()
1523 rc = pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register); board_added()
1544 rc = configure_new_device(ctrl, func, 0, &res_lists); board_added()
1572 cpqhp_save_slot_config(ctrl, func); board_added()
1576 func->status = 0; board_added()
1577 func->switch_save = 0x10; board_added()
1578 func->is_a_board = 0x01; board_added()
1585 new_slot = cpqhp_slot_find(ctrl->bus, func->device, index++); board_added()
1622 * @func: PCI device/function info
1626 static u32 remove_board(struct pci_func *func, u32 replace_flag, struct controller *ctrl) remove_board() argument
1637 if (cpqhp_unconfigure_device(func)) remove_board()
1640 device = func->device; remove_board()
1642 hp_slot = func->device - ctrl->slot_device_offset; remove_board()
1648 rc = cpqhp_save_base_addr_length(ctrl, func); remove_board()
1649 else if (!func->bus_head && !func->mem_head && remove_board()
1650 !func->p_mem_head && !func->io_head) { remove_board()
1655 temp_func = cpqhp_slot_find(func->bus, func->device, index++); remove_board()
1666 rc = cpqhp_save_used_resources(ctrl, func); remove_board()
1669 if (func->is_a_board) remove_board()
1670 func->status = 0x01; remove_board()
1671 func->configured = 0; remove_board()
1691 while (func) { remove_board()
1697 cpqhp_return_board_resources(func, &res_lists); remove_board()
1709 if (is_bridge(func)) { remove_board()
1710 bridge_slot_remove(func); remove_board()
1712 slot_remove(func); remove_board()
1714 func = cpqhp_slot_find(ctrl->bus, device, 0); remove_board()
1718 func = cpqhp_slot_create(ctrl->bus); remove_board()
1720 if (func == NULL) remove_board()
1723 func->bus = ctrl->bus; remove_board()
1724 func->device = device; remove_board()
1725 func->function = 0; remove_board()
1726 func->configured = 0; remove_board()
1727 func->switch_save = 0x10; remove_board()
1728 func->is_a_board = 0; remove_board()
1729 func->p_task_event = NULL; remove_board()
1805 struct pci_func *func; interrupt_event_handler() local
1817 func = cpqhp_slot_find(ctrl->bus, (hp_slot + ctrl->slot_device_offset), 0); interrupt_event_handler()
1818 if (!func) interrupt_event_handler()
1825 dbg("hp_slot %d, func %p, p_slot %p\n", interrupt_event_handler()
1826 hp_slot, func, p_slot); interrupt_event_handler()
1927 struct pci_func *func; cpqhp_pushbutton_thread() local
1939 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); cpqhp_pushbutton_thread()
1940 dbg("In power_down_board, func = %p, ctrl = %p\n", func, ctrl); cpqhp_pushbutton_thread()
1941 if (!func) { cpqhp_pushbutton_thread()
1942 dbg("Error! func NULL in %s\n", __func__); cpqhp_pushbutton_thread()
1946 if (cpqhp_process_SS(ctrl, func) != 0) { cpqhp_pushbutton_thread()
1961 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); cpqhp_pushbutton_thread()
1962 dbg("In add_board, func = %p, ctrl = %p\n", func, ctrl); cpqhp_pushbutton_thread()
1963 if (!func) { cpqhp_pushbutton_thread()
1964 dbg("Error! func NULL in %s\n", __func__); cpqhp_pushbutton_thread()
1969 if (cpqhp_process_SI(ctrl, func) != 0) { cpqhp_pushbutton_thread()
1987 int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func) cpqhp_process_SI() argument
1998 device = func->device; cpqhp_process_SI()
2010 if (func->is_a_board) { cpqhp_process_SI()
2011 rc = board_replaced(func, ctrl); cpqhp_process_SI()
2014 slot_remove(func); cpqhp_process_SI()
2016 func = cpqhp_slot_create(ctrl->bus); cpqhp_process_SI()
2017 if (func == NULL) cpqhp_process_SI()
2020 func->bus = ctrl->bus; cpqhp_process_SI()
2021 func->device = device; cpqhp_process_SI()
2022 func->function = 0; cpqhp_process_SI()
2023 func->configured = 0; cpqhp_process_SI()
2024 func->is_a_board = 1; cpqhp_process_SI()
2028 func->presence_save = (temp_word >> hp_slot) & 0x01; cpqhp_process_SI()
2029 func->presence_save |= (temp_word >> (hp_slot + 7)) & 0x02; cpqhp_process_SI()
2032 func->switch_save = 0; cpqhp_process_SI()
2034 func->switch_save = 0x10; cpqhp_process_SI()
2037 rc = board_added(func, ctrl); cpqhp_process_SI()
2039 if (is_bridge(func)) { cpqhp_process_SI()
2040 bridge_slot_remove(func); cpqhp_process_SI()
2042 slot_remove(func); cpqhp_process_SI()
2045 func = cpqhp_slot_create(ctrl->bus); cpqhp_process_SI()
2047 if (func == NULL) cpqhp_process_SI()
2050 func->bus = ctrl->bus; cpqhp_process_SI()
2051 func->device = device; cpqhp_process_SI()
2052 func->function = 0; cpqhp_process_SI()
2053 func->configured = 0; cpqhp_process_SI()
2054 func->is_a_board = 0; cpqhp_process_SI()
2058 func->presence_save = (temp_word >> hp_slot) & 0x01; cpqhp_process_SI()
2059 func->presence_save |= cpqhp_process_SI()
2063 func->switch_save = 0; cpqhp_process_SI()
2065 func->switch_save = 0x10; cpqhp_process_SI()
2080 int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func) cpqhp_process_SS() argument
2091 device = func->device; cpqhp_process_SS()
2092 func = cpqhp_slot_find(ctrl->bus, device, index++); cpqhp_process_SS()
2098 while (func && !rc) { cpqhp_process_SS()
2099 pci_bus->number = func->bus; cpqhp_process_SS()
2100 devfn = PCI_DEVFN(func->device, func->function); cpqhp_process_SS()
2129 func = cpqhp_slot_find(ctrl->bus, device, index++); cpqhp_process_SS()
2132 func = cpqhp_slot_find(ctrl->bus, device, 0); cpqhp_process_SS()
2133 if ((func != NULL) && !rc) { cpqhp_process_SS()
2136 rc = remove_board(func, replace_flag, ctrl); cpqhp_process_SS()
2262 * @func: pointer to function structure
2268 static u32 configure_new_device(struct controller *ctrl, struct pci_func *func, configure_new_device() argument
2277 new_slot = func; configure_new_device()
2281 ctrl->pci_bus->number = func->bus; configure_new_device()
2282 rc = pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte); configure_new_device()
2320 pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(func->device, function), 0x00, &ID); configure_new_device()
2326 new_slot = cpqhp_slot_create(func->bus); configure_new_device()
2331 new_slot->bus = func->bus; configure_new_device()
2332 new_slot->device = func->device; configure_new_device()
2357 * @func: pointer to function structure
2364 static int configure_new_function(struct controller *ctrl, struct pci_func *func, configure_new_function() argument
2395 pci_bus->number = func->bus; configure_new_function()
2396 devfn = PCI_DEVFN(func->device, func->function); configure_new_function()
2405 dbg("set Primary bus = %d\n", func->bus); configure_new_function()
2406 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_PRIMARY_BUS, func->bus); configure_new_function()
2564 pci_bus->number = func->bus; configure_new_function()
2599 rc = cpqhp_set_irq(func->bus, func->device, configure_new_function()
2612 hold_bus_node->next = func->bus_head; configure_new_function()
2613 func->bus_head = hold_bus_node; configure_new_function()
2654 hold_IO_node->next = func->io_head; configure_new_function()
2655 func->io_head = hold_IO_node; configure_new_function()
2671 hold_IO_node->next = func->io_head; configure_new_function()
2672 func->io_head = hold_IO_node; configure_new_function()
2676 hold_IO_node->next = func->io_head; configure_new_function()
2677 func->io_head = hold_IO_node; configure_new_function()
2704 hold_mem_node->next = func->mem_head; configure_new_function()
2705 func->mem_head = hold_mem_node; configure_new_function()
2723 hold_mem_node->next = func->mem_head; configure_new_function()
2724 func->mem_head = hold_mem_node; configure_new_function()
2728 hold_mem_node->next = func->mem_head; configure_new_function()
2729 func->mem_head = hold_mem_node; configure_new_function()
2757 hold_p_mem_node->next = func->p_mem_head; configure_new_function()
2758 func->p_mem_head = hold_p_mem_node; configure_new_function()
2774 hold_p_mem_node->next = func->p_mem_head; configure_new_function()
2775 func->p_mem_head = hold_p_mem_node; configure_new_function()
2779 hold_p_mem_node->next = func->p_mem_head; configure_new_function()
2780 func->p_mem_head = hold_p_mem_node; configure_new_function()
2830 dbg("func (%p) io_head (%p)\n", func, func->io_head); configure_new_function()
2836 io_node->next = func->io_head; configure_new_function()
2837 func->io_head = io_node; configure_new_function()
2852 p_mem_node->next = func->p_mem_head; configure_new_function()
2853 func->p_mem_head = p_mem_node; configure_new_function()
2868 mem_node->next = func->mem_head; configure_new_function()
2869 func->mem_head = mem_node; configure_new_function()
2921 rc = cpqhp_set_irq(func->bus, func->device, temp_byte, IRQ); configure_new_function()
2960 func->configured = 1; configure_new_function()
H A Dibmphp_pci.c81 int ibmphp_configure_card (struct pci_func *func, u8 slotno) ibmphp_configure_card() argument
95 debug ("inside configure_card, func->busno = %x\n", func->busno); ibmphp_configure_card()
97 device = func->device; ibmphp_configure_card()
98 cur_func = func; ibmphp_configure_card()
101 * func->busno is correct, and func->device contains only device (at the 5 ibmphp_configure_card()
198 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ ibmphp_configure_card()
206 if (func->devices[i]) { ibmphp_configure_card()
227 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ ibmphp_configure_card()
268 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ ibmphp_configure_card()
279 if (func->devices[i]) { ibmphp_configure_card()
302 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ ibmphp_configure_card()
348 static int configure_device (struct pci_func *func) configure_device() argument
371 devfn = PCI_DEVFN(func->device, func->function); configure_device()
372 ibmphp_pci_bus->number = func->busno; configure_device()
395 debug ("Device %x BAR %d wants %x\n", func->device, count, bar[count]); configure_device()
413 io[count]->busno = func->busno; configure_device()
414 io[count]->devfunc = PCI_DEVFN(func->device, func->function); configure_device()
418 func->io[count] = io[count]; configure_device()
421 func->busno, func->device, func->function, len[count]); configure_device()
425 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], func->io[count]->start); configure_device()
428 debug ("b4 writing, the IO address is %x\n", func->io[count]->start); configure_device()
450 pfmem[count]->busno = func->busno; configure_device()
451 pfmem[count]->devfunc = PCI_DEVFN(func->device, configure_device()
452 func->function); configure_device()
457 func->pfmem[count] = pfmem[count]; configure_device()
477 func->pfmem[count] = pfmem[count]; configure_device()
480 func->busno, func->device, len[count]); configure_device()
487 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], func->pfmem[count]->start); configure_device()
490 debug ("b4 writing, start address is %x\n", func->pfmem[count]->start); configure_device()
516 mem[count]->busno = func->busno; configure_device()
517 mem[count]->devfunc = PCI_DEVFN(func->device, configure_device()
518 func->function); configure_device()
522 func->mem[count] = mem[count]; configure_device()
525 func->busno, func->device, len[count]); configure_device()
529 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], func->mem[count]->start); configure_device()
531 debug ("b4 writing, start address is %x\n", func->mem[count]->start); configure_device()
547 func->bus = 0; /* To indicate that this is not a PPB */ configure_device()
550 pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_INTERRUPT_LINE, func->irq[irq - 1]); configure_device()
595 struct pci_func *func = *func_passed; configure_bridge() local
602 devfn = PCI_DEVFN(func->function, func->device); configure_bridge()
603 ibmphp_pci_bus->number = func->busno; configure_bridge()
609 pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_PRIMARY_BUS, func->busno); configure_bridge()
617 sec_number = find_sec_number (func->busno, slotno); configure_bridge()
624 debug ("AFTER FIND_SEC_NUMBER, func->busno IS %x\n", func->busno); configure_bridge()
644 debug ("func->busno is %x\n", func->busno); configure_bridge()
682 bus_io[count]->busno = func->busno; configure_bridge()
683 bus_io[count]->devfunc = PCI_DEVFN(func->device, configure_bridge()
684 func->function); configure_bridge()
688 func->io[count] = bus_io[count]; configure_bridge()
691 func->busno, func->device, len[count]); configure_bridge()
696 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], func->io[count]->start); configure_bridge()
714 bus_pfmem[count]->busno = func->busno; configure_bridge()
715 bus_pfmem[count]->devfunc = PCI_DEVFN(func->device, configure_bridge()
716 func->function); configure_bridge()
721 func->pfmem[count] = bus_pfmem[count]; configure_bridge()
738 func->pfmem[count] = bus_pfmem[count]; configure_bridge()
741 func->busno, func->device, len[count]); configure_bridge()
748 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], func->pfmem[count]->start); configure_bridge()
771 bus_mem[count]->busno = func->busno; configure_bridge()
772 bus_mem[count]->devfunc = PCI_DEVFN(func->device, configure_bridge()
773 func->function); configure_bridge()
777 func->mem[count] = bus_mem[count]; configure_bridge()
780 func->busno, func->device, len[count]); configure_bridge()
785 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], func->mem[count]->start); configure_bridge()
799 amount_needed = scan_behind_bridge (func, sec_number); configure_bridge()
803 ibmphp_pci_bus->number = func->busno; configure_bridge()
816 func->io[count] = NULL; configure_bridge()
819 func->pfmem[count] = NULL; configure_bridge()
822 func->mem[count] = NULL; configure_bridge()
842 io->busno = func->busno; configure_bridge()
843 io->devfunc = PCI_DEVFN(func->device, func->function); configure_bridge()
864 mem->busno = func->busno; configure_bridge()
865 mem->devfunc = PCI_DEVFN(func->device, func->function); configure_bridge()
886 pfmem->busno = func->busno; configure_bridge()
887 pfmem->devfunc = PCI_DEVFN(func->device, func->function); configure_bridge()
933 rc = add_new_bus (bus, io, mem, pfmem, func->busno); configure_bridge()
943 ibmphp_remove_bus (bus, func->busno); configure_bridge()
1021 pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_INTERRUPT_LINE, func->irq[irq - 1]); configure_bridge()
1033 func->devices[i] = 1; configure_bridge()
1036 func->bus = 1; /* For unconfiguring, to indicate it's PPB */ configure_bridge()
1037 func_passed = &func; configure_bridge()
1038 debug ("func->busno b4 returning is %x\n", func->busno); configure_bridge()
1039 debug ("func->busno b4 returning in the other structure is %x\n", (*func_passed)->busno); configure_bridge()
1060 func->io[i] = NULL; configure_bridge()
1063 func->pfmem[i] = NULL; configure_bridge()
1066 func->mem[i] = NULL; configure_bridge()
1078 static struct res_needed *scan_behind_bridge (struct pci_func *func, u8 busno) scan_behind_bridge() argument
1208 * upon bootup in the system, since we don't allocate func to such case, we need to read
1497 err ("was not able to unconfigure device %x func %x on bus %x. bailing out...\n", unconfigure_boot_card()
1506 err ("was not able to unconfigure device %x func %x on bus %x. bailing out...\n", unconfigure_boot_card()
1576 /* In all other cases, will still need to get rid of func structure if it exists */ ibmphp_unconfigure_card()
1581 if (sl->func) { ibmphp_unconfigure_card()
1582 cur_func = sl->func; ibmphp_unconfigure_card()
1619 sl->func = NULL; ibmphp_unconfigure_card()
H A Dacpiphp.h120 struct acpiphp_func func; member in struct:acpiphp_context
130 static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func) func_to_context() argument
132 return container_of(func, struct acpiphp_context, func); func_to_context()
135 static inline struct acpi_device *func_to_acpi_device(struct acpiphp_func *func) func_to_acpi_device() argument
137 return func_to_context(func)->hp.self; func_to_acpi_device()
140 static inline acpi_handle func_to_handle(struct acpiphp_func *func) func_to_handle() argument
142 return func_to_acpi_device(func)->handle; func_to_handle()
H A Dibmphp_core.c675 if (slot_cur->func) { ibm_slot_find()
676 func_cur = slot_cur->func; ibm_slot_find()
709 static void ibm_unconfigure_device(struct pci_func *func) ibm_unconfigure_device() argument
715 debug("func->device = %x, func->function = %x\n", ibm_unconfigure_device()
716 func->device, func->function); ibm_unconfigure_device()
717 debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0); ibm_unconfigure_device()
722 temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j); ibm_unconfigure_device()
729 pci_dev_put(func->dev); ibm_unconfigure_device()
783 static int ibm_configure_device(struct pci_func *func) ibm_configure_device() argument
792 if (!(bus_structure_fixup(func->busno))) ibm_configure_device()
794 if (func->dev == NULL) ibm_configure_device()
795 func->dev = pci_get_bus_and_slot(func->busno, ibm_configure_device()
796 PCI_DEVFN(func->device, func->function)); ibm_configure_device()
798 if (func->dev == NULL) { ibm_configure_device()
799 struct pci_bus *bus = pci_find_bus(0, func->busno); ibm_configure_device()
804 PCI_DEVFN(func->device, func->function)); ibm_configure_device()
808 func->dev = pci_get_bus_and_slot(func->busno, ibm_configure_device()
809 PCI_DEVFN(func->device, func->function)); ibm_configure_device()
810 if (func->dev == NULL) { ibm_configure_device()
815 if (!(flag) && (func->dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)) { ibm_configure_device()
816 pci_hp_add_bridge(func->dev); ibm_configure_device()
817 child = func->dev->subordinate; ibm_configure_device()
1112 slot_cur->func = kzalloc(sizeof(struct pci_func), GFP_KERNEL); enable_slot()
1113 if (!slot_cur->func) { enable_slot()
1120 slot_cur->func->busno = slot_cur->bus; enable_slot()
1121 slot_cur->func->device = slot_cur->device; enable_slot()
1123 slot_cur->func->irq[i] = slot_cur->irq[i]; enable_slot()
1128 if (ibmphp_configure_card(slot_cur->func, slot_cur->number)) { enable_slot()
1134 slot_cur->func = NULL; enable_slot()
1141 tmp_func = ibm_slot_find(slot_cur->bus, slot_cur->func->device, enable_slot()
1219 if (slot_cur->func == NULL) { ibmphp_do_disable_slot()
1221 slot_cur->func = kzalloc(sizeof(struct pci_func), GFP_KERNEL); ibmphp_do_disable_slot()
1222 if (!slot_cur->func) { ibmphp_do_disable_slot()
1227 slot_cur->func->busno = slot_cur->bus; ibmphp_do_disable_slot()
1228 slot_cur->func->device = slot_cur->device; ibmphp_do_disable_slot()
1231 ibm_unconfigure_device(slot_cur->func); ibmphp_do_disable_slot()
1246 slot_cur->func = NULL; ibmphp_do_disable_slot()
H A Dacpiphp_glue.c140 if (!context || context->func.parent->is_going_away) { acpiphp_grab_context()
144 get_bridge(context->func.parent); acpiphp_grab_context()
152 put_bridge(context->func.parent); acpiphp_let_context_go()
160 struct acpiphp_func *func, *tmp; free_bridge() local
167 list_for_each_entry_safe(func, tmp, &slot->funcs, sibling) free_bridge()
168 acpiphp_put_context(func_to_context(func)); free_bridge()
177 put_bridge(context->func.parent); free_bridge()
204 bus = context->func.slot->bus; acpiphp_post_dock_fixup()
296 newfunc = &context->func; acpiphp_add_context()
375 struct acpiphp_func *func; cleanup_bridge() local
378 list_for_each_entry(func, &slot->funcs, sibling) { cleanup_bridge()
379 struct acpi_device *adev = func_to_acpi_device(func); cleanup_bridge()
429 struct acpiphp_func *func; acpiphp_set_acpi_region() local
433 list_for_each_entry(func, &slot->funcs, sibling) { acpiphp_set_acpi_region()
441 acpi_evaluate_object(func_to_handle(func), "_REG", &arg_list, acpiphp_set_acpi_region()
448 struct acpiphp_func *func; check_hotplug_bridge() local
454 list_for_each_entry(func, &slot->funcs, sibling) { check_hotplug_bridge()
455 if (PCI_FUNC(dev->devfn) == func->function) { check_hotplug_bridge()
464 struct acpiphp_func *func; acpiphp_rescan_slot() local
466 list_for_each_entry(func, &slot->funcs, sibling) { acpiphp_rescan_slot()
467 struct acpi_device *adev = func_to_acpi_device(func); acpiphp_rescan_slot()
487 struct acpiphp_func *func; enable_slot() local
524 list_for_each_entry(func, &slot->funcs, sibling) { enable_slot()
526 func->function)); enable_slot()
544 struct acpiphp_func *func; disable_slot() local
556 list_for_each_entry(func, &slot->funcs, sibling) disable_slot()
557 acpi_bus_trim(func_to_acpi_device(func)); disable_slot()
589 struct acpiphp_func *func; get_slot_status() local
591 list_for_each_entry(func, &slot->funcs, sibling) { get_slot_status()
592 if (func->flags & FUNC_HAS_STA) { get_slot_status()
595 status = acpi_evaluate_integer(func_to_handle(func), get_slot_status()
604 func->function), get_slot_status()
753 struct acpiphp_func *func = &context->func; hotplug_event() local
754 struct acpiphp_slot *slot = func->slot; hotplug_event()
788 acpiphp_check_bridge(func->parent); hotplug_event()
883 get_bridge(context->func.parent); acpiphp_enumerate_slots()
975 struct acpiphp_func *func; acpiphp_disable_and_eject_slot() local
983 list_for_each_entry(func, &slot->funcs, sibling) acpiphp_disable_and_eject_slot()
984 if (func->flags & FUNC_HAS_EJ0) { acpiphp_disable_and_eject_slot()
985 acpi_handle handle = func_to_handle(func); acpiphp_disable_and_eject_slot()
/linux-4.4.14/kernel/
H A Dup.c10 int smp_call_function_single(int cpu, void (*func) (void *info), void *info, smp_call_function_single()
18 func(info); smp_call_function_single()
30 csd->func(csd->info); smp_call_function_single_async()
36 int on_each_cpu(smp_call_func_t func, void *info, int wait) on_each_cpu() argument
41 func(info); on_each_cpu()
54 smp_call_func_t func, void *info, bool wait) on_each_cpu_mask()
60 func(info); on_each_cpu_mask()
71 smp_call_func_t func, void *info, bool wait, on_each_cpu_cond()
79 func(info); on_each_cpu_cond()
53 on_each_cpu_mask(const struct cpumask *mask, smp_call_func_t func, void *info, bool wait) on_each_cpu_mask() argument
70 on_each_cpu_cond(bool (cond_func)int cpu, void *info), smp_call_func_t func, void *info, bool wait, gfp_t gfp_flags) on_each_cpu_cond() argument
H A Dtask_work.c8 * task_work_add - ask the @task to execute @work->func()
15 * Otherwise @work->func() will be called when the @task returns from kernel
46 * @func: identifies the work to remove
48 * Find the last queued pending work with ->func == @func and remove
55 task_work_cancel(struct task_struct *task, task_work_func_t func) task_work_cancel() argument
69 if (work->func != func) task_work_cancel()
94 * work->func() can do task_work_add(), do not set task_work_run()
115 work->func(work); task_work_run()
H A Dsmp.c142 * ->func, ->info, and ->flags set.
145 smp_call_func_t func, void *info) generic_exec_single()
156 func(info); generic_exec_single()
167 csd->func = func; generic_exec_single()
237 csd->func); flush_smp_call_function_queue()
241 smp_call_func_t func = csd->func; llist_for_each_entry_safe() local
246 func(info); llist_for_each_entry_safe()
250 func(info); llist_for_each_entry_safe()
265 * @func: The function to run. This must be fast and non-blocking.
271 int smp_call_function_single(int cpu, smp_call_func_t func, void *info, smp_call_function_single() argument
300 err = generic_exec_single(cpu, csd, func, info); smp_call_function_single()
340 err = generic_exec_single(cpu, csd, csd->func, csd->info); smp_call_function_single_async()
350 * @func: The function to run. This must be fast and non-blocking.
362 smp_call_func_t func, void *info, int wait) smp_call_function_any()
384 ret = smp_call_function_single(cpu, func, info, wait); smp_call_function_any()
393 * @func: The function to run. This must be fast and non-blocking.
398 * If @wait is true, then returns once @func has returned.
405 smp_call_func_t func, void *info, bool wait) smp_call_function_many()
435 smp_call_function_single(cpu, func, info, wait); smp_call_function_many()
454 csd->func = func; smp_call_function_many()
475 * @func: The function to run. This must be fast and non-blocking.
482 * If @wait is true, then returns once @func has returned; otherwise
483 * it returns just before the target cpu calls @func.
488 int smp_call_function(smp_call_func_t func, void *info, int wait) smp_call_function() argument
491 smp_call_function_many(cpu_online_mask, func, info, wait); smp_call_function()
591 int on_each_cpu(void (*func) (void *info), void *info, int wait) on_each_cpu()
597 ret = smp_call_function(func, info, wait); on_each_cpu()
599 func(info); on_each_cpu()
610 * @func: The function to run. This must be fast and non-blocking.
615 * If @wait is true, then returns once @func has returned.
622 void on_each_cpu_mask(const struct cpumask *mask, smp_call_func_t func, on_each_cpu_mask() argument
627 smp_call_function_many(mask, func, info, wait); on_each_cpu_mask()
631 func(info); on_each_cpu_mask()
648 * @func: The function to run on all applicable CPUs.
666 smp_call_func_t func, void *info, bool wait, on_each_cpu_cond()
679 on_each_cpu_mask(cpus, func, info, wait); on_each_cpu_cond()
690 ret = smp_call_function_single(cpu, func, for_each_online_cpu()
144 generic_exec_single(int cpu, struct call_single_data *csd, smp_call_func_t func, void *info) generic_exec_single() argument
361 smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, void *info, int wait) smp_call_function_any() argument
404 smp_call_function_many(const struct cpumask *mask, smp_call_func_t func, void *info, bool wait) smp_call_function_many() argument
665 on_each_cpu_cond(bool (cond_func)int cpu, void *info), smp_call_func_t func, void *info, bool wait, gfp_t gfp_flags) on_each_cpu_cond() argument
H A Dtracepoint.c90 for (i = 0; funcs[i].func; i++) debug_print_probes()
91 printk(KERN_DEBUG "Probe %d : %p\n", i, funcs[i].func); debug_print_probes()
102 if (WARN_ON(!tp_func->func)) func_add()
109 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { func_add()
113 if (old[nr_probes].func == tp_func->func && func_add()
118 /* + 2 : one for new probe, one for NULL func */ func_add()
136 new[nr_probes + 1].func = NULL; func_add()
155 if (tp_func->func) { func_remove()
156 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { func_remove()
157 if (old[nr_probes].func == tp_func->func && func_remove()
179 for (i = 0; old[i].func; i++) func_remove()
180 if (old[i].func != tp_func->func func_remove()
183 new[nr_probes - nr_del].func = NULL; func_remove()
194 struct tracepoint_func *func, int prio) tracepoint_add_func()
203 old = func_add(&tp_funcs, func, prio); tracepoint_add_func()
230 struct tracepoint_func *func) tracepoint_remove_func()
236 old = func_remove(&tp_funcs, func); tracepoint_remove_func()
275 tp_func.func = probe; tracepoint_probe_register_prio()
317 tp_func.func = probe; tracepoint_probe_unregister()
193 tracepoint_add_func(struct tracepoint *tp, struct tracepoint_func *func, int prio) tracepoint_add_func() argument
229 tracepoint_remove_func(struct tracepoint *tp, struct tracepoint_func *func) tracepoint_remove_func() argument
H A Dasync.c76 async_func_t func; member in struct:async_entry
120 entry->func, task_pid_nr(current)); async_run_entry_fn()
123 entry->func(entry->data, entry->cookie); async_run_entry_fn()
129 entry->func, async_run_entry_fn()
148 static async_cookie_t __async_schedule(async_func_t func, void *data, struct async_domain *domain) __async_schedule() argument
168 func(data, newcookie); __async_schedule()
174 entry->func = func; __async_schedule()
201 * @func: function to execute asynchronously
207 async_cookie_t async_schedule(async_func_t func, void *data) async_schedule() argument
209 return __async_schedule(func, data, &async_dfl_domain); async_schedule()
215 * @func: function to execute asynchronously
225 async_cookie_t async_schedule_domain(async_func_t func, void *data, async_schedule_domain() argument
228 return __async_schedule(func, data, domain); async_schedule_domain()
/linux-4.4.14/include/linux/mmc/
H A Dsdio_func.h117 extern void sdio_claim_host(struct sdio_func *func);
118 extern void sdio_release_host(struct sdio_func *func);
120 extern int sdio_enable_func(struct sdio_func *func);
121 extern int sdio_disable_func(struct sdio_func *func);
123 extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz);
125 extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler);
126 extern int sdio_release_irq(struct sdio_func *func);
128 extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
130 extern u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret);
131 extern u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret);
132 extern u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret);
134 extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst,
136 extern int sdio_readsb(struct sdio_func *func, void *dst,
139 extern void sdio_writeb(struct sdio_func *func, u8 b,
141 extern void sdio_writew(struct sdio_func *func, u16 b,
143 extern void sdio_writel(struct sdio_func *func, u32 b,
146 extern u8 sdio_writeb_readb(struct sdio_func *func, u8 write_byte,
149 extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr,
151 extern int sdio_writesb(struct sdio_func *func, unsigned int addr,
154 extern unsigned char sdio_f0_readb(struct sdio_func *func,
156 extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b,
159 extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func);
160 extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags);
/linux-4.4.14/drivers/net/wireless/ti/wlcore/
H A Dsdio.c68 struct sdio_func *func = dev_to_sdio_func(glue->dev); wl1271_sdio_set_block_size() local
70 sdio_claim_host(func); wl1271_sdio_set_block_size()
71 sdio_set_block_size(func, blksz); wl1271_sdio_set_block_size()
72 sdio_release_host(func); wl1271_sdio_set_block_size()
80 struct sdio_func *func = dev_to_sdio_func(glue->dev); wl12xx_sdio_raw_read() local
82 sdio_claim_host(func); wl12xx_sdio_raw_read()
92 ((u8 *)buf)[0] = sdio_f0_readb(func, addr, &ret); wl12xx_sdio_raw_read()
97 ret = sdio_readsb(func, buf, addr, len); wl12xx_sdio_raw_read()
99 ret = sdio_memcpy_fromio(func, buf, addr, len); wl12xx_sdio_raw_read()
105 sdio_release_host(func); wl12xx_sdio_raw_read()
118 struct sdio_func *func = dev_to_sdio_func(glue->dev); wl12xx_sdio_raw_write() local
120 sdio_claim_host(func); wl12xx_sdio_raw_write()
130 sdio_f0_writeb(func, ((u8 *)buf)[0], addr, &ret); wl12xx_sdio_raw_write()
138 ret = sdio_writesb(func, addr, buf, len); wl12xx_sdio_raw_write()
140 ret = sdio_memcpy_toio(func, addr, buf, len); wl12xx_sdio_raw_write()
143 sdio_release_host(func); wl12xx_sdio_raw_write()
154 struct sdio_func *func = dev_to_sdio_func(glue->dev); wl12xx_sdio_power_on() local
155 struct mmc_card *card = func->card; wl12xx_sdio_power_on()
171 sdio_claim_host(func); wl12xx_sdio_power_on()
172 sdio_enable_func(func); wl12xx_sdio_power_on()
173 sdio_release_host(func); wl12xx_sdio_power_on()
182 struct sdio_func *func = dev_to_sdio_func(glue->dev); wl12xx_sdio_power_off() local
183 struct mmc_card *card = func->card; wl12xx_sdio_power_off()
185 sdio_claim_host(func); wl12xx_sdio_power_off()
186 sdio_disable_func(func); wl12xx_sdio_power_off()
187 sdio_release_host(func); wl12xx_sdio_power_off()
264 static int wl1271_probe(struct sdio_func *func, wl1271_probe() argument
276 if (func->num != 0x02) wl1271_probe()
284 dev_err(&func->dev, "can't allocate glue\n"); wl1271_probe()
288 glue->dev = &func->dev; wl1271_probe()
291 func->card->quirks |= MMC_QUIRK_LENIENT_FN0; wl1271_probe()
294 func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; wl1271_probe()
296 ret = wlcore_probe_of(&func->dev, &irq, &pdev_data); wl1271_probe()
301 mmcflags = sdio_get_host_pm_caps(func); wl1271_probe()
307 sdio_set_drvdata(func, glue); wl1271_probe()
310 pm_runtime_put_noidle(&func->dev); wl1271_probe()
318 if (func->card->cccr.sdio_vsn == SDIO_SDIO_REV_3_00) wl1271_probe()
330 glue->core->dev.parent = &func->dev; wl1271_probe()
369 static void wl1271_remove(struct sdio_func *func) wl1271_remove() argument
371 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); wl1271_remove()
374 pm_runtime_get_noresume(&func->dev); wl1271_remove()
385 struct sdio_func *func = dev_to_sdio_func(dev); wl1271_suspend() local
386 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); wl1271_suspend()
396 sdio_flags = sdio_get_host_pm_caps(func); wl1271_suspend()
406 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); wl1271_suspend()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bar/
H A Dbase.c29 if (bar && bar->func->flush) nvkm_bar_flush()
30 bar->func->flush(bar); nvkm_bar_flush()
37 if (bar && bar->func->kmap && bar->subdev.oneinit) nvkm_bar_kmap()
38 return bar->func->kmap(bar); nvkm_bar_kmap()
45 return bar->func->umap(bar, size, type, vma); nvkm_bar_umap()
52 return bar->func->oneinit(bar); nvkm_bar_oneinit()
59 return bar->func->init(bar); nvkm_bar_init()
66 return bar->func->dtor(bar); nvkm_bar_dtor()
77 nvkm_bar_ctor(const struct nvkm_bar_func *func, struct nvkm_device *device, nvkm_bar_ctor() argument
81 bar->func = func; nvkm_bar_ctor()
/linux-4.4.14/arch/powerpc/platforms/ps3/
H A Dtime.c32 static void _dump_tm(const struct rtc_time *tm, const char* func, int line) _dump_tm() argument
34 pr_debug("%s:%d tm_sec %d\n", func, line, tm->tm_sec); _dump_tm()
35 pr_debug("%s:%d tm_min %d\n", func, line, tm->tm_min); _dump_tm()
36 pr_debug("%s:%d tm_hour %d\n", func, line, tm->tm_hour); _dump_tm()
37 pr_debug("%s:%d tm_mday %d\n", func, line, tm->tm_mday); _dump_tm()
38 pr_debug("%s:%d tm_mon %d\n", func, line, tm->tm_mon); _dump_tm()
39 pr_debug("%s:%d tm_year %d\n", func, line, tm->tm_year); _dump_tm()
40 pr_debug("%s:%d tm_wday %d\n", func, line, tm->tm_wday); _dump_tm()
44 static void __maybe_unused _dump_time(int time, const char *func, _dump_time() argument
51 pr_debug("%s:%d time %d\n", func, line, time); _dump_time()
52 _dump_tm(&tm, func, line); _dump_time()
H A Dos-area.c318 static void _dump_header(const struct os_area_header *h, const char *func, _dump_header() argument
324 pr_debug("%s:%d: h.magic_num: '%s'\n", func, line, _dump_header()
326 pr_debug("%s:%d: h.hdr_version: %u\n", func, line, _dump_header()
328 pr_debug("%s:%d: h.db_area_offset: %u\n", func, line, _dump_header()
330 pr_debug("%s:%d: h.ldr_area_offset: %u\n", func, line, _dump_header()
332 pr_debug("%s:%d: h.ldr_format: %u\n", func, line, _dump_header()
334 pr_debug("%s:%d: h.ldr_size: %xh\n", func, line, _dump_header()
339 static void _dump_params(const struct os_area_params *p, const char *func, _dump_params() argument
342 pr_debug("%s:%d: p.boot_flag: %u\n", func, line, p->boot_flag); _dump_params()
343 pr_debug("%s:%d: p.num_params: %u\n", func, line, p->num_params); _dump_params()
344 pr_debug("%s:%d: p.rtc_diff %lld\n", func, line, p->rtc_diff); _dump_params()
345 pr_debug("%s:%d: p.av_multi_out %u\n", func, line, p->av_multi_out); _dump_params()
346 pr_debug("%s:%d: p.ctrl_button: %u\n", func, line, p->ctrl_button); _dump_params()
347 pr_debug("%s:%d: p.static_ip_addr: %u.%u.%u.%u\n", func, line, _dump_params()
350 pr_debug("%s:%d: p.network_mask: %u.%u.%u.%u\n", func, line, _dump_params()
353 pr_debug("%s:%d: p.default_gateway: %u.%u.%u.%u\n", func, line, _dump_params()
356 pr_debug("%s:%d: p.dns_primary: %u.%u.%u.%u\n", func, line, _dump_params()
359 pr_debug("%s:%d: p.dns_secondary: %u.%u.%u.%u\n", func, line, _dump_params()
538 static void _dump_db(const struct os_area_db *db, const char *func, _dump_db() argument
544 pr_debug("%s:%d: db.magic_num: '%s'\n", func, line, _dump_db()
546 pr_debug("%s:%d: db.version: %u\n", func, line, _dump_db()
548 pr_debug("%s:%d: db.index_64: %u\n", func, line, _dump_db()
550 pr_debug("%s:%d: db.count_64: %u\n", func, line, _dump_db()
552 pr_debug("%s:%d: db.index_32: %u\n", func, line, _dump_db()
554 pr_debug("%s:%d: db.count_32: %u\n", func, line, _dump_db()
556 pr_debug("%s:%d: db.index_16: %u\n", func, line, _dump_db()
558 pr_debug("%s:%d: db.count_16: %u\n", func, line, _dump_db()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
H A Dbase.c35 return fb->func->memtype_valid(fb, memtype); nvkm_fb_memtype_valid()
41 fb->func->tile.fini(fb, region, tile); nvkm_fb_tile_fini()
48 fb->func->tile.init(fb, region, addr, size, pitch, flags, tile); nvkm_fb_tile_init()
55 if (fb->func->tile.prog) { nvkm_fb_tile_prog()
56 fb->func->tile.prog(fb, region, tile); nvkm_fb_tile_prog()
93 if (fb->func->intr) nvkm_fb_intr()
94 fb->func->intr(fb); nvkm_fb_intr()
101 if (fb->func->ram_new) { nvkm_fb_oneinit()
102 int ret = fb->func->ram_new(fb, &fb->ram); nvkm_fb_oneinit()
124 fb->func->tile.prog(fb, i, &fb->tile.region[i]); nvkm_fb_init()
126 if (fb->func->init) nvkm_fb_init()
127 fb->func->init(fb); nvkm_fb_init()
138 fb->func->tile.fini(fb, i, &fb->tile.region[i]); nvkm_fb_dtor()
142 if (fb->func->dtor) nvkm_fb_dtor()
143 return fb->func->dtor(fb); nvkm_fb_dtor()
156 nvkm_fb_ctor(const struct nvkm_fb_func *func, struct nvkm_device *device, nvkm_fb_ctor() argument
160 fb->func = func; nvkm_fb_ctor()
161 fb->tile.regions = fb->func->tile.regions; nvkm_fb_ctor()
165 nvkm_fb_new_(const struct nvkm_fb_func *func, struct nvkm_device *device, nvkm_fb_new_() argument
170 nvkm_fb_ctor(func, device, index, *pfb); nvkm_fb_new_()
H A Dram.c29 if (ram->func->init) nvkm_ram_init()
30 return ram->func->init(ram); nvkm_ram_init()
38 if (ram && !WARN_ON(!ram->func)) { nvkm_ram_del()
39 if (ram->func->dtor) nvkm_ram_del()
40 *pram = ram->func->dtor(ram); nvkm_ram_del()
49 nvkm_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb, nvkm_ram_ctor() argument
70 ram->func = func; nvkm_ram_ctor()
93 nvkm_ram_new_(const struct nvkm_ram_func *func, struct nvkm_fb *fb, nvkm_ram_new_() argument
99 return nvkm_ram_ctor(func, fb, type, size, tags, *pram); nvkm_ram_new_()
H A Dnv50.h7 const struct nv50_fb_func *func; member in struct:nv50_fb
/linux-4.4.14/drivers/isdn/hardware/eicon/
H A Ddiva_pci.h12 unsigned char func, void *pci_dev_handle);
14 unsigned char func,
/linux-4.4.14/drivers/net/ethernet/intel/fm10k/
H A Dfm10k_vf.h57 #define FM10K_VF_MSG_MSIX_HANDLER(func) \
58 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MSIX, NULL, func)
62 #define FM10K_VF_MSG_MAC_VLAN_HANDLER(func) \
64 fm10k_mac_vlan_msg_attr, func)
69 #define FM10K_VF_MSG_LPORT_STATE_HANDLER(func) \
71 fm10k_lport_state_msg_attr, func)
74 #define FM10K_VF_MSG_1588_HANDLER(func) \
75 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_1588, fm10k_1588_msg_attr, func)
H A Dfm10k_pf.h107 #define FM10K_PF_MSG_LPORT_MAP_HANDLER(func) \
109 fm10k_lport_map_msg_attr, func)
113 #define FM10K_PF_MSG_UPDATE_PVID_HANDLER(func) \
115 fm10k_update_pvid_msg_attr, func)
119 #define FM10K_PF_MSG_ERR_HANDLER(msg, func) \
120 FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_##msg, fm10k_err_msg_attr, func)
123 #define FM10K_PF_MSG_1588_TIMESTAMP_HANDLER(func) \
125 fm10k_1588_timestamp_msg_attr, func)
H A Dfm10k_tlv.h102 s32 (*func)(struct fm10k_hw *, u32 **, member in struct:fm10k_msg_data
106 #define FM10K_MSG_HANDLER(id, attr, func) { id, attr, func }
182 #define FM10K_TLV_MSG_TEST_HANDLER(func) \
183 FM10K_MSG_HANDLER(FM10K_TLV_MSG_ID_TEST, fm10k_tlv_msg_test_attr, func)
184 #define FM10K_TLV_MSG_ERROR_HANDLER(func) \
185 FM10K_MSG_HANDLER(FM10K_TLV_ERROR, NULL, func)
/linux-4.4.14/arch/mips/dec/
H A Dreset.c16 noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000); back_to_prom() local
18 func(); back_to_prom()
/linux-4.4.14/arch/ia64/scripts/
H A Dunwcheck.py26 def check_func (func, slots, rlen_sum):
30 if not func: func = "[%#x-%#x]" % (start, end)
31 print "ERROR: %s: %lu slots, total region length = %lu" % (func, slots, rlen_sum)
36 func = False variable
42 check_func(func, slots, rlen_sum)
44 func = m.group(1)
54 check_func(func, slots, rlen_sum)
/linux-4.4.14/tools/power/cpupower/utils/helpers/
H A Dpci.c16 * func: func
26 int slot, int func, int vendor, int dev) pci_acc_init()
39 filter_nb_link.func = func; pci_acc_init()
54 /* Typically one wants to get a specific slot(device)/func of the root domain
57 int func) pci_slot_func_init()
59 return pci_acc_init(pacc, 0, 0, slot, func, -1, -1); pci_slot_func_init()
25 pci_acc_init(struct pci_access **pacc, int domain, int bus, int slot, int func, int vendor, int dev) pci_acc_init() argument
56 pci_slot_func_init(struct pci_access **pacc, int slot, int func) pci_slot_func_init() argument
/linux-4.4.14/drivers/net/wireless/brcm80211/brcmfmac/
H A Dtracepoint.h43 TP_PROTO(const char *func, struct va_format *vaf),
44 TP_ARGS(func, vaf),
46 __string(func, func)
50 __assign_str(func, func);
55 TP_printk("%s: %s", __get_str(func), __get_str(msg))
59 TP_PROTO(u32 level, const char *func, struct va_format *vaf),
60 TP_ARGS(level, func, vaf),
63 __string(func, func)
68 __assign_str(func, func);
73 TP_printk("%s: %s", __get_str(func), __get_str(msg))
H A Dbcmsdh.c95 static void brcmf_sdiod_ib_irqhandler(struct sdio_func *func) brcmf_sdiod_ib_irqhandler() argument
97 struct brcmf_bus *bus_if = dev_get_drvdata(&func->dev); brcmf_sdiod_ib_irqhandler()
106 static void brcmf_sdiod_dummy_irqhandler(struct sdio_func *func) brcmf_sdiod_dummy_irqhandler() argument
124 &sdiodev->func[1]->dev); brcmf_sdiod_intr_register()
142 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_intr_register()
168 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_intr_register()
171 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_intr_register()
172 sdio_claim_irq(sdiodev->func[1], brcmf_sdiod_ib_irqhandler); brcmf_sdiod_intr_register()
173 sdio_claim_irq(sdiodev->func[2], brcmf_sdiod_dummy_irqhandler); brcmf_sdiod_intr_register()
174 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_intr_register()
185 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_intr_unregister()
188 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_intr_unregister()
197 &sdiodev->func[1]->dev); brcmf_sdiod_intr_unregister()
201 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_intr_unregister()
202 sdio_release_irq(sdiodev->func[2]); brcmf_sdiod_intr_unregister()
203 sdio_release_irq(sdiodev->func[1]); brcmf_sdiod_intr_unregister()
204 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_intr_unregister()
234 static inline int brcmf_sdiod_f0_writeb(struct sdio_func *func, brcmf_sdiod_f0_writeb() argument
246 sdio_writeb(func, byte, regaddr, &err_ret); brcmf_sdiod_f0_writeb()
248 sdio_f0_writeb(func, byte, regaddr, &err_ret); brcmf_sdiod_f0_writeb()
256 struct sdio_func *func; brcmf_sdiod_request_data() local
259 brcmf_dbg(SDIO, "rw=%d, func=%d, addr=0x%05x, nbytes=%d\n", brcmf_sdiod_request_data()
265 func = sdiodev->func[fn]; brcmf_sdiod_request_data()
271 sdio_writeb(func, *(u8 *)data, addr, &ret); sizeof()
273 ret = brcmf_sdiod_f0_writeb(func, addr, sizeof()
277 *(u8 *)data = sdio_readb(func, addr, &ret);
279 *(u8 *)data = sdio_f0_readb(func, addr, &ret);
284 sdio_writew(func, *(u16 *)data, addr, &ret);
286 *(u16 *)data = sdio_readw(func, addr, &ret);
290 sdio_writel(func, *(u32 *)data, addr, &ret);
292 *(u32 *)data = sdio_readl(func, addr, &ret);
309 u8 func; brcmf_sdiod_regrw_helper() local
323 func = SDIO_FUNC_0; brcmf_sdiod_regrw_helper()
325 func = SDIO_FUNC_1; brcmf_sdiod_regrw_helper()
333 ret = brcmf_sdiod_request_data(sdiodev, func, addr, regsz, brcmf_sdiod_regrw_helper()
348 write ? "write" : "read", func, addr, ret); brcmf_sdiod_regrw_helper()
351 write ? "write" : "read", func, addr, ret); brcmf_sdiod_regrw_helper()
481 err = sdio_memcpy_toio(sdiodev->func[fn], addr, brcmf_sdiod_buffrw()
484 err = sdio_memcpy_fromio(sdiodev->func[fn], ((u8 *)(pkt->data)), brcmf_sdiod_buffrw()
488 err = sdio_readsb(sdiodev->func[fn], ((u8 *)(pkt->data)), addr, brcmf_sdiod_buffrw()
533 req_sz = ALIGN(req_sz, sdiodev->func[fn]->cur_blksize); brcmf_sdiod_sglist_rw()
552 func_blk_sz = sdiodev->func[fn]->cur_blksize; brcmf_sdiod_sglist_rw()
569 mmc_cmd.arg |= (fn & 0x7) << 28; /* SDIO func num */ brcmf_sdiod_sglist_rw()
621 mmc_set_data_timeout(&mmc_dat, sdiodev->func[fn]->card); brcmf_sdiod_sglist_rw()
622 mmc_wait_for_req(sdiodev->func[fn]->card->host, &mmc_req); brcmf_sdiod_sglist_rw()
821 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_ramrw()
867 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_ramrw()
940 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_freezer_on()
942 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_freezer_on()
948 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_freezer_off()
950 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_freezer_off()
1000 sdio_claim_host(sdiodev->func[2]); brcmf_sdiod_remove()
1001 sdio_disable_func(sdiodev->func[2]); brcmf_sdiod_remove()
1002 sdio_release_host(sdiodev->func[2]); brcmf_sdiod_remove()
1005 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_remove()
1006 sdio_disable_func(sdiodev->func[1]); brcmf_sdiod_remove()
1007 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_remove()
1012 pm_runtime_allow(sdiodev->func[1]->card->host->parent); brcmf_sdiod_remove()
1026 struct sdio_func *func; brcmf_sdiod_probe() local
1033 sdio_claim_host(sdiodev->func[1]); brcmf_sdiod_probe()
1035 ret = sdio_set_block_size(sdiodev->func[1], SDIO_FUNC1_BLOCKSIZE); brcmf_sdiod_probe()
1038 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_probe()
1041 ret = sdio_set_block_size(sdiodev->func[2], SDIO_FUNC2_BLOCKSIZE); brcmf_sdiod_probe()
1044 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_probe()
1049 sdiodev->func[2]->enable_timeout = SDIO_WAIT_F2RDY; brcmf_sdiod_probe()
1052 ret = sdio_enable_func(sdiodev->func[1]); brcmf_sdiod_probe()
1053 sdio_release_host(sdiodev->func[1]); brcmf_sdiod_probe()
1061 * as func->cur_blksize is properly set and F2 init has been brcmf_sdiod_probe()
1064 func = sdiodev->func[2]; brcmf_sdiod_probe()
1065 host = func->card->host; brcmf_sdiod_probe()
1069 max_blocks * func->cur_blksize); brcmf_sdiod_probe()
1133 static int brcmf_ops_sdio_probe(struct sdio_func *func, brcmf_ops_sdio_probe() argument
1142 brcmf_dbg(SDIO, "Class=%x\n", func->class); brcmf_ops_sdio_probe()
1143 brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor); brcmf_ops_sdio_probe()
1144 brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device); brcmf_ops_sdio_probe()
1145 brcmf_dbg(SDIO, "Function#: %d\n", func->num); brcmf_ops_sdio_probe()
1147 dev = &func->dev; brcmf_ops_sdio_probe()
1151 /* Consume func num 1 but dont do anything with it. */ brcmf_ops_sdio_probe()
1152 if (func->num == 1) brcmf_ops_sdio_probe()
1155 /* Ignore anything but func 2 */ brcmf_ops_sdio_probe()
1156 if (func->num != 2) brcmf_ops_sdio_probe()
1171 sdiodev->func[0] = kmemdup(func, sizeof(*func), GFP_KERNEL); brcmf_ops_sdio_probe()
1172 sdiodev->func[0]->num = 0; brcmf_ops_sdio_probe()
1173 sdiodev->func[1] = func->card->sdio_func[0]; brcmf_ops_sdio_probe()
1174 sdiodev->func[2] = func; brcmf_ops_sdio_probe()
1179 dev_set_drvdata(&func->dev, bus_if); brcmf_ops_sdio_probe()
1180 dev_set_drvdata(&sdiodev->func[1]->dev, bus_if); brcmf_ops_sdio_probe()
1181 sdiodev->dev = &sdiodev->func[1]->dev; brcmf_ops_sdio_probe()
1191 if ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_KEEP_POWER) && brcmf_ops_sdio_probe()
1192 ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_WAKE_SDIO_IRQ) || brcmf_ops_sdio_probe()
1210 dev_set_drvdata(&func->dev, NULL); brcmf_ops_sdio_probe()
1211 dev_set_drvdata(&sdiodev->func[1]->dev, NULL); brcmf_ops_sdio_probe()
1212 kfree(sdiodev->func[0]); brcmf_ops_sdio_probe()
1218 static void brcmf_ops_sdio_remove(struct sdio_func *func) brcmf_ops_sdio_remove() argument
1224 brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor); brcmf_ops_sdio_remove()
1225 brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device); brcmf_ops_sdio_remove()
1226 brcmf_dbg(SDIO, "Function: %d\n", func->num); brcmf_ops_sdio_remove()
1228 if (func->num != 1) brcmf_ops_sdio_remove()
1231 bus_if = dev_get_drvdata(&func->dev); brcmf_ops_sdio_remove()
1236 dev_set_drvdata(&sdiodev->func[1]->dev, NULL); brcmf_ops_sdio_remove()
1237 dev_set_drvdata(&sdiodev->func[2]->dev, NULL); brcmf_ops_sdio_remove()
1240 kfree(sdiodev->func[0]); brcmf_ops_sdio_remove()
1259 struct sdio_func *func; brcmf_ops_sdio_suspend() local
1264 func = container_of(dev, struct sdio_func, dev); brcmf_ops_sdio_suspend()
1265 brcmf_dbg(SDIO, "Enter: F%d\n", func->num); brcmf_ops_sdio_suspend()
1266 if (func->num != SDIO_FUNC_1) brcmf_ops_sdio_suspend()
1283 if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) brcmf_ops_sdio_suspend()
1292 struct sdio_func *func = container_of(dev, struct sdio_func, dev); brcmf_ops_sdio_resume() local
1294 brcmf_dbg(SDIO, "Enter: F%d\n", func->num); brcmf_ops_sdio_resume()
1295 if (func->num != SDIO_FUNC_2) brcmf_ops_sdio_resume()
H A Dtracepoint.c23 void __brcmf_err(const char *func, const char *fmt, ...) __brcmf_err() argument
32 pr_err("%s: %pV", func, &vaf); __brcmf_err()
33 trace_brcmf_err(func, &vaf); __brcmf_err()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dbase.c35 int big = vma->node->type != mmu->func->spg_shift; nvkm_vm_map_at()
38 u32 pde = (offset >> mmu->func->pgt_bits) - vm->fpde; nvkm_vm_map_at()
39 u32 pte = (offset & ((1 << mmu->func->pgt_bits) - 1)) >> bits; nvkm_vm_map_at()
40 u32 max = 1 << (mmu->func->pgt_bits - bits); nvkm_vm_map_at()
56 mmu->func->map(vma, pgt, node, pte, len, phys, delta); nvkm_vm_map_at()
70 mmu->func->flush(vm); nvkm_vm_map_at()
79 int big = vma->node->type != mmu->func->spg_shift; nvkm_vm_map_sg_table()
83 u32 pde = (offset >> mmu->func->pgt_bits) - vm->fpde; nvkm_vm_map_sg_table()
84 u32 pte = (offset & ((1 << mmu->func->pgt_bits) - 1)) >> bits; nvkm_vm_map_sg_table()
85 u32 max = 1 << (mmu->func->pgt_bits - bits); nvkm_vm_map_sg_table()
103 mmu->func->map_sg(vma, pgt, mem, pte, 1, &addr); nvkm_vm_map_sg_table()
118 mmu->func->map_sg(vma, pgt, mem, pte, 1, &addr); nvkm_vm_map_sg_table()
128 mmu->func->flush(vm); nvkm_vm_map_sg_table()
138 int big = vma->node->type != mmu->func->spg_shift; nvkm_vm_map_sg()
142 u32 pde = (offset >> mmu->func->pgt_bits) - vm->fpde; nvkm_vm_map_sg()
143 u32 pte = (offset & ((1 << mmu->func->pgt_bits) - 1)) >> bits; nvkm_vm_map_sg()
144 u32 max = 1 << (mmu->func->pgt_bits - bits); nvkm_vm_map_sg()
155 mmu->func->map_sg(vma, pgt, mem, pte, len, list); nvkm_vm_map_sg()
166 mmu->func->flush(vm); nvkm_vm_map_sg()
186 int big = vma->node->type != mmu->func->spg_shift; nvkm_vm_unmap_at()
190 u32 pde = (offset >> mmu->func->pgt_bits) - vm->fpde; nvkm_vm_unmap_at()
191 u32 pte = (offset & ((1 << mmu->func->pgt_bits) - 1)) >> bits; nvkm_vm_unmap_at()
192 u32 max = 1 << (mmu->func->pgt_bits - bits); nvkm_vm_unmap_at()
203 mmu->func->unmap(vma, pgt, pte, len); nvkm_vm_unmap_at()
213 mmu->func->flush(vm); nvkm_vm_unmap_at()
240 mmu->func->map_pgt(vpgd->obj, pde, vpgt->mem); nvkm_vm_unmap_pgt()
253 int big = (type != mmu->func->spg_shift); nvkm_vm_map_pgt()
257 pgt_size = (1 << (mmu->func->pgt_bits + 12)) >> type; nvkm_vm_map_pgt()
266 mmu->func->map_pgt(vpgd->obj, pde, vpgt->mem); nvkm_vm_map_pgt()
291 fpde = (vma->node->offset >> mmu->func->pgt_bits); nvkm_vm_get()
292 lpde = (vma->node->offset + vma->node->length - 1) >> mmu->func->pgt_bits; nvkm_vm_get()
296 int big = (vma->node->type != mmu->func->spg_shift); nvkm_vm_get()
333 fpde = (vma->node->offset >> mmu->func->pgt_bits); nvkm_vm_put()
334 lpde = (vma->node->offset + vma->node->length - 1) >> mmu->func->pgt_bits; nvkm_vm_put()
337 nvkm_vm_unmap_pgt(vm, vma->node->type != mmu->func->spg_shift, fpde, lpde); nvkm_vm_put()
352 (size >> mmu->func->spg_shift) * 8, 0x1000, true, &pgt); nvkm_vm_boot()
379 vm->fpde = offset >> (mmu->func->pgt_bits + 12); nvkm_vm_create()
380 vm->lpde = (offset + length - 1) >> (mmu->func->pgt_bits + 12); nvkm_vm_create()
406 if (!mmu->func->create) nvkm_vm_new()
408 return mmu->func->create(mmu, offset, length, mm_offset, key, pvm); nvkm_vm_new()
429 mmu->func->map_pgt(pgd, i, vm->pgt[i - vm->fpde].mem); nvkm_vm_link()
493 if (mmu->func->oneinit) nvkm_mmu_oneinit()
494 return mmu->func->oneinit(mmu); nvkm_mmu_oneinit()
502 if (mmu->func->init) nvkm_mmu_init()
503 mmu->func->init(mmu); nvkm_mmu_init()
511 if (mmu->func->dtor) nvkm_mmu_dtor()
512 return mmu->func->dtor(mmu); nvkm_mmu_dtor()
524 nvkm_mmu_ctor(const struct nvkm_mmu_func *func, struct nvkm_device *device, nvkm_mmu_ctor() argument
528 mmu->func = func; nvkm_mmu_ctor()
529 mmu->limit = func->limit; nvkm_mmu_ctor()
530 mmu->dma_bits = func->dma_bits; nvkm_mmu_ctor()
531 mmu->lpg_shift = func->lpg_shift; nvkm_mmu_ctor()
535 nvkm_mmu_new_(const struct nvkm_mmu_func *func, struct nvkm_device *device, nvkm_mmu_new_() argument
540 nvkm_mmu_ctor(func, device, index, *pmmu); nvkm_mmu_new_()
/linux-4.4.14/arch/s390/crypto/
H A Dcrypt_s390.h156 * @func: the function code passed to KM; see crypt_s390_km_func
157 * @param: address of parameter block; see POP for details on each func
164 * Returns -1 for failure, 0 for the query func, number of processed
167 static inline int crypt_s390_km(long func, void *param, crypt_s390_km() argument
170 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_km()
187 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; crypt_s390_km()
192 * @func: the function code passed to KM; see crypt_s390_kmc_func
193 * @param: address of parameter block; see POP for details on each func
200 * Returns -1 for failure, 0 for the query func, number of processed
203 static inline int crypt_s390_kmc(long func, void *param, crypt_s390_kmc() argument
206 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_kmc()
223 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; crypt_s390_kmc()
228 * @func: the function code passed to KM; see crypt_s390_kimd_func
229 * @param: address of parameter block; see POP for details on each func
236 * Returns -1 for failure, 0 for the query func, number of processed
239 static inline int crypt_s390_kimd(long func, void *param, crypt_s390_kimd() argument
242 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_kimd()
258 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; crypt_s390_kimd()
263 * @func: the function code passed to KM; see crypt_s390_klmd_func
264 * @param: address of parameter block; see POP for details on each func
270 * Returns -1 for failure, 0 for the query func, number of processed
273 static inline int crypt_s390_klmd(long func, void *param, crypt_s390_klmd() argument
276 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_klmd()
292 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; crypt_s390_klmd()
297 * @func: the function code passed to KM; see crypt_s390_klmd_func
298 * @param: address of parameter block; see POP for details on each func
305 * Returns -1 for failure, 0 for the query func, number of processed
308 static inline int crypt_s390_kmac(long func, void *param, crypt_s390_kmac() argument
311 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_kmac()
327 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; crypt_s390_kmac()
332 * @func: the function code passed to KMCTR; see crypt_s390_kmctr_func
333 * @param: address of parameter block; see POP for details on each func
341 * Returns -1 for failure, 0 for the query func, number of processed
344 static inline int crypt_s390_kmctr(long func, void *param, u8 *dest, crypt_s390_kmctr() argument
347 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_kmctr()
366 return (func & CRYPT_S390_FUNC_MASK) ? src_len - __src_len : __src_len; crypt_s390_kmctr()
371 * @func: the function code passed to PPNO; see crypt_s390_ppno_func
372 * @param: address of parameter block; see POP for details on each func
381 * Returns -1 for failure, 0 for the query func, number of random
384 static inline int crypt_s390_ppno(long func, void *param, crypt_s390_ppno() argument
388 register long __func asm("0") = func & CRYPT_S390_FUNC_MASK; crypt_s390_ppno()
407 return (func & CRYPT_S390_FUNC_MASK) ? dest_len - __dest_len : 0; crypt_s390_ppno()
412 * @func: the function code of the specific function; 0 if op in general
416 * Returns 1 if func available; 0 if func or op in general not available
418 static inline int crypt_s390_func_available(int func, crypt_s390_func_available() argument
433 switch (func & CRYPT_S390_OP_MASK) { crypt_s390_func_available()
462 func &= CRYPT_S390_FUNC_MASK; crypt_s390_func_available()
463 func &= 0x7f; /* mask modifier bit */ crypt_s390_func_available()
464 return (status[func >> 3] & (0x80 >> (func & 7))) != 0; crypt_s390_func_available()
469 * @func: the function code passed to KM; see crypt_s390_km_func
470 * @param: address of parameter block; see POP for details on each func
476 static inline int crypt_s390_pcc(long func, void *param) crypt_s390_pcc() argument
478 register long __func asm("0") = func & 0x7f; /* encrypt or decrypt */ crypt_s390_pcc()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/
H A Dbase.c31 return gpio->func->drive(gpio, line, dir, out); nvkm_gpio_drive()
37 return gpio->func->sense(gpio, line); nvkm_gpio_sense()
41 nvkm_gpio_reset(struct nvkm_gpio *gpio, u8 func) nvkm_gpio_reset() argument
43 if (gpio->func->reset) nvkm_gpio_reset()
44 gpio->func->reset(gpio, func); nvkm_gpio_reset()
49 struct dcb_gpio_func *func) nvkm_gpio_find()
59 data = dcb_gpio_match(bios, idx, tag, line, &ver, &len, func); nvkm_gpio_find()
66 *func = (struct dcb_gpio_func) { nvkm_gpio_find()
67 .func = DCB_GPIO_TVDAC0, nvkm_gpio_find()
82 struct dcb_gpio_func func; nvkm_gpio_set() local
85 ret = nvkm_gpio_find(gpio, idx, tag, line, &func); nvkm_gpio_set()
87 int dir = !!(func.log[state] & 0x02); nvkm_gpio_set()
88 int out = !!(func.log[state] & 0x01); nvkm_gpio_set()
89 ret = nvkm_gpio_drive(gpio, idx, func.line, dir, out); nvkm_gpio_set()
98 struct dcb_gpio_func func; nvkm_gpio_get() local
101 ret = nvkm_gpio_find(gpio, idx, tag, line, &func); nvkm_gpio_get()
103 ret = nvkm_gpio_sense(gpio, idx, func.line); nvkm_gpio_get()
105 ret = (ret == (func.log[1] & 1)); nvkm_gpio_get()
115 gpio->func->intr_mask(gpio, type, 1 << index, 0); nvkm_gpio_intr_fini()
122 gpio->func->intr_mask(gpio, type, 1 << index, 1 << index); nvkm_gpio_intr_init()
152 gpio->func->intr_stat(gpio, &hi, &lo); nvkm_gpio_intr()
154 for (i = 0; (hi | lo) && i < gpio->func->lines; i++) { nvkm_gpio_intr()
167 u32 mask = (1 << gpio->func->lines) - 1; nvkm_gpio_fini()
169 gpio->func->intr_mask(gpio, NVKM_GPIO_TOGGLED, mask, 0); nvkm_gpio_fini()
170 gpio->func->intr_stat(gpio, &mask, &mask); nvkm_gpio_fini()
211 nvkm_gpio_new_(const struct nvkm_gpio_func *func, struct nvkm_device *device, nvkm_gpio_new_() argument
220 gpio->func = func; nvkm_gpio_new_()
222 return nvkm_event_init(&nvkm_gpio_intr_func, 2, func->lines, nvkm_gpio_new_()
48 nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, struct dcb_gpio_func *func) nvkm_gpio_find() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/disp/
H A Doutp.c33 if (outp->func->fini) nvkm_output_fini()
34 outp->func->fini(outp); nvkm_output_fini()
40 if (outp->func->init) nvkm_output_init()
41 outp->func->init(outp); nvkm_output_init()
48 if (outp && !WARN_ON(!outp->func)) { nvkm_output_del()
49 if (outp->func->dtor) nvkm_output_del()
50 *poutp = outp->func->dtor(outp); nvkm_output_del()
57 nvkm_output_ctor(const struct nvkm_output_func *func, struct nvkm_disp *disp, nvkm_output_ctor() argument
62 outp->func = func; nvkm_output_ctor()
78 nvkm_output_new_(const struct nvkm_output_func *func, nvkm_output_new_() argument
85 nvkm_output_ctor(func, disp, index, dcbE, *poutp); nvkm_output_new_()
H A Drootnv50.c77 const struct nv50_disp_func *func = disp->func; nv50_disp_root_mthd_() local
122 return func->head.scanoutpos(object, disp, data, size, head); nv50_disp_root_mthd_()
129 return func->dac.power(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
131 return func->dac.sense(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
133 return func->sor.power(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
135 if (!func->sor.hda_eld) nv50_disp_root_mthd_()
137 return func->sor.hda_eld(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
139 if (!func->sor.hdmi) nv50_disp_root_mthd_()
141 return func->sor.hdmi(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
168 outpdp->func->lnk_pwr(outpdp, 0); nv50_disp_root_mthd_()
181 if (!func->pior.power) nv50_disp_root_mthd_()
183 return func->pior.power(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
197 return sclass->ctor(sclass->func, sclass->mthd, root, sclass->chid, nv50_disp_root_dmac_new_()
207 return sclass->ctor(sclass->func, sclass->mthd, root, sclass->chid, nv50_disp_root_pioc_new_()
217 if (index < ARRAY_SIZE(root->func->dmac)) { nv50_disp_root_child_get_()
218 sclass->base = root->func->dmac[index]->base; nv50_disp_root_child_get_()
219 sclass->priv = root->func->dmac[index]; nv50_disp_root_child_get_()
224 index -= ARRAY_SIZE(root->func->dmac); nv50_disp_root_child_get_()
226 if (index < ARRAY_SIZE(root->func->pioc)) { nv50_disp_root_child_get_()
227 sclass->base = root->func->pioc[index]->base; nv50_disp_root_child_get_()
228 sclass->priv = root->func->pioc[index]; nv50_disp_root_child_get_()
240 root->func->fini(root); nv50_disp_root_fini_()
248 return root->func->init(root); nv50_disp_root_init_()
271 nv50_disp_root_new_(const struct nv50_disp_root_func *func, nv50_disp_root_new_() argument
285 root->func = func; nv50_disp_root_new_()
333 for (i = 0; i < disp->func->dac.nr; i++) { nv50_disp_root_init()
339 for (i = 0; i < disp->func->sor.nr; i++) { nv50_disp_root_init()
345 for (i = 0; i < disp->func->pior.nr; i++) { nv50_disp_root_init()
H A Dchannv50.c198 *addr = device->func->resource_addr(device, 0) + nv50_disp_chan_map()
209 return chan->func->child_new(chan, oclass, data, size, pobject); nv50_disp_chan_child_new()
217 if (chan->func->child_get) { nv50_disp_chan_child_get()
218 int ret = chan->func->child_get(chan, index, oclass); nv50_disp_chan_child_get()
230 chan->func->fini(chan); nv50_disp_chan_fini()
238 return chan->func->init(chan); nv50_disp_chan_init()
248 return chan->func->dtor ? chan->func->dtor(chan) : chan; nv50_disp_chan_dtor()
264 nv50_disp_chan_ctor(const struct nv50_disp_chan_func *func, nv50_disp_chan_ctor() argument
273 chan->func = func; nv50_disp_chan_ctor()
288 nv50_disp_chan_new_(const struct nv50_disp_chan_func *func, nv50_disp_chan_new_() argument
300 return nv50_disp_chan_ctor(func, mthd, root, chid, head, oclass, chan); nv50_disp_chan_new_()
H A Dbase.c42 disp->func->head.vblank_fini(disp, head); nvkm_disp_vblank_fini()
49 disp->func->head.vblank_init(disp, head); nvkm_disp_vblank_init()
192 const struct nvkm_disp_oclass *root = disp->func->root(disp); nvkm_disp_class_get()
205 disp->func->intr(disp); nvkm_disp_intr()
252 if (disp->func->dtor) nvkm_disp_dtor()
253 data = disp->func->dtor(disp); nvkm_disp_dtor()
283 nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device, nvkm_disp_ctor() argument
297 disp->func = func; nvkm_disp_ctor()
319 case 0: outps = &disp->func->outp.internal; break; nvkm_disp_ctor()
320 case 1: outps = &disp->func->outp.external; break; nvkm_disp_ctor()
433 nvkm_disp_new_(const struct nvkm_disp_func *func, struct nvkm_device *device, nvkm_disp_new_() argument
438 return nvkm_disp_ctor(func, device, index, heads, *pdisp); nvkm_disp_new_()
H A Dconn.c83 struct dcb_gpio_func func; nvkm_connector_ctor() local
101 ret = nvkm_gpio_find(gpio, 0, info->hpd, DCB_GPIO_UNUSED, &func); nvkm_connector_ctor()
103 CONN_ERR(conn, "func %02x lookup failed, %d", nvkm_connector_ctor()
111 .line = func.line, nvkm_connector_ctor()
117 CONN_ERR(conn, "func %02x failed, %d", info->hpd, ret); nvkm_connector_ctor()
119 CONN_DBG(conn, "func %02x (HPD)", info->hpd); nvkm_connector_ctor()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/
H A Dbase.c50 ltc->func->cbc_clear(ltc, first, limit); nvkm_ltc_tags_clear()
51 ltc->func->cbc_wait(ltc); nvkm_ltc_tags_clear()
58 ltc->func->zbc_clear_color(ltc, index, color); nvkm_ltc_zbc_color_get()
66 ltc->func->zbc_clear_depth(ltc, index, depth); nvkm_ltc_zbc_depth_get()
73 if (ltc->func->invalidate) nvkm_ltc_invalidate()
74 ltc->func->invalidate(ltc); nvkm_ltc_invalidate()
80 if (ltc->func->flush) nvkm_ltc_flush()
81 ltc->func->flush(ltc); nvkm_ltc_flush()
88 ltc->func->intr(ltc); nvkm_ltc_intr()
95 return ltc->func->oneinit(ltc); nvkm_ltc_oneinit()
105 ltc->func->zbc_clear_color(ltc, i, ltc->zbc_color[i]); nvkm_ltc_init()
106 ltc->func->zbc_clear_depth(ltc, i, ltc->zbc_depth[i]); nvkm_ltc_init()
109 ltc->func->init(ltc); nvkm_ltc_init()
133 nvkm_ltc_new_(const struct nvkm_ltc_func *func, struct nvkm_device *device, nvkm_ltc_new_() argument
142 ltc->func = func; nvkm_ltc_new_()
144 ltc->zbc_max = min(func->zbc, NVKM_LTC_MAX_ZBC_CNT) - 1; nvkm_ltc_new_()
/linux-4.4.14/arch/powerpc/platforms/powermac/
H A Dpfunc_core.c72 struct pmf_function *func; member in struct:pmf_cmd
130 return handlers->name(cmd->func, cmd->instdata, \
578 static int pmf_parse_one(struct pmf_function *func, pmf_parse_one() argument
586 cmd.cmdptr = func->data; pmf_parse_one()
587 cmd.cmdend = func->data + func->length; pmf_parse_one()
588 cmd.func = func; pmf_parse_one()
593 LOG_PARSE("pmf: func %s, %d bytes, %s...\n", pmf_parse_one()
594 func->name, func->length, pmf_parse_one()
630 func->length = cmd.cmdptr - func->data; pmf_parse_one()
640 struct pmf_function *func = NULL; pmf_add_function_prop() local
646 func = kzalloc(sizeof(struct pmf_function), GFP_KERNEL); pmf_add_function_prop()
647 if (func == NULL) pmf_add_function_prop()
649 kref_init(&func->ref); pmf_add_function_prop()
650 INIT_LIST_HEAD(&func->irq_clients); pmf_add_function_prop()
651 func->node = dev->node; pmf_add_function_prop()
652 func->driver_data = driverdata; pmf_add_function_prop()
653 func->name = name; pmf_add_function_prop()
654 func->phandle = data[0]; pmf_add_function_prop()
655 func->flags = data[1]; pmf_add_function_prop()
658 func->data = data; pmf_add_function_prop()
659 func->length = length; pmf_add_function_prop()
660 func->dev = dev; pmf_add_function_prop()
663 count+1, func->flags, func->phandle, length); pmf_add_function_prop()
664 if (pmf_parse_one(func, NULL, NULL, NULL)) { pmf_add_function_prop()
665 kfree(func); pmf_add_function_prop()
668 length -= func->length; pmf_add_function_prop()
669 data = (u32 *)(((u8 *)data) + func->length); pmf_add_function_prop()
670 list_add(&func->link, &dev->functions); pmf_add_function_prop()
748 struct pmf_function *pmf_get_function(struct pmf_function *func) pmf_get_function() argument
750 if (!try_module_get(func->dev->handlers->owner)) pmf_get_function()
752 kref_get(&func->ref); pmf_get_function()
753 return func; pmf_get_function()
759 struct pmf_function *func = pmf_release_function() local
761 pmf_put_device(func->dev); pmf_release_function()
762 kfree(func); pmf_release_function()
765 static inline void __pmf_put_function(struct pmf_function *func) __pmf_put_function() argument
767 kref_put(&func->ref, pmf_release_function); __pmf_put_function()
770 void pmf_put_function(struct pmf_function *func) pmf_put_function() argument
772 if (func == NULL) pmf_put_function()
774 module_put(func->dev->handlers->owner); pmf_put_function()
775 __pmf_put_function(func); pmf_put_function()
796 struct pmf_function *func = pmf_unregister_driver() local
797 list_entry(dev->functions.next, typeof(*func), link); pmf_unregister_driver()
798 list_del(&func->link); pmf_unregister_driver()
799 __pmf_put_function(func); pmf_unregister_driver()
812 struct pmf_function *func, *result = NULL; __pmf_find_function() local
844 list_for_each_entry(func, &dev->functions, link) { __pmf_find_function()
845 if (name && strcmp(name, func->name)) __pmf_find_function()
847 if (func->phandle && target->phandle != func->phandle) __pmf_find_function()
849 if ((func->flags & flags) == 0) __pmf_find_function()
851 result = func; __pmf_find_function()
865 struct pmf_function *func; pmf_register_irq_client() local
869 func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN); pmf_register_irq_client()
870 if (func) pmf_register_irq_client()
871 func = pmf_get_function(func); pmf_register_irq_client()
873 if (func == NULL) pmf_register_irq_client()
878 if (list_empty(&func->irq_clients)) pmf_register_irq_client()
879 func->dev->handlers->irq_enable(func); pmf_register_irq_client()
883 list_add(&client->link, &func->irq_clients); pmf_register_irq_client()
886 client->func = func; pmf_register_irq_client()
895 struct pmf_function *func = client->func; pmf_unregister_irq_client() local
898 BUG_ON(func == NULL); pmf_unregister_irq_client()
902 client->func = NULL; pmf_unregister_irq_client()
909 if (list_empty(&func->irq_clients)) pmf_unregister_irq_client()
910 func->dev->handlers->irq_disable(func); pmf_unregister_irq_client()
912 pmf_put_function(func); pmf_unregister_irq_client()
917 void pmf_do_irq(struct pmf_function *func) pmf_do_irq() argument
926 list_for_each_entry(client, &func->irq_clients, link) { pmf_do_irq()
937 int pmf_call_one(struct pmf_function *func, struct pmf_args *args) pmf_call_one() argument
939 struct pmf_device *dev = func->dev; pmf_call_one()
943 DBG(" ** pmf_call_one(%s/%s) **\n", dev->node->full_name, func->name); pmf_call_one()
946 instdata = dev->handlers->begin(func, args); pmf_call_one()
947 rc = pmf_parse_one(func, dev->handlers, instdata, args); pmf_call_one()
949 dev->handlers->end(func, instdata); pmf_call_one()
959 struct pmf_function *func, *tmp; pmf_do_functions() local
970 list_for_each_entry_safe(func, tmp, &dev->functions, link) { pmf_do_functions()
971 if (name && strcmp(name, func->name)) pmf_do_functions()
973 if (phandle && func->phandle && phandle != func->phandle) pmf_do_functions()
975 if ((func->flags & fflags) == 0) pmf_do_functions()
977 if (pmf_get_function(func) == NULL) pmf_do_functions()
980 rc = pmf_call_one(func, args); pmf_do_functions()
981 pmf_put_function(func); pmf_do_functions()
995 struct pmf_function *func; pmf_find_function() local
999 func = __pmf_find_function(target, name, PMF_FLAGS_ON_DEMAND); pmf_find_function()
1000 if (func) pmf_find_function()
1001 func = pmf_get_function(func); pmf_find_function()
1003 return func; pmf_find_function()
1010 struct pmf_function *func = pmf_find_function(target, name); pmf_call_function() local
1013 if (func == NULL) pmf_call_function()
1016 rc = pmf_call_one(func, args); pmf_call_function()
1017 pmf_put_function(func); pmf_call_function()
H A Dpfunc_base.c26 static int macio_do_gpio_irq_enable(struct pmf_function *func) macio_do_gpio_irq_enable() argument
28 unsigned int irq = irq_of_parse_and_map(func->node, 0); macio_do_gpio_irq_enable()
31 return request_irq(irq, macio_gpio_irq, 0, func->node->name, func); macio_do_gpio_irq_enable()
34 static int macio_do_gpio_irq_disable(struct pmf_function *func) macio_do_gpio_irq_disable() argument
36 unsigned int irq = irq_of_parse_and_map(func->node, 0); macio_do_gpio_irq_disable()
39 free_irq(irq, func); macio_do_gpio_irq_disable()
45 u8 __iomem *addr = (u8 __iomem *)func->driver_data; macio_do_gpio_write()
58 tmp, func->node->full_name, addr); macio_do_gpio_write()
67 u8 __iomem *addr = (u8 __iomem *)func->driver_data; macio_do_gpio_read()
146 struct macio_chip *macio = func->driver_data; macio_do_write_reg32()
157 struct macio_chip *macio = func->driver_data; macio_do_read_reg32()
169 struct macio_chip *macio = func->driver_data; macio_do_write_reg8()
180 struct macio_chip *macio = func->driver_data; macio_do_read_reg8()
193 struct macio_chip *macio = func->driver_data; macio_do_read_reg32_msrx()
206 struct macio_chip *macio = func->driver_data; macio_do_read_reg8_msrx()
219 struct macio_chip *macio = func->driver_data; macio_do_write_reg32_slm()
239 struct macio_chip *macio = func->driver_data; macio_do_write_reg8_slm()
/linux-4.4.14/kernel/livepatch/
H A Dcore.c42 * @func_stack: list head for the stack of klp_func's (active func is on top)
67 struct klp_func *func; klp_find_ops() local
70 func = list_first_entry(&ops->func_stack, struct klp_func, klp_find_ops()
72 if (func->old_addr == old_addr) klp_find_ops()
240 struct klp_func *func) klp_find_verify_func_addr()
246 if (kaslr_enabled() && func->old_addr) klp_find_verify_func_addr()
247 func->old_addr += kaslr_offset(); klp_find_verify_func_addr()
250 if (!func->old_addr || klp_is_module(obj)) klp_find_verify_func_addr()
251 ret = klp_find_object_symbol(obj->name, func->old_name, klp_find_verify_func_addr()
252 &func->old_addr); klp_find_verify_func_addr()
254 ret = klp_verify_vmlinux_symbol(func->old_name, klp_find_verify_func_addr()
255 func->old_addr); klp_find_verify_func_addr()
338 struct klp_func *func; klp_ftrace_handler() local
343 func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, klp_ftrace_handler()
345 if (WARN_ON_ONCE(!func)) klp_ftrace_handler()
348 klp_arch_set_pc(regs, (unsigned long)func->new_func); klp_ftrace_handler()
353 static void klp_disable_func(struct klp_func *func) klp_disable_func() argument
357 if (WARN_ON(func->state != KLP_ENABLED)) klp_disable_func()
359 if (WARN_ON(!func->old_addr)) klp_disable_func()
362 ops = klp_find_ops(func->old_addr); klp_disable_func()
368 WARN_ON(ftrace_set_filter_ip(&ops->fops, func->old_addr, 1, 0)); klp_disable_func()
370 list_del_rcu(&func->stack_node); klp_disable_func()
374 list_del_rcu(&func->stack_node); klp_disable_func()
377 func->state = KLP_DISABLED; klp_disable_func()
380 static int klp_enable_func(struct klp_func *func) klp_enable_func() argument
385 if (WARN_ON(!func->old_addr)) klp_enable_func()
388 if (WARN_ON(func->state != KLP_DISABLED)) klp_enable_func()
391 ops = klp_find_ops(func->old_addr); klp_enable_func()
397 ops->fops.func = klp_ftrace_handler; klp_enable_func()
405 list_add_rcu(&func->stack_node, &ops->func_stack); klp_enable_func()
407 ret = ftrace_set_filter_ip(&ops->fops, func->old_addr, 0, 0); klp_enable_func()
410 func->old_name, ret); klp_enable_func()
417 func->old_name, ret); klp_enable_func()
418 ftrace_set_filter_ip(&ops->fops, func->old_addr, 1, 0); klp_enable_func()
424 list_add_rcu(&func->stack_node, &ops->func_stack); klp_enable_func()
427 func->state = KLP_ENABLED; klp_enable_func()
432 list_del_rcu(&func->stack_node); klp_enable_func()
440 struct klp_func *func; klp_disable_object() local
442 klp_for_each_func(obj, func) klp_disable_object()
443 if (func->state == KLP_ENABLED) klp_disable_object()
444 klp_disable_func(func); klp_disable_object()
451 struct klp_func *func; klp_enable_object() local
460 klp_for_each_func(obj, func) { klp_for_each_func()
461 ret = klp_enable_func(func); klp_for_each_func()
596 * /sys/kernel/livepatch/<patch>/<object>/<func>
696 struct klp_func *func; klp_free_funcs_limited() local
698 for (func = obj->funcs; func->old_name && func != limit; func++) klp_free_funcs_limited()
699 kobject_put(&func->kobj); klp_free_funcs_limited()
705 struct klp_func *func; klp_free_object_loaded() local
709 klp_for_each_func(obj, func) klp_free_object_loaded()
710 func->old_addr = 0; klp_free_object_loaded()
736 static int klp_init_func(struct klp_object *obj, struct klp_func *func) klp_init_func() argument
738 INIT_LIST_HEAD(&func->stack_node); klp_init_func()
739 func->state = KLP_DISABLED; klp_init_func()
741 return kobject_init_and_add(&func->kobj, &klp_ktype_func, klp_init_func()
742 &obj->kobj, "%s", func->old_name); klp_init_func()
749 struct klp_func *func; klp_init_object_loaded() local
758 klp_for_each_func(obj, func) { klp_for_each_func()
759 ret = klp_find_verify_func_addr(obj, func); klp_for_each_func()
769 struct klp_func *func; klp_init_object() local
787 klp_for_each_func(obj, func) { klp_for_each_func()
788 ret = klp_init_func(obj, func); klp_for_each_func()
802 klp_free_funcs_limited(obj, func);
239 klp_find_verify_func_addr(struct klp_object *obj, struct klp_func *func) klp_find_verify_func_addr() argument
/linux-4.4.14/drivers/net/wireless/libertas/
H A Dif_sdio.c51 static void if_sdio_interrupt(struct sdio_func *func);
114 struct sdio_func *func; member in struct:if_sdio_card
152 scratch = sdio_readb(card->func, card->scratch_reg, &ret); if_sdio_read_scratch()
154 scratch |= sdio_readb(card->func, card->scratch_reg + 1, if_sdio_read_scratch()
171 rx_unit = sdio_readb(card->func, IF_SDIO_RX_UNIT, &ret); if_sdio_read_rx_unit()
191 rx_len = sdio_readb(card->func, IF_SDIO_RX_LEN, &ret); if_sdio_read_rx_len()
287 event = sdio_readb(card->func, IF_SDIO_EVENT, &ret); if_sdio_handle_event()
323 status = sdio_readb(card->func, IF_SDIO_STATUS, &ret); if_sdio_wait_status()
362 chunk = sdio_align_size(card->func, size); if_sdio_card_to_host()
364 ret = sdio_readsb(card->func, card->buffer, card->ioport, chunk); if_sdio_card_to_host()
439 sdio_claim_host(card->func); if_sdio_host_to_card_worker()
443 ret = sdio_writesb(card->func, card->ioport, if_sdio_host_to_card_worker()
450 sdio_release_host(card->func); if_sdio_host_to_card_worker()
482 sdio_claim_host(card->func); if_sdio_prog_helper()
484 ret = sdio_set_block_size(card->func, 32); if_sdio_prog_helper()
508 ret = sdio_writesb(card->func, card->ioport, if_sdio_prog_helper()
519 ret = sdio_writesb(card->func, card->ioport, chunk_buffer, 64); if_sdio_prog_helper()
530 req_size = sdio_readb(card->func, IF_SDIO_RD_BASE, &ret); if_sdio_prog_helper()
534 req_size |= sdio_readb(card->func, IF_SDIO_RD_BASE + 1, &ret) << 8; if_sdio_prog_helper()
552 sdio_release_host(card->func); if_sdio_prog_helper()
581 sdio_claim_host(card->func); if_sdio_prog_real()
583 ret = sdio_set_block_size(card->func, 32); if_sdio_prog_real()
597 req_size = sdio_readb(card->func, IF_SDIO_RD_BASE, if_sdio_prog_real()
602 req_size |= sdio_readb(card->func, IF_SDIO_RD_BASE + 1, if_sdio_prog_real()
649 ret = sdio_writesb(card->func, card->ioport, if_sdio_prog_real()
687 sdio_release_host(card->func); if_sdio_prog_real()
733 sdio_claim_host(card->func); if_sdio_prog_firmware()
734 sdio_writeb(card->func, 0x00, IF_SDIO_H_INT_MASK, &ret); if_sdio_prog_firmware()
735 sdio_release_host(card->func); if_sdio_prog_firmware()
737 sdio_claim_host(card->func); if_sdio_prog_firmware()
739 sdio_release_host(card->func); if_sdio_prog_firmware()
768 ret = lbs_get_firmware_async(card->priv, &card->func->dev, card->model, if_sdio_prog_firmware()
783 struct sdio_func *func = card->func; if_sdio_finish_power_on() local
787 sdio_claim_host(func); if_sdio_finish_power_on()
788 sdio_set_block_size(card->func, IF_SDIO_BLOCK_SIZE); if_sdio_finish_power_on()
811 ret = sdio_claim_irq(func, if_sdio_interrupt); if_sdio_finish_power_on()
818 sdio_writeb(func, 0x0f, IF_SDIO_H_INT_MASK, &ret); if_sdio_finish_power_on()
822 sdio_release_host(func); if_sdio_finish_power_on()
852 pm_runtime_put(&func->dev); if_sdio_finish_power_on()
859 sdio_release_irq(func); if_sdio_finish_power_on()
861 sdio_release_host(func); if_sdio_finish_power_on()
866 struct sdio_func *func = card->func; if_sdio_power_on() local
867 struct mmc_host *host = func->card->host; if_sdio_power_on()
870 sdio_claim_host(func); if_sdio_power_on()
872 ret = sdio_enable_func(func); if_sdio_power_on()
884 func->card->quirks |= MMC_QUIRK_LENIENT_FN0; if_sdio_power_on()
885 reg = sdio_f0_readb(func, SDIO_CCCR_IF, &ret); if_sdio_power_on()
890 sdio_f0_writeb(func, reg, SDIO_CCCR_IF, &ret); if_sdio_power_on()
895 card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret); if_sdio_power_on()
899 card->ioport |= sdio_readb(func, IF_SDIO_IOPORT + 1, &ret) << 8; if_sdio_power_on()
903 card->ioport |= sdio_readb(func, IF_SDIO_IOPORT + 2, &ret) << 16; if_sdio_power_on()
907 sdio_release_host(func); if_sdio_power_on()
910 sdio_claim_host(func); if_sdio_power_on()
917 sdio_disable_func(func); if_sdio_power_on()
919 sdio_release_host(func); if_sdio_power_on()
925 struct sdio_func *func = card->func; if_sdio_power_off() local
930 sdio_claim_host(func); if_sdio_power_off()
931 sdio_release_irq(func); if_sdio_power_off()
932 sdio_disable_func(func); if_sdio_power_off()
933 sdio_release_host(func); if_sdio_power_off()
965 size = sdio_align_size(card->func, nb + 4); if_sdio_host_to_card()
1044 sdio_claim_host(card->func); if_sdio_exit_deep_sleep()
1046 sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret); if_sdio_exit_deep_sleep()
1050 sdio_release_host(card->func); if_sdio_exit_deep_sleep()
1061 sdio_claim_host(card->func); if_sdio_reset_deep_sleep_wakeup()
1063 sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret); if_sdio_reset_deep_sleep_wakeup()
1067 sdio_release_host(card->func); if_sdio_reset_deep_sleep_wakeup()
1100 reset_host = card->func->card->host; if_sdio_reset_card()
1114 pm_runtime_put_sync(&card->func->dev); if_sdio_power_save()
1125 pm_runtime_get_sync(&card->func->dev); if_sdio_power_restore()
1140 static void if_sdio_interrupt(struct sdio_func *func) if_sdio_interrupt() argument
1148 card = sdio_get_drvdata(func); if_sdio_interrupt()
1150 cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret); if_sdio_interrupt()
1156 sdio_writeb(card->func, ~cause, IF_SDIO_H_INT_STATUS, &ret); if_sdio_interrupt()
1181 static int if_sdio_probe(struct sdio_func *func, if_sdio_probe() argument
1192 for (i = 0;i < func->card->num_info;i++) { if_sdio_probe()
1193 if (sscanf(func->card->info[i], if_sdio_probe()
1196 if (sscanf(func->card->info[i], if_sdio_probe()
1199 if (!strcmp(func->card->info[i], "IBIS Wireless SDIO Card")) { if_sdio_probe()
1205 if (i == func->card->num_info) { if_sdio_probe()
1214 card->func = func; if_sdio_probe()
1246 sdio_set_drvdata(func, card); if_sdio_probe()
1250 func->class, func->vendor, func->device, if_sdio_probe()
1254 priv = lbs_add_card(card, &func->dev); if_sdio_probe()
1296 static void if_sdio_remove(struct sdio_func *func) if_sdio_remove() argument
1303 card = sdio_get_drvdata(func); if_sdio_remove()
1306 pm_runtime_get_noresume(&func->dev); if_sdio_remove()
1344 struct sdio_func *func = dev_to_sdio_func(dev); if_sdio_suspend() local
1346 struct if_sdio_card *card = sdio_get_drvdata(func); if_sdio_suspend()
1348 mmc_pm_flag_t flags = sdio_get_host_pm_caps(func); if_sdio_suspend()
1356 sdio_func_id(func), flags); if_sdio_suspend()
1368 sdio_func_id(func)); if_sdio_suspend()
1372 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); if_sdio_suspend()
1380 return sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ); if_sdio_suspend()
1385 struct sdio_func *func = dev_to_sdio_func(dev); if_sdio_resume() local
1386 struct if_sdio_card *card = sdio_get_drvdata(func); if_sdio_resume()
1389 dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func)); if_sdio_resume()
/linux-4.4.14/drivers/mfd/
H A Dwm8350-gpio.c50 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) gpio_set_func() argument
60 reg | ((func & 0xf) << 0)); gpio_set_func()
66 reg | ((func & 0xf) << 4)); gpio_set_func()
72 reg | ((func & 0xf) << 8)); gpio_set_func()
78 reg | ((func & 0xf) << 12)); gpio_set_func()
84 reg | ((func & 0xf) << 0)); gpio_set_func()
90 reg | ((func & 0xf) << 4)); gpio_set_func()
96 reg | ((func & 0xf) << 8)); gpio_set_func()
102 reg | ((func & 0xf) << 12)); gpio_set_func()
108 reg | ((func & 0xf) << 0)); gpio_set_func()
114 reg | ((func & 0xf) << 4)); gpio_set_func()
120 reg | ((func & 0xf) << 8)); gpio_set_func()
126 reg | ((func & 0xf) << 12)); gpio_set_func()
132 reg | ((func & 0xf) << 0)); gpio_set_func()
188 int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func, wm8350_gpio_config() argument
217 return gpio_set_func(wm8350, gpio, func); wm8350_gpio_config()
/linux-4.4.14/include/net/
H A Dp8022.h5 int (*func)(struct sk_buff *skb,
/linux-4.4.14/arch/mips/lib/
H A Dstrlen_user.S25 .macro __BUILD_STRLEN_ASM func
26 LEAF(__strlen_\func\()_asm)
32 .ifeqs "\func", "kernel"
41 END(__strlen_\func\()_asm)
H A Dstrncpy_user.S31 .macro __BUILD_STRNCPY_ASM func
32 LEAF(__strncpy_from_\func\()_asm)
37 FEXPORT(__strncpy_from_\func\()_nocheck_asm)
40 .ifeqs "\func","kernel"
57 END(__strncpy_from_\func\()_asm)
H A Dstrnlen_user.S28 .macro __BUILD_STRNLEN_ASM func
29 LEAF(__strnlen_\func\()_asm)
34 FEXPORT(__strnlen_\func\()_nocheck_asm)
43 .ifeqs "\func", "kernel"
60 END(__strnlen_\func\()_asm)
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mc/
H A Dbase.c31 if (mc->func->unk260) nvkm_mc_unk260()
32 mc->func->unk260(mc, data); nvkm_mc_unk260()
38 return mc->func->intr_unarm(mc); nvkm_mc_intr_unarm()
44 return mc->func->intr_rearm(mc); nvkm_mc_intr_rearm()
50 u32 intr = mc->func->intr_mask(mc); nvkm_mc_intr_mask()
61 const struct nvkm_mc_intr *map = mc->func->intr; nvkm_mc_intr()
92 if (mc->func->init) nvkm_mc_init()
93 mc->func->init(mc); nvkm_mc_init()
112 nvkm_mc_new_(const struct nvkm_mc_func *func, struct nvkm_device *device, nvkm_mc_new_() argument
121 mc->func = func; nvkm_mc_new_()
/linux-4.4.14/arch/x86/kernel/
H A Dearly-quirks.c25 static void __init fix_hypertransport_config(int num, int slot, int func) fix_hypertransport_config() argument
34 htcfg = read_pci_config(num, slot, func, 0x68); fix_hypertransport_config()
44 write_pci_config(num, slot, func, 0x68, htcfg); fix_hypertransport_config()
51 static void __init via_bugs(int num, int slot, int func) via_bugs() argument
74 static void __init nvidia_bugs(int num, int slot, int func) nvidia_bugs() argument
103 static u32 __init ati_ixp4x0_rev(int num, int slot, int func) ati_ixp4x0_rev() argument
108 b = read_pci_config_byte(num, slot, func, 0xac); ati_ixp4x0_rev()
110 write_pci_config_byte(num, slot, func, 0xac, b); ati_ixp4x0_rev()
112 d = read_pci_config(num, slot, func, 0x70); ati_ixp4x0_rev()
114 write_pci_config(num, slot, func, 0x70, d); ati_ixp4x0_rev()
116 d = read_pci_config(num, slot, func, 0x8); ati_ixp4x0_rev()
121 static void __init ati_bugs(int num, int slot, int func) ati_bugs() argument
129 d = ati_ixp4x0_rev(num, slot, func); ati_bugs()
147 static u32 __init ati_sbx00_rev(int num, int slot, int func) ati_sbx00_rev() argument
151 d = read_pci_config(num, slot, func, 0x8); ati_sbx00_rev()
157 static void __init ati_bugs_contd(int num, int slot, int func) ati_bugs_contd() argument
161 rev = ati_sbx00_rev(num, slot, func); ati_bugs_contd()
177 d = read_pci_config(num, slot, func, 0x64); ati_bugs_contd()
189 static void __init ati_bugs(int num, int slot, int func) ati_bugs() argument
193 static void __init ati_bugs_contd(int num, int slot, int func) ati_bugs_contd() argument
198 static void __init intel_remapping_check(int num, int slot, int func) intel_remapping_check() argument
203 device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID); intel_remapping_check()
204 revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID); intel_remapping_check()
229 static u32 __init intel_stolen_base(int num, int slot, int func, size_t stolen_size) intel_stolen_base() argument
238 base = read_pci_config(num, slot, func, 0x5c); intel_stolen_base()
303 static u32 __init i830_stolen_base(int num, int slot, int func, size_t stolen_size) i830_stolen_base() argument
308 static u32 __init i845_stolen_base(int num, int slot, int func, size_t stolen_size) i845_stolen_base() argument
313 static u32 __init i85x_stolen_base(int num, int slot, int func, size_t stolen_size) i85x_stolen_base() argument
318 static u32 __init i865_stolen_base(int num, int slot, int func, size_t stolen_size) i865_stolen_base() argument
328 static size_t __init i830_stolen_size(int num, int slot, int func) i830_stolen_size() argument
356 static size_t __init gen3_stolen_size(int num, int slot, int func) gen3_stolen_size() argument
411 static size_t __init gen6_stolen_size(int num, int slot, int func) gen6_stolen_size() argument
415 gmch_ctrl = read_pci_config_16(num, slot, func, SNB_GMCH_CTRL); gen6_stolen_size()
422 static size_t __init gen8_stolen_size(int num, int slot, int func) gen8_stolen_size() argument
426 gmch_ctrl = read_pci_config_16(num, slot, func, SNB_GMCH_CTRL); gen8_stolen_size()
432 static size_t __init chv_stolen_size(int num, int slot, int func) chv_stolen_size() argument
436 gmch_ctrl = read_pci_config_16(num, slot, func, SNB_GMCH_CTRL); chv_stolen_size()
454 size_t (*size)(int num, int slot, int func);
455 u32 (*base)(int num, int slot, int func, size_t size);
458 static size_t __init gen9_stolen_size(int num, int slot, int func) gen9_stolen_size() argument
462 gmch_ctrl = read_pci_config_16(num, slot, func, SNB_GMCH_CTRL); gen9_stolen_size()
473 typedef size_t (*stolen_size_fn)(int num, int slot, int func);
552 static void __init intel_graphics_stolen(int num, int slot, int func) intel_graphics_stolen() argument
559 device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID); intel_graphics_stolen()
560 subvendor = read_pci_config_16(num, slot, func, intel_graphics_stolen()
562 subdevice = read_pci_config_16(num, slot, func, PCI_SUBSYSTEM_ID); intel_graphics_stolen()
568 size = stolen_funcs->size(num, slot, func); intel_graphics_stolen()
569 start = stolen_funcs->base(num, slot, func, size); intel_graphics_stolen()
584 static void __init force_disable_hpet(int num, int slot, int func) force_disable_hpet() argument
602 void (*f)(int num, int slot, int func);
647 * @func: PCI function
654 static int __init check_dev_quirk(int num, int slot, int func) check_dev_quirk() argument
662 class = read_pci_config_16(num, slot, func, PCI_CLASS_DEVICE); check_dev_quirk()
667 vendor = read_pci_config_16(num, slot, func, PCI_VENDOR_ID); check_dev_quirk()
669 device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID); check_dev_quirk()
680 early_qrk[i].f(num, slot, func); check_dev_quirk()
685 type = read_pci_config_byte(num, slot, func, check_dev_quirk()
695 int slot, func; early_quirks() local
703 for (func = 0; func < 8; func++) { early_quirks()
705 if (check_dev_quirk(0, slot, func)) early_quirks()
H A Daperture_64.c95 static u32 __init find_cap(int bus, int slot, int func, int cap) find_cap() argument
100 if (!(read_pci_config_16(bus, slot, func, PCI_STATUS) & find_cap()
104 pos = read_pci_config_byte(bus, slot, func, PCI_CAPABILITY_LIST); find_cap()
109 id = read_pci_config_byte(bus, slot, func, pos+PCI_CAP_LIST_ID); find_cap()
114 pos = read_pci_config_byte(bus, slot, func, find_cap()
121 static u32 __init read_agp(int bus, int slot, int func, int cap, u32 *order) read_agp() argument
130 pr_info("pci 0000:%02x:%02x:%02x: AGP bridge\n", bus, slot, func); read_agp()
131 apsizereg = read_pci_config_16(bus, slot, func, cap + 0x14); read_agp()
134 bus, slot, func); read_agp()
150 aper_low = read_pci_config(bus, slot, func, 0x10); read_agp()
151 aper_hi = read_pci_config(bus, slot, func, 0x14); read_agp()
159 bus, slot, func, aper, aper + (32ULL << (old_order + 20)) - 1, read_agp()
163 bus, slot, func, 32 << *order, apsizereg); read_agp()
168 bus, slot, func, aper, aper + (32ULL << (*order + 20)) - 1, read_agp()
191 int bus, slot, func; search_agp_bridge() local
196 for (func = 0; func < 8; func++) { search_agp_bridge()
199 class = read_pci_config(bus, slot, func, search_agp_bridge()
208 cap = find_cap(bus, slot, func, search_agp_bridge()
213 return read_agp(bus, slot, func, cap, search_agp_bridge()
218 type = read_pci_config_byte(bus, slot, func, search_agp_bridge()
/linux-4.4.14/arch/s390/include/asm/
H A Dsmp.h27 extern void smp_call_online_cpu(void (*func)(void *), void *);
28 extern void smp_call_ipl_cpu(void (*func)(void *), void *);
43 static inline void smp_call_ipl_cpu(void (*func)(void *), void *data) smp_call_ipl_cpu()
45 func(data); smp_call_ipl_cpu()
48 static inline void smp_call_online_cpu(void (*func)(void *), void *data) smp_call_online_cpu()
50 func(data); smp_call_online_cpu()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dshadow.c32 const struct nvbios_source *func; member in struct:shadow
45 u32 read = mthd->func->read(data, start, limit - start, bios); shadow_fetch()
58 if (mthd->func->no_pcir) { shadow_image()
61 image.size = mthd->func->size(mthd->data); shadow_image()
85 if (!mthd->func->ignore_checksum && shadow_image()
89 if (mthd->func->rw) shadow_image()
109 const struct nvbios_source *func = mthd->func; shadow_method() local
111 if (func->name) { shadow_method()
112 nvkm_debug(subdev, "trying %s...\n", name ? name : func->name); shadow_method()
113 if (func->init) { shadow_method()
114 mthd->data = func->init(bios, name); shadow_method()
121 if (func->fini) shadow_method()
122 func->fini(mthd->data); shadow_method()
187 for (mthd = mthds; mthd->func; mthd++) { nvbios_shadow()
188 if (mthd->func->name && nvbios_shadow()
189 !strcasecmp(source, mthd->func->name)) { nvbios_shadow()
198 mthd->func = &shadow_fw; nvbios_shadow()
200 mthd->func = NULL; nvbios_shadow()
212 for (mthd = mthds, best = mthd; mthd->func; mthd++) { nvbios_shadow()
223 for (mthd = mthds; mthd->func; mthd++) { nvbios_shadow()
233 nvkm_debug(subdev, "using image from %s\n", best->func ? nvbios_shadow()
234 best->func->name : source); nvbios_shadow()
H A Dgpio.c87 .func = (info & 0x07e0) >> 5, dcb_gpio_parse()
97 .func = (info & 0x0000ff00) >> 8, dcb_gpio_parse()
107 .func = (info & 0x0000ff00) >> 8, dcb_gpio_parse()
119 dcb_gpio_match(struct nvkm_bios *bios, int idx, u8 func, u8 line, dcb_gpio_match() argument
127 (func == 0xff || func == gpio->func)) dcb_gpio_match()
133 if (*ver >= 0x22 && *ver < 0x30 && func == DCB_GPIO_TVDAC0) { dcb_gpio_match()
138 .func = DCB_GPIO_TVDAC0, dcb_gpio_match()
H A Dextdev.c70 struct nvbios_extdev_func *func) nvbios_extdev_parse()
78 extdev_parse_entry(bios, entry, func); nvbios_extdev_parse()
84 struct nvbios_extdev_func *func) nvbios_extdev_find()
91 extdev_parse_entry(bios, entry, func); nvbios_extdev_find()
92 if (func->type == type) nvbios_extdev_find()
69 nvbios_extdev_parse(struct nvkm_bios *bios, int idx, struct nvbios_extdev_func *func) nvbios_extdev_parse() argument
83 nvbios_extdev_find(struct nvkm_bios *bios, enum nvbios_extdev_type type, struct nvbios_extdev_func *func) nvbios_extdev_find() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
H A Dchan.c52 if (chan->func->engine_fini) { nvkm_fifo_chan_child_fini()
53 ret = chan->func->engine_fini(chan, engine, suspend); nvkm_fifo_chan_child_fini()
91 if (chan->func->engine_init) { nvkm_fifo_chan_child_init()
92 ret = chan->func->engine_init(chan, engine); nvkm_fifo_chan_child_init()
113 if (chan->func->object_dtor) nvkm_fifo_chan_child_del()
114 chan->func->object_dtor(chan, object->hash); nvkm_fifo_chan_child_del()
117 if (chan->func->engine_dtor) nvkm_fifo_chan_child_del()
118 chan->func->engine_dtor(chan, engine); nvkm_fifo_chan_child_del()
157 if (engine->func->fifo.cclass) { nvkm_fifo_chan_child_new()
158 ret = engine->func->fifo.cclass(chan, &cclass, nvkm_fifo_chan_child_new()
161 if (engine->func->cclass) { nvkm_fifo_chan_child_new()
162 ret = nvkm_object_new_(engine->func->cclass, &cclass, nvkm_fifo_chan_child_new()
168 if (chan->func->engine_ctor) { nvkm_fifo_chan_child_new()
169 ret = chan->func->engine_ctor(chan, oclass->engine, nvkm_fifo_chan_child_new()
190 if (chan->func->object_ctor) { nvkm_fifo_chan_child_new()
192 chan->func->object_ctor(chan, object->oproxy.object); nvkm_fifo_chan_child_new()
217 if (engine->func->fifo.sclass) { nvkm_fifo_chan_child_get()
218 ret = engine->func->fifo.sclass(oclass, index); nvkm_fifo_chan_child_get()
230 while (engine->func->sclass[c].oclass) { nvkm_fifo_chan_child_get()
232 oclass->base = engine->func->sclass[index]; nvkm_fifo_chan_child_get()
250 if (chan->func->ntfy) nvkm_fifo_chan_ntfy()
251 return chan->func->ntfy(chan, type, pevent); nvkm_fifo_chan_ntfy()
298 chan->func->fini(chan); nvkm_fifo_chan_fini()
306 chan->func->init(chan); nvkm_fifo_chan_init()
315 void *data = chan->func->dtor(chan); nvkm_fifo_chan_dtor()
348 nvkm_fifo_chan_ctor(const struct nvkm_fifo_chan_func *func, nvkm_fifo_chan_ctor() argument
362 chan->func = func; nvkm_fifo_chan_ctor()
409 chan->addr = device->func->resource_addr(device, bar) + nvkm_fifo_chan_ctor()
H A Dbase.c37 return fifo->func->pause(fifo, flags); nvkm_fifo_pause()
43 return fifo->func->start(fifo, flags); nvkm_fifo_start()
115 fifo->func->uevent_fini(fifo); nvkm_fifo_uevent_fini()
122 fifo->func->uevent_init(fifo); nvkm_fifo_uevent_init()
181 while ((sclass = fifo->func->chan[c])) { nvkm_fifo_class_get()
197 fifo->func->intr(fifo); nvkm_fifo_intr()
204 if (fifo->func->fini) nvkm_fifo_fini()
205 fifo->func->fini(fifo); nvkm_fifo_fini()
213 if (fifo->func->oneinit) nvkm_fifo_oneinit()
214 return fifo->func->oneinit(fifo); nvkm_fifo_oneinit()
222 fifo->func->init(fifo); nvkm_fifo_init()
231 if (fifo->func->dtor) nvkm_fifo_dtor()
232 data = fifo->func->dtor(fifo); nvkm_fifo_dtor()
249 nvkm_fifo_ctor(const struct nvkm_fifo_func *func, struct nvkm_device *device, nvkm_fifo_ctor() argument
254 fifo->func = func; nvkm_fifo_ctor()
269 if (func->uevent_init) { nvkm_fifo_ctor()
/linux-4.4.14/drivers/net/wireless/brcm80211/brcmsmac/
H A Dbrcms_trace_brcmsmac_msg.h62 TP_PROTO(u32 level, const char *func, struct va_format *vaf),
63 TP_ARGS(level, func, vaf),
66 __string(func, func)
71 __assign_str(func, func);
76 TP_printk("%s: %s", __get_str(func), __get_str(msg))
/linux-4.4.14/drivers/soc/sunxi/
H A Dsunxi_sram.c24 char *func; member in struct:sunxi_sram_func
33 struct sunxi_sram_func *func; member in struct:sunxi_sram_data
44 .func = _func, \
54 .func = (struct sunxi_sram_func[]){ \
92 struct sunxi_sram_func *func; sunxi_sram_show() local
122 for (func = sram_data->func; func->func; func++) { for_each_child_of_node()
123 seq_printf(s, "\t\t%s%c\n", func->func, for_each_child_of_node()
124 func->val == val ? '*' : ' '); for_each_child_of_node()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/pci/
H A Dbase.c34 return pci->func->rd32(pci, addr); nvkm_pci_rd32()
40 pci->func->wr08(pci, addr, data); nvkm_pci_wr08()
46 pci->func->wr32(pci, addr, data); nvkm_pci_wr32()
52 u32 data = pci->func->rd32(pci, addr); nvkm_pci_mask()
53 pci->func->wr32(pci, addr, (data & ~mask) | value); nvkm_pci_mask()
77 pci->func->msi_rearm(pci); nvkm_pci_intr()
122 if (pci->func->init) nvkm_pci_init()
123 pci->func->init(pci); nvkm_pci_init()
152 nvkm_pci_new_(const struct nvkm_pci_func *func, struct nvkm_device *device, nvkm_pci_new_() argument
160 pci->func = func; nvkm_pci_new_()
161 pci->pdev = device->func->pci(device)->pdev; nvkm_pci_new_()
184 if (pci->msi && func->msi_rearm) { nvkm_pci_new_()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
H A Dbase.c35 if (volt->func->volt_get) nvkm_volt_get()
36 return volt->func->volt_get(volt); nvkm_volt_get()
38 ret = volt->func->vid_get(volt); nvkm_volt_get()
55 if (volt->func->volt_set) nvkm_volt_set()
56 return volt->func->volt_set(volt, uv); nvkm_volt_set()
60 ret = volt->func->vid_set(volt, volt->vid[i].vid); nvkm_volt_set()
95 if (volt->func->set_id) nvkm_volt_set_id()
96 return volt->func->set_id(volt, id, condition); nvkm_volt_set_id()
174 nvkm_volt_ctor(const struct nvkm_volt_func *func, struct nvkm_device *device, nvkm_volt_ctor() argument
181 volt->func = func; nvkm_volt_ctor()
196 nvkm_volt_new_(const struct nvkm_volt_func *func, struct nvkm_device *device, nvkm_volt_new_() argument
201 nvkm_volt_ctor(func, device, index, *pvolt); nvkm_volt_new_()
/linux-4.4.14/drivers/net/wireless/ath/ath6kl/
H A Dsdio.c34 struct sdio_func *func; member in struct:ath6kl_sdio
107 static inline void ath6kl_sdio_set_cmd53_arg(u32 *arg, u8 rw, u8 func, ath6kl_sdio_set_cmd53_arg() argument
112 ((func & 0x7) << 28) | ath6kl_sdio_set_cmd53_arg()
123 const u8 func = 0; ath6kl_sdio_set_cmd52_arg() local
126 ((func & 0x7) << 28) | ath6kl_sdio_set_cmd52_arg()
148 static int ath6kl_sdio_io(struct sdio_func *func, u32 request, u32 addr, ath6kl_sdio_io() argument
153 sdio_claim_host(func); ath6kl_sdio_io()
166 ret = sdio_writesb(func, addr, buf, len); ath6kl_sdio_io()
168 ret = sdio_memcpy_toio(func, addr, buf, len); ath6kl_sdio_io()
171 ret = sdio_readsb(func, buf, addr, len); ath6kl_sdio_io()
173 ret = sdio_memcpy_fromio(func, buf, addr, len); ath6kl_sdio_io()
176 sdio_release_host(func); ath6kl_sdio_io()
275 status = ath6kl_sdio_io(ar_sdio->func, scat_req->req, ath6kl_sdio_scat_rw()
302 ath6kl_sdio_set_cmd53_arg(&cmd.arg, rw, ar_sdio->func->num, ath6kl_sdio_scat_rw()
312 sdio_claim_host(ar_sdio->func); ath6kl_sdio_scat_rw()
314 mmc_set_data_timeout(&data, ar_sdio->func->card); ath6kl_sdio_scat_rw()
323 mmc_wait_for_req(ar_sdio->func->card->host, &mmc_req); ath6kl_sdio_scat_rw()
325 sdio_release_host(ar_sdio->func); ath6kl_sdio_scat_rw()
432 ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len); ath6kl_sdio_read_write_sync()
477 static void ath6kl_sdio_irq_handler(struct sdio_func *func) ath6kl_sdio_irq_handler() argument
484 ar_sdio = sdio_get_drvdata(func); ath6kl_sdio_irq_handler()
490 sdio_release_host(ar_sdio->func); ath6kl_sdio_irq_handler()
493 sdio_claim_host(ar_sdio->func); ath6kl_sdio_irq_handler()
504 struct sdio_func *func = ar_sdio->func; ath6kl_sdio_power_on() local
512 sdio_claim_host(func); ath6kl_sdio_power_on()
514 ret = sdio_enable_func(func); ath6kl_sdio_power_on()
516 ath6kl_err("Unable to enable sdio func: %d)\n", ret); ath6kl_sdio_power_on()
517 sdio_release_host(func); ath6kl_sdio_power_on()
521 sdio_release_host(func); ath6kl_sdio_power_on()
545 sdio_claim_host(ar_sdio->func); ath6kl_sdio_power_off()
546 ret = sdio_disable_func(ar_sdio->func); ath6kl_sdio_power_off()
547 sdio_release_host(ar_sdio->func); ath6kl_sdio_power_off()
588 sdio_claim_host(ar_sdio->func); ath6kl_sdio_irq_enable()
591 ret = sdio_claim_irq(ar_sdio->func, ath6kl_sdio_irq_handler); ath6kl_sdio_irq_enable()
595 sdio_release_host(ar_sdio->func); ath6kl_sdio_irq_enable()
610 sdio_claim_host(ar_sdio->func); ath6kl_sdio_irq_disable()
613 sdio_release_host(ar_sdio->func); ath6kl_sdio_irq_disable()
620 sdio_claim_host(ar_sdio->func); ath6kl_sdio_irq_disable()
623 ret = sdio_release_irq(ar_sdio->func); ath6kl_sdio_irq_disable()
627 sdio_release_host(ar_sdio->func); ath6kl_sdio_irq_disable()
731 if (ar_sdio->func->card->host->max_segs < MAX_SCATTER_ENTRIES_PER_REQ) { ath6kl_sdio_enable_scatter()
733 ar_sdio->func->card->host->max_segs, ath6kl_sdio_enable_scatter()
784 struct sdio_func *func = ar_sdio->func; ath6kl_sdio_config() local
787 sdio_claim_host(func); ath6kl_sdio_config()
792 ret = ath6kl_sdio_func0_cmd52_wr_byte(func->card, ath6kl_sdio_config()
805 func->enable_timeout = 100; ath6kl_sdio_config()
807 ret = sdio_set_block_size(func, HIF_MBOX_BLOCK_SIZE); ath6kl_sdio_config()
815 sdio_release_host(func); ath6kl_sdio_config()
823 struct sdio_func *func = ar_sdio->func; ath6kl_set_sdio_pm_caps() local
827 flags = sdio_get_host_pm_caps(func); ath6kl_set_sdio_pm_caps()
835 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); ath6kl_set_sdio_pm_caps()
842 ret = sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ); ath6kl_set_sdio_pm_caps()
852 struct sdio_func *func = ar_sdio->func; ath6kl_sdio_suspend() local
880 flags = sdio_get_host_pm_caps(func); ath6kl_sdio_suspend()
884 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); ath6kl_sdio_suspend()
895 ret = sdio_set_host_pm_flags(func, ath6kl_sdio_suspend()
910 if (func->card && func->card->host) ath6kl_sdio_suspend()
911 func->card->host->pm_flags &= ~MMC_PM_KEEP_POWER; ath6kl_sdio_suspend()
1294 static int ath6kl_sdio_probe(struct sdio_func *func, ath6kl_sdio_probe() argument
1303 "sdio new func %d vendor 0x%x device 0x%x block 0x%x/0x%x\n", ath6kl_sdio_probe()
1304 func->num, func->vendor, func->device, ath6kl_sdio_probe()
1305 func->max_blksize, func->cur_blksize); ath6kl_sdio_probe()
1317 ar_sdio->func = func; ath6kl_sdio_probe()
1318 sdio_set_drvdata(func, ar_sdio); ath6kl_sdio_probe()
1339 ar = ath6kl_core_create(&ar_sdio->func->dev); ath6kl_sdio_probe()
1378 static void ath6kl_sdio_remove(struct sdio_func *func) ath6kl_sdio_remove() argument
1383 "sdio removed func %d vendor 0x%x device 0x%x\n", ath6kl_sdio_remove()
1384 func->num, func->vendor, func->device); ath6kl_sdio_remove()
1386 ar_sdio = sdio_get_drvdata(func); ath6kl_sdio_remove()
/linux-4.4.14/drivers/net/ethernet/oki-semi/pch_gbe/
H A Dpch_gbe_api.c99 * pch_gbe_plat_init_function_pointers - Init func ptrs
107 hw->func = &pch_gbe_ops; pch_gbe_plat_init_function_pointers()
135 if (!hw->func->get_bus_info) { pch_gbe_hal_get_bus_info()
141 hw->func->get_bus_info(hw); pch_gbe_hal_get_bus_info()
153 if (!hw->func->init_hw) { pch_gbe_hal_init_hw()
159 return hw->func->init_hw(hw); pch_gbe_hal_init_hw()
174 if (!hw->func->read_phy_reg) pch_gbe_hal_read_phy_reg()
176 return hw->func->read_phy_reg(hw, offset, data); pch_gbe_hal_read_phy_reg()
191 if (!hw->func->write_phy_reg) pch_gbe_hal_write_phy_reg()
193 return hw->func->write_phy_reg(hw, offset, data); pch_gbe_hal_write_phy_reg()
202 if (!hw->func->reset_phy) { pch_gbe_hal_phy_hw_reset()
208 hw->func->reset_phy(hw); pch_gbe_hal_phy_hw_reset()
217 if (!hw->func->sw_reset_phy) { pch_gbe_hal_phy_sw_reset()
223 hw->func->sw_reset_phy(hw); pch_gbe_hal_phy_sw_reset()
235 if (!hw->func->read_mac_addr) { pch_gbe_hal_read_mac_addr()
241 return hw->func->read_mac_addr(hw); pch_gbe_hal_read_mac_addr()
250 if (hw->func->power_up_phy) pch_gbe_hal_power_up_phy()
251 hw->func->power_up_phy(hw); pch_gbe_hal_power_up_phy()
260 if (hw->func->power_down_phy) pch_gbe_hal_power_down_phy()
261 hw->func->power_down_phy(hw); pch_gbe_hal_power_down_phy()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/
H A Dtimer.h8 void (*func)(struct nvkm_alarm *); member in struct:nvkm_alarm
12 nvkm_alarm_init(struct nvkm_alarm *alarm, void (*func)(struct nvkm_alarm *)) nvkm_alarm_init()
15 alarm->func = func; nvkm_alarm_init()
19 const struct nvkm_timer_func *func; member in struct:nvkm_timer
H A Dfuse.h6 const struct nvkm_fuse_func *func; member in struct:nvkm_fuse
H A Dvolt.h6 const struct nvkm_volt_func *func; member in struct:nvkm_volt
H A Dgpio.h22 const struct nvkm_gpio_func *func; member in struct:nvkm_gpio
28 void nvkm_gpio_reset(struct nvkm_gpio *, u8 func);
H A Dbar.h7 const struct nvkm_bar_func *func; member in struct:nvkm_bar
H A Dmc.h6 const struct nvkm_mc_func *func; member in struct:nvkm_mc
/linux-4.4.14/arch/mips/loongson64/common/
H A Dreset.c26 void (*func)(void); loongson_reboot()
28 func = (void *)ioremap_nocache(LOONGSON_BOOT_BASE, 4); loongson_reboot()
32 " jr %[func] \n" loongson_reboot()
35 : [func] "r" (func)); loongson_reboot()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/timer/
H A Dbase.c29 return tmr->func->read(tmr); nvkm_timer_read()
49 tmr->func->alarm_init(tmr, alarm->timestamp); nvkm_timer_alarm_trigger()
51 tmr->func->alarm_fini(tmr); nvkm_timer_alarm_trigger()
58 alarm->func(alarm); nvkm_timer_alarm_trigger()
101 tmr->func->intr(tmr); nvkm_timer_intr()
108 tmr->func->alarm_fini(tmr); nvkm_timer_fini()
116 if (tmr->func->init) nvkm_timer_init()
117 tmr->func->init(tmr); nvkm_timer_init()
118 tmr->func->time(tmr, ktime_to_ns(ktime_get())); nvkm_timer_init()
138 nvkm_timer_new_(const struct nvkm_timer_func *func, struct nvkm_device *device, nvkm_timer_new_() argument
147 tmr->func = func; nvkm_timer_new_()
/linux-4.4.14/arch/mips/include/asm/mach-ralink/
H A Dpinmux.h17 .func = _func, .gpio = _mask, \
22 .func = _func, .gpio = _gpio, \
49 struct rt2880_pmx_func *func; member in struct:rt2880_pmx_group
/linux-4.4.14/drivers/media/rc/img-ir/
H A Dimg-ir-sony.c18 unsigned int dev, subdev, func; img_ir_sony_scancode() local
24 func = raw & 0x7f; /* first 7 bits */ img_ir_sony_scancode()
33 func = raw & 0x7f; /* first 7 bits */ img_ir_sony_scancode()
42 func = raw & 0x7f; /* first 7 bits */ img_ir_sony_scancode()
52 request->scancode = dev << 16 | subdev << 8 | func; img_ir_sony_scancode()
60 unsigned int dev, subdev, func; img_ir_sony_filter() local
68 func = (in->data >> 0) & 0x7f; img_ir_sony_filter()
101 out->data = func | img_ir_sony_filter()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/engine/
H A Ddma.h7 const struct nvkm_dmaobj_func *func; member in struct:nvkm_dmaobj
21 const struct nvkm_dma_func *func; member in struct:nvkm_dma
H A Dsw.h6 const struct nvkm_sw_func *func; member in struct:nvkm_sw
H A Dxtensa.h7 const struct nvkm_xtensa_func *func; member in struct:nvkm_xtensa
/linux-4.4.14/arch/powerpc/include/asm/
H A Dcode-patching.h50 static inline unsigned long ppc_function_entry(void *func) ppc_function_entry() argument
54 u32 *insn = func; ppc_function_entry()
77 return (unsigned long)func; ppc_function_entry()
84 return ((func_descr_t *)func)->entry; ppc_function_entry()
87 return (unsigned long)func; ppc_function_entry()
91 static inline unsigned long ppc_global_function_entry(void *func) ppc_global_function_entry() argument
95 return (unsigned long)func; ppc_global_function_entry()
98 return ppc_function_entry(func); ppc_global_function_entry()
H A Dirqflags.h21 #define TRACE_WITH_FRAME_BUFFER(func) \
26 bl func; \
30 #define TRACE_WITH_FRAME_BUFFER(func) \
31 bl func;
/linux-4.4.14/arch/arm/mach-s3c64xx/
H A Dbacklight.h15 * @func: Special function of GPIO line for PWM timer
19 int func; member in struct:samsung_bl_gpio_info
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
H A Dbase.c95 i2c->func->aux_mask(i2c, type, aux->intr, 0); nvkm_i2c_intr_fini()
104 i2c->func->aux_mask(i2c, type, aux->intr, aux->intr); nvkm_i2c_intr_init()
135 if (!i2c->func->aux_stat) nvkm_i2c_intr()
138 i2c->func->aux_stat(i2c, &hi, &lo, &rq, &tx); nvkm_i2c_intr()
165 if ((mask = (1 << i2c->func->aux) - 1), i2c->func->aux_stat) { nvkm_i2c_fini()
166 i2c->func->aux_mask(i2c, NVKM_I2C_ANY, mask, 0); nvkm_i2c_fini()
167 i2c->func->aux_stat(i2c, &mask, &mask, &mask, &mask); nvkm_i2c_fini()
244 nvkm_i2c_new_(const struct nvkm_i2c_func *func, struct nvkm_device *device, nvkm_i2c_new_() argument
258 i2c->func = func; nvkm_i2c_new_()
276 ret = func->pad_s_new(i2c, id, &pad); nvkm_i2c_new_()
280 ret = func->pad_x_new(i2c, NVKM_I2C_PAD_CCB(i), &pad); nvkm_i2c_new_()
289 if (pad->func->bus_new_0 && ccbE.type == DCB_I2C_NV04_BIT) { nvkm_i2c_new_()
290 ret = pad->func->bus_new_0(pad, NVKM_I2C_BUS_CCB(i), nvkm_i2c_new_()
294 if (pad->func->bus_new_4 && nvkm_i2c_new_()
299 ret = pad->func->bus_new_4(pad, NVKM_I2C_BUS_CCB(i), nvkm_i2c_new_()
308 if (pad->func->aux_new_6 && nvkm_i2c_new_()
312 ret = pad->func->aux_new_6(pad, NVKM_I2C_BUS_CCB(i), nvkm_i2c_new_()
373 if (pad->func->aux_new_6 && dcbE.type == DCB_OUTPUT_DP) { nvkm_i2c_new_()
376 ret = pad->func->aux_new_6(pad, id, 0, &aux); nvkm_i2c_new_()
383 if (pad->func->bus_new_4) { nvkm_i2c_new_()
386 ret = pad->func->bus_new_4(pad, id, 0, &bus); nvkm_i2c_new_()
H A Dpad.c31 if (pad->func->mode) nvkm_i2c_pad_mode_locked()
32 pad->func->mode(pad, mode); nvkm_i2c_pad_mode_locked()
96 nvkm_i2c_pad_ctor(const struct nvkm_i2c_pad_func *func, struct nvkm_i2c *i2c, nvkm_i2c_pad_ctor() argument
99 pad->func = func; nvkm_i2c_pad_ctor()
109 nvkm_i2c_pad_new_(const struct nvkm_i2c_pad_func *func, struct nvkm_i2c *i2c, nvkm_i2c_pad_new_() argument
114 nvkm_i2c_pad_ctor(func, i2c, id, *ppad); nvkm_i2c_pad_new_()
H A Daux.c54 ret = aux->func->xfer(aux, true, cmd, msg->addr, ptr, cnt); nvkm_i2c_aux_i2c_xfer()
120 return aux->func->xfer(aux, retry, type, addr, data, size); nvkm_i2c_aux_xfer()
126 if (aux->func->lnk_ctl) nvkm_i2c_aux_lnk_ctl()
127 return aux->func->lnk_ctl(aux, nr, bw, ef); nvkm_i2c_aux_lnk_ctl()
135 if (aux && !WARN_ON(!aux->func)) { nvkm_i2c_aux_del()
145 nvkm_i2c_aux_ctor(const struct nvkm_i2c_aux_func *func, nvkm_i2c_aux_ctor() argument
151 aux->func = func; nvkm_i2c_aux_ctor()
167 nvkm_i2c_aux_new_(const struct nvkm_i2c_aux_func *func, nvkm_i2c_aux_new_() argument
173 return nvkm_i2c_aux_ctor(func, pad, id, *paux); nvkm_i2c_aux_new_()
H A Dbus.c50 bus->func->drive_scl(bus, state); nvkm_i2c_bus_setscl()
57 bus->func->drive_sda(bus, state); nvkm_i2c_bus_setsda()
64 return bus->func->sense_scl(bus); nvkm_i2c_bus_getscl()
71 return bus->func->sense_sda(bus); nvkm_i2c_bus_getsda()
87 ret = bus->func->xfer(bus, msgs, num); nvkm_i2c_bus_xfer()
111 if (bus->func->init) nvkm_i2c_bus_init()
112 bus->func->init(bus); nvkm_i2c_bus_init()
178 if (bus && !WARN_ON(!bus->func)) { nvkm_i2c_bus_del()
189 nvkm_i2c_bus_ctor(const struct nvkm_i2c_bus_func *func, nvkm_i2c_bus_ctor() argument
202 bus->func = func; nvkm_i2c_bus_ctor()
214 if ( bus->func->drive_scl && nvkm_i2c_bus_ctor()
238 nvkm_i2c_bus_new_(const struct nvkm_i2c_bus_func *func, nvkm_i2c_bus_new_() argument
244 return nvkm_i2c_bus_ctor(func, pad, id, *pbus); nvkm_i2c_bus_new_()
/linux-4.4.14/drivers/pinctrl/sunxi/
H A Dpinctrl-sunxi.c57 struct sunxi_pinctrl_function *func = pctl->functions; sunxi_pinctrl_find_function_by_name() local
61 if (!func[i].name) sunxi_pinctrl_find_function_by_name()
64 if (!strcmp(func[i].name, name)) sunxi_pinctrl_find_function_by_name()
65 return func + i; sunxi_pinctrl_find_function_by_name()
82 struct sunxi_desc_function *func = pin->functions; sunxi_pinctrl_desc_find_function_by_name() local
84 while (func->name) { sunxi_pinctrl_desc_find_function_by_name()
85 if (!strcmp(func->name, func_name)) sunxi_pinctrl_desc_find_function_by_name()
86 return func; sunxi_pinctrl_desc_find_function_by_name()
88 func++; sunxi_pinctrl_desc_find_function_by_name()
107 struct sunxi_desc_function *func = pin->functions; sunxi_pinctrl_desc_find_function_by_pin() local
109 while (func->name) { sunxi_pinctrl_desc_find_function_by_pin()
110 if (!strcmp(func->name, func_name)) sunxi_pinctrl_desc_find_function_by_pin()
111 return func; sunxi_pinctrl_desc_find_function_by_pin()
113 func++; sunxi_pinctrl_desc_find_function_by_pin()
403 struct sunxi_pinctrl_function *func = pctl->functions + function; sunxi_pmx_set_mux() local
407 func->name); sunxi_pmx_set_mux()
425 const char *func; sunxi_pmx_gpio_set_direction() local
428 func = "gpio_in"; sunxi_pmx_gpio_set_direction()
430 func = "gpio_out"; sunxi_pmx_gpio_set_direction()
432 desc = sunxi_pinctrl_desc_find_function_by_pin(pctl, offset, func); sunxi_pmx_gpio_set_direction()
548 struct sunxi_desc_function *func; sunxi_pinctrl_irq_request_resources() local
551 func = sunxi_pinctrl_desc_find_function_by_pin(pctl, sunxi_pinctrl_irq_request_resources()
553 if (!func) sunxi_pinctrl_irq_request_resources()
565 sunxi_pmx_set(pctl->pctl_dev, pctl->irq_array[d->hwirq], func->muxval); sunxi_pinctrl_irq_request_resources()
767 struct sunxi_pinctrl_function *func = pctl->functions; sunxi_pinctrl_add_function() local
769 while (func->name) { sunxi_pinctrl_add_function()
771 if (strcmp(func->name, name) == 0) { sunxi_pinctrl_add_function()
772 func->ngroups++; sunxi_pinctrl_add_function()
775 func++; sunxi_pinctrl_add_function()
778 func->name = name; sunxi_pinctrl_add_function()
779 func->ngroups = 1; sunxi_pinctrl_add_function()
821 struct sunxi_desc_function *func = pin->functions; sunxi_pinctrl_build_state() local
823 while (func->name) { sunxi_pinctrl_build_state()
825 if (!strcmp(func->name, "irq")) { sunxi_pinctrl_build_state()
826 int irqnum = func->irqnum + func->irqbank * IRQ_PER_BANK; sunxi_pinctrl_build_state()
830 sunxi_pinctrl_add_function(pctl, func->name); sunxi_pinctrl_build_state()
831 func++; sunxi_pinctrl_build_state()
841 struct sunxi_desc_function *func = pin->functions; sunxi_pinctrl_build_state() local
843 while (func->name) { sunxi_pinctrl_build_state()
848 func->name); sunxi_pinctrl_build_state()
866 func++; sunxi_pinctrl_build_state()
/linux-4.4.14/drivers/s390/char/
H A Dhmcdrv_cache.h20 hmcdrv_cache_ftpfunc func);
/linux-4.4.14/drivers/media/pci/ttpci/
H A Dav7110_ipack.h5 void (*func)(u8 *buf, int size, void *priv));
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/
H A Dbase.c29 return fuse->func->read(fuse, addr); nvkm_fuse_read()
44 nvkm_fuse_new_(const struct nvkm_fuse_func *func, struct nvkm_device *device, nvkm_fuse_new_() argument
51 fuse->func = func; nvkm_fuse_new_()
/linux-4.4.14/scripts/
H A Dstackdelta24 my ($file, $func, $size, $type) = split;
36 next if $func =~ m/^[0-9]+$/;
37 $func =~ s/\..*$//;
40 $su{"${file}\t${func}"} = {size => $size, type => $type};
H A Dbootgraph.pl85 my $func = $2;
87 $start{$func} = $1;
88 $type{$func} = 0;
94 $pids{$func} = $1;
101 my $func;
103 $func = "wait_" . $pid . "_1";
107 $func = "wait_" . $pid . "_" . $pidctr{$pid};
110 $start{$func} = $1;
111 $type{$func} = 1;
116 $pids{$func} = $pid;
129 my $func = "wait_" . $pid . "_" . $pidctr{$pid};
130 $end{$func} = $1;
/linux-4.4.14/arch/parisc/include/asm/
H A Dftrace.h13 unsigned long func; member in struct:ftrace_ret_stack
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/sw/
H A Dbase.c64 while (sw->func->sclass[c].ctor) { nvkm_sw_oclass_get()
66 oclass->engn = &sw->func->sclass[index]; nvkm_sw_oclass_get()
67 oclass->base = sw->func->sclass[index].base; nvkm_sw_oclass_get()
82 return sw->func->chan_new(sw, fifoch, oclass, pobject); nvkm_sw_cclass_get()
99 nvkm_sw_new_(const struct nvkm_sw_func *func, struct nvkm_device *device, nvkm_sw_new_() argument
107 sw->func = func; nvkm_sw_new_()
H A Dchan.c42 if (chan->func->mthd) nvkm_sw_chan_mthd()
43 return chan->func->mthd(chan, subc, mthd, data); nvkm_sw_chan_mthd()
80 if (chan->func->dtor) nvkm_sw_chan_dtor()
81 data = chan->func->dtor(chan); nvkm_sw_chan_dtor()
96 nvkm_sw_chan_ctor(const struct nvkm_sw_chan_func *func, struct nvkm_sw *sw, nvkm_sw_chan_ctor() argument
103 chan->func = func; nvkm_sw_chan_ctor()
H A Dnvsw.c33 if (nvsw->func->mthd) nvkm_nvsw_mthd_()
34 return nvsw->func->mthd(nvsw, mthd, data, size); nvkm_nvsw_mthd_()
60 nvkm_nvsw_new_(const struct nvkm_nvsw_func *func, struct nvkm_sw_chan *chan, nvkm_nvsw_new_() argument
71 nvsw->func = func; nvkm_nvsw_new_()
H A Dchan.h8 const struct nvkm_sw_chan_func *func; member in struct:nvkm_sw_chan
H A Dnvsw.h8 const struct nvkm_nvsw_func *func; member in struct:nvkm_nvsw
/linux-4.4.14/drivers/usb/gadget/legacy/
H A Dhid.c38 struct hidg_func_descriptor *func; member in struct:hidg_func_node
156 hid_opts->subclass = n->func->subclass; hid_bind()
157 hid_opts->protocol = n->func->protocol; hid_bind()
158 hid_opts->report_length = n->func->report_length; hid_bind()
159 hid_opts->report_desc_length = n->func->report_desc_length; hid_bind()
160 hid_opts->report_desc = n->func->report_desc; hid_bind()
224 struct hidg_func_descriptor *func = dev_get_platdata(&pdev->dev); hidg_plat_driver_probe() local
227 if (!func) { hidg_plat_driver_probe()
236 entry->func = func; hidg_plat_driver_probe()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bus/
H A Dbase.c30 bus->func->intr(bus); nvkm_bus_intr()
37 bus->func->init(bus); nvkm_bus_init()
55 nvkm_bus_new_(const struct nvkm_bus_func *func, struct nvkm_device *device, nvkm_bus_new_() argument
62 bus->func = func; nvkm_bus_new_()
/linux-4.4.14/net/irda/
H A Dparameters.c39 PV_TYPE type, PI_HANDLER func);
41 PV_TYPE type, PI_HANDLER func);
43 PV_TYPE type, PI_HANDLER func);
45 PV_TYPE type, PI_HANDLER func);
48 PV_TYPE type, PI_HANDLER func);
50 PV_TYPE type, PI_HANDLER func);
76 * Function irda_insert_no_value (self, buf, len, pi, type, func)
79 PV_TYPE type, PI_HANDLER func) irda_insert_no_value()
88 ret = (*func)(self, &p, PV_GET); irda_insert_no_value()
100 * Function irda_extract_no_value (self, buf, len, type, func)
106 PV_TYPE type, PI_HANDLER func) irda_extract_no_value()
115 ret = (*func)(self, &p, PV_PUT); irda_extract_no_value()
124 * Function irda_insert_integer (self, buf, len, pi, type, func)
127 PV_TYPE type, PI_HANDLER func) irda_insert_integer()
138 err = (*func)(self, &p, PV_GET); irda_insert_integer()
197 * Function irda_extract integer (self, buf, len, pi, type, func)
203 PV_TYPE type, PI_HANDLER func) irda_extract_integer()
276 err = (*func)(self, &p, PV_PUT); irda_extract_integer()
284 * Function irda_extract_string (self, buf, len, type, func)
287 PV_TYPE type, PI_HANDLER func) irda_extract_string()
321 err = (*func)(self, &p, PV_PUT); irda_extract_string()
329 * Function irda_extract_octseq (self, buf, len, type, func)
332 PV_TYPE type, PI_HANDLER func) irda_extract_octseq()
483 if (!pi_minor_info->func) { irda_param_insert()
492 pi_minor_info->func); irda_param_insert()
541 if (!pi_minor_info->func) { irda_param_extract()
550 type, pi_minor_info->func); irda_param_extract()
78 irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi, PV_TYPE type, PI_HANDLER func) irda_insert_no_value() argument
105 irda_extract_no_value(void *self, __u8 *buf, int len, __u8 pi, PV_TYPE type, PI_HANDLER func) irda_extract_no_value() argument
126 irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, PV_TYPE type, PI_HANDLER func) irda_insert_integer() argument
202 irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, PV_TYPE type, PI_HANDLER func) irda_extract_integer() argument
286 irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, PV_TYPE type, PI_HANDLER func) irda_extract_string() argument
331 irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi, PV_TYPE type, PI_HANDLER func) irda_extract_octseq() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/
H A Dbase.c141 memory->func = &nvkm_instobj_func; nvkm_instobj_acquire_slow()
182 ret = imem->func->memory_new(imem, size, align, zero, &memory); nvkm_instobj_new()
186 if (!imem->func->persistent) { nvkm_instobj_new()
201 if (!imem->func->zero && zero) { nvkm_instobj_new()
226 return imem->func->rd32(imem, addr); nvkm_instmem_rd32()
232 return imem->func->wr32(imem, addr, data); nvkm_instmem_wr32()
242 if (imem->func->fini) nvkm_instmem_fini()
243 imem->func->fini(imem); nvkm_instmem_fini()
266 if (imem->func->oneinit) nvkm_instmem_oneinit()
267 return imem->func->oneinit(imem); nvkm_instmem_oneinit()
296 if (imem->func->dtor) nvkm_instmem_dtor()
297 return imem->func->dtor(imem); nvkm_instmem_dtor()
310 nvkm_instmem_ctor(const struct nvkm_instmem_func *func, nvkm_instmem_ctor() argument
315 imem->func = func; nvkm_instmem_ctor()
/linux-4.4.14/security/integrity/ima/
H A Dima_policy.c53 enum ima_hooks func; member in struct:ima_rule_entry
68 * written in terms of .action, .func, .mask, .fsmagic, .uid, and .fowner
92 {.action = MEASURE, .func = MMAP_CHECK, .mask = MAY_EXEC,
94 {.action = MEASURE, .func = BPRM_CHECK, .mask = MAY_EXEC,
96 {.action = MEASURE, .func = FILE_CHECK, .mask = MAY_READ,
98 {.action = MEASURE, .func = MODULE_CHECK, .flags = IMA_FUNC},
99 {.action = MEASURE, .func = FIRMWARE_CHECK, .flags = IMA_FUNC},
103 {.action = MEASURE, .func = MMAP_CHECK, .mask = MAY_EXEC,
105 {.action = MEASURE, .func = BPRM_CHECK, .mask = MAY_EXEC,
107 {.action = MEASURE, .func = FILE_CHECK, .mask = MAY_READ,
109 {.action = MEASURE, .func = FILE_CHECK, .mask = MAY_READ,
111 {.action = MEASURE, .func = MODULE_CHECK, .flags = IMA_FUNC},
112 {.action = MEASURE, .func = FIRMWARE_CHECK, .flags = IMA_FUNC},
206 * @func: LIM hook identifier
212 struct inode *inode, enum ima_hooks func, int mask) ima_match_rules()
219 (rule->func != func && func != POST_SETATTR)) ima_match_rules()
222 (rule->mask != mask && func != POST_SETATTR)) ima_match_rules()
225 (!(rule->mask & mask) && func != POST_SETATTR)) ima_match_rules()
293 static int get_subaction(struct ima_rule_entry *rule, int func) get_subaction() argument
298 switch (func) { get_subaction()
316 * @func: IMA hook identifier
319 * Measure decision based on func/mask/fsmagic and LSM(subj/obj/type)
326 int ima_match_policy(struct inode *inode, enum ima_hooks func, int mask, ima_match_policy() argument
337 if (!ima_match_rules(entry, inode, func, mask)) list_for_each_entry()
344 action |= get_subaction(entry, func); list_for_each_entry()
455 {Opt_func, "func=%s"},
563 ima_log_string(ab, "func", args[0].from); ima_parse_rule()
565 if (entry->func) ima_parse_rule()
569 entry->func = FILE_CHECK; ima_parse_rule()
572 entry->func = FILE_CHECK; ima_parse_rule()
574 entry->func = MODULE_CHECK; ima_parse_rule()
576 entry->func = FIRMWARE_CHECK; ima_parse_rule()
579 entry->func = MMAP_CHECK; ima_parse_rule()
581 entry->func = BPRM_CHECK; ima_parse_rule()
736 else if (entry->func == MODULE_CHECK) ima_parse_rule()
738 else if (entry->func == FIRMWARE_CHECK) ima_parse_rule()
211 ima_match_rules(struct ima_rule_entry *rule, struct inode *inode, enum ima_hooks func, int mask) ima_match_rules() argument
H A Dima_appraise.c40 int ima_must_appraise(struct inode *inode, int mask, enum ima_hooks func) ima_must_appraise() argument
45 return ima_match_policy(inode, func, mask, IMA_APPRAISE); ima_must_appraise()
69 /* Return specific func appraised cached result */ ima_get_cache_status()
71 int func) ima_get_cache_status()
73 switch (func) { ima_get_cache_status()
89 int func, enum integrity_status status) ima_set_cache_status()
91 switch (func) { ima_set_cache_status()
111 static void ima_cache_flags(struct integrity_iint_cache *iint, int func) ima_cache_flags() argument
113 switch (func) { ima_cache_flags()
185 int ima_appraise_measurement(int func, struct integrity_iint_cache *iint, ima_appraise_measurement() argument
281 ima_cache_flags(iint, func); ima_appraise_measurement()
283 ima_set_cache_status(iint, func, status); ima_appraise_measurement()
70 ima_get_cache_status(struct integrity_iint_cache *iint, int func) ima_get_cache_status() argument
88 ima_set_cache_status(struct integrity_iint_cache *iint, int func, enum integrity_status status) ima_set_cache_status() argument
/linux-4.4.14/drivers/net/wireless/mwifiex/
H A Dsdio.c85 mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) mwifiex_sdio_probe() argument
91 func->vendor, func->device, func->class, func->num); mwifiex_sdio_probe()
97 card->func = func; mwifiex_sdio_probe()
100 func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; mwifiex_sdio_probe()
120 sdio_claim_host(func); mwifiex_sdio_probe()
121 ret = sdio_enable_func(func); mwifiex_sdio_probe()
122 sdio_release_host(func); mwifiex_sdio_probe()
134 sdio_claim_host(func); mwifiex_sdio_probe()
135 ret = sdio_disable_func(func); mwifiex_sdio_probe()
136 sdio_release_host(func); mwifiex_sdio_probe()
155 struct sdio_func *func = dev_to_sdio_func(dev); mwifiex_sdio_resume() local
160 if (func) { mwifiex_sdio_resume()
161 pm_flag = sdio_get_host_pm_caps(func); mwifiex_sdio_resume()
162 card = sdio_get_drvdata(func); mwifiex_sdio_resume()
195 mwifiex_sdio_remove(struct sdio_func *func) mwifiex_sdio_remove() argument
201 card = sdio_get_drvdata(func); mwifiex_sdio_remove()
209 mwifiex_dbg(adapter, INFO, "info: SDIO func num=%d\n", func->num); mwifiex_sdio_remove()
237 struct sdio_func *func = dev_to_sdio_func(dev); mwifiex_sdio_suspend() local
243 if (func) { mwifiex_sdio_suspend()
244 pm_flag = sdio_get_host_pm_caps(func); mwifiex_sdio_suspend()
246 sdio_func_id(func), pm_flag); mwifiex_sdio_suspend()
249 " suspended\n", sdio_func_id(func)); mwifiex_sdio_suspend()
253 card = sdio_get_drvdata(func); mwifiex_sdio_suspend()
275 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); mwifiex_sdio_suspend()
339 mwifiex_write_reg_locked(struct sdio_func *func, u32 reg, u8 data) mwifiex_write_reg_locked() argument
342 sdio_writeb(func, data, reg, &ret); mwifiex_write_reg_locked()
355 sdio_claim_host(card->func); mwifiex_write_reg()
356 ret = mwifiex_write_reg_locked(card->func, reg, data); mwifiex_write_reg()
357 sdio_release_host(card->func); mwifiex_write_reg()
372 sdio_claim_host(card->func); mwifiex_read_reg()
373 val = sdio_readb(card->func, reg, &ret); mwifiex_read_reg()
374 sdio_release_host(card->func); mwifiex_read_reg()
407 sdio_claim_host(card->func); mwifiex_write_data_sync()
409 ret = sdio_writesb(card->func, ioport, buffer, blk_cnt * blk_size); mwifiex_write_data_sync()
411 sdio_release_host(card->func); mwifiex_write_data_sync()
432 sdio_claim_host(card->func); mwifiex_read_data_sync()
434 ret = sdio_readsb(card->func, buffer, ioport, blk_cnt * blk_size); mwifiex_read_data_sync()
437 sdio_release_host(card->func); mwifiex_read_data_sync()
744 struct sdio_func *func = card->func; mwifiex_sdio_disable_host_int() local
746 sdio_claim_host(func); mwifiex_sdio_disable_host_int()
747 mwifiex_write_reg_locked(func, card->reg->host_int_mask_reg, 0); mwifiex_sdio_disable_host_int()
748 sdio_release_irq(func); mwifiex_sdio_disable_host_int()
749 sdio_release_host(func); mwifiex_sdio_disable_host_int()
792 mwifiex_sdio_interrupt(struct sdio_func *func) mwifiex_sdio_interrupt() argument
797 card = sdio_get_drvdata(func); mwifiex_sdio_interrupt()
799 pr_debug("int: func=%p card=%p adapter=%p\n", mwifiex_sdio_interrupt()
800 func, card, card ? card->adapter : NULL); mwifiex_sdio_interrupt()
821 struct sdio_func *func = card->func; mwifiex_sdio_enable_host_int() local
824 sdio_claim_host(func); mwifiex_sdio_enable_host_int()
827 ret = sdio_claim_irq(func, mwifiex_sdio_interrupt); mwifiex_sdio_enable_host_int()
835 ret = mwifiex_write_reg_locked(func, card->reg->host_int_mask_reg, mwifiex_sdio_enable_host_int()
840 sdio_release_irq(func); mwifiex_sdio_enable_host_int()
844 sdio_release_host(func); mwifiex_sdio_enable_host_int()
923 sdio_claim_host(card->func); mwifiex_prog_fw_w_helper()
1029 sdio_release_host(card->func); mwifiex_prog_fw_w_helper()
1948 sdio_claim_host(card->func); mwifiex_unregister_dev()
1949 sdio_disable_func(card->func); mwifiex_unregister_dev()
1950 sdio_release_host(card->func); mwifiex_unregister_dev()
1963 struct sdio_func *func = card->func; mwifiex_register_dev() local
1969 sdio_claim_host(func); mwifiex_register_dev()
1972 ret = sdio_set_block_size(card->func, MWIFIEX_SDIO_BLOCK_SIZE); mwifiex_register_dev()
1973 sdio_release_host(func); mwifiex_register_dev()
1981 adapter->dev = &func->dev; mwifiex_register_dev()
2014 sdio_set_drvdata(card->func, card); mwifiex_init_sdio()
2111 sdio_set_drvdata(card->func, NULL); mwifiex_cleanup_sdio()
2144 struct sdio_func *func = card->func; mwifiex_recreate_adapter() local
2160 mwifiex_sdio_remove(func); mwifiex_recreate_adapter()
2163 sdio_claim_host(func); mwifiex_recreate_adapter()
2164 mmc_hw_reset(func->card->host); mwifiex_recreate_adapter()
2165 sdio_release_host(func); mwifiex_recreate_adapter()
2167 mwifiex_sdio_probe(func, device_id); mwifiex_recreate_adapter()
2193 sdio_writeb(card->func, card->reg->fw_dump_host_ready, mwifiex_sdio_rdwr_firmware()
2200 ctrl_data = sdio_readb(card->func, card->reg->fw_dump_ctrl, mwifiex_sdio_rdwr_firmware()
2213 sdio_writeb(card->func, card->reg->fw_dump_host_ready, mwifiex_sdio_rdwr_firmware()
2255 sdio_claim_host(card->func); mwifiex_sdio_fw_dump()
2265 dump_num = sdio_readb(card->func, reg, &ret); mwifiex_sdio_fw_dump()
2282 read_reg = sdio_readb(card->func, reg, &ret); mwifiex_sdio_fw_dump()
2328 *dbg_ptr = sdio_readb(card->func, reg, &ret); mwifiex_sdio_fw_dump()
2352 sdio_release_host(card->func); mwifiex_sdio_fw_dump()
2375 sdio_claim_host(card->func); mwifiex_sdio_generic_fw_dump()
2387 start_flag = sdio_readb(card->func, reg, &ret); mwifiex_sdio_generic_fw_dump()
2423 *dbg_ptr = sdio_readb(card->func, reg, &ret); mwifiex_sdio_generic_fw_dump()
2466 sdio_release_host(card->func); mwifiex_sdio_generic_fw_dump()
2524 u8 count, func, data, index = 0, size = 0; mwifiex_sdio_reg_dump() local
2535 sdio_claim_host(cardp->func); mwifiex_sdio_reg_dump()
2544 func = count; mwifiex_sdio_reg_dump()
2550 func = count; mwifiex_sdio_reg_dump()
2556 func = 1; mwifiex_sdio_reg_dump()
2565 func = 1; mwifiex_sdio_reg_dump()
2572 func, reg_start, reg_end); mwifiex_sdio_reg_dump()
2574 ptr += sprintf(ptr, "SDIO Func%d: ", func); mwifiex_sdio_reg_dump()
2577 if (func == 0) mwifiex_sdio_reg_dump()
2578 data = sdio_f0_readb(cardp->func, reg, &ret); mwifiex_sdio_reg_dump()
2580 data = sdio_readb(cardp->func, reg, &ret); mwifiex_sdio_reg_dump()
2601 sdio_release_host(cardp->func); mwifiex_sdio_reg_dump()
/linux-4.4.14/kernel/bpf/
H A Dhelpers.c50 .func = bpf_map_lookup_elem,
69 .func = bpf_map_update_elem,
89 .func = bpf_map_delete_elem,
97 .func = bpf_user_rnd_u32,
108 .func = bpf_get_smp_processor_id,
120 .func = bpf_ktime_get_ns,
136 .func = bpf_get_current_pid_tgid,
156 .func = bpf_get_current_uid_gid,
174 .func = bpf_get_current_comm,
/linux-4.4.14/arch/mips/include/uapi/asm/
H A Dinst.h41 * func field of spec opcode.
63 * func field of spec2 opcode.
74 * func field of spec3 opcode.
131 * func field of cop0 coi opcodes.
141 * func field of cop0 com opcodes.
158 * func field of cop1 instructions using d, s or w format.
183 * func field of cop1x opcodes (MIPS IV).
198 * func field for mad opcodes (MIPS IV).
206 * func field for special3 lx opcodes (Cavium Octeon).
229 * func field for MSA MI10 format.
573 __BITFIELD_FIELD(unsigned int func : 6,
583 __BITFIELD_FIELD(unsigned int func : 6,
594 __BITFIELD_FIELD(unsigned int func : 6,
604 __BITFIELD_FIELD(unsigned int func : 4,
612 __BITFIELD_FIELD(unsigned int func : 6,
622 __BITFIELD_FIELD(unsigned int func : 6,
633 __BITFIELD_FIELD(unsigned int func : 6,
642 __BITFIELD_FIELD(unsigned int func : 4,
652 __BITFIELD_FIELD(unsigned int func:7,
678 __BITFIELD_FIELD(unsigned int func : 6,
689 __BITFIELD_FIELD(unsigned int func : 6,
699 __BITFIELD_FIELD(unsigned int func : 6,
709 __BITFIELD_FIELD(unsigned int func : 6,
721 __BITFIELD_FIELD(unsigned int func : 6,
731 __BITFIELD_FIELD(unsigned int func : 6,
742 __BITFIELD_FIELD(unsigned int func : 6,
752 __BITFIELD_FIELD(unsigned int func : 6,
762 __BITFIELD_FIELD(unsigned int func : 6,
772 __BITFIELD_FIELD(unsigned int func : 6,
788 __BITFIELD_FIELD(unsigned int func : 4,
798 __BITFIELD_FIELD(unsigned int func : 11,
822 __BITFIELD_FIELD(unsigned int func : 4,
863 __BITFIELD_FIELD(unsigned int func : 5,
877 __BITFIELD_FIELD(unsigned int func : 3,
884 __BITFIELD_FIELD(unsigned int func : 3,
907 __BITFIELD_FIELD(unsigned int func : 3,
/linux-4.4.14/drivers/ptp/
H A Dptp_chardev.c29 enum ptp_pin_function func, unsigned int chan) ptp_disable_pinfunc()
36 switch (func) { ptp_disable_pinfunc()
59 enum ptp_pin_function func, unsigned int chan) ptp_set_pinfunc()
67 if (info->pin_config[i].func == func && ptp_set_pinfunc()
77 switch (func) { ptp_set_pinfunc()
95 if (info->verify(info, pin, func, chan)) { ptp_set_pinfunc()
96 pr_err("driver cannot use function %u on pin %u\n", func, chan); ptp_set_pinfunc()
102 ptp_disable_pinfunc(info, func, chan); ptp_set_pinfunc()
103 pin1->func = PTP_PF_NONE; ptp_set_pinfunc()
106 ptp_disable_pinfunc(info, pin2->func, pin2->chan); ptp_set_pinfunc()
107 pin2->func = func; ptp_set_pinfunc()
246 err = ptp_set_pinfunc(ptp, pin_index, pd.func, pd.chan); ptp_ioctl()
28 ptp_disable_pinfunc(struct ptp_clock_info *ops, enum ptp_pin_function func, unsigned int chan) ptp_disable_pinfunc() argument
58 ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, enum ptp_pin_function func, unsigned int chan) ptp_set_pinfunc() argument
/linux-4.4.14/arch/x86/um/
H A Dldt.c15 static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) modify_ldt() argument
17 return syscall(__NR_modify_ldt, func, ptr, bytecount); modify_ldt()
20 static long write_ldt_entry(struct mm_id *mm_idp, int func, write_ldt_entry() argument
30 unsigned long args[] = { func, write_ldt_entry()
120 static int write_ldt(void __user * ptr, unsigned long bytecount, int func) write_ldt() argument
140 if (func == 1) write_ldt()
148 err = write_ldt_entry(mm_idp, func, &ldt_info, &addr, 1); write_ldt()
188 (func == 1 || LDT_empty(&ldt_info))) { write_ldt()
193 if (func == 1) write_ldt()
206 static long do_modify_ldt_skas(int func, void __user *ptr, do_modify_ldt_skas() argument
211 switch (func) { do_modify_ldt_skas()
217 ret = write_ldt(ptr, bytecount, func); do_modify_ldt_skas()
372 int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount) sys_modify_ldt() argument
374 return do_modify_ldt_skas(func, ptr, bytecount); sys_modify_ldt()
/linux-4.4.14/arch/x86/lib/
H A Datomic64_cx8_32.S47 .macro addsub_return func ins insc
48 ENTRY(atomic64_\func\()_return_cx8)
76 ENDPROC(atomic64_\func\()_return_cx8)
82 .macro incdec_return func ins insc
83 ENTRY(atomic64_\func\()_return_cx8)
101 ENDPROC(atomic64_\func\()_return_cx8)
/linux-4.4.14/drivers/infiniband/hw/mlx4/
H A Dmcg.c106 struct mcast_member func[MAX_VFS]; member in struct:mcast_group
132 int func; member in struct:mcast_req
345 sa_data->scope_join_state |= (group->func[slave].join_state & 0x0f); send_reply_to_slave()
501 join_state = join_mask & (~group->func[slave].join_state); join_group()
503 group->func[slave].join_state |= join_state; join_group()
504 if (group->func[slave].state != MCAST_MEMBER && join_state) { join_group()
505 group->func[slave].state = MCAST_MEMBER; join_group()
516 group->func[slave].join_state &= ~leave_state; leave_group()
517 if (!group->func[slave].join_state) { leave_group()
518 group->func[slave].state = MCAST_NOT_MEMBER; leave_group()
526 if (group->func[slave].state != MCAST_MEMBER) check_leave()
530 if (~group->func[slave].join_state & leave_mask) check_leave()
553 --group->func[req->func].num_pend_reqs; mlx4_ib_mcg_timeout_handler()
590 leave_mask = group->func[req->func].join_state; handle_leave_req()
592 status = check_leave(group, req->func, leave_mask); handle_leave_req()
594 leave_group(group, req->func, leave_mask); handle_leave_req()
597 send_reply_to_slave(req->func, group, &req->sa_mad, status); handle_leave_req()
598 --group->func[req->func].num_pend_reqs; handle_leave_req()
617 join_group(group, req->func, join_mask); handle_join_req()
619 --group->func[req->func].num_pend_reqs; handle_join_req()
620 send_reply_to_slave(req->func, group, &req->sa_mad, status); handle_join_req()
629 --group->func[req->func].num_pend_reqs; handle_join_req()
659 * and this is a good response, the VF will be answered later in this func. */ mlx4_ib_mcg_work_handler()
678 send_reply_to_slave(req->func, group, &req->sa_mad, status); mlx4_ib_mcg_work_handler()
679 --group->func[req->func].num_pend_reqs; mlx4_ib_mcg_work_handler()
771 --group->func[req->func].num_pend_reqs; search_relocate_mgid0_group()
840 INIT_LIST_HEAD(&group->func[i].pending); acquire_group()
880 list_add_tail(&req->func_list, &group->func[req->func].pending); queue_req()
956 req->func = slave; mlx4_ib_mcg_multiplex_handler()
967 if (group->func[slave].num_pend_reqs > MAX_PEND_REQS_PER_FUNC) { mlx4_ib_mcg_multiplex_handler()
975 ++group->func[slave].num_pend_reqs; mlx4_ib_mcg_multiplex_handler()
987 mcg_warn("In multiplex, port %d, func %d: unexpected MCMember method: 0x%x, dropping\n", mlx4_ib_mcg_multiplex_handler()
1024 if (group->func[f].state == MCAST_MEMBER) sysfs_show_group()
1026 f, group->func[f].join_state); sysfs_show_group()
1175 list_for_each_entry_safe(req, tmp, &group->func[vf].pending, func_list) { clear_pending_reqs()
1185 --group->func[vf].num_pend_reqs; clear_pending_reqs()
1193 if (!pend && (!list_empty(&group->func[vf].pending) || group->func[vf].num_pend_reqs)) { clear_pending_reqs()
1195 list_empty(&group->func[vf].pending), group->func[vf].num_pend_reqs); clear_pending_reqs()
1204 if (!group->func[slave].join_state) push_deleteing_req()
1213 if (!list_empty(&group->func[slave].pending)) { push_deleteing_req()
1214 pend_req = list_entry(group->func[slave].pending.prev, struct mcast_req, group_list); push_deleteing_req()
1222 req->func = slave; push_deleteing_req()
1224 ++group->func[slave].num_pend_reqs; push_deleteing_req()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dbase.c109 ret = clk->func->calc(clk, cstate); nvkm_cstate_prog()
111 ret = clk->func->prog(clk); nvkm_cstate_prog()
112 clk->func->tidy(clk); nvkm_cstate_prog()
190 if (ram && ram->func->calc) { nvkm_pstate_prog()
193 ret = ram->func->calc(ram, khz); nvkm_pstate_prog()
195 ret = ram->func->prog(ram); nvkm_pstate_prog()
197 ram->func->tidy(ram); nvkm_pstate_prog()
481 return clk->func->read(clk, src); nvkm_clk_read()
490 if (clk->func->fini) nvkm_clk_fini()
491 clk->func->fini(clk); nvkm_clk_fini()
518 if (clk->func->init) nvkm_clk_init()
519 return clk->func->init(clk); nvkm_clk_init()
538 if (clk->func->pstates) nvkm_clk_dtor()
556 nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm_device *device, nvkm_clk_ctor() argument
563 clk->func = func; nvkm_clk_ctor()
565 clk->domains = func->domains; nvkm_clk_ctor()
575 if (!func->pstates) { nvkm_clk_ctor()
581 for (idx = 0; idx < func->nr_pstates; idx++) nvkm_clk_ctor()
582 list_add_tail(&func->pstates[idx].head, &clk->states); nvkm_clk_ctor()
583 clk->state_nr = func->nr_pstates; nvkm_clk_ctor()
609 nvkm_clk_new_(const struct nvkm_clk_func *func, struct nvkm_device *device, nvkm_clk_new_() argument
614 return nvkm_clk_ctor(func, device, index, allow_reclock, *pclk); nvkm_clk_new_()
/linux-4.4.14/drivers/usb/gadget/function/
H A Df_fs.c92 static void ffs_func_eps_disable(struct ffs_function *func);
93 static int __must_check ffs_func_eps_enable(struct ffs_function *func);
105 static int ffs_func_revmap_ep(struct ffs_function *func, u8 num);
106 static int ffs_func_revmap_intf(struct ffs_function *func, u8 intf);
567 struct ffs_function *func = ffs->func; ffs_ep0_ioctl() local
568 ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV; ffs_ep0_ioctl()
1612 static void ffs_func_eps_disable(struct ffs_function *func) ffs_func_eps_disable() argument
1614 struct ffs_ep *ep = func->eps; ffs_func_eps_disable()
1615 struct ffs_epfile *epfile = func->ffs->epfiles; ffs_func_eps_disable()
1616 unsigned count = func->ffs->eps_count; ffs_func_eps_disable()
1619 spin_lock_irqsave(&func->ffs->eps_lock, flags); ffs_func_eps_disable()
1631 spin_unlock_irqrestore(&func->ffs->eps_lock, flags); ffs_func_eps_disable()
1634 static int ffs_func_eps_enable(struct ffs_function *func) ffs_func_eps_enable() argument
1636 struct ffs_data *ffs = func->ffs; ffs_func_eps_enable()
1637 struct ffs_ep *ep = func->eps; ffs_func_eps_enable()
1643 spin_lock_irqsave(&func->ffs->eps_lock, flags); ffs_func_eps_enable()
1681 spin_unlock_irqrestore(&func->ffs->eps_lock, flags); ffs_func_eps_enable()
2465 struct ffs_function *func = priv; __ffs_func_bind_do_descs() local
2480 if (func->function.ss_descriptors) { __ffs_func_bind_do_descs()
2482 func->function.ss_descriptors[(long)valuep] = desc; __ffs_func_bind_do_descs()
2483 } else if (func->function.hs_descriptors) { __ffs_func_bind_do_descs()
2485 func->function.hs_descriptors[(long)valuep] = desc; __ffs_func_bind_do_descs()
2488 func->function.fs_descriptors[(long)valuep] = desc; __ffs_func_bind_do_descs()
2494 idx = ffs_ep_addr2idx(func->ffs, ds->bEndpointAddress) - 1; __ffs_func_bind_do_descs()
2498 ffs_ep = func->eps + idx; __ffs_func_bind_do_descs()
2524 ep = usb_ep_autoconfig(func->gadget, ds); __ffs_func_bind_do_descs()
2527 ep->driver_data = func->eps + idx; __ffs_func_bind_do_descs()
2535 func->eps_revmap[ds->bEndpointAddress & __ffs_func_bind_do_descs()
2541 if (func->ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR) __ffs_func_bind_do_descs()
2553 struct ffs_function *func = priv; __ffs_func_bind_do_nums() local
2565 if (func->interfaces_nums[idx] < 0) { __ffs_func_bind_do_nums()
2566 int id = usb_interface_id(func->conf, &func->function); __ffs_func_bind_do_nums()
2569 func->interfaces_nums[idx] = id; __ffs_func_bind_do_nums()
2571 newValue = func->interfaces_nums[idx]; __ffs_func_bind_do_nums()
2576 newValue = func->ffs->stringtabs[0]->strings[*valuep - 1].id; __ffs_func_bind_do_nums()
2588 if (unlikely(!func->eps[idx].ep)) __ffs_func_bind_do_nums()
2593 descs = func->eps[idx].descs; __ffs_func_bind_do_nums()
2608 struct ffs_function *func = priv; __ffs_func_bind_do_os_desc() local
2616 t = &func->function.os_desc_table[desc->bFirstInterfaceNumber]; __ffs_func_bind_do_os_desc()
2617 t->if_id = func->interfaces_nums[desc->bFirstInterfaceNumber]; __ffs_func_bind_do_os_desc()
2631 t = &func->function.os_desc_table[h->interface]; __ffs_func_bind_do_os_desc()
2632 t->if_id = func->interfaces_nums[h->interface]; __ffs_func_bind_do_os_desc()
2634 ext_prop = func->ffs->ms_os_descs_ext_prop_avail; __ffs_func_bind_do_os_desc()
2635 func->ffs->ms_os_descs_ext_prop_avail += sizeof(*ext_prop); __ffs_func_bind_do_os_desc()
2643 ext_prop_name = func->ffs->ms_os_descs_ext_prop_name_avail; __ffs_func_bind_do_os_desc()
2644 func->ffs->ms_os_descs_ext_prop_name_avail += __ffs_func_bind_do_os_desc()
2647 ext_prop_data = func->ffs->ms_os_descs_ext_prop_data_avail; __ffs_func_bind_do_os_desc()
2648 func->ffs->ms_os_descs_ext_prop_data_avail += __ffs_func_bind_do_os_desc()
2686 struct ffs_function *func = ffs_func_from_usb(f); ffs_do_functionfs_bind() local
2703 func->ffs = ffs_opts->dev->ffs_data; ffs_do_functionfs_bind()
2709 func->conf = c; ffs_do_functionfs_bind()
2710 func->gadget = c->cdev->gadget; ffs_do_functionfs_bind()
2720 ret = functionfs_bind(func->ffs, c->cdev); ffs_do_functionfs_bind()
2725 func->function.strings = func->ffs->stringtabs; ffs_do_functionfs_bind()
2733 struct ffs_function *func = ffs_func_from_usb(f); _ffs_func_bind() local
2734 struct ffs_data *ffs = func->ffs; _ffs_func_bind()
2736 const int full = !!func->ffs->fs_descs_count; _ffs_func_bind()
2737 const int high = gadget_is_dualspeed(func->gadget) && _ffs_func_bind()
2738 func->ffs->hs_descs_count; _ffs_func_bind()
2739 const int super = gadget_is_superspeed(func->gadget) && _ffs_func_bind()
2740 func->ffs->ss_descs_count; _ffs_func_bind()
2799 * d_eps == vlabuf, func->eps used to kfree vlabuf later _ffs_func_bind()
2801 func->eps = vla_ptr(vlabuf, d, eps); _ffs_func_bind()
2802 func->interfaces_nums = vla_ptr(vlabuf, d, inums); _ffs_func_bind()
2810 func->function.fs_descriptors = vla_ptr(vlabuf, d, fs_descs); _ffs_func_bind()
2814 __ffs_func_bind_do_descs, func); _ffs_func_bind()
2824 func->function.hs_descriptors = vla_ptr(vlabuf, d, hs_descs); _ffs_func_bind()
2828 __ffs_func_bind_do_descs, func); _ffs_func_bind()
2838 func->function.ss_descriptors = vla_ptr(vlabuf, d, ss_descs); _ffs_func_bind()
2842 __ffs_func_bind_do_descs, func); _ffs_func_bind()
2860 __ffs_func_bind_do_nums, func); _ffs_func_bind()
2864 func->function.os_desc_table = vla_ptr(vlabuf, d, os_desc_table); _ffs_func_bind()
2869 desc = func->function.os_desc_table[i].os_desc = _ffs_func_bind()
2880 __ffs_func_bind_do_os_desc, func); _ffs_func_bind()
2883 func->function.os_desc_n = _ffs_func_bind()
2899 struct ffs_function *func = ffs_func_from_usb(f); ffs_func_bind() local
2907 functionfs_unbind(func->ffs); ffs_func_bind()
2925 struct ffs_function *func = ffs_func_from_usb(f); ffs_func_set_alt() local
2926 struct ffs_data *ffs = func->ffs; ffs_func_set_alt()
2930 intf = ffs_func_revmap_intf(func, interface); ffs_func_set_alt()
2935 if (ffs->func) ffs_func_set_alt()
2936 ffs_func_eps_disable(ffs->func); ffs_func_set_alt()
2949 ffs->func = NULL; ffs_func_set_alt()
2954 ffs->func = func; ffs_func_set_alt()
2955 ret = ffs_func_eps_enable(func); ffs_func_set_alt()
2969 struct ffs_function *func = ffs_func_from_usb(f); ffs_func_setup() local
2970 struct ffs_data *ffs = func->ffs; ffs_func_setup()
2996 ret = ffs_func_revmap_intf(func, le16_to_cpu(creq->wIndex)); ffs_func_setup()
3002 ret = ffs_func_revmap_ep(func, le16_to_cpu(creq->wIndex)); ffs_func_setup()
3005 if (func->ffs->user_flags & FUNCTIONFS_VIRTUAL_ADDR) ffs_func_setup()
3006 ret = func->ffs->eps_addrmap[ret]; ffs_func_setup()
3037 static int ffs_func_revmap_ep(struct ffs_function *func, u8 num) ffs_func_revmap_ep() argument
3039 num = func->eps_revmap[num & USB_ENDPOINT_NUMBER_MASK]; ffs_func_revmap_ep()
3043 static int ffs_func_revmap_intf(struct ffs_function *func, u8 intf) ffs_func_revmap_intf() argument
3045 short *nums = func->interfaces_nums; ffs_func_revmap_intf()
3046 unsigned count = func->ffs->interfaces_count; ffs_func_revmap_intf()
3050 return nums - func->interfaces_nums; ffs_func_revmap_intf()
3215 struct ffs_function *func = ffs_func_from_usb(f); ffs_func_unbind() local
3216 struct ffs_data *ffs = func->ffs; ffs_func_unbind()
3219 struct ffs_ep *ep = func->eps; ffs_func_unbind()
3224 if (ffs->func == func) { ffs_func_unbind()
3225 ffs_func_eps_disable(func); ffs_func_unbind()
3226 ffs->func = NULL; ffs_func_unbind()
3233 spin_lock_irqsave(&func->ffs->eps_lock, flags); ffs_func_unbind()
3240 spin_unlock_irqrestore(&func->ffs->eps_lock, flags); ffs_func_unbind()
3241 kfree(func->eps); ffs_func_unbind()
3242 func->eps = NULL; ffs_func_unbind()
3247 func->function.fs_descriptors = NULL; ffs_func_unbind()
3248 func->function.hs_descriptors = NULL; ffs_func_unbind()
3249 func->function.ss_descriptors = NULL; ffs_func_unbind()
3250 func->interfaces_nums = NULL; ffs_func_unbind()
3257 struct ffs_function *func; ffs_alloc() local
3261 func = kzalloc(sizeof(*func), GFP_KERNEL); ffs_alloc()
3262 if (unlikely(!func)) ffs_alloc()
3265 func->function.name = "Function FS Gadget"; ffs_alloc()
3267 func->function.bind = ffs_func_bind; ffs_alloc()
3268 func->function.unbind = ffs_func_unbind; ffs_alloc()
3269 func->function.set_alt = ffs_func_set_alt; ffs_alloc()
3270 func->function.disable = ffs_func_disable; ffs_alloc()
3271 func->function.setup = ffs_func_setup; ffs_alloc()
3272 func->function.suspend = ffs_func_suspend; ffs_alloc()
3273 func->function.resume = ffs_func_resume; ffs_alloc()
3274 func->function.free_func = ffs_free; ffs_alloc()
3276 return &func->function; ffs_alloc()
H A Df_obex.c43 return container_of(f, struct f_obex, port.func); func_to_obex()
266 struct usb_composite_dev *cdev = g->func.config->cdev; obex_connect()
269 status = usb_function_activate(&g->func); obex_connect()
279 struct usb_composite_dev *cdev = g->func.config->cdev; obex_disconnect()
282 status = usb_function_deactivate(&g->func); obex_disconnect()
479 obex->port.func.name = "obex"; obex_alloc()
481 obex->port.func.bind = obex_bind; obex_alloc()
482 obex->port.func.unbind = obex_unbind; obex_alloc()
483 obex->port.func.set_alt = obex_set_alt; obex_alloc()
484 obex->port.func.get_alt = obex_get_alt; obex_alloc()
485 obex->port.func.disable = obex_disable; obex_alloc()
486 obex->port.func.free_func = obex_free; obex_alloc()
487 obex->port.func.bind_deactivated = true; obex_alloc()
489 return &obex->port.func; obex_alloc()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/
H A Dxtensa.c33 while (xtensa->func->sclass[c].oclass) { nvkm_xtensa_oclass_get()
35 oclass->base = xtensa->func->sclass[index]; nvkm_xtensa_oclass_get()
74 nvkm_mask(device, xtensa->addr + 0xd94, 0, xtensa->func->fifo_val); nvkm_xtensa_intr()
143 nvkm_wr32(device, base + 0xd28, xtensa->func->unkd28); /* ?? */ nvkm_xtensa_init()
178 nvkm_xtensa_new_(const struct nvkm_xtensa_func *func, nvkm_xtensa_new_() argument
186 xtensa->func = func; nvkm_xtensa_new_()
190 return nvkm_engine_ctor(&nvkm_xtensa, device, index, func->pmc_enable, nvkm_xtensa_new_()
H A Dfalcon.c34 while (falcon->func->sclass[c].oclass) { nvkm_falcon_oclass_get()
36 oclass->base = falcon->func->sclass[index]; nvkm_falcon_oclass_get()
73 if (falcon->func->intr) { nvkm_falcon_intr()
74 falcon->func->intr(falcon, chan); nvkm_falcon_intr()
312 if (falcon->func->init) nvkm_falcon_init()
313 falcon->func->init(falcon); nvkm_falcon_init()
335 nvkm_falcon_new_(const struct nvkm_falcon_func *func, nvkm_falcon_new_() argument
343 falcon->func = func; nvkm_falcon_new_()
345 falcon->code.data = func->code.data; nvkm_falcon_new_()
346 falcon->code.size = func->code.size; nvkm_falcon_new_()
347 falcon->data.data = func->data.data; nvkm_falcon_new_()
348 falcon->data.size = func->data.size; nvkm_falcon_new_()
351 return nvkm_engine_ctor(&nvkm_falcon, device, index, func->pmc_enable, nvkm_falcon_new_()
/linux-4.4.14/drivers/gpu/drm/
H A Ddrm_flip_work.c52 * func) on a work queue after drm_flip_work_commit() is called.
71 * func) on a work queue after drm_flip_work_commit() is called.
83 work->func(work, val); drm_flip_work_queue()
130 work->func(work, task->data); flip_worker()
140 * @func: the callback work function
145 const char *name, drm_flip_func_t func) drm_flip_work_init()
151 work->func = func; drm_flip_work_init()
144 drm_flip_work_init(struct drm_flip_work *work, const char *name, drm_flip_func_t func) drm_flip_work_init() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvif/
H A Dnotify.h15 int (*func)(struct nvif_notify *); member in struct:nvif_notify
26 int nvif_notify_init(struct nvif_object *, int (*func)(struct nvif_notify *),
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
H A Dgpio.h29 u8 func; member in struct:dcb_gpio_func
45 u16 dcb_gpio_match(struct nvkm_bios *, int idx, u8 func, u8 line,
/linux-4.4.14/scripts/tracing/
H A Ddraw_functrace.py35 def __init__(self, func, time = None, parent = None):
36 self._func = func
44 def calls(self, func, calltime):
49 child = CallTree(func, calltime, self)
53 def getParent(self, func):
55 has the name given by func. If this function is not
60 while tree != CallTree.ROOT and tree._func != func:
63 child = CallTree.ROOT.calls(func, None)
/linux-4.4.14/include/uapi/linux/
H A Dpci.h30 #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
/linux-4.4.14/include/linux/pinctrl/
H A Dmachine.h88 #define PIN_MAP_MUX_GROUP(dev, state, pinctrl, grp, func) \
96 .function = func, \
100 #define PIN_MAP_MUX_GROUP_DEFAULT(dev, pinctrl, grp, func) \
101 PIN_MAP_MUX_GROUP(dev, PINCTRL_STATE_DEFAULT, pinctrl, grp, func)
103 #define PIN_MAP_MUX_GROUP_HOG(dev, state, grp, func) \
104 PIN_MAP_MUX_GROUP(dev, state, dev, grp, func)
106 #define PIN_MAP_MUX_GROUP_HOG_DEFAULT(dev, grp, func) \
107 PIN_MAP_MUX_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, func)
/linux-4.4.14/arch/mips/ath79/
H A Dpci.h25 void ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *dev));
31 ath79_pci_set_plat_dev_init(int (*func)(struct pci_dev *)) {} ath79_register_pci()
/linux-4.4.14/net/rds/
H A Dinfo.h21 void rds_info_register_func(int optname, rds_info_func func);
22 void rds_info_deregister_func(int optname, rds_info_func func);
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/
H A Dnv31.h8 const struct nv31_mpeg_func *func; member in struct:nv31_mpeg
/linux-4.4.14/arch/mips/net/
H A Dbpf_jit.h73 #define DECLARE_LOAD_FUNC(func) \
74 extern u8 func(unsigned long *skb, int offset); \
75 extern u8 func##_negative(unsigned long *skb, int offset); \
76 extern u8 func##_positive(unsigned long *skb, int offset)
/linux-4.4.14/tools/lib/traceevent/
H A Dplugin_kmem.c32 const char *func; call_site_handler() local
41 func = pevent_find_function(event->pevent, val); call_site_handler()
42 if (!func) call_site_handler()
47 trace_seq_printf(s, "(%s+0x%x) ", func, (int)(val - addr)); call_site_handler()
/linux-4.4.14/lib/
H A Dratelimit.c19 * @func: name of calling function
28 int ___ratelimit(struct ratelimit_state *rs, const char *func) ___ratelimit() argument
51 func, rs->missed); ___ratelimit()
/linux-4.4.14/drivers/watchdog/
H A Ddiag288_wdt.c75 static int __diag288(unsigned int func, unsigned int timeout, __diag288() argument
78 register unsigned long __func asm("2") = func; __diag288()
95 static int __diag288_vm(unsigned int func, unsigned int timeout, __diag288_vm() argument
99 return __diag288(func, timeout, virt_to_phys(cmd), len); __diag288_vm()
102 static int __diag288_lpar(unsigned int func, unsigned int timeout, __diag288_lpar() argument
106 return __diag288(func, timeout, action, 0); __diag288_lpar()
114 unsigned int func; wdt_start() local
126 func = conceal_on ? (WDT_FUNC_INIT | WDT_FUNC_CONCEAL) wdt_start()
128 ret = __diag288_vm(func, dev->timeout, ebc_cmd, len); wdt_start()
157 unsigned int func; wdt_ping() local
174 func = conceal_on ? (WDT_FUNC_INIT | WDT_FUNC_CONCEAL) wdt_ping()
177 ret = __diag288_vm(func, dev->timeout, ebc_cmd, len); wdt_ping()
/linux-4.4.14/drivers/staging/lustre/lustre/include/linux/
H A Dobd.h65 const char *func; member in struct:__anon10498
70 const char *func, int line) __client_obd_list_lock()
78 lock->func = func; __client_obd_list_lock()
94 lock->func, lock->line, __client_obd_list_lock()
69 __client_obd_list_lock(client_obd_lock_t *lock, const char *func, int line) __client_obd_list_lock() argument
/linux-4.4.14/kernel/trace/
H A Dtrace_functions.c45 ops->func = function_trace_call; allocate_ftrace_ops()
84 ftrace_func_t func; function_trace_init() local
97 func = function_stack_trace_call; function_trace_init()
99 func = function_trace_call; function_trace_init()
101 ftrace_init_array_ops(tr, func); function_trace_init()
234 tr->ops->func = function_stack_trace_call; func_set_flag()
237 tr->ops->func = function_trace_call; func_set_flag()
482 .func = ftrace_traceon_count,
487 .func = ftrace_traceoff_count,
492 .func = ftrace_stacktrace_count,
497 .func = ftrace_dump_probe,
502 .func = ftrace_cpudump_probe,
507 .func = ftrace_traceon,
512 .func = ftrace_traceoff,
517 .func = ftrace_stacktrace,
617 .func = ftrace_trace_onoff_callback,
622 .func = ftrace_trace_onoff_callback,
627 .func = ftrace_stacktrace_callback,
632 .func = ftrace_dump_callback,
637 .func = ftrace_cpudump_callback,
/linux-4.4.14/include/drm/
H A Ddrm_flip_work.h57 * @data: data to pass to work->func
67 * @func: callback fxn called for each committed item
68 * @worker: worker which calls @func
75 drm_flip_func_t func; member in struct:drm_flip_work
89 const char *name, drm_flip_func_t func);
/linux-4.4.14/arch/powerpc/platforms/
H A Dfsl_uli1575.c102 /* USB 1.1 OHCI controller 1: dev 28, func 0 - IRQ12 */ quirk_uli1575()
105 /* USB 1.1 OHCI controller 2: dev 28, func 1 - IRQ9 */ quirk_uli1575()
108 /* USB 1.1 OHCI controller 3: dev 28, func 2 - IRQ10 */ quirk_uli1575()
111 /* Lan controller: dev 27, func 0 - IRQ6 */ quirk_uli1575()
114 /* AC97 Audio controller: dev 29, func 0 - IRQ6 */ quirk_uli1575()
117 /* Modem controller: dev 29, func 1 - IRQ6 */ quirk_uli1575()
120 /* HD Audio controller: dev 29, func 2 - IRQ6 */ quirk_uli1575()
123 /* SATA controller: dev 31, func 1 - IRQ5 */ quirk_uli1575()
126 /* SMB interrupt: dev 30, func 1 - IRQ7 */ quirk_uli1575()
129 /* PMU ACPI SCI interrupt: dev 30, func 2 - IRQ7 */ quirk_uli1575()
132 /* USB 2.0 controller: dev 28, func 3 */ quirk_uli1575()
/linux-4.4.14/drivers/mmc/card/
H A Dsdio_uart.c70 struct sdio_func *func; member in struct:sdio_uart_port
136 struct sdio_func *func; sdio_uart_port_remove() local
153 func = port->func; sdio_uart_port_remove()
154 sdio_claim_host(func); sdio_uart_port_remove()
155 port->func = NULL; sdio_uart_port_remove()
160 sdio_release_irq(func); sdio_uart_port_remove()
161 sdio_disable_func(func); sdio_uart_port_remove()
162 sdio_release_host(func); sdio_uart_port_remove()
170 if (unlikely(!port->func)) { sdio_uart_claim_func()
175 sdio_claim_host(port->func); sdio_uart_claim_func()
183 sdio_release_host(port->func); sdio_uart_release_func()
189 c = sdio_readb(port->func, port->regs_offset + offset, NULL); sdio_in()
195 sdio_writeb(port->func, value, port->regs_offset + offset, NULL); sdio_out()
518 static void sdio_uart_irq(struct sdio_func *func) sdio_uart_irq() argument
520 struct sdio_uart_port *port = sdio_get_drvdata(func); sdio_uart_irq()
617 ret = sdio_enable_func(port->func); sdio_uart_activate()
620 ret = sdio_claim_irq(port->func, sdio_uart_irq); sdio_uart_activate()
661 sdio_uart_irq(port->func); sdio_uart_activate()
667 sdio_disable_func(port->func); sdio_uart_activate()
696 sdio_release_irq(port->func); sdio_uart_shutdown()
710 sdio_disable_func(port->func); sdio_uart_shutdown()
789 if (!port->func) sdio_uart_write()
797 sdio_uart_irq(port->func); sdio_uart_write()
827 sdio_uart_irq(port->func); sdio_uart_send_xchar()
850 sdio_uart_irq(port->func); sdio_uart_throttle()
876 sdio_uart_irq(port->func); sdio_uart_unthrottle()
1055 static int sdio_uart_probe(struct sdio_func *func, sdio_uart_probe() argument
1065 if (func->class == SDIO_CLASS_UART) { sdio_uart_probe()
1067 sdio_func_id(func)); sdio_uart_probe()
1070 } else if (func->class == SDIO_CLASS_GPS) { sdio_uart_probe()
1076 for (tpl = func->tuples; tpl; tpl = tpl->next) { sdio_uart_probe()
1086 sdio_func_id(func)); sdio_uart_probe()
1091 sdio_func_id(func), tpl->data[2], tpl->data[3]); sdio_uart_probe()
1096 sdio_func_id(func), port->regs_offset); sdio_uart_probe()
1101 sdio_func_id(func), port->uartclk, sdio_uart_probe()
1108 port->func = func; sdio_uart_probe()
1109 sdio_set_drvdata(func, port); sdio_uart_probe()
1119 sdio_uart_tty_driver, port->index, &func->dev); sdio_uart_probe()
1129 static void sdio_uart_remove(struct sdio_func *func) sdio_uart_remove() argument
1131 struct sdio_uart_port *port = sdio_get_drvdata(func); sdio_uart_remove()
/linux-4.4.14/drivers/xen/xen-pciback/
H A Dpci_stub.c153 int slot, int func) pcistub_device_find()
165 && func == PCI_FUNC(psdev->dev->devfn)) { pcistub_device_find()
202 int slot, int func) pcistub_get_pci_dev_by_slot()
215 && func == PCI_FUNC(psdev->dev->devfn)) { pcistub_get_pci_dev_by_slot()
317 /* Match the specified device by domain, bus, slot, func and also if pcistub_match_one()
956 int *slot, int *func) str_to_slot()
960 switch (sscanf(buf, " %x:%x:%x.%x %n", domain, bus, slot, func, str_to_slot()
963 *func = -1; str_to_slot()
967 *slot = *func = -1; str_to_slot()
976 switch (sscanf(buf, " %x:%x.%x %n", bus, slot, func, &parsed)) { str_to_slot()
978 *func = -1; str_to_slot()
982 *slot = *func = -1; str_to_slot()
993 *slot, int *func, int *reg, int *size, int *mask) str_to_quirk()
997 sscanf(buf, " %x:%x:%x.%x-%x:%x:%x %n", domain, bus, slot, func, str_to_quirk()
1004 sscanf(buf, " %x:%x.%x-%x:%x:%x %n", bus, slot, func, reg, size, str_to_quirk()
1012 static int pcistub_device_id_add(int domain, int bus, int slot, int func) pcistub_device_id_add() argument
1016 int rc = 0, devfn = PCI_DEVFN(slot, func); pcistub_device_id_add()
1020 rc = pcistub_device_id_add(domain, bus, slot, func); pcistub_device_id_add()
1024 if (func < 0) { pcistub_device_id_add()
1025 for (func = 0; !rc && func < 8; ++func) pcistub_device_id_add()
1026 rc = pcistub_device_id_add(domain, bus, slot, func); pcistub_device_id_add()
1038 || PCI_FUNC(devfn) != func) pcistub_device_id_add()
1050 domain, bus, slot, func); pcistub_device_id_add()
1059 static int pcistub_device_id_remove(int domain, int bus, int slot, int func) pcistub_device_id_remove() argument
1070 && (func < 0 || PCI_FUNC(pci_dev_id->devfn) == func)) { pcistub_device_id_remove()
1080 domain, bus, slot, func); pcistub_device_id_remove()
1088 static int pcistub_reg_add(int domain, int bus, int slot, int func, pcistub_reg_add() argument
1100 psdev = pcistub_device_find(domain, bus, slot, func); pcistub_reg_add()
1133 int domain, bus, slot, func; pcistub_slot_add() local
1136 err = str_to_slot(buf, &domain, &bus, &slot, &func); pcistub_slot_add()
1140 err = pcistub_device_id_add(domain, bus, slot, func); pcistub_slot_add()
1152 int domain, bus, slot, func; pcistub_slot_remove() local
1155 err = str_to_slot(buf, &domain, &bus, &slot, &func); pcistub_slot_remove()
1159 err = pcistub_device_id_remove(domain, bus, slot, func); pcistub_slot_remove()
1226 int domain, bus, slot, func; pcistub_irq_handler_switch() local
1229 err = str_to_slot(buf, &domain, &bus, &slot, &func); pcistub_irq_handler_switch()
1233 psdev = pcistub_device_find(domain, bus, slot, func); pcistub_irq_handler_switch()
1265 int domain, bus, slot, func, reg, size, mask; pcistub_quirk_add() local
1268 err = str_to_quirk(buf, &domain, &bus, &slot, &func, &reg, &size, pcistub_quirk_add()
1273 err = pcistub_reg_add(domain, bus, slot, func, reg, size, mask); pcistub_quirk_add()
1330 int domain, bus, slot, func; permissive_add() local
1335 err = str_to_slot(buf, &domain, &bus, &slot, &func); permissive_add()
1339 psdev = pcistub_device_find(domain, bus, slot, func); permissive_add()
1412 int domain, bus, slot, func; pcistub_init() local
1421 &domain, &bus, &slot, &func, &parsed); pcistub_init()
1424 func = -1; pcistub_init()
1430 slot = func = -1; pcistub_init()
1441 &bus, &slot, &func, &parsed); pcistub_init()
1444 func = -1; pcistub_init()
1450 slot = func = -1; pcistub_init()
1461 err = pcistub_device_id_add(domain, bus, slot, func); pcistub_init()
152 pcistub_device_find(int domain, int bus, int slot, int func) pcistub_device_find() argument
200 pcistub_get_pci_dev_by_slot(struct xen_pcibk_device *pdev, int domain, int bus, int slot, int func) pcistub_get_pci_dev_by_slot() argument
955 str_to_slot(const char *buf, int *domain, int *bus, int *slot, int *func) str_to_slot() argument
992 str_to_quirk(const char *buf, int *domain, int *bus, int *slot, int *func, int *reg, int *size, int *mask) str_to_quirk() argument
/linux-4.4.14/drivers/net/team/
H A Dteam_mode_loadbalance.c131 lb_select_tx_port_func_t *func; member in struct:lb_select_tx_port
137 .func = lb_hash_select_tx_port,
141 .func = lb_htpm_select_tx_port,
146 static char *lb_select_tx_port_get_name(lb_select_tx_port_func_t *func) lb_select_tx_port_get_name() argument
154 if (item->func == func) lb_select_tx_port_get_name()
169 return item->func; lb_select_tx_port_get_func()
311 lb_select_tx_port_func_t *func; lb_tx_method_get() local
314 func = rcu_dereference_protected(lb_priv->select_tx_port_func, lb_tx_method_get()
316 name = lb_select_tx_port_get_name(func); lb_tx_method_get()
325 lb_select_tx_port_func_t *func; lb_tx_method_set() local
327 func = lb_select_tx_port_get_func(ctx->data.str_val); lb_tx_method_set()
328 if (!func) lb_tx_method_set()
330 rcu_assign_pointer(lb_priv->select_tx_port_func, func); lb_tx_method_set()
576 lb_select_tx_port_func_t *func; lb_init() local
580 func = lb_select_tx_port_get_func("hash"); lb_init()
581 BUG_ON(!func); lb_init()
582 rcu_assign_pointer(lb_priv->select_tx_port_func, func); lb_init()
/linux-4.4.14/arch/powerpc/platforms/44x/
H A Dwarp.c108 void (*func)(void *arg); member in struct:dtm_shutdown
113 int pika_dtm_register_shutdown(void (*func)(void *arg), void *arg) pika_dtm_register_shutdown()
121 shutdown->func = func; pika_dtm_register_shutdown()
129 int pika_dtm_unregister_shutdown(void (*func)(void *arg), void *arg) pika_dtm_unregister_shutdown()
134 if (shutdown->func == func && shutdown->arg == arg) { pika_dtm_unregister_shutdown()
154 shutdown->func(shutdown->arg); temp_isr()
305 int pika_dtm_register_shutdown(void (*func)(void *arg), void *arg) pika_dtm_register_shutdown()
310 int pika_dtm_unregister_shutdown(void (*func)(void *arg), void *arg) pika_dtm_unregister_shutdown()
/linux-4.4.14/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_sriov_pf.c69 struct qlcnic_info *info, u16 func) qlcnic_sriov_pf_cal_res_limit()
78 vpid = qlcnic_sriov_pf_get_vport_handle(adapter, func); qlcnic_sriov_pf_cal_res_limit()
92 if (adapter->ahw->pci_func == func) { qlcnic_sriov_pf_cal_res_limit()
106 id = qlcnic_sriov_func_to_index(adapter, func); qlcnic_sriov_pf_cal_res_limit()
234 u8 func) qlcnic_sriov_pf_reset_vport_handle()
240 if (adapter->ahw->pci_func == func) { qlcnic_sriov_pf_reset_vport_handle()
243 index = qlcnic_sriov_func_to_index(adapter, func); qlcnic_sriov_pf_reset_vport_handle()
252 u16 vport_handle, u8 func) qlcnic_sriov_pf_set_vport_handle()
258 if (adapter->ahw->pci_func == func) { qlcnic_sriov_pf_set_vport_handle()
261 index = qlcnic_sriov_func_to_index(adapter, func); qlcnic_sriov_pf_set_vport_handle()
270 u8 func) qlcnic_sriov_pf_get_vport_handle()
276 if (adapter->ahw->pci_func == func) { qlcnic_sriov_pf_get_vport_handle()
279 index = qlcnic_sriov_func_to_index(adapter, func); qlcnic_sriov_pf_get_vport_handle()
290 u8 flag, u16 func) qlcnic_sriov_pf_config_vport()
300 cmd.req.arg[3] = func << 8; qlcnic_sriov_pf_config_vport()
302 vpid = qlcnic_sriov_pf_get_vport_handle(adapter, func); qlcnic_sriov_pf_config_vport()
313 "Failed %s vport, err %d for func 0x%x\n", qlcnic_sriov_pf_config_vport()
314 (flag ? "enable" : "disable"), ret, func); qlcnic_sriov_pf_config_vport()
320 qlcnic_sriov_pf_set_vport_handle(adapter, vpid, func); qlcnic_sriov_pf_config_vport()
322 qlcnic_sriov_pf_reset_vport_handle(adapter, func); qlcnic_sriov_pf_config_vport()
382 u8 func, u8 enable) qlcnic_sriov_pf_cfg_eswitch()
391 cmd.req.arg[1] = ((func & 0xf) << 2) | BIT_6 | BIT_1; qlcnic_sriov_pf_cfg_eswitch()
436 u8 func = adapter->ahw->pci_func; qlcnic_sriov_pf_cleanup() local
443 qlcnic_sriov_pf_config_vport(adapter, 0, func); qlcnic_sriov_pf_cleanup()
444 qlcnic_sriov_pf_cfg_eswitch(adapter, func, 0); qlcnic_sriov_pf_cleanup()
509 u8 func = ahw->pci_func; qlcnic_sriov_pf_init() local
524 err = qlcnic_sriov_pf_cfg_eswitch(adapter, func, 1); qlcnic_sriov_pf_init()
528 err = qlcnic_sriov_pf_config_vport(adapter, 1, func); qlcnic_sriov_pf_init()
536 err = qlcnic_get_nic_info(adapter, &nic_info, func); qlcnic_sriov_pf_init()
540 err = qlcnic_sriov_pf_cal_res_limit(adapter, &vp_info, func); qlcnic_sriov_pf_init()
556 qlcnic_sriov_pf_config_vport(adapter, 0, func); qlcnic_sriov_pf_init()
559 qlcnic_sriov_pf_cfg_eswitch(adapter, func, 0); qlcnic_sriov_pf_init()
683 static int qlcnic_sriov_set_vf_acl(struct qlcnic_adapter *adapter, u8 func) qlcnic_sriov_set_vf_acl() argument
690 id = qlcnic_sriov_func_to_index(adapter, func); qlcnic_sriov_set_vf_acl()
699 cmd.req.arg[1] = 0x3 | func << 16; qlcnic_sriov_set_vf_acl()
723 u16 func) qlcnic_sriov_set_vf_vport_info()
728 err = qlcnic_sriov_pf_cal_res_limit(adapter, &defvp_info, func); qlcnic_sriov_set_vf_vport_info()
732 err = qlcnic_sriov_set_vf_acl(adapter, func); qlcnic_sriov_set_vf_vport_info()
746 u16 func = vf->pci_func; qlcnic_sriov_pf_channel_cfg_cmd() local
754 err = qlcnic_sriov_pf_config_vport(adapter, 1, func); qlcnic_sriov_pf_channel_cfg_cmd()
756 err = qlcnic_sriov_set_vf_vport_info(adapter, func); qlcnic_sriov_pf_channel_cfg_cmd()
758 qlcnic_sriov_pf_config_vport(adapter, 0, func); qlcnic_sriov_pf_channel_cfg_cmd()
767 err = qlcnic_sriov_pf_config_vport(adapter, 0, func); qlcnic_sriov_pf_channel_cfg_cmd()
1615 "Failed to delete Tx ctx in firmware for func 0x%x\n", qlcnic_sriov_del_rx_ctx()
1641 "Failed to delete Tx ctx in firmware for func 0x%x\n", qlcnic_sriov_del_tx_ctx()
1700 work_func_t func) qlcnic_sriov_schedule_flr()
1705 INIT_WORK(&vf->flr_work, func); qlcnic_sriov_schedule_flr()
1720 netdev_info(adapter->netdev, "Software FLR for PCI func %d\n", qlcnic_sriov_handle_soft_flr()
1752 netdev_info(dev, "FLR for PCI func %d in progress\n", qlcnic_sriov_pf_handle_flr()
1762 netdev_info(dev, "FLR received for PCI func %d\n", vf->pci_func); qlcnic_sriov_pf_handle_flr()
68 qlcnic_sriov_pf_cal_res_limit(struct qlcnic_adapter *adapter, struct qlcnic_info *info, u16 func) qlcnic_sriov_pf_cal_res_limit() argument
233 qlcnic_sriov_pf_reset_vport_handle(struct qlcnic_adapter *adapter, u8 func) qlcnic_sriov_pf_reset_vport_handle() argument
251 qlcnic_sriov_pf_set_vport_handle(struct qlcnic_adapter *adapter, u16 vport_handle, u8 func) qlcnic_sriov_pf_set_vport_handle() argument
269 qlcnic_sriov_pf_get_vport_handle(struct qlcnic_adapter *adapter, u8 func) qlcnic_sriov_pf_get_vport_handle() argument
289 qlcnic_sriov_pf_config_vport(struct qlcnic_adapter *adapter, u8 flag, u16 func) qlcnic_sriov_pf_config_vport() argument
381 qlcnic_sriov_pf_cfg_eswitch(struct qlcnic_adapter *adapter, u8 func, u8 enable) qlcnic_sriov_pf_cfg_eswitch() argument
722 qlcnic_sriov_set_vf_vport_info(struct qlcnic_adapter *adapter, u16 func) qlcnic_sriov_set_vf_vport_info() argument
1698 qlcnic_sriov_schedule_flr(struct qlcnic_sriov *sriov, struct qlcnic_vf_info *vf, work_func_t func) qlcnic_sriov_schedule_flr() argument
/linux-4.4.14/arch/mips/math-emu/
H A Dcp1emu.c99 int func, fmt, op; microMIPS32_to_MIPS32() local
134 switch (insn.mm_fp0_format.func) { microMIPS32_to_MIPS32()
143 op = insn.mm_fp0_format.func; microMIPS32_to_MIPS32()
145 func = madd_s_op; microMIPS32_to_MIPS32()
147 func = madd_d_op; microMIPS32_to_MIPS32()
149 func = nmadd_s_op; microMIPS32_to_MIPS32()
151 func = nmadd_d_op; microMIPS32_to_MIPS32()
153 func = msub_s_op; microMIPS32_to_MIPS32()
155 func = msub_d_op; microMIPS32_to_MIPS32()
157 func = nmsub_s_op; microMIPS32_to_MIPS32()
159 func = nmsub_d_op; microMIPS32_to_MIPS32()
165 mips32_insn.fp6_format.func = func; microMIPS32_to_MIPS32()
168 func = -1; /* Invalid */ microMIPS32_to_MIPS32()
171 func = ldxc1_op; microMIPS32_to_MIPS32()
173 func = sdxc1_op; microMIPS32_to_MIPS32()
175 func = lwxc1_op; microMIPS32_to_MIPS32()
177 func = swxc1_op; microMIPS32_to_MIPS32()
179 if (func != -1) { microMIPS32_to_MIPS32()
187 mips32_insn.r_format.func = func; microMIPS32_to_MIPS32()
207 mips32_insn.fp0_format.func = fmovc_op; microMIPS32_to_MIPS32()
212 func = -1; /* Invalid */ microMIPS32_to_MIPS32()
214 func = fadd_op; microMIPS32_to_MIPS32()
216 func = fsub_op; microMIPS32_to_MIPS32()
218 func = fmul_op; microMIPS32_to_MIPS32()
220 func = fdiv_op; microMIPS32_to_MIPS32()
221 if (func != -1) { microMIPS32_to_MIPS32()
231 mips32_insn.fp0_format.func = func; microMIPS32_to_MIPS32()
236 func = -1; /* Invalid */ microMIPS32_to_MIPS32()
238 func = fmovn_op; microMIPS32_to_MIPS32()
240 func = fmovz_op; microMIPS32_to_MIPS32()
241 if (func != -1) { microMIPS32_to_MIPS32()
251 mips32_insn.fp0_format.func = func; microMIPS32_to_MIPS32()
272 mips32_insn.r_format.func = movc_op; microMIPS32_to_MIPS32()
280 func = fcvtd_op; microMIPS32_to_MIPS32()
283 func = fcvts_op; microMIPS32_to_MIPS32()
293 mips32_insn.fp0_format.func = func; microMIPS32_to_MIPS32()
303 func = fmov_op; microMIPS32_to_MIPS32()
306 func = fabs_op; microMIPS32_to_MIPS32()
308 func = fneg_op; microMIPS32_to_MIPS32()
317 mips32_insn.fp0_format.func = func; microMIPS32_to_MIPS32()
330 func = ffloorl_op; microMIPS32_to_MIPS32()
332 func = ffloor_op; microMIPS32_to_MIPS32()
334 func = fceill_op; microMIPS32_to_MIPS32()
336 func = fceil_op; microMIPS32_to_MIPS32()
338 func = ftruncl_op; microMIPS32_to_MIPS32()
340 func = ftrunc_op; microMIPS32_to_MIPS32()
342 func = froundl_op; microMIPS32_to_MIPS32()
344 func = fround_op; microMIPS32_to_MIPS32()
346 func = fcvtl_op; microMIPS32_to_MIPS32()
348 func = fcvtw_op; microMIPS32_to_MIPS32()
357 mips32_insn.fp0_format.func = func; microMIPS32_to_MIPS32()
363 func = frsqrt_op; microMIPS32_to_MIPS32()
365 func = fsqrt_op; microMIPS32_to_MIPS32()
367 func = frecip_op; microMIPS32_to_MIPS32()
376 mips32_insn.fp0_format.func = func; microMIPS32_to_MIPS32()
403 mips32_insn.fp1_format.func = 0; microMIPS32_to_MIPS32()
416 mips32_insn.fp0_format.func = microMIPS32_to_MIPS32()
446 switch (insn.r_format.func) { isBranchInstr()
456 if (NO_R6EMU && insn.r_format.func == jr_op) isBranchInstr()
/linux-4.4.14/drivers/gpu/drm/nouveau/dispnv04/
H A Ddisp.c114 const struct drm_encoder_helper_funcs *func = encoder->helper_private; nv04_display_create() local
116 func->save(encoder); nv04_display_create()
143 const struct drm_encoder_helper_funcs *func = encoder->helper_private; nv04_display_destroy() local
145 func->restore(encoder); nv04_display_destroy()
174 const struct drm_encoder_helper_funcs *func = encoder->helper_private; nv04_display_init() local
176 func->restore(encoder); nv04_display_init()
/linux-4.4.14/arch/tile/kernel/
H A Dmodule.c151 # define MUNGE(func) \ apply_relocate_add()
152 (*location = ((*location & ~func(-1)) | func(value))) apply_relocate_add()
158 # define MUNGE(func) \ apply_relocate_add()
159 (*location = swab64((swab64(*location) & ~func(-1)) | func(value))) apply_relocate_add()
/linux-4.4.14/arch/alpha/lib/
H A Ddivide.S62 #define func(x) __div##x define
70 #define func(x) __rem##x define
81 #define ufunction func(lu)
82 #define sfunction func(l)
86 #define ufunction func(qu)
87 #define sfunction func(q)
/linux-4.4.14/arch/microblaze/kernel/
H A Dftrace.c72 trace.func = self_addr; prepare_ftrace_return()
182 int ftrace_update_ftrace_func(ftrace_func_t func) ftrace_update_ftrace_func() argument
185 unsigned int upper = (unsigned int)func; ftrace_update_ftrace_func()
186 unsigned int lower = (unsigned int)func; ftrace_update_ftrace_func()
193 pr_debug("%s: func=0x%x, ip=0x%x, upper=0x%x, lower=0x%x\n", ftrace_update_ftrace_func()
194 __func__, (unsigned int)func, (unsigned int)ip, upper, lower); ftrace_update_ftrace_func()
/linux-4.4.14/arch/microblaze/pci/
H A Dxilinx_pci.c88 u32 val, dev, func, offset; xilinx_early_pci_scan() local
93 for (func = 0; func < 1; func++) { xilinx_early_pci_scan()
94 pr_info("%02x:%02x:%02x", bus, dev, func); xilinx_early_pci_scan()
99 PCI_DEVFN(dev, func), offset, &val); xilinx_early_pci_scan()
/linux-4.4.14/arch/parisc/kernel/
H A Dftrace.c25 unsigned long func, int *depth) push_return_trace()
41 current->ret_stack[index].func = func; push_return_trace()
65 trace->func = current->ret_stack[index].func; pop_return_trace()
140 trace.func = self_addr; prepare_ftrace_return()
24 push_return_trace(unsigned long ret, unsigned long long time, unsigned long func, int *depth) push_return_trace() argument
/linux-4.4.14/arch/arm/kernel/
H A Dftrace.c131 int ftrace_update_ftrace_func(ftrace_func_t func) ftrace_update_ftrace_func() argument
138 new = ftrace_call_replace(pc, (unsigned long)func); ftrace_update_ftrace_func()
145 new = ftrace_call_replace(pc, (unsigned long)func); ftrace_update_ftrace_func()
211 trace.func = self_addr; prepare_ftrace_return()
234 void (*func) (void), bool enable) __ftrace_modify_caller()
236 unsigned long caller_fn = (unsigned long) func; __ftrace_modify_caller()

Completed in 4867 milliseconds

12345678