From owner-svn-src-all@FreeBSD.ORG Mon Sep 13 06:32:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB993106566C; Mon, 13 Sep 2010 06:32:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB1FD8FC0C; Mon, 13 Sep 2010 06:32:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8D6Wu6j068980; Mon, 13 Sep 2010 06:32:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8D6WuWr068978; Mon, 13 Sep 2010 06:32:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201009130632.o8D6WuWr068978@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Sep 2010 06:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212533 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 06:32:56 -0000 Author: mav Date: Mon Sep 13 06:32:56 2010 New Revision: 212533 URL: http://svn.freebsd.org/changeset/base/212533 Log: Add tunable 'hint.hpet.X.per_cpu' to specify how much per-CPU timers driver should provide if there is sufficient hardware. Default is 1. Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 05:03:37 2010 (r212532) +++ head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 06:32:56 2010 (r212533) @@ -74,6 +74,7 @@ struct hpet_softc { int irq; int useirq; int legacy_route; + int per_cpu; uint32_t allowed_irqs; struct resource *mem_res; struct resource *intr_res; @@ -501,6 +502,11 @@ hpet_attach(device_t dev) resource_int_value(device_get_name(dev), device_get_unit(dev), "allowed_irqs", &sc->allowed_irqs); + /* Get how much per-CPU timers we should try to provide. */ + sc->per_cpu = 1; + resource_int_value(device_get_name(dev), device_get_unit(dev), + "per_cpu", &sc->per_cpu); + num_msi = 0; sc->useirq = 0; /* Find IRQ vectors for all timers. */ @@ -556,7 +562,7 @@ hpet_attach(device_t dev) if (sc->legacy_route) hpet_enable(sc); /* Group timers for per-CPU operation. */ - num_percpu_et = min(num_msi / mp_ncpus, 1); + num_percpu_et = min(num_msi / mp_ncpus, sc->per_cpu); num_percpu_t = num_percpu_et * mp_ncpus; pcpu_master = 0; cur_cpu = CPU_FIRST();