Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5585
b: refs/heads/master
c: 842bbaa
h: refs/heads/master
i:
  5583: 56bcc2b
v: v3
  • Loading branch information
Rusty Russell authored and Linus Torvalds committed Aug 2, 2005
1 parent ce7315d commit b797927
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 561fb765b97f287211a2c73a844c5edb12f44f1d
refs/heads/master: 842bbaaa7394820c8f1fe0629cd15478653caf86
15 changes: 11 additions & 4 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,18 @@ static inline unsigned int block_size(int val)
/* Created by linker magic */
extern char __per_cpu_start[], __per_cpu_end[];

static void *percpu_modalloc(unsigned long size, unsigned long align)
static void *percpu_modalloc(unsigned long size, unsigned long align,
const char *name)
{
unsigned long extra;
unsigned int i;
void *ptr;

BUG_ON(align > SMP_CACHE_BYTES);
if (align > SMP_CACHE_BYTES) {
printk(KERN_WARNING "%s: per-cpu alignment %li > %i\n",
name, align, SMP_CACHE_BYTES);
align = SMP_CACHE_BYTES;
}

ptr = __per_cpu_start;
for (i = 0; i < pcpu_num_used; ptr += block_size(pcpu_size[i]), i++) {
Expand Down Expand Up @@ -348,7 +353,8 @@ static int percpu_modinit(void)
}
__initcall(percpu_modinit);
#else /* ... !CONFIG_SMP */
static inline void *percpu_modalloc(unsigned long size, unsigned long align)
static inline void *percpu_modalloc(unsigned long size, unsigned long align,
const char *name)
{
return NULL;
}
Expand Down Expand Up @@ -1644,7 +1650,8 @@ static struct module *load_module(void __user *umod,
if (pcpuindex) {
/* We have a special allocation for this section. */
percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size,
sechdrs[pcpuindex].sh_addralign);
sechdrs[pcpuindex].sh_addralign,
mod->name);
if (!percpu) {
err = -ENOMEM;
goto free_mod;
Expand Down

0 comments on commit b797927

Please sign in to comment.