2008-10-30 23:44:38

by Jonathan Corbet

[permalink] [raw]
Subject: 2.6.28-rc2 hates my e1000e

I tried booting -rc2 on my desktop system today. All seems well until
I try to access the net; eth0 doesn't exist anymore. dmesg tells me:

Oct 30 17:29:38 bike kernel: e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
Oct 30 17:29:38 bike kernel: e1000e: Copyright (c) 1999-2008 Intel Corporation.
Oct 30 17:29:38 bike kernel: e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
Oct 30 17:29:38 bike kernel: e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
Oct 30 17:29:38 bike kernel: e1000e 0000:00:19.0: PCI INT A disabled
Oct 30 17:29:38 bike kernel: e1000e: probe of 0000:00:19.0 failed with error -16

Here's what lspci thinks of my device:

00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
Subsystem: Dell OptiPlex 755
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 21
Region 0: Memory at fe9e0000 (32-bit, non-prefetchable) [size=128K]
Region 1: Memory at fe9db000 (32-bit, non-prefetchable) [size=4K]
Region 2: I/O ports at ecc0 [size=32]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [e0] PCIe advanced features <?>
Kernel modules: e1000e

Interestingly, under 2.6.27 it reads thus:

00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
Subsystem: Dell OptiPlex 755
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 4350
Region 0: Memory at d4200000 (32-bit, non-prefetchable) [size=128K]
Region 1: Memory at d4225000 (32-bit, non-prefetchable) [size=4K]
Region 2: I/O ports at ecc0 [size=32]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable+
Address: 00000000fee0200c Data: 4181
Capabilities: [e0] PCIe advanced features <?>
Kernel driver in use: e1000e

The I/O memory has moved, I have no idea why. I assume that's a feature?

So...what else can I do to help track this one down?

Thanks,

jon


2008-10-31 00:45:51

by Robert Hancock

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

Jonathan Corbet wrote:
> I tried booting -rc2 on my desktop system today. All seems well until
> I try to access the net; eth0 doesn't exist anymore. dmesg tells me:
>
> Oct 30 17:29:38 bike kernel: e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
> Oct 30 17:29:38 bike kernel: e1000e: Copyright (c) 1999-2008 Intel Corporation.
> Oct 30 17:29:38 bike kernel: e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
> Oct 30 17:29:38 bike kernel: e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
> Oct 30 17:29:38 bike kernel: e1000e 0000:00:19.0: PCI INT A disabled
> Oct 30 17:29:38 bike kernel: e1000e: probe of 0000:00:19.0 failed with error -16
>
> Here's what lspci thinks of my device:
>
> 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
> Subsystem: Dell OptiPlex 755
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> Interrupt: pin A routed to IRQ 21
> Region 0: Memory at fe9e0000 (32-bit, non-prefetchable) [size=128K]
> Region 1: Memory at fe9db000 (32-bit, non-prefetchable) [size=4K]
> Region 2: I/O ports at ecc0 [size=32]
> Capabilities: [c8] Power Management version 2
> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=1 PME-
> Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable-
> Address: 0000000000000000 Data: 0000
> Capabilities: [e0] PCIe advanced features <?>
> Kernel modules: e1000e
>
> Interestingly, under 2.6.27 it reads thus:
>
> 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
> Subsystem: Dell OptiPlex 755
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0
> Interrupt: pin A routed to IRQ 4350
> Region 0: Memory at d4200000 (32-bit, non-prefetchable) [size=128K]
> Region 1: Memory at d4225000 (32-bit, non-prefetchable) [size=4K]
> Region 2: I/O ports at ecc0 [size=32]
> Capabilities: [c8] Power Management version 2
> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> Status: D0 PME-Enable- DSel=0 DScale=1 PME-
> Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable+
> Address: 00000000fee0200c Data: 4181
> Capabilities: [e0] PCIe advanced features <?>
> Kernel driver in use: e1000e
>
> The I/O memory has moved, I have no idea why. I assume that's a feature?
>
> So...what else can I do to help track this one down?

What's in /proc/iomem? Full dmesg output from boot would also be useful.

2008-10-31 02:59:15

by Jonathan Corbet

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Thu, 30 Oct 2008 18:45:38 -0600
Robert Hancock <[email protected]> wrote:

> What's in /proc/iomem? Full dmesg output from boot would also be
> useful.

/proc/iomem looks like this with 2.6.28-rc2:

00000000-0009fbff : System RAM
000f0000-000fffff : reserved
00100000-be4ff7ff : System RAM
00200000-004a6e45 : Kernel code
004a6e46-00649b77 : Kernel data
006c4000-007585ff : Kernel bss
be4ff800-be553bff : ACPI Non-volatile Storage
be553c00-be555bff : ACPI Tables
be555c00-beffffff : reserved
c0000000-cfffffff : 0000:00:02.0
d0000000-d3ffffff : PCI Bus 0000:02
d0000000-d3ffffff : 0000:02:00.0
d0000000-d07fffff : ivtv encoder
d2000000-d200ffff : ivtv registers
d4000000-d4000fff : Intel Flush Page
e0000000-fe7fffff : reserved
fe800000-fe8fffff : PCI Bus 0000:01
fe800000-fe8fffff : reserved
fe900000-fe9d9aff : reserved
fe9d9b00-fe9d9bff : 0000:00:1f.3
fe9d9b00-fe9d9bff : reserved
fe9d9c00-fe9d9fff : 0000:00:1a.7
fe9d9c00-fe9d9fff : reserved
fe9da000-fe9dafff : 0000:00:03.3
fe9da000-fe9dafff : reserved
fe9db000-fe9dbfff : 0000:00:19.0
fe9db000-fe9dbfff : reserved
fe9dc000-fe9dffff : 0000:00:1b.0
fe9dc000-fe9dffff : reserved
fe9e0000-fe9fffff : 0000:00:19.0
fe9e0000-fe9fffff : reserved
fea00000-fea7ffff : 0000:00:02.0
fea00000-fea7ffff : reserved
fea80000-feafffff : 0000:00:02.1
fea80000-feafffff : reserved
feb00000-febfffff : 0000:00:02.0
feb00000-febfffff : reserved
fec00000-fed003ff : reserved
fec00000-fec00fff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed20000-fed9ffff : reserved
fedad000-fedad00f : 0000:00:03.0
fee00000-feefffff : reserved
fee00000-fee00fff : Local APIC
ff980800-ff980bff : 0000:00:1d.7
ff980800-ff980bff : ehci_hcd
ffb00000-ffffffff : reserved

Remember that I/O memory is alleged to be at:

> Region 0: Memory at fe9e0000 (32-bit, non-prefetchable) [size=128K]
> Region 1: Memory at fe9db000 (32-bit, non-prefetchable) [size=4K]

These regions are marked "reserved" in this map.

The 2.6.27 view of I/O memory is rather different:

00000000-0009fbff : System RAM
000f0000-000fffff : reserved
00100000-be4ff7ff : System RAM
00200000-004b4d12 : Kernel code
004b4d13-0073000f : Kernel data
011b6000-0127e58f : Kernel bss
be4ff800-be553bff : ACPI Non-volatile Storage
be553c00-be555bff : ACPI Tables
be555c00-beffffff : reserved
c0000000-cfffffff : 0000:00:02.0
d0000000-d3ffffff : PCI Bus 0000:02
d0000000-d3ffffff : 0000:02:00.0
d0000000-d07fffff : ivtv encoder
d2000000-d200ffff : ivtv registers
d4000000-d40fffff : 0000:00:02.0
d4100000-d417ffff : 0000:00:02.0
d4180000-d41fffff : 0000:00:02.1
d4200000-d421ffff : 0000:00:19.0
d4200000-d421ffff : e1000e
d4220000-d4223fff : 0000:00:1b.0
d4220000-d4223fff : ICH HD audio
d4224000-d4224fff : 0000:00:03.3
d4225000-d4225fff : 0000:00:19.0
d4225000-d4225fff : e1000e
d4226000-d42263ff : 0000:00:1a.7
d4226000-d42263ff : ehci_hcd
d4226400-d42264ff : 0000:00:1f.3
d4227000-d4227fff : Intel Flush Page
e0000000-fed003ff : reserved
fec00000-fec00fff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed20000-fed9ffff : reserved
fedad000-fedad00f : 0000:00:03.0
fee00000-feefffff : reserved
fee00000-fee00fff : Local APIC
ff980800-ff980bff : 0000:00:1d.7
ff980800-ff980bff : ehci_hcd
ffb00000-ffffffff : reserved

The 2.6.28-rc2 dmesg output follows.

