From: Markus Lidel <Markus.Lidel@shadowconnect.com>
To: Davide Rossetti <davide.rossetti@roma1.infn.it>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problem with ioremap which returns NULL in 2.6 kernel
Date: Wed, 02 Jun 2004 10:59:15 +0200 [thread overview]
Message-ID: <40BD96E3.20903@shadowconnect.com> (raw)
In-Reply-To: <40BCB821.5050903@roma1.infn.it>
Hello,
Davide Rossetti wrote:
>>>> could someone help me with a ioremap problem. If there are two
>>>> controllers plugged in, the ioremap request for the first controller
>>>> is successfull, but the second returns NULL. Here is the output of
>>>> the driver:
>>>> i2o: Checking for PCI I2O controllers...
>>>> i2o: I2O controller on bus 0 at 72.
>>>> i2o: PCI I2O controller at 0xD0000000 size=134217728
>>>> I2O: MTRR workaround for Intel i960 processor
>>>> i2o/iop0: Installed at IRQ17
>>>> i2o: I2O controller on bus 0 at 96.
>>>> i2o: PCI I2O controller at 0xD8000000 size=134217728
>>>> i2o: Unable to map controller.
>>> If "size=xxxx" indicates the size you are remapping, then that's
> I saw the same problem on a PCI card with a 128MB BAR. it is triggered
> on an Tyan opteron mobo, while on a old Dell P4 mobo it is ok. I
Ah, so it could maybe a mainboard problem?
> followed a bit the source code for ioremap and found two places in which
> it can fail,
> area = get_vm_area(size, VM_IOREMAP);
> if (!area)
> return NULL;
> addr = area->addr;
> if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) {
> vfree(addr);
> return NULL;
> }
> I had not time to add debug printk and recompila the kernel to check
> which one is faulty...
> The strange thing is that the BARs seems to be laid out correctly, so it
> does not look like a bios bug...
But even if it's not a bug, maybe a BIOS update would help...
I'll check this out too...
>>> probably too large an area to be remapping. Try remapping only the
>>> memory area needed, and not the entire area.
>> Is there a way, to increase the size, which could be remapped, or is
>> there a way, to find out what is the maximum size which could be
>> remapped?
> we tried with half and it was ok, then we moved up a bit and found the
> maximum around 80MB I think...
Okay, i'll let try it out with only 64MB.
Thanks for your help!
Best regards,
Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)
Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany
Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11
E-Mail: Markus.Lidel@shadowconnect.com
URL: http://www.shadowconnect.com
next prev parent reply other threads:[~2004-06-02 8:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-01 12:37 Problem with ioremap which returns NULL in 2.6 kernel Markus Lidel
2004-06-01 14:21 ` Jeff Garzik
2004-06-01 15:21 ` Markus Lidel
2004-06-01 17:08 ` Davide Rossetti
2004-06-02 8:59 ` Markus Lidel [this message]
2004-06-01 23:32 ` Jeff Garzik
2004-06-02 8:55 ` Markus Lidel
2004-06-02 13:23 ` Jeff Garzik
2004-06-02 13:49 ` Markus Lidel
2004-06-02 13:46 ` Jeff Garzik
2004-06-02 14:18 ` Markus Lidel
2004-06-02 14:39 ` Richard B. Johnson
2004-06-02 15:26 ` Markus Lidel
2004-06-02 15:45 ` Richard B. Johnson
2004-06-03 2:41 ` Stuart Young
2004-06-03 2:51 ` Jeff Garzik
2004-06-03 8:38 ` Markus Lidel
2004-06-03 11:42 ` Richard B. Johnson
2004-07-16 11:19 ` Richard B. Johnson
2004-06-02 0:09 ` Zwane Mwaikambo
2004-06-02 12:17 ` Markus Lidel
2004-06-04 20:16 ` Zwane Mwaikambo
2004-07-16 17:29 ` Zwane Mwaikambo
2004-07-16 17:30 ` Jeff Garzik
2004-07-17 0:30 ` Markus Lidel
2004-07-17 0:33 ` Markus Lidel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40BD96E3.20903@shadowconnect.com \
--to=markus.lidel@shadowconnect.com \
--cc=davide.rossetti@roma1.infn.it \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox