From: Pavel Emelyanov <xemul@openvz.org>
To: Yinghai Lu <Yinghai.Lu@Sun.COM>
Cc: "Kok, Auke" <auke-jan.h.kok@intel.com>,
e1000-devel@lists.sourceforge.net,
Linux Netdev List <netdev@vger.kernel.org>,
jesse.brandeburg@intel.com, john.ronciak@intel.com,
Thomas Gleixner <tglx@linutronix.de>,
jeffrey.t.kirsher@intel.com, Denis Lunev <den@openvz.org>,
Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>,
Justin Piszcz <jpiszcz@lucidpixels.com>
Subject: Re: [e1000][net-2.6 tree] Regression: driver doesn't detect card on my node.
Date: Wed, 06 Feb 2008 12:30:16 +0300 [thread overview]
Message-ID: <47A97E28.1010400@openvz.org> (raw)
In-Reply-To: <200802060119.25278.yinghai.lu@sun.com>
Yinghai Lu wrote:
> On Wednesday 06 February 2008 12:41:15 am Pavel Emelyanov wrote:
>> Yinghai Lu wrote:
>>> On Tuesday 05 February 2008 11:10:24 pm Pavel Emelyanov wrote:
>>>> [snip]
>>>>
>>>>>>> What other info from me is required?
>>>>> boot log please. with the patch and reverting the patch.
>>>> Here they are (attached).
>>>> BTW, I found, that the sky2 adapter is broken by this patch as well.
>>>> To simplify the analysis, here's their diff:
>>>>
>>>> --- bad-log 2008-02-06 10:06:40.000000000 +0300
>>>> +++ good-log 2008-02-06 10:06:40.000000000 +0300
>>>> @@ -1,4 +1,4 @@
>>>> -Linux version 2.6.24 (pavel@xemulnb) (gcc version 4.1.3 20070724 (prerelease) (SUSE Linux)) #22 SMP Tue Feb 5 20:09:11 MSK 2008
>>>> +Linux version 2.6.24 (pavel@xemulnb) (gcc version 4.1.3 20070724 (prerelease) (SUSE Linux)) #23 SMP Wed Feb 6 10:03:53 MSK 2008
>>>> BIOS-provided physical RAM map:
>>>> BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
>>>> BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
>>>> @@ -19,29 +19,6 @@ Scan SMP from c0000000 for 1024 bytes.
>>>> Scan SMP from c009fc00 for 1024 bytes.
>>>> Scan SMP from c00f0000 for 65536 bytes.
>>>> found SMP MP-table at [c00ff780] 000ff780
>>>> -***************
>>>> -**** WARNING: likely BIOS bug
>>>> -**** MTRRs don't cover all of memory, trimmed 786432 pages
>>>> -***************
>>>> -update e820 for mtrr
>>>> -modified physical RAM map:
>>>> - modified: 0000000000000000 - 000000000009f800 (usable)
>>>> - modified: 000000000009f800 - 00000000000a0000 (reserved)
>>>> - modified: 00000000000e0000 - 0000000000100000 (reserved)
>>>> - modified: 0000000000100000 - 0000000040000000 (usable)
>>>> - modified: 0000000040000000 - 00000000bfff0000 (reserved)
>>>> - modified: 00000000bfff0000 - 00000000bffff000 (ACPI data)
>>>> - modified: 00000000bffff000 - 00000000c0000000 (ACPI NVS)
>>>> - modified: 00000000c0000000 - 0000000100000000 (reserved)
>>>> - modified: 0000000100000000 - 0000000140000000 (usable)
>>> the root cause could be your mtrr last entry for RAM has strange type
>>>
>>> please apply the following line to print the mtrr before trimming to current linus tree.
>> OK, here's the dmesg diff:
>> --- bad-log 2008-02-06 10:01:21.000000000 +0300
>> +++ bad-log-info 2008-02-06 11:37:51.000000000 +0300
>> @@ -19,6 +19,14 @@ Scan SMP from c0000000 for 1024 bytes.
>> Scan SMP from c009fc00 for 1024 bytes.
>> Scan SMP from c00f0000 for 65536 bytes.
>> found SMP MP-table at [c00ff780] 000ff780
>> +i=0 c0000 - 100000 0
>> +i=1 0 - 100000 6
>> +i=2 100000 - 140000 6
>> +i=3 0 - 0 0
>> +i=4 0 - 0 0
>> +i=5 0 - 0 0
>> +i=6 0 - 0 0
>> +i=7 0 - 0 0
>> ***************
>> **** WARNING: likely BIOS bug
>> **** MTRRs don't cover all of memory, trimmed 786432 pages
>
> please try following patch
Today's Linus tree works perfect with this patch, thanks :)
BTW, this also fixed the broken sky2 adapter.
> diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
> index 1e27b69..4e7490f 100644
> --- a/arch/x86/kernel/cpu/mtrr/main.c
> +++ b/arch/x86/kernel/cpu/mtrr/main.c
> @@ -659,7 +659,7 @@ static __init int amd_special_default_mtrr(void)
> */
> int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
> {
> - unsigned long i, base, size, highest_addr = 0, def, dummy;
> + unsigned long i, base, size, highest_pfn = 0, def, dummy;
> mtrr_type type;
> u64 trim_start, trim_size;
>
> @@ -682,28 +682,27 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
> mtrr_if->get(i, &base, &size, &type);
> if (type != MTRR_TYPE_WRBACK)
> continue;
> - base <<= PAGE_SHIFT;
> - size <<= PAGE_SHIFT;
> - if (highest_addr < base + size)
> - highest_addr = base + size;
> + if (highest_pfn < base + size)
> + highest_pfn = base + size;
> }
>
> /* kvm/qemu doesn't have mtrr set right, don't trim them all */
> - if (!highest_addr) {
> + if (!highest_pfn) {
> printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n");
> WARN_ON(1);
> return 0;
> }
>
> - if ((highest_addr >> PAGE_SHIFT) < end_pfn) {
> + if (highest_pfn < end_pfn) {
> printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover"
> " all of memory, losing %LdMB of RAM.\n",
> - (((u64)end_pfn << PAGE_SHIFT) - highest_addr) >> 20);
> + (end_pfn - highest_pfn) >> (20 - PAGE_SHIFT));
>
> WARN_ON(1);
>
> printk(KERN_INFO "update e820 for mtrr\n");
> - trim_start = highest_addr;
> + trim_start = highest_pfn;
> + trim_start <<= PAGE_SHIFT;
> trim_size = end_pfn;
> trim_size <<= PAGE_SHIFT;
> trim_size -= trim_start;
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-02-06 9:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 17:18 [e1000][net-2.6 tree] Regression: driver doesn't detect card on my node Pavel Emelyanov
2008-02-05 17:24 ` Kok, Auke
2008-02-05 17:43 ` Yinghai Lu
2008-02-06 7:10 ` Pavel Emelyanov
2008-02-06 8:20 ` Yinghai Lu
2008-02-06 8:41 ` Pavel Emelyanov
2008-02-06 9:19 ` Yinghai Lu
2008-02-06 9:30 ` Pavel Emelyanov [this message]
2008-02-06 9:49 ` [PATCH] x86_32: fix regression caused by trim ram according to mtrr on system with 4G more RAM Yinghai Lu
2008-02-06 9:51 ` Ingo Molnar
2008-02-06 9:51 ` Ingo Molnar
2008-02-06 7:27 ` [e1000][net-2.6 tree] Regression: driver doesn't detect card on my node Pavel Emelyanov
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=47A97E28.1010400@openvz.org \
--to=xemul@openvz.org \
--cc=Yinghai.Lu@Sun.COM \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=den@openvz.org \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=jpiszcz@lucidpixels.com \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.