mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-05-25 15:14:57 +00:00
575.51.02
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2016-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2016-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -50,6 +50,9 @@
|
||||
|
||||
#include "ioctl_nvswitch.h"
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "nvswitch_event.h"
|
||||
|
||||
static const struct
|
||||
{
|
||||
NvlStatus status;
|
||||
@@ -1892,6 +1895,35 @@ nvswitch_os_print
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void
|
||||
nvswitch_os_report_error
|
||||
(
|
||||
void *os_handle,
|
||||
NvU32 error_code,
|
||||
const char *fmt,
|
||||
...
|
||||
)
|
||||
{
|
||||
va_list arglist;
|
||||
char *buffer;
|
||||
gfp_t gfp = NV_MAY_SLEEP() ? NV_GFP_NO_OOM : NV_GFP_ATOMIC;
|
||||
struct pci_dev *pdev = (struct pci_dev *)os_handle;
|
||||
|
||||
if (pdev == NULL)
|
||||
return;
|
||||
|
||||
va_start(arglist, fmt);
|
||||
buffer = kvasprintf(gfp, fmt, arglist);
|
||||
va_end(arglist);
|
||||
|
||||
if (buffer == NULL)
|
||||
return;
|
||||
|
||||
trace_nvswitch_dev_sxid(pdev, error_code, buffer);
|
||||
|
||||
kfree(buffer);
|
||||
}
|
||||
|
||||
void
|
||||
nvswitch_os_override_platform
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user