Re: [PATCH 1/4] Blackfin: arch patch for 2.6.18

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arnd wrote:
The irq_flags are not declared anywhere in the code you just posted,

Yeah - they are already defined, and used in other macros in system.h - which is why I put the macro there.

It would also be better to convert macros like this one to inline functions in general. The rule is: if you can use either a macro or an inline function with the same effect, use an inline function.

OK - I was just doing the similar thing to what already exists in ./asm-blackfin/system.h

#define local_irq_enable() do {         \
        __asm__ __volatile__ (          \
                "sti %0;"               \
                ::"d"(irq_flags));      \
} while (0)

which could be simplified to:

#define local_irq_enable() __asm__ __volatile__ ("sti %0;" ::"d"(irq_flags));

which is the same as what is in ./asm-i386/system.h - isn't it?

#define local_irq_disable()     __asm__ __volatile__("cli": : :"memory")
#define local_irq_enable()      __asm__ __volatile__("sti": : :"memory")

We can do it anyway that makes sense/improves readability - it all compiles to the same thing...

-Robin -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux