hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/arch/powerpc/include/asm/drmem.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * drmem.h: Power specific logical memory block representation
34 *
45 * 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.
106 */
117
128 #ifndef _ASM_POWERPC_LMB_H
....@@ -82,6 +78,7 @@
8278 #define DRCONF_MEM_ASSIGNED 0x00000008
8379 #define DRCONF_MEM_AI_INVALID 0x00000040
8480 #define DRCONF_MEM_RESERVED 0x00000080
81
+#define DRCONF_MEM_HOTREMOVABLE 0x00000100
8582
8683 static inline u64 drmem_lmb_size(void)
8784 {
....@@ -106,13 +103,14 @@
106103 }
107104
108105 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 *));
111108 int drmem_update_dt(void);
112109
113110 #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 *));
116114 #endif
117115
118116 static inline void invalidate_lmb_associativity_index(struct drmem_lmb *lmb)