> GSI 23 (level, low) -> IRQ 23
[ 5.480562] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[ 5.480565] ehci_hcd 0000:00:1d.7: EHCI Host Controller
[ 5.480688] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
[ 5.484666] ehci_hcd 0000:00:1d.7: debug port 1
[ 5.484719] ehci_hcd 0000:00:1d.7: cache line size of 32 is not supported
[ 5.484734] ehci_hcd 0000:00:1d.7: irq 23, io mem 0xff980800
[ 5.496687] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[ 5.496900] usb usb1: configuration #1 chosen from 1 choice
[ 5.497008] hub 1-0:1.0: USB hub found
[ 5.497062] hub 1-0:1.0: 6 ports detected
[ 5.497327] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 5.497382] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.497455] usb usb1: Product: EHCI Host Controller
[ 5.497505] usb usb1: Manufacturer: Linux 2.6.28-rc2 ehci_hcd
[ 5.497557] usb usb1: SerialNumber: 0000:00:1d.7
[ 5.497647] uhci_hcd: USB Universal Host Controller Interface driver
[ 5.497726] uhci_hcd 0000:00:1a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 5.497786] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[ 5.497789] uhci_hcd 0000:00:1a.0: UHCI Host Controller
[ 5.497884] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 2
[ 5.497986] uhci_hcd 0000:00:1a.0: irq 16, io base 0x0000ff20
[ 5.498146] usb usb2: configuration #1 chosen from 1 choice
[ 5.498250] hub 2-0:1.0: USB hub found
[ 5.498303] hub 2-0:1.0: 2 ports detected
[ 5.498520] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.498576] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.498648] usb usb2: Product: UHCI Host Controller
[ 5.498698] usb usb2: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.498751] usb usb2: SerialNumber: 0000:00:1a.0
[ 5.498818] uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 5.498878] uhci_hcd 0000:00:1a.1: setting latency timer to 64
[ 5.498881] uhci_hcd 0000:00:1a.1: UHCI Host Controller
[ 5.498976] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 3
[ 5.499079] uhci_hcd 0000:00:1a.1: irq 17, io base 0x0000ff00
[ 5.499255] usb usb3: configuration #1 chosen from 1 choice
[ 5.499358] hub 3-0:1.0: USB hub found
[ 5.499416] hub 3-0:1.0: 2 ports detected
[ 5.499634] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.499690] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.499762] usb usb3: Product: UHCI Host Controller
[ 5.499813] usb usb3: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.499865] usb usb3: SerialNumber: 0000:00:1a.1
[ 5.499931] uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 23 (level, low) -> IRQ 23
[ 5.499990] uhci_hcd 0000:00:1d.0: setting latency timer to 64
[ 5.499993] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[ 5.500098] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 4
[ 5.500193] uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000ff80
[ 5.500359] usb usb4: configuration #1 chosen from 1 choice
[ 5.500463] hub 4-0:1.0: USB hub found
[ 5.500515] hub 4-0:1.0: 2 ports detected
[ 5.500736] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.500792] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.500865] usb usb4: Product: UHCI Host Controller
[ 5.503087] usb usb4: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.503139] usb usb4: SerialNumber: 0000:00:1d.0
[ 5.503205] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 5.503265] uhci_hcd 0000:00:1d.1: setting latency timer to 64
[ 5.503268] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[ 5.503369] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 5
[ 5.503463] uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000ff60
[ 5.503627] usb usb5: configuration #1 chosen from 1 choice
[ 5.503737] hub 5-0:1.0: USB hub found
[ 5.503789] hub 5-0:1.0: 2 ports detected
[ 5.504020] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.504076] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.504149] usb usb5: Product: UHCI Host Controller
[ 5.504199] usb usb5: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.504251] usb usb5: SerialNumber: 0000:00:1d.1
[ 5.504317] uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 5.504376] uhci_hcd 0000:00:1d.2: setting latency timer to 64
[ 5.504379] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[ 5.504485] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 6
[ 5.504580] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ff40
[ 5.504751] usb usb6: configuration #1 chosen from 1 choice
[ 5.504858] hub 6-0:1.0: USB hub found
[ 5.504910] hub 6-0:1.0: 2 ports detected
[ 5.505145] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.505201] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.505274] usb usb6: Product: UHCI Host Controller
[ 5.505324] usb usb6: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.505376] usb usb6: SerialNumber: 0000:00:1d.2
[ 5.505526] usbcore: registered new interface driver usblp
[ 5.505580] Initializing USB Mass Storage driver...
[ 5.505690] usbcore: registered new interface driver usb-storage
[ 5.505745] USB Mass Storage support registered.
[ 5.505951] PNP: No PS/2 controller found. Probing ports directly.
[ 5.508550] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 5.508603] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 5.508780] mice: PS/2 mouse device common for all mice
[ 5.509019] coretemp coretemp.0: Using relative temperature scale!
[ 5.509172] coretemp coretemp.1: Using relative temperature scale!
[ 5.509284] EDAC MC: Ver: 2.1.0 Oct 30 2008
[ 5.509919] TCP bic registered
[ 5.509967] NET: Registered protocol family 17
[ 5.510236] registered taskstats version 1
[ 5.634462] kjournald starting. Commit interval 5 seconds
[ 5.634555] EXT3-fs: mounted filesystem with ordered data mode.
[ 5.634623] VFS: Mounted root (ext3 filesystem) readonly.
[ 5.634686] Freeing unused kernel memory: 340k freed
[ 5.803374] usb 1-3: new high speed USB device using ehci_hcd and address 2
[ 5.927226] usb 1-3: configuration #1 chosen from 1 choice
[ 5.927526] hub 1-3:1.0: USB hub found
[ 5.927678] hub 1-3:1.0: 4 ports detected
[ 5.928869] usb 1-3: New USB device found, idVendor=050d, idProduct=0234
[ 5.928925] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 6.140038] usb 2-2: new low speed USB device using uhci_hcd and address 2
[ 6.314237] usb 2-2: configuration #1 chosen from 1 choice
[ 6.317404] usb 2-2: New USB device found, idVendor=046d, idProduct=c01b
[ 6.317462] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.317518] usb 2-2: Product: USB-PS/2 Optical Mouse
[ 6.317569] usb 2-2: Manufacturer: Logitech
[ 6.543376] usb 6-2: new full speed USB device using uhci_hcd and address 2
[ 6.716827] usb 6-2: configuration #1 chosen from 1 choice
[ 6.719722] hub 6-2:1.0: USB hub found
[ 6.721625] hub 6-2:1.0: 3 ports detected
[ 6.726875] usb 6-2: New USB device found, idVendor=046d, idProduct=0b04
[ 6.726940] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.726999] usb 6-2: Product: Logitech BT Mini-Receiver
[ 6.727053] usb 6-2: Manufacturer: Logitech
[ 6.994617] usb 6-2.2: new full speed USB device using uhci_hcd and address 3
[ 7.138819] usb 6-2.2: configuration #1 chosen from 1 choice
[ 7.144935] usb 6-2.2: New USB device found, idVendor=046d, idProduct=c713
[ 7.144993] usb 6-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7.145070] usb 6-2.2: Product: Logitech BT Mini-Receiver
[ 7.145123] usb 6-2.2: Manufacturer: Logitech
[ 7.145174] usb 6-2.2: SerialNumber: 0007617AC3F9
[ 7.211612] usb 6-2.3: new full speed USB device using uhci_hcd and address 4
[ 7.359357] usb 6-2.3: configuration #1 chosen from 1 choice
[ 7.364932] usb 6-2.3: New USB device found, idVendor=046d, idProduct=c714
[ 7.364934] usb 6-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7.364937] usb 6-2.3: Product: Logitech BT Mini-Receiver
[ 7.364939] usb 6-2.3: Manufacturer: Logitech
[ 7.364940] usb 6-2.3: SerialNumber: 0007617AC3F9
[ 8.984747] input: Power Button (FF) as /class/input/input0
[ 9.006919] ACPI: Power Button (FF) [PWRF]
[ 9.007004] input: Power Button (CM) as /class/input/input1
[ 9.021113] ACPI: Power Button (CM) [VBTN]
[ 9.048989] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 9.049031] scsi 0:0:1:0: Attached scsi generic sg1 type 5
[ 9.049071] sd 1:0:0:0: Attached scsi generic sg2 type 0
[ 9.060794] processor ACPI0007:00: registered as cooling_device0
[ 9.060845] processor ACPI0007:01: registered as cooling_device1
[ 9.065667] i801_smbus 0000:00:1f.3: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 9.073608] Serial: 8250/16550 driver4 ports, IRQ sharing disabled
[ 9.073725] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 9.080203] e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
[ 9.080206] e1000e: Copyright (c) 1999-2008 Intel Corporation.
[ 9.080270] e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 9.080277] e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
[ 9.080284] e1000e 0000:00:19.0: PCI INT A disabled
[ 9.080290] e1000e: probe of 0000:00:19.0 failed with error -16
[ 9.080958] input: Logitech USB-PS/2 Optical Mouse as /class/input/input2
[ 9.196488] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 9.204233] generic-usb 0003:046D:C01B.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1a.0-2/input0
[ 9.210127] input: Logitech Logitech BT Mini-Receiver as /class/input/input3
[ 9.219007] Driver 'sr' needs updating - please use bus_type methods
[ 9.257039] generic-usb 0003:046D:C713.0002: input,hidraw1: USB HID v1.11 Keyboard [Logitech Logitech BT Mini-Receiver] on usb-0000:00:1d.2-2.2/input0
[ 9.258865] sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[ 9.258870] Uniform CD-ROM driver Revision: 3.20
[ 9.258979] sr 0:0:1:0: Attached scsi CD-ROM sr0
[ 9.260082] usbcore: registered new interface driver usbhid
[ 9.260085] usbhid: v2.6:USB HID core driver
[ 9.360339] input: Logitech Logitech BT Mini-Receiver as /class/input/input4
[ 9.361821] serial 0000:00:03.3: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 9.362186] 0000:00:03.3: ttyS1 at I/O 0xec98 (irq = 17) is a 16550A
[ 9.393684] logitech 0003:046D:C714.0003: input,hidraw2: USB HID v1.11 Mouse [Logitech Logitech BT Mini-Receiver] on usb-0000:00:1d.2-2.3/input0
[ 9.791132] Linux video capture interface: v2.00
[ 9.827980] i2c_algo_bit: exports duplicate symbol i2c_bit_add_numbered_bus (owned by kernel)
[ 9.838420] ivtv: Start initialization, version 1.4.0
[ 9.838493] ivtv0: Initializing card #0
[ 9.838495] ivtv0: Autodetected Hauppauge card (cx23416 based)
[ 9.838563] ivtv 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 9.892690] tveeprom 1-0050: Hauppauge model 32062, rev C199, serial# 8510288
[ 9.892694] tveeprom 1-0050: tuner model is TCL 2002N 5H (idx 99, type 50)
[ 9.892697] tveeprom 1-0050: TV standards NTSC(M) (eeprom 0x08)
[ 9.892699] tveeprom 1-0050: audio processor is MSP3445 (idx 12)
[ 9.892701] tveeprom 1-0050: decoder processor is SAA7115 (idx 19)
[ 9.892704] tveeprom 1-0050: has no radio, has IR receiver, has no IR transmitter
[ 9.892706] ivtv0: Autodetected Hauppauge WinTV PVR-250
[ 9.947760] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 9.947771] HDA Intel 0000:00:1b.0: BAR 0: can't reserve mem region [0xfe9dc000-0xfe9dffff]
[ 9.947776] HDA Intel 0000:00:1b.0: PCI INT A disabled
[ 9.947789] HDA Intel: probe of 0000:00:1b.0 failed with error -16
[ 9.985899] saa7115 1-0021: saa7115 found (1f7115d0e100000) @ 0x42 (ivtv i2c driver #0)
[ 10.121484] msp3400 1-0040: MSP3445G-B8 found @ 0x80 (ivtv i2c driver #0)
[ 10.121486] msp3400 1-0040: msp3400 supports radio, mode is autodetect and autoselect
[ 10.122792] tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
[ 10.122800] simple_tuner_attach: driver disabled by Kconfig
[ 10.123193] ivtv0: Registered device video0 for encoder MPG (4096 kB)
[ 10.123227] ivtv0: Registered device video32 for encoder YUV (2048 kB)
[ 10.123260] ivtv0: Registered device vbi0 for encoder VBI (1024 kB)
[ 10.123293] ivtv0: Registered device video24 for encoder PCM (320 kB)
[ 10.123296] ivtv0: Initialized card #0: Hauppauge WinTV PVR-250
[ 10.123316] ivtv: End initialization
[ 12.984403] EXT3 FS on sda7, internal journal
[ 13.293069] kjournald starting. Commit interval 5 seconds
[ 13.293232] EXT3 FS on sda1, internal journal
[ 13.293240] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.334912] kjournald starting. Commit interval 5 seconds
[ 13.335067] EXT3 FS on sda8, internal journal
[ 13.335074] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.346061] kjournald starting. Commit interval 5 seconds
[ 13.346203] EXT3 FS on sda6, internal journal
[ 13.346210] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.363127] kjournald starting. Commit interval 5 seconds
[ 13.363274] EXT3 FS on sda5, internal journal
[ 13.363281] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.386583] kjournald starting. Commit interval 5 seconds
[ 13.386747] EXT3 FS on sda2, internal journal
[ 13.386754] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.411607] kjournald starting. Commit interval 5 seconds
[ 13.411738] EXT3 FS on sda3, internal journal
[ 13.411744] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.426394] kjournald starting. Commit interval 5 seconds
[ 13.426698] EXT3 FS on sdb1, internal journal
[ 13.426705] EXT3-fs: mounted filesystem with ordered data mode.
[ 14.732391] Adding 1020088k swap on /dev/sda9. Priority:-1 extents:1 across:1020088k
[ 15.130376] platform microcode: firmware: requesting intel-ucode/06-0f-0d
[ 15.147907] platform microcode: firmware: requesting intel-ucode/06-0f-0d
[ 15.151183] Microcode Update Driver: v2.00 <[email protected]> <[email protected]>
[ 15.357831] microcode: CPU0 updated from revision 0xa1 to 0xa3, date = 2007-08-13
[ 15.359162] microcode: CPU1 updated from revision 0xa1 to 0xa3, date = 2007-08-13
[ 15.382263] Microcode Update Driver: v2.00 removed.
[ 16.935369] RPC: Registered udp transport module.
[ 16.935373] RPC: Registered tcp transport module.
[ 17.620320] fuse init (API version 7.10)
[ 23.180051] ivtv 0000:02:00.0: firmware: requesting v4l-cx2341x-enc.fw
[ 23.381383] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
[ 23.580158] ivtv0: Encoder revision: 0x02060039
[ 23.601314] tuner 1-0061: Tuner has no way to set tv freq
[ 23.666053] tuner 1-0061: Tuner has no way to set tv freq
[ 26.775435] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 26.775439] pci 0000:00:02.0: enabling bus mastering
[ 26.775443] pci 0000:00:02.0: setting latency timer to 64
[ 26.775508] pci 0000:00:02.0: irq 46 for MSI/MSI-X
[ 26.775657] [drm] Initialized i915 1.6.0 20080730 on minor 0
[ 26.788761] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining

Thanks,

jon

2008-10-31 04:08:19

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Thu, Oct 30, 2008 at 7:58 PM, Jonathan Corbet <[email protected]> wrote:
> On Thu, 30 Oct 2008 18:45:38 -0600
> Robert Hancock <[email protected]> wrote:
>
>> What's in /proc/iomem? Full dmesg output from boot would also be
>> useful.
>
> /proc/iomem looks like this with 2.6.28-rc2:
>
> 00000000-0009fbff : System RAM
> 000f0000-000fffff : reserved
> 00100000-be4ff7ff : System RAM
> 00200000-004a6e45 : Kernel code
> 004a6e46-00649b77 : Kernel data
> 006c4000-007585ff : Kernel bss
> be4ff800-be553bff : ACPI Non-volatile Storage
> be553c00-be555bff : ACPI Tables
> be555c00-beffffff : reserved
> c0000000-cfffffff : 0000:00:02.0
> d0000000-d3ffffff : PCI Bus 0000:02
> d0000000-d3ffffff : 0000:02:00.0
> d0000000-d07fffff : ivtv encoder
> d2000000-d200ffff : ivtv registers
> d4000000-d4000fff : Intel Flush Page
> e0000000-fe7fffff : reserved
> fe800000-fe8fffff : PCI Bus 0000:01
> fe800000-fe8fffff : reserved
> fe900000-fe9d9aff : reserved
> fe9d9b00-fe9d9bff : 0000:00:1f.3
> fe9d9b00-fe9d9bff : reserved
> fe9d9c00-fe9d9fff : 0000:00:1a.7
> fe9d9c00-fe9d9fff : reserved
> fe9da000-fe9dafff : 0000:00:03.3
> fe9da000-fe9dafff : reserved
> fe9db000-fe9dbfff : 0000:00:19.0
> fe9db000-fe9dbfff : reserved
> fe9dc000-fe9dffff : 0000:00:1b.0
> fe9dc000-fe9dffff : reserved
> fe9e0000-fe9fffff : 0000:00:19.0
> fe9e0000-fe9fffff : reserved

your BIOS allocate that to your nic, and also it put that in reserved
in e820 table.

so before 2.6.28. kernel will allocate another resource to your BAR.

for 2.6.28, it change to honor PCI BAR than others...and at same time
use reserve_region_with_split ...
put the overlapping to reserved..

so solution will be:
1.rework reserve_region_with_split not to put the overlapping to reserved...
2. or update pci_request_region to check if conflicts is with name "reserved"

BTW:
please send out
dmesg -s 262144 > dmesg.txt

YH



