diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
commit | 8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch) | |
tree | be59573c0af3617d0cd8a7d61f0ed119e58b1156 /include | |
parent | d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff) | |
parent | 01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'include')
86 files changed, 660 insertions, 191 deletions
diff --git a/include/asm-arm/arch-iop3xx/iop331-irqs.h b/include/asm-arm/arch-iop3xx/iop331-irqs.h index 8ff73d487222..7135ad7e335e 100644 --- a/include/asm-arm/arch-iop3xx/iop331-irqs.h +++ b/include/asm-arm/arch-iop3xx/iop331-irqs.h | |||
@@ -91,7 +91,6 @@ | |||
91 | #define NR_IRQS NR_IOP331_IRQS | 91 | #define NR_IRQS NR_IOP331_IRQS |
92 | 92 | ||
93 | 93 | ||
94 | #if defined(CONFIG_ARCH_IQ80331) | ||
95 | /* | 94 | /* |
96 | * Interrupts available on the IQ80331 board | 95 | * Interrupts available on the IQ80331 board |
97 | */ | 96 | */ |
@@ -111,7 +110,6 @@ | |||
111 | #define IRQ_IQ80331_INTC IRQ_IOP331_XINT2 | 110 | #define IRQ_IQ80331_INTC IRQ_IOP331_XINT2 |
112 | #define IRQ_IQ80331_INTD IRQ_IOP331_XINT3 | 111 | #define IRQ_IQ80331_INTD IRQ_IOP331_XINT3 |
113 | 112 | ||
114 | #elif defined(CONFIG_MACH_IQ80332) | ||
115 | /* | 113 | /* |
116 | * Interrupts available on the IQ80332 board | 114 | * Interrupts available on the IQ80332 board |
117 | */ | 115 | */ |
@@ -131,6 +129,4 @@ | |||
131 | #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 | 129 | #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 |
132 | #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 | 130 | #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 |
133 | 131 | ||
134 | #endif | ||
135 | |||
136 | #endif // _IOP331_IRQ_H_ | 132 | #endif // _IOP331_IRQ_H_ |
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index 3c4eb9fbe48a..f83003f5287b 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -48,8 +48,6 @@ struct clk_functions { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | extern unsigned int mpurate; | 50 | extern unsigned int mpurate; |
51 | extern struct list_head clocks; | ||
52 | extern spinlock_t clockfw_lock; | ||
53 | 51 | ||
54 | extern int clk_init(struct clk_functions * custom_clocks); | 52 | extern int clk_init(struct clk_functions * custom_clocks); |
55 | extern int clk_register(struct clk *clk); | 53 | extern int clk_register(struct clk *clk); |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 72964f9b8414..7463fd5252ce 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -104,6 +104,7 @@ enum s3c2410_chan_op_e { | |||
104 | S3C2410_DMAOP_RESUME, | 104 | S3C2410_DMAOP_RESUME, |
105 | S3C2410_DMAOP_FLUSH, | 105 | S3C2410_DMAOP_FLUSH, |
106 | S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ | 106 | S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ |
107 | S3C2410_DMAOP_STARTED, /* indicate channel started */ | ||
107 | }; | 108 | }; |
108 | 109 | ||
109 | typedef enum s3c2410_chan_op_e s3c2410_chan_op_t; | 110 | typedef enum s3c2410_chan_op_e s3c2410_chan_op_t; |
diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h index 228983f89bc8..0fbec07bb6b8 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/arch-s3c2410/regs-rtc.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #ifndef __ASM_ARCH_REGS_RTC_H | 18 | #ifndef __ASM_ARCH_REGS_RTC_H |
19 | #define __ASM_ARCH_REGS_RTC_H __FILE__ | 19 | #define __ASM_ARCH_REGS_RTC_H __FILE__ |
20 | 20 | ||
21 | #define S3C2410_RTCREG(x) ((x) + S3C24XX_VA_RTC) | 21 | #define S3C2410_RTCREG(x) (x) |
22 | 22 | ||
23 | #define S3C2410_RTCCON S3C2410_RTCREG(0x40) | 23 | #define S3C2410_RTCCON S3C2410_RTCREG(0x40) |
24 | #define S3C2410_RTCCON_RTCEN (1<<0) | 24 | #define S3C2410_RTCCON_RTCEN (1<<0) |
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h index edb7b6502fcf..91a31adfa8a8 100644 --- a/include/asm-arm/procinfo.h +++ b/include/asm-arm/procinfo.h | |||
@@ -55,5 +55,6 @@ extern unsigned int elf_hwcap; | |||
55 | #define HWCAP_VFP 64 | 55 | #define HWCAP_VFP 64 |
56 | #define HWCAP_EDSP 128 | 56 | #define HWCAP_EDSP 128 |
57 | #define HWCAP_JAVA 256 | 57 | #define HWCAP_JAVA 256 |
58 | #define HWCAP_IWMMXT 512 | ||
58 | 59 | ||
59 | #endif | 60 | #endif |
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 0730a20f6db8..8774d06689da 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -45,6 +45,7 @@ typedef u8 kprobe_opcode_t; | |||
45 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 45 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
46 | #define ARCH_SUPPORTS_KRETPROBES | 46 | #define ARCH_SUPPORTS_KRETPROBES |
47 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 47 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
48 | #define flush_insn_slot(p) do { } while (0) | ||
48 | 49 | ||
49 | void arch_remove_kprobe(struct kprobe *p); | 50 | void arch_remove_kprobe(struct kprobe *p); |
50 | void kretprobe_trampoline(void); | 51 | void kretprobe_trampoline(void); |
diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index e33e9f9e4c66..22cb07cc8f32 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h | |||
@@ -14,7 +14,7 @@ extern struct pglist_data *node_data[]; | |||
14 | 14 | ||
15 | #ifdef CONFIG_X86_NUMAQ | 15 | #ifdef CONFIG_X86_NUMAQ |
16 | #include <asm/numaq.h> | 16 | #include <asm/numaq.h> |
17 | #else /* summit or generic arch */ | 17 | #elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */ |
18 | #include <asm/srat.h> | 18 | #include <asm/srat.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 2418a787c405..938904910115 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -125,5 +125,6 @@ static inline void jprobe_return(void) | |||
125 | } | 125 | } |
126 | extern void invalidate_stacked_regs(void); | 126 | extern void invalidate_stacked_regs(void); |
127 | extern void flush_register_stack(void); | 127 | extern void flush_register_stack(void); |
128 | extern void flush_insn_slot(struct kprobe *p); | ||
128 | 129 | ||
129 | #endif /* _ASM_KPROBES_H */ | 130 | #endif /* _ASM_KPROBES_H */ |
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 894bc4d89dc0..6a33a07b3f1d 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -56,6 +56,11 @@ extern void efi_memmap_init(unsigned long *, unsigned long *); | |||
56 | extern struct page *vmem_map; | 56 | extern struct page *vmem_map; |
57 | extern int find_largest_hole (u64 start, u64 end, void *arg); | 57 | extern int find_largest_hole (u64 start, u64 end, void *arg); |
58 | extern int create_mem_map_page_table (u64 start, u64 end, void *arg); | 58 | extern int create_mem_map_page_table (u64 start, u64 end, void *arg); |
59 | extern int vmemmap_find_next_valid_pfn(int, int); | ||
60 | #else | ||
61 | static inline int vmemmap_find_next_valid_pfn(int node, int i) | ||
62 | { | ||
63 | return i + 1; | ||
64 | } | ||
59 | #endif | 65 | #endif |
60 | |||
61 | #endif /* meminit_h */ | 66 | #endif /* meminit_h */ |
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 37e52a2836b0..20a8d618c845 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -1433,7 +1433,12 @@ typedef union pal_version_u { | |||
1433 | } pal_version_u_t; | 1433 | } pal_version_u_t; |
1434 | 1434 | ||
1435 | 1435 | ||
1436 | /* Return PAL version information */ | 1436 | /* |
1437 | * Return PAL version information. While the documentation states that | ||
1438 | * PAL_VERSION can be called in either physical or virtual mode, some | ||
1439 | * implementations only allow physical calls. We don't call it very often, | ||
1440 | * so the overhead isn't worth eliminating. | ||
1441 | */ | ||
1437 | static inline s64 | 1442 | static inline s64 |
1438 | ia64_pal_version (pal_version_u_t *pal_min_version, pal_version_u_t *pal_cur_version) | 1443 | ia64_pal_version (pal_version_u_t *pal_min_version, pal_version_u_t *pal_cur_version) |
1439 | { | 1444 | { |
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 8406f1ef4caf..b72af597878d 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -1124,8 +1124,8 @@ xpc_notify_IRQ_send_local(struct xpc_channel *ch, u8 ipi_flag, | |||
1124 | #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) | 1124 | #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) |
1125 | #define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8)) | 1125 | #define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8)) |
1126 | 1126 | ||
1127 | #define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f) | 1127 | #define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & __IA64_UL_CONST(0x0f0f0f0f0f0f0f0f)) |
1128 | #define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010) | 1128 | #define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & __IA64_UL_CONST(0x1010101010101010)) |
1129 | 1129 | ||
1130 | 1130 | ||
1131 | static inline void | 1131 | static inline void |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index fc9677bc87ee..384fbf7f2a0f 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * 0xa000000000000000+2*PERCPU_PAGE_SIZE | 24 | * 0xa000000000000000+2*PERCPU_PAGE_SIZE |
25 | * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) | 25 | * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) |
26 | */ | 26 | */ |
27 | #define KERNEL_START (GATE_ADDR+0x100000000) | 27 | #define KERNEL_START (GATE_ADDR+__IA64_UL_CONST(0x100000000)) |
28 | #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) | 28 | #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) |
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-powerpc/backlight.h b/include/asm-powerpc/backlight.h index 58d4b6f8d827..8cf5c37c3817 100644 --- a/include/asm-powerpc/backlight.h +++ b/include/asm-powerpc/backlight.h | |||
@@ -30,8 +30,12 @@ static inline void pmac_backlight_key_down(void) | |||
30 | pmac_backlight_key(1); | 30 | pmac_backlight_key(1); |
31 | } | 31 | } |
32 | 32 | ||
33 | extern void pmac_backlight_set_legacy_brightness_pmu(int brightness); | ||
33 | extern int pmac_backlight_set_legacy_brightness(int brightness); | 34 | extern int pmac_backlight_set_legacy_brightness(int brightness); |
34 | extern int pmac_backlight_get_legacy_brightness(void); | 35 | extern int pmac_backlight_get_legacy_brightness(void); |
35 | 36 | ||
37 | extern void pmac_backlight_enable(void); | ||
38 | extern void pmac_backlight_disable(void); | ||
39 | |||
36 | #endif /* __KERNEL__ */ | 40 | #endif /* __KERNEL__ */ |
37 | #endif | 41 | #endif |
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 8f7fd5cfec34..11cbdf81fd2e 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
35 | #include <linux/cpumask.h> | ||
35 | 36 | ||
36 | #ifdef CONFIG_KEXEC | 37 | #ifdef CONFIG_KEXEC |
37 | 38 | ||
@@ -109,7 +110,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
109 | 110 | ||
110 | #define MAX_NOTE_BYTES 1024 | 111 | #define MAX_NOTE_BYTES 1024 |
111 | 112 | ||
112 | #ifdef __powerpc64__ | ||
113 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for | 113 | extern void kexec_smp_wait(void); /* get and clear naca physid, wait for |
114 | master to copy new code to 0 */ | 114 | master to copy new code to 0 */ |
115 | extern int crashing_cpu; | 115 | extern int crashing_cpu; |
@@ -119,7 +119,6 @@ static inline int kexec_sr_activated(int cpu) | |||
119 | { | 119 | { |
120 | return cpu_isset(cpu,cpus_in_sr); | 120 | return cpu_isset(cpu,cpus_in_sr); |
121 | } | 121 | } |
122 | #endif /* __powerpc64 __ */ | ||
123 | 122 | ||
124 | struct kimage; | 123 | struct kimage; |
125 | struct pt_regs; | 124 | struct pt_regs; |
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 2d0af52c823d..34e1f89a5fa0 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -51,6 +51,7 @@ typedef unsigned int kprobe_opcode_t; | |||
51 | 51 | ||
52 | #define ARCH_SUPPORTS_KRETPROBES | 52 | #define ARCH_SUPPORTS_KRETPROBES |
53 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 53 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
54 | #define flush_insn_slot(p) do { } while (0) | ||
54 | 55 | ||
55 | void kretprobe_trampoline(void); | 56 | void kretprobe_trampoline(void); |
56 | extern void arch_remove_kprobe(struct kprobe *p); | 57 | extern void arch_remove_kprobe(struct kprobe *p); |
diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h index 9f0917c68659..ae63db7b3e7d 100644 --- a/include/asm-powerpc/pgalloc.h +++ b/include/asm-powerpc/pgalloc.h | |||
@@ -117,7 +117,7 @@ static inline void pte_free(struct page *ptepage) | |||
117 | pte_free_kernel(page_address(ptepage)); | 117 | pte_free_kernel(page_address(ptepage)); |
118 | } | 118 | } |
119 | 119 | ||
120 | #define PGF_CACHENUM_MASK 0xf | 120 | #define PGF_CACHENUM_MASK 0x3 |
121 | 121 | ||
122 | typedef struct pgtable_free { | 122 | typedef struct pgtable_free { |
123 | unsigned long val; | 123 | unsigned long val; |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index a33c6acffa61..82a27e9a041f 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
@@ -170,6 +170,7 @@ extern int rtas_get_sensor(int sensor, int index, int *state); | |||
170 | extern int rtas_get_power_level(int powerdomain, int *level); | 170 | extern int rtas_get_power_level(int powerdomain, int *level); |
171 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); | 171 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); |
172 | extern int rtas_set_indicator(int indicator, int index, int new_value); | 172 | extern int rtas_set_indicator(int indicator, int index, int new_value); |
173 | extern int rtas_set_indicator_fast(int indicator, int index, int new_value); | ||
173 | extern void rtas_progress(char *s, unsigned short hex); | 174 | extern void rtas_progress(char *s, unsigned short hex); |
174 | extern void rtas_initialize(void); | 175 | extern void rtas_initialize(void); |
175 | 176 | ||
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 7307aa775671..4c9f5229e833 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -53,6 +53,15 @@ | |||
53 | #define smp_read_barrier_depends() do { } while(0) | 53 | #define smp_read_barrier_depends() do { } while(0) |
54 | #endif /* CONFIG_SMP */ | 54 | #endif /* CONFIG_SMP */ |
55 | 55 | ||
56 | /* | ||
57 | * This is a barrier which prevents following instructions from being | ||
58 | * started until the value of the argument x is known. For example, if | ||
59 | * x is a variable loaded from memory, this prevents following | ||
60 | * instructions from being executed until the load has been performed. | ||
61 | */ | ||
62 | #define data_barrier(x) \ | ||
63 | asm volatile("twi 0,%0,0; isync" : : "r" (x) : "memory"); | ||
64 | |||
56 | struct task_struct; | 65 | struct task_struct; |
57 | struct pt_regs; | 66 | struct pt_regs; |
58 | 67 | ||
diff --git a/include/asm-powerpc/tsi108.h b/include/asm-powerpc/tsi108.h index c4c278d72f71..2c702d35a7cf 100644 --- a/include/asm-powerpc/tsi108.h +++ b/include/asm-powerpc/tsi108.h | |||
@@ -1,16 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-ppc/tsi108.h | ||
3 | * | ||
4 | * common routine and memory layout for Tundra TSI108(Grendel) host bridge | 2 | * common routine and memory layout for Tundra TSI108(Grendel) host bridge |
5 | * memory controller. | 3 | * memory controller. |
6 | * | 4 | * |
7 | * Author: Jacob Pan (jacob.pan@freescale.com) | 5 | * Author: Jacob Pan (jacob.pan@freescale.com) |
8 | * Alex Bounine (alexandreb@tundra.com) | 6 | * Alex Bounine (alexandreb@tundra.com) |
9 | * 2004 (c) Freescale Semiconductor Inc. This file is licensed under | 7 | * |
10 | * the terms of the GNU General Public License version 2. This program | 8 | * Copyright 2004-2006 Freescale Semiconductor, Inc. |
11 | * is licensed "as is" without any warranty of any kind, whether express | 9 | * |
12 | * or implied. | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
13 | */ | 14 | */ |
15 | |||
14 | #ifndef __PPC_KERNEL_TSI108_H | 16 | #ifndef __PPC_KERNEL_TSI108_H |
15 | #define __PPC_KERNEL_TSI108_H | 17 | #define __PPC_KERNEL_TSI108_H |
16 | 18 | ||
diff --git a/include/asm-powerpc/tsi108_irq.h b/include/asm-powerpc/tsi108_irq.h new file mode 100644 index 000000000000..3e4d04effa57 --- /dev/null +++ b/include/asm-powerpc/tsi108_irq.h | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * (C) Copyright 2005 Tundra Semiconductor Corp. | ||
3 | * Alex Bounine, <alexandreb at tundra.com). | ||
4 | * | ||
5 | * See file CREDITS for list of people who contributed to this | ||
6 | * project. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License as | ||
10 | * published by the Free Software Foundation; either version 2 of | ||
11 | * the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
21 | * MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * definitions for interrupt controller initialization and external interrupt | ||
26 | * demultiplexing on TSI108EMU/SVB boards. | ||
27 | */ | ||
28 | |||
29 | #ifndef _ASM_PPC_TSI108_IRQ_H | ||
30 | #define _ASM_PPC_TSI108_IRQ_H | ||
31 | |||
32 | /* | ||
33 | * Tsi108 interrupts | ||
34 | */ | ||
35 | #ifndef TSI108_IRQ_REG_BASE | ||
36 | #define TSI108_IRQ_REG_BASE 0 | ||
37 | #endif | ||
38 | |||
39 | #define TSI108_IRQ(x) (TSI108_IRQ_REG_BASE + (x)) | ||
40 | |||
41 | #define TSI108_MAX_VECTORS (36 + 4) /* 36 sources + PCI INT demux */ | ||
42 | #define MAX_TASK_PRIO 0xF | ||
43 | |||
44 | #define TSI108_IRQ_SPURIOUS (TSI108_MAX_VECTORS) | ||
45 | |||
46 | #define DEFAULT_PRIO_LVL 10 /* initial priority level */ | ||
47 | |||
48 | /* Interrupt vectors assignment to external and internal | ||
49 | * sources of requests. */ | ||
50 | |||
51 | /* EXTERNAL INTERRUPT SOURCES */ | ||
52 | |||
53 | #define IRQ_TSI108_EXT_INT0 TSI108_IRQ(0) /* External Source at INT[0] */ | ||
54 | #define IRQ_TSI108_EXT_INT1 TSI108_IRQ(1) /* External Source at INT[1] */ | ||
55 | #define IRQ_TSI108_EXT_INT2 TSI108_IRQ(2) /* External Source at INT[2] */ | ||
56 | #define IRQ_TSI108_EXT_INT3 TSI108_IRQ(3) /* External Source at INT[3] */ | ||
57 | |||
58 | /* INTERNAL INTERRUPT SOURCES */ | ||
59 | |||
60 | #define IRQ_TSI108_RESERVED0 TSI108_IRQ(4) /* Reserved IRQ */ | ||
61 | #define IRQ_TSI108_RESERVED1 TSI108_IRQ(5) /* Reserved IRQ */ | ||
62 | #define IRQ_TSI108_RESERVED2 TSI108_IRQ(6) /* Reserved IRQ */ | ||
63 | #define IRQ_TSI108_RESERVED3 TSI108_IRQ(7) /* Reserved IRQ */ | ||
64 | #define IRQ_TSI108_DMA0 TSI108_IRQ(8) /* DMA0 */ | ||
65 | #define IRQ_TSI108_DMA1 TSI108_IRQ(9) /* DMA1 */ | ||
66 | #define IRQ_TSI108_DMA2 TSI108_IRQ(10) /* DMA2 */ | ||
67 | #define IRQ_TSI108_DMA3 TSI108_IRQ(11) /* DMA3 */ | ||
68 | #define IRQ_TSI108_UART0 TSI108_IRQ(12) /* UART0 */ | ||
69 | #define IRQ_TSI108_UART1 TSI108_IRQ(13) /* UART1 */ | ||
70 | #define IRQ_TSI108_I2C TSI108_IRQ(14) /* I2C */ | ||
71 | #define IRQ_TSI108_GPIO TSI108_IRQ(15) /* GPIO */ | ||
72 | #define IRQ_TSI108_GIGE0 TSI108_IRQ(16) /* GIGE0 */ | ||
73 | #define IRQ_TSI108_GIGE1 TSI108_IRQ(17) /* GIGE1 */ | ||
74 | #define IRQ_TSI108_RESERVED4 TSI108_IRQ(18) /* Reserved IRQ */ | ||
75 | #define IRQ_TSI108_HLP TSI108_IRQ(19) /* HLP */ | ||
76 | #define IRQ_TSI108_SDRAM TSI108_IRQ(20) /* SDC */ | ||
77 | #define IRQ_TSI108_PROC_IF TSI108_IRQ(21) /* Processor IF */ | ||
78 | #define IRQ_TSI108_RESERVED5 TSI108_IRQ(22) /* Reserved IRQ */ | ||
79 | #define IRQ_TSI108_PCI TSI108_IRQ(23) /* PCI/X block */ | ||
80 | |||
81 | #define IRQ_TSI108_MBOX0 TSI108_IRQ(24) /* Mailbox 0 register */ | ||
82 | #define IRQ_TSI108_MBOX1 TSI108_IRQ(25) /* Mailbox 1 register */ | ||
83 | #define IRQ_TSI108_MBOX2 TSI108_IRQ(26) /* Mailbox 2 register */ | ||
84 | #define IRQ_TSI108_MBOX3 TSI108_IRQ(27) /* Mailbox 3 register */ | ||
85 | |||
86 | #define IRQ_TSI108_DBELL0 TSI108_IRQ(28) /* Doorbell 0 */ | ||
87 | #define IRQ_TSI108_DBELL1 TSI108_IRQ(29) /* Doorbell 1 */ | ||
88 | #define IRQ_TSI108_DBELL2 TSI108_IRQ(30) /* Doorbell 2 */ | ||
89 | #define IRQ_TSI108_DBELL3 TSI108_IRQ(31) /* Doorbell 3 */ | ||
90 | |||
91 | #define IRQ_TSI108_TIMER0 TSI108_IRQ(32) /* Global Timer 0 */ | ||
92 | #define IRQ_TSI108_TIMER1 TSI108_IRQ(33) /* Global Timer 1 */ | ||
93 | #define IRQ_TSI108_TIMER2 TSI108_IRQ(34) /* Global Timer 2 */ | ||
94 | #define IRQ_TSI108_TIMER3 TSI108_IRQ(35) /* Global Timer 3 */ | ||
95 | |||
96 | /* | ||
97 | * PCI bus INTA# - INTD# lines demultiplexor | ||
98 | */ | ||
99 | #define IRQ_PCI_INTAD_BASE TSI108_IRQ(36) | ||
100 | #define IRQ_PCI_INTA (IRQ_PCI_INTAD_BASE + 0) | ||
101 | #define IRQ_PCI_INTB (IRQ_PCI_INTAD_BASE + 1) | ||
102 | #define IRQ_PCI_INTC (IRQ_PCI_INTAD_BASE + 2) | ||
103 | #define IRQ_PCI_INTD (IRQ_PCI_INTAD_BASE + 3) | ||
104 | #define NUM_PCI_IRQS (4) | ||
105 | |||
106 | /* number of entries in vector dispatch table */ | ||
107 | #define IRQ_TSI108_TAB_SIZE (TSI108_MAX_VECTORS + 1) | ||
108 | |||
109 | /* Mapping of MPIC outputs to processors' interrupt pins */ | ||
110 | |||
111 | #define IDIR_INT_OUT0 0x1 | ||
112 | #define IDIR_INT_OUT1 0x2 | ||
113 | #define IDIR_INT_OUT2 0x4 | ||
114 | #define IDIR_INT_OUT3 0x8 | ||
115 | |||
116 | /*--------------------------------------------------------------- | ||
117 | * IRQ line configuration parameters */ | ||
118 | |||
119 | /* Interrupt delivery modes */ | ||
120 | typedef enum { | ||
121 | TSI108_IRQ_DIRECTED, | ||
122 | TSI108_IRQ_DISTRIBUTED, | ||
123 | } TSI108_IRQ_MODE; | ||
124 | #endif /* _ASM_PPC_TSI108_IRQ_H */ | ||
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index c70344b91049..f6a7ff04ffe5 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -1093,5 +1093,100 @@ typedef struct im_idma { | |||
1093 | 1093 | ||
1094 | #define FCC_PSMR_RMII ((uint)0x00020000) /* Use RMII interface */ | 1094 | #define FCC_PSMR_RMII ((uint)0x00020000) /* Use RMII interface */ |
1095 | 1095 | ||
1096 | /* FCC iop & clock configuration. BSP code is responsible to define Fx_RXCLK & Fx_TXCLK | ||
1097 | * in order to use clock-computing stuff below for the FCC x | ||
1098 | */ | ||
1099 | |||
1100 | /* Automatically generates register configurations */ | ||
1101 | #define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ | ||
1102 | |||
1103 | #define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ | ||
1104 | #define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ | ||
1105 | #define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ | ||
1106 | #define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ | ||
1107 | #define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ | ||
1108 | #define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ | ||
1109 | |||
1110 | #define PC_F1RXCLK PC_CLK(F1_RXCLK) | ||
1111 | #define PC_F1TXCLK PC_CLK(F1_TXCLK) | ||
1112 | #define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) | ||
1113 | #define CMX1_CLK_MASK ((uint)0xff000000) | ||
1114 | |||
1115 | #define PC_F2RXCLK PC_CLK(F2_RXCLK) | ||
1116 | #define PC_F2TXCLK PC_CLK(F2_TXCLK) | ||
1117 | #define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) | ||
1118 | #define CMX2_CLK_MASK ((uint)0x00ff0000) | ||
1119 | |||
1120 | #define PC_F3RXCLK PC_CLK(F3_RXCLK) | ||
1121 | #define PC_F3TXCLK PC_CLK(F3_TXCLK) | ||
1122 | #define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) | ||
1123 | #define CMX3_CLK_MASK ((uint)0x0000ff00) | ||
1124 | |||
1125 | #define CPMUX_CLK_MASK (CMX3_CLK_MASK | CMX2_CLK_MASK) | ||
1126 | #define CPMUX_CLK_ROUTE (CMX3_CLK_ROUTE | CMX2_CLK_ROUTE) | ||
1127 | |||
1128 | #define CLK_TRX (PC_F3TXCLK | PC_F3RXCLK | PC_F2TXCLK | PC_F2RXCLK) | ||
1129 | |||
1130 | /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, | ||
1131 | * but there is little variation among the choices. | ||
1132 | */ | ||
1133 | #define PA1_COL 0x00000001U | ||
1134 | #define PA1_CRS 0x00000002U | ||
1135 | #define PA1_TXER 0x00000004U | ||
1136 | #define PA1_TXEN 0x00000008U | ||
1137 | #define PA1_RXDV 0x00000010U | ||
1138 | #define PA1_RXER 0x00000020U | ||
1139 | #define PA1_TXDAT 0x00003c00U | ||
1140 | #define PA1_RXDAT 0x0003c000U | ||
1141 | #define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) | ||
1142 | #define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ | ||
1143 | PA1_RXDV | PA1_RXER) | ||
1144 | #define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) | ||
1145 | #define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) | ||
1146 | |||
1147 | |||
1148 | /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, | ||
1149 | * but there is little variation among the choices. | ||
1150 | */ | ||
1151 | #define PB2_TXER 0x00000001U | ||
1152 | #define PB2_RXDV 0x00000002U | ||
1153 | #define PB2_TXEN 0x00000004U | ||
1154 | #define PB2_RXER 0x00000008U | ||
1155 | #define PB2_COL 0x00000010U | ||
1156 | #define PB2_CRS 0x00000020U | ||
1157 | #define PB2_TXDAT 0x000003c0U | ||
1158 | #define PB2_RXDAT 0x00003c00U | ||
1159 | #define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ | ||
1160 | PB2_RXER | PB2_RXDV | PB2_TXER) | ||
1161 | #define PB2_PSORB1 (PB2_TXEN) | ||
1162 | #define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) | ||
1163 | #define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) | ||
1164 | |||
1165 | |||
1166 | /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, | ||
1167 | * but there is little variation among the choices. | ||
1168 | */ | ||
1169 | #define PB3_RXDV 0x00004000U | ||
1170 | #define PB3_RXER 0x00008000U | ||
1171 | #define PB3_TXER 0x00010000U | ||
1172 | #define PB3_TXEN 0x00020000U | ||
1173 | #define PB3_COL 0x00040000U | ||
1174 | #define PB3_CRS 0x00080000U | ||
1175 | #define PB3_TXDAT 0x0f000000U | ||
1176 | #define PC3_TXDAT 0x00000010U | ||
1177 | #define PB3_RXDAT 0x00f00000U | ||
1178 | #define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ | ||
1179 | PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) | ||
1180 | #define PB3_PSORB1 0 | ||
1181 | #define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) | ||
1182 | #define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) | ||
1183 | #define PC3_DIRC1 (PC3_TXDAT) | ||
1184 | |||
1185 | /* Handy macro to specify mem for FCCs*/ | ||
1186 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | ||
1187 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | ||
1188 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | ||
1189 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(2) | ||
1190 | |||
1096 | #endif /* __CPM2__ */ | 1191 | #endif /* __CPM2__ */ |
1097 | #endif /* __KERNEL__ */ | 1192 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index 4b93481e7679..23579d4afae7 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h | |||
@@ -82,6 +82,7 @@ enum ppc_sys_devices { | |||
82 | MPC82xx_CPM_SMC2, | 82 | MPC82xx_CPM_SMC2, |
83 | MPC82xx_CPM_USB, | 83 | MPC82xx_CPM_USB, |
84 | MPC82xx_SEC1, | 84 | MPC82xx_SEC1, |
85 | MPC82xx_MDIO_BB, | ||
85 | NUM_PPC_SYS_DEVS, | 86 | NUM_PPC_SYS_DEVS, |
86 | }; | 87 | }; |
87 | 88 | ||
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index adcce33f20ae..d3a2f2fe230c 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -110,6 +110,7 @@ enum ppc_sys_devices { | |||
110 | MPC8xx_CPM_SMC1, | 110 | MPC8xx_CPM_SMC1, |
111 | MPC8xx_CPM_SMC2, | 111 | MPC8xx_CPM_SMC2, |
112 | MPC8xx_CPM_USB, | 112 | MPC8xx_CPM_USB, |
113 | MPC8xx_MDIO_FEC, | ||
113 | NUM_PPC_SYS_DEVS, | 114 | NUM_PPC_SYS_DEVS, |
114 | }; | 115 | }; |
115 | 116 | ||
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index 15065af566c2..c9f5c34d318c 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -13,6 +13,7 @@ typedef u32 kprobe_opcode_t; | |||
13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
14 | #define arch_remove_kprobe(p) do {} while (0) | 14 | #define arch_remove_kprobe(p) do {} while (0) |
15 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 15 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
16 | #define flush_insn_slot(p) do { } while (0) | ||
16 | 17 | ||
17 | /* Architecture specific copy of original instruction*/ | 18 | /* Architecture specific copy of original instruction*/ |
18 | struct arch_specific_insn { | 19 | struct arch_specific_insn { |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 03f5bc9b6bec..ebfe395cfb87 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -234,7 +234,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot) | |||
234 | sz_bits = 0UL; | 234 | sz_bits = 0UL; |
235 | if (_PAGE_SZBITS_4U != 0UL || _PAGE_SZBITS_4V != 0UL) { | 235 | if (_PAGE_SZBITS_4U != 0UL || _PAGE_SZBITS_4V != 0UL) { |
236 | __asm__ __volatile__( | 236 | __asm__ __volatile__( |
237 | "\n661: sethi %uhi(%1), %0\n" | 237 | "\n661: sethi %%uhi(%1), %0\n" |
238 | " sllx %0, 32, %0\n" | 238 | " sllx %0, 32, %0\n" |
239 | " .section .sun4v_2insn_patch, \"ax\"\n" | 239 | " .section .sun4v_2insn_patch, \"ax\"\n" |
240 | " .word 661b\n" | 240 | " .word 661b\n" |
@@ -339,7 +339,7 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot) | |||
339 | " .section .sun4v_2insn_patch, \"ax\"\n" | 339 | " .section .sun4v_2insn_patch, \"ax\"\n" |
340 | " .word 661b\n" | 340 | " .word 661b\n" |
341 | " andn %0, %4, %0\n" | 341 | " andn %0, %4, %0\n" |
342 | " or %0, %3, %0\n" | 342 | " or %0, %5, %0\n" |
343 | " .previous\n" | 343 | " .previous\n" |
344 | : "=r" (val) | 344 | : "=r" (val) |
345 | : "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U), | 345 | : "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U), |
diff --git a/include/asm-sparc64/sfp-machine.h b/include/asm-sparc64/sfp-machine.h index 5015bb8d6c32..89d42431efb5 100644 --- a/include/asm-sparc64/sfp-machine.h +++ b/include/asm-sparc64/sfp-machine.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #define _FP_MUL_MEAT_D(R,X,Y) \ | 34 | #define _FP_MUL_MEAT_D(R,X,Y) \ |
35 | _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) | 35 | _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) |
36 | #define _FP_MUL_MEAT_Q(R,X,Y) \ | 36 | #define _FP_MUL_MEAT_Q(R,X,Y) \ |
37 | _FP_MUL_MEAT_2_wide_3mul(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) | 37 | _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) |
38 | 38 | ||
39 | #define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm) | 39 | #define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm) |
40 | #define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y) | 40 | #define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y) |
diff --git a/include/asm-x86_64/calgary.h b/include/asm-x86_64/calgary.h index fbfb50136edb..4e3919524240 100644 --- a/include/asm-x86_64/calgary.h +++ b/include/asm-x86_64/calgary.h | |||
@@ -60,9 +60,4 @@ static inline int calgary_iommu_init(void) { return 1; } | |||
60 | static inline void detect_calgary(void) { return; } | 60 | static inline void detect_calgary(void) { return; } |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | static inline unsigned int bus_to_phb(unsigned char busno) | ||
64 | { | ||
65 | return ((busno % 15 == 0) ? 0 : busno / 2 + 1); | ||
66 | } | ||
67 | |||
68 | #endif /* _ASM_X86_64_CALGARY_H */ | 63 | #endif /* _ASM_X86_64_CALGARY_H */ |
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h index d36febd9bb18..cf5317898fb0 100644 --- a/include/asm-x86_64/kprobes.h +++ b/include/asm-x86_64/kprobes.h | |||
@@ -47,6 +47,7 @@ typedef u8 kprobe_opcode_t; | |||
47 | 47 | ||
48 | void kretprobe_trampoline(void); | 48 | void kretprobe_trampoline(void); |
49 | extern void arch_remove_kprobe(struct kprobe *p); | 49 | extern void arch_remove_kprobe(struct kprobe *p); |
50 | #define flush_insn_slot(p) do { } while (0) | ||
50 | 51 | ||
51 | /* Architecture specific copy of original instruction*/ | 52 | /* Architecture specific copy of original instruction*/ |
52 | struct arch_specific_insn { | 53 | struct arch_specific_insn { |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index f7bf875aae40..10f346165cab 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define EXCEPTION_STACK_ORDER 0 | 19 | #define EXCEPTION_STACK_ORDER 0 |
20 | #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) | 20 | #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) |
21 | 21 | ||
22 | #define DEBUG_STACK_ORDER EXCEPTION_STACK_ORDER | 22 | #define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1) |
23 | #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER) | 23 | #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER) |
24 | 24 | ||
25 | #define IRQSTACK_ORDER 2 | 25 | #define IRQSTACK_ORDER 2 |
diff --git a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h index 5f9a01805821..ba94ab3d2673 100644 --- a/include/asm-x86_64/swiotlb.h +++ b/include/asm-x86_64/swiotlb.h | |||
@@ -42,6 +42,8 @@ extern void swiotlb_free_coherent (struct device *hwdev, size_t size, | |||
42 | extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); | 42 | extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); |
43 | extern void swiotlb_init(void); | 43 | extern void swiotlb_init(void); |
44 | 44 | ||
45 | extern int swiotlb_force; | ||
46 | |||
45 | #ifdef CONFIG_SWIOTLB | 47 | #ifdef CONFIG_SWIOTLB |
46 | extern int swiotlb; | 48 | extern int swiotlb; |
47 | #else | 49 | #else |
diff --git a/include/linux/audit.h b/include/linux/audit.h index b27d7debc5a1..64f9f9e56ac5 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -327,21 +327,31 @@ extern void __audit_getname(const char *name); | |||
327 | extern void audit_putname(const char *name); | 327 | extern void audit_putname(const char *name); |
328 | extern void __audit_inode(const char *name, const struct inode *inode); | 328 | extern void __audit_inode(const char *name, const struct inode *inode); |
329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
330 | unsigned long pino); | 330 | const struct inode *parent); |
331 | extern void __audit_inode_update(const struct inode *inode); | ||
332 | static inline int audit_dummy_context(void) | ||
333 | { | ||
334 | void *p = current->audit_context; | ||
335 | return !p || *(int *)p; | ||
336 | } | ||
331 | static inline void audit_getname(const char *name) | 337 | static inline void audit_getname(const char *name) |
332 | { | 338 | { |
333 | if (unlikely(current->audit_context)) | 339 | if (unlikely(!audit_dummy_context())) |
334 | __audit_getname(name); | 340 | __audit_getname(name); |
335 | } | 341 | } |
336 | static inline void audit_inode(const char *name, const struct inode *inode) { | 342 | static inline void audit_inode(const char *name, const struct inode *inode) { |
337 | if (unlikely(current->audit_context)) | 343 | if (unlikely(!audit_dummy_context())) |
338 | __audit_inode(name, inode); | 344 | __audit_inode(name, inode); |
339 | } | 345 | } |
340 | static inline void audit_inode_child(const char *dname, | 346 | static inline void audit_inode_child(const char *dname, |
341 | const struct inode *inode, | 347 | const struct inode *inode, |
342 | unsigned long pino) { | 348 | const struct inode *parent) { |
343 | if (unlikely(current->audit_context)) | 349 | if (unlikely(!audit_dummy_context())) |
344 | __audit_inode_child(dname, inode, pino); | 350 | __audit_inode_child(dname, inode, parent); |
351 | } | ||
352 | static inline void audit_inode_update(const struct inode *inode) { | ||
353 | if (unlikely(!audit_dummy_context())) | ||
354 | __audit_inode_update(inode); | ||
345 | } | 355 | } |
346 | 356 | ||
347 | /* Private API (for audit.c only) */ | 357 | /* Private API (for audit.c only) */ |
@@ -365,57 +375,61 @@ extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); | |||
365 | 375 | ||
366 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | 376 | static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) |
367 | { | 377 | { |
368 | if (unlikely(current->audit_context)) | 378 | if (unlikely(!audit_dummy_context())) |
369 | return __audit_ipc_obj(ipcp); | 379 | return __audit_ipc_obj(ipcp); |
370 | return 0; | 380 | return 0; |
371 | } | 381 | } |
372 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 382 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
373 | { | 383 | { |
374 | if (unlikely(current->audit_context)) | 384 | if (unlikely(!audit_dummy_context())) |
375 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); | 385 | return __audit_ipc_set_perm(qbytes, uid, gid, mode); |
376 | return 0; | 386 | return 0; |
377 | } | 387 | } |
378 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) | 388 | static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) |
379 | { | 389 | { |
380 | if (unlikely(current->audit_context)) | 390 | if (unlikely(!audit_dummy_context())) |
381 | return __audit_mq_open(oflag, mode, u_attr); | 391 | return __audit_mq_open(oflag, mode, u_attr); |
382 | return 0; | 392 | return 0; |
383 | } | 393 | } |
384 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) | 394 | static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) |
385 | { | 395 | { |
386 | if (unlikely(current->audit_context)) | 396 | if (unlikely(!audit_dummy_context())) |
387 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); | 397 | return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); |
388 | return 0; | 398 | return 0; |
389 | } | 399 | } |
390 | static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) | 400 | static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) |
391 | { | 401 | { |
392 | if (unlikely(current->audit_context)) | 402 | if (unlikely(!audit_dummy_context())) |
393 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); | 403 | return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); |
394 | return 0; | 404 | return 0; |
395 | } | 405 | } |
396 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) | 406 | static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) |
397 | { | 407 | { |
398 | if (unlikely(current->audit_context)) | 408 | if (unlikely(!audit_dummy_context())) |
399 | return __audit_mq_notify(mqdes, u_notification); | 409 | return __audit_mq_notify(mqdes, u_notification); |
400 | return 0; | 410 | return 0; |
401 | } | 411 | } |
402 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | 412 | static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) |
403 | { | 413 | { |
404 | if (unlikely(current->audit_context)) | 414 | if (unlikely(!audit_dummy_context())) |
405 | return __audit_mq_getsetattr(mqdes, mqstat); | 415 | return __audit_mq_getsetattr(mqdes, mqstat); |
406 | return 0; | 416 | return 0; |
407 | } | 417 | } |
418 | extern int audit_n_rules; | ||
408 | #else | 419 | #else |
409 | #define audit_alloc(t) ({ 0; }) | 420 | #define audit_alloc(t) ({ 0; }) |
410 | #define audit_free(t) do { ; } while (0) | 421 | #define audit_free(t) do { ; } while (0) |
411 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) | 422 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) |
412 | #define audit_syscall_exit(f,r) do { ; } while (0) | 423 | #define audit_syscall_exit(f,r) do { ; } while (0) |
424 | #define audit_dummy_context() 1 | ||
413 | #define audit_getname(n) do { ; } while (0) | 425 | #define audit_getname(n) do { ; } while (0) |
414 | #define audit_putname(n) do { ; } while (0) | 426 | #define audit_putname(n) do { ; } while (0) |
415 | #define __audit_inode(n,i) do { ; } while (0) | 427 | #define __audit_inode(n,i) do { ; } while (0) |
416 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 428 | #define __audit_inode_child(d,i,p) do { ; } while (0) |
429 | #define __audit_inode_update(i) do { ; } while (0) | ||
417 | #define audit_inode(n,i) do { ; } while (0) | 430 | #define audit_inode(n,i) do { ; } while (0) |
418 | #define audit_inode_child(d,i,p) do { ; } while (0) | 431 | #define audit_inode_child(d,i,p) do { ; } while (0) |
432 | #define audit_inode_update(i) do { ; } while (0) | ||
419 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 433 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
420 | #define audit_get_loginuid(c) ({ -1; }) | 434 | #define audit_get_loginuid(c) ({ -1; }) |
421 | #define audit_ipc_obj(i) ({ 0; }) | 435 | #define audit_ipc_obj(i) ({ 0; }) |
@@ -430,6 +444,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | |||
430 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) | 444 | #define audit_mq_timedreceive(d,l,p,t) ({ 0; }) |
431 | #define audit_mq_notify(d,n) ({ 0; }) | 445 | #define audit_mq_notify(d,n) ({ 0; }) |
432 | #define audit_mq_getsetattr(d,s) ({ 0; }) | 446 | #define audit_mq_getsetattr(d,s) ({ 0; }) |
447 | #define audit_n_rules 0 | ||
433 | #endif | 448 | #endif |
434 | 449 | ||
435 | #ifdef CONFIG_AUDIT | 450 | #ifdef CONFIG_AUDIT |
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index dbb7769009be..1c86d65bc4b9 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h | |||
@@ -57,7 +57,8 @@ struct proc_event { | |||
57 | PROC_EVENT_EXIT = 0x80000000 | 57 | PROC_EVENT_EXIT = 0x80000000 |
58 | } what; | 58 | } what; |
59 | __u32 cpu; | 59 | __u32 cpu; |
60 | struct timespec timestamp; | 60 | __u64 __attribute__((aligned(8))) timestamp_ns; |
61 | /* Number of nano seconds since system boot */ | ||
61 | union { /* must be last field of proc_event struct */ | 62 | union { /* must be last field of proc_event struct */ |
62 | struct { | 63 | struct { |
63 | __u32 err; | 64 | __u32 err; |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 269d000bb2a3..bea0255196c4 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -216,6 +216,7 @@ COMPATIBLE_IOCTL(VT_RESIZE) | |||
216 | COMPATIBLE_IOCTL(VT_RESIZEX) | 216 | COMPATIBLE_IOCTL(VT_RESIZEX) |
217 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) | 217 | COMPATIBLE_IOCTL(VT_LOCKSWITCH) |
218 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) | 218 | COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) |
219 | COMPATIBLE_IOCTL(VT_GETHIFONTMASK) | ||
219 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ | 220 | /* Little p (/dev/rtc, /dev/envctrl, etc.) */ |
220 | COMPATIBLE_IOCTL(RTC_AIE_ON) | 221 | COMPATIBLE_IOCTL(RTC_AIE_ON) |
221 | COMPATIBLE_IOCTL(RTC_AIE_OFF) | 222 | COMPATIBLE_IOCTL(RTC_AIE_OFF) |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 6a7047851e48..88dafa246d87 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_DEBUG_LOCKING_H | 1 | #ifndef __LINUX_DEBUG_LOCKING_H |
2 | #define __LINUX_DEBUG_LOCKING_H | 2 | #define __LINUX_DEBUG_LOCKING_H |
3 | 3 | ||
4 | struct task_struct; | ||
5 | |||
4 | extern int debug_locks; | 6 | extern int debug_locks; |
5 | extern int debug_locks_silent; | 7 | extern int debug_locks_silent; |
6 | 8 | ||
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 7e8b6011b8f3..11487b6e7127 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
@@ -55,7 +55,7 @@ static inline void delayacct_tsk_init(struct task_struct *tsk) | |||
55 | { | 55 | { |
56 | /* reinitialize in case parent's non-null pointer was dup'ed*/ | 56 | /* reinitialize in case parent's non-null pointer was dup'ed*/ |
57 | tsk->delays = NULL; | 57 | tsk->delays = NULL; |
58 | if (unlikely(delayacct_on)) | 58 | if (delayacct_on) |
59 | __delayacct_tsk_init(tsk); | 59 | __delayacct_tsk_init(tsk); |
60 | } | 60 | } |
61 | 61 | ||
@@ -80,9 +80,7 @@ static inline void delayacct_blkio_end(void) | |||
80 | static inline int delayacct_add_tsk(struct taskstats *d, | 80 | static inline int delayacct_add_tsk(struct taskstats *d, |
81 | struct task_struct *tsk) | 81 | struct task_struct *tsk) |
82 | { | 82 | { |
83 | if (likely(!delayacct_on)) | 83 | if (!delayacct_on || !tsk->delays) |
84 | return -EINVAL; | ||
85 | if (!tsk->delays) | ||
86 | return 0; | 84 | return 0; |
87 | return __delayacct_add_tsk(d, tsk); | 85 | return __delayacct_add_tsk(d, tsk); |
88 | } | 86 | } |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 5607e6457a65..9f9cce7bd86d 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -492,6 +492,15 @@ static inline struct ext3_inode_info *EXT3_I(struct inode *inode) | |||
492 | { | 492 | { |
493 | return container_of(inode, struct ext3_inode_info, vfs_inode); | 493 | return container_of(inode, struct ext3_inode_info, vfs_inode); |
494 | } | 494 | } |
495 | |||
496 | static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) | ||
497 | { | ||
498 | return ino == EXT3_ROOT_INO || | ||
499 | ino == EXT3_JOURNAL_INO || | ||
500 | ino == EXT3_RESIZE_INO || | ||
501 | (ino >= EXT3_FIRST_INO(sb) && | ||
502 | ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); | ||
503 | } | ||
495 | #else | 504 | #else |
496 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 505 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
497 | * a kernel struct super_block. This will allow us to call the feature-test | 506 | * a kernel struct super_block. This will allow us to call the feature-test |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 405f44e44e5d..2f335e966011 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX_FB_H | 1 | #ifndef _LINUX_FB_H |
2 | #define _LINUX_FB_H | 2 | #define _LINUX_FB_H |
3 | 3 | ||
4 | #include <linux/backlight.h> | ||
5 | #include <asm/types.h> | 4 | #include <asm/types.h> |
6 | 5 | ||
7 | /* Definitions of frame buffers */ | 6 | /* Definitions of frame buffers */ |
@@ -381,6 +380,7 @@ struct fb_cursor { | |||
381 | #include <linux/workqueue.h> | 380 | #include <linux/workqueue.h> |
382 | #include <linux/notifier.h> | 381 | #include <linux/notifier.h> |
383 | #include <linux/list.h> | 382 | #include <linux/list.h> |
383 | #include <linux/backlight.h> | ||
384 | #include <asm/io.h> | 384 | #include <asm/io.h> |
385 | 385 | ||
386 | struct vm_area_struct; | 386 | struct vm_area_struct; |
@@ -524,7 +524,7 @@ struct fb_event { | |||
524 | 524 | ||
525 | extern int fb_register_client(struct notifier_block *nb); | 525 | extern int fb_register_client(struct notifier_block *nb); |
526 | extern int fb_unregister_client(struct notifier_block *nb); | 526 | extern int fb_unregister_client(struct notifier_block *nb); |
527 | 527 | extern int fb_notifier_call_chain(unsigned long val, void *v); | |
528 | /* | 528 | /* |
529 | * Pixmap structure definition | 529 | * Pixmap structure definition |
530 | * | 530 | * |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 25610205c90d..555bc195c420 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -570,13 +570,14 @@ struct inode { | |||
570 | * 3: quota file | 570 | * 3: quota file |
571 | * | 571 | * |
572 | * The locking order between these classes is | 572 | * The locking order between these classes is |
573 | * parent -> child -> normal -> quota | 573 | * parent -> child -> normal -> xattr -> quota |
574 | */ | 574 | */ |
575 | enum inode_i_mutex_lock_class | 575 | enum inode_i_mutex_lock_class |
576 | { | 576 | { |
577 | I_MUTEX_NORMAL, | 577 | I_MUTEX_NORMAL, |
578 | I_MUTEX_PARENT, | 578 | I_MUTEX_PARENT, |
579 | I_MUTEX_CHILD, | 579 | I_MUTEX_CHILD, |
580 | I_MUTEX_XATTR, | ||
580 | I_MUTEX_QUOTA | 581 | I_MUTEX_QUOTA |
581 | }; | 582 | }; |
582 | 583 | ||
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index 783c476b8674..74ed35a00a94 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h | |||
@@ -69,34 +69,21 @@ enum fs_ioport { | |||
69 | fsiop_porte, | 69 | fsiop_porte, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | struct fs_mii_bus_info { | 72 | struct fs_mii_bit { |
73 | int method; /* mii method */ | 73 | u32 offset; |
74 | int id; /* the id of the mii_bus */ | 74 | u8 bit; |
75 | int disable_aneg; /* if the controller needs to negothiate speed & duplex */ | 75 | u8 polarity; |
76 | int lpa; /* the default board-specific vallues will be applied otherwise */ | 76 | }; |
77 | 77 | struct fs_mii_bb_platform_info { | |
78 | union { | 78 | struct fs_mii_bit mdio_dir; |
79 | struct { | 79 | struct fs_mii_bit mdio_dat; |
80 | int duplex; | 80 | struct fs_mii_bit mdc_dat; |
81 | int speed; | 81 | int mdio_port; /* port & bit for MDIO */ |
82 | } fixed; | 82 | int mdio_bit; |
83 | 83 | int mdc_port; /* port & bit for MDC */ | |
84 | struct { | 84 | int mdc_bit; |
85 | /* nothing */ | 85 | int delay; /* delay in us */ |
86 | } fec; | 86 | int irq[32]; /* irqs per phy's */ |
87 | |||
88 | struct { | ||
89 | /* nothing */ | ||
90 | } scc; | ||
91 | |||
92 | struct { | ||
93 | int mdio_port; /* port & bit for MDIO */ | ||
94 | int mdio_bit; | ||
95 | int mdc_port; /* port & bit for MDC */ | ||
96 | int mdc_bit; | ||
97 | int delay; /* delay in us */ | ||
98 | } bitbang; | ||
99 | } i; | ||
100 | }; | 87 | }; |
101 | 88 | ||
102 | struct fs_platform_info { | 89 | struct fs_platform_info { |
@@ -119,6 +106,7 @@ struct fs_platform_info { | |||
119 | u32 device_flags; | 106 | u32 device_flags; |
120 | 107 | ||
121 | int phy_addr; /* the phy address (-1 no phy) */ | 108 | int phy_addr; /* the phy address (-1 no phy) */ |
109 | const char* bus_id; | ||
122 | int phy_irq; /* the phy irq (if it exists) */ | 110 | int phy_irq; /* the phy irq (if it exists) */ |
123 | 111 | ||
124 | const struct fs_mii_bus_info *bus_info; | 112 | const struct fs_mii_bus_info *bus_info; |
@@ -130,6 +118,10 @@ struct fs_platform_info { | |||
130 | int napi_weight; /* NAPI weight */ | 118 | int napi_weight; /* NAPI weight */ |
131 | 119 | ||
132 | int use_rmii; /* use RMII mode */ | 120 | int use_rmii; /* use RMII mode */ |
121 | int has_phy; /* if the network is phy container as well...*/ | ||
122 | }; | ||
123 | struct fs_mii_fec_platform_info { | ||
124 | u32 irq[32]; | ||
125 | u32 mii_speed; | ||
133 | }; | 126 | }; |
134 | |||
135 | #endif | 127 | #endif |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index cc5dec70c32c..d4f219ffaa5d 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -67,7 +67,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
67 | if (source) { | 67 | if (source) { |
68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | 68 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
69 | } | 69 | } |
70 | audit_inode_child(new_name, source, new_dir->i_ino); | 70 | audit_inode_child(new_name, source, new_dir); |
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | /* |
@@ -98,7 +98,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
98 | inode_dir_notify(inode, DN_CREATE); | 98 | inode_dir_notify(inode, DN_CREATE); |
99 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, | 99 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
100 | dentry->d_inode); | 100 | dentry->d_inode); |
101 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 101 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode); |
102 | } | 102 | } |
103 | 103 | ||
104 | /* | 104 | /* |
@@ -109,7 +109,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
109 | inode_dir_notify(inode, DN_CREATE); | 109 | inode_dir_notify(inode, DN_CREATE); |
110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, | 110 | inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, |
111 | dentry->d_name.name, dentry->d_inode); | 111 | dentry->d_name.name, dentry->d_inode); |
112 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); | 112 | audit_inode_child(dentry->d_name.name, dentry->d_inode, inode); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* | 115 | /* |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 34c3a215f2cd..d097b5b72bc6 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -96,7 +96,8 @@ struct robust_list_head { | |||
96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, | 96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, |
97 | u32 __user *uaddr2, u32 val2, u32 val3); | 97 | u32 __user *uaddr2, u32 val2, u32 val3); |
98 | 98 | ||
99 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); | 99 | extern int |
100 | handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); | ||
100 | 101 | ||
101 | #ifdef CONFIG_FUTEX | 102 | #ifdef CONFIG_FUTEX |
102 | extern void exit_robust_list(struct task_struct *curr); | 103 | extern void exit_robust_list(struct task_struct *curr); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index dc7abef10965..99620451d958 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -571,6 +571,7 @@ typedef struct ide_drive_s { | |||
571 | u8 waiting_for_dma; /* dma currently in progress */ | 571 | u8 waiting_for_dma; /* dma currently in progress */ |
572 | u8 unmask; /* okay to unmask other irqs */ | 572 | u8 unmask; /* okay to unmask other irqs */ |
573 | u8 bswap; /* byte swap data */ | 573 | u8 bswap; /* byte swap data */ |
574 | u8 noflush; /* don't attempt flushes */ | ||
574 | u8 dsc_overlap; /* DSC overlap */ | 575 | u8 dsc_overlap; /* DSC overlap */ |
575 | u8 nice1; /* give potential excess bandwidth */ | 576 | u8 nice1; /* give potential excess bandwidth */ |
576 | 577 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 383627ad328f..ab2740832742 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -155,6 +155,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, | |||
155 | { | 155 | { |
156 | struct net_device_stats *stats; | 156 | struct net_device_stats *stats; |
157 | 157 | ||
158 | if (skb_bond_should_drop(skb)) { | ||
159 | dev_kfree_skb_any(skb); | ||
160 | return NET_RX_DROP; | ||
161 | } | ||
162 | |||
158 | skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; | 163 | skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; |
159 | if (skb->dev == NULL) { | 164 | if (skb->dev == NULL) { |
160 | dev_kfree_skb_any(skb); | 165 | dev_kfree_skb_any(skb); |
diff --git a/include/linux/input.h b/include/linux/input.h index 56f1e0e1e598..b3253ab72ff7 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -893,7 +893,6 @@ struct input_dev { | |||
893 | 893 | ||
894 | int (*open)(struct input_dev *dev); | 894 | int (*open)(struct input_dev *dev); |
895 | void (*close)(struct input_dev *dev); | 895 | void (*close)(struct input_dev *dev); |
896 | int (*accept)(struct input_dev *dev, struct file *file); | ||
897 | int (*flush)(struct input_dev *dev, struct file *file); | 896 | int (*flush)(struct input_dev *dev, struct file *file); |
898 | int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 897 | int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
899 | int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); | 898 | int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); |
@@ -961,6 +960,26 @@ struct input_dev { | |||
961 | 960 | ||
962 | struct input_handle; | 961 | struct input_handle; |
963 | 962 | ||
963 | /** | ||
964 | * struct input_handler - implements one of interfaces for input devices | ||
965 | * @private: driver-specific data | ||
966 | * @event: event handler | ||
967 | * @connect: called when attaching a handler to an input device | ||
968 | * @disconnect: disconnects a handler from input device | ||
969 | * @start: starts handler for given handle. This function is called by | ||
970 | * input core right after connect() method and also when a process | ||
971 | * that "grabbed" a device releases it | ||
972 | * @fops: file operations this driver implements | ||
973 | * @minor: beginning of range of 32 minors for devices this driver | ||
974 | * can provide | ||
975 | * @name: name of the handler, to be shown in /proc/bus/input/handlers | ||
976 | * @id_table: pointer to a table of input_device_ids this driver can | ||
977 | * handle | ||
978 | * @blacklist: prointer to a table of input_device_ids this driver should | ||
979 | * ignore even if they match @id_table | ||
980 | * @h_list: list of input handles associated with the handler | ||
981 | * @node: for placing the driver onto input_handler_list | ||
982 | */ | ||
964 | struct input_handler { | 983 | struct input_handler { |
965 | 984 | ||
966 | void *private; | 985 | void *private; |
@@ -968,6 +987,7 @@ struct input_handler { | |||
968 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 987 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
969 | struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); | 988 | struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); |
970 | void (*disconnect)(struct input_handle *handle); | 989 | void (*disconnect)(struct input_handle *handle); |
990 | void (*start)(struct input_handle *handle); | ||
971 | 991 | ||
972 | const struct file_operations *fops; | 992 | const struct file_operations *fops; |
973 | int minor; | 993 | int minor; |
@@ -1030,10 +1050,10 @@ void input_release_device(struct input_handle *); | |||
1030 | int input_open_device(struct input_handle *); | 1050 | int input_open_device(struct input_handle *); |
1031 | void input_close_device(struct input_handle *); | 1051 | void input_close_device(struct input_handle *); |
1032 | 1052 | ||
1033 | int input_accept_process(struct input_handle *handle, struct file *file); | ||
1034 | int input_flush_device(struct input_handle* handle, struct file* file); | 1053 | int input_flush_device(struct input_handle* handle, struct file* file); |
1035 | 1054 | ||
1036 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 1055 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
1056 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); | ||
1037 | 1057 | ||
1038 | static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) | 1058 | static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) |
1039 | { | 1059 | { |
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 88d5961f7a3f..8e2042b9d471 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
@@ -59,27 +59,6 @@ static inline int task_nice_ioprio(struct task_struct *task) | |||
59 | /* | 59 | /* |
60 | * For inheritance, return the highest of the two given priorities | 60 | * For inheritance, return the highest of the two given priorities |
61 | */ | 61 | */ |
62 | static inline int ioprio_best(unsigned short aprio, unsigned short bprio) | 62 | extern int ioprio_best(unsigned short aprio, unsigned short bprio); |
63 | { | ||
64 | unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); | ||
65 | unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); | ||
66 | |||
67 | if (!ioprio_valid(aprio)) | ||
68 | return bprio; | ||
69 | if (!ioprio_valid(bprio)) | ||
70 | return aprio; | ||
71 | |||
72 | if (aclass == IOPRIO_CLASS_NONE) | ||
73 | aclass = IOPRIO_CLASS_BE; | ||
74 | if (bclass == IOPRIO_CLASS_NONE) | ||
75 | bclass = IOPRIO_CLASS_BE; | ||
76 | |||
77 | if (aclass == bclass) | ||
78 | return min(aprio, bprio); | ||
79 | if (aclass > bclass) | ||
80 | return bprio; | ||
81 | else | ||
82 | return aprio; | ||
83 | } | ||
84 | 63 | ||
85 | #endif | 64 | #endif |
diff --git a/include/linux/irq.h b/include/linux/irq.h index b48eae32dc61..fbf6d901e9c2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -47,8 +47,8 @@ | |||
47 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ | 47 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ |
48 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ | 48 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ |
49 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ | 49 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ |
50 | #define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ | ||
50 | #ifdef CONFIG_IRQ_PER_CPU | 51 | #ifdef CONFIG_IRQ_PER_CPU |
51 | # define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ | ||
52 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 52 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
53 | #else | 53 | #else |
54 | # define CHECK_IRQ_PER_CPU(var) 0 | 54 | # define CHECK_IRQ_PER_CPU(var) 0 |
@@ -58,6 +58,7 @@ | |||
58 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ | 58 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ |
59 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ | 59 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ |
60 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ | 60 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ |
61 | #define IRQ_WAKEUP 0x20000000 /* IRQ triggers system wakeup */ | ||
61 | 62 | ||
62 | struct proc_dir_entry; | 63 | struct proc_dir_entry; |
63 | 64 | ||
@@ -124,6 +125,7 @@ struct irq_chip { | |||
124 | * @action: the irq action chain | 125 | * @action: the irq action chain |
125 | * @status: status information | 126 | * @status: status information |
126 | * @depth: disable-depth, for nested irq_disable() calls | 127 | * @depth: disable-depth, for nested irq_disable() calls |
128 | * @wake_depth: enable depth, for multiple set_irq_wake() callers | ||
127 | * @irq_count: stats field to detect stalled irqs | 129 | * @irq_count: stats field to detect stalled irqs |
128 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 130 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
129 | * @lock: locking for SMP | 131 | * @lock: locking for SMP |
@@ -147,6 +149,7 @@ struct irq_desc { | |||
147 | unsigned int status; /* IRQ status */ | 149 | unsigned int status; /* IRQ status */ |
148 | 150 | ||
149 | unsigned int depth; /* nested irq disables */ | 151 | unsigned int depth; /* nested irq disables */ |
152 | unsigned int wake_depth; /* nested wake enables */ | ||
150 | unsigned int irq_count; /* For detecting broken IRQs */ | 153 | unsigned int irq_count; /* For detecting broken IRQs */ |
151 | unsigned int irqs_unhandled; | 154 | unsigned int irqs_unhandled; |
152 | spinlock_t lock; | 155 | spinlock_t lock; |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 20eb34403d0c..a04c154c5207 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -72,6 +72,9 @@ extern int journal_enable_debug; | |||
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | extern void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry); | 74 | extern void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry); |
75 | extern void * jbd_slab_alloc(size_t size, gfp_t flags); | ||
76 | extern void jbd_slab_free(void *ptr, size_t size); | ||
77 | |||
75 | #define jbd_kmalloc(size, flags) \ | 78 | #define jbd_kmalloc(size, flags) \ |
76 | __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry) | 79 | __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry) |
77 | #define jbd_rep_kmalloc(size, flags) \ | 80 | #define jbd_rep_kmalloc(size, flags) \ |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 043376920f51..329ebcffa106 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -47,8 +47,8 @@ | |||
47 | * - (NOM / DEN) fits in (32 - LSH) bits. | 47 | * - (NOM / DEN) fits in (32 - LSH) bits. |
48 | * - (NOM % DEN) fits in (32 - LSH) bits. | 48 | * - (NOM % DEN) fits in (32 - LSH) bits. |
49 | */ | 49 | */ |
50 | #define SH_DIV(NOM,DEN,LSH) ( ((NOM / DEN) << LSH) \ | 50 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
51 | + (((NOM % DEN) << LSH) + DEN / 2) / DEN) | 51 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
52 | 52 | ||
53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ | 53 | /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ |
54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) | 54 | #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 181c69cad4e3..851aa1bcfc1a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -210,6 +210,7 @@ extern enum system_states { | |||
210 | extern void dump_stack(void); | 210 | extern void dump_stack(void); |
211 | 211 | ||
212 | #ifdef DEBUG | 212 | #ifdef DEBUG |
213 | /* If you are writing a driver, please use dev_dbg instead */ | ||
213 | #define pr_debug(fmt,arg...) \ | 214 | #define pr_debug(fmt,arg...) \ |
214 | printk(KERN_DEBUG fmt,##arg) | 215 | printk(KERN_DEBUG fmt,##arg) |
215 | #else | 216 | #else |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 0503b2ed8bae..2d229327959e 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -46,8 +46,6 @@ enum kobject_action { | |||
46 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ | 46 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
47 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | 47 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ |
48 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | 48 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ |
49 | KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */ | ||
50 | KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */ | ||
51 | }; | 49 | }; |
52 | 50 | ||
53 | struct kobject { | 51 | struct kobject { |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 6cc497a2b6da..66c3100c2b94 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -265,12 +265,14 @@ enum { | |||
265 | 265 | ||
266 | /* ata_eh_info->flags */ | 266 | /* ata_eh_info->flags */ |
267 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ | 267 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ |
268 | ATA_EHI_RESUME_LINK = (1 << 1), /* need to resume link */ | 268 | ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ |
269 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ | 269 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ |
270 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ | 270 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ |
271 | 271 | ||
272 | ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ | 272 | ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ |
273 | 273 | ||
274 | ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, | ||
275 | |||
274 | /* max repeat if error condition is still set after ->error_handler */ | 276 | /* max repeat if error condition is still set after ->error_handler */ |
275 | ATA_EH_MAX_REPEAT = 5, | 277 | ATA_EH_MAX_REPEAT = 5, |
276 | 278 | ||
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index aa4fe905bb4d..0d92c468d55a 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -123,7 +123,6 @@ struct nlm_block { | |||
123 | unsigned int b_id; /* block id */ | 123 | unsigned int b_id; /* block id */ |
124 | unsigned char b_queued; /* re-queued */ | 124 | unsigned char b_queued; /* re-queued */ |
125 | unsigned char b_granted; /* VFS granted lock */ | 125 | unsigned char b_granted; /* VFS granted lock */ |
126 | unsigned char b_done; /* callback complete */ | ||
127 | struct nlm_file * b_file; /* file in question */ | 126 | struct nlm_file * b_file; /* file in question */ |
128 | }; | 127 | }; |
129 | 128 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 990957e0929f..f0b135cd86da 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -336,6 +336,7 @@ static inline void init_page_count(struct page *page) | |||
336 | } | 336 | } |
337 | 337 | ||
338 | void put_page(struct page *page); | 338 | void put_page(struct page *page); |
339 | void put_pages_list(struct list_head *pages); | ||
339 | 340 | ||
340 | void split_page(struct page *page, unsigned int order); | 341 | void split_page(struct page *page, unsigned int order); |
341 | 342 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 75f02d8c6ed3..50a4719512ed 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -320,6 +320,9 @@ struct net_device | |||
320 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) | 320 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) |
321 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) | 321 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) |
322 | 322 | ||
323 | /* List of features with software fallbacks. */ | ||
324 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) | ||
325 | |||
323 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) | 326 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) |
324 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) | 327 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) |
325 | 328 | ||
@@ -1012,6 +1015,30 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | |||
1012 | unlikely(skb->ip_summed != CHECKSUM_HW)); | 1015 | unlikely(skb->ip_summed != CHECKSUM_HW)); |
1013 | } | 1016 | } |
1014 | 1017 | ||
1018 | /* On bonding slaves other than the currently active slave, suppress | ||
1019 | * duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast. | ||
1020 | */ | ||
1021 | static inline int skb_bond_should_drop(struct sk_buff *skb) | ||
1022 | { | ||
1023 | struct net_device *dev = skb->dev; | ||
1024 | struct net_device *master = dev->master; | ||
1025 | |||
1026 | if (master && | ||
1027 | (dev->priv_flags & IFF_SLAVE_INACTIVE)) { | ||
1028 | if (master->priv_flags & IFF_MASTER_ALB) { | ||
1029 | if (skb->pkt_type != PACKET_BROADCAST && | ||
1030 | skb->pkt_type != PACKET_MULTICAST) | ||
1031 | return 0; | ||
1032 | } | ||
1033 | if (master->priv_flags & IFF_MASTER_8023AD && | ||
1034 | skb->protocol == __constant_htons(ETH_P_SLOW)) | ||
1035 | return 0; | ||
1036 | |||
1037 | return 1; | ||
1038 | } | ||
1039 | return 0; | ||
1040 | } | ||
1041 | |||
1015 | #endif /* __KERNEL__ */ | 1042 | #endif /* __KERNEL__ */ |
1016 | 1043 | ||
1017 | #endif /* _LINUX_DEV_H */ | 1044 | #endif /* _LINUX_DEV_H */ |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 31f02ba036ce..427c67ff89e9 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/netfilter.h> | 7 | #include <linux/netfilter.h> |
8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) | 8 | #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) |
9 | #include <asm/atomic.h> | ||
10 | #include <linux/if_ether.h> | 9 | #include <linux/if_ether.h> |
11 | #endif | 10 | #endif |
12 | 11 | ||
@@ -49,15 +48,25 @@ enum nf_br_hook_priorities { | |||
49 | 48 | ||
50 | /* Only used in br_forward.c */ | 49 | /* Only used in br_forward.c */ |
51 | static inline | 50 | static inline |
52 | void nf_bridge_maybe_copy_header(struct sk_buff *skb) | 51 | int nf_bridge_maybe_copy_header(struct sk_buff *skb) |
53 | { | 52 | { |
53 | int err; | ||
54 | |||
54 | if (skb->nf_bridge) { | 55 | if (skb->nf_bridge) { |
55 | if (skb->protocol == __constant_htons(ETH_P_8021Q)) { | 56 | if (skb->protocol == __constant_htons(ETH_P_8021Q)) { |
57 | err = skb_cow(skb, 18); | ||
58 | if (err) | ||
59 | return err; | ||
56 | memcpy(skb->data - 18, skb->nf_bridge->data, 18); | 60 | memcpy(skb->data - 18, skb->nf_bridge->data, 18); |
57 | skb_push(skb, 4); | 61 | skb_push(skb, 4); |
58 | } else | 62 | } else { |
63 | err = skb_cow(skb, 16); | ||
64 | if (err) | ||
65 | return err; | ||
59 | memcpy(skb->data - 16, skb->nf_bridge->data, 16); | 66 | memcpy(skb->data - 16, skb->nf_bridge->data, 16); |
67 | } | ||
60 | } | 68 | } |
69 | return 0; | ||
61 | } | 70 | } |
62 | 71 | ||
63 | /* This is called by the IP fragmenting code and it ensures there is | 72 | /* This is called by the IP fragmenting code and it ensures there is |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 55ea853d57bc..247434553ae8 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -476,10 +476,9 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) | |||
476 | } | 476 | } |
477 | 477 | ||
478 | /* | 478 | /* |
479 | * Allocate and free nfs_write_data structures | 479 | * Allocate nfs_write_data structures |
480 | */ | 480 | */ |
481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); | 481 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); |
482 | extern void nfs_writedata_free(struct nfs_write_data *p); | ||
483 | 482 | ||
484 | /* | 483 | /* |
485 | * linux/fs/nfs/read.c | 484 | * linux/fs/nfs/read.c |
@@ -491,10 +490,9 @@ extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); | |||
491 | extern void nfs_readdata_release(void *data); | 490 | extern void nfs_readdata_release(void *data); |
492 | 491 | ||
493 | /* | 492 | /* |
494 | * Allocate and free nfs_read_data structures | 493 | * Allocate nfs_read_data structures |
495 | */ | 494 | */ |
496 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); | 495 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); |
497 | extern void nfs_readdata_free(struct nfs_read_data *p); | ||
498 | 496 | ||
499 | /* | 497 | /* |
500 | * linux/fs/nfs3proc.c | 498 | * linux/fs/nfs3proc.c |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2d3fb6416d91..db9cbf68e12b 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -659,7 +659,7 @@ struct nfs4_rename_res { | |||
659 | struct nfs4_setclientid { | 659 | struct nfs4_setclientid { |
660 | const nfs4_verifier * sc_verifier; /* request */ | 660 | const nfs4_verifier * sc_verifier; /* request */ |
661 | unsigned int sc_name_len; | 661 | unsigned int sc_name_len; |
662 | char sc_name[32]; /* request */ | 662 | char sc_name[48]; /* request */ |
663 | u32 sc_prog; /* request */ | 663 | u32 sc_prog; /* request */ |
664 | unsigned int sc_netid_len; | 664 | unsigned int sc_netid_len; |
665 | char sc_netid[4]; /* request */ | 665 | char sc_netid[4]; /* request */ |
diff --git a/include/linux/node.h b/include/linux/node.h index 81dcec84cd8f..bc001bc225c3 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -30,12 +30,20 @@ extern struct node node_devices[]; | |||
30 | 30 | ||
31 | extern int register_node(struct node *, int, struct node *); | 31 | extern int register_node(struct node *, int, struct node *); |
32 | extern void unregister_node(struct node *node); | 32 | extern void unregister_node(struct node *node); |
33 | #ifdef CONFIG_NUMA | ||
33 | extern int register_one_node(int nid); | 34 | extern int register_one_node(int nid); |
34 | extern void unregister_one_node(int nid); | 35 | extern void unregister_one_node(int nid); |
35 | #ifdef CONFIG_NUMA | ||
36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | 36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); |
37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | 37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); |
38 | #else | 38 | #else |
39 | static inline int register_one_node(int nid) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | static inline int unregister_one_node(int nid) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
39 | static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) | 47 | static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) |
40 | { | 48 | { |
41 | return 0; | 49 | return 0; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index df7b62676d87..47faf43fde1f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2159,6 +2159,7 @@ | |||
2159 | #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 | 2159 | #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 |
2160 | #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 | 2160 | #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 |
2161 | #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 | 2161 | #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 |
2162 | #define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c | ||
2162 | #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 | 2163 | #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 |
2163 | #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 | 2164 | #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 |
2164 | #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 | 2165 | #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 331521a10a2d..9447a57ee8a9 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -378,6 +378,7 @@ int phy_mii_ioctl(struct phy_device *phydev, | |||
378 | struct mii_ioctl_data *mii_data, int cmd); | 378 | struct mii_ioctl_data *mii_data, int cmd); |
379 | int phy_start_interrupts(struct phy_device *phydev); | 379 | int phy_start_interrupts(struct phy_device *phydev); |
380 | void phy_print_status(struct phy_device *phydev); | 380 | void phy_print_status(struct phy_device *phydev); |
381 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); | ||
381 | 382 | ||
382 | extern struct bus_type mdio_bus_type; | 383 | extern struct bus_type mdio_bus_type; |
383 | #endif /* __PHY_H */ | 384 | #endif /* __PHY_H */ |
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 2ed807ddc08c..783177387ac6 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -231,7 +231,6 @@ extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; | |||
231 | extern unsigned int pmu_power_flags; | 231 | extern unsigned int pmu_power_flags; |
232 | 232 | ||
233 | /* Backlight */ | 233 | /* Backlight */ |
234 | extern int disable_kernel_backlight; | 234 | extern void pmu_backlight_init(void); |
235 | extern void pmu_backlight_init(struct device_node*); | ||
236 | 235 | ||
237 | #endif /* __KERNEL__ */ | 236 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6afa72e080cb..6674fc1e51bf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1558,6 +1558,14 @@ static inline void freeze(struct task_struct *p) | |||
1558 | } | 1558 | } |
1559 | 1559 | ||
1560 | /* | 1560 | /* |
1561 | * Sometimes we may need to cancel the previous 'freeze' request | ||
1562 | */ | ||
1563 | static inline void do_not_freeze(struct task_struct *p) | ||
1564 | { | ||
1565 | p->flags &= ~PF_FREEZE; | ||
1566 | } | ||
1567 | |||
1568 | /* | ||
1561 | * Wake up a frozen process | 1569 | * Wake up a frozen process |
1562 | */ | 1570 | */ |
1563 | static inline int thaw_process(struct task_struct *p) | 1571 | static inline int thaw_process(struct task_struct *p) |
diff --git a/include/linux/security.h b/include/linux/security.h index f75303831d09..6bc2aad494ff 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1109,6 +1109,16 @@ struct swap_info_struct; | |||
1109 | * @name contains the name of the security module being unstacked. | 1109 | * @name contains the name of the security module being unstacked. |
1110 | * @ops contains a pointer to the struct security_operations of the module to unstack. | 1110 | * @ops contains a pointer to the struct security_operations of the module to unstack. |
1111 | * | 1111 | * |
1112 | * @secid_to_secctx: | ||
1113 | * Convert secid to security context. | ||
1114 | * @secid contains the security ID. | ||
1115 | * @secdata contains the pointer that stores the converted security context. | ||
1116 | * | ||
1117 | * @release_secctx: | ||
1118 | * Release the security context. | ||
1119 | * @secdata contains the security context. | ||
1120 | * @seclen contains the length of the security context. | ||
1121 | * | ||
1112 | * This is the main security structure. | 1122 | * This is the main security structure. |
1113 | */ | 1123 | */ |
1114 | struct security_operations { | 1124 | struct security_operations { |
@@ -1289,6 +1299,8 @@ struct security_operations { | |||
1289 | 1299 | ||
1290 | int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); | 1300 | int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); |
1291 | int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); | 1301 | int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); |
1302 | int (*secid_to_secctx)(u32 secid, char **secdata, u32 *seclen); | ||
1303 | void (*release_secctx)(char *secdata, u32 seclen); | ||
1292 | 1304 | ||
1293 | #ifdef CONFIG_SECURITY_NETWORK | 1305 | #ifdef CONFIG_SECURITY_NETWORK |
1294 | int (*unix_stream_connect) (struct socket * sock, | 1306 | int (*unix_stream_connect) (struct socket * sock, |
@@ -1317,7 +1329,7 @@ struct security_operations { | |||
1317 | int (*socket_shutdown) (struct socket * sock, int how); | 1329 | int (*socket_shutdown) (struct socket * sock, int how); |
1318 | int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); | 1330 | int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); |
1319 | int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); | 1331 | int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); |
1320 | int (*socket_getpeersec_dgram) (struct sk_buff *skb, char **secdata, u32 *seclen); | 1332 | int (*socket_getpeersec_dgram) (struct socket *sock, struct sk_buff *skb, u32 *secid); |
1321 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); | 1333 | int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); |
1322 | void (*sk_free_security) (struct sock *sk); | 1334 | void (*sk_free_security) (struct sock *sk); |
1323 | unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); | 1335 | unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); |
@@ -2059,6 +2071,16 @@ static inline int security_netlink_recv(struct sk_buff * skb, int cap) | |||
2059 | return security_ops->netlink_recv(skb, cap); | 2071 | return security_ops->netlink_recv(skb, cap); |
2060 | } | 2072 | } |
2061 | 2073 | ||
2074 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | ||
2075 | { | ||
2076 | return security_ops->secid_to_secctx(secid, secdata, seclen); | ||
2077 | } | ||
2078 | |||
2079 | static inline void security_release_secctx(char *secdata, u32 seclen) | ||
2080 | { | ||
2081 | return security_ops->release_secctx(secdata, seclen); | ||
2082 | } | ||
2083 | |||
2062 | /* prototypes */ | 2084 | /* prototypes */ |
2063 | extern int security_init (void); | 2085 | extern int security_init (void); |
2064 | extern int register_security (struct security_operations *ops); | 2086 | extern int register_security (struct security_operations *ops); |
@@ -2725,6 +2747,14 @@ static inline void securityfs_remove(struct dentry *dentry) | |||
2725 | { | 2747 | { |
2726 | } | 2748 | } |
2727 | 2749 | ||
2750 | static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) | ||
2751 | { | ||
2752 | return -EOPNOTSUPP; | ||
2753 | } | ||
2754 | |||
2755 | static inline void security_release_secctx(char *secdata, u32 seclen) | ||
2756 | { | ||
2757 | } | ||
2728 | #endif /* CONFIG_SECURITY */ | 2758 | #endif /* CONFIG_SECURITY */ |
2729 | 2759 | ||
2730 | #ifdef CONFIG_SECURITY_NETWORK | 2760 | #ifdef CONFIG_SECURITY_NETWORK |
@@ -2840,10 +2870,9 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ | |||
2840 | return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); | 2870 | return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); |
2841 | } | 2871 | } |
2842 | 2872 | ||
2843 | static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, | 2873 | static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) |
2844 | u32 *seclen) | ||
2845 | { | 2874 | { |
2846 | return security_ops->socket_getpeersec_dgram(skb, secdata, seclen); | 2875 | return security_ops->socket_getpeersec_dgram(sock, skb, secid); |
2847 | } | 2876 | } |
2848 | 2877 | ||
2849 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) | 2878 | static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) |
@@ -2968,8 +2997,7 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ | |||
2968 | return -ENOPROTOOPT; | 2997 | return -ENOPROTOOPT; |
2969 | } | 2998 | } |
2970 | 2999 | ||
2971 | static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, | 3000 | static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) |
2972 | u32 *seclen) | ||
2973 | { | 3001 | { |
2974 | return -ENOPROTOOPT; | 3002 | return -ENOPROTOOPT; |
2975 | } | 3003 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 4307e764ef0a..755e9cddac47 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -604,12 +604,17 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) | |||
604 | return list_->qlen; | 604 | return list_->qlen; |
605 | } | 605 | } |
606 | 606 | ||
607 | extern struct lock_class_key skb_queue_lock_key; | 607 | /* |
608 | 608 | * This function creates a split out lock class for each invocation; | |
609 | * this is needed for now since a whole lot of users of the skb-queue | ||
610 | * infrastructure in drivers have different locking usage (in hardirq) | ||
611 | * than the networking core (in softirq only). In the long run either the | ||
612 | * network layer or drivers should need annotation to consolidate the | ||
613 | * main types of usage into 3 classes. | ||
614 | */ | ||
609 | static inline void skb_queue_head_init(struct sk_buff_head *list) | 615 | static inline void skb_queue_head_init(struct sk_buff_head *list) |
610 | { | 616 | { |
611 | spin_lock_init(&list->lock); | 617 | spin_lock_init(&list->lock); |
612 | lockdep_set_class(&list->lock, &skb_queue_lock_key); | ||
613 | list->prev = list->next = (struct sk_buff *)list; | 618 | list->prev = list->next = (struct sk_buff *)list; |
614 | list->qlen = 0; | 619 | list->qlen = 0; |
615 | } | 620 | } |
@@ -1035,6 +1040,21 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len) | |||
1035 | } | 1040 | } |
1036 | 1041 | ||
1037 | /** | 1042 | /** |
1043 | * pskb_trim_unique - remove end from a paged unique (not cloned) buffer | ||
1044 | * @skb: buffer to alter | ||
1045 | * @len: new length | ||
1046 | * | ||
1047 | * This is identical to pskb_trim except that the caller knows that | ||
1048 | * the skb is not cloned so we should never get an error due to out- | ||
1049 | * of-memory. | ||
1050 | */ | ||
1051 | static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len) | ||
1052 | { | ||
1053 | int err = pskb_trim(skb, len); | ||
1054 | BUG_ON(err); | ||
1055 | } | ||
1056 | |||
1057 | /** | ||
1038 | * skb_orphan - orphan a buffer | 1058 | * skb_orphan - orphan a buffer |
1039 | * @skb: buffer to orphan | 1059 | * @skb: buffer to orphan |
1040 | * | 1060 | * |
@@ -1076,7 +1096,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) | |||
1076 | * the headroom they think they need without accounting for the | 1096 | * the headroom they think they need without accounting for the |
1077 | * built in space. The built in space is used for optimisations. | 1097 | * built in space. The built in space is used for optimisations. |
1078 | * | 1098 | * |
1079 | * %NULL is returned in there is no free memory. | 1099 | * %NULL is returned if there is no free memory. |
1080 | */ | 1100 | */ |
1081 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | 1101 | static inline struct sk_buff *__dev_alloc_skb(unsigned int length, |
1082 | gfp_t gfp_mask) | 1102 | gfp_t gfp_mask) |
@@ -1096,7 +1116,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, | |||
1096 | * the headroom they think they need without accounting for the | 1116 | * the headroom they think they need without accounting for the |
1097 | * built in space. The built in space is used for optimisations. | 1117 | * built in space. The built in space is used for optimisations. |
1098 | * | 1118 | * |
1099 | * %NULL is returned in there is no free memory. Although this function | 1119 | * %NULL is returned if there is no free memory. Although this function |
1100 | * allocates memory it can be called from an interrupt. | 1120 | * allocates memory it can be called from an interrupt. |
1101 | */ | 1121 | */ |
1102 | static inline struct sk_buff *dev_alloc_skb(unsigned int length) | 1122 | static inline struct sk_buff *dev_alloc_skb(unsigned int length) |
@@ -1104,6 +1124,28 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) | |||
1104 | return __dev_alloc_skb(length, GFP_ATOMIC); | 1124 | return __dev_alloc_skb(length, GFP_ATOMIC); |
1105 | } | 1125 | } |
1106 | 1126 | ||
1127 | extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, | ||
1128 | unsigned int length, gfp_t gfp_mask); | ||
1129 | |||
1130 | /** | ||
1131 | * netdev_alloc_skb - allocate an skbuff for rx on a specific device | ||
1132 | * @dev: network device to receive on | ||
1133 | * @length: length to allocate | ||
1134 | * | ||
1135 | * Allocate a new &sk_buff and assign it a usage count of one. The | ||
1136 | * buffer has unspecified headroom built in. Users should allocate | ||
1137 | * the headroom they think they need without accounting for the | ||
1138 | * built in space. The built in space is used for optimisations. | ||
1139 | * | ||
1140 | * %NULL is returned if there is no free memory. Although this function | ||
1141 | * allocates memory it can be called from an interrupt. | ||
1142 | */ | ||
1143 | static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | ||
1144 | unsigned int length) | ||
1145 | { | ||
1146 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); | ||
1147 | } | ||
1148 | |||
1107 | /** | 1149 | /** |
1108 | * skb_cow - copy header of skb when it is required | 1150 | * skb_cow - copy header of skb when it is required |
1109 | * @skb: buffer to cow | 1151 | * @skb: buffer to cow |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index 2c2189cb30aa..a481472c9484 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -42,9 +42,9 @@ RPC_I(struct inode *inode) | |||
42 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | 42 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); |
43 | 43 | ||
44 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); | 44 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); |
45 | extern int rpc_rmdir(char *); | 45 | extern int rpc_rmdir(struct dentry *); |
46 | extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags); | 46 | extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags); |
47 | extern int rpc_unlink(char *); | 47 | extern int rpc_unlink(struct dentry *); |
48 | extern struct vfsmount *rpc_get_mount(void); | 48 | extern struct vfsmount *rpc_get_mount(void); |
49 | extern void rpc_put_mount(void); | 49 | extern void rpc_put_mount(void); |
50 | 50 | ||
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index e8bbe8118de8..3a0cca255b76 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -37,7 +37,7 @@ extern unsigned int xprt_max_resvport; | |||
37 | 37 | ||
38 | #define RPC_MIN_RESVPORT (1U) | 38 | #define RPC_MIN_RESVPORT (1U) |
39 | #define RPC_MAX_RESVPORT (65535U) | 39 | #define RPC_MAX_RESVPORT (65535U) |
40 | #define RPC_DEF_MIN_RESVPORT (650U) | 40 | #define RPC_DEF_MIN_RESVPORT (665U) |
41 | #define RPC_DEF_MAX_RESVPORT (1023U) | 41 | #define RPC_DEF_MAX_RESVPORT (1023U) |
42 | 42 | ||
43 | /* | 43 | /* |
@@ -229,7 +229,7 @@ int xprt_reserve_xprt(struct rpc_task *task); | |||
229 | int xprt_reserve_xprt_cong(struct rpc_task *task); | 229 | int xprt_reserve_xprt_cong(struct rpc_task *task); |
230 | int xprt_prepare_transmit(struct rpc_task *task); | 230 | int xprt_prepare_transmit(struct rpc_task *task); |
231 | void xprt_transmit(struct rpc_task *task); | 231 | void xprt_transmit(struct rpc_task *task); |
232 | void xprt_abort_transmit(struct rpc_task *task); | 232 | void xprt_end_transmit(struct rpc_task *task); |
233 | int xprt_adjust_timeout(struct rpc_rqst *req); | 233 | int xprt_adjust_timeout(struct rpc_rqst *req); |
234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
diff --git a/include/linux/tty.h b/include/linux/tty.h index e421d5e34818..04827ca65781 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -59,6 +59,7 @@ struct tty_bufhead { | |||
59 | struct tty_buffer *head; /* Queue head */ | 59 | struct tty_buffer *head; /* Queue head */ |
60 | struct tty_buffer *tail; /* Active buffer */ | 60 | struct tty_buffer *tail; /* Active buffer */ |
61 | struct tty_buffer *free; /* Free queue head */ | 61 | struct tty_buffer *free; /* Free queue head */ |
62 | int memory_used; /* Buffer space used excluding free queue */ | ||
62 | }; | 63 | }; |
63 | /* | 64 | /* |
64 | * The pty uses char_buf and flag_buf as a contiguous buffer | 65 | * The pty uses char_buf and flag_buf as a contiguous buffer |
diff --git a/include/linux/usb.h b/include/linux/usb.h index c944e8f06a4a..d2bd0c8e0154 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -103,8 +103,7 @@ enum usb_interface_condition { | |||
103 | * @condition: binding state of the interface: not bound, binding | 103 | * @condition: binding state of the interface: not bound, binding |
104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 104 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
105 | * @dev: driver model's view of this device | 105 | * @dev: driver model's view of this device |
106 | * @usb_dev: if an interface is bound to the USB major, this will point | 106 | * @class_dev: driver model's class view of this device. |
107 | * to the sysfs representation for that device. | ||
108 | * | 107 | * |
109 | * USB device drivers attach to interfaces on a physical device. Each | 108 | * USB device drivers attach to interfaces on a physical device. Each |
110 | * interface encapsulates a single high level function, such as feeding | 109 | * interface encapsulates a single high level function, such as feeding |
@@ -144,7 +143,7 @@ struct usb_interface { | |||
144 | * bound to */ | 143 | * bound to */ |
145 | enum usb_interface_condition condition; /* state of binding */ | 144 | enum usb_interface_condition condition; /* state of binding */ |
146 | struct device dev; /* interface specific device info */ | 145 | struct device dev; /* interface specific device info */ |
147 | struct device *usb_dev; /* pointer to the usb class's device, if any */ | 146 | struct class_device *class_dev; |
148 | }; | 147 | }; |
149 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 148 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
150 | #define interface_to_usbdev(intf) \ | 149 | #define interface_to_usbdev(intf) \ |
@@ -361,7 +360,7 @@ struct usb_device { | |||
361 | char *serial; /* iSerialNumber string, if present */ | 360 | char *serial; /* iSerialNumber string, if present */ |
362 | 361 | ||
363 | struct list_head filelist; | 362 | struct list_head filelist; |
364 | struct device *usbfs_dev; | 363 | struct class_device *class_dev; |
365 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 364 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
366 | 365 | ||
367 | /* | 366 | /* |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index f38f43f20fae..e7fc5fed5b98 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -44,7 +44,9 @@ | |||
44 | US_FLAG(NO_WP_DETECT, 0x00000200) \ | 44 | US_FLAG(NO_WP_DETECT, 0x00000200) \ |
45 | /* Don't check for write-protect */ \ | 45 | /* Don't check for write-protect */ \ |
46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ | 46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ |
47 | /* Sets max_sectors to 64 */ | 47 | /* Sets max_sectors to 64 */ \ |
48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | ||
49 | /* Don't claim device */ | ||
48 | 50 | ||
49 | #define US_FLAG(name, value) US_FL_##name = value , | 51 | #define US_FLAG(name, value) US_FL_##name = value , |
50 | enum { US_DO_ALL_FLAGS }; | 52 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 41bc7e9603cd..518c7a32175e 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -12,10 +12,11 @@ | |||
12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
14 | 14 | ||
15 | #define HAVE_V4L1 1 | ||
16 | |||
17 | #include <linux/videodev2.h> | 15 | #include <linux/videodev2.h> |
18 | 16 | ||
17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
18 | #define HAVE_V4L1 1 | ||
19 | |||
19 | struct video_capability | 20 | struct video_capability |
20 | { | 21 | { |
21 | char name[32]; | 22 | char name[32]; |
@@ -336,6 +337,8 @@ struct video_code | |||
336 | #define VID_HARDWARE_SN9C102 38 | 337 | #define VID_HARDWARE_SN9C102 38 |
337 | #define VID_HARDWARE_ARV 39 | 338 | #define VID_HARDWARE_ARV 39 |
338 | 339 | ||
340 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
341 | |||
339 | #endif /* __LINUX_VIDEODEV_H */ | 342 | #endif /* __LINUX_VIDEODEV_H */ |
340 | 343 | ||
341 | /* | 344 | /* |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a62673dad76e..b7146956a929 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -716,7 +716,7 @@ struct v4l2_ext_control | |||
716 | __s64 value64; | 716 | __s64 value64; |
717 | void *reserved; | 717 | void *reserved; |
718 | }; | 718 | }; |
719 | }; | 719 | } __attribute__ ((packed)); |
720 | 720 | ||
721 | struct v4l2_ext_controls | 721 | struct v4l2_ext_controls |
722 | { | 722 | { |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 1ab806c47514..2d9b1b60798a 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -41,23 +41,23 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states); | |||
41 | 41 | ||
42 | static inline void __count_vm_event(enum vm_event_item item) | 42 | static inline void __count_vm_event(enum vm_event_item item) |
43 | { | 43 | { |
44 | __get_cpu_var(vm_event_states.event[item])++; | 44 | __get_cpu_var(vm_event_states).event[item]++; |
45 | } | 45 | } |
46 | 46 | ||
47 | static inline void count_vm_event(enum vm_event_item item) | 47 | static inline void count_vm_event(enum vm_event_item item) |
48 | { | 48 | { |
49 | get_cpu_var(vm_event_states.event[item])++; | 49 | get_cpu_var(vm_event_states).event[item]++; |
50 | put_cpu(); | 50 | put_cpu(); |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline void __count_vm_events(enum vm_event_item item, long delta) | 53 | static inline void __count_vm_events(enum vm_event_item item, long delta) |
54 | { | 54 | { |
55 | __get_cpu_var(vm_event_states.event[item]) += delta; | 55 | __get_cpu_var(vm_event_states).event[item] += delta; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline void count_vm_events(enum vm_event_item item, long delta) | 58 | static inline void count_vm_events(enum vm_event_item item, long delta) |
59 | { | 59 | { |
60 | get_cpu_var(vm_event_states.event[item]) += delta; | 60 | get_cpu_var(vm_event_states).event[item] += delta; |
61 | put_cpu(); | 61 | put_cpu(); |
62 | } | 62 | } |
63 | 63 | ||
diff --git a/include/linux/vt.h b/include/linux/vt.h index 8ab334a48222..ba806e8711be 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -60,5 +60,6 @@ struct vt_consize { | |||
60 | #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ | 60 | #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ |
61 | #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ | 61 | #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ |
62 | #define VT_UNLOCKSWITCH 0x560C /* allow vt switching */ | 62 | #define VT_UNLOCKSWITCH 0x560C /* allow vt switching */ |
63 | #define VT_GETHIFONTMASK 0x560D /* return hi font mask */ | ||
63 | 64 | ||
64 | #endif /* _LINUX_VT_H */ | 65 | #endif /* _LINUX_VT_H */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 62dae1a8c441..600d61d7d2ab 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/compiler.h> /* need __user */ | 18 | #include <linux/compiler.h> /* need __user */ |
19 | #ifdef CONFIG_VIDEO_V4L1 | 19 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
20 | #include <linux/videodev.h> | 20 | #include <linux/videodev.h> |
21 | #else | 21 | #else |
22 | #include <linux/videodev2.h> | 22 | #include <linux/videodev2.h> |
@@ -341,11 +341,14 @@ extern int video_usercopy(struct inode *inode, struct file *file, | |||
341 | extern struct video_device* video_devdata(struct file*); | 341 | extern struct video_device* video_devdata(struct file*); |
342 | 342 | ||
343 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | 343 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) |
344 | static inline void | 344 | static inline int |
345 | video_device_create_file(struct video_device *vfd, | 345 | video_device_create_file(struct video_device *vfd, |
346 | struct class_device_attribute *attr) | 346 | struct class_device_attribute *attr) |
347 | { | 347 | { |
348 | class_device_create_file(&vfd->class_dev, attr); | 348 | int ret = class_device_create_file(&vfd->class_dev, attr); |
349 | if (ret < 0) | ||
350 | printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); | ||
351 | return ret; | ||
349 | } | 352 | } |
350 | static inline void | 353 | static inline void |
351 | video_device_remove_file(struct video_device *vfd, | 354 | video_device_remove_file(struct video_device *vfd, |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 2fec827c8801..c0398f5a8cb9 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -54,15 +54,13 @@ struct unix_skb_parms { | |||
54 | struct ucred creds; /* Skb credentials */ | 54 | struct ucred creds; /* Skb credentials */ |
55 | struct scm_fp_list *fp; /* Passed files */ | 55 | struct scm_fp_list *fp; /* Passed files */ |
56 | #ifdef CONFIG_SECURITY_NETWORK | 56 | #ifdef CONFIG_SECURITY_NETWORK |
57 | char *secdata; /* Security context */ | 57 | u32 secid; /* Security ID */ |
58 | u32 seclen; /* Security length */ | ||
59 | #endif | 58 | #endif |
60 | }; | 59 | }; |
61 | 60 | ||
62 | #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) | 61 | #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) |
63 | #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) | 62 | #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) |
64 | #define UNIXSECDATA(skb) (&UNIXCB((skb)).secdata) | 63 | #define UNIXSID(skb) (&UNIXCB((skb)).secid) |
65 | #define UNIXSECLEN(skb) (&UNIXCB((skb)).seclen) | ||
66 | 64 | ||
67 | #define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) | 65 | #define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) |
68 | #define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) | 66 | #define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index ab29dafb1a6a..96b0e66406ec 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -139,16 +139,22 @@ extern rwlock_t rt6_lock; | |||
139 | /* | 139 | /* |
140 | * Store a destination cache entry in a socket | 140 | * Store a destination cache entry in a socket |
141 | */ | 141 | */ |
142 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | 142 | static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, |
143 | struct in6_addr *daddr) | 143 | struct in6_addr *daddr) |
144 | { | 144 | { |
145 | struct ipv6_pinfo *np = inet6_sk(sk); | 145 | struct ipv6_pinfo *np = inet6_sk(sk); |
146 | struct rt6_info *rt = (struct rt6_info *) dst; | 146 | struct rt6_info *rt = (struct rt6_info *) dst; |
147 | 147 | ||
148 | write_lock(&sk->sk_dst_lock); | ||
149 | sk_setup_caps(sk, dst); | 148 | sk_setup_caps(sk, dst); |
150 | np->daddr_cache = daddr; | 149 | np->daddr_cache = daddr; |
151 | np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; | 150 | np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; |
151 | } | ||
152 | |||
153 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | ||
154 | struct in6_addr *daddr) | ||
155 | { | ||
156 | write_lock(&sk->sk_dst_lock); | ||
157 | __ip6_dst_store(sk, dst, daddr); | ||
152 | write_unlock(&sk->sk_dst_lock); | 158 | write_unlock(&sk->sk_dst_lock); |
153 | } | 159 | } |
154 | 160 | ||
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index a8fdf7970b37..ece7e8a84ffd 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -468,6 +468,9 @@ extern void ip6_flush_pending_frames(struct sock *sk); | |||
468 | extern int ip6_dst_lookup(struct sock *sk, | 468 | extern int ip6_dst_lookup(struct sock *sk, |
469 | struct dst_entry **dst, | 469 | struct dst_entry **dst, |
470 | struct flowi *fl); | 470 | struct flowi *fl); |
471 | extern int ip6_sk_dst_lookup(struct sock *sk, | ||
472 | struct dst_entry **dst, | ||
473 | struct flowi *fl); | ||
471 | 474 | ||
472 | /* | 475 | /* |
473 | * skb processing functions | 476 | * skb processing functions |
diff --git a/include/net/netdma.h b/include/net/netdma.h index ceae5ee85c04..7f53cd1d8b1e 100644 --- a/include/net/netdma.h +++ b/include/net/netdma.h | |||
@@ -29,7 +29,7 @@ static inline struct dma_chan *get_softnet_dma(void) | |||
29 | { | 29 | { |
30 | struct dma_chan *chan; | 30 | struct dma_chan *chan; |
31 | rcu_read_lock(); | 31 | rcu_read_lock(); |
32 | chan = rcu_dereference(__get_cpu_var(softnet_data.net_dma)); | 32 | chan = rcu_dereference(__get_cpu_var(softnet_data).net_dma); |
33 | if (chan) | 33 | if (chan) |
34 | dma_chan_get(chan); | 34 | dma_chan_get(chan); |
35 | rcu_read_unlock(); | 35 | rcu_read_unlock(); |
diff --git a/include/net/netevent.h b/include/net/netevent.h new file mode 100644 index 000000000000..e5d216241423 --- /dev/null +++ b/include/net/netevent.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _NET_EVENT_H | ||
2 | #define _NET_EVENT_H | ||
3 | |||
4 | /* | ||
5 | * Generic netevent notifiers | ||
6 | * | ||
7 | * Authors: | ||
8 | * Tom Tucker <tom@opengridcomputing.com> | ||
9 | * Steve Wise <swise@opengridcomputing.com> | ||
10 | * | ||
11 | * Changes: | ||
12 | */ | ||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #include <net/dst.h> | ||
16 | |||
17 | struct netevent_redirect { | ||
18 | struct dst_entry *old; | ||
19 | struct dst_entry *new; | ||
20 | }; | ||
21 | |||
22 | enum netevent_notif_type { | ||
23 | NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */ | ||
24 | NETEVENT_PMTU_UPDATE, /* arg is struct dst_entry ptr */ | ||
25 | NETEVENT_REDIRECT, /* arg is struct netevent_redirect ptr */ | ||
26 | }; | ||
27 | |||
28 | extern int register_netevent_notifier(struct notifier_block *nb); | ||
29 | extern int unregister_netevent_notifier(struct notifier_block *nb); | ||
30 | extern int call_netevent_notifiers(unsigned long val, void *v); | ||
31 | |||
32 | #endif | ||
33 | #endif | ||
diff --git a/include/net/red.h b/include/net/red.h index 5ccdbb3d4722..a4eb37946f2c 100644 --- a/include/net/red.h +++ b/include/net/red.h | |||
@@ -212,7 +212,7 @@ static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p) | |||
212 | * Seems, it is the best solution to | 212 | * Seems, it is the best solution to |
213 | * problem of too coarse exponent tabulation. | 213 | * problem of too coarse exponent tabulation. |
214 | */ | 214 | */ |
215 | us_idle = (p->qavg * us_idle) >> p->Scell_log; | 215 | us_idle = (p->qavg * (u64)us_idle) >> p->Scell_log; |
216 | 216 | ||
217 | if (us_idle < (p->qavg >> 1)) | 217 | if (us_idle < (p->qavg >> 1)) |
218 | return p->qavg - us_idle; | 218 | return p->qavg - us_idle; |
diff --git a/include/net/scm.h b/include/net/scm.h index 02daa097cdcd..5637d5e22d5f 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/limits.h> | 4 | #include <linux/limits.h> |
5 | #include <linux/net.h> | 5 | #include <linux/net.h> |
6 | #include <linux/security.h> | ||
6 | 7 | ||
7 | /* Well, we should have at least one descriptor open | 8 | /* Well, we should have at least one descriptor open |
8 | * to accept passed FDs 8) | 9 | * to accept passed FDs 8) |
@@ -20,8 +21,7 @@ struct scm_cookie | |||
20 | struct ucred creds; /* Skb credentials */ | 21 | struct ucred creds; /* Skb credentials */ |
21 | struct scm_fp_list *fp; /* Passed files */ | 22 | struct scm_fp_list *fp; /* Passed files */ |
22 | #ifdef CONFIG_SECURITY_NETWORK | 23 | #ifdef CONFIG_SECURITY_NETWORK |
23 | char *secdata; /* Security context */ | 24 | u32 secid; /* Passed security ID */ |
24 | u32 seclen; /* Security length */ | ||
25 | #endif | 25 | #endif |
26 | unsigned long seq; /* Connection seqno */ | 26 | unsigned long seq; /* Connection seqno */ |
27 | }; | 27 | }; |
@@ -32,6 +32,16 @@ extern int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie | |||
32 | extern void __scm_destroy(struct scm_cookie *scm); | 32 | extern void __scm_destroy(struct scm_cookie *scm); |
33 | extern struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl); | 33 | extern struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl); |
34 | 34 | ||
35 | #ifdef CONFIG_SECURITY_NETWORK | ||
36 | static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) | ||
37 | { | ||
38 | security_socket_getpeersec_dgram(sock, NULL, &scm->secid); | ||
39 | } | ||
40 | #else | ||
41 | static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) | ||
42 | { } | ||
43 | #endif /* CONFIG_SECURITY_NETWORK */ | ||
44 | |||
35 | static __inline__ void scm_destroy(struct scm_cookie *scm) | 45 | static __inline__ void scm_destroy(struct scm_cookie *scm) |
36 | { | 46 | { |
37 | if (scm && scm->fp) | 47 | if (scm && scm->fp) |
@@ -47,6 +57,7 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | |||
47 | scm->creds.pid = p->tgid; | 57 | scm->creds.pid = p->tgid; |
48 | scm->fp = NULL; | 58 | scm->fp = NULL; |
49 | scm->seq = 0; | 59 | scm->seq = 0; |
60 | unix_get_peersec_dgram(sock, scm); | ||
50 | if (msg->msg_controllen <= 0) | 61 | if (msg->msg_controllen <= 0) |
51 | return 0; | 62 | return 0; |
52 | return __scm_send(sock, msg, scm); | 63 | return __scm_send(sock, msg, scm); |
@@ -55,8 +66,18 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | |||
55 | #ifdef CONFIG_SECURITY_NETWORK | 66 | #ifdef CONFIG_SECURITY_NETWORK |
56 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) | 67 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) |
57 | { | 68 | { |
58 | if (test_bit(SOCK_PASSSEC, &sock->flags) && scm->secdata != NULL) | 69 | char *secdata; |
59 | put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, scm->seclen, scm->secdata); | 70 | u32 seclen; |
71 | int err; | ||
72 | |||
73 | if (test_bit(SOCK_PASSSEC, &sock->flags)) { | ||
74 | err = security_secid_to_secctx(scm->secid, &secdata, &seclen); | ||
75 | |||
76 | if (!err) { | ||
77 | put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, seclen, secdata); | ||
78 | security_release_secctx(secdata, seclen); | ||
79 | } | ||
80 | } | ||
60 | } | 81 | } |
61 | #else | 82 | #else |
62 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) | 83 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index a9663b49ea54..92eae0e0f3f1 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -404,19 +404,6 @@ static inline int sctp_list_single_entry(struct list_head *head) | |||
404 | return ((head->next != head) && (head->next == head->prev)); | 404 | return ((head->next != head) && (head->next == head->prev)); |
405 | } | 405 | } |
406 | 406 | ||
407 | /* Calculate the size (in bytes) occupied by the data of an iovec. */ | ||
408 | static inline size_t get_user_iov_size(struct iovec *iov, int iovlen) | ||
409 | { | ||
410 | size_t retval = 0; | ||
411 | |||
412 | for (; iovlen > 0; --iovlen) { | ||
413 | retval += iov->iov_len; | ||
414 | iov++; | ||
415 | } | ||
416 | |||
417 | return retval; | ||
418 | } | ||
419 | |||
420 | /* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ | 407 | /* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ |
421 | static inline __s32 sctp_jitter(__u32 rto) | 408 | static inline __s32 sctp_jitter(__u32 rto) |
422 | { | 409 | { |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 1eac3d0eb7a9..de313de4fefe 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -221,8 +221,7 @@ struct sctp_chunk *sctp_make_abort_no_data(const struct sctp_association *, | |||
221 | const struct sctp_chunk *, | 221 | const struct sctp_chunk *, |
222 | __u32 tsn); | 222 | __u32 tsn); |
223 | struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *, | 223 | struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *, |
224 | const struct sctp_chunk *, | 224 | const struct msghdr *, size_t msg_len); |
225 | const struct msghdr *); | ||
226 | struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *, | 225 | struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *, |
227 | const struct sctp_chunk *, | 226 | const struct sctp_chunk *, |
228 | const __u8 *, | 227 | const __u8 *, |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0720bddff1e9..7a093d0aa0fe 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -914,6 +914,9 @@ static inline void tcp_set_state(struct sock *sk, int state) | |||
914 | 914 | ||
915 | static inline void tcp_done(struct sock *sk) | 915 | static inline void tcp_done(struct sock *sk) |
916 | { | 916 | { |
917 | if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) | ||
918 | TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); | ||
919 | |||
917 | tcp_set_state(sk, TCP_CLOSE); | 920 | tcp_set_state(sk, TCP_CLOSE); |
918 | tcp_clear_xmit_timers(sk); | 921 | tcp_clear_xmit_timers(sk); |
919 | 922 | ||
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ba2760802ded..41904f611d12 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -60,6 +60,7 @@ struct iscsi_nopin; | |||
60 | #define TMABORT_SUCCESS 0x1 | 60 | #define TMABORT_SUCCESS 0x1 |
61 | #define TMABORT_FAILED 0x2 | 61 | #define TMABORT_FAILED 0x2 |
62 | #define TMABORT_TIMEDOUT 0x3 | 62 | #define TMABORT_TIMEDOUT 0x3 |
63 | #define TMABORT_NOT_FOUND 0x4 | ||
63 | 64 | ||
64 | /* Connection suspend "bit" */ | 65 | /* Connection suspend "bit" */ |
65 | #define ISCSI_SUSPEND_BIT 1 | 66 | #define ISCSI_SUSPEND_BIT 1 |
@@ -83,6 +84,12 @@ struct iscsi_mgmt_task { | |||
83 | struct list_head running; | 84 | struct list_head running; |
84 | }; | 85 | }; |
85 | 86 | ||
87 | enum { | ||
88 | ISCSI_TASK_COMPLETED, | ||
89 | ISCSI_TASK_PENDING, | ||
90 | ISCSI_TASK_RUNNING, | ||
91 | }; | ||
92 | |||
86 | struct iscsi_cmd_task { | 93 | struct iscsi_cmd_task { |
87 | /* | 94 | /* |
88 | * Becuae LLDs allocate their hdr differently, this is a pointer to | 95 | * Becuae LLDs allocate their hdr differently, this is a pointer to |
@@ -101,6 +108,8 @@ struct iscsi_cmd_task { | |||
101 | struct iscsi_conn *conn; /* used connection */ | 108 | struct iscsi_conn *conn; /* used connection */ |
102 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ | 109 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ |
103 | 110 | ||
111 | /* state set/tested under session->lock */ | ||
112 | int state; | ||
104 | struct list_head running; /* running cmd list */ | 113 | struct list_head running; /* running cmd list */ |
105 | void *dd_data; /* driver/transport data */ | 114 | void *dd_data; /* driver/transport data */ |
106 | }; | 115 | }; |
@@ -126,6 +135,14 @@ struct iscsi_conn { | |||
126 | int id; /* CID */ | 135 | int id; /* CID */ |
127 | struct list_head item; /* maintains list of conns */ | 136 | struct list_head item; /* maintains list of conns */ |
128 | int c_stage; /* connection state */ | 137 | int c_stage; /* connection state */ |
138 | /* | ||
139 | * Preallocated buffer for pdus that have data but do not | ||
140 | * originate from scsi-ml. We never have two pdus using the | ||
141 | * buffer at the same time. It is only allocated to | ||
142 | * the default max recv size because the pdus we support | ||
143 | * should always fit in this buffer | ||
144 | */ | ||
145 | char *data; | ||
129 | struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ | 146 | struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ |
130 | struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ | 147 | struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ |
131 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ | 148 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ |
@@ -134,7 +151,7 @@ struct iscsi_conn { | |||
134 | struct kfifo *immqueue; /* immediate xmit queue */ | 151 | struct kfifo *immqueue; /* immediate xmit queue */ |
135 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ | 152 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ |
136 | struct list_head mgmt_run_list; /* list of control tasks */ | 153 | struct list_head mgmt_run_list; /* list of control tasks */ |
137 | struct kfifo *xmitqueue; /* data-path cmd queue */ | 154 | struct list_head xmitqueue; /* data-path cmd queue */ |
138 | struct list_head run_list; /* list of cmds in progress */ | 155 | struct list_head run_list; /* list of cmds in progress */ |
139 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ | 156 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ |
140 | /* | 157 | /* |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 5a3df1d7085f..39e833260bd0 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -57,8 +57,6 @@ struct sockaddr; | |||
57 | * @stop_conn: suspend/recover/terminate connection | 57 | * @stop_conn: suspend/recover/terminate connection |
58 | * @send_pdu: send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text. | 58 | * @send_pdu: send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text. |
59 | * @session_recovery_timedout: notify LLD a block during recovery timed out | 59 | * @session_recovery_timedout: notify LLD a block during recovery timed out |
60 | * @suspend_conn_recv: susepend the recv side of the connection | ||
61 | * @termincate_conn: destroy socket connection. Called with mutex lock. | ||
62 | * @init_cmd_task: Initialize a iscsi_cmd_task and any internal structs. | 60 | * @init_cmd_task: Initialize a iscsi_cmd_task and any internal structs. |
63 | * Called from queuecommand with session lock held. | 61 | * Called from queuecommand with session lock held. |
64 | * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. | 62 | * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. |
@@ -112,8 +110,6 @@ struct iscsi_transport { | |||
112 | char *data, uint32_t data_size); | 110 | char *data, uint32_t data_size); |
113 | void (*get_stats) (struct iscsi_cls_conn *conn, | 111 | void (*get_stats) (struct iscsi_cls_conn *conn, |
114 | struct iscsi_stats *stats); | 112 | struct iscsi_stats *stats); |
115 | void (*suspend_conn_recv) (struct iscsi_conn *conn); | ||
116 | void (*terminate_conn) (struct iscsi_conn *conn); | ||
117 | void (*init_cmd_task) (struct iscsi_cmd_task *ctask); | 113 | void (*init_cmd_task) (struct iscsi_cmd_task *ctask); |
118 | void (*init_mgmt_task) (struct iscsi_conn *conn, | 114 | void (*init_mgmt_task) (struct iscsi_conn *conn, |
119 | struct iscsi_mgmt_task *mtask, | 115 | struct iscsi_mgmt_task *mtask, |