Re: 2.6.7-rc3-mm1

From: William Lee Irwin III
Date: Wed Jun 09 2004 - 12:07:52 EST


On Wed, Jun 09, 2004 at 01:35:15PM -0300, Norberto Bensa wrote:
> CC drivers/pci/msi.o
> drivers/pci/msi.c: In function `msi_address_init':
> drivers/pci/msi.c:265: error: invalid operands to binary <<
> make[2]: *** [drivers/pci/msi.o] Error 1
> make[1]: *** [drivers/pci] Error 2
> make: *** [drivers] Error 2
> The offending line is:
>
> msi_address->lo_address.value |= (MSI_TARGET_CPU << MSI_TARGET_CPU_SHIFT);

The MSI writers have a lot to answer for. Could you test this?

Thanks.

Index: mm1-2.6.7-rc3/drivers/pci/msi.c
===================================================================
--- mm1-2.6.7-rc3.orig/drivers/pci/msi.c 2004-06-07 12:14:59.000000000 -0700
+++ mm1-2.6.7-rc3/drivers/pci/msi.c 2004-06-09 10:04:21.000000000 -0700
@@ -254,7 +254,8 @@

static void msi_address_init(struct msg_address *msi_address)
{
- unsigned int dest_id;
+ unsigned int dest_id;
+ cpumask_t msi_target_cpu = MSI_TARGET_CPU;

memset(msi_address, 0, sizeof(struct msg_address));
msi_address->hi_address = (u32)0;
@@ -262,7 +263,7 @@
msi_address->lo_address.u.dest_mode = MSI_DEST_MODE;
msi_address->lo_address.u.redirection_hint = MSI_REDIRECTION_HINT_MODE;
msi_address->lo_address.u.dest_id = dest_id;
- msi_address->lo_address.value |= (MSI_TARGET_CPU << MSI_TARGET_CPU_SHIFT);
+ msi_address->lo_address.value |= any_online_cpu(msi_target_cpu) << MSI_TARGET_CPU_SHIFT;
}

static int assign_msi_vector(void)
Index: mm1-2.6.7-rc3/include/asm-i386/msi.h
===================================================================
--- mm1-2.6.7-rc3.orig/include/asm-i386/msi.h 2004-06-07 12:14:42.000000000 -0700
+++ mm1-2.6.7-rc3/include/asm-i386/msi.h 2004-06-09 09:50:04.000000000 -0700
@@ -14,7 +14,7 @@
#define MSI_TARGET_CPU_SHIFT 12

#ifdef CONFIG_SMP
-#define MSI_TARGET_CPU logical_smp_processor_id()
+#define MSI_TARGET_CPU cpumask_of_cpu(logical_smp_processor_id())
#else
#define MSI_TARGET_CPU TARGET_CPUS
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/