From owner-p4-projects@FreeBSD.ORG Sun Apr 9 00:33:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA8AF16A403; Sun, 9 Apr 2006 00:33:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 860E516A401 for ; Sun, 9 Apr 2006 00:33:51 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5239C43D46 for ; Sun, 9 Apr 2006 00:33:51 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k390XpD8041898 for ; Sun, 9 Apr 2006 00:33:51 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k390XpAC041895 for perforce@freebsd.org; Sun, 9 Apr 2006 00:33:51 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 9 Apr 2006 00:33:51 GMT Message-Id: <200604090033.k390XpAC041895@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 94829 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2006 00:33:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=94829 Change 94829 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/09 00:33:02 use renamed interrupt control functions Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tick.c#5 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tick.c#5 (text+ko) ==== @@ -90,6 +90,7 @@ hardclock_cpu(TRAPF_USERMODE(tf)); if (profprocs != 0) profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf)); + statclock(TRAPF_USERMODE(tf)); } @@ -108,10 +109,11 @@ * stop. */ adj = PCPU_GET(tickadj); - s = intr_disable(); + s = intr_disable_all(); tick = rd(tick); wrtickcmpr(tick + tick_increment - adj, 0); - intr_restore(s); + intr_restore_all(s); + ref = PCPU_GET(tickref); delta = tick - ref; count = 0; @@ -152,14 +154,12 @@ */ printf("tick_freq=%ld hz=%d tick_increment=%ld\n", tick_freq, hz, tick_increment); -#ifndef notyet - /* XXX SUN4V_FIXME the simulator sets the clock to 5Mhz */ - tick_increment = TICK_GRACE; -#endif + +#ifndef SIMULATOR if (tick_increment < TICK_GRACE) panic("%s: HZ too high, decrease to at least %ld", __func__, clock / TICK_GRACE); - +#endif /* * UltraSparc II[e,i] based systems come up with the tick interrupt * enabled and a handler that resets the tick counter, causing DELAY() @@ -186,12 +186,12 @@ * one tick to make sure that it is not missed. */ PCPU_SET(tickadj, 0); - s = intr_disable(); + s = intr_disable_all(); base = rd(tick); base = roundup(base, tick_increment); PCPU_SET(tickref, base); wrtickcmpr(base + tick_increment, 0); - intr_restore(s); + intr_restore_all(s); } void