public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Bellinger <nickb@attheoffice.org>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: [PATCH] 2.5.25 - Fix USER_HZ breakage on non-x86 archs
Date: 11 Jul 2002 22:01:41 -0600	[thread overview]
Message-ID: <1026446514.7171.99.camel@subjeKt> (raw)

[-- 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

             reply	other threads:[~2002-07-12  5:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-12  4:01 Nick Bellinger [this message]
2002-07-12  8:36 ` [PATCH] 2.5.25 - Fix USER_HZ breakage on non-x86 archs Russell King

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=1026446514.7171.99.camel@subjeKt \
    --to=nickb@attheoffice.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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