From patchwork Wed Oct 21 11:29:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Kirjanov X-Patchwork-Id: 533787 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B9388140549 for ; Wed, 21 Oct 2015 22:37:30 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 9FC141A0B0F for ; Wed, 21 Oct 2015 22:37:30 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3C07B1A02DE for ; Wed, 21 Oct 2015 22:36:33 +1100 (AEDT) Received: by ozlabs.org (Postfix) id 2DCAB140DAF; Wed, 21 Oct 2015 22:36:33 +1100 (AEDT) Delivered-To: linuxppc-dev@ozlabs.org Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7E283140549 for ; Wed, 21 Oct 2015 22:36:32 +1100 (AEDT) Received: by lbbes7 with SMTP id es7so36141340lbb.2 for ; Wed, 21 Oct 2015 04:36:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=g55MTG3KQtipKnJV7eEoZZTeD3WcxEwt8R69SlUx7Qo=; b=Rx9auZ8HjLvxBUGgGR3HnbT6QFCal/nmTKLQyW0AhmoPDssNN4iDTa12vrOYDPW1jl kqA8GjUf/Gf8fwhaLvoI26iKQBre2FQ98JAHgT24rZnG3q31K8u3scKLPKsdaitjLhwo gTOM8IeLjTu2tpKf48h0ofzr+sld4zrz/z2Mtd5vF5SF22kCXbtQ7zj/GUgeBK62llIg Dmbile+WmG4j5lCEcGlMSpecq6JTCPtk4fEXhi/Jtd09kf8SntOZuMK/m7zfkd1W3kKk oQQAIflRFkW6JeS3LvqRMRSCUhn2pwbkGIXbZmnEGYunrR/5S9JJ8nqwKtl2SInxHZZD autg== X-Gm-Message-State: ALoCoQkRFUPbsDtUUiOcqMJ8ET5HXGO5B3UZleF1WECQMk/B3u9pWYBJwoPRmjDrvilCriZp3P+t X-Received: by 10.112.181.71 with SMTP id du7mr4852428lbc.37.1445427388468; Wed, 21 Oct 2015 04:36:28 -0700 (PDT) Received: from vfirst.itsirius.su ([195.54.192.103]) by smtp.gmail.com with ESMTPSA id c6sm1367296lbp.2.2015.10.21.04.36.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Oct 2015 04:36:27 -0700 (PDT) From: Denis Kirjanov To: Michael Ellerman Subject: [PATCH v2] powerpc/msi: fix section mismatch warning Date: Wed, 21 Oct 2015 14:29:13 +0300 Message-Id: <1445426953-15934-1-git-send-email-kda@linux-powerpc.org> X-Mailer: git-send-email 2.4.6 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , Denis Kirjanov , linuxppc-dev@ozlabs.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Building with CONFIG_DEBUG_SECTION_MISMATCH gives the following warning: WARNING: vmlinux.o(.text+0x41fa8): Section mismatch in reference from the function .msi_bitmap_alloc() to the function .init.text:.memblock_virt_alloc_try_nid() The function .msi_bitmap_alloc() references the function __init .memblock_virt_alloc_try_nid(). This is often because .msi_bitmap_alloc lacks a __init annotation or the annotation of .memblock_virt_alloc_try_nid is wrong. memory allocation in msi_bitmap_alloc use either slab allocator or memblock boot-time allocator so that's why we need the __init_refok for the latter case. Signed-off-by: Denis Kirjanov --- arch/powerpc/sysdev/msi_bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/msi_bitmap.c b/arch/powerpc/sysdev/msi_bitmap.c index 1a826f3..ed5234e 100644 --- a/arch/powerpc/sysdev/msi_bitmap.c +++ b/arch/powerpc/sysdev/msi_bitmap.c @@ -112,7 +112,7 @@ int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp) return 0; } -int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, +int __init_refok msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, struct device_node *of_node) { int size;