summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-08-30 01:51:31 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-08-30 01:51:31 -0700
commit9caf366e3882a80808ed30d4d717ee29387ddc13 (patch)
treeb9ced7264845057c85fb0569d297a637e0eb376f /include
parent7c0700ffea005ac21180f929622306dd9a08da1a (diff)
parent7d3b6870def32b84ce93f62545174ab8271ce764 (diff)
Merge http://lia64.bkbits.net/to-linus-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/acpi.h3
-rw-r--r--include/asm-ia64/agp.h3
-rw-r--r--include/asm-ia64/atomic.h4
-rw-r--r--include/asm-ia64/efi.h284
-rw-r--r--include/asm-ia64/fpu.h4
-rw-r--r--include/asm-ia64/hardirq.h12
-rw-r--r--include/asm-ia64/hw_irq.h8
-rw-r--r--include/asm-ia64/ide.h16
-rw-r--r--include/asm-ia64/io.h34
-rw-r--r--include/asm-ia64/iosapic.h29
-rw-r--r--include/asm-ia64/irq.h2
-rw-r--r--include/asm-ia64/kmap_types.h29
-rw-r--r--include/asm-ia64/mc146818rtc.h10
-rw-r--r--include/asm-ia64/mmu_context.h6
-rw-r--r--include/asm-ia64/percpu.h11
-rw-r--r--include/asm-ia64/processor.h7
-rw-r--r--include/asm-ia64/sal.h2
-rw-r--r--include/asm-ia64/system.h6
-rw-r--r--include/asm-ia64/types.h14
-rw-r--r--include/asm-ia64/unistd.h13
20 files changed, 143 insertions, 354 deletions
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
index 8e39b4fe8691..976dfb92c341 100644
--- a/include/asm-ia64/acpi.h
+++ b/include/asm-ia64/acpi.h
@@ -100,7 +100,8 @@ const char *acpi_get_sysname (void);
int acpi_boot_init (char *cdline);
int acpi_request_vector (u32 int_type);
int acpi_get_prt (struct pci_vector_struct **vectors, int *count);
-int acpi_get_interrupt_model(int *type);
+int acpi_get_interrupt_model (int *type);
+int acpi_irq_to_vector (u32 irq);
#ifdef CONFIG_DISCONTIGMEM
#define NODE_ARRAY_INDEX(x) ((x) / 8) /* 8 bits/char */
diff --git a/include/asm-ia64/agp.h b/include/asm-ia64/agp.h
index 97dc1b9baed5..d91d0e3416ae 100644
--- a/include/asm-ia64/agp.h
+++ b/include/asm-ia64/agp.h
@@ -18,4 +18,7 @@
#define flush_agp_mappings() /* nothing */
#define flush_agp_cache() mb()
+/* Page-protection value to be used for AGP memory mapped into kernel space. */
+#define PAGE_AGP PAGE_KERNEL
+
#endif /* _ASM_IA64_AGP_H */
diff --git a/include/asm-ia64/atomic.h b/include/asm-ia64/atomic.h
index d10f1f424b45..7e56a421e6bc 100644
--- a/include/asm-ia64/atomic.h
+++ b/include/asm-ia64/atomic.h
@@ -9,8 +9,8 @@
* "int" types were carefully placed so as to ensure proper operation
* of the macros.
*
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
+ * David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <linux/types.h>
diff --git a/include/asm-ia64/efi.h b/include/asm-ia64/efi.h
deleted file mode 100644
index de403ab78367..000000000000
--- a/include/asm-ia64/efi.h
+++ /dev/null
@@ -1,284 +0,0 @@
-#ifndef _ASM_IA64_EFI_H
-#define _ASM_IA64_EFI_H
-
-/*
- * Extensible Firmware Interface
- * Based on 'Extensible Firmware Interface Specification' version 0.9, April 30, 1999
- *
- * Copyright (C) 1999 VA Linux Systems
- * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
- * Copyright (C) 1999, 2002 Hewlett-Packard Co.
- * David Mosberger-Tang <davidm@hpl.hp.com>
- * Stephane Eranian <eranian@hpl.hp.com>
- */
-#include <linux/init.h>
-#include <linux/string.h>
-#include <linux/time.h>
-#include <linux/types.h>
-#include <linux/proc_fs.h>
-
-#include <asm/page.h>
-#include <asm/system.h>
-
-#define EFI_SUCCESS 0
-#define EFI_LOAD_ERROR (1L | (1L << 63))
-#define EFI_INVALID_PARAMETER (2L | (1L << 63))
-#define EFI_UNSUPPORTED (3L | (1L << 63))
-#define EFI_BAD_BUFFER_SIZE (4L | (1L << 63))
-#define EFI_BUFFER_TOO_SMALL (5L | (1L << 63))
-#define EFI_NOT_FOUND (14L | (1L << 63))
-
-typedef unsigned long efi_status_t;
-typedef u8 efi_bool_t;
-typedef u16 efi_char16_t; /* UNICODE character */
-
-
-typedef struct {
- u8 b[16];
-} efi_guid_t;
-
-#define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
-((efi_guid_t) \
-{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
- (b) & 0xff, ((b) >> 8) & 0xff, \
- (c) & 0xff, ((c) >> 8) & 0xff, \
- (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
-
-/*
- * Generic EFI table header
- */
-typedef struct {
- u64 signature;
- u32 revision;
- u32 headersize;
- u32 crc32;
- u32 reserved;
-} efi_table_hdr_t;
-
-/*
- * Memory map descriptor:
- */
-
-/* Memory types: */
-#define EFI_RESERVED_TYPE 0
-#define EFI_LOADER_CODE 1
-#define EFI_LOADER_DATA 2
-#define EFI_BOOT_SERVICES_CODE 3
-#define EFI_BOOT_SERVICES_DATA 4
-#define EFI_RUNTIME_SERVICES_CODE 5
-#define EFI_RUNTIME_SERVICES_DATA 6
-#define EFI_CONVENTIONAL_MEMORY 7
-#define EFI_UNUSABLE_MEMORY 8
-#define EFI_ACPI_RECLAIM_MEMORY 9
-#define EFI_ACPI_MEMORY_NVS 10
-#define EFI_MEMORY_MAPPED_IO 11
-#define EFI_MEMORY_MAPPED_IO_PORT_SPACE 12
-#define EFI_PAL_CODE 13
-#define EFI_MAX_MEMORY_TYPE 14
-
-/* Attribute values: */
-#define EFI_MEMORY_UC 0x0000000000000001 /* uncached */
-#define EFI_MEMORY_WC 0x0000000000000002 /* write-coalescing */
-#define EFI_MEMORY_WT 0x0000000000000004 /* write-through */
-#define EFI_MEMORY_WB 0x0000000000000008 /* write-back */
-#define EFI_MEMORY_WP 0x0000000000001000 /* write-protect */
-#define EFI_MEMORY_RP 0x0000000000002000 /* read-protect */
-#define EFI_MEMORY_XP 0x0000000000004000 /* execute-protect */
-#define EFI_MEMORY_RUNTIME 0x8000000000000000 /* range requires runtime mapping */
-#define EFI_MEMORY_DESCRIPTOR_VERSION 1
-
-#define EFI_PAGE_SHIFT 12
-
-typedef struct {
- u32 type;
- u32 pad;
- u64 phys_addr;
- u64 virt_addr;
- u64 num_pages;
- u64 attribute;
-} efi_memory_desc_t;
-
-typedef int efi_freemem_callback_t (u64 start, u64 end, void *arg);
-
-/*
- * Types and defines for Time Services
- */
-#define EFI_TIME_ADJUST_DAYLIGHT 0x1
-#define EFI_TIME_IN_DAYLIGHT 0x2
-#define EFI_UNSPECIFIED_TIMEZONE 0x07ff
-
-typedef struct {
- u16 year;
- u8 month;
- u8 day;
- u8 hour;
- u8 minute;
- u8 second;
- u8 pad1;
- u32 nanosecond;
- s16 timezone;
- u8 daylight;
- u8 pad2;
-} efi_time_t;
-
-typedef struct {
- u32 resolution;
- u32 accuracy;
- u8 sets_to_zero;
-} efi_time_cap_t;
-
-/*
- * Types and defines for EFI ResetSystem
- */
-#define EFI_RESET_COLD 0
-#define EFI_RESET_WARM 1
-
-/*
- * EFI Runtime Services table
- */
-#define EFI_RUNTIME_SERVICES_SIGNATURE 0x5652453544e5552
-#define EFI_RUNTIME_SERVICES_REVISION 0x00010000
-
-typedef struct {
- efi_table_hdr_t hdr;
- u64 get_time;
- u64 set_time;
- u64 get_wakeup_time;
- u64 set_wakeup_time;
- u64 set_virtual_address_map;
- u64 convert_pointer;
- u64 get_variable;
- u64 get_next_variable;
- u64 set_variable;
- u64 get_next_high_mono_count;
- u64 reset_system;
-} efi_runtime_services_t;
-
-typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc);
-typedef efi_status_t efi_set_time_t (efi_time_t *tm);
-typedef efi_status_t efi_get_wakeup_time_t (efi_bool_t *enabled, efi_bool_t *pending,
- efi_time_t *tm);
-typedef efi_status_t efi_set_wakeup_time_t (efi_bool_t enabled, efi_time_t *tm);
-typedef efi_status_t efi_get_variable_t (efi_char16_t *name, efi_guid_t *vendor, u32 *attr,
- unsigned long *data_size, void *data);
-typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char16_t *name,
- efi_guid_t *vendor);
-typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, u32 attr,
- unsigned long data_size, void *data);
-typedef efi_status_t efi_get_next_high_mono_count_t (u64 *count);
-typedef void efi_reset_system_t (int reset_type, efi_status_t status,
- unsigned long data_size, efi_char16_t *data);
-
-/*
- * EFI Configuration Table and GUID definitions
- */
-#define NULL_GUID \
- EFI_GUID( 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 )
-
-#define MPS_TABLE_GUID \
- EFI_GUID( 0xeb9d2d2f, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
-
-#define ACPI_TABLE_GUID \
- EFI_GUID( 0xeb9d2d30, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
-
-#define ACPI_20_TABLE_GUID \
- EFI_GUID( 0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 )
-
-#define SMBIOS_TABLE_GUID \
- EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
-
-#define SAL_SYSTEM_TABLE_GUID \
- EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
-
-#define HCDP_TABLE_GUID \
- EFI_GUID( 0xf951938d, 0x620b, 0x42ef, 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 )
-
-typedef struct {
- efi_guid_t guid;
- u64 table;
-} efi_config_table_t;
-
-#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
-#define EFI_SYSTEM_TABLE_REVISION ((1 << 16) | 00)
-
-typedef struct {
- efi_table_hdr_t hdr;
- u64 fw_vendor; /* physical addr of CHAR16 vendor string */
- u32 fw_revision;
- u64 con_in_handle;
- u64 con_in;
- u64 con_out_handle;
- u64 con_out;
- u64 stderr_handle;
- u64 stderr;
- u64 runtime;
- u64 boottime;
- u64 nr_tables;
- u64 tables;
-} efi_system_table_t;
-
-/*
- * All runtime access to EFI goes through this structure:
- */
-extern struct efi {
- efi_system_table_t *systab; /* EFI system table */
- void *mps; /* MPS table */
- void *acpi; /* ACPI table (IA64 ext 0.71) */
- void *acpi20; /* ACPI table (ACPI 2.0) */
- void *smbios; /* SM BIOS table */
- void *sal_systab; /* SAL system table */
- void *boot_info; /* boot info table */
- void *hcdp; /* HCDP table */
- efi_get_time_t *get_time;
- efi_set_time_t *set_time;
- efi_get_wakeup_time_t *get_wakeup_time;
- efi_set_wakeup_time_t *set_wakeup_time;
- efi_get_variable_t *get_variable;
- efi_get_next_variable_t *get_next_variable;
- efi_set_variable_t *set_variable;
- efi_get_next_high_mono_count_t *get_next_high_mono_count;
- efi_reset_system_t *reset_system;
-} efi;
-
-static inline int
-efi_guidcmp (efi_guid_t left, efi_guid_t right)
-{
- return memcmp(&left, &right, sizeof (efi_guid_t));
-}
-
-static inline char *
-efi_guid_unparse(efi_guid_t *guid, char *out)
-{
- sprintf(out, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- guid->b[3], guid->b[2], guid->b[1], guid->b[0],
- guid->b[5], guid->b[4], guid->b[7], guid->b[6],
- guid->b[8], guid->b[9], guid->b[10], guid->b[11],
- guid->b[12], guid->b[13], guid->b[14], guid->b[15]);
- return out;
-}
-
-extern void efi_init (void);
-extern void efi_map_pal_code (void);
-extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
-extern void efi_gettimeofday (struct timeval *tv);
-extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */
-extern u64 efi_get_iobase (void);
-extern u32 efi_mem_type (unsigned long phys_addr);
-extern u64 efi_mem_attributes (unsigned long phys_addr);
-
-/*
- * Variable Attributes
- */
-#define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002
-#define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004
-
-
-/*
- * efi_dir is allocated in arch/ia64/kernel/efi.c.
- */
-#ifdef CONFIG_PROC_FS
-extern struct proc_dir_entry *efi_dir;
-#endif
-
-#endif /* _ASM_IA64_EFI_H */
diff --git a/include/asm-ia64/fpu.h b/include/asm-ia64/fpu.h
index 0dedf74b8f3a..137d9f4d19c7 100644
--- a/include/asm-ia64/fpu.h
+++ b/include/asm-ia64/fpu.h
@@ -2,8 +2,8 @@
#define _ASM_IA64_FPU_H
/*
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
+ * David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <asm/types.h>
diff --git a/include/asm-ia64/hardirq.h b/include/asm-ia64/hardirq.h
index 95c2cc97b8e3..5e1f7dcdc202 100644
--- a/include/asm-ia64/hardirq.h
+++ b/include/asm-ia64/hardirq.h
@@ -92,12 +92,12 @@
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
-#define irq_exit() \
-do { \
- preempt_count() -= IRQ_EXIT_OFFSET; \
- if (!in_interrupt() && softirq_pending(smp_processor_id())) \
- do_softirq(); \
- preempt_enable_no_resched(); \
+#define irq_exit() \
+do { \
+ preempt_count() -= IRQ_EXIT_OFFSET; \
+ if (!in_interrupt() && local_softirq_pending()) \
+ do_softirq(); \
+ preempt_enable_no_resched(); \
} while (0)
#ifdef CONFIG_SMP
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
index f723d5eedf62..2b30991d8745 100644
--- a/include/asm-ia64/hw_irq.h
+++ b/include/asm-ia64/hw_irq.h
@@ -53,6 +53,10 @@ typedef u8 ia64_vector;
#define IA64_IPI_RESCHEDULE 0xfd /* SMP reschedule */
#define IA64_IPI_VECTOR 0xfe /* inter-processor interrupt vector */
+/* Used for encoding redirected irqs */
+
+#define IA64_IRQ_REDIRECTED (1 << 31)
+
/* IA64 inter-cpu interrupt related definitions */
#define IA64_IPI_DEFAULT_BASE_ADDR 0xfee00000
@@ -68,14 +72,12 @@ enum {
extern __u8 isa_irq_to_vector_map[16];
#define isa_irq_to_vector(x) isa_irq_to_vector_map[(x)]
-extern __u8 gsi_to_vector_map[255];
-#define gsi_to_vector(x) gsi_to_vector_map[(x)]
extern unsigned long ipi_base_addr;
extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt controller */
-extern int ia64_alloc_irq (void); /* allocate a free irq */
+extern int ia64_alloc_vector (void); /* allocate a free vector */
extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
extern void register_percpu_irq (ia64_vector vec, struct irqaction *action);
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h
index 3c9fe4910181..4f662595dd3e 100644
--- a/include/asm-ia64/ide.h
+++ b/include/asm-ia64/ide.h
@@ -85,11 +85,25 @@ ide_init_default_hwifs (void)
for(index = 0; index < MAX_HWIFS; index++) {
ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
hw.irq = ide_default_irq(ide_default_io_base(index));
- ide_register_hw(&hw);
+ ide_register_hw(&hw, NULL);
}
#endif
}
+#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
+#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
+#define ide_check_region(from,extent) check_region((from), (extent))
+#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
+#define ide_release_region(from,extent) release_region((from), (extent))
+
+/*
+ * The following are not needed for the non-m68k ports
+ */
+#define ide_ack_intr(hwif) (1)
+#define ide_fix_driveid(id) do {} while (0)
+#define ide_release_lock(lock) do {} while (0)
+#define ide_get_lock(lock, hdlr, data) do {} while (0)
+
#endif /* __KERNEL__ */
#endif /* __ASM_IA64_IDE_H */
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
index 2c19405ecda0..42e21b9646f1 100644
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -13,7 +13,7 @@
* over and over again with slight variations and possibly making a
* mistake somewhere.
*
- * Copyright (C) 1998-2001 Hewlett-Packard Co
+ * Copyright (C) 1998-2002 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
* Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>
* Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
@@ -277,9 +277,9 @@ __outsl (unsigned long port, void *src, unsigned long count)
}
/*
- * Unfortunately, some platforms are broken and do not follow the
- * IA-64 architecture specification regarding legacy I/O support.
- * Thus, we have to make these operations platform dependent...
+ * Unfortunately, some platforms are broken and do not follow the IA-64 architecture
+ * specification regarding legacy I/O support. Thus, we have to make these operations
+ * platform dependent...
*/
#define __inb platform_inb
#define __inw platform_inw
@@ -289,19 +289,19 @@ __outsl (unsigned long port, void *src, unsigned long count)
#define __outl platform_outl
#define __mmiob platform_mmiob
-#define inb __inb
-#define inw __inw
-#define inl __inl
-#define insb __insb
-#define insw __insw
-#define insl __insl
-#define outb __outb
-#define outw __outw
-#define outl __outl
-#define outsb __outsb
-#define outsw __outsw
-#define outsl __outsl
-#define mmiob __mmiob
+#define inb(p) __inb(p)
+#define inw(p) __inw(p)
+#define inl(p) __inl(p)
+#define insb(p,d,c) __insb(p,d,c)
+#define insw(p,d,c) __insw(p,d,c)
+#define insl(p,d,c) __insl(p,d,c)
+#define outb(v,p) __outb(v,p)
+#define outw(v,p) __outw(v,p)
+#define outl(v,p) __outl(v,p)
+#define outsb(p,s,c) __outsb(p,s,c)
+#define outsw(p,s,c) __outsw(p,s,c)
+#define outsl(p,s,c) __outsl(p,s,c)
+#define mmiob() __mmiob()
/*
* The address passed to these functions are ioremap()ped already.
diff --git a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h
index ec2641f45b47..9fba44f5ba20 100644
--- a/include/asm-ia64/iosapic.h
+++ b/include/asm-ia64/iosapic.h
@@ -51,17 +51,24 @@
#ifndef __ASSEMBLY__
-extern void __init iosapic_init (unsigned long address, unsigned int base_irq,
- int pcat_compat);
-extern int iosapic_register_irq (u32 global_vector, unsigned long polarity,
- unsigned long edge_triggered, u32 base_irq,
- char *iosapic_address);
-extern void iosapic_register_legacy_irq (unsigned long irq, unsigned long pin,
- unsigned long polarity, unsigned long trigger);
-extern int iosapic_register_platform_irq (u32 int_type, u32 global_vector, u32 iosapic_vector,
- u16 eid, u16 id, unsigned long polarity,
- unsigned long edge_triggered, u32 base_irq,
- char *iosapic_address);
+extern void __devinit iosapic_init (unsigned long address,
+ unsigned int gsi_base,
+ int pcat_compat);
+extern int gsi_to_vector (unsigned int gsi);
+extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
+ unsigned long edge_triggered,
+ u32 gsi_base, char *iosapic_address);
+extern void iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
+ unsigned long polarity,
+ unsigned long edge_triggered);
+extern int iosapic_register_platform_intr (u32 int_type,
+ unsigned int gsi,
+ int pmi_vector,
+ u16 eid, u16 id,
+ unsigned long polarity,
+ unsigned long edge_triggered,
+ unsigned int gsi_base,
+ char *iosapic_address);
extern unsigned int iosapic_version (char *addr);
extern void iosapic_pci_fixup (int);
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h
index 4c52ffb49fa2..2dd9adcf27ec 100644
--- a/include/asm-ia64/irq.h
+++ b/include/asm-ia64/irq.h
@@ -27,6 +27,6 @@ irq_cannonicalize (int irq)
extern void disable_irq (unsigned int);
extern void disable_irq_nosync (unsigned int);
extern void enable_irq (unsigned int);
-extern void set_irq_affinity_info (int irq, int dest, int redir);
+extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
#endif /* _ASM_IA64_IRQ_H */
diff --git a/include/asm-ia64/kmap_types.h b/include/asm-ia64/kmap_types.h
new file mode 100644
index 000000000000..b14fcb1a95ad
--- /dev/null
+++ b/include/asm-ia64/kmap_types.h
@@ -0,0 +1,29 @@
+#ifndef _ASM_IA64_KMAP_TYPES_H
+#define _ASM_IA64_KMAP_TYPES_H
+
+#include <linux/config.h>
+
+#if CONFIG_DEBUG_HIGHMEM
+# define D(n) __KM_FENCE_##n ,
+#else
+# define D(n)
+#endif
+
+enum km_type {
+D(0) KM_BOUNCE_READ,
+D(1) KM_SKB_SUNRPC_DATA,
+D(2) KM_SKB_DATA_SOFTIRQ,
+D(3) KM_USER0,
+D(4) KM_USER1,
+D(5) KM_BIO_SRC_IRQ,
+D(6) KM_BIO_DST_IRQ,
+D(7) KM_PTE0,
+D(8) KM_PTE1,
+D(9) KM_IRQ0,
+D(10) KM_IRQ1,
+D(11) KM_TYPE_NR
+};
+
+#undef D
+
+#endif /* _ASM_IA64_KMAP_TYPES_H */
diff --git a/include/asm-ia64/mc146818rtc.h b/include/asm-ia64/mc146818rtc.h
new file mode 100644
index 000000000000..407787a237ba
--- /dev/null
+++ b/include/asm-ia64/mc146818rtc.h
@@ -0,0 +1,10 @@
+#ifndef _ASM_IA64_MC146818RTC_H
+#define _ASM_IA64_MC146818RTC_H
+
+/*
+ * Machine dependent access functions for RTC registers.
+ */
+
+/* empty include file to satisfy the include in genrtc.c */
+
+#endif /* _ASM_IA64_MC146818RTC_H */
diff --git a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h
index dde8b9702d44..7cc6a06d89cf 100644
--- a/include/asm-ia64/mmu_context.h
+++ b/include/asm-ia64/mmu_context.h
@@ -36,7 +36,7 @@ struct ia64_ctx {
};
extern struct ia64_ctx ia64_ctx;
-extern u8 ia64_need_tlb_flush __per_cpu_data;
+DECLARE_PER_CPU(u8, ia64_need_tlb_flush);
extern void wrap_mmu_context (struct mm_struct *mm);
@@ -56,9 +56,9 @@ delayed_tlb_flush (void)
{
extern void __flush_tlb_all (void);
- if (unlikely(ia64_need_tlb_flush)) {
+ if (unlikely(__get_cpu_var(ia64_need_tlb_flush))) {
__flush_tlb_all();
- ia64_need_tlb_flush = 0;
+ __get_cpu_var(ia64_need_tlb_flush) = 0;
}
}
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h
index 7f404b6db853..5f9d7749233a 100644
--- a/include/asm-ia64/percpu.h
+++ b/include/asm-ia64/percpu.h
@@ -1,6 +1,9 @@
#ifndef _ASM_IA64_PERCPU_H
#define _ASM_IA64_PERCPU_H
+#include <linux/config.h>
+#include <linux/compiler.h>
+
/*
* Copyright (C) 2002 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
@@ -8,7 +11,7 @@
#ifdef __ASSEMBLY__
-#define THIS_CPU(var) (var##__per_cpu) /* use this to mark accesses to per-CPU variables... */
+#define THIS_CPU(var) (var##__per_cpu) /* use this to mark accesses to per-CPU variables... */
#else /* !__ASSEMBLY__ */
@@ -22,8 +25,12 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
#endif
#define DECLARE_PER_CPU(type, name) extern __typeof__(type) name##__per_cpu
-#define per_cpu(var, cpu) (*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
#define __get_cpu_var(var) (var##__per_cpu)
+#ifdef CONFIG_SMP
+# define per_cpu(var, cpu) (*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
+#else
+# define per_cpu(var, cpu) __get_cpu_var(var)
+#endif
#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index cd1be7a72902..a60e833431a4 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -15,9 +15,6 @@
#include <linux/config.h>
-#include <linux/percpu.h>
-#include <linux/compiler.h>
-
#include <asm/ptrace.h>
#include <asm/kregs.h>
#include <asm/system.h>
@@ -81,8 +78,10 @@
#ifndef __ASSEMBLY__
-#include <linux/threads.h>
#include <linux/cache.h>
+#include <linux/compiler.h>
+#include <linux/percpu.h>
+#include <linux/threads.h>
#include <asm/fpu.h>
#include <asm/offsets.h>
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
index 5c941be20a77..841980bb30a3 100644
--- a/include/asm-ia64/sal.h
+++ b/include/asm-ia64/sal.h
@@ -24,9 +24,9 @@
*/
#include <linux/spinlock.h>
+#include <linux/efi.h>
#include <asm/pal.h>
-#include <asm/efi.h>
#include <asm/system.h>
#include <asm/fpu.h>
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h
index 4e55d3f333e2..f43d3c682516 100644
--- a/include/asm-ia64/system.h
+++ b/include/asm-ia64/system.h
@@ -13,7 +13,6 @@
* Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
*/
#include <linux/config.h>
-#include <linux/percpu.h>
#include <asm/kregs.h>
#include <asm/page.h>
@@ -26,6 +25,7 @@
#ifndef __ASSEMBLY__
+#include <linux/percpu.h>
#include <linux/kernel.h>
#include <linux/types.h>
@@ -368,8 +368,8 @@ extern void ia64_save_extra (struct task_struct *task);
extern void ia64_load_extra (struct task_struct *task);
#if defined(CONFIG_SMP) && defined(CONFIG_PERFMON)
- extern int __per_cpu_data pfm_syst_wide;
-# define PERFMON_IS_SYSWIDE() (this_cpu(pfm_syst_wide) != 0)
+ DECLARE_PER_CPU(int, pfm_syst_wide);
+# define PERFMON_IS_SYSWIDE() (get_cpu_var(pfm_syst_wide) != 0)
#else
# define PERFMON_IS_SYSWIDE() (0)
#endif
diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h
index aee357781567..52d0b3b47c81 100644
--- a/include/asm-ia64/types.h
+++ b/include/asm-ia64/types.h
@@ -2,14 +2,13 @@
#define _ASM_IA64_TYPES_H
/*
- * This file is never included by application software unless
- * explicitly requested (e.g., via linux/types.h) in which case the
- * application is Linux specific so (user-) name space pollution is
- * not a major issue. However, for interoperability, libraries still
+ * This file is never included by application software unless explicitly requested (e.g.,
+ * via linux/types.h) in which case the application is Linux specific so (user-) name
+ * space pollution is not a major issue. However, for interoperability, libraries still
* need to be careful to avoid a name clashes.
*
- * Copyright (C) 1998-2000 Hewlett-Packard Co
- * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2000, 2002 Hewlett-Packard Co
+ * David Mosberger-Tang <davidm@hpl.hp.com>
*/
#ifdef __ASSEMBLY__
@@ -18,9 +17,6 @@
#else
# define __IA64_UL(x) ((unsigned long)(x))
# define __IA64_UL_CONST(x) x##UL
-#endif
-
-#ifndef __ASSEMBLY__
typedef unsigned int umode_t;
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 970db22ffa1b..761b073c638d 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -223,10 +223,15 @@
#define __NR_sched_setaffinity 1231
#define __NR_sched_getaffinity 1232
#define __NR_security 1233
-#define __NR_get_large_pages 1234
-#define __NR_free_large_pages 1235
-#define __NR_share_large_pages 1236
-#define __NR_unshare_large_pages 1237
+#define __NR_alloc_hugepages 1234
+#define __NR_free_hugepages 1235
+/* 1236 currently unused */
+/* 1237 currently unused */
+#define __NR_io_setup 1238
+#define __NR_io_destroy 1239
+#define __NR_io_getevents 1240
+#define __NR_io_submit 1241
+#define __NR_io_cancel 1242
#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)