Received: by 10.223.185.116 with SMTP id b49csp4154733wrg; Mon, 26 Feb 2018 12:10:28 -0800 (PST) X-Google-Smtp-Source: AH8x22529CnWuW3AqM1SLgKAFlbZb7eSimNiIouXX11z9W6z3jIzvvXZjzW1wix2duGdBVXSnmUs X-Received: by 10.101.81.12 with SMTP id f12mr9203797pgq.81.1519675828368; Mon, 26 Feb 2018 12:10:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519675828; cv=none; d=google.com; s=arc-20160816; b=WnB7KkBDA3WcfOvSRIJbfsCPl8L3nkwUHhYvHKLuwPY/QjaWaBUL1c2bM027weBL61 5VU99aab2BsRqWthNeOo+quG6tpPBcvxF4ckK1PESQ4Ofw26IQT+bO03pYkg+YBghYNA eD8wQVLBgjl28in0i5qkI3WjftR2lrUUDvXgq/JptDEhGIDGgl4nofmlA+0vsRxeRpWw 59k2dwyy/PcasU2wGn+Xi9NpQfpB9GCojuFt+ncIQea9vQMJcnTD+XXX/qxBmeoWyeau 6qGn98LhHKqTvIVFcP+cJLMot20mp54Zgbz/ErTEilQAqOG53MM3bAvaQcJMKP34bnfN LdTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=Rmp1XB4M+vGgXbY27iys7yak6iVfeQA6fqXB3PNbYgc=; b=T72DMiEo1ePWCDDqGtCVfdwfQKjd77adsillMXVq+eRcmZSyGyOz56pWiFye+IdhiZ P3Vsvb8xzirzmKAaqDv/lHFhoJiHOBKzqlJroBv9OL1ZAZ6CEgt1Qo/B5M2OQykvcKRj dbfWHBSRN1OMjieN10GpNP5gZ1NQMxoGJB3i/R4K+u2IBx+a2H52hPAGYqn9v64PvcUv cNnJf9WK9lTN/3Iux4nHdcWcnMIdF7vIq3jJMbQzAVr1U6NsamPkSuL3YMh4U++L1VOY KQB+d02eGMRBs1XX75Xsw3pjdZt/ijhtJJ6lsT9rCfzpCoFGaQ+zsWiCHYSMc3zdZVll kwpA== 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 u17si7224394pfm.190.2018.02.26.12.10.11; Mon, 26 Feb 2018 12:10:28 -0800 (PST) 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 S1751511AbeBZUIp (ORCPT + 99 others); Mon, 26 Feb 2018 15:08:45 -0500 Received: from 9pmail.ess.barracuda.com ([64.235.154.210]:34035 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbeBZUIm (ORCPT ); Mon, 26 Feb 2018 15:08:42 -0500 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1402.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Mon, 26 Feb 2018 20:08:35 +0000 Received: from [10.20.78.94] (10.20.78.94) by mips01.mipstec.com (10.20.43.31) with Microsoft SMTP Server id 14.3.361.1; Mon, 26 Feb 2018 12:05:31 -0800 Date: Mon, 26 Feb 2018 20:05:20 +0000 From: "Maciej W. Rozycki" To: Matt Redfearn CC: James Hogan , Ralf Baechle , , Paul Burton , Subject: Re: [PATCH 1/4] MIPS: Introduce isa-rev.h to define MIPS_ISA_REV In-Reply-To: <1519664565-10955-2-git-send-email-matt.redfearn@mips.com> Message-ID: References: <1519664565-10955-1-git-send-email-matt.redfearn@mips.com> <1519664565-10955-2-git-send-email-matt.redfearn@mips.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-BESS-ID: 1519675714-321458-3393-5778-9 X-BESS-VER: 2018.2-r1802232356 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.01 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.190449 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH META: Sender Domain Matches Recipient Domain X-BESS-Outbound-Spam-Status: SCORE=0.01 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, BSF_SC0_SA_TO_FROM_DOMAIN_MATCH X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Feb 2018, Matt Redfearn wrote: > +/* If the compiler has defined __mips_isa_rev, believe it. */ > +#ifdef __mips_isa_rev > +#define MIPS_ISA_REV __mips_isa_rev > +#else > +/* The compiler hasn't defined the isa rev so assume it's MIPS I - V (0) */ > +#define MIPS_ISA_REV 0 > +#endif FYI, GCC has this: /* The ISA revision level. This is 0 for MIPS I to V and N for MIPS{32,64}rN. */ int mips_isa_rev; and this: if (mips_isa < 32) mips_isa_rev = 0; else mips_isa_rev = (mips_isa & 31) + 1; and then: if (mips_isa_rev > 0) \ builtin_define_with_int_value ("__mips_isa_rev", \ mips_isa_rev); \ so your proposal looks like the right approach to me. I think we should have the various target macros documented in the GCC manual. Reviewed-by: Maciej W. Rozycki Maciej