public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: "Liuyixian (Eason)" <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3 for-next 2/2] RDMA/hns: Fix alignment problem of the doorbell
Date: Fri, 29 Dec 2017 10:47:17 -0700	[thread overview]
Message-ID: <20171229174717.GB6513@ziepe.ca> (raw)
In-Reply-To: <aa43b6d4-bb56-ed2f-33c9-c047e27a0a59-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Fri, Dec 29, 2017 at 06:29:35PM +0800, Liuyixian (Eason) wrote:
> 
> 
> On 2017/12/28 23:57, Jason Gunthorpe wrote:
> > 
> > On Thu, Dec 28, 2017 at 10:18:03PM +0800, Yixian Liu wrote:
> > 
> >> -	hns_roce_write64_k(doorbell, eq->doorbell);
> >> +	hns_roce_write64_k(db.doorbell, eq->doorbell);
> > 
> > You need to pass &db to hns_roce_write64_k and have it deref the 64
> > bit value using the union. The point here is to eliminate the cast inside
> > hns_roce_write64_k.
> > 
> > Jason
> 
> Hi Jason,
> 
> I know exactly what you mean, but the interface also called by lots of
> other places in our driver, I plan to leave this revision in future
> work.

Yes, exactly, and they all have the same problem, right?

The point of my original note was for you to fix the systemic problem
not just the single location I used as an example.
 
> With db.doorbell input, we could get the correct value (64 bit) w/o
> *(u64 *).  Thus, this patch will not be updated in patch v4.

Let us drop it then, resend it when you fix them all.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-12-29 17:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28 14:18 [PATCH v3 for-next 0/2] Bugfixes for eq support in hns Yixian Liu
     [not found] ` <1514470683-6972-1-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-28 14:18   ` [PATCH v3 for-next 1/2] RDMA/hns: Add detailed comments for mb() call Yixian Liu
     [not found]     ` <1514470683-6972-2-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-28 15:55       ` Jason Gunthorpe
     [not found]         ` <20171228155519.GT25436-uk2M96/98Pc@public.gmane.org>
2017-12-29 10:19           ` Liuyixian (Eason)
2017-12-28 14:18   ` [PATCH v3 for-next 2/2] RDMA/hns: Fix alignment problem of the doorbell Yixian Liu
     [not found]     ` <1514470683-6972-3-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-28 15:57       ` Jason Gunthorpe
     [not found]         ` <20171228155712.GU25436-uk2M96/98Pc@public.gmane.org>
2017-12-29 10:29           ` Liuyixian (Eason)
     [not found]             ` <aa43b6d4-bb56-ed2f-33c9-c047e27a0a59-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-29 17:47               ` Jason Gunthorpe [this message]
     [not found]                 ` <20171229174717.GB6513-uk2M96/98Pc@public.gmane.org>
2018-01-02  3:07                   ` Liuyixian (Eason)
2017-12-29  6:48       ` Leon Romanovsky
     [not found]         ` <20171229064843.GU3494-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-12-29  7:26           ` Liuyixian (Eason)

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=20171229174717.GB6513@ziepe.ca \
    --to=jgg-uk2m96/98pc@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.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