mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Ciaran McCreesh" <ciaran.mccreesh@googlemail.com>
Cc: "Bjorn Helgaas" <bjorn.helgaas@hp.com>,
	mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: kernel boot hangs after x86: insert_resorce for lapic addr after e820_reserve_resources
Date: Fri, 23 May 2008 19:29:50 -0700	[thread overview]
Message-ID: <86802c440805231929p71c28320w272f4f19cfc45e34@mail.gmail.com> (raw)
In-Reply-To: <86802c440805231851t12a83e54w78d2c120ed3d6b20@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

On Fri, May 23, 2008 at 6:51 PM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> On Fri, May 23, 2008 at 6:09 PM, Ciaran McCreesh
> <ciaran.mccreesh@googlemail.com> wrote:
>> On Fri, 23 May 2008 17:05:34 -0700
>> "Yinghai Lu" <yhlu.kernel@gmail.com> wrote:
>>> > Without the ram_reserve
>>> > patch, /proc/iomem is as it was earlier in the discussion.
>>> >
>>> >> can you boot with pnpacpi=off ?
>>> >
>>> > No, that doesn't help either.
>>>
>>> how about /proc/iomem with pnpacpi=off?
>>
>> I've attached /proc/iomem from current head minus the original patch,
>> with and without pnpacpi=off.
>
> it's weird,
>
> you should have
>
> 00000 - 9f400: System RAM  ===> is not showing up
> 100000 - d7ff0000: System RAM ===> is not showing up
> 100000000-11fffffff : System RAM

please try to revert attached commit...

it seems that your compiler is not happy...

YH

[-- Attachment #2: commit-0156126 --]
[-- Type: application/octet-stream, Size: 1186 bytes --]

commit 01561264bd1ea1d654d09babe02d784a5b150124
Author: Yinghai Lu <yhlu.kernel.send@gmail.com>
Date:   Thu Mar 20 23:57:21 2008 -0700

    x86: allocate e820 resource struct all together
    
    don't need to allocate that one by one
    
    Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index 4509757..9184e64 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -300,9 +300,10 @@ unsigned long __init e820_end_of_ram(void)
 void __init e820_reserve_resources(void)
 {
 	int i;
+	struct resource *res;
+
+	res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
 	for (i = 0; i < e820.nr_map; i++) {
-		struct resource *res;
-		res = alloc_bootmem_low(sizeof(struct resource));
 		switch (e820.map[i].type) {
 		case E820_RAM:	res->name = "System RAM"; break;
 		case E820_ACPI:	res->name = "ACPI Tables"; break;
@@ -313,6 +314,7 @@ void __init e820_reserve_resources(void)
 		res->end = res->start + e820.map[i].size - 1;
 		res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 		insert_resource(&iomem_resource, res);
+		res++;
 	}
 }
 

      reply	other threads:[~2008-05-24  2:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18  0:41 Ciaran McCreesh
2008-05-18  3:55 ` Yinghai Lu
2008-05-18 15:41   ` Ciaran McCreesh
2008-05-18 21:00     ` Yinghai Lu
2008-05-18 22:23       ` Ciaran McCreesh
2008-05-19  3:43         ` Yinghai Lu
2008-05-20  0:44           ` Ciaran McCreesh
2008-05-20  1:22             ` Yinghai Lu
2008-05-20  1:24               ` Ciaran McCreesh
2008-05-20  2:48                 ` Yinghai Lu
2008-05-20  3:16                   ` Ciaran McCreesh
2008-05-20  3:22                     ` Yinghai Lu
2008-05-20  3:25                       ` Yinghai Lu
2008-05-23 23:50                       ` Ciaran McCreesh
2008-05-24  0:05                         ` Yinghai Lu
2008-05-24  1:09                           ` Ciaran McCreesh
2008-05-24  1:51                             ` Yinghai Lu
2008-05-24  2:29                               ` Yinghai Lu [this message]

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=86802c440805231929p71c28320w272f4f19cfc45e34@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=ciaran.mccreesh@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®