Message ID | 20230911093850.1517389-1-geert+renesas@glider.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bf16:0:b0:3f4:cb6f:45e2 with SMTP id bk22csp15207vqb; Mon, 11 Sep 2023 13:56:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFeg0q6/j06h4+e5EHKLqJ1bU059UYNsVl13FUlkYYgpKEpKFqHUPh8aRaD3tjRVe3st/x X-Received: by 2002:a17:902:da92:b0:1c0:ceab:e9bd with SMTP id j18-20020a170902da9200b001c0ceabe9bdmr13832606plx.25.1694465805717; Mon, 11 Sep 2023 13:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694465805; cv=none; d=google.com; s=arc-20160816; b=EDp+xsWxoYkP66vaFtO95o7j7YIb5Ua5PkTYgMJKEKHP5un16LlibbHeJZhPSwVPyN AXpBxUeBqyAiugj/xSoTAPi9FCiX4Cu97Q779GSCgjntSNahifQ6vsqNigureMdVnZaJ sfJg8zdNey4leRp44jnwoH8KMam3XAnwx7DS3v9JOPzfXypmptB7T5nLHgpFNkLl/cTg PCI8msAcmHIIO1DC8lSD9Y6baLIwNEpxPOLJ98+3vpWdSEvAw4aUpBnRTa445vgttIyk biF3vUCi81oZOpDjyC7ttf/6Kw140vmWuk7NfhEO43goncQgowX/HmMkr7WSFm7casUV eN5Q== 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 :message-id:date:subject:cc:to:from; bh=ZuDmqlAhN3jvTNLfOPEOrhjq2MRmz8ulp+t//dGaAYU=; fh=uqhoPqKAyfEOVW6GhPt0FtlglQygd4yxdDyis5D8+gQ=; b=1CyY7D8HXs1Qfw2SNEooxA47JO3WdMneEukbbXglB+V8c9EZV7/7IEB0Eszn5/8JRF ATtF3smMIfMN78Olrzqq1iNskpnk0RgVtp8S0rxRoy7vW3BTkubw4q9TKzO+U9UXDzn6 da7ZhbWKgeiEwJQIVHS22sgX6jxc+nWiNOn0IeMPlaHq36s10yTS+QdmYFwcO7UXQ/Iy /EbvRIXkpM3R1yu8FomRBjy7Hhg9opaBp0hIgAKQLmv8q5DMIa/RSOUJvNgF8pltlQsE eZ5flmwkmdpaLc/A3KdyoOwHGihI4ao9BWH/gHjZC5DHqvn6wafbPPJZMhuIaB/KMIG8 dE+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a170902eb9000b0019c354055d0si2378340plg.304.2023.09.11.13.56.10; Mon, 11 Sep 2023 13:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238523AbjIKUyk (ORCPT <rfc822;hyq.kernel@gmail.com> + 99 others); Mon, 11 Sep 2023 16:54:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235792AbjIKJjJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 11 Sep 2023 05:39:09 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA000EE for <linux-kernel@vger.kernel.org>; Mon, 11 Sep 2023 02:39:03 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:a989:d413:f41f:af52]) by xavier.telenet-ops.be with bizsmtp id kZez2A00b43UkUk01Zez9u; Mon, 11 Sep 2023 11:39:01 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qfdNT-002zNf-F0; Mon, 11 Sep 2023 11:38:59 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qfdNj-006NE7-O5; Mon, 11 Sep 2023 11:38:59 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Andrew Morton <akpm@linux-foundation.org>, Baoquan He <bhe@redhat.com> Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH] sh: mm: Re-add lost __ref to ioremap_prot() to fix modpost warning Date: Mon, 11 Sep 2023 11:38:50 +0200 Message-Id: <20230911093850.1517389-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776775971379973971 X-GMAIL-MSGID: 1776776176790094080 |
Series |
sh: mm: Re-add lost __ref to ioremap_prot() to fix modpost warning
|
|
Commit Message
Geert Uytterhoeven
Sept. 11, 2023, 9:38 a.m. UTC
When __ioremap_caller() was replaced by ioremap_prot(), the __ref
annotation added in commit af1415314a4190b8 ("sh: Flag
__ioremap_caller() __init_refok.") was removed, causing a modpost
warning:
WARNING: modpost: vmlinux: section mismatch in reference: ioremap_prot+0x88 (section: .text) -> ioremap_fixed (section: .init.text)
ioremap_prot() calls ioremap_fixed() (which is marked __init), but only
before mem_init_done becomes true, so this is safe. Hence fix this by
re-adding the lost __ref.
Fixes: 0453c9a78015cb22 ("sh: mm: convert to GENERIC_IOREMAP")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/sh/mm/ioremap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Mon, 2023-09-11 at 11:38 +0200, Geert Uytterhoeven wrote: > When __ioremap_caller() was replaced by ioremap_prot(), the __ref > annotation added in commit af1415314a4190b8 ("sh: Flag > __ioremap_caller() __init_refok.") was removed, causing a modpost > warning: > > WARNING: modpost: vmlinux: section mismatch in reference: ioremap_prot+0x88 (section: .text) -> ioremap_fixed (section: .init.text) > > ioremap_prot() calls ioremap_fixed() (which is marked __init), but only > before mem_init_done becomes true, so this is safe. Hence fix this by > re-adding the lost __ref. > > Fixes: 0453c9a78015cb22 ("sh: mm: convert to GENERIC_IOREMAP") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > arch/sh/mm/ioremap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c > index c33b3daa4ad1a3e6..33d20f34560fd5cb 100644 > --- a/arch/sh/mm/ioremap.c > +++ b/arch/sh/mm/ioremap.c > @@ -72,8 +72,8 @@ __ioremap_29bit(phys_addr_t offset, unsigned long size, pgprot_t prot) > #define __ioremap_29bit(offset, size, prot) NULL > #endif /* CONFIG_29BIT */ > > -void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size, > - unsigned long prot) > +void __iomem __ref *ioremap_prot(phys_addr_t phys_addr, size_t size, > + unsigned long prot) > { > void __iomem *mapped; > pgprot_t pgprot = __pgprot(prot); Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index c33b3daa4ad1a3e6..33d20f34560fd5cb 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c @@ -72,8 +72,8 @@ __ioremap_29bit(phys_addr_t offset, unsigned long size, pgprot_t prot) #define __ioremap_29bit(offset, size, prot) NULL #endif /* CONFIG_29BIT */ -void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size, - unsigned long prot) +void __iomem __ref *ioremap_prot(phys_addr_t phys_addr, size_t size, + unsigned long prot) { void __iomem *mapped; pgprot_t pgprot = __pgprot(prot);