From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org, Dave Jones <davej@redhat.com>,
Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@suse.de>
Subject: Re: [patch] x86_64: fix boot time hang in detect_calgary()
Date: Wed, 20 Dec 2006 13:34:15 +0200 [thread overview]
Message-ID: <20061220113415.GB30145@rhun.ibm.com> (raw)
In-Reply-To: <20061220105332.GA20922@elte.hu>
On Wed, Dec 20, 2006 at 11:53:32AM +0100, Ingo Molnar wrote:
> Index: linux/arch/x86_64/kernel/pci-calgary.c
> ===================================================================
> --- linux.orig/arch/x86_64/kernel/pci-calgary.c
> +++ linux/arch/x86_64/kernel/pci-calgary.c
> @@ -1052,7 +1052,7 @@ void __init detect_calgary(void)
> void *tbl;
> int calgary_found = 0;
> unsigned long ptr;
> - int offset;
> + unsigned int offset, prev_offset;
> int ret;
>
> /*
> @@ -1071,15 +1071,20 @@ void __init detect_calgary(void)
> ptr = (unsigned long)phys_to_virt(get_bios_ebda());
>
> rio_table_hdr = NULL;
> + prev_offset = 0;
> offset = 0x180;
> - while (offset) {
> + /*
> + * The next offset is stored in the 1st word.
> + * Only parse up until the offset increases:
> + */
> + while (offset > prev_offset) {
> /* The block id is stored in the 2nd word */
> if (*((unsigned short *)(ptr + offset + 2)) == 0x4752){
> /* set the pointer past the offset & block id */
> rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4);
> break;
> }
> - /* The next offset is stored in the 1st word. 0 means no more */
> + prev_offset = offset;
> offset = *((unsigned short *)(ptr + offset));
> }
> if (!rio_table_hdr) {
> -
Patch looks good to me, thanks. I'll give it a spin to verify.
Please CC me on Calgary patches.
Cheers,
Muli
next prev parent reply other threads:[~2006-12-20 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-20 10:53 Ingo Molnar
2006-12-20 11:34 ` Muli Ben-Yehuda [this message]
2006-12-20 11:53 ` Muli Ben-Yehuda
2006-12-20 15:28 ` Dave Jones
2006-12-20 15:48 ` Muli Ben-Yehuda
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=20061220113415.GB30145@rhun.ibm.com \
--to=muli@il.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
all inboxes | Powered by JetHome®