From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Erhard Furtner <erhard_f@mailbox.org>
Cc: linuxppc-dev@lists.ozlabs.org, willy@infradead.org
Subject: Re: [Bisected] PowerMac G5 fails booting kernel 6.6-rc3 (BUG: Unable to handle kernel data access at 0xfeffbb62ffec65fe)
Date: Fri, 06 Oct 2023 17:38:14 +0530 [thread overview]
Message-ID: <87mswwnec1.fsf@linux.ibm.com> (raw)
In-Reply-To: <20231006124548.54d4b7a8@yea>
Erhard Furtner <erhard_f@mailbox.org> writes:
> On Fri, 06 Oct 2023 11:04:15 +0530
> "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> wrote:
>
>> Can you check this change?
>>
>> diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
>> index 3ba9fe411604..6d144fedd557 100644
>
...
>> void unmap_kernel_page(unsigned long va)
>
> Thanks for having a look into the issue! Your patch applies but I got a build failure:
>
> # make
> CALL scripts/checksyscalls.sh
> CC arch/powerpc/mm/pgtable.o
> In file included from ./include/linux/mm.h:29,
> from arch/powerpc/mm/pgtable.c:22:
> ./include/linux/pgtable.h:247:71: error: expected declaration specifiers or '...' before numeric constant
> 247 | #define set_pte_at(mm, addr, ptep, pte) set_ptes(mm, addr, ptep, pte, 1)
> | ^
> arch/powerpc/mm/pgtable.c:190:13: note: in expansion of macro 'set_pte_at'
> 190 | static void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
> | ^~~~~~~~~~
Sorry that I shared a change without build testing. Here is the updated change
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
index 3ba9fe411604..e563e13ffd88 100644
--- a/arch/powerpc/mm/pgtable.c
+++ b/arch/powerpc/mm/pgtable.c
@@ -190,29 +190,28 @@ static pte_t set_access_flags_filter(pte_t pte, struct vm_area_struct *vma,
void set_ptes(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
pte_t pte, unsigned int nr)
{
- /*
- * Make sure hardware valid bit is not set. We don't do
- * tlb flush for this update.
- */
- VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep));
-
- /* Note: mm->context.id might not yet have been assigned as
- * this context might not have been activated yet when this
- * is called.
- */
- pte = set_pte_filter(pte);
-
/* Perform the setting of the PTE */
- arch_enter_lazy_mmu_mode();
for (;;) {
+
+ /*
+ * Make sure hardware valid bit is not set. We don't do
+ * tlb flush for this update.
+ */
+ VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep));
+
+ /* Note: mm->context.id might not yet have been assigned as
+ * this context might not have been activated yet when this
+ * is called.
+ */
+ pte = set_pte_filter(pte);
+
+ /* Perform the setting of the PTE */
__set_pte_at(mm, addr, ptep, pte, 0);
if (--nr == 0)
break;
ptep++;
- pte = __pte(pte_val(pte) + (1UL << PTE_RPN_SHIFT));
addr += PAGE_SIZE;
}
- arch_leave_lazy_mmu_mode();
}
void unmap_kernel_page(unsigned long va)
next prev parent reply other threads:[~2023-10-06 12:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-29 11:27 [Bisected] PowerMac G5 fails booting kernel 6.6-rc3 (BUG: Unable to handle kernel data access at 0xfeffbb62ffec65fe) Erhard Furtner
2023-09-29 12:34 ` Linux regression tracking (Thorsten Leemhuis)
2023-10-06 1:11 ` Bagas Sanjaya
2023-10-06 1:19 ` Matthew Wilcox
2023-10-06 6:57 ` Bagas Sanjaya
2023-10-06 5:34 ` Aneesh Kumar K.V
2023-10-06 10:45 ` Erhard Furtner
2023-10-06 12:08 ` Aneesh Kumar K.V [this message]
2023-10-06 14:12 ` Erhard Furtner
2023-10-11 23:47 ` Michael Ellerman
2023-10-12 14:20 ` Erhard Furtner
2023-10-12 11:41 ` Michael Ellerman
2023-10-12 14:49 ` Erhard Furtner
2023-10-17 3:40 ` Michael Ellerman
2023-10-17 23:01 ` Erhard Furtner
2023-10-18 5:45 ` Michael Ellerman
2023-10-18 10:34 ` Erhard Furtner
2025-04-08 5:55 ` Christophe Leroy
2025-04-11 9:24 ` Erhard Furtner
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=87mswwnec1.fsf@linux.ibm.com \
--to=aneesh.kumar@linux.ibm.com \
--cc=erhard_f@mailbox.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=willy@infradead.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).