From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC6B02584 for ; Thu, 23 Feb 2023 13:11:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A72BC433D2; Thu, 23 Feb 2023 13:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1677157898; bh=sa98HqRTL9MtJaaPFAn23CxWn5Aa8YRrGHp9Gudoazk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5HPnuzR1Ax9FHz96BF2OXx7EqGiWwmZBUUjMteoU003ZtSagaRYR16KwtDwZawlc bYSC8d2M2b2AQr8lXkTJwFUe4Tnw5mY9e+ijSa1qf+HK+8006FRv0KV/QyYUYExy8c GA2CkLhkBMU9ujc0hhPkYCm/wX/FBVjMTTVlZCIw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe Leroy , Kefeng Wang , Benjamin Herrenschmidt , Gerald Schaefer , Heiko Carstens , Paul Mackerras , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.15 16/36] powerpc: use generic version of arch_is_kernel_initmem_freed() Date: Thu, 23 Feb 2023 14:06:52 +0100 Message-Id: <20230223130429.831053507@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223130429.072633724@linuxfoundation.org> References: <20230223130429.072633724@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Christophe Leroy [ Upstream commit e012a25d81a12fb332e862b51bfb59321acf96e4 ] The generic version of arch_is_kernel_initmem_freed() now does the same as powerpc version. Remove the powerpc version. Link: https://lkml.kernel.org/r/c53764eb45d41491e2b21da2e7812239897dbebb.1633001016.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Kefeng Wang Cc: Benjamin Herrenschmidt Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Stable-dep-of: 111bcb373853 ("powerpc/64s/radix: Fix RWX mapping with relocated kernel") Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/sections.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index 6e4af4492a144..79cb7a25a5fb6 100644 --- a/arch/powerpc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h @@ -6,21 +6,8 @@ #include #include -#define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed - #include -extern bool init_mem_is_free; - -static inline int arch_is_kernel_initmem_freed(unsigned long addr) -{ - if (!init_mem_is_free) - return 0; - - return addr >= (unsigned long)__init_begin && - addr < (unsigned long)__init_end; -} - extern char __head_end[]; #ifdef __powerpc64__ -- 2.39.0