linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* asm/resource.h
@ 2000-11-03 21:20 H. Peter Anvin
  2000-11-03 21:29 ` asm/resource.h Jeff V. Merkey
  0 siblings, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2000-11-03 21:20 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List, linux-gcc

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

Hello friends,

Attached is a patch against 2.4.0-test10 that changes asm/resource.h to
define RLIM_INFINITY insite the #ifdef __KERNEL__ on all architectures;
previously, this was inconsistent between architecures.  This breaks
compilation with -Werror at least on i386 since <bits/resource.h>
includes <asm/resource.h>, at least on glibc-2.1.2.

I have only been able to test this on i386 and glibc 2.1.2.  If there are
any places where this change is *not* appropriate, now would be a good
time to holler...

	-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

[-- Attachment #2: resource.diff --]
[-- Type: text/plain, Size: 5489 bytes --]

diff -ur linux-2.4.0-test10-orig/include/asm/resource.h linux-2.4.0-test10/include/asm/resource.h
--- linux-2.4.0-test10-orig/include/asm/resource.h	Fri Sep 22 14:21:19 2000
+++ linux-2.4.0-test10/include/asm/resource.h	Fri Nov  3 13:11:12 2000
@@ -19,13 +19,13 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY	(~0UL)
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\
diff -ur linux-2.4.0-test10-orig/include/asm-alpha/resource.h linux-2.4.0-test10/include/asm-alpha/resource.h
--- linux-2.4.0-test10-orig/include/asm-alpha/resource.h	Wed Sep 27 13:39:23 2000
+++ linux-2.4.0-test10/include/asm-alpha/resource.h	Fri Nov  3 13:11:30 2000
@@ -19,14 +19,14 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.  Fine, it's unsigned, but
  * we retain the old value for compatibility, especially with DU. 
  * When you run into the 2^63 barrier, you call me.
  */
 #define RLIM_INFINITY	0x7ffffffffffffffful
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS							\
 {									\
diff -ur linux-2.4.0-test10-orig/include/asm-i386/resource.h linux-2.4.0-test10/include/asm-i386/resource.h
--- linux-2.4.0-test10-orig/include/asm-i386/resource.h	Fri Sep 22 14:21:19 2000
+++ linux-2.4.0-test10/include/asm-i386/resource.h	Fri Nov  3 13:11:12 2000
@@ -19,13 +19,13 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY	(~0UL)
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\
diff -ur linux-2.4.0-test10-orig/include/asm-ia64/resource.h linux-2.4.0-test10/include/asm-ia64/resource.h
--- linux-2.4.0-test10-orig/include/asm-ia64/resource.h	Fri Sep 22 14:21:19 2000
+++ linux-2.4.0-test10/include/asm-ia64/resource.h	Fri Nov  3 13:11:04 2000
@@ -22,13 +22,13 @@
 
 #define RLIM_NLIMITS	11
 
+# ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY  (~0UL)
-
-# ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\
diff -ur linux-2.4.0-test10-orig/include/asm-m68k/resource.h linux-2.4.0-test10/include/asm-m68k/resource.h
--- linux-2.4.0-test10-orig/include/asm-m68k/resource.h	Fri Sep 22 14:21:20 2000
+++ linux-2.4.0-test10/include/asm-m68k/resource.h	Fri Nov  3 13:10:54 2000
@@ -19,13 +19,13 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY	(~0UL)
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS	\
 {                       \
diff -ur linux-2.4.0-test10-orig/include/asm-mips/resource.h linux-2.4.0-test10/include/asm-mips/resource.h
--- linux-2.4.0-test10-orig/include/asm-mips/resource.h	Fri Sep 22 14:21:20 2000
+++ linux-2.4.0-test10/include/asm-mips/resource.h	Fri Nov  3 13:10:44 2000
@@ -26,13 +26,13 @@
 
 #define RLIM_NLIMITS 11			/* Number of limit flavors.  */
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY	0x7fffffffUL
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\
diff -ur linux-2.4.0-test10-orig/include/asm-mips64/resource.h linux-2.4.0-test10/include/asm-mips64/resource.h
--- linux-2.4.0-test10-orig/include/asm-mips64/resource.h	Fri Sep 22 14:21:20 2000
+++ linux-2.4.0-test10/include/asm-mips64/resource.h	Fri Nov  3 13:10:30 2000
@@ -27,13 +27,13 @@
 
 #define RLIM_NLIMITS 11			/* Number of limit flavors.  */
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY  (~0UL)
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\
diff -ur linux-2.4.0-test10-orig/include/asm-s390/resource.h linux-2.4.0-test10/include/asm-s390/resource.h
--- linux-2.4.0-test10-orig/include/asm-s390/resource.h	Fri Sep 22 14:21:21 2000
+++ linux-2.4.0-test10/include/asm-s390/resource.h	Fri Nov  3 13:10:13 2000
@@ -27,13 +27,13 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY   (~0UL)
-
-#ifdef __KERNEL__
 
 #define INIT_RLIMITS					\
 {							\
diff -ur linux-2.4.0-test10-orig/include/asm-sparc/resource.h linux-2.4.0-test10/include/asm-sparc/resource.h
--- linux-2.4.0-test10-orig/include/asm-sparc/resource.h	Tue Oct 10 10:33:52 2000
+++ linux-2.4.0-test10/include/asm-sparc/resource.h	Fri Nov  3 13:09:46 2000
@@ -25,6 +25,8 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * We make this unsigned, but keep the
@@ -32,7 +34,6 @@
  */
 #define RLIM_INFINITY	0x7fffffff
 
-#ifdef __KERNEL__
 #define INIT_RLIMITS			\
 {					\
     {RLIM_INFINITY, RLIM_INFINITY},	\
diff -ur linux-2.4.0-test10-orig/include/asm-sparc64/resource.h linux-2.4.0-test10/include/asm-sparc64/resource.h
--- linux-2.4.0-test10-orig/include/asm-sparc64/resource.h	Tue Oct 10 10:33:52 2000
+++ linux-2.4.0-test10/include/asm-sparc64/resource.h	Fri Nov  3 13:09:29 2000
@@ -25,13 +25,14 @@
 
 #define RLIM_NLIMITS	11
 
+#ifdef __KERNEL__
+
 /*
  * SuS says limits have to be unsigned.
  * Which makes a ton more sense anyway.
  */
 #define RLIM_INFINITY	(~0UL)
 
-#ifdef __KERNEL__
 #define INIT_RLIMITS			\
 {					\
     {RLIM_INFINITY, RLIM_INFINITY},	\

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

* Re: asm/resource.h
  2000-11-03 21:20 asm/resource.h H. Peter Anvin
@ 2000-11-03 21:29 ` Jeff V. Merkey
  2000-11-04  2:33   ` asm/resource.h Peter Samuelson
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff V. Merkey @ 2000-11-03 21:29 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Linus Torvalds, Linux Kernel Mailing List, linux-gcc


hpa,

Is this what is causing the lockup problems on 2.4.0-pre-10 with PPro,
or something else.  Looks like something else.

Jeff

"H. Peter Anvin" wrote:
> 
> Hello friends,
> 
> Attached is a patch against 2.4.0-test10 that changes asm/resource.h to
> define RLIM_INFINITY insite the #ifdef __KERNEL__ on all architectures;
> previously, this was inconsistent between architecures.  This breaks
> compilation with -Werror at least on i386 since <bits/resource.h>
> includes <asm/resource.h>, at least on glibc-2.1.2.
> 
> I have only been able to test this on i386 and glibc 2.1.2.  If there are
> any places where this change is *not* appropriate, now would be a good
> time to holler...
> 
>         -hpa
> 
> --
> <hpa@transmeta.com> at work, <hpa@zytor.com> in private!
> "Unix gives you enough rope to shoot yourself in the foot."
> http://www.zytor.com/~hpa/puzzle.txt
> 
>   ------------------------------------------------------------------------
> diff -ur linux-2.4.0-test10-orig/include/asm/resource.h linux-2.4.0-test10/include/asm/resource.h
> --- linux-2.4.0-test10-orig/include/asm/resource.h      Fri Sep 22 14:21:19 2000
> +++ linux-2.4.0-test10/include/asm/resource.h   Fri Nov  3 13:11:12 2000
> @@ -19,13 +19,13 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  (~0UL)
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                   \
>  {                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-alpha/resource.h linux-2.4.0-test10/include/asm-alpha/resource.h
> --- linux-2.4.0-test10-orig/include/asm-alpha/resource.h        Wed Sep 27 13:39:23 2000
> +++ linux-2.4.0-test10/include/asm-alpha/resource.h     Fri Nov  3 13:11:30 2000
> @@ -19,14 +19,14 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.  Fine, it's unsigned, but
>   * we retain the old value for compatibility, especially with DU.
>   * When you run into the 2^63 barrier, you call me.
>   */
>  #define RLIM_INFINITY  0x7ffffffffffffffful
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                                   \
>  {                                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-i386/resource.h linux-2.4.0-test10/include/asm-i386/resource.h
> --- linux-2.4.0-test10-orig/include/asm-i386/resource.h Fri Sep 22 14:21:19 2000
> +++ linux-2.4.0-test10/include/asm-i386/resource.h      Fri Nov  3 13:11:12 2000
> @@ -19,13 +19,13 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  (~0UL)
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                   \
>  {                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-ia64/resource.h linux-2.4.0-test10/include/asm-ia64/resource.h
> --- linux-2.4.0-test10-orig/include/asm-ia64/resource.h Fri Sep 22 14:21:19 2000
> +++ linux-2.4.0-test10/include/asm-ia64/resource.h      Fri Nov  3 13:11:04 2000
> @@ -22,13 +22,13 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +# ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  (~0UL)
> -
> -# ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                   \
>  {                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-m68k/resource.h linux-2.4.0-test10/include/asm-m68k/resource.h
> --- linux-2.4.0-test10-orig/include/asm-m68k/resource.h Fri Sep 22 14:21:20 2000
> +++ linux-2.4.0-test10/include/asm-m68k/resource.h      Fri Nov  3 13:10:54 2000
> @@ -19,13 +19,13 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  (~0UL)
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS   \
>  {                       \
> diff -ur linux-2.4.0-test10-orig/include/asm-mips/resource.h linux-2.4.0-test10/include/asm-mips/resource.h
> --- linux-2.4.0-test10-orig/include/asm-mips/resource.h Fri Sep 22 14:21:20 2000
> +++ linux-2.4.0-test10/include/asm-mips/resource.h      Fri Nov  3 13:10:44 2000
> @@ -26,13 +26,13 @@
> 
>  #define RLIM_NLIMITS 11                        /* Number of limit flavors.  */
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  0x7fffffffUL
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                   \
>  {                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-mips64/resource.h linux-2.4.0-test10/include/asm-mips64/resource.h
> --- linux-2.4.0-test10-orig/include/asm-mips64/resource.h       Fri Sep 22 14:21:20 2000
> +++ linux-2.4.0-test10/include/asm-mips64/resource.h    Fri Nov  3 13:10:30 2000
> @@ -27,13 +27,13 @@
> 
>  #define RLIM_NLIMITS 11                        /* Number of limit flavors.  */
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  (~0UL)
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                   \
>  {                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-s390/resource.h linux-2.4.0-test10/include/asm-s390/resource.h
> --- linux-2.4.0-test10-orig/include/asm-s390/resource.h Fri Sep 22 14:21:21 2000
> +++ linux-2.4.0-test10/include/asm-s390/resource.h      Fri Nov  3 13:10:13 2000
> @@ -27,13 +27,13 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY   (~0UL)
> -
> -#ifdef __KERNEL__
> 
>  #define INIT_RLIMITS                                   \
>  {                                                      \
> diff -ur linux-2.4.0-test10-orig/include/asm-sparc/resource.h linux-2.4.0-test10/include/asm-sparc/resource.h
> --- linux-2.4.0-test10-orig/include/asm-sparc/resource.h        Tue Oct 10 10:33:52 2000
> +++ linux-2.4.0-test10/include/asm-sparc/resource.h     Fri Nov  3 13:09:46 2000
> @@ -25,6 +25,8 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * We make this unsigned, but keep the
> @@ -32,7 +34,6 @@
>   */
>  #define RLIM_INFINITY  0x7fffffff
> 
> -#ifdef __KERNEL__
>  #define INIT_RLIMITS                   \
>  {                                      \
>      {RLIM_INFINITY, RLIM_INFINITY},    \
> diff -ur linux-2.4.0-test10-orig/include/asm-sparc64/resource.h linux-2.4.0-test10/include/asm-sparc64/resource.h
> --- linux-2.4.0-test10-orig/include/asm-sparc64/resource.h      Tue Oct 10 10:33:52 2000
> +++ linux-2.4.0-test10/include/asm-sparc64/resource.h   Fri Nov  3 13:09:29 2000
> @@ -25,13 +25,14 @@
> 
>  #define RLIM_NLIMITS   11
> 
> +#ifdef __KERNEL__
> +
>  /*
>   * SuS says limits have to be unsigned.
>   * Which makes a ton more sense anyway.
>   */
>  #define RLIM_INFINITY  (~0UL)
> 
> -#ifdef __KERNEL__
>  #define INIT_RLIMITS                   \
>  {                                      \
>      {RLIM_INFINITY, RLIM_INFINITY},    \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: asm/resource.h
  2000-11-03 21:29 ` asm/resource.h Jeff V. Merkey
