public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, hpa@zytor.com
Subject: Re: [BUG 2.6.31-rc1] HIGHMEM64G causes hang in PCI init on 32-bit x86
Date: Fri, 26 Jun 2009 22:25:56 -0600	[thread overview]
Message-ID: <20090627042556.GA31085@lackof.org> (raw)
In-Reply-To: <19013.29264.623540.275538@pilspetsen.it.uu.se>

On Sat, Jun 27, 2009 at 03:13:52AM +0200, Mikael Pettersson wrote:
> Mikael Pettersson writes:
...
>  > CPU: Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz stepping 06
>  > Checking 'hlt' instruction... OK.
>  > PCI: PCI BIOS revision 3.00 entry at 0xf0031, last bus=2
...
>  > pci 0000:00:1e.0: transparent bridge
>  > pci 0000:00:1f.0: PIIX/ICH IRQ router [8086:2810]
>  > 
>  > At this point the kernel hangs hard until rebooted.

...
> I've now identified commit 95ee14e4379c5e19c0897c872350570402014742
> "x86: cap iomem_resource to addressable physical memory" by hpa (cc:d)
> as the culprit. Reverting it fixes my boot hang.

Mikael,
thanks for tracking this down...can you dump the value of c->x86_phys_bits
please?

I have one question about the original commit below.

> > x86: cap iomem_resource to addressable physical memory
> > 
> > iomem_resource is by default initialized to -1, which means 64 bits of
> > physical address space if 64-bit resources are enabled.  However, x86
> > CPUs cannot address 64 bits of physical address space.  Thus, we want
> > to cap the physical address space to what the union of all CPU can
> > actually address.
> > 
> > Without this patch, we may end up assigning inaccessible values to
> > uninitialized 64-bit PCI memory resources.

In general, this makes sense to me and that's why I didn't comment
on the patch when it was originally submitted.

...
> > --- a/arch/x86/kernel/cpu/common.c
> > +++ b/arch/x86/kernel/cpu/common.c
> > @@ -853,6 +853,9 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
> >  #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
> >  	numa_add_cpu(smp_processor_id());
> >  #endif
> > +
> > +	/* Cap the iomem address space to what is addressable on all CPUs */
> > +	iomem_resource.end &= (1ULL << c->x86_phys_bits) - 1;

Does x86_phys_bits represent the number of address lines/bits handled by
the memory controller, coming out of the CPU, or handled by the
"north bridge" (IO controller)?

I was assuming all three are the same thing but that might not be true
with "QPI" or whatever Intel is calling it's serial interconnect these days.
I'm wondering if the addressing capability of the CPU->memory controller
might be different than CPU->IO Controller.

Parallel interconnects are limited by the number of lines wired to
transmit address data and I expect that's where x86_phys_bits originally
came from. Chipsets _were_ all designed around those limits.

thanks,
grant

  reply	other threads:[~2009-06-27  4:26 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 15:59 [BUG 2.6.31-rc1] HIGHMEM64G causes hang in PCI init on 32-bit x86 Mikael Pettersson
2009-06-27  1:13 ` Mikael Pettersson
2009-06-27  4:25   ` Grant Grundler [this message]
2009-06-27  5:31     ` H. Peter Anvin
2009-06-29  2:24       ` Grant Grundler
2009-06-27  9:42     ` Mikael Pettersson
2009-06-27 19:27       ` H. Peter Anvin
2009-06-27 21:34         ` Mikael Pettersson
2009-06-27  4:53   ` H. Peter Anvin
2009-06-27  9:45     ` Mikael Pettersson
2009-06-29  2:29       ` Grant Grundler
2009-06-29  5:00         ` H. Peter Anvin
2009-06-29 11:12           ` Mikael Pettersson
2009-06-29 11:21             ` Matthew Wilcox
2009-06-29 11:57               ` Mikael Pettersson
2009-06-29 18:29                 ` H. Peter Anvin
2009-06-29 22:47                   ` Yinghai Lu
2009-06-29 23:29                     ` Yinghai Lu
2009-06-30  0:27                       ` H. Peter Anvin
2009-06-30  1:14                         ` Yinghai Lu
2009-06-30  1:18                           ` H. Peter Anvin
2009-06-30  1:24                             ` Yinghai Lu
2009-06-30  2:41                               ` H. Peter Anvin
2009-06-30  1:26                           ` Linus Torvalds
2009-06-30  1:41                             ` Yinghai Lu
2009-06-30  8:45                               ` Mikael Pettersson
2009-06-30 14:48                                 ` H. Peter Anvin
2009-06-30 15:00                                   ` Rolf Eike Beer
2009-06-30 18:52                                     ` H. Peter Anvin
2009-06-30 19:33                                   ` Yinghai Lu
2009-06-30 19:44                                     ` H. Peter Anvin
2009-06-30 20:05                                       ` Yinghai Lu
2009-06-30 21:21                                         ` H. Peter Anvin
2009-06-30 21:50                                           ` Yinghai Lu
2009-06-30 22:10                                             ` Linus Torvalds
2009-06-30 22:30                                               ` Yinghai Lu
2009-06-30 22:51                                                 ` Yinghai Lu
2009-06-30 22:54                                                   ` H. Peter Anvin
2009-06-30 23:00                                                 ` Linus Torvalds
2009-06-30 23:04                                                   ` Linus Torvalds
2009-06-30 23:13                                                     ` Yinghai Lu
2009-06-30 23:19                                                       ` H. Peter Anvin
2009-07-01 19:32                                                         ` [PATCH] x86: add boundary check for 32bit res before expand e820 resource to alignment Yinghai Lu
2009-07-01 19:33                                                           ` [PATCH] fix round_up/down Yinghai Lu
2009-07-01 19:39                                                             ` Joe Perches
2009-07-01 20:02                                                               ` Andrew Morton
2009-07-02 18:10                                                           ` [PATCH] x86: add boundary check for 32bit res before expand e820 resource to alignment -v2 Yinghai Lu
2009-07-03  8:05                                                             ` Ingo Molnar
2009-06-30 23:16                                                   ` [BUG 2.6.31-rc1] HIGHMEM64G causes hang in PCI init on 32-bit x86 H. Peter Anvin
2009-06-30 20:10                                   ` Linus Torvalds
2009-06-30  1:44                             ` H. Peter Anvin
2009-06-30  0:22                     ` H. Peter Anvin
2009-06-27 19:33 ` [tip:x86/urgent] Revert "x86: cap iomem_resource to addressable physical memory" tip-bot for H. Peter Anvin
2009-06-27 21:49   ` Mikael Pettersson
2009-06-27 22:04 ` tip-bot for H. Peter Anvin
2009-06-28  7:39 ` tip-bot for H. Peter Anvin

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=20090627042556.GA31085@lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    /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