Re: [PATCH] SN2 user-MMIO CPU migration

From: Keith Owens <>
Date: 2006-01-25 17:27:18
Brent Casavant (on Tue, 24 Jan 2006 15:12:48 -0600 (CST)) wrote:
>+void sn_switch_from(struct task_struct *task)
>+	pda_t *last_pda = pdacpu(task_thread_info(task)->last_cpu);
>+	volatile unsigned long *adr = last_pda->pio_write_status_addr;
>+	unsigned long val = last_pda->pio_write_status_val;
>+	/* Drain PIO writes from old CPU's Shub */
>+		cpu_relax();

cpu_relax() maps to ia64_hint(ia64_hint_pause) which is defined as a
memory clobber, so you do not need to mark adr as volatile.  Linus
recommends against relying on volatile in C code, memory barrier
operations like cpu_relax should be used instead.

Alas include/asm-ia64/intel_intrin.h defines ia64_hint() as a no-op.
That needs to be fixed.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Jan 25 17:27:54 2006

This archive was generated by hypermail 2.1.8 : 2006-01-25 17:28:05 EST