From: "Ni@m" <niam.niam@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH]hpet and rtc max_user_freq predefine in Kconfig
Date: Thu, 2 Aug 2007 02:27:55 +0300 [thread overview]
Message-ID: <a9e22dff0708011627y2768a3e8gdfb7bff6fccc8cea@mail.gmail.com> (raw)
I think users should be able to set max_user_freq values for rtc and
hpet during kernel configuration. The default value is set to 1024
with this patch.
The default value of 64 is really too small for modern multimedia apps.
Besides, this patch fixes link on intel hpet spec.
Signed-off-by: Milinevsky Dmitry <niam.niam@gmail.com>
diff -Nupar linux-2.6.22-cfs-19/drivers/char/hpet.c
linux-2.6.22-cfs-19.niam/drivers/char/hpet.c
--- linux-2.6.22-cfs-19/drivers/char/hpet.c 2007-07-10 20:57:20.000000000 +0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/hpet.c 2007-08-02
01:34:54.000000000 +0300
@@ -44,9 +44,9 @@
/*
* The High Precision Event Timer driver.
* This driver is closely modelled after the rtc.c driver.
- * http://www.intel.com/hardwaredesign/hpetspec.htm
+ * http://www.intel.com/technology/architecture/hpetspec.htm
*/
-#define HPET_USER_FREQ (64)
+#define HPET_USER_FREQ (CONFIG_HPET_MAX_USER_FREQ)
#define HPET_DRIFT (500)
#define HPET_RANGE_SIZE 1024 /* from HPET spec */
diff -Nupar linux-2.6.22-cfs-19/drivers/char/Kconfig
linux-2.6.22-cfs-19.niam/drivers/char/Kconfig
--- linux-2.6.22-cfs-19/drivers/char/Kconfig 2007-07-10 20:57:15.000000000 +0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/Kconfig 2007-08-02
01:33:33.000000000 +0300
@@ -791,6 +791,13 @@ config RTC
To compile this driver as a module, choose M here: the
module will be called rtc.
+config RTC_MAX_USER_FREQ
+ int "User interrupt frequency"
+ depends on RTC
+ default "1024"
+ help
+ Default value of user interrupt frequency(/proc/sys/dev/rtc/max-user-freq).
+
config SGI_DS1286
tristate "SGI DS1286 RTC support"
depends on SGI_IP22
@@ -1022,6 +1029,13 @@ config HPET
open selects one of the timers supported by the HPET. The timers are
non-periodic and/or periodic.
+config HPET_MAX_USER_FREQ
+ int "User interrupt frequency"
+ depends on HPET
+ default "1024"
+ help
+ Default value of user interrupt frequency(/proc/sys/dev/hpet/max-user-freq).
+
config HPET_RTC_IRQ
bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC
default n
diff -Nupar linux-2.6.22-cfs-19/drivers/char/rtc.c
linux-2.6.22-cfs-19.niam/drivers/char/rtc.c
--- linux-2.6.22-cfs-19/drivers/char/rtc.c 2007-07-10 20:57:15.000000000 +0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/rtc.c 2007-08-02
01:33:48.000000000 +0300
@@ -191,7 +191,7 @@ static int rtc_proc_open(struct inode *i
static unsigned long rtc_status = 0; /* bitmapped status byte. */
static unsigned long rtc_freq = 0; /* Current periodic IRQ rate */
static unsigned long rtc_irq_data = 0; /* our output to the world */
-static unsigned long rtc_max_user_freq = 64; /* > this, need
CAP_SYS_RESOURCE */
+static unsigned long rtc_max_user_freq = CONFIG_RTC_MAX_USER_FREQ; /*
> this, need CAP_SYS_RESOURCE */
#ifdef RTC_IRQ
/*
reply other threads:[~2007-08-01 23:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9e22dff0708011627y2768a3e8gdfb7bff6fccc8cea@mail.gmail.com \
--to=niam.niam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®