From patchwork Sun Feb 5 23:17:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13129153 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 4DECBC636CD for ; Sun, 5 Feb 2023 23:17:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CEC556B0075; Sun, 5 Feb 2023 18:17:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD75C6B0078; Sun, 5 Feb 2023 18:17:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A02CD6B007B; Sun, 5 Feb 2023 18:17:18 -0500 (EST) 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 90DD96B0075 for ; Sun, 5 Feb 2023 18:17:18 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 5A3031A06B7 for ; Sun, 5 Feb 2023 23:17:18 +0000 (UTC) X-FDA: 80434801356.26.D5C321E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 53D9F4000C for ; Sun, 5 Feb 2023 23:17:15 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BnZ5x526; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf04.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675639035; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=O+iHbljQE4cWri51QLXa4Xz+3mOqMYYEFGlGW+CbZSY=; b=gnhvfYlRf1y8twZb6SfipXi6NKrRWo27D/GNActdYdseOyG6P/a9UJaAf8meDN4gEvbjAI xDjLdbQn1JDEOcayI0kUetRZCR7vK9rmG18jZygukBQw1yHSiL2/cytCAT36hECT5/9oG0 ibr56h9ufMxVSbVkFdDXtHEWYMjN2ec= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BnZ5x526; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf04.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675639035; a=rsa-sha256; cv=none; b=RcMNWXRYMsig57j7kzBu4RW5TbPIdYNodfWO9bKuW45qa5LLHJI/Aa9jSCGjslWUtaLH5m mQxJ8n9bhtGAO8RJP/5EwFJSbpTN4/Q6/d5JrKPTGrpmm7rEUAGtiZyuvT3HiwkhufXuMl 3vS4NaIj8+Jm0S8hIsOmYjnxfQkD2t8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675639034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O+iHbljQE4cWri51QLXa4Xz+3mOqMYYEFGlGW+CbZSY=; b=BnZ5x526thPMdD+/OkBDbyNUxwpiiXO+sLKB3yBXbDKjZQMkWOIRDisrfmklfbsldtOSy7 qqVFTyVNtNOlqc95C4cgeKpUo00QAkUK5GtRAVM4d0TmZPJEqDd1xD5WjH7nMWsugFDh18 s0l8Oi5yDXnWz6kB52bwvC3hjdAyGJA= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-586-XYExpcAMNjuiVE_-l_1aUQ-1; Sun, 05 Feb 2023 18:17:13 -0500 X-MC-Unique: XYExpcAMNjuiVE_-l_1aUQ-1 Received: by mail-qv1-f69.google.com with SMTP id f3-20020a05621400c300b0056bf4f80209so538778qvs.15 for ; Sun, 05 Feb 2023 15:17:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O+iHbljQE4cWri51QLXa4Xz+3mOqMYYEFGlGW+CbZSY=; b=SeMD0xWqrsWHVu7fWTBwMYT5KLinPdFAR5qwcehvmVGPTzIP/OYetQnFGrDxX26hX8 bV1sL70wHI2PhgTvGWisbuCwpx8mHEZcdtwkHAYUguFSeGJrSDZ/mZmPTSF77NjGc+Rk qVoNi2dxkxPcS2qtz+NJoKKNez/BjDS35m1G2O1f493clKB3VrCbZciwQarUpkBdrZy1 760Nf3X7ic5tahW6TRvpwmAsH0amnqjQuKS3BW6KrF2PAcO4m+3h1IS4F/u1V9qQuo5+ O/hjVOrvcIiBn7Uhq+aJdy5iUya1BpbtxfeG5rgZ45N+l1erAGexG0cG2Mi8MI0hxLe6 usSA== X-Gm-Message-State: AO0yUKWi0h1ASYzbaIYoowW9sI9t3I/0RUk5jSnC7xJh46zeZ12u59ox l6QS6E1HcWEXm/07zHfl9foITX7eaPdyxogQ6J+bx8zQxPXxQXqGBpuPvkAbenwWpnkAT270MVj ZOlLYYHwEE3O0u65s8hLIiNktQEBH87N3GYfYhB+VxV1dHbAAxKWN0teIA6as X-Received: by 2002:ac8:5a0c:0:b0:3b5:87db:f979 with SMTP id n12-20020ac85a0c000000b003b587dbf979mr36968158qta.5.1675639032259; Sun, 05 Feb 2023 15:17:12 -0800 (PST) X-Google-Smtp-Source: AK7set8/HJ9ylfEnCGuGjHiBabf9O5KRa6hhSOUhT6sDqtmC260VVR8y98Nl2i/0VhE4BCc93ILrBA== X-Received: by 2002:ac8:5a0c:0:b0:3b5:87db:f979 with SMTP id n12-20020ac85a0c000000b003b587dbf979mr36968130qta.5.1675639031977; Sun, 05 Feb 2023 15:17:11 -0800 (PST) Received: from x1n.redhat.com (bras-base-aurron9127w-grc-56-70-30-145-63.dsl.bell.ca. [70.30.145.63]) by smtp.gmail.com with ESMTPSA id h26-20020ac8515a000000b003b82cb8748dsm5986545qtn.96.2023.02.05.15.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 15:17:10 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org Subject: [PATCH 3/3] mm/s390: Define private VM_FAULT_* reasons from top bits Date: Sun, 5 Feb 2023 18:17:04 -0500 Message-Id: <20230205231704.909536-4-peterx@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20230205231704.909536-1-peterx@redhat.com> References: <20230205231704.909536-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 53D9F4000C X-Stat-Signature: nktygk79ppbirixfqyocy1waids3qgk3 X-HE-Tag: 1675639035-568716 X-HE-Meta: U2FsdGVkX1863x00+SYb+2k7jbizjZELjhLsCkIArDND9dubE751hWfw1SWEvP+5H7Dc3DdlDuvPQgPiLKhQ6CH65/t2ByfSsKjDZTftvJk392c09mb64MkbvfkXd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EF4SeLE2NwrK9FQDdyK7QPBnahuHDvBonV91F2PN8JiGARjCzdfuvklst8PIcyKSmLlFWGrwMwjEHcvouR2eUlcjJMBDf9PMb0Y/od9lzxIJs5gZLf1R44SB6YbmbZTbqvurfS9syhNW2P/CtIMq4L21NEsem+nuLP4hyzdpTZCOtdTV+IfwbQuhZc+5CjBcov+7V94zjUXcFzK/RSSLQqKuC X-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: The current definition already collapse with the generic definition of vm_fault_reason. Move the private definitions to allocate bits from the top of uint so they won't collapse anymore. Signed-off-by: Peter Xu --- arch/s390/mm/fault.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 9649d9382e0a..cebfbd6dcbaf 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -46,11 +46,15 @@ #define __SUBCODE_MASK 0x0600 #define __PF_RES_FIELD 0x8000000000000000ULL -#define VM_FAULT_BADCONTEXT ((__force vm_fault_t) 0x010000) -#define VM_FAULT_BADMAP ((__force vm_fault_t) 0x020000) -#define VM_FAULT_BADACCESS ((__force vm_fault_t) 0x040000) -#define VM_FAULT_SIGNAL ((__force vm_fault_t) 0x080000) -#define VM_FAULT_PFAULT ((__force vm_fault_t) 0x100000) +/* + * Allocate private vm_fault_reason from top. Please make sure it won't + * collide with vm_fault_reason. + */ +#define VM_FAULT_BADCONTEXT ((__force vm_fault_t) 0x80000000) +#define VM_FAULT_BADMAP ((__force vm_fault_t) 0x40000000) +#define VM_FAULT_BADACCESS ((__force vm_fault_t) 0x20000000) +#define VM_FAULT_SIGNAL ((__force vm_fault_t) 0x10000000) +#define VM_FAULT_PFAULT ((__force vm_fault_t) 0x8000000) enum fault_type { KERNEL_FAULT,