Minor nit: avoid kpreempt_disable() if cold (as we return early and do

not reenable it; actually makes no difference but looks more balanced
this way)
This commit is contained in:
martin 2011-09-01 08:43:24 +00:00
parent acae68523e
commit 9a1b6b7c8b
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: timer_sun4m.c,v 1.27 2011/07/17 23:18:23 mrg Exp $ */ /* $NetBSD: timer_sun4m.c,v 1.28 2011/09/01 08:43:24 martin Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -58,7 +58,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.27 2011/07/17 23:18:23 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.28 2011/09/01 08:43:24 martin Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/kernel.h> #include <sys/kernel.h>
@ -140,9 +140,9 @@ clockintr_4m(void *cap)
* For MP, we defer calling hardclock() to the schedintr so * For MP, we defer calling hardclock() to the schedintr so
* that we call it on all cpus. * that we call it on all cpus.
*/ */
kpreempt_disable();
if (cold) if (cold)
return 0; return 0;
kpreempt_disable();
/* read the limit register to clear the interrupt */ /* read the limit register to clear the interrupt */
*((volatile int *)&timerreg4m->t_limit); *((volatile int *)&timerreg4m->t_limit);
tickle_tc(); tickle_tc();