#include #include #include #include #include #include #include #include #include #include "blk-mq.h" static LIST_HEAD(blk_mq_cpu_notify_list); static DEFINE_SPINLOCK(blk_mq_cpu_notify_lock); static int blk_mq_main_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long) hcpu; struct blk_mq_cpu_notifier *notify; spin_lock(&blk_mq_cpu_notify_lock); list_for_each_entry(notify, &blk_mq_cpu_notify_list, list) notify->notify(notify->data, action, cpu); spin_unlock(&blk_mq_cpu_notify_lock); return NOTIFY_OK; } static void blk_mq_cpu_notify(void *data, unsigned long action, unsigned int cpu) { if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { /* * If the CPU goes away, ensure that we run any pending * completions. */ struct llist_node *node; struct request *rq; local_irq_disable(); node = llist_del_all(&per_cpu(ipi_lists, cpu)); while (node) { struct llist_node *next = node->next; rq = llist_entry(node, struct request, ll_list); __blk_mq_end_io(rq, rq->errors); node = next; } local_irq_enable(); } } static struct notifier_block __cpuinitdata blk_mq_main_cpu_notifier = { .notifier_call = blk_mq_main_cpu_notify, }; void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier) { BUG_ON(!notifier->notify); spin_lock(&blk_mq_cpu_notify_lock); list_add_tail(¬ifier->list, &blk_mq_cpu_notify_list); spin_unlock(&blk_mq_cpu_notify_lock); } void blk_mq_unregister_cpu_notifier(struct blk_mq_cpu_notifier *notifier) { spin_lock(&blk_mq_cpu_notify_lock); list_del(¬ifier->list); spin_unlock(&blk_mq_cpu_notify_lock); } void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, void (*fn)(void *, unsigned long, unsigned int), void *data) { notifier->notify = fn; notifier->data = data; } static struct blk_mq_cpu_notifier __cpuinitdata cpu_notifier = { .notify = blk_mq_cpu_notify, }; void __init blk_mq_cpu_init(void) { register_hotcpu_notifier(&blk_mq_main_cpu_notifier); blk_mq_register_cpu_notifier(&cpu_notifier); } r/linux/log/include/crypto/aead.h'>
AgeCommit message (Expand)AuthorFilesLines
2016-12-13crypto: doc - clarify AEAD memory structureStephan Mueller1-24/+12
2016-12-13crypto: doc - fix source comments for SphinxStephan Mueller1-7/+7
2016-07-18crypto: aead - Add chunk sizeHerbert Xu1-5/+7
2016-04-15crypto: doc - document correct return value for request allocationEric Biggers1-2/+1
2016-02-17crypto: doc - update AEAD AD handlingStephan Mueller1-3/+3
2015-12-09crypto: aead - fix kernel-doc warnings in crypto/aead.hRandy Dunlap1-0/+1
2015-08-17crypto: aead - Remove old AEAD interfacesHerbert Xu1-134/+14
2015-08-04crypto: doc - AEAD API conversionStephan Mueller1-0/+24
2015-06-04crypto: doc - Fix typo in crypto-API.xmlMasanari Iida1-1/+1
2015-06-03crypto: aead - Add type-safe init/exit functionsHerbert Xu1-0/+13
2015-06-03crypto: doc - cover new AEAD interfaceStephan Mueller1-1/+4
2015-05-28crypto: aead - Document behaviour of AD in destination bufferHerbert Xu1-4/+10
2015-05-25crypto: aead - Remove unused cryptoff parameterHerbert Xu1-6/+1
2015-05-25crypto: aead - Add crypto_aead_alg_ivsize/maxauthsizeHerbert Xu1-3/+18
2015-05-22crypto: aead - Add support for new AEAD implementationsHerbert Xu1-2/+42
2015-05-22crypto: aead - Rename aead_alg to old_aead_algHerbert Xu1-0/+2
2015-05-22crypto: aead - Add new interface with single SG listHerbert Xu1-6/+29
2015-05-13crypto: aead - Convert top level interface to new styleHerbert Xu1-4/+432
2014-08-01crypto: Resolve shadow warningsMark Rustad1-2/+2