Subject: Re: [PATCH 6/7] Enable MSI mappings for MPIC

From: Segher Boessenkool <[email-masked]>
Date: Thu, 11 Jan 2007 16:22:22 +0100

> +	flags = readb(base + HT_MSI_FLAGS);
> +	if (!(flags & HT_MSI_FLAGS_FIXED)) {
> +		addr = readl(base + HT_MSI_ADDR_LO) & HT_MSI_ADDR_LO_MASK;
> +		addr = addr | ((u64)readl(base + HT_MSI_ADDR_HI) << 32);
> +	}
> +
> +	printk(KERN_INFO "mpic:   - HT:%02x.%x %s MSI mapping found @ 
> 0x%lx\n",
> +		PCI_SLOT(devfn), PCI_FUNC(devfn),
> +		flags & HT_MSI_FLAGS_ENABLE ? "enabled" : "disabled", addr);

It's not safe in general to just take what the hardware
is currently set to.

Perhaps it is best to just always program 0xfee00000 (it's
a per-bus thing so you can use the same address everywhere),
since that address *has* to not conflict with other mappings
already, it being the standard fixed address and everything.

Segher