diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-02-16 17:17:27 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-24 00:53:19 -0500 |
commit | c991410874e1c4164404b33060b31bf2d99d1ae6 (patch) | |
tree | 4b162cb15a8fb6d4441182e17b97d4737a25d358 /drivers/gpu/nvgpu/common/linux | |
parent | ed36c605451ee703c2714e26a87982428b16b26c (diff) |
gpu: nvgpu: Abstract kernel_restart()
This function is used in gk20a.c to handle catastrophic error conditions
but is Linux specific. As such, implement an abstraction for this in
driver_common.c and expose the API in nvgpu_common.h.
JIRA NVGPU-525
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Change-Id: Ie2e417d30af5ff7db76f4d2d5b97ec96c386bd04
Reviewed-on: https://git-master.nvidia.com/r/1662543
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/driver_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index b3333e37..9029366f 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/reboot.h> | ||
17 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
18 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
19 | #include <uapi/linux/nvgpu.h> | 20 | #include <uapi/linux/nvgpu.h> |
@@ -37,6 +38,11 @@ | |||
37 | 38 | ||
38 | #define EMC3D_DEFAULT_RATIO 750 | 39 | #define EMC3D_DEFAULT_RATIO 750 |
39 | 40 | ||
41 | void nvgpu_kernel_restart(void *cmd) | ||
42 | { | ||
43 | kernel_restart(cmd); | ||
44 | } | ||
45 | |||
40 | static void nvgpu_init_vars(struct gk20a *g) | 46 | static void nvgpu_init_vars(struct gk20a *g) |
41 | { | 47 | { |
42 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | 48 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |