All of lore.kernel.org
 help / color / mirror / Atom feed
* IRQs and memory consistency
@ 2012-04-10 20:22 Christopher Harvey
  2012-04-11  0:58 ` Wink Saville
  2012-04-11  3:18 ` Mulyadi Santosa
  0 siblings, 2 replies; 7+ messages in thread
From: Christopher Harvey @ 2012-04-10 20:22 UTC (permalink / raw)
  To: kernelnewbies

This is a high level question about how IRQs work in the kernel.

I have a struct that was kmalloc'd into ram. Within this struct there
is an int, called devid. When I set this devid to a number that isn't
0, I print the following:

checking devid value....327683 in 0xcb6953d4

where 327683 is the value of the int and 0xcb6953d4 is the address of
the struct that the devid value is in.

Then an interrupt happens and when I print this value again at the
beginning of the interrupt handler I get the following printed text:

checking devid value....0 in 0xcb6953d4

notice that the devid has been set to 0. I can't find any code on my
end that would do this. Is there something, maybe related to memory
address spaces in IRQ handlers that I don't know about?

The IRQ and the setting of the devid value happen fairly close to
each other in time. (like less than a second, or closer)

Any ideas or guesses are appreciated.

-Chris

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

end of thread, other threads:[~2012-04-11 20:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10 20:22 IRQs and memory consistency Christopher Harvey
2012-04-11  0:58 ` Wink Saville
2012-04-11 11:59   ` Christopher Harvey
2012-04-11 15:35     ` Wink Saville
2012-04-11 20:14       ` Christopher Harvey
2012-04-11  3:18 ` Mulyadi Santosa
2012-04-11 11:53   ` Christopher Harvey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.