From: sparkhuang <huangshaobo3@xiaomi.com>
To: <tglx@linutronix.de>
Cc: <bhelgaas@google.com>, <chenwei29@xiaomi.com>,
<darwi@linutronix.de>, <huangshaobo3@xiaomi.com>, <jgg@ziepe.ca>,
<kevin.tian@intel.com>, <linux-kernel@vger.kernel.org>,
<linux-pci@vger.kernel.org>, <weipengliang@xiaomi.com>,
<wengjinfei@xiaomi.com>
Subject: Re: Subject: [PATCH] pci/msi: remove redundant calculation in msi_setup_msi_desc
Date: Thu, 24 Aug 2023 03:52:14 -0700 [thread overview]
Message-ID: <1692874334-39255-1-git-send-email-huangshaobo3@xiaomi.com> (raw)
In-Reply-To: <87o7iwdd67.ffs@tglx>
On Thu, 24 Aug 2023 11:04:16 +0200, Thomas Gleixner wrote:
> On Thu, Aug 24 2023 at 00:27, huangshaobo3@xiaomi.com wrote:
> > On Wed, 23 Aug 2023 16:15:27 +0200, Thomas Gleixner wrote:
> >> I'm not seeing what this solves:
> >
> >> > - if (control & PCI_MSI_FLAGS_64BIT)
> >> > + if (desc.pci.msi_attrib.is_64)
> >
> >> Both variants resolve to a test of a bit and a conditional instruction
> >> on the result. It's exactly zero difference in terms of "calculation".
> >
> >> So all this does is change the memory location to test. Not more not
> >> less. It does not generate better code and does not save anything.
> >
> > It may not be appropriate to write to eliminate duplicate calculations,
> > can it be proposed again with clean code?
>
> What's wrong with the existing code?
There is nothing wrong with the current code,
using desc.pci.msi_attrib.is_64 does not solve any problems,
thank you very much for reviewing comments.
Thanks,
sparkhuang
#/******±¾Óʼþ¼°Æä¸½¼þº¬ÓÐСÃ×¹«Ë¾µÄ±£ÃÜÐÅÏ¢£¬½öÏÞÓÚ·¢Ë͸øÉÏÃæµØÖ·ÖÐÁгöµÄ¸öÈË»òȺ×é¡£½ûÖ¹ÈÎºÎÆäËûÈËÒÔÈκÎÐÎʽʹÓ㨰üÀ¨µ«²»ÏÞÓÚÈ«²¿»ò²¿·ÖµØÐ¹Â¶¡¢¸´ÖÆ¡¢»òÉ¢·¢£©±¾ÓʼþÖеÄÐÅÏ¢¡£Èç¹ûÄú´íÊÕÁ˱¾Óʼþ£¬ÇëÄúÁ¢¼´µç»°»òÓʼþ֪ͨ·¢¼þÈ˲¢É¾³ý±¾Óʼþ£¡ This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
prev parent reply other threads:[~2023-08-24 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 7:26 黄少波
2023-08-18 8:30 ` Ilpo Järvinen
2023-08-23 14:15 ` Thomas Gleixner
2023-08-24 7:27 ` huangshaobo3
2023-08-24 9:04 ` Thomas Gleixner
2023-08-24 10:52 ` sparkhuang [this message]
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=1692874334-39255-1-git-send-email-huangshaobo3@xiaomi.com \
--to=huangshaobo3@xiaomi.com \
--cc=bhelgaas@google.com \
--cc=chenwei29@xiaomi.com \
--cc=darwi@linutronix.de \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=weipengliang@xiaomi.com \
--cc=wengjinfei@xiaomi.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
all inboxes | Powered by JetHome®