Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271174
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: NMI for ARC |
| Date | 2015-11-17 14:20 +0100 |
| Message-ID | <qvOkV-5vY-9@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qvMj7-4ds-13@gated-at.bofh.it> <qvMCt-4n1-11@gated-at.bofh.it> <qvNyy-4XK-7@gated-at.bofh.it> <qvNyz-4XK-25@gated-at.bofh.it> <qvO1B-58e-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 17, 2015 at 06:23:21PM +0530, Vineet Gupta wrote: > On Tuesday 17 November 2015 05:55 PM, Peter Zijlstra wrote: > > > This is assuming you now have these NMIs we talked about earlier. If all > > you have are regular IRQs this is not possible, for we should be calling > > ->read() with IRQs disabled. > > > > No we don't yet. The first stab at it fell flat on floor. > > The NMI support from hardware is that is it provides different priorities, higher > one obviously able to interrupt lower one. However instructions like CLRI (disable > interrupts) will still lock out all interrupts. > > Thus local_irq_save()/restore() and local_irq_enable()/disable() now need to be > contextual. > > - When running in prio 0 mode, they only need to enable 0 > - In prio 1, they need to enable both 0 and 1 > > For irq_save()/restore() this is achievable by doing an additional STATUS32 read > at the time of save and passing that value to restore - so there's an additional > overhead - but ignoring that for now. > > Bummer is irq_disable()/enable() case: there's need to pass old prio state from > enable to disabled, so we need some sort of global state tracking - which in case > of SMP needs to be per cpu.... either keep something hot in a reg or pay the cost > of additional mem/cache line miss. > > I've not investigated how other arches do that. PPC seems to be using some sort of > soft irq state anyways. Yeah, Sparc64 might be a better example, it more closely matches your hardware. See arch/sparc/include/asm/irqflags_64.h:arch_local_irq_save(). -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: local64_cmpxchg() in arc_perf_event_update() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 10:20 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Peter Zijlstra <peterz@infradead.org> - 2015-11-17 12:10 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 12:30 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Peter Zijlstra <peterz@infradead.org> - 2015-11-17 13:30 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Peter Zijlstra <peterz@infradead.org> - 2015-11-17 13:30 +0100
NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 14:00 +0100
Re: NMI for ARC Peter Zijlstra <peterz@infradead.org> - 2015-11-17 14:20 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 14:30 +0100
csiph-web