Skip to contentSkip to conversation

srmmu.c: BUG of srmmu_pte_clear optimization

sparc32 Kirill Tkhai 2 participants 2 messages May 30, 2012

lore
Share & tools
lore
#0 lore raw

The function srmmu_pmd_clear() is optimized by the following line:

BTFIXUPSET_CALL(pmd_clear, srmmu_pmd_clear, BTFIXUPCALL_SWAPO0G0);

It's wrong, because srmmu_pmd_clear(pmd_t *pmdp) can contain up to 16 pmdp->pmdv pointers, which must be cleared, but BTFIXUPCALL_SWAPO0G0 clears only one of them.

So, it's necessary to use BTFIXUPCALL_NORM instruction.

Regards,
Kirill

#1 lore raw

Hi Kirill.

Quoted 8 lines · Kirill Tkhai

The function srmmu_pmd_clear() is optimized by the following line:

BTFIXUPSET_CALL(pmd_clear, srmmu_pmd_clear, BTFIXUPCALL_SWAPO0G0);

It's wrong, because srmmu_pmd_clear(pmd_t *pmdp) can contain up to 16 pmdp->pmdv pointers, which must be cleared, but BTFIXUPCALL_SWAPO0G0 clears only one of them.

So, it's necessary to use BTFIXUPCALL_NORM instruction.

Ilya Malakhov <[email protected]> already reported this the other day. In upstream this is "fixed" because we got rid of all the btfixup stuff.

If we want this fixed in stable then one of you guys needs to submit a tested patch so we can apply this to stable.

Sam