summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/sections.h11
-rw-r--r--include/asm-i386/apic.h3
-rw-r--r--include/asm-i386/desc.h109
-rw-r--r--include/asm-i386/mmu_context.h12
-rw-r--r--include/asm-i386/pgtable-3level.h2
-rw-r--r--include/asm-i386/processor.h9
-rw-r--r--include/asm-i386/sections.h7
-rw-r--r--include/asm-i386/smp.h15
-rw-r--r--include/asm-ppc/machdep.h8
-rw-r--r--include/asm-ppc/smp.h6
-rw-r--r--include/asm-s390/hdreg.h13
-rw-r--r--include/asm-s390/ide.h27
-rw-r--r--include/asm-s390x/hdreg.h13
-rw-r--r--include/linux/blkdev.h31
-rw-r--r--include/linux/hdreg.h488
-rw-r--r--include/linux/ide.h61
-rw-r--r--include/linux/nbd.h2
-rw-r--r--include/linux/nfs_fs.h12
-rw-r--r--include/linux/nfs_xdr.h2
-rw-r--r--include/linux/notifier.h2
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/smp.h23
-rw-r--r--include/linux/sunrpc/clnt.h1
-rw-r--r--include/linux/sunrpc/xprt.h11
24 files changed, 443 insertions, 426 deletions
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
new file mode 100644
index 000000000000..fe290e3349be
--- /dev/null
+++ b/include/asm-generic/sections.h
@@ -0,0 +1,11 @@
+#ifndef _ASM_GENERIC_SECTIONS_H_
+#define _ASM_GENERIC_SECTIONS_H_
+
+/* References to section boundaries */
+
+extern char _text, _etext;
+extern char _data, _edata;
+extern char __bss_start;
+extern char __init_begin, __init_end;
+
+#endif /* _ASM_GENERIC_SECTIONS_H_ */
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index d36b2f10f731..3947866376d1 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -76,7 +76,8 @@ extern void init_bsp_APIC (void);
extern void setup_local_APIC (void);
extern void init_apic_mappings (void);
extern void smp_local_timer_interrupt (struct pt_regs * regs);
-extern void setup_APIC_clocks (void);
+extern void setup_boot_APIC_clock (void);
+extern void setup_secondary_APIC_clock (void);
extern void setup_apic_nmi_watchdog (void);
extern inline void nmi_watchdog_tick (struct pt_regs * regs);
extern int APIC_init_uniprocessor (void);
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 197ffcc2dd2f..e1b2f75538f8 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -4,72 +4,59 @@
#include <asm/ldt.h>
/*
- * The layout of the GDT under Linux:
+ * The layout of the per-CPU GDT under Linux:
*
* 0 - null
- * 1 - not used
+ * 1 - Thread-Local Storage (TLS) segment
* 2 - kernel code segment
* 3 - kernel data segment
- * 4 - user code segment <-- new cacheline
+ * 4 - user code segment <==== new cacheline
* 5 - user data segment
- * 6 - not used
- * 7 - not used
- * 8 - APM BIOS support <-- new cacheline
+ * 6 - TSS
+ * 7 - LDT
+ * 8 - APM BIOS support <==== new cacheline
* 9 - APM BIOS support
* 10 - APM BIOS support
* 11 - APM BIOS support
- * 12 - PNPBIOS support
+ * 12 - PNPBIOS support <==== new cacheline
* 13 - PNPBIOS support
* 14 - PNPBIOS support
* 15 - PNPBIOS support
- * 16 - PNPBIOS support
+ * 16 - PNPBIOS support <==== new cacheline
* 17 - not used
* 18 - not used
* 19 - not used
+ */
+#define TLS_ENTRY 1
+#define TSS_ENTRY 6
+#define LDT_ENTRY 7
+/*
+ * The interrupt descriptor table has room for 256 idt's,
+ * the global descriptor table is dependent on the number
+ * of tasks we can have..
*
- * The TSS+LDT descriptors are spread out a bit so that every CPU
- * has an exclusive cacheline for the per-CPU TSS and LDT:
- *
- * 20 - CPU#0 TSS <-- new cacheline
- * 21 - CPU#0 LDT
- * 22 - not used
- * 23 - not used
- * 24 - CPU#1 TSS <-- new cacheline
- * 25 - CPU#1 LDT
- * 26 - not used
- * 27 - not used
- * ... NR_CPUS per-CPU TSS+LDT's if on SMP
- *
- * Entry into gdt where to find first TSS.
+ * We pad the GDT to cacheline boundary.
*/
-#define __FIRST_TSS_ENTRY 20
-#define __FIRST_LDT_ENTRY (__FIRST_TSS_ENTRY+1)
-
-#define __TSS(n) (((n)<<2) + __FIRST_TSS_ENTRY)
-#define __LDT(n) (((n)<<2) + __FIRST_LDT_ENTRY)
+#define IDT_ENTRIES 256
+#define GDT_ENTRIES 20
#ifndef __ASSEMBLY__
#include <asm/mmu.h>
-struct desc_struct {
- unsigned long a,b;
-};
+#define GDT_SIZE (GDT_ENTRIES*sizeof(struct desc_struct))
-extern struct desc_struct gdt_table[];
-extern struct desc_struct *idt, *gdt;
+extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
struct Xgt_desc_struct {
unsigned short size;
unsigned long address __attribute__((packed));
-};
+} __attribute__ ((packed));
-#define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2))
-#define gdt_descr (*(struct Xgt_desc_struct *)((char *)&gdt - 2))
+extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
-#define load_TR(n) __asm__ __volatile__("ltr %%ax"::"a" (__TSS(n)<<3))
-
-#define __load_LDT(n) __asm__ __volatile__("lldt %%ax"::"a" (__LDT(n)<<3))
+#define load_TR_desc() __asm__ __volatile__("ltr %%ax"::"a" (TSS_ENTRY<<3))
+#define load_LDT_desc() __asm__ __volatile__("lldt %%ax"::"a" (LDT_ENTRY<<3))
/*
* This is the ldt that every process will get unless we need
@@ -77,14 +64,43 @@ struct Xgt_desc_struct {
*/
extern struct desc_struct default_ldt[];
extern void set_intr_gate(unsigned int irq, void * addr);
-extern void set_ldt_desc(unsigned int n, void *addr, unsigned int size);
-extern void set_tss_desc(unsigned int n, void *addr);
+
+#define _set_tssldt_desc(n,addr,limit,type) \
+__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \
+ "movw %%ax,2(%2)\n\t" \
+ "rorl $16,%%eax\n\t" \
+ "movb %%al,4(%2)\n\t" \
+ "movb %4,5(%2)\n\t" \
+ "movb $0,6(%2)\n\t" \
+ "movb %%ah,7(%2)\n\t" \
+ "rorl $16,%%eax" \
+ : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type))
+
+static inline void set_tss_desc(unsigned int cpu, void *addr)
+{
+ _set_tssldt_desc(&cpu_gdt_table[cpu][TSS_ENTRY], (int)addr, 235, 0x89);
+}
+
+static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size)
+{
+ _set_tssldt_desc(&cpu_gdt_table[cpu][LDT_ENTRY], (int)addr, ((size << 3)-1), 0x82);
+}
+
+#define TLS_FLAGS_MASK 0x00000007
+
+#define TLS_FLAG_LIMIT_IN_PAGES 0x00000001
+#define TLS_FLAG_WRITABLE 0x00000002
+#define TLS_FLAG_CLEAR 0x00000004
+
+static inline void load_TLS_desc(struct thread_struct *t, unsigned int cpu)
+{
+ cpu_gdt_table[cpu][TLS_ENTRY] = t->tls_desc;
+}
static inline void clear_LDT(void)
{
- int cpu = smp_processor_id();
- set_ldt_desc(cpu, &default_ldt[0], 5);
- __load_LDT(cpu);
+ set_ldt_desc(smp_processor_id(), &default_ldt[0], 5);
+ load_LDT_desc();
}
/*
@@ -92,17 +108,16 @@ static inline void clear_LDT(void)
*/
static inline void load_LDT (mm_context_t *pc)
{
- int cpu = smp_processor_id();
void *segments = pc->ldt;
int count = pc->size;
- if (!count) {
+ if (likely(!count)) {
segments = &default_ldt[0];
count = 5;
}
- set_ldt_desc(cpu, segments, count);
- __load_LDT(cpu);
+ set_ldt_desc(smp_processor_id(), segments, count);
+ load_LDT_desc();
}
#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-i386/mmu_context.h b/include/asm-i386/mmu_context.h
index 417f2378659d..0da1f3a11983 100644
--- a/include/asm-i386/mmu_context.h
+++ b/include/asm-i386/mmu_context.h
@@ -17,7 +17,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
{
- if(cpu_tlbstate[cpu].state == TLBSTATE_OK)
+ if (cpu_tlbstate[cpu].state == TLBSTATE_OK)
cpu_tlbstate[cpu].state = TLBSTATE_LAZY;
}
#else
@@ -40,18 +40,18 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, str
/* Re-load page tables */
load_cr3(next->pgd);
- /* load_LDT, if either the previous or next thread
- * has a non-default LDT.
+ /*
+ * load the LDT, if the LDT is different:
*/
- if (next->context.size+prev->context.size)
+ if (unlikely(prev->context.ldt != next->context.ldt))
load_LDT(&next->context);
}
#ifdef CONFIG_SMP
else {
cpu_tlbstate[cpu].state = TLBSTATE_OK;
- if(cpu_tlbstate[cpu].active_mm != next)
+ if (cpu_tlbstate[cpu].active_mm != next)
BUG();
- if(!test_and_set_bit(cpu, &next->cpu_vm_mask)) {
+ if (!test_and_set_bit(cpu, &next->cpu_vm_mask)) {
/* We were in lazy tlb mode and leave_mm disabled
* tlb flush IPI delivery. We must reload %cr3.
*/
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h
index beb0c1bc3d30..a69e4be257fc 100644
--- a/include/asm-i386/pgtable-3level.h
+++ b/include/asm-i386/pgtable-3level.h
@@ -106,4 +106,6 @@ static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
return __pmd(((unsigned long long)page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
}
+extern struct kmem_cache_s *pae_pgd_cachep;
+
#endif /* _I386_PGTABLE_3LEVEL_H */
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index e9e980d0c93a..9d407b2c088b 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -18,6 +18,10 @@
#include <linux/config.h>
#include <linux/threads.h>
+struct desc_struct {
+ unsigned long a,b;
+};
+
/*
* Default implementation of macro that returns current
* instruction pointer ("program counter").
@@ -372,6 +376,9 @@ struct thread_struct {
unsigned long v86flags, v86mask, v86mode, saved_esp0;
/* IO permissions */
unsigned long *ts_io_bitmap;
+/* TLS info and cached descriptor */
+ unsigned int tls_base, tls_limit, tls_flags;
+ struct desc_struct tls_desc;
};
#define INIT_THREAD { \
@@ -395,7 +402,7 @@ struct thread_struct {
0,0,0,0, /* esp,ebp,esi,edi */ \
0,0,0,0,0,0, /* es,cs,ss */ \
0,0,0,0,0,0, /* ds,fs,gs */ \
- __LDT(0),0, /* ldt */ \
+ LDT_ENTRY,0, /* ldt */ \
0, INVALID_IO_BITMAP_OFFSET, /* tace, bitmap */ \
{~0, } /* ioperm */ \
}
diff --git a/include/asm-i386/sections.h b/include/asm-i386/sections.h
new file mode 100644
index 000000000000..2dcbb92918b2
--- /dev/null
+++ b/include/asm-i386/sections.h
@@ -0,0 +1,7 @@
+#ifndef _I386_SECTIONS_H
+#define _I386_SECTIONS_H
+
+/* nothing to see, move along */
+#include <asm-generic/sections.h>
+
+#endif
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 69c872158b54..6b116b38a4e2 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -79,19 +79,13 @@ extern volatile int cpu_to_logical_apicid[NR_CPUS];
extern volatile int logical_apicid_to_cpu[MAX_APICID];
/*
- * General functions that each host system must provide.
- */
-
-extern void smp_boot_cpus(void);
-extern void smp_store_cpu_info(int id); /* Store per CPU info (like the initial udelay numbers */
-
-/*
* This function is needed by all SMP systems. It must _always_ be valid
* from the initial startup. We map APIC_BASE very early in page_setup(),
* so this is correct in the x86 case.
*/
#define smp_processor_id() (current_thread_info()->cpu)
+#define cpu_possible(cpu) (phys_cpu_present_map & (1<<(cpu)))
#define cpu_online(cpu) (cpu_online_map & (1<<(cpu)))
extern inline unsigned int num_online_cpus(void)
@@ -119,6 +113,13 @@ static __inline int logical_smp_processor_id(void)
return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR));
}
+extern volatile unsigned long cpu_callout_map;
+/* We don't mark CPUs online until __cpu_up(), so we need another measure */
+static inline int num_booting_cpus(void)
+{
+ return hweight32(cpu_callout_map);
+}
+
#endif /* !__ASSEMBLY__ */
#define NO_PROC_ID 0xFF /* No processor magic marker */
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h
index f5218fdb73c2..2c32dc7aa949 100644
--- a/include/asm-ppc/machdep.h
+++ b/include/asm-ppc/machdep.h
@@ -6,6 +6,7 @@
#define _PPC_MACHDEP_H
#include <linux/config.h>
+#include <linux/init.h>
#ifdef CONFIG_APUS
#include <asm-m68k/machdep.h>
@@ -129,7 +130,14 @@ struct smp_ops_t {
int (*probe)(void);
void (*kick_cpu)(int nr);
void (*setup_cpu)(int nr);
+ void (*space_timers)(int nr);
+ void (*take_timebase)(void);
+ void (*give_timebase)(void);
};
+
+/* Poor default implementations */
+extern void __devinit smp_generic_give_timebase(void);
+extern void __devinit smp_generic_take_timebase(void);
#endif /* CONFIG_SMP */
#endif /* _PPC_MACHDEP_H */
diff --git a/include/asm-ppc/smp.h b/include/asm-ppc/smp.h
index 6c58f14684a1..f5e99d565d32 100644
--- a/include/asm-ppc/smp.h
+++ b/include/asm-ppc/smp.h
@@ -16,6 +16,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#ifdef CONFIG_SMP
@@ -31,11 +32,11 @@ struct cpuinfo_PPC {
extern struct cpuinfo_PPC cpu_data[];
extern unsigned long cpu_online_map;
+extern unsigned long cpu_possible_map;
extern unsigned long smp_proc_in_lock[];
extern volatile unsigned long cpu_callin_map[];
extern int smp_tb_synchronized;
-extern void smp_store_cpu_info(int id);
extern void smp_send_tlb_invalidate(int);
extern void smp_send_xmon_break(int cpu);
struct pt_regs;
@@ -48,6 +49,7 @@ extern void smp_local_timer_interrupt(struct pt_regs *);
#define smp_processor_id() (current_thread_info()->cpu)
#define cpu_online(cpu) (cpu_online_map & (1<<(cpu)))
+#define cpu_possible(cpu) (cpu_possible_map & (1<<(cpu)))
extern inline unsigned int num_online_cpus(void)
{
@@ -62,6 +64,8 @@ extern inline int any_online_cpu(unsigned int mask)
return -1;
}
+extern int __cpu_up(unsigned int cpu);
+
extern int smp_hw_index[];
#define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
diff --git a/include/asm-s390/hdreg.h b/include/asm-s390/hdreg.h
deleted file mode 100644
index 20061819d77a..000000000000
--- a/include/asm-s390/hdreg.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * linux/include/asm-arm/hdreg.h
- *
- * Copyright (C) 1994-1996 Linus Torvalds & authors
- */
-
-#ifndef __ASMS390_HDREG_H
-#define __ASMS390_HDREG_H
-
-typedef unsigned long ide_ioreg_t;
-
-#endif /* __ASMS390_HDREG_H */
-
diff --git a/include/asm-s390/ide.h b/include/asm-s390/ide.h
deleted file mode 100644
index 01d7765f7ef4..000000000000
--- a/include/asm-s390/ide.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * linux/include/asm-s390/ide.h
- *
- * Copyright (C) 1994-1996 Linus Torvalds & authors
- */
-
-/* s390 does not have IDE */
-
-#ifndef __ASMS390_IDE_H
-#define __ASMS390_IDE_H
-
-#ifdef __KERNEL__
-
-#ifndef MAX_HWIFS
-#define MAX_HWIFS 0
-#endif
-
-/*
- * We always use the new IDE port registering,
- * so these are fixed here.
- */
-#define ide_default_io_base(i) ((ide_ioreg_t)0)
-#define ide_default_irq(b) (0)
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASMS390_IDE_H */
diff --git a/include/asm-s390x/hdreg.h b/include/asm-s390x/hdreg.h
deleted file mode 100644
index 20061819d77a..000000000000
--- a/include/asm-s390x/hdreg.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * linux/include/asm-arm/hdreg.h
- *
- * Copyright (C) 1994-1996 Linus Torvalds & authors
- */
-
-#ifndef __ASMS390_HDREG_H
-#define __ASMS390_HDREG_H
-
-typedef unsigned long ide_ioreg_t;
-
-#endif /* __ASMS390_HDREG_H */
-
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 726492d4c45a..f83c52f82ab0 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -281,12 +281,13 @@ extern int wipe_partitions(kdev_t dev);
extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size);
extern void generic_make_request(struct bio *bio);
extern inline request_queue_t *bdev_get_queue(struct block_device *bdev);
-extern void blkdev_release_request(struct request *);
+extern void blk_put_request(struct request *);
extern void blk_attempt_remerge(request_queue_t *, struct request *);
extern void __blk_attempt_remerge(request_queue_t *, struct request *);
extern struct request *blk_get_request(request_queue_t *, int, int);
extern struct request *__blk_get_request(request_queue_t *, int);
extern void blk_put_request(struct request *);
+extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
extern void blk_plug_device(request_queue_t *);
extern int blk_remove_plug(request_queue_t *);
extern void blk_recount_segments(request_queue_t *, struct bio *);
@@ -309,20 +310,21 @@ extern int blk_init_queue(request_queue_t *, request_fn_proc *, spinlock_t *);
extern void blk_cleanup_queue(request_queue_t *);
extern void blk_queue_make_request(request_queue_t *, make_request_fn *);
extern void blk_queue_bounce_limit(request_queue_t *, u64);
-extern void blk_queue_max_sectors(request_queue_t *q, unsigned short);
-extern void blk_queue_max_phys_segments(request_queue_t *q, unsigned short);
-extern void blk_queue_max_hw_segments(request_queue_t *q, unsigned short);
-extern void blk_queue_max_segment_size(request_queue_t *q, unsigned int);
-extern void blk_queue_hardsect_size(request_queue_t *q, unsigned short);
-extern void blk_queue_segment_boundary(request_queue_t *q, unsigned long);
-extern void blk_queue_assign_lock(request_queue_t *q, spinlock_t *);
-extern void blk_queue_prep_rq(request_queue_t *q, prep_rq_fn *pfn);
+extern void blk_queue_max_sectors(request_queue_t *, unsigned short);
+extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short);
+extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short);
+extern void blk_queue_max_segment_size(request_queue_t *, unsigned int);
+extern void blk_queue_hardsect_size(request_queue_t *, unsigned short);
+extern void blk_queue_segment_boundary(request_queue_t *, unsigned long);
+extern void blk_queue_assign_lock(request_queue_t *, spinlock_t *);
+extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn);
extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *);
extern void blk_dump_rq_flags(struct request *, char *);
extern void generic_unplug_device(void *);
+
/*
* tag stuff
*/
@@ -348,15 +350,12 @@ extern int * blk_size[MAX_BLKDEV]; /* in units of 1024 bytes */
extern void drive_stat_acct(struct request *, int, int);
-extern inline void blk_clear(int major)
+static inline void blk_clear(int major)
{
blk_size[major] = NULL;
-#if 0
- blk_size_in_bytes[major] = NULL;
-#endif
}
-extern inline int queue_hardsect_size(request_queue_t *q)
+static inline int queue_hardsect_size(request_queue_t *q)
{
int retval = 512;
@@ -366,7 +365,7 @@ extern inline int queue_hardsect_size(request_queue_t *q)
return retval;
}
-extern inline int bdev_hardsect_size(struct block_device *bdev)
+static inline int bdev_hardsect_size(struct block_device *bdev)
{
return queue_hardsect_size(bdev_get_queue(bdev));
}
@@ -375,7 +374,7 @@ extern inline int bdev_hardsect_size(struct block_device *bdev)
#define blk_started_io(nsects) do { } while (0)
/* assumes size > 256 */
-extern inline unsigned int blksize_bits(unsigned int size)
+static inline unsigned int blksize_bits(unsigned int size)
{
unsigned int bits = 8;
do {
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index 6f1fd4aae99a..dcedacb849ea 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -261,17 +261,17 @@ struct hd_drive_task_hdr {
#define SECURITY_DISABLE_PASSWORD 0xBF
struct hd_geometry {
- unsigned char heads;
- unsigned char sectors;
- unsigned short cylinders;
+ u8 heads;
+ u8 sectors;
+ u16 cylinders;
unsigned long start;
};
/* BIG GEOMETRY - dying, used only by HDIO_GETGEO_BIG_RAW */
struct hd_big_geometry {
- unsigned char heads;
- unsigned char sectors;
- unsigned int cylinders;
+ u8 heads;
+ u8 sectors;
+ u32 cylinders;
unsigned long start;
};
@@ -326,249 +326,243 @@ enum {
* ide/probe.c.
*/
struct hd_driveid {
- unsigned short config; /* lots of obsolete bit flags */
- unsigned short cyls; /* Obsolete, "physical" cyls */
- unsigned short reserved2; /* reserved (word 2) */
- unsigned short heads; /* Obsolete, "physical" heads */
- unsigned short track_bytes; /* unformatted bytes per track */
- unsigned short sector_bytes; /* unformatted bytes per sector */
- unsigned short sectors; /* Obsolete, "physical" sectors per track */
- unsigned short vendor0; /* vendor unique */
- unsigned short vendor1; /* vendor unique */
- unsigned short vendor2; /* Retired vendor unique */
- unsigned char serial_no[20]; /* 0 = not_specified */
- unsigned short buf_type; /* Retired */
- unsigned short buf_size; /* Retired, 512 byte increments
- * 0 = not_specified
- */
- unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */
- unsigned char fw_rev[8]; /* 0 = not_specified */
- unsigned char model[40]; /* 0 = not_specified */
- unsigned char max_multsect; /* 0=not_implemented */
- unsigned char vendor3; /* vendor unique */
- unsigned short dword_io; /* 0=not_implemented; 1=implemented */
- unsigned char vendor4; /* vendor unique */
- unsigned char capability; /* (upper byte of word 49)
- * 3: IORDYsup
- * 2: IORDYsw
- * 1: LBA
- * 0: DMA
- */
- unsigned short reserved50; /* reserved (word 50) */
- unsigned char vendor5; /* Obsolete, vendor unique */
- unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */
- unsigned char vendor6; /* Obsolete, vendor unique */
- unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */
- unsigned short field_valid; /* (word 53)
- * 2: ultra_ok word 88
- * 1: eide_ok words 64-70
- * 0: cur_ok words 54-58
- */
- unsigned short cur_cyls; /* Obsolete, logical cylinders */
- unsigned short cur_heads; /* Obsolete, l heads */
- unsigned short cur_sectors; /* Obsolete, l sectors per track */
- unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */
- unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */
- unsigned char multsect; /* current multiple sector count */
- unsigned char multsect_valid; /* when (bit0==1) multsect is ok */
- unsigned int lba_capacity; /* Obsolete, total number of sectors */
- unsigned short dma_1word; /* Obsolete, single-word dma info */
- unsigned short dma_mword; /* multiple-word dma info */
- unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */
- unsigned short eide_dma_min; /* min mword dma cycle time (ns) */
- unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */
- unsigned short eide_pio; /* min cycle time (ns), no IORDY */
- unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */
- unsigned short words69_70[2]; /* reserved words 69-70
- * future command overlap and queuing
- */
+ u16 config; /* lots of obsolete bit flags */
+ u16 cyls; /* Obsolete, "physical" cyls */
+ u16 reserved2; /* reserved (word 2) */
+ u16 heads; /* Obsolete, "physical" heads */
+ u16 track_bytes; /* unformatted bytes per track */
+ u16 sector_bytes; /* unformatted bytes per sector */
+ u16 sectors; /* Obsolete, "physical" sectors per track */
+ u16 vendor0; /* vendor unique */
+ u16 vendor1; /* vendor unique */
+ u16 vendor2; /* Retired vendor unique */
+ u8 serial_no[20]; /* 0 = not_specified */
+ u16 buf_type; /* Retired */
+ u16 buf_size; /* Retired, 512 byte increments
+ * 0 = not_specified
+ */
+ u16 ecc_bytes; /* for r/w long cmds; 0 = not_specified */
+ u8 fw_rev[8]; /* 0 = not_specified */
+ char model[40]; /* 0 = not_specified */
+ u8 max_multsect; /* 0=not_implemented */
+ u8 vendor3; /* vendor unique */
+ u16 dword_io; /* 0=not_implemented; 1=implemented */
+ u8 vendor4; /* vendor unique */
+ u8 capability; /* (upper byte of word 49)
+ * 3: IORDYsup
+ * 2: IORDYsw
+ * 1: LBA
+ * 0: DMA
+ */
+ u16 reserved50; /* reserved (word 50) */
+ u8 vendor5; /* Obsolete, vendor unique */
+ u8 tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */
+ u8 vendor6; /* Obsolete, vendor unique */
+ u8 tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */
+ u16 field_valid; /* (word 53)
+ * 2: ultra_ok word 88
+ * 1: eide_ok words 64-70
+ * 0: cur_ok words 54-58
+ */
+ u16 cur_cyls; /* Obsolete, logical cylinders */
+ u16 cur_heads; /* Obsolete, l heads */
+ u16 cur_sectors; /* Obsolete, l sectors per track */
+ u16 cur_capacity0; /* Obsolete, l total sectors on drive */
+ u16 cur_capacity1; /* Obsolete, (2 words, misaligned int) */
+ u8 multsect; /* current multiple sector count */
+ u8 multsect_valid; /* when (bit0==1) multsect is ok */
+ u32 lba_capacity; /* Obsolete, total number of sectors */
+ u16 dma_1word; /* Obsolete, single-word dma info */
+ u16 dma_mword; /* multiple-word dma info */
+ u16 eide_pio_modes; /* bits 0:mode3 1:mode4 */
+ u16 eide_dma_min; /* min mword dma cycle time (ns) */
+ u16 eide_dma_time; /* recommended mword dma cycle time (ns) */
+ u16 eide_pio; /* min cycle time (ns), no IORDY */
+ u16 eide_pio_iordy; /* min cycle time (ns), with IORDY */
+ u16 words69_70[2]; /* reserved words 69-70
+ * future command overlap and queuing
+ */
/* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
- unsigned short words71_74[4]; /* reserved words 71-74
- * for IDENTIFY PACKET DEVICE command
- */
- unsigned short queue_depth; /* (word 75)
- * 15:5 reserved
- * 4:0 Maximum queue depth -1
- */
- unsigned short words76_79[4]; /* reserved words 76-79 */
- unsigned short major_rev_num; /* (word 80) */
- unsigned short minor_rev_num; /* (word 81) */
- unsigned short command_set_1; /* (word 82) supported
- * 15: Obsolete
- * 14: NOP command
- * 13: READ_BUFFER
- * 12: WRITE_BUFFER
- * 11: Obsolete
- * 10: Host Protected Area
- * 9: DEVICE Reset
- * 8: SERVICE Interrupt
- * 7: Release Interrupt
- * 6: look-ahead
- * 5: write cache
- * 4: PACKET Command
- * 3: Power Management Feature Set
- * 2: Removable Feature Set
- * 1: Security Feature Set
- * 0: SMART Feature Set
- */
- unsigned short command_set_2; /* (word 83)
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13: FLUSH CACHE EXT
- * 12: FLUSH CACHE
- * 11: Device Configuration Overlay
- * 10: 48-bit Address Feature Set
- * 9: Automatic Acoustic Management
- * 8: SET MAX security
- * 7: reserved 1407DT PARTIES
- * 6: SetF sub-command Power-Up
- * 5: Power-Up in Standby Feature Set
- * 4: Removable Media Notification
- * 3: APM Feature Set
- * 2: CFA Feature Set
- * 1: READ/WRITE DMA QUEUED
- * 0: Download MicroCode
- */
- unsigned short cfsse; /* (word 84)
- * cmd set-feature supported extensions
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13:3 reserved
- * 2: Media Serial Number Valid
- * 1: SMART selt-test supported
- * 0: SMART error logging
- */
- unsigned short cfs_enable_1; /* (word 85)
- * command set-feature enabled
- * 15: Obsolete
- * 14: NOP command
- * 13: READ_BUFFER
- * 12: WRITE_BUFFER
- * 11: Obsolete
- * 10: Host Protected Area
- * 9: DEVICE Reset
- * 8: SERVICE Interrupt
- * 7: Release Interrupt
- * 6: look-ahead
- * 5: write cache
- * 4: PACKET Command
- * 3: Power Management Feature Set
- * 2: Removable Feature Set
- * 1: Security Feature Set
- * 0: SMART Feature Set
- */
- unsigned short cfs_enable_2; /* (word 86)
- * command set-feature enabled
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13: FLUSH CACHE EXT
- * 12: FLUSH CACHE
- * 11: Device Configuration Overlay
- * 10: 48-bit Address Feature Set
- * 9: Automatic Acoustic Management
- * 8: SET MAX security
- * 7: reserved 1407DT PARTIES
- * 6: SetF sub-command Power-Up
- * 5: Power-Up in Standby Feature Set
- * 4: Removable Media Notification
- * 3: APM Feature Set
- * 2: CFA Feature Set
- * 1: READ/WRITE DMA QUEUED
- * 0: Download MicroCode
- */
- unsigned short csf_default; /* (word 87)
- * command set-feature default
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13:3 reserved
- * 2: Media Serial Number Valid
- * 1: SMART selt-test supported
- * 0: SMART error logging
- */
- unsigned short dma_ultra; /* (word 88) */
- unsigned short word89; /* reserved (word 89) */
- unsigned short word90; /* reserved (word 90) */
- unsigned short CurAPMvalues; /* current APM values */
- unsigned short word92; /* reserved (word 92) */
- unsigned short hw_config; /* hardware config (word 93)
- * 15:
- * 14:
- * 13:
- * 12:
- * 11:
- * 10:
- * 9:
- * 8:
- * 7:
- * 6:
- * 5:
- * 4:
- * 3:
- * 2:
- * 1:
- * 0:
- */
- unsigned short acoustic; /* (word 94)
- * 15:8 Vendor's recommended value
- * 7:0 current value
- */
- unsigned short words95_99[5]; /* reserved words 95-99 */
- unsigned long long lba_capacity_2;/* 48-bit total number of sectors */
- unsigned short words104_125[22];/* reserved words 104-125 */
- unsigned short last_lun; /* (word 126) */
- unsigned short word127; /* (word 127) Feature Set
- * Removable Media Notification
- * 15:2 reserved
- * 1:0 00 = not supported
- * 01 = supported
- * 10 = reserved
- * 11 = reserved
- */
- unsigned short dlf; /* (word 128)
- * device lock function
- * 15:9 reserved
- * 8 security level 1:max 0:high
- * 7:6 reserved
- * 5 enhanced erase
- * 4 expire
- * 3 frozen
- * 2 locked
- * 1 en/disabled
- * 0 capability
- */
- unsigned short csfo; /* (word 129)
- * current set features options
- * 15:4 reserved
- * 3: auto reassign
- * 2: reverting
- * 1: read-look-ahead
- * 0: write cache
- */
- unsigned short words130_155[26];/* reserved vendor words 130-155 */
- unsigned short word156; /* reserved vendor word 156 */
- unsigned short words157_159[3];/* reserved vendor words 157-159 */
- unsigned short cfa_power; /* (word 160) CFA Power Mode
- * 15 word 160 supported
- * 14 reserved
- * 13
- * 12
- * 11:0
- */
- unsigned short words161_175[14];/* Reserved for CFA */
- unsigned short words176_205[31];/* Current Media Serial Number */
- unsigned short words206_254[48];/* reserved words 206-254 */
- unsigned short integrity_word; /* (word 255)
- * 15:8 Checksum
- * 7:0 Signature
- */
+ u16 words71_74[4]; /* reserved words 71-74
+ * for IDENTIFY PACKET DEVICE command
+ */
+ u16 queue_depth; /* (word 75)
+ * 15:5 reserved
+ * 4:0 Maximum queue depth -1
+ */
+ u16 words76_79[4]; /* reserved words 76-79 */
+ u16 major_rev_num; /* (word 80) */
+ u16 minor_rev_num; /* (word 81) */
+ u16 command_set_1; /* (word 82) supported
+ * 15: Obsolete
+ * 14: NOP command
+ * 13: READ_BUFFER
+ * 12: WRITE_BUFFER
+ * 11: Obsolete
+ * 10: Host Protected Area
+ * 9: DEVICE Reset
+ * 8: SERVICE Interrupt
+ * 7: Release Interrupt
+ * 6: look-ahead
+ * 5: write cache
+ * 4: PACKET Command
+ * 3: Power Management Feature Set
+ * 2: Removable Feature Set
+ * 1: Security Feature Set
+ * 0: SMART Feature Set
+ */
+ u16 command_set_2; /* (word 83)
+ * 15: Shall be ZERO
+ * 14: Shall be ONE
+ * 13: FLUSH CACHE EXT
+ * 12: FLUSH CACHE
+ * 11: Device Configuration Overlay
+ * 10: 48-bit Address Feature Set
+ * 9: Automatic Acoustic Management
+ * 8: SET MAX security
+ * 7: reserved 1407DT PARTIES
+ * 6: SetF sub-command Power-Up
+ * 5: Power-Up in Standby Feature Set
+ * 4: Removable Media Notification
+ * 3: APM Feature Set
+ * 2: CFA Feature Set
+ * 1: READ/WRITE DMA QUEUED
+ * 0: Download MicroCode
+ */
+ u16 cfsse; /* (word 84)
+ * cmd set-feature supported extensions
+ * 15: Shall be ZERO
+ * 14: Shall be ONE
+ * 13:3 reserved
+ * 2: Media Serial Number Valid
+ * 1: SMART selt-test supported
+ * 0: SMART error logging
+ */
+ u16 cfs_enable_1; /* (word 85)
+ * command set-feature enabled
+ * 15: Obsolete
+ * 14: NOP command
+ * 13: READ_BUFFER
+ * 12: WRITE_BUFFER
+ * 11: Obsolete
+ * 10: Host Protected Area
+ * 9: DEVICE Reset
+ * 8: SERVICE Interrupt
+ * 7: Release Interrupt
+ * 6: look-ahead
+ * 5: write cache
+ * 4: PACKET Command
+ * 3: Power Management Feature Set
+ * 2: Removable Feature Set
+ * 1: Security Feature Set
+ * 0: SMART Feature Set
+ */
+ u16 cfs_enable_2; /* (word 86)
+ * command set-feature enabled
+ * 15: Shall be ZERO
+ * 14: Shall be ONE
+ * 13: FLUSH CACHE EXT
+ * 12: FLUSH CACHE
+ * 11: Device Configuration Overlay
+ * 10: 48-bit Address Feature Set
+ * 9: Automatic Acoustic Management
+ * 8: SET MAX security
+ * 7: reserved 1407DT PARTIES
+ * 6: SetF sub-command Power-Up
+ * 5: Power-Up in Standby Feature Set
+ * 4: Removable Media Notification
+ * 3: APM Feature Set
+ * 2: CFA Feature Set
+ * 1: READ/WRITE DMA QUEUED
+ * 0: Download MicroCode
+ */
+ u16 csf_default; /* (word 87)
+ * command set-feature default
+ * 15: Shall be ZERO
+ * 14: Shall be ONE
+ * 13:3 reserved
+ * 2: Media Serial Number Valid
+ * 1: SMART selt-test supported
+ * 0: SMART error logging
+ */
+ u16 dma_ultra; /* (word 88) */
+ u16 word89; /* reserved (word 89) */
+ u16 word90; /* reserved (word 90) */
+ u16 CurAPMvalues; /* current APM values */
+ u16 word92; /* reserved (word 92) */
+ u16 hw_config; /* hardware config (word 93)
+ * 15:
+ * 14:
+ * 13:
+ * 12:
+ * 11:
+ * 10:
+ * 9:
+ * 8:
+ * 7:
+ * 6:
+ * 5:
+ * 4:
+ * 3:
+ * 2:
+ * 1:
+ * 0:
+ */
+ u16 acoustic; /* (word 94)
+ * 15:8 Vendor's recommended value
+ * 7:0 current value
+ */
+ u16 words95_99[5]; /* reserved words 95-99 */
+ u64 lba_capacity_2; /* 48-bit total number of sectors */
+ u16 words104_125[22];/* reserved words 104-125 */
+ u16 last_lun; /* (word 126) */
+ u16 word127; /* (word 127) Feature Set
+ * Removable Media Notification
+ * 15:2 reserved
+ * 1:0 00 = not supported
+ * 01 = supported
+ * 10 = reserved
+ * 11 = reserved
+ */
+ u16 dlf; /* (word 128)
+ * device lock function
+ * 15:9 reserved
+ * 8 security level 1:max 0:high
+ * 7:6 reserved
+ * 5 enhanced erase
+ * 4 expire
+ * 3 frozen
+ * 2 locked
+ * 1 en/disabled
+ * 0 capability
+ */
+ u16 csfo; /* (word 129)
+ * current set features options
+ * 15:4 reserved
+ * 3: auto reassign
+ * 2: reverting
+ * 1: read-look-ahead
+ * 0: write cache
+ */
+ u16 words130_155[26];/* reserved vendor words 130-155 */
+ u16 word156; /* reserved vendor word 156 */
+ u16 words157_159[3];/* reserved vendor words 157-159 */
+ u16 cfa_power; /* (word 160) CFA Power Mode
+ * 15 word 160 supported
+ * 14 reserved
+ * 13
+ * 12
+ * 11:0
+ */
+ u16 words161_175[14];/* Reserved for CFA */
+ u16 words176_205[31];/* Current Media Serial Number */
+ u16 words206_254[48];/* reserved words 206-254 */
+ u16 integrity_word; /* (word 255)
+ * 15:8 Checksum
+ * 7:0 Signature
+ */
} __attribute__((packed));
-/*
- * IDE "nice" flags. These are used on a per drive basis to determine
- * when to be nice and give more bandwidth to the other devices which
- * share the same IDE bus.
- */
#define IDE_NICE_DSC_OVERLAP (0) /* per the DSC overlap protocol */
-#define IDE_NICE_ATAPI_OVERLAP (1) /* not supported yet */
-#endif /* _LINUX_HDREG_H */
+#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 7b9c5cce01cf..8a41b3b2e74a 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -285,8 +285,8 @@ struct ata_device {
unsigned long sleep; /* sleep until this time */
- byte retry_pio; /* retrying dma capable host in pio */
- byte state; /* retry state */
+ u8 retry_pio; /* retrying dma capable host in pio */
+ u8 state; /* retry state */
unsigned using_dma : 1; /* disk is using dma for read/write */
unsigned using_tcq : 1; /* disk is using queueing */
@@ -307,20 +307,20 @@ struct ata_device {
unsigned remap_0_to_1 : 2; /* 0=remap if ezdrive, 1=remap, 2=noremap */
unsigned ata_flash : 1; /* 1=present, 0=default */
unsigned addressing; /* : 2; 0=28-bit, 1=48-bit, 2=64-bit */
- byte scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */
+ u8 scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */
select_t select; /* basic drive/head select reg value */
u8 status; /* last retrived status value for device */
- byte ready_stat; /* min status value for drive ready */
- byte mult_count; /* current multiple sector setting */
- byte bad_wstat; /* used for ignoring WRERR_STAT */
- byte nowerr; /* used for ignoring WRERR_STAT */
- byte sect0; /* offset of first sector for DM6:DDO */
- byte head; /* "real" number of heads */
- byte sect; /* "real" sectors per track */
- byte bios_head; /* BIOS/fdisk/LILO number of heads */
- byte bios_sect; /* BIOS/fdisk/LILO sectors per track */
+ u8 ready_stat; /* min status value for drive ready */
+ u8 mult_count; /* current multiple sector setting */
+ u8 bad_wstat; /* used for ignoring WRERR_STAT */
+ u8 nowerr; /* used for ignoring WRERR_STAT */
+ u8 sect0; /* offset of first sector for DM6:DDO */
+ u8 head; /* "real" number of heads */
+ u8 sect; /* "real" sectors per track */
+ u8 bios_head; /* BIOS/fdisk/LILO number of heads */
+ u8 bios_sect; /* BIOS/fdisk/LILO sectors per track */
unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */
unsigned int cyl; /* "real" number of cyls */
u64 capacity; /* total number of sectors */
@@ -343,13 +343,12 @@ struct ata_device {
int lun; /* logical unit */
int crc_count; /* crc counter to reduce drive speed */
- byte quirk_list; /* drive is considered quirky if set for a specific host */
- byte suspend_reset; /* drive suspend mode flag, soft-reset recovers */
- byte current_speed; /* current transfer rate set */
- byte dn; /* now wide spread use */
- byte wcache; /* status of write cache */
- byte acoustic; /* acoustic management */
- byte queue_depth; /* max queue depth */
+ int quirk_list; /* drive is considered quirky if set for a specific host */
+ u8 current_speed; /* current transfer rate set */
+ u8 dn; /* now wide spread use */
+ u8 wcache; /* status of write cache */
+ u8 acoustic; /* acoustic management */
+ unsigned int queue_depth; /* max queue depth */
unsigned int failures; /* current failure count */
unsigned int max_failures; /* maximum allowed failure count */
struct device dev; /* global device tree handle */
@@ -370,7 +369,7 @@ typedef enum {
ATA_OP_FINISHED, /* no drive operation was started */
ATA_OP_CONTINUES, /* a drive operation was started, and a handler was set */
ATA_OP_RELEASED, /* started and released bus */
- ATA_OP_READY, /* indicate status poll finished fine */
+ ATA_OP_READY /* indicate status poll finished fine */
} ide_startstop_t;
/*
@@ -428,10 +427,10 @@ struct ata_channel {
*/
/* setup disk on a channel for a particular PIO transfer mode */
- void (*tuneproc) (struct ata_device *, byte pio);
+ void (*tuneproc) (struct ata_device *, u8 pio);
/* setup the chipset timing for a particular transfer mode */
- int (*speedproc) (struct ata_device *, byte pio);
+ int (*speedproc) (struct ata_device *, u8 pio);
/* tweaks hardware to select drive */
void (*selectproc) (struct ata_device *);
@@ -640,10 +639,8 @@ extern void ata_read(struct ata_device *, void *, unsigned int);
extern void ata_write(struct ata_device *, void *, unsigned int);
extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *);
-extern int ide_config_drive_speed(struct ata_device *, byte);
-extern byte eighty_ninty_three(struct ata_device *);
-
-extern void ide_stall_queue(struct ata_device *, unsigned long);
+extern int ide_config_drive_speed(struct ata_device *, u8);
+extern int eighty_ninty_three(struct ata_device *);
extern int system_bus_speed;
@@ -656,11 +653,11 @@ extern int system_bus_speed;
extern int drive_is_flashcard(struct ata_device *);
-int ide_spin_wait_hwgroup(struct ata_device *);
-void ide_timer_expiry (unsigned long data);
+extern int ide_spin_wait_hwgroup(struct ata_device *);
+extern void ide_timer_expiry(unsigned long data);
extern void ata_irq_request(int irq, void *data, struct pt_regs *regs);
-void do_ide_request (request_queue_t * q);
-void ide_init_subdrivers (void);
+extern void do_ide_request(request_queue_t * q);
+extern void ide_init_subdrivers(void);
extern struct block_device_operations ide_fops[];
@@ -742,12 +739,12 @@ static inline int udma_irq_status(struct ata_device *drive)
static inline void udma_timeout(struct ata_device *drive)
{
- return drive->channel->udma_timeout(drive);
+ drive->channel->udma_timeout(drive);
}
static inline void udma_irq_lost(struct ata_device *drive)
{
- return drive->channel->udma_irq_lost(drive);
+ drive->channel->udma_irq_lost(drive);
}
#ifdef CONFIG_BLK_DEV_IDEDMA
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
index eae4f5bbb65a..e2c507ba6b08 100644
--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -61,7 +61,7 @@ nbd_end_request(struct request *req)
bio->bi_next = NULL;
bio_endio(bio, uptodate);
}
- blkdev_release_request(req);
+ blk_put_request(req);
spin_unlock_irqrestore(q->queue_lock, flags);
}
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index f45c35f298e6..02ef81aee197 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -90,6 +90,16 @@
#ifdef __KERNEL__
/*
+ * NFSv3 Access mode cache
+ */
+struct nfs_access_cache {
+ unsigned long jiffies;
+ struct rpc_cred * cred;
+ int mask;
+ int err;
+};
+
+/*
* nfs fs inode data in memory
*/
struct nfs_inode {
@@ -138,6 +148,8 @@ struct nfs_inode {
*/
unsigned long cache_mtime_jiffies;
+ struct nfs_access_cache cache_access;
+
/*
* This is the cookie verifier used for NFSv3 readdir
* operations
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 110e5b661b58..53ec9c0b94d0 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -300,7 +300,7 @@ struct nfs_rpc_ops {
struct iattr *);
int (*lookup) (struct inode *, struct qstr *,
struct nfs_fh *, struct nfs_fattr *);
- int (*access) (struct inode *, int , int);
+ int (*access) (struct inode *, struct rpc_cred *, int);
int (*readlink)(struct inode *, struct page *);
int (*read) (struct inode *, struct rpc_cred *,
struct nfs_fattr *,
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 0db9736c1166..05d2e7968646 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -60,5 +60,7 @@ extern int notifier_call_chain(struct notifier_block **n, unsigned long val, voi
#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */
+#define CPU_ONLINE 0x0002 /* CPU (unsigned)v coming up */
+
#endif /* __KERNEL__ */
#endif /* _LINUX_NOTIFIER_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6dd4746e58cd..1ee746b656cf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -150,7 +150,6 @@ extern void update_process_times(int user);
extern void update_one_process(struct task_struct *p, unsigned long user,
unsigned long system, int cpu);
extern void scheduler_tick(int user_tick, int system);
-extern void migration_init(void);
extern unsigned long cache_decay_ticks;
diff --git a/include/linux/smp.h b/include/linux/smp.h
index d6857a229d5d..454fdcdf14d2 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -32,19 +32,19 @@ extern void FASTCALL(smp_send_reschedule(int cpu));
/*
- * Boot processor call to load the other CPU's
+ * Prepare machine for booting other CPUs.
*/
-extern void smp_boot_cpus(void);
+extern void smp_prepare_cpus(unsigned int max_cpus);
/*
- * Processor call in. Must hold processors until ..
+ * Bring a CPU up
*/
-extern void smp_callin(void);
+extern int __cpu_up(unsigned int cpunum);
/*
- * Multiprocessors may now schedule
+ * Final polishing of CPUs
*/
-extern void smp_commence(void);
+extern void smp_cpus_done(unsigned int max_cpus);
/*
* Call a function on all other processors
@@ -71,6 +71,13 @@ extern volatile int smp_msg_id;
#define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU*/
#define MSG_CALL_FUNCTION 0x0004 /* Call function on all other CPUs */
+struct notifier_block;
+
+/* Need to know about CPUs going up/down? */
+extern int register_cpu_notifier(struct notifier_block *nb);
+extern void unregister_cpu_notifier(struct notifier_block *nb);
+
+int cpu_up(unsigned int cpu);
#else /* !SMP */
/*
@@ -93,6 +100,10 @@ static inline void smp_send_reschedule_all(void) { }
#define per_cpu(var, cpu) var
#define this_cpu(var) var
+/* Need to know about CPUs going up/down? */
+#define register_cpu_notifier(nb) 0
+#define unregister_cpu_notifier(nb) do { } while(0)
+
#endif /* !SMP */
#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index d278df00ecb9..92fa9755592e 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -127,6 +127,7 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg,
void rpc_restart_call(struct rpc_task *);
void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset);
void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset);
+void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
static __inline__
int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags)
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index eca42599039f..c9b93c6a7a27 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -122,6 +122,9 @@ struct rpc_xprt {
unsigned long cong; /* current congestion */
unsigned long cwnd; /* congestion window */
+ unsigned int rcvsize, /* socket receive buffer size */
+ sndsize; /* socket send buffer size */
+
struct rpc_wait_queue sending; /* requests waiting to send */
struct rpc_wait_queue resend; /* requests waiting to resend */
struct rpc_wait_queue pending; /* requests in flight */
@@ -177,13 +180,9 @@ int xprt_adjust_timeout(struct rpc_timeout *);
void xprt_release(struct rpc_task *);
void xprt_reconnect(struct rpc_task *);
int xprt_clear_backlog(struct rpc_xprt *);
+void xprt_sock_setbufsize(struct rpc_xprt *);
-#define XPRT_WSPACE 0
-#define XPRT_CONNECT 1
-
-#define xprt_wspace(xp) (test_bit(XPRT_WSPACE, &(xp)->sockstate))
-#define xprt_test_and_set_wspace(xp) (test_and_set_bit(XPRT_WSPACE, &(xp)->sockstate))
-#define xprt_clear_wspace(xp) (clear_bit(XPRT_WSPACE, &(xp)->sockstate))
+#define XPRT_CONNECT 0
#define xprt_connected(xp) (!(xp)->stream || test_bit(XPRT_CONNECT, &(xp)->sockstate))
#define xprt_set_connected(xp) (set_bit(XPRT_CONNECT, &(xp)->sockstate))