mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add separate unit for debugger
Rename gk20a/dbg_gpu_gk20a.c to common/debugger.c and make it a separate common unit Also rename gk20a/dbg_gpu_gk20a.h to include/nvgpu/debugger.h We had two different HALs for debugger - gops.debugger and gops.dbg_session_ops Combine them into one single HAL gops.debugger and remove gops.dbg_session_ops Rename all exported APIs from debugger.h to be in the form of nvgpu_*() Jira NVGPU-1013 Change-Id: I136dc7786e3b2065921eb03b99f16049212f3cd2 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1920075 Reviewed-by: Sachin Jadhav <sachinj@nvidia.com> Tested-by: Sachin Jadhav <sachinj@nvidia.com>
This commit is contained in:
committed by
Sachin Jadhav
parent
625fa68d2a
commit
1b2a0833e0
@@ -238,10 +238,10 @@ nvgpu-y += \
|
|||||||
common/fifo/tsg.o \
|
common/fifo/tsg.o \
|
||||||
common/ecc.o \
|
common/ecc.o \
|
||||||
common/ce2.o \
|
common/ce2.o \
|
||||||
|
common/debugger.o \
|
||||||
gk20a/gk20a.o \
|
gk20a/gk20a.o \
|
||||||
gk20a/ce2_gk20a.o \
|
gk20a/ce2_gk20a.o \
|
||||||
gk20a/fifo_gk20a.o \
|
gk20a/fifo_gk20a.o \
|
||||||
gk20a/dbg_gpu_gk20a.o \
|
|
||||||
gk20a/regops_gk20a.o \
|
gk20a/regops_gk20a.o \
|
||||||
gk20a/gr_gk20a.o \
|
gk20a/gr_gk20a.o \
|
||||||
gk20a/mm_gk20a.o \
|
gk20a/mm_gk20a.o \
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ srcs := os/posix/nvgpu.c \
|
|||||||
common/io_common.c \
|
common/io_common.c \
|
||||||
common/ecc.c \
|
common/ecc.c \
|
||||||
common/ce2.c \
|
common/ce2.c \
|
||||||
|
common/debugger.c \
|
||||||
common/vbios/bios.c \
|
common/vbios/bios.c \
|
||||||
common/falcon/falcon.c \
|
common/falcon/falcon.c \
|
||||||
common/falcon/falcon_queue.c \
|
common/falcon/falcon_queue.c \
|
||||||
@@ -156,7 +157,6 @@ srcs := os/posix/nvgpu.c \
|
|||||||
common/ptimer/ptimer_gk20a.c \
|
common/ptimer/ptimer_gk20a.c \
|
||||||
gk20a/ce2_gk20a.c \
|
gk20a/ce2_gk20a.c \
|
||||||
gk20a/fifo_gk20a.c \
|
gk20a/fifo_gk20a.c \
|
||||||
gk20a/dbg_gpu_gk20a.c \
|
|
||||||
gk20a/regops_gk20a.c \
|
gk20a/regops_gk20a.c \
|
||||||
gk20a/gr_gk20a.c \
|
gk20a/gr_gk20a.c \
|
||||||
gk20a/mm_gk20a.c \
|
gk20a/mm_gk20a.c \
|
||||||
|
|||||||
@@ -32,11 +32,10 @@
|
|||||||
#include <nvgpu/utils.h>
|
#include <nvgpu/utils.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/unit.h>
|
#include <nvgpu/unit.h>
|
||||||
|
#include <nvgpu/gk20a.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
|
|
||||||
#include "gk20a.h"
|
#include "gk20a/gr_gk20a.h"
|
||||||
#include "gr_gk20a.h"
|
|
||||||
#include "dbg_gpu_gk20a.h"
|
|
||||||
#include "regops_gk20a.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* API to get first channel from the list of all channels
|
* API to get first channel from the list of all channels
|
||||||
@@ -65,7 +64,7 @@ nvgpu_dbg_gpu_get_session_channel(struct dbg_session_gk20a *dbg_s)
|
|||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gk20a_dbg_gpu_post_events(struct channel_gk20a *ch)
|
void nvgpu_dbg_gpu_post_events(struct channel_gk20a *ch)
|
||||||
{
|
{
|
||||||
struct dbg_session_data *session_data;
|
struct dbg_session_data *session_data;
|
||||||
struct dbg_session_gk20a *dbg_s;
|
struct dbg_session_gk20a *dbg_s;
|
||||||
@@ -94,7 +93,7 @@ void gk20a_dbg_gpu_post_events(struct channel_gk20a *ch)
|
|||||||
nvgpu_mutex_release(&ch->dbg_s_lock);
|
nvgpu_mutex_release(&ch->dbg_s_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gk20a_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch)
|
bool nvgpu_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch)
|
||||||
{
|
{
|
||||||
struct dbg_session_data *session_data;
|
struct dbg_session_data *session_data;
|
||||||
struct dbg_session_gk20a *dbg_s;
|
struct dbg_session_gk20a *dbg_s;
|
||||||
@@ -122,7 +121,7 @@ bool gk20a_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch)
|
|||||||
return broadcast;
|
return broadcast;
|
||||||
}
|
}
|
||||||
|
|
||||||
int gk20a_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch)
|
int nvgpu_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch)
|
||||||
{
|
{
|
||||||
struct dbg_session_data *session_data;
|
struct dbg_session_data *session_data;
|
||||||
struct dbg_session_gk20a *dbg_s;
|
struct dbg_session_gk20a *dbg_s;
|
||||||
@@ -164,7 +163,7 @@ u32 nvgpu_set_powergate_locked(struct dbg_session_gk20a *dbg_s,
|
|||||||
* the global pg disabled refcount is zero
|
* the global pg disabled refcount is zero
|
||||||
*/
|
*/
|
||||||
if (g->dbg_powergating_disabled_refcount == 0) {
|
if (g->dbg_powergating_disabled_refcount == 0) {
|
||||||
err = g->ops.dbg_session_ops.dbg_set_powergate(dbg_s,
|
err = g->ops.debugger.dbg_set_powergate(dbg_s,
|
||||||
mode);
|
mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +177,7 @@ u32 nvgpu_set_powergate_locked(struct dbg_session_gk20a *dbg_s,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate)
|
int nvgpu_dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
struct gk20a *g = dbg_s->g;
|
struct gk20a *g = dbg_s->g;
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
#include <nvgpu/cond.h>
|
#include <nvgpu/cond.h>
|
||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
#include <nvgpu/debug.h>
|
#include <nvgpu/debug.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/ltc.h>
|
#include <nvgpu/ltc.h>
|
||||||
#include <nvgpu/barrier.h>
|
#include <nvgpu/barrier.h>
|
||||||
#include <nvgpu/ctxsw_trace.h>
|
#include <nvgpu/ctxsw_trace.h>
|
||||||
@@ -47,7 +48,6 @@
|
|||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/channel_sync.h>
|
#include <nvgpu/channel_sync.h>
|
||||||
|
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/fence_gk20a.h"
|
#include "gk20a/fence_gk20a.h"
|
||||||
|
|
||||||
static void free_channel(struct fifo_gk20a *f, struct channel_gk20a *c);
|
static void free_channel(struct fifo_gk20a *f, struct channel_gk20a *c);
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
#include "gk20a.h"
|
#include "gk20a.h"
|
||||||
#include "gk20a/ce2_gk20a.h"
|
#include "gk20a/ce2_gk20a.h"
|
||||||
|
|
||||||
#include "dbg_gpu_gk20a.h"
|
|
||||||
#include "pstate/pstate.h"
|
#include "pstate/pstate.h"
|
||||||
|
|
||||||
void __nvgpu_check_gpu_state(struct gk20a *g)
|
void __nvgpu_check_gpu_state(struct gk20a *g)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include <nvgpu/debug.h>
|
#include <nvgpu/debug.h>
|
||||||
#include <nvgpu/barrier.h>
|
#include <nvgpu/barrier.h>
|
||||||
#include <nvgpu/mm.h>
|
#include <nvgpu/mm.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/ctxsw_trace.h>
|
#include <nvgpu/ctxsw_trace.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/ecc.h>
|
#include <nvgpu/ecc.h>
|
||||||
@@ -50,7 +51,6 @@
|
|||||||
#include "gr_ctx_gk20a.h"
|
#include "gr_ctx_gk20a.h"
|
||||||
#include "gr_pri_gk20a.h"
|
#include "gr_pri_gk20a.h"
|
||||||
#include "regops_gk20a.h"
|
#include "regops_gk20a.h"
|
||||||
#include "dbg_gpu_gk20a.h"
|
|
||||||
|
|
||||||
#include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h>
|
#include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h>
|
||||||
#include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h>
|
#include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h>
|
||||||
|
|||||||
@@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
#include "gk20a.h"
|
#include "gk20a.h"
|
||||||
#include "gr_gk20a.h"
|
#include "gr_gk20a.h"
|
||||||
#include "dbg_gpu_gk20a.h"
|
|
||||||
#include "regops_gk20a.h"
|
#include "regops_gk20a.h"
|
||||||
|
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/log.h>
|
#include <nvgpu/log.h>
|
||||||
#include <nvgpu/bsearch.h>
|
#include <nvgpu/bsearch.h>
|
||||||
#include <nvgpu/bug.h>
|
#include <nvgpu/bug.h>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <nvgpu/ptimer.h>
|
#include <nvgpu/ptimer.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/gk20a.h>
|
#include <nvgpu/gk20a.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/tsg.h>
|
#include <nvgpu/tsg.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
@@ -46,7 +47,6 @@
|
|||||||
#include "common/perf/perf_gm20b.h"
|
#include "common/perf/perf_gm20b.h"
|
||||||
|
|
||||||
#include "gk20a/ce2_gk20a.h"
|
#include "gk20a/ce2_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/fifo_gk20a.h"
|
#include "gk20a/fifo_gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
@@ -604,10 +604,8 @@ static const struct gpu_ops gm20b_ops = {
|
|||||||
.show_dump = gk20a_debug_show_dump,
|
.show_dump = gk20a_debug_show_dump,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
.dbg_set_powergate = nvgpu_dbg_set_powergate,
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = dbg_set_powergate,
|
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
nvgpu_check_and_set_global_reservation,
|
nvgpu_check_and_set_global_reservation,
|
||||||
.check_and_set_context_reservation =
|
.check_and_set_context_reservation =
|
||||||
@@ -710,7 +708,6 @@ int gm20b_init_hal(struct gk20a *g)
|
|||||||
|
|
||||||
gops->regops = gm20b_ops.regops;
|
gops->regops = gm20b_ops.regops;
|
||||||
gops->mc = gm20b_ops.mc;
|
gops->mc = gm20b_ops.mc;
|
||||||
gops->dbg_session_ops = gm20b_ops.dbg_session_ops;
|
|
||||||
gops->perf = gm20b_ops.perf;
|
gops->perf = gm20b_ops.perf;
|
||||||
gops->perfbuf = gm20b_ops.perfbuf;
|
gops->perfbuf = gm20b_ops.perfbuf;
|
||||||
gops->debug = gm20b_ops.debug;
|
gops->debug = gm20b_ops.debug;
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
#include "gk20a/fifo_gk20a.h"
|
#include "gk20a/fifo_gk20a.h"
|
||||||
#include "gk20a/fecs_trace_gk20a.h"
|
#include "gk20a/fecs_trace_gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/pmu_gk20a.h"
|
#include "gk20a/pmu_gk20a.h"
|
||||||
@@ -95,6 +94,7 @@
|
|||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/clk_arb.h>
|
#include <nvgpu/clk_arb.h>
|
||||||
#include <nvgpu/gk20a.h>
|
#include <nvgpu/gk20a.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
#include <nvgpu/cyclestats_snapshot.h>
|
#include <nvgpu/cyclestats_snapshot.h>
|
||||||
@@ -732,10 +732,8 @@ static const struct gpu_ops gp106_ops = {
|
|||||||
.show_dump = gk20a_debug_show_dump,
|
.show_dump = gk20a_debug_show_dump,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
.dbg_set_powergate = nvgpu_dbg_set_powergate,
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = dbg_set_powergate,
|
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
nvgpu_check_and_set_global_reservation,
|
nvgpu_check_and_set_global_reservation,
|
||||||
.check_and_set_context_reservation =
|
.check_and_set_context_reservation =
|
||||||
@@ -873,7 +871,6 @@ int gp106_init_hal(struct gk20a *g)
|
|||||||
gops->mc = gp106_ops.mc;
|
gops->mc = gp106_ops.mc;
|
||||||
gops->debug = gp106_ops.debug;
|
gops->debug = gp106_ops.debug;
|
||||||
gops->debugger = gp106_ops.debugger;
|
gops->debugger = gp106_ops.debugger;
|
||||||
gops->dbg_session_ops = gp106_ops.dbg_session_ops;
|
|
||||||
gops->perf = gp106_ops.perf;
|
gops->perf = gp106_ops.perf;
|
||||||
gops->perfbuf = gp106_ops.perfbuf;
|
gops->perfbuf = gp106_ops.perfbuf;
|
||||||
gops->bus = gp106_ops.bus;
|
gops->bus = gp106_ops.bus;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <nvgpu/dma.h>
|
#include <nvgpu/dma.h>
|
||||||
#include <nvgpu/bug.h>
|
#include <nvgpu/bug.h>
|
||||||
#include <nvgpu/debug.h>
|
#include <nvgpu/debug.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/fuse.h>
|
#include <nvgpu/fuse.h>
|
||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
#include <nvgpu/io.h>
|
#include <nvgpu/io.h>
|
||||||
@@ -36,7 +37,6 @@
|
|||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
|
|
||||||
#include "gk20a/gr_gk20a.h"
|
#include "gk20a/gr_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
|
|
||||||
#include "gm20b/gr_gm20b.h"
|
#include "gm20b/gr_gm20b.h"
|
||||||
@@ -1893,13 +1893,13 @@ int gr_gp10b_pre_process_sm_exception(struct gk20a *g,
|
|||||||
"CILP: starting wait for LOCKED_DOWN on gpc %d tpc %d\n",
|
"CILP: starting wait for LOCKED_DOWN on gpc %d tpc %d\n",
|
||||||
gpc, tpc);
|
gpc, tpc);
|
||||||
|
|
||||||
if (gk20a_dbg_gpu_broadcast_stop_trigger(fault_ch)) {
|
if (nvgpu_dbg_gpu_broadcast_stop_trigger(fault_ch)) {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
||||||
"CILP: Broadcasting STOP_TRIGGER from gpc %d tpc %d\n",
|
"CILP: Broadcasting STOP_TRIGGER from gpc %d tpc %d\n",
|
||||||
gpc, tpc);
|
gpc, tpc);
|
||||||
g->ops.gr.suspend_all_sms(g, global_mask, false);
|
g->ops.gr.suspend_all_sms(g, global_mask, false);
|
||||||
|
|
||||||
gk20a_dbg_gpu_clear_broadcast_stop_trigger(fault_ch);
|
nvgpu_dbg_gpu_clear_broadcast_stop_trigger(fault_ch);
|
||||||
} else {
|
} else {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
||||||
"CILP: STOP_TRIGGER from gpc %d tpc %d\n",
|
"CILP: STOP_TRIGGER from gpc %d tpc %d\n",
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <nvgpu/ctxsw_trace.h>
|
#include <nvgpu/ctxsw_trace.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/gk20a.h>
|
#include <nvgpu/gk20a.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/tsg.h>
|
#include <nvgpu/tsg.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
@@ -55,7 +56,6 @@
|
|||||||
#include "gk20a/fifo_gk20a.h"
|
#include "gk20a/fifo_gk20a.h"
|
||||||
#include "gk20a/fecs_trace_gk20a.h"
|
#include "gk20a/fecs_trace_gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/pmu_gk20a.h"
|
#include "gk20a/pmu_gk20a.h"
|
||||||
@@ -666,10 +666,8 @@ static const struct gpu_ops gp10b_ops = {
|
|||||||
.show_dump = gk20a_debug_show_dump,
|
.show_dump = gk20a_debug_show_dump,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
.dbg_set_powergate = nvgpu_dbg_set_powergate,
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = dbg_set_powergate,
|
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
nvgpu_check_and_set_global_reservation,
|
nvgpu_check_and_set_global_reservation,
|
||||||
.check_and_set_context_reservation =
|
.check_and_set_context_reservation =
|
||||||
@@ -771,7 +769,6 @@ int gp10b_init_hal(struct gk20a *g)
|
|||||||
gops->mc = gp10b_ops.mc;
|
gops->mc = gp10b_ops.mc;
|
||||||
gops->debug = gp10b_ops.debug;
|
gops->debug = gp10b_ops.debug;
|
||||||
gops->debugger = gp10b_ops.debugger;
|
gops->debugger = gp10b_ops.debugger;
|
||||||
gops->dbg_session_ops = gp10b_ops.dbg_session_ops;
|
|
||||||
gops->perf = gp10b_ops.perf;
|
gops->perf = gp10b_ops.perf;
|
||||||
gops->perfbuf = gp10b_ops.perfbuf;
|
gops->perfbuf = gp10b_ops.perfbuf;
|
||||||
gops->bus = gp10b_ops.bus;
|
gops->bus = gp10b_ops.bus;
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
|
|
||||||
#include "gk20a/fifo_gk20a.h"
|
#include "gk20a/fifo_gk20a.h"
|
||||||
#include "gk20a/fecs_trace_gk20a.h"
|
#include "gk20a/fecs_trace_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
@@ -113,6 +112,7 @@
|
|||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/clk_arb.h>
|
#include <nvgpu/clk_arb.h>
|
||||||
#include <nvgpu/gk20a.h>
|
#include <nvgpu/gk20a.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
#include <nvgpu/cyclestats_snapshot.h>
|
#include <nvgpu/cyclestats_snapshot.h>
|
||||||
@@ -849,10 +849,8 @@ static const struct gpu_ops gv100_ops = {
|
|||||||
.show_dump = gk20a_debug_show_dump,
|
.show_dump = gk20a_debug_show_dump,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
.dbg_set_powergate = nvgpu_dbg_set_powergate,
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = dbg_set_powergate,
|
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
nvgpu_check_and_set_global_reservation,
|
nvgpu_check_and_set_global_reservation,
|
||||||
.check_and_set_context_reservation =
|
.check_and_set_context_reservation =
|
||||||
@@ -1007,7 +1005,6 @@ int gv100_init_hal(struct gk20a *g)
|
|||||||
gops->mc = gv100_ops.mc;
|
gops->mc = gv100_ops.mc;
|
||||||
gops->debug = gv100_ops.debug;
|
gops->debug = gv100_ops.debug;
|
||||||
gops->debugger = gv100_ops.debugger;
|
gops->debugger = gv100_ops.debugger;
|
||||||
gops->dbg_session_ops = gv100_ops.dbg_session_ops;
|
|
||||||
gops->perf = gv100_ops.perf;
|
gops->perf = gv100_ops.perf;
|
||||||
gops->perfbuf = gv100_ops.perfbuf;
|
gops->perfbuf = gv100_ops.perfbuf;
|
||||||
gops->bus = gv100_ops.bus;
|
gops->bus = gv100_ops.bus;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
#include <nvgpu/fuse.h>
|
#include <nvgpu/fuse.h>
|
||||||
#include <nvgpu/bug.h>
|
#include <nvgpu/bug.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/soc.h>
|
#include <nvgpu/soc.h>
|
||||||
#include <nvgpu/io.h>
|
#include <nvgpu/io.h>
|
||||||
@@ -39,7 +40,6 @@
|
|||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
|
|
||||||
#include "gk20a/gr_gk20a.h"
|
#include "gk20a/gr_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/gr_pri_gk20a.h"
|
#include "gk20a/gr_pri_gk20a.h"
|
||||||
|
|
||||||
@@ -2409,7 +2409,7 @@ int gr_gv11b_pre_process_sm_exception(struct gk20a *g,
|
|||||||
"gpc %d tpc %d sm %d",
|
"gpc %d tpc %d sm %d",
|
||||||
gpc, tpc, sm);
|
gpc, tpc, sm);
|
||||||
|
|
||||||
if (gk20a_dbg_gpu_broadcast_stop_trigger(fault_ch)) {
|
if (nvgpu_dbg_gpu_broadcast_stop_trigger(fault_ch)) {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
||||||
"CILP: Broadcasting STOP_TRIGGER from "
|
"CILP: Broadcasting STOP_TRIGGER from "
|
||||||
"gpc %d tpc %d sm %d",
|
"gpc %d tpc %d sm %d",
|
||||||
@@ -2417,7 +2417,7 @@ int gr_gv11b_pre_process_sm_exception(struct gk20a *g,
|
|||||||
g->ops.gr.suspend_all_sms(g,
|
g->ops.gr.suspend_all_sms(g,
|
||||||
global_mask, false);
|
global_mask, false);
|
||||||
|
|
||||||
gk20a_dbg_gpu_clear_broadcast_stop_trigger(fault_ch);
|
nvgpu_dbg_gpu_clear_broadcast_stop_trigger(fault_ch);
|
||||||
} else {
|
} else {
|
||||||
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
|
||||||
"CILP: STOP_TRIGGER from "
|
"CILP: STOP_TRIGGER from "
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
#include "gk20a/fifo_gk20a.h"
|
#include "gk20a/fifo_gk20a.h"
|
||||||
#include "gk20a/fecs_trace_gk20a.h"
|
#include "gk20a/fecs_trace_gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/pmu_gk20a.h"
|
#include "gk20a/pmu_gk20a.h"
|
||||||
@@ -93,6 +92,7 @@
|
|||||||
#include <nvgpu/ctxsw_trace.h>
|
#include <nvgpu/ctxsw_trace.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/bug.h>
|
#include <nvgpu/bug.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
#include <nvgpu/cyclestats_snapshot.h>
|
#include <nvgpu/cyclestats_snapshot.h>
|
||||||
@@ -790,10 +790,8 @@ static const struct gpu_ops gv11b_ops = {
|
|||||||
.show_dump = gk20a_debug_show_dump,
|
.show_dump = gk20a_debug_show_dump,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
.dbg_set_powergate = nvgpu_dbg_set_powergate,
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = dbg_set_powergate,
|
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
nvgpu_check_and_set_global_reservation,
|
nvgpu_check_and_set_global_reservation,
|
||||||
.check_and_set_context_reservation =
|
.check_and_set_context_reservation =
|
||||||
@@ -893,7 +891,6 @@ int gv11b_init_hal(struct gk20a *g)
|
|||||||
gops->mc = gv11b_ops.mc;
|
gops->mc = gv11b_ops.mc;
|
||||||
gops->debug = gv11b_ops.debug;
|
gops->debug = gv11b_ops.debug;
|
||||||
gops->debugger = gv11b_ops.debugger;
|
gops->debugger = gv11b_ops.debugger;
|
||||||
gops->dbg_session_ops = gv11b_ops.dbg_session_ops;
|
|
||||||
gops->perf = gv11b_ops.perf;
|
gops->perf = gv11b_ops.perf;
|
||||||
gops->perfbuf = gv11b_ops.perfbuf;
|
gops->perfbuf = gv11b_ops.perfbuf;
|
||||||
gops->bus = gv11b_ops.bus;
|
gops->bus = gv11b_ops.bus;
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#ifndef DBG_GPU_H
|
#ifndef NVGPU_DEBUGGER_H
|
||||||
#define DBG_GPU_H
|
#define NVGPU_DEBUGGER_H
|
||||||
|
|
||||||
#include <nvgpu/cond.h>
|
#include <nvgpu/cond.h>
|
||||||
#include <nvgpu/lock.h>
|
#include <nvgpu/lock.h>
|
||||||
@@ -32,9 +32,6 @@ struct gk20a;
|
|||||||
struct channel_gk20a;
|
struct channel_gk20a;
|
||||||
struct dbg_session_gk20a;
|
struct dbg_session_gk20a;
|
||||||
|
|
||||||
/* used by the interrupt handler to post events */
|
|
||||||
void gk20a_dbg_gpu_post_events(struct channel_gk20a *fault_ch);
|
|
||||||
|
|
||||||
struct channel_gk20a *
|
struct channel_gk20a *
|
||||||
nvgpu_dbg_gpu_get_session_channel(struct dbg_session_gk20a *dbg_s);
|
nvgpu_dbg_gpu_get_session_channel(struct dbg_session_gk20a *dbg_s);
|
||||||
|
|
||||||
@@ -117,10 +114,13 @@ dbg_profiler_object_data_from_prof_obj_entry(struct nvgpu_list_node *node)
|
|||||||
((uintptr_t)node - offsetof(struct dbg_profiler_object_data, prof_obj_entry));
|
((uintptr_t)node - offsetof(struct dbg_profiler_object_data, prof_obj_entry));
|
||||||
};
|
};
|
||||||
|
|
||||||
bool gk20a_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch);
|
/* used by the interrupt handler to post events */
|
||||||
int gk20a_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch);
|
void nvgpu_dbg_gpu_post_events(struct channel_gk20a *fault_ch);
|
||||||
|
|
||||||
int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate);
|
bool nvgpu_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch);
|
||||||
|
int nvgpu_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch);
|
||||||
|
|
||||||
|
int nvgpu_dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate);
|
||||||
bool nvgpu_check_and_set_global_reservation(
|
bool nvgpu_check_and_set_global_reservation(
|
||||||
struct dbg_session_gk20a *dbg_s,
|
struct dbg_session_gk20a *dbg_s,
|
||||||
struct dbg_profiler_object_data *prof_obj);
|
struct dbg_profiler_object_data *prof_obj);
|
||||||
@@ -142,4 +142,4 @@ u32 nvgpu_set_powergate_locked(struct dbg_session_gk20a *dbg_s,
|
|||||||
/* This mode says that the pms in Mode-E (stream out) are to be context switched. */
|
/* This mode says that the pms in Mode-E (stream out) are to be context switched. */
|
||||||
#define NVGPU_DBG_HWPM_CTXSW_MODE_STREAM_OUT_CTXSW (0x00000002)
|
#define NVGPU_DBG_HWPM_CTXSW_MODE_STREAM_OUT_CTXSW (0x00000002)
|
||||||
|
|
||||||
#endif /* DBG_GPU_GK20A_H */
|
#endif /* NVGPU_DEBUGGER_H */
|
||||||
@@ -626,9 +626,6 @@ struct gpu_ops {
|
|||||||
void (*blcg_xbar_load_gating_prod)(struct gk20a *g, bool prod);
|
void (*blcg_xbar_load_gating_prod)(struct gk20a *g, bool prod);
|
||||||
void (*pg_gr_load_gating_prod)(struct gk20a *g, bool prod);
|
void (*pg_gr_load_gating_prod)(struct gk20a *g, bool prod);
|
||||||
} clock_gating;
|
} clock_gating;
|
||||||
struct {
|
|
||||||
void (*post_events)(struct channel_gk20a *ch);
|
|
||||||
} debugger;
|
|
||||||
struct {
|
struct {
|
||||||
int (*setup_sw)(struct gk20a *g);
|
int (*setup_sw)(struct gk20a *g);
|
||||||
int (*init_fifo_setup_hw)(struct gk20a *g);
|
int (*init_fifo_setup_hw)(struct gk20a *g);
|
||||||
@@ -1195,6 +1192,7 @@ struct gpu_ops {
|
|||||||
struct gk20a_debug_output *o);
|
struct gk20a_debug_output *o);
|
||||||
} debug;
|
} debug;
|
||||||
struct {
|
struct {
|
||||||
|
void (*post_events)(struct channel_gk20a *ch);
|
||||||
int (*dbg_set_powergate)(struct dbg_session_gk20a *dbg_s,
|
int (*dbg_set_powergate)(struct dbg_session_gk20a *dbg_s,
|
||||||
bool disable_powergate);
|
bool disable_powergate);
|
||||||
bool (*check_and_set_global_reservation)(
|
bool (*check_and_set_global_reservation)(
|
||||||
@@ -1206,7 +1204,7 @@ struct gpu_ops {
|
|||||||
void (*release_profiler_reservation)(
|
void (*release_profiler_reservation)(
|
||||||
struct dbg_session_gk20a *dbg_s,
|
struct dbg_session_gk20a *dbg_s,
|
||||||
struct dbg_profiler_object_data *prof_obj);
|
struct dbg_profiler_object_data *prof_obj);
|
||||||
} dbg_session_ops;
|
} debugger;
|
||||||
struct {
|
struct {
|
||||||
void (*enable_membuf)(struct gk20a *g, u32 size,
|
void (*enable_membuf)(struct gk20a *g, u32 size,
|
||||||
u64 buf_addr, struct nvgpu_mem *inst_block);
|
u64 buf_addr, struct nvgpu_mem *inst_block);
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
#include <nvgpu/ctxsw_trace.h>
|
#include <nvgpu/ctxsw_trace.h>
|
||||||
#include <nvgpu/gk20a.h>
|
#include <nvgpu/gk20a.h>
|
||||||
|
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
|
|
||||||
#include "ioctl_channel.h"
|
#include "ioctl_channel.h"
|
||||||
#include "ioctl_ctrl.h"
|
#include "ioctl_ctrl.h"
|
||||||
#include "ioctl_as.h"
|
#include "ioctl_as.h"
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/channel_sync.h>
|
#include <nvgpu/channel_sync.h>
|
||||||
|
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/fence_gk20a.h"
|
#include "gk20a/fence_gk20a.h"
|
||||||
|
|
||||||
#include "platform_gk20a.h"
|
#include "platform_gk20a.h"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <nvgpu/vm.h>
|
#include <nvgpu/vm.h>
|
||||||
#include <nvgpu/atomic.h>
|
#include <nvgpu/atomic.h>
|
||||||
#include <nvgpu/cond.h>
|
#include <nvgpu/cond.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/utils.h>
|
#include <nvgpu/utils.h>
|
||||||
#include <nvgpu/gk20a.h>
|
#include <nvgpu/gk20a.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
@@ -38,7 +39,6 @@
|
|||||||
|
|
||||||
#include "gk20a/gr_gk20a.h"
|
#include "gk20a/gr_gk20a.h"
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
#include "platform_gk20a.h"
|
#include "platform_gk20a.h"
|
||||||
#include "ioctl_dbg.h"
|
#include "ioctl_dbg.h"
|
||||||
@@ -214,7 +214,7 @@ int gk20a_dbg_gpu_dev_release(struct inode *inode, struct file *filp)
|
|||||||
dbg_profiler_object_data, prof_obj_entry) {
|
dbg_profiler_object_data, prof_obj_entry) {
|
||||||
if (prof_obj->session_id == dbg_s->id) {
|
if (prof_obj->session_id == dbg_s->id) {
|
||||||
if (prof_obj->has_reservation)
|
if (prof_obj->has_reservation)
|
||||||
g->ops.dbg_session_ops.
|
g->ops.debugger.
|
||||||
release_profiler_reservation(dbg_s, prof_obj);
|
release_profiler_reservation(dbg_s, prof_obj);
|
||||||
nvgpu_list_del(&prof_obj->prof_obj_entry);
|
nvgpu_list_del(&prof_obj->prof_obj_entry);
|
||||||
nvgpu_kfree(g, prof_obj);
|
nvgpu_kfree(g, prof_obj);
|
||||||
@@ -469,7 +469,7 @@ static int dbg_unbind_single_channel_gk20a(struct dbg_session_gk20a *dbg_s,
|
|||||||
if ((prof_obj->session_id == dbg_s->id) &&
|
if ((prof_obj->session_id == dbg_s->id) &&
|
||||||
(prof_obj->ch->chid == chid)) {
|
(prof_obj->ch->chid == chid)) {
|
||||||
if (prof_obj->has_reservation) {
|
if (prof_obj->has_reservation) {
|
||||||
g->ops.dbg_session_ops.
|
g->ops.debugger.
|
||||||
release_profiler_reservation(dbg_s, prof_obj);
|
release_profiler_reservation(dbg_s, prof_obj);
|
||||||
}
|
}
|
||||||
nvgpu_list_del(&prof_obj->prof_obj_entry);
|
nvgpu_list_del(&prof_obj->prof_obj_entry);
|
||||||
@@ -1189,7 +1189,7 @@ static int nvgpu_ioctl_free_profiler_object(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (prof_obj->has_reservation)
|
if (prof_obj->has_reservation)
|
||||||
g->ops.dbg_session_ops.
|
g->ops.debugger.
|
||||||
release_profiler_reservation(dbg_s, prof_obj);
|
release_profiler_reservation(dbg_s, prof_obj);
|
||||||
nvgpu_list_del(&prof_obj->prof_obj_entry);
|
nvgpu_list_del(&prof_obj->prof_obj_entry);
|
||||||
nvgpu_kfree(g, prof_obj);
|
nvgpu_kfree(g, prof_obj);
|
||||||
@@ -1645,7 +1645,7 @@ static int nvgpu_profiler_reserve_release(struct dbg_session_gk20a *dbg_s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prof_obj->has_reservation)
|
if (prof_obj->has_reservation)
|
||||||
g->ops.dbg_session_ops.release_profiler_reservation(dbg_s, prof_obj);
|
g->ops.debugger.release_profiler_reservation(dbg_s, prof_obj);
|
||||||
else {
|
else {
|
||||||
nvgpu_err(g, "No reservation found");
|
nvgpu_err(g, "No reservation found");
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
@@ -1691,7 +1691,7 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s,
|
|||||||
/* Global reservations are only allowed if there are no other
|
/* Global reservations are only allowed if there are no other
|
||||||
* global or per-context reservations currently held
|
* global or per-context reservations currently held
|
||||||
*/
|
*/
|
||||||
if (!g->ops.dbg_session_ops.check_and_set_global_reservation(
|
if (!g->ops.debugger.check_and_set_global_reservation(
|
||||||
dbg_s, my_prof_obj)) {
|
dbg_s, my_prof_obj)) {
|
||||||
nvgpu_err(g,
|
nvgpu_err(g,
|
||||||
"global reserve: have existing reservation");
|
"global reserve: have existing reservation");
|
||||||
@@ -1721,7 +1721,7 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g->ops.dbg_session_ops.check_and_set_context_reservation(
|
if (!g->ops.debugger.check_and_set_context_reservation(
|
||||||
dbg_s, my_prof_obj)) {
|
dbg_s, my_prof_obj)) {
|
||||||
/* Another guest OS has the global reservation */
|
/* Another guest OS has the global reservation */
|
||||||
nvgpu_err(g,
|
nvgpu_err(g,
|
||||||
@@ -1745,7 +1745,7 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g->ops.dbg_session_ops.check_and_set_context_reservation(
|
if (!g->ops.debugger.check_and_set_context_reservation(
|
||||||
dbg_s, my_prof_obj)) {
|
dbg_s, my_prof_obj)) {
|
||||||
/* Another guest OS has the global reservation */
|
/* Another guest OS has the global reservation */
|
||||||
nvgpu_err(g,
|
nvgpu_err(g,
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#include <nvgpu/ecc.h>
|
#include <nvgpu/ecc.h>
|
||||||
#include <nvgpu/ltc.h>
|
#include <nvgpu/ltc.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
|
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
|
|
||||||
void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s)
|
void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,7 +58,6 @@
|
|||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gk20a/fifo_gk20a.h"
|
#include "gk20a/fifo_gk20a.h"
|
||||||
#include "gk20a/fecs_trace_gk20a.h"
|
#include "gk20a/fecs_trace_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
@@ -126,6 +125,7 @@
|
|||||||
#include <nvgpu/ctxsw_trace.h>
|
#include <nvgpu/ctxsw_trace.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/clk_arb.h>
|
#include <nvgpu/clk_arb.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
#include <nvgpu/perfbuf.h>
|
#include <nvgpu/perfbuf.h>
|
||||||
#include <nvgpu/cyclestats_snapshot.h>
|
#include <nvgpu/cyclestats_snapshot.h>
|
||||||
@@ -826,10 +826,8 @@ static const struct gpu_ops tu104_ops = {
|
|||||||
.show_dump = gk20a_debug_show_dump,
|
.show_dump = gk20a_debug_show_dump,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
.dbg_set_powergate = nvgpu_dbg_set_powergate,
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = dbg_set_powergate,
|
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
nvgpu_check_and_set_global_reservation,
|
nvgpu_check_and_set_global_reservation,
|
||||||
.check_and_set_context_reservation =
|
.check_and_set_context_reservation =
|
||||||
@@ -979,7 +977,6 @@ int tu104_init_hal(struct gk20a *g)
|
|||||||
gops->mc = tu104_ops.mc;
|
gops->mc = tu104_ops.mc;
|
||||||
gops->debug = tu104_ops.debug;
|
gops->debug = tu104_ops.debug;
|
||||||
gops->debugger = tu104_ops.debugger;
|
gops->debugger = tu104_ops.debugger;
|
||||||
gops->dbg_session_ops = tu104_ops.dbg_session_ops;
|
|
||||||
gops->perf = tu104_ops.perf;
|
gops->perf = tu104_ops.perf;
|
||||||
gops->perfbuf = tu104_ops.perfbuf;
|
gops->perfbuf = tu104_ops.perfbuf;
|
||||||
gops->bus = tu104_ops.bus;
|
gops->bus = tu104_ops.bus;
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
#include <nvgpu/vgpu/vgpu_ivc.h>
|
#include <nvgpu/vgpu/vgpu_ivc.h>
|
||||||
#include <nvgpu/vgpu/tegra_vgpu.h>
|
#include <nvgpu/vgpu/tegra_vgpu.h>
|
||||||
#include <nvgpu/vgpu/vgpu.h>
|
#include <nvgpu/vgpu/vgpu.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/bug.h>
|
#include <nvgpu/bug.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/regops_gk20a.h"
|
#include "gk20a/regops_gk20a.h"
|
||||||
#include "dbg_vgpu.h"
|
#include "dbg_vgpu.h"
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
#include "vgpu_fuse_gp10b.h"
|
#include "vgpu_fuse_gp10b.h"
|
||||||
|
|
||||||
#include "gk20a/flcn_gk20a.h"
|
#include "gk20a/flcn_gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/pmu_gk20a.h"
|
#include "gk20a/pmu_gk20a.h"
|
||||||
|
|
||||||
#include "gp10b/mm_gp10b.h"
|
#include "gp10b/mm_gp10b.h"
|
||||||
@@ -67,6 +66,7 @@
|
|||||||
#include "gm20b/pmu_gm20b.h"
|
#include "gm20b/pmu_gm20b.h"
|
||||||
#include "gm20b/mm_gm20b.h"
|
#include "gm20b/mm_gm20b.h"
|
||||||
|
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
#include <nvgpu/vgpu/vgpu.h>
|
#include <nvgpu/vgpu/vgpu.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
@@ -503,9 +503,7 @@ static const struct gpu_ops vgpu_gp10b_ops = {
|
|||||||
.show_dump = NULL,
|
.show_dump = NULL,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = vgpu_dbg_set_powergate,
|
.dbg_set_powergate = vgpu_dbg_set_powergate,
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
vgpu_check_and_set_global_reservation,
|
vgpu_check_and_set_global_reservation,
|
||||||
@@ -596,7 +594,6 @@ int vgpu_gp10b_init_hal(struct gk20a *g)
|
|||||||
gops->mc = vgpu_gp10b_ops.mc;
|
gops->mc = vgpu_gp10b_ops.mc;
|
||||||
gops->debug = vgpu_gp10b_ops.debug;
|
gops->debug = vgpu_gp10b_ops.debug;
|
||||||
gops->debugger = vgpu_gp10b_ops.debugger;
|
gops->debugger = vgpu_gp10b_ops.debugger;
|
||||||
gops->dbg_session_ops = vgpu_gp10b_ops.dbg_session_ops;
|
|
||||||
gops->perfbuf = vgpu_gp10b_ops.perfbuf;
|
gops->perfbuf = vgpu_gp10b_ops.perfbuf;
|
||||||
gops->bus = vgpu_gp10b_ops.bus;
|
gops->bus = vgpu_gp10b_ops.bus;
|
||||||
gops->ptimer = vgpu_gp10b_ops.ptimer;
|
gops->ptimer = vgpu_gp10b_ops.ptimer;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <nvgpu/dma.h>
|
#include <nvgpu/dma.h>
|
||||||
#include <nvgpu/error_notifier.h>
|
#include <nvgpu/error_notifier.h>
|
||||||
#include <nvgpu/dma.h>
|
#include <nvgpu/dma.h>
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/vgpu/vgpu_ivc.h>
|
#include <nvgpu/vgpu/vgpu_ivc.h>
|
||||||
#include <nvgpu/vgpu/vgpu.h>
|
#include <nvgpu/vgpu/vgpu.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
@@ -34,7 +35,6 @@
|
|||||||
|
|
||||||
#include "gr_vgpu.h"
|
#include "gr_vgpu.h"
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include "gk20a/fecs_trace_gk20a.h"
|
#include "gk20a/fecs_trace_gk20a.h"
|
||||||
|
|
||||||
#include <nvgpu/hw/gk20a/hw_gr_gk20a.h>
|
#include <nvgpu/hw/gk20a/hw_gr_gk20a.h>
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
#include "vgpu/gp10b/vgpu_gr_gp10b.h"
|
#include "vgpu/gp10b/vgpu_gr_gp10b.h"
|
||||||
|
|
||||||
#include <gk20a/flcn_gk20a.h>
|
#include <gk20a/flcn_gk20a.h>
|
||||||
#include "gk20a/dbg_gpu_gk20a.h"
|
|
||||||
#include <gk20a/pmu_gk20a.h>
|
#include <gk20a/pmu_gk20a.h>
|
||||||
|
|
||||||
#include <gm20b/gr_gm20b.h>
|
#include <gm20b/gr_gm20b.h>
|
||||||
@@ -84,6 +83,7 @@
|
|||||||
|
|
||||||
#include <gv100/gr_gv100.h>
|
#include <gv100/gr_gv100.h>
|
||||||
|
|
||||||
|
#include <nvgpu/debugger.h>
|
||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
#include <nvgpu/channel.h>
|
#include <nvgpu/channel.h>
|
||||||
|
|
||||||
@@ -575,9 +575,7 @@ static const struct gpu_ops vgpu_gv11b_ops = {
|
|||||||
.show_dump = NULL,
|
.show_dump = NULL,
|
||||||
},
|
},
|
||||||
.debugger = {
|
.debugger = {
|
||||||
.post_events = gk20a_dbg_gpu_post_events,
|
.post_events = nvgpu_dbg_gpu_post_events,
|
||||||
},
|
|
||||||
.dbg_session_ops = {
|
|
||||||
.dbg_set_powergate = vgpu_dbg_set_powergate,
|
.dbg_set_powergate = vgpu_dbg_set_powergate,
|
||||||
.check_and_set_global_reservation =
|
.check_and_set_global_reservation =
|
||||||
vgpu_check_and_set_global_reservation,
|
vgpu_check_and_set_global_reservation,
|
||||||
@@ -663,7 +661,6 @@ int vgpu_gv11b_init_hal(struct gk20a *g)
|
|||||||
gops->mc = vgpu_gv11b_ops.mc;
|
gops->mc = vgpu_gv11b_ops.mc;
|
||||||
gops->debug = vgpu_gv11b_ops.debug;
|
gops->debug = vgpu_gv11b_ops.debug;
|
||||||
gops->debugger = vgpu_gv11b_ops.debugger;
|
gops->debugger = vgpu_gv11b_ops.debugger;
|
||||||
gops->dbg_session_ops = vgpu_gv11b_ops.dbg_session_ops;
|
|
||||||
gops->perfbuf = vgpu_gv11b_ops.perfbuf;
|
gops->perfbuf = vgpu_gv11b_ops.perfbuf;
|
||||||
gops->bus = vgpu_gv11b_ops.bus;
|
gops->bus = vgpu_gv11b_ops.bus;
|
||||||
gops->ptimer = vgpu_gv11b_ops.ptimer;
|
gops->ptimer = vgpu_gv11b_ops.ptimer;
|
||||||
|
|||||||
Reference in New Issue
Block a user