Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3011741rwb; Fri, 2 Dec 2022 19:58:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf57XgHT3S6nC97xg6Z2tYjXLvcOw/dJXSHlZhGA0hIwjGbIC7UaSkh/9yjjipwwoXPD3cy3 X-Received: by 2002:a17:906:3897:b0:7c0:911e:199a with SMTP id q23-20020a170906389700b007c0911e199amr14770284ejd.689.1670039892475; Fri, 02 Dec 2022 19:58:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670039892; cv=none; d=google.com; s=arc-20160816; b=BAQbwyHGpFdkaSWv3o0MffEtZ+ha6yhRI08biYAgRcvazBsR9kpwBD71n8q+n/f3bQ Y2U9hKiRZuEHdcqHoUTrkOuLufBTFB36BUEzI+MBjEpB2UkiLeq3hV82Z/YeSqBzVD+G /pUvKq1XeB1YZ+ihWbpX1i/QeHmNxzBrFZ3AM0QG+0X9YfWm8pQOLfvnF9ockNlXjqD7 fqPta+tpfy4I+YLfSo7eMSaFqDqvnlmmodU5ybq5C0+9na7cSyTchjVmgZADb7TNSqrT fvhFvoB+PZJgG/CimGJwIF8zZZ4jPWfvcs15KM2Y36QUwNoL1wVeBAzwb35t14DbRVVj B3/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:cc:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject :dkim-signature; bh=oUHGCrN2/GzmAYwHPUyKBA8Ge6xsvUhA3e+Vb+bqY68=; b=L1BRlX85zRiQnZYauBlTuwerbBZu0oWBOy72NrvivfMJMkXWULb2XpeHnrUCZfPBX3 ow6OnNXLOj6q9LKHWLZNDQ2YeMSau+L1HiOcDUAKbJwIokglsVl8s717DpBrR6FVlWD8 p2dK8hbB+IvlMiLVXkLw+vMBaxzIW1fl22oDbuheJxXQVgLvz5T7/2qaEbJ6h7p1+85n C/OmszQoVf4o/APrd99QjWcweoC7y4h0nPUu8X8uIbHnSx7mTIb2j1Eb1bK3RjxC+Hpq 4cD8NEpnX8ceOao5oQtfkSneOC6Cdr0McOCoc+UDwOZYSrYLjrK0vm3DBwS2Ln0JrBTK 7NGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=GTPXNM4I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz18-20020a1709077d9200b007bf5128a8ecsi7170431ejc.466.2022.12.02.19.57.42; Fri, 02 Dec 2022 19:58:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=GTPXNM4I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232004AbiLCDFv (ORCPT + 82 others); Fri, 2 Dec 2022 22:05:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230483AbiLCDFp (ORCPT ); Fri, 2 Dec 2022 22:05:45 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75EE4F4EA3 for ; Fri, 2 Dec 2022 19:05:44 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id b11so6586248pjp.2 for ; Fri, 02 Dec 2022 19:05:44 -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=oUHGCrN2/GzmAYwHPUyKBA8Ge6xsvUhA3e+Vb+bqY68=; b=GTPXNM4I8XSeRWKFJbfehEVG870eOYMF/pKY9yMWeVjzuXAmyGPMV5Nuhgkd2Rpezc s+BSs8uV7IDAeaosxWjvuIEHbnwRyildLgIAk88UrLwNCF86OOw+gvsvp87gvdO7j5yY khg7Alr0W4R4/KHofpJ9D+lLwLem7Qb0wpi6ArvXA+llBKDEm0aE2tH//UDUW/zvNNNy gfVSZqmFmW+aoOXgq4s35qIFSAZ9WmYlvLQAEJEUCLULeQimBikv4W8YGE42LNgyHFBS veDXzJC3LeHh7Nnv4F5UhC6Q9SyzW2T+bBN93Ioth3DJNcJNlGBAnbsRy+dlZx3PTjOZ 6m8g== 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=oUHGCrN2/GzmAYwHPUyKBA8Ge6xsvUhA3e+Vb+bqY68=; b=bQPq/X5HZ4g1ishzuC9sXBOYLAwhZPSxDmZohAorpM3yYuDLijRJKlOLqzITzyL/ye 960cC+sptE08o63cWt9SiGs3PQlH2m/AeS1OZeGSAWU9PFUJQ6IAFDmV8GyLdT5l1mhX h8K74eW6FB9hLGldw+YqNkiIG4hOuv+clTZgEblLxr/HG3xCJmNOovsPHqZO/8E2Z5n2 A8m1RJBV6bijz9peBlt6LJNEBtevITpge7y9gcGkVi7V23797QfM2+AlwdzNFuxp9hEI 7eEXvd4tGsGsvP8cLg8+5fK8BhL5D9NtS5HxT87bybWaIz3Uw6dFYUf1nuidVwheIThc WvKg== X-Gm-Message-State: ANoB5pmTn2rNZ682OSV/NZi6XZNWY+uzZLVmc+jE7pbbzJDt0+PWz3an jKVYVBLGTI0vq/9COoRN/LrJwA== X-Received: by 2002:a17:90b:609:b0:219:3ad9:64f5 with SMTP id gb9-20020a17090b060900b002193ad964f5mr29166277pjb.138.1670036743958; Fri, 02 Dec 2022 19:05:43 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id b2-20020a62a102000000b005745635c5b5sm5713256pff.183.2022.12.02.19.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 19:05:43 -0800 (PST) Subject: [PATCH 2/5] mm: Add VM_FAULT_ARCH_* codes Date: Fri, 2 Dec 2022 19:03:53 -0800 Message-Id: <20221203030356.3917-3-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 Content-Transfer-Encoding: 8bit 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A handful of architectures (arm, s390, and soon RISC-V) define their own internal fault codes, so instead dedicate a few standard codes as being architecture-specific to avoid conflicts. Signed-off-by: Palmer Dabbelt --- include/linux/mm_types.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 758eb70829cb..df1aa8d58444 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -880,6 +880,11 @@ enum vm_fault_reason { VM_FAULT_NEEDDSYNC = (__force vm_fault_t)0x0002000, VM_FAULT_COMPLETED = (__force vm_fault_t)0x0004000, VM_FAULT_HINDEX_MASK = (__force vm_fault_t)0x00f0000, + VM_FAULT_ARCH_0 = (__force vm_fault_t)0x0100000, + VM_FAULT_ARCH_1 = (__force vm_fault_t)0x0200000, + VM_FAULT_ARCH_2 = (__force vm_fault_t)0x0400000, + VM_FAULT_ARCH_3 = (__force vm_fault_t)0x0800000, + VM_FAULT_ARCH_4 = (__force vm_fault_t)0x1000000, }; /* Encode hstate index for a hwpoisoned large page */ @@ -903,7 +908,12 @@ enum vm_fault_reason { { VM_FAULT_RETRY, "RETRY" }, \ { VM_FAULT_FALLBACK, "FALLBACK" }, \ { VM_FAULT_DONE_COW, "DONE_COW" }, \ - { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" } + { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" }, \ + { VM_FAULT_ARCH_0, "ARCH_0" }, \ + { VM_FAULT_ARCH_1, "ARCH_1" }, \ + { VM_FAULT_ARCH_2, "ARCH_2" }, \ + { VM_FAULT_ARCH_3, "ARCH_3" }, \ + { VM_FAULT_ARCH_4, "ARCH_4" }, \ struct vm_special_mapping { const char *name; /* The name, e.g. "[vdso]". */ -- 2.38.1