mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-03-14 09:37:48 +00:00
550.40.07
This commit is contained in:
@@ -155,10 +155,6 @@ static void __nvoc_thunk_RmResource_vmrangeControl_Epilogue(struct VirtualMemory
|
||||
rmresControl_Epilogue((struct RmResource *)(((unsigned char *)pResource) + __nvoc_rtti_VirtualMemoryRange_RmResource.offset), pCallContext, pParams);
|
||||
}
|
||||
|
||||
static NV_STATUS __nvoc_thunk_RsResource_vmrangeControlLookup(struct VirtualMemoryRange *pResource, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams, const struct NVOC_EXPORTED_METHOD_DEF **ppEntry) {
|
||||
return resControlLookup((struct RsResource *)(((unsigned char *)pResource) + __nvoc_rtti_VirtualMemoryRange_RsResource.offset), pParams, ppEntry);
|
||||
}
|
||||
|
||||
static NV_STATUS __nvoc_thunk_Memory_vmrangeControl(struct VirtualMemoryRange *pMemory, CALL_CONTEXT *pCallContext, struct RS_RES_CONTROL_PARAMS_INTERNAL *pParams) {
|
||||
return memControl((struct Memory *)(((unsigned char *)pMemory) + __nvoc_rtti_VirtualMemoryRange_Memory.offset), pCallContext, pParams);
|
||||
}
|
||||
@@ -187,6 +183,10 @@ static NvBool __nvoc_thunk_StandardMemory_vmrangeCanCopy(struct VirtualMemoryRan
|
||||
return stdmemCanCopy((struct StandardMemory *)(((unsigned char *)pStandardMemory) + __nvoc_rtti_VirtualMemoryRange_StandardMemory.offset));
|
||||
}
|
||||
|
||||
static NvBool __nvoc_thunk_VirtualMemory_vmrangeIsPartialUnmapSupported(struct VirtualMemoryRange *pVirtualMemory) {
|
||||
return virtmemIsPartialUnmapSupported((struct VirtualMemory *)(((unsigned char *)pVirtualMemory) + __nvoc_rtti_VirtualMemoryRange_VirtualMemory.offset));
|
||||
}
|
||||
|
||||
static NV_STATUS __nvoc_thunk_Memory_vmrangeIsReady(struct VirtualMemoryRange *pMemory, NvBool bCopyConstructorContext) {
|
||||
return memIsReady((struct Memory *)(((unsigned char *)pMemory) + __nvoc_rtti_VirtualMemoryRange_Memory.offset), bCopyConstructorContext);
|
||||
}
|
||||
@@ -275,8 +275,6 @@ static void __nvoc_init_funcTable_VirtualMemoryRange_1(VirtualMemoryRange *pThis
|
||||
|
||||
pThis->__vmrangeControl_Epilogue__ = &__nvoc_thunk_RmResource_vmrangeControl_Epilogue;
|
||||
|
||||
pThis->__vmrangeControlLookup__ = &__nvoc_thunk_RsResource_vmrangeControlLookup;
|
||||
|
||||
pThis->__vmrangeControl__ = &__nvoc_thunk_Memory_vmrangeControl;
|
||||
|
||||
pThis->__vmrangeUnmap__ = &__nvoc_thunk_Memory_vmrangeUnmap;
|
||||
@@ -291,6 +289,8 @@ static void __nvoc_init_funcTable_VirtualMemoryRange_1(VirtualMemoryRange *pThis
|
||||
|
||||
pThis->__vmrangeCanCopy__ = &__nvoc_thunk_StandardMemory_vmrangeCanCopy;
|
||||
|
||||
pThis->__vmrangeIsPartialUnmapSupported__ = &__nvoc_thunk_VirtualMemory_vmrangeIsPartialUnmapSupported;
|
||||
|
||||
pThis->__vmrangeIsReady__ = &__nvoc_thunk_Memory_vmrangeIsReady;
|
||||
|
||||
pThis->__vmrangeCheckCopyPermissions__ = &__nvoc_thunk_Memory_vmrangeCheckCopyPermissions;
|
||||
@@ -324,21 +324,26 @@ void __nvoc_init_VirtualMemoryRange(VirtualMemoryRange *pThis) {
|
||||
__nvoc_init_funcTable_VirtualMemoryRange(pThis);
|
||||
}
|
||||
|
||||
NV_STATUS __nvoc_objCreate_VirtualMemoryRange(VirtualMemoryRange **ppThis, Dynamic *pParent, NvU32 createFlags, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams) {
|
||||
NV_STATUS __nvoc_objCreate_VirtualMemoryRange(VirtualMemoryRange **ppThis, Dynamic *pParent, NvU32 createFlags, CALL_CONTEXT * arg_pCallContext, struct RS_RES_ALLOC_PARAMS_INTERNAL * arg_pParams)
|
||||
{
|
||||
NV_STATUS status;
|
||||
Object *pParentObj;
|
||||
Object *pParentObj = NULL;
|
||||
VirtualMemoryRange *pThis;
|
||||
|
||||
// Assign `pThis`, allocating memory unless suppressed by flag.
|
||||
status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(VirtualMemoryRange), (void**)&pThis, (void**)ppThis);
|
||||
if (status != NV_OK)
|
||||
return status;
|
||||
|
||||
// Zero is the initial value for everything.
|
||||
portMemSet(pThis, 0, sizeof(VirtualMemoryRange));
|
||||
|
||||
// Initialize runtime type information.
|
||||
__nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_VirtualMemoryRange);
|
||||
|
||||
pThis->__nvoc_base_VirtualMemory.__nvoc_base_StandardMemory.__nvoc_base_Memory.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object.createFlags = createFlags;
|
||||
|
||||
// Link the child into the parent if there is one unless flagged not to do so.
|
||||
if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY))
|
||||
{
|
||||
pParentObj = dynamicCast(pParent, Object);
|
||||
@@ -353,16 +358,25 @@ NV_STATUS __nvoc_objCreate_VirtualMemoryRange(VirtualMemoryRange **ppThis, Dynam
|
||||
status = __nvoc_ctor_VirtualMemoryRange(pThis, arg_pCallContext, arg_pParams);
|
||||
if (status != NV_OK) goto __nvoc_objCreate_VirtualMemoryRange_cleanup;
|
||||
|
||||
// Assignment has no effect if NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT is set.
|
||||
*ppThis = pThis;
|
||||
|
||||
return NV_OK;
|
||||
|
||||
__nvoc_objCreate_VirtualMemoryRange_cleanup:
|
||||
// do not call destructors here since the constructor already called them
|
||||
|
||||
// Unlink the child from the parent if it was linked above.
|
||||
if (pParentObj != NULL)
|
||||
objRemoveChild(pParentObj, &pThis->__nvoc_base_VirtualMemory.__nvoc_base_StandardMemory.__nvoc_base_Memory.__nvoc_base_RmResource.__nvoc_base_RsResource.__nvoc_base_Object);
|
||||
|
||||
// Do not call destructors here since the constructor already called them.
|
||||
if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT)
|
||||
portMemSet(pThis, 0, sizeof(VirtualMemoryRange));
|
||||
else
|
||||
{
|
||||
portMemFree(pThis);
|
||||
*ppThis = NULL;
|
||||
}
|
||||
|
||||
// coverity[leaked_storage:FALSE]
|
||||
return status;
|
||||
|
||||
Reference in New Issue
Block a user