From patchwork Tue Jun 11 16:42:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 17891 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B7E0625DF1 for ; Thu, 13 Jun 2013 10:57:07 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id 1sf11261802qee.2 for ; Thu, 13 Jun 2013 03:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:resent-from:resent-date:resent-message-id:resent-to :sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:list-unsubscribe; bh=Qc709cEJE7d1Xz4H3SevSv46L/hEV/c5qb4wZkazzd0=; b=tnZy1VUXBRKSWIggtDlO7huEsLWL0VfYJQytgJZwGSy7XqjgRbZ9Kkp1S1tfsJbsPZ GLjsUH0CoUvblygVBOEoMhc2MUUj85UYJ4f/PtAf96cTegHH3LXtMHJL+afYWdUuRgj4 wI+GrdcUR+b7jazJonHWPspq42I/KyAs7NujFPC3uZTzmf1xolTv+ypu7ev3f75uwjQI JEtjQTHIX1pnNB0hAlXPvTSqprsR4l2g+AVevZBMD7tX4dgTPF30SKQPuZyDgQ3PuGxv p9/EsSOdTg5Yj6z0jZFwCI9cWy6fryCWH7lum56LGRZ88T4fYmhll3GArZYhcBb5MUI6 rgyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:resent-from:resent-date:resent-message-id:resent-to :sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=Qc709cEJE7d1Xz4H3SevSv46L/hEV/c5qb4wZkazzd0=; b=ZMGIgymG2Md9G7FxvHyhmYqfnY55wqyedjFdvlHybcliSCalDC9aJk2X4Vld+h/T1/ c6zAJT+OTKY6iT5q0llIdbgzj4uLjKZh64MFe0qFiDTZmr/vrNHHD5WDJs6zeG3Gw6nr D/rDgKS23H1DsLroC9V6J4jrLdAjX5n9wqqL9RBVBoESv9CRdD+X0Wl56ZYBVRvWSOyb 18BOykp3bmwKfi7V2AjtcV9LEhyAvh8icNtiPxu0BM7nVWsm5K7FHdk12JGfMY90/nB0 FdXG7mSKwS8qztwG3i6Ilo7CL5VWdw+2xGM9FWwLn9bxsv/x8OWfyC6xFlvT98cIHhbv h5OQ== X-Received: by 10.224.200.202 with SMTP id ex10mr1295495qab.8.1371121027587; Thu, 13 Jun 2013 03:57:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.4 with SMTP id h4ls4130861qen.50.gmail; Thu, 13 Jun 2013 03:57:07 -0700 (PDT) X-Received: by 10.220.215.73 with SMTP id hd9mr119263vcb.19.1371121027360; Thu, 13 Jun 2013 03:57:07 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id lb19si10198760vcb.25.2013.06.13.03.57.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 03:57:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf11so6206517vcb.40 for ; Thu, 13 Jun 2013 03:57:07 -0700 (PDT) X-Received: by 10.58.251.144 with SMTP id zk16mr92653vec.37.1371121027212; Thu, 13 Jun 2013 03:57:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.191.99 with SMTP id gx3csp16603vec; Thu, 13 Jun 2013 03:57:06 -0700 (PDT) X-Received: by 10.204.57.142 with SMTP id c14mr79712bkh.7.1371121023375; Thu, 13 Jun 2013 03:57:03 -0700 (PDT) Received: from mail-bk0-x235.google.com (mail-bk0-x235.google.com [2a00:1450:4008:c01::235]) by mx.google.com with ESMTPS id tm2si3528916bkb.263.2013.06.13.03.56.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 03:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of rric.net@gmail.com designates 2a00:1450:4008:c01::235 as permitted sender) client-ip=2a00:1450:4008:c01::235; Received: by mail-bk0-f53.google.com with SMTP id e11so4501758bkh.12 for ; Thu, 13 Jun 2013 03:56:58 -0700 (PDT) X-Received: by 10.204.170.209 with SMTP id e17mr75103bkz.24.1371121018000; Thu, 13 Jun 2013 03:56:58 -0700 (PDT) Received: from rric.localhost (g224198135.adsl.alicedsl.de. [92.224.198.135]) by mx.google.com with ESMTPSA id i15sm9174386bkz.12.2013.06.13.03.56.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Jun 2013 03:56:57 -0700 (PDT) Resent-From: Robert Richter Resent-Date: Thu, 13 Jun 2013 12:56:54 +0200 Resent-Message-ID: <20130613105654.GE12218@rric.localhost> Resent-To: linaro-kernel@lists.linaro.org, patches@linaro.org Received: from rric.localhost (f053086247.adsl.alicedsl.de. [78.53.86.247]) by mx.google.com with ESMTPSA id b12sm6160884bkz.0.2013.06.11.09.42.56 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 09:42:56 -0700 (PDT) Sender: Robert Richter From: Robert Richter To: Borislav Petkov Cc: Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , Jiri Olsa , linux-kernel@vger.kernel.org, Borislav Petkov , Robert Richter , Robert Richter Subject: [PATCH v2 04/14] MCE: Enable persistent event Date: Tue, 11 Jun 2013 18:42:30 +0200 Message-Id: <1370968960-22527-5-git-send-email-rric@kernel.org> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1370968960-22527-1-git-send-email-rric@kernel.org> References: <1370968960-22527-1-git-send-email-rric@kernel.org> X-Gm-Message-State: ALoCoQmgg6vIQ9ODEFGwjTjVU9ebUvP9XpdyiJNeeBGEv84VkmajLgkqQ4CLrcieHZRGaZaqdcG/ X-Original-Sender: rric.net@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gmail.com Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Borislav Petkov ... for MCEs collection. Changes made by Robert Richter : The mce_record tracepoint needs tracepoints to be enabled. Fixing build error for no-tracepoints configs. Signed-off-by: Borislav Petkov [ Fix build error for no-tracepoints configs ] Signed-off-by: Robert Richter Signed-off-by: Robert Richter --- arch/x86/kernel/cpu/mcheck/mce.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 9239504..d421937 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -1987,6 +1987,24 @@ int __init mcheck_init(void) return 0; } +#ifdef CONFIG_TRACEPOINTS + +int __init mcheck_init_tp(void) +{ + if (perf_add_persistent_event_by_id(event_mce_record.event.type)) { + pr_err("Error adding MCE persistent event.\n"); + return -EINVAL; + } + return 0; +} +/* + * 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_TRACEPOINTS */ + /* * mce_syscore: PM support */