linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Roeland <marco.roeland@xs4all.nl>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.6.0-test9
Date: Sun, 26 Oct 2003 17:27:18 +0100	[thread overview]
Message-ID: <20031026162718.GC23792@localhost> (raw)
In-Reply-To: <1067182375.17710.11.camel@mars.goatskin.org>

On Sunday Oktober 26th 2003 at 10:32 uur Shane Shrybman wrote:

> gcc2.96, from Mandrake 8.2 (I would suspect that Redhat 7.* releases are
> in this boat too) has a bug that prevents the compilation -test9.

Yes, several people have reported this for the gcc 2.96 included in
RedHat 7.[23] as well. It started with 2.6.0-test8.

> fs/proc/array.c: In function `proc_pid_stat':
> fs/proc/array.c:398: Unrecognizable insn:
> (insn/i 1337 1673 1667 (parallel[ 
> ...

> and a little patch that resolves it for me
> 
> diff -ur linux-2.6.0-test9/fs/proc/array.c
> linux-2.6.0-test9-A/fs/proc/array.c
> --- linux-2.6.0-test9/fs/proc/array.c   Sat Oct 25 18:21:46 2003
> +++ linux-2.6.0-test9-A/fs/proc/array.c Sat Oct 25 19:14:15 2003
> @@ -295,7 +295,8 @@
>  {
>         unsigned long vsize, eip, esp, wchan;
>         long priority, nice;
> -       int tty_pgrp = -1, tty_nr = 0;
> +       int tty_pgrp = -1;
> +       volatile int tty_nr = 0;
>         sigset_t sigign, sigcatch;
>         char state;
>         int res;
> 

Here is another patch which solves the same problem in a different way!
There was a thread with some discussion on it several days ago; I objected
against the apparent magic in the use of 'volatile' here. It obviously
solves the compilation for you, but I wonder is there some deeper reason
it's used?

The following different patch (sent earlier in the mentioned thread)
'solves' this compilation issue as well by just simplifying and factoring
out some stuff. It's against 2.6.0-test8 but applies against 2.6.0-test9
and 2.6.0-test8-mm1 as well.

--- linux-2.6.0-test8/fs/proc/array.c.orig	2003-10-21 16:18:40.000000000 +0200
+++ linux-2.6.0-test8/fs/proc/array.c	2003-10-23 09:30:27.000000000 +0200
@@ -302,6 +302,7 @@
 	pid_t ppid;
 	int num_threads = 0;
 	struct mm_struct *mm;
+	unsigned long long starttime;
 
 	state = *get_task_state(task);
 	vsize = eip = esp = 0;
@@ -343,9 +344,7 @@
 	read_lock(&tasklist_lock);
 	ppid = task->pid ? task->real_parent->pid : 0;
 	read_unlock(&tasklist_lock);
-	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu ",
 		task->pid,
 		task->comm,
 		state,
@@ -355,7 +354,9 @@
 		tty_nr,
 		tty_pgrp,
 		task->flags,
-		task->min_flt,
+		task->min_flt);
+	starttime = jiffies_64_to_clock_t(task->start_time - INITIAL_JIFFIES);
+	res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu ",
 		task->cmin_flt,
 		task->maj_flt,
 		task->cmaj_flt,
@@ -367,15 +368,15 @@
 		nice,
 		num_threads,
 		jiffies_to_clock_t(task->it_real_value),
-		(unsigned long long)
-		    jiffies_64_to_clock_t(task->start_time - INITIAL_JIFFIES),
+		starttime,
 		vsize,
 		mm ? mm->rss : 0, /* you might want to shift this left 3 */
 		task->rlim[RLIMIT_RSS].rlim_cur,
 		mm ? mm->start_code : 0,
 		mm ? mm->end_code : 0,
 		mm ? mm->start_stack : 0,
-		esp,
+		esp);
+	res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		eip,
 		/* The signal information here is obsolete.
 		 * It must be decimal for Linux 2.0 compatibility.


  reply	other threads:[~2003-10-26 16:27 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-26 15:32 Linux 2.6.0-test9 Shane Shrybman
2003-10-26 16:27 ` Marco Roeland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-27 10:58 Andries.Brouwer
2003-10-27  9:47 Mikael Pettersson
2003-10-27  1:48 Andries.Brouwer
2003-10-27  2:10 ` Linus Torvalds
2003-10-27  9:40   ` David S. Miller
2003-10-26 19:40 Andries.Brouwer
2003-10-27  0:01 ` Andrew Morton
2003-10-27  0:21   ` Linus Torvalds
2003-10-27  0:28     ` Linus Torvalds
2003-10-27  6:43       ` David S. Miller
2003-10-27 19:54         ` kuznet
2003-10-27 19:36     ` kuznet
2003-10-28  0:42       ` Tommy Christensen
2003-10-28 18:25         ` kuznet
2003-10-26 18:51 P. Christeas
2003-10-27  3:16 ` Andrew Morton
2003-10-26 11:08 Andries.Brouwer
2003-10-26 13:57 ` OGAWA Hirofumi
2003-10-26 10:59 Andries.Brouwer
2003-10-27 23:37 ` bill davidsen
2003-10-26 10:26 Andries.Brouwer
2003-10-26  1:16 Andries.Brouwer
2003-10-26  3:12 ` OGAWA Hirofumi
2003-10-26  5:48 ` Linus Torvalds
2003-10-27 23:26   ` bill davidsen
2003-10-30  9:20     ` Russell King
2003-10-30 16:44       ` Bill Davidsen
2003-10-30 17:23         ` John Bradford
2003-10-25 19:09 Linus Torvalds
2003-10-25 19:52 ` Marcelo Tosatti
2003-10-25 20:14 ` viro
2003-10-25 22:35   ` Linus Torvalds
2003-10-25 23:45 ` Jose Luis Domingo Lopez
2003-10-26 12:05 ` Patrik Wallstrom
2003-10-27 18:21   ` Patrik Wallstrom
2003-10-27 22:51     ` bill davidsen
2003-10-28  2:12       ` Jeff Garzik
2003-10-28  4:52         ` Bill Davidsen

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=20031026162718.GC23792@localhost \
    --to=marco.roeland@xs4all.nl \
    --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;
as well as URLs for NNTP newsgroup(s).