Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137071
b: refs/heads/master
c: 6a24290
h: refs/heads/master
i:
  137069: ed1da7d
  137067: 494f1c7
  137063: 46515e9
  137055: c6cb075
v: v3
  • Loading branch information
Tejun Heo committed Mar 6, 2009
1 parent 8d10e48 commit 9921244
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 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: f254f3909efaf59ca2d0f408de2d044dace60706
refs/heads/master: 6a242909b01120f6f3d571c0b75e20ec61f0d8d3
10 changes: 0 additions & 10 deletions trunk/arch/blackfin/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,4 @@

#include <asm-generic/percpu.h>

#ifdef CONFIG_MODULES
#define PERCPU_MODULE_RESERVE 8192
#else
#define PERCPU_MODULE_RESERVE 0
#endif

#define PERCPU_ENOUGH_ROOM \
(ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
PERCPU_MODULE_RESERVE)

#endif /* __ARCH_BLACKFIN_PERCPU__ */
24 changes: 13 additions & 11 deletions trunk/include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <linux/slab.h> /* For kmalloc() */
#include <linux/smp.h>
#include <linux/cpumask.h>
#include <linux/pfn.h>

#include <asm/percpu.h>

Expand Down Expand Up @@ -52,17 +53,18 @@
#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)

/* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
#ifndef PERCPU_ENOUGH_ROOM
/* enough to cover all DEFINE_PER_CPUs in modules */
#ifdef CONFIG_MODULES
#define PERCPU_MODULE_RESERVE 8192
#define PERCPU_MODULE_RESERVE (8 << 10)
#else
#define PERCPU_MODULE_RESERVE 0
#define PERCPU_MODULE_RESERVE 0
#endif

#ifndef PERCPU_ENOUGH_ROOM
#define PERCPU_ENOUGH_ROOM \
(__per_cpu_end - __per_cpu_start + PERCPU_MODULE_RESERVE)
#endif /* PERCPU_ENOUGH_ROOM */
(ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
PERCPU_MODULE_RESERVE)
#endif

/*
* Must be an lvalue. Since @var must be a simple identifier,
Expand All @@ -79,7 +81,7 @@
#ifdef CONFIG_HAVE_DYNAMIC_PER_CPU_AREA

/* minimum unit size, also is the maximum supported allocation size */
#define PCPU_MIN_UNIT_SIZE (16UL << PAGE_SHIFT)
#define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10)

/*
* PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy
Expand All @@ -96,15 +98,15 @@
#ifndef PERCPU_DYNAMIC_RESERVE
# if BITS_PER_LONG > 32
# ifdef CONFIG_MODULES
# define PERCPU_DYNAMIC_RESERVE (6 << PAGE_SHIFT)
# define PERCPU_DYNAMIC_RESERVE (24 << 10)
# else
# define PERCPU_DYNAMIC_RESERVE (4 << PAGE_SHIFT)
# define PERCPU_DYNAMIC_RESERVE (16 << 10)
# endif
# else
# ifdef CONFIG_MODULES
# define PERCPU_DYNAMIC_RESERVE (4 << PAGE_SHIFT)
# define PERCPU_DYNAMIC_RESERVE (16 << 10)
# else
# define PERCPU_DYNAMIC_RESERVE (2 << PAGE_SHIFT)
# define PERCPU_DYNAMIC_RESERVE (8 << 10)
# endif
# endif
#endif /* PERCPU_DYNAMIC_RESERVE */
Expand Down

0 comments on commit 9921244

Please sign in to comment.