Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: oprofile: Move non-ARM code into separate init/exit

In preparation for moving the majority of this oprofile code into an
architecture-neutral place separate the architecture-independent code
into oprofile_perf_init() and oprofile_perf_exit().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>

authored by

Matt Fleming and committed by
Robert Richter
58850e21 80e96b11

+14 -3
+14 -3
arch/arm/oprofile/common.c
··· 349 349 tail = user_backtrace(tail); 350 350 } 351 351 352 - int __init oprofile_arch_init(struct oprofile_operations *ops) 352 + int __init oprofile_perf_init(struct oprofile_operations *ops) 353 353 { 354 354 int cpu, ret = 0; 355 355 ··· 387 387 } 388 388 } 389 389 390 - ops->backtrace = arm_backtrace; 391 390 ops->create_files = oprofile_perf_create_files; 392 391 ops->setup = oprofile_perf_setup; 393 392 ops->start = oprofile_perf_start; ··· 409 410 return ret; 410 411 } 411 412 412 - void __exit oprofile_arch_exit(void) 413 + int __init oprofile_arch_init(struct oprofile_operations *ops) 414 + { 415 + ops->backtrace = arm_backtrace; 416 + 417 + return oprofile_perf_init(ops); 418 + } 419 + 420 + void __exit oprofile_perf_exit(void) 413 421 { 414 422 int cpu, id; 415 423 struct perf_event *event; ··· 433 427 434 428 kfree(counter_config); 435 429 exit_driverfs(); 430 + } 431 + 432 + void __exit oprofile_arch_exit(void) 433 + { 434 + oprofile_perf_exit(); 436 435 } 437 436 #else 438 437 int __init oprofile_arch_init(struct oprofile_operations *ops)