Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5198527ybg; Mon, 21 Oct 2019 23:02:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8Oenny2EYK1FcrN88SPFl0HtqUQ61vcVqGbIg8vtJIDWa+E0SAESNyKYRHzAwgp7UGaH8 X-Received: by 2002:a17:906:ccd6:: with SMTP id ot22mr4913249ejb.166.1571724156472; Mon, 21 Oct 2019 23:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571724156; cv=none; d=google.com; s=arc-20160816; b=UzxwHeLGKTMKBfOcAr0CUh9wQXoINXioz3fC71maOonyYl8i3BUdgqfYfmPubDn+kv pvg2+ra/4i6NOnrwOoc+IErHZTK4230aeGvl//tcPEOhvLVtVHc5AlveFFxBQLHj70Q/ ypIKYGQUtFUd9k/W5MDuFrOrcCEIT7DE6AmpzQ4hbCPwCQWSzGVKDYJN+SNYaeizS+TI BY4OzbkNA4Y3FVZweXswZvlSFZrfEEkfhtrHgfRLJqsRQqhYHY6vI9dgP3WHeJ/Kf5s+ kbjnG0KtrItYZ+7RMIPpSGfWlJePg3yhnQ/XxoL3BskQVQAeu7GcS70YmpCkK8+ODwRb hZlg== 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=oN3FuWzefSW0HgN37RA7gSavLiI5qn+3M9IezCkNg1s=; b=vqVBvYXzqjHI01P8xtCJh7Mo0WhsnzfIcd/9jXE1gp6s9hJYCGzjqWKEKlg8mtFFu8 XwPYCLMOHKRrjFZCsPJF7uVJ2bzwnJN4rWDolj8zYMBuox0nRKpG3MzT3Sazi9I0MfDh Lam/+xTxwabnW4FwBqaYVhBaQbBG2goAf7ywPHzOBkzyGSqqbcb+X1THAL42MI50i67A jFzq6YScdG52waxaM2IXnjZICwTc5+bttjC4RLDNHkk3lyaXL9tsXX1hz0im2fsKndjM qYOr3pV2qXikIOmbTg5aYNBUILDotSZNNZuqT5Z8IEOaRsRrLEvr9igLP3tKkUP9ume3 0NvA== 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 h13si456113edw.72.2019.10.21.23.02.12; Mon, 21 Oct 2019 23:02:36 -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 S1730828AbfJVF73 (ORCPT + 99 others); Tue, 22 Oct 2019 01:59:29 -0400 Received: from mga06.intel.com ([134.134.136.31]:55889 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfJVF72 (ORCPT ); Tue, 22 Oct 2019 01:59:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 22:59:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="209598441" Received: from linux.intel.com ([10.54.29.200]) by fmsmga001.fm.intel.com with ESMTP; 21 Oct 2019 22:59:27 -0700 Received: from [10.249.230.171] (abudanko-mobl.ccr.corp.intel.com [10.249.230.171]) by linux.intel.com (Postfix) with ESMTP id E79C6580100; Mon, 21 Oct 2019 22:59:23 -0700 (PDT) Subject: [PATCH v4 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: Organization: Intel Corp. Message-ID: <359cc996-50bc-2ab3-5c66-f1e5135d08c2@linux.intel.com> Date: Tue, 22 Oct 2019 08:59:22 +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: 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 7b21455d7504..f51bddf5f48c 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 *prev, void *next) +{ + if (x86_pmu.sync_task_ctx) + x86_pmu.sync_task_ctx(prev, next); +} + 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