Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7489571ybp; Wed, 16 Oct 2019 09:23:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8JMHKGYCf4IdZ8OaWJ4tYbdEsiXHN9d/C2oyFDnDG1k2rhqoXmL3bz+aV6hQdFCOM2SCw X-Received: by 2002:a50:fc9a:: with SMTP id f26mr39676255edq.217.1571243019095; Wed, 16 Oct 2019 09:23:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571243019; cv=none; d=google.com; s=arc-20160816; b=gn2TjxtPGsZX4ZCk0EmbAwFCSAzg1c1u6y0hCBGHgw5iz9LN0wq8eSApp5g8iL4cka b61Jo8Wjsqo1DyWc5IiwRE/qDwu/pFewtN3dds37vSQ24AHtOx9O/14EckrG4dzR4SV4 L+9BH7B5aOV7pC805eG5n+oiCfDfSLImI9aN+h563Y3dEbC8dKGlupahr7Lb7wkOaNsC eQm8FZWQExbhWQapA9pcHCnc13WsUYHzuHaNYKy4tXfv6uW1KPh3Uj1SUoTYJYKRaF2/ i/BOopRzExa1c9Z5x2Er5Wn64nUN+LbSE0m+V6mWADWDxcC+esfA1DUweOYX1LK12DHE 1bqw== 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=Q5Sz5QPgH7oy19dEGXDGu6qIJySn4ndKt3AtGRqngSG8cM2gNxPLh89KEcMIZr/T0e 83Qw2pdgx9TxY9k18Y9n5ygEVEwXguHZURHT1QeYntHYdK/PLKQXjptU2atgDEq/E9Su EWrc9gy5dCVw9U24TdHJaaO6lYJN0CBAZfPYY3HGGEyBWrmb0tNzoO+MUf3OfHPgn+0m 9riHctiLcBiI63gUwHipQOCuZ8sItVFPi7lg/iqnOtH6Ubt6r6QX2ekBudxTXpiXIlTi x+5MYiqhs/0oOT+Sh3KRVi8v67cfdsOVI6VtuwZ7Rkxnl2RHfib1dUH0ADFv2EfA3u1w xi5A== 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 z19si15999139ejr.244.2019.10.16.09.23.13; Wed, 16 Oct 2019 09:23:39 -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 S2394018AbfJPO0N (ORCPT + 99 others); Wed, 16 Oct 2019 10:26:13 -0400 Received: from mga14.intel.com ([192.55.52.115]:27355 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387995AbfJPO0N (ORCPT ); Wed, 16 Oct 2019 10:26:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 07:26:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,304,1566889200"; d="scan'208";a="370814655" Received: from linux.intel.com ([10.54.29.200]) by orsmga005.jf.intel.com with ESMTP; 16 Oct 2019 07:26:12 -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 7EBAD580375; Wed, 16 Oct 2019 07:26:09 -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: <792a98c7-ed89-6c35-f1d7-98ddc9c1a117@linux.intel.com> Organization: Intel Corp. Message-ID: <10e4fff9-851a-8b2f-07c5-f629a639ebdb@linux.intel.com> Date: Wed, 16 Oct 2019 17:26:08 +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: <792a98c7-ed89-6c35-f1d7-98ddc9c1a117@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