Shannon Nelson wrote:
> Make sure we can use cpu_physical_id() even when compiled for
> uni-processor.
>
> diff --git a/drivers/dma/ioat_dca.c b/drivers/dma/ioat_dca.c
> index c3a500b..b1af49c 100644
> --- a/drivers/dma/ioat_dca.c
> +++ b/drivers/dma/ioat_dca.c
> @@ -25,6 +25,14 @@
> #include <linux/smp.h>
> #include <linux/interrupt.h>
> #include <linux/dca.h>
> +
> +// either a kernel change is needed, or we need something like this in kernel
> +#ifndef CONFIG_SMP
> +#include <asm/smp.h>
> +#undef cpu_physical_id
> +#define cpu_physical_id(cpu) (cpuid_ebx(1) >> 24)
> +#endif
> +
This value should probably be cached. Executing cpuid to get a static
value seems like a bad idea.
-hpa
-
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]