Linux IOMMU Development
 help / color / mirror / Atom feed
* [PATCH v2 1/3] iommu/fsl: Fix section mismatch
@ 2015-01-22 14:47 Emil Medve
       [not found] ` <1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Emil Medve @ 2015-01-22 14:47 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	joro-zLv9SwRftAIdnm+yROfE0A, jroedel-l3A5Bk7waGM,
	Varun.Sethi-eDlz3WWmN0ll57MIdRCFDg
  Cc: Emil Medve

Section mismatch in reference from the variable fsl_of_pamu_driver to the function .init.text:fsl_pamu_probe()
The variable fsl_of_pamu_driver references
the function __init fsl_pamu_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
---

v2:	Add an __init[data] instead of removing one

 drivers/iommu/fsl_pamu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index 80ac68d..d478ad8 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -1224,7 +1224,7 @@ static const struct of_device_id fsl_of_pamu_ids[] = {
 	{},
 };
 
-static struct platform_driver fsl_of_pamu_driver = {
+static struct platform_driver fsl_of_pamu_driver __initdata = {
 	.driver = {
 		.name = "fsl-of-pamu",
 	},
-- 
2.2.2

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

* [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[]
       [not found] ` <1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
@ 2015-01-22 14:47   ` Emil Medve
       [not found]     ` <1421938042-22580-2-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
  2015-01-22 14:47   ` [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations Emil Medve
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Emil Medve @ 2015-01-22 14:47 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	joro-zLv9SwRftAIdnm+yROfE0A, jroedel-l3A5Bk7waGM,
	Varun.Sethi-eDlz3WWmN0ll57MIdRCFDg
  Cc: Emil Medve

Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
---
 drivers/iommu/fsl_pamu.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index d478ad8..113fb7b 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -1214,16 +1214,6 @@ error:
 	return ret;
 }
 
-static const struct of_device_id fsl_of_pamu_ids[] = {
-	{
-		.compatible = "fsl,p4080-pamu",
-	},
-	{
-		.compatible = "fsl,pamu",
-	},
-	{},
-};
-
 static struct platform_driver fsl_of_pamu_driver __initdata = {
 	.driver = {
 		.name = "fsl-of-pamu",
-- 
2.2.2

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

* [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations
       [not found] ` <1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
  2015-01-22 14:47   ` [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[] Emil Medve
@ 2015-01-22 14:47   ` Emil Medve
       [not found]     ` <1421938042-22580-3-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
  2015-01-23  6:12   ` [PATCH v2 1/3] iommu/fsl: Fix section mismatch Varun Sethi
  2015-01-26 12:49   ` Joerg Roedel
  3 siblings, 1 reply; 7+ messages in thread
From: Emil Medve @ 2015-01-22 14:47 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	joro-zLv9SwRftAIdnm+yROfE0A, jroedel-l3A5Bk7waGM,
	Varun.Sethi-eDlz3WWmN0ll57MIdRCFDg
  Cc: Emil Medve

Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
---
 drivers/iommu/fsl_pamu.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index 113fb7b..db9c1eb 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -59,7 +59,7 @@ static struct ome *omt;
  * SOCs. For the older SOCs "fsl,qoriq-device-config-1.0"
  * string would be used.
 */
-static const struct of_device_id guts_device_ids[] = {
+static const struct of_device_id guts_device_ids[] __initconst = {
 	{ .compatible = "fsl,qoriq-device-config-1.0", },
 	{ .compatible = "fsl,qoriq-device-config-2.0", },
 	{}
@@ -187,7 +187,7 @@ static unsigned int map_subwindow_cnt_to_wce(u32 subwindow_cnt)
  * Set the PAACE type as primary and set the coherency required domain
  * attribute
  */
-static void pamu_init_ppaace(struct paace *ppaace)
+static void __init pamu_init_ppaace(struct paace *ppaace)
 {
 	set_bf(ppaace->addr_bitfields, PAACE_AF_PT, PAACE_PT_PRIMARY);
 
@@ -612,7 +612,7 @@ found_cpu_node:
  * Memory accesses to QMAN and BMAN private memory need not be coherent, so
  * clear the PAACE entry coherency attribute for them.
  */
-static void setup_qbman_paace(struct paace *ppaace, int  paace_type)
+static void __init setup_qbman_paace(struct paace *ppaace, int  paace_type)
 {
 	switch (paace_type) {
 	case QMAN_PAACE:
@@ -679,7 +679,7 @@ static void __init setup_omt(struct ome *omt)
  * Get the maximum number of PAACT table entries
  * and subwindows supported by PAMU
  */
-static void get_pamu_cap_values(unsigned long pamu_reg_base)
+static void __init get_pamu_cap_values(unsigned long pamu_reg_base)
 {
 	u32 pc_val;
 
@@ -998,7 +998,7 @@ error:
 static const struct {
 	u32 svr;
 	u32 port_id;
-} port_id_map[] = {
+} port_id_map[] __initconst = {
 	{0x82100010, 0xFF000000},	/* P2040 1.0 */
 	{0x82100011, 0xFF000000},	/* P2040 1.1 */
 	{0x82100110, 0xFF000000},	/* P2041 1.0 */
-- 
2.2.2

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

* RE: [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations
       [not found]     ` <1421938042-22580-3-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
