Re: RFC: x86: cap iomem_resource to addressable physical memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 9, 2009 at 6:32 PM, H. Peter Anvin<hpa@xxxxxxxxxxxxxxx> wrote:
> x86 cannot generate full 64-bit addresses; this patch clamps iomem
> addresses to the accessible range.
>
> I wanted to post it for review before committing it, however; comments
> would be appreciated, especially of the kind "this is done too early/too
> late/in the wrong place/incorrectly".
| --- a/arch/x86/kernel/cpu/common.c
| +++ b/arch/x86/kernel/cpu/common.c
| @@ -839,6 +839,9 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
| #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
| 	numa_add_cpu(smp_processor_id());
| #endif
|+
|+	/* Cap the iomem address space to what is addressable on all CPUs */
|+	iomem_resource.end &= (1ULL << c->x86_phys_bits) - 1;
| }
|


do we need do that on every cpu?

looks like we could do that in identify_boot_cpu.

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux