forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/mips/ar7/memory.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org>
34 * Copyright (C) 2007 Eugene Konev <ejka@openwrt.org>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
185 */
19
-#include <linux/bootmem.h>
6
+#include <linux/memblock.h>
207 #include <linux/init.h>
218 #include <linux/mm.h>
229 #include <linux/pfn.h>
....@@ -60,7 +47,7 @@
6047 unsigned long pages;
6148
6249 pages = memsize() >> PAGE_SHIFT;
63
- add_memory_region(PHYS_OFFSET, pages << PAGE_SHIFT, BOOT_MEM_RAM);
50
+ memblock_add(PHYS_OFFSET, pages << PAGE_SHIFT);
6451 }
6552
6653 void __init prom_free_prom_memory(void)