linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What's this __dummy in asm-cris/bitops.h?
@ 2007-12-19 19:56 Clemens Koller
  2007-12-20  9:56 ` Jesper Nilsson
  0 siblings, 1 reply; 2+ messages in thread
From: Clemens Koller @ 2007-12-19 19:56 UTC (permalink / raw)
  To: LKML List

Hello,

while looking for some assembly out of order / optimization stuff
for something else, I found some strange code in
.../linux/include/asm-cris/bitops.h:22


/*
* Some hacks to defeat gcc over-optimizations..
*/
struct __dummy { unsigned long a[100]; };
#define ADDR (*(struct __dummy *) addr)
#define CONST_ADDR (*(const struct __dummy *) addr)


CONST_ADDR is never used in the kernel.
Maybe some -cris people could have a look.

Thanks,
-- 
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What's this __dummy in asm-cris/bitops.h?
  2007-12-19 19:56 What's this __dummy in asm-cris/bitops.h? Clemens Koller
@ 2007-12-20  9:56 ` Jesper Nilsson
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Nilsson @ 2007-12-20  9:56 UTC (permalink / raw)
  To: Clemens Koller; +Cc: LKML List, jesper.nilsson

On Wed, Dec 19, 2007 at 08:56:17PM +0100, Clemens Koller wrote:
> Hello,
> 
> while looking for some assembly out of order / optimization stuff
> for something else, I found some strange code in
> .../linux/include/asm-cris/bitops.h:22
> 
> /*
> * Some hacks to defeat gcc over-optimizations..
> */
> struct __dummy { unsigned long a[100]; };
> #define ADDR (*(struct __dummy *) addr)
> #define CONST_ADDR (*(const struct __dummy *) addr)
> 
> CONST_ADDR is never used in the kernel.
> Maybe some -cris people could have a look.

Hmm... This is very old code, it hasn't changed since 2001 and
it is not used anywhere.

I'll send a patch to remove it, thanks for noticing!

> Thanks,
> Clemens Koller

/^JN - Jesper Nilsson
--
               Jesper Nilsson -- jesper.nilsson@axis.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-20  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 19:56 What's this __dummy in asm-cris/bitops.h? Clemens Koller
2007-12-20  9:56 ` Jesper Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).