> fea00000-fea7ffff : 0000:00:02.0
> fea00000-fea7ffff : reserved
> fea80000-feafffff : 0000:00:02.1
> fea80000-feafffff : reserved
> feb00000-febfffff : 0000:00:02.0
> feb00000-febfffff : reserved
> fec00000-fed003ff : reserved
> fec00000-fec00fff : IOAPIC 0
> fed00000-fed003ff : HPET 0
> fed20000-fed9ffff : reserved
> fedad000-fedad00f : 0000:00:03.0
> fee00000-feefffff : reserved
> fee00000-fee00fff : Local APIC
> ff980800-ff980bff : 0000:00:1d.7
> ff980800-ff980bff : ehci_hcd
> ffb00000-ffffffff : reserved
>
> Remember that I/O memory is alleged to be at:
>
>> Region 0: Memory at fe9e0000 (32-bit, non-prefetchable) [size=128K]
>> Region 1: Memory at fe9db000 (32-bit, non-prefetchable) [size=4K]
>
> These regions are marked "reserved" in this map.
>
> The 2.6.27 view of I/O memory is rather different:
>
> 00000000-0009fbff : System RAM
> 000f0000-000fffff : reserved
> 00100000-be4ff7ff : System RAM
> 00200000-004b4d12 : Kernel code
> 004b4d13-0073000f : Kernel data
> 011b6000-0127e58f : Kernel bss
> be4ff800-be553bff : ACPI Non-volatile Storage
> be553c00-be555bff : ACPI Tables
> be555c00-beffffff : reserved
> c0000000-cfffffff : 0000:00:02.0
> d0000000-d3ffffff : PCI Bus 0000:02
> d0000000-d3ffffff : 0000:02:00.0
> d0000000-d07fffff : ivtv encoder
> d2000000-d200ffff : ivtv registers
> d4000000-d40fffff : 0000:00:02.0
> d4100000-d417ffff : 0000:00:02.0
> d4180000-d41fffff : 0000:00:02.1
> d4200000-d421ffff : 0000:00:19.0
> d4200000-d421ffff : e1000e
> d4220000-d4223fff : 0000:00:1b.0
> d4220000-d4223fff : ICH HD audio
> d4224000-d4224fff : 0000:00:03.3
> d4225000-d4225fff : 0000:00:19.0
> d4225000-d4225fff : e1000e
> d4226000-d42263ff : 0000:00:1a.7
> d4226000-d42263ff : ehci_hcd
> d4226400-d42264ff : 0000:00:1f.3
> d4227000-d4227fff : Intel Flush Page
> e0000000-fed003ff : reserved
> fec00000-fec00fff : IOAPIC 0
> fed00000-fed003ff : HPET 0
> fed20000-fed9ffff : reserved
> fedad000-fedad00f : 0000:00:03.0
> fee00000-feefffff : reserved
> fee00000-fee00fff : Local APIC
> ff980800-ff980bff : 0000:00:1d.7
> ff980800-ff980bff : ehci_hcd
> ffb00000-ffffffff : reserved
>
> The 2.6.28-rc2 dmesg output follows.
>
>> GSI 23 (level, low) -> IRQ 23
> [ 5.480562] ehci_hcd 0000:00:1d.7: setting latency timer to 64
> [ 5.480565] ehci_hcd 0000:00:1d.7: EHCI Host Controller
> [ 5.480688] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
> [ 5.484666] ehci_hcd 0000:00:1d.7: debug port 1
> [ 5.484719] ehci_hcd 0000:00:1d.7: cache line size of 32 is not supported
> [ 5.484734] ehci_hcd 0000:00:1d.7: irq 23, io mem 0xff980800
> [ 5.496687] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
> [ 5.496900] usb usb1: configuration #1 chosen from 1 choice
> [ 5.497008] hub 1-0:1.0: USB hub found
> [ 5.497062] hub 1-0:1.0: 6 ports detected
> [ 5.497327] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> [ 5.497382] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 5.497455] usb usb1: Product: EHCI Host Controller
> [ 5.497505] usb usb1: Manufacturer: Linux 2.6.28-rc2 ehci_hcd
> [ 5.497557] usb usb1: SerialNumber: 0000:00:1d.7
> [ 5.497647] uhci_hcd: USB Universal Host Controller Interface driver
> [ 5.497726] uhci_hcd 0000:00:1a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 5.497786] uhci_hcd 0000:00:1a.0: setting latency timer to 64
> [ 5.497789] uhci_hcd 0000:00:1a.0: UHCI Host Controller
> [ 5.497884] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 2
> [ 5.497986] uhci_hcd 0000:00:1a.0: irq 16, io base 0x0000ff20
> [ 5.498146] usb usb2: configuration #1 chosen from 1 choice
> [ 5.498250] hub 2-0:1.0: USB hub found
> [ 5.498303] hub 2-0:1.0: 2 ports detected
> [ 5.498520] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
> [ 5.498576] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 5.498648] usb usb2: Product: UHCI Host Controller
> [ 5.498698] usb usb2: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
> [ 5.498751] usb usb2: SerialNumber: 0000:00:1a.0
> [ 5.498818] uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
> [ 5.498878] uhci_hcd 0000:00:1a.1: setting latency timer to 64
> [ 5.498881] uhci_hcd 0000:00:1a.1: UHCI Host Controller
> [ 5.498976] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 3
> [ 5.499079] uhci_hcd 0000:00:1a.1: irq 17, io base 0x0000ff00
> [ 5.499255] usb usb3: configuration #1 chosen from 1 choice
> [ 5.499358] hub 3-0:1.0: USB hub found
> [ 5.499416] hub 3-0:1.0: 2 ports detected
> [ 5.499634] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
> [ 5.499690] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 5.499762] usb usb3: Product: UHCI Host Controller
> [ 5.499813] usb usb3: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
> [ 5.499865] usb usb3: SerialNumber: 0000:00:1a.1
> [ 5.499931] uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 23 (level, low) -> IRQ 23
> [ 5.499990] uhci_hcd 0000:00:1d.0: setting latency timer to 64
> [ 5.499993] uhci_hcd 0000:00:1d.0: UHCI Host Controller
> [ 5.500098] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 4
> [ 5.500193] uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000ff80
> [ 5.500359] usb usb4: configuration #1 chosen from 1 choice
> [ 5.500463] hub 4-0:1.0: USB hub found
> [ 5.500515] hub 4-0:1.0: 2 ports detected
> [ 5.500736] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
> [ 5.500792] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 5.500865] usb usb4: Product: UHCI Host Controller
> [ 5.503087] usb usb4: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
> [ 5.503139] usb usb4: SerialNumber: 0000:00:1d.0
> [ 5.503205] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
> [ 5.503265] uhci_hcd 0000:00:1d.1: setting latency timer to 64
> [ 5.503268] uhci_hcd 0000:00:1d.1: UHCI Host Controller
> [ 5.503369] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 5
> [ 5.503463] uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000ff60
> [ 5.503627] usb usb5: configuration #1 chosen from 1 choice
> [ 5.503737] hub 5-0:1.0: USB hub found
> [ 5.503789] hub 5-0:1.0: 2 ports detected
> [ 5.504020] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
> [ 5.504076] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 5.504149] usb usb5: Product: UHCI Host Controller
> [ 5.504199] usb usb5: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
> [ 5.504251] usb usb5: SerialNumber: 0000:00:1d.1
> [ 5.504317] uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
> [ 5.504376] uhci_hcd 0000:00:1d.2: setting latency timer to 64
> [ 5.504379] uhci_hcd 0000:00:1d.2: UHCI Host Controller
> [ 5.504485] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 6
> [ 5.504580] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ff40
> [ 5.504751] usb usb6: configuration #1 chosen from 1 choice
> [ 5.504858] hub 6-0:1.0: USB hub found
> [ 5.504910] hub 6-0:1.0: 2 ports detected
> [ 5.505145] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001
> [ 5.505201] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 5.505274] usb usb6: Product: UHCI Host Controller
> [ 5.505324] usb usb6: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
> [ 5.505376] usb usb6: SerialNumber: 0000:00:1d.2
> [ 5.505526] usbcore: registered new interface driver usblp
> [ 5.505580] Initializing USB Mass Storage driver...
> [ 5.505690] usbcore: registered new interface driver usb-storage
> [ 5.505745] USB Mass Storage support registered.
> [ 5.505951] PNP: No PS/2 controller found. Probing ports directly.
> [ 5.508550] serio: i8042 KBD port at 0x60,0x64 irq 1
> [ 5.508603] serio: i8042 AUX port at 0x60,0x64 irq 12
> [ 5.508780] mice: PS/2 mouse device common for all mice
> [ 5.509019] coretemp coretemp.0: Using relative temperature scale!
> [ 5.509172] coretemp coretemp.1: Using relative temperature scale!
> [ 5.509284] EDAC MC: Ver: 2.1.0 Oct 30 2008
> [ 5.509919] TCP bic registered
> [ 5.509967] NET: Registered protocol family 17
> [ 5.510236] registered taskstats version 1
> [ 5.634462] kjournald starting. Commit interval 5 seconds
> [ 5.634555] EXT3-fs: mounted filesystem with ordered data mode.
> [ 5.634623] VFS: Mounted root (ext3 filesystem) readonly.
> [ 5.634686] Freeing unused kernel memory: 340k freed
> [ 5.803374] usb 1-3: new high speed USB device using ehci_hcd and address 2
> [ 5.927226] usb 1-3: configuration #1 chosen from 1 choice
> [ 5.927526] hub 1-3:1.0: USB hub found
> [ 5.927678] hub 1-3:1.0: 4 ports detected
> [ 5.928869] usb 1-3: New USB device found, idVendor=050d, idProduct=0234
> [ 5.928925] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> [ 6.140038] usb 2-2: new low speed USB device using uhci_hcd and address 2
> [ 6.314237] usb 2-2: configuration #1 chosen from 1 choice
> [ 6.317404] usb 2-2: New USB device found, idVendor=046d, idProduct=c01b
> [ 6.317462] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [ 6.317518] usb 2-2: Product: USB-PS/2 Optical Mouse
> [ 6.317569] usb 2-2: Manufacturer: Logitech
> [ 6.543376] usb 6-2: new full speed USB device using uhci_hcd and address 2
> [ 6.716827] usb 6-2: configuration #1 chosen from 1 choice
> [ 6.719722] hub 6-2:1.0: USB hub found
> [ 6.721625] hub 6-2:1.0: 3 ports detected
> [ 6.726875] usb 6-2: New USB device found, idVendor=046d, idProduct=0b04
> [ 6.726940] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [ 6.726999] usb 6-2: Product: Logitech BT Mini-Receiver
> [ 6.727053] usb 6-2: Manufacturer: Logitech
> [ 6.994617] usb 6-2.2: new full speed USB device using uhci_hcd and address 3
> [ 7.138819] usb 6-2.2: configuration #1 chosen from 1 choice
> [ 7.144935] usb 6-2.2: New USB device found, idVendor=046d, idProduct=c713
> [ 7.144993] usb 6-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 7.145070] usb 6-2.2: Product: Logitech BT Mini-Receiver
> [ 7.145123] usb 6-2.2: Manufacturer: Logitech
> [ 7.145174] usb 6-2.2: SerialNumber: 0007617AC3F9
> [ 7.211612] usb 6-2.3: new full speed USB device using uhci_hcd and address 4
> [ 7.359357] usb 6-2.3: configuration #1 chosen from 1 choice
> [ 7.364932] usb 6-2.3: New USB device found, idVendor=046d, idProduct=c714
> [ 7.364934] usb 6-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 7.364937] usb 6-2.3: Product: Logitech BT Mini-Receiver
> [ 7.364939] usb 6-2.3: Manufacturer: Logitech
> [ 7.364940] usb 6-2.3: SerialNumber: 0007617AC3F9
> [ 8.984747] input: Power Button (FF) as /class/input/input0
> [ 9.006919] ACPI: Power Button (FF) [PWRF]
> [ 9.007004] input: Power Button (CM) as /class/input/input1
> [ 9.021113] ACPI: Power Button (CM) [VBTN]
> [ 9.048989] sd 0:0:0:0: Attached scsi generic sg0 type 0
> [ 9.049031] scsi 0:0:1:0: Attached scsi generic sg1 type 5
> [ 9.049071] sd 1:0:0:0: Attached scsi generic sg2 type 0
> [ 9.060794] processor ACPI0007:00: registered as cooling_device0
> [ 9.060845] processor ACPI0007:01: registered as cooling_device1
> [ 9.065667] i801_smbus 0000:00:1f.3: PCI INT C -> GSI 18 (level, low) -> IRQ 18
> [ 9.073608] Serial: 8250/16550 driver4 ports, IRQ sharing disabled
> [ 9.073725] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [ 9.080203] e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
> [ 9.080206] e1000e: Copyright (c) 1999-2008 Intel Corporation.
> [ 9.080270] e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
> [ 9.080277] e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
> [ 9.080284] e1000e 0000:00:19.0: PCI INT A disabled
> [ 9.080290] e1000e: probe of 0000:00:19.0 failed with error -16
> [ 9.080958] input: Logitech USB-PS/2 Optical Mouse as /class/input/input2
> [ 9.196488] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [ 9.204233] generic-usb 0003:046D:C01B.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1a.0-2/input0
> [ 9.210127] input: Logitech Logitech BT Mini-Receiver as /class/input/input3
> [ 9.219007] Driver 'sr' needs updating - please use bus_type methods
> [ 9.257039] generic-usb 0003:046D:C713.0002: input,hidraw1: USB HID v1.11 Keyboard [Logitech Logitech BT Mini-Receiver] on usb-0000:00:1d.2-2.2/input0
> [ 9.258865] sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
> [ 9.258870] Uniform CD-ROM driver Revision: 3.20
> [ 9.258979] sr 0:0:1:0: Attached scsi CD-ROM sr0
> [ 9.260082] usbcore: registered new interface driver usbhid
> [ 9.260085] usbhid: v2.6:USB HID core driver
> [ 9.360339] input: Logitech Logitech BT Mini-Receiver as /class/input/input4
> [ 9.361821] serial 0000:00:03.3: PCI INT B -> GSI 17 (level, low) -> IRQ 17
> [ 9.362186] 0000:00:03.3: ttyS1 at I/O 0xec98 (irq = 17) is a 16550A
> [ 9.393684] logitech 0003:046D:C714.0003: input,hidraw2: USB HID v1.11 Mouse [Logitech Logitech BT Mini-Receiver] on usb-0000:00:1d.2-2.3/input0
> [ 9.791132] Linux video capture interface: v2.00
> [ 9.827980] i2c_algo_bit: exports duplicate symbol i2c_bit_add_numbered_bus (owned by kernel)
> [ 9.838420] ivtv: Start initialization, version 1.4.0
> [ 9.838493] ivtv0: Initializing card #0
> [ 9.838495] ivtv0: Autodetected Hauppauge card (cx23416 based)
> [ 9.838563] ivtv 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 9.892690] tveeprom 1-0050: Hauppauge model 32062, rev C199, serial# 8510288
> [ 9.892694] tveeprom 1-0050: tuner model is TCL 2002N 5H (idx 99, type 50)
> [ 9.892697] tveeprom 1-0050: TV standards NTSC(M) (eeprom 0x08)
> [ 9.892699] tveeprom 1-0050: audio processor is MSP3445 (idx 12)
> [ 9.892701] tveeprom 1-0050: decoder processor is SAA7115 (idx 19)
> [ 9.892704] tveeprom 1-0050: has no radio, has IR receiver, has no IR transmitter
> [ 9.892706] ivtv0: Autodetected Hauppauge WinTV PVR-250
> [ 9.947760] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 9.947771] HDA Intel 0000:00:1b.0: BAR 0: can't reserve mem region [0xfe9dc000-0xfe9dffff]
> [ 9.947776] HDA Intel 0000:00:1b.0: PCI INT A disabled
> [ 9.947789] HDA Intel: probe of 0000:00:1b.0 failed with error -16
> [ 9.985899] saa7115 1-0021: saa7115 found (1f7115d0e100000) @ 0x42 (ivtv i2c driver #0)
> [ 10.121484] msp3400 1-0040: MSP3445G-B8 found @ 0x80 (ivtv i2c driver #0)
> [ 10.121486] msp3400 1-0040: msp3400 supports radio, mode is autodetect and autoselect
> [ 10.122792] tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
> [ 10.122800] simple_tuner_attach: driver disabled by Kconfig
> [ 10.123193] ivtv0: Registered device video0 for encoder MPG (4096 kB)
> [ 10.123227] ivtv0: Registered device video32 for encoder YUV (2048 kB)
> [ 10.123260] ivtv0: Registered device vbi0 for encoder VBI (1024 kB)
> [ 10.123293] ivtv0: Registered device video24 for encoder PCM (320 kB)
> [ 10.123296] ivtv0: Initialized card #0: Hauppauge WinTV PVR-250
> [ 10.123316] ivtv: End initialization
> [ 12.984403] EXT3 FS on sda7, internal journal
> [ 13.293069] kjournald starting. Commit interval 5 seconds
> [ 13.293232] EXT3 FS on sda1, internal journal
> [ 13.293240] EXT3-fs: mounted filesystem with ordered data mode.
> [ 13.334912] kjournald starting. Commit interval 5 seconds
> [ 13.335067] EXT3 FS on sda8, internal journal
> [ 13.335074] EXT3-fs: mounted filesystem with ordered data mode.
> [ 13.346061] kjournald starting. Commit interval 5 seconds
> [ 13.346203] EXT3 FS on sda6, internal journal
> [ 13.346210] EXT3-fs: mounted filesystem with ordered data mode.
> [ 13.363127] kjournald starting. Commit interval 5 seconds
> [ 13.363274] EXT3 FS on sda5, internal journal
> [ 13.363281] EXT3-fs: mounted filesystem with ordered data mode.
> [ 13.386583] kjournald starting. Commit interval 5 seconds
> [ 13.386747] EXT3 FS on sda2, internal journal
> [ 13.386754] EXT3-fs: mounted filesystem with ordered data mode.
> [ 13.411607] kjournald starting. Commit interval 5 seconds
> [ 13.411738] EXT3 FS on sda3, internal journal
> [ 13.411744] EXT3-fs: mounted filesystem with ordered data mode.
> [ 13.426394] kjournald starting. Commit interval 5 seconds
> [ 13.426698] EXT3 FS on sdb1, internal journal
> [ 13.426705] EXT3-fs: mounted filesystem with ordered data mode.
> [ 14.732391] Adding 1020088k swap on /dev/sda9. Priority:-1 extents:1 across:1020088k
> [ 15.130376] platform microcode: firmware: requesting intel-ucode/06-0f-0d
> [ 15.147907] platform microcode: firmware: requesting intel-ucode/06-0f-0d
> [ 15.151183] Microcode Update Driver: v2.00 <[email protected]> <[email protected]>
> [ 15.357831] microcode: CPU0 updated from revision 0xa1 to 0xa3, date = 2007-08-13
> [ 15.359162] microcode: CPU1 updated from revision 0xa1 to 0xa3, date = 2007-08-13
> [ 15.382263] Microcode Update Driver: v2.00 removed.
> [ 16.935369] RPC: Registered udp transport module.
> [ 16.935373] RPC: Registered tcp transport module.
> [ 17.620320] fuse init (API version 7.10)
> [ 23.180051] ivtv 0000:02:00.0: firmware: requesting v4l-cx2341x-enc.fw
> [ 23.381383] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
> [ 23.580158] ivtv0: Encoder revision: 0x02060039
> [ 23.601314] tuner 1-0061: Tuner has no way to set tv freq
> [ 23.666053] tuner 1-0061: Tuner has no way to set tv freq
> [ 26.775435] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 26.775439] pci 0000:00:02.0: enabling bus mastering
> [ 26.775443] pci 0000:00:02.0: setting latency timer to 64
> [ 26.775508] pci 0000:00:02.0: irq 46 for MSI/MSI-X
> [ 26.775657] [drm] Initialized i915 1.6.0 20080730 on minor 0
> [ 26.788761] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining
>
> Thanks,
>
> jon
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2008-10-31 15:08:44

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Thu, 30 Oct 2008, Yinghai Lu wrote:

> On Thu, Oct 30, 2008 at 7:58 PM, Jonathan Corbet <[email protected]> wrote:
> >
> > /proc/iomem looks like this with 2.6.28-rc2:
> >
> > 00000000-0009fbff : System RAM
> > 000f0000-000fffff : reserved
> > 00100000-be4ff7ff : System RAM
> > 00200000-004a6e45 : Kernel code
> > 004a6e46-00649b77 : Kernel data
> > 006c4000-007585ff : Kernel bss
> > be4ff800-be553bff : ACPI Non-volatile Storage
> > be553c00-be555bff : ACPI Tables
> > be555c00-beffffff : reserved
> > c0000000-cfffffff : 0000:00:02.0
> > d0000000-d3ffffff : PCI Bus 0000:02
> > d0000000-d3ffffff : 0000:02:00.0
> > d0000000-d07fffff : ivtv encoder
> > d2000000-d200ffff : ivtv registers
> > d4000000-d4000fff : Intel Flush Page
> > e0000000-fe7fffff : reserved
> > fe800000-fe8fffff : PCI Bus 0000:01
> > fe800000-fe8fffff : reserved
> > fe900000-fe9d9aff : reserved
> > fe9d9b00-fe9d9bff : 0000:00:1f.3
> > fe9d9b00-fe9d9bff : reserved
> > fe9d9c00-fe9d9fff : 0000:00:1a.7
> > fe9d9c00-fe9d9fff : reserved
> > fe9da000-fe9dafff : 0000:00:03.3
> > fe9da000-fe9dafff : reserved
> > fe9db000-fe9dbfff : 0000:00:19.0
> > fe9db000-fe9dbfff : reserved
> > fe9dc000-fe9dffff : 0000:00:1b.0
> > fe9dc000-fe9dffff : reserved
> > fe9e0000-fe9fffff : 0000:00:19.0
> > fe9e0000-fe9fffff : reserved
>
> your BIOS allocate that to your nic, and also it put that in reserved
> in e820 table.

Yeah. I advocated using 'insert_resource_expand_to_fit()' instead of using
'reserve_region_with_split()'. There was some reason Yinghai didn't like
that, though.

The important part is that we should put the reserved resource _outside_
the ones that it conflicts with, not inside.

> for 2.6.28, it change to honor PCI BAR than others...and at same time
> use reserve_region_with_split ...
> put the overlapping to reserved..
>
> so solution will be:
> 1.rework reserve_region_with_split not to put the overlapping to reserved...

This would certainly be acceptable - we don't care that it's reserved,
since we already know about it.

> 2. or update pci_request_region to check if conflicts is with name "reserved"

No, that would be horribly wrong.

Jonathan, what do things look like with the simple "use 'expand_to_fit'"
patch instead, ie something like this:

Linus

---
arch/x86/kernel/e820.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index ce97bf3..ebe712c 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1318,7 +1318,7 @@ void __init e820_reserve_resources_late(void)
res = e820_res;
for (i = 0; i < e820.nr_map; i++) {
if (!res->parent && res->end)
- reserve_region_with_split(&iomem_resource, res->start, res->end, res->name);
+ insert_resource_expand_to_fit(&iomem_resource, res->start, res->end, res->name);
res++;
}
}

2008-10-31 15:45:34

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Fri, 31 Oct 2008, Linus Torvalds wrote:
>
> Jonathan, what do things look like with the simple "use 'expand_to_fit'"
> patch instead, ie something like this:

And by "something like this", I obviously _really_ meant "something
almost, but not entirely, unlike this".

> - reserve_region_with_split(&iomem_resource, res->start, res->end, res->name);
> + insert_resource_expand_to_fit(&iomem_resource, res->start, res->end, res->name);

The "insert_resource_expand_to_fit()" calling convention is much simpler,
and it should be just

insert_resource_expand_to_fit(&iomem_resource, res);

which has the downside (?) that it will actually _modify_ the resource as
it expands it to fit. Of course, it's not like we don't do that in other
places too (ie the "sanitize" phase), so I don't think it's much of a real
downside.

Anyway, I'm not appending a fixed patch, becuase the fix is so trivial as
to be more easily done by hand.

Linus

2008-10-31 16:00:51

by Jonathan Corbet

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Fri, 31 Oct 2008 08:44:52 -0700 (PDT)
Linus Torvalds <[email protected]> wrote:

> > Jonathan, what do things look like with the simple "use
> > 'expand_to_fit'" patch instead, ie something like this:
>
> And by "something like this", I obviously _really_ meant "something
> almost, but not entirely, unlike this".

I was just figuring that part out :)

Things change a bit with this patch, but the e1000e still fails to
initialize:

[ 9.301890] e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
[ 9.301894] e1000e: Copyright (c) 1999-2008 Intel Corporation.
[ 9.301952] e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 9.301959] e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
[ 9.301966] e1000e 0000:00:19.0: PCI INT A disabled
[ 9.301972] e1000e: probe of 0000:00:19.0 failed with error -16

Pretty much the same as before. The I/O memory layout *has* changed a
bit, though:

00000000-0009fbff : System RAM
000f0000-000fffff : reserved
00100000-be4ff7ff : System RAM
00200000-004a6e45 : Kernel code
004a6e46-00649b77 : Kernel data
006c4000-007585ff : Kernel bss
be4ff800-be553bff : ACPI Non-volatile Storage
be553c00-be555bff : ACPI Tables
be555c00-beffffff : reserved
c0000000-cfffffff : 0000:00:02.0
d0000000-d3ffffff : PCI Bus 0000:02
d0000000-d3ffffff : 0000:02:00.0
d0000000-d07fffff : ivtv encoder
d2000000-d200ffff : ivtv registers
d4000000-d4000fff : Intel Flush Page
e0000000-fed003ff : reserved
fe800000-fe8fffff : PCI Bus 0000:01
fe9d9b00-fe9d9bff : 0000:00:1f.3
fe9d9c00-fe9d9fff : 0000:00:1a.7
fe9da000-fe9dafff : 0000:00:03.3
fe9db000-fe9dbfff : 0000:00:19.0
fe9dc000-fe9dffff : 0000:00:1b.0
fe9e0000-fe9fffff : 0000:00:19.0
fea00000-fea7ffff : 0000:00:02.0
fea80000-feafffff : 0000:00:02.1
feb00000-febfffff : 0000:00:02.0
fec00000-fec00fff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed20000-fed9ffff : reserved
fedad000-fedad00f : 0000:00:03.0
fee00000-feefffff : reserved
fee00000-fee00fff : Local APIC
ff980800-ff980bff : 0000:00:1d.7
ff980800-ff980bff : ehci_hcd
ffb00000-ffffffff : reserved

The e1000e iomem is seen as such (fe9db000-fe9dbfff : 0000:00:19.0),
but it's still under the "reserved" umbrella, and that seems to give it
grief.

jon

2008-10-31 16:25:56

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Fri, 31 Oct 2008, Jonathan Corbet wrote:
>
> Things change a bit with this patch, but the e1000e still fails to
> initialize:

Ahahhh! My bad. I think this was actually discussed back when the whole
reserved-memory-handling thing was being worked on, but it got ignored
because none of the developers actually ever had any machines with this
issue, and the whole (and only) reason for the change was some odd sound
card initialization issue if I recall correctly.

The problem (I think) is that the e820 resource handling doesn't insert
the resources as some kind of magic PCI resource, but it inserts them as a
"I am a driver, and I actively _use_ this resource".

Which means that it all ends up being very busy, and then when a PCI
driver says "I now want to use this", you get EBUSY.

Does this patch work for you?

A resource doesn't have to be busy for the resource allocator to try to
avoid it, so the only thing that BUSY bit does is to not allow people who
_do_ want to use the resources they know about from using them.

So we should mark the resources busy only if we _really_ use them (like
the kernel *RAM* resources).

Oh, and this time the patch even compiles. It includes the previous
change, obviously.

Btw, this shows another (unrelated) issue: the BUSY bit (along with
various other resource flags) doesn't show up in /proc/iomem, so these
kinds of issues end up being debugged totally "blind". Not good.

Linus

---
arch/x86/kernel/e820.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index ce97bf3..7aafeb5 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1290,15 +1290,17 @@ void __init e820_reserve_resources(void)
res->start = e820.map[i].addr;
res->end = end;

- res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+ res->flags = IORESOURCE_MEM;

/*
* don't register the region that could be conflicted with
* pci device BAR resource and insert them later in
* pcibios_resource_survey()
*/
- if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20))
+ if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) {
+ res->flags |= IORESOURCE_BUSY;
insert_resource(&iomem_resource, res);
+ }
res++;
}

