From: Roland Dreier <rdreier@cisco.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Thomas Mingarelli <thomas.mingarelli@hp.com>
Subject: Re: hpwdt oops in clflush_cache_range
Date: Wed, 27 Feb 2008 13:35:08 -0800 [thread overview]
Message-ID: <adave4axeur.fsf@cisco.com> (raw)
In-Reply-To: <ada3areyu7x.fsf@cisco.com> (Roland Dreier's message of "Wed, 27 Feb 2008 13:17:54 -0800")
> the ioremap there is trying to remap 0x7b6 bytes at an address of
> 0x240047000ee000 -- either the BIOS data is bogus or the driver is
> getting at it the wrong way.
Looking at the code, it seems that maybe only the low 32 bits of the
address are supposed to be used. With a 32-bit kernel the address
in smbios_entry_point.table_address would be silently truncated to 32
bits, and on my 64-bit kernel, the patch below seems to make things
work... (ie the driver seems happy -- I didn't actually try the
watchdog, and in fact this whole exercise just started with me seeing
the new config option and saying "Hey I've got an HP box with ilo2!"
rather than any desire to actually use the feature)
I have to say this driver looks a little iffy -- a huge chunk of the
code is inside a big
#ifndef CONFIG_X86_64
...
#else
...
#endif
and the code where the crash happens has:
static int __devinit smbios_present(const char __iomem *p)
{
struct smbios_entry_point *eps =
(struct smbios_entry_point *) p;
and then blithely dereferences the eps pointer, which I guess works
fine on x86 but is not exactly how we encourage people to use __iomem
pointers.
- R.
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index a2e174b..21efdfa 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -511,7 +511,7 @@ static int __devinit smbios_present(const char __iomem *p)
(strncmp((char *)eps->intermediate_anchor, "_DMI_",
sizeof(eps->intermediate_anchor)) == 0) &&
(bios_checksum(p+0x10, 15))) {
- buf = ioremap(eps->table_address, eps->table_length);
+ buf = ioremap(eps->table_address & 0xffffffff, eps->table_length);
if (buf == NULL)
return -ENODEV;
next prev parent reply other threads:[~2008-02-27 21:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 17:08 hpwdt oops in clflush_cache_range Roland Dreier
2008-02-27 17:37 ` Mingarelli, Thomas
2008-02-27 18:14 ` Thomas Gleixner
2008-02-27 18:38 ` Roland Dreier
2008-02-27 19:48 ` Thomas Gleixner
2008-02-27 20:36 ` Ingo Molnar
2008-02-27 20:42 ` Thomas Gleixner
2008-02-27 20:44 ` Ingo Molnar
2008-02-27 20:59 ` Thomas Gleixner
2008-02-27 21:14 ` Ingo Molnar
2008-02-27 21:17 ` Roland Dreier
2008-02-27 21:35 ` Roland Dreier [this message]
2008-02-27 23:44 ` Mingarelli, Thomas
2008-02-28 0:12 ` Roland Dreier
2008-02-28 3:09 ` Mingarelli, Thomas
[not found] ` <E14D1C2A44812C4F9C3ED321127EDF6505829D5D6C@G3W0854.americas.hpqcorp.net>
2008-02-28 17:38 ` [PATCH] [WATCHDOG] Fix declaration of struct smbios_entry_point in hpwdt Roland Dreier
2008-02-28 17:48 ` [PATCH for 2.6.26] [WATCHDOG] Fix return value warning " Roland Dreier
2008-02-28 20:34 ` [PATCH] [WATCHDOG] hpwdt: Use dmi_walk() instead of own copy Roland Dreier
2008-02-28 21:24 ` Mingarelli, Thomas
2008-02-28 21:26 ` Wim Van Sebroeck
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=adave4axeur.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=thomas.mingarelli@hp.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