blob: 2c12378e3aa95404e6b7045db0aaf5aaacd550a8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ALPHA_PERCPU_H
2#define __ALPHA_PERCPU_H
Tejun Heo9aa7a7d2009-05-12 13:19:39 -07003
Ivan Kokshaysky9267b4b2008-06-21 03:25:39 +04004/*
Tejun Heo9b7dbc72009-06-24 15:13:52 +09005 * To calculate addresses of locally defined variables, GCC uses
6 * 32-bit displacement from the GP. Which doesn't work for per cpu
7 * variables in modules, as an offset to the kernel per cpu area is
8 * way above 4G.
Ivan Kokshaysky9267b4b2008-06-21 03:25:39 +04009 *
Tejun Heo9b7dbc72009-06-24 15:13:52 +090010 * Always use weak definitions for percpu variables in modules.
Ivan Kokshaysky9267b4b2008-06-21 03:25:39 +040011 */
Tejun Heo9b7dbc72009-06-24 15:13:52 +090012#if defined(MODULE) && defined(CONFIG_SMP)
13#define ARCH_NEEDS_WEAK_PER_CPU
Tejun Heo9aa7a7d2009-05-12 13:19:39 -070014#endif
15
Tejun Heo9b7dbc72009-06-24 15:13:52 +090016#include <asm-generic/percpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18#endif /* __ALPHA_PERCPU_H */