public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	'Tatyana Nikolova'
	<Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	'Hal Rosenstock'
	<hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	'Doug Ledford' <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	'Yishai Hadas'
	<yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	'Devesh Sharma'
	<Devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	'Sean Hefty' <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	'Bart Van Assche' <bvanassche-HInyCGIudOg@public.gmane.org>
Subject: Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
Date: Thu, 29 Sep 2016 16:28:02 -0600	[thread overview]
Message-ID: <20160929222802.GC27229@obsidianresearch.com> (raw)
In-Reply-To: <00e001d21a98$3265f6e0$9731e4a0$@opengridcomputing.com>

On Thu, Sep 29, 2016 at 04:26:52PM -0500, Steve Wise wrote:

> > +/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
> > +   probably wrong */
> > +#define cpu_to_pci32(val) htole32(val)
> 
> If this was wrong, then nothing would work.  So I think you should
> remove the comment.

I added the comment because cxgb* was the only provider that seemed to
be obviously byte swapping MMIO.

Since htole32 is a NOP on x86 and ARM64 the driver would work fine
with or without it. Do you know this driver works on big endian
powerpc? That would help answer the question for sure.

I looked at this some more, and I still don't really know what is the
right answer.

In the kernel the swapping behavior of 'writel' is architecture (and
sometimes even platform) specific. Looking at the kernel headers
suggests that BE PPC needs an explicit swap and BE ARM does not (eg
the hardware swaps). Maybe. There are a lot of layers of macros in
this area..

However, I can't find an obvious swap in mlx4, which I think is the
most widely tested provider. Does it work on BE PPC?

One of the things I'd like to see done is to consolidate the mmio
accessors.. The note was a reminder to try and figure out what is
actually right here.. Appreciate any help!

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

  reply	other threads:[~2016-09-29 22:28 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 20:47 [PATCH rdma-core 0/9] Dead Code Removal Jason Gunthorpe
     [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 20:47   ` [PATCH 1/9] Remove HAVE_CONFIG_H Jason Gunthorpe
     [not found]     ` <1475182076-5411-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 21:22       ` Steve Wise
2016-09-30 17:02       ` Hal Rosenstock
2016-09-29 20:47   ` [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND Jason Gunthorpe
     [not found]     ` <1475182076-5411-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 21:01       ` Bart Van Assche
     [not found]         ` <aef5ce41-14bf-9869-88c8-ab5796634a8c-HInyCGIudOg@public.gmane.org>
2016-09-29 22:34           ` Jason Gunthorpe
     [not found]             ` <20160929223415.GD27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 23:48               ` Bart Van Assche
     [not found]                 ` <610a3086-07bd-baa7-11e2-88642c0e2297-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-30  0:15                   ` Jason Gunthorpe
2016-09-30 16:49       ` Bart Van Assche
2016-09-30 17:02       ` Hal Rosenstock
2016-09-29 20:47   ` [PATCH 3/9] Remove HAVE_IBV_* Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 4/9] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS Jason Gunthorpe
     [not found]     ` <1475182076-5411-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-30 13:07       ` Dalessandro, Dennis
2016-09-29 20:47   ` [PATCH 5/9] Remove HAVE_SYMVER_SUPPORT Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 6/9] Remove old compat definitions of wmb/rmb/etc Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 7/9] Remove old MADV_DONTFORK/DOFORK compat Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 8/9] Remove most checks of __BYTE_ORDER Jason Gunthorpe
     [not found]     ` <1475182076-5411-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 21:26       ` Steve Wise
2016-09-29 22:28         ` Jason Gunthorpe [this message]
     [not found]           ` <20160929222802.GC27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 23:46             ` Steve Wise
     [not found]               ` <F2C34CC4-5C7D-4382-873D-9E14B81A44B3-/Yg/VP3ZvrM@public.gmane.org>
2016-09-30  0:08                 ` Jason Gunthorpe
     [not found]                   ` <20160930000800.GA7570-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-30 13:32                     ` Steve Wise
2016-10-05 15:16                     ` Yishai Hadas
     [not found]                       ` <fd7d47c8-6a06-6169-b840-abfbc239ad75-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-10-05 17:44                         ` Jason Gunthorpe
     [not found]                           ` <20161005174449.GG18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-06 12:09                             ` Yishai Hadas
2016-10-05 15:37             ` Christoph Hellwig
     [not found]               ` <20161005153701.GA12295-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-10-05 17:33                 ` Jason Gunthorpe
     [not found]                   ` <20161005173359.GF18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-06 11:40                     ` Christoph Hellwig
2016-09-30 16:51       ` Bart Van Assche
2016-09-30 17:02       ` Hal Rosenstock
2016-09-29 20:47   ` [PATCH 9/9] nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH Jason Gunthorpe
2016-10-02 12:58   ` [PATCH rdma-core 0/9] Dead Code Removal Doug Ledford

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=20160929222802.GC27229@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=Devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=bvanassche-HInyCGIudOg@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org \
    --cc=yishaih-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@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