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 [thread overview] Message-ID: <20230205231704.909536-3-peterx@redhat.com> (raw) In-Reply-To: <20230205231704.909536-1-peterx@redhat.com> 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(-) 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, -- 2.37.3
WARNING: multiple messages have this Message-ID (diff)
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 [thread overview] Message-ID: <20230205231704.909536-3-peterx@redhat.com> (raw) In-Reply-To: <20230205231704.909536-1-peterx@redhat.com> 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(-) 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, -- 2.37.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-05 23:18 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-05 23:17 [PATCH 0/3] mm/arch: Fix a few collide definition on private use of VM_FAULT_* Peter Xu 2023-02-05 23:17 ` Peter Xu 2023-02-05 23:17 ` [PATCH 1/3] mm/arm: Define private VM_FAULT_* reasons from top bits Peter Xu 2023-02-05 23:17 ` Peter Xu 2023-02-05 23:17 ` Peter Xu [this message] 2023-02-05 23:17 ` [PATCH 2/3] mm/arm64: " Peter Xu 2023-02-05 23:17 ` [PATCH 3/3] mm/s390: " Peter Xu 2023-02-05 23:17 ` Peter Xu 2023-02-09 20:10 ` Heiko Carstens 2023-02-09 20:10 ` Heiko Carstens 2023-02-06 0:10 ` [PATCH 0/3] mm/arch: Fix a few collide definition on private use of VM_FAULT_* Matthew Wilcox 2023-02-06 0:10 ` Matthew Wilcox 2023-02-06 0:54 ` Peter Xu 2023-02-06 0:54 ` Peter Xu 2023-02-06 2:51 ` Matthew Wilcox 2023-02-06 2:51 ` Matthew Wilcox 2023-02-06 3:18 ` Peter Xu 2023-02-06 3:18 ` Peter Xu 2023-02-06 5:09 ` Matthew Wilcox 2023-02-06 5:09 ` Matthew Wilcox 2023-02-09 20:04 ` Heiko Carstens 2023-02-09 20:04 ` Heiko Carstens
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230205231704.909536-3-peterx@redhat.com \ --to=peterx@redhat.com \ --cc=akpm@linux-foundation.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-s390@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.