Subject: bisected pcmcia bug - unable to map card memory on old laptops

Hello. I've bisected bug which makes old laptops fail to detect
(any) pcmcia cards with message 'unable to map card memory!' .
commit in question is :

30919b0bf356a8ee0ef4f7d38ca8ad99b96820b2 is the first bad commit
commit 30919b0bf356a8ee0ef4f7d38ca8ad99b96820b2
Author: Bjorn Helgaas <[email protected]>
Date: Thu Dec 16 10:38:51 2010 -0700

x86: avoid low BIOS area when allocating address space

This implements arch_remove_reservations() so allocate_resource() can
avoid any arch-specific reserved areas. This currently just avoids
the
BIOS area (the first 1MB), but could be used for E820 reserved areas
if
that turns out to be necessary.

We previously avoided this area in pcibios_align_resource(). This
patch
moves the test from that PCI-specific path to a generic path, so *all*
resource allocations will avoid this area.

Acked-by: H. Peter Anvin <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>

:040000 040000 58cf7334131f8ad10bc814e56ef6538781b01add
2434a5e5da4eabf3e413ac694c0cdeef91e17680 M arch

bug is present in all kernels since late 2.6.36

--


2012-08-03 18:12:15

by Yinghai Lu

[permalink] [raw]
Subject: Re: bisected pcmcia bug - unable to map card memory on old laptops

On Fri, Aug 3, 2012 at 8:32 AM, Piotr Gluszenia Slawinski
<[email protected]> wrote:
> Hello. I've bisected bug which makes old laptops fail to detect (any) pcmcia
> cards with message 'unable to map card memory!' .
> commit in question is :
>
> 30919b0bf356a8ee0ef4f7d38ca8ad99b96820b2 is the first bad commit
> commit 30919b0bf356a8ee0ef4f7d38ca8ad99b96820b2
> Author: Bjorn Helgaas <[email protected]>
> Date: Thu Dec 16 10:38:51 2010 -0700
>
> x86: avoid low BIOS area when allocating address space
>
> This implements arch_remove_reservations() so allocate_resource() can
> avoid any arch-specific reserved areas. This currently just avoids the
> BIOS area (the first 1MB), but could be used for E820 reserved areas if
> that turns out to be necessary.
>
> We previously avoided this area in pcibios_align_resource(). This patch
> moves the test from that PCI-specific path to a generic path, so *all*
> resource allocations will avoid this area.
>
> Acked-by: H. Peter Anvin <[email protected]>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> Signed-off-by: Jesse Barnes <[email protected]>
>
> :040000 040000 58cf7334131f8ad10bc814e56ef6538781b01add
> 2434a5e5da4eabf3e413ac694c0cdeef91e17680 M arch
>
> bug is present in all kernels since late 2.6.36

can you send the boot log with working and not working kernel?
Please make sure you have PCI_DEBUG set in your config.

Thanks

Yinghai

Subject: Re: bisected pcmcia bug - unable to map card memory on old laptops

>> bug is present in all kernels since late 2.6.36
>
> can you send the boot log with working and not working kernel?
> Please make sure you have PCI_DEBUG set in your config.

system is ISA based :) but i've enabled it for sake of clarity.

logs are attached
both systems are 3.5 kernel, working is one where i've simply commented
out the code preventing low mem allocation in resource.c

btw. note that if i would enable pci support in older kernels
bug would most likely resurface even there.

--


Attachments:
notworking.log (10.56 kB)
working.log (10.65 kB)
Download all attachments

2012-08-03 23:51:23

by Yinghai Lu

[permalink] [raw]
Subject: Re: bisected pcmcia bug - unable to map card memory on old laptops

On Fri, Aug 3, 2012 at 2:53 PM, Piotr Gluszenia Slawinski
<[email protected]> wrote:
>>> bug is present in all kernels since late 2.6.36
>>
>>
>> can you send the boot log with working and not working kernel?
>> Please make sure you have PCI_DEBUG set in your config.
>
>
> system is ISA based :) but i've enabled it for sake of clarity.

Good.

>
> logs are attached both systems are 3.5 kernel, working is one where i've
> simply commented out the code preventing low mem allocation in resource.c
>
> btw. note that if i would enable pci support in older kernels
> bug would most likely resurface even there.

pcmcia :: nonstatic_find_mem_region
do try to allocate mem under 1M.

should replace
arch_remove_reservations()

with reserve resource in iomem resource tree if needed for some platform.

current arch_remove_reservations keep clip the with e820 table.

also there are two local resource_clip have different meaning. one is
"include" and another one is "exclude"

Yinghai