Skip to contentSkip to conversation

Realtime patch on OMAP2

DISCUSSION Kyungmin Park 2 participants 2 messages Dec 21, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

With Dirk Behme's mail, I try he realtime preemption patch on OMAP2

linux-2.6.19.tar.bz2 (clean Linus one, not our OMAP tree) patch-2.6.19-rt15
patch-2.6.19-rt15-fixes.diff

arm-hrt-kconfig-patch.txt
arm-no-hz-patch.txt
arm_omap_clocksource_patch.txt
arm_omap_clockevents_patch.txt

But it's not enough on OMAP2

First, ARMv6 support
- I add the cmpxchg in include/asm-arm/atomic.h

#ifndef CONFIG_SMP
/*
* Atomic compare and exchange.
*/
#define __HAVE_ARCH_CMPXCHG 1

extern unsigned long wrong_size_cmpxchg(volatile void *ptr);

static inline unsigned long __cmpxchg(volatile void *ptr,
unsigned long old, unsigned long new, int size)

{
        volatile unsigned long *p = ptr;

        if (size == 4) {
                unsigned long oldval, res;

                do {
                        __asm__ __volatile__("@ atomic_cmpxchg\n"
                        "ldrex  %1, [%2]\n"
                        "mov    %0, #0\n"
                        "teq    %1, %3\n"
                        "strexeq %0, %4, [%2]\n"
                        : "=&r" (res), "=&r" (oldval)
                        : "r" (p), "Ir" (old), "r" (new)
                        : "cc");
                } while (res);

                return oldval;
        } else
                return wrong_size_cmpxchg(ptr);
}
#define cmpxchg(ptr,o,n)                                                \
({                                                                      \
     __typeof__(*(ptr)) _o_ = (o);                                      \
     __typeof__(*(ptr)) _n_ = (n);                                      \
     (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,          \
                                 (unsigned long)_n_, sizeof(*(ptr)));   \

})

#endif

Second, smc91x timeout problem
- I found a patch in kernel-mailing list [1].
but I'm not sure it's correct patch. but after the patch. it's working.

And it's another issue with ethernet irq flag value
In clean Linus kernel has IRQF_TRIGGER_RISING. but in OMAP tree has IRQF_TRIGGER_HIGH on apollon. As previous mentions. IRQF_TRIGGER_HIGH is not working.

Anyway, it's more stable than before.

Thank you,
Kyungmin Park

--

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=116576871105029&w=2

#1 lore raw
Quoted 1 line · Kyungmin Park

With Dirk Behme's mail, I try he realtime preemption patch on OMAP2

Thanks for testing :)

Quoted 3 lines

Second, smc91x timeout problem
- I found a patch in kernel-mailing list [1].
but I'm not sure it's correct patch. but after the patch. it's working.

All: Do we need to fix arch/arm/plat-omap/gpio.c here? [2]

Quoted 3 lines

And it's another issue with ethernet irq flag value
In clean Linus kernel has IRQF_TRIGGER_RISING. but in OMAP tree has IRQF_TRIGGER_HIGH on apollon. As previous mentions. IRQF_TRIGGER_HIGH is not working.

Kyungmin Park: Reading your previous post, Linus' mainline is okay (IRQF_TRIGGER_RISING), while our OMAP git (IRQF_TRIGGER_HIGH) needs fix for you? Can you test patch I sent some minutes ago?

Dirk

Quoted 1 line

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=116576871105029&w=2

[2] http://www.ussg.iu.edu/hypermail/linux/kernel/0612.1/1036.html