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: 13175247 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 C53E0C6FD1D for ; Wed, 15 Mar 2023 03:06:38 +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=S22oN13QK+jt6krOtPISGo/XGM0IJJqGkbaO8WG3dhw=; b=EU7NX8a6MeqO7E YQ6mLkapd75xgRxbSYX3Om6Jk7P0tae1EmTAiQNz5O/p87YyB42FFugTsdv2LIZoLH3ovZbm/MCYV qZftFvW3tjenhGno1ptxxSuMSVlhn3Bbt/1trCt3105Zk9GRv/BMp1nc1foEiL6yqxE8rb94IVWzS IuaNt+A7SO1TAmPMX/xo6bu9YZIrsGDPxotEgry9/puDQXqfkT0s3eH9029vFSGT4KuooT9qLTCah 1S6qJWoQJuA05rhQ7rc1kEr8SPQYiKq0e0nbQFSgb0tEnMTqgQtdYyIPimJWS4G+Wn37ZzJM9iRAc r0hl648KOmlgc8VuYCjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcHSY-00C6q2-2S; Wed, 15 Mar 2023 03:05:50 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcHSI-00C6j0-01 for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 03:05:36 +0000 Received: by mail-pl1-x631.google.com with SMTP id i5so18654299pla.2 for ; Tue, 14 Mar 2023 20:05:31 -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=cMJIx5PasKzhTDpiO7BKzT8SvA9fNl/nccyuxxiEKfkX2c+kvNnfQuVvLeLvlm8N0h g8Av9mDBNsQoaES90bTa21h4O5bmD2PVTtjfZcnCI/7iTxISG09AaI0piVMSTuWNjDmb OhU3CcgSogy5RumxzSKsqU2oMnAXuC5unhWMnHMDXwMCevFjcBGX1es7XPD+CPw5oaFM EYRQ/e2OVfU1MDjx+YSMQOXgsuyFByIHjNOPqFCkWBlFkJCt1yX8HWdxcYZuiJGUPUv5 r7AYq1gEao4oCGUdNcciaN2spkmsgLjBTyyegTv0OWHWR6pEHK9ftdwBZ3eEUkajgo9O S56Q== X-Gm-Message-State: AO0yUKVcLMDacmfh7QEQYVEab2wfrLiedUZa7AL/dMvIoXbl2FYSwKc7 M+CiGUpmoFt3ug/6/Oz0XruHkQ== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_200534_048347_AD5E218B X-CRM114-Status: GOOD ( 11.43 ) 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/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) {