Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1724775ybg; Sat, 19 Oct 2019 01:08:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE3ZDcdIZ46RLq2B+fodQFkRdpcKKPWurYCdxb1qmbnTeqQH8Bsl/QNLwGKoFO2h3pLGBs X-Received: by 2002:a05:6402:13c9:: with SMTP id a9mr13677260edx.141.1571472499391; Sat, 19 Oct 2019 01:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472499; cv=none; d=google.com; s=arc-20160816; b=AnOiI2W7msp523LoobpEp5lpicUxhwvz69X2Rm3S1xkNQjo7la9a/wsupN9ib5QA7W PUNZO7oPOUDfZHdsrzXJ/QV7iQycX3WfeWhhfNOLTmiFSlPPBBKOqiVuxIEk3No6CpAm NbI1hx8FZS7lcJ+FghSvW20GnVdG2PEfRt4BDFFEVHWuwVhi2Bjb9sT0iCToWRqj36DP xcSOw6lzCRhopqoDYjPJgs94ynK4TPIfa5nsIsq68IMDaItDG756Lcpn6UuaTPsd8yx5 Y8jQYXsbw5NxKMylpHEpAiG/fNAGo1MGGwYX1DdD/4qisiLe1D0mF69bpUKrJRiiNz81 9mdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:from:subject; bh=sscSl7LX9jFvHWsFHx1AiQ+U0vNYYabNW4BwcZOcDgI=; b=jGZW7sZlIgQ5T1tiD2fT70HguI3/aP7pBbcm4vyu5Sv3CK4JvBzwLm6hB5kBHnbiQ+ kjH395l8D5CyQUCzFmRFVpDlWBuL/q975aPxRI+qmjS3k1q66Gofu1zoISwGrTBO66Lv w0TqxDFrjEHymnewGVg1ptWQaZQVKZGn23Fn1H0pB1z/l35YdiQlSC2ubQMpXYmmk5Ks 7eNI2wG1FnihlQ5Her4nZphvqsYzhZWixpn+lNL/gJ04LT6axS+fYug07kRg8cXeOaSg xpLcsJ3WImpZI7bmWLkLPDu5J6kE4ZTykO9joMxchWgFG6gRm14PmaEdwQyM0u6tAIAp fG2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z26si5511770edz.99.2019.10.19.01.07.56; Sat, 19 Oct 2019 01:08:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391861AbfJRJnd (ORCPT + 99 others); Fri, 18 Oct 2019 05:43:33 -0400 Received: from mga12.intel.com ([192.55.52.136]:9503 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731603AbfJRJnd (ORCPT ); Fri, 18 Oct 2019 05:43:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2019 02:43:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,311,1566889200"; d="scan'208";a="202654102" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 18 Oct 2019 02:43:32 -0700 Received: from [10.125.252.194] (abudanko-mobl.ccr.corp.intel.com [10.125.252.194]) by linux.intel.com (Postfix) with ESMTP id 99B555802F0; Fri, 18 Oct 2019 02:43:29 -0700 (PDT) Subject: [PATCH v3 2/4] perf/x86: install platform specific sync_task_ctx adapter From: Alexey Budankov To: Peter Zijlstra Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , Kan Liang , Stephane Eranian , Ian Rogers , Song Liu , linux-kernel References: <0b20a07f-d074-d3da-7551-c9a4a94fe8e3@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Fri, 18 Oct 2019 12:43:28 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <0b20a07f-d074-d3da-7551-c9a4a94fe8e3@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bridge perf core and x86 sync_task_ctx() method calls. Signed-off-by: Alexey Budankov --- arch/x86/events/core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 15b90b1a8fb1..2c293bbd093f 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -2243,6 +2243,12 @@ static void x86_pmu_sched_task(struct perf_event_context *ctx, bool sched_in) x86_pmu.sched_task(ctx, sched_in); } +static void x86_pmu_sync_task_ctx(void *one, void *another) +{ + if (x86_pmu.sync_task_ctx) + x86_pmu.sync_task_ctx(one, another); +} + void perf_check_microcode(void) { if (x86_pmu.check_microcode) @@ -2297,6 +2303,7 @@ static struct pmu pmu = { .event_idx = x86_pmu_event_idx, .sched_task = x86_pmu_sched_task, .task_ctx_size = sizeof(struct x86_perf_task_context), + .sync_task_ctx = x86_pmu_sync_task_ctx, .check_period = x86_pmu_check_period, .aux_output_match = x86_pmu_aux_output_match, -- 2.20.1