Searched refs:cookie (Results 1 - 200 of 655) sorted by relevance

1234

/linux-4.1.27/drivers/dma/
H A Ddmaengine.h17 chan->cookie = DMA_MIN_COOKIE; dma_cookie_init()
22 * dma_cookie_assign - assign a DMA engine cookie to the descriptor
23 * @tx: descriptor needing cookie
25 * Assign a unique non-zero per-channel cookie to the descriptor.
31 dma_cookie_t cookie; dma_cookie_assign() local
33 cookie = chan->cookie + 1; dma_cookie_assign()
34 if (cookie < DMA_MIN_COOKIE) dma_cookie_assign()
35 cookie = DMA_MIN_COOKIE; dma_cookie_assign()
36 tx->cookie = chan->cookie = cookie; dma_cookie_assign()
38 return cookie; dma_cookie_assign()
46 * cookie marker. Zero the descriptors cookie to prevent accidental
53 BUG_ON(tx->cookie < DMA_MIN_COOKIE); dma_cookie_complete()
54 tx->chan->completed_cookie = tx->cookie; dma_cookie_complete()
55 tx->cookie = 0; dma_cookie_complete()
59 * dma_cookie_status - report cookie status
61 * @cookie: cookie we are interested in
64 * Report the status of the cookie, filling in the state structure if
68 dma_cookie_t cookie, struct dma_tx_state *state) dma_cookie_status()
72 used = chan->cookie; dma_cookie_status()
80 return dma_async_is_complete(cookie, complete, used); dma_cookie_status()
67 dma_cookie_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *state) dma_cookie_status() argument
H A Dvirt-dma.c27 dma_cookie_t cookie; vchan_tx_submit() local
30 cookie = dma_cookie_assign(tx); vchan_tx_submit()
36 vc, vd, cookie); vchan_tx_submit()
38 return cookie; vchan_tx_submit()
43 dma_cookie_t cookie) vchan_find_desc()
48 if (vd->tx.cookie == cookie) vchan_find_desc()
42 vchan_find_desc(struct virt_dma_chan *vc, dma_cookie_t cookie) vchan_find_desc() argument
H A Diop-adma.c62 struct iop_adma_chan *iop_chan, dma_cookie_t cookie) iop_adma_run_tx_complete_actions()
66 BUG_ON(tx->cookie < 0); iop_adma_run_tx_complete_actions()
67 if (tx->cookie > 0) { iop_adma_run_tx_complete_actions()
68 cookie = tx->cookie; iop_adma_run_tx_complete_actions()
69 tx->cookie = 0; iop_adma_run_tx_complete_actions()
85 return cookie; iop_adma_run_tx_complete_actions()
117 dma_cookie_t cookie = 0; __iop_adma_slot_cleanup() local
130 iter->async_tx.cookie, iter->idx, busy, __iop_adma_slot_cleanup()
202 cookie = iop_adma_run_tx_complete_actions( __iop_adma_slot_cleanup()
203 grp_iter, iop_chan, cookie); __iop_adma_slot_cleanup()
226 if (iter->xor_check_result && iter->async_tx.cookie) __iop_adma_slot_cleanup()
230 cookie = iop_adma_run_tx_complete_actions( __iop_adma_slot_cleanup()
231 iter, iop_chan, cookie); __iop_adma_slot_cleanup()
237 if (cookie > 0) { __iop_adma_slot_cleanup()
238 iop_chan->common.completed_cookie = cookie; __iop_adma_slot_cleanup()
239 pr_debug("\tcompleted cookie %d\n", cookie); __iop_adma_slot_cleanup()
329 iter->async_tx.cookie = 0; iop_adma_alloc_slots()
342 alloc_tail->async_tx.cookie = -EBUSY; iop_adma_alloc_slots()
378 dma_cookie_t cookie; iop_adma_tx_submit() local
386 cookie = dma_cookie_assign(tx); iop_adma_tx_submit()
410 dev_dbg(iop_chan->device->common.dev, "%s cookie: %d slot: %d\n", iop_adma_tx_submit()
411 __func__, sw_desc->async_tx.cookie, sw_desc->idx); iop_adma_tx_submit()
413 return cookie; iop_adma_tx_submit()
761 * @cookie: ADMA transaction identifier
765 dma_cookie_t cookie, iop_adma_status()
771 ret = dma_cookie_status(chan, cookie, txstate); iop_adma_status()
777 return dma_cookie_status(chan, cookie, txstate); iop_adma_status()
849 dma_cookie_t cookie; iop_adma_memcpy_self_test() local
886 cookie = iop_adma_tx_submit(tx); iop_adma_memcpy_self_test()
890 if (iop_adma_status(dma_chan, cookie, NULL) != iop_adma_memcpy_self_test()
928 dma_cookie_t cookie; iop_adma_xor_val_self_test() local
986 cookie = iop_adma_tx_submit(tx); iop_adma_xor_val_self_test()
990 if (iop_adma_status(dma_chan, cookie, NULL) != iop_adma_xor_val_self_test()
1033 cookie = iop_adma_tx_submit(tx); iop_adma_xor_val_self_test()
1037 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_COMPLETE) { iop_adma_xor_val_self_test()
1062 cookie = iop_adma_tx_submit(tx); iop_adma_xor_val_self_test()
1066 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_COMPLETE) { iop_adma_xor_val_self_test()
1106 dma_cookie_t cookie; iop_adma_pq_zero_sum_self_test() local
1157 cookie = iop_adma_tx_submit(tx); iop_adma_pq_zero_sum_self_test()
1161 if (iop_adma_status(dma_chan, cookie, NULL) != iop_adma_pq_zero_sum_self_test()
1194 cookie = iop_adma_tx_submit(tx); iop_adma_pq_zero_sum_self_test()
1198 if (iop_adma_status(dma_chan, cookie, NULL) != iop_adma_pq_zero_sum_self_test()
1226 cookie = iop_adma_tx_submit(tx); iop_adma_pq_zero_sum_self_test()
1230 if (iop_adma_status(dma_chan, cookie, NULL) != iop_adma_pq_zero_sum_self_test()
1449 dma_cookie_t cookie; iop_chan_start_null_memcpy() local
1467 cookie = dma_cookie_assign(&sw_desc->async_tx); iop_chan_start_null_memcpy()
1469 /* initialize the completed cookie to be less than iop_chan_start_null_memcpy()
1470 * the most recently used cookie iop_chan_start_null_memcpy()
1472 iop_chan->common.completed_cookie = cookie - 1; iop_chan_start_null_memcpy()
1502 dma_cookie_t cookie; iop_chan_start_null_xor() local
1520 cookie = dma_cookie_assign(&sw_desc->async_tx); iop_chan_start_null_xor()
1522 /* initialize the completed cookie to be less than iop_chan_start_null_xor()
1523 * the most recently used cookie iop_chan_start_null_xor()
1525 iop_chan->common.completed_cookie = cookie - 1; iop_chan_start_null_xor()
61 iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc, struct iop_adma_chan *iop_chan, dma_cookie_t cookie) iop_adma_run_tx_complete_actions() argument
764 iop_adma_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) iop_adma_status() argument
H A Dvirt-dma.h87 dma_cookie_t cookie; vchan_cookie_complete() local
89 cookie = vd->tx.cookie; vchan_cookie_complete()
92 vd, cookie); vchan_cookie_complete()
H A Dmic_x100_dma.c99 * updated cookie value from tx->cookie. mic_dma_cleanup()
104 if (tx->cookie) { mic_dma_cleanup()
245 dma_cookie_t cookie; mic_dma_tx_submit_unlock() local
248 cookie = tx->cookie; mic_dma_tx_submit_unlock()
252 * assigned a cookie to this tx. mic_dma_tx_submit_unlock()
258 return cookie; mic_dma_tx_submit_unlock()
313 mic_dma_tx_status(struct dma_chan *ch, dma_cookie_t cookie, mic_dma_tx_status() argument
318 if (DMA_COMPLETE != dma_cookie_status(ch, cookie, txstate)) mic_dma_tx_status()
321 return dma_cookie_status(ch, cookie, txstate); mic_dma_tx_status()
445 ch->cookie = mic_dma_setup_irq()
449 if (IS_ERR(ch->cookie)) mic_dma_setup_irq()
450 return IS_ERR(ch->cookie); mic_dma_setup_irq()
456 to_mbus_hw_ops(ch)->free_irq(to_mbus_device(ch), ch->cookie, ch); mic_dma_free_irq()
484 dma_cookie_t cookie; mic_dma_drain_chan() local
492 cookie = tx->tx_submit(tx); mic_dma_drain_chan()
493 if (dma_submit_error(cookie)) mic_dma_drain_chan()
496 err = dma_sync_wait(&ch->api_ch, cookie); mic_dma_drain_chan()
H A Dmv_xor.c209 struct mv_xor_chan *mv_chan, dma_cookie_t cookie) mv_xor_run_tx_complete_actions()
211 BUG_ON(desc->async_tx.cookie < 0); mv_xor_run_tx_complete_actions()
213 if (desc->async_tx.cookie > 0) { mv_xor_run_tx_complete_actions()
214 cookie = desc->async_tx.cookie; mv_xor_run_tx_complete_actions()
229 return cookie; mv_xor_run_tx_complete_actions()
273 dma_cookie_t cookie = 0; mv_xor_slot_cleanup() local
293 cookie = mv_xor_run_tx_complete_actions(iter, mv_chan, mv_xor_slot_cleanup()
294 cookie); mv_xor_slot_cleanup()
342 if (cookie > 0) mv_xor_slot_cleanup()
343 mv_chan->dmachan.completed_cookie = cookie; mv_xor_slot_cleanup()
392 iter->async_tx.cookie = -EBUSY; mv_xor_alloc_slot()
415 dma_cookie_t cookie; mv_xor_tx_submit() local
423 cookie = dma_cookie_assign(tx); mv_xor_tx_submit()
458 return cookie; mv_xor_tx_submit()
611 * @cookie: XOR transaction identifier
615 dma_cookie_t cookie, mv_xor_status()
621 ret = dma_cookie_status(chan, cookie, txstate); mv_xor_status()
629 return dma_cookie_status(chan, cookie, txstate); mv_xor_status()
707 dma_cookie_t cookie; mv_xor_memcpy_self_test() local
770 cookie = mv_xor_tx_submit(tx); mv_xor_memcpy_self_test()
771 if (dma_submit_error(cookie)) { mv_xor_memcpy_self_test()
782 if (mv_xor_status(dma_chan, cookie, NULL) != mv_xor_memcpy_self_test()
820 dma_cookie_t cookie; mv_xor_xor_self_test() local
903 cookie = mv_xor_tx_submit(tx); mv_xor_xor_self_test()
904 if (dma_submit_error(cookie)) { mv_xor_xor_self_test()
915 if (mv_xor_status(dma_chan, cookie, NULL) != mv_xor_xor_self_test()
208 mv_xor_run_tx_complete_actions(struct mv_xor_desc_slot *desc, struct mv_xor_chan *mv_chan, dma_cookie_t cookie) mv_xor_run_tx_complete_actions() argument
614 mv_xor_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) mv_xor_status() argument
H A Dmmp_pdma.c346 dma_cookie_t cookie = -EBUSY; mmp_pdma_tx_submit() local
351 cookie = dma_cookie_assign(&child->async_tx); mmp_pdma_tx_submit()
359 return cookie; mmp_pdma_tx_submit()
489 new->async_tx.cookie = 0; mmp_pdma_prep_memcpy()
509 first->async_tx.cookie = -EBUSY; mmp_pdma_prep_memcpy()
572 new->async_tx.cookie = 0; for_each_sg()
585 first->async_tx.cookie = -EBUSY;
659 new->async_tx.cookie = 0; mmp_pdma_prep_dma_cyclic()
675 first->async_tx.cookie = -EBUSY; mmp_pdma_prep_dma_cyclic()
757 dma_cookie_t cookie) mmp_pdma_residue()
804 * transaction chain, and the cookie assigned with it has been mmp_pdma_residue()
808 * and the cookie does not match the one the user asked us mmp_pdma_residue()
818 if (sw->async_tx.cookie == cookie) { mmp_pdma_residue()
831 dma_cookie_t cookie, mmp_pdma_tx_status()
837 ret = dma_cookie_status(dchan, cookie, txstate); mmp_pdma_tx_status()
839 dma_set_residue(txstate, mmp_pdma_residue(chan, cookie)); mmp_pdma_tx_status()
899 * complete that transaction and its cookie. dma_do_tasklet()
902 dma_cookie_t cookie = desc->async_tx.cookie; dma_do_tasklet() local
904 dev_dbg(chan->dev, "completed_cookie=%d\n", cookie); dma_do_tasklet()
756 mmp_pdma_residue(struct mmp_pdma_chan *chan, dma_cookie_t cookie) mmp_pdma_residue() argument
830 mmp_pdma_tx_status(struct dma_chan *dchan, dma_cookie_t cookie, struct dma_tx_state *txstate) mmp_pdma_tx_status() argument
H A Dat_hdmac.c256 * atc_get_desc_by_cookie - get the descriptor of a cookie
258 * @cookie: the cookie to get the descriptor for
261 dma_cookie_t cookie) atc_get_desc_by_cookie()
266 if (desc->txd.cookie == cookie) atc_get_desc_by_cookie()
271 if (desc->txd.cookie == cookie) atc_get_desc_by_cookie()
309 * atc_get_bytes_left - get the number of bytes residue for a cookie
311 * @cookie: transaction identifier to check status of
313 static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie) atc_get_bytes_left() argument
322 * If the cookie doesn't match to the currently running transfer then atc_get_bytes_left()
326 desc = atc_get_desc_by_cookie(atchan, cookie); atc_get_bytes_left()
332 /* cookie matches to the currently running transfer */ atc_get_bytes_left()
391 "descriptor %u complete\n", txd->cookie); atc_chain_complete()
512 " cookie: %d\n", bad_desc->txd.cookie); atc_handle_error()
615 dma_cookie_t cookie; atc_tx_submit() local
619 cookie = dma_cookie_assign(tx); atc_tx_submit()
623 desc->txd.cookie); atc_tx_submit()
628 desc->txd.cookie); atc_tx_submit()
634 return cookie; atc_tx_submit()
695 desc->txd.cookie = 0; atc_prep_dma_memcpy()
702 first->txd.cookie = -EBUSY; atc_prep_dma_memcpy()
854 first->txd.cookie = -EBUSY;
975 desc->txd.cookie = 0; atc_prep_dma_sg()
996 first->txd.cookie = -EBUSY; atc_prep_dma_sg()
1155 first->txd.cookie = -EBUSY; atc_prep_dma_cyclic()
1280 * @cookie: transaction identifier to check status of
1289 dma_cookie_t cookie, atc_tx_status()
1297 ret = dma_cookie_status(chan, cookie, txstate); atc_tx_status()
1310 bytes = atc_get_bytes_left(chan, cookie); atc_tx_status()
1321 dev_vdbg(chan2dev(chan), "tx_status %d: cookie = %d residue = %d\n", atc_tx_status()
1322 ret, cookie, bytes); atc_tx_status() local
260 atc_get_desc_by_cookie(struct at_dma_chan *atchan, dma_cookie_t cookie) atc_get_desc_by_cookie() argument
1288 atc_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) atc_tx_status() argument
H A Dfsldma.c413 dma_cookie_t cookie = -EINVAL; fsl_dma_tx_submit() local
430 cookie = dma_cookie_assign(&child->async_tx); fsl_dma_tx_submit()
438 return cookie; fsl_dma_tx_submit()
504 * @cookie: Freescale DMA transaction identifier
510 struct fsl_desc_sw *desc, dma_cookie_t cookie) fsldma_run_tx_complete_actions()
513 dma_cookie_t ret = cookie; fsldma_run_tx_complete_actions()
515 BUG_ON(txd->cookie < 0); fsldma_run_tx_complete_actions()
517 if (txd->cookie > 0) { fsldma_run_tx_complete_actions()
518 ret = txd->cookie; fsldma_run_tx_complete_actions()
643 dma_cookie_t cookie = 0; fsldma_cleanup_descriptors() local
669 cookie = fsldma_run_tx_complete_actions(chan, desc, cookie); fsldma_cleanup_descriptors()
682 if (cookie > 0) fsldma_cleanup_descriptors()
683 chan->common.completed_cookie = cookie; fsldma_cleanup_descriptors()
800 new->async_tx.cookie = 0; fsl_dma_prep_memcpy()
813 new->async_tx.cookie = -EBUSY; fsl_dma_prep_memcpy()
883 new->async_tx.cookie = 0; fsl_dma_prep_sg()
929 new->async_tx.cookie = -EBUSY; fsl_dma_prep_sg()
1012 dma_cookie_t cookie, fsl_tx_status()
1018 ret = dma_cookie_status(dchan, cookie, txstate); fsl_tx_status()
1026 return dma_cookie_status(dchan, cookie, txstate); fsl_tx_status()
1064 * For MPC8349, EOCDI event need to update cookie fsldma_chan_irq()
509 fsldma_run_tx_complete_actions(struct fsldma_chan *chan, struct fsl_desc_sw *desc, dma_cookie_t cookie) fsldma_run_tx_complete_actions() argument
1011 fsl_tx_status(struct dma_chan *dchan, dma_cookie_t cookie, struct dma_tx_state *txstate) fsl_tx_status() argument
H A Dep93xx_dma.c297 * If txd.cookie is set it means that we are back in the first ep93xx_dma_advance_active()
300 return !desc->txd.cookie; ep93xx_dma_advance_active()
420 desc->txd.cookie, desc->src_addr, desc->dst_addr, m2p_hw_interrupt()
609 last_done = !desc || desc->txd.cookie; m2m_hw_interrupt()
681 desc->txd.cookie = 0; ep93xx_dma_desc_get()
818 * is busy, queue the descriptor to be executed later on. Returns cookie which
825 dma_cookie_t cookie; ep93xx_dma_tx_submit() local
829 cookie = dma_cookie_assign(tx); ep93xx_dma_tx_submit()
846 return cookie; ep93xx_dma_tx_submit()
1004 first->txd.cookie = -EBUSY; ep93xx_dma_prep_dma_memcpy()
1077 first->txd.cookie = -EBUSY;
1156 first->txd.cookie = -EBUSY; ep93xx_dma_prep_dma_cyclic()
1249 * @cookie: transaction specific cookie
1255 dma_cookie_t cookie, ep93xx_dma_tx_status()
1258 return dma_cookie_status(chan, cookie, state); ep93xx_dma_tx_status()
1254 ep93xx_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *state) ep93xx_dma_tx_status() argument
H A Dtimb_dma.c247 txd->cookie); __td_finish()
303 __func__, td_desc->txd.cookie); __td_start_next()
315 dma_cookie_t cookie; td_tx_submit() local
318 cookie = dma_cookie_assign(txd); td_tx_submit()
322 txd->cookie); td_tx_submit()
327 txd->cookie); td_tx_submit()
334 return cookie; td_tx_submit()
475 static enum dma_status td_tx_status(struct dma_chan *chan, dma_cookie_t cookie, td_tx_status() argument
482 ret = dma_cookie_status(chan, cookie, txstate); td_tx_status()
H A Dmic_x100_dma.h110 * @cookie: mic_irq cookie used with mic irq request
128 struct mic_irq *cookie; member in struct:mic_dma_chan
H A Dnbpfaxi.c596 dma_cookie_t cookie, struct dma_tx_state *state) nbpf_tx_status()
599 enum dma_status status = dma_cookie_status(dchan, cookie, state); nbpf_tx_status()
606 running = chan->running ? chan->running->async_tx.cookie : -EINVAL; nbpf_tx_status()
608 if (cookie == running) { nbpf_tx_status()
617 if (desc->async_tx.cookie == cookie) { nbpf_tx_status()
624 if (desc->async_tx.cookie == cookie) { nbpf_tx_status()
647 dma_cookie_t cookie; nbpf_tx_submit() local
650 cookie = dma_cookie_assign(tx); nbpf_tx_submit()
654 dev_dbg(chan->dma_chan.device->dev, "Entry %s(%d)\n", __func__, cookie); nbpf_tx_submit()
656 return cookie; nbpf_tx_submit()
826 dev_dbg(chan->nbpf->dma_dev.dev, "%s(): force-free desc %p cookie %d\n", nbpf_chan_idle()
827 __func__, desc, desc->async_tx.cookie); nbpf_chan_idle()
926 desc->async_tx.cookie = -EBUSY; nbpf_prep_sg()
595 nbpf_tx_status(struct dma_chan *dchan, dma_cookie_t cookie, struct dma_tx_state *state) nbpf_tx_status() argument
H A Dbcm2835-dma.c284 dma_cookie_t cookie, struct dma_tx_state *txstate) bcm2835_dma_tx_status()
291 ret = dma_cookie_status(chan, cookie, txstate); bcm2835_dma_tx_status()
296 vd = vchan_find_desc(&c->vc, cookie); bcm2835_dma_tx_status()
300 } else if (c->desc && c->desc->vd.tx.cookie == cookie) { bcm2835_dma_tx_status()
283 bcm2835_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) bcm2835_dma_tx_status() argument
H A Ddma-jz4740.c468 dma_cookie_t cookie, struct dma_tx_state *state) jz4740_dma_tx_status()
475 status = dma_cookie_status(c, cookie, state); jz4740_dma_tx_status()
480 vdesc = vchan_find_desc(&chan->vchan, cookie); jz4740_dma_tx_status()
481 if (cookie == chan->desc->vdesc.tx.cookie) { jz4740_dma_tx_status()
467 jz4740_dma_tx_status(struct dma_chan *c, dma_cookie_t cookie, struct dma_tx_state *state) jz4740_dma_tx_status() argument
H A Dmoxart-dma.c477 dma_cookie_t cookie, moxart_tx_status()
489 ret = dma_cookie_status(chan, cookie, txstate); moxart_tx_status()
492 vd = vchan_find_desc(&ch->vc, cookie); moxart_tx_status()
496 } else if (ch->desc && ch->desc->vd.tx.cookie == cookie) { moxart_tx_status()
476 moxart_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) moxart_tx_status() argument
H A Dtxx9dmac.c341 first->txd.cookie, first); txx9dmac_dostart()
411 txd->cookie, desc); txx9dmac_descriptor_complete()
534 "Bad descriptor submitted for DMA! (cookie: %d)\n", txx9dmac_handle_error()
535 bad_desc->txd.cookie); txx9dmac_handle_error()
701 dma_cookie_t cookie; txx9dmac_tx_submit() local
704 cookie = dma_cookie_assign(tx); txx9dmac_tx_submit()
707 desc->txd.cookie, desc); txx9dmac_tx_submit()
712 return cookie; txx9dmac_tx_submit()
929 txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, txx9dmac_tx_status() argument
935 ret = dma_cookie_status(chan, cookie, txstate); txx9dmac_tx_status()
943 return dma_cookie_status(chan, cookie, txstate); txx9dmac_tx_status()
H A Dpch_dma.c404 dev_crit(chan2dev(&pd_chan->chan), "descriptor cookie: %d\n", pdc_handle_error()
405 bad_desc->txd.cookie); pdc_handle_error()
425 dma_cookie_t cookie; pd_tx_submit() local
428 cookie = dma_cookie_assign(txd); pd_tx_submit()
565 static enum dma_status pd_tx_status(struct dma_chan *chan, dma_cookie_t cookie, pd_tx_status() argument
568 return dma_cookie_status(chan, cookie, txstate); pd_tx_status()
657 first->txd.cookie = -EBUSY;
H A Dsirf-dma.c220 last_cookie = desc->cookie; sirfsoc_dma_process_completed()
268 dma_cookie_t cookie; sirfsoc_dma_tx_submit() local
277 cookie = dma_cookie_assign(txd); sirfsoc_dma_tx_submit()
281 return cookie; sirfsoc_dma_tx_submit()
461 sirfsoc_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, sirfsoc_dma_tx_status() argument
481 ret = dma_cookie_status(chan, cookie, txstate); sirfsoc_dma_tx_status()
/linux-4.1.27/fs/fscache/
H A Dcookie.c1 /* netfs cookie management
24 static int fscache_acquire_non_index_cookie(struct fscache_cookie *cookie);
26 struct fscache_cookie *cookie);
27 static int fscache_attach_object(struct fscache_cookie *cookie,
31 * initialise an cookie jar slab element prior to any use
35 struct fscache_cookie *cookie = _cookie; fscache_cookie_init_once() local
37 memset(cookie, 0, sizeof(*cookie)); fscache_cookie_init_once()
38 spin_lock_init(&cookie->lock); fscache_cookie_init_once()
39 spin_lock_init(&cookie->stores_lock); fscache_cookie_init_once()
40 INIT_HLIST_HEAD(&cookie->backing_objects); fscache_cookie_init_once()
44 * request a cookie to represent an object (index, datafile, xattr, etc)
46 * - the top level index cookie for each netfs is stored in the fscache_netfs
56 * - we may set a negative cookie pointer, but that's okay
64 struct fscache_cookie *cookie; __fscache_acquire_cookie() local
74 /* if there's no parent cookie, then we don't create one here either */ __fscache_acquire_cookie()
88 /* allocate and initialise a cookie */ __fscache_acquire_cookie()
89 cookie = kmem_cache_alloc(fscache_cookie_jar, GFP_KERNEL); __fscache_acquire_cookie()
90 if (!cookie) { __fscache_acquire_cookie()
96 atomic_set(&cookie->usage, 1); __fscache_acquire_cookie()
97 atomic_set(&cookie->n_children, 0); __fscache_acquire_cookie()
102 atomic_set(&cookie->n_active, 1); __fscache_acquire_cookie()
107 cookie->def = def; __fscache_acquire_cookie()
108 cookie->parent = parent; __fscache_acquire_cookie()
109 cookie->netfs_data = netfs_data; __fscache_acquire_cookie()
110 cookie->flags = (1 << FSCACHE_COOKIE_NO_DATA_YET); __fscache_acquire_cookie()
114 INIT_RADIX_TREE(&cookie->stores, GFP_NOFS & ~__GFP_WAIT); __fscache_acquire_cookie()
116 switch (cookie->def->type) { __fscache_acquire_cookie()
132 if (cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) { __fscache_acquire_cookie()
133 if (fscache_acquire_non_index_cookie(cookie) == 0) { __fscache_acquire_cookie()
134 set_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags); __fscache_acquire_cookie()
137 __fscache_cookie_put(cookie); __fscache_acquire_cookie()
143 set_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags); __fscache_acquire_cookie()
148 _leave(" = %p", cookie); __fscache_acquire_cookie()
149 return cookie; __fscache_acquire_cookie()
154 * Enable a cookie to permit it to accept new operations.
156 void __fscache_enable_cookie(struct fscache_cookie *cookie, __fscache_enable_cookie() argument
160 _enter("%p", cookie); __fscache_enable_cookie()
162 wait_on_bit_lock(&cookie->flags, FSCACHE_COOKIE_ENABLEMENT_LOCK, __fscache_enable_cookie()
165 if (test_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags)) __fscache_enable_cookie()
170 } else if (cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) { __fscache_enable_cookie()
172 __fscache_wait_on_invalidate(cookie); __fscache_enable_cookie()
174 if (fscache_acquire_non_index_cookie(cookie) == 0) __fscache_enable_cookie()
175 set_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags); __fscache_enable_cookie()
177 set_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags); __fscache_enable_cookie()
181 clear_bit_unlock(FSCACHE_COOKIE_ENABLEMENT_LOCK, &cookie->flags); __fscache_enable_cookie()
182 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_ENABLEMENT_LOCK); __fscache_enable_cookie()
187 * acquire a non-index cookie
191 static int fscache_acquire_non_index_cookie(struct fscache_cookie *cookie) fscache_acquire_non_index_cookie() argument
200 set_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags); fscache_acquire_non_index_cookie()
202 /* now we need to see whether the backing objects for this cookie yet fscache_acquire_non_index_cookie()
213 cache = fscache_select_cache_for_object(cookie->parent); fscache_acquire_non_index_cookie()
223 set_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags); fscache_acquire_non_index_cookie()
225 /* ask the cache to allocate objects for this cookie and its parent fscache_acquire_non_index_cookie()
227 ret = fscache_alloc_object(cache, cookie); fscache_acquire_non_index_cookie()
235 cookie->def->get_attr(cookie->netfs_data, &i_size); fscache_acquire_non_index_cookie()
237 spin_lock(&cookie->lock); fscache_acquire_non_index_cookie()
238 if (hlist_empty(&cookie->backing_objects)) { fscache_acquire_non_index_cookie()
239 spin_unlock(&cookie->lock); fscache_acquire_non_index_cookie()
243 object = hlist_entry(cookie->backing_objects.first, fscache_acquire_non_index_cookie()
252 spin_unlock(&cookie->lock); fscache_acquire_non_index_cookie()
256 _debug("non-deferred lookup %p", &cookie->flags); fscache_acquire_non_index_cookie()
257 wait_on_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP, fscache_acquire_non_index_cookie()
260 if (test_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags)) fscache_acquire_non_index_cookie()
275 * recursively allocate cache object records for a cookie/cache combination
279 struct fscache_cookie *cookie) fscache_alloc_object()
284 _enter("%p,%p{%s}", cache, cookie, cookie->def->name); fscache_alloc_object()
286 spin_lock(&cookie->lock); fscache_alloc_object()
287 hlist_for_each_entry(object, &cookie->backing_objects, fscache_alloc_object()
292 spin_unlock(&cookie->lock); fscache_alloc_object()
297 object = cache->ops->alloc_object(cache, cookie); fscache_alloc_object()
310 object->debug_id, cookie->def->name, object->events); fscache_alloc_object()
312 ret = fscache_alloc_object(cache, cookie->parent); fscache_alloc_object()
318 * attached to the cookie */ fscache_alloc_object()
319 if (fscache_attach_object(cookie, object) < 0) { fscache_alloc_object()
331 spin_unlock(&cookie->lock); fscache_alloc_object()
334 spin_unlock(&cookie->lock); fscache_alloc_object()
348 * attach a cache object to a cookie
350 static int fscache_attach_object(struct fscache_cookie *cookie, fscache_attach_object() argument
357 _enter("{%s},{OBJ%x}", cookie->def->name, object->debug_id); fscache_attach_object()
359 spin_lock(&cookie->lock); fscache_attach_object()
364 hlist_for_each_entry(p, &cookie->backing_objects, cookie_link) { fscache_attach_object()
373 spin_lock_nested(&cookie->parent->lock, 1); fscache_attach_object()
374 hlist_for_each_entry(p, &cookie->parent->backing_objects, fscache_attach_object()
379 spin_unlock(&cookie->parent->lock); fscache_attach_object()
389 spin_unlock(&cookie->parent->lock); fscache_attach_object()
398 /* attach to the cookie */ fscache_attach_object()
399 object->cookie = cookie; fscache_attach_object()
400 atomic_inc(&cookie->usage); fscache_attach_object()
401 hlist_add_head(&object->cookie_link, &cookie->backing_objects); fscache_attach_object()
407 spin_unlock(&cookie->lock); fscache_attach_object()
415 void __fscache_invalidate(struct fscache_cookie *cookie) __fscache_invalidate() argument
419 _enter("{%s}", cookie->def->name); __fscache_invalidate()
426 * cookie. __fscache_invalidate()
428 ASSERTCMP(cookie->def->type, ==, FSCACHE_COOKIE_TYPE_DATAFILE); __fscache_invalidate()
430 /* We will be updating the cookie too. */ __fscache_invalidate()
431 BUG_ON(!cookie->def->get_aux); __fscache_invalidate()
436 if (!hlist_empty(&cookie->backing_objects)) { __fscache_invalidate()
437 spin_lock(&cookie->lock); __fscache_invalidate()
439 if (fscache_cookie_enabled(cookie) && __fscache_invalidate()
440 !hlist_empty(&cookie->backing_objects) && __fscache_invalidate()
442 &cookie->flags)) { __fscache_invalidate()
443 object = hlist_entry(cookie->backing_objects.first, __fscache_invalidate()
451 spin_unlock(&cookie->lock); __fscache_invalidate()
461 void __fscache_wait_on_invalidate(struct fscache_cookie *cookie) __fscache_wait_on_invalidate() argument
463 _enter("%p", cookie); __fscache_wait_on_invalidate()
465 wait_on_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING, __fscache_wait_on_invalidate()
473 * update the index entries backing a cookie
475 void __fscache_update_cookie(struct fscache_cookie *cookie) __fscache_update_cookie() argument
481 if (!cookie) { __fscache_update_cookie()
483 _leave(" [no cookie]"); __fscache_update_cookie()
487 _enter("{%s}", cookie->def->name); __fscache_update_cookie()
489 BUG_ON(!cookie->def->get_aux); __fscache_update_cookie()
491 spin_lock(&cookie->lock); __fscache_update_cookie()
493 if (fscache_cookie_enabled(cookie)) { __fscache_update_cookie()
495 * cookie. __fscache_update_cookie()
498 &cookie->backing_objects, cookie_link) { __fscache_update_cookie()
503 spin_unlock(&cookie->lock); __fscache_update_cookie()
509 * Disable a cookie to stop it from accepting new requests from the netfs.
511 void __fscache_disable_cookie(struct fscache_cookie *cookie, bool invalidate) __fscache_disable_cookie() argument
516 _enter("%p,%u", cookie, invalidate); __fscache_disable_cookie()
518 ASSERTCMP(atomic_read(&cookie->n_active), >, 0); __fscache_disable_cookie()
520 if (atomic_read(&cookie->n_children) != 0) { __fscache_disable_cookie()
522 cookie->def->name); __fscache_disable_cookie()
526 wait_on_bit_lock(&cookie->flags, FSCACHE_COOKIE_ENABLEMENT_LOCK, __fscache_disable_cookie()
528 if (!test_and_clear_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags)) __fscache_disable_cookie()
531 /* If the cookie is being invalidated, wait for that to complete first __fscache_disable_cookie()
534 __fscache_wait_on_invalidate(cookie); __fscache_disable_cookie()
537 set_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags); __fscache_disable_cookie()
539 spin_lock(&cookie->lock); __fscache_disable_cookie()
540 if (!hlist_empty(&cookie->backing_objects)) { __fscache_disable_cookie()
541 hlist_for_each_entry(object, &cookie->backing_objects, cookie_link) { __fscache_disable_cookie()
547 if (test_and_clear_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) __fscache_disable_cookie()
550 spin_unlock(&cookie->lock); __fscache_disable_cookie()
552 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING); __fscache_disable_cookie()
558 if (!atomic_dec_and_test(&cookie->n_active)) __fscache_disable_cookie()
559 wait_on_atomic_t(&cookie->n_active, fscache_wait_atomic_t, __fscache_disable_cookie()
562 /* Reset the cookie state if it wasn't relinquished */ __fscache_disable_cookie()
563 if (!test_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags)) { __fscache_disable_cookie()
564 atomic_inc(&cookie->n_active); __fscache_disable_cookie()
565 set_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags); __fscache_disable_cookie()
569 clear_bit_unlock(FSCACHE_COOKIE_ENABLEMENT_LOCK, &cookie->flags); __fscache_disable_cookie()
570 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_ENABLEMENT_LOCK); __fscache_disable_cookie()
576 * release a cookie back to the cache
578 * - all dependents of this cookie must have already been unregistered
581 void __fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire) __fscache_relinquish_cookie() argument
587 if (!cookie) { __fscache_relinquish_cookie()
589 _leave(" [no cookie]"); __fscache_relinquish_cookie()
594 cookie, cookie->def->name, cookie->netfs_data, __fscache_relinquish_cookie()
595 atomic_read(&cookie->n_active), retire); __fscache_relinquish_cookie()
597 /* No further netfs-accessing operations on this cookie permitted */ __fscache_relinquish_cookie()
598 set_bit(FSCACHE_COOKIE_RELINQUISHED, &cookie->flags); __fscache_relinquish_cookie()
600 __fscache_disable_cookie(cookie, retire); __fscache_relinquish_cookie()
603 cookie->netfs_data = NULL; __fscache_relinquish_cookie()
604 cookie->def = NULL; __fscache_relinquish_cookie()
605 BUG_ON(cookie->stores.rnode); __fscache_relinquish_cookie()
607 if (cookie->parent) { __fscache_relinquish_cookie()
608 ASSERTCMP(atomic_read(&cookie->parent->usage), >, 0); __fscache_relinquish_cookie()
609 ASSERTCMP(atomic_read(&cookie->parent->n_children), >, 0); __fscache_relinquish_cookie()
610 atomic_dec(&cookie->parent->n_children); __fscache_relinquish_cookie()
613 /* Dispose of the netfs's link to the cookie */ __fscache_relinquish_cookie()
614 ASSERTCMP(atomic_read(&cookie->usage), >, 0); __fscache_relinquish_cookie()
615 fscache_cookie_put(cookie); __fscache_relinquish_cookie()
622 * destroy a cookie
624 void __fscache_cookie_put(struct fscache_cookie *cookie) __fscache_cookie_put() argument
628 _enter("%p", cookie); __fscache_cookie_put()
631 _debug("FREE COOKIE %p", cookie); __fscache_cookie_put()
632 parent = cookie->parent; __fscache_cookie_put()
633 BUG_ON(!hlist_empty(&cookie->backing_objects)); __fscache_cookie_put()
634 kmem_cache_free(fscache_cookie_jar, cookie); __fscache_cookie_put()
639 cookie = parent; __fscache_cookie_put()
640 BUG_ON(atomic_read(&cookie->usage) <= 0); __fscache_cookie_put()
641 if (!atomic_dec_and_test(&cookie->usage)) __fscache_cookie_put()
653 int __fscache_check_consistency(struct fscache_cookie *cookie) __fscache_check_consistency() argument
660 _enter("%p,", cookie); __fscache_check_consistency()
662 ASSERTCMP(cookie->def->type, ==, FSCACHE_COOKIE_TYPE_DATAFILE); __fscache_check_consistency()
664 if (fscache_wait_for_deferred_lookup(cookie) < 0) __fscache_check_consistency()
667 if (hlist_empty(&cookie->backing_objects)) __fscache_check_consistency()
679 spin_lock(&cookie->lock); __fscache_check_consistency()
681 if (!fscache_cookie_enabled(cookie) || __fscache_check_consistency()
682 hlist_empty(&cookie->backing_objects)) __fscache_check_consistency()
684 object = hlist_entry(cookie->backing_objects.first, __fscache_check_consistency()
691 __fscache_use_cookie(cookie); __fscache_check_consistency()
696 spin_unlock(&cookie->lock); __fscache_check_consistency()
713 wake_cookie = __fscache_unuse_cookie(cookie); __fscache_check_consistency()
715 spin_unlock(&cookie->lock); __fscache_check_consistency()
717 __fscache_wake_unused_cookie(cookie); __fscache_check_consistency()
278 fscache_alloc_object(struct fscache_cache *cache, struct fscache_cookie *cookie) fscache_alloc_object() argument
H A Dpage.c23 bool __fscache_check_page_write(struct fscache_cookie *cookie, struct page *page) __fscache_check_page_write() argument
28 val = radix_tree_lookup(&cookie->stores, page->index); __fscache_check_page_write()
38 void __fscache_wait_on_page_write(struct fscache_cookie *cookie, struct page *page) __fscache_wait_on_page_write() argument
40 wait_queue_head_t *wq = bit_waitqueue(&cookie->flags, 0); __fscache_wait_on_page_write()
42 wait_event(*wq, !__fscache_check_page_write(cookie, page)); __fscache_wait_on_page_write()
51 bool release_page_wait_timeout(struct fscache_cookie *cookie, struct page *page) release_page_wait_timeout() argument
53 wait_queue_head_t *wq = bit_waitqueue(&cookie->flags, 0); release_page_wait_timeout()
55 return wait_event_timeout(*wq, !__fscache_check_page_write(cookie, page), release_page_wait_timeout()
63 bool __fscache_maybe_release_page(struct fscache_cookie *cookie, __fscache_maybe_release_page() argument
70 _enter("%p,%p,%x", cookie, page, gfp); __fscache_maybe_release_page()
74 val = radix_tree_lookup(&cookie->stores, page->index); __fscache_maybe_release_page()
78 __fscache_uncache_page(cookie, page); __fscache_maybe_release_page()
84 if (radix_tree_tag_get(&cookie->stores, page->index, __fscache_maybe_release_page()
92 spin_lock(&cookie->stores_lock); __fscache_maybe_release_page()
95 if (radix_tree_tag_get(&cookie->stores, page->index, __fscache_maybe_release_page()
99 spin_unlock(&cookie->stores_lock); __fscache_maybe_release_page()
103 xpage = radix_tree_delete(&cookie->stores, page->index); __fscache_maybe_release_page()
104 spin_unlock(&cookie->stores_lock); __fscache_maybe_release_page()
114 wake_up_bit(&cookie->flags, 0); __fscache_maybe_release_page()
117 __fscache_uncache_page(cookie, page); __fscache_maybe_release_page()
131 if (!release_page_wait_timeout(cookie, page)) __fscache_maybe_release_page()
146 struct fscache_cookie *cookie; fscache_end_page_write() local
150 cookie = object->cookie; fscache_end_page_write()
151 if (cookie) { fscache_end_page_write()
154 spin_lock(&cookie->stores_lock); fscache_end_page_write()
155 radix_tree_tag_clear(&cookie->stores, page->index, fscache_end_page_write()
157 if (!radix_tree_tag_get(&cookie->stores, page->index, fscache_end_page_write()
160 xpage = radix_tree_delete(&cookie->stores, page->index); fscache_end_page_write()
162 spin_unlock(&cookie->stores_lock); fscache_end_page_write()
163 wake_up_bit(&cookie->flags, 0); fscache_end_page_write()
197 int __fscache_attr_changed(struct fscache_cookie *cookie) __fscache_attr_changed() argument
203 _enter("%p", cookie); __fscache_attr_changed()
205 ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); __fscache_attr_changed()
221 spin_lock(&cookie->lock); __fscache_attr_changed()
223 if (!fscache_cookie_enabled(cookie) || __fscache_attr_changed()
224 hlist_empty(&cookie->backing_objects)) __fscache_attr_changed()
226 object = hlist_entry(cookie->backing_objects.first, __fscache_attr_changed()
229 __fscache_use_cookie(cookie); __fscache_attr_changed()
232 spin_unlock(&cookie->lock); __fscache_attr_changed()
239 wake_cookie = __fscache_unuse_cookie(cookie); __fscache_attr_changed()
241 spin_unlock(&cookie->lock); __fscache_attr_changed()
244 __fscache_wake_unused_cookie(cookie); __fscache_attr_changed()
265 fscache_put_context(op->op.object->cookie, op->context); fscache_release_retrieval_op()
274 struct fscache_cookie *cookie, fscache_alloc_retrieval()
303 int fscache_wait_for_deferred_lookup(struct fscache_cookie *cookie) fscache_wait_for_deferred_lookup() argument
309 if (!test_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags)) { fscache_wait_for_deferred_lookup()
317 if (wait_on_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP, fscache_wait_for_deferred_lookup()
324 ASSERT(!test_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags)); fscache_wait_for_deferred_lookup()
399 int __fscache_read_or_alloc_page(struct fscache_cookie *cookie, __fscache_read_or_alloc_page() argument
410 _enter("%p,%p,,,", cookie, page); __fscache_read_or_alloc_page()
414 if (hlist_empty(&cookie->backing_objects)) __fscache_read_or_alloc_page()
417 if (test_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) { __fscache_read_or_alloc_page()
422 ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); __fscache_read_or_alloc_page()
425 if (fscache_wait_for_deferred_lookup(cookie) < 0) __fscache_read_or_alloc_page()
428 op = fscache_alloc_retrieval(cookie, page->mapping, __fscache_read_or_alloc_page()
436 spin_lock(&cookie->lock); __fscache_read_or_alloc_page()
438 if (!fscache_cookie_enabled(cookie) || __fscache_read_or_alloc_page()
439 hlist_empty(&cookie->backing_objects)) __fscache_read_or_alloc_page()
441 object = hlist_entry(cookie->backing_objects.first, __fscache_read_or_alloc_page()
446 __fscache_use_cookie(cookie); __fscache_read_or_alloc_page()
452 spin_unlock(&cookie->lock); __fscache_read_or_alloc_page()
458 fscache_get_context(object->cookie, op->context); __fscache_read_or_alloc_page()
471 if (test_bit(FSCACHE_COOKIE_NO_DATA_YET, &object->cookie->flags)) { __fscache_read_or_alloc_page()
501 wake_cookie = __fscache_unuse_cookie(cookie); __fscache_read_or_alloc_page()
503 spin_unlock(&cookie->lock); __fscache_read_or_alloc_page()
505 __fscache_wake_unused_cookie(cookie); __fscache_read_or_alloc_page()
532 int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie, __fscache_read_or_alloc_pages() argument
545 _enter("%p,,%d,,,", cookie, *nr_pages); __fscache_read_or_alloc_pages()
549 if (hlist_empty(&cookie->backing_objects)) __fscache_read_or_alloc_pages()
552 if (test_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) { __fscache_read_or_alloc_pages()
557 ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); __fscache_read_or_alloc_pages()
561 if (fscache_wait_for_deferred_lookup(cookie) < 0) __fscache_read_or_alloc_pages()
564 op = fscache_alloc_retrieval(cookie, mapping, end_io_func, context); __fscache_read_or_alloc_pages()
569 spin_lock(&cookie->lock); __fscache_read_or_alloc_pages()
571 if (!fscache_cookie_enabled(cookie) || __fscache_read_or_alloc_pages()
572 hlist_empty(&cookie->backing_objects)) __fscache_read_or_alloc_pages()
574 object = hlist_entry(cookie->backing_objects.first, __fscache_read_or_alloc_pages()
577 __fscache_use_cookie(cookie); __fscache_read_or_alloc_pages()
583 spin_unlock(&cookie->lock); __fscache_read_or_alloc_pages()
589 fscache_get_context(object->cookie, op->context); __fscache_read_or_alloc_pages()
602 if (test_bit(FSCACHE_COOKIE_NO_DATA_YET, &object->cookie->flags)) { __fscache_read_or_alloc_pages()
632 wake_cookie = __fscache_unuse_cookie(cookie); __fscache_read_or_alloc_pages()
634 spin_unlock(&cookie->lock); __fscache_read_or_alloc_pages()
637 __fscache_wake_unused_cookie(cookie); __fscache_read_or_alloc_pages()
653 int __fscache_alloc_page(struct fscache_cookie *cookie, __fscache_alloc_page() argument
662 _enter("%p,%p,,,", cookie, page); __fscache_alloc_page()
666 if (hlist_empty(&cookie->backing_objects)) __fscache_alloc_page()
669 ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); __fscache_alloc_page()
672 if (test_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) { __fscache_alloc_page()
677 if (fscache_wait_for_deferred_lookup(cookie) < 0) __fscache_alloc_page()
680 op = fscache_alloc_retrieval(cookie, page->mapping, NULL, NULL); __fscache_alloc_page()
685 spin_lock(&cookie->lock); __fscache_alloc_page()
687 if (!fscache_cookie_enabled(cookie) || __fscache_alloc_page()
688 hlist_empty(&cookie->backing_objects)) __fscache_alloc_page()
690 object = hlist_entry(cookie->backing_objects.first, __fscache_alloc_page()
693 __fscache_use_cookie(cookie); __fscache_alloc_page()
696 spin_unlock(&cookie->lock); __fscache_alloc_page()
726 wake_cookie = __fscache_unuse_cookie(cookie); __fscache_alloc_page()
728 spin_unlock(&cookie->lock); __fscache_alloc_page()
731 __fscache_wake_unused_cookie(cookie); __fscache_alloc_page()
743 void __fscache_readpages_cancel(struct fscache_cookie *cookie, __fscache_readpages_cancel() argument
750 __fscache_uncache_page(cookie, page); list_for_each_entry()
771 struct fscache_cookie *cookie; fscache_write_op() local
780 cookie = object->cookie; fscache_write_op()
792 if (!cookie) { fscache_write_op()
793 /* If we get here, then the cookie belonging to the object was fscache_write_op()
794 * detached, probably by the cookie being withdrawn due to fscache_write_op()
807 spin_lock(&cookie->stores_lock); fscache_write_op()
813 n = radix_tree_gang_lookup_tag(&cookie->stores, results, 0, 1, fscache_write_op()
824 radix_tree_tag_set(&cookie->stores, page->index, fscache_write_op()
826 radix_tree_tag_clear(&cookie->stores, page->index, fscache_write_op()
829 spin_unlock(&cookie->stores_lock); fscache_write_op()
851 spin_unlock(&cookie->stores_lock); fscache_write_op()
861 void fscache_invalidate_writes(struct fscache_cookie *cookie) fscache_invalidate_writes() argument
870 spin_lock(&cookie->stores_lock); fscache_invalidate_writes()
871 n = radix_tree_gang_lookup_tag(&cookie->stores, results, 0, fscache_invalidate_writes()
875 spin_unlock(&cookie->stores_lock); fscache_invalidate_writes()
881 radix_tree_delete(&cookie->stores, page->index); fscache_invalidate_writes()
884 spin_unlock(&cookie->stores_lock); fscache_invalidate_writes()
900 * if the cookie still has a backing object at this point, that object can be
922 int __fscache_write_page(struct fscache_cookie *cookie, __fscache_write_page() argument
931 _enter("%p,%x,", cookie, (u32) page->flags); __fscache_write_page()
933 ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); __fscache_write_page()
938 if (test_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) { __fscache_write_page()
958 spin_lock(&cookie->lock); __fscache_write_page()
960 if (!fscache_cookie_enabled(cookie) || __fscache_write_page()
961 hlist_empty(&cookie->backing_objects)) __fscache_write_page()
963 object = hlist_entry(cookie->backing_objects.first, __fscache_write_page()
971 spin_lock(&cookie->stores_lock); __fscache_write_page()
975 ret = radix_tree_insert(&cookie->stores, page->index, page); __fscache_write_page()
983 radix_tree_tag_set(&cookie->stores, page->index, __fscache_write_page()
992 spin_unlock(&cookie->stores_lock); __fscache_write_page()
998 __fscache_use_cookie(cookie); __fscache_write_page()
1002 spin_unlock(&cookie->lock); __fscache_write_page()
1015 spin_unlock(&cookie->stores_lock); __fscache_write_page()
1017 spin_unlock(&cookie->lock); __fscache_write_page()
1025 spin_lock(&cookie->stores_lock); __fscache_write_page()
1026 radix_tree_delete(&cookie->stores, page->index); __fscache_write_page()
1027 spin_unlock(&cookie->stores_lock); __fscache_write_page()
1028 wake_cookie = __fscache_unuse_cookie(cookie); __fscache_write_page()
1034 spin_unlock(&cookie->stores_lock); __fscache_write_page()
1037 spin_unlock(&cookie->lock); __fscache_write_page()
1041 __fscache_wake_unused_cookie(cookie); __fscache_write_page()
1058 void __fscache_uncache_page(struct fscache_cookie *cookie, struct page *page) __fscache_uncache_page() argument
1064 ASSERTCMP(cookie->def->type, !=, FSCACHE_COOKIE_TYPE_INDEX); __fscache_uncache_page()
1074 spin_lock(&cookie->lock); __fscache_uncache_page()
1076 if (hlist_empty(&cookie->backing_objects)) { __fscache_uncache_page()
1081 object = hlist_entry(cookie->backing_objects.first, __fscache_uncache_page()
1085 clear_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags); __fscache_uncache_page()
1091 /* the cache backend releases the cookie lock */ __fscache_uncache_page()
1099 spin_unlock(&cookie->lock); __fscache_uncache_page()
1115 struct fscache_cookie *cookie = op->op.object->cookie; fscache_mark_page_cached() local
1127 cookie->def->name, page->index); fscache_mark_page_cached()
1131 if (cookie->def->mark_page_cached) fscache_mark_page_cached()
1132 cookie->def->mark_page_cached(cookie->netfs_data, fscache_mark_page_cached()
1159 * to be associated with the given cookie.
1161 void __fscache_uncache_all_inode_pages(struct fscache_cookie *cookie, __fscache_uncache_all_inode_pages() argument
1169 _enter("%p,%p", cookie, inode); __fscache_uncache_all_inode_pages()
1185 __fscache_wait_on_page_write(cookie, page); __fscache_uncache_all_inode_pages()
1186 __fscache_uncache_page(cookie, page); __fscache_uncache_all_inode_pages()
273 fscache_alloc_retrieval( struct fscache_cookie *cookie, struct address_space *mapping, fscache_rw_complete_t end_io_func, void *context) fscache_alloc_retrieval() argument
H A DMakefile7 cookie.o \
H A Dobject.c283 * @cookie: Cookie object will be attached to
292 struct fscache_cookie *cookie, fscache_object_init()
315 object->cookie = cookie; fscache_object_init()
432 struct fscache_cookie *cookie = object->cookie; fscache_look_up_object() local
455 cookie->def->name, object->cache->tag->name); fscache_look_up_object()
482 * fscache_object_lookup_negative - Note negative cookie lookup
483 * @object: Object pointing to cookie to mark
490 struct fscache_cookie *cookie = object->cookie; fscache_object_lookup_negative() local
500 set_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags); fscache_object_lookup_negative()
501 clear_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags); fscache_object_lookup_negative()
503 _debug("wake up lookup %p", &cookie->flags); fscache_object_lookup_negative()
504 clear_bit_unlock(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags); fscache_object_lookup_negative()
505 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP); fscache_object_lookup_negative()
513 * @object: Object pointing to cookie to mark
518 * Note that after calling this, an object's cookie may be relinquished by the
523 struct fscache_cookie *cookie = object->cookie; fscache_obtained_object() local
533 clear_bit_unlock(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags); fscache_obtained_object()
534 clear_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags); fscache_obtained_object()
539 clear_bit_unlock(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags); fscache_obtained_object()
540 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP); fscache_obtained_object()
603 struct fscache_cookie *cookie; fscache_lookup_failure() local
613 cookie = object->cookie; fscache_lookup_failure()
614 set_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags); fscache_lookup_failure()
615 if (test_and_clear_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags)) fscache_lookup_failure()
616 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP); fscache_lookup_failure()
673 struct fscache_cookie *cookie = object->cookie; fscache_drop_object() local
679 ASSERT(cookie != NULL); fscache_drop_object()
682 /* Make sure the cookie no longer points here and that the netfs isn't fscache_drop_object()
685 spin_lock(&cookie->lock); fscache_drop_object()
687 if (hlist_empty(&cookie->backing_objects) && fscache_drop_object()
688 test_and_clear_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) fscache_drop_object()
690 spin_unlock(&cookie->lock); fscache_drop_object()
693 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING); fscache_drop_object()
764 /* We can get rid of the cookie now */ fscache_object_destroy()
765 fscache_cookie_put(object->cookie); fscache_object_destroy()
766 object->cookie = NULL; fscache_object_destroy()
880 * The caller must be holding a ref on cookie->n_active (held by
889 if (!object->cookie->def->check_aux) { fscache_check_aux()
894 result = object->cookie->def->check_aux(object->cookie->netfs_data, fscache_check_aux()
927 struct fscache_cookie *cookie = object->cookie; _fscache_invalidate_object() local
931 /* We're going to need the cookie. If the cookie is not available then _fscache_invalidate_object()
935 ASSERT(object->cookie->stores.rnode == NULL); _fscache_invalidate_object()
937 _leave(" [no cookie]"); _fscache_invalidate_object()
942 fscache_invalidate_writes(cookie); _fscache_invalidate_object()
956 spin_lock(&cookie->lock); _fscache_invalidate_object()
959 spin_unlock(&cookie->lock); _fscache_invalidate_object()
966 set_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags); _fscache_invalidate_object()
971 if (test_and_clear_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags)) _fscache_invalidate_object()
972 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING); _fscache_invalidate_object()
984 spin_unlock(&cookie->lock); _fscache_invalidate_object()
291 fscache_object_init(struct fscache_object *object, struct fscache_cookie *cookie, struct fscache_cache *cache) fscache_object_init() argument
H A Dcache.c95 struct fscache_cookie *cookie) fscache_select_cache_for_object()
109 spin_lock(&cookie->lock); fscache_select_cache_for_object()
113 if (!hlist_empty(&cookie->backing_objects)) { fscache_select_cache_for_object()
114 object = hlist_entry(cookie->backing_objects.first, fscache_select_cache_for_object()
122 spin_unlock(&cookie->lock); fscache_select_cache_for_object()
128 if (cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) { fscache_select_cache_for_object()
129 /* cookie not an index and is unbacked */ fscache_select_cache_for_object()
130 spin_unlock(&cookie->lock); fscache_select_cache_for_object()
131 _leave(" = NULL [cookie ub,ni]"); fscache_select_cache_for_object()
135 spin_unlock(&cookie->lock); fscache_select_cache_for_object()
137 if (!cookie->def->select_cache) fscache_select_cache_for_object()
141 tag = cookie->def->select_cache(cookie->parent->netfs_data, fscache_select_cache_for_object()
142 cookie->netfs_data); fscache_select_cache_for_object()
251 ifsdef->cookie = &fscache_fsdef_index; fscache_add_cache()
271 * cookie as a known backing object */ fscache_add_cache()
342 _debug("withdraw %p", object->cookie); fscache_withdraw_all_objects()
374 /* make the cache unavailable for cookie acquisition */ fscache_withdraw_cache()
94 fscache_select_cache_for_object( struct fscache_cookie *cookie) fscache_select_cache_for_object() argument
H A Dinternal.h15 * - cookie->lock
16 * - cookie->parent->lock
20 * - cookie->stores_lock
47 * cookie.c
313 * drop a reference to a cookie
315 static inline void fscache_cookie_put(struct fscache_cookie *cookie) fscache_cookie_put() argument
317 BUG_ON(atomic_read(&cookie->usage) <= 0); fscache_cookie_put()
318 if (atomic_dec_and_test(&cookie->usage)) fscache_cookie_put()
319 __fscache_cookie_put(cookie); fscache_cookie_put()
326 void *fscache_get_context(struct fscache_cookie *cookie, void *context) fscache_get_context() argument
328 if (cookie->def->get_context) fscache_get_context()
329 cookie->def->get_context(cookie->netfs_data, context); fscache_get_context()
337 void fscache_put_context(struct fscache_cookie *cookie, void *context) fscache_put_context() argument
339 if (cookie->def->put_context) fscache_put_context()
340 cookie->def->put_context(cookie->netfs_data, context); fscache_put_context()
H A Dobject-list.c170 struct fscache_cookie *cookie; fscache_objlist_show() local
219 cookie = obj->cookie; fscache_objlist_show()
221 FILTER(cookie->def, fscache_objlist_show()
257 switch (cookie->def->type) { fscache_objlist_show()
265 sprintf(_type, "%02u", cookie->def->type); fscache_objlist_show()
271 cookie->def->name, fscache_objlist_show()
273 cookie->flags, fscache_objlist_show()
274 cookie->netfs_data); fscache_objlist_show()
276 if (cookie->def->get_key && fscache_objlist_show()
278 keylen = cookie->def->get_key(cookie->netfs_data, fscache_objlist_show()
281 if (cookie->def->get_aux && fscache_objlist_show()
283 auxlen = cookie->def->get_aux(cookie->netfs_data, fscache_objlist_show()
H A Dmain.c29 "Defer cookie lookup to background thread");
35 "Defer cookie creation to background thread");
149 pr_notice("Failed to allocate a cookie jar\n"); fscache_init()
H A Dnetfs.c31 /* allocate a cookie for the primary index */ __fscache_register_netfs()
40 /* initialise the primary index cookie */ __fscache_register_netfs()
/linux-4.1.27/include/linux/
H A Dfscache.h28 #define fscache_cookie_valid(cookie) (cookie)
31 #define fscache_cookie_valid(cookie) (0)
65 * fscache cookie definition
68 /* name of cookie type */
71 /* cookie type */
90 * - the netfs data from the cookie being used as the source is
100 * - the netfs data from the cookie being used as the source is
110 * - the netfs data from the cookie being used as the source is
119 * - the netfs data from the cookie being used as the target is
147 /* indicate the cookie is no longer cached
149 * a cookie is removed
170 * data file or index object cookie
177 atomic_t usage; /* number of users of this cookie */
178 atomic_t n_children; /* number of children of this cookie */
186 struct radix_tree_root stores; /* pages to be stored on this cookie */
191 #define FSCACHE_COOKIE_LOOKING_UP 0 /* T if non-index cookie being looked up still */
193 #define FSCACHE_COOKIE_UNAVAILABLE 2 /* T if cookie is unavailable (error, etc) */
194 #define FSCACHE_COOKIE_INVALIDATING 3 /* T if cookie is being invalidated */
195 #define FSCACHE_COOKIE_RELINQUISHED 4 /* T if cookie has been relinquished */
196 #define FSCACHE_COOKIE_ENABLED 5 /* T if cookie is enabled */
197 #define FSCACHE_COOKIE_ENABLEMENT_LOCK 6 /* T if cookie is being en/disabled */
200 static inline bool fscache_cookie_enabled(struct fscache_cookie *cookie) fscache_cookie_enabled() argument
202 return test_bit(FSCACHE_COOKIE_ENABLED, &cookie->flags); fscache_cookie_enabled()
248 extern void __fscache_readpages_cancel(struct fscache_cookie *cookie,
326 * fscache_acquire_cookie - Acquire a cookie to represent a cache object
327 * @parent: The cookie that's to be the parent of this one
329 * @netfs_data: An arbitrary piece of data to be kept in the cookie to
331 * @enable: Whether or not to enable a data cookie immediately
334 * that can be used to locate files. This is done by requesting a cookie for
355 * fscache_relinquish_cookie - Return the cookie to the cache, maybe discarding
357 * @cookie: The cookie being returned
358 * @retire: True if the cache object the cookie represents is to be discarded
360 * This function returns a cookie to the cache, forcibly discarding the
367 void fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire) fscache_relinquish_cookie() argument
369 if (fscache_cookie_valid(cookie)) fscache_relinquish_cookie()
370 __fscache_relinquish_cookie(cookie, retire); fscache_relinquish_cookie()
375 * @cookie: The cookie representing the cache object
384 int fscache_check_consistency(struct fscache_cookie *cookie) fscache_check_consistency() argument
386 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_check_consistency()
387 return __fscache_check_consistency(cookie); fscache_check_consistency()
394 * @cookie: The cookie representing the cache object
397 * cookie.
403 void fscache_update_cookie(struct fscache_cookie *cookie) fscache_update_cookie() argument
405 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_update_cookie()
406 __fscache_update_cookie(cookie); fscache_update_cookie()
411 * @cookie: The cookie representing the cache object
419 int fscache_pin_cookie(struct fscache_cookie *cookie) fscache_pin_cookie() argument
426 * @cookie: The cookie representing the cache object
434 void fscache_unpin_cookie(struct fscache_cookie *cookie) fscache_unpin_cookie() argument
440 * @cookie: The cookie representing the cache object
444 * through the get_attr() cookie definition op.
450 int fscache_attr_changed(struct fscache_cookie *cookie) fscache_attr_changed() argument
452 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_attr_changed()
453 return __fscache_attr_changed(cookie); fscache_attr_changed()
460 * @cookie: The cookie representing the cache object
472 void fscache_invalidate(struct fscache_cookie *cookie) fscache_invalidate() argument
474 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_invalidate()
475 __fscache_invalidate(cookie); fscache_invalidate()
480 * @cookie: The cookie representing the cache object
488 void fscache_wait_on_invalidate(struct fscache_cookie *cookie) fscache_wait_on_invalidate() argument
490 if (fscache_cookie_valid(cookie)) fscache_wait_on_invalidate()
491 __fscache_wait_on_invalidate(cookie); fscache_wait_on_invalidate()
496 * @cookie: The cookie representing the cache object
500 * cookie so that a write to that object within the space can always be
507 int fscache_reserve_space(struct fscache_cookie *cookie, loff_t size) fscache_reserve_space() argument
515 * @cookie: The cookie representing the cache object
542 int fscache_read_or_alloc_page(struct fscache_cookie *cookie, fscache_read_or_alloc_page() argument
548 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_read_or_alloc_page()
549 return __fscache_read_or_alloc_page(cookie, page, end_io_func, fscache_read_or_alloc_page()
558 * @cookie: The cookie representing the cache object
591 int fscache_read_or_alloc_pages(struct fscache_cookie *cookie, fscache_read_or_alloc_pages() argument
599 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_read_or_alloc_pages()
600 return __fscache_read_or_alloc_pages(cookie, mapping, pages, fscache_read_or_alloc_pages()
609 * @cookie: The cookie representing the cache object
626 int fscache_alloc_page(struct fscache_cookie *cookie, fscache_alloc_page() argument
630 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_alloc_page()
631 return __fscache_alloc_page(cookie, page, gfp); fscache_alloc_page()
638 * @cookie: The cookie representing the inode's cache object.
649 void fscache_readpages_cancel(struct fscache_cookie *cookie, fscache_readpages_cancel() argument
652 if (fscache_cookie_valid(cookie)) fscache_readpages_cancel()
653 __fscache_readpages_cancel(cookie, pages); fscache_readpages_cancel()
658 * @cookie: The cookie representing the cache object
675 int fscache_write_page(struct fscache_cookie *cookie, fscache_write_page() argument
679 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_write_page()
680 return __fscache_write_page(cookie, page, gfp); fscache_write_page()
687 * @cookie: The cookie representing the cache object
700 void fscache_uncache_page(struct fscache_cookie *cookie, fscache_uncache_page() argument
703 if (fscache_cookie_valid(cookie)) fscache_uncache_page()
704 __fscache_uncache_page(cookie, page); fscache_uncache_page()
709 * @cookie: The cookie representing the cache object
718 bool fscache_check_page_write(struct fscache_cookie *cookie, fscache_check_page_write() argument
721 if (fscache_cookie_valid(cookie)) fscache_check_page_write()
722 return __fscache_check_page_write(cookie, page); fscache_check_page_write()
728 * @cookie: The cookie representing the cache object
738 void fscache_wait_on_page_write(struct fscache_cookie *cookie, fscache_wait_on_page_write() argument
741 if (fscache_cookie_valid(cookie)) fscache_wait_on_page_write()
742 __fscache_wait_on_page_write(cookie, page); fscache_wait_on_page_write()
747 * @cookie: The cookie representing the cache object
761 bool fscache_maybe_release_page(struct fscache_cookie *cookie, fscache_maybe_release_page() argument
765 if (fscache_cookie_valid(cookie) && PageFsCache(page)) fscache_maybe_release_page()
766 return __fscache_maybe_release_page(cookie, page, gfp); fscache_maybe_release_page()
772 * @cookie: The cookie representing the inode's cache object.
776 * to be associated with the given cookie.
782 void fscache_uncache_all_inode_pages(struct fscache_cookie *cookie, fscache_uncache_all_inode_pages() argument
785 if (fscache_cookie_valid(cookie)) fscache_uncache_all_inode_pages()
786 __fscache_uncache_all_inode_pages(cookie, inode); fscache_uncache_all_inode_pages()
790 * fscache_disable_cookie - Disable a cookie
791 * @cookie: The cookie representing the cache object
794 * Disable a cookie from accepting further alloc, read, write, invalidate,
796 * upon and pages can still be uncached and the cookie relinquished.
804 void fscache_disable_cookie(struct fscache_cookie *cookie, bool invalidate) fscache_disable_cookie() argument
806 if (fscache_cookie_valid(cookie) && fscache_cookie_enabled(cookie)) fscache_disable_cookie()
807 __fscache_disable_cookie(cookie, invalidate); fscache_disable_cookie()
811 * fscache_enable_cookie - Reenable a cookie
812 * @cookie: The cookie representing the cache object
816 * Reenable a previously disabled cookie, allowing it to accept further alloc,
818 * made to immediately reattach the cookie to a backing object.
824 void fscache_enable_cookie(struct fscache_cookie *cookie, fscache_enable_cookie() argument
828 if (fscache_cookie_valid(cookie) && !fscache_cookie_enabled(cookie)) fscache_enable_cookie()
829 __fscache_enable_cookie(cookie, can_enable, data); fscache_enable_cookie()
H A Ddcookies.h4 * Persistent cookie-path mappings
40 * a cookie value.
45 * Returns 0 on success, with *cookie filled in
47 int get_dcookie(struct path *path, unsigned long *cookie);
61 static inline int get_dcookie(struct path *path, unsigned long *cookie) get_dcookie() argument
H A Dsock_diag.h22 int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie);
23 void sock_diag_save_cookie(struct sock *sk, __u32 *cookie);
H A Dasync.h19 typedef void (*async_func_t) (void *data, async_cookie_t cookie);
46 extern void async_synchronize_cookie(async_cookie_t cookie);
47 extern void async_synchronize_cookie_domain(async_cookie_t cookie,
H A Dfscache-cache.h233 /* allocate an object record for a cookie */
235 struct fscache_cookie *cookie);
237 /* look up the object for a cookie
255 * cookie */
301 * - must release the cookie lock before returning
376 struct hlist_node cookie_link; /* link in cookie->backing_objects */
378 struct fscache_cookie *cookie; /* netfs's file/index object */ member in struct:fscache_object
485 static inline void __fscache_use_cookie(struct fscache_cookie *cookie) __fscache_use_cookie() argument
487 atomic_inc(&cookie->n_active); __fscache_use_cookie()
491 * fscache_use_cookie - Request usage of cookie attached to an object
494 * Request usage of the cookie attached to an object. NULL is returned if the
495 * relinquishment had reduced the cookie usage count to 0.
499 struct fscache_cookie *cookie = object->cookie; fscache_use_cookie() local
500 return atomic_inc_not_zero(&cookie->n_active) != 0; fscache_use_cookie()
503 static inline bool __fscache_unuse_cookie(struct fscache_cookie *cookie) __fscache_unuse_cookie() argument
505 return atomic_dec_and_test(&cookie->n_active); __fscache_unuse_cookie()
508 static inline void __fscache_wake_unused_cookie(struct fscache_cookie *cookie) __fscache_wake_unused_cookie() argument
510 wake_up_atomic_t(&cookie->n_active); __fscache_wake_unused_cookie()
514 * fscache_unuse_cookie - Cease usage of cookie attached to an object
517 * Cease usage of the cookie attached to an object. When the users count
518 * reaches zero then the cookie relinquishment will be permitted to proceed.
522 struct fscache_cookie *cookie = object->cookie; fscache_unuse_cookie() local
523 if (__fscache_unuse_cookie(cookie)) fscache_unuse_cookie()
524 __fscache_wake_unused_cookie(cookie); fscache_unuse_cookie()
H A Ddmaengine.h30 * typedef dma_cookie_t - an opaque DMA cookie
32 * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code
37 static inline int dma_submit_error(dma_cookie_t cookie) dma_submit_error() argument
39 return cookie < 0 ? cookie : 0; dma_submit_error()
227 * @cookie: last cookie value returned to client
228 * @completed_cookie: last completed cookie for this channel
239 dma_cookie_t cookie; member in struct:dma_chan
423 * @cookie: tracking cookie for this transaction, set to -EBUSY if
429 * @tx_submit: accept the descriptor, assign ordered cookie and mark the
439 dma_cookie_t cookie; member in struct:dma_async_tx_descriptor
440 enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */
549 * @last: last completed DMA cookie
550 * @used: last issued DMA cookie (i.e. the one in progress)
680 dma_cookie_t cookie,
783 dma_cookie_t cookie, struct dma_tx_state *state) dmaengine_tx_status()
785 return chan->device->device_tx_status(chan, cookie, state); dmaengine_tx_status()
975 * @cookie: transaction identifier to check status of
976 * @last: returns last completed cookie, can be NULL
977 * @used: returns last issued cookie, can be NULL
984 dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) dma_async_is_tx_complete()
989 status = chan->device->device_tx_status(chan, cookie, &state); dma_async_is_tx_complete()
998 * dma_async_is_complete - test a cookie against chan state
999 * @cookie: transaction identifier to test status of
1001 * @last_used: last cookie value handed out
1006 static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie, dma_async_is_complete() argument
1010 if ((cookie <= last_complete) || (cookie > last_used)) dma_async_is_complete()
1013 if ((cookie <= last_complete) && (cookie > last_used)) dma_async_is_complete()
1031 enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
1046 static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie) dma_sync_wait() argument
782 dmaengine_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *state) dmaengine_tx_status() argument
983 dma_async_is_tx_complete(struct dma_chan *chan, dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) dma_async_is_tx_complete() argument
H A Dvgaarb.h217 * @cookie: client cookie to be used in callbacks
242 int vga_client_register(struct pci_dev *pdev, void *cookie,
243 void (*irq_set_state)(void *cookie, bool state),
244 unsigned int (*set_vga_decode)(void *cookie, bool state));
246 static inline int vga_client_register(struct pci_dev *pdev, void *cookie, vga_client_register() argument
247 void (*irq_set_state)(void *cookie, bool state), vga_client_register()
248 unsigned int (*set_vga_decode)(void *cookie, bool state)) vga_client_register()
H A Dpps_kernel.h104 /* Look up a pps device by magic cookie */
105 struct pps_device *pps_lookup_dev(void const *cookie);
H A Dmic_bus.h74 * struct mic_irq - opaque pointer used as cookie
88 struct mic_irq *cookie, void *data);
H A Draid_class.h15 void *cookie; member in struct:raid_function_template
H A Dsplice.h36 void *data; /* cookie */
/linux-4.1.27/arch/unicore32/include/asm/
H A Dio.h37 #define ioremap(cookie, size) __uc32_ioremap(cookie, size)
38 #define ioremap_cached(cookie, size) __uc32_ioremap_cached(cookie, size)
39 #define ioremap_nocache(cookie, size) __uc32_ioremap(cookie, size)
40 #define iounmap(cookie) __uc32_iounmap(cookie)
/linux-4.1.27/arch/arm/mach-iop13xx/
H A Dio.c26 static void __iomem *__iop13xx_ioremap_caller(phys_addr_t cookie, __iop13xx_ioremap_caller() argument
31 switch (cookie) { __iop13xx_ioremap_caller()
37 (cookie - IOP13XX_PCIX_LOWER_MEM_RA)); __iop13xx_ioremap_caller()
44 (cookie - IOP13XX_PCIE_LOWER_MEM_RA)); __iop13xx_ioremap_caller()
48 (cookie - IOP13XX_PBI_LOWER_MEM_RA), __iop13xx_ioremap_caller()
52 retval = IOP13XX_PMMR_PHYS_TO_VIRT(cookie); __iop13xx_ioremap_caller()
55 retval = __arm_ioremap_caller(cookie, size, mtype, __iop13xx_ioremap_caller()
/linux-4.1.27/fs/nfs/
H A Dfscache.c32 * Get the per-client index cookie for an NFS client if the appropriate mount
34 * - We always try and get an index cookie for the client, but get filehandle
43 dfprintk(FSCACHE, "NFS: get client cookie (0x%p/0x%p)\n", nfs_fscache_get_client_cookie()
48 * Dispose of a per-client cookie
52 dfprintk(FSCACHE, "NFS: releasing client cookie (0x%p/0x%p)\n", nfs_fscache_release_client_cookie()
60 * Get the cache cookie for an NFS superblock. We have to handle
143 dfprintk(FSCACHE, "NFS: get superblock cookie (0x%p/0x%p)\n", nfs_fscache_get_super_cookie()
157 * release a per-superblock cookie
163 dfprintk(FSCACHE, "NFS: releasing superblock cookie (0x%p/0x%p)\n", nfs_fscache_release_super_cookie()
179 * Initialise the per-inode cache cookie pointer for an NFS inode.
194 * Release a per-inode cookie.
199 struct fscache_cookie *cookie = nfs_i_fscache(inode); nfs_fscache_clear_inode() local
201 dfprintk(FSCACHE, "NFS: clear cookie (0x%p/0x%p)\n", nfsi, cookie); nfs_fscache_clear_inode()
203 fscache_relinquish_cookie(cookie, false); nfs_fscache_clear_inode()
216 * The cookie is allocated when the inode is initialised, but is not enabled at
236 struct fscache_cookie *cookie = nfs_i_fscache(inode); nfs_fscache_open_file() local
238 if (!fscache_cookie_valid(cookie)) nfs_fscache_open_file()
244 fscache_disable_cookie(cookie, true); nfs_fscache_open_file()
245 fscache_uncache_all_inode_pages(cookie, inode); nfs_fscache_open_file()
248 fscache_enable_cookie(cookie, nfs_fscache_can_enable, inode); nfs_fscache_open_file()
249 if (fscache_cookie_enabled(cookie)) nfs_fscache_open_file()
263 struct fscache_cookie *cookie = nfs_i_fscache(page->mapping->host); nfs_fscache_release_page() local
265 BUG_ON(!cookie); nfs_fscache_release_page()
267 cookie, page, NFS_I(page->mapping->host)); nfs_fscache_release_page()
269 if (!fscache_maybe_release_page(cookie, page, gfp)) nfs_fscache_release_page()
285 struct fscache_cookie *cookie = nfs_i_fscache(inode); __nfs_fscache_invalidate_page() local
287 BUG_ON(!cookie); __nfs_fscache_invalidate_page()
290 cookie, page, NFS_I(inode)); __nfs_fscache_invalidate_page()
292 fscache_wait_on_page_write(cookie, page); __nfs_fscache_invalidate_page()
295 fscache_uncache_page(cookie, page); __nfs_fscache_invalidate_page()
H A Dfscache-index.c27 * the cookie for the top-level index object for NFS into here. The top-level
184 * - The netfs data from the cookie being used as the source is presented
200 * - The netfs data from the cookie being used as the source is presented
226 * - The netfs data from the cookie being used as the target is
255 * Indication from FS-Cache that the cookie is no longer cached
256 * - This function is called when the backing store currently caching a cookie
H A Ddir.c141 u64 cookie; member in struct:nfs_cache_array_entry
246 cache_entry->cookie = entry->prev_cookie; nfs_readdir_add_to_array()
252 array->last_cookie = entry->cookie; nfs_readdir_add_to_array()
276 *desc->dir_cookie = array->array[index].cookie; nfs_readdir_search_for_pos()
301 if (array->array[i].cookie == *desc->dir_cookie) { nfs_readdir_search_for_cookie()
316 "The file: %.*s has duplicate cookie %llu\n", nfs_readdir_search_for_cookie()
380 error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, entry->cookie, pages, nfs_readdir_xdr_filler()
634 entry.cookie = desc->last_cookie; nfs_readdir_xdr_to_array()
792 *desc->dir_cookie = array->array[i+1].cookie; nfs_do_filldir()
804 dfprintk(DIRCACHE, "NFS: nfs_do_filldir() filling ended @ cookie %Lu; returning = %d\n", nfs_do_filldir()
810 * If we cannot find a cookie in our cache, we suspect that this is
829 dfprintk(DIRCACHE, "NFS: uncached_readdir() searching for cookie %Lu\n", uncached_readdir()
870 last cookie cache takes care of the common case of reading the
882 dfprintk(FILE, "NFS: readdir(%pD2) starting at cookie %llu\n", nfs_readdir()
888 * *desc->dir_cookie has the cookie for the next entry. We have nfs_readdir()
890 * revalidate the cookie. nfs_readdir()
913 /* Or that the server has 'lost' a cookie */ nfs_readdir()
H A Dnfs3xdr.c279 static __be32 *xdr_encode_cookie3(__be32 *p, u64 cookie) xdr_encode_cookie3() argument
281 return xdr_encode_hyper(p, cookie); xdr_encode_cookie3()
284 static int decode_cookie3(struct xdr_stream *xdr, u64 *cookie) decode_cookie3() argument
286 return decode_uint64(xdr, cookie); decode_cookie3()
1222 * cookie3 cookie;
1235 p = xdr_encode_cookie3(p, args->cookie); encode_readdir3args()
1254 * cookie3 cookie;
1268 p = xdr_encode_cookie3(p, args->cookie); encode_readdirplus3args()
1931 * cookie3 cookie;
1941 * cookie3 cookie;
1975 entry->prev_cookie = entry->cookie; nfs3_decode_dirent()
1976 error = decode_cookie3(xdr, &entry->cookie); nfs3_decode_dirent()
/linux-4.1.27/drivers/iommu/
H A Dio-pgtable.c45 void *cookie) alloc_io_pgtable_ops()
57 iop = fns->alloc(cfg, cookie); alloc_io_pgtable_ops()
62 iop->cookie = cookie; alloc_io_pgtable_ops()
80 iop->cfg.tlb->tlb_flush_all(iop->cookie); free_io_pgtable_ops()
43 alloc_io_pgtable_ops(enum io_pgtable_fmt fmt, struct io_pgtable_cfg *cfg, void *cookie) alloc_io_pgtable_ops() argument
H A Dio-pgtable.h27 void (*tlb_flush_all)(void *cookie);
29 void *cookie);
30 void (*tlb_sync)(void *cookie);
31 void (*flush_pgtable)(void *ptr, size_t size, void *cookie);
94 * @cookie: An opaque token provided by the IOMMU driver and passed back to
99 void *cookie);
119 * @cookie: An opaque token provided by the IOMMU driver and passed back to
126 void *cookie; member in struct:io_pgtable
139 struct io_pgtable *(*alloc)(struct io_pgtable_cfg *cfg, void *cookie);
H A Dio-pgtable-arm.c243 data->iop.cfg.tlb->flush_pgtable(ptep, sizeof(*ptep), data->iop.cookie); arm_lpae_init_pte()
252 void *cookie = data->iop.cookie; __arm_lpae_map() local
275 cookie); __arm_lpae_map()
280 data->iop.cfg.tlb->flush_pgtable(ptep, sizeof(*ptep), cookie); __arm_lpae_map()
385 void *cookie = data->iop.cookie; arm_lpae_split_blk_unmap() local
413 tlb->flush_pgtable(ptep, sizeof(*ptep), cookie); arm_lpae_split_blk_unmap()
415 tlb->tlb_add_flush(iova, blk_size, true, cookie); arm_lpae_split_blk_unmap()
425 void *cookie = data->iop.cookie; __arm_lpae_unmap() local
438 tlb->flush_pgtable(ptep, sizeof(*ptep), cookie); __arm_lpae_unmap()
442 tlb->tlb_add_flush(iova, size, false, cookie); __arm_lpae_unmap()
443 tlb->tlb_sync(data->iop.cookie); __arm_lpae_unmap()
447 tlb->tlb_add_flush(iova, size, true, cookie); __arm_lpae_unmap()
477 iop->cfg.tlb->tlb_sync(iop->cookie); arm_lpae_unmap()
593 arm_64_lpae_alloc_pgtable_s1(struct io_pgtable_cfg *cfg, void *cookie) arm_64_lpae_alloc_pgtable_s1() argument
663 cfg->tlb->flush_pgtable(data->pgd, data->pgd_size, cookie); arm_64_lpae_alloc_pgtable_s1()
676 arm_64_lpae_alloc_pgtable_s2(struct io_pgtable_cfg *cfg, void *cookie) arm_64_lpae_alloc_pgtable_s2() argument
751 cfg->tlb->flush_pgtable(data->pgd, data->pgd_size, cookie); arm_64_lpae_alloc_pgtable_s2()
763 arm_32_lpae_alloc_pgtable_s1(struct io_pgtable_cfg *cfg, void *cookie) arm_32_lpae_alloc_pgtable_s1() argument
771 iop = arm_64_lpae_alloc_pgtable_s1(cfg, cookie); arm_32_lpae_alloc_pgtable_s1()
781 arm_32_lpae_alloc_pgtable_s2(struct io_pgtable_cfg *cfg, void *cookie) arm_32_lpae_alloc_pgtable_s2() argument
789 iop = arm_64_lpae_alloc_pgtable_s2(cfg, cookie); arm_32_lpae_alloc_pgtable_s2()
820 static void dummy_tlb_flush_all(void *cookie) dummy_tlb_flush_all() argument
822 WARN_ON(cookie != cfg_cookie); dummy_tlb_flush_all()
826 void *cookie) dummy_tlb_add_flush()
828 WARN_ON(cookie != cfg_cookie); dummy_tlb_add_flush()
832 static void dummy_tlb_sync(void *cookie) dummy_tlb_sync() argument
834 WARN_ON(cookie != cfg_cookie); dummy_tlb_sync()
837 static void dummy_flush_pgtable(void *ptr, size_t size, void *cookie) dummy_flush_pgtable() argument
839 WARN_ON(cookie != cfg_cookie); dummy_flush_pgtable()
825 dummy_tlb_add_flush(unsigned long iova, size_t size, bool leaf, void *cookie) dummy_tlb_add_flush() argument
/linux-4.1.27/fs/ocfs2/dlm/
H A Ddlmast.c106 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), __dlm_queue_ast()
107 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), __dlm_queue_ast()
114 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), __dlm_queue_ast()
115 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); __dlm_queue_ast()
125 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), __dlm_queue_ast()
126 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); __dlm_queue_ast()
172 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), __dlm_queue_bast()
173 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); __dlm_queue_bast()
231 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_do_local_ast()
232 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); dlm_do_local_ast()
252 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_do_remote_ast()
253 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie))); dlm_do_remote_ast()
276 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_do_local_bast()
277 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlm_do_local_bast()
296 __be64 cookie; dlm_proxy_ast_handler() local
310 cookie = past->cookie; dlm_proxy_ast_handler()
336 mlog(ML_ERROR, "Unknown ast type! %d, cookie=%u:%llu" dlm_proxy_ast_handler()
338 dlm_get_lock_cookie_node(be64_to_cpu(cookie)), dlm_proxy_ast_handler()
339 dlm_get_lock_cookie_seq(be64_to_cpu(cookie)), dlm_proxy_ast_handler()
347 mlog(0, "Got %sast for unknown lockres! cookie=%u:%llu, " dlm_proxy_ast_handler()
349 dlm_get_lock_cookie_node(be64_to_cpu(cookie)), dlm_proxy_ast_handler()
350 dlm_get_lock_cookie_seq(be64_to_cpu(cookie)), dlm_proxy_ast_handler()
377 if (lock->ml.cookie == cookie) list_for_each_entry()
389 if (lock->ml.cookie == cookie) { list_for_each_entry()
396 mlog(0, "Got %sast for unknown lock! cookie=%u:%llu, name=%.*s, "
398 dlm_get_lock_cookie_node(be64_to_cpu(cookie)),
399 dlm_get_lock_cookie_seq(be64_to_cpu(cookie)),
414 dlm_get_lock_cookie_node(be64_to_cpu(cookie)),
415 dlm_get_lock_cookie_seq(be64_to_cpu(cookie)),
470 past.cookie = lock->ml.cookie; dlm_send_proxy_ast_msg()
H A Ddlmconvert.c284 "converting! (cookie=%u:%llu, conv=%d)\n", dlmconvert_remote()
285 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlmconvert_remote()
286 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlmconvert_remote()
295 "(cookie=%u:%llu, type=%d, conv=%d)\n", dlmconvert_remote()
297 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlmconvert_remote()
298 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlmconvert_remote()
380 convert.cookie = lock->ml.cookie; dlm_send_remote_convert_request()
494 if (tmp_lock->ml.cookie == cnv->cookie && dlm_convert_lock_handler()
505 "cookie=%u:%llu\n", dlm_convert_lock_handler()
506 dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)), dlm_convert_lock_handler()
507 dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie))); dlm_convert_lock_handler()
H A Ddlmlock.c64 u8 node, u64 cookie);
312 create.cookie = lock->ml.cookie; dlm_send_remote_lock_request()
395 u8 node, u64 cookie) dlm_init_lock()
411 newlock->ml.cookie = cpu_to_be64(cookie); dlm_init_lock()
423 struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, dlm_new_lock() argument
443 dlm_init_lock(lock, type, node, cookie); dlm_new_lock()
495 be64_to_cpu(create->cookie), NULL); dlm_create_lock_handler()
541 /* fetch next node-local (u8 nodenum + u56 cookie) into u64 */ dlm_get_next_cookie()
542 static inline void dlm_get_next_cookie(u8 node_num, u64 *cookie) dlm_get_next_cookie() argument
550 *cookie = (dlm_next_cookie | tmpnode); dlm_get_next_cookie()
552 mlog(0, "This node's cookie will now wrap!\n"); dlm_get_next_cookie()
394 dlm_init_lock(struct dlm_lock *newlock, int type, u8 node, u64 cookie) dlm_init_lock() argument
H A Ddlmunlock.c252 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlmunlock_common()
253 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlmunlock_common()
338 unlock.cookie = lock->ml.cookie; dlm_send_remote_unlock_request()
467 if (lock->ml.cookie == unlock->cookie && list_for_each_entry()
512 "cookie=%u:%llu\n",
513 dlm_get_lock_cookie_node(be64_to_cpu(unlock->cookie)),
514 dlm_get_lock_cookie_seq(be64_to_cpu(unlock->cookie)));
H A Ddlmcommon.h340 __be64 cookie; member in struct:dlm_migratable_lock
583 __be32 total_locks; // locks to be sent for this migration cookie
584 __be64 mig_cookie; // cookie for this lockres migration
605 __be64 cookie; member in struct:dlm_create_lock
618 __be64 cookie; member in struct:dlm_convert_lock
634 __be64 cookie; member in struct:dlm_unlock_lock
649 __be64 cookie; member in struct:dlm_proxy_ast
813 static inline u8 dlm_get_lock_cookie_node(u64 cookie) dlm_get_lock_cookie_node() argument
816 cookie >>= 56; dlm_get_lock_cookie_node()
817 ret = (u8)(cookie & 0xffULL); dlm_get_lock_cookie_node()
821 static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie) dlm_get_lock_cookie_seq() argument
824 ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL; dlm_get_lock_cookie_seq()
828 struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
H A Ddlmthread.c360 dlm_get_lock_cookie_node(be64_to_cpu(target->ml.cookie)), dlm_shuffle_lists()
361 dlm_get_lock_cookie_seq(be64_to_cpu(target->ml.cookie)), dlm_shuffle_lists()
422 dlm_get_lock_cookie_node(be64_to_cpu(target->ml.cookie)), dlm_shuffle_lists()
423 dlm_get_lock_cookie_seq(be64_to_cpu(target->ml.cookie)), dlm_shuffle_lists()
533 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_flush_asts()
534 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlm_flush_asts()
592 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_flush_asts()
593 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlm_flush_asts()
H A Ddlmrecovery.c70 int total_locks, u64 cookie,
1176 int total_locks, u64 cookie, dlm_init_migratable_lockres()
1185 mres->mig_cookie = cpu_to_be64(cookie); dlm_init_migratable_lockres()
1214 mlog(ML_ERROR, "Mismatched lvb in lock cookie=%u:%llu, name=%.*s, " dlm_prepare_lvb_for_migration()
1216 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), dlm_prepare_lvb_for_migration()
1217 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), dlm_prepare_lvb_for_migration()
1233 ml->cookie = lock->ml.cookie; dlm_add_lock_to_array()
1255 dummy.ml.cookie = 0; dlm_add_dummy_lock()
1268 if (unlikely(ml->cookie == 0 && dlm_is_dummy_lock()
1831 if (lock->ml.cookie == ml->cookie) list_for_each()
1842 c = ml->cookie;
1844 "with cookie %u:%llu, node %u, "
1856 c = lock->ml.cookie;
1858 "cookie %u:%llu, name %.*s, node %u\n",
1863 c = ml->cookie;
1864 mlog(ML_ERROR, "Migrate lock cookie %u:%llu, "
1876 c = ml->cookie;
1877 mlog(0, "Lock cookie %u:%llu was on list %u "
1903 be64_to_cpu(ml->cookie), NULL);
1986 if (lock->ml.cookie == ml->cookie) { list_for_each_entry()
1987 c = lock->ml.cookie; list_for_each_entry()
1995 "node=%u, cookie=%u:%llu, queue=%d\n", list_for_each_entry()
1997 dlm_get_lock_cookie_node(be64_to_cpu(ml->cookie)), list_for_each_entry()
1998 dlm_get_lock_cookie_seq(be64_to_cpu(ml->cookie)), list_for_each_entry()
1174 dlm_init_migratable_lockres(struct dlm_migratable_lockres *mres, const char *lockname, int namelen, int total_locks, u64 cookie, u8 flags, u8 master) dlm_init_migratable_lockres() argument
/linux-4.1.27/kernel/
H A Dasync.c29 a "sequence cookie" (which, although it has an abstracted type, can be
32 The async core will assign each scheduled event such a sequence cookie and
37 async_synchronize_cookie() function and pass in its own cookie. The
40 cookie have completed.
65 #define ASYNC_COOKIE_MAX ULLONG_MAX /* infinity cookie */
75 async_cookie_t cookie; member in struct:async_entry
100 domain_list)->cookie; lowest_in_progress()
119 (long long)entry->cookie, async_run_entry_fn()
123 entry->func(entry->data, entry->cookie); async_run_entry_fn()
128 (long long)entry->cookie, async_run_entry_fn()
180 /* allocate cookie and queue */ __async_schedule()
181 newcookie = entry->cookie = next_cookie++; __async_schedule()
247 * async_synchronize_{cookie|full}_domain() are not flushed since callers
275 * async_synchronize_cookie_domain - synchronize asynchronous function calls within a certain domain with cookie checkpointing
276 * @cookie: async_cookie_t to use as checkpoint
280 * synchronization domain specified by @domain submitted prior to @cookie
283 void async_synchronize_cookie_domain(async_cookie_t cookie, struct async_domain *domain) async_synchronize_cookie_domain() argument
292 wait_event(async_done, lowest_in_progress(domain) >= cookie); async_synchronize_cookie_domain()
306 * async_synchronize_cookie - synchronize asynchronous function calls with cookie checkpointing
307 * @cookie: async_cookie_t to use as checkpoint
309 * This function waits until all asynchronous function calls prior to @cookie
312 void async_synchronize_cookie(async_cookie_t cookie) async_synchronize_cookie() argument
314 async_synchronize_cookie_domain(cookie, &async_dfl_domain); async_synchronize_cookie()
/linux-4.1.27/drivers/oprofile/
H A Dbuffer_sync.c211 unsigned long cookie; fast_get_dcookie() local
215 get_dcookie(path, &cookie); fast_get_dcookie()
216 return cookie; fast_get_dcookie()
227 unsigned long cookie = NO_COOKIE; get_exec_dcookie() local
237 cookie = fast_get_dcookie(&exe_file->f_path); get_exec_dcookie()
240 return cookie; get_exec_dcookie()
254 unsigned long cookie = NO_COOKIE; lookup_dcookie() local
264 cookie = fast_get_dcookie(&vma->vm_file->f_path); lookup_dcookie()
276 cookie = INVALID_COOKIE; lookup_dcookie()
279 return cookie; lookup_dcookie()
302 add_user_ctx_switch(struct task_struct const *task, unsigned long cookie) add_user_ctx_switch() argument
307 add_event_entry(cookie); add_user_ctx_switch()
315 static void add_cookie_switch(unsigned long cookie) add_cookie_switch() argument
319 add_event_entry(cookie); add_cookie_switch()
332 unsigned long cookie; add_data() local
343 cookie = lookup_dcookie(mm, pc, &offset); add_data()
345 if (cookie == NO_COOKIE) add_data()
347 if (cookie == INVALID_COOKIE) { add_data()
351 if (cookie != last_cookie) { add_data()
352 add_cookie_switch(cookie); add_data()
353 last_cookie = cookie; add_data()
381 unsigned long cookie; add_sample() local
396 cookie = lookup_dcookie(mm, s->eip, &offset); add_sample()
398 if (cookie == INVALID_COOKIE) { add_sample()
403 if (cookie != last_cookie) { add_sample()
404 add_cookie_switch(cookie); add_sample()
405 last_cookie = cookie; add_sample()
497 unsigned long cookie = 0; sync_buffer() local
539 cookie = get_exec_dcookie(mm); sync_buffer()
540 add_user_ctx_switch(new, cookie); sync_buffer()
/linux-4.1.27/drivers/staging/lustre/lnet/klnds/socklnd/
H A Dsocklnd_proto.c74 ksock_tx_t *tx_ack, __u64 cookie) ksocknal_queue_tx_zcack_v2()
82 * Enqueue or piggyback tx_ack / cookie ksocknal_queue_tx_zcack_v2()
83 * . no tx can piggyback cookie of tx_ack (or cookie), just ksocknal_queue_tx_zcack_v2()
85 * . There is tx can piggyback cookie of tx_ack (or cookie), ksocknal_queue_tx_zcack_v2()
86 * piggyback the cookie and return the tx. ksocknal_queue_tx_zcack_v2()
98 /* tx is noop zc-ack, can't piggyback zc-ack cookie */ ksocknal_queue_tx_zcack_v2()
109 cookie = tx_ack->tx_msg.ksm_zc_cookies[1]; ksocknal_queue_tx_zcack_v2()
111 /* piggyback the zc-ack cookie */ ksocknal_queue_tx_zcack_v2()
112 tx->tx_msg.ksm_zc_cookies[1] = cookie; ksocknal_queue_tx_zcack_v2()
113 /* move on to the next TX which can carry cookie */ ksocknal_queue_tx_zcack_v2()
128 * . If there is NOOP on the connection, piggyback the cookie ksocknal_queue_tx_msg_v2()
157 ksock_tx_t *tx_ack, __u64 cookie) ksocknal_queue_tx_zcack_v3()
162 return ksocknal_queue_tx_zcack_v2(conn, tx_ack, cookie); ksocknal_queue_tx_zcack_v3()
181 cookie = tx_ack->tx_msg.ksm_zc_cookies[1]; ksocknal_queue_tx_zcack_v3()
183 if (cookie == SOCKNAL_KEEPALIVE_PING) /* ignore keepalive PING */ ksocknal_queue_tx_zcack_v3()
189 tx->tx_msg.ksm_zc_cookies[1] = cookie; ksocknal_queue_tx_zcack_v3()
193 if (cookie == tx->tx_msg.ksm_zc_cookies[0] || ksocknal_queue_tx_zcack_v3()
194 cookie == tx->tx_msg.ksm_zc_cookies[1]) { ksocknal_queue_tx_zcack_v3()
195 CWARN("%s: duplicated ZC cookie: %llu\n", ksocknal_queue_tx_zcack_v3()
196 libcfs_id2str(conn->ksnc_peer->ksnp_id), cookie); ksocknal_queue_tx_zcack_v3()
201 /* NOOP tx has only one ZC-ACK cookie, can carry at least one more */ ksocknal_queue_tx_zcack_v3()
202 if (tx->tx_msg.ksm_zc_cookies[1] > cookie) { ksocknal_queue_tx_zcack_v3()
204 tx->tx_msg.ksm_zc_cookies[1] = cookie; ksocknal_queue_tx_zcack_v3()
206 tx->tx_msg.ksm_zc_cookies[0] = cookie; ksocknal_queue_tx_zcack_v3()
228 if (cookie == tx->tx_msg.ksm_zc_cookies[1] + 1) ksocknal_queue_tx_zcack_v3()
229 tmp = cookie; ksocknal_queue_tx_zcack_v3()
230 } else if (cookie == tx->tx_msg.ksm_zc_cookies[1] - 1) { ksocknal_queue_tx_zcack_v3()
232 } else if (cookie == tx->tx_msg.ksm_zc_cookies[0] + 1) { ksocknal_queue_tx_zcack_v3()
245 if (cookie >= tx->tx_msg.ksm_zc_cookies[0] && ksocknal_queue_tx_zcack_v3()
246 cookie <= tx->tx_msg.ksm_zc_cookies[1]) { ksocknal_queue_tx_zcack_v3()
247 CWARN("%s: duplicated ZC cookie: %llu\n", ksocknal_queue_tx_zcack_v3()
248 libcfs_id2str(conn->ksnc_peer->ksnp_id), cookie); ksocknal_queue_tx_zcack_v3()
252 if (cookie == tx->tx_msg.ksm_zc_cookies[1] + 1) { ksocknal_queue_tx_zcack_v3()
253 tx->tx_msg.ksm_zc_cookies[1] = cookie; ksocknal_queue_tx_zcack_v3()
257 if (cookie == tx->tx_msg.ksm_zc_cookies[0] - 1) { ksocknal_queue_tx_zcack_v3()
258 tx->tx_msg.ksm_zc_cookies[0] = cookie; ksocknal_queue_tx_zcack_v3()
362 ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote) ksocknal_handle_zcreq() argument
379 rc = conn->ksnc_proto->pro_queue_tx_zcack(conn, NULL, cookie); ksocknal_handle_zcreq()
392 tx = ksocknal_alloc_tx_noop(cookie, !!remote); ksocknal_handle_zcreq()
73 ksocknal_queue_tx_zcack_v2(ksock_conn_t *conn, ksock_tx_t *tx_ack, __u64 cookie) ksocknal_queue_tx_zcack_v2() argument
156 ksocknal_queue_tx_zcack_v3(ksock_conn_t *conn, ksock_tx_t *tx_ack, __u64 cookie) ksocknal_queue_tx_zcack_v3() argument
/linux-4.1.27/drivers/mmc/host/
H A Dtmio_mmc_dma.c52 dma_cookie_t cookie; tmio_mmc_start_dma_rx() local
92 cookie = dmaengine_submit(desc); tmio_mmc_start_dma_rx()
93 if (cookie < 0) { tmio_mmc_start_dma_rx()
95 ret = cookie; tmio_mmc_start_dma_rx()
98 dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n", tmio_mmc_start_dma_rx()
99 __func__, host->sg_len, ret, cookie, host->mrq); tmio_mmc_start_dma_rx()
119 dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d, sg[%d]\n", __func__, tmio_mmc_start_dma_rx()
120 desc, cookie, host->sg_len); tmio_mmc_start_dma_rx()
128 dma_cookie_t cookie; tmio_mmc_start_dma_tx() local
172 cookie = dmaengine_submit(desc); tmio_mmc_start_dma_tx()
173 if (cookie < 0) { tmio_mmc_start_dma_tx()
175 ret = cookie; tmio_mmc_start_dma_tx()
178 dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n", tmio_mmc_start_dma_tx()
179 __func__, host->sg_len, ret, cookie, host->mrq); tmio_mmc_start_dma_tx()
199 dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d\n", __func__, tmio_mmc_start_dma_tx()
200 desc, cookie); tmio_mmc_start_dma_tx()
H A Drtsx_pci_sdmmc.c58 s32 cookie; member in struct:realtek_pci_sdmmc
153 * sd_pre_dma_transfer - do dma_map_sg() or using cookie
158 * 1 - using cookie
168 if (!pre && data->host_cookie && data->host_cookie != host->cookie) { sd_pre_dma_transfer()
170 "error: data->host_cookie = %d, host->cookie = %d\n", sd_pre_dma_transfer()
171 data->host_cookie, host->cookie); sd_pre_dma_transfer()
175 if (pre || data->host_cookie != host->cookie) { sd_pre_dma_transfer()
184 if (++host->cookie < 0) sd_pre_dma_transfer()
185 host->cookie = 1; sd_pre_dma_transfer()
186 data->host_cookie = host->cookie; sd_pre_dma_transfer()
1382 host->cookie = -1; rtsx_pci_sdmmc_card_event()
1415 host->cookie = -1; rtsx_pci_sdmmc_drv_probe()
H A Djz4740_mmc.c119 s32 cookie; member in struct:jz4740_mmc_host_next
193 /* Initialize DMA pre request cookie */ jz4740_mmc_acquire_dma_channels()
194 host->next_data.cookie = 1; jz4740_mmc_acquire_dma_channels()
234 data->host_cookie != host->next_data.cookie) { jz4740_mmc_prepare_dma_data()
236 "[%s] invalid cookie: data->host_cookie %d host->next_data.cookie %d\n", jz4740_mmc_prepare_dma_data()
239 host->next_data.cookie); jz4740_mmc_prepare_dma_data()
244 if (next || data->host_cookie != host->next_data.cookie) { jz4740_mmc_prepare_dma_data()
263 data->host_cookie = ++next->cookie < 0 ? 1 : next->cookie; jz4740_mmc_prepare_dma_data()
H A Dsh_mmcif.c292 dma_cookie_t cookie = -EINVAL; sh_mmcif_start_dma_rx() local
306 cookie = dmaengine_submit(desc); sh_mmcif_start_dma_rx()
310 dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n", sh_mmcif_start_dma_rx()
311 __func__, data->sg_len, ret, cookie); sh_mmcif_start_dma_rx()
331 dev_dbg(&host->pd->dev, "%s(): desc %p, cookie %d, sg[%d]\n", __func__, sh_mmcif_start_dma_rx()
332 desc, cookie, data->sg_len); sh_mmcif_start_dma_rx()
341 dma_cookie_t cookie = -EINVAL; sh_mmcif_start_dma_tx() local
355 cookie = dmaengine_submit(desc); sh_mmcif_start_dma_tx()
359 dev_dbg(&host->pd->dev, "%s(): mapped %d -> %d, cookie %d\n", sh_mmcif_start_dma_tx()
360 __func__, data->sg_len, ret, cookie); sh_mmcif_start_dma_tx()
380 dev_dbg(&host->pd->dev, "%s(): desc %p, cookie %d\n", __func__, sh_mmcif_start_dma_tx()
381 desc, cookie); sh_mmcif_start_dma_tx()
/linux-4.1.27/arch/sparc/lib/
H A Diomap.c8 /* Create a virtual mapping cookie for an IO port range */ ioport_map()
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Dramht.h11 void nvkm_ramht_remove(struct nvkm_ramht *, int cookie);
H A Dparent.h23 void (*object_detach)(struct nvkm_object *parent, int cookie);
/linux-4.1.27/fs/lockd/
H A Dclnt4xdr.c151 * netobj cookie;
154 const struct nlm_cookie *cookie) encode_cookie()
156 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); encode_cookie()
160 struct nlm_cookie *cookie) decode_cookie()
177 cookie->len = length; decode_cookie()
178 memcpy(cookie->data, p, length); decode_cookie()
181 cookie->len = 4; decode_cookie()
182 memset(cookie->data, 0, 4); decode_cookie()
185 dprintk("NFS: returned cookie was too long: %u\n", length); decode_cookie()
377 * netobj cookie;
388 encode_cookie(xdr, &args->cookie); nlm4_xdr_enc_testargs()
395 * netobj cookie;
409 encode_cookie(xdr, &args->cookie); nlm4_xdr_enc_lockargs()
419 * netobj cookie;
431 encode_cookie(xdr, &args->cookie); nlm4_xdr_enc_cancargs()
439 * netobj cookie;
449 encode_cookie(xdr, &args->cookie); nlm4_xdr_enc_unlockargs()
455 * netobj cookie;
463 encode_cookie(xdr, &result->cookie); nlm4_xdr_enc_res()
476 * netobj cookie;
484 encode_cookie(xdr, &result->cookie); nlm4_xdr_enc_testres()
508 * netobj cookie;
532 error = decode_cookie(xdr, &result->cookie); nlm4_xdr_dec_testres()
542 * netobj cookie;
552 error = decode_cookie(xdr, &result->cookie); nlm4_xdr_dec_res()
153 encode_cookie(struct xdr_stream *xdr, const struct nlm_cookie *cookie) encode_cookie() argument
159 decode_cookie(struct xdr_stream *xdr, struct nlm_cookie *cookie) decode_cookie() argument
H A Dclntxdr.c148 * netobj cookie;
151 const struct nlm_cookie *cookie) encode_cookie()
153 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); encode_cookie()
157 struct nlm_cookie *cookie) decode_cookie()
174 cookie->len = length; decode_cookie()
175 memcpy(cookie->data, p, length); decode_cookie()
178 cookie->len = 4; decode_cookie()
179 memset(cookie->data, 0, 4); decode_cookie()
182 dprintk("NFS: returned cookie was too long: %u\n", length); decode_cookie()
370 * netobj cookie;
381 encode_cookie(xdr, &args->cookie); nlm_xdr_enc_testargs()
388 * netobj cookie;
402 encode_cookie(xdr, &args->cookie); nlm_xdr_enc_lockargs()
412 * netobj cookie;
424 encode_cookie(xdr, &args->cookie); nlm_xdr_enc_cancargs()
432 * netobj cookie;
442 encode_cookie(xdr, &args->cookie); nlm_xdr_enc_unlockargs()
448 * netobj cookie;
456 encode_cookie(xdr, &result->cookie); nlm_xdr_enc_res()
469 * netobj cookie;
484 encode_cookie(xdr, &result->cookie); nlm_xdr_enc_testres()
506 * netobj cookie;
530 error = decode_cookie(xdr, &result->cookie); nlm_xdr_dec_testres()
540 * netobj cookie;
550 error = decode_cookie(xdr, &result->cookie); nlm_xdr_dec_res()
150 encode_cookie(struct xdr_stream *xdr, const struct nlm_cookie *cookie) encode_cookie() argument
156 decode_cookie(struct xdr_stream *xdr, struct nlm_cookie *cookie) decode_cookie() argument
H A Dsvc4proc.c83 resp->cookie = argp->cookie; nlm4svc_proc_test()
90 resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie); nlm4svc_proc_test()
111 resp->cookie = argp->cookie; nlm4svc_proc_lock()
131 argp->block, &argp->cookie, nlm4svc_proc_lock()
152 resp->cookie = argp->cookie; nlm4svc_proc_cancel()
185 resp->cookie = argp->cookie; nlm4svc_proc_unlock()
214 resp->cookie = argp->cookie; nlm4svc_proc_granted()
323 resp->cookie = argp->cookie; nlm4svc_proc_share()
356 resp->cookie = argp->cookie; nlm4svc_proc_unshare()
440 nlmsvc_grant_reply(&argp->cookie, argp->status); nlm4svc_proc_granted_res()
474 #define Ck (1+XDR_QUADLEN(NLM_MAXCOOKIELEN)) /* cookie */
H A Dsvcproc.c113 resp->cookie = argp->cookie; nlmsvc_proc_test()
120 resp->status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie)); nlmsvc_proc_test()
142 resp->cookie = argp->cookie; nlmsvc_proc_lock()
162 argp->block, &argp->cookie, nlmsvc_proc_lock()
184 resp->cookie = argp->cookie; nlmsvc_proc_cancel()
218 resp->cookie = argp->cookie; nlmsvc_proc_unlock()
247 resp->cookie = argp->cookie; nlmsvc_proc_granted()
366 resp->cookie = argp->cookie; nlmsvc_proc_share()
399 resp->cookie = argp->cookie; nlmsvc_proc_unshare()
483 nlmsvc_grant_reply(&argp->cookie, argp->status); nlmsvc_proc_granted_res()
517 #define Ck (1+XDR_QUADLEN(NLM_MAXCOOKIELEN)) /* cookie */
H A Dxdr.c65 dprintk("lockd: bad cookie size %d (only cookies under " nlm_decode_cookie()
153 if (!(p = nlm_encode_cookie(p, &resp->cookie))) nlm_encode_testres()
189 if (!(p = nlm_decode_cookie(p, &argp->cookie))) nlmsvc_decode_testargs()
214 if (!(p = nlm_decode_cookie(p, &argp->cookie))) nlmsvc_decode_lockargs()
234 if (!(p = nlm_decode_cookie(p, &argp->cookie))) nlmsvc_decode_cancargs()
248 if (!(p = nlm_decode_cookie(p, &argp->cookie)) nlmsvc_decode_unlockargs()
265 if (!(p = nlm_decode_cookie(p, &argp->cookie)) nlmsvc_decode_shareargs()
279 if (!(p = nlm_encode_cookie(p, &resp->cookie))) nlmsvc_encode_shareres()
289 if (!(p = nlm_encode_cookie(p, &resp->cookie))) nlmsvc_encode_res()
321 if (!(p = nlm_decode_cookie(p, &resp->cookie))) nlmsvc_decode_res()
H A Dxdr4.c65 dprintk("lockd: bad cookie size %d (only cookies under " nlm4_decode_cookie()
146 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) nlm4_encode_testres()
186 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) nlm4svc_decode_testargs()
211 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) nlm4svc_decode_lockargs()
231 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) nlm4svc_decode_cancargs()
245 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) nlm4svc_decode_unlockargs()
262 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) nlm4svc_decode_shareargs()
276 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) nlm4svc_encode_shareres()
286 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) nlm4svc_encode_res()
318 if (!(p = nlm4_decode_cookie(p, &resp->cookie))) nlm4svc_decode_res()
H A Dsvclock.c57 static const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie) nlmdbg_cookie2a() argument
70 for (i = 0 ; i < cookie->len ; i++) { nlmdbg_cookie2a()
75 sprintf(p, "%02x", cookie->data[i]); nlmdbg_cookie2a()
155 dprintk("lockd: check f=%p pd=%d %Ld-%Ld ty=%d cookie=%s\n", nlmsvc_lookup_block()
159 nlmdbg_cookie2a(&block->b_call->a_args.cookie)); nlmsvc_lookup_block()
179 * Find a block with a given NLM cookie.
182 nlmsvc_find_block(struct nlm_cookie *cookie) nlmsvc_find_block() argument
187 if (nlm_cookie_match(&block->b_call->a_args.cookie,cookie)) nlmsvc_find_block()
194 dprintk("nlmsvc_find_block(%s): block=%p\n", nlmdbg_cookie2a(cookie), block); nlmsvc_find_block()
202 * Note: we explicitly set the cookie of the grant reply to that of
204 * should _not_ rely on the callback containing the same cookie as the
211 * GRANTED_RES message by cookie, without having to rely on the client's IP
217 struct nlm_cookie *cookie) nlmsvc_create_block()
240 nlmclnt_next_cookie(&call->a_args.cookie); nlmsvc_create_block()
400 struct nlm_cookie *cookie, int reclaim) nlmsvc_lock()
421 block = nlmsvc_create_block(rqstp, host, file, lock, cookie); nlmsvc_lock()
507 struct nlm_lock *conflock, struct nlm_cookie *cookie) nlmsvc_testlock()
864 nlmsvc_grant_reply(struct nlm_cookie *cookie, __be32 status) nlmsvc_grant_reply() argument
868 dprintk("grant_reply: looking for cookie %x, s=%d \n", nlmsvc_grant_reply()
869 *(unsigned int *)(cookie->data), status); nlmsvc_grant_reply()
870 if (!(block = nlmsvc_find_block(cookie))) nlmsvc_grant_reply()
215 nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host, struct nlm_file *file, struct nlm_lock *lock, struct nlm_cookie *cookie) nlmsvc_create_block() argument
398 nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file, struct nlm_host *host, struct nlm_lock *lock, int wait, struct nlm_cookie *cookie, int reclaim) nlmsvc_lock() argument
505 nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file, struct nlm_host *host, struct nlm_lock *lock, struct nlm_lock *conflock, struct nlm_cookie *cookie) nlmsvc_testlock() argument
/linux-4.1.27/include/uapi/linux/android/
H A Dbinder.h70 binder_uintptr_t cookie; member in struct:flat_binder_object
140 binder_uintptr_t cookie; /* target object cookie */ member in struct:binder_transaction_data
167 binder_uintptr_t cookie; member in struct:binder_ptr_cookie
172 binder_uintptr_t cookie; member in struct:binder_handle_cookie
183 binder_uintptr_t cookie; member in struct:binder_pri_ptr_cookie
227 * void *: cookie for binder
235 * void *: cookie for binder
260 * void *: cookie
264 * void *: cookie
305 * void *: cookie for binder
335 * void *: cookie
342 * void *: cookie
347 * void *: cookie
/linux-4.1.27/fs/cachefiles/
H A Dinterface.c24 * allocate an object record for a cookie lookup and prepare the lookup data
28 struct fscache_cookie *cookie) cachefiles_alloc_object()
40 _enter("{%s},%p,", cache->cache.identifier, cookie); cachefiles_alloc_object()
56 fscache_object_init(&object->fscache, cookie, &cache->cache); cachefiles_alloc_object()
58 object->type = cookie->def->type; cachefiles_alloc_object()
68 keylen = cookie->def->get_key(cookie->netfs_data, buffer + 2, 512); cachefiles_alloc_object()
84 if (cookie->def->get_aux) { cachefiles_alloc_object()
85 auxlen = cookie->def->get_aux(cookie->netfs_data, cachefiles_alloc_object()
91 auxdata->type = cookie->def->type; cachefiles_alloc_object()
144 object->fscache.cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) cachefiles_lookup_object()
203 struct fscache_cookie *cookie; cachefiles_update_object() local
218 cookie = object->fscache.cookie; cachefiles_update_object()
220 if (!cookie->def->get_aux) { cachefiles_update_object()
233 auxlen = cookie->def->get_aux(cookie->netfs_data, auxdata->data, 511); cachefiles_update_object()
238 auxdata->type = cookie->def->type; cachefiles_update_object()
425 _object->cookie->def->get_attr(_object->cookie->netfs_data, &ni_size); cachefiles_attr_changed()
497 op->object->cookie->def->get_attr(op->object->cookie->netfs_data, cachefiles_invalidate_object()
26 cachefiles_alloc_object( struct fscache_cache *_cache, struct fscache_cookie *cookie) cachefiles_alloc_object() argument
H A Dxattr.c38 if (!object->fscache.cookie) cachefiles_check_object_type()
41 snprintf(type, 3, "%02x", object->fscache.cookie->def->type); cachefiles_check_object_type()
157 * check the consistency between the backing cache and the FS-Cache cookie
169 ASSERT(object->fscache.cookie->def->check_aux); cachefiles_check_auxdata()
179 auxbuf->type != object->fscache.cookie->def->type) cachefiles_check_auxdata()
242 if (object->fscache.cookie->def->check_aux) { cachefiles_check_object_xattr()
249 object->fscache.cookie->def->name, dlen); cachefiles_check_object_xattr()
H A Dnamei.c35 struct fscache_cookie *cookie; __cachefiles_printk_object() local
50 cookie = object->fscache.cookie; __cachefiles_printk_object()
51 if (cookie) { __cachefiles_printk_object()
54 object->fscache.cookie, __cachefiles_printk_object()
55 object->fscache.cookie->parent, __cachefiles_printk_object()
56 object->fscache.cookie->netfs_data, __cachefiles_printk_object()
57 object->fscache.cookie->flags); __cachefiles_printk_object()
58 if (keybuf && cookie->def) __cachefiles_printk_object()
59 keylen = cookie->def->get_key(cookie->netfs_data, keybuf, __cachefiles_printk_object()
/linux-4.1.27/arch/ia64/include/asm/
H A Dmodule.h29 void *core_unw_table; /* core unwind-table cookie returned by unwinder */
30 void *init_unw_table; /* init unwind-table cookie returned by unwinder */
/linux-4.1.27/net/core/
H A Dsock_diag.c28 int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie) sock_diag_check_cookie() argument
32 if (cookie[0] == INET_DIAG_NOCOOKIE && cookie[1] == INET_DIAG_NOCOOKIE) sock_diag_check_cookie()
36 if ((u32)res != cookie[0] || (u32)(res >> 32) != cookie[1]) sock_diag_check_cookie()
43 void sock_diag_save_cookie(struct sock *sk, __u32 *cookie) sock_diag_save_cookie() argument
47 cookie[0] = (u32)res; sock_diag_save_cookie()
48 cookie[1] = (u32)(res >> 32); sock_diag_save_cookie()
/linux-4.1.27/arch/m68k/include/uapi/asm/
H A Dbootinfo-atari.h13 #define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (__be32) */
/linux-4.1.27/net/l2tp/
H A Dl2tp_debugfs.c187 seq_printf(m, " cookie %02x%02x%02x%02x", l2tp_dfs_seq_session_show()
188 session->cookie[0], session->cookie[1], l2tp_dfs_seq_session_show()
189 session->cookie[2], session->cookie[3]); l2tp_dfs_seq_session_show()
192 session->cookie[4], session->cookie[5], l2tp_dfs_seq_session_show()
193 session->cookie[6], session->cookie[7]); l2tp_dfs_seq_session_show()
197 seq_printf(m, " peer cookie %02x%02x%02x%02x", l2tp_dfs_seq_session_show()
233 seq_puts(m, " [ cookie ]\n"); l2tp_dfs_seq_show()
234 seq_puts(m, " [ peer cookie ]\n"); l2tp_dfs_seq_show()
H A Dl2tp_core.h74 u8 cookie[8]; /* optional cookie */ member in struct:l2tp_session_cfg
76 u8 peer_cookie[8]; /* peer's cookie */
93 u8 cookie[8]; member in struct:l2tp_session
/linux-4.1.27/include/asm-generic/
H A Diomap.h18 * Read/write from/to an (offsettable) iomem cookie. It might be a PIO
21 * (or the cookie itself, depending on implementation and hw).
24 * cookie, and coldly assume that the MMIO IO mappings are not
60 /* Create a virtual mapping cookie for an IO port range */
70 /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */
H A Dpci_iomap.h16 /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
21 /* Create a virtual mapping cookie for a port on a given PCI device.
/linux-4.1.27/include/linux/fsl/bestcomm/
H A Dbestcomm.h54 void **cookie; member in struct:bcom_task
187 bcom_submit_next_buffer(struct bcom_task *tsk, void *cookie) bcom_submit_next_buffer() argument
191 tsk->cookie[tsk->index] = cookie; bcom_submit_next_buffer()
202 void *cookie = tsk->cookie[tsk->outdex]; bcom_retrieve_buffer() local
210 return cookie; bcom_retrieve_buffer()
/linux-4.1.27/drivers/dma/sh/
H A Dshdma-base.c79 dma_cookie_t cookie; shdma_tx_submit() local
86 cookie = dma_cookie_assign(tx); shdma_tx_submit()
95 chunk->async_tx.cookie > 0 || shdma_tx_submit()
96 chunk->async_tx.cookie == -EBUSY || shdma_tx_submit()
107 chunk->cookie = cookie; shdma_tx_submit()
111 tx->cookie, &chunk->async_tx, schan->id); shdma_tx_submit()
156 return cookie; shdma_tx_submit()
331 dma_cookie_t cookie = 0; __ld_cleanup() local
341 BUG_ON(tx->cookie > 0 && tx->cookie != desc->cookie); __ld_cleanup()
352 desc->cookie != cookie) __ld_cleanup()
355 if (tx->cookie > 0) __ld_cleanup()
356 cookie = tx->cookie; __ld_cleanup()
359 if (schan->dma_chan.completed_cookie != desc->cookie - 1) __ld_cleanup()
361 "Completing cookie %d, expected %d\n", __ld_cleanup()
362 desc->cookie, __ld_cleanup()
364 schan->dma_chan.completed_cookie = desc->cookie; __ld_cleanup()
373 tx->cookie, tx, schan->id); __ld_cleanup()
378 if (tx->cookie > 0 || tx->cookie == -EBUSY) { __ld_cleanup()
380 BUG_ON(tx->cookie < 0); __ld_cleanup()
396 tx, tx->cookie); __ld_cleanup()
427 schan->dma_chan.completed_cookie = schan->dma_chan.cookie; __ld_cleanup()
498 * @first: if NULL, set to the current descriptor and cookie set to -EBUSY
527 new->async_tx.cookie = -EBUSY; shdma_add_desc()
531 new->async_tx.cookie = -EINVAL; shdma_add_desc()
535 "chaining (%zu/%zu)@%pad -> %pad with %p, cookie %d\n", shdma_add_desc()
537 new->async_tx.cookie); shdma_add_desc()
583 * cookie is at first set to -EBUSY, at tx-submit to a positive shdma_prep_sg()
585 * if more than one chunk is needed further chunks have cookie = -EINVAL shdma_prep_sg()
586 * the last chunk, if not equal to the first, has cookie = -ENOSPC shdma_prep_sg()
623 new->async_tx.cookie = -ENOSPC;
822 dma_cookie_t cookie, shdma_tx_status()
833 status = dma_cookie_status(chan, cookie, txstate); shdma_tx_status()
836 * If we don't find cookie on the queue, it has been aborted and we have shdma_tx_status()
843 if (sdesc->cookie == cookie) { shdma_tx_status()
932 sdesc->async_tx.cookie, &sdesc->async_tx); chan_irqt()
821 shdma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) shdma_tx_status() argument
H A Dusb-dmac.c51 * @done_cookie: cookie after the DMAC completed a transfer
491 dma_cookie_t cookie) usb_dmac_chan_get_residue_if_complete()
497 if (desc->done_cookie == cookie) { usb_dmac_chan_get_residue_if_complete()
507 dma_cookie_t cookie) usb_dmac_chan_get_residue()
515 vd = vchan_find_desc(&chan->vc, cookie); usb_dmac_chan_get_residue()
532 dma_cookie_t cookie, usb_dmac_tx_status()
540 status = dma_cookie_status(chan, cookie, txstate); usb_dmac_tx_status()
547 residue = usb_dmac_chan_get_residue_if_complete(uchan, cookie); usb_dmac_tx_status()
549 residue = usb_dmac_chan_get_residue(uchan, cookie); usb_dmac_tx_status()
591 desc->done_cookie = desc->vd.tx.cookie; usb_dmac_isr_transfer_end()
490 usb_dmac_chan_get_residue_if_complete(struct usb_dmac_chan *chan, dma_cookie_t cookie) usb_dmac_chan_get_residue_if_complete() argument
506 usb_dmac_chan_get_residue(struct usb_dmac_chan *chan, dma_cookie_t cookie) usb_dmac_chan_get_residue() argument
531 usb_dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) usb_dmac_tx_status() argument
H A Drcar-dmac.c438 dma_cookie_t cookie; rcar_dmac_tx_submit() local
442 cookie = dma_cookie_assign(tx); rcar_dmac_tx_submit()
445 chan->index, tx->cookie, desc); rcar_dmac_tx_submit()
453 return cookie; rcar_dmac_tx_submit()
842 desc->async_tx.cookie = -EBUSY; rcar_dmac_chan_prep_sg()
1136 dma_cookie_t cookie) rcar_dmac_chan_get_residue()
1148 * If the cookie doesn't correspond to the currently running transfer rcar_dmac_chan_get_residue()
1152 if (cookie != desc->async_tx.cookie) rcar_dmac_chan_get_residue()
1184 dma_cookie_t cookie, rcar_dmac_tx_status()
1192 status = dma_cookie_status(chan, cookie, txstate); rcar_dmac_tx_status()
1197 residue = rcar_dmac_chan_get_residue(rchan, cookie); rcar_dmac_tx_status()
1135 rcar_dmac_chan_get_residue(struct rcar_dmac_chan *chan, dma_cookie_t cookie) rcar_dmac_chan_get_residue() argument
1183 rcar_dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) rcar_dmac_tx_status() argument
/linux-4.1.27/net/ipv6/
H A Dsyncookies.c100 static __u32 check_tcp_syn_cookie(__u32 cookie, const struct in6_addr *saddr, check_tcp_syn_cookie() argument
106 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; check_tcp_syn_cookie()
108 diff = (count - (cookie >> COOKIEBITS)) & ((__u32) -1 >> COOKIEBITS); check_tcp_syn_cookie()
112 return (cookie - check_tcp_syn_cookie()
146 __u32 cookie) __cookie_v6_check()
149 __u32 mssind = check_tcp_syn_cookie(cookie, &iph->saddr, &iph->daddr, __cookie_v6_check()
164 __u32 cookie = ntohl(th->ack_seq) - 1; cookie_v6_check() local
177 mss = __cookie_v6_check(ipv6_hdr(skb), th, cookie); cookie_v6_check()
185 /* check for timestamp cookie support */ cookie_v6_check()
232 treq->snt_isn = cookie; cookie_v6_check()
145 __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th, __u32 cookie) __cookie_v6_check() argument
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
H A Dlustre_handles.c61 * Generate a unique 64bit cookie (hash) for a handle and insert it into
73 * This is fast, but simplistic cookie generation algorithm, it will class_handle_hash()
85 CWARN("The universe has been exhausted: cookie wrap-around.\n"); class_handle_hash()
150 void *class_handle2object(__u64 cookie) class_handle2object() argument
160 bucket = handle_hash + (cookie & HANDLE_HASH_MASK); class_handle2object()
164 if (h->h_cookie != cookie) class_handle2object()
/linux-4.1.27/arch/mips/math-emu/
H A Ddsemul.c30 mips_instruction cookie; member in struct:emuframe
86 err |= __put_user((mips_instruction)BD_COOKIE, &fr->cookie); mips_dsemul()
106 u32 insn, cookie; do_dsemulret() local
133 err |= __get_user(cookie, &fr->cookie); do_dsemulret()
135 if (unlikely(err || (insn != BREAK_MATH) || (cookie != BD_COOKIE))) { do_dsemulret()
/linux-4.1.27/include/uapi/linux/
H A Dmqueue.h39 * - sigev_value.sival_ptr must point to a cookie that is NOTIFY_COOKIE_LEN
41 * If the notification is triggered, then the cookie is sent to the netlink
42 * socket. The last byte of the cookie is replaced with the NOTIFY_?? codes:
H A Dinotify.h23 __u32 cookie; /* cookie to synchronize two events */ member in struct:inotify_event
H A Dinet_diag.h84 /* Base info structure. It contains socket identity (addrs/ports/cookie)
H A Drds.h223 rds_rdma_cookie_t cookie; member in struct:rds_free_mr_args
228 rds_rdma_cookie_t cookie; member in struct:rds_rdma_args
237 rds_rdma_cookie_t cookie; member in struct:rds_atomic_args
/linux-4.1.27/drivers/net/wireless/ath/wil6210/
H A Dinterrupt.c218 static irqreturn_t wil6210_irq_rx(int irq, void *cookie) wil6210_irq_rx() argument
220 struct wil6210_priv *wil = cookie; wil6210_irq_rx()
279 static irqreturn_t wil6210_irq_tx(int irq, void *cookie) wil6210_irq_tx() argument
281 struct wil6210_priv *wil = cookie; wil6210_irq_tx()
345 static irqreturn_t wil6210_irq_misc(int irq, void *cookie) wil6210_irq_misc() argument
347 struct wil6210_priv *wil = cookie; wil6210_irq_misc()
393 static irqreturn_t wil6210_irq_misc_thread(int irq, void *cookie) wil6210_irq_misc_thread() argument
395 struct wil6210_priv *wil = cookie; wil6210_irq_misc_thread()
426 static irqreturn_t wil6210_thread_irq(int irq, void *cookie) wil6210_thread_irq() argument
428 struct wil6210_priv *wil = cookie; wil6210_thread_irq()
433 wil6210_irq_misc_thread(irq, cookie); wil6210_thread_irq()
491 static irqreturn_t wil6210_hardirq(int irq, void *cookie) wil6210_hardirq() argument
494 struct wil6210_priv *wil = cookie; wil6210_hardirq()
526 (wil6210_irq_rx(irq, cookie) == IRQ_WAKE_THREAD)) wil6210_hardirq()
530 (wil6210_irq_tx(irq, cookie) == IRQ_WAKE_THREAD)) wil6210_hardirq()
534 (wil6210_irq_misc(irq, cookie) == IRQ_WAKE_THREAD)) wil6210_hardirq()
H A Dcfg80211.c517 u64 *cookie) wil_cfg80211_mgmt_tx()
548 cfg80211_mgmt_tx_status(wdev, cookie ? *cookie : 0, buf, len, wil_cfg80211_mgmt_tx()
607 u64 *cookie) wil_remain_on_channel()
626 u64 cookie) wil_cancel_remain_on_channel()
851 cfg80211_probe_status(ndev, sta->addr, req->cookie, alive, GFP_KERNEL); wil_probe_client_handle()
903 const u8 *peer, u64 *cookie) wil_cfg80211_probe_client()
919 req->cookie = cid; wil_cfg80211_probe_client()
925 *cookie = req->cookie; wil_cfg80211_probe_client()
515 wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) wil_cfg80211_mgmt_tx() argument
603 wil_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct ieee80211_channel *chan, unsigned int duration, u64 *cookie) wil_remain_on_channel() argument
624 wil_cancel_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie) wil_cancel_remain_on_channel() argument
901 wil_cfg80211_probe_client(struct wiphy *wiphy, struct net_device *dev, const u8 *peer, u64 *cookie) wil_cfg80211_probe_client() argument
/linux-4.1.27/arch/sparc/include/asm/
H A Debus_dma.h15 void (*callback)(struct ebus_dma_info *p, int event, void *cookie);
H A Dio_32.h134 /* Create a virtual mapping cookie for an IO port range */
138 /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
/linux-4.1.27/fs/notify/inotify/
H A Dinotify.h30 const unsigned char *file_name, u32 cookie);
H A Dinotify_fsnotify.c70 const unsigned char *file_name, u32 cookie) inotify_handle_event()
106 event->sync_cookie = cookie; inotify_handle_event()
65 inotify_handle_event(struct fsnotify_group *group, struct inode *inode, struct fsnotify_mark *inode_mark, struct fsnotify_mark *vfsmount_mark, u32 mask, void *data, int data_type, const unsigned char *file_name, u32 cookie) inotify_handle_event() argument
/linux-4.1.27/arch/arm/include/asm/xen/
H A Dpage.h107 #define xen_remap(cookie, size) ioremap_cache((cookie), (size))
108 #define xen_unmap(cookie) iounmap((cookie))
/linux-4.1.27/sound/soc/sh/
H A Dsiu_pcm.c103 pr_debug("%s: done period #%d (%u/%u bytes), cookie %d\n", siu_dma_tx_complete()
106 siu_stream->buf_bytes, siu_stream->cookie); siu_dma_tx_complete()
123 dma_cookie_t cookie; siu_pcm_wr_set() local
142 cookie = dmaengine_submit(desc); siu_pcm_wr_set()
143 if (cookie < 0) { siu_pcm_wr_set()
145 return cookie; siu_pcm_wr_set()
149 siu_stream->cookie = cookie; siu_pcm_wr_set()
171 dma_cookie_t cookie; siu_pcm_rd_set() local
192 cookie = dmaengine_submit(desc); siu_pcm_rd_set()
193 if (cookie < 0) { siu_pcm_rd_set()
195 return cookie; siu_pcm_rd_set()
199 siu_stream->cookie = cookie; siu_pcm_rd_set()
515 "%s: port=%d, events %x, FSTS %x, xferred %u/%u, cookie %d\n", siu_pcm_pointer_dma()
518 siu_stream->cookie); siu_pcm_pointer_dma()
/linux-4.1.27/net/ipv4/
H A Dsyncookies.c29 /* TCP Timestamp: 6 lowest bits of timestamp sent in the cookie SYN-ACK
36 * When we receive a valid cookie-ACK, we look at the echoed tsval (if
133 * The count value used to generate the cookie must be less than
137 static __u32 check_tcp_syn_cookie(__u32 cookie, __be32 saddr, __be32 daddr, check_tcp_syn_cookie() argument
142 /* Strip away the layers from the cookie */ check_tcp_syn_cookie()
143 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; check_tcp_syn_cookie()
146 diff = (count - (cookie >> COOKIEBITS)) & ((__u32) -1 >> COOKIEBITS); check_tcp_syn_cookie()
150 return (cookie - check_tcp_syn_cookie()
176 * rounded down to the value encoded in the cookie.
212 u32 cookie) __cookie_v4_check()
215 __u32 mssind = check_tcp_syn_cookie(cookie, iph->saddr, iph->daddr, __cookie_v4_check()
299 __u32 cookie = ntohl(th->ack_seq) - 1; cookie_v4_check() local
313 mss = __cookie_v4_check(ip_hdr(skb), th, cookie); cookie_v4_check()
321 /* check for timestamp cookie support */ cookie_v4_check()
336 treq->snt_isn = cookie; cookie_v4_check()
211 __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th, u32 cookie) __cookie_v4_check() argument
H A Dtcp_fastopen.c25 * for a valid cookie, so this is an acceptable risk. tcp_fastopen_init_key_once()
92 /* Generate the fastopen cookie by doing aes128 encryption on both
230 * to validating the cookie in order to avoid burning CPU cycles tcp_fastopen_queue_check()
234 * processing a cookie request is that clients can't differentiate tcp_fastopen_queue_check()
260 /* Returns true if we should perform Fast Open on the SYN. The cookie (foc)
262 * cookie request (foc->len == 0).
272 if (foc->len == 0) /* Client requests a cookie */ tcp_try_fastopen()
285 if (foc->len >= 0 && /* Client presents or requests a cookie */ tcp_try_fastopen()
293 * ack the ISN only but includes the same cookie. tcp_try_fastopen()
295 * Note: Data-less SYN with valid cookie is allowed to send tcp_try_fastopen()
306 } else if (foc->len > 0) /* Client presents an invalid cookie */ tcp_try_fastopen()
H A Dtcp_metrics.c34 struct tcp_fastopen_cookie cookie; member in struct:tcp_fastopen_metrics
136 tm->tcpm_fastopen.cookie.exp = false; tcpm_suck_dst()
137 tm->tcpm_fastopen.cookie.len = 0; tcpm_suck_dst()
703 struct tcp_fastopen_cookie *cookie, tcp_fastopen_cache_get()
718 *cookie = tfom->cookie; tcp_fastopen_cache_get()
719 if (cookie->len <= 0 && tfom->try_exp == 1) tcp_fastopen_cache_get()
720 cookie->exp = true; tcp_fastopen_cache_get()
729 struct tcp_fastopen_cookie *cookie, bool syn_lost, tcp_fastopen_cache_set()
745 if (cookie && cookie->len > 0) tcp_fastopen_cache_set()
746 tfom->cookie = *cookie; tcp_fastopen_cache_set()
748 tfom->cookie.len <= 0 && !tfom->cookie.exp) tcp_fastopen_cache_set()
884 if (tfom->cookie.len > 0 && tcp_metrics_fill_info()
886 tfom->cookie.len, tfom->cookie.val) < 0) tcp_metrics_fill_info()
702 tcp_fastopen_cache_get(struct sock *sk, u16 *mss, struct tcp_fastopen_cookie *cookie, int *syn_loss, unsigned long *last_syn_loss) tcp_fastopen_cache_get() argument
728 tcp_fastopen_cache_set(struct sock *sk, u16 mss, struct tcp_fastopen_cookie *cookie, bool syn_lost, u16 try_exp) tcp_fastopen_cache_set() argument
/linux-4.1.27/drivers/misc/mic/card/
H A Dmic_device.c146 * returns: The cookie that is transparent to the caller. Passed
159 unsigned long cookie; mic_request_card_irq() local
169 cookie = index; mic_request_card_irq()
170 return (struct mic_irq *)cookie; mic_request_card_irq()
178 * @cookie: cookie obtained during a successful call to mic_request_threaded_irq
184 void mic_free_card_irq(struct mic_irq *cookie, void *data) mic_free_card_irq() argument
189 index = (unsigned long)cookie & 0xFFFFU; mic_free_card_irq()
H A Dmic_x100.c163 unsigned long cookie = irq; _mic_request_threaded_irq() local
171 return (struct mic_irq *)cookie; _mic_request_threaded_irq()
175 struct mic_irq *cookie, void *data) _mic_free_irq()
177 unsigned long irq = (unsigned long)cookie; _mic_free_irq()
174 _mic_free_irq(struct mbus_device *mbdev, struct mic_irq *cookie, void *data) _mic_free_irq() argument
H A Dmic_device.h90 * struct mic_irq - opaque pointer used as cookie
126 void mic_free_card_irq(struct mic_irq *cookie, void *data);
/linux-4.1.27/arch/tile/gxio/
H A Diorpc_globals.c27 params->pollfd.kernel.cookie = pollfd_cookie; __iorpc_arm_pollfd()
44 params->pollfd.kernel.cookie = pollfd_cookie; __iorpc_close_pollfd()
/linux-4.1.27/fs/
H A Ddcookies.c6 * Persistent cookie-path mappings. These are used by
52 /* The dentry is locked, its address will do for the cookie */ dcookie_value()
113 /* This is the main kernel-side routine that retrieves the cookie
116 int get_dcookie(struct path *path, unsigned long *cookie) get_dcookie() argument
138 *cookie = dcookie_value(dcs); get_dcookie()
146 /* And here is where the userspace process can look up the cookie value
151 unsigned long cookie = (unsigned long)cookie64; SYSCALL_DEFINE3() local
171 if (!(dcs = find_dcookie(cookie))) SYSCALL_DEFINE3()
/linux-4.1.27/drivers/media/platform/s5p-tv/
H A Dmixer_vp_layer.c31 .cookie = VP_MODE_NV12 | VP_MODE_MEM_LINEAR,
44 .cookie = VP_MODE_NV21 | VP_MODE_MEM_LINEAR,
58 .cookie = VP_MODE_NV12 | VP_MODE_MEM_LINEAR,
72 .cookie = VP_MODE_NV12 | VP_MODE_MEM_TILED,
110 if (layer->fmt->cookie & VP_MODE_MEM_TILED) { mxr_vp_buffer_set()
H A Dsdo_drv.c40 unsigned int cookie; member in struct:sdo_format
120 { V4L2_STD_PAL_N, .height = 576, .cookie = SDO_PAL_N },
121 { V4L2_STD_PAL_Nc, .height = 576, .cookie = SDO_PAL_NC },
122 { V4L2_STD_PAL_M, .height = 480, .cookie = SDO_PAL_M },
123 { V4L2_STD_PAL_60, .height = 480, .cookie = SDO_PAL_60 },
124 { V4L2_STD_NTSC_443, .height = 480, .cookie = SDO_NTSC_443 },
125 { V4L2_STD_PAL, .height = 576, .cookie = SDO_PAL_BGHID },
126 { V4L2_STD_NTSC_M, .height = 480, .cookie = SDO_NTSC_M },
306 sdo_write_mask(sdev, SDO_CONFIG, sdev->fmt->cookie, SDO_STANDARD_MASK); sdo_runtime_resume()
H A Dmixer.h69 unsigned long cookie; member in struct:mxr_format
194 /** cookie used for configuration of registers */
195 int cookie; member in struct:mxr_output
204 /** cookie need for mixer HW */
205 int cookie; member in struct:mxr_output_conf
347 void mxr_reg_s_output(struct mxr_device *mdev, int cookie);
H A Dmixer_grp_layer.c29 .cookie = 4,
41 .cookie = 5,
53 .cookie = 6,
65 .cookie = 7,
H A Dmixer_drv.c36 .cookie = 1,
41 .cookie = 0,
69 if (to_output(mdev)->cookie == 0) mxr_streamer_get()
73 mxr_reg_s_output(mdev, to_output(mdev)->cookie); mxr_streamer_get()
/linux-4.1.27/drivers/infiniband/hw/ipath/
H A Dipath_wc_x86_64.c125 int cookie; ipath_enable_wc() local
130 cookie = mtrr_add(pioaddr, piolen, MTRR_TYPE_WRCOMB, 0); ipath_enable_wc()
131 if (cookie < 0) { ipath_enable_wc()
136 cookie); ipath_enable_wc()
141 "cookie is %d\n", cookie); ipath_enable_wc()
142 dd->ipath_wc_cookie = cookie; ipath_enable_wc()
/linux-4.1.27/net/wireless/
H A Dtrace.h1174 struct wireless_dev *wdev, u64 cookie),
1175 TP_ARGS(wiphy, wdev, cookie),
1179 __field(u64, cookie)
1184 __entry->cookie = cookie;
1186 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu ",
1187 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
1735 TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie),
1736 TP_ARGS(wiphy, ret, cookie),
1740 __field(u64, cookie)
1745 __entry->cookie = cookie;
1747 TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu",
1748 WIPHY_PR_ARG, __entry->ret, __entry->cookie)
1752 TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie),
1753 TP_ARGS(wiphy, wdev, cookie),
1757 __field(u64, cookie)
1762 __entry->cookie = cookie;
1764 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie: %llu",
1765 WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
2247 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2250 TP_ARGS(wdev, cookie, chan, duration),
2253 __field(u64, cookie)
2259 __entry->cookie = cookie;
2263 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", duration: %u",
2264 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG,
2269 TP_PROTO(struct wireless_dev *wdev, u64 cookie,
2271 TP_ARGS(wdev, cookie, chan),
2274 __field(u64, cookie)
2279 __entry->cookie = cookie;
2282 TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT,
2283 WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG)
2327 TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack),
2328 TP_ARGS(wdev, cookie, ack),
2331 __field(u64, cookie)
2336 __entry->cookie = cookie;
2339 TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s",
2340 WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack))
2497 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2499 TP_ARGS(netdev, addr, cookie, acked),
2503 __field(u64, cookie)
2509 __entry->cookie = cookie;
2512 TP_printk(NETDEV_PR_FMT " addr:" MAC_PR_FMT ", cookie: %llu, acked: %s",
2513 NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie,
H A Drdev-ops.h89 u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie, rdev_get_key()
90 void (*callback)(void *cookie, struct key_params*)) rdev_get_key()
95 mac_addr, cookie, callback); rdev_get_key()
652 unsigned int duration, u64 *cookie) rdev_remain_on_channel()
657 duration, cookie); rdev_remain_on_channel()
658 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); rdev_remain_on_channel()
664 struct wireless_dev *wdev, u64 cookie) rdev_cancel_remain_on_channel()
667 trace_rdev_cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); rdev_cancel_remain_on_channel()
668 ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); rdev_cancel_remain_on_channel()
676 u64 *cookie) rdev_mgmt_tx()
680 ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie); rdev_mgmt_tx()
681 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); rdev_mgmt_tx()
687 struct wireless_dev *wdev, u64 cookie) rdev_mgmt_tx_cancel_wait()
690 trace_rdev_mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); rdev_mgmt_tx_cancel_wait()
691 ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); rdev_mgmt_tx_cancel_wait()
828 u64 *cookie) rdev_probe_client()
832 ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); rdev_probe_client()
833 trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); rdev_probe_client()
88 rdev_get_key(struct cfg80211_registered_device *rdev, struct net_device *netdev, u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params*)) rdev_get_key() argument
649 rdev_remain_on_channel(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct ieee80211_channel *chan, unsigned int duration, u64 *cookie) rdev_remain_on_channel() argument
663 rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, u64 cookie) rdev_cancel_remain_on_channel() argument
673 rdev_mgmt_tx(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) rdev_mgmt_tx() argument
686 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, u64 cookie) rdev_mgmt_tx_cancel_wait() argument
826 rdev_probe_client(struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *peer, u64 *cookie) rdev_probe_client() argument
/linux-4.1.27/drivers/staging/comedi/drivers/
H A Dcomedi_isadma.h27 * struct comedi_isadma_desc - cookie for ISA DMA
46 * @desc: cookie for each DMA buffer
48 * @cur_dma: the current cookie in use
H A Dcomedi_isadma.c28 * @desc: the ISA DMA cookie to program and enable
142 * @desc: the ISA DMA cookie to set
156 * @dma_chan: DMA channel for the first cookie
157 * @dma_chan2: DMA channel for the second cookie
158 * @maxsize: the size of the buffer to allocate for each cookie
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/core/
H A Dramht.c67 nvkm_ramht_remove(struct nvkm_ramht *ramht, int cookie) nvkm_ramht_remove() argument
70 nv_wo32(ramht, cookie + 0, 0x00000000); nvkm_ramht_remove()
71 nv_wo32(ramht, cookie + 4, 0x00000000); nvkm_ramht_remove()
/linux-4.1.27/arch/mips/lib/
H A Diomap.c13 * Read/write from/to an (offsettable) iomem cookie. It might be a PIO
16 * (or the cookie itself, depending on implementation and hw).
19 * encode the PIO/MMIO as part of the cookie. They coldly assume that
198 * Create a virtual mapping cookie for an IO port range
/linux-4.1.27/lib/
H A Dpci_iomap.c13 * pci_iomap_range - create a virtual mapping cookie for a PCI BAR
55 * pci_iomap - create a virtual mapping cookie for a PCI BAR
H A Diomap.c12 * Read/write from/to an (offsettable) iomem cookie. It might be a PIO
15 * (or the cookie itself, depending on implementation and hw).
18 * encode the PIO/MMIO as part of the cookie. They coldly assume that
228 /* Create a virtual mapping cookie for an IO port range */ ioport_map()
/linux-4.1.27/include/linux/lockd/
H A Dxdr.h62 struct nlm_cookie cookie; member in struct:nlm_args
78 struct nlm_cookie cookie; member in struct:nlm_res
/linux-4.1.27/fs/notify/
H A Dfsnotify.c130 int data_is, u32 cookie, send_to_group()
172 " data=%p data_is=%d cookie=%d\n", send_to_group()
175 data_is, cookie); send_to_group()
182 file_name, cookie); send_to_group()
192 const unsigned char *file_name, u32 cookie) fsnotify()
267 data, data_is, cookie, file_name); fsnotify()
126 send_to_group(struct inode *to_tell, struct fsnotify_mark *inode_mark, struct fsnotify_mark *vfsmount_mark, __u32 mask, void *data, int data_is, u32 cookie, const unsigned char *file_name) send_to_group() argument
191 fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const unsigned char *file_name, u32 cookie) fsnotify() argument
/linux-4.1.27/fs/ceph/
H A Dcache.c74 pr_err("Unable to resgister fsid: %p fscache cookie", fsc); ceph_fscache_register_fs()
216 struct fscache_cookie* cookie; ceph_fscache_unregister_inode_cookie() local
218 if ((cookie = ci->fscache) == NULL) ceph_fscache_unregister_inode_cookie()
223 fscache_uncache_all_inode_pages(cookie, &ci->vfs_inode); ceph_fscache_unregister_inode_cookie()
224 fscache_relinquish_cookie(cookie, 0); ceph_fscache_unregister_inode_cookie()
399 /* The first load is verifed cookie open time */ ceph_fscache_inode_init()
/linux-4.1.27/fs/cifs/
H A Dfscache.c73 cifs_dbg(FYI, "%s: got FH cookie (0x%p/0x%p)\n", cifs_fscache_enable_inode_cookie()
123 cifs_dbg(FYI, "%s: new cookie 0x%p oldcookie 0x%p\n", cifs_fscache_reset_inode_cookie()
236 struct fscache_cookie *cookie = cifsi->fscache; __cifs_fscache_invalidate_page() local
238 cifs_dbg(FYI, "%s: (0x%p/0x%p)\n", __func__, page, cookie); __cifs_fscache_invalidate_page()
239 fscache_wait_on_page_write(cookie, page); __cifs_fscache_invalidate_page()
240 fscache_uncache_page(cookie, page); __cifs_fscache_invalidate_page()
/linux-4.1.27/drivers/net/wireless/b43/
H A Dpio.c40 u16 cookie; generate_cookie() local
42 /* Use the upper 4 bits of the cookie as generate_cookie()
45 * Note that the cookie must never be 0, as this generate_cookie()
50 cookie = (((u16)q->index + 1) << 12); generate_cookie()
51 cookie |= pack->index; generate_cookie()
53 return cookie; generate_cookie()
58 u16 cookie, parse_cookie()
65 switch (cookie & 0xF000) { parse_cookie()
84 pack_index = (cookie & 0x0FFF); parse_cookie()
459 u16 cookie; pio_tx_frame() local
469 cookie = generate_cookie(q, pack); pio_tx_frame()
474 info, cookie); pio_tx_frame()
479 /* Tell the firmware about the cookie of the last pio_tx_frame()
482 B43_SHM_SH_MCASTCOOKIE, cookie); pio_tx_frame()
584 q = parse_cookie(dev, status->cookie, &pack); b43_pio_handle_txstatus()
57 parse_cookie(struct b43_wldev *dev, u16 cookie, struct b43_pio_txpacket **pack) parse_cookie() argument
H A Dxmit.h54 __le16 cookie; /* TX frame cookie */ member in struct:b43_txhdr::__anon7774::__anon7775
71 __le16 cookie; /* TX frame cookie */ member in struct:b43_txhdr::__anon7774::__anon7776
82 __le16 cookie; /* TX frame cookie */ member in struct:b43_txhdr::__anon7774::__anon7777
208 struct ieee80211_tx_info *txctl, u16 cookie);
212 u16 cookie; /* The cookie from the txhdr */ member in struct:b43_txstatus
H A Ddma.c1197 /* Generate a cookie for the TX header. */ generate_cookie()
1200 u16 cookie; generate_cookie() local
1202 /* Use the upper 4 bits of the cookie as generate_cookie()
1205 * Note that the cookie must never be 0, as this generate_cookie()
1210 cookie = (((u16)ring->index + 1) << 12); generate_cookie()
1212 cookie |= (u16)slot; generate_cookie()
1214 return cookie; generate_cookie()
1217 /* Inspect a cookie and find out to which controller/slot it belongs. */
1219 struct b43_dmaring *parse_cookie(struct b43_wldev *dev, u16 cookie, int *slot) parse_cookie() argument
1224 switch (cookie & 0xF000) { parse_cookie()
1241 *slot = (cookie & 0x0FFF); parse_cookie()
1244 "invalid cookie: 0x%04X\n", cookie); parse_cookie()
1263 u16 cookie; dma_tx_fragment() local
1280 cookie = generate_cookie(ring, slot); dma_tx_fragment()
1282 skb, info, cookie); dma_tx_fragment()
1334 /* Tell the firmware about the cookie of the last dma_tx_fragment()
1337 B43_SHM_SH_MCASTCOOKIE, cookie); dma_tx_fragment()
1489 ring = parse_cookie(dev, status->cookie, &slot); b43_dma_handle_txstatus()
1495 * Check if the slot deduced from the cookie really is the first b43_dma_handle_txstatus()
H A Dxmit.c245 u16 cookie) b43_generate_txhdr()
548 /* Magic cookie */ b43_generate_txhdr()
551 txhdr->format_598.cookie = cpu_to_le16(cookie); b43_generate_txhdr()
554 txhdr->format_351.cookie = cpu_to_le16(cookie); b43_generate_txhdr()
557 txhdr->format_410.cookie = cpu_to_le16(cookie); b43_generate_txhdr()
826 /* chanid is the SHM channel cookie. Which is the plain b43_rx()
241 b43_generate_txhdr(struct b43_wldev *dev, u8 *_txhdr, struct sk_buff *skb_frag, struct ieee80211_tx_info *info, u16 cookie) b43_generate_txhdr() argument
/linux-4.1.27/drivers/net/wireless/b43legacy/
H A Dpio.c119 u16 cookie = 0x0000; generate_cookie() local
130 cookie = 0x1000; generate_cookie()
133 cookie = 0x2000; generate_cookie()
136 cookie = 0x3000; generate_cookie()
143 cookie |= (u16)packetindex; generate_cookie()
145 return cookie; generate_cookie()
150 u16 cookie, parse_cookie()
157 switch (cookie & 0xF000) { parse_cookie()
173 packetindex = (cookie & 0x0FFF); parse_cookie()
496 queue = parse_cookie(dev, status->cookie, &packet); b43legacy_pio_handle_txstatus()
149 parse_cookie(struct b43legacy_wldev *dev, u16 cookie, struct b43legacy_pio_txpacket **packet) parse_cookie() argument
H A Ddma.c495 txstat->cookie = 0; setup_rx_descbuffer()
936 /* Generate a cookie for the TX header. */ generate_cookie()
940 u16 cookie = 0x1000; generate_cookie() local
942 /* Use the upper 4 bits of the cookie as generate_cookie()
945 * Note that the cookie must never be 0, as this generate_cookie()
950 cookie = 0xA000; generate_cookie()
953 cookie = 0xB000; generate_cookie()
956 cookie = 0xC000; generate_cookie()
959 cookie = 0xD000; generate_cookie()
962 cookie = 0xE000; generate_cookie()
965 cookie = 0xF000; generate_cookie()
969 cookie |= (u16)slot; generate_cookie()
971 return cookie; generate_cookie()
974 /* Inspect a cookie and find out to which controller/slot it belongs. */
977 u16 cookie, int *slot) parse_cookie()
982 switch (cookie & 0xF000) { parse_cookie()
1004 *slot = (cookie & 0x0FFF); parse_cookie()
1195 ring = parse_cookie(dev, status->cookie, &slot); b43legacy_dma_handle_txstatus()
1201 * Check if the slot deduced from the cookie really is the first b43legacy_dma_handle_txstatus()
1327 while (hw->cookie == 0) { dma_rx()
976 parse_cookie(struct b43legacy_wldev *dev, u16 cookie, int *slot) parse_cookie() argument
H A Dxmit.h37 __le16 cookie; member in struct:b43legacy_txhdr_fw3
86 u16 cookie);
91 u16 cookie; /* The cookie from the txhdr */ member in struct:b43legacy_txstatus
119 __le16 cookie; member in struct:b43legacy_hwtxstatus
H A Dxmit.c192 u16 cookie) generate_txhdr_fw3()
348 /* Magic cookie */ generate_txhdr_fw3()
349 txhdr->cookie = cpu_to_le16(cookie); generate_txhdr_fw3()
363 u16 cookie) b43legacy_generate_txhdr()
367 info, cookie); b43legacy_generate_txhdr()
616 status.cookie = le16_to_cpu(hw->cookie); b43legacy_handle_hwtxstatus()
187 generate_txhdr_fw3(struct b43legacy_wldev *dev, struct b43legacy_txhdr_fw3 *txhdr, const unsigned char *fragment_data, unsigned int fragment_len, struct ieee80211_tx_info *info, u16 cookie) generate_txhdr_fw3() argument
358 b43legacy_generate_txhdr(struct b43legacy_wldev *dev, u8 *txhdr, const unsigned char *fragment_data, unsigned int fragment_len, struct ieee80211_tx_info *info, u16 cookie) b43legacy_generate_txhdr() argument
H A Ddebugfs.c152 "index | cookie | seq | phy_stat | frame_count | " txstat_read_file()
161 if (stat->cookie) { txstat_read_file()
168 stat->cookie, stat->seq, stat->phy_stat, txstat_read_file()
/linux-4.1.27/drivers/misc/mic/host/
H A Dmic_intr.c407 #define GET_ENTRY(cookie) ((cookie) & 0xFFFF)
408 #define GET_OFFSET(cookie) ((cookie) >> COOKIE_ID_SHIFT)
427 * returns: The cookie that is transparent to the caller. Passed
443 unsigned long cookie = 0; mic_request_threaded_irq() local
478 cookie = MK_COOKIE(entry, offset); mic_request_threaded_irq()
497 cookie = MK_COOKIE(entry, intr_cb->cb_id); mic_request_threaded_irq()
501 return (struct mic_irq *)cookie; mic_request_threaded_irq()
511 * @cookie: cookie obtained during a successful call to mic_request_threaded_irq
518 struct mic_irq *cookie, void *data) mic_free_irq()
527 entry = GET_ENTRY((unsigned long)cookie); mic_free_irq()
528 offset = GET_OFFSET((unsigned long)cookie); mic_free_irq()
517 mic_free_irq(struct mic_device *mdev, struct mic_irq *cookie, void *data) mic_free_irq() argument
H A Dmic_intr.h110 * struct mic_irq - opaque pointer used as cookie
144 struct mic_irq *cookie, void *data);
/linux-4.1.27/drivers/staging/lustre/include/linux/lnet/
H A Dlib-lnet.h115 lnet_cpt_of_cookie(__u64 cookie) lnet_cpt_of_cookie() argument
117 unsigned int cpt = (cookie >> LNET_COOKIE_TYPE_BITS) & LNET_CPT_MASK; lnet_cpt_of_cookie()
120 * get illegal cpt from it's invalid cookie */ lnet_cpt_of_cookie()
466 __u64 cookie);
473 /* NB: cookie is still useful, don't reset it */ lnet_res_lh_invalidate()
485 handle->cookie = eq->eq_lh.lh_cookie; lnet_eq2handle()
494 lh = lnet_res_lh_lookup(&the_lnet.ln_eq_container, handle->cookie); lnet_handle2eq()
504 handle->cookie = md->md_lh.lh_cookie; lnet_md2handle()
514 cpt = lnet_cpt_of_cookie(handle->cookie); lnet_handle2md()
516 handle->cookie); lnet_handle2md()
545 handle->cookie = me->me_lh.lh_cookie; lnet_me2handle()
555 cpt = lnet_cpt_of_cookie(handle->cookie); lnet_handle2me()
557 handle->cookie); lnet_handle2me()
/linux-4.1.27/arch/arm/include/asm/
H A Dio.h290 * take an address as such, but a cookie.
335 #define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
336 #define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
337 #define ioremap_cache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
338 #define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC)
H A DbL_switcher.h18 typedef void (*bL_switch_completion_handler)(void *cookie);
/linux-4.1.27/drivers/infiniband/hw/cxgb3/
H A Diwch_cq.c52 u64 cookie; iwch_poll_cq_one() local
67 ret = cxio_poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie, iwch_poll_cq_one()
81 wc->wr_id = cookie; iwch_poll_cq_one()
87 "lo 0x%x cookie 0x%llx\n", __func__, iwch_poll_cq_one()
90 CQE_WRID_LOW(cqe), (unsigned long long) cookie); iwch_poll_cq_one()
/linux-4.1.27/drivers/net/arcnet/
H A Dcapmode.c107 *((int*)&pkt->soft.cap.cookie[0])); build_header()
144 /* And neither is the cookie field */ prepare_tx()
151 *((int*)&pkt->soft.cap.cookie[0])); prepare_tx()
176 /* Skip the extra integer we have written into it as a cookie prepare_tx()
218 *((int*)&ackpkt->soft.cap.cookie[0])); ack_tx()
/linux-4.1.27/drivers/staging/lustre/lustre/osc/
H A Dosc_object.c128 int osc_lvb_print(const struct lu_env *env, void *cookie, osc_lvb_print() argument
131 return (*p)(env, cookie, "size: %llu mtime: %llu atime: %llu ctime: %llu blocks: %llu", osc_lvb_print()
136 static int osc_object_print(const struct lu_env *env, void *cookie, osc_object_print() argument
143 (*p)(env, cookie, "id: " DOSTID " idx: %d gen: %d kms_valid: %u kms %llu rc: %d force_sync: %d min_xid: %llu ", osc_object_print()
147 osc_lvb_print(env, cookie, p, &oinfo->loi_lvb); osc_object_print()
H A Dosc_internal.h108 void *cookie, struct ldlm_enqueue_info *einfo,
120 obd_enqueue_update_f upcall, void *cookie,
123 obd_enqueue_update_f upcall, void *cookie,
126 obd_enqueue_update_f upcall, void *cookie,
H A Dosc_lock.c107 olock->l_handle.h_cookie == ols->ols_handle.cookie)) osc_lock_invariant()
161 olck->ols_handle.cookie = 0ULL; osc_lock_detach()
483 static int osc_lock_upcall(void *cookie, int errcode) osc_lock_upcall() argument
485 struct osc_lock *olck = cookie; osc_lock_upcall()
516 olck->ols_handle.cookie = 0ULL; osc_lock_upcall()
560 /* del user for lock upcall cookie */ osc_lock_upcall()
563 /* del user for lock upcall cookie */ osc_lock_upcall()
568 /* release cookie reference, acquired by osc_lock_enqueue() */ osc_lock_upcall()
1125 /* lock will be passed as upcall cookie, osc_lock_enqueue()
1392 static int osc_lock_print(const struct lu_env *env, void *cookie, osc_lock_print() argument
1400 (*p)(env, cookie, "%p %#16llx %#llx %d %p ", osc_lock_print()
1401 lock->ols_lock, lock->ols_flags, lock->ols_handle.cookie, osc_lock_print()
1403 osc_lvb_print(env, cookie, p, &lock->ols_lvb); osc_lock_print()
/linux-4.1.27/drivers/android/
H A Dbinder.c239 binder_uintptr_t cookie; member in struct:binder_node
252 binder_uintptr_t cookie; member in struct:binder_ref_death
888 binder_uintptr_t cookie) binder_new_node()
915 node->cookie = cookie; binder_new_node()
922 (u64)node->ptr, (u64)node->cookie); binder_new_node()
1544 node = binder_new_node(proc, fp->binder, fp->cookie); binder_transaction()
1552 if (fp->cookie != node->cookie) { binder_transaction()
1553 binder_user_error("%d:%d sending u%016llx node %d, cookie mismatch %016llx != %016llx\n", binder_transaction()
1556 (u64)fp->cookie, (u64)node->cookie); binder_transaction()
1606 fp->cookie = ref->node->cookie; binder_transaction()
1831 binder_uintptr_t cookie; binder_thread_write() local
1837 if (get_user(cookie, (binder_uintptr_t __user *)ptr)) binder_thread_write()
1850 if (cookie != node->cookie) { binder_thread_write()
1851 binder_user_error("%d:%d %s u%016llx node %d cookie mismatch %016llx != %016llx\n", binder_thread_write()
1856 (u64)cookie, (u64)node->cookie); binder_thread_write()
1983 binder_uintptr_t cookie; binder_thread_write() local
1990 if (get_user(cookie, (binder_uintptr_t __user *)ptr)) binder_thread_write()
2010 (u64)cookie, ref->debug_id, ref->desc, binder_thread_write()
2029 death->cookie = cookie; binder_thread_write()
2047 if (death->cookie != cookie) { binder_thread_write()
2048 binder_user_error("%d:%d BC_CLEAR_DEATH_NOTIFICATION death notification cookie mismatch %016llx != %016llx\n", binder_thread_write()
2050 (u64)death->cookie, binder_thread_write()
2051 (u64)cookie); binder_thread_write()
2071 binder_uintptr_t cookie; binder_thread_write() local
2074 if (get_user(cookie, (binder_uintptr_t __user *)ptr)) binder_thread_write()
2077 ptr += sizeof(cookie); binder_thread_write()
2081 if (tmp_death->cookie == cookie) { binder_thread_write()
2088 proc->pid, thread->pid, (u64)cookie, binder_thread_write()
2092 proc->pid, thread->pid, (u64)cookie); binder_thread_write()
2301 if (put_user(node->cookie, binder_thread_read()
2311 (u64)node->ptr, (u64)node->cookie); binder_thread_read()
2320 (u64)node->cookie); binder_thread_read()
2330 (u64)node->cookie); binder_thread_read()
2348 if (put_user(death->cookie, binder_thread_read()
2359 (u64)death->cookie); binder_thread_read()
2380 tr.cookie = target_node->cookie; binder_thread_read()
2391 tr.cookie = 0; binder_thread_read()
2505 (u64)death->cookie); binder_release_work()
3274 (u64)node->ptr, (u64)node->cookie); print_binder_work()
3335 node->debug_id, (u64)node->ptr, (u64)node->cookie, print_binder_node()
886 binder_new_node(struct binder_proc *proc, binder_uintptr_t ptr, binder_uintptr_t cookie) binder_new_node() argument
/linux-4.1.27/drivers/gpu/drm/exynos/
H A Dexynos_drm_buf.c66 buf->cookie = dma_alloc_attrs(dev->dev, lowlevel_buffer_allocate()
70 if (!buf->cookie) { lowlevel_buffer_allocate()
135 dma_free_attrs(dev->dev, buf->size, buf->cookie, lowlevel_buffer_deallocate()
H A Dexynos_drm_gem.h25 * @cookie: cookie returned by dma_alloc_attrs
39 void *cookie; member in struct:exynos_drm_gem_buf
/linux-4.1.27/drivers/crypto/qce/
H A Ddma.c140 dma_cookie_t cookie; qce_dma_prep_sg() local
151 cookie = dmaengine_submit(desc); qce_dma_prep_sg()
153 return dma_submit_error(cookie); qce_dma_prep_sg()
/linux-4.1.27/drivers/scsi/csiostor/
H A Dt4fw_api_stor.h117 __be64 cookie; member in struct:fw_rdev_wr
185 u64 cookie; member in struct:fw_fcoe_els_ct_wr
210 u64 cookie; member in struct:fw_scsi_write_wr
236 u64 cookie; member in struct:fw_scsi_read_wr
262 u64 cookie; member in struct:fw_scsi_cmd_wr
290 u64 cookie; member in struct:fw_scsi_abrt_cls_wr
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
H A Ddcache.c214 handle.cookie = it->d.lustre.it_lock_handle; ll_intent_drop_lock()
216 CDEBUG(D_DLMTRACE, "releasing lock with cookie %#llx from it %p\n", ll_intent_drop_lock()
217 handle.cookie, it); ll_intent_drop_lock()
224 handle.cookie = it->d.lustre.it_remote_lock_handle; ll_intent_drop_lock()
226 CDEBUG(D_DLMTRACE, "releasing remote lock with cookie%#llx from it %p\n", ll_intent_drop_lock()
227 handle.cookie, it); ll_intent_drop_lock()
H A Dsymlink.c154 static void ll_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) ll_put_link() argument
156 ptlrpc_req_finished(cookie); ll_put_link()
H A Dvvp_object.c57 static int vvp_object_print(const struct lu_env *env, void *cookie, vvp_object_print() argument
64 (*p)(env, cookie, "(%s %d %d) inode: %p ", vvp_object_print()
70 (*p)(env, cookie, "%lu/%u %o %u %d %p "DFID, vvp_object_print()
/linux-4.1.27/drivers/net/wireless/ath/carl9170/
H A Dtx.c194 int cookie = -1; carl9170_alloc_dev_space() local
205 cookie = bitmap_find_free_region(ar->mem_bitmap, ar->fw.mem_blocks, 0); carl9170_alloc_dev_space()
208 if (unlikely(cookie < 0)) { carl9170_alloc_dev_space()
222 super->s.cookie = (u8) cookie + 1; carl9170_alloc_dev_space()
229 int cookie; carl9170_release_dev_space() local
231 /* make a local copy of the cookie */ carl9170_release_dev_space()
232 cookie = super->s.cookie; carl9170_release_dev_space()
233 /* invalidate cookie */ carl9170_release_dev_space()
234 super->s.cookie = 0; carl9170_release_dev_space()
237 * Do a out-of-bounds check on the cookie: carl9170_release_dev_space()
239 * * cookie "0" is reserved and won't be assigned to any carl9170_release_dev_space()
245 * * obviously, cookie number is limited by the amount carl9170_release_dev_space()
249 if (unlikely(WARN_ON_ONCE(cookie == 0) || carl9170_release_dev_space()
250 WARN_ON_ONCE(cookie > ar->fw.mem_blocks))) carl9170_release_dev_space()
257 bitmap_release_region(ar->mem_bitmap, cookie - 1, 0); carl9170_release_dev_space()
513 static struct sk_buff *carl9170_get_queued_skb(struct ar9170 *ar, u8 cookie, carl9170_get_queued_skb() argument
522 if (txc->s.cookie != cookie) skb_queue_walk()
659 const uint8_t cookie, const uint8_t info) __carl9170_tx_process_status()
668 skb = carl9170_get_queued_skb(ar, cookie, &ar->tx_status[q]); __carl9170_tx_process_status()
701 __carl9170_tx_process_status(ar, cmd->_tx_status[i].cookie, carl9170_tx_process_status()
1280 __carl9170_tx_process_status(ar, super->s.cookie, q); carl9170_tx_drop()
658 __carl9170_tx_process_status(struct ar9170 *ar, const uint8_t cookie, const uint8_t info) __carl9170_tx_process_status() argument
/linux-4.1.27/fs/9p/
H A Dcache.c94 p9_debug(P9_DEBUG_FSC, "session %p get cookie %p\n", v9fs_cache_session_get_cookie()
100 p9_debug(P9_DEBUG_FSC, "session %p put cookie %p\n", v9fs_cache_session_put_cookie()
209 p9_debug(P9_DEBUG_FSC, "inode %p get cookie %p\n", v9fs_cache_inode_get_cookie()
219 p9_debug(P9_DEBUG_FSC, "inode %p put cookie %p\n", v9fs_cache_inode_put_cookie()
232 p9_debug(P9_DEBUG_FSC, "inode %p flush cookie %p\n", v9fs_cache_inode_flush_cookie()
274 p9_debug(P9_DEBUG_FSC, "inode %p revalidating cookie old %p new %p\n", v9fs_cache_inode_reset_cookie()
/linux-4.1.27/drivers/infiniband/core/
H A Dumem_rbtree.c78 void *cookie) rbt_ib_umem_for_each_in_range()
90 ret_val = cb(umem->umem, start, last, cookie) || ret_val; rbt_ib_umem_for_each_in_range()
75 rbt_ib_umem_for_each_in_range(struct rb_root *root, u64 start, u64 last, umem_call_back cb, void *cookie) rbt_ib_umem_for_each_in_range() argument
/linux-4.1.27/fs/ext4/
H A Dsymlink.c101 void *cookie) ext4_put_link()
103 struct page *page = cookie; ext4_put_link()
100 ext4_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) ext4_put_link() argument
/linux-4.1.27/include/linux/dma/
H A Dipu-dma.h156 dma_cookie_t completed; /* last completed cookie */
167 struct mutex chan_mutex; /* protects status, cookie, free_list */
/linux-4.1.27/arch/sparc/kernel/
H A Dirq_64.c119 /* Major version 2.0 of HV_GRP_INTR added support for the VIRQ cookie
134 * support using the cookie interface, and any attempt to use the
142 * if we want to move completely over the cookie based VIRQs we must
170 pr_info("SUN4V: Using IRQ API major %d, cookie only virqs %s\n", irq_init_hv()
256 unsigned long hv_err, cookie; cookie_exists() local
260 hv_err = sun4v_vintr_get_cookie(devhandle, devino, &cookie); cookie_exists()
262 pr_err("HV get cookie failed hv_err = %ld\n", hv_err); cookie_exists()
266 if (cookie & ((1UL << 63UL))) { cookie_exists()
267 cookie = ~cookie; cookie_exists()
268 bucket = (struct ino_bucket *) __va(cookie); cookie_exists()
677 unsigned long hv_error, cookie; cookie_assign() local
679 /* handler_irq needs to find the irq. cookie is seen signed in cookie_assign()
683 cookie = ~__pa(&ihd->bucket); cookie_assign()
685 hv_error = sun4v_vintr_set_cookie(devhandle, devino, cookie); cookie_assign()
687 pr_err("HV vintr set cookie failed = %ld\n", hv_error); cookie_assign()
1084 /* If we are doing cookie only VIRQs then we do not need the ivector irq_ivector_init()
/linux-4.1.27/arch/x86/include/asm/xen/
H A Dpage.h262 #define xen_remap(cookie, size) ioremap((cookie), (size));
263 #define xen_unmap(cookie) iounmap((cookie))
/linux-4.1.27/include/net/
H A Ddst_ops.h18 struct dst_entry * (*check)(struct dst_entry *, __u32 cookie);
/linux-4.1.27/arch/s390/include/asm/
H A Dio.h55 * the corresponding device and create the mapping cookie.
/linux-4.1.27/arch/ia64/include/asm/sn/
H A Dintr.h50 int irq_cookie; /* unique cookie */
/linux-4.1.27/drivers/dma/hsu/
H A Dhsu.c289 dma_cookie_t cookie, struct dma_tx_state *state) hsu_dma_tx_status()
297 status = dma_cookie_status(chan, cookie, state); hsu_dma_tx_status()
302 vdesc = vchan_find_desc(&hsuc->vchan, cookie); hsu_dma_tx_status()
303 if (hsuc->desc && cookie == hsuc->desc->vdesc.tx.cookie) { hsu_dma_tx_status()
288 hsu_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *state) hsu_dma_tx_status() argument
/linux-4.1.27/drivers/pps/
H A Dpps.c359 * Look up a pps device by magic cookie.
360 * The cookie is usually a pointer to some enclosing device, but this
371 * The cookie is automatically set to NULL in pps_unregister_source()
376 struct pps_device *pps_lookup_dev(void const *cookie) pps_lookup_dev() argument
383 if (cookie == pps->lookup_cookie) pps_lookup_dev()
/linux-4.1.27/drivers/staging/lustre/lustre/lov/
H A Dlov_object.c68 int (*llo_print)(const struct lu_env *env, void *cookie,
393 static int lov_print_empty(const struct lu_env *env, void *cookie, lov_print_empty() argument
396 (*p)(env, cookie, "empty %d\n", lu2lov(o)->lo_layout_invalid); lov_print_empty()
400 static int lov_print_raid0(const struct lu_env *env, void *cookie, lov_print_raid0() argument
408 (*p)(env, cookie, "stripes: %d, %s, lsm{%p 0x%08X %d %u %u}:\n", lov_print_raid0()
417 lu_object_print(env, cookie, p, sub); lov_print_raid0()
419 (*p)(env, cookie, "sub %d absent\n", i); lov_print_raid0()
425 static int lov_print_released(const struct lu_env *env, void *cookie, lov_print_released() argument
431 (*p)(env, cookie, lov_print_released()
663 void *cookie; lov_layout_change() local
673 cookie = cl_env_reenter(); lov_layout_change()
676 cl_env_reexit(cookie); lov_layout_change()
710 cl_env_reexit(cookie); lov_layout_change()
814 static int lov_object_print(const struct lu_env *env, void *cookie, lov_object_print() argument
817 return LOV_2DISPATCH_NOLOCK(lu2lov(o), llo_print, env, cookie, p, o); lov_object_print()
H A Dlovsub_object.c97 static int lovsub_object_print(const struct lu_env *env, void *cookie, lovsub_object_print() argument
102 return (*p)(env, cookie, "[%d]", los->lso_index); lovsub_object_print()
H A Dlov_request.c273 static int cb_getattr_update(void *cookie, int rc) cb_getattr_update() argument
275 struct obd_info *oinfo = cookie; cb_getattr_update()
474 static int cb_setattr_update(void *cookie, int rc) cb_setattr_update() argument
476 struct obd_info *oinfo = cookie; cb_setattr_update()
662 static int cb_statfs_update(void *cookie, int rc) cb_statfs_update() argument
664 struct obd_info *oinfo = cookie; cb_statfs_update()
/linux-4.1.27/drivers/dma/ioat/
H A Ddma.c234 dma_cookie_t cookie; ioat1_tx_submit() local
237 /* cookie incr and addition to used_list must be atomic */ ioat1_tx_submit()
238 cookie = dma_cookie_assign(tx); ioat1_tx_submit()
239 dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie); ioat1_tx_submit()
260 return cookie; ioat1_tx_submit()
619 * last one will have a cookie, and require unmapping. __cleanup()
622 if (tx->cookie) { __cleanup()
747 ioat_dma_tx_status(struct dma_chan *c, dma_cookie_t cookie, ioat_dma_tx_status() argument
754 ret = dma_cookie_status(c, cookie, txstate); ioat_dma_tx_status()
760 return dma_cookie_status(c, cookie, txstate); ioat_dma_tx_status()
825 dma_cookie_t cookie; ioat_dma_self_test() local
876 cookie = tx->tx_submit(tx); ioat_dma_self_test()
877 if (cookie < 0) { ioat_dma_self_test()
887 dma->device_tx_status(dma_chan, cookie, NULL) ioat_dma_self_test()
H A Ddma_v3.c407 if (tx->cookie) { __cleanup()
545 if (tx->cookie) { ioat3_eh()
646 ioat3_tx_status(struct dma_chan *c, dma_cookie_t cookie, ioat3_tx_status() argument
652 ret = dma_cookie_status(c, cookie, txstate); ioat3_tx_status()
658 return dma_cookie_status(c, cookie, txstate); ioat3_tx_status()
1226 dma_cookie_t cookie; ioat_xor_val_self_test() local
1309 cookie = tx->tx_submit(tx); ioat_xor_val_self_test()
1310 if (cookie < 0) { ioat_xor_val_self_test()
1320 dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) { ioat_xor_val_self_test()
1376 cookie = tx->tx_submit(tx); ioat_xor_val_self_test()
1377 if (cookie < 0) { ioat_xor_val_self_test()
1387 dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) { ioat_xor_val_self_test()
1429 cookie = tx->tx_submit(tx); ioat_xor_val_self_test()
1430 if (cookie < 0) { ioat_xor_val_self_test()
1440 dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) { ioat_xor_val_self_test()
H A Ddma_v2.c146 if (tx->cookie) { __cleanup()
416 dma_cookie_t cookie; ioat2_tx_submit_unlock() local
418 cookie = dma_cookie_assign(tx); ioat2_tx_submit_unlock()
419 dev_dbg(to_dev(&ioat->base), "%s: cookie: %d\n", __func__, cookie); ioat2_tx_submit_unlock()
435 return cookie; ioat2_tx_submit_unlock()
H A Ddma.h203 dev_dbg(dev, "desc[%d]: (%#llx->%#llx) cookie: %d flags: %#x" __dump_desc_dbg()
206 (unsigned long long) hw->next, tx->cookie, tx->flags, __dump_desc_dbg()
341 enum dma_status ioat_dma_tx_status(struct dma_chan *c, dma_cookie_t cookie,
/linux-4.1.27/net/sctp/
H A Dsm_make_chunk.c391 sctp_cookie_param_t *cookie; sctp_make_init_ack() local
413 /* FIXME: We really ought to build the cookie right sctp_make_init_ack()
416 cookie = sctp_pack_cookie(asoc->ep, asoc, chunk, &cookie_len, sctp_make_init_ack()
418 if (!cookie) sctp_make_init_ack()
486 sctp_addto_chunk(retval, cookie_len, cookie); sctp_make_init_ack()
522 kfree(cookie); sctp_make_init_ack()
556 * This field must contain the exact cookie received in the
559 * An implementation SHOULD make the cookie as small as possible
566 void *cookie; sctp_make_cookie_echo() local
569 cookie = asoc->peer.cookie; sctp_make_cookie_echo()
572 /* Build a cookie echo chunk. */ sctp_make_cookie_echo()
577 sctp_addto_chunk(retval, cookie_len, cookie); sctp_make_cookie_echo()
1598 /* Build a cookie representing asoc.
1599 * This INCLUDES the param header needed to put the cookie in the INIT ACK.
1608 struct sctp_signed_cookie *cookie; sctp_pack_cookie() local
1612 /* Header size is static data prior to the actual cookie, including sctp_pack_cookie()
1621 /* Pad out the cookie to a multiple to make the signature sctp_pack_cookie()
1636 cookie = (struct sctp_signed_cookie *) retval->body; sctp_pack_cookie()
1642 /* Copy the cookie part of the association itself. */ sctp_pack_cookie()
1643 cookie->c = asoc->c; sctp_pack_cookie()
1644 /* Save the raw address list length in the cookie. */ sctp_pack_cookie()
1645 cookie->c.raw_addr_list_len = addrs_len; sctp_pack_cookie()
1648 cookie->c.prsctp_capable = asoc->peer.prsctp_capable; sctp_pack_cookie()
1650 /* Save adaptation indication in the cookie. */ sctp_pack_cookie()
1651 cookie->c.adaptation_ind = asoc->peer.adaptation_ind; sctp_pack_cookie()
1653 /* Set an expiration time for the cookie. */ sctp_pack_cookie()
1654 cookie->c.expiration = ktime_add(asoc->cookie_life, sctp_pack_cookie()
1658 memcpy(&cookie->c.peer_init[0], init_chunk->chunk_hdr, sctp_pack_cookie()
1662 memcpy((__u8 *)&cookie->c.peer_init[0] + sctp_pack_cookie()
1669 sg_init_one(&sg, &cookie->c, bodysize); sctp_pack_cookie()
1675 crypto_hash_digest(&desc, &sg, bodysize, cookie->signature)) sctp_pack_cookie()
1688 /* Unpack the cookie from COOKIE ECHO chunk, recreating the association. */ sctp_unpack_cookie()
1696 struct sctp_signed_cookie *cookie; sctp_unpack_cookie() local
1707 /* Header size is static data prior to the actual cookie, including sctp_unpack_cookie()
1716 /* Verify that the chunk looks like it even has a cookie. sctp_unpack_cookie()
1717 * There must be enough room for our cookie and our peer's sctp_unpack_cookie()
1724 /* Verify that the cookie has been padded out. */ sctp_unpack_cookie()
1728 /* Process the cookie. */ sctp_unpack_cookie()
1729 cookie = chunk->subh.cookie_hdr; sctp_unpack_cookie()
1730 bear_cookie = &cookie->c; sctp_unpack_cookie()
1748 if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) { sctp_unpack_cookie()
1772 /* Check to see if the cookie is stale. If there is already sctp_unpack_cookie()
1773 * an association, there is no need to check cookie's expiration sctp_unpack_cookie()
1777 * that a cookie may be considered expired, but his would only slow sctp_unpack_cookie()
1821 /* Populate the association from the cookie. */ sctp_unpack_cookie()
2260 * the state cookie for an INIT-ACK chunk.
2300 char *cookie; sctp_process_init() local
2306 * of the INIT from the cookie. sctp_process_init()
2397 /* Copy Initiation tag from INIT to VT_peer in cookie. */
2403 /* Copy cookie in case we need to resend COOKIE-ECHO. */
2404 cookie = asoc->peer.cookie;
2405 if (cookie) {
2406 asoc->peer.cookie = kmemdup(cookie, asoc->peer.cookie_len, gfp);
2407 if (!asoc->peer.cookie)
2505 * came from a fresh INIT, and INIT ACK, or were stored in a cookie. sctp_process_param()
2586 asoc->peer.cookie = param.cookie->body; sctp_process_param()
/linux-4.1.27/drivers/net/wireless/ath/ath6kl/
H A Dtxrx.c291 struct ath6kl_cookie *cookie = NULL; ath6kl_control_tx() local
317 cookie = NULL; ath6kl_control_tx()
321 cookie = ath6kl_alloc_cookie(ar); ath6kl_control_tx()
324 if (cookie == NULL) { ath6kl_control_tx()
337 cookie->skb = skb; ath6kl_control_tx()
338 cookie->map_no = 0; ath6kl_control_tx()
339 set_htc_pkt_info(&cookie->htc_pkt, cookie, skb->data, skb->len, ath6kl_control_tx()
341 cookie->htc_pkt.skb = skb; ath6kl_control_tx()
347 ath6kl_htc_tx(ar->htc_target, &cookie->htc_pkt); ath6kl_control_tx()
359 struct ath6kl_cookie *cookie = NULL; ath6kl_data_tx() local
472 cookie = ath6kl_alloc_cookie(ar); ath6kl_data_tx()
474 if (!cookie) { ath6kl_data_tx()
503 cookie->skb = skb; ath6kl_data_tx()
504 cookie->map_no = map_no; ath6kl_data_tx()
505 set_htc_pkt_info(&cookie->htc_pkt, cookie, skb->data, skb->len, ath6kl_data_tx()
507 cookie->htc_pkt.skb = skb; ath6kl_data_tx()
516 ath6kl_htc_tx(ar->htc_target, &cookie->htc_pkt); ath6kl_data_tx()
H A Drecovery.c57 void ath6kl_recovery_hb_event(struct ath6kl *ar, u32 cookie) ath6kl_recovery_hb_event() argument
59 if (cookie == ar->fw_recovery.seq_num) ath6kl_recovery_hb_event()
/linux-4.1.27/drivers/misc/cxl/
H A Dirq.c263 irq_handler_t handler, void *cookie, const char *name) cxl_map_irq()
279 result = request_irq(virq, handler, 0, name, cookie); cxl_map_irq()
288 void cxl_unmap_irq(unsigned int virq, void *cookie) cxl_unmap_irq() argument
290 free_irq(virq, cookie); cxl_unmap_irq()
295 void *cookie, cxl_register_one_irq()
305 if (!(virq = cxl_map_irq(adapter, hwirq, handler, cookie, name))) cxl_register_one_irq()
262 cxl_map_irq(struct cxl *adapter, irq_hw_number_t hwirq, irq_handler_t handler, void *cookie, const char *name) cxl_map_irq() argument
293 cxl_register_one_irq(struct cxl *adapter, irq_handler_t handler, void *cookie, irq_hw_number_t *dest_hwirq, unsigned int *dest_virq, const char *name) cxl_register_one_irq() argument
/linux-4.1.27/drivers/video/fbdev/
H A Dmx3fb.c270 dma_cookie_t cookie; member in struct:mx3fb_info
395 dma_cookie_t cookie; sdc_enable_channel() local
404 if (mx3_fbi->cookie < 0) { sdc_enable_channel()
416 cookie = mx3_fbi->txd->tx_submit(mx3_fbi->txd); sdc_enable_channel()
418 mx3_fbi->txd, cookie, list_empty(&ichan->queue) ? '-' : '+'); sdc_enable_channel()
428 cookie = mx3_fbi->cookie; sdc_enable_channel()
430 mx3_fbi->txd, cookie, list_empty(&ichan->queue) ? '-' : '+'); sdc_enable_channel()
433 if (cookie >= 0) { sdc_enable_channel()
436 mx3_fbi->cookie = cookie; sdc_enable_channel()
465 mx3_fbi->cookie = -EINVAL; sdc_disable_channel()
1143 dma_cookie_t cookie; mx3fb_pan_display() local
1221 cookie = txd->tx_submit(txd); mx3fb_pan_display()
1222 dev_dbg(fbi->device, "%d: Submit %p #%d\n", __LINE__, txd, cookie); mx3fb_pan_display()
1223 if (cookie < 0) { mx3fb_pan_display()
1408 mx3fbi->cookie = -EINVAL; mx3fb_init_fbinfo()
/linux-4.1.27/drivers/net/wireless/ath/ath9k/
H A Dhtc_drv_txrx.c169 slot = tx_mhdr->cookie; strip_drv_header()
178 slot = tx_fhdr->cookie; strip_drv_header()
247 mgmt_hdr.cookie = slot; ath9k_htc_tx_mgmt()
282 tx_hdr.cookie = slot; ath9k_htc_tx_data()
589 u8 cookie, u8 epid) check_cookie()
596 fcookie = hdr->cookie; check_cookie()
604 fcookie = hdr->cookie; check_cookie()
607 if (fcookie == cookie) check_cookie()
628 if (check_cookie(priv, skb, txs->cookie, epid)) { skb_queue_walk_safe()
636 ath_dbg(common, XMIT, "No matching packet for cookie: %d, epid: %d\n",
637 txs->cookie, epid);
768 "Found packet for cookie: %d, epid: %d\n", ath9k_htc_tx_cleanup_timer()
769 event->txs.cookie, ath9k_htc_tx_cleanup_timer()
587 check_cookie(struct ath9k_htc_priv *priv, struct sk_buff *skb, u8 cookie, u8 epid) check_cookie() argument
/linux-4.1.27/net/rds/
H A Drdma.c182 rds_rdma_cookie_t cookie; __rds_rdma_map() local
282 * a 64bit cookie containing <R_Key, offset> and pass that __rds_rdma_map()
284 cookie = rds_rdma_make_cookie(mr->r_key, args->vec.addr & ~PAGE_MASK); __rds_rdma_map()
286 *cookie_ret = cookie; __rds_rdma_map()
288 if (args->cookie_addr && put_user(cookie, (u64 __user *)(unsigned long) args->cookie_addr)) { __rds_rdma_map()
369 /* Special case - a null cookie means flush all unused MRs */ rds_free_mr()
370 if (args.cookie == 0) { rds_free_mr()
382 mr = rds_mr_tree_walk(&rs->rs_rdma_keys, rds_rdma_cookie_key(args.cookie), NULL); rds_free_mr()
630 /* The cookie contains the R_Key of the remote memory region, and rds_cmsg_rdma_args()
637 op->op_rkey = rds_rdma_cookie_key(args->cookie); rds_cmsg_rdma_args()
638 op->op_remote_addr = args->remote_vec.addr + rds_rdma_cookie_offset(args->cookie); rds_cmsg_rdma_args()
849 rm->atomic.op_rkey = rds_rdma_cookie_key(args->cookie); rds_cmsg_atomic()
850 rm->atomic.op_remote_addr = args->remote_addr + rds_rdma_cookie_offset(args->cookie); rds_cmsg_atomic()
/linux-4.1.27/drivers/staging/lustre/lustre/obdecho/
H A Decho_client.c167 u64 end, int mode, __u64 *cookie);
168 static int cl_echo_cancel(struct echo_device *d, __u64 cookie);
298 void *cookie, lu_printer_t printer) echo_page_print()
302 (*printer)(env, cookie, LUSTRE_ECHO_CLIENT_NAME"-page@%p %d vm@%p\n", echo_page_print()
535 static int echo_object_print(const struct lu_env *env, void *cookie, echo_object_print() argument
540 return (*p)(env, cookie, "echoclient-object@%p", obj); echo_object_print()
1032 __u64 *cookie, __u32 enqflags) cl_echo_enqueue0()
1067 *cookie = el->el_cookie; cl_echo_enqueue0()
1077 int mode, __u64 *cookie) cl_echo_enqueue()
1098 result = cl_echo_enqueue0(env, eco, start, end, mode, cookie, 0); cl_echo_enqueue()
1107 __u64 cookie) cl_echo_cancel0()
1118 CDEBUG(D_INFO, "ecl: %p, cookie: %#llx\n", ecl, ecl->el_cookie); cl_echo_cancel0()
1119 found = (ecl->el_cookie == cookie); cl_echo_cancel0()
1137 static int cl_echo_cancel(struct echo_device *ed, __u64 cookie) cl_echo_cancel() argument
1147 rc = cl_echo_cancel0(env, ed, cookie); cl_echo_cancel()
1208 rw == READ ? LCK_PR : LCK_PW, &lh.cookie, cl_echo_object_brw()
1252 cl_echo_cancel0(env, ed, lh.cookie); cl_echo_object_brw()
1831 rc = cl_echo_enqueue(eco, offset, end, mode, &ulh->cookie); echo_client_enqueue()
1834 CDEBUG(D_INFO, "Cookie is %#llx\n", ulh->cookie); echo_client_enqueue()
1844 __u64 cookie = oa->o_handle.cookie; echo_client_cancel() local
1849 CDEBUG(D_INFO, "Cookie is %#llx\n", cookie); echo_client_cancel()
1850 return cl_echo_cancel(ed, cookie); echo_client_cancel()
296 echo_page_print(const struct lu_env *env, const struct cl_page_slice *slice, void *cookie, lu_printer_t printer) echo_page_print() argument
1030 cl_echo_enqueue0(struct lu_env *env, struct echo_object *eco, u64 start, u64 end, int mode, __u64 *cookie, __u32 enqflags) cl_echo_enqueue0() argument
1076 cl_echo_enqueue(struct echo_object *eco, u64 start, u64 end, int mode, __u64 *cookie) cl_echo_enqueue() argument
1106 cl_echo_cancel0(struct lu_env *env, struct echo_device *ed, __u64 cookie) cl_echo_cancel0() argument
/linux-4.1.27/arch/x86/platform/uv/
H A Dbios_uv.c150 uv_bios_reserved_page_pa(u64 buf, u64 *cookie, u64 *addr, u64 *len) uv_bios_reserved_page_pa() argument
154 ret = uv_bios_call_irqsave(UV_BIOS_GET_PARTITION_ADDR, (u64)cookie, uv_bios_reserved_page_pa()
/linux-4.1.27/include/rdma/
H A Dib_umem_odp.h112 void *cookie);
118 umem_call_back cb, void *cookie);
/linux-4.1.27/kernel/irq/
H A Ddevres.c37 * @dev_id: A cookie passed back to the handler function
84 * @dev_id: A cookie passed back to the handler function
/linux-4.1.27/drivers/dma/bestcomm/
H A Dbestcomm.c90 tsk->cookie = kmalloc(sizeof(void*) * bd_count, GFP_KERNEL); bcom_task_alloc()
91 if (!tsk->cookie) bcom_task_alloc()
110 kfree(tsk->cookie); bcom_task_alloc()
133 kfree(tsk->cookie); bcom_task_free()
/linux-4.1.27/drivers/usb/renesas_usbhs/
H A Dfifo.h61 dma_cookie_t cookie; member in struct:usbhs_pkt
/linux-4.1.27/include/net/irda/
H A Diriap.h61 magic_t magic; /* Magic cookie */
/linux-4.1.27/drivers/scsi/
H A Dscsi_pm.c111 static void async_sdev_resume(void *dev, async_cookie_t cookie) async_sdev_resume() argument
116 static void async_sdev_thaw(void *dev, async_cookie_t cookie) async_sdev_thaw() argument
121 static void async_sdev_restore(void *dev, async_cookie_t cookie) async_sdev_restore() argument
/linux-4.1.27/fs/afs/
H A Ddir.c397 struct afs_lookup_cookie *cookie = afs_lookup_filldir() local
401 cookie->name.name, cookie->name.len, name, nlen, afs_lookup_filldir()
408 if (cookie->name.len != nlen || afs_lookup_filldir()
409 memcmp(cookie->name.name, name, nlen) != 0) { afs_lookup_filldir()
414 cookie->fid.vnode = ino; afs_lookup_filldir()
415 cookie->fid.unique = dtype; afs_lookup_filldir()
416 cookie->found = 1; afs_lookup_filldir()
430 struct afs_lookup_cookie cookie = { afs_do_lookup() local
440 ret = afs_dir_iterate(dir, &cookie.ctx, key); afs_do_lookup()
447 if (!cookie.found) { afs_do_lookup()
452 *fid = cookie.fid; afs_do_lookup()
/linux-4.1.27/fs/configfs/
H A Dsymlink.c300 void *cookie) configfs_put_link()
302 if (cookie) { configfs_put_link()
303 unsigned long page = (unsigned long)cookie; configfs_put_link()
299 configfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) configfs_put_link() argument
/linux-4.1.27/net/mac80211/
H A Dcfg.c299 void *cookie, ieee80211_get_key()
300 void (*callback)(void *cookie, ieee80211_get_key()
409 callback(cookie, &params); ieee80211_get_key()
2520 unsigned int duration, u64 *cookie, ieee80211_start_roc_work()
2560 * cookie is either the roc cookie (for normal roc) ieee80211_start_roc_work()
2566 roc->cookie = local->roc_cookie_counter; ieee80211_start_roc_work()
2568 if (WARN_ON(roc->cookie == 0)) { ieee80211_start_roc_work()
2569 roc->cookie = 1; ieee80211_start_roc_work()
2572 *cookie = roc->cookie; ieee80211_start_roc_work()
2574 *cookie = (unsigned long)txskb; ieee80211_start_roc_work()
2676 u64 *cookie) ieee80211_remain_on_channel()
2684 duration, cookie, NULL, ieee80211_remain_on_channel()
2692 u64 cookie, bool mgmt_tx) ieee80211_cancel_roc()
2702 if (!mgmt_tx && dep->cookie != cookie) ieee80211_cancel_roc()
2704 else if (mgmt_tx && dep->mgmt_tx_cookie != cookie) ieee80211_cancel_roc()
2714 if (!mgmt_tx && roc->cookie != cookie) ieee80211_cancel_roc()
2716 else if (mgmt_tx && roc->mgmt_tx_cookie != cookie) ieee80211_cancel_roc()
2769 u64 cookie) ieee80211_cancel_remain_on_channel()
2774 return ieee80211_cancel_roc(local, cookie, false); ieee80211_cancel_remain_on_channel()
3249 u64 *cookie) ieee80211_mgmt_tx()
3387 *cookie = (unsigned long) skb; ieee80211_mgmt_tx()
3401 params->wait, cookie, skb, ieee80211_mgmt_tx()
3412 u64 cookie) ieee80211_mgmt_tx_cancel_wait()
3416 return ieee80211_cancel_roc(local, cookie, true); ieee80211_mgmt_tx_cancel_wait()
3475 const u8 *peer, u64 *cookie) ieee80211_probe_client()
3549 *cookie = (unsigned long) skb; ieee80211_probe_client()
297 ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params *params)) ieee80211_get_key() argument
2517 ieee80211_start_roc_work(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, struct ieee80211_channel *channel, unsigned int duration, u64 *cookie, struct sk_buff *txskb, enum ieee80211_roc_type type) ieee80211_start_roc_work() argument
2672 ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct ieee80211_channel *chan, unsigned int duration, u64 *cookie) ieee80211_remain_on_channel() argument
2691 ieee80211_cancel_roc(struct ieee80211_local *local, u64 cookie, bool mgmt_tx) ieee80211_cancel_roc() argument
2767 ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie) ieee80211_cancel_remain_on_channel() argument
3247 ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie) ieee80211_mgmt_tx() argument
3410 ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie) ieee80211_mgmt_tx_cancel_wait() argument
3474 ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, const u8 *peer, u64 *cookie) ieee80211_probe_client() argument
/linux-4.1.27/drivers/gpu/vga/
H A Dvgaarb.c67 void *cookie; member in struct:vga_device
68 void (*irq_set_state)(void *cookie, bool enable);
69 unsigned int (*set_vga_decode)(void *cookie, bool decode);
116 /* this is only used a cookie - it should not be dereferenced */
152 vgadev->irq_set_state(vgadev->cookie, state); vga_irq_set_state()
713 int vga_client_register(struct pci_dev *pdev, void *cookie, vga_client_register() argument
714 void (*irq_set_state)(void *cookie, bool state), vga_client_register()
715 unsigned int (*set_vga_decode)(void *cookie, bool decode)) vga_client_register()
728 vgadev->cookie = cookie; vga_client_register()
1249 new_decodes = vgadev->set_vga_decode(vgadev->cookie, new_state); vga_arbiter_notify_clients()
/linux-4.1.27/drivers/dma/ipu/
H A Dipu_idmac.c829 dma_cookie_t cookie; idmac_tx_submit() local
855 cookie = ipu_init_channel_buffer(ichan, idmac_tx_submit()
863 if (cookie < 0) idmac_tx_submit()
869 cookie = dma_cookie_assign(tx); idmac_tx_submit()
881 cookie = ret; idmac_tx_submit()
888 cookie = ret; idmac_tx_submit()
896 if (cookie < 0) { idmac_tx_submit()
900 tx->cookie = cookie; idmac_tx_submit()
901 ichan->dma_chan.cookie = cookie; idmac_tx_submit()
907 return cookie; idmac_tx_submit()
1607 dma_cookie_t cookie, struct dma_tx_state *txstate) idmac_tx_status()
1609 return dma_cookie_status(chan, cookie, txstate); idmac_tx_status()
1606 idmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate) idmac_tx_status() argument
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
H A Dcq.c58 res_wr->cookie = (uintptr_t)&wr_wait; destroy_cq()
128 res_wr->cookie = (uintptr_t)&wr_wait; create_cq()
471 u8 *cqe_flushed, u64 *cookie, u32 *credit) poll_cq()
642 *cookie = wq->sq.sw_sq[wq->sq.cidx].wr_id; poll_cq()
648 *cookie = wq->rq.sw_rq[wq->rq.cidx].wr_id; poll_cq()
691 u64 cookie = 0; c4iw_poll_cq_one() local
706 ret = poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie, &credit); c4iw_poll_cq_one()
710 wc->wr_id = cookie; c4iw_poll_cq_one()
716 "lo 0x%x cookie 0x%llx\n", __func__, CQE_QPID(&cqe), c4iw_poll_cq_one()
718 CQE_WRID_HI(&cqe), CQE_WRID_LOW(&cqe), (unsigned long long)cookie); c4iw_poll_cq_one()
470 poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, u8 *cqe_flushed, u64 *cookie, u32 *credit) poll_cq() argument
/linux-4.1.27/net/sunrpc/
H A Dxprt.c652 * @cookie: 'connection cookie'
654 * This attempts to break the connection if and only if 'cookie' matches
655 * the current transport 'connection cookie'. It ensures that we don't
660 void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie) xprt_conditional_disconnect() argument
664 if (cookie != xprt->connect_cookie) xprt_conditional_disconnect()
696 void *cookie) xprt_lock_connect()
706 xprt->snd_task = cookie; xprt_lock_connect()
713 void xprt_unlock_connect(struct rpc_xprt *xprt, void *cookie) xprt_unlock_connect() argument
716 if (xprt->snd_task != cookie) xprt_unlock_connect()
694 xprt_lock_connect(struct rpc_xprt *xprt, struct rpc_task *task, void *cookie) xprt_lock_connect() argument
/linux-4.1.27/drivers/media/platform/
H A Dtimblogiw.c77 dma_cookie_t cookie; member in struct:timblogiw_buffer
127 buf->cookie = -1; timblogiw_dma_cb()
531 buf->cookie = -1; buffer_prepare()
579 buf->cookie = desc->tx_submit(desc); buffer_queue()
592 if (buf->cookie >= 0) buffer_release()
593 dma_sync_wait(fh->chan, buf->cookie); buffer_release()
/linux-4.1.27/drivers/rapidio/devices/
H A Dtsi721_dma.c628 dma_cookie_t cookie; tsi721_tx_submit() local
644 cookie = dma_cookie_assign(txd); tsi721_tx_submit()
649 return cookie; tsi721_tx_submit()
736 enum dma_status tsi721_tx_status(struct dma_chan *dchan, dma_cookie_t cookie, tsi721_tx_status() argument
739 return dma_cookie_status(dchan, cookie, txstate); tsi721_tx_status()
871 bdma_chan->dchan.cookie = 1; tsi721_register_dma()
/linux-4.1.27/drivers/net/ethernet/brocade/bna/
H A Dbna_types.h288 void *cookie; /* For bnad to unmap dma later */ member in struct:bna_mem_info
446 void *priv; /* BNAD's cookie */
512 void *priv; /* bnad's cookie */
577 void *priv; /* BNAD's cookie */
645 void *priv; /* BNAD's cookie */
838 void *priv; /* bnad's cookie */
/linux-4.1.27/fs/overlayfs/
H A Dinode.c155 void *cookie; member in struct:ovl_link_data
183 data->cookie = ret; ovl_follow_link()
200 realinode->i_op->put_link(data->realdentry, nd, data->cookie); ovl_put_link()

Completed in 4001 milliseconds

1234