Received: by 10.192.165.148 with SMTP id m20csp361925imm; Fri, 4 May 2018 11:26:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqf9IbR/EUOC0f6Dj27Dn/fCKFhI3xH4Gys9vIcfjiT5hCK47w7ucvzjeVpQI7sJXOumdru X-Received: by 10.98.190.16 with SMTP id l16mr5568409pff.180.1525458369704; Fri, 04 May 2018 11:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525458369; cv=none; d=google.com; s=arc-20160816; b=ONw8uHS7KCKMf37wq+qtkUwoAbROeGbPGTOtT+LufHzblud84FTQLs4fg2gINB7PVM 7FZ2yIZYg+QNSuGx3WFt7be7flNwN22jVrZ4ffKj7DwuY3fjL3RqHnSTLn+tbIxn5J8s Q5/Gg1wFnK5Q20oFFdVQeKZftDrrTgjjSNOKcEdyLIzcrpg21kWMY8aNL1c90VuF8aEt XfLxPw3kCu27jpVyvs7wGTtmclDR9zTsGIdh3N66mJJ/Z7dWU2Fk5bJ8BvCO8dYxZcAu 6Xob5C6jefu75I4PhLv8dTqdM99/xvy1dyz8iG3/dylO07+mlg5L+kdZgKuDgRlnSpIz buxA== 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:dkim-signature:arc-authentication-results; bh=C0CRiyFOAd89w8HJzCC/vfLOlWWUAT9Qh8rr6v3kczY=; b=cxsculrchPhtRcimJVheVfUfWX2VcsKnT3yqAhj2jXFsSdjov5a6ACw6sNgf+cpCDH 5wyBgffND0AHPhD1tzneQ6DgW2/uVVGO/7qNe1EX+4CPq1wTV3/TVsqJJO381T5OsuLA LkDLYjz0URa8VbpNhG0mjRzKFIOCbSo5GjKcVoE+6pk83bvwmc9tGg2UdXpJ7NJCdm/Y Rpyl+NKTa+DPl7PMLenSPXDi6DiLYTW4m5hTQBjRdQsUudCQAbpSuZmdZeCXVGbj3NuD v/hvbz8MZOhvr0PGldzNFKVAI9FiFduR77xRokxZsXvlK28Km1hZnFdI0dck0qN9NERC AgAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V9a9KitX; 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 z1-v6si15973729plb.558.2018.05.04.11.25.55; Fri, 04 May 2018 11:26:09 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V9a9KitX; 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 S1751781AbeEDSY1 (ORCPT + 99 others); Fri, 4 May 2018 14:24:27 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35404 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbeEDSY0 (ORCPT ); Fri, 4 May 2018 14:24:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=C0CRiyFOAd89w8HJzCC/vfLOlWWUAT9Qh8rr6v3kczY=; b=V9a9KitXleGNJGMrrVCEDXss5 A1njc2YMhbB4bCBXHMxlWL2+/omQ639/ocjoml4ayrGee4qChUOuFFugVEuKU4ezwNc4d74IWt3MZ 2La3BtZVrJKTrSfabvknRWMW7VN2iRnxkio/H6/fUeUfY/6ORpF4duFA7cLknGzmRV7esXHiW8D7F Ex8rK57DBA3si5ya9flI5p7OyCTLylIpRGVhr1069aOp6sPPjF7Eg7vjDO9iRgG7NmewsV045rPcf 3qVYS7CPAABWGySycYbFDfWx2oLuMJinRBhnD7LVKM8xg5KPgmLCOH/EOpbiznL/35JwnXZnpdSiP bprLix3Wg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEfNY-0000RS-2Y; Fri, 04 May 2018 18:24:24 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 476762029FA13; Fri, 4 May 2018 20:24:22 +0200 (CEST) Date: Fri, 4 May 2018 20:24:22 +0200 From: Peter Zijlstra To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, aryabinin@virtuozzo.com, boqun.feng@gmail.com, catalin.marinas@arm.com, dvyukov@google.com, mingo@kernel.org, will.deacon@arm.com Subject: Re: [PATCH 1/6] locking/atomic, asm-generic: instrument ordering variants Message-ID: <20180504182422.GT12217@hirez.programming.kicks-ass.net> References: <20180504173937.25300-1-mark.rutland@arm.com> <20180504173937.25300-2-mark.rutland@arm.com> <20180504180105.GS12217@hirez.programming.kicks-ass.net> <20180504180909.dnhfflibjwywnm4l@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180504180909.dnhfflibjwywnm4l@lakrids.cambridge.arm.com> User-Agent: Mutt/1.9.5 (2018-04-13) 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 07:09:09PM +0100, Mark Rutland wrote: > On Fri, May 04, 2018 at 08:01:05PM +0200, Peter Zijlstra wrote: > > On Fri, May 04, 2018 at 06:39:32PM +0100, Mark Rutland wrote: > > > include/asm-generic/atomic-instrumented.h | 1195 ++++++++++++++++++++++++----- > > > 1 file changed, 1008 insertions(+), 187 deletions(-) > > > > Is there really no way to either generate or further macro compress this? > > I can definitely macro compress this somewhat, but the bulk of the > repetition will be the ifdeffery, which can't be macro'd away IIUC. Right, much like what we already have in linux/atomic.h I suspect, having to duplicating that isn't brilliant either. > Generating this with a script is possible -- do we do anything like that > elsewhere? There's include/generated/ in your build directory. But nothing on this scale I think.