Commit 57b1494d authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic, x86: fix add iommu_num_pages helper function
  x86: remove stray <6> in BogoMIPS printk
  x86: move dma32_reserve_bootmem() after reserve_crashkernel()
parents 9fe3b64b 8978b742
...@@ -123,6 +123,14 @@ void __init pci_iommu_alloc(void) ...@@ -123,6 +123,14 @@ void __init pci_iommu_alloc(void)
pci_swiotlb_init(); 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 #endif
/* /*
......
...@@ -788,10 +788,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -788,10 +788,6 @@ void __init setup_arch(char **cmdline_p)
initmem_init(0, max_pfn); initmem_init(0, max_pfn);
#ifdef CONFIG_X86_64
dma32_reserve_bootmem();
#endif
#ifdef CONFIG_ACPI_SLEEP #ifdef CONFIG_ACPI_SLEEP
/* /*
* Reserve low memory region for sleep support. * Reserve low memory region for sleep support.
...@@ -806,6 +802,15 @@ void __init setup_arch(char **cmdline_p) ...@@ -806,6 +802,15 @@ void __init setup_arch(char **cmdline_p)
#endif #endif
reserve_crashkernel(); 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(); reserve_ibft_region();
#ifdef CONFIG_KVM_CLOCK #ifdef CONFIG_KVM_CLOCK
......
...@@ -7,6 +7,8 @@ extern struct dma_mapping_ops nommu_dma_ops; ...@@ -7,6 +7,8 @@ extern struct dma_mapping_ops nommu_dma_ops;
extern int force_iommu, no_iommu; extern int force_iommu, no_iommu;
extern int iommu_detected; extern int iommu_detected;
extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);
#ifdef CONFIG_GART_IOMMU #ifdef CONFIG_GART_IOMMU
extern int gart_iommu_aperture; extern int gart_iommu_aperture;
extern int gart_iommu_aperture_allowed; extern int gart_iommu_aperture_allowed;
......
...@@ -8,4 +8,3 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, ...@@ -8,4 +8,3 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
unsigned long align_mask); unsigned long align_mask);
extern void iommu_area_free(unsigned long *map, unsigned long start, extern void iommu_area_free(unsigned long *map, unsigned long start,
unsigned int nr); unsigned int nr);
extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);
...@@ -170,7 +170,7 @@ void __cpuinit calibrate_delay(void) ...@@ -170,7 +170,7 @@ void __cpuinit calibrate_delay(void)
loops_per_jiffy &= ~loopbit; 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/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
} }
...@@ -80,11 +80,3 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr) ...@@ -80,11 +80,3 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr)
} }
} }
EXPORT_SYMBOL(iommu_area_free); 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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment