summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@redhat.com>2004-03-10 13:10:00 -0500
committerJeff Garzik <jgarzik@redhat.com>2004-03-10 13:10:00 -0500
commitb40f57b7c12dcbd9ce142161640cdad24395649a (patch)
treec37d3afdd8408021f01359c95c2e80b6b42c59e5 /include/linux
parentdda14883d6829c37e215888080935af76673c646 (diff)
parent0a912921292ec744448f9462e46c31928f422f01 (diff)
Merge redhat.com:/spare/repo/linux-2.5
into redhat.com:/spare/repo/netdev-2.6/netpoll
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h35
-rw-r--r--include/linux/blkdev.h3
-rw-r--r--include/linux/compat.h2
-rw-r--r--include/linux/compat_ioctl.h14
-rw-r--r--include/linux/cpu.h13
-rw-r--r--include/linux/cpumask.h3
-rw-r--r--include/linux/dm-ioctl-v1.h149
-rw-r--r--include/linux/dm-ioctl-v4.h237
-rw-r--r--include/linux/dm-ioctl.h239
-rw-r--r--include/linux/i2o-dev.h2
-rw-r--r--include/linux/i2o.h19
-rw-r--r--include/linux/kernel.h8
-rw-r--r--include/linux/linkage.h1
-rw-r--r--include/linux/mm.h3
-rw-r--r--include/linux/netfilter_bridge.h14
-rw-r--r--include/linux/nfsd/nfsfh.h21
-rw-r--r--include/linux/parport.h17
-rw-r--r--include/linux/parport_pc.h2
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/serial_core.h1
-rw-r--r--include/linux/smp.h2
-rw-r--r--include/linux/stop_machine.h52
-rw-r--r--include/linux/syscalls.h26
-rw-r--r--include/linux/sysctl.h4
-rw-r--r--include/linux/sysdev.h4
27 files changed, 425 insertions, 450 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f851b34903e3..4f6f6eb941e3 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -233,8 +233,27 @@ struct acpi_table_hpet {
} __attribute__ ((packed));
/*
+ * Simple Boot Flags
+ * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx
+ */
+struct acpi_table_sbf
+{
+ u8 sbf_signature[4];
+ u32 sbf_len;
+ u8 sbf_revision;
+ u8 sbf_csum;
+ u8 sbf_oemid[6];
+ u8 sbf_oemtable[8];
+ u8 sbf_revdata[4];
+ u8 sbf_creator[4];
+ u8 sbf_crearev[4];
+ u8 sbf_cmos;
+ u8 sbf_spare[3];
+} __attribute__ ((packed));
+
+/*
* System Resource Affinity Table (SRAT)
- * see http://www.microsoft.com/hwdev/design/srat.htm
+ * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx
*/
struct acpi_table_srat {
@@ -317,6 +336,15 @@ struct acpi_table_ecdt {
char ec_id[0];
} __attribute__ ((packed));
+/* PCI MMCONFIG */
+
+struct acpi_table_mcfg {
+ struct acpi_table_header header;
+ u8 reserved[8];
+ u32 base_address;
+ u32 base_reserved;
+} __attribute__ ((packed));
+
/* Table Handlers */
enum acpi_table_id {
@@ -338,6 +366,7 @@ enum acpi_table_id {
ACPI_SSDT,
ACPI_SPMI,
ACPI_HPET,
+ ACPI_MCFG,
ACPI_TABLE_COUNT
};
@@ -369,6 +398,10 @@ void acpi_numa_arch_fixup(void);
extern int acpi_mp_config;
+extern u32 pci_mmcfg_base_addr;
+
+extern int sbf_port ;
+
#else /*!CONFIG_ACPI_BOOT*/
#define acpi_mp_config 0
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e4aa5cfac38c..982c2ad23677 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -369,9 +369,12 @@ struct request_queue
#define QUEUE_FLAG_READFULL 3 /* write queue has been filled */
#define QUEUE_FLAG_WRITEFULL 4 /* read queue has been filled */
#define QUEUE_FLAG_DEAD 5 /* queue being torn down */
+#define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */
#define blk_queue_plugged(q) !list_empty(&(q)->plug_list)
#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
+#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
+
#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
#define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index b287477fe206..0fbfb6152d20 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -45,7 +45,7 @@ typedef struct {
extern int cp_compat_stat(struct kstat *, struct compat_stat *);
extern int get_compat_timespec(struct timespec *, const struct compat_timespec *);
-extern int put_compat_timespec(struct timespec *, const struct compat_timespec *);
+extern int put_compat_timespec(const struct timespec *, struct compat_timespec *);
struct compat_iovec {
compat_uptr_t iov_base;
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index 3c2fb5fae259..bfb63a040091 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -122,7 +122,6 @@ COMPATIBLE_IOCTL(STOP_ARRAY)
COMPATIBLE_IOCTL(STOP_ARRAY_RO)
COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
/* DM */
-#ifdef CONFIG_DM_IOCTL_V4
COMPATIBLE_IOCTL(DM_VERSION)
COMPATIBLE_IOCTL(DM_LIST_DEVICES)
COMPATIBLE_IOCTL(DM_DEV_CREATE)
@@ -135,19 +134,6 @@ COMPATIBLE_IOCTL(DM_TABLE_LOAD)
COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
COMPATIBLE_IOCTL(DM_TABLE_DEPS)
COMPATIBLE_IOCTL(DM_TABLE_STATUS)
-#else
-COMPATIBLE_IOCTL(DM_VERSION)
-COMPATIBLE_IOCTL(DM_REMOVE_ALL)
-COMPATIBLE_IOCTL(DM_DEV_CREATE)
-COMPATIBLE_IOCTL(DM_DEV_REMOVE)
-COMPATIBLE_IOCTL(DM_DEV_RELOAD)
-COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
-COMPATIBLE_IOCTL(DM_DEV_RENAME)
-COMPATIBLE_IOCTL(DM_DEV_DEPS)
-COMPATIBLE_IOCTL(DM_DEV_STATUS)
-COMPATIBLE_IOCTL(DM_TARGET_STATUS)
-COMPATIBLE_IOCTL(DM_TARGET_WAIT)
-#endif
/* Big K */
COMPATIBLE_IOCTL(PIO_FONT)
COMPATIBLE_IOCTL(GIO_FONT)
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 5ecc291dc138..83a37dc0ec3f 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -21,6 +21,8 @@
#include <linux/sysdev.h>
#include <linux/node.h>
+#include <linux/compiler.h>
+#include <linux/cpumask.h>
#include <asm/semaphore.h>
struct cpu {
@@ -56,9 +58,20 @@ extern struct sysdev_class cpu_sysdev_class;
extern struct semaphore cpucontrol;
#define lock_cpu_hotplug() down(&cpucontrol)
#define unlock_cpu_hotplug() up(&cpucontrol)
+#define lock_cpu_hotplug_interruptible() down_interruptible(&cpucontrol)
+#define hotcpu_notifier(fn, pri) { \
+ static struct notifier_block fn##_nb = { fn, pri }; \
+ register_cpu_notifier(&fn##_nb); \
+}
+#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
#else
#define lock_cpu_hotplug() do { } while (0)
#define unlock_cpu_hotplug() do { } while (0)
+#define lock_cpu_hotplug_interruptible() 0
+#define hotcpu_notifier(fn, pri)
+
+/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
+#define cpu_is_offline(cpu) 0
#endif
#endif /* _LINUX_CPU_H_ */
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 5731bdb3c7d8..090c3f2dc6ec 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -12,6 +12,7 @@ extern cpumask_t cpu_online_map;
extern cpumask_t cpu_possible_map;
#define num_online_cpus() cpus_weight(cpu_online_map)
+#define num_possible_cpus() cpus_weight(cpu_possible_map)
#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
#define cpu_possible(cpu) cpu_isset(cpu, cpu_possible_map)
@@ -24,7 +25,9 @@ extern cpumask_t cpu_possible_map;
#define for_each_online_cpu(cpu) for_each_cpu_mask(cpu, cpu_online_map)
#else
#define cpu_online_map cpumask_of_cpu(0)
+#define cpu_possible_map cpumask_of_cpu(0)
#define num_online_cpus() 1
+#define num_possible_cpus() 1
#define cpu_online(cpu) ({ BUG_ON((cpu) != 0); 1; })
#define cpu_possible(cpu) ({ BUG_ON((cpu) != 0); 1; })
diff --git a/include/linux/dm-ioctl-v1.h b/include/linux/dm-ioctl-v1.h
deleted file mode 100644
index 8a20b91c0e45..000000000000
--- a/include/linux/dm-ioctl-v1.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) 2001 Sistina Software (UK) Limited.
- *
- * This file is released under the LGPL.
- */
-
-#ifndef _LINUX_DM_IOCTL_V1_H
-#define _LINUX_DM_IOCTL_V1_H
-
-#include <linux/types.h>
-
-#define DM_DIR "mapper" /* Slashes not supported */
-#define DM_MAX_TYPE_NAME 16
-#define DM_NAME_LEN 128
-#define DM_UUID_LEN 129
-
-/*
- * Implements a traditional ioctl interface to the device mapper.
- */
-
-/*
- * All ioctl arguments consist of a single chunk of memory, with
- * this structure at the start. If a uuid is specified any
- * lookup (eg. for a DM_INFO) will be done on that, *not* the
- * name.
- */
-struct dm_ioctl {
- /*
- * The version number is made up of three parts:
- * major - no backward or forward compatibility,
- * minor - only backwards compatible,
- * patch - both backwards and forwards compatible.
- *
- * All clients of the ioctl interface should fill in the
- * version number of the interface that they were
- * compiled with.
- *
- * All recognised ioctl commands (ie. those that don't
- * return -ENOTTY) fill out this field, even if the
- * command failed.
- */
- uint32_t version[3]; /* in/out */
- uint32_t data_size; /* total size of data passed in
- * including this struct */
-
- uint32_t data_start; /* offset to start of data
- * relative to start of this struct */
-
- uint32_t target_count; /* in/out */
- uint32_t open_count; /* out */
- uint32_t flags; /* in/out */
-
- __kernel_old_dev_t dev; /* in/out */
-
- char name[DM_NAME_LEN]; /* device name */
- char uuid[DM_UUID_LEN]; /* unique identifier for
- * the block device */
-};
-
-/*
- * Used to specify tables. These structures appear after the
- * dm_ioctl.
- */
-struct dm_target_spec {
- int32_t status; /* used when reading from kernel only */
- uint64_t sector_start;
- uint32_t length;
-
- /*
- * Offset in bytes (from the start of this struct) to
- * next target_spec.
- */
- uint32_t next;
-
- char target_type[DM_MAX_TYPE_NAME];
-
- /*
- * Parameter string starts immediately after this object.
- * Be careful to add padding after string to ensure correct
- * alignment of subsequent dm_target_spec.
- */
-};
-
-/*
- * Used to retrieve the target dependencies.
- */
-struct dm_target_deps {
- uint32_t count;
-
- __kernel_old_dev_t dev[0]; /* out */
-};
-
-/*
- * If you change this make sure you make the corresponding change
- * to dm-ioctl.c:lookup_ioctl()
- */
-enum {
- /* Top level cmds */
- DM_VERSION_CMD = 0,
- DM_REMOVE_ALL_CMD,
-
- /* device level cmds */
- DM_DEV_CREATE_CMD,
- DM_DEV_REMOVE_CMD,
- DM_DEV_RELOAD_CMD,
- DM_DEV_RENAME_CMD,
- DM_DEV_SUSPEND_CMD,
- DM_DEV_DEPS_CMD,
- DM_DEV_STATUS_CMD,
-
- /* target level cmds */
- DM_TARGET_STATUS_CMD,
- DM_TARGET_WAIT_CMD
-};
-
-#define DM_IOCTL 0xfd
-
-#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
-#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
-
-#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
-#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
-#define DM_DEV_RELOAD _IOWR(DM_IOCTL, DM_DEV_RELOAD_CMD, struct dm_ioctl)
-#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
-#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
-#define DM_DEV_DEPS _IOWR(DM_IOCTL, DM_DEV_DEPS_CMD, struct dm_ioctl)
-#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
-
-#define DM_TARGET_STATUS _IOWR(DM_IOCTL, DM_TARGET_STATUS_CMD, struct dm_ioctl)
-#define DM_TARGET_WAIT _IOWR(DM_IOCTL, DM_TARGET_WAIT_CMD, struct dm_ioctl)
-
-#define DM_VERSION_MAJOR 1
-#define DM_VERSION_MINOR 0
-#define DM_VERSION_PATCHLEVEL 6
-#define DM_VERSION_EXTRA "-ioctl (2002-10-15)"
-
-/* Status bits */
-#define DM_READONLY_FLAG 0x00000001
-#define DM_SUSPEND_FLAG 0x00000002
-#define DM_EXISTS_FLAG 0x00000004
-#define DM_PERSISTENT_DEV_FLAG 0x00000008
-
-/*
- * Flag passed into ioctl STATUS command to get table information
- * rather than current status.
- */
-#define DM_STATUS_TABLE_FLAG 0x00000010
-
-#endif /* _LINUX_DM_IOCTL_H */
diff --git a/include/linux/dm-ioctl-v4.h b/include/linux/dm-ioctl-v4.h
deleted file mode 100644
index 74a8d14b885d..000000000000
--- a/include/linux/dm-ioctl-v4.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
- *
- * This file is released under the LGPL.
- */
-
-#ifndef _LINUX_DM_IOCTL_V4_H
-#define _LINUX_DM_IOCTL_V4_H
-
-#include <linux/types.h>
-
-#define DM_DIR "mapper" /* Slashes not supported */
-#define DM_MAX_TYPE_NAME 16
-#define DM_NAME_LEN 128
-#define DM_UUID_LEN 129
-
-/*
- * A traditional ioctl interface for the device mapper.
- *
- * Each device can have two tables associated with it, an
- * 'active' table which is the one currently used by io passing
- * through the device, and an 'inactive' one which is a table
- * that is being prepared as a replacement for the 'active' one.
- *
- * DM_VERSION:
- * Just get the version information for the ioctl interface.
- *
- * DM_REMOVE_ALL:
- * Remove all dm devices, destroy all tables. Only really used
- * for debug.
- *
- * DM_LIST_DEVICES:
- * Get a list of all the dm device names.
- *
- * DM_DEV_CREATE:
- * Create a new device, neither the 'active' or 'inactive' table
- * slots will be filled. The device will be in suspended state
- * after creation, however any io to the device will get errored
- * since it will be out-of-bounds.
- *
- * DM_DEV_REMOVE:
- * Remove a device, destroy any tables.
- *
- * DM_DEV_RENAME:
- * Rename a device.
- *
- * DM_SUSPEND:
- * This performs both suspend and resume, depending which flag is
- * passed in.
- * Suspend: This command will not return until all pending io to
- * the device has completed. Further io will be deferred until
- * the device is resumed.
- * Resume: It is no longer an error to issue this command on an
- * unsuspended device. If a table is present in the 'inactive'
- * slot, it will be moved to the active slot, then the old table
- * from the active slot will be _destroyed_. Finally the device
- * is resumed.
- *
- * DM_DEV_STATUS:
- * Retrieves the status for the table in the 'active' slot.
- *
- * DM_DEV_WAIT:
- * Wait for a significant event to occur to the device. This
- * could either be caused by an event triggered by one of the
- * targets of the table in the 'active' slot, or a table change.
- *
- * DM_TABLE_LOAD:
- * Load a table into the 'inactive' slot for the device. The
- * device does _not_ need to be suspended prior to this command.
- *
- * DM_TABLE_CLEAR:
- * Destroy any table in the 'inactive' slot (ie. abort).
- *
- * DM_TABLE_DEPS:
- * Return a set of device dependencies for the 'active' table.
- *
- * DM_TABLE_STATUS:
- * Return the targets status for the 'active' table.
- */
-
-/*
- * All ioctl arguments consist of a single chunk of memory, with
- * this structure at the start. If a uuid is specified any
- * lookup (eg. for a DM_INFO) will be done on that, *not* the
- * name.
- */
-struct dm_ioctl {
- /*
- * The version number is made up of three parts:
- * major - no backward or forward compatibility,
- * minor - only backwards compatible,
- * patch - both backwards and forwards compatible.
- *
- * All clients of the ioctl interface should fill in the
- * version number of the interface that they were
- * compiled with.
- *
- * All recognised ioctl commands (ie. those that don't
- * return -ENOTTY) fill out this field, even if the
- * command failed.
- */
- uint32_t version[3]; /* in/out */
- uint32_t data_size; /* total size of data passed in
- * including this struct */
-
- uint32_t data_start; /* offset to start of data
- * relative to start of this struct */
-
- uint32_t target_count; /* in/out */
- int32_t open_count; /* out */
- uint32_t flags; /* in/out */
- uint32_t event_nr; /* in/out */
- uint32_t padding;
-
- uint64_t dev; /* in/out */
-
- char name[DM_NAME_LEN]; /* device name */
- char uuid[DM_UUID_LEN]; /* unique identifier for
- * the block device */
-};
-
-/*
- * Used to specify tables. These structures appear after the
- * dm_ioctl.
- */
-struct dm_target_spec {
- uint64_t sector_start;
- uint64_t length;
- int32_t status; /* used when reading from kernel only */
-
- /*
- * Offset in bytes (from the start of this struct) to
- * next target_spec.
- */
- uint32_t next;
-
- char target_type[DM_MAX_TYPE_NAME];
-
- /*
- * Parameter string starts immediately after this object.
- * Be careful to add padding after string to ensure correct
- * alignment of subsequent dm_target_spec.
- */
-};
-
-/*
- * Used to retrieve the target dependencies.
- */
-struct dm_target_deps {
- uint32_t count; /* Array size */
- uint32_t padding; /* unused */
- uint64_t dev[0]; /* out */
-};
-
-/*
- * Used to get a list of all dm devices.
- */
-struct dm_name_list {
- uint64_t dev;
- uint32_t next; /* offset to the next record from
- the _start_ of this */
- char name[0];
-};
-
-/*
- * If you change this make sure you make the corresponding change
- * to dm-ioctl.c:lookup_ioctl()
- */
-enum {
- /* Top level cmds */
- DM_VERSION_CMD = 0,
- DM_REMOVE_ALL_CMD,
- DM_LIST_DEVICES_CMD,
-
- /* device level cmds */
- DM_DEV_CREATE_CMD,
- DM_DEV_REMOVE_CMD,
- DM_DEV_RENAME_CMD,
- DM_DEV_SUSPEND_CMD,
- DM_DEV_STATUS_CMD,
- DM_DEV_WAIT_CMD,
-
- /* Table level cmds */
- DM_TABLE_LOAD_CMD,
- DM_TABLE_CLEAR_CMD,
- DM_TABLE_DEPS_CMD,
- DM_TABLE_STATUS_CMD,
-};
-
-#define DM_IOCTL 0xfd
-
-#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
-#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
-#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
-
-#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
-#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
-#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
-#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
-#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
-#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
-
-#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
-#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
-#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
-#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
-
-#define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 0
-#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2003-06-04)"
-
-/* Status bits */
-#define DM_READONLY_FLAG (1 << 0) /* In/Out */
-#define DM_SUSPEND_FLAG (1 << 1) /* In/Out */
-#define DM_PERSISTENT_DEV_FLAG (1 << 3) /* In */
-
-/*
- * Flag passed into ioctl STATUS command to get table information
- * rather than current status.
- */
-#define DM_STATUS_TABLE_FLAG (1 << 4) /* In */
-
-/*
- * Flags that indicate whether a table is present in either of
- * the two table slots that a device has.
- */
-#define DM_ACTIVE_PRESENT_FLAG (1 << 5) /* Out */
-#define DM_INACTIVE_PRESENT_FLAG (1 << 6) /* Out */
-
-/*
- * Indicates that the buffer passed in wasn't big enough for the
- * results.
- */
-#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
-
-#endif /* _LINUX_DM_IOCTL_H */
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index dddbfd9c3cf7..74a8d14b885d 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -1,18 +1,237 @@
/*
- * Copyright (C) 2003 Sistina Software (UK) Limited.
+ * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
*
* This file is released under the LGPL.
*/
-#ifndef _LINUX_DM_IOCTL_H
-#define _LINUX_DM_IOCTL_H
+#ifndef _LINUX_DM_IOCTL_V4_H
+#define _LINUX_DM_IOCTL_V4_H
-#include <linux/config.h>
+#include <linux/types.h>
-#ifdef CONFIG_DM_IOCTL_V4
-#include "dm-ioctl-v4.h"
-#else
-#include "dm-ioctl-v1.h"
-#endif
+#define DM_DIR "mapper" /* Slashes not supported */
+#define DM_MAX_TYPE_NAME 16
+#define DM_NAME_LEN 128
+#define DM_UUID_LEN 129
-#endif
+/*
+ * A traditional ioctl interface for the device mapper.
+ *
+ * Each device can have two tables associated with it, an
+ * 'active' table which is the one currently used by io passing
+ * through the device, and an 'inactive' one which is a table
+ * that is being prepared as a replacement for the 'active' one.
+ *
+ * DM_VERSION:
+ * Just get the version information for the ioctl interface.
+ *
+ * DM_REMOVE_ALL:
+ * Remove all dm devices, destroy all tables. Only really used
+ * for debug.
+ *
+ * DM_LIST_DEVICES:
+ * Get a list of all the dm device names.
+ *
+ * DM_DEV_CREATE:
+ * Create a new device, neither the 'active' or 'inactive' table
+ * slots will be filled. The device will be in suspended state
+ * after creation, however any io to the device will get errored
+ * since it will be out-of-bounds.
+ *
+ * DM_DEV_REMOVE:
+ * Remove a device, destroy any tables.
+ *
+ * DM_DEV_RENAME:
+ * Rename a device.
+ *
+ * DM_SUSPEND:
+ * This performs both suspend and resume, depending which flag is
+ * passed in.
+ * Suspend: This command will not return until all pending io to
+ * the device has completed. Further io will be deferred until
+ * the device is resumed.
+ * Resume: It is no longer an error to issue this command on an
+ * unsuspended device. If a table is present in the 'inactive'
+ * slot, it will be moved to the active slot, then the old table
+ * from the active slot will be _destroyed_. Finally the device
+ * is resumed.
+ *
+ * DM_DEV_STATUS:
+ * Retrieves the status for the table in the 'active' slot.
+ *
+ * DM_DEV_WAIT:
+ * Wait for a significant event to occur to the device. This
+ * could either be caused by an event triggered by one of the
+ * targets of the table in the 'active' slot, or a table change.
+ *
+ * DM_TABLE_LOAD:
+ * Load a table into the 'inactive' slot for the device. The
+ * device does _not_ need to be suspended prior to this command.
+ *
+ * DM_TABLE_CLEAR:
+ * Destroy any table in the 'inactive' slot (ie. abort).
+ *
+ * DM_TABLE_DEPS:
+ * Return a set of device dependencies for the 'active' table.
+ *
+ * DM_TABLE_STATUS:
+ * Return the targets status for the 'active' table.
+ */
+
+/*
+ * All ioctl arguments consist of a single chunk of memory, with
+ * this structure at the start. If a uuid is specified any
+ * lookup (eg. for a DM_INFO) will be done on that, *not* the
+ * name.
+ */
+struct dm_ioctl {
+ /*
+ * The version number is made up of three parts:
+ * major - no backward or forward compatibility,
+ * minor - only backwards compatible,
+ * patch - both backwards and forwards compatible.
+ *
+ * All clients of the ioctl interface should fill in the
+ * version number of the interface that they were
+ * compiled with.
+ *
+ * All recognised ioctl commands (ie. those that don't
+ * return -ENOTTY) fill out this field, even if the
+ * command failed.
+ */
+ uint32_t version[3]; /* in/out */
+ uint32_t data_size; /* total size of data passed in
+ * including this struct */
+
+ uint32_t data_start; /* offset to start of data
+ * relative to start of this struct */
+
+ uint32_t target_count; /* in/out */
+ int32_t open_count; /* out */
+ uint32_t flags; /* in/out */
+ uint32_t event_nr; /* in/out */
+ uint32_t padding;
+
+ uint64_t dev; /* in/out */
+
+ char name[DM_NAME_LEN]; /* device name */
+ char uuid[DM_UUID_LEN]; /* unique identifier for
+ * the block device */
+};
+
+/*
+ * Used to specify tables. These structures appear after the
+ * dm_ioctl.
+ */
+struct dm_target_spec {
+ uint64_t sector_start;
+ uint64_t length;
+ int32_t status; /* used when reading from kernel only */
+
+ /*
+ * Offset in bytes (from the start of this struct) to
+ * next target_spec.
+ */
+ uint32_t next;
+
+ char target_type[DM_MAX_TYPE_NAME];
+
+ /*
+ * Parameter string starts immediately after this object.
+ * Be careful to add padding after string to ensure correct
+ * alignment of subsequent dm_target_spec.
+ */
+};
+
+/*
+ * Used to retrieve the target dependencies.
+ */
+struct dm_target_deps {
+ uint32_t count; /* Array size */
+ uint32_t padding; /* unused */
+ uint64_t dev[0]; /* out */
+};
+
+/*
+ * Used to get a list of all dm devices.
+ */
+struct dm_name_list {
+ uint64_t dev;
+ uint32_t next; /* offset to the next record from
+ the _start_ of this */
+ char name[0];
+};
+
+/*
+ * If you change this make sure you make the corresponding change
+ * to dm-ioctl.c:lookup_ioctl()
+ */
+enum {
+ /* Top level cmds */
+ DM_VERSION_CMD = 0,
+ DM_REMOVE_ALL_CMD,
+ DM_LIST_DEVICES_CMD,
+
+ /* device level cmds */
+ DM_DEV_CREATE_CMD,
+ DM_DEV_REMOVE_CMD,
+ DM_DEV_RENAME_CMD,
+ DM_DEV_SUSPEND_CMD,
+ DM_DEV_STATUS_CMD,
+ DM_DEV_WAIT_CMD,
+
+ /* Table level cmds */
+ DM_TABLE_LOAD_CMD,
+ DM_TABLE_CLEAR_CMD,
+ DM_TABLE_DEPS_CMD,
+ DM_TABLE_STATUS_CMD,
+};
+
+#define DM_IOCTL 0xfd
+
+#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
+#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
+#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
+
+#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
+#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
+#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
+#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
+#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
+#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
+
+#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
+#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
+#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
+#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 0
+#define DM_VERSION_PATCHLEVEL 0
+#define DM_VERSION_EXTRA "-ioctl (2003-06-04)"
+
+/* Status bits */
+#define DM_READONLY_FLAG (1 << 0) /* In/Out */
+#define DM_SUSPEND_FLAG (1 << 1) /* In/Out */
+#define DM_PERSISTENT_DEV_FLAG (1 << 3) /* In */
+
+/*
+ * Flag passed into ioctl STATUS command to get table information
+ * rather than current status.
+ */
+#define DM_STATUS_TABLE_FLAG (1 << 4) /* In */
+
+/*
+ * Flags that indicate whether a table is present in either of
+ * the two table slots that a device has.
+ */
+#define DM_ACTIVE_PRESENT_FLAG (1 << 5) /* Out */
+#define DM_INACTIVE_PRESENT_FLAG (1 << 6) /* Out */
+
+/*
+ * Indicates that the buffer passed in wasn't big enough for the
+ * results.
+ */
+#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
+
+#endif /* _LINUX_DM_IOCTL_H */
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h
index cd4eb5ac5a9b..2f1f141c362e 100644
--- a/include/linux/i2o-dev.h
+++ b/include/linux/i2o-dev.h
@@ -182,7 +182,7 @@ typedef struct _i2o_hrt_entry
{
u32 adapter_id;
u32 parent_tid:12;
- u32 tate:4;
+ u32 state:4;
u32 bus_num:8;
u32 bus_type:8;
union
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index c4a46f2f7893..a59392a3c47d 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -544,6 +544,25 @@ extern int i2o_delete_controller(struct i2o_controller *);
#define I2O_DSC_DEVICE_BUSY 0x001B
#define I2O_DSC_DEVICE_NOT_AVAILABLE 0x001C
+/* DetailedStatusCode defines for Block Storage Operation: Table 6-7 Detailed
+ Status Codes.*/
+
+#define I2O_BSA_DSC_SUCCESS 0x0000
+#define I2O_BSA_DSC_MEDIA_ERROR 0x0001
+#define I2O_BSA_DSC_ACCESS_ERROR 0x0002
+#define I2O_BSA_DSC_DEVICE_FAILURE 0x0003
+#define I2O_BSA_DSC_DEVICE_NOT_READY 0x0004
+#define I2O_BSA_DSC_MEDIA_NOT_PRESENT 0x0005
+#define I2O_BSA_DSC_MEDIA_LOCKED 0x0006
+#define I2O_BSA_DSC_MEDIA_FAILURE 0x0007
+#define I2O_BSA_DSC_PROTOCOL_FAILURE 0x0008
+#define I2O_BSA_DSC_BUS_FAILURE 0x0009
+#define I2O_BSA_DSC_ACCESS_VIOLATION 0x000A
+#define I2O_BSA_DSC_WRITE_PROTECTED 0x000B
+#define I2O_BSA_DSC_DEVICE_RESET 0x000C
+#define I2O_BSA_DSC_VOLUME_CHANGED 0x000D
+#define I2O_BSA_DSC_TIMEOUT 0x000E
+
/* FailureStatusCodes, Table 3-3 Message Failure Codes */
#define I2O_FSC_TRANSPORT_SERVICE_SUSPENDED 0x81
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 0e13d9677b8f..e11e79199357 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -168,14 +168,14 @@ extern void dump_stack(void);
* "unnecessary" pointer comparison.
*/
#define min(x,y) ({ \
- const typeof(x) _x = (x); \
- const typeof(y) _y = (y); \
+ typeof(x) _x = (x); \
+ typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x < _y ? _x : _y; })
#define max(x,y) ({ \
- const typeof(x) _x = (x); \
- const typeof(y) _y = (y); \
+ typeof(x) _x = (x); \
+ typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x > _y ? _x : _y; })
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index f85642639950..09955c0ce848 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -37,6 +37,7 @@
#ifndef FASTCALL
#define FASTCALL(x) x
+#define fastcall
#endif
#endif
diff --git a/include/linux/mm.h b/include/linux/mm.h
index d9c541550efd..da8873610af3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -530,7 +530,8 @@ extern void si_meminfo_node(struct sysinfo *val, int nid);
/* mmap.c */
extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
-extern void build_mmap_rb(struct mm_struct *);
+extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
+ struct rb_node **, struct rb_node *);
extern void exit_mmap(struct mm_struct *);
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index bc4f5988251c..de4d397865ce 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -88,6 +88,20 @@ void nf_bridge_save_header(struct sk_buff *skb)
memcpy(skb->nf_bridge->data, skb->data - header_size, header_size);
}
+/* This is called by the IP fragmenting code and it ensures there is
+ * enough room for the encapsulating header (if there is one). */
+static inline
+int nf_bridge_pad(struct sk_buff *skb)
+{
+ if (skb->protocol == __constant_htons(ETH_P_IP))
+ return 0;
+ if (skb->nf_bridge) {
+ if (skb->protocol == __constant_htons(ETH_P_8021Q))
+ return 4;
+ }
+ return 0;
+}
+
struct bridge_skb_cb {
union {
__u32 ipv4;
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 06281634b083..bb842ea41033 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -66,8 +66,9 @@ struct nfs_fhbase_old {
* 0 - 4 byte device id (ms-2-bytes major, ls-2-bytes minor), 4byte inode number
* NOTE: we cannot use the kdev_t device id value, because kdev_t.h
* says we mustn't. We must break it up and reassemble.
- * Possible future encodings:
* 1 - 4 byte user specified identifier
+ * 2 - 4 byte major, 4 byte minor, 4 byte inode number - DEPRECATED
+ * 3 - 4 byte device id, encoded for user-space, 4 byte inode number
*
* The fileid_type identified how the file within the filesystem is encoded.
* This is (will be) passed to, and set by, the underlying filesystem if it supports
@@ -114,6 +115,7 @@ struct knfsd_fh {
#define fh_auth_type fh_base.fh_new.fb_auth_type
#define fh_fileid_type fh_base.fh_new.fb_fileid_type
#define fh_auth fh_base.fh_new.fb_auth
+#define fh_fsid fh_base.fh_new.fb_auth
#ifdef __KERNEL__
@@ -183,6 +185,23 @@ static inline void mk_fsid_v2(u32 *fsidv, dev_t dev, ino_t ino)
fsidv[2] = ino_t_to_u32(ino);
}
+static inline void mk_fsid_v3(u32 *fsidv, dev_t dev, ino_t ino)
+{
+ fsidv[0] = new_encode_dev(dev);
+ fsidv[1] = ino_t_to_u32(ino);
+}
+
+static inline int key_len(int type)
+{
+ switch(type) {
+ case 0: return 8;
+ case 1: return 4;
+ case 2: return 12;
+ case 3: return 8;
+ default: return 0;
+ }
+}
+
/*
* Shorthand for dprintk()'s
*/
diff --git a/include/linux/parport.h b/include/linux/parport.h
index eff925bb5da6..ab46beb20f1f 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -294,7 +294,7 @@ struct parport {
struct pardevice *waithead;
struct pardevice *waittail;
- struct parport *next;
+ struct list_head list;
unsigned int flags;
void *sysctl_table;
@@ -313,6 +313,7 @@ struct parport {
atomic_t ref_count;
struct list_head full_list;
+ struct parport *slaves[3];
};
#define DEFAULT_SPIN_TIME 500 /* us */
@@ -321,7 +322,7 @@ struct parport_driver {
const char *name;
void (*attach) (struct parport *);
void (*detach) (struct parport *);
- struct parport_driver *next;
+ struct list_head list;
};
/* parport_register_port registers a new parallel port at the given
@@ -339,12 +340,7 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
void parport_announce_port (struct parport *port);
/* Unregister a port. */
-extern void parport_unregister_port(struct parport *port);
-
-/* parport_enumerate returns a pointer to the linked list of all the
- ports in this machine. DON'T USE THIS. Use
- parport_register_driver instead. */
-struct parport *parport_enumerate(void);
+extern void parport_remove_port(struct parport *port);
/* Register a new high-level driver. */
extern int parport_register_driver (struct parport_driver *);
@@ -451,9 +447,6 @@ static __inline__ int parport_yield_blocking(struct pardevice *dev)
#define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */
-extern int parport_parse_irqs(int, const char *[], int irqval[]);
-extern int parport_parse_dmas(int, const char *[], int dmaval[]);
-
/* IEEE1284 functions */
extern void parport_ieee1284_interrupt (int, void *, struct pt_regs *);
extern int parport_negotiate (struct parport *, int mode);
@@ -538,8 +531,6 @@ extern int parport_proc_register(struct parport *pp);
extern int parport_proc_unregister(struct parport *pp);
extern int parport_device_proc_register(struct pardevice *device);
extern int parport_device_proc_unregister(struct pardevice *device);
-extern int parport_default_proc_register(void);
-extern int parport_default_proc_unregister(void);
/* If PC hardware is the only type supported, we can optimise a bit. */
#if (defined(CONFIG_PARPORT_PC) || defined(CONFIG_PARPORT_PC_MODULE)) && !(defined(CONFIG_PARPORT_ARC) || defined(CONFIG_PARPORT_ARC_MODULE)) && !(defined(CONFIG_PARPORT_AMIGA) || defined(CONFIG_PARPORT_AMIGA_MODULE)) && !(defined(CONFIG_PARPORT_MFC3) || defined(CONFIG_PARPORT_MFC3_MODULE)) && !(defined(CONFIG_PARPORT_ATARI) || defined(CONFIG_PARPORT_ATARI_MODULE)) && !(defined(CONFIG_USB_USS720) || defined(CONFIG_USB_USS720_MODULE)) && !(defined(CONFIG_PARPORT_SUNBPP) || defined(CONFIG_PARPORT_SUNBPP_MODULE)) && !defined(CONFIG_PARPORT_OTHER)
diff --git a/include/linux/parport_pc.h b/include/linux/parport_pc.h
index 2334281e3af6..2b5ad1bf19a2 100644
--- a/include/linux/parport_pc.h
+++ b/include/linux/parport_pc.h
@@ -39,6 +39,8 @@ struct parport_pc_private {
char *dma_buf;
dma_addr_t dma_handle;
struct pci_dev *dev;
+ struct list_head list;
+ struct parport *port;
};
static __inline__ void parport_pc_write_data(struct parport *p, unsigned char d)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index cea9e947a1ea..5618a68518a8 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -199,6 +199,7 @@
#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */
#define PCI_CAP_ID_PCIX 0x07 /* PCI-X */
+#define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */
#define PCI_CAP_ID_EXP 0x10 /* PCI Express */
#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */
#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 04e8ae630629..c769c57bf031 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1808,6 +1808,7 @@
#define PCI_VENDOR_ID_AFAVLAB 0x14db
#define PCI_DEVICE_ID_AFAVLAB_P028 0x2180
+#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182
#define PCI_VENDOR_ID_BROADCOM 0x14e4
#define PCI_DEVICE_ID_TIGON3_5700 0x1644
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9dd6606bb9cc..72d6edfe401a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -602,7 +602,7 @@ extern void do_timer(struct pt_regs *);
extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state));
extern int FASTCALL(wake_up_process(struct task_struct * tsk));
#ifdef CONFIG_SMP
- extern void FASTCALL(kick_process(struct task_struct * tsk));
+ extern void kick_process(struct task_struct *tsk);
#else
static inline void kick_process(struct task_struct *tsk) { }
#endif
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index da998dc9389d..f7e3b9b6264d 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -84,6 +84,7 @@
#include <linux/interrupt.h>
#include <linux/circ_buf.h>
#include <linux/spinlock.h>
+#include <linux/sched.h>
struct uart_port;
struct uart_info;
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 9f7feff3ee9e..312ec58a4025 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -30,7 +30,7 @@ extern void smp_send_stop(void);
/*
* sends a 'reschedule' event to another CPU:
*/
-extern void FASTCALL(smp_send_reschedule(int cpu));
+extern void smp_send_reschedule(int cpu);
/*
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
new file mode 100644
index 000000000000..6f43cb53f21b
--- /dev/null
+++ b/include/linux/stop_machine.h
@@ -0,0 +1,52 @@
+#ifndef _LINUX_STOP_MACHINE
+#define _LINUX_STOP_MACHINE
+/* "Bogolock": stop the entire machine, disable interrupts. This is a
+ very heavy lock, which is equivalent to grabbing every spinlock
+ (and more). So the "read" side to such a lock is anything which
+ diables preeempt. */
+#include <linux/config.h>
+#include <linux/cpu.h>
+#include <asm/system.h>
+
+#ifdef CONFIG_SMP
+/**
+ * stop_machine_run: freeze the machine on all CPUs and run this function
+ * @fn: the function to run
+ * @data: the data ptr for the @fn()
+ * @cpu: the cpu to run @fn() on (or any, if @cpu == NR_CPUS.
+ *
+ * Description: This causes a thread to be scheduled on every other cpu,
+ * each of which disables interrupts, and finally interrupts are disabled
+ * on the current CPU. The result is that noone is holding a spinlock
+ * or inside any other preempt-disabled region when @fn() runs.
+ *
+ * This can be thought of as a very heavy write lock, equivalent to
+ * grabbing every spinlock in the kernel. */
+int stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu);
+
+/**
+ * __stop_machine_run: freeze the machine on all CPUs and run this function
+ * @fn: the function to run
+ * @data: the data ptr for the @fn
+ * @cpu: the cpu to run @fn on (or any, if @cpu == NR_CPUS.
+ *
+ * Description: This is a special version of the above, which returns the
+ * thread which has run @fn(): kthread_stop will return the return value
+ * of @fn(). Used by hotplug cpu.
+ */
+struct task_struct *__stop_machine_run(int (*fn)(void *), void *data,
+ unsigned int cpu);
+
+#else
+
+static inline int stop_machine_run(int (*fn)(void *), void *data,
+ unsigned int cpu)
+{
+ int ret;
+ local_irq_disable();
+ ret = fn(data);
+ local_irq_enable();
+ return ret;
+}
+#endif /* CONFIG_SMP */
+#endif /* _LINUX_STOP_MACHINE */
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 6355db655a7f..bfe9f0ffe4da 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -386,24 +386,24 @@ asmlinkage long sys_getdents64(unsigned int fd,
unsigned int count);
asmlinkage long sys_setsockopt(int fd, int level, int optname,
- char *optval, int optlen);
+ char __user *optval, int optlen);
asmlinkage long sys_getsockopt(int fd, int level, int optname,
char __user *optval, int __user *optlen);
-asmlinkage long sys_bind(int, struct sockaddr *, int);
-asmlinkage long sys_connect(int, struct sockaddr *, int);
-asmlinkage long sys_accept(int, struct sockaddr *, int *);
-asmlinkage long sys_getsockname(int, struct sockaddr *, int *);
-asmlinkage long sys_getpeername(int, struct sockaddr *, int *);
-asmlinkage long sys_send(int, void *, size_t, unsigned);
-asmlinkage long sys_sendto(int, void *, size_t, unsigned,
- struct sockaddr *, int);
+asmlinkage long sys_bind(int, struct sockaddr __user *, int);
+asmlinkage long sys_connect(int, struct sockaddr __user *, int);
+asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *);
+asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
+asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
+asmlinkage long sys_send(int, void __user *, size_t, unsigned);
+asmlinkage long sys_sendto(int, void __user *, size_t, unsigned,
+ struct sockaddr __user *, int);
asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags);
-asmlinkage long sys_recv(int, void *, size_t, unsigned);
-asmlinkage long sys_recvfrom(int, void *, size_t, unsigned,
- struct sockaddr *, int *);
+asmlinkage long sys_recv(int, void __user *, size_t, unsigned);
+asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned,
+ struct sockaddr __user *, int __user *);
asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags);
asmlinkage long sys_socket(int, int, int);
-asmlinkage long sys_socketpair(int, int, int, int [2]);
+asmlinkage long sys_socketpair(int, int, int, int __user *);
asmlinkage long sys_socketcall(int call, unsigned long __user *args);
asmlinkage long sys_listen(int, int);
asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 53c33ccddddc..dbd57168ac61 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -321,6 +321,7 @@ enum
NET_TCP_LOW_LATENCY=93,
NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
NET_TCP_WESTWOOD=95,
+ NET_IPV4_IGMP_MAX_MSF=96,
};
enum {
@@ -404,7 +405,8 @@ enum {
NET_IPV6_IP6FRAG_HIGH_THRESH=21,
NET_IPV6_IP6FRAG_LOW_THRESH=22,
NET_IPV6_IP6FRAG_TIME=23,
- NET_IPV6_IP6FRAG_SECRET_INTERVAL=24
+ NET_IPV6_IP6FRAG_SECRET_INTERVAL=24,
+ NET_IPV6_MLD_MAX_MSF=25,
};
enum {
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h
index 2a90db8d41de..635db1df656f 100644
--- a/include/linux/sysdev.h
+++ b/include/linux/sysdev.h
@@ -70,8 +70,8 @@ struct sys_device {
struct kobject kobj;
};
-extern int sys_device_register(struct sys_device *);
-extern void sys_device_unregister(struct sys_device *);
+extern int sysdev_register(struct sys_device *);
+extern void sysdev_unregister(struct sys_device *);
struct sysdev_attribute {