diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-01 13:28:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-01 13:28:17 -0400 |
commit | 57b1494d2ba544c62673234da6115c21fac27ffc (patch) | |
tree | 34f91f3187805fa034f8e63966d471ba2498d148 /arch | |
parent | 9fe3b64be3dc8313e9fa87255f169c608d074cbd (diff) | |
parent | 8978b74253280d59e97cf49a3ec2c0cbccd5b801 (diff) |
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()
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 8dbffb846de9..87d4d6964ec2 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -123,6 +123,14 @@ void __init pci_iommu_alloc(void) | |||
123 | 123 | ||
124 | pci_swiotlb_init(); | 124 | pci_swiotlb_init(); |
125 | } | 125 | } |
126 | |||
127 | unsigned long iommu_num_pages(unsigned long addr, unsigned long len) | ||
128 | { | ||
129 | unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE); | ||
130 | |||
131 | return size >> PAGE_SHIFT; | ||
132 | } | ||
133 | EXPORT_SYMBOL(iommu_num_pages); | ||
126 | #endif | 134 | #endif |
127 | 135 | ||
128 | /* | 136 | /* |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index b520dae02bf4..2d888586385d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -788,10 +788,6 @@ void __init setup_arch(char **cmdline_p) | |||
788 | 788 | ||
789 | initmem_init(0, max_pfn); | 789 | initmem_init(0, max_pfn); |
790 | 790 | ||
791 | #ifdef CONFIG_X86_64 | ||
792 | dma32_reserve_bootmem(); | ||
793 | #endif | ||
794 | |||
795 | #ifdef CONFIG_ACPI_SLEEP | 791 | #ifdef CONFIG_ACPI_SLEEP |
796 | /* | 792 | /* |
797 | * Reserve low memory region for sleep support. | 793 | * Reserve low memory region for sleep support. |
@@ -806,6 +802,15 @@ void __init setup_arch(char **cmdline_p) | |||
806 | #endif | 802 | #endif |
807 | reserve_crashkernel(); | 803 | reserve_crashkernel(); |
808 | 804 | ||
805 | #ifdef CONFIG_X86_64 | ||
806 | /* | ||
807 | * dma32_reserve_bootmem() allocates bootmem which may conflict | ||
808 | * with the crashkernel command line, so do that after | ||
809 | * reserve_crashkernel() | ||
810 | */ | ||
811 | dma32_reserve_bootmem(); | ||
812 | #endif | ||
813 | |||
809 | reserve_ibft_region(); | 814 | reserve_ibft_region(); |
810 | 815 | ||
811 | #ifdef CONFIG_KVM_CLOCK | 816 | #ifdef CONFIG_KVM_CLOCK |