]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.3/mips-smp-mt-fix-link-error-when-proc_fs-n.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.3 / mips-smp-mt-fix-link-error-when-proc_fs-n.patch
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
5
6 From: James Hogan <james.hogan@imgtec.com>
7
8 commit 7d907fa1c6ccb64c7f64cc7d3dcc7f6fe30a67b4 upstream.
9
10 Commit d6d3c9afaab4 (MIPS: MT: proc: Add support for printing VPE and TC
11 ids) causes a link error when CONFIG_PROC_FS=n:
12
13 arch/mips/built-in.o: In function `proc_cpuinfo_notifier_init':
14 smp-mt.c: undefined reference to `register_proc_cpuinfo_notifier'
15
16 This is fixed by adding an ifdef around the procfs handling code
17 in smp-mt.c.
18
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>
27
28 ---
29 arch/mips/kernel/smp-mt.c | 2 ++
30 1 file changed, 2 insertions(+)
31
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,
36 };
37
38 +#ifdef CONFIG_PROC_FS
39 static int proc_cpuinfo_chain_call(struct notifier_block *nfb,
40 unsigned long action_unused, void *data)
41 {
42 @@ -309,3 +310,4 @@ static int __init proc_cpuinfo_notifier_
43 }
44
45 subsys_initcall(proc_cpuinfo_notifier_init);
46 +#endif