On Mon, 2005-03-21 at 17:54, Jan Kiszka wrote: > rtai_oldnames.h in magma-CVS is broken. This patch fixes it for x86, > other architectures may require a check as well. > > With this patch applied, RTnet at least loads on top of magma now. > > Jan > [...] > -- rtai_oldnames.h 5 Jan 2005 16:48:31 -0000 1.4 > +++ rtai_oldnames.h 21 Mar 2005 16:36:29 -0000 > @@ -37,9 +37,9 @@ > #define IFLAG RTAI_IFLAG > #define hard_cli() rtai_cli() > #define hard_sti() rtai_sti() > -#define hard_save_flags_and_cli(x) rtai_local_irq_save(x) > -#define hard_restore_flags(x) rtai_local_irq_restore(x) > -#define hard_save_flags(x) rtai_local_irq_flags(x) > +#define hard_save_flags_and_cli(x) rtai_save_flags_and_cli(x) > +#define hard_restore_flags(x) rtai_restore_flags(x) > +#define hard_save_flags(x) rtai_save_flags(x) > #define hard_cpu_id adeos_processor_id > > #endif /* __KERNEL__ */
Hm, there is definitely something wrong here (rtai_local_irq_*() are not defined for i386). But I'm not sure if your patch is correct either. What is expected from the hard_*() macros? (I'm not so familiar with "historical" RTAI but would like to get it right for ARM.) If they should disable the CPU's interrupt enabled flag (as their name suggests) then it should be #define hard_cli() rtai_hw_cli() #define hard_sti() rtai_hw_sti() #define hard_save_flags_and_cli() rtai_hw_save_flags_and_cli() ... Your patch is only correct if the hard_*() macros are expected to prevent interrupts to be delivered to RTAI, but nothing more, i.e. you can't use them to protect time-critical hardware operations (if only the RTAI pipeline is stalled, interrupts are still handled by Adeos, they are just not dispatched to RTAI). Mike -- Dr. Michael Neuhauser phone: +43 1 789 08 49 - 30 Firmix Software GmbH fax: +43 1 789 08 49 - 55 Vienna/Austria/Europe email: [EMAIL PROTECTED] Embedded Linux Development and Services http://www.firmix.at/
