Message ID | 20230205231704.909536-2-peterx@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 831EFC636D4 for <linux-mm@archiver.kernel.org>; Sun, 5 Feb 2023 23:17:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 179F66B0074; Sun, 5 Feb 2023 18:17:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DC606B0075; Sun, 5 Feb 2023 18:17:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E97876B0078; Sun, 5 Feb 2023 18:17:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D7B266B0074 for <linux-mm@kvack.org>; Sun, 5 Feb 2023 18:17:16 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9E7F7804AE for <linux-mm@kvack.org>; Sun, 5 Feb 2023 23:17:16 +0000 (UTC) X-FDA: 80434801272.07.218064B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf26.hostedemail.com (Postfix) with ESMTP id 91964140006 for <linux-mm@kvack.org>; Sun, 5 Feb 2023 23:17:12 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PlWOmyK0; spf=pass (imf26.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675639032; a=rsa-sha256; cv=none; b=zWO8+a2p9k+Fpuoag0fze6MBGO1LOvrd0gdtYRyqRFiedJh5+BhD4N5gBJe31fNFXDL99X Hcx+twlf852/dBihEsGsHdI5uMEZwLxCxxRdJ/m8X6xCCaFP96HqCgVTQIOSERzZxv3gUT LDTVRkT32mD01j2UcQDRN6iEQ9CE30s= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PlWOmyK0; spf=pass (imf26.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675639032; 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=qONcW0u0rSlhga0NbKyxqeLooMqDqXOYmnEPrTgV3J4=; b=3xrztXOv6YQohp0SL10m7/586f7GpWODWPyw+T1U4CAWWFX/NVLzuUDLR0hiagV5Rx0+fj 8KcHRg+o2WUeMcq/2DwqOQHArJfs2Modxn4o2Rr7Y54NcQWKAxoWrnMdtalJPfKPRhTLdN mKOB4I9xJW7Sjp8gPin7JNckHI7ehk4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675639032; 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=qONcW0u0rSlhga0NbKyxqeLooMqDqXOYmnEPrTgV3J4=; b=PlWOmyK0IHVDGeFyts3EgHqNZJk12ceVSmqxIXPsoCuLQ7Xtauo6Tsrgi6rAPJtbiY7qWO T3y56QXXPHBnPTdMMJu97N/wBHskpslxdGSzvcTZrr1PBzTT42IYBt++GNTsRMrcX9fTqA dp0Ka0NR//8+gaNcLNCTLDvAujNjjdI= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-271-EJkMh3fhP2223NBGZpXjAw-1; Sun, 05 Feb 2023 18:17:09 -0500 X-MC-Unique: EJkMh3fhP2223NBGZpXjAw-1 Received: by mail-qv1-f71.google.com with SMTP id gw11-20020a0562140f0b00b0053b81ec39dfso5114282qvb.14 for <linux-mm@kvack.org>; Sun, 05 Feb 2023 15:17:09 -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=qONcW0u0rSlhga0NbKyxqeLooMqDqXOYmnEPrTgV3J4=; b=ncEHkAqMgK88Ran00yp3YY966ne8sWsXiUkWib679j3QT+JZ7Zj2+TaDcVH+wLwWa1 jTZY19pRIvAn8uHNsUi5entyRkHypeCxCRi6B06CaSFslfD92Cv/AnEYcEsC9S6Ub3L2 X+0CwZAHDTBKJfX807z/KVln32ePv570NXLETPk12Fsg9ErpFmmK6nkHvLq5W+LcjLUJ tTv8zGS7sIHiipY6JvkQVWUobUPiymvpPyEc5SEqiet78/KbFp2xqiVUlIEBcuPsdmUp 10ObdN6aediOp8Vcvv4hEkYUVvLKn8WRh93LtTb3D7WntGnmclbfpyD9tZodbvbT/UVz 6QTA== X-Gm-Message-State: AO0yUKUG/7mNKs6JU/tJOOqWj+T0waaBw03mrJyCvuco+ONXcjQmSqSd /CV8oCKRMR+PySEeaqPpx2W2GDA4ywNgoCqU35VK69cn6dUg7S6uys+f9UncbwayK4i19alVpmI FAyYKD5PCQmZKgDVFKu0cUswBw5Hw5ePRE2BckzQYfOOIk+vlW7jfb3zqVofU X-Received: by 2002:ac8:5a0c:0:b0:3b5:87db:f979 with SMTP id n12-20020ac85a0c000000b003b587dbf979mr36967900qta.5.1675639028704; Sun, 05 Feb 2023 15:17:08 -0800 (PST) X-Google-Smtp-Source: AK7set9kqgEL6o3t7eGoOILoA6rSeOClso5mcvRwdEtgXNoCUXmYbAoESbFf+GAMsxjDlz50rZUFyQ== X-Received: by 2002:ac8:5a0c:0:b0:3b5:87db:f979 with SMTP id n12-20020ac85a0c000000b003b587dbf979mr36967876qta.5.1675639028460; Sun, 05 Feb 2023 15:17:08 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 15:17:07 -0800 (PST) From: Peter Xu <peterx@redhat.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Andrew Morton <akpm@linux-foundation.org>, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org Subject: [PATCH 1/3] mm/arm: Define private VM_FAULT_* reasons from top bits Date: Sun, 5 Feb 2023 18:17:02 -0500 Message-Id: <20230205231704.909536-2-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Rspam-User: X-Rspamd-Queue-Id: 91964140006 X-Rspamd-Server: rspam01 X-Stat-Signature: js9d34ipdstpwwpzkja5uxctddear6kk X-HE-Tag: 1675639032-799772 X-HE-Meta: U2FsdGVkX1/y5uA6PljS/eBNK6YIcrS5TwyWbIc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35GvTxTGTWaZMjaNXtY8mcMGQh4c5mTPRjLAsEB4da6hxaflhGVt14EBksdkxnU2a0DaWahMvf8fWukuJxDZrlNfqa1AsvYqFBWNI2TRWc6CboLM/ASotmzmV0xmXCjtlgfZiOwm/8k5jgE3qI9zJxpbULjrcw3PhNyGYnm8stF3Kdp2+JZXHy9Fy844P0POfdp/wc2gEzVvjrY5VlUyr3tvUo/jwva6IhippqKZzDWa78Br36+gMV7m35iOV3/RgsvleAKd17TnHPTcwiSEX1ufNIjPG78t0QUU+neYH0r82vafvzD/jBZpnw960uVIHiM4ub 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: <linux-mm.kvack.org> |
Series |
mm/arch: Fix a few collide definition on private use of VM_FAULT_*
|
expand
|
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 2418f1efabd8..67879d995835 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -216,8 +216,12 @@ 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) +/* + * Allocate private vm_fault_reason from top. Please make sure it won't + * collide with vm_fault_reason. + */ +#define VM_FAULT_BADMAP ((__force vm_fault_t)0x80000000) +#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x40000000) static inline bool is_permission_fault(unsigned int fsr) {
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 <peterx@redhat.com> --- arch/arm/mm/fault.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)