From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nicholas Piggin <npiggin@gmail.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: interrupt_exit_kernel_prepare() on booke/32 has a useless 'mfmsr' and two 'wrteei 0'
Date: Wed, 10 Feb 2021 10:21:20 +0100 [thread overview]
Message-ID: <f143d4a9-bb8f-82d6-8b17-c39aff486caa@csgroup.eu> (raw)
44x/bamboo_defconfig
For the mfmsr, that's because mfmsr is defined as 'asm volatile'. Is that correct ? Reading MSR
doesn't have any side effects as far as I know, should we remove the volatile ?
For the wrteei, that's because we are calling __hard_EE_RI_disable() after local_irq_save(). On
booke those two fonctions do exactly the same because RI doesn't exist. Could we replace that by a
__hard_RI_disable() that would be a nop on booke ?
00000364 <interrupt_exit_kernel_prepare>:
364: 81 23 00 84 lwz r9,132(r3)
368: 55 29 04 62 rlwinm r9,r9,0,17,17
36c: 0f 09 00 00 twnei r9,0
370: 81 22 00 4c lwz r9,76(r2)
374: 75 23 00 01 andis. r3,r9,1
378: 40 82 00 14 bne 38c <interrupt_exit_kernel_prepare+0x28>
37c: 7d 20 00 a6 mfmsr r9
380: 7c 00 01 46 wrteei 0
384: 7c 00 01 46 wrteei 0
388: 4e 80 00 20 blr
38c: 38 e2 00 4c addi r7,r2,76
390: 3d 20 00 01 lis r9,1
394: 7c c0 38 28 lwarx r6,0,r7
398: 7c c6 48 78 andc r6,r6,r9
39c: 7c c0 39 2d stwcx. r6,0,r7
3a0: 40 a2 ff f4 bne 394 <interrupt_exit_kernel_prepare+0x30>
3a4: 38 60 00 01 li r3,1
3a8: 4b ff ff d4 b 37c <interrupt_exit_kernel_prepare+0x18>
next reply other threads:[~2021-02-10 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 9:21 Christophe Leroy [this message]
2021-02-10 11:45 ` interrupt_exit_kernel_prepare() on booke/32 has a useless 'mfmsr' and two 'wrteei 0' Nicholas Piggin
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=f143d4a9-bb8f-82d6-8b17-c39aff486caa@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/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