Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154582
b: refs/heads/master
c: b01e8dc
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Jul 1, 2009
1 parent 0b313db commit f346465
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15e3252464432a29c5461325cb5243471bd2a219
refs/heads/master: b01e8dc34379f4ba2f454390e340a025edbaaa7e
6 changes: 3 additions & 3 deletions trunk/arch/alpha/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];

#ifndef MODULE
#define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset))
#define PER_CPU_ATTRIBUTES
#define PER_CPU_DEF_ATTRIBUTES
#else
/*
* To calculate addresses of locally defined variables, GCC uses 32-bit
Expand All @@ -49,7 +49,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
: "=&r"(__ptr), "=&r"(tmp_gp)); \
(typeof(&per_cpu_var(var)))(__ptr + (offset)); })

#define PER_CPU_ATTRIBUTES __used
#define PER_CPU_DEF_ATTRIBUTES __used

#endif /* MODULE */

Expand All @@ -71,7 +71,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
#define __get_cpu_var(var) per_cpu_var(var)
#define __raw_get_cpu_var(var) per_cpu_var(var)

#define PER_CPU_ATTRIBUTES
#define PER_CPU_DEF_ATTRIBUTES

#endif /* SMP */

Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-generic/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@ extern void setup_per_cpu_areas(void);
#define PER_CPU_ATTRIBUTES
#endif

#ifndef PER_CPU_DEF_ATTRIBUTES
#define PER_CPU_DEF_ATTRIBUTES
#endif

#endif /* _ASM_GENERIC_PERCPU_H_ */
3 changes: 2 additions & 1 deletion trunk/include/linux/percpu-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

#define DEFINE_PER_CPU_SECTION(type, name, section) \
__attribute__((__section__(PER_CPU_BASE_SECTION section))) \
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES \
__typeof__(type) per_cpu__##name

/*
* Variant on the per-CPU variable declaration/definition theme used for
Expand Down

0 comments on commit f346465

Please sign in to comment.