public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.5.25 - Fix USER_HZ breakage on non-x86 archs
@ 2002-07-12  4:01 Nick Bellinger
  2002-07-12  8:36 ` Russell King
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Bellinger @ 2002-07-12  4:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Greetings,

	The following patch adds the deprecated USER_HZ definition that was
added in 2.5.25 to include/linux/times.h for the new
jiffies_to_clock_t() macro and that is currently defined in
include/asm/param.h for i386/ppc. All architectures aside from x86 and
ppc are currently broken without USER_HZ definied and I assume we only
want a different internal kernel timer frequency for x86 right now, so
all definitions of USER_HZ in non asm-x86 param.h are set to the
predefined value of HZ.  

Also, is it correct to do HZ/USER_HZ in jiffies_to_clock_t() when the
values are identical,  or should an ifdef CONFIG_ARCH be added there for
architectures which use a different internitt
el frequency?

Thanks,

			Nicholas Bellinger

(please CC)



[-- Attachment #2: patch-2.5.25-non-x86-USER_HZ --]
[-- Type: application/octet-stream, Size: 11065 bytes --]

diff -urN linux-2.5.25.vanilla/include/asm-alpha/param.h linux-2.5.25/include/asm-alpha/param.h
--- linux-2.5.25.vanilla/include/asm-alpha/param.h	Thu Jul 11 18:39:11 2002
+++ linux-2.5.25/include/asm-alpha/param.h	Thu Jul 11 19:15:43 2002
@@ -15,6 +15,11 @@
 # endif
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	8192
 
 #ifndef NGROUPS
@@ -26,9 +31,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif /* _ASM_ALPHA_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-arm/param.h linux-2.5.25/include/asm-arm/param.h
--- linux-2.5.25.vanilla/include/asm-arm/param.h	Thu Jul 11 18:39:07 2002
+++ linux-2.5.25/include/asm-arm/param.h	Thu Jul 11 19:15:57 2002
@@ -20,6 +20,11 @@
 #define hz_to_std(a) (a)
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #ifndef NGROUPS
 #define NGROUPS         32
 #endif
@@ -30,10 +35,6 @@
 
 /* max length of hostname */
 #define MAXHOSTNAMELEN  64
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ
-#endif
 
 #endif
 
diff -urN linux-2.5.25.vanilla/include/asm-cris/param.h linux-2.5.25/include/asm-cris/param.h
--- linux-2.5.25.vanilla/include/asm-cris/param.h	Thu Jul 11 18:39:12 2002
+++ linux-2.5.25/include/asm-cris/param.h	Thu Jul 11 19:16:12 2002
@@ -5,6 +5,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	8192
 
 #ifndef NGROUPS
@@ -16,9 +21,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC        100     /* frequency at which times() counts */
-#endif
 
 #endif
diff -urN linux-2.5.25.vanilla/include/asm-ia64/param.h linux-2.5.25/include/asm-ia64/param.h
--- linux-2.5.25.vanilla/include/asm-ia64/param.h	Thu Jul 11 18:39:06 2002
+++ linux-2.5.25/include/asm-ia64/param.h	Thu Jul 11 19:08:00 2002
@@ -20,6 +20,11 @@
 # define HZ	1024
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	65536
 
 #ifndef NGROUPS
@@ -31,9 +36,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif /* _ASM_IA64_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-m68k/param.h linux-2.5.25/include/asm-m68k/param.h
--- linux-2.5.25.vanilla/include/asm-m68k/param.h	Thu Jul 11 18:39:07 2002
+++ linux-2.5.25/include/asm-m68k/param.h	Thu Jul 11 19:16:44 2002
@@ -5,6 +5,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	8192
 
 #ifndef NGROUPS
@@ -16,9 +21,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif /* _M68K_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-mips/param.h linux-2.5.25/include/asm-mips/param.h
--- linux-2.5.25.vanilla/include/asm-mips/param.h	Thu Jul 11 18:39:08 2002
+++ linux-2.5.25/include/asm-mips/param.h	Thu Jul 11 19:02:11 2002
@@ -52,6 +52,11 @@
 #endif /* defined(__KERNEL__)  */
 #endif /* defined(HZ)  */
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -64,8 +69,6 @@
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
 
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	100	/* frequency at which times() counts */
-#endif
-
 #endif /* _ASM_PARAM_H */
+
+
diff -urN linux-2.5.25.vanilla/include/asm-mips64/param.h linux-2.5.25/include/asm-mips64/param.h
--- linux-2.5.25.vanilla/include/asm-mips64/param.h	Thu Jul 11 18:39:12 2002
+++ linux-2.5.25/include/asm-mips64/param.h	Thu Jul 11 19:00:44 2002
@@ -17,6 +17,11 @@
 #endif
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -28,9 +33,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	100	/* frequency at which times() counts */
-#endif
 
 #endif /* _ASM_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-parisc/param.h linux-2.5.25/include/asm-parisc/param.h
--- linux-2.5.25.vanilla/include/asm-parisc/param.h	Thu Jul 11 18:39:11 2002
+++ linux-2.5.25/include/asm-parisc/param.h	Thu Jul 11 19:12:58 2002
@@ -5,6 +5,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -16,9 +21,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif
diff -urN linux-2.5.25.vanilla/include/asm-ppc/param.h linux-2.5.25/include/asm-ppc/param.h
--- linux-2.5.25.vanilla/include/asm-ppc/param.h	Thu Jul 11 18:39:06 2002
+++ linux-2.5.25/include/asm-ppc/param.h	Thu Jul 11 18:50:25 2002
@@ -9,8 +9,7 @@
 #endif
 
 #ifdef __KERNEL__
-#define HZ		100		/* internal timer frequency */
-#define USER_HZ		100		/* for user interfaces in "ticks" */
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
 #define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
 #endif
 
diff -urN linux-2.5.25.vanilla/include/asm-ppc64/param.h linux-2.5.25/include/asm-ppc64/param.h
--- linux-2.5.25.vanilla/include/asm-ppc64/param.h	Thu Jul 11 18:39:04 2002
+++ linux-2.5.25/include/asm-ppc64/param.h	Thu Jul 11 19:01:25 2002
@@ -22,6 +22,11 @@
 #endif
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -33,9 +38,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif /* _ASM_PPC64_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-s390/param.h linux-2.5.25/include/asm-s390/param.h
--- linux-2.5.25.vanilla/include/asm-s390/param.h	Thu Jul 11 18:39:11 2002
+++ linux-2.5.25/include/asm-s390/param.h	Thu Jul 11 19:04:35 2002
@@ -13,6 +13,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -25,8 +30,5 @@
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
 
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC		HZ	/* frequency at which times() counts */
 #endif
 
-#endif
diff -urN linux-2.5.25.vanilla/include/asm-s390x/param.h linux-2.5.25/include/asm-s390x/param.h
--- linux-2.5.25.vanilla/include/asm-s390x/param.h	Thu Jul 11 18:39:06 2002
+++ linux-2.5.25/include/asm-s390x/param.h	Thu Jul 11 19:04:22 2002
@@ -16,6 +16,11 @@
 #endif
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -28,8 +33,4 @@
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
 
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC		HZ	/* frequency at which times() counts */
-#endif
-                                 
 #endif
diff -urN linux-2.5.25.vanilla/include/asm-sh/param.h linux-2.5.25/include/asm-sh/param.h
--- linux-2.5.25.vanilla/include/asm-sh/param.h	Thu Jul 11 18:39:12 2002
+++ linux-2.5.25/include/asm-sh/param.h	Thu Jul 11 19:04:06 2002
@@ -5,6 +5,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -16,9 +21,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-#define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif /* __ASM_SH_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-sparc/param.h linux-2.5.25/include/asm-sparc/param.h
--- linux-2.5.25.vanilla/include/asm-sparc/param.h	Thu Jul 11 18:39:11 2002
+++ linux-2.5.25/include/asm-sparc/param.h	Thu Jul 11 19:05:20 2002
@@ -6,6 +6,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ         HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC  (USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	8192    /* Thanks for sun4's we carry baggage... */
 
 #ifndef NGROUPS
@@ -17,9 +22,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif
diff -urN linux-2.5.25.vanilla/include/asm-sparc64/param.h linux-2.5.25/include/asm-sparc64/param.h
--- linux-2.5.25.vanilla/include/asm-sparc64/param.h	Thu Jul 11 18:39:11 2002
+++ linux-2.5.25/include/asm-sparc64/param.h	Thu Jul 11 19:05:43 2002
@@ -6,6 +6,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	8192    /* Thanks for sun4's we carry baggage... */
 
 #ifndef NGROUPS
@@ -17,9 +22,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif /* _ASMSPARC64_PARAM_H */
diff -urN linux-2.5.25.vanilla/include/asm-x86_64/param.h linux-2.5.25/include/asm-x86_64/param.h
--- linux-2.5.25.vanilla/include/asm-x86_64/param.h	Thu Jul 11 18:39:06 2002
+++ linux-2.5.25/include/asm-x86_64/param.h	Thu Jul 11 19:06:15 2002
@@ -5,6 +5,11 @@
 #define HZ 100
 #endif
 
+#ifdef __KERNEL__
+#define USER_HZ		HZ		/* for user interfaces in "ticks" */
+#define CLOCKS_PER_SEC	(USER_HZ)	/* frequency at which times() counts */
+#endif
+
 #define EXEC_PAGESIZE	4096
 
 #ifndef NGROUPS
@@ -16,9 +21,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	100	/* frequency at which times() counts */
-#endif
 
 #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] 2.5.25 - Fix USER_HZ breakage on non-x86 archs
  2002-07-12  4:01 [PATCH] 2.5.25 - Fix USER_HZ breakage on non-x86 archs Nick Bellinger
@ 2002-07-12  8:36 ` Russell King
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2002-07-12  8:36 UTC (permalink / raw)
  To: Nick Bellinger; +Cc: linux-kernel, torvalds

On Thu, Jul 11, 2002 at 10:01:41PM -0600, Nick Bellinger wrote:
> 	The following patch adds the deprecated USER_HZ definition that was
> added in 2.5.25 to include/linux/times.h for the new
> jiffies_to_clock_t() macro and that is currently defined in
> include/asm/param.h for i386/ppc. All architectures aside from x86 and
> ppc are currently broken without USER_HZ definied and I assume we only
> want a different internal kernel timer frequency for x86 right now, so
> all definitions of USER_HZ in non asm-x86 param.h are set to the
> predefined value of HZ.  

Please drop the ARM section of this patch; updates are pending Linus
pulling from my BK repository.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-12  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-12  4:01 [PATCH] 2.5.25 - Fix USER_HZ breakage on non-x86 archs Nick Bellinger
2002-07-12  8:36 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox