aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/machvec_sn2.h
diff options
context:
space:
mode:
authorBrent Casavant <bcasavan@sgi.com>2006-01-26 18:55:52 -0500
committerTony Luck <tony.luck@intel.com>2006-01-26 18:55:52 -0500
commite08e6c521355cd33e647b2f739885bc3050eead6 (patch)
tree251dd80647bd3a0140f5f31c35c125094c035f9c /include/asm-ia64/machvec_sn2.h
parent3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff)
[IA64] hooks to wait for mmio writes to drain when migrating processes
On SN2, MMIO writes which are issued from separate processors are not guaranteed to arrive in any particular order at the IO hardware. When performing such writes from the kernel this is not a problem, as a kernel thread will not migrate to another CPU during execution, and mmiowb() calls can guarantee write ordering when control of the IO resource is allowed to move between threads. However, when MMIO writes can be performed from user space (e.g. DRM) there are no such guarantees and mechanisms, as the process may context-switch at any time, and may migrate to a different CPU as part of the switch. For such programs/hardware to operate correctly, it is required that the MMIO writes from the old CPU be accepted by the IO hardware before subsequent writes from the new CPU can be issued. The following patch implements this behavior on SN2 by waiting for a Shub register to indicate that these writes have been accepted. This is placed in the context switch-in path, and only performs the wait when the newly scheduled task changes CPUs. Signed-off-by: Prarit Bhargava <prarit@sgi.com> Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Diffstat (limited to 'include/asm-ia64/machvec_sn2.h')
-rw-r--r--include/asm-ia64/machvec_sn2.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h
index e1b6cd63f49e..6f0021bb3874 100644
--- a/include/asm-ia64/machvec_sn2.h
+++ b/include/asm-ia64/machvec_sn2.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2002-2003,2006 Silicon Graphics, Inc. All Rights Reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License 5 * under the terms of version 2 of the GNU General Public License
@@ -71,6 +71,7 @@ extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
71extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; 71extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device;
72extern ia64_mv_dma_mapping_error sn_dma_mapping_error; 72extern ia64_mv_dma_mapping_error sn_dma_mapping_error;
73extern ia64_mv_dma_supported sn_dma_supported; 73extern ia64_mv_dma_supported sn_dma_supported;
74extern ia64_mv_migrate_t sn_migrate;
74 75
75/* 76/*
76 * This stuff has dual use! 77 * This stuff has dual use!
@@ -120,6 +121,7 @@ extern ia64_mv_dma_supported sn_dma_supported;
120#define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device 121#define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device
121#define platform_dma_mapping_error sn_dma_mapping_error 122#define platform_dma_mapping_error sn_dma_mapping_error
122#define platform_dma_supported sn_dma_supported 123#define platform_dma_supported sn_dma_supported
124#define platform_migrate sn_migrate
123 125
124#include <asm/sn/io.h> 126#include <asm/sn/io.h>
125 127