[PATCH] x86_64: checking aperture report for node instead of cpu

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>, Andi Kleen <ak@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>
Cc: Christoph Lameter <clameter@...>, <ebiederm@...>, LKML <linux-kernel@...>
Date: Monday, January 14, 2008 - 9:39 pm

this one is against x86.git

[PATCH] x86_64: checking aperture report for node instead of cpu

currently when gart iommu is enabled by BIOS or previous we got

"
Checking aperture...
CPU 0: aperture @4000000 size 64MB
CPU 1: aperture @4000000 size 64MB
"
we should use use Node instead.

we will get
"
Checking aperture...
Node 0: aperture @4000000 size 64MB
Node 1: aperture @4000000 size 64MB
"

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

Index: linux-2.6/arch/x86/kernel/aperture_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/aperture_64.c
+++ linux-2.6/arch/x86/kernel/aperture_64.c
@@ -312,6 +312,7 @@ void __init gart_iommu_hole_init(void)
 	u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
 	u64 aper_base, last_aper_base = 0;
 	int fix, num, valid_agp = 0;
+	int node;
 
 	if (gart_iommu_aperture_disabled || !fix_aperture ||
 	    !early_pci_allowed())
@@ -320,6 +321,7 @@ void __init gart_iommu_hole_init(void)
 	printk(KERN_INFO  "Checking aperture...\n");
 
 	fix = 0;
+	node = 0;
 	for (num = 24; num < 32; num++) {
 		if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00)))
 			continue;
@@ -332,8 +334,8 @@ void __init gart_iommu_hole_init(void)
 		aper_base = read_pci_config(0, num, 3, 0x94) & 0x7fff;
 		aper_base <<= 25;
 
-		printk(KERN_INFO "CPU %d: aperture @ %Lx size %u MB\n",
-				num-24, aper_base, aper_size>>20);
+		printk(KERN_INFO "Node %d: aperture @ %Lx size %u MB\n",
+				node++, aper_base, aper_size >> 20);
 
 		if (!aperture_valid(aper_base, aper_size)) {
 			fix = 1;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86-64: disable the GART early, Yinghai Lu, (Thu Jan 10, 11:14 pm)
[PATCH] x86-64: disable the GART early v2, Yinghai Lu, (Fri Jan 11, 3:54 am)
Re: [PATCH] x86-64: disable the GART early v2, Ingo Molnar, (Fri Jan 11, 4:14 am)
Re: [PATCH] x86-64: disable the GART early v2, Yinghai Lu, (Sat Jan 12, 6:07 am)
Re: [PATCH] x86-64: disable the GART early v2, Ingo Molnar, (Mon Jan 14, 4:35 am)
[PATCH] x86_64: checking aperture report for node instead of..., Yinghai Lu, (Mon Jan 14, 9:39 pm)
Re: [PATCH] x86-64: disable the GART early v2, Yinghai Lu, (Fri Jan 11, 4:34 am)