[PATCH]hpet and rtc max_user_freq predefine in Kconfig

2007-08-01 Thread [EMAIL PROTECTED]
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 <[EMAIL PROTECTED]>

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.0 
+0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/hpet.c2007-08-02
01:34:54.0 +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
  */
-#defineHPET_USER_FREQ  (64)
+#defineHPET_USER_FREQ  (CONFIG_HPET_MAX_USER_FREQ)
 #defineHPET_DRIFT  (500)

 #define HPET_RANGE_SIZE1024/* 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/Kconfig2007-07-10 20:57:15.0 
+0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/Kconfig   2007-08-02
01:33:33.0 +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.0 
+0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/rtc.c 2007-08-02
01:33:48.0 +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
 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH]hpet and rtc max_user_freq predefine in Kconfig

2007-08-01 Thread [EMAIL PROTECTED]
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 [EMAIL PROTECTED]

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.0 
+0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/hpet.c2007-08-02
01:34:54.0 +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
  */
-#defineHPET_USER_FREQ  (64)
+#defineHPET_USER_FREQ  (CONFIG_HPET_MAX_USER_FREQ)
 #defineHPET_DRIFT  (500)

 #define HPET_RANGE_SIZE1024/* 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/Kconfig2007-07-10 20:57:15.0 
+0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/Kconfig   2007-08-02
01:33:33.0 +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.0 
+0300
+++ linux-2.6.22-cfs-19.niam/drivers/char/rtc.c 2007-08-02
01:33:48.0 +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
 /*
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/