[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: s390(64) per_cpu in modules (ipv6)
On Wed, 2004-06-30 at 16:35, Pete Zaitcev wrote:
> Hi, Martin,
> I tried to build ipv6 as a module in 2.6.7, and it bombs, producing a
> module which wants per_cpu____icmpv6_socket (obviously, undefined).
> The problem appears to be caused by this:
> #define __get_got_cpu_var(var,offset) \
> (*({ unsigned long *__ptr; \
> asm ( "larl %0,per_cpu__"#var"@GOTENT" : "=a" (__ptr) ); \
> ((typeof(&per_cpu__##var))((*__ptr) + offset)); \
> }))

Heh, I ran into the same problem trying to do this trick for PPC64. You
really need to use __thread and make GCC do the work, AFAICT.

The worse problem is that a (static) per-cpu var declared *inside* a
function gets renamed by gcc; IIRC some generic code used to do this.

Anyone who quotes me in their signature is an idiot -- Rusty Russell

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:07    [W:0.036 / U:8.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site