From f9e479d7d30e0e4d37d6196a71e6486eefe85721 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 31 Jul 2008 12:41:34 +0200 Subject: [PATCH] --- yaml --- r: 113237 b: refs/heads/master c: 4b336b0625fe822cdc21646cc3bc3abacf05a3d0 h: refs/heads/master i: 113235: 9f436f6e38271742bbece849e853e37f21da4c6a v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/pci-dma.c | 8 ++++++++ trunk/arch/x86/kernel/setup.c | 13 +++++++++---- trunk/include/asm-x86/iommu.h | 2 ++ trunk/include/linux/iommu-helper.h | 1 - trunk/init/calibrate.c | 2 +- trunk/lib/iommu-helper.c | 8 -------- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index d88d9760ef4d..224ed8cfef74 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0d1edf46ba229b46efacf75c0544b88c05a7b266 +refs/heads/master: 4b336b0625fe822cdc21646cc3bc3abacf05a3d0 diff --git a/trunk/arch/x86/kernel/pci-dma.c b/trunk/arch/x86/kernel/pci-dma.c index 8dbffb846de9..87d4d6964ec2 100644 --- a/trunk/arch/x86/kernel/pci-dma.c +++ b/trunk/arch/x86/kernel/pci-dma.c @@ -123,6 +123,14 @@ void __init pci_iommu_alloc(void) pci_swiotlb_init(); } + +unsigned long iommu_num_pages(unsigned long addr, unsigned long len) +{ + unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE); + + return size >> PAGE_SHIFT; +} +EXPORT_SYMBOL(iommu_num_pages); #endif /* diff --git a/trunk/arch/x86/kernel/setup.c b/trunk/arch/x86/kernel/setup.c index b520dae02bf4..2d888586385d 100644 --- a/trunk/arch/x86/kernel/setup.c +++ b/trunk/arch/x86/kernel/setup.c @@ -788,10 +788,6 @@ void __init setup_arch(char **cmdline_p) initmem_init(0, max_pfn); -#ifdef CONFIG_X86_64 - dma32_reserve_bootmem(); -#endif - #ifdef CONFIG_ACPI_SLEEP /* * Reserve low memory region for sleep support. @@ -806,6 +802,15 @@ void __init setup_arch(char **cmdline_p) #endif reserve_crashkernel(); +#ifdef CONFIG_X86_64 + /* + * dma32_reserve_bootmem() allocates bootmem which may conflict + * with the crashkernel command line, so do that after + * reserve_crashkernel() + */ + dma32_reserve_bootmem(); +#endif + reserve_ibft_region(); #ifdef CONFIG_KVM_CLOCK diff --git a/trunk/include/asm-x86/iommu.h b/trunk/include/asm-x86/iommu.h index ecc8061904a9..5f888cc5be49 100644 --- a/trunk/include/asm-x86/iommu.h +++ b/trunk/include/asm-x86/iommu.h @@ -7,6 +7,8 @@ extern struct dma_mapping_ops nommu_dma_ops; extern int force_iommu, no_iommu; extern int iommu_detected; +extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len); + #ifdef CONFIG_GART_IOMMU extern int gart_iommu_aperture; extern int gart_iommu_aperture_allowed; diff --git a/trunk/include/linux/iommu-helper.h b/trunk/include/linux/iommu-helper.h index f8598f583944..c975caf75385 100644 --- a/trunk/include/linux/iommu-helper.h +++ b/trunk/include/linux/iommu-helper.h @@ -8,4 +8,3 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, unsigned long align_mask); extern void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr); -extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len); diff --git a/trunk/init/calibrate.c b/trunk/init/calibrate.c index 7963e3fc51d9..a379c9061199 100644 --- a/trunk/init/calibrate.c +++ b/trunk/init/calibrate.c @@ -170,7 +170,7 @@ void __cpuinit calibrate_delay(void) loops_per_jiffy &= ~loopbit; } } - printk(KERN_INFO "%lu.%02lu BogoMIPS (lpj=%lu)\n", + printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n", loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); } diff --git a/trunk/lib/iommu-helper.c b/trunk/lib/iommu-helper.c index 889ddce2021e..a3b8d4c3f77a 100644 --- a/trunk/lib/iommu-helper.c +++ b/trunk/lib/iommu-helper.c @@ -80,11 +80,3 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr) } } EXPORT_SYMBOL(iommu_area_free); - -unsigned long iommu_num_pages(unsigned long addr, unsigned long len) -{ - unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE); - - return size >> PAGE_SHIFT; -} -EXPORT_SYMBOL(iommu_num_pages);