X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fsched_stats.h;h=ee71bec1da66a9dcb64d93a0e9934c15a155905b;hb=8b805ef617cf0e02f6d18b891f8deb6246421b01;hp=b8c156979cf2ad600b0f9b59f9a935cec86aab85;hpb=0a9b86381c76e9d33a9b6edb66aef32d7a3306e3;p=linux-2.6-omap-h63xx.git diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index b8c156979cf..ee71bec1da6 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h @@ -9,7 +9,7 @@ static int show_schedstat(struct seq_file *seq, void *v) { int cpu; - int mask_len = NR_CPUS/32 * 9; + int mask_len = DIV_ROUND_UP(NR_CPUS, 32) * 9; char *mask_str = kmalloc(mask_len, GFP_KERNEL); if (mask_str == NULL) @@ -90,13 +90,20 @@ static int schedstat_open(struct inode *inode, struct file *file) return res; } -const struct file_operations proc_schedstat_operations = { +static const struct file_operations proc_schedstat_operations = { .open = schedstat_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; +static int __init proc_schedstat_init(void) +{ + proc_create("schedstat", 0, NULL, &proc_schedstat_operations); + return 0; +} +module_init(proc_schedstat_init); + /* * Expects runqueue lock to be held for atomicity of update */