[discuss] [PATCH] [3/7] x86_64: Check for too many northbridges in IOMMU code

Langsdorf, Mark mark.langsdorf at amd.com
Fri May 5 22:32:18 CEST 2006


Andi -

What's the reason for limiting the IOMMU code to only
8 northbridges?  Would it be possible to set MAX_NB
to a larger value in a future patch if necessary?

-Mark Langsdorf
AMD, Inc.

> -----Original Message-----
> From: ak at suse.de [mailto:ak at suse.de] 
> Sent: Friday, May 05, 2006 1:33 PM
> To: torvalds at osdl.org
> Cc: discuss at x86-64.org; akpm at osdl.org
> Subject: [discuss] [PATCH] [3/7] x86_64: Check for too many 
> northbridges in IOMMU code
> 
> 
> 
> The IOMMU code can only deal with 8 northbridges. Error out 
> when more are found.
> 
> Signed-off-by: Andi Kleen <ak at suse.de>
> 
> ---
>  arch/x86_64/kernel/pci-gart.c |    8 ++++++++
>  1 files changed, 8 insertions(+)
> 
> Index: linux/arch/x86_64/kernel/pci-gart.c
> ===================================================================
> --- linux.orig/arch/x86_64/kernel/pci-gart.c
> +++ linux/arch/x86_64/kernel/pci-gart.c
> @@ -640,6 +640,14 @@ static int __init pci_iommu_init(void)
>  		return -1;
>  	}
>  
> +	i = 0;
> +	for_all_nb(dev)
> +		i++;
> +	if (i > MAX_NB) {
> +		printk(KERN_ERR "PCI-GART: Too many 
> northbridges (%ld). Disabled\n", i);
> +		return -1;
> +	}
> +
>  	printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");
>  	aper_size = info.aper_size * 1024 * 1024;	
>  	iommu_size = check_iommu_size(info.aper_base, aper_size); 
> 
> 




More information about the discuss mailing list