pinst 324 crypto/pcrypt.c static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name) pinst 328 crypto/pcrypt.c pinst->kobj.kset = pcrypt_kset; pinst 329 crypto/pcrypt.c ret = kobject_add(&pinst->kobj, NULL, "%s", name); pinst 331 crypto/pcrypt.c kobject_uevent(&pinst->kobj, KOBJ_ADD); pinst 336 crypto/pcrypt.c static int pcrypt_init_padata(struct padata_instance **pinst, const char *name) pinst 340 crypto/pcrypt.c *pinst = padata_alloc_possible(name); pinst 341 crypto/pcrypt.c if (!*pinst) pinst 344 crypto/pcrypt.c ret = pcrypt_sysfs_add(*pinst, name); pinst 346 crypto/pcrypt.c padata_free(*pinst); pinst 351 crypto/pcrypt.c static void pcrypt_fini_padata(struct padata_instance *pinst) pinst 353 crypto/pcrypt.c padata_stop(pinst); pinst 354 crypto/pcrypt.c padata_free(pinst); pinst 2064 drivers/net/wireless/intel/iwlegacy/3945-mac.c dma_addr_t pinst; pinst 2068 drivers/net/wireless/intel/iwlegacy/3945-mac.c pinst = il->ucode_code.p_addr; pinst 2072 drivers/net/wireless/intel/iwlegacy/3945-mac.c il_wr_prph(il, BSM_DRAM_INST_PTR_REG, pinst); pinst 2560 drivers/net/wireless/intel/iwlegacy/3945.c dma_addr_t pinst; pinst 2580 drivers/net/wireless/intel/iwlegacy/3945.c pinst = il->ucode_init.p_addr; pinst 2585 drivers/net/wireless/intel/iwlegacy/3945.c il_wr_prph(il, BSM_DRAM_INST_PTR_REG, pinst); pinst 331 drivers/net/wireless/intel/iwlegacy/4965.c dma_addr_t pinst; pinst 354 drivers/net/wireless/intel/iwlegacy/4965.c pinst = il->ucode_init.p_addr >> 4; pinst 359 drivers/net/wireless/intel/iwlegacy/4965.c il_wr_prph(il, BSM_DRAM_INST_PTR_REG, pinst); pinst 416 drivers/net/wireless/intel/iwlegacy/4965.c dma_addr_t pinst; pinst 421 drivers/net/wireless/intel/iwlegacy/4965.c pinst = il->ucode_code.p_addr >> 4; pinst 425 drivers/net/wireless/intel/iwlegacy/4965.c il_wr_prph(il, BSM_DRAM_INST_PTR_REG, pinst); pinst 139 include/linux/padata.h struct padata_instance *pinst; pinst 182 include/linux/padata.h extern void padata_free(struct padata_instance *pinst); pinst 183 include/linux/padata.h extern struct padata_shell *padata_alloc_shell(struct padata_instance *pinst); pinst 188 include/linux/padata.h extern int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type, pinst 190 include/linux/padata.h extern int padata_start(struct padata_instance *pinst); pinst 191 include/linux/padata.h extern void padata_stop(struct padata_instance *pinst); pinst 192 include/linux/padata.h extern int padata_register_cpumask_notifier(struct padata_instance *pinst, pinst 194 include/linux/padata.h extern int padata_unregister_cpumask_notifier(struct padata_instance *pinst, pinst 106 kernel/padata.c struct padata_instance *pinst = ps->pinst; pinst 116 kernel/padata.c if (!(pinst->flags & PADATA_INIT) || pinst->flags & PADATA_INVALID) pinst 134 kernel/padata.c if ((pinst->flags & PADATA_RESET)) pinst 154 kernel/padata.c queue_work(pinst->parallel_wq, &queue->work); pinst 216 kernel/padata.c struct padata_instance *pinst = pd->ps->pinst; pinst 253 kernel/padata.c queue_work_on(cb_cpu, pinst->serial_wq, &squeue->work); pinst 271 kernel/padata.c queue_work(pinst->serial_wq, &pd->reorder_work); pinst 353 kernel/padata.c static int padata_setup_cpumasks(struct padata_instance *pinst) pinst 363 kernel/padata.c cpumask_copy(attrs->cpumask, pinst->cpumask.pcpu); pinst 364 kernel/padata.c err = apply_workqueue_attrs(pinst->parallel_wq, attrs); pinst 431 kernel/padata.c struct padata_instance *pinst = ps->pinst; pinst 436 kernel/padata.c cbcpumask = pinst->rcpumask.cbcpu; pinst 437 kernel/padata.c pcpumask = pinst->rcpumask.pcpu; pinst 485 kernel/padata.c static void __padata_start(struct padata_instance *pinst) pinst 487 kernel/padata.c pinst->flags |= PADATA_INIT; pinst 490 kernel/padata.c static void __padata_stop(struct padata_instance *pinst) pinst 492 kernel/padata.c if (!(pinst->flags & PADATA_INIT)) pinst 495 kernel/padata.c pinst->flags &= ~PADATA_INIT; pinst 515 kernel/padata.c static int padata_replace(struct padata_instance *pinst) pinst 521 kernel/padata.c pinst->flags |= PADATA_RESET; pinst 523 kernel/padata.c cpumask_copy(pinst->omask, pinst->rcpumask.pcpu); pinst 524 kernel/padata.c cpumask_and(pinst->rcpumask.pcpu, pinst->cpumask.pcpu, pinst 526 kernel/padata.c if (!cpumask_equal(pinst->omask, pinst->rcpumask.pcpu)) pinst 529 kernel/padata.c cpumask_copy(pinst->omask, pinst->rcpumask.cbcpu); pinst 530 kernel/padata.c cpumask_and(pinst->rcpumask.cbcpu, pinst->cpumask.cbcpu, pinst 532 kernel/padata.c if (!cpumask_equal(pinst->omask, pinst->rcpumask.cbcpu)) pinst 535 kernel/padata.c list_for_each_entry(ps, &pinst->pslist, list) { pinst 543 kernel/padata.c list_for_each_entry_continue_reverse(ps, &pinst->pslist, list) pinst 548 kernel/padata.c blocking_notifier_call_chain(&pinst->cpumask_change_notifier, pinst 550 kernel/padata.c &pinst->cpumask); pinst 552 kernel/padata.c pinst->flags &= ~PADATA_RESET; pinst 564 kernel/padata.c int padata_register_cpumask_notifier(struct padata_instance *pinst, pinst 567 kernel/padata.c return blocking_notifier_chain_register(&pinst->cpumask_change_notifier, pinst 579 kernel/padata.c int padata_unregister_cpumask_notifier(struct padata_instance *pinst, pinst 583 kernel/padata.c &pinst->cpumask_change_notifier, pinst 590 kernel/padata.c static bool padata_validate_cpumask(struct padata_instance *pinst, pinst 594 kernel/padata.c pinst->flags |= PADATA_INVALID; pinst 598 kernel/padata.c pinst->flags &= ~PADATA_INVALID; pinst 602 kernel/padata.c static int __padata_set_cpumasks(struct padata_instance *pinst, pinst 609 kernel/padata.c valid = padata_validate_cpumask(pinst, pcpumask); pinst 611 kernel/padata.c __padata_stop(pinst); pinst 615 kernel/padata.c valid = padata_validate_cpumask(pinst, cbcpumask); pinst 617 kernel/padata.c __padata_stop(pinst); pinst 620 kernel/padata.c cpumask_copy(pinst->cpumask.pcpu, pcpumask); pinst 621 kernel/padata.c cpumask_copy(pinst->cpumask.cbcpu, cbcpumask); pinst 623 kernel/padata.c err = padata_setup_cpumasks(pinst) ?: padata_replace(pinst); pinst 626 kernel/padata.c __padata_start(pinst); pinst 640 kernel/padata.c int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type, pinst 647 kernel/padata.c mutex_lock(&pinst->lock); pinst 651 kernel/padata.c serial_mask = pinst->cpumask.cbcpu; pinst 655 kernel/padata.c parallel_mask = pinst->cpumask.pcpu; pinst 662 kernel/padata.c err = __padata_set_cpumasks(pinst, parallel_mask, serial_mask); pinst 665 kernel/padata.c mutex_unlock(&pinst->lock); pinst 677 kernel/padata.c int padata_start(struct padata_instance *pinst) pinst 681 kernel/padata.c mutex_lock(&pinst->lock); pinst 683 kernel/padata.c if (pinst->flags & PADATA_INVALID) pinst 686 kernel/padata.c __padata_start(pinst); pinst 688 kernel/padata.c mutex_unlock(&pinst->lock); pinst 699 kernel/padata.c void padata_stop(struct padata_instance *pinst) pinst 701 kernel/padata.c mutex_lock(&pinst->lock); pinst 702 kernel/padata.c __padata_stop(pinst); pinst 703 kernel/padata.c mutex_unlock(&pinst->lock); pinst 709 kernel/padata.c static int __padata_add_cpu(struct padata_instance *pinst, int cpu) pinst 714 kernel/padata.c err = padata_replace(pinst); pinst 716 kernel/padata.c if (padata_validate_cpumask(pinst, pinst->cpumask.pcpu) && pinst 717 kernel/padata.c padata_validate_cpumask(pinst, pinst->cpumask.cbcpu)) pinst 718 kernel/padata.c __padata_start(pinst); pinst 724 kernel/padata.c static int __padata_remove_cpu(struct padata_instance *pinst, int cpu) pinst 729 kernel/padata.c if (!padata_validate_cpumask(pinst, pinst->cpumask.pcpu) || pinst 730 kernel/padata.c !padata_validate_cpumask(pinst, pinst->cpumask.cbcpu)) pinst 731 kernel/padata.c __padata_stop(pinst); pinst 733 kernel/padata.c err = padata_replace(pinst); pinst 750 kernel/padata.c int padata_remove_cpu(struct padata_instance *pinst, int cpu, int mask) pinst 757 kernel/padata.c mutex_lock(&pinst->lock); pinst 761 kernel/padata.c cpumask_clear_cpu(cpu, pinst->cpumask.cbcpu); pinst 763 kernel/padata.c cpumask_clear_cpu(cpu, pinst->cpumask.pcpu); pinst 765 kernel/padata.c err = __padata_remove_cpu(pinst, cpu); pinst 768 kernel/padata.c mutex_unlock(&pinst->lock); pinst 774 kernel/padata.c static inline int pinst_has_cpu(struct padata_instance *pinst, int cpu) pinst 776 kernel/padata.c return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) || pinst 777 kernel/padata.c cpumask_test_cpu(cpu, pinst->cpumask.cbcpu); pinst 782 kernel/padata.c struct padata_instance *pinst; pinst 785 kernel/padata.c pinst = hlist_entry_safe(node, struct padata_instance, cpu_online_node); pinst 786 kernel/padata.c if (!pinst_has_cpu(pinst, cpu)) pinst 789 kernel/padata.c mutex_lock(&pinst->lock); pinst 790 kernel/padata.c ret = __padata_add_cpu(pinst, cpu); pinst 791 kernel/padata.c mutex_unlock(&pinst->lock); pinst 797 kernel/padata.c struct padata_instance *pinst; pinst 800 kernel/padata.c pinst = hlist_entry_safe(node, struct padata_instance, cpu_dead_node); pinst 801 kernel/padata.c if (!pinst_has_cpu(pinst, cpu)) pinst 804 kernel/padata.c mutex_lock(&pinst->lock); pinst 805 kernel/padata.c ret = __padata_remove_cpu(pinst, cpu); pinst 806 kernel/padata.c mutex_unlock(&pinst->lock); pinst 813 kernel/padata.c static void __padata_free(struct padata_instance *pinst) pinst 817 kernel/padata.c &pinst->cpu_dead_node); pinst 818 kernel/padata.c cpuhp_state_remove_instance_nocalls(hp_online, &pinst->cpu_online_node); pinst 821 kernel/padata.c WARN_ON(!list_empty(&pinst->pslist)); pinst 823 kernel/padata.c padata_stop(pinst); pinst 824 kernel/padata.c free_cpumask_var(pinst->omask); pinst 825 kernel/padata.c free_cpumask_var(pinst->rcpumask.cbcpu); pinst 826 kernel/padata.c free_cpumask_var(pinst->rcpumask.pcpu); pinst 827 kernel/padata.c free_cpumask_var(pinst->cpumask.pcpu); pinst 828 kernel/padata.c free_cpumask_var(pinst->cpumask.cbcpu); pinst 829 kernel/padata.c destroy_workqueue(pinst->serial_wq); pinst 830 kernel/padata.c destroy_workqueue(pinst->parallel_wq); pinst 831 kernel/padata.c kfree(pinst); pinst 841 kernel/padata.c struct padata_instance *pinst = kobj2pinst(kobj); pinst 842 kernel/padata.c __padata_free(pinst); pinst 852 kernel/padata.c static ssize_t show_cpumask(struct padata_instance *pinst, pinst 858 kernel/padata.c mutex_lock(&pinst->lock); pinst 860 kernel/padata.c cpumask = pinst->cpumask.cbcpu; pinst 862 kernel/padata.c cpumask = pinst->cpumask.pcpu; pinst 866 kernel/padata.c mutex_unlock(&pinst->lock); pinst 870 kernel/padata.c static ssize_t store_cpumask(struct padata_instance *pinst, pinst 888 kernel/padata.c ret = padata_set_cpumask(pinst, mask_type, new_cpumask); pinst 922 kernel/padata.c struct padata_instance *pinst; pinst 926 kernel/padata.c pinst = kobj2pinst(kobj); pinst 929 kernel/padata.c ret = pentry->show(pinst, attr, buf); pinst 937 kernel/padata.c struct padata_instance *pinst; pinst 941 kernel/padata.c pinst = kobj2pinst(kobj); pinst 944 kernel/padata.c ret = pentry->store(pinst, attr, buf, count); pinst 972 kernel/padata.c struct padata_instance *pinst; pinst 974 kernel/padata.c pinst = kzalloc(sizeof(struct padata_instance), GFP_KERNEL); pinst 975 kernel/padata.c if (!pinst) pinst 978 kernel/padata.c pinst->parallel_wq = alloc_workqueue("%s_parallel", WQ_UNBOUND, 0, pinst 980 kernel/padata.c if (!pinst->parallel_wq) pinst 985 kernel/padata.c pinst->serial_wq = alloc_workqueue("%s_serial", WQ_MEM_RECLAIM | pinst 987 kernel/padata.c if (!pinst->serial_wq) pinst 990 kernel/padata.c if (!alloc_cpumask_var(&pinst->cpumask.pcpu, GFP_KERNEL)) pinst 992 kernel/padata.c if (!alloc_cpumask_var(&pinst->cpumask.cbcpu, GFP_KERNEL)) { pinst 993 kernel/padata.c free_cpumask_var(pinst->cpumask.pcpu); pinst 996 kernel/padata.c if (!padata_validate_cpumask(pinst, pcpumask) || pinst 997 kernel/padata.c !padata_validate_cpumask(pinst, cbcpumask)) pinst 1000 kernel/padata.c if (!alloc_cpumask_var(&pinst->rcpumask.pcpu, GFP_KERNEL)) pinst 1002 kernel/padata.c if (!alloc_cpumask_var(&pinst->rcpumask.cbcpu, GFP_KERNEL)) pinst 1004 kernel/padata.c if (!alloc_cpumask_var(&pinst->omask, GFP_KERNEL)) pinst 1007 kernel/padata.c INIT_LIST_HEAD(&pinst->pslist); pinst 1009 kernel/padata.c cpumask_copy(pinst->cpumask.pcpu, pcpumask); pinst 1010 kernel/padata.c cpumask_copy(pinst->cpumask.cbcpu, cbcpumask); pinst 1011 kernel/padata.c cpumask_and(pinst->rcpumask.pcpu, pcpumask, cpu_online_mask); pinst 1012 kernel/padata.c cpumask_and(pinst->rcpumask.cbcpu, cbcpumask, cpu_online_mask); pinst 1014 kernel/padata.c if (padata_setup_cpumasks(pinst)) pinst 1017 kernel/padata.c pinst->flags = 0; pinst 1019 kernel/padata.c BLOCKING_INIT_NOTIFIER_HEAD(&pinst->cpumask_change_notifier); pinst 1020 kernel/padata.c kobject_init(&pinst->kobj, &padata_attr_type); pinst 1021 kernel/padata.c mutex_init(&pinst->lock); pinst 1025 kernel/padata.c &pinst->cpu_online_node); pinst 1027 kernel/padata.c &pinst->cpu_dead_node); pinst 1032 kernel/padata.c return pinst; pinst 1035 kernel/padata.c free_cpumask_var(pinst->omask); pinst 1037 kernel/padata.c free_cpumask_var(pinst->rcpumask.cbcpu); pinst 1039 kernel/padata.c free_cpumask_var(pinst->rcpumask.pcpu); pinst 1041 kernel/padata.c free_cpumask_var(pinst->cpumask.pcpu); pinst 1042 kernel/padata.c free_cpumask_var(pinst->cpumask.cbcpu); pinst 1044 kernel/padata.c destroy_workqueue(pinst->serial_wq); pinst 1047 kernel/padata.c destroy_workqueue(pinst->parallel_wq); pinst 1049 kernel/padata.c kfree(pinst); pinst 1072 kernel/padata.c void padata_free(struct padata_instance *pinst) pinst 1074 kernel/padata.c kobject_put(&pinst->kobj); pinst 1083 kernel/padata.c struct padata_shell *padata_alloc_shell(struct padata_instance *pinst) pinst 1092 kernel/padata.c ps->pinst = pinst; pinst 1101 kernel/padata.c mutex_lock(&pinst->lock); pinst 1103 kernel/padata.c list_add(&ps->list, &pinst->pslist); pinst 1104 kernel/padata.c mutex_unlock(&pinst->lock); pinst 1122 kernel/padata.c struct padata_instance *pinst = ps->pinst; pinst 1124 kernel/padata.c mutex_lock(&pinst->lock); pinst 1127 kernel/padata.c mutex_unlock(&pinst->lock);