/* ALI pirq entries are damn ugly, and completely undocumented. This has been figured out from pirq tables, and it's not a pretty picture.  */
static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
/* ALI pirq entries are damn ugly, and completely undocumented. This has been figured out from pirq tables, and it's not a pretty picture.  */
static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
	static const unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
	WARN_ON_ONCE(pirq > 16);
	return irqmap[read_config_nybble(router, 0x48, pirq-1)];
}