From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: akataria@vmware.com
Cc: "Ingo Molnar" <mingo@elte.hu>, "Brown, Len" <len.brown@intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] cleanup e820_setup_gap
Date: Fri, 20 Jun 2008 12:50:33 -0700 [thread overview]
Message-ID: <86802c440806201250g706bb062t2d472ee0637cac4e@mail.gmail.com> (raw)
In-Reply-To: <1213990711.31598.22.camel@promb-2n-dhcp368.eng.vmware.com>
On Fri, Jun 20, 2008 at 12:38 PM, Alok Kataria <akataria@vmware.com> wrote:
> Here is the patch based on tip/master
>
> Please have a look
>
> --
>
> This is a preparatory patch for the next patch in series.
> Moves some code from e820_setup_gap to a new function e820_search_gap.
> This patch is a part of a bug fix where we walk the ACPI table to calculate
> a gap for PCI optional devices.
>
> Signed-off-by: Alok N Kataria <akataria@vmware.com>
>
> Index: linux-trees.git/arch/x86/kernel/e820.c
> ===================================================================
> --- linux-trees.git.orig/arch/x86/kernel/e820.c 2008-06-20 10:32:44.000000000 -0700
> +++ linux-trees.git/arch/x86/kernel/e820.c 2008-06-20 12:27:58.000000000 -0700
> @@ -442,26 +442,22 @@
> }
>
> /*
> - * Search for the biggest gap in the low 32 bits of the e820
> - * memory space. We pass this space to PCI to assign MMIO resources
> - * for hotplug or unconfigured devices in.
> - * Hopefully the BIOS let enough space left.
> + * Search for a gap in the e820 memory space from start_addr to 2^32.
> */
> -__init void e820_setup_gap(void)
> +__init int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
> + unsigned long start_addr)
> {
> - unsigned long gapstart, gapsize, round;
> - unsigned long long last;
> - int i;
> + unsigned long last = 0x100000000ull;
why changing "unsigned long long" to "unsigned long" ?
it will overflow on 32bit
YH
next prev parent reply other threads:[~2008-06-20 19:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 22:57 [PATCH 1/2] cleanup e820_setup_gap Alok Kataria
2008-06-20 15:32 ` Ingo Molnar
2008-06-20 19:38 ` Alok Kataria
2008-06-20 19:50 ` Yinghai Lu [this message]
2008-06-20 20:28 ` Alok Kataria
2008-06-24 12:08 ` Ingo Molnar
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=86802c440806201250g706bb062t2d472ee0637cac4e@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=akataria@vmware.com \
--cc=akpm@linux-foundation.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--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