public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Olaf Hering <olh@suse.de>
Subject: [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals
Date: Sun, 26 Sep 2004 09:46:44 +1000	[thread overview]
Message-ID: <1096156004.18236.49.camel@gaston> (raw)

Hi !

The current 32 bits translation of the SI_TIMER is wrong on ppc64, causing
the tst-timer4 testcase of glibc to fail in 32 bits. This patch fixes it.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-ogg-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

===== arch/ppc64/kernel/signal32.c 1.57 vs edited =====
--- 1.57/arch/ppc64/kernel/signal32.c	2004-09-14 10:23:15 +10:00
+++ edited/arch/ppc64/kernel/signal32.c	2004-09-26 09:37:48 +10:00
@@ -472,9 +472,13 @@
 				  &d->si_addr);
 		break;
 	case __SI_POLL >> 16:
-	case __SI_TIMER >> 16:
 		err |= __put_user(s->si_band, &d->si_band);
 		err |= __put_user(s->si_fd, &d->si_fd);
+		break;
+	case __SI_TIMER >> 16:
+		err |= __put_user(s->si_tid, &d->si_tid);
+		err |= __put_user(s->si_overrun, &d->si_overrun);
+		err |= __put_user((u32)(u64)s->si_ptr, &d->si_ptr);
 		break;
 	case __SI_RT >> 16: /* This is not generated by the kernel as of now.  */
 	case __SI_MESGQ >> 16:
===== include/asm-ppc64/ppc32.h 1.16 vs edited =====
--- 1.16/include/asm-ppc64/ppc32.h	2004-09-17 16:58:38 +10:00
+++ edited/include/asm-ppc64/ppc32.h	2004-09-26 09:37:49 +10:00
@@ -32,8 +32,10 @@
 
 		/* POSIX.1b timers */
 		struct {
-			unsigned int _timer1;
-			unsigned int _timer2;
+			timer_t _tid;			/* timer id */
+			int _overrun;			/* overrun count */
+			compat_sigval_t _sigval;		/* same as below */
+			int _sys_private;		/* not to be passed to user */
 		} _timer;
 
 		/* POSIX.1b signals */
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>


             reply	other threads:[~2004-09-25 23:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 23:46 Benjamin Herrenschmidt [this message]
2004-09-26  9:40 ` [PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals Olaf Hering
2004-09-26 12:08   ` Benjamin Herrenschmidt
     [not found] <200409260205.i8Q25pGb013827@hera.kernel.org>
2004-09-26  6:58 ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2004-09-25 23:45 Benjamin Herrenschmidt

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=1096156004.18236.49.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olh@suse.de \
    --cc=torvalds@osdl.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