Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp709374pxv; Thu, 15 Jul 2021 14:06:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXD9clnyePEZqfkOjZ7TRYm/DXxsDX38bv3OroxSwmaMJOOhD7GmJxAddJunxsB2hBXyyf X-Received: by 2002:a50:d64a:: with SMTP id c10mr9941233edj.199.1626383177926; Thu, 15 Jul 2021 14:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383177; cv=none; d=google.com; s=arc-20160816; b=0tMeiwe39gPlxK2svpC8NKBfOMEkdGjWuIJjQ7VILNKCpt66AtTPN1ypKYDvRVVhia J3ZLg/axls1TVNL1T6HPUkBBWu+GfTvCB+OgaTGX86UmxnSMmWiiP1mbD5dh6RFqqJVX 9+tBVtTs48l524sHPLGcBae7rKEHGlqM1g48HetgLL3TXCVmWPNqcfmFtsR454GSG6jn 7s+P59WALeGDyjmwAKwa5OizVEYo9IuzfmhKMJP7j4Fcr2kHOXLRBDu48+a5BM7/7dRJ rwFogSIa9n2pvGdDXwf9dMqwwO0amzD6PobOERFUTWVl4urhciWsTyCo6ftXFRa5P/qP lOSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MJmzgVRNSLU5pN77UqVLDxmcwStueBcBdMQNgjiWIm4=; b=yaAAMhSIrP1Se52X+gnBSfYv894D9Br5AtMKwEAkUOnrangE44wOVF4ff2Wxy6U8mN 48hJWF2xplT/3OvpjChcgHNvnkYv2W+o+hSr3vPYNZBEnsQJA10Gv35D1zi00xJLK9Dg VpzS+sR/qyd7SwOXN6jWG9fkBKzNtB4IEza6hFXTRFdXqPIZjAoz5aXN4NTj6umrJoBl FMohxAY+9pElPJ8+WiZJp53EfdYArj18b365ANEPtOuC3KdBxhiuB8wXKEwbTmRJ63Sf RLAVSTqo1piHbdQMLiRxmn0aa2Jvx9dI8O0sFOFr+850OaJBDjL0SFzDYCVwb4TZDLVA ZTuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B2Jq3GdL; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si8863963edd.553.2021.07.15.14.05.52; Thu, 15 Jul 2021 14:06:17 -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=@linuxfoundation.org header.s=korg header.b=B2Jq3GdL; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243606AbhGOTR0 (ORCPT + 99 others); Thu, 15 Jul 2021 15:17:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:39756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243377AbhGOTEU (ORCPT ); Thu, 15 Jul 2021 15:04:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD6D461158; Thu, 15 Jul 2021 19:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375605; bh=Lrpn29ql0xqhMrkZzmDpW6BQgwWK+WinwHTw7COMlJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B2Jq3GdLn65+8iJROnmGR/57eil6BXgL+DvrZro07b7zAXUHKKdxC9UX8ouQ5Qfwq W/Zz9XJGnbdcdxlJQjGqnYVwPTPjkMsaKDFBu2TL4kvXyYALDpbVsDPALXwj/jlH0q Bf+h6QgJOOogARR75Cq5ALd+Uw6ZRhO2kkb7eZgs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Thomas Bogendoerfer Subject: [PATCH 5.12 156/242] MIPS: MT extensions are not available on MIPS32r1 Date: Thu, 15 Jul 2021 20:38:38 +0200 Message-Id: <20210715182620.641269257@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil commit cad065ed8d8831df67b9754cc4437ed55d8b48c0 upstream. MIPS MT extensions were added with the MIPS 34K processor, which was based on the MIPS32r2 ISA. This fixes a build error when building a generic kernel for a MIPS32r1 CPU. Fixes: c434b9f80b09 ("MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol") Cc: stable@vger.kernel.org # v5.9 Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer Signed-off-by: Greg Kroah-Hartman --- arch/mips/include/asm/cpu-features.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h @@ -64,6 +64,8 @@ ((MIPS_ISA_REV >= (ge)) && (MIPS_ISA_REV < (lt))) #define __isa_range_or_flag(ge, lt, flag) \ (__isa_range(ge, lt) || ((MIPS_ISA_REV < (lt)) && __isa(flag))) +#define __isa_range_and_ase(ge, lt, ase) \ + (__isa_range(ge, lt) && __ase(ase)) /* * SMP assumption: Options of CPU 0 are a superset of all processors. @@ -421,7 +423,7 @@ #endif #ifndef cpu_has_mipsmt -#define cpu_has_mipsmt __isa_lt_and_ase(6, MIPS_ASE_MIPSMT) +#define cpu_has_mipsmt __isa_range_and_ase(2, 6, MIPS_ASE_MIPSMT) #endif #ifndef cpu_has_vp