iommu/fsl: Fix section mismatch
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
---
v2: Add an __init[data] instead of removing one
drivers/iommu/fsl_pamu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/fsl_pamu.c +1 -1
@@ -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" , },
Signature · 1 line
2.2.2
A message that is not in the archive (sent off-list or not yet received): 1421938042-22580-1-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org
PATCH 2/3 iommu/fsl: Remove unused fsl_of_pamu_ids[]
--- drivers/iommu/fsl_pamu.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/iommu/fsl_pamu.c +0 -10
@@ -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" ,
Signature · 1 line
2.2.2
A message that is not in the archive (sent off-list or not yet received): 1421938042-22580-2-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org
Varun Sethi
Acked-byRE: [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[]
Quoted 37 lines
-----Original Message-----
From: Emil Medve [mailto:[email protected]]
Sent: Thursday, January 22, 2015 8:17 PM
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; [email protected]; [email protected]; Sethi Varun-B16395
Cc: Medve Emilian-EMMEDVE1
Subject: [PATCH 2/3] iommu/fsl: Remove unused fsl_of_pamu_ids[]Signed-off-by Emil Medve <[email protected]>--- drivers/iommu/fsl_pamu.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/iommu/fsl_pamu.c index renamed from drivers/iommu/fsl_pamu.c +0
-0d478ad8..113fb7b 100644
drivers/iommu/fsl_pamu.c +0
-11@@ -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" , --
Quoted 1 line
2.2.2
PATCH 3/3 iommu/fsl: Sprinkle some __init* annotations
In reply to a message not in the archive--- drivers/iommu/fsl_pamu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iommu/fsl_pamu.c +5 -5
@@ -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 */
Signature · 1 line
2.2.2
A message that is not in the archive (sent off-list or not yet received): 1421938042-22580-3-git-send-email-Emilian.Medve-eDlz3WWmN0ll57MIdRCFDg@public.gmane.org
RE: [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotations
Thanks Emil, please find my comments inline.
Regards
Varun
Quoted 27 lines
-----Original Message-----
From: Emil Medve [mailto:[email protected]]
Sent: Thursday, January 22, 2015 8:17 PM
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; [email protected]; [email protected]; Sethi Varun-B16395
Cc: Medve Emilian-EMMEDVE1
Subject: [PATCH 3/3] iommu/fsl: Sprinkle some __init* annotationsSigned-off-by Emil Medve <[email protected]>--- drivers/iommu/fsl_pamu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/iommu/fsl_pamu.c index renamed from drivers/iommu/fsl_pamu.c +0
-0113fb7b..db9c1eb 100644
drivers/iommu/fsl_pamu.c +1
-1@@ -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" , }, {}
drivers/iommu/fsl_pamu.c static unsigned int map_subwindow_cnt_to_wce(u32 · line 192
Quoted 7 lines
drivers/iommu/fsl_pamu.c +1
-1@@ -187,7 +187,7 @@ static unsigned int map_subwindow_cnt_to_wce(u32subwindow_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.
Varun Sethi
Acked-byQuoted 38 lines
-----Original Message-----
From: Emil Medve [mailto:[email protected]]
Sent: Thursday, January 22, 2015 8:17 PM
To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; [email protected]; [email protected]; Sethi Varun-B16395
Cc: Medve Emilian-EMMEDVE1
Subject: [PATCH v2 1/3] iommu/fsl: Fix section mismatchSection mismatch in reference from the variable
fsl_of_pamu_driverto the function .init.text:fsl_pamu_probe() The variablefsl_of_pamu_driverreferences the function__initfsl_pamu_probe()If the reference is valid then annotate the variable with __init* or__refdata(seelinux/init.h) or name the variable:*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_consoleSigned-off-by Emil Medve <[email protected]>---
v2: Add an __init[data] instead of removing one
drivers/iommu/fsl_pamu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iommu/fsl_pamu.c index renamed from drivers/iommu/fsl_pamu.c +0
-080ac68d..d478ad8 100644
drivers/iommu/fsl_pamu.c +1
-1@@ -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" ,
Quoted 3 lines
},
--
2.2.2
Joerg Roedel
AppliedQuoted 8 lines · Emil Medve
Section mismatch in reference from the variable
fsl_of_pamu_driverto the function .init.text:fsl_pamu_probe() The variablefsl_of_pamu_driverreferences
the function__initfsl_pamu_probe()
If the reference is valid then annotate the
variable with __init* or__refdata(seelinux/init.h) or name the variable:*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_consoleSigned-off-by Emil Medve <[email protected]>
Applied patch 1 and 2 to ppc/pamu, thanks.