lkml.org 
[lkml]   [2013]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 06/12] mce, x86: Enable persistent events
    Date
    From: Borislav Petkov <bp@suse.de>

    ... for MCEs collection.

    Signed-off-by: Borislav Petkov <bp@suse.de>
    [ rric: Fix build error for no-tracepoints configs ]
    [ rric: Return proper error code. ]
    [ rric: No error message if perf is disabled. ]
    Signed-off-by: Robert Richter <rric@kernel.org>
    ---
    arch/x86/kernel/cpu/mcheck/mce.c | 19 +++++++++++++++++++
    1 file changed, 19 insertions(+)

    diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
    index 87a65c9..ffa227b 100644
    --- a/arch/x86/kernel/cpu/mcheck/mce.c
    +++ b/arch/x86/kernel/cpu/mcheck/mce.c
    @@ -1990,6 +1990,25 @@ int __init mcheck_init(void)
    return 0;
    }

    +#ifdef CONFIG_EVENT_TRACING
    +
    +int __init mcheck_init_tp(void)
    +{
    + int ret = perf_add_persistent_tp(&event_mce_record);
    +
    + if (ret && ret != -ENOENT)
    + pr_err("Error adding MCE persistent event: %d\n", ret);
    +
    + return ret;
    +}
    +/*
    + * We can't run earlier because persistent events uses anon_inode_getfile and
    + * its anon_inode_mnt gets initialized as a fs_initcall.
    + */
    +fs_initcall_sync(mcheck_init_tp);
    +
    +#endif /* CONFIG_EVENT_TRACING */
    +
    /*
    * mce_syscore: PM support
    */
    --
    1.8.3.2


    \
     
     \ /
      Last update: 2013-08-22 17:01    [W:2.395 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site