From 08f87f769b595151be1afeff53e144f543faa614 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 06 Dec 2023 09:51:13 +0000 Subject: [PATCH] add dts config --- kernel/arch/powerpc/platforms/ps3/setup.c | 27 +++++++-------------------- 1 files changed, 7 insertions(+), 20 deletions(-) diff --git a/kernel/arch/powerpc/platforms/ps3/setup.c b/kernel/arch/powerpc/platforms/ps3/setup.c index 77a3752..e9ae5dd 100644 --- a/kernel/arch/powerpc/platforms/ps3/setup.c +++ b/kernel/arch/powerpc/platforms/ps3/setup.c @@ -1,21 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * PS3 platform setup routines. * * Copyright (C) 2006 Sony Computer Entertainment Inc. * Copyright 2006 Sony Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/kernel.h> @@ -24,7 +12,7 @@ #include <linux/root_dev.h> #include <linux/console.h> #include <linux/export.h> -#include <linux/bootmem.h> +#include <linux/memblock.h> #include <asm/machdep.h> #include <asm/firmware.h> @@ -126,7 +114,10 @@ if (!p->size) return; - p->address = memblock_virt_alloc(p->size, p->align); + p->address = memblock_alloc(p->size, p->align); + if (!p->address) + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", + __func__, p->size, p->align); printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size, p->address); @@ -147,7 +138,7 @@ if (!p) return 1; - ps3fb_videomemory.size = _ALIGN_UP(memparse(p, &p), + ps3fb_videomemory.size = ALIGN(memparse(p, &p), ps3fb_videomemory.align); return 0; } @@ -207,10 +198,6 @@ #ifdef CONFIG_SMP smp_init_ps3(); -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; #endif prealloc_ps3fb_videomemory(); -- Gitblit v1.6.2