@@ -1318,7 +1320,7 @@ void __init e820_reserve_resources_late(void)
res = e820_res;
for (i = 0; i < e820.nr_map; i++) {
if (!res->parent && res->end)
- reserve_region_with_split(&iomem_resource, res->start, res->end, res->name);
+ insert_resource_expand_to_fit(&iomem_resource, res);
res++;
}
}

2008-10-31 16:35:39

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Fri, Oct 31, 2008 at 9:24 AM, Linus Torvalds
<[email protected]> wrote:
>
>
> On Fri, 31 Oct 2008, Jonathan Corbet wrote:
>>
>> Things change a bit with this patch, but the e1000e still fails to
>> initialize:
>
> Ahahhh! My bad. I think this was actually discussed back when the whole
> reserved-memory-handling thing was being worked on, but it got ignored
> because none of the developers actually ever had any machines with this
> issue, and the whole (and only) reason for the change was some odd sound
> card initialization issue if I recall correctly.
>
> The problem (I think) is that the e820 resource handling doesn't insert
> the resources as some kind of magic PCI resource, but it inserts them as a
> "I am a driver, and I actively _use_ this resource".
>
> Which means that it all ends up being very busy, and then when a PCI
> driver says "I now want to use this", you get EBUSY.
>
> Does this patch work for you?
>
> A resource doesn't have to be busy for the resource allocator to try to
> avoid it, so the only thing that BUSY bit does is to not allow people who
> _do_ want to use the resources they know about from using them.
>
> So we should mark the resources busy only if we _really_ use them (like
> the kernel *RAM* resources).
>
> Oh, and this time the patch even compiles. It includes the previous
> change, obviously.
>
> Btw, this shows another (unrelated) issue: the BUSY bit (along with
> various other resource flags) doesn't show up in /proc/iomem, so these
> kinds of issues end up being debugged totally "blind". Not good.
>
> Linus
>
> ---
> arch/x86/kernel/e820.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> index ce97bf3..7aafeb5 100644
> --- a/arch/x86/kernel/e820.c
> +++ b/arch/x86/kernel/e820.c
> @@ -1290,15 +1290,17 @@ void __init e820_reserve_resources(void)
> res->start = e820.map[i].addr;
> res->end = end;
>
> - res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
> + res->flags = IORESOURCE_MEM;
>
> /*
> * don't register the region that could be conflicted with
> * pci device BAR resource and insert them later in
> * pcibios_resource_survey()
> */
> - if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20))
> + if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) {
> + res->flags |= IORESOURCE_BUSY;
> insert_resource(&iomem_resource, res);
> + }
> res++;
> }
>
> @@ -1318,7 +1320,7 @@ void __init e820_reserve_resources_late(void)
> res = e820_res;
> for (i = 0; i < e820.nr_map; i++) {
> if (!res->parent && res->end)
> - reserve_region_with_split(&iomem_resource, res->start, res->end, res->name);
> + insert_resource_expand_to_fit(&iomem_resource, res);
> res++;
> }
> }

then we don't need e820_reserve_resources_late, right?

BIOS is not supposed to put the regions that are allocated to BARs
into RESERVED in e820.
and os is not supposed to use other regions in reserved entries...

so it seems need to way to take out the BAR areas from e820 map's
reserved entries before calling e820_reserve_resources_late(). this
way is seems much clean... agree?

YH

2008-10-31 16:47:14

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Fri, 31 Oct 2008, Yinghai Lu wrote:
>
> then we don't need e820_reserve_resources_late, right?

Wrong.

Think about exactly the broken case: a buggy e820 BIOS sets the e820 map
resource listing so that it *straddles* a real physical resource.

The fact is, the "late" part isn't because of IORESOURCE_BUSY. It's
because FIRMWARE IS INEVITABLY A STINKING PILE OF BUGGY SH*T THAT MUST
NOT BE ALLOWED TO SCREW UP DEVICE DISCOVERY.

Sorry for shouting, but people really need to understand this.

Linus

2008-10-31 16:51:28

by Jonathan Corbet

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Fri, 31 Oct 2008 09:24:40 -0700 (PDT)
Linus Torvalds <[email protected]> wrote:

> Does this patch work for you?

Sort of. Weirdly.

The system boots, and I get what appears to be a working eth0. This
machine mounts some NFS filesystems, though, and as soon as I try to do
that, everything locks up. I've come to expect NFS to be slow, but
that exceeds my expectations somewhat.

Other things seem to work, so, maybe, the NFS thing is a totally
different problem, don't know.

Nothing useful in the syslog, of course. Here's dmesg, in case that
helps. I have to run to a meeting, can't really look any deeper at the
moment.

Thanks,

jon

5.498434] ehci_hcd 0000:00:1d.7: debug port 1
[ 5.498487] ehci_hcd 0000:00:1d.7: cache line size of 32 is not supported
[ 5.498500] ehci_hcd 0000:00:1d.7: irq 23, io mem 0xff980800
[ 5.510020] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[ 5.510212] usb usb2: configuration #1 chosen from 1 choice
[ 5.510322] hub 2-0:1.0: USB hub found
[ 5.510374] hub 2-0:1.0: 6 ports detected
[ 5.510601] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 5.510656] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.510729] usb usb2: Product: EHCI Host Controller
[ 5.510779] usb usb2: Manufacturer: Linux 2.6.28-rc2 ehci_hcd
[ 5.510831] usb usb2: SerialNumber: 0000:00:1d.7
[ 5.510920] uhci_hcd: USB Universal Host Controller Interface driver
[ 5.511003] uhci_hcd 0000:00:1a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 5.511065] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[ 5.511068] uhci_hcd 0000:00:1a.0: UHCI Host Controller
[ 5.511164] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 3
[ 5.511267] uhci_hcd 0000:00:1a.0: irq 16, io base 0x0000ff20
[ 5.511436] usb usb3: configuration #1 chosen from 1 choice
[ 5.511542] hub 3-0:1.0: USB hub found
[ 5.511595] hub 3-0:1.0: 2 ports detected
[ 5.511812] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.511867] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.511940] usb usb3: Product: UHCI Host Controller
[ 5.511991] usb usb3: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.512043] usb usb3: SerialNumber: 0000:00:1a.0
[ 5.512112] uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 5.512171] uhci_hcd 0000:00:1a.1: setting latency timer to 64
[ 5.512174] uhci_hcd 0000:00:1a.1: UHCI Host Controller
[ 5.512270] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 4
[ 5.512371] uhci_hcd 0000:00:1a.1: irq 17, io base 0x0000ff00
[ 5.512534] usb usb4: configuration #1 chosen from 1 choice
[ 5.512638] hub 4-0:1.0: USB hub found
[ 5.512690] hub 4-0:1.0: 2 ports detected
[ 5.512911] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.512966] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.513039] usb usb4: Product: UHCI Host Controller
[ 5.513090] usb usb4: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.513142] usb usb4: SerialNumber: 0000:00:1a.1
[ 5.515364] uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 23 (level, low) -> IRQ 23
[ 5.515423] uhci_hcd 0000:00:1d.0: setting latency timer to 64
[ 5.515426] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[ 5.515530] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 5
[ 5.515625] uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000ff80
[ 5.515790] usb usb5: configuration #1 chosen from 1 choice
[ 5.515892] hub 5-0:1.0: USB hub found
[ 5.515944] hub 5-0:1.0: 2 ports detected
[ 5.516166] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.516222] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.516294] usb usb5: Product: UHCI Host Controller
[ 5.516344] usb usb5: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.516397] usb usb5: SerialNumber: 0000:00:1d.0
[ 5.516463] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 5.516522] uhci_hcd 0000:00:1d.1: setting latency timer to 64
[ 5.516525] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[ 5.516623] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 6
[ 5.516718] uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000ff60
[ 5.516886] usb usb6: configuration #1 chosen from 1 choice
[ 5.516993] hub 6-0:1.0: USB hub found
[ 5.517048] hub 6-0:1.0: 2 ports detected
[ 5.517283] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.517339] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.517411] usb usb6: Product: UHCI Host Controller
[ 5.517462] usb usb6: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.517514] usb usb6: SerialNumber: 0000:00:1d.1
[ 5.517580] uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 5.517639] uhci_hcd 0000:00:1d.2: setting latency timer to 64
[ 5.517642] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[ 5.517741] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 7
[ 5.517836] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ff40
[ 5.517999] usb usb7: configuration #1 chosen from 1 choice
[ 5.518104] hub 7-0:1.0: USB hub found
[ 5.518157] hub 7-0:1.0: 2 ports detected
[ 5.518393] usb usb7: New USB device found, idVendor=1d6b, idProduct=0001
[ 5.518448] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 5.518521] usb usb7: Product: UHCI Host Controller
[ 5.518571] usb usb7: Manufacturer: Linux 2.6.28-rc2 uhci_hcd
[ 5.518624] usb usb7: SerialNumber: 0000:00:1d.2
[ 5.518767] usbcore: registered new interface driver usblp
[ 5.518820] Initializing USB Mass Storage driver...
[ 5.518932] usbcore: registered new interface driver usb-storage
[ 5.518986] USB Mass Storage support registered.
[ 5.519194] PNP: No PS/2 controller found. Probing ports directly.
[ 5.521837] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 5.521890] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 5.522076] mice: PS/2 mouse device common for all mice
[ 5.522302] coretemp coretemp.0: Using relative temperature scale!
[ 5.522450] coretemp coretemp.1: Using relative temperature scale!
[ 5.522549] EDAC MC: Ver: 2.1.0 Oct 30 2008
[ 5.523198] TCP bic registered
[ 5.523246] NET: Registered protocol family 17
[ 5.523499] registered taskstats version 1
[ 5.649771] kjournald starting. Commit interval 5 seconds
[ 5.649861] EXT3-fs: mounted filesystem with ordered data mode.
[ 5.649930] VFS: Mounted root (ext3 filesystem) readonly.
[ 5.649992] Freeing unused kernel memory: 340k freed
[ 5.853372] usb 2-3: new high speed USB device using ehci_hcd and address 2
[ 5.977209] usb 2-3: configuration #1 chosen from 1 choice
[ 5.977499] hub 2-3:1.0: USB hub found
[ 5.977647] hub 2-3:1.0: 4 ports detected
[ 5.978786] usb 2-3: New USB device found, idVendor=050d, idProduct=0234
[ 5.978842] usb 2-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 6.310238] usb 3-2: new low speed USB device using uhci_hcd and address 2
[ 6.480431] usb 3-2: configuration #1 chosen from 1 choice
[ 6.483547] usb 3-2: New USB device found, idVendor=046d, idProduct=c01b
[ 6.483603] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.483659] usb 3-2: Product: USB-PS/2 Optical Mouse
[ 6.483709] usb 3-2: Manufacturer: Logitech
[ 6.710036] usb 7-2: new full speed USB device using uhci_hcd and address 2
[ 6.885947] usb 7-2: configuration #1 chosen from 1 choice
[ 6.888832] hub 7-2:1.0: USB hub found
[ 6.890736] hub 7-2:1.0: 3 ports detected
[ 6.895994] usb 7-2: New USB device found, idVendor=046d, idProduct=0b04
[ 6.896052] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.896110] usb 7-2: Product: Logitech BT Mini-Receiver
[ 6.896163] usb 7-2: Manufacturer: Logitech
[ 7.164707] usb 7-2.2: new full speed USB device using uhci_hcd and address 3
[ 7.308906] usb 7-2.2: configuration #1 chosen from 1 choice
[ 7.315002] usb 7-2.2: New USB device found, idVendor=046d, idProduct=c713
[ 7.315005] usb 7-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7.315007] usb 7-2.2: Product: Logitech BT Mini-Receiver
[ 7.315009] usb 7-2.2: Manufacturer: Logitech
[ 7.315011] usb 7-2.2: SerialNumber: 0007617AC3F9
[ 7.382201] usb 7-2.3: new full speed USB device using uhci_hcd and address 4
[ 7.525877] usb 7-2.3: configuration #1 chosen from 1 choice
[ 7.532024] usb 7-2.3: New USB device found, idVendor=046d, idProduct=c714
[ 7.532027] usb 7-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7.532030] usb 7-2.3: Product: Logitech BT Mini-Receiver
[ 7.532031] usb 7-2.3: Manufacturer: Logitech
[ 7.532033] usb 7-2.3: SerialNumber: 0007617AC3F9
[ 8.910220] input: Power Button (FF) as /class/input/input0
[ 8.934637] ACPI: Power Button (FF) [PWRF]
[ 8.934730] input: Power Button (CM) as /class/input/input1
[ 8.938782] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 8.938827] scsi 0:0:1:0: Attached scsi generic sg1 type 5
[ 8.938868] sd 1:0:0:0: Attached scsi generic sg2 type 0
[ 8.950224] ACPI: Power Button (CM) [VBTN]
[ 8.996152] Driver 'sr' needs updating - please use bus_type methods
[ 9.055986] sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[ 9.055990] Uniform CD-ROM driver Revision: 3.20
[ 9.056092] sr 0:0:1:0: Attached scsi CD-ROM sr0
[ 9.064793] i801_smbus 0000:00:1f.3: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 9.080705] Serial: 8250/16550 driver4 ports, IRQ sharing disabled
[ 9.080855] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 9.199808] processor ACPI0007:00: registered as cooling_device0
[ 9.199852] processor ACPI0007:01: registered as cooling_device1
[ 9.239083] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 9.250964] e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
[ 9.250966] e1000e: Copyright (c) 1999-2008 Intel Corporation.
[ 9.251024] e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 9.251035] e1000e 0000:00:19.0: setting latency timer to 64
[ 9.251220] e1000e 0000:00:19.0: irq 46 for MSI/MSI-X
[ 9.320082] input: Logitech USB-PS/2 Optical Mouse as /class/input/input2
[ 9.357086] generic-usb 0003:046D:C01B.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1a.0-2/input0
[ 9.363702] input: Logitech Logitech BT Mini-Receiver as /class/input/input3
[ 9.390192] generic-usb 0003:046D:C713.0002: input,hidraw1: USB HID v1.11 Keyboard [Logitech Logitech BT Mini-Receiver] on usb-0000:00:1d.2-2.2/input0
[ 9.392467] usbcore: registered new interface driver usbhid
[ 9.392473] usbhid: v2.6:USB HID core driver
[ 9.445987] 0000:00:19.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:1a:a0:e1:c3:e9
[ 9.445990] 0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection
[ 9.446014] 0000:00:19.0: eth0: MAC: 6, PHY: 6, PBA No: 1041ff-0ff
[ 9.462560] serial 0000:00:03.3: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[ 9.462967] 0000:00:03.3: ttyS1 at I/O 0xec98 (irq = 17) is a 16550A
[ 9.742862] Linux video capture interface: v2.00
[ 9.776865] i2c_algo_bit: exports duplicate symbol i2c_bit_add_numbered_bus (owned by kernel)
[ 9.805792] ivtv: Start initialization, version 1.4.0
[ 9.805865] ivtv0: Initializing card #0
[ 9.805867] ivtv0: Autodetected Hauppauge card (cx23416 based)
[ 9.805931] ivtv 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 9.821075] input: Logitech Logitech BT Mini-Receiver as /class/input/input4
[ 9.860073] tveeprom 1-0050: Hauppauge model 32062, rev C199, serial# 8510288
[ 9.860077] tveeprom 1-0050: tuner model is TCL 2002N 5H (idx 99, type 50)
[ 9.860080] tveeprom 1-0050: TV standards NTSC(M) (eeprom 0x08)
[ 9.860082] tveeprom 1-0050: audio processor is MSP3445 (idx 12)
[ 9.860084] tveeprom 1-0050: decoder processor is SAA7115 (idx 19)
[ 9.860086] tveeprom 1-0050: has no radio, has IR receiver, has no IR transmitter
[ 9.860090] ivtv0: Autodetected Hauppauge WinTV PVR-250
[ 9.890336] logitech 0003:046D:C714.0003: input,hidraw2: USB HID v1.11 Mouse [Logitech Logitech BT Mini-Receiver] on usb-0000:00:1d.2-2.3/input0
[ 10.007907] saa7115 1-0021: saa7115 found (1f7115d0e100000) @ 0x42 (ivtv i2c driver #0)
[ 10.137992] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 10.138050] HDA Intel 0000:00:1b.0: setting latency timer to 64
[ 10.148114] msp3400 1-0040: MSP3445G-B8 found @ 0x80 (ivtv i2c driver #0)
[ 10.148117] msp3400 1-0040: msp3400 supports radio, mode is autodetect and autoselect
[ 10.149466] tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
[ 10.149474] simple_tuner_attach: driver disabled by Kconfig
[ 10.149872] ivtv0: Registered device video0 for encoder MPG (4096 kB)
[ 10.149907] ivtv0: Registered device video32 for encoder YUV (2048 kB)
[ 10.149941] ivtv0: Registered device vbi0 for encoder VBI (1024 kB)
[ 10.149975] ivtv0: Registered device video24 for encoder PCM (320 kB)
[ 10.149977] ivtv0: Initialized card #0: Hauppauge WinTV PVR-250
[ 10.149997] ivtv: End initialization
[ 13.427494] EXT3 FS on sda7, internal journal
[ 13.716544] kjournald starting. Commit interval 5 seconds
[ 13.716680] EXT3 FS on sda1, internal journal
[ 13.716688] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.750347] kjournald starting. Commit interval 5 seconds
[ 13.750485] EXT3 FS on sda8, internal journal
[ 13.750492] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.771320] kjournald starting. Commit interval 5 seconds
[ 13.771464] EXT3 FS on sda6, internal journal
[ 13.771471] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.785773] kjournald starting. Commit interval 5 seconds
[ 13.785919] EXT3 FS on sda5, internal journal
[ 13.785926] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.809261] kjournald starting. Commit interval 5 seconds
[ 13.809430] EXT3 FS on sda2, internal journal
[ 13.809437] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.834247] kjournald starting. Commit interval 5 seconds
[ 13.834379] EXT3 FS on sda3, internal journal
[ 13.834386] EXT3-fs: mounted filesystem with ordered data mode.
[ 13.854431] kjournald starting. Commit interval 5 seconds
[ 13.854732] EXT3 FS on sdb1, internal journal
[ 13.854739] EXT3-fs: mounted filesystem with ordered data mode.
[ 15.088260] Adding 1020088k swap on /dev/sda9. Priority:-1 extents:1 across:1020088k
[ 15.499646] platform microcode: firmware: requesting intel-ucode/06-0f-0d
[ 15.512295] platform microcode: firmware: requesting intel-ucode/06-0f-0d
[ 15.515166] Microcode Update Driver: v2.00 <[email protected]> <[email protected]>
[ 15.737633] microcode: CPU0 updated from revision 0xa1 to 0xa3, date = 2007-08-13
[ 15.738989] microcode: CPU1 updated from revision 0xa1 to 0xa3, date = 2007-08-13
[ 15.763083] Microcode Update Driver: v2.00 removed.
[ 16.520253] e1000e 0000:00:19.0: irq 46 for MSI/MSI-X
[ 16.573398] e1000e 0000:00:19.0: irq 46 for MSI/MSI-X
[ 17.964209] 0000:00:19.0: eth0: Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
[ 17.964212] 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[ 22.593001] RPC: Registered udp transport module.
[ 22.593004] RPC: Registered tcp transport module.
[ 23.299570] fuse init (API version 7.10)
[ 28.940019] ivtv 0000:02:00.0: firmware: requesting v4l-cx2341x-enc.fw
[ 29.083553] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
[ 29.283495] ivtv0: Encoder revision: 0x02060039
[ 29.304674] tuner 1-0061: Tuner has no way to set tv freq
[ 29.369022] tuner 1-0061: Tuner has no way to set tv freq
[ 32.545132] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 32.545136] pci 0000:00:02.0: enabling bus mastering
[ 32.545140] pci 0000:00:02.0: setting latency timer to 64
[ 32.545205] pci 0000:00:02.0: irq 45 for MSI/MSI-X
[ 32.545361] [drm] Initialized i915 1.6.0 20080730 on minor 0
[ 32.556773] mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combining