@ 2000-11-04  2:33   ` Peter Samuelson
  2000-11-04 21:37     ` asm/resource.h Jeff V. Merkey
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Samuelson @ 2000-11-04  2:33 UTC (permalink / raw)
  To: Jeff V. Merkey; +Cc: H. Peter Anvin, linux-kernel


[Jeff Merkey]
> Is this what is causing the lockup problems on 2.4.0-pre-10 with
> PPro, or something else.  Looks like something else.

Yeah, it does, doesn't it.  If this particular patch cured a
kernel-side lockup I would be very surprised.  Because the only effect
this patch is *supposed* to have is the visibility of certain kernel
header code when compiling userspace programs.

HPA, for what it's worth, which isn't much, I think your patch is
spot-on..

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: asm/resource.h
  2000-11-04 21:37     ` asm/resource.h Jeff V. Merkey
@ 2000-11-04 20:58       ` Peter Samuelson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Samuelson @ 2000-11-04 20:58 UTC (permalink / raw)
  To: Jeff V. Merkey, linux-kernel


[Jeff V. Merkey <jmerkey@vger.timpanogas.org>]
> I got a little further with the lock up problem, and it is related to
> MPS reporting a 2nd processor being present in some PPro systems when
> in fact only one CPU is really installed (but MPS is reporting
> default table entry 6 with a second CPU as present).

