[openib-general] [patch] mad.c, agent.c spinlocking on UP

Hal Rosenstock halr at voltaire.com
Tue Nov 16 11:04:07 PST 2004


On Tue, 2004-11-16 at 13:46, Roland Dreier wrote:
>     Sean> I'd vote to remove the BUG_ONs, versus adding #ifdef.
> 
> That seems fine to me.  Maybe adding a comment in agent.c similar to
> what mad.c says ("Assumes ib_mad_port_list_lock is being held") is all
> we really need, something like this:
> 
> Index: agent.c
> ===================================================================
> --- agent.c	(revision 1249)
> +++ agent.c	(working copy)
> @@ -36,6 +36,9 @@
>  extern kmem_cache_t *ib_mad_cache;
>  
> 
> +/*
> + * Caller must hold ib_agent_port_list_lock.
> + */
>  static inline struct ib_agent_port_private *
>  __ib_get_agent_port(struct ib_device *device, int port_num,
>  		    struct ib_mad_agent *mad_agent)

Thanks. Applied.

-- Hal




More information about the general mailing list