lkml.org 
[lkml]   [2009]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 1/2] GRU - function to generate chipset IPI values
On Thu, 03 Dec 2009 16:34:15 -0600
steiner@sgi.com wrote:

> From: Jack Steiner <steiner@sgi.com>
>
> Create a function to generate the value that is written to the UV hub
> MMR to cause an IPI interrupt to be sent. The function will be
> used in the GRU message queue error recovery code that sends IPIs to
> nodes in remote partitions.
>
> ...
>
> +static unsigned long uv_hub_ipi_value(int apicid, int vector, int mode)
> +{
> + return (1UL << UVH_IPI_INT_SEND_SHFT) |
> + ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) |
> + (mode << UVH_IPI_INT_DELIVERY_MODE_SHFT) |
> + (vector << UVH_IPI_INT_VECTOR_SHFT);
> +}

You've taken care to avoid a shift overflow of "1", but not of
`apicid', `vector' and `mode'.

Maybe the compiler does that, I forget.




\
 
 \ /
  Last update: 2009-12-04 00:21    [W:0.045 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site