From 01573e231f18eb2d99162747186f59511f56b64d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 08 Dec 2023 10:40:48 +0000 Subject: [PATCH] 移去rt --- kernel/arch/powerpc/sysdev/msi_bitmap.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/arch/powerpc/sysdev/msi_bitmap.c b/kernel/arch/powerpc/sysdev/msi_bitmap.c index e64a411..fdd3e17 100644 --- a/kernel/arch/powerpc/sysdev/msi_bitmap.c +++ b/kernel/arch/powerpc/sysdev/msi_bitmap.c @@ -1,18 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright 2006-2008, Michael Ellerman, IBM Corporation. - * - * 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. - * */ #include <linux/slab.h> #include <linux/kernel.h> #include <linux/kmemleak.h> #include <linux/bitmap.h> -#include <linux/bootmem.h> +#include <linux/memblock.h> #include <asm/msi_bitmap.h> #include <asm/setup.h> @@ -128,7 +123,10 @@ if (bmp->bitmap_from_slab) bmp->bitmap = kzalloc(size, GFP_KERNEL); else { - bmp->bitmap = memblock_virt_alloc(size, 0); + bmp->bitmap = memblock_alloc(size, SMP_CACHE_BYTES); + if (!bmp->bitmap) + panic("%s: Failed to allocate %u bytes\n", __func__, + size); /* the bitmap won't be freed from memblock allocator */ kmemleak_not_leak(bmp->bitmap); } -- Gitblit v1.6.2