* [PATCH] Fix dmar_ir_support() section mismatch
@ 2009-12-05 1:31 Alberto Bertogli
2009-12-21 6:46 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Alberto Bertogli @ 2009-12-05 1:31 UTC (permalink / raw)
To: linux-pci
Cc: linux-kernel, Jesse Barnes, David Woodhouse, Youquan Song,
Alberto Bertogli
dmar_ir_support() uses the static dmar_tbl variable, which is annotated as
__initdata. This causes a section mismatch because the function is not
annotated as __init.
Since it is only used by (__init) intr_remapping_supported(), fix the
mismatch by annotating it with __init.
The code was introduced by commit 074835f0, Sep 9 2009.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
drivers/pci/dmar.c | 2 +-
include/linux/intel-iommu.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index b952ebc..e6aa94e 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -1370,7 +1370,7 @@ int dmar_reenable_qi(struct intel_iommu *iommu)
/*
* Check interrupt remapping support in DMAR table description.
*/
-int dmar_ir_support(void)
+int __init dmar_ir_support(void)
{
struct acpi_table_dmar *dmar;
dmar = (struct acpi_table_dmar *)dmar_tbl;
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 4f0a72a..46d2c21 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -360,6 +360,6 @@ extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
-extern int dmar_ir_support(void);
+extern int __init dmar_ir_support(void);
#endif
--
1.6.5.2.372.gc0502
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Fix dmar_ir_support() section mismatch
2009-12-05 1:31 [PATCH] Fix dmar_ir_support() section mismatch Alberto Bertogli
@ 2009-12-21 6:46 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2009-12-21 6:46 UTC (permalink / raw)
To: Alberto Bertogli
Cc: linux-pci, linux-kernel, Jesse Barnes, David Woodhouse, Youquan Song
On Fri, Dec 04, 2009 at 10:31:32PM -0300, Alberto Bertogli wrote:
> dmar_ir_support() uses the static dmar_tbl variable, which is annotated as
> __initdata. This causes a section mismatch because the function is not
> annotated as __init.
>
> Since it is only used by (__init) intr_remapping_supported(), fix the
> mismatch by annotating it with __init.
>
> The code was introduced by commit 074835f0, Sep 9 2009.
>
> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This patch still seems to be necessary, am I missing something?
Tested-by: Simon Horman <horms@verge.net.au>
> ---
> drivers/pci/dmar.c | 2 +-
> include/linux/intel-iommu.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
> index b952ebc..e6aa94e 100644
> --- a/drivers/pci/dmar.c
> +++ b/drivers/pci/dmar.c
> @@ -1370,7 +1370,7 @@ int dmar_reenable_qi(struct intel_iommu *iommu)
> /*
> * Check interrupt remapping support in DMAR table description.
> */
> -int dmar_ir_support(void)
> +int __init dmar_ir_support(void)
> {
> struct acpi_table_dmar *dmar;
> dmar = (struct acpi_table_dmar *)dmar_tbl;
> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
> index 4f0a72a..46d2c21 100644
> --- a/include/linux/intel-iommu.h
> +++ b/include/linux/intel-iommu.h
> @@ -360,6 +360,6 @@ extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
>
> extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
>
> -extern int dmar_ir_support(void);
> +extern int __init dmar_ir_support(void);
>
> #endif
> --
> 1.6.5.2.372.gc0502
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-21 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-05 1:31 [PATCH] Fix dmar_ir_support() section mismatch Alberto Bertogli
2009-12-21 6:46 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®