mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'linux-2.6'
This commit is contained in:
commit
9156ad4833
459 changed files with 4199 additions and 3005 deletions
|
|
@ -121,38 +121,32 @@
|
|||
|
||||
#define cpu_is_pxa21x() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa21x(id); \
|
||||
__cpu_is_pxa21x(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa25x() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa25x(id); \
|
||||
__cpu_is_pxa25x(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa27x() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa27x(id); \
|
||||
__cpu_is_pxa27x(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa300() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa300(id); \
|
||||
__cpu_is_pxa300(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa310() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa310(id); \
|
||||
__cpu_is_pxa310(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa320() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa320(id); \
|
||||
__cpu_is_pxa320(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
/*
|
||||
|
|
@ -174,14 +168,12 @@
|
|||
|
||||
#define cpu_is_pxa2xx() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa2xx(id); \
|
||||
__cpu_is_pxa2xx(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
#define cpu_is_pxa3xx() \
|
||||
({ \
|
||||
unsigned int id = read_cpuid(CPUID_ID); \
|
||||
__cpu_is_pxa3xx(id); \
|
||||
__cpu_is_pxa3xx(read_cpuid_id()); \
|
||||
})
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -75,8 +75,21 @@
|
|||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <linux/irqflags.h>
|
||||
|
||||
/*
|
||||
* The CPU ID never changes at run time, so we might as well tell the
|
||||
* compiler that it's constant. Use this function to read the CPU ID
|
||||
* rather than directly reading processor_id or read_cpuid() directly.
|
||||
*/
|
||||
static inline unsigned int read_cpuid_id(void) __attribute_const__;
|
||||
|
||||
static inline unsigned int read_cpuid_id(void)
|
||||
{
|
||||
return read_cpuid(CPUID_ID);
|
||||
}
|
||||
|
||||
#define __exception __attribute__((section(".exception.text")))
|
||||
|
||||
struct thread_info;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,11 @@
|
|||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/arch/page.h>
|
||||
#include <linux/const.h>
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT 13
|
||||
#ifndef __ASSEMBLY__
|
||||
#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
||||
#else
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#endif
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
|
||||
|
|
|
|||
|
|
@ -358,6 +358,7 @@
|
|||
#define __ARCH_WANT_SYS_SIGPENDING
|
||||
#define __ARCH_WANT_SYS_SIGPROCMASK
|
||||
#define __ARCH_WANT_SYS_RT_SIGACTION
|
||||
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
|
||||
|
||||
/*
|
||||
* "Conditional" syscalls
|
||||
|
|
|
|||
|
|
@ -86,9 +86,6 @@ tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
|
|||
static inline void
|
||||
tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
|
||||
{
|
||||
#ifdef CONFIG_QUICKLIST
|
||||
tlb->need_flush += &__get_cpu_var(quicklist)[0].nr_pages != 0;
|
||||
#endif
|
||||
tlb_flush_mmu(tlb, start, end);
|
||||
|
||||
/* keep the page table cache within bounds */
|
||||
|
|
|
|||
|
|
@ -1211,11 +1211,13 @@ xpc_IPI_init(int index)
|
|||
static inline enum xpc_retval
|
||||
xpc_map_bte_errors(bte_result_t error)
|
||||
{
|
||||
if (error == BTE_SUCCESS)
|
||||
return xpcSuccess;
|
||||
|
||||
if (is_shub2()) {
|
||||
if (BTE_VALID_SH2_ERROR(error))
|
||||
return xpcBteSh2Start + error;
|
||||
else
|
||||
return xpcBteUnmappedError;
|
||||
return xpcBteUnmappedError;
|
||||
}
|
||||
switch (error) {
|
||||
case BTE_SUCCESS: return xpcSuccess;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
#define Page_Invalidate_T 0x16
|
||||
|
||||
/*
|
||||
* R1000-specific cacheops
|
||||
* R10000-specific cacheops
|
||||
*
|
||||
* Cacheops 0x02, 0x06, 0x0a, 0x0c-0x0e, 0x16, 0x1a and 0x1e are unused.
|
||||
* Most of the _S cacheops are identical to the R4000SC _SD cacheops.
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ struct smtc_ipi_q {
|
|||
|
||||
static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p)
|
||||
{
|
||||
long flags;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&q->lock, flags);
|
||||
if (q->head == NULL)
|
||||
|
|
@ -98,7 +98,7 @@ static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q)
|
|||
|
||||
static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p)
|
||||
{
|
||||
long flags;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&q->lock, flags);
|
||||
if (q->head == NULL) {
|
||||
|
|
@ -114,7 +114,7 @@ static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p)
|
|||
|
||||
static inline int smtc_ipi_qdepth(struct smtc_ipi_q *q)
|
||||
{
|
||||
long flags;
|
||||
unsigned long flags;
|
||||
int retval;
|
||||
|
||||
spin_lock_irqsave(&q->lock, flags);
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ struct spufs_calls {
|
|||
__u32 __user *ustatus);
|
||||
int (*coredump_extra_notes_size)(void);
|
||||
int (*coredump_extra_notes_write)(struct file *file, loff_t *foffset);
|
||||
void (*notify_spus_active)(void);
|
||||
struct module *owner;
|
||||
};
|
||||
|
||||
|
|
@ -302,6 +303,9 @@ struct notifier_block;
|
|||
int spu_switch_event_register(struct notifier_block * n);
|
||||
int spu_switch_event_unregister(struct notifier_block * n);
|
||||
|
||||
extern void notify_spus_active(void);
|
||||
extern void do_notify_spus_active(void);
|
||||
|
||||
/*
|
||||
* This defines the Local Store, Problem Area and Privilege Area of an SPU.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ extern void __flush_purge_region(void *start, int size);
|
|||
extern void __flush_invalidate_region(void *start, int size);
|
||||
#endif
|
||||
|
||||
#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
|
||||
static inline void flush_kernel_dcache_page(struct page *page)
|
||||
{
|
||||
flush_dcache_page(page);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF)
|
||||
extern void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
|
|
|
|||
|
|
@ -73,38 +73,26 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
|
|||
/*
|
||||
* __access_ok: Check if address with size is OK or not.
|
||||
*
|
||||
* We do three checks:
|
||||
* (1) is it user space?
|
||||
* (2) addr + size --> carry?
|
||||
* (3) addr + size >= 0x80000000 (PAGE_OFFSET)
|
||||
* Uhhuh, this needs 33-bit arithmetic. We have a carry..
|
||||
*
|
||||
* (1) (2) (3) | RESULT
|
||||
* 0 0 0 | ok
|
||||
* 0 0 1 | ok
|
||||
* 0 1 0 | bad
|
||||
* 0 1 1 | bad
|
||||
* 1 0 0 | ok
|
||||
* 1 0 1 | bad
|
||||
* 1 1 0 | bad
|
||||
* 1 1 1 | bad
|
||||
* sum := addr + size; carry? --> flag = true;
|
||||
* if (sum >= addr_limit) flag = true;
|
||||
*/
|
||||
static inline int __access_ok(unsigned long addr, unsigned long size)
|
||||
{
|
||||
unsigned long flag, tmp;
|
||||
|
||||
__asm__("stc r7_bank, %0\n\t"
|
||||
"mov.l @(8,%0), %0\n\t"
|
||||
"clrt\n\t"
|
||||
"addc %2, %1\n\t"
|
||||
"and %1, %0\n\t"
|
||||
"rotcl %0\n\t"
|
||||
"rotcl %0\n\t"
|
||||
"and #3, %0"
|
||||
: "=&z" (flag), "=r" (tmp)
|
||||
: "r" (addr), "1" (size)
|
||||
: "t");
|
||||
unsigned long flag, sum;
|
||||
|
||||
__asm__("clrt\n\t"
|
||||
"addc %3, %1\n\t"
|
||||
"movt %0\n\t"
|
||||
"cmp/hi %4, %1\n\t"
|
||||
"rotcl %0"
|
||||
:"=&r" (flag), "=r" (sum)
|
||||
:"1" (addr), "r" (size),
|
||||
"r" (current_thread_info()->addr_limit.seg)
|
||||
:"t");
|
||||
return flag == 0;
|
||||
|
||||
}
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
|
|
|
|||
|
|
@ -25,15 +25,9 @@ struct dma_ops {
|
|||
void (*sync_single_for_cpu)(struct device *dev,
|
||||
dma_addr_t dma_handle, size_t size,
|
||||
enum dma_data_direction direction);
|
||||
void (*sync_single_for_device)(struct device *dev,
|
||||
dma_addr_t dma_handle, size_t size,
|
||||
enum dma_data_direction direction);
|
||||
void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg,
|
||||
int nelems,
|
||||
enum dma_data_direction direction);
|
||||
void (*sync_sg_for_device)(struct device *dev, struct scatterlist *sg,
|
||||
int nelems,
|
||||
enum dma_data_direction direction);
|
||||
};
|
||||
extern const struct dma_ops *dma_ops;
|
||||
|
||||
|
|
@ -105,7 +99,7 @@ static inline void dma_sync_single_for_device(struct device *dev,
|
|||
size_t size,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
dma_ops->sync_single_for_device(dev, dma_handle, size, direction);
|
||||
/* No flushing needed to sync cpu writes to the device. */
|
||||
}
|
||||
|
||||
static inline void dma_sync_single_range_for_cpu(struct device *dev,
|
||||
|
|
@ -123,7 +117,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
|
|||
size_t size,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
dma_sync_single_for_device(dev, dma_handle+offset, size, direction);
|
||||
/* No flushing needed to sync cpu writes to the device. */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -138,7 +132,7 @@ static inline void dma_sync_sg_for_device(struct device *dev,
|
|||
struct scatterlist *sg, int nelems,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
dma_ops->sync_sg_for_device(dev, sg, nelems, direction);
|
||||
/* No flushing needed to sync cpu writes to the device. */
|
||||
}
|
||||
|
||||
static inline int dma_mapping_error(dma_addr_t dma_addr)
|
||||
|
|
|
|||
|
|
@ -200,6 +200,10 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
|
|||
struct device_node;
|
||||
extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);
|
||||
|
||||
#define HAVE_ARCH_PCI_RESOURCE_TO_USER
|
||||
extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
|
||||
const struct resource *rsrc,
|
||||
resource_size_t *start, resource_size_t *end);
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __SPARC64_PCI_H */
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 val)
|
|||
} v;
|
||||
v.u = val;
|
||||
#ifdef CONFIG_X86_BSWAP
|
||||
asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||
: "=r" (v.s.a), "=r" (v.s.b)
|
||||
: "0" (v.s.a), "1" (v.s.b));
|
||||
#else
|
||||
v.s.a = ___arch__swab32(v.s.a);
|
||||
v.s.b = ___arch__swab32(v.s.b);
|
||||
asm("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
|
||||
__asm__("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
|
||||
#endif
|
||||
return v.u;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
#include <asm/msr-index.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <linux/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
|
@ -191,38 +195,6 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
|||
|
||||
#define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32)
|
||||
|
||||
/* wrmsr with exception handling */
|
||||
#define wrmsr_safe(msr,a,b) ({ int ret__; \
|
||||
asm volatile("2: wrmsr ; xorl %0,%0\n" \
|
||||
"1:\n\t" \
|
||||
".section .fixup,\"ax\"\n\t" \
|
||||
"3: movl %4,%0 ; jmp 1b\n\t" \
|
||||
".previous\n\t" \
|
||||
".section __ex_table,\"a\"\n" \
|
||||
" .align 8\n\t" \
|
||||
" .quad 2b,3b\n\t" \
|
||||
".previous" \
|
||||
: "=a" (ret__) \
|
||||
: "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \
|
||||
ret__; })
|
||||
|
||||
#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32))
|
||||
|
||||
#define rdmsr_safe(msr,a,b) \
|
||||
({ int ret__; \
|
||||
asm volatile ("1: rdmsr\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: movl %4,%0\n" \
|
||||
" jmp 2b\n" \
|
||||
".previous\n" \
|
||||
".section __ex_table,\"a\"\n" \
|
||||
" .align 8\n" \
|
||||
" .quad 1b,3b\n" \
|
||||
".previous":"=&bDS" (ret__), "=a"(*(a)), "=d"(*(b)) \
|
||||
:"c"(msr), "i"(-EIO), "0"(0)); \
|
||||
ret__; })
|
||||
|
||||
#define rdtsc(low,high) \
|
||||
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
|
||||
|
||||
|
|
@ -230,17 +202,17 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
|||
__asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
|
||||
|
||||
#define rdtscp(low,high,aux) \
|
||||
asm volatile (".byte 0x0f,0x01,0xf9" : "=a" (low), "=d" (high), "=c" (aux))
|
||||
__asm__ __volatile__ (".byte 0x0f,0x01,0xf9" : "=a" (low), "=d" (high), "=c" (aux))
|
||||
|
||||
#define rdtscll(val) do { \
|
||||
unsigned int __a,__d; \
|
||||
asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
|
||||
__asm__ __volatile__("rdtsc" : "=a" (__a), "=d" (__d)); \
|
||||
(val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
|
||||
} while(0)
|
||||
|
||||
#define rdtscpll(val, aux) do { \
|
||||
unsigned long __a, __d; \
|
||||
asm volatile (".byte 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); \
|
||||
__asm__ __volatile__ (".byte 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); \
|
||||
(val) = (__d << 32) | __a; \
|
||||
} while (0)
|
||||
|
||||
|
|
@ -253,6 +225,7 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
|||
: "=a" (low), "=d" (high) \
|
||||
: "c" (counter))
|
||||
|
||||
|
||||
static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx,
|
||||
unsigned int *ecx, unsigned int *edx)
|
||||
{
|
||||
|
|
@ -320,6 +293,40 @@ static inline unsigned int cpuid_edx(unsigned int op)
|
|||
return edx;
|
||||
}
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* wrmsr with exception handling */
|
||||
#define wrmsr_safe(msr,a,b) ({ int ret__; \
|
||||
asm volatile("2: wrmsr ; xorl %0,%0\n" \
|
||||
"1:\n\t" \
|
||||
".section .fixup,\"ax\"\n\t" \
|
||||
"3: movl %4,%0 ; jmp 1b\n\t" \
|
||||
".previous\n\t" \
|
||||
".section __ex_table,\"a\"\n" \
|
||||
" .align 8\n\t" \
|
||||
" .quad 2b,3b\n\t" \
|
||||
".previous" \
|
||||
: "=a" (ret__) \
|
||||
: "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \
|
||||
ret__; })
|
||||
|
||||
#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32))
|
||||
|
||||
#define rdmsr_safe(msr,a,b) \
|
||||
({ int ret__; \
|
||||
asm volatile ("1: rdmsr\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: movl %4,%0\n" \
|
||||
" jmp 2b\n" \
|
||||
".previous\n" \
|
||||
".section __ex_table,\"a\"\n" \
|
||||
" .align 8\n" \
|
||||
" .quad 1b,3b\n" \
|
||||
".previous":"=&bDS" (ret__), "=a"(*(a)), "=d"(*(b)) \
|
||||
:"c"(msr), "i"(-EIO), "0"(0)); \
|
||||
ret__; })
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
|
||||
void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
|
||||
|
|
@ -343,6 +350,7 @@ static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
|||
return wrmsr_safe(msr_no, l, h);
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* !__i386__ */
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ header-y += toshiba.h
|
|||
header-y += ultrasound.h
|
||||
header-y += un.h
|
||||
header-y += utime.h
|
||||
header-y += veth.h
|
||||
header-y += video_decoder.h
|
||||
header-y += video_encoder.h
|
||||
header-y += videotext.h
|
||||
|
|
|
|||
|
|
@ -554,8 +554,6 @@ static inline int ata_drive_40wire(const u16 *dev_id)
|
|||
|
||||
static inline int ata_drive_40wire_relaxed(const u16 *dev_id)
|
||||
{
|
||||
if (ata_id_is_sata(dev_id))
|
||||
return 0; /* SATA */
|
||||
if ((dev_id[93] & 0x2000) == 0x2000)
|
||||
return 0; /* 80 wire */
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ extern void unlock_cpu_hotplug(void);
|
|||
#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
|
||||
#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
|
||||
int cpu_down(unsigned int cpu);
|
||||
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
|
||||
|
||||
#else /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
|
|
@ -122,9 +121,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex)
|
|||
/* These aren't inline functions due to a GCC bug. */
|
||||
#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
|
||||
#define unregister_hotcpu_notifier(nb) ({ (void)(nb); })
|
||||
|
||||
/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
|
||||
static inline int cpu_is_offline(int cpu) { return 0; }
|
||||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP_SMP
|
||||
|
|
|
|||
|
|
@ -397,6 +397,8 @@ extern cpumask_t cpu_present_map;
|
|||
#define cpu_present(cpu) ((cpu) == 0)
|
||||
#endif
|
||||
|
||||
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
extern int nr_cpu_ids;
|
||||
#define any_online_cpu(mask) __any_online_cpu(&(mask))
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@
|
|||
#ifndef LINUX_I2C_ID_H
|
||||
#define LINUX_I2C_ID_H
|
||||
|
||||
/* Please note that I2C driver IDs are optional. They are only needed if a
|
||||
legacy chip driver needs to identify a bus or a bus driver needs to
|
||||
identify a legacy client. If you don't need them, just don't set them. */
|
||||
|
||||
/*
|
||||
* ---- Driver types -----------------------------------------------------
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ extern void key_init(void);
|
|||
#define key_get(k) ({ NULL; })
|
||||
#define key_put(k) do { } while(0)
|
||||
#define key_ref_put(k) do { } while(0)
|
||||
#define make_key_ref(k) ({ NULL; })
|
||||
#define make_key_ref(k, p) ({ NULL; })
|
||||
#define key_ref_to_ptr(k) ({ NULL; })
|
||||
#define is_key_possessed(k) 0
|
||||
#define alloc_uid_keyring(u,c) 0
|
||||
|
|
|
|||
|
|
@ -319,21 +319,29 @@ struct napi_struct {
|
|||
enum
|
||||
{
|
||||
NAPI_STATE_SCHED, /* Poll is scheduled */
|
||||
NAPI_STATE_DISABLE, /* Disable pending */
|
||||
};
|
||||
|
||||
extern void FASTCALL(__napi_schedule(struct napi_struct *n));
|
||||
|
||||
static inline int napi_disable_pending(struct napi_struct *n)
|
||||
{
|
||||
return test_bit(NAPI_STATE_DISABLE, &n->state);
|
||||
}
|
||||
|
||||
/**
|
||||
* napi_schedule_prep - check if napi can be scheduled
|
||||
* @n: napi context
|
||||
*
|
||||
* Test if NAPI routine is already running, and if not mark
|
||||
* it as running. This is used as a condition variable
|
||||
* insure only one NAPI poll instance runs
|
||||
* insure only one NAPI poll instance runs. We also make
|
||||
* sure there is no pending NAPI disable.
|
||||
*/
|
||||
static inline int napi_schedule_prep(struct napi_struct *n)
|
||||
{
|
||||
return !test_and_set_bit(NAPI_STATE_SCHED, &n->state);
|
||||
return !napi_disable_pending(n) &&
|
||||
!test_and_set_bit(NAPI_STATE_SCHED, &n->state);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -389,8 +397,10 @@ static inline void napi_complete(struct napi_struct *n)
|
|||
*/
|
||||
static inline void napi_disable(struct napi_struct *n)
|
||||
{
|
||||
set_bit(NAPI_STATE_DISABLE, &n->state);
|
||||
while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
|
||||
msleep(1);
|
||||
clear_bit(NAPI_STATE_DISABLE, &n->state);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1268,7 +1278,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
|
|||
static inline int netif_rx_schedule_prep(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
{
|
||||
return netif_running(dev) && napi_schedule_prep(napi);
|
||||
return napi_schedule_prep(napi);
|
||||
}
|
||||
|
||||
/* Add interface to tail of rx poll list. This assumes that _prep has
|
||||
|
|
@ -1277,7 +1287,6 @@ static inline int netif_rx_schedule_prep(struct net_device *dev,
|
|||
static inline void __netif_rx_schedule(struct net_device *dev,
|
||||
struct napi_struct *napi)
|
||||
{
|
||||
dev_hold(dev);
|
||||
__napi_schedule(napi);
|
||||
}
|
||||
|
||||
|
|
@ -1308,7 +1317,6 @@ static inline void __netif_rx_complete(struct net_device *dev,
|
|||
struct napi_struct *napi)
|
||||
{
|
||||
__napi_complete(napi);
|
||||
dev_put(dev);
|
||||
}
|
||||
|
||||
/* Remove interface from poll list: it must be in the poll list
|
||||
|
|
|
|||
|
|
@ -2322,6 +2322,8 @@
|
|||
#define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914
|
||||
#define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919
|
||||
#define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930
|
||||
#define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916
|
||||
#define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918
|
||||
#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
|
||||
#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
|
||||
#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
|
||||
|
|
|
|||
|
|
@ -246,6 +246,15 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on)
|
|||
device_set_wakeup_enable(dev,val); \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
* Global Power Management flags
|
||||
* Used to keep APM and ACPI from both being active
|
||||
*/
|
||||
extern unsigned int pm_flags;
|
||||
|
||||
#define PM_APM 1
|
||||
#define PM_ACPI 2
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_PM_H */
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
#ifdef CONFIG_PM_LEGACY
|
||||
|
||||
extern int pm_active;
|
||||
|
||||
#define PM_IS_ACTIVE() (pm_active != 0)
|
||||
|
||||
/*
|
||||
* Register a device with power management
|
||||
*/
|
||||
|
|
@ -21,8 +17,6 @@ int __deprecated pm_send_all(pm_request_t rqst, void *data);
|
|||
|
||||
#else /* CONFIG_PM_LEGACY */
|
||||
|
||||
#define PM_IS_ACTIVE() 0
|
||||
|
||||
static inline struct pm_dev *pm_register(pm_dev_t type,
|
||||
unsigned long id,
|
||||
pm_callback callback)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
#define PNP_MAX_PORT 24
|
||||
#define PNP_MAX_PORT 40
|
||||
#define PNP_MAX_MEM 12
|
||||
#define PNP_MAX_IRQ 2
|
||||
#define PNP_MAX_DMA 2
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ extern void __ptrace_link(struct task_struct *child,
|
|||
extern void __ptrace_unlink(struct task_struct *child);
|
||||
extern void ptrace_untrace(struct task_struct *child);
|
||||
extern int ptrace_may_attach(struct task_struct *task);
|
||||
extern int __ptrace_may_attach(struct task_struct *task);
|
||||
|
||||
static inline void ptrace_link(struct task_struct *child,
|
||||
struct task_struct *new_parent)
|
||||
|
|
|
|||
|
|
@ -56,14 +56,6 @@ static inline void __quicklist_free(int nr, void (*dtor)(void *), void *p,
|
|||
struct page *page)
|
||||
{
|
||||
struct quicklist *q;
|
||||
int nid = page_to_nid(page);
|
||||
|
||||
if (unlikely(nid != numa_node_id())) {
|
||||
if (dtor)
|
||||
dtor(p);
|
||||
__free_page(page);
|
||||
return;
|
||||
}
|
||||
|
||||
q = &get_cpu_var(quicklist)[nr];
|
||||
*(void **)p = q->page;
|
||||
|
|
|
|||
|
|
@ -191,8 +191,8 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
|
|||
/*
|
||||
* offset and length are unused for chain entry. Clear them.
|
||||
*/
|
||||
prv->offset = 0;
|
||||
prv->length = 0;
|
||||
prv[prv_nents - 1].offset = 0;
|
||||
prv[prv_nents - 1].length = 0;
|
||||
|
||||
/*
|
||||
* Set lowest bit to indicate a link pointer, and make sure to clear
|
||||
|
|
|
|||
|
|
@ -1255,13 +1255,6 @@ struct pid_namespace;
|
|||
*
|
||||
* set_task_vxid() : assigns a virtual id to a task;
|
||||
*
|
||||
* task_ppid_nr_ns() : the parent's id as seen from the namespace specified.
|
||||
* the result depends on the namespace and whether the
|
||||
* task in question is the namespace's init. e.g. for the
|
||||
* namespace's init this will return 0 when called from
|
||||
* the namespace of this init, or appropriate id otherwise.
|
||||
*
|
||||
*
|
||||
* see also pid_nr() etc in include/linux/pid.h
|
||||
*/
|
||||
|
||||
|
|
@ -1317,12 +1310,6 @@ static inline pid_t task_session_vnr(struct task_struct *tsk)
|
|||
}
|
||||
|
||||
|
||||
static inline pid_t task_ppid_nr_ns(struct task_struct *tsk,
|
||||
struct pid_namespace *ns)
|
||||
{
|
||||
return pid_nr_ns(task_pid(rcu_dereference(tsk->real_parent)), ns);
|
||||
}
|
||||
|
||||
/**
|
||||
* pid_alive - check that a task structure is not stale
|
||||
* @p: Task structure to be checked.
|
||||
|
|
|
|||
|
|
@ -271,5 +271,10 @@ static inline void *kzalloc(size_t size, gfp_t flags)
|
|||
return kmalloc(size, flags | __GFP_ZERO);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SLABINFO
|
||||
extern const struct seq_operations slabinfo_op;
|
||||
ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_SLAB_H */
|
||||
|
|
|
|||
|
|
@ -95,7 +95,4 @@ found:
|
|||
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
extern const struct seq_operations slabinfo_op;
|
||||
ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
|
||||
#endif /* _LINUX_SLAB_DEF_H */
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ header-y += tc_gact.h
|
|||
header-y += tc_ipt.h
|
||||
header-y += tc_mirred.h
|
||||
header-y += tc_pedit.h
|
||||
header-y += tc_nat.h
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@ extern speed_t tty_termios_input_baud_rate(struct ktermios *termios);
|
|||
extern void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud);
|
||||
extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud);
|
||||
extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
|
||||
extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b);
|
||||
|
||||
extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);
|
||||
extern void tty_ldisc_deref(struct tty_ldisc *);
|
||||
|
|
|
|||
|
|
@ -149,19 +149,27 @@ struct execute_work {
|
|||
|
||||
extern struct workqueue_struct *
|
||||
__create_workqueue_key(const char *name, int singlethread,
|
||||
int freezeable, struct lock_class_key *key);
|
||||
int freezeable, struct lock_class_key *key,
|
||||
const char *lock_name);
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
#define __create_workqueue(name, singlethread, freezeable) \
|
||||
({ \
|
||||
static struct lock_class_key __key; \
|
||||
const char *__lock_name; \
|
||||
\
|
||||
if (__builtin_constant_p(name)) \
|
||||
__lock_name = (name); \
|
||||
else \
|
||||
__lock_name = #name; \
|
||||
\
|
||||
__create_workqueue_key((name), (singlethread), \
|
||||
(freezeable), &__key); \
|
||||
(freezeable), &__key, \
|
||||
__lock_name); \
|
||||
})
|
||||
#else
|
||||
#define __create_workqueue(name, singlethread, freezeable) \
|
||||
__create_workqueue_key((name), (singlethread), (freezeable), NULL)
|
||||
__create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL)
|
||||
#endif
|
||||
|
||||
#define create_workqueue(name) __create_workqueue((name), 0, 0)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ struct writeback_control {
|
|||
unsigned for_reclaim:1; /* Invoked from the page allocator */
|
||||
unsigned for_writepages:1; /* This is a writepages() call */
|
||||
unsigned range_cyclic:1; /* range_start is cyclic */
|
||||
unsigned more_io:1; /* more io to be dispatched */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#define AX25_P_ATALK 0xca /* Appletalk */
|
||||
#define AX25_P_ATALK_ARP 0xcb /* Appletalk ARP */
|
||||
#define AX25_P_IP 0xcc /* ARPA Internet Protocol */
|
||||
#define AX25_P_ARP 0xcd /* ARPA Adress Resolution */
|
||||
#define AX25_P_ARP 0xcd /* ARPA Address Resolution */
|
||||
#define AX25_P_FLEXNET 0xce /* FlexNet */
|
||||
#define AX25_P_NETROM 0xcf /* NET/ROM */
|
||||
#define AX25_P_TEXT 0xF0 /* No layer 3 protocol impl. */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ struct ip6_tnl {
|
|||
struct net_device *dev; /* virtual device associated with tunnel */
|
||||
struct net_device_stats stat; /* statistics for tunnel device */
|
||||
int recursion; /* depth of hard_start_xmit recursion */
|
||||
struct ip6_tnl_parm parms; /* tunnel configuration paramters */
|
||||
struct ip6_tnl_parm parms; /* tunnel configuration parameters */
|
||||
struct flowi fl; /* flowi template for xmit */
|
||||
struct dst_entry *dst_cache; /* cached dst */
|
||||
u32 dst_cookie;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ typedef struct discovery_t {
|
|||
irda_queue_t q; /* Must be first! */
|
||||
|
||||
discinfo_t data; /* Basic discovery information */
|
||||
int name_len; /* Lenght of nickname */
|
||||
int name_len; /* Length of nickname */
|
||||
|
||||
LAP_REASON condition; /* More info about the discovery */
|
||||
int gen_addr_bit; /* Need to generate a new device
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ static inline int nf_ct_is_untracked(const struct sk_buff *skb)
|
|||
return (skb->nfct == &nf_conntrack_untracked.ct_general);
|
||||
}
|
||||
|
||||
extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
|
||||
extern unsigned int nf_conntrack_htable_size;
|
||||
extern int nf_conntrack_checksum;
|
||||
extern atomic_t nf_conntrack_count;
|
||||
|
|
|
|||
|
|
@ -325,7 +325,6 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask)
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ struct sctp_sock {
|
|||
/* The default SACK delay timeout for new associations. */
|
||||
__u32 sackdelay;
|
||||
|
||||
/* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
|
||||
/* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
|
||||
__u32 param_flags;
|
||||
|
||||
struct sctp_initmsg initmsg;
|
||||
|
|
@ -955,7 +955,7 @@ struct sctp_transport {
|
|||
/* PMTU : The current known path MTU. */
|
||||
__u32 pathmtu;
|
||||
|
||||
/* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
|
||||
/* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
|
||||
__u32 param_flags;
|
||||
|
||||
/* The number of times INIT has been sent on this transport. */
|
||||
|
|
@ -1638,7 +1638,7 @@ struct sctp_association {
|
|||
*/
|
||||
__u32 pathmtu;
|
||||
|
||||
/* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */
|
||||
/* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
|
||||
__u32 param_flags;
|
||||
|
||||
/* SACK delay timeout */
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ enum sctp_sn_type {
|
|||
SCTP_SHUTDOWN_EVENT,
|
||||
SCTP_PARTIAL_DELIVERY_EVENT,
|
||||
SCTP_ADAPTATION_INDICATION,
|
||||
SCTP_AUTHENTICATION_EVENT,
|
||||
SCTP_AUTHENTICATION_INDICATION,
|
||||
};
|
||||
|
||||
/* Notification error codes used to fill up the error fields in some
|
||||
|
|
|
|||
|
|
@ -944,7 +944,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
|
|||
return err;
|
||||
|
||||
rcu_read_lock_bh();
|
||||
filter = sk->sk_filter;
|
||||
filter = rcu_dereference(sk->sk_filter);
|
||||
if (filter) {
|
||||
unsigned int pkt_len = sk_run_filter(skb, filter->insns,
|
||||
filter->len);
|
||||
|
|
|
|||
|
|
@ -1188,10 +1188,15 @@ static inline int xfrm_aevent_is_on(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline int xfrm_alg_len(struct xfrm_algo *alg)
|
||||
{
|
||||
return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFRM_MIGRATE
|
||||
static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig)
|
||||
{
|
||||
return (struct xfrm_algo *)kmemdup(orig, sizeof(*orig) + orig->alg_key_len, GFP_KERNEL);
|
||||
return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL);
|
||||
}
|
||||
|
||||
static inline void xfrm_states_put(struct xfrm_state **states, int n)
|
||||
|
|
|
|||
Loading…
Reference in a new issue