File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -158,17 +158,12 @@ static inline const char __init *i8k_get_dmi_data(int field)
158
158
*/
159
159
static int i8k_smm_func (void * par )
160
160
{
161
- int rc ;
161
+ ktime_t calltime = ktime_get () ;
162
162
struct smm_regs * regs = par ;
163
163
int eax = regs -> eax ;
164
-
165
- #ifdef DEBUG
166
164
int ebx = regs -> ebx ;
167
- unsigned long duration ;
168
- ktime_t calltime , delta , rettime ;
169
-
170
- calltime = ktime_get ();
171
- #endif
165
+ long long duration ;
166
+ int rc ;
172
167
173
168
/* SMM requires CPU 0 */
174
169
if (smp_processor_id () != 0 )
@@ -230,13 +225,9 @@ static int i8k_smm_func(void *par)
230
225
if (rc != 0 || (regs -> eax & 0xffff ) == 0xffff || regs -> eax == eax )
231
226
rc = - EINVAL ;
232
227
233
- #ifdef DEBUG
234
- rettime = ktime_get ();
235
- delta = ktime_sub (rettime , calltime );
236
- duration = ktime_to_ns (delta ) >> 10 ;
237
- pr_debug ("smm(0x%.4x 0x%.4x) = 0x%.4x (took %7lu usecs)\n" , eax , ebx ,
238
- (rc ? 0xffff : regs -> eax & 0xffff ), duration );
239
- #endif
228
+ duration = ktime_us_delta (ktime_get (), calltime );
229
+ pr_debug ("smm(0x%.4x 0x%.4x) = 0x%.4x (took %7lld usecs)\n" , eax , ebx ,
230
+ (rc ? 0xffff : regs -> eax & 0xffff ), duration );
240
231
241
232
return rc ;
242
233
}
You can’t perform that action at this time.
0 commit comments