public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.x: i386/x86_64 bitops clobberings
@ 2006-10-08 21:42 Jan Kiszka
  2006-10-08 22:44 ` Willy Tarreau
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2006-10-08 21:42 UTC (permalink / raw)
  To: linux-kernel, Willy Tarreau

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

Hi,

after going through debugging hell with some out-of-tree code, I
realised that this patch

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=92934bcbf96bc9dc931c40ca5f1a57685b7b813b

makes a difference: current 2.6 works with the following code sequence
as expected (printk is executed), 2.4 fails.


#include <asm/bitops.h>
#include <linux/module.h>

unsigned long a = 1;

int module_init(void)
{
	unsigned long b = 0;
	int x;

	x = __test_and_set_bit(0, &b);
	if (__test_and_set_bit(0, &a))
		printk("x = %d\n", x);

	return -1;
}


There will likely be a way to work around my issue. Nevertheless, I
wondered if that patch was already considered for 2.4 inclusion. Or is
there no risk that in-tree code is affected?

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2006-10-15 10:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-08 21:42 2.4.x: i386/x86_64 bitops clobberings Jan Kiszka
2006-10-08 22:44 ` Willy Tarreau
2006-10-08 22:53   ` Jan Kiszka
2006-10-08 23:36     ` Willy Tarreau
2006-10-09  6:27       ` Jan Kiszka
2006-10-14 19:50         ` Willy Tarreau
2006-10-15  9:56           ` Jan Kiszka
2006-10-15 10:12             ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox