RE: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-10-01 Thread Bounine, Alexandre
Hi Micha, Sorry for delayed reply. Micha Nelissen wrote: > > Bounine, Alexandre wrote: > > struct rio_dev { > > struct list_head global_list; > > struct list_head net_list; > > . > > . rest of rio_dev > > . > > struct rio_switch switch[0]; > > } > > It makes

Re: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-20 Thread Micha Nelissen
Hi Alex, Bounine, Alexandre wrote: struct rio_dev { struct list_head global_list; struct list_head net_list; . . rest of rio_dev . struct rio_switch switch[0]; } It makes sense to let rio_dev structures point to the switch they are attached to. That can be

RE: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-20 Thread Bounine, Alexandre
Andrew Morton wrote: > > The "variable length array at the end of the struct" thing is pretty > commonly used and works well. As long as we never want to change the > number of switches on the fly (hotplug?). This is expected to be a "strange" array - its size can be 0 or 1 only. No number of s

Re: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-20 Thread Andrew Morton
On Mon, 20 Sep 2010 07:31:22 -0700 "Bounine, Alexandre" wrote: > Andrew Morton wrote: > > > > > @@ -219,6 +219,7 @@ struct rio_net { > > > /** > > > * struct rio_switch - RIO switch info > > > * @node: Node in global list of switches > > > + * @rdev: Associated RIO device structure > > >

RE: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-20 Thread Bounine, Alexandre
Andrew Morton wrote: > > > @@ -219,6 +219,7 @@ struct rio_net { > > /** > > * struct rio_switch - RIO switch info > > * @node: Node in global list of switches > > + * @rdev: Associated RIO device structure > > * @switchid: Switch ID that is unique across a network > > * @hopcount: Hopcou

RE: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-15 Thread Bounine, Alexandre
Andrew Morton wrote: > What is the locking for rdev? In other patches I see pointer chases > with no obvious locking against concurrent changes? This rdev should be safe because it is intended for use only by rio_switch attached to the same rdev. Therefore rio_global_list_lock will work here.

Re: [PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-14 Thread Andrew Morton
On Tue, 14 Sep 2010 10:59:16 -0400 Alexandre Bounine wrote: > @@ -219,6 +219,7 @@ struct rio_net { > /** > * struct rio_switch - RIO switch info > * @node: Node in global list of switches > + * @rdev: Associated RIO device structure > * @switchid: Switch ID that is unique across a network

[PATCH v2 03/10] RapidIO: Use stored ingress port number instead of register read

2010-09-14 Thread Alexandre Bounine
A switch port information is obtained and stored during RIO device setup. Therefore repeated reads from Switch Port Information CAR may be removed. Signed-off-by: Alexandre Bounine Cc: Thomas Moll Cc: Matt Porter Cc: Li Yang Cc: Kumar Gala Cc: Micha Nelissen --- drivers/rapidio/rio-scan.c |