All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Sven Schnelle <svens@stackframe.org>
Cc: deller@gmx.de, linux-parisc@vger.kernel.org
Subject: Re: [PATCH] parisc: fix iosapic address compare
Date: Mon, 18 Mar 2019 23:03:06 +0100	[thread overview]
Message-ID: <20190318220306.GA10060@ls3530.dellerweb.de> (raw)
In-Reply-To: <20190318141301.14750-1-svens@stackframe.org>

Hi Sven,

* Sven Schnelle <svens@stackframe.org>:
> i just updated my C3750 to latest git, and got the kernel oops below. It looks
> like the change to using F_EXTEND breaks using 32 bit kernels on at least my
> C3750. Not sure whether we should revert the F_EXTEND change, or just cast
> the other side of the compare to long. The patch below does this.

Thanks for testing!
I think, as suggested by you, revertig parts of my patch makes most sense.
I've committed the patch below to my for-next tree.
Can you check if it works for you?

Helge

--------------------
From dae50289effc106df023796eb25d602244e73ac1 Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Mon, 18 Mar 2019 22:56:15 +0100
Subject: [PATCH] Revert: parisc: Use F_EXTEND() macro in iosapic code

Revert parts of commit 97d7e2e3fd8a ("parisc: Use F_EXTEND() macro in
iosapic code").  It breaks booting the 32-bit kernel.

Reported-by: Sven Schnelle <svens@stackframe.org>
Fixes: 97d7e2e3fd8a ("parisc: Use F_EXTEND() macro in iosapic code")
Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 1be571c20062..6bad04cbb1d3 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -157,8 +157,12 @@
 #define DBG_IRT(x...)
 #endif
 
+#ifdef CONFIG_64BIT
+#define COMPARE_IRTE_ADDR(irte, hpa)	((irte)->dest_iosapic_addr == (hpa))
+#else
 #define COMPARE_IRTE_ADDR(irte, hpa)	\
-		((irte)->dest_iosapic_addr == F_EXTEND(hpa))
+		((irte)->dest_iosapic_addr == ((hpa) | 0xffffffff00000000ULL))
+#endif
 
 #define IOSAPIC_REG_SELECT              0x00
 #define IOSAPIC_REG_WINDOW              0x10

  parent reply	other threads:[~2019-03-18 22:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 14:13 [PATCH] parisc: fix iosapic address compare Sven Schnelle
2019-03-18 15:32 ` John David Anglin
2019-03-18 22:03 ` Helge Deller [this message]
2019-03-19  6:05   ` Sven Schnelle

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=20190318220306.GA10060@ls3530.dellerweb.de \
    --to=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=svens@stackframe.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.