Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp314870ybj; Wed, 6 May 2020 18:33:59 -0700 (PDT) X-Google-Smtp-Source: APiQypLcDfaE0djabLu41bFdsa2o5wHPmRtJorAx8MYQIuKB652+p5x8NsEfbPFZpSBHTXcJC1bN X-Received: by 2002:a50:f381:: with SMTP id g1mr9718416edm.219.1588815239493; Wed, 06 May 2020 18:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588815239; cv=none; d=google.com; s=arc-20160816; b=goy8Gj6ak67I3enN92LiqAqZgpNyV3WA60yjsDwkcS8N317b+quUnNKJzpNDDfO20C 88Rqf4nna/TCdP97HjXsa4RIOeslEXNfPmEE5v18MRpm2E/gBe+PCKvQVodJSgXp6dZ2 3jfFvCgoMEwR0+mtFhvgtAWZjJlroXg4LRcR4mp7zykQtNZyT6qdRt++jCrzQUd1I61H 4PW+XFIl3vKsdeZZtx4iLB/Gv4tZNi4Ogi8kry/JMGozcicYuKN0x5RhiywUy+/GkW2D 4cdIRYMR5u0/pqieDJfBFblQIK2xbCmKSYl2OhKeQKBojw8LQrZM54Xrcan8PUboLvsz Zrvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LRHc8H2WIx18cpmNj1xVeWNhehi/QDkd5io4WRYl8kY=; b=cY2b+MfOg4rQojt5TEicKlRN0SKv+5B65KL3vjsqO1PhZRI5v7qJI+gNZoOf7CdDmN QzfRTemDFzYmT6Ulple6XqPCULrI0IVSINq1NEIyO1A3/KOfVQolMY19wpULVW2HMGBF aGlCEVtVSooDD7PRSoOqDexdetE/AI2wHzsvAcFWPZ/a6fS0WyveUJUXbJDP/OqaRvE+ Drs9v6L6uFNMuivkK642RKzE7XUMv1hzTzWtRWEYLr+1CRwwpW7XWsFOi502pkHTG5A2 1A/n5gDSLhyyg/tLcJI8olOsNTyjvD2Ng4NnKld9ZRCLorKD7103SRBT+Ch9JKpoI0Le yTpw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m25si2267467eds.232.2020.05.06.18.33.36; Wed, 06 May 2020 18:33:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730262AbgEFRoU (ORCPT + 99 others); Wed, 6 May 2020 13:44:20 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:60956 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730167AbgEFRoN (ORCPT ); Wed, 6 May 2020 13:44:13 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id 3FBEA8000AFE; Wed, 6 May 2020 17:44:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4bX1kpA1Q5sq; Wed, 6 May 2020 20:44:09 +0300 (MSK) From: To: Thomas Bogendoerfer CC: Serge Semin , Serge Semin , Alexey Malahov , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , , , Zhou Yanjie , Paul Cercueil , Jiaxun Yang , , Subject: [PATCH v2 11/20] mips: MAAR: Use more precise address mask Date: Wed, 6 May 2020 20:42:29 +0300 Message-ID: <20200506174238.15385-12-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> References: <20200306124807.3596F80307C2@mail.baikalelectronics.ru> <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Serge Semin Indeed according to the P5600/P6000 manual the MAAR pair register address field either takes [12:31] bits for 32-bits non-XPA systems and [12:35] otherwise. In any case the current address mask is just wrong for 64-bit and 32-bits XPA chips. So lets extend it to 39-bits value. This shall cover the 64-bits architecture and systems with XPA enabled, and won't cause any problem for non-XPA 32-bit systems, since the value will be just truncated when written to the 32-bits register. Co-developed-by: Alexey Malahov Signed-off-by: Alexey Malahov Signed-off-by: Serge Semin Cc: Thomas Bogendoerfer Cc: Paul Burton Cc: Ralf Baechle Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-pm@vger.kernel.org Cc: devicetree@vger.kernel.org --- arch/mips/include/asm/mipsregs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 039ebd913f00..165f6318d861 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h @@ -775,7 +775,7 @@ /* MAAR bit definitions */ #define MIPS_MAAR_VH (_U64CAST_(1) << 63) -#define MIPS_MAAR_ADDR ((BIT_ULL(BITS_PER_LONG - 12) - 1) << 12) +#define MIPS_MAAR_ADDR GENMASK_ULL(35, 12) #define MIPS_MAAR_ADDR_SHIFT 12 #define MIPS_MAAR_S (_ULCAST_(1) << 1) #define MIPS_MAAR_VL (_ULCAST_(1) << 0) -- 2.25.1