lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <6.1.1.1.0.20060927130329.01ece2a0@ptg1.spd.analog.com>
Date:	Wed, 27 Sep 2006 13:19:59 -0400
From:	Robin Getz <rgetz@...ckfin.uclinux.org>
To:	arnd Bergmann <arnd@...db.de>
Cc:	luke Yang <luke.adi@...il.com>, Andrew Morton <akpm@...l.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] Blackfin: arch patch for 2.6.18

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