From: Robert Walsh <rjwalsh@pathscale.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Roland Dreier <rolandd@cisco.com>,
linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [PATCH 01/13] [RFC] ipath basic headers
Date: Sat, 17 Dec 2005 14:39:18 -0800 [thread overview]
Message-ID: <1134859158.20575.82.camel@phosphene.durables.org> (raw)
In-Reply-To: <20051217123827.32f119da.akpm@osdl.org>
> > +#define yield() sched_yield()
>
> Some might get upset about what I assume is userspace test harness code or
> what _is_ this doing?) in a driver. But if the maintainers find it useful
> we can live with it,
That is cosimulator code. It's easy enough to remove. I'll look into
it.
> > +#ifndef _BITS_PER_BYTE
> > +#define _BITS_PER_BYTE 8
> > +#endif
>
> I'd be inclined to stick BITS_PER_BYTE into include/linux/types.h.
Really? I was just going to suggest removing it, but if sticking it in
types.h works for you, then fine.
> > +static __inline__ void ipath_shortcopy(void *dest, void *src, uint32_t cnt)
> > + __attribute__ ((always_inline));
>
> s/__inline__/inline/ throughout.
OK.
> > +#define round_up(v,sz) (((v) + (sz)-1) & ~((sz)-1))
>
> We have ALIGN()
Yup.
> > +struct ipath_int_vec {
> > + int long long addr;
>
> long long
OK.
> > +#define IPATH_USERINIT _IOW('s', 16, struct ipath_user_info)
> > +/* init; kernel/chip params to user */
> > +#define IPATH_BASEINFO _IOR('s', 17, struct ipath_base_info)
> > +/* send a packet */
> > +#define IPATH_SENDPKT _IOW('s', 18, struct ipath_sendpkt)
>
> uh-oh. ioctls. Do we have compat conversions for them all, if needed?
For those that are needed, I believe we covered them all. Some have
suggested removing ioctls. I'm willing to look into alternatives, but
if you think they're OK, I'd rather leave them.
> > +/*
> > + * A segment is a linear region of low physical memory.
> > + * XXX Maybe we should use phys addr here and kmap()/kunmap()
> > + * Used by the verbs layer.
> > + */
> > +struct ipath_seg {
> > + void *vaddr;
> > + u64 length;
> > +};
>
> Suggest `long' for the length. We don't need 64 bits on 32-bit machines.
OK.
> > +struct ipath_mregion {
> > + u64 user_base; /* User's address for this region */
>
> void *.
>
> > + u64 iova; /* IB start address of this region */
>
> Maybe here too.
OK.
> > +int ipath_mlock(unsigned long, size_t, struct page **);
>
> Sometimes it does `int foo()' and sometimes `extern int foo()'. I tend to
> think the `extern' is a waste of space.
Yup.
> > +#define ipath_func_krecord(a)
> > +#define ipath_func_urecord(a, b)
> > +#define ipath_func_mrecord(a, b)
> > +#define ipath_func_rkrecord(a)
> > +#define ipath_func_rurecord(a, b)
> > +#define ipath_func_rmrecord(a, b)
> > +#define ipath_func_rsrecord(a)
> > +#define ipath_func_rcrecord(a)
>
> What are all these doing? Might need do{}while(0) for safety.
I'll look at cleaning them out. Probably left-overs from some earlier
experiment.
> > +#ifdef IPATH_COSIM
> > +extern __u32 sim_readl(const volatile void __iomem * addr);
> > +extern __u64 sim_readq(const volatile void __iomem * addr);
>
> The driver has a strange mixture of int32_t, s32 and __s32. s32 is
> preferred.
Yea - I'll clean that up.
> > + */
> > +static __inline__ uint32_t ipath_kget_ureg32(const ipath_type stype,
> > + ipath_ureg regno, int port)
> > +{
> > + uint64_t *ubase;
> > +
> > + ubase = (uint64_t *) (devdata[stype].ipath_uregbase
> > + + (char *)devdata[stype].ipath_kregbase
> > + + devdata[stype].ipath_palign * port);
> > + return ubase ? ipath_readl(ubase + regno) : 0;
> > +}
>
> Are all these u64's needed on 32-bit?
Don't know - I'll ask around. We don't support the hardware in 32-bit
anyway, so...
> > +static __inline__ uint64_t ipath_kget_kreg64(const ipath_type stype,
> > + ipath_kreg regno)
> > +{
> > + if (!devdata[stype].ipath_kregbase)
> > + return ~0ULL;
>
> We don't know that the architecture implements u64 as unsigned long long.
> Some use unsigned long. Best way of implmenting the all-ones pattern is
> just `-1'.
OK.
> Gee. Big driver.
Tell me about it :-) Basically, we're doing infiniband in software: no
offload.
Regards,
Robert.
--
Robert Walsh Email: rjwalsh@pathscale.com
PathScale, Inc. Phone: +1 650 934 8117
2071 Stierlin Court, Suite 200 Fax: +1 650 428 1969
Mountain View, CA 94043.
next prev parent reply other threads:[~2005-12-17 22:39 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20051031150618.627779f1.akpm@osdl.org>
2005-12-16 23:48 ` [PATCH 00/13] [RFC] IB: PathScale InfiniPath driver Roland Dreier
2005-12-16 23:48 ` [PATCH 01/13] [RFC] ipath basic headers Roland Dreier
2005-12-16 23:48 ` [PATCH 02/13] [RFC] ipath debug header Roland Dreier
2005-12-16 23:48 ` [PATCH 03/13] [RFC] ipath copy routines Roland Dreier
2005-12-16 23:48 ` [PATCH 04/13] [RFC] ipath LLD core, part 1 Roland Dreier
2005-12-16 23:48 ` [PATCH 05/13] [RFC] ipath LLD core, part 2 Roland Dreier
2005-12-16 23:48 ` [PATCH 06/13] [RFC] ipath LLD core, part 3 Roland Dreier
2005-12-16 23:48 ` [PATCH 07/13] [RFC] ipath core misc files Roland Dreier
2005-12-16 23:48 ` [PATCH 08/13] [RFC] ipath core last bit Roland Dreier
2005-12-16 23:48 ` [PATCH 09/13] [RFC] ipath IB driver headers Roland Dreier
2005-12-16 23:48 ` [PATCH 10/13] [RFC] ipath verbs, part 1 Roland Dreier
2005-12-16 23:48 ` [PATCH 11/13] [RFC] ipath verbs, part 2 Roland Dreier
2005-12-16 23:48 ` [PATCH 12/13] [RFC] ipath verbs MAD handling Roland Dreier
2005-12-16 23:48 ` [PATCH 13/13] [RFC] ipath Kconfig and Makefile Roland Dreier
2005-12-17 21:52 ` Adrian Bunk
2005-12-17 22:54 ` [openib-general] " Robert Walsh
2005-12-17 23:55 ` Adrian Bunk
2005-12-18 1:17 ` Robert Walsh
2005-12-18 0:27 ` Alan Cox
2005-12-18 19:23 ` Sam Ravnborg
2005-12-20 0:32 ` [openib-general] " Robert Walsh
2005-12-26 2:49 ` Roland Dreier
2005-12-18 19:59 ` [PATCH 10/13] [RFC] ipath verbs, part 1 Paul E. McKenney
2005-12-18 20:05 ` [openib-general] " Robert Walsh
2005-12-19 20:50 ` Ralph Campbell
2005-12-17 20:38 ` [PATCH 08/13] [RFC] ipath core last bit Andrew Morton
2005-12-21 0:00 ` Robert Walsh
2005-12-17 20:38 ` [PATCH 07/13] [RFC] ipath core misc files Andrew Morton
2005-12-17 21:29 ` Robert Walsh
2005-12-17 21:33 ` Robert Walsh
2005-12-18 3:10 ` Andrew Morton
2005-12-18 3:13 ` Robert Walsh
2005-12-17 20:38 ` [PATCH 04/13] [RFC] ipath LLD core, part 1 Andrew Morton
2005-12-17 21:34 ` Robert Walsh
2005-12-17 12:38 ` [PATCH 03/13] [RFC] ipath copy routines Pekka Enberg
2005-12-17 21:38 ` Robert Walsh
2005-12-17 13:16 ` Christoph Hellwig
2005-12-17 20:38 ` Andrew Morton
2005-12-17 22:40 ` Robert Walsh
2005-12-18 3:19 ` Andrew Morton
2005-12-18 3:35 ` Adrian Bunk
2005-12-18 5:33 ` Robert Walsh
2005-12-18 9:33 ` David S. Miller
2005-12-18 19:52 ` Robert Walsh
2005-12-18 3:27 ` Andi Kleen
2005-12-18 5:36 ` Robert Walsh
2005-12-18 5:41 ` Andi Kleen
2005-12-18 13:25 ` Alan Cox
2005-12-17 12:33 ` [PATCH 01/13] [RFC] ipath basic headers Pekka Enberg
2005-12-17 21:55 ` Robert Walsh
2005-12-17 13:14 ` Christoph Hellwig
2005-12-17 21:51 ` Eric W. Biederman
2005-12-18 3:25 ` Andi Kleen
2005-12-18 15:02 ` Eric W. Biederman
2005-12-17 22:19 ` Robert Walsh
2005-12-17 22:25 ` Arjan van de Ven
2005-12-17 22:47 ` Robert Walsh
2005-12-17 20:38 ` Andrew Morton
2005-12-17 22:39 ` Robert Walsh [this message]
2005-12-18 3:14 ` Andrew Morton
2005-12-20 1:43 ` Robert Walsh
2005-12-17 13:16 ` [PATCH 00/13] [RFC] IB: PathScale InfiniPath driver Christoph Hellwig
2005-12-17 15:51 ` Roland Dreier
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=1134859158.20575.82.camel@phosphene.durables.org \
--to=rjwalsh@pathscale.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.org \
--cc=rolandd@cisco.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
Powered by JetHome