Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1480573 > unrolled thread
| Started by | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| First post | 2016-09-10 12:00 +0200 |
| Last post | 2016-09-12 12:00 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] drivers/edac: NO_IRQ removal from powerpc-only drivers Michael Ellerman <mpe@ellerman.id.au> - 2016-09-10 12:00 +0200
Re: [PATCH] drivers/edac: NO_IRQ removal from powerpc-only drivers Borislav Petkov <bp@alien8.de> - 2016-09-10 17:10 +0200
Re: [PATCH] drivers/edac: NO_IRQ removal from powerpc-only drivers Michael Ellerman <mpe@ellerman.id.au> - 2016-09-12 06:50 +0200
Re: [PATCH] drivers/edac: NO_IRQ removal from powerpc-only drivers Arnd Bergmann <arnd@arndb.de> - 2016-09-12 09:40 +0200
Re: [PATCH] drivers/edac: NO_IRQ removal from powerpc-only drivers Michael Ellerman <mpe@ellerman.id.au> - 2016-09-12 12:00 +0200
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-09-10 12:00 +0200 |
| Subject | [PATCH] drivers/edac: NO_IRQ removal from powerpc-only drivers |
| Message-ID | <sfNeN-70F-17@gated-at.bofh.it> |
We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
from powerpc-only drivers.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
drivers/edac/mpc85xx_edac.c | 6 +++---
drivers/edac/mv64x60_edac.c | 8 ++++----
drivers/edac/ppc4xx_edac.c | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index ca63d0da8889..e12b8e166a53 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -267,7 +267,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
pdata = pci->pvt_info;
pdata->name = "mpc85xx_pci_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
plat_data = op->dev.platform_data;
if (!plat_data) {
@@ -588,7 +588,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
pdata = edac_dev->pvt_info;
pdata->name = "mpc85xx_l2_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
edac_dev->dev = &op->dev;
dev_set_drvdata(edac_dev->dev, edac_dev);
edac_dev->ctl_name = pdata->name;
@@ -1058,7 +1058,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
pdata = mci->pvt_info;
pdata->name = "mpc85xx_mc_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
mci->pdev = &op->dev;
pdata->edac_idx = edac_mc_idx++;
dev_set_drvdata(mci->pdev, mci);
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 6c54127e6eae..69c559189490 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -118,7 +118,7 @@ static int mv64x60_pci_err_probe(struct platform_device *pdev)
pdata->pci_hose = pdev->id;
pdata->name = "mpc85xx_pci_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
platform_set_drvdata(pdev, pci);
pci->dev = &pdev->dev;
pci->dev_name = dev_name(&pdev->dev);
@@ -291,7 +291,7 @@ static int mv64x60_sram_err_probe(struct platform_device *pdev)
pdata = edac_dev->pvt_info;
pdata->name = "mv64x60_sram_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
edac_dev->dev = &pdev->dev;
platform_set_drvdata(pdev, edac_dev);
edac_dev->dev_name = dev_name(&pdev->dev);
@@ -459,7 +459,7 @@ static int mv64x60_cpu_err_probe(struct platform_device *pdev)
pdata = edac_dev->pvt_info;
pdata->name = "mv64x60_cpu_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
edac_dev->dev = &pdev->dev;
platform_set_drvdata(pdev, edac_dev);
edac_dev->dev_name = dev_name(&pdev->dev);
@@ -727,7 +727,7 @@ static int mv64x60_mc_err_probe(struct platform_device *pdev)
mci->pdev = &pdev->dev;
platform_set_drvdata(pdev, mci);
pdata->name = "mv64x60_mc_err";
- pdata->irq = NO_IRQ;
+ pdata->irq = 0;
mci->dev_name = dev_name(&pdev->dev);
pdata->edac_idx = edac_mc_idx++;
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index d3a64ba61fa3..ee84343f660f 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -1029,8 +1029,8 @@ static int ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
pdata = mci->pvt_info;
pdata->dcr_host = *dcr_host;
- pdata->irqs.sec = NO_IRQ;
- pdata->irqs.ded = NO_IRQ;
+ pdata->irqs.sec = 0;
+ pdata->irqs.ded = 0;
/* Initialize controller capabilities and configuration */
@@ -1111,7 +1111,7 @@ static int ppc4xx_edac_register_irq(struct platform_device *op,
ded_irq = irq_of_parse_and_map(np, INTMAP_ECCDED_INDEX);
sec_irq = irq_of_parse_and_map(np, INTMAP_ECCSEC_INDEX);
- if (ded_irq == NO_IRQ || sec_irq == NO_IRQ) {
+ if (!ded_irq || !sec_irq) {
ppc4xx_edac_mc_printk(KERN_ERR, mci,
"Unable to map interrupts.\n");
status = -ENODEV;
--
2.7.4
[toc] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-09-10 17:10 +0200 |
| Message-ID | <sfS4O-1Pc-15@gated-at.bofh.it> |
| In reply to | #1480573 |
On Sat, Sep 10, 2016 at 07:57:08PM +1000, Michael Ellerman wrote:
> We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
> from powerpc-only drivers.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> drivers/edac/mpc85xx_edac.c | 6 +++---
> drivers/edac/mv64x60_edac.c | 8 ++++----
> drivers/edac/ppc4xx_edac.c | 6 +++---
> 3 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
> index ca63d0da8889..e12b8e166a53 100644
> --- a/drivers/edac/mpc85xx_edac.c
> +++ b/drivers/edac/mpc85xx_edac.c
> @@ -267,7 +267,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
>
> pdata = pci->pvt_info;
> pdata->name = "mpc85xx_pci_err";
> - pdata->irq = NO_IRQ;
> + pdata->irq = 0;
>
> plat_data = op->dev.platform_data;
> if (!plat_data) {
So all of those pdata structs come from kzalloc() so you don't really
have to assign to 0 - simply kill the line.
> @@ -588,7 +588,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
>
> pdata = edac_dev->pvt_info;
> pdata->name = "mpc85xx_l2_err";
> - pdata->irq = NO_IRQ;
> + pdata->irq = 0;
> edac_dev->dev = &op->dev;
> dev_set_drvdata(edac_dev->dev, edac_dev);
> edac_dev->ctl_name = pdata->name;
> @@ -1058,7 +1058,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
>
> pdata = mci->pvt_info;
> pdata->name = "mpc85xx_mc_err";
> - pdata->irq = NO_IRQ;
> + pdata->irq = 0;
> mci->pdev = &op->dev;
> pdata->edac_idx = edac_mc_idx++;
> dev_set_drvdata(mci->pdev, mci);
That part went into drivers/edac/fsl_ddr_edac.c which is only the
freescale memory controller being shared between ARM and PPC, see
http://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next
But that shouldn't change the issue wrt ->irq as now it is implicitly 0.
IOW, you can drop this hunk.
Please send v2 against the above branch or linux-next.
Thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
[toc] | [prev] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-09-12 06:50 +0200 |
| Message-ID | <sgrlT-73m-7@gated-at.bofh.it> |
| In reply to | #1480650 |
Borislav Petkov <bp@alien8.de> writes:
> On Sat, Sep 10, 2016 at 07:57:08PM +1000, Michael Ellerman wrote:
>> We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
>> from powerpc-only drivers.
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>> ---
>> drivers/edac/mpc85xx_edac.c | 6 +++---
>> drivers/edac/mv64x60_edac.c | 8 ++++----
>> drivers/edac/ppc4xx_edac.c | 6 +++---
>> 3 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
>> index ca63d0da8889..e12b8e166a53 100644
>> --- a/drivers/edac/mpc85xx_edac.c
>> +++ b/drivers/edac/mpc85xx_edac.c
>> @@ -267,7 +267,7 @@ static int mpc85xx_pci_err_probe(struct platform_device *op)
>>
>> pdata = pci->pvt_info;
>> pdata->name = "mpc85xx_pci_err";
>> - pdata->irq = NO_IRQ;
>> + pdata->irq = 0;
>>
>> plat_data = op->dev.platform_data;
>> if (!plat_data) {
>
> So all of those pdata structs come from kzalloc() so you don't really
> have to assign to 0 - simply kill the line.
OK.
>> @@ -1058,7 +1058,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
>>
>> pdata = mci->pvt_info;
>> pdata->name = "mpc85xx_mc_err";
>> - pdata->irq = NO_IRQ;
>> + pdata->irq = 0;
>> mci->pdev = &op->dev;
>> pdata->edac_idx = edac_mc_idx++;
>> dev_set_drvdata(mci->pdev, mci);
>
> That part went into drivers/edac/fsl_ddr_edac.c which is only the
> freescale memory controller being shared between ARM and PPC, see
>
> http://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next
>
> But that shouldn't change the issue wrt ->irq as now it is implicitly 0.
Ah OK.
NO_IRQ is -1 on ARM (or at least it can be?), see arch/arm/include/asm/irq.h.
So I'll leave that one alone for now.
> IOW, you can drop this hunk.
>
> Please send v2 against the above branch or linux-next.
OK will do.
cheers
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-12 09:40 +0200 |
| Message-ID | <sgu0p-fL-17@gated-at.bofh.it> |
| In reply to | #1480921 |
On Monday, September 12, 2016 2:47:37 PM CEST Michael Ellerman wrote: > >> @@ -1058,7 +1058,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op) > >> > >> pdata = mci->pvt_info; > >> pdata->name = "mpc85xx_mc_err"; > >> - pdata->irq = NO_IRQ; > >> + pdata->irq = 0; > >> mci->pdev = &op->dev; > >> pdata->edac_idx = edac_mc_idx++; > >> dev_set_drvdata(mci->pdev, mci); > > > > That part went into drivers/edac/fsl_ddr_edac.c which is only the > > freescale memory controller being shared between ARM and PPC, see > > > > http://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next > > > > But that shouldn't change the issue wrt ->irq as now it is implicitly 0. > > Ah OK. > > NO_IRQ is -1 on ARM (or at least it can be?), see arch/arm/include/asm/irq.h. > > So I'll leave that one alone for now. I don't think there is any way to build the mpc85xx on ARM, it depends on the powerpc-specific "FSL_SOC" symbol and it uses the in_be32/out_be32 MMIO helpers that are not defined on ARM. I've sent patches to remove all uses of NO_IRQ that happen on ARM. Please remove this instance too. Arnd
[toc] | [prev] | [next] | [standalone]
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Date | 2016-09-12 12:00 +0200 |
| Message-ID | <sgwbT-1vB-1@gated-at.bofh.it> |
| In reply to | #1480975 |
Arnd Bergmann <arnd@arndb.de> writes: > On Monday, September 12, 2016 2:47:37 PM CEST Michael Ellerman wrote: >> >> @@ -1058,7 +1058,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op) >> >> >> >> pdata = mci->pvt_info; >> >> pdata->name = "mpc85xx_mc_err"; >> >> - pdata->irq = NO_IRQ; >> >> + pdata->irq = 0; >> >> mci->pdev = &op->dev; >> >> pdata->edac_idx = edac_mc_idx++; >> >> dev_set_drvdata(mci->pdev, mci); >> > >> > That part went into drivers/edac/fsl_ddr_edac.c which is only the >> > freescale memory controller being shared between ARM and PPC, see >> > >> > http://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next >> > >> > But that shouldn't change the issue wrt ->irq as now it is implicitly 0. >> >> Ah OK. >> >> NO_IRQ is -1 on ARM (or at least it can be?), see arch/arm/include/asm/irq.h. >> >> So I'll leave that one alone for now. > > I don't think there is any way to build the mpc85xx on ARM, it depends > on the powerpc-specific "FSL_SOC" symbol and it uses the in_be32/out_be32 > MMIO helpers that are not defined on ARM. Yeah you're right. The common code between powerpc and arm64 is in fsl_ddr_edac.c, not mpc85xx_edac.c. There are no uses of NO_IRQ Will send a v2 with all uses removed from drivers/edac. cheers
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web