Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4270964pxj; Wed, 12 May 2021 01:41:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO9AQFM2RSC/tH0Sy0OB0CiRxx8HZJeoAbxiBBGUJBQrzNwUcTgGmvudguguLZSalZADic X-Received: by 2002:a05:6638:f0e:: with SMTP id h14mr31267349jas.32.1620808861341; Wed, 12 May 2021 01:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620808861; cv=none; d=google.com; s=arc-20160816; b=zntnoC1FpbbZDXuSKpXdVS64EMHq/512twLfcDyYNyWMpIPgZOihk3XWBzaQLEEQtC aN+4lECVhfIaOm4kqRSC160yfNJMPMboYfpaHS+dTMqR0jw5UOycnjmsDYpFIcxkroHa gB0hDxIW2cg1lmgRFdmI9MP6I0UtS6A8YaKRS+MU1eWLR7tyu23GEAPMbBenfnabT1+n IFv4B8JV7wiO2C1OMvbUuzfeZSL3OKNe/kPlXyazNidE6yDxmfPI2K7+ewnyoXySFHh4 3xbptSY028WZIn+ucgzwqrQn6Vp/9m8GgojyJrSNTvLCUlDsi78Yo0r/cEOrKjFRZvXi diMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=Xpv7E7m0/0rGiji1ncsswDm/EzxICdxuwDJh772j9n0=; b=poUerOzKB3duSaeUqSFNC6QDZTpzNzS/aLBHYOpDvoKzU6oKw6Y+TCmFshqq9jq4tL 3FRB9GuCG5n7X/vxpmGudgW7vk0V9ubywBpTFxMPOqzBakaLhMpOZgZfHQ948pWKw1VR uxjrg2u5kLs4pQKxKGOh3pcwKvVvazpBzi7ACXPJmbJEuLXUma66AZpWl9sE8+BTzYA3 OAUTPhGgah7V8qDekIzUCHrig8vWLUjeR4cmKbktoEXKbrDmezbqj/Mzpr3iCeHlhHTT lHg7xHwNgB7GyJogs5b7m3H1xGamp/OU9dkZX7EdqHHsqGj4a4/igObmQunmdIDY9uBt TVgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gV5nshzU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si24626344ill.69.2021.05.12.01.40.46; Wed, 12 May 2021 01:41:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gV5nshzU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230145AbhELIkD (ORCPT + 99 others); Wed, 12 May 2021 04:40:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbhELIkD (ORCPT ); Wed, 12 May 2021 04:40:03 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BB5AC061574 for ; Wed, 12 May 2021 01:38:55 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id w3so33792800ejc.4 for ; Wed, 12 May 2021 01:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Xpv7E7m0/0rGiji1ncsswDm/EzxICdxuwDJh772j9n0=; b=gV5nshzUNBLeAszIp22vouVL7PMVADVEqeNUnusNOkANOf7Tg/Lt/JG9kU7hgV8T09 S+es/Rd8xcOIh0ZNj9eUNP2RNF+2RFd3fjfxz9f8465QJaMjVgkkrFBD2J5MZ6/vX0i/ M7s4K9Bssn/KwTh5vRKMVXnxw/DNcfK7KOjz1t4i0Klofwh6BZDfzIW7OywPk1cN/yBe 3SZ5IZaX3u4UIbQ5azUHLgg4hk5wPbVq4z2YNBXzDFR3I30AjfG5HSBUnHp58QpF/lfz 5iOqGED+S4auMOrDx+F77imX6fATgMrkypZs6o6kVYvqW2uU9exYEUNjEYgkfyKTMwZL rp3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=Xpv7E7m0/0rGiji1ncsswDm/EzxICdxuwDJh772j9n0=; b=cI2B9WywAviFmgHe+mR0x5F6a0GlD4/t3VubmFk34kZ/5jADRXKR0xMZy/aTwXshWa 59X3LKSj6vKmnV/OPKa7E8Qbc79R7oq7jT9uSObfhn9gor9aHlmeyAUZrHg8mKePHOMY 0QFehugxjftVQ1alRg5qe8r5AcnX2SY6cWeyFNk0030J/oCwlHsVZRqXDu7oblanU4jG t53KsOUTmdMNZmzMIxg1YZMW3vnCsSjM3jCr7GykBAiszp9prN5zamY3Fzj0fvGQIHJf vcmuyA8NB9/fRUKcromsvUvP4HTIKyGW07hlfhHzFMHlpdAoN48wKukSVl3blajUgwwe 2NWA== X-Gm-Message-State: AOAM532kywgbuUJTbf3dwJ+lWqPk7cMB2hy3Aysa/5klTm9S0znyKRfz reriXldNZpTkJGjHbaRSuW7zxklT31g= X-Received: by 2002:a17:906:c448:: with SMTP id ck8mr5534671ejb.497.1620808733842; Wed, 12 May 2021 01:38:53 -0700 (PDT) Received: from gmail.com (0526E777.dsl.pool.telekom.hu. [5.38.231.119]) by smtp.gmail.com with ESMTPSA id l2sm13354681ejs.125.2021.05.12.01.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 01:38:53 -0700 (PDT) Sender: Ingo Molnar Date: Wed, 12 May 2021 10:38:51 +0200 From: Ingo Molnar To: "H. Peter Anvin" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Steve Wahl , Mike Travis , Dimitri Sivanich , Russ Anderson , Linux Kernel Mailing List Subject: Re: [PATCH 4/6] x86/irq: merge common code in DEFINE_IDTENTRY_SYSVEC[_SIMPLE] Message-ID: References: <20210511005531.1065536-1-hpa@zytor.com> <20210511005531.1065536-5-hpa@zytor.com> <87lf8lfizj.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * H. Peter Anvin wrote: > On 5/11/21 7:22 AM, Thomas Gleixner wrote: > > > > That's not really making the code more readable. Something like the > > below perhaps? > > > > #define IDTENTRY_INVOKE_SYSVEC(func, regs, raw) \ > > do { \ > > irqentry_state_t state = irqentry_enter(regs); \ > > \ > > instrumentation_begin(); \ > > kvm_set_cpu_l1tf_flush_l1d(); \ > > if (raw) { \ > > __irq_enter_raw(); \ > > func(regs); \ > > __irq_exit_raw(); \ > > } else { \ > > run_sysvec_on_irqstack_cond(func, regs); \ > > } \ > > instrumentation_end(); \ > > irqentry_exit(regs, state); \ > > } while (0) \ > > > > Digging more into it, it looks like a *lot* of the macros in > and can be replaced with inlines without > any change in functionality or generated code. That would be a much preferred outcome ... Thanks, Ingo