Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4436718pxb; Mon, 21 Feb 2022 21:34:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmk4a9XTixluzouFQU6zF/I5r8mwvTsRrDqsaMaQkh8fhjgP5hNdJvweTUXH69gy/9Yrze X-Received: by 2002:a65:6794:0:b0:36c:460e:858d with SMTP id e20-20020a656794000000b0036c460e858dmr18628753pgr.418.1645508074719; Mon, 21 Feb 2022 21:34:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645508074; cv=none; d=google.com; s=arc-20160816; b=wDNuXUcc0KVj4BUwsizJhLw9qfPG9bIjIMAQjXOGZPikXMHvMQsAeqW9z6BSLMamw1 c2zCT0cn2sp1HfBUpKvJzsvNiwJg+1na7caWdYEaLVe7fdUwBwkAzAe5ov6E/ErxAihl oEVNK0CLC4Svr/qSjeVm6o71W4DyHL3xCDc7IhXyNJZiWL4xyYZvmIOssdTT3DfW65ZB 2EAi7R12KVCeNWiMD3h8GdvhusK1KggehB6oh/ORr4iqQKxh4DvBHIEq6vuFhzVMz6op Wg2264fvBAVzIrRL/w7Eo353kTO6v3v5c8WdBI0CkUYesqfWDevu/JzrryVJ97fMfajm lBEw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/hvZaIDs/l6E1SuDdGpAsDKT//r7lUg463PoGWhZCHk=; b=zSNs/ECwHYoAfMN4tXY6DZFzBgTaf51z1uYXDv/Uco2IQoNpqwhyJNaz6zOJEp0Zzy tYOlFpHTnQOhOKFRGcD9UqK7pH2bWzsFRixXx2mRjeW8xKt31u8CdWSPzleQ1lpNYxCB mn9+zA52Qz0DroFiUZtxkJtNXF+F6q5yUA2SEFJcTWvC77riTUYtmjCHGsuRxNajwEja HubvtsGvwK7wV0mD0Skch6MUa+oLrurZXcHpxI0ESV5d4BiXWy0okOZB7ywLatmaCoLR My/fptCgOizATchR+Bp7PRK2c9nhtg0C1of7lsR1W31u79U3GxfKVK832oNavIJunjyL CE1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MNrvZLwk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ot8si1295948pjb.88.2022.02.21.21.34.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:34:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MNrvZLwk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3ED9D120F46; Mon, 21 Feb 2022 21:02:16 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351871AbiBUJqo (ORCPT + 99 others); Mon, 21 Feb 2022 04:46:44 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352148AbiBUJiG (ORCPT ); Mon, 21 Feb 2022 04:38:06 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BC9321823; Mon, 21 Feb 2022 01:17:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 83536CE0E8B; Mon, 21 Feb 2022 09:16:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BA0BC340E9; Mon, 21 Feb 2022 09:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435016; bh=h+6ax31lByBfHCOkSaM6gKDPC7nJTAqO45ye6NNozzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MNrvZLwkAz7QcQstnF8NavR3jKviEWSSriLdELwmYxOe8C2SBnpg2khk0lTOjJM6E 5HrcDzqsartmASLRMlac4NtlXw6PUJXCPrbYZXXxVCIzNwcAqi3qSNAVlRGjbN9TH6 009ui/GBGlcH+haGHg1GRi7ku+/zhYlYCgroUlTA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John David Anglin , Helge Deller Subject: [PATCH 5.16 015/227] parisc: Drop __init from map_pages declaration Date: Mon, 21 Feb 2022 09:47:14 +0100 Message-Id: <20220221084935.346800321@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John David Anglin commit 9129886b88185962538180625ca8051362b01327 upstream. With huge kernel pages, we randomly eat a SPARC in map_pages(). This is fixed by dropping __init from the declaration. However, map_pages references the __init routine memblock_alloc_try_nid via memblock_alloc. Thus, it needs to be marked with __ref. memblock_alloc is only called before the kernel text is set to readonly. The __ref on free_initmem is no longer needed. Comment regarding map_pages being in the init section is removed. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- arch/parisc/mm/init.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -337,9 +337,9 @@ static void __init setup_bootmem(void) static bool kernel_set_to_readonly; -static void __init map_pages(unsigned long start_vaddr, - unsigned long start_paddr, unsigned long size, - pgprot_t pgprot, int force) +static void __ref map_pages(unsigned long start_vaddr, + unsigned long start_paddr, unsigned long size, + pgprot_t pgprot, int force) { pmd_t *pmd; pte_t *pg_table; @@ -449,7 +449,7 @@ void __init set_kernel_text_rw(int enabl flush_tlb_all(); } -void __ref free_initmem(void) +void free_initmem(void) { unsigned long init_begin = (unsigned long)__init_begin; unsigned long init_end = (unsigned long)__init_end; @@ -463,7 +463,6 @@ void __ref free_initmem(void) /* The init text pages are marked R-X. We have to * flush the icache and mark them RW- * - * This is tricky, because map_pages is in the init section. * Do a dummy remap of the data section first (the data * section is already PAGE_KERNEL) to pull in the TLB entries * for map_kernel */