Thanks Madalin.
Joerg,
Can you please pick this patch.
Regards
Varun
Original message
From: Bucur Madalin-Cristian-B32716
Date:08/17/2015 8:28 PM (GMT+05:30)
To: j...@8bytes.org,iommu@lists.linux-foundation.org,Sethi Varun-B16395
Cc: sta...@vger.kernel.org
Subject: RE: [PATCH v2] iommu/fsl: Really fix init section(s) content
Patch working on all tested platforms: B4860QDS, P2041RDB,
P3041DS, P4080DS, P5020DS, P5040DS, T1024RDB, T1040RDB,
T2080RDB, T4240QDS.
Tested-by: Madalin Bucur madalin.bu...@freescale.com
-Original Message-
From: Sethi Varun-B16395
Sent: Monday, August 03, 2015 3:29 PM
To: iommu@lists.linux-foundation.org; j...@8bytes.org
Cc: sta...@vger.kernel.org; Medve Emilian-EMMEDVE1; Bucur Madalin-
Cristian-B32716
Subject: RE: [PATCH v2] iommu/fsl: Really fix init section(s) content
Hi Joerg,
This patch doesn't seem to be applied to the PAMU driver.
Regards
Varun
-Original Message-
From: iommu-boun...@lists.linux-foundation.org [mailto:iommu-
boun...@lists.linux-foundation.org] On Behalf Of Emil Medve
Sent: Wednesday, March 25, 2015 10:59 AM
To: iommu@lists.linux-foundation.org; j...@8bytes.org
Cc: sta...@vger.kernel.org; Medve Emilian-EMMEDVE1
Subject: [PATCH v2] iommu/fsl: Really fix init section(s) content
'0f1fb99 iommu/fsl: Fix section mismatch' was intended to address the
modpost warning and the potential crash. Crash which is actually easy to
trigger with a 'unbind' followed by a 'bind' sequence. The fix is wrong as
fsl_of_pamu_driver.driver gets added by bus_add_driver() to a couple of
klist(s) which become invalid/corrupted as soon as the init sections are
freed.
Depending on when/how the init sections storage is reused
various/random
errors and crashes will happen
'cd70d46 iommu/fsl: Various cleanups' contains annotations that go further
down the wrong path laid by '0f1fb99 iommu/fsl: Fix section mismatch'
Now remove all the incorrect annotations from the above mentioned
patches (not exactly a revert) and those previously existing in the code,
This
fixes the modpost warning(s), the unbind/bind sequence crashes and the
random errors/crashes
Fixes: 0f1fb99b62ce (iommu/fsl: Fix section mismatch)
Fixes: cd70d4659ff3 (iommu/fsl: Various cleanups)
Signed-off-by: Emil Medve emilian.me...@freescale.com
Acked-by: Varun Sethi varun.se...@freescale.com
Cc: sta...@vger.kernel.org
---
drivers/iommu/fsl_pamu.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index
abeedc9..2570f2a 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -41,7 +41,6 @@ struct pamu_isr_data {
static struct paace *ppaact;
static struct paace *spaact;
-static struct ome *omt __initdata;
/*
* Table for matching compatible strings, for device tree @@ -50,7 +49,7
@@
static struct ome *omt __initdata;
* SOCs. For the older SOCs fsl,qoriq-device-config-1.0
* string would be used.
*/
-static const struct of_device_id guts_device_ids[] __initconst = {
+static const struct of_device_id guts_device_ids[] = {
{ .compatible = fsl,qoriq-device-config-1.0, },
{ .compatible = fsl,qoriq-device-config-2.0, },
{}
@@ -599,7 +598,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 __init setup_qbman_paace(struct paace *ppaace, int
paace_type)
+static void setup_qbman_paace(struct paace *ppaace, int paace_type)
{
switch (paace_type) {
case QMAN_PAACE:
@@ -629,7 +628,7 @@ static void __init setup_qbman_paace(struct paace
*ppaace, int paace_type)
* this table to translate device transaction to appropriate corenet
* transaction.
*/
-static void __init setup_omt(struct ome *omt)
+static void setup_omt(struct ome *omt)
{
struct ome *ome;
@@ -666,7 +665,7 @@ static void __init setup_omt(struct ome *omt)
* Get the maximum number of PAACT table entries
* and subwindows supported by PAMU
*/
-static void __init get_pamu_cap_values(unsigned long pamu_reg_base)
+static void get_pamu_cap_values(unsigned long pamu_reg_base)
{
u32 pc_val;
@@ -676,9 +675,9 @@ static void __init get_pamu_cap_values(unsigned
long pamu_reg_base) }
/* Setup PAMU registers pointing to PAACT, SPAACT and OMT */ -static int
__init setup_one_pamu(unsigned long pamu_reg_base, unsigned long
pamu_reg_size,
-phys_addr_t ppaact_phys, phys_addr_t
spaact_phys,
-phys_addr_t omt_phys)
+static int setup_one_pamu(unsigned long pamu_reg_base, unsigned long
pamu_reg_size,
+ phys_addr_t ppaact_phys, phys_addr_t
spaact_phys,
+ phys_addr_t omt_phys)
{