[PATCH -v2 1/2] mm: add spurious fault fixing support for huge pmd
David Hildenbrand
david at redhat.com
Wed Oct 15 05:23:26 PDT 2025
>>
>>>>
>>>> _pmd = pmd_mkyoung(*pmd);
>>>> if (write)
>>>> _pmd = pmd_mkdirty(_pmd);
>>>> - if (pmdp_set_access_flags(vma, addr & HPAGE_PMD_MASK,
>>>> - pmd, _pmd, write))
>>>> + changed = pmdp_set_access_flags(vma, addr & HPAGE_PMD_MASK,
>>>> + pmd, _pmd, write);
>>>> + if (changed)
>>>> update_mmu_cache_pmd(vma, addr, pmd);
>>>
>>> We can make this simpler, e.g.:
>>>
>>> if (pmdp_set_access_flags(vma, addr & HPAGE_PMD_MASK,
>>> pmd, entry, write)) {
>>> update_mmu_cache_pmd(vma, addr, pmd);
>>> return true;
>>> }
>>>
>>> return false;
>>
>> No problem. As long as David is OK with this.
>
> Sure I don't think he'd have an issue with it but he can raise it if so :)
Absolutely fine :)
--
Cheers
David / dhildenb
More information about the linux-arm-kernel
mailing list