Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3736197pxj; Tue, 11 May 2021 10:46:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlDmi09x4SUdHydedvIwqNDRqv6JlSVBn90P3DEzX6Xjopz8oeTwiETdZpBPA8mlcpoJzz X-Received: by 2002:a50:ab1d:: with SMTP id s29mr36866731edc.203.1620755170442; Tue, 11 May 2021 10:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620755170; cv=none; d=google.com; s=arc-20160816; b=iEvkAPn37lYQahQuCscONxk8rhLKZ1y99aZNYpR5hR6r5d9Y7ycU/Oomy0gORvP5jz a34y22NkZE6Mj3+xMw9w6W/3pRPD+gERjlAUyHUTseEhfEz2tFYiQVJFbAbFURd+aEHg DMlqCYapfO9pcYvlnr3GgH6zSn0i4G1COj62v2jGjGpwfxKW6Md7S9wFKT4GjlIYXP6r rulZZet7pqnHqg7tW2I6ZLSmf6Xsb10DGZG+zFzBYFXwKrkxf7auB4ueZNvsnRaeRavU hKPOauMIwy+fwLFPYDM4zuT9Lr0FwLbl4jENj5iVL4sFtHjSDHIdZrQrdwmK0XfKHj13 Urtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=I4Nrpc4juIjYCBgtvXLG7yW+fRLX4yY6QBjep1Kuktg=; b=pEEzLbzwIQ3eFRuTvOlMc1gzOBYIB/VwSWoedIRrWqMRBZwlO9u+Q4nY/V78AiKX/o zmVZz2C4P/fK9Ougf+FtOv+OwXhUQurO7wIjlSezXY5lZZZUW/JjZ/V8ii+TcfeEWuvv 8UmLR3ImH/X2kT2QSPy+hkuFcr9o32k/MSvxY1kRiT9jHlQb2C7i0lf8uZJ+UyFKhYak qyL02KI6FJJvxykRJPPME+8a/fxQqyUIXgyaM6Two8vMdHj1sYdW+ClFTg4kWbe9C/UE UJxi3d3eBEE1pFoWW6iKusJSAWoDXCdKGnJZZ9Emnfpj4SXfr2WRKSf8EOAPp5xq4qXP kZwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2021042801 header.b=QEGipmfI; 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=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn20si2600519ejc.549.2021.05.11.10.45.34; Tue, 11 May 2021 10:46:10 -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=@zytor.com header.s=2021042801 header.b=QEGipmfI; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231589AbhEKRpu (ORCPT + 99 others); Tue, 11 May 2021 13:45:50 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43719 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231454AbhEKRpt (ORCPT ); Tue, 11 May 2021 13:45:49 -0400 Received: from tazenda.hos.anvin.org ([IPv6:2601:646:8602:8be0:7285:c2ff:fefb:fd4]) (authenticated bits=0) by mail.zytor.com (8.16.1/8.15.2) with ESMTPSA id 14BHiROf2638597 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 11 May 2021 10:44:27 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 14BHiROf2638597 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2021042801; t=1620755068; bh=I4Nrpc4juIjYCBgtvXLG7yW+fRLX4yY6QBjep1Kuktg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QEGipmfIgGW2WKZWBN/rKm1HxRv59ELISh87mPr5dY/r7cl6GWCeJBtQGsJQAmqwf 8rjqVVEPHimsnjoVKTNR7jCcmOoDSqWAS9PrQwfd73vRV8Yxl/KJa9itlbZl6nWALt kLEvyWNgNIl9nYdzssGkA78bN6M91VEC7BxxyvcFUN0dCCCep3F8K088LFukRe5/nH Ppmn4yMFTIoRWXPRW/ieFWw9//WDi23hL42Smqv6SwMyh7izSZEBYKeFyVvJFzw9W7 cbp1cCsSuRSgPmDmp530of+QrTvLOQ3SJBzpaemq1O6wDvCVOrqRF16XUCdqqKMqJy ZNTtqOIsiKDTw== Subject: Re: [PATCH 4/6] x86/irq: merge common code in DEFINE_IDTENTRY_SYSVEC[_SIMPLE] To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski Cc: Steve Wahl , Mike Travis , Dimitri Sivanich , Russ Anderson , Linux Kernel Mailing List References: <20210511005531.1065536-1-hpa@zytor.com> <20210511005531.1065536-5-hpa@zytor.com> <87lf8lfizj.ffs@nanos.tec.linutronix.de> From: "H. Peter Anvin" Message-ID: Date: Tue, 11 May 2021 10:44:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <87lf8lfizj.ffs@nanos.tec.linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -hpa