/linux-4.1.27/arch/parisc/math-emu/ |
H A D | float.h | 61 #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 D | fpbits.h | 53 #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 D | cnv_float.h | 33 #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.1.27/drivers/gpu/drm/nouveau/nvkm/core/ |
H A D | object.c | 24 #include <core/object.h> 37 struct nvkm_object *object; nvkm_object_create_() local 39 object = *pobject = kzalloc(size, GFP_KERNEL); nvkm_object_create_() 40 if (!object) nvkm_object_create_() 43 nvkm_object_ref(parent, &object->parent); nvkm_object_create_() 44 nvkm_object_ref(engine, (struct nvkm_object **)&object->engine); nvkm_object_create_() 45 object->oclass = oclass; nvkm_object_create_() 46 object->oclass->handle |= pclass; nvkm_object_create_() 47 atomic_set(&object->refcount, 1); nvkm_object_create_() 48 atomic_set(&object->usecount, 0); nvkm_object_create_() 51 object->_magic = NVKM_OBJECT_MAGIC; nvkm_object_create_() 53 list_add(&object->list, &_objlist); nvkm_object_create_() 70 nvkm_object_destroy(struct nvkm_object *object) nvkm_object_destroy() argument 74 list_del(&object->list); nvkm_object_destroy() 77 nvkm_object_ref(NULL, (struct nvkm_object **)&object->engine); nvkm_object_destroy() 78 nvkm_object_ref(NULL, &object->parent); nvkm_object_destroy() 79 kfree(object); nvkm_object_destroy() 83 nvkm_object_init(struct nvkm_object *object) nvkm_object_init() argument 89 nvkm_object_fini(struct nvkm_object *object, bool suspend) nvkm_object_fini() argument 108 struct nvkm_object *object = NULL; nvkm_object_ctor() local 111 ret = ofuncs->ctor(parent, engine, oclass, data, size, &object); nvkm_object_ctor() 112 *pobject = object; nvkm_object_ctor() 119 if (object) { nvkm_object_ctor() 120 ofuncs->dtor(object); nvkm_object_ctor() 128 nv_trace(object, "created\n"); nvkm_object_ctor() 129 atomic_set(&object->refcount, 1); nvkm_object_ctor() 136 nvkm_object_dtor(struct nvkm_object *object) nvkm_object_dtor() argument 138 nv_trace(object, "destroying\n"); nvkm_object_dtor() 139 nv_ofuncs(object)->dtor(object); nvkm_object_dtor() 161 nvkm_object_inc(struct nvkm_object *object) nvkm_object_inc() argument 163 int ref = atomic_add_return(1, &object->usecount); nvkm_object_inc() 166 nv_trace(object, "use(+1) == %d\n", atomic_read(&object->usecount)); nvkm_object_inc() 170 nv_trace(object, "initialising...\n"); nvkm_object_inc() 171 if (object->parent) { nvkm_object_inc() 172 ret = nvkm_object_inc(object->parent); nvkm_object_inc() 174 nv_error(object, "parent failed, %d\n", ret); nvkm_object_inc() 179 if (object->engine) { nvkm_object_inc() 180 mutex_lock(&nv_subdev(object->engine)->mutex); nvkm_object_inc() 181 ret = nvkm_object_inc(&object->engine->subdev.object); nvkm_object_inc() 182 mutex_unlock(&nv_subdev(object->engine)->mutex); nvkm_object_inc() 184 nv_error(object, "engine failed, %d\n", ret); nvkm_object_inc() 189 ret = nv_ofuncs(object)->init(object); nvkm_object_inc() 190 atomic_set(&object->usecount, 1); nvkm_object_inc() 192 nv_error(object, "init failed, %d\n", ret); nvkm_object_inc() 196 nv_trace(object, "initialised\n"); nvkm_object_inc() 200 if (object->engine) { nvkm_object_inc() 201 mutex_lock(&nv_subdev(object->engine)->mutex); nvkm_object_inc() 202 nvkm_object_dec(&object->engine->subdev.object, false); nvkm_object_inc() 203 mutex_unlock(&nv_subdev(object->engine)->mutex); nvkm_object_inc() 206 if (object->parent) nvkm_object_inc() 207 nvkm_object_dec(object->parent, false); nvkm_object_inc() 209 atomic_dec(&object->usecount); nvkm_object_inc() 214 nvkm_object_decf(struct nvkm_object *object) nvkm_object_decf() argument 218 nv_trace(object, "stopping...\n"); nvkm_object_decf() 220 ret = nv_ofuncs(object)->fini(object, false); nvkm_object_decf() 221 atomic_set(&object->usecount, 0); nvkm_object_decf() 223 nv_warn(object, "failed fini, %d\n", ret); nvkm_object_decf() 225 if (object->engine) { nvkm_object_decf() 226 mutex_lock(&nv_subdev(object->engine)->mutex); nvkm_object_decf() 227 nvkm_object_dec(&object->engine->subdev.object, false); nvkm_object_decf() 228 mutex_unlock(&nv_subdev(object->engine)->mutex); nvkm_object_decf() 231 if (object->parent) nvkm_object_decf() 232 nvkm_object_dec(object->parent, false); nvkm_object_decf() 234 nv_trace(object, "stopped\n"); nvkm_object_decf() 239 nvkm_object_decs(struct nvkm_object *object) nvkm_object_decs() argument 243 nv_trace(object, "suspending...\n"); nvkm_object_decs() 245 ret = nv_ofuncs(object)->fini(object, true); nvkm_object_decs() 246 atomic_set(&object->usecount, 0); nvkm_object_decs() 248 nv_error(object, "failed suspend, %d\n", ret); nvkm_object_decs() 252 if (object->engine) { nvkm_object_decs() 253 mutex_lock(&nv_subdev(object->engine)->mutex); nvkm_object_decs() 254 ret = nvkm_object_dec(&object->engine->subdev.object, true); nvkm_object_decs() 255 mutex_unlock(&nv_subdev(object->engine)->mutex); nvkm_object_decs() 257 nv_warn(object, "engine failed suspend, %d\n", ret); nvkm_object_decs() 262 if (object->parent) { nvkm_object_decs() 263 ret = nvkm_object_dec(object->parent, true); nvkm_object_decs() 265 nv_warn(object, "parent failed suspend, %d\n", ret); nvkm_object_decs() 270 nv_trace(object, "suspended\n"); nvkm_object_decs() 274 if (object->engine) { nvkm_object_decs() 275 mutex_lock(&nv_subdev(object->engine)->mutex); nvkm_object_decs() 276 rret = nvkm_object_inc(&object->engine->subdev.object); nvkm_object_decs() 277 mutex_unlock(&nv_subdev(object->engine)->mutex); nvkm_object_decs() 279 nv_fatal(object, "engine failed to reinit, %d\n", rret); nvkm_object_decs() 283 rret = nv_ofuncs(object)->init(object); nvkm_object_decs() 285 nv_fatal(object, "failed to reinit, %d\n", rret); nvkm_object_decs() 291 nvkm_object_dec(struct nvkm_object *object, bool suspend) nvkm_object_dec() argument 293 int ref = atomic_add_return(-1, &object->usecount); nvkm_object_dec() 296 nv_trace(object, "use(-1) == %d\n", atomic_read(&object->usecount)); nvkm_object_dec() 300 ret = nvkm_object_decs(object); nvkm_object_dec() 302 ret = nvkm_object_decf(object); nvkm_object_dec() 305 atomic_inc(&object->usecount); nvkm_object_dec() 317 struct nvkm_object *object; nvkm_object_debug() local 320 nv_fatal(NULL, "* AIIIII! object(s) still exist!!!\n"); nvkm_object_debug() 322 list_for_each_entry(object, &_objlist, list) { nvkm_object_debug() 323 nv_fatal(object, "%p/%p/%d/%d\n", nvkm_object_debug() 324 object->parent, object->engine, nvkm_object_debug() 325 atomic_read(&object->refcount), nvkm_object_debug() 326 atomic_read(&object->usecount)); nvkm_object_debug()
|
H A D | ioctl.c | 36 struct nvkm_object *object = handle->object; nvkm_ioctl_nop() local 42 nv_ioctl(object, "nop size %d\n", size); nvkm_ioctl_nop() 44 nv_ioctl(object, "nop\n"); nvkm_ioctl_nop() 53 struct nvkm_object *object = handle->object; nvkm_ioctl_sclass() local 59 if (!nv_iclass(object, NV_PARENT_CLASS)) { nvkm_ioctl_sclass() 60 nv_debug(object, "cannot have children (sclass)\n"); nvkm_ioctl_sclass() 64 nv_ioctl(object, "sclass size %d\n", size); nvkm_ioctl_sclass() 66 nv_ioctl(object, "sclass vers %d count %d\n", nvkm_ioctl_sclass() 69 ret = nvkm_parent_lclass(object, args->v0.oclass, nvkm_ioctl_sclass() 89 struct nvkm_client *client = nvkm_client(handle->object); nvkm_ioctl_new() 91 struct nvkm_object *object = NULL; nvkm_ioctl_new() local 110 if (!nv_iclass(handle->object, NV_PARENT_CLASS)) { nvkm_ioctl_new() 111 nv_debug(handle->object, "cannot have children (ctor)\n"); nvkm_ioctl_new() 116 parent = nv_parent(handle->object); nvkm_ioctl_new() 119 ret = nvkm_parent_sclass(&parent->object, _oclass, &engine, &oclass); nvkm_ioctl_new() 135 /* if engine requires it, create a context object to insert nvkm_ioctl_new() 139 ret = nvkm_object_ctor(&parent->object, engine, nvkm_ioctl_new() 145 nvkm_object_ref(&parent->object, &engctx); nvkm_ioctl_new() 148 /* finally, create new object and bind it to its handle */ nvkm_ioctl_new() 149 ret = nvkm_object_ctor(engctx, engine, oclass, data, size, &object); nvkm_ioctl_new() 150 client->data = object; nvkm_ioctl_new() 154 ret = nvkm_object_inc(object); nvkm_ioctl_new() 158 ret = nvkm_handle_create(&parent->object, handle->name, nvkm_ioctl_new() 159 _handle, object, &handle); nvkm_ioctl_new() 170 nvkm_object_dec(object, false); nvkm_ioctl_new() 172 nvkm_object_ref(NULL, &object); nvkm_ioctl_new() 185 struct nvkm_object *object = handle->object; nvkm_ioctl_del() local 191 nv_ioctl(object, "delete size %d\n", size); nvkm_ioctl_del() 193 nv_ioctl(object, "delete\n"); nvkm_ioctl_del() 204 struct nvkm_object *object = handle->object; nvkm_ioctl_mthd() local 205 struct nvkm_ofuncs *ofuncs = object->oclass->ofuncs; nvkm_ioctl_mthd() 211 nv_ioctl(object, "mthd size %d\n", size); nvkm_ioctl_mthd() 213 nv_ioctl(object, "mthd vers %d mthd %02x\n", nvkm_ioctl_mthd() 216 ret = ofuncs->mthd(object, args->v0.method, data, size); nvkm_ioctl_mthd() 226 struct nvkm_object *object = handle->object; nvkm_ioctl_rd() local 227 struct nvkm_ofuncs *ofuncs = object->oclass->ofuncs; nvkm_ioctl_rd() 233 nv_ioctl(object, "rd size %d\n", size); nvkm_ioctl_rd() 235 nv_ioctl(object, "rd vers %d size %d addr %016llx\n", nvkm_ioctl_rd() 240 args->v0.data = nv_ro08(object, args->v0.addr); nvkm_ioctl_rd() 246 args->v0.data = nv_ro16(object, args->v0.addr); nvkm_ioctl_rd() 252 args->v0.data = nv_ro32(object, args->v0.addr); nvkm_ioctl_rd() 268 struct nvkm_object *object = handle->object; nvkm_ioctl_wr() local 269 struct nvkm_ofuncs *ofuncs = object->oclass->ofuncs; nvkm_ioctl_wr() 275 nv_ioctl(object, "wr size %d\n", size); nvkm_ioctl_wr() 277 nv_ioctl(object, "wr vers %d size %d addr %016llx data %08x\n", nvkm_ioctl_wr() 283 nv_wo08(object, args->v0.addr, args->v0.data); nvkm_ioctl_wr() 289 nv_wo16(object, args->v0.addr, args->v0.data); nvkm_ioctl_wr() 295 nv_wo32(object, args->v0.addr, args->v0.data); nvkm_ioctl_wr() 311 struct nvkm_object *object = handle->object; nvkm_ioctl_map() local 312 struct nvkm_ofuncs *ofuncs = object->oclass->ofuncs; nvkm_ioctl_map() 318 nv_ioctl(object, "map size %d\n", size); nvkm_ioctl_map() 320 nv_ioctl(object, "map vers %d\n", args->v0.version); nvkm_ioctl_map() 322 ret = ofuncs->map(object, &args->v0.handle, nvkm_ioctl_map() 333 struct nvkm_object *object = handle->object; nvkm_ioctl_unmap() local 339 nv_ioctl(object, "unmap size %d\n", size); nvkm_ioctl_unmap() 341 nv_ioctl(object, "unmap\n"); nvkm_ioctl_unmap() 350 struct nvkm_object *object = handle->object; nvkm_ioctl_ntfy_new() local 351 struct nvkm_ofuncs *ofuncs = object->oclass->ofuncs; nvkm_ioctl_ntfy_new() 358 nv_ioctl(object, "ntfy new size %d\n", size); nvkm_ioctl_ntfy_new() 360 nv_ioctl(object, "ntfy new vers %d event %02x\n", nvkm_ioctl_ntfy_new() 363 ret = ofuncs->ntfy(object, args->v0.event, &event); nvkm_ioctl_ntfy_new() 365 ret = nvkm_client_notify_new(object, event, data, size); nvkm_ioctl_ntfy_new() 379 struct nvkm_client *client = nvkm_client(handle->object); nvkm_ioctl_ntfy_del() 380 struct nvkm_object *object = handle->object; nvkm_ioctl_ntfy_del() local 386 nv_ioctl(object, "ntfy del size %d\n", size); nvkm_ioctl_ntfy_del() 388 nv_ioctl(object, "ntfy del vers %d index %d\n", nvkm_ioctl_ntfy_del() 399 struct nvkm_client *client = nvkm_client(handle->object); nvkm_ioctl_ntfy_get() 400 struct nvkm_object *object = handle->object; nvkm_ioctl_ntfy_get() local 406 nv_ioctl(object, "ntfy get size %d\n", size); nvkm_ioctl_ntfy_get() 408 nv_ioctl(object, "ntfy get vers %d index %d\n", nvkm_ioctl_ntfy_get() 419 struct nvkm_client *client = nvkm_client(handle->object); nvkm_ioctl_ntfy_put() 420 struct nvkm_object *object = handle->object; nvkm_ioctl_ntfy_put() local 426 nv_ioctl(object, "ntfy put size %d\n", size); nvkm_ioctl_ntfy_put() 428 nv_ioctl(object, "ntfy put vers %d index %d\n", nvkm_ioctl_ntfy_put() 462 struct nvkm_object *object; nvkm_ioctl_path() local 465 while ((object = parent->object), nr--) { nvkm_ioctl_path() 466 nv_ioctl(object, "path 0x%08x\n", path[nr]); nvkm_ioctl_path() 467 if (!nv_iclass(object, NV_PARENT_CLASS)) { nvkm_ioctl_path() 468 nv_debug(object, "cannot have children (path)\n"); nvkm_ioctl_path() 472 if (!(namedb = (void *)nv_pclass(object, NV_NAMEDB_CLASS)) || nvkm_ioctl_path() 474 nv_debug(object, "handle 0x%08x not found\n", path[nr]); nvkm_ioctl_path() 482 nv_ioctl(object, "object route != owner\n"); nvkm_ioctl_path()
|
H A D | subdev.c | 31 struct nvkm_object *object = nv_object(obj); nvkm_subdev() local 32 while (object && !nv_iclass(object, NV_SUBDEV_CLASS)) nvkm_subdev() 33 object = object->parent; nvkm_subdev() 34 if (object == NULL || nv_subidx(nv_subdev(object)) != idx) nvkm_subdev() 35 object = nv_device(obj)->subdev[idx]; nvkm_subdev() 36 return object ? nv_subdev(object) : NULL; nvkm_subdev() 50 int ret = nvkm_object_init(&subdev->object); nvkm_subdev_init() 54 nvkm_subdev_reset(&subdev->object); nvkm_subdev_init() 59 _nvkm_subdev_init(struct nvkm_object *object) _nvkm_subdev_init() argument 61 return nvkm_subdev_init(nv_subdev(object)); _nvkm_subdev_init() 72 return nvkm_object_fini(&subdev->object, suspend); nvkm_subdev_fini() 76 _nvkm_subdev_fini(struct nvkm_object *object, bool suspend) _nvkm_subdev_fini() argument 78 return nvkm_subdev_fini(nv_subdev(object), suspend); _nvkm_subdev_fini() 86 nvkm_object_destroy(&subdev->object); nvkm_subdev_destroy() 90 _nvkm_subdev_dtor(struct nvkm_object *object) _nvkm_subdev_dtor() argument 92 nvkm_subdev_destroy(nv_subdev(object)); _nvkm_subdev_dtor()
|
H A D | printk.c | 31 nv_printk_(struct nvkm_object *object, int level, const char *fmt, ...) nv_printk_() argument 60 if (object && !nv_iclass(object, NV_CLIENT_CLASS)) { nv_printk_() 65 if (object->engine == NULL) { nv_printk_() 66 subdev = object; nv_printk_() 70 subdev = &object->engine->subdev.object; nv_printk_() 77 if (object != subdev) { nv_printk_() 79 nv_hclass(object)); nv_printk_() 90 if (object && nv_iclass(object, NV_CLIENT_CLASS)) { nv_printk_() 91 if (level > nv_client(object)->debug) nv_printk_() 95 name[level], nv_client(object)->name, fmt); nv_printk_()
|
H A D | namedb.c | 47 if (nv_mclass(handle->object) == oclass) nvkm_namedb_lookup_class() 60 if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { nvkm_namedb_lookup_vinst() 61 if (nv_gpuobj(handle->object)->addr == vinst) nvkm_namedb_lookup_vinst() 75 if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { nvkm_namedb_lookup_cinst() 76 if (nv_gpuobj(handle->object)->node && nvkm_namedb_lookup_cinst() 77 nv_gpuobj(handle->object)->node->offset == cinst) nvkm_namedb_lookup_cinst() 87 struct nvkm_object *object, nvkm_namedb_insert() 93 nvkm_object_ref(object, &handle->object); nvkm_namedb_insert() 106 struct nvkm_object *object = handle->object; nvkm_namedb_remove() local 110 nvkm_object_ref(NULL, &object); nvkm_namedb_remove() 190 struct nvkm_namedb *object; _nvkm_namedb_ctor() local 193 ret = nvkm_namedb_create(parent, engine, oclass, 0, NULL, 0, &object); _nvkm_namedb_ctor() 194 *pobject = nv_object(object); _nvkm_namedb_ctor() 86 nvkm_namedb_insert(struct nvkm_namedb *namedb, u32 name, struct nvkm_object *object, struct nvkm_handle *handle) nvkm_namedb_insert() argument
|
H A D | engctx.c | 58 /* check if this engine already has a context for the parent object, nvkm_engctx_create_() 85 * it's not possible to allocate the object with it held. nvkm_engctx_create_() 106 struct nvkm_engine *engine = engctx->gpuobj.object.engine; nvkm_engctx_destroy() 121 nvkm_object_destroy(&engctx->gpuobj.object); nvkm_engctx_destroy() 127 struct nvkm_object *object = nv_object(engctx); nvkm_engctx_init() local 128 struct nvkm_subdev *subdev = nv_subdev(object->engine); nvkm_engctx_init() 137 parent = nv_pclass(object->parent, NV_PARENT_CLASS); nvkm_engctx_init() 141 ret = nv_parent(parent)->context_attach(parent, object); nvkm_engctx_init() 158 struct nvkm_object *object = nv_object(engctx); nvkm_engctx_fini() local 159 struct nvkm_subdev *subdev = nv_subdev(object->engine); nvkm_engctx_fini() 164 parent = nv_pclass(object->parent, NV_PARENT_CLASS); nvkm_engctx_fini() 168 ret = nv_parent(parent)->context_detach(parent, suspend, object); nvkm_engctx_fini() 197 _nvkm_engctx_dtor(struct nvkm_object *object) _nvkm_engctx_dtor() argument 199 nvkm_engctx_destroy(nv_engctx(object)); _nvkm_engctx_dtor() 203 _nvkm_engctx_init(struct nvkm_object *object) _nvkm_engctx_init() argument 205 return nvkm_engctx_init(nv_engctx(object)); _nvkm_engctx_init() 209 _nvkm_engctx_fini(struct nvkm_object *object, bool suspend) _nvkm_engctx_fini() argument 211 return nvkm_engctx_fini(nv_engctx(object), suspend); _nvkm_engctx_fini() 232 nvkm_engctx_put(struct nvkm_object *object) nvkm_engctx_put() argument 234 if (object) { nvkm_engctx_put() 235 struct nvkm_engine *engine = nv_engine(object->engine); nvkm_engctx_put() 236 struct nvkm_engctx *engctx = nv_engctx(object); nvkm_engctx_put()
|
H A D | handle.c | 28 struct nvkm_client *c = nvkm_client((h)->object); \ 40 ret = nvkm_object_inc(handle->object); nvkm_handle_init() 59 nvkm_object_dec(handle->object, false); nvkm_handle_init() 78 if (handle->object) { nvkm_handle_fini() 79 ret = nvkm_object_dec(handle->object, suspend); nvkm_handle_fini() 99 struct nvkm_object *object, struct nvkm_handle **phandle) nvkm_handle_create() 118 ret = nvkm_namedb_insert(nv_namedb(namedb), _handle, object, handle); nvkm_handle_create() 125 ret = nv_parent(parent)->object_attach(parent, object, _handle); nvkm_handle_create() 134 if (object != namedb) { nvkm_handle_create() 162 struct nvkm_object *parent = handle->parent->object; nvkm_handle_destroy() 174 struct nvkm_object *object = NULL; nvkm_handle_ref() local 182 nvkm_object_ref(handle->object, &object); nvkm_handle_ref() 186 return object; nvkm_handle_ref() 98 nvkm_handle_create(struct nvkm_object *parent, u32 _parent, u32 _handle, struct nvkm_object *object, struct nvkm_handle **phandle) nvkm_handle_create() argument
|
H A D | parent.c | 41 *pengine = &parent->engine->subdev.object; nvkm_parent_sclass() 115 struct nvkm_parent *object; nvkm_parent_create_() local 121 object = *pobject; nvkm_parent_create_() 130 nclass->sclass = object->sclass; nvkm_parent_create_() 131 object->sclass = nclass; nvkm_parent_create_() 137 object->engine = engcls; nvkm_parent_create_() 151 nvkm_object_destroy(&parent->object); nvkm_parent_destroy() 156 _nvkm_parent_dtor(struct nvkm_object *object) _nvkm_parent_dtor() argument 158 nvkm_parent_destroy(nv_parent(object)); _nvkm_parent_dtor()
|
H A D | gpuobj.c | 47 nvkm_object_destroy(&gpuobj->object); nvkm_gpuobj_destroy() 148 struct nvkm_gpuobj *object; _nvkm_gpuobj_ctor() local 153 &object); _nvkm_gpuobj_ctor() 154 *pobject = nv_object(object); _nvkm_gpuobj_ctor() 162 _nvkm_gpuobj_dtor(struct nvkm_object *object) _nvkm_gpuobj_dtor() argument 164 nvkm_gpuobj_destroy(nv_gpuobj(object)); _nvkm_gpuobj_dtor() 168 _nvkm_gpuobj_init(struct nvkm_object *object) _nvkm_gpuobj_init() argument 170 return nvkm_gpuobj_init(nv_gpuobj(object)); _nvkm_gpuobj_init() 174 _nvkm_gpuobj_fini(struct nvkm_object *object, bool suspend) _nvkm_gpuobj_fini() argument 176 return nvkm_gpuobj_fini(nv_gpuobj(object), suspend); _nvkm_gpuobj_fini() 180 _nvkm_gpuobj_rd32(struct nvkm_object *object, u64 addr) _nvkm_gpuobj_rd32() argument 182 struct nvkm_gpuobj *gpuobj = nv_gpuobj(object); _nvkm_gpuobj_rd32() 190 _nvkm_gpuobj_wr32(struct nvkm_object *object, u64 addr, u32 data) _nvkm_gpuobj_wr32() argument 192 struct nvkm_gpuobj *gpuobj = nv_gpuobj(object); _nvkm_gpuobj_wr32() 226 engine = &engine->engine->subdev.object; nvkm_gpuobj_new() 276 /* the below is basically only here to support sharing the paged dma object 282 nvkm_gpudup_dtor(struct nvkm_object *object) nvkm_gpudup_dtor() argument 284 struct nvkm_gpuobj *gpuobj = (void *)object; nvkm_gpudup_dtor() 286 nvkm_object_destroy(&gpuobj->object); nvkm_gpudup_dtor() 306 ret = nvkm_object_create(parent, &parent->engine->subdev.object, nvkm_gpuobj_dup()
|
H A D | client.c | 91 nvkm_client_notify_new(struct nvkm_object *object, nvkm_client_notify_new() argument 94 struct nvkm_client *client = nvkm_client(object); nvkm_client_notify_new() 128 ret = nvkm_notify_init(object, event, nvkm_client_notify, nvkm_client_notify_new() 142 nvkm_client_mthd_devlist(struct nvkm_object *object, void *data, u32 size) nvkm_client_mthd_devlist() argument 149 nv_ioctl(object, "client devlist size %d\n", size); nvkm_client_mthd_devlist() 151 nv_ioctl(object, "client devlist vers %d count %d\n", nvkm_client_mthd_devlist() 168 nvkm_client_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_client_mthd() argument 172 return nvkm_client_mthd_devlist(object, data, size); nvkm_client_mthd() 180 nvkm_client_dtor(struct nvkm_object *object) nvkm_client_dtor() argument 182 struct nvkm_client *client = (void *)object; nvkm_client_dtor() 252 nv_debug(client, "%s object\n", name[suspend]); nvkm_client_fini()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/ |
H A D | priv.h | 5 int _nvkm_fuse_init(struct nvkm_object *object); 6 void _nvkm_fuse_dtor(struct nvkm_object *object);
|
H A D | base.c | 27 _nvkm_fuse_init(struct nvkm_object *object) _nvkm_fuse_init() argument 29 struct nvkm_fuse *fuse = (void *)object; _nvkm_fuse_init() 34 _nvkm_fuse_dtor(struct nvkm_object *object) _nvkm_fuse_dtor() argument 36 struct nvkm_fuse *fuse = (void *)object; _nvkm_fuse_dtor()
|
H A D | gm107.c | 31 gm107_fuse_rd32(struct nvkm_object *object, u64 addr) gm107_fuse_rd32() argument 33 struct gf100_fuse_priv *priv = (void *)object; gm107_fuse_rd32()
|
/linux-4.1.27/fs/fscache/ |
H A D | operation.c | 29 * This will get its own ref on the object. 34 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_enqueue_operation() 38 ASSERT(fscache_object_is_available(op->object)); fscache_enqueue_operation() 64 static void fscache_run_op(struct fscache_object *object, fscache_run_op() argument 70 object->n_in_progress++; fscache_run_op() 79 * submit an exclusive operation for an object 83 int fscache_submit_exclusive_op(struct fscache_object *object, fscache_submit_exclusive_op() argument 88 _enter("{OBJ%x OP%x},", object->debug_id, op->debug_id); fscache_submit_exclusive_op() 93 spin_lock(&object->lock); fscache_submit_exclusive_op() 94 ASSERTCMP(object->n_ops, >=, object->n_in_progress); fscache_submit_exclusive_op() 95 ASSERTCMP(object->n_ops, >=, object->n_exclusive); fscache_submit_exclusive_op() 99 if (fscache_object_is_active(object)) { fscache_submit_exclusive_op() 100 op->object = object; fscache_submit_exclusive_op() 101 object->n_ops++; fscache_submit_exclusive_op() 102 object->n_exclusive++; /* reads and writes must wait */ fscache_submit_exclusive_op() 104 if (object->n_in_progress > 0) { fscache_submit_exclusive_op() 106 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_exclusive_op() 108 } else if (!list_empty(&object->pending_ops)) { fscache_submit_exclusive_op() 110 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_exclusive_op() 112 fscache_start_operations(object); fscache_submit_exclusive_op() 114 ASSERTCMP(object->n_in_progress, ==, 0); fscache_submit_exclusive_op() 115 fscache_run_op(object, op); fscache_submit_exclusive_op() 119 clear_bit(FSCACHE_OBJECT_PENDING_WRITE, &object->flags); fscache_submit_exclusive_op() 121 } else if (test_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)) { fscache_submit_exclusive_op() 122 op->object = object; fscache_submit_exclusive_op() 123 object->n_ops++; fscache_submit_exclusive_op() 124 object->n_exclusive++; /* reads and writes must wait */ fscache_submit_exclusive_op() 126 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_exclusive_op() 133 ASSERT(test_bit(FSCACHE_IOERROR, &object->cache->flags)); fscache_submit_exclusive_op() 137 spin_unlock(&object->lock); fscache_submit_exclusive_op() 144 static void fscache_report_unexpected_submission(struct fscache_object *object, fscache_report_unexpected_submission() argument 157 op->debug_id, object->debug_id, object->state->name); fscache_report_unexpected_submission() 158 kdebug("objstate=%s [%s]", object->state->name, ostate->name); fscache_report_unexpected_submission() 159 kdebug("objflags=%lx", object->flags); fscache_report_unexpected_submission() 160 kdebug("objevent=%lx [%lx]", object->events, object->event_mask); fscache_report_unexpected_submission() 162 object->n_ops, object->n_in_progress, object->n_exclusive); fscache_report_unexpected_submission() 164 if (!list_empty(&object->pending_ops)) { fscache_report_unexpected_submission() 166 list_for_each_entry(p, &object->pending_ops, pend_link) { fscache_report_unexpected_submission() 167 ASSERTCMP(p->object, ==, object); fscache_report_unexpected_submission() 179 * submit an operation for an object 181 * - during object creation (write ops may be submitted) 182 * - whilst the object is active 186 int fscache_submit_op(struct fscache_object *object, fscache_submit_op() argument 193 object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_submit_op() 198 spin_lock(&object->lock); fscache_submit_op() 199 ASSERTCMP(object->n_ops, >=, object->n_in_progress); fscache_submit_op() 200 ASSERTCMP(object->n_ops, >=, object->n_exclusive); fscache_submit_op() 203 ostate = object->state; fscache_submit_op() 207 if (fscache_object_is_active(object)) { fscache_submit_op() 208 op->object = object; fscache_submit_op() 209 object->n_ops++; fscache_submit_op() 211 if (object->n_exclusive > 0) { fscache_submit_op() 213 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_op() 215 } else if (!list_empty(&object->pending_ops)) { fscache_submit_op() 217 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_op() 219 fscache_start_operations(object); fscache_submit_op() 221 ASSERTCMP(object->n_exclusive, ==, 0); fscache_submit_op() 222 fscache_run_op(object, op); fscache_submit_op() 225 } else if (test_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)) { fscache_submit_op() 226 op->object = object; fscache_submit_op() 227 object->n_ops++; fscache_submit_op() 229 list_add_tail(&op->pend_link, &object->pending_ops); fscache_submit_op() 232 } else if (fscache_object_is_dying(object)) { fscache_submit_op() 236 } else if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) { fscache_submit_op() 237 fscache_report_unexpected_submission(object, op, ostate); fscache_submit_op() 238 ASSERT(!fscache_object_is_active(object)); fscache_submit_op() 246 spin_unlock(&object->lock); fscache_submit_op() 251 * queue an object for withdrawal on error, aborting all following asynchronous 254 void fscache_abort_object(struct fscache_object *object) fscache_abort_object() argument 256 _enter("{OBJ%x}", object->debug_id); fscache_abort_object() 258 fscache_raise_event(object, FSCACHE_OBJECT_EV_ERROR); fscache_abort_object() 262 * Jump start the operation processing on an object. The caller must hold 263 * object->lock. 265 void fscache_start_operations(struct fscache_object *object) fscache_start_operations() argument 270 while (!list_empty(&object->pending_ops) && !stop) { fscache_start_operations() 271 op = list_entry(object->pending_ops.next, fscache_start_operations() 275 if (object->n_in_progress > 0) fscache_start_operations() 280 fscache_run_op(object, op); fscache_start_operations() 282 /* the pending queue was holding a ref on the object */ fscache_start_operations() 286 ASSERTCMP(object->n_in_progress, <=, object->n_ops); fscache_start_operations() 289 object->n_in_progress, object->debug_id); fscache_start_operations() 293 * cancel an operation that's pending on an object 298 struct fscache_object *object = op->object; fscache_cancel_op() local 301 _enter("OBJ%x OP%x}", op->object->debug_id, op->debug_id); fscache_cancel_op() 307 spin_lock(&object->lock); fscache_cancel_op() 318 object->n_exclusive--; fscache_cancel_op() 325 spin_unlock(&object->lock); fscache_cancel_op() 331 * Cancel all pending operations on an object 333 void fscache_cancel_all_ops(struct fscache_object *object) fscache_cancel_all_ops() argument 337 _enter("OBJ%x", object->debug_id); fscache_cancel_all_ops() 339 spin_lock(&object->lock); fscache_cancel_all_ops() 341 while (!list_empty(&object->pending_ops)) { fscache_cancel_all_ops() 342 op = list_entry(object->pending_ops.next, fscache_cancel_all_ops() 351 object->n_exclusive--; fscache_cancel_all_ops() 355 cond_resched_lock(&object->lock); fscache_cancel_all_ops() 358 spin_unlock(&object->lock); fscache_cancel_all_ops() 367 struct fscache_object *object = op->object; fscache_op_complete() local 369 _enter("OBJ%x", object->debug_id); fscache_op_complete() 372 ASSERTCMP(object->n_in_progress, >, 0); fscache_op_complete() 374 object->n_exclusive, >, 0); fscache_op_complete() 376 object->n_in_progress, ==, 1); fscache_op_complete() 378 spin_lock(&object->lock); fscache_op_complete() 384 object->n_exclusive--; fscache_op_complete() 385 object->n_in_progress--; fscache_op_complete() 386 if (object->n_in_progress == 0) fscache_op_complete() 387 fscache_start_operations(object); fscache_op_complete() 389 spin_unlock(&object->lock); fscache_op_complete() 400 struct fscache_object *object; fscache_put_operation() local 404 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_put_operation() 423 object = op->object; fscache_put_operation() 426 atomic_dec(&object->n_reads); fscache_put_operation() 428 fscache_unuse_cookie(object); fscache_put_operation() 430 /* now... we may get called with the object spinlock held, so we fscache_put_operation() 433 if (!spin_trylock(&object->lock)) { fscache_put_operation() 437 cache = object->cache; fscache_put_operation() 446 ASSERTCMP(object->n_ops, >, 0); fscache_put_operation() 447 object->n_ops--; fscache_put_operation() 448 if (object->n_ops == 0) fscache_put_operation() 449 fscache_raise_event(object, FSCACHE_OBJECT_EV_CLEARED); fscache_put_operation() 451 spin_unlock(&object->lock); fscache_put_operation() 464 struct fscache_object *object; fscache_operation_gc() local 483 object = op->object; fscache_operation_gc() 484 spin_lock(&object->lock); fscache_operation_gc() 487 object->debug_id, op->debug_id); fscache_operation_gc() 493 ASSERTCMP(object->n_ops, >, 0); fscache_operation_gc() 494 object->n_ops--; fscache_operation_gc() 495 if (object->n_ops == 0) fscache_operation_gc() 496 fscache_raise_event(object, FSCACHE_OBJECT_EV_CLEARED); fscache_operation_gc() 498 spin_unlock(&object->lock); fscache_operation_gc() 511 * the caller holds a ref to this object, so we don't need to hold one 520 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); fscache_op_work_func()
|
H A D | object.c | 1 /* 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 * Abort object initialisation before we start it. 333 static const struct fscache_state *fscache_abort_initialisation(struct fscache_object *object, fscache_abort_initialisation() argument 336 _enter("{OBJ%x},%d", object->debug_id, event); fscache_abort_initialisation() 338 object->oob_event_mask = 0; fscache_abort_initialisation() 339 fscache_dequeue_object(object); fscache_abort_initialisation() 344 * initialise an object 345 * - check the specified object's parent to see if we can make use of it 350 static const struct fscache_state *fscache_initialise_object(struct fscache_object *object, fscache_initialise_object() argument 356 _enter("{OBJ%x},%d", object->debug_id, event); fscache_initialise_object() 358 ASSERT(list_empty(&object->dep_link)); fscache_initialise_object() 360 parent = object->parent; fscache_initialise_object() 384 object->cache->ops->grab_object(object)) { fscache_initialise_object() 385 list_add(&object->dep_link, &parent->dependents); fscache_initialise_object() 403 * Once the parent object is ready, we should kick off our lookup op. 405 static const struct fscache_state *fscache_parent_ready(struct fscache_object *object, fscache_parent_ready() argument 408 struct fscache_object *parent = object->parent; fscache_parent_ready() 410 _enter("{OBJ%x},%d", object->debug_id, event); fscache_parent_ready() 417 object->lookup_jif = jiffies; fscache_parent_ready() 425 * look an object up in the cache from which it was allocated 426 * - we hold an "access lock" on the parent object, so the parent object cannot 429 static const struct fscache_state *fscache_look_up_object(struct fscache_object *object, fscache_look_up_object() argument 432 struct fscache_cookie *cookie = object->cookie; fscache_look_up_object() 433 struct fscache_object *parent = object->parent; fscache_look_up_object() 436 _enter("{OBJ%x},%d", object->debug_id, event); fscache_look_up_object() 438 object->oob_table = fscache_osm_lookup_oob; fscache_look_up_object() 448 test_bit(FSCACHE_IOERROR, &object->cache->flags) || fscache_look_up_object() 449 !fscache_use_cookie(object)) { fscache_look_up_object() 455 cookie->def->name, object->cache->tag->name); fscache_look_up_object() 459 ret = object->cache->ops->lookup_object(object); fscache_look_up_object() 462 fscache_unuse_cookie(object); fscache_look_up_object() 465 /* probably stuck behind another object, so move this one to fscache_look_up_object() 483 * @object: Object pointing to cookie to mark 486 * existing backing object to continue as there's no data for them to read. 488 void fscache_object_lookup_negative(struct fscache_object *object) fscache_object_lookup_negative() argument 490 struct fscache_cookie *cookie = object->cookie; fscache_object_lookup_negative() 492 _enter("{OBJ%x,%s}", object->debug_id, object->state->name); fscache_object_lookup_negative() 494 if (!test_and_set_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)) { fscache_object_lookup_negative() 512 * fscache_obtained_object - Note successful object lookup or creation 513 * @object: Object pointing to cookie to mark 516 * data to a backing object to continue. 518 * Note that after calling this, an object's cookie may be relinquished by the 519 * netfs, and so must be accessed with object lock held. 521 void fscache_obtained_object(struct fscache_object *object) fscache_obtained_object() argument 523 struct fscache_cookie *cookie = object->cookie; fscache_obtained_object() 525 _enter("{OBJ%x,%s}", object->debug_id, object->state->name); fscache_obtained_object() 529 if (!test_and_set_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)) { fscache_obtained_object() 545 set_bit(FSCACHE_OBJECT_IS_AVAILABLE, &object->flags); fscache_obtained_object() 551 * handle an object that has just become available 553 static const struct fscache_state *fscache_object_available(struct fscache_object *object, fscache_object_available() argument 556 _enter("{OBJ%x},%d", object->debug_id, event); fscache_object_available() 558 object->oob_table = fscache_osm_run_oob; fscache_object_available() 560 spin_lock(&object->lock); fscache_object_available() 562 fscache_done_parent_op(object); fscache_object_available() 563 if (object->n_in_progress == 0) { fscache_object_available() 564 if (object->n_ops > 0) { fscache_object_available() 565 ASSERTCMP(object->n_ops, >=, object->n_obj_ops); fscache_object_available() 566 fscache_start_operations(object); fscache_object_available() 568 ASSERT(list_empty(&object->pending_ops)); fscache_object_available() 571 spin_unlock(&object->lock); fscache_object_available() 574 object->cache->ops->lookup_complete(object); fscache_object_available() 577 fscache_hist(fscache_obj_instantiate_histogram, object->lookup_jif); fscache_object_available() 585 * Wake up this object's dependent objects now that we've become available. 587 static const struct fscache_state *fscache_jumpstart_dependents(struct fscache_object *object, fscache_jumpstart_dependents() argument 590 _enter("{OBJ%x},%d", object->debug_id, event); fscache_jumpstart_dependents() 592 if (!fscache_enqueue_dependents(object, FSCACHE_OBJECT_EV_PARENT_READY)) fscache_jumpstart_dependents() 600 static const struct fscache_state *fscache_lookup_failure(struct fscache_object *object, fscache_lookup_failure() argument 605 _enter("{OBJ%x},%d", object->debug_id, event); fscache_lookup_failure() 607 object->oob_event_mask = 0; fscache_lookup_failure() 610 object->cache->ops->lookup_complete(object); fscache_lookup_failure() 613 cookie = object->cookie; fscache_lookup_failure() 618 fscache_done_parent_op(object); fscache_lookup_failure() 623 * Wait for completion of all active operations on this object and the death of 624 * all child objects of this object. 626 static const struct fscache_state *fscache_kill_object(struct fscache_object *object, fscache_kill_object() argument 630 object->debug_id, object->n_ops, object->n_children, event); fscache_kill_object() 632 clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); fscache_kill_object() 633 object->oob_event_mask = 0; fscache_kill_object() 635 if (list_empty(&object->dependents) && fscache_kill_object() 636 object->n_ops == 0 && fscache_kill_object() 637 object->n_children == 0) fscache_kill_object() 640 if (object->n_in_progress == 0) { fscache_kill_object() 641 spin_lock(&object->lock); fscache_kill_object() 642 if (object->n_ops > 0 && object->n_in_progress == 0) fscache_kill_object() 643 fscache_start_operations(object); fscache_kill_object() 644 spin_unlock(&object->lock); fscache_kill_object() 647 if (!list_empty(&object->dependents)) fscache_kill_object() 656 static const struct fscache_state *fscache_kill_dependents(struct fscache_object *object, fscache_kill_dependents() argument 659 _enter("{OBJ%x},%d", object->debug_id, event); fscache_kill_dependents() 661 if (!fscache_enqueue_dependents(object, FSCACHE_OBJECT_EV_KILL)) fscache_kill_dependents() 667 * Drop an object's attachments 669 static const struct fscache_state *fscache_drop_object(struct fscache_object *object, fscache_drop_object() argument 672 struct fscache_object *parent = object->parent; fscache_drop_object() 673 struct fscache_cookie *cookie = object->cookie; fscache_drop_object() 674 struct fscache_cache *cache = object->cache; fscache_drop_object() 677 _enter("{OBJ%x,%d},%d", object->debug_id, object->n_children, event); fscache_drop_object() 680 ASSERT(!hlist_unhashed(&object->cookie_link)); fscache_drop_object() 686 hlist_del_init(&object->cookie_link); fscache_drop_object() 698 spin_lock(&object->lock); fscache_drop_object() 699 spin_unlock(&object->lock); fscache_drop_object() 703 list_del_init(&object->cache_link); fscache_drop_object() 707 cache->ops->drop_object(object); fscache_drop_object() 710 /* The parent object wants to know when all it dependents have gone */ fscache_drop_object() 720 object->parent = NULL; fscache_drop_object() 723 /* this just shifts the object release to the work processor */ fscache_drop_object() 724 fscache_put_object(object); fscache_drop_object() 732 * get a ref on an object 734 static int fscache_get_object(struct fscache_object *object) fscache_get_object() argument 739 ret = object->cache->ops->grab_object(object) ? 0 : -EAGAIN; fscache_get_object() 745 * Discard a ref on an object 747 static void fscache_put_object(struct fscache_object *object) fscache_put_object() argument 750 object->cache->ops->put_object(object); fscache_put_object() 755 * fscache_object_destroy - Note that a cache object is about to be destroyed 756 * @object: The object to be destroyed 758 * Note the imminent destruction and deallocation of a cache object record. 760 void fscache_object_destroy(struct fscache_object *object) fscache_object_destroy() argument 762 fscache_objlist_remove(object); fscache_object_destroy() 765 fscache_cookie_put(object->cookie); fscache_object_destroy() 766 object->cookie = NULL; fscache_object_destroy() 771 * enqueue an object for metadata-type processing 773 void fscache_enqueue_object(struct fscache_object *object) fscache_enqueue_object() argument 775 _enter("{OBJ%x}", object->debug_id); fscache_enqueue_object() 777 if (fscache_get_object(object) >= 0) { fscache_enqueue_object() 781 if (queue_work(fscache_object_wq, &object->work)) { fscache_enqueue_object() 785 fscache_put_object(object); fscache_enqueue_object() 792 * fscache_object_sleep_till_congested - Sleep until object wq is congested 795 * Allow an object handler to sleep until the object workqueue is congested. 801 * %true is returned if the object wq is congested, %false otherwise. 821 * Enqueue the dependents of an object for metadata-type processing. 827 static bool fscache_enqueue_dependents(struct fscache_object *object, int event) fscache_enqueue_dependents() argument 832 _enter("{OBJ%x}", object->debug_id); fscache_enqueue_dependents() 834 if (list_empty(&object->dependents)) fscache_enqueue_dependents() 837 spin_lock(&object->lock); fscache_enqueue_dependents() 839 while (!list_empty(&object->dependents)) { fscache_enqueue_dependents() 840 dep = list_entry(object->dependents.next, fscache_enqueue_dependents() 847 if (!list_empty(&object->dependents) && need_resched()) { fscache_enqueue_dependents() 853 spin_unlock(&object->lock); fscache_enqueue_dependents() 858 * remove an object from whatever queue it's waiting on 860 static void fscache_dequeue_object(struct fscache_object *object) fscache_dequeue_object() argument 862 _enter("{OBJ%x}", object->debug_id); fscache_dequeue_object() 864 if (!list_empty(&object->dep_link)) { fscache_dequeue_object() 865 spin_lock(&object->parent->lock); fscache_dequeue_object() 866 list_del_init(&object->dep_link); fscache_dequeue_object() 867 spin_unlock(&object->parent->lock); fscache_dequeue_object() 874 * fscache_check_aux - Ask the netfs whether an object on disk is still valid 875 * @object: The object to ask about 876 * @data: The auxiliary data for the object 879 * This function consults the netfs about the coherency state of an object. 881 * fscache_look_up_object() on behalf of the cache backend during object lookup 884 enum fscache_checkaux fscache_check_aux(struct fscache_object *object, fscache_check_aux() argument 889 if (!object->cookie->def->check_aux) { fscache_check_aux() 894 result = object->cookie->def->check_aux(object->cookie->netfs_data, fscache_check_aux() 921 * Asynchronously invalidate an object. 923 static const struct fscache_state *_fscache_invalidate_object(struct fscache_object *object, _fscache_invalidate_object() argument 927 struct fscache_cookie *cookie = object->cookie; _fscache_invalidate_object() 929 _enter("{OBJ%x},%d", object->debug_id, event); _fscache_invalidate_object() 932 * retire the object instead. _fscache_invalidate_object() 934 if (!fscache_use_cookie(object)) { _fscache_invalidate_object() 935 ASSERT(object->cookie->stores.rnode == NULL); _fscache_invalidate_object() 936 set_bit(FSCACHE_OBJECT_RETIRED, &object->flags); _fscache_invalidate_object() 943 clear_bit(FSCACHE_OBJECT_PENDING_WRITE, &object->flags); _fscache_invalidate_object() 944 fscache_cancel_all_ops(object); _fscache_invalidate_object() 951 fscache_operation_init(op, object->cache->ops->invalidate_object, NULL); _fscache_invalidate_object() 957 if (fscache_submit_exclusive_op(object, op) < 0) _fscache_invalidate_object() 977 clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); _fscache_invalidate_object() 978 fscache_unuse_cookie(object); _fscache_invalidate_object() 983 clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); _fscache_invalidate_object() 985 fscache_unuse_cookie(object); _fscache_invalidate_object() 991 static const struct fscache_state *fscache_invalidate_object(struct fscache_object *object, fscache_invalidate_object() argument 998 s = _fscache_invalidate_object(object, event); fscache_invalidate_object() 1004 * Asynchronously update an object. 1006 static const struct fscache_state *fscache_update_object(struct fscache_object *object, fscache_update_object() argument 1009 _enter("{OBJ%x},%d", object->debug_id, event); fscache_update_object() 1013 object->cache->ops->update_object(object); fscache_update_object()
|
H A D | Makefile | 11 object.o \ 18 fscache-$(CONFIG_FSCACHE_OBJECT_LIST) += object-list.o
|
H A D | cookie.c | 28 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_dead(object)) { fscache_alloc_object() 340 cache->ops->put_object(object); fscache_alloc_object() 348 * attach a cache object to a cookie 351 struct fscache_object *object) fscache_attach_object() 354 struct fscache_cache *cache = object->cache; fscache_attach_object() 357 _enter("{%s},{OBJ%x}", cookie->def->name, object->debug_id); fscache_attach_object() 361 /* there may be multiple initial creations of this object, but we only fscache_attach_object() 365 if (p->cache == object->cache) { fscache_attach_object() 372 /* pin the parent object */ fscache_attach_object() 376 if (p->cache == object->cache) { fscache_attach_object() 382 object->parent = p; fscache_attach_object() 391 /* attach to the cache's object list */ fscache_attach_object() 392 if (list_empty(&object->cache_link)) { fscache_attach_object() 394 list_add(&object->cache_link, &cache->object_list); fscache_attach_object() 399 object->cookie = cookie; fscache_attach_object() 401 hlist_add_head(&object->cookie_link, &cookie->backing_objects); fscache_attach_object() 403 fscache_objlist_add(object); fscache_attach_object() 413 * Invalidate an object. Callable with spinlocks held. 417 struct fscache_object *object; __fscache_invalidate() local 433 /* If there's an object, we tell the object state machine to handle the __fscache_invalidate() 443 object = hlist_entry(cookie->backing_objects.first, __fscache_invalidate() 446 if (fscache_object_is_live(object)) __fscache_invalidate() 448 object, FSCACHE_OBJECT_EV_INVALIDATE); __fscache_invalidate() 459 * Wait for object invalidation to complete. 477 struct fscache_object *object; __fscache_update_cookie() local 497 hlist_for_each_entry(object, __fscache_update_cookie() 499 fscache_raise_event(object, FSCACHE_OBJECT_EV_UPDATE); __fscache_update_cookie() 513 struct fscache_object *object; __fscache_disable_cookie() local 541 hlist_for_each_entry(object, &cookie->backing_objects, cookie_link) { __fscache_disable_cookie() 543 set_bit(FSCACHE_OBJECT_RETIRED, &object->flags); __fscache_disable_cookie() 544 fscache_raise_event(object, FSCACHE_OBJECT_EV_KILL); __fscache_disable_cookie() 577 * - the object will be marked as recyclable on disk if retire is true 656 struct fscache_object *object; __fscache_check_consistency() local 684 object = hlist_entry(cookie->backing_objects.first, __fscache_check_consistency() 686 if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) __fscache_check_consistency() 692 if (fscache_submit_op(object, op) < 0) __fscache_check_consistency() 695 /* the work queue now carries its own ref on the object */ __fscache_check_consistency() 698 ret = fscache_wait_for_operation_activation(object, op, __fscache_check_consistency() 702 ret = object->cache->ops->check_consistency(op); __fscache_check_consistency() 350 fscache_attach_object(struct fscache_cookie *cookie, struct fscache_object *object) fscache_attach_object() argument
|
H A D | page.c | 143 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() 265 fscache_put_context(op->op.object->cookie, op->context); fscache_release_retrieval_op() 344 * wait for an object to become active (or dead) 346 int fscache_wait_for_operation_activation(struct fscache_object *object, fscache_wait_for_operation_activation() argument 380 if (unlikely(fscache_object_is_dead(object))) { fscache_wait_for_operation_activation() 395 * -ENOBUFS - no backing object available in which to cache the block 396 * -ENODATA - no data available in the backing object for this block 406 struct fscache_object *object; __fscache_read_or_alloc_page() local 441 object = hlist_entry(cookie->backing_objects.first, __fscache_read_or_alloc_page() 444 ASSERT(test_bit(FSCACHE_OBJECT_IS_LOOKED_UP, &object->flags)); __fscache_read_or_alloc_page() 447 atomic_inc(&object->n_reads); __fscache_read_or_alloc_page() 450 if (fscache_submit_op(object, &op->op) < 0) __fscache_read_or_alloc_page() 458 fscache_get_context(object->cookie, op->context); __fscache_read_or_alloc_page() 463 object, &op->op, __fscache_read_or_alloc_page() 471 if (test_bit(FSCACHE_COOKIE_NO_DATA_YET, &object->cookie->flags)) { __fscache_read_or_alloc_page() 473 ret = object->cache->ops->allocate_page(op, page, gfp); __fscache_read_or_alloc_page() 479 ret = object->cache->ops->read_or_alloc_page(op, page, gfp); __fscache_read_or_alloc_page() 500 atomic_dec(&object->n_reads); __fscache_read_or_alloc_page() 520 * -ENOBUFS - no backing object or space available in which to cache any 522 * -ENODATA - no data available in the backing object for some or all of 541 struct fscache_object *object; __fscache_read_or_alloc_pages() local 574 object = hlist_entry(cookie->backing_objects.first, __fscache_read_or_alloc_pages() 578 atomic_inc(&object->n_reads); __fscache_read_or_alloc_pages() 581 if (fscache_submit_op(object, &op->op) < 0) __fscache_read_or_alloc_pages() 589 fscache_get_context(object->cookie, op->context); __fscache_read_or_alloc_pages() 594 object, &op->op, __fscache_read_or_alloc_pages() 602 if (test_bit(FSCACHE_COOKIE_NO_DATA_YET, &object->cookie->flags)) { __fscache_read_or_alloc_pages() 604 ret = object->cache->ops->allocate_pages( __fscache_read_or_alloc_pages() 609 ret = object->cache->ops->read_or_alloc_pages( __fscache_read_or_alloc_pages() 631 atomic_dec(&object->n_reads); __fscache_read_or_alloc_pages() 650 * -ENOBUFS - no backing object available in which to cache the block 658 struct fscache_object *object; __fscache_alloc_page() local 690 object = hlist_entry(cookie->backing_objects.first, __fscache_alloc_page() 694 if (fscache_submit_op(object, &op->op) < 0) __fscache_alloc_page() 701 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 D | cache.c | 90 * 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 D | internal.h | 18 * - 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) 295 * raise an event on an object 296 * - if the event is not masked for that object, then the object is 299 static inline void fscache_raise_event(struct fscache_object *object, fscache_raise_event() argument 305 object->debug_id, object->event_mask, (1 << event)); fscache_raise_event() 307 if (!test_and_set_bit(event, &object->events) && fscache_raise_event() 308 test_bit(event, &object->event_mask)) fscache_raise_event() 309 fscache_enqueue_object(object); fscache_raise_event()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvif/ |
H A D | object.c | 25 #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 = nvif_client(object); nvif_object_ioctl() 42 args->v0.path[args->v0.path_nr++] = object->handle; nvif_object_ioctl() 43 if (object->parent == object) nvif_object_ioctl() 45 object = object->parent; nvif_object_ioctl() 54 nvif_object_sclass(struct nvif_object *object, u32 *oclass, int count) nvif_object_sclass() argument 71 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); nvif_object_sclass() 79 nvif_object_rd(struct nvif_object *object, int size, u64 addr) nvif_object_rd() argument 89 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_rd() 98 nvif_object_wr(struct nvif_object *object, int size, u64 addr, u32 data) nvif_object_wr() argument 109 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_wr() 116 nvif_object_mthd(struct nvif_object *object, u32 mthd, void *data, u32 size) nvif_object_mthd() argument 137 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); nvif_object_mthd() 145 nvif_object_unmap(struct nvif_object *object) nvif_object_unmap() argument 147 if (object->map.size) { nvif_object_unmap() 148 struct nvif_client *client = nvif_client(object); nvif_object_unmap() 156 if (object->map.ptr) { nvif_object_unmap() 157 client->driver->unmap(client, object->map.ptr, nvif_object_unmap() 158 object->map.size); nvif_object_unmap() 159 object->map.ptr = NULL; nvif_object_unmap() 162 nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_unmap() 163 object->map.size = 0; nvif_object_unmap() 168 nvif_object_map(struct nvif_object *object) nvif_object_map() argument 170 struct nvif_client *client = nvif_client(object); nvif_object_map() 177 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_map() 179 object->map.size = args.map.length; nvif_object_map() 180 object->map.ptr = client->driver->map(client, args.map.handle, nvif_object_map() 181 object->map.size); nvif_object_map() 182 if (ret = -ENOMEM, object->map.ptr) nvif_object_map() 184 nvif_object_unmap(object); nvif_object_map() 195 nvif_object_fini(struct nvif_object *object) nvif_object_fini() argument 197 struct ctor *ctor = container_of(object->data, typeof(*ctor), new.data); nvif_object_fini() 198 if (object->parent) { nvif_object_fini() 206 nvif_object_unmap(object); nvif_object_fini() 207 nvif_object_ioctl(object, &args, sizeof(args), NULL); nvif_object_fini() 208 if (object->data) { nvif_object_fini() 209 object->size = 0; nvif_object_fini() 210 object->data = NULL; nvif_object_fini() 213 nvif_object_ref(NULL, &object->parent); nvif_object_fini() 220 struct nvif_object *object) nvif_object_init() 225 object->parent = NULL; nvif_object_init() 226 object->object = object; nvif_object_init() 227 nvif_object_ref(parent, &object->parent); nvif_object_init() 228 kref_init(&object->refcount); nvif_object_init() 229 object->handle = handle; nvif_object_init() 230 object->oclass = oclass; nvif_object_init() 231 object->data = NULL; nvif_object_init() 232 object->size = 0; nvif_object_init() 233 object->dtor = dtor; nvif_object_init() 234 object->map.ptr = NULL; nvif_object_init() 235 object->map.size = 0; nvif_object_init() 237 if (object->parent) { nvif_object_init() 239 nvif_object_fini(object); nvif_object_init() 242 object->data = ctor->new.data; nvif_object_init() 243 object->size = size; nvif_object_init() 244 memcpy(object->data, data, size); nvif_object_init() 250 ctor->new.token = (unsigned long)(void *)object; nvif_object_init() 255 object->size, &object->priv); nvif_object_init() 259 nvif_object_fini(object); nvif_object_init() 264 nvif_object_del(struct nvif_object *object) nvif_object_del() argument 266 nvif_object_fini(object); nvif_object_del() 267 kfree(object); nvif_object_del() 274 struct nvif_object *object = kzalloc(sizeof(*object), GFP_KERNEL); nvif_object_new() local 275 if (object) { nvif_object_new() 277 oclass, data, size, object); nvif_object_new() 279 kfree(object); nvif_object_new() 280 object = NULL; nvif_object_new() 282 *pobject = object; nvif_object_new() 291 struct nvif_object *object = nvif_object_put() local 292 container_of(kref, typeof(*object), refcount); nvif_object_put() 293 object->dtor(object); nvif_object_put() 297 nvif_object_ref(struct nvif_object *object, struct nvif_object **pobject) nvif_object_ref() argument 299 if (object) nvif_object_ref() 300 kref_get(&object->refcount); nvif_object_ref() 303 *pobject = object; nvif_object_ref() 218 nvif_object_init(struct nvif_object *parent, void (*dtor)(struct nvif_object *), u32 handle, u32 oclass, void *data, u32 size, struct nvif_object *object) nvif_object_init() argument
|
H A D | notify.c | 28 #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 = nvif_client(notify->object); 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 nvif_object_ref(NULL, ¬ify->object); nvif_notify_fini() 167 nvif_notify_init(struct nvif_object *object, void (*dtor)(struct nvif_notify *), nvif_notify_init() argument 178 notify->object = NULL; nvif_notify_init() 179 nvif_object_ref(object, ¬ify->object); nvif_notify_init() 206 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); nvif_notify_init() 232 nvif_notify_new(struct nvif_object *object, int (*func)(struct nvif_notify *), nvif_notify_new() argument 238 int ret = nvif_notify_init(object, nvif_notify_del, func, work, nvif_notify_new()
|
/linux-4.1.27/drivers/acpi/acpica/ |
H A D | utdelete.c | 3 * 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() 217 "***** Region %p\n", object)); acpi_ut_delete_internal_obj() 223 if (!(object->region.node->flags & ANOBJ_TEMPORARY)) { acpi_ut_delete_internal_obj() 224 acpi_ut_remove_address_range(object->region.space_id, acpi_ut_delete_internal_obj() 225 object->region.node); acpi_ut_delete_internal_obj() 228 second_desc = acpi_ns_get_secondary_object(object); acpi_ut_delete_internal_obj() 232 * default handlers -- and therefore, we created the context object acpi_ut_delete_internal_obj() 235 handler_desc = object->region.handler; acpi_ut_delete_internal_obj() 243 /* Remove the region object from the handler list */ acpi_ut_delete_internal_obj() 246 if (next_desc == object) { acpi_ut_delete_internal_obj() 261 "Circular region list in address handler object %p", acpi_ut_delete_internal_obj() 274 address_space.setup(object, acpi_ut_delete_internal_obj() 288 /* Now we can free the Extra object */ acpi_ut_delete_internal_obj() 297 "***** Buffer Field %p\n", object)); acpi_ut_delete_internal_obj() 299 second_desc = acpi_ns_get_secondary_object(object); acpi_ut_delete_internal_obj() 308 "***** Bank Field %p\n", object)); acpi_ut_delete_internal_obj() 310 second_desc = acpi_ns_get_secondary_object(object); acpi_ut_delete_internal_obj() 321 /* Free any allocated memory (pointer within the object) found above */ acpi_ut_delete_internal_obj() 329 /* Now the object can be safely deleted */ acpi_ut_delete_internal_obj() 332 object, acpi_ut_get_object_type_name(object))); acpi_ut_delete_internal_obj() 334 acpi_ut_delete_object_desc(object); acpi_ut_delete_internal_obj() 346 * DESCRIPTION: This function deletes an internal object list, including both 363 /* Free the combined parameter pointer list and object array */ acpi_ut_delete_internal_object_list() 373 * PARAMETERS: object - Object whose ref count is to be updated 376 * RETURN: None. Sets new reference count within the object 378 * DESCRIPTION: Modify the reference count for an internal acpi object 383 acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) acpi_ut_update_ref_count() argument 391 if (!object) { acpi_ut_update_ref_count() 400 original_count = object->common.reference_count; acpi_ut_update_ref_count() 408 object->common.reference_count = new_count; acpi_ut_update_ref_count() 416 object)); acpi_ut_update_ref_count() 421 object, object->common.type, new_count)); acpi_ut_update_ref_count() 430 object->common.reference_count = new_count; acpi_ut_update_ref_count() 438 object)); acpi_ut_update_ref_count() 443 object, object->common.type, new_count)); acpi_ut_update_ref_count() 445 /* Actually delete the object on a reference count of zero */ acpi_ut_update_ref_count() 448 acpi_ut_delete_internal_obj(object); acpi_ut_update_ref_count() 462 * (A deleted object will have a huge reference count) acpi_ut_update_ref_count() 466 "Large Reference Count (0x%X) in object %p, Type=0x%.2X", acpi_ut_update_ref_count() 467 new_count, object, object->common.type)); acpi_ut_update_ref_count() 475 * PARAMETERS: object - Increment ref count for this object 481 * DESCRIPTION: Increment the object reference count 484 * 1) An object is attached to a Node (namespace object) 485 * 2) An object is copied (all subobjects must be incremented) 488 * 1) An object is detached from an Node 493 acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) acpi_ut_update_object_reference() argument 504 while (object) { acpi_ut_update_object_reference() 508 if (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) { acpi_ut_update_object_reference() 510 "Object %p is NS handle\n", object)); acpi_ut_update_object_reference() 516 * Different object types have different subobjects. acpi_ut_update_object_reference() 518 switch (object->common.type) { acpi_ut_update_object_reference() 529 object->common_notify.notify_list[i]; acpi_ut_update_object_reference() 545 for (i = 0; i < object->package.count; i++) { acpi_ut_update_object_reference() 550 next_object = object->package.elements[i]; acpi_ut_update_object_reference() 587 next_object = object->buffer_field.buffer_obj; acpi_ut_update_object_reference() 592 next_object = object->field.region_obj; acpi_ut_update_object_reference() 597 next_object = object->bank_field.bank_obj; acpi_ut_update_object_reference() 599 acpi_ut_create_update_state_and_push(object-> acpi_ut_update_object_reference() 611 next_object = object->index_field.index_obj; acpi_ut_update_object_reference() 613 acpi_ut_create_update_state_and_push(object-> acpi_ut_update_object_reference() 627 * target object. acpi_ut_update_object_reference() 629 if ((object->reference.class == ACPI_REFCLASS_INDEX) || acpi_ut_update_object_reference() 630 (object->reference.class == ACPI_REFCLASS_NAME)) { acpi_ut_update_object_reference() 631 next_object = object->reference.object; acpi_ut_update_object_reference() 642 * Now we can update the count in the main object. This can only acpi_ut_update_object_reference() 644 * main object to be deleted. acpi_ut_update_object_reference() 646 acpi_ut_update_ref_count(object, action); acpi_ut_update_object_reference() 647 object = NULL; acpi_ut_update_object_reference() 649 /* Move on to the next object to be updated */ acpi_ut_update_object_reference() 652 object = next_object; acpi_ut_update_object_reference() 656 object = state->update.object; acpi_ut_update_object_reference() 666 "Could not update object reference count")); acpi_ut_update_object_reference() 682 * PARAMETERS: object - Object whose reference count is to be 687 * DESCRIPTION: Add one reference to an ACPI object 691 void acpi_ut_add_reference(union acpi_operand_object *object) acpi_ut_add_reference() argument 696 /* Ensure that we have a valid object */ acpi_ut_add_reference() 698 if (!acpi_ut_valid_internal_object(object)) { acpi_ut_add_reference() 704 object, object->common.reference_count)); acpi_ut_add_reference() 708 (void)acpi_ut_update_object_reference(object, REF_INCREMENT); acpi_ut_add_reference() 716 * PARAMETERS: object - Object whose ref count will be decremented 720 * DESCRIPTION: Decrement the reference count of an ACPI internal object 724 void acpi_ut_remove_reference(union acpi_operand_object *object) acpi_ut_remove_reference() argument 733 if (!object || acpi_ut_remove_reference() 734 (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED)) { acpi_ut_remove_reference() 738 /* Ensure that we have a valid object */ acpi_ut_remove_reference() 740 if (!acpi_ut_valid_internal_object(object)) { acpi_ut_remove_reference() 746 object, object->common.reference_count)); acpi_ut_remove_reference() 749 * Decrement the reference count, and only actually delete the object acpi_ut_remove_reference() 753 (void)acpi_ut_update_object_reference(object, REF_DECREMENT); acpi_ut_remove_reference()
|
H A D | nsobject.c | 57 * 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 D | utobject.c | 3 * 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 D | utcache.c | 56 * 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 ACPI_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 ACPI_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 D | nsrepair.c | 57 * 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 D | utcopy.c | 3 * 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 D | dsmthdat.c | 61 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 D | exstoren.c | 3 * 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() 138 ACPI_ERROR((AE_INFO, "Store into an unresolved Alias object")); acpi_ex_resolve_object() 160 * new_desc - New object if dest_desc is obsoleted 165 * DESCRIPTION: "Store" an object to another object. This may include 170 * The Assignment of an object to another (not named) object 175 * When storing into an object the data is converted to the 176 * target object type then stored in the object. This means 177 * that the target object type (for an initialized target) will 184 * resolution (from a reference object) must be performed by 203 * There is no destination object (An uninitialized node or acpi_ex_store_object_to_object() 204 * package element), so we can simply copy the source object acpi_ex_store_object_to_object() 205 * creating a new destination object acpi_ex_store_object_to_object() 220 * Otherwise, actual_src_desc is a temporary object to hold the acpi_ex_store_object_to_object() 221 * converted object. acpi_ex_store_object_to_object() 234 * new object. acpi_ex_store_object_to_object() 243 * copy of the *value* of the source object. acpi_ex_store_object_to_object() 287 /* Delete the intermediate (temporary) source object */ acpi_ex_store_object_to_object()
|
H A D | utdecode.c | 169 * PARAMETERS: type - An ACPI object type 171 * RETURN: Decoded ACPI object type name 187 /* Printable names of the ACPI object types */ 247 * PARAMETERS: object - A namespace node 255 char *acpi_ut_get_node_name(void *object) acpi_ut_get_node_name() argument 257 struct acpi_namespace_node *node = (struct acpi_namespace_node *)object; acpi_ut_get_node_name() 261 if (!object) { acpi_ut_get_node_name() 267 if ((object == ACPI_ROOT_OBJECT) || (object == acpi_gbl_root_node)) { acpi_ut_get_node_name() 292 * PARAMETERS: object - An ACPI object 296 * DESCRIPTION: Validate object and return the descriptor type 300 /* Printable names of object descriptor types */ 321 char *acpi_ut_get_descriptor_name(void *object) acpi_ut_get_descriptor_name() argument 324 if (!object) { acpi_ut_get_descriptor_name() 328 if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) { acpi_ut_get_descriptor_name() 334 (object)])); acpi_ut_get_descriptor_name() 342 * PARAMETERS: object - An ACPI reference object 346 * DESCRIPTION: Decode a reference object sub-type to a string. 350 /* Printable names of reference object sub-types */ 362 const char *acpi_ut_get_reference_name(union acpi_operand_object *object) acpi_ut_get_reference_name() argument 365 if (!object) { acpi_ut_get_reference_name() 369 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { acpi_ut_get_reference_name() 370 return ("Not an Operand object"); acpi_ut_get_reference_name() 373 if (object->common.type != ACPI_TYPE_LOCAL_REFERENCE) { acpi_ut_get_reference_name() 374 return ("Not a Reference object"); acpi_ut_get_reference_name() 377 if (object->reference.class > ACPI_REFCLASS_MAX) { acpi_ut_get_reference_name() 381 return (acpi_gbl_ref_class_names[object->reference.class]); acpi_ut_get_reference_name() 479 /* 00 - 0D are common to all object types */ acpi_ut_get_notify_name() 491 /* 80 - 83 are per-object-type */ acpi_ut_get_notify_name() 506 return ("Target object type does not support notifies"); acpi_ut_get_notify_name() 528 * RETURN: TRUE if valid object type, FALSE otherwise 530 * DESCRIPTION: Validate an object type
|
H A D | nspredef.c | 63 * 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 D | exstore.c | 3 * 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() 368 * node - Named object to receive the value 374 * DESCRIPTION: Store the object to the named object. 376 * The Assignment of an object to a named object is handled here 380 * When storing into an object the data is converted to the 381 * target object type then stored in the object. This means 382 * that the target object type (for an initialized target) will 406 /* Get current type of the node, and object attached to Node */ acpi_ex_store_object_to_node() 417 * Resolve the source object to an actual value acpi_ex_store_object_to_node() 418 * (If it is a reference object) acpi_ex_store_object_to_node() 463 * store has been performed such that the node/object type acpi_ex_store_object_to_node() 495 * the source object. This is the ACPI spec-defined behavior for acpi_ex_store_object_to_node() 517 * node - Named object to receive the value 522 * DESCRIPTION: "Store" an object directly to a node. This involves a copy 544 /* Copy the source object to a new object */ acpi_ex_store_direct_to_node() 552 /* Attach the new object to the node */ acpi_ex_store_direct_to_node()
|
H A D | utstate.c | 3 * 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 D | exresolv.c | 3 * 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() 217 * A NULL object descriptor means an uninitialized element of acpi_ex_resolve_object_to_value() 229 /* Invalid reference object */ acpi_ex_resolve_object_to_value() 232 "Unknown TargetType 0x%X in Index/Reference object %p", acpi_ex_resolve_object_to_value() 244 /* Just leave the object as-is, do not dereference */ acpi_ex_resolve_object_to_value() 248 case ACPI_REFCLASS_NAME: /* Reference to a named object */ acpi_ex_resolve_object_to_value() 261 /* Get the object pointed to by the namespace node */ acpi_ex_resolve_object_to_value() 264 (stack_desc->reference.node)->object; acpi_ex_resolve_object_to_value() 324 * return_type - Where the object type is returned 325 * return_desc - Where the resolved object is returned 329 * DESCRIPTION: Return the base object and type. Traverse a reference list if 330 * necessary to get to the base object. 362 /* If we had an Alias node, use the attached object for type info */ acpi_ex_resolve_multiple() 385 * operators, we need to get to the base object (as per the ACPI acpi_ex_resolve_multiple() 397 node = obj_desc->reference.object; acpi_ex_resolve_multiple() 414 /* Get the attached object */ acpi_ex_resolve_multiple() 419 /* No object, use the NS node type */ acpi_ex_resolve_multiple() 434 /* Get the type of this reference (index into another object) */ acpi_ex_resolve_multiple() 442 * The main object is a package, we want to get the type acpi_ex_resolve_multiple() 446 * This could of course in turn be another reference object. acpi_ex_resolve_multiple() 519 * Now we are guaranteed to have an object that has not been created acpi_ex_resolve_multiple()
|
H A D | dswstate.c | 62 * 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 D | excreate.c | 3 * 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() 514 /* Attach the new object to the method Node */ acpi_ex_create_method() 519 /* Remove local reference to the object */ acpi_ex_create_method()
|
H A D | exresnte.c | 3 * 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 D | dsobject.c | 3 * 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() 786 object)); acpi_ds_init_object_from_op() 807 object)); acpi_ds_init_object_from_op() 811 default: /* Object name or Debug object */ acpi_ds_init_object_from_op() 819 obj_desc->reference.object = acpi_ds_init_object_from_op() 820 op->common.node->object; acpi_ds_init_object_from_op()
|
H A D | exoparg1.c | 100 /* 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 D | uteval.c | 56 * 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 D | nseval.c | 65 * Node is the object to execute 79 * ACPI namespace object. 97 * Get the actual namespace node for the target object if we acpi_ns_evaluate() 119 info->node->object); acpi_ns_evaluate() 137 /* Get the full pathname to the object, for use in warning messages */ acpi_ns_evaluate() 174 * this method/object matches the actual ASL/AML definition. acpi_ns_evaluate() 187 * 2) The object is a control method -- execute it acpi_ns_evaluate() 188 * 3) The object is not a method -- just return it's current value acpi_ns_evaluate() 198 * 1) Disallow evaluation of certain object types. For these, acpi_ns_evaluate() 199 * object evaluation is undefined and not supported. acpi_ns_evaluate() 202 "%s: Evaluation of object type [%s] is not supported", acpi_ns_evaluate() 214 /* Verify that there is a method object associated with this node */ acpi_ns_evaluate() 218 "%s: Method has no attached sub-object", acpi_ns_evaluate() 245 * 3) All other non-method objects -- get the current object value acpi_ns_evaluate() 251 * the object out of the node. acpi_ns_evaluate() 260 * 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() 477 /* Detach the temporary method object */ acpi_ns_exec_module_code() 481 /* Restore the original parent object */ acpi_ns_exec_module_code()
|
H A D | nsconvert.c | 60 * 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 D | exresop.c | 3 * 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() 331 * Instead, we just want to store the reference object. acpi_ex_resolve_operands() 351 * Resolve this object to a value acpi_ex_resolve_operands() 358 /* Get the resolved object */ acpi_ex_resolve_operands() 363 * Check the resulting object (value) type acpi_ex_resolve_operands() 367 * For the simple cases, only one type of resolved object acpi_ex_resolve_operands() 406 * The more complex cases allow multiple resolved object types acpi_ex_resolve_operands() 650 /* Allow store of any object to the Debug object */ acpi_ex_resolve_operands() 676 * Make sure that the original object was resolved to the acpi_ex_resolve_operands() 677 * 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 D | nsrepair2.c | 170 * 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 D | dswscope.c | 60 * 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 D | psutils.c | 58 * 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() 167 * DESCRIPTION: Free an Op object. Either put it on the GENERIC_OP cache list 192 * DESCRIPTION: Low level character and object functions 211 /* The "generic" object has no name associated with it */ acpi_ps_get_name() 229 /* The "generic" object has no name associated with it */ acpi_ps_set_name()
|
H A D | acobject.h | 3 * 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 */ 244 * "Field Datum" -- a datum from the actual field object 253 u32 base_byte_offset; /* Byte offset within containing object */\ 260 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */ 265 union acpi_operand_object *region_obj; /* Containing op_region object */ 271 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */ 272 union acpi_operand_object *bank_obj; /* bank_select Register object */ 288 ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj; /* Containing Buffer object */ 327 * The Reference object is used for these opcodes: 335 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ member in struct:acpi_object_reference 349 ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ 350 ACPI_REFCLASS_DEBUG = 6, /* Debug object */ 356 * Extra object is used as additional storage for types that 380 ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */ 432 #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 456 union acpi_operand_object object; member in union:acpi_descriptor
|
H A D | uterror.c | 63 * 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 D | exdebug.c | 69 * operational case, stores to the debug object are ignored but can be easily 99 * object display acpi_ex_do_debug_object() 211 /* Check for valid node first, then valid object */ acpi_ex_do_debug_object() 228 /* These types have no attached object */ acpi_ex_do_debug_object() 242 node)->object, acpi_ex_do_debug_object() 247 } else if (source_desc->reference.object) { acpi_ex_do_debug_object() 249 (source_desc->reference.object) == acpi_ex_do_debug_object() 254 object)->object, acpi_ex_do_debug_object() 258 object, level + 4, 0); acpi_ex_do_debug_object()
|
H A D | exstorob.c | 3 * 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 D | exoparg2.c | 112 /* 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() 414 /* Failure means that the Index was beyond the end of the object */ acpi_ex_opcode_2A_1T_1R() 418 "Index (0x%X%8.8X) is beyond end of object (length 0x%X)", acpi_ex_opcode_2A_1T_1R() 425 * Save the target object and add a reference to it for the life acpi_ex_opcode_2A_1T_1R() 428 return_desc->reference.object = operand[0]; acpi_ex_opcode_2A_1T_1R() 467 /* Delete return object on error */ acpi_ex_opcode_2A_1T_1R() 499 /* Create the internal return object */ acpi_ex_opcode_2A_0T_1R() 567 /* Delete return object on error */ acpi_ex_opcode_2A_0T_1R() 573 /* Save return object on success */ acpi_ex_opcode_2A_0T_1R()
|
H A D | nsarguments.c | 105 * 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 D | nsxfeval.c | 69 * 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 764 * user_function - Called when a matching object is found 773 * starting (and ending) at the object specified by start_handle. 774 * The user_function is called whenever an object of type
|
H A D | exmisc.c | 57 * 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()
|
/linux-4.1.27/fs/cachefiles/ |
H A D | interface.c | 24 * 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 D | xattr.c | 26 * 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 D | namei.c | 28 * 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() 102 struct cachefiles_object *object; cachefiles_mark_object_buried() local 111 object = rb_entry(p, struct cachefiles_object, active_node); cachefiles_mark_object_buried() 112 if (object->dentry > dentry) cachefiles_mark_object_buried() 114 else if (object->dentry < dentry) cachefiles_mark_object_buried() 127 object->fscache.debug_id, cachefiles_mark_object_buried() 128 object->fscache.state->name, cachefiles_mark_object_buried() 131 if (fscache_object_is_live(&object->fscache)) { cachefiles_mark_object_buried() 133 pr_err("Error: Can't preemptively bury live object\n"); cachefiles_mark_object_buried() 134 cachefiles_printk_object(object, NULL); cachefiles_mark_object_buried() 135 } else if (test_and_set_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { cachefiles_mark_object_buried() 144 * record the fact that an object is now active 147 struct cachefiles_object *object) cachefiles_mark_object_active() 153 _enter(",%p", object); cachefiles_mark_object_active() 158 if (test_and_set_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) { cachefiles_mark_object_active() 160 cachefiles_printk_object(object, NULL); cachefiles_mark_object_active() 164 dentry = object->dentry; cachefiles_mark_object_active() 171 ASSERT(xobject != object); cachefiles_mark_object_active() 181 rb_link_node(&object->active_node, _parent, _p); cachefiles_mark_object_active() 182 rb_insert_color(&object->active_node, &cache->active_nodes); cachefiles_mark_object_active() 188 /* an old object from a previous incarnation is hogging the slot - we cachefiles_mark_object_active() 193 pr_err("Error: Unexpected object collision\n"); cachefiles_mark_object_active() 194 cachefiles_printk_object(object, xobject); cachefiles_mark_object_active() 207 /* if the object we're waiting for is queued for processing, cachefiles_mark_object_active() 211 object->fscache.debug_id, cachefiles_mark_object_active() 216 /* otherwise we sleep until either the object we're waiting for cachefiles_mark_object_active() 233 object->fscache.debug_id, cachefiles_mark_object_active() 240 pr_err("Error: Overlong wait for old active object to go away\n"); cachefiles_mark_object_active() 241 cachefiles_printk_object(object, xobject); cachefiles_mark_object_active() 252 clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); cachefiles_mark_object_active() 259 * delete an object representation from the cache 281 _debug("unlink stale object"); cachefiles_bury_object() 305 _debug("move stale object to graveyard"); cachefiles_bury_object() 407 * delete an object representation from the cache 410 struct cachefiles_object *object) cachefiles_delete_object() 415 _enter(",OBJ%x{%p}", object->fscache.debug_id, object->dentry); cachefiles_delete_object() 417 ASSERT(object->dentry); cachefiles_delete_object() 418 ASSERT(d_backing_inode(object->dentry)); cachefiles_delete_object() 419 ASSERT(object->dentry->d_parent); cachefiles_delete_object() 421 dir = dget_parent(object->dentry); cachefiles_delete_object() 425 if (test_bit(CACHEFILES_OBJECT_BURIED, &object->flags)) { cachefiles_delete_object() 426 /* object allocation for the same key preemptively deleted this cachefiles_delete_object() 427 * object's file so that it could create its own file */ cachefiles_delete_object() 428 _debug("object preemptively buried"); cachefiles_delete_object() 434 if (dir == object->dentry->d_parent) { cachefiles_delete_object() 436 object->dentry, false); cachefiles_delete_object() 452 * walk from the parent object to the child object through the backing 456 struct cachefiles_object *object, cachefiles_walk_to_object() 469 object->fscache.debug_id, key); cachefiles_walk_to_object() 511 object->new = !d_backing_inode(next); cachefiles_walk_to_object() 517 fscache_object_lookup_negative(&object->fscache); cachefiles_walk_to_object() 519 /* we need to create the object if it's negative */ cachefiles_walk_to_object() 520 if (key || object->type == FSCACHE_COOKIE_TYPE_INDEX) { cachefiles_walk_to_object() 591 /* we've found the object we were looking for */ cachefiles_walk_to_object() 592 object->dentry = next; cachefiles_walk_to_object() 594 /* if we've found that the terminal object exists, then we need to cachefiles_walk_to_object() 596 if (!object->new) { cachefiles_walk_to_object() 599 ret = cachefiles_check_object_xattr(object, auxdata); cachefiles_walk_to_object() 601 /* delete the object (the deleter drops the directory cachefiles_walk_to_object() 603 object->dentry = NULL; cachefiles_walk_to_object() 617 /* note that we're now using this object */ cachefiles_walk_to_object() 618 ret = cachefiles_mark_object_active(cache, object); cachefiles_walk_to_object() 629 if (object->new) { cachefiles_walk_to_object() 630 /* attach data to a newly constructed terminal object */ cachefiles_walk_to_object() 631 ret = cachefiles_set_object_xattr(object, auxdata); cachefiles_walk_to_object() 635 /* always update the atime on an object we've just looked up cachefiles_walk_to_object() 644 if (object->type != FSCACHE_COOKIE_TYPE_INDEX) { cachefiles_walk_to_object() 645 if (d_is_reg(object->dentry)) { cachefiles_walk_to_object() 649 aops = d_backing_inode(object->dentry)->i_mapping->a_ops; cachefiles_walk_to_object() 653 object->backer = object->dentry; cachefiles_walk_to_object() 659 object->new = 0; cachefiles_walk_to_object() 660 fscache_obtained_object(&object->fscache); cachefiles_walk_to_object() 662 _leave(" = 0 [%lu]", d_backing_inode(object->dentry)->i_ino); cachefiles_walk_to_object() 678 rb_erase(&object->active_node, &cache->active_nodes); cachefiles_walk_to_object() 679 clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); cachefiles_walk_to_object() 680 wake_up_bit(&object->flags, CACHEFILES_OBJECT_ACTIVE); cachefiles_walk_to_object() 683 dput(object->dentry); cachefiles_walk_to_object() 684 object->dentry = NULL; cachefiles_walk_to_object() 811 * find out if an object is in use or not 812 * - if finds object and it's not in use: 813 * - returns a pointer to the object and a reference on it 820 struct cachefiles_object *object; cachefiles_check_active() local 841 /* if the object is no longer there then we probably retired the object cachefiles_check_active() 851 /* check to see if we're using this object */ cachefiles_check_active() 857 object = rb_entry(_n, struct cachefiles_object, active_node); cachefiles_check_active() 859 if (object->dentry > victim) cachefiles_check_active() 861 else if (object->dentry < victim) cachefiles_check_active() 900 * cull an object if it's not in use 958 * find out if an object is in use or not 960 * - returns -EBUSY or 0 to indicate whether an object is in use or not 146 cachefiles_mark_object_active(struct cachefiles_cache *cache, struct cachefiles_object *object) cachefiles_mark_object_active() argument 409 cachefiles_delete_object(struct cachefiles_cache *cache, struct cachefiles_object *object) cachefiles_delete_object() argument 455 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 D | main.c | 45 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 D | rdwr.c | 1 /* 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() 443 ret = cachefiles_read_backing_file_one(object, op, page); cachefiles_read_or_alloc_page() 466 static int cachefiles_read_backing_file(struct cachefiles_object *object, cachefiles_read_backing_file() argument 471 struct address_space *bmapping = d_backing_inode(object->backer)->i_mapping; cachefiles_read_backing_file() 667 cachefiles_io_error_obj(object, "Page read error on backing file"); 683 struct cachefiles_object *object; cachefiles_read_or_alloc_pages() local 692 object = container_of(op->op.object, cachefiles_read_or_alloc_pages() 694 cache = container_of(object->fscache.cache, cachefiles_read_or_alloc_pages() 698 object->fscache.debug_id, atomic_read(&op->op.usage), cachefiles_read_or_alloc_pages() 701 if (!object->backer) cachefiles_read_or_alloc_pages() 708 inode = d_backing_inode(object->backer); cachefiles_read_or_alloc_pages() 771 ret2 = cachefiles_read_backing_file(object, op, &backpages); 800 struct cachefiles_object *object; cachefiles_allocate_page() local 804 object = container_of(op->op.object, cachefiles_allocate_page() 806 cache = container_of(object->fscache.cache, cachefiles_allocate_page() 809 _enter("%p,{%lx},", object, page->index); cachefiles_allocate_page() 838 struct cachefiles_object *object; cachefiles_allocate_pages() local 844 object = container_of(op->op.object, cachefiles_allocate_pages() 846 cache = container_of(object->fscache.cache, cachefiles_allocate_pages() 849 _enter("%p,,,%d,", object, *nr_pages); cachefiles_allocate_pages() 881 struct cachefiles_object *object; cachefiles_write_page() local 893 object = container_of(op->op.object, cachefiles_write_page() 896 _enter("%p,%p{%lx},,,", object, page, page->index); cachefiles_write_page() 898 if (!object->backer) { cachefiles_write_page() 903 ASSERT(d_is_reg(object->backer)); cachefiles_write_page() 905 cache = container_of(object->fscache.cache, cachefiles_write_page() 911 path.dentry = object->backer; cachefiles_write_page() 920 eof = object->fscache.store_limit_l; cachefiles_write_page() 943 object, "Write page to backing file failed"); cachefiles_write_page() 957 struct cachefiles_object *object; cachefiles_uncache_page() local 960 object = container_of(_object, struct cachefiles_object, fscache); cachefiles_uncache_page() 961 cache = container_of(object->fscache.cache, cachefiles_uncache_page() 964 _enter("%p,{%lu}", object, page->index); cachefiles_uncache_page() 966 spin_unlock(&object->fscache.cookie->lock); cachefiles_uncache_page()
|
H A D | internal.h | 41 struct dentry *dentry; /* the file/dir representing this object */ 43 loff_t i_size; /* object size */ 47 atomic_t usage; /* object usage count */ 48 uint8_t type; /* object type */ 49 uint8_t new; /* T if object new */ 110 struct cachefiles_object *object; member in struct:cachefiles_one_write 111 struct list_head obj_link; /* link in object's lists */ 162 struct cachefiles_object *object); 164 struct cachefiles_object *object, 240 extern int cachefiles_check_object_type(struct cachefiles_object *object); 241 extern int cachefiles_set_object_xattr(struct cachefiles_object *object, 243 extern int cachefiles_update_object_xattr(struct cachefiles_object *object, 245 extern int cachefiles_check_auxdata(struct cachefiles_object *object); 246 extern int cachefiles_check_object_xattr(struct cachefiles_object *object, 263 #define cachefiles_io_error_obj(object, FMT, ...) \ 267 ___cache = container_of((object)->fscache.cache, \
|
/linux-4.1.27/arch/arm/boot/bootp/ |
H A D | initrd.S | 1 .type initrd_start,#object
|
/linux-4.1.27/sound/pci/asihpi/ |
H A D | hpimsginit.c | 27 /* 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 D | hpimsginit.h | 33 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.1.27/drivers/gpu/drm/nouveau/include/nvif/ |
H A D | client.h | 4 #include <nvif/object.h> 8 struct nvif_object *object; /*XXX: hack for nvif_object() */ member in struct:nvif_client 14 nvif_client(struct nvif_object *object) nvif_client() argument 16 while (object && object->parent != object) nvif_client() 17 object = object->parent; nvif_client() 18 return (void *)object; nvif_client()
|
H A D | device.h | 4 #include <nvif/object.h> 9 struct nvif_object *object; /*XXX: hack for nvif_object() */ member in struct:nvif_device 14 nvif_device(struct nvif_object *object) nvif_device() argument 16 while (object && object->oclass != 0x0080 /*XXX: NV_DEVICE_CLASS*/ ) nvif_device() 17 object = object->parent; nvif_device() 18 return (void *)object; nvif_device()
|
H A D | object.h | 8 struct nvif_object *object; /*XXX: hack for nvif_object() */ member in struct:nvif_object 37 #define nvif_object(a) (a)->object 72 #include <core/object.h>
|
/linux-4.1.27/mm/ |
H A D | kmemleak.c | 50 * Note that the kmemleak_object.use_count is incremented when an object is 110 #define MSECS_MIN_AGE 5000 /* minimum object age for reporting */ 136 * object->lock. Insertions or deletions from object_list, gray_list or 143 unsigned long flags; /* object status flags */ 148 /* object usage count; object freed when use_count == 0 */ 154 /* the total number of pointers found pointing to this object */ 158 /* memory ranges to be scanned inside an object (empty for all) */ 169 /* flag set after the first reporting of an unreference object */ 171 /* flag set to not scan the object */ 187 /* search tree for object boundaries */ 229 * Early object allocation/freeing logging. Kmemleak is initialized after the 292 * with the object->lock held. 295 struct kmemleak_object *object) hex_dump_object() 297 const u8 *ptr = (const u8 *)object->pointer; hex_dump_object() 303 min(object->size, (size_t)(HEX_MAX_LINES * HEX_ROW_SIZE)); hex_dump_object() 319 * - white - orphan object, not enough references to it (count < min_count) 324 * Newly created objects don't have any color assigned (object->count == -1) 327 static bool color_white(const struct kmemleak_object *object) color_white() argument 329 return object->count != KMEMLEAK_BLACK && color_white() 330 object->count < object->min_count; color_white() 333 static bool color_gray(const struct kmemleak_object *object) color_gray() argument 335 return object->min_count != KMEMLEAK_BLACK && color_gray() 336 object->count >= object->min_count; color_gray() 344 static bool unreferenced_object(struct kmemleak_object *object) unreferenced_object() argument 346 return (color_white(object) && object->flags & OBJECT_ALLOCATED) && unreferenced_object() 347 time_before_eq(object->jiffies + jiffies_min_age, unreferenced_object() 353 * print_unreferenced function must be called with the object->lock held. 356 struct kmemleak_object *object) print_unreferenced() 359 unsigned int msecs_age = jiffies_to_msecs(jiffies - object->jiffies); print_unreferenced() 361 seq_printf(seq, "unreferenced object 0x%08lx (size %zu):\n", print_unreferenced() 362 object->pointer, object->size); print_unreferenced() 364 object->comm, object->pid, object->jiffies, print_unreferenced() 366 hex_dump_object(seq, object); print_unreferenced() 369 for (i = 0; i < object->trace_len; i++) { print_unreferenced() 370 void *ptr = (void *)object->trace[i]; print_unreferenced() 378 * the object->lock held. 380 static void dump_object_info(struct kmemleak_object *object) dump_object_info() argument 384 trace.nr_entries = object->trace_len; dump_object_info() 385 trace.entries = object->trace; dump_object_info() 388 object->pointer, object->size); dump_object_info() 390 object->comm, object->pid, object->jiffies); dump_object_info() 391 pr_notice(" min_count = %d\n", object->min_count); dump_object_info() 392 pr_notice(" count = %d\n", object->count); dump_object_info() 393 pr_notice(" flags = 0x%lx\n", object->flags); dump_object_info() 394 pr_notice(" checksum = %u\n", object->checksum); dump_object_info() 400 * Look-up a memory block metadata (kmemleak_object) in the object search 410 struct kmemleak_object *object = lookup_object() local 412 if (ptr < object->pointer) lookup_object() 413 rb = object->rb_node.rb_left; lookup_object() 414 else if (object->pointer + object->size <= ptr) lookup_object() 415 rb = object->rb_node.rb_right; lookup_object() 416 else if (object->pointer == ptr || alias) lookup_object() 417 return object; lookup_object() 419 kmemleak_warn("Found object by alias at 0x%08lx\n", lookup_object() 421 dump_object_info(object); lookup_object() 429 * Increment the object use_count. Return 1 if successful or 0 otherwise. Note 430 * that once an object's use_count reached 0, the RCU freeing was already 431 * registered and the object should no longer be used. This function must be 434 static int get_object(struct kmemleak_object *object) get_object() argument 436 return atomic_inc_not_zero(&object->use_count); get_object() 446 struct kmemleak_object *object = free_object_rcu() local 451 * code accessing this object, hence no need for locking. free_object_rcu() 453 hlist_for_each_entry_safe(area, tmp, &object->area_list, node) { free_object_rcu() 457 kmem_cache_free(object_cache, object); free_object_rcu() 461 * Decrement the object use_count. Once the count is 0, free the object using 467 static void put_object(struct kmemleak_object *object) put_object() argument 469 if (!atomic_dec_and_test(&object->use_count)) put_object() 473 WARN_ON(object->flags & OBJECT_ALLOCATED); put_object() 475 call_rcu(&object->rcu, free_object_rcu); put_object() 479 * Look up an object in the object search tree and increase its use_count. 484 struct kmemleak_object *object = NULL; find_and_get_object() local 489 object = lookup_object(ptr, alias); find_and_get_object() 492 /* check whether the object is still available */ find_and_get_object() 493 if (object && !get_object(object)) find_and_get_object() 494 object = NULL; find_and_get_object() 497 return object; find_and_get_object() 524 struct kmemleak_object *object, *parent; create_object() local 527 object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp)); create_object() 528 if (!object) { create_object() 534 INIT_LIST_HEAD(&object->object_list); create_object() 535 INIT_LIST_HEAD(&object->gray_list); create_object() 536 INIT_HLIST_HEAD(&object->area_list); create_object() 537 spin_lock_init(&object->lock); create_object() 538 atomic_set(&object->use_count, 1); create_object() 539 object->flags = OBJECT_ALLOCATED; create_object() 540 object->pointer = ptr; create_object() 541 object->size = size; create_object() 542 object->min_count = min_count; create_object() 543 object->count = 0; /* white color initially */ create_object() 544 object->jiffies = jiffies; create_object() 545 object->checksum = 0; create_object() 549 object->pid = 0; create_object() 550 strncpy(object->comm, "hardirq", sizeof(object->comm)); create_object() 552 object->pid = 0; create_object() 553 strncpy(object->comm, "softirq", sizeof(object->comm)); create_object() 555 object->pid = current->pid; create_object() 562 strncpy(object->comm, current->comm, sizeof(object->comm)); create_object() 566 object->trace_len = __save_stack_trace(object->trace); create_object() 582 kmemleak_stop("Cannot insert 0x%lx into the object " create_object() 585 kmem_cache_free(object_cache, object); create_object() 586 object = parent; create_object() 587 spin_lock(&object->lock); create_object() 588 dump_object_info(object); create_object() 589 spin_unlock(&object->lock); create_object() 593 rb_link_node(&object->rb_node, rb_parent, link); create_object() 594 rb_insert_color(&object->rb_node, &object_tree_root); create_object() 596 list_add_tail_rcu(&object->object_list, &object_list); create_object() 599 return object; create_object() 606 static void __delete_object(struct kmemleak_object *object) __delete_object() argument 611 rb_erase(&object->rb_node, &object_tree_root); __delete_object() 612 list_del_rcu(&object->object_list); __delete_object() 615 WARN_ON(!(object->flags & OBJECT_ALLOCATED)); __delete_object() 616 WARN_ON(atomic_read(&object->use_count) < 2); __delete_object() 622 spin_lock_irqsave(&object->lock, flags); __delete_object() 623 object->flags &= ~OBJECT_ALLOCATED; __delete_object() 624 spin_unlock_irqrestore(&object->lock, flags); __delete_object() 625 put_object(object); __delete_object() 634 struct kmemleak_object *object; delete_object_full() local 636 object = find_and_get_object(ptr, 0); delete_object_full() 637 if (!object) { delete_object_full() 639 kmemleak_warn("Freeing unknown object at 0x%08lx\n", delete_object_full() 644 __delete_object(object); delete_object_full() 645 put_object(object); delete_object_full() 655 struct kmemleak_object *object; delete_object_part() local 658 object = find_and_get_object(ptr, 1); delete_object_part() 659 if (!object) { delete_object_part() 661 kmemleak_warn("Partially freeing unknown object at 0x%08lx " delete_object_part() 666 __delete_object(object); delete_object_part() 675 start = object->pointer; delete_object_part() 676 end = object->pointer + object->size; delete_object_part() 678 create_object(start, ptr - start, object->min_count, delete_object_part() 681 create_object(ptr + size, end - ptr - size, object->min_count, delete_object_part() 684 put_object(object); delete_object_part() 687 static void __paint_it(struct kmemleak_object *object, int color) __paint_it() argument 689 object->min_count = color; __paint_it() 691 object->flags |= OBJECT_NO_SCAN; __paint_it() 694 static void paint_it(struct kmemleak_object *object, int color) paint_it() argument 698 spin_lock_irqsave(&object->lock, flags); paint_it() 699 __paint_it(object, color); paint_it() 700 spin_unlock_irqrestore(&object->lock, flags); paint_it() 705 struct kmemleak_object *object; paint_ptr() local 707 object = find_and_get_object(ptr, 0); paint_ptr() 708 if (!object) { paint_ptr() 709 kmemleak_warn("Trying to color unknown object " paint_ptr() 715 paint_it(object, color); paint_ptr() 716 put_object(object); paint_ptr() 720 * Mark an object permanently as gray-colored so that it can no longer be 729 * Mark the object as black-colored so that it is ignored from scans and 738 * Add a scanning area to the object. If at least one such area is added, 744 struct kmemleak_object *object; add_scan_area() local 747 object = find_and_get_object(ptr, 1); add_scan_area() 748 if (!object) { add_scan_area() 749 kmemleak_warn("Adding scan area to unknown object at 0x%08lx\n", add_scan_area() 760 spin_lock_irqsave(&object->lock, flags); add_scan_area() 762 size = object->pointer + object->size - ptr; add_scan_area() 763 } else if (ptr + size > object->pointer + object->size) { add_scan_area() 764 kmemleak_warn("Scan area larger than object 0x%08lx\n", ptr); add_scan_area() 765 dump_object_info(object); add_scan_area() 774 hlist_add_head(&area->node, &object->area_list); add_scan_area() 776 spin_unlock_irqrestore(&object->lock, flags); add_scan_area() 778 put_object(object); add_scan_area() 782 * Set the OBJECT_NO_SCAN flag for the object corresponding to the give 783 * pointer. Such object will not be scanned by kmemleak but references to it 789 struct kmemleak_object *object; object_no_scan() local 791 object = find_and_get_object(ptr, 0); object_no_scan() 792 if (!object) { object_no_scan() 793 kmemleak_warn("Not scanning unknown object at 0x%08lx\n", ptr); object_no_scan() 797 spin_lock_irqsave(&object->lock, flags); object_no_scan() 798 object->flags |= OBJECT_NO_SCAN; object_no_scan() 799 spin_unlock_irqrestore(&object->lock, flags); object_no_scan() 800 put_object(object); object_no_scan() 844 struct kmemleak_object *object; early_alloc() local 852 * RCU locking needed to ensure object is not freed via put_object(). early_alloc() 855 object = create_object((unsigned long)log->ptr, log->size, early_alloc() 857 if (!object) early_alloc() 859 spin_lock_irqsave(&object->lock, flags); early_alloc() 861 object->trace[i] = log->trace[i]; early_alloc() 862 object->trace_len = log->trace_len; early_alloc() 863 spin_unlock_irqrestore(&object->lock, flags); early_alloc() 883 * kmemleak_alloc - register a newly allocated object 884 * @ptr: pointer to beginning of the object 885 * @size: size of the object 886 * @min_count: minimum number of references to this object. If during memory 888 * the object is reported as a memory leak. If @min_count is 0, 889 * the object is never reported as a leak. If @min_count is -1, 890 * the object is ignored (not scanned and not reported as a leak) 893 * This function is called from the kernel allocators when a new object 909 * kmemleak_alloc_percpu - register a newly allocated __percpu object 910 * @ptr: __percpu pointer to beginning of the object 911 * @size: size of the object 914 * This function is called from the kernel percpu allocator when a new object 938 * kmemleak_free - unregister a previously registered object 939 * @ptr: pointer to beginning of the object 941 * This function is called from the kernel allocators when an object (memory 956 * kmemleak_free_part - partially unregister a previously registered object 957 * @ptr: pointer to the beginning or inside the object. This also 976 * kmemleak_free_percpu - unregister a previously registered __percpu object 977 * @ptr: __percpu pointer to beginning of the object 979 * This function is called from the kernel percpu allocator when an object 998 * kmemleak_update_trace - update object allocation stack trace 999 * @ptr: pointer to beginning of the object 1001 * Override the object allocation stack trace for cases where the actual 1006 struct kmemleak_object *object; kmemleak_update_trace() local 1014 object = find_and_get_object((unsigned long)ptr, 1); kmemleak_update_trace() 1015 if (!object) { kmemleak_update_trace() 1017 kmemleak_warn("Updating stack trace for unknown object at %p\n", kmemleak_update_trace() 1023 spin_lock_irqsave(&object->lock, flags); kmemleak_update_trace() 1024 object->trace_len = __save_stack_trace(object->trace); kmemleak_update_trace() 1025 spin_unlock_irqrestore(&object->lock, flags); kmemleak_update_trace() 1027 put_object(object); kmemleak_update_trace() 1032 * kmemleak_not_leak - mark an allocated object as false positive 1033 * @ptr: pointer to beginning of the object 1035 * Calling this function on an object will cause the memory block to no longer 1050 * kmemleak_ignore - ignore an allocated object 1051 * @ptr: pointer to beginning of the object 1053 * Calling this function on an object will cause the memory block to be 1070 * kmemleak_scan_area - limit the range to be scanned in an allocated object 1071 * @ptr: pointer to beginning or inside the object. This also 1076 * This function is used when it is known that only certain parts of an object 1092 * kmemleak_no_scan - do not scan an allocated object 1093 * @ptr: pointer to beginning of the object 1096 * in situations where it is known that the given object does not contain any 1112 * Update an object's checksum and return true if it was modified. 1114 static bool update_checksum(struct kmemleak_object *object) update_checksum() argument 1116 u32 old_csum = object->checksum; update_checksum() 1118 if (!kmemcheck_is_obj_initialized(object->pointer, object->size)) update_checksum() 1122 object->checksum = crc32(0, (void *)object->pointer, object->size); update_checksum() 1125 return object->checksum != old_csum; update_checksum() 1161 struct kmemleak_object *object; scan_block() local 1179 object = find_and_get_object(pointer, 1); scan_block() 1180 if (!object) scan_block() 1182 if (object == scanned) { scan_block() 1184 put_object(object); scan_block() 1189 * Avoid the lockdep recursive warning on object->lock being scan_block() 1193 spin_lock_irqsave_nested(&object->lock, flags, scan_block() 1195 if (!color_white(object)) { scan_block() 1197 spin_unlock_irqrestore(&object->lock, flags); scan_block() 1198 put_object(object); scan_block() 1203 * Increase the object's reference count (number of pointers scan_block() 1205 * minimum, the object's color will become gray and it will be scan_block() 1208 object->count++; scan_block() 1209 if (color_gray(object)) { scan_block() 1210 list_add_tail(&object->gray_list, &gray_list); scan_block() 1211 spin_unlock_irqrestore(&object->lock, flags); scan_block() 1215 spin_unlock_irqrestore(&object->lock, flags); scan_block() 1216 put_object(object); scan_block() 1222 * that object->use_count >= 1. 1224 static void scan_object(struct kmemleak_object *object) scan_object() argument 1230 * Once the object->lock is acquired, the corresponding memory block scan_object() 1233 spin_lock_irqsave(&object->lock, flags); scan_object() 1234 if (object->flags & OBJECT_NO_SCAN) scan_object() 1236 if (!(object->flags & OBJECT_ALLOCATED)) scan_object() 1237 /* already freed object */ scan_object() 1239 if (hlist_empty(&object->area_list)) { scan_object() 1240 void *start = (void *)object->pointer; scan_object() 1241 void *end = (void *)(object->pointer + object->size); scan_object() 1243 while (start < end && (object->flags & OBJECT_ALLOCATED) && scan_object() 1244 !(object->flags & OBJECT_NO_SCAN)) { scan_object() 1246 object, 0); scan_object() 1249 spin_unlock_irqrestore(&object->lock, flags); scan_object() 1251 spin_lock_irqsave(&object->lock, flags); scan_object() 1254 hlist_for_each_entry(area, &object->area_list, node) scan_object() 1257 object, 0); scan_object() 1259 spin_unlock_irqrestore(&object->lock, flags); scan_object() 1268 struct kmemleak_object *object, *tmp; scan_gray_list() local 1275 object = list_entry(gray_list.next, typeof(*object), gray_list); scan_gray_list() 1276 while (&object->gray_list != &gray_list) { scan_gray_list() 1281 scan_object(object); scan_gray_list() 1283 tmp = list_entry(object->gray_list.next, typeof(*object), scan_gray_list() 1286 /* remove the object from the list and release it */ scan_gray_list() 1287 list_del(&object->gray_list); scan_gray_list() 1288 put_object(object); scan_gray_list() 1290 object = tmp; scan_gray_list() 1303 struct kmemleak_object *object; kmemleak_scan() local 1311 list_for_each_entry_rcu(object, &object_list, object_list) { kmemleak_scan() 1312 spin_lock_irqsave(&object->lock, flags); kmemleak_scan() 1316 * 1 reference to any object at this point. kmemleak_scan() 1318 if (atomic_read(&object->use_count) > 1) { kmemleak_scan() 1319 pr_debug("object->use_count = %d\n", kmemleak_scan() 1320 atomic_read(&object->use_count)); kmemleak_scan() 1321 dump_object_info(object); kmemleak_scan() 1324 /* reset the reference count (whiten the object) */ kmemleak_scan() 1325 object->count = 0; kmemleak_scan() 1326 if (color_gray(object) && get_object(object)) kmemleak_scan() 1327 list_add_tail(&object->gray_list, &gray_list); kmemleak_scan() 1329 spin_unlock_irqrestore(&object->lock, flags); kmemleak_scan() 1392 list_for_each_entry_rcu(object, &object_list, object_list) { 1393 spin_lock_irqsave(&object->lock, flags); 1394 if (color_white(object) && (object->flags & OBJECT_ALLOCATED) 1395 && update_checksum(object) && get_object(object)) { 1397 object->count = object->min_count; 1398 list_add_tail(&object->gray_list, &gray_list); 1400 spin_unlock_irqrestore(&object->lock, flags); 1419 list_for_each_entry_rcu(object, &object_list, object_list) { 1420 spin_lock_irqsave(&object->lock, flags); 1421 if (unreferenced_object(object) && 1422 !(object->flags & OBJECT_REPORTED)) { 1423 object->flags |= OBJECT_REPORTED; 1426 spin_unlock_irqrestore(&object->lock, flags); 1503 * Iterate over the object_list and return the first valid object at or after 1509 struct kmemleak_object *object; kmemleak_seq_start() local 1518 list_for_each_entry_rcu(object, &object_list, object_list) { kmemleak_seq_start() 1521 if (get_object(object)) kmemleak_seq_start() 1524 object = NULL; kmemleak_seq_start() 1526 return object; kmemleak_seq_start() 1530 * Return the next object in the object_list. The function decrements the 1531 * use_count of the previous object and increases that of the next one. 1553 * Decrement the use_count of the last object required, if any. 1570 * Print the information for an unreferenced object to the seq file. 1574 struct kmemleak_object *object = v; kmemleak_seq_show() local 1577 spin_lock_irqsave(&object->lock, flags); kmemleak_seq_show() 1578 if ((object->flags & OBJECT_REPORTED) && unreferenced_object(object)) kmemleak_seq_show() 1579 print_unreferenced(seq, object); kmemleak_seq_show() 1580 spin_unlock_irqrestore(&object->lock, flags); kmemleak_seq_show() 1599 struct kmemleak_object *object; dump_str_object_info() local 1604 object = find_and_get_object(addr, 0); dump_str_object_info() 1605 if (!object) { dump_str_object_info() 1606 pr_info("Unknown object at 0x%08lx\n", addr); dump_str_object_info() 1610 spin_lock_irqsave(&object->lock, flags); dump_str_object_info() 1611 dump_object_info(object); dump_str_object_info() 1612 spin_unlock_irqrestore(&object->lock, flags); dump_str_object_info() 1614 put_object(object); dump_str_object_info() 1626 struct kmemleak_object *object; kmemleak_clear() local 1630 list_for_each_entry_rcu(object, &object_list, object_list) { kmemleak_clear() 1631 spin_lock_irqsave(&object->lock, flags); kmemleak_clear() 1632 if ((object->flags & OBJECT_REPORTED) && kmemleak_clear() 1633 unreferenced_object(object)) kmemleak_clear() 1634 __paint_it(object, KMEMLEAK_GREY); kmemleak_clear() 1635 spin_unlock_irqrestore(&object->lock, flags); kmemleak_clear() 1658 * dump=... - dump information about the object found at the given address 1738 struct kmemleak_object *object; __kmemleak_do_cleanup() local 1741 list_for_each_entry_rcu(object, &object_list, object_list) __kmemleak_do_cleanup() 1742 delete_object_full(object->pointer); __kmemleak_do_cleanup() 1758 * object freeing. Ordering of the scan thread stopping and the memory kmemleak_do_cleanup() 294 hex_dump_object(struct seq_file *seq, struct kmemleak_object *object) hex_dump_object() argument 355 print_unreferenced(struct seq_file *seq, struct kmemleak_object *object) print_unreferenced() argument
|
H A D | kmemcheck.c | 60 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 D | slub.c | 56 * 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. 472 * slub is about to manipulate internal object metadata. This memory lies 473 * outside the range of the allocated object, so accessing it would normally 498 static struct track *get_track(struct kmem_cache *s, void *object, get_track() argument 504 p = object + s->offset + sizeof(void *); get_track() 506 p = object + s->inuse; get_track() 511 static void set_track(struct kmem_cache *s, void *object, set_track() argument 514 struct track *p = get_track(s, object, alloc); set_track() 545 static void init_tracking(struct kmem_cache *s, void *object) init_tracking() argument 550 set_track(s, object, TRACK_FREE, 0UL); init_tracking() 551 set_track(s, object, TRACK_ALLOC, 0UL); init_tracking() 573 static void print_tracking(struct kmem_cache *s, void *object) print_tracking() argument 578 print_track("Allocated", get_track(s, object, TRACK_ALLOC)); print_tracking() 579 print_track("Freed", get_track(s, object, TRACK_FREE)); print_tracking() 654 u8 *object, char *reason) object_err() 657 print_trailer(s, page, object); object_err() 674 static void init_object(struct kmem_cache *s, void *object, u8 val) init_object() argument 676 u8 *p = object; init_object() 695 u8 *object, char *what, check_bytes_and_report() 714 print_trailer(s, page, object); check_bytes_and_report() 723 * object address 724 * Bytes of the object to be managed. 725 * If the freepointer may overlay the object then the free 726 * pointer is the first word of the object. 731 * object + s->object_size 739 * object + s->inuse 742 * A. Free pointer (if we cannot overwrite object on free) 750 * object + s->size 763 /* Freepointer is placed after the object. */ check_pad_bytes() 812 void *object, u8 val) check_object() 814 u8 *p = object; check_object() 815 u8 *endobject = object + s->object_size; check_object() 818 if (!check_bytes_and_report(s, page, object, "Redzone", check_object() 845 * freepointer while object is allocated. check_object() 855 * another error because the object count is now wrong. check_object() 891 * Determine if a certain object on a page is on the freelist. Must hold the 898 void *object = NULL; on_freelist() local 906 if (object) { on_freelist() 907 object_err(s, page, object, on_freelist() 909 set_freepointer(s, object, NULL); on_freelist() 919 object = fp; on_freelist() 920 fp = get_freepointer(s, object); on_freelist() 935 slab_err(s, page, "Wrong object count. Counter is %d but " on_freelist() 943 static void trace(struct kmem_cache *s, struct page *page, void *object, trace() argument 950 object, page->inuse, trace() 954 print_section("Object ", (void *)object, trace() 1021 void *object) setup_object_debug() 1026 init_object(s, object, SLUB_RED_INACTIVE); setup_object_debug() 1027 init_tracking(s, object); setup_object_debug() 1032 void *object, unsigned long addr) alloc_debug_processing() 1037 if (!check_valid_pointer(s, page, object)) { alloc_debug_processing() 1038 object_err(s, page, object, "Freelist Pointer check fails"); alloc_debug_processing() 1042 if (!check_object(s, page, object, SLUB_RED_INACTIVE)) alloc_debug_processing() 1047 set_track(s, object, TRACK_ALLOC, addr); alloc_debug_processing() 1048 trace(s, page, object, 1); alloc_debug_processing() 1049 init_object(s, object, SLUB_RED_ACTIVE); alloc_debug_processing() 1067 struct kmem_cache *s, struct page *page, void *object, free_debug_processing() 1078 if (!check_valid_pointer(s, page, object)) { free_debug_processing() 1079 slab_err(s, page, "Invalid object pointer 0x%p", object); free_debug_processing() 1083 if (on_freelist(s, page, object)) { free_debug_processing() 1084 object_err(s, page, object, "Object already free"); free_debug_processing() 1088 if (!check_object(s, page, object, SLUB_RED_ACTIVE)) free_debug_processing() 1093 slab_err(s, page, "Attempt to free object(0x%p) " free_debug_processing() 1094 "outside of slab", object); free_debug_processing() 1096 pr_err("SLUB <none>: no slab for object 0x%p.\n", free_debug_processing() 1097 object); free_debug_processing() 1100 object_err(s, page, object, free_debug_processing() 1106 set_track(s, object, TRACK_FREE, addr); free_debug_processing() 1107 trace(s, page, object, 0); free_debug_processing() 1108 init_object(s, object, SLUB_RED_INACTIVE); free_debug_processing() 1113 * until the object is actually freed free_debug_processing() 1120 slab_fix(s, "Object at 0x%p not freed", object); free_debug_processing() 1207 struct page *page, void *object) {} 1210 struct page *page, void *object, unsigned long addr) { return 0; } 1213 struct kmem_cache *s, struct page *page, void *object, free_debug_processing() 1219 void *object, u8 val) { return 1; } add_full() 1275 gfp_t flags, void *object) slab_post_alloc_hook() 1278 kmemcheck_slab_alloc(s, flags, object, slab_ksize(s)); slab_post_alloc_hook() 1279 kmemleak_alloc_recursive(object, s->object_size, 1, s->flags, flags); slab_post_alloc_hook() 1281 kasan_slab_alloc(s, object); slab_post_alloc_hook() 1398 void *object) setup_object() 1400 setup_object_debug(s, page, object); setup_object() 1402 kasan_unpoison_object_data(s, object); setup_object() 1403 s->ctor(object); setup_object() 1404 kasan_poison_object_data(s, object); setup_object() 1620 void *object = NULL; get_partial_node() local 1640 t = acquire_slab(s, n, page, object == NULL, &objects); get_partial_node() 1645 if (!object) { get_partial_node() 1648 object = t; get_partial_node() 1659 return object; get_partial_node() 1673 void *object; get_any_partial() local 1708 object = get_partial_node(s, n, c, flags); for_each_zone_zonelist() 1709 if (object) { for_each_zone_zonelist() 1717 return object; for_each_zone_zonelist() 1732 void *object; get_partial() local 1740 object = get_partial_node(s, get_node(s, searchnode), c, flags); get_partial() 1741 if (object || node != NUMA_NO_NODE) get_partial() 1742 return object; get_partial() 2190 pr_warn(" cache: %s, object size: %d, buffer size: %d, default order: %d, min order: %d\n", slab_out_of_memory() 2298 * first element of the freelist as the object to allocate now and move the 2423 * Otherwise we can simply pick the next object from the lockless free list. 2428 void **object; slab_alloc_node() local 2454 * Irqless object alloc/free algorithm used here depends on sequence slab_alloc_node() 2456 * on c to guarantee that object and page associated with previous tid slab_alloc_node() 2457 * won't be used with current tid. If we fetch tid first, object and slab_alloc_node() 2470 object = c->freelist; slab_alloc_node() 2472 if (unlikely(!object || !node_match(page, node))) { slab_alloc_node() 2473 object = __slab_alloc(s, gfpflags, node, addr, c); slab_alloc_node() 2476 void *next_object = get_freepointer_safe(s, object); slab_alloc_node() 2494 object, tid, slab_alloc_node() 2504 if (unlikely(gfpflags & __GFP_ZERO) && object) slab_alloc_node() 2505 memset(object, 0, s->object_size); slab_alloc_node() 2507 slab_post_alloc_hook(s, gfpflags, object); slab_alloc_node() 2509 return object; slab_alloc_node() 2581 void **object = (void *)x; __slab_free() local 2601 set_freepointer(s, object, prior); __slab_free() 2635 object, new.counters, __slab_free() 2704 void **object = (void *)x; slab_free() local 2727 set_freepointer(s, object, c->freelist); slab_free() 2732 object, next_tid(tid)))) { slab_free() 2755 * offset 0. If we tune the size of the object to the alignment then we can 2756 * get the required alignment by putting one properly sized object after 2777 * Calculate the order of allocation given an slab object size. 2797 * slab and thereby reduce object handling overhead. If the user has 2799 * the smallest order which will fit the object. 2865 * lets see if we can place a single object there. calculate_order() 3007 * a slab object. 3016 * Round up object size to the next word boundary. We can only calculate_sizes() 3024 * Determine if we can poison the object itself. If the user of calculate_sizes() 3025 * the slab may touch the object after free or before allocation calculate_sizes() 3026 * then we should never poison the object itself. calculate_sizes() 3037 * end of the object and the free pointer. If not then add an calculate_sizes() 3046 * by the object. This is the potential offset to the free pointer. calculate_sizes() 3053 * Relocate free pointer after the object if it is not calculate_sizes() 3054 * permitted to overwrite the first word of the object on calculate_sizes() 3068 * the object. calculate_sizes() 3078 * of the object. calculate_sizes() 3084 * SLUB stores one object immediately after another beginning from calculate_sizes() 3086 * each object to conform to the alignment. calculate_sizes() 3150 * The larger the object size is, the more pages we want on the partial kmem_cache_open() 3160 * object freed. If they are used for allocation then they can be kmem_cache_open() 3374 static size_t __ksize(const void *object) __ksize() argument 3378 if (unlikely(object == ZERO_SIZE_PTR)) __ksize() 3381 page = virt_to_head_page(object); __ksize() 3391 size_t ksize(const void *object) ksize() argument 3393 size_t size = __ksize(object); ksize() 3396 kasan_krealloc(object, size); ksize() 3404 void *object = (void *)x; kfree() local 3418 slab_free(page->slab_cache, page, object, _RET_IP_); kfree() 3730 * Adjust the object sizes so that we clear __kmem_cache_alias() 3731 * the complete object on kzalloc. __kmem_cache_alias() 4208 pr_err("If allocated object is overwritten then not detectable\n\n"); resiliency_test() 4216 pr_err("If allocated object is overwritten then not detectable\n\n"); resiliency_test() 4250 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 653 object_err(struct kmem_cache *s, struct page *page, u8 *object, char *reason) object_err() argument 694 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 811 check_object(struct kmem_cache *s, struct page *page, void *object, u8 val) check_object() argument 1020 setup_object_debug(struct kmem_cache *s, struct page *page, void *object) setup_object_debug() argument 1030 alloc_debug_processing(struct kmem_cache *s, struct page *page, void *object, unsigned long addr) alloc_debug_processing() argument 1066 free_debug_processing( struct kmem_cache *s, struct page *page, void *object, unsigned long addr, unsigned long *flags) free_debug_processing() argument 1206 setup_object_debug(struct kmem_cache *s, struct page *page, void *object) setup_object_debug() argument 1209 alloc_debug_processing(struct kmem_cache *s, struct page *page, void *object, unsigned long addr) alloc_debug_processing() argument 1212 free_debug_processing( struct kmem_cache *s, struct page *page, void *object, unsigned long addr, unsigned long *flags) free_debug_processing() argument 1218 check_object(struct kmem_cache *s, struct page *page, void *object, u8 val) check_object() argument 1274 slab_post_alloc_hook(struct kmem_cache *s, gfp_t flags, void *object) slab_post_alloc_hook() argument 1397 setup_object(struct kmem_cache *s, struct page *page, void *object) setup_object() argument
|
/linux-4.1.27/arch/powerpc/boot/ |
H A D | wrapper | 51 # directory for object and other files used by this script 52 object=arch/powerpc/boot 53 objbin=$object 104 object="$1" 127 if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then 128 dts="$object/dts/$dts" 148 platformo=$object/"$platform".o 149 lds=$object/zImage.lds 160 platformo="$object/of.o $object/epapr.o" 164 platformo="$object/pseries-head.o $object/of.o $object/epapr.o" 173 platformo="$object/of.o $object/epapr.o" 178 platformo="$object/of.o $object/epapr.o" 182 platformo="$object/crt0.o $object/of.o $object/epapr.o" 183 lds=$object/zImage.coff.lds 201 platformo=$object/cuboot-8xx.o 204 platformo=$object/cuboot-52xx.o 207 platformo=$object/cuboot-pq2.o 210 platformo=$object/cuboot-824x.o 213 platformo=$object/cuboot-83xx.o 216 platformo=$object/cuboot-85xx-cpm2.o 219 platformo=$object/cuboot-85xx.o 227 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" 228 lds=$object/zImage.ps3.lds 239 platformo="$object/fixed-head.o $object/$platform.o" 243 platformo="$object/fixed-head.o $object/redboot-8xx.o" 247 platformo="$object/virtex405-head.o $object/simpleboot.o $object/virtex.o" 251 platformo="$object/fixed-head.o $object/simpleboot.o $object/virtex.o" 255 platformo="$object/fixed-head.o $object/simpleboot.o" 259 platformo="$object/fixed-head.o $object/redboot-83xx.o" 264 platformo=$object/cuboot-85xx.o 268 platformo="$object/$platform-head.o $object/$platform.o" 277 platformo="$object/treeboot-iss4xx.o" 280 platformo="$object/pseries-head.o $object/epapr.o $object/epapr-wrapper.o" 285 platformo="$object/fixed-head.o $object/mvme5100.o" 378 addsec $tmp "$vmz" $ksection $object/empty.o 399 $platformo $tmp $object/wrapper.a
|
/linux-4.1.27/include/linux/ |
H A D | fscache-cache.h | 62 struct fscache_object *fsdef; /* object for the fsdef index */ 71 * operation to be applied to a cache object 90 struct list_head pend_link; /* link in object->pending_ops */ 91 struct fscache_object *object; /* object to be operated upon */ member in struct:fscache_operation 99 #define FSCACHE_OP_DEC_READ_CNT 6 /* decrement object->n_reads on destruction */ 129 * object and processor if needed. 219 * - defer writes until cache object lookup completion 233 /* allocate an object record for a cookie */ 237 /* look up the object for a cookie 240 int (*lookup_object)(struct fscache_object *object); 243 void (*lookup_complete)(struct fscache_object *object); 245 /* increment the usage count on this object (may fail if unmounting) */ 246 struct fscache_object *(*grab_object)(struct fscache_object *object); 248 /* pin an object in the cache */ 249 int (*pin_object)(struct fscache_object *object); 251 /* unpin an object in the cache */ 252 void (*unpin_object)(struct fscache_object *object); 258 /* store the updated auxiliary data on an object */ 259 void (*update_object)(struct fscache_object *object); 261 /* Invalidate an object */ 264 /* discard the resources pinned by an object and effect retirement if 266 void (*drop_object)(struct fscache_object *object); 268 /* dispose of a reference to an object */ 269 void (*put_object)(struct fscache_object *object); 274 /* notification that the attributes of a non-index object (such as 276 int (*attr_changed)(struct fscache_object *object); 278 /* reserve space for an object's data and associated metadata */ 279 int (*reserve_space)(struct fscache_object *object, loff_t i_size); 304 void (*uncache_page)(struct fscache_object *object, 317 FSCACHE_OBJECT_EV_NEW_CHILD, /* T if object has a new child */ 318 FSCACHE_OBJECT_EV_PARENT_READY, /* T if object's parent is ready */ 319 FSCACHE_OBJECT_EV_UPDATE, /* T if object should be updated */ 320 FSCACHE_OBJECT_EV_INVALIDATE, /* T if cache requested object invalidation */ 323 FSCACHE_OBJECT_EV_KILL, /* T if netfs relinquished or cache withdrew object */ 330 * States for object state machine. 340 const struct fscache_state *(*work)(struct fscache_object *object, 353 int n_ops; /* number of extant ops on object */ 354 int n_obj_ops; /* number of object ops outstanding on object */ 361 unsigned long oob_event_mask; /* OOB events this object is interested in */ 362 unsigned long event_mask; /* events this object is interested in */ 363 unsigned long events; /* events to be processed by this object 367 #define FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ 368 #define FSCACHE_OBJECT_PENDING_WRITE 1 /* T if object has pending write */ 369 #define FSCACHE_OBJECT_WAITING 2 /* T if object is waiting on its parent */ 370 #define FSCACHE_OBJECT_IS_LIVE 3 /* T if object is not withdrawn or relinquished */ 371 #define FSCACHE_OBJECT_IS_LOOKED_UP 4 /* T if object has been looked up */ 372 #define FSCACHE_OBJECT_IS_AVAILABLE 5 /* T if object has become active */ 373 #define FSCACHE_OBJECT_RETIRED 6 /* T if object was retired on relinquishment */ 377 struct fscache_cache *cache; /* cache that supplied this object */ 378 struct fscache_cookie *cookie; /* netfs's file/index object */ 379 struct fscache_object *parent; /* parent object */ 383 struct list_head pending_ops; /* unstarted operations on this object */ 385 struct rb_node objlist_link; /* link in global object list */ 395 extern void fscache_object_lookup_negative(struct fscache_object *object); 396 extern void fscache_obtained_object(struct fscache_object *object); 398 static inline bool fscache_object_is_live(struct fscache_object *object) fscache_object_is_live() argument 400 return test_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); fscache_object_is_live() 403 static inline bool fscache_object_is_dying(struct fscache_object *object) fscache_object_is_dying() argument 405 return !fscache_object_is_live(object); fscache_object_is_dying() 408 static inline bool fscache_object_is_available(struct fscache_object *object) fscache_object_is_available() argument 410 return test_bit(FSCACHE_OBJECT_IS_AVAILABLE, &object->flags); fscache_object_is_available() 413 static inline bool fscache_object_is_active(struct fscache_object *object) fscache_object_is_active() argument 415 return fscache_object_is_available(object) && fscache_object_is_active() 416 fscache_object_is_live(object) && fscache_object_is_active() 417 !test_bit(FSCACHE_IOERROR, &object->cache->flags); fscache_object_is_active() 420 static inline bool fscache_object_is_dead(struct fscache_object *object) fscache_object_is_dead() argument 422 return fscache_object_is_dying(object) && fscache_object_is_dead() 423 test_bit(FSCACHE_IOERROR, &object->cache->flags); fscache_object_is_dead() 427 * fscache_object_destroyed - Note destruction of an object in a cache 428 * @cache: The cache from which the object came 430 * Note the destruction and deallocation of an object record in a cache. 439 * fscache_object_lookup_error - Note an object encountered an error 440 * @object: The object on which the error was encountered 442 * Note that an object encountered a fatal error (usually an I/O error) and 445 static inline void fscache_object_lookup_error(struct fscache_object *object) fscache_object_lookup_error() argument 447 set_bit(FSCACHE_OBJECT_EV_ERROR, &object->events); fscache_object_lookup_error() 451 * fscache_set_store_limit - Set the maximum size to be stored in an object 452 * @object: The object to set the maximum on 455 * Set the maximum size an object is permitted to reach, implying the highest 462 void fscache_set_store_limit(struct fscache_object *object, loff_t i_size) fscache_set_store_limit() argument 464 object->store_limit_l = i_size; fscache_set_store_limit() 465 object->store_limit = i_size >> PAGE_SHIFT; fscache_set_store_limit() 467 object->store_limit++; fscache_set_store_limit() 491 * fscache_use_cookie - Request usage of cookie attached to an object 492 * @object: Object description 494 * Request usage of the cookie attached to an object. NULL is returned if the 497 static inline bool fscache_use_cookie(struct fscache_object *object) fscache_use_cookie() argument 499 struct fscache_cookie *cookie = object->cookie; fscache_use_cookie() 514 * fscache_unuse_cookie - Cease usage of cookie attached to an object 515 * @object: Object description 517 * Cease usage of the cookie attached to an object. When the users count 520 static inline void fscache_unuse_cookie(struct fscache_object *object) fscache_unuse_cookie() argument 522 struct fscache_cookie *cookie = object->cookie; fscache_unuse_cookie() 550 extern enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
|
H A D | kasan.h | 42 void kasan_unpoison_object_data(struct kmem_cache *cache, void *object); 43 void kasan_poison_object_data(struct kmem_cache *cache, void *object); 48 void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size); 49 void kasan_krealloc(const void *object, size_t new_size); 51 void kasan_slab_alloc(struct kmem_cache *s, void *object); 52 void kasan_slab_free(struct kmem_cache *s, void *object); 69 void *object) {} kasan_poison_object_data() 71 void *object) {} 76 static inline void kasan_kmalloc(struct kmem_cache *s, const void *object, kasan_kmalloc() argument 78 static inline void kasan_krealloc(const void *object, size_t new_size) {} kasan_krealloc() argument 80 static inline void kasan_slab_alloc(struct kmem_cache *s, void *object) {} kasan_slab_free() argument 81 static inline void kasan_slab_free(struct kmem_cache *s, void *object) {} kasan_slab_free() argument 68 kasan_unpoison_object_data(struct kmem_cache *cache, void *object) kasan_unpoison_object_data() argument 70 kasan_poison_object_data(struct kmem_cache *cache, void *object) kasan_poison_object_data() argument
|
H A D | assoc_array.h | 38 /* 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 D | debugobjects.h | 20 * 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 D | kref.h | 29 * kref_init - initialize object. 30 * @kref: object in question. 38 * kref_get - increment refcount for object. 39 * @kref: object. 51 * kref_sub - subtract a number of refcounts for object. 52 * @kref: object. 54 * @release: pointer to the function that will clean up the object when the 55 * last reference to the object is released. 63 * Return 1 if the object was removed, otherwise return 0. Beware, if this 81 * kref_put - decrement refcount for object. 82 * @kref: object. 83 * @release: pointer to the function that will clean up the object when the 84 * last reference to the object is released. 92 * Return 1 if the object was removed, otherwise return 0. Beware, if this 103 * kref_put_spinlock_irqsave - decrement refcount for object. 104 * @kref: object. 105 * @release: pointer to the function that will clean up the object when the 106 * last reference to the object is released. 152 * kref_get_unless_zero - Increment refcount for object unless it is zero. 153 * @kref: object. 159 * removed from that lookup structure in the object destructor.
|
H A D | slub_def.h | 5 * 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 D | fwnode.h | 2 * fwnode.h - Firmware device node object handle type definition.
|
H A D | slab_def.h | 66 * 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 D | cpu_rmap.h | 20 * @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 D | fscache.h | 117 /* 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 D | hashtable.h | 50 * 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 D | exportfs.h | 42 * 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 D | livepatch.h | 52 * 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 D | kmemcheck.h | 13 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
|
/linux-4.1.27/include/drm/ttm/ |
H A D | ttm_object.h | 32 * 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 D | ttm_bo_api.h | 51 * @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 D | ttm_memory.h | 94 * 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.1.27/drivers/staging/fsl-mc/bus/ |
H A D | dpmcp.h | 42 * dpmcp_open() - Open a control session for the specified object. 43 * @mc_io: Pointer to MC portal's I/O object 48 * already created object; an object may have been declared in 51 * associated with the specific object ID and the specific MC 53 * this specific object 63 * dpmcp_close() - Close the control session of the object 64 * @mc_io: Pointer to MC portal's I/O object 65 * @token: Token of DPMCP object 68 * allowed on the object without opening a new control session. 84 * dpmcp_create() - Create the DPMCP object. 85 * @mc_io: Pointer to MC portal's I/O object 89 * Create the DPMCP object, allocate required resources and 92 * The object can be created either by declaring it in the 95 * associated with the specific object ID and the specific MC 97 * this specific object. For objects that are created using the 108 * dpmcp_destroy() - Destroy the DPMCP object and release all its resources. 109 * @mc_io: Pointer to MC portal's I/O object 110 * @token: Token of DPMCP object 117 * dpmcp_reset() - Reset the DPMCP, returns the object to initial state. 118 * @mc_io: Pointer to MC portal's I/O object 119 * @token: Token of DPMCP object 137 * @mc_io: Pointer to MC portal's I/O object 138 * @token: Token of DPMCP object 156 * @mc_io: Pointer to MC portal's I/O object 157 * @token: Token of DPMCP object 178 * @mc_io: Pointer to MC portal's I/O object 179 * @token: Token of DPMCP object 197 * @mc_io: Pointer to MC portal's I/O object 198 * @token: Token of DPMCP object 211 * @mc_io: Pointer to MC portal's I/O object 212 * @token: Token of DPMCP object 231 * @mc_io: Pointer to MC portal's I/O object 232 * @token: Token of DPMCP object 249 * @mc_io: Pointer to MC portal's I/O object 250 * @token: Token of DPMCP object 266 * @mc_io: Pointer to MC portal's I/O object 267 * @token: Token of DPMCP object 282 * @id: DPMCP object ID 301 * @mc_io: Pointer to MC portal's I/O object 302 * @token: Token of DPMCP object 303 * @attr: Returned object's attributes
|
H A D | mc-allocator.c | 2 * 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 359 * fsl_mc_portal_reset - Resets the dpmcp object for a given fsl_mc_io object 361 * @mc_io: Pointer to the fsl_mc_io object that wraps the MC portal to free 399 * fsl_mc_object_allocate - Allocates a MC object device of the given 402 * @mc_dev: MC device for which the MC object device is to be allocated 405 * MC object device is to be returned 407 * This function allocates a MC object device from the device's parent DPRC, 408 * from the corresponding MC bus' pool of allocatable MC object devices of 456 * fsl_mc_object_free - Returns an allocatable MC object device to the 459 * @mc_adev: Pointer to the MC object device 503 "Allocatable MC object device bound to fsl_mc_allocator driver"); fsl_mc_allocator_probe() 526 "Allocatable MC object device unbound from fsl_mc_allocator driver"); fsl_mc_allocator_remove()
|
H A D | mc-sys.c | 58 * Creates an MC I/O object 60 * @dev: device to be associated with the MC I/O object 63 * @resource: Pointer to MC bus object allocator resource associated 64 * with this MC I/O object or NULL if none. 65 * @flags: flags for the new MC I/O object 66 * @new_mc_io: Area to return pointer to newly created MC I/O object 117 * Destroys an MC I/O object 119 * @mc_io: MC I/O object to destroy 227 * Sends an command to the MC device using the given MC I/O object 229 * @mc_io: MC I/O object to be used
|
H A D | mc-bus.c | 27 * @dev: the MC object device structure to match against 28 * @drv: the device driver to search for matching MC object device id 49 * If the object is not 'plugged' don't match. fsl_mc_bus_match() 58 * a matching for the given MC object device. fsl_mc_bus_match() 77 "Major version mismatch: driver version %u.%u, MC object version %u.%u\n", fsl_mc_bus_match() 83 "Minor version mismatch: driver version %u.%u, MC object version %u.%u\n", fsl_mc_bus_match() 125 dev_err(dev, "MC object device probe callback failed: %d\n", fsl_mc_driver_probe() 145 "MC object device remove callback failed: %d\n", fsl_mc_driver_remove() 193 pr_info("MC object device driver %s registered\n", __fsl_mc_driver_register() 304 regions[i].name = "fsl-mc object MMIO region"; fsl_mc_device_get_mmio_regions() 317 * Add a newly discovered MC object device to be visible in Linux 336 * Allocate an MC bus device object: fsl_mc_device_add() 345 * Allocate a regular fsl_mc_device object: fsl_mc_device_add() 372 * given MC object, using the same MC portal. fsl_mc_device_add() 399 * A non-DPRC MC object device has to be a child of another fsl_mc_device_add() 400 * MC object (specifically a DPRC object) fsl_mc_device_add() 432 dev_dbg(parent_dev, "Added MC object device %s\n", fsl_mc_device_add() 450 * fsl_mc_device_remove - Remove a MC object device from being visible to 453 * @mc_dev: Pointer to a MC object device object
|
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/core/ |
H A D | parent.h | 3 #include <core/object.h> 12 struct nvkm_object object; member in struct:nvkm_parent 22 struct nvkm_object *object, u32 name); 40 nvkm_object_init(&(p)->object) 42 nvkm_object_fini(&(p)->object, (s))
|
H A D | gpuobj.h | 3 #include <core/object.h> 13 struct nvkm_object object; member in struct:nvkm_gpuobj 36 #define nvkm_gpuobj_init(p) nvkm_object_init(&(p)->object) 37 #define nvkm_gpuobj_fini(p,s) nvkm_object_fini(&(p)->object, (s)) 56 nvkm_object_ref(&obj->object, (struct nvkm_object **)ref); nvkm_gpuobj_ref()
|
H A D | handle.h | 19 struct nvkm_object *object; member in struct:nvkm_handle
|
H A D | device.h | 52 nv_device_match(struct nvkm_object *object, u16 dev, u16 ven, u16 sub) nv_device_match() argument 54 struct nvkm_device *device = nv_device(object); nv_device_match()
|
/linux-4.1.27/drivers/gpu/drm/ |
H A D | drm_global.c | 38 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 D | drm_gem_cma_helper.c | 44 * __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 296 dev_err(drm->dev, "failed to lookup GEM object\n"); drm_gem_cma_dumb_map_offset() 340 * drm_gem_cma_mmap - memory-map a CMA GEM object 341 * @filp: file object 346 * immediately faults in the entire object instead of using on-demaind 373 * drm_gem_cma_describe - describe a CMA GEM object for debugfs 374 * @cma_obj: CMA GEM object 378 * CMA GEM object into a synthetic file. 402 * pages for a CMA GEM object 403 * @obj: GEM object 436 * drm_gem_cma_prime_import_sg_table - produce a CMA GEM object from another 449 * A pointer to a newly created GEM object or an ERR_PTR-encoded negative 477 * drm_gem_cma_prime_mmap - memory-map an exported CMA GEM object 478 * @obj: GEM object 507 * drm_gem_cma_prime_vmap - map a CMA GEM object into the kernel's virtual 509 * @obj: GEM object 518 * The kernel virtual address of the CMA GEM object's backing store. 529 * drm_gem_cma_prime_vunmap - unmap a CMA GEM object from the kernel's virtual 531 * @obj: GEM object 532 * @vaddr: kernel virtual address where the CMA GEM object was mapped
|
H A D | drm_gem.c | 57 * 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 801 * drm_gem_mmap_obj - memory map a GEM object 802 * @obj: the GEM object to map 803 * @obj_size: the object size to be mapped, in bytes 806 * Set up the VMA to prepare mapping of the GEM object using the gem_vm_ops 809 * the object will be trapped, to perform migration, GTT binding, surface 814 * the GEM object is not looked up based on its fake offset. To implement the 823 * Return 0 or success or -EINVAL if the object size is smaller than the VMA 845 /* Take a ref for this mapping of the object, so that the fault drm_gem_mmap_obj() 846 * handler can dereference the mmap offset's pointer to the object. drm_gem_mmap_obj() 863 * If a driver supports GEM object mapping, mmap calls on the DRM file 866 * Look up the GEM object based on the offset passed in (vma->vm_pgoff will 868 * the object) and map it with a call to drm_gem_mmap_obj(). 870 * If the caller is not granted access to the buffer object, the mmap will fail
|
H A D | drm_vma_manager.c | 44 * 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_ 146 * @mgr: Manager object 147 * @start: Start address for object (page-based) 148 * @pages: Size of object (page-based) 218 * @mgr: Manager object 223 * nothing and return 0. @pages is the size of the object given in number of 232 * @pages is not required to be the same size as the underlying memory object 266 * @mgr: Manager object
|
H A D | drm_prime.c | 40 * 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 326 * - @gem_prime_import_sg_table (import): produce a GEM object from another 333 * @obj: GEM object to export 398 * drivers to ensure correct lifetime management of the underlying GEM object. 399 * The actual exporting from GEM object to a dma-buf is done through the 425 /* re-export the original imported object */ drm_gem_prime_handle_to_fd() 492 * @dma_buf: dma-buf object to import 557 * @handle: pointer to storage for the handle of the imported buffer object 560 * drivers to ensure correct lifetime management of the underlying GEM object. 561 * The actual importing of GEM object from the dma-buf is done through the 616 /* hmm, if driver attached, we are relying on the free-object path drm_gem_prime_fd_to_handle() 672 * This helper creates an sg table object from a set of pages 743 * drm_prime_gem_destroy - helper to clean up a PRIME-imported GEM object 744 * @obj: GEM object which was created from a dma-buf
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | base.c | 73 nvkm_bios_rd08(struct nvkm_object *object, u64 addr) nvkm_bios_rd08() argument 75 struct nvkm_bios *bios = (void *)object; nvkm_bios_rd08() 80 nvkm_bios_rd16(struct nvkm_object *object, u64 addr) nvkm_bios_rd16() argument 82 struct nvkm_bios *bios = (void *)object; nvkm_bios_rd16() 87 nvkm_bios_rd32(struct nvkm_object *object, u64 addr) nvkm_bios_rd32() argument 89 struct nvkm_bios *bios = (void *)object; nvkm_bios_rd32() 94 nvkm_bios_wr08(struct nvkm_object *object, u64 addr, u8 data) nvkm_bios_wr08() argument 96 struct nvkm_bios *bios = (void *)object; nvkm_bios_wr08() 101 nvkm_bios_wr16(struct nvkm_object *object, u64 addr, u16 data) nvkm_bios_wr16() argument 103 struct nvkm_bios *bios = (void *)object; nvkm_bios_wr16() 108 nvkm_bios_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_bios_wr32() argument 110 struct nvkm_bios *bios = (void *)object; nvkm_bios_wr32() 170 nvkm_bios_dtor(struct nvkm_object *object) nvkm_bios_dtor() argument 172 struct nvkm_bios *bios = (void *)object; nvkm_bios_dtor() 178 nvkm_bios_init(struct nvkm_object *object) nvkm_bios_init() argument 180 struct nvkm_bios *bios = (void *)object; nvkm_bios_init() 185 nvkm_bios_fini(struct nvkm_object *object, bool suspend) nvkm_bios_fini() argument 187 struct nvkm_bios *bios = (void *)object; nvkm_bios_fini()
|
/linux-4.1.27/drivers/staging/fsl-mc/include/ |
H A D | dpbp.h | 42 * dpbp_open() - Open a control session for the specified object. 43 * @mc_io: Pointer to MC portal's I/O object 48 * already created object; an object may have been declared in 51 * associated with the specific object ID and the specific MC 53 * this specific object 60 * dpbp_close() - Close the control session of the object 61 * @mc_io: Pointer to MC portal's I/O object 62 * @token: Token of DPBP object 65 * allowed on the object without opening a new control session. 80 * dpbp_create() - Create the DPBP object. 81 * @mc_io: Pointer to MC portal's I/O object 85 * Create the DPBP object, allocate required resources and 88 * The object can be created either by declaring it in the 91 * associated with the specific object ID and the specific MC 93 * this specific object. For objects that are created using the 104 * dpbp_destroy() - Destroy the DPBP object and release all its resources. 105 * @mc_io: Pointer to MC portal's I/O object 106 * @token: Token of DPBP object 114 * @mc_io: Pointer to MC portal's I/O object 115 * @token: Token of DPBP object 123 * @mc_io: Pointer to MC portal's I/O object 124 * @token: Token of DPBP object 132 * @mc_io: Pointer to MC portal's I/O object 133 * @token: Token of DPBP object 134 * @en: Returns '1' if object is enabled; '0' otherwise 141 * dpbp_reset() - Reset the DPBP, returns the object to initial state. 142 * @mc_io: Pointer to MC portal's I/O object 143 * @token: Token of DPBP object 151 * @mc_io: Pointer to MC portal's I/O object 152 * @token: Token of DPBP object 170 * @mc_io: Pointer to MC portal's I/O object 171 * @token: Token of DPBP object 192 * @mc_io: Pointer to MC portal's I/O object 193 * @token: Token of DPBP object 211 * @mc_io: Pointer to MC portal's I/O object 212 * @token: Token of DPBP object 225 * @mc_io: Pointer to MC portal's I/O object 226 * @token: Token of DPBP object 245 * @mc_io: Pointer to MC portal's I/O object 246 * @token: Token of DPBP object 263 * @mc_io: Pointer to MC portal's I/O object 264 * @token: Token of DPBP object 280 * @mc_io: Pointer to MC portal's I/O object 281 * @token: Token of DPBP object 296 * @id: DPBP object ID 318 * @mc_io: Pointer to MC portal's I/O object 319 * @token: Token of DPBP object 320 * @attr: Returned object's attributes
|
H A D | mc.h | 25 * 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 D | dprc.h | 56 * dprc_open() - Open DPRC object for use 57 * @mc_io: Pointer to MC portal's I/O object 59 * @token: Returned token of DPRC object 63 * @warning Required before any operation on the object. 68 * dprc_close() - Close the control session of the object 69 * @mc_io: Pointer to MC portal's I/O object 70 * @token: Token of DPRC object 73 * allowed on the object without opening a new control session. 100 * container is allowed to invoke object initialization operations. 134 * @mc_io: Pointer to MC portal's I/O object 135 * @token: Token of DPRC object 151 * @mc_io: Pointer to MC portal's I/O object 152 * @token: Token of DPRC object 176 * @mc_io: Pointer to MC portal's I/O object 177 * @token: Token of DPRC object 190 * has not crashed, but the resulting object cleanup operations will not be 206 /* IRQ event - Indicates that a new object assigned to the container */ 208 /* IRQ event - Indicates that an object was unassigned from the container */ 219 /* IRQ event - Indicates that on one of the container's opened object is 224 /* Irq event - Indicates that object is created at the container */ 229 * @mc_io: Pointer to MC portal's I/O object 230 * @token: Token of DPRC object 248 * @mc_io: Pointer to MC portal's I/O object 249 * @token: Token of DPRC object 270 * @mc_io: Pointer to MC portal's I/O object 271 * @token: Token of DPRC object 289 * @mc_io: Pointer to MC portal's I/O object 290 * @token: Token of DPRC object 303 * @mc_io: Pointer to MC portal's I/O object 304 * @token: Token of DPRC object 323 * @mc_io: Pointer to MC portal's I/O object 324 * @token: Token of DPRC object 340 * @mc_io: Pointer to MC portal's I/O object 341 * @token: Token of DPRC object 356 * @mc_io: Pointer to MC portal's I/O object 357 * @token: Token of DPRC object 396 * @mc_io: Pointer to MC portal's I/O object 397 * @token: Token of DPRC object 407 * dprc_set_res_quota() - Set allocation policy for a specific resource/object 409 * @mc_io: Pointer to MC portal's I/O object 410 * @token: Token of DPRC object 412 * @type: Resource/object type 438 * resource/object type in a child container 439 * @mc_io: Pointer to MC portal's I/O object 440 * @token: Token of DPRC object 442 * @type: resource/object type 470 /* Plugged Flag - Relevant only for object assignment request. 472 * the relevant GPP. The assigned object will be marked as plugged. 480 * @type: Resource/object type: Represent as a NULL terminated string. 482 * type and dprc_get_obj() to get object type; 502 * @mc_io: Pointer to MC portal's I/O object 503 * @token: Token of DPRC object 520 * - DPRC_RES_REQ_OPT_PLUGGED: Relevant only for object assignment, 521 * and indicates that the object must be set to the plugged state. 524 * object state to plugged or unplugged. 527 * interrupt following every change in its object assignment. 539 * @mc_io: Pointer to MC portal's I/O object 540 * @token: Token of DPRC object 545 * Un-assignment of objects can succeed only if the object is not in the 557 * @mc_io: Pointer to MC portal's I/O object 558 * @token: Token of DPRC object 569 * @mc_io: Pointer to MC portal's I/O object 570 * @token: Token of DPRC object 588 * @mc_io: Pointer to MC portal's I/O object 589 * @token: Token of DPRC object 598 /* Opened state - Indicates that an object is open by at least one owner */ 600 /* Plugged state - Indicates that the object is plugged */ 605 * @type: Type of object: NULL terminated string 606 * @id: ID of logical object resource 610 * @irq_count: Number of interrupts supported by the object 611 * @region_count: Number of mappable regions supported by the object 626 * dprc_get_obj() - Get general information on an object 627 * @mc_io: Pointer to MC portal's I/O object 628 * @token: Token of DPRC object 629 * @obj_index: Index of the object to be queried (< obj_count) 630 * @obj_desc: Returns the requested object descriptor 632 * The object descriptors are retrieved one by one by incrementing 647 * @mc_io: Pointer to MC portal's I/O object 648 * @token: Token of DPRC object 689 * @mc_io: Pointer to MC portal's I/O object 690 * @token: Token of DPRC object 703 * @mc_io: Pointer to MC portal's I/O object 704 * @token: Token of DPRC object 726 * dprc_get_obj_region() - Get region information for a specified object. 727 * @mc_io: Pointer to MC portal's I/O object 728 * @token: Token of DPRC object 730 * @obj_id: Unique object instance as returned in dprc_get_obj() 746 * @type: Endpoint object type: NULL terminated string 747 * @id: Endpoint object ID 759 * @mc_io: Pointer to MC portal's I/O object 760 * @token: Token of DPRC object 773 * @mc_io: Pointer to MC portal's I/O object 774 * @token: Token of DPRC object 786 * @mc_io Pointer to MC portal's I/O object 787 * @token Token of DPRC object
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/device/ |
H A D | ctrl.c | 34 nvkm_control_mthd_pstate_info(struct nvkm_object *object, void *data, u32 size) nvkm_control_mthd_pstate_info() argument 39 struct nvkm_clk *clk = nvkm_clk(object); nvkm_control_mthd_pstate_info() 42 nv_ioctl(object, "control pstate info size %d\n", size); nvkm_control_mthd_pstate_info() 44 nv_ioctl(object, "control pstate info vers %d\n", nvkm_control_mthd_pstate_info() 67 nvkm_control_mthd_pstate_attr(struct nvkm_object *object, void *data, u32 size) nvkm_control_mthd_pstate_attr() argument 72 struct nvkm_clk *clk = nvkm_clk(object); nvkm_control_mthd_pstate_attr() 80 nv_ioctl(object, "control pstate attr size %d\n", size); nvkm_control_mthd_pstate_attr() 82 nv_ioctl(object, "control pstate attr vers %d state %d " nvkm_control_mthd_pstate_attr() 140 nvkm_control_mthd_pstate_user(struct nvkm_object *object, void *data, u32 size) nvkm_control_mthd_pstate_user() argument 145 struct nvkm_clk *clk = nvkm_clk(object); nvkm_control_mthd_pstate_user() 148 nv_ioctl(object, "control pstate user size %d\n", size); nvkm_control_mthd_pstate_user() 150 nv_ioctl(object, "control pstate user vers %d ustate %d " nvkm_control_mthd_pstate_user() 169 nvkm_control_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_control_mthd() argument 173 return nvkm_control_mthd_pstate_info(object, data, size); nvkm_control_mthd() 175 return nvkm_control_mthd_pstate_attr(object, data, size); nvkm_control_mthd() 177 return nvkm_control_mthd_pstate_user(object, data, size); nvkm_control_mthd()
|
H A D | base.c | 80 nvkm_devobj_info(struct nvkm_object *object, void *data, u32 size) nvkm_devobj_info() argument 82 struct nvkm_device *device = nv_device(object); nvkm_devobj_info() 90 nv_ioctl(object, "device info size %d\n", size); nvkm_devobj_info() 92 nv_ioctl(object, "device info vers %d\n", args->v0.version); nvkm_devobj_info() 153 nvkm_devobj_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_devobj_mthd() argument 157 return nvkm_devobj_info(object, data, size); nvkm_devobj_mthd() 165 nvkm_devobj_rd08(struct nvkm_object *object, u64 addr) nvkm_devobj_rd08() argument 167 return nv_rd08(object->engine, addr); nvkm_devobj_rd08() 171 nvkm_devobj_rd16(struct nvkm_object *object, u64 addr) nvkm_devobj_rd16() argument 173 return nv_rd16(object->engine, addr); nvkm_devobj_rd16() 177 nvkm_devobj_rd32(struct nvkm_object *object, u64 addr) nvkm_devobj_rd32() argument 179 return nv_rd32(object->engine, addr); nvkm_devobj_rd32() 183 nvkm_devobj_wr08(struct nvkm_object *object, u64 addr, u8 data) nvkm_devobj_wr08() argument 185 nv_wr08(object->engine, addr, data); nvkm_devobj_wr08() 189 nvkm_devobj_wr16(struct nvkm_object *object, u64 addr, u16 data) nvkm_devobj_wr16() argument 191 nv_wr16(object->engine, addr, data); nvkm_devobj_wr16() 195 nvkm_devobj_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_devobj_wr32() argument 197 nv_wr32(object->engine, addr, data); nvkm_devobj_wr32() 201 nvkm_devobj_map(struct nvkm_object *object, u64 *addr, u32 *size) nvkm_devobj_map() argument 203 struct nvkm_device *device = nv_device(object); nvkm_devobj_map() 252 nvkm_devobj_dtor(struct nvkm_object *object) nvkm_devobj_dtor() argument 254 struct nvkm_devobj *devobj = (void *)object; nvkm_devobj_dtor() 522 device = &nv_object(obj)->engine->subdev.object; nv_device() 540 nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_device_event_ctor() argument 558 nvkm_device_fini(struct nvkm_object *object, bool suspend) nvkm_device_fini() argument 560 struct nvkm_device *device = (void *)object; nvkm_device_fini() 591 nvkm_device_init(struct nvkm_object *object) nvkm_device_init() argument 593 struct nvkm_device *device = (void *)object; nvkm_device_init() 628 nvkm_device_dtor(struct nvkm_object *object) nvkm_device_dtor() argument 630 struct nvkm_device *device = (void *)object; nvkm_device_dtor()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/ |
H A D | nv04.c | 29 * instmem object implementation 33 nv04_instobj_rd32(struct nvkm_object *object, u64 addr) nv04_instobj_rd32() argument 35 struct nv04_instmem_priv *priv = (void *)nvkm_instmem(object); nv04_instobj_rd32() 36 struct nv04_instobj_priv *node = (void *)object; nv04_instobj_rd32() 41 nv04_instobj_wr32(struct nvkm_object *object, u64 addr, u32 data) nv04_instobj_wr32() argument 43 struct nv04_instmem_priv *priv = (void *)nvkm_instmem(object); nv04_instobj_wr32() 44 struct nv04_instobj_priv *node = (void *)object; nv04_instobj_wr32() 49 nv04_instobj_dtor(struct nvkm_object *object) nv04_instobj_dtor() argument 51 struct nv04_instmem_priv *priv = (void *)nvkm_instmem(object); nv04_instobj_dtor() 52 struct nv04_instobj_priv *node = (void *)object; nv04_instobj_dtor() 110 nv04_instmem_rd32(struct nvkm_object *object, u64 addr) nv04_instmem_rd32() argument 112 return nv_rd32(object, 0x700000 + addr); nv04_instmem_rd32() 116 nv04_instmem_wr32(struct nvkm_object *object, u64 addr, u32 data) nv04_instmem_wr32() argument 118 return nv_wr32(object, 0x700000 + addr, data); nv04_instmem_wr32() 122 nv04_instmem_dtor(struct nvkm_object *object) nv04_instmem_dtor() argument 124 struct nv04_instmem_priv *priv = (void *)object; nv04_instmem_dtor()
|
H A D | nv50.c | 40 * instmem object implementation 44 nv50_instobj_rd32(struct nvkm_object *object, u64 offset) nv50_instobj_rd32() argument 46 struct nv50_instmem_priv *priv = (void *)nvkm_instmem(object); nv50_instobj_rd32() 47 struct nv50_instobj_priv *node = (void *)object; nv50_instobj_rd32() 64 nv50_instobj_wr32(struct nvkm_object *object, u64 offset, u32 data) nv50_instobj_wr32() argument 66 struct nv50_instmem_priv *priv = (void *)nvkm_instmem(object); nv50_instobj_wr32() 67 struct nv50_instobj_priv *node = (void *)object; nv50_instobj_wr32() 82 nv50_instobj_dtor(struct nvkm_object *object) nv50_instobj_dtor() argument 84 struct nv50_instobj_priv *node = (void *)object; nv50_instobj_dtor() 85 struct nvkm_fb *pfb = nvkm_fb(object); nv50_instobj_dtor() 135 nv50_instmem_fini(struct nvkm_object *object, bool suspend) nv50_instmem_fini() argument 137 struct nv50_instmem_priv *priv = (void *)object; nv50_instmem_fini()
|
H A D | base.c | 29 * instmem object base implementation 33 _nvkm_instobj_dtor(struct nvkm_object *object) _nvkm_instobj_dtor() argument 35 struct nvkm_instmem *imem = nvkm_instmem(object); _nvkm_instobj_dtor() 36 struct nvkm_instobj *iobj = (void *)object; _nvkm_instobj_dtor() 73 struct nvkm_instmem_impl *impl = (void *)imem->base.object.oclass; nvkm_instmem_alloc() 75 return nvkm_object_ctor(parent, &parent->engine->subdev.object, nvkm_instmem_alloc() 80 _nvkm_instmem_fini(struct nvkm_object *object, bool suspend) _nvkm_instmem_fini() argument 82 struct nvkm_instmem *imem = (void *)object; _nvkm_instmem_fini() 107 _nvkm_instmem_init(struct nvkm_object *object) _nvkm_instmem_init() argument 109 struct nvkm_instmem *imem = (void *)object; _nvkm_instmem_init()
|
/linux-4.1.27/tools/perf/util/ |
H A D | environment.c | 2 * We put all the perf config variables in this same object
|
/linux-4.1.27/include/net/caif/ |
H A D | cfcnfg.h | 37 * 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.1.27/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
H A D | nv04.c | 369 * Graphics object classes 388 * - bit 24: patch valid [enables rendering using this object] 410 * - bit 24: patch valid [enables rendering using this object] 426 * object-binding methods with object of the proper type, or with the NULL 429 * example rop object is needed by ROP_AND, but not by SRCCOPY_AND. 443 * methods on the surf3d object, so we have to emulate them too. 447 nv04_gr_set_ctx1(struct nvkm_object *object, u32 mask, u32 value) nv04_gr_set_ctx1() argument 449 struct nv04_gr_priv *priv = (void *)object->engine; nv04_gr_set_ctx1() 453 tmp = nv_ro32(object, 0x00); nv04_gr_set_ctx1() 456 nv_wo32(object, 0x00, tmp); nv04_gr_set_ctx1() 463 nv04_gr_set_ctx_val(struct nvkm_object *object, u32 mask, u32 value) nv04_gr_set_ctx_val() argument 468 ctx1 = nv_ro32(object, 0x00); nv04_gr_set_ctx_val() 472 tmp = nv_ro32(object, 0x0c); nv04_gr_set_ctx_val() 475 nv_wo32(object, 0x0c, tmp); nv04_gr_set_ctx_val() 507 nv04_gr_set_ctx1(object, 0x01000000, valid << 24); nv04_gr_set_ctx_val() 511 nv04_gr_mthd_set_operation(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_set_operation() argument 514 u32 class = nv_ro32(object, 0) & 0xff; nv04_gr_mthd_set_operation() 521 nv04_gr_set_ctx1(object, 0x00038000, data << 15); nv04_gr_mthd_set_operation() 523 nv04_gr_set_ctx_val(object, 0, 0); nv04_gr_mthd_set_operation() 528 nv04_gr_mthd_surf3d_clip_h(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_surf3d_clip_h() argument 531 struct nv04_gr_priv *priv = (void *)object->engine; nv04_gr_mthd_surf3d_clip_h() 549 nv04_gr_mthd_surf3d_clip_v(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_surf3d_clip_v() argument 552 struct nv04_gr_priv *priv = (void *)object->engine; nv04_gr_mthd_surf3d_clip_v() 570 nv04_gr_mthd_bind_class(struct nvkm_object *object, u32 *args, u32 size) nv04_gr_mthd_bind_class() argument 572 struct nvkm_instmem *imem = nvkm_instmem(object); nv04_gr_mthd_bind_class() 578 nv04_gr_mthd_bind_surf2d(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_surf2d() argument 581 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_surf2d() 583 nv04_gr_set_ctx1(object, 0x00004000, 0); nv04_gr_mthd_bind_surf2d() 584 nv04_gr_set_ctx_val(object, 0x02000000, 0); nv04_gr_mthd_bind_surf2d() 587 nv04_gr_set_ctx1(object, 0x00004000, 0); nv04_gr_mthd_bind_surf2d() 588 nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); nv04_gr_mthd_bind_surf2d() 595 nv04_gr_mthd_bind_surf2d_swzsurf(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_surf2d_swzsurf() argument 598 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_surf2d_swzsurf() 600 nv04_gr_set_ctx1(object, 0x00004000, 0); nv04_gr_mthd_bind_surf2d_swzsurf() 601 nv04_gr_set_ctx_val(object, 0x02000000, 0); nv04_gr_mthd_bind_surf2d_swzsurf() 604 nv04_gr_set_ctx1(object, 0x00004000, 0); nv04_gr_mthd_bind_surf2d_swzsurf() 605 nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); nv04_gr_mthd_bind_surf2d_swzsurf() 608 nv04_gr_set_ctx1(object, 0x00004000, 0x00004000); nv04_gr_mthd_bind_surf2d_swzsurf() 609 nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); nv04_gr_mthd_bind_surf2d_swzsurf() 616 nv01_gr_mthd_bind_patt(struct nvkm_object *object, u32 mthd, nv01_gr_mthd_bind_patt() argument 619 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv01_gr_mthd_bind_patt() 621 nv04_gr_set_ctx_val(object, 0x08000000, 0); nv01_gr_mthd_bind_patt() 624 nv04_gr_set_ctx_val(object, 0x08000000, 0x08000000); nv01_gr_mthd_bind_patt() 631 nv04_gr_mthd_bind_patt(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_patt() argument 634 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_patt() 636 nv04_gr_set_ctx_val(object, 0x08000000, 0); nv04_gr_mthd_bind_patt() 639 nv04_gr_set_ctx_val(object, 0x08000000, 0x08000000); nv04_gr_mthd_bind_patt() 646 nv04_gr_mthd_bind_rop(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_rop() argument 649 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_rop() 651 nv04_gr_set_ctx_val(object, 0x10000000, 0); nv04_gr_mthd_bind_rop() 654 nv04_gr_set_ctx_val(object, 0x10000000, 0x10000000); nv04_gr_mthd_bind_rop() 661 nv04_gr_mthd_bind_beta1(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_beta1() argument 664 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_beta1() 666 nv04_gr_set_ctx_val(object, 0x20000000, 0); nv04_gr_mthd_bind_beta1() 669 nv04_gr_set_ctx_val(object, 0x20000000, 0x20000000); nv04_gr_mthd_bind_beta1() 676 nv04_gr_mthd_bind_beta4(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_beta4() argument 679 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_beta4() 681 nv04_gr_set_ctx_val(object, 0x40000000, 0); nv04_gr_mthd_bind_beta4() 684 nv04_gr_set_ctx_val(object, 0x40000000, 0x40000000); nv04_gr_mthd_bind_beta4() 691 nv04_gr_mthd_bind_surf_dst(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_surf_dst() argument 694 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_surf_dst() 696 nv04_gr_set_ctx_val(object, 0x02000000, 0); nv04_gr_mthd_bind_surf_dst() 699 nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); nv04_gr_mthd_bind_surf_dst() 706 nv04_gr_mthd_bind_surf_src(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_surf_src() argument 709 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_surf_src() 711 nv04_gr_set_ctx_val(object, 0x04000000, 0); nv04_gr_mthd_bind_surf_src() 714 nv04_gr_set_ctx_val(object, 0x04000000, 0x04000000); nv04_gr_mthd_bind_surf_src() 721 nv04_gr_mthd_bind_surf_color(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_surf_color() argument 724 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_surf_color() 726 nv04_gr_set_ctx_val(object, 0x02000000, 0); nv04_gr_mthd_bind_surf_color() 729 nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); nv04_gr_mthd_bind_surf_color() 736 nv04_gr_mthd_bind_surf_zeta(struct nvkm_object *object, u32 mthd, nv04_gr_mthd_bind_surf_zeta() argument 739 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv04_gr_mthd_bind_surf_zeta() 741 nv04_gr_set_ctx_val(object, 0x04000000, 0); nv04_gr_mthd_bind_surf_zeta() 744 nv04_gr_set_ctx_val(object, 0x04000000, 0x04000000); nv04_gr_mthd_bind_surf_zeta() 751 nv01_gr_mthd_bind_clip(struct nvkm_object *object, u32 mthd, nv01_gr_mthd_bind_clip() argument 754 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv01_gr_mthd_bind_clip() 756 nv04_gr_set_ctx1(object, 0x2000, 0); nv01_gr_mthd_bind_clip() 759 nv04_gr_set_ctx1(object, 0x2000, 0x2000); nv01_gr_mthd_bind_clip() 766 nv01_gr_mthd_bind_chroma(struct nvkm_object *object, u32 mthd, nv01_gr_mthd_bind_chroma() argument 769 switch (nv04_gr_mthd_bind_class(object, args, size)) { nv01_gr_mthd_bind_chroma() 771 nv04_gr_set_ctx1(object, 0x1000, 0); nv01_gr_mthd_bind_chroma() 777 nv04_gr_set_ctx1(object, 0x1000, 0x1000); nv01_gr_mthd_bind_chroma() 1147 nv04_gr_context_dtor(struct nvkm_object *object) nv04_gr_context_dtor() argument 1149 struct nv04_gr_priv *priv = (void *)object->engine; nv04_gr_context_dtor() 1150 struct nv04_gr_chan *chan = (void *)object; nv04_gr_context_dtor() 1161 nv04_gr_context_fini(struct nvkm_object *object, bool suspend) nv04_gr_context_fini() argument 1163 struct nv04_gr_priv *priv = (void *)object->engine; nv04_gr_context_fini() 1164 struct nv04_gr_chan *chan = (void *)object; nv04_gr_context_fini() 1278 if (handle && !nv_call(handle->object, mthd, data)) nv04_gr_intr() 1332 nv04_gr_init(struct nvkm_object *object) nv04_gr_init() argument 1334 struct nvkm_engine *engine = nv_engine(object); nv04_gr_init()
|
H A D | nv40.h | 8 /* returns 1 if device is one of the nv4x using the 0x4497 object class,
|
H A D | nv20.c | 12 * Graphics object classes 103 nv20_gr_context_init(struct nvkm_object *object) nv20_gr_context_init() argument 105 struct nv20_gr_priv *priv = (void *)object->engine; nv20_gr_context_init() 106 struct nv20_gr_chan *chan = (void *)object; nv20_gr_context_init() 118 nv20_gr_context_fini(struct nvkm_object *object, bool suspend) nv20_gr_context_fini() argument 120 struct nv20_gr_priv *priv = (void *)object->engine; nv20_gr_context_fini() 121 struct nv20_gr_chan *chan = (void *)object; nv20_gr_context_fini() 210 if (handle && !nv_call(handle->object, mthd, data)) nv20_gr_intr() 263 nv20_gr_dtor(struct nvkm_object *object) nv20_gr_dtor() argument 265 struct nv20_gr_priv *priv = (void *)object; nv20_gr_dtor() 271 nv20_gr_init(struct nvkm_object *object) nv20_gr_init() argument 273 struct nvkm_engine *engine = nv_engine(object); nv20_gr_init() 275 struct nvkm_fb *pfb = nvkm_fb(object); nv20_gr_init()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
H A D | base.c | 37 nvkm_fifo_event_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_fifo_event_ctor() argument 68 /* create base object class */ nvkm_fifo_channel_create_() 75 /* validate dma object representing push buffer */ nvkm_fifo_channel_create_() 134 _nvkm_fifo_channel_dtor(struct nvkm_object *object) _nvkm_fifo_channel_dtor() argument 136 struct nvkm_fifo_chan *chan = (void *)object; _nvkm_fifo_channel_dtor() 141 _nvkm_fifo_channel_map(struct nvkm_object *object, u64 *addr, u32 *size) _nvkm_fifo_channel_map() argument 143 struct nvkm_fifo_chan *chan = (void *)object; _nvkm_fifo_channel_map() 150 _nvkm_fifo_channel_rd32(struct nvkm_object *object, u64 addr) _nvkm_fifo_channel_rd32() argument 152 struct nvkm_fifo_chan *chan = (void *)object; _nvkm_fifo_channel_rd32() 162 _nvkm_fifo_channel_wr32(struct nvkm_object *object, u64 addr, u32 data) _nvkm_fifo_channel_wr32() argument 164 struct nvkm_fifo_chan *chan = (void *)object; _nvkm_fifo_channel_wr32() 174 nvkm_fifo_uevent_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_fifo_uevent_ctor() argument 200 _nvkm_fifo_channel_ntfy(struct nvkm_object *object, u32 type, _nvkm_fifo_channel_ntfy() argument 203 struct nvkm_fifo *fifo = (void *)object->engine; _nvkm_fifo_channel_ntfy() 206 if (nv_mclass(object) >= G82_CHANNEL_DMA) { _nvkm_fifo_channel_ntfy() 218 nvkm_fifo_chid(struct nvkm_fifo *priv, struct nvkm_object *object) nvkm_fifo_chid() argument 222 while (object && object->parent) { nvkm_fifo_chid() 223 if ( nv_iclass(object->parent, NV_ENGCTX_CLASS) && nvkm_fifo_chid() 224 (nv_hclass(object->parent) & 0xff) == engidx) nvkm_fifo_chid() 225 return nvkm_fifo_chan(object)->chid; nvkm_fifo_chid() 226 object = object->parent; nvkm_fifo_chid()
|
H A D | nv50.c | 72 nv50_fifo_context_attach(struct nvkm_object *parent, struct nvkm_object *object) nv50_fifo_context_attach() argument 76 struct nvkm_gpuobj *ectx = (void *)object; nv50_fifo_context_attach() 81 switch (nv_engidx(object->engine)) { nv50_fifo_context_attach() 103 struct nvkm_object *object) nv50_fifo_context_detach() 112 switch (nv_engidx(object->engine)) { nv50_fifo_context_detach() 159 struct nvkm_object *object, u32 handle) nv50_fifo_object_attach() 164 if (nv_iclass(object, NV_GPUOBJ_CLASS)) nv50_fifo_object_attach() 165 context = nv_gpuobj(object)->node->offset >> 4; nv50_fifo_object_attach() 169 switch (nv_engidx(object->engine)) { nv50_fifo_object_attach() 313 nv50_fifo_chan_dtor(struct nvkm_object *object) nv50_fifo_chan_dtor() argument 315 struct nv50_fifo_chan *chan = (void *)object; nv50_fifo_chan_dtor() 321 nv50_fifo_chan_init(struct nvkm_object *object) nv50_fifo_chan_init() argument 323 struct nv50_fifo_priv *priv = (void *)object->engine; nv50_fifo_chan_init() 324 struct nv50_fifo_base *base = (void *)object->parent; nv50_fifo_chan_init() 325 struct nv50_fifo_chan *chan = (void *)object; nv50_fifo_chan_init() 340 nv50_fifo_chan_fini(struct nvkm_object *object, bool suspend) nv50_fifo_chan_fini() argument 342 struct nv50_fifo_priv *priv = (void *)object->engine; nv50_fifo_chan_fini() 343 struct nv50_fifo_chan *chan = (void *)object; nv50_fifo_chan_fini() 426 nv50_fifo_context_dtor(struct nvkm_object *object) nv50_fifo_context_dtor() argument 428 struct nv50_fifo_base *base = (void *)object; nv50_fifo_context_dtor() 487 nv50_fifo_dtor(struct nvkm_object *object) nv50_fifo_dtor() argument 489 struct nv50_fifo_priv *priv = (void *)object; nv50_fifo_dtor() 498 nv50_fifo_init(struct nvkm_object *object) nv50_fifo_init() argument 500 struct nv50_fifo_priv *priv = (void *)object; nv50_fifo_init() 102 nv50_fifo_context_detach(struct nvkm_object *parent, bool suspend, struct nvkm_object *object) nv50_fifo_context_detach() argument 158 nv50_fifo_object_attach(struct nvkm_object *parent, struct nvkm_object *object, u32 handle) nv50_fifo_object_attach() argument
|
H A D | nv04.c | 56 struct nvkm_object *object, u32 handle) nv04_fifo_object_attach() 63 if (nv_iclass(object, NV_GPUOBJ_CLASS)) nv04_fifo_object_attach() 64 context = nv_gpuobj(object)->addr >> 4; nv04_fifo_object_attach() 68 switch (nv_engidx(object->engine)) { nv04_fifo_object_attach() 103 struct nvkm_object *object) nv04_fifo_context_attach() 105 nv_engctx(object)->addr = nvkm_fifo_chan(parent)->chid; nv04_fifo_context_attach() 160 nv04_fifo_chan_dtor(struct nvkm_object *object) nv04_fifo_chan_dtor() argument 162 struct nv04_fifo_priv *priv = (void *)object->engine; nv04_fifo_chan_dtor() 163 struct nv04_fifo_chan *chan = (void *)object; nv04_fifo_chan_dtor() 174 nv04_fifo_chan_init(struct nvkm_object *object) nv04_fifo_chan_init() argument 176 struct nv04_fifo_priv *priv = (void *)object->engine; nv04_fifo_chan_init() 177 struct nv04_fifo_chan *chan = (void *)object; nv04_fifo_chan_init() 193 nv04_fifo_chan_fini(struct nvkm_object *object, bool suspend) nv04_fifo_chan_fini() argument 195 struct nv04_fifo_priv *priv = (void *)object->engine; nv04_fifo_chan_fini() 196 struct nv04_fifo_chan *chan = (void *)object; nv04_fifo_chan_fini() 379 if (nv_engidx(bind->object->engine) == NVDEV_ENGINE_SW) { nv04_fifo_swmthd() 396 if (!nv_call(bind->object, mthd, data)) nv04_fifo_swmthd() 587 nv04_fifo_dtor(struct nvkm_object *object) nv04_fifo_dtor() argument 589 struct nv04_fifo_priv *priv = (void *)object; nv04_fifo_dtor() 597 nv04_fifo_init(struct nvkm_object *object) nv04_fifo_init() argument 599 struct nv04_fifo_priv *priv = (void *)object; nv04_fifo_init() 55 nv04_fifo_object_attach(struct nvkm_object *parent, struct nvkm_object *object, u32 handle) nv04_fifo_object_attach() argument 102 nv04_fifo_context_attach(struct nvkm_object *parent, struct nvkm_object *object) nv04_fifo_context_attach() argument
|
/linux-4.1.27/fs/sysfs/ |
H A D | symlink.c | 56 * 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.
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/pm/ |
H A D | base.c | 103 * Perfmon object classes 106 nvkm_perfctr_query(struct nvkm_object *object, void *data, u32 size) nvkm_perfctr_query() argument 111 struct nvkm_device *device = nv_device(object); nvkm_perfctr_query() 112 struct nvkm_pm *ppm = (void *)object->engine; nvkm_perfctr_query() 120 nv_ioctl(object, "perfctr query size %d\n", size); nvkm_perfctr_query() 122 nv_ioctl(object, "perfctr query vers %d iter %08x\n", nvkm_perfctr_query() 165 nvkm_perfctr_sample(struct nvkm_object *object, void *data, u32 size) nvkm_perfctr_sample() argument 170 struct nvkm_pm *ppm = (void *)object->engine; nvkm_perfctr_sample() 175 nv_ioctl(object, "perfctr sample size %d\n", size); nvkm_perfctr_sample() 177 nv_ioctl(object, "perfctr sample\n"); nvkm_perfctr_sample() 218 nvkm_perfctr_read(struct nvkm_object *object, void *data, u32 size) nvkm_perfctr_read() argument 223 struct nvkm_perfctr *ctr = (void *)object; nvkm_perfctr_read() 226 nv_ioctl(object, "perfctr read size %d\n", size); nvkm_perfctr_read() 228 nv_ioctl(object, "perfctr read vers %d\n", args->v0.version); nvkm_perfctr_read() 241 nvkm_perfctr_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nvkm_perfctr_mthd() argument 245 return nvkm_perfctr_query(object, data, size); nvkm_perfctr_mthd() 247 return nvkm_perfctr_sample(object, data, size); nvkm_perfctr_mthd() 249 return nvkm_perfctr_read(object, data, size); nvkm_perfctr_mthd() 257 nvkm_perfctr_dtor(struct nvkm_object *object) nvkm_perfctr_dtor() argument 259 struct nvkm_perfctr *ctr = (void *)object; nvkm_perfctr_dtor() 332 nvkm_perfctx_dtor(struct nvkm_object *object) nvkm_perfctx_dtor() argument 334 struct nvkm_pm *ppm = (void *)object->engine; nvkm_perfctx_dtor() 434 _nvkm_pm_fini(struct nvkm_object *object, bool suspend) _nvkm_pm_fini() argument 436 struct nvkm_pm *ppm = (void *)object; _nvkm_pm_fini() 441 _nvkm_pm_init(struct nvkm_object *object) _nvkm_pm_init() argument 443 struct nvkm_pm *ppm = (void *)object; _nvkm_pm_init() 448 _nvkm_pm_dtor(struct nvkm_object *object) _nvkm_pm_dtor() argument 450 struct nvkm_pm *ppm = (void *)object; _nvkm_pm_dtor()
|
H A D | gt215.c | 58 struct nvkm_object **object) gt215_pm_ctor() 60 int ret = nv40_pm_ctor(parent, engine, oclass, data, size, object); gt215_pm_ctor() 62 struct nv40_pm_priv *priv = (void *)*object; gt215_pm_ctor() 56 gt215_pm_ctor(struct nvkm_object *parent, struct nvkm_object *engine, struct nvkm_oclass *oclass, void *data, u32 size, struct nvkm_object **object) gt215_pm_ctor() argument
|
/linux-4.1.27/drivers/gpu/drm/radeon/ |
H A D | drm_buffer.c | 39 * 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 D | radeon_sync.c | 36 * 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 D | drm_buffer.h | 78 * 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.1.27/lib/ |
H A D | debugobjects.c | 111 * 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 D | cpu_rmap.c | 17 * 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.1.27/drivers/staging/lustre/lustre/include/ |
H A D | lu_object.h | 58 * Server side object is split into layers, one per device in the 60 * lu_object. Compound layered object --- by struct lu_object_header. Most 62 * whole compound object. This decision was made due to the following 69 * on the whole object. 72 * it is possible that at some layer object "spawns" multiple sub-objects 77 * Compound object is uniquely identified by its fid. Objects are indexed 83 * count drops to 0, object is returned to cache. Cached objects still 111 * Allocate object for the given device (without lower-layer 118 * Due to design goal of avoiding recursion, object creation (see 123 * level object (including lu_object_header), but without any 124 * lower-layer sub-object(s). 127 * object. 130 * to allocate lower-layer object(s). To do this, 135 * lu_object_operations::loo_object_init() (and inserted into object 169 /* This is a new object to be allocated, or the file 170 * corresponding to the object does not exists. */ 175 * Object configuration, describing particulars of object being created. On 203 * Allocate lower-layer parts of the object by calling 207 * This method is called once for each object inserted into object 209 * object(s) it create into appropriate places of object stack. 215 * Called (in top-to-bottom order) during object allocation after all 223 * that object is being destroyed. Dual to 230 * object is removed from memory. 235 * Called when last active reference to the object is released (and 236 * object returns to the cache). This method is optional. 241 * Optional debugging helper. Print given object. 262 * reference count. This is incremented, in particular, on each object 285 * A list of references to this object, for debugging. 401 * Common object attributes. 412 /** 512-byte blocks allocated to object */ 420 /** object flags */ 422 /** number of persistent references to this object */ 424 /** blk bits of the object*/ 426 /** blk size of the object*/ 458 * Layer in the layered object. 462 * Header for this object. 470 * Operations for this object. 485 * Don't keep this object in cache. Object will be destroyed as soon 491 * Mark this object has already been taken out of cache. 507 * "Compound" object, consisting of multiple layers. 509 * Compound object with given fid is unique with given lu_site. 511 * Note, that object does *not* necessary correspond to the real object in the 512 * persistent storage: object is an anchor for locking and method calling, so 515 * whether object is backed by persistent storage entity. 519 * Fid, uniquely identifying this object. 532 * Common object attributes, cached for efficiency. From enum 546 * during object destruction). No locking is necessary. 550 * A list of references to this object, for debugging. 559 * number of busy object on this bucket 563 * LRU list, updated on each access to object. Protected by 566 * "Cold" end of LRU is lu_site::ls_lru.next. Accessed object are 572 * Wait-queue signaled when an object in this site is ultimately 574 * wait before re-trying when object in the process of destruction is 694 * Acquire additional reference to the given object. This function is used to 705 * Return true of object will not be cached after last reference to it is 740 * First (topmost) sub-object of given compound object 749 * Next sub-object in the layering 757 * Pointer to the fid of this object. 765 * return device operations vector for this object 774 * Given a compound object, find its slice, corresponding to the device type 787 * Print object description followed by a user-supplied message. 789 #define LU_OBJECT_DEBUG(mask, env, object, format, ...) \ 794 lu_object_print(env, &msgdata, lu_cdebug_printer, object);\ 800 * Print short object description followed by a user-supplied message. 802 #define LU_OBJECT_HEADER(mask, env, object, format, ...) \ 808 (object)->lo_header); \ 821 * Check object consistency. 827 * Check whether object exists, no matter on local or remote storage. 828 * Note: LOHA_EXISTS will be set once some one created the object, 834 * Check whether object on the remote storage. 849 * Attr of this object.
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
H A D | padg94.c | 32 g94_i2c_pad_fini(struct nvkm_object *object, bool suspend) g94_i2c_pad_fini() argument 34 struct nvkm_i2c *i2c = (void *)nvkm_i2c(object); g94_i2c_pad_fini() 35 struct g94_i2c_pad *pad = (void *)object; g94_i2c_pad_fini() 41 g94_i2c_pad_init(struct nvkm_object *object) g94_i2c_pad_init() argument 43 struct nvkm_i2c *i2c = (void *)nvkm_i2c(object); g94_i2c_pad_init() 44 struct g94_i2c_pad *pad = (void *)object; g94_i2c_pad_init()
|
H A D | padgm204.c | 32 gm204_i2c_pad_fini(struct nvkm_object *object, bool suspend) gm204_i2c_pad_fini() argument 34 struct nvkm_i2c *i2c = (void *)nvkm_i2c(object); gm204_i2c_pad_fini() 35 struct gm204_i2c_pad *pad = (void *)object; gm204_i2c_pad_fini() 41 gm204_i2c_pad_init(struct nvkm_object *object) gm204_i2c_pad_init() argument 43 struct nvkm_i2c *i2c = (void *)nvkm_i2c(object); gm204_i2c_pad_init() 44 struct gm204_i2c_pad *pad = (void *)object; gm204_i2c_pad_init()
|
H A D | pad.c | 27 _nvkm_i2c_pad_fini(struct nvkm_object *object, bool suspend) _nvkm_i2c_pad_fini() argument 29 struct nvkm_i2c_pad *pad = (void *)object; _nvkm_i2c_pad_fini() 36 _nvkm_i2c_pad_init(struct nvkm_object *object) _nvkm_i2c_pad_init() argument 38 struct nvkm_i2c_pad *pad = (void *)object; _nvkm_i2c_pad_init()
|
H A D | base.c | 92 _nvkm_i2c_port_fini(struct nvkm_object *object, bool suspend) _nvkm_i2c_port_fini() argument 94 struct nvkm_i2c_port *port = (void *)object; _nvkm_i2c_port_fini() 101 _nvkm_i2c_port_dtor(struct nvkm_object *object) _nvkm_i2c_port_dtor() argument 103 struct nvkm_i2c_port *port = (void *)object; _nvkm_i2c_port_dtor() 345 nvkm_i2c_intr_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_i2c_intr_ctor() argument 398 _nvkm_i2c_fini(struct nvkm_object *object, bool suspend) _nvkm_i2c_fini() argument 400 struct nvkm_i2c_impl *impl = (void *)nv_oclass(object); _nvkm_i2c_fini() 401 struct nvkm_i2c *i2c = (void *)object; _nvkm_i2c_fini() 427 _nvkm_i2c_init(struct nvkm_object *object) _nvkm_i2c_init() argument 429 struct nvkm_i2c *i2c = (void *)object; _nvkm_i2c_init() 452 _nvkm_i2c_dtor(struct nvkm_object *object) _nvkm_i2c_dtor() argument 454 struct nvkm_i2c *i2c = (void *)object; _nvkm_i2c_dtor() 478 struct nvkm_object *object; nvkm_i2c_create_port() local 502 info, index, &object); nvkm_i2c_create_port() 515 struct nvkm_object *object; nvkm_i2c_create_() local 596 NULL, index++, &object); nvkm_i2c_create_()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/ |
H A D | nouveau_chan.h | 4 #include <nvif/object.h> 40 struct nvif_object *object; member in struct:nouveau_channel
|
H A D | nouveau_usif.c | 257 usif_object_dtor(struct usif_object *object) usif_object_dtor() argument 259 list_del(&object->head); usif_object_dtor() 260 kfree(object); usif_object_dtor() 271 struct usif_object *object; usif_object_new() local 274 if (!(object = kmalloc(sizeof(*object), GFP_KERNEL))) usif_object_new() 276 list_add(&object->head, &cli->objects); usif_object_new() 279 object->route = args->v0.route; usif_object_new() 280 object->token = args->v0.token; usif_object_new() 282 args->v0.token = (unsigned long)(void *)object; usif_object_new() 284 args->v0.token = object->token; usif_object_new() 285 args->v0.route = object->route; usif_object_new() 289 usif_object_dtor(object); usif_object_new() 303 struct usif_object *object; usif_ioctl() local 343 object = (void *)(unsigned long)argv->v0.token; usif_ioctl() 344 argv->v0.route = object->route; usif_ioctl() 345 argv->v0.token = object->token; usif_ioctl() 347 list_del(&object->head); usif_ioctl() 348 kfree(object); usif_ioctl() 367 struct usif_object *object, *otemp; usif_client_fini() local 374 list_for_each_entry_safe(object, otemp, &cli->objects, head) { usif_client_fini() 375 usif_object_dtor(object); usif_client_fini()
|
H A D | nouveau_chan.c | 45 struct nouveau_cli *cli = (void *)nvif_client(chan->object); nouveau_channel_idle() 57 chan->object->handle, nvxx_client(&cli->base)->name); nouveau_channel_idle() 73 nvif_object_ref(NULL, &chan->object); nouveau_channel_del() 122 /* create dma object covering the *entire* memory space that the nouveau_channel_prep() 208 /* create channel object */ nouveau_channel_ind() 226 &args, size, &chan->object); nouveau_channel_ind() 228 retn = chan->object->data; nouveau_channel_ind() 229 if (chan->object->oclass >= KEPLER_CHANNEL_GPFIFO_A) nouveau_channel_ind() 261 /* create channel object */ nouveau_channel_dma() 268 &args, sizeof(args), &chan->object); nouveau_channel_dma() 270 retn = chan->object->data; nouveau_channel_dma() 290 nvif_object_map(chan->object); nouveau_channel_init() 306 ret = nvif_object_init(chan->object, NULL, vram, nouveau_channel_init() 331 ret = nvif_object_init(chan->object, NULL, gart, nouveau_channel_init() 339 switch (chan->object->oclass & 0x00ff) { nouveau_channel_init() 369 /* allocate software object class (used for fences on <= nv05) */ nouveau_channel_init() 371 ret = nvif_object_init(chan->object, NULL, 0x006e, 0x006e, nouveau_channel_init()
|
/linux-4.1.27/fs/ubifs/ |
H A D | key.h | 92 * @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 D | misc.h | 66 * @c: UBIFS file-system description object 97 * ubifs_inode - get UBIFS inode information by VFS 'struct inode' object. 169 * @c: the UBIFS file-system description object 183 * @c: the UBIFS file-system description object 198 * @c: the UBIFS file-system description object 208 * @c: the UBIFS file-system description object 223 * @c: the UBIFS file-system description object 244 * @c: UBIFS file-system description object 261 * @c: the UBIFS file-system description object 273 * @c: the UBIFS file-system description object 288 * @c: UBIFS file-system description object
|
/linux-4.1.27/security/smack/ |
H A D | smack_access.c | 66 * @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.1.27/include/uapi/scsi/fc/ |
H A D | fc_ns.h | 74 * 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.1.27/arch/x86/kernel/ |
H A D | vsyscall_emu_64.S | 18 .type __vsyscall_page, @object
|
/linux-4.1.27/drivers/gpu/drm/nouveau/include/nvkm/engine/ |
H A D | dmaobj.h | 17 /* creates a "physical" dma object from a struct nvkm_dmaobj */
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/mc/ |
H A D | nv04.h | 16 int nv44_mc_init(struct nvkm_object *object);
|
H A D | base.c | 82 _nvkm_mc_fini(struct nvkm_object *object, bool suspend) _nvkm_mc_fini() argument 84 struct nvkm_mc *pmc = (void *)object; _nvkm_mc_fini() 90 _nvkm_mc_init(struct nvkm_object *object) _nvkm_mc_init() argument 92 struct nvkm_mc *pmc = (void *)object; _nvkm_mc_init() 101 _nvkm_mc_dtor(struct nvkm_object *object) _nvkm_mc_dtor() argument 103 struct nvkm_device *device = nv_device(object); _nvkm_mc_dtor() 104 struct nvkm_mc *pmc = (void *)object; _nvkm_mc_dtor()
|
/linux-4.1.27/arch/ia64/include/asm/sn/sn2/ |
H A D | sn_hwperf.h | 18 * 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.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/ |
H A D | base.c | 31 _nvkm_devinit_fini(struct nvkm_object *object, bool suspend) _nvkm_devinit_fini() argument 33 struct nvkm_devinit *devinit = (void *)object; _nvkm_devinit_fini() 46 _nvkm_devinit_init(struct nvkm_object *object) _nvkm_devinit_init() argument 48 struct nvkm_devinit_impl *impl = (void *)object->oclass; _nvkm_devinit_init() 49 struct nvkm_devinit *devinit = (void *)object; _nvkm_devinit_init() 66 _nvkm_devinit_dtor(struct nvkm_object *object) _nvkm_devinit_dtor() argument 68 struct nvkm_devinit *devinit = (void *)object; _nvkm_devinit_dtor()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/ |
H A D | xtensa.c | 28 _nvkm_xtensa_rd32(struct nvkm_object *object, u64 addr) _nvkm_xtensa_rd32() argument 30 struct nvkm_xtensa *xtensa = (void *)object; _nvkm_xtensa_rd32() 35 _nvkm_xtensa_wr32(struct nvkm_object *object, u64 addr, u32 data) _nvkm_xtensa_wr32() argument 37 struct nvkm_xtensa *xtensa = (void *)object; _nvkm_xtensa_wr32() 95 _nvkm_xtensa_init(struct nvkm_object *object) _nvkm_xtensa_init() argument 97 struct nvkm_device *device = nv_device(object); _nvkm_xtensa_init() 98 struct nvkm_xtensa *xtensa = (void *)object; _nvkm_xtensa_init() 124 ret = nvkm_gpuobj_new(object, NULL, 0x40000, 0x1000, 0, _nvkm_xtensa_init() 161 _nvkm_xtensa_fini(struct nvkm_object *object, bool suspend) _nvkm_xtensa_fini() argument 163 struct nvkm_xtensa *xtensa = (void *)object; _nvkm_xtensa_fini()
|
H A D | falcon.c | 47 _nvkm_falcon_rd32(struct nvkm_object *object, u64 addr) _nvkm_falcon_rd32() argument 49 struct nvkm_falcon *falcon = (void *)object; _nvkm_falcon_rd32() 54 _nvkm_falcon_wr32(struct nvkm_object *object, u64 addr, u32 data) _nvkm_falcon_wr32() argument 56 struct nvkm_falcon *falcon = (void *)object; _nvkm_falcon_wr32() 71 _nvkm_falcon_init(struct nvkm_object *object) _nvkm_falcon_init() argument 73 struct nvkm_device *device = nv_device(object); _nvkm_falcon_init() 74 struct nvkm_falcon *falcon = (void *)object; _nvkm_falcon_init() 175 ret = nvkm_gpuobj_new(object->parent, NULL, falcon->code.size, _nvkm_falcon_init() 241 _nvkm_falcon_fini(struct nvkm_object *object, bool suspend) _nvkm_falcon_fini() argument 243 struct nvkm_falcon *falcon = (void *)object; _nvkm_falcon_fini()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bar/ |
H A D | base.c | 67 nvkm_barobj_dtor(struct nvkm_object *object) nvkm_barobj_dtor() argument 69 struct nvkm_bar *bar = nvkm_bar(object); nvkm_barobj_dtor() 70 struct nvkm_barobj *barobj = (void *)object; nvkm_barobj_dtor() 80 nvkm_barobj_rd32(struct nvkm_object *object, u64 addr) nvkm_barobj_rd32() argument 82 struct nvkm_barobj *barobj = (void *)object; nvkm_barobj_rd32() 87 nvkm_barobj_wr32(struct nvkm_object *object, u64 addr, u32 data) nvkm_barobj_wr32() argument 89 struct nvkm_barobj *barobj = (void *)object; nvkm_barobj_wr32() 110 int ret = nvkm_object_ctor(parent, &parent->engine->subdev.object, nvkm_bar_alloc() 140 _nvkm_bar_dtor(struct nvkm_object *object) _nvkm_bar_dtor() argument 142 struct nvkm_bar *bar = (void *)object; _nvkm_bar_dtor()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/sw/ |
H A D | nv50.c | 35 * software object classes 39 nv50_sw_mthd_dma_vblsem(struct nvkm_object *object, u32 mthd, nv50_sw_mthd_dma_vblsem() argument 42 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); nv50_sw_mthd_dma_vblsem() 51 if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { nv50_sw_mthd_dma_vblsem() 52 struct nvkm_gpuobj *gpuobj = nv_gpuobj(handle->object); nv50_sw_mthd_dma_vblsem() 61 nv50_sw_mthd_vblsem_offset(struct nvkm_object *object, u32 mthd, nv50_sw_mthd_vblsem_offset() argument 64 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); nv50_sw_mthd_vblsem_offset() 70 nv50_sw_mthd_vblsem_value(struct nvkm_object *object, u32 mthd, nv50_sw_mthd_vblsem_value() argument 73 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); nv50_sw_mthd_vblsem_value() 79 nv50_sw_mthd_vblsem_release(struct nvkm_object *object, u32 mthd, nv50_sw_mthd_vblsem_release() argument 82 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); nv50_sw_mthd_vblsem_release() 92 nv50_sw_mthd_flip(struct nvkm_object *object, u32 mthd, void *args, u32 size) nv50_sw_mthd_flip() argument 94 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); nv50_sw_mthd_flip() 144 nv50_sw_context_dtor(struct nvkm_object *object) nv50_sw_context_dtor() argument 146 struct nv50_sw_chan *chan = (void *)object; nv50_sw_context_dtor()
|
H A D | gf100.c | 29 * software object classes 33 gf100_sw_mthd_vblsem_offset(struct nvkm_object *object, u32 mthd, gf100_sw_mthd_vblsem_offset() argument 36 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); gf100_sw_mthd_vblsem_offset() 49 gf100_sw_mthd_mp_control(struct nvkm_object *object, u32 mthd, gf100_sw_mthd_mp_control() argument 52 struct nv50_sw_chan *chan = (void *)nv_engctx(object->parent); gf100_sw_mthd_mp_control()
|
H A D | nv04.c | 36 * software object classes 40 nv04_sw_set_ref(struct nvkm_object *object, u32 mthd, void *data, u32 size) nv04_sw_set_ref() argument 42 struct nvkm_object *channel = (void *)nv_engctx(object->parent); nv04_sw_set_ref() 49 nv04_sw_flip(struct nvkm_object *object, u32 mthd, void *args, u32 size) nv04_sw_flip() argument 51 struct nv04_sw_chan *chan = (void *)nv_engctx(object->parent); nv04_sw_flip()
|
/linux-4.1.27/drivers/gpu/drm/ttm/ |
H A D | ttm_object.c | 38 * 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.1.27/drivers/gpu/drm/gma500/ |
H A D | gem.c | 23 * 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.1.27/include/drm/ |
H A D | drm_gem.h | 38 * 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 D | drm_gem_cma_helper.h | 8 * struct drm_gem_cma_object - GEM object backed by CMA memory allocations 9 * @base: base GEM object 29 /* free GEM object */
|
/linux-4.1.27/mm/kasan/ |
H A D | kasan.c | 310 void kasan_unpoison_object_data(struct kmem_cache *cache, void *object) kasan_unpoison_object_data() argument 312 kasan_unpoison_shadow(object, cache->object_size); kasan_unpoison_object_data() 315 void kasan_poison_object_data(struct kmem_cache *cache, void *object) kasan_poison_object_data() argument 317 kasan_poison_shadow(object, kasan_poison_object_data() 322 void kasan_slab_alloc(struct kmem_cache *cache, void *object) kasan_slab_alloc() argument 324 kasan_kmalloc(cache, object, cache->object_size); kasan_slab_alloc() 327 void kasan_slab_free(struct kmem_cache *cache, void *object) kasan_slab_free() argument 336 kasan_poison_shadow(object, rounded_up_size, KASAN_KMALLOC_FREE); kasan_slab_free() 339 void kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size) kasan_kmalloc() argument 344 if (unlikely(object == NULL)) kasan_kmalloc() 347 redzone_start = round_up((unsigned long)(object + size), kasan_kmalloc() 349 redzone_end = round_up((unsigned long)object + cache->object_size, kasan_kmalloc() 352 kasan_unpoison_shadow(object, size); kasan_kmalloc() 377 void kasan_krealloc(const void *object, size_t size) kasan_krealloc() argument 381 if (unlikely(object == ZERO_SIZE_PTR)) kasan_krealloc() 384 page = virt_to_head_page(object); kasan_krealloc() 387 kasan_kmalloc_large(object, size); kasan_krealloc() 389 kasan_kmalloc(page->slab_cache, object, size); kasan_krealloc()
|
/linux-4.1.27/drivers/net/ethernet/brocade/bna/ |
H A D | bfa_cs.h | 31 /* oc - object class eg. bfa_ioc 33 * otype - object type, eg. struct bfa_ioc 34 * etype - object type, eg. enum ioc_event 55 /* oc - object class eg. bfa_ioc 57 * otype - object type, eg. struct bfa_ioc 58 * etype - object type, eg. enum ioc_event
|
/linux-4.1.27/security/selinux/include/ |
H A D | objsec.h | 41 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.1.27/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/ |
H A D | nv31.c | 34 * MPEG object classes 60 nv31_mpeg_mthd_dma(struct nvkm_object *object, u32 mthd, void *arg, u32 len) nv31_mpeg_mthd_dma() argument 62 struct nvkm_instmem *imem = nvkm_instmem(object); nv31_mpeg_mthd_dma() 63 struct nv31_mpeg_priv *priv = (void *)object->engine; nv31_mpeg_mthd_dma() 155 nv31_mpeg_context_dtor(struct nvkm_object *object) nv31_mpeg_context_dtor() argument 157 struct nv31_mpeg_priv *priv = (void *)object->engine; nv31_mpeg_context_dtor() 158 struct nv31_mpeg_chan *chan = (void *)object; nv31_mpeg_context_dtor() 211 /* happens on initial binding of the object */ nv31_mpeg_intr() 219 if (handle && !nv_call(handle->object, mthd, data)) nv31_mpeg_intr() 259 nv31_mpeg_init(struct nvkm_object *object) nv31_mpeg_init() argument 261 struct nvkm_engine *engine = nv_engine(object); nv31_mpeg_init() 262 struct nv31_mpeg_priv *priv = (void *)object; nv31_mpeg_init() 263 struct nvkm_fb *pfb = nvkm_fb(object); nv31_mpeg_init()
|
H A D | nv40.c | 29 * MPEG object classes 33 nv40_mpeg_mthd_dma(struct nvkm_object *object, u32 mthd, void *arg, u32 len) nv40_mpeg_mthd_dma() argument 35 struct nvkm_instmem *imem = nvkm_instmem(object); nv40_mpeg_mthd_dma() 36 struct nv31_mpeg_priv *priv = (void *)object->engine; nv40_mpeg_mthd_dma()
|
/linux-4.1.27/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_buf.h | 15 /* create and initialize buffer object. */ 19 /* destroy buffer object. */
|
H A D | exynos_drm_gem.h | 54 * @base: a gem object. 55 * - a new handle to this gem object would be created 57 * @buffer: a pointer to exynos_drm_gem_buffer object. 67 * P.S. this object would be transferred to user as kms_bo.handle so 80 /* destroy a buffer with gem object */ 83 /* create a private gem object and initialize it. */ 87 /* create a new buffer with gem object */ 93 * request gem object creation and buffer allocation as the size 103 * with this function call, gem object reference count would be increased. 112 * with this function call, gem object reference count would be decreased. 131 /* free gem object. */
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/disp/ |
H A D | nv04.c | 37 nv04_disp_scanoutpos(struct nvkm_object *object, struct nv04_disp_priv *priv, nv04_disp_scanoutpos() argument 47 nv_ioctl(object, "disp scanoutpos size %d\n", size); nv04_disp_scanoutpos() 49 nv_ioctl(object, "disp scanoutpos vers %d\n", args->v0.version); nv04_disp_scanoutpos() 78 nv04_disp_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nv04_disp_mthd() argument 83 struct nv04_disp_priv *priv = (void *)object->engine; nv04_disp_mthd() 86 nv_ioctl(object, "disp mthd size %d\n", size); nv04_disp_mthd() 88 nv_ioctl(object, "disp mthd vers %d mthd %02x head %d\n", nv04_disp_mthd() 100 return nv04_disp_scanoutpos(object, priv, data, size, head); nv04_disp_mthd()
|
H A D | base.c | 37 nvkm_disp_vblank_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_disp_vblank_ctor() argument 67 nvkm_disp_hpd_ctor(struct nvkm_object *object, void *data, u32 size, nvkm_disp_hpd_ctor() argument 101 nvkm_disp_ntfy(struct nvkm_object *object, u32 type, struct nvkm_event **event) nvkm_disp_ntfy() argument 103 struct nvkm_disp *disp = (void *)object->engine; nvkm_disp_ntfy() 118 _nvkm_disp_fini(struct nvkm_object *object, bool suspend) _nvkm_disp_fini() argument 120 struct nvkm_disp *disp = (void *)object; _nvkm_disp_fini() 141 _nvkm_disp_init(struct nvkm_object *object) _nvkm_disp_init() argument 143 struct nvkm_disp *disp = (void *)object; _nvkm_disp_init() 168 _nvkm_disp_dtor(struct nvkm_object *object) _nvkm_disp_dtor() argument 170 struct nvkm_disp *disp = (void *)object; _nvkm_disp_dtor() 194 struct nvkm_object *object; nvkm_disp_create_() local 227 nvkm_object_ctor(*pobject, NULL, oclass, &dcbE, i, &object); nvkm_disp_create_()
|
H A D | conn.c | 55 _nvkm_connector_fini(struct nvkm_object *object, bool suspend) _nvkm_connector_fini() argument 57 struct nvkm_connector *conn = (void *)object; _nvkm_connector_fini() 63 _nvkm_connector_init(struct nvkm_object *object) _nvkm_connector_init() argument 65 struct nvkm_connector *conn = (void *)object; _nvkm_connector_init() 73 _nvkm_connector_dtor(struct nvkm_object *object) _nvkm_connector_dtor() argument 75 struct nvkm_connector *conn = (void *)object; _nvkm_connector_dtor()
|
H A D | outp.c | 33 _nvkm_output_fini(struct nvkm_object *object, bool suspend) _nvkm_output_fini() argument 35 struct nvkm_output *outp = (void *)object; _nvkm_output_fini() 41 _nvkm_output_init(struct nvkm_object *object) _nvkm_output_init() argument 43 struct nvkm_output *outp = (void *)object; _nvkm_output_init() 51 _nvkm_output_dtor(struct nvkm_object *object) _nvkm_output_dtor() argument 53 struct nvkm_output *outp = (void *)object; _nvkm_output_dtor()
|
H A D | nv50.c | 115 nv50_disp_chan_uevent_ctor(struct nvkm_object *object, void *data, u32 size, nv50_disp_chan_uevent_ctor() argument 118 struct nv50_disp_dmac *dmac = (void *)object; nv50_disp_chan_uevent_ctor() 142 nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type, nv50_disp_chan_ntfy() argument 145 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_chan_ntfy() 157 nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size) nv50_disp_chan_map() argument 159 struct nv50_disp_chan *chan = (void *)object; nv50_disp_chan_map() 160 *addr = nv_device_resource_start(nv_device(object), 0) + nv50_disp_chan_map() 167 nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr) nv50_disp_chan_rd32() argument 169 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_chan_rd32() 170 struct nv50_disp_chan *chan = (void *)object; nv50_disp_chan_rd32() 175 nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data) nv50_disp_chan_wr32() argument 177 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_chan_wr32() 178 struct nv50_disp_chan *chan = (void *)object; nv50_disp_chan_wr32() 188 struct nvkm_object *object, u32 name) nv50_disp_dmac_object_attach() 192 u32 addr = nv_gpuobj(object)->node->offset; nv50_disp_dmac_object_attach() 249 nv50_disp_dmac_dtor(struct nvkm_object *object) nv50_disp_dmac_dtor() argument 251 struct nv50_disp_dmac *dmac = (void *)object; nv50_disp_dmac_dtor() 257 nv50_disp_dmac_init(struct nvkm_object *object) nv50_disp_dmac_init() argument 259 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_dmac_init() 260 struct nv50_disp_dmac *dmac = (void *)object; nv50_disp_dmac_init() 290 nv50_disp_dmac_fini(struct nvkm_object *object, bool suspend) nv50_disp_dmac_fini() argument 292 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_dmac_fini() 293 struct nv50_disp_dmac *dmac = (void *)object; nv50_disp_dmac_fini() 313 * EVO master channel object 517 nv50_disp_core_init(struct nvkm_object *object) nv50_disp_core_init() argument 519 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_core_init() 520 struct nv50_disp_dmac *mast = (void *)object; nv50_disp_core_init() 554 nv50_disp_core_fini(struct nvkm_object *object, bool suspend) nv50_disp_core_fini() argument 556 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_core_fini() 557 struct nv50_disp_dmac *mast = (void *)object; nv50_disp_core_fini() 796 nv50_disp_pioc_dtor(struct nvkm_object *object) nv50_disp_pioc_dtor() argument 798 struct nv50_disp_pioc *pioc = (void *)object; nv50_disp_pioc_dtor() 803 nv50_disp_pioc_init(struct nvkm_object *object) nv50_disp_pioc_init() argument 805 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_pioc_init() 806 struct nv50_disp_pioc *pioc = (void *)object; nv50_disp_pioc_init() 832 nv50_disp_pioc_fini(struct nvkm_object *object, bool suspend) nv50_disp_pioc_fini() argument 834 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_pioc_fini() 835 struct nv50_disp_pioc *pioc = (void *)object; nv50_disp_pioc_fini() 946 * Base display object 960 nv_ioctl(object, "disp scanoutpos size %d\n", size); nv50_disp_main_scanoutpos() 962 nv_ioctl(object, "disp scanoutpos vers %d\n", args->v0.version); nv50_disp_main_scanoutpos() 982 nv50_disp_main_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) nv50_disp_main_mthd() argument 984 const struct nv50_disp_impl *impl = (void *)nv_oclass(object->engine); nv50_disp_main_mthd() 989 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_main_mthd() 998 nv_ioctl(object, "disp mthd size %d\n", size); nv50_disp_main_mthd() 1000 nv_ioctl(object, "disp mthd vers %d mthd %02x head %d\n", nv50_disp_main_mthd() 1006 nv_ioctl(object, "disp mthd vers %d mthd %02x " nv50_disp_main_mthd() 1034 return impl->head.scanoutpos(object, priv, data, size, head); nv50_disp_main_mthd() 1041 return priv->dac.power(object, priv, data, size, head, outp); nv50_disp_main_mthd() 1043 return priv->dac.sense(object, priv, data, size, head, outp); nv50_disp_main_mthd() 1045 return priv->sor.power(object, priv, data, size, head, outp); nv50_disp_main_mthd() 1049 return priv->sor.hda_eld(object, priv, data, size, head, outp); nv50_disp_main_mthd() 1053 return priv->sor.hdmi(object, priv, data, size, head, outp); nv50_disp_main_mthd() 1058 nv_ioctl(object, "disp sor lvds script size %d\n", size); nv50_disp_main_mthd() 1060 nv_ioctl(object, "disp sor lvds script " nv50_disp_main_mthd() 1074 nv_ioctl(object, "disp sor dp pwr size %d\n", size); nv50_disp_main_mthd() 1076 nv_ioctl(object, "disp sor dp pwr vers %d state %d\n", nv50_disp_main_mthd() 1096 return priv->pior.power(object, priv, data, size, head, outp); nv50_disp_main_mthd() 1125 nv50_disp_main_dtor(struct nvkm_object *object) nv50_disp_main_dtor() argument 1127 struct nv50_disp_base *base = (void *)object; nv50_disp_main_dtor() 1133 nv50_disp_main_init(struct nvkm_object *object) nv50_disp_main_init() argument 1135 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_main_init() 1136 struct nv50_disp_base *base = (void *)object; nv50_disp_main_init() 1201 nv50_disp_main_fini(struct nvkm_object *object, bool suspend) nv50_disp_main_fini() argument 1203 struct nv50_disp_priv *priv = (void *)object->engine; nv50_disp_main_fini() 1204 struct nv50_disp_base *base = (void *)object; nv50_disp_main_fini() 187 nv50_disp_dmac_object_attach(struct nvkm_object *parent, struct nvkm_object *object, u32 name) nv50_disp_dmac_object_attach() argument
|
H A D | dacnv50.c | 43 nv_ioctl(object, "disp dac pwr size %d\n", size); nv50_dac_power() 45 nv_ioctl(object, "disp dac pwr vers %d state %d data %d " nv50_dac_power() 72 nv_ioctl(object, "disp dac load size %d\n", size); nv50_dac_sense() 74 nv_ioctl(object, "disp dac load vers %d data %08x\n", nv50_dac_sense()
|
/linux-4.1.27/sound/hda/ |
H A D | array.c | 11 * @array: the array object 40 * @array: the array object
|
/linux-4.1.27/net/irda/ |
H A D | irias_object.c | 5 * 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.1.27/arch/arm/boot/compressed/ |
H A D | debug.S | 35 .type semi_writec_buf, %object
|
/linux-4.1.27/include/linux/input/ |
H A D | gp2ap002a00f.h | 10 * @vout_gpio: The gpio connected to the object detected pin (VOUT)
|
/linux-4.1.27/tools/testing/selftests/memfd/ |
H A D | fuse_test.c | 9 * 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.1.27/drivers/input/touchscreen/ |
H A D | atmel_mxt_ts.c | 87 /* MXT_GEN_MESSAGE_T5 object */ 295 /* Cached parameters from object table */ 665 struct mxt_object *object; mxt_get_object() local 669 object = data->object_table + i; mxt_get_object() 670 if (object->type == type) mxt_get_object() 671 return object; mxt_get_object() 674 dev_warn(&data->client->dev, "Invalid object type T%u\n", type); mxt_get_object() 714 struct mxt_object *object; mxt_write_object() local 717 object = mxt_get_object(data, type); mxt_write_object() 718 if (!object || offset >= mxt_obj_size(object)) mxt_write_object() 721 reg = object->start_address; mxt_write_object() 1241 struct mxt_object *object; mxt_prepare_cfg_mem() local 1257 dev_err(dev, "Bad format: failed to parse object\n"); mxt_prepare_cfg_mem() 1262 object = mxt_get_object(data, type); mxt_prepare_cfg_mem() 1263 if (!object) { mxt_prepare_cfg_mem() 1264 /* Skip object */ mxt_prepare_cfg_mem() 1278 if (size > mxt_obj_size(object)) { mxt_prepare_cfg_mem() 1285 size - mxt_obj_size(object), type); mxt_prepare_cfg_mem() 1286 } else if (mxt_obj_size(object) > size) { mxt_prepare_cfg_mem() 1297 mxt_obj_size(object) - size, type); mxt_prepare_cfg_mem() 1300 if (instance >= mxt_obj_instances(object)) { mxt_prepare_cfg_mem() 1305 reg = object->start_address + mxt_obj_size(object) * instance; mxt_prepare_cfg_mem() 1318 if (i > mxt_obj_size(object)) mxt_prepare_cfg_mem() 1326 dev_err(dev, "Bad object: reg:%d, T%d, ofs=%d\n", mxt_prepare_cfg_mem() 1327 reg, object->type, byte_offset); mxt_prepare_cfg_mem() 1375 * The rest of the file consists of one line per object instance: 1378 * <TYPE> - 2-byte object type as hex 1379 * <INSTANCE> - 2-byte object instance number as hex 1380 * <SIZE> - 2-byte object size as hex 1444 * The Info Block CRC is calculated over mxt_info and the object mxt_update_cfg() 1598 struct mxt_object *object = object_table + i; mxt_get_object_table() local 1601 le16_to_cpus(&object->start_address); mxt_get_object_table() 1603 if (object->num_report_ids) { mxt_get_object_table() 1605 reportid += object->num_report_ids * mxt_get_object_table() 1606 mxt_obj_instances(object); mxt_get_object_table() 1615 object->type, object->start_address, mxt_get_object_table() 1616 mxt_obj_size(object), mxt_obj_instances(object), mxt_get_object_table() 1619 switch (object->type) { mxt_get_object_table() 1628 data->T5_msg_size = mxt_obj_size(object); mxt_get_object_table() 1631 data->T5_msg_size = mxt_obj_size(object) - 1; mxt_get_object_table() 1633 data->T5_address = object->start_address; mxt_get_object_table() 1637 data->T6_address = object->start_address; mxt_get_object_table() 1640 data->T7_address = object->start_address; mxt_get_object_table() 1646 data->num_touchids = object->num_report_ids mxt_get_object_table() 1647 * mxt_obj_instances(object); mxt_get_object_table() 1650 data->T44_address = object->start_address; mxt_get_object_table() 1660 data->num_touchids = object->num_report_ids - 2; mxt_get_object_table() 1664 end_address = object->start_address mxt_get_object_table() 1665 + mxt_obj_size(object) * mxt_obj_instances(object) - 1; mxt_get_object_table() 1704 struct mxt_object *object; mxt_read_t9_resolution() local 1706 object = mxt_get_object(data, MXT_TOUCH_MULTI_T9); mxt_read_t9_resolution() 1707 if (!object) mxt_read_t9_resolution() 1711 object->start_address + MXT_T9_RANGE, mxt_read_t9_resolution() 1720 object->start_address + MXT_T9_ORIENT, mxt_read_t9_resolution() 1750 struct mxt_object *object; mxt_read_t100_config() local 1755 object = mxt_get_object(data, MXT_TOUCH_MULTITOUCHSCREEN_T100); mxt_read_t100_config() 1756 if (!object) mxt_read_t100_config() 1760 object->start_address + MXT_T100_XRANGE, mxt_read_t100_config() 1768 object->start_address + MXT_T100_YRANGE, mxt_read_t100_config() 1776 object->start_address + MXT_T100_CFG1, mxt_read_t100_config() 1782 object->start_address + MXT_T100_TCHAUX, mxt_read_t100_config() 1875 dev_err(dev, "Invalid multitouch object\n"); mxt_initialize_input_device() 2027 /* Get object table information */ mxt_initialize() 2030 dev_err(&client->dev, "Error %d reading object table\n", error); mxt_initialize() 2072 dev_warn(dev, "No touch object detected\n"); mxt_configure_objects() 2104 struct mxt_object *object, int instance, mxt_show_instance() 2109 if (mxt_obj_instances(object) > 1) mxt_show_instance() 2113 for (i = 0; i < mxt_obj_size(object); i++) mxt_show_instance() 2125 struct mxt_object *object; mxt_object_show() local 2131 /* Pre-allocate buffer large enough to hold max sized object. */ mxt_object_show() 2138 object = data->object_table + i; mxt_object_show() 2140 if (!mxt_object_readable(object->type)) mxt_object_show() 2144 "T%u:\n", object->type); mxt_object_show() 2146 for (j = 0; j < mxt_obj_instances(object); j++) { mxt_object_show() 2147 u16 size = mxt_obj_size(object); mxt_object_show() 2148 u16 addr = object->start_address + j * size; mxt_object_show() 2154 count = mxt_show_instance(buf, count, object, j, obuf); mxt_object_show() 2332 static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); 2103 mxt_show_instance(char *buf, int count, struct mxt_object *object, int instance, const u8 *val) mxt_show_instance() argument
|
/linux-4.1.27/net/core/ |
H A D | flow.c | 39 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.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ |
H A D | gf100.c | 53 gf100_fb_init(struct nvkm_object *object) gf100_fb_init() argument 55 struct gf100_fb_priv *priv = (void *)object; gf100_fb_init() 70 gf100_fb_dtor(struct nvkm_object *object) gf100_fb_dtor() argument 72 struct nvkm_device *device = nv_device(object); gf100_fb_dtor() 73 struct gf100_fb_priv *priv = (void *)object; gf100_fb_dtor()
|
H A D | base.c | 53 _nvkm_fb_fini(struct nvkm_object *object, bool suspend) _nvkm_fb_fini() argument 55 struct nvkm_fb *pfb = (void *)object; _nvkm_fb_fini() 68 _nvkm_fb_init(struct nvkm_object *object) _nvkm_fb_init() argument 70 struct nvkm_fb *pfb = (void *)object; _nvkm_fb_init() 90 _nvkm_fb_dtor(struct nvkm_object *object) _nvkm_fb_dtor() argument 92 struct nvkm_fb *pfb = (void *)object; _nvkm_fb_dtor()
|
/linux-4.1.27/drivers/mtd/ubi/ |
H A D | fastmap-wl.c | 19 * @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 229 * @ubi: UBI device description object 253 * @ubi: UBI device description object 286 * @ubi: UBI device description object 323 * @wrk: The work object to be checked 349 * @ubi: UBI device description object
|
/linux-4.1.27/fs/ceph/ |
H A D | ioctl.h | 15 * 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.1.27/include/media/ |
H A D | v4l2-event.h | 36 * 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. 98 * @id: Associated object ID (e.g. control ID). 0 if there isn't any. 101 * @node: List node that hooks into the object's event list (if there is one).
|
/linux-4.1.27/fs/nfs/ |
H A D | fscache-index.c | 27 * 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.1.27/scripts/ |
H A D | namespace.pl | 9 # 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.1.27/drivers/gpu/drm/nouveau/nvkm/engine/mspdec/ |
H A D | g98.c | 32 * MSPDEC object classes 64 g98_mspdec_init(struct nvkm_object *object) g98_mspdec_init() argument 66 struct g98_mspdec_priv *priv = (void *)object; g98_mspdec_init()
|
H A D | gf100.c | 32 * MSPDEC object classes 63 gf100_mspdec_init(struct nvkm_object *object) gf100_mspdec_init() argument 65 struct gf100_mspdec_priv *priv = (void *)object; gf100_mspdec_init()
|
H A D | gk104.c | 32 * MSPDEC object classes 63 gk104_mspdec_init(struct nvkm_object *object) gk104_mspdec_init() argument 65 struct gk104_mspdec_priv *priv = (void *)object; gk104_mspdec_init()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/msppp/ |
H A D | g98.c | 32 * MSPPP object classes 64 g98_msppp_init(struct nvkm_object *object) g98_msppp_init() argument 66 struct g98_msppp_priv *priv = (void *)object; g98_msppp_init()
|
H A D | gf100.c | 32 * MSPPP object classes 63 gf100_msppp_init(struct nvkm_object *object) gf100_msppp_init() argument 65 struct gf100_msppp_priv *priv = (void *)object; gf100_msppp_init()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/msvld/ |
H A D | g98.c | 32 * MSVLD object classes 65 g98_msvld_init(struct nvkm_object *object) g98_msvld_init() argument 67 struct g98_msvld_priv *priv = (void *)object; g98_msvld_init()
|
H A D | gf100.c | 32 * MSVLD object classes 63 gf100_msvld_init(struct nvkm_object *object) gf100_msvld_init() argument 65 struct gf100_msvld_priv *priv = (void *)object; gf100_msvld_init()
|
H A D | gk104.c | 32 * MSVLD object classes 63 gk104_msvld_init(struct nvkm_object *object) gk104_msvld_init() argument 65 struct gk104_msvld_priv *priv = (void *)object; gk104_msvld_init()
|
/linux-4.1.27/arch/cris/include/asm/ |
H A D | elf.h | 57 /* Variant 0; may contain v0..10 object. */ 60 /* Variant 1; contains v32 object. */ 63 /* Variant 2; contains object compatible with v32 and v10. */
|
/linux-4.1.27/drivers/staging/ozwpan/ |
H A D | ozusbsvc.h | 11 * This object is reference counted to ensure it doesn't disappear while
|
/linux-4.1.27/fs/exofs/ |
H A D | common.h | 47 * 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.1.27/net/ieee802154/ |
H A D | core.h | 41 /* free object */
|
/linux-4.1.27/drivers/scsi/mpt3sas/ |
H A D | mpt3sas_scsih.c | 170 * @work: work object (ioc->fault_reset_work_q) 172 * @ioc: per adapter object 180 * This object stored on ioc->fw_event_list. 295 * @boot_device: boot device object from bios page 2 309 * @boot_device: boot device object from bios page 2 324 * @boot_device: boot device object from bios page 2 344 * @boot_device: boot device object from bios page 2 431 * @ioc: per adapter object 432 * @device: either sas_device or raid_device object 433 * @is_raid: [flag] 1 = raid object, 0 = sas object 439 * the corresponding device object and is_raid flag in the ioc object. 523 * @ioc: per adapter object 528 * object. 549 * @ioc: per adapter object 554 * object. 574 * @ioc: per adapter object 575 * @sas_device: the sas_device object 578 * Removing object and freeing associated memory from the ioc->sas_device_list. 596 * _scsih_device_remove_by_handle - removing device object by handle 597 * @ioc: per adapter object 621 * mpt3sas_device_remove_by_sas_address - removing device object by sas address 622 * @ioc: per adapter object 649 * @ioc: per adapter object 650 * @sas_device: the sas_device object 653 * Adding new object to the ioc->sas_device_list. 690 * @ioc: per adapter object 691 * @sas_device: the sas_device object 694 * Adding new object at driver load time to the ioc->sas_device_init_list. 715 * @ioc: per adapter object 721 * object. 742 * @ioc: per adapter object 747 * object. 768 * @ioc: per adapter object 773 * object. 793 * _scsih_raid_device_add - add raid_device object 794 * @ioc: per adapter object 795 * @raid_device: raid_device object 815 * _scsih_raid_device_remove - delete raid_device object 816 * @ioc: per adapter object 817 * @raid_device: raid_device object 834 * @ioc: per adapter object 839 * sas_node object. 859 * @ioc: per adapter object 864 * sas_node object. 885 * @ioc: per adapter object 886 * @sas_expander: the sas_device object 889 * Adding new object to the ioc->sas_expander_list. 925 * @ioc: per adapter object 938 * @ioc: per adapter object 960 * @ioc: per adapter object 962 * @scmd: pointer to scsi command object 991 * @ioc: per adapter object 1024 * @ioc: per adapter object 1320 * @ioc: per adapter object 1373 * @dev the device struct object 1385 * @dev the device struct object 1434 * @dev the device struct object 1521 * @ioc: per adapter object 1522 * @sas_device: the raid_device object 1589 * @ioc: per adapter object 1846 * @ioc: per adapter object 1891 * @ioc: per adapter object 1925 * @ioc: per adapter object 1953 * @ioc: per adapter object 2151 * @scmd: pointer to scsi command object 2203 * @scmd: pointer to scsi command object 2262 * @scmd: pointer to scsi command object 2321 * @scmd: pointer to scsi command object 2382 * @scmd: pointer to scsi command object 2415 * @ioc: per adapter object 2416 * @fw_event: object describing the event 2419 * This adds the firmware event object into link list, then queues it up to 2442 * @ioc: per adapter object 2443 * @fw_event: object describing the event 2446 * This removes firmware event object from link list, frees associated memory. 2465 * @ioc: per adapter object 2490 * @ioc: per adapter object 2511 * @ioc: per adapter object 2530 * @ioc: per adapter object 2556 * @ioc: per adapter object 2584 * @ioc: per adapter object 2611 * @ioc: per adapter object 2637 * @ioc: per adapter object 2665 * @ioc: per adapter object 2666 * @sas_expander: the sas_device object 2717 * @ioc: per adapter object 2744 * @ioc: per adapter object 2842 * @ioc: per adapter object 2931 * @ioc: per adapter object 2967 * @ioc: per adapter object 3018 * @ioc: per adapter object 3072 * @ioc: per adapter object 3111 * @ioc: per adapter object 3194 * @ioc: per adapter object 3244 * @ioc: per adapter object 3328 * @ioc: per adapter object 3355 * @ioc: per adapter object 3380 * @ioc: per adapter object 3413 * @ioc: per adapter object 3414 * @scmd: pointer to scsi command object 3473 * @scmd: pointer to scsi command object 3506 * @scmd: pointer to scsi command object 3663 * @ioc: per adapter object 3664 * @scmd: pointer to scsi command object 3868 * @ioc: per adapter object 3910 * @ioc: per adapter object 3948 * @ioc: per adapter object 3970 * @ioc: per adapter object 4036 * @ioc: per adapter object 4240 * _scsih_sas_host_refresh - refreshing sas host object contents 4241 * @ioc: per adapter object 4298 * _scsih_sas_host_add - create sas host object 4299 * @ioc: per adapter object 4301 * Creating host side data object, stored in ioc->sas_hba 4443 * _scsih_expander_add - creating expander object 4444 * @ioc: per adapter object 4447 * Creating expander object, stored in ioc->sas_expander_list. 4600 * mpt3sas_expander_remove - removing expander object 4601 * @ioc: per adapter object 4627 * @ioc: per adapter object 4667 * @ioc: per adapter object 4731 * @ioc: per adapter object 4816 * _scsih_add_device - creating sas device object 4817 * @ioc: per adapter object 4822 * Creating end device object, stored in ioc->sas_device_list. 4924 * _scsih_remove_device - removing sas device object 4925 * @ioc: per adapter object 4926 * @sas_device_delete: the sas_device object 4975 * @ioc: per adapter object 5054 * @ioc: per adapter object 5055 * @fw_event: The fw_event_work object 5256 * @ioc: per adapter object 5257 * @fw_event: The fw_event_work object 5320 * @ioc: per adapter object 5355 * @ioc: per adapter object 5356 * @fw_event: The fw_event_work object 5375 * @ioc: per adapter object 5376 * @fw_event: The fw_event_work object 5537 * @ioc: per adapter object 5538 * @fw_event: The fw_event_work object 5575 * @ioc: per adapter object 5686 * @ioc: per adapter object 5744 * @ioc: per adapter object 5779 * @ioc: per adapter object 5819 * @ioc: per adapter object 5867 * @ioc: per adapter object 5884 * @ioc: per adapter object 5940 * @ioc: per adapter object 6021 * @ioc: per adapter object 6022 * @fw_event: The fw_event_work object 6090 * @ioc: per adapter object 6091 * @fw_event: The fw_event_work object 6173 * @ioc: per adapter object 6174 * @fw_event: The fw_event_work object 6258 * @ioc: per adapter object 6301 * @ioc: per adapter object 6302 * @fw_event: The fw_event_work object 6339 * @ioc: per adapter object 6359 * @ioc: per adapter object 6415 * @ioc: per adapter object 6460 * @ioc: per adapter object 6512 * @ioc: per adapter object 6581 * @ioc: per adapter object 6620 * @ioc: per adapter object 6664 * @ioc: per adapter object 6756 * @ioc: per adapter object 7005 * @ioc: per adapter object 7057 * @ioc: per adapter object 7058 * @fw_event: The fw_event_work object 7131 * @ioc: per adapter object 7132 * @work: The fw_event_work object 7151 * @ioc: per adapter object 7290 * @ioc: per adapter object 7291 * @sas_expander: the sas_device object 7294 * Removing object and freeing associated memory from the 7337 * @ioc: per adapter object 7510 * @ioc: per adapter object 7580 * @ioc: per adapter object 7603 * @ioc: per adapter object 7647 * @ioc: per adapter object
|
/linux-4.1.27/drivers/acpi/ |
H A D | resource.c | 79 * @ares: Input ACPI resource object. 80 * @res: Output generic resource object. 82 * Check if the given ACPI resource object represents a memory resource and 84 * resource object pointed to by @res. 150 * @ares: Input ACPI resource object. 151 * @res: Output generic resource object. 153 * Check if the given ACPI resource object represents an I/O resource and 155 * resource object pointed to by @res. 258 * @ares: Input ACPI resource object. 259 * @win: Output generic resource object. 261 * Check if the given ACPI resource object represents an address space resource 263 * resource object pointed to by @win. 287 * @ares: Input ACPI resource object. 288 * @win: Output generic resource object. 290 * Check if the given ACPI resource object represents an extended address space 292 * generic resource object pointed to by @win. 392 * @ares: Input ACPI resource object. 394 * @res: Output generic resource object. 396 * Check if the given ACPI resource object represents an interrupt resource 400 * represented by the resource and populate the generic resource object pointed 402 * IORESOURCE_DISABLED will be set it that object's flags. 579 * @ares: Input ACPI resource object.
|
/linux-4.1.27/net/batman-adv/ |
H A D | originator.c | 47 * batadv_orig_node_vlan_get - get an orig_node_vlan object 51 * Returns the vlan object identified by vid and belonging to orig_node or NULL 79 * object 83 * Returns NULL in case of failure or the vlan object identified by vid and 84 * belonging to orig_node otherwise. The object is created and added to the list 87 * The object is returned with refcounter increased by 1. 97 /* first look if an object for this vid already exists */ batadv_orig_node_vlan_new() 119 * the originator-vlan object 120 * @orig_vlan: the originator-vlan object to release 155 * @neigh_ifinfo: the neigh_ifinfo object to release 169 * @neigh_ifinfo: the neigh_ifinfo object to release 215 * The object is returned with refcounter increased by 1. 247 * The object is returned with refcounter increased by 1. 273 * batadv_orig_ifinfo_new - search and possibly create an orig_ifinfo object 277 * Returns NULL in case of failure or the orig_ifinfo object for the if_outgoing 278 * interface otherwise. The object is created and added to the list 281 * The object is returned with refcounter increased by 1. 325 * The object is returned with refcounter increased by 1. 354 * batadv_neigh_ifinfo_new - search and possibly create an neigh_ifinfo object 358 * Returns NULL in case of failure or the neigh_ifinfo object for the 359 * if_outgoing interface otherwise. The object is created and added to the list 362 * The object is returned with refcounter increased by 1. 399 * batadv_neigh_node_new - create and init a new neigh_node object 402 * @orig_node: originator object representing the neighbour 404 * Allocates a new neigh_node object and initialises all the generic fields. 405 * Returns the new object or NULL on failure. 472 * @orig_ifinfo: the orig_ifinfo object to release 481 /* this is the last reference to this object */ batadv_orig_ifinfo_release() 492 * @orig_ifinfo: the orig_ifinfo object to release 602 * Creates a new originator object and initialise all the generic fields. 603 * The new object is not added to the originator list. 604 * Returns the newly created object or NULL on failure. 653 /* create a vlan object for the "untagged" LAN */ batadv_orig_node_new()
|
/linux-4.1.27/drivers/input/serio/ |
H A D | serio.c | 160 void *object; member in struct:serio_event 191 static void serio_remove_duplicate_events(void *object, serio_remove_duplicate_events() argument 200 if (object == e->object) { serio_remove_duplicate_events() 228 serio_add_port(event->object); serio_handle_event() 232 serio_reconnect_port(event->object); serio_handle_event() 236 serio_disconnect_port(event->object); serio_handle_event() 237 serio_find_driver(event->object); serio_handle_event() 241 serio_reconnect_subtree(event->object); serio_handle_event() 245 serio_attach_driver(event->object); serio_handle_event() 249 serio_remove_duplicate_events(event->object, event->type); serio_handle_event() 258 static int serio_queue_event(void *object, struct module *owner, serio_queue_event() argument 275 if (event->object == object) { serio_queue_event() 298 event->object = object; serio_queue_event() 311 * object, be it serio port or driver. 313 static void serio_remove_pending_events(void *object) serio_remove_pending_events() argument 321 if (event->object == object) { serio_remove_pending_events() 346 serio = event->object; serio_get_pending_child()
|