Wow, that's a lousy BIOS.  You mean it actually *can't tell* if there's
a CPU in the second socket or not?

I remember a couple years ago Linus remarked that *every time* Linux
tried to rely on a BIOS feature, there'd be at least one bug report
traceable to a buggy BIOS somewhere.  Proven once again.... (:

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: asm/resource.h
  2000-11-04  2:33   ` asm/resource.h Peter Samuelson
@ 2000-11-04 21:37     ` Jeff V. Merkey
  2000-11-04 20:58       ` asm/resource.h Peter Samuelson
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff V. Merkey @ 2000-11-04 21:37 UTC (permalink / raw)
  To: Peter Samuelson; +Cc: Jeff V. Merkey, H. Peter Anvin, linux-kernel

On Fri, Nov 03, 2000 at 08:33:36PM -0600, Peter Samuelson wrote:
> 
> [Jeff Merkey]
> > Is this what is causing the lockup problems on 2.4.0-pre-10 with
> > PPro, or something else.  Looks like something else.
> 
> Yeah, it does, doesn't it.  If this particular patch cured a
> kernel-side lockup I would be very surprised.  Because the only effect
> this patch is *supposed* to have is the visibility of certain kernel
> header code when compiling userspace programs.
> 
> HPA, for what it's worth, which isn't much, I think your patch is
> spot-on..

I got a little further with the lock up problem, and it is related to 
MPS reporting a 2nd processor being present in some PPro systems 
when in fact only one CPU is really installed (but MPS is reporting default
table entry 6 with a second CPU as present).  What seems to be different
here is that on this system, NT and NetWare both timeout on attempts 
to activate the non-existent CPU, while 2.4 hard hangs after sending 
a STARTUP_IPI command.  hpa does some work on the APIC code I've noticed,
so I thought I'd ask him about it.  

Jeff

> 
> Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-11-04 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-03 21:20 asm/resource.h H. Peter Anvin
2000-11-03 21:29 ` asm/resource.h Jeff V. Merkey
2000-11-04  2:33   ` asm/resource.h Peter Samuelson
2000-11-04 21:37     ` asm/resource.h Jeff V. Merkey
2000-11-04 20:58       ` asm/resource.h Peter Samuelson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).