From patchwork Wed Mar 15 03:03:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 13175244 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D37D0C6FD1D for ; Wed, 15 Mar 2023 03:05:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 95B668E0007; Tue, 14 Mar 2023 23:05:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BE1C8E0001; Tue, 14 Mar 2023 23:05:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6265C8E0007; Tue, 14 Mar 2023 23:05:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 531C38E0001 for ; Tue, 14 Mar 2023 23:05:34 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2603B1208BA for ; Wed, 15 Mar 2023 03:05:34 +0000 (UTC) X-FDA: 80569642188.08.EF30348 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by imf06.hostedemail.com (Postfix) with ESMTP id 5FDF2180005 for ; Wed, 15 Mar 2023 03:05:32 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=gbSrb4xK; spf=pass (imf06.hostedemail.com: domain of palmer@rivosinc.com designates 209.85.216.54 as permitted sender) smtp.mailfrom=palmer@rivosinc.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678849532; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=G7SkdlXoEaWhStocARTpgdbab7cejcOgFmxzTVFGnrs=; b=RIW5wdbKk4NdvLo+pJhh6npRB2zd349Hfn5/zR3I6pwDwfRIoiwpzotJh7r0UXJvFMn/sj T2kXG/bIT9wpSK2GFv21IyuzVc9PKfthVLXFeB1ye7Yhyj4ZDYtup843bdSu2ytTLTbhQb 9SDqHlAVi/tVOwGeRDZoov2bFa4+Xpc= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=gbSrb4xK; spf=pass (imf06.hostedemail.com: domain of palmer@rivosinc.com designates 209.85.216.54 as permitted sender) smtp.mailfrom=palmer@rivosinc.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678849532; a=rsa-sha256; cv=none; b=WhPR4Ey/ViT2hRsilPC+JSvU01jhqcspUoFuWLNQle2lQ5fqvPpkD20w9AtxoUAOecZCh1 hEJJfAvzgbK+F+rUL73nvp/wRcNeosf5ad44F21x4RV4nfg6pgTKtiXUKaoSD7nOKqDrtH 87sw43O+4PRNOIyHjBMEoPeeFeUxwfU= Received: by mail-pj1-f54.google.com with SMTP id j13so1623564pjd.1 for ; Tue, 14 Mar 2023 20:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1678849531; 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=G7SkdlXoEaWhStocARTpgdbab7cejcOgFmxzTVFGnrs=; b=gbSrb4xKWKUDpev+5xTldKtMAFbHj3vLwF3cqvdmErbeXSowCRx3W1Kku5VNtF25hQ JGkCLa2+KeTI18PILqbYkEHjYMXhVfMCNMqgjJpNLqUaCjh9zvONRwuCi/E/YW4FmmML REtcE7XQJ857RwYQlk6ALlq0ZQyrnFYldifPs5Jz+dyuB6eKFWhEduRI01G30w/4EfT1 1Zrdtjd+hz2mImHV62PQNbWSbo7NIeuj61fPS4UZRIH4BIrNvbJhqdFctPR80fXQ8Ma6 7SAbNL/Xuhqf/qhPu11eD9USle9U7StUR3J1PIzOw1/jd6mYdDgvCWR6PHnQYw0mTs8Y uSHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678849531; 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=G7SkdlXoEaWhStocARTpgdbab7cejcOgFmxzTVFGnrs=; b=zxwxoimF7LKESz8luIJ4YhcRZ9XvBsnVSyLQIt2wn5bS1Wd7afXDX+dt04Yz4cESHh RrHvCKGxALYdhhRTYriMuophhybqGFF3u/Nx/yAl42WD60WPNxZDp0BMbeGXLVukIsDW MTmSxRd66ZCiQCsAkXd/mPjKF5NLUXkJUeJM28AyWt8rMCE0MitaEeL9XZwVdEo2Dsd3 Vi+zIsdfTEnLiRG+YRxwmEOGYEEaT9SwcKyI30B/Rg9MdjMsUiFcrX8BFBzN/qOSOK5q yxtPAWEMC16bRDcTGWsVsqep+z7EJ8YDfBR5X5r4nO001hEjbYoCMP4cVr/fsTMHgTHM 2Alg== X-Gm-Message-State: AO0yUKUJYSfQm3aHm1deEbKced1TZWNSFmVrd24fPw5rMoDAnjwBLpbt Kcl4AnxovSVFeUH1r8grW6TwlYfkZPbqSV3x6as= X-Google-Smtp-Source: AK7set/LWO7bSRcbqzHLXpJ39gzf25G0Nz1mn+fYaEHT27G9psc0wa3GwCdvpFZwdrwZQMOaakTGEQ== X-Received: by 2002:a17:90a:f3ca:b0:23d:3a3f:950b with SMTP id ha10-20020a17090af3ca00b0023d3a3f950bmr3857400pjb.22.1678849531021; Tue, 14 Mar 2023 20:05:31 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id h18-20020a63c012000000b0050927cb606asm2185261pgg.13.2023.03.14.20.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 20:05:30 -0700 (PDT) Subject: [PATCH v2 5/6] arm: fault: Convert to VM_FAULT_ARCH_* codes Date: Tue, 14 Mar 2023 20:03:58 -0700 Message-Id: <20230315030359.14162-6-palmer@rivosinc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315030359.14162-1-palmer@rivosinc.com> References: <20230315030359.14162-1-palmer@rivosinc.com> MIME-Version: 1.0 Cc: linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Palmer Dabbelt From: Palmer Dabbelt To: akpm@linux-foundation.org X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: e9bho8jx7zjg7da9pdjijbkx14rezgda X-Rspamd-Queue-Id: 5FDF2180005 X-HE-Tag: 1678849532-801644 X-HE-Meta: U2FsdGVkX1+kmGS1gP4S0q5RlZ2eoR7wSM2vbxOsZpKntJQLrVES5wJ2VYXIJtdVYUV13bmXaQruI+eeW1YR1Qg0iodFrLr+4MH74Fwjm5ANtm+HFy4QKVVtuGFK3LHHC/+6HmW6APgP6QUwz78R8njBX+eyHI1J4eC8BBBPVd3J8BmOHIL+myv+z5mJvsWJeMZtmA4gT9GFjQapgiTKl6KkAU05jgiNws8OG6qPBKhPdvhoW5pCEVYgLBqbkuvP6cXKCrbxaHJTSB/K4EJBusZIjhjqprxJy4jIN5+Ne/2Eu4IB9kArUWlj6GRZ6xTZxaUNfIhEpBR10+bfiCRD9U4R0xzc2PuTH/MHmEcnc49iHk9h2nSsYaK9cV2RpyEnBKRuBXSHh7OqKJM2HMDTe/4PJa16Hg2pYCisARft4rW6rHB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-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: These conflict with VM_FAULT_HINDEX_MASK, so move to some designated arch-specific values. Signed-off-by: Palmer Dabbelt --- arch/arm/mm/fault.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 2418f1efabd8..c57ea332ca97 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -216,8 +216,8 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) } #ifdef CONFIG_MMU -#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 inline bool is_permission_fault(unsigned int fsr) {