Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4647949pxb; Tue, 28 Sep 2021 00:17:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEUnHtzhWcCqlUcHTjGKp55CHWSdl0KYE1zH/TOjxj0po8U7uQ1EU9SA43ZlAvV04Mx+ij X-Received: by 2002:a63:3d4c:: with SMTP id k73mr3330105pga.44.1632813422068; Tue, 28 Sep 2021 00:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632813422; cv=none; d=google.com; s=arc-20160816; b=jjqY0/tRfq9KK04rZ3UHW8owYDYXPcxu2HfaSdQKVGMtaWmr7HMA8MRbeEzxjZOD7h jFUcKjgglipzN+UK8YzMKG23I/LLNYOBaeLwb/aPmankBEF9GyOfsIHb6gmgwZ5A5WaE yAZHpNdP0hXy/7VgNFlyeMRaNlzWD8UjELC8kQXIRIoQFJiJRZO9XklFejdePM6tTPHf TXhdMIhAgczeRIYR6/ZNGxW9NXlRjsTWqZ6kHlVWsAQToxqAucIBVrw1HvWdqPNfdTB4 8ozoBfon33olXXLk46N/5wlSPa1W2uhATwDUcPtM8/GD7mPcINbw2w4O8M1DtNFgVd1N VTEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TnJmMIaNouWpU4eaUVlaPFWyhwwM1BDQucMyKac8pTs=; b=A/Ei+TkAvRxt48Ac+cXT6kB5qW/QxeBqbQ6rziGsP8pxaTFEXtrRkiQTAycE99hMSW 6qfIW8vxQG/64ZNXfvOwhDJqg5A/PIxkJbTSPcgDY1zqxijKK8ZERYOoRfhYzwx0GVzl 4N+Ywt20E/T1jbPqi2P7WlpL6X3xccnAxxn6I8fIG5K1YA6Em54BZcIXst7lu/MaOZRe kIsQBUwwhKI2VWaenqz857kJpEp7p7bkadl4UsecSzPHKIjDCHI09Yeqt582flJxxEKR OaxNCAS1P2NsK9rpa4VVR6LIM5VoeuL80DKFZxiNzs0lWjzht3B7MVHNXill6AiuAM/9 jfUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si2188711pjx.149.2021.09.28.00.16.49; Tue, 28 Sep 2021 00:17:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239194AbhI1HRl (ORCPT + 99 others); Tue, 28 Sep 2021 03:17:41 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:44487 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239142AbhI1HRk (ORCPT ); Tue, 28 Sep 2021 03:17:40 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4HJW4w1csMz9sY4; Tue, 28 Sep 2021 09:16:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dsEG85IsB9d9; Tue, 28 Sep 2021 09:16:00 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4HJW4w0hDKz9sXy; Tue, 28 Sep 2021 09:16:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 01A628B775; Tue, 28 Sep 2021 09:16:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id YYYmKCpsbY4J; Tue, 28 Sep 2021 09:15:59 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.203.48]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A26C08B763; Tue, 28 Sep 2021 09:15:59 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1) with ESMTPS id 18S7FnZ51452321 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 09:15:49 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1/Submit) id 18S7Fnpb1452320; Tue, 28 Sep 2021 09:15:49 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Andrew Morton , arnd@arndb.de Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org, Gerald Schaefer Subject: [PATCH v2 4/4] s390: Use generic version of arch_is_kernel_initmem_freed() Date: Tue, 28 Sep 2021 09:15:37 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Generic version of arch_is_kernel_initmem_freed() now does the same as s390 version. Remove the s390 version. Cc: Gerald Schaefer Signed-off-by: Christophe Leroy --- v2: No change --- arch/s390/include/asm/sections.h | 12 ------------ arch/s390/mm/init.c | 3 --- 2 files changed, 15 deletions(-) diff --git a/arch/s390/include/asm/sections.h b/arch/s390/include/asm/sections.h index 85881dd48022..3fecaa4e8b74 100644 --- a/arch/s390/include/asm/sections.h +++ b/arch/s390/include/asm/sections.h @@ -2,20 +2,8 @@ #ifndef _S390_SECTIONS_H #define _S390_SECTIONS_H -#define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed - #include -extern bool initmem_freed; - -static inline int arch_is_kernel_initmem_freed(unsigned long addr) -{ - if (!initmem_freed) - return 0; - return addr >= (unsigned long)__init_begin && - addr < (unsigned long)__init_end; -} - /* * .boot.data section contains variables "shared" between the decompressor and * the decompressed kernel. The decompressor will store values in them, and diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index a04faf49001a..8c6f258a6183 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -58,8 +58,6 @@ unsigned long empty_zero_page, zero_page_mask; EXPORT_SYMBOL(empty_zero_page); EXPORT_SYMBOL(zero_page_mask); -bool initmem_freed; - static void __init setup_zero_pages(void) { unsigned int order; @@ -214,7 +212,6 @@ void __init mem_init(void) void free_initmem(void) { - initmem_freed = true; __set_memory((unsigned long)_sinittext, (unsigned long)(_einittext - _sinittext) >> PAGE_SHIFT, SET_MEMORY_RW | SET_MEMORY_NX); -- 2.31.1