Received: by 10.223.185.116 with SMTP id b49csp3977296wrg; Mon, 26 Feb 2018 09:07:32 -0800 (PST) X-Google-Smtp-Source: AH8x227pKXMJgbxnrfm9Z8sYBeReamxA5f6f87lsL5L4vV4i8q4MCKssfDQSLfQQ30sAVq4xqkWt X-Received: by 2002:a17:902:bc41:: with SMTP id t1-v6mr11417278plz.436.1519664852431; Mon, 26 Feb 2018 09:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519664852; cv=none; d=google.com; s=arc-20160816; b=m/VL6BkszdBIuYGSr4+q/NiJhQoNYdH/XU7F3VrOOw/UQ7l1/PYTeNhg3Ixp/NtfL9 2zXZWbyGQbCP4rFYaPPbsoN+ijwUm7gzsxCYBlecr4Nt/ALzCJZ7ryZlKxUPuHXSS4zh PHm+XXtY19tt7PJ52+vr3K/wgeWBeCoNBbLug36eAkFvM66miSIBMUPguIyxQIiq/XDx IsKbO/62O0Pm8l0scCzzm4+5xT9NAHnJ9bYwNpQDTMg+CIK24598YX3FfVuuqGEVB9d9 u+MTaRwsKALCpX2gBi8QVV2aGWHyGuLdY5qVMHdNJHJfJXJCAYfg0598WqEumJQIjElo Q81Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=7ZDQzm58eLI11oz2MBa7j4c7IwWmj7AclmkZqxwu9Qw=; b=zGJjiUIyAHLe8DB+1HNx1oGa/IECCj7z9ZHOVFB9UbjmpcbzNRa6X3myBcZdEpoYpq JX/F0KMQcKHSS6npihEXKiw7Belm7MBWVV5MbG9XNRe6yMjs3Wu4wgJBxSykLazSPYvN tPrkCF2fvtqkQnIBiZDL8LXXX/sI/SnxPWfr939xKDANy8SmnJECQJVYDa6mY91dWJ5e gH6P9w7ZDAsHFgIFPJkgMSNnw/5KfCfiqbTxWErSY8aG1ZCggFm/+UorefzPVQ8Ti0Wm U52G3FuYEBIc0MP3Bq9HYP5Sh3aZC4FlQpy185Q2n2NDIx/IfxfFdVUANUBPnp/Lun1f MiGg== 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 1-v6si6993538plr.786.2018.02.26.09.07.17; Mon, 26 Feb 2018 09:07:32 -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 S1751707AbeBZRGV (ORCPT + 99 others); Mon, 26 Feb 2018 12:06:21 -0500 Received: from 9pmail.ess.barracuda.com ([64.235.150.225]:57618 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751665AbeBZRGU (ORCPT ); Mon, 26 Feb 2018 12:06:20 -0500 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx29.ess.sfj.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Mon, 26 Feb 2018 17:06:12 +0000 Received: from mredfearn-linux.mipstec.com (192.168.155.41) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 26 Feb 2018 09:03:00 -0800 From: Matt Redfearn To: James Hogan , Ralf Baechle CC: , Paul Burton , "Matt Redfearn" , , "Maciej W. Rozycki" , David Daney Subject: [PATCH 0/4] MIPS: Introduce isa-rev.h to define MIPS_ISA_REV Date: Mon, 26 Feb 2018 17:02:41 +0000 Message-ID: <1519664565-10955-1-git-send-email-matt.redfearn@mips.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.155.41] X-BESS-ID: 1519664770-637139-10619-123029-6 X-BESS-VER: 2018.2-r1802232356 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.190443 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are multiple instances in the kernel where we need to include or exclude particular instructions based on the ISA revision of the target processor. For MIPS32 / MIPS64, the compiler exports a __mips_isa_rev define. However, when targeting MIPS I - V, this define is absent. This leads to each use of __mips_isa_rev having to check that it is defined first. To simplify this, this series introduces the isa-rev.h header which always exports MIPS_ISA_REV (the name is changed so as to avoid confusion with the compiler builtin and to avoid accidentally using the builtin). All uses of __mips_isa_rev are then replaced with the new define, removing the check that it is defined. Applies on v4.16-rc1 Matt Redfearn (4): MIPS: Introduce isa-rev.h to define MIPS_ISA_REV MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV MIPS: BPF: Replace __mips_isa_rev with MIPS_ISA_REV MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV arch/mips/include/asm/cpu-features.h | 5 +++-- arch/mips/include/asm/isa-rev.h | 24 ++++++++++++++++++++++++ arch/mips/net/bpf_jit_asm.S | 9 +++++---- arch/mips/vdso/elf.S | 10 ++++------ 4 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 arch/mips/include/asm/isa-rev.h -- 2.7.4