From 36738e5d0d812340ce2245b37ed2864d2ca85a26 Mon Sep 17 00:00:00 2001 From: myfluxi Date: Sat, 28 May 2016 21:47:51 +0200 Subject: [PATCH] arm: vfpmodule: Fix warning procfs vfp_bounce reporting failed Creation of procfs cpu/vfp_bounce fails because we're initialized too early. Fix this by creating it on rootfs_initcall as before the NEON patches. <6>[ 0.130770] VFP support v0.3: implementor 51 architecture 64 part 6f varia nt 2 rev 0 <4>[ 0.130795] ------------[ cut here ]------------ <4>[ 0.130813] WARNING: at fs/proc/generic.c:323 __xlate_proc_name+0xac/0xcc( ) <4>[ 0.130822] name 'cpu/vfp_bounce' <4>[ 0.130855] [] (unwind_backtrace+0x0/0x144) from [] (d ump_stack+0x20/0x24) <4>[ 0.130879] [] (dump_stack+0x20/0x24) from [] (warn_sl owpath_common+0x58/0x70) <4>[ 0.130899] [] (warn_slowpath_common+0x58/0x70) from [ ] (warn_slowpath_fmt+0x40/0x48) <4>[ 0.130919] [] (warn_slowpath_fmt+0x40/0x48) from [] ( __xlate_proc_name+0xac/0xcc) <4>[ 0.130938] [] (__xlate_proc_name+0xac/0xcc) from [] ( __proc_create+0x58/0x100) <4>[ 0.130956] [] (__proc_create+0x58/0x100) from [] (pro c_create_data+0x5c/0xc0) <4>[ 0.130979] [] (proc_create_data+0x5c/0xc0) from [] (v fp_init+0x19c/0x200) <4>[ 0.131000] [] (vfp_init+0x19c/0x200) from [] (do_one_ initcall+0x98/0x168) <4>[ 0.131020] [] (do_one_initcall+0x98/0x168) from [] (k ernel_init+0xf8/0x1b4) <4>[ 0.131043] [] (kernel_init+0xf8/0x1b4) from [] (kerne l_thread_exit+0x0/0x8) <4>[ 0.131076] ---[ end trace ea6d9a9b5e947151 ]--- <3>[ 0.131086] Failed to create procfs node for VFP bounce reporting Change-Id: I15b89f46fc357f96513cd03cf60288bd3e0ab84e Signed-off-by: Kevin F. Haggerty --- arch/arm/vfp/vfpmodule.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 117f6d137f7..a6c1ed6475f 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -731,9 +731,7 @@ static int __init vfp_init(void) { unsigned int vfpsid; unsigned int cpu_arch = cpu_architecture(); -#ifdef CONFIG_PROC_FS - static struct proc_dir_entry *procfs_entry; -#endif + if (cpu_arch >= CPU_ARCH_ARMv6) on_each_cpu(vfp_enable, NULL, 1); @@ -802,15 +800,21 @@ static int __init vfp_init(void) elf_hwcap |= HWCAP_VFPv4; } } + return 0; +} +static int __init vfp_rootfs_init(void) +{ #ifdef CONFIG_PROC_FS + static struct proc_dir_entry *procfs_entry; + procfs_entry = proc_create("cpu/vfp_bounce", S_IRUGO, NULL, &vfp_bounce_fops); if (!procfs_entry) pr_err("Failed to create procfs node for VFP bounce reporting\n"); #endif - return 0; } core_initcall(vfp_init); +rootfs_initcall(vfp_rootfs_init);