Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2010 06:32:56 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212533 - head/sys/dev/acpica
Message-ID:  <201009130632.o8D6WuWr068978@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009130632.o8D6WuWr068978>