linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Casting away noderef and address spaces?
@ 2008-12-22  5:36 Rusty Russell
  2008-12-22 20:06 ` Christopher Li
  0 siblings, 1 reply; 18+ messages in thread
From: Rusty Russell @ 2008-12-22  5:36 UTC (permalink / raw)
  To: linux-sparse

Hi all,

  I need to use typeof(), but I want to change address spaces.  I can't see
how to do that: AFAICT it's not possible.  This doesn't work:

#define __percpu __attribute__((noderef, address_space(3)))

/* Turn v back into a normal var. */
#define convert(v) \
	(*(__attribute__((address_space(0), force)) typeof(&v))(v))

int main(int argc, char *argv)
{
	unsigned int __percpu x;

	convert(x) = 0;
	return 0;
}

Thanks,
Rusty.

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

end of thread, other threads:[~2008-12-24  8:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-22  5:36 Casting away noderef and address spaces? Rusty Russell
2008-12-22 20:06 ` Christopher Li
2008-12-22 20:57   ` Al Viro
2008-12-22 21:23     ` Christopher Li
2008-12-22 21:39       ` Al Viro
2008-12-22 22:33         ` Christopher Li
2008-12-22 22:42           ` Harvey Harrison
2008-12-22 22:57           ` Sam Ravnborg
2008-12-22 23:53             ` Alexey Zaytsev
2008-12-22 23:55               ` Johannes Berg
2008-12-23  0:20                 ` Alexey Zaytsev
2008-12-23  0:35                   ` Johannes Berg
2008-12-23  0:37                   ` Johannes Berg
2008-12-23  1:25                     ` Christopher Li
2008-12-23  9:59                       ` Johannes Berg
2008-12-24  8:34                         ` Christopher Li
2008-12-23  2:14     ` Rusty Russell
2008-12-23  3:02       ` Christopher Li

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).