@ 2015-01-23  6:11       ` Varun Sethi
  0 siblings, 0 replies; 7+ messages in thread
From: Varun Sethi @ 2015-01-23  6:11 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
	jroedel-l3A5Bk7waGM@public.gmane.org
  Cc: Emilian Medve

Thanks Emil, please find my comments inline.

Regards
Varun

> -----Original Message-----
> From: Emil Medve [mailto:Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org]
> Sent: Thursday, January 22, 2015 8:17 PM
> To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org; jroedel-l3A5Bk7waGM@public.gmane.org;
> Sethi Varun-B16395
> Cc: Medve Emilian-EMMEDVE1
> Subject: [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations
> 
> Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
> ---
>  drivers/iommu/fsl_pamu.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index
> 113fb7b..db9c1eb 100644
> --- a/drivers/iommu/fsl_pamu.c
> +++ b/drivers/iommu/fsl_pamu.c
> @@ -59,7 +59,7 @@ static struct ome *omt;
>   * SOCs. For the older SOCs "fsl,qoriq-device-config-1.0"
>   * string would be used.
>  */
> -static const struct of_device_id guts_device_ids[] = {
> +static const struct of_device_id guts_device_ids[] __initconst = {
>  	{ .compatible = "fsl,qoriq-device-config-1.0", },
>  	{ .compatible = "fsl,qoriq-device-config-2.0", },
>  	{}
> @@ -187,7 +187,7 @@ static unsigned int map_subwindow_cnt_to_wce(u32
> subwindow_cnt)
>   * Set the PAACE type as primary and set the coherency required domain
>   * attribute
>   */
> -static void pamu_init_ppaace(struct paace *ppaace)
> +static void __init pamu_init_ppaace(struct paace *ppaace)
>  {


[varun]  This shouldn't be in the init section.

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

* RE: [PATCH v2 1/3] iommu/fsl: Fix section mismatch
       [not found] ` <1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
  2015-01-22 14:47   ` [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[] Emil Medve
  2015-01-22 14:47   ` [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations Emil Medve
@ 2015-01-23  6:12   ` Varun Sethi
  2015-01-26 12:49   ` Joerg Roedel
  3 siblings, 0 replies; 7+ messages in thread
From: Varun Sethi @ 2015-01-23  6:12 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
	jroedel-l3A5Bk7waGM@public.gmane.org
  Cc: Emilian Medve



> -----Original Message-----
> From: Emil Medve [mailto:Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org]
> Sent: Thursday, January 22, 2015 8:17 PM
> To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org; jroedel-l3A5Bk7waGM@public.gmane.org;
> Sethi Varun-B16395
> Cc: Medve Emilian-EMMEDVE1
> Subject: [PATCH v2 1/3] iommu/fsl: Fix section mismatch
> 
> Section mismatch in reference from the variable fsl_of_pamu_driver to the
> function .init.text:fsl_pamu_probe() The variable fsl_of_pamu_driver
> references the function __init fsl_pamu_probe() If the reference is valid
> then annotate the variable with __init* or __refdata (see linux/init.h) or
> name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
> 
> Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
> ---
> 
> v2:	Add an __init[data] instead of removing one
> 
>  drivers/iommu/fsl_pamu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index
> 80ac68d..d478ad8 100644
> --- a/drivers/iommu/fsl_pamu.c
> +++ b/drivers/iommu/fsl_pamu.c
> @@ -1224,7 +1224,7 @@ static const struct of_device_id fsl_of_pamu_ids[]
> = {
>  	{},
>  };
> 
> -static struct platform_driver fsl_of_pamu_driver = {
> +static struct platform_driver fsl_of_pamu_driver __initdata = {
>  	.driver = {
>  		.name = "fsl-of-pamu",
>  	},
> --
> 2.2.2
Acked-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

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

* RE: [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[]
       [not found]     ` <1421938042-22580-2-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
@ 2015-01-23  6:15       ` Varun Sethi
  0 siblings, 0 replies; 7+ messages in thread
From: Varun Sethi @ 2015-01-23  6:15 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
	jroedel-l3A5Bk7waGM@public.gmane.org
  Cc: Emilian Medve



> -----Original Message-----
> From: Emil Medve [mailto:Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org]
> Sent: Thursday, January 22, 2015 8:17 PM
> To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org; jroedel-l3A5Bk7waGM@public.gmane.org;
> Sethi Varun-B16395
> Cc: Medve Emilian-EMMEDVE1
> Subject: [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[]
> 
> Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
> ---
>  drivers/iommu/fsl_pamu.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index
> d478ad8..113fb7b 100644
> --- a/drivers/iommu/fsl_pamu.c
> +++ b/drivers/iommu/fsl_pamu.c
> @@ -1214,16 +1214,6 @@ error:
>  	return ret;
>  }
> 
> -static const struct of_device_id fsl_of_pamu_ids[] = {
> -	{
> -		.compatible = "fsl,p4080-pamu",
> -	},
> -	{
> -		.compatible = "fsl,pamu",
> -	},
> -	{},
> -};
> -
>  static struct platform_driver fsl_of_pamu_driver __initdata = {
>  	.driver = {
>  		.name = "fsl-of-pamu",
> --
> 2.2.2
Acked-by: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

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

* Re: [PATCH v2 1/3] iommu/fsl: Fix section mismatch
       [not found] ` <1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
                     ` (2 preceding siblings ...)
  2015-01-23  6:12   ` [PATCH v2 1/3] iommu/fsl: Fix section mismatch Varun Sethi
@ 2015-01-26 12:49   ` Joerg Roedel
  3 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2015-01-26 12:49 UTC (permalink / raw)
  To: Emil Medve
  Cc: Varun.Sethi-eDlz3WWmN0ll57MIdRCFDg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	jroedel-l3A5Bk7waGM

On Thu, Jan 22, 2015 at 08:47:20AM -0600, Emil Medve wrote:
> Section mismatch in reference from the variable fsl_of_pamu_driver to the function .init.text:fsl_pamu_probe()
> The variable fsl_of_pamu_driver references
> the function __init fsl_pamu_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
> 
> Signed-off-by: Emil Medve <Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>

Applied patch 1 and 2 to ppc/pamu, thanks.

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

end of thread, other threads:[~2015-01-26 12:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 14:47 [PATCH v2 1/3] iommu/fsl: Fix section mismatch Emil Medve
     [not found] ` <1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
2015-01-22 14:47   ` [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[] Emil Medve
     [not found]     ` <1421938042-22580-2-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
2015-01-23  6:15       ` Varun Sethi
2015-01-22 14:47   ` [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations Emil Medve
     [not found]     ` <1421938042-22580-3-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org>
2015-01-23  6:11       ` Varun Sethi
2015-01-23  6:12   ` [PATCH v2 1/3] iommu/fsl: Fix section mismatch Varun Sethi
2015-01-26 12:49   ` Joerg Roedel

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