]> git.baikalelectronics.ru Git - kernel.git/commit
cpumask: convert kernel/profile.c
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Dec 2008 23:42:27 +0000 (10:12 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Dec 2008 23:42:27 +0000 (10:12 +1030)
commit2c24da545b2f47af1d61e9e9693dcde665de657d
treec4d4723124706254bc105ba4715ed69576368662
parent806e803440f4f2213ab08ebd3f52fd1df215447f
cpumask: convert kernel/profile.c

Impact: Reduce kernel memory usage, use new cpumask API.

Avoid a static cpumask_t for prof_cpu_mask, and an on-stack cpumask_t
in prof_cpu_mask_write_proc.  Both become cpumask_var_t.

prof_cpu_mask is only allocated when profiling is on, but the NULL
checks are optimized out by gcc for the !CPUMASK_OFFSTACK case.

Also removed some strange and unnecessary casts.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/profile.c