aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acdispat.h2
-rw-r--r--include/acpi/acglobal.h26
-rw-r--r--include/acpi/acinterp.h5
-rw-r--r--include/acpi/aclocal.h36
-rw-r--r--include/acpi/acmacros.h2
-rw-r--r--include/acpi/acobject.h8
-rw-r--r--include/acpi/acpi_bus.h2
-rw-r--r--include/acpi/acpi_drivers.h17
-rw-r--r--include/acpi/acpiosxf.h40
-rw-r--r--include/acpi/actypes.h49
-rw-r--r--include/acpi/platform/aclinux.h2
-rw-r--r--include/acpi/processor.h1
-rw-r--r--include/asm-alpha/floppy.h2
-rw-r--r--include/asm-alpha/hw_irq.h2
-rw-r--r--include/asm-alpha/signal.h2
-rw-r--r--include/asm-alpha/socket.h1
-rw-r--r--include/asm-arm/arch-at91rm9200/board.h2
-rw-r--r--include/asm-arm/arch-ixp4xx/io.h2
-rw-r--r--include/asm-arm/bug.h1
-rw-r--r--include/asm-arm/mach/pci.h2
-rw-r--r--include/asm-arm/socket.h1
-rw-r--r--include/asm-arm/thread_info.h2
-rw-r--r--include/asm-arm26/floppy.h2
-rw-r--r--include/asm-arm26/signal.h2
-rw-r--r--include/asm-arm26/socket.h1
-rw-r--r--include/asm-cris/arch-v10/irq.h2
-rw-r--r--include/asm-cris/arch-v32/arbiter.h4
-rw-r--r--include/asm-cris/arch-v32/irq.h2
-rw-r--r--include/asm-cris/hw_irq.h2
-rw-r--r--include/asm-cris/irq.h5
-rw-r--r--include/asm-cris/signal.h2
-rw-r--r--include/asm-cris/socket.h1
-rw-r--r--include/asm-frv/irq-routing.h2
-rw-r--r--include/asm-frv/signal.h2
-rw-r--r--include/asm-frv/socket.h1
-rw-r--r--include/asm-generic/audit_change_attr.h18
-rw-r--r--include/asm-generic/audit_dir_write.h14
-rw-r--r--include/asm-generic/sections.h1
-rw-r--r--include/asm-h8300/signal.h2
-rw-r--r--include/asm-h8300/socket.h1
-rw-r--r--include/asm-i386/alternative.h8
-rw-r--r--include/asm-i386/floppy.h8
-rw-r--r--include/asm-i386/hw_irq.h10
-rw-r--r--include/asm-i386/mach-visws/setup_arch.h3
-rw-r--r--include/asm-i386/signal.h2
-rw-r--r--include/asm-i386/socket.h1
-rw-r--r--include/asm-ia64/hw_irq.h3
-rw-r--r--include/asm-ia64/irq.h5
-rw-r--r--include/asm-ia64/signal.h4
-rw-r--r--include/asm-ia64/sn/tioca_provider.h2
-rw-r--r--include/asm-ia64/socket.h1
-rw-r--r--include/asm-m32r/hw_irq.h5
-rw-r--r--include/asm-m32r/signal.h2
-rw-r--r--include/asm-m32r/socket.h1
-rw-r--r--include/asm-m68k/floppy.h4
-rw-r--r--include/asm-m68k/irq.h4
-rw-r--r--include/asm-m68k/signal.h2
-rw-r--r--include/asm-m68k/socket.h1
-rw-r--r--include/asm-m68k/sun3xflop.h3
-rw-r--r--include/asm-m68knommu/irq.h4
-rw-r--r--include/asm-m68knommu/signal.h2
-rw-r--r--include/asm-mips/asmmacro.h4
-rw-r--r--include/asm-mips/cpu-features.h20
-rw-r--r--include/asm-mips/fixmap.h4
-rw-r--r--include/asm-mips/hazards.h4
-rw-r--r--include/asm-mips/hw_irq.h8
-rw-r--r--include/asm-mips/irq.h4
-rw-r--r--include/asm-mips/mach-au1x00/au1xxx_psc.h2
-rw-r--r--include/asm-mips/mach-generic/floppy.h2
-rw-r--r--include/asm-mips/mach-jazz/floppy.h2
-rw-r--r--include/asm-mips/mach-mips/irq.h6
-rw-r--r--include/asm-mips/mipsregs.h3
-rw-r--r--include/asm-mips/signal.h11
-rw-r--r--include/asm-mips/sn/ioc3.h2
-rw-r--r--include/asm-mips/sn/klconfig.h10
-rw-r--r--include/asm-mips/socket.h1
-rw-r--r--include/asm-mips/stackframe.h16
-rw-r--r--include/asm-mips/unistd.h15
-rw-r--r--include/asm-parisc/assembly.h2
-rw-r--r--include/asm-parisc/compat.h11
-rw-r--r--include/asm-parisc/floppy.h8
-rw-r--r--include/asm-parisc/hw_irq.h9
-rw-r--r--include/asm-parisc/irq.h5
-rw-r--r--include/asm-parisc/pdc.h21
-rw-r--r--include/asm-parisc/pgtable.h8
-rw-r--r--include/asm-parisc/processor.h14
-rw-r--r--include/asm-parisc/signal.h2
-rw-r--r--include/asm-parisc/socket.h1
-rw-r--r--include/asm-parisc/system.h26
-rw-r--r--include/asm-parisc/uaccess.h9
-rw-r--r--include/asm-parisc/unistd.h5
-rw-r--r--include/asm-powerpc/cputable.h48
-rw-r--r--include/asm-powerpc/floppy.h2
-rw-r--r--include/asm-powerpc/hw_irq.h18
-rw-r--r--include/asm-powerpc/irq.h5
-rw-r--r--include/asm-powerpc/iseries/it_lp_queue.h40
-rw-r--r--include/asm-powerpc/kdump.h2
-rw-r--r--include/asm-powerpc/kexec.h9
-rw-r--r--include/asm-powerpc/machdep.h2
-rw-r--r--include/asm-powerpc/mmu.h1
-rw-r--r--include/asm-powerpc/mmu_context.h7
-rw-r--r--include/asm-powerpc/mpc86xx.h5
-rw-r--r--include/asm-powerpc/of_device.h2
-rw-r--r--include/asm-powerpc/pci.h2
-rw-r--r--include/asm-powerpc/pmac_pfunc.h2
-rw-r--r--include/asm-powerpc/rtas.h3
-rw-r--r--include/asm-powerpc/signal.h2
-rw-r--r--include/asm-powerpc/socket.h1
-rw-r--r--include/asm-powerpc/time.h6
-rw-r--r--include/asm-powerpc/todc.h487
-rw-r--r--include/asm-powerpc/tsi108.h109
-rw-r--r--include/asm-powerpc/udbg.h3
-rw-r--r--include/asm-ppc/floppy.h8
-rw-r--r--include/asm-ppc/ocp.h1
-rw-r--r--include/asm-ppc/page.h2
-rw-r--r--include/asm-ppc/pci.h2
-rw-r--r--include/asm-s390/bitops.h42
-rw-r--r--include/asm-s390/cio.h2
-rw-r--r--include/asm-s390/cmb.h4
-rw-r--r--include/asm-s390/dasd.h8
-rw-r--r--include/asm-s390/pgtable.h7
-rw-r--r--include/asm-s390/signal.h2
-rw-r--r--include/asm-s390/socket.h1
-rw-r--r--include/asm-s390/thread_info.h1
-rw-r--r--include/asm-s390/unistd.h4
-rw-r--r--include/asm-sh/floppy.h9
-rw-r--r--include/asm-sh/hw_irq.h5
-rw-r--r--include/asm-sh/mpc1211/keyboard.h2
-rw-r--r--include/asm-sh/signal.h2
-rw-r--r--include/asm-sh/socket.h1
-rw-r--r--include/asm-sh64/hw_irq.h1
-rw-r--r--include/asm-sh64/keyboard.h2
-rw-r--r--include/asm-sh64/signal.h2
-rw-r--r--include/asm-sparc/floppy.h3
-rw-r--r--include/asm-sparc/of_device.h20
-rw-r--r--include/asm-sparc/prom.h12
-rw-r--r--include/asm-sparc/signal.h3
-rw-r--r--include/asm-sparc/socket.h1
-rw-r--r--include/asm-sparc64/floppy.h2
-rw-r--r--include/asm-sparc64/of_device.h20
-rw-r--r--include/asm-sparc64/pbm.h5
-rw-r--r--include/asm-sparc64/prom.h20
-rw-r--r--include/asm-sparc64/sbus.h1
-rw-r--r--include/asm-sparc64/signal.h3
-rw-r--r--include/asm-sparc64/socket.h1
-rw-r--r--include/asm-sparc64/starfire.h2
-rw-r--r--include/asm-sparc64/vdev.h17
-rw-r--r--include/asm-um/hw_irq.h3
-rw-r--r--include/asm-um/io.h5
-rw-r--r--include/asm-um/kmap_types.h20
-rw-r--r--include/asm-v850/hw_irq.h4
-rw-r--r--include/asm-v850/signal.h2
-rw-r--r--include/asm-v850/socket.h1
-rw-r--r--include/asm-x86_64/alternative.h9
-rw-r--r--include/asm-x86_64/floppy.h8
-rw-r--r--include/asm-x86_64/hw_irq.h9
-rw-r--r--include/asm-x86_64/signal.h2
-rw-r--r--include/asm-x86_64/socket.h1
-rw-r--r--include/asm-xtensa/hw_irq.h4
-rw-r--r--include/asm-xtensa/signal.h15
-rw-r--r--include/asm-xtensa/socket.h1
-rw-r--r--include/linux/atmdev.h4
-rw-r--r--include/linux/audit.h25
-rw-r--r--include/linux/compat_ioctl.h5
-rw-r--r--include/linux/cpu.h6
-rw-r--r--include/linux/cpufreq.h6
-rw-r--r--include/linux/devfs_fs.h41
-rw-r--r--include/linux/devfs_fs_kernel.h57
-rw-r--r--include/linux/dqblk_xfs.h4
-rw-r--r--include/linux/elf-em.h5
-rw-r--r--include/linux/err.h4
-rw-r--r--include/linux/fb.h3
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/ide.h1
-rw-r--r--include/linux/interrupt.h61
-rw-r--r--include/linux/ioport.h27
-rw-r--r--include/linux/irq.h365
-rw-r--r--include/linux/isdn/tpam.h55
-rw-r--r--include/linux/key.h8
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/miscdevice.h1
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/mmzone.h38
-rw-r--r--include/linux/net.h1
-rw-r--r--include/linux/netdevice.h27
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/page-flags.h149
-rw-r--r--include/linux/pagemap.h45
-rw-r--r--include/linux/pci.h13
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/pnp.h7
-rw-r--r--include/linux/rcupdate.h24
-rw-r--r--include/linux/rtc.h4
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/security.h51
-rw-r--r--include/linux/serial_core.h1
-rw-r--r--include/linux/signal.h26
-rw-r--r--include/linux/skbuff.h13
-rw-r--r--include/linux/smp.h2
-rw-r--r--include/linux/sunrpc/svc.h4
-rw-r--r--include/linux/swap.h1
-rw-r--r--include/linux/tty_driver.h14
-rw-r--r--include/linux/types.h7
-rw-r--r--include/linux/udp.h2
-rw-r--r--include/linux/ufs_fs.h2
-rw-r--r--include/linux/vmstat.h215
-rw-r--r--include/media/tuner-types.h55
-rw-r--r--include/media/v4l2-dev.h1
-rw-r--r--include/net/af_unix.h6
-rw-r--r--include/net/ip6_route.h2
-rw-r--r--include/net/irda/irda_device.h2
-rw-r--r--include/net/pkt_sched.h18
-rw-r--r--include/net/protocol.h9
-rw-r--r--include/net/scm.h17
-rw-r--r--include/net/sock.h16
-rw-r--r--include/net/tcp.h4
-rw-r--r--include/net/tcp_ecn.h4
-rw-r--r--include/sound/ac97_codec.h1
-rw-r--r--include/sound/ak4xxx-adda.h35
-rw-r--r--include/sound/initval.h3
221 files changed, 2075 insertions, 1077 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index b9beceb3314..b492857fe72 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20060608 66#define ACPI_CA_VERSION 0x20060623
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 288f84903af..a22fe9cf849 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -201,7 +201,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
201acpi_status 201acpi_status
202acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, 202acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
203 union acpi_operand_object *obj_desc, 203 union acpi_operand_object *obj_desc,
204 struct acpi_namespace_node *calling_method_node); 204 struct acpi_walk_state *walk_state);
205 205
206acpi_status 206acpi_status
207acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); 207acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index 14531d48f6b..06972e6637d 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -181,6 +181,12 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
181extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1]; 181extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1];
182extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1]; 182extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1];
183 183
184/*****************************************************************************
185 *
186 * Mutual exlusion within ACPICA subsystem
187 *
188 ****************************************************************************/
189
184/* 190/*
185 * Predefined mutex objects. This array contains the 191 * Predefined mutex objects. This array contains the
186 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. 192 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
@@ -188,6 +194,20 @@ extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1];
188 */ 194 */
189ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; 195ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX];
190 196
197/*
198 * Global lock semaphore works in conjunction with the actual HW global lock
199 */
200ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore;
201
202/*
203 * Spinlocks are used for interfaces that can be possibly called at
204 * interrupt level
205 */
206ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */
207ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
208#define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock
209#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock
210
191/***************************************************************************** 211/*****************************************************************************
192 * 212 *
193 * Miscellaneous globals 213 * Miscellaneous globals
@@ -217,7 +237,6 @@ ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
217ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; 237ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
218ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; 238ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
219ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; 239ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
220ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
221 240
222/* Misc */ 241/* Misc */
223 242
@@ -315,11 +334,6 @@ ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
315ACPI_EXTERN struct acpi_gpe_block_info 334ACPI_EXTERN struct acpi_gpe_block_info
316 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; 335 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
317 336
318/* Spinlocks */
319
320ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
321ACPI_EXTERN acpi_handle acpi_gbl_hardware_lock;
322
323/***************************************************************************** 337/*****************************************************************************
324 * 338 *
325 * Debugger globals 339 * Debugger globals
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h
index 9f22cfcb624..216339a8f1f 100644
--- a/include/acpi/acinterp.h
+++ b/include/acpi/acinterp.h
@@ -287,7 +287,10 @@ acpi_ex_system_wait_event(union acpi_operand_object *time,
287 287
288acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc); 288acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc);
289 289
290acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout); 290acpi_status
291acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout);
292
293acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout);
291 294
292/* 295/*
293 * exoparg1 - ACPI AML execution, 1 operand 296 * exoparg1 - ACPI AML execution, 1 operand
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index 1eeca7adca9..56b80248616 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -47,10 +47,11 @@
47/* acpisrc:struct_defs -- for acpisrc conversion */ 47/* acpisrc:struct_defs -- for acpisrc conversion */
48 48
49#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ 49#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
50#define ACPI_INFINITE_CONCURRENCY 0xFF 50#define ACPI_DO_NOT_WAIT 0
51#define ACPI_SERIALIZED 0xFF
51 52
52typedef void *acpi_mutex;
53typedef u32 acpi_mutex_handle; 53typedef u32 acpi_mutex_handle;
54#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1)
54 55
55/* Total number of aml opcodes defined */ 56/* Total number of aml opcodes defined */
56 57
@@ -79,16 +80,15 @@ union acpi_parse_object;
79 * table below also! 80 * table below also!
80 */ 81 */
81#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ 82#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
82#define ACPI_MTX_CONTROL_METHOD 1 /* Control method termination [TBD: may no longer be necessary] */ 83#define ACPI_MTX_TABLES 1 /* Data for ACPI tables */
83#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ 84#define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */
84#define ACPI_MTX_NAMESPACE 3 /* ACPI Namespace */ 85#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */
85#define ACPI_MTX_EVENTS 4 /* Data for ACPI events */ 86#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */
86#define ACPI_MTX_CACHES 5 /* Internal caches, general purposes */ 87#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */
87#define ACPI_MTX_MEMORY 6 /* Debug memory tracking lists */ 88#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */
88#define ACPI_MTX_DEBUG_CMD_COMPLETE 7 /* AML debugger */ 89#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */
89#define ACPI_MTX_DEBUG_CMD_READY 8 /* AML debugger */ 90
90 91#define ACPI_MAX_MUTEX 7
91#define ACPI_MAX_MUTEX 8
92#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 92#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1
93 93
94#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 94#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
@@ -98,14 +98,13 @@ union acpi_parse_object;
98 98
99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { 99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
100 "ACPI_MTX_Interpreter", 100 "ACPI_MTX_Interpreter",
101 "ACPI_MTX_Method",
102 "ACPI_MTX_Tables", 101 "ACPI_MTX_Tables",
103 "ACPI_MTX_Namespace", 102 "ACPI_MTX_Namespace",
104 "ACPI_MTX_Events", 103 "ACPI_MTX_Events",
105 "ACPI_MTX_Caches", 104 "ACPI_MTX_Caches",
106 "ACPI_MTX_Memory", 105 "ACPI_MTX_Memory",
107 "ACPI_MTX_DebugCmdComplete", 106 "ACPI_MTX_CommandComplete",
108 "ACPI_MTX_DebugCmdReady" 107 "ACPI_MTX_CommandReady"
109}; 108};
110 109
111#endif 110#endif
@@ -705,6 +704,13 @@ struct acpi_bit_register_info {
705}; 704};
706 705
707/* 706/*
707 * Some ACPI registers have bits that must be ignored -- meaning that they
708 * must be preserved.
709 */
710#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */
711#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) */
712
713/*
708 * Register IDs 714 * Register IDs
709 * These are the full ACPI registers 715 * These are the full ACPI registers
710 */ 716 */
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 38f9aa4bef0..4bb38068f40 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -394,6 +394,8 @@
394#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 394#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
395#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) 395#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
396 396
397#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask))
398
397/* Generate a UUID */ 399/* Generate a UUID */
398 400
399#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ 401#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index 1747d94084d..8fdee31119f 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -140,14 +140,14 @@ struct acpi_object_package {
140 *****************************************************************************/ 140 *****************************************************************************/
141 141
142struct acpi_object_event { 142struct acpi_object_event {
143 ACPI_OBJECT_COMMON_HEADER void *semaphore; 143 ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */
144}; 144};
145 145
146struct acpi_object_mutex { 146struct acpi_object_mutex {
147 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ 147 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
148 u16 acquisition_depth; /* Allow multiple Acquires, same thread */ 148 u16 acquisition_depth; /* Allow multiple Acquires, same thread */
149 struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ 149 struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
150 void *semaphore; /* Actual OS synchronization object */ 150 acpi_mutex os_mutex; /* Actual OS synchronization object */
151 union acpi_operand_object *prev; /* Link for list of acquired mutexes */ 151 union acpi_operand_object *prev; /* Link for list of acquired mutexes */
152 union acpi_operand_object *next; /* Link for list of acquired mutexes */ 152 union acpi_operand_object *next; /* Link for list of acquired mutexes */
153 struct acpi_namespace_node *node; /* Containing namespace node */ 153 struct acpi_namespace_node *node; /* Containing namespace node */
@@ -166,8 +166,8 @@ struct acpi_object_region {
166struct acpi_object_method { 166struct acpi_object_method {
167 ACPI_OBJECT_COMMON_HEADER u8 method_flags; 167 ACPI_OBJECT_COMMON_HEADER u8 method_flags;
168 u8 param_count; 168 u8 param_count;
169 u8 concurrency; 169 u8 sync_level;
170 void *semaphore; 170 union acpi_operand_object *mutex;
171 u8 *aml_start; 171 u8 *aml_start;
172 ACPI_INTERNAL_METHOD implementation; 172 ACPI_INTERNAL_METHOD implementation;
173 u32 aml_length; 173 u32 aml_length;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index a2b3e390a50..f338e40bd54 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -334,7 +334,7 @@ int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
334 acpi_handle handle, int type); 334 acpi_handle handle, int type);
335int acpi_bus_trim(struct acpi_device *start, int rmdevice); 335int acpi_bus_trim(struct acpi_device *start, int rmdevice);
336int acpi_bus_start(struct acpi_device *device); 336int acpi_bus_start(struct acpi_device *device);
337 337acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd);
338int acpi_match_ids(struct acpi_device *device, char *ids); 338int acpi_match_ids(struct acpi_device *device, char *ids);
339int acpi_create_dir(struct acpi_device *); 339int acpi_create_dir(struct acpi_device *);
340void acpi_remove_dir(struct acpi_device *); 340void acpi_remove_dir(struct acpi_device *);
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index b425f9bb6d4..6a5bdcefec6 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -110,4 +110,21 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
110 110
111extern int acpi_specific_hotkey_enabled; 111extern int acpi_specific_hotkey_enabled;
112 112
113/*--------------------------------------------------------------------------
114 Dock Station
115 -------------------------------------------------------------------------- */
116#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
117extern int is_dock_device(acpi_handle handle);
118extern int register_dock_notifier(struct notifier_block *nb);
119extern void unregister_dock_notifier(struct notifier_block *nb);
120extern int register_hotplug_dock_device(acpi_handle handle,
121 acpi_notify_handler handler, void *context);
122extern void unregister_hotplug_dock_device(acpi_handle handle);
123#else
124#define is_dock_device(h) (0)
125#define register_dock_notifier(nb) (-ENODEV)
126#define unregister_dock_notifier(nb) do { } while(0)
127#define register_hotplug_dock_device(h1, h2, c) (-ENODEV)
128#define unregister_hotplug_dock_device(h) do { } while(0)
129#endif
113#endif /*__ACPI_DRIVERS_H__*/ 130#endif /*__ACPI_DRIVERS_H__*/
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 8f473c83b7c..89bc4a16c2e 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -96,25 +96,47 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
96 struct acpi_table_header **new_table); 96 struct acpi_table_header **new_table);
97 97
98/* 98/*
99 * Synchronization primitives 99 * Spinlock primitives
100 */
101acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
102
103void acpi_os_delete_lock(acpi_spinlock handle);
104
105acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
106
107void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);
108
109/*
110 * Semaphore primitives
100 */ 111 */
101acpi_status 112acpi_status
102acpi_os_create_semaphore(u32 max_units, 113acpi_os_create_semaphore(u32 max_units,
103 u32 initial_units, acpi_handle * out_handle); 114 u32 initial_units, acpi_semaphore * out_handle);
104 115
105acpi_status acpi_os_delete_semaphore(acpi_handle handle); 116acpi_status acpi_os_delete_semaphore(acpi_semaphore handle);
106 117
107acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout); 118acpi_status
119acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout);
120
121acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
122
123/*
124 * Mutex primitives
125 */
126acpi_status acpi_os_create_mutex(acpi_mutex * out_handle);
108 127
109acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units); 128void acpi_os_delete_mutex(acpi_mutex handle);
110 129
111acpi_status acpi_os_create_lock(acpi_handle * out_handle); 130acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);
112 131
113void acpi_os_delete_lock(acpi_handle handle); 132void acpi_os_release_mutex(acpi_mutex handle);
114 133
115acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); 134/* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */
116 135
117void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); 136#define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle)
137#define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphore (handle)
138#define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time)
139#define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphore (handle, 1)
118 140
119/* 141/*
120 * Memory allocation and mapping 142 * Memory allocation and mapping
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 77cf1236b05..64b603cfe92 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -241,7 +241,7 @@ typedef acpi_native_uint acpi_size;
241 241
242/******************************************************************************* 242/*******************************************************************************
243 * 243 *
244 * OS- or compiler-dependent types 244 * OS-dependent and compiler-dependent types
245 * 245 *
246 * If the defaults below are not appropriate for the host system, they can 246 * If the defaults below are not appropriate for the host system, they can
247 * be defined in the compiler-specific or OS-specific header, and this will 247 * be defined in the compiler-specific or OS-specific header, and this will
@@ -249,29 +249,36 @@ typedef acpi_native_uint acpi_size;
249 * 249 *
250 ******************************************************************************/ 250 ******************************************************************************/
251 251
252/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ 252/* Value returned by acpi_os_get_thread_id */
253 253
254#ifndef acpi_uintptr_t 254#ifndef acpi_thread_id
255#define acpi_uintptr_t void * 255#define acpi_thread_id acpi_native_uint
256#endif 256#endif
257 257
258/* 258/* Object returned from acpi_os_create_lock */
259 * If acpi_cache_t was not defined in the OS-dependent header, 259
260 * define it now. This is typically the case where the local cache 260#ifndef acpi_spinlock
261 * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) 261#define acpi_spinlock void *
262 */
263#ifndef acpi_cache_t
264#define acpi_cache_t struct acpi_memory_list
265#endif 262#endif
266 263
267/* 264/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
268 * Allow the CPU flags word to be defined per-OS to simplify the use of the 265
269 * lock and unlock OSL interfaces.
270 */
271#ifndef acpi_cpu_flags 266#ifndef acpi_cpu_flags
272#define acpi_cpu_flags acpi_native_uint 267#define acpi_cpu_flags acpi_native_uint
273#endif 268#endif
274 269
270/* Object returned from acpi_os_create_cache */
271
272#ifndef acpi_cache_t
273#define acpi_cache_t struct acpi_memory_list
274#endif
275
276/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
277
278#ifndef acpi_uintptr_t
279#define acpi_uintptr_t void *
280#endif
281
275/* 282/*
276 * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because 283 * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because
277 * some compilers can catch printf format string problems 284 * some compilers can catch printf format string problems
@@ -298,13 +305,6 @@ typedef acpi_native_uint acpi_size;
298#define ACPI_EXPORT_SYMBOL(symbol) 305#define ACPI_EXPORT_SYMBOL(symbol)
299#endif 306#endif
300 307
301/*
302 * thread_id is returned by acpi_os_get_thread_id.
303 */
304#ifndef acpi_thread_id
305#define acpi_thread_id acpi_native_uint
306#endif
307
308/******************************************************************************* 308/*******************************************************************************
309 * 309 *
310 * Independent types 310 * Independent types
@@ -380,6 +380,11 @@ struct uint32_struct {
380 u32 hi; 380 u32 hi;
381}; 381};
382 382
383/* Synchronization objects */
384
385#define acpi_mutex void *
386#define acpi_semaphore void *
387
383/* 388/*
384 * Acpi integer width. In ACPI version 1, integers are 389 * Acpi integer width. In ACPI version 1, integers are
385 * 32 bits. In ACPI version 2, integers are 64 bits. 390 * 32 bits. In ACPI version 2, integers are 64 bits.
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 277d35bced0..3f853cabbd4 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -58,11 +58,13 @@
58#include <asm/div64.h> 58#include <asm/div64.h>
59#include <asm/acpi.h> 59#include <asm/acpi.h>
60#include <linux/slab.h> 60#include <linux/slab.h>
61#include <linux/spinlock_types.h>
61 62
62/* Host-dependent types and defines */ 63/* Host-dependent types and defines */
63 64
64#define ACPI_MACHINE_WIDTH BITS_PER_LONG 65#define ACPI_MACHINE_WIDTH BITS_PER_LONG
65#define acpi_cache_t kmem_cache_t 66#define acpi_cache_t kmem_cache_t
67#define acpi_spinlock spinlock_t *
66#define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); 68#define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol);
67#define strtoul simple_strtoul 69#define strtoul simple_strtoul
68 70
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 77371b3cdc4..9dd5b75961f 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -62,6 +62,7 @@ struct acpi_processor_cx {
62 u32 latency_ticks; 62 u32 latency_ticks;
63 u32 power; 63 u32 power;
64 u32 usage; 64 u32 usage;
65 u64 time;
65 struct acpi_processor_cx_policy promotion; 66 struct acpi_processor_cx_policy promotion;
66 struct acpi_processor_cx_policy demotion; 67 struct acpi_processor_cx_policy demotion;
67}; 68};
diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h
index 21816d35ef8..6a9f02af952 100644
--- a/include/asm-alpha/floppy.h
+++ b/include/asm-alpha/floppy.h
@@ -26,7 +26,7 @@
26#define fd_disable_irq() disable_irq(FLOPPY_IRQ) 26#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
27#define fd_cacheflush(addr,size) /* nothing */ 27#define fd_cacheflush(addr,size) /* nothing */
28#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ 28#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\
29 SA_INTERRUPT, "floppy", NULL) 29 IRQF_DISABLED, "floppy", NULL)
30#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); 30#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
31 31
32#ifdef CONFIG_PCI 32#ifdef CONFIG_PCI
diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h
index ca9d43b6350..a37db0f9509 100644
--- a/include/asm-alpha/hw_irq.h
+++ b/include/asm-alpha/hw_irq.h
@@ -2,8 +2,6 @@
2#define _ALPHA_HW_IRQ_H 2#define _ALPHA_HW_IRQ_H
3 3
4 4
5static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
6
7extern volatile unsigned long irq_err_count; 5extern volatile unsigned long irq_err_count;
8 6
9#ifdef CONFIG_ALPHA_GENERIC 7#ifdef CONFIG_ALPHA_GENERIC
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
index 1a2c52a056f..13c2305d35e 100644
--- a/include/asm-alpha/signal.h
+++ b/include/asm-alpha/signal.h
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t;
77 * SA_FLAGS values: 77 * SA_FLAGS values:
78 * 78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used. 79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
81 * SA_RESTART flag to get restarting signals (which were the default long ago) 80 * SA_RESTART flag to get restarting signals (which were the default long ago)
82 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
83 * SA_RESETHAND clears the handler when the signal is delivered. 82 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -98,7 +97,6 @@ typedef unsigned long sigset_t;
98 97
99#define SA_ONESHOT SA_RESETHAND 98#define SA_ONESHOT SA_RESETHAND
100#define SA_NOMASK SA_NODEFER 99#define SA_NOMASK SA_NODEFER
101#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
102 100
103/* 101/*
104 * sigaltstack controls 102 * sigaltstack controls
diff --git a/include/asm-alpha/socket.h b/include/asm-alpha/socket.h
index b5193229132..d22ab97ea72 100644
--- a/include/asm-alpha/socket.h
+++ b/include/asm-alpha/socket.h
@@ -51,6 +51,7 @@
51#define SCM_TIMESTAMP SO_TIMESTAMP 51#define SCM_TIMESTAMP SO_TIMESTAMP
52 52
53#define SO_PEERSEC 30 53#define SO_PEERSEC 30
54#define SO_PASSSEC 34
54 55
55/* Security levels - as per NRL IPv6 - don't actually do anything */ 56/* Security levels - as per NRL IPv6 - don't actually do anything */
56#define SO_SECURITY_AUTHENTICATION 19 57#define SO_SECURITY_AUTHENTICATION 19
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h
index 1fdd70b2380..c1ca9a4658e 100644
--- a/include/asm-arm/arch-at91rm9200/board.h
+++ b/include/asm-arm/arch-at91rm9200/board.h
@@ -20,7 +20,7 @@
20 20
21/* 21/*
22 * These are data structures found in platform_device.dev.platform_data, 22 * These are data structures found in platform_device.dev.platform_data,
23 * and describing board-specfic data needed by drivers. For example, 23 * and describing board-specific data needed by drivers. For example,
24 * which pin is used for a given GPIO role. 24 * which pin is used for a given GPIO role.
25 * 25 *
26 * In 2.6, drivers should strongly avoid board-specific knowledge so 26 * In 2.6, drivers should strongly avoid board-specific knowledge so
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
index b59520e56fc..0d517267fb6 100644
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ b/include/asm-arm/arch-ixp4xx/io.h
@@ -38,7 +38,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
38 * 2) If > 64MB of memory space is required, the IXP4xx can be configured 38 * 2) If > 64MB of memory space is required, the IXP4xx can be configured
39 * to use indirect registers to access PCI (as we do below for I/O 39 * to use indirect registers to access PCI (as we do below for I/O
40 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff) 40 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
41 * of memory on the bus. The disadvantadge of this is that every 41 * of memory on the bus. The disadvantage of this is that every
42 * PCI access requires three local register accesses plus a spinlock, 42 * PCI access requires three local register accesses plus a spinlock,
43 * but in some cases the performance hit is acceptable. In addition, 43 * but in some cases the performance hit is acceptable. In addition,
44 * you cannot mmap() PCI devices in this case. 44 * you cannot mmap() PCI devices in this case.
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h
index 7fb02138f58..0e36fd5d87d 100644
--- a/include/asm-arm/bug.h
+++ b/include/asm-arm/bug.h
@@ -1,7 +1,6 @@
1#ifndef _ASMARM_BUG_H 1#ifndef _ASMARM_BUG_H
2#define _ASMARM_BUG_H 2#define _ASMARM_BUG_H
3 3
4#include <linux/config.h>
5 4
6#ifdef CONFIG_BUG 5#ifdef CONFIG_BUG
7#ifdef CONFIG_DEBUG_BUGVERBOSE 6#ifdef CONFIG_DEBUG_BUGVERBOSE
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h
index 25d540ed007..923e0ca6620 100644
--- a/include/asm-arm/mach/pci.h
+++ b/include/asm-arm/mach/pci.h
@@ -28,7 +28,7 @@ struct hw_pci {
28struct pci_sys_data { 28struct pci_sys_data {
29 struct list_head node; 29 struct list_head node;
30 int busnr; /* primary bus number */ 30 int busnr; /* primary bus number */
31 unsigned long mem_offset; /* bus->cpu memory mapping offset */ 31 u64 mem_offset; /* bus->cpu memory mapping offset */
32 unsigned long io_offset; /* bus->cpu IO mapping offset */ 32 unsigned long io_offset; /* bus->cpu IO mapping offset */
33 struct pci_bus *bus; /* PCI bus */ 33 struct pci_bus *bus; /* PCI bus */
34 struct resource *resource[3]; /* Primary PCI bus resources */ 34 struct resource *resource[3]; /* Primary PCI bus resources */
diff --git a/include/asm-arm/socket.h b/include/asm-arm/socket.h
index 3c51da6438c..19f7df702b0 100644
--- a/include/asm-arm/socket.h
+++ b/include/asm-arm/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h
index c52e0bf7535..f28b236139e 100644
--- a/include/asm-arm/thread_info.h
+++ b/include/asm-arm/thread_info.h
@@ -117,7 +117,7 @@ extern void iwmmxt_task_switch(struct thread_info *);
117 117
118/* 118/*
119 * We use bit 30 of the preempt_count to indicate that kernel 119 * We use bit 30 of the preempt_count to indicate that kernel
120 * preemption is occuring. See include/asm-arm/hardirq.h. 120 * preemption is occurring. See include/asm-arm/hardirq.h.
121 */ 121 */
122#define PREEMPT_ACTIVE 0x40000000 122#define PREEMPT_ACTIVE 0x40000000
123 123
diff --git a/include/asm-arm26/floppy.h b/include/asm-arm26/floppy.h
index a18af069ca2..efb732165a4 100644
--- a/include/asm-arm26/floppy.h
+++ b/include/asm-arm26/floppy.h
@@ -22,7 +22,7 @@
22 22
23#define fd_inb(port) inb((port)) 23#define fd_inb(port) inb((port))
24#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ 24#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
25 SA_INTERRUPT,"floppy",NULL) 25 IRQF_DISABLED,"floppy",NULL)
26#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) 26#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)
27#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) 27#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
28#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) 28#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
index 37ad2535559..967ba4947e4 100644
--- a/include/asm-arm26/signal.h
+++ b/include/asm-arm26/signal.h
@@ -82,7 +82,6 @@ typedef unsigned long sigset_t;
82 * is running in 26-bit. 82 * is running in 26-bit.
83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). 83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
84 * SA_RESTART flag to get restarting signals (which were the default long ago) 84 * SA_RESTART flag to get restarting signals (which were the default long ago)
85 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
86 * SA_NODEFER prevents the current signal from being masked in the handler. 85 * SA_NODEFER prevents the current signal from being masked in the handler.
87 * SA_RESETHAND clears the handler when the signal is delivered. 86 * SA_RESETHAND clears the handler when the signal is delivered.
88 * 87 *
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t;
101 100
102#define SA_NOMASK SA_NODEFER 101#define SA_NOMASK SA_NODEFER
103#define SA_ONESHOT SA_RESETHAND 102#define SA_ONESHOT SA_RESETHAND
104#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
105 103
106 104
107/* 105/*
diff --git a/include/asm-arm26/socket.h b/include/asm-arm26/socket.h
index 3c51da6438c..19f7df702b0 100644
--- a/include/asm-arm26/socket.h
+++ b/include/asm-arm26/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-cris/arch-v10/irq.h b/include/asm-cris/arch-v10/irq.h
index 4fa8945b026..b1128a9984a 100644
--- a/include/asm-cris/arch-v10/irq.h
+++ b/include/asm-cris/arch-v10/irq.h
@@ -141,7 +141,7 @@ __asm__ ( \
141 * it here, we would not get the multiple_irq at all. 141 * it here, we would not get the multiple_irq at all.
142 * 142 *
143 * The non-blocking here is based on the knowledge that the timer interrupt is 143 * The non-blocking here is based on the knowledge that the timer interrupt is
144 * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not 144 * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
145 * be an sti() before the timer irq handler is run to acknowledge the interrupt. 145 * be an sti() before the timer irq handler is run to acknowledge the interrupt.
146 */ 146 */
147 147
diff --git a/include/asm-cris/arch-v32/arbiter.h b/include/asm-cris/arch-v32/arbiter.h
index dba3c285cac..081a911d7af 100644
--- a/include/asm-cris/arch-v32/arbiter.h
+++ b/include/asm-cris/arch-v32/arbiter.h
@@ -20,8 +20,8 @@ enum
20 arbiter_all_accesses = 0xff 20 arbiter_all_accesses = 0xff
21}; 21};
22 22
23int crisv32_arbiter_allocate_bandwith(int client, int region, 23int crisv32_arbiter_allocate_bandwidth(int client, int region,
24 unsigned long bandwidth); 24 unsigned long bandwidth);
25int crisv32_arbiter_watch(unsigned long start, unsigned long size, 25int crisv32_arbiter_watch(unsigned long start, unsigned long size,
26 unsigned long clients, unsigned long accesses, 26 unsigned long clients, unsigned long accesses,
27 watch_callback* cb); 27 watch_callback* cb);
diff --git a/include/asm-cris/arch-v32/irq.h b/include/asm-cris/arch-v32/irq.h
index eeb0a80262c..bac94ee6bc9 100644
--- a/include/asm-cris/arch-v32/irq.h
+++ b/include/asm-cris/arch-v32/irq.h
@@ -98,7 +98,7 @@ __asm__ ( \
98 * if we had BLOCK'edit here, we would not get the multiple_irq at all. 98 * if we had BLOCK'edit here, we would not get the multiple_irq at all.
99 * 99 *
100 * The non-blocking here is based on the knowledge that the timer interrupt is 100 * The non-blocking here is based on the knowledge that the timer interrupt is
101 * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not 101 * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
102 * be an sti() before the timer irq handler is run to acknowledge the interrupt. 102 * be an sti() before the timer irq handler is run to acknowledge the interrupt.
103 */ 103 */
104#define BUILD_TIMER_IRQ(nr, mask) \ 104#define BUILD_TIMER_IRQ(nr, mask) \
diff --git a/include/asm-cris/hw_irq.h b/include/asm-cris/hw_irq.h
index 341536a234e..298066020af 100644
--- a/include/asm-cris/hw_irq.h
+++ b/include/asm-cris/hw_irq.h
@@ -1,7 +1,5 @@
1#ifndef _ASM_HW_IRQ_H 1#ifndef _ASM_HW_IRQ_H
2#define _ASM_HW_IRQ_H 2#define _ASM_HW_IRQ_H
3 3
4static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
5
6#endif 4#endif
7 5
diff --git a/include/asm-cris/irq.h b/include/asm-cris/irq.h
index 4b338792218..998cce9f320 100644
--- a/include/asm-cris/irq.h
+++ b/include/asm-cris/irq.h
@@ -1,11 +1,6 @@
1#ifndef _ASM_IRQ_H 1#ifndef _ASM_IRQ_H
2#define _ASM_IRQ_H 2#define _ASM_IRQ_H
3 3
4/*
5 * IRQ line status macro IRQ_PER_CPU is used
6 */
7#define ARCH_HAS_IRQ_PER_CPU
8
9#include <asm/arch/irq.h> 4#include <asm/arch/irq.h>
10 5
11static inline int irq_canonicalize(int irq) 6static inline int irq_canonicalize(int irq)
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h
index dfe039593a7..349ae682b56 100644
--- a/include/asm-cris/signal.h
+++ b/include/asm-cris/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -95,7 +94,6 @@ typedef unsigned long sigset_t;
95 94
96#define SA_NOMASK SA_NODEFER 95#define SA_NOMASK SA_NODEFER
97#define SA_ONESHOT SA_RESETHAND 96#define SA_ONESHOT SA_RESETHAND
98#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
99 97
100#define SA_RESTORER 0x04000000 98#define SA_RESTORER 0x04000000
101 99
diff --git a/include/asm-cris/socket.h b/include/asm-cris/socket.h
index 8b1da3e58c5..01cfdf1d6d3 100644
--- a/include/asm-cris/socket.h
+++ b/include/asm-cris/socket.h
@@ -50,6 +50,7 @@
50#define SO_ACCEPTCONN 30 50#define SO_ACCEPTCONN 30
51 51
52#define SO_PEERSEC 31 52#define SO_PEERSEC 31
53#define SO_PASSSEC 34
53 54
54#endif /* _ASM_SOCKET_H */ 55#endif /* _ASM_SOCKET_H */
55 56
diff --git a/include/asm-frv/irq-routing.h b/include/asm-frv/irq-routing.h
index 686fb2b39d6..ac3ab900a1d 100644
--- a/include/asm-frv/irq-routing.h
+++ b/include/asm-frv/irq-routing.h
@@ -51,7 +51,7 @@ struct irq_source {
51struct irq_level { 51struct irq_level {
52 int usage; 52 int usage;
53 int disable_count; 53 int disable_count;
54 unsigned long flags; /* current SA_INTERRUPT and SA_SHIRQ settings */ 54 unsigned long flags; /* current IRQF_DISABLED and IRQF_SHARED settings */
55 spinlock_t lock; 55 spinlock_t lock;
56 struct irq_source *sources; 56 struct irq_source *sources;
57}; 57};
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h
index dcc1b359291..2079197d483 100644
--- a/include/asm-frv/signal.h
+++ b/include/asm-frv/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99#define SA_RESTORER 0x04000000 97#define SA_RESTORER 0x04000000
100 98
diff --git a/include/asm-frv/socket.h b/include/asm-frv/socket.h
index 7177f8b9817..31db18fc871 100644
--- a/include/asm-frv/socket.h
+++ b/include/asm-frv/socket.h
@@ -48,6 +48,7 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
53 54
diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h
new file mode 100644
index 00000000000..cb05bf69745
--- /dev/null
+++ b/include/asm-generic/audit_change_attr.h
@@ -0,0 +1,18 @@
1__NR_chmod,
2__NR_fchmod,
3__NR_chown,
4__NR_fchown,
5__NR_lchown,
6__NR_setxattr,
7__NR_lsetxattr,
8__NR_fsetxattr,
9__NR_removexattr,
10__NR_lremovexattr,
11__NR_fremovexattr,
12__NR_fchownat,
13__NR_fchmodat,
14#ifdef __NR_chown32
15__NR_chown32,
16__NR_fchown32,
17__NR_lchown32,
18#endif
diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h
new file mode 100644
index 00000000000..161a7a58fba
--- /dev/null
+++ b/include/asm-generic/audit_dir_write.h
@@ -0,0 +1,14 @@
1__NR_rename,
2__NR_mkdir,
3__NR_rmdir,
4__NR_creat,
5__NR_link,
6__NR_unlink,
7__NR_symlink,
8__NR_mknod,
9__NR_mkdirat,
10__NR_mknodat,
11__NR_unlinkat,
12__NR_renameat,
13__NR_linkat,
14__NR_symlinkat,
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 0b49f9e070f..962cad7cfbb 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -14,5 +14,6 @@ extern char _end[];
14extern char __per_cpu_start[], __per_cpu_end[]; 14extern char __per_cpu_start[], __per_cpu_end[];
15extern char __kprobes_text_start[], __kprobes_text_end[]; 15extern char __kprobes_text_start[], __kprobes_text_end[];
16extern char __initdata_begin[], __initdata_end[]; 16extern char __initdata_begin[], __initdata_end[];
17extern char __start_rodata[], __end_rodata[];
17 18
18#endif /* _ASM_GENERIC_SECTIONS_H_ */ 19#endif /* _ASM_GENERIC_SECTIONS_H_ */
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h
index 8eccdc17616..7bc15048a64 100644
--- a/include/asm-h8300/signal.h
+++ b/include/asm-h8300/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99#define SA_RESTORER 0x04000000 97#define SA_RESTORER 0x04000000
100 98
diff --git a/include/asm-h8300/socket.h b/include/asm-h8300/socket.h
index d98cf85bafc..ebc830fee0d 100644
--- a/include/asm-h8300/socket.h
+++ b/include/asm-h8300/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h
index c61bd1a17f3..96adbabec74 100644
--- a/include/asm-i386/alternative.h
+++ b/include/asm-i386/alternative.h
@@ -19,11 +19,19 @@ struct alt_instr {
19extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); 19extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
20 20
21struct module; 21struct module;
22#ifdef CONFIG_SMP
22extern void alternatives_smp_module_add(struct module *mod, char *name, 23extern void alternatives_smp_module_add(struct module *mod, char *name,
23 void *locks, void *locks_end, 24 void *locks, void *locks_end,
24 void *text, void *text_end); 25 void *text, void *text_end);
25extern void alternatives_smp_module_del(struct module *mod); 26extern void alternatives_smp_module_del(struct module *mod);
26extern void alternatives_smp_switch(int smp); 27extern void alternatives_smp_switch(int smp);
28#else
29static inline void alternatives_smp_module_add(struct module *mod, char *name,
30 void *locks, void *locks_end,
31 void *text, void *text_end) {}
32static inline void alternatives_smp_module_del(struct module *mod) {}
33static inline void alternatives_smp_switch(int smp) {}
34#endif
27 35
28#endif 36#endif
29 37
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h
index 9cb2793eb21..359ead60b71 100644
--- a/include/asm-i386/floppy.h
+++ b/include/asm-i386/floppy.h
@@ -144,11 +144,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
144static int fd_request_irq(void) 144static int fd_request_irq(void)
145{ 145{
146 if(can_use_virtual_dma) 146 if(can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 "floppy", NULL); 148 IRQF_DISABLED, "floppy", NULL);
149 else 149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 "floppy", NULL); 151 IRQF_DISABLED, "floppy", NULL);
152 152
153} 153}
154 154
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index a4c0a5a9ffd..87e5a351d88 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -69,14 +69,4 @@ extern atomic_t irq_mis_count;
69 69
70#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) 70#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
71 71
72#if defined(CONFIG_X86_IO_APIC)
73static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
74{
75 if (IO_APIC_IRQ(i))
76 send_IPI_self(IO_APIC_VECTOR(i));
77}
78#else
79static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
80#endif
81
82#endif /* _ASM_HW_IRQ_H */ 72#endif /* _ASM_HW_IRQ_H */
diff --git a/include/asm-i386/mach-visws/setup_arch.h b/include/asm-i386/mach-visws/setup_arch.h
index b92d6d9a4d3..33f700ef683 100644
--- a/include/asm-i386/mach-visws/setup_arch.h
+++ b/include/asm-i386/mach-visws/setup_arch.h
@@ -1,5 +1,8 @@
1/* Hook to call BIOS initialisation function */ 1/* Hook to call BIOS initialisation function */
2 2
3extern unsigned long sgivwfb_mem_phys;
4extern unsigned long sgivwfb_mem_size;
5
3/* no action for visws */ 6/* no action for visws */
4 7
5#define ARCH_SETUP 8#define ARCH_SETUP
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 026fd231488..3824a502351 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t;
77 * SA_FLAGS values: 77 * SA_FLAGS values:
78 * 78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used. 79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
81 * SA_RESTART flag to get restarting signals (which were the default long ago) 80 * SA_RESTART flag to get restarting signals (which were the default long ago)
82 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
83 * SA_RESETHAND clears the handler when the signal is delivered. 82 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -97,7 +96,6 @@ typedef unsigned long sigset_t;
97 96
98#define SA_NOMASK SA_NODEFER 97#define SA_NOMASK SA_NODEFER
99#define SA_ONESHOT SA_RESETHAND 98#define SA_ONESHOT SA_RESETHAND
100#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
101 99
102#define SA_RESTORER 0x04000000 100#define SA_RESTORER 0x04000000
103 101
diff --git a/include/asm-i386/socket.h b/include/asm-i386/socket.h
index 802ae76195b..5755d57c4e9 100644
--- a/include/asm-i386/socket.h
+++ b/include/asm-i386/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
index ea8b8c407ab..27f9df6b914 100644
--- a/include/asm-ia64/hw_irq.h
+++ b/include/asm-ia64/hw_irq.h
@@ -97,8 +97,7 @@ extern int reserve_irq_vector (int vector);
97extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); 97extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
98extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); 98extern void register_percpu_irq (ia64_vector vec, struct irqaction *action);
99 99
100static inline void 100static inline void ia64_resend_irq(unsigned int vector)
101hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector)
102{ 101{
103 platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); 102 platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
104} 103}
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h
index dbe86c0bbce..8acb00190d5 100644
--- a/include/asm-ia64/irq.h
+++ b/include/asm-ia64/irq.h
@@ -14,10 +14,7 @@
14#define NR_IRQS 256 14#define NR_IRQS 256
15#define NR_IRQ_VECTORS NR_IRQS 15#define NR_IRQ_VECTORS NR_IRQS
16 16
17/* 17#define IRQF_PERCPU 0x02000000
18 * IRQ line status macro IRQ_PER_CPU is used
19 */
20#define ARCH_HAS_IRQ_PER_CPU
21 18
22static __inline__ int 19static __inline__ int
23irq_canonicalize (int irq) 20irq_canonicalize (int irq)
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h
index 5e328ed5d01..4f5ca5643cb 100644
--- a/include/asm-ia64/signal.h
+++ b/include/asm-ia64/signal.h
@@ -56,7 +56,6 @@
56 * SA_FLAGS values: 56 * SA_FLAGS values:
57 * 57 *
58 * SA_ONSTACK indicates that a registered stack_t will be used. 58 * SA_ONSTACK indicates that a registered stack_t will be used.
59 * SA_INTERRUPT is a no-op, but left due to historical reasons.
60 * SA_RESTART flag to get restarting signals (which were the default long ago) 59 * SA_RESTART flag to get restarting signals (which were the default long ago)
61 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 60 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
62 * SA_RESETHAND clears the handler when the signal is delivered. 61 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -76,7 +75,6 @@
76 75
77#define SA_NOMASK SA_NODEFER 76#define SA_NOMASK SA_NODEFER
78#define SA_ONESHOT SA_RESETHAND 77#define SA_ONESHOT SA_RESETHAND
79#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
80 78
81#define SA_RESTORER 0x04000000 79#define SA_RESTORER 0x04000000
82 80
@@ -114,8 +112,6 @@
114#define _NSIG_BPW 64 112#define _NSIG_BPW 64
115#define _NSIG_WORDS (_NSIG / _NSIG_BPW) 113#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
116 114
117#define SA_PERCPU_IRQ 0x02000000
118
119#endif /* __KERNEL__ */ 115#endif /* __KERNEL__ */
120 116
121#include <asm-generic/signal.h> 117#include <asm-generic/signal.h>
diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h
index ab7fe246346..65cdd73c2a5 100644
--- a/include/asm-ia64/sn/tioca_provider.h
+++ b/include/asm-ia64/sn/tioca_provider.h
@@ -27,7 +27,7 @@
27#define PV908234 (1 << 1) 27#define PV908234 (1 << 1)
28 /* CA:AGPDMA write request data mismatch with ABC1CL merge */ 28 /* CA:AGPDMA write request data mismatch with ABC1CL merge */
29#define PV895469 (1 << 1) 29#define PV895469 (1 << 1)
30 /* TIO:CA TLB invalidate of written GART entries possibly not occuring in CA*/ 30 /* TIO:CA TLB invalidate of written GART entries possibly not occurring in CA*/
31#define PV910244 (1 << 1) 31#define PV910244 (1 << 1)
32 32
33struct tioca_dmamap{ 33struct tioca_dmamap{
diff --git a/include/asm-ia64/socket.h b/include/asm-ia64/socket.h
index a255006fb7b..d638ef3d50c 100644
--- a/include/asm-ia64/socket.h
+++ b/include/asm-ia64/socket.h
@@ -57,5 +57,6 @@
57#define SO_ACCEPTCONN 30 57#define SO_ACCEPTCONN 30
58 58
59#define SO_PEERSEC 31 59#define SO_PEERSEC 31
60#define SO_PASSSEC 34
60 61
61#endif /* _ASM_IA64_SOCKET_H */ 62#endif /* _ASM_IA64_SOCKET_H */
diff --git a/include/asm-m32r/hw_irq.h b/include/asm-m32r/hw_irq.h
index 8d7e9d0e09e..7138537cda0 100644
--- a/include/asm-m32r/hw_irq.h
+++ b/include/asm-m32r/hw_irq.h
@@ -1,9 +1,4 @@
1#ifndef _ASM_M32R_HW_IRQ_H 1#ifndef _ASM_M32R_HW_IRQ_H
2#define _ASM_M32R_HW_IRQ_H 2#define _ASM_M32R_HW_IRQ_H
3 3
4static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
5{
6 /* Nothing to do */
7}
8
9#endif /* _ASM_M32R_HW_IRQ_H */ 4#endif /* _ASM_M32R_HW_IRQ_H */
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h
index 95f69b19195..e750045164d 100644
--- a/include/asm-m32r/signal.h
+++ b/include/asm-m32r/signal.h
@@ -81,7 +81,6 @@ typedef unsigned long sigset_t;
81 * SA_FLAGS values: 81 * SA_FLAGS values:
82 * 82 *
83 * SA_ONSTACK indicates that a registered stack_t will be used. 83 * SA_ONSTACK indicates that a registered stack_t will be used.
84 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
85 * SA_RESTART flag to get restarting signals (which were the default long ago) 84 * SA_RESTART flag to get restarting signals (which were the default long ago)
86 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 85 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
87 * SA_RESETHAND clears the handler when the signal is delivered. 86 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t;
101 100
102#define SA_NOMASK SA_NODEFER 101#define SA_NOMASK SA_NODEFER
103#define SA_ONESHOT SA_RESETHAND 102#define SA_ONESHOT SA_RESETHAND
104#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
105 103
106#define SA_RESTORER 0x04000000 104#define SA_RESTORER 0x04000000
107 105
diff --git a/include/asm-m32r/socket.h b/include/asm-m32r/socket.h
index 8b6680f223c..acdf748fcdc 100644
--- a/include/asm-m32r/socket.h
+++ b/include/asm-m32r/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_M32R_SOCKET_H */ 53#endif /* _ASM_M32R_SOCKET_H */
diff --git a/include/asm-m68k/floppy.h b/include/asm-m68k/floppy.h
index 63a05ed95c1..57f4fdda65a 100644
--- a/include/asm-m68k/floppy.h
+++ b/include/asm-m68k/floppy.h
@@ -88,8 +88,8 @@ static __inline__ void fd_outb(unsigned char value, int port)
88static int fd_request_irq(void) 88static int fd_request_irq(void)
89{ 89{
90 if(MACH_IS_Q40) 90 if(MACH_IS_Q40)
91 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 91 return request_irq(FLOPPY_IRQ, floppy_hardint,
92 "floppy", floppy_hardint); 92 IRQF_DISABLED, "floppy", floppy_hardint);
93 else if(MACH_IS_SUN3X) 93 else if(MACH_IS_SUN3X)
94 return sun3xflop_request_irq(); 94 return sun3xflop_request_irq();
95 return -ENXIO; 95 return -ENXIO;
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h
index f4ae7d8feac..3257f988100 100644
--- a/include/asm-m68k/irq.h
+++ b/include/asm-m68k/irq.h
@@ -67,8 +67,8 @@ struct pt_regs;
67 67
68/* 68/*
69 * various flags for request_irq() - the Amiga now uses the standard 69 * various flags for request_irq() - the Amiga now uses the standard
70 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ 70 * mechanism like all other architectures - IRQF_DISABLED and
71 * are your friends. 71 * IRQF_SHARED are your friends.
72 */ 72 */
73#ifndef MACH_AMIGA_ONLY 73#ifndef MACH_AMIGA_ONLY
74#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ 74#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h
index 85037a3d3e8..de1ba6ead3b 100644
--- a/include/asm-m68k/signal.h
+++ b/include/asm-m68k/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99/* 97/*
100 * sigaltstack controls 98 * sigaltstack controls
diff --git a/include/asm-m68k/socket.h b/include/asm-m68k/socket.h
index f578ca4b776..a5966ec005a 100644
--- a/include/asm-m68k/socket.h
+++ b/include/asm-m68k/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h
index 98a9f79dab2..ca8cc411384 100644
--- a/include/asm-m68k/sun3xflop.h
+++ b/include/asm-m68k/sun3xflop.h
@@ -208,7 +208,8 @@ static int sun3xflop_request_irq(void)
208 208
209 if(!once) { 209 if(!once) {
210 once = 1; 210 once = 1;
211 error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, SA_INTERRUPT, "floppy", NULL); 211 error = request_irq(FLOPPY_IRQ, sun3xflop_hardint,
212 IRQF_DISABLED, "floppy", NULL);
212 return ((error == 0) ? 0 : -1); 213 return ((error == 0) ? 0 : -1);
213 } else return 0; 214 } else return 0;
214} 215}
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h
index 53557274eef..45e7a2fd168 100644
--- a/include/asm-m68knommu/irq.h
+++ b/include/asm-m68knommu/irq.h
@@ -62,8 +62,8 @@ extern void (*mach_disable_irq)(unsigned int);
62 62
63/* 63/*
64 * various flags for request_irq() - the Amiga now uses the standard 64 * various flags for request_irq() - the Amiga now uses the standard
65 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ 65 * mechanism like all other architectures - IRQF_DISABLED and
66 * are your friends. 66 * IRQF_SHARED are your friends.
67 */ 67 */
68#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ 68#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
69#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ 69#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h
index 1d13187f606..216c08be54a 100644
--- a/include/asm-m68knommu/signal.h
+++ b/include/asm-m68knommu/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99/* 97/*
100 * sigaltstack controls 98 * sigaltstack controls
diff --git a/include/asm-mips/asmmacro.h b/include/asm-mips/asmmacro.h
index 2c42f6b00a4..92e62ef711e 100644
--- a/include/asm-mips/asmmacro.h
+++ b/include/asm-mips/asmmacro.h
@@ -26,14 +26,14 @@
26 ori \reg, \reg, TCSTATUS_IXMT 26 ori \reg, \reg, TCSTATUS_IXMT
27 xori \reg, \reg, TCSTATUS_IXMT 27 xori \reg, \reg, TCSTATUS_IXMT
28 mtc0 \reg, CP0_TCSTATUS 28 mtc0 \reg, CP0_TCSTATUS
29 ehb 29 _ehb
30 .endm 30 .endm
31 31
32 .macro local_irq_disable reg=t0 32 .macro local_irq_disable reg=t0
33 mfc0 \reg, CP0_TCSTATUS 33 mfc0 \reg, CP0_TCSTATUS
34 ori \reg, \reg, TCSTATUS_IXMT 34 ori \reg, \reg, TCSTATUS_IXMT
35 mtc0 \reg, CP0_TCSTATUS 35 mtc0 \reg, CP0_TCSTATUS
36 ehb 36 _ehb
37 .endm 37 .endm
38#else 38#else
39 .macro local_irq_enable reg=t0 39 .macro local_irq_enable reg=t0
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h
index 881ce1f9803..44285a9d552 100644
--- a/include/asm-mips/cpu-features.h
+++ b/include/asm-mips/cpu-features.h
@@ -187,19 +187,15 @@
187# endif 187# endif
188#endif 188#endif
189 189
190#ifdef CONFIG_CPU_MIPSR2 190#if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint)
191# if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint) 191# define cpu_has_vint (cpu_data[0].options & MIPS_CPU_VINT)
192# define cpu_has_vint (cpu_data[0].options & MIPS_CPU_VINT) 192#elif !defined(cpu_has_vint)
193# else
194# define cpu_has_vint 0
195# endif
196# if defined(CONFIG_CPU_MIPSR2_IRQ_EI) && !defined(cpu_has_veic)
197# define cpu_has_veic (cpu_data[0].options & MIPS_CPU_VEIC)
198# else
199# define cpu_has_veic 0
200# endif
201#else
202# define cpu_has_vint 0 193# define cpu_has_vint 0
194#endif
195
196#if defined(CONFIG_CPU_MIPSR2_IRQ_EI) && !defined(cpu_has_veic)
197# define cpu_has_veic (cpu_data[0].options & MIPS_CPU_VEIC)
198#elif !defined(cpu_has_veic)
203# define cpu_has_veic 0 199# define cpu_has_veic 0
204#endif 200#endif
205 201
diff --git a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h
index 1cadefbbc03..6959bdb5931 100644
--- a/include/asm-mips/fixmap.h
+++ b/include/asm-mips/fixmap.h
@@ -69,7 +69,11 @@ extern void __set_fixmap (enum fixed_addresses idx,
69 * the start of the fixmap, and leave one page empty 69 * the start of the fixmap, and leave one page empty
70 * at the top of mem.. 70 * at the top of mem..
71 */ 71 */
72#if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX)
73#define FIXADDR_TOP (0xff000000UL - 0x2000)
74#else
72#define FIXADDR_TOP (0xffffe000UL) 75#define FIXADDR_TOP (0xffffe000UL)
76#endif
73#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 77#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
74#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 78#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
75 79
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h
index 66943c451c1..25f5e8a4177 100644
--- a/include/asm-mips/hazards.h
+++ b/include/asm-mips/hazards.h
@@ -69,10 +69,10 @@
69 * Use a macro for ehb unless explicit support for MIPSR2 is enabled 69 * Use a macro for ehb unless explicit support for MIPSR2 is enabled
70 */ 70 */
71 71
72#define irq_enable_hazard 72#define irq_enable_hazard \
73 _ehb 73 _ehb
74 74
75#define irq_disable_hazard 75#define irq_disable_hazard \
76 _ehb 76 _ehb
77 77
78#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) 78#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000)
diff --git a/include/asm-mips/hw_irq.h b/include/asm-mips/hw_irq.h
index c854d017c0e..458d9fdc76b 100644
--- a/include/asm-mips/hw_irq.h
+++ b/include/asm-mips/hw_irq.h
@@ -19,9 +19,9 @@ extern void init_8259A(int aeoi);
19 19
20extern atomic_t irq_err_count; 20extern atomic_t irq_err_count;
21 21
22/* This may not be apropriate for all machines, we'll see ... */ 22/*
23static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) 23 * interrupt-retrigger: NOP for now. This may not be apropriate for all
24{ 24 * machines, we'll see ...
25} 25 */
26 26
27#endif /* __ASM_HW_IRQ_H */ 27#endif /* __ASM_HW_IRQ_H */
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index d35c61776a0..896550bad32 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -76,4 +76,8 @@ extern int setup_irq_smtc(unsigned int irq, struct irqaction * new,
76 unsigned long hwmask); 76 unsigned long hwmask);
77#endif /* CONFIG_MIPS_MT_SMTC */ 77#endif /* CONFIG_MIPS_MT_SMTC */
78 78
79#ifdef CONFIG_SMP
80#define ARCH_HAS_IRQ_PER_CPU
81#endif
82
79#endif /* _ASM_IRQ_H */ 83#endif /* _ASM_IRQ_H */
diff --git a/include/asm-mips/mach-au1x00/au1xxx_psc.h b/include/asm-mips/mach-au1x00/au1xxx_psc.h
index d7cbacdd21f..1bd4e27caf6 100644
--- a/include/asm-mips/mach-au1x00/au1xxx_psc.h
+++ b/include/asm-mips/mach-au1x00/au1xxx_psc.h
@@ -512,7 +512,7 @@ typedef struct psc_smb {
512 512
513/* Transmit register control. 513/* Transmit register control.
514*/ 514*/
515#define PSC_SMBTXRX_RSR (1 << 30) 515#define PSC_SMBTXRX_RSR (1 << 28)
516#define PSC_SMBTXRX_STP (1 << 29) 516#define PSC_SMBTXRX_STP (1 << 29)
517#define PSC_SMBTXRX_DATAMASK (0xff) 517#define PSC_SMBTXRX_DATAMASK (0xff)
518 518
diff --git a/include/asm-mips/mach-generic/floppy.h b/include/asm-mips/mach-generic/floppy.h
index 83cd69e30ec..001a8ce17c1 100644
--- a/include/asm-mips/mach-generic/floppy.h
+++ b/include/asm-mips/mach-generic/floppy.h
@@ -98,7 +98,7 @@ static inline void fd_disable_irq(void)
98static inline int fd_request_irq(void) 98static inline int fd_request_irq(void)
99{ 99{
100 return request_irq(FLOPPY_IRQ, floppy_interrupt, 100 return request_irq(FLOPPY_IRQ, floppy_interrupt,
101 SA_INTERRUPT, "floppy", NULL); 101 IRQF_DISABLED, "floppy", NULL);
102} 102}
103 103
104static inline void fd_free_irq(void) 104static inline void fd_free_irq(void)
diff --git a/include/asm-mips/mach-jazz/floppy.h b/include/asm-mips/mach-jazz/floppy.h
index 9413117915f..56e9ca6ae42 100644
--- a/include/asm-mips/mach-jazz/floppy.h
+++ b/include/asm-mips/mach-jazz/floppy.h
@@ -90,7 +90,7 @@ static inline void fd_disable_irq(void)
90static inline int fd_request_irq(void) 90static inline int fd_request_irq(void)
91{ 91{
92 return request_irq(FLOPPY_IRQ, floppy_interrupt, 92 return request_irq(FLOPPY_IRQ, floppy_interrupt,
93 SA_INTERRUPT, "floppy", NULL); 93 IRQF_DISABLED, "floppy", NULL);
94} 94}
95 95
96static inline void fd_free_irq(void) 96static inline void fd_free_irq(void)
diff --git a/include/asm-mips/mach-mips/irq.h b/include/asm-mips/mach-mips/irq.h
index 083d9c512a0..e994b0c0122 100644
--- a/include/asm-mips/mach-mips/irq.h
+++ b/include/asm-mips/mach-mips/irq.h
@@ -4,10 +4,4 @@
4 4
5#define NR_IRQS 256 5#define NR_IRQS 256
6 6
7#ifdef CONFIG_SMP
8
9#define ARCH_HAS_IRQ_PER_CPU
10
11#endif
12
13#endif /* __ASM_MACH_MIPS_IRQ_H */ 7#endif /* __ASM_MACH_MIPS_IRQ_H */
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h
index 673977901ed..9192d76c133 100644
--- a/include/asm-mips/mipsregs.h
+++ b/include/asm-mips/mipsregs.h
@@ -1459,7 +1459,8 @@ static inline void __emt(unsigned int previous)
1459static inline void __ehb(void) 1459static inline void __ehb(void)
1460{ 1460{
1461 __asm__ __volatile__( 1461 __asm__ __volatile__(
1462 " ehb \n"); 1462 " .set mips32r2 \n"
1463 " ehb \n" " .set mips0 \n");
1463} 1464}
1464 1465
1465/* 1466/*
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h
index a1f3a3fa9bd..87a1dff9519 100644
--- a/include/asm-mips/signal.h
+++ b/include/asm-mips/signal.h
@@ -64,7 +64,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
64 * SA_FLAGS values: 64 * SA_FLAGS values:
65 * 65 *
66 * SA_ONSTACK indicates that a registered stack_t will be used. 66 * SA_ONSTACK indicates that a registered stack_t will be used.
67 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
68 * SA_RESTART flag to get restarting signals (which were the default long ago) 67 * SA_RESTART flag to get restarting signals (which were the default long ago)
69 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
70 * SA_RESETHAND clears the handler when the signal is delivered. 69 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -84,7 +83,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
84 83
85#define SA_NOMASK SA_NODEFER 84#define SA_NOMASK SA_NODEFER
86#define SA_ONESHOT SA_RESETHAND 85#define SA_ONESHOT SA_RESETHAND
87#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
88 86
89#define SA_RESTORER 0x04000000 /* Only for o32 */ 87#define SA_RESTORER 0x04000000 /* Only for o32 */
90 88
@@ -99,15 +97,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
99 97
100#ifdef __KERNEL__ 98#ifdef __KERNEL__
101 99
102/*
103 * These values of sa_flags are used only by the kernel as part of the
104 * irq handling routines.
105 *
106 * SA_INTERRUPT is also used by the irq handling routines.
107 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
108 */
109#define SA_SAMPLE_RANDOM SA_RESTART
110
111#ifdef CONFIG_TRAD_SIGNALS 100#ifdef CONFIG_TRAD_SIGNALS
112#define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO) 101#define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO)
113#else 102#else
diff --git a/include/asm-mips/sn/ioc3.h b/include/asm-mips/sn/ioc3.h
index f7d530f306f..099677774d7 100644
--- a/include/asm-mips/sn/ioc3.h
+++ b/include/asm-mips/sn/ioc3.h
@@ -5,6 +5,8 @@
5#ifndef _IOC3_H 5#ifndef _IOC3_H
6#define _IOC3_H 6#define _IOC3_H
7 7
8#include <linux/types.h>
9
8/* SUPERIO uart register map */ 10/* SUPERIO uart register map */
9typedef volatile struct ioc3_uartregs { 11typedef volatile struct ioc3_uartregs {
10 union { 12 union {
diff --git a/include/asm-mips/sn/klconfig.h b/include/asm-mips/sn/klconfig.h
index 52238e65af8..b63cd0655b3 100644
--- a/include/asm-mips/sn/klconfig.h
+++ b/include/asm-mips/sn/klconfig.h
@@ -602,7 +602,7 @@ typedef struct klcpu_s { /* CPU */
602 602
603typedef struct klhub_s { /* HUB */ 603typedef struct klhub_s { /* HUB */
604 klinfo_t hub_info; 604 klinfo_t hub_info;
605 uint hub_flags; /* PCFG_HUB_xxx flags */ 605 unsigned int hub_flags; /* PCFG_HUB_xxx flags */
606 klport_t hub_port; /* hub is connected to this */ 606 klport_t hub_port; /* hub is connected to this */
607 nic_t hub_box_nic; /* nic of containing box */ 607 nic_t hub_box_nic; /* nic of containing box */
608 klconf_off_t hub_mfg_nic; /* MFG NIC string */ 608 klconf_off_t hub_mfg_nic; /* MFG NIC string */
@@ -611,7 +611,7 @@ typedef struct klhub_s { /* HUB */
611 611
612typedef struct klhub_uart_s { /* HUB */ 612typedef struct klhub_uart_s { /* HUB */
613 klinfo_t hubuart_info; 613 klinfo_t hubuart_info;
614 uint hubuart_flags; /* PCFG_HUB_xxx flags */ 614 unsigned int hubuart_flags; /* PCFG_HUB_xxx flags */
615 nic_t hubuart_box_nic; /* nic of containing box */ 615 nic_t hubuart_box_nic; /* nic of containing box */
616} klhub_uart_t ; 616} klhub_uart_t ;
617 617
@@ -710,7 +710,7 @@ typedef struct klvmed_s { /* VME DEVICE - VME BOARD */
710/* XXX - Don't we need the number of ports here?!? */ 710/* XXX - Don't we need the number of ports here?!? */
711typedef struct klrou_s { /* ROUTER */ 711typedef struct klrou_s { /* ROUTER */
712 klinfo_t rou_info ; 712 klinfo_t rou_info ;
713 uint rou_flags ; /* PCFG_ROUTER_xxx flags */ 713 unsigned int rou_flags ; /* PCFG_ROUTER_xxx flags */
714 nic_t rou_box_nic ; /* nic of the containing module */ 714 nic_t rou_box_nic ; /* nic of the containing module */
715 klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */ 715 klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */
716 klconf_off_t rou_mfg_nic ; /* MFG NIC string */ 716 klconf_off_t rou_mfg_nic ; /* MFG NIC string */
@@ -733,8 +733,8 @@ typedef struct klgfx_s { /* GRAPHICS Device */
733 klinfo_t gfx_info; 733 klinfo_t gfx_info;
734 klconf_off_t old_gndevs; /* for compatibility with older proms */ 734 klconf_off_t old_gndevs; /* for compatibility with older proms */
735 klconf_off_t old_gdoff0; /* for compatibility with older proms */ 735 klconf_off_t old_gdoff0; /* for compatibility with older proms */
736 uint cookie; /* for compatibility with older proms */ 736 unsigned int cookie; /* for compatibility with older proms */
737 uint moduleslot; 737 unsigned int moduleslot;
738 struct klgfx_s *gfx_next_pipe; 738 struct klgfx_s *gfx_next_pipe;
739 graphics_t gfx_specific; 739 graphics_t gfx_specific;
740 klconf_off_t pad0; /* for compatibility with older proms */ 740 klconf_off_t pad0; /* for compatibility with older proms */
diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h
index 0bb31e5aaca..36ebe4e186a 100644
--- a/include/asm-mips/socket.h
+++ b/include/asm-mips/socket.h
@@ -69,6 +69,7 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
69#define SO_PEERSEC 30 69#define SO_PEERSEC 30
70#define SO_SNDBUFFORCE 31 70#define SO_SNDBUFFORCE 31
71#define SO_RCVBUFFORCE 33 71#define SO_RCVBUFFORCE 33
72#define SO_PASSSEC 34
72 73
73#ifdef __KERNEL__ 74#ifdef __KERNEL__
74 75
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index 513aa513383..158a4cd12e4 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -304,7 +304,7 @@
304 mfc0 v0, CP0_TCSTATUS 304 mfc0 v0, CP0_TCSTATUS
305 ori v0, TCSTATUS_IXMT 305 ori v0, TCSTATUS_IXMT
306 mtc0 v0, CP0_TCSTATUS 306 mtc0 v0, CP0_TCSTATUS
307 ehb 307 _ehb
308 DMT 5 # dmt a1 308 DMT 5 # dmt a1
309 jal mips_ihb 309 jal mips_ihb
310#endif /* CONFIG_MIPS_MT_SMTC */ 310#endif /* CONFIG_MIPS_MT_SMTC */
@@ -325,14 +325,14 @@
325 * restore TCStatus.IXMT. 325 * restore TCStatus.IXMT.
326 */ 326 */
327 LONG_L v1, PT_TCSTATUS(sp) 327 LONG_L v1, PT_TCSTATUS(sp)
328 ehb 328 _ehb
329 mfc0 v0, CP0_TCSTATUS 329 mfc0 v0, CP0_TCSTATUS
330 andi v1, TCSTATUS_IXMT 330 andi v1, TCSTATUS_IXMT
331 /* We know that TCStatua.IXMT should be set from above */ 331 /* We know that TCStatua.IXMT should be set from above */
332 xori v0, v0, TCSTATUS_IXMT 332 xori v0, v0, TCSTATUS_IXMT
333 or v0, v0, v1 333 or v0, v0, v1
334 mtc0 v0, CP0_TCSTATUS 334 mtc0 v0, CP0_TCSTATUS
335 ehb 335 _ehb
336 andi a1, a1, VPECONTROL_TE 336 andi a1, a1, VPECONTROL_TE
337 beqz a1, 1f 337 beqz a1, 1f
338 emt 338 emt
@@ -411,7 +411,7 @@
411 /* Clear TKSU, leave IXMT */ 411 /* Clear TKSU, leave IXMT */
412 xori t0, 0x00001800 412 xori t0, 0x00001800
413 mtc0 t0, CP0_TCSTATUS 413 mtc0 t0, CP0_TCSTATUS
414 ehb 414 _ehb
415 /* We need to leave the global IE bit set, but clear EXL...*/ 415 /* We need to leave the global IE bit set, but clear EXL...*/
416 mfc0 t0, CP0_STATUS 416 mfc0 t0, CP0_STATUS
417 ori t0, ST0_EXL | ST0_ERL 417 ori t0, ST0_EXL | ST0_ERL
@@ -438,7 +438,7 @@
438 * and enable interrupts only for the 438 * and enable interrupts only for the
439 * current TC, using the TCStatus register. 439 * current TC, using the TCStatus register.
440 */ 440 */
441 ehb 441 _ehb
442 mfc0 t0,CP0_TCSTATUS 442 mfc0 t0,CP0_TCSTATUS
443 /* Fortunately CU 0 is in the same place in both registers */ 443 /* Fortunately CU 0 is in the same place in both registers */
444 /* Set TCU0, TKSU (for later inversion) and IXMT */ 444 /* Set TCU0, TKSU (for later inversion) and IXMT */
@@ -447,7 +447,7 @@
447 /* Clear TKSU *and* IXMT */ 447 /* Clear TKSU *and* IXMT */
448 xori t0, 0x00001c00 448 xori t0, 0x00001c00
449 mtc0 t0, CP0_TCSTATUS 449 mtc0 t0, CP0_TCSTATUS
450 ehb 450 _ehb
451 /* We need to leave the global IE bit set, but clear EXL...*/ 451 /* We need to leave the global IE bit set, but clear EXL...*/
452 mfc0 t0, CP0_STATUS 452 mfc0 t0, CP0_STATUS
453 ori t0, ST0_EXL 453 ori t0, ST0_EXL
@@ -479,7 +479,7 @@
479 andi v1, v0, TCSTATUS_IXMT 479 andi v1, v0, TCSTATUS_IXMT
480 ori v0, TCSTATUS_IXMT 480 ori v0, TCSTATUS_IXMT
481 mtc0 v0, CP0_TCSTATUS 481 mtc0 v0, CP0_TCSTATUS
482 ehb 482 _ehb
483 DMT 2 # dmt v0 483 DMT 2 # dmt v0
484 /* 484 /*
485 * We don't know a priori if ra is "live" 485 * We don't know a priori if ra is "live"
@@ -495,7 +495,7 @@
495 xori t0, 0x1e 495 xori t0, 0x1e
496 mtc0 t0, CP0_STATUS 496 mtc0 t0, CP0_STATUS
497#ifdef CONFIG_MIPS_MT_SMTC 497#ifdef CONFIG_MIPS_MT_SMTC
498 ehb 498 _ehb
499 andi v0, v0, VPECONTROL_TE 499 andi v0, v0, VPECONTROL_TE
500 beqz v0, 2f 500 beqz v0, 2f
501 nop /* delay slot */ 501 nop /* delay slot */
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 8bb0bb9b2e6..809f9f55bac 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -326,16 +326,17 @@
326#define __NR_unshare (__NR_Linux + 303) 326#define __NR_unshare (__NR_Linux + 303)
327#define __NR_splice (__NR_Linux + 304) 327#define __NR_splice (__NR_Linux + 304)
328#define __NR_sync_file_range (__NR_Linux + 305) 328#define __NR_sync_file_range (__NR_Linux + 305)
329#define __NR_tee (__NR_Linux + 306)
329 330
330/* 331/*
331 * Offset of the last Linux o32 flavoured syscall 332 * Offset of the last Linux o32 flavoured syscall
332 */ 333 */
333#define __NR_Linux_syscalls 305 334#define __NR_Linux_syscalls 306
334 335
335#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 336#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
336 337
337#define __NR_O32_Linux 4000 338#define __NR_O32_Linux 4000
338#define __NR_O32_Linux_syscalls 305 339#define __NR_O32_Linux_syscalls 306
339 340
340#if _MIPS_SIM == _MIPS_SIM_ABI64 341#if _MIPS_SIM == _MIPS_SIM_ABI64
341 342
@@ -608,16 +609,17 @@
608#define __NR_unshare (__NR_Linux + 262) 609#define __NR_unshare (__NR_Linux + 262)
609#define __NR_splice (__NR_Linux + 263) 610#define __NR_splice (__NR_Linux + 263)
610#define __NR_sync_file_range (__NR_Linux + 264) 611#define __NR_sync_file_range (__NR_Linux + 264)
612#define __NR_tee (__NR_Linux + 265)
611 613
612/* 614/*
613 * Offset of the last Linux 64-bit flavoured syscall 615 * Offset of the last Linux 64-bit flavoured syscall
614 */ 616 */
615#define __NR_Linux_syscalls 264 617#define __NR_Linux_syscalls 265
616 618
617#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 619#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
618 620
619#define __NR_64_Linux 5000 621#define __NR_64_Linux 5000
620#define __NR_64_Linux_syscalls 264 622#define __NR_64_Linux_syscalls 265
621 623
622#if _MIPS_SIM == _MIPS_SIM_NABI32 624#if _MIPS_SIM == _MIPS_SIM_NABI32
623 625
@@ -894,16 +896,17 @@
894#define __NR_unshare (__NR_Linux + 266) 896#define __NR_unshare (__NR_Linux + 266)
895#define __NR_splice (__NR_Linux + 267) 897#define __NR_splice (__NR_Linux + 267)
896#define __NR_sync_file_range (__NR_Linux + 268) 898#define __NR_sync_file_range (__NR_Linux + 268)
899#define __NR_tee (__NR_Linux + 269)
897 900
898/* 901/*
899 * Offset of the last N32 flavoured syscall 902 * Offset of the last N32 flavoured syscall
900 */ 903 */
901#define __NR_Linux_syscalls 268 904#define __NR_Linux_syscalls 269
902 905
903#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 906#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
904 907
905#define __NR_N32_Linux 6000 908#define __NR_N32_Linux 6000
906#define __NR_N32_Linux_syscalls 268 909#define __NR_N32_Linux_syscalls 269
907 910
908#ifdef __KERNEL__ 911#ifdef __KERNEL__
909 912
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h
index 3ce3440d1b0..1a7bfe699e0 100644
--- a/include/asm-parisc/assembly.h
+++ b/include/asm-parisc/assembly.h
@@ -48,6 +48,7 @@
48#define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) 48#define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
49 49
50#ifdef CONFIG_PA20 50#ifdef CONFIG_PA20
51#define LDCW ldcw,co
51#define BL b,l 52#define BL b,l
52# ifdef CONFIG_64BIT 53# ifdef CONFIG_64BIT
53# define LEVEL 2.0w 54# define LEVEL 2.0w
@@ -55,6 +56,7 @@
55# define LEVEL 2.0 56# define LEVEL 2.0
56# endif 57# endif
57#else 58#else
59#define LDCW ldcw
58#define BL bl 60#define BL bl
59#define LEVEL 1.1 61#define LEVEL 1.1
60#endif 62#endif
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h
index 289624d8b2d..71b4eeea205 100644
--- a/include/asm-parisc/compat.h
+++ b/include/asm-parisc/compat.h
@@ -5,6 +5,7 @@
5 */ 5 */
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/personality.h>
8 9
9#define COMPAT_USER_HZ 100 10#define COMPAT_USER_HZ 100
10 11
@@ -149,4 +150,14 @@ static __inline__ void __user *compat_alloc_user_space(long len)
149 return (void __user *)regs->gr[30]; 150 return (void __user *)regs->gr[30];
150} 151}
151 152
153static inline int __is_compat_task(struct task_struct *t)
154{
155 return personality(t->personality) == PER_LINUX32;
156}
157
158static inline int is_compat_task(void)
159{
160 return __is_compat_task(current);
161}
162
152#endif /* _ASM_PARISC_COMPAT_H */ 163#endif /* _ASM_PARISC_COMPAT_H */
diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h
index 458cdb2a753..da2f9c15714 100644
--- a/include/asm-parisc/floppy.h
+++ b/include/asm-parisc/floppy.h
@@ -156,11 +156,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
156static int fd_request_irq(void) 156static int fd_request_irq(void)
157{ 157{
158 if(can_use_virtual_dma) 158 if(can_use_virtual_dma)
159 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 159 return request_irq(FLOPPY_IRQ, floppy_hardint,
160 "floppy", NULL); 160 IRQF_DISABLED, "floppy", NULL);
161 else 161 else
162 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 162 return request_irq(FLOPPY_IRQ, floppy_interrupt,
163 "floppy", NULL); 163 IRQF_DISABLED, "floppy", NULL);
164} 164}
165 165
166static unsigned long dma_mem_alloc(unsigned long size) 166static unsigned long dma_mem_alloc(unsigned long size)
diff --git a/include/asm-parisc/hw_irq.h b/include/asm-parisc/hw_irq.h
index 151426e2752..6707f7df392 100644
--- a/include/asm-parisc/hw_irq.h
+++ b/include/asm-parisc/hw_irq.h
@@ -3,15 +3,6 @@
3 3
4/* 4/*
5 * linux/include/asm/hw_irq.h 5 * linux/include/asm/hw_irq.h
6 *
7 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
8 *
9 * moved some of the old arch/i386/kernel/irq.h to here. VY
10 *
11 * IRQ/IPI changes taken from work by Thomas Radke
12 * <tomsoft@informatik.tu-chemnitz.de>
13 */ 6 */
14 7
15extern void hw_resend_irq(struct hw_interrupt_type *, unsigned int);
16
17#endif 8#endif
diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h
index 377ba90c7d0..5cae260615a 100644
--- a/include/asm-parisc/irq.h
+++ b/include/asm-parisc/irq.h
@@ -26,11 +26,6 @@
26 26
27#define NR_IRQS (CPU_IRQ_MAX + 1) 27#define NR_IRQS (CPU_IRQ_MAX + 1)
28 28
29/*
30 * IRQ line status macro IRQ_PER_CPU is used
31 */
32#define ARCH_HAS_IRQ_PER_CPU
33
34static __inline__ int irq_canonicalize(int irq) 29static __inline__ int irq_canonicalize(int irq)
35{ 30{
36 return (irq == 2) ? 9 : irq; 31 return (irq == 2) ? 9 : irq;
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
index 08364f957e7..c9b2e35326e 100644
--- a/include/asm-parisc/pdc.h
+++ b/include/asm-parisc/pdc.h
@@ -278,12 +278,11 @@ typedef struct {
278/* constants for OS (NVM...) */ 278/* constants for OS (NVM...) */
279#define OS_ID_NONE 0 /* Undefined OS ID */ 279#define OS_ID_NONE 0 /* Undefined OS ID */
280#define OS_ID_HPUX 1 /* HP-UX OS */ 280#define OS_ID_HPUX 1 /* HP-UX OS */
281#define OS_ID_LINUX OS_ID_HPUX /* just use the same value as hpux */
282#define OS_ID_MPEXL 2 /* MPE XL OS */ 281#define OS_ID_MPEXL 2 /* MPE XL OS */
283#define OS_ID_OSF 3 /* OSF OS */ 282#define OS_ID_OSF 3 /* OSF OS */
284#define OS_ID_HPRT 4 /* HP-RT OS */ 283#define OS_ID_HPRT 4 /* HP-RT OS */
285#define OS_ID_NOVEL 5 /* NOVELL OS */ 284#define OS_ID_NOVEL 5 /* NOVELL OS */
286#define OS_ID_NT 6 /* NT OS */ 285#define OS_ID_LINUX 6 /* Linux */
287 286
288 287
289/* constants for PDC_CHASSIS */ 288/* constants for PDC_CHASSIS */
@@ -352,8 +351,8 @@ struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */
352 cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */ 351 cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */
353 cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */ 352 cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */
354 cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */ 353 cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */
355 cc_pad1 : 5, /* reserved */ 354 cc_pad1 : 10, /* reserved */
356 cc_assoc: 8; /* associativity of I/D-cache */ 355 cc_hv : 3; /* hversion dependent */
357}; 356};
358 357
359struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ 358struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */
@@ -719,6 +718,7 @@ void setup_pdc(void); /* in inventory.c */
719int pdc_add_valid(unsigned long address); 718int pdc_add_valid(unsigned long address);
720int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len); 719int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
721int pdc_chassis_disp(unsigned long disp); 720int pdc_chassis_disp(unsigned long disp);
721int pdc_chassis_warn(unsigned long *warn);
722int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info); 722int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info);
723int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index, 723int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
724 void *iodc_data, unsigned int iodc_data_size); 724 void *iodc_data, unsigned int iodc_data_size);
@@ -732,6 +732,7 @@ int pdc_model_cpuid(unsigned long *cpu_id);
732int pdc_model_versions(unsigned long *versions, int id); 732int pdc_model_versions(unsigned long *versions, int id);
733int pdc_model_capabilities(unsigned long *capabilities); 733int pdc_model_capabilities(unsigned long *capabilities);
734int pdc_cache_info(struct pdc_cache_info *cache); 734int pdc_cache_info(struct pdc_cache_info *cache);
735int pdc_spaceid_bits(unsigned long *space_bits);
735#ifndef CONFIG_PA20 736#ifndef CONFIG_PA20
736int pdc_btlb_info(struct pdc_btlb_info *btlb); 737int pdc_btlb_info(struct pdc_btlb_info *btlb);
737int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); 738int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
@@ -775,6 +776,18 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
775 776
776extern void pdc_init(void); 777extern void pdc_init(void);
777 778
779static inline char * os_id_to_string(u16 os_id) {
780 switch(os_id) {
781 case OS_ID_NONE: return "No OS";
782 case OS_ID_HPUX: return "HP-UX";
783 case OS_ID_MPEXL: return "MPE-iX";
784 case OS_ID_OSF: return "OSF";
785 case OS_ID_HPRT: return "HP-RT";
786 case OS_ID_NOVEL: return "Novell Netware";
787 case OS_ID_LINUX: return "Linux";
788 default: return "Unknown";
789 }
790}
778#endif /* __ASSEMBLY__ */ 791#endif /* __ASSEMBLY__ */
779 792
780#endif /* _PARISC_PDC_H */ 793#endif /* _PARISC_PDC_H */
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
index b6bcc672ba8..5066c54dae0 100644
--- a/include/asm-parisc/pgtable.h
+++ b/include/asm-parisc/pgtable.h
@@ -506,13 +506,13 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
506 506
507/* TLB page size encoding - see table 3-1 in parisc20.pdf */ 507/* TLB page size encoding - see table 3-1 in parisc20.pdf */
508#define _PAGE_SIZE_ENCODING_4K 0 508#define _PAGE_SIZE_ENCODING_4K 0
509#define _PAGE_SIZE_ENCODING_16K 1 509#define _PAGE_SIZE_ENCODING_16K 1
510#define _PAGE_SIZE_ENCODING_64K 2 510#define _PAGE_SIZE_ENCODING_64K 2
511#define _PAGE_SIZE_ENCODING_256K 3 511#define _PAGE_SIZE_ENCODING_256K 3
512#define _PAGE_SIZE_ENCODING_1M 4 512#define _PAGE_SIZE_ENCODING_1M 4
513#define _PAGE_SIZE_ENCODING_4M 5 513#define _PAGE_SIZE_ENCODING_4M 5
514#define _PAGE_SIZE_ENCODING_16M 6 514#define _PAGE_SIZE_ENCODING_16M 6
515#define _PAGE_SIZE_ENCODING_64M 7 515#define _PAGE_SIZE_ENCODING_64M 7
516 516
517#if defined(CONFIG_PARISC_PAGE_SIZE_4KB) 517#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
518# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K 518# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
index ca49dc91f4f..b73626f040d 100644
--- a/include/asm-parisc/processor.h
+++ b/include/asm-parisc/processor.h
@@ -26,14 +26,12 @@
26 * Default implementation of macro that returns current 26 * Default implementation of macro that returns current
27 * instruction pointer ("program counter"). 27 * instruction pointer ("program counter").
28 */ 28 */
29 29#ifdef CONFIG_PA20
30/* We cannot use MFIA as it was added for PA2.0 - prumpf 30#define current_ia(x) __asm__("mfia %0" : "=r"(x))
31 31#else /* mfia added in pa2.0 */
32 At one point there were no "0f/0b" type local symbols in gas for 32#define current_ia(x) __asm__("blr 0,%0\n\tnop" : "=r"(x))
33 PA-RISC. This is no longer true, but this still seems like the 33#endif
34 nicest way to implement this. */ 34#define current_text_addr() ({ void *pc; current_ia(pc); pc; })
35
36#define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; })
37 35
38#define TASK_SIZE (current->thread.task_size) 36#define TASK_SIZE (current->thread.task_size)
39#define TASK_UNMAPPED_BASE (current->thread.map_base) 37#define TASK_UNMAPPED_BASE (current->thread.map_base)
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h
index 25cb23ef7dd..98a82fa0cfd 100644
--- a/include/asm-parisc/signal.h
+++ b/include/asm-parisc/signal.h
@@ -48,7 +48,6 @@
48 * SA_FLAGS values: 48 * SA_FLAGS values:
49 * 49 *
50 * SA_ONSTACK indicates that a registered stack_t will be used. 50 * SA_ONSTACK indicates that a registered stack_t will be used.
51 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
52 * SA_RESTART flag to get restarting signals (which were the default long ago) 51 * SA_RESTART flag to get restarting signals (which were the default long ago)
53 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 52 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
54 * SA_RESETHAND clears the handler when the signal is delivered. 53 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -69,7 +68,6 @@
69 68
70#define SA_NOMASK SA_NODEFER 69#define SA_NOMASK SA_NODEFER
71#define SA_ONESHOT SA_RESETHAND 70#define SA_ONESHOT SA_RESETHAND
72#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
73 71
74#define SA_RESTORER 0x04000000 /* obsolete -- ignored */ 72#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
75 73
diff --git a/include/asm-parisc/socket.h b/include/asm-parisc/socket.h
index 1bf54dc53c1..ce2eae1708b 100644
--- a/include/asm-parisc/socket.h
+++ b/include/asm-parisc/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 0x401c 48#define SO_ACCEPTCONN 0x401c
49 49
50#define SO_PEERSEC 0x401d 50#define SO_PEERSEC 0x401d
51#define SO_PASSSEC 0x401e
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h
index 863876134b2..5fe2d2329ab 100644
--- a/include/asm-parisc/system.h
+++ b/include/asm-parisc/system.h
@@ -155,13 +155,14 @@ static inline void set_eiem(unsigned long val)
155 type and dynamically select the 16-byte aligned int from the array 155 type and dynamically select the 16-byte aligned int from the array
156 for the semaphore. */ 156 for the semaphore. */
157 157
158#define __PA_LDCW_ALIGNMENT 16 158#define __PA_LDCW_ALIGNMENT 16
159#define __ldcw_align(a) ({ \ 159#define __ldcw_align(a) ({ \
160 unsigned long __ret = (unsigned long) &(a)->lock[0]; \ 160 unsigned long __ret = (unsigned long) &(a)->lock[0]; \
161 __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) & ~(__PA_LDCW_ALIGNMENT - 1); \ 161 __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \
162 (volatile unsigned int *) __ret; \ 162 & ~(__PA_LDCW_ALIGNMENT - 1); \
163 (volatile unsigned int *) __ret; \
163}) 164})
164#define LDCW "ldcw" 165#define __LDCW "ldcw"
165 166
166#else /*CONFIG_PA20*/ 167#else /*CONFIG_PA20*/
167/* From: "Jim Hull" <jim.hull of hp.com> 168/* From: "Jim Hull" <jim.hull of hp.com>
@@ -171,17 +172,18 @@ static inline void set_eiem(unsigned long val)
171 they only require "natural" alignment (4-byte for ldcw, 8-byte for 172 they only require "natural" alignment (4-byte for ldcw, 8-byte for
172 ldcd). */ 173 ldcd). */
173 174
174#define __PA_LDCW_ALIGNMENT 4 175#define __PA_LDCW_ALIGNMENT 4
175#define __ldcw_align(a) ((volatile unsigned int *)a) 176#define __ldcw_align(a) ((volatile unsigned int *)a)
176#define LDCW "ldcw,co" 177#define __LDCW "ldcw,co"
177 178
178#endif /*!CONFIG_PA20*/ 179#endif /*!CONFIG_PA20*/
179 180
180/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ 181/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */
181#define __ldcw(a) ({ \ 182#define __ldcw(a) ({ \
182 unsigned __ret; \ 183 unsigned __ret; \
183 __asm__ __volatile__(LDCW " 0(%1),%0" : "=r" (__ret) : "r" (a)); \ 184 __asm__ __volatile__(__LDCW " 0(%1),%0" \
184 __ret; \ 185 : "=r" (__ret) : "r" (a)); \
186 __ret; \
185}) 187})
186 188
187#ifdef CONFIG_SMP 189#ifdef CONFIG_SMP
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h
index f6c417c8c48..d973e8b3466 100644
--- a/include/asm-parisc/uaccess.h
+++ b/include/asm-parisc/uaccess.h
@@ -172,7 +172,11 @@ struct exception_data {
172/* 172/*
173 * The "__put_user/kernel_asm()" macros tell gcc they read from memory 173 * The "__put_user/kernel_asm()" macros tell gcc they read from memory
174 * instead of writing. This is because they do not write to any memory 174 * instead of writing. This is because they do not write to any memory
175 * gcc knows about, so there are no aliasing issues. 175 * gcc knows about, so there are no aliasing issues. These macros must
176 * also be aware that "fixup_put_user_skip_[12]" are executed in the
177 * context of the fault, and any registers used there must be listed
178 * as clobbers. In this case only "r1" is used by the current routines.
179 * r8/r9 are already listed as err/val.
176 */ 180 */
177 181
178#ifdef __LP64__ 182#ifdef __LP64__
@@ -183,7 +187,8 @@ struct exception_data {
183 "\t.dword\t1b,fixup_put_user_skip_1\n" \ 187 "\t.dword\t1b,fixup_put_user_skip_1\n" \
184 "\t.previous" \ 188 "\t.previous" \
185 : "=r"(__pu_err) \ 189 : "=r"(__pu_err) \
186 : "r"(ptr), "r"(x), "0"(__pu_err)) 190 : "r"(ptr), "r"(x), "0"(__pu_err) \
191 : "r1")
187 192
188#define __put_user_asm(stx,x,ptr) \ 193#define __put_user_asm(stx,x,ptr) \
189 __asm__ __volatile__ ( \ 194 __asm__ __volatile__ ( \
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
index 12b867238a4..27bcfad1c3e 100644
--- a/include/asm-parisc/unistd.h
+++ b/include/asm-parisc/unistd.h
@@ -797,11 +797,6 @@
797 797
798#define SYS_ify(syscall_name) __NR_##syscall_name 798#define SYS_ify(syscall_name) __NR_##syscall_name
799 799
800/* Assume all syscalls are done from PIC code just to be
801 * safe. The worst case scenario is that you lose a register
802 * and save/restore r19 across the syscall. */
803#define PIC
804
805#ifndef ASM_LINE_SEP 800#ifndef ASM_LINE_SEP
806# define ASM_LINE_SEP ; 801# define ASM_LINE_SEP ;
807#endif 802#endif
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index fab41c280aa..1ba3c998361 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -117,38 +117,30 @@ extern void do_cpu_ftr_fixups(unsigned long offset);
117#define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000) 117#define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000)
118#define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) 118#define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000)
119 119
120/*
121 * Add the 64-bit processor unique features in the top half of the word;
122 * on 32-bit, make the names available but defined to be 0.
123 */
120#ifdef __powerpc64__ 124#ifdef __powerpc64__
121/* Add the 64b processor unique features in the top half of the word */ 125#define LONG_ASM_CONST(x) ASM_CONST(x)
122#define CPU_FTR_SLB ASM_CONST(0x0000000100000000)
123#define CPU_FTR_16M_PAGE ASM_CONST(0x0000000200000000)
124#define CPU_FTR_TLBIEL ASM_CONST(0x0000000400000000)
125#define CPU_FTR_NOEXECUTE ASM_CONST(0x0000000800000000)
126#define CPU_FTR_IABR ASM_CONST(0x0000002000000000)
127#define CPU_FTR_MMCRA ASM_CONST(0x0000004000000000)
128#define CPU_FTR_CTRL ASM_CONST(0x0000008000000000)
129#define CPU_FTR_SMT ASM_CONST(0x0000010000000000)
130#define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000)
131#define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000)
132#define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000)
133#define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000)
134#define CPU_FTR_PURR ASM_CONST(0x0000400000000000)
135#else 126#else
136/* ensure on 32b processors the flags are available for compiling but 127#define LONG_ASM_CONST(x) 0
137 * don't do anything */
138#define CPU_FTR_SLB ASM_CONST(0x0)
139#define CPU_FTR_16M_PAGE ASM_CONST(0x0)
140#define CPU_FTR_TLBIEL ASM_CONST(0x0)
141#define CPU_FTR_NOEXECUTE ASM_CONST(0x0)
142#define CPU_FTR_IABR ASM_CONST(0x0)
143#define CPU_FTR_MMCRA ASM_CONST(0x0)
144#define CPU_FTR_CTRL ASM_CONST(0x0)
145#define CPU_FTR_SMT ASM_CONST(0x0)
146#define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0)
147#define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0)
148#define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0)
149#define CPU_FTR_PURR ASM_CONST(0x0)
150#endif 128#endif
151 129
130#define CPU_FTR_SLB LONG_ASM_CONST(0x0000000100000000)
131#define CPU_FTR_16M_PAGE LONG_ASM_CONST(0x0000000200000000)
132#define CPU_FTR_TLBIEL LONG_ASM_CONST(0x0000000400000000)
133#define CPU_FTR_NOEXECUTE LONG_ASM_CONST(0x0000000800000000)
134#define CPU_FTR_IABR LONG_ASM_CONST(0x0000002000000000)
135#define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000004000000000)
136#define CPU_FTR_CTRL LONG_ASM_CONST(0x0000008000000000)
137#define CPU_FTR_SMT LONG_ASM_CONST(0x0000010000000000)
138#define CPU_FTR_COHERENT_ICACHE LONG_ASM_CONST(0x0000020000000000)
139#define CPU_FTR_LOCKLESS_TLBIE LONG_ASM_CONST(0x0000040000000000)
140#define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000)
141#define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000)
142#define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000)
143
152#ifndef __ASSEMBLY__ 144#ifndef __ASSEMBLY__
153 145
154#define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \ 146#define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h
index 9c8d91bf5a0..fd242a22331 100644
--- a/include/asm-powerpc/floppy.h
+++ b/include/asm-powerpc/floppy.h
@@ -27,7 +27,7 @@
27#define fd_disable_irq() disable_irq(FLOPPY_IRQ) 27#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
28#define fd_cacheflush(addr,size) /* nothing */ 28#define fd_cacheflush(addr,size) /* nothing */
29#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ 29#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \
30 SA_INTERRUPT, "floppy", NULL) 30 IRQF_DISABLED, "floppy", NULL)
31#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); 31#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
32 32
33#ifdef CONFIG_PCI 33#ifdef CONFIG_PCI
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h
index ce0f7db63c1..d40359204ab 100644
--- a/include/asm-powerpc/hw_irq.h
+++ b/include/asm-powerpc/hw_irq.h
@@ -86,27 +86,27 @@ static inline void local_irq_save_ptr(unsigned long *flags)
86#define mask_irq(irq) \ 86#define mask_irq(irq) \
87 ({ \ 87 ({ \
88 irq_desc_t *desc = get_irq_desc(irq); \ 88 irq_desc_t *desc = get_irq_desc(irq); \
89 if (desc->handler && desc->handler->disable) \ 89 if (desc->chip && desc->chip->disable) \
90 desc->handler->disable(irq); \ 90 desc->chip->disable(irq); \
91 }) 91 })
92#define unmask_irq(irq) \ 92#define unmask_irq(irq) \
93 ({ \ 93 ({ \
94 irq_desc_t *desc = get_irq_desc(irq); \ 94 irq_desc_t *desc = get_irq_desc(irq); \
95 if (desc->handler && desc->handler->enable) \ 95 if (desc->chip && desc->chip->enable) \
96 desc->handler->enable(irq); \ 96 desc->chip->enable(irq); \
97 }) 97 })
98#define ack_irq(irq) \ 98#define ack_irq(irq) \
99 ({ \ 99 ({ \
100 irq_desc_t *desc = get_irq_desc(irq); \ 100 irq_desc_t *desc = get_irq_desc(irq); \
101 if (desc->handler && desc->handler->ack) \ 101 if (desc->chip && desc->chip->ack) \
102 desc->handler->ack(irq); \ 102 desc->chip->ack(irq); \
103 }) 103 })
104 104
105/* Should we handle this via lost interrupts and IPIs or should we don't care like 105/*
106 * we do now ? --BenH. 106 * interrupt-retrigger: should we handle this via lost interrupts and IPIs
107 * or should we not care like we do now ? --BenH.
107 */ 108 */
108struct hw_interrupt_type; 109struct hw_interrupt_type;
109static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
110 110
111#endif /* __KERNEL__ */ 111#endif /* __KERNEL__ */
112#endif /* _ASM_POWERPC_HW_IRQ_H */ 112#endif /* _ASM_POWERPC_HW_IRQ_H */
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h
index a10feec29d4..eb5f33e1977 100644
--- a/include/asm-powerpc/irq.h
+++ b/include/asm-powerpc/irq.h
@@ -30,11 +30,6 @@
30#define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ 30#define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */
31#define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ 31#define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */
32 32
33/*
34 * IRQ line status macro IRQ_PER_CPU is used
35 */
36#define ARCH_HAS_IRQ_PER_CPU
37
38#define get_irq_desc(irq) (&irq_desc[(irq)]) 33#define get_irq_desc(irq) (&irq_desc[(irq)])
39 34
40/* Define a way to iterate across irqs. */ 35/* Define a way to iterate across irqs. */
diff --git a/include/asm-powerpc/iseries/it_lp_queue.h b/include/asm-powerpc/iseries/it_lp_queue.h
index b7c6fc12cce..284c5a7db3a 100644
--- a/include/asm-powerpc/iseries/it_lp_queue.h
+++ b/include/asm-powerpc/iseries/it_lp_queue.h
@@ -29,20 +29,20 @@
29 29
30struct HvLpEvent; 30struct HvLpEvent;
31 31
32#define ITMaxLpQueues 8 32#define IT_LP_MAX_QUEUES 8
33 33
34#define NotUsed 0 // Queue will not be used by PLIC 34#define IT_LP_NOT_USED 0 /* Queue will not be used by PLIC */
35#define DedicatedIo 1 // Queue dedicated to IO processor specified 35#define IT_LP_DEDICATED_IO 1 /* Queue dedicated to IO processor specified */
36#define DedicatedLp 2 // Queue dedicated to LP specified 36#define IT_LP_DEDICATED_LP 2 /* Queue dedicated to LP specified */
37#define Shared 3 // Queue shared for both IO and LP 37#define IT_LP_SHARED 3 /* Queue shared for both IO and LP */
38 38
39#define LpEventStackSize 4096 39#define IT_LP_EVENT_STACK_SIZE 4096
40#define LpEventMaxSize 256 40#define IT_LP_EVENT_MAX_SIZE 256
41#define LpEventAlign 64 41#define IT_LP_EVENT_ALIGN 64
42 42
43struct hvlpevent_queue { 43struct hvlpevent_queue {
44/* 44/*
45 * The xSlicCurEventPtr is the pointer to the next event stack entry 45 * The hq_current_event is the pointer to the next event stack entry
46 * that will become valid. The OS must peek at this entry to determine 46 * that will become valid. The OS must peek at this entry to determine
47 * if it is valid. PLIC will set the valid indicator as the very last 47 * if it is valid. PLIC will set the valid indicator as the very last
48 * store into that entry. 48 * store into that entry.
@@ -52,23 +52,23 @@ struct hvlpevent_queue {
52 * location again. 52 * location again.
53 * 53 *
54 * If the event stack fills and there are overflow events, then PLIC 54 * If the event stack fills and there are overflow events, then PLIC
55 * will set the xPlicOverflowIntPending flag in which case the OS will 55 * will set the hq_overflow_pending flag in which case the OS will
56 * have to fetch the additional LP events once they have drained the 56 * have to fetch the additional LP events once they have drained the
57 * event stack. 57 * event stack.
58 * 58 *
59 * The first 16-bytes are known by both the OS and PLIC. The remainder 59 * The first 16-bytes are known by both the OS and PLIC. The remainder
60 * of the cache line is for use by the OS. 60 * of the cache line is for use by the OS.
61 */ 61 */
62 u8 xPlicOverflowIntPending;// 0x00 Overflow events are pending 62 u8 hq_overflow_pending; /* 0x00 Overflow events are pending */
63 u8 xPlicStatus; // 0x01 DedicatedIo or DedicatedLp or NotUsed 63 u8 hq_status; /* 0x01 DedicatedIo or DedicatedLp or NotUsed */
64 u16 xSlicLogicalProcIndex; // 0x02 Logical Proc Index for correlation 64 u16 hq_proc_index; /* 0x02 Logical Proc Index for correlation */
65 u8 xPlicRsvd[12]; // 0x04 65 u8 hq_reserved1[12]; /* 0x04 */
66 char *xSlicCurEventPtr; // 0x10 66 char *hq_current_event; /* 0x10 */
67 char *xSlicLastValidEventPtr; // 0x18 67 char *hq_last_event; /* 0x18 */
68 char *xSlicEventStackPtr; // 0x20 68 char *hq_event_stack; /* 0x20 */
69 u8 xIndex; // 0x28 unique sequential index. 69 u8 hq_index; /* 0x28 unique sequential index. */
70 u8 xSlicRsvd[3]; // 0x29-2b 70 u8 hq_reserved2[3]; /* 0x29-2b */
71 spinlock_t lock; 71 spinlock_t hq_lock;
72}; 72};
73 73
74extern struct hvlpevent_queue hvlpevent_queue; 74extern struct hvlpevent_queue hvlpevent_queue;
diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h
index 5a5c3b5ab1e..dc1574c945f 100644
--- a/include/asm-powerpc/kdump.h
+++ b/include/asm-powerpc/kdump.h
@@ -15,6 +15,8 @@
15#define KDUMP_TRAMPOLINE_START 0x0100 15#define KDUMP_TRAMPOLINE_START 0x0100
16#define KDUMP_TRAMPOLINE_END 0x3000 16#define KDUMP_TRAMPOLINE_END 0x3000
17 17
18#define KDUMP_MIN_TCE_ENTRIES 2048
19
18#else /* !CONFIG_CRASH_DUMP */ 20#else /* !CONFIG_CRASH_DUMP */
19 21
20#define PHYSICAL_START 0x0 22#define PHYSICAL_START 0x0
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index efe8872ec58..8f7fd5cfec3 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -112,9 +112,13 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
112#ifdef __powerpc64__ 112#ifdef __powerpc64__
113extern void kexec_smp_wait(void); /* get and clear naca physid, wait for 113extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
114 master to copy new code to 0 */ 114 master to copy new code to 0 */
115extern void __init kexec_setup(void);
116extern int crashing_cpu; 115extern int crashing_cpu;
117extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)); 116extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *));
117extern cpumask_t cpus_in_sr;
118static inline int kexec_sr_activated(int cpu)
119{
120 return cpu_isset(cpu,cpus_in_sr);
121}
118#endif /* __powerpc64 __ */ 122#endif /* __powerpc64 __ */
119 123
120struct kimage; 124struct kimage;
@@ -124,10 +128,13 @@ extern int default_machine_kexec_prepare(struct kimage *image);
124extern void default_machine_crash_shutdown(struct pt_regs *regs); 128extern void default_machine_crash_shutdown(struct pt_regs *regs);
125 129
126extern void machine_kexec_simple(struct kimage *image); 130extern void machine_kexec_simple(struct kimage *image);
131extern void crash_kexec_secondary(struct pt_regs *regs);
127extern int overlaps_crashkernel(unsigned long start, unsigned long size); 132extern int overlaps_crashkernel(unsigned long start, unsigned long size);
128extern void reserve_crashkernel(void); 133extern void reserve_crashkernel(void);
129 134
130#else /* !CONFIG_KEXEC */ 135#else /* !CONFIG_KEXEC */
136static inline int kexec_sr_activated(int cpu) { return 0; }
137static inline void crash_kexec_secondary(struct pt_regs *regs) { }
131 138
132static inline int overlaps_crashkernel(unsigned long start, unsigned long size) 139static inline int overlaps_crashkernel(unsigned long start, unsigned long size)
133{ 140{
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index 73db1f71329..eba133d149a 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -81,6 +81,8 @@ struct machdep_calls {
81 void (*tce_free)(struct iommu_table *tbl, 81 void (*tce_free)(struct iommu_table *tbl,
82 long index, 82 long index,
83 long npages); 83 long npages);
84 unsigned long (*tce_get)(struct iommu_table *tbl,
85 long index);
84 void (*tce_flush)(struct iommu_table *tbl); 86 void (*tce_flush)(struct iommu_table *tbl);
85 void (*iommu_dev_setup)(struct pci_dev *dev); 87 void (*iommu_dev_setup)(struct pci_dev *dev);
86 void (*iommu_bus_setup)(struct pci_bus *bus); 88 void (*iommu_bus_setup)(struct pci_bus *bus);
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h
index 3a5ebe229af..c3fc7a28e3c 100644
--- a/include/asm-powerpc/mmu.h
+++ b/include/asm-powerpc/mmu.h
@@ -238,7 +238,6 @@ extern int hash_huge_page(struct mm_struct *mm, unsigned long access,
238 unsigned long ea, unsigned long vsid, int local, 238 unsigned long ea, unsigned long vsid, int local,
239 unsigned long trap); 239 unsigned long trap);
240 240
241extern void htab_finish_init(void);
242extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, 241extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
243 unsigned long pstart, unsigned long mode, 242 unsigned long pstart, unsigned long mode,
244 int psize); 243 int psize);
diff --git a/include/asm-powerpc/mmu_context.h b/include/asm-powerpc/mmu_context.h
index 8c6b1a6d944..083ac917bd2 100644
--- a/include/asm-powerpc/mmu_context.h
+++ b/include/asm-powerpc/mmu_context.h
@@ -25,8 +25,13 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
25{ 25{
26} 26}
27 27
28/*
29 * The proto-VSID space has 2^35 - 1 segments available for user mappings.
30 * Each segment contains 2^28 bytes. Each context maps 2^44 bytes,
31 * so we can support 2^19-1 contexts (19 == 35 + 28 - 44).
32 */
28#define NO_CONTEXT 0 33#define NO_CONTEXT 0
29#define MAX_CONTEXT (0x100000-1) 34#define MAX_CONTEXT ((1UL << 19) - 1)
30 35
31extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); 36extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
32extern void destroy_context(struct mm_struct *mm); 37extern void destroy_context(struct mm_struct *mm);
diff --git a/include/asm-powerpc/mpc86xx.h b/include/asm-powerpc/mpc86xx.h
index d0a6718d188..f260382739f 100644
--- a/include/asm-powerpc/mpc86xx.h
+++ b/include/asm-powerpc/mpc86xx.h
@@ -15,15 +15,10 @@
15#ifndef __ASM_POWERPC_MPC86xx_H__ 15#ifndef __ASM_POWERPC_MPC86xx_H__
16#define __ASM_POWERPC_MPC86xx_H__ 16#define __ASM_POWERPC_MPC86xx_H__
17 17
18#include <linux/config.h>
19#include <asm/mmu.h> 18#include <asm/mmu.h>
20 19
21#ifdef CONFIG_PPC_86xx 20#ifdef CONFIG_PPC_86xx
22 21
23#ifdef CONFIG_MPC8641_HPCN
24#include <platforms/86xx/mpc8641_hpcn.h>
25#endif
26
27#define _IO_BASE isa_io_base 22#define _IO_BASE isa_io_base
28#define _ISA_MEM_BASE isa_mem_base 23#define _ISA_MEM_BASE isa_mem_base
29#ifdef CONFIG_PCI 24#ifdef CONFIG_PCI
diff --git a/include/asm-powerpc/of_device.h b/include/asm-powerpc/of_device.h
index 6249a7c3963..c5c0b0b3cd5 100644
--- a/include/asm-powerpc/of_device.h
+++ b/include/asm-powerpc/of_device.h
@@ -9,7 +9,7 @@
9/* 9/*
10 * The of_platform_bus_type is a bus type used by drivers that do not 10 * The of_platform_bus_type is a bus type used by drivers that do not
11 * attach to a macio or similar bus but still use OF probing 11 * attach to a macio or similar bus but still use OF probing
12 * mecanism 12 * mechanism
13 */ 13 */
14extern struct bus_type of_platform_bus_type; 14extern struct bus_type of_platform_bus_type;
15 15
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h
index 5d2c9e6c4be..46afd29b904 100644
--- a/include/asm-powerpc/pci.h
+++ b/include/asm-powerpc/pci.h
@@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
242#define HAVE_ARCH_PCI_RESOURCE_TO_USER 242#define HAVE_ARCH_PCI_RESOURCE_TO_USER
243extern void pci_resource_to_user(const struct pci_dev *dev, int bar, 243extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
244 const struct resource *rsrc, 244 const struct resource *rsrc,
245 u64 *start, u64 *end); 245 resource_size_t *start, resource_size_t *end);
246#endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ 246#endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */
247 247
248#endif /* __KERNEL__ */ 248#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/pmac_pfunc.h b/include/asm-powerpc/pmac_pfunc.h
index cef61304ffc..1330d6a58c5 100644
--- a/include/asm-powerpc/pmac_pfunc.h
+++ b/include/asm-powerpc/pmac_pfunc.h
@@ -205,7 +205,7 @@ extern void pmf_do_irq(struct pmf_function *func);
205 * 205 *
206 * The args array contains as many arguments as is required by the function, 206 * The args array contains as many arguments as is required by the function,
207 * this is dependent on the function you are calling, unfortunately Apple 207 * this is dependent on the function you are calling, unfortunately Apple
208 * mecanism provides no way to encode that so you have to get it right at 208 * mechanism provides no way to encode that so you have to get it right at
209 * the call site. Some functions require no args, in which case, you can 209 * the call site. Some functions require no args, in which case, you can
210 * pass NULL. 210 * pass NULL.
211 * 211 *
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index 02e213e3d69..a33c6acffa6 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -181,6 +181,9 @@ extern int rtas_set_rtc_time(struct rtc_time *rtc_time);
181extern unsigned int rtas_busy_delay_time(int status); 181extern unsigned int rtas_busy_delay_time(int status);
182extern unsigned int rtas_busy_delay(int status); 182extern unsigned int rtas_busy_delay(int status);
183 183
184extern int early_init_dt_scan_rtas(unsigned long node,
185 const char *uname, int depth, void *data);
186
184extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal); 187extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
185 188
186/* Error types logged. */ 189/* Error types logged. */
diff --git a/include/asm-powerpc/signal.h b/include/asm-powerpc/signal.h
index a4d8f864854..a8c7babf495 100644
--- a/include/asm-powerpc/signal.h
+++ b/include/asm-powerpc/signal.h
@@ -63,7 +63,6 @@ typedef struct {
63 * SA_FLAGS values: 63 * SA_FLAGS values:
64 * 64 *
65 * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). 65 * SA_ONSTACK is not currently supported, but will allow sigaltstack(2).
66 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
67 * SA_RESTART flag to get restarting signals (which were the default long ago) 66 * SA_RESTART flag to get restarting signals (which were the default long ago)
68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 67 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
69 * SA_RESETHAND clears the handler when the signal is delivered. 68 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -83,7 +82,6 @@ typedef struct {
83 82
84#define SA_NOMASK SA_NODEFER 83#define SA_NOMASK SA_NODEFER
85#define SA_ONESHOT SA_RESETHAND 84#define SA_ONESHOT SA_RESETHAND
86#define SA_INTERRUPT 0x20000000u /* dummy -- ignored */
87 85
88#define SA_RESTORER 0x04000000U 86#define SA_RESTORER 0x04000000U
89 87
diff --git a/include/asm-powerpc/socket.h b/include/asm-powerpc/socket.h
index e4b8177d4ac..c8b1da50e72 100644
--- a/include/asm-powerpc/socket.h
+++ b/include/asm-powerpc/socket.h
@@ -55,5 +55,6 @@
55#define SO_ACCEPTCONN 30 55#define SO_ACCEPTCONN 30
56 56
57#define SO_PEERSEC 31 57#define SO_PEERSEC 31
58#define SO_PASSSEC 34
58 59
59#endif /* _ASM_POWERPC_SOCKET_H */ 60#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index 4463148c659..dcde4410348 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -18,8 +18,9 @@
18#include <linux/percpu.h> 18#include <linux/percpu.h>
19 19
20#include <asm/processor.h> 20#include <asm/processor.h>
21#ifdef CONFIG_PPC64 21#ifdef CONFIG_PPC_ISERIES
22#include <asm/paca.h> 22#include <asm/paca.h>
23#include <asm/firmware.h>
23#include <asm/iseries/hv_call.h> 24#include <asm/iseries/hv_call.h>
24#endif 25#endif
25 26
@@ -177,7 +178,8 @@ static inline void set_dec(int val)
177#ifdef CONFIG_PPC_ISERIES 178#ifdef CONFIG_PPC_ISERIES
178 int cur_dec; 179 int cur_dec;
179 180
180 if (get_lppaca()->shared_proc) { 181 if (firmware_has_feature(FW_FEATURE_ISERIES) &&
182 get_lppaca()->shared_proc) {
181 get_lppaca()->virtual_decr = val; 183 get_lppaca()->virtual_decr = val;
182 cur_dec = get_dec(); 184 cur_dec = get_dec();
183 if (cur_dec > val) 185 if (cur_dec > val)
diff --git a/include/asm-powerpc/todc.h b/include/asm-powerpc/todc.h
new file mode 100644
index 00000000000..60a8c39b8c1
--- /dev/null
+++ b/include/asm-powerpc/todc.h
@@ -0,0 +1,487 @@
1/*
2 * Definitions for the M48Txx and mc146818 series of Time of day/Real Time
3 * Clock chips.
4 *
5 * Author: Mark A. Greer <mgreer@mvista.com>
6 *
7 * 2001 (c) MontaVista, Software, Inc. This file is licensed under
8 * the terms of the GNU General Public License version 2. This program
9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied.
11 */
12
13/*
14 * Support for the M48T37/M48T59/.../mc146818 Real Time Clock chips.
15 * Purpose is to make one generic file that handles all of these chips instead
16 * of every platform implementing the same code over & over again.
17 */
18
19#ifndef __PPC_KERNEL_TODC_H
20#define __PPC_KERNEL_TODC_H
21
22typedef struct {
23 uint rtc_type; /* your particular chip */
24
25 /*
26 * Following are the addresses of the AS0, AS1, and DATA registers
27 * of these chips. Note that these are board-specific.
28 */
29 unsigned int nvram_as0;
30 unsigned int nvram_as1;
31 unsigned int nvram_data;
32
33 /*
34 * Define bits to stop external set of regs from changing so
35 * the chip can be read/written reliably.
36 */
37 unsigned char enable_read;
38 unsigned char enable_write;
39
40 /*
41 * Following is the number of AS0 address bits. This is normally
42 * 8 but some bad hardware routes address lines incorrectly.
43 */
44 int as0_bits;
45
46 int nvram_size; /* Size of NVRAM on chip */
47 int sw_flags; /* Software control flags */
48
49 /* Following are the register offsets for the particular chip */
50 int year;
51 int month;
52 int day_of_month;
53 int day_of_week;
54 int hours;
55 int minutes;
56 int seconds;
57 int control_b;
58 int control_a;
59 int watchdog;
60 int interrupts;
61 int alarm_date;
62 int alarm_hour;
63 int alarm_minutes;
64 int alarm_seconds;
65 int century;
66 int flags;
67
68 /*
69 * Some RTC chips have their NVRAM buried behind a addr/data pair of
70 * regs on the first level/clock registers. The following fields
71 * are the addresses for those addr/data regs.
72 */
73 int nvram_addr_reg;
74 int nvram_data_reg;
75} todc_info_t;
76
77/*
78 * Define the types of TODC/RTC variants that are supported in
79 * arch/ppc/kernel/todc_time.c
80 * Make a new one of these for any chip somehow differs from what's already
81 * defined. That way, if you ever need to put in code to touch those
82 * bits/registers in todc_time.c, you can put it inside an
83 * 'if (todc_info->rtc_type == TODC_TYPE_XXX)' so you won't break
84 * anyone else.
85 */
86#define TODC_TYPE_MK48T35 1
87#define TODC_TYPE_MK48T37 2
88#define TODC_TYPE_MK48T59 3
89#define TODC_TYPE_DS1693 4 /* Dallas DS1693 RTC */
90#define TODC_TYPE_DS1743 5 /* Dallas DS1743 RTC */
91#define TODC_TYPE_DS1746 6 /* Dallas DS1746 RTC */
92#define TODC_TYPE_DS1747 7 /* Dallas DS1747 RTC */
93#define TODC_TYPE_DS1501 8 /* Dallas DS1501 RTC */
94#define TODC_TYPE_DS1643 9 /* Dallas DS1643 RTC */
95#define TODC_TYPE_PC97307 10 /* PC97307 internal RTC */
96#define TODC_TYPE_DS1557 11 /* Dallas DS1557 RTC */
97#define TODC_TYPE_DS17285 12 /* Dallas DS17285 RTC */
98#define TODC_TYPE_DS1553 13 /* Dallas DS1553 RTC */
99#define TODC_TYPE_MC146818 100 /* Leave room for m48txx's */
100
101/*
102 * Bit to clear/set to enable reads/writes to the chip
103 */
104#define TODC_MK48TXX_CNTL_A_R 0x40
105#define TODC_MK48TXX_CNTL_A_W 0x80
106#define TODC_MK48TXX_DAY_CB 0x80
107
108#define TODC_DS1501_CNTL_B_TE 0x80
109
110/*
111 * Define flag bits used by todc routines.
112 */
113#define TODC_FLAG_2_LEVEL_NVRAM 0x00000001
114
115/*
116 * Define the values for the various RTC's that should to into the todc_info
117 * table.
118 * Note: The XXX_NVRAM_SIZE, XXX_NVRAM_ADDR_REG, and XXX_NVRAM_DATA_REG only
119 * matter if XXX_SW_FLAGS has TODC_FLAG_2_LEVEL_NVRAM set.
120 */
121#define TODC_TYPE_MK48T35_NVRAM_SIZE 0x7ff8
122#define TODC_TYPE_MK48T35_SW_FLAGS 0
123#define TODC_TYPE_MK48T35_YEAR 0x7fff
124#define TODC_TYPE_MK48T35_MONTH 0x7ffe
125#define TODC_TYPE_MK48T35_DOM 0x7ffd /* Day of Month */
126#define TODC_TYPE_MK48T35_DOW 0x7ffc /* Day of Week */
127#define TODC_TYPE_MK48T35_HOURS 0x7ffb
128#define TODC_TYPE_MK48T35_MINUTES 0x7ffa
129#define TODC_TYPE_MK48T35_SECONDS 0x7ff9
130#define TODC_TYPE_MK48T35_CNTL_B 0x7ff9
131#define TODC_TYPE_MK48T35_CNTL_A 0x7ff8
132#define TODC_TYPE_MK48T35_WATCHDOG 0x0000
133#define TODC_TYPE_MK48T35_INTERRUPTS 0x0000
134#define TODC_TYPE_MK48T35_ALARM_DATE 0x0000
135#define TODC_TYPE_MK48T35_ALARM_HOUR 0x0000
136#define TODC_TYPE_MK48T35_ALARM_MINUTES 0x0000
137#define TODC_TYPE_MK48T35_ALARM_SECONDS 0x0000
138#define TODC_TYPE_MK48T35_CENTURY 0x0000
139#define TODC_TYPE_MK48T35_FLAGS 0x0000
140#define TODC_TYPE_MK48T35_NVRAM_ADDR_REG 0
141#define TODC_TYPE_MK48T35_NVRAM_DATA_REG 0
142
143#define TODC_TYPE_MK48T37_NVRAM_SIZE 0x7ff0
144#define TODC_TYPE_MK48T37_SW_FLAGS 0
145#define TODC_TYPE_MK48T37_YEAR 0x7fff
146#define TODC_TYPE_MK48T37_MONTH 0x7ffe
147#define TODC_TYPE_MK48T37_DOM 0x7ffd /* Day of Month */
148#define TODC_TYPE_MK48T37_DOW 0x7ffc /* Day of Week */
149#define TODC_TYPE_MK48T37_HOURS 0x7ffb
150#define TODC_TYPE_MK48T37_MINUTES 0x7ffa
151#define TODC_TYPE_MK48T37_SECONDS 0x7ff9
152#define TODC_TYPE_MK48T37_CNTL_B 0x7ff9
153#define TODC_TYPE_MK48T37_CNTL_A 0x7ff8
154#define TODC_TYPE_MK48T37_WATCHDOG 0x7ff7
155#define TODC_TYPE_MK48T37_INTERRUPTS 0x7ff6
156#define TODC_TYPE_MK48T37_ALARM_DATE 0x7ff5
157#define TODC_TYPE_MK48T37_ALARM_HOUR 0x7ff4
158#define TODC_TYPE_MK48T37_ALARM_MINUTES 0x7ff3
159#define TODC_TYPE_MK48T37_ALARM_SECONDS 0x7ff2
160#define TODC_TYPE_MK48T37_CENTURY 0x7ff1
161#define TODC_TYPE_MK48T37_FLAGS 0x7ff0
162#define TODC_TYPE_MK48T37_NVRAM_ADDR_REG 0
163#define TODC_TYPE_MK48T37_NVRAM_DATA_REG 0
164
165#define TODC_TYPE_MK48T59_NVRAM_SIZE 0x1ff0
166#define TODC_TYPE_MK48T59_SW_FLAGS 0
167#define TODC_TYPE_MK48T59_YEAR 0x1fff
168#define TODC_TYPE_MK48T59_MONTH 0x1ffe
169#define TODC_TYPE_MK48T59_DOM 0x1ffd /* Day of Month */
170#define TODC_TYPE_MK48T59_DOW 0x1ffc /* Day of Week */
171#define TODC_TYPE_MK48T59_HOURS 0x1ffb
172#define TODC_TYPE_MK48T59_MINUTES 0x1ffa
173#define TODC_TYPE_MK48T59_SECONDS 0x1ff9
174#define TODC_TYPE_MK48T59_CNTL_B 0x1ff9
175#define TODC_TYPE_MK48T59_CNTL_A 0x1ff8
176#define TODC_TYPE_MK48T59_WATCHDOG 0x1fff
177#define TODC_TYPE_MK48T59_INTERRUPTS 0x1fff
178#define TODC_TYPE_MK48T59_ALARM_DATE 0x1fff
179#define TODC_TYPE_MK48T59_ALARM_HOUR 0x1fff
180#define TODC_TYPE_MK48T59_ALARM_MINUTES 0x1fff
181#define TODC_TYPE_MK48T59_ALARM_SECONDS 0x1fff
182#define TODC_TYPE_MK48T59_CENTURY 0x1fff
183#define TODC_TYPE_MK48T59_FLAGS 0x1fff
184#define TODC_TYPE_MK48T59_NVRAM_ADDR_REG 0
185#define TODC_TYPE_MK48T59_NVRAM_DATA_REG 0
186
187#define TODC_TYPE_DS1501_NVRAM_SIZE 0x100
188#define TODC_TYPE_DS1501_SW_FLAGS TODC_FLAG_2_LEVEL_NVRAM
189#define TODC_TYPE_DS1501_YEAR (TODC_TYPE_DS1501_NVRAM_SIZE + 0x06)
190#define TODC_TYPE_DS1501_MONTH (TODC_TYPE_DS1501_NVRAM_SIZE + 0x05)
191#define TODC_TYPE_DS1501_DOM (TODC_TYPE_DS1501_NVRAM_SIZE + 0x04)
192#define TODC_TYPE_DS1501_DOW (TODC_TYPE_DS1501_NVRAM_SIZE + 0x03)
193#define TODC_TYPE_DS1501_HOURS (TODC_TYPE_DS1501_NVRAM_SIZE + 0x02)
194#define TODC_TYPE_DS1501_MINUTES (TODC_TYPE_DS1501_NVRAM_SIZE + 0x01)
195#define TODC_TYPE_DS1501_SECONDS (TODC_TYPE_DS1501_NVRAM_SIZE + 0x00)
196#define TODC_TYPE_DS1501_CNTL_B (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0f)
197#define TODC_TYPE_DS1501_CNTL_A (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0f)
198#define TODC_TYPE_DS1501_WATCHDOG (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff)
199#define TODC_TYPE_DS1501_INTERRUPTS (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff)
200#define TODC_TYPE_DS1501_ALARM_DATE (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0b)
201#define TODC_TYPE_DS1501_ALARM_HOUR (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0a)
202#define TODC_TYPE_DS1501_ALARM_MINUTES (TODC_TYPE_DS1501_NVRAM_SIZE + 0x09)
203#define TODC_TYPE_DS1501_ALARM_SECONDS (TODC_TYPE_DS1501_NVRAM_SIZE + 0x08)
204#define TODC_TYPE_DS1501_CENTURY (TODC_TYPE_DS1501_NVRAM_SIZE + 0x07)
205#define TODC_TYPE_DS1501_FLAGS (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff)
206#define TODC_TYPE_DS1501_NVRAM_ADDR_REG 0x10
207#define TODC_TYPE_DS1501_NVRAM_DATA_REG 0x13
208
209#define TODC_TYPE_DS1553_NVRAM_SIZE 0x1ff0
210#define TODC_TYPE_DS1553_SW_FLAGS 0
211#define TODC_TYPE_DS1553_YEAR 0x1fff
212#define TODC_TYPE_DS1553_MONTH 0x1ffe
213#define TODC_TYPE_DS1553_DOM 0x1ffd /* Day of Month */
214#define TODC_TYPE_DS1553_DOW 0x1ffc /* Day of Week */
215#define TODC_TYPE_DS1553_HOURS 0x1ffb
216#define TODC_TYPE_DS1553_MINUTES 0x1ffa
217#define TODC_TYPE_DS1553_SECONDS 0x1ff9
218#define TODC_TYPE_DS1553_CNTL_B 0x1ff9
219#define TODC_TYPE_DS1553_CNTL_A 0x1ff8 /* control_a R/W regs */
220#define TODC_TYPE_DS1553_WATCHDOG 0x1ff7
221#define TODC_TYPE_DS1553_INTERRUPTS 0x1ff6
222#define TODC_TYPE_DS1553_ALARM_DATE 0x1ff5
223#define TODC_TYPE_DS1553_ALARM_HOUR 0x1ff4
224#define TODC_TYPE_DS1553_ALARM_MINUTES 0x1ff3
225#define TODC_TYPE_DS1553_ALARM_SECONDS 0x1ff2
226#define TODC_TYPE_DS1553_CENTURY 0x1ff8
227#define TODC_TYPE_DS1553_FLAGS 0x1ff0
228#define TODC_TYPE_DS1553_NVRAM_ADDR_REG 0
229#define TODC_TYPE_DS1553_NVRAM_DATA_REG 0
230
231#define TODC_TYPE_DS1557_NVRAM_SIZE 0x7fff0
232#define TODC_TYPE_DS1557_SW_FLAGS 0
233#define TODC_TYPE_DS1557_YEAR 0x7ffff
234#define TODC_TYPE_DS1557_MONTH 0x7fffe
235#define TODC_TYPE_DS1557_DOM 0x7fffd /* Day of Month */
236#define TODC_TYPE_DS1557_DOW 0x7fffc /* Day of Week */
237#define TODC_TYPE_DS1557_HOURS 0x7fffb
238#define TODC_TYPE_DS1557_MINUTES 0x7fffa
239#define TODC_TYPE_DS1557_SECONDS 0x7fff9
240#define TODC_TYPE_DS1557_CNTL_B 0x7fff9
241#define TODC_TYPE_DS1557_CNTL_A 0x7fff8 /* control_a R/W regs */
242#define TODC_TYPE_DS1557_WATCHDOG 0x7fff7
243#define TODC_TYPE_DS1557_INTERRUPTS 0x7fff6
244#define TODC_TYPE_DS1557_ALARM_DATE 0x7fff5
245#define TODC_TYPE_DS1557_ALARM_HOUR 0x7fff4
246#define TODC_TYPE_DS1557_ALARM_MINUTES 0x7fff3
247#define TODC_TYPE_DS1557_ALARM_SECONDS 0x7fff2
248#define TODC_TYPE_DS1557_CENTURY 0x7fff8
249#define TODC_TYPE_DS1557_FLAGS 0x7fff0
250#define TODC_TYPE_DS1557_NVRAM_ADDR_REG 0
251#define TODC_TYPE_DS1557_NVRAM_DATA_REG 0
252
253#define TODC_TYPE_DS1643_NVRAM_SIZE 0x1ff8
254#define TODC_TYPE_DS1643_SW_FLAGS 0
255#define TODC_TYPE_DS1643_YEAR 0x1fff
256#define TODC_TYPE_DS1643_MONTH 0x1ffe
257#define TODC_TYPE_DS1643_DOM 0x1ffd /* Day of Month */
258#define TODC_TYPE_DS1643_DOW 0x1ffc /* Day of Week */
259#define TODC_TYPE_DS1643_HOURS 0x1ffb
260#define TODC_TYPE_DS1643_MINUTES 0x1ffa
261#define TODC_TYPE_DS1643_SECONDS 0x1ff9
262#define TODC_TYPE_DS1643_CNTL_B 0x1ff9
263#define TODC_TYPE_DS1643_CNTL_A 0x1ff8 /* control_a R/W regs */
264#define TODC_TYPE_DS1643_WATCHDOG 0x1fff
265#define TODC_TYPE_DS1643_INTERRUPTS 0x1fff
266#define TODC_TYPE_DS1643_ALARM_DATE 0x1fff
267#define TODC_TYPE_DS1643_ALARM_HOUR 0x1fff
268#define TODC_TYPE_DS1643_ALARM_MINUTES 0x1fff
269#define TODC_TYPE_DS1643_ALARM_SECONDS 0x1fff
270#define TODC_TYPE_DS1643_CENTURY 0x1ff8
271#define TODC_TYPE_DS1643_FLAGS 0x1fff
272#define TODC_TYPE_DS1643_NVRAM_ADDR_REG 0
273#define TODC_TYPE_DS1643_NVRAM_DATA_REG 0
274
275#define TODC_TYPE_DS1693_NVRAM_SIZE 0 /* Not handled yet */
276#define TODC_TYPE_DS1693_SW_FLAGS 0
277#define TODC_TYPE_DS1693_YEAR 0x09
278#define TODC_TYPE_DS1693_MONTH 0x08
279#define TODC_TYPE_DS1693_DOM 0x07 /* Day of Month */
280#define TODC_TYPE_DS1693_DOW 0x06 /* Day of Week */
281#define TODC_TYPE_DS1693_HOURS 0x04
282#define TODC_TYPE_DS1693_MINUTES 0x02
283#define TODC_TYPE_DS1693_SECONDS 0x00
284#define TODC_TYPE_DS1693_CNTL_B 0x0b
285#define TODC_TYPE_DS1693_CNTL_A 0x0a
286#define TODC_TYPE_DS1693_WATCHDOG 0xff
287#define TODC_TYPE_DS1693_INTERRUPTS 0xff
288#define TODC_TYPE_DS1693_ALARM_DATE 0x49
289#define TODC_TYPE_DS1693_ALARM_HOUR 0x05
290#define TODC_TYPE_DS1693_ALARM_MINUTES 0x03
291#define TODC_TYPE_DS1693_ALARM_SECONDS 0x01
292#define TODC_TYPE_DS1693_CENTURY 0x48
293#define TODC_TYPE_DS1693_FLAGS 0xff
294#define TODC_TYPE_DS1693_NVRAM_ADDR_REG 0
295#define TODC_TYPE_DS1693_NVRAM_DATA_REG 0
296
297#define TODC_TYPE_DS1743_NVRAM_SIZE 0x1ff8
298#define TODC_TYPE_DS1743_SW_FLAGS 0
299#define TODC_TYPE_DS1743_YEAR 0x1fff
300#define TODC_TYPE_DS1743_MONTH 0x1ffe
301#define TODC_TYPE_DS1743_DOM 0x1ffd /* Day of Month */
302#define TODC_TYPE_DS1743_DOW 0x1ffc /* Day of Week */
303#define TODC_TYPE_DS1743_HOURS 0x1ffb
304#define TODC_TYPE_DS1743_MINUTES 0x1ffa
305#define TODC_TYPE_DS1743_SECONDS 0x1ff9
306#define TODC_TYPE_DS1743_CNTL_B 0x1ff9
307#define TODC_TYPE_DS1743_CNTL_A 0x1ff8 /* control_a R/W regs */
308#define TODC_TYPE_DS1743_WATCHDOG 0x1fff
309#define TODC_TYPE_DS1743_INTERRUPTS 0x1fff
310#define TODC_TYPE_DS1743_ALARM_DATE 0x1fff
311#define TODC_TYPE_DS1743_ALARM_HOUR 0x1fff
312#define TODC_TYPE_DS1743_ALARM_MINUTES 0x1fff
313#define TODC_TYPE_DS1743_ALARM_SECONDS 0x1fff
314#define TODC_TYPE_DS1743_CENTURY 0x1ff8
315#define TODC_TYPE_DS1743_FLAGS 0x1fff
316#define TODC_TYPE_DS1743_NVRAM_ADDR_REG 0
317#define TODC_TYPE_DS1743_NVRAM_DATA_REG 0
318
319#define TODC_TYPE_DS1746_NVRAM_SIZE 0x1fff8
320#define TODC_TYPE_DS1746_SW_FLAGS 0
321#define TODC_TYPE_DS1746_YEAR 0x1ffff
322#define TODC_TYPE_DS1746_MONTH 0x1fffe
323#define TODC_TYPE_DS1746_DOM 0x1fffd /* Day of Month */
324#define TODC_TYPE_DS1746_DOW 0x1fffc /* Day of Week */
325#define TODC_TYPE_DS1746_HOURS 0x1fffb
326#define TODC_TYPE_DS1746_MINUTES 0x1fffa
327#define TODC_TYPE_DS1746_SECONDS 0x1fff9
328#define TODC_TYPE_DS1746_CNTL_B 0x1fff9
329#define TODC_TYPE_DS1746_CNTL_A 0x1fff8 /* control_a R/W regs */
330#define TODC_TYPE_DS1746_WATCHDOG 0x00000
331#define TODC_TYPE_DS1746_INTERRUPTS 0x00000
332#define TODC_TYPE_DS1746_ALARM_DATE 0x00000
333#define TODC_TYPE_DS1746_ALARM_HOUR 0x00000
334#define TODC_TYPE_DS1746_ALARM_MINUTES 0x00000
335#define TODC_TYPE_DS1746_ALARM_SECONDS 0x00000
336#define TODC_TYPE_DS1746_CENTURY 0x00000
337#define TODC_TYPE_DS1746_FLAGS 0x00000
338#define TODC_TYPE_DS1746_NVRAM_ADDR_REG 0
339#define TODC_TYPE_DS1746_NVRAM_DATA_REG 0
340
341#define TODC_TYPE_DS1747_NVRAM_SIZE 0x7fff8
342#define TODC_TYPE_DS1747_SW_FLAGS 0
343#define TODC_TYPE_DS1747_YEAR 0x7ffff
344#define TODC_TYPE_DS1747_MONTH 0x7fffe
345#define TODC_TYPE_DS1747_DOM 0x7fffd /* Day of Month */
346#define TODC_TYPE_DS1747_DOW 0x7fffc /* Day of Week */
347#define TODC_TYPE_DS1747_HOURS 0x7fffb
348#define TODC_TYPE_DS1747_MINUTES 0x7fffa
349#define TODC_TYPE_DS1747_SECONDS 0x7fff9
350#define TODC_TYPE_DS1747_CNTL_B 0x7fff9
351#define TODC_TYPE_DS1747_CNTL_A 0x7fff8 /* control_a R/W regs */
352#define TODC_TYPE_DS1747_WATCHDOG 0x00000
353#define TODC_TYPE_DS1747_INTERRUPTS 0x00000
354#define TODC_TYPE_DS1747_ALARM_DATE 0x00000
355#define TODC_TYPE_DS1747_ALARM_HOUR 0x00000
356#define TODC_TYPE_DS1747_ALARM_MINUTES 0x00000
357#define TODC_TYPE_DS1747_ALARM_SECONDS 0x00000
358#define TODC_TYPE_DS1747_CENTURY 0x00000
359#define TODC_TYPE_DS1747_FLAGS 0x00000
360#define TODC_TYPE_DS1747_NVRAM_ADDR_REG 0
361#define TODC_TYPE_DS1747_NVRAM_DATA_REG 0
362
363#define TODC_TYPE_DS17285_NVRAM_SIZE (0x1000-0x80) /* 4Kx8 NVRAM (minus RTC regs) */
364#define TODC_TYPE_DS17285_SW_FLAGS TODC_FLAG_2_LEVEL_NVRAM
365#define TODC_TYPE_DS17285_SECONDS (TODC_TYPE_DS17285_NVRAM_SIZE + 0x00)
366#define TODC_TYPE_DS17285_ALARM_SECONDS (TODC_TYPE_DS17285_NVRAM_SIZE + 0x01)
367#define TODC_TYPE_DS17285_MINUTES (TODC_TYPE_DS17285_NVRAM_SIZE + 0x02)
368#define TODC_TYPE_DS17285_ALARM_MINUTES (TODC_TYPE_DS17285_NVRAM_SIZE + 0x03)
369#define TODC_TYPE_DS17285_HOURS (TODC_TYPE_DS17285_NVRAM_SIZE + 0x04)
370#define TODC_TYPE_DS17285_ALARM_HOUR (TODC_TYPE_DS17285_NVRAM_SIZE + 0x05)
371#define TODC_TYPE_DS17285_DOW (TODC_TYPE_DS17285_NVRAM_SIZE + 0x06)
372#define TODC_TYPE_DS17285_DOM (TODC_TYPE_DS17285_NVRAM_SIZE + 0x07)
373#define TODC_TYPE_DS17285_MONTH (TODC_TYPE_DS17285_NVRAM_SIZE + 0x08)
374#define TODC_TYPE_DS17285_YEAR (TODC_TYPE_DS17285_NVRAM_SIZE + 0x09)
375#define TODC_TYPE_DS17285_CNTL_A (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0A)
376#define TODC_TYPE_DS17285_CNTL_B (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0B)
377#define TODC_TYPE_DS17285_CNTL_C (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0C)
378#define TODC_TYPE_DS17285_CNTL_D (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0D)
379#define TODC_TYPE_DS17285_WATCHDOG 0
380#define TODC_TYPE_DS17285_INTERRUPTS 0
381#define TODC_TYPE_DS17285_ALARM_DATE 0
382#define TODC_TYPE_DS17285_CENTURY 0
383#define TODC_TYPE_DS17285_FLAGS 0
384#define TODC_TYPE_DS17285_NVRAM_ADDR_REG 0x50
385#define TODC_TYPE_DS17285_NVRAM_DATA_REG 0x53
386
387#define TODC_TYPE_MC146818_NVRAM_SIZE 0 /* XXXX */
388#define TODC_TYPE_MC146818_SW_FLAGS 0
389#define TODC_TYPE_MC146818_YEAR 0x09
390#define TODC_TYPE_MC146818_MONTH 0x08
391#define TODC_TYPE_MC146818_DOM 0x07 /* Day of Month */
392#define TODC_TYPE_MC146818_DOW 0x06 /* Day of Week */
393#define TODC_TYPE_MC146818_HOURS 0x04
394#define TODC_TYPE_MC146818_MINUTES 0x02
395#define TODC_TYPE_MC146818_SECONDS 0x00
396#define TODC_TYPE_MC146818_CNTL_B 0x0a
397#define TODC_TYPE_MC146818_CNTL_A 0x0b /* control_a R/W regs */
398#define TODC_TYPE_MC146818_WATCHDOG 0
399#define TODC_TYPE_MC146818_INTERRUPTS 0x0c
400#define TODC_TYPE_MC146818_ALARM_DATE 0xff
401#define TODC_TYPE_MC146818_ALARM_HOUR 0x05
402#define TODC_TYPE_MC146818_ALARM_MINUTES 0x03
403#define TODC_TYPE_MC146818_ALARM_SECONDS 0x01
404#define TODC_TYPE_MC146818_CENTURY 0xff
405#define TODC_TYPE_MC146818_FLAGS 0xff
406#define TODC_TYPE_MC146818_NVRAM_ADDR_REG 0
407#define TODC_TYPE_MC146818_NVRAM_DATA_REG 0
408
409#define TODC_TYPE_PC97307_NVRAM_SIZE 0 /* No NVRAM? */
410#define TODC_TYPE_PC97307_SW_FLAGS 0
411#define TODC_TYPE_PC97307_YEAR 0x09
412#define TODC_TYPE_PC97307_MONTH 0x08
413#define TODC_TYPE_PC97307_DOM 0x07 /* Day of Month */
414#define TODC_TYPE_PC97307_DOW 0x06 /* Day of Week */
415#define TODC_TYPE_PC97307_HOURS 0x04
416#define TODC_TYPE_PC97307_MINUTES 0x02
417#define TODC_TYPE_PC97307_SECONDS 0x00
418#define TODC_TYPE_PC97307_CNTL_B 0x0a
419#define TODC_TYPE_PC97307_CNTL_A 0x0b /* control_a R/W regs */
420#define TODC_TYPE_PC97307_WATCHDOG 0x0c
421#define TODC_TYPE_PC97307_INTERRUPTS 0x0d
422#define TODC_TYPE_PC97307_ALARM_DATE 0xff
423#define TODC_TYPE_PC97307_ALARM_HOUR 0x05
424#define TODC_TYPE_PC97307_ALARM_MINUTES 0x03
425#define TODC_TYPE_PC97307_ALARM_SECONDS 0x01
426#define TODC_TYPE_PC97307_CENTURY 0xff
427#define TODC_TYPE_PC97307_FLAGS 0xff
428#define TODC_TYPE_PC97307_NVRAM_ADDR_REG 0
429#define TODC_TYPE_PC97307_NVRAM_DATA_REG 0
430
431/*
432 * Define macros to allocate and init the todc_info_t table that will
433 * be used by the todc_time.c routines.
434 */
435#define TODC_ALLOC() \
436 static todc_info_t todc_info_alloc; \
437 todc_info_t *todc_info = &todc_info_alloc;
438
439#define TODC_INIT(clock_type, as0, as1, data, bits) { \
440 todc_info->rtc_type = clock_type; \
441 \
442 todc_info->nvram_as0 = (unsigned int)(as0); \
443 todc_info->nvram_as1 = (unsigned int)(as1); \
444 todc_info->nvram_data = (unsigned int)(data); \
445 \
446 todc_info->as0_bits = (bits); \
447 \
448 todc_info->nvram_size = clock_type ##_NVRAM_SIZE; \
449 todc_info->sw_flags = clock_type ##_SW_FLAGS; \
450 \
451 todc_info->year = clock_type ##_YEAR; \
452 todc_info->month = clock_type ##_MONTH; \
453 todc_info->day_of_month = clock_type ##_DOM; \
454 todc_info->day_of_week = clock_type ##_DOW; \
455 todc_info->hours = clock_type ##_HOURS; \
456 todc_info->minutes = clock_type ##_MINUTES; \
457 todc_info->seconds = clock_type ##_SECONDS; \
458 todc_info->control_b = clock_type ##_CNTL_B; \
459 todc_info->control_a = clock_type ##_CNTL_A; \
460 todc_info->watchdog = clock_type ##_WATCHDOG; \
461 todc_info->interrupts = clock_type ##_INTERRUPTS; \
462 todc_info->alarm_date = clock_type ##_ALARM_DATE; \
463 todc_info->alarm_hour = clock_type ##_ALARM_HOUR; \
464 todc_info->alarm_minutes = clock_type ##_ALARM_MINUTES; \
465 todc_info->alarm_seconds = clock_type ##_ALARM_SECONDS; \
466 todc_info->century = clock_type ##_CENTURY; \
467 todc_info->flags = clock_type ##_FLAGS; \
468 \
469 todc_info->nvram_addr_reg = clock_type ##_NVRAM_ADDR_REG; \
470 todc_info->nvram_data_reg = clock_type ##_NVRAM_DATA_REG; \
471}
472
473extern todc_info_t *todc_info;
474
475unsigned char todc_direct_read_val(int addr);
476void todc_direct_write_val(int addr, unsigned char val);
477unsigned char todc_m48txx_read_val(int addr);
478void todc_m48txx_write_val(int addr, unsigned char val);
479unsigned char todc_mc146818_read_val(int addr);
480void todc_mc146818_write_val(int addr, unsigned char val);
481
482long todc_time_init(void);
483void todc_get_rtc_time(struct rtc_time *);
484int todc_set_rtc_time(struct rtc_time *);
485void todc_calibrate_decr(void);
486
487#endif /* __PPC_KERNEL_TODC_H */
diff --git a/include/asm-powerpc/tsi108.h b/include/asm-powerpc/tsi108.h
new file mode 100644
index 00000000000..c4c278d72f7
--- /dev/null
+++ b/include/asm-powerpc/tsi108.h
@@ -0,0 +1,109 @@
1/*
2 * include/asm-ppc/tsi108.h
3 *
4 * common routine and memory layout for Tundra TSI108(Grendel) host bridge
5 * memory controller.
6 *
7 * Author: Jacob Pan (jacob.pan@freescale.com)
8 * Alex Bounine (alexandreb@tundra.com)
9 * 2004 (c) Freescale Semiconductor Inc. This file is licensed under
10 * the terms of the GNU General Public License version 2. This program
11 * is licensed "as is" without any warranty of any kind, whether express
12 * or implied.
13 */
14#ifndef __PPC_KERNEL_TSI108_H
15#define __PPC_KERNEL_TSI108_H
16
17#include <asm/pci-bridge.h>
18
19/* Size of entire register space */
20#define TSI108_REG_SIZE (0x10000)
21
22/* Sizes of register spaces for individual blocks */
23#define TSI108_HLP_SIZE 0x1000
24#define TSI108_PCI_SIZE 0x1000
25#define TSI108_CLK_SIZE 0x1000
26#define TSI108_PB_SIZE 0x1000
27#define TSI108_SD_SIZE 0x1000
28#define TSI108_DMA_SIZE 0x1000
29#define TSI108_ETH_SIZE 0x1000
30#define TSI108_I2C_SIZE 0x400
31#define TSI108_MPIC_SIZE 0x400
32#define TSI108_UART0_SIZE 0x200
33#define TSI108_GPIO_SIZE 0x200
34#define TSI108_UART1_SIZE 0x200
35
36/* Offsets within Tsi108(A) CSR space for individual blocks */
37#define TSI108_HLP_OFFSET 0x0000
38#define TSI108_PCI_OFFSET 0x1000
39#define TSI108_CLK_OFFSET 0x2000
40#define TSI108_PB_OFFSET 0x3000
41#define TSI108_SD_OFFSET 0x4000
42#define TSI108_DMA_OFFSET 0x5000
43#define TSI108_ETH_OFFSET 0x6000
44#define TSI108_I2C_OFFSET 0x7000
45#define TSI108_MPIC_OFFSET 0x7400
46#define TSI108_UART0_OFFSET 0x7800
47#define TSI108_GPIO_OFFSET 0x7A00
48#define TSI108_UART1_OFFSET 0x7C00
49
50/* Tsi108 registers used by common code components */
51#define TSI108_PCI_CSR (0x004)
52#define TSI108_PCI_IRP_CFG_CTL (0x180)
53#define TSI108_PCI_IRP_STAT (0x184)
54#define TSI108_PCI_IRP_ENABLE (0x188)
55#define TSI108_PCI_IRP_INTAD (0x18C)
56
57#define TSI108_PCI_IRP_STAT_P_INT (0x00400000)
58#define TSI108_PCI_IRP_ENABLE_P_INT (0x00400000)
59
60#define TSI108_CG_PWRUP_STATUS (0x234)
61
62#define TSI108_PB_ISR (0x00C)
63#define TSI108_PB_ERRCS (0x404)
64#define TSI108_PB_AERR (0x408)
65
66#define TSI108_PB_ERRCS_ES (1 << 1)
67#define TSI108_PB_ISR_PBS_RD_ERR (1 << 8)
68
69#define TSI108_PCI_CFG_BASE_PHYS (0xfb000000)
70#define TSI108_PCI_CFG_SIZE (0x01000000)
71/* Global variables */
72
73extern u32 tsi108_pci_cfg_base;
74/* Exported functions */
75
76extern int tsi108_bridge_init(struct pci_controller *hose, uint phys_csr_base);
77extern unsigned long tsi108_get_mem_size(void);
78extern unsigned long tsi108_get_cpu_clk(void);
79extern unsigned long tsi108_get_sdc_clk(void);
80extern int tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfn,
81 int offset, int len, u32 val);
82extern int tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn,
83 int offset, int len, u32 * val);
84extern void tsi108_clear_pci_error(u32 pci_cfg_base);
85
86extern phys_addr_t get_csrbase(void);
87
88typedef struct {
89 u32 regs; /* hw registers base address */
90 u32 phyregs; /* phy registers base address */
91 u16 phy; /* phy address */
92 u16 irq_num; /* irq number */
93 u8 mac_addr[6]; /* phy mac address */
94} hw_info;
95
96extern u32 get_vir_csrbase(void);
97extern u32 tsi108_csr_vir_base;
98
99extern inline u32 tsi108_read_reg(u32 reg_offset)
100{
101 return in_be32((volatile u32 *)(tsi108_csr_vir_base + reg_offset));
102}
103
104extern inline void tsi108_write_reg(u32 reg_offset, u32 val)
105{
106 out_be32((volatile u32 *)(tsi108_csr_vir_base + reg_offset), val);
107}
108
109#endif /* __PPC_KERNEL_TSI108_H */
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
index 19a1517ac43..55e57844fa7 100644
--- a/include/asm-powerpc/udbg.h
+++ b/include/asm-powerpc/udbg.h
@@ -42,7 +42,8 @@ extern void __init udbg_init_debug_lpar(void);
42extern void __init udbg_init_pmac_realmode(void); 42extern void __init udbg_init_pmac_realmode(void);
43extern void __init udbg_init_maple_realmode(void); 43extern void __init udbg_init_maple_realmode(void);
44extern void __init udbg_init_iseries(void); 44extern void __init udbg_init_iseries(void);
45extern void __init udbg_init_rtas(void); 45extern void __init udbg_init_rtas_panel(void);
46extern void __init udbg_init_rtas_console(void);
46 47
47#endif /* __KERNEL__ */ 48#endif /* __KERNEL__ */
48#endif /* _ASM_POWERPC_UDBG_H */ 49#endif /* _ASM_POWERPC_UDBG_H */
diff --git a/include/asm-ppc/floppy.h b/include/asm-ppc/floppy.h
index 2ba191eba44..d3963ca79ad 100644
--- a/include/asm-ppc/floppy.h
+++ b/include/asm-ppc/floppy.h
@@ -96,11 +96,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
96static int fd_request_irq(void) 96static int fd_request_irq(void)
97{ 97{
98 if (can_use_virtual_dma) 98 if (can_use_virtual_dma)
99 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 99 return request_irq(FLOPPY_IRQ, floppy_hardint,
100 "floppy", NULL); 100 IRQF_DISABLED, "floppy", NULL);
101 else 101 else
102 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 102 return request_irq(FLOPPY_IRQ, floppy_interrupt,
103 "floppy", NULL); 103 IRQF_DISABLED, "floppy", NULL);
104} 104}
105 105
106static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) 106static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h
index 3be5d760ffc..16dbc7d1745 100644
--- a/include/asm-ppc/ocp.h
+++ b/include/asm-ppc/ocp.h
@@ -26,7 +26,6 @@
26 26
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/list.h> 28#include <linux/list.h>
29#include <linux/devfs_fs_kernel.h>
30#include <linux/device.h> 29#include <linux/device.h>
31 30
32#include <asm/mmu.h> 31#include <asm/mmu.h>
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 0b19af82507..fe95c8258cf 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -170,7 +170,7 @@ extern __inline__ int get_order(unsigned long size)
170#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 170#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
171 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 171 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
172 172
173/* We do define AT_SYSINFO_EHDR but don't use the gate mecanism */ 173/* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */
174#define __HAVE_ARCH_GATE_AREA 1 174#define __HAVE_ARCH_GATE_AREA 1
175 175
176#include <asm-generic/memory_model.h> 176#include <asm-generic/memory_model.h>
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index 61434edbad7..11ffaaa5da1 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file,
133#define HAVE_ARCH_PCI_RESOURCE_TO_USER 133#define HAVE_ARCH_PCI_RESOURCE_TO_USER
134extern void pci_resource_to_user(const struct pci_dev *dev, int bar, 134extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
135 const struct resource *rsrc, 135 const struct resource *rsrc,
136 u64 *start, u64 *end); 136 resource_size_t *start, resource_size_t *end);
137 137
138 138
139#endif /* __KERNEL__ */ 139#endif /* __KERNEL__ */
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h
index 4d2b126ba15..0ddcdba79e4 100644
--- a/include/asm-s390/bitops.h
+++ b/include/asm-s390/bitops.h
@@ -12,6 +12,9 @@
12 * Copyright (C) 1992, Linus Torvalds 12 * Copyright (C) 1992, Linus Torvalds
13 * 13 *
14 */ 14 */
15
16#ifdef __KERNEL__
17
15#include <linux/compiler.h> 18#include <linux/compiler.h>
16 19
17/* 20/*
@@ -50,19 +53,6 @@
50 * with operation of the form "set_bit(bitnr, flags)". 53 * with operation of the form "set_bit(bitnr, flags)".
51 */ 54 */
52 55
53/* set ALIGN_CS to 1 if the SMP safe bit operations should
54 * align the address to 4 byte boundary. It seems to work
55 * without the alignment.
56 */
57#ifdef __KERNEL__
58#define ALIGN_CS 0
59#else
60#define ALIGN_CS 1
61#ifndef CONFIG_SMP
62#error "bitops won't work without CONFIG_SMP"
63#endif
64#endif
65
66/* bitmap tables from arch/S390/kernel/bitmap.S */ 56/* bitmap tables from arch/S390/kernel/bitmap.S */
67extern const char _oi_bitmap[]; 57extern const char _oi_bitmap[];
68extern const char _ni_bitmap[]; 58extern const char _ni_bitmap[];
@@ -121,10 +111,6 @@ static inline void set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
121 unsigned long addr, old, new, mask; 111 unsigned long addr, old, new, mask;
122 112
123 addr = (unsigned long) ptr; 113 addr = (unsigned long) ptr;
124#if ALIGN_CS == 1
125 nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */
126 addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */
127#endif
128 /* calculate address for CS */ 114 /* calculate address for CS */
129 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; 115 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3;
130 /* make OR mask */ 116 /* make OR mask */
@@ -141,10 +127,6 @@ static inline void clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
141 unsigned long addr, old, new, mask; 127 unsigned long addr, old, new, mask;
142 128
143 addr = (unsigned long) ptr; 129 addr = (unsigned long) ptr;
144#if ALIGN_CS == 1
145 nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */
146 addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */
147#endif
148 /* calculate address for CS */ 130 /* calculate address for CS */
149 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; 131 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3;
150 /* make AND mask */ 132 /* make AND mask */
@@ -161,10 +143,6 @@ static inline void change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
161 unsigned long addr, old, new, mask; 143 unsigned long addr, old, new, mask;
162 144
163 addr = (unsigned long) ptr; 145 addr = (unsigned long) ptr;
164#if ALIGN_CS == 1
165 nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */
166 addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */
167#endif
168 /* calculate address for CS */ 146 /* calculate address for CS */
169 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; 147 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3;
170 /* make XOR mask */ 148 /* make XOR mask */
@@ -182,10 +160,6 @@ test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
182 unsigned long addr, old, new, mask; 160 unsigned long addr, old, new, mask;
183 161
184 addr = (unsigned long) ptr; 162 addr = (unsigned long) ptr;
185#if ALIGN_CS == 1
186 nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */
187 addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */
188#endif
189 /* calculate address for CS */ 163 /* calculate address for CS */
190 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; 164 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3;
191 /* make OR/test mask */ 165 /* make OR/test mask */
@@ -205,10 +179,6 @@ test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
205 unsigned long addr, old, new, mask; 179 unsigned long addr, old, new, mask;
206 180
207 addr = (unsigned long) ptr; 181 addr = (unsigned long) ptr;
208#if ALIGN_CS == 1
209 nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */
210 addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */
211#endif
212 /* calculate address for CS */ 182 /* calculate address for CS */
213 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; 183 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3;
214 /* make AND/test mask */ 184 /* make AND/test mask */
@@ -228,10 +198,6 @@ test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
228 unsigned long addr, old, new, mask; 198 unsigned long addr, old, new, mask;
229 199
230 addr = (unsigned long) ptr; 200 addr = (unsigned long) ptr;
231#if ALIGN_CS == 1
232 nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */
233 addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */
234#endif
235 /* calculate address for CS */ 201 /* calculate address for CS */
236 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; 202 addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3;
237 /* make XOR/test mask */ 203 /* make XOR/test mask */
@@ -834,8 +800,6 @@ static inline int sched_find_first_bit(unsigned long *b)
834 800
835#include <asm-generic/bitops/hweight.h> 801#include <asm-generic/bitops/hweight.h>
836 802
837#ifdef __KERNEL__
838
839/* 803/*
840 * ATTENTION: intel byte ordering convention for ext2 and minix !! 804 * ATTENTION: intel byte ordering convention for ext2 and minix !!
841 * bit 0 is the LSB of addr; bit 31 is the MSB of addr; 805 * bit 0 is the LSB of addr; bit 31 is the MSB of addr;
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h
index 089cf567c31..2b161930635 100644
--- a/include/asm-s390/cio.h
+++ b/include/asm-s390/cio.h
@@ -276,6 +276,8 @@ extern void wait_cons_dev(void);
276 276
277extern void clear_all_subchannels(void); 277extern void clear_all_subchannels(void);
278 278
279extern void css_schedule_reprobe(void);
280
279#endif 281#endif
280 282
281#endif 283#endif
diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h
index 2d09950a9c1..241756f80df 100644
--- a/include/asm-s390/cmb.h
+++ b/include/asm-s390/cmb.h
@@ -44,10 +44,6 @@ struct cmbdata {
44#define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER,32) 44#define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER,32)
45/* enable channel measurement */ 45/* enable channel measurement */
46#define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER,33) 46#define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER,33)
47/* reset channel measurement block */
48#define BIODASDRESETCMB _IO(DASD_IOCTL_LETTER,34)
49/* read channel measurement data */
50#define BIODASDREADCMB _IOWR(DASD_IOCTL_LETTER,32,__u64)
51/* read channel measurement data */ 47/* read channel measurement data */
52#define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) 48#define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata)
53 49
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h
index 1630c26e8f4..c042f957808 100644
--- a/include/asm-s390/dasd.h
+++ b/include/asm-s390/dasd.h
@@ -68,10 +68,12 @@ typedef struct dasd_information2_t {
68 * 0x00: default features 68 * 0x00: default features
69 * 0x01: readonly (ro) 69 * 0x01: readonly (ro)
70 * 0x02: use diag discipline (diag) 70 * 0x02: use diag discipline (diag)
71 * 0x04: set the device initially online (internal use only)
71 */ 72 */
72#define DASD_FEATURE_DEFAULT 0 73#define DASD_FEATURE_DEFAULT 0x00
73#define DASD_FEATURE_READONLY 1 74#define DASD_FEATURE_READONLY 0x01
74#define DASD_FEATURE_USEDIAG 2 75#define DASD_FEATURE_USEDIAG 0x02
76#define DASD_FEATURE_INITIAL_ONLINE 0x04
75 77
76#define DASD_PARTN_BITS 2 78#define DASD_PARTN_BITS 2
77 79
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h
index 859b5e96982..24312387fa2 100644
--- a/include/asm-s390/pgtable.h
+++ b/include/asm-s390/pgtable.h
@@ -657,13 +657,6 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
657 __pte; \ 657 __pte; \
658}) 658})
659 659
660#define SetPageUptodate(_page) \
661 do { \
662 struct page *__page = (_page); \
663 if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
664 page_test_and_clear_dirty(_page); \
665 } while (0)
666
667#ifdef __s390x__ 660#ifdef __s390x__
668 661
669#define pfn_pmd(pfn, pgprot) \ 662#define pfn_pmd(pfn, pgprot) \
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h
index 7084626de21..f6cfddb278c 100644
--- a/include/asm-s390/signal.h
+++ b/include/asm-s390/signal.h
@@ -84,7 +84,6 @@ typedef unsigned long sigset_t;
84 * SA_FLAGS values: 84 * SA_FLAGS values:
85 * 85 *
86 * SA_ONSTACK indicates that a registered stack_t will be used. 86 * SA_ONSTACK indicates that a registered stack_t will be used.
87 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
88 * SA_RESTART flag to get restarting signals (which were the default long ago) 87 * SA_RESTART flag to get restarting signals (which were the default long ago)
89 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 88 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
90 * SA_RESETHAND clears the handler when the signal is delivered. 89 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -104,7 +103,6 @@ typedef unsigned long sigset_t;
104 103
105#define SA_NOMASK SA_NODEFER 104#define SA_NOMASK SA_NODEFER
106#define SA_ONESHOT SA_RESETHAND 105#define SA_ONESHOT SA_RESETHAND
107#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
108 106
109#define SA_RESTORER 0x04000000 107#define SA_RESTORER 0x04000000
110 108
diff --git a/include/asm-s390/socket.h b/include/asm-s390/socket.h
index 15a5298c874..1778a49a74c 100644
--- a/include/asm-s390/socket.h
+++ b/include/asm-s390/socket.h
@@ -56,5 +56,6 @@
56#define SO_ACCEPTCONN 30 56#define SO_ACCEPTCONN 30
57 57
58#define SO_PEERSEC 31 58#define SO_PEERSEC 31
59#define SO_PASSSEC 34
59 60
60#endif /* _ASM_SOCKET_H */ 61#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h
index 8e0c7ed73d0..0a518915bf9 100644
--- a/include/asm-s390/thread_info.h
+++ b/include/asm-s390/thread_info.h
@@ -63,6 +63,7 @@ struct thread_info {
63 .exec_domain = &default_exec_domain, \ 63 .exec_domain = &default_exec_domain, \
64 .flags = 0, \ 64 .flags = 0, \
65 .cpu = 0, \ 65 .cpu = 0, \
66 .preempt_count = 1, \
66 .restart_block = { \ 67 .restart_block = { \
67 .fn = do_no_restart_syscall, \ 68 .fn = do_no_restart_syscall, \
68 }, \ 69 }, \
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index e21443d3ea1..aa7a243862e 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -394,11 +394,9 @@
394 394
395#ifdef __KERNEL__ 395#ifdef __KERNEL__
396 396
397/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
398
399#define __syscall_return(type, res) \ 397#define __syscall_return(type, res) \
400do { \ 398do { \
401 if ((unsigned long)(res) >= (unsigned long)(-125)) { \ 399 if ((unsigned long)(res) >= (unsigned long)(-4095)) {\
402 errno = -(res); \ 400 errno = -(res); \
403 res = -1; \ 401 res = -1; \
404 } \ 402 } \
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h
index 307d9ce9f9e..dc1ad464fa3 100644
--- a/include/asm-sh/floppy.h
+++ b/include/asm-sh/floppy.h
@@ -146,12 +146,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
146static int fd_request_irq(void) 146static int fd_request_irq(void)
147{ 147{
148 if(can_use_virtual_dma) 148 if(can_use_virtual_dma)
149 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 149 return request_irq(FLOPPY_IRQ, floppy_hardint,
150 "floppy", NULL); 150 IRQF_DISABLED, "floppy", NULL);
151 else 151 else
152 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 152 return request_irq(FLOPPY_IRQ, floppy_interrupt,
153 "floppy", NULL); 153 IRQF_DISABLED, "floppy", NULL);
154
155} 154}
156 155
157static unsigned long dma_mem_alloc(unsigned long size) 156static unsigned long dma_mem_alloc(unsigned long size)
diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h
index 1d934fb2c58..fed26616967 100644
--- a/include/asm-sh/hw_irq.h
+++ b/include/asm-sh/hw_irq.h
@@ -1,9 +1,4 @@
1#ifndef __ASM_SH_HW_IRQ_H 1#ifndef __ASM_SH_HW_IRQ_H
2#define __ASM_SH_HW_IRQ_H 2#define __ASM_SH_HW_IRQ_H
3 3
4static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
5{
6 /* Nothing to do */
7}
8
9#endif /* __ASM_SH_HW_IRQ_H */ 4#endif /* __ASM_SH_HW_IRQ_H */
diff --git a/include/asm-sh/mpc1211/keyboard.h b/include/asm-sh/mpc1211/keyboard.h
index 5f0b9088c79..71ef4cf4242 100644
--- a/include/asm-sh/mpc1211/keyboard.h
+++ b/include/asm-sh/mpc1211/keyboard.h
@@ -57,7 +57,7 @@ extern unsigned char pckbd_sysrq_xlate[128];
57#define AUX_IRQ 12 57#define AUX_IRQ 12
58 58
59#define aux_request_irq(hand, dev_id) \ 59#define aux_request_irq(hand, dev_id) \
60 request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) 60 request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id)
61 61
62#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) 62#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
63 63
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h
index d6e8eb0e65c..5c5c1e85208 100644
--- a/include/asm-sh/signal.h
+++ b/include/asm-sh/signal.h
@@ -75,7 +75,6 @@ typedef unsigned long sigset_t;
75 * SA_FLAGS values: 75 * SA_FLAGS values:
76 * 76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used. 77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
79 * SA_RESTART flag to get restarting signals (which were the default long ago) 78 * SA_RESTART flag to get restarting signals (which were the default long ago)
80 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
81 * SA_RESETHAND clears the handler when the signal is delivered. 80 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -95,7 +94,6 @@ typedef unsigned long sigset_t;
95 94
96#define SA_NOMASK SA_NODEFER 95#define SA_NOMASK SA_NODEFER
97#define SA_ONESHOT SA_RESETHAND 96#define SA_ONESHOT SA_RESETHAND
98#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
99 97
100#define SA_RESTORER 0x04000000 98#define SA_RESTORER 0x04000000
101 99
diff --git a/include/asm-sh/socket.h b/include/asm-sh/socket.h
index 553904ff933..ca70362eb56 100644
--- a/include/asm-sh/socket.h
+++ b/include/asm-sh/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* __ASM_SH_SOCKET_H */ 53#endif /* __ASM_SH_SOCKET_H */
diff --git a/include/asm-sh64/hw_irq.h b/include/asm-sh64/hw_irq.h
index ae718d1f2d6..ebb39089b0a 100644
--- a/include/asm-sh64/hw_irq.h
+++ b/include/asm-sh64/hw_irq.h
@@ -11,6 +11,5 @@
11 * Copyright (C) 2000, 2001 Paolo Alberelli 11 * Copyright (C) 2000, 2001 Paolo Alberelli
12 * 12 *
13 */ 13 */
14static __inline__ void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { /* Nothing to do */ }
15 14
16#endif /* __ASM_SH64_HW_IRQ_H */ 15#endif /* __ASM_SH64_HW_IRQ_H */
diff --git a/include/asm-sh64/keyboard.h b/include/asm-sh64/keyboard.h
index 733e2bbe7b8..1fab96d792b 100644
--- a/include/asm-sh64/keyboard.h
+++ b/include/asm-sh64/keyboard.h
@@ -65,7 +65,7 @@ extern unsigned char pckbd_sysrq_xlate[128];
65#endif 65#endif
66 66
67#define aux_request_irq(hand, dev_id) \ 67#define aux_request_irq(hand, dev_id) \
68 request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) 68 request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id)
69 69
70#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) 70#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
71 71
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h
index 2400dc688a6..a5a28203cb3 100644
--- a/include/asm-sh64/signal.h
+++ b/include/asm-sh64/signal.h
@@ -74,7 +74,6 @@ typedef struct {
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef struct {
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99#define SA_RESTORER 0x04000000 97#define SA_RESTORER 0x04000000
100 98
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h
index 7a941b800b6..c53b332c850 100644
--- a/include/asm-sparc/floppy.h
+++ b/include/asm-sparc/floppy.h
@@ -271,7 +271,8 @@ static int sun_fd_request_irq(void)
271 271
272 if(!once) { 272 if(!once) {
273 once = 1; 273 once = 1;
274 error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, SA_INTERRUPT, "floppy"); 274 error = request_fast_irq(FLOPPY_IRQ, floppy_hardint,
275 IRQF_DISABLED, "floppy");
275 return ((error == 0) ? 0 : -1); 276 return ((error == 0) ? 0 : -1);
276 } else return 0; 277 } else return 0;
277} 278}
diff --git a/include/asm-sparc/of_device.h b/include/asm-sparc/of_device.h
index 4816d102f91..80ea31f6e17 100644
--- a/include/asm-sparc/of_device.h
+++ b/include/asm-sparc/of_device.h
@@ -4,10 +4,12 @@
4 4
5#include <linux/device.h> 5#include <linux/device.h>
6#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
7#include <asm/openprom.h>
7#include <asm/prom.h> 8#include <asm/prom.h>
8 9
9extern struct bus_type ebus_bus_type; 10extern struct bus_type ebus_bus_type;
10extern struct bus_type sbus_bus_type; 11extern struct bus_type sbus_bus_type;
12extern struct bus_type of_bus_type;
11 13
12/* 14/*
13 * The of_device is a kind of "base class" that is a superset of 15 * The of_device is a kind of "base class" that is a superset of
@@ -16,11 +18,25 @@ extern struct bus_type sbus_bus_type;
16 */ 18 */
17struct of_device 19struct of_device
18{ 20{
19 struct device_node *node; /* OF device node */ 21 struct device_node *node;
20 struct device dev; /* Generic device interface */ 22 struct device dev;
23 struct resource resource[PROMREG_MAX];
24 unsigned int irqs[PROMINTR_MAX];
25 int num_irqs;
26
27 void *sysdata;
28
29 int slot;
30 int portid;
31 int clock_freq;
21}; 32};
22#define to_of_device(d) container_of(d, struct of_device, dev) 33#define to_of_device(d) container_of(d, struct of_device, dev)
23 34
35extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
36extern void of_iounmap(void __iomem *base, unsigned long size);
37
38extern struct of_device *of_find_device_by_node(struct device_node *);
39
24extern const struct of_device_id *of_match_device( 40extern const struct of_device_id *of_match_device(
25 const struct of_device_id *matches, const struct of_device *dev); 41 const struct of_device_id *matches, const struct of_device *dev);
26 42
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h
index f9cf44c0716..86c13dccea3 100644
--- a/include/asm-sparc/prom.h
+++ b/include/asm-sparc/prom.h
@@ -25,11 +25,6 @@
25typedef u32 phandle; 25typedef u32 phandle;
26typedef u32 ihandle; 26typedef u32 ihandle;
27 27
28struct interrupt_info {
29 int line;
30 int sense; /* +ve/-ve logic, edge or level, etc. */
31};
32
33struct property { 28struct property {
34 char *name; 29 char *name;
35 int length; 30 int length;
@@ -43,9 +38,6 @@ struct device_node {
43 char *name; 38 char *name;
44 char *type; 39 char *type;
45 phandle node; 40 phandle node;
46 phandle linux_phandle;
47 int n_intrs;
48 struct interrupt_info *intrs;
49 char *path_component_name; 41 char *path_component_name;
50 char *full_name; 42 char *full_name;
51 43
@@ -69,6 +61,8 @@ struct device_node {
69#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) 61#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
70#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) 62#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
71 63
64#define OF_BAD_ADDR ((u64)-1)
65
72static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) 66static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
73{ 67{
74 dn->pde = de; 68 dn->pde = de;
@@ -101,6 +95,8 @@ extern int of_set_property(struct device_node *node, const char *name, void *val
101extern int of_getintprop_default(struct device_node *np, 95extern int of_getintprop_default(struct device_node *np,
102 const char *name, 96 const char *name,
103 int def); 97 int def);
98extern int of_n_addr_cells(struct device_node *np);
99extern int of_n_size_cells(struct device_node *np);
104 100
105extern void prom_build_devicetree(void); 101extern void prom_build_devicetree(void);
106 102
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index aa9960ad0ca..0ae5084c427 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -132,16 +132,13 @@ struct sigstack {
132 * usage of signal stacks by using the (now obsolete) sa_restorer field in 132 * usage of signal stacks by using the (now obsolete) sa_restorer field in
133 * the sigaction structure as a stack pointer. This is now possible due to 133 * the sigaction structure as a stack pointer. This is now possible due to
134 * the changes in signal handling. LBT 010493. 134 * the changes in signal handling. LBT 010493.
135 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
136 * SA_RESTART flag to get restarting signals (which were the default long ago) 135 * SA_RESTART flag to get restarting signals (which were the default long ago)
137 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
138 */ 136 */
139#define SA_NOCLDSTOP _SV_IGNCHILD 137#define SA_NOCLDSTOP _SV_IGNCHILD
140#define SA_STACK _SV_SSTACK 138#define SA_STACK _SV_SSTACK
141#define SA_ONSTACK _SV_SSTACK 139#define SA_ONSTACK _SV_SSTACK
142#define SA_RESTART _SV_INTR 140#define SA_RESTART _SV_INTR
143#define SA_ONESHOT _SV_RESET 141#define SA_ONESHOT _SV_RESET
144#define SA_INTERRUPT 0x10u
145#define SA_NOMASK 0x20u 142#define SA_NOMASK 0x20u
146#define SA_NOCLDWAIT 0x100u 143#define SA_NOCLDWAIT 0x100u
147#define SA_SIGINFO 0x200u 144#define SA_SIGINFO 0x200u
diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h
index 4e0ce3a35ea..f6c4e5baf3f 100644
--- a/include/asm-sparc/socket.h
+++ b/include/asm-sparc/socket.h
@@ -48,6 +48,7 @@
48#define SCM_TIMESTAMP SO_TIMESTAMP 48#define SCM_TIMESTAMP SO_TIMESTAMP
49 49
50#define SO_PEERSEC 0x001e 50#define SO_PEERSEC 0x001e
51#define SO_PASSSEC 0x001f
51 52
52/* Security levels - as per NRL IPv6 - don't actually do anything */ 53/* Security levels - as per NRL IPv6 - don't actually do anything */
53#define SO_SECURITY_AUTHENTICATION 0x5001 54#define SO_SECURITY_AUTHENTICATION 0x5001
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index b591d0e8d8f..abf15003801 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -267,7 +267,7 @@ static int sun_fd_request_irq(void)
267 once = 1; 267 once = 1;
268 268
269 error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, 269 error = request_irq(FLOPPY_IRQ, sparc_floppy_irq,
270 SA_INTERRUPT, "floppy", NULL); 270 IRQF_DISABLED, "floppy", NULL);
271 271
272 return ((error == 0) ? 0 : -1); 272 return ((error == 0) ? 0 : -1);
273 } 273 }
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h
index 024088ef9d2..a62c7b997d6 100644
--- a/include/asm-sparc64/of_device.h
+++ b/include/asm-sparc64/of_device.h
@@ -4,11 +4,13 @@
4 4
5#include <linux/device.h> 5#include <linux/device.h>
6#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
7#include <asm/openprom.h>
7#include <asm/prom.h> 8#include <asm/prom.h>
8 9
9extern struct bus_type isa_bus_type; 10extern struct bus_type isa_bus_type;
10extern struct bus_type ebus_bus_type; 11extern struct bus_type ebus_bus_type;
11extern struct bus_type sbus_bus_type; 12extern struct bus_type sbus_bus_type;
13extern struct bus_type of_bus_type;
12 14
13/* 15/*
14 * The of_device is a kind of "base class" that is a superset of 16 * The of_device is a kind of "base class" that is a superset of
@@ -17,11 +19,25 @@ extern struct bus_type sbus_bus_type;
17 */ 19 */
18struct of_device 20struct of_device
19{ 21{
20 struct device_node *node; /* OF device node */ 22 struct device_node *node;
21 struct device dev; /* Generic device interface */ 23 struct device dev;
24 struct resource resource[PROMREG_MAX];
25 unsigned int irqs[PROMINTR_MAX];
26 int num_irqs;
27
28 void *sysdata;
29
30 int slot;
31 int portid;
32 int clock_freq;
22}; 33};
23#define to_of_device(d) container_of(d, struct of_device, dev) 34#define to_of_device(d) container_of(d, struct of_device, dev)
24 35
36extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
37extern void of_iounmap(void __iomem *base, unsigned long size);
38
39extern struct of_device *of_find_device_by_node(struct device_node *);
40
25extern const struct of_device_id *of_match_device( 41extern const struct of_device_id *of_match_device(
26 const struct of_device_id *matches, const struct of_device *dev); 42 const struct of_device_id *matches, const struct of_device *dev);
27 43
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index cebe80b1da6..dcfa7629358 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -16,6 +16,7 @@
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/oplib.h> 17#include <asm/oplib.h>
18#include <asm/prom.h> 18#include <asm/prom.h>
19#include <asm/of_device.h>
19#include <asm/iommu.h> 20#include <asm/iommu.h>
20 21
21/* The abstraction used here is that there are PCI controllers, 22/* The abstraction used here is that there are PCI controllers,
@@ -209,7 +210,6 @@ struct pci_controller_info {
209 210
210 /* Operations which are controller specific. */ 211 /* Operations which are controller specific. */
211 void (*scan_bus)(struct pci_controller_info *); 212 void (*scan_bus)(struct pci_controller_info *);
212 unsigned int (*irq_build)(struct pci_pbm_info *, struct pci_dev *, unsigned int);
213 void (*base_address_update)(struct pci_dev *, int); 213 void (*base_address_update)(struct pci_dev *, int);
214 void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); 214 void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *);
215 215
@@ -217,8 +217,6 @@ struct pci_controller_info {
217 struct pci_ops *pci_ops; 217 struct pci_ops *pci_ops;
218 unsigned int pci_first_busno; 218 unsigned int pci_first_busno;
219 unsigned int pci_last_busno; 219 unsigned int pci_last_busno;
220
221 void *starfire_cookie;
222}; 220};
223 221
224/* PCI devices which are not bridges have this placed in their pci_dev 222/* PCI devices which are not bridges have this placed in their pci_dev
@@ -228,6 +226,7 @@ struct pci_controller_info {
228struct pcidev_cookie { 226struct pcidev_cookie {
229 struct pci_pbm_info *pbm; 227 struct pci_pbm_info *pbm;
230 struct device_node *prom_node; 228 struct device_node *prom_node;
229 struct of_device *op;
231 struct linux_prom_pci_registers prom_regs[PROMREG_MAX]; 230 struct linux_prom_pci_registers prom_regs[PROMREG_MAX];
232 int num_prom_regs; 231 int num_prom_regs;
233 struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; 232 struct linux_prom_pci_registers prom_assignments[PROMREG_MAX];
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h
index 265614d497c..99671ed6625 100644
--- a/include/asm-sparc64/prom.h
+++ b/include/asm-sparc64/prom.h
@@ -25,11 +25,6 @@
25typedef u32 phandle; 25typedef u32 phandle;
26typedef u32 ihandle; 26typedef u32 ihandle;
27 27
28struct interrupt_info {
29 int line;
30 int sense; /* +ve/-ve logic, edge or level, etc. */
31};
32
33struct property { 28struct property {
34 char *name; 29 char *name;
35 int length; 30 int length;
@@ -39,13 +34,11 @@ struct property {
39 unsigned int unique_id; 34 unsigned int unique_id;
40}; 35};
41 36
37struct of_irq_controller;
42struct device_node { 38struct device_node {
43 char *name; 39 char *name;
44 char *type; 40 char *type;
45 phandle node; 41 phandle node;
46 phandle linux_phandle;
47 int n_intrs;
48 struct interrupt_info *intrs;
49 char *path_component_name; 42 char *path_component_name;
50 char *full_name; 43 char *full_name;
51 44
@@ -61,6 +54,13 @@ struct device_node {
61 unsigned long _flags; 54 unsigned long _flags;
62 void *data; 55 void *data;
63 unsigned int unique_id; 56 unsigned int unique_id;
57
58 struct of_irq_controller *irq_trans;
59};
60
61struct of_irq_controller {
62 unsigned int (*irq_build)(struct device_node *, unsigned int, void *);
63 void *data;
64}; 64};
65 65
66/* flag descriptions */ 66/* flag descriptions */
@@ -69,6 +69,8 @@ struct device_node {
69#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) 69#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
70#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) 70#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
71 71
72#define OF_BAD_ADDR ((u64)-1)
73
72static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) 74static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
73{ 75{
74 dn->pde = de; 76 dn->pde = de;
@@ -101,6 +103,8 @@ extern int of_set_property(struct device_node *node, const char *name, void *val
101extern int of_getintprop_default(struct device_node *np, 103extern int of_getintprop_default(struct device_node *np,
102 const char *name, 104 const char *name,
103 int def); 105 int def);
106extern int of_n_addr_cells(struct device_node *np);
107extern int of_n_size_cells(struct device_node *np);
104 108
105extern void prom_build_devicetree(void); 109extern void prom_build_devicetree(void);
106 110
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h
index 56ee985e460..7efd49d31bb 100644
--- a/include/asm-sparc64/sbus.h
+++ b/include/asm-sparc64/sbus.h
@@ -80,7 +80,6 @@ struct sbus_bus {
80 int num_sbus_ranges; 80 int num_sbus_ranges;
81 81
82 int portid; 82 int portid;
83 void *starfire_cookie;
84}; 83};
85#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev) 84#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev)
86 85
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index fdc42a14d4e..9968871103b 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -133,16 +133,13 @@ struct sigstack {
133 * usage of signal stacks by using the (now obsolete) sa_restorer field in 133 * usage of signal stacks by using the (now obsolete) sa_restorer field in
134 * the sigaction structure as a stack pointer. This is now possible due to 134 * the sigaction structure as a stack pointer. This is now possible due to
135 * the changes in signal handling. LBT 010493. 135 * the changes in signal handling. LBT 010493.
136 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
137 * SA_RESTART flag to get restarting signals (which were the default long ago) 136 * SA_RESTART flag to get restarting signals (which were the default long ago)
138 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
139 */ 137 */
140#define SA_NOCLDSTOP _SV_IGNCHILD 138#define SA_NOCLDSTOP _SV_IGNCHILD
141#define SA_STACK _SV_SSTACK 139#define SA_STACK _SV_SSTACK
142#define SA_ONSTACK _SV_SSTACK 140#define SA_ONSTACK _SV_SSTACK
143#define SA_RESTART _SV_INTR 141#define SA_RESTART _SV_INTR
144#define SA_ONESHOT _SV_RESET 142#define SA_ONESHOT _SV_RESET
145#define SA_INTERRUPT 0x10u
146#define SA_NOMASK 0x20u 143#define SA_NOMASK 0x20u
147#define SA_NOCLDWAIT 0x100u 144#define SA_NOCLDWAIT 0x100u
148#define SA_SIGINFO 0x200u 145#define SA_SIGINFO 0x200u
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h
index 59987dad335..754d46a50af 100644
--- a/include/asm-sparc64/socket.h
+++ b/include/asm-sparc64/socket.h
@@ -48,6 +48,7 @@
48#define SCM_TIMESTAMP SO_TIMESTAMP 48#define SCM_TIMESTAMP SO_TIMESTAMP
49 49
50#define SO_PEERSEC 0x001e 50#define SO_PEERSEC 0x001e
51#define SO_PASSSEC 0x001f
51 52
52/* Security levels - as per NRL IPv6 - don't actually do anything */ 53/* Security levels - as per NRL IPv6 - don't actually do anything */
53#define SO_SECURITY_AUTHENTICATION 0x5001 54#define SO_SECURITY_AUTHENTICATION 0x5001
diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h
index b606cb2b32a..48b50b5e35b 100644
--- a/include/asm-sparc64/starfire.h
+++ b/include/asm-sparc64/starfire.h
@@ -14,7 +14,7 @@ extern int this_is_starfire;
14extern void check_if_starfire(void); 14extern void check_if_starfire(void);
15extern void starfire_cpu_setup(void); 15extern void starfire_cpu_setup(void);
16extern int starfire_hard_smp_processor_id(void); 16extern int starfire_hard_smp_processor_id(void);
17extern void *starfire_hookup(int); 17extern void starfire_hookup(int);
18extern unsigned int starfire_translate(unsigned long imap, unsigned int upaid); 18extern unsigned int starfire_translate(unsigned long imap, unsigned int upaid);
19 19
20#endif 20#endif
diff --git a/include/asm-sparc64/vdev.h b/include/asm-sparc64/vdev.h
deleted file mode 100644
index 25637c57675..00000000000
--- a/include/asm-sparc64/vdev.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* vdev.h: SUN4V virtual device interfaces and defines.
2 *
3 * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
4 */
5
6#ifndef _SPARC64_VDEV_H
7#define _SPARC64_VDEV_H
8
9#include <linux/types.h>
10#include <asm/prom.h>
11
12extern u32 sun4v_vdev_devhandle;
13extern struct device_node *sun4v_vdev_root;
14
15extern unsigned int sun4v_vdev_device_interrupt(struct device_node *dev_node);
16
17#endif /* !(_SPARC64_VDEV_H) */
diff --git a/include/asm-um/hw_irq.h b/include/asm-um/hw_irq.h
index 4ee38c0b6a6..1cf84cf5f21 100644
--- a/include/asm-um/hw_irq.h
+++ b/include/asm-um/hw_irq.h
@@ -4,7 +4,4 @@
4#include "asm/irq.h" 4#include "asm/irq.h"
5#include "asm/archparam.h" 5#include "asm/archparam.h"
6 6
7static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
8{}
9
10#endif 7#endif
diff --git a/include/asm-um/io.h b/include/asm-um/io.h
index 1934d9340e2..44e8b8c772a 100644
--- a/include/asm-um/io.h
+++ b/include/asm-um/io.h
@@ -45,8 +45,13 @@ static inline void writel(unsigned int b, volatile void __iomem *addr)
45{ 45{
46 *(volatile unsigned int __force *) addr = b; 46 *(volatile unsigned int __force *) addr = b;
47} 47}
48static inline void writeq(unsigned int b, volatile void __iomem *addr)
49{
50 *(volatile unsigned long long __force *) addr = b;
51}
48#define __raw_writeb writeb 52#define __raw_writeb writeb
49#define __raw_writew writew 53#define __raw_writew writew
50#define __raw_writel writel 54#define __raw_writel writel
55#define __raw_writeq writeq
51 56
52#endif 57#endif
diff --git a/include/asm-um/kmap_types.h b/include/asm-um/kmap_types.h
index 0b22ad776e7..6c03acdb440 100644
--- a/include/asm-um/kmap_types.h
+++ b/include/asm-um/kmap_types.h
@@ -6,6 +6,24 @@
6#ifndef __UM_KMAP_TYPES_H 6#ifndef __UM_KMAP_TYPES_H
7#define __UM_KMAP_TYPES_H 7#define __UM_KMAP_TYPES_H
8 8
9#include "asm/arch/kmap_types.h" 9/* No more #include "asm/arch/kmap_types.h" ! */
10
11enum km_type {
12 KM_BOUNCE_READ,
13 KM_SKB_SUNRPC_DATA,
14 KM_SKB_DATA_SOFTIRQ,
15 KM_USER0,
16 KM_USER1,
17 KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
18 KM_BIO_SRC_IRQ,
19 KM_BIO_DST_IRQ,
20 KM_PTE0,
21 KM_PTE1,
22 KM_IRQ0,
23 KM_IRQ1,
24 KM_SOFTIRQ0,
25 KM_SOFTIRQ1,
26 KM_TYPE_NR
27};
10 28
11#endif 29#endif
diff --git a/include/asm-v850/hw_irq.h b/include/asm-v850/hw_irq.h
index a8aab434271..043e94bb6bd 100644
--- a/include/asm-v850/hw_irq.h
+++ b/include/asm-v850/hw_irq.h
@@ -1,8 +1,4 @@
1#ifndef __V850_HW_IRQ_H__ 1#ifndef __V850_HW_IRQ_H__
2#define __V850_HW_IRQ_H__ 2#define __V850_HW_IRQ_H__
3 3
4static inline void hw_resend_irq (struct hw_interrupt_type *h, unsigned int i)
5{
6}
7
8#endif /* __V850_HW_IRQ_H__ */ 4#endif /* __V850_HW_IRQ_H__ */
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h
index cb52caa6992..a38df0834bb 100644
--- a/include/asm-v850/signal.h
+++ b/include/asm-v850/signal.h
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t;
77 * SA_FLAGS values: 77 * SA_FLAGS values:
78 * 78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used. 79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
81 * SA_RESTART flag to get restarting signals (which were the default long ago) 80 * SA_RESTART flag to get restarting signals (which were the default long ago)
82 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
83 * SA_RESETHAND clears the handler when the signal is delivered. 82 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -97,7 +96,6 @@ typedef unsigned long sigset_t;
97 96
98#define SA_NOMASK SA_NODEFER 97#define SA_NOMASK SA_NODEFER
99#define SA_ONESHOT SA_RESETHAND 98#define SA_ONESHOT SA_RESETHAND
100#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
101 99
102#define SA_RESTORER 0x04000000 100#define SA_RESTORER 0x04000000
103 101
diff --git a/include/asm-v850/socket.h b/include/asm-v850/socket.h
index 0240d366a0a..0dfe55ac2ef 100644
--- a/include/asm-v850/socket.h
+++ b/include/asm-v850/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* __V850_SOCKET_H__ */ 53#endif /* __V850_SOCKET_H__ */
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h
index 387c8f66af7..aa67bfd1b3c 100644
--- a/include/asm-x86_64/alternative.h
+++ b/include/asm-x86_64/alternative.h
@@ -17,11 +17,20 @@ struct alt_instr {
17extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); 17extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
18 18
19struct module; 19struct module;
20
21#ifdef CONFIG_SMP
20extern void alternatives_smp_module_add(struct module *mod, char *name, 22extern void alternatives_smp_module_add(struct module *mod, char *name,
21 void *locks, void *locks_end, 23 void *locks, void *locks_end,
22 void *text, void *text_end); 24 void *text, void *text_end);
23extern void alternatives_smp_module_del(struct module *mod); 25extern void alternatives_smp_module_del(struct module *mod);
24extern void alternatives_smp_switch(int smp); 26extern void alternatives_smp_switch(int smp);
27#else
28static inline void alternatives_smp_module_add(struct module *mod, char *name,
29 void *locks, void *locks_end,
30 void *text, void *text_end) {}
31static inline void alternatives_smp_module_del(struct module *mod) {}
32static inline void alternatives_smp_switch(int smp) {}
33#endif
25 34
26#endif 35#endif
27 36
diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h
index 006291e89b4..32ff5d13271 100644
--- a/include/asm-x86_64/floppy.h
+++ b/include/asm-x86_64/floppy.h
@@ -144,11 +144,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
144static int fd_request_irq(void) 144static int fd_request_irq(void)
145{ 145{
146 if(can_use_virtual_dma) 146 if(can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 "floppy", NULL); 148 IRQF_DISABLED, "floppy", NULL);
149 else 149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 "floppy", NULL); 151 IRQF_DISABLED, "floppy", NULL);
152} 152}
153 153
154static unsigned long dma_mem_alloc(unsigned long size) 154static unsigned long dma_mem_alloc(unsigned long size)
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h
index 93187746278..48a4a5364e8 100644
--- a/include/asm-x86_64/hw_irq.h
+++ b/include/asm-x86_64/hw_irq.h
@@ -127,15 +127,6 @@ __asm__( \
127 "push $~(" #nr ") ; " \ 127 "push $~(" #nr ") ; " \
128 "jmp common_interrupt"); 128 "jmp common_interrupt");
129 129
130#if defined(CONFIG_X86_IO_APIC)
131static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {
132 if (IO_APIC_IRQ(i))
133 send_IPI_self(IO_APIC_VECTOR(i));
134}
135#else
136static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
137#endif
138
139#define platform_legacy_irq(irq) ((irq) < 16) 130#define platform_legacy_irq(irq) ((irq) < 16)
140 131
141#endif 132#endif
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index f8d55798535..cef7a7d51b7 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -83,7 +83,6 @@ typedef unsigned long sigset_t;
83 * SA_FLAGS values: 83 * SA_FLAGS values:
84 * 84 *
85 * SA_ONSTACK indicates that a registered stack_t will be used. 85 * SA_ONSTACK indicates that a registered stack_t will be used.
86 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
87 * SA_RESTART flag to get restarting signals (which were the default long ago) 86 * SA_RESTART flag to get restarting signals (which were the default long ago)
88 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 87 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
89 * SA_RESETHAND clears the handler when the signal is delivered. 88 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -103,7 +102,6 @@ typedef unsigned long sigset_t;
103 102
104#define SA_NOMASK SA_NODEFER 103#define SA_NOMASK SA_NODEFER
105#define SA_ONESHOT SA_RESETHAND 104#define SA_ONESHOT SA_RESETHAND
106#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
107 105
108#define SA_RESTORER 0x04000000 106#define SA_RESTORER 0x04000000
109 107
diff --git a/include/asm-x86_64/socket.h b/include/asm-x86_64/socket.h
index f2cdbeae5d5..b4670260793 100644
--- a/include/asm-x86_64/socket.h
+++ b/include/asm-x86_64/socket.h
@@ -48,5 +48,6 @@
48#define SO_ACCEPTCONN 30 48#define SO_ACCEPTCONN 30
49 49
50#define SO_PEERSEC 31 50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
51 52
52#endif /* _ASM_SOCKET_H */ 53#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-xtensa/hw_irq.h b/include/asm-xtensa/hw_irq.h
index ccf436249ea..3ddbea759b2 100644
--- a/include/asm-xtensa/hw_irq.h
+++ b/include/asm-xtensa/hw_irq.h
@@ -11,8 +11,4 @@
11#ifndef _XTENSA_HW_IRQ_H 11#ifndef _XTENSA_HW_IRQ_H
12#define _XTENSA_HW_IRQ_H 12#define _XTENSA_HW_IRQ_H
13 13
14static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
15{
16}
17
18#endif 14#endif
diff --git a/include/asm-xtensa/signal.h b/include/asm-xtensa/signal.h
index a99c9aec64e..633ba73bc4d 100644
--- a/include/asm-xtensa/signal.h
+++ b/include/asm-xtensa/signal.h
@@ -75,7 +75,6 @@ typedef struct {
75 * SA_FLAGS values: 75 * SA_FLAGS values:
76 * 76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used. 77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
79 * SA_RESTART flag to get restarting signals (which were the default long ago) 78 * SA_RESTART flag to get restarting signals (which were the default long ago)
80 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
81 * SA_RESETHAND clears the handler when the signal is delivered. 80 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -95,7 +94,6 @@ typedef struct {
95 94
96#define SA_NOMASK SA_NODEFER 95#define SA_NOMASK SA_NODEFER
97#define SA_ONESHOT SA_RESETHAND 96#define SA_ONESHOT SA_RESETHAND
98#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
99 97
100#define SA_RESTORER 0x04000000 98#define SA_RESTORER 0x04000000
101 99
@@ -109,19 +107,6 @@ typedef struct {
109#define SIGSTKSZ 8192 107#define SIGSTKSZ 8192
110 108
111#ifndef __ASSEMBLY__ 109#ifndef __ASSEMBLY__
112#ifdef __KERNEL__
113
114/*
115 * These values of sa_flags are used only by the kernel as part of the
116 * irq handling routines.
117 *
118 * SA_INTERRUPT is also used by the irq handling routines.
119 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
120 */
121#define SA_SAMPLE_RANDOM SA_RESTART
122#define SA_SHIRQ 0x04000000
123#define SA_PROBEIRQ 0x08000000
124#endif
125 110
126#define SIG_BLOCK 0 /* for blocking signals */ 111#define SIG_BLOCK 0 /* for blocking signals */
127#define SIG_UNBLOCK 1 /* for unblocking signals */ 112#define SIG_UNBLOCK 1 /* for unblocking signals */
diff --git a/include/asm-xtensa/socket.h b/include/asm-xtensa/socket.h
index 00f83f3a6d7..971d231be60 100644
--- a/include/asm-xtensa/socket.h
+++ b/include/asm-xtensa/socket.h
@@ -59,5 +59,6 @@
59 59
60#define SO_ACCEPTCONN 30 60#define SO_ACCEPTCONN 30
61#define SO_PEERSEC 31 61#define SO_PEERSEC 31
62#define SO_PASSSEC 34
62 63
63#endif /* _XTENSA_SOCKET_H */ 64#endif /* _XTENSA_SOCKET_H */
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index 1eb238affb1..41788a31c43 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -7,6 +7,7 @@
7#define LINUX_ATMDEV_H 7#define LINUX_ATMDEV_H
8 8
9 9
10#include <linux/device.h>
10#include <linux/atmapi.h> 11#include <linux/atmapi.h>
11#include <linux/atm.h> 12#include <linux/atm.h>
12#include <linux/atmioc.h> 13#include <linux/atmioc.h>
@@ -358,6 +359,7 @@ struct atm_dev {
358 struct proc_dir_entry *proc_entry; /* proc entry */ 359 struct proc_dir_entry *proc_entry; /* proc entry */
359 char *proc_name; /* proc entry name */ 360 char *proc_name; /* proc entry name */
360#endif 361#endif
362 struct class_device class_dev; /* sysfs class device */
361 struct list_head dev_list; /* linkage */ 363 struct list_head dev_list; /* linkage */
362}; 364};
363 365
@@ -459,7 +461,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
459 BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags)); 461 BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags));
460 if (dev->ops->dev_close) 462 if (dev->ops->dev_close)
461 dev->ops->dev_close(dev); 463 dev->ops->dev_close(dev);
462 kfree(dev); 464 class_device_put(&dev->class_dev);
463 } 465 }
464} 466}
465 467
diff --git a/include/linux/audit.h b/include/linux/audit.h
index e051ff9c5b5..b27d7debc5a 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -122,10 +122,17 @@
122/* Rule structure sizes -- if these change, different AUDIT_ADD and 122/* Rule structure sizes -- if these change, different AUDIT_ADD and
123 * AUDIT_LIST commands must be implemented. */ 123 * AUDIT_LIST commands must be implemented. */
124#define AUDIT_MAX_FIELDS 64 124#define AUDIT_MAX_FIELDS 64
125#define AUDIT_MAX_KEY_LEN 32
125#define AUDIT_BITMASK_SIZE 64 126#define AUDIT_BITMASK_SIZE 64
126#define AUDIT_WORD(nr) ((__u32)((nr)/32)) 127#define AUDIT_WORD(nr) ((__u32)((nr)/32))
127#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) 128#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))
128 129
130#define AUDIT_SYSCALL_CLASSES 16
131#define AUDIT_CLASS_DIR_WRITE 0
132#define AUDIT_CLASS_DIR_WRITE_32 1
133#define AUDIT_CLASS_CHATTR 2
134#define AUDIT_CLASS_CHATTR_32 3
135
129/* This bitmask is used to validate user input. It represents all bits that 136/* This bitmask is used to validate user input. It represents all bits that
130 * are currently used in an audit field constant understood by the kernel. 137 * are currently used in an audit field constant understood by the kernel.
131 * If you are adding a new #define AUDIT_<whatever>, please ensure that 138 * If you are adding a new #define AUDIT_<whatever>, please ensure that
@@ -150,12 +157,17 @@
150#define AUDIT_PERS 10 157#define AUDIT_PERS 10
151#define AUDIT_ARCH 11 158#define AUDIT_ARCH 11
152#define AUDIT_MSGTYPE 12 159#define AUDIT_MSGTYPE 12
153#define AUDIT_SE_USER 13 /* security label user */ 160#define AUDIT_SUBJ_USER 13 /* security label user */
154#define AUDIT_SE_ROLE 14 /* security label role */ 161#define AUDIT_SUBJ_ROLE 14 /* security label role */
155#define AUDIT_SE_TYPE 15 /* security label type */ 162#define AUDIT_SUBJ_TYPE 15 /* security label type */
156#define AUDIT_SE_SEN 16 /* security label sensitivity label */ 163#define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */
157#define AUDIT_SE_CLR 17 /* security label clearance label */ 164#define AUDIT_SUBJ_CLR 17 /* security label clearance label */
158#define AUDIT_PPID 18 165#define AUDIT_PPID 18
166#define AUDIT_OBJ_USER 19
167#define AUDIT_OBJ_ROLE 20
168#define AUDIT_OBJ_TYPE 21
169#define AUDIT_OBJ_LEV_LOW 22
170#define AUDIT_OBJ_LEV_HIGH 23
159 171
160 /* These are ONLY useful when checking 172 /* These are ONLY useful when checking
161 * at syscall exit time (AUDIT_AT_EXIT). */ 173 * at syscall exit time (AUDIT_AT_EXIT). */
@@ -171,6 +183,8 @@
171#define AUDIT_ARG2 (AUDIT_ARG0+2) 183#define AUDIT_ARG2 (AUDIT_ARG0+2)
172#define AUDIT_ARG3 (AUDIT_ARG0+3) 184#define AUDIT_ARG3 (AUDIT_ARG0+3)
173 185
186#define AUDIT_FILTERKEY 210
187
174#define AUDIT_NEGATE 0x80000000 188#define AUDIT_NEGATE 0x80000000
175 189
176/* These are the supported operators. 190/* These are the supported operators.
@@ -299,6 +313,7 @@ struct mqstat;
299#define AUDITSC_SUCCESS 1 313#define AUDITSC_SUCCESS 1
300#define AUDITSC_FAILURE 2 314#define AUDITSC_FAILURE 2
301#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) 315#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS )
316extern int __init audit_register_class(int class, unsigned *list);
302#ifdef CONFIG_AUDITSYSCALL 317#ifdef CONFIG_AUDITSYSCALL
303/* These are defined in auditsc.c */ 318/* These are defined in auditsc.c */
304 /* Public API */ 319 /* Public API */
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index 917d62e4148..269d000bb2a 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -567,11 +567,6 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
567COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) 567COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
568COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) 568COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
569COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) 569COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
570/* DEVFS */
571COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
572COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
573COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
574COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
575/* Raw devices */ 570/* Raw devices */
576COMPATIBLE_IOCTL(RAW_SETBIND) 571COMPATIBLE_IOCTL(RAW_SETBIND)
577COMPATIBLE_IOCTL(RAW_GETBIND) 572COMPATIBLE_IOCTL(RAW_GETBIND)
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index a3caf6866ba..44a11f1ccaf 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -87,9 +87,9 @@ int cpu_down(unsigned int cpu);
87#define lock_cpu_hotplug() do { } while (0) 87#define lock_cpu_hotplug() do { } while (0)
88#define unlock_cpu_hotplug() do { } while (0) 88#define unlock_cpu_hotplug() do { } while (0)
89#define lock_cpu_hotplug_interruptible() 0 89#define lock_cpu_hotplug_interruptible() 0
90#define hotcpu_notifier(fn, pri) 90#define hotcpu_notifier(fn, pri) do { } while (0)
91#define register_hotcpu_notifier(nb) 91#define register_hotcpu_notifier(nb) do { } while (0)
92#define unregister_hotcpu_notifier(nb) 92#define unregister_hotcpu_notifier(nb) do { } while (0)
93 93
94/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ 94/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
95static inline int cpu_is_offline(int cpu) { return 0; } 95static inline int cpu_is_offline(int cpu) { return 0; }
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 466fbe9e489..35e137636b0 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -100,8 +100,10 @@ struct cpufreq_policy {
100#define CPUFREQ_INCOMPATIBLE (1) 100#define CPUFREQ_INCOMPATIBLE (1)
101#define CPUFREQ_NOTIFY (2) 101#define CPUFREQ_NOTIFY (2)
102 102
103#define CPUFREQ_SHARED_TYPE_ALL (0) /* All dependent CPUs should set freq */ 103#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
104#define CPUFREQ_SHARED_TYPE_ANY (1) /* Freq can be set from any dependent CPU */ 104#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
105#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
106#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
105 107
106/******************** cpufreq transition notifiers *******************/ 108/******************** cpufreq transition notifiers *******************/
107 109
diff --git a/include/linux/devfs_fs.h b/include/linux/devfs_fs.h
deleted file mode 100644
index de236f43187..00000000000
--- a/include/linux/devfs_fs.h
+++ /dev/null
@@ -1,41 +0,0 @@
1#ifndef _LINUX_DEVFS_FS_H
2#define _LINUX_DEVFS_FS_H
3
4#include <linux/ioctl.h>
5
6#define DEVFSD_PROTOCOL_REVISION_KERNEL 5
7
8#define DEVFSD_IOCTL_BASE 'd'
9
10/* These are the various ioctls */
11#define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int)
12#define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int)
13#define DEVFSDIOC_RELEASE_EVENT_QUEUE _IOW(DEVFSD_IOCTL_BASE, 3, int)
14#define DEVFSDIOC_SET_DEBUG_MASK _IOW(DEVFSD_IOCTL_BASE, 4, int)
15
16#define DEVFSD_NOTIFY_REGISTERED 0
17#define DEVFSD_NOTIFY_UNREGISTERED 1
18#define DEVFSD_NOTIFY_ASYNC_OPEN 2
19#define DEVFSD_NOTIFY_CLOSE 3
20#define DEVFSD_NOTIFY_LOOKUP 4
21#define DEVFSD_NOTIFY_CHANGE 5
22#define DEVFSD_NOTIFY_CREATE 6
23#define DEVFSD_NOTIFY_DELETE 7
24
25#define DEVFS_PATHLEN 1024 /* Never change this otherwise the
26 binary interface will change */
27
28struct devfsd_notify_struct { /* Use native C types to ensure same types in kernel and user space */
29 unsigned int type; /* DEVFSD_NOTIFY_* value */
30 unsigned int mode; /* Mode of the inode or device entry */
31 unsigned int major; /* Major number of device entry */
32 unsigned int minor; /* Minor number of device entry */
33 unsigned int uid; /* Uid of process, inode or device entry */
34 unsigned int gid; /* Gid of process, inode or device entry */
35 unsigned int overrun_count; /* Number of lost events */
36 unsigned int namelen; /* Number of characters not including '\0' */
37 /* The device name MUST come last */
38 char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */
39};
40
41#endif /* _LINUX_DEVFS_FS_H */
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
deleted file mode 100644
index 0d74a6f22ab..00000000000
--- a/include/linux/devfs_fs_kernel.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef _LINUX_DEVFS_FS_KERNEL_H
2#define _LINUX_DEVFS_FS_KERNEL_H
3
4#include <linux/fs.h>
5#include <linux/spinlock.h>
6#include <linux/types.h>
7
8#include <asm/semaphore.h>
9
10#define DEVFS_SUPER_MAGIC 0x1373
11
12#ifdef CONFIG_DEVFS_FS
13extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
14 __attribute__ ((format(printf, 3, 4)));
15extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
16 __attribute__ ((format(printf, 3, 4)));
17extern int devfs_mk_symlink(const char *name, const char *link);
18extern int devfs_mk_dir(const char *fmt, ...)
19 __attribute__ ((format(printf, 1, 2)));
20extern void devfs_remove(const char *fmt, ...)
21 __attribute__ ((format(printf, 1, 2)));
22extern int devfs_register_tape(const char *name);
23extern void devfs_unregister_tape(int num);
24extern void mount_devfs_fs(void);
25#else /* CONFIG_DEVFS_FS */
26static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
27{
28 return 0;
29}
30static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
31{
32 return 0;
33}
34static inline int devfs_mk_symlink(const char *name, const char *link)
35{
36 return 0;
37}
38static inline int devfs_mk_dir(const char *fmt, ...)
39{
40 return 0;
41}
42static inline void devfs_remove(const char *fmt, ...)
43{
44}
45static inline int devfs_register_tape(const char *name)
46{
47 return -1;
48}
49static inline void devfs_unregister_tape(int num)
50{
51}
52static inline void mount_devfs_fs(void)
53{
54 return;
55}
56#endif /* CONFIG_DEVFS_FS */
57#endif /* _LINUX_DEVFS_FS_KERNEL_H */
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h
index 2fda1b2aabd..527504c11c5 100644
--- a/include/linux/dqblk_xfs.h
+++ b/include/linux/dqblk_xfs.h
@@ -125,14 +125,14 @@ typedef struct fs_disk_quota {
125 125
126/* 126/*
127 * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. 127 * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system.
128 * Provides a centralized way to get meta infomation about the quota subsystem. 128 * Provides a centralized way to get meta information about the quota subsystem.
129 * eg. space taken up for user and group quotas, number of dquots currently 129 * eg. space taken up for user and group quotas, number of dquots currently
130 * incore. 130 * incore.
131 */ 131 */
132#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */ 132#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */
133 133
134/* 134/*
135 * Some basic infomation about 'quota files'. 135 * Some basic information about 'quota files'.
136 */ 136 */
137typedef struct fs_qfilestat { 137typedef struct fs_qfilestat {
138 __u64 qfs_ino; /* inode number */ 138 __u64 qfs_ino; /* inode number */
diff --git a/include/linux/elf-em.h b/include/linux/elf-em.h
index 114a96d2565..6a5796c81c9 100644
--- a/include/linux/elf-em.h
+++ b/include/linux/elf-em.h
@@ -11,7 +11,12 @@
11#define EM_486 6 /* Perhaps disused */ 11#define EM_486 6 /* Perhaps disused */
12#define EM_860 7 12#define EM_860 7
13#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ 13#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
14 /* Next two are historical and binaries and
15 modules of these types will be rejected by
16 Linux. */
17#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */
14#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ 18#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
19
15#define EM_PARISC 15 /* HPPA */ 20#define EM_PARISC 15 /* HPPA */
16#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ 21#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
17#define EM_PPC 20 /* PowerPC */ 22#define EM_PPC 20 /* PowerPC */
diff --git a/include/linux/err.h b/include/linux/err.h
index ff71d2af5da..cd3b367f744 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -13,7 +13,9 @@
13 * This should be a per-architecture thing, to allow different 13 * This should be a per-architecture thing, to allow different
14 * error and pointer decisions. 14 * error and pointer decisions.
15 */ 15 */
16#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) 16#define MAX_ERRNO 4095
17
18#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
17 19
18static inline void *ERR_PTR(long error) 20static inline void *ERR_PTR(long error)
19{ 21{
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 07a08e92bc7..ffefeeeeca9 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -380,7 +380,6 @@ struct fb_cursor {
380#include <linux/tty.h> 380#include <linux/tty.h>
381#include <linux/device.h> 381#include <linux/device.h>
382#include <linux/workqueue.h> 382#include <linux/workqueue.h>
383#include <linux/devfs_fs_kernel.h>
384#include <linux/notifier.h> 383#include <linux/notifier.h>
385#include <linux/list.h> 384#include <linux/list.h>
386#include <asm/io.h> 385#include <asm/io.h>
@@ -558,7 +557,7 @@ struct fb_pixmap {
558 * Frame buffer operations 557 * Frame buffer operations
559 * 558 *
560 * LOCKING NOTE: those functions must _ALL_ be called with the console 559 * LOCKING NOTE: those functions must _ALL_ be called with the console
561 * semaphore held, this is the only suitable locking mecanism we have 560 * semaphore held, this is the only suitable locking mechanism we have
562 * in 2.6. Some may be called at interrupt time at this point though. 561 * in 2.6. Some may be called at interrupt time at this point though.
563 */ 562 */
564 563
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 3498a0c6818..e4af57e87c1 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -112,8 +112,6 @@ struct gendisk {
112 sector_t capacity; 112 sector_t capacity;
113 113
114 int flags; 114 int flags;
115 char devfs_name[64]; /* devfs crap */
116 int number; /* more of the same */
117 struct device *driverfs_dev; 115 struct device *driverfs_dev;
118 struct kobject kobj; 116 struct kobject kobj;
119 struct kobject *holder_dir; 117 struct kobject *holder_dir;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 0c100168c0c..285316c836b 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -552,7 +552,6 @@ typedef struct ide_drive_s {
552 struct hd_driveid *id; /* drive model identification info */ 552 struct hd_driveid *id; /* drive model identification info */
553 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ 553 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
554 struct ide_settings_s *settings;/* /proc/ide/ drive settings */ 554 struct ide_settings_s *settings;/* /proc/ide/ drive settings */
555 char devfs_name[64]; /* devfs crap */
556 555
557 struct hwif_s *hwif; /* actually (ide_hwif_t *) */ 556 struct hwif_s *hwif; /* actually (ide_hwif_t *) */
558 557
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 70741e17011..cf682a73a6f 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -14,6 +14,53 @@
14#include <asm/ptrace.h> 14#include <asm/ptrace.h>
15#include <asm/system.h> 15#include <asm/system.h>
16 16
17/*
18 * These correspond to the IORESOURCE_IRQ_* defines in
19 * linux/ioport.h to select the interrupt line behaviour. When
20 * requesting an interrupt without specifying a IRQF_TRIGGER, the
21 * setting should be assumed to be "as already configured", which
22 * may be as per machine or firmware initialisation.
23 */
24#define IRQF_TRIGGER_NONE 0x00000000
25#define IRQF_TRIGGER_RISING 0x00000001
26#define IRQF_TRIGGER_FALLING 0x00000002
27#define IRQF_TRIGGER_HIGH 0x00000004
28#define IRQF_TRIGGER_LOW 0x00000008
29#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
30 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
31#define IRQF_TRIGGER_PROBE 0x00000010
32
33/*
34 * These flags used only by the kernel as part of the
35 * irq handling routines.
36 *
37 * IRQF_DISABLED - keep irqs disabled when calling the action handler
38 * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
39 * IRQF_SHARED - allow sharing the irq among several devices
40 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
41 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
42 */
43#define IRQF_DISABLED 0x00000020
44#define IRQF_SAMPLE_RANDOM 0x00000040
45#define IRQF_SHARED 0x00000080
46#define IRQF_PROBE_SHARED 0x00000100
47#define IRQF_TIMER 0x00000200
48
49/*
50 * Migration helpers. Scheduled for removal in 1/2007
51 * Do not use for new code !
52 */
53#define SA_INTERRUPT IRQF_DISABLED
54#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
55#define SA_SHIRQ IRQF_SHARED
56#define SA_PROBEIRQ IRQF_PROBE_SHARED
57
58#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
59#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
60#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
61#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
62#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
63
17struct irqaction { 64struct irqaction {
18 irqreturn_t (*handler)(int, void *, struct pt_regs *); 65 irqreturn_t (*handler)(int, void *, struct pt_regs *);
19 unsigned long flags; 66 unsigned long flags;
@@ -36,6 +83,20 @@ extern void free_irq(unsigned int, void *);
36extern void disable_irq_nosync(unsigned int irq); 83extern void disable_irq_nosync(unsigned int irq);
37extern void disable_irq(unsigned int irq); 84extern void disable_irq(unsigned int irq);
38extern void enable_irq(unsigned int irq); 85extern void enable_irq(unsigned int irq);
86
87/* IRQ wakeup (PM) control: */
88extern int set_irq_wake(unsigned int irq, unsigned int on);
89
90static inline int enable_irq_wake(unsigned int irq)
91{
92 return set_irq_wake(irq, 1);
93}
94
95static inline int disable_irq_wake(unsigned int irq)
96{
97 return set_irq_wake(irq, 0);
98}
99
39#endif 100#endif
40 101
41#ifndef __ARCH_SET_SOFTIRQ_PENDING 102#ifndef __ARCH_SET_SOFTIRQ_PENDING
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index edfc733b157..87a9fc039b4 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -9,13 +9,15 @@
9#define _LINUX_IOPORT_H 9#define _LINUX_IOPORT_H
10 10
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12#include <linux/types.h>
12/* 13/*
13 * Resources are tree-like, allowing 14 * Resources are tree-like, allowing
14 * nesting etc.. 15 * nesting etc..
15 */ 16 */
16struct resource { 17struct resource {
18 resource_size_t start;
19 resource_size_t end;
17 const char *name; 20 const char *name;
18 unsigned long start, end;
19 unsigned long flags; 21 unsigned long flags;
20 struct resource *parent, *sibling, *child; 22 struct resource *parent, *sibling, *child;
21}; 23};
@@ -96,14 +98,13 @@ extern struct resource * ____request_resource(struct resource *root, struct reso
96extern int release_resource(struct resource *new); 98extern int release_resource(struct resource *new);
97extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); 99extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new);
98extern int allocate_resource(struct resource *root, struct resource *new, 100extern int allocate_resource(struct resource *root, struct resource *new,
99 unsigned long size, 101 resource_size_t size, resource_size_t min,
100 unsigned long min, unsigned long max, 102 resource_size_t max, resource_size_t align,
101 unsigned long align,
102 void (*alignf)(void *, struct resource *, 103 void (*alignf)(void *, struct resource *,
103 unsigned long, unsigned long), 104 resource_size_t, resource_size_t),
104 void *alignf_data); 105 void *alignf_data);
105int adjust_resource(struct resource *res, unsigned long start, 106int adjust_resource(struct resource *res, resource_size_t start,
106 unsigned long size); 107 resource_size_t size);
107 108
108/* get registered SYSTEM_RAM resources in specified area */ 109/* get registered SYSTEM_RAM resources in specified area */
109extern int find_next_system_ram(struct resource *res); 110extern int find_next_system_ram(struct resource *res);
@@ -113,17 +114,21 @@ extern int find_next_system_ram(struct resource *res);
113#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) 114#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
114#define rename_region(region, newname) do { (region)->name = (newname); } while (0) 115#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
115 116
116extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); 117extern struct resource * __request_region(struct resource *,
118 resource_size_t start,
119 resource_size_t n, const char *name);
117 120
118/* Compatibility cruft */ 121/* Compatibility cruft */
119#define release_region(start,n) __release_region(&ioport_resource, (start), (n)) 122#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
120#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) 123#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
121#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) 124#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
122 125
123extern int __check_region(struct resource *, unsigned long, unsigned long); 126extern int __check_region(struct resource *, resource_size_t, resource_size_t);
124extern void __release_region(struct resource *, unsigned long, unsigned long); 127extern void __release_region(struct resource *, resource_size_t,
128 resource_size_t);
125 129
126static inline int __deprecated check_region(unsigned long s, unsigned long n) 130static inline int __deprecated check_region(resource_size_t s,
131 resource_size_t n)
127{ 132{
128 return __check_region(&ioport_resource, s, n); 133 return __check_region(&ioport_resource, s, n);
129} 134}
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 676e00dfb21..ae1e422f18e 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -1,5 +1,5 @@
1#ifndef __irq_h 1#ifndef _LINUX_IRQ_H
2#define __irq_h 2#define _LINUX_IRQ_H
3 3
4/* 4/*
5 * Please do not include this file in generic code. There is currently 5 * Please do not include this file in generic code. There is currently
@@ -11,7 +11,7 @@
11 11
12#include <linux/smp.h> 12#include <linux/smp.h>
13 13
14#if !defined(CONFIG_S390) 14#ifndef CONFIG_S390
15 15
16#include <linux/linkage.h> 16#include <linux/linkage.h>
17#include <linux/cache.h> 17#include <linux/cache.h>
@@ -24,84 +24,168 @@
24 24
25/* 25/*
26 * IRQ line status. 26 * IRQ line status.
27 *
28 * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h
29 *
30 * IRQ types
27 */ 31 */
28#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */ 32#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */
29#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */ 33#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */
30#define IRQ_PENDING 4 /* IRQ pending - replay on enable */ 34#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */
31#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */ 35#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
32#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */ 36#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */
33#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ 37#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */
34#define IRQ_LEVEL 64 /* IRQ level triggered */ 38#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */
35#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ 39#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */
36#if defined(ARCH_HAS_IRQ_PER_CPU) 40
37# define IRQ_PER_CPU 256 /* IRQ is per CPU */ 41/* Internal flags */
42#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */
43#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */
44#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */
45#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */
46#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */
47#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */
48#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */
49#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */
50#ifdef CONFIG_IRQ_PER_CPU
51# define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */
38# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 52# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
39#else 53#else
40# define CHECK_IRQ_PER_CPU(var) 0 54# define CHECK_IRQ_PER_CPU(var) 0
41#endif 55#endif
42 56
43/* 57#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */
44 * Interrupt controller descriptor. This is all we need 58#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */
45 * to describe about the low-level hardware. 59#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */
60#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */
61
62struct proc_dir_entry;
63
64/**
65 * struct irq_chip - hardware interrupt chip descriptor
66 *
67 * @name: name for /proc/interrupts
68 * @startup: start up the interrupt (defaults to ->enable if NULL)
69 * @shutdown: shut down the interrupt (defaults to ->disable if NULL)
70 * @enable: enable the interrupt (defaults to chip->unmask if NULL)
71 * @disable: disable the interrupt (defaults to chip->mask if NULL)
72 * @ack: start of a new interrupt
73 * @mask: mask an interrupt source
74 * @mask_ack: ack and mask an interrupt source
75 * @unmask: unmask an interrupt source
76 * @eoi: end of interrupt - chip level
77 * @end: end of interrupt - flow level
78 * @set_affinity: set the CPU affinity on SMP machines
79 * @retrigger: resend an IRQ to the CPU
80 * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ
81 * @set_wake: enable/disable power-management wake-on of an IRQ
82 *
83 * @release: release function solely used by UML
84 * @typename: obsoleted by name, kept as migration helper
46 */ 85 */
47struct hw_interrupt_type { 86struct irq_chip {
48 const char * typename; 87 const char *name;
49 unsigned int (*startup)(unsigned int irq); 88 unsigned int (*startup)(unsigned int irq);
50 void (*shutdown)(unsigned int irq); 89 void (*shutdown)(unsigned int irq);
51 void (*enable)(unsigned int irq); 90 void (*enable)(unsigned int irq);
52 void (*disable)(unsigned int irq); 91 void (*disable)(unsigned int irq);
53 void (*ack)(unsigned int irq); 92
54 void (*end)(unsigned int irq); 93 void (*ack)(unsigned int irq);
55 void (*set_affinity)(unsigned int irq, cpumask_t dest); 94 void (*mask)(unsigned int irq);
95 void (*mask_ack)(unsigned int irq);
96 void (*unmask)(unsigned int irq);
97 void (*eoi)(unsigned int irq);
98
99 void (*end)(unsigned int irq);
100 void (*set_affinity)(unsigned int irq, cpumask_t dest);
101 int (*retrigger)(unsigned int irq);
102 int (*set_type)(unsigned int irq, unsigned int flow_type);
103 int (*set_wake)(unsigned int irq, unsigned int on);
104
56 /* Currently used only by UML, might disappear one day.*/ 105 /* Currently used only by UML, might disappear one day.*/
57#ifdef CONFIG_IRQ_RELEASE_METHOD 106#ifdef CONFIG_IRQ_RELEASE_METHOD
58 void (*release)(unsigned int irq, void *dev_id); 107 void (*release)(unsigned int irq, void *dev_id);
59#endif 108#endif
109 /*
110 * For compatibility, ->typename is copied into ->name.
111 * Will disappear.
112 */
113 const char *typename;
60}; 114};
61 115
62typedef struct hw_interrupt_type hw_irq_controller; 116/**
63 117 * struct irq_desc - interrupt descriptor
64/* 118 *
65 * This is the "IRQ descriptor", which contains various information 119 * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
66 * about the irq, including what kind of hardware handling it has, 120 * @chip: low level interrupt hardware access
67 * whether it is disabled etc etc. 121 * @handler_data: per-IRQ data for the irq_chip methods
122 * @chip_data: platform-specific per-chip private data for the chip
123 * methods, to allow shared chip implementations
124 * @action: the irq action chain
125 * @status: status information
126 * @depth: disable-depth, for nested irq_disable() calls
127 * @irq_count: stats field to detect stalled irqs
128 * @irqs_unhandled: stats field for spurious unhandled interrupts
129 * @lock: locking for SMP
130 * @affinity: IRQ affinity on SMP
131 * @cpu: cpu index useful for balancing
132 * @pending_mask: pending rebalanced interrupts
133 * @move_irq: need to re-target IRQ destination
134 * @dir: /proc/irq/ procfs entry
135 * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP
68 * 136 *
69 * Pad this out to 32 bytes for cache and indexing reasons. 137 * Pad this out to 32 bytes for cache and indexing reasons.
70 */ 138 */
71typedef struct irq_desc { 139struct irq_desc {
72 hw_irq_controller *handler; 140 void fastcall (*handle_irq)(unsigned int irq,
73 void *handler_data; 141 struct irq_desc *desc,
74 struct irqaction *action; /* IRQ action list */ 142 struct pt_regs *regs);
75 unsigned int status; /* IRQ status */ 143 struct irq_chip *chip;
76 unsigned int depth; /* nested irq disables */ 144 void *handler_data;
77 unsigned int irq_count; /* For detecting broken interrupts */ 145 void *chip_data;
78 unsigned int irqs_unhandled; 146 struct irqaction *action; /* IRQ action list */
79 spinlock_t lock; 147 unsigned int status; /* IRQ status */
80#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) 148
81 unsigned int move_irq; /* Flag need to re-target intr dest*/ 149 unsigned int depth; /* nested irq disables */
150 unsigned int irq_count; /* For detecting broken IRQs */
151 unsigned int irqs_unhandled;
152 spinlock_t lock;
153#ifdef CONFIG_SMP
154 cpumask_t affinity;
155 unsigned int cpu;
156#endif
157#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
158 cpumask_t pending_mask;
159 unsigned int move_irq; /* need to re-target IRQ dest */
160#endif
161#ifdef CONFIG_PROC_FS
162 struct proc_dir_entry *dir;
82#endif 163#endif
83} ____cacheline_aligned irq_desc_t; 164} ____cacheline_aligned;
84 165
85extern irq_desc_t irq_desc [NR_IRQS]; 166extern struct irq_desc irq_desc[NR_IRQS];
86 167
87/* Return a pointer to the irq descriptor for IRQ. */ 168/*
88static inline irq_desc_t * 169 * Migration helpers for obsolete names, they will go away:
89irq_descp (int irq) 170 */
90{ 171#define hw_interrupt_type irq_chip
91 return irq_desc + irq; 172typedef struct irq_chip hw_irq_controller;
92} 173#define no_irq_type no_irq_chip
174typedef struct irq_desc irq_desc_t;
93 175
94#include <asm/hw_irq.h> /* the arch dependent stuff */ 176/*
177 * Pick up the arch-dependent methods:
178 */
179#include <asm/hw_irq.h>
95 180
96extern int setup_irq(unsigned int irq, struct irqaction * new); 181extern int setup_irq(unsigned int irq, struct irqaction *new);
97 182
98#ifdef CONFIG_GENERIC_HARDIRQS 183#ifdef CONFIG_GENERIC_HARDIRQS
99extern cpumask_t irq_affinity[NR_IRQS];
100 184
101#ifdef CONFIG_SMP 185#ifdef CONFIG_SMP
102static inline void set_native_irq_info(int irq, cpumask_t mask) 186static inline void set_native_irq_info(int irq, cpumask_t mask)
103{ 187{
104 irq_affinity[irq] = mask; 188 irq_desc[irq].affinity = mask;
105} 189}
106#else 190#else
107static inline void set_native_irq_info(int irq, cpumask_t mask) 191static inline void set_native_irq_info(int irq, cpumask_t mask)
@@ -111,8 +195,7 @@ static inline void set_native_irq_info(int irq, cpumask_t mask)
111 195
112#ifdef CONFIG_SMP 196#ifdef CONFIG_SMP
113 197
114#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) 198#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
115extern cpumask_t pending_irq_cpumask[NR_IRQS];
116 199
117void set_pending_irq(unsigned int irq, cpumask_t mask); 200void set_pending_irq(unsigned int irq, cpumask_t mask);
118void move_native_irq(int irq); 201void move_native_irq(int irq);
@@ -133,7 +216,7 @@ static inline void set_irq_info(int irq, cpumask_t mask)
133{ 216{
134} 217}
135 218
136#else // CONFIG_PCI_MSI 219#else /* CONFIG_PCI_MSI */
137 220
138static inline void move_irq(int irq) 221static inline void move_irq(int irq)
139{ 222{
@@ -144,26 +227,36 @@ static inline void set_irq_info(int irq, cpumask_t mask)
144{ 227{
145 set_native_irq_info(irq, mask); 228 set_native_irq_info(irq, mask);
146} 229}
147#endif // CONFIG_PCI_MSI
148 230
149#else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE 231#endif /* CONFIG_PCI_MSI */
232
233#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */
234
235static inline void move_irq(int irq)
236{
237}
238
239static inline void move_native_irq(int irq)
240{
241}
242
243static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
244{
245}
150 246
151#define move_irq(x)
152#define move_native_irq(x)
153#define set_pending_irq(x,y)
154static inline void set_irq_info(int irq, cpumask_t mask) 247static inline void set_irq_info(int irq, cpumask_t mask)
155{ 248{
156 set_native_irq_info(irq, mask); 249 set_native_irq_info(irq, mask);
157} 250}
158 251
159#endif // CONFIG_GENERIC_PENDING_IRQ 252#endif /* CONFIG_GENERIC_PENDING_IRQ */
160 253
161#else // CONFIG_SMP 254#else /* CONFIG_SMP */
162 255
163#define move_irq(x) 256#define move_irq(x)
164#define move_native_irq(x) 257#define move_native_irq(x)
165 258
166#endif // CONFIG_SMP 259#endif /* CONFIG_SMP */
167 260
168#ifdef CONFIG_IRQBALANCE 261#ifdef CONFIG_IRQBALANCE
169extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); 262extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask);
@@ -173,32 +266,138 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
173} 266}
174#endif 267#endif
175 268
269#ifdef CONFIG_AUTO_IRQ_AFFINITY
270extern int select_smp_affinity(unsigned int irq);
271#else
272static inline int select_smp_affinity(unsigned int irq)
273{
274 return 1;
275}
276#endif
277
176extern int no_irq_affinity; 278extern int no_irq_affinity;
177extern int noirqdebug_setup(char *str);
178 279
179extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, 280/* Handle irq action chains: */
180 struct irqaction *action); 281extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
282 struct irqaction *action);
283
284/*
285 * Built-in IRQ handlers for various IRQ types,
286 * callable via desc->chip->handle_irq()
287 */
288extern void fastcall
289handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
290extern void fastcall
291handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc,
292 struct pt_regs *regs);
293extern void fastcall
294handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
295extern void fastcall
296handle_simple_irq(unsigned int irq, struct irq_desc *desc,
297 struct pt_regs *regs);
298extern void fastcall
299handle_percpu_irq(unsigned int irq, struct irq_desc *desc,
300 struct pt_regs *regs);
301extern void fastcall
302handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
303
304/*
305 * Get a descriptive string for the highlevel handler, for
306 * /proc/interrupts output:
307 */
308extern const char *
309handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
310 struct pt_regs *));
311
312/*
313 * Monolithic do_IRQ implementation.
314 * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
315 */
181extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); 316extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
182extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
183 int action_ret, struct pt_regs *regs);
184extern int can_request_irq(unsigned int irq, unsigned long irqflags);
185 317
318/*
319 * Architectures call this to let the generic IRQ layer
320 * handle an interrupt. If the descriptor is attached to an
321 * irqchip-style controller then we call the ->handle_irq() handler,
322 * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
323 */
324static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs)
325{
326 struct irq_desc *desc = irq_desc + irq;
327
328 if (likely(desc->handle_irq))
329 desc->handle_irq(irq, desc, regs);
330 else
331 __do_IRQ(irq, regs);
332}
333
334/* Handling of unhandled and spurious interrupts: */
335extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
336 int action_ret, struct pt_regs *regs);
337
338/* Resending of interrupts :*/
339void check_irq_resend(struct irq_desc *desc, unsigned int irq);
340
341/* Initialize /proc/irq/ */
186extern void init_irq_proc(void); 342extern void init_irq_proc(void);
187 343
188#ifdef CONFIG_AUTO_IRQ_AFFINITY 344/* Enable/disable irq debugging output: */
189extern int select_smp_affinity(unsigned int irq); 345extern int noirqdebug_setup(char *str);
190#else 346
191static inline int 347/* Checks whether the interrupt can be requested by request_irq(): */
192select_smp_affinity(unsigned int irq) 348extern int can_request_irq(unsigned int irq, unsigned long irqflags);
349
350/* Dummy irq-chip implementation: */
351extern struct irq_chip no_irq_chip;
352
353extern void
354set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
355 void fastcall (*handle)(unsigned int,
356 struct irq_desc *,
357 struct pt_regs *));
358extern void
359__set_irq_handler(unsigned int irq,
360 void fastcall (*handle)(unsigned int, struct irq_desc *,
361 struct pt_regs *),
362 int is_chained);
363
364/*
365 * Set a highlevel flow handler for a given IRQ:
366 */
367static inline void
368set_irq_handler(unsigned int irq,
369 void fastcall (*handle)(unsigned int, struct irq_desc *,
370 struct pt_regs *))
193{ 371{
194 return 1; 372 __set_irq_handler(irq, handle, 0);
195} 373}
196#endif
197 374
198#endif 375/*
376 * Set a highlevel chained flow handler for a given IRQ.
377 * (a chained handler is automatically enabled and set to
378 * IRQ_NOREQUEST and IRQ_NOPROBE)
379 */
380static inline void
381set_irq_chained_handler(unsigned int irq,
382 void fastcall (*handle)(unsigned int, struct irq_desc *,
383 struct pt_regs *))
384{
385 __set_irq_handler(irq, handle, 1);
386}
199 387
200extern hw_irq_controller no_irq_type; /* needed in every arch ? */ 388/* Set/get chip/data for an IRQ: */
201 389
202#endif 390extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
391extern int set_irq_data(unsigned int irq, void *data);
392extern int set_irq_chip_data(unsigned int irq, void *data);
393extern int set_irq_type(unsigned int irq, unsigned int type);
394
395#define get_irq_chip(irq) (irq_desc[irq].chip)
396#define get_irq_chip_data(irq) (irq_desc[irq].chip_data)
397#define get_irq_data(irq) (irq_desc[irq].handler_data)
398
399#endif /* CONFIG_GENERIC_HARDIRQS */
400
401#endif /* !CONFIG_S390 */
203 402
204#endif /* __irq_h */ 403#endif /* _LINUX_IRQ_H */
diff --git a/include/linux/isdn/tpam.h b/include/linux/isdn/tpam.h
deleted file mode 100644
index d18dd0dc570..00000000000
--- a/include/linux/isdn/tpam.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/* $Id: tpam.h,v 1.1.2.1 2001/06/08 08:23:46 kai Exp $
2 *
3 * Turbo PAM ISDN driver for Linux. (Kernel Driver)
4 *
5 * Copyright 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
6 *
7 * For all support questions please contact: <support@auvertech.fr>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25#ifndef _TPAM_H_
26#define _TPAM_H_
27
28#include <linux/types.h>
29
30/* IOCTL commands */
31#define TPAM_CMD_DSPLOAD 0x0001
32#define TPAM_CMD_DSPSAVE 0x0002
33#define TPAM_CMD_DSPRUN 0x0003
34#define TPAM_CMD_LOOPMODEON 0x0004
35#define TPAM_CMD_LOOPMODEOFF 0x0005
36
37/* addresses of debug information zones on board */
38#define TPAM_TRAPAUDIT_REGISTER 0x005493e4
39#define TPAM_NCOAUDIT_REGISTER 0x00500000
40#define TPAM_MSGAUDIT_REGISTER 0x008E30F0
41
42/* length of debug information zones on board */
43#define TPAM_TRAPAUDIT_LENGTH 10000
44#define TPAM_NCOAUDIT_LENGTH 300000
45#define TPAM_NCOAUDIT_COUNT 30
46#define TPAM_MSGAUDIT_LENGTH 60000
47
48/* IOCTL load/save parameter */
49typedef struct tpam_dsp_ioctl {
50 __u32 address; /* address to load/save data */
51 __u32 data_len; /* size of data to be loaded/saved */
52 __u8 data[0]; /* data */
53} tpam_dsp_ioctl;
54
55#endif /* _TPAM_H_ */
diff --git a/include/linux/key.h b/include/linux/key.h
index e693e729bc9..169f05e4863 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -177,7 +177,8 @@ struct key {
177/* 177/*
178 * kernel managed key type definition 178 * kernel managed key type definition
179 */ 179 */
180typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); 180typedef int (*request_key_actor_t)(struct key *key, struct key *authkey,
181 const char *op, void *aux);
181 182
182struct key_type { 183struct key_type {
183 /* name of the type */ 184 /* name of the type */
@@ -285,6 +286,11 @@ extern struct key *request_key(struct key_type *type,
285 const char *description, 286 const char *description,
286 const char *callout_info); 287 const char *callout_info);
287 288
289extern struct key *request_key_with_auxdata(struct key_type *type,
290 const char *description,
291 const char *callout_info,
292 void *aux);
293
288extern int key_validate(struct key *key); 294extern int key_validate(struct key *key);
289 295
290extern key_ref_t key_create_or_update(key_ref_t keyring, 296extern key_ref_t key_create_or_update(key_ref_t keyring,
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2d229327959..0503b2ed8ba 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -46,6 +46,8 @@ enum kobject_action {
46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ 46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ 47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ 48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
49 KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */
50 KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */
49}; 51};
50 52
51struct kobject { 53struct kobject {
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 5b584dafb5a..b03cfb91e22 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -40,7 +40,6 @@ struct miscdevice {
40 struct list_head list; 40 struct list_head list;
41 struct device *dev; 41 struct device *dev;
42 struct class_device *class; 42 struct class_device *class;
43 char devfs_name[64];
44}; 43};
45 44
46extern int misc_register(struct miscdevice * misc); 45extern int misc_register(struct miscdevice * misc);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c41a1299b8c..75179529e39 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -36,7 +36,6 @@ extern int sysctl_legacy_va_layout;
36#include <asm/page.h> 36#include <asm/page.h>
37#include <asm/pgtable.h> 37#include <asm/pgtable.h>
38#include <asm/processor.h> 38#include <asm/processor.h>
39#include <asm/atomic.h>
40 39
41#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) 40#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
42 41
@@ -515,6 +514,11 @@ static inline void set_page_links(struct page *page, unsigned long zone,
515 set_page_section(page, pfn_to_section_nr(pfn)); 514 set_page_section(page, pfn_to_section_nr(pfn));
516} 515}
517 516
517/*
518 * Some inline functions in vmstat.h depend on page_zone()
519 */
520#include <linux/vmstat.h>
521
518#ifndef CONFIG_DISCONTIGMEM 522#ifndef CONFIG_DISCONTIGMEM
519/* The array of struct pages - for discontigmem use pgdat->lmem_map */ 523/* The array of struct pages - for discontigmem use pgdat->lmem_map */
520extern struct page *mem_map; 524extern struct page *mem_map;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d6120fa6911..27e748eb72b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -46,6 +46,27 @@ struct zone_padding {
46#define ZONE_PADDING(name) 46#define ZONE_PADDING(name)
47#endif 47#endif
48 48
49enum zone_stat_item {
50 NR_ANON_PAGES, /* Mapped anonymous pages */
51 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
52 only modified from process context */
53 NR_FILE_PAGES,
54 NR_SLAB, /* Pages used by slab allocator */
55 NR_PAGETABLE, /* used for pagetables */
56 NR_FILE_DIRTY,
57 NR_WRITEBACK,
58 NR_UNSTABLE_NFS, /* NFS unstable pages */
59 NR_BOUNCE,
60#ifdef CONFIG_NUMA
61 NUMA_HIT, /* allocated in intended node */
62 NUMA_MISS, /* allocated in non intended node */
63 NUMA_FOREIGN, /* was intended here, hit elsewhere */
64 NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */
65 NUMA_LOCAL, /* allocation from local node */
66 NUMA_OTHER, /* allocation from other node */
67#endif
68 NR_VM_ZONE_STAT_ITEMS };
69
49struct per_cpu_pages { 70struct per_cpu_pages {
50 int count; /* number of pages in the list */ 71 int count; /* number of pages in the list */
51 int high; /* high watermark, emptying needed */ 72 int high; /* high watermark, emptying needed */
@@ -55,13 +76,8 @@ struct per_cpu_pages {
55 76
56struct per_cpu_pageset { 77struct per_cpu_pageset {
57 struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ 78 struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */
58#ifdef CONFIG_NUMA 79#ifdef CONFIG_SMP
59 unsigned long numa_hit; /* allocated in intended node */ 80 s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
60 unsigned long numa_miss; /* allocated in non intended node */
61 unsigned long numa_foreign; /* was intended here, hit elsewhere */
62 unsigned long interleave_hit; /* interleaver prefered this zone */
63 unsigned long local_node; /* allocation from local node */
64 unsigned long other_node; /* allocation from other node */
65#endif 81#endif
66} ____cacheline_aligned_in_smp; 82} ____cacheline_aligned_in_smp;
67 83
@@ -165,12 +181,8 @@ struct zone {
165 /* A count of how many reclaimers are scanning this zone */ 181 /* A count of how many reclaimers are scanning this zone */
166 atomic_t reclaim_in_progress; 182 atomic_t reclaim_in_progress;
167 183
168 /* 184 /* Zone statistics */
169 * timestamp (in jiffies) of the last zone reclaim that did not 185 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
170 * result in freeing of pages. This is used to avoid repeated scans
171 * if all memory in the zone is in use.
172 */
173 unsigned long last_unsuccessful_zone_reclaim;
174 186
175 /* 187 /*
176 * prev_priority holds the scanning priority for this zone. It is 188 * prev_priority holds the scanning priority for this zone. It is
diff --git a/include/linux/net.h b/include/linux/net.h
index 385e68f5bd9..b20c53c7441 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -61,6 +61,7 @@ typedef enum {
61#define SOCK_ASYNC_WAITDATA 1 61#define SOCK_ASYNC_WAITDATA 1
62#define SOCK_NOSPACE 2 62#define SOCK_NOSPACE 2
63#define SOCK_PASSCRED 3 63#define SOCK_PASSCRED 3
64#define SOCK_PASSSEC 4
64 65
65#ifndef ARCH_HAS_SOCKET_TYPES 66#ifndef ARCH_HAS_SOCKET_TYPES
66/** 67/**
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 03cd7551a7a..85f99f60dee 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -313,8 +313,12 @@ struct net_device
313 313
314 /* Segmentation offload features */ 314 /* Segmentation offload features */
315#define NETIF_F_GSO_SHIFT 16 315#define NETIF_F_GSO_SHIFT 16
316#define NETIF_F_GSO_MASK 0xffff0000
316#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) 317#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
317#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) 318#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
319#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
320#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
321#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
318 322
319#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) 323#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
320#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) 324#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
@@ -543,7 +547,8 @@ struct packet_type {
543 struct net_device *, 547 struct net_device *,
544 struct packet_type *, 548 struct packet_type *,
545 struct net_device *); 549 struct net_device *);
546 struct sk_buff *(*gso_segment)(struct sk_buff *skb, int sg); 550 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
551 int features);
547 void *af_packet_priv; 552 void *af_packet_priv;
548 struct list_head list; 553 struct list_head list;
549}; 554};
@@ -968,7 +973,7 @@ extern int netdev_max_backlog;
968extern int weight_p; 973extern int weight_p;
969extern int netdev_set_master(struct net_device *dev, struct net_device *master); 974extern int netdev_set_master(struct net_device *dev, struct net_device *master);
970extern int skb_checksum_help(struct sk_buff *skb, int inward); 975extern int skb_checksum_help(struct sk_buff *skb, int inward);
971extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int sg); 976extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
972#ifdef CONFIG_BUG 977#ifdef CONFIG_BUG
973extern void netdev_rx_csum_fault(struct net_device *dev); 978extern void netdev_rx_csum_fault(struct net_device *dev);
974#else 979#else
@@ -988,11 +993,21 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
988 993
989extern void linkwatch_run_queue(void); 994extern void linkwatch_run_queue(void);
990 995
996static inline int net_gso_ok(int features, int gso_type)
997{
998 int feature = gso_type << NETIF_F_GSO_SHIFT;
999 return (features & feature) == feature;
1000}
1001
1002static inline int skb_gso_ok(struct sk_buff *skb, int features)
1003{
1004 return net_gso_ok(features, skb_shinfo(skb)->gso_size ?
1005 skb_shinfo(skb)->gso_type : 0);
1006}
1007
991static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) 1008static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
992{ 1009{
993 int feature = skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT; 1010 return !skb_gso_ok(skb, dev->features);
994 return skb_shinfo(skb)->gso_size &&
995 (dev->features & feature) != feature;
996} 1011}
997 1012
998#endif /* __KERNEL__ */ 1013#endif /* __KERNEL__ */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index d90b1bb3756..55ea853d57b 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -9,7 +9,6 @@
9#ifndef _LINUX_NFS_FS_H 9#ifndef _LINUX_NFS_FS_H
10#define _LINUX_NFS_FS_H 10#define _LINUX_NFS_FS_H
11 11
12#include <linux/config.h>
13#include <linux/in.h> 12#include <linux/in.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
15#include <linux/pagemap.h> 14#include <linux/pagemap.h>
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 0c076d58c67..5748642e9f3 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -5,12 +5,8 @@
5#ifndef PAGE_FLAGS_H 5#ifndef PAGE_FLAGS_H
6#define PAGE_FLAGS_H 6#define PAGE_FLAGS_H
7 7
8#include <linux/percpu.h>
9#include <linux/cache.h>
10#include <linux/types.h> 8#include <linux/types.h>
11 9
12#include <asm/pgtable.h>
13
14/* 10/*
15 * Various page->flags bits: 11 * Various page->flags bits:
16 * 12 *
@@ -103,134 +99,6 @@
103#endif 99#endif
104 100
105/* 101/*
106 * Global page accounting. One instance per CPU. Only unsigned longs are
107 * allowed.
108 *
109 * - Fields can be modified with xxx_page_state and xxx_page_state_zone at
110 * any time safely (which protects the instance from modification by
111 * interrupt.
112 * - The __xxx_page_state variants can be used safely when interrupts are
113 * disabled.
114 * - The __xxx_page_state variants can be used if the field is only
115 * modified from process context and protected from preemption, or only
116 * modified from interrupt context. In this case, the field should be
117 * commented here.
118 */
119struct page_state {
120 unsigned long nr_dirty; /* Dirty writeable pages */
121 unsigned long nr_writeback; /* Pages under writeback */
122 unsigned long nr_unstable; /* NFS unstable pages */
123 unsigned long nr_page_table_pages;/* Pages used for pagetables */
124 unsigned long nr_mapped; /* mapped into pagetables.
125 * only modified from process context */
126 unsigned long nr_slab; /* In slab */
127#define GET_PAGE_STATE_LAST nr_slab
128
129 /*
130 * The below are zeroed by get_page_state(). Use get_full_page_state()
131 * to add up all these.
132 */
133 unsigned long pgpgin; /* Disk reads */
134 unsigned long pgpgout; /* Disk writes */
135 unsigned long pswpin; /* swap reads */
136 unsigned long pswpout; /* swap writes */
137
138 unsigned long pgalloc_high; /* page allocations */
139 unsigned long pgalloc_normal;
140 unsigned long pgalloc_dma32;
141 unsigned long pgalloc_dma;
142
143 unsigned long pgfree; /* page freeings */
144 unsigned long pgactivate; /* pages moved inactive->active */
145 unsigned long pgdeactivate; /* pages moved active->inactive */
146
147 unsigned long pgfault; /* faults (major+minor) */
148 unsigned long pgmajfault; /* faults (major only) */
149
150 unsigned long pgrefill_high; /* inspected in refill_inactive_zone */
151 unsigned long pgrefill_normal;
152 unsigned long pgrefill_dma32;
153 unsigned long pgrefill_dma;
154
155 unsigned long pgsteal_high; /* total highmem pages reclaimed */
156 unsigned long pgsteal_normal;
157 unsigned long pgsteal_dma32;
158 unsigned long pgsteal_dma;
159
160 unsigned long pgscan_kswapd_high;/* total highmem pages scanned */
161 unsigned long pgscan_kswapd_normal;
162 unsigned long pgscan_kswapd_dma32;
163 unsigned long pgscan_kswapd_dma;
164
165 unsigned long pgscan_direct_high;/* total highmem pages scanned */
166 unsigned long pgscan_direct_normal;
167 unsigned long pgscan_direct_dma32;
168 unsigned long pgscan_direct_dma;
169
170 unsigned long pginodesteal; /* pages reclaimed via inode freeing */
171 unsigned long slabs_scanned; /* slab objects scanned */
172 unsigned long kswapd_steal; /* pages reclaimed by kswapd */
173 unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */
174 unsigned long pageoutrun; /* kswapd's calls to page reclaim */
175 unsigned long allocstall; /* direct reclaim calls */
176
177 unsigned long pgrotated; /* pages rotated to tail of the LRU */
178 unsigned long nr_bounce; /* pages for bounce buffers */
179};
180
181extern void get_page_state(struct page_state *ret);
182extern void get_page_state_node(struct page_state *ret, int node);
183extern void get_full_page_state(struct page_state *ret);
184extern unsigned long read_page_state_offset(unsigned long offset);
185extern void mod_page_state_offset(unsigned long offset, unsigned long delta);
186extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
187
188#define read_page_state(member) \
189 read_page_state_offset(offsetof(struct page_state, member))
190
191#define mod_page_state(member, delta) \
192 mod_page_state_offset(offsetof(struct page_state, member), (delta))
193
194#define __mod_page_state(member, delta) \
195 __mod_page_state_offset(offsetof(struct page_state, member), (delta))
196
197#define inc_page_state(member) mod_page_state(member, 1UL)
198#define dec_page_state(member) mod_page_state(member, 0UL - 1)
199#define add_page_state(member,delta) mod_page_state(member, (delta))
200#define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta))
201
202#define __inc_page_state(member) __mod_page_state(member, 1UL)
203#define __dec_page_state(member) __mod_page_state(member, 0UL - 1)
204#define __add_page_state(member,delta) __mod_page_state(member, (delta))
205#define __sub_page_state(member,delta) __mod_page_state(member, 0UL - (delta))
206
207#define page_state(member) (*__page_state(offsetof(struct page_state, member)))
208
209#define state_zone_offset(zone, member) \
210({ \
211 unsigned offset; \
212 if (is_highmem(zone)) \
213 offset = offsetof(struct page_state, member##_high); \
214 else if (is_normal(zone)) \
215 offset = offsetof(struct page_state, member##_normal); \
216 else if (is_dma32(zone)) \
217 offset = offsetof(struct page_state, member##_dma32); \
218 else \
219 offset = offsetof(struct page_state, member##_dma); \
220 offset; \
221})
222
223#define __mod_page_state_zone(zone, member, delta) \
224 do { \
225 __mod_page_state_offset(state_zone_offset(zone, member), (delta)); \
226 } while (0)
227
228#define mod_page_state_zone(zone, member, delta) \
229 do { \
230 mod_page_state_offset(state_zone_offset(zone, member), (delta)); \
231 } while (0)
232
233/*
234 * Manipulation of page state flags 102 * Manipulation of page state flags
235 */ 103 */
236#define PageLocked(page) \ 104#define PageLocked(page) \
@@ -254,7 +122,14 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
254#define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags) 122#define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags)
255 123
256#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) 124#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags)
257#ifndef SetPageUptodate 125#ifdef CONFIG_S390
126#define SetPageUptodate(_page) \
127 do { \
128 struct page *__page = (_page); \
129 if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
130 page_test_and_clear_dirty(_page); \
131 } while (0)
132#else
258#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) 133#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
259#endif 134#endif
260#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags) 135#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags)
@@ -306,7 +181,7 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
306 do { \ 181 do { \
307 if (!test_and_set_bit(PG_writeback, \ 182 if (!test_and_set_bit(PG_writeback, \
308 &(page)->flags)) \ 183 &(page)->flags)) \
309 inc_page_state(nr_writeback); \ 184 inc_zone_page_state(page, NR_WRITEBACK); \
310 } while (0) 185 } while (0)
311#define TestSetPageWriteback(page) \ 186#define TestSetPageWriteback(page) \
312 ({ \ 187 ({ \
@@ -314,14 +189,14 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
314 ret = test_and_set_bit(PG_writeback, \ 189 ret = test_and_set_bit(PG_writeback, \
315 &(page)->flags); \ 190 &(page)->flags); \
316 if (!ret) \ 191 if (!ret) \
317 inc_page_state(nr_writeback); \ 192 inc_zone_page_state(page, NR_WRITEBACK); \
318 ret; \ 193 ret; \
319 }) 194 })
320#define ClearPageWriteback(page) \ 195#define ClearPageWriteback(page) \
321 do { \ 196 do { \
322 if (test_and_clear_bit(PG_writeback, \ 197 if (test_and_clear_bit(PG_writeback, \
323 &(page)->flags)) \ 198 &(page)->flags)) \
324 dec_page_state(nr_writeback); \ 199 dec_zone_page_state(page, NR_WRITEBACK); \
325 } while (0) 200 } while (0)
326#define TestClearPageWriteback(page) \ 201#define TestClearPageWriteback(page) \
327 ({ \ 202 ({ \
@@ -329,7 +204,7 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
329 ret = test_and_clear_bit(PG_writeback, \ 204 ret = test_and_clear_bit(PG_writeback, \
330 &(page)->flags); \ 205 &(page)->flags); \
331 if (ret) \ 206 if (ret) \
332 dec_page_state(nr_writeback); \ 207 dec_zone_page_state(page, NR_WRITEBACK); \
333 ret; \ 208 ret; \
334 }) 209 })
335 210
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 1245df7141a..0a2f5d27f60 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -113,51 +113,6 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
113extern void remove_from_page_cache(struct page *page); 113extern void remove_from_page_cache(struct page *page);
114extern void __remove_from_page_cache(struct page *page); 114extern void __remove_from_page_cache(struct page *page);
115 115
116extern atomic_t nr_pagecache;
117
118#ifdef CONFIG_SMP
119
120#define PAGECACHE_ACCT_THRESHOLD max(16, NR_CPUS * 2)
121DECLARE_PER_CPU(long, nr_pagecache_local);
122
123/*
124 * pagecache_acct implements approximate accounting for pagecache.
125 * vm_enough_memory() do not need high accuracy. Writers will keep
126 * an offset in their per-cpu arena and will spill that into the
127 * global count whenever the absolute value of the local count
128 * exceeds the counter's threshold.
129 *
130 * MUST be protected from preemption.
131 * current protection is mapping->page_lock.
132 */
133static inline void pagecache_acct(int count)
134{
135 long *local;
136
137 local = &__get_cpu_var(nr_pagecache_local);
138 *local += count;
139 if (*local > PAGECACHE_ACCT_THRESHOLD || *local < -PAGECACHE_ACCT_THRESHOLD) {
140 atomic_add(*local, &nr_pagecache);
141 *local = 0;
142 }
143}
144
145#else
146
147static inline void pagecache_acct(int count)
148{
149 atomic_add(count, &nr_pagecache);
150}
151#endif
152
153static inline unsigned long get_page_cache_size(void)
154{
155 int ret = atomic_read(&nr_pagecache);
156 if (unlikely(ret < 0))
157 ret = 0;
158 return ret;
159}
160
161/* 116/*
162 * Return byte-offset into filesystem object for page. 117 * Return byte-offset into filesystem object for page.
163 */ 118 */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 62a8c22f5f6..983fca251b2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_dev *, int mask);
404char *pcibios_setup (char *str); 404char *pcibios_setup (char *str);
405 405
406/* Used only when drivers/pci/setup.c is used */ 406/* Used only when drivers/pci/setup.c is used */
407void pcibios_align_resource(void *, struct resource *, 407void pcibios_align_resource(void *, struct resource *, resource_size_t,
408 unsigned long, unsigned long); 408 resource_size_t);
409void pcibios_update_irq(struct pci_dev *, int irq); 409void pcibios_update_irq(struct pci_dev *, int irq);
410 410
411/* Generic PCI functions used internally */ 411/* Generic PCI functions used internally */
@@ -532,10 +532,10 @@ void pci_release_region(struct pci_dev *, int);
532 532
533/* drivers/pci/bus.c */ 533/* drivers/pci/bus.c */
534int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, 534int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
535 unsigned long size, unsigned long align, 535 resource_size_t size, resource_size_t align,
536 unsigned long min, unsigned int type_mask, 536 resource_size_t min, unsigned int type_mask,
537 void (*alignf)(void *, struct resource *, 537 void (*alignf)(void *, struct resource *,
538 unsigned long, unsigned long), 538 resource_size_t, resource_size_t),
539 void *alignf_data); 539 void *alignf_data);
540void pci_enable_bridges(struct pci_bus *bus); 540void pci_enable_bridges(struct pci_bus *bus);
541 541
@@ -730,7 +730,8 @@ static inline char *pci_name(struct pci_dev *pdev)
730 */ 730 */
731#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER 731#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
732static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, 732static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
733 const struct resource *rsrc, u64 *start, u64 *end) 733 const struct resource *rsrc, resource_size_t *start,
734 resource_size_t *end)
734{ 735{
735 *start = rsrc->start; 736 *start = rsrc->start;
736 *end = rsrc->end; 737 *end = rsrc->end;
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9ae6b1a7536..b093479a531 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -729,6 +729,7 @@
729#define PCI_DEVICE_ID_TI_4450 0x8011 729#define PCI_DEVICE_ID_TI_4450 0x8011
730#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 730#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
731#define PCI_DEVICE_ID_TI_X515 0x8036 731#define PCI_DEVICE_ID_TI_X515 0x8036
732#define PCI_DEVICE_ID_TI_XX12 0x8039
732#define PCI_DEVICE_ID_TI_1130 0xac12 733#define PCI_DEVICE_ID_TI_1130 0xac12
733#define PCI_DEVICE_ID_TI_1031 0xac13 734#define PCI_DEVICE_ID_TI_1031 0xac13
734#define PCI_DEVICE_ID_TI_1131 0xac15 735#define PCI_DEVICE_ID_TI_1131 0xac15
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 93b0959eb40..ab8a8dd8d64 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev);
389int pnp_stop_dev(struct pnp_dev *dev); 389int pnp_stop_dev(struct pnp_dev *dev);
390int pnp_activate_dev(struct pnp_dev *dev); 390int pnp_activate_dev(struct pnp_dev *dev);
391int pnp_disable_dev(struct pnp_dev *dev); 391int pnp_disable_dev(struct pnp_dev *dev);
392void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); 392void pnp_resource_change(struct resource *resource, resource_size_t start,
393 resource_size_t size);
393 394
394/* protocol helpers */ 395/* protocol helpers */
395int pnp_is_active(struct pnp_dev * dev); 396int pnp_is_active(struct pnp_dev * dev);
@@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
434static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } 435static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
435static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } 436static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
436static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } 437static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
437static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } 438static inline void pnp_resource_change(struct resource *resource,
439 resource_size_t start,
440 resource_size_t size) { }
438 441
439/* protocol helpers */ 442/* protocol helpers */
440static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } 443static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 48dfe00070c..b4ca73d6589 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -163,14 +163,22 @@ extern int rcu_needs_cpu(int cpu);
163 * 163 *
164 * It is illegal to block while in an RCU read-side critical section. 164 * It is illegal to block while in an RCU read-side critical section.
165 */ 165 */
166#define rcu_read_lock() preempt_disable() 166#define rcu_read_lock() \
167 do { \
168 preempt_disable(); \
169 __acquire(RCU); \
170 } while(0)
167 171
168/** 172/**
169 * rcu_read_unlock - marks the end of an RCU read-side critical section. 173 * rcu_read_unlock - marks the end of an RCU read-side critical section.
170 * 174 *
171 * See rcu_read_lock() for more information. 175 * See rcu_read_lock() for more information.
172 */ 176 */
173#define rcu_read_unlock() preempt_enable() 177#define rcu_read_unlock() \
178 do { \
179 __release(RCU); \
180 preempt_enable(); \
181 } while(0)
174 182
175/* 183/*
176 * So where is rcu_write_lock()? It does not exist, as there is no 184 * So where is rcu_write_lock()? It does not exist, as there is no
@@ -193,14 +201,22 @@ extern int rcu_needs_cpu(int cpu);
193 * can use just rcu_read_lock(). 201 * can use just rcu_read_lock().
194 * 202 *
195 */ 203 */
196#define rcu_read_lock_bh() local_bh_disable() 204#define rcu_read_lock_bh() \
205 do { \
206 local_bh_disable(); \
207 __acquire(RCU_BH); \
208 } while(0)
197 209
198/* 210/*
199 * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section 211 * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section
200 * 212 *
201 * See rcu_read_lock_bh() for more information. 213 * See rcu_read_lock_bh() for more information.
202 */ 214 */
203#define rcu_read_unlock_bh() local_bh_enable() 215#define rcu_read_unlock_bh() \
216 do { \
217 __release(RCU_BH); \
218 local_bh_enable(); \
219 } while(0)
204 220
205/** 221/**
206 * rcu_dereference - fetch an RCU-protected pointer in an 222 * rcu_dereference - fetch an RCU-protected pointer in an
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 36e2bf4b431..5371e4e7459 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -34,8 +34,8 @@ struct rtc_time {
34 * alarm API. 34 * alarm API.
35 */ 35 */
36struct rtc_wkalrm { 36struct rtc_wkalrm {
37 unsigned char enabled; /* 0 = alarm disable, 1 = alarm disabled */ 37 unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
38 unsigned char pending; /* 0 = alarm pending, 1 = alarm not pending */ 38 unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */
39 struct rtc_time time; /* time the alarm is set to */ 39 struct rtc_time time; /* time the alarm is set to */
40}; 40};
41 41
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 821f0481ebe..aaf723308ed 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1153,7 +1153,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *);
1153extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); 1153extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
1154extern int kill_pg_info(int, struct siginfo *, pid_t); 1154extern int kill_pg_info(int, struct siginfo *, pid_t);
1155extern int kill_proc_info(int, struct siginfo *, pid_t); 1155extern int kill_proc_info(int, struct siginfo *, pid_t);
1156extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t); 1156extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32);
1157extern void do_notify_parent(struct task_struct *, int); 1157extern void do_notify_parent(struct task_struct *, int);
1158extern void force_sig(int, struct task_struct *); 1158extern void force_sig(int, struct task_struct *);
1159extern void force_sig_specific(int, struct task_struct *); 1159extern void force_sig_specific(int, struct task_struct *);
diff --git a/include/linux/security.h b/include/linux/security.h
index 51805806f97..f75303831d0 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -67,7 +67,7 @@ struct xfrm_state;
67struct xfrm_user_sec_ctx; 67struct xfrm_user_sec_ctx;
68 68
69extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); 69extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb);
70extern int cap_netlink_recv(struct sk_buff *skb); 70extern int cap_netlink_recv(struct sk_buff *skb, int cap);
71 71
72/* 72/*
73 * Values used in the task_security_ops calls 73 * Values used in the task_security_ops calls
@@ -567,6 +567,9 @@ struct swap_info_struct;
567 * @p. 567 * @p.
568 * @p contains the task_struct for the process. 568 * @p contains the task_struct for the process.
569 * Return 0 if permission is granted. 569 * Return 0 if permission is granted.
570 * @task_getsecid:
571 * Retrieve the security identifier of the process @p.
572 * @p contains the task_struct for the process and place is into @secid.
570 * @task_setgroups: 573 * @task_setgroups:
571 * Check permission before setting the supplementary group set of the 574 * Check permission before setting the supplementary group set of the
572 * current process. 575 * current process.
@@ -582,6 +585,10 @@ struct swap_info_struct;
582 * @p contains the task_struct of process. 585 * @p contains the task_struct of process.
583 * @ioprio contains the new ioprio value 586 * @ioprio contains the new ioprio value
584 * Return 0 if permission is granted. 587 * Return 0 if permission is granted.
588 * @task_getioprio
589 * Check permission before getting the ioprio value of @p.
590 * @p contains the task_struct of process.
591 * Return 0 if permission is granted.
585 * @task_setrlimit: 592 * @task_setrlimit:
586 * Check permission before setting the resource limits of the current 593 * Check permission before setting the resource limits of the current
587 * process for @resource to @new_rlim. The old resource limit values can 594 * process for @resource to @new_rlim. The old resource limit values can
@@ -615,6 +622,7 @@ struct swap_info_struct;
615 * @p contains the task_struct for process. 622 * @p contains the task_struct for process.
616 * @info contains the signal information. 623 * @info contains the signal information.
617 * @sig contains the signal value. 624 * @sig contains the signal value.
625 * @secid contains the sid of the process where the signal originated
618 * Return 0 if permission is granted. 626 * Return 0 if permission is granted.
619 * @task_wait: 627 * @task_wait:
620 * Check permission before allowing a process to reap a child process @p 628 * Check permission before allowing a process to reap a child process @p
@@ -656,6 +664,7 @@ struct swap_info_struct;
656 * Check permission before processing the received netlink message in 664 * Check permission before processing the received netlink message in
657 * @skb. 665 * @skb.
658 * @skb contains the sk_buff structure for the netlink message. 666 * @skb contains the sk_buff structure for the netlink message.
667 * @cap indicates the capability required
659 * Return 0 if permission is granted. 668 * Return 0 if permission is granted.
660 * 669 *
661 * Security hooks for Unix domain networking. 670 * Security hooks for Unix domain networking.
@@ -1218,16 +1227,18 @@ struct security_operations {
1218 int (*task_setpgid) (struct task_struct * p, pid_t pgid); 1227 int (*task_setpgid) (struct task_struct * p, pid_t pgid);
1219 int (*task_getpgid) (struct task_struct * p); 1228 int (*task_getpgid) (struct task_struct * p);
1220 int (*task_getsid) (struct task_struct * p); 1229 int (*task_getsid) (struct task_struct * p);
1230 void (*task_getsecid) (struct task_struct * p, u32 * secid);
1221 int (*task_setgroups) (struct group_info *group_info); 1231 int (*task_setgroups) (struct group_info *group_info);
1222 int (*task_setnice) (struct task_struct * p, int nice); 1232 int (*task_setnice) (struct task_struct * p, int nice);
1223 int (*task_setioprio) (struct task_struct * p, int ioprio); 1233 int (*task_setioprio) (struct task_struct * p, int ioprio);
1234 int (*task_getioprio) (struct task_struct * p);
1224 int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim); 1235 int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim);
1225 int (*task_setscheduler) (struct task_struct * p, int policy, 1236 int (*task_setscheduler) (struct task_struct * p, int policy,
1226 struct sched_param * lp); 1237 struct sched_param * lp);
1227 int (*task_getscheduler) (struct task_struct * p); 1238 int (*task_getscheduler) (struct task_struct * p);
1228 int (*task_movememory) (struct task_struct * p); 1239 int (*task_movememory) (struct task_struct * p);
1229 int (*task_kill) (struct task_struct * p, 1240 int (*task_kill) (struct task_struct * p,
1230 struct siginfo * info, int sig); 1241 struct siginfo * info, int sig, u32 secid);
1231 int (*task_wait) (struct task_struct * p); 1242 int (*task_wait) (struct task_struct * p);
1232 int (*task_prctl) (int option, unsigned long arg2, 1243 int (*task_prctl) (int option, unsigned long arg2,
1233 unsigned long arg3, unsigned long arg4, 1244 unsigned long arg3, unsigned long arg4,
@@ -1266,7 +1277,7 @@ struct security_operations {
1266 struct sembuf * sops, unsigned nsops, int alter); 1277 struct sembuf * sops, unsigned nsops, int alter);
1267 1278
1268 int (*netlink_send) (struct sock * sk, struct sk_buff * skb); 1279 int (*netlink_send) (struct sock * sk, struct sk_buff * skb);
1269 int (*netlink_recv) (struct sk_buff * skb); 1280 int (*netlink_recv) (struct sk_buff * skb, int cap);
1270 1281
1271 /* allow module stacking */ 1282 /* allow module stacking */
1272 int (*register_security) (const char *name, 1283 int (*register_security) (const char *name,
@@ -1838,6 +1849,11 @@ static inline int security_task_getsid (struct task_struct *p)
1838 return security_ops->task_getsid (p); 1849 return security_ops->task_getsid (p);
1839} 1850}
1840 1851
1852static inline void security_task_getsecid (struct task_struct *p, u32 *secid)
1853{
1854 security_ops->task_getsecid (p, secid);
1855}
1856
1841static inline int security_task_setgroups (struct group_info *group_info) 1857static inline int security_task_setgroups (struct group_info *group_info)
1842{ 1858{
1843 return security_ops->task_setgroups (group_info); 1859 return security_ops->task_setgroups (group_info);
@@ -1853,6 +1869,11 @@ static inline int security_task_setioprio (struct task_struct *p, int ioprio)
1853 return security_ops->task_setioprio (p, ioprio); 1869 return security_ops->task_setioprio (p, ioprio);
1854} 1870}
1855 1871
1872static inline int security_task_getioprio (struct task_struct *p)
1873{
1874 return security_ops->task_getioprio (p);
1875}
1876
1856static inline int security_task_setrlimit (unsigned int resource, 1877static inline int security_task_setrlimit (unsigned int resource,
1857 struct rlimit *new_rlim) 1878 struct rlimit *new_rlim)
1858{ 1879{
@@ -1877,9 +1898,10 @@ static inline int security_task_movememory (struct task_struct *p)
1877} 1898}
1878 1899
1879static inline int security_task_kill (struct task_struct *p, 1900static inline int security_task_kill (struct task_struct *p,
1880 struct siginfo *info, int sig) 1901 struct siginfo *info, int sig,
1902 u32 secid)
1881{ 1903{
1882 return security_ops->task_kill (p, info, sig); 1904 return security_ops->task_kill (p, info, sig, secid);
1883} 1905}
1884 1906
1885static inline int security_task_wait (struct task_struct *p) 1907static inline int security_task_wait (struct task_struct *p)
@@ -2032,9 +2054,9 @@ static inline int security_netlink_send(struct sock *sk, struct sk_buff * skb)
2032 return security_ops->netlink_send(sk, skb); 2054 return security_ops->netlink_send(sk, skb);
2033} 2055}
2034 2056
2035static inline int security_netlink_recv(struct sk_buff * skb) 2057static inline int security_netlink_recv(struct sk_buff * skb, int cap)
2036{ 2058{
2037 return security_ops->netlink_recv(skb); 2059 return security_ops->netlink_recv(skb, cap);
2038} 2060}
2039 2061
2040/* prototypes */ 2062/* prototypes */
@@ -2490,6 +2512,9 @@ static inline int security_task_getsid (struct task_struct *p)
2490 return 0; 2512 return 0;
2491} 2513}
2492 2514
2515static inline void security_task_getsecid (struct task_struct *p, u32 *secid)
2516{ }
2517
2493static inline int security_task_setgroups (struct group_info *group_info) 2518static inline int security_task_setgroups (struct group_info *group_info)
2494{ 2519{
2495 return 0; 2520 return 0;
@@ -2505,6 +2530,11 @@ static inline int security_task_setioprio (struct task_struct *p, int ioprio)
2505 return 0; 2530 return 0;
2506} 2531}
2507 2532
2533static inline int security_task_getioprio (struct task_struct *p)
2534{
2535 return 0;
2536}
2537
2508static inline int security_task_setrlimit (unsigned int resource, 2538static inline int security_task_setrlimit (unsigned int resource,
2509 struct rlimit *new_rlim) 2539 struct rlimit *new_rlim)
2510{ 2540{
@@ -2529,7 +2559,8 @@ static inline int security_task_movememory (struct task_struct *p)
2529} 2559}
2530 2560
2531static inline int security_task_kill (struct task_struct *p, 2561static inline int security_task_kill (struct task_struct *p,
2532 struct siginfo *info, int sig) 2562 struct siginfo *info, int sig,
2563 u32 secid)
2533{ 2564{
2534 return 0; 2565 return 0;
2535} 2566}
@@ -2670,9 +2701,9 @@ static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb)
2670 return cap_netlink_send (sk, skb); 2701 return cap_netlink_send (sk, skb);
2671} 2702}
2672 2703
2673static inline int security_netlink_recv (struct sk_buff *skb) 2704static inline int security_netlink_recv (struct sk_buff *skb, int cap)
2674{ 2705{
2675 return cap_netlink_recv (skb); 2706 return cap_netlink_recv (skb, cap);
2676} 2707}
2677 2708
2678static inline struct dentry *securityfs_create_dir(const char *name, 2709static inline struct dentry *securityfs_create_dir(const char *name,
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 951c4e85827..fc1104a2cfa 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -336,7 +336,6 @@ struct uart_driver {
336 struct module *owner; 336 struct module *owner;
337 const char *driver_name; 337 const char *driver_name;
338 const char *dev_name; 338 const char *dev_name;
339 const char *devfs_name;
340 int major; 339 int major;
341 int minor; 340 int minor;
342 int nr; 341 int nr;
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 1e4ce7225ee..117135e33d6 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -9,32 +9,6 @@
9#include <linux/spinlock.h> 9#include <linux/spinlock.h>
10 10
11/* 11/*
12 * These values of sa_flags are used only by the kernel as part of the
13 * irq handling routines.
14 *
15 * SA_INTERRUPT is also used by the irq handling routines.
16 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
17 * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
18 */
19#define SA_SAMPLE_RANDOM SA_RESTART
20#define SA_SHIRQ 0x04000000
21#define SA_PROBEIRQ 0x08000000
22
23/*
24 * As above, these correspond to the IORESOURCE_IRQ_* defines in
25 * linux/ioport.h to select the interrupt line behaviour. When
26 * requesting an interrupt without specifying a SA_TRIGGER, the
27 * setting should be assumed to be "as already configured", which
28 * may be as per machine or firmware initialisation.
29 */
30#define SA_TRIGGER_LOW 0x00000008
31#define SA_TRIGGER_HIGH 0x00000004
32#define SA_TRIGGER_FALLING 0x00000002
33#define SA_TRIGGER_RISING 0x00000001
34#define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\
35 SA_TRIGGER_RISING|SA_TRIGGER_FALLING)
36
37/*
38 * Real Time signals may be queued. 12 * Real Time signals may be queued.
39 */ 13 */
40 14
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 16eef03ce0e..57d7d4965f9 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -171,7 +171,15 @@ enum {
171 171
172enum { 172enum {
173 SKB_GSO_TCPV4 = 1 << 0, 173 SKB_GSO_TCPV4 = 1 << 0,
174 SKB_GSO_UDPV4 = 1 << 1, 174 SKB_GSO_UDP = 1 << 1,
175
176 /* This indicates the skb is from an untrusted source. */
177 SKB_GSO_DODGY = 1 << 2,
178
179 /* This indicates the tcp segment has CWR set. */
180 SKB_GSO_TCP_ECN = 1 << 3,
181
182 SKB_GSO_TCPV6 = 1 << 4,
175}; 183};
176 184
177/** 185/**
@@ -1298,8 +1306,7 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
1298extern void skb_split(struct sk_buff *skb, 1306extern void skb_split(struct sk_buff *skb,
1299 struct sk_buff *skb1, const u32 len); 1307 struct sk_buff *skb1, const u32 len);
1300 1308
1301extern void skb_release_data(struct sk_buff *skb); 1309extern struct sk_buff *skb_segment(struct sk_buff *skb, int features);
1302extern struct sk_buff *skb_segment(struct sk_buff *skb, int sg);
1303 1310
1304static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, 1311static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
1305 int len, void *buffer) 1312 int len, void *buffer)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index c93c3fe4308..837e8bce134 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -125,4 +125,6 @@ static inline void smp_send_reschedule(int cpu) { }
125#define put_cpu() preempt_enable() 125#define put_cpu() preempt_enable()
126#define put_cpu_no_resched() preempt_enable_no_resched() 126#define put_cpu_no_resched() preempt_enable_no_resched()
127 127
128void smp_setup_processor_id(void);
129
128#endif /* __LINUX_SMP_H */ 130#endif /* __LINUX_SMP_H */
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 50356438454..7b27c09b560 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -159,7 +159,9 @@ struct svc_rqst {
159 * determine what device number 159 * determine what device number
160 * to report (real or virtual) 160 * to report (real or virtual)
161 */ 161 */
162 162 int rq_sendfile_ok; /* turned off in gss privacy
163 * to prevent encrypting page
164 * cache pages */
163 wait_queue_head_t rq_wait; /* synchronization */ 165 wait_queue_head_t rq_wait; /* synchronization */
164}; 166};
165 167
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c41e2d6d1ac..cf6ca6e377b 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -189,7 +189,6 @@ extern long vm_total_pages;
189 189
190#ifdef CONFIG_NUMA 190#ifdef CONFIG_NUMA
191extern int zone_reclaim_mode; 191extern int zone_reclaim_mode;
192extern int zone_reclaim_interval;
193extern int zone_reclaim(struct zone *, gfp_t, unsigned int); 192extern int zone_reclaim(struct zone *, gfp_t, unsigned int);
194#else 193#else
195#define zone_reclaim_mode 0 194#define zone_reclaim_mode 0
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index b368b296d03..58c961c9e17 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -157,7 +157,6 @@ struct tty_driver {
157 struct cdev cdev; 157 struct cdev cdev;
158 struct module *owner; 158 struct module *owner;
159 const char *driver_name; 159 const char *driver_name;
160 const char *devfs_name;
161 const char *name; 160 const char *name;
162 int name_base; /* offset of printed name */ 161 int name_base; /* offset of printed name */
163 int major; /* major device number */ 162 int major; /* major device number */
@@ -242,8 +241,15 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
242 * is also a promise, if the above case is true, not to signal 241 * is also a promise, if the above case is true, not to signal
243 * overruns, either.) 242 * overruns, either.)
244 * 243 *
245 * TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This 244 * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need
246 * is only used by tty_register_driver(). 245 * to be registered with a call to tty_register_driver() when the
246 * device is found in the system and unregistered with a call to
247 * tty_unregister_device() so the devices will be show up
248 * properly in sysfs. If not set, driver->num entries will be
249 * created by the tty core in sysfs when tty_register_driver() is
250 * called. This is to be used by drivers that have tty devices
251 * that can appear and disappear while the main tty driver is
252 * registered with the tty core.
247 * 253 *
248 * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead 254 * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead
249 * use dynamic memory keyed through the devpts filesystem. This 255 * use dynamic memory keyed through the devpts filesystem. This
@@ -252,7 +258,7 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
252#define TTY_DRIVER_INSTALLED 0x0001 258#define TTY_DRIVER_INSTALLED 0x0001
253#define TTY_DRIVER_RESET_TERMIOS 0x0002 259#define TTY_DRIVER_RESET_TERMIOS 0x0002
254#define TTY_DRIVER_REAL_RAW 0x0004 260#define TTY_DRIVER_REAL_RAW 0x0004
255#define TTY_DRIVER_NO_DEVFS 0x0008 261#define TTY_DRIVER_DYNAMIC_DEV 0x0008
256#define TTY_DRIVER_DEVPTS_MEM 0x0010 262#define TTY_DRIVER_DEVPTS_MEM 0x0010
257 263
258/* tty driver types */ 264/* tty driver types */
diff --git a/include/linux/types.h b/include/linux/types.h
index a5e46e783ff..3f235660a3c 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -177,8 +177,15 @@ typedef __u64 __bitwise __be64;
177 177
178#ifdef __KERNEL__ 178#ifdef __KERNEL__
179typedef unsigned __bitwise__ gfp_t; 179typedef unsigned __bitwise__ gfp_t;
180
181#ifdef CONFIG_RESOURCES_64BIT
182typedef u64 resource_size_t;
183#else
184typedef u32 resource_size_t;
180#endif 185#endif
181 186
187#endif /* __KERNEL__ */
188
182struct ustat { 189struct ustat {
183 __kernel_daddr_t f_tfree; 190 __kernel_daddr_t f_tfree;
184 __kernel_ino_t f_tinode; 191 __kernel_ino_t f_tinode;
diff --git a/include/linux/udp.h b/include/linux/udp.h
index bdd39be0940..90223f057d5 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -46,7 +46,7 @@ struct udp_sock {
46 unsigned int corkflag; /* Cork is required */ 46 unsigned int corkflag; /* Cork is required */
47 __u16 encap_type; /* Is this an Encapsulation socket? */ 47 __u16 encap_type; /* Is this an Encapsulation socket? */
48 /* 48 /*
49 * Following member retains the infomation to create a UDP header 49 * Following member retains the information to create a UDP header
50 * when the socket is uncorked. 50 * when the socket is uncorked.
51 */ 51 */
52 __u16 len; /* total length of pending frames */ 52 __u16 len; /* total length of pending frames */
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index e39b7cc4339..fc62887c520 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -993,7 +993,7 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __
993extern struct inode_operations ufs_fast_symlink_inode_operations; 993extern struct inode_operations ufs_fast_symlink_inode_operations;
994 994
995/* truncate.c */ 995/* truncate.c */
996extern void ufs_truncate (struct inode *); 996extern int ufs_truncate (struct inode *, loff_t);
997 997
998static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) 998static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
999{ 999{
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
new file mode 100644
index 00000000000..3e0daf54133
--- /dev/null
+++ b/include/linux/vmstat.h
@@ -0,0 +1,215 @@
1#ifndef _LINUX_VMSTAT_H
2#define _LINUX_VMSTAT_H
3
4#include <linux/types.h>
5#include <linux/percpu.h>
6#include <linux/config.h>
7#include <linux/mmzone.h>
8#include <asm/atomic.h>
9
10#ifdef CONFIG_VM_EVENT_COUNTERS
11/*
12 * Light weight per cpu counter implementation.
13 *
14 * Counters should only be incremented and no critical kernel component
15 * should rely on the counter values.
16 *
17 * Counters are handled completely inline. On many platforms the code
18 * generated will simply be the increment of a global address.
19 */
20
21#define FOR_ALL_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL, x##_HIGH
22
23enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
24 FOR_ALL_ZONES(PGALLOC),
25 PGFREE, PGACTIVATE, PGDEACTIVATE,
26 PGFAULT, PGMAJFAULT,
27 FOR_ALL_ZONES(PGREFILL),
28 FOR_ALL_ZONES(PGSTEAL),
29 FOR_ALL_ZONES(PGSCAN_KSWAPD),
30 FOR_ALL_ZONES(PGSCAN_DIRECT),
31 PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
32 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
33 NR_VM_EVENT_ITEMS
34};
35
36struct vm_event_state {
37 unsigned long event[NR_VM_EVENT_ITEMS];
38};
39
40DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
41
42static inline void __count_vm_event(enum vm_event_item item)
43{
44 __get_cpu_var(vm_event_states.event[item])++;
45}
46
47static inline void count_vm_event(enum vm_event_item item)
48{
49 get_cpu_var(vm_event_states.event[item])++;
50 put_cpu();
51}
52
53static inline void __count_vm_events(enum vm_event_item item, long delta)
54{
55 __get_cpu_var(vm_event_states.event[item]) += delta;
56}
57
58static inline void count_vm_events(enum vm_event_item item, long delta)
59{
60 get_cpu_var(vm_event_states.event[item])++;
61 put_cpu();
62}
63
64extern void all_vm_events(unsigned long *);
65extern void vm_events_fold_cpu(int cpu);
66
67#else
68
69/* Disable counters */
70#define get_cpu_vm_events(e) 0L
71#define count_vm_event(e) do { } while (0)
72#define count_vm_events(e,d) do { } while (0)
73#define __count_vm_event(e) do { } while (0)
74#define __count_vm_events(e,d) do { } while (0)
75#define vm_events_fold_cpu(x) do { } while (0)
76
77#endif /* CONFIG_VM_EVENT_COUNTERS */
78
79#define __count_zone_vm_events(item, zone, delta) \
80 __count_vm_events(item##_DMA + zone_idx(zone), delta)
81
82/*
83 * Zone based page accounting with per cpu differentials.
84 */
85extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
86
87static inline void zone_page_state_add(long x, struct zone *zone,
88 enum zone_stat_item item)
89{
90 atomic_long_add(x, &zone->vm_stat[item]);
91 atomic_long_add(x, &vm_stat[item]);
92}
93
94static inline unsigned long global_page_state(enum zone_stat_item item)
95{
96 long x = atomic_long_read(&vm_stat[item]);
97#ifdef CONFIG_SMP
98 if (x < 0)
99 x = 0;
100#endif
101 return x;
102}
103
104static inline unsigned long zone_page_state(struct zone *zone,
105 enum zone_stat_item item)
106{
107 long x = atomic_long_read(&zone->vm_stat[item]);
108#ifdef CONFIG_SMP
109 if (x < 0)
110 x = 0;
111#endif
112 return x;
113}
114
115#ifdef CONFIG_NUMA
116/*
117 * Determine the per node value of a stat item. This function
118 * is called frequently in a NUMA machine, so try to be as
119 * frugal as possible.
120 */
121static inline unsigned long node_page_state(int node,
122 enum zone_stat_item item)
123{
124 struct zone *zones = NODE_DATA(node)->node_zones;
125
126 return
127#ifndef CONFIG_DMA_IS_NORMAL
128#if !defined(CONFIG_DMA_IS_DMA32) && BITS_PER_LONG >= 64
129 zone_page_state(&zones[ZONE_DMA32], item) +
130#endif
131 zone_page_state(&zones[ZONE_NORMAL], item) +
132#endif
133#ifdef CONFIG_HIGHMEM
134 zone_page_state(&zones[ZONE_HIGHMEM], item) +
135#endif
136 zone_page_state(&zones[ZONE_DMA], item);
137}
138
139extern void zone_statistics(struct zonelist *, struct zone *);
140
141#else
142
143#define node_page_state(node, item) global_page_state(item)
144#define zone_statistics(_zl,_z) do { } while (0)
145
146#endif /* CONFIG_NUMA */
147
148#define __add_zone_page_state(__z, __i, __d) \
149 __mod_zone_page_state(__z, __i, __d)
150#define __sub_zone_page_state(__z, __i, __d) \
151 __mod_zone_page_state(__z, __i,-(__d))
152
153#define add_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, __d)
154#define sub_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, -(__d))
155
156static inline void zap_zone_vm_stats(struct zone *zone)
157{
158 memset(zone->vm_stat, 0, sizeof(zone->vm_stat));
159}
160
161extern void inc_zone_state(struct zone *, enum zone_stat_item);
162
163#ifdef CONFIG_SMP
164void __mod_zone_page_state(struct zone *, enum zone_stat_item item, int);
165void __inc_zone_page_state(struct page *, enum zone_stat_item);
166void __dec_zone_page_state(struct page *, enum zone_stat_item);
167
168void mod_zone_page_state(struct zone *, enum zone_stat_item, int);
169void inc_zone_page_state(struct page *, enum zone_stat_item);
170void dec_zone_page_state(struct page *, enum zone_stat_item);
171
172extern void inc_zone_state(struct zone *, enum zone_stat_item);
173
174void refresh_cpu_vm_stats(int);
175void refresh_vm_stats(void);
176
177#else /* CONFIG_SMP */
178
179/*
180 * We do not maintain differentials in a single processor configuration.
181 * The functions directly modify the zone and global counters.
182 */
183static inline void __mod_zone_page_state(struct zone *zone,
184 enum zone_stat_item item, int delta)
185{
186 zone_page_state_add(delta, zone, item);
187}
188
189static inline void __inc_zone_page_state(struct page *page,
190 enum zone_stat_item item)
191{
192 atomic_long_inc(&page_zone(page)->vm_stat[item]);
193 atomic_long_inc(&vm_stat[item]);
194}
195
196static inline void __dec_zone_page_state(struct page *page,
197 enum zone_stat_item item)
198{
199 atomic_long_dec(&page_zone(page)->vm_stat[item]);
200 atomic_long_dec(&vm_stat[item]);
201}
202
203/*
204 * We only use atomic operations to update counters. So there is no need to
205 * disable interrupts.
206 */
207#define inc_zone_page_state __inc_zone_page_state
208#define dec_zone_page_state __dec_zone_page_state
209#define mod_zone_page_state __mod_zone_page_state
210
211static inline void refresh_cpu_vm_stats(int cpu) { }
212static inline void refresh_vm_stats(void) { }
213#endif
214
215#endif /* _LINUX_VMSTAT_H */
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h
index ad9c171bfa0..3c43b95f4c0 100644
--- a/include/media/tuner-types.h
+++ b/include/media/tuner-types.h
@@ -20,6 +20,7 @@ struct tuner_range {
20 20
21struct tuner_params { 21struct tuner_params {
22 enum param_type type; 22 enum param_type type;
23
23 /* Many Philips based tuners have a comment like this in their 24 /* Many Philips based tuners have a comment like this in their
24 * datasheet: 25 * datasheet:
25 * 26 *
@@ -39,6 +40,60 @@ struct tuner_params {
39 * static unless the control byte was sent first. 40 * static unless the control byte was sent first.
40 */ 41 */
41 unsigned int cb_first_if_lower_freq:1; 42 unsigned int cb_first_if_lower_freq:1;
43 /* Set to 1 if this tuner uses a tda9887 */
44 unsigned int has_tda9887:1;
45 /* Many Philips tuners use tda9887 PORT1 to select the FM radio
46 sensitivity. If this setting is 1, then set PORT1 to 1 to
47 get proper FM reception. */
48 unsigned int port1_fm_high_sensitivity:1;
49 /* Some Philips tuners use tda9887 PORT2 to select the FM radio
50 sensitivity. If this setting is 1, then set PORT2 to 1 to
51 get proper FM reception. */
52 unsigned int port2_fm_high_sensitivity:1;
53 /* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners
54 use Intercarrier mode. If this setting is 1, then the tuner
55 needs to be set to intercarrier mode. */
56 unsigned int intercarrier_mode:1;
57 /* This setting sets the default value for PORT1.
58 0 means inactive, 1 means active. Note: the actual bit
59 value written to the tda9887 is inverted. So a 0 here
60 means a 1 in the B6 bit. */
61 unsigned int port1_active:1;
62 /* This setting sets the default value for PORT2.
63 0 means inactive, 1 means active. Note: the actual bit
64 value written to the tda9887 is inverted. So a 0 here
65 means a 1 in the B7 bit. */
66 unsigned int port2_active:1;
67 /* Sometimes PORT1 is inverted when the SECAM-L' standard is selected.
68 Set this bit to 1 if this is needed. */
69 unsigned int port1_invert_for_secam_lc:1;
70 /* Sometimes PORT2 is inverted when the SECAM-L' standard is selected.
71 Set this bit to 1 if this is needed. */
72 unsigned int port2_invert_for_secam_lc:1;
73 /* Some cards require PORT1 to be 1 for mono Radio FM and 0 for stereo. */
74 unsigned int port1_set_for_fm_mono:1;
75 /* Default tda9887 TOP value in dB for the low band. Default is 0.
76 Range: -16:+15 */
77 signed int default_top_low:5;
78 /* Default tda9887 TOP value in dB for the mid band. Default is 0.
79 Range: -16:+15 */
80 signed int default_top_mid:5;
81 /* Default tda9887 TOP value in dB for the high band. Default is 0.
82 Range: -16:+15 */
83 signed int default_top_high:5;
84 /* Default tda9887 TOP value in dB for SECAM-L/L' for the low band.
85 Default is 0. Several tuners require a different TOP value for
86 the SECAM-L/L' standards. Range: -16:+15 */
87 signed int default_top_secam_low:5;
88 /* Default tda9887 TOP value in dB for SECAM-L/L' for the mid band.
89 Default is 0. Several tuners require a different TOP value for
90 the SECAM-L/L' standards. Range: -16:+15 */
91 signed int default_top_secam_mid:5;
92 /* Default tda9887 TOP value in dB for SECAM-L/L' for the high band.
93 Default is 0. Several tuners require a different TOP value for
94 the SECAM-L/L' standards. Range: -16:+15 */
95 signed int default_top_secam_high:5;
96
42 97
43 unsigned int count; 98 unsigned int count;
44 struct tuner_range *ranges; 99 struct tuner_range *ranges;
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index a1b473190e6..62dae1a8c44 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -314,7 +314,6 @@ void *priv;
314 /* for videodev.c intenal usage -- please don't touch */ 314 /* for videodev.c intenal usage -- please don't touch */
315 int users; /* video_exclusive_{open|close} ... */ 315 int users; /* video_exclusive_{open|close} ... */
316 struct mutex lock; /* ... helper function uses these */ 316 struct mutex lock; /* ... helper function uses these */
317 char devfs_name[64]; /* devfs */
318 struct class_device class_dev; /* sysfs */ 317 struct class_device class_dev; /* sysfs */
319}; 318};
320 319
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 795f81f9ec7..5ba72d95280 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -53,10 +53,16 @@ struct unix_address {
53struct unix_skb_parms { 53struct unix_skb_parms {
54 struct ucred creds; /* Skb credentials */ 54 struct ucred creds; /* Skb credentials */
55 struct scm_fp_list *fp; /* Passed files */ 55 struct scm_fp_list *fp; /* Passed files */
56#ifdef CONFIG_SECURITY_NETWORK
57 char *secdata; /* Security context */
58 u32 seclen; /* Security length */
59#endif
56}; 60};
57 61
58#define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) 62#define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb))
59#define UNIXCREDS(skb) (&UNIXCB((skb)).creds) 63#define UNIXCREDS(skb) (&UNIXCB((skb)).creds)
64#define UNIXSECDATA(skb) (&UNIXCB((skb)).secdata)
65#define UNIXSECLEN(skb) (&UNIXCB((skb)).seclen)
60 66
61#define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) 67#define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock)
62#define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) 68#define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock)
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index a398ae5e30f..ab29dafb1a6 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -146,7 +146,7 @@ static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
146 struct rt6_info *rt = (struct rt6_info *) dst; 146 struct rt6_info *rt = (struct rt6_info *) dst;
147 147
148 write_lock(&sk->sk_dst_lock); 148 write_lock(&sk->sk_dst_lock);
149 __sk_dst_set(sk, dst); 149 sk_setup_caps(sk, dst);
150 np->daddr_cache = daddr; 150 np->daddr_cache = daddr;
151 np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; 151 np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
152 write_unlock(&sk->sk_dst_lock); 152 write_unlock(&sk->sk_dst_lock);
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 0575c59a5c9..bca19ca7bdd 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -160,7 +160,7 @@ typedef struct {
160 int irq, irq2; /* Interrupts used */ 160 int irq, irq2; /* Interrupts used */
161 int dma, dma2; /* DMA channel(s) used */ 161 int dma, dma2; /* DMA channel(s) used */
162 int fifo_size; /* FIFO size */ 162 int fifo_size; /* FIFO size */
163 int irqflags; /* interrupt flags (ie, SA_SHIRQ|SA_INTERRUPT) */ 163 int irqflags; /* interrupt flags (ie, IRQF_SHARED|IRQF_DISABLED) */
164 int direction; /* Link direction, used by some FIR drivers */ 164 int direction; /* Link direction, used by some FIR drivers */
165 int enabled; /* Powered on? */ 165 int enabled; /* Powered on? */
166 int suspended; /* Suspended by APM */ 166 int suspended; /* Suspended by APM */
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 75b5b9333fc..1925c65e617 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -169,17 +169,23 @@ psched_tod_diff(int delta_sec, int bound)
169 169
170#define PSCHED_TADD2(tv, delta, tv_res) \ 170#define PSCHED_TADD2(tv, delta, tv_res) \
171({ \ 171({ \
172 int __delta = (tv).tv_usec + (delta); \ 172 int __delta = (delta); \
173 (tv_res).tv_sec = (tv).tv_sec; \ 173 (tv_res) = (tv); \
174 if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \ 174 while(__delta >= USEC_PER_SEC){ \
175 (tv_res).tv_sec++; \
176 __delta -= USEC_PER_SEC; \
177 } \
175 (tv_res).tv_usec = __delta; \ 178 (tv_res).tv_usec = __delta; \
176}) 179})
177 180
178#define PSCHED_TADD(tv, delta) \ 181#define PSCHED_TADD(tv, delta) \
179({ \ 182({ \
180 (tv).tv_usec += (delta); \ 183 int __delta = (delta); \
181 if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \ 184 while(__delta >= USEC_PER_SEC){ \
182 (tv).tv_usec -= USEC_PER_SEC; } \ 185 (tv).tv_sec++; \
186 __delta -= USEC_PER_SEC; \
187 } \
188 (tv).tv_usec = __delta; \
183}) 189})
184 190
185/* Set/check that time is in the "past perfect"; 191/* Set/check that time is in the "past perfect";
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 3b6dc15c68a..a225d6371cb 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -36,7 +36,8 @@
36struct net_protocol { 36struct net_protocol {
37 int (*handler)(struct sk_buff *skb); 37 int (*handler)(struct sk_buff *skb);
38 void (*err_handler)(struct sk_buff *skb, u32 info); 38 void (*err_handler)(struct sk_buff *skb, u32 info);
39 struct sk_buff *(*gso_segment)(struct sk_buff *skb, int sg); 39 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
40 int features);
40 int no_policy; 41 int no_policy;
41}; 42};
42 43
@@ -49,11 +50,17 @@ struct inet6_protocol
49 struct inet6_skb_parm *opt, 50 struct inet6_skb_parm *opt,
50 int type, int code, int offset, 51 int type, int code, int offset,
51 __u32 info); 52 __u32 info);
53
54 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
55 int features);
56
52 unsigned int flags; /* INET6_PROTO_xxx */ 57 unsigned int flags; /* INET6_PROTO_xxx */
53}; 58};
54 59
55#define INET6_PROTO_NOPOLICY 0x1 60#define INET6_PROTO_NOPOLICY 0x1
56#define INET6_PROTO_FINAL 0x2 61#define INET6_PROTO_FINAL 0x2
62/* This should be set for any extension header which is compatible with GSO. */
63#define INET6_PROTO_GSO_EXTHDR 0x4
57#endif 64#endif
58 65
59/* This is used to register socket interfaces for IP protocols. */ 66/* This is used to register socket interfaces for IP protocols. */
diff --git a/include/net/scm.h b/include/net/scm.h
index 540619cb716..02daa097cdc 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -19,6 +19,10 @@ struct scm_cookie
19{ 19{
20 struct ucred creds; /* Skb credentials */ 20 struct ucred creds; /* Skb credentials */
21 struct scm_fp_list *fp; /* Passed files */ 21 struct scm_fp_list *fp; /* Passed files */
22#ifdef CONFIG_SECURITY_NETWORK
23 char *secdata; /* Security context */
24 u32 seclen; /* Security length */
25#endif
22 unsigned long seq; /* Connection seqno */ 26 unsigned long seq; /* Connection seqno */
23}; 27};
24 28
@@ -48,6 +52,17 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
48 return __scm_send(sock, msg, scm); 52 return __scm_send(sock, msg, scm);
49} 53}
50 54
55#ifdef CONFIG_SECURITY_NETWORK
56static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
57{
58 if (test_bit(SOCK_PASSSEC, &sock->flags) && scm->secdata != NULL)
59 put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, scm->seclen, scm->secdata);
60}
61#else
62static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
63{ }
64#endif /* CONFIG_SECURITY_NETWORK */
65
51static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, 66static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg,
52 struct scm_cookie *scm, int flags) 67 struct scm_cookie *scm, int flags)
53{ 68{
@@ -62,6 +77,8 @@ static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg,
62 if (test_bit(SOCK_PASSCRED, &sock->flags)) 77 if (test_bit(SOCK_PASSCRED, &sock->flags))
63 put_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(scm->creds), &scm->creds); 78 put_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(scm->creds), &scm->creds);
64 79
80 scm_passec(sock, msg, scm);
81
65 if (!scm->fp) 82 if (!scm->fp)
66 return; 83 return;
67 84
diff --git a/include/net/sock.h b/include/net/sock.h
index 2d8d6adf161..7b3d6b85694 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -140,6 +140,7 @@ struct sock_common {
140 * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings 140 * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings
141 * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets 141 * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets
142 * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) 142 * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO)
143 * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4)
143 * @sk_lingertime: %SO_LINGER l_linger setting 144 * @sk_lingertime: %SO_LINGER l_linger setting
144 * @sk_backlog: always used with the per-socket spinlock held 145 * @sk_backlog: always used with the per-socket spinlock held
145 * @sk_callback_lock: used with the callbacks in the end of this struct 146 * @sk_callback_lock: used with the callbacks in the end of this struct
@@ -211,6 +212,7 @@ struct sock {
211 gfp_t sk_allocation; 212 gfp_t sk_allocation;
212 int sk_sndbuf; 213 int sk_sndbuf;
213 int sk_route_caps; 214 int sk_route_caps;
215 int sk_gso_type;
214 int sk_rcvlowat; 216 int sk_rcvlowat;
215 unsigned long sk_flags; 217 unsigned long sk_flags;
216 unsigned long sk_lingertime; 218 unsigned long sk_lingertime;
@@ -383,7 +385,6 @@ enum sock_flags {
383 SOCK_USE_WRITE_QUEUE, /* whether to call sk->sk_write_space in sock_wfree */ 385 SOCK_USE_WRITE_QUEUE, /* whether to call sk->sk_write_space in sock_wfree */
384 SOCK_DBG, /* %SO_DEBUG setting */ 386 SOCK_DBG, /* %SO_DEBUG setting */
385 SOCK_RCVTSTAMP, /* %SO_TIMESTAMP setting */ 387 SOCK_RCVTSTAMP, /* %SO_TIMESTAMP setting */
386 SOCK_NO_LARGESEND, /* whether to sent large segments or not */
387 SOCK_LOCALROUTE, /* route locally only, %SO_DONTROUTE setting */ 388 SOCK_LOCALROUTE, /* route locally only, %SO_DONTROUTE setting */
388 SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ 389 SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */
389}; 390};
@@ -1026,15 +1027,20 @@ extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
1026 1027
1027extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie); 1028extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
1028 1029
1030static inline int sk_can_gso(const struct sock *sk)
1031{
1032 return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type);
1033}
1034
1029static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst) 1035static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
1030{ 1036{
1031 __sk_dst_set(sk, dst); 1037 __sk_dst_set(sk, dst);
1032 sk->sk_route_caps = dst->dev->features; 1038 sk->sk_route_caps = dst->dev->features;
1033 if (sk->sk_route_caps & NETIF_F_GSO) 1039 if (sk->sk_route_caps & NETIF_F_GSO)
1034 sk->sk_route_caps |= NETIF_F_TSO; 1040 sk->sk_route_caps |= NETIF_F_GSO_MASK;
1035 if (sk->sk_route_caps & NETIF_F_TSO) { 1041 if (sk_can_gso(sk)) {
1036 if (sock_flag(sk, SOCK_NO_LARGESEND) || dst->header_len) 1042 if (dst->header_len)
1037 sk->sk_route_caps &= ~NETIF_F_TSO; 1043 sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
1038 else 1044 else
1039 sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; 1045 sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
1040 } 1046 }
diff --git a/include/net/tcp.h b/include/net/tcp.h
index ca3d38dfc00..3cd803b0d7a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -751,7 +751,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
751 if (in_flight >= tp->snd_cwnd) 751 if (in_flight >= tp->snd_cwnd)
752 return 1; 752 return 1;
753 753
754 if (!(sk->sk_route_caps & NETIF_F_TSO)) 754 if (!sk_can_gso(sk))
755 return 0; 755 return 0;
756 756
757 left = tp->snd_cwnd - in_flight; 757 left = tp->snd_cwnd - in_flight;
@@ -1086,7 +1086,7 @@ extern struct request_sock_ops tcp_request_sock_ops;
1086 1086
1087extern int tcp_v4_destroy_sock(struct sock *sk); 1087extern int tcp_v4_destroy_sock(struct sock *sk);
1088 1088
1089extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int sg); 1089extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features);
1090 1090
1091#ifdef CONFIG_PROC_FS 1091#ifdef CONFIG_PROC_FS
1092extern int tcp4_proc_init(void); 1092extern int tcp4_proc_init(void);
diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h
index c6b84397448..4629d77173f 100644
--- a/include/net/tcp_ecn.h
+++ b/include/net/tcp_ecn.h
@@ -31,10 +31,9 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp,
31 struct sk_buff *skb) 31 struct sk_buff *skb)
32{ 32{
33 tp->ecn_flags = 0; 33 tp->ecn_flags = 0;
34 if (sysctl_tcp_ecn && !(sk->sk_route_caps & NETIF_F_TSO)) { 34 if (sysctl_tcp_ecn) {
35 TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE|TCPCB_FLAG_CWR; 35 TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE|TCPCB_FLAG_CWR;
36 tp->ecn_flags = TCP_ECN_OK; 36 tp->ecn_flags = TCP_ECN_OK;
37 sock_set_flag(sk, SOCK_NO_LARGESEND);
38 } 37 }
39} 38}
40 39
@@ -56,6 +55,7 @@ static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp,
56 if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) { 55 if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) {
57 tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; 56 tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR;
58 skb->h.th->cwr = 1; 57 skb->h.th->cwr = 1;
58 skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
59 } 59 }
60 } else { 60 } else {
61 /* ACK or retransmitted segment: clear ECT|CE */ 61 /* ACK or retransmitted segment: clear ECT|CE */
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 446afc3ea27..758f8bf133c 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -265,6 +265,7 @@
265 265
266/* specific - Analog Devices */ 266/* specific - Analog Devices */
267#define AC97_AD_TEST 0x5a /* test register */ 267#define AC97_AD_TEST 0x5a /* test register */
268#define AC97_AD_TEST2 0x5c /* undocumented test register 2 */
268#define AC97_AD_CODEC_CFG 0x70 /* codec configuration */ 269#define AC97_AD_CODEC_CFG 0x70 /* codec configuration */
269#define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */ 270#define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */
270#define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */ 271#define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
index 3bf5911fe82..3d988849202 100644
--- a/include/sound/ak4xxx-adda.h
+++ b/include/sound/ak4xxx-adda.h
@@ -32,8 +32,8 @@ struct snd_akm4xxx;
32struct snd_ak4xxx_ops { 32struct snd_ak4xxx_ops {
33 void (*lock)(struct snd_akm4xxx *ak, int chip); 33 void (*lock)(struct snd_akm4xxx *ak, int chip);
34 void (*unlock)(struct snd_akm4xxx *ak, int chip); 34 void (*unlock)(struct snd_akm4xxx *ak, int chip);
35 void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val); 35 void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg,
36 // unsigned char (*read)(struct snd_akm4xxx *ak, int chip, unsigned char reg); 36 unsigned char val);
37 void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate); 37 void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate);
38}; 38};
39 39
@@ -41,29 +41,40 @@ struct snd_ak4xxx_ops {
41 41
42struct snd_akm4xxx { 42struct snd_akm4xxx {
43 struct snd_card *card; 43 struct snd_card *card;
44 unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ 44 unsigned int num_adcs; /* AK4524 or AK4528 ADCs */
45 unsigned int num_dacs; /* AK4524 or AK4528 DACs */ 45 unsigned int num_dacs; /* AK4524 or AK4528 DACs */
46 unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ 46 unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */
47 unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image for IPGA (AK4528) */ 47 unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image
48 * for IPGA (AK4528)
49 */
48 unsigned long private_value[AK4XXX_MAX_CHIPS]; /* helper for driver */ 50 unsigned long private_value[AK4XXX_MAX_CHIPS]; /* helper for driver */
49 void *private_data[AK4XXX_MAX_CHIPS]; /* helper for driver */ 51 void *private_data[AK4XXX_MAX_CHIPS]; /* helper for driver */
50 /* template should fill the following fields */ 52 /* template should fill the following fields */
51 unsigned int idx_offset; /* control index offset */ 53 unsigned int idx_offset; /* control index offset */
52 enum { 54 enum {
53 SND_AK4524, SND_AK4528, SND_AK4529, 55 SND_AK4524, SND_AK4528, SND_AK4529,
54 SND_AK4355, SND_AK4358, SND_AK4381 56 SND_AK4355, SND_AK4358, SND_AK4381
55 } type; 57 } type;
58 unsigned int *num_stereo; /* array of combined counts
59 * for the mixer
60 */
61 char **channel_names; /* array of mixer channel names */
56 struct snd_ak4xxx_ops ops; 62 struct snd_ak4xxx_ops ops;
57}; 63};
58 64
59void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val); 65void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg,
66 unsigned char val);
60void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state); 67void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state);
61void snd_akm4xxx_init(struct snd_akm4xxx *ak); 68void snd_akm4xxx_init(struct snd_akm4xxx *ak);
62int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak); 69int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak);
63 70
64#define snd_akm4xxx_get(ak,chip,reg) (ak)->images[(chip) * 16 + (reg)] 71#define snd_akm4xxx_get(ak,chip,reg) \
65#define snd_akm4xxx_set(ak,chip,reg,val) ((ak)->images[(chip) * 16 + (reg)] = (val)) 72 (ak)->images[(chip) * 16 + (reg)]
66#define snd_akm4xxx_get_ipga(ak,chip,reg) (ak)->ipga_gain[chip][(reg)-4] 73#define snd_akm4xxx_set(ak,chip,reg,val) \
67#define snd_akm4xxx_set_ipga(ak,chip,reg,val) ((ak)->ipga_gain[chip][(reg)-4] = (val)) 74 ((ak)->images[(chip) * 16 + (reg)] = (val))
75#define snd_akm4xxx_get_ipga(ak,chip,reg) \
76 (ak)->ipga_gain[chip][(reg)-4]
77#define snd_akm4xxx_set_ipga(ak,chip,reg,val) \
78 ((ak)->ipga_gain[chip][(reg)-4] = (val))
68 79
69#endif /* __SOUND_AK4XXX_ADDA_H */ 80#endif /* __SOUND_AK4XXX_ADDA_H */
diff --git a/include/sound/initval.h b/include/sound/initval.h
index d29e3d31d14..2ae76efc696 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -62,7 +62,8 @@ static int snd_legacy_find_free_irq(int *irq_table)
62{ 62{
63 while (*irq_table != -1) { 63 while (*irq_table != -1) {
64 if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, 64 if (!request_irq(*irq_table, snd_legacy_empty_irq_handler,
65 SA_INTERRUPT, "ALSA Test IRQ", (void *) irq_table)) { 65 IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ",
66 (void *) irq_table)) {
66 free_irq(*irq_table, (void *) irq_table); 67 free_irq(*irq_table, (void *) irq_table);
67 return *irq_table; 68 return *irq_table;
68 } 69 }