/* Since we are just checking candidates, don't use any fields other than res->start.  */
void pcibios_align_resource(void *data, struct resource *res, resource_size_t size, resource_size_t alignment)
/* Since we are just checking candidates, don't use any fields other than res->start.  */
void pcibios_align_resource(void *data, struct resource *res, resource_size_t size, resource_size_t alignment)
{
	resource_size_t mask, align;
	DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n",
		pci_name(((struct pci_dev *) data)),
		res->parent, res->start, res->end,
		(int) res->flags, size, alignment);
	align = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
	mask = max(alignment, align) - 1;
	res->start += mask;
	res->start &= ~mask;
}