All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Proposal to address hfi1 UI and EPROM devices
@ 2016-05-02 19:55 Dennis Dalessandro
       [not found] ` <20160502195502.GA31800-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Dennis Dalessandro @ 2016-05-02 19:55 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w,
	ira.weiny-ral2JQCrhuEAvxtiuMwx3w,
	dean.luick-ral2JQCrhuEAvxtiuMwx3w,
	mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w,
	jubin.john-ral2JQCrhuEAvxtiuMwx3w

The hfi1 driver has a "UI" device associated with it. This is currently a
char dev. It is used for debugging/diagnostics. Basically it provides direct
user level access to HW registers. We have been exploring options to remove
this char dev, yet retain the same functionality.

One approach we have considered is using the regmap interface. This has a
number of problems. It is primarily a read only interface. The write
capability is not even available as a compile time option. A code change is
needed to make use of it. There are other issues as well such as being 32bit
when we need 64bit. So this seems like the wrong option.

Another approach is using the driver's resource0 file. We can mmap() the BAR
and access the registers. The main drawback we have with that is we have
some hardware requirements that the driver needs to arbitrate access to
certain registers. This means some form of kernel/user space shared locking.  
We are currently not aware of anything that the kernel provides to achieve 
this. However, we are still looking and would appreciate any pointers.

The third approach would be to take our existing UI implementation and plop
it down in debugfs as a binary file. We can control our locking just as we
do today, in the driver. This gets rid of the character device, and it's not
even available unless the admin decides to mount debugfs.

We also should be able to use any of these schemes to handle our eprom
reading/writing. Adding eprom to IPoIB as Doug suggested is a fine plan, but
we technically don't need to do it right now when we could make do with the
"UI" functionality and hide the details in user space. In the future there 
may well be value in having an eprom capability in the rdma sub-system, but 
for now we believe we can avoid extending the kernel in this regard.

-Denny

--
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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-05-06  4:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02 19:55 [RFC] Proposal to address hfi1 UI and EPROM devices Dennis Dalessandro
     [not found] ` <20160502195502.GA31800-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-03 16:24   ` Leon Romanovsky
     [not found]     ` <20160503162457.GB29160-2ukJVAZIZ/Y@public.gmane.org>
2016-05-03 16:54       ` Dennis Dalessandro
     [not found]         ` <20160503165403.GA11903-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-03 18:42           ` Leon Romanovsky
     [not found]             ` <20160503184218.GC29160-2ukJVAZIZ/Y@public.gmane.org>
2016-05-04  4:41               ` Leon Romanovsky
     [not found]                 ` <20160504044107.GE29160-2ukJVAZIZ/Y@public.gmane.org>
2016-05-04 12:36                   ` Dennis Dalessandro
     [not found]                     ` <20160504123621.GC10916-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-04 18:15                       ` Jason Gunthorpe
     [not found]                         ` <20160504181509.GA20488-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-05  6:38                           ` Leon Romanovsky
     [not found]                             ` <20160505063834.GH29160-2ukJVAZIZ/Y@public.gmane.org>
2016-05-05 12:00                               ` Dennis Dalessandro
     [not found]                                 ` <20160505120033.GA23895-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-05 12:39                                   ` Leon Romanovsky
     [not found]                                     ` <20160505123932.GK29160-2ukJVAZIZ/Y@public.gmane.org>
2016-05-05 18:08                                       ` Jason Gunthorpe
     [not found]                                         ` <20160505180843.GA5957-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-05 18:36                                           ` Doug Ledford
     [not found]                                             ` <b7f1735c-5362-514e-268a-49a09b316a88-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 18:46                                               ` Jason Gunthorpe
2016-05-06  4:36                                           ` Leon Romanovsky
2016-05-04 12:20               ` Dennis Dalessandro
2016-05-03 17:31   ` Jason Gunthorpe
     [not found]     ` <20160503173130.GA1921-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-04 12:17       ` Dennis Dalessandro
2016-05-05 18:57   ` Doug Ledford
     [not found]     ` <72645a3b-5945-419a-d7af-1c065080e415-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 19:20       ` Jason Gunthorpe
     [not found]         ` <20160505192024.GA17249-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-05 19:32           ` Doug Ledford
     [not found]             ` <5334ab9c-428a-547f-b80a-e0bee3f85449-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-05 20:38               ` Jason Gunthorpe
     [not found]                 ` <20160505203858.GA18611-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-05 23:58                   ` Ira Weiny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.