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: 13129157 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 4003AC636CD for ; Sun, 5 Feb 2023 23:18:35 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FEOK67PzOO53KVzmXvkc5b59vE2e1Ofc/iPeM0/5h/Y=; b=SI5YS11Gh85x3i Y79lu0Ge2LRWviqSsdDZpqT7IodzH0FQ40cDZRBWs7ReEW/UPlcql42M9D7kKZ0wdR113WhxW2f52 zee5j8VPhKbimwguk1N49VhS9EfLEmVo3TSXBACXEe7zYst2nrSbP5IFy4UVXtiPq2JdBBWGQzf14 kQMe98fFYyrseI63nrRDJHXx1odOBWmJMNxsGoI41m74cHb4zdqLWZq/uRfu+1W2g2jGLpG1z2NPz 1QuyIOx2Yt1CZKGuAmQ4feNaYi9R/BWUIki+6tg82tDUfQLbF+FYazjo/tYji65R9x0EC4RAZ6/Gd 6IR3SPXGAfHDkqNsjjWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOoGS-006xoj-2d; Sun, 05 Feb 2023 23:17:40 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOoG4-006xip-7T for linux-arm-kernel@lists.infradead.org; Sun, 05 Feb 2023 23:17:17 +0000 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-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-486-CFOsgRXpN06dr_156bxIhA-1; Sun, 05 Feb 2023 18:17:12 -0500 X-MC-Unique: CFOsgRXpN06dr_156bxIhA-1 Received: by mail-qt1-f200.google.com with SMTP id s4-20020ac85284000000b003b849aa2cd6so5518924qtn.15 for ; Sun, 05 Feb 2023 15:17:12 -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=tiva3OHQb3LE3RoEHvef7fstJ2g3d5mV51L0ZFHX9wtcB8GCAnQWxFwii7B7HbgJ6x 4FY5oHT3KywpRQaZ5oz1rrKxryHjDPWDPJ5/eUbO2ME6aDbizXs4LUiGFI7FHyfwBBOA NNAirirr62mcNC3w9Amp4kev6UB+yrXcHO3JoZzKNyiNtxzW694jM61qDdmWLk2z5y7M rggjZ7eEzigwn4P+mA6n0fy0c5hEHQMQz1BoKL5t/JgWs0CxUxcW29kbwQDjvCXT9B51 dT6zViyq2WU1DSVxn2QNKV0SYNhP11psoEUCJdQrhnFtavtSOT+YsGlyyrUiQ6wdntAn ULAg== X-Gm-Message-State: AO0yUKXxnAhxWAjRpDHMoAPHrp0VQTbkJ0BEEGsivt/2WOHLYUQATc49 AkzRHBTSwIJRu7OzyoNtlRYIcqPioD8zNdnVpB3Eq1zwOtFR8QxFLPhG7wLygq2U6id0WOHJGwo XHqbEr0hRcJJKUNUO4UovrCbXVMITT7YKCCU= X-Received: by 2002:ac8:5a0c:0:b0:3b5:87db:f979 with SMTP id n12-20020ac85a0c000000b003b587dbf979mr36968149qta.5.1675639032210; 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230205_151716_357141_6A4CD43D X-CRM114-Status: GOOD ( 11.38 ) 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 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,