Messages in this thread | | | Subject | Re: [PATCH] allow drivers to claim the lapic NMI watchdog HW | From | Albert Cahalan <> | Date | 04 May 2004 09:49:02 -0400 |
| |
On Tue, 2004-05-04 at 11:57, Mikael Pettersson wrote: > John Levon writes: > > On Tue, May 04, 2004 at 04:33:01AM +0200, Mikael Pettersson wrote: > > > > > +/* lapic_nmi_owner: > > > + * +1: the lapic NMI hardware is assigned to the lapic NMI watchdog > > > + * 0: the lapic NMI hardware is unassigned > > > > If we're going to have a mini state machine, can't we at least use some > > defines for each state... > > > > > + lapic_nmi_owner -= 2; /* +1 -> -1, 0 -> -2 */ > > > > ...and make this into some readable english via a little helper? > > Thing is, using discrete states makes the code for the checks > and state changes more verbose. However, I can easily hide the > representation behind macros with understandable names.
It looked like 2 flag bits to me.
#define LAPIC_WATCHDOG_WANTS_NMI 0x00000001 #define LAPIC_OTHER_DRIVER_HAS_NMI 0x00000002
- 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/
| |