Re: [PATCH -mm 0/2] RapidIO: Changes to handling of RIO switches

From: Micha Nelissen
Date: Thu Oct 21 2010 - 17:16:15 EST


Alexandre Bounine wrote:
1. Using one storage location common for switches and endpoints eliminates
unnecessary device type checks during maintenance access operations.
While destination IDs and hop counts have different meaning for endpoints and
switches, this does not prevent us from storing them in the primary RIO device
structure (rio_dev) for both types.

How can you say this? The two variables have different meanings, this logically implies you can't merge them. So how do you say 'this does not prevent us from ...' without providing a reason?

2. Convert RIO switch device structures (rio_dev + rio_switch) into single
allocation unit. This change is based on the fact that RIO switches are using
common RIO device objects anyway. Allocating RIO switch objects as RIO devices
with added space for switch information simplifies handling of RIO switch device
objects.

I still don't think that's a good idea because the rdev->rswitch pointer can be defined to point to the switch that a given rio_dev is connected to. This is useful for quick lookups. How else can to know to which switch a given device is connected?

Micha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/