Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1231111 > unrolled thread

RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

Started byWang Dongsheng <Dongsheng.Wang@freescale.com>
First post2015-09-23 04:40 +0200
Last post2015-09-23 10:10 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of  redundant mpic_irq_set_wake Wang Dongsheng <Dongsheng.Wang@freescale.com> - 2015-09-23 04:40 +0200
    RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead  of redundant mpic_irq_set_wake Thomas Gleixner <tglx@linutronix.de> - 2015-09-23 05:50 +0200
      RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of  redundant mpic_irq_set_wake Wang Dongsheng <Dongsheng.Wang@freescale.com> - 2015-09-23 07:40 +0200
        RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead  of redundant mpic_irq_set_wake Thomas Gleixner <tglx@linutronix.de> - 2015-09-23 10:10 +0200

#1231111 — RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

FromWang Dongsheng <Dongsheng.Wang@freescale.com>
Date2015-09-23 04:40 +0200
SubjectRE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
Message-ID<qbI8p-7yS-3@gated-at.bofh.it>
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogV29vZCBTY290dC1CMDc0
MjENCj4gU2VudDogV2VkbmVzZGF5LCBTZXB0ZW1iZXIgMjMsIDIwMTUg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gLUVOWElPLCBpcyB0aGVyZSBhbnkgaXNzdWU/IElmIG5vbi1m
cmVlc2NhbGUgcGxhdGZvcm0gZG9lcw0Kbm90IHN1cHBvcnQgaXQsIGJ1dCBJUHMgc3RpbGwgdXNl
IGVuYWJsZS9kaXNhYmxlX2lycV93YWtlLCB3ZSBzaG91bGQgcmV0dXJuIGEgZXJyb3IgbnVtYmVy
Lg0KDQpJUlFDSElQX1NLSVBfU0VUX1dBS0UganVzdCBza2lwIHRoaXMgZmVhdHVyZSwgdGhpcyBp
cyBub3Qgb3VyIGV4cGVjdGVkLg0KSWYgbm9uLWZyZWVzY2FsZSBwbGF0Zm9ybSBuZWVkIHRoaXMg
ZmxhZyB0byBza2lwIHRoaXMgZmVhdHVyZSwgaXQgc2hvdWxkIGJlIGFkZA0KaW4gc2VsZiBwbGF0
Zm9ybS4NCg0KQFNjb3R0Og0KSWYgc2V0IHRoaXMgZmxhZyB3ZSBjYW5ub3Qga2VlcCBhIGlycSBh
cyBhIHdha2V1cCBzb3VyY2Ugd2hlbiBzeXN0ZW0gZ29pbmcgdG8NClNVU1BFTkQgb3IgTUVNLg0K
DQppcnFfc2V0X3dha2UoKSBtZWFucyB3ZSBjYW4gc2V0IHRoaXMgaXJxIGFzIGEgd2FrZSBzb3Vy
Y2UuDQpJUlFDSElQX1NLSVBfU0VUX1dBS0UgaXMgaWdub3JlIGlycV9zZXRfd2FrZSgpIGZlYXR1
cmUuDQoNClJlZ2FyZHMsDQotRG9uZ3NoZW5nDQoNCg==
--
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/

[toc] | [next] | [standalone]


#1231123 — RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

FromThomas Gleixner <tglx@linutronix.de>
Date2015-09-23 05:50 +0200
SubjectRE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
Message-ID<qbJe9-Dl-1@gated-at.bofh.it>
In reply to#1231111
On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > as it doesn't guarantee wakeup for that interrupt.
> > >
> 
> Non-freescale return -ENXIO, is there any issue? If non-freescale
> platform does not support it, but IPs still use
> enable/disable_irq_wake, we should return a error number.

You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
others.

> @Scott:
> If set this flag we cannot keep a irq as a wakeup source when system going to
> SUSPEND or MEM.
> 
> irq_set_wake() means we can set this irq as a wake source.
> IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.

Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
!chip->irq_set_wake(), but its still marking the interrupt as wakeup
source and therefor not masking it on suspend.

IRQF_NO_SUSPEND is the wrong tool. End of story.

Thanks,

	tglx
--
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/

[toc] | [prev] | [next] | [standalone]


#1231160

