Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1977727ybg; Thu, 30 Jul 2020 07:29:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZsuIMeYB4ji+9iC6Hq6V9r2mkk6/YwHI0Dv+mL8wPNDmcaGzgyBzTuWIColkZCglV5hct X-Received: by 2002:a17:906:c1d8:: with SMTP id bw24mr2810919ejb.91.1596119359715; Thu, 30 Jul 2020 07:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596119359; cv=none; d=google.com; s=arc-20160816; b=YbX+sW1f7rYFohA1Omh4YEheyvCxNua0GEMv65GpFrPXbtnxsf+Xd7dyq33X3imCR7 IB84kxCGEXtfYxGOViquhQxwBwx0fXnAcnUiST6z9UJUBakndSiW+mula+y4VdJYo+8c K5/qOiUDCxPnSJL+i7SNRVZwPDXuEUo+i4OIzXLGzzdTSR5j2V7pBHLwiNl0Gvt+54ap MCHxb1S9SlvVZBCdw9/rSlHArL36+AguBDLAWVwj35w0GkdhzX9fQBI6PxMsi6776SHE 2pWwI4Fp9GPF/BdkF8N+smsDteRrMpD/3N/Sc/pfJElxGlwaQI2Vwvkgxm7Vsj8c1Ame Ct7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=P3kbMjlHwFYIQuKYA33yRn78H0OnyyltleXaPspOFHo=; b=xwK0a4I5qzI5FTKlF4qXi61lLUQHr7OuBGwOPFKePV/0vVZFNn4cV9WZppeT820Mjx 7EmkV5P3htBBKYIUgfNTVUM4x+MsWsScTWbR8mN9JcS/yUAxJhAsoCn6Qh3yJlPTHm89 pnXMadgVK4vlBxUF+wC9C85JWoS2W9vKD9bkDlOnRyJfv1BqL8RXza0tcXD8EHhQzF97 Mr10+Oq7c1l+y3rg3qctCSRNg2YtkqS3MqtSVj9m3aFyKXzo7NZyWyRZwYuS08iqLh4A H4T5IT5T4Bh09xutx6S6sYSNduQAE5GIC+09jRnXOdt/SVRthTDeE6c2bHLQKN1WFszP i/QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MYOeWiRR; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bw19si3190643ejb.729.2020.07.30.07.28.57; Thu, 30 Jul 2020 07:29:19 -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=@redhat.com header.s=mimecast20190719 header.b=MYOeWiRR; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728092AbgG3O2r (ORCPT + 99 others); Thu, 30 Jul 2020 10:28:47 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:59861 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726275AbgG3O2r (ORCPT ); Thu, 30 Jul 2020 10:28:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596119326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P3kbMjlHwFYIQuKYA33yRn78H0OnyyltleXaPspOFHo=; b=MYOeWiRR80qItNmwQ+DxFC+KrmEhTgUmJDo1mwZTP328tEM7D3NmoCWkShmbxClitS6ORv hMmza9tOS8fN+wGb+sHPb2bkP7bWtMRTYJN3S1Jt8iS82G6UWN/IuQ5b5W+ZZXFLOmzCG3 BXRa88WNQFMdcN1GPN//1jdWs5lIKug= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-aCRGPd7qMDyp5JAOuV-85A-1; Thu, 30 Jul 2020 10:28:41 -0400 X-MC-Unique: aCRGPd7qMDyp5JAOuV-85A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C535100AA22; Thu, 30 Jul 2020 14:28:40 +0000 (UTC) Received: from treble (ovpn-119-23.rdu2.redhat.com [10.10.119.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5538A5FC31; Thu, 30 Jul 2020 14:28:39 +0000 (UTC) Date: Thu, 30 Jul 2020 09:28:37 -0500 From: Josh Poimboeuf To: Julien Thierry Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, mhelsley@vmware.com, mbenes@suse.cz Subject: Re: [PATCH v3 4/4] objtool: orc_gen: Move orc_entry out of instruction structure Message-ID: <20200730142837.a425acrg2sdbryy4@treble> References: <20200730094143.27494-1-jthierry@redhat.com> <20200730094143.27494-5-jthierry@redhat.com> <20200730100304.GI2655@hirez.programming.kicks-ass.net> <20200730133343.GN2655@hirez.programming.kicks-ass.net> <0280367f-3839-acad-799a-ecc2756c1846@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0280367f-3839-acad-799a-ecc2756c1846@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 02:45:46PM +0100, Julien Thierry wrote: > > > But I agree the proposed code is not ideal and on the other we've tried > > > avoiding #ifdef in the code. Ideally I'd have an empty orc_entry definition > > > when SUBCMD_ORC is not implemented. > > > > > > Would you have a suggested approach to do that? > > > > How ugly is having that: > > > > struct orc_entry { }; > > > > ? > > Not sure I am understanding the suggestion. Without #ifdef this will > conflict with the definition in for x86. Or every arch > needs to provide their own and definition of struct > orc_entry, even if they don't implement the orc subcommand. > > Which would be preferable? #ifdef? or arch provided definition? (or > something I have not thought of) If we wanted to get fancy we could add a 'struct insn_arch_specific arch' field, and then require every arch to declare it. But I think just an #ifdef in the 'instruction' struct declaration would be easiest for now. -- Josh