Searched refs:pr_reg (Results 1 - 35 of 35) sorted by relevance

/linux-4.1.27/arch/cris/include/arch-v32/arch/
H A Delf.h41 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
42 pr_reg[0] = regs->r0; \
43 pr_reg[1] = regs->r1; \
44 pr_reg[2] = regs->r2; \
45 pr_reg[3] = regs->r3; \
46 pr_reg[4] = regs->r4; \
47 pr_reg[5] = regs->r5; \
48 pr_reg[6] = regs->r6; \
49 pr_reg[7] = regs->r7; \
50 pr_reg[8] = regs->r8; \
51 pr_reg[9] = regs->r9; \
52 pr_reg[10] = regs->r10; \
53 pr_reg[11] = regs->r11; \
54 pr_reg[12] = regs->r12; \
55 pr_reg[13] = regs->r13; \
56 pr_reg[14] = rdusp(); /* SP */ \
57 pr_reg[15] = regs->acr; /* ACR */ \
58 pr_reg[16] = 0; /* BZ */ \
59 pr_reg[17] = rdvr(); /* VR */ \
60 pr_reg[18] = 0; /* PID */ \
61 pr_reg[19] = regs->srs; /* SRS */ \
62 pr_reg[20] = 0; /* WZ */ \
63 pr_reg[21] = regs->exs; /* EXS */ \
64 pr_reg[22] = regs->eda; /* EDA */ \
65 pr_reg[23] = regs->mof; /* MOF */ \
66 pr_reg[24] = 0; /* DZ */ \
67 pr_reg[25] = 0; /* EBP */ \
68 pr_reg[26] = regs->erp; /* ERP */ \
69 pr_reg[27] = regs->srp; /* SRP */ \
70 pr_reg[28] = 0; /* NRP */ \
71 pr_reg[29] = regs->ccs; /* CCS */ \
72 pr_reg[30] = rdusp(); /* USP */ \
73 pr_reg[31] = regs->spc; /* SPC */ \
/linux-4.1.27/arch/cris/include/arch-v10/arch/
H A Delf.h40 the pt_regs struct, but needed in a core dump. pr_reg is a elf_gregset_t,
45 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
46 pr_reg[0] = regs->r0; \
47 pr_reg[1] = regs->r1; \
48 pr_reg[2] = regs->r2; \
49 pr_reg[3] = regs->r3; \
50 pr_reg[4] = regs->r4; \
51 pr_reg[5] = regs->r5; \
52 pr_reg[6] = regs->r6; \
53 pr_reg[7] = regs->r7; \
54 pr_reg[8] = regs->r8; \
55 pr_reg[9] = regs->r9; \
56 pr_reg[10] = regs->r10; \
57 pr_reg[11] = regs->r11; \
58 pr_reg[12] = regs->r12; \
59 pr_reg[13] = regs->r13; \
60 pr_reg[14] = rdusp(); /* sp */ \
61 pr_reg[15] = regs->irp; /* pc */ \
62 pr_reg[16] = 0; /* p0 */ \
63 pr_reg[17] = rdvr(); /* vr */ \
64 pr_reg[18] = 0; /* p2 */ \
65 pr_reg[19] = 0; /* p3 */ \
66 pr_reg[20] = 0; /* p4 */ \
67 pr_reg[21] = (regs->dccr & 0xffff); /* ccr */ \
68 pr_reg[22] = 0; /* p6 */ \
69 pr_reg[23] = regs->mof; /* mof */ \
70 pr_reg[24] = 0; /* p8 */ \
71 pr_reg[25] = 0; /* ibr */ \
72 pr_reg[26] = 0; /* irp */ \
73 pr_reg[27] = regs->srp; /* srp */ \
74 pr_reg[28] = 0; /* bar */ \
75 pr_reg[29] = regs->dccr; /* dccr */ \
76 pr_reg[30] = 0; /* brp */ \
77 pr_reg[31] = rdusp(); /* usp */ \
78 pr_reg[32] = 0; /* csrinstr */ \
79 pr_reg[33] = 0; /* csraddr */ \
80 pr_reg[34] = 0; /* csrdata */
/linux-4.1.27/arch/nios2/include/asm/
H A Delf.h41 /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
48 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
51 pr_reg[0] = regs->r8; \
52 pr_reg[1] = regs->r9; \
53 pr_reg[2] = regs->r10; \
54 pr_reg[3] = regs->r11; \
55 pr_reg[4] = regs->r12; \
56 pr_reg[5] = regs->r13; \
57 pr_reg[6] = regs->r14; \
58 pr_reg[7] = regs->r15; \
59 pr_reg[8] = regs->r1; \
60 pr_reg[9] = regs->r2; \
61 pr_reg[10] = regs->r3; \
62 pr_reg[11] = regs->r4; \
63 pr_reg[12] = regs->r5; \
64 pr_reg[13] = regs->r6; \
65 pr_reg[14] = regs->r7; \
66 pr_reg[15] = regs->orig_r2; \
67 pr_reg[16] = regs->ra; \
68 pr_reg[17] = regs->fp; \
69 pr_reg[18] = regs->sp; \
70 pr_reg[19] = regs->gp; \
71 pr_reg[20] = regs->estatus; \
72 pr_reg[21] = regs->ea; \
73 pr_reg[22] = regs->orig_r7; \
76 pr_reg[23] = sw->r16; \
77 pr_reg[24] = sw->r17; \
78 pr_reg[25] = sw->r18; \
79 pr_reg[26] = sw->r19; \
80 pr_reg[27] = sw->r20; \
81 pr_reg[28] = sw->r21; \
82 pr_reg[29] = sw->r22; \
83 pr_reg[30] = sw->r23; \
84 pr_reg[31] = sw->fp; \
85 pr_reg[32] = sw->gp; \
86 pr_reg[33] = sw->ra; \
/linux-4.1.27/arch/x86/um/asm/
H A Delf.h48 #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \
49 pr_reg[0] = PT_REGS_BX(regs); \
50 pr_reg[1] = PT_REGS_CX(regs); \
51 pr_reg[2] = PT_REGS_DX(regs); \
52 pr_reg[3] = PT_REGS_SI(regs); \
53 pr_reg[4] = PT_REGS_DI(regs); \
54 pr_reg[5] = PT_REGS_BP(regs); \
55 pr_reg[6] = PT_REGS_AX(regs); \
56 pr_reg[7] = PT_REGS_DS(regs); \
57 pr_reg[8] = PT_REGS_ES(regs); \
59 pr_reg[9] = PT_REGS_DS(regs); \
60 pr_reg[10] = PT_REGS_DS(regs); \
61 pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \
62 pr_reg[12] = PT_REGS_IP(regs); \
63 pr_reg[13] = PT_REGS_CS(regs); \
64 pr_reg[14] = PT_REGS_EFLAGS(regs); \
65 pr_reg[15] = PT_REGS_SP(regs); \
66 pr_reg[16] = PT_REGS_SS(regs); \
150 #define ELF_CORE_COPY_REGS(pr_reg, _regs) \
151 (pr_reg)[0] = (_regs)->regs.gp[0]; \
152 (pr_reg)[1] = (_regs)->regs.gp[1]; \
153 (pr_reg)[2] = (_regs)->regs.gp[2]; \
154 (pr_reg)[3] = (_regs)->regs.gp[3]; \
155 (pr_reg)[4] = (_regs)->regs.gp[4]; \
156 (pr_reg)[5] = (_regs)->regs.gp[5]; \
157 (pr_reg)[6] = (_regs)->regs.gp[6]; \
158 (pr_reg)[7] = (_regs)->regs.gp[7]; \
159 (pr_reg)[8] = (_regs)->regs.gp[8]; \
160 (pr_reg)[9] = (_regs)->regs.gp[9]; \
161 (pr_reg)[10] = (_regs)->regs.gp[10]; \
162 (pr_reg)[11] = (_regs)->regs.gp[11]; \
163 (pr_reg)[12] = (_regs)->regs.gp[12]; \
164 (pr_reg)[13] = (_regs)->regs.gp[13]; \
165 (pr_reg)[14] = (_regs)->regs.gp[14]; \
166 (pr_reg)[15] = (_regs)->regs.gp[15]; \
167 (pr_reg)[16] = (_regs)->regs.gp[16]; \
168 (pr_reg)[17] = (_regs)->regs.gp[17]; \
169 (pr_reg)[18] = (_regs)->regs.gp[18]; \
170 (pr_reg)[19] = (_regs)->regs.gp[19]; \
171 (pr_reg)[20] = (_regs)->regs.gp[20]; \
172 (pr_reg)[21] = current->thread.arch.fs; \
173 (pr_reg)[22] = 0; \
174 (pr_reg)[23] = 0; \
175 (pr_reg)[24] = 0; \
176 (pr_reg)[25] = 0; \
177 (pr_reg)[26] = 0;
/linux-4.1.27/arch/m68k/include/asm/
H A Delf.h79 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
81 pr_reg[0] = regs->d1; \
82 pr_reg[1] = regs->d2; \
83 pr_reg[2] = regs->d3; \
84 pr_reg[3] = regs->d4; \
85 pr_reg[4] = regs->d5; \
86 pr_reg[7] = regs->a0; \
87 pr_reg[8] = regs->a1; \
88 pr_reg[9] = regs->a2; \
89 pr_reg[14] = regs->d0; \
90 pr_reg[15] = rdusp(); \
91 pr_reg[16] = regs->orig_d0; \
92 pr_reg[17] = regs->sr; \
93 pr_reg[18] = regs->pc; \
94 pr_reg[19] = (regs->format << 12) | regs->vector; \
97 pr_reg[5] = sw->d6; \
98 pr_reg[6] = sw->d7; \
99 pr_reg[10] = sw->a3; \
100 pr_reg[11] = sw->a4; \
101 pr_reg[12] = sw->a5; \
102 pr_reg[13] = sw->a6; \
/linux-4.1.27/arch/mn10300/include/asm/
H A Delf.h97 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
101 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
103 pr_reg[0] = regs->a3; \
104 pr_reg[1] = regs->a2; \
105 pr_reg[2] = regs->d3; \
106 pr_reg[3] = regs->d2; \
107 pr_reg[4] = regs->mcvf; \
108 pr_reg[5] = regs->mcrl; \
109 pr_reg[6] = regs->mcrh; \
110 pr_reg[7] = regs->mdrq; \
111 pr_reg[8] = regs->e1; \
112 pr_reg[9] = regs->e0; \
113 pr_reg[10] = regs->e7; \
114 pr_reg[11] = regs->e6; \
115 pr_reg[12] = regs->e5; \
116 pr_reg[13] = regs->e4; \
117 pr_reg[14] = regs->e3; \
118 pr_reg[15] = regs->e2; \
119 pr_reg[16] = regs->sp; \
120 pr_reg[17] = regs->lar; \
121 pr_reg[18] = regs->lir; \
122 pr_reg[19] = regs->mdr; \
123 pr_reg[20] = regs->a1; \
124 pr_reg[21] = regs->a0; \
125 pr_reg[22] = regs->d1; \
126 pr_reg[23] = regs->d0; \
127 pr_reg[24] = regs->orig_d0; \
128 pr_reg[25] = regs->epsw; \
129 pr_reg[26] = regs->pc; \
/linux-4.1.27/arch/x86/include/asm/
H A Delf.h116 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
120 #define ELF_CORE_COPY_REGS_COMMON(pr_reg, regs) \
122 pr_reg[0] = regs->bx; \
123 pr_reg[1] = regs->cx; \
124 pr_reg[2] = regs->dx; \
125 pr_reg[3] = regs->si; \
126 pr_reg[4] = regs->di; \
127 pr_reg[5] = regs->bp; \
128 pr_reg[6] = regs->ax; \
129 pr_reg[7] = regs->ds & 0xffff; \
130 pr_reg[8] = regs->es & 0xffff; \
131 pr_reg[9] = regs->fs & 0xffff; \
132 pr_reg[11] = regs->orig_ax; \
133 pr_reg[12] = regs->ip; \
134 pr_reg[13] = regs->cs & 0xffff; \
135 pr_reg[14] = regs->flags; \
136 pr_reg[15] = regs->sp; \
137 pr_reg[16] = regs->ss & 0xffff; \
140 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
142 ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\
143 pr_reg[10] = get_user_gs(regs); \
146 #define ELF_CORE_COPY_KERNEL_REGS(pr_reg, regs) \
148 ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\
149 savesegment(gs, pr_reg[10]); \
200 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
205 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
208 (pr_reg)[0] = (regs)->r15; \
209 (pr_reg)[1] = (regs)->r14; \
210 (pr_reg)[2] = (regs)->r13; \
211 (pr_reg)[3] = (regs)->r12; \
212 (pr_reg)[4] = (regs)->bp; \
213 (pr_reg)[5] = (regs)->bx; \
214 (pr_reg)[6] = (regs)->r11; \
215 (pr_reg)[7] = (regs)->r10; \
216 (pr_reg)[8] = (regs)->r9; \
217 (pr_reg)[9] = (regs)->r8; \
218 (pr_reg)[10] = (regs)->ax; \
219 (pr_reg)[11] = (regs)->cx; \
220 (pr_reg)[12] = (regs)->dx; \
221 (pr_reg)[13] = (regs)->si; \
222 (pr_reg)[14] = (regs)->di; \
223 (pr_reg)[15] = (regs)->orig_ax; \
224 (pr_reg)[16] = (regs)->ip; \
225 (pr_reg)[17] = (regs)->cs; \
226 (pr_reg)[18] = (regs)->flags; \
227 (pr_reg)[19] = (regs)->sp; \
228 (pr_reg)[20] = (regs)->ss; \
229 (pr_reg)[21] = current->thread.fs; \
230 (pr_reg)[22] = current->thread.gs; \
231 asm("movl %%ds,%0" : "=r" (v)); (pr_reg)[23] = v; \
232 asm("movl %%es,%0" : "=r" (v)); (pr_reg)[24] = v; \
233 asm("movl %%fs,%0" : "=r" (v)); (pr_reg)[25] = v; \
234 asm("movl %%gs,%0" : "=r" (v)); (pr_reg)[26] = v; \
H A Dcompat.h262 * The type of struct elf_prstatus.pr_reg in compatible core dumps.
270 do { *(int *) (((void *) &((S)->pr_reg)) + PR_REG_SIZE(0)) = (V); } \
/linux-4.1.27/drivers/target/
H A Dtarget_core_pr.c57 struct t10_pr_registration *pr_reg, core_pr_dump_initiator_port()
61 if (!pr_reg->isid_present_at_reg) core_pr_dump_initiator_port()
64 snprintf(buf, size, ",i,0x%s", pr_reg->pr_reg_isid); core_pr_dump_initiator_port()
83 struct t10_pr_registration *pr_reg) is_reservation_holder()
90 return pr_res_holder == pr_reg || is_reservation_holder()
134 struct t10_pr_registration *pr_reg; target_check_scsi2_reservation_conflict() local
138 pr_reg = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, target_check_scsi2_reservation_conflict()
140 if (pr_reg) { target_check_scsi2_reservation_conflict()
162 if (pr_reg->pr_res_holder) { target_check_scsi2_reservation_conflict()
163 core_scsi3_put_pr_reg(pr_reg); target_check_scsi2_reservation_conflict()
166 if ((pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_REGONLY) || target_check_scsi2_reservation_conflict()
167 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_REGONLY) || target_check_scsi2_reservation_conflict()
168 (pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) || target_check_scsi2_reservation_conflict()
169 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG)) { target_check_scsi2_reservation_conflict()
170 core_scsi3_put_pr_reg(pr_reg); target_check_scsi2_reservation_conflict()
173 core_scsi3_put_pr_reg(pr_reg); target_check_scsi2_reservation_conflict()
632 struct t10_pr_registration *pr_reg; __core_scsi3_do_alloc_registration() local
634 pr_reg = kmem_cache_zalloc(t10_pr_reg_cache, GFP_ATOMIC); __core_scsi3_do_alloc_registration()
635 if (!pr_reg) { __core_scsi3_do_alloc_registration()
640 INIT_LIST_HEAD(&pr_reg->pr_reg_list); __core_scsi3_do_alloc_registration()
641 INIT_LIST_HEAD(&pr_reg->pr_reg_abort_list); __core_scsi3_do_alloc_registration()
642 INIT_LIST_HEAD(&pr_reg->pr_reg_aptpl_list); __core_scsi3_do_alloc_registration()
643 INIT_LIST_HEAD(&pr_reg->pr_reg_atp_list); __core_scsi3_do_alloc_registration()
644 INIT_LIST_HEAD(&pr_reg->pr_reg_atp_mem_list); __core_scsi3_do_alloc_registration()
645 atomic_set(&pr_reg->pr_res_holders, 0); __core_scsi3_do_alloc_registration()
646 pr_reg->pr_reg_nacl = nacl; __core_scsi3_do_alloc_registration()
647 pr_reg->pr_reg_deve = deve; __core_scsi3_do_alloc_registration()
648 pr_reg->pr_res_mapped_lun = deve->mapped_lun; __core_scsi3_do_alloc_registration()
649 pr_reg->pr_aptpl_target_lun = deve->se_lun->unpacked_lun; __core_scsi3_do_alloc_registration()
650 pr_reg->pr_res_key = sa_res_key; __core_scsi3_do_alloc_registration()
651 pr_reg->pr_reg_all_tg_pt = all_tg_pt; __core_scsi3_do_alloc_registration()
652 pr_reg->pr_reg_aptpl = aptpl; __core_scsi3_do_alloc_registration()
653 pr_reg->pr_reg_tg_pt_lun = deve->se_lun; __core_scsi3_do_alloc_registration()
659 pr_reg->pr_reg_bin_isid = get_unaligned_be64(isid); __core_scsi3_do_alloc_registration()
660 snprintf(pr_reg->pr_reg_isid, PR_REG_ISID_LEN, "%s", isid); __core_scsi3_do_alloc_registration()
661 pr_reg->isid_present_at_reg = 1; __core_scsi3_do_alloc_registration()
664 return pr_reg; __core_scsi3_do_alloc_registration()
687 struct t10_pr_registration *pr_reg, *pr_reg_atp, *pr_reg_tmp, *pr_reg_tmp_safe; __core_scsi3_alloc_registration() local
693 pr_reg = __core_scsi3_do_alloc_registration(dev, nacl, deve, isid, __core_scsi3_alloc_registration()
695 if (!pr_reg) __core_scsi3_alloc_registration()
698 * Return pointer to pr_reg for ALL_TG_PT=0 __core_scsi3_alloc_registration()
701 return pr_reg; __core_scsi3_alloc_registration()
761 * pr_reg->pr_reg_atp_list that will be processed once __core_scsi3_alloc_registration()
762 * the original *pr_reg is processed in __core_scsi3_alloc_registration()
776 &pr_reg->pr_reg_atp_list); __core_scsi3_alloc_registration()
786 return pr_reg; __core_scsi3_alloc_registration()
789 &pr_reg->pr_reg_atp_list, pr_reg_atp_mem_list) { __core_scsi3_alloc_registration()
794 kmem_cache_free(t10_pr_reg_cache, pr_reg); __core_scsi3_alloc_registration()
811 struct t10_pr_registration *pr_reg; core_scsi3_alloc_aptpl_registration() local
818 pr_reg = kmem_cache_zalloc(t10_pr_reg_cache, GFP_KERNEL); core_scsi3_alloc_aptpl_registration()
819 if (!pr_reg) { core_scsi3_alloc_aptpl_registration()
824 INIT_LIST_HEAD(&pr_reg->pr_reg_list); core_scsi3_alloc_aptpl_registration()
825 INIT_LIST_HEAD(&pr_reg->pr_reg_abort_list); core_scsi3_alloc_aptpl_registration()
826 INIT_LIST_HEAD(&pr_reg->pr_reg_aptpl_list); core_scsi3_alloc_aptpl_registration()
827 INIT_LIST_HEAD(&pr_reg->pr_reg_atp_list); core_scsi3_alloc_aptpl_registration()
828 INIT_LIST_HEAD(&pr_reg->pr_reg_atp_mem_list); core_scsi3_alloc_aptpl_registration()
829 atomic_set(&pr_reg->pr_res_holders, 0); core_scsi3_alloc_aptpl_registration()
830 pr_reg->pr_reg_nacl = NULL; core_scsi3_alloc_aptpl_registration()
831 pr_reg->pr_reg_deve = NULL; core_scsi3_alloc_aptpl_registration()
832 pr_reg->pr_res_mapped_lun = mapped_lun; core_scsi3_alloc_aptpl_registration()
833 pr_reg->pr_aptpl_target_lun = target_lun; core_scsi3_alloc_aptpl_registration()
834 pr_reg->pr_res_key = sa_res_key; core_scsi3_alloc_aptpl_registration()
835 pr_reg->pr_reg_all_tg_pt = all_tg_pt; core_scsi3_alloc_aptpl_registration()
836 pr_reg->pr_reg_aptpl = 1; core_scsi3_alloc_aptpl_registration()
837 pr_reg->pr_reg_tg_pt_lun = NULL; core_scsi3_alloc_aptpl_registration()
838 pr_reg->pr_res_scope = 0; /* Always LUN_SCOPE */ core_scsi3_alloc_aptpl_registration()
839 pr_reg->pr_res_type = type; core_scsi3_alloc_aptpl_registration()
845 pr_reg->pr_reg_bin_isid = get_unaligned_be64(isid); core_scsi3_alloc_aptpl_registration()
846 snprintf(pr_reg->pr_reg_isid, PR_REG_ISID_LEN, "%s", isid); core_scsi3_alloc_aptpl_registration()
847 pr_reg->isid_present_at_reg = 1; core_scsi3_alloc_aptpl_registration()
852 snprintf(pr_reg->pr_iport, PR_APTPL_MAX_IPORT_LEN, "%s", i_port); core_scsi3_alloc_aptpl_registration()
853 snprintf(pr_reg->pr_tport, PR_APTPL_MAX_TPORT_LEN, "%s", t_port); core_scsi3_alloc_aptpl_registration()
854 pr_reg->pr_reg_tpgt = tpgt; core_scsi3_alloc_aptpl_registration()
856 * Set pr_res_holder from caller, the pr_reg who is the reservation core_scsi3_alloc_aptpl_registration()
861 pr_reg->pr_res_holder = res_holder; core_scsi3_alloc_aptpl_registration()
863 list_add_tail(&pr_reg->pr_reg_aptpl_list, &pr_tmpl->aptpl_reg_list); core_scsi3_alloc_aptpl_registration()
873 struct t10_pr_registration *pr_reg) core_scsi3_aptpl_reserve()
878 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); core_scsi3_aptpl_reserve()
881 dev->dev_pr_res_holder = pr_reg; core_scsi3_aptpl_reserve()
887 core_scsi3_pr_dump_type(pr_reg->pr_res_type), core_scsi3_aptpl_reserve()
888 (pr_reg->pr_reg_all_tg_pt) ? 1 : 0); core_scsi3_aptpl_reserve()
905 struct t10_pr_registration *pr_reg, *pr_reg_tmp; __core_scsi3_check_aptpl_registration() local
927 list_for_each_entry_safe(pr_reg, pr_reg_tmp, &pr_tmpl->aptpl_reg_list, __core_scsi3_check_aptpl_registration()
930 if (!strcmp(pr_reg->pr_iport, i_port) && __core_scsi3_check_aptpl_registration()
931 (pr_reg->pr_res_mapped_lun == deve->mapped_lun) && __core_scsi3_check_aptpl_registration()
932 !(strcmp(pr_reg->pr_tport, t_port)) && __core_scsi3_check_aptpl_registration()
933 (pr_reg->pr_reg_tpgt == tpgt) && __core_scsi3_check_aptpl_registration()
934 (pr_reg->pr_aptpl_target_lun == target_lun)) { __core_scsi3_check_aptpl_registration()
936 pr_reg->pr_reg_nacl = nacl; __core_scsi3_check_aptpl_registration()
937 pr_reg->pr_reg_deve = deve; __core_scsi3_check_aptpl_registration()
938 pr_reg->pr_reg_tg_pt_lun = lun; __core_scsi3_check_aptpl_registration()
940 list_del(&pr_reg->pr_reg_aptpl_list); __core_scsi3_check_aptpl_registration()
943 * At this point all of the pointers in *pr_reg will __core_scsi3_check_aptpl_registration()
947 __core_scsi3_add_registration(dev, nacl, pr_reg, 0, 0); __core_scsi3_check_aptpl_registration()
952 if (pr_reg->pr_res_holder) __core_scsi3_check_aptpl_registration()
954 nacl, pr_reg); __core_scsi3_check_aptpl_registration()
988 struct t10_pr_registration *pr_reg, __core_scsi3_dump_registration()
995 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); __core_scsi3_dump_registration()
1007 (pr_reg->pr_reg_all_tg_pt) ? "ALL" : "SINGLE", __core_scsi3_dump_registration()
1011 pr_reg->pr_res_key, pr_reg->pr_res_generation, __core_scsi3_dump_registration()
1012 pr_reg->pr_reg_aptpl); __core_scsi3_dump_registration()
1022 struct t10_pr_registration *pr_reg, __core_scsi3_add_registration()
1039 pr_reg->pr_res_generation = (register_move) ? __core_scsi3_add_registration()
1044 list_add_tail(&pr_reg->pr_reg_list, &pr_tmpl->registration_list); __core_scsi3_add_registration()
1045 pr_reg->pr_reg_deve->def_pr_registered = 1; __core_scsi3_add_registration()
1047 __core_scsi3_dump_registration(tfo, dev, nacl, pr_reg, register_type); __core_scsi3_add_registration()
1052 if (!pr_reg->pr_reg_all_tg_pt || register_move) __core_scsi3_add_registration()
1055 * Walk pr_reg->pr_reg_atp_list and add registrations for ALL_TG_PT=1 __core_scsi3_add_registration()
1059 &pr_reg->pr_reg_atp_list, pr_reg_atp_mem_list) { __core_scsi3_add_registration()
1092 struct t10_pr_registration *pr_reg; core_scsi3_alloc_registration() local
1094 pr_reg = __core_scsi3_alloc_registration(dev, nacl, deve, isid, core_scsi3_alloc_registration()
1096 if (!pr_reg) core_scsi3_alloc_registration()
1099 __core_scsi3_add_registration(dev, nacl, pr_reg, core_scsi3_alloc_registration()
1110 struct t10_pr_registration *pr_reg, *pr_reg_tmp; __core_scsi3_locate_pr_reg() local
1114 list_for_each_entry_safe(pr_reg, pr_reg_tmp, __core_scsi3_locate_pr_reg()
1119 if (pr_reg->pr_reg_nacl != nacl) __core_scsi3_locate_pr_reg()
1122 tpg = pr_reg->pr_reg_nacl->se_tpg; __core_scsi3_locate_pr_reg()
1127 if (!pr_reg->isid_present_at_reg) { __core_scsi3_locate_pr_reg()
1137 atomic_inc_mb(&pr_reg->pr_res_holders); __core_scsi3_locate_pr_reg()
1139 return pr_reg; __core_scsi3_locate_pr_reg()
1142 * If the *pr_reg contains a fabric defined ISID for multi-value __core_scsi3_locate_pr_reg()
1148 if (strcmp(isid, pr_reg->pr_reg_isid)) __core_scsi3_locate_pr_reg()
1151 atomic_inc_mb(&pr_reg->pr_res_holders); __core_scsi3_locate_pr_reg()
1153 return pr_reg; __core_scsi3_locate_pr_reg()
1178 static void core_scsi3_put_pr_reg(struct t10_pr_registration *pr_reg) core_scsi3_put_pr_reg() argument
1180 atomic_dec_mb(&pr_reg->pr_res_holders); core_scsi3_put_pr_reg()
1185 struct t10_pr_registration *pr_reg) core_scsi3_check_implicit_release()
1187 struct se_node_acl *nacl = pr_reg->pr_reg_nacl; core_scsi3_check_implicit_release()
1197 if (pr_res_holder == pr_reg) { core_scsi3_check_implicit_release()
1211 __core_scsi3_complete_pro_release(dev, nacl, pr_reg, 0, 1); core_scsi3_check_implicit_release()
1219 } else if (pr_reg->pr_reg_all_tg_pt && core_scsi3_check_implicit_release()
1221 pr_reg->pr_reg_nacl->initiatorname)) && core_scsi3_check_implicit_release()
1222 (pr_res_holder->pr_res_key == pr_reg->pr_res_key)) { core_scsi3_check_implicit_release()
1226 " Port\n", pr_reg->pr_res_key); core_scsi3_check_implicit_release()
1239 struct t10_pr_registration *pr_reg,
1246 pr_reg->pr_reg_nacl->se_tpg->se_tpg_tfo;
1251 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN);
1253 pr_reg->pr_reg_deve->def_pr_registered = 0;
1254 pr_reg->pr_reg_deve->pr_res_key = 0;
1255 if (!list_empty(&pr_reg->pr_reg_list))
1256 list_del(&pr_reg->pr_reg_list);
1258 * Caller accessing *pr_reg using core_scsi3_locate_pr_reg(),
1262 core_scsi3_put_pr_reg(pr_reg); variable
1265 * *pr_reg have been released. Because list_del() is called above,
1266 * the last core_scsi3_put_pr_reg(pr_reg) will release this reference
1267 * count back to zero, and we release *pr_reg.
1269 while (atomic_read(&pr_reg->pr_res_holders) != 0) {
1279 pr_reg->pr_reg_nacl->initiatorname,
1283 (pr_reg->pr_reg_all_tg_pt) ? "ALL" : "SINGLE",
1286 " 0x%08x\n", tfo->get_fabric_name(), pr_reg->pr_res_key,
1287 pr_reg->pr_res_generation);
1290 pr_reg->pr_reg_deve = NULL;
1291 pr_reg->pr_reg_nacl = NULL;
1292 kmem_cache_free(t10_pr_reg_cache, pr_reg);
1296 * For PREEMPT_AND_ABORT, the list of *pr_reg in preempt_and_abort_list
1299 list_add_tail(&pr_reg->pr_reg_abort_list, preempt_and_abort_list);
1307 struct t10_pr_registration *pr_reg, *pr_reg_tmp, *pr_res_holder; core_scsi3_free_pr_reg_from_nacl() local
1328 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_free_pr_reg_from_nacl()
1331 if (pr_reg->pr_reg_nacl != nacl) core_scsi3_free_pr_reg_from_nacl()
1334 __core_scsi3_free_registration(dev, pr_reg, NULL, 0); core_scsi3_free_pr_reg_from_nacl()
1343 struct t10_pr_registration *pr_reg, *pr_reg_tmp, *pr_res_holder; core_scsi3_free_all_registrations() local
1355 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_free_all_registrations()
1358 __core_scsi3_free_registration(dev, pr_reg, NULL, 0); core_scsi3_free_all_registrations()
1363 list_for_each_entry_safe(pr_reg, pr_reg_tmp, &pr_tmpl->aptpl_reg_list, core_scsi3_free_all_registrations()
1365 list_del(&pr_reg->pr_reg_aptpl_list); core_scsi3_free_all_registrations()
1366 kmem_cache_free(t10_pr_reg_cache, pr_reg); core_scsi3_free_all_registrations()
1826 struct t10_pr_registration *pr_reg; core_scsi3_update_aptpl_buf() local
1837 list_for_each_entry(pr_reg, &dev->t10_pr.registration_list, core_scsi3_update_aptpl_buf()
1842 tpg = pr_reg->pr_reg_nacl->se_tpg; core_scsi3_update_aptpl_buf()
1843 lun = pr_reg->pr_reg_tg_pt_lun; core_scsi3_update_aptpl_buf()
1848 if (pr_reg->isid_present_at_reg) core_scsi3_update_aptpl_buf()
1850 pr_reg->pr_reg_isid); core_scsi3_update_aptpl_buf()
1852 * Include special metadata if the pr_reg matches the core_scsi3_update_aptpl_buf()
1855 if (dev->dev_pr_res_holder == pr_reg) { core_scsi3_update_aptpl_buf()
1864 pr_reg->pr_reg_nacl->initiatorname, isid_buf, core_scsi3_update_aptpl_buf()
1865 pr_reg->pr_res_key, pr_reg->pr_res_type, core_scsi3_update_aptpl_buf()
1866 pr_reg->pr_res_scope, pr_reg->pr_reg_all_tg_pt, core_scsi3_update_aptpl_buf()
1867 pr_reg->pr_res_mapped_lun); core_scsi3_update_aptpl_buf()
1874 pr_reg->pr_reg_nacl->initiatorname, isid_buf, core_scsi3_update_aptpl_buf()
1875 pr_reg->pr_res_key, pr_reg->pr_reg_all_tg_pt, core_scsi3_update_aptpl_buf()
1876 pr_reg->pr_res_mapped_lun); core_scsi3_update_aptpl_buf()
2009 struct t10_pr_registration *pr_reg, *pr_reg_p, *pr_reg_tmp; core_scsi3_emulate_pro_register() local
2031 pr_reg = core_scsi3_locate_pr_reg(dev, se_sess->se_node_acl, se_sess); core_scsi3_emulate_pro_register()
2032 if (!pr_reg) { core_scsi3_emulate_pro_register()
2078 if ((register_type == REGISTER) && (res_key != pr_reg->pr_res_key)) { core_scsi3_emulate_pro_register()
2083 pr_reg->pr_res_key); core_scsi3_emulate_pro_register()
2099 if (pr_reg->pr_reg_all_tg_pt && !all_tg_pt) { core_scsi3_emulate_pro_register()
2116 pr_reg->pr_res_generation = core_scsi3_pr_generation(cmd->se_dev); core_scsi3_emulate_pro_register()
2117 pr_reg->pr_res_key = sa_res_key; core_scsi3_emulate_pro_register()
2122 pr_reg->pr_reg_nacl->initiatorname, core_scsi3_emulate_pro_register()
2123 pr_reg->pr_res_key, pr_reg->pr_res_generation); core_scsi3_emulate_pro_register()
2129 type = pr_reg->pr_res_type; core_scsi3_emulate_pro_register()
2131 pr_reg); core_scsi3_emulate_pro_register()
2142 if (pr_reg->pr_reg_all_tg_pt) { core_scsi3_emulate_pro_register()
2151 if (pr_reg == pr_reg_p) core_scsi3_emulate_pro_register()
2153 if (strcmp(pr_reg->pr_reg_nacl->initiatorname, core_scsi3_emulate_pro_register()
2165 __core_scsi3_free_registration(cmd->se_dev, pr_reg, NULL, 1); core_scsi3_emulate_pro_register()
2166 pr_reg = NULL; core_scsi3_emulate_pro_register()
2200 if (pr_reg) core_scsi3_emulate_pro_register()
2201 core_scsi3_put_pr_reg(pr_reg); core_scsi3_emulate_pro_register()
2233 struct t10_pr_registration *pr_reg, *pr_res_holder; core_scsi3_pro_reserve() local
2245 * Locate the existing *pr_reg via struct se_node_acl pointers core_scsi3_pro_reserve()
2247 pr_reg = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, core_scsi3_pro_reserve()
2249 if (!pr_reg) { core_scsi3_pro_reserve()
2251 " PR_REGISTERED *pr_reg for RESERVE\n"); core_scsi3_pro_reserve()
2263 if (res_key != pr_reg->pr_res_key) { core_scsi3_pro_reserve()
2266 " 0x%016Lx\n", res_key, pr_reg->pr_res_key); core_scsi3_pro_reserve()
2303 if (!is_reservation_holder(pr_res_holder, pr_reg)) { core_scsi3_pro_reserve()
2355 * Otherwise, our *pr_reg becomes the PR reservation holder for said core_scsi3_pro_reserve()
2356 * TYPE/SCOPE. Also set the received scope and type in *pr_reg. core_scsi3_pro_reserve()
2358 pr_reg->pr_res_scope = scope; core_scsi3_pro_reserve()
2359 pr_reg->pr_res_type = type; core_scsi3_pro_reserve()
2360 pr_reg->pr_res_holder = 1; core_scsi3_pro_reserve()
2361 dev->dev_pr_res_holder = pr_reg; core_scsi3_pro_reserve()
2362 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); core_scsi3_pro_reserve()
2367 (pr_reg->pr_reg_all_tg_pt) ? 1 : 0); core_scsi3_pro_reserve()
2379 core_scsi3_put_pr_reg(pr_reg); core_scsi3_pro_reserve()
2408 struct t10_pr_registration *pr_reg, __core_scsi3_complete_pro_release()
2417 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); __core_scsi3_complete_pro_release()
2436 list_del_init(&pr_reg->pr_reg_list); __core_scsi3_complete_pro_release()
2460 (pr_reg->pr_reg_all_tg_pt) ? 1 : 0); __core_scsi3_complete_pro_release()
2468 pr_reg->pr_res_holder = pr_reg->pr_res_type = pr_reg->pr_res_scope = 0; __core_scsi3_complete_pro_release()
2478 struct t10_pr_registration *pr_reg, *pr_reg_p, *pr_res_holder; core_scsi3_emulate_pro_release() local
2487 * Locate the existing *pr_reg via struct se_node_acl pointers core_scsi3_emulate_pro_release()
2489 pr_reg = core_scsi3_locate_pr_reg(dev, se_sess->se_node_acl, se_sess); core_scsi3_emulate_pro_release()
2490 if (!pr_reg) { core_scsi3_emulate_pro_release()
2492 " PR_REGISTERED *pr_reg for RELEASE\n"); core_scsi3_emulate_pro_release()
2517 if (!is_reservation_holder(pr_res_holder, pr_reg)) { core_scsi3_emulate_pro_release()
2540 if (res_key != pr_reg->pr_res_key) { core_scsi3_emulate_pro_release()
2543 " 0x%016Lx\n", res_key, pr_reg->pr_res_key); core_scsi3_emulate_pro_release()
2587 pr_reg, 1, 0); core_scsi3_emulate_pro_release()
2610 if (pr_reg_p == pr_reg) core_scsi3_emulate_pro_release()
2624 core_scsi3_put_pr_reg(pr_reg); core_scsi3_emulate_pro_release()
2635 struct t10_pr_registration *pr_reg, *pr_reg_tmp, *pr_reg_n, *pr_res_holder; core_scsi3_emulate_pro_clear() local
2639 * Locate the existing *pr_reg via struct se_node_acl pointers core_scsi3_emulate_pro_clear()
2645 " PR_REGISTERED *pr_reg for CLEAR\n"); core_scsi3_emulate_pro_clear()
2682 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_emulate_pro_clear()
2685 calling_it_nexus = (pr_reg_n == pr_reg) ? 1 : 0; core_scsi3_emulate_pro_clear()
2686 pr_reg_nacl = pr_reg->pr_reg_nacl; core_scsi3_emulate_pro_clear()
2687 pr_res_mapped_lun = pr_reg->pr_res_mapped_lun; core_scsi3_emulate_pro_clear()
2688 __core_scsi3_free_registration(dev, pr_reg, NULL, core_scsi3_emulate_pro_clear()
2717 struct t10_pr_registration *pr_reg, __core_scsi3_complete_pro_preempt()
2723 struct se_node_acl *nacl = pr_reg->pr_reg_nacl; __core_scsi3_complete_pro_preempt()
2728 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); __core_scsi3_complete_pro_preempt()
2736 dev->dev_pr_res_holder = pr_reg; __core_scsi3_complete_pro_preempt()
2737 pr_reg->pr_res_holder = 1; __core_scsi3_complete_pro_preempt()
2738 pr_reg->pr_res_type = type; __core_scsi3_complete_pro_preempt()
2739 pr_reg->pr_res_scope = scope; __core_scsi3_complete_pro_preempt()
2745 (pr_reg->pr_reg_all_tg_pt) ? 1 : 0); __core_scsi3_complete_pro_preempt()
2755 list_add_tail(&pr_reg->pr_reg_abort_list, __core_scsi3_complete_pro_preempt()
2763 struct t10_pr_registration *pr_reg, *pr_reg_tmp; core_scsi3_release_preempt_and_abort() local
2765 list_for_each_entry_safe(pr_reg, pr_reg_tmp, preempt_and_abort_list, list_for_each_entry_safe()
2768 list_del(&pr_reg->pr_reg_abort_list); list_for_each_entry_safe()
2769 if (pr_reg_holder == pr_reg) list_for_each_entry_safe()
2771 if (pr_reg->pr_res_holder) { list_for_each_entry_safe()
2772 pr_warn("pr_reg->pr_res_holder still set\n"); list_for_each_entry_safe()
2776 pr_reg->pr_reg_deve = NULL; list_for_each_entry_safe()
2777 pr_reg->pr_reg_nacl = NULL; list_for_each_entry_safe()
2778 kmem_cache_free(t10_pr_reg_cache, pr_reg); list_for_each_entry_safe()
2790 struct t10_pr_registration *pr_reg, *pr_reg_tmp, *pr_reg_n, *pr_res_holder; core_scsi3_pro_preempt() local
2804 " PR_REGISTERED *pr_reg for PREEMPT%s\n", core_scsi3_pro_preempt()
2847 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_pro_preempt()
2867 if (pr_reg->pr_res_key != sa_res_key) core_scsi3_pro_preempt()
2871 calling_it_nexus = (pr_reg_n == pr_reg) ? 1 : 0; core_scsi3_pro_preempt()
2872 pr_reg_nacl = pr_reg->pr_reg_nacl; core_scsi3_pro_preempt()
2873 pr_res_mapped_lun = pr_reg->pr_res_mapped_lun; core_scsi3_pro_preempt()
2874 __core_scsi3_free_registration(dev, pr_reg, core_scsi3_pro_preempt()
2892 (pr_reg->pr_res_key != sa_res_key)) core_scsi3_pro_preempt()
2896 calling_it_nexus = (pr_reg_n == pr_reg) ? 1 : 0; core_scsi3_pro_preempt()
2900 pr_reg_nacl = pr_reg->pr_reg_nacl; core_scsi3_pro_preempt()
2901 pr_res_mapped_lun = pr_reg->pr_res_mapped_lun; core_scsi3_pro_preempt()
2902 __core_scsi3_free_registration(dev, pr_reg, core_scsi3_pro_preempt()
2992 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_pro_preempt()
2995 calling_it_nexus = (pr_reg_n == pr_reg) ? 1 : 0; core_scsi3_pro_preempt()
2999 if (pr_reg->pr_res_key != sa_res_key) core_scsi3_pro_preempt()
3002 pr_reg_nacl = pr_reg->pr_reg_nacl; core_scsi3_pro_preempt()
3003 pr_res_mapped_lun = pr_reg->pr_res_mapped_lun; core_scsi3_pro_preempt()
3004 __core_scsi3_free_registration(dev, pr_reg, core_scsi3_pro_preempt()
3039 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_pro_preempt()
3042 calling_it_nexus = (pr_reg_n == pr_reg) ? 1 : 0; core_scsi3_pro_preempt()
3046 core_scsi3_ua_allocate(pr_reg->pr_reg_nacl, core_scsi3_pro_preempt()
3047 pr_reg->pr_res_mapped_lun, 0x2A, core_scsi3_pro_preempt()
3060 * been removed from the primary pr_reg list), except the core_scsi3_pro_preempt()
3110 struct t10_pr_registration *pr_reg, *pr_res_holder, *dest_pr_reg; core_scsi3_emulate_pro_register_and_move() local
3133 * Locate the existing *pr_reg via struct se_node_acl pointers core_scsi3_emulate_pro_register_and_move()
3135 pr_reg = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, core_scsi3_emulate_pro_register_and_move()
3137 if (!pr_reg) { core_scsi3_emulate_pro_register_and_move()
3139 " *pr_reg for REGISTER_AND_MOVE\n"); core_scsi3_emulate_pro_register_and_move()
3146 if (res_key != pr_reg->pr_res_key) { core_scsi3_emulate_pro_register_and_move()
3149 " res_key: 0x%016Lx\n", res_key, pr_reg->pr_res_key); core_scsi3_emulate_pro_register_and_move()
3276 pr_reg_nacl = pr_reg->pr_reg_nacl; core_scsi3_emulate_pro_register_and_move()
3282 if (!iport_ptr || !pr_reg->isid_present_at_reg) { core_scsi3_emulate_pro_register_and_move()
3289 if (!strcmp(iport_ptr, pr_reg->pr_reg_isid)) { core_scsi3_emulate_pro_register_and_move()
3293 pr_reg->pr_reg_isid); core_scsi3_emulate_pro_register_and_move()
3373 if (!is_reservation_holder(pr_res_holder, pr_reg)) { core_scsi3_emulate_pro_register_and_move()
3452 pr_reg->pr_res_scope = scope; core_scsi3_emulate_pro_register_and_move()
3453 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); core_scsi3_emulate_pro_register_and_move()
3485 __core_scsi3_free_registration(dev, pr_reg, NULL, 1); core_scsi3_emulate_pro_register_and_move()
3488 core_scsi3_put_pr_reg(pr_reg); core_scsi3_emulate_pro_register_and_move()
3506 core_scsi3_put_pr_reg(pr_reg); core_scsi3_emulate_pro_register_and_move()
3678 struct t10_pr_registration *pr_reg; core_scsi3_pri_read_keys() local
3698 list_for_each_entry(pr_reg, &dev->t10_pr.registration_list, core_scsi3_pri_read_keys()
3707 buf[off++] = ((pr_reg->pr_res_key >> 56) & 0xff); core_scsi3_pri_read_keys()
3708 buf[off++] = ((pr_reg->pr_res_key >> 48) & 0xff); core_scsi3_pri_read_keys()
3709 buf[off++] = ((pr_reg->pr_res_key >> 40) & 0xff); core_scsi3_pri_read_keys()
3710 buf[off++] = ((pr_reg->pr_res_key >> 32) & 0xff); core_scsi3_pri_read_keys()
3711 buf[off++] = ((pr_reg->pr_res_key >> 24) & 0xff); core_scsi3_pri_read_keys()
3712 buf[off++] = ((pr_reg->pr_res_key >> 16) & 0xff); core_scsi3_pri_read_keys()
3713 buf[off++] = ((pr_reg->pr_res_key >> 8) & 0xff); core_scsi3_pri_read_keys()
3714 buf[off++] = (pr_reg->pr_res_key & 0xff); core_scsi3_pri_read_keys()
3739 struct t10_pr_registration *pr_reg; core_scsi3_pri_read_reservation() local
3760 pr_reg = dev->dev_pr_res_holder; core_scsi3_pri_read_reservation()
3761 if (pr_reg) { core_scsi3_pri_read_reservation()
3789 if ((pr_reg->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) || core_scsi3_pri_read_reservation()
3790 (pr_reg->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG)) core_scsi3_pri_read_reservation()
3793 pr_res_key = pr_reg->pr_res_key; core_scsi3_pri_read_reservation()
3806 buf[21] = (pr_reg->pr_res_scope & 0xf0) | core_scsi3_pri_read_reservation()
3807 (pr_reg->pr_res_type & 0x0f); core_scsi3_pri_read_reservation()
3886 struct t10_pr_registration *pr_reg, *pr_reg_tmp; core_scsi3_pri_read_full_status() local
3923 list_for_each_entry_safe(pr_reg, pr_reg_tmp, core_scsi3_pri_read_full_status()
3926 se_nacl = pr_reg->pr_reg_nacl; core_scsi3_pri_read_full_status()
3927 se_tpg = pr_reg->pr_reg_nacl->se_tpg; core_scsi3_pri_read_full_status()
3930 atomic_inc_mb(&pr_reg->pr_res_holders); core_scsi3_pri_read_full_status()
3937 se_tpg, se_nacl, pr_reg, &format_code); core_scsi3_pri_read_full_status()
3943 atomic_dec_mb(&pr_reg->pr_res_holders); core_scsi3_pri_read_full_status()
3949 buf[off++] = ((pr_reg->pr_res_key >> 56) & 0xff); core_scsi3_pri_read_full_status()
3950 buf[off++] = ((pr_reg->pr_res_key >> 48) & 0xff); core_scsi3_pri_read_full_status()
3951 buf[off++] = ((pr_reg->pr_res_key >> 40) & 0xff); core_scsi3_pri_read_full_status()
3952 buf[off++] = ((pr_reg->pr_res_key >> 32) & 0xff); core_scsi3_pri_read_full_status()
3953 buf[off++] = ((pr_reg->pr_res_key >> 24) & 0xff); core_scsi3_pri_read_full_status()
3954 buf[off++] = ((pr_reg->pr_res_key >> 16) & 0xff); core_scsi3_pri_read_full_status()
3955 buf[off++] = ((pr_reg->pr_res_key >> 8) & 0xff); core_scsi3_pri_read_full_status()
3956 buf[off++] = (pr_reg->pr_res_key & 0xff); core_scsi3_pri_read_full_status()
3962 if (pr_reg->pr_reg_all_tg_pt) core_scsi3_pri_read_full_status()
3972 if (pr_reg->pr_res_holder) { core_scsi3_pri_read_full_status()
3974 buf[off++] = (pr_reg->pr_res_scope & 0xf0) | core_scsi3_pri_read_full_status()
3975 (pr_reg->pr_res_type & 0x0f); core_scsi3_pri_read_full_status()
3995 if (!pr_reg->pr_reg_all_tg_pt) { core_scsi3_pri_read_full_status()
3996 struct se_port *port = pr_reg->pr_reg_tg_pt_lun->lun_sep; core_scsi3_pri_read_full_status()
4007 se_nacl, pr_reg, &format_code, &buf[off+4]); core_scsi3_pri_read_full_status()
4010 atomic_dec_mb(&pr_reg->pr_res_holders); core_scsi3_pri_read_full_status()
56 core_pr_dump_initiator_port( struct t10_pr_registration *pr_reg, char *buf, u32 size) core_pr_dump_initiator_port() argument
81 is_reservation_holder( struct t10_pr_registration *pr_res_holder, struct t10_pr_registration *pr_reg) is_reservation_holder() argument
869 core_scsi3_aptpl_reserve( struct se_device *dev, struct se_portal_group *tpg, struct se_node_acl *node_acl, struct t10_pr_registration *pr_reg) core_scsi3_aptpl_reserve() argument
984 __core_scsi3_dump_registration( const struct target_core_fabric_ops *tfo, struct se_device *dev, struct se_node_acl *nacl, struct t10_pr_registration *pr_reg, enum register_type register_type) __core_scsi3_dump_registration() argument
1019 __core_scsi3_add_registration( struct se_device *dev, struct se_node_acl *nacl, struct t10_pr_registration *pr_reg, enum register_type register_type, int register_move) __core_scsi3_add_registration() argument
1183 core_scsi3_check_implicit_release( struct se_device *dev, struct t10_pr_registration *pr_reg) core_scsi3_check_implicit_release() argument
2405 __core_scsi3_complete_pro_release( struct se_device *dev, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int explicit, int unreg) __core_scsi3_complete_pro_release() argument
2715 __core_scsi3_complete_pro_preempt( struct se_device *dev, struct t10_pr_registration *pr_reg, struct list_head *preempt_and_abort_list, int type, int scope, enum preempt_type preempt_type) __core_scsi3_complete_pro_preempt() argument
H A Dtarget_core_fabric_lib.c58 struct t10_pr_registration *pr_reg, sas_get_pr_transport_id()
89 struct t10_pr_registration *pr_reg, sas_get_pr_transport_id_len()
140 struct t10_pr_registration *pr_reg, fc_get_pr_transport_id_len()
154 struct t10_pr_registration *pr_reg, fc_get_pr_transport_id()
225 struct t10_pr_registration *pr_reg, iscsi_get_pr_transport_id()
261 if ((*format_code == 1) && (pr_reg->isid_present_at_reg)) { iscsi_get_pr_transport_id()
287 buf[off+len] = pr_reg->pr_reg_isid[0]; off++; iscsi_get_pr_transport_id()
288 buf[off+len] = pr_reg->pr_reg_isid[1]; off++; iscsi_get_pr_transport_id()
289 buf[off+len] = pr_reg->pr_reg_isid[2]; off++; iscsi_get_pr_transport_id()
290 buf[off+len] = pr_reg->pr_reg_isid[3]; off++; iscsi_get_pr_transport_id()
291 buf[off+len] = pr_reg->pr_reg_isid[4]; off++; iscsi_get_pr_transport_id()
292 buf[off+len] = pr_reg->pr_reg_isid[5]; off++; iscsi_get_pr_transport_id()
321 struct t10_pr_registration *pr_reg, iscsi_get_pr_transport_id_len()
339 if (pr_reg->isid_present_at_reg) { iscsi_get_pr_transport_id_len()
55 sas_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) sas_get_pr_transport_id() argument
86 sas_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) sas_get_pr_transport_id_len() argument
137 fc_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) fc_get_pr_transport_id_len() argument
151 fc_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) fc_get_pr_transport_id() argument
222 iscsi_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) iscsi_get_pr_transport_id() argument
318 iscsi_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) iscsi_get_pr_transport_id_len() argument
H A Dtarget_core_configfs.c774 struct t10_pr_registration *pr_reg; target_core_dev_pr_show_spc3_res() local
779 pr_reg = dev->dev_pr_res_holder; target_core_dev_pr_show_spc3_res()
780 if (!pr_reg) target_core_dev_pr_show_spc3_res()
783 se_nacl = pr_reg->pr_reg_nacl; target_core_dev_pr_show_spc3_res()
784 core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); target_core_dev_pr_show_spc3_res()
867 struct t10_pr_registration *pr_reg; target_core_dev_pr_show_attr_res_pr_holder_tg_port() local
872 pr_reg = dev->dev_pr_res_holder; target_core_dev_pr_show_attr_res_pr_holder_tg_port()
873 if (!pr_reg) { target_core_dev_pr_show_attr_res_pr_holder_tg_port()
878 se_nacl = pr_reg->pr_reg_nacl; target_core_dev_pr_show_attr_res_pr_holder_tg_port()
880 lun = pr_reg->pr_reg_tg_pt_lun; target_core_dev_pr_show_attr_res_pr_holder_tg_port()
903 struct t10_pr_registration *pr_reg; target_core_dev_pr_show_attr_res_pr_registered_i_pts() local
912 list_for_each_entry(pr_reg, &dev->t10_pr.registration_list, target_core_dev_pr_show_attr_res_pr_registered_i_pts()
917 tfo = pr_reg->pr_reg_nacl->se_tpg->se_tpg_tfo; target_core_dev_pr_show_attr_res_pr_registered_i_pts()
918 core_pr_dump_initiator_port(pr_reg, i_buf, target_core_dev_pr_show_attr_res_pr_registered_i_pts()
922 pr_reg->pr_reg_nacl->initiatorname, i_buf, pr_reg->pr_res_key, target_core_dev_pr_show_attr_res_pr_registered_i_pts()
923 pr_reg->pr_res_generation); target_core_dev_pr_show_attr_res_pr_registered_i_pts()
944 struct t10_pr_registration *pr_reg; target_core_dev_pr_show_attr_res_pr_type() local
948 pr_reg = dev->dev_pr_res_holder; target_core_dev_pr_show_attr_res_pr_type()
949 if (pr_reg) { target_core_dev_pr_show_attr_res_pr_type()
951 core_scsi3_pr_dump_type(pr_reg->pr_res_type)); target_core_dev_pr_show_attr_res_pr_type()
/linux-4.1.27/include/linux/
H A Delfcore-compat.h33 compat_elf_gregset_t pr_reg; member in struct:compat_elf_prstatus
H A Dregset.h148 * offsetof(struct elf_prstatus, pr_reg) into the note data; that is
/linux-4.1.27/arch/m32r/include/asm/
H A Delf.h116 /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
119 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
120 memcpy((char *)pr_reg, (char *)regs, sizeof (struct pt_regs));
/linux-4.1.27/include/uapi/linux/
H A Delfcore.h62 elf_gregset_t pr_reg; /* GP registers */ member in struct:elf_prstatus
67 * immediately after ``pr_reg'', so that the loadmap addresses may
H A Dptrace.h37 * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the
/linux-4.1.27/drivers/iommu/
H A Domap-iommu.c473 #define pr_reg(name) \ macro
491 pr_reg(REVISION); omap2_iommu_dump_ctx()
492 pr_reg(IRQSTATUS); omap2_iommu_dump_ctx()
493 pr_reg(IRQENABLE); omap2_iommu_dump_ctx()
494 pr_reg(WALKING_ST); omap2_iommu_dump_ctx()
495 pr_reg(CNTL); omap2_iommu_dump_ctx()
496 pr_reg(FAULT_AD); omap2_iommu_dump_ctx()
497 pr_reg(TTB); omap2_iommu_dump_ctx()
498 pr_reg(LOCK); omap2_iommu_dump_ctx()
499 pr_reg(LD_TLB); omap2_iommu_dump_ctx()
500 pr_reg(CAM); omap2_iommu_dump_ctx()
501 pr_reg(RAM); omap2_iommu_dump_ctx()
502 pr_reg(GFLUSH); omap2_iommu_dump_ctx()
503 pr_reg(FLUSH_ENTRY); omap2_iommu_dump_ctx()
504 pr_reg(READ_CAM); omap2_iommu_dump_ctx()
505 pr_reg(READ_RAM); omap2_iommu_dump_ctx()
506 pr_reg(EMU_FAULT_AD); omap2_iommu_dump_ctx()
/linux-4.1.27/arch/blackfin/include/asm/
H A Delf.h119 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
120 memcpy((char *) &pr_reg, (char *)regs, \
/linux-4.1.27/drivers/target/loopback/
H A Dtcm_loop.c577 struct t10_pr_registration *pr_reg, tcm_loop_get_pr_transport_id()
586 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
589 return fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
592 return iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
600 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
607 struct t10_pr_registration *pr_reg, tcm_loop_get_pr_transport_id_len()
615 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
618 return fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
621 return iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
629 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
574 tcm_loop_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) tcm_loop_get_pr_transport_id() argument
604 tcm_loop_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) tcm_loop_get_pr_transport_id_len() argument
/linux-4.1.27/arch/mips/kernel/
H A Dbinfmt_elfn32.c74 elf_gregset_t pr_reg; /* GP registers */ member in struct:elf_prstatus32
H A Dbinfmt_elfo32.c95 elf_gregset_t pr_reg; /* GP registers */ member in struct:elf_prstatus32
/linux-4.1.27/arch/parisc/kernel/
H A Dbinfmt_elf32.c58 elf_gregset_t pr_reg; /* GP registers */ member in struct:elf_prstatus32
/linux-4.1.27/Documentation/target/
H A Dtcm_mod_builder.py604 buf += " struct t10_pr_registration *pr_reg,\n"
616 buf += " ret = fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
622 buf += " ret = sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
628 buf += " ret = iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
643 buf += " struct t10_pr_registration *pr_reg,\n"
654 buf += " ret = fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
660 buf += " ret = sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
666 buf += " ret = iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
/linux-4.1.27/drivers/xen/
H A Dxen-scsiback.c1303 struct t10_pr_registration *pr_reg, scsiback_get_pr_transport_id()
1313 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1316 return fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1319 return iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1327 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1334 struct t10_pr_registration *pr_reg, scsiback_get_pr_transport_id_len()
1343 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1346 return fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1349 return iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1357 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1301 scsiback_get_pr_transport_id(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) scsiback_get_pr_transport_id() argument
1332 scsiback_get_pr_transport_id_len(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) scsiback_get_pr_transport_id_len() argument
/linux-4.1.27/arch/s390/kernel/
H A Dcrash_dump.c318 memcpy(&nt_prstatus.pr_reg.gprs, sa->gp_regs, sizeof(sa->gp_regs)); nt_prstatus()
319 memcpy(&nt_prstatus.pr_reg.psw, sa->psw, sizeof(sa->psw)); nt_prstatus()
320 memcpy(&nt_prstatus.pr_reg.acrs, sa->acc_regs, sizeof(sa->acc_regs)); nt_prstatus()
/linux-4.1.27/drivers/vhost/
H A Dscsi.c346 struct t10_pr_registration *pr_reg, vhost_scsi_get_pr_transport_id()
356 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
359 return fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
362 return iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
370 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
377 struct t10_pr_registration *pr_reg, vhost_scsi_get_pr_transport_id_len()
386 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
389 return fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
392 return iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
400 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
344 vhost_scsi_get_pr_transport_id(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) vhost_scsi_get_pr_transport_id() argument
375 vhost_scsi_get_pr_transport_id_len(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) vhost_scsi_get_pr_transport_id_len() argument
/linux-4.1.27/arch/ia64/kernel/
H A Dcrash.c65 elf_greg_t *dst = (elf_greg_t *)&(prstatus->pr_reg); crash_save_this_cpu()
/linux-4.1.27/fs/
H A Dbinfmt_elf.c1618 #define PR_REG_PTR(S) (&((S)->pr_reg))
1633 * goes into the pr_reg field inside the note contents, rather fill_thread_core_info()
1639 0, PR_REG_SIZE(t->prstatus.pr_reg), fill_thread_core_info()
1867 elf_core_copy_task_regs(p, &t->prstatus.pr_reg); elf_dump_thread_status()
1965 elf_core_copy_regs(&info->prstatus->pr_reg, regs); fill_note_info()
H A Dbinfmt_elf_fdpic.c1432 elf_core_copy_task_regs(p, &t->prstatus.pr_reg); elf_dump_thread_status()
1614 elf_core_copy_regs(&prstatus->pr_reg, cprm->regs); elf_fdpic_core_dump()
/linux-4.1.27/drivers/scsi/qla2xxx/
H A Dtcm_qla2xxx.c234 struct t10_pr_registration *pr_reg, tcm_qla2xxx_get_pr_transport_id()
246 ret = fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_qla2xxx_get_pr_transport_id()
257 struct t10_pr_registration *pr_reg, tcm_qla2xxx_get_pr_transport_id_len()
268 ret = fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_qla2xxx_get_pr_transport_id_len()
231 tcm_qla2xxx_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) tcm_qla2xxx_get_pr_transport_id() argument
254 tcm_qla2xxx_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) tcm_qla2xxx_get_pr_transport_id_len() argument
/linux-4.1.27/drivers/usb/gadget/legacy/
H A Dtcm_usb_gadget.c1318 struct t10_pr_registration *pr_reg, usbg_get_pr_transport_id()
1330 ret = sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, usbg_get_pr_transport_id()
1341 struct t10_pr_registration *pr_reg, usbg_get_pr_transport_id_len()
1352 ret = sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, usbg_get_pr_transport_id_len()
1315 usbg_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) usbg_get_pr_transport_id() argument
1338 usbg_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) usbg_get_pr_transport_id_len() argument
/linux-4.1.27/drivers/target/sbp/
H A Dsbp_target.c1877 struct t10_pr_registration *pr_reg, sbp_get_pr_transport_id()
1904 struct t10_pr_registration *pr_reg, sbp_get_pr_transport_id_len()
1874 sbp_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) sbp_get_pr_transport_id() argument
1901 sbp_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) sbp_get_pr_transport_id_len() argument
/linux-4.1.27/arch/powerpc/kernel/
H A Dfadump.c521 elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); fadump_regs_to_elf_notes()
/linux-4.1.27/drivers/infiniband/ulp/srpt/
H A Dib_srpt.c3364 struct t10_pr_registration *pr_reg, srpt_get_pr_transport_id()
3379 struct t10_pr_registration *pr_reg, srpt_get_pr_transport_id_len()
3362 srpt_get_pr_transport_id(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) srpt_get_pr_transport_id() argument
3377 srpt_get_pr_transport_id_len(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) srpt_get_pr_transport_id_len() argument
/linux-4.1.27/kernel/
H A Dkexec.c1603 elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); crash_save_cpu()

Completed in 4886 milliseconds