2008-10-31 16:59:16

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Fri, 31 Oct 2008, Jonathan Corbet wrote:
>
> The system boots, and I get what appears to be a working eth0. This
> machine mounts some NFS filesystems, though, and as soon as I try to do
> that, everything locks up. I've come to expect NFS to be slow, but
> that exceeds my expectations somewhat.
>
> Other things seem to work, so, maybe, the NFS thing is a totally
> different problem, don't know.

It certainly could also be that the network card is unhappy in its new
location.

Can you do any reasonable testing at all without NFS? In particular, can
you boot without NFS and test that the networking still works?

Oh, and getting the old (2.6.27) and new (2.6.28-rc2+patch) /proc/iomem
would be nice.

No hurry.

Linus

2008-10-31 20:21:20

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

please try this on your system. it works with test case like

BIOS-provided physical RAM map:
BIOS-e820: 0000000000000100 - 0000000000095800 (usable)
BIOS-e820: 0000000000095800 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e6000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000d7fa0000 (usable)
BIOS-e820: 00000000d7fae000 - 00000000d7fb0000 (reserved)
BIOS-e820: 00000000d7fb0000 - 00000000d7fbe000 (ACPI data)
BIOS-e820: 00000000d7fbe000 - 00000000d7ff0000 (ACPI NVS)
BIOS-e820: 00000000d7ff0000 - 00000000d8000000 (reserved)
BIOS-e820: 00000000dc000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000ff700000 - 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000004028000000 (usable)

// test stub
e820_add_region(0xf0000000, 0xd300000, E820_RESERVED);
update_e820();

modified physical RAM map:
modified: 0000000000000100 - 0000000000095800 (usable)
modified: 0000000000095800 - 00000000000a0000 (reserved)
modified: 00000000000e6000 - 0000000000100000 (reserved)
modified: 0000000000100000 - 00000000d7fa0000 (usable)
modified: 00000000d7fae000 - 00000000d7fb0000 (reserved)
modified: 00000000d7fb0000 - 00000000d7fbe000 (ACPI data)
modified: 00000000d7fbe000 - 00000000d7ff0000 (ACPI NVS)
modified: 00000000d7ff0000 - 00000000d8000000 (reserved)
modified: 00000000dc000000 - 00000000fd300000 (reserved)
modified: 00000000fec00000 - 00000000fec01000 (reserved)
modified: 00000000fee00000 - 00000000fee01000 (reserved)
modified: 00000000ff700000 - 0000000100000000 (reserved)
modified: 0000000100000000 - 0000004028000000 (usable)
Allocating PCI resources starting at d8400000 (gap: d8000000:4000000)


will get:

[ 8.536336] modified physical RAM map:
[ 8.540016] modified: 0000000000000100 - 0000000000095800 (usable)
[ 8.544900] modified: 0000000000095800 - 00000000000a0000 (reserved)
[ 8.549065] modified: 00000000000e6000 - 0000000000100000 (reserved)
[ 8.556015] modified: 0000000000100000 - 00000000d7fa0000 (usable)
[ 8.560892] modified: 00000000d7fae000 - 00000000d7fb0000 (reserved)
[ 8.565064] modified: 00000000d7fb0000 - 00000000d7fbe000 (ACPI data)
[ 8.569150] modified: 00000000d7fbe000 - 00000000d7ff0000 (ACPI NVS)
[ 8.573072] modified: 00000000d7ff0000 - 00000000d8000000 (reserved)
[ 8.580015] modified: 00000000dc000000 - 00000000fb200000 (reserved)
[ 8.585063] modified: 00000000fec00000 - 00000000fec01000 (reserved)
[ 8.589064] modified: 00000000fee00000 - 00000000fee01000 (reserved)
[ 8.596015] modified: 00000000ff700000 - 0000000100000000 (reserved)
[ 8.601063] modified: 0000000100000000 - 0000004028000000 (usable)


d8000000-dfffffff : PCI Bus #00
dc000000-dfffffff : GART
dc000000-dfffffff : reserved
e0000000-efffffff : PCI MMCONFIG 0
e0000000-efffffff : reserved
f0000000-fdffffff : PCI Bus #00
f0000000-faefffff : reserved
faf00000-fcffffff : PCI Bus 0000:01
faf00000-fb1fffff : reserved
fbfff000-fbffffff : 0000:01:06.0
fc000000-fcffffff : 0000:01:06.0
fd000000-fd2fffff : PCI Bus 0000:02
fd000000-fd2fffff : PCI Bus 0000:03
fd000000-fd1fffff : PCI Bus 0000:04
fd160000-fd17ffff : 0000:04:00.1
fd160000-fd17ffff : e1000e
fd180000-fd19ffff : 0000:04:00.1
fd180000-fd19ffff : e1000e
fd1a0000-fd1bffff : 0000:04:00.0
fd1c0000-fd1dffff : 0000:04:00.0
fd1c0000-fd1dffff : e1000e
fd1e0000-fd1fffff : 0000:04:00.0
fd1e0000-fd1fffff : e1000e
fd200000-fd2fffff : PCI Bus 0000:05
fd280000-fd29ffff : 0000:05:00.1
fd280000-fd29ffff : e1000e
fd2a0000-fd2bffff : 0000:05:00.1
fd2a0000-fd2bffff : e1000e
fd2c0000-fd2dffff : 0000:05:00.0
fd2c0000-fd2dffff : e1000e
fd2e0000-fd2fffff : 0000:05:00.0
fd2e0000-fd2fffff : e1000e




[PATCH] x86: remove PCI bar range from e820 reserved entries

Impact: clean up buggy e820 tables

so make those ranges can be claimed by drivers
acctually BIOS is not supposed to put resource in pci BAR in reserved entries of e820.
e820 entries should only include reserved range include mmconfig, lapic, ... and others
that are not in BARs

---
arch/x86/kernel/e820.c | 70 +++++++++++++++++++++++++++++++++++--------------
arch/x86/pci/i386.c | 55 ++++++++++++++++++++++++++++++++++++++
2 files changed, 106 insertions(+), 19 deletions(-)

Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -1271,35 +1271,43 @@ static inline const char *e820_type_to_s
/*
* Mark e820 reserved areas as busy for the resource manager.
*/
-static struct resource __initdata *e820_res;
void __init e820_reserve_resources(void)
{
- int i;
struct resource *res;
+ int i, count = 0;
u64 end;

- res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
- e820_res = res;
for (i = 0; i < e820.nr_map; i++) {
end = e820.map[i].addr + e820.map[i].size - 1;
- if (end != (resource_size_t)end) {
- res++;
+ if (end != (u64)(resource_size_t)end)
continue;
- }
- res->name = e820_type_to_string(e820.map[i].type);
- res->start = e820.map[i].addr;
- res->end = end;
+ if (e820.map[i].type != E820_RESERVED ||
+ e820.map[i].addr < (1ULL<<20))
+ count++;
+ }

- res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+ res = alloc_bootmem_low(sizeof(struct resource) * count);
+ for (i = 0; i < e820.nr_map; i++) {
+ end = e820.map[i].addr + e820.map[i].size - 1;
+ if (end != (u64)(resource_size_t)end)
+ continue;

/*
- * don't register the region that could be conflicted with
- * pci device BAR resource and insert them later in
+ * don't register the region that could be conflicted
+ * with pci device BAR resource and insert them later in
* pcibios_resource_survey()
*/
- if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20))
+ if (e820.map[i].type != E820_RESERVED ||
+ e820.map[i].addr < (1ULL<<20)) {
+ res->name = e820_type_to_string(e820.map[i].type);
+ res->start = e820.map[i].addr;
+ res->end = end;
+
+ res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+
insert_resource(&iomem_resource, res);
- res++;
+ res++;
+ }
}

