Message ID | 20230205231704.909536-3-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 61FD0C636CC for <linux-mm@archiver.kernel.org>; Sun, 5 Feb 2023 23:17:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E71036B0073; Sun, 5 Feb 2023 18:17:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF9696B0074; Sun, 5 Feb 2023 18:17:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA4266B0075; Sun, 5 Feb 2023 18:17:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id BC9586B0073 for <linux-mm@kvack.org>; Sun, 5 Feb 2023 18:17:15 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 94340160815 for <linux-mm@kvack.org>; Sun, 5 Feb 2023 23:17:15 +0000 (UTC) X-FDA: 80434801230.08.409FD24 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf01.hostedemail.com (Postfix) with ESMTP id 860C740008 for <linux-mm@kvack.org>; Sun, 5 Feb 2023 23:17:13 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WWeIPSRE; spf=pass (imf01.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.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=1675639033; 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=P5/Ww/5/bhqPqutkGRybIHLtU9jqdfakTNy4g0j2iQk=; b=8RrEd1YrNGdYnV0slYZtPIkqJCvjjuPM3Rotk0t/TB1Hrfc0olK6sW5qaTXf/WGeLNZhPL rYlCjVWiyoX3LIvrj7eHmtOVr/PMbSfWiwZqp9Ndz3/GoP5re+hvizW9DbUs3YjDlBbEeN 3bHJO3ZBDkyu9oNJsdT/a7s9x6aupzs= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WWeIPSRE; spf=pass (imf01.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.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=1675639033; a=rsa-sha256; cv=none; b=cqRm4WtV2LyVhMIs34+9GUmfubFPSf5cipWy5XYMrl/h3ORoTPO66etwtn/0Kdm7WrQgit Ij05D3FFABYHA1MJunLbvqjU9Yi7PfM8cXKdWiHJmuH0nxuYIgPwYPzYMCrV/Fj6vMieNA iEmCV6ekBMsc1IKvyFCs8wjt15PuUeo= 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=P5/Ww/5/bhqPqutkGRybIHLtU9jqdfakTNy4g0j2iQk=; b=WWeIPSREVQm/CT1nP1WJ6QCFhcW4UYbfB+d/BVU+Uozmyt03ZngwdXKyCt11wLjagHWrvU adfPg+yojRgBl9RdZUIcosSG7YWApO9l/J73LuRZql2XqbbML1z0FGZg/8qgmdXXKcsJwK NExNpIPn1/0es0BSsrbQgIZ7XpYk/o0= 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-322-mixK13z_Nb-WTCp8_bYAmw-1; Sun, 05 Feb 2023 18:17:11 -0500 X-MC-Unique: mixK13z_Nb-WTCp8_bYAmw-1 Received: by mail-qv1-f71.google.com with SMTP id w2-20020a0cc702000000b0055c8ef137ddso5089687qvi.0 for <linux-mm@kvack.org>; Sun, 05 Feb 2023 15:17:11 -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=P5/Ww/5/bhqPqutkGRybIHLtU9jqdfakTNy4g0j2iQk=; b=rcH4xMYtjQQ3xlkcsBknoDfcPLPdiaIGiBbZ+S4Z9sHWQzFZkiZVbCNA26WARIli2b +zW8Vl+1tttXN564UR1Z2lq/Rqn7xWJugTU4yUFp8yvJ08GWfVx9tArM8RpO9r8TT/kq wgJHeNDhkFblMY8IPeevS97/lZ6JQcYUIGgeoNkGh0sPizwIjzfiSD5KrPsMJ85aMykD a0HiU+bOA0tpBn5bv5cRXo+UgHbl1H3nfdv3Ar0MecDLg72hPgTVgCoCzcSLjdcLivS7 nZ+Az3k77tUpnEycI9plOESASxNuE3KTOntKx5wRTovosolH6XtJu49+uROIeqQlyueO IPEA== X-Gm-Message-State: AO0yUKUV0K6GdAR85l5XVroTKq+PwgcYBvWDnP7QUvSZ/xWUhuXyQOKN 3b0Mue4xvfop2oEcvcMdSZaTPmFjCXN3GwCPVH2VR4RTVULz7CXoW6/N18UCAp9AvQzoZsOZDkL HkDtjnf3R+gGlmsm5hP4sT2jo0Xy9Xfpfljc4hbZf8w/UYWLqKaZHagmqc4Y9 X-Received: by 2002:ac8:5813:0:b0:3b9:a4d4:7f37 with SMTP id g19-20020ac85813000000b003b9a4d47f37mr37363498qtg.3.1675639030635; Sun, 05 Feb 2023 15:17:10 -0800 (PST) X-Google-Smtp-Source: AK7set8mrnK+ikirixTmDtvR78/fRtminiJLSrpX/G80o7vhvBjyiJhn1+xWU/af4TGpWMpz/q/ScQ== X-Received: by 2002:ac8:5813:0:b0:3b9:a4d4:7f37 with SMTP id g19-20020ac85813000000b003b9a4d47f37mr37363454qtg.3.1675639030152; Sun, 05 Feb 2023 15:17:10 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 15:17:09 -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 2/3] mm/arm64: Define private VM_FAULT_* reasons from top bits Date: Sun, 5 Feb 2023 18:17:03 -0500 Message-Id: <20230205231704.909536-3-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-Stat-Signature: aozzepxttorxap63jne9n8kp6sok8azp X-Rspam-User: X-Rspamd-Queue-Id: 860C740008 X-Rspamd-Server: rspam06 X-HE-Tag: 1675639033-349363 X-HE-Meta: U2FsdGVkX19b4v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ZoAgQNNYPF6OWgVXoZW680B/wwr6HowSJwZGqfz270ooartgwGVXRgPHnhnC7OUGa4stx8+c+fRRTV57Kc0UMQyXTAGQLw1JDcedG+FJi4wTmlaea2O6DqBokx1CAcBXgl3TSEqKswWIZ4Woyn6bG4efl5ChcRubMO3xRD59o7ffjLqmWM2hqcp9d/70CGghM3ioSsn+4k6lSN80FZCGPHQhE91tyYW1VYNesybzx32zcMy6RYNXy3xUpPh/woxYwqYea/Qo4WT58mOziKLjhrJdCMbpqn0tMOnIMny3dEOXyh7FG3jeZ0lDjsVXgAh0dUdRGzdJViXuiR64/kDgjp3LDe7 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/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 596f46dabe4e..44fd16f58f94 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -480,8 +480,12 @@ static void do_bad_area(unsigned long far, unsigned long esr, } } -#define VM_FAULT_BADMAP 0x010000 -#define VM_FAULT_BADACCESS 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 vm_fault_t __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int mm_flags, unsigned long vm_flags,
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/arm64/mm/fault.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)