aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/kernel/iomv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/sn/kernel/iomv.c')
-rw-r--r--arch/ia64/sn/kernel/iomv.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/ia64/sn/kernel/iomv.c b/arch/ia64/sn/kernel/iomv.c
index 7ce3cdad627b..4aa4f301d56d 100644
--- a/arch/ia64/sn/kernel/iomv.c
+++ b/arch/ia64/sn/kernel/iomv.c
@@ -3,10 +3,11 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved. 6 * Copyright (C) 2000-2003, 2006 Silicon Graphics, Inc. All rights reserved.
7 */ 7 */
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/acpi.h>
10#include <asm/io.h> 11#include <asm/io.h>
11#include <asm/delay.h> 12#include <asm/delay.h>
12#include <asm/vga.h> 13#include <asm/vga.h>
@@ -15,6 +16,7 @@
15#include <asm/sn/pda.h> 16#include <asm/sn/pda.h>
16#include <asm/sn/sn_cpuid.h> 17#include <asm/sn/sn_cpuid.h>
17#include <asm/sn/shub_mmr.h> 18#include <asm/sn/shub_mmr.h>
19#include <asm/sn/acpi.h>
18 20
19#define IS_LEGACY_VGA_IOPORT(p) \ 21#define IS_LEGACY_VGA_IOPORT(p) \
20 (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df)) 22 (((p) >= 0x3b0 && (p) <= 0x3bb) || ((p) >= 0x3c0 && (p) <= 0x3df))
@@ -31,11 +33,14 @@ void *sn_io_addr(unsigned long port)
31{ 33{
32 if (!IS_RUNNING_ON_SIMULATOR()) { 34 if (!IS_RUNNING_ON_SIMULATOR()) {
33 if (IS_LEGACY_VGA_IOPORT(port)) 35 if (IS_LEGACY_VGA_IOPORT(port))
34 port += vga_console_iobase; 36 return (__ia64_mk_io_addr(port));
35 /* On sn2, legacy I/O ports don't point at anything */ 37 /* On sn2, legacy I/O ports don't point at anything */
36 if (port < (64 * 1024)) 38 if (port < (64 * 1024))
37 return NULL; 39 return NULL;
38 return ((void *)(port | __IA64_UNCACHED_OFFSET)); 40 if (SN_ACPI_BASE_SUPPORT())
41 return (__ia64_mk_io_addr(port));
42 else
43 return ((void *)(port | __IA64_UNCACHED_OFFSET));
39 } else { 44 } else {
40 /* but the simulator uses them... */ 45 /* but the simulator uses them... */
41 unsigned long addr; 46 unsigned long addr;