| .. | .. |
|---|
| 7 | 7 | * Contains common routines for sun3/sun3x DVMA management. |
|---|
| 8 | 8 | */ |
|---|
| 9 | 9 | |
|---|
| 10 | | -#include <linux/bootmem.h> |
|---|
| 10 | +#include <linux/memblock.h> |
|---|
| 11 | 11 | #include <linux/init.h> |
|---|
| 12 | 12 | #include <linux/module.h> |
|---|
| 13 | 13 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 16 | 16 | #include <linux/list.h> |
|---|
| 17 | 17 | |
|---|
| 18 | 18 | #include <asm/page.h> |
|---|
| 19 | | -#include <asm/pgtable.h> |
|---|
| 20 | 19 | #include <asm/dvma.h> |
|---|
| 21 | 20 | |
|---|
| 22 | 21 | #undef DVMA_DEBUG |
|---|
| .. | .. |
|---|
| 267 | 266 | |
|---|
| 268 | 267 | list_add(&(hole->list), &hole_list); |
|---|
| 269 | 268 | |
|---|
| 270 | | - iommu_use = alloc_bootmem(IOMMU_TOTAL_ENTRIES * sizeof(unsigned long)); |
|---|
| 269 | + iommu_use = memblock_alloc(IOMMU_TOTAL_ENTRIES * sizeof(unsigned long), |
|---|
| 270 | + SMP_CACHE_BYTES); |
|---|
| 271 | + if (!iommu_use) |
|---|
| 272 | + panic("%s: Failed to allocate %zu bytes\n", __func__, |
|---|
| 273 | + IOMMU_TOTAL_ENTRIES * sizeof(unsigned long)); |
|---|
| 271 | 274 | |
|---|
| 272 | 275 | dvma_unmap_iommu(DVMA_START, DVMA_SIZE); |
|---|
| 273 | 276 | |
|---|