lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 9/16 v6] PCI: add boot option to align MMIO resources
Bjorn Helgaas wrote:
> On Wednesday 22 October 2008 02:43:24 am Yu Zhao wrote:
>> This patch adds boot option to align MMIO resource for a device.
>> The alignment is a bigger value between the PAGE_SIZE and the
>> resource size.
>
> It looks like this forces alignment on PAGE_SIZE, not "a bigger
> value between the PAGE_SIZE and the resource size." Can you
> clarify the changelog to specify exactly what alignment this
> option forces?

I guess following would explain your question.

>> int pci_resource_alignment(struct pci_dev *dev, int resno)
>> {
>> - resource_size_t align;
>> + resource_size_t align, bios_align;
>> struct resource *res = dev->resource + resno;
>>
>> + bios_align = pcibios_resource_alignment(dev, resno);
>> +
>> align = resource_alignment(res);
>> if (align)
>> - return align;
>> + return align > bios_align ? align : bios_align;
>>
>> dev_err(&dev->dev, "alignment: invalid resource #%d\n", resno);
>> return 0;



\
 
 \ /
  Last update: 2008-10-22 16:57    [W:0.173 / U:0.104 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site