diff options
Diffstat (limited to 'include')
56 files changed, 352 insertions, 262 deletions
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index a7131630c057..57dc672bab8e 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h @@ -3,7 +3,7 @@ #include <linux/mm.h> #include <linux/device.h> -#include <asm/scatterlist.h> +#include <linux/scatterlist.h> #include <asm/processor.h> #include <asm/cacheflush.h> #include <asm/io.h> diff --git a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h index 99ba76edc42a..2e7143b5a7ad 100644 --- a/include/asm-frv/scatterlist.h +++ b/include/asm-frv/scatterlist.h @@ -16,8 +16,7 @@ * * can be rewritten as * - * sg_set_page(virt_to_page(some_ptr)); - * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK; + * sg_set_buf(sg, some_ptr, length); * * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens */ diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index bdca5416d8b0..3328950dbfe6 100644 --- a/include/asm-sparc/atomic.h +++ b/include/asm-sparc/atomic.h @@ -1,6 +1,6 @@ /* atomic.h: These still suck, but the I-cache hit rate is higher. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1996 David S. Miller (davem@davemloft.net) * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com.au) * Copyright (C) 2007 Kyle McMartin (kyle@parisc-linux.org) * @@ -33,7 +33,7 @@ extern void __cmpxchg_called_with_bad_pointer(void); extern unsigned long __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_); /* don't worry...optimizer will get rid of most of this */ -static __inline__ unsigned long +static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) { switch(size) { diff --git a/include/asm-sparc/dma.h b/include/asm-sparc/dma.h index 407b3614468a..959d6c8a71ae 100644 --- a/include/asm-sparc/dma.h +++ b/include/asm-sparc/dma.h @@ -1,7 +1,6 @@ -/* $Id: dma.h,v 1.35 1999/12/27 06:37:09 anton Exp $ - * include/asm-sparc/dma.h +/* include/asm-sparc/dma.h * - * Copyright 1995 (C) David S. Miller (davem@caip.rutgers.edu) + * Copyright 1995 (C) David S. Miller (davem@davemloft.net) */ #ifndef _ASM_SPARC_DMA_H @@ -21,14 +20,14 @@ struct page; extern spinlock_t dma_spin_lock; -static __inline__ unsigned long claim_dma_lock(void) +static inline unsigned long claim_dma_lock(void) { unsigned long flags; spin_lock_irqsave(&dma_spin_lock, flags); return flags; } -static __inline__ void release_dma_lock(unsigned long flags) +static inline void release_dma_lock(unsigned long flags) { spin_unlock_irqrestore(&dma_spin_lock, flags); } diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 5da1eef0f706..dbe7a586be5b 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h @@ -1,6 +1,6 @@ /* asm-sparc/floppy.h: Sparc specific parts of the Floppy driver. * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1995 David S. Miller (davem@davemloft.net) */ #ifndef __ASM_SPARC_FLOPPY_H @@ -232,12 +232,12 @@ extern char *pdma_base; extern unsigned long pdma_areasize; /* Common routines to all controller types on the Sparc. */ -static __inline__ void virtual_dma_init(void) +static inline void virtual_dma_init(void) { /* nothing... */ } -static __inline__ void sun_fd_disable_dma(void) +static inline void sun_fd_disable_dma(void) { doing_pdma = 0; if (pdma_base) { @@ -246,7 +246,7 @@ static __inline__ void sun_fd_disable_dma(void) } } -static __inline__ void sun_fd_set_dma_mode(int mode) +static inline void sun_fd_set_dma_mode(int mode) { switch(mode) { case DMA_MODE_READ: @@ -261,17 +261,17 @@ static __inline__ void sun_fd_set_dma_mode(int mode) } } -static __inline__ void sun_fd_set_dma_addr(char *buffer) +static inline void sun_fd_set_dma_addr(char *buffer) { pdma_vaddr = buffer; } -static __inline__ void sun_fd_set_dma_count(int length) +static inline void sun_fd_set_dma_count(int length) { pdma_size = length; } -static __inline__ void sun_fd_enable_dma(void) +static inline void sun_fd_enable_dma(void) { pdma_vaddr = mmu_lockarea(pdma_vaddr, pdma_size); pdma_base = pdma_vaddr; diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index 404022765fc7..4076cb5d1581 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h @@ -1,7 +1,6 @@ -/* $Id: ide.h,v 1.7 2002/01/16 20:58:40 davem Exp $ - * ide.h: SPARC PCI specific IDE glue. +/* ide.h: SPARC PCI specific IDE glue. * - * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1997 David S. Miller (davem@davemloft.net) * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) * Adaptation from sparc64 version to sparc by Pete Zaitcev. */ @@ -31,7 +30,7 @@ #define __ide_mm_outsw __ide_outsw #define __ide_mm_outsl __ide_outsl -static __inline__ void __ide_insw(unsigned long port, +static inline void __ide_insw(unsigned long port, void *dst, unsigned long count) { @@ -62,7 +61,7 @@ static __inline__ void __ide_insw(unsigned long port, /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */ } -static __inline__ void __ide_outsw(unsigned long port, +static inline void __ide_outsw(unsigned long port, const void *src, unsigned long count) { diff --git a/include/asm-sparc/posix_types.h b/include/asm-sparc/posix_types.h index 9ef1b3db4cbf..62c8fa7b36d4 100644 --- a/include/asm-sparc/posix_types.h +++ b/include/asm-sparc/posix_types.h @@ -49,7 +49,7 @@ typedef struct { #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) #undef __FD_SET -static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) +static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) { unsigned long _tmp = fd / __NFDBITS; unsigned long _rem = fd % __NFDBITS; @@ -57,7 +57,7 @@ static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) } #undef __FD_CLR -static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) +static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) { unsigned long _tmp = fd / __NFDBITS; unsigned long _rem = fd % __NFDBITS; @@ -65,7 +65,7 @@ static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) } #undef __FD_ISSET -static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) +static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) { unsigned long _tmp = fd / __NFDBITS; unsigned long _rem = fd % __NFDBITS; @@ -77,7 +77,7 @@ static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) * for 256 and 1024-bit fd_sets respectively) */ #undef __FD_ZERO -static __inline__ void __FD_ZERO(__kernel_fd_set *p) +static inline void __FD_ZERO(__kernel_fd_set *p) { unsigned long *tmp = p->fds_bits; int i; diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 8c259de02614..2655d142b22d 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h @@ -1,5 +1,3 @@ -/* $Id: system.h,v 1.86 2001/10/30 04:57:10 davem Exp $ */ - #ifndef __SPARC_SYSTEM_H #define __SPARC_SYSTEM_H @@ -56,7 +54,7 @@ extern void sun_do_break(void); extern int serial_console; extern int stop_a_enabled; -static __inline__ int con_is_present(void) +static inline int con_is_present(void) { return serial_console ? 0 : 1; } @@ -217,7 +215,7 @@ static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned lon extern void __xchg_called_with_bad_pointer(void); -static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) +static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) { switch (size) { case 4: diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h index 3fb4e1f7f186..2c71ec4a3b18 100644 --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h @@ -1,5 +1,4 @@ -/* $Id: atomic.h,v 1.22 2001/07/11 23:56:07 davem Exp $ - * atomic.h: Thankfully the V9 is at least reasonable for this +/* atomic.h: Thankfully the V9 is at least reasonable for this * stuff. * * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com) @@ -74,7 +73,7 @@ extern int atomic64_sub_ret(int, atomic64_t *); #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) -static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) +static inline int atomic_add_unless(atomic_t *v, int a, int u) { int c, old; c = atomic_read(v); @@ -95,7 +94,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) -static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) +static inline int atomic64_add_unless(atomic64_t *v, long a, long u) { long c, old; c = atomic64_read(v); diff --git a/include/asm-sparc64/backoff.h b/include/asm-sparc64/backoff.h index 0e32f8b62fd2..dadd6c385c6c 100644 --- a/include/asm-sparc64/backoff.h +++ b/include/asm-sparc64/backoff.h @@ -21,7 +21,9 @@ #else #define BACKOFF_SETUP(reg) -#define BACKOFF_SPIN(reg, tmp, label) +#define BACKOFF_SPIN(reg, tmp, label) \ + ba,pt %xcc, label; \ + nop; #endif diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h index c69b08af5fe0..3943022906fd 100644 --- a/include/asm-sparc64/byteorder.h +++ b/include/asm-sparc64/byteorder.h @@ -1,4 +1,3 @@ -/* $Id: byteorder.h,v 1.8 1997/12/18 02:44:14 ecd Exp $ */ #ifndef _SPARC64_BYTEORDER_H #define _SPARC64_BYTEORDER_H @@ -7,7 +6,7 @@ #ifdef __GNUC__ -static __inline__ __u16 ___arch__swab16p(const __u16 *addr) +static inline __u16 ___arch__swab16p(const __u16 *addr) { __u16 ret; @@ -17,7 +16,7 @@ static __inline__ __u16 ___arch__swab16p(const __u16 *addr) return ret; } -static __inline__ __u32 ___arch__swab32p(const __u32 *addr) +static inline __u32 ___arch__swab32p(const __u32 *addr) { __u32 ret; @@ -27,7 +26,7 @@ static __inline__ __u32 ___arch__swab32p(const __u32 *addr) return ret; } -static __inline__ __u64 ___arch__swab64p(const __u64 *addr) +static inline __u64 ___arch__swab64p(const __u64 *addr) { __u64 ret; diff --git a/include/asm-sparc64/fpumacro.h b/include/asm-sparc64/fpumacro.h index d583e5efd75d..cc463fec806f 100644 --- a/include/asm-sparc64/fpumacro.h +++ b/include/asm-sparc64/fpumacro.h @@ -16,7 +16,7 @@ struct fpustate { #define FPUSTATE (struct fpustate *)(current_thread_info()->fpregs) -static __inline__ unsigned long fprs_read(void) +static inline unsigned long fprs_read(void) { unsigned long retval; @@ -25,7 +25,7 @@ static __inline__ unsigned long fprs_read(void) return retval; } -static __inline__ void fprs_write(unsigned long val) +static inline void fprs_write(unsigned long val) { __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val)); } diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index cd7ef3097ac2..c299b853b5ba 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h @@ -1,4 +1,3 @@ -/* $Id: io.h,v 1.47 2001/12/13 10:36:02 davem Exp $ */ #ifndef __SPARC64_IO_H #define __SPARC64_IO_H @@ -19,7 +18,7 @@ extern unsigned long kern_base, kern_size; #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) #define BIO_VMERGE_BOUNDARY 8192 -static __inline__ u8 _inb(unsigned long addr) +static inline u8 _inb(unsigned long addr) { u8 ret; @@ -30,7 +29,7 @@ static __inline__ u8 _inb(unsigned long addr) return ret; } -static __inline__ u16 _inw(unsigned long addr) +static inline u16 _inw(unsigned long addr) { u16 ret; @@ -41,7 +40,7 @@ static __inline__ u16 _inw(unsigned long addr) return ret; } -static __inline__ u32 _inl(unsigned long addr) +static inline u32 _inl(unsigned long addr) { u32 ret; @@ -52,21 +51,21 @@ static __inline__ u32 _inl(unsigned long addr) return ret; } -static __inline__ void _outb(u8 b, unsigned long addr) +static inline void _outb(u8 b, unsigned long addr) { __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" : /* no outputs */ : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); } -static __inline__ void _outw(u16 w, unsigned long addr) +static inline void _outw(u16 w, unsigned long addr) { __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" : /* no outputs */ : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); } -static __inline__ void _outl(u32 l, unsigned long addr) +static inline void _outl(u32 l, unsigned long addr) { __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" : /* no outputs */ @@ -205,7 +204,7 @@ static inline void _writeq(u64 q, volatile void __iomem *addr) #define writeq(__q, __addr) _writeq(__q, __addr) /* Now versions without byte-swapping. */ -static __inline__ u8 _raw_readb(unsigned long addr) +static inline u8 _raw_readb(unsigned long addr) { u8 ret; @@ -216,7 +215,7 @@ static __inline__ u8 _raw_readb(unsigned long addr) return ret; } -static __inline__ u16 _raw_readw(unsigned long addr) +static inline u16 _raw_readw(unsigned long addr) { u16 ret; @@ -227,7 +226,7 @@ static __inline__ u16 _raw_readw(unsigned long addr) return ret; } -static __inline__ u32 _raw_readl(unsigned long addr) +static inline u32 _raw_readl(unsigned long addr) { u32 ret; @@ -238,7 +237,7 @@ static __inline__ u32 _raw_readl(unsigned long addr) return ret; } -static __inline__ u64 _raw_readq(unsigned long addr) +static inline u64 _raw_readq(unsigned long addr) { u64 ret; @@ -249,28 +248,28 @@ static __inline__ u64 _raw_readq(unsigned long addr) return ret; } -static __inline__ void _raw_writeb(u8 b, unsigned long addr) +static inline void _raw_writeb(u8 b, unsigned long addr) { __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_raw_writeb */" : /* no outputs */ : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static __inline__ void _raw_writew(u16 w, unsigned long addr) +static inline void _raw_writew(u16 w, unsigned long addr) { __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_raw_writew */" : /* no outputs */ : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static __inline__ void _raw_writel(u32 l, unsigned long addr) +static inline void _raw_writel(u32 l, unsigned long addr) { __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_raw_writel */" : /* no outputs */ : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static __inline__ void _raw_writeq(u64 q, unsigned long addr) +static inline void _raw_writeq(u64 q, unsigned long addr) { __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_raw_writeq */" : /* no outputs */ diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 182dba05c702..30cb76b47be1 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h @@ -1,7 +1,6 @@ -/* $Id: irq.h,v 1.21 2002/01/23 11:27:36 davem Exp $ - * irq.h: IRQ registers on the 64-bit Sparc. +/* irq.h: IRQ registers on the 64-bit Sparc. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1996 David S. Miller (davem@davemloft.net) * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) */ @@ -67,21 +66,21 @@ extern void virt_irq_free(unsigned int virt_irq); extern void fixup_irqs(void); -static __inline__ void set_softint(unsigned long bits) +static inline void set_softint(unsigned long bits) { __asm__ __volatile__("wr %0, 0x0, %%set_softint" : /* No outputs */ : "r" (bits)); } -static __inline__ void clear_softint(unsigned long bits) +static inline void clear_softint(unsigned long bits) { __asm__ __volatile__("wr %0, 0x0, %%clear_softint" : /* No outputs */ : "r" (bits)); } -static __inline__ unsigned long get_softint(void) +static inline unsigned long get_softint(void) { unsigned long retval; diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h index d14dd8988161..c5652de2ace2 100644 --- a/include/asm-sparc64/mostek.h +++ b/include/asm-sparc64/mostek.h @@ -1,7 +1,6 @@ -/* $Id: mostek.h,v 1.4 2001/01/11 15:07:09 davem Exp $ - * mostek.h: Describes the various Mostek time of day clock registers. +/* mostek.h: Describes the various Mostek time of day clock registers. * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1995 David S. Miller (davem@davemloft.net) * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) */ @@ -38,7 +37,7 @@ * * We now deal with physical addresses for I/O to the chip. -DaveM */ -static __inline__ u8 mostek_read(void __iomem *addr) +static inline u8 mostek_read(void __iomem *addr) { u8 ret; @@ -48,7 +47,7 @@ static __inline__ u8 mostek_read(void __iomem *addr) return ret; } -static __inline__ void mostek_write(void __iomem *addr, u8 val) +static inline void mostek_write(void __iomem *addr, u8 val) { __asm__ __volatile__("stba %0, [%1] %2" : /* no outputs */ diff --git a/include/asm-sparc64/ns87303.h b/include/asm-sparc64/ns87303.h index 6d58fdf349b5..686defe6aaa0 100644 --- a/include/asm-sparc64/ns87303.h +++ b/include/asm-sparc64/ns87303.h @@ -1,5 +1,4 @@ -/* $Id: ns87303.h,v 1.3 2000/01/09 15:16:34 ecd Exp $ - * ns87303.h: Configuration Register Description for the +/* ns87303.h: Configuration Register Description for the * National Semiconductor PC87303 (SuperIO). * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -85,7 +84,7 @@ extern spinlock_t ns87303_lock; -static __inline__ int ns87303_modify(unsigned long port, unsigned int index, +static inline int ns87303_modify(unsigned long port, unsigned int index, unsigned char clr, unsigned char set) { static unsigned char reserved[] = { diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 8116e8f6062c..e9555b246c8d 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h @@ -1,5 +1,4 @@ -/* $Id: parport.h,v 1.11 2001/05/11 07:54:24 davem Exp $ - * parport.h: sparc64 specific parport initialization and dma. +/* parport.h: sparc64 specific parport initialization and dma. * * Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be) */ @@ -42,7 +41,7 @@ static struct sparc_ebus_info { static DECLARE_BITMAP(dma_slot_map, PARPORT_PC_MAX_PORTS); -static __inline__ int request_dma(unsigned int dmanr, const char *device_id) +static inline int request_dma(unsigned int dmanr, const char *device_id) { if (dmanr >= PARPORT_PC_MAX_PORTS) return -EINVAL; @@ -51,7 +50,7 @@ static __inline__ int request_dma(unsigned int dmanr, const char *device_id) return 0; } -static __inline__ void free_dma(unsigned int dmanr) +static inline void free_dma(unsigned int dmanr) { if (dmanr >= PARPORT_PC_MAX_PORTS) { printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); @@ -63,7 +62,7 @@ static __inline__ void free_dma(unsigned int dmanr) } } -static __inline__ void enable_dma(unsigned int dmanr) +static inline void enable_dma(unsigned int dmanr) { ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); @@ -73,32 +72,32 @@ static __inline__ void enable_dma(unsigned int dmanr) BUG(); } -static __inline__ void disable_dma(unsigned int dmanr) +static inline void disable_dma(unsigned int dmanr) { ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 0); } -static __inline__ void clear_dma_ff(unsigned int dmanr) +static inline void clear_dma_ff(unsigned int dmanr) { /* nothing */ } -static __inline__ void set_dma_mode(unsigned int dmanr, char mode) +static inline void set_dma_mode(unsigned int dmanr, char mode) { ebus_dma_prepare(&sparc_ebus_dmas[dmanr].info, (mode != DMA_MODE_WRITE)); } -static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int addr) +static inline void set_dma_addr(unsigned int dmanr, unsigned int addr) { sparc_ebus_dmas[dmanr].addr = addr; } -static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) +static inline void set_dma_count(unsigned int dmanr, unsigned int count) { sparc_ebus_dmas[dmanr].count = count; } -static __inline__ unsigned int get_dma_residue(unsigned int dmanr) +static inline unsigned int get_dma_residue(unsigned int dmanr) { return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); } diff --git a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h index c86b9452c683..3426a65ecd35 100644 --- a/include/asm-sparc64/posix_types.h +++ b/include/asm-sparc64/posix_types.h @@ -53,7 +53,7 @@ typedef struct { #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) #undef __FD_SET -static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) +static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) { unsigned long _tmp = fd / __NFDBITS; unsigned long _rem = fd % __NFDBITS; @@ -61,7 +61,7 @@ static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) } #undef __FD_CLR -static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) +static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) { unsigned long _tmp = fd / __NFDBITS; unsigned long _rem = fd % __NFDBITS; @@ -69,7 +69,7 @@ static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) } #undef __FD_ISSET -static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) +static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) { unsigned long _tmp = fd / __NFDBITS; unsigned long _rem = fd % __NFDBITS; @@ -81,7 +81,7 @@ static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) * for 256 and 1024-bit fd_sets respectively) */ #undef __FD_ZERO -static __inline__ void __FD_ZERO(__kernel_fd_set *p) +static inline void __FD_ZERO(__kernel_fd_set *p) { unsigned long *tmp = p->fds_bits; int i; diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h index 0151cad486f3..24a04a55cf85 100644 --- a/include/asm-sparc64/sbus.h +++ b/include/asm-sparc64/sbus.h @@ -29,12 +29,12 @@ * numbers + offsets, and vice versa. */ -static __inline__ unsigned long sbus_devaddr(int slotnum, unsigned long offset) +static inline unsigned long sbus_devaddr(int slotnum, unsigned long offset) { return (unsigned long) (SUN_SBUS_BVADDR+((slotnum)<<28)+(offset)); } -static __inline__ int sbus_dev_slot(unsigned long dev_addr) +static inline int sbus_dev_slot(unsigned long dev_addr) { return (int) (((dev_addr)-SUN_SBUS_BVADDR)>>28); } diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h index cf7807813e85..63b7040e8134 100644 --- a/include/asm-sparc64/spitfire.h +++ b/include/asm-sparc64/spitfire.h @@ -1,7 +1,6 @@ -/* $Id: spitfire.h,v 1.18 2001/11/29 16:42:10 kanoj Exp $ - * spitfire.h: SpitFire/BlackBird/Cheetah inline MMU operations. +/* spitfire.h: SpitFire/BlackBird/Cheetah inline MMU operations. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1996 David S. Miller (davem@davemloft.net) */ #ifndef _SPARC64_SPITFIRE_H @@ -67,7 +66,7 @@ extern void cheetah_enable_pcache(void); /* The data cache is write through, so this just invalidates the * specified line. */ -static __inline__ void spitfire_put_dcache_tag(unsigned long addr, unsigned long tag) +static inline void spitfire_put_dcache_tag(unsigned long addr, unsigned long tag) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -81,7 +80,7 @@ static __inline__ void spitfire_put_dcache_tag(unsigned long addr, unsigned long * a flush instruction (to any address) is sufficient to handle * this issue after the line is invalidated. */ -static __inline__ void spitfire_put_icache_tag(unsigned long addr, unsigned long tag) +static inline void spitfire_put_icache_tag(unsigned long addr, unsigned long tag) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -89,7 +88,7 @@ static __inline__ void spitfire_put_icache_tag(unsigned long addr, unsigned long : "r" (tag), "r" (addr), "i" (ASI_IC_TAG)); } -static __inline__ unsigned long spitfire_get_dtlb_data(int entry) +static inline unsigned long spitfire_get_dtlb_data(int entry) { unsigned long data; @@ -103,7 +102,7 @@ static __inline__ unsigned long spitfire_get_dtlb_data(int entry) return data; } -static __inline__ unsigned long spitfire_get_dtlb_tag(int entry) +static inline unsigned long spitfire_get_dtlb_tag(int entry) { unsigned long tag; @@ -113,7 +112,7 @@ static __inline__ unsigned long spitfire_get_dtlb_tag(int entry) return tag; } -static __inline__ void spitfire_put_dtlb_data(int entry, unsigned long data) +static inline void spitfire_put_dtlb_data(int entry, unsigned long data) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -122,7 +121,7 @@ static __inline__ void spitfire_put_dtlb_data(int entry, unsigned long data) "i" (ASI_DTLB_DATA_ACCESS)); } -static __inline__ unsigned long spitfire_get_itlb_data(int entry) +static inline unsigned long spitfire_get_itlb_data(int entry) { unsigned long data; @@ -136,7 +135,7 @@ static __inline__ unsigned long spitfire_get_itlb_data(int entry) return data; } -static __inline__ unsigned long spitfire_get_itlb_tag(int entry) +static inline unsigned long spitfire_get_itlb_tag(int entry) { unsigned long tag; @@ -146,7 +145,7 @@ static __inline__ unsigned long spitfire_get_itlb_tag(int entry) return tag; } -static __inline__ void spitfire_put_itlb_data(int entry, unsigned long data) +static inline void spitfire_put_itlb_data(int entry, unsigned long data) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -155,7 +154,7 @@ static __inline__ void spitfire_put_itlb_data(int entry, unsigned long data) "i" (ASI_ITLB_DATA_ACCESS)); } -static __inline__ void spitfire_flush_dtlb_nucleus_page(unsigned long page) +static inline void spitfire_flush_dtlb_nucleus_page(unsigned long page) { __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" "membar #Sync" @@ -163,7 +162,7 @@ static __inline__ void spitfire_flush_dtlb_nucleus_page(unsigned long page) : "r" (page | 0x20), "i" (ASI_DMMU_DEMAP)); } -static __inline__ void spitfire_flush_itlb_nucleus_page(unsigned long page) +static inline void spitfire_flush_itlb_nucleus_page(unsigned long page) { __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" "membar #Sync" @@ -172,7 +171,7 @@ static __inline__ void spitfire_flush_itlb_nucleus_page(unsigned long page) } /* Cheetah has "all non-locked" tlb flushes. */ -static __inline__ void cheetah_flush_dtlb_all(void) +static inline void cheetah_flush_dtlb_all(void) { __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" "membar #Sync" @@ -180,7 +179,7 @@ static __inline__ void cheetah_flush_dtlb_all(void) : "r" (0x80), "i" (ASI_DMMU_DEMAP)); } -static __inline__ void cheetah_flush_itlb_all(void) +static inline void cheetah_flush_itlb_all(void) { __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" "membar #Sync" @@ -202,7 +201,7 @@ static __inline__ void cheetah_flush_itlb_all(void) * ASI_{D,I}TLB_DATA_ACCESS loads, doing the load twice fixes * the problem for me. -DaveM */ -static __inline__ unsigned long cheetah_get_ldtlb_data(int entry) +static inline unsigned long cheetah_get_ldtlb_data(int entry) { unsigned long data; @@ -215,7 +214,7 @@ static __inline__ unsigned long cheetah_get_ldtlb_data(int entry) return data; } -static __inline__ unsigned long cheetah_get_litlb_data(int entry) +static inline unsigned long cheetah_get_litlb_data(int entry) { unsigned long data; @@ -228,7 +227,7 @@ static __inline__ unsigned long cheetah_get_litlb_data(int entry) return data; } -static __inline__ unsigned long cheetah_get_ldtlb_tag(int entry) +static inline unsigned long cheetah_get_ldtlb_tag(int entry) { unsigned long tag; @@ -240,7 +239,7 @@ static __inline__ unsigned long cheetah_get_ldtlb_tag(int entry) return tag; } -static __inline__ unsigned long cheetah_get_litlb_tag(int entry) +static inline unsigned long cheetah_get_litlb_tag(int entry) { unsigned long tag; @@ -252,7 +251,7 @@ static __inline__ unsigned long cheetah_get_litlb_tag(int entry) return tag; } -static __inline__ void cheetah_put_ldtlb_data(int entry, unsigned long data) +static inline void cheetah_put_ldtlb_data(int entry, unsigned long data) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -262,7 +261,7 @@ static __inline__ void cheetah_put_ldtlb_data(int entry, unsigned long data) "i" (ASI_DTLB_DATA_ACCESS)); } -static __inline__ void cheetah_put_litlb_data(int entry, unsigned long data) +static inline void cheetah_put_litlb_data(int entry, unsigned long data) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -272,7 +271,7 @@ static __inline__ void cheetah_put_litlb_data(int entry, unsigned long data) "i" (ASI_ITLB_DATA_ACCESS)); } -static __inline__ unsigned long cheetah_get_dtlb_data(int entry, int tlb) +static inline unsigned long cheetah_get_dtlb_data(int entry, int tlb) { unsigned long data; @@ -284,7 +283,7 @@ static __inline__ unsigned long cheetah_get_dtlb_data(int entry, int tlb) return data; } -static __inline__ unsigned long cheetah_get_dtlb_tag(int entry, int tlb) +static inline unsigned long cheetah_get_dtlb_tag(int entry, int tlb) { unsigned long tag; @@ -294,7 +293,7 @@ static __inline__ unsigned long cheetah_get_dtlb_tag(int entry, int tlb) return tag; } -static __inline__ void cheetah_put_dtlb_data(int entry, unsigned long data, int tlb) +static inline void cheetah_put_dtlb_data(int entry, unsigned long data, int tlb) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" @@ -304,7 +303,7 @@ static __inline__ void cheetah_put_dtlb_data(int entry, unsigned long data, int "i" (ASI_DTLB_DATA_ACCESS)); } -static __inline__ unsigned long cheetah_get_itlb_data(int entry) +static inline unsigned long cheetah_get_itlb_data(int entry) { unsigned long data; @@ -317,7 +316,7 @@ static __inline__ unsigned long cheetah_get_itlb_data(int entry) return data; } -static __inline__ unsigned long cheetah_get_itlb_tag(int entry) +static inline unsigned long cheetah_get_itlb_tag(int entry) { unsigned long tag; @@ -327,7 +326,7 @@ static __inline__ unsigned long cheetah_get_itlb_tag(int entry) return tag; } -static __inline__ void cheetah_put_itlb_data(int entry, unsigned long data) +static inline void cheetah_put_itlb_data(int entry, unsigned long data) { __asm__ __volatile__("stxa %0, [%1] %2\n\t" "membar #Sync" diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 3f175fa7e6d2..159e62b51d70 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h @@ -1,4 +1,3 @@ -/* $Id: system.h,v 1.69 2002/02/09 19:49:31 davem Exp $ */ #ifndef __SPARC64_SYSTEM_H #define __SPARC64_SYSTEM_H @@ -240,7 +239,7 @@ static inline unsigned long xchg64(__volatile__ unsigned long *m, unsigned long extern void __xchg_called_with_bad_pointer(void); -static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr, +static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) { switch (size) { @@ -263,7 +262,7 @@ extern void die_if_kernel(char *str, struct pt_regs *regs) __attribute__ ((noret #define __HAVE_ARCH_CMPXCHG 1 -static __inline__ unsigned long +static inline unsigned long __cmpxchg_u32(volatile int *m, int old, int new) { __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n" @@ -276,7 +275,7 @@ __cmpxchg_u32(volatile int *m, int old, int new) return new; } -static __inline__ unsigned long +static inline unsigned long __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) { __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n" @@ -293,7 +292,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) if something tries to do an invalid cmpxchg(). */ extern void __cmpxchg_called_with_bad_pointer(void); -static __inline__ unsigned long +static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) { switch (size) { diff --git a/include/asm-sparc64/upa.h b/include/asm-sparc64/upa.h index 7ae09a22e408..5b1633223f92 100644 --- a/include/asm-sparc64/upa.h +++ b/include/asm-sparc64/upa.h @@ -1,4 +1,3 @@ -/* $Id: upa.h,v 1.3 1999/09/21 14:39:47 davem Exp $ */ #ifndef _SPARC64_UPA_H #define _SPARC64_UPA_H @@ -25,7 +24,7 @@ /* UPA I/O space accessors */ #if defined(__KERNEL__) && !defined(__ASSEMBLY__) -static __inline__ unsigned char _upa_readb(unsigned long addr) +static inline unsigned char _upa_readb(unsigned long addr) { unsigned char ret; @@ -36,7 +35,7 @@ static __inline__ unsigned char _upa_readb(unsigned long addr) return ret; } -static __inline__ unsigned short _upa_readw(unsigned long addr) +static inline unsigned short _upa_readw(unsigned long addr) { unsigned short ret; @@ -47,7 +46,7 @@ static __inline__ unsigned short _upa_readw(unsigned long addr) return ret; } -static __inline__ unsigned int _upa_readl(unsigned long addr) +static inline unsigned int _upa_readl(unsigned long addr) { unsigned int ret; @@ -58,7 +57,7 @@ static __inline__ unsigned int _upa_readl(unsigned long addr) return ret; } -static __inline__ unsigned long _upa_readq(unsigned long addr) +static inline unsigned long _upa_readq(unsigned long addr) { unsigned long ret; @@ -69,28 +68,28 @@ static __inline__ unsigned long _upa_readq(unsigned long addr) return ret; } -static __inline__ void _upa_writeb(unsigned char b, unsigned long addr) +static inline void _upa_writeb(unsigned char b, unsigned long addr) { __asm__ __volatile__("stba\t%0, [%1] %2\t/* upa_writeb */" : /* no outputs */ : "r" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static __inline__ void _upa_writew(unsigned short w, unsigned long addr) +static inline void _upa_writew(unsigned short w, unsigned long addr) { __asm__ __volatile__("stha\t%0, [%1] %2\t/* upa_writew */" : /* no outputs */ : "r" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static __inline__ void _upa_writel(unsigned int l, unsigned long addr) +static inline void _upa_writel(unsigned int l, unsigned long addr) { __asm__ __volatile__("stwa\t%0, [%1] %2\t/* upa_writel */" : /* no outputs */ : "r" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); } -static __inline__ void _upa_writeq(unsigned long q, unsigned long addr) +static inline void _upa_writeq(unsigned long q, unsigned long addr) { __asm__ __volatile__("stxa\t%0, [%1] %2\t/* upa_writeq */" : /* no outputs */ diff --git a/include/asm-sparc64/visasm.h b/include/asm-sparc64/visasm.h index a74078551e0f..34f2ec64933b 100644 --- a/include/asm-sparc64/visasm.h +++ b/include/asm-sparc64/visasm.h @@ -1,4 +1,3 @@ -/* $Id: visasm.h,v 1.5 2001/04/24 01:09:12 davem Exp $ */ #ifndef _SPARC64_VISASM_H #define _SPARC64_VISASM_H @@ -44,7 +43,7 @@ wr %o5, 0, %fprs; #ifndef __ASSEMBLY__ -static __inline__ void save_and_clear_fpu(void) { +static inline void save_and_clear_fpu(void) { __asm__ __volatile__ ( " rd %%fprs, %%o5\n" " andcc %%o5, %0, %%g0\n" diff --git a/include/asm-um/unistd.h b/include/asm-um/unistd.h index 732c83f04c3d..38bd9d94ee46 100644 --- a/include/asm-um/unistd.h +++ b/include/asm-um/unistd.h @@ -14,7 +14,6 @@ extern int um_execve(const char *file, char *const argv[], char *const env[]); #ifdef __KERNEL__ /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ -#define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_SYS_ALARM #define __ARCH_WANT_SYS_GETHOSTNAME diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h index 36ebb5b02b4f..0b40f6d20bea 100644 --- a/include/asm-x86/bitops_32.h +++ b/include/asm-x86/bitops_32.h @@ -183,9 +183,12 @@ static inline int test_and_set_bit(int nr, volatile unsigned long * addr) * @nr: Bit to set * @addr: Address to count from * - * This is the same as test_and_set_bit on x86 + * This is the same as test_and_set_bit on x86. */ -#define test_and_set_bit_lock test_and_set_bit +static inline int test_and_set_bit_lock(int nr, volatile unsigned long *addr) +{ + return test_and_set_bit(nr, addr); +} /** * __test_and_set_bit - Set a bit and return its old value diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h index b4d47940b959..766bcc0470a6 100644 --- a/include/asm-x86/bitops_64.h +++ b/include/asm-x86/bitops_64.h @@ -29,7 +29,7 @@ * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -static __inline__ void set_bit(int nr, volatile void * addr) +static inline void set_bit(int nr, volatile void *addr) { __asm__ __volatile__( LOCK_PREFIX "btsl %1,%0" @@ -46,7 +46,7 @@ static __inline__ void set_bit(int nr, volatile void * addr) * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ -static __inline__ void __set_bit(int nr, volatile void * addr) +static inline void __set_bit(int nr, volatile void *addr) { __asm__ volatile( "btsl %1,%0" @@ -64,7 +64,7 @@ static __inline__ void __set_bit(int nr, volatile void * addr) * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() * in order to ensure changes are visible on other processors. */ -static __inline__ void clear_bit(int nr, volatile void * addr) +static inline void clear_bit(int nr, volatile void *addr) { __asm__ __volatile__( LOCK_PREFIX "btrl %1,%0" @@ -86,7 +86,7 @@ static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *ad clear_bit(nr, addr); } -static __inline__ void __clear_bit(int nr, volatile void * addr) +static inline void __clear_bit(int nr, volatile void *addr) { __asm__ __volatile__( "btrl %1,%0" @@ -124,7 +124,7 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ -static __inline__ void __change_bit(int nr, volatile void * addr) +static inline void __change_bit(int nr, volatile void *addr) { __asm__ __volatile__( "btcl %1,%0" @@ -141,7 +141,7 @@ static __inline__ void __change_bit(int nr, volatile void * addr) * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -static __inline__ void change_bit(int nr, volatile void * addr) +static inline void change_bit(int nr, volatile void *addr) { __asm__ __volatile__( LOCK_PREFIX "btcl %1,%0" @@ -157,7 +157,7 @@ static __inline__ void change_bit(int nr, volatile void * addr) * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -static __inline__ int test_and_set_bit(int nr, volatile void * addr) +static inline int test_and_set_bit(int nr, volatile void *addr) { int oldbit; @@ -173,9 +173,12 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr) * @nr: Bit to set * @addr: Address to count from * - * This is the same as test_and_set_bit on x86 + * This is the same as test_and_set_bit on x86. */ -#define test_and_set_bit_lock test_and_set_bit +static inline int test_and_set_bit_lock(int nr, volatile void *addr) +{ + return test_and_set_bit(nr, addr); +} /** * __test_and_set_bit - Set a bit and return its old value @@ -186,7 +189,7 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr) * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -static __inline__ int __test_and_set_bit(int nr, volatile void * addr) +static inline int __test_and_set_bit(int nr, volatile void *addr) { int oldbit; @@ -205,7 +208,7 @@ static __inline__ int __test_and_set_bit(int nr, volatile void * addr) * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -static __inline__ int test_and_clear_bit(int nr, volatile void * addr) +static inline int test_and_clear_bit(int nr, volatile void *addr) { int oldbit; @@ -225,7 +228,7 @@ static __inline__ int test_and_clear_bit(int nr, volatile void * addr) * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) +static inline int __test_and_clear_bit(int nr, volatile void *addr) { int oldbit; @@ -237,7 +240,7 @@ static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) } /* WARNING: non atomic and it can be reordered! */ -static __inline__ int __test_and_change_bit(int nr, volatile void * addr) +static inline int __test_and_change_bit(int nr, volatile void *addr) { int oldbit; @@ -256,7 +259,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile void * addr) * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -static __inline__ int test_and_change_bit(int nr, volatile void * addr) +static inline int test_and_change_bit(int nr, volatile void *addr) { int oldbit; @@ -273,15 +276,15 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr) * @nr: bit number to test * @addr: Address to start counting from */ -static int test_bit(int nr, const volatile void * addr); +static int test_bit(int nr, const volatile void *addr); #endif -static __inline__ int constant_test_bit(int nr, const volatile void * addr) +static inline int constant_test_bit(int nr, const volatile void *addr) { return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; } -static __inline__ int variable_test_bit(int nr, volatile const void * addr) +static inline int variable_test_bit(int nr, volatile const void *addr) { int oldbit; @@ -299,10 +302,10 @@ static __inline__ int variable_test_bit(int nr, volatile const void * addr) #undef ADDR -extern long find_first_zero_bit(const unsigned long * addr, unsigned long size); -extern long find_next_zero_bit (const unsigned long * addr, long size, long offset); -extern long find_first_bit(const unsigned long * addr, unsigned long size); -extern long find_next_bit(const unsigned long * addr, long size, long offset); +extern long find_first_zero_bit(const unsigned long *addr, unsigned long size); +extern long find_next_zero_bit(const unsigned long *addr, long size, long offset); +extern long find_first_bit(const unsigned long *addr, unsigned long size); +extern long find_next_bit(const unsigned long *addr, long size, long offset); /* return index of first bet set in val or max when no bit is set */ static inline long __scanbit(unsigned long val, unsigned long max) @@ -363,7 +366,7 @@ static inline void __clear_bit_string(unsigned long *bitmap, unsigned long i, * * Undefined if no zero exists, so code should check against ~0UL first. */ -static __inline__ unsigned long ffz(unsigned long word) +static inline unsigned long ffz(unsigned long word) { __asm__("bsfq %1,%0" :"=r" (word) @@ -377,7 +380,7 @@ static __inline__ unsigned long ffz(unsigned long word) * * Undefined if no bit exists, so code should check against 0 first. */ -static __inline__ unsigned long __ffs(unsigned long word) +static inline unsigned long __ffs(unsigned long word) { __asm__("bsfq %1,%0" :"=r" (word) @@ -391,7 +394,7 @@ static __inline__ unsigned long __ffs(unsigned long word) * * Undefined if no zero exists, so code should check against ~0UL first. */ -static __inline__ unsigned long __fls(unsigned long word) +static inline unsigned long __fls(unsigned long word) { __asm__("bsrq %1,%0" :"=r" (word) @@ -411,7 +414,7 @@ static __inline__ unsigned long __fls(unsigned long word) * the libc and compiler builtin ffs routines, therefore * differs in spirit from the above ffz (man ffs). */ -static __inline__ int ffs(int x) +static inline int ffs(int x) { int r; @@ -427,7 +430,7 @@ static __inline__ int ffs(int x) * * This is defined the same way as fls. */ -static __inline__ int fls64(__u64 x) +static inline int fls64(__u64 x) { if (x == 0) return 0; @@ -440,7 +443,7 @@ static __inline__ int fls64(__u64 x) * * This is defined the same way as ffs. */ -static __inline__ int fls(int x) +static inline int fls(int x) { int r; diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h index f948491eb56a..9c5092b6aa9f 100644 --- a/include/asm-x86/lguest_hcall.h +++ b/include/asm-x86/lguest_hcall.h @@ -18,12 +18,17 @@ #define LHCALL_LOAD_TLS 16 #define LHCALL_NOTIFY 17 +#define LGUEST_TRAP_ENTRY 0x1F + +#ifndef __ASSEMBLY__ +#include <asm/hw_irq.h> + /*G:031 First, how does our Guest contact the Host to ask for privileged * operations? There are two ways: the direct way is to make a "hypercall", * to make requests of the Host Itself. * * Our hypercall mechanism uses the highest unused trap code (traps 32 and - * above are used by real hardware interrupts). Seventeen hypercalls are + * above are used by real hardware interrupts). Fifteen hypercalls are * available: the hypercall number is put in the %eax register, and the * arguments (when required) are placed in %edx, %ebx and %ecx. If a return * value makes sense, it's returned in %eax. @@ -31,20 +36,15 @@ * Grossly invalid calls result in Sudden Death at the hands of the vengeful * Host, rather than returning failure. This reflects Winston Churchill's * definition of a gentleman: "someone who is only rude intentionally". */ -#define LGUEST_TRAP_ENTRY 0x1F - -#ifndef __ASSEMBLY__ -#include <asm/hw_irq.h> - static inline unsigned long hcall(unsigned long call, unsigned long arg1, unsigned long arg2, unsigned long arg3) { /* "int" is the Intel instruction to trigger a trap. */ asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) - /* The call is in %eax (aka "a"), and can be replaced */ + /* The call in %eax (aka "a") might be overwritten */ : "=a"(call) - /* The other arguments are in %eax, %edx, %ebx & %ecx */ + /* The arguments are in %eax, %edx, %ebx & %ecx */ : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3) /* "memory" means this might write somewhere in memory. * This isn't true for all calls, but it's safe to tell diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h index 7056d8684522..e10b7affdfe5 100644 --- a/include/asm-x86/smp_32.h +++ b/include/asm-x86/smp_32.h @@ -94,9 +94,12 @@ static inline void smp_send_reschedule(int cpu) { smp_ops.smp_send_reschedule(cpu); } -extern int smp_call_function_mask(cpumask_t mask, - void (*func) (void *info), void *info, - int wait); +static inline int smp_call_function_mask(cpumask_t mask, + void (*func) (void *info), void *info, + int wait) +{ + return smp_ops.smp_call_function_mask(mask, func, info, wait); +} void native_smp_prepare_boot_cpu(void); void native_smp_prepare_cpus(unsigned int max_cpus); diff --git a/include/asm-xtensa/dma-mapping.h b/include/asm-xtensa/dma-mapping.h index 8bd9d2c02a24..3c7d537dd15d 100644 --- a/include/asm-xtensa/dma-mapping.h +++ b/include/asm-xtensa/dma-mapping.h @@ -11,10 +11,10 @@ #ifndef _XTENSA_DMA_MAPPING_H #define _XTENSA_DMA_MAPPING_H -#include <asm/scatterlist.h> #include <asm/cache.h> #include <asm/io.h> #include <linux/mm.h> +#include <linux/scatterlist.h> /* * DMA-consistent mapping functions. diff --git a/include/linux/ata.h b/include/linux/ata.h index 8263a7b74d34..128dc7ad4901 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -180,6 +180,7 @@ enum { ATA_CMD_VERIFY_EXT = 0x42, ATA_CMD_STANDBYNOW1 = 0xE0, ATA_CMD_IDLEIMMEDIATE = 0xE1, + ATA_CMD_SLEEP = 0xE6, ATA_CMD_INIT_DEV_PARAMS = 0x91, ATA_CMD_READ_NATIVE_MAX = 0xF8, ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, @@ -235,6 +236,7 @@ enum { /* SETFEATURE Sector counts for SATA features */ SATA_AN = 0x05, /* Asynchronous Notification */ + SATA_DIPM = 0x03, /* Device Initiated Power Management */ /* ATAPI stuff */ ATAPI_PKT_DMA = (1 << 0), @@ -377,6 +379,26 @@ struct ata_taskfile { #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) +static inline bool ata_id_has_hipm(const u16 *id) +{ + u16 val = id[76]; + + if (val == 0 || val == 0xffff) + return false; + + return val & (1 << 9); +} + +static inline bool ata_id_has_dipm(const u16 *id) +{ + u16 val = id[78]; + + if (val == 0 || val == 0xffff) + return false; + + return val & (1 << 3); +} + static inline int ata_id_has_fua(const u16 *id) { if ((id[84] & 0xC000) != 0x4000) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index bbf906a0b419..8396db24d019 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -341,7 +341,6 @@ enum blk_queue_state { struct blk_queue_tag { struct request **tag_index; /* map of busy tags */ unsigned long *tag_map; /* bit map of free/busy tags */ - struct list_head busy_list; /* fifo list of busy tags */ int busy; /* current depth */ int max_depth; /* what we will send to device */ int real_max_depth; /* what the array can hold */ @@ -435,6 +434,7 @@ struct request_queue unsigned int dma_alignment; struct blk_queue_tag *queue_tags; + struct list_head tag_busy_list; unsigned int nr_sorted; unsigned int in_flight; diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index c83534ee1e79..0365ec9fc0c9 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -59,7 +59,6 @@ extern void *__alloc_bootmem_core(struct bootmem_data *bdata, unsigned long align, unsigned long goal, unsigned long limit); -extern void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size); #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE extern void reserve_bootmem(unsigned long addr, unsigned long size); diff --git a/include/linux/compiler.h b/include/linux/compiler.h index c811c8b979ac..c68b67b86ef1 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -101,6 +101,12 @@ extern void __chk_io_ptr(const volatile void __iomem *); #undef __must_check #define __must_check #endif +#ifndef CONFIG_ENABLE_WARN_DEPRECATED +#undef __deprecated +#undef __deprecated_for_modules +#define __deprecated +#define __deprecated_for_modules +#endif /* * Allow us to avoid 'defined but not used' warnings on functions and data, diff --git a/include/linux/completion.h b/include/linux/completion.h index 268c5a4a2bd4..33d6aaf94447 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -42,15 +42,15 @@ static inline void init_completion(struct completion *x) init_waitqueue_head(&x->wait); } -extern void FASTCALL(wait_for_completion(struct completion *)); -extern int FASTCALL(wait_for_completion_interruptible(struct completion *x)); -extern unsigned long FASTCALL(wait_for_completion_timeout(struct completion *x, - unsigned long timeout)); -extern unsigned long FASTCALL(wait_for_completion_interruptible_timeout( - struct completion *x, unsigned long timeout)); - -extern void FASTCALL(complete(struct completion *)); -extern void FASTCALL(complete_all(struct completion *)); +extern void wait_for_completion(struct completion *); +extern int wait_for_completion_interruptible(struct completion *x); +extern unsigned long wait_for_completion_timeout(struct completion *x, + unsigned long timeout); +extern unsigned long wait_for_completion_interruptible_timeout( + struct completion *x, unsigned long timeout); + +extern void complete(struct completion *); +extern void complete_all(struct completion *); #define INIT_COMPLETION(x) ((x).done = 0) diff --git a/include/linux/dccp.h b/include/linux/dccp.h index f3fc4392e93d..333c3ea82a5d 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -144,6 +144,8 @@ enum dccp_reset_codes { DCCP_RESET_CODE_TOO_BUSY, DCCP_RESET_CODE_BAD_INIT_COOKIE, DCCP_RESET_CODE_AGGRESSION_PENALTY, + + DCCP_MAX_RESET_CODES /* Leave at the end! */ }; /* DCCP options */ @@ -270,10 +272,9 @@ static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) return memset(skb_transport_header(skb), 0, headlen); } -static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) +static inline struct dccp_hdr_ext *dccp_hdrx(const struct dccp_hdr *dh) { - return (struct dccp_hdr_ext *)(skb_transport_header(skb) + - sizeof(struct dccp_hdr)); + return (struct dccp_hdr_ext *)((unsigned char *)dh + sizeof(*dh)); } static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) @@ -287,13 +288,12 @@ static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb) return __dccp_basic_hdr_len(dh); } -static inline __u64 dccp_hdr_seq(const struct sk_buff *skb) +static inline __u64 dccp_hdr_seq(const struct dccp_hdr *dh) { - const struct dccp_hdr *dh = dccp_hdr(skb); __u64 seq_nr = ntohs(dh->dccph_seq); if (dh->dccph_x != 0) - seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low); + seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(dh)->dccph_seq_low); else seq_nr += (u32)dh->dccph_seq2 << 16; diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index d2a96cbf4f0e..cf79853967ff 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -32,18 +32,13 @@ * On x86-64 make the 64bit structure have the same alignment as the * 32bit structure. This makes 32bit emulation easier. * - * UML/x86_64 needs the same packing as x86_64 - UML + UML_X86 + - * 64_BIT adds up to UML/x86_64. + * UML/x86_64 needs the same packing as x86_64 */ #ifdef __x86_64__ #define EPOLL_PACKED __attribute__((packed)) #else -#if defined(CONFIG_UML) && defined(CONFIG_UML_X86) && defined(CONFIG_64BIT) -#define EPOLL_PACKED __attribute__((packed)) -#else #define EPOLL_PACKED #endif -#endif struct epoll_event { __u32 events; diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 8beb29134626..175e63f4a8c0 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h @@ -12,8 +12,8 @@ #define LG_CLOCK_MAX_DELTA ULONG_MAX /*G:032 The second method of communicating with the Host is to via "struct - * lguest_data". The Guest's very first hypercall is to tell the Host where - * this is, and then the Guest and Host both publish information in it. :*/ + * lguest_data". Once the Guest's initialization hypercall tells the Host where + * this is, the Guest and Host both publish information in it. :*/ struct lguest_data { /* 512 == enabled (same as eflags in normal hardware). The Guest diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index 61e1e3e6b1cc..697104da91f1 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h @@ -1,17 +1,7 @@ -#ifndef _ASM_LGUEST_USER -#define _ASM_LGUEST_USER +#ifndef _LINUX_LGUEST_LAUNCHER +#define _LINUX_LGUEST_LAUNCHER /* Everything the "lguest" userspace program needs to know. */ #include <linux/types.h> -/* They can register up to 32 arrays of lguest_dma. */ -#define LGUEST_MAX_DMA 32 -/* At most we can dma 16 lguest_dma in one op. */ -#define LGUEST_MAX_DMA_SECTIONS 16 - -/* How many devices? Assume each one wants up to two dma arrays per device. */ -#define LGUEST_MAX_DEVICES (LGUEST_MAX_DMA/2) - -/* Where the Host expects the Guest to SEND_DMA console output to. */ -#define LGUEST_CONSOLE_DMA_KEY 0 /*D:010 * Drivers @@ -20,7 +10,11 @@ * real devices (think of the damage it could do!) we provide virtual devices. * We could emulate a PCI bus with various devices on it, but that is a fairly * complex burden for the Host and suboptimal for the Guest, so we have our own - * "lguest" bus and simple drivers. + * simple lguest bus and we use "virtio" drivers. These drivers need a set of + * routines from us which will actually do the virtual I/O, but they handle all + * the net/block/console stuff themselves. This means that if we want to add + * a new device, we simply need to write a new virtio driver and create support + * for it in the Launcher: this code won't need to change. * * Devices are described by a simplified ID, a status byte, and some "config" * bytes which describe this device's configuration. This is placed by the @@ -51,9 +45,9 @@ struct lguest_vqconfig { /* Write command first word is a request. */ enum lguest_req { - LHREQ_INITIALIZE, /* + pfnlimit, pgdir, start, pageoffset */ + LHREQ_INITIALIZE, /* + base, pfnlimit, pgdir, start */ LHREQ_GETDMA, /* No longer used */ LHREQ_IRQ, /* + irq */ LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */ }; -#endif /* _ASM_LGUEST_USER */ +#endif /* _LINUX_LGUEST_LAUNCHER */ diff --git a/include/linux/libata.h b/include/linux/libata.h index 6fd24e03622e..147ccc40c8af 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -133,11 +133,14 @@ enum { ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ ATA_DFLAG_AN = (1 << 7), /* AN configured */ + ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */ + ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */ ATA_DFLAG_CFG_MASK = (1 << 12) - 1, ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */ ATA_DFLAG_NCQ_OFF = (1 << 13), /* device limited to non-NCQ mode */ ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */ + ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ ATA_DFLAG_INIT_MASK = (1 << 16) - 1, ATA_DFLAG_DETACH = (1 << 16), @@ -185,6 +188,7 @@ enum { ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ ATA_FLAG_AN = (1 << 18), /* controller supports AN */ ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ + ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */ /* The following flag belongs to ap->pflags but is kept in * ap->flags because it's referenced in many LLDs and will be @@ -234,6 +238,13 @@ enum { ATA_TMOUT_INTERNAL = 30 * HZ, ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, + /* FIXME: GoVault needs 2s but we can't afford that without + * parallel probing. 800ms is enough for iVDR disk + * HHD424020F7SV00. Increase to 2secs when parallel probing + * is in place. + */ + ATA_TMOUT_FF_WAIT = 4 * HZ / 5, + /* ATA bus states */ BUS_UNKNOWN = 0, BUS_DMA = 1, @@ -294,6 +305,7 @@ enum { ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ ATA_EHI_QUIET = (1 << 3), /* be quiet */ + ATA_EHI_LPM = (1 << 4), /* link power management action */ ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ @@ -325,6 +337,7 @@ enum { ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ + ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ /* DMA mask for user DMA control: User visible values; DO NOT renumber */ @@ -370,6 +383,18 @@ typedef int (*ata_reset_fn_t)(struct ata_link *link, unsigned int *classes, unsigned long deadline); typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes); +/* + * host pm policy: If you alter this, you also need to alter libata-scsi.c + * (for the ascii descriptions) + */ +enum link_pm { + NOT_AVAILABLE, + MIN_POWER, + MAX_PERFORMANCE, + MEDIUM_POWER, +}; +extern struct class_device_attribute class_device_attr_link_power_management_policy; + struct ata_ioports { void __iomem *cmd_addr; void __iomem *data_addr; @@ -616,6 +641,7 @@ struct ata_port { pm_message_t pm_mesg; int *pm_result; + enum link_pm pm_policy; struct timer_list fastdrain_timer; unsigned long fastdrain_cnt; @@ -683,7 +709,8 @@ struct ata_port_operations { int (*port_suspend) (struct ata_port *ap, pm_message_t mesg); int (*port_resume) (struct ata_port *ap); - + int (*enable_pm) (struct ata_port *ap, enum link_pm policy); + void (*disable_pm) (struct ata_port *ap); int (*port_start) (struct ata_port *ap); void (*port_stop) (struct ata_port *ap); @@ -799,6 +826,7 @@ extern void ata_host_resume(struct ata_host *host); extern int ata_ratelimit(void); extern int ata_busy_sleep(struct ata_port *ap, unsigned long timeout_pat, unsigned long timeout); +extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline); extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, void *data, unsigned long delay); diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 3f272396642b..8df230a279a0 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h @@ -8,6 +8,9 @@ #define MV643XX_ETH_NAME "mv643xx_eth" #define MV643XX_ETH_SHARED_REGS 0x2000 #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 +#define MV643XX_ETH_BAR_4 0x220 +#define MV643XX_ETH_SIZE_REG_4 0x224 +#define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x0290 struct mv643xx_eth_platform_data { int port_number; diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c4de536cefa3..9b0c8f12373e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -390,7 +390,7 @@ static inline void napi_complete(struct napi_struct *n) static inline void napi_disable(struct napi_struct *n) { while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) - msleep_interruptible(1); + msleep(1); } /** @@ -669,6 +669,8 @@ struct net_device #define HAVE_SET_MAC_ADDR int (*set_mac_address)(struct net_device *dev, void *addr); +#define HAVE_VALIDATE_ADDR + int (*validate_addr)(struct net_device *dev); #define HAVE_PRIVATE_IOCTL int (*do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4e10a074ca56..e44aac8cf5ff 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1236,6 +1236,10 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 +#define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760 +#define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 +#define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 +#define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 #define PCI_VENDOR_ID_IMS 0x10e0 #define PCI_DEVICE_ID_IMS_TT128 0x9128 diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index df7ddcee7c4b..32326c293d7b 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -1,6 +1,7 @@ #ifndef _LINUX_SCATTERLIST_H #define _LINUX_SCATTERLIST_H +#include <asm/types.h> #include <asm/scatterlist.h> #include <linux/mm.h> #include <linux/string.h> @@ -26,18 +27,16 @@ #define SG_MAGIC 0x87654321 /** - * sg_set_page - Set sg entry to point at given page - * @sg: SG entry - * @page: The page + * sg_assign_page - Assign a given page to an SG entry + * @sg: SG entry + * @page: The page * * Description: - * Use this function to set an sg entry pointing at a page, never assign - * the page directly. We encode sg table information in the lower bits - * of the page pointer. See sg_page() for looking up the page belonging - * to an sg entry. + * Assign page to sg entry. Also see sg_set_page(), the most commonly used + * variant. * **/ -static inline void sg_set_page(struct scatterlist *sg, struct page *page) +static inline void sg_assign_page(struct scatterlist *sg, struct page *page) { unsigned long page_link = sg->page_link & 0x3; @@ -52,6 +51,28 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page) sg->page_link = page_link | (unsigned long) page; } +/** + * sg_set_page - Set sg entry to point at given page + * @sg: SG entry + * @page: The page + * @len: Length of data + * @offset: Offset into page + * + * Description: + * Use this function to set an sg entry pointing at a page, never assign + * the page directly. We encode sg table information in the lower bits + * of the page pointer. See sg_page() for looking up the page belonging + * to an sg entry. + * + **/ +static inline void sg_set_page(struct scatterlist *sg, struct page *page, + unsigned int len, unsigned int offset) +{ + sg_assign_page(sg, page); + sg->offset = offset; + sg->length = len; +} + #define sg_page(sg) ((struct page *) ((sg)->page_link & ~0x3)) /** @@ -64,9 +85,7 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page) static inline void sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) { - sg_set_page(sg, virt_to_page(buf)); - sg->offset = offset_in_page(buf); - sg->length = buflen; + sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); } /* @@ -131,7 +150,7 @@ static inline struct scatterlist *sg_last(struct scatterlist *sgl, struct scatterlist *ret = &sgl[nents - 1]; #else struct scatterlist *sg, *ret = NULL; - int i; + unsigned int i; for_each_sg(sgl, sg, nents, i) ret = sg; @@ -160,7 +179,11 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, #ifndef ARCH_HAS_SG_CHAIN BUG(); #endif - prv[prv_nents - 1].page_link = (unsigned long) sgl | 0x01; + /* + * Set lowest bit to indicate a link pointer, and make sure to clear + * the termination bit if it happens to be set. + */ + prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02; } /** @@ -220,7 +243,7 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) sg_mark_end(sgl, nents); #ifdef CONFIG_DEBUG_SG { - int i; + unsigned int i; for (i = 0; i < nents; i++) sgl[i].sg_magic = SG_MAGIC; } @@ -237,7 +260,7 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) * on the sg page. * **/ -static inline unsigned long sg_phys(struct scatterlist *sg) +static inline dma_addr_t sg_phys(struct scatterlist *sg) { return page_to_phys(sg_page(sg)) + sg->offset; } diff --git a/include/linux/sched.h b/include/linux/sched.h index 13df99fb2769..3c07d595979f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -828,12 +828,17 @@ struct sched_class { struct task_struct * (*pick_next_task) (struct rq *rq); void (*put_prev_task) (struct rq *rq, struct task_struct *p); +#ifdef CONFIG_SMP unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, - struct rq *busiest, - unsigned long max_nr_move, unsigned long max_load_move, + struct rq *busiest, unsigned long max_load_move, struct sched_domain *sd, enum cpu_idle_type idle, int *all_pinned, int *this_best_prio); + int (*move_one_task) (struct rq *this_rq, int this_cpu, + struct rq *busiest, struct sched_domain *sd, + enum cpu_idle_type idle); +#endif + void (*set_curr_task) (struct rq *rq); void (*task_tick) (struct rq *rq, struct task_struct *p); void (*task_new) (struct rq *rq, struct task_struct *p); diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index fd4e12f24270..94e49915a8c0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -994,7 +994,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) * * Return the number of bytes of free space at the head of an &sk_buff. */ -static inline int skb_headroom(const struct sk_buff *skb) +static inline unsigned int skb_headroom(const struct sk_buff *skb) { return skb->data - skb->head; } @@ -1347,7 +1347,7 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, * Returns true if modifying the header part of the cloned buffer * does not requires the data to be copied. */ -static inline int skb_clone_writable(struct sk_buff *skb, int len) +static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len) { return !skb_header_cloned(skb) && skb_headroom(skb) + len <= skb->hdr_len; diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index 0013a0d8dc6b..87b895d5c786 100644 --- a/include/linux/sunrpc/rpc_rdma.h +++ b/include/linux/sunrpc/rpc_rdma.h @@ -41,17 +41,17 @@ #define _LINUX_SUNRPC_RPC_RDMA_H struct rpcrdma_segment { - uint32_t rs_handle; /* Registered memory handle */ - uint32_t rs_length; /* Length of the chunk in bytes */ - uint64_t rs_offset; /* Chunk virtual address or offset */ + __be32 rs_handle; /* Registered memory handle */ + __be32 rs_length; /* Length of the chunk in bytes */ + __be64 rs_offset; /* Chunk virtual address or offset */ }; /* * read chunk(s), encoded as a linked list. */ struct rpcrdma_read_chunk { - uint32_t rc_discrim; /* 1 indicates presence */ - uint32_t rc_position; /* Position in XDR stream */ + __be32 rc_discrim; /* 1 indicates presence */ + __be32 rc_position; /* Position in XDR stream */ struct rpcrdma_segment rc_target; }; @@ -66,29 +66,29 @@ struct rpcrdma_write_chunk { * write chunk(s), encoded as a counted array. */ struct rpcrdma_write_array { - uint32_t wc_discrim; /* 1 indicates presence */ - uint32_t wc_nchunks; /* Array count */ + __be32 wc_discrim; /* 1 indicates presence */ + __be32 wc_nchunks; /* Array count */ struct rpcrdma_write_chunk wc_array[0]; }; struct rpcrdma_msg { - uint32_t rm_xid; /* Mirrors the RPC header xid */ - uint32_t rm_vers; /* Version of this protocol */ - uint32_t rm_credit; /* Buffers requested/granted */ - uint32_t rm_type; /* Type of message (enum rpcrdma_proc) */ + __be32 rm_xid; /* Mirrors the RPC header xid */ + __be32 rm_vers; /* Version of this protocol */ + __be32 rm_credit; /* Buffers requested/granted */ + __be32 rm_type; /* Type of message (enum rpcrdma_proc) */ union { struct { /* no chunks */ - uint32_t rm_empty[3]; /* 3 empty chunk lists */ + __be32 rm_empty[3]; /* 3 empty chunk lists */ } rm_nochunks; struct { /* no chunks and padded */ - uint32_t rm_align; /* Padding alignment */ - uint32_t rm_thresh; /* Padding threshold */ - uint32_t rm_pempty[3]; /* 3 empty chunk lists */ + __be32 rm_align; /* Padding alignment */ + __be32 rm_thresh; /* Padding threshold */ + __be32 rm_pempty[3]; /* 3 empty chunk lists */ } rm_padded; - uint32_t rm_chunks[0]; /* read, write and reply chunks */ + __be32 rm_chunks[0]; /* read, write and reply chunks */ } rm_body; }; diff --git a/include/linux/types.h b/include/linux/types.h index 4f0dad21c917..f4f8d19158e4 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -37,6 +37,8 @@ typedef __kernel_gid32_t gid_t; typedef __kernel_uid16_t uid16_t; typedef __kernel_gid16_t gid16_t; +typedef unsigned long uintptr_t; + #ifdef CONFIG_UID16 /* This is defined by include/asm-{arch}/posix_types.h */ typedef __kernel_old_uid_t old_uid_t; diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 8228b57eb18f..4427dcd1e53a 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h @@ -26,7 +26,6 @@ #include <net/inet_connection_sock.h> #include <net/inet_sock.h> -#include <net/route.h> #include <net/sock.h> #include <net/tcp_states.h> @@ -266,11 +265,6 @@ out: wake_up(&hashinfo->lhash_wait); } -static inline int inet_iif(const struct sk_buff *skb) -{ - return ((struct rtable *)skb->dst)->rt_iif; -} - extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, const __be32 daddr, const unsigned short hnum, diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 62daf214931f..70013c5f4e59 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -24,6 +24,7 @@ #include <net/flow.h> #include <net/sock.h> #include <net/request_sock.h> +#include <net/route.h> /** struct ip_options - IP Options * @@ -190,4 +191,10 @@ static inline int inet_sk_ehashfn(const struct sock *sk) return inet_ehashfn(laddr, lport, faddr, fport); } + +static inline int inet_iif(const struct sk_buff *skb) +{ + return ((struct rtable *)skb->dst)->rt_iif; +} + #endif /* _INET_SOCK_H */ diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h index 8dabdd603fe1..eea2e6152389 100644 --- a/include/net/irda/ircomm_tty.h +++ b/include/net/irda/ircomm_tty.h @@ -127,7 +127,6 @@ extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg); extern void ircomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios); -extern hashbin_t *ircomm_tty; #endif diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 93aa87d32804..5279466606d2 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -102,11 +102,9 @@ static inline void release_net(struct net *net) #ifdef CONFIG_NET_NS #define __net_init #define __net_exit -#define __net_initdata #else #define __net_init __init #define __net_exit __exit_refok -#define __net_initdata __initdata #endif struct pernet_operations { diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a02ec9e5fea5..c9265518a378 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -316,4 +316,19 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) return rtab->data[slot]; } +#ifdef CONFIG_NET_CLS_ACT +static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask) +{ + struct sk_buff *n = skb_clone(skb, gfp_mask); + + if (n) { + n->tc_verd = SET_TC_VERD(n->tc_verd, 0); + n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); + n->tc_verd = CLR_TC_MUNGED(n->tc_verd); + n->iif = skb->iif; + } + return n; +} +#endif + #endif diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h index 4945954a16af..5db261a1e85e 100644 --- a/include/net/sctp/auth.h +++ b/include/net/sctp/auth.h @@ -88,7 +88,6 @@ static inline void sctp_auth_key_hold(struct sctp_auth_bytes *key) void sctp_auth_key_put(struct sctp_auth_bytes *key); struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp); -void sctp_auth_shkey_free(struct sctp_shared_key *sh_key); void sctp_auth_destroy_keys(struct list_head *keys); int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp); struct sctp_shared_key *sctp_auth_get_shkey( @@ -104,7 +103,7 @@ struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc); void sctp_auth_asoc_set_default_hmac(struct sctp_association *asoc, struct sctp_hmac_algo_param *hmacs); int sctp_auth_asoc_verify_hmac_id(const struct sctp_association *asoc, - __u16 hmac_id); + __be16 hmac_id); int sctp_auth_send_cid(sctp_cid_t chunk, const struct sctp_association *asoc); int sctp_auth_recv_cid(sctp_cid_t chunk, const struct sctp_association *asoc); void sctp_auth_calculate_hmac(const struct sctp_association *asoc, diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 119f5a1ed499..93eb708609e7 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -156,7 +156,6 @@ int sctp_primitive_ASCONF(struct sctp_association *, void *arg); __u32 sctp_start_cksum(__u8 *ptr, __u16 count); __u32 sctp_update_cksum(__u8 *ptr, __u16 count, __u32 cksum); __u32 sctp_end_cksum(__u32 cksum); -__u32 sctp_update_copy_cksum(__u8 *, __u8 *, __u16 count, __u32 cksum); /* * sctp/input.c diff --git a/include/net/tcp.h b/include/net/tcp.h index 92049e681258..d695cea7730d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -803,7 +803,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) return left <= tcp_max_burst(tp); } -static inline void tcp_minshall_update(struct tcp_sock *tp, int mss, +static inline void tcp_minshall_update(struct tcp_sock *tp, unsigned int mss, const struct sk_buff *skb) { if (skb->len < mss) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 688f6f5d3285..58dfa82889aa 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -37,6 +37,8 @@ extern struct sock *xfrm_nl; extern u32 sysctl_xfrm_aevent_etime; extern u32 sysctl_xfrm_aevent_rseqth; +extern int sysctl_xfrm_larval_drop; +extern u32 sysctl_xfrm_acq_expires; extern struct mutex xfrm_cfg_mutex; |