Files
linux-nvgpu/drivers/gpu/nvgpu/os/posix/os_posix.h
Adeel Raza e254d482c0 gpu: nvgpu: posix: MISRA 21.2 header guard fixes
MISRA rule 21.2 forbids the usage of identifier names which start with
an underscore. This is because identifier names which start with an
underscore are reserved for the C library. This patch fixes rule 21.2
issues in POSIX header guard names.

JIRA NVGPU-1028

Change-Id: I12d01c9d18b64c2a12fbd7840455d38fb024c2e8
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2011873
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Scott Long <scottl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-02-06 10:34:10 -08:00

65 lines
1.9 KiB
C

/*
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef NVGPU_OS_POSIX_H
#define NVGPU_OS_POSIX_H
#include <nvgpu/gk20a.h>
struct nvgpu_posix_io_callbacks;
struct nvgpu_os_posix {
struct gk20a g;
/*
* IO callbacks for handling the nvgpu IO accessors.
*/
struct nvgpu_posix_io_callbacks *callbacks;
/*
* Memory-mapped register space for unit tests.
*/
struct nvgpu_list_node reg_space_head;
int error_code;
/*
* List to record sequence of register writes.
*/
struct nvgpu_list_node recorder_head;
bool recording;
/*
* Parameters to change the behavior of MM-related functions
*/
bool mm_is_iommuable;
bool mm_sgt_is_iommuable;
};
static inline struct nvgpu_os_posix *nvgpu_os_posix_from_gk20a(struct gk20a *g)
{
return container_of(g, struct nvgpu_os_posix, g);
}
#endif /* NVGPU_OS_POSIX_H */