Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470324
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver |
| Date | 2016-08-25 20:30 +0200 |
| Message-ID | <sa7zz-4yA-7@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <s9Ktk-5vD-27@gated-at.bofh.it> <s9Y3g-6UN-21@gated-at.bofh.it> <sa4il-2hA-1@gated-at.bofh.it> <sa60O-3vb-3@gated-at.bofh.it> <sa7zz-4yA-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 25, 2016 at 01:51:35PM -0400, Rich Felker wrote: > On Thu, Aug 25, 2016 at 05:38:06PM +0100, Mark Rutland wrote: > > On Thu, Aug 25, 2016 at 10:56:50AM -0400, Rich Felker wrote: > > > On Thu, Aug 25, 2016 at 10:07:08AM +0200, Thomas Gleixner wrote: > > > Nominally it uses the same range of hardware interrupt numbers for all > > > (presently both) cpus, but some of them get delivered to a specific > > > cpu associated with the event (presently, IPI and timer; IPI is on a > > > fixed number at synthesis time but timer is runtime configurable) > > > while others are conceptually deliverable to either cpu (presently > > > only delivered to cpu0, but that's treated as an implementation > > > detail). > > > > Given you say it's delivered to the CPU associated with the event (and you have > > different PIT bases per-cpu), it sounds like your timer interrupt is percpu, > > it's just that the hwirq number can be chosen by software. > > It's what I would call percpu in the hardware, but I'm not convinced > that the Linux irq subsystem's "percpu" stuff models it in a way > that fits the hw, nor that it's in any way necessary. My understanding was that you used the same hwirq number to handle interrupts from per-cpu resources being delivered to their relevant CPUs, independently of each other. That in my mind is a perfect match. The only difference, as I've stated a number of times, seems to be that you can choose the hwirq number from software. > > > It currently works requesting the irq with flags that ensure the > > > handler runs on the same cpu it was delivered on, without using any > > > other percpu irq framework. If you have concerns about ways this could > > > break and want me to make the drivers do something else, I'm open to > > > suggestions. > > > > As I suggested, I don't think that this is right, and you need some mechanism > > to describe to the kernel that the interrupt is percpu (e.g. a flag in the > > interrupt-specifier in DT). > > Thomas seemed to think it's okay as-is. Can you describe what you > expect could go wrong by using request_irq rather than the ARM-style > percpu irq framework? The percpu irq code is designed to expect a hwirq number being shared by banked, cpu-local interrupts, the regular request_irq code is not. Even if the latter happens to work today for your use-case, that is not by design. Relying on non-deliberate properties of request_irq makes it far harder for the generic code to be altered in future, with global vs percpu locking, synchronisation, accounting, etc being broken. Thanks, Mark.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-08-24 18:50 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-24 19:50 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Marc Zyngier <marc.zyngier@arm.com> - 2016-08-24 21:10 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-24 21:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Mark Rutland <mark.rutland@arm.com> - 2016-08-25 00:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Arnd Bergmann <arnd@arndb.de> - 2016-08-24 22:10 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-24 23:00 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Mark Rutland <mark.rutland@arm.com> - 2016-08-24 23:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-24 23:50 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Arnd Bergmann <arnd@arndb.de> - 2016-08-25 00:10 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Arnd Bergmann <arnd@arndb.de> - 2016-08-25 12:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Mark Rutland <mark.rutland@arm.com> - 2016-08-25 01:00 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Thomas Gleixner <tglx@linutronix.de> - 2016-08-25 10:20 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-25 17:00 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Thomas Gleixner <tglx@linutronix.de> - 2016-08-25 17:50 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-25 19:50 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Mark Rutland <mark.rutland@arm.com> - 2016-08-25 18:50 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Mark Rutland <mark.rutland@arm.com> - 2016-08-25 20:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-25 21:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Rich Felker <dalias@libc.org> - 2016-08-25 20:30 +0200
Re: [PATCH v6 2/2] clocksource: add J-Core timer/clocksource driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-08-26 11:10 +0200
csiph-web