| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Common pmac/prep/chrp pci routines. -- Cort |
|---|
| 3 | 4 | */ |
|---|
| .. | .. |
|---|
| 10 | 11 | #include <linux/capability.h> |
|---|
| 11 | 12 | #include <linux/sched.h> |
|---|
| 12 | 13 | #include <linux/errno.h> |
|---|
| 13 | | -#include <linux/bootmem.h> |
|---|
| 14 | +#include <linux/memblock.h> |
|---|
| 14 | 15 | #include <linux/syscalls.h> |
|---|
| 15 | 16 | #include <linux/irq.h> |
|---|
| 16 | 17 | #include <linux/list.h> |
|---|
| 17 | 18 | #include <linux/of.h> |
|---|
| 18 | 19 | #include <linux/slab.h> |
|---|
| 19 | 20 | #include <linux/export.h> |
|---|
| 20 | | -#include <linux/syscalls.h> |
|---|
| 21 | 21 | |
|---|
| 22 | 22 | #include <asm/processor.h> |
|---|
| 23 | 23 | #include <asm/io.h> |
|---|
| .. | .. |
|---|
| 204 | 204 | struct property* of_prop; |
|---|
| 205 | 205 | struct device_node *dn; |
|---|
| 206 | 206 | |
|---|
| 207 | | - of_prop = memblock_virt_alloc(sizeof(struct property) + 256, 0); |
|---|
| 207 | + of_prop = memblock_alloc(sizeof(struct property) + 256, |
|---|
| 208 | + SMP_CACHE_BYTES); |
|---|
| 209 | + if (!of_prop) |
|---|
| 210 | + panic("%s: Failed to allocate %zu bytes\n", __func__, |
|---|
| 211 | + sizeof(struct property) + 256); |
|---|
| 208 | 212 | dn = of_find_node_by_path("/"); |
|---|
| 209 | 213 | if (dn) { |
|---|
| 210 | 214 | memset(of_prop, -1, sizeof(struct property) + 256); |
|---|
| .. | .. |
|---|
| 259 | 263 | /* Call common code to handle resource allocation */ |
|---|
| 260 | 264 | pcibios_resource_survey(); |
|---|
| 261 | 265 | |
|---|
| 266 | + /* Call machine dependent fixup */ |
|---|
| 267 | + if (ppc_md.pcibios_fixup) |
|---|
| 268 | + ppc_md.pcibios_fixup(); |
|---|
| 269 | + |
|---|
| 262 | 270 | /* Call machine dependent post-init code */ |
|---|
| 263 | 271 | if (ppc_md.pcibios_after_init) |
|---|
| 264 | 272 | ppc_md.pcibios_after_init(); |
|---|