1 From 7d907fa1c6ccb64c7f64cc7d3dcc7f6fe30a67b4 Mon Sep 17 00:00:00 2001
2 From: James Hogan <james.hogan@imgtec.com>
3 Date: Fri, 4 Jul 2014 11:59:46 +0100
4 Subject: MIPS: smp-mt: Fix link error when PROC_FS=n
6 From: James Hogan <james.hogan@imgtec.com>
8 commit 7d907fa1c6ccb64c7f64cc7d3dcc7f6fe30a67b4 upstream.
10 Commit d6d3c9afaab4 (MIPS: MT: proc: Add support for printing VPE and TC
11 ids) causes a link error when CONFIG_PROC_FS=n:
13 arch/mips/built-in.o: In function `proc_cpuinfo_notifier_init':
14 smp-mt.c: undefined reference to `register_proc_cpuinfo_notifier'
16 This is fixed by adding an ifdef around the procfs handling code
19 Signed-off-by: James Hogan <james.hogan@imgtec.com>
20 Reported-by: Markos Chandras <markos.chandras@imgtec.com>
21 Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
22 Cc: Ralf Baechle <ralf@linux-mips.org>
23 Cc: linux-mips@linux-mips.org
24 Patchwork: https://patchwork.linux-mips.org/patch/7244/
25 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29 arch/mips/kernel/smp-mt.c | 2 ++
30 1 file changed, 2 insertions(+)
32 --- a/arch/mips/kernel/smp-mt.c
33 +++ b/arch/mips/kernel/smp-mt.c
34 @@ -288,6 +288,7 @@ struct plat_smp_ops vsmp_smp_ops = {
35 .prepare_cpus = vsmp_prepare_cpus,
38 +#ifdef CONFIG_PROC_FS
39 static int proc_cpuinfo_chain_call(struct notifier_block *nfb,
40 unsigned long action_unused, void *data)
42 @@ -309,3 +310,4 @@ static int __init proc_cpuinfo_notifier_
45 subsys_initcall(proc_cpuinfo_notifier_init);