public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Modpost section mismatch fix
@ 2011-07-03 23:25 Raghavendra D Prabhu
  2011-07-04  8:49 ` Ian Campbell
  0 siblings, 1 reply; 16+ messages in thread
From: Raghavendra D Prabhu @ 2011-07-03 23:25 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: jeremy.fitzhardinge, xen-devel, virtualization, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

[Sorry if duplicate, one earlier was corrupt]

Hi,
     I got section mismatches reported by modpost in latest build. It got
     reported for xen_register_pirq and xen_unplug_emulated_devices
     functions. xen_register_pirq makes reference to
     acpi_sci_override_gsi in init.data section; marking
     xen_register_pirq with __init is not feasible since calls are made
     to it from acpi_register_gsi in non-init contexts. So marking it
     __refdata based on assumption that when acpi_sci_override_gsi is
     referenced, it is in  early stages where it is alive.


--------------------------
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net

[-- Attachment #2: 0001-xen-pci-Fix-modpost-warnings-regarding-section-misma.patch --]
[-- Type: text/plain, Size: 1731 bytes --]

>From 7dfd47575fd695fe8ddba951515cfac01a2ab8bc Mon Sep 17 00:00:00 2001
Message-Id: <7dfd47575fd695fe8ddba951515cfac01a2ab8bc.1309641255.git.rprabhu@wnohang.net>
From: Raghavendra D Prabhu <rprabhu@wnohang.net>
Date: Sun, 3 Jul 2011 01:48:50 +0530
Subject: [PATCH] xen/pci: Fix modpost warnings regarding section mismatch

Marking xen_register_pirq with __refdata since it is referencing
acpi_sci_override_gsi, an __initdata variable.  Removing __init from
check_platform_magic since it is called by xen_unplug_emulated_devices in
non-init contexts (It probably gets inlined because of
-finline-functions-called-once, removing __init is more to avoid mismatch being
reported).

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
---
 arch/x86/pci/xen.c                 |    2 +-
 arch/x86/xen/platform-pci-unplug.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index fe00830..fb5eeb0 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -327,7 +327,7 @@ int __init pci_xen_hvm_init(void)
 }
 
 #ifdef CONFIG_XEN_DOM0
-static int xen_register_pirq(u32 gsi, int triggering)
+static  __refdata  int xen_register_pirq(u32 gsi, int triggering)
 {
 	int rc, pirq, irq = -1;
 	struct physdev_map_pirq map_irq;
diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
index 25c52f9..ffcf261 100644
--- a/arch/x86/xen/platform-pci-unplug.c
+++ b/arch/x86/xen/platform-pci-unplug.c
@@ -35,7 +35,7 @@ EXPORT_SYMBOL_GPL(xen_platform_pci_unplug);
 #ifdef CONFIG_XEN_PVHVM
 static int xen_emul_unplug;
 
-static int __init check_platform_magic(void)
+static int check_platform_magic(void)
 {
 	short magic;
 	char protocol;
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-07-11 10:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-03 23:25 [PATCH] Modpost section mismatch fix Raghavendra D Prabhu
2011-07-04  8:49 ` Ian Campbell
2011-07-04 22:16   ` Raghavendra D Prabhu
2011-07-05 14:13     ` Konrad Rzeszutek Wilk
2011-07-05 14:27       ` [TOME] " Raghavendra D Prabhu
2011-07-05 14:48         ` Konrad Rzeszutek Wilk
2011-07-05 21:32           ` Konrad Rzeszutek Wilk
2011-07-06  8:30             ` [Xen-devel] " Ian Campbell
2011-07-07 15:46             ` Raghavendra D Prabhu
2011-07-07 16:24               ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-07-07 19:48                 ` Raghavendra D Prabhu
2011-07-07 20:09                   ` Konrad Rzeszutek Wilk
2011-07-07 21:04                     ` Raghavendra D Prabhu
2011-07-08 20:26                       ` [Xen-devel] Re: [PATCH] Modpost section mismatch fix (for platform-pci-unplug.c) Konrad Rzeszutek Wilk
2011-07-09 16:29                         ` [TOME] " Raghavendra D Prabhu
2011-07-11 10:47                         ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox