Lines Matching refs:percpu

1474 static struct page **to_addr_page(struct raid5_percpu *percpu, int i)  in to_addr_page()  argument
1476 return percpu->scribble + i * percpu->scribble_obj_size; in to_addr_page()
1481 struct raid5_percpu *percpu, int i) in to_addr_conv() argument
1483 return (void *) (to_addr_page(percpu, i) + sh->disks + 2); in to_addr_conv()
1490 to_addr_offs(struct stripe_head *sh, struct raid5_percpu *percpu) in to_addr_offs() argument
1492 return (unsigned int *) (to_addr_conv(sh, percpu, 0) + sh->disks + 2); in to_addr_offs()
1496 ops_run_compute5(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute5() argument
1499 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_compute5()
1500 unsigned int *off_srcs = to_addr_offs(sh, percpu); in ops_run_compute5()
1526 ops_complete_compute, sh, to_addr_conv(sh, percpu, 0)); in ops_run_compute5()
1593 ops_run_compute6_1(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_1() argument
1596 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_1()
1597 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_compute6_1()
1633 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1648 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1657 ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_2() argument
1668 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_2()
1669 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_compute6_2()
1715 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1743 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1751 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1759 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1792 ops_run_prexor5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor5() argument
1796 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_prexor5()
1797 unsigned int *off_srcs = to_addr_offs(sh, percpu); in ops_run_prexor5()
1826 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor5()
1834 ops_run_prexor6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor6() argument
1837 struct page **blocks = to_addr_page(percpu, 0); in ops_run_prexor6()
1838 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_prexor6()
1848 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor6()
1975 ops_run_reconstruct5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct5() argument
2008 xor_srcs = to_addr_page(percpu, j); in ops_run_reconstruct5()
2009 off_srcs = to_addr_offs(sh, percpu); in ops_run_reconstruct5()
2051 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
2055 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
2073 ops_run_reconstruct6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct6() argument
2102 blocks = to_addr_page(percpu, j); in ops_run_reconstruct6()
2103 offs = to_addr_offs(sh, percpu); in ops_run_reconstruct6()
2121 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
2124 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
2147 static void ops_run_check_p(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_check_p() argument
2154 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_check_p()
2155 unsigned int *off_srcs = to_addr_offs(sh, percpu); in ops_run_check_p()
2178 to_addr_conv(sh, percpu, 0)); in ops_run_check_p()
2188 static void ops_run_check_pq(struct stripe_head *sh, struct raid5_percpu *percpu, int checkp) in ops_run_check_pq() argument
2190 struct page **srcs = to_addr_page(percpu, 0); in ops_run_check_pq()
2191 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_check_pq()
2205 sh, to_addr_conv(sh, percpu, 0)); in ops_run_check_pq()
2208 &sh->ops.zero_sum_result, percpu->spare_page, 0, &submit); in ops_run_check_pq()
2217 struct raid5_percpu *percpu; in raid_run_ops() local
2221 percpu = per_cpu_ptr(conf->percpu, cpu); in raid_run_ops()
2229 tx = ops_run_compute5(sh, percpu); in raid_run_ops()
2232 tx = ops_run_compute6_1(sh, percpu); in raid_run_ops()
2234 tx = ops_run_compute6_2(sh, percpu); in raid_run_ops()
2243 tx = ops_run_prexor5(sh, percpu, tx); in raid_run_ops()
2245 tx = ops_run_prexor6(sh, percpu, tx); in raid_run_ops()
2249 tx = ops_run_partial_parity(sh, percpu, tx); in raid_run_ops()
2258 ops_run_reconstruct5(sh, percpu, tx); in raid_run_ops()
2260 ops_run_reconstruct6(sh, percpu, tx); in raid_run_ops()
2265 ops_run_check_p(sh, percpu); in raid_run_ops()
2267 ops_run_check_pq(sh, percpu, 0); in raid_run_ops()
2269 ops_run_check_pq(sh, percpu, 1); in raid_run_ops()
2401 static int scribble_alloc(struct raid5_percpu *percpu, in scribble_alloc() argument
2419 kvfree(percpu->scribble); in scribble_alloc()
2421 percpu->scribble = scribble; in scribble_alloc()
2422 percpu->scribble_obj_size = obj_size; in scribble_alloc()
2443 struct raid5_percpu *percpu; in resize_chunks() local
2445 percpu = per_cpu_ptr(conf->percpu, cpu); in resize_chunks()
2446 err = scribble_alloc(percpu, new_disks, in resize_chunks()
7029 static void free_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in free_scratch_buffer() argument
7031 safe_put_page(percpu->spare_page); in free_scratch_buffer()
7032 percpu->spare_page = NULL; in free_scratch_buffer()
7033 kvfree(percpu->scribble); in free_scratch_buffer()
7034 percpu->scribble = NULL; in free_scratch_buffer()
7037 static int alloc_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in alloc_scratch_buffer() argument
7039 if (conf->level == 6 && !percpu->spare_page) { in alloc_scratch_buffer()
7040 percpu->spare_page = alloc_page(GFP_KERNEL); in alloc_scratch_buffer()
7041 if (!percpu->spare_page) in alloc_scratch_buffer()
7045 if (scribble_alloc(percpu, in alloc_scratch_buffer()
7051 free_scratch_buffer(conf, percpu); in alloc_scratch_buffer()
7062 free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid456_cpu_dead()
7068 if (!conf->percpu) in raid5_free_percpu()
7072 free_percpu(conf->percpu); in raid5_free_percpu()
7098 struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu); in raid456_cpu_up_prepare() local
7100 if (alloc_scratch_buffer(conf, percpu)) { in raid456_cpu_up_prepare()
7112 conf->percpu = alloc_percpu(struct raid5_percpu); in raid5_alloc_percpu()
7113 if (!conf->percpu) in raid5_alloc_percpu()