Messages in this thread | | | Date | Wed, 22 Oct 2008 22:52:43 +0800 | From | Yu Zhao <> | Subject | Re: [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;
| |