On Tue, Jun 20, 2006 at 04:28:19PM -0600, Eric W. Biederman wrote:
> In support of this I also add a struct msi_msg that captures
> the the two address and one data field ina typical msi message,
> and I remember the pos and if the address is 64bit in
> struct msi_desc.
>
One thing I found very useful was to kmalloc msi_msg at MSI/MSI-X
enable time, and stick a pointer to it in the msi_desc structure,
not just for the CONFIG_PM case. For MSI, there's a single pointer
to track. This simplified a lot of code and allowed me to avoid
pci config reads to read the hardware at various places.
> Signed-off-by: Eric W. Biederman <[email protected]>
> ---
> drivers/pci/msi.c | 195 +++++++++++++++++++++++++--------------------------
> drivers/pci/msi.h | 9 +-
> include/linux/pci.h | 6 ++
> 3 files changed, 104 insertions(+), 106 deletions(-)
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index c1c93f0..e9db6c5 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -94,63 +94,100 @@ static void msi_set_mask_bit(unsigned in
> }
> }
>
> -#ifdef CONFIG_SMP
> -static void set_msi_affinity(unsigned int vector, cpumask_t cpu_mask)
> +static void read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
> {
You wouldn't need this if you saved away the msi_msg values
returned from ->setup().
Rajesh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]