| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * drmem.h: Power specific logical memory block representation |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2017 IBM Corporation |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #ifndef _ASM_POWERPC_LMB_H |
|---|
| .. | .. |
|---|
| 82 | 78 | #define DRCONF_MEM_ASSIGNED 0x00000008 |
|---|
| 83 | 79 | #define DRCONF_MEM_AI_INVALID 0x00000040 |
|---|
| 84 | 80 | #define DRCONF_MEM_RESERVED 0x00000080 |
|---|
| 81 | +#define DRCONF_MEM_HOTREMOVABLE 0x00000100 |
|---|
| 85 | 82 | |
|---|
| 86 | 83 | static inline u64 drmem_lmb_size(void) |
|---|
| 87 | 84 | { |
|---|
| .. | .. |
|---|
| 106 | 103 | } |
|---|
| 107 | 104 | |
|---|
| 108 | 105 | u64 drmem_lmb_memory_max(void); |
|---|
| 109 | | -void __init walk_drmem_lmbs(struct device_node *dn, |
|---|
| 110 | | - void (*func)(struct drmem_lmb *, const __be32 **)); |
|---|
| 106 | +int walk_drmem_lmbs(struct device_node *dn, void *data, |
|---|
| 107 | + int (*func)(struct drmem_lmb *, const __be32 **, void *)); |
|---|
| 111 | 108 | int drmem_update_dt(void); |
|---|
| 112 | 109 | |
|---|
| 113 | 110 | #ifdef CONFIG_PPC_PSERIES |
|---|
| 114 | | -void __init walk_drmem_lmbs_early(unsigned long node, |
|---|
| 115 | | - void (*func)(struct drmem_lmb *, const __be32 **)); |
|---|
| 111 | +int __init |
|---|
| 112 | +walk_drmem_lmbs_early(unsigned long node, void *data, |
|---|
| 113 | + int (*func)(struct drmem_lmb *, const __be32 **, void *)); |
|---|
| 116 | 114 | #endif |
|---|
| 117 | 115 | |
|---|
| 118 | 116 | static inline void invalidate_lmb_associativity_index(struct drmem_lmb *lmb) |
|---|