FromWang Dongsheng <Dongsheng.Wang@freescale.com>
Date2015-09-23 07:40 +0200
Message-ID<qbKWC-39P-7@gated-at.bofh.it>
In reply to#1231123

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] On Behalf Of Thomas Gleixner
> Sent: Wednesday, September 23, 2015 11:49 AM
> To: Wang Dongsheng-B40534
> Cc: Wood Scott-B07421; Sudeep Holla; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org; Rafael J. Wysocki; Benjamin Herrenschmidt; Paul
> Mackerras; Michael Ellerman; Jia Hongtao-B38951; Marc Zyngier; linuxppc-
> dev@lists.ozlabs.org
> Subject: RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of
> redundant mpic_irq_set_wake
> 
> On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > > as it doesn't guarantee wakeup for that interrupt.
> > > >
> >
> > Non-freescale return -ENXIO, is there any issue? If non-freescale
> > platform does not support it, but IPs still use
> > enable/disable_irq_wake, we should return a error number.
> 
> You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
> others.
> 
> > @Scott:
> > If set this flag we cannot keep a irq as a wakeup source when system going to
> > SUSPEND or MEM.
> >
> > irq_set_wake() means we can set this irq as a wake source.
> > IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.
> 
> Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
> !chip->irq_set_wake(), but its still marking the interrupt as wakeup
> source and therefor not masking it on suspend.
> 

Sorry, I just check irq_set_irq_wake() code, right, IRQCHIP_SKIP_SET_WAKE also can
going to irqd_set to mask IRQD_WAKEUP_STATE.

Yes, this flag just skip the irq_set_wake() not this feature.

Regards,
-Dongsheng

--
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/

[toc] | [prev] | [next] | [standalone]


#1231215 — RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

FromThomas Gleixner <tglx@linutronix.de>
Date2015-09-23 10:10 +0200
SubjectRE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
Message-ID<qbNhM-6K3-5@gated-at.bofh.it>
In reply to#1231160
On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > -----Original Message-----
> > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> > owner@vger.kernel.org] On Behalf Of Thomas Gleixner
> > Sent: Wednesday, September 23, 2015 11:49 AM
> > To: Wang Dongsheng-B40534
> > Cc: Wood Scott-B07421; Sudeep Holla; linux-pm@vger.kernel.org; linux-
> > kernel@vger.kernel.org; Rafael J. Wysocki; Benjamin Herrenschmidt; Paul
> > Mackerras; Michael Ellerman; Jia Hongtao-B38951; Marc Zyngier; linuxppc-
> > dev@lists.ozlabs.org
> > Subject: RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of
> > redundant mpic_irq_set_wake

Can you please fix you mail client to get rid of that silly copy of
the mail header?

> > On Wed, 23 Sep 2015, Wang Dongsheng wrote:
> > > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote:
> > > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
> > > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
> > > > > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
> > > > > as it doesn't guarantee wakeup for that interrupt.
> > > > >
> > >
> > > Non-freescale return -ENXIO, is there any issue? If non-freescale
> > > platform does not support it, but IPs still use
> > > enable/disable_irq_wake, we should return a error number.
> > 
> > You can just set IRQCHIP_SKIP_SET_WAKE for FSL chips and not for the
> > others.
> > 
> > > @Scott:
> > > If set this flag we cannot keep a irq as a wakeup source when system going to
> > > SUSPEND or MEM.
> > >
> > > irq_set_wake() means we can set this irq as a wake source.
> > > IRQCHIP_SKIP_SET_WAKE is ignore irq_set_wake() feature.
> > 
> > Nonsense. IRQCHIP_SKIP_SET_WAKE merily tells the core not to bail on
> > !chip->irq_set_wake(), but its still marking the interrupt as wakeup
> > source and therefor not masking it on suspend.
> > 
> 
> Sorry, I just check irq_set_irq_wake() code, right, IRQCHIP_SKIP_SET_WAKE also can
> going to irqd_set to mask IRQD_WAKEUP_STATE.
> 
> Yes, this flag just skip the irq_set_wake() not this feature.

And just for completeness. That commit 5ff04b7287d87c 'powerpc/mpic:
add irq_set_wake support' is another example of trainwreck engineering.

    desc->action->flags |= IRQF_NO_SUSPEND;

This is not only horribly avoiding any of the existing APIs, it's also
broken as hell. desc->action can be NULL when that is called.

It seems fleascale is hell bent to fiddle with the guts of the core
code mindlessly. See commit c866cda47f2c

Yours grumpy

      tglx


--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web