From patchwork Sat Dec 3 03:03:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 13063407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E143C4321E for ; Sat, 3 Dec 2022 03:07:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Cc:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hWyxJt9rrrlvTRqUNbYwpcx6mjRC07wzYKTeV1RhPyI=; b=h1HWJLTjB56y+F ztaTL3nRWxFu9i9dLqcpt7+/t9/GDnuchAGXJtwCa1RpybD/EgRQuugkeI+AEEWRRm3aF3I49ZYna iMnSIm+rVVUnTcVitVIhgtrq2iQaj0QSbYXa0nHDLBvknmmtYDv0Q95nfImFnZoZe5kx/MJ4MK3TC Af9wXobkd8G0Xhec6hnWqEdasdt9SsUDhUytxG5w3j4reKyWenXy85nEwJwXxmlqCt111WvVN4pq4 Cq5OAy01PkSZ2pzlifRPp8jWXTpRakbyFBq/aFvy57WD58eWt6rnSUOhWIzkOd2wnDUbdHa+9pDi8 rAw11YKmPsP8Rt38VrVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1IrH-002Axi-6h; Sat, 03 Dec 2022 03:06:31 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1IqZ-002Adj-GD for linux-arm-kernel@lists.infradead.org; Sat, 03 Dec 2022 03:05:49 +0000 Received: by mail-pj1-x1033.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so9974224pjs.4 for ; Fri, 02 Dec 2022 19:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:from:to:cc:subject:date :message-id:reply-to; bh=tSVgH09qEnpbMDCTLASqX2OMVKXLGyPI/rjfeHRIKu4=; b=wrC9Di4g/FkQry/CsUbIzu4ShoQtDm632rHMb1y98183Vkm7GE+1KgGiQeiqPRu746 EpOqc9dOuSYQ+KgbsAL0f0eaO3YxXVARb1Qy/aZlLGx5xT8FJkymkARbubJV3UJhsZIH X0s2m87BWl0Nk7Bcfhw39dO5P0B7WZR3xG8jCR7ylvOfUZJOlQHN0djD0b5b36wlrQxo jgkGiA62CEcQWD//xV7j8pXqM1WcnxGbE2honL5gHULuNRyMkT1dxPj0xOx1vMDLAewW AXdhismtJx65svzL/lahWs98kLQcqmbFwviKntKjqxOCAmGqWokX22ZxG9BANL1F6/V3 RqCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tSVgH09qEnpbMDCTLASqX2OMVKXLGyPI/rjfeHRIKu4=; b=anKb9S7jhkWtC4iG2CEuvgIJibQsmJzL3AXGx4Fm9Nmv21ImExikr/sdfShn35DpQo kU0sD1ZNGt4pAUL1wq96EhE1Ucx6CiWGNUXBmSjpZJlApUAAZMA9TkLrfWySePL7gby5 9+XK7bFp3BSgVLpyMhvOhELc/v6P38iY3j06rwRf3rD5l+jTeV7HRjD7Ztpzs3iCSzfc GueSsNxBRcJkFGrQ1XaYf9ujWTf64aihZPRYLWchNOcUrSSovOiGqQOu0wrzNUrblYyT mZGU0Hl3KoUtUAoLeBGsnzKiL3d+8JsTcBOpCwcZaSxTdl0cBjN4BEC5tC3HhAsu5DlC odNw== X-Gm-Message-State: ANoB5pkFbsq72nGzSjKMv0xyVuCq0xvSq3nYmNDH8y2eArdhKd93krwF IITHkNZiOECRtF448oBCz4CqWg== X-Google-Smtp-Source: AA0mqf4XSUxHT34o8cfUz81MqLg2uR3iZhKmjmdLNRSRwmN3btpX4jv5Kh1mNew10ARt+0Rl1idwLg== X-Received: by 2002:a17:90a:2b88:b0:219:a1e4:20e2 with SMTP id u8-20020a17090a2b8800b00219a1e420e2mr2146067pjd.182.1670036747139; Fri, 02 Dec 2022 19:05:47 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id z27-20020aa7949b000000b00575fbe1cf31sm4894634pfk.67.2022.12.02.19.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 19:05:46 -0800 (PST) Subject: [PATCH 5/5] RISC-V: fault: Convert to VM_FAULT_ARCH_* codes Date: Fri, 2 Dec 2022 19:03:56 -0800 Message-Id: <20221203030356.3917-6-palmer@rivosinc.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221203030356.3917-1-palmer@rivosinc.com> References: <20221203030356.3917-1-palmer@rivosinc.com> MIME-Version: 1.0 Cc: Palmer Dabbelt From: Palmer Dabbelt To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221202_190547_601202_46D37AB0 X-CRM114-Status: GOOD ( 10.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These conflict with VM_FAULT_HINDEX_MASK, so move to some designated arch-specific values. Signed-off-by: Palmer Dabbelt --- arch/riscv/mm/fault.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c index 3fdc2eebdd36..bd990735aa90 100644 --- a/arch/riscv/mm/fault.c +++ b/arch/riscv/mm/fault.c @@ -202,8 +202,8 @@ static inline bool access_error(unsigned long cause, struct vm_area_struct *vma) return false; } -#define VM_FAULT_BADMAP ((__force vm_fault_t)0x010000) -#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x020000) +#define VM_FAULT_BADMAP VM_FAULT_ARCH_0 +#define VM_FAULT_BADACCESS VM_FAULT_ARCH_1 static vm_fault_t __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int mm_flags, struct pt_regs *regs)