Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7299667ybp; Wed, 16 Oct 2019 06:50:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6et6RzL1lyYbgMH695gk+1tnv5KOIZFVXKFBHPkmncmaxmF1HxqzjuLKon6cqjRwTLF4v X-Received: by 2002:aa7:cf12:: with SMTP id a18mr39700680edy.278.1571233819670; Wed, 16 Oct 2019 06:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571233819; cv=none; d=google.com; s=arc-20160816; b=GQiI2aN4USMrFLQaonBwwFvb5o7dS1uttHbyTDAzA8fmgdnyH0m1/G4ffwouBPxHSz mWHo1uGzbGiflzloaBmR7zId3RC4rsj7zJCYVxP8J8fCA860/LTPmZuaZjcuLgtr8J0o 3d7tbrdHaXk9EC46oiPogJT5Me+pvpV0kd0DHZVZ57bqg7quJ8riQrcVHP+BrES3cxRZ 5vcKbjSEhy2mUVBP0L2LpUJEzDDgL90t43YT5Jz+ouX1z57eOyrNl9+bdt6d02F2fJ0M B3zb1HFiQ+szfgChlhgk9KKCR4V1tDIIkj1pfFimsbUxL9286whBMDNBCaCyhLd8goIR dorw== 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=l94+rU84MamYEoGwTTfUrOH01VwrMhKAO/PyLyivS6mNqnEopQwfCilZP9Ls5JepYK oydHrSlSQrAp28aw0t40vTjZBHZk1xD0zWvF8BE4b5bMPNWYRMc12LLqDg1Q79rwtxGw fxlS81ch4oqpYzPsdY92H8rDKg+szBZfsD2hO2COzfKPbMQvogC7RqOvVkw2aRuF/teE qu79fLwvguvtd0GVS1bUulsgX+sAG9XRH3eh8VznbW071ETKuf9rxdrt26fAcRkOZrQx HPDwk9W0AHyz/apmSUNfVq+pOCB0EiFDjaI05eH7ANapPH3d4HlH7+0B3Am2ndNsKm89 gyVg== 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 n11si14962171ejb.240.2019.10.16.06.49.55; Wed, 16 Oct 2019 06:50: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 S2392065AbfJPJtu (ORCPT + 99 others); Wed, 16 Oct 2019 05:49:50 -0400 Received: from mga12.intel.com ([192.55.52.136]:15152 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732579AbfJPJtu (ORCPT ); Wed, 16 Oct 2019 05:49:50 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 02:49:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,303,1566889200"; d="scan'208";a="397113421" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP; 16 Oct 2019 02:49:48 -0700 Received: from [10.125.252.157] (abudanko-mobl.ccr.corp.intel.com [10.125.252.157]) by linux.intel.com (Postfix) with ESMTP id DD5BF58048F; Wed, 16 Oct 2019 02:49:45 -0700 (PDT) Subject: [PATCH v2 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: <5964c7e9-ab6f-c0d0-3dca-31196606e337@linux.intel.com> Organization: Intel Corp. Message-ID: <32754937-d7a6-8121-fce3-81a71d26fac4@linux.intel.com> Date: Wed, 16 Oct 2019 12:49:44 +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: <5964c7e9-ab6f-c0d0-3dca-31196606e337@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