[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47C7F664.5040102@garzik.org>
Date: Fri, 29 Feb 2008 07:11:16 -0500
From: Jeff Garzik <jeff@...zik.org>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: Tejun Heo <htejun@...il.com>,
Linux IDE mailing list <linux-ide@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: devres and requesting resources
Alan Cox wrote:
>> In converting to pcim_iomap_regions(), we no longer reserve /all/
>> regions, only the ones requested.
>>
>> This is actually a bug: it was intentional to call
>> pci_request_regions(), because that ensures that no other software will
>> use our resources -- even if we are not actively using the resource in
>> question.
>
> That would be a bug. We should only reserve the regions we are using. It
> is possible that the other regions can be used correctly by another driver
> (consider the CS5520 or the MPIIX where the IDE is only part of one
> function of the PCI device).
Only rare PCI devices are shareable among multiple drivers.
sata_* at least intentionally used pci_request_regions() because it is
obvious from the hardware spec that multiple regions accessed by
multiple drivers is highly unlikely, without the driver being
specifically coded to support such sharing. Such sharing code is far
beyond simple resource reservation, to avoid stepping on toes when there
is a single MMIO region and set of interrupt clearing registers.
So reading your email it sounds like there are valid cases for both
configurations.
Its a design choice either way, not a bug either way.
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists