Received: by 10.192.165.148 with SMTP id m20csp119502imm; Fri, 4 May 2018 07:37:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqZUuPPXko2qp09nRlzlnYabSyMiRmmG3LWMSNDSsq+ah1AvL69SGNWE69icbGV/b7j8u9U X-Received: by 2002:a63:4285:: with SMTP id p127-v6mr22912229pga.421.1525444621182; Fri, 04 May 2018 07:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525444621; cv=none; d=google.com; s=arc-20160816; b=P0kn6vHUgO3BWqjSToP/9DZNHdbBhyDGR2MQKuimCaGZo4R068bFPblGurWdxG3Xe5 ECrVmkZeY6/9lFD3p2fexHQCPMJaVBUbjGmCWYzIqusUo85+naCJQJNbDZCZtmuR4sBH slKQtxgKrS/PZ4w5YzM7IzduoKrbGayChY0QCS0fYn478SujWIg1bORPTKbdkdxNTVY/ bvgw3g1stxz2QLLzqoxtm6Xnj+xp3AcBobT3zB6umir7k9ufOk6aWUL5T6+4oBAeevij Mix4JQDAaZVrj409FvfTAhicMQPFinJ3Zbkri0PH1QoC1e0qaUzMiNHhxORNisiM/VNM Cicg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5L1PGRvCCAGyfUqt5wOSbT5NsWl6W9JrVo7CR3/OUtc=; b=QvKCxEc/GMOBHVB5ucLws+eb0a2f51wzgfjgfekcUe6ov7xDeUGOONSRa0SiPQUG0F mCNUCBlKUItBj7D/5tXh4EZa6+sdb+JqO+dY2zNu8+6w49L0QxiR6vOPk1sgkWfolYBP 9nrkg1zPlrfBHXccH+Gc/lSr+djELfqIpqakP1n5kaqBucnrqgKKXbLpsYO9AninR1h8 6+xUOAOHBs5xZ4CFcoRL6FYyxUtrN/215vEUALiYuOodCF8BqA1K3e7cLvdjZ8FWYUhf aAnOOU9A72mCohi7wifJ26YSS9uLS7kgmLqr5vXb/p/kAFajInx6ijpSvuFXLXFqQysR 1faw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si16548409plo.138.2018.05.04.07.36.47; Fri, 04 May 2018 07:37:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbeEDOgW (ORCPT + 99 others); Fri, 4 May 2018 10:36:22 -0400 Received: from foss.arm.com ([217.140.101.70]:54514 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbeEDOgV (ORCPT ); Fri, 4 May 2018 10:36:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 906331435; Fri, 4 May 2018 07:36:21 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D0B53F25D; Fri, 4 May 2018 07:36:20 -0700 (PDT) Date: Fri, 4 May 2018 15:36:17 +0100 From: Mark Rutland To: Andrey Ryabinin Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dvyukov@google.com, mingo@redhat.com, peterz@infradead.org Subject: Re: [PATCH 3/3] sched/core / kcov: avoid kcov_area during task switch Message-ID: <20180504143617.5smet67tomygchuu@lakrids.cambridge.arm.com> References: <20180504135535.53744-1-mark.rutland@arm.com> <20180504135535.53744-4-mark.rutland@arm.com> <9dbd4703-5d79-0f3c-306c-5d50a757c11b@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9dbd4703-5d79-0f3c-306c-5d50a757c11b@virtuozzo.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 04, 2018 at 05:32:26PM +0300, Andrey Ryabinin wrote: > On 05/04/2018 04:55 PM, Mark Rutland wrote: > > > +#define kcov_prepare_switch(t) \ > > +do { \ > > + (t)->kcov_mode |= KCOV_IN_CTXSW; \ > > +} while (0) > > + > > +#define kcov_finish_switch(t) \ > > +do { \ > > + (t)->kcov_mode &= ~KCOV_IN_CTXSW; \ > > +} while (0) > > + > > Why macros? I can't use static inline functions without a circular include dependency between and , since the definition of task_struct uses things defined in . Thanks, Mark.