for (i = 0; i < e820_saved.nr_map; i++) {
@@ -1312,13 +1320,37 @@ void __init e820_reserve_resources(void)

void __init e820_reserve_resources_late(void)
{
- int i;
struct resource *res;
+ int i, count = 0;
+ u64 end;

- res = e820_res;
+ /* only insert reserved entries here, also need to recount them */
for (i = 0; i < e820.nr_map; i++) {
- if (!res->parent && res->end)
- reserve_region_with_split(&iomem_resource, res->start, res->end, res->name);
+ end = e820.map[i].addr + e820.map[i].size - 1;
+ if (end != (u64)(resource_size_t)end)
+ continue;
+ if (e820.map[i].type != E820_RESERVED ||
+ e820.map[i].addr < (1ULL<<20))
+ continue;
+ count++;
+ }
+
+ res = kzalloc(sizeof(struct resource) * count, GFP_KERNEL);
+ for (i = 0; i < e820.nr_map; i++) {
+ end = e820.map[i].addr + e820.map[i].size - 1;
+ if (end != (u64)(resource_size_t)end)
+ continue;
+
+ if (e820.map[i].type != E820_RESERVED ||
+ e820.map[i].addr < (1ULL<<20))
+ continue;
+
+ res->name = e820_type_to_string(e820.map[i].type);
+ res->start = e820.map[i].addr;
+ res->end = end;
+
+ reserve_region_with_split(&iomem_resource, res->start,
+ res->end, res->name);
res++;
}
}
Index: linux-2.6/arch/x86/pci/i386.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/i386.c
+++ linux-2.6/arch/x86/pci/i386.c
@@ -194,6 +194,60 @@ static void __init pcibios_allocate_reso
}
}

+static __initdata u64 real_removed_size;
+static void __init e820_remove_bus_overlap(struct list_head *bus_list)
+{
+ struct pci_bus *bus;
+ struct pci_dev *dev;
+ int idx;
+ struct resource *r;
+
+ /* Depth-First Search on bus tree */
+ list_for_each_entry(bus, bus_list, node) {
+ dev = bus->self;
+ if (dev) {
+ for (idx = PCI_BRIDGE_RESOURCES;
+ idx < PCI_NUM_RESOURCES; idx++) {
+ r = &dev->resource[idx];
+ if (!(r->flags & IORESOURCE_MEM))
+ continue;
+ real_removed_size += e820_remove_range(r->start,
+ r->end - r->start + 1,
+ E820_RESERVED, 1);
+ }
+ }
+ e820_remove_bus_overlap(&bus->children);
+ }
+}
+static void __init e820_remove_bar_overlap(void)
+{
+ struct pci_dev *dev = NULL;
+ int idx;
+ struct resource *r;
+
+ real_removed_size = 0;
+
+ e820_remove_bus_overlap(&pci_root_buses);
+
+ for_each_pci_dev(dev) {
+ for (idx = 0; idx < PCI_ROM_RESOURCE; idx++) {
+ r = &dev->resource[idx];
+ if (!r->start) /* Address not assigned at all */
+ continue;
+ if (!(r->flags & IORESOURCE_MEM))
+ continue;
+ real_removed_size += e820_remove_range(r->start,
+ r->end - r->start + 1,
+ E820_RESERVED, 1);
+ }
+ }
+
+ if (real_removed_size)
+ update_e820();
+
+}
+
+
static int __init pcibios_assign_resources(void)
{
struct pci_dev *dev = NULL;
@@ -229,6 +283,7 @@ void __init pcibios_resource_survey(void
pcibios_allocate_resources(0);
pcibios_allocate_resources(1);

+ e820_remove_bar_overlap();
e820_reserve_resources_late();
}

2008-11-01 15:02:14

by Jonathan Corbet

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Fri, 31 Oct 2008 09:58:01 -0700 (PDT)
Linus Torvalds <[email protected]> wrote:

> Can you do any reasonable testing at all without NFS? In particular,
> can you boot without NFS and test that the networking still works?

Networking is fine in the absence of NFS. I retried things and
stress-tested it in a few ways with no trouble. I think your last patch
fixes the network card just fine.

Then I tried NFS again, watching more closely this time around.
Everything locks up. In fact, the soft lockup watchdog starts to
scream:

Oct 31 10:37:53 bike kernel: [ 88.046867] BUG: soft lockup - CPU#1 stuck for 61s! [modprobe:2923]
Oct 31 10:37:53 bike kernel: [ 88.046867] Modules linked in: fuse sunrpc binfmt_misc msp3400 saa7115 snd_hda_intel tuner snd_seq_oss snd_seq_midi_event snd_seq ivtv compat_ioctl32 snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer 8250_pci cx2341x v4l2_common videodev 8250_pnp snd hid_logitech 8250 e1000e v4l1_compat i2c_i801 tveeprom usbhid evdev thermal soundcore serial_core sr_mod sg processor snd_page_alloc cdrom button [last unloaded: microcode]
Oct 31 10:37:53 bike kernel: [ 88.046867] CPU 1:
Oct 31 10:37:53 bike kernel: [ 88.046867] Modules linked in: fuse sunrpc binfmt_misc msp3400 saa7115 snd_hda_intel tuner snd_seq_oss snd_seq_midi_event snd_seq ivtv compat_ioctl32 snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer 8250_pci cx2341x v4l2_common videodev 8250_pnp snd hid_logitech 8250 e1000e v4l1_compat i2c_i801 tveeprom usbhid evdev thermal soundcore serial_core sr_mod sg processor snd_page_alloc cdrom button [last unloaded: microcode]
Oct 31 10:37:53 bike kernel: [ 88.046867] Pid: 2923, comm: modprobe Not tainted 2.6.28-rc2 #12
Oct 31 10:37:53 bike kernel: [ 88.046867] RIP: 0010:[<ffffffff8026fd88>] [<ffffffff8026fd88>] ftrace_record_ip+0xcb/0x1f5
Oct 31 10:37:53 bike kernel: [ 88.046867] RSP: 0018:ffff8800bae33d58 EFLAGS: 00000282
Oct 31 10:37:53 bike kernel: [ 88.046867] RAX: ffff8800baef0810 RBX: ffff8800bae33d68 RCX: 9288000000000000
Oct 31 10:37:53 bike kernel: [ 88.046867] RDX: ffff8800baef0810 RSI: 00000000000003fe RDI: ffffffffa023f251
Oct 31 10:37:53 bike kernel: [ 88.046867] RBP: ffff8800bae33d68 R08: ffffffffa023f251 R09: ffffffff80720ed0
Oct 31 10:37:53 bike kernel: [ 88.046867] R10: ffff8800b99c0e10 R11: 0000000000000000 R12: ffffffff8049eb26
Oct 31 10:37:53 bike kernel: [ 88.046867] R13: ffff8800bae33d48 R14: ffff8800bae33ce8 R15: ffff8800bae33ce8
Oct 31 10:37:53 bike kernel: [ 88.046867] FS: 00007fbe2e5166f0(0000) GS:ffff8800be002d80(0000) knlGS:0000000000000000
Oct 31 10:37:53 bike kernel: [ 88.046867] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Oct 31 10:37:53 bike kernel: [ 88.046867] CR2: 00007fbe2e51100f CR3: 00000000bc775000 CR4: 00000000000006e0
Oct 31 10:37:53 bike kernel: [ 88.046867] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Oct 31 10:37:53 bike kernel: [ 88.046867] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Oct 31 10:37:53 bike kernel: [ 88.046867] Call Trace:
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff80270325>] ftrace_convert_nops+0x31/0x77
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff80270382>] ftrace_init_module+0x17/0x19
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff8025de68>] load_module+0x13b4/0x18ba
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff8029e875>] ? do_sync_read+0xec/0x132
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff8023eb4b>] ? proc_dointvec_minmax+0x0/0x52
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff8025e4bc>] sys_init_module+0x5a/0x1bb
Oct 31 10:37:53 bike kernel: [ 88.046867] [<ffffffff8020c18b>] system_call_fastpath+0x16/0x1b

So methinks I'll add Steven to the Cc on this one :) Looks like a
different problem for sure.

> Oh, and getting the old (2.6.27) and new
> (2.6.28-rc2+patch) /proc/iomem would be nice.

For completeness, here they are. 2.6.27:

00000000-0009fbff : System RAM
000f0000-000fffff : reserved
00100000-be4ff7ff : System RAM
00200000-004b4d12 : Kernel code
004b4d13-0073000f : Kernel data
011b6000-0127e58f : Kernel bss
be4ff800-be553bff : ACPI Non-volatile Storage
be553c00-be555bff : ACPI Tables
be555c00-beffffff : reserved
c0000000-cfffffff : 0000:00:02.0
d0000000-d3ffffff : PCI Bus 0000:02
d0000000-d3ffffff : 0000:02:00.0
d0000000-d07fffff : ivtv encoder
d2000000-d200ffff : ivtv registers
d4000000-d40fffff : 0000:00:02.0
d4100000-d417ffff : 0000:00:02.0
d4180000-d41fffff : 0000:00:02.1
d4200000-d421ffff : 0000:00:19.0
d4200000-d421ffff : e1000e
d4220000-d4223fff : 0000:00:1b.0
d4220000-d4223fff : ICH HD audio
d4224000-d4224fff : 0000:00:03.3
d4225000-d4225fff : 0000:00:19.0
d4225000-d4225fff : e1000e
d4226000-d42263ff : 0000:00:1a.7
d4226000-d42263ff : ehci_hcd
d4226400-d42264ff : 0000:00:1f.3
d4227000-d4227fff : Intel Flush Page
e0000000-fed003ff : reserved
fec00000-fec00fff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed20000-fed9ffff : reserved
fedad000-fedad00f : 0000:00:03.0
fee00000-feefffff : reserved
fee00000-fee00fff : Local APIC
ff980800-ff980bff : 0000:00:1d.7
ff980800-ff980bff : ehci_hcd
ffb00000-ffffffff : reserved


2.6.28-rc2 + second Linus patch:


00000000-0009fbff : System RAM
000f0000-000fffff : reserved
00100000-be4ff7ff : System RAM
00200000-004a6e45 : Kernel code
004a6e46-00649b77 : Kernel data
006c4000-007585ff : Kernel bss
be4ff800-be553bff : ACPI Non-volatile Storage
be553c00-be555bff : ACPI Tables
be555c00-beffffff : reserved
c0000000-cfffffff : 0000:00:02.0
d0000000-d3ffffff : PCI Bus 0000:02
d0000000-d3ffffff : 0000:02:00.0
d0000000-d07fffff : ivtv encoder
d2000000-d200ffff : ivtv registers
d4000000-d4000fff : Intel Flush Page
e0000000-fed003ff : reserved
fe800000-fe8fffff : PCI Bus 0000:01
fe9d9b00-fe9d9bff : 0000:00:1f.3
fe9d9c00-fe9d9fff : 0000:00:1a.7
fe9d9c00-fe9d9fff : ehci_hcd
fe9da000-fe9dafff : 0000:00:03.3
fe9db000-fe9dbfff : 0000:00:19.0
fe9db000-fe9dbfff : e1000e
fe9dc000-fe9dffff : 0000:00:1b.0
fe9dc000-fe9dffff : ICH HD audio
fe9e0000-fe9fffff : 0000:00:19.0
fe9e0000-fe9fffff : e1000e
fea00000-fea7ffff : 0000:00:02.0
fea80000-feafffff : 0000:00:02.1
feb00000-febfffff : 0000:00:02.0
fec00000-fec00fff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed20000-fed9ffff : reserved
fedad000-fedad00f : 0000:00:03.0
fee00000-feefffff : reserved
fee00000-fee00fff : Local APIC
ff980800-ff980bff : 0000:00:1d.7
ff980800-ff980bff : ehci_hcd
ffb00000-ffffffff : reserved

jon

2008-11-01 17:17:00

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Sat, 1 Nov 2008, Jonathan Corbet wrote:

> Networking is fine in the absence of NFS. I retried things and
> stress-tested it in a few ways with no trouble. I think your last patch
> fixes the network card just fine.
>
> Then I tried NFS again, watching more closely this time around.
> Everything locks up. In fact, the soft lockup watchdog starts to
> scream:

Interesting. I wonder why it happens for NFS, but not apparently for all
your other modules.

It does look very much like a ftrace issue, though, not NFS or
network-related. Steven? Is this something that you are aware of already,
with what looks like a lockup in ftrace_record_ip()?

> So methinks I'll add Steven to the Cc on this one :) Looks like a
> different problem for sure.

Agreed. Looks unlikely to be related.

> > Oh, and getting the old (2.6.27) and new (2.6.28-rc2+patch)
> > /proc/iomem would be nice.
>
> For completeness, here they are.

Wow. Your BIOS really does screw up massively. The one reserved region
difference is:

Old kernel (with lots of resources just re-assigned elsewhere):

> e0000000-fed003ff : reserved
> fec00000-fec00fff : IOAPIC 0
> fed00000-fed003ff : HPET 0

New kernel:

> e0000000-fed003ff : reserved
> fe800000-fe8fffff : PCI Bus 0000:01
> fe9d9b00-fe9d9bff : 0000:00:1f.3
> fe9d9c00-fe9d9fff : 0000:00:1a.7
> fe9d9c00-fe9d9fff : ehci_hcd
> fe9da000-fe9dafff : 0000:00:03.3
> fe9db000-fe9dbfff : 0000:00:19.0
> fe9db000-fe9dbfff : e1000e
> fe9dc000-fe9dffff : 0000:00:1b.0
> fe9dc000-fe9dffff : ICH HD audio
> fe9e0000-fe9fffff : 0000:00:19.0
> fe9e0000-fe9fffff : e1000e
> fea00000-fea7ffff : 0000:00:02.0
> fea80000-feafffff : 0000:00:02.1
> feb00000-febfffff : 0000:00:02.0
> fec00000-fec00fff : IOAPIC 0
> fed00000-fed003ff : HPET 0

ie the BIOS had marked a _lot_ of PCI allocations that it did as being
reserved, and there was actually no partial overlap in your case. The old
kernel would end up re-assigning all the resources (except for the magic
non-PCI-BAR ones like the IOAPIC and the HPET) because of that BIOS
reservation.

I do think that the new layout looks better, and I also think that
"insert_resource_expand_to_fit()" did a much better and more logical job
than "reserve_region_with_split()" did. So it looks like an improvement. I
wonder who else with have breakage though - EVERY SINGLE TIME we do
resource allocation cleanups/fixes, some odd firmware inevtiably breaks.

It's really sad. I worry that the old-style reserved handling hid bus
where the firmware had assigned resources to insane locations (and then
the reserved area code ended up forcing us to re-assign them to better
ones). But my second patch at least -conceptually- makes sense, and
obviously fixes your case, so I'm inclined to just commit it.

And either of the above two resource listings look saner than the plain
-rc2 version (using reserve_region_with_split):

> e0000000-fe7fffff : reserved
> fe800000-fe8fffff : PCI Bus 0000:01
> fe800000-fe8fffff : reserved
> fe900000-fe9d9aff : reserved
> fe9d9b00-fe9d9bff : 0000:00:1f.3
> fe9d9b00-fe9d9bff : reserved
> fe9d9c00-fe9d9fff : 0000:00:1a.7
> fe9d9c00-fe9d9fff : reserved
> fe9da000-fe9dafff : 0000:00:03.3
> fe9da000-fe9dafff : reserved
> fe9db000-fe9dbfff : 0000:00:19.0
> fe9db000-fe9dbfff : reserved
> fe9dc000-fe9dffff : 0000:00:1b.0
> fe9dc000-fe9dffff : reserved
> fe9e0000-fe9fffff : 0000:00:19.0
> fe9e0000-fe9fffff : reserved
> fea00000-fea7ffff : 0000:00:02.0
> fea00000-fea7ffff : reserved
> fea80000-feafffff : 0000:00:02.1
> fea80000-feafffff : reserved
> feb00000-febfffff : 0000:00:02.0
> feb00000-febfffff : reserved
> fec00000-fed003ff : reserved
> fec00000-fec00fff : IOAPIC 0
> fed00000-fed003ff : HPET 0

.. which is just really messy, but is the same e0000000-fed003ff
"reserved" e820 entry just split and moved into each resource.

I hate firmware.

Linus

2008-11-01 17:35:48

by Steven Rostedt

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e


[ Note, lots of family activities this weekend, so my response may be
slow ]

On Sat, 1 Nov 2008, Linus Torvalds wrote:
> On Sat, 1 Nov 2008, Jonathan Corbet wrote:
>
> > Networking is fine in the absence of NFS. I retried things and
> > stress-tested it in a few ways with no trouble. I think your last patch
> > fixes the network card just fine.
> >
> > Then I tried NFS again, watching more closely this time around.
> > Everything locks up. In fact, the soft lockup watchdog starts to
> > scream:
>
> Interesting. I wonder why it happens for NFS, but not apparently for all
> your other modules.
>
> It does look very much like a ftrace issue, though, not NFS or
> network-related. Steven? Is this something that you are aware of already,
> with what looks like a lockup in ftrace_record_ip()?
>

No, I have not seen this before. The code is now pretty straight forward.

Jon, could you do a gdb vmlinux and a li *ftrace_record_ip+0xcb to find
the exact line that is?

Showing the call path of this we have:

in module.c:

/* sechdrs[0].sh_size is always zero */
mseg = section_objs(hdr, sechdrs, secstrings, "__mcount_loc",
sizeof(*mseg), &num_mcount);
ftrace_init_module(mseg, mseg + num_mcount);

Where we pass a table of mcount callers to the ftrace_init_module.

void ftrace_init_module(unsigned long *start, unsigned long *end)
{
if (ftrace_disabled || start == end)
return;
ftrace_convert_nops(start, end);
}

I wonder if I should test to make sure start is < end :-/

ftrace_convert_nops does the following under a mutex.

while (p < end) {
addr = ftrace_call_adjust(*p++);
ftrace_record_ip(addr);
}


And ftrace_record_ip does:

ftrace_record_ip(unsigned long ip)
{
struct dyn_ftrace *rec;
if (!ftrace_enabled || ftrace_disabled)
return NULL;
rec = ftrace_alloc_dyn_node(ip);
if (!rec)
return NULL;
rec->ip = ip;
list_add(&rec->list, &ftrace_new_addrs);
return rec;
}


The ftrace_alloc_dyn_node does allocate a page if we are running low, but
there's no other loops or locks that I can see us deadlocking on.

-- Steve

2008-11-01 19:50:32

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Sat, Nov 1, 2008 at 10:16 AM, Linus Torvalds
<[email protected]> wrote:
>
>
>> e0000000-fe7fffff : reserved
>> fe800000-fe8fffff : PCI Bus 0000:01
>> fe800000-fe8fffff : reserved
>> fe900000-fe9d9aff : reserved
>> fe9d9b00-fe9d9bff : 0000:00:1f.3
>> fe9d9b00-fe9d9bff : reserved
>> fe9d9c00-fe9d9fff : 0000:00:1a.7
>> fe9d9c00-fe9d9fff : reserved
>> fe9da000-fe9dafff : 0000:00:03.3
>> fe9da000-fe9dafff : reserved
>> fe9db000-fe9dbfff : 0000:00:19.0
>> fe9db000-fe9dbfff : reserved
>> fe9dc000-fe9dffff : 0000:00:1b.0
>> fe9dc000-fe9dffff : reserved
>> fe9e0000-fe9fffff : 0000:00:19.0
>> fe9e0000-fe9fffff : reserved
>> fea00000-fea7ffff : 0000:00:02.0
>> fea00000-fea7ffff : reserved
>> fea80000-feafffff : 0000:00:02.1
>> fea80000-feafffff : reserved
>> feb00000-febfffff : 0000:00:02.0
>> feb00000-febfffff : reserved
>> fec00000-fed003ff : reserved
>> fec00000-fec00fff : IOAPIC 0
>> fed00000-fed003ff : HPET 0
>
> .. which is just really messy, but is the same e0000000-fed003ff
> "reserved" e820 entry just split and moved into each resource.
>
> I hate firmware.

Jonathan, can you try patch i sent?

http://lkml.org/lkml/2008/10/31/274
[PATCH] x86: remove PCI bar range from e820 reserved entries

Impact: clean up buggy e820 tables

so make those ranges can be claimed by drivers
acctually BIOS is not supposed to put resource in pci BAR in reserved
entries of e820.
e820 entries should only include reserved range include mmconfig,
lapic, ... and others
that are not in BARs



the magic regions like gart, mmconfig, ioapic, lapic and others who
knows, should be really reserved.

YH

2008-11-01 22:45:25

by Jonathan Corbet

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Sat, 1 Nov 2008 12:50:20 -0700
"Yinghai Lu" <[email protected]> wrote:

> Jonathan, can you try patch i sent?
>
> http://lkml.org/lkml/2008/10/31/274
> [PATCH] x86: remove PCI bar range from e820 reserved entries

OK, I tried it. No joy.

Nov 1 16:39:14 bike kernel: [ 9.106529] e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
Nov 1 16:39:14 bike kernel: [ 9.106533] e1000e: Copyright (c) 1999-2008 Intel Corporation.
Nov 1 16:39:14 bike kernel: [ 9.106580] e1000e 0000:00:19.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
Nov 1 16:39:14 bike kernel: [ 9.106588] e1000e 0000:00:19.0: BAR 0: can't reserve mem region [0xfe9e0000-0xfe9fffff]
Nov 1 16:39:14 bike kernel: [ 9.106593] e1000e 0000:00:19.0: PCI INT A disabled
Nov 1 16:39:14 bike kernel: [ 9.106599] e1000e: probe of 0000:00:19.0 failed with error -16

With this patch in, iomem looks like:

00000000-0009fbff : System RAM
000f0000-000fffff : reserved
00100000-be4ff7ff : System RAM
00200000-004a6e45 : Kernel code
004a6e46-0064ab77 : Kernel data
006c4000-007585ff : Kernel bss
be4ff800-be553bff : ACPI Non-volatile Storage
be553c00-be555bff : ACPI Tables
be555c00-beffffff : reserved
c0000000-cfffffff : 0000:00:02.0
d0000000-d3ffffff : PCI Bus 0000:02
d0000000-d3ffffff : 0000:02:00.0
d0000000-d07fffff : ivtv encoder
d2000000-d200ffff : ivtv registers
d4000000-d4000fff : Intel Flush Page
e0000000-fe7fffff : reserved
fe800000-fe8fffff : PCI Bus 0000:01
fe800000-fe8fffff : reserved
fe900000-fe9d9aff : reserved
fe9d9b00-fe9d9bff : 0000:00:1f.3
fe9d9b00-fe9d9bff : reserved
fe9d9c00-fe9d9fff : 0000:00:1a.7
fe9d9c00-fe9d9fff : reserved
fe9da000-fe9dafff : 0000:00:03.3
fe9da000-fe9dafff : reserved
fe9db000-fe9dbfff : 0000:00:19.0
fe9db000-fe9dbfff : reserved
fe9dc000-fe9dffff : 0000:00:1b.0
fe9dc000-fe9dffff : reserved
fe9e0000-fe9fffff : 0000:00:19.0
fe9e0000-fe9fffff : reserved
fea00000-fea7ffff : 0000:00:02.0
fea00000-fea59aff : reserved
fea80000-feafffff : 0000:00:02.1
feb00000-febfffff : 0000:00:02.0
fec00000-fec00fff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed20000-fed9ffff : reserved
fedad000-fedad00f : 0000:00:03.0
fee00000-feefffff : reserved
fee00000-fee00fff : Local APIC
ff980800-ff980bff : 0000:00:1d.7
ff980800-ff980bff : ehci_hcd
ffb00000-ffffffff : reserved

Looks to me like Linus's patch is the way to go, at least for now...

jon

2008-11-01 22:47:55

by Yinghai Lu

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

On Sat, Nov 1, 2008 at 3:45 PM, Jonathan Corbet <[email protected]> wrote:
> On Sat, 1 Nov 2008 12:50:20 -0700
> "Yinghai Lu" <[email protected]> wrote:
>
>> Jonathan, can you try patch i sent?
>>
>> http://lkml.org/lkml/2008/10/31/274
>> [PATCH] x86: remove PCI bar range from e820 reserved entries
>
> OK, I tried it. No joy.
..
>
> Looks to me like Linus's patch is the way to go, at least for now...
>

yes Linus's is right.

YH

2008-11-01 23:19:32

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e



On Sat, 1 Nov 2008, Jonathan Corbet wrote:
>
> Looks to me like Linus's patch is the way to go, at least for now...

I'll make an -rc3 tomorrow. However, I suspect that if we have lots more
regressions, we'll just have to revert the resource handling back to the
2.6.27 state.

The problem with resource handling is that even when we can write code
that "makes sense", in the end firmware can always do odd things. For
example, in your case it really does make sense to keep the already
allocated PCI resources in the reserved region, because the firmware
obviously did both the reserved region _and_ the PCI BAR allocation.

At the same time, I'm worried that what Windows does is something totally
different, probably odd, and possibly even dependent on some HAL layer
motherboard driver or other. And it's really the case that every single
time we change resource allocation - never mind how subtly, or how much
sense it makes - it will break some odd setup somewhere.

And I would not be surprised if we end up finding some machine that really
had totally _broken_ PCI BAR setup, where it set up some PCI decode to
overlap with a reserved region and then depended on the OS re-allocating
the resource.

As usual, the right answer doesn't necessarily end up being the one that
makes most sense, but probably the one that matches what Windows ends up
doing most closely - just because that's the one that was tested against.
And windows behaviour can in turn easily depend on some internal Windows
implementation detail, rather than any "thought out" solution.

The good news here is that the particular behavior wrt e820 reserved
resources and various PCI BAR's should be totally irrelevant for 99.9% of
all hardware, and we _only_ have to worry about the really odd cases. But
even just a couple of odd BIOS versions are enough to cause a lot of pain.

So let's see how it turns out in -rc3. It works for _you_, and it looks
sane to me, but ...

Linus

2008-11-02 01:26:39

by Robert Hancock

[permalink] [raw]
Subject: Re: 2.6.28-rc2 hates my e1000e

Linus Torvalds wrote:
>
> On Sat, 1 Nov 2008, Jonathan Corbet wrote:
>> Looks to me like Linus's patch is the way to go, at least for now...
>
> I'll make an -rc3 tomorrow. However, I suspect that if we have lots more
> regressions, we'll just have to revert the resource handling back to the
> 2.6.27 state.
>
> The problem with resource handling is that even when we can write code
> that "makes sense", in the end firmware can always do odd things. For
> example, in your case it really does make sense to keep the already
> allocated PCI resources in the reserved region, because the firmware
> obviously did both the reserved region _and_ the PCI BAR allocation.
>
> At the same time, I'm worried that what Windows does is something totally
> different, probably odd, and possibly even dependent on some HAL layer
> motherboard driver or other. And it's really the case that every single
> time we change resource allocation - never mind how subtly, or how much
> sense it makes - it will break some odd setup somewhere.

As far as I understand, Windows (at least with the ACPI HAL, which all
remotely modern PCs will use) essentially uses the E820 map for
determining usable RAM addresses only. It doesn't really care about
what's reserved in that map, it expects the truly reserved ranges to be
reserved as ACPI motherboard resources. (Though, it seems like it will
still happily allow device BARs to overlap those ACPI reservations, at
least if the BIOS put them there to start with..)