diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-06 16:02:43 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-10 15:24:22 -0400 |
commit | 3a1104c3699b05201abf48ed9283bb8ccbe42732 (patch) | |
tree | a2e9445f730e9de76cbb7e68d3410a97ded588fa /drivers/gpu | |
parent | 54eb74539342ce0fa6961e46f2ce22b68ad2fb21 (diff) |
gpu: nvgpu: therm: Use new error macros
gk20a_err() and gk20a_warn() require a struct device pointer,
which is not portable across operating systems. The new nvgpu_err()
and nvgpu_warn() macros take struct gk20a pointer. Convert code
to use the more portable macros.
JIRA NVGPU-16
Change-Id: I50bab058076c6896acfc6fa82f78f52a949dd3cf
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1457354
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/perf/perf.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/perf/vfe_equ.c | 20 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/perf/vfe_var.c | 21 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrm.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmchannel.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmdev.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmpmu.c | 20 |
7 files changed, 41 insertions, 50 deletions
diff --git a/drivers/gpu/nvgpu/perf/perf.c b/drivers/gpu/nvgpu/perf/perf.c index 58efdd6c..3c27c6fc 100644 --- a/drivers/gpu/nvgpu/perf/perf.c +++ b/drivers/gpu/nvgpu/perf/perf.c | |||
@@ -30,8 +30,7 @@ static void perfrpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg, | |||
30 | gk20a_dbg_info(""); | 30 | gk20a_dbg_info(""); |
31 | 31 | ||
32 | if (msg->msg.perf.msg_type != NV_PMU_PERF_MSG_ID_RPC) { | 32 | if (msg->msg.perf.msg_type != NV_PMU_PERF_MSG_ID_RPC) { |
33 | gk20a_err(dev_from_gk20a(g), | 33 | nvgpu_err(g, "unsupported msg for VFE LOAD RPC %x", |
34 | "unsupported msg for VFE LOAD RPC %x", | ||
35 | msg->msg.perf.msg_type); | 34 | msg->msg.perf.msg_type); |
36 | return; | 35 | return; |
37 | } | 36 | } |
@@ -97,8 +96,7 @@ u32 perf_pmu_vfe_load(struct gk20a *g) | |||
97 | &seqdesc, ~0); | 96 | &seqdesc, ~0); |
98 | 97 | ||
99 | if (status) { | 98 | if (status) { |
100 | gk20a_err(dev_from_gk20a(g), | 99 | nvgpu_err(g, "unable to post perf RPC cmd %x", |
101 | "unable to post perf RPC cmd %x", | ||
102 | cmd.cmd.perf.cmd_type); | 100 | cmd.cmd.perf.cmd_type); |
103 | goto done; | 101 | goto done; |
104 | } | 102 | } |
@@ -109,7 +107,7 @@ u32 perf_pmu_vfe_load(struct gk20a *g) | |||
109 | 107 | ||
110 | if (handler.success == 0) { | 108 | if (handler.success == 0) { |
111 | status = -EINVAL; | 109 | status = -EINVAL; |
112 | gk20a_err(dev_from_gk20a(g), "rpc call to load VFE failed"); | 110 | nvgpu_err(g, "rpc call to load VFE failed"); |
113 | } | 111 | } |
114 | done: | 112 | done: |
115 | return status; | 113 | return status; |
diff --git a/drivers/gpu/nvgpu/perf/vfe_equ.c b/drivers/gpu/nvgpu/perf/vfe_equ.c index f8a79a22..bb443265 100644 --- a/drivers/gpu/nvgpu/perf/vfe_equ.c +++ b/drivers/gpu/nvgpu/perf/vfe_equ.c | |||
@@ -34,8 +34,7 @@ static u32 _vfe_equs_pmudatainit(struct gk20a *g, | |||
34 | 34 | ||
35 | status = boardobjgrp_pmudatainit_e255(g, pboardobjgrp, pboardobjgrppmu); | 35 | status = boardobjgrp_pmudatainit_e255(g, pboardobjgrp, pboardobjgrppmu); |
36 | if (status) { | 36 | if (status) { |
37 | gk20a_err(dev_from_gk20a(g), | 37 | nvgpu_err(g, "error updating pmu boardobjgrp for vfe equ 0x%x", |
38 | "error updating pmu boardobjgrp for vfe equ 0x%x", | ||
39 | status); | 38 | status); |
40 | goto done; | 39 | goto done; |
41 | } | 40 | } |
@@ -74,7 +73,7 @@ u32 vfe_equ_sw_setup(struct gk20a *g) | |||
74 | 73 | ||
75 | status = boardobjgrpconstruct_e255(&g->perf_pmu.vfe_equobjs.super); | 74 | status = boardobjgrpconstruct_e255(&g->perf_pmu.vfe_equobjs.super); |
76 | if (status) { | 75 | if (status) { |
77 | gk20a_err(dev_from_gk20a(g), | 76 | nvgpu_err(g, |
78 | "error creating boardobjgrp for clk domain, status - 0x%x", | 77 | "error creating boardobjgrp for clk domain, status - 0x%x", |
79 | status); | 78 | status); |
80 | goto done; | 79 | goto done; |
@@ -88,7 +87,7 @@ u32 vfe_equ_sw_setup(struct gk20a *g) | |||
88 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 87 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
89 | perf, PERF, vfe_equ, VFE_EQU); | 88 | perf, PERF, vfe_equ, VFE_EQU); |
90 | if (status) { | 89 | if (status) { |
91 | gk20a_err(dev_from_gk20a(g), | 90 | nvgpu_err(g, |
92 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 91 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
93 | status); | 92 | status); |
94 | goto done; | 93 | goto done; |
@@ -223,8 +222,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g, | |||
223 | break; | 222 | break; |
224 | 223 | ||
225 | default: | 224 | default: |
226 | gk20a_err(dev_from_gk20a(g), | 225 | nvgpu_err(g, "unrecognized output id @vfeequ index %d", |
227 | "unrecognized output id @vfeequ index %d", | ||
228 | index); | 226 | index); |
229 | goto done; | 227 | goto done; |
230 | } | 228 | } |
@@ -278,7 +276,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g, | |||
278 | CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER; | 276 | CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER; |
279 | break; | 277 | break; |
280 | default: | 278 | default: |
281 | gk20a_err(dev_from_gk20a(g), | 279 | nvgpu_err(g, |
282 | "invalid vfe compare index %x type %x ", | 280 | "invalid vfe compare index %x type %x ", |
283 | index, cmp_func); | 281 | index, cmp_func); |
284 | status = -EINVAL; | 282 | status = -EINVAL; |
@@ -295,8 +293,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g, | |||
295 | } | 293 | } |
296 | default: | 294 | default: |
297 | status = -EINVAL; | 295 | status = -EINVAL; |
298 | gk20a_err(dev_from_gk20a(g), | 296 | nvgpu_err(g, "Invalid equ[%d].type = 0x%x.", |
299 | "Invalid equ[%d].type = 0x%x.", | ||
300 | index, (u8)equ.type); | 297 | index, (u8)equ.type); |
301 | goto done; | 298 | goto done; |
302 | } | 299 | } |
@@ -305,7 +302,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g, | |||
305 | pequ = construct_vfe_equ(g, (void *)&equ_data); | 302 | pequ = construct_vfe_equ(g, (void *)&equ_data); |
306 | 303 | ||
307 | if (pequ == NULL) { | 304 | if (pequ == NULL) { |
308 | gk20a_err(dev_from_gk20a(g), | 305 | nvgpu_err(g, |
309 | "error constructing vfe_equ boardobj %d", index); | 306 | "error constructing vfe_equ boardobj %d", index); |
310 | status = -EINVAL; | 307 | status = -EINVAL; |
311 | goto done; | 308 | goto done; |
@@ -314,8 +311,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g, | |||
314 | status = boardobjgrp_objinsert(&pvfeequobjs->super.super, | 311 | status = boardobjgrp_objinsert(&pvfeequobjs->super.super, |
315 | (struct boardobj *)pequ, index); | 312 | (struct boardobj *)pequ, index); |
316 | if (status) { | 313 | if (status) { |
317 | gk20a_err(dev_from_gk20a(g), | 314 | nvgpu_err(g, "error adding vfe_equ boardobj %d", index); |
318 | "error adding vfe_equ boardobj %d", index); | ||
319 | status = -EINVAL; | 315 | status = -EINVAL; |
320 | goto done; | 316 | goto done; |
321 | } | 317 | } |
diff --git a/drivers/gpu/nvgpu/perf/vfe_var.c b/drivers/gpu/nvgpu/perf/vfe_var.c index 7170f502..996929c2 100644 --- a/drivers/gpu/nvgpu/perf/vfe_var.c +++ b/drivers/gpu/nvgpu/perf/vfe_var.c | |||
@@ -40,7 +40,7 @@ static u32 _vfe_vars_pmudatainit(struct gk20a *g, | |||
40 | 40 | ||
41 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); | 41 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); |
42 | if (status) { | 42 | if (status) { |
43 | gk20a_err(dev_from_gk20a(g), | 43 | nvgpu_err(g, |
44 | "error updating pmu boardobjgrp for vfe var 0x%x", | 44 | "error updating pmu boardobjgrp for vfe var 0x%x", |
45 | status); | 45 | status); |
46 | goto done; | 46 | goto done; |
@@ -100,7 +100,7 @@ u32 vfe_var_sw_setup(struct gk20a *g) | |||
100 | 100 | ||
101 | status = boardobjgrpconstruct_e32(&g->perf_pmu.vfe_varobjs.super); | 101 | status = boardobjgrpconstruct_e32(&g->perf_pmu.vfe_varobjs.super); |
102 | if (status) { | 102 | if (status) { |
103 | gk20a_err(dev_from_gk20a(g), | 103 | nvgpu_err(g, |
104 | "error creating boardobjgrp for clk domain, status - 0x%x", | 104 | "error creating boardobjgrp for clk domain, status - 0x%x", |
105 | status); | 105 | status); |
106 | goto done; | 106 | goto done; |
@@ -114,7 +114,7 @@ u32 vfe_var_sw_setup(struct gk20a *g) | |||
114 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 114 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
115 | perf, PERF, vfe_var, VFE_VAR); | 115 | perf, PERF, vfe_var, VFE_VAR); |
116 | if (status) { | 116 | if (status) { |
117 | gk20a_err(dev_from_gk20a(g), | 117 | nvgpu_err(g, |
118 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 118 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
119 | status); | 119 | status); |
120 | goto done; | 120 | goto done; |
@@ -132,7 +132,7 @@ u32 vfe_var_sw_setup(struct gk20a *g) | |||
132 | &g->perf_pmu.vfe_varobjs.super.super, | 132 | &g->perf_pmu.vfe_varobjs.super.super, |
133 | perf, PERF, vfe_var, VFE_VAR); | 133 | perf, PERF, vfe_var, VFE_VAR); |
134 | if (status) { | 134 | if (status) { |
135 | gk20a_err(dev_from_gk20a(g), | 135 | nvgpu_err(g, |
136 | "error constructing PMU_BOARDOBJ_CMD_GRP_GET_STATUS interface - 0x%x", | 136 | "error constructing PMU_BOARDOBJ_CMD_GRP_GET_STATUS interface - 0x%x", |
137 | status); | 137 | status); |
138 | goto done; | 138 | goto done; |
@@ -196,14 +196,14 @@ u32 dev_init_get_vfield_info(struct gk20a *g, | |||
196 | memcpy(&vregheader, vfieldregtableptr, VFIELD_REG_HEADER_SIZE); | 196 | memcpy(&vregheader, vfieldregtableptr, VFIELD_REG_HEADER_SIZE); |
197 | 197 | ||
198 | if (vregheader.version != VBIOS_VFIELD_REG_TABLE_VERSION_1_0) { | 198 | if (vregheader.version != VBIOS_VFIELD_REG_TABLE_VERSION_1_0) { |
199 | gk20a_err(dev_from_gk20a(g), "invalid vreg header version"); | 199 | nvgpu_err(g, "invalid vreg header version"); |
200 | goto done; | 200 | goto done; |
201 | } | 201 | } |
202 | 202 | ||
203 | memcpy(&vheader, vfieldtableptr, VFIELD_HEADER_SIZE); | 203 | memcpy(&vheader, vfieldtableptr, VFIELD_HEADER_SIZE); |
204 | 204 | ||
205 | if (vregheader.version != VBIOS_VFIELD_TABLE_VERSION_1_0) { | 205 | if (vregheader.version != VBIOS_VFIELD_TABLE_VERSION_1_0) { |
206 | gk20a_err(dev_from_gk20a(g), "invalid vfield header version"); | 206 | nvgpu_err(g, "invalid vfield header version"); |
207 | goto done; | 207 | goto done; |
208 | } | 208 | } |
209 | 209 | ||
@@ -660,13 +660,13 @@ static u32 vfe_var_construct_single_sensed_fuse(struct gk20a *g, | |||
660 | dev_init_get_vfield_info(g, pvfevar); | 660 | dev_init_get_vfield_info(g, pvfevar); |
661 | /*check whether fuse segment got initialized*/ | 661 | /*check whether fuse segment got initialized*/ |
662 | if (pvfevar->vfield_info.fuse.segment_count == 0) { | 662 | if (pvfevar->vfield_info.fuse.segment_count == 0) { |
663 | gk20a_err(dev_from_gk20a(g), "unable to get fuse reg info %x", | 663 | nvgpu_err(g, "unable to get fuse reg info %x", |
664 | pvfevar->vfield_info.v_field_id); | 664 | pvfevar->vfield_info.v_field_id); |
665 | status = -EINVAL; | 665 | status = -EINVAL; |
666 | goto exit; | 666 | goto exit; |
667 | } | 667 | } |
668 | if (pvfevar->vfield_ver_info.fuse.segment_count == 0) { | 668 | if (pvfevar->vfield_ver_info.fuse.segment_count == 0) { |
669 | gk20a_err(dev_from_gk20a(g), "unable to get fuse reg info %x", | 669 | nvgpu_err(g, "unable to get fuse reg info %x", |
670 | pvfevar->vfield_ver_info.v_field_id_ver); | 670 | pvfevar->vfield_ver_info.v_field_id_ver); |
671 | status = -EINVAL; | 671 | status = -EINVAL; |
672 | goto exit; | 672 | goto exit; |
@@ -997,7 +997,7 @@ static u32 devinit_get_vfe_var_table(struct gk20a *g, | |||
997 | 997 | ||
998 | pvar = construct_vfe_var(g, &var_data); | 998 | pvar = construct_vfe_var(g, &var_data); |
999 | if (pvar == NULL) { | 999 | if (pvar == NULL) { |
1000 | gk20a_err(dev_from_gk20a(g), | 1000 | nvgpu_err(g, |
1001 | "error constructing vfe_var boardobj %d", | 1001 | "error constructing vfe_var boardobj %d", |
1002 | index); | 1002 | index); |
1003 | status = -EINVAL; | 1003 | status = -EINVAL; |
@@ -1007,8 +1007,7 @@ static u32 devinit_get_vfe_var_table(struct gk20a *g, | |||
1007 | status = boardobjgrp_objinsert(&pvfevarobjs->super.super, | 1007 | status = boardobjgrp_objinsert(&pvfevarobjs->super.super, |
1008 | (struct boardobj *)pvar, index); | 1008 | (struct boardobj *)pvar, index); |
1009 | if (status) { | 1009 | if (status) { |
1010 | gk20a_err(dev_from_gk20a(g), | 1010 | nvgpu_err(g, "error adding vfe_var boardobj %d", index); |
1011 | "error adding vfe_var boardobj %d", index); | ||
1012 | status = -EINVAL; | 1011 | status = -EINVAL; |
1013 | goto done; | 1012 | goto done; |
1014 | } | 1013 | } |
diff --git a/drivers/gpu/nvgpu/therm/thrm.c b/drivers/gpu/nvgpu/therm/thrm.c index 731cf89e..863574b6 100644 --- a/drivers/gpu/nvgpu/therm/thrm.c +++ b/drivers/gpu/nvgpu/therm/thrm.c | |||
@@ -21,7 +21,7 @@ u32 therm_domain_sw_setup(struct gk20a *g) | |||
21 | 21 | ||
22 | status = therm_device_sw_setup(g); | 22 | status = therm_device_sw_setup(g); |
23 | if (status) { | 23 | if (status) { |
24 | gk20a_err(dev_from_gk20a(g), | 24 | nvgpu_err(g, |
25 | "error creating boardobjgrp for therm devices, status - 0x%x", | 25 | "error creating boardobjgrp for therm devices, status - 0x%x", |
26 | status); | 26 | status); |
27 | goto exit; | 27 | goto exit; |
@@ -29,7 +29,7 @@ u32 therm_domain_sw_setup(struct gk20a *g) | |||
29 | 29 | ||
30 | status = therm_channel_sw_setup(g); | 30 | status = therm_channel_sw_setup(g); |
31 | if (status) { | 31 | if (status) { |
32 | gk20a_err(dev_from_gk20a(g), | 32 | nvgpu_err(g, |
33 | "error creating boardobjgrp for therm channel, status - 0x%x", | 33 | "error creating boardobjgrp for therm channel, status - 0x%x", |
34 | status); | 34 | status); |
35 | goto exit; | 35 | goto exit; |
diff --git a/drivers/gpu/nvgpu/therm/thrmchannel.c b/drivers/gpu/nvgpu/therm/thrmchannel.c index a09a4599..556bad86 100644 --- a/drivers/gpu/nvgpu/therm/thrmchannel.c +++ b/drivers/gpu/nvgpu/therm/thrmchannel.c | |||
@@ -32,7 +32,7 @@ static u32 _therm_channel_pmudatainit_device(struct gk20a *g, | |||
32 | 32 | ||
33 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); | 33 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); |
34 | if (status) { | 34 | if (status) { |
35 | gk20a_err(dev_from_gk20a(g), | 35 | nvgpu_err(g, |
36 | "error updating pmu boardobjgrp for therm channel 0x%x", | 36 | "error updating pmu boardobjgrp for therm channel 0x%x", |
37 | status); | 37 | status); |
38 | status = -ENOMEM; | 38 | status = -ENOMEM; |
@@ -177,7 +177,7 @@ static u32 devinit_get_therm_channel_table(struct gk20a *g, | |||
177 | therm_channel_size, therm_channel_data.boardobj.type); | 177 | therm_channel_size, therm_channel_data.boardobj.type); |
178 | 178 | ||
179 | if (!boardobj) { | 179 | if (!boardobj) { |
180 | gk20a_err(dev_from_gk20a(g), | 180 | nvgpu_err(g, |
181 | "unable to create thermal device for %d type %d", | 181 | "unable to create thermal device for %d type %d", |
182 | index, therm_channel_data.boardobj.type); | 182 | index, therm_channel_data.boardobj.type); |
183 | status = -EINVAL; | 183 | status = -EINVAL; |
@@ -188,7 +188,7 @@ static u32 devinit_get_therm_channel_table(struct gk20a *g, | |||
188 | boardobj, obj_index); | 188 | boardobj, obj_index); |
189 | 189 | ||
190 | if (status) { | 190 | if (status) { |
191 | gk20a_err(dev_from_gk20a(g), | 191 | nvgpu_err(g, |
192 | "unable to insert thermal device boardobj for %d", index); | 192 | "unable to insert thermal device boardobj for %d", index); |
193 | status = -EINVAL; | 193 | status = -EINVAL; |
194 | goto done; | 194 | goto done; |
@@ -211,7 +211,7 @@ u32 therm_channel_sw_setup(struct gk20a *g) | |||
211 | /* Construct the Super Class and override the Interfaces */ | 211 | /* Construct the Super Class and override the Interfaces */ |
212 | status = boardobjgrpconstruct_e32(&g->therm_pmu.therm_channelobjs.super); | 212 | status = boardobjgrpconstruct_e32(&g->therm_pmu.therm_channelobjs.super); |
213 | if (status) { | 213 | if (status) { |
214 | gk20a_err(dev_from_gk20a(g), | 214 | nvgpu_err(g, |
215 | "error creating boardobjgrp for therm devices, status - 0x%x", | 215 | "error creating boardobjgrp for therm devices, status - 0x%x", |
216 | status); | 216 | status); |
217 | goto done; | 217 | goto done; |
@@ -232,7 +232,7 @@ u32 therm_channel_sw_setup(struct gk20a *g) | |||
232 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 232 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
233 | therm, THERM, therm_channel, THERM_CHANNEL); | 233 | therm, THERM, therm_channel, THERM_CHANNEL); |
234 | if (status) { | 234 | if (status) { |
235 | gk20a_err(dev_from_gk20a(g), | 235 | nvgpu_err(g, |
236 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 236 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
237 | status); | 237 | status); |
238 | goto done; | 238 | goto done; |
diff --git a/drivers/gpu/nvgpu/therm/thrmdev.c b/drivers/gpu/nvgpu/therm/thrmdev.c index 199343e0..4772b628 100644 --- a/drivers/gpu/nvgpu/therm/thrmdev.c +++ b/drivers/gpu/nvgpu/therm/thrmdev.c | |||
@@ -124,7 +124,7 @@ static u32 devinit_get_therm_device_table(struct gk20a *g, | |||
124 | therm_device_size, therm_device_data.boardobj.type); | 124 | therm_device_size, therm_device_data.boardobj.type); |
125 | 125 | ||
126 | if (!boardobj) { | 126 | if (!boardobj) { |
127 | gk20a_err(dev_from_gk20a(g), | 127 | nvgpu_err(g, |
128 | "unable to create thermal device for %d type %d", | 128 | "unable to create thermal device for %d type %d", |
129 | index, therm_device_data.boardobj.type); | 129 | index, therm_device_data.boardobj.type); |
130 | status = -EINVAL; | 130 | status = -EINVAL; |
@@ -135,7 +135,7 @@ static u32 devinit_get_therm_device_table(struct gk20a *g, | |||
135 | boardobj, obj_index); | 135 | boardobj, obj_index); |
136 | 136 | ||
137 | if (status) { | 137 | if (status) { |
138 | gk20a_err(dev_from_gk20a(g), | 138 | nvgpu_err(g, |
139 | "unable to insert thermal device boardobj for %d", index); | 139 | "unable to insert thermal device boardobj for %d", index); |
140 | status = -EINVAL; | 140 | status = -EINVAL; |
141 | goto done; | 141 | goto done; |
@@ -158,7 +158,7 @@ u32 therm_device_sw_setup(struct gk20a *g) | |||
158 | /* Construct the Super Class and override the Interfaces */ | 158 | /* Construct the Super Class and override the Interfaces */ |
159 | status = boardobjgrpconstruct_e32(&g->therm_pmu.therm_deviceobjs.super); | 159 | status = boardobjgrpconstruct_e32(&g->therm_pmu.therm_deviceobjs.super); |
160 | if (status) { | 160 | if (status) { |
161 | gk20a_err(dev_from_gk20a(g), | 161 | nvgpu_err(g, |
162 | "error creating boardobjgrp for therm devices, status - 0x%x", | 162 | "error creating boardobjgrp for therm devices, status - 0x%x", |
163 | status); | 163 | status); |
164 | goto done; | 164 | goto done; |
@@ -179,7 +179,7 @@ u32 therm_device_sw_setup(struct gk20a *g) | |||
179 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 179 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
180 | therm, THERM, therm_device, THERM_DEVICE); | 180 | therm, THERM, therm_device, THERM_DEVICE); |
181 | if (status) { | 181 | if (status) { |
182 | gk20a_err(dev_from_gk20a(g), | 182 | nvgpu_err(g, |
183 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 183 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
184 | status); | 184 | status); |
185 | goto done; | 185 | goto done; |
diff --git a/drivers/gpu/nvgpu/therm/thrmpmu.c b/drivers/gpu/nvgpu/therm/thrmpmu.c index 50df55c0..3d80eff3 100644 --- a/drivers/gpu/nvgpu/therm/thrmpmu.c +++ b/drivers/gpu/nvgpu/therm/thrmpmu.c | |||
@@ -29,15 +29,13 @@ static void therm_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg, | |||
29 | (struct therm_pmucmdhandler_params *)param; | 29 | (struct therm_pmucmdhandler_params *)param; |
30 | 30 | ||
31 | if (msg->msg.therm.msg_type != NV_PMU_THERM_MSG_ID_RPC) { | 31 | if (msg->msg.therm.msg_type != NV_PMU_THERM_MSG_ID_RPC) { |
32 | gk20a_err(dev_from_gk20a(g), | 32 | nvgpu_err(g, "unknow msg %x", |
33 | "unknow msg %x", | ||
34 | msg->msg.pmgr.msg_type); | 33 | msg->msg.pmgr.msg_type); |
35 | return; | 34 | return; |
36 | } | 35 | } |
37 | 36 | ||
38 | if (!phandlerparams->prpccall->b_supported) | 37 | if (!phandlerparams->prpccall->b_supported) |
39 | gk20a_err(dev_from_gk20a(g), | 38 | nvgpu_err(g, "RPC msg %x failed", |
40 | "RPC msg %x failed", | ||
41 | msg->msg.pmgr.msg_type); | 39 | msg->msg.pmgr.msg_type); |
42 | else | 40 | else |
43 | phandlerparams->success = 1; | 41 | phandlerparams->success = 1; |
@@ -52,7 +50,7 @@ u32 therm_send_pmgr_tables_to_pmu(struct gk20a *g) | |||
52 | pboardobjgrp = &g->therm_pmu.therm_deviceobjs.super.super; | 50 | pboardobjgrp = &g->therm_pmu.therm_deviceobjs.super.super; |
53 | status = pboardobjgrp->pmuinithandle(g, pboardobjgrp); | 51 | status = pboardobjgrp->pmuinithandle(g, pboardobjgrp); |
54 | if (status) { | 52 | if (status) { |
55 | gk20a_err(dev_from_gk20a(g), | 53 | nvgpu_err(g, |
56 | "therm_send_pmgr_tables_to_pmu - therm_device failed %x", | 54 | "therm_send_pmgr_tables_to_pmu - therm_device failed %x", |
57 | status); | 55 | status); |
58 | goto exit; | 56 | goto exit; |
@@ -64,7 +62,7 @@ u32 therm_send_pmgr_tables_to_pmu(struct gk20a *g) | |||
64 | pboardobjgrp = &g->therm_pmu.therm_channelobjs.super.super; | 62 | pboardobjgrp = &g->therm_pmu.therm_channelobjs.super.super; |
65 | status = pboardobjgrp->pmuinithandle(g, pboardobjgrp); | 63 | status = pboardobjgrp->pmuinithandle(g, pboardobjgrp); |
66 | if (status) { | 64 | if (status) { |
67 | gk20a_err(dev_from_gk20a(g), | 65 | nvgpu_err(g, |
68 | "therm_send_pmgr_tables_to_pmu - therm_channel failed %x", | 66 | "therm_send_pmgr_tables_to_pmu - therm_channel failed %x", |
69 | status); | 67 | status); |
70 | goto exit; | 68 | goto exit; |
@@ -90,7 +88,7 @@ static u32 therm_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, | |||
90 | seq_desc, | 88 | seq_desc, |
91 | timeout); | 89 | timeout); |
92 | if (status) { | 90 | if (status) { |
93 | gk20a_err(dev_from_gk20a(g), | 91 | nvgpu_err(g, |
94 | "unable to post therm cmd for unit %x cmd id %x size %x", | 92 | "unable to post therm cmd for unit %x cmd id %x size %x", |
95 | cmd->hdr.unit_id, cmd->cmd.therm.cmd_type, cmd->hdr.size); | 93 | cmd->hdr.unit_id, cmd->cmd.therm.cmd_type, cmd->hdr.size); |
96 | goto exit; | 94 | goto exit; |
@@ -104,7 +102,7 @@ static u32 therm_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, | |||
104 | &handlerparams->success, 1); | 102 | &handlerparams->success, 1); |
105 | 103 | ||
106 | if (handlerparams->success == 0) { | 104 | if (handlerparams->success == 0) { |
107 | gk20a_err(dev_from_gk20a(g), "could not process cmd\n"); | 105 | nvgpu_err(g, "could not process cmd\n"); |
108 | status = -ETIMEDOUT; | 106 | status = -ETIMEDOUT; |
109 | goto exit; | 107 | goto exit; |
110 | } | 108 | } |
@@ -225,7 +223,7 @@ u32 therm_configure_therm_alert(struct gk20a *g) | |||
225 | 223 | ||
226 | status = therm_enable_slct_notification_request(g); | 224 | status = therm_enable_slct_notification_request(g); |
227 | if (status) { | 225 | if (status) { |
228 | gk20a_err(dev_from_gk20a(g), | 226 | nvgpu_err(g, |
229 | "therm_enable_slct_notification_request-failed %d", | 227 | "therm_enable_slct_notification_request-failed %d", |
230 | status); | 228 | status); |
231 | goto exit; | 229 | goto exit; |
@@ -233,7 +231,7 @@ u32 therm_configure_therm_alert(struct gk20a *g) | |||
233 | 231 | ||
234 | status = therm_send_slct_configuration_to_pmu(g); | 232 | status = therm_send_slct_configuration_to_pmu(g); |
235 | if (status) { | 233 | if (status) { |
236 | gk20a_err(dev_from_gk20a(g), | 234 | nvgpu_err(g, |
237 | "therm_send_slct_configuration_to_pmu-failed %d", | 235 | "therm_send_slct_configuration_to_pmu-failed %d", |
238 | status); | 236 | status); |
239 | goto exit; | 237 | goto exit; |
@@ -241,7 +239,7 @@ u32 therm_configure_therm_alert(struct gk20a *g) | |||
241 | 239 | ||
242 | status = therm_set_warn_temp_limit(g); | 240 | status = therm_set_warn_temp_limit(g); |
243 | if (status) { | 241 | if (status) { |
244 | gk20a_err(dev_from_gk20a(g), | 242 | nvgpu_err(g, |
245 | "therm_set_warn_temp_limit-failed %d", | 243 | "therm_set_warn_temp_limit-failed %d", |
246 | status); | 244 | status); |
247 | goto exit; | 245 | goto exit; |