Re: Sparc64, cpumask_t and struct arguments (was: [PATCH] Introducenodemask_t ADT)

From: David S. Miller
Date: Fri Mar 26 2004 - 17:59:28 EST

On Fri, 26 Mar 2004 14:36:48 -0800
Paul Jackson <pj@xxxxxxx> wrote:

> However, as I recall, you recommend against passing structs on the
> Sparc64 processor and compilation environment. Am I recalling
> correctly?

It's a problem moreso on sparc32. Structures there have to be passed
"by reference", which means it gets copied onto the stack and then a
pointer to that data area is passed as the actual parameter.

Sparc64 does the same but only _iff_ the structure does not fit entirely
in the remaining argument registers or the structures size is greater
than 32-bytes.

The cross-call functions you reference are slow path code. And whats
more currently none of that code supports more than 64 cpus, although
I'll have to add support for larger numbers later.

> 5) The cpu_clear(i, mask) on about line 534 of smp.c confuses me, as it
> seems to be changing a local copy of 'mask' that no one will examine
> later. What purpose does it serve? See this line annotated with
> "No affect??" in the changes, below.

No, mask is the top level mask value, we assign it to local variable
in order to do this or that operation on it. Once we've really send
the XCALL message to the processor, we clear it in 'mask' only then.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at