Searched refs:object (Results 1 - 200 of 1838) sorted by relevance

12345678910

/linux-4.4.14/arch/parisc/math-emu/
H A Dfloat.h61 #define Sall(object) (object)
62 #define Ssign(object) Bitfield_extract( 0, 1,object)
63 #define Ssignedsign(object) Bitfield_signed_extract( 0, 1,object)
64 #define Sexponent(object) Bitfield_extract( 1, 8,object)
65 #define Smantissa(object) Bitfield_mask( 9, 23,object)
66 #define Ssignaling(object) Bitfield_extract( 9, 1,object)
67 #define Ssignalingnan(object) Bitfield_extract( 1, 9,object)
68 #define Shigh2mantissa(object) Bitfield_extract( 9, 2,object)
69 #define Sexponentmantissa(object) Bitfield_mask( 1, 31,object)
70 #define Ssignexponent(object) Bitfield_extract( 0, 9,object)
71 #define Shidden(object) Bitfield_extract( 8, 1,object)
72 #define Shiddenoverflow(object) Bitfield_extract( 7, 1,object)
73 #define Shiddenhigh7mantissa(object) Bitfield_extract( 8, 8,object)
74 #define Shiddenhigh3mantissa(object) Bitfield_extract( 8, 4,object)
75 #define Slow(object) Bitfield_mask( 31, 1,object)
76 #define Slow4(object) Bitfield_mask( 28, 4,object)
77 #define Slow31(object) Bitfield_mask( 1, 31,object)
78 #define Shigh31(object) Bitfield_extract( 0, 31,object)
79 #define Ssignedhigh31(object) Bitfield_signed_extract( 0, 31,object)
80 #define Shigh4(object) Bitfield_extract( 0, 4,object)
81 #define Sbit24(object) Bitfield_extract( 24, 1,object)
82 #define Sbit28(object) Bitfield_extract( 28, 1,object)
83 #define Sbit29(object) Bitfield_extract( 29, 1,object)
84 #define Sbit30(object) Bitfield_extract( 30, 1,object)
85 #define Sbit31(object) Bitfield_mask( 31, 1,object)
87 #define Deposit_ssign(object,value) Bitfield_deposit(value,0,1,object)
88 #define Deposit_sexponent(object,value) Bitfield_deposit(value,1,8,object)
89 #define Deposit_smantissa(object,value) Bitfield_deposit(value,9,23,object)
90 #define Deposit_shigh2mantissa(object,value) Bitfield_deposit(value,9,2,object)
91 #define Deposit_sexponentmantissa(object,value) \
92 Bitfield_deposit(value,1,31,object)
93 #define Deposit_ssignexponent(object,value) Bitfield_deposit(value,0,9,object)
94 #define Deposit_slow(object,value) Bitfield_deposit(value,31,1,object)
95 #define Deposit_shigh4(object,value) Bitfield_deposit(value,0,4,object)
97 #define Is_ssign(object) Bitfield_mask( 0, 1,object)
98 #define Is_ssignaling(object) Bitfield_mask( 9, 1,object)
99 #define Is_shidden(object) Bitfield_mask( 8, 1,object)
100 #define Is_shiddenoverflow(object) Bitfield_mask( 7, 1,object)
101 #define Is_slow(object) Bitfield_mask( 31, 1,object)
102 #define Is_sbit24(object) Bitfield_mask( 24, 1,object)
103 #define Is_sbit28(object) Bitfield_mask( 28, 1,object)
104 #define Is_sbit29(object) Bitfield_mask( 29, 1,object)
105 #define Is_sbit30(object) Bitfield_mask( 30, 1,object)
106 #define Is_sbit31(object) Bitfield_mask( 31, 1,object)
118 #define Dallp1(object) (object)
119 #define Dsign(object) Bitfield_extract( 0, 1,object)
120 #define Dsignedsign(object) Bitfield_signed_extract( 0, 1,object)
121 #define Dexponent(object) Bitfield_extract( 1, 11,object)
122 #define Dmantissap1(object) Bitfield_mask( 12, 20,object)
123 #define Dsignaling(object) Bitfield_extract( 12, 1,object)
124 #define Dsignalingnan(object) Bitfield_extract( 1, 12,object)
125 #define Dhigh2mantissa(object) Bitfield_extract( 12, 2,object)
126 #define Dexponentmantissap1(object) Bitfield_mask( 1, 31,object)
127 #define Dsignexponent(object) Bitfield_extract( 0, 12,object)
128 #define Dhidden(object) Bitfield_extract( 11, 1,object)
129 #define Dhiddenoverflow(object) Bitfield_extract( 10, 1,object)
130 #define Dhiddenhigh7mantissa(object) Bitfield_extract( 11, 8,object)
131 #define Dhiddenhigh3mantissa(object) Bitfield_extract( 11, 4,object)
132 #define Dlowp1(object) Bitfield_mask( 31, 1,object)
133 #define Dlow31p1(object) Bitfield_mask( 1, 31,object)
134 #define Dhighp1(object) Bitfield_extract( 0, 1,object)
135 #define Dhigh4p1(object) Bitfield_extract( 0, 4,object)
136 #define Dhigh31p1(object) Bitfield_extract( 0, 31,object)
137 #define Dsignedhigh31p1(object) Bitfield_signed_extract( 0, 31,object)
138 #define Dbit3p1(object) Bitfield_extract( 3, 1,object)
140 #define Deposit_dsign(object,value) Bitfield_deposit(value,0,1,object)
141 #define Deposit_dexponent(object,value) Bitfield_deposit(value,1,11,object)
142 #define Deposit_dmantissap1(object,value) Bitfield_deposit(value,12,20,object)
143 #define Deposit_dhigh2mantissa(object,value) Bitfield_deposit(value,12,2,object)
144 #define Deposit_dexponentmantissap1(object,value) \
145 Bitfield_deposit(value,1,31,object)
146 #define Deposit_dsignexponent(object,value) Bitfield_deposit(value,0,12,object)
147 #define Deposit_dlowp1(object,value) Bitfield_deposit(value,31,1,object)
148 #define Deposit_dhigh4p1(object,value) Bitfield_deposit(value,0,4,object)
150 #define Is_dsign(object) Bitfield_mask( 0, 1,object)
151 #define Is_dsignaling(object) Bitfield_mask( 12, 1,object)
152 #define Is_dhidden(object) Bitfield_mask( 11, 1,object)
153 #define Is_dhiddenoverflow(object) Bitfield_mask( 10, 1,object)
154 #define Is_dlowp1(object) Bitfield_mask( 31, 1,object)
155 #define Is_dhighp1(object) Bitfield_mask( 0, 1,object)
156 #define Is_dbit3p1(object) Bitfield_mask( 3, 1,object)
158 #define Dallp2(object) (object)
159 #define Dmantissap2(object) (object)
160 #define Dlowp2(object) Bitfield_mask( 31, 1,object)
161 #define Dlow4p2(object) Bitfield_mask( 28, 4,object)
162 #define Dlow31p2(object) Bitfield_mask( 1, 31,object)
163 #define Dhighp2(object) Bitfield_extract( 0, 1,object)
164 #define Dhigh31p2(object) Bitfield_extract( 0, 31,object)
165 #define Dbit2p2(object) Bitfield_extract( 2, 1,object)
166 #define Dbit3p2(object) Bitfield_extract( 3, 1,object)
167 #define Dbit21p2(object) Bitfield_extract( 21, 1,object)
168 #define Dbit28p2(object) Bitfield_extract( 28, 1,object)
169 #define Dbit29p2(object) Bitfield_extract( 29, 1,object)
170 #define Dbit30p2(object) Bitfield_extract( 30, 1,object)
171 #define Dbit31p2(object) Bitfield_mask( 31, 1,object)
173 #define Deposit_dlowp2(object,value) Bitfield_deposit(value,31,1,object)
175 #define Is_dlowp2(object) Bitfield_mask( 31, 1,object)
176 #define Is_dhighp2(object) Bitfield_mask( 0, 1,object)
177 #define Is_dbit2p2(object) Bitfield_mask( 2, 1,object)
178 #define Is_dbit3p2(object) Bitfield_mask( 3, 1,object)
179 #define Is_dbit21p2(object) Bitfield_mask( 21, 1,object)
180 #define Is_dbit28p2(object) Bitfield_mask( 28, 1,object)
181 #define Is_dbit29p2(object) Bitfield_mask( 29, 1,object)
182 #define Is_dbit30p2(object) Bitfield_mask( 30, 1,object)
183 #define Is_dbit31p2(object) Bitfield_mask( 31, 1,object)
264 #define Extall(object) (object)
265 #define Extsign(object) Bitfield_extract( 0, 1,object)
266 #define Exthigh31(object) Bitfield_extract( 0, 31,object)
267 #define Extlow31(object) Bitfield_extract( 1, 31,object)
268 #define Extlow(object) Bitfield_extract( 31, 1,object)
274 #define Sextallp1(object) (object)
275 #define Sextallp2(object) (object)
276 #define Sextlowp1(object) Bitfield_extract( 31, 1,object)
277 #define Sexthighp2(object) Bitfield_extract( 0, 1,object)
278 #define Sextlow31p2(object) Bitfield_extract( 1, 31,object)
279 #define Sexthiddenoverflow(object) Bitfield_extract( 4, 1,object)
280 #define Is_sexthiddenoverflow(object) Bitfield_mask( 4, 1,object)
286 #define Dextallp1(object) (object)
287 #define Dextallp2(object) (object)
288 #define Dextallp3(object) (object)
289 #define Dextallp4(object) (object)
290 #define Dextlowp2(object) Bitfield_extract( 31, 1,object)
291 #define Dexthighp3(object) Bitfield_extract( 0, 1,object)
292 #define Dextlow31p3(object) Bitfield_extract( 1, 31,object)
293 #define Dexthiddenoverflow(object) Bitfield_extract( 10, 1,object)
294 #define Is_dexthiddenoverflow(object) Bitfield_mask( 10, 1,object)
295 #define Deposit_dextlowp4(object,value) Bitfield_deposit(value,31,1,object)
423 #define Cbit(object) Bitfield_extract( 5, 1,object)
424 #define Tbit(object) Bitfield_extract( 25, 1,object)
425 #define Roundingmode(object) Bitfield_extract( 21, 2,object)
426 #define Invalidtrap(object) Bitfield_extract( 27, 1,object)
427 #define Divisionbyzerotrap(object) Bitfield_extract( 28, 1,object)
428 #define Overflowtrap(object) Bitfield_extract( 29, 1,object)
429 #define Underflowtrap(object) Bitfield_extract( 30, 1,object)
430 #define Inexacttrap(object) Bitfield_extract( 31, 1,object)
431 #define Invalidflag(object) Bitfield_extract( 0, 1,object)
432 #define Divisionbyzeroflag(object) Bitfield_extract( 1, 1,object)
433 #define Overflowflag(object) Bitfield_extract( 2, 1,object)
434 #define Underflowflag(object) Bitfield_extract( 3, 1,object)
435 #define Inexactflag(object) Bitfield_extract( 4, 1,object)
436 #define Allflags(object) Bitfield_extract( 0, 5,object)
468 #define Allexception(object) (object)
469 #define Exceptiontype(object) Bitfield_extract( 0, 6,object)
470 #define Instructionfield(object) Bitfield_mask( 6,26,object)
471 #define Parmfield(object) Bitfield_extract( 23, 3,object)
472 #define Rabit(object) Bitfield_extract( 24, 1,object)
473 #define Ibit(object) Bitfield_extract( 25, 1,object)
475 #define Set_exceptiontype(object,value) Bitfield_deposit(value, 0, 6,object)
476 #define Set_parmfield(object,value) Bitfield_deposit(value, 23, 3,object)
477 #define Set_exceptiontype_and_instr_field(exception,instruction,object) \
478 object = exception << 26 | instruction
487 #define Greaterthanbit(object) Bitfield_extract( 27, 1,object)
488 #define Lessthanbit(object) Bitfield_extract( 28, 1,object)
489 #define Equalbit(object) Bitfield_extract( 29, 1,object)
490 #define Unorderedbit(object) Bitfield_extract( 30, 1,object)
491 #define Exceptionbit(object) Bitfield_extract( 31, 1,object)
H A Dfpbits.h53 #define Bitfield_extract(start, length, object) \
54 ((object) >> (HOSTWDSZ - (start) - (length)) & \
57 #define Bitfield_signed_extract(start, length, object) \
58 ((int)((object) << start) >> (HOSTWDSZ - (length)))
60 #define Bitfield_mask(start, len, object) \
61 ((object) & (((unsigned)-1 >> (HOSTWDSZ-len)) << (HOSTWDSZ-start-len)))
63 #define Bitfield_deposit(value,start,len,object) object = \
64 ((object) & ~(((unsigned)-1 >> (HOSTWDSZ-len)) << (HOSTWDSZ-start-len))) | \
H A Dcnv_float.h33 #define Dintp1(object) (object)
34 #define Dintp2(object) (object)
36 #define Duintp1(object) (object)
37 #define Duintp2(object) (object)
39 #define Qintp0(object) (object)
40 #define Qintp1(object) (object)
41 #define Qintp2(object) (object)
42 #define Qintp3(object) (object)
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/core/
H A Dobject.c24 #include <core/object.h>
29 nvkm_object_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_object_mthd() argument
31 if (likely(object->func->mthd)) nvkm_object_mthd()
32 return object->func->mthd(object, mthd, data, size); nvkm_object_mthd()
37 nvkm_object_ntfy(struct nvkm_object *object, u32 mthd, nvkm_object_ntfy() argument
40 if (likely(object->func->ntfy)) nvkm_object_ntfy()
41 return object->func->ntfy(object, mthd, pevent); nvkm_object_ntfy()
46 nvkm_object_map(struct nvkm_object *object, u64 *addr, u32 *size) nvkm_object_map() argument
48 if (likely(object->func->map)) nvkm_object_map()
49 return object->func->map(object, addr, size); nvkm_object_map()
54 nvkm_object_rd08(struct nvkm_object *object, u64 addr, u8 *data) nvkm_object_rd08() argument
56 if (likely(object->func->rd08)) nvkm_object_rd08()
57 return object->func->rd08(object, addr, data); nvkm_object_rd08()
62 nvkm_object_rd16(struct nvkm_object *object, u64 addr, u16 *data) nvkm_object_rd16() argument
64 if (likely(object->func->rd16)) nvkm_object_rd16()
65 return object->func->rd16(object, addr, data); nvkm_object_rd16()
70 nvkm_object_rd32(struct nvkm_object *object, u64 addr, u32 *data) nvkm_object_rd32() argument
72 if (likely(object->func->rd32)) nvkm_object_rd32()
73 return object->func->rd32(object, addr, data); nvkm_object_rd32()
78 nvkm_object_wr08(struct nvkm_object *object, u64 addr, u8 data) nvkm_object_wr08() argument
80 if (likely(object->func->wr08)) nvkm_object_wr08()
81 return object->func->wr08(object, addr, data); nvkm_object_wr08()
86 nvkm_object_wr16(struct nvkm_object *object, u64 addr, u16 data) nvkm_object_wr16() argument
88 if (likely(object->func->wr16)) nvkm_object_wr16()
89 return object->func->wr16(object, addr, data); nvkm_object_wr16()
94 nvkm_object_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_object_wr32() argument
96 if (likely(object->func->wr32)) nvkm_object_wr32()
97 return object->func->wr32(object, addr, data); nvkm_object_wr32()
102 nvkm_object_bind(struct nvkm_object *object, struct nvkm_gpuobj *gpuobj, nvkm_object_bind() argument
105 if (object->func->bind) nvkm_object_bind()
106 return object->func->bind(object, gpuobj, align, pgpuobj); nvkm_object_bind()
111 nvkm_object_fini(struct nvkm_object *object, bool suspend) nvkm_object_fini() argument
118 nvif_debug(object, "%s children...\n", action); nvkm_object_fini()
120 list_for_each_entry(child, &object->tree, head) { nvkm_object_fini()
126 nvif_debug(object, "%s running...\n", action); nvkm_object_fini()
127 if (object->func->fini) { nvkm_object_fini()
128 ret = object->func->fini(object, suspend); nvkm_object_fini()
130 nvif_error(object, "%s failed with %d\n", action, ret); nvkm_object_fini()
137 nvif_debug(object, "%s completed in %lldus\n", action, time); nvkm_object_fini()
141 if (object->func->init) { nvkm_object_fini()
142 int rret = object->func->init(object); nvkm_object_fini()
144 nvif_fatal(object, "failed to restart, %d\n", rret); nvkm_object_fini()
147 list_for_each_entry_continue_reverse(child, &object->tree, head) { nvkm_object_fini()
154 nvkm_object_init(struct nvkm_object *object) nvkm_object_init() argument
160 nvif_debug(object, "init running...\n"); nvkm_object_init()
162 if (object->func->init) { nvkm_object_init()
163 ret = object->func->init(object); nvkm_object_init()
168 nvif_debug(object, "init children...\n"); nvkm_object_init()
169 list_for_each_entry(child, &object->tree, head) { nvkm_object_init()
176 nvif_debug(object, "init completed in %lldus\n", time); nvkm_object_init()
180 list_for_each_entry_continue_reverse(child, &object->tree, head) nvkm_object_init()
183 nvif_error(object, "init failed with %d\n", ret); nvkm_object_init()
184 if (object->func->fini) nvkm_object_init()
185 object->func->fini(object, false); nvkm_object_init()
190 nvkm_object_dtor(struct nvkm_object *object) nvkm_object_dtor() argument
193 void *data = object; nvkm_object_dtor()
196 nvif_debug(object, "destroy children...\n"); nvkm_object_dtor()
198 list_for_each_entry_safe(child, ctemp, &object->tree, head) { nvkm_object_dtor()
202 nvif_debug(object, "destroy running...\n"); nvkm_object_dtor()
203 if (object->func->dtor) nvkm_object_dtor()
204 data = object->func->dtor(object); nvkm_object_dtor()
205 nvkm_engine_unref(&object->engine); nvkm_object_dtor()
207 nvif_debug(object, "destroy completed in %lldus...\n", time); nvkm_object_dtor()
214 struct nvkm_object *object = *pobject; nvkm_object_del() local
215 if (object && !WARN_ON(!object->func)) { nvkm_object_del()
216 *pobject = nvkm_object_dtor(object); nvkm_object_del()
217 nvkm_client_remove(object->client, object); nvkm_object_del()
218 list_del(&object->head); nvkm_object_del()
226 const struct nvkm_oclass *oclass, struct nvkm_object *object) nvkm_object_ctor()
228 object->func = func; nvkm_object_ctor()
229 object->client = oclass->client; nvkm_object_ctor()
230 object->engine = nvkm_engine_ref(oclass->engine); nvkm_object_ctor()
231 object->oclass = oclass->base.oclass; nvkm_object_ctor()
232 object->handle = oclass->handle; nvkm_object_ctor()
233 INIT_LIST_HEAD(&object->head); nvkm_object_ctor()
234 INIT_LIST_HEAD(&object->tree); nvkm_object_ctor()
235 RB_CLEAR_NODE(&object->node); nvkm_object_ctor()
236 WARN_ON(oclass->engine && !object->engine); nvkm_object_ctor()
225 nvkm_object_ctor(const struct nvkm_object_func *func, const struct nvkm_oclass *oclass, struct nvkm_object *object) nvkm_object_ctor() argument
H A Doproxy.c27 nvkm_oproxy_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_oproxy_mthd() argument
29 return nvkm_object_mthd(nvkm_oproxy(object)->object, mthd, data, size); nvkm_oproxy_mthd()
33 nvkm_oproxy_ntfy(struct nvkm_object *object, u32 mthd, nvkm_oproxy_ntfy() argument
36 return nvkm_object_ntfy(nvkm_oproxy(object)->object, mthd, pevent); nvkm_oproxy_ntfy()
40 nvkm_oproxy_map(struct nvkm_object *object, u64 *addr, u32 *size) nvkm_oproxy_map() argument
42 return nvkm_object_map(nvkm_oproxy(object)->object, addr, size); nvkm_oproxy_map()
46 nvkm_oproxy_rd08(struct nvkm_object *object, u64 addr, u8 *data) nvkm_oproxy_rd08() argument
48 return nvkm_object_rd08(nvkm_oproxy(object)->object, addr, data); nvkm_oproxy_rd08()
52 nvkm_oproxy_rd16(struct nvkm_object *object, u64 addr, u16 *data) nvkm_oproxy_rd16() argument
54 return nvkm_object_rd16(nvkm_oproxy(object)->object, addr, data); nvkm_oproxy_rd16()
58 nvkm_oproxy_rd32(struct nvkm_object *object, u64 addr, u32 *data) nvkm_oproxy_rd32() argument
60 return nvkm_object_rd32(nvkm_oproxy(object)->object, addr, data); nvkm_oproxy_rd32()
64 nvkm_oproxy_wr08(struct nvkm_object *object, u64 addr, u8 data) nvkm_oproxy_wr08() argument
66 return nvkm_object_wr08(nvkm_oproxy(object)->object, addr, data); nvkm_oproxy_wr08()
70 nvkm_oproxy_wr16(struct nvkm_object *object, u64 addr, u16 data) nvkm_oproxy_wr16() argument
72 return nvkm_object_wr16(nvkm_oproxy(object)->object, addr, data); nvkm_oproxy_wr16()
76 nvkm_oproxy_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_oproxy_wr32() argument
78 return nvkm_object_wr32(nvkm_oproxy(object)->object, addr, data); nvkm_oproxy_wr32()
82 nvkm_oproxy_bind(struct nvkm_object *object, struct nvkm_gpuobj *parent, nvkm_oproxy_bind() argument
85 return nvkm_object_bind(nvkm_oproxy(object)->object, nvkm_oproxy_bind()
90 nvkm_oproxy_sclass(struct nvkm_object *object, int index, nvkm_oproxy_sclass() argument
93 struct nvkm_oproxy *oproxy = nvkm_oproxy(object); nvkm_oproxy_sclass()
94 oclass->parent = oproxy->object; nvkm_oproxy_sclass()
95 if (!oproxy->object->func->sclass) nvkm_oproxy_sclass()
97 return oproxy->object->func->sclass(oproxy->object, index, oclass); nvkm_oproxy_sclass()
101 nvkm_oproxy_fini(struct nvkm_object *object, bool suspend) nvkm_oproxy_fini() argument
103 struct nvkm_oproxy *oproxy = nvkm_oproxy(object); nvkm_oproxy_fini()
112 if (oproxy->object->func->fini) { nvkm_oproxy_fini()
113 ret = oproxy->object->func->fini(oproxy->object, suspend); nvkm_oproxy_fini()
128 nvkm_oproxy_init(struct nvkm_object *object) nvkm_oproxy_init() argument
130 struct nvkm_oproxy *oproxy = nvkm_oproxy(object); nvkm_oproxy_init()
139 if (oproxy->object->func->init) { nvkm_oproxy_init()
140 ret = oproxy->object->func->init(oproxy->object); nvkm_oproxy_init()
155 nvkm_oproxy_dtor(struct nvkm_object *object) nvkm_oproxy_dtor() argument
157 struct nvkm_oproxy *oproxy = nvkm_oproxy(object); nvkm_oproxy_dtor()
160 nvkm_object_del(&oproxy->object); nvkm_oproxy_dtor()
H A Dioctl.c32 nvkm_ioctl_nop(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_nop() argument
39 nvif_ioctl(object, "nop size %d\n", size); nvkm_ioctl_nop()
41 nvif_ioctl(object, "nop vers %lld\n", args->v0.version); nvkm_ioctl_nop()
49 nvkm_ioctl_sclass(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_sclass() argument
57 nvif_ioctl(object, "sclass size %d\n", size); nvkm_ioctl_sclass()
59 nvif_ioctl(object, "sclass vers %d count %d\n", nvkm_ioctl_sclass()
64 while (object->func->sclass && nvkm_ioctl_sclass()
65 object->func->sclass(object, i, &oclass) >= 0) { nvkm_ioctl_sclass()
87 struct nvkm_object *object = NULL; nvkm_ioctl_new() local
94 "route %02x token %llx object %016llx\n", nvkm_ioctl_new()
96 args->v0.route, args->v0.token, args->v0.object); nvkm_ioctl_new()
109 oclass.object = args->v0.object; nvkm_ioctl_new()
122 ret = oclass.ctor(&oclass, data, size, &object); nvkm_ioctl_new()
125 ret = nvkm_object_init(object); nvkm_ioctl_new()
127 list_add(&object->head, &parent->tree); nvkm_ioctl_new()
128 object->route = args->v0.route; nvkm_ioctl_new()
129 object->token = args->v0.token; nvkm_ioctl_new()
130 object->object = args->v0.object; nvkm_ioctl_new()
131 if (nvkm_client_insert(client, object)) { nvkm_ioctl_new()
132 client->data = object; nvkm_ioctl_new()
137 nvkm_object_fini(object, false); nvkm_ioctl_new()
140 nvkm_object_del(&object); nvkm_ioctl_new()
145 nvkm_ioctl_del(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_del() argument
152 nvif_ioctl(object, "delete size %d\n", size); nvkm_ioctl_del()
154 nvif_ioctl(object, "delete\n"); nvkm_ioctl_del()
155 nvkm_object_fini(object, false); nvkm_ioctl_del()
156 nvkm_object_del(&object); nvkm_ioctl_del()
163 nvkm_ioctl_mthd(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_mthd() argument
170 nvif_ioctl(object, "mthd size %d\n", size); nvkm_ioctl_mthd()
172 nvif_ioctl(object, "mthd vers %d mthd %02x\n", nvkm_ioctl_mthd()
174 ret = nvkm_object_mthd(object, args->v0.method, data, size); nvkm_ioctl_mthd()
182 nvkm_ioctl_rd(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_rd() argument
194 nvif_ioctl(object, "rd size %d\n", size); nvkm_ioctl_rd()
196 nvif_ioctl(object, "rd vers %d size %d addr %016llx\n", nvkm_ioctl_rd()
200 ret = nvkm_object_rd08(object, args->v0.addr, &v.b08); nvkm_ioctl_rd()
204 ret = nvkm_object_rd16(object, args->v0.addr, &v.b16); nvkm_ioctl_rd()
208 ret = nvkm_object_rd32(object, args->v0.addr, &v.b32); nvkm_ioctl_rd()
221 nvkm_ioctl_wr(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_wr() argument
228 nvif_ioctl(object, "wr size %d\n", size); nvkm_ioctl_wr()
230 nvif_ioctl(object, nvkm_ioctl_wr()
238 case 1: return nvkm_object_wr08(object, args->v0.addr, args->v0.data); nvkm_ioctl_wr()
239 case 2: return nvkm_object_wr16(object, args->v0.addr, args->v0.data); nvkm_ioctl_wr()
240 case 4: return nvkm_object_wr32(object, args->v0.addr, args->v0.data); nvkm_ioctl_wr()
249 nvkm_ioctl_map(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_map() argument
256 nvif_ioctl(object, "map size %d\n", size); nvkm_ioctl_map()
258 nvif_ioctl(object, "map vers %d\n", args->v0.version); nvkm_ioctl_map()
259 ret = nvkm_object_map(object, &args->v0.handle, nvkm_ioctl_map()
267 nvkm_ioctl_unmap(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_unmap() argument
274 nvif_ioctl(object, "unmap size %d\n", size); nvkm_ioctl_unmap()
276 nvif_ioctl(object, "unmap\n"); nvkm_ioctl_unmap()
283 nvkm_ioctl_ntfy_new(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_ntfy_new() argument
291 nvif_ioctl(object, "ntfy new size %d\n", size); nvkm_ioctl_ntfy_new()
293 nvif_ioctl(object, "ntfy new vers %d event %02x\n", nvkm_ioctl_ntfy_new()
295 ret = nvkm_object_ntfy(object, args->v0.event, &event); nvkm_ioctl_ntfy_new()
297 ret = nvkm_client_notify_new(object, event, data, size); nvkm_ioctl_ntfy_new()
309 nvkm_ioctl_ntfy_del(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_ntfy_del() argument
311 struct nvkm_client *client = object->client; nvkm_ioctl_ntfy_del()
317 nvif_ioctl(object, "ntfy del size %d\n", size); nvkm_ioctl_ntfy_del()
319 nvif_ioctl(object, "ntfy del vers %d index %d\n", nvkm_ioctl_ntfy_del()
328 nvkm_ioctl_ntfy_get(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_ntfy_get() argument
330 struct nvkm_client *client = object->client; nvkm_ioctl_ntfy_get()
336 nvif_ioctl(object, "ntfy get size %d\n", size); nvkm_ioctl_ntfy_get()
338 nvif_ioctl(object, "ntfy get vers %d index %d\n", nvkm_ioctl_ntfy_get()
347 nvkm_ioctl_ntfy_put(struct nvkm_object *object, void *data, u32 size) nvkm_ioctl_ntfy_put() argument
349 struct nvkm_client *client = object->client; nvkm_ioctl_ntfy_put()
355 nvif_ioctl(object, "ntfy put size %d\n", size); nvkm_ioctl_ntfy_put()
357 nvif_ioctl(object, "ntfy put vers %d index %d\n", nvkm_ioctl_ntfy_put()
389 struct nvkm_object *object; nvkm_ioctl_path() local
393 object = nvkm_client_search(client, handle); nvkm_ioctl_path()
395 object = &client->object; nvkm_ioctl_path()
396 if (unlikely(!object)) { nvkm_ioctl_path()
397 nvif_ioctl(&client->object, "object not found\n"); nvkm_ioctl_path()
401 if (owner != NVIF_IOCTL_V0_OWNER_ANY && owner != object->route) { nvkm_ioctl_path()
402 nvif_ioctl(&client->object, "route != owner\n"); nvkm_ioctl_path()
405 *route = object->route; nvkm_ioctl_path()
406 *token = object->token; nvkm_ioctl_path()
410 ret = nvkm_ioctl_v0[type].func(object, data, size); nvkm_ioctl_path()
420 struct nvkm_object *object = &client->object; nvkm_ioctl() local
427 nvif_ioctl(object, "size %d\n", size); nvkm_ioctl()
430 nvif_ioctl(object, nvkm_ioctl()
431 "vers %d type %02x object %016llx owner %02x\n", nvkm_ioctl()
432 args->v0.version, args->v0.type, args->v0.object, nvkm_ioctl()
434 ret = nvkm_ioctl_path(client, args->v0.object, args->v0.type, nvkm_ioctl()
439 nvif_ioctl(object, "return %d\n", ret); nvkm_ioctl()
H A Dclient.c90 nvkm_client_notify_new(struct nvkm_object *object, nvkm_client_notify_new() argument
93 struct nvkm_client *client = object->client; nvkm_client_notify_new()
113 nvif_ioctl(object, "notify new size %d\n", size); nvkm_client_notify_new()
115 nvif_ioctl(object, "notify new vers %d reply %d route %02x " nvkm_client_notify_new()
127 ret = nvkm_notify_init(object, event, nvkm_client_notify, nvkm_client_notify_new()
141 nvkm_client_mthd_devlist(struct nvkm_object *object, void *data, u32 size) nvkm_client_mthd_devlist() argument
148 nvif_ioctl(object, "client devlist size %d\n", size); nvkm_client_mthd_devlist()
150 nvif_ioctl(object, "client devlist vers %d count %d\n", nvkm_client_mthd_devlist()
167 nvkm_client_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_client_mthd() argument
171 return nvkm_client_mthd_devlist(object, data, size); nvkm_client_mthd()
186 nvkm_client_child_get(struct nvkm_object *object, int index, nvkm_client_child_get() argument
209 nvkm_client_remove(struct nvkm_client *client, struct nvkm_object *object) nvkm_client_remove() argument
211 if (!RB_EMPTY_NODE(&object->node)) nvkm_client_remove()
212 rb_erase(&object->node, &client->objroot); nvkm_client_remove()
216 nvkm_client_insert(struct nvkm_client *client, struct nvkm_object *object) nvkm_client_insert() argument
225 if (object->object < this->object) nvkm_client_insert()
228 if (object->object > this->object) nvkm_client_insert()
234 rb_link_node(&object->node, parent, ptr); nvkm_client_insert()
235 rb_insert_color(&object->node, &client->objroot); nvkm_client_insert()
244 struct nvkm_object *object = nvkm_client_search() local
245 container_of(node, typeof(*object), node); nvkm_client_search()
246 if (handle < object->object) nvkm_client_search()
249 if (handle > object->object) nvkm_client_search()
252 return object; nvkm_client_search()
260 struct nvkm_object *object = &client->object; nvkm_client_fini() local
263 nvif_debug(object, "%s notify\n", name[suspend]); nvkm_client_fini()
266 return nvkm_object_fini(&client->object, suspend); nvkm_client_fini()
272 return nvkm_object_init(&client->object); nvkm_client_init()
284 nvkm_object_dtor(&client->object); nvkm_client_del()
301 nvkm_object_ctor(&nvkm_client_object_func, &oclass, &client->object); nvkm_client_new()
/linux-4.4.14/fs/fscache/
H A Doperation.c33 * object and processor if needed.
58 * This will get its own ref on the object.
63 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_enqueue_operation()
67 ASSERT(fscache_object_is_available(op->object)); fscache_enqueue_operation()
93 static void fscache_run_op(struct fscache_object *object, fscache_run_op() argument
99 object->n_in_progress++; fscache_run_op()
110 static void fscache_report_unexpected_submission(struct fscache_object *object, fscache_report_unexpected_submission() argument
123 op->debug_id, object->debug_id, object->state->name); fscache_report_unexpected_submission()
124 kdebug("objstate=%s [%s]", object->state->name, ostate->name); fscache_report_unexpected_submission()
125 kdebug("objflags=%lx", object->flags); fscache_report_unexpected_submission()
126 kdebug("objevent=%lx [%lx]", object->events, object->event_mask); fscache_report_unexpected_submission()
128 object->n_ops, object->n_in_progress, object->n_exclusive); fscache_report_unexpected_submission()
130 if (!list_empty(&object->pending_ops)) { fscache_report_unexpected_submission()
132 list_for_each_entry(p, &object->pending_ops, pend_link) { fscache_report_unexpected_submission()
133 ASSERTCMP(p->object, ==, object); fscache_report_unexpected_submission()
145 * submit an exclusive operation for an object
149 int fscache_submit_exclusive_op(struct fscache_object *object, fscache_submit_exclusive_op() argument
156 _enter("{OBJ%x OP%x},", object->debug_id, op->debug_id); fscache_submit_exclusive_op()
161 spin_lock(&object->lock); fscache_submit_exclusive_op()
162 ASSERTCMP(object->n_ops, >=, object->n_in_progress); fscache_submit_exclusive_op()
163 ASSERTCMP(object->n_ops, >=, object->n_exclusive); fscache_submit_exclusive_op()
166 ostate = object->state; fscache_submit_exclusive_op()
170 flags = READ_ONCE(object->flags); fscache_submit_exclusive_op()
176 } else if (unlikely(fscache_cache_is_broken(object))) { fscache_submit_exclusive_op()
181 op->object = object; fscache_submit_exclusive_op()
182 object->n_ops++; fscache_submit_exclusive_op()
183 object->n_exclusive++; /* reads and writes must wait */ fscache_submit_exclusive_op()
185 if (object->n_in_progress > 0) { fscache_submit_exclusive_op()
187 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_exclusive_op()
189 } else if (!list_empty(&object->pending_ops)) { fscache_submit_exclusive_op()
191 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_exclusive_op()
193 fscache_start_operations(object); fscache_submit_exclusive_op()
195 ASSERTCMP(object->n_in_progress, ==, 0); fscache_submit_exclusive_op()
196 fscache_run_op(object, op); fscache_submit_exclusive_op()
200 clear_bit(FSCACHE_OBJECT_PENDING_WRITE, &object->flags); fscache_submit_exclusive_op()
203 op->object = object; fscache_submit_exclusive_op()
204 object->n_ops++; fscache_submit_exclusive_op()
205 object->n_exclusive++; /* reads and writes must wait */ fscache_submit_exclusive_op()
207 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_exclusive_op()
215 fscache_report_unexpected_submission(object, op, ostate); fscache_submit_exclusive_op()
221 spin_unlock(&object->lock); fscache_submit_exclusive_op()
226 * submit an operation for an object
228 * - during object creation (write ops may be submitted)
229 * - whilst the object is active
233 int fscache_submit_op(struct fscache_object *object, fscache_submit_op() argument
241 object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_submit_op()
246 spin_lock(&object->lock); fscache_submit_op()
247 ASSERTCMP(object->n_ops, >=, object->n_in_progress); fscache_submit_op()
248 ASSERTCMP(object->n_ops, >=, object->n_exclusive); fscache_submit_op()
251 ostate = object->state; fscache_submit_op()
255 flags = READ_ONCE(object->flags); fscache_submit_op()
261 } else if (unlikely(fscache_cache_is_broken(object))) { fscache_submit_op()
266 op->object = object; fscache_submit_op()
267 object->n_ops++; fscache_submit_op()
269 if (object->n_exclusive > 0) { fscache_submit_op()
271 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_op()
273 } else if (!list_empty(&object->pending_ops)) { fscache_submit_op()
275 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_op()
277 fscache_start_operations(object); fscache_submit_op()
279 ASSERTCMP(object->n_exclusive, ==, 0); fscache_submit_op()
280 fscache_run_op(object, op); fscache_submit_op()
284 op->object = object; fscache_submit_op()
285 object->n_ops++; fscache_submit_op()
287 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_op()
295 fscache_report_unexpected_submission(object, op, ostate); fscache_submit_op()
296 ASSERT(!fscache_object_is_active(object)); fscache_submit_op()
302 spin_unlock(&object->lock); fscache_submit_op()
307 * queue an object for withdrawal on error, aborting all following asynchronous
310 void fscache_abort_object(struct fscache_object *object) fscache_abort_object() argument
312 _enter("{OBJ%x}", object->debug_id); fscache_abort_object()
314 fscache_raise_event(object, FSCACHE_OBJECT_EV_ERROR); fscache_abort_object()
318 * Jump start the operation processing on an object. The caller must hold
319 * object->lock.
321 void fscache_start_operations(struct fscache_object *object) fscache_start_operations() argument
326 while (!list_empty(&object->pending_ops) && !stop) { fscache_start_operations()
327 op = list_entry(object->pending_ops.next, fscache_start_operations()
331 if (object->n_in_progress > 0) fscache_start_operations()
336 fscache_run_op(object, op); fscache_start_operations()
338 /* the pending queue was holding a ref on the object */ fscache_start_operations()
342 ASSERTCMP(object->n_in_progress, <=, object->n_ops); fscache_start_operations()
345 object->n_in_progress, object->debug_id); fscache_start_operations()
349 * cancel an operation that's pending on an object
354 struct fscache_object *object = op->object; fscache_cancel_op() local
358 _enter("OBJ%x OP%x}", op->object->debug_id, op->debug_id); fscache_cancel_op()
364 spin_lock(&object->lock); fscache_cancel_op()
376 object->n_exclusive--; fscache_cancel_op()
381 ASSERTCMP(object->n_in_progress, >, 0); fscache_cancel_op()
383 object->n_exclusive--; fscache_cancel_op()
384 object->n_in_progress--; fscache_cancel_op()
385 if (object->n_in_progress == 0) fscache_cancel_op()
386 fscache_start_operations(object); fscache_cancel_op()
392 object->n_exclusive--; fscache_cancel_op()
400 spin_unlock(&object->lock); fscache_cancel_op()
406 * Cancel all pending operations on an object
408 void fscache_cancel_all_ops(struct fscache_object *object) fscache_cancel_all_ops() argument
412 _enter("OBJ%x", object->debug_id); fscache_cancel_all_ops()
414 spin_lock(&object->lock); fscache_cancel_all_ops()
416 while (!list_empty(&object->pending_ops)) { fscache_cancel_all_ops()
417 op = list_entry(object->pending_ops.next, fscache_cancel_all_ops()
427 object->n_exclusive--; fscache_cancel_all_ops()
431 cond_resched_lock(&object->lock); fscache_cancel_all_ops()
434 spin_unlock(&object->lock); fscache_cancel_all_ops()
443 struct fscache_object *object = op->object; fscache_op_complete() local
445 _enter("OBJ%x", object->debug_id); fscache_op_complete()
448 ASSERTCMP(object->n_in_progress, >, 0); fscache_op_complete()
450 object->n_exclusive, >, 0); fscache_op_complete()
452 object->n_in_progress, ==, 1); fscache_op_complete()
454 spin_lock(&object->lock); fscache_op_complete()
464 object->n_exclusive--; fscache_op_complete()
465 object->n_in_progress--; fscache_op_complete()
466 if (object->n_in_progress == 0) fscache_op_complete()
467 fscache_start_operations(object); fscache_op_complete()
469 spin_unlock(&object->lock); fscache_op_complete()
480 struct fscache_object *object; fscache_put_operation() local
484 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_put_operation()
504 object = op->object; fscache_put_operation()
505 if (likely(object)) { fscache_put_operation()
507 atomic_dec(&object->n_reads); fscache_put_operation()
509 fscache_unuse_cookie(object); fscache_put_operation()
511 /* now... we may get called with the object spinlock held, so we fscache_put_operation()
514 if (!spin_trylock(&object->lock)) { fscache_put_operation()
518 cache = object->cache; fscache_put_operation()
527 ASSERTCMP(object->n_ops, >, 0); fscache_put_operation()
528 object->n_ops--; fscache_put_operation()
529 if (object->n_ops == 0) fscache_put_operation()
530 fscache_raise_event(object, FSCACHE_OBJECT_EV_CLEARED); fscache_put_operation()
532 spin_unlock(&object->lock); fscache_put_operation()
546 struct fscache_object *object; fscache_operation_gc() local
565 object = op->object; fscache_operation_gc()
566 spin_lock(&object->lock); fscache_operation_gc()
569 object->debug_id, op->debug_id); fscache_operation_gc()
575 ASSERTCMP(object->n_ops, >, 0); fscache_operation_gc()
576 object->n_ops--; fscache_operation_gc()
577 if (object->n_ops == 0) fscache_operation_gc()
578 fscache_raise_event(object, FSCACHE_OBJECT_EV_CLEARED); fscache_operation_gc()
580 spin_unlock(&object->lock); fscache_operation_gc()
593 * the caller holds a ref to this object, so we don't need to hold one
602 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_op_work_func()
H A Dobject.c1 /* FS-Cache object state machine handler
11 * See Documentation/filesystems/caching/object.txt for a description of the
12 * object state machine and the in-kernel representations.
77 * The object state machine.
116 * In such a situation, object->state remembers the state the machine should
149 static inline void fscache_done_parent_op(struct fscache_object *object) fscache_done_parent_op() argument
151 struct fscache_object *parent = object->parent; fscache_done_parent_op()
154 object->debug_id, parent->debug_id, parent->n_ops); fscache_done_parent_op()
167 static void fscache_object_sm_dispatcher(struct fscache_object *object) fscache_object_sm_dispatcher() argument
174 ASSERT(object != NULL); fscache_object_sm_dispatcher()
177 object->debug_id, object->state->name, object->events); fscache_object_sm_dispatcher()
179 event_mask = object->event_mask; fscache_object_sm_dispatcher()
181 object->event_mask = 0; /* Mask normal event handling */ fscache_object_sm_dispatcher()
182 state = object->state; fscache_object_sm_dispatcher()
184 events = object->events; fscache_object_sm_dispatcher()
187 if (events & object->oob_event_mask) { fscache_object_sm_dispatcher()
189 object->debug_id, events & object->oob_event_mask); fscache_object_sm_dispatcher()
190 for (t = object->oob_table; t->events; t++) { fscache_object_sm_dispatcher()
195 __clear_bit(event, &object->oob_event_mask); fscache_object_sm_dispatcher()
196 clear_bit(event, &object->events); fscache_object_sm_dispatcher()
209 clear_bit(event, &object->events); fscache_object_sm_dispatcher()
211 object->debug_id, event, fscache_object_sm_dispatcher()
213 object->state = state = new_state; fscache_object_sm_dispatcher()
226 _debug("{OBJ%x} exec %s", object->debug_id, state->name); fscache_object_sm_dispatcher()
228 new_state = state->work(object, event); fscache_object_sm_dispatcher()
231 _debug("{OBJ%x} %s notrans", object->debug_id, state->name); fscache_object_sm_dispatcher()
232 fscache_enqueue_object(object); fscache_object_sm_dispatcher()
233 event_mask = object->oob_event_mask; fscache_object_sm_dispatcher()
238 object->debug_id, state->name, new_state->name); fscache_object_sm_dispatcher()
239 object->state = state = new_state; fscache_object_sm_dispatcher()
250 event_mask = object->oob_event_mask; fscache_object_sm_dispatcher()
255 object->event_mask = event_mask; fscache_object_sm_dispatcher()
257 events = object->events; fscache_object_sm_dispatcher()
264 * execute an object
268 struct fscache_object *object = fscache_object_work_func() local
272 _enter("{OBJ%x}", object->debug_id); fscache_object_work_func()
275 fscache_object_sm_dispatcher(object); fscache_object_work_func()
277 fscache_put_object(object); fscache_object_work_func()
281 * fscache_object_init - Initialise a cache object description
282 * @object: Object description
283 * @cookie: Cookie object will be attached to
284 * @cache: Cache in which backing object will be found
286 * Initialise a cache object description to its basic values.
291 void fscache_object_init(struct fscache_object *object, fscache_object_init() argument
299 object->state = STATE(WAIT_FOR_INIT); fscache_object_init()
300 object->oob_table = fscache_osm_init_oob; fscache_object_init()
301 object->flags = 1 << FSCACHE_OBJECT_IS_LIVE; fscache_object_init()
302 spin_lock_init(&object->lock); fscache_object_init()
303 INIT_LIST_HEAD(&object->cache_link); fscache_object_init()
304 INIT_HLIST_NODE(&object->cookie_link); fscache_object_init()
305 INIT_WORK(&object->work, fscache_object_work_func); fscache_object_init()
306 INIT_LIST_HEAD(&object->dependents); fscache_object_init()
307 INIT_LIST_HEAD(&object->dep_link); fscache_object_init()
308 INIT_LIST_HEAD(&object->pending_ops); fscache_object_init()
309 object->n_children = 0; fscache_object_init()
310 object->n_ops = object->n_in_progress = object->n_exclusive = 0; fscache_object_init()
311 object->events = 0; fscache_object_init()
312 object->store_limit = 0; fscache_object_init()
313 object->store_limit_l = 0; fscache_object_init()
314 object->cache = cache; fscache_object_init()
315 object->cookie = cookie; fscache_object_init()
316 object->parent = NULL; fscache_object_init()
318 RB_CLEAR_NODE(&object->objlist_link); fscache_object_init()
321 object->oob_event_mask = 0; fscache_object_init()
322 for (t = object->oob_table; t->events; t++) fscache_object_init()
323 object->oob_event_mask |= t->events; fscache_object_init()
324 object->event_mask = object->oob_event_mask; fscache_object_init()
325 for (t = object->state->transitions; t->events; t++) fscache_object_init()
326 object->event_mask |= t->events; fscache_object_init()
331 * Mark the object as no longer being live, making sure that we synchronise
334 static inline void fscache_mark_object_dead(struct fscache_object *object) fscache_mark_object_dead() argument
336 spin_lock(&object->lock); fscache_mark_object_dead()
337 clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); fscache_mark_object_dead()
338 spin_unlock(&object->lock); fscache_mark_object_dead()
342 * Abort object initialisation before we start it.
344 static const struct fscache_state *fscache_abort_initialisation(struct fscache_object *object, fscache_abort_initialisation() argument
347 _enter("{OBJ%x},%d", object->debug_id, event); fscache_abort_initialisation()
349 object->oob_event_mask = 0; fscache_abort_initialisation()
350 fscache_dequeue_object(object); fscache_abort_initialisation()
355 * initialise an object
356 * - check the specified object's parent to see if we can make use of it
361 static const struct fscache_state *fscache_initialise_object(struct fscache_object *object, fscache_initialise_object() argument
367 _enter("{OBJ%x},%d", object->debug_id, event); fscache_initialise_object()
369 ASSERT(list_empty(&object->dep_link)); fscache_initialise_object()
371 parent = object->parent; fscache_initialise_object()
395 object->cache->ops->grab_object(object)) { fscache_initialise_object()
396 list_add(&object->dep_link, &parent->dependents); fscache_initialise_object()
414 * Once the parent object is ready, we should kick off our lookup op.
416 static const struct fscache_state *fscache_parent_ready(struct fscache_object *object, fscache_parent_ready() argument
419 struct fscache_object *parent = object->parent; fscache_parent_ready()
421 _enter("{OBJ%x},%d", object->debug_id, event); fscache_parent_ready()
428 object->lookup_jif = jiffies; fscache_parent_ready()
436 * look an object up in the cache from which it was allocated
437 * - we hold an "access lock" on the parent object, so the parent object cannot
440 static const struct fscache_state *fscache_look_up_object(struct fscache_object *object, fscache_look_up_object() argument
443 struct fscache_cookie *cookie = object->cookie; fscache_look_up_object()
444 struct fscache_object *parent = object->parent; fscache_look_up_object()
447 _enter("{OBJ%x},%d", object->debug_id, event); fscache_look_up_object()
449 object->oob_table = fscache_osm_lookup_oob; fscache_look_up_object()
459 test_bit(FSCACHE_IOERROR, &object->cache->flags) || fscache_look_up_object()
460 !fscache_use_cookie(object)) { fscache_look_up_object()
466 cookie->def->name, object->cache->tag->name); fscache_look_up_object()
470 ret = object->cache->ops->lookup_object(object); fscache_look_up_object()
473 fscache_unuse_cookie(object); fscache_look_up_object()
476 /* probably stuck behind another object, so move this one to fscache_look_up_object()
494 * @object: Object pointing to cookie to mark
497 * existing backing object to continue as there's no data for them to read.
499 void fscache_object_lookup_negative(struct fscache_object *object) fscache_object_lookup_negative() argument
501 struct fscache_cookie *cookie = object->cookie; fscache_object_lookup_negative()
503 _enter("{OBJ%x,%s}", object->debug_id, object->state->name); fscache_object_lookup_negative()
505 if (!test_and_set_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)) { fscache_object_lookup_negative()
523 * fscache_obtained_object - Note successful object lookup or creation
524 * @object: Object pointing to cookie to mark
527 * data to a backing object to continue.
529 * Note that after calling this, an object's cookie may be relinquished by the
530 * netfs, and so must be accessed with object lock held.
532 void fscache_obtained_object(struct fscache_object *object) fscache_obtained_object() argument
534 struct fscache_cookie *cookie = object->cookie; fscache_obtained_object()
536 _enter("{OBJ%x,%s}", object->debug_id, object->state->name); fscache_obtained_object()
540 if (!test_and_set_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)) { fscache_obtained_object()
556 set_bit(FSCACHE_OBJECT_IS_AVAILABLE, &object->flags); fscache_obtained_object()
562 * handle an object that has just become available
564 static const struct fscache_state *fscache_object_available(struct fscache_object *object, fscache_object_available() argument
567 _enter("{OBJ%x},%d", object->debug_id, event); fscache_object_available()
569 object->oob_table = fscache_osm_run_oob; fscache_object_available()
571 spin_lock(&object->lock); fscache_object_available()
573 fscache_done_parent_op(object); fscache_object_available()
574 if (object->n_in_progress == 0) { fscache_object_available()
575 if (object->n_ops > 0) { fscache_object_available()
576 ASSERTCMP(object->n_ops, >=, object->n_obj_ops); fscache_object_available()
577 fscache_start_operations(object); fscache_object_available()
579 ASSERT(list_empty(&object->pending_ops)); fscache_object_available()
582 spin_unlock(&object->lock); fscache_object_available()
585 object->cache->ops->lookup_complete(object); fscache_object_available()
588 fscache_hist(fscache_obj_instantiate_histogram, object->lookup_jif); fscache_object_available()
596 * Wake up this object's dependent objects now that we've become available.
598 static const struct fscache_state *fscache_jumpstart_dependents(struct fscache_object *object, fscache_jumpstart_dependents() argument
601 _enter("{OBJ%x},%d", object->debug_id, event); fscache_jumpstart_dependents()
603 if (!fscache_enqueue_dependents(object, FSCACHE_OBJECT_EV_PARENT_READY)) fscache_jumpstart_dependents()
611 static const struct fscache_state *fscache_lookup_failure(struct fscache_object *object, fscache_lookup_failure() argument
616 _enter("{OBJ%x},%d", object->debug_id, event); fscache_lookup_failure()
618 object->oob_event_mask = 0; fscache_lookup_failure()
621 object->cache->ops->lookup_complete(object); fscache_lookup_failure()
624 set_bit(FSCACHE_OBJECT_KILLED_BY_CACHE, &object->flags); fscache_lookup_failure()
626 cookie = object->cookie; fscache_lookup_failure()
631 fscache_done_parent_op(object); fscache_lookup_failure()
636 * Wait for completion of all active operations on this object and the death of
637 * all child objects of this object.
639 static const struct fscache_state *fscache_kill_object(struct fscache_object *object, fscache_kill_object() argument
643 object->debug_id, object->n_ops, object->n_children, event); fscache_kill_object()
645 fscache_mark_object_dead(object); fscache_kill_object()
646 object->oob_event_mask = 0; fscache_kill_object()
648 if (list_empty(&object->dependents) && fscache_kill_object()
649 object->n_ops == 0 && fscache_kill_object()
650 object->n_children == 0) fscache_kill_object()
653 if (object->n_in_progress == 0) { fscache_kill_object()
654 spin_lock(&object->lock); fscache_kill_object()
655 if (object->n_ops > 0 && object->n_in_progress == 0) fscache_kill_object()
656 fscache_start_operations(object); fscache_kill_object()
657 spin_unlock(&object->lock); fscache_kill_object()
660 if (!list_empty(&object->dependents)) fscache_kill_object()
669 static const struct fscache_state *fscache_kill_dependents(struct fscache_object *object, fscache_kill_dependents() argument
672 _enter("{OBJ%x},%d", object->debug_id, event); fscache_kill_dependents()
674 if (!fscache_enqueue_dependents(object, FSCACHE_OBJECT_EV_KILL)) fscache_kill_dependents()
680 * Drop an object's attachments
682 static const struct fscache_state *fscache_drop_object(struct fscache_object *object, fscache_drop_object() argument
685 struct fscache_object *parent = object->parent; fscache_drop_object()
686 struct fscache_cookie *cookie = object->cookie; fscache_drop_object()
687 struct fscache_cache *cache = object->cache; fscache_drop_object()
690 _enter("{OBJ%x,%d},%d", object->debug_id, object->n_children, event); fscache_drop_object()
693 ASSERT(!hlist_unhashed(&object->cookie_link)); fscache_drop_object()
699 hlist_del_init(&object->cookie_link); fscache_drop_object()
711 spin_lock(&object->lock); fscache_drop_object()
712 spin_unlock(&object->lock); fscache_drop_object()
716 list_del_init(&object->cache_link); fscache_drop_object()
720 cache->ops->drop_object(object); fscache_drop_object()
723 /* The parent object wants to know when all it dependents have gone */ fscache_drop_object()
733 object->parent = NULL; fscache_drop_object()
736 /* this just shifts the object release to the work processor */ fscache_drop_object()
737 fscache_put_object(object); fscache_drop_object()
745 * get a ref on an object
747 static int fscache_get_object(struct fscache_object *object) fscache_get_object() argument
752 ret = object->cache->ops->grab_object(object) ? 0 : -EAGAIN; fscache_get_object()
758 * Discard a ref on an object
760 static void fscache_put_object(struct fscache_object *object) fscache_put_object() argument
763 object->cache->ops->put_object(object); fscache_put_object()
768 * fscache_object_destroy - Note that a cache object is about to be destroyed
769 * @object: The object to be destroyed
771 * Note the imminent destruction and deallocation of a cache object record.
773 void fscache_object_destroy(struct fscache_object *object) fscache_object_destroy() argument
775 fscache_objlist_remove(object); fscache_object_destroy()
778 fscache_cookie_put(object->cookie); fscache_object_destroy()
779 object->cookie = NULL; fscache_object_destroy()
784 * enqueue an object for metadata-type processing
786 void fscache_enqueue_object(struct fscache_object *object) fscache_enqueue_object() argument
788 _enter("{OBJ%x}", object->debug_id); fscache_enqueue_object()
790 if (fscache_get_object(object) >= 0) { fscache_enqueue_object()
794 if (queue_work(fscache_object_wq, &object->work)) { fscache_enqueue_object()
798 fscache_put_object(object); fscache_enqueue_object()
805 * fscache_object_sleep_till_congested - Sleep until object wq is congested
808 * Allow an object handler to sleep until the object workqueue is congested.
814 * %true is returned if the object wq is congested, %false otherwise.
834 * Enqueue the dependents of an object for metadata-type processing.
840 static bool fscache_enqueue_dependents(struct fscache_object *object, int event) fscache_enqueue_dependents() argument
845 _enter("{OBJ%x}", object->debug_id); fscache_enqueue_dependents()
847 if (list_empty(&object->dependents)) fscache_enqueue_dependents()
850 spin_lock(&object->lock); fscache_enqueue_dependents()
852 while (!list_empty(&object->dependents)) { fscache_enqueue_dependents()
853 dep = list_entry(object->dependents.next, fscache_enqueue_dependents()
860 if (!list_empty(&object->dependents) && need_resched()) { fscache_enqueue_dependents()
866 spin_unlock(&object->lock); fscache_enqueue_dependents()
871 * remove an object from whatever queue it's waiting on
873 static void fscache_dequeue_object(struct fscache_object *object) fscache_dequeue_object() argument
875 _enter("{OBJ%x}", object->debug_id); fscache_dequeue_object()
877 if (!list_empty(&object->dep_link)) { fscache_dequeue_object()
878 spin_lock(&object->parent->lock); fscache_dequeue_object()
879 list_del_init(&object->dep_link); fscache_dequeue_object()
880 spin_unlock(&object->parent->lock); fscache_dequeue_object()
887 * fscache_check_aux - Ask the netfs whether an object on disk is still valid
888 * @object: The object to ask about
889 * @data: The auxiliary data for the object
892 * This function consults the netfs about the coherency state of an object.
894 * fscache_look_up_object() on behalf of the cache backend during object lookup
897 enum fscache_checkaux fscache_check_aux(struct fscache_object *object, fscache_check_aux() argument
902 if (!object->cookie->def->check_aux) { fscache_check_aux()
907 result = object->cookie->def->check_aux(object->cookie->netfs_data, fscache_check_aux()
934 * Asynchronously invalidate an object.
936 static const struct fscache_state *_fscache_invalidate_object(struct fscache_object *object, _fscache_invalidate_object() argument
940 struct fscache_cookie *cookie = object->cookie; _fscache_invalidate_object()
942 _enter("{OBJ%x},%d", object->debug_id, event); _fscache_invalidate_object()
945 * retire the object instead. _fscache_invalidate_object()
947 if (!fscache_use_cookie(object)) { _fscache_invalidate_object()
948 ASSERT(object->cookie->stores.rnode == NULL); _fscache_invalidate_object()
949 set_bit(FSCACHE_OBJECT_RETIRED, &object->flags); _fscache_invalidate_object()
956 clear_bit(FSCACHE_OBJECT_PENDING_WRITE, &object->flags); _fscache_invalidate_object()
957 fscache_cancel_all_ops(object); _fscache_invalidate_object()
964 fscache_operation_init(op, object->cache->ops->invalidate_object, _fscache_invalidate_object()
971 if (fscache_submit_exclusive_op(object, op) < 0) _fscache_invalidate_object()
991 fscache_mark_object_dead(object); _fscache_invalidate_object()
992 fscache_unuse_cookie(object); _fscache_invalidate_object()
997 fscache_mark_object_dead(object); _fscache_invalidate_object()
999 fscache_unuse_cookie(object); _fscache_invalidate_object()
1005 static const struct fscache_state *fscache_invalidate_object(struct fscache_object *object, fscache_invalidate_object() argument
1012 s = _fscache_invalidate_object(object, event); fscache_invalidate_object()
1018 * Asynchronously update an object.
1020 static const struct fscache_state *fscache_update_object(struct fscache_object *object, fscache_update_object() argument
1023 _enter("{OBJ%x},%d", object->debug_id, event); fscache_update_object()
1027 object->cache->ops->update_object(object); fscache_update_object()
1035 * fscache_object_retrying_stale - Note retrying stale object
1036 * @object: The object that will be retried
1038 * Note that an object lookup found an on-disk object that was adjudged to be
1041 void fscache_object_retrying_stale(struct fscache_object *object) fscache_object_retrying_stale() argument
1048 * fscache_object_mark_killed - Note that an object was killed
1049 * @object: The object that was culled
1050 * @why: The reason the object was killed.
1052 * Note that an object was killed. Returns true if the object was
1055 void fscache_object_mark_killed(struct fscache_object *object, fscache_object_mark_killed() argument
1058 if (test_and_set_bit(FSCACHE_OBJECT_KILLED_BY_CACHE, &object->flags)) { fscache_object_mark_killed()
1060 object->cache->identifier); fscache_object_mark_killed()
H A DMakefile11 object.o \
18 fscache-$(CONFIG_FSCACHE_OBJECT_LIST) += object-list.o
H A Dcookie.c28 struct fscache_object *object);
44 * request a cookie to represent an object (index, datafile, xattr, etc)
45 * - parent specifies the parent object
50 * - all attached caches will be searched to see if they contain this object
100 * attempt to wake up every time the object operations queue quiesces. __fscache_acquire_cookie()
129 /* if the object is an index then we need do nothing more here __fscache_acquire_cookie()
189 * object representation too
193 struct fscache_object *object; fscache_acquire_non_index_cookie() local
212 /* select a cache in which to store the object */ fscache_acquire_non_index_cookie()
234 /* pass on how big the object we're caching is supposed to be */ fscache_acquire_non_index_cookie()
243 object = hlist_entry(cookie->backing_objects.first, fscache_acquire_non_index_cookie()
246 fscache_set_store_limit(object, i_size); fscache_acquire_non_index_cookie()
250 fscache_raise_event(object, FSCACHE_OBJECT_EV_NEW_CHILD); fscache_acquire_non_index_cookie()
275 * recursively allocate cache object records for a cookie/cache combination
281 struct fscache_object *object; fscache_alloc_object() local
287 hlist_for_each_entry(object, &cookie->backing_objects, fscache_alloc_object()
289 if (object->cache == cache) fscache_alloc_object()
294 /* ask the cache to allocate an object (we may end up with duplicate fscache_alloc_object()
297 object = cache->ops->alloc_object(cache, cookie); fscache_alloc_object()
299 if (IS_ERR(object)) { fscache_alloc_object()
301 ret = PTR_ERR(object); fscache_alloc_object()
307 object->debug_id = atomic_inc_return(&fscache_object_debug_id); fscache_alloc_object()
310 object->debug_id, cookie->def->name, object->events); fscache_alloc_object()
317 * discard the object we just allocated and instead use the one fscache_alloc_object()
319 if (fscache_attach_object(cookie, object) < 0) { fscache_alloc_object()
321 cache->ops->put_object(object); fscache_alloc_object()
330 if (fscache_object_is_dying(object) || fscache_alloc_object()
331 fscache_cache_is_broken(object)) { fscache_alloc_object()
341 cache->ops->put_object(object); fscache_alloc_object()
349 * attach a cache object to a cookie
352 struct fscache_object *object) fscache_attach_object()
355 struct fscache_cache *cache = object->cache; fscache_attach_object()
358 _enter("{%s},{OBJ%x}", cookie->def->name, object->debug_id); fscache_attach_object()
362 /* there may be multiple initial creations of this object, but we only fscache_attach_object()
366 if (p->cache == object->cache) { fscache_attach_object()
373 /* pin the parent object */ fscache_attach_object()
377 if (p->cache == object->cache) { fscache_attach_object()
383 object->parent = p; fscache_attach_object()
392 /* attach to the cache's object list */ fscache_attach_object()
393 if (list_empty(&object->cache_link)) { fscache_attach_object()
395 list_add(&object->cache_link, &cache->object_list); fscache_attach_object()
400 object->cookie = cookie; fscache_attach_object()
402 hlist_add_head(&object->cookie_link, &cookie->backing_objects); fscache_attach_object()
404 fscache_objlist_add(object); fscache_attach_object()
414 * Invalidate an object. Callable with spinlocks held.
418 struct fscache_object *object; __fscache_invalidate() local
434 /* If there's an object, we tell the object state machine to handle the __fscache_invalidate()
444 object = hlist_entry(cookie->backing_objects.first, __fscache_invalidate()
447 if (fscache_object_is_live(object)) __fscache_invalidate()
449 object, FSCACHE_OBJECT_EV_INVALIDATE); __fscache_invalidate()
460 * Wait for object invalidation to complete.
478 struct fscache_object *object; __fscache_update_cookie() local
498 hlist_for_each_entry(object, __fscache_update_cookie()
500 fscache_raise_event(object, FSCACHE_OBJECT_EV_UPDATE); __fscache_update_cookie()
514 struct fscache_object *object; __fscache_disable_cookie() local
542 hlist_for_each_entry(object, &cookie->backing_objects, cookie_link) { __fscache_disable_cookie()
544 set_bit(FSCACHE_OBJECT_RETIRED, &object->flags); __fscache_disable_cookie()
545 fscache_raise_event(object, FSCACHE_OBJECT_EV_KILL); __fscache_disable_cookie()
578 * - the object will be marked as recyclable on disk if retire is true
657 struct fscache_object *object; __fscache_check_consistency() local
685 object = hlist_entry(cookie->backing_objects.first, __fscache_check_consistency()
687 if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) __fscache_check_consistency()
693 if (fscache_submit_op(object, op) < 0) __fscache_check_consistency()
696 /* the work queue now carries its own ref on the object */ __fscache_check_consistency()
699 ret = fscache_wait_for_operation_activation(object, op, NULL, NULL); __fscache_check_consistency()
702 ret = object->cache->ops->check_consistency(op); __fscache_check_consistency()
351 fscache_attach_object(struct fscache_cookie *cookie, struct fscache_object *object) fscache_attach_object() argument
H A Dpage.c143 static void fscache_end_page_write(struct fscache_object *object, fscache_end_page_write() argument
149 spin_lock(&object->lock); fscache_end_page_write()
150 cookie = object->cookie; fscache_end_page_write()
165 spin_unlock(&object->lock); fscache_end_page_write()
171 * actually apply the changed attributes to a cache object
175 struct fscache_object *object = op->object; fscache_attr_changed_op() local
178 _enter("{OBJ%x OP%x}", object->debug_id, op->debug_id); fscache_attr_changed_op()
182 if (fscache_object_is_active(object)) { fscache_attr_changed_op()
184 ret = object->cache->ops->attr_changed(object); fscache_attr_changed_op()
187 fscache_abort_object(object); fscache_attr_changed_op()
195 * notification that the attributes on an object have changed
200 struct fscache_object *object; __fscache_attr_changed() local
226 object = hlist_entry(cookie->backing_objects.first, __fscache_attr_changed()
230 if (fscache_submit_exclusive_op(object, op) < 0) __fscache_attr_changed()
354 * wait for an object to become active (or dead)
356 int fscache_wait_for_operation_activation(struct fscache_object *object, fscache_wait_for_operation_activation() argument
389 if (unlikely(fscache_object_is_dying(object) || fscache_wait_for_operation_activation()
390 fscache_cache_is_broken(object))) { fscache_wait_for_operation_activation()
406 * -ENOBUFS - no backing object available in which to cache the block
407 * -ENODATA - no data available in the backing object for this block
417 struct fscache_object *object; __fscache_read_or_alloc_page() local
452 object = hlist_entry(cookie->backing_objects.first, __fscache_read_or_alloc_page()
455 ASSERT(test_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)); __fscache_read_or_alloc_page()
458 atomic_inc(&object->n_reads); __fscache_read_or_alloc_page()
461 if (fscache_submit_op(object, &op->op) < 0) __fscache_read_or_alloc_page()
470 object, &op->op, __fscache_read_or_alloc_page()
477 if (test_bit(FSCACHE_COOKIE_NO_DATA_YET, &object->cookie->flags)) { __fscache_read_or_alloc_page()
479 ret = object->cache->ops->allocate_page(op, page, gfp); __fscache_read_or_alloc_page()
485 ret = object->cache->ops->read_or_alloc_page(op, page, gfp); __fscache_read_or_alloc_page()
506 atomic_dec(&object->n_reads); __fscache_read_or_alloc_page()
526 * -ENOBUFS - no backing object or space available in which to cache any
528 * -ENODATA - no data available in the backing object for some or all of
547 struct fscache_object *object; __fscache_read_or_alloc_pages() local
580 object = hlist_entry(cookie->backing_objects.first, __fscache_read_or_alloc_pages()
584 atomic_inc(&object->n_reads); __fscache_read_or_alloc_pages()
587 if (fscache_submit_op(object, &op->op) < 0) __fscache_read_or_alloc_pages()
596 object, &op->op, __fscache_read_or_alloc_pages()
603 if (test_bit(FSCACHE_COOKIE_NO_DATA_YET, &object->cookie->flags)) { __fscache_read_or_alloc_pages()
605 ret = object->cache->ops->allocate_pages( __fscache_read_or_alloc_pages()
610 ret = object->cache->ops->read_or_alloc_pages( __fscache_read_or_alloc_pages()
632 atomic_dec(&object->n_reads); __fscache_read_or_alloc_pages()
651 * -ENOBUFS - no backing object available in which to cache the block
659 struct fscache_object *object; __fscache_alloc_page() local
691 object = hlist_entry(cookie->backing_objects.first, __fscache_alloc_page()
695 if (fscache_submit_op(object, &op->op) < 0) __fscache_alloc_page()
702 object, &op->op, __fscache_alloc_page()
710 ret = object->cache->ops->allocate_page(op, page, gfp); __fscache_alloc_page()
770 struct fscache_object *object = op->op.object; fscache_write_op() local
779 spin_lock(&object->lock); fscache_write_op()
780 cookie = object->cookie; fscache_write_op()
782 if (!fscache_object_is_active(object)) { fscache_write_op()
783 /* If we get here, then the on-disk cache object likely longer fscache_write_op()
786 spin_unlock(&object->lock); fscache_write_op()
793 /* If we get here, then the cookie belonging to the object was fscache_write_op()
799 spin_unlock(&object->lock); fscache_write_op()
802 _op->flags, _op->state, object->state->short_name, fscache_write_op()
803 object->flags); fscache_write_op()
830 spin_unlock(&object->lock); fscache_write_op()
834 ret = object->cache->ops->write_page(op, page); fscache_write_op()
836 fscache_end_page_write(object, page); fscache_write_op()
838 fscache_abort_object(object); fscache_write_op()
852 clear_bit(FSCACHE_OBJECT_PENDING_WRITE, &object->flags); fscache_write_op()
853 spin_unlock(&object->lock); fscache_write_op()
897 * -ENOBUFS - no backing object available in which to cache the page
900 * if the cookie still has a backing object at this point, that object can be
903 * (1) negative lookup, object not yet created (FSCACHE_COOKIE_CREATING is
911 * (2) negative lookup, object created, initial fill being made from netfs
918 * (3) object extant (queue op to store this page)
927 struct fscache_object *object; __fscache_write_page() local
963 object = hlist_entry(cookie->backing_objects.first, __fscache_write_page()
965 if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) __fscache_write_page()
969 * object */ __fscache_write_page()
970 spin_lock(&object->lock); __fscache_write_page()
973 _debug("store limit %llx", (unsigned long long) object->store_limit); __fscache_write_page()
989 if (test_and_set_bit(FSCACHE_OBJECT_PENDING_WRITE, &object->flags)) __fscache_write_page()
993 spin_unlock(&object->lock); __fscache_write_page()
996 op->store_limit = object->store_limit; __fscache_write_page()
999 if (fscache_submit_op(object, &op->op) < 0) __fscache_write_page()
1007 /* the work queue now carries its own ref on the object */ __fscache_write_page()
1016 spin_unlock(&object->lock); __fscache_write_page()
1035 spin_unlock(&object->lock); __fscache_write_page()
1060 struct fscache_object *object; __fscache_uncache_page() local
1073 /* get the object */ __fscache_uncache_page()
1081 object = hlist_entry(cookie->backing_objects.first, __fscache_uncache_page()
1090 object->cache->ops->uncache_page) { __fscache_uncache_page()
1093 object->cache->ops->uncache_page(object, page); __fscache_uncache_page()
1115 struct fscache_cookie *cookie = op->op.object->cookie; fscache_mark_page_cached()
H A Dcache.c90 * select a cache in which to store an object
92 * - the object will never be an index
98 struct fscache_object *object; fscache_select_cache_for_object() local
114 object = hlist_entry(cookie->backing_objects.first, fscache_select_cache_for_object()
117 cache = object->cache; fscache_select_cache_for_object()
118 if (fscache_object_is_dying(object) || fscache_select_cache_for_object()
209 * @ifsdef: The record of the cache object describing the top-level index
263 /* add the cache's netfs definition index object to the cache's fscache_add_cache()
270 /* add the cache's netfs definition index object to the top level index fscache_add_cache()
271 * cookie as a known backing object */ fscache_add_cache()
332 struct fscache_object *object; fscache_withdraw_all_objects() local
338 object = list_entry(cache->object_list.next, fscache_withdraw_all_objects()
340 list_move_tail(&object->cache_link, dying_objects); fscache_withdraw_all_objects()
342 _debug("withdraw %p", object->cookie); fscache_withdraw_all_objects()
347 fscache_raise_event(object, FSCACHE_OBJECT_EV_KILL); fscache_withdraw_all_objects()
H A Dinternal.h18 * - object->lock
19 * - object->parent->lock
103 * object.c
108 * object-list.c
116 #define fscache_objlist_add(object) do {} while(0)
117 #define fscache_objlist_remove(object) do {} while(0)
299 * raise an event on an object
300 * - if the event is not masked for that object, then the object is
303 static inline void fscache_raise_event(struct fscache_object *object, fscache_raise_event() argument
309 object->debug_id, object->event_mask, (1 << event)); fscache_raise_event()
311 if (!test_and_set_bit(event, &object->events) && fscache_raise_event()
312 test_bit(event, &object->event_mask)) fscache_raise_event()
313 fscache_enqueue_object(object); fscache_raise_event()
/linux-4.4.14/fs/cachefiles/
H A Dinterface.c24 * allocate an object record for a cookie lookup and prepare the lookup data
31 struct cachefiles_object *object; cachefiles_alloc_object() local
46 /* create a new object record and a temporary leaf image */ cachefiles_alloc_object()
47 object = kmem_cache_alloc(cachefiles_object_jar, cachefiles_gfp); cachefiles_alloc_object()
48 if (!object) cachefiles_alloc_object()
51 ASSERTCMP(object->backer, ==, NULL); cachefiles_alloc_object()
53 BUG_ON(test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)); cachefiles_alloc_object()
54 atomic_set(&object->usage, 1); cachefiles_alloc_object()
56 fscache_object_init(&object->fscache, cookie, &cache->cache); cachefiles_alloc_object()
58 object->type = cookie->def->type; cachefiles_alloc_object()
77 key = cachefiles_cook_key(buffer, keylen + 2, object->type); cachefiles_alloc_object()
81 /* get hold of the auxiliary data and prepend the object type */ cachefiles_alloc_object()
95 object->lookup_data = lookup_data; cachefiles_alloc_object()
97 _leave(" = %p [%p]", &object->fscache, lookup_data); cachefiles_alloc_object()
98 return &object->fscache; cachefiles_alloc_object()
103 BUG_ON(test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)); cachefiles_alloc_object()
104 kmem_cache_free(cachefiles_object_jar, object); cachefiles_alloc_object()
120 struct cachefiles_object *parent, *object; cachefiles_lookup_object() local
130 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_lookup_object()
131 lookup_data = object->lookup_data; cachefiles_lookup_object()
137 ret = cachefiles_walk_to_object(parent, object, cachefiles_lookup_object()
144 object->fscache.cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) cachefiles_lookup_object()
145 cachefiles_attr_changed(&object->fscache); cachefiles_lookup_object()
150 fscache_object_lookup_error(&object->fscache); cachefiles_lookup_object()
162 struct cachefiles_object *object; cachefiles_lookup_complete() local
164 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_lookup_complete()
166 _enter("{OBJ%x,%p}", object->fscache.debug_id, object->lookup_data); cachefiles_lookup_complete()
168 if (object->lookup_data) { cachefiles_lookup_complete()
169 kfree(object->lookup_data->key); cachefiles_lookup_complete()
170 kfree(object->lookup_data->auxdata); cachefiles_lookup_complete()
171 kfree(object->lookup_data); cachefiles_lookup_complete()
172 object->lookup_data = NULL; cachefiles_lookup_complete()
177 * increment the usage count on an inode object (may fail if unmounting)
182 struct cachefiles_object *object = cachefiles_grab_object() local
185 _enter("{OBJ%x,%d}", _object->debug_id, atomic_read(&object->usage)); cachefiles_grab_object()
188 ASSERT((atomic_read(&object->usage) & 0xffff0000) != 0x6b6b0000); cachefiles_grab_object()
191 atomic_inc(&object->usage); cachefiles_grab_object()
192 return &object->fscache; cachefiles_grab_object()
196 * update the auxiliary data for an object object on disk
200 struct cachefiles_object *object; cachefiles_update_object() local
209 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_update_object()
210 cache = container_of(object->fscache.cache, struct cachefiles_cache, cachefiles_update_object()
218 cookie = object->fscache.cookie; cachefiles_update_object()
241 cachefiles_update_object_xattr(object, auxdata); cachefiles_update_object()
248 * discard the resources pinned by an object and effect retirement if
253 struct cachefiles_object *object; cachefiles_drop_object() local
259 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_drop_object()
262 object->fscache.debug_id, atomic_read(&object->usage)); cachefiles_drop_object()
264 cache = container_of(object->fscache.cache, cachefiles_drop_object()
268 ASSERT((atomic_read(&object->usage) & 0xffff0000) != 0x6b6b0000); cachefiles_drop_object()
271 /* We need to tidy the object up if we did in fact manage to open it. cachefiles_drop_object()
272 * It's possible for us to get here before the object is fully cachefiles_drop_object()
273 * initialised if the parent goes away or the object gets retired cachefiles_drop_object()
276 if (object->dentry) { cachefiles_drop_object()
278 if (test_bit(FSCACHE_OBJECT_RETIRED, &object->fscache.flags) && cachefiles_drop_object()
281 _debug("- retire object OBJ%x", object->fscache.debug_id); cachefiles_drop_object()
283 cachefiles_delete_object(cache, object); cachefiles_drop_object()
287 /* close the filesystem stuff attached to the object */ cachefiles_drop_object()
288 if (object->backer != object->dentry) cachefiles_drop_object()
289 dput(object->backer); cachefiles_drop_object()
290 object->backer = NULL; cachefiles_drop_object()
293 /* note that the object is now inactive */ cachefiles_drop_object()
294 if (test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { cachefiles_drop_object()
297 &object->flags)) cachefiles_drop_object()
299 rb_erase(&object->active_node, &cache->active_nodes); cachefiles_drop_object()
300 wake_up_bit(&object->flags, CACHEFILES_OBJECT_ACTIVE); cachefiles_drop_object()
304 dput(object->dentry); cachefiles_drop_object()
305 object->dentry = NULL; cachefiles_drop_object()
311 * dispose of a reference to an object
315 struct cachefiles_object *object; cachefiles_put_object() local
320 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_put_object()
323 object->fscache.debug_id, atomic_read(&object->usage)); cachefiles_put_object()
326 ASSERT((atomic_read(&object->usage) & 0xffff0000) != 0x6b6b0000); cachefiles_put_object()
329 ASSERTIFCMP(object->fscache.parent, cachefiles_put_object()
330 object->fscache.parent->n_children, >, 0); cachefiles_put_object()
332 if (atomic_dec_and_test(&object->usage)) { cachefiles_put_object()
333 _debug("- kill object OBJ%x", object->fscache.debug_id); cachefiles_put_object()
335 ASSERT(!test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)); cachefiles_put_object()
336 ASSERTCMP(object->fscache.parent, ==, NULL); cachefiles_put_object()
337 ASSERTCMP(object->backer, ==, NULL); cachefiles_put_object()
338 ASSERTCMP(object->dentry, ==, NULL); cachefiles_put_object()
339 ASSERTCMP(object->fscache.n_ops, ==, 0); cachefiles_put_object()
340 ASSERTCMP(object->fscache.n_children, ==, 0); cachefiles_put_object()
342 if (object->lookup_data) { cachefiles_put_object()
343 kfree(object->lookup_data->key); cachefiles_put_object()
344 kfree(object->lookup_data->auxdata); cachefiles_put_object()
345 kfree(object->lookup_data); cachefiles_put_object()
346 object->lookup_data = NULL; cachefiles_put_object()
349 cache = object->fscache.cache; cachefiles_put_object()
350 fscache_object_destroy(&object->fscache); cachefiles_put_object()
351 kmem_cache_free(cachefiles_object_jar, object); cachefiles_put_object()
392 struct cachefiles_object *object; cachefiles_check_consistency() local
397 _enter("{OBJ%x}", op->object->debug_id); cachefiles_check_consistency()
399 object = container_of(op->object, struct cachefiles_object, fscache); cachefiles_check_consistency()
400 cache = container_of(object->fscache.cache, cachefiles_check_consistency()
404 ret = cachefiles_check_auxdata(object); cachefiles_check_consistency()
412 * notification the attributes on an object have changed
417 struct cachefiles_object *object; cachefiles_attr_changed() local
430 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_attr_changed()
431 cache = container_of(object->fscache.cache, cachefiles_attr_changed()
434 if (ni_size == object->i_size) cachefiles_attr_changed()
437 if (!object->backer) cachefiles_attr_changed()
440 ASSERT(d_is_reg(object->backer)); cachefiles_attr_changed()
442 fscache_set_store_limit(&object->fscache, ni_size); cachefiles_attr_changed()
444 oi_size = i_size_read(d_backing_inode(object->backer)); cachefiles_attr_changed()
449 mutex_lock(&d_inode(object->backer)->i_mutex); cachefiles_attr_changed()
458 ret = notify_change(object->backer, &newattrs, NULL); cachefiles_attr_changed()
465 ret = notify_change(object->backer, &newattrs, NULL); cachefiles_attr_changed()
468 mutex_unlock(&d_inode(object->backer)->i_mutex); cachefiles_attr_changed()
472 fscache_set_store_limit(&object->fscache, 0); cachefiles_attr_changed()
473 cachefiles_io_error_obj(object, "Size set failed"); cachefiles_attr_changed()
482 * Invalidate an object
486 struct cachefiles_object *object; cachefiles_invalidate_object() local
493 object = container_of(op->object, struct cachefiles_object, fscache); cachefiles_invalidate_object()
494 cache = container_of(object->fscache.cache, cachefiles_invalidate_object()
497 op->object->cookie->def->get_attr(op->object->cookie->netfs_data, cachefiles_invalidate_object()
501 op->object->debug_id, (unsigned long long)ni_size); cachefiles_invalidate_object()
503 if (object->backer) { cachefiles_invalidate_object()
504 ASSERT(d_is_reg(object->backer)); cachefiles_invalidate_object()
506 fscache_set_store_limit(&object->fscache, ni_size); cachefiles_invalidate_object()
508 path.dentry = object->backer; cachefiles_invalidate_object()
518 fscache_set_store_limit(&object->fscache, 0); cachefiles_invalidate_object()
520 cachefiles_io_error_obj(object, cachefiles_invalidate_object()
H A Dxattr.c26 * check the type label on an object
29 int cachefiles_check_object_type(struct cachefiles_object *object) cachefiles_check_object_type() argument
31 struct dentry *dentry = object->dentry; cachefiles_check_object_type()
38 if (!object->fscache.cookie) cachefiles_check_object_type()
41 snprintf(type, 3, "%02x", object->fscache.cookie->def->type); cachefiles_check_object_type()
43 _enter("%p{%s}", object, type); cachefiles_check_object_type()
86 pr_err("Cache object %lu type xattr length incorrect\n", cachefiles_check_object_type()
93 pr_err("Cache object %pd [%lu] type %s not %s\n", cachefiles_check_object_type()
103 int cachefiles_set_object_xattr(struct cachefiles_object *object, cachefiles_set_object_xattr() argument
106 struct dentry *dentry = object->dentry; cachefiles_set_object_xattr()
111 _enter("%p,#%d", object, auxdata->len); cachefiles_set_object_xattr()
121 object, cachefiles_set_object_xattr()
131 int cachefiles_update_object_xattr(struct cachefiles_object *object, cachefiles_update_object_xattr() argument
134 struct dentry *dentry = object->dentry; cachefiles_update_object_xattr()
139 _enter("%p,#%d", object, auxdata->len); cachefiles_update_object_xattr()
149 object, cachefiles_update_object_xattr()
159 int cachefiles_check_auxdata(struct cachefiles_object *object) cachefiles_check_auxdata() argument
163 struct dentry *dentry = object->dentry; cachefiles_check_auxdata()
169 ASSERT(object->fscache.cookie->def->check_aux); cachefiles_check_auxdata()
179 auxbuf->type != object->fscache.cookie->def->type) cachefiles_check_auxdata()
183 validity = fscache_check_aux(&object->fscache, &auxbuf->data, xlen); cachefiles_check_auxdata()
195 * - return -ESTALE if the object should be deleted
197 int cachefiles_check_object_xattr(struct cachefiles_object *object, cachefiles_check_object_xattr() argument
201 struct dentry *dentry = object->dentry; cachefiles_check_object_xattr()
204 _enter("%p,#%d", object, auxdata->len); cachefiles_check_object_xattr()
226 cachefiles_io_error_obj(object, cachefiles_check_object_xattr()
232 /* check the on-disk object */ cachefiles_check_object_xattr()
242 if (object->fscache.cookie->def->check_aux) { cachefiles_check_object_xattr()
249 object->fscache.cookie->def->name, dlen); cachefiles_check_object_xattr()
251 result = fscache_check_aux(&object->fscache, cachefiles_check_object_xattr()
276 cachefiles_io_error_obj(object, cachefiles_check_object_xattr()
293 pr_err("Cache object %lu xattr length incorrect\n", cachefiles_check_object_xattr()
304 * remove the object's xattr to mark it stale
H A Dnamei.c28 * dump debugging info about an object
31 void __cachefiles_printk_object(struct cachefiles_object *object, __cachefiles_printk_object() argument
38 pr_err("%sobject: OBJ%x\n", prefix, object->fscache.debug_id); __cachefiles_printk_object()
40 prefix, object->fscache.state->name, __cachefiles_printk_object()
41 object->fscache.flags, work_busy(&object->fscache.work), __cachefiles_printk_object()
42 object->fscache.events, object->fscache.event_mask); __cachefiles_printk_object()
44 prefix, object->fscache.n_ops, object->fscache.n_in_progress, __cachefiles_printk_object()
45 object->fscache.n_exclusive); __cachefiles_printk_object()
47 prefix, object->fscache.parent); __cachefiles_printk_object()
49 spin_lock(&object->fscache.lock); __cachefiles_printk_object()
50 cookie = object->fscache.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()
67 spin_unlock(&object->fscache.lock); __cachefiles_printk_object()
80 static noinline void cachefiles_printk_object(struct cachefiles_object *object, cachefiles_printk_object() argument
86 if (object) cachefiles_printk_object()
87 __cachefiles_printk_object(object, "", keybuf); cachefiles_printk_object()
103 struct cachefiles_object *object; cachefiles_mark_object_buried() local
112 object = rb_entry(p, struct cachefiles_object, active_node); cachefiles_mark_object_buried()
113 if (object->dentry > dentry) cachefiles_mark_object_buried()
115 else if (object->dentry < dentry) cachefiles_mark_object_buried()
128 object->fscache.debug_id, cachefiles_mark_object_buried()
129 object->fscache.state->name, cachefiles_mark_object_buried()
132 if (fscache_object_is_live(&object->fscache)) { cachefiles_mark_object_buried()
134 pr_err("Error: Can't preemptively bury live object\n"); cachefiles_mark_object_buried()
135 cachefiles_printk_object(object, NULL); cachefiles_mark_object_buried()
138 fscache_object_mark_killed(&object->fscache, why); cachefiles_mark_object_buried()
146 * record the fact that an object is now active
149 struct cachefiles_object *object) cachefiles_mark_object_active()
155 _enter(",%p", object); cachefiles_mark_object_active()
160 if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { cachefiles_mark_object_active()
162 cachefiles_printk_object(object, NULL); cachefiles_mark_object_active()
166 dentry = object->dentry; cachefiles_mark_object_active()
173 ASSERT(xobject != object); cachefiles_mark_object_active()
183 rb_link_node(&object->active_node, _parent, _p); cachefiles_mark_object_active()
184 rb_insert_color(&object->active_node, &cache->active_nodes); cachefiles_mark_object_active()
190 /* an old object from a previous incarnation is hogging the slot - we cachefiles_mark_object_active()
195 pr_err("Error: Unexpected object collision\n"); cachefiles_mark_object_active()
196 cachefiles_printk_object(object, xobject); cachefiles_mark_object_active()
209 /* if the object we're waiting for is queued for processing, cachefiles_mark_object_active()
213 object->fscache.debug_id, cachefiles_mark_object_active()
218 /* otherwise we sleep until either the object we're waiting for cachefiles_mark_object_active()
235 object->fscache.debug_id, cachefiles_mark_object_active()
242 pr_err("Error: Overlong wait for old active object to go away\n"); cachefiles_mark_object_active()
243 cachefiles_printk_object(object, xobject); cachefiles_mark_object_active()
254 clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); cachefiles_mark_object_active()
261 * delete an object representation from the cache
284 _debug("unlink stale object"); cachefiles_bury_object()
308 _debug("move stale object to graveyard"); cachefiles_bury_object()
410 * delete an object representation from the cache
413 struct cachefiles_object *object) cachefiles_delete_object()
418 _enter(",OBJ%x{%p}", object->fscache.debug_id, object->dentry); cachefiles_delete_object()
420 ASSERT(object->dentry); cachefiles_delete_object()
421 ASSERT(d_backing_inode(object->dentry)); cachefiles_delete_object()
422 ASSERT(object->dentry->d_parent); cachefiles_delete_object()
424 dir = dget_parent(object->dentry); cachefiles_delete_object()
428 if (test_bit(FSCACHE_OBJECT_KILLED_BY_CACHE, &object->fscache.flags)) { cachefiles_delete_object()
429 /* object allocation for the same key preemptively deleted this cachefiles_delete_object()
430 * object's file so that it could create its own file */ cachefiles_delete_object()
431 _debug("object preemptively buried"); cachefiles_delete_object()
437 if (dir == object->dentry->d_parent) { cachefiles_delete_object()
439 object->dentry, false, cachefiles_delete_object()
456 * walk from the parent object to the child object through the backing
460 struct cachefiles_object *object, cachefiles_walk_to_object()
473 object->fscache.debug_id, key); cachefiles_walk_to_object()
515 object->new = !d_backing_inode(next); cachefiles_walk_to_object()
521 fscache_object_lookup_negative(&object->fscache); cachefiles_walk_to_object()
523 /* we need to create the object if it's negative */ cachefiles_walk_to_object()
524 if (key || object->type == FSCACHE_COOKIE_TYPE_INDEX) { cachefiles_walk_to_object()
595 /* we've found the object we were looking for */ cachefiles_walk_to_object()
596 object->dentry = next; cachefiles_walk_to_object()
598 /* if we've found that the terminal object exists, then we need to cachefiles_walk_to_object()
600 if (!object->new) { cachefiles_walk_to_object()
603 ret = cachefiles_check_object_xattr(object, auxdata); cachefiles_walk_to_object()
605 /* delete the object (the deleter drops the directory cachefiles_walk_to_object()
607 object->dentry = NULL; cachefiles_walk_to_object()
618 fscache_object_retrying_stale(&object->fscache); cachefiles_walk_to_object()
623 /* note that we're now using this object */ cachefiles_walk_to_object()
624 ret = cachefiles_mark_object_active(cache, object); cachefiles_walk_to_object()
635 if (object->new) { cachefiles_walk_to_object()
636 /* attach data to a newly constructed terminal object */ cachefiles_walk_to_object()
637 ret = cachefiles_set_object_xattr(object, auxdata); cachefiles_walk_to_object()
641 /* always update the atime on an object we've just looked up cachefiles_walk_to_object()
650 if (object->type != FSCACHE_COOKIE_TYPE_INDEX) { cachefiles_walk_to_object()
651 if (d_is_reg(object->dentry)) { cachefiles_walk_to_object()
655 aops = d_backing_inode(object->dentry)->i_mapping->a_ops; cachefiles_walk_to_object()
658 if (object->dentry->d_sb->s_blocksize > PAGE_SIZE) cachefiles_walk_to_object()
661 object->backer = object->dentry; cachefiles_walk_to_object()
667 object->new = 0; cachefiles_walk_to_object()
668 fscache_obtained_object(&object->fscache); cachefiles_walk_to_object()
670 _leave(" = 0 [%lu]", d_backing_inode(object->dentry)->i_ino); cachefiles_walk_to_object()
674 fscache_object_mark_killed(&object->fscache, FSCACHE_OBJECT_NO_SPACE); cachefiles_walk_to_object()
688 rb_erase(&object->active_node, &cache->active_nodes); cachefiles_walk_to_object()
689 clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); cachefiles_walk_to_object()
690 wake_up_bit(&object->flags, CACHEFILES_OBJECT_ACTIVE); cachefiles_walk_to_object()
693 dput(object->dentry); cachefiles_walk_to_object()
694 object->dentry = NULL; cachefiles_walk_to_object()
821 * find out if an object is in use or not
822 * - if finds object and it's not in use:
823 * - returns a pointer to the object and a reference on it
830 struct cachefiles_object *object; cachefiles_check_active() local
851 /* if the object is no longer there then we probably retired the object cachefiles_check_active()
861 /* check to see if we're using this object */ cachefiles_check_active()
867 object = rb_entry(_n, struct cachefiles_object, active_node); cachefiles_check_active()
869 if (object->dentry > victim) cachefiles_check_active()
871 else if (object->dentry < victim) cachefiles_check_active()
910 * cull an object if it's not in use
969 * find out if an object is in use or not
971 * - returns -EBUSY or 0 to indicate whether an object is in use or not
148 cachefiles_mark_object_active(struct cachefiles_cache *cache, struct cachefiles_object *object) cachefiles_mark_object_active() argument
412 cachefiles_delete_object(struct cachefiles_cache *cache, struct cachefiles_object *object) cachefiles_delete_object() argument
459 cachefiles_walk_to_object(struct cachefiles_object *parent, struct cachefiles_object *object, const char *key, struct cachefiles_xattr *auxdata) cachefiles_walk_to_object() argument
H A Dmain.c45 struct cachefiles_object *object = _object; cachefiles_object_init_once() local
47 memset(object, 0, sizeof(*object)); cachefiles_object_init_once()
48 spin_lock_init(&object->work_lock); cachefiles_object_init_once()
62 /* create an object jar */ cachefiles_init()
71 pr_notice("Failed to allocate an object jar\n"); cachefiles_init()
H A Drdwr.c1 /* Storage object read/write
29 struct cachefiles_object *object; cachefiles_read_waiter() local
56 object = container_of(monitor->op->op.object, cachefiles_read_waiter()
59 spin_lock(&object->work_lock); cachefiles_read_waiter()
61 spin_unlock(&object->work_lock); cachefiles_read_waiter()
74 static int cachefiles_read_reissue(struct cachefiles_object *object, cachefiles_read_reissue() argument
77 struct address_space *bmapping = d_backing_inode(object->backer)->i_mapping; cachefiles_read_reissue()
82 d_backing_inode(object->backer)->i_ino, cachefiles_read_reissue()
138 spin_lock_irq(&object->work_lock); cachefiles_read_reissue()
140 spin_unlock_irq(&object->work_lock); cachefiles_read_reissue()
152 struct cachefiles_object *object; cachefiles_read_copier() local
157 object = container_of(op->op.object, cachefiles_read_copier()
160 _enter("{ino=%lu}", d_backing_inode(object->backer)->i_ino); cachefiles_read_copier()
163 spin_lock_irq(&object->work_lock); cachefiles_read_copier()
170 spin_unlock_irq(&object->work_lock); cachefiles_read_copier()
176 &object->fscache.cookie->flags)) { cachefiles_read_copier()
185 error = cachefiles_read_reissue(object, monitor); cachefiles_read_copier()
191 object, cachefiles_read_copier()
215 spin_lock_irq(&object->work_lock); cachefiles_read_copier()
218 spin_unlock_irq(&object->work_lock); cachefiles_read_copier()
226 static int cachefiles_read_backing_file_one(struct cachefiles_object *object, cachefiles_read_backing_file_one() argument
250 bmapping = d_backing_inode(object->backer)->i_mapping; cachefiles_read_backing_file_one()
360 cachefiles_io_error_obj(object, "Page read error on backing file"); cachefiles_read_backing_file_one()
394 struct cachefiles_object *object; cachefiles_read_or_alloc_page() local
401 object = container_of(op->op.object, cachefiles_read_or_alloc_page()
403 cache = container_of(object->fscache.cache, cachefiles_read_or_alloc_page()
406 _enter("{%p},{%lx},,,", object, page->index); cachefiles_read_or_alloc_page()
408 if (!object->backer) cachefiles_read_or_alloc_page()
411 inode = d_backing_inode(object->backer); cachefiles_read_or_alloc_page()
440 ret = cachefiles_read_backing_file_one(object, op, page); cachefiles_read_or_alloc_page()
463 static int cachefiles_read_backing_file(struct cachefiles_object *object, cachefiles_read_backing_file() argument
468 struct address_space *bmapping = d_backing_inode(object->backer)->i_mapping; cachefiles_read_backing_file()
664 cachefiles_io_error_obj(object, "Page read error on backing file");
680 struct cachefiles_object *object; cachefiles_read_or_alloc_pages() local
689 object = container_of(op->op.object, cachefiles_read_or_alloc_pages()
691 cache = container_of(object->fscache.cache, cachefiles_read_or_alloc_pages()
695 object->fscache.debug_id, atomic_read(&op->op.usage), cachefiles_read_or_alloc_pages()
698 if (!object->backer) cachefiles_read_or_alloc_pages()
705 inode = d_backing_inode(object->backer); cachefiles_read_or_alloc_pages()
765 ret2 = cachefiles_read_backing_file(object, op, &backpages);
794 struct cachefiles_object *object; cachefiles_allocate_page() local
798 object = container_of(op->op.object, cachefiles_allocate_page()
800 cache = container_of(object->fscache.cache, cachefiles_allocate_page()
803 _enter("%p,{%lx},", object, page->index); cachefiles_allocate_page()
832 struct cachefiles_object *object; cachefiles_allocate_pages() local
838 object = container_of(op->op.object, cachefiles_allocate_pages()
840 cache = container_of(object->fscache.cache, cachefiles_allocate_pages()
843 _enter("%p,,,%d,", object, *nr_pages); cachefiles_allocate_pages()
875 struct cachefiles_object *object; cachefiles_write_page() local
887 object = container_of(op->op.object, cachefiles_write_page()
890 _enter("%p,%p{%lx},,,", object, page, page->index); cachefiles_write_page()
892 if (!object->backer) { cachefiles_write_page()
897 ASSERT(d_is_reg(object->backer)); cachefiles_write_page()
899 cache = container_of(object->fscache.cache, cachefiles_write_page()
907 eof = object->fscache.store_limit_l; cachefiles_write_page()
914 path.dentry = object->backer; cachefiles_write_page()
945 cachefiles_io_error_obj(object, cachefiles_write_page()
958 struct cachefiles_object *object; cachefiles_uncache_page() local
961 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_uncache_page()
962 cache = container_of(object->fscache.cache, cachefiles_uncache_page()
965 _enter("%p,{%lu}", object, page->index); cachefiles_uncache_page()
967 spin_unlock(&object->fscache.cookie->lock); cachefiles_uncache_page()
H A Dinternal.h41 struct dentry *dentry; /* the file/dir representing this object */
43 loff_t i_size; /* object size */
46 atomic_t usage; /* object usage count */
47 uint8_t type; /* object type */
48 uint8_t new; /* T if object new */
109 struct cachefiles_object *object; member in struct:cachefiles_one_write
110 struct list_head obj_link; /* link in object's lists */
161 struct cachefiles_object *object);
163 struct cachefiles_object *object,
239 extern int cachefiles_check_object_type(struct cachefiles_object *object);
240 extern int cachefiles_set_object_xattr(struct cachefiles_object *object,
242 extern int cachefiles_update_object_xattr(struct cachefiles_object *object,
244 extern int cachefiles_check_auxdata(struct cachefiles_object *object);
245 extern int cachefiles_check_object_xattr(struct cachefiles_object *object,
262 #define cachefiles_io_error_obj(object, FMT, ...) \
266 ___cache = container_of((object)->fscache.cache, \
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/device/
H A Dctrl.h3 #define nvkm_control(p) container_of((p), struct nvkm_control, object)
7 struct nvkm_object object; member in struct:nvkm_control
H A Duser.c24 #define nvkm_udevice(p) container_of((p), struct nvkm_udevice, object)
37 struct nvkm_object object; member in struct:nvkm_udevice
44 struct nvkm_object *object = &udev->object; nvkm_udevice_info() local
53 nvif_ioctl(object, "device info size %d\n", size); nvkm_udevice_info()
55 nvif_ioctl(object, "device info vers %d\n", args->v0.version); nvkm_udevice_info()
140 nvkm_udevice_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_udevice_mthd() argument
142 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_mthd()
155 nvkm_udevice_rd08(struct nvkm_object *object, u64 addr, u8 *data) nvkm_udevice_rd08() argument
157 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_rd08()
163 nvkm_udevice_rd16(struct nvkm_object *object, u64 addr, u16 *data) nvkm_udevice_rd16() argument
165 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_rd16()
171 nvkm_udevice_rd32(struct nvkm_object *object, u64 addr, u32 *data) nvkm_udevice_rd32() argument
173 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_rd32()
179 nvkm_udevice_wr08(struct nvkm_object *object, u64 addr, u8 data) nvkm_udevice_wr08() argument
181 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_wr08()
187 nvkm_udevice_wr16(struct nvkm_object *object, u64 addr, u16 data) nvkm_udevice_wr16() argument
189 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_wr16()
195 nvkm_udevice_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_udevice_wr32() argument
197 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_wr32()
203 nvkm_udevice_map(struct nvkm_object *object, u64 *addr, u32 *size) nvkm_udevice_map() argument
205 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_map()
213 nvkm_udevice_fini(struct nvkm_object *object, bool suspend) nvkm_udevice_fini() argument
215 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_fini()
234 nvkm_udevice_init(struct nvkm_object *object) nvkm_udevice_init() argument
236 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_init()
264 nvkm_udevice_child_get(struct nvkm_object *object, int index, nvkm_udevice_child_get() argument
267 struct nvkm_udevice *udev = nvkm_udevice(object); nvkm_udevice_child_get()
331 struct nvkm_object *parent = &client->object; nvkm_udevice_new()
351 nvkm_object_ctor(func, oclass, &udev->object); nvkm_udevice_new()
352 *pobject = &udev->object; nvkm_udevice_new()
H A Dctrl.c42 nvif_ioctl(&ctrl->object, "control pstate info size %d\n", size); nvkm_control_mthd_pstate_info()
44 nvif_ioctl(&ctrl->object, "control pstate info vers %d\n", nvkm_control_mthd_pstate_info()
80 nvif_ioctl(&ctrl->object, "control pstate attr size %d\n", size); nvkm_control_mthd_pstate_attr()
82 nvif_ioctl(&ctrl->object, nvkm_control_mthd_pstate_attr()
148 nvif_ioctl(&ctrl->object, "control pstate user size %d\n", size); nvkm_control_mthd_pstate_user()
150 nvif_ioctl(&ctrl->object, nvkm_control_mthd_pstate_user()
169 nvkm_control_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_control_mthd() argument
171 struct nvkm_control *ctrl = nvkm_control(object); nvkm_control_mthd()
198 *pobject = &ctrl->object; nvkm_control_new()
201 nvkm_object_ctor(&nvkm_control, oclass, &ctrl->object); nvkm_control_new()
/linux-4.4.14/arch/arm/boot/bootp/
H A Dinitrd.S1 .type initrd_start,#object
/linux-4.4.14/sound/pci/asihpi/
H A Dhpimsginit.c27 /* The actual message size for each object type */
29 /* The actual response size for each object type */
37 static void hpi_init_message(struct hpi_message *phm, u16 object, hpi_init_message() argument
42 if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) hpi_init_message()
43 size = msg_size[object]; hpi_init_message()
54 phm->object = object; hpi_init_message()
64 void hpi_init_response(struct hpi_response *phr, u16 object, u16 function, hpi_init_response() argument
69 if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) hpi_init_response()
70 size = res_size[object]; hpi_init_response()
77 phr->object = object; hpi_init_response()
85 struct hpi_response *phr, u16 object, u16 function) hpi_init_message_response()
87 hpi_init_message(phm, object, function); hpi_init_message_response()
90 hpi_init_response(phr, object, function, hpi_init_message_response()
95 u16 object, u16 function) hpi_init_messageV1()
98 if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) { hpi_init_messageV1()
101 phm->object = object; hpi_init_messageV1()
109 u16 object, u16 function) hpi_init_responseV1()
111 (void)object; hpi_init_responseV1()
121 struct hpi_response_header *phr, u16 res_size, u16 object, hpi_init_message_responseV1()
124 hpi_init_messageV1(phm, msg_size, object, function); hpi_init_message_responseV1()
125 hpi_init_responseV1(phr, res_size, object, function); hpi_init_message_responseV1()
84 hpi_init_message_response(struct hpi_message *phm, struct hpi_response *phr, u16 object, u16 function) hpi_init_message_response() argument
94 hpi_init_messageV1(struct hpi_message_header *phm, u16 size, u16 object, u16 function) hpi_init_messageV1() argument
108 hpi_init_responseV1(struct hpi_response_header *phr, u16 size, u16 object, u16 function) hpi_init_responseV1() argument
120 hpi_init_message_responseV1(struct hpi_message_header *phm, u16 msg_size, struct hpi_response_header *phr, u16 res_size, u16 object, u16 function) hpi_init_message_responseV1() argument
H A Dhpimsginit.h33 void hpi_init_response(struct hpi_response *phr, u16 object, u16 function,
37 struct hpi_response *phr, u16 object, u16 function);
40 u16 object, u16 function);
43 struct hpi_response_header *phr, u16 res_size, u16 object,
/linux-4.4.14/drivers/acpi/acpica/
H A Dutdelete.c3 * Module Name: utdelete - object deletion and reference count utilities
54 static void acpi_ut_delete_internal_obj(union acpi_operand_object *object);
57 acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action);
63 * PARAMETERS: object - Object to be deleted
67 * DESCRIPTION: Low level object deletion, after reference counts have been
72 static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) acpi_ut_delete_internal_obj() argument
81 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object); acpi_ut_delete_internal_obj()
83 if (!object) { acpi_ut_delete_internal_obj()
88 * Must delete or free any pointers within the object that are not acpi_ut_delete_internal_obj()
91 switch (object->common.type) { acpi_ut_delete_internal_obj()
95 "**** String %p, ptr %p\n", object, acpi_ut_delete_internal_obj()
96 object->string.pointer)); acpi_ut_delete_internal_obj()
100 if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) { acpi_ut_delete_internal_obj()
104 obj_pointer = object->string.pointer; acpi_ut_delete_internal_obj()
111 "**** Buffer %p, ptr %p\n", object, acpi_ut_delete_internal_obj()
112 object->buffer.pointer)); acpi_ut_delete_internal_obj()
116 if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) { acpi_ut_delete_internal_obj()
120 obj_pointer = object->buffer.pointer; acpi_ut_delete_internal_obj()
128 object->package.count)); acpi_ut_delete_internal_obj()
137 obj_pointer = object->package.elements; acpi_ut_delete_internal_obj()
142 * Device object also may have a GPE block. acpi_ut_delete_internal_obj()
146 if (object->device.gpe_block) { acpi_ut_delete_internal_obj()
147 (void)acpi_ev_delete_gpe_block(object->device. acpi_ut_delete_internal_obj()
156 /* Walk the address handler list for this object */ acpi_ut_delete_internal_obj()
158 handler_desc = object->common_notify.handler; acpi_ut_delete_internal_obj()
170 object, object->mutex.os_mutex)); acpi_ut_delete_internal_obj()
172 if (object == acpi_gbl_global_lock_mutex) { acpi_ut_delete_internal_obj()
181 acpi_os_delete_mutex(object->mutex.os_mutex); acpi_ut_delete_internal_obj()
184 acpi_ex_unlink_mutex(object); acpi_ut_delete_internal_obj()
185 acpi_os_delete_mutex(object->mutex.os_mutex); acpi_ut_delete_internal_obj()
193 object, object->event.os_semaphore)); acpi_ut_delete_internal_obj()
195 (void)acpi_os_delete_semaphore(object->event.os_semaphore); acpi_ut_delete_internal_obj()
196 object->event.os_semaphore = NULL; acpi_ut_delete_internal_obj()
202 "***** Method %p\n", object)); acpi_ut_delete_internal_obj()
206 if (object->method.mutex) { acpi_ut_delete_internal_obj()
207 acpi_os_delete_mutex(object->method.mutex->mutex. acpi_ut_delete_internal_obj()
209 acpi_ut_delete_object_desc(object->method.mutex); acpi_ut_delete_internal_obj()
210 object->method.mutex = NULL; acpi_ut_delete_internal_obj()
212 if (object->method.node) { acpi_ut_delete_internal_obj()
213 object->method.node = NULL; acpi_ut_delete_internal_obj()
220 "***** Region %p\n", object)); acpi_ut_delete_internal_obj()
226 if (!(object->region.node->flags & ANOBJ_TEMPORARY)) { acpi_ut_delete_internal_obj()
227 acpi_ut_remove_address_range(object->region.space_id, acpi_ut_delete_internal_obj()
228 object->region.node); acpi_ut_delete_internal_obj()
231 second_desc = acpi_ns_get_secondary_object(object); acpi_ut_delete_internal_obj()
235 * default handlers -- and therefore, we created the context object acpi_ut_delete_internal_obj()
238 handler_desc = object->region.handler; acpi_ut_delete_internal_obj()
246 /* Remove the region object from the handler list */ acpi_ut_delete_internal_obj()
249 if (next_desc == object) { acpi_ut_delete_internal_obj()
264 "Circular region list in address handler object %p", acpi_ut_delete_internal_obj()
277 address_space.setup(object, acpi_ut_delete_internal_obj()
291 /* Now we can free the Extra object */ acpi_ut_delete_internal_obj()
300 "***** Buffer Field %p\n", object)); acpi_ut_delete_internal_obj()
302 second_desc = acpi_ns_get_secondary_object(object); acpi_ut_delete_internal_obj()
311 "***** Bank Field %p\n", object)); acpi_ut_delete_internal_obj()
313 second_desc = acpi_ns_get_secondary_object(object); acpi_ut_delete_internal_obj()
324 /* Free any allocated memory (pointer within the object) found above */ acpi_ut_delete_internal_obj()
332 /* Now the object can be safely deleted */ acpi_ut_delete_internal_obj()
335 object, acpi_ut_get_object_type_name(object))); acpi_ut_delete_internal_obj()
337 acpi_ut_delete_object_desc(object); acpi_ut_delete_internal_obj()
349 * DESCRIPTION: This function deletes an internal object list, including both
366 /* Free the combined parameter pointer list and object array */ acpi_ut_delete_internal_object_list()
376 * PARAMETERS: object - Object whose ref count is to be updated
379 * RETURN: None. Sets new reference count within the object
381 * DESCRIPTION: Modify the reference count for an internal acpi object
386 acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) acpi_ut_update_ref_count() argument
394 if (!object) { acpi_ut_update_ref_count()
403 original_count = object->common.reference_count; acpi_ut_update_ref_count()
411 object->common.reference_count = new_count; acpi_ut_update_ref_count()
419 object)); acpi_ut_update_ref_count()
424 object, object->common.type, new_count)); acpi_ut_update_ref_count()
433 object->common.reference_count = new_count; acpi_ut_update_ref_count()
441 object)); acpi_ut_update_ref_count()
446 object, object->common.type, new_count)); acpi_ut_update_ref_count()
448 /* Actually delete the object on a reference count of zero */ acpi_ut_update_ref_count()
451 acpi_ut_delete_internal_obj(object); acpi_ut_update_ref_count()
465 * (A deleted object will have a huge reference count) acpi_ut_update_ref_count()
469 "Large Reference Count (0x%X) in object %p, Type=0x%.2X", acpi_ut_update_ref_count()
470 new_count, object, object->common.type)); acpi_ut_update_ref_count()
478 * PARAMETERS: object - Increment ref count for this object
484 * DESCRIPTION: Increment the object reference count
487 * 1) An object is attached to a Node (namespace object)
488 * 2) An object is copied (all subobjects must be incremented)
491 * 1) An object is detached from an Node
496 acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) acpi_ut_update_object_reference() argument
507 while (object) { acpi_ut_update_object_reference()
511 if (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) { acpi_ut_update_object_reference()
513 "Object %p is NS handle\n", object)); acpi_ut_update_object_reference()
519 * Different object types have different subobjects. acpi_ut_update_object_reference()
521 switch (object->common.type) { acpi_ut_update_object_reference()
532 object->common_notify.notify_list[i]; acpi_ut_update_object_reference()
548 for (i = 0; i < object->package.count; i++) { acpi_ut_update_object_reference()
553 next_object = object->package.elements[i]; acpi_ut_update_object_reference()
590 next_object = object->buffer_field.buffer_obj; acpi_ut_update_object_reference()
595 next_object = object->field.region_obj; acpi_ut_update_object_reference()
600 next_object = object->bank_field.bank_obj; acpi_ut_update_object_reference()
602 acpi_ut_create_update_state_and_push(object-> acpi_ut_update_object_reference()
614 next_object = object->index_field.index_obj; acpi_ut_update_object_reference()
616 acpi_ut_create_update_state_and_push(object-> acpi_ut_update_object_reference()
630 * target object. acpi_ut_update_object_reference()
632 if ((object->reference.class == ACPI_REFCLASS_INDEX) || acpi_ut_update_object_reference()
633 (object->reference.class == ACPI_REFCLASS_NAME)) { acpi_ut_update_object_reference()
634 next_object = object->reference.object; acpi_ut_update_object_reference()
645 * Now we can update the count in the main object. This can only acpi_ut_update_object_reference()
647 * main object to be deleted. acpi_ut_update_object_reference()
649 acpi_ut_update_ref_count(object, action); acpi_ut_update_object_reference()
650 object = NULL; acpi_ut_update_object_reference()
652 /* Move on to the next object to be updated */ acpi_ut_update_object_reference()
655 object = next_object; acpi_ut_update_object_reference()
659 object = state->update.object; acpi_ut_update_object_reference()
669 "Could not update object reference count")); acpi_ut_update_object_reference()
685 * PARAMETERS: object - Object whose reference count is to be
690 * DESCRIPTION: Add one reference to an ACPI object
694 void acpi_ut_add_reference(union acpi_operand_object *object) acpi_ut_add_reference() argument
699 /* Ensure that we have a valid object */ acpi_ut_add_reference()
701 if (!acpi_ut_valid_internal_object(object)) { acpi_ut_add_reference()
707 object, object->common.reference_count)); acpi_ut_add_reference()
711 (void)acpi_ut_update_object_reference(object, REF_INCREMENT); acpi_ut_add_reference()
719 * PARAMETERS: object - Object whose ref count will be decremented
723 * DESCRIPTION: Decrement the reference count of an ACPI internal object
727 void acpi_ut_remove_reference(union acpi_operand_object *object) acpi_ut_remove_reference() argument
736 if (!object || acpi_ut_remove_reference()
737 (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED)) { acpi_ut_remove_reference()
741 /* Ensure that we have a valid object */ acpi_ut_remove_reference()
743 if (!acpi_ut_valid_internal_object(object)) { acpi_ut_remove_reference()
749 object, object->common.reference_count)); acpi_ut_remove_reference()
752 * Decrement the reference count, and only actually delete the object acpi_ut_remove_reference()
756 (void)acpi_ut_update_object_reference(object, REF_DECREMENT); acpi_ut_remove_reference()
H A Dnsobject.c57 * object - Object to be attached
58 * type - Type of object, or ACPI_TYPE_ANY if not
63 * DESCRIPTION: Record the given object as the value associated with the
74 union acpi_operand_object *object, acpi_object_type type) acpi_ns_attach_object()
93 if (!object && (ACPI_TYPE_ANY != type)) { acpi_ns_attach_object()
95 /* Null object */ acpi_ns_attach_object()
98 "Null object, but type not ACPI_TYPE_ANY")); acpi_ns_attach_object()
111 /* Check if this object is already attached */ acpi_ns_attach_object()
113 if (node->object == object) { acpi_ns_attach_object()
116 object, node)); acpi_ns_attach_object()
121 /* If null object, we will just install it */ acpi_ns_attach_object()
123 if (!object) { acpi_ns_attach_object()
129 * If the source object is a namespace Node with an attached object, acpi_ns_attach_object()
130 * we will use that (attached) object acpi_ns_attach_object()
132 else if ((ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) && acpi_ns_attach_object()
133 ((struct acpi_namespace_node *)object)->object) { acpi_ns_attach_object()
138 obj_desc = ((struct acpi_namespace_node *)object)->object; acpi_ns_attach_object()
139 object_type = ((struct acpi_namespace_node *)object)->type; acpi_ns_attach_object()
143 * Otherwise, we will use the parameter object, but we must type acpi_ns_attach_object()
147 obj_desc = (union acpi_operand_object *)object; acpi_ns_attach_object()
157 /* Detach an existing attached object if present */ acpi_ns_attach_object()
159 if (node->object) { acpi_ns_attach_object()
166 * (if it is an internal object) acpi_ns_attach_object()
179 /* Install the object at the front of the object list */ acpi_ns_attach_object()
181 last_obj_desc->common.next_object = node->object; acpi_ns_attach_object()
185 node->object = obj_desc; acpi_ns_attach_object()
194 * PARAMETERS: node - A Namespace node whose object will be detached
198 * DESCRIPTION: Detach/delete an object associated with a namespace node.
199 * if the object is an allocated object, it is freed.
210 obj_desc = node->object; acpi_ns_detach_object()
227 node->object = NULL; acpi_ns_detach_object()
230 /* Unlink object from front of possible object list */ acpi_ns_detach_object()
232 node->object = obj_desc->common.next_object; acpi_ns_detach_object()
234 /* Handle possible 2-descriptor object */ acpi_ns_detach_object()
236 if (node->object && acpi_ns_detach_object()
237 (node->object->common.type != ACPI_TYPE_LOCAL_DATA)) { acpi_ns_detach_object()
238 node->object = node->object->common.next_object; acpi_ns_detach_object()
242 * Detach the object from any data objects (which are still held by acpi_ns_detach_object()
259 /* Remove one reference on the object (and all subobjects) */ acpi_ns_detach_object()
271 * RETURN: Current value of the object field from the Node whose
274 * DESCRIPTION: Obtain the object attached to a namespace node.
289 if (!node->object || acpi_ns_get_attached_object()
290 ((ACPI_GET_DESCRIPTOR_TYPE(node->object) != ACPI_DESC_TYPE_OPERAND) acpi_ns_get_attached_object()
291 && (ACPI_GET_DESCRIPTOR_TYPE(node->object) != acpi_ns_get_attached_object()
293 || ((node->object)->common.type == ACPI_TYPE_LOCAL_DATA)) { acpi_ns_get_attached_object()
297 return_PTR(node->object); acpi_ns_get_attached_object()
306 * RETURN: Current value of the object field from the Node whose
309 * DESCRIPTION: Obtain a secondary object associated with a namespace node.
340 * DESCRIPTION: Low-level attach data. Create and attach a Data object.
355 obj_desc = node->object; acpi_ns_attach_data()
366 /* Create an internal object for the data */ acpi_ns_attach_data()
376 /* Install the data object */ acpi_ns_attach_data()
381 node->object = data_desc; acpi_ns_attach_data()
409 obj_desc = node->object; acpi_ns_detach_data()
417 node->object = obj_desc->common.next_object; acpi_ns_detach_data()
452 obj_desc = node->object; acpi_ns_get_attached_data()
73 acpi_ns_attach_object(struct acpi_namespace_node *node, union acpi_operand_object *object, acpi_object_type type) acpi_ns_attach_object() argument
H A Dutobject.c3 * Module Name: utobject - ACPI object create/delete/size/cache routines
72 * type - ACPI Type of the new object
74 * RETURN: A new internal object, null on failure
76 * DESCRIPTION: Create and initialize a new internal object.
78 * NOTE: We always allocate the worst-case object descriptor because
81 * the most memory efficient, but the efficiency of the object
93 union acpi_operand_object *object; acpi_ut_create_internal_object_dbg() local
99 /* Allocate the raw object descriptor */ acpi_ut_create_internal_object_dbg()
101 object = acpi_ut_create_internal_object_dbg()
104 if (!object) { acpi_ut_create_internal_object_dbg()
113 /* These types require a secondary object */ acpi_ut_create_internal_object_dbg()
119 acpi_ut_delete_object_desc(object); acpi_ut_create_internal_object_dbg()
126 /* Link the second object to the first */ acpi_ut_create_internal_object_dbg()
128 object->common.next_object = second_object; acpi_ut_create_internal_object_dbg()
133 /* All others have no secondary object */ acpi_ut_create_internal_object_dbg()
137 /* Save the object type in the object descriptor */ acpi_ut_create_internal_object_dbg()
139 object->common.type = (u8) type; acpi_ut_create_internal_object_dbg()
143 object->common.reference_count = 1; acpi_ut_create_internal_object_dbg()
147 return_PTR(object); acpi_ut_create_internal_object_dbg()
156 * RETURN: Pointer to a new Package object, null on failure
158 * DESCRIPTION: Create a fully initialized package object
169 /* Create a new Package object */ acpi_ut_create_package_object()
198 * RETURN: Pointer to a new Integer object, null on failure
200 * DESCRIPTION: Create an initialized integer object
210 /* Create and initialize a new integer object */ acpi_ut_create_integer_object()
227 * RETURN: Pointer to a new Buffer object, null on failure
229 * DESCRIPTION: Create a fully initialized buffer object
240 /* Create a new Buffer object */ acpi_ut_create_buffer_object()
262 /* Complete buffer object initialization */ acpi_ut_create_buffer_object()
281 * RETURN: Pointer to a new String object
283 * DESCRIPTION: Create a fully initialized string object
294 /* Create a new String object */ acpi_ut_create_string_object()
313 /* Complete string object initialization */ acpi_ut_create_string_object()
327 * PARAMETERS: object - Object to be validated
329 * RETURN: TRUE if object is valid, FALSE otherwise
335 u8 acpi_ut_valid_internal_object(void *object) acpi_ut_valid_internal_object() argument
342 if (!object) { acpi_ut_valid_internal_object()
349 switch (ACPI_GET_DESCRIPTOR_TYPE(object)) { acpi_ut_valid_internal_object()
352 /* The object appears to be a valid union acpi_operand_object */ acpi_ut_valid_internal_object()
360 object, acpi_ut_get_descriptor_name(object))); acpi_ut_valid_internal_object()
375 * RETURN: Pointer to newly allocated object descriptor. Null on error
377 * DESCRIPTION: Allocate a new object descriptor. Gracefully handle
385 union acpi_operand_object *object; acpi_ut_allocate_object_desc_dbg() local
389 object = acpi_os_acquire_object(acpi_gbl_operand_cache); acpi_ut_allocate_object_desc_dbg()
390 if (!object) { acpi_ut_allocate_object_desc_dbg()
392 "Could not allocate an object descriptor")); acpi_ut_allocate_object_desc_dbg()
399 ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); acpi_ut_allocate_object_desc_dbg()
402 object, (u32) sizeof(union acpi_operand_object))); acpi_ut_allocate_object_desc_dbg()
404 return_PTR(object); acpi_ut_allocate_object_desc_dbg()
411 * PARAMETERS: object - An Acpi internal object to be deleted
415 * DESCRIPTION: Free an ACPI object descriptor or add it to the object cache
419 void acpi_ut_delete_object_desc(union acpi_operand_object *object) acpi_ut_delete_object_desc() argument
421 ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object); acpi_ut_delete_object_desc()
425 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { acpi_ut_delete_object_desc()
427 "%p is not an ACPI Operand object [%s]", object, acpi_ut_delete_object_desc()
428 acpi_ut_get_descriptor_name(object))); acpi_ut_delete_object_desc()
432 (void)acpi_os_release_object(acpi_gbl_operand_cache, object); acpi_ut_delete_object_desc()
440 * PARAMETERS: internal_object - An ACPI operand object
446 * contain a simple object for return to an external user.
448 * The length includes the object structure plus any additional
463 /* Start with the length of the (external) Acpi object */ acpi_ut_get_simple_object_size()
467 /* A NULL object is allowed, can be a legal uninitialized package element */ acpi_ut_get_simple_object_size()
472 * (A NULL union acpi_object is an object of all zeroes.) acpi_ut_get_simple_object_size()
488 * The final length depends on the object type acpi_ut_get_simple_object_size()
489 * Strings and Buffers are packed right up against the parent object and acpi_ut_get_simple_object_size()
517 * Get the actual length of the full pathname to this object. acpi_ut_get_simple_object_size()
518 * The reference will be converted to the pathname to the object acpi_ut_get_simple_object_size()
537 "Cannot convert to external object - " acpi_ut_get_simple_object_size()
538 "unsupported Reference Class [%s] 0x%X in object %p", acpi_ut_get_simple_object_size()
549 ACPI_ERROR((AE_INFO, "Cannot convert to external object - " acpi_ut_get_simple_object_size()
550 "unsupported type [%s] 0x%X in object %p", acpi_ut_get_simple_object_size()
558 * Account for the space required by the object rounded up to the next acpi_ut_get_simple_object_size()
559 * multiple of the machine word size. This keeps each object aligned acpi_ut_get_simple_object_size()
591 * Simple object - just get the size (Null object/entry is handled acpi_ut_get_element_length()
606 /* Package object - nothing much to do here, let the walk handle it */ acpi_ut_get_element_length()
626 * PARAMETERS: internal_object - An ACPI internal object
632 * contain a package object for return to an external user.
676 * PARAMETERS: internal_object - An ACPI internal object
682 * contain an object for return to an API user.
H A Dutcache.c56 * object_size - Size of each cached object
58 * return_cache - Where the new cache object is returned
62 * DESCRIPTION: Create a cache object
78 /* Create the cache object */ acpi_os_create_cache()
85 /* Populate the cache object and return it */ acpi_os_create_cache()
100 * PARAMETERS: cache - Handle to cache object
128 /* Delete and unlink one cached state object */ acpi_os_purge_cache()
145 * PARAMETERS: cache - Handle to cache object
150 * cache object.
167 /* Now we can delete the cache object */ acpi_os_delete_cache()
177 * PARAMETERS: cache - Handle to cache object
178 * object - The object to be released
182 * DESCRIPTION: Release an object to the specified cache. If cache is full,
183 * the object is deleted.
188 acpi_os_release_object(struct acpi_memory_list * cache, void *object) acpi_os_release_object() argument
194 if (!cache || !object) { acpi_os_release_object()
198 /* If cache is full, just free this object */ acpi_os_release_object()
201 ACPI_FREE(object); acpi_os_release_object()
205 /* Otherwise put this object back into the cache */ acpi_os_release_object()
213 /* Mark the object as cached */ acpi_os_release_object()
215 memset(object, 0xCA, cache->object_size); acpi_os_release_object()
216 ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_CACHED); acpi_os_release_object()
218 /* Put the object at the head of the cache list */ acpi_os_release_object()
220 ACPI_SET_DESCRIPTOR_PTR(object, cache->list_head); acpi_os_release_object()
221 cache->list_head = object; acpi_os_release_object()
234 * PARAMETERS: cache - Handle to cache object
236 * RETURN: the acquired object. NULL on error
238 * DESCRIPTION: Get an object from the specified cache. If cache is empty,
239 * the object is allocated.
246 void *object; acpi_os_acquire_object() local
265 /* There is an object available, use it */ acpi_os_acquire_object()
267 object = cache->list_head; acpi_os_acquire_object()
268 cache->list_head = ACPI_GET_DESCRIPTOR_PTR(object); acpi_os_acquire_object()
274 "Object %p from %s cache\n", object, acpi_os_acquire_object()
284 memset(object, 0, cache->object_size); acpi_os_acquire_object()
286 /* The cache is empty, create a new object */ acpi_os_acquire_object()
305 object = ACPI_ALLOCATE_ZEROED(cache->object_size); acpi_os_acquire_object()
306 if (!object) { acpi_os_acquire_object()
311 return_PTR(object); acpi_os_acquire_object()
H A Dnsrepair.c57 * predefined methods to an object type that is expected, as per the ACPI
62 * than the internal object conversion routines used for implicit object
80 * An incorrect standalone object is wrapped with required outer package
135 * package_index - Index of object within parent package (if
138 * return_object_ptr - Pointer to the object returned from the
139 * evaluation of a method or object
143 * DESCRIPTION: Attempt to repair/convert a return object of a type that was
182 "During return object analysis")); acpi_ns_simple_repair()
191 * Do not perform simple object repair unless the return type is not acpi_ns_simple_repair()
199 * At this point, we know that the type of the returned object was not acpi_ns_simple_repair()
201 * repair the object by converting it to one of the expected object acpi_ns_simple_repair()
210 * Try to fix if there was no return object. Warning if failed to fix. acpi_ns_simple_repair()
259 * A package is expected. We will wrap the existing object with a acpi_ns_simple_repair()
260 * new package object. It is often the case that if a variable-length acpi_ns_simple_repair()
261 * package is required, but there is only a single object needed, the acpi_ns_simple_repair()
262 * BIOS will return that object instead of wrapping it with a Package acpi_ns_simple_repair()
263 * object. Note: after the wrapping, the package will be validated acpi_ns_simple_repair()
264 * for correct contents (expected object type or types). acpi_ns_simple_repair()
270 * The original object just had its reference count acpi_ns_simple_repair()
273 *return_object_ptr = new_object; /* New Package object */ acpi_ns_simple_repair()
279 /* We cannot repair this object */ acpi_ns_simple_repair()
289 * The original object is a package element. We need to acpi_ns_simple_repair()
290 * decrement the reference count of the original object, acpi_ns_simple_repair()
293 * However, if the original object was just wrapped with a acpi_ns_simple_repair()
294 * package object as part of the repair, we don't need to acpi_ns_simple_repair()
320 /* Delete old object, install the new return object */ acpi_ns_simple_repair()
332 * PARAMETERS: node - Namespace node for the method/object
334 * package_index - Index of object within parent package (if
340 * DESCRIPTION: Check an object name against the repairable object list.
354 /* Search info table for a repairable predefined method/object name */ acpi_ns_match_simple_repair()
381 * package_index - Index of object within parent package (if
384 * return_object_ptr - Pointer to the object returned from the
385 * evaluation of a method or object
389 * DESCRIPTION: Attempt to repair a NULL element of a returned Package object.
404 /* No repair needed if return object is non-NULL */ acpi_ns_repair_null_element()
411 * Attempt to repair a NULL element of a Package object. This applies to acpi_ns_repair_null_element()
441 /* Set the reference count according to the parent Package object */ acpi_ns_repair_null_element()
463 * obj_desc - A Package object
515 /* Examine all elements of the package object, remove nulls */ acpi_ns_remove_null_elements()
546 * original_object - Pointer to the object to repair.
547 * obj_desc_ptr - The new package object is returned here
549 * RETURN: Status, new object in *obj_desc_ptr
553 * only one sub-object, some BIOS code mistakenly simply declares
554 * the single object instead of a Package with one sub-object.
556 * Package object around the original object, creating the
557 * correct and expected Package with one sub-object.
576 * have a single element, the lone sub-object. acpi_ns_wrap_with_package()
586 "%s: Wrapped %s with expected Package object\n", acpi_ns_wrap_with_package()
590 /* Return the new object in the object pointer */ acpi_ns_wrap_with_package()
H A Dutcopy.c3 * Module Name: utcopy - Internal to external object translation utilities
95 * PARAMETERS: internal_object - Source object to be copied
96 * external_object - Where to return the copied object
97 * data_space - Where object data is returned (such as
103 * DESCRIPTION: This function is called to copy a simple internal object to
104 * an external object.
107 * the object.
123 * Check for NULL object case (could be an uninitialized acpi_ut_copy_isimple_to_esimple()
130 /* Always clear the external object */ acpi_ut_copy_isimple_to_esimple()
135 * In general, the external object will be the same type as acpi_ut_copy_isimple_to_esimple()
136 * the internal object acpi_ut_copy_isimple_to_esimple()
177 /* This is an object reference. */ acpi_ut_copy_isimple_to_esimple()
182 * For namepath, return the object handle ("reference") acpi_ut_copy_isimple_to_esimple()
220 * There is no corresponding external object type acpi_ut_copy_isimple_to_esimple()
223 "Unsupported object type, cannot convert to external object: %s", acpi_ut_copy_isimple_to_esimple()
267 * This is a simple or null object acpi_ut_copy_ielement_to_eelement()
280 * Build the package object acpi_ut_copy_ielement_to_eelement()
288 * Pass the new package object back to the package walk routine acpi_ut_copy_ielement_to_eelement()
317 * PARAMETERS: internal_object - Pointer to the object we are returning
318 * buffer - Where the object is returned
319 * space_used - Where the object length is returned
323 * DESCRIPTION: This function is called to place a package object in a user
324 * buffer. A package object by definition contains other objects.
326 * The buffer is assumed to have sufficient space for the object.
382 * PARAMETERS: internal_object - The internal object to be converted
383 * ret_buffer - Where the object is returned
387 * DESCRIPTION: This function is called to build an API object to be returned
402 * Package object: Copy all subobjects (including acpi_ut_copy_iobject_to_eobject()
410 * Build a simple object (no nested objects) acpi_ut_copy_iobject_to_eobject()
426 * build simple does not include the object size in the length acpi_ut_copy_iobject_to_eobject()
439 * PARAMETERS: external_object - The external object to be converted
440 * ret_internal_object - Where the internal object is returned
444 * DESCRIPTION: This function copies an external object to an internal one.
476 case ACPI_TYPE_ANY: /* This is the case for a NULL object */ acpi_ut_copy_esimple_to_isimple()
486 "Unsupported object type, cannot convert to internal object: %s", acpi_ut_copy_esimple_to_isimple()
541 internal_object->reference.object = acpi_ut_copy_esimple_to_isimple()
564 * PARAMETERS: external_object - The external object to be converted
565 * internal_object - Where the internal object is returned
569 * DESCRIPTION: Copy an external package object to an internal package.
585 /* Create the package object */ acpi_ut_copy_epackage_to_ipackage()
627 * PARAMETERS: external_object - The external object to be converted
628 * internal_object - Where the internal object is returned
632 * DESCRIPTION: Converts an external object to an internal object.
650 * Build a simple object (no nested objects) acpi_ut_copy_eobject_to_iobject()
664 * PARAMETERS: source_desc - The internal object to be copied
665 * dest_desc - New target object
669 * DESCRIPTION: Simple copy of one internal object to another. Reference count
670 * of the destination object is preserved.
689 * Copy the entire source object over the destination object. acpi_ut_copy_simple_object()
690 * Note: Source can be either an operand object or namespace node. acpi_ut_copy_simple_object()
705 /* New object is not static, regardless of source */ acpi_ut_copy_simple_object()
758 * We copied the reference object, so we now must add a reference acpi_ut_copy_simple_object()
759 * to the object pointed to by the reference acpi_ut_copy_simple_object()
769 acpi_ut_add_reference(source_desc->reference.object); acpi_ut_copy_simple_object()
783 * OS object. We must create a new one. acpi_ut_copy_simple_object()
845 /* A null source object indicates a (legal) null package element */ acpi_ut_copy_ielement_to_ielement()
849 * This is a simple object, just copy it acpi_ut_copy_ielement_to_ielement()
875 * This object is a package - go down another nesting level acpi_ut_copy_ielement_to_ielement()
876 * Create and build the package object acpi_ut_copy_ielement_to_ielement()
886 /* Pass the new package object back to the package walk routine */ acpi_ut_copy_ielement_to_ielement()
890 /* Store the object pointer in the parent package object */ acpi_ut_copy_ielement_to_ielement()
911 * PARAMETERS: source_obj - Pointer to the source package object
912 * dest_obj - Where the internal object is returned
917 * DESCRIPTION: This function is called to copy an internal package object
918 * into another internal package object.
936 * Create the object array and walk the source package tree acpi_ut_copy_ipackage_to_ipackage()
956 /* On failure, delete the destination package object */ acpi_ut_copy_ipackage_to_ipackage()
968 * PARAMETERS: source_desc - The internal object to be copied
969 * dest_desc - Where the copied object is returned
974 * DESCRIPTION: Copy an internal object to a new internal object
987 /* Create the top level object */ acpi_ut_copy_iobject_to_iobject()
994 /* Copy the object and possible subobjects */ acpi_ut_copy_iobject_to_iobject()
1004 /* Delete the allocated object if copy failed */ acpi_ut_copy_iobject_to_iobject()
H A Ddsmthdat.c61 union acpi_operand_object *object,
74 * PARAMETERS: walk_state - Current walk state object
128 * PARAMETERS: walk_state - Current walk state object
146 if (walk_state->local_variables[index].object) { acpi_ds_method_data_delete_all()
150 object)); acpi_ds_method_data_delete_all()
152 /* Detach object (if present) and remove a reference */ acpi_ds_method_data_delete_all()
162 if (walk_state->arguments[index].object) { acpi_ds_method_data_delete_all()
165 walk_state->arguments[index].object)); acpi_ds_method_data_delete_all()
167 /* Detach object (if present) and remove a reference */ acpi_ds_method_data_delete_all()
182 * walk_state - Current walk state object
238 * walk_state - Current walk state object
303 * object - Object to be inserted into the stack entry
304 * walk_state - Current walk state object
308 * DESCRIPTION: Insert an object onto the method stack at entry Opcode:Index.
316 union acpi_operand_object *object, acpi_ds_method_data_set_value()
325 "NewObj %p Type %2.2X, Refs=%u [%s]\n", object, acpi_ds_method_data_set_value()
326 type, object->common.reference_count, acpi_ds_method_data_set_value()
327 acpi_ut_get_type_name(object->common.type))); acpi_ds_method_data_set_value()
337 * Increment ref count so object can't be deleted while installed. acpi_ds_method_data_set_value()
338 * NOTE: We do not copy the object in order to preserve the call by acpi_ds_method_data_set_value()
342 acpi_ut_add_reference(object); acpi_ds_method_data_set_value()
344 /* Install the object */ acpi_ds_method_data_set_value()
346 node->object = object; acpi_ds_method_data_set_value()
357 * walk_state - Current walk state object
375 union acpi_operand_object *object; acpi_ds_method_data_get_value() local
379 /* Validate the object descriptor */ acpi_ds_method_data_get_value()
382 ACPI_ERROR((AE_INFO, "Null object descriptor pointer")); acpi_ds_method_data_get_value()
393 /* Get the object from the node */ acpi_ds_method_data_get_value()
395 object = node->object; acpi_ds_method_data_get_value()
397 /* Examine the returned object, it must be valid. */ acpi_ds_method_data_get_value()
399 if (!object) { acpi_ds_method_data_get_value()
401 * Index points to uninitialized object. acpi_ds_method_data_get_value()
411 object = acpi_ut_create_integer_object((u64) 0); acpi_ds_method_data_get_value()
412 if (!object) { acpi_ds_method_data_get_value()
416 node->object = object; acpi_ds_method_data_get_value()
448 * The Index points to an initialized and valid object. acpi_ds_method_data_get_value()
449 * Return an additional reference to the object acpi_ds_method_data_get_value()
451 *dest_desc = object; acpi_ds_method_data_get_value()
452 acpi_ut_add_reference(object); acpi_ds_method_data_get_value()
464 * walk_state - Current walk state object
469 * a null into the stack slot after the object is deleted.
479 union acpi_operand_object *object; acpi_ds_method_data_delete_value() local
490 /* Get the associated object */ acpi_ds_method_data_delete_value()
492 object = acpi_ns_get_attached_object(node); acpi_ds_method_data_delete_value()
499 node->object = NULL; acpi_ds_method_data_delete_value()
501 if ((object) && acpi_ds_method_data_delete_value()
502 (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_OPERAND)) { acpi_ds_method_data_delete_value()
504 * There is a valid object. acpi_ds_method_data_delete_value()
506 * increment when the object was stored. acpi_ds_method_data_delete_value()
508 acpi_ut_remove_reference(object); acpi_ds_method_data_delete_value()
568 * If the reference count on the object is more than one, we must acpi_ds_store_object_to_local()
569 * take a copy of the object before we store. A reference count acpi_ds_store_object_to_local()
570 * of exactly 1 means that the object was just created during the acpi_ds_store_object_to_local()
585 * If there is an object already in this slot, we either acpi_ds_store_object_to_local()
587 * is an object reference stored there, we have to do acpi_ds_store_object_to_local()
593 * contains an object reference (stored as an Node). acpi_ds_store_object_to_local()
596 * anything there, including an object reference. acpi_ds_store_object_to_local()
609 * If we have a valid reference object that came from ref_of(), acpi_ds_store_object_to_local()
624 * Store this object to the Node (perform the indirect store) acpi_ds_store_object_to_local()
632 object, acpi_ds_store_object_to_local()
636 /* Remove local reference if we copied the object above */ acpi_ds_store_object_to_local()
645 /* Delete the existing object before storing the new one */ acpi_ds_store_object_to_local()
653 * (increments the object reference count by one) acpi_ds_store_object_to_local()
659 /* Remove local reference if we copied the object above */ acpi_ds_store_object_to_local()
675 * walk_state - Current walk state object
679 * DESCRIPTION: Get the type of the object stored in the Local or Arg
689 union acpi_operand_object *object; acpi_ds_method_data_get_type() local
700 /* Get the object */ acpi_ds_method_data_get_type()
702 object = acpi_ns_get_attached_object(node); acpi_ds_method_data_get_type()
703 if (!object) { acpi_ds_method_data_get_type()
710 /* Get the object type */ acpi_ds_method_data_get_type()
712 return_VALUE(object->type); acpi_ds_method_data_get_type()
314 acpi_ds_method_data_set_value(u8 type, u32 index, union acpi_operand_object *object, struct acpi_walk_state *walk_state) acpi_ds_method_data_set_value() argument
H A Dutdecode.c169 * PARAMETERS: type - An ACPI object type
171 * RETURN: Decoded ACPI object type name
187 /* Printable names of the ACPI object types */
247 "Invalid object descriptor type: 0x%2.2X [%s] (%p)\n", acpi_ut_get_object_type_name()
252 return_PTR("Invalid object"); acpi_ut_get_object_type_name()
262 * PARAMETERS: object - A namespace node
270 char *acpi_ut_get_node_name(void *object) acpi_ut_get_node_name() argument
272 struct acpi_namespace_node *node = (struct acpi_namespace_node *)object; acpi_ut_get_node_name()
276 if (!object) { acpi_ut_get_node_name()
282 if ((object == ACPI_ROOT_OBJECT) || (object == acpi_gbl_root_node)) { acpi_ut_get_node_name()
307 * PARAMETERS: object - An ACPI object
311 * DESCRIPTION: Validate object and return the descriptor type
315 /* Printable names of object descriptor types */
336 char *acpi_ut_get_descriptor_name(void *object) acpi_ut_get_descriptor_name() argument
339 if (!object) { acpi_ut_get_descriptor_name()
343 if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) { acpi_ut_get_descriptor_name()
349 (object)])); acpi_ut_get_descriptor_name()
357 * PARAMETERS: object - An ACPI reference object
361 * DESCRIPTION: Decode a reference object sub-type to a string.
365 /* Printable names of reference object sub-types */
377 const char *acpi_ut_get_reference_name(union acpi_operand_object *object) acpi_ut_get_reference_name() argument
380 if (!object) { acpi_ut_get_reference_name()
384 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { acpi_ut_get_reference_name()
385 return ("Not an Operand object"); acpi_ut_get_reference_name()
388 if (object->common.type != ACPI_TYPE_LOCAL_REFERENCE) { acpi_ut_get_reference_name()
389 return ("Not a Reference object"); acpi_ut_get_reference_name()
392 if (object->reference.class > ACPI_REFCLASS_MAX) { acpi_ut_get_reference_name()
396 return (acpi_gbl_ref_class_names[object->reference.class]); acpi_ut_get_reference_name()
492 /* 00 - 0D are common to all object types */ acpi_ut_get_notify_name()
504 /* 80 - 83 are per-object-type */ acpi_ut_get_notify_name()
519 return ("Target object type does not support notifies"); acpi_ut_get_notify_name()
541 * RETURN: TRUE if valid object type, FALSE otherwise
543 * DESCRIPTION: Validate an object type
H A Dexstoren.c3 * Module Name: exstoren - AML Interpreter object store support,
4 * Store to Node (namespace object)
57 * PARAMETERS: source_desc_ptr - Pointer to the source object
61 * RETURN: Status, resolved object in source_desc_ptr.
63 * DESCRIPTION: Resolve an object. If the object is a reference, dereference
64 * it and return the actual object in the source_desc_ptr.
98 /* Resolve a reference object first */ acpi_ex_resolve_object()
139 ACPI_ERROR((AE_INFO, "Store into an unresolved Alias object")); acpi_ex_resolve_object()
161 * new_desc - New object if dest_desc is obsoleted
166 * DESCRIPTION: "Store" an object to another object. This may include
171 * The Assignment of an object to another (not named) object
176 * When storing into an object the data is converted to the
177 * target object type then stored in the object. This means
178 * that the target object type (for an initialized target) will
185 * resolution (from a reference object) must be performed by
204 * There is no destination object (An uninitialized node or acpi_ex_store_object_to_object()
205 * package element), so we can simply copy the source object acpi_ex_store_object_to_object()
206 * creating a new destination object acpi_ex_store_object_to_object()
221 * Otherwise, actual_src_desc is a temporary object to hold the acpi_ex_store_object_to_object()
222 * converted object. acpi_ex_store_object_to_object()
235 * new object. acpi_ex_store_object_to_object()
244 * copy of the *value* of the source object. acpi_ex_store_object_to_object()
288 /* Delete the intermediate (temporary) source object */ acpi_ex_store_object_to_object()
H A Dexstore.c3 * Module Name: exstore - AML Interpreter object store support
102 /* dest_desc can be either a namespace node or an ACPI object */ acpi_ex_store()
107 * Storing an object into a Named node. acpi_ex_store()
118 /* Destination object must be a Reference or a Constant object */ acpi_ex_store()
137 /* Destination is not a Reference object */ acpi_ex_store()
140 "Target is not a Reference or Constant object - [%s] %p", acpi_ex_store()
150 * 1) Store to Name (Change the object associated with a name) acpi_ex_store()
153 * 4) Store to the debug object acpi_ex_store()
158 /* Storing an object into a Name "container" */ acpi_ex_store()
162 object, walk_state, acpi_ex_store()
188 * Storing to the Debug object causes the value stored to be acpi_ex_store()
217 * *dest_desc - Named object to receive the value
222 * DESCRIPTION: Store the object to indexed Buffer or Package element
246 * Storing to a package element. Copy the object and replace acpi_ex_store_object_to_index()
247 * any existing object with the new object. No implicit acpi_ex_store_object_to_index()
250 * The object at *(index_desc->Reference.Where) is the acpi_ex_store_object_to_index()
252 * The parent package object is at index_desc->Reference.Object acpi_ex_store_object_to_index()
264 /* Normal object, copy it */ acpi_ex_store_object_to_index()
280 index_desc->reference.object)->common. acpi_ex_store_object_to_index()
291 index_desc->reference.object)->common. acpi_ex_store_object_to_index()
303 * The first 8-bit element of the source object is written to the acpi_ex_store_object_to_index()
304 * 8-bit Buffer location defined by the Index destination object, acpi_ex_store_object_to_index()
313 obj_desc = index_desc->reference.object; acpi_ex_store_object_to_index()
369 * node - Named object to receive the value
375 * DESCRIPTION: Store the object to the named object.
377 * The assignment of an object to a named object is handled here.
381 * When storing into an object the data is converted to the
382 * target object type then stored in the object. This means
383 * that the target object type (for an initialized target) will
407 /* Get current type of the node, and object attached to Node */ acpi_ex_store_object_to_node()
421 * Only copy_object allows all object types to be overwritten. For acpi_ex_store_object_to_node()
422 * target_ref(s), there are restrictions on the object types that acpi_ex_store_object_to_node()
482 * Resolve the source object to an actual value acpi_ex_store_object_to_node()
483 * (If it is a reference object) acpi_ex_store_object_to_node()
528 * store has been performed such that the node/object type acpi_ex_store_object_to_node()
560 * Instead, directly store a copy of the source object. acpi_ex_store_object_to_node()
579 * node - Named object to receive the value
584 * DESCRIPTION: "Store" an object directly to a node. This involves a copy
606 /* Copy the source object to a new object */ acpi_ex_store_direct_to_node()
614 /* Attach the new object to the node */ acpi_ex_store_direct_to_node()
H A Dnspredef.c63 * 1) The number of input arguments as defined by the method/object in the
65 * 2) The type of the return object (if any) is validated against the ACPI
85 * PARAMETERS: node - Namespace node for the method/object
88 * return_status - Status from the object evaluation
89 * return_object_ptr - Pointer to the object returned from the
90 * evaluation of a method or object
108 /* If not a predefined name, we cannot validate the return object */ acpi_ns_check_return_value()
116 * If the method failed or did not actually return an object, we cannot acpi_ns_check_return_value()
117 * validate the return object acpi_ns_check_return_value()
143 * Check that the type of the main return object is what is expected acpi_ns_check_return_value()
181 * The return object was OK, or it was successfully repaired above. acpi_ns_check_return_value()
192 * If the object validation failed or if we successfully repaired one acpi_ns_check_return_value()
194 * messages during the next evaluation of the same method/object. acpi_ns_check_return_value()
208 * return_object_ptr - Pointer to the object returned from the
209 * evaluation of a method or object
211 * package_index - Index of object within parent package (if
217 * DESCRIPTION: Check the type of the return object against the expected object
218 * type(s). Use of Btype allows multiple expected object types.
245 * Convert the object type (ACPI_TYPE_xxx) to a bitmapped object type. acpi_ns_check_object_type()
266 /* Attempt simple repair of the returned object if necessary */ acpi_ns_check_object_type()
276 /* Create a string with all expected types for this predefined object */ acpi_ns_check_object_type()
283 "Expected return object of type %s", acpi_ns_check_object_type()
309 * method or object
313 * DESCRIPTION: Check a returned reference object for the correct reference
325 * Check the reference object for the correct reference type (opcode). acpi_ns_check_reference()
327 * a reference to a named object (reference class: NAME) acpi_ns_check_reference()
334 "Return type mismatch - unexpected reference object type [%s] %2.2X", acpi_ns_check_reference()
347 * RETURN: Object return type. ACPI_RTYPE_ANY indicates that the object
349 * object was returned (return_object is NULL).
351 * DESCRIPTION: Convert object type into a bitmapped object return type.
H A Dutstate.c3 * Module Name: utstate - state object support procedures
55 * state - State object to push
59 * DESCRIPTION: Push a state object onto a state stack
68 /* Push the state object onto the front of the list (stack) */ acpi_ut_push_generic_state()
81 * RETURN: The popped state object
83 * DESCRIPTION: Pop a state object from a state stack
94 /* Remove the state object at the head of the list (stack) */ acpi_ut_pop_generic_state()
113 * RETURN: The new state object. NULL on failure.
115 * DESCRIPTION: Create a generic state object. Attempt to obtain one from
155 /* Create the generic state object */ acpi_ut_create_thread_state()
181 * PARAMETERS: object - Initial Object to be installed in the state
184 * RETURN: New state object, null on failure
193 *object, u16 action) acpi_ut_create_update_state()
199 /* Create the generic state object */ acpi_ut_create_update_state()
209 state->update.object = object; acpi_ut_create_update_state()
218 * PARAMETERS: object - Initial Object to be installed in the state
221 * RETURN: New state object, null on failure
235 /* Create the generic state object */ acpi_ut_create_pkg_state()
258 * RETURN: New state object, null on failure
271 /* Create the generic state object */ acpi_ut_create_control_state()
289 * PARAMETERS: state - The state object to be deleted
293 * DESCRIPTION: Release a state object to the state cache. NULL state objects
192 acpi_ut_create_update_state(union acpi_operand_object *object, u16 action) acpi_ut_create_update_state() argument
H A Dexresolv.c3 * Module Name: exresolv - AML Interpreter object resolution
118 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Resolved object %p\n", *stack_ptr)); acpi_ex_resolve_to_value()
126 * PARAMETERS: stack_ptr - Pointer to an internal object
131 * DESCRIPTION: Retrieve the value from an internal object. The Reference type
149 /* This is an object of type union acpi_operand_object */ acpi_ex_resolve_object_to_value()
161 * Note: this increments the local's object reference count acpi_ex_resolve_object_to_value()
208 * Valid object descriptor, copy pointer to return value acpi_ex_resolve_object_to_value()
210 * Delete the ref object, increment the returned object acpi_ex_resolve_object_to_value()
216 * A NULL object descriptor means an uninitialized element of acpi_ex_resolve_object_to_value()
228 /* Invalid reference object */ acpi_ex_resolve_object_to_value()
231 "Unknown TargetType 0x%X in Index/Reference object %p", acpi_ex_resolve_object_to_value()
243 /* Just leave the object as-is, do not dereference */ acpi_ex_resolve_object_to_value()
247 case ACPI_REFCLASS_NAME: /* Reference to a named object */ acpi_ex_resolve_object_to_value()
260 /* Get the object pointed to by the namespace node */ acpi_ex_resolve_object_to_value()
263 (stack_desc->reference.node)->object; acpi_ex_resolve_object_to_value()
323 * return_type - Where the object type is returned
324 * return_desc - Where the resolved object is returned
328 * DESCRIPTION: Return the base object and type. Traverse a reference list if
329 * necessary to get to the base object.
360 /* If we had an Alias node, use the attached object for type info */ acpi_ex_resolve_multiple()
390 * operators, we need to get to the base object (as per the ACPI acpi_ex_resolve_multiple()
402 node = obj_desc->reference.object; acpi_ex_resolve_multiple()
419 /* Get the attached object */ acpi_ex_resolve_multiple()
424 /* No object, use the NS node type */ acpi_ex_resolve_multiple()
439 /* Get the type of this reference (index into another object) */ acpi_ex_resolve_multiple()
447 * The main object is a package, we want to get the type acpi_ex_resolve_multiple()
451 * This could of course in turn be another reference object. acpi_ex_resolve_multiple()
524 * Now we are guaranteed to have an object that has not been created acpi_ex_resolve_multiple()
H A Ddswstate.c62 * PARAMETERS: object - Where to return the popped object
67 * DESCRIPTION: Pop an object off the top of this walk's result stack
72 acpi_ds_result_pop(union acpi_operand_object **object, acpi_ds_result_pop() argument
103 /* Return object of the top element and clean that top element result stack */ acpi_ds_result_pop()
108 *object = state->results.obj_desc[index]; acpi_ds_result_pop()
109 if (!*object) { acpi_ds_result_pop()
125 "Obj=%p [%s] Index=%X State=%p Num=%X\n", *object, acpi_ds_result_pop()
126 acpi_ut_get_object_type_name(*object), acpi_ds_result_pop()
136 * PARAMETERS: object - Where to return the popped object
141 * DESCRIPTION: Push an object onto the current result stack
146 acpi_ds_result_push(union acpi_operand_object * object, acpi_ds_result_push() argument
181 if (!object) { acpi_ds_result_push()
184 object, walk_state, walk_state->result_count)); acpi_ds_result_push()
188 /* Assign the address of object to the top free element of result stack */ acpi_ds_result_push()
191 state->results.obj_desc[index] = object; acpi_ds_result_push()
195 object, acpi_ds_result_push()
198 object), walk_state, acpi_ds_result_push()
213 * DESCRIPTION: Push an object onto the walk_state result stack
258 * DESCRIPTION: Pop an object off of the walk_state result stack
300 * PARAMETERS: object - Object to push
305 * DESCRIPTION: Push an object onto this walk's object/operand stack
310 acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state) acpi_ds_obj_stack_push() argument
319 object, walk_state, walk_state->num_operands)); acpi_ds_obj_stack_push()
323 /* Put the object onto the stack */ acpi_ds_obj_stack_push()
325 walk_state->operands[walk_state->operand_index] = object; acpi_ds_obj_stack_push()
333 object, acpi_ds_obj_stack_push()
336 object), walk_state, acpi_ds_obj_stack_push()
351 * DESCRIPTION: Pop this walk's object stack. Objects on the stack are NOT
396 * DESCRIPTION: Pop this walk's object stack and delete each object that is
419 /* Pop the stack and delete an object if present in this stack entry */ acpi_ds_obj_stack_pop_and_delete()
466 * thread - Thread state object
492 * RETURN: A walk_state object popped from the thread's stack
494 * DESCRIPTION: Remove and return the walkstate object that is at the head of
528 * PARAMETERS: owner_id - ID for object creation
530 * method_desc - Method object
H A Dexcreate.c3 * Module Name: excreate - Named object creation
87 target_node->object); acpi_ex_create_alias()
92 * permanently point to the same object), we can simply attach acpi_ex_create_alias()
93 * the object to the new NS node. For other objects (such as acpi_ex_create_alias()
99 /* For these types, the sub-object can change dynamically via a Store */ acpi_ex_create_alias()
117 * NS node, not the object itself. acpi_ex_create_alias()
120 alias_node->object = acpi_ex_create_alias()
129 alias_node->object = acpi_ex_create_alias()
135 /* Attach the original source object to the new Alias Node */ acpi_ex_create_alias()
139 * to the same object. The reference count of the object has an acpi_ex_create_alias()
163 * DESCRIPTION: Create a new event object
190 /* Attach object to the Node */ acpi_ex_create_event()
198 * Remove local reference to the object (on error, will cause deletion acpi_ex_create_event()
199 * of both object and semaphore if present.) acpi_ex_create_event()
213 * DESCRIPTION: Create a new mutex object
226 /* Create the new mutex object */ acpi_ex_create_mutex()
241 /* Init object and attach to NS node */ acpi_ex_create_mutex()
253 * Remove local reference to the object (on error, will cause deletion acpi_ex_create_mutex()
254 * of both object and semaphore if present.) acpi_ex_create_mutex()
271 * DESCRIPTION: Create a new operation region object
292 * If the region object is already attached to this node, acpi_ex_create_region()
346 /* Install the new region object in the parent Node */ acpi_ex_create_region()
352 /* Remove local reference to the object */ acpi_ex_create_region()
366 * DESCRIPTION: Create a new processor object and populate the fields
380 /* Create the processor object */ acpi_ex_create_processor()
387 /* Initialize the processor object from the operands */ acpi_ex_create_processor()
394 /* Install the processor object in the parent Node */ acpi_ex_create_processor()
399 /* Remove local reference to the object */ acpi_ex_create_processor()
413 * DESCRIPTION: Create a new power_resource object and populate the fields
427 /* Create the power resource object */ acpi_ex_create_power_resource()
434 /* Initialize the power object from the operands */ acpi_ex_create_power_resource()
440 /* Install the power resource object in the parent Node */ acpi_ex_create_power_resource()
445 /* Remove local reference to the object */ acpi_ex_create_power_resource()
462 * DESCRIPTION: Create a new method object
477 /* Create a new method object */ acpi_ex_create_method()
515 /* Attach the new object to the method Node */ acpi_ex_create_method()
520 /* Remove local reference to the object */ acpi_ex_create_method()
H A Dexresnte.c3 * Module Name: exresnte - AML Interpreter object resolution
59 * pointer to the resolved object.
61 * code. NULL if simply resolving an object
65 * DESCRIPTION: Resolve a Namespace node to a valued object
68 * can be either a pointer to an actual internal object or a pointer into the
92 * object that is attached to the Node. acpi_ex_resolve_node_to_value()
107 node = ACPI_CAST_PTR(struct acpi_namespace_node, node->object); acpi_ex_resolve_node_to_value()
114 * Several object types require no further processing: acpi_ex_resolve_node_to_value()
127 ACPI_ERROR((AE_INFO, "No object attached to node [%4.4s] %p", acpi_ex_resolve_node_to_value()
134 * of the attached object or pointer acpi_ex_resolve_node_to_value()
148 /* Return an additional reference to the object */ acpi_ex_resolve_node_to_value()
166 /* Return an additional reference to the object */ acpi_ex_resolve_node_to_value()
181 /* Return an additional reference to the object */ acpi_ex_resolve_node_to_value()
195 /* Return an additional reference to the object */ acpi_ex_resolve_node_to_value()
215 /* For these objects, just return the object attached to the Node */ acpi_ex_resolve_node_to_value()
223 /* Return an additional reference to the object */ acpi_ex_resolve_node_to_value()
229 /* TYPE_ANY is untyped, and thus there is no object associated with it */ acpi_ex_resolve_node_to_value()
234 "Untyped entry %p, no attached object!", node)); acpi_ex_resolve_node_to_value()
245 /* Return an additional reference to the object */ acpi_ex_resolve_node_to_value()
268 "Node %p - Unknown object type 0x%X", acpi_ex_resolve_node_to_value()
275 /* Return the object descriptor */ acpi_ex_resolve_node_to_value()
H A Ddbconvert.c127 * object - Where the buffer object is returned
131 * DESCRIPTION: Convert a string to a buffer object. String is treated a list
137 acpi_db_convert_to_buffer(char *string, union acpi_object *object) acpi_db_convert_to_buffer() argument
177 object->type = ACPI_TYPE_BUFFER; acpi_db_convert_to_buffer()
178 object->buffer.pointer = buffer; acpi_db_convert_to_buffer()
179 object->buffer.length = length; acpi_db_convert_to_buffer()
188 * object - Where the package object is returned
192 * DESCRIPTION: Convert a string to a package object. Handles nested packages
197 acpi_status acpi_db_convert_to_package(char *string, union acpi_object * object) acpi_db_convert_to_package() argument
229 object->type = ACPI_TYPE_PACKAGE; acpi_db_convert_to_package()
230 object->package.count = i; acpi_db_convert_to_package()
231 object->package.elements = elements; acpi_db_convert_to_package()
241 * object - Where the new object is returned
255 char *string, union acpi_object * object) acpi_db_convert_to_object()
262 object->type = ACPI_TYPE_STRING; acpi_db_convert_to_object()
263 object->string.pointer = string; acpi_db_convert_to_object()
264 object->string.length = (u32)strlen(string); acpi_db_convert_to_object()
269 status = acpi_db_convert_to_buffer(string, object); acpi_db_convert_to_object()
274 status = acpi_db_convert_to_package(string, object); acpi_db_convert_to_object()
279 object->type = ACPI_TYPE_INTEGER; acpi_db_convert_to_object()
280 status = acpi_ut_strtoul64(string, 16, &object->integer.value); acpi_db_convert_to_object()
254 acpi_db_convert_to_object(acpi_object_type type, char *string, union acpi_object * object) acpi_db_convert_to_object() argument
H A Ddsobject.c3 * Module Name: dsobject - Dispatcher object management routines
67 * op - Parser object to be translated
68 * obj_desc_ptr - Where the ACPI internal object is returned
72 * DESCRIPTION: Translate a parser Op object to the equivalent namespace object
73 * Simple objects are any objects other than a package object!
91 * This is a named object reference. If this name was acpi_ds_build_internal_object()
143 /* Special object resolution for elements of a package */ acpi_ds_build_internal_object()
186 op->common.node->object); acpi_ds_build_internal_object()
199 acpi_ut_add_reference(op->common.node->object); acpi_ds_build_internal_object()
213 /* We will create a reference object for these types below */ acpi_ds_build_internal_object()
219 * object, we are done. acpi_ds_build_internal_object()
226 /* Create and init a new internal ACPI object */ acpi_ds_build_internal_object()
253 * op - Parser object to be translated
255 * obj_desc_ptr - Where the ACPI internal object is returned
259 * DESCRIPTION: Translate a parser Op package object to the equivalent
260 * namespace object
278 * If we are evaluating a Named buffer object "Name (xxxx, Buffer)". acpi_ds_build_internal_buffer_obj()
279 * The buffer object already exists (from the NS node), otherwise it must acpi_ds_build_internal_buffer_obj()
285 /* Create a new buffer object */ acpi_ds_build_internal_buffer_obj()
357 * op - Parser object to be translated
360 * obj_desc_ptr - Where the ACPI internal object is returned
364 * DESCRIPTION: Translate a parser Op package object to the equivalent
365 * namespace object
370 * if num_elements is larger, the Package object is padded out with
406 * If we are evaluating a Named package object "Name (xxxx, Package)", acpi_ds_build_internal_package_obj()
407 * the package object already exists, otherwise it must be created. acpi_ds_build_internal_package_obj()
506 * of ill-formed package object. acpi_ds_build_internal_package_obj()
551 * op - Parser object to be translated
555 * DESCRIPTION: Create the object to be associated with a namespace node
572 * the named object node the first time through acpi_ds_create_node()
585 /* Build an internal object for the argument(s) */ acpi_ds_create_node()
593 /* Re-type the object according to its argument */ acpi_ds_create_node()
601 /* Remove local reference to the object */ acpi_ds_create_node()
614 * op - Parser op used to init the internal object
615 * opcode - AML opcode associated with the object
616 * ret_obj_desc - Namespace object to be initialized
620 * DESCRIPTION: Initialize a namespace object from a parser Op and its
621 * associated arguments. The namespace object is a more compact
647 /* Perform per-object initialization */ acpi_ds_init_object_from_op()
785 object)); acpi_ds_init_object_from_op()
806 object)); acpi_ds_init_object_from_op()
810 default: /* Object name or Debug object */ acpi_ds_init_object_from_op()
818 obj_desc->reference.object = acpi_ds_init_object_from_op()
819 op->common.node->object; acpi_ds_init_object_from_op()
H A Dexoparg1.c100 /* Create a return object of type Integer */ acpi_ex_opcode_0A_0T_1R()
120 /* Delete return object on error */ acpi_ex_opcode_0A_0T_1R()
143 * object stack
279 /* Create a return object of type Integer for these opcodes */ acpi_ex_opcode_1A_1T_1R()
417 * This means that the object does not exist in the namespace, acpi_ex_opcode_1A_1T_1R()
424 /* Get the object reference, store it, and remove our reference */ acpi_ex_opcode_1A_1T_1R()
437 /* The object exists in the namespace, return TRUE */ acpi_ex_opcode_1A_1T_1R()
453 * Be careful about deleting the source object, acpi_ex_opcode_1A_1T_1R()
454 * since the object itself may have been stored. acpi_ex_opcode_1A_1T_1R()
461 /* It is possible that the Store already produced a return object */ acpi_ex_opcode_1A_1T_1R()
467 * object (meaning we would normally increment it), the two acpi_ex_opcode_1A_1T_1R()
549 /* Store the return value computed above into the target object */ acpi_ex_opcode_1A_1T_1R()
556 /* Delete return object on error */ acpi_ex_opcode_1A_1T_1R()
562 /* Save return object on success */ acpi_ex_opcode_1A_1T_1R()
629 * NS Node or an internal object. acpi_ex_opcode_1A_0T_1R()
635 /* Internal reference object - prevent deletion */ acpi_ex_opcode_1A_0T_1R()
642 * reference on the Operand[0] object) acpi_ex_opcode_1A_0T_1R()
660 * temp_desc is now guaranteed to be an Integer object -- acpi_ex_opcode_1A_0T_1R()
671 /* Finished with this Integer object */ acpi_ex_opcode_1A_0T_1R()
677 * Reference object acpi_ex_opcode_1A_0T_1R()
685 * get the associated object, not its value. For example, we don't acpi_ex_opcode_1A_0T_1R()
687 * field_unit object. acpi_ex_opcode_1A_0T_1R()
690 /* Get the type of the base object */ acpi_ex_opcode_1A_0T_1R()
711 * get the associated object, not its value. acpi_ex_opcode_1A_0T_1R()
714 /* Get the base object */ acpi_ex_opcode_1A_0T_1R()
724 * The type of the base object must be integer, buffer, string, or acpi_ex_opcode_1A_0T_1R()
773 * Now that we have the size of the object, create a result acpi_ex_opcode_1A_0T_1R()
774 * object to hold the value acpi_ex_opcode_1A_0T_1R()
837 * Delete our reference to the input object and acpi_ex_opcode_1A_0T_1R()
838 * point to the object just retrieved acpi_ex_opcode_1A_0T_1R()
846 /* Get the object to which the reference refers */ acpi_ex_opcode_1A_0T_1R()
849 operand[0]->reference.object; acpi_ex_opcode_1A_0T_1R()
877 * to a named ACPI object. acpi_ex_opcode_1A_0T_1R()
880 * 2) Dereference the node to an actual object. Could be a acpi_ex_opcode_1A_0T_1R()
911 * Get the actual object from the Node (This is the dereference). acpi_ex_opcode_1A_0T_1R()
922 * This must be a reference object produced by either the acpi_ex_opcode_1A_0T_1R()
935 operand[0]->reference.object; acpi_ex_opcode_1A_0T_1R()
938 * Create a new object that contains one element of the acpi_ex_opcode_1A_0T_1R()
961 * add another reference to the referenced object, however. acpi_ex_opcode_1A_0T_1R()
981 "Unknown Index TargetType 0x%X in reference object %p", acpi_ex_opcode_1A_0T_1R()
991 return_desc = operand[0]->reference.object; acpi_ex_opcode_1A_0T_1R()
1027 /* Add another reference to the object */ acpi_ex_opcode_1A_0T_1R()
1059 /* Delete return object on error */ acpi_ex_opcode_1A_0T_1R()
1065 /* Save return object on success */ acpi_ex_opcode_1A_0T_1R()
H A Duteval.c56 * path - Path to object from starting node
62 * DESCRIPTION: Evaluates a namespace object and verifies the type of the
63 * return object. Common code that simplifies accessing objects
92 /* Evaluate the object/method */ acpi_ut_evaluate_object()
109 /* Did we get a return object? */ acpi_ut_evaluate_object()
113 ACPI_ERROR_METHOD("No object was returned from", acpi_ut_evaluate_object()
122 /* Map the return object type to the bitmapped type */ acpi_ut_evaluate_object()
153 * We received a return object, but one was not expected. This can acpi_ut_evaluate_object()
155 * Just delete the return object and return AE_OK. acpi_ut_evaluate_object()
161 /* Is the return object one of the expected types? */ acpi_ut_evaluate_object()
164 ACPI_ERROR_METHOD("Return object type is incorrect", acpi_ut_evaluate_object()
173 /* On error exit, we must delete the return object */ acpi_ut_evaluate_object()
199 * DESCRIPTION: Evaluates a numeric namespace object for a selected device
226 /* On exit, we must delete the return object */ acpi_ut_evaluate_numeric_object()
281 /* On exit, we must delete the return object */ acpi_ut_execute_STA()
329 /* Delete the return object */ acpi_ut_execute_power_methods()
H A Dnseval.c66 * Node is the object to execute
78 * ACPI namespace object.
96 * Get the actual namespace node for the target object if we acpi_ns_evaluate()
118 info->node->object); acpi_ns_evaluate()
136 /* Get the full pathname to the object, for use in warning messages */ acpi_ns_evaluate()
173 * this method/object matches the actual ASL/AML definition. acpi_ns_evaluate()
186 * 2) The object is a control method -- execute it acpi_ns_evaluate()
187 * 3) The object is not a method -- just return it's current value acpi_ns_evaluate()
197 * 1) Disallow evaluation of certain object types. For these, acpi_ns_evaluate()
198 * object evaluation is undefined and not supported. acpi_ns_evaluate()
201 "%s: Evaluation of object type [%s] is not supported", acpi_ns_evaluate()
213 /* Verify that there is a method object associated with this node */ acpi_ns_evaluate()
217 "%s: Method has no attached sub-object", acpi_ns_evaluate()
244 * 3) All other non-method objects -- get the current object value acpi_ns_evaluate()
250 * the object out of the node. acpi_ns_evaluate()
259 * Even though we do not directly invoke the interpreter for object acpi_ns_evaluate()
281 ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Returned object %p [%s]\n", acpi_ns_evaluate()
314 "*** Completed evaluation of object %s ***\n", acpi_ns_evaluate()
376 /* Delete the (temporary) method object */ acpi_ns_exec_module_code_list()
419 * of the method object descriptor. acpi_ns_exec_module_code()
426 * Get the region handler and save it in the method object. We may need acpi_ns_exec_module_code()
432 if ((type == ACPI_TYPE_DEVICE) && parent_node->object) { acpi_ns_exec_module_code()
434 parent_node->object->device.handler; acpi_ns_exec_module_code()
447 * Get the currently attached parent object. Add a reference, because the acpi_ns_exec_module_code()
448 * ref count will be decreased when the method object is installed to acpi_ns_exec_module_code()
478 /* Detach the temporary method object */ acpi_ns_exec_module_code()
482 /* Restore the original parent object */ acpi_ns_exec_module_code()
H A Ddbobject.c3 * Module Name: dbobject - ACPI object decode and display
115 * DESCRIPTION: Short display of an internal object. Numbers/Strings/Buffers.
198 /* These types have no attached object */ acpi_db_decode_node()
227 * DESCRIPTION: Short display of an internal object
244 /* Decode the object type */ acpi_db_display_internal_object()
265 /* Decode the ACPI object type */ acpi_db_display_internal_object()
282 [obj_desc->reference.value].object; acpi_db_display_internal_object()
295 [obj_desc->reference.value].object; acpi_db_display_internal_object()
309 object); acpi_db_display_internal_object()
311 (obj_desc->reference.object); acpi_db_display_internal_object()
340 if (!obj_desc->reference.object) { acpi_db_display_internal_object()
346 /* Reference can be to a Node or an Operand object */ acpi_db_display_internal_object()
349 (obj_desc->reference.object)) { acpi_db_display_internal_object()
353 object); acpi_db_display_internal_object()
359 (obj_desc->reference.object); acpi_db_display_internal_object()
440 obj_desc = walk_state->local_variables[i].object; acpi_db_decode_locals()
455 obj_desc = walk_state->local_variables[i].object; acpi_db_decode_locals()
505 obj_desc = walk_state->arguments[i].object; acpi_db_decode_arguments()
521 obj_desc = walk_state->arguments[i].object; acpi_db_decode_arguments()
H A Dnsconvert.c60 * return_object - Where the new converted object is returned
64 * DESCRIPTION: Attempt to convert a String/Buffer object to an Integer.
124 * return_object - Where the new converted object is returned
128 * DESCRIPTION: Attempt to convert a Integer/Buffer object to a String.
149 /* Allocate a new NULL string object */ acpi_ns_convert_to_string()
171 * the battery is often (incorrectly) returned as buffer object(s). acpi_ns_convert_to_string()
179 /* Allocate a new string object */ acpi_ns_convert_to_string()
208 * return_object - Where the new converted object is returned
212 * DESCRIPTION: Attempt to convert a Integer/String/Package object to a Buffer.
233 * Field object that is less than or equal to the global integer acpi_ns_convert_to_buffer()
262 * Buffer object with multiple DWORD integers within. For example, acpi_ns_convert_to_buffer()
279 /* Create the new buffer object to replace the Package */ acpi_ns_convert_to_buffer()
312 * return_object - Where the new converted object is returned
316 * DESCRIPTION: Attempt to convert a String object to a Unicode string Buffer.
346 * The original object is an ASCII string. Convert this string to acpi_ns_convert_to_unicode()
352 /* Create a new buffer object for the Unicode data */ acpi_ns_convert_to_unicode()
376 * return_object - Where the new converted object is returned
380 * DESCRIPTION: Attempt to convert a Integer object to a resource_template
430 /* Create the new buffer object for the resource descriptor */ acpi_ns_convert_to_resource()
H A Dexresop.c3 * Module Name: exresop - AML Interpreter operand/object resolution
57 acpi_object_type this_type, void *object);
64 * this_type Actual object type
75 acpi_object_type this_type, void *object) acpi_ex_check_object_type()
93 (((union acpi_operand_object *)object)->common. acpi_ex_check_object_type()
103 acpi_ut_get_type_name(this_type), object)); acpi_ex_check_object_type()
194 * Resolve an alias object. The construction of these objects acpi_ex_resolve_operands()
196 * thus, the attached object is always the aliased namespace node acpi_ex_resolve_operands()
212 /* ACPI internal object */ acpi_ex_resolve_operands()
220 "Bad operand object type [0x%X]", acpi_ex_resolve_operands()
242 case ACPI_REFCLASS_NAME: /* Reference to a named object */ acpi_ex_resolve_operands()
281 * Handle cases where the object does not need to be acpi_ex_resolve_operands()
291 * String found - the string references a named object and acpi_ex_resolve_operands()
333 * Instead, we just want to store the reference object. acpi_ex_resolve_operands()
353 * Resolve this object to a value acpi_ex_resolve_operands()
360 /* Get the resolved object */ acpi_ex_resolve_operands()
365 * Check the resulting object (value) type acpi_ex_resolve_operands()
369 * For the simple cases, only one type of resolved object acpi_ex_resolve_operands()
408 * The more complex cases allow multiple resolved object types acpi_ex_resolve_operands()
652 /* Allow store of any object to the Debug object */ acpi_ex_resolve_operands()
678 * Make sure that the original object was resolved to the acpi_ex_resolve_operands()
679 * required object type (Simple cases only). acpi_ex_resolve_operands()
74 acpi_ex_check_object_type(acpi_object_type type_needed, acpi_object_type this_type, void *object) acpi_ex_check_object_type() argument
H A Dnsrepair2.c170 * node - Namespace node for the method/object
172 * return_object_ptr - Pointer to the object returned from the
173 * evaluation of a method or object
178 * DESCRIPTION: Attempt to repair/convert a return object of a type that was
207 * PARAMETERS: node - Namespace node for the method/object
211 * DESCRIPTION: Check an object name against the repairable object list.
221 /* Search info table for a repairable predefined method/object name */ acpi_ns_match_complex_repair()
239 * return_object_ptr - Pointer to the object returned from the
240 * evaluation of a method or object
242 * RETURN: Status. AE_OK if object is OK or was repaired successfully
244 * DESCRIPTION: Repair for the _ALR object. If necessary, sort the object list
268 * return_object_ptr - Pointer to the object returned from the
269 * evaluation of a method or object
271 * RETURN: Status. AE_OK if object is OK or was repaired successfully
313 /* Create the new (larger) buffer object */ acpi_ns_repair_FDE()
343 /* Delete the original return object, return the new buffer object */ acpi_ns_repair_FDE()
357 * return_object_ptr - Pointer to the object returned from the
358 * evaluation of a method or object
360 * RETURN: Status. AE_OK if object is OK or was repaired successfully
362 * DESCRIPTION: Repair for the _CID object. If a string, ensure that all
427 * return_object_ptr - Pointer to the object returned from the
428 * evaluation of a method or object
430 * RETURN: Status. AE_OK if object is OK or was repaired successfully
432 * DESCRIPTION: Repair for the _CST object:
513 * return_object_ptr - Pointer to the object returned from the
514 * evaluation of a method or object
516 * RETURN: Status. AE_OK if object is OK or was repaired successfully
518 * DESCRIPTION: Repair for the _HID object. If a string, ensure that all
551 /* It is simplest to always create a new string object */ acpi_ns_repair_HID()
596 * return_object_ptr - Pointer to the object returned from the
597 * evaluation of a method or object
599 * RETURN: Status. AE_OK if object is OK or was repaired successfully
601 * DESCRIPTION: Repair for the _PRT object. If necessary, fix reversed
663 * return_object_ptr - Pointer to the object returned from the
664 * evaluation of a method or object
666 * RETURN: Status. AE_OK if object is OK or was repaired successfully
668 * DESCRIPTION: Repair for the _PSS object. If necessary, sort the object list
732 * return_object_ptr - Pointer to the object returned from the
733 * evaluation of a method or object
735 * RETURN: Status. AE_OK if object is OK or was repaired successfully
737 * DESCRIPTION: Repair for the _TSS object. If necessary, sort the object list
776 * return_object - Pointer to the top-level returned object
808 /* The top-level object must be a package */ acpi_ns_check_sorted_list()
887 * PARAMETERS: elements - Package object element list
936 * PARAMETERS: obj_desc - Package object element list
962 /* Examine all elements of the package object, remove matched index */ acpi_ns_remove_element()
H A Ddswscope.c60 * root scope object (which remains at the stack top.)
77 "Popped object type (%s)\n", acpi_ds_scope_stack_clear()
117 /* Make sure object type is valid */ acpi_ds_scope_stack_push()
120 ACPI_WARNING((AE_INFO, "Invalid object type: 0x%X", type)); acpi_ds_scope_stack_push()
123 /* Allocate a new scope object */ acpi_ds_scope_stack_push()
130 /* Init new scope object */ acpi_ds_scope_stack_push()
159 /* Push new scope object onto stack */ acpi_ds_scope_stack_push()
185 * Pop scope info object off the stack. acpi_ds_scope_stack_pop()
H A Dacobject.h3 * Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
52 * address space handlers and notify handlers. The object is a constant
55 * Note: The object is optimized to be aligned and will not work if it is
84 u16 reference_count; /* For object deletion management */\
115 * Note: The String and Buffer object must be identical through the
150 ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */
156 acpi_mutex os_mutex; /* Actual OS synchronization object */
245 * "Field Datum" -- a datum from the actual field object
254 u32 base_byte_offset; /* Byte offset within containing object */\
261 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
266 union acpi_operand_object *region_obj; /* Containing op_region object */
272 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
273 union acpi_operand_object *bank_obj; /* bank_select Register object */
289 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj; /* Containing Buffer object */
328 * The Reference object is used for these opcodes:
336 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ member in struct:acpi_object_reference
351 ACPI_REFCLASS_NAME = 5, /* Reference to a named object */
352 ACPI_REFCLASS_DEBUG = 6, /* Debug object */
358 * Extra object is used as additional storage for types that
382 ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */
434 #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
458 union acpi_operand_object object; member in union:acpi_descriptor
H A Duterror.c63 * node_flags - From Namespace node for the method/object
70 * method/object is detected. This prevents a flood of error
83 * Warning messages for this method/object will be disabled after the acpi_ut_predefined_warning()
84 * first time a validation fails or an object is successfully repaired. acpi_ut_predefined_warning()
105 * node_flags - From Namespace node for the method/object
112 * method/object is detected. This prevents a flood of
125 * Warning messages for this method/object will be disabled after the acpi_ut_predefined_info()
126 * first time a validation fails or an object is successfully repaired. acpi_ut_predefined_info()
147 * node_flags - From Namespace node for the method/object
154 * method/object is detected. This prevents a flood of
168 * Warning messages for this method/object will be disabled after the acpi_ut_predefined_bios_error()
169 * first time a validation fails or an object is successfully repaired. acpi_ut_predefined_bios_error()
H A Ddbnames.c89 * These object types map directly to the ACPI_TYPES
248 * DESCRIPTION: Dump entire namespace with full object pathnames and object
347 /* Get the full pathname to this object */ acpi_db_walk_and_match_name()
352 acpi_os_printf("Could Not get pathname for object %p\n", acpi_db_walk_and_match_name()
525 acpi_os_printf("[%4.4s]: Unknown object type %X\n", acpi_db_walk_for_object_counts()
557 /* Get and display the full pathname to this object */ acpi_db_walk_for_specific_objects()
562 acpi_os_printf("Could Not get pathname for object %p\n", acpi_db_walk_for_specific_objects()
570 /* Dump short info about the object */ acpi_db_walk_for_specific_objects()
580 * PARAMETERS: obj_type_arg - Type of object to display
597 /* No argument means display summary/count of all object types */ acpi_db_display_objects()
626 /* Get the object type */ acpi_db_display_objects()
680 union acpi_operand_object *object; acpi_db_integrity_walk() local
700 node = (struct acpi_namespace_node *)node->object; acpi_db_integrity_walk()
717 object = acpi_ns_get_attached_object(node); acpi_db_integrity_walk()
718 if (object) { acpi_db_integrity_walk()
720 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { acpi_db_integrity_walk()
723 object, acpi_ut_get_descriptor_name(object)); acpi_db_integrity_walk()
764 * DESCRIPTION: Check if this namespace object refers to the target object
767 * Note: Currently doesn't check subobjects within the Node's object
788 /* Check for match against the object attached to the node */ acpi_db_walk_for_references()
802 * PARAMETERS: object_arg - String with hex value of the object
806 * DESCRIPTION: Search namespace for all references to the input object
815 /* Convert string to object pointer */ acpi_db_find_references()
865 /* Get the full path to this device object */ acpi_db_bus_walk()
870 acpi_os_printf("Could Not get pathname for object %p\n", acpi_db_bus_walk()
H A Ddbtest.c206 /* Install the debugger read-object control method if necessary */ acpi_db_test_all_objects()
227 /* Install the debugger write-object control method if necessary */ acpi_db_test_all_objects()
248 /* Walk the entire namespace, testing each supported named data object */ acpi_db_test_all_objects()
263 * DESCRIPTION: Test one namespace object. Supported types are Integer,
264 * String, Buffer, buffer_field, and field_unit. All other object
284 obj_desc = node->object; acpi_db_test_one_object()
321 * Returned object will be a Buffer if the field length acpi_db_test_one_object()
345 acpi_os_printf(" Ignoring, no attached object\n"); acpi_db_test_one_object()
380 /* At this point, we have resolved the object to one of the major types */ acpi_db_test_one_object()
426 * PARAMETERS: node - Parent NS node for the object
427 * bit_length - Actual length of the object. Used for
433 * DESCRIPTION: Test read/write for an Integer-valued object. Performs a
531 * PARAMETERS: node - Parent NS node for the object
532 * bit_length - Actual length of the object.
536 * DESCRIPTION: Test read/write for an Buffer-valued object. Performs a
656 * PARAMETERS: node - Parent NS node for the object
657 * byte_length - Actual length of the object.
661 * DESCRIPTION: Test read/write for an String-valued object. Performs a
749 * PARAMETERS: node - Parent NS node for the object
755 * DESCRIPTION: Performs a read from the specified object by invoking the
756 * special debugger control method that reads the object. Thus,
788 acpi_os_printf("Could not read from object, %s", acpi_db_read_from_object()
818 acpi_os_printf(" Unsupported return object type, %s", acpi_db_read_from_object()
832 * PARAMETERS: node - Parent NS node for the object
837 * DESCRIPTION: Performs a write to the specified object by invoking the
838 * special debugger control method that writes the object. Thus,
868 acpi_os_printf("Could not write to object, %s", acpi_db_write_to_object()
961 /* Get the object info for number of method parameters */ acpi_db_evaluate_one_predefined_name()
H A Dexstorob.c3 * Module Name: exstorob - AML Interpreter object store support, store to object
55 * PARAMETERS: source_desc - Source object to copy
56 * target_desc - Destination object of the copy
60 * DESCRIPTION: Copy a buffer object to another buffer object.
151 * PARAMETERS: source_desc - Source object to copy
152 * target_desc - Destination object of the copy
156 * DESCRIPTION: Copy a String object to another String object
H A Dexoparg2.c112 /* Are notifies allowed on this object? */ acpi_ex_opcode_2A_0T_0R()
116 "Unexpected notify object type [%s]", acpi_ex_opcode_2A_0T_0R()
227 /* Delete the return object */ acpi_ex_opcode_2A_2T_1R()
232 /* Save return object (the remainder) on success */ acpi_ex_opcode_2A_2T_1R()
308 * Input object is guaranteed to be a buffer at this point (it may have acpi_ex_opcode_2A_1T_1R()
309 * been converted.) Copy the raw buffer data to a new object of acpi_ex_opcode_2A_1T_1R()
328 /* Allocate a new string object */ acpi_ex_opcode_2A_1T_1R()
354 /* Create the internal return object */ acpi_ex_opcode_2A_1T_1R()
363 /* Initialize the Index reference object */ acpi_ex_opcode_2A_1T_1R()
418 /* Failure means that the Index was beyond the end of the object */ acpi_ex_opcode_2A_1T_1R()
422 "Index (0x%X%8.8X) is beyond end of object (length 0x%X)", acpi_ex_opcode_2A_1T_1R()
429 * Save the target object and add a reference to it for the life acpi_ex_opcode_2A_1T_1R()
432 return_desc->reference.object = operand[0]; acpi_ex_opcode_2A_1T_1R()
471 /* Delete return object on error */ acpi_ex_opcode_2A_1T_1R()
503 /* Create the internal return object */ acpi_ex_opcode_2A_0T_1R()
571 /* Delete return object on error */ acpi_ex_opcode_2A_0T_1R()
577 /* Save return object on success */ acpi_ex_opcode_2A_0T_1R()
H A Dnsarguments.c105 * node - Namespace node for the method/object
134 * If this object is not a control method, we can check if the ACPI acpi_ns_check_acpi_compliance()
172 * Note: These are BIOS errors in the declaration of the object acpi_ns_check_acpi_compliance()
174 aml_param_count = node->object->method.param_count; acpi_ns_check_acpi_compliance()
198 * node - Namespace node for the method/object
205 * parameter count (in the ASL/AML) for an object.
221 * against the count that is specified in the method/object. acpi_ns_check_argument_count()
227 "%u arguments were passed to a non-method ACPI object (%s)", acpi_ns_check_argument_count()
248 aml_param_count = node->object->method.param_count; acpi_ns_check_argument_count()
H A Dexdebug.c79 * operational case, stores to the debug object are ignored but can be easily
112 * object display acpi_ex_do_debug_object()
224 /* Check for valid node first, then valid object */ acpi_ex_do_debug_object()
241 /* These types have no attached object */ acpi_ex_do_debug_object()
255 node)->object, acpi_ex_do_debug_object()
260 } else if (source_desc->reference.object) { acpi_ex_do_debug_object()
262 (source_desc->reference.object) == acpi_ex_do_debug_object()
267 object)->object, acpi_ex_do_debug_object()
270 object_desc = source_desc->reference.object; acpi_ex_do_debug_object()
304 ("Unknown Reference object type %X\n", acpi_ex_do_debug_object()
449 * obj_desc - The method object
512 * obj_desc - The method object
584 * PARAMETERS: op - The parser opcode object
612 * PARAMETERS: op - The parser opcode object
H A Dnsxfeval.c69 * return_type - Expected type of return object
73 * DESCRIPTION: Find and evaluate the given object, passing the given
101 /* Evaluate the object */ acpi_evaluate_object_typed()
123 /* Examine the object type returned from evaluate_object */ acpi_evaluate_object_typed()
129 /* Return object type does not match requested type */ acpi_evaluate_object_typed()
169 * DESCRIPTION: Find and evaluate the given object, passing the given ACPI_EXPORT_SYMBOL()
203 * Get the actual namespace node for the target object. ACPI_EXPORT_SYMBOL()
267 /* Convert each external object in the list to an internal object */ ACPI_EXPORT_SYMBOL()
335 /* Convert each external object in the list to an internal object */ ACPI_EXPORT_SYMBOL()
353 /* Warn if arguments passed to an object that is not a method */ ACPI_EXPORT_SYMBOL()
357 "%u arguments were passed to a non-method ACPI object", ACPI_EXPORT_SYMBOL()
365 /* Now we can evaluate the object */ ACPI_EXPORT_SYMBOL()
371 * copy the return value to an external object. ACPI_EXPORT_SYMBOL()
380 * If we received a NS Node as a return object, this means that ACPI_EXPORT_SYMBOL()
381 * the object we are evaluating has nothing interesting to ACPI_EXPORT_SYMBOL()
398 /* Get the size of the returned object */ ACPI_EXPORT_SYMBOL()
423 /* We have enough space for the object, build it */ ACPI_EXPORT_SYMBOL()
437 * Delete the internal return object. NOTE: Interpreter must be ACPI_EXPORT_SYMBOL()
442 /* Remove one reference on the return object (should delete it) */ ACPI_EXPORT_SYMBOL()
471 * RETURN: Info->return_object is replaced with the dereferenced object
474 * internal return object is converted to an external union acpi_object.
511 node = info->return_object->reference.object; acpi_ns_resolve_references()
513 obj_desc = node->object; acpi_ns_resolve_references()
522 /* Replace the existing reference object */ acpi_ns_resolve_references()
541 * when an object of "Type" is found
543 * when an object of "Type" is found
552 * starting (and ending) at the object specified by start_handle.
553 * The callback function is called whenever an object that matches
763 * user_function - Called when a matching object is found
772 * starting (and ending) at the object specified by start_handle.
773 * The user_function is called whenever an object of type
H A Dexmisc.c57 * PARAMETERS: obj_desc - Create a reference to this object
63 * DESCRIPTION: Obtain and return a "reference" to the target object
94 /* The referenced object is the pseudo-node for the local/arg */ acpi_ex_get_object_reference()
96 referenced_obj = obj_desc->reference.object; acpi_ex_get_object_reference()
121 /* Create a new reference object */ acpi_ex_get_object_reference()
130 reference_obj->reference.object = referenced_obj; acpi_ex_get_object_reference()
145 * PARAMETERS: operand0 - First source object
146 * operand1 - Second source object
147 * actual_return_desc - Where to place the return object
200 /* Create a new buffer object for the result (with one end_tag) */ acpi_ex_concat_template()
230 * PARAMETERS: operand0 - First source object
231 * operand1 - Second source object
232 * actual_return_desc - Where to place the return object
257 * section of the ACPI specification.) Both object types are acpi_ex_do_concatenate()
281 ACPI_ERROR((AE_INFO, "Invalid object type: 0x%X", acpi_ex_do_concatenate()
291 * Both operands are now known to be the same object type acpi_ex_do_concatenate()
381 /* Invalid object type, should not happen here */ acpi_ex_do_concatenate()
383 ACPI_ERROR((AE_INFO, "Invalid object type: 0x%X", acpi_ex_do_concatenate()
581 * section of the ACPI 3.0+ specification.) Both object types are acpi_ex_do_logical_op()
655 * object fields. local_operand1 may have changed above. Use acpi_ex_do_logical_op()
723 /* New object was created if implicit conversion performed - delete */ acpi_ex_do_logical_op()
H A Ddbmethod.c133 * NOTE: only object supported is Number.
168 obj_desc = node->object; acpi_db_set_method_data()
183 /* Create and initialize the new object */ acpi_db_set_method_data()
187 acpi_os_printf("Could not create an internal object\n"); acpi_db_set_method_data()
191 /* Store the new object into the target */ acpi_db_set_method_data()
211 obj_desc = walk_state->arguments[index].object; acpi_db_set_method_data()
234 obj_desc = walk_state->local_variables[index].object; acpi_db_set_method_data()
312 obj_desc = method->object; acpi_db_disassemble_method()
H A Devmisc.c61 * RETURN: TRUE if notifies allowed on this object
63 * DESCRIPTION: Check type of node for a object that supports notifies.
90 * PARAMETERS: node - NS node for the notified object
112 /* Are Notifies allowed on this object? */ acpi_ev_queue_notify_request()
126 /* Get the notify object attached to the namespace Node */ acpi_ev_queue_notify_request()
131 /* We have an attached object, Get the correct handler list */ acpi_ev_queue_notify_request()
139 * for this object, just ignore the notify acpi_ev_queue_notify_request()
222 /* All done with the info object */ acpi_ev_notify_dispatch()
H A Dnsload.c242 /* Attempt to get the next object in this scope */ acpi_ns_delete_subtree()
249 /* Did we get a new object? */ acpi_ns_delete_subtree()
253 /* Check if this object has any children */ acpi_ns_delete_subtree()
259 * There is at least one child of this object, acpi_ns_delete_subtree()
260 * visit the object acpi_ns_delete_subtree()
268 * No more children in this object, go back up to acpi_ns_delete_subtree()
269 * the object's parent acpi_ns_delete_subtree()
285 /* Now delete the starting object, and we are done */ acpi_ns_delete_subtree()
H A Dnsxfobj.c58 * PARAMETERS: handle - Handle of object whose type is desired
111 * PARAMETERS: handle - Handle of object whose parent is desired ACPI_EXPORT_SYMBOL()
116 * DESCRIPTION: Returns a handle to the parent of the object represented by ACPI_EXPORT_SYMBOL()
172 * PARAMETERS: type - Type of object to be searched for ACPI_EXPORT_SYMBOL()
173 * parent - Parent object whose children we are getting ACPI_EXPORT_SYMBOL()
176 * ret_handle - Where handle to the next object is placed ACPI_EXPORT_SYMBOL()
180 * DESCRIPTION: Return the next peer object within the namespace. If Handle is ACPI_EXPORT_SYMBOL()
181 * valid, Scope is ignored. Otherwise, the first object within ACPI_EXPORT_SYMBOL()
H A Dpsscope.c55 * PARAMETERS: parser_state - Current parser state object
57 * RETURN: Pointer to an Op object
73 * PARAMETERS: parser_state - Current parser state object
95 * PARAMETERS: parser_state - Current parser state object
100 * DESCRIPTION: Allocate and init a new scope object
133 * PARAMETERS: parser_state - Current parser state object
186 * PARAMETERS: parser_state - Current parser state object
238 * PARAMETERS: parser_state - Current parser state object
H A Dpsutils.c58 * RETURN: A new Scope object, null on failure
80 * PARAMETERS: op - A newly allocated Op object
85 * DESCRIPTION: Initialize a parse (Op) object
136 /* Allocate the minimum required size object */ acpi_ps_alloc_op()
168 * DESCRIPTION: Free an Op object. Either put it on the GENERIC_OP cache list
193 * DESCRIPTION: Low level character and object functions
211 /* The "generic" object has no name associated with it */ acpi_ps_get_name()
228 /* The "generic" object has no name associated with it */ acpi_ps_set_name()
H A Ddswload2.c129 /* Map the opcode into an internal object type */ acpi_ds_load2_begin_op()
148 * The name_path is an object reference to an existing object. acpi_ds_load2_begin_op()
173 * The Path is an object reference to an existing object. acpi_ds_load2_begin_op()
352 * Put the Node in the "op" object that the parser uses, so we acpi_ds_load2_begin_op()
391 /* Check if opcode had an associated namespace object */ acpi_ds_load2_end_op()
412 * Put the Node on the object stack (Contains the ACPI Name of acpi_ds_load2_end_op()
413 * this object) acpi_ds_load2_end_op()
474 * Create the field object, but the field buffer and index must acpi_ds_load2_end_op()
641 * Note: We must create the method node/object pair as soon as we acpi_ds_load2_end_op()
716 /* We could put the returned object (Node) on the object stack for acpi_ds_load2_end_op()
717 * later, but for now, we will put it in the "op" object that the acpi_ds_load2_end_op()
/linux-4.4.14/mm/
H A Dkmemleak.c50 * Note that the kmemleak_object.use_count is incremented when an object is
58 * scan_mutex [-> object->lock] -> kmemleak_lock -> other_object->lock (SINGLE_DEPTH_NESTING)
60 * No kmemleak_lock and object->lock nesting is allowed outside scan_mutex
117 #define MSECS_MIN_AGE 5000 /* minimum object age for reporting */
143 * object->lock. Insertions or deletions from object_list, gray_list or
150 unsigned long flags; /* object status flags */
155 /* object usage count; object freed when use_count == 0 */
161 /* the total number of pointers found pointing to this object */
165 /* memory ranges to be scanned inside an object (empty for all) */
176 /* flag set after the first reporting of an unreference object */
178 /* flag set to not scan the object */
194 /* search tree for object boundaries */
236 * Early object allocation/freeing logging. Kmemleak is initialized after the
299 * with the object->lock held.
302 struct kmemleak_object *object) hex_dump_object()
304 const u8 *ptr = (const u8 *)object->pointer; hex_dump_object()
308 len = min_t(size_t, object->size, HEX_MAX_LINES * HEX_ROW_SIZE); hex_dump_object()
317 * - white - orphan object, not enough references to it (count < min_count)
322 * Newly created objects don't have any color assigned (object->count == -1)
325 static bool color_white(const struct kmemleak_object *object) color_white() argument
327 return object->count != KMEMLEAK_BLACK && color_white()
328 object->count < object->min_count; color_white()
331 static bool color_gray(const struct kmemleak_object *object) color_gray() argument
333 return object->min_count != KMEMLEAK_BLACK && color_gray()
334 object->count >= object->min_count; color_gray()
342 static bool unreferenced_object(struct kmemleak_object *object) unreferenced_object() argument
344 return (color_white(object) && object->flags & OBJECT_ALLOCATED) && unreferenced_object()
345 time_before_eq(object->jiffies + jiffies_min_age, unreferenced_object()
351 * print_unreferenced function must be called with the object->lock held.
354 struct kmemleak_object *object) print_unreferenced()
357 unsigned int msecs_age = jiffies_to_msecs(jiffies - object->jiffies); print_unreferenced()
359 seq_printf(seq, "unreferenced object 0x%08lx (size %zu):\n", print_unreferenced()
360 object->pointer, object->size); print_unreferenced()
362 object->comm, object->pid, object->jiffies, print_unreferenced()
364 hex_dump_object(seq, object); print_unreferenced()
367 for (i = 0; i < object->trace_len; i++) { print_unreferenced()
368 void *ptr = (void *)object->trace[i]; print_unreferenced()
376 * the object->lock held.
378 static void dump_object_info(struct kmemleak_object *object) dump_object_info() argument
382 trace.nr_entries = object->trace_len; dump_object_info()
383 trace.entries = object->trace; dump_object_info()
386 object->pointer, object->size); dump_object_info()
388 object->comm, object->pid, object->jiffies); dump_object_info()
389 pr_notice(" min_count = %d\n", object->min_count); dump_object_info()
390 pr_notice(" count = %d\n", object->count); dump_object_info()
391 pr_notice(" flags = 0x%lx\n", object->flags); dump_object_info()
392 pr_notice(" checksum = %u\n", object->checksum); dump_object_info()
398 * Look-up a memory block metadata (kmemleak_object) in the object search
408 struct kmemleak_object *object = lookup_object() local
410 if (ptr < object->pointer) lookup_object()
411 rb = object->rb_node.rb_left; lookup_object()
412 else if (object->pointer + object->size <= ptr) lookup_object()
413 rb = object->rb_node.rb_right; lookup_object()
414 else if (object->pointer == ptr || alias) lookup_object()
415 return object; lookup_object()
417 kmemleak_warn("Found object by alias at 0x%08lx\n", lookup_object()
419 dump_object_info(object); lookup_object()
427 * Increment the object use_count. Return 1 if successful or 0 otherwise. Note
428 * that once an object's use_count reached 0, the RCU freeing was already
429 * registered and the object should no longer be used. This function must be
432 static int get_object(struct kmemleak_object *object) get_object() argument
434 return atomic_inc_not_zero(&object->use_count); get_object()
444 struct kmemleak_object *object = free_object_rcu() local
449 * code accessing this object, hence no need for locking. free_object_rcu()
451 hlist_for_each_entry_safe(area, tmp, &object->area_list, node) { free_object_rcu()
455 kmem_cache_free(object_cache, object); free_object_rcu()
459 * Decrement the object use_count. Once the count is 0, free the object using
465 static void put_object(struct kmemleak_object *object) put_object() argument
467 if (!atomic_dec_and_test(&object->use_count)) put_object()
471 WARN_ON(object->flags & OBJECT_ALLOCATED); put_object()
473 call_rcu(&object->rcu, free_object_rcu); put_object()
477 * Look up an object in the object search tree and increase its use_count.
482 struct kmemleak_object *object; find_and_get_object() local
486 object = lookup_object(ptr, alias); find_and_get_object()
489 /* check whether the object is still available */ find_and_get_object()
490 if (object && !get_object(object)) find_and_get_object()
491 object = NULL; find_and_get_object()
494 return object; find_and_get_object()
498 * Look up an object in the object search tree and remove it from both
499 * object_tree_root and object_list. The returned object's use_count should be
505 struct kmemleak_object *object; find_and_remove_object() local
508 object = lookup_object(ptr, alias); find_and_remove_object()
509 if (object) { find_and_remove_object()
510 rb_erase(&object->rb_node, &object_tree_root); find_and_remove_object()
511 list_del_rcu(&object->object_list); find_and_remove_object()
515 return object; find_and_remove_object()
542 struct kmemleak_object *object, *parent; create_object() local
545 object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp)); create_object()
546 if (!object) { create_object()
552 INIT_LIST_HEAD(&object->object_list); create_object()
553 INIT_LIST_HEAD(&object->gray_list); create_object()
554 INIT_HLIST_HEAD(&object->area_list); create_object()
555 spin_lock_init(&object->lock); create_object()
556 atomic_set(&object->use_count, 1); create_object()
557 object->flags = OBJECT_ALLOCATED; create_object()
558 object->pointer = ptr; create_object()
559 object->size = size; create_object()
560 object->min_count = min_count; create_object()
561 object->count = 0; /* white color initially */ create_object()
562 object->jiffies = jiffies; create_object()
563 object->checksum = 0; create_object()
567 object->pid = 0; create_object()
568 strncpy(object->comm, "hardirq", sizeof(object->comm)); create_object()
570 object->pid = 0; create_object()
571 strncpy(object->comm, "softirq", sizeof(object->comm)); create_object()
573 object->pid = current->pid; create_object()
580 strncpy(object->comm, current->comm, sizeof(object->comm)); create_object()
584 object->trace_len = __save_stack_trace(object->trace); create_object()
600 kmemleak_stop("Cannot insert 0x%lx into the object " create_object()
608 kmem_cache_free(object_cache, object); create_object()
609 object = NULL; create_object()
613 rb_link_node(&object->rb_node, rb_parent, link); create_object()
614 rb_insert_color(&object->rb_node, &object_tree_root); create_object()
616 list_add_tail_rcu(&object->object_list, &object_list); create_object()
619 return object; create_object()
623 * Mark the object as not allocated and schedule RCU freeing via put_object().
625 static void __delete_object(struct kmemleak_object *object) __delete_object() argument
629 WARN_ON(!(object->flags & OBJECT_ALLOCATED)); __delete_object()
630 WARN_ON(atomic_read(&object->use_count) < 1); __delete_object()
636 spin_lock_irqsave(&object->lock, flags); __delete_object()
637 object->flags &= ~OBJECT_ALLOCATED; __delete_object()
638 spin_unlock_irqrestore(&object->lock, flags); __delete_object()
639 put_object(object); __delete_object()
648 struct kmemleak_object *object; delete_object_full() local
650 object = find_and_remove_object(ptr, 0); delete_object_full()
651 if (!object) { delete_object_full()
653 kmemleak_warn("Freeing unknown object at 0x%08lx\n", delete_object_full()
658 __delete_object(object); delete_object_full()
668 struct kmemleak_object *object; delete_object_part() local
671 object = find_and_remove_object(ptr, 1); delete_object_part()
672 if (!object) { delete_object_part()
674 kmemleak_warn("Partially freeing unknown object at 0x%08lx " delete_object_part()
687 start = object->pointer; delete_object_part()
688 end = object->pointer + object->size; delete_object_part()
690 create_object(start, ptr - start, object->min_count, delete_object_part()
693 create_object(ptr + size, end - ptr - size, object->min_count, delete_object_part()
696 __delete_object(object); delete_object_part()
699 static void __paint_it(struct kmemleak_object *object, int color) __paint_it() argument
701 object->min_count = color; __paint_it()
703 object->flags |= OBJECT_NO_SCAN; __paint_it()
706 static void paint_it(struct kmemleak_object *object, int color) paint_it() argument
710 spin_lock_irqsave(&object->lock, flags); paint_it()
711 __paint_it(object, color); paint_it()
712 spin_unlock_irqrestore(&object->lock, flags); paint_it()
717 struct kmemleak_object *object; paint_ptr() local
719 object = find_and_get_object(ptr, 0); paint_ptr()
720 if (!object) { paint_ptr()
721 kmemleak_warn("Trying to color unknown object " paint_ptr()
727 paint_it(object, color); paint_ptr()
728 put_object(object); paint_ptr()
732 * Mark an object permanently as gray-colored so that it can no longer be
741 * Mark the object as black-colored so that it is ignored from scans and
750 * Add a scanning area to the object. If at least one such area is added,
756 struct kmemleak_object *object; add_scan_area() local
759 object = find_and_get_object(ptr, 1); add_scan_area()
760 if (!object) { add_scan_area()
761 kmemleak_warn("Adding scan area to unknown object at 0x%08lx\n", add_scan_area()
772 spin_lock_irqsave(&object->lock, flags); add_scan_area()
774 size = object->pointer + object->size - ptr; add_scan_area()
775 } else if (ptr + size > object->pointer + object->size) { add_scan_area()
776 kmemleak_warn("Scan area larger than object 0x%08lx\n", ptr); add_scan_area()
777 dump_object_info(object); add_scan_area()
786 hlist_add_head(&area->node, &object->area_list); add_scan_area()
788 spin_unlock_irqrestore(&object->lock, flags); add_scan_area()
790 put_object(object); add_scan_area()
794 * Set the OBJECT_NO_SCAN flag for the object corresponding to the give
795 * pointer. Such object will not be scanned by kmemleak but references to it
801 struct kmemleak_object *object; object_no_scan() local
803 object = find_and_get_object(ptr, 0); object_no_scan()
804 if (!object) { object_no_scan()
805 kmemleak_warn("Not scanning unknown object at 0x%08lx\n", ptr); object_no_scan()
809 spin_lock_irqsave(&object->lock, flags); object_no_scan()
810 object->flags |= OBJECT_NO_SCAN; object_no_scan()
811 spin_unlock_irqrestore(&object->lock, flags); object_no_scan()
812 put_object(object); object_no_scan()
857 struct kmemleak_object *object; early_alloc() local
865 * RCU locking needed to ensure object is not freed via put_object(). early_alloc()
868 object = create_object((unsigned long)log->ptr, log->size, early_alloc()
870 if (!object) early_alloc()
872 spin_lock_irqsave(&object->lock, flags); early_alloc()
874 object->trace[i] = log->trace[i]; early_alloc()
875 object->trace_len = log->trace_len; early_alloc()
876 spin_unlock_irqrestore(&object->lock, flags); early_alloc()
896 * kmemleak_alloc - register a newly allocated object
897 * @ptr: pointer to beginning of the object
898 * @size: size of the object
899 * @min_count: minimum number of references to this object. If during memory
901 * the object is reported as a memory leak. If @min_count is 0,
902 * the object is never reported as a leak. If @min_count is -1,
903 * the object is ignored (not scanned and not reported as a leak)
906 * This function is called from the kernel allocators when a new object
922 * kmemleak_alloc_percpu - register a newly allocated __percpu object
923 * @ptr: __percpu pointer to beginning of the object
924 * @size: size of the object
927 * This function is called from the kernel percpu allocator when a new object
951 * kmemleak_free - unregister a previously registered object
952 * @ptr: pointer to beginning of the object
954 * This function is called from the kernel allocators when an object (memory
969 * kmemleak_free_part - partially unregister a previously registered object
970 * @ptr: pointer to the beginning or inside the object. This also
989 * kmemleak_free_percpu - unregister a previously registered __percpu object
990 * @ptr: __percpu pointer to beginning of the object
992 * This function is called from the kernel percpu allocator when an object
1011 * kmemleak_update_trace - update object allocation stack trace
1012 * @ptr: pointer to beginning of the object
1014 * Override the object allocation stack trace for cases where the actual
1019 struct kmemleak_object *object; kmemleak_update_trace() local
1027 object = find_and_get_object((unsigned long)ptr, 1); kmemleak_update_trace()
1028 if (!object) { kmemleak_update_trace()
1030 kmemleak_warn("Updating stack trace for unknown object at %p\n", kmemleak_update_trace()
1036 spin_lock_irqsave(&object->lock, flags); kmemleak_update_trace()
1037 object->trace_len = __save_stack_trace(object->trace); kmemleak_update_trace()
1038 spin_unlock_irqrestore(&object->lock, flags); kmemleak_update_trace()
1040 put_object(object); kmemleak_update_trace()
1045 * kmemleak_not_leak - mark an allocated object as false positive
1046 * @ptr: pointer to beginning of the object
1048 * Calling this function on an object will cause the memory block to no longer
1063 * kmemleak_ignore - ignore an allocated object
1064 * @ptr: pointer to beginning of the object
1066 * Calling this function on an object will cause the memory block to be
1083 * kmemleak_scan_area - limit the range to be scanned in an allocated object
1084 * @ptr: pointer to beginning or inside the object. This also
1089 * This function is used when it is known that only certain parts of an object
1105 * kmemleak_no_scan - do not scan an allocated object
1106 * @ptr: pointer to beginning of the object
1109 * in situations where it is known that the given object does not contain any
1125 * Update an object's checksum and return true if it was modified.
1127 static bool update_checksum(struct kmemleak_object *object) update_checksum() argument
1129 u32 old_csum = object->checksum; update_checksum()
1131 if (!kmemcheck_is_obj_initialized(object->pointer, object->size)) update_checksum()
1135 object->checksum = crc32(0, (void *)object->pointer, object->size); update_checksum()
1138 return object->checksum != old_csum; update_checksum()
1176 struct kmemleak_object *object; scan_block() local
1196 * object->use_count cannot be dropped to 0 while the object scan_block()
1200 object = lookup_object(pointer, 1); scan_block()
1201 if (!object) scan_block()
1203 if (object == scanned) scan_block()
1208 * Avoid the lockdep recursive warning on object->lock being scan_block()
1212 spin_lock_nested(&object->lock, SINGLE_DEPTH_NESTING); scan_block()
1213 if (!color_white(object)) { scan_block()
1215 spin_unlock(&object->lock); scan_block()
1220 * Increase the object's reference count (number of pointers scan_block()
1222 * minimum, the object's color will become gray and it will be scan_block()
1225 object->count++; scan_block()
1226 if (color_gray(object)) { scan_block()
1228 WARN_ON(!get_object(object)); scan_block()
1229 list_add_tail(&object->gray_list, &gray_list); scan_block()
1231 spin_unlock(&object->lock); scan_block()
1253 * that object->use_count >= 1.
1255 static void scan_object(struct kmemleak_object *object) scan_object() argument
1261 * Once the object->lock is acquired, the corresponding memory block scan_object()
1264 spin_lock_irqsave(&object->lock, flags); scan_object()
1265 if (object->flags & OBJECT_NO_SCAN) scan_object()
1267 if (!(object->flags & OBJECT_ALLOCATED)) scan_object()
1268 /* already freed object */ scan_object()
1270 if (hlist_empty(&object->area_list)) { scan_object()
1271 void *start = (void *)object->pointer; scan_object()
1272 void *end = (void *)(object->pointer + object->size); scan_object()
1277 scan_block(start, next, object); scan_object()
1283 spin_unlock_irqrestore(&object->lock, flags); scan_object()
1285 spin_lock_irqsave(&object->lock, flags); scan_object()
1286 } while (object->flags & OBJECT_ALLOCATED); scan_object()
1288 hlist_for_each_entry(area, &object->area_list, node) scan_object()
1291 object); scan_object()
1293 spin_unlock_irqrestore(&object->lock, flags); scan_object()
1302 struct kmemleak_object *object, *tmp; scan_gray_list() local
1309 object = list_entry(gray_list.next, typeof(*object), gray_list); scan_gray_list()
1310 while (&object->gray_list != &gray_list) { scan_gray_list()
1315 scan_object(object); scan_gray_list()
1317 tmp = list_entry(object->gray_list.next, typeof(*object), scan_gray_list()
1320 /* remove the object from the list and release it */ scan_gray_list()
1321 list_del(&object->gray_list); scan_gray_list()
1322 put_object(object); scan_gray_list()
1324 object = tmp; scan_gray_list()
1337 struct kmemleak_object *object; kmemleak_scan() local
1345 list_for_each_entry_rcu(object, &object_list, object_list) { kmemleak_scan()
1346 spin_lock_irqsave(&object->lock, flags); kmemleak_scan()
1350 * 1 reference to any object at this point. kmemleak_scan()
1352 if (atomic_read(&object->use_count) > 1) { kmemleak_scan()
1353 pr_debug("object->use_count = %d\n", kmemleak_scan()
1354 atomic_read(&object->use_count)); kmemleak_scan()
1355 dump_object_info(object); kmemleak_scan()
1358 /* reset the reference count (whiten the object) */ kmemleak_scan()
1359 object->count = 0; kmemleak_scan()
1360 if (color_gray(object) && get_object(object)) kmemleak_scan()
1361 list_add_tail(&object->gray_list, &gray_list); kmemleak_scan()
1363 spin_unlock_irqrestore(&object->lock, flags); kmemleak_scan()
1426 list_for_each_entry_rcu(object, &object_list, object_list) {
1427 spin_lock_irqsave(&object->lock, flags);
1428 if (color_white(object) && (object->flags & OBJECT_ALLOCATED)
1429 && update_checksum(object) && get_object(object)) {
1431 object->count = object->min_count;
1432 list_add_tail(&object->gray_list, &gray_list);
1434 spin_unlock_irqrestore(&object->lock, flags);
1453 list_for_each_entry_rcu(object, &object_list, object_list) {
1454 spin_lock_irqsave(&object->lock, flags);
1455 if (unreferenced_object(object) &&
1456 !(object->flags & OBJECT_REPORTED)) {
1457 object->flags |= OBJECT_REPORTED;
1460 spin_unlock_irqrestore(&object->lock, flags);
1537 * Iterate over the object_list and return the first valid object at or after
1543 struct kmemleak_object *object; kmemleak_seq_start() local
1552 list_for_each_entry_rcu(object, &object_list, object_list) { kmemleak_seq_start()
1555 if (get_object(object)) kmemleak_seq_start()
1558 object = NULL; kmemleak_seq_start()
1560 return object; kmemleak_seq_start()
1564 * Return the next object in the object_list. The function decrements the
1565 * use_count of the previous object and increases that of the next one.
1587 * Decrement the use_count of the last object required, if any.
1604 * Print the information for an unreferenced object to the seq file.
1608 struct kmemleak_object *object = v; kmemleak_seq_show() local
1611 spin_lock_irqsave(&object->lock, flags); kmemleak_seq_show()
1612 if ((object->flags & OBJECT_REPORTED) && unreferenced_object(object)) kmemleak_seq_show()
1613 print_unreferenced(seq, object); kmemleak_seq_show()
1614 spin_unlock_irqrestore(&object->lock, flags); kmemleak_seq_show()
1633 struct kmemleak_object *object; dump_str_object_info() local
1638 object = find_and_get_object(addr, 0); dump_str_object_info()
1639 if (!object) { dump_str_object_info()
1640 pr_info("Unknown object at 0x%08lx\n", addr); dump_str_object_info()
1644 spin_lock_irqsave(&object->lock, flags); dump_str_object_info()
1645 dump_object_info(object); dump_str_object_info()
1646 spin_unlock_irqrestore(&object->lock, flags); dump_str_object_info()
1648 put_object(object); dump_str_object_info()
1660 struct kmemleak_object *object; kmemleak_clear() local
1664 list_for_each_entry_rcu(object, &object_list, object_list) { kmemleak_clear()
1665 spin_lock_irqsave(&object->lock, flags); kmemleak_clear()
1666 if ((object->flags & OBJECT_REPORTED) && kmemleak_clear()
1667 unreferenced_object(object)) kmemleak_clear()
1668 __paint_it(object, KMEMLEAK_GREY); kmemleak_clear()
1669 spin_unlock_irqrestore(&object->lock, flags); kmemleak_clear()
1692 * dump=... - dump information about the object found at the given address
1772 struct kmemleak_object *object; __kmemleak_do_cleanup() local
1775 list_for_each_entry_rcu(object, &object_list, object_list) __kmemleak_do_cleanup()
1776 delete_object_full(object->pointer); __kmemleak_do_cleanup()
1791 * object freeing. Ordering of the scan thread stopping and the memory kmemleak_do_cleanup()
301 hex_dump_object(struct seq_file *seq, struct kmemleak_object *object) hex_dump_object() argument
353 print_unreferenced(struct seq_file *seq, struct kmemleak_object *object) print_unreferenced() argument
H A Dkmemcheck.c60 void kmemcheck_slab_alloc(struct kmem_cache *s, gfp_t gfpflags, void *object, kmemcheck_slab_alloc() argument
83 kmemcheck_mark_initialized(object, size); kmemcheck_slab_alloc()
89 kmemcheck_mark_uninitialized(object, size); kmemcheck_slab_alloc()
93 void kmemcheck_slab_free(struct kmem_cache *s, void *object, size_t size) kmemcheck_slab_free() argument
97 kmemcheck_mark_freed(object, size); kmemcheck_slab_free()
H A Dslub.c56 * A. page->freelist -> List of object free in a page
86 * operations no list for full slabs is used. If an object in a full slab is
178 #define __OBJECT_POISON 0x80000000UL /* Poison object */
229 struct page *page, const void *object) check_valid_pointer()
233 if (!object) check_valid_pointer()
237 if (object < base || object >= base + page->objects * s->size || check_valid_pointer()
238 (object - base) % s->size) { check_valid_pointer()
245 static inline void *get_freepointer(struct kmem_cache *s, void *object) get_freepointer() argument
247 return *(void **)(object + s->offset); get_freepointer()
250 static void prefetch_freepointer(const struct kmem_cache *s, void *object) prefetch_freepointer() argument
252 prefetch(object + s->offset); prefetch_freepointer()
255 static inline void *get_freepointer_safe(struct kmem_cache *s, void *object) get_freepointer_safe() argument
260 probe_kernel_read(&p, (void **)(object + s->offset), sizeof(p)); get_freepointer_safe()
262 p = get_freepointer(s, object); get_freepointer_safe()
267 static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp) set_freepointer() argument
269 *(void **)(object + s->offset) = fp; set_freepointer()
281 /* Determine object index from a given position */ slab_index()
291 * Debugging requires use of the padding between object slab_ksize()
445 * Determine a map of object in use on a page.
474 * slub is about to manipulate internal object metadata. This memory lies
475 * outside the range of the allocated object, so accessing it would normally
500 static struct track *get_track(struct kmem_cache *s, void *object, get_track() argument
506 p = object + s->offset + sizeof(void *); get_track()
508 p = object + s->inuse; get_track()
513 static void set_track(struct kmem_cache *s, void *object, set_track() argument
516 struct track *p = get_track(s, object, alloc); set_track()
547 static void init_tracking(struct kmem_cache *s, void *object) init_tracking() argument
552 set_track(s, object, TRACK_FREE, 0UL); init_tracking()
553 set_track(s, object, TRACK_ALLOC, 0UL); init_tracking()
575 static void print_tracking(struct kmem_cache *s, void *object) print_tracking() argument
580 print_track("Allocated", get_track(s, object, TRACK_ALLOC)); print_tracking()
581 print_track("Freed", get_track(s, object, TRACK_FREE)); print_tracking()
656 u8 *object, char *reason) object_err()
659 print_trailer(s, page, object); object_err()
676 static void init_object(struct kmem_cache *s, void *object, u8 val) init_object() argument
678 u8 *p = object; init_object()
697 u8 *object, char *what, check_bytes_and_report()
716 print_trailer(s, page, object); check_bytes_and_report()
725 * object address
726 * Bytes of the object to be managed.
727 * If the freepointer may overlay the object then the free
728 * pointer is the first word of the object.
733 * object + s->object_size
741 * object + s->inuse
744 * A. Free pointer (if we cannot overwrite object on free)
752 * object + s->size
765 /* Freepointer is placed after the object. */ check_pad_bytes()
814 void *object, u8 val) check_object()
816 u8 *p = object; check_object()
817 u8 *endobject = object + s->object_size; check_object()
820 if (!check_bytes_and_report(s, page, object, "Redzone", check_object()
847 * freepointer while object is allocated. check_object()
857 * another error because the object count is now wrong. check_object()
893 * Determine if a certain object on a page is on the freelist. Must hold the
900 void *object = NULL; on_freelist() local
908 if (object) { on_freelist()
909 object_err(s, page, object, on_freelist()
911 set_freepointer(s, object, NULL); on_freelist()
921 object = fp; on_freelist()
922 fp = get_freepointer(s, object); on_freelist()
937 slab_err(s, page, "Wrong object count. Counter is %d but " on_freelist()
945 static void trace(struct kmem_cache *s, struct page *page, void *object, trace() argument
952 object, page->inuse, trace()
956 print_section("Object ", (void *)object, trace()
1023 void *object) setup_object_debug()
1028 init_object(s, object, SLUB_RED_INACTIVE); setup_object_debug()
1029 init_tracking(s, object); setup_object_debug()
1034 void *object, unsigned long addr) alloc_debug_processing()
1039 if (!check_valid_pointer(s, page, object)) { alloc_debug_processing()
1040 object_err(s, page, object, "Freelist Pointer check fails"); alloc_debug_processing()
1044 if (!check_object(s, page, object, SLUB_RED_INACTIVE)) alloc_debug_processing()
1049 set_track(s, object, TRACK_ALLOC, addr); alloc_debug_processing()
1050 trace(s, page, object, 1); alloc_debug_processing()
1051 init_object(s, object, SLUB_RED_ACTIVE); alloc_debug_processing()
1075 void *object = head; free_debug_processing() local
1087 if (!check_valid_pointer(s, page, object)) { free_debug_processing()
1088 slab_err(s, page, "Invalid object pointer 0x%p", object); free_debug_processing()
1092 if (on_freelist(s, page, object)) { free_debug_processing()
1093 object_err(s, page, object, "Object already free"); free_debug_processing()
1097 if (!check_object(s, page, object, SLUB_RED_ACTIVE)) free_debug_processing()
1102 slab_err(s, page, "Attempt to free object(0x%p) " free_debug_processing()
1103 "outside of slab", object); free_debug_processing()
1105 pr_err("SLUB <none>: no slab for object 0x%p.\n", free_debug_processing()
1106 object); free_debug_processing()
1109 object_err(s, page, object, free_debug_processing()
1115 set_track(s, object, TRACK_FREE, addr); free_debug_processing()
1116 trace(s, page, object, 0); free_debug_processing()
1118 init_object(s, object, SLUB_RED_INACTIVE); free_debug_processing()
1121 if (object != tail) { free_debug_processing()
1122 object = get_freepointer(s, object); free_debug_processing()
1133 * until the object is actually freed free_debug_processing()
1140 slab_fix(s, "Object at 0x%p not freed", object); free_debug_processing()
1227 struct page *page, void *object) {}
1230 struct page *page, void *object, unsigned long addr) { return 0; }
1240 void *object, u8 val) { return 1; } add_full()
1302 void *object = p[i]; slab_post_alloc_hook() local
1304 kmemcheck_slab_alloc(s, flags, object, slab_ksize(s)); slab_post_alloc_hook()
1305 kmemleak_alloc_recursive(object, s->object_size, 1, slab_post_alloc_hook()
1307 kasan_slab_alloc(s, object); slab_post_alloc_hook()
1350 void *object = head; slab_free_freelist_hook() local
1354 slab_free_hook(s, object); slab_free_freelist_hook()
1355 } while ((object != tail_obj) && slab_free_freelist_hook()
1356 (object = get_freepointer(s, object))); slab_free_freelist_hook()
1361 void *object) setup_object()
1363 setup_object_debug(s, page, object); setup_object()
1365 kasan_unpoison_object_data(s, object); setup_object()
1366 s->ctor(object); setup_object()
1367 kasan_poison_object_data(s, object); setup_object()
1663 void *object = NULL; get_partial_node() local
1683 t = acquire_slab(s, n, page, object == NULL, &objects); get_partial_node()
1688 if (!object) { get_partial_node()
1691 object = t; get_partial_node()
1702 return object; get_partial_node()
1716 void *object; get_any_partial() local
1751 object = get_partial_node(s, n, c, flags); for_each_zone_zonelist()
1752 if (object) { for_each_zone_zonelist()
1760 return object; for_each_zone_zonelist()
1775 void *object; get_partial() local
1783 object = get_partial_node(s, get_node(s, searchnode), c, flags); get_partial()
1784 if (object || node != NUMA_NO_NODE) get_partial()
1785 return object; get_partial()
2233 pr_warn(" cache: %s, object size: %d, buffer size: %d, default order: %d, min order: %d\n", slab_out_of_memory()
2341 * first element of the freelist as the object to allocate now and move the
2480 * Otherwise we can simply pick the next object from the lockless free list.
2485 void *object; slab_alloc_node() local
2511 * Irqless object alloc/free algorithm used here depends on sequence slab_alloc_node()
2513 * on c to guarantee that object and page associated with previous tid slab_alloc_node()
2514 * won't be used with current tid. If we fetch tid first, object and slab_alloc_node()
2527 object = c->freelist; slab_alloc_node()
2529 if (unlikely(!object || !node_match(page, node))) { slab_alloc_node()
2530 object = __slab_alloc(s, gfpflags, node, addr, c); slab_alloc_node()
2533 void *next_object = get_freepointer_safe(s, object); slab_alloc_node()
2551 object, tid, slab_alloc_node()
2561 if (unlikely(gfpflags & __GFP_ZERO) && object) slab_alloc_node()
2562 memset(object, 0, s->object_size); slab_alloc_node()
2564 slab_post_alloc_hook(s, gfpflags, 1, &object); slab_alloc_node()
2566 return object; slab_alloc_node()
2843 void *object; build_detached_freelist() local
2849 object = p[--size]; build_detached_freelist()
2850 } while (!object && size); build_detached_freelist()
2852 if (!object) build_detached_freelist()
2856 df->s = cache_from_obj(s, object); build_detached_freelist()
2859 set_freepointer(df->s, object, NULL); build_detached_freelist()
2860 df->page = virt_to_head_page(object); build_detached_freelist()
2861 df->tail = object; build_detached_freelist()
2862 df->freelist = object; build_detached_freelist()
2863 p[size] = NULL; /* mark object processed */ build_detached_freelist()
2867 object = p[--size]; build_detached_freelist()
2868 if (!object) build_detached_freelist()
2872 if (df->page == virt_to_head_page(object)) { build_detached_freelist()
2874 set_freepointer(df->s, object, df->freelist); build_detached_freelist()
2875 df->freelist = object; build_detached_freelist()
2877 p[size] = NULL; /* mark object processed */ build_detached_freelist()
2931 void *object = c->freelist; kmem_cache_alloc_bulk() local
2933 if (unlikely(!object)) { kmem_cache_alloc_bulk()
2946 c->freelist = get_freepointer(s, object); kmem_cache_alloc_bulk()
2947 p[i] = object; kmem_cache_alloc_bulk()
2974 * offset 0. If we tune the size of the object to the alignment then we can
2975 * get the required alignment by putting one properly sized object after
2996 * Calculate the order of allocation given an slab object size.
3016 * slab and thereby reduce object handling overhead. If the user has
3018 * the smallest order which will fit the object.
3079 * lets see if we can place a single object there. calculate_order()
3221 * a slab object.
3230 * Round up object size to the next word boundary. We can only calculate_sizes()
3238 * Determine if we can poison the object itself. If the user of calculate_sizes()
3239 * the slab may touch the object after free or before allocation calculate_sizes()
3240 * then we should never poison the object itself. calculate_sizes()
3251 * end of the object and the free pointer. If not then add an calculate_sizes()
3260 * by the object. This is the potential offset to the free pointer. calculate_sizes()
3267 * Relocate free pointer after the object if it is not calculate_sizes()
3268 * permitted to overwrite the first word of the object on calculate_sizes()
3282 * the object. calculate_sizes()
3292 * of the object. calculate_sizes()
3298 * SLUB stores one object immediately after another beginning from calculate_sizes()
3300 * each object to conform to the alignment. calculate_sizes()
3364 * The larger the object size is, the more pages we want on the partial kmem_cache_open()
3374 * object freed. If they are used for allocation then they can be kmem_cache_open()
3588 static size_t __ksize(const void *object) __ksize() argument
3592 if (unlikely(object == ZERO_SIZE_PTR)) __ksize()
3595 page = virt_to_head_page(object); __ksize()
3605 size_t ksize(const void *object) ksize() argument
3607 size_t size = __ksize(object); ksize()
3610 kasan_krealloc(object, size); ksize()
3618 void *object = (void *)x; kfree() local
3632 slab_free(page->slab_cache, page, object, NULL, 1, _RET_IP_); kfree()
3945 * Adjust the object sizes so that we clear __kmem_cache_alias()
3946 * the complete object on kzalloc. __kmem_cache_alias()
4423 pr_err("If allocated object is overwritten then not detectable\n\n"); resiliency_test()
4431 pr_err("If allocated object is overwritten then not detectable\n\n"); resiliency_test()
4465 SL_TOTAL /* Determine object capacity not slabs */ resiliency_test()
228 check_valid_pointer(struct kmem_cache *s, struct page *page, const void *object) check_valid_pointer() argument
655 object_err(struct kmem_cache *s, struct page *page, u8 *object, char *reason) object_err() argument
696 check_bytes_and_report(struct kmem_cache *s, struct page *page, u8 *object, char *what, u8 *start, unsigned int value, unsigned int bytes) check_bytes_and_report() argument
813 check_object(struct kmem_cache *s, struct page *page, void *object, u8 val) check_object() argument
1022 setup_object_debug(struct kmem_cache *s, struct page *page, void *object) setup_object_debug() argument
1032 alloc_debug_processing(struct kmem_cache *s, struct page *page, void *object, unsigned long addr) alloc_debug_processing() argument
1226 setup_object_debug(struct kmem_cache *s, struct page *page, void *object) setup_object_debug() argument
1229 alloc_debug_processing(struct kmem_cache *s, struct page *page, void *object, unsigned long addr) alloc_debug_processing() argument
1239 check_object(struct kmem_cache *s, struct page *page, void *object, u8 val) check_object() argument
1360 setup_object(struct kmem_cache *s, struct page *page, void *object) setup_object() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/nvif/
H A Dobject.c25 #include <nvif/object.h>
31 nvif_object_ioctl(struct nvif_object *object, void *data, u32 size, void **hack) nvif_object_ioctl() argument
33 struct nvif_client *client = object->client; nvif_object_ioctl()
39 if (object != &client->object) nvif_object_ioctl()
40 args->v0.object = nvif_handle(object); nvif_object_ioctl()
42 args->v0.object = 0; nvif_object_ioctl()
47 return client->driver->ioctl(client->object.priv, client->super, nvif_object_ioctl()
59 nvif_object_sclass_get(struct nvif_object *object, struct nvif_sclass **psclass) nvif_object_sclass_get() argument
77 ret = nvif_object_ioctl(object, args, size, NULL); nvif_object_sclass_get()
103 nvif_object_rd(struct nvif_object *object, int size, u64 addr) nvif_object_rd() argument
113 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_rd()
122 nvif_object_wr(struct nvif_object *object, int size, u64 addr, u32 data) nvif_object_wr() argument
133 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_wr()
140 nvif_object_mthd(struct nvif_object *object, u32 mthd, void *data, u32 size) nvif_object_mthd() argument
161 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); nvif_object_mthd()
169 nvif_object_unmap(struct nvif_object *object) nvif_object_unmap() argument
171 if (object->map.size) { nvif_object_unmap()
172 struct nvif_client *client = object->client; nvif_object_unmap()
180 if (object->map.ptr) { nvif_object_unmap()
181 client->driver->unmap(client, object->map.ptr, nvif_object_unmap()
182 object->map.size); nvif_object_unmap()
183 object->map.ptr = NULL; nvif_object_unmap()
186 nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_unmap()
187 object->map.size = 0; nvif_object_unmap()
192 nvif_object_map(struct nvif_object *object) nvif_object_map() argument
194 struct nvif_client *client = object->client; nvif_object_map()
201 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_map()
203 object->map.size = args.map.length; nvif_object_map()
204 object->map.ptr = client->driver->map(client, args.map.handle, nvif_object_map()
205 object->map.size); nvif_object_map()
206 if (ret = -ENOMEM, object->map.ptr) nvif_object_map()
208 nvif_object_unmap(object); nvif_object_map()
214 nvif_object_fini(struct nvif_object *object) nvif_object_fini() argument
223 if (!object->client) nvif_object_fini()
226 nvif_object_unmap(object); nvif_object_fini()
227 nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_fini()
228 object->client = NULL; nvif_object_fini()
233 void *data, u32 size, struct nvif_object *object) nvif_object_init()
241 object->client = NULL; nvif_object_init()
242 object->handle = handle; nvif_object_init()
243 object->oclass = oclass; nvif_object_init()
244 object->map.ptr = NULL; nvif_object_init()
245 object->map.size = 0; nvif_object_init()
249 nvif_object_fini(object); nvif_object_init()
257 args->new.token = nvif_handle(object); nvif_object_init()
258 args->new.object = nvif_handle(object); nvif_object_init()
264 &object->priv); nvif_object_init()
268 object->client = parent->client; nvif_object_init()
272 nvif_object_fini(object); nvif_object_init()
232 nvif_object_init(struct nvif_object *parent, u32 handle, s32 oclass, void *data, u32 size, struct nvif_object *object) nvif_object_init() argument
H A Dnotify.c28 #include <nvif/object.h>
35 struct nvif_object *object = notify->object; nvif_notify_put_() local
47 return nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_notify_put_()
53 if (likely(notify->object) && nvif_notify_put()
66 struct nvif_object *object = notify->object; nvif_notify_get_() local
78 return nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_notify_get_()
84 if (likely(notify->object) && nvif_notify_get()
127 struct nvif_client *client = notify->object->client; nvif_notify()
147 struct nvif_object *object = notify->object; nvif_notify_fini() local
156 if (ret >= 0 && object) { nvif_notify_fini()
157 ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_notify_fini()
159 notify->object = NULL; nvif_notify_fini()
167 nvif_notify_init(struct nvif_object *object, int (*func)(struct nvif_notify *), nvif_notify_init() argument
178 notify->object = object; nvif_notify_init()
204 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); nvif_notify_init()
H A Dclient.c32 return client->driver->ioctl(client->object.priv, client->super, data, size, NULL); nvif_client_ioctl()
38 return client->driver->suspend(client->object.priv); nvif_client_suspend()
44 return client->driver->resume(client->object.priv); nvif_client_resume()
51 client->driver->fini(client->object.priv); nvif_client_fini()
53 client->object.client = NULL; nvif_client_fini()
54 nvif_object_fini(&client->object); nvif_client_fini()
80 ret = nvif_object_init(NULL, 0, 0, NULL, 0, &client->object); nvif_client_init()
84 client->object.client = client; nvif_client_init()
85 client->object.handle = ~0; nvif_client_init()
92 &client->object.priv); nvif_client_init()
H A Ddevice.c31 int ret = nvif_object_mthd(&device->object, NV_DEVICE_V0_TIME, nvif_device_time()
40 nvif_object_fini(&device->object); nvif_device_fini()
48 &device->object); nvif_device_init()
51 ret = nvif_object_mthd(&device->object, NV_DEVICE_V0_INFO, nvif_device_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
H A Dchan.c41 struct nvkm_fifo_chan_object *object = nvkm_fifo_chan_child_fini() local
42 container_of(base, typeof(*object), oproxy); nvkm_fifo_chan_child_fini()
43 struct nvkm_engine *engine = object->oproxy.object->engine; nvkm_fifo_chan_child_fini()
44 struct nvkm_fifo_chan *chan = object->chan; nvkm_fifo_chan_child_fini()
55 nvif_error(&chan->object, nvkm_fifo_chan_child_fini()
61 if (engn->object) { nvkm_fifo_chan_child_fini()
62 ret = nvkm_object_fini(engn->object, suspend); nvkm_fifo_chan_child_fini()
67 nvif_trace(&chan->object, "detached %s\n", name); nvkm_fifo_chan_child_fini()
74 struct nvkm_fifo_chan_object *object = nvkm_fifo_chan_child_init() local
75 container_of(base, typeof(*object), oproxy); nvkm_fifo_chan_child_init()
76 struct nvkm_engine *engine = object->oproxy.object->engine; nvkm_fifo_chan_child_init()
77 struct nvkm_fifo_chan *chan = object->chan; nvkm_fifo_chan_child_init()
85 if (engn->object) { nvkm_fifo_chan_child_init()
86 ret = nvkm_object_init(engn->object); nvkm_fifo_chan_child_init()
94 nvif_error(&chan->object, nvkm_fifo_chan_child_init()
100 nvif_trace(&chan->object, "attached %s\n", name); nvkm_fifo_chan_child_init()
107 struct nvkm_fifo_chan_object *object = nvkm_fifo_chan_child_del() local
108 container_of(base, typeof(*object), oproxy); nvkm_fifo_chan_child_del()
109 struct nvkm_engine *engine = object->oproxy.base.engine; nvkm_fifo_chan_child_del()
110 struct nvkm_fifo_chan *chan = object->chan; nvkm_fifo_chan_child_del()
114 chan->func->object_dtor(chan, object->hash); nvkm_fifo_chan_child_del()
119 nvkm_object_del(&engn->object); nvkm_fifo_chan_child_del()
139 struct nvkm_fifo_chan_object *object; nvkm_fifo_chan_child_new() local
142 if (!(object = kzalloc(sizeof(*object), GFP_KERNEL))) nvkm_fifo_chan_child_new()
144 nvkm_oproxy_ctor(&nvkm_fifo_chan_child_func, oclass, &object->oproxy); nvkm_fifo_chan_child_new()
145 object->chan = chan; nvkm_fifo_chan_child_new()
146 *pobject = &object->oproxy.base; nvkm_fifo_chan_child_new()
159 &engn->object); nvkm_fifo_chan_child_new()
163 NULL, 0, &engn->object); nvkm_fifo_chan_child_new()
170 engn->object); nvkm_fifo_chan_child_new()
180 .object = oclass->object, nvkm_fifo_chan_child_new()
182 .parent = engn->object ? nvkm_fifo_chan_child_new()
183 engn->object : nvkm_fifo_chan_child_new()
186 }, data, size, &object->oproxy.object); nvkm_fifo_chan_child_new()
191 object->hash = nvkm_fifo_chan_child_new()
192 chan->func->object_ctor(chan, object->oproxy.object); nvkm_fifo_chan_child_new()
193 if (object->hash < 0) nvkm_fifo_chan_child_new()
194 return object->hash; nvkm_fifo_chan_child_new()
201 nvkm_fifo_chan_child_get(struct nvkm_object *object, int index, nvkm_fifo_chan_child_get() argument
204 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_child_get()
246 nvkm_fifo_chan_ntfy(struct nvkm_object *object, u32 type, nvkm_fifo_chan_ntfy() argument
249 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_ntfy()
256 nvkm_fifo_chan_map(struct nvkm_object *object, u64 *addr, u32 *size) nvkm_fifo_chan_map() argument
258 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_map()
265 nvkm_fifo_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data) nvkm_fifo_chan_rd32() argument
267 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_rd32()
280 nvkm_fifo_chan_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_fifo_chan_wr32() argument
282 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_wr32()
295 nvkm_fifo_chan_fini(struct nvkm_object *object, bool suspend) nvkm_fifo_chan_fini() argument
297 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_fini()
303 nvkm_fifo_chan_init(struct nvkm_object *object) nvkm_fifo_chan_init() argument
305 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_init()
311 nvkm_fifo_chan_dtor(struct nvkm_object *object) nvkm_fifo_chan_dtor() argument
313 struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object); nvkm_fifo_chan_dtor()
361 nvkm_object_ctor(&nvkm_fifo_chan_func, oclass, &chan->object); nvkm_fifo_chan_ctor()
378 ret = nvkm_object_bind(&dmaobj->object, chan->inst, -16, nvkm_fifo_chan_ctor()
/linux-4.4.14/arch/powerpc/boot/
H A Dwrapper51 # directory for object and other files used by this script
52 object=arch/powerpc/boot
53 objbin=$object
121 object="$1"
144 if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then
145 dts="$object/dts/$dts"
165 platformo=$object/"$platform".o
166 lds=$object/zImage.lds
177 platformo="$object/of.o $object/epapr.o"
181 platformo="$object/pseries-head.o $object/of.o $object/epapr.o"
190 platformo="$object/of.o $object/epapr.o"
195 platformo="$object/of.o $object/epapr.o"
199 platformo="$object/crt0.o $object/of.o $object/epapr.o"
200 lds=$object/zImage.coff.lds
218 platformo=$object/cuboot-8xx.o
221 platformo=$object/cuboot-52xx.o
224 platformo=$object/cuboot-pq2.o
227 platformo=$object/cuboot-824x.o
230 platformo=$object/cuboot-83xx.o
233 platformo=$object/cuboot-85xx-cpm2.o
236 platformo=$object/cuboot-85xx.o
244 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o"
245 lds=$object/zImage.ps3.lds
256 platformo="$object/fixed-head.o $object/$platform.o"
260 platformo="$object/fixed-head.o $object/redboot-8xx.o"
264 platformo="$object/virtex405-head.o $object/simpleboot.o $object/virtex.o"
268 platformo="$object/fixed-head.o $object/simpleboot.o $object/virtex.o"
272 platformo="$object/fixed-head.o $object/simpleboot.o"
276 platformo="$object/fixed-head.o $object/redboot-83xx.o"
281 platformo=$object/cuboot-85xx.o
285 platformo="$object/$platform-head.o $object/$platform.o"
294 platformo="$object/treeboot-iss4xx.o"
297 platformo="$object/pseries-head.o $object/epapr.o $object/epapr-wrapper.o"
302 platformo="$object/fixed-head.o $object/mvme5100.o"
395 addsec $tmp "$vmz" $ksection $object/empty.o
416 $platformo $tmp $object/wrapper.a
/linux-4.4.14/include/linux/
H A Dfscache-cache.h62 struct fscache_object *fsdef; /* object for the fsdef index */
71 * operation to be applied to a cache object
91 struct list_head pend_link; /* link in object->pending_ops */
92 struct fscache_object *object; /* object to be operated upon */ member in struct:fscache_operation
100 #define FSCACHE_OP_DEC_READ_CNT 6 /* decrement object->n_reads on destruction */
207 * - defer writes until cache object lookup completion
221 /* allocate an object record for a cookie */
225 /* look up the object for a cookie
228 int (*lookup_object)(struct fscache_object *object);
231 void (*lookup_complete)(struct fscache_object *object);
233 /* increment the usage count on this object (may fail if unmounting) */
234 struct fscache_object *(*grab_object)(struct fscache_object *object);
236 /* pin an object in the cache */
237 int (*pin_object)(struct fscache_object *object);
239 /* unpin an object in the cache */
240 void (*unpin_object)(struct fscache_object *object);
246 /* store the updated auxiliary data on an object */
247 void (*update_object)(struct fscache_object *object);
249 /* Invalidate an object */
252 /* discard the resources pinned by an object and effect retirement if
254 void (*drop_object)(struct fscache_object *object);
256 /* dispose of a reference to an object */
257 void (*put_object)(struct fscache_object *object);
262 /* notification that the attributes of a non-index object (such as
264 int (*attr_changed)(struct fscache_object *object);
266 /* reserve space for an object's data and associated metadata */
267 int (*reserve_space)(struct fscache_object *object, loff_t i_size);
292 void (*uncache_page)(struct fscache_object *object,
305 FSCACHE_OBJECT_EV_NEW_CHILD, /* T if object has a new child */
306 FSCACHE_OBJECT_EV_PARENT_READY, /* T if object's parent is ready */
307 FSCACHE_OBJECT_EV_UPDATE, /* T if object should be updated */
308 FSCACHE_OBJECT_EV_INVALIDATE, /* T if cache requested object invalidation */
311 FSCACHE_OBJECT_EV_KILL, /* T if netfs relinquished or cache withdrew object */
318 * States for object state machine.
328 const struct fscache_state *(*work)(struct fscache_object *object,
341 int n_ops; /* number of extant ops on object */
342 int n_obj_ops; /* number of object ops outstanding on object */
349 unsigned long oob_event_mask; /* OOB events this object is interested in */
350 unsigned long event_mask; /* events this object is interested in */
351 unsigned long events; /* events to be processed by this object
355 #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */
356 #define FSCACHE_OBJECT_PENDING_WRITE 1 /* T if object has pending write */
357 #define FSCACHE_OBJECT_WAITING 2 /* T if object is waiting on its parent */
358 #define FSCACHE_OBJECT_IS_LIVE 3 /* T if object is not withdrawn or relinquished */
359 #define FSCACHE_OBJECT_IS_LOOKED_UP 4 /* T if object has been looked up */
360 #define FSCACHE_OBJECT_IS_AVAILABLE 5 /* T if object has become active */
361 #define FSCACHE_OBJECT_RETIRED 6 /* T if object was retired on relinquishment */
362 #define FSCACHE_OBJECT_KILLED_BY_CACHE 7 /* T if object was killed by the cache */
366 struct fscache_cache *cache; /* cache that supplied this object */
367 struct fscache_cookie *cookie; /* netfs's file/index object */
368 struct fscache_object *parent; /* parent object */
372 struct list_head pending_ops; /* unstarted operations on this object */
374 struct rb_node objlist_link; /* link in global object list */
384 extern void fscache_object_lookup_negative(struct fscache_object *object);
385 extern void fscache_obtained_object(struct fscache_object *object);
387 static inline bool fscache_object_is_live(struct fscache_object *object) fscache_object_is_live() argument
389 return test_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); fscache_object_is_live()
392 static inline bool fscache_object_is_dying(struct fscache_object *object) fscache_object_is_dying() argument
394 return !fscache_object_is_live(object); fscache_object_is_dying()
397 static inline bool fscache_object_is_available(struct fscache_object *object) fscache_object_is_available() argument
399 return test_bit(FSCACHE_OBJECT_IS_AVAILABLE, &object->flags); fscache_object_is_available()
402 static inline bool fscache_cache_is_broken(struct fscache_object *object) fscache_cache_is_broken() argument
404 return test_bit(FSCACHE_IOERROR, &object->cache->flags); fscache_cache_is_broken()
407 static inline bool fscache_object_is_active(struct fscache_object *object) fscache_object_is_active() argument
409 return fscache_object_is_available(object) && fscache_object_is_active()
410 fscache_object_is_live(object) && fscache_object_is_active()
411 !fscache_cache_is_broken(object); fscache_object_is_active()
415 * fscache_object_destroyed - Note destruction of an object in a cache
416 * @cache: The cache from which the object came
418 * Note the destruction and deallocation of an object record in a cache.
427 * fscache_object_lookup_error - Note an object encountered an error
428 * @object: The object on which the error was encountered
430 * Note that an object encountered a fatal error (usually an I/O error) and
433 static inline void fscache_object_lookup_error(struct fscache_object *object) fscache_object_lookup_error() argument
435 set_bit(FSCACHE_OBJECT_EV_ERROR, &object->events); fscache_object_lookup_error()
439 * fscache_set_store_limit - Set the maximum size to be stored in an object
440 * @object: The object to set the maximum on
443 * Set the maximum size an object is permitted to reach, implying the highest
450 void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) fscache_set_store_limit() argument
452 object->store_limit_l = i_size; fscache_set_store_limit()
453 object->store_limit = i_size >> PAGE_SHIFT; fscache_set_store_limit()
455 object->store_limit++; fscache_set_store_limit()
479 * fscache_use_cookie - Request usage of cookie attached to an object
480 * @object: Object description
482 * Request usage of the cookie attached to an object. NULL is returned if the
485 static inline bool fscache_use_cookie(struct fscache_object *object) fscache_use_cookie() argument
487 struct fscache_cookie *cookie = object->cookie; fscache_use_cookie()
502 * fscache_unuse_cookie - Cease usage of cookie attached to an object
503 * @object: Object description
505 * Cease usage of the cookie attached to an object. When the users count
508 static inline void fscache_unuse_cookie(struct fscache_object *object) fscache_unuse_cookie() argument
510 struct fscache_cookie *cookie = object->cookie; fscache_unuse_cookie()
538 extern enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
542 extern void fscache_object_retrying_stale(struct fscache_object *object);
550 extern void fscache_object_mark_killed(struct fscache_object *object,
H A Dkasan.h50 void kasan_unpoison_object_data(struct kmem_cache *cache, void *object);
51 void kasan_poison_object_data(struct kmem_cache *cache, void *object);
56 void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size);
57 void kasan_krealloc(const void *object, size_t new_size);
59 void kasan_slab_alloc(struct kmem_cache *s, void *object);
60 void kasan_slab_free(struct kmem_cache *s, void *object);
77 void *object) {} kasan_poison_object_data()
79 void *object) {}
84 static inline void kasan_kmalloc(struct kmem_cache *s, const void *object, kasan_kmalloc() argument
86 static inline void kasan_krealloc(const void *object, size_t new_size) {} kasan_krealloc() argument
88 static inline void kasan_slab_alloc(struct kmem_cache *s, void *object) {} kasan_slab_free() argument
89 static inline void kasan_slab_free(struct kmem_cache *s, void *object) {} kasan_slab_free() argument
76 kasan_unpoison_object_data(struct kmem_cache *cache, void *object) kasan_unpoison_object_data() argument
78 kasan_poison_object_data(struct kmem_cache *cache, void *object) kasan_poison_object_data() argument
H A Dassoc_array.h38 /* Method to get a piece of an object's index key */
39 unsigned long (*get_object_key_chunk)(const void *object, int level);
41 /* Is this the object we're looking for? */
42 bool (*compare_object)(const void *object, const void *index_key);
44 /* How different is an object from an index key, to a bit position in
47 int (*diff_objects)(const void *object, const void *index_key);
49 /* Method to free an object. */
50 void (*free_object)(void *object);
65 int (*iterator)(const void *object,
76 void *object);
78 void *object);
88 bool (*iterator)(void *object, void *iterator_data),
H A Dkref.h28 * kref_init - initialize object.
29 * @kref: object in question.
37 * kref_get - increment refcount for object.
38 * @kref: object.
50 * kref_sub - subtract a number of refcounts for object.
51 * @kref: object.
53 * @release: pointer to the function that will clean up the object when the
54 * last reference to the object is released.
62 * Return 1 if the object was removed, otherwise return 0. Beware, if this
80 * kref_put - decrement refcount for object.
81 * @kref: object.
82 * @release: pointer to the function that will clean up the object when the
83 * last reference to the object is released.
91 * Return 1 if the object was removed, otherwise return 0. Beware, if this
119 * kref_get_unless_zero - Increment refcount for object unless it is zero.
120 * @kref: object.
126 * removed from that lookup structure in the object destructor.
H A Ddebugobjects.h20 * struct debug_obj - representaion of an tracked object
21 * @node: hlist node to link the object into the tracker list
22 * @state: tracked object state
24 * @object: pointer to the real object
25 * @descr: pointer to an object type specific debug description structure
31 void *object; member in struct:debug_obj
36 * struct debug_obj_descr - object type specific debug description structure
38 * @name: name of the object typee
40 * kernel symbol, to allow identify the object
H A Dslub_def.h5 * SLUB : A Slab allocator without object queues.
18 FREE_REMOVE_PARTIAL, /* Freeing removes last object */
41 void **freelist; /* Pointer to next available object */
67 int size; /* The size of an object including meta data */
68 int object_size; /* The size of an object without meta data */
115 * virt_to_obj - returns address of the beginning of object.
116 * @s: object's kmem_cache
118 * @x: address within object memory range
120 * Returns address of the beginning of object
130 u8 *object, char *reason);
H A Dfwnode.h2 * fwnode.h - Firmware device node object handle type definition.
H A Dcpu_rmap.h20 * @refcount: kref for object
23 * @obj: Pointer to array of object pointers
24 * @near: For each CPU, the index and distance to the nearest object,
H A Dfscache.h117 /* consult the netfs about the state of an object
152 * - this is mandatory for any object that may have data
170 * data file or index object cookie
182 struct hlist_head backing_objects; /* object(s) backing this file/index */
192 #define FSCACHE_COOKIE_NO_DATA_YET 1 /* T if new object with no cached data yet */
326 * fscache_acquire_cookie - Acquire a cookie to represent a cache object
328 * @def: A description of the cache object, including callback operations
330 * represent the cache object to the netfs
358 * @retire: True if the cache object the cookie represents is to be discarded
361 * associated cache object if retire is set to true.
375 * @cookie: The cookie representing the cache object
393 * fscache_update_cookie - Request that a cache object be updated
394 * @cookie: The cookie representing the cache object
396 * Request an update of the index data for the cache object associated with the
410 * fscache_pin_cookie - Pin a data-storage cache object in its cache
411 * @cookie: The cookie representing the cache object
425 * fscache_pin_cookie - Unpin a data-storage cache object in its cache
426 * @cookie: The cookie representing the cache object
439 * fscache_attr_changed - Notify cache that an object's attributes changed
440 * @cookie: The cookie representing the cache object
442 * Send a notification to the cache indicating that an object's attributes have
459 * fscache_invalidate - Notify cache that an object needs invalidation
460 * @cookie: The cookie representing the cache object
462 * Notify the cache that an object is needs to be invalidated and that it
463 * should abort any retrievals or stores it is doing on the cache. The object
480 * @cookie: The cookie representing the cache object
482 * Wait for the invalidation of an object to complete.
495 * fscache_reserve_space - Reserve data space for a cached object
496 * @cookie: The cookie representing the cache object
499 * Reserve an amount of space in the cache for the cache object attached to a
500 * cookie so that a write to that object within the space can always be
515 * @cookie: The cookie representing the cache object
525 * If the page is not backed by the cache object, or if it there's some reason
558 * @cookie: The cookie representing the cache object
570 * If some pages are not backed by the cache object, or if it there's some
609 * @cookie: The cookie representing the cache object
638 * @cookie: The cookie representing the inode's cache object.
658 * @cookie: The cookie representing the cache object
687 * @cookie: The cookie representing the cache object
709 * @cookie: The cookie representing the cache object
728 * @cookie: The cookie representing the cache object
747 * @cookie: The cookie representing the cache object
772 * @cookie: The cookie representing the inode's cache object.
791 * @cookie: The cookie representing the cache object
792 * @invalidate: Invalidate the backing object
800 * If @invalidate is set, then the backing object will be invalidated and
812 * @cookie: The cookie representing the cache object
818 * made to immediately reattach the cookie to a backing object.
H A Dslab_def.h66 * fields and/or padding to every object. size contains the total
67 * object size including these internal fields, the following two
68 * variables contain the offset to the user object and its size.
H A Dhashtable.h50 * hash_add - add an object to a hashtable
52 * @node: the &struct hlist_node of the object to be added
53 * @key: the key of the object to be added
59 * hash_add_rcu - add an object to a rcu enabled hashtable
61 * @node: the &struct hlist_node of the object to be added
62 * @key: the key of the object to be added
68 * hash_hashed - check whether an object is in any hashtable
69 * @node: the &struct hlist_node of the object to be checked
97 * hash_del - remove an object from a hashtable
98 * @node: &struct hlist_node of the object to remove
106 * hash_del_rcu - remove an object from a rcu enabled hashtable
107 * @node: &struct hlist_node of the object to remove
H A Dexportfs.h42 * 64 bit object ID, 64 bit root object ID,
48 * 64 bit object ID, 64 bit root object ID,
50 * 64 bit parent object ID, 32 bit parent generation.
55 * 64 bit object ID, 64 bit root object ID,
57 * 64 bit parent object ID, 32 bit parent generation,
58 * 64 bit parent root object ID.
128 * @fh_to_dentry: find the implied object and get a dentry for it
129 * @fh_to_parent: find the implied object's parent and get a dentry for it
H A Dlivepatch.h52 * duplicate symbol names in the vmlinux object. If this
86 * struct klp_object - kernel object structure for live patching
89 * @funcs: function entries for functions to be patched in the object
91 * @mod: kernel module associated with the patched object
93 * @state: tracks object-level patch application state
110 * @objs: object entries for kernel objects to be patched
H A Dkmemcheck.h13 void kmemcheck_slab_alloc(struct kmem_cache *s, gfp_t gfpflags, void *object,
15 void kmemcheck_slab_free(struct kmem_cache *s, void *object, size_t size);
103 kmemcheck_slab_alloc(struct kmem_cache *s, gfp_t gfpflags, void *object, kmemcheck_slab_alloc() argument
108 static inline void kmemcheck_slab_free(struct kmem_cache *s, void *object, kmemcheck_slab_free() argument
H A Delf-fdpic.h40 #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */
41 #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */
H A Dkobject_ns.h1 /* Kernel object name space definitions
13 * interface, ESPECIALLY the parts about reference counts and object
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvif/
H A Dclient.h4 #include <nvif/object.h>
7 struct nvif_object object; member in struct:nvif_client
26 (struct nvkm_client *)_client->object.priv; \
H A Ddevice.h4 #include <nvif/object.h>
8 struct nvif_object object; member in struct:nvif_device
53 struct nvkm_object object; \
55 } *_udevice = _device->object.priv; \
H A Dioctl.h30 __u64 object; member in struct:nvif_ioctl_v0
56 __u64 object; member in struct:nvif_ioctl_new_v0
H A Dobject.h36 #define nvif_object(a) (a)->object
70 #include <core/object.h>
/linux-4.4.14/include/drm/ttm/
H A Dttm_object.h32 * Base- and reference object implementation for the various
50 * Describes what type of reference a ref object holds.
52 * TTM_REF_USAGE is a simple refcount on a base object.
55 * buffer object.
58 * buffer object.
72 * One entry per ttm object type.
96 * @hash: hash entry for the per-device object hash.
97 * @type: derived type this object is base class for.
98 * @shareable: Other ttm_object_files can access this object.
101 * NULL if the object was not created by a user request.
102 * (kernel object).
104 * @refcount: Number of references to this object, not
105 * including the hash entry. A reference to a base object can
106 * only be held by a ref object.
109 * no more references to this object. This function should
110 * destroy the object (or make sure destruction eventually happens),
111 * and when it is called, the object has
115 * @ref_obj_release: A function to be called when a reference object
139 * struct ttm_prime_object - Modified base object that is prime-aware
143 * @size: Size of the dma_buf associated with this object
144 * @real_type: Type of the underlying object. Needed since we're setting
147 * object.
148 * @refcount_release: The underlying object's release method. Needed since
166 * @shareable: This object is shareable with other applcations.
168 * @type: The object type.
206 * caller doesn't yet have a reference to the base object.
217 * Decrements the base object refcount and clears the pointer pointed to by
228 * @base: The base object to reference.
230 * @existed: Upon completion, indicates that an identical reference object
231 * already existed, and the refcount was upped on that object instead.
233 * Checks that the base object is shareable and adds a ref object to it.
235 * Adding a ref object to a base object is basically like referencing the
236 * base object, but a user-space application holds the reference. When the
238 * deleted. A reference object can have different types depending on what
239 * it's intended for. It can be refcounting to prevent object destruction,
240 * When user-space takes a lock, it can add a ref object to that lock to
241 * make sure the lock is released if the application dies. A ref object
242 * will hold a single reference on a base object.
254 * @key: Key representing the base object.
255 * @ref_type: Ref type of the ref object to be dereferenced.
257 * Unreference a ref object with type @ref_type
258 * on the base object identified by @key. If there are no duplicate
259 * references, the ref object will be destroyed and the base object
282 * @p_tfile: Pointer to pointer to the ttm_object_file object to release.
311 * @p_tdev: Pointer to pointer to the ttm_object_device object to release.
H A Dttm_bo_api.h51 * @fpfn: first valid page frame number to put the object
52 * @lpfn: last valid page frame number to put the object
53 * @flags: memory domain and caching flags for the object
55 * Structure indicating a possible place to put an object.
71 * Structure indicating the placement you request for an object.
91 * Structure indicating the bus placement of an object.
115 * buffer object.
154 * @bdev: Pointer to the buffer object device structure.
158 * @acc_size: Accounted size for this object.
159 * @kref: Reference count of this buffer object. When this refcount reaches
160 * zero, the object is put on the delayed delete list.
161 * @list_kref: List reference count of this buffer object. This member is
162 * used to avoid destruction while the buffer object is still on a list.
165 * the object is destroyed.
169 * holds a pointer to a persistent shmem object.
171 * @evicted: Whether the object was evicted without user-space knowing.
176 * @priv_flags: Flags describing buffer object internal state.
183 * Base class for TTM buffer object, that deals with data placement and CPU
191 * The destroy member, the API visibility of this object makes it possible
291 * @bo: The buffer object.
293 * Returns a refcounted pointer to a buffer object.
306 * @bo: The buffer object.
322 * @bo: The buffer object.
323 * @placement: Proposed placement for the buffer object.
327 * Changes placement and caching policy of the buffer object
343 * @bo: The buffer object.
345 * Unreference and clear a pointer to a buffer object.
353 * @bo: The buffer object.
357 * Release @count lru list references to this buffer object.
365 * @bo: The buffer object.
377 * @bo: The buffer object.
379 * Remove this bo from all lru lists used to lookup and reserve an object.
407 * @bo: The buffer object:
410 * Synchronizes a buffer object for CPU RW access. This means
424 * @bo : The buffer object.
434 * @bo_size: size of the buffer object in byte.
435 * @struct_size: size of the structure holding buffer object datas
437 * Returns size to account for a buffer object
451 * @size: Requested size of buffer object.
452 * @type: Requested type of buffer object.
459 * holds a pointer to a persistent shmem object. Typically, this would
460 * point to the shmem object backing a GEM object if TTM is used to back a
462 * @acc_size: Accounted size for this object.
467 * As this object may be part of a larger structure, this function,
470 * On successful return, the object kref and list_kref are set to 1.
498 * @size: Requested size of buffer object.
499 * @type: Requested type of buffer object.
506 * holds a pointer to a persistent shmem object. Typically, this would
507 * point to the shmem object backing a GEM object if TTM is used to back a
509 * @p_bo: On successful completion *p_bo points to the created object.
512 * on that object. The destroy function is set to kfree().
603 * Returns the virtual address of a buffer object area mapped by ttm_bo_kmap.
618 * @bo: The buffer object.
624 * data in the buffer object. The ttm_kmap_obj_virtual function can then be
646 * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object.
H A Dttm_memory.h94 * ttm_mem_init_shrink - initialize a struct ttm_mem_shrink object
96 * @shrink: The object to initialize.
107 * ttm_mem_register_shrink - register a struct ttm_mem_shrink object.
109 * @glob: The struct ttm_mem_global object to register with.
110 * @shrink: An initialized struct ttm_mem_shrink object to register.
130 * ttm_mem_unregister_shrink - unregister a struct ttm_mem_shrink object.
132 * @glob: The struct ttm_mem_global object to unregister from.
133 * @shrink: A previously registert struct ttm_mem_shrink object.
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Doproxy.h4 #include <core/object.h>
9 struct nvkm_object *object; member in struct:nvkm_oproxy
H A Dgpuobj.h3 #include <core/object.h>
13 struct nvkm_object object; member in struct:nvkm_gpuobj
H A Dclient.h3 #include <core/object.h>
6 struct nvkm_object object; member in struct:nvkm_client
24 struct nvkm_object *nvkm_client_search(struct nvkm_client *, u64 object);
/linux-4.4.14/drivers/gpu/drm/
H A Ddrm_global.c38 void *object; member in struct:drm_global_item
51 item->object = NULL; drm_global_init()
61 BUG_ON(item->object != NULL); drm_global_release()
73 item->object = kzalloc(ref->size, GFP_KERNEL); drm_global_item_ref()
74 if (unlikely(item->object == NULL)) { drm_global_item_ref()
79 ref->object = item->object; drm_global_item_ref()
86 ref->object = item->object; drm_global_item_ref()
91 item->object = NULL; drm_global_item_ref()
102 BUG_ON(ref->object != item->object); drm_global_item_unref()
105 item->object = NULL; drm_global_item_unref()
H A Ddrm_gem_cma_helper.c44 * __drm_gem_cma_create - Create a GEM CMA object without allocating memory
46 * @size: size of the object to allocate
48 * This function creates and initializes a GEM CMA object of the given size,
49 * but doesn't allocate any memory to back the object.
86 * drm_gem_cma_create - allocate an object with the given size
88 * @size: size of the object to allocate
90 * This function creates a CMA GEM object and allocates a contiguous chunk of
128 * drm_gem_cma_create_with_handle - allocate an object with the given size and
132 * @size: size of the object to allocate
135 * This function creates a CMA GEM object, allocating a physically contiguous
136 * chunk of memory as backing store. The GEM object is then added to the list
137 * of object associated with the given file and a handle to it is returned.
178 * drm_gem_cma_free_object - free resources associated with a CMA GEM object
179 * @gem_obj: GEM object to free
181 * This function frees the backing memory of the CMA GEM object, cleans up the
182 * GEM object state and frees the memory used to store the object itself.
206 * drm_gem_cma_dumb_create_internal - create a dumb buffer object
239 * drm_gem_cma_dumb_create - create a dumb buffer object
273 * object
274 * @file_priv: DRM file-private structure containing the GEM object
276 * @handle: GEM object handle
279 * This function look up an object by its handle and returns the fake mmap
294 dev_err(drm->dev, "failed to lookup GEM object\n"); drm_gem_cma_dumb_map_offset()
335 * drm_gem_cma_mmap - memory-map a CMA GEM object
336 * @filp: file object
341 * immediately faults in the entire object instead of using on-demaind
368 * drm_gem_cma_describe - describe a CMA GEM object for debugfs
369 * @cma_obj: CMA GEM object
373 * CMA GEM object into a synthetic file.
394 * pages for a CMA GEM object
395 * @obj: GEM object
428 * drm_gem_cma_prime_import_sg_table - produce a CMA GEM object from another
441 * A pointer to a newly created GEM object or an ERR_PTR-encoded negative
469 * drm_gem_cma_prime_mmap - memory-map an exported CMA GEM object
470 * @obj: GEM object
496 * drm_gem_cma_prime_vmap - map a CMA GEM object into the kernel's virtual
498 * @obj: GEM object
507 * The kernel virtual address of the CMA GEM object's backing store.
518 * drm_gem_cma_prime_vunmap - unmap a CMA GEM object from the kernel's virtual
520 * @obj: GEM object
521 * @vaddr: kernel virtual address where the CMA GEM object was mapped
H A Ddrm_gem.c57 * The goal was to have swap-backed object allocation managed through
125 * drm_gem_object_init - initialize an allocated shmem-backed GEM object
126 * @dev: drm_device the object should be initialized for
128 * @size: object size
130 * Initialize an already allocated GEM object of the specified size with
140 filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); drm_gem_object_init()
151 * drm_gem_private_object_init - initialize an allocated private GEM object
152 * @dev: drm_device the object should be initialized for
154 * @size: object size
156 * Initialize an already allocated GEM object of the specified size with
158 * backing the object and handling it.
192 * @obj: GEM object to clean up.
194 * Called after the last handle to the object has been closed
196 * Removes any name for the object. Note that this must be
204 /* Remove any name for this object */ drm_gem_object_handle_free()
228 * ref, in which case the object would disappear before we drm_gem_object_handle_unreference_unlocked()
258 * So, we have to grab a lock around finding the object and then drm_gem_handle_delete()
267 /* Check if we currently have a reference on the object */ drm_gem_handle_delete()
311 * @obj: object to register
316 * importing an object from either an flink name or a dma-buf.
365 * drm_gem_handle_create - create a gem handle for an object
367 * @obj: object to register
370 * Create a handle for this object. This adds a handle reference
371 * to the object, which includes a regular reference count. Callers
372 * will likely want to dereference the object afterwards.
386 * drm_gem_free_mmap_offset - release a fake mmap offset for an object
401 * drm_gem_create_mmap_offset_size - create a fake mmap offset for an object
407 * up the object based on the offset and sets up the various memory mapping
425 * drm_gem_create_mmap_offset - create a fake mmap offset for an object
430 * up the object based on the offset and sets up the various memory mapping
442 * drm_gem_get_pages - helper to allocate backing pages for a GEM object
447 * object. An array of pages is returned. If a page is not allocated or
449 * whole object is covered by the page-array and pinned in memory.
468 /* This is the shared memory object that backs the GEM resource */ drm_gem_get_pages()
510 * drm_gem_put_pages - helper to free backing pages for a GEM object
544 /** Returns a reference to the object named by the handle. */
553 /* Check if we currently have a reference on the object */ drm_gem_object_lookup()
574 * Releases the handle to an mm object.
597 * Create a global name for an object, returning the name.
599 * Note that the name does not hold a reference; when the object
649 * Open an object using the global name, returning a handle and the size.
651 * This handle (of course) holds a reference to the object, so the object
755 * drm_gem_object_free - free a GEM object
756 * @kref: kref of the object to free
758 * Called after the last reference to the object has been lost.
761 * Frees the object
794 * drm_gem_mmap_obj - memory map a GEM object
795 * @obj: the GEM object to map
796 * @obj_size: the object size to be mapped, in bytes
799 * Set up the VMA to prepare mapping of the GEM object using the gem_vm_ops
802 * the object will be trapped, to perform migration, GTT binding, surface
807 * the GEM object is not looked up based on its fake offset. To implement the
814 * Return 0 or success or -EINVAL if the object size is smaller than the VMA
834 /* Take a ref for this mapping of the object, so that the fault drm_gem_mmap_obj()
835 * handler can dereference the mmap offset's pointer to the object. drm_gem_mmap_obj()
851 * If a driver supports GEM object mapping, mmap calls on the DRM file
854 * Look up the GEM object based on the offset passed in (vma->vm_pgoff will
856 * the object) and map it with a call to drm_gem_mmap_obj().
858 * If the caller is not granted access to the buffer object, the mmap will fail
879 * When the object is being freed, after it hits 0-refcnt it drm_gem_mmap()
880 * proceeds to tear down the object. In the process it will drm_gem_mmap()
882 * mgr->vm_lock. Therefore if we find an object with a 0-refcnt drm_gem_mmap()
885 * so we have to check for the 0-refcnted object and treat it as drm_gem_mmap()
H A Ddrm_prime.c40 * object. It takes this reference in handle_to_fd_ioctl, when it
41 * first calls .prime_export and stores the exporting GEM object in
43 * object goes away in the driver .release function.
45 * On the import the importing GEM object holds a reference to the
46 * dma_buf (which in turn holds a ref to the exporting GEM object).
49 * attachment in the GEM object. When this attachment is destroyed
50 * when the imported object is destroyed, we remove the attachment
57 * then it will get a fd->handle request for a GEM object that it created.
58 * Drivers should detect this situation and return back the gem object
316 * - @gem_prime_pin (optional): prepare a GEM object for exporting
328 * - @gem_prime_import_sg_table (import): produce a GEM object from another
335 * @obj: GEM object to export
400 * drivers to ensure correct lifetime management of the underlying GEM object.
401 * The actual exporting from GEM object to a dma-buf is done through the
427 /* re-export the original imported object */ drm_gem_prime_handle_to_fd()
494 * @dma_buf: dma-buf object to import
559 * @handle: pointer to storage for the handle of the imported buffer object
562 * drivers to ensure correct lifetime management of the underlying GEM object.
563 * The actual importing of GEM object from the dma-buf is done through the
618 /* hmm, if driver attached, we are relying on the free-object path drm_gem_prime_fd_to_handle()
674 * This helper creates an sg table object from a set of pages
745 * drm_prime_gem_destroy - helper to clean up a PRIME-imported GEM object
746 * @obj: GEM object which was created from a dma-buf
H A Ddrm_vma_manager.c44 * Drivers shouldn't use this for object placement in VMEM. This manager should
47 * We use drm_mm as backend to manage object allocations. But it is highly
57 * in number of pages, not number of bytes. That means, object sizes and offsets
72 * @mgr: Manager object
96 * @mgr: Manager object
98 * Destroy an object manager which was previously created via
116 * @mgr: Manager object
117 * @start: Start address for object (page-based)
118 * @pages: Size of object (page-based)
120 * Find a node given a start address and object size. This returns the _best_
202 * @mgr: Manager object
207 * nothing and return 0. @pages is the size of the object given in number of
216 * @pages is not required to be the same size as the underlying memory object
250 * @mgr: Manager object
/linux-4.4.14/samples/bpf/
H A Dfds_example.c33 printf(" -F <file> File to pin/get object\n"); usage()
34 printf(" -P |- pin object\n"); usage()
35 printf(" -G `- get object\n"); usage()
40 printf(" -o <object> `- object file\n"); usage()
50 static int bpf_prog_create(const char *object) bpf_prog_create() argument
57 if (object) { bpf_prog_create()
58 assert(!load_bpf_file((char *)object)); bpf_prog_create()
100 static int bpf_do_prog(const char *file, uint32_t flags, const char *object) bpf_do_prog() argument
105 fd = bpf_prog_create(object); bpf_do_prog()
131 const char *file = NULL, *object = NULL; main() local
164 object = optarg; main()
178 return bpf_do_prog(file, flags, object); main()
/linux-4.4.14/tools/perf/util/
H A Denvironment.c2 * We put all the perf config variables in this same object
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/
H A Dnv31.h20 #define nv31_mpeg_chan(p) container_of((p), struct nv31_mpeg_chan, object)
23 struct nvkm_object object; member in struct:nv31_mpeg_chan
H A Dnv44.c41 #define nv44_mpeg_chan(p) container_of((p), struct nv44_mpeg_chan, object)
44 struct nvkm_object object; member in struct:nv44_mpeg_chan
52 nv44_mpeg_chan_bind(struct nvkm_object *object, struct nvkm_gpuobj *parent, nv44_mpeg_chan_bind() argument
55 struct nv44_mpeg_chan *chan = nv44_mpeg_chan(object); nv44_mpeg_chan_bind()
56 int ret = nvkm_gpuobj_new(chan->object.engine->subdev.device, 264 * 4, nv44_mpeg_chan_bind()
68 nv44_mpeg_chan_fini(struct nvkm_object *object, bool suspend) nv44_mpeg_chan_fini() argument
71 struct nv44_mpeg_chan *chan = nv44_mpeg_chan(object); nv44_mpeg_chan_fini()
84 nv44_mpeg_chan_dtor(struct nvkm_object *object) nv44_mpeg_chan_dtor() argument
86 struct nv44_mpeg_chan *chan = nv44_mpeg_chan(object); nv44_mpeg_chan_dtor()
113 nvkm_object_ctor(&nv44_mpeg_chan, oclass, &chan->object); nv44_mpeg_chan_new()
116 *pobject = &chan->object; nv44_mpeg_chan_new()
168 /* happens on initial binding of the object */ nv44_mpeg_intr()
186 chan ? chan->object.client->name : "unknown", nv44_mpeg_intr()
H A Dnv31.c35 * MPEG object classes
39 nv31_mpeg_object_bind(struct nvkm_object *object, struct nvkm_gpuobj *parent, nv31_mpeg_object_bind() argument
42 int ret = nvkm_gpuobj_new(object->engine->subdev.device, 16, align, nv31_mpeg_object_bind()
46 nvkm_wo32(*pgpuobj, 0x00, object->oclass); nv31_mpeg_object_bind()
65 nv31_mpeg_chan_dtor(struct nvkm_object *object) nv31_mpeg_chan_dtor() argument
67 struct nv31_mpeg_chan *chan = nv31_mpeg_chan(object); nv31_mpeg_chan_dtor()
95 nvkm_object_ctor(&nv31_mpeg_chan, oclass, &chan->object); nv31_mpeg_chan_new()
98 *pobject = &chan->object; nv31_mpeg_chan_new()
194 /* happens on initial binding of the object */ nv31_mpeg_intr()
212 mpeg->chan ? mpeg->chan->object.client->name : nv31_mpeg_intr()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/sw/
H A Dchan.h3 #define nvkm_sw_chan(p) container_of((p), struct nvkm_sw_chan, object)
9 struct nvkm_object object; member in struct:nvkm_sw_chan
H A Dnvsw.h3 #define nvkm_nvsw(p) container_of((p), struct nvkm_nvsw, object)
7 struct nvkm_object object; member in struct:nvkm_nvsw
H A Dnvsw.c30 nvkm_nvsw_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_nvsw_mthd_() argument
32 struct nvkm_nvsw *nvsw = nvkm_nvsw(object); nvkm_nvsw_mthd_()
39 nvkm_nvsw_ntfy_(struct nvkm_object *object, u32 mthd, nvkm_nvsw_ntfy_() argument
42 struct nvkm_nvsw *nvsw = nvkm_nvsw(object); nvkm_nvsw_ntfy_()
68 *pobject = &nvsw->object; nvkm_nvsw_new_()
70 nvkm_object_ctor(&nvkm_nvsw_, oclass, &nvsw->object); nvkm_nvsw_new_()
H A Dchan.c50 nvkm_sw_chan_event_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_sw_chan_event_ctor() argument
73 nvkm_sw_chan_dtor(struct nvkm_object *object) nvkm_sw_chan_dtor() argument
75 struct nvkm_sw_chan *chan = nvkm_sw_chan(object); nvkm_sw_chan_dtor()
102 nvkm_object_ctor(&nvkm_sw_chan, oclass, &chan->object); nvkm_sw_chan_ctor()
/linux-4.4.14/include/net/caif/
H A Dcfcnfg.h37 * cfcnfg_create() - Get the CAIF configuration object given network.
38 * @net: Network for the CAIF configuration object.
43 * cfcnfg_create() - Create the CAIF configuration object.
48 * cfcnfg_remove() - Remove the CFCNFG object
49 * @cfg: config object
55 * @cnfg: Pointer to a CAIF configuration object, created by
75 * @cnfg: Pointer to a CAIF configuration object, created by
83 * @cnfg: Configuration object
/linux-4.4.14/drivers/staging/fsl-mc/include/
H A Dmc.h25 * struct fsl_mc_driver - MC object device driver object
34 * Generic DPAA device driver object for device drivers that are registered
52 * struct fsl_mc_device_match_id - MC object device Id entry for driver matching
54 * @obj_type: MC object type
55 * @ver_major: MC object version major number
56 * @ver_minor: MC object version minor number
58 * Type of entries in the "device Id" table for MC object devices supported by
59 * a MC object device driver. The last entry of the table has vendor set to 0x0
72 * pools of an fsl_mc_bus object.
107 * Bit masks for a MC object device (struct fsl_mc_device) flags
117 * struct fsl_mc_device - MC object device object
118 * @dev: Linux driver model device object
120 * @flags: MC object device flags
122 * @mc_handle: MC handle for the corresponding MC object opened
123 * @mc_io: Pointer to MC IO object assigned to this device or
127 * @resource: generic resource associated with this MC object device, if any.
129 * Generic device object for MC object devices that are "attached" to a
133 * - For a non-DPRC object its icid is the same as its parent DPRC's icid.
135 * called for an MC object device, but before the device-specific probe
142 * corresponding resource pool in the object's parent DPRC, using the
145 * fsl_mc_device's 'resource' points to the associated resource object.
H A Dmc-sys.h46 * Bit masks for a MC I/O object (struct fsl_mc_io) flags
54 * struct fsl_mc_io - MC I/O object to be passed-in to mc_send_command()
55 * @dev: device associated with this Mc I/O object
65 * portal, if the fsl_mc_io object was created with the
67 * fsl_mc_io object must be made only from non-atomic context.
72 * portal, if the fsl_mc_io object was created with the
74 * fsl_mc_io object can be made from atomic or non-atomic context.
/linux-4.4.14/drivers/staging/fsl-mc/bus/
H A Ddpmcp.c38 * dpmcp_open() - Open a control session for the specified object.
39 * @mc_io: Pointer to MC portal's I/O object
45 * already created object; an object may have been declared in
48 * associated with the specific object ID and the specific MC
50 * this specific object
79 * dpmcp_close() - Close the control session of the object
80 * @mc_io: Pointer to MC portal's I/O object
82 * @token: Token of DPMCP object
85 * allowed on the object without opening a new control session.
104 * dpmcp_create() - Create the DPMCP object.
105 * @mc_io: Pointer to MC portal's I/O object
110 * Create the DPMCP object, allocate required resources and
113 * The object can be created either by declaring it in the
116 * associated with the specific object ID and the specific MC
118 * this specific object. For objects that are created using the
149 * dpmcp_destroy() - Destroy the DPMCP object and release all its resources.
150 * @mc_io: Pointer to MC portal's I/O object
152 * @token: Token of DPMCP object
171 * dpmcp_reset() - Reset the DPMCP, returns the object to initial state.
172 * @mc_io: Pointer to MC portal's I/O object
174 * @token: Token of DPMCP object
194 * @mc_io: Pointer to MC portal's I/O object
196 * @token: Token of DPMCP object
224 * @mc_io: Pointer to MC portal's I/O object
226 * @token: Token of DPMCP object
264 * @mc_io: Pointer to MC portal's I/O object
266 * @token: Token of DPMCP object
297 * @mc_io: Pointer to MC portal's I/O object
299 * @token: Token of DPMCP object
331 * @mc_io: Pointer to MC portal's I/O object
333 * @token: Token of DPMCP object
365 * @mc_io: Pointer to MC portal's I/O object
367 * @token: Token of DPMCP object
403 * @mc_io: Pointer to MC portal's I/O object
405 * @token: Token of DPMCP object
440 * @mc_io: Pointer to MC portal's I/O object
442 * @token: Token of DPMCP object
471 * @mc_io: Pointer to MC portal's I/O object
473 * @token: Token of DPMCP object
474 * @attr: Returned object's attributes
H A Ddpbp.c38 * dpbp_open() - Open a control session for the specified object.
39 * @mc_io: Pointer to MC portal's I/O object
45 * already created object; an object may have been declared in
48 * associated with the specific object ID and the specific MC
50 * this specific object
80 * dpbp_close() - Close the control session of the object
81 * @mc_io: Pointer to MC portal's I/O object
83 * @token: Token of DPBP object
86 * allowed on the object without opening a new control session.
106 * dpbp_create() - Create the DPBP object.
107 * @mc_io: Pointer to MC portal's I/O object
112 * Create the DPBP object, allocate required resources and
115 * The object can be created either by declaring it in the
118 * associated with the specific object ID and the specific MC
120 * this specific object. For objects that are created using the
152 * dpbp_destroy() - Destroy the DPBP object and release all its resources.
153 * @mc_io: Pointer to MC portal's I/O object
155 * @token: Token of DPBP object
175 * @mc_io: Pointer to MC portal's I/O object
177 * @token: Token of DPBP object
198 * @mc_io: Pointer to MC portal's I/O object
200 * @token: Token of DPBP object
221 * @mc_io: Pointer to MC portal's I/O object
223 * @token: Token of DPBP object
224 * @en: Returns '1' if object is enabled; '0' otherwise
251 * dpbp_reset() - Reset the DPBP, returns the object to initial state.
252 * @mc_io: Pointer to MC portal's I/O object
254 * @token: Token of DPBP object
274 * @mc_io: Pointer to MC portal's I/O object
276 * @token: Token of DPBP object
304 * @mc_io: Pointer to MC portal's I/O object
306 * @token: Token of DPBP object
344 * @mc_io: Pointer to MC portal's I/O object
346 * @token: Token of DPBP object
377 * @mc_io: Pointer to MC portal's I/O object
379 * @token: Token of DPBP object
411 * @mc_io: Pointer to MC portal's I/O object
413 * @token: Token of DPBP object
445 * @mc_io: Pointer to MC portal's I/O object
447 * @token: Token of DPBP object
483 * @mc_io: Pointer to MC portal's I/O object
485 * @token: Token of DPBP object
520 * @mc_io: Pointer to MC portal's I/O object
522 * @token: Token of DPBP object
551 * @mc_io: Pointer to MC portal's I/O object
553 * @token: Token of DPBP object
554 * @attr: Returned object's attributes
H A Ddprc.c38 * dprc_open() - Open DPRC object for use
39 * @mc_io: Pointer to MC portal's I/O object
42 * @token: Returned token of DPRC object
46 * @warning Required before any operation on the object.
74 * dprc_close() - Close the control session of the object
75 * @mc_io: Pointer to MC portal's I/O object
77 * @token: Token of DPRC object
80 * allowed on the object without opening a new control session.
101 * @mc_io: Pointer to MC portal's I/O object
103 * @token: Token of DPRC object
158 * @mc_io: Pointer to MC portal's I/O object
160 * @token: Token of DPRC object
196 * @mc_io: Pointer to MC portal's I/O object
198 * @token: Token of DPRC object
211 * has not crashed, but the resulting object cleanup operations will not be
234 * @mc_io: Pointer to MC portal's I/O object
236 * @token: Token of DPRC object
276 * @mc_io: Pointer to MC portal's I/O object
278 * @token: Token of DPRC object
307 * @mc_io: Pointer to MC portal's I/O object
309 * @token: Token of DPRC object
342 * @mc_io: Pointer to MC portal's I/O object
344 * @token: Token of DPRC object
375 * @mc_io: Pointer to MC portal's I/O object
377 * @token: Token of DPRC object
413 * @mc_io: Pointer to MC portal's I/O object
415 * @token: Token of DPRC object
447 * @mc_io: Pointer to MC portal's I/O object
449 * @token: Token of DPRC object
484 * @mc_io: Pointer to MC portal's I/O object
486 * @token: Token of DPRC object
514 * @mc_io: Pointer to MC portal's I/O object
516 * @token: Token of DPRC object
551 * dprc_set_res_quota() - Set allocation policy for a specific resource/object
553 * @mc_io: Pointer to MC portal's I/O object
555 * @token: Token of DPRC object
557 * @type: Resource/object type
612 * resource/object type in a child container
613 * @mc_io: Pointer to MC portal's I/O object
615 * @token: Token of DPRC object
617 * @type: resource/object type
669 * @mc_io: Pointer to MC portal's I/O object
671 * @token: Token of DPRC object
688 * - DPRC_RES_REQ_OPT_PLUGGED: Relevant only for object assignment,
689 * and indicates that the object must be set to the plugged state.
692 * object state to plugged or unplugged.
695 * interrupt following every change in its object assignment.
738 * @mc_io: Pointer to MC portal's I/O object
740 * @token: Token of DPRC object
745 * Un-assignment of objects can succeed only if the object is not in the
790 * @mc_io: Pointer to MC portal's I/O object
791 * @token: Token of DPRC object
821 * @mc_io: Pointer to MC portal's I/O object
823 * @token: Token of DPRC object
877 * @mc_io: Pointer to MC portal's I/O object
879 * @token: Token of DPRC object
909 * dprc_get_obj() - Get general information on an object
910 * @mc_io: Pointer to MC portal's I/O object
912 * @token: Token of DPRC object
913 * @obj_index: Index of the object to be queried (< obj_count)
914 * @obj_desc: Returns the requested object descriptor
916 * The object descriptors are retrieved one by one by incrementing
988 * dprc_get_obj_desc() - Get object descriptor.
990 * @mc_io: Pointer to MC portal's I/O object
992 * @token: Token of DPRC object
993 * @obj_type: The type of the object to get its descriptor.
994 * @obj_id: The id of the object to get its descriptor
1083 * dprc_set_obj_irq() - Set IRQ information for object to trigger an interrupt.
1084 * @mc_io: Pointer to MC portal's I/O object
1086 * @token: Token of DPRC object
1087 * @obj_type: Type of the object to set its IRQ
1088 * @obj_id: ID of the object to set its IRQ
1136 * dprc_get_obj_irq() - Get IRQ information from object.
1137 * @mc_io: Pointer to MC portal's I/O object
1139 * @token: Token of DPRC object
1140 * @obj_type: Type od the object to get its IRQ
1141 * @obj_id: ID of the object to get its IRQ
1202 * @mc_io: Pointer to MC portal's I/O object
1204 * @token: Token of DPRC object
1256 * @mc_io: Pointer to MC portal's I/O object
1258 * @token: Token of DPRC object
1311 * dprc_get_obj_region() - Get region information for a specified object.
1312 * @mc_io: Pointer to MC portal's I/O object
1314 * @token: Token of DPRC object
1316 * @obj_id: Unique object instance as returned in dprc_get_obj()
1369 * dprc_set_obj_label() - Set object label.
1370 * @mc_io: Pointer to MC portal's I/O object
1372 * @token: Token of DPRC object
1434 * @mc_io: Pointer to MC portal's I/O object
1436 * @token: Token of DPRC object
1509 * @mc_io: Pointer to MC portal's I/O object
1511 * @token: Token of DPRC object
1553 * @mc_io: Pointer to MC portal's I/O object
1555 * @token: Token of DPRC object
H A Dmc-allocator.c2 * Freescale MC object device allocator driver
25 * @mc_dev: Pointer to allocatable MC object device
27 * It adds an allocatable MC object device to a container's resource pool of
95 * @mc_dev: Pointer to allocatable MC object device
97 * It permanently removes an allocatable MC object device from the resource
269 * @mc_io_flags: Flags for the fsl_mc_io object that wraps the allocated
271 * @new_mc_io: Pointer to area where the pointer to the fsl_mc_io object
276 * it in a new fsl_mc_io object. If 'mc_dev' is a DPRC itself, the
341 * @mc_io: Pointer to the fsl_mc_io object that wraps the MC portal to free
350 * to have a DPMCP object associated with. fsl_mc_portal_free()
369 * fsl_mc_portal_reset - Resets the dpmcp object for a given fsl_mc_io object
371 * @mc_io: Pointer to the fsl_mc_io object that wraps the MC portal to free
392 * fsl_mc_object_allocate - Allocates a MC object device of the given
395 * @mc_dev: MC device for which the MC object device is to be allocated
398 * MC object device is to be returned
400 * This function allocates a MC object device from the device's parent DPRC,
401 * from the corresponding MC bus' pool of allocatable MC object devices of
449 * fsl_mc_object_free - Returns an allocatable MC object device to the
452 * @mc_adev: Pointer to the MC object device
496 "Allocatable MC object device bound to fsl_mc_allocator driver"); fsl_mc_allocator_probe()
518 "Allocatable MC object device unbound from fsl_mc_allocator driver"); fsl_mc_allocator_remove()
H A Dmc-sys.c60 * Creates an MC I/O object
62 * @dev: device to be associated with the MC I/O object
65 * @dpmcp-dev: Pointer to the DPMCP object associated with this MC I/O
66 * object or NULL if none.
67 * @flags: flags for the new MC I/O object
68 * @new_mc_io: Area to return pointer to newly created MC I/O object
134 * Destroys an MC I/O object
136 * @mc_io: MC I/O object to destroy
303 * @mc_io: MC I/O object to be used
350 * @mc_io: MC I/O object to be used
388 * Sends a command to the MC device using the given MC I/O object
390 * @mc_io: MC I/O object to be used
H A Dmc-bus.c29 * @dev: the MC object device structure to match against
30 * @drv: the device driver to search for matching MC object device id
51 * If the object is not 'plugged' don't match. fsl_mc_bus_match()
60 * a matching for the given MC object device. fsl_mc_bus_match()
79 "Major version mismatch: driver version %u.%u, MC object version %u.%u\n", fsl_mc_bus_match()
85 "Minor version mismatch: driver version %u.%u, MC object version %u.%u\n", fsl_mc_bus_match()
129 dev_err(dev, "MC object device probe callback failed: %d\n", fsl_mc_driver_probe()
149 "MC object device remove callback failed: %d\n", fsl_mc_driver_remove()
197 pr_info("MC object device driver %s registered\n", __fsl_mc_driver_register()
335 * This function should not have been called for this MC object fsl_mc_device_get_mmio_regions()
336 * type, as this object type is not supposed to have MMIO fsl_mc_device_get_mmio_regions()
375 regions[i].name = "fsl-mc object MMIO region"; fsl_mc_device_get_mmio_regions()
388 * Add a newly discovered MC object device to be visible in Linux
407 * Allocate an MC bus device object: fsl_mc_device_add()
416 * Allocate a regular fsl_mc_device object: fsl_mc_device_add()
443 * given MC object, using the same MC portal. fsl_mc_device_add()
469 * A non-DPRC MC object device has to be a child of another fsl_mc_device_add()
470 * MC object (specifically a DPRC object) fsl_mc_device_add()
502 dev_dbg(parent_dev, "Added MC object device %s\n", fsl_mc_device_add()
520 * fsl_mc_device_remove - Remove a MC object device from being visible to
523 * @mc_dev: Pointer to a MC object device object
/linux-4.4.14/fs/sysfs/
H A Dsymlink.c56 * sysfs_create_link_sd - create symlink to a given object.
58 * @target: object we're pointing to.
85 * @kobj: object whose directory we're creating the link in.
86 * @target: object we're pointing to.
98 * @kobj: object whose directory we're creating the link in.
99 * @target: object we're pointing to.
112 * sysfs_delete_link - remove symlink in object's directory.
113 * @kobj: object we're acting for.
114 * @targ: object we're pointing to.
138 * sysfs_remove_link - remove symlink in object's directory.
139 * @kobj: object we're acting for.
156 * sysfs_rename_link_ns - rename symlink in object's directory.
157 * @kobj: object we're acting for.
158 * @targ: object we're pointing to.
H A Dfile.c316 * sysfs_create_file_ns - create an attribute file for an object with custom ns
317 * @kobj: object we're creating for
347 * @kobj: object we're acting for.
375 * sysfs_chmod_file - update the modified mode value on an object attribute.
376 * @kobj: object we're acting for.
403 * sysfs_remove_file_ns - remove an object attribute with a custom ns tag
404 * @kobj: object we're acting for
420 * sysfs_remove_file_self - remove an object attribute from its own method
421 * @kobj: object we're acting for
452 * @kobj: object we're acting for.
476 * sysfs_create_bin_file - create binary file for object.
477 * @kobj: object.
490 * sysfs_remove_bin_file - remove binary file for object.
491 * @kobj: object.
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/disp/
H A Drootnv50.c46 nvif_ioctl(object, "disp scanoutpos size %d\n", size); nv50_disp_root_scanoutpos()
48 nvif_ioctl(object, "disp scanoutpos vers %d\n", nv50_disp_root_scanoutpos()
69 nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size) nv50_disp_root_mthd_() argument
75 struct nv50_disp_root *root = nv50_disp_root(object); nv50_disp_root_mthd_()
86 nvif_ioctl(object, "disp mthd size %d\n", size); nv50_disp_root_mthd_()
88 nvif_ioctl(object, "disp mthd vers %d mthd %02x head %d\n", nv50_disp_root_mthd_()
94 nvif_ioctl(object, "disp mthd vers %d mthd %02x " nv50_disp_root_mthd_()
122 return func->head.scanoutpos(object, disp, data, size, head); nv50_disp_root_mthd_()
129 return func->dac.power(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
131 return func->dac.sense(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
133 return func->sor.power(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
137 return func->sor.hda_eld(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
141 return func->sor.hdmi(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
146 nvif_ioctl(object, "disp sor lvds script size %d\n", size); nv50_disp_root_mthd_()
148 nvif_ioctl(object, "disp sor lvds script " nv50_disp_root_mthd_()
162 nvif_ioctl(object, "disp sor dp pwr size %d\n", size); nv50_disp_root_mthd_()
164 nvif_ioctl(object, "disp sor dp pwr vers %d state %d\n", nv50_disp_root_mthd_()
183 return func->pior.power(object, disp, data, size, head, outp); nv50_disp_root_mthd_()
212 nv50_disp_root_child_get_(struct nvkm_object *object, int index, nv50_disp_root_child_get_() argument
215 struct nv50_disp_root *root = nv50_disp_root(object); nv50_disp_root_child_get_()
237 nv50_disp_root_fini_(struct nvkm_object *object, bool suspend) nv50_disp_root_fini_() argument
239 struct nv50_disp_root *root = nv50_disp_root(object); nv50_disp_root_fini_()
245 nv50_disp_root_init_(struct nvkm_object *object) nv50_disp_root_init_() argument
247 struct nv50_disp_root *root = nv50_disp_root(object); nv50_disp_root_init_()
252 nv50_disp_root_dtor_(struct nvkm_object *object) nv50_disp_root_dtor_() argument
254 struct nv50_disp_root *root = nv50_disp_root(object); nv50_disp_root_dtor_()
282 *pobject = &root->object; nv50_disp_root_new_()
284 nvkm_object_ctor(&nv50_disp_root_, oclass, &root->object); nv50_disp_root_new_()
H A Dchannv50.c130 nv50_disp_chan_uevent_ctor(struct nvkm_object *object, void *data, u32 size, nv50_disp_chan_uevent_ctor() argument
133 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_uevent_ctor()
157 nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data) nv50_disp_chan_rd32() argument
159 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_rd32()
167 nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data) nv50_disp_chan_wr32() argument
169 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_wr32()
177 nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type, nv50_disp_chan_ntfy() argument
180 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_ntfy()
193 nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size) nv50_disp_chan_map() argument
195 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_map()
213 nv50_disp_chan_child_get(struct nvkm_object *object, int index, nv50_disp_chan_child_get() argument
216 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_child_get()
227 nv50_disp_chan_fini(struct nvkm_object *object, bool suspend) nv50_disp_chan_fini() argument
229 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_fini()
235 nv50_disp_chan_init(struct nvkm_object *object) nv50_disp_chan_init() argument
237 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_init()
242 nv50_disp_chan_dtor(struct nvkm_object *object) nv50_disp_chan_dtor() argument
244 struct nv50_disp_chan *chan = nv50_disp_chan(object); nv50_disp_chan_dtor()
272 nvkm_object_ctor(&nv50_disp_chan, oclass, &chan->object); nv50_disp_chan_ctor()
298 *pobject = &chan->object; nv50_disp_chan_new_()
H A Ddmacnv50.c43 struct nv50_disp_dmac_object *object = nv50_disp_dmac_child_del_() local
44 container_of(base, typeof(*object), oproxy); nv50_disp_dmac_child_del_()
45 nvkm_ramht_remove(object->root->ramht, object->hash); nv50_disp_dmac_child_del_()
62 struct nv50_disp_dmac_object *object; nv50_disp_dmac_child_new_() local
65 if (!(object = kzalloc(sizeof(*object), GFP_KERNEL))) nv50_disp_dmac_child_new_()
67 nvkm_oproxy_ctor(&nv50_disp_dmac_child_func_, oclass, &object->oproxy); nv50_disp_dmac_child_new_()
68 object->root = root; nv50_disp_dmac_child_new_()
69 *pobject = &object->oproxy.base; nv50_disp_dmac_child_new_()
71 ret = sclass->ctor(device, oclass, data, size, &object->oproxy.object); nv50_disp_dmac_child_new_()
75 object->hash = chan->func->bind(chan, object->oproxy.object, nv50_disp_dmac_child_new_()
77 if (object->hash < 0) nv50_disp_dmac_child_new_()
78 return object->hash; nv50_disp_dmac_child_new_()
148 *pobject = &chan->base.object; nv50_disp_dmac_new_()
179 struct nvkm_object *object, u32 handle) nv50_disp_dmac_bind()
181 return nvkm_ramht_insert(chan->base.root->ramht, object, nv50_disp_dmac_bind()
178 nv50_disp_dmac_bind(struct nv50_disp_dmac *chan, struct nvkm_object *object, u32 handle) nv50_disp_dmac_bind() argument
H A Drootnv04.c24 #define nv04_disp_root(p) container_of((p), struct nv04_disp_root, object)
33 struct nvkm_object object; member in struct:nv04_disp_root
42 struct nvkm_object *object = &root->object; nv04_disp_scanoutpos() local
50 nvif_ioctl(object, "disp scanoutpos size %d\n", size); nv04_disp_scanoutpos()
52 nvif_ioctl(object, "disp scanoutpos vers %d\n", nv04_disp_scanoutpos()
82 nv04_disp_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nv04_disp_mthd() argument
84 struct nv04_disp_root *root = nv04_disp_root(object); nv04_disp_mthd()
90 nvif_ioctl(object, "disp mthd size %d\n", size); nv04_disp_mthd()
92 nvif_ioctl(object, "disp mthd vers %d mthd %02x head %d\n", nv04_disp_mthd()
127 *pobject = &root->object; nv04_disp_root_new()
129 nvkm_object_ctor(&nv04_disp_root, oclass, &root->object); nv04_disp_root_new()
H A Drootnv50.h3 #define nv50_disp_root(p) container_of((p), struct nv50_disp_root, object)
11 struct nvkm_object object; member in struct:nv50_disp_root
H A Ddacnv50.c44 nvif_ioctl(object, "disp dac pwr size %d\n", size); nv50_dac_power()
46 nvif_ioctl(object, "disp dac pwr vers %d state %d data %d " nv50_dac_power()
81 nvif_ioctl(object, "disp dac load size %d\n", size); nv50_dac_sense()
83 nvif_ioctl(object, "disp dac load vers %d data %08x\n", nv50_dac_sense()
/linux-4.4.14/drivers/gpu/drm/radeon/
H A Ddrm_buffer.c39 * Allocate the drm buffer object.
41 * buf: Pointer to a pointer where the object is stored.
55 DRM_ERROR("Failed to allocate drm buffer object to hold" drm_buffer_alloc()
127 * Free the drm buffer object
144 * Read an object from buffer that may be split to multiple parts. If object
145 * is not split function just returns the pointer to object in buffer. But in
146 * case of split object data is copied to given stack object that is suplied
150 * after the object.
153 * stack_obj: A pointer to a memory location where object can be copied.
165 /* The object is split which forces copy to temporary object.*/ drm_buffer_read_object()
H A Dradeon_sync.c36 * radeon_sync_create - zero init sync object
38 * @sync: sync object to initialize
40 * Just clear the sync object for now.
58 * @sync: sync object to add fence to
81 * radeon_sync_resv - use the semaphores to sync to a reservation object
83 * @sync: sync object to add fences from reservation object to
84 * @resv: reservation object with embedded fence
131 * @sync: sync object to use
204 * radeon_sync_free - free the sync object
207 * @sync: sync object to use
210 * Free the sync object by freeing all semaphores in it.
H A Ddrm_buffer.h78 * Allocate the drm buffer object.
80 * buf: A pointer to a pointer where the object is stored.
96 * Free the drm buffer object
101 * Read an object from buffer that may be split to multiple parts. If object
102 * is not split function just returns the pointer to object in buffer. But in
103 * case of split object data is copied to given stack object that is suplied
107 * after the object.
110 * stack_obj: A pointer to a memory location where object can be copied.
/linux-4.4.14/lib/
H A Ddebugobjects.c111 * Lookup an object in the hash bucket.
120 if (obj->object == addr) lookup_object()
130 * Allocate a new object. If the pool is empty, switch off the debugger.
142 obj->object = addr; alloc_object()
188 * Put the object back into the pool and schedule work to free objects
258 descr->debug_hint(obj->object) : NULL; debug_print_object()
261 "object type: %s hint: %pS\n", debug_print_object()
298 pr_warn("object is on stack, but not annotated\n"); debug_object_is_on_stack()
300 pr_warn("object is not on stack, but annotated\n"); debug_object_is_on_stack()
355 * debug_object_init - debug checks when an object is initialized
356 * @addr: address of the object
357 * @descr: pointer to an object specific debug description structure
368 * debug_object_init_on_stack - debug checks when an object on stack is
370 * @addr: address of the object
371 * @descr: pointer to an object specific debug description structure
382 * debug_object_activate - debug checks when an object is activated
383 * @addr: address of the object
384 * @descr: pointer to an object specific debug description structure
394 struct debug_obj o = { .object = addr, debug_object_activate()
435 * This happens when a static object is activated. We debug_object_activate()
448 * debug_object_deactivate - debug checks when an object is deactivated
449 * @addr: address of the object
450 * @descr: pointer to an object specific debug description structure
484 struct debug_obj o = { .object = addr, debug_object_deactivate()
495 * debug_object_destroy - debug checks when an object is destroyed
496 * @addr: address of the object
497 * @descr: pointer to an object specific debug description structure
541 * debug_object_free - debug checks when an object is freed
542 * @addr: address of the object
543 * @descr: pointer to an object specific debug description structure
581 * debug_object_assert_init - debug checks when object should be init-ed
582 * @addr: address of the object
583 * @descr: pointer to an object specific debug description structure
600 struct debug_obj o = { .object = addr, debug_object_assert_init()
606 * Maybe the object is static. Let the type specific debug_object_assert_init()
619 * debug_object_active_state - debug checks object usage state machine
620 * @addr: address of the object
621 * @descr: pointer to an object specific debug description structure
655 struct debug_obj o = { .object = addr, debug_object_active_state()
691 oaddr = (unsigned long) obj->object; __debug_check_no_obj_freed()
798 * - an active object is initialized
816 * - an active object is activated
817 * - an unknown object is activated (might be a statically initialized object)
844 * - an active object is destroyed
862 * - an active object is freed
892 WARN(1, KERN_ERR "ODEBUG: selftest object not found\n"); check_results()
1004 * the static object pool objects into the poll list. After this call debug_objects_selftest()
1005 * the object tracker is fully operational. debug_objects_selftest()
1049 /* Replace the active object references */ debug_objects_replace_static_objects()
1056 /* copy object data */ debug_objects_replace_static_objects()
H A Dcpu_rmap.c17 * CPU affinity. However, we do not assume that the object affinities
19 * by object affinities, we attempt to find a nearest object based on
38 /* Offset of object pointer array from base structure */ alloc_cpu_rmap()
51 * any object with known distance is preferable. Include the alloc_cpu_rmap()
53 * any newly-hotplugged CPUs to have some object assigned. alloc_cpu_rmap()
94 /* Reevaluate nearest object for given CPU, comparing with the given
135 * cpu_rmap_add - add object to a rmap
139 * Return index of object.
153 * cpu_rmap_update - update CPU rmap following a change of object affinity
155 * @index: Index of object whose affinity changed
156 * @affinity: New CPU affinity of object
168 * the nearest object. Mark those CPUs for update. cpu_rmap_update()
/linux-4.4.14/drivers/staging/lustre/lustre/include/
H A Dlu_object.h57 * Server side object is split into layers, one per device in the
59 * lu_object. Compound layered object --- by struct lu_object_header. Most
61 * whole compound object. This decision was made due to the following
68 * on the whole object.
71 * it is possible that at some layer object "spawns" multiple sub-objects
76 * Compound object is uniquely identified by its fid. Objects are indexed
82 * count drops to 0, object is returned to cache. Cached objects still
110 * Allocate object for the given device (without lower-layer
117 * Due to design goal of avoiding recursion, object creation (see
122 * level object (including lu_object_header), but without any
123 * lower-layer sub-object(s).
126 * object.
129 * to allocate lower-layer object(s). To do this,
134 * lu_object_operations::loo_object_init() (and inserted into object
168 /* This is a new object to be allocated, or the file
169 * corresponding to the object does not exists. */
174 * Object configuration, describing particulars of object being created. On
202 * Allocate lower-layer parts of the object by calling
206 * This method is called once for each object inserted into object
208 * object(s) it create into appropriate places of object stack.
214 * Called (in top-to-bottom order) during object allocation after all
222 * that object is being destroyed. Dual to
229 * object is removed from memory.
234 * Called when last active reference to the object is released (and
235 * object returns to the cache). This method is optional.
240 * Optional debugging helper. Print given object.
261 * reference count. This is incremented, in particular, on each object
283 * A list of references to this object, for debugging.
399 * Common object attributes.
410 /** 512-byte blocks allocated to object */
418 /** object flags */
420 /** number of persistent references to this object */
422 /** blk bits of the object*/
424 /** blk size of the object*/
456 * Layer in the layered object.
460 * Header for this object.
468 * Operations for this object.
483 * Don't keep this object in cache. Object will be destroyed as soon
489 * Mark this object has already been taken out of cache.
505 * "Compound" object, consisting of multiple layers.
507 * Compound object with given fid is unique with given lu_site.
509 * Note, that object does *not* necessary correspond to the real object in the
510 * persistent storage: object is an anchor for locking and method calling, so
513 * whether object is backed by persistent storage entity.
517 * Fid, uniquely identifying this object.
530 * Common object attributes, cached for efficiency. From enum
544 * during object destruction). No locking is necessary.
548 * A list of references to this object, for debugging.
557 * number of object in this bucket on the lsb_lru list.
561 * LRU list, updated on each access to object. Protected by
564 * "Cold" end of LRU is lu_site::ls_lru.next. Accessed object are
570 * Wait-queue signaled when an object in this site is ultimately
572 * wait before re-trying when object in the process of destruction is
690 * Acquire additional reference to the given object. This function is used to
701 * Return true of object will not be cached after last reference to it is
732 * First (topmost) sub-object of given compound object
741 * Next sub-object in the layering
749 * Pointer to the fid of this object.
757 * return device operations vector for this object
766 * Given a compound object, find its slice, corresponding to the device type
779 * Print object description followed by a user-supplied message.
781 #define LU_OBJECT_DEBUG(mask, env, object, format, ...) \
786 lu_object_print(env, &msgdata, lu_cdebug_printer, object);\
792 * Print short object description followed by a user-supplied message.
794 #define LU_OBJECT_HEADER(mask, env, object, format, ...) \
800 (object)->lo_header); \
813 * Check object consistency.
818 * Check whether object exists, no matter on local or remote storage.
819 * Note: LOHA_EXISTS will be set once some one created the object,
825 * Check whether object on the remote storage.
840 * Attr of this object.
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/gr/
H A Dnv40.h18 #define nv40_gr_chan(p) container_of((p), struct nv40_gr_chan, object)
21 struct nvkm_object object; member in struct:nv40_gr_chan
33 /* returns 1 if device is one of the nv4x using the 0x4497 object class,
H A Dnv20.h21 #define nv20_gr_chan(p) container_of((p), struct nv20_gr_chan, object)
24 struct nvkm_object object; member in struct:nv20_gr_chan
H A Dnv50.h21 #define nv50_gr_chan(p) container_of((p), struct nv50_gr_chan, object)
24 struct nvkm_object object; member in struct:nv50_gr_chan
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/engine/
H A Ddma.h10 struct nvkm_object object; member in struct:nvkm_dmaobj
26 nvkm_dma_search(struct nvkm_dma *, struct nvkm_client *, u64 object);
H A Dfifo.h9 struct nvkm_object *object; member in struct:nvkm_fifo_engn
18 struct nvkm_object object; member in struct:nvkm_fifo_chan
/linux-4.4.14/fs/ubifs/
H A Dkey.h92 * @c: UBIFS file-system description object
105 * @c: UBIFS file-system description object
121 * @c: UBIFS file-system description object
134 * @c: UBIFS file-system description object
147 * @c: UBIFS file-system description object
166 * @c: UBIFS file-system description object
182 * @c: UBIFS file-system description object
202 * @c: UBIFS file-system description object
215 * @c: UBIFS file-system description object
233 * @c: UBIFS file-system description object
253 * @c: UBIFS file-system description object
266 * @c: UBIFS file-system description object
282 * @c: UBIFS file-system description object
294 * @c: UBIFS file-system description object
310 * @c: UBIFS file-system description object
313 * This is a helper function which marks a @key object as invalid.
324 * @c: UBIFS file-system description object
335 * @c: UBIFS file-system description object
347 * @c: UBIFS file-system description object
359 * @c: UBIFS file-system description object
371 * @c: UBIFS file-system description object
382 * @c: UBIFS file-system description object
394 * @c: UBIFS file-system description object
405 * @c: UBIFS file-system description object
418 * @c: UBIFS file-system description object
433 * @c: UBIFS file-system description object
449 * @c: UBIFS file-system description object
464 * @c: UBIFS file-system description object
476 * @c: UBIFS file-system description object
501 * @c: UBIFS file-system description object
521 * @c: UBIFS file-system description object
536 * @c: UBIFS file-system description object
H A Dmisc.h66 * @c: UBIFS file-system description object
97 * ubifs_inode - get UBIFS inode information by VFS 'struct inode' object.
164 * @c: the UBIFS file-system description object
178 * @c: the UBIFS file-system description object
193 * @c: the UBIFS file-system description object
203 * @c: the UBIFS file-system description object
218 * @c: the UBIFS file-system description object
239 * @c: UBIFS file-system description object
256 * @c: the UBIFS file-system description object
268 * @c: the UBIFS file-system description object
283 * @c: UBIFS file-system description object
/linux-4.4.14/drivers/gpu/drm/nouveau/
H A Dnouveau_usif.c258 usif_object_dtor(struct usif_object *object) usif_object_dtor() argument
260 list_del(&object->head); usif_object_dtor()
261 kfree(object); usif_object_dtor()
272 struct usif_object *object; usif_object_new() local
275 if (!(object = kmalloc(sizeof(*object), GFP_KERNEL))) usif_object_new()
277 list_add(&object->head, &cli->objects); usif_object_new()
280 object->route = args->v0.route; usif_object_new()
281 object->token = args->v0.token; usif_object_new()
283 args->v0.token = (unsigned long)(void *)object; usif_object_new()
285 args->v0.token = object->token; usif_object_new()
286 args->v0.route = object->route; usif_object_new()
290 usif_object_dtor(object); usif_object_new()
304 struct usif_object *object; usif_ioctl() local
316 if (argv->v0.object == 0ULL) usif_ioctl()
357 object = (void *)(unsigned long)argv->v0.token; usif_ioctl()
358 argv->v0.route = object->route; usif_ioctl()
359 argv->v0.token = object->token; usif_ioctl()
361 list_del(&object->head); usif_ioctl()
362 kfree(object); usif_ioctl()
381 struct usif_object *object, *otemp; usif_client_fini() local
388 list_for_each_entry_safe(object, otemp, &cli->objects, head) { usif_client_fini()
389 usif_object_dtor(object); usif_client_fini()
H A Dnouveau_abi16.c50 /* allocate device object targeting client's default nouveau_abi16()
54 if (nvif_device_init(&cli->base.object, 0, NV_DEVICE, nouveau_abi16()
80 struct nouveau_cli *cli = (void *)abi16->device.object.client; nouveau_abi16_put()
111 nvif_object_fini(&ntfy->object); nouveau_abi16_ntfy_fini()
123 /* wait for all activity to stop before releasing notify object, which nouveau_abi16_chan_fini()
142 /* destroy channel object, all children will be killed too */ nouveau_abi16_chan_fini()
155 struct nouveau_cli *cli = (void *)abi16->device.object.client; nouveau_abi16_fini()
163 /* destroy the device object */ nouveau_abi16_fini()
285 /* create channel object and initialise dma and fence management */ nouveau_abi16_ioctl_channel_alloc()
310 /* Named memory object area */ nouveau_abi16_ioctl_channel_alloc()
378 args->v0.object = nvif_handle(&chan->chan->user); nouveau_abi16_usif()
383 args->v0.object = nvif_handle(&abi16->device.object); nouveau_abi16_usif()
422 client = abi16->device.object.client; nouveau_abi16_ioctl_grobj_alloc()
489 NULL, 0, &ntfy->object); nouveau_abi16_ioctl_grobj_alloc()
516 client = abi16->device.object.client; nouveau_abi16_ioctl_notifierobj_alloc()
557 &ntfy->object); nouveau_abi16_ioctl_notifierobj_alloc()
586 /* synchronize with the user channel and destroy the gpu object */ nouveau_abi16_ioctl_gpuobj_free()
590 if (ntfy->object.handle == fini->handle) { nouveau_abi16_ioctl_gpuobj_free()
H A Dnouveau_chan.h4 #include <nvif/object.h>
H A Dnouveau_backlight.c43 struct nvif_object *device = &drm->device.object; nv40_get_intensity()
54 struct nvif_object *device = &drm->device.object; nv40_set_intensity()
74 struct nvif_object *device = &drm->device.object; nv40_backlight_init()
100 struct nvif_object *device = &drm->device.object; nv50_get_intensity()
115 struct nvif_object *device = &drm->device.object; nv50_set_intensity()
136 struct nvif_object *device = &drm->device.object; nva3_get_intensity()
154 struct nvif_object *device = &drm->device.object; nva3_set_intensity()
180 struct nvif_object *device = &drm->device.object; nv50_backlight_init()
/linux-4.4.14/include/uapi/scsi/fc/
H A Dfc_ns.h74 * Port type object.
81 * Port ID object
89 * fp_flags in port ID object, for responses only.
91 #define FC_NS_FID_LAST 0x80 /* last object */
94 * FC4-types object.
104 * FC4-features object.
167 struct fc_ns_fid fr_fid; /* port ID object */
168 struct fc_ns_fts fr_fts; /* FC-4 types object */
176 struct fc_ns_fid fr_fid; /* port ID object */
193 struct fc_ns_fid fr_fid; /* port ID object */
202 struct fc_ns_fid fr_fid; /* port ID object */
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/pm/
H A Dpriv.h69 #define nvkm_perfdom(p) container_of((p), struct nvkm_perfdom, object)
72 struct nvkm_object object; member in struct:nvkm_perfdom
97 #define nvkm_perfmon(p) container_of((p), struct nvkm_perfmon, object)
100 struct nvkm_object object; member in struct:nvkm_perfmon
H A Dbase.c203 * Perfdom object classes
211 struct nvkm_object *object = &dom->object; nvkm_perfdom_init() local
215 nvif_ioctl(object, "perfdom init size %d\n", size); nvkm_perfdom_init()
217 nvif_ioctl(object, "perfdom init\n"); nvkm_perfdom_init()
241 struct nvkm_object *object = &dom->object; nvkm_perfdom_sample() local
245 nvif_ioctl(object, "perfdom sample size %d\n", size); nvkm_perfdom_sample()
247 nvif_ioctl(object, "perfdom sample\n"); nvkm_perfdom_sample()
265 struct nvkm_object *object = &dom->object; nvkm_perfdom_read() local
269 nvif_ioctl(object, "perfdom read size %d\n", size); nvkm_perfdom_read()
271 nvif_ioctl(object, "perfdom read vers %d\n", args->v0.version); nvkm_perfdom_read()
291 nvkm_perfdom_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_perfdom_mthd() argument
293 struct nvkm_perfdom *dom = nvkm_perfdom(object); nvkm_perfdom_mthd()
308 nvkm_perfdom_dtor(struct nvkm_object *object) nvkm_perfdom_dtor() argument
310 struct nvkm_perfdom *dom = nvkm_perfdom(object); nvkm_perfdom_dtor()
416 nvkm_object_ctor(&nvkm_perfdom, oclass, &dom->object); nvkm_perfdom_new_()
418 *pobject = &dom->object; nvkm_perfdom_new_()
429 * Perfmon object classes
438 struct nvkm_object *object = &perfmon->object; nvkm_perfmon_mthd_query_domain() local
444 nvif_ioctl(object, "perfmon query domain size %d\n", size); nvkm_perfmon_mthd_query_domain()
446 nvif_ioctl(object, "perfmon domain vers %d iter %02x\n", nvkm_perfmon_mthd_query_domain()
486 struct nvkm_object *object = &perfmon->object; nvkm_perfmon_mthd_query_signal() local
495 nvif_ioctl(object, "perfmon query signal size %d\n", size); nvkm_perfmon_mthd_query_signal()
497 nvif_ioctl(object, nvkm_perfmon_mthd_query_signal()
540 struct nvkm_object *object = &perfmon->object; nvkm_perfmon_mthd_query_source() local
548 nvif_ioctl(object, "perfmon query source size %d\n", size); nvkm_perfmon_mthd_query_source()
550 nvif_ioctl(object, nvkm_perfmon_mthd_query_source()
586 nvkm_perfmon_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_perfmon_mthd() argument
588 struct nvkm_perfmon *perfmon = nvkm_perfmon(object); nvkm_perfmon_mthd()
611 nvkm_perfmon_child_get(struct nvkm_object *object, int index, nvkm_perfmon_child_get() argument
625 nvkm_perfmon_dtor(struct nvkm_object *object) nvkm_perfmon_dtor() argument
627 struct nvkm_perfmon *perfmon = nvkm_perfmon(object); nvkm_perfmon_dtor()
630 if (pm->perfmon == &perfmon->object) nvkm_perfmon_dtor()
651 nvkm_object_ctor(&nvkm_perfmon, oclass, &perfmon->object); nvkm_perfmon_new()
653 *pobject = &perfmon->object; nvkm_perfmon_new()
/linux-4.4.14/arch/x86/entry/vsyscall/
H A Dvsyscall_emu_64.S18 .type __vsyscall_page, @object
/linux-4.4.14/arch/ia64/include/asm/sn/sn2/
H A Dsn_hwperf.h18 * object structure. SN_HWPERF_ENUM_OBJECTS and SN_HWPERF_GET_CPU_INFO
44 /* macros for object classification */
74 u64 arg; /* argument, usually an object id */
124 * Determine object "distance", relative to a cpu. This operation can
129 * arg bitmap of IPI flag, cpu number and object id
145 * Enumerate NumaLink ports for an object. Special case if sz == 8,
147 * arg object id
159 * arg bitmap of ipi flag, cpu number and object id
167 * Lock a shared object
168 * arg object id
175 * Unlock a shared object
176 * arg object id
183 * Break a lock on a shared object
184 * arg object id
207 * Given an object id, return it's node number (aka cnode).
208 * arg object id
/linux-4.4.14/drivers/gpu/drm/ttm/
H A Dttm_object.c38 * Base- and reference object implementation for the various
56 * for fast lookup of ref objects given a base object.
82 * @object_hash: hash table for fast lookup of object global names.
84 * @object_count: Per device object count.
86 * This is the per-device data structure needed for ttm object management.
102 * @hash: Hash entry for the per-file object reference hash.
108 * @obj: Base object this ref object is referencing.
110 * @ref_type: Type of ref object.
112 * This is similar to an idr object, but it also has a hash table entry
113 * that allows lookup with a pointer to the referenced object as a key. In
114 * that way, one can easily detect whether a base object is referenced by
117 * object more than once.
210 * too slow. It's up to the user to free the object using ttm_release_base()
274 * ttm_ref_object_exists - Check whether a caller has a valid ref object
275 * (has opened) a base object.
278 * @base: Pointer to a struct base object.
281 * reference object on the base object identified by @base.
295 * Verify that the ref object is really pointing to our base object. ttm_ref_object_exists()
296 * Our base object could actually be dead, and the ref object pointing ttm_ref_object_exists()
297 * to another base object with the same handle. ttm_ref_object_exists()
559 * ttm_prime_refcount_release - refcount release method for a prime object.
564 * underlying object. At the same time it cleans up the prime object.
565 * This function is called when all references to the base object we
589 * object.
609 * ttm_prime_fd_to_handle - Get a base object handle from a prime fd
615 * This function returns a handle to an object that previously exported
647 * ttm_prime_handle_to_fd - Return a dma_buf fd from a ttm prime object
650 * @handle: Handle to the object we're exporting from.
713 * dma_buf has taken the base object reference ttm_prime_handle_to_fd()
739 * @prime: The object to be initialized.
745 * Initializes an object which is compatible with the drm_prime model
/linux-4.4.14/drivers/gpu/drm/gma500/
H A Dgem.c23 * accelerated operations on a GEM object)
40 /* This must occur last as it frees up the memory of the GEM object */ psb_gem_free_object()
54 * @handle: GEM handle to the object (from dumb_create)
67 /* GEM does all our handle to object mapping */ psb_gem_dumb_map_gtt()
88 * psb_gem_create - create a mappable object
94 * Create a GEM object, fill in the boilerplate and attach a handle to
107 /* Allocate our object - for now a direct gtt range which is not psb_gem_create()
111 dev_err(dev->dev, "no memory for %lld byte GEM object\n", size); psb_gem_create()
121 /* Limit the object to 32bit mappings */ psb_gem_create()
123 /* Give the object a handle so we can carry it more easily */ psb_gem_create()
159 * @vma: the VMA of the GEM object
171 * vma->vm_private_data points to the GEM object that is backing this
184 obj = vma->vm_private_data; /* GEM object */ psb_gem_fault()
194 /* For now the mmap pins the object and it stays pinned. As things psb_gem_fault()
/linux-4.4.14/include/drm/
H A Ddrm_gem.h38 * This structure defines the drm_mm memory object, which will be used by the
42 /** Reference count of this object */
46 * handle_count - gem file_priv handle count of this object
62 /* Mapping info for this object */
66 * Size of the object, in bytes. Immutable over the object's
72 * Global name for this object, starts at 1. 0 means unnamed.
79 * related to the object. When transitioning from one set of domains
96 * dma_buf - dma buf associated with this GEM object
98 * Pointer to the dma-buf associated with this gem object (either
100 * loop when the last gem handle for this object is released.
107 * import_attach - dma buf attachment backing this object
109 * Any foreign dma_buf imported as a gem object has this set to the
111 * of a gem object.
H A Ddrm_gem_cma_helper.h8 * struct drm_gem_cma_object - GEM object backed by CMA memory allocations
9 * @base: base GEM object
29 /* free GEM object */
/linux-4.4.14/mm/kasan/
H A Dkasan.c324 void kasan_unpoison_object_data(struct kmem_cache *cache, void *object) kasan_unpoison_object_data() argument
326 kasan_unpoison_shadow(object, cache->object_size); kasan_unpoison_object_data()
329 void kasan_poison_object_data(struct kmem_cache *cache, void *object) kasan_poison_object_data() argument
331 kasan_poison_shadow(object, kasan_poison_object_data()
336 void kasan_slab_alloc(struct kmem_cache *cache, void *object) kasan_slab_alloc() argument
338 kasan_kmalloc(cache, object, cache->object_size); kasan_slab_alloc()
341 void kasan_slab_free(struct kmem_cache *cache, void *object) kasan_slab_free() argument
350 kasan_poison_shadow(object, rounded_up_size, KASAN_KMALLOC_FREE); kasan_slab_free()
353 void kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size) kasan_kmalloc() argument
358 if (unlikely(object == NULL)) kasan_kmalloc()
361 redzone_start = round_up((unsigned long)(object + size), kasan_kmalloc()
363 redzone_end = round_up((unsigned long)object + cache->object_size, kasan_kmalloc()
366 kasan_unpoison_shadow(object, size); kasan_kmalloc()
391 void kasan_krealloc(const void *object, size_t size) kasan_krealloc() argument
395 if (unlikely(object == ZERO_SIZE_PTR)) kasan_krealloc()
398 page = virt_to_head_page(object); kasan_krealloc()
401 kasan_kmalloc_large(object, size); kasan_krealloc()
403 kasan_kmalloc(page->slab_cache, object, size); kasan_krealloc()
H A Dkasan.h11 #define KASAN_KMALLOC_REDZONE 0xFC /* redzone inside slub object */
12 #define KASAN_KMALLOC_FREE 0xFB /* object was freed (kmem_cache_free/kfree) */
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/cipher/
H A Dg84.c34 g84_cipher_oclass_bind(struct nvkm_object *object, struct nvkm_gpuobj *parent, g84_cipher_oclass_bind() argument
37 int ret = nvkm_gpuobj_new(object->engine->subdev.device, 16, g84_cipher_oclass_bind()
41 nvkm_wo32(*pgpuobj, 0x00, object->oclass); g84_cipher_oclass_bind()
56 g84_cipher_cclass_bind(struct nvkm_object *object, struct nvkm_gpuobj *parent, g84_cipher_cclass_bind() argument
59 return nvkm_gpuobj_new(object->engine->subdev.device, 256, g84_cipher_cclass_bind()
99 chan ? chan->object.client->name : "unknown", g84_cipher_intr()
/linux-4.4.14/security/selinux/include/
H A Dobjsec.h41 struct inode *inode; /* back pointer to inode object */
47 u32 sid; /* SID of this object */
48 u16 sclass; /* security class of this object */
61 struct super_block *sb; /* back pointer to sb object */
77 u16 sclass; /* security class of this object */
113 u32 sid; /* SID of this object */
/linux-4.4.14/security/smack/
H A Dsmack_access.c66 * @object_label: a pointer to the object's Smack label
69 * This function looks up the subject/object pair in the
85 * Do the object check first because that is more
113 * smk_access - determine if a subject has a specific access to an object
115 * @object: a pointer to the object's Smack label entry
119 * This function looks up the subject/object pair in the
125 int smk_access(struct smack_known *subject, struct smack_known *object, smk_access() argument
135 * A star subject can't access any object. smk_access()
142 * An internet object can be accessed by any subject. smk_access()
144 * An internet subject can access any object. smk_access()
146 if (object == &smack_known_web || subject == &smack_known_web) smk_access()
149 * A star object can be accessed by any subject. smk_access()
151 if (object == &smack_known_star) smk_access()
154 * An object can be accessed in any way by a subject smk_access()
157 if (subject->smk_known == object->smk_known) smk_access()
160 * A hat subject can read or lock any object. smk_access()
161 * A floor object can be read or locked by any subject. smk_access()
165 if (object == &smack_known_floor) smk_access()
178 may = smk_access_entry(subject->smk_known, object->smk_known, smk_access()
200 if (object == smack_unconfined) smk_access()
209 smack_log(subject->smk_known, object->smk_known, smk_access()
217 * smk_tskacc - determine if a task has a specific access to an object
219 * @obj_known: a pointer to the object's label entry
223 * This function checks the subject task's label/object label pair
270 * smk_curacc - determine if current has a specific access to an object
271 * @obj_known: a pointer to the object's Smack label entry
275 * This function checks the current subject label/object label pair
330 audit_log_format(ab, " object="); smack_log_callback()
331 audit_log_untrustedstring(ab, sad->object); smack_log_callback()
341 * @object_label : smack label of the object being accessed
374 sad->object = object_label; smack_log()
/linux-4.4.14/sound/hda/
H A Darray.c11 * @array: the array object
40 * @array: the array object
/linux-4.4.14/net/irda/
H A Dirias_object.c5 * Description: IAS object database and functions
44 * Create a new IAS object
53 net_warn_ratelimited("%s(), Unable to allocate object!\n", irias_new_object()
121 * Remove object from hashbin and deallocate all attributes associated with
122 * with this object and the object itself
135 pr_debug("%s(), object already removed!\n", irias_delete_object()
149 * the object, remove the object as well.
161 /* Remove attribute from object */ irias_delete_attrib()
169 /* Check if object has still some attributes, destroy it if none. irias_delete_attrib()
173 * of deleting a kernel object this way. Jean II */ irias_delete_attrib()
184 * Insert an object into the LM-IAS database
199 * Find object with given name
206 /* Unsafe (locking), object might change */ irias_find_object()
214 * Find named attribute in object
236 * Add attribute to object
267 /* Find object */ irias_object_change_attribute()
270 net_warn_ratelimited("%s: Unable to find object: %s\n", irias_object_change_attribute()
309 * Add an integer attribute to an LM-IAS object
350 * Add a octet sequence attribute to an LM-IAS object
393 * Add a string attribute to an LM-IAS object
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/dma/
H A Duser.h3 #define nvkm_dmaobj(p) container_of((p), struct nvkm_dmaobj, object)
/linux-4.4.14/arch/arm/boot/compressed/
H A Ddebug.S35 .type semi_writec_buf, %object
/linux-4.4.14/include/linux/input/
H A Dgp2ap002a00f.h10 * @vout_gpio: The gpio connected to the object detected pin (VOUT)
/linux-4.4.14/tools/lib/bpf/
H A Dlibbpf.h2 * Common eBPF ELF object loading operations.
20 LIBBPF_ERRNO__FORMAT, /* BPF object format invalid */
53 void bpf_object__close(struct bpf_object *object);
55 /* Load/unload object into/from kernel */
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_sync.c41 * amdgpu_sync_create - zero init sync object
43 * @sync: sync object to initialize
45 * Just clear the sync object for now.
102 * @sync: sync object to add fence to
156 * amdgpu_sync_resv - use the semaphores to sync to a reservation object
158 * @sync: sync object to add fences from reservation object to
159 * @resv: reservation object with embedded fence
272 * @sync: sync object to use
359 * amdgpu_sync_free - free the sync object
362 * @sync: sync object to use
365 * Free the sync object by freeing all semaphores in it.
/linux-4.4.14/tools/testing/selftests/memfd/
H A Dfuse_test.c9 * We use this trick to race ADD_SEALS against a write on a memfd object. The
11 * the read() syscall with our memory-mapped memfd object as receive buffer to
12 * force the kernel to write into our memfd object.
171 * that memory mapped object still ongoing. sealing_thread_fn()
249 /* create new memfd-object */ main()
254 /* mmap memfd-object for writing */ main()
264 * object. This races the other thread which tries to seal the main()
265 * memfd-object. main()
286 /* *IF* the memfd-object was sealed at the time our read() returned, main()
288 * whatever magic it did..). In that case, the memfd object is still main()
290 * In case the memfd-object was *not* sealed, the read() was successfull main()
291 * and the memfd object must *not* be all zero. main()
/linux-4.4.14/drivers/input/touchscreen/
H A Datmel_mxt_ts.c73 /* MXT_GEN_MESSAGE_T5 object */
236 /* Cached parameters from object table */
606 struct mxt_object *object; mxt_get_object() local
610 object = data->object_table + i; mxt_get_object()
611 if (object->type == type) mxt_get_object()
612 return object; mxt_get_object()
615 dev_warn(&data->client->dev, "Invalid object type T%u\n", type); mxt_get_object()
655 struct mxt_object *object; mxt_write_object() local
658 object = mxt_get_object(data, type); mxt_write_object()
659 if (!object || offset >= mxt_obj_size(object)) mxt_write_object()
662 reg = object->start_address; mxt_write_object()
1188 struct mxt_object *object; mxt_prepare_cfg_mem() local
1204 dev_err(dev, "Bad format: failed to parse object\n"); mxt_prepare_cfg_mem()
1209 object = mxt_get_object(data, type); mxt_prepare_cfg_mem()
1210 if (!object) { mxt_prepare_cfg_mem()
1211 /* Skip object */ mxt_prepare_cfg_mem()
1225 if (size > mxt_obj_size(object)) { mxt_prepare_cfg_mem()
1232 size - mxt_obj_size(object), type); mxt_prepare_cfg_mem()
1233 } else if (mxt_obj_size(object) > size) { mxt_prepare_cfg_mem()
1244 mxt_obj_size(object) - size, type); mxt_prepare_cfg_mem()
1247 if (instance >= mxt_obj_instances(object)) { mxt_prepare_cfg_mem()
1252 reg = object->start_address + mxt_obj_size(object) * instance; mxt_prepare_cfg_mem()
1265 if (i > mxt_obj_size(object)) mxt_prepare_cfg_mem()
1273 dev_err(dev, "Bad object: reg:%d, T%d, ofs=%d\n", mxt_prepare_cfg_mem()
1274 reg, object->type, byte_offset); mxt_prepare_cfg_mem()
1324 * The rest of the file consists of one line per object instance:
1327 * <TYPE> - 2-byte object type as hex
1328 * <INSTANCE> - 2-byte object instance number as hex
1329 * <SIZE> - 2-byte object size as hex
1393 * The Info Block CRC is calculated over mxt_info and the object mxt_update_cfg()
1550 struct mxt_object *object = object_table + i; mxt_get_object_table() local
1553 le16_to_cpus(&object->start_address); mxt_get_object_table()
1555 if (object->num_report_ids) { mxt_get_object_table()
1557 reportid += object->num_report_ids * mxt_get_object_table()
1558 mxt_obj_instances(object); mxt_get_object_table()
1567 object->type, object->start_address, mxt_get_object_table()
1568 mxt_obj_size(object), mxt_obj_instances(object), mxt_get_object_table()
1571 switch (object->type) { mxt_get_object_table()
1580 data->T5_msg_size = mxt_obj_size(object); mxt_get_object_table()
1583 data->T5_msg_size = mxt_obj_size(object) - 1; mxt_get_object_table()
1585 data->T5_address = object->start_address; mxt_get_object_table()
1589 data->T6_address = object->start_address; mxt_get_object_table()
1592 data->T7_address = object->start_address; mxt_get_object_table()
1598 data->num_touchids = object->num_report_ids mxt_get_object_table()
1599 * mxt_obj_instances(object); mxt_get_object_table()
1602 data->T44_address = object->start_address; mxt_get_object_table()
1612 data->num_touchids = object->num_report_ids - 2; mxt_get_object_table()
1616 end_address = object->start_address mxt_get_object_table()
1617 + mxt_obj_size(object) * mxt_obj_instances(object) - 1; mxt_get_object_table()
1656 struct mxt_object *object; mxt_read_t9_resolution() local
1658 object = mxt_get_object(data, MXT_TOUCH_MULTI_T9); mxt_read_t9_resolution()
1659 if (!object) mxt_read_t9_resolution()
1663 object->start_address + MXT_T9_RANGE, mxt_read_t9_resolution()
1672 object->start_address + MXT_T9_ORIENT, mxt_read_t9_resolution()
1702 struct mxt_object *object; mxt_read_t100_config() local
1707 object = mxt_get_object(data, MXT_TOUCH_MULTITOUCHSCREEN_T100); mxt_read_t100_config()
1708 if (!object) mxt_read_t100_config()
1712 object->start_address + MXT_T100_XRANGE, mxt_read_t100_config()
1720 object->start_address + MXT_T100_YRANGE, mxt_read_t100_config()
1728 object->start_address + MXT_T100_CFG1, mxt_read_t100_config()
1734 object->start_address + MXT_T100_TCHAUX, mxt_read_t100_config()
1827 dev_err(dev, "Invalid multitouch object\n"); mxt_initialize_input_device()
1981 /* Get object table information */ mxt_initialize()
1984 dev_err(&client->dev, "Error %d reading object table\n", error); mxt_initialize()
2086 dev_warn(dev, "No touch object detected\n"); mxt_configure_objects()
2118 struct mxt_object *object, int instance, mxt_show_instance()
2123 if (mxt_obj_instances(object) > 1) mxt_show_instance()
2127 for (i = 0; i < mxt_obj_size(object); i++) mxt_show_instance()
2139 struct mxt_object *object; mxt_object_show() local
2145 /* Pre-allocate buffer large enough to hold max sized object. */ mxt_object_show()
2152 object = data->object_table + i; mxt_object_show()
2154 if (!mxt_object_readable(object->type)) mxt_object_show()
2158 "T%u:\n", object->type); mxt_object_show()
2160 for (j = 0; j < mxt_obj_instances(object); j++) { mxt_object_show()
2161 u16 size = mxt_obj_size(object); mxt_object_show()
2162 u16 addr = object->start_address + j * size; mxt_object_show()
2168 count = mxt_show_instance(buf, count, object, j, obuf); mxt_object_show()
2346 static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL);
2117 mxt_show_instance(char *buf, int count, struct mxt_object *object, int instance, const u8 *val) mxt_show_instance() argument
/linux-4.4.14/net/core/
H A Dflow.c39 struct flow_cache_object *object; member in struct:flow_cache_entry
70 if (fle->object && !fle->object->ops->check(fle->object)) flow_entry_valid()
78 if (fle->object) flow_entry_kill()
79 fle->object->ops->delete(fle->object); flow_entry_kill()
241 fle->object = NULL; flow_cache_lookup()
246 flo = fle->object; flow_cache_lookup()
252 } else if (fle->object) { flow_cache_lookup()
253 flo = fle->object; flow_cache_lookup()
255 fle->object = NULL; flow_cache_lookup()
261 flo = fle->object; flow_cache_lookup()
262 fle->object = NULL; flow_cache_lookup()
268 fle->object = flo; flow_cache_lookup()
/linux-4.4.14/fs/ceph/
H A Dioctl.h15 * the distributed object store, which object pool they belong to (if
52 * Extract identity, address of the OSD and object storing a given
57 __u64 object_offset; /* out: offset in object */
58 __u64 object_no; /* out: object # */
59 __u64 object_size; /* out: object size */
60 char object_name[64]; /* out: object name */
/linux-4.4.14/include/sound/
H A Dsoc-topology.h32 /* object scan be loaded and unloaded in groups with identfying indexes */
35 /* dynamic object type */
37 SND_SOC_DOBJ_NONE = 0, /* object is not dynamic */
47 /* dynamic control object */
54 /* dynamic widget object */
59 /* dynamic PCM DAI object */
65 /* generic dynamic object - all dynamic objects belong to this struct */
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/
H A Dlu_object.c40 * infrastructure for managing object devices
65 * Decrease reference counter on object. If last reference is freed, return
66 * object to the cache, unless lu_object_is_dying(o) holds. In the latter
67 * case, free object immediately.
84 * are possible in OSP. such an object isn't listed in the site lu_object_put()
118 * When last reference is released, iterate over object lu_object_put()
119 * layers, and notify them that object is no longer busy. lu_object_put()
138 * If object is dying (will not be cached), removed it lu_object_put()
143 * object is through hash-table lookup (lu_object_find()), lu_object_put()
145 * and LRU lock, no race with concurrent object lookup is possible lu_object_put()
146 * and we can safely destroy object below. lu_object_put()
160 * Kill the object and take it out of LRU cache.
190 * Allocate new object.
192 * This follows object creation protocol, described in the comment within
209 * Create top-level object slice. This will also create lu_object_alloc()
218 * This is the only place where object fid is assigned. It's constant lu_object_alloc()
227 * object slices are created. lu_object_alloc()
262 * Free an object.
284 * Then, splice object layers into stand-alone list, and call
293 * Free layers in bottom-to-top order, so that object header
396 * Code below has to jump through certain loops to output object description
398 * composes object description from strings that are parts of _lines_ of
474 * Print object header.
538 * of cfs_hash, it doesn't add refcount on object. */ htable_lookup()
558 * Lookup found an object being destroyed this object cannot be htable_lookup()
560 * drained), and moreover, lookup has to wait until object is freed. htable_lookup()
571 * Search cache for an object with the fid \a f. If such object is found,
572 * return it. Otherwise, create new object, insert it into cache and return
573 * it. In any case, additional reference is acquired on the returned object.
622 * - search index under lock, and return object if found; lu_object_find_try()
623 * - otherwise, unlock index, allocate new object; lu_object_find_try()
626 * object into index; lu_object_find_try()
627 * - otherwise (race: other thread inserted object), free lu_object_find_try()
628 * object just allocated. lu_object_find_try()
630 * - return object. lu_object_find_try()
632 * For "LOC_F_NEW" case, we are sure the object is new established. lu_object_find_try()
636 * If dying object is found during index search, add @waiter to the lu_object_find_try()
651 * Allocate new object. This may result in rather complicated lu_object_find_try()
676 * Much like lu_object_find(), but top level device of object is specifically
705 * Find object with given fid, and return its slice belonging to given device.
1125 * Initialize object \a o that is part of compound object \a h and was created
1143 * Finalize object and release its resources.
1161 * Add object \a o as first layer of compound object \a h
1173 * Add object \a o as a layer of compound object, going after \a before.
1185 * Initialize compound object.
1200 * Finalize compound object.
1212 * Given a compound object, find its slice, corresponding to the device type
1231 * Finalize device stack by purging object cache, and calling
1737 * stats of each site. The counter is incremented when an object is added
/linux-4.4.14/drivers/gpu/drm/exynos/
H A Dexynos_drm_gem.h24 * @base: a gem object.
25 * - a new handle to this gem object would be created
27 * @buffer: a pointer to exynos_drm_gem_buffer object.
43 * P.S. this object would be transferred to user as kms_bo.handle so
60 /* destroy a buffer with gem object */
63 /* create a new buffer with gem object */
69 * request gem object creation and buffer allocation as the size
79 * with this function call, gem object reference count would be increased.
88 * with this function call, gem object reference count would be decreased.
107 /* free gem object. */
H A Dexynos_drm_fb.h25 /* get gem object of a drm framebuffer */
/linux-4.4.14/include/media/
H A Dv4l2-event.h36 * type and is optionally associated with an object identified through the
47 * Finally, if the event subscription is associated with a particular object
48 * such as a V4L2 control, then that object needs to know about that as well
49 * so that an event can be raised by that object. So the 'node' field can
51 * object.
61 * If struct v4l2_subscribed_event is associated with a specific object, then
62 * that object will have an internal list of struct v4l2_subscribed_event so
63 * it knows who subscribed an event to that object.
101 * @id: Associated object ID (e.g. control ID). 0 if there isn't any.
104 * @node: List node that hooks into the object's event list (if there is one).
/linux-4.4.14/fs/nfs/
H A Dfscache-index.c27 * the cookie for the top-level index object for NFS into here. The top-level
52 * Layout of the key for an NFS server cache object.
105 * Define the server object for FS-Cache. This is used to describe a server
106 * object to fscache_acquire_cookie(). It is keyed by the NFS protocol and
139 * Define the superblock object for FS-Cache. This is used to describe a
140 * superblock object to fscache_acquire_cookie(). It is keyed by all the NFS
154 * auxiliary data attached to the data storage object backing an inode. This
156 * cache object.
224 * Consult the netfs about the state of an object
259 * - This is mandatory for any object that may have data
318 * Define the inode object for FS-Cache. This is used to describe an inode
319 * object to fscache_acquire_cookie(). It is keyed by the NFS file handle for
323 * held in the cache auxiliary data for the data storage object with those in
/linux-4.4.14/scripts/
H A Dnamespace.pl9 # Invoke by changing directory to the top of the kernel object
15 # Last change 2.6.9-rc1, adding support for separate source and object
18 # The source must be compiled/assembled first, the object files
57 # config does not require them. These symbols bloat the kernel object
81 my %nmdata = (); # nm data for each object
158 # that are linked from just one other object and objects for which
227 printf STDERR "$fullname is not an object file\n";
237 # No obvious source, exclude the object if it is conglomerate
344 my ($object, $name) = @_;
345 my $nmdata = $nmdata{$object};
349 splice(@{$nmdata{$object}}, $i, 1);
352 if ($def{$name}[$j] eq $object) {
389 foreach my $object (keys(%nmdata)) {
390 my $nmdata = $nmdata{$object};
395 # add the owning object to the nmdata
396 $nmdata->[$i] = "$type $name $object";
433 printf "reference to $name from $object\n";
/linux-4.4.14/drivers/mtd/ubi/
H A Dfastmap-wl.c19 * @wrk: the work description object
53 * @ubi: UBI device description object
54 * @pool: fastmap pool description object
83 * @ubi: UBI device description object
117 * @ubi: UBI device description object
176 * @ubi: UBI device description object
200 * @ubi: UBI device description object
258 * @ubi: UBI device description object
282 * @ubi: UBI device description object
315 * @ubi: UBI device description object
352 * @wrk: The work object to be checked
378 * @ubi: UBI device description object
H A Ddebug.c29 * @ubi: UBI device description object
105 * @vol: UBI volume description object
134 * ubi_dump_vtbl_record - dump a &struct ubi_vtbl_record object.
135 * @r: the object to dump
167 * ubi_dump_av - dump a &struct ubi_ainf_volume object.
168 * @av: the object to dump
184 * ubi_dump_aeb - dump a &struct ubi_ainf_peb object.
185 * @aeb: the object to dump
186 * @type: object type: 0 - not corrupted, 1 - corrupted
201 * ubi_dump_mkvol_req - dump a &struct ubi_mkvol_req object.
202 * @req: the object to dump
399 * @ubi: UBI device description object
506 * @ubi: UBI device description object
516 * @ubi: UBI device description object
H A Dupd.c48 * @ubi: UBI device description object
49 * @vol: volume description object
79 * @ubi: UBI device description object
80 * @vol: volume description object
119 * @ubi: UBI device description object
120 * @vol: volume description object
174 * @ubi: UBI device description object
175 * @vol: volume description object
205 * @ubi: UBI device description object
206 * @vol: volume description object
267 * @ubi: UBI device description object
268 * @vol: volume description object
381 * @ubi: UBI device description object
382 * @vol: volume description object
/linux-4.4.14/drivers/net/ethernet/brocade/bna/
H A Dbfa_cs.h42 /* oc - object class eg. bfa_ioc
44 * otype - object type, eg. struct bfa_ioc
45 * etype - object type, eg. enum ioc_event
/linux-4.4.14/arch/cris/include/uapi/asm/
H A Delf.h58 /* Variant 0; may contain v0..10 object. */
61 /* Variant 1; contains v32 object. */
64 /* Variant 2; contains object compatible with v32 and v10. */
/linux-4.4.14/drivers/staging/wilc1000/
H A Dwilc_msgqueue.h36 * @param[in,out] pHandle handle to the message queue object
51 * @param[in] pHandle handle to the message queue object
69 * @param[in] pHandle handle to the message queue object
85 * @param[in] pHandle handle to the message queue object
/linux-4.4.14/fs/exofs/
H A Dcommon.h47 * NOTE: inode# = object ID - EXOFS_OBJ_OFF
51 #define EXOFS_SUPER_ID 0x10000 /* object ID for on-disk superblock */
52 #define EXOFS_DEVTABLE_ID 0x10001 /* object ID for on-disk device table */
53 #define EXOFS_ROOT_ID 0x10002 /* object ID for root directory */
67 * inode number. This is the largest object ID that the file system supports.
88 * The file system control block - stored in object EXOFS_SUPER_ID's data.
110 __le64 s_nextid; /* Highest object ID used */
143 * The EXOFS device table - stored in object EXOFS_DEVTABLE_ID's data.
166 * The file control block - stored in an object's attributes. This is where
/linux-4.4.14/arch/sh/include/asm/
H A Datomic-irq.h8 * forward to code at the end of this object's .text section, then
/linux-4.4.14/drivers/acpi/
H A Dresource.c87 * @ares: Input ACPI resource object.
88 * @res: Output generic resource object.
90 * Check if the given ACPI resource object represents a memory resource and
92 * resource object pointed to by @res.
160 * @ares: Input ACPI resource object.
161 * @res: Output generic resource object.
163 * Check if the given ACPI resource object represents an I/O resource and
165 * resource object pointed to by @res.
269 * @ares: Input ACPI resource object.
270 * @win: Output generic resource object.
272 * Check if the given ACPI resource object represents an address space resource
274 * resource object pointed to by @win.
298 * @ares: Input ACPI resource object.
299 * @win: Output generic resource object.
301 * Check if the given ACPI resource object represents an extended address space
303 * generic resource object pointed to by @win.
403 * @ares: Input ACPI resource object.
405 * @res: Output generic resource object.
407 * Check if the given ACPI resource object represents an interrupt resource
411 * represented by the resource and populate the generic resource object pointed
413 * IORESOURCE_DISABLED will be set it that object's flags.
590 * @ares: Input ACPI resource object.
/linux-4.4.14/net/batman-adv/
H A Doriginator.c60 * batadv_orig_node_vlan_get - get an orig_node_vlan object
64 * Returns the vlan object identified by vid and belonging to orig_node or NULL
92 * object
96 * Returns NULL in case of failure or the vlan object identified by vid and
97 * belonging to orig_node otherwise. The object is created and added to the list
100 * The object is returned with refcounter increased by 1.
110 /* first look if an object for this vid already exists */ batadv_orig_node_vlan_new()
132 * the originator-vlan object
133 * @orig_vlan: the originator-vlan object to release
168 * @neigh_ifinfo: the neigh_ifinfo object to release
182 * @neigh_ifinfo: the neigh_ifinfo object to release
236 * The object is returned with refcounter increased by 1.
268 * The object is returned with refcounter increased by 1.
294 * batadv_orig_ifinfo_new - search and possibly create an orig_ifinfo object
298 * Returns NULL in case of failure or the orig_ifinfo object for the if_outgoing
299 * interface otherwise. The object is created and added to the list
302 * The object is returned with refcounter increased by 1.
346 * The object is returned with refcounter increased by 1.
375 * batadv_neigh_ifinfo_new - search and possibly create an neigh_ifinfo object
379 * Returns NULL in case of failure or the neigh_ifinfo object for the
380 * if_outgoing interface otherwise. The object is created and added to the list
383 * The object is returned with refcounter increased by 1.
456 * batadv_neigh_node_new - create and init a new neigh_node object
457 * @orig_node: originator object representing the neighbour
461 * Allocates a new neigh_node object and initialises all the generic fields.
462 * Returns the new object or NULL on failure.
511 * @orig_ifinfo: the orig_ifinfo object to release
520 /* this is the last reference to this object */ batadv_orig_ifinfo_release()
531 * @orig_ifinfo: the orig_ifinfo object to release
641 * Creates a new originator object and initialise all the generic fields.
642 * The new object is not added to the originator list.
643 * Returns the newly created object or NULL on failure.
692 /* create a vlan object for the "untagged" LAN */ batadv_orig_node_new()
/linux-4.4.14/drivers/input/serio/
H A Dserio.c158 void *object; member in struct:serio_event
189 static void serio_remove_duplicate_events(void *object, serio_remove_duplicate_events() argument
198 if (object == e->object) { serio_remove_duplicate_events()
226 serio_add_port(event->object); serio_handle_event()
230 serio_reconnect_port(event->object); serio_handle_event()
234 serio_disconnect_port(event->object); serio_handle_event()
235 serio_find_driver(event->object); serio_handle_event()
239 serio_reconnect_subtree(event->object); serio_handle_event()
243 serio_attach_driver(event->object); serio_handle_event()
247 serio_remove_duplicate_events(event->object, event->type); serio_handle_event()
256 static int serio_queue_event(void *object, struct module *owner, serio_queue_event() argument
273 if (event->object == object) { serio_queue_event()
296 event->object = object; serio_queue_event()
309 * object, be it serio port or driver.
311 static void serio_remove_pending_events(void *object) serio_remove_pending_events() argument
319 if (event->object == object) { serio_remove_pending_events()
344 serio = event->object; serio_get_pending_child()
/linux-4.4.14/net/ceph/
H A Dceph_fs.c16 /* stripe unit, object size must be non-zero, 64k increment */ ceph_file_layout_is_valid()
21 /* object size must be a multiple of stripe unit */ ceph_file_layout_is_valid()
/linux-4.4.14/include/uapi/linux/android/
H A Dbinder.h52 * This is the flattened representation of a Binder object for transfer
65 binder_uintptr_t binder; /* local object */
66 __u32 handle; /* remote object */
69 /* extra data associated with local object */
125 TF_ROOT_OBJECT = 0x04, /* contents are the component's root object */
140 binder_uintptr_t cookie; /* target object cookie */
205 * Else the remote object has acquired a primary reference.
285 * Else you have acquired a primary reference on the object.
/linux-4.4.14/include/linux/platform_data/
H A Diommu-omap.h22 * This is an omap iommu private data object, which binds an iommu user
23 * to its iommu device. This object should be placed at the iommu user's
/linux-4.4.14/sound/pci/ctxfi/
H A Dctvmem.h11 * This file contains the definition of virtual memory management object
44 /* Virtual memory management object for card device */
/linux-4.4.14/drivers/block/
H A Dosdblk.c3 osdblk.c -- Export a single SCSI OSD object as a Linux block device
25 1) Map a Linux block device to an existing OSD object.
27 In this example, we will use partition id 1234, object id 5678,
33 2) List all active blkdev<->object mappings.
45 - OSD object partition id
46 - OSD object id
50 3) Remove an active blkdev<->object mapping.
85 MODULE_DESCRIPTION("block device inside an OSD object osdblk.ko");
402 /* contact OSD, request size info about the object being mapped */ osdblk_init_disk()
461 * add map OSD object to blkdev
462 * remove unmap OSD object
509 /* new osdblk_device object */ class_osdblk_add()
546 /* initialize rest of new object */ class_osdblk_add()
610 /* remove object from list immediately */ class_osdblk_remove()

Completed in 6580 milliseconds

12345678910