diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-04 22:16:39 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-04 22:16:39 -0500 |
commit | 8e04221029067cbaff3fc8f4daf991532afbcbaf (patch) | |
tree | 18cf757bcd315c76f5f458aa72a0a57db0a78985 | |
parent | 9ad62ec4f752c82b39aa5927f23d894b46ae10b9 (diff) | |
parent | 2c940db250c1610d95ea5331dc819b8bd4db96ae (diff) |
Merge branch 'sh/stable-updates'
109 files changed, 1203 insertions, 532 deletions
diff --git a/Documentation/fault-injection/fault-injection.txt b/Documentation/fault-injection/fault-injection.txt index 079305640790..7be15e44d481 100644 --- a/Documentation/fault-injection/fault-injection.txt +++ b/Documentation/fault-injection/fault-injection.txt | |||
@@ -143,8 +143,8 @@ o provide a way to configure fault attributes | |||
143 | failslab, fail_page_alloc, and fail_make_request use this way. | 143 | failslab, fail_page_alloc, and fail_make_request use this way. |
144 | Helper functions: | 144 | Helper functions: |
145 | 145 | ||
146 | init_fault_attr_entries(entries, attr, name); | 146 | init_fault_attr_dentries(entries, attr, name); |
147 | void cleanup_fault_attr_entries(entries); | 147 | void cleanup_fault_attr_dentries(entries); |
148 | 148 | ||
149 | - module parameters | 149 | - module parameters |
150 | 150 | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4c33ca82f9b1..184a6bd54825 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -702,6 +702,7 @@ config ARCH_OMAP | |||
702 | select ARCH_HAS_CPUFREQ | 702 | select ARCH_HAS_CPUFREQ |
703 | select GENERIC_TIME | 703 | select GENERIC_TIME |
704 | select GENERIC_CLOCKEVENTS | 704 | select GENERIC_CLOCKEVENTS |
705 | select ARCH_HAS_HOLES_MEMORYMODEL | ||
705 | help | 706 | help |
706 | Support for TI's OMAP platform (OMAP1 and OMAP2). | 707 | Support for TI's OMAP platform (OMAP1 and OMAP2). |
707 | 708 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 9e7582572741..356d702c0808 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -94,7 +94,7 @@ CFLAGS_ABI +=-funwind-tables | |||
94 | endif | 94 | endif |
95 | 95 | ||
96 | ifeq ($(CONFIG_THUMB2_KERNEL),y) | 96 | ifeq ($(CONFIG_THUMB2_KERNEL),y) |
97 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=thumb,-Wa$(comma)-mauto-it) | 97 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) |
98 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) | 98 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) |
99 | CFLAGS_THUMB2 :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) | 99 | CFLAGS_THUMB2 :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) |
100 | AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb | 100 | AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb |
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index 6e838b857712..6acc88bcdc40 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -119,6 +119,11 @@ static unsigned long get_rate_nfc(struct clk *clk) | |||
119 | return get_rate_per(8); | 119 | return get_rate_per(8); |
120 | } | 120 | } |
121 | 121 | ||
122 | static unsigned long get_rate_gpt(struct clk *clk) | ||
123 | { | ||
124 | return get_rate_per(5); | ||
125 | } | ||
126 | |||
122 | static unsigned long get_rate_otg(struct clk *clk) | 127 | static unsigned long get_rate_otg(struct clk *clk) |
123 | { | 128 | { |
124 | return 48000000; /* FIXME */ | 129 | return 48000000; /* FIXME */ |
@@ -144,7 +149,7 @@ static void clk_cgcr_disable(struct clk *clk) | |||
144 | __raw_writel(reg, clk->enable_reg); | 149 | __raw_writel(reg, clk->enable_reg); |
145 | } | 150 | } |
146 | 151 | ||
147 | #define DEFINE_CLOCK(name, i, er, es, gr, sr) \ | 152 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, s) \ |
148 | static struct clk name = { \ | 153 | static struct clk name = { \ |
149 | .id = i, \ | 154 | .id = i, \ |
150 | .enable_reg = CRM_BASE + er, \ | 155 | .enable_reg = CRM_BASE + er, \ |
@@ -153,27 +158,30 @@ static void clk_cgcr_disable(struct clk *clk) | |||
153 | .set_rate = sr, \ | 158 | .set_rate = sr, \ |
154 | .enable = clk_cgcr_enable, \ | 159 | .enable = clk_cgcr_enable, \ |
155 | .disable = clk_cgcr_disable, \ | 160 | .disable = clk_cgcr_disable, \ |
161 | .secondary = s, \ | ||
156 | } | 162 | } |
157 | 163 | ||
158 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_ipg, NULL); | 164 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_gpt, NULL, NULL); |
159 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL); | 165 | DEFINE_CLOCK(uart_per_clk, 0, CCM_CGCR0, 15, get_rate_uart, NULL, NULL); |
160 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL); | 166 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); |
161 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL); | 167 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); |
162 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL); | 168 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); |
163 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL); | 169 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); |
164 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL); | 170 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL, &uart_per_clk); |
165 | DEFINE_CLOCK(uart4_clk, 0, CCM_CGCR2, 17, get_rate_uart, NULL); | 171 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL, &uart_per_clk); |
166 | DEFINE_CLOCK(uart5_clk, 0, CCM_CGCR2, 18, get_rate_uart, NULL); | 172 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL, &uart_per_clk); |
167 | DEFINE_CLOCK(nfc_clk, 0, CCM_CGCR0, 8, get_rate_nfc, NULL); | 173 | DEFINE_CLOCK(uart4_clk, 0, CCM_CGCR2, 17, get_rate_uart, NULL, &uart_per_clk); |
168 | DEFINE_CLOCK(usbotg_clk, 0, CCM_CGCR0, 28, get_rate_otg, NULL); | 174 | DEFINE_CLOCK(uart5_clk, 0, CCM_CGCR2, 18, get_rate_uart, NULL, &uart_per_clk); |
169 | DEFINE_CLOCK(pwm1_clk, 0, CCM_CGCR1, 31, get_rate_ipg, NULL); | 175 | DEFINE_CLOCK(nfc_clk, 0, CCM_CGCR0, 8, get_rate_nfc, NULL, NULL); |
170 | DEFINE_CLOCK(pwm2_clk, 0, CCM_CGCR2, 0, get_rate_ipg, NULL); | 176 | DEFINE_CLOCK(usbotg_clk, 0, CCM_CGCR0, 28, get_rate_otg, NULL, NULL); |
171 | DEFINE_CLOCK(pwm3_clk, 0, CCM_CGCR2, 1, get_rate_ipg, NULL); | 177 | DEFINE_CLOCK(pwm1_clk, 0, CCM_CGCR1, 31, get_rate_ipg, NULL, NULL); |
172 | DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL); | 178 | DEFINE_CLOCK(pwm2_clk, 0, CCM_CGCR2, 0, get_rate_ipg, NULL, NULL); |
173 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL); | 179 | DEFINE_CLOCK(pwm3_clk, 0, CCM_CGCR2, 1, get_rate_ipg, NULL, NULL); |
174 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL); | 180 | DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL, NULL); |
175 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL); | 181 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL, NULL); |
176 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR0, 23, get_rate_ipg, NULL); | 182 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL, NULL); |
183 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); | ||
184 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); | ||
177 | 185 | ||
178 | #define _REGISTER_CLOCK(d, n, c) \ | 186 | #define _REGISTER_CLOCK(d, n, c) \ |
179 | { \ | 187 | { \ |
@@ -208,13 +216,21 @@ static struct clk_lookup lookups[] = { | |||
208 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 216 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
209 | }; | 217 | }; |
210 | 218 | ||
211 | int __init mx25_clocks_init(unsigned long fref) | 219 | int __init mx25_clocks_init(void) |
212 | { | 220 | { |
213 | int i; | 221 | int i; |
214 | 222 | ||
215 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 223 | for (i = 0; i < ARRAY_SIZE(lookups); i++) |
216 | clkdev_add(&lookups[i]); | 224 | clkdev_add(&lookups[i]); |
217 | 225 | ||
226 | /* Turn off all clocks except the ones we need to survive, namely: | ||
227 | * EMI, GPIO1-3 (CCM_CGCR1[18:16]), GPT1, IOMUXC (CCM_CGCR1[27]), IIM, | ||
228 | * SCC | ||
229 | */ | ||
230 | __raw_writel((1 << 19), CRM_BASE + CCM_CGCR0); | ||
231 | __raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1); | ||
232 | __raw_writel((1 << 5), CRM_BASE + CCM_CGCR2); | ||
233 | |||
218 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 234 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
219 | 235 | ||
220 | return 0; | 236 | return 0; |
diff --git a/arch/arm/mach-mx25/mx25pdk.c b/arch/arm/mach-mx25/mx25pdk.c index 921bc99ea231..6f06089246eb 100644 --- a/arch/arm/mach-mx25/mx25pdk.c +++ b/arch/arm/mach-mx25/mx25pdk.c | |||
@@ -91,7 +91,7 @@ static void __init mx25pdk_init(void) | |||
91 | 91 | ||
92 | static void __init mx25pdk_timer_init(void) | 92 | static void __init mx25pdk_timer_init(void) |
93 | { | 93 | { |
94 | mx25_clocks_init(26000000); | 94 | mx25_clocks_init(); |
95 | } | 95 | } |
96 | 96 | ||
97 | static struct sys_timer mx25pdk_timer = { | 97 | static struct sys_timer mx25pdk_timer = { |
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c index 3e7bafa2ddbb..938c549767dc 100644 --- a/arch/arm/mach-mx3/mx31ads.c +++ b/arch/arm/mach-mx3/mx31ads.c | |||
@@ -173,6 +173,7 @@ static void expio_unmask_irq(u32 irq) | |||
173 | } | 173 | } |
174 | 174 | ||
175 | static struct irq_chip expio_irq_chip = { | 175 | static struct irq_chip expio_irq_chip = { |
176 | .name = "EXPIO(CPLD)", | ||
176 | .ack = expio_ack_irq, | 177 | .ack = expio_ack_irq, |
177 | .mask = expio_mask_irq, | 178 | .mask = expio_mask_irq, |
178 | .unmask = expio_unmask_irq, | 179 | .unmask = expio_unmask_irq, |
@@ -302,6 +303,7 @@ static struct regulator_init_data ldo1_data = { | |||
302 | .min_uV = 2800000, | 303 | .min_uV = 2800000, |
303 | .max_uV = 2800000, | 304 | .max_uV = 2800000, |
304 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 305 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
306 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
305 | .apply_uV = 1, | 307 | .apply_uV = 1, |
306 | }, | 308 | }, |
307 | }; | 309 | }; |
@@ -322,6 +324,7 @@ static struct regulator_init_data ldo2_data = { | |||
322 | .min_uV = 3300000, | 324 | .min_uV = 3300000, |
323 | .max_uV = 3300000, | 325 | .max_uV = 3300000, |
324 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 326 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
327 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
325 | .apply_uV = 1, | 328 | .apply_uV = 1, |
326 | }, | 329 | }, |
327 | .num_consumer_supplies = ARRAY_SIZE(ldo2_consumers), | 330 | .num_consumer_supplies = ARRAY_SIZE(ldo2_consumers), |
@@ -459,6 +462,7 @@ static int mx31_wm8350_init(struct wm8350 *wm8350) | |||
459 | 462 | ||
460 | static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { | 463 | static struct wm8350_platform_data __initdata mx31_wm8350_pdata = { |
461 | .init = mx31_wm8350_init, | 464 | .init = mx31_wm8350_init, |
465 | .irq_base = MXC_BOARD_IRQ_START + MXC_MAX_EXP_IO_LINES, | ||
462 | }; | 466 | }; |
463 | #endif | 467 | #endif |
464 | 468 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 3f1334f62e7a..7027cdc1ba49 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void) | |||
505 | void __init gpmc_init(void) | 505 | void __init gpmc_init(void) |
506 | { | 506 | { |
507 | u32 l; | 507 | u32 l; |
508 | char *ck; | 508 | char *ck = NULL; |
509 | 509 | ||
510 | if (cpu_is_omap24xx()) { | 510 | if (cpu_is_omap24xx()) { |
511 | ck = "core_l3_ck"; | 511 | ck = "core_l3_ck"; |
@@ -521,6 +521,9 @@ void __init gpmc_init(void) | |||
521 | l = OMAP44XX_GPMC_BASE; | 521 | l = OMAP44XX_GPMC_BASE; |
522 | } | 522 | } |
523 | 523 | ||
524 | if (WARN_ON(!ck)) | ||
525 | return; | ||
526 | |||
524 | gpmc_l3_clk = clk_get(NULL, ck); | 527 | gpmc_l3_clk = clk_get(NULL, ck); |
525 | if (IS_ERR(gpmc_l3_clk)) { | 528 | if (IS_ERR(gpmc_l3_clk)) { |
526 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); | 529 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 27054025da2b..26aeef560aa3 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -194,7 +194,7 @@ void __init omap_init_irq(void) | |||
194 | int i; | 194 | int i; |
195 | 195 | ||
196 | for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { | 196 | for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { |
197 | unsigned long base; | 197 | unsigned long base = 0; |
198 | struct omap_irq_bank *bank = irq_banks + i; | 198 | struct omap_irq_bank *bank = irq_banks + i; |
199 | 199 | ||
200 | if (cpu_is_omap24xx()) | 200 | if (cpu_is_omap24xx()) |
@@ -202,6 +202,8 @@ void __init omap_init_irq(void) | |||
202 | else if (cpu_is_omap34xx()) | 202 | else if (cpu_is_omap34xx()) |
203 | base = OMAP34XX_IC_BASE; | 203 | base = OMAP34XX_IC_BASE; |
204 | 204 | ||
205 | BUG_ON(!base); | ||
206 | |||
205 | /* Static mapping, never released */ | 207 | /* Static mapping, never released */ |
206 | bank->base_reg = ioremap(base, SZ_4K); | 208 | bank->base_reg = ioremap(base, SZ_4K); |
207 | if (!bank->base_reg) { | 209 | if (!bank->base_reg) { |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 3f59bd12cbbf..5fedc50c58e4 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -486,7 +486,7 @@ int __init omap_mux_init_signal(char *muxname, int val) | |||
486 | static inline void omap_mux_decode(struct seq_file *s, u16 val) | 486 | static inline void omap_mux_decode(struct seq_file *s, u16 val) |
487 | { | 487 | { |
488 | char *flags[OMAP_MUX_MAX_NR_FLAGS]; | 488 | char *flags[OMAP_MUX_MAX_NR_FLAGS]; |
489 | char mode[14]; | 489 | char mode[sizeof("OMAP_MUX_MODE") + 1]; |
490 | int i = -1; | 490 | int i = -1; |
491 | 491 | ||
492 | sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); | 492 | sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); |
@@ -553,6 +553,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) | |||
553 | if (!m0_name) | 553 | if (!m0_name) |
554 | continue; | 554 | continue; |
555 | 555 | ||
556 | /* REVISIT: Needs to be updated if mode0 names get longer */ | ||
556 | for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) { | 557 | for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) { |
557 | if (m0_name[i] == '\0') { | 558 | if (m0_name[i] == '\0') { |
558 | m0_def[i] = m0_name[i]; | 559 | m0_def[i] = m0_name[i]; |
@@ -968,6 +969,13 @@ static void __init omap_mux_init_list(struct omap_mux *superset) | |||
968 | } | 969 | } |
969 | #endif | 970 | #endif |
970 | 971 | ||
972 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) | ||
973 | if (!superset->muxnames || !superset->muxnames[0]) { | ||
974 | superset++; | ||
975 | continue; | ||
976 | } | ||
977 | #endif | ||
978 | |||
971 | entry = omap_mux_list_add(superset); | 979 | entry = omap_mux_list_add(superset); |
972 | if (!entry) { | 980 | if (!entry) { |
973 | printk(KERN_ERR "mux: Could not add entry\n"); | 981 | printk(KERN_ERR "mux: Could not add entry\n"); |
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index 68e0a595f9a1..07aa7b3c95f7 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -649,6 +649,53 @@ static struct omap_mux __initdata omap3_muxmodes[] = { | |||
649 | _OMAP3_MUXENTRY(UART3_TX_IRTX, 166, | 649 | _OMAP3_MUXENTRY(UART3_TX_IRTX, 166, |
650 | "uart3_tx_irtx", NULL, NULL, NULL, | 650 | "uart3_tx_irtx", NULL, NULL, NULL, |
651 | "gpio_166", NULL, NULL, "safe_mode"), | 651 | "gpio_166", NULL, NULL, "safe_mode"), |
652 | |||
653 | /* Only on 3630, see omap36xx_cbp_subset for the signals */ | ||
654 | _OMAP3_MUXENTRY(GPMC_A11, 0, | ||
655 | NULL, NULL, NULL, NULL, | ||
656 | NULL, NULL, NULL, NULL), | ||
657 | _OMAP3_MUXENTRY(SAD2D_MBUSFLAG, 0, | ||
658 | NULL, NULL, NULL, NULL, | ||
659 | NULL, NULL, NULL, NULL), | ||
660 | _OMAP3_MUXENTRY(SAD2D_MREAD, 0, | ||
661 | NULL, NULL, NULL, NULL, | ||
662 | NULL, NULL, NULL, NULL), | ||
663 | _OMAP3_MUXENTRY(SAD2D_MWRITE, 0, | ||
664 | NULL, NULL, NULL, NULL, | ||
665 | NULL, NULL, NULL, NULL), | ||
666 | _OMAP3_MUXENTRY(SAD2D_SBUSFLAG, 0, | ||
667 | NULL, NULL, NULL, NULL, | ||
668 | NULL, NULL, NULL, NULL), | ||
669 | _OMAP3_MUXENTRY(SAD2D_SREAD, 0, | ||
670 | NULL, NULL, NULL, NULL, | ||
671 | NULL, NULL, NULL, NULL), | ||
672 | _OMAP3_MUXENTRY(SAD2D_SWRITE, 0, | ||
673 | NULL, NULL, NULL, NULL, | ||
674 | NULL, NULL, NULL, NULL), | ||
675 | _OMAP3_MUXENTRY(GPMC_A11, 0, | ||
676 | NULL, NULL, NULL, NULL, | ||
677 | NULL, NULL, NULL, NULL), | ||
678 | _OMAP3_MUXENTRY(SAD2D_MCAD28, 0, | ||
679 | NULL, NULL, NULL, NULL, | ||
680 | NULL, NULL, NULL, NULL), | ||
681 | _OMAP3_MUXENTRY(SAD2D_MCAD29, 0, | ||
682 | NULL, NULL, NULL, NULL, | ||
683 | NULL, NULL, NULL, NULL), | ||
684 | _OMAP3_MUXENTRY(SAD2D_MCAD32, 0, | ||
685 | NULL, NULL, NULL, NULL, | ||
686 | NULL, NULL, NULL, NULL), | ||
687 | _OMAP3_MUXENTRY(SAD2D_MCAD33, 0, | ||
688 | NULL, NULL, NULL, NULL, | ||
689 | NULL, NULL, NULL, NULL), | ||
690 | _OMAP3_MUXENTRY(SAD2D_MCAD34, 0, | ||
691 | NULL, NULL, NULL, NULL, | ||
692 | NULL, NULL, NULL, NULL), | ||
693 | _OMAP3_MUXENTRY(SAD2D_MCAD35, 0, | ||
694 | NULL, NULL, NULL, NULL, | ||
695 | NULL, NULL, NULL, NULL), | ||
696 | _OMAP3_MUXENTRY(SAD2D_MCAD36, 0, | ||
697 | NULL, NULL, NULL, NULL, | ||
698 | NULL, NULL, NULL, NULL), | ||
652 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 699 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
653 | }; | 700 | }; |
654 | 701 | ||
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 8c964bec8159..e10a02df6e1d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -36,7 +36,13 @@ | |||
36 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 | 36 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 |
37 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 37 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
38 | 38 | ||
39 | #define DEFAULT_TIMEOUT (5 * HZ) | 39 | /* |
40 | * NOTE: By default the serial timeout is disabled as it causes lost characters | ||
41 | * over the serial ports. This means that the UART clocks will stay on until | ||
42 | * disabled via sysfs. This also causes that any deeper omap sleep states are | ||
43 | * blocked. | ||
44 | */ | ||
45 | #define DEFAULT_TIMEOUT 0 | ||
40 | 46 | ||
41 | struct omap_uart_state { | 47 | struct omap_uart_state { |
42 | int num; | 48 | int num; |
@@ -422,7 +428,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
422 | uart->timeout = DEFAULT_TIMEOUT; | 428 | uart->timeout = DEFAULT_TIMEOUT; |
423 | setup_timer(&uart->timer, omap_uart_idle_timer, | 429 | setup_timer(&uart->timer, omap_uart_idle_timer, |
424 | (unsigned long) uart); | 430 | (unsigned long) uart); |
425 | mod_timer(&uart->timer, jiffies + uart->timeout); | 431 | if (uart->timeout) |
432 | mod_timer(&uart->timer, jiffies + uart->timeout); | ||
426 | omap_uart_smart_idle_enable(uart, 0); | 433 | omap_uart_smart_idle_enable(uart, 0); |
427 | 434 | ||
428 | if (cpu_is_omap34xx()) { | 435 | if (cpu_is_omap34xx()) { |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index a21a4b395f73..d94857eb0690 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -334,8 +334,8 @@ static void realview_pbx_reset(char mode) | |||
334 | * in the system FPGA | 334 | * in the system FPGA |
335 | */ | 335 | */ |
336 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); | 336 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); |
337 | __raw_writel(0x0000, reset_ctrl); | 337 | __raw_writel(0x00F0, reset_ctrl); |
338 | __raw_writel(0x0004, reset_ctrl); | 338 | __raw_writel(0x00F4, reset_ctrl); |
339 | } | 339 | } |
340 | 340 | ||
341 | static void __init realview_pbx_init(void) | 341 | static void __init realview_pbx_init(void) |
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 3f9cd3d8f6d5..795dc615f43b 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S | |||
@@ -41,7 +41,7 @@ ENTRY(cpu_arm7_dcache_clean_area) | |||
41 | ENTRY(cpu_arm7_data_abort) | 41 | ENTRY(cpu_arm7_data_abort) |
42 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | 42 | mrc p15, 0, r1, c5, c0, 0 @ get FSR |
43 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | 43 | mrc p15, 0, r0, c6, c0, 0 @ get FAR |
44 | ldr r8, [r0] @ read arm instruction | 44 | ldr r8, [r2] @ read arm instruction |
45 | tst r8, #1 << 20 @ L = 0 -> write? | 45 | tst r8, #1 << 20 @ L = 0 -> write? |
46 | orreq r1, r1, #1 << 11 @ yes. | 46 | orreq r1, r1, #1 << 11 @ yes. |
47 | and r7, r8, #15 << 24 | 47 | and r7, r8, #15 << 24 |
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index 6f21096086fd..b06954a84436 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/debugfs.h> | ||
26 | #include <mach/audmux.h> | 27 | #include <mach/audmux.h> |
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | 29 | ||
@@ -32,6 +33,140 @@ static void __iomem *audmux_base; | |||
32 | #define MXC_AUDMUX_V2_PTCR(x) ((x) * 8) | 33 | #define MXC_AUDMUX_V2_PTCR(x) ((x) * 8) |
33 | #define MXC_AUDMUX_V2_PDCR(x) ((x) * 8 + 4) | 34 | #define MXC_AUDMUX_V2_PDCR(x) ((x) * 8 + 4) |
34 | 35 | ||
36 | #ifdef CONFIG_DEBUG_FS | ||
37 | static struct dentry *audmux_debugfs_root; | ||
38 | |||
39 | static int audmux_open_file(struct inode *inode, struct file *file) | ||
40 | { | ||
41 | file->private_data = inode->i_private; | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | /* There is an annoying discontinuity in the SSI numbering with regard | ||
46 | * to the Linux number of the devices */ | ||
47 | static const char *audmux_port_string(int port) | ||
48 | { | ||
49 | switch (port) { | ||
50 | case MX31_AUDMUX_PORT1_SSI0: | ||
51 | return "imx-ssi.0"; | ||
52 | case MX31_AUDMUX_PORT2_SSI1: | ||
53 | return "imx-ssi.1"; | ||
54 | case MX31_AUDMUX_PORT3_SSI_PINS_3: | ||
55 | return "SSI3"; | ||
56 | case MX31_AUDMUX_PORT4_SSI_PINS_4: | ||
57 | return "SSI4"; | ||
58 | case MX31_AUDMUX_PORT5_SSI_PINS_5: | ||
59 | return "SSI5"; | ||
60 | case MX31_AUDMUX_PORT6_SSI_PINS_6: | ||
61 | return "SSI6"; | ||
62 | default: | ||
63 | return "UNKNOWN"; | ||
64 | } | ||
65 | } | ||
66 | |||
67 | static ssize_t audmux_read_file(struct file *file, char __user *user_buf, | ||
68 | size_t count, loff_t *ppos) | ||
69 | { | ||
70 | ssize_t ret; | ||
71 | char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL); | ||
72 | int port = (int)file->private_data; | ||
73 | u32 pdcr, ptcr; | ||
74 | |||
75 | if (!buf) | ||
76 | return -ENOMEM; | ||
77 | |||
78 | if (audmux_clk) | ||
79 | clk_enable(audmux_clk); | ||
80 | |||
81 | ptcr = readl(audmux_base + MXC_AUDMUX_V2_PTCR(port)); | ||
82 | pdcr = readl(audmux_base + MXC_AUDMUX_V2_PDCR(port)); | ||
83 | |||
84 | if (audmux_clk) | ||
85 | clk_disable(audmux_clk); | ||
86 | |||
87 | ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n", | ||
88 | pdcr, ptcr); | ||
89 | |||
90 | if (ptcr & MXC_AUDMUX_V2_PTCR_TFSDIR) | ||
91 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
92 | "TxFS output from %s, ", | ||
93 | audmux_port_string((ptcr >> 27) & 0x7)); | ||
94 | else | ||
95 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
96 | "TxFS input, "); | ||
97 | |||
98 | if (ptcr & MXC_AUDMUX_V2_PTCR_TCLKDIR) | ||
99 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
100 | "TxClk output from %s", | ||
101 | audmux_port_string((ptcr >> 22) & 0x7)); | ||
102 | else | ||
103 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
104 | "TxClk input"); | ||
105 | |||
106 | ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n"); | ||
107 | |||
108 | if (ptcr & MXC_AUDMUX_V2_PTCR_SYN) { | ||
109 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
110 | "Port is symmetric"); | ||
111 | } else { | ||
112 | if (ptcr & MXC_AUDMUX_V2_PTCR_RFSDIR) | ||
113 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
114 | "RxFS output from %s, ", | ||
115 | audmux_port_string((ptcr >> 17) & 0x7)); | ||
116 | else | ||
117 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
118 | "RxFS input, "); | ||
119 | |||
120 | if (ptcr & MXC_AUDMUX_V2_PTCR_RCLKDIR) | ||
121 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
122 | "RxClk output from %s", | ||
123 | audmux_port_string((ptcr >> 12) & 0x7)); | ||
124 | else | ||
125 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
126 | "RxClk input"); | ||
127 | } | ||
128 | |||
129 | ret += snprintf(buf + ret, PAGE_SIZE - ret, | ||
130 | "\nData received from %s\n", | ||
131 | audmux_port_string((pdcr >> 13) & 0x7)); | ||
132 | |||
133 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, ret); | ||
134 | |||
135 | kfree(buf); | ||
136 | |||
137 | return ret; | ||
138 | } | ||
139 | |||
140 | static const struct file_operations audmux_debugfs_fops = { | ||
141 | .open = audmux_open_file, | ||
142 | .read = audmux_read_file, | ||
143 | }; | ||
144 | |||
145 | static void audmux_debugfs_init(void) | ||
146 | { | ||
147 | int i; | ||
148 | char buf[20]; | ||
149 | |||
150 | audmux_debugfs_root = debugfs_create_dir("audmux", NULL); | ||
151 | if (!audmux_debugfs_root) { | ||
152 | pr_warning("Failed to create AUDMUX debugfs root\n"); | ||
153 | return; | ||
154 | } | ||
155 | |||
156 | for (i = 1; i < 8; i++) { | ||
157 | snprintf(buf, sizeof(buf), "ssi%d", i); | ||
158 | if (!debugfs_create_file(buf, 0444, audmux_debugfs_root, | ||
159 | (void *)i, &audmux_debugfs_fops)) | ||
160 | pr_warning("Failed to create AUDMUX port %d debugfs file\n", | ||
161 | i); | ||
162 | } | ||
163 | } | ||
164 | #else | ||
165 | static inline void audmux_debugfs_init(void) | ||
166 | { | ||
167 | } | ||
168 | #endif | ||
169 | |||
35 | int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr, | 170 | int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr, |
36 | unsigned int pdcr) | 171 | unsigned int pdcr) |
37 | { | 172 | { |
@@ -68,6 +203,8 @@ static int mxc_audmux_v2_init(void) | |||
68 | if (cpu_is_mx31() || cpu_is_mx35()) | 203 | if (cpu_is_mx31() || cpu_is_mx35()) |
69 | audmux_base = IO_ADDRESS(AUDMUX_BASE_ADDR); | 204 | audmux_base = IO_ADDRESS(AUDMUX_BASE_ADDR); |
70 | 205 | ||
206 | audmux_debugfs_init(); | ||
207 | |||
71 | return 0; | 208 | return 0; |
72 | } | 209 | } |
73 | 210 | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31lite.h b/arch/arm/plat-mxc/include/mach/board-mx31lite.h index 0184b638c268..2b2da0367578 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31lite.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31lite.h | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
27 | 27 | ||
28 | enum mx31lilly_boards { | 28 | enum mx31lite_boards { |
29 | MX31LITE_NOBOARD = 0, | 29 | MX31LITE_NOBOARD = 0, |
30 | MX31LITE_DB = 1, | 30 | MX31LITE_DB = 1, |
31 | }; | 31 | }; |
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 286cb9b0a25b..4bf1068ffad9 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -32,7 +32,7 @@ extern void mxc91231_init_irq(void); | |||
32 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); | 32 | extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); |
33 | extern int mx1_clocks_init(unsigned long fref); | 33 | extern int mx1_clocks_init(unsigned long fref); |
34 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); | 34 | extern int mx21_clocks_init(unsigned long lref, unsigned long fref); |
35 | extern int mx25_clocks_init(unsigned long fref); | 35 | extern int mx25_clocks_init(void); |
36 | extern int mx27_clocks_init(unsigned long fref); | 36 | extern int mx27_clocks_init(unsigned long fref); |
37 | extern int mx31_clocks_init(unsigned long fref); | 37 | extern int mx31_clocks_init(unsigned long fref); |
38 | extern int mx35_clocks_init(void); | 38 | extern int mx35_clocks_init(void); |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx35.h b/arch/arm/plat-mxc/include/mach/iomux-mx35.h index 00b0ac1db225..c88d40795f7a 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx35.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx35.h | |||
@@ -671,7 +671,7 @@ | |||
671 | #define MX35_PAD_LD8__SDMA_SDMA_DEBUG_PC_8 IOMUX_PAD(0x634, 0x1d0, 6, 0x0, 0, NO_PAD_CTRL) | 671 | #define MX35_PAD_LD8__SDMA_SDMA_DEBUG_PC_8 IOMUX_PAD(0x634, 0x1d0, 6, 0x0, 0, NO_PAD_CTRL) |
672 | 672 | ||
673 | #define MX35_PAD_LD9__IPU_DISPB_DAT_9 IOMUX_PAD(0x638, 0x1d4, 0, 0x0, 0, NO_PAD_CTRL) | 673 | #define MX35_PAD_LD9__IPU_DISPB_DAT_9 IOMUX_PAD(0x638, 0x1d4, 0, 0x0, 0, NO_PAD_CTRL) |
674 | #define MX35_PAD_LD9__GPIO2_9 IOMUX_PAD(0x638, 0x1d4, 5, 0x8e4 0, NO_PAD_CTRL) | 674 | #define MX35_PAD_LD9__GPIO2_9 IOMUX_PAD(0x638, 0x1d4, 5, 0x8e4, 0, NO_PAD_CTRL) |
675 | #define MX35_PAD_LD9__SDMA_SDMA_DEBUG_PC_9 IOMUX_PAD(0x638, 0x1d4, 6, 0x0, 0, NO_PAD_CTRL) | 675 | #define MX35_PAD_LD9__SDMA_SDMA_DEBUG_PC_9 IOMUX_PAD(0x638, 0x1d4, 6, 0x0, 0, NO_PAD_CTRL) |
676 | 676 | ||
677 | #define MX35_PAD_LD10__IPU_DISPB_DAT_10 IOMUX_PAD(0x63c, 0x1d8, 0, 0x0, 0, NO_PAD_CTRL) | 677 | #define MX35_PAD_LD10__IPU_DISPB_DAT_10 IOMUX_PAD(0x63c, 0x1d8, 0, 0x0, 0, NO_PAD_CTRL) |
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h index ead9d592168d..0cb347645db4 100644 --- a/arch/arm/plat-mxc/include/mach/irqs.h +++ b/arch/arm/plat-mxc/include/mach/irqs.h | |||
@@ -37,7 +37,12 @@ | |||
37 | * within sensible limits. | 37 | * within sensible limits. |
38 | */ | 38 | */ |
39 | #define MXC_BOARD_IRQ_START (MXC_INTERNAL_IRQS + MXC_GPIO_IRQS) | 39 | #define MXC_BOARD_IRQ_START (MXC_INTERNAL_IRQS + MXC_GPIO_IRQS) |
40 | |||
41 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | ||
42 | #define MXC_BOARD_IRQS 80 | ||
43 | #else | ||
40 | #define MXC_BOARD_IRQS 16 | 44 | #define MXC_BOARD_IRQS 16 |
45 | #endif | ||
41 | 46 | ||
42 | #define MXC_IPU_IRQ_START (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS) | 47 | #define MXC_IPU_IRQ_START (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS) |
43 | 48 | ||
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index d9f8c844c385..4becbdd1935c 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root; | |||
391 | static int clk_debugfs_register_one(struct clk *c) | 391 | static int clk_debugfs_register_one(struct clk *c) |
392 | { | 392 | { |
393 | int err; | 393 | int err; |
394 | struct dentry *d, *child; | 394 | struct dentry *d, *child, *child_tmp; |
395 | struct clk *pa = c->parent; | 395 | struct clk *pa = c->parent; |
396 | char s[255]; | 396 | char s[255]; |
397 | char *p = s; | 397 | char *p = s; |
@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
423 | 423 | ||
424 | err_out: | 424 | err_out: |
425 | d = c->dent; | 425 | d = c->dent; |
426 | list_for_each_entry(child, &d->d_subdirs, d_u.d_child) | 426 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) |
427 | debugfs_remove(child); | 427 | debugfs_remove(child); |
428 | debugfs_remove(c->dent); | 428 | debugfs_remove(c->dent); |
429 | return err; | 429 | return err; |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d17620c50c28..d2422c766cca 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -750,6 +750,7 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, | |||
750 | } | 750 | } |
751 | #endif | 751 | #endif |
752 | 752 | ||
753 | #ifdef CONFIG_ARCH_OMAP1 | ||
753 | /* | 754 | /* |
754 | * This only applies to chips that can't do both rising and falling edge | 755 | * This only applies to chips that can't do both rising and falling edge |
755 | * detection at once. For all other chips, this function is a noop. | 756 | * detection at once. For all other chips, this function is a noop. |
@@ -760,11 +761,9 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) | |||
760 | u32 l = 0; | 761 | u32 l = 0; |
761 | 762 | ||
762 | switch (bank->method) { | 763 | switch (bank->method) { |
763 | #ifdef CONFIG_ARCH_OMAP1 | ||
764 | case METHOD_MPUIO: | 764 | case METHOD_MPUIO: |
765 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | 765 | reg += OMAP_MPUIO_GPIO_INT_EDGE; |
766 | break; | 766 | break; |
767 | #endif | ||
768 | #ifdef CONFIG_ARCH_OMAP15XX | 767 | #ifdef CONFIG_ARCH_OMAP15XX |
769 | case METHOD_GPIO_1510: | 768 | case METHOD_GPIO_1510: |
770 | reg += OMAP1510_GPIO_INT_CONTROL; | 769 | reg += OMAP1510_GPIO_INT_CONTROL; |
@@ -787,6 +786,7 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) | |||
787 | 786 | ||
788 | __raw_writel(l, reg); | 787 | __raw_writel(l, reg); |
789 | } | 788 | } |
789 | #endif | ||
790 | 790 | ||
791 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | 791 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) |
792 | { | 792 | { |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 1e5648d3e3d8..2ed72013c2e2 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -89,16 +89,6 @@ | |||
89 | #define USE_WAKEUP_LAT 0 | 89 | #define USE_WAKEUP_LAT 0 |
90 | #define IGNORE_WAKEUP_LAT 1 | 90 | #define IGNORE_WAKEUP_LAT 1 |
91 | 91 | ||
92 | /* XXX this should be moved into a separate file */ | ||
93 | #if defined(CONFIG_ARCH_OMAP2420) | ||
94 | # define OMAP_32KSYNCT_BASE 0x48004000 | ||
95 | #elif defined(CONFIG_ARCH_OMAP2430) | ||
96 | # define OMAP_32KSYNCT_BASE 0x49020000 | ||
97 | #elif defined(CONFIG_ARCH_OMAP3430) | ||
98 | # define OMAP_32KSYNCT_BASE 0x48320000 | ||
99 | #else | ||
100 | # error Unknown OMAP device | ||
101 | #endif | ||
102 | 92 | ||
103 | /* Private functions */ | 93 | /* Private functions */ |
104 | 94 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index f60a5400a25b..a63c4be99b36 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -197,10 +197,13 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ | |||
197 | } | 197 | } |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Update the FPSCR with the additional exception flags. | 200 | * If any of the status flags are set, update the FPSCR. |
201 | * Comparison instructions always return at least one of | 201 | * Comparison instructions always return at least one of |
202 | * these flags set. | 202 | * these flags set. |
203 | */ | 203 | */ |
204 | if (exceptions & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V)) | ||
205 | fpscr &= ~(FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V); | ||
206 | |||
204 | fpscr |= exceptions; | 207 | fpscr |= exceptions; |
205 | 208 | ||
206 | fmxr(FPSCR, fpscr); | 209 | fmxr(FPSCR, fpscr); |
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig index bb7c374713ad..6fced1fe3bf0 100644 --- a/arch/microblaze/configs/mmu_defconfig +++ b/arch/microblaze/configs/mmu_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.31 | 3 | # Linux kernel version: 2.6.33-rc6 |
4 | # Thu Sep 24 10:28:50 2009 | 4 | # Wed Feb 3 10:02:59 2010 |
5 | # | 5 | # |
6 | CONFIG_MICROBLAZE=y | 6 | CONFIG_MICROBLAZE=y |
7 | # CONFIG_SWAP is not set | 7 | # CONFIG_SWAP is not set |
@@ -19,8 +19,12 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
20 | CONFIG_GENERIC_GPIO=y | 20 | CONFIG_GENERIC_GPIO=y |
21 | CONFIG_GENERIC_CSUM=y | 21 | CONFIG_GENERIC_CSUM=y |
22 | CONFIG_STACKTRACE_SUPPORT=y | ||
23 | CONFIG_LOCKDEP_SUPPORT=y | ||
24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
22 | # CONFIG_PCI is not set | 25 | # CONFIG_PCI is not set |
23 | CONFIG_NO_DMA=y | 26 | CONFIG_NO_DMA=y |
27 | CONFIG_DTC=y | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | CONFIG_CONSTRUCTORS=y | 29 | CONFIG_CONSTRUCTORS=y |
26 | 30 | ||
@@ -44,6 +48,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
44 | # | 48 | # |
45 | CONFIG_TREE_RCU=y | 49 | CONFIG_TREE_RCU=y |
46 | # CONFIG_TREE_PREEMPT_RCU is not set | 50 | # CONFIG_TREE_PREEMPT_RCU is not set |
51 | # CONFIG_TINY_RCU is not set | ||
47 | # CONFIG_RCU_TRACE is not set | 52 | # CONFIG_RCU_TRACE is not set |
48 | CONFIG_RCU_FANOUT=32 | 53 | CONFIG_RCU_FANOUT=32 |
49 | # CONFIG_RCU_FANOUT_EXACT is not set | 54 | # CONFIG_RCU_FANOUT_EXACT is not set |
@@ -64,10 +69,12 @@ CONFIG_INITRAMFS_ROOT_GID=0 | |||
64 | CONFIG_RD_GZIP=y | 69 | CONFIG_RD_GZIP=y |
65 | # CONFIG_RD_BZIP2 is not set | 70 | # CONFIG_RD_BZIP2 is not set |
66 | # CONFIG_RD_LZMA is not set | 71 | # CONFIG_RD_LZMA is not set |
72 | # CONFIG_RD_LZO is not set | ||
67 | # CONFIG_INITRAMFS_COMPRESSION_NONE is not set | 73 | # CONFIG_INITRAMFS_COMPRESSION_NONE is not set |
68 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | 74 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y |
69 | # CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set | 75 | # CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set |
70 | # CONFIG_INITRAMFS_COMPRESSION_LZMA is not set | 76 | # CONFIG_INITRAMFS_COMPRESSION_LZMA is not set |
77 | # CONFIG_INITRAMFS_COMPRESSION_LZO is not set | ||
71 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 78 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
72 | CONFIG_SYSCTL=y | 79 | CONFIG_SYSCTL=y |
73 | CONFIG_ANON_INODES=y | 80 | CONFIG_ANON_INODES=y |
@@ -90,21 +97,20 @@ CONFIG_EVENTFD=y | |||
90 | CONFIG_AIO=y | 97 | CONFIG_AIO=y |
91 | 98 | ||
92 | # | 99 | # |
93 | # Performance Counters | 100 | # Kernel Performance Events And Counters |
94 | # | 101 | # |
95 | CONFIG_VM_EVENT_COUNTERS=y | 102 | CONFIG_VM_EVENT_COUNTERS=y |
96 | # CONFIG_STRIP_ASM_SYMS is not set | ||
97 | CONFIG_COMPAT_BRK=y | 103 | CONFIG_COMPAT_BRK=y |
98 | CONFIG_SLAB=y | 104 | CONFIG_SLAB=y |
99 | # CONFIG_SLUB is not set | 105 | # CONFIG_SLUB is not set |
100 | # CONFIG_SLOB is not set | 106 | # CONFIG_SLOB is not set |
101 | # CONFIG_PROFILING is not set | 107 | # CONFIG_PROFILING is not set |
102 | # CONFIG_MARKERS is not set | 108 | CONFIG_HAVE_OPROFILE=y |
103 | 109 | ||
104 | # | 110 | # |
105 | # GCOV-based kernel profiling | 111 | # GCOV-based kernel profiling |
106 | # | 112 | # |
107 | # CONFIG_SLOW_WORK is not set | 113 | CONFIG_SLOW_WORK=y |
108 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 114 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
109 | CONFIG_SLABINFO=y | 115 | CONFIG_SLABINFO=y |
110 | CONFIG_BASE_SMALL=1 | 116 | CONFIG_BASE_SMALL=1 |
@@ -123,14 +129,41 @@ CONFIG_LBDAF=y | |||
123 | # IO Schedulers | 129 | # IO Schedulers |
124 | # | 130 | # |
125 | CONFIG_IOSCHED_NOOP=y | 131 | CONFIG_IOSCHED_NOOP=y |
126 | CONFIG_IOSCHED_AS=y | ||
127 | CONFIG_IOSCHED_DEADLINE=y | 132 | CONFIG_IOSCHED_DEADLINE=y |
128 | CONFIG_IOSCHED_CFQ=y | 133 | CONFIG_IOSCHED_CFQ=y |
129 | # CONFIG_DEFAULT_AS is not set | ||
130 | # CONFIG_DEFAULT_DEADLINE is not set | 134 | # CONFIG_DEFAULT_DEADLINE is not set |
131 | CONFIG_DEFAULT_CFQ=y | 135 | CONFIG_DEFAULT_CFQ=y |
132 | # CONFIG_DEFAULT_NOOP is not set | 136 | # CONFIG_DEFAULT_NOOP is not set |
133 | CONFIG_DEFAULT_IOSCHED="cfq" | 137 | CONFIG_DEFAULT_IOSCHED="cfq" |
138 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
139 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
140 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
141 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
142 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
143 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
144 | # CONFIG_INLINE_SPIN_UNLOCK is not set | ||
145 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
146 | # CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set | ||
147 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
148 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
149 | # CONFIG_INLINE_READ_LOCK is not set | ||
150 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
151 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
152 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
153 | # CONFIG_INLINE_READ_UNLOCK is not set | ||
154 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
155 | # CONFIG_INLINE_READ_UNLOCK_IRQ is not set | ||
156 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
157 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
158 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
159 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
160 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
161 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
162 | # CONFIG_INLINE_WRITE_UNLOCK is not set | ||
163 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
164 | # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set | ||
165 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
166 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
134 | # CONFIG_FREEZER is not set | 167 | # CONFIG_FREEZER is not set |
135 | 168 | ||
136 | # | 169 | # |
@@ -139,11 +172,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
139 | CONFIG_PLATFORM_GENERIC=y | 172 | CONFIG_PLATFORM_GENERIC=y |
140 | CONFIG_OPT_LIB_FUNCTION=y | 173 | CONFIG_OPT_LIB_FUNCTION=y |
141 | CONFIG_OPT_LIB_ASM=y | 174 | CONFIG_OPT_LIB_ASM=y |
142 | CONFIG_ALLOW_EDIT_AUTO=y | ||
143 | |||
144 | # | ||
145 | # Automatic platform settings from Kconfig.auto | ||
146 | # | ||
147 | 175 | ||
148 | # | 176 | # |
149 | # Definitions for MICROBLAZE0 | 177 | # Definitions for MICROBLAZE0 |
@@ -203,12 +231,11 @@ CONFIG_FLATMEM_MANUAL=y | |||
203 | CONFIG_FLATMEM=y | 231 | CONFIG_FLATMEM=y |
204 | CONFIG_FLAT_NODE_MEM_MAP=y | 232 | CONFIG_FLAT_NODE_MEM_MAP=y |
205 | CONFIG_PAGEFLAGS_EXTENDED=y | 233 | CONFIG_PAGEFLAGS_EXTENDED=y |
206 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 234 | CONFIG_SPLIT_PTLOCK_CPUS=999999 |
207 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 235 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
208 | CONFIG_ZONE_DMA_FLAG=0 | 236 | CONFIG_ZONE_DMA_FLAG=0 |
209 | CONFIG_VIRT_TO_BUS=y | 237 | CONFIG_VIRT_TO_BUS=y |
210 | CONFIG_HAVE_MLOCK=y | 238 | # CONFIG_KSM is not set |
211 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
212 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | 239 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 |
213 | 240 | ||
214 | # | 241 | # |
@@ -289,7 +316,13 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
289 | # CONFIG_IRDA is not set | 316 | # CONFIG_IRDA is not set |
290 | # CONFIG_BT is not set | 317 | # CONFIG_BT is not set |
291 | # CONFIG_AF_RXRPC is not set | 318 | # CONFIG_AF_RXRPC is not set |
292 | # CONFIG_WIRELESS is not set | 319 | CONFIG_WIRELESS=y |
320 | # CONFIG_CFG80211 is not set | ||
321 | # CONFIG_LIB80211 is not set | ||
322 | |||
323 | # | ||
324 | # CFG80211 needs to be enabled for MAC80211 | ||
325 | # | ||
293 | # CONFIG_WIMAX is not set | 326 | # CONFIG_WIMAX is not set |
294 | # CONFIG_RFKILL is not set | 327 | # CONFIG_RFKILL is not set |
295 | # CONFIG_NET_9P is not set | 328 | # CONFIG_NET_9P is not set |
@@ -313,6 +346,10 @@ CONFIG_OF_DEVICE=y | |||
313 | CONFIG_BLK_DEV=y | 346 | CONFIG_BLK_DEV=y |
314 | # CONFIG_BLK_DEV_COW_COMMON is not set | 347 | # CONFIG_BLK_DEV_COW_COMMON is not set |
315 | # CONFIG_BLK_DEV_LOOP is not set | 348 | # CONFIG_BLK_DEV_LOOP is not set |
349 | |||
350 | # | ||
351 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
352 | # | ||
316 | # CONFIG_BLK_DEV_NBD is not set | 353 | # CONFIG_BLK_DEV_NBD is not set |
317 | CONFIG_BLK_DEV_RAM=y | 354 | CONFIG_BLK_DEV_RAM=y |
318 | CONFIG_BLK_DEV_RAM_COUNT=16 | 355 | CONFIG_BLK_DEV_RAM_COUNT=16 |
@@ -349,7 +386,6 @@ CONFIG_NETDEVICES=y | |||
349 | # CONFIG_PHYLIB is not set | 386 | # CONFIG_PHYLIB is not set |
350 | CONFIG_NET_ETHERNET=y | 387 | CONFIG_NET_ETHERNET=y |
351 | # CONFIG_MII is not set | 388 | # CONFIG_MII is not set |
352 | # CONFIG_ETHOC is not set | ||
353 | # CONFIG_DNET is not set | 389 | # CONFIG_DNET is not set |
354 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 390 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
355 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 391 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
@@ -359,12 +395,12 @@ CONFIG_NET_ETHERNET=y | |||
359 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 395 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
360 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 396 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
361 | # CONFIG_KS8842 is not set | 397 | # CONFIG_KS8842 is not set |
398 | # CONFIG_KS8851_MLL is not set | ||
362 | CONFIG_XILINX_EMACLITE=y | 399 | CONFIG_XILINX_EMACLITE=y |
363 | CONFIG_NETDEV_1000=y | 400 | CONFIG_NETDEV_1000=y |
364 | CONFIG_NETDEV_10000=y | 401 | CONFIG_NETDEV_10000=y |
365 | CONFIG_WLAN=y | 402 | CONFIG_WLAN=y |
366 | # CONFIG_WLAN_PRE80211 is not set | 403 | # CONFIG_HOSTAP is not set |
367 | # CONFIG_WLAN_80211 is not set | ||
368 | 404 | ||
369 | # | 405 | # |
370 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 406 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -408,6 +444,7 @@ CONFIG_SERIAL_UARTLITE=y | |||
408 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 444 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
409 | CONFIG_SERIAL_CORE=y | 445 | CONFIG_SERIAL_CORE=y |
410 | CONFIG_SERIAL_CORE_CONSOLE=y | 446 | CONFIG_SERIAL_CORE_CONSOLE=y |
447 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | ||
411 | CONFIG_UNIX98_PTYS=y | 448 | CONFIG_UNIX98_PTYS=y |
412 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 449 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
413 | CONFIG_LEGACY_PTYS=y | 450 | CONFIG_LEGACY_PTYS=y |
@@ -433,7 +470,6 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | |||
433 | # CONFIG_POWER_SUPPLY is not set | 470 | # CONFIG_POWER_SUPPLY is not set |
434 | # CONFIG_HWMON is not set | 471 | # CONFIG_HWMON is not set |
435 | # CONFIG_THERMAL is not set | 472 | # CONFIG_THERMAL is not set |
436 | # CONFIG_THERMAL_HWMON is not set | ||
437 | # CONFIG_WATCHDOG is not set | 473 | # CONFIG_WATCHDOG is not set |
438 | 474 | ||
439 | # | 475 | # |
@@ -526,8 +562,6 @@ CONFIG_PROC_FS=y | |||
526 | CONFIG_PROC_SYSCTL=y | 562 | CONFIG_PROC_SYSCTL=y |
527 | CONFIG_PROC_PAGE_MONITOR=y | 563 | CONFIG_PROC_PAGE_MONITOR=y |
528 | CONFIG_SYSFS=y | 564 | CONFIG_SYSFS=y |
529 | CONFIG_TMPFS=y | ||
530 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
531 | # CONFIG_HUGETLB_PAGE is not set | 565 | # CONFIG_HUGETLB_PAGE is not set |
532 | # CONFIG_CONFIGFS_FS is not set | 566 | # CONFIG_CONFIGFS_FS is not set |
533 | CONFIG_MISC_FILESYSTEMS=y | 567 | CONFIG_MISC_FILESYSTEMS=y |
@@ -638,11 +672,13 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
638 | # | 672 | # |
639 | # Kernel hacking | 673 | # Kernel hacking |
640 | # | 674 | # |
675 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
641 | # CONFIG_PRINTK_TIME is not set | 676 | # CONFIG_PRINTK_TIME is not set |
642 | CONFIG_ENABLE_WARN_DEPRECATED=y | 677 | CONFIG_ENABLE_WARN_DEPRECATED=y |
643 | CONFIG_ENABLE_MUST_CHECK=y | 678 | CONFIG_ENABLE_MUST_CHECK=y |
644 | CONFIG_FRAME_WARN=1024 | 679 | CONFIG_FRAME_WARN=1024 |
645 | # CONFIG_MAGIC_SYSRQ is not set | 680 | # CONFIG_MAGIC_SYSRQ is not set |
681 | # CONFIG_STRIP_ASM_SYMS is not set | ||
646 | # CONFIG_UNUSED_SYMBOLS is not set | 682 | # CONFIG_UNUSED_SYMBOLS is not set |
647 | # CONFIG_DEBUG_FS is not set | 683 | # CONFIG_DEBUG_FS is not set |
648 | # CONFIG_HEADERS_CHECK is not set | 684 | # CONFIG_HEADERS_CHECK is not set |
@@ -662,6 +698,9 @@ CONFIG_DEBUG_SLAB=y | |||
662 | # CONFIG_DEBUG_SLAB_LEAK is not set | 698 | # CONFIG_DEBUG_SLAB_LEAK is not set |
663 | CONFIG_DEBUG_SPINLOCK=y | 699 | CONFIG_DEBUG_SPINLOCK=y |
664 | # CONFIG_DEBUG_MUTEXES is not set | 700 | # CONFIG_DEBUG_MUTEXES is not set |
701 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
702 | # CONFIG_PROVE_LOCKING is not set | ||
703 | # CONFIG_LOCK_STAT is not set | ||
665 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 704 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
666 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 705 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
667 | # CONFIG_DEBUG_KOBJECT is not set | 706 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -680,10 +719,29 @@ CONFIG_DEBUG_INFO=y | |||
680 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 719 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
681 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | 720 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
682 | # CONFIG_FAULT_INJECTION is not set | 721 | # CONFIG_FAULT_INJECTION is not set |
722 | # CONFIG_LATENCYTOP is not set | ||
683 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | 723 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set |
684 | # CONFIG_PAGE_POISONING is not set | 724 | # CONFIG_PAGE_POISONING is not set |
725 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
726 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
727 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
728 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
729 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
730 | CONFIG_TRACING_SUPPORT=y | ||
731 | CONFIG_FTRACE=y | ||
732 | # CONFIG_FUNCTION_TRACER is not set | ||
733 | # CONFIG_IRQSOFF_TRACER is not set | ||
734 | # CONFIG_SCHED_TRACER is not set | ||
735 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
736 | # CONFIG_BOOT_TRACER is not set | ||
737 | CONFIG_BRANCH_PROFILE_NONE=y | ||
738 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
739 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
740 | # CONFIG_STACK_TRACER is not set | ||
741 | # CONFIG_KMEMTRACE is not set | ||
742 | # CONFIG_WORKQUEUE_TRACER is not set | ||
743 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
685 | # CONFIG_SAMPLES is not set | 744 | # CONFIG_SAMPLES is not set |
686 | # CONFIG_KMEMCHECK is not set | ||
687 | CONFIG_EARLY_PRINTK=y | 745 | CONFIG_EARLY_PRINTK=y |
688 | # CONFIG_HEART_BEAT is not set | 746 | # CONFIG_HEART_BEAT is not set |
689 | CONFIG_DEBUG_BOOTMEM=y | 747 | CONFIG_DEBUG_BOOTMEM=y |
@@ -694,7 +752,11 @@ CONFIG_DEBUG_BOOTMEM=y | |||
694 | # CONFIG_KEYS is not set | 752 | # CONFIG_KEYS is not set |
695 | # CONFIG_SECURITY is not set | 753 | # CONFIG_SECURITY is not set |
696 | # CONFIG_SECURITYFS is not set | 754 | # CONFIG_SECURITYFS is not set |
697 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 755 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set |
756 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
757 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
758 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
759 | CONFIG_DEFAULT_SECURITY="" | ||
698 | CONFIG_CRYPTO=y | 760 | CONFIG_CRYPTO=y |
699 | 761 | ||
700 | # | 762 | # |
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig index adb839bab704..ce2da535246a 100644 --- a/arch/microblaze/configs/nommu_defconfig +++ b/arch/microblaze/configs/nommu_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.31 | 3 | # Linux kernel version: 2.6.33-rc6 |
4 | # Thu Sep 24 10:29:43 2009 | 4 | # Wed Feb 3 10:03:21 2010 |
5 | # | 5 | # |
6 | CONFIG_MICROBLAZE=y | 6 | CONFIG_MICROBLAZE=y |
7 | # CONFIG_SWAP is not set | 7 | # CONFIG_SWAP is not set |
@@ -19,8 +19,12 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 19 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
20 | CONFIG_GENERIC_GPIO=y | 20 | CONFIG_GENERIC_GPIO=y |
21 | CONFIG_GENERIC_CSUM=y | 21 | CONFIG_GENERIC_CSUM=y |
22 | CONFIG_STACKTRACE_SUPPORT=y | ||
23 | CONFIG_LOCKDEP_SUPPORT=y | ||
24 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
22 | # CONFIG_PCI is not set | 25 | # CONFIG_PCI is not set |
23 | CONFIG_NO_DMA=y | 26 | CONFIG_NO_DMA=y |
27 | CONFIG_DTC=y | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | CONFIG_CONSTRUCTORS=y | 29 | CONFIG_CONSTRUCTORS=y |
26 | 30 | ||
@@ -46,6 +50,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
46 | # | 50 | # |
47 | CONFIG_TREE_RCU=y | 51 | CONFIG_TREE_RCU=y |
48 | # CONFIG_TREE_PREEMPT_RCU is not set | 52 | # CONFIG_TREE_PREEMPT_RCU is not set |
53 | # CONFIG_TINY_RCU is not set | ||
49 | # CONFIG_RCU_TRACE is not set | 54 | # CONFIG_RCU_TRACE is not set |
50 | CONFIG_RCU_FANOUT=32 | 55 | CONFIG_RCU_FANOUT=32 |
51 | # CONFIG_RCU_FANOUT_EXACT is not set | 56 | # CONFIG_RCU_FANOUT_EXACT is not set |
@@ -81,16 +86,16 @@ CONFIG_EVENTFD=y | |||
81 | CONFIG_AIO=y | 86 | CONFIG_AIO=y |
82 | 87 | ||
83 | # | 88 | # |
84 | # Performance Counters | 89 | # Kernel Performance Events And Counters |
85 | # | 90 | # |
86 | CONFIG_VM_EVENT_COUNTERS=y | 91 | CONFIG_VM_EVENT_COUNTERS=y |
87 | # CONFIG_STRIP_ASM_SYMS is not set | ||
88 | CONFIG_COMPAT_BRK=y | 92 | CONFIG_COMPAT_BRK=y |
89 | CONFIG_SLAB=y | 93 | CONFIG_SLAB=y |
90 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLUB is not set |
91 | # CONFIG_SLOB is not set | 95 | # CONFIG_SLOB is not set |
96 | # CONFIG_MMAP_ALLOW_UNINITIALIZED is not set | ||
92 | # CONFIG_PROFILING is not set | 97 | # CONFIG_PROFILING is not set |
93 | # CONFIG_MARKERS is not set | 98 | CONFIG_HAVE_OPROFILE=y |
94 | 99 | ||
95 | # | 100 | # |
96 | # GCOV-based kernel profiling | 101 | # GCOV-based kernel profiling |
@@ -116,14 +121,41 @@ CONFIG_LBDAF=y | |||
116 | # IO Schedulers | 121 | # IO Schedulers |
117 | # | 122 | # |
118 | CONFIG_IOSCHED_NOOP=y | 123 | CONFIG_IOSCHED_NOOP=y |
119 | CONFIG_IOSCHED_AS=y | ||
120 | CONFIG_IOSCHED_DEADLINE=y | 124 | CONFIG_IOSCHED_DEADLINE=y |
121 | CONFIG_IOSCHED_CFQ=y | 125 | CONFIG_IOSCHED_CFQ=y |
122 | # CONFIG_DEFAULT_AS is not set | ||
123 | # CONFIG_DEFAULT_DEADLINE is not set | 126 | # CONFIG_DEFAULT_DEADLINE is not set |
124 | CONFIG_DEFAULT_CFQ=y | 127 | CONFIG_DEFAULT_CFQ=y |
125 | # CONFIG_DEFAULT_NOOP is not set | 128 | # CONFIG_DEFAULT_NOOP is not set |
126 | CONFIG_DEFAULT_IOSCHED="cfq" | 129 | CONFIG_DEFAULT_IOSCHED="cfq" |
130 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
131 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
132 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
133 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
134 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
135 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
136 | CONFIG_INLINE_SPIN_UNLOCK=y | ||
137 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
138 | CONFIG_INLINE_SPIN_UNLOCK_IRQ=y | ||
139 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
140 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
141 | # CONFIG_INLINE_READ_LOCK is not set | ||
142 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
143 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
144 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
145 | CONFIG_INLINE_READ_UNLOCK=y | ||
146 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
147 | CONFIG_INLINE_READ_UNLOCK_IRQ=y | ||
148 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
149 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
150 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
151 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
152 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
153 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
154 | CONFIG_INLINE_WRITE_UNLOCK=y | ||
155 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
156 | CONFIG_INLINE_WRITE_UNLOCK_IRQ=y | ||
157 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
158 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
127 | # CONFIG_FREEZER is not set | 159 | # CONFIG_FREEZER is not set |
128 | 160 | ||
129 | # | 161 | # |
@@ -132,7 +164,10 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
132 | CONFIG_PLATFORM_GENERIC=y | 164 | CONFIG_PLATFORM_GENERIC=y |
133 | # CONFIG_SELFMOD is not set | 165 | # CONFIG_SELFMOD is not set |
134 | # CONFIG_OPT_LIB_FUNCTION is not set | 166 | # CONFIG_OPT_LIB_FUNCTION is not set |
135 | # CONFIG_ALLOW_EDIT_AUTO is not set | 167 | |
168 | # | ||
169 | # Definitions for MICROBLAZE0 | ||
170 | # | ||
136 | CONFIG_KERNEL_BASE_ADDR=0x90000000 | 171 | CONFIG_KERNEL_BASE_ADDR=0x90000000 |
137 | CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5" | 172 | CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5" |
138 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 | 173 | CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 |
@@ -190,7 +225,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
190 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 225 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
191 | CONFIG_ZONE_DMA_FLAG=0 | 226 | CONFIG_ZONE_DMA_FLAG=0 |
192 | CONFIG_VIRT_TO_BUS=y | 227 | CONFIG_VIRT_TO_BUS=y |
193 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
194 | CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1 | 228 | CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1 |
195 | 229 | ||
196 | # | 230 | # |
@@ -274,9 +308,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
274 | # CONFIG_AF_RXRPC is not set | 308 | # CONFIG_AF_RXRPC is not set |
275 | CONFIG_WIRELESS=y | 309 | CONFIG_WIRELESS=y |
276 | # CONFIG_CFG80211 is not set | 310 | # CONFIG_CFG80211 is not set |
277 | CONFIG_CFG80211_DEFAULT_PS_VALUE=0 | ||
278 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
279 | # CONFIG_WIRELESS_EXT is not set | ||
280 | # CONFIG_LIB80211 is not set | 311 | # CONFIG_LIB80211 is not set |
281 | 312 | ||
282 | # | 313 | # |
@@ -301,9 +332,9 @@ CONFIG_STANDALONE=y | |||
301 | # CONFIG_CONNECTOR is not set | 332 | # CONFIG_CONNECTOR is not set |
302 | CONFIG_MTD=y | 333 | CONFIG_MTD=y |
303 | # CONFIG_MTD_DEBUG is not set | 334 | # CONFIG_MTD_DEBUG is not set |
335 | # CONFIG_MTD_TESTS is not set | ||
304 | CONFIG_MTD_CONCAT=y | 336 | CONFIG_MTD_CONCAT=y |
305 | CONFIG_MTD_PARTITIONS=y | 337 | CONFIG_MTD_PARTITIONS=y |
306 | # CONFIG_MTD_TESTS is not set | ||
307 | # CONFIG_MTD_REDBOOT_PARTS is not set | 338 | # CONFIG_MTD_REDBOOT_PARTS is not set |
308 | CONFIG_MTD_CMDLINE_PARTS=y | 339 | CONFIG_MTD_CMDLINE_PARTS=y |
309 | # CONFIG_MTD_OF_PARTS is not set | 340 | # CONFIG_MTD_OF_PARTS is not set |
@@ -387,6 +418,10 @@ CONFIG_OF_DEVICE=y | |||
387 | CONFIG_BLK_DEV=y | 418 | CONFIG_BLK_DEV=y |
388 | # CONFIG_BLK_DEV_COW_COMMON is not set | 419 | # CONFIG_BLK_DEV_COW_COMMON is not set |
389 | # CONFIG_BLK_DEV_LOOP is not set | 420 | # CONFIG_BLK_DEV_LOOP is not set |
421 | |||
422 | # | ||
423 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
424 | # | ||
390 | CONFIG_BLK_DEV_NBD=y | 425 | CONFIG_BLK_DEV_NBD=y |
391 | CONFIG_BLK_DEV_RAM=y | 426 | CONFIG_BLK_DEV_RAM=y |
392 | CONFIG_BLK_DEV_RAM_COUNT=16 | 427 | CONFIG_BLK_DEV_RAM_COUNT=16 |
@@ -423,7 +458,6 @@ CONFIG_NETDEVICES=y | |||
423 | # CONFIG_PHYLIB is not set | 458 | # CONFIG_PHYLIB is not set |
424 | CONFIG_NET_ETHERNET=y | 459 | CONFIG_NET_ETHERNET=y |
425 | # CONFIG_MII is not set | 460 | # CONFIG_MII is not set |
426 | # CONFIG_ETHOC is not set | ||
427 | # CONFIG_DNET is not set | 461 | # CONFIG_DNET is not set |
428 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 462 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
429 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 463 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
@@ -433,12 +467,12 @@ CONFIG_NET_ETHERNET=y | |||
433 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 467 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
434 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 468 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
435 | # CONFIG_KS8842 is not set | 469 | # CONFIG_KS8842 is not set |
470 | # CONFIG_KS8851_MLL is not set | ||
436 | # CONFIG_XILINX_EMACLITE is not set | 471 | # CONFIG_XILINX_EMACLITE is not set |
437 | CONFIG_NETDEV_1000=y | 472 | CONFIG_NETDEV_1000=y |
438 | CONFIG_NETDEV_10000=y | 473 | CONFIG_NETDEV_10000=y |
439 | CONFIG_WLAN=y | 474 | CONFIG_WLAN=y |
440 | # CONFIG_WLAN_PRE80211 is not set | 475 | # CONFIG_HOSTAP is not set |
441 | # CONFIG_WLAN_80211 is not set | ||
442 | 476 | ||
443 | # | 477 | # |
444 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 478 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -482,6 +516,7 @@ CONFIG_SERIAL_UARTLITE=y | |||
482 | CONFIG_SERIAL_UARTLITE_CONSOLE=y | 516 | CONFIG_SERIAL_UARTLITE_CONSOLE=y |
483 | CONFIG_SERIAL_CORE=y | 517 | CONFIG_SERIAL_CORE=y |
484 | CONFIG_SERIAL_CORE_CONSOLE=y | 518 | CONFIG_SERIAL_CORE_CONSOLE=y |
519 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | ||
485 | CONFIG_UNIX98_PTYS=y | 520 | CONFIG_UNIX98_PTYS=y |
486 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 521 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
487 | CONFIG_LEGACY_PTYS=y | 522 | CONFIG_LEGACY_PTYS=y |
@@ -508,7 +543,6 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | |||
508 | # CONFIG_POWER_SUPPLY is not set | 543 | # CONFIG_POWER_SUPPLY is not set |
509 | # CONFIG_HWMON is not set | 544 | # CONFIG_HWMON is not set |
510 | # CONFIG_THERMAL is not set | 545 | # CONFIG_THERMAL is not set |
511 | # CONFIG_THERMAL_HWMON is not set | ||
512 | # CONFIG_WATCHDOG is not set | 546 | # CONFIG_WATCHDOG is not set |
513 | 547 | ||
514 | # | 548 | # |
@@ -616,7 +650,6 @@ CONFIG_INOTIFY_USER=y | |||
616 | CONFIG_PROC_FS=y | 650 | CONFIG_PROC_FS=y |
617 | CONFIG_PROC_SYSCTL=y | 651 | CONFIG_PROC_SYSCTL=y |
618 | CONFIG_SYSFS=y | 652 | CONFIG_SYSFS=y |
619 | # CONFIG_TMPFS is not set | ||
620 | # CONFIG_HUGETLB_PAGE is not set | 653 | # CONFIG_HUGETLB_PAGE is not set |
621 | # CONFIG_CONFIGFS_FS is not set | 654 | # CONFIG_CONFIGFS_FS is not set |
622 | CONFIG_MISC_FILESYSTEMS=y | 655 | CONFIG_MISC_FILESYSTEMS=y |
@@ -672,11 +705,13 @@ CONFIG_MSDOS_PARTITION=y | |||
672 | # | 705 | # |
673 | # Kernel hacking | 706 | # Kernel hacking |
674 | # | 707 | # |
708 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
675 | # CONFIG_PRINTK_TIME is not set | 709 | # CONFIG_PRINTK_TIME is not set |
676 | CONFIG_ENABLE_WARN_DEPRECATED=y | 710 | CONFIG_ENABLE_WARN_DEPRECATED=y |
677 | CONFIG_ENABLE_MUST_CHECK=y | 711 | CONFIG_ENABLE_MUST_CHECK=y |
678 | CONFIG_FRAME_WARN=1024 | 712 | CONFIG_FRAME_WARN=1024 |
679 | # CONFIG_MAGIC_SYSRQ is not set | 713 | # CONFIG_MAGIC_SYSRQ is not set |
714 | # CONFIG_STRIP_ASM_SYMS is not set | ||
680 | CONFIG_UNUSED_SYMBOLS=y | 715 | CONFIG_UNUSED_SYMBOLS=y |
681 | CONFIG_DEBUG_FS=y | 716 | CONFIG_DEBUG_FS=y |
682 | # CONFIG_HEADERS_CHECK is not set | 717 | # CONFIG_HEADERS_CHECK is not set |
@@ -695,12 +730,16 @@ CONFIG_DEBUG_OBJECTS=y | |||
695 | CONFIG_DEBUG_OBJECTS_SELFTEST=y | 730 | CONFIG_DEBUG_OBJECTS_SELFTEST=y |
696 | CONFIG_DEBUG_OBJECTS_FREE=y | 731 | CONFIG_DEBUG_OBJECTS_FREE=y |
697 | CONFIG_DEBUG_OBJECTS_TIMERS=y | 732 | CONFIG_DEBUG_OBJECTS_TIMERS=y |
733 | # CONFIG_DEBUG_OBJECTS_WORK is not set | ||
698 | CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 | 734 | CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 |
699 | # CONFIG_DEBUG_SLAB is not set | 735 | # CONFIG_DEBUG_SLAB is not set |
700 | # CONFIG_DEBUG_RT_MUTEXES is not set | 736 | # CONFIG_DEBUG_RT_MUTEXES is not set |
701 | # CONFIG_RT_MUTEX_TESTER is not set | 737 | # CONFIG_RT_MUTEX_TESTER is not set |
702 | # CONFIG_DEBUG_SPINLOCK is not set | 738 | # CONFIG_DEBUG_SPINLOCK is not set |
703 | # CONFIG_DEBUG_MUTEXES is not set | 739 | # CONFIG_DEBUG_MUTEXES is not set |
740 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
741 | # CONFIG_PROVE_LOCKING is not set | ||
742 | # CONFIG_LOCK_STAT is not set | ||
704 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 743 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
705 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 744 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
706 | # CONFIG_DEBUG_KOBJECT is not set | 745 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -720,8 +759,28 @@ CONFIG_DEBUG_SG=y | |||
720 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 759 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
721 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | 760 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
722 | # CONFIG_FAULT_INJECTION is not set | 761 | # CONFIG_FAULT_INJECTION is not set |
762 | # CONFIG_LATENCYTOP is not set | ||
723 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 763 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
724 | # CONFIG_PAGE_POISONING is not set | 764 | # CONFIG_PAGE_POISONING is not set |
765 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
766 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
767 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
768 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
769 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
770 | CONFIG_TRACING_SUPPORT=y | ||
771 | CONFIG_FTRACE=y | ||
772 | # CONFIG_FUNCTION_TRACER is not set | ||
773 | # CONFIG_IRQSOFF_TRACER is not set | ||
774 | # CONFIG_SCHED_TRACER is not set | ||
775 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
776 | # CONFIG_BOOT_TRACER is not set | ||
777 | CONFIG_BRANCH_PROFILE_NONE=y | ||
778 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
779 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
780 | # CONFIG_STACK_TRACER is not set | ||
781 | # CONFIG_KMEMTRACE is not set | ||
782 | # CONFIG_WORKQUEUE_TRACER is not set | ||
783 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
725 | # CONFIG_DYNAMIC_DEBUG is not set | 784 | # CONFIG_DYNAMIC_DEBUG is not set |
726 | # CONFIG_SAMPLES is not set | 785 | # CONFIG_SAMPLES is not set |
727 | CONFIG_EARLY_PRINTK=y | 786 | CONFIG_EARLY_PRINTK=y |
@@ -734,7 +793,11 @@ CONFIG_EARLY_PRINTK=y | |||
734 | # CONFIG_KEYS is not set | 793 | # CONFIG_KEYS is not set |
735 | # CONFIG_SECURITY is not set | 794 | # CONFIG_SECURITY is not set |
736 | # CONFIG_SECURITYFS is not set | 795 | # CONFIG_SECURITYFS is not set |
737 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 796 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set |
797 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
798 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
799 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
800 | CONFIG_DEFAULT_SECURITY="" | ||
738 | CONFIG_CRYPTO=y | 801 | CONFIG_CRYPTO=y |
739 | 802 | ||
740 | # | 803 | # |
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S index 95b0855802df..391d6197fc3b 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S | |||
@@ -122,7 +122,7 @@ ENTRY(_interrupt) | |||
122 | 122 | ||
123 | ret_from_intr: | 123 | ret_from_intr: |
124 | lwi r11, r1, PT_MODE | 124 | lwi r11, r1, PT_MODE |
125 | bneid r11, 3f | 125 | bneid r11, no_intr_resched |
126 | 126 | ||
127 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ | 127 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ |
128 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ | 128 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ |
@@ -133,16 +133,18 @@ ret_from_intr: | |||
133 | bralid r15, schedule | 133 | bralid r15, schedule |
134 | nop | 134 | nop |
135 | 1: andi r11, r19, _TIF_SIGPENDING | 135 | 1: andi r11, r19, _TIF_SIGPENDING |
136 | beqid r11, no_intr_reshed | 136 | beqid r11, no_intr_resched |
137 | addk r5, r1, r0 | 137 | addk r5, r1, r0 |
138 | addk r7, r0, r0 | 138 | addk r7, r0, r0 |
139 | bralid r15, do_signal | 139 | bralid r15, do_signal |
140 | addk r6, r0, r0 | 140 | addk r6, r0, r0 |
141 | 141 | ||
142 | no_intr_reshed: | 142 | no_intr_resched: |
143 | /* Disable interrupts, we are now committed to the state restore */ | ||
144 | disable_irq | ||
145 | |||
143 | /* save mode indicator */ | 146 | /* save mode indicator */ |
144 | lwi r11, r1, PT_MODE | 147 | lwi r11, r1, PT_MODE |
145 | 3: | ||
146 | swi r11, r0, PER_CPU(KM) | 148 | swi r11, r0, PER_CPU(KM) |
147 | 149 | ||
148 | /* save r31 */ | 150 | /* save r31 */ |
diff --git a/arch/mips/alchemy/common/dbdma.c b/arch/mips/alchemy/common/dbdma.c index 5c68569344c1..f9201ca2295b 100644 --- a/arch/mips/alchemy/common/dbdma.c +++ b/arch/mips/alchemy/common/dbdma.c | |||
@@ -412,8 +412,11 @@ u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries) | |||
412 | if (desc_base == 0) | 412 | if (desc_base == 0) |
413 | return 0; | 413 | return 0; |
414 | 414 | ||
415 | ctp->cdb_membase = desc_base; | ||
415 | desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t)); | 416 | desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t)); |
416 | } | 417 | } else |
418 | ctp->cdb_membase = desc_base; | ||
419 | |||
417 | dp = (au1x_ddma_desc_t *)desc_base; | 420 | dp = (au1x_ddma_desc_t *)desc_base; |
418 | 421 | ||
419 | /* Keep track of the base descriptor. */ | 422 | /* Keep track of the base descriptor. */ |
@@ -831,7 +834,7 @@ void au1xxx_dbdma_chan_free(u32 chanid) | |||
831 | 834 | ||
832 | au1xxx_dbdma_stop(chanid); | 835 | au1xxx_dbdma_stop(chanid); |
833 | 836 | ||
834 | kfree((void *)ctp->chan_desc_base); | 837 | kfree((void *)ctp->cdb_membase); |
835 | 838 | ||
836 | stp->dev_flags &= ~DEV_FLAGS_INUSE; | 839 | stp->dev_flags &= ~DEV_FLAGS_INUSE; |
837 | dtp->dev_flags &= ~DEV_FLAGS_INUSE; | 840 | dtp->dev_flags &= ~DEV_FLAGS_INUSE; |
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 85169c08d8dc..f70a10a8cc96 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -202,7 +202,7 @@ static struct resource usb_res[] = { | |||
202 | .name = "mem", | 202 | .name = "mem", |
203 | .flags = IORESOURCE_MEM, | 203 | .flags = IORESOURCE_MEM, |
204 | .start = 0x03400000, | 204 | .start = 0x03400000, |
205 | .end = 0x034001fff, | 205 | .end = 0x03401fff, |
206 | }, | 206 | }, |
207 | }; | 207 | }; |
208 | 208 | ||
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 1f4df647c384..272c5ef35bbb 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -191,6 +191,9 @@ | |||
191 | # ifndef cpu_has_64bit_addresses | 191 | # ifndef cpu_has_64bit_addresses |
192 | # define cpu_has_64bit_addresses 0 | 192 | # define cpu_has_64bit_addresses 0 |
193 | # endif | 193 | # endif |
194 | # ifndef cpu_vmbits | ||
195 | # define cpu_vmbits 31 | ||
196 | # endif | ||
194 | #endif | 197 | #endif |
195 | 198 | ||
196 | #ifdef CONFIG_64BIT | 199 | #ifdef CONFIG_64BIT |
@@ -209,6 +212,10 @@ | |||
209 | # ifndef cpu_has_64bit_addresses | 212 | # ifndef cpu_has_64bit_addresses |
210 | # define cpu_has_64bit_addresses 1 | 213 | # define cpu_has_64bit_addresses 1 |
211 | # endif | 214 | # endif |
215 | # ifndef cpu_vmbits | ||
216 | # define cpu_vmbits cpu_data[0].vmbits | ||
217 | # define __NEED_VMBITS_PROBE | ||
218 | # endif | ||
212 | #endif | 219 | #endif |
213 | 220 | ||
214 | #if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint) | 221 | #if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint) |
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index 126044308dec..b39def3f6e03 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -58,6 +58,9 @@ struct cpuinfo_mips { | |||
58 | struct cache_desc tcache; /* Tertiary/split secondary cache */ | 58 | struct cache_desc tcache; /* Tertiary/split secondary cache */ |
59 | int srsets; /* Shadow register sets */ | 59 | int srsets; /* Shadow register sets */ |
60 | int core; /* physical core number */ | 60 | int core; /* physical core number */ |
61 | #ifdef CONFIG_64BIT | ||
62 | int vmbits; /* Virtual memory size in bits */ | ||
63 | #endif | ||
61 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 64 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
62 | /* | 65 | /* |
63 | * In the MIPS MT "SMTC" model, each TC is considered | 66 | * In the MIPS MT "SMTC" model, each TC is considered |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h index 06f68f43800a..d206000fbfe2 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | |||
@@ -305,6 +305,7 @@ typedef struct dbdma_chan_config { | |||
305 | dbdev_tab_t *chan_dest; | 305 | dbdev_tab_t *chan_dest; |
306 | au1x_dma_chan_t *chan_ptr; | 306 | au1x_dma_chan_t *chan_ptr; |
307 | au1x_ddma_desc_t *chan_desc_base; | 307 | au1x_ddma_desc_t *chan_desc_base; |
308 | u32 cdb_membase; /* kmalloc base of above */ | ||
308 | au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr; | 309 | au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr; |
309 | void *chan_callparam; | 310 | void *chan_callparam; |
310 | void (*chan_callback)(int, void *); | 311 | void (*chan_callback)(int, void *); |
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 9cd508993956..8eda30b467da 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -110,7 +110,9 @@ | |||
110 | #define VMALLOC_START MAP_BASE | 110 | #define VMALLOC_START MAP_BASE |
111 | #define VMALLOC_END \ | 111 | #define VMALLOC_END \ |
112 | (VMALLOC_START + \ | 112 | (VMALLOC_START + \ |
113 | PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE - (1UL << 32)) | 113 | min(PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, \ |
114 | (1UL << cpu_vmbits)) - (1UL << 32)) | ||
115 | |||
114 | #if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \ | 116 | #if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \ |
115 | VMALLOC_START != CKSSEG | 117 | VMALLOC_START != CKSSEG |
116 | /* Load modules into 32bit-compatible segment. */ | 118 | /* Load modules into 32bit-compatible segment. */ |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 80e202eca056..9c187a64649b 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -284,6 +284,15 @@ static inline int __cpu_has_fpu(void) | |||
284 | return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); | 284 | return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); |
285 | } | 285 | } |
286 | 286 | ||
287 | static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) | ||
288 | { | ||
289 | #ifdef __NEED_VMBITS_PROBE | ||
290 | write_c0_entryhi(0x3ffffffffffff000ULL); | ||
291 | back_to_back_c0_hazard(); | ||
292 | c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL); | ||
293 | #endif | ||
294 | } | ||
295 | |||
287 | #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \ | 296 | #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \ |
288 | | MIPS_CPU_COUNTER) | 297 | | MIPS_CPU_COUNTER) |
289 | 298 | ||
@@ -969,6 +978,8 @@ __cpuinit void cpu_probe(void) | |||
969 | c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; | 978 | c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; |
970 | else | 979 | else |
971 | c->srsets = 1; | 980 | c->srsets = 1; |
981 | |||
982 | cpu_probe_vmbits(c); | ||
972 | } | 983 | } |
973 | 984 | ||
974 | __cpuinit void cpu_report(void) | 985 | __cpuinit void cpu_report(void) |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 5198b9bb34ef..69ddfbd91135 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <asm/numa.h> | 49 | #include <asm/numa.h> |
50 | #include <asm/cacheflush.h> | 50 | #include <asm/cacheflush.h> |
51 | #include <asm/init.h> | 51 | #include <asm/init.h> |
52 | #include <linux/bootmem.h> | ||
52 | 53 | ||
53 | static unsigned long dma_reserve __initdata; | 54 | static unsigned long dma_reserve __initdata; |
54 | 55 | ||
@@ -616,6 +617,21 @@ void __init paging_init(void) | |||
616 | */ | 617 | */ |
617 | #ifdef CONFIG_MEMORY_HOTPLUG | 618 | #ifdef CONFIG_MEMORY_HOTPLUG |
618 | /* | 619 | /* |
620 | * After memory hotplug the variables max_pfn, max_low_pfn and high_memory need | ||
621 | * updating. | ||
622 | */ | ||
623 | static void update_end_of_memory_vars(u64 start, u64 size) | ||
624 | { | ||
625 | unsigned long end_pfn = PFN_UP(start + size); | ||
626 | |||
627 | if (end_pfn > max_pfn) { | ||
628 | max_pfn = end_pfn; | ||
629 | max_low_pfn = end_pfn; | ||
630 | high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1; | ||
631 | } | ||
632 | } | ||
633 | |||
634 | /* | ||
619 | * Memory is added always to NORMAL zone. This means you will never get | 635 | * Memory is added always to NORMAL zone. This means you will never get |
620 | * additional DMA/DMA32 memory. | 636 | * additional DMA/DMA32 memory. |
621 | */ | 637 | */ |
@@ -634,6 +650,9 @@ int arch_add_memory(int nid, u64 start, u64 size) | |||
634 | ret = __add_pages(nid, zone, start_pfn, nr_pages); | 650 | ret = __add_pages(nid, zone, start_pfn, nr_pages); |
635 | WARN_ON_ONCE(ret); | 651 | WARN_ON_ONCE(ret); |
636 | 652 | ||
653 | /* update max_pfn, max_low_pfn and high_memory */ | ||
654 | update_end_of_memory_vars(start, size); | ||
655 | |||
637 | return ret; | 656 | return ret; |
638 | } | 657 | } |
639 | EXPORT_SYMBOL_GPL(arch_add_memory); | 658 | EXPORT_SYMBOL_GPL(arch_add_memory); |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 1fa2654db0a6..e7dbbaf5fb3e 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -147,16 +147,16 @@ blkiocg_weight_write(struct cgroup *cgroup, struct cftype *cftype, u64 val) | |||
147 | return -EINVAL; | 147 | return -EINVAL; |
148 | 148 | ||
149 | blkcg = cgroup_to_blkio_cgroup(cgroup); | 149 | blkcg = cgroup_to_blkio_cgroup(cgroup); |
150 | spin_lock(&blkio_list_lock); | ||
150 | spin_lock_irq(&blkcg->lock); | 151 | spin_lock_irq(&blkcg->lock); |
151 | blkcg->weight = (unsigned int)val; | 152 | blkcg->weight = (unsigned int)val; |
152 | hlist_for_each_entry(blkg, n, &blkcg->blkg_list, blkcg_node) { | 153 | hlist_for_each_entry(blkg, n, &blkcg->blkg_list, blkcg_node) { |
153 | spin_lock(&blkio_list_lock); | ||
154 | list_for_each_entry(blkiop, &blkio_list, list) | 154 | list_for_each_entry(blkiop, &blkio_list, list) |
155 | blkiop->ops.blkio_update_group_weight_fn(blkg, | 155 | blkiop->ops.blkio_update_group_weight_fn(blkg, |
156 | blkcg->weight); | 156 | blkcg->weight); |
157 | spin_unlock(&blkio_list_lock); | ||
158 | } | 157 | } |
159 | spin_unlock_irq(&blkcg->lock); | 158 | spin_unlock_irq(&blkcg->lock); |
159 | spin_unlock(&blkio_list_lock); | ||
160 | return 0; | 160 | return 0; |
161 | } | 161 | } |
162 | 162 | ||
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index ee130f14d1fc..17b768d0d42f 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1803,7 +1803,7 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
1803 | * Otherwise, we do only if they are the last ones | 1803 | * Otherwise, we do only if they are the last ones |
1804 | * in their service tree. | 1804 | * in their service tree. |
1805 | */ | 1805 | */ |
1806 | return service_tree->count == 1; | 1806 | return service_tree->count == 1 && cfq_cfqq_sync(cfqq); |
1807 | } | 1807 | } |
1808 | 1808 | ||
1809 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) | 1809 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index e898ad9eb1c3..ab871e00ffc5 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -2973,7 +2973,6 @@ struct drbd_conf *drbd_new_device(unsigned int minor) | |||
2973 | goto out_no_q; | 2973 | goto out_no_q; |
2974 | mdev->rq_queue = q; | 2974 | mdev->rq_queue = q; |
2975 | q->queuedata = mdev; | 2975 | q->queuedata = mdev; |
2976 | blk_queue_max_segment_size(q, DRBD_MAX_SEGMENT_SIZE); | ||
2977 | 2976 | ||
2978 | disk = alloc_disk(1); | 2977 | disk = alloc_disk(1); |
2979 | if (!disk) | 2978 | if (!disk) |
@@ -2997,6 +2996,7 @@ struct drbd_conf *drbd_new_device(unsigned int minor) | |||
2997 | q->backing_dev_info.congested_data = mdev; | 2996 | q->backing_dev_info.congested_data = mdev; |
2998 | 2997 | ||
2999 | blk_queue_make_request(q, drbd_make_request_26); | 2998 | blk_queue_make_request(q, drbd_make_request_26); |
2999 | blk_queue_max_segment_size(q, DRBD_MAX_SEGMENT_SIZE); | ||
3000 | blk_queue_bounce_limit(q, BLK_BOUNCE_ANY); | 3000 | blk_queue_bounce_limit(q, BLK_BOUNCE_ANY); |
3001 | blk_queue_merge_bvec(q, drbd_merge_bvec); | 3001 | blk_queue_merge_bvec(q, drbd_merge_bvec); |
3002 | q->queue_lock = &mdev->req_lock; /* needed since we use */ | 3002 | q->queue_lock = &mdev->req_lock; /* needed since we use */ |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index f22a5283128a..d065c646b35a 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -1224,7 +1224,7 @@ static int receive_Barrier(struct drbd_conf *mdev, struct p_header *h) | |||
1224 | epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO); | 1224 | epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO); |
1225 | if (!epoch) { | 1225 | if (!epoch) { |
1226 | dev_warn(DEV, "Allocation of an epoch failed, slowing down\n"); | 1226 | dev_warn(DEV, "Allocation of an epoch failed, slowing down\n"); |
1227 | issue_flush = !test_and_set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags); | 1227 | issue_flush = !test_and_set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &mdev->current_epoch->flags); |
1228 | drbd_wait_ee_list_empty(mdev, &mdev->active_ee); | 1228 | drbd_wait_ee_list_empty(mdev, &mdev->active_ee); |
1229 | if (issue_flush) { | 1229 | if (issue_flush) { |
1230 | rv = drbd_flush_after_epoch(mdev, mdev->current_epoch); | 1230 | rv = drbd_flush_after_epoch(mdev, mdev->current_epoch); |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 2ddf03ae034e..68b5957f107c 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -322,7 +322,7 @@ static void pkt_sysfs_dev_remove(struct pktcdvd_device *pd) | |||
322 | pkt_kobj_remove(pd->kobj_stat); | 322 | pkt_kobj_remove(pd->kobj_stat); |
323 | pkt_kobj_remove(pd->kobj_wqueue); | 323 | pkt_kobj_remove(pd->kobj_wqueue); |
324 | if (class_pktcdvd) | 324 | if (class_pktcdvd) |
325 | device_destroy(class_pktcdvd, pd->pkt_dev); | 325 | device_unregister(pd->dev); |
326 | } | 326 | } |
327 | 327 | ||
328 | 328 | ||
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index 652367aa6546..058fbccf2f52 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig | |||
@@ -195,5 +195,16 @@ config BT_MRVL_SDIO | |||
195 | Say Y here to compile support for Marvell BT-over-SDIO driver | 195 | Say Y here to compile support for Marvell BT-over-SDIO driver |
196 | into the kernel or say M to compile it as module. | 196 | into the kernel or say M to compile it as module. |
197 | 197 | ||
198 | endmenu | 198 | config BT_ATH3K |
199 | tristate "Atheros firmware download driver" | ||
200 | depends on BT_HCIBTUSB | ||
201 | select FW_LOADER | ||
202 | help | ||
203 | Bluetooth firmware download driver. | ||
204 | This driver loads the firmware into the Atheros Bluetooth | ||
205 | chipset. | ||
199 | 206 | ||
207 | Say Y here to compile support for "Atheros firmware download driver" | ||
208 | into the kernel or say M to compile it as module (ath3k). | ||
209 | |||
210 | endmenu | ||
diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile index b3f57d2d4eb0..7e5aed598121 100644 --- a/drivers/bluetooth/Makefile +++ b/drivers/bluetooth/Makefile | |||
@@ -15,6 +15,7 @@ obj-$(CONFIG_BT_HCIBTUART) += btuart_cs.o | |||
15 | obj-$(CONFIG_BT_HCIBTUSB) += btusb.o | 15 | obj-$(CONFIG_BT_HCIBTUSB) += btusb.o |
16 | obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o | 16 | obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o |
17 | 17 | ||
18 | obj-$(CONFIG_BT_ATH3K) += ath3k.o | ||
18 | obj-$(CONFIG_BT_MRVL) += btmrvl.o | 19 | obj-$(CONFIG_BT_MRVL) += btmrvl.o |
19 | obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o | 20 | obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o |
20 | 21 | ||
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c new file mode 100644 index 000000000000..add9485ca5b6 --- /dev/null +++ b/drivers/bluetooth/ath3k.c | |||
@@ -0,0 +1,187 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2008-2009 Atheros Communications Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | |||
21 | #include <linux/module.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/types.h> | ||
26 | #include <linux/errno.h> | ||
27 | #include <linux/device.h> | ||
28 | #include <linux/firmware.h> | ||
29 | #include <linux/usb.h> | ||
30 | #include <net/bluetooth/bluetooth.h> | ||
31 | |||
32 | #define VERSION "1.0" | ||
33 | |||
34 | |||
35 | static struct usb_device_id ath3k_table[] = { | ||
36 | /* Atheros AR3011 */ | ||
37 | { USB_DEVICE(0x0CF3, 0x3000) }, | ||
38 | { } /* Terminating entry */ | ||
39 | }; | ||
40 | |||
41 | MODULE_DEVICE_TABLE(usb, ath3k_table); | ||
42 | |||
43 | #define USB_REQ_DFU_DNLOAD 1 | ||
44 | #define BULK_SIZE 4096 | ||
45 | |||
46 | struct ath3k_data { | ||
47 | struct usb_device *udev; | ||
48 | u8 *fw_data; | ||
49 | u32 fw_size; | ||
50 | u32 fw_sent; | ||
51 | }; | ||
52 | |||
53 | static int ath3k_load_firmware(struct ath3k_data *data, | ||
54 | unsigned char *firmware, | ||
55 | int count) | ||
56 | { | ||
57 | u8 *send_buf; | ||
58 | int err, pipe, len, size, sent = 0; | ||
59 | |||
60 | BT_DBG("ath3k %p udev %p", data, data->udev); | ||
61 | |||
62 | pipe = usb_sndctrlpipe(data->udev, 0); | ||
63 | |||
64 | if ((usb_control_msg(data->udev, pipe, | ||
65 | USB_REQ_DFU_DNLOAD, | ||
66 | USB_TYPE_VENDOR, 0, 0, | ||
67 | firmware, 20, USB_CTRL_SET_TIMEOUT)) < 0) { | ||
68 | BT_ERR("Can't change to loading configuration err"); | ||
69 | return -EBUSY; | ||
70 | } | ||
71 | sent += 20; | ||
72 | count -= 20; | ||
73 | |||
74 | send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC); | ||
75 | if (!send_buf) { | ||
76 | BT_ERR("Can't allocate memory chunk for firmware"); | ||
77 | return -ENOMEM; | ||
78 | } | ||
79 | |||
80 | while (count) { | ||
81 | size = min_t(uint, count, BULK_SIZE); | ||
82 | pipe = usb_sndbulkpipe(data->udev, 0x02); | ||
83 | memcpy(send_buf, firmware + sent, size); | ||
84 | |||
85 | err = usb_bulk_msg(data->udev, pipe, send_buf, size, | ||
86 | &len, 3000); | ||
87 | |||
88 | if (err || (len != size)) { | ||
89 | BT_ERR("Error in firmware loading err = %d," | ||
90 | "len = %d, size = %d", err, len, size); | ||
91 | goto error; | ||
92 | } | ||
93 | |||
94 | sent += size; | ||
95 | count -= size; | ||
96 | } | ||
97 | |||
98 | kfree(send_buf); | ||
99 | return 0; | ||
100 | |||
101 | error: | ||
102 | kfree(send_buf); | ||
103 | return err; | ||
104 | } | ||
105 | |||
106 | static int ath3k_probe(struct usb_interface *intf, | ||
107 | const struct usb_device_id *id) | ||
108 | { | ||
109 | const struct firmware *firmware; | ||
110 | struct usb_device *udev = interface_to_usbdev(intf); | ||
111 | struct ath3k_data *data; | ||
112 | int size; | ||
113 | |||
114 | BT_DBG("intf %p id %p", intf, id); | ||
115 | |||
116 | if (intf->cur_altsetting->desc.bInterfaceNumber != 0) | ||
117 | return -ENODEV; | ||
118 | |||
119 | data = kzalloc(sizeof(*data), GFP_KERNEL); | ||
120 | if (!data) | ||
121 | return -ENOMEM; | ||
122 | |||
123 | data->udev = udev; | ||
124 | |||
125 | if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) { | ||
126 | kfree(data); | ||
127 | return -EIO; | ||
128 | } | ||
129 | |||
130 | size = max_t(uint, firmware->size, 4096); | ||
131 | data->fw_data = kmalloc(size, GFP_KERNEL); | ||
132 | if (!data->fw_data) { | ||
133 | release_firmware(firmware); | ||
134 | kfree(data); | ||
135 | return -ENOMEM; | ||
136 | } | ||
137 | |||
138 | memcpy(data->fw_data, firmware->data, firmware->size); | ||
139 | data->fw_size = firmware->size; | ||
140 | data->fw_sent = 0; | ||
141 | release_firmware(firmware); | ||
142 | |||
143 | usb_set_intfdata(intf, data); | ||
144 | if (ath3k_load_firmware(data, data->fw_data, data->fw_size)) { | ||
145 | usb_set_intfdata(intf, NULL); | ||
146 | return -EIO; | ||
147 | } | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static void ath3k_disconnect(struct usb_interface *intf) | ||
153 | { | ||
154 | struct ath3k_data *data = usb_get_intfdata(intf); | ||
155 | |||
156 | BT_DBG("ath3k_disconnect intf %p", intf); | ||
157 | |||
158 | kfree(data->fw_data); | ||
159 | kfree(data); | ||
160 | } | ||
161 | |||
162 | static struct usb_driver ath3k_driver = { | ||
163 | .name = "ath3k", | ||
164 | .probe = ath3k_probe, | ||
165 | .disconnect = ath3k_disconnect, | ||
166 | .id_table = ath3k_table, | ||
167 | }; | ||
168 | |||
169 | static int __init ath3k_init(void) | ||
170 | { | ||
171 | BT_INFO("Atheros AR30xx firmware driver ver %s", VERSION); | ||
172 | return usb_register(&ath3k_driver); | ||
173 | } | ||
174 | |||
175 | static void __exit ath3k_exit(void) | ||
176 | { | ||
177 | usb_deregister(&ath3k_driver); | ||
178 | } | ||
179 | |||
180 | module_init(ath3k_init); | ||
181 | module_exit(ath3k_exit); | ||
182 | |||
183 | MODULE_AUTHOR("Atheros Communications"); | ||
184 | MODULE_DESCRIPTION("Atheros AR30xx firmware driver"); | ||
185 | MODULE_VERSION(VERSION); | ||
186 | MODULE_LICENSE("GPL"); | ||
187 | MODULE_FIRMWARE("ath3k-1.fw"); | ||
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 2acdc605cb4b..c2cf81144715 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -503,7 +503,9 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst) | |||
503 | unsigned int iobase; | 503 | unsigned int iobase; |
504 | unsigned char reg; | 504 | unsigned char reg; |
505 | 505 | ||
506 | BUG_ON(!info->hdev); | 506 | if (!info || !info->hdev) |
507 | /* our irq handler is shared */ | ||
508 | return IRQ_NONE; | ||
507 | 509 | ||
508 | if (!test_bit(CARD_READY, &(info->hw_state))) | 510 | if (!test_bit(CARD_READY, &(info->hw_state))) |
509 | return IRQ_HANDLED; | 511 | return IRQ_HANDLED; |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index d814a2755ccb..9f5926aaf57f 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -345,7 +345,9 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst) | |||
345 | int iir; | 345 | int iir; |
346 | irqreturn_t r = IRQ_NONE; | 346 | irqreturn_t r = IRQ_NONE; |
347 | 347 | ||
348 | BUG_ON(!info->hdev); | 348 | if (!info || !info->hdev) |
349 | /* our irq handler is shared */ | ||
350 | return IRQ_NONE; | ||
349 | 351 | ||
350 | iobase = info->p_dev->io.BasePort1; | 352 | iobase = info->p_dev->io.BasePort1; |
351 | 353 | ||
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index d339464dc15e..91c523099804 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -295,7 +295,9 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst) | |||
295 | int iir, lsr; | 295 | int iir, lsr; |
296 | irqreturn_t r = IRQ_NONE; | 296 | irqreturn_t r = IRQ_NONE; |
297 | 297 | ||
298 | BUG_ON(!info->hdev); | 298 | if (!info || !info->hdev) |
299 | /* our irq handler is shared */ | ||
300 | return IRQ_NONE; | ||
299 | 301 | ||
300 | iobase = info->p_dev->io.BasePort1; | 302 | iobase = info->p_dev->io.BasePort1; |
301 | 303 | ||
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 4f02a6f3c980..697591941e17 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -299,7 +299,9 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst) | |||
299 | int iir, lsr; | 299 | int iir, lsr; |
300 | irqreturn_t r = IRQ_NONE; | 300 | irqreturn_t r = IRQ_NONE; |
301 | 301 | ||
302 | BUG_ON(!info->hdev); | 302 | if (!info || !info->hdev) |
303 | /* our irq handler is shared */ | ||
304 | return IRQ_NONE; | ||
303 | 305 | ||
304 | iobase = info->p_dev->io.BasePort1; | 306 | iobase = info->p_dev->io.BasePort1; |
305 | 307 | ||
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index be832b6f8279..48788db4e280 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -395,6 +395,7 @@ static ssize_t read_kmem(struct file *file, char __user *buf, | |||
395 | unsigned long p = *ppos; | 395 | unsigned long p = *ppos; |
396 | ssize_t low_count, read, sz; | 396 | ssize_t low_count, read, sz; |
397 | char * kbuf; /* k-addr because vread() takes vmlist_lock rwlock */ | 397 | char * kbuf; /* k-addr because vread() takes vmlist_lock rwlock */ |
398 | int err = 0; | ||
398 | 399 | ||
399 | read = 0; | 400 | read = 0; |
400 | if (p < (unsigned long) high_memory) { | 401 | if (p < (unsigned long) high_memory) { |
@@ -441,12 +442,16 @@ static ssize_t read_kmem(struct file *file, char __user *buf, | |||
441 | return -ENOMEM; | 442 | return -ENOMEM; |
442 | while (count > 0) { | 443 | while (count > 0) { |
443 | sz = size_inside_page(p, count); | 444 | sz = size_inside_page(p, count); |
445 | if (!is_vmalloc_or_module_addr((void *)p)) { | ||
446 | err = -ENXIO; | ||
447 | break; | ||
448 | } | ||
444 | sz = vread(kbuf, (char *)p, sz); | 449 | sz = vread(kbuf, (char *)p, sz); |
445 | if (!sz) | 450 | if (!sz) |
446 | break; | 451 | break; |
447 | if (copy_to_user(buf, kbuf, sz)) { | 452 | if (copy_to_user(buf, kbuf, sz)) { |
448 | free_page((unsigned long)kbuf); | 453 | err = -EFAULT; |
449 | return -EFAULT; | 454 | break; |
450 | } | 455 | } |
451 | count -= sz; | 456 | count -= sz; |
452 | buf += sz; | 457 | buf += sz; |
@@ -455,8 +460,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf, | |||
455 | } | 460 | } |
456 | free_page((unsigned long)kbuf); | 461 | free_page((unsigned long)kbuf); |
457 | } | 462 | } |
458 | *ppos = p; | 463 | *ppos = p; |
459 | return read; | 464 | return read ? read : err; |
460 | } | 465 | } |
461 | 466 | ||
462 | 467 | ||
@@ -520,6 +525,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf, | |||
520 | ssize_t wrote = 0; | 525 | ssize_t wrote = 0; |
521 | ssize_t virtr = 0; | 526 | ssize_t virtr = 0; |
522 | char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ | 527 | char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ |
528 | int err = 0; | ||
523 | 529 | ||
524 | if (p < (unsigned long) high_memory) { | 530 | if (p < (unsigned long) high_memory) { |
525 | unsigned long to_write = min_t(unsigned long, count, | 531 | unsigned long to_write = min_t(unsigned long, count, |
@@ -540,14 +546,16 @@ static ssize_t write_kmem(struct file * file, const char __user * buf, | |||
540 | unsigned long sz = size_inside_page(p, count); | 546 | unsigned long sz = size_inside_page(p, count); |
541 | unsigned long n; | 547 | unsigned long n; |
542 | 548 | ||
549 | if (!is_vmalloc_or_module_addr((void *)p)) { | ||
550 | err = -ENXIO; | ||
551 | break; | ||
552 | } | ||
543 | n = copy_from_user(kbuf, buf, sz); | 553 | n = copy_from_user(kbuf, buf, sz); |
544 | if (n) { | 554 | if (n) { |
545 | if (wrote + virtr) | 555 | err = -EFAULT; |
546 | break; | 556 | break; |
547 | free_page((unsigned long)kbuf); | ||
548 | return -EFAULT; | ||
549 | } | 557 | } |
550 | sz = vwrite(kbuf, (char *)p, sz); | 558 | vwrite(kbuf, (char *)p, sz); |
551 | count -= sz; | 559 | count -= sz; |
552 | buf += sz; | 560 | buf += sz; |
553 | virtr += sz; | 561 | virtr += sz; |
@@ -556,8 +564,8 @@ static ssize_t write_kmem(struct file * file, const char __user * buf, | |||
556 | free_page((unsigned long)kbuf); | 564 | free_page((unsigned long)kbuf); |
557 | } | 565 | } |
558 | 566 | ||
559 | *ppos = p; | 567 | *ppos = p; |
560 | return virtr + wrote; | 568 | return virtr + wrote ? : err; |
561 | } | 569 | } |
562 | #endif | 570 | #endif |
563 | 571 | ||
diff --git a/drivers/char/random.c b/drivers/char/random.c index 8258982b49ec..2849713d2231 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1051,12 +1051,6 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) | |||
1051 | /* like a named pipe */ | 1051 | /* like a named pipe */ |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | /* | ||
1055 | * If we gave the user some bytes, update the access time. | ||
1056 | */ | ||
1057 | if (count) | ||
1058 | file_accessed(file); | ||
1059 | |||
1060 | return (count ? count : retval); | 1054 | return (count ? count : retval); |
1061 | } | 1055 | } |
1062 | 1056 | ||
@@ -1107,7 +1101,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, | |||
1107 | size_t count, loff_t *ppos) | 1101 | size_t count, loff_t *ppos) |
1108 | { | 1102 | { |
1109 | size_t ret; | 1103 | size_t ret; |
1110 | struct inode *inode = file->f_path.dentry->d_inode; | ||
1111 | 1104 | ||
1112 | ret = write_pool(&blocking_pool, buffer, count); | 1105 | ret = write_pool(&blocking_pool, buffer, count); |
1113 | if (ret) | 1106 | if (ret) |
@@ -1116,8 +1109,6 @@ static ssize_t random_write(struct file *file, const char __user *buffer, | |||
1116 | if (ret) | 1109 | if (ret) |
1117 | return ret; | 1110 | return ret; |
1118 | 1111 | ||
1119 | inode->i_mtime = current_fs_time(inode->i_sb); | ||
1120 | mark_inode_dirty(inode); | ||
1121 | return (ssize_t)count; | 1112 | return (ssize_t)count; |
1122 | } | 1113 | } |
1123 | 1114 | ||
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index f06024668f99..537c29ac4487 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -36,17 +36,6 @@ MODULE_LICENSE("GPL"); | |||
36 | MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>"); | 36 | MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>"); |
37 | MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector."); | 37 | MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector."); |
38 | 38 | ||
39 | static u32 cn_idx = CN_IDX_CONNECTOR; | ||
40 | static u32 cn_val = CN_VAL_CONNECTOR; | ||
41 | |||
42 | module_param(cn_idx, uint, 0); | ||
43 | module_param(cn_val, uint, 0); | ||
44 | MODULE_PARM_DESC(cn_idx, "Connector's main device idx."); | ||
45 | MODULE_PARM_DESC(cn_val, "Connector's main device val."); | ||
46 | |||
47 | static DEFINE_MUTEX(notify_lock); | ||
48 | static LIST_HEAD(notify_list); | ||
49 | |||
50 | static struct cn_dev cdev; | 39 | static struct cn_dev cdev; |
51 | 40 | ||
52 | static int cn_already_initialized; | 41 | static int cn_already_initialized; |
@@ -210,54 +199,6 @@ static void cn_rx_skb(struct sk_buff *__skb) | |||
210 | } | 199 | } |
211 | 200 | ||
212 | /* | 201 | /* |
213 | * Notification routing. | ||
214 | * | ||
215 | * Gets id and checks if there are notification request for it's idx | ||
216 | * and val. If there are such requests notify the listeners with the | ||
217 | * given notify event. | ||
218 | * | ||
219 | */ | ||
220 | static void cn_notify(struct cb_id *id, u32 notify_event) | ||
221 | { | ||
222 | struct cn_ctl_entry *ent; | ||
223 | |||
224 | mutex_lock(¬ify_lock); | ||
225 | list_for_each_entry(ent, ¬ify_list, notify_entry) { | ||
226 | int i; | ||
227 | struct cn_notify_req *req; | ||
228 | struct cn_ctl_msg *ctl = ent->msg; | ||
229 | int idx_found, val_found; | ||
230 | |||
231 | idx_found = val_found = 0; | ||
232 | |||
233 | req = (struct cn_notify_req *)ctl->data; | ||
234 | for (i = 0; i < ctl->idx_notify_num; ++i, ++req) { | ||
235 | if (id->idx >= req->first && | ||
236 | id->idx < req->first + req->range) { | ||
237 | idx_found = 1; | ||
238 | break; | ||
239 | } | ||
240 | } | ||
241 | |||
242 | for (i = 0; i < ctl->val_notify_num; ++i, ++req) { | ||
243 | if (id->val >= req->first && | ||
244 | id->val < req->first + req->range) { | ||
245 | val_found = 1; | ||
246 | break; | ||
247 | } | ||
248 | } | ||
249 | |||
250 | if (idx_found && val_found) { | ||
251 | struct cn_msg m = { .ack = notify_event, }; | ||
252 | |||
253 | memcpy(&m.id, id, sizeof(m.id)); | ||
254 | cn_netlink_send(&m, ctl->group, GFP_KERNEL); | ||
255 | } | ||
256 | } | ||
257 | mutex_unlock(¬ify_lock); | ||
258 | } | ||
259 | |||
260 | /* | ||
261 | * Callback add routing - adds callback with given ID and name. | 202 | * Callback add routing - adds callback with given ID and name. |
262 | * If there is registered callback with the same ID it will not be added. | 203 | * If there is registered callback with the same ID it will not be added. |
263 | * | 204 | * |
@@ -276,8 +217,6 @@ int cn_add_callback(struct cb_id *id, char *name, | |||
276 | if (err) | 217 | if (err) |
277 | return err; | 218 | return err; |
278 | 219 | ||
279 | cn_notify(id, 0); | ||
280 | |||
281 | return 0; | 220 | return 0; |
282 | } | 221 | } |
283 | EXPORT_SYMBOL_GPL(cn_add_callback); | 222 | EXPORT_SYMBOL_GPL(cn_add_callback); |
@@ -295,111 +234,9 @@ void cn_del_callback(struct cb_id *id) | |||
295 | struct cn_dev *dev = &cdev; | 234 | struct cn_dev *dev = &cdev; |
296 | 235 | ||
297 | cn_queue_del_callback(dev->cbdev, id); | 236 | cn_queue_del_callback(dev->cbdev, id); |
298 | cn_notify(id, 1); | ||
299 | } | 237 | } |
300 | EXPORT_SYMBOL_GPL(cn_del_callback); | 238 | EXPORT_SYMBOL_GPL(cn_del_callback); |
301 | 239 | ||
302 | /* | ||
303 | * Checks two connector's control messages to be the same. | ||
304 | * Returns 1 if they are the same or if the first one is corrupted. | ||
305 | */ | ||
306 | static int cn_ctl_msg_equals(struct cn_ctl_msg *m1, struct cn_ctl_msg *m2) | ||
307 | { | ||
308 | int i; | ||
309 | struct cn_notify_req *req1, *req2; | ||
310 | |||
311 | if (m1->idx_notify_num != m2->idx_notify_num) | ||
312 | return 0; | ||
313 | |||
314 | if (m1->val_notify_num != m2->val_notify_num) | ||
315 | return 0; | ||
316 | |||
317 | if (m1->len != m2->len) | ||
318 | return 0; | ||
319 | |||
320 | if ((m1->idx_notify_num + m1->val_notify_num) * sizeof(*req1) != | ||
321 | m1->len) | ||
322 | return 1; | ||
323 | |||
324 | req1 = (struct cn_notify_req *)m1->data; | ||
325 | req2 = (struct cn_notify_req *)m2->data; | ||
326 | |||
327 | for (i = 0; i < m1->idx_notify_num; ++i) { | ||
328 | if (req1->first != req2->first || req1->range != req2->range) | ||
329 | return 0; | ||
330 | req1++; | ||
331 | req2++; | ||
332 | } | ||
333 | |||
334 | for (i = 0; i < m1->val_notify_num; ++i) { | ||
335 | if (req1->first != req2->first || req1->range != req2->range) | ||
336 | return 0; | ||
337 | req1++; | ||
338 | req2++; | ||
339 | } | ||
340 | |||
341 | return 1; | ||
342 | } | ||
343 | |||
344 | /* | ||
345 | * Main connector device's callback. | ||
346 | * | ||
347 | * Used for notification of a request's processing. | ||
348 | */ | ||
349 | static void cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp) | ||
350 | { | ||
351 | struct cn_ctl_msg *ctl; | ||
352 | struct cn_ctl_entry *ent; | ||
353 | u32 size; | ||
354 | |||
355 | if (msg->len < sizeof(*ctl)) | ||
356 | return; | ||
357 | |||
358 | ctl = (struct cn_ctl_msg *)msg->data; | ||
359 | |||
360 | size = (sizeof(*ctl) + ((ctl->idx_notify_num + | ||
361 | ctl->val_notify_num) * | ||
362 | sizeof(struct cn_notify_req))); | ||
363 | |||
364 | if (msg->len != size) | ||
365 | return; | ||
366 | |||
367 | if (ctl->len + sizeof(*ctl) != msg->len) | ||
368 | return; | ||
369 | |||
370 | /* | ||
371 | * Remove notification. | ||
372 | */ | ||
373 | if (ctl->group == 0) { | ||
374 | struct cn_ctl_entry *n; | ||
375 | |||
376 | mutex_lock(¬ify_lock); | ||
377 | list_for_each_entry_safe(ent, n, ¬ify_list, notify_entry) { | ||
378 | if (cn_ctl_msg_equals(ent->msg, ctl)) { | ||
379 | list_del(&ent->notify_entry); | ||
380 | kfree(ent); | ||
381 | } | ||
382 | } | ||
383 | mutex_unlock(¬ify_lock); | ||
384 | |||
385 | return; | ||
386 | } | ||
387 | |||
388 | size += sizeof(*ent); | ||
389 | |||
390 | ent = kzalloc(size, GFP_KERNEL); | ||
391 | if (!ent) | ||
392 | return; | ||
393 | |||
394 | ent->msg = (struct cn_ctl_msg *)(ent + 1); | ||
395 | |||
396 | memcpy(ent->msg, ctl, size - sizeof(*ent)); | ||
397 | |||
398 | mutex_lock(¬ify_lock); | ||
399 | list_add(&ent->notify_entry, ¬ify_list); | ||
400 | mutex_unlock(¬ify_lock); | ||
401 | } | ||
402 | |||
403 | static int cn_proc_show(struct seq_file *m, void *v) | 240 | static int cn_proc_show(struct seq_file *m, void *v) |
404 | { | 241 | { |
405 | struct cn_queue_dev *dev = cdev.cbdev; | 242 | struct cn_queue_dev *dev = cdev.cbdev; |
@@ -437,11 +274,8 @@ static const struct file_operations cn_file_ops = { | |||
437 | static int __devinit cn_init(void) | 274 | static int __devinit cn_init(void) |
438 | { | 275 | { |
439 | struct cn_dev *dev = &cdev; | 276 | struct cn_dev *dev = &cdev; |
440 | int err; | ||
441 | 277 | ||
442 | dev->input = cn_rx_skb; | 278 | dev->input = cn_rx_skb; |
443 | dev->id.idx = cn_idx; | ||
444 | dev->id.val = cn_val; | ||
445 | 279 | ||
446 | dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, | 280 | dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, |
447 | CN_NETLINK_USERS + 0xf, | 281 | CN_NETLINK_USERS + 0xf, |
@@ -457,14 +291,6 @@ static int __devinit cn_init(void) | |||
457 | 291 | ||
458 | cn_already_initialized = 1; | 292 | cn_already_initialized = 1; |
459 | 293 | ||
460 | err = cn_add_callback(&dev->id, "connector", &cn_callback); | ||
461 | if (err) { | ||
462 | cn_already_initialized = 0; | ||
463 | cn_queue_free_dev(dev->cbdev); | ||
464 | netlink_kernel_release(dev->nls); | ||
465 | return -EINVAL; | ||
466 | } | ||
467 | |||
468 | proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops); | 294 | proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops); |
469 | 295 | ||
470 | return 0; | 296 | return 0; |
@@ -478,7 +304,6 @@ static void __devexit cn_fini(void) | |||
478 | 304 | ||
479 | proc_net_remove(&init_net, "connector"); | 305 | proc_net_remove(&init_net, "connector"); |
480 | 306 | ||
481 | cn_del_callback(&dev->id); | ||
482 | cn_queue_free_dev(dev->cbdev); | 307 | cn_queue_free_dev(dev->cbdev); |
483 | netlink_kernel_release(dev->nls); | 308 | netlink_kernel_release(dev->nls); |
484 | } | 309 | } |
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index 0af80577dc7b..d3a27e0119bc 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c | |||
@@ -57,6 +57,23 @@ static int padlock_sha_update(struct shash_desc *desc, | |||
57 | return crypto_shash_update(&dctx->fallback, data, length); | 57 | return crypto_shash_update(&dctx->fallback, data, length); |
58 | } | 58 | } |
59 | 59 | ||
60 | static int padlock_sha_export(struct shash_desc *desc, void *out) | ||
61 | { | ||
62 | struct padlock_sha_desc *dctx = shash_desc_ctx(desc); | ||
63 | |||
64 | return crypto_shash_export(&dctx->fallback, out); | ||
65 | } | ||
66 | |||
67 | static int padlock_sha_import(struct shash_desc *desc, const void *in) | ||
68 | { | ||
69 | struct padlock_sha_desc *dctx = shash_desc_ctx(desc); | ||
70 | struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); | ||
71 | |||
72 | dctx->fallback.tfm = ctx->fallback; | ||
73 | dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; | ||
74 | return crypto_shash_import(&dctx->fallback, in); | ||
75 | } | ||
76 | |||
60 | static inline void padlock_output_block(uint32_t *src, | 77 | static inline void padlock_output_block(uint32_t *src, |
61 | uint32_t *dst, size_t count) | 78 | uint32_t *dst, size_t count) |
62 | { | 79 | { |
@@ -235,7 +252,10 @@ static struct shash_alg sha1_alg = { | |||
235 | .update = padlock_sha_update, | 252 | .update = padlock_sha_update, |
236 | .finup = padlock_sha1_finup, | 253 | .finup = padlock_sha1_finup, |
237 | .final = padlock_sha1_final, | 254 | .final = padlock_sha1_final, |
255 | .export = padlock_sha_export, | ||
256 | .import = padlock_sha_import, | ||
238 | .descsize = sizeof(struct padlock_sha_desc), | 257 | .descsize = sizeof(struct padlock_sha_desc), |
258 | .statesize = sizeof(struct sha1_state), | ||
239 | .base = { | 259 | .base = { |
240 | .cra_name = "sha1", | 260 | .cra_name = "sha1", |
241 | .cra_driver_name = "sha1-padlock", | 261 | .cra_driver_name = "sha1-padlock", |
@@ -256,7 +276,10 @@ static struct shash_alg sha256_alg = { | |||
256 | .update = padlock_sha_update, | 276 | .update = padlock_sha_update, |
257 | .finup = padlock_sha256_finup, | 277 | .finup = padlock_sha256_finup, |
258 | .final = padlock_sha256_final, | 278 | .final = padlock_sha256_final, |
279 | .export = padlock_sha_export, | ||
280 | .import = padlock_sha_import, | ||
259 | .descsize = sizeof(struct padlock_sha_desc), | 281 | .descsize = sizeof(struct padlock_sha_desc), |
282 | .statesize = sizeof(struct sha256_state), | ||
260 | .base = { | 283 | .base = { |
261 | .cra_name = "sha256", | 284 | .cra_name = "sha256", |
262 | .cra_driver_name = "sha256-padlock", | 285 | .cra_driver_name = "sha256-padlock", |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index becbaadb3b77..5ed75263340a 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -1333,9 +1333,9 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) | |||
1333 | 1333 | ||
1334 | DEB_CAP(("vbuf:%p\n",vb)); | 1334 | DEB_CAP(("vbuf:%p\n",vb)); |
1335 | 1335 | ||
1336 | release_all_pagetables(dev, buf); | ||
1337 | |||
1338 | saa7146_dma_free(dev,q,buf); | 1336 | saa7146_dma_free(dev,q,buf); |
1337 | |||
1338 | release_all_pagetables(dev, buf); | ||
1339 | } | 1339 | } |
1340 | 1340 | ||
1341 | static struct videobuf_queue_ops video_qops = { | 1341 | static struct videobuf_queue_ops video_qops = { |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 7dfecfc6017c..ee5bff02a92c 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -93,9 +93,9 @@ static int ts_open(struct file *file) | |||
93 | dprintk("open dev=%s\n", video_device_node_name(vdev)); | 93 | dprintk("open dev=%s\n", video_device_node_name(vdev)); |
94 | err = -EBUSY; | 94 | err = -EBUSY; |
95 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) | 95 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) |
96 | goto done; | 96 | return err; |
97 | if (atomic_read(&dev->empress_users)) | 97 | if (atomic_read(&dev->empress_users)) |
98 | goto done_up; | 98 | goto done; |
99 | 99 | ||
100 | /* Unmute audio */ | 100 | /* Unmute audio */ |
101 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, | 101 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, |
@@ -105,10 +105,8 @@ static int ts_open(struct file *file) | |||
105 | file->private_data = dev; | 105 | file->private_data = dev; |
106 | err = 0; | 106 | err = 0; |
107 | 107 | ||
108 | done_up: | ||
109 | mutex_unlock(&dev->empress_tsq.vb_lock); | ||
110 | done: | 108 | done: |
111 | unlock_kernel(); | 109 | mutex_unlock(&dev->empress_tsq.vb_lock); |
112 | return err; | 110 | return err; |
113 | } | 111 | } |
114 | 112 | ||
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 9fd8e5ecd5d7..5bc74590c73e 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -276,8 +276,13 @@ struct be_adapter { | |||
276 | int link_speed; | 276 | int link_speed; |
277 | u8 port_type; | 277 | u8 port_type; |
278 | u8 transceiver; | 278 | u8 transceiver; |
279 | u8 generation; /* BladeEngine ASIC generation */ | ||
279 | }; | 280 | }; |
280 | 281 | ||
282 | /* BladeEngine Generation numbers */ | ||
283 | #define BE_GEN2 2 | ||
284 | #define BE_GEN3 3 | ||
285 | |||
281 | extern const struct ethtool_ops be_ethtool_ops; | 286 | extern const struct ethtool_ops be_ethtool_ops; |
282 | 287 | ||
283 | #define drvr_stats(adapter) (&adapter->stats.drvr_stats) | 288 | #define drvr_stats(adapter) (&adapter->stats.drvr_stats) |
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h index c002b8391b4d..13b33c841083 100644 --- a/drivers/net/benet/be_cmds.h +++ b/drivers/net/benet/be_cmds.h | |||
@@ -164,7 +164,8 @@ struct be_cmd_req_hdr { | |||
164 | u8 domain; /* dword 0 */ | 164 | u8 domain; /* dword 0 */ |
165 | u32 timeout; /* dword 1 */ | 165 | u32 timeout; /* dword 1 */ |
166 | u32 request_length; /* dword 2 */ | 166 | u32 request_length; /* dword 2 */ |
167 | u32 rsvd; /* dword 3 */ | 167 | u8 version; /* dword 3 */ |
168 | u8 rsvd[3]; /* dword 3 */ | ||
168 | }; | 169 | }; |
169 | 170 | ||
170 | #define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */ | 171 | #define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */ |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 33ab8c7f14fe..626b76c0ebc7 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -1350,7 +1350,7 @@ static irqreturn_t be_intx(int irq, void *dev) | |||
1350 | int isr; | 1350 | int isr; |
1351 | 1351 | ||
1352 | isr = ioread32(adapter->csr + CEV_ISR0_OFFSET + | 1352 | isr = ioread32(adapter->csr + CEV_ISR0_OFFSET + |
1353 | be_pci_func(adapter) * CEV_ISR_SIZE); | 1353 | (adapter->tx_eq.q.id/ 8) * CEV_ISR_SIZE); |
1354 | if (!isr) | 1354 | if (!isr) |
1355 | return IRQ_NONE; | 1355 | return IRQ_NONE; |
1356 | 1356 | ||
@@ -2051,6 +2051,7 @@ static void be_unmap_pci_bars(struct be_adapter *adapter) | |||
2051 | static int be_map_pci_bars(struct be_adapter *adapter) | 2051 | static int be_map_pci_bars(struct be_adapter *adapter) |
2052 | { | 2052 | { |
2053 | u8 __iomem *addr; | 2053 | u8 __iomem *addr; |
2054 | int pcicfg_reg; | ||
2054 | 2055 | ||
2055 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), | 2056 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), |
2056 | pci_resource_len(adapter->pdev, 2)); | 2057 | pci_resource_len(adapter->pdev, 2)); |
@@ -2064,8 +2065,13 @@ static int be_map_pci_bars(struct be_adapter *adapter) | |||
2064 | goto pci_map_err; | 2065 | goto pci_map_err; |
2065 | adapter->db = addr; | 2066 | adapter->db = addr; |
2066 | 2067 | ||
2067 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, 1), | 2068 | if (adapter->generation == BE_GEN2) |
2068 | pci_resource_len(adapter->pdev, 1)); | 2069 | pcicfg_reg = 1; |
2070 | else | ||
2071 | pcicfg_reg = 0; | ||
2072 | |||
2073 | addr = ioremap_nocache(pci_resource_start(adapter->pdev, pcicfg_reg), | ||
2074 | pci_resource_len(adapter->pdev, pcicfg_reg)); | ||
2069 | if (addr == NULL) | 2075 | if (addr == NULL) |
2070 | goto pci_map_err; | 2076 | goto pci_map_err; |
2071 | adapter->pcicfg = addr; | 2077 | adapter->pcicfg = addr; |
@@ -2162,6 +2168,7 @@ static int be_stats_init(struct be_adapter *adapter) | |||
2162 | cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); | 2168 | cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); |
2163 | if (cmd->va == NULL) | 2169 | if (cmd->va == NULL) |
2164 | return -1; | 2170 | return -1; |
2171 | memset(cmd->va, 0, cmd->size); | ||
2165 | return 0; | 2172 | return 0; |
2166 | } | 2173 | } |
2167 | 2174 | ||
@@ -2240,6 +2247,20 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
2240 | goto rel_reg; | 2247 | goto rel_reg; |
2241 | } | 2248 | } |
2242 | adapter = netdev_priv(netdev); | 2249 | adapter = netdev_priv(netdev); |
2250 | |||
2251 | switch (pdev->device) { | ||
2252 | case BE_DEVICE_ID1: | ||
2253 | case OC_DEVICE_ID1: | ||
2254 | adapter->generation = BE_GEN2; | ||
2255 | break; | ||
2256 | case BE_DEVICE_ID2: | ||
2257 | case OC_DEVICE_ID2: | ||
2258 | adapter->generation = BE_GEN3; | ||
2259 | break; | ||
2260 | default: | ||
2261 | adapter->generation = 0; | ||
2262 | } | ||
2263 | |||
2243 | adapter->pdev = pdev; | 2264 | adapter->pdev = pdev; |
2244 | pci_set_drvdata(pdev, adapter); | 2265 | pci_set_drvdata(pdev, adapter); |
2245 | adapter->netdev = netdev; | 2266 | adapter->netdev = netdev; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3f0071cfe56b..efa0e41bf3ec 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3639,7 +3639,7 @@ static int bond_open(struct net_device *bond_dev) | |||
3639 | */ | 3639 | */ |
3640 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { | 3640 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { |
3641 | /* something went wrong - fail the open operation */ | 3641 | /* something went wrong - fail the open operation */ |
3642 | return -1; | 3642 | return -ENOMEM; |
3643 | } | 3643 | } |
3644 | 3644 | ||
3645 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); | 3645 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 297a5ddd77f0..2aa71a766c35 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -2117,6 +2117,7 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter, | |||
2117 | /* set time_stamp *before* dma to help avoid a possible race */ | 2117 | /* set time_stamp *before* dma to help avoid a possible race */ |
2118 | buffer_info->time_stamp = jiffies; | 2118 | buffer_info->time_stamp = jiffies; |
2119 | buffer_info->next_to_watch = i; | 2119 | buffer_info->next_to_watch = i; |
2120 | buffer_info->mapped_as_page = false; | ||
2120 | buffer_info->dma = pci_map_single(pdev, skb->data, len, | 2121 | buffer_info->dma = pci_map_single(pdev, skb->data, len, |
2121 | PCI_DMA_TODEVICE); | 2122 | PCI_DMA_TODEVICE); |
2122 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 2123 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 56f37f66b696..dd4883f642be 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -223,7 +223,7 @@ static void ixgbe_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int bwg_id, | |||
223 | 223 | ||
224 | if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] != | 224 | if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] != |
225 | adapter->dcb_cfg.bw_percentage[0][bwg_id]) { | 225 | adapter->dcb_cfg.bw_percentage[0][bwg_id]) { |
226 | adapter->dcb_set_bitmap |= BIT_PG_RX; | 226 | adapter->dcb_set_bitmap |= BIT_PG_TX; |
227 | adapter->dcb_set_bitmap |= BIT_RESETLINK; | 227 | adapter->dcb_set_bitmap |= BIT_RESETLINK; |
228 | } | 228 | } |
229 | } | 229 | } |
@@ -341,6 +341,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
341 | if (!adapter->dcb_set_bitmap) | 341 | if (!adapter->dcb_set_bitmap) |
342 | return DCB_NO_HW_CHG; | 342 | return DCB_NO_HW_CHG; |
343 | 343 | ||
344 | ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, | ||
345 | adapter->ring_feature[RING_F_DCB].indices); | ||
346 | |||
347 | if (ret) | ||
348 | return DCB_NO_HW_CHG; | ||
349 | |||
344 | /* | 350 | /* |
345 | * Only take down the adapter if the configuration change | 351 | * Only take down the adapter if the configuration change |
346 | * requires a reset. | 352 | * requires a reset. |
@@ -359,14 +365,6 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) | |||
359 | } | 365 | } |
360 | } | 366 | } |
361 | 367 | ||
362 | ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, | ||
363 | adapter->ring_feature[RING_F_DCB].indices); | ||
364 | if (ret) { | ||
365 | if (adapter->dcb_set_bitmap & BIT_RESETLINK) | ||
366 | clear_bit(__IXGBE_RESETTING, &adapter->state); | ||
367 | return DCB_NO_HW_CHG; | ||
368 | } | ||
369 | |||
370 | if (adapter->dcb_cfg.pfc_mode_enable) { | 368 | if (adapter->dcb_cfg.pfc_mode_enable) { |
371 | if ((adapter->hw.mac.type != ixgbe_mac_82598EB) && | 369 | if ((adapter->hw.mac.type != ixgbe_mac_82598EB) && |
372 | (adapter->hw.fc.current_mode != ixgbe_fc_pfc)) | 370 | (adapter->hw.fc.current_mode != ixgbe_fc_pfc)) |
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index c146304d8d6c..c0ceebccaa49 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c | |||
@@ -854,8 +854,8 @@ static void ks_update_link_status(struct net_device *netdev, struct ks_net *ks) | |||
854 | 854 | ||
855 | static irqreturn_t ks_irq(int irq, void *pw) | 855 | static irqreturn_t ks_irq(int irq, void *pw) |
856 | { | 856 | { |
857 | struct ks_net *ks = pw; | 857 | struct net_device *netdev = pw; |
858 | struct net_device *netdev = ks->netdev; | 858 | struct ks_net *ks = netdev_priv(netdev); |
859 | u16 status; | 859 | u16 status; |
860 | 860 | ||
861 | /*this should be the first in IRQ handler */ | 861 | /*this should be the first in IRQ handler */ |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 95db60adde41..f9521136a869 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1063,7 +1063,7 @@ static int netdev_open(struct net_device *dev) | |||
1063 | if (retval) { | 1063 | if (retval) { |
1064 | printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n", | 1064 | printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n", |
1065 | FIRMWARE_RX); | 1065 | FIRMWARE_RX); |
1066 | return retval; | 1066 | goto out_init; |
1067 | } | 1067 | } |
1068 | if (fw_rx->size % 4) { | 1068 | if (fw_rx->size % 4) { |
1069 | printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n", | 1069 | printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n", |
@@ -1108,6 +1108,9 @@ out_tx: | |||
1108 | release_firmware(fw_tx); | 1108 | release_firmware(fw_tx); |
1109 | out_rx: | 1109 | out_rx: |
1110 | release_firmware(fw_rx); | 1110 | release_firmware(fw_rx); |
1111 | out_init: | ||
1112 | if (retval) | ||
1113 | netdev_close(dev); | ||
1111 | return retval; | 1114 | return retval; |
1112 | } | 1115 | } |
1113 | 1116 | ||
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 21e183a83b99..4f27f022fbf7 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -419,7 +419,7 @@ static int cdc_manage_power(struct usbnet *dev, int on) | |||
419 | 419 | ||
420 | static const struct driver_info cdc_info = { | 420 | static const struct driver_info cdc_info = { |
421 | .description = "CDC Ethernet Device", | 421 | .description = "CDC Ethernet Device", |
422 | .flags = FLAG_ETHER | FLAG_LINK_INTR, | 422 | .flags = FLAG_ETHER, |
423 | // .check_connect = cdc_check_connect, | 423 | // .check_connect = cdc_check_connect, |
424 | .bind = cdc_bind, | 424 | .bind = cdc_bind, |
425 | .unbind = usbnet_cdc_unbind, | 425 | .unbind = usbnet_cdc_unbind, |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 2ec61f08cfdb..ae371448b5a0 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -855,12 +855,11 @@ static void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) | |||
855 | } | 855 | } |
856 | } | 856 | } |
857 | 857 | ||
858 | static void ath9k_hw_init_11a_eeprom_fix(struct ath_hw *ah) | 858 | static void ath9k_hw_init_eeprom_fix(struct ath_hw *ah) |
859 | { | 859 | { |
860 | u32 i, j; | 860 | u32 i, j; |
861 | 861 | ||
862 | if ((ah->hw_version.devid == AR9280_DEVID_PCI) && | 862 | if (ah->hw_version.devid == AR9280_DEVID_PCI) { |
863 | test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) { | ||
864 | 863 | ||
865 | /* EEPROM Fixup */ | 864 | /* EEPROM Fixup */ |
866 | for (i = 0; i < ah->iniModes.ia_rows; i++) { | 865 | for (i = 0; i < ah->iniModes.ia_rows; i++) { |
@@ -980,7 +979,7 @@ int ath9k_hw_init(struct ath_hw *ah) | |||
980 | if (r) | 979 | if (r) |
981 | return r; | 980 | return r; |
982 | 981 | ||
983 | ath9k_hw_init_11a_eeprom_fix(ah); | 982 | ath9k_hw_init_eeprom_fix(ah); |
984 | 983 | ||
985 | r = ath9k_hw_init_macaddr(ah); | 984 | r = ath9k_hw_init_macaddr(ah); |
986 | if (r) { | 985 | if (r) { |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 996eb90263cc..643bea35686f 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2655,10 +2655,10 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
2655 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { | 2655 | (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) { |
2656 | ath9k_ps_wakeup(sc); | 2656 | ath9k_ps_wakeup(sc); |
2657 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); | 2657 | ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); |
2658 | ath_beacon_return(sc, avp); | ||
2659 | ath9k_ps_restore(sc); | 2658 | ath9k_ps_restore(sc); |
2660 | } | 2659 | } |
2661 | 2660 | ||
2661 | ath_beacon_return(sc, avp); | ||
2662 | sc->sc_flags &= ~SC_OP_BEACONS; | 2662 | sc->sc_flags &= ~SC_OP_BEACONS; |
2663 | 2663 | ||
2664 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { | 2664 | for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index cde09a890b73..90fbdb25399e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -297,7 +297,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, bool is_ap, u8 flags, | |||
297 | } | 297 | } |
298 | EXPORT_SYMBOL(iwl_add_station); | 298 | EXPORT_SYMBOL(iwl_add_station); |
299 | 299 | ||
300 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) | 300 | static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const u8 *addr) |
301 | { | 301 | { |
302 | unsigned long flags; | 302 | unsigned long flags; |
303 | u8 sta_id = iwl_find_station(priv, addr); | 303 | u8 sta_id = iwl_find_station(priv, addr); |
@@ -324,7 +324,7 @@ static void iwl_remove_sta_callback(struct iwl_priv *priv, | |||
324 | { | 324 | { |
325 | struct iwl_rem_sta_cmd *rm_sta = | 325 | struct iwl_rem_sta_cmd *rm_sta = |
326 | (struct iwl_rem_sta_cmd *)cmd->cmd.payload; | 326 | (struct iwl_rem_sta_cmd *)cmd->cmd.payload; |
327 | const char *addr = rm_sta->addr; | 327 | const u8 *addr = rm_sta->addr; |
328 | 328 | ||
329 | if (pkt->hdr.flags & IWL_CMD_FAILED_MSK) { | 329 | if (pkt->hdr.flags & IWL_CMD_FAILED_MSK) { |
330 | IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", | 330 | IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", |
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c index 3a7be11cc6b9..812c66755083 100644 --- a/drivers/rtc/rtc-fm3130.c +++ b/drivers/rtc/rtc-fm3130.c | |||
@@ -376,20 +376,22 @@ static int __devinit fm3130_probe(struct i2c_client *client, | |||
376 | } | 376 | } |
377 | 377 | ||
378 | /* Disabling calibration mode */ | 378 | /* Disabling calibration mode */ |
379 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL) | 379 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL) { |
380 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, | 380 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, |
381 | fm3130->regs[FM3130_RTC_CONTROL] & | 381 | fm3130->regs[FM3130_RTC_CONTROL] & |
382 | ~(FM3130_RTC_CONTROL_BIT_CAL)); | 382 | ~(FM3130_RTC_CONTROL_BIT_CAL)); |
383 | dev_warn(&client->dev, "Disabling calibration mode!\n"); | 383 | dev_warn(&client->dev, "Disabling calibration mode!\n"); |
384 | } | ||
384 | 385 | ||
385 | /* Disabling read and write modes */ | 386 | /* Disabling read and write modes */ |
386 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_WRITE || | 387 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_WRITE || |
387 | fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ) | 388 | fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ) { |
388 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, | 389 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, |
389 | fm3130->regs[FM3130_RTC_CONTROL] & | 390 | fm3130->regs[FM3130_RTC_CONTROL] & |
390 | ~(FM3130_RTC_CONTROL_BIT_READ | | 391 | ~(FM3130_RTC_CONTROL_BIT_READ | |
391 | FM3130_RTC_CONTROL_BIT_WRITE)); | 392 | FM3130_RTC_CONTROL_BIT_WRITE)); |
392 | dev_warn(&client->dev, "Disabling READ or WRITE mode!\n"); | 393 | dev_warn(&client->dev, "Disabling READ or WRITE mode!\n"); |
394 | } | ||
393 | 395 | ||
394 | /* oscillator off? turn it on, so clock can tick. */ | 396 | /* oscillator off? turn it on, so clock can tick. */ |
395 | if (fm3130->regs[FM3130_CAL_CONTROL] & FM3130_CAL_CONTROL_BIT_nOSCEN) | 397 | if (fm3130->regs[FM3130_CAL_CONTROL] & FM3130_CAL_CONTROL_BIT_nOSCEN) |
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index 377f2712289e..ab2ab3c81834 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c | |||
@@ -394,7 +394,7 @@ static void ulite_console_write(struct console *co, const char *s, | |||
394 | spin_unlock_irqrestore(&port->lock, flags); | 394 | spin_unlock_irqrestore(&port->lock, flags); |
395 | } | 395 | } |
396 | 396 | ||
397 | static int __init ulite_console_setup(struct console *co, char *options) | 397 | static int __devinit ulite_console_setup(struct console *co, char *options) |
398 | { | 398 | { |
399 | struct uart_port *port; | 399 | struct uart_port *port; |
400 | int baud = 9600; | 400 | int baud = 9600; |
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 0ceec123ddfd..bee558aed427 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -35,7 +35,9 @@ | |||
35 | #include <linux/usb.h> | 35 | #include <linux/usb.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/mm.h> | ||
38 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
40 | #include <asm/cacheflush.h> | ||
39 | 41 | ||
40 | #include "../core/hcd.h" | 42 | #include "../core/hcd.h" |
41 | #include "r8a66597.h" | 43 | #include "r8a66597.h" |
@@ -820,6 +822,26 @@ static void enable_r8a66597_pipe(struct r8a66597 *r8a66597, struct urb *urb, | |||
820 | enable_r8a66597_pipe_dma(r8a66597, dev, pipe, urb); | 822 | enable_r8a66597_pipe_dma(r8a66597, dev, pipe, urb); |
821 | } | 823 | } |
822 | 824 | ||
825 | static void r8a66597_urb_done(struct r8a66597 *r8a66597, struct urb *urb, | ||
826 | int status) | ||
827 | __releases(r8a66597->lock) | ||
828 | __acquires(r8a66597->lock) | ||
829 | { | ||
830 | if (usb_pipein(urb->pipe) && usb_pipetype(urb->pipe) != PIPE_CONTROL) { | ||
831 | void *ptr; | ||
832 | |||
833 | for (ptr = urb->transfer_buffer; | ||
834 | ptr < urb->transfer_buffer + urb->transfer_buffer_length; | ||
835 | ptr += PAGE_SIZE) | ||
836 | flush_dcache_page(virt_to_page(ptr)); | ||
837 | } | ||
838 | |||
839 | usb_hcd_unlink_urb_from_ep(r8a66597_to_hcd(r8a66597), urb); | ||
840 | spin_unlock(&r8a66597->lock); | ||
841 | usb_hcd_giveback_urb(r8a66597_to_hcd(r8a66597), urb, status); | ||
842 | spin_lock(&r8a66597->lock); | ||
843 | } | ||
844 | |||
823 | /* this function must be called with interrupt disabled */ | 845 | /* this function must be called with interrupt disabled */ |
824 | static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address) | 846 | static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address) |
825 | { | 847 | { |
@@ -838,15 +860,9 @@ static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address) | |||
838 | list_del(&td->queue); | 860 | list_del(&td->queue); |
839 | kfree(td); | 861 | kfree(td); |
840 | 862 | ||
841 | if (urb) { | 863 | if (urb) |
842 | usb_hcd_unlink_urb_from_ep(r8a66597_to_hcd(r8a66597), | 864 | r8a66597_urb_done(r8a66597, urb, -ENODEV); |
843 | urb); | ||
844 | 865 | ||
845 | spin_unlock(&r8a66597->lock); | ||
846 | usb_hcd_giveback_urb(r8a66597_to_hcd(r8a66597), urb, | ||
847 | -ENODEV); | ||
848 | spin_lock(&r8a66597->lock); | ||
849 | } | ||
850 | break; | 866 | break; |
851 | } | 867 | } |
852 | } | 868 | } |
@@ -1006,6 +1022,8 @@ static void start_root_hub_sampling(struct r8a66597 *r8a66597, int port, | |||
1006 | /* this function must be called with interrupt disabled */ | 1022 | /* this function must be called with interrupt disabled */ |
1007 | static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, | 1023 | static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, |
1008 | u16 syssts) | 1024 | u16 syssts) |
1025 | __releases(r8a66597->lock) | ||
1026 | __acquires(r8a66597->lock) | ||
1009 | { | 1027 | { |
1010 | if (syssts == SE0) { | 1028 | if (syssts == SE0) { |
1011 | r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port)); | 1029 | r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port)); |
@@ -1023,7 +1041,9 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, | |||
1023 | usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597)); | 1041 | usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597)); |
1024 | } | 1042 | } |
1025 | 1043 | ||
1044 | spin_unlock(&r8a66597->lock); | ||
1026 | usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597)); | 1045 | usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597)); |
1046 | spin_lock(&r8a66597->lock); | ||
1027 | } | 1047 | } |
1028 | 1048 | ||
1029 | /* this function must be called with interrupt disabled */ | 1049 | /* this function must be called with interrupt disabled */ |
@@ -1283,10 +1303,7 @@ __releases(r8a66597->lock) __acquires(r8a66597->lock) | |||
1283 | if (usb_pipeisoc(urb->pipe)) | 1303 | if (usb_pipeisoc(urb->pipe)) |
1284 | urb->start_frame = r8a66597_get_frame(hcd); | 1304 | urb->start_frame = r8a66597_get_frame(hcd); |
1285 | 1305 | ||
1286 | usb_hcd_unlink_urb_from_ep(r8a66597_to_hcd(r8a66597), urb); | 1306 | r8a66597_urb_done(r8a66597, urb, status); |
1287 | spin_unlock(&r8a66597->lock); | ||
1288 | usb_hcd_giveback_urb(hcd, urb, status); | ||
1289 | spin_lock(&r8a66597->lock); | ||
1290 | } | 1307 | } |
1291 | 1308 | ||
1292 | if (restart) { | 1309 | if (restart) { |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 66358fa825f3..b4b6deceed15 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
593 | */ | 593 | */ |
594 | static int imxfb_suspend(struct platform_device *dev, pm_message_t state) | 594 | static int imxfb_suspend(struct platform_device *dev, pm_message_t state) |
595 | { | 595 | { |
596 | struct imxfb_info *fbi = platform_get_drvdata(dev); | 596 | struct fb_info *info = platform_get_drvdata(dev); |
597 | struct imxfb_info *fbi = info->par; | ||
597 | 598 | ||
598 | pr_debug("%s\n", __func__); | 599 | pr_debug("%s\n", __func__); |
599 | 600 | ||
@@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state) | |||
603 | 604 | ||
604 | static int imxfb_resume(struct platform_device *dev) | 605 | static int imxfb_resume(struct platform_device *dev) |
605 | { | 606 | { |
606 | struct imxfb_info *fbi = platform_get_drvdata(dev); | 607 | struct fb_info *info = platform_get_drvdata(dev); |
608 | struct imxfb_info *fbi = info->par; | ||
607 | 609 | ||
608 | pr_debug("%s\n", __func__); | 610 | pr_debug("%s\n", __func__); |
609 | 611 | ||
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index 054ef29be479..772ba3f45e6f 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c | |||
@@ -324,8 +324,11 @@ static void sdc_enable_channel(struct mx3fb_info *mx3_fbi) | |||
324 | unsigned long flags; | 324 | unsigned long flags; |
325 | dma_cookie_t cookie; | 325 | dma_cookie_t cookie; |
326 | 326 | ||
327 | dev_dbg(mx3fb->dev, "mx3fbi %p, desc %p, sg %p\n", mx3_fbi, | 327 | if (mx3_fbi->txd) |
328 | to_tx_desc(mx3_fbi->txd), to_tx_desc(mx3_fbi->txd)->sg); | 328 | dev_dbg(mx3fb->dev, "mx3fbi %p, desc %p, sg %p\n", mx3_fbi, |
329 | to_tx_desc(mx3_fbi->txd), to_tx_desc(mx3_fbi->txd)->sg); | ||
330 | else | ||
331 | dev_dbg(mx3fb->dev, "mx3fbi %p, txd = NULL\n", mx3_fbi); | ||
329 | 332 | ||
330 | /* This enables the channel */ | 333 | /* This enables the channel */ |
331 | if (mx3_fbi->cookie < 0) { | 334 | if (mx3_fbi->cookie < 0) { |
@@ -646,6 +649,7 @@ static int sdc_set_global_alpha(struct mx3fb_data *mx3fb, bool enable, uint8_t a | |||
646 | 649 | ||
647 | static void sdc_set_brightness(struct mx3fb_data *mx3fb, uint8_t value) | 650 | static void sdc_set_brightness(struct mx3fb_data *mx3fb, uint8_t value) |
648 | { | 651 | { |
652 | dev_dbg(mx3fb->dev, "%s: value = %d\n", __func__, value); | ||
649 | /* This might be board-specific */ | 653 | /* This might be board-specific */ |
650 | mx3fb_write_reg(mx3fb, 0x03000000UL | value << 16, SDC_PWM_CTRL); | 654 | mx3fb_write_reg(mx3fb, 0x03000000UL | value << 16, SDC_PWM_CTRL); |
651 | return; | 655 | return; |
@@ -1486,12 +1490,12 @@ static int mx3fb_probe(struct platform_device *pdev) | |||
1486 | goto ersdc0; | 1490 | goto ersdc0; |
1487 | } | 1491 | } |
1488 | 1492 | ||
1493 | mx3fb->backlight_level = 255; | ||
1494 | |||
1489 | ret = init_fb_chan(mx3fb, to_idmac_chan(chan)); | 1495 | ret = init_fb_chan(mx3fb, to_idmac_chan(chan)); |
1490 | if (ret < 0) | 1496 | if (ret < 0) |
1491 | goto eisdc0; | 1497 | goto eisdc0; |
1492 | 1498 | ||
1493 | mx3fb->backlight_level = 255; | ||
1494 | |||
1495 | return 0; | 1499 | return 0; |
1496 | 1500 | ||
1497 | eisdc0: | 1501 | eisdc0: |
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index 49a34e7f7306..a16f29e888cd 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c | |||
@@ -61,7 +61,7 @@ static inline unsigned int vecs_to_idx(unsigned int nr) | |||
61 | 61 | ||
62 | static inline int use_bip_pool(unsigned int idx) | 62 | static inline int use_bip_pool(unsigned int idx) |
63 | { | 63 | { |
64 | if (idx == BIOVEC_NR_POOLS) | 64 | if (idx == BIOVEC_MAX_IDX) |
65 | return 1; | 65 | return 1; |
66 | 66 | ||
67 | return 0; | 67 | return 0; |
@@ -95,6 +95,7 @@ struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *bio, | |||
95 | 95 | ||
96 | /* Use mempool if lower order alloc failed or max vecs were requested */ | 96 | /* Use mempool if lower order alloc failed or max vecs were requested */ |
97 | if (bip == NULL) { | 97 | if (bip == NULL) { |
98 | idx = BIOVEC_MAX_IDX; /* so we free the payload properly later */ | ||
98 | bip = mempool_alloc(bs->bio_integrity_pool, gfp_mask); | 99 | bip = mempool_alloc(bs->bio_integrity_pool, gfp_mask); |
99 | 100 | ||
100 | if (unlikely(bip == NULL)) { | 101 | if (unlikely(bip == NULL)) { |
@@ -542,13 +542,18 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page | |||
542 | 542 | ||
543 | if (page == prev->bv_page && | 543 | if (page == prev->bv_page && |
544 | offset == prev->bv_offset + prev->bv_len) { | 544 | offset == prev->bv_offset + prev->bv_len) { |
545 | unsigned int prev_bv_len = prev->bv_len; | ||
545 | prev->bv_len += len; | 546 | prev->bv_len += len; |
546 | 547 | ||
547 | if (q->merge_bvec_fn) { | 548 | if (q->merge_bvec_fn) { |
548 | struct bvec_merge_data bvm = { | 549 | struct bvec_merge_data bvm = { |
550 | /* prev_bvec is already charged in | ||
551 | bi_size, discharge it in order to | ||
552 | simulate merging updated prev_bvec | ||
553 | as new bvec. */ | ||
549 | .bi_bdev = bio->bi_bdev, | 554 | .bi_bdev = bio->bi_bdev, |
550 | .bi_sector = bio->bi_sector, | 555 | .bi_sector = bio->bi_sector, |
551 | .bi_size = bio->bi_size, | 556 | .bi_size = bio->bi_size - prev_bv_len, |
552 | .bi_rw = bio->bi_rw, | 557 | .bi_rw = bio->bi_rw, |
553 | }; | 558 | }; |
554 | 559 | ||
@@ -961,6 +961,11 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
961 | goto out; | 961 | goto out; |
962 | 962 | ||
963 | bprm->mm = NULL; /* We're using it now */ | 963 | bprm->mm = NULL; /* We're using it now */ |
964 | |||
965 | current->flags &= ~PF_RANDOMIZE; | ||
966 | flush_thread(); | ||
967 | current->personality &= ~bprm->per_clear; | ||
968 | |||
964 | return 0; | 969 | return 0; |
965 | 970 | ||
966 | out: | 971 | out: |
@@ -997,9 +1002,6 @@ void setup_new_exec(struct linux_binprm * bprm) | |||
997 | tcomm[i] = '\0'; | 1002 | tcomm[i] = '\0'; |
998 | set_task_comm(current, tcomm); | 1003 | set_task_comm(current, tcomm); |
999 | 1004 | ||
1000 | current->flags &= ~PF_RANDOMIZE; | ||
1001 | flush_thread(); | ||
1002 | |||
1003 | /* Set the new mm task size. We have to do that late because it may | 1005 | /* Set the new mm task size. We have to do that late because it may |
1004 | * depend on TIF_32BIT which is only updated in flush_thread() on | 1006 | * depend on TIF_32BIT which is only updated in flush_thread() on |
1005 | * some architectures like powerpc | 1007 | * some architectures like powerpc |
@@ -1015,8 +1017,6 @@ void setup_new_exec(struct linux_binprm * bprm) | |||
1015 | set_dumpable(current->mm, suid_dumpable); | 1017 | set_dumpable(current->mm, suid_dumpable); |
1016 | } | 1018 | } |
1017 | 1019 | ||
1018 | current->personality &= ~bprm->per_clear; | ||
1019 | |||
1020 | /* | 1020 | /* |
1021 | * Flush performance counters when crossing a | 1021 | * Flush performance counters when crossing a |
1022 | * security domain: | 1022 | * security domain: |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c18913a777ae..a9f5e137f1d3 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -828,6 +828,9 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req, | |||
828 | if (!page) | 828 | if (!page) |
829 | break; | 829 | break; |
830 | 830 | ||
831 | if (mapping_writably_mapped(mapping)) | ||
832 | flush_dcache_page(page); | ||
833 | |||
831 | pagefault_disable(); | 834 | pagefault_disable(); |
832 | tmp = iov_iter_copy_from_user_atomic(page, ii, offset, bytes); | 835 | tmp = iov_iter_copy_from_user_atomic(page, ii, offset, bytes); |
833 | pagefault_enable(); | 836 | pagefault_enable(); |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f455a03a09e2..f42663325931 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -769,6 +769,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
769 | if (!gl) | 769 | if (!gl) |
770 | return -ENOMEM; | 770 | return -ENOMEM; |
771 | 771 | ||
772 | atomic_inc(&sdp->sd_glock_disposal); | ||
772 | gl->gl_flags = 0; | 773 | gl->gl_flags = 0; |
773 | gl->gl_name = name; | 774 | gl->gl_name = name; |
774 | atomic_set(&gl->gl_ref, 1); | 775 | atomic_set(&gl->gl_ref, 1); |
@@ -1538,6 +1539,9 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp) | |||
1538 | up_write(&gfs2_umount_flush_sem); | 1539 | up_write(&gfs2_umount_flush_sem); |
1539 | msleep(10); | 1540 | msleep(10); |
1540 | } | 1541 | } |
1542 | flush_workqueue(glock_workqueue); | ||
1543 | wait_event(sdp->sd_glock_wait, atomic_read(&sdp->sd_glock_disposal) == 0); | ||
1544 | gfs2_dump_lockstate(sdp); | ||
1541 | } | 1545 | } |
1542 | 1546 | ||
1543 | void gfs2_glock_finish_truncate(struct gfs2_inode *ip) | 1547 | void gfs2_glock_finish_truncate(struct gfs2_inode *ip) |
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 13f0bd228132..c0262faf4725 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h | |||
@@ -123,7 +123,7 @@ struct lm_lockops { | |||
123 | int (*lm_mount) (struct gfs2_sbd *sdp, const char *fsname); | 123 | int (*lm_mount) (struct gfs2_sbd *sdp, const char *fsname); |
124 | void (*lm_unmount) (struct gfs2_sbd *sdp); | 124 | void (*lm_unmount) (struct gfs2_sbd *sdp); |
125 | void (*lm_withdraw) (struct gfs2_sbd *sdp); | 125 | void (*lm_withdraw) (struct gfs2_sbd *sdp); |
126 | void (*lm_put_lock) (struct kmem_cache *cachep, void *gl); | 126 | void (*lm_put_lock) (struct kmem_cache *cachep, struct gfs2_glock *gl); |
127 | unsigned int (*lm_lock) (struct gfs2_glock *gl, | 127 | unsigned int (*lm_lock) (struct gfs2_glock *gl, |
128 | unsigned int req_state, unsigned int flags); | 128 | unsigned int req_state, unsigned int flags); |
129 | void (*lm_cancel) (struct gfs2_glock *gl); | 129 | void (*lm_cancel) (struct gfs2_glock *gl); |
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 4792200978c8..bc0ad158e6b4 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -544,6 +544,8 @@ struct gfs2_sbd { | |||
544 | struct gfs2_holder sd_live_gh; | 544 | struct gfs2_holder sd_live_gh; |
545 | struct gfs2_glock *sd_rename_gl; | 545 | struct gfs2_glock *sd_rename_gl; |
546 | struct gfs2_glock *sd_trans_gl; | 546 | struct gfs2_glock *sd_trans_gl; |
547 | wait_queue_head_t sd_glock_wait; | ||
548 | atomic_t sd_glock_disposal; | ||
547 | 549 | ||
548 | /* Inode Stuff */ | 550 | /* Inode Stuff */ |
549 | 551 | ||
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 46df988323bc..0e5e0e7022e5 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -21,6 +21,7 @@ static void gdlm_ast(void *arg) | |||
21 | { | 21 | { |
22 | struct gfs2_glock *gl = arg; | 22 | struct gfs2_glock *gl = arg; |
23 | unsigned ret = gl->gl_state; | 23 | unsigned ret = gl->gl_state; |
24 | struct gfs2_sbd *sdp = gl->gl_sbd; | ||
24 | 25 | ||
25 | BUG_ON(gl->gl_lksb.sb_flags & DLM_SBF_DEMOTED); | 26 | BUG_ON(gl->gl_lksb.sb_flags & DLM_SBF_DEMOTED); |
26 | 27 | ||
@@ -30,6 +31,8 @@ static void gdlm_ast(void *arg) | |||
30 | switch (gl->gl_lksb.sb_status) { | 31 | switch (gl->gl_lksb.sb_status) { |
31 | case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */ | 32 | case -DLM_EUNLOCK: /* Unlocked, so glock can be freed */ |
32 | kmem_cache_free(gfs2_glock_cachep, gl); | 33 | kmem_cache_free(gfs2_glock_cachep, gl); |
34 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
35 | wake_up(&sdp->sd_glock_wait); | ||
33 | return; | 36 | return; |
34 | case -DLM_ECANCEL: /* Cancel while getting lock */ | 37 | case -DLM_ECANCEL: /* Cancel while getting lock */ |
35 | ret |= LM_OUT_CANCELED; | 38 | ret |= LM_OUT_CANCELED; |
@@ -164,14 +167,16 @@ static unsigned int gdlm_lock(struct gfs2_glock *gl, | |||
164 | return LM_OUT_ASYNC; | 167 | return LM_OUT_ASYNC; |
165 | } | 168 | } |
166 | 169 | ||
167 | static void gdlm_put_lock(struct kmem_cache *cachep, void *ptr) | 170 | static void gdlm_put_lock(struct kmem_cache *cachep, struct gfs2_glock *gl) |
168 | { | 171 | { |
169 | struct gfs2_glock *gl = ptr; | 172 | struct gfs2_sbd *sdp = gl->gl_sbd; |
170 | struct lm_lockstruct *ls = &gl->gl_sbd->sd_lockstruct; | 173 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; |
171 | int error; | 174 | int error; |
172 | 175 | ||
173 | if (gl->gl_lksb.sb_lkid == 0) { | 176 | if (gl->gl_lksb.sb_lkid == 0) { |
174 | kmem_cache_free(cachep, gl); | 177 | kmem_cache_free(cachep, gl); |
178 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
179 | wake_up(&sdp->sd_glock_wait); | ||
175 | return; | 180 | return; |
176 | } | 181 | } |
177 | 182 | ||
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index edfee24f3636..8a102f731003 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -82,6 +82,8 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) | |||
82 | 82 | ||
83 | gfs2_tune_init(&sdp->sd_tune); | 83 | gfs2_tune_init(&sdp->sd_tune); |
84 | 84 | ||
85 | init_waitqueue_head(&sdp->sd_glock_wait); | ||
86 | atomic_set(&sdp->sd_glock_disposal, 0); | ||
85 | spin_lock_init(&sdp->sd_statfs_spin); | 87 | spin_lock_init(&sdp->sd_statfs_spin); |
86 | 88 | ||
87 | spin_lock_init(&sdp->sd_rindex_spin); | 89 | spin_lock_init(&sdp->sd_rindex_spin); |
@@ -983,9 +985,17 @@ static const match_table_t nolock_tokens = { | |||
983 | { Opt_err, NULL }, | 985 | { Opt_err, NULL }, |
984 | }; | 986 | }; |
985 | 987 | ||
988 | static void nolock_put_lock(struct kmem_cache *cachep, struct gfs2_glock *gl) | ||
989 | { | ||
990 | struct gfs2_sbd *sdp = gl->gl_sbd; | ||
991 | kmem_cache_free(cachep, gl); | ||
992 | if (atomic_dec_and_test(&sdp->sd_glock_disposal)) | ||
993 | wake_up(&sdp->sd_glock_wait); | ||
994 | } | ||
995 | |||
986 | static const struct lm_lockops nolock_ops = { | 996 | static const struct lm_lockops nolock_ops = { |
987 | .lm_proto_name = "lock_nolock", | 997 | .lm_proto_name = "lock_nolock", |
988 | .lm_put_lock = kmem_cache_free, | 998 | .lm_put_lock = nolock_put_lock, |
989 | .lm_tokens = &nolock_tokens, | 999 | .lm_tokens = &nolock_tokens, |
990 | }; | 1000 | }; |
991 | 1001 | ||
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 78f73ca1ef3e..84350e1be66d 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -1088,7 +1088,8 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
1088 | error = vfs_follow_link(nd, buf); | 1088 | error = vfs_follow_link(nd, buf); |
1089 | if (buf != array) | 1089 | if (buf != array) |
1090 | kfree(buf); | 1090 | kfree(buf); |
1091 | } | 1091 | } else |
1092 | path_put(&nd->path); | ||
1092 | 1093 | ||
1093 | return ERR_PTR(error); | 1094 | return ERR_PTR(error); |
1094 | } | 1095 | } |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 0608f490c295..503b842f3ba2 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -591,11 +591,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) | |||
591 | u64 rgrp_count = ip->i_disksize; | 591 | u64 rgrp_count = ip->i_disksize; |
592 | int error; | 592 | int error; |
593 | 593 | ||
594 | if (do_div(rgrp_count, sizeof(struct gfs2_rindex))) { | 594 | do_div(rgrp_count, sizeof(struct gfs2_rindex)); |
595 | gfs2_consist_inode(ip); | ||
596 | return -EIO; | ||
597 | } | ||
598 | |||
599 | clear_rgrpdi(sdp); | 595 | clear_rgrpdi(sdp); |
600 | 596 | ||
601 | file_ra_state_init(&ra_state, inode->i_mapping); | 597 | file_ra_state_init(&ra_state, inode->i_mapping); |
@@ -915,7 +911,7 @@ void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd) | |||
915 | struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip) | 911 | struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip) |
916 | { | 912 | { |
917 | BUG_ON(ip->i_alloc != NULL); | 913 | BUG_ON(ip->i_alloc != NULL); |
918 | ip->i_alloc = kzalloc(sizeof(struct gfs2_alloc), GFP_KERNEL); | 914 | ip->i_alloc = kzalloc(sizeof(struct gfs2_alloc), GFP_NOFS); |
919 | return ip->i_alloc; | 915 | return ip->i_alloc; |
920 | } | 916 | } |
921 | 917 | ||
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index c282ad41f3d1..b9dd3da22c0a 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/gfs2_ondisk.h> | 21 | #include <linux/gfs2_ondisk.h> |
22 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/wait.h> | ||
24 | 25 | ||
25 | #include "gfs2.h" | 26 | #include "gfs2.h" |
26 | #include "incore.h" | 27 | #include "incore.h" |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 6b891328f332..63f2071d6445 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -486,6 +486,8 @@ static int nfs_release_page(struct page *page, gfp_t gfp) | |||
486 | { | 486 | { |
487 | dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); | 487 | dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); |
488 | 488 | ||
489 | if (gfp & __GFP_WAIT) | ||
490 | nfs_wb_page(page->mapping->host, page); | ||
489 | /* If PagePrivate() is set, then the page is not freeable */ | 491 | /* If PagePrivate() is set, then the page is not freeable */ |
490 | if (PagePrivate(page)) | 492 | if (PagePrivate(page)) |
491 | return 0; | 493 | return 0; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index faa091865ad0..f141bde7756a 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1261,8 +1261,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1261 | 1261 | ||
1262 | if (fattr->valid & NFS_ATTR_FATTR_MODE) { | 1262 | if (fattr->valid & NFS_ATTR_FATTR_MODE) { |
1263 | if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO)) { | 1263 | if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO)) { |
1264 | umode_t newmode = inode->i_mode & S_IFMT; | ||
1265 | newmode |= fattr->mode & S_IALLUGO; | ||
1266 | inode->i_mode = newmode; | ||
1264 | invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; | 1267 | invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; |
1265 | inode->i_mode = fattr->mode; | ||
1266 | } | 1268 | } |
1267 | } else if (server->caps & NFS_CAP_MODE) | 1269 | } else if (server->caps & NFS_CAP_MODE) |
1268 | invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR | 1270 | invalid |= save_cache_validity & (NFS_INO_INVALID_ATTR |
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 865265bdca03..0c6fda33d66e 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -146,6 +146,7 @@ enum { | |||
146 | NFS_O_RDWR_STATE, /* OPEN stateid has read/write state */ | 146 | NFS_O_RDWR_STATE, /* OPEN stateid has read/write state */ |
147 | NFS_STATE_RECLAIM_REBOOT, /* OPEN stateid server rebooted */ | 147 | NFS_STATE_RECLAIM_REBOOT, /* OPEN stateid server rebooted */ |
148 | NFS_STATE_RECLAIM_NOGRACE, /* OPEN stateid needs to recover state */ | 148 | NFS_STATE_RECLAIM_NOGRACE, /* OPEN stateid needs to recover state */ |
149 | NFS_STATE_POSIX_LOCKS, /* Posix locks are supported */ | ||
149 | }; | 150 | }; |
150 | 151 | ||
151 | struct nfs4_state { | 152 | struct nfs4_state { |
@@ -277,6 +278,7 @@ extern void nfs4_state_set_mode_locked(struct nfs4_state *, fmode_t); | |||
277 | extern void nfs4_schedule_state_recovery(struct nfs_client *); | 278 | extern void nfs4_schedule_state_recovery(struct nfs_client *); |
278 | extern void nfs4_schedule_state_manager(struct nfs_client *); | 279 | extern void nfs4_schedule_state_manager(struct nfs_client *); |
279 | extern int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state); | 280 | extern int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state); |
281 | extern int nfs4_state_mark_reclaim_reboot(struct nfs_client *clp, struct nfs4_state *state); | ||
280 | extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags); | 282 | extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags); |
281 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); | 283 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); |
282 | extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); | 284 | extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 198d51d17c13..375f0fae2c6a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -249,19 +249,15 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, | |||
249 | if (state == NULL) | 249 | if (state == NULL) |
250 | break; | 250 | break; |
251 | nfs4_state_mark_reclaim_nograce(clp, state); | 251 | nfs4_state_mark_reclaim_nograce(clp, state); |
252 | case -NFS4ERR_STALE_CLIENTID: | 252 | goto do_state_recovery; |
253 | case -NFS4ERR_STALE_STATEID: | 253 | case -NFS4ERR_STALE_STATEID: |
254 | case -NFS4ERR_EXPIRED: | 254 | if (state == NULL) |
255 | nfs4_schedule_state_recovery(clp); | ||
256 | ret = nfs4_wait_clnt_recover(clp); | ||
257 | if (ret == 0) | ||
258 | exception->retry = 1; | ||
259 | #if !defined(CONFIG_NFS_V4_1) | ||
260 | break; | ||
261 | #else /* !defined(CONFIG_NFS_V4_1) */ | ||
262 | if (!nfs4_has_session(server->nfs_client)) | ||
263 | break; | 255 | break; |
264 | /* FALLTHROUGH */ | 256 | nfs4_state_mark_reclaim_reboot(clp, state); |
257 | case -NFS4ERR_STALE_CLIENTID: | ||
258 | case -NFS4ERR_EXPIRED: | ||
259 | goto do_state_recovery; | ||
260 | #if defined(CONFIG_NFS_V4_1) | ||
265 | case -NFS4ERR_BADSESSION: | 261 | case -NFS4ERR_BADSESSION: |
266 | case -NFS4ERR_BADSLOT: | 262 | case -NFS4ERR_BADSLOT: |
267 | case -NFS4ERR_BAD_HIGH_SLOT: | 263 | case -NFS4ERR_BAD_HIGH_SLOT: |
@@ -274,7 +270,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, | |||
274 | nfs4_schedule_state_recovery(clp); | 270 | nfs4_schedule_state_recovery(clp); |
275 | exception->retry = 1; | 271 | exception->retry = 1; |
276 | break; | 272 | break; |
277 | #endif /* !defined(CONFIG_NFS_V4_1) */ | 273 | #endif /* defined(CONFIG_NFS_V4_1) */ |
278 | case -NFS4ERR_FILE_OPEN: | 274 | case -NFS4ERR_FILE_OPEN: |
279 | if (exception->timeout > HZ) { | 275 | if (exception->timeout > HZ) { |
280 | /* We have retried a decent amount, time to | 276 | /* We have retried a decent amount, time to |
@@ -293,6 +289,12 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, | |||
293 | } | 289 | } |
294 | /* We failed to handle the error */ | 290 | /* We failed to handle the error */ |
295 | return nfs4_map_errors(ret); | 291 | return nfs4_map_errors(ret); |
292 | do_state_recovery: | ||
293 | nfs4_schedule_state_recovery(clp); | ||
294 | ret = nfs4_wait_clnt_recover(clp); | ||
295 | if (ret == 0) | ||
296 | exception->retry = 1; | ||
297 | return ret; | ||
296 | } | 298 | } |
297 | 299 | ||
298 | 300 | ||
@@ -1658,6 +1660,8 @@ static int _nfs4_do_open(struct inode *dir, struct path *path, fmode_t fmode, in | |||
1658 | status = PTR_ERR(state); | 1660 | status = PTR_ERR(state); |
1659 | if (IS_ERR(state)) | 1661 | if (IS_ERR(state)) |
1660 | goto err_opendata_put; | 1662 | goto err_opendata_put; |
1663 | if ((opendata->o_res.rflags & NFS4_OPEN_RESULT_LOCKTYPE_POSIX) != 0) | ||
1664 | set_bit(NFS_STATE_POSIX_LOCKS, &state->flags); | ||
1661 | nfs4_opendata_put(opendata); | 1665 | nfs4_opendata_put(opendata); |
1662 | nfs4_put_state_owner(sp); | 1666 | nfs4_put_state_owner(sp); |
1663 | *res = state; | 1667 | *res = state; |
@@ -3422,15 +3426,14 @@ _nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3422 | if (state == NULL) | 3426 | if (state == NULL) |
3423 | break; | 3427 | break; |
3424 | nfs4_state_mark_reclaim_nograce(clp, state); | 3428 | nfs4_state_mark_reclaim_nograce(clp, state); |
3425 | case -NFS4ERR_STALE_CLIENTID: | 3429 | goto do_state_recovery; |
3426 | case -NFS4ERR_STALE_STATEID: | 3430 | case -NFS4ERR_STALE_STATEID: |
3431 | if (state == NULL) | ||
3432 | break; | ||
3433 | nfs4_state_mark_reclaim_reboot(clp, state); | ||
3434 | case -NFS4ERR_STALE_CLIENTID: | ||
3427 | case -NFS4ERR_EXPIRED: | 3435 | case -NFS4ERR_EXPIRED: |
3428 | rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); | 3436 | goto do_state_recovery; |
3429 | nfs4_schedule_state_recovery(clp); | ||
3430 | if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) | ||
3431 | rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); | ||
3432 | task->tk_status = 0; | ||
3433 | return -EAGAIN; | ||
3434 | #if defined(CONFIG_NFS_V4_1) | 3437 | #if defined(CONFIG_NFS_V4_1) |
3435 | case -NFS4ERR_BADSESSION: | 3438 | case -NFS4ERR_BADSESSION: |
3436 | case -NFS4ERR_BADSLOT: | 3439 | case -NFS4ERR_BADSLOT: |
@@ -3458,6 +3461,13 @@ _nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3458 | } | 3461 | } |
3459 | task->tk_status = nfs4_map_errors(task->tk_status); | 3462 | task->tk_status = nfs4_map_errors(task->tk_status); |
3460 | return 0; | 3463 | return 0; |
3464 | do_state_recovery: | ||
3465 | rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); | ||
3466 | nfs4_schedule_state_recovery(clp); | ||
3467 | if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) | ||
3468 | rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); | ||
3469 | task->tk_status = 0; | ||
3470 | return -EAGAIN; | ||
3461 | } | 3471 | } |
3462 | 3472 | ||
3463 | static int | 3473 | static int |
@@ -4088,6 +4098,28 @@ static const struct rpc_call_ops nfs4_recover_lock_ops = { | |||
4088 | .rpc_release = nfs4_lock_release, | 4098 | .rpc_release = nfs4_lock_release, |
4089 | }; | 4099 | }; |
4090 | 4100 | ||
4101 | static void nfs4_handle_setlk_error(struct nfs_server *server, struct nfs4_lock_state *lsp, int new_lock_owner, int error) | ||
4102 | { | ||
4103 | struct nfs_client *clp = server->nfs_client; | ||
4104 | struct nfs4_state *state = lsp->ls_state; | ||
4105 | |||
4106 | switch (error) { | ||
4107 | case -NFS4ERR_ADMIN_REVOKED: | ||
4108 | case -NFS4ERR_BAD_STATEID: | ||
4109 | case -NFS4ERR_EXPIRED: | ||
4110 | if (new_lock_owner != 0 || | ||
4111 | (lsp->ls_flags & NFS_LOCK_INITIALIZED) != 0) | ||
4112 | nfs4_state_mark_reclaim_nograce(clp, state); | ||
4113 | lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; | ||
4114 | break; | ||
4115 | case -NFS4ERR_STALE_STATEID: | ||
4116 | if (new_lock_owner != 0 || | ||
4117 | (lsp->ls_flags & NFS_LOCK_INITIALIZED) != 0) | ||
4118 | nfs4_state_mark_reclaim_reboot(clp, state); | ||
4119 | lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; | ||
4120 | }; | ||
4121 | } | ||
4122 | |||
4091 | static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *fl, int recovery_type) | 4123 | static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *fl, int recovery_type) |
4092 | { | 4124 | { |
4093 | struct nfs4_lockdata *data; | 4125 | struct nfs4_lockdata *data; |
@@ -4126,6 +4158,9 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f | |||
4126 | ret = nfs4_wait_for_completion_rpc_task(task); | 4158 | ret = nfs4_wait_for_completion_rpc_task(task); |
4127 | if (ret == 0) { | 4159 | if (ret == 0) { |
4128 | ret = data->rpc_status; | 4160 | ret = data->rpc_status; |
4161 | if (ret) | ||
4162 | nfs4_handle_setlk_error(data->server, data->lsp, | ||
4163 | data->arg.new_lock_owner, ret); | ||
4129 | } else | 4164 | } else |
4130 | data->cancelled = 1; | 4165 | data->cancelled = 1; |
4131 | rpc_put_task(task); | 4166 | rpc_put_task(task); |
@@ -4181,8 +4216,11 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock | |||
4181 | { | 4216 | { |
4182 | struct nfs_inode *nfsi = NFS_I(state->inode); | 4217 | struct nfs_inode *nfsi = NFS_I(state->inode); |
4183 | unsigned char fl_flags = request->fl_flags; | 4218 | unsigned char fl_flags = request->fl_flags; |
4184 | int status; | 4219 | int status = -ENOLCK; |
4185 | 4220 | ||
4221 | if ((fl_flags & FL_POSIX) && | ||
4222 | !test_bit(NFS_STATE_POSIX_LOCKS, &state->flags)) | ||
4223 | goto out; | ||
4186 | /* Is this a delegated open? */ | 4224 | /* Is this a delegated open? */ |
4187 | status = nfs4_set_lock_state(state, request); | 4225 | status = nfs4_set_lock_state(state, request); |
4188 | if (status != 0) | 4226 | if (status != 0) |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 6d263ed79e92..c1e2733f4fa4 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -901,7 +901,7 @@ void nfs4_schedule_state_recovery(struct nfs_client *clp) | |||
901 | nfs4_schedule_state_manager(clp); | 901 | nfs4_schedule_state_manager(clp); |
902 | } | 902 | } |
903 | 903 | ||
904 | static int nfs4_state_mark_reclaim_reboot(struct nfs_client *clp, struct nfs4_state *state) | 904 | int nfs4_state_mark_reclaim_reboot(struct nfs_client *clp, struct nfs4_state *state) |
905 | { | 905 | { |
906 | 906 | ||
907 | set_bit(NFS_STATE_RECLAIM_REBOOT, &state->flags); | 907 | set_bit(NFS_STATE_RECLAIM_REBOOT, &state->flags); |
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index e2975939126a..a12c45b65dd4 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -176,6 +176,12 @@ void nfs_release_request(struct nfs_page *req) | |||
176 | kref_put(&req->wb_kref, nfs_free_request); | 176 | kref_put(&req->wb_kref, nfs_free_request); |
177 | } | 177 | } |
178 | 178 | ||
179 | static int nfs_wait_bit_uninterruptible(void *word) | ||
180 | { | ||
181 | io_schedule(); | ||
182 | return 0; | ||
183 | } | ||
184 | |||
179 | /** | 185 | /** |
180 | * nfs_wait_on_request - Wait for a request to complete. | 186 | * nfs_wait_on_request - Wait for a request to complete. |
181 | * @req: request to wait upon. | 187 | * @req: request to wait upon. |
@@ -186,14 +192,9 @@ void nfs_release_request(struct nfs_page *req) | |||
186 | int | 192 | int |
187 | nfs_wait_on_request(struct nfs_page *req) | 193 | nfs_wait_on_request(struct nfs_page *req) |
188 | { | 194 | { |
189 | int ret = 0; | 195 | return wait_on_bit(&req->wb_flags, PG_BUSY, |
190 | 196 | nfs_wait_bit_uninterruptible, | |
191 | if (!test_bit(PG_BUSY, &req->wb_flags)) | 197 | TASK_UNINTERRUPTIBLE); |
192 | goto out; | ||
193 | ret = out_of_line_wait_on_bit(&req->wb_flags, PG_BUSY, | ||
194 | nfs_wait_bit_killable, TASK_KILLABLE); | ||
195 | out: | ||
196 | return ret; | ||
197 | } | 198 | } |
198 | 199 | ||
199 | /** | 200 | /** |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index ce907efc5508..f1afee4eea77 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -243,6 +243,7 @@ static int nfs_show_stats(struct seq_file *, struct vfsmount *); | |||
243 | static int nfs_get_sb(struct file_system_type *, int, const char *, void *, struct vfsmount *); | 243 | static int nfs_get_sb(struct file_system_type *, int, const char *, void *, struct vfsmount *); |
244 | static int nfs_xdev_get_sb(struct file_system_type *fs_type, | 244 | static int nfs_xdev_get_sb(struct file_system_type *fs_type, |
245 | int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt); | 245 | int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt); |
246 | static void nfs_put_super(struct super_block *); | ||
246 | static void nfs_kill_super(struct super_block *); | 247 | static void nfs_kill_super(struct super_block *); |
247 | static int nfs_remount(struct super_block *sb, int *flags, char *raw_data); | 248 | static int nfs_remount(struct super_block *sb, int *flags, char *raw_data); |
248 | 249 | ||
@@ -266,6 +267,7 @@ static const struct super_operations nfs_sops = { | |||
266 | .alloc_inode = nfs_alloc_inode, | 267 | .alloc_inode = nfs_alloc_inode, |
267 | .destroy_inode = nfs_destroy_inode, | 268 | .destroy_inode = nfs_destroy_inode, |
268 | .write_inode = nfs_write_inode, | 269 | .write_inode = nfs_write_inode, |
270 | .put_super = nfs_put_super, | ||
269 | .statfs = nfs_statfs, | 271 | .statfs = nfs_statfs, |
270 | .clear_inode = nfs_clear_inode, | 272 | .clear_inode = nfs_clear_inode, |
271 | .umount_begin = nfs_umount_begin, | 273 | .umount_begin = nfs_umount_begin, |
@@ -335,6 +337,7 @@ static const struct super_operations nfs4_sops = { | |||
335 | .alloc_inode = nfs_alloc_inode, | 337 | .alloc_inode = nfs_alloc_inode, |
336 | .destroy_inode = nfs_destroy_inode, | 338 | .destroy_inode = nfs_destroy_inode, |
337 | .write_inode = nfs_write_inode, | 339 | .write_inode = nfs_write_inode, |
340 | .put_super = nfs_put_super, | ||
338 | .statfs = nfs_statfs, | 341 | .statfs = nfs_statfs, |
339 | .clear_inode = nfs4_clear_inode, | 342 | .clear_inode = nfs4_clear_inode, |
340 | .umount_begin = nfs_umount_begin, | 343 | .umount_begin = nfs_umount_begin, |
@@ -2258,6 +2261,17 @@ error_splat_super: | |||
2258 | } | 2261 | } |
2259 | 2262 | ||
2260 | /* | 2263 | /* |
2264 | * Ensure that we unregister the bdi before kill_anon_super | ||
2265 | * releases the device name | ||
2266 | */ | ||
2267 | static void nfs_put_super(struct super_block *s) | ||
2268 | { | ||
2269 | struct nfs_server *server = NFS_SB(s); | ||
2270 | |||
2271 | bdi_unregister(&server->backing_dev_info); | ||
2272 | } | ||
2273 | |||
2274 | /* | ||
2261 | * Destroy an NFS2/3 superblock | 2275 | * Destroy an NFS2/3 superblock |
2262 | */ | 2276 | */ |
2263 | static void nfs_kill_super(struct super_block *s) | 2277 | static void nfs_kill_super(struct super_block *s) |
@@ -2265,7 +2279,6 @@ static void nfs_kill_super(struct super_block *s) | |||
2265 | struct nfs_server *server = NFS_SB(s); | 2279 | struct nfs_server *server = NFS_SB(s); |
2266 | 2280 | ||
2267 | kill_anon_super(s); | 2281 | kill_anon_super(s); |
2268 | bdi_unregister(&server->backing_dev_info); | ||
2269 | nfs_fscache_release_super_cookie(s); | 2282 | nfs_fscache_release_super_cookie(s); |
2270 | nfs_free_server(server); | 2283 | nfs_free_server(server); |
2271 | } | 2284 | } |
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c index 70e1fbbaaeab..ad4d2e787b20 100644 --- a/fs/nfs/sysctl.c +++ b/fs/nfs/sysctl.c | |||
@@ -15,8 +15,10 @@ | |||
15 | 15 | ||
16 | #include "callback.h" | 16 | #include "callback.h" |
17 | 17 | ||
18 | #ifdef CONFIG_NFS_V4 | ||
18 | static const int nfs_set_port_min = 0; | 19 | static const int nfs_set_port_min = 0; |
19 | static const int nfs_set_port_max = 65535; | 20 | static const int nfs_set_port_max = 65535; |
21 | #endif | ||
20 | static struct ctl_table_header *nfs_callback_sysctl_table; | 22 | static struct ctl_table_header *nfs_callback_sysctl_table; |
21 | 23 | ||
22 | static ctl_table nfs_cb_sysctls[] = { | 24 | static ctl_table nfs_cb_sysctls[] = { |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index d171696017f4..7b54b8bb101f 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -1233,7 +1233,7 @@ int nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) | |||
1233 | 1233 | ||
1234 | 1234 | ||
1235 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 1235 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
1236 | void nfs_commitdata_release(void *data) | 1236 | static void nfs_commitdata_release(void *data) |
1237 | { | 1237 | { |
1238 | struct nfs_write_data *wdata = data; | 1238 | struct nfs_write_data *wdata = data; |
1239 | 1239 | ||
@@ -1541,6 +1541,7 @@ int nfs_wb_page_cancel(struct inode *inode, struct page *page) | |||
1541 | break; | 1541 | break; |
1542 | } | 1542 | } |
1543 | ret = nfs_wait_on_request(req); | 1543 | ret = nfs_wait_on_request(req); |
1544 | nfs_release_request(req); | ||
1544 | if (ret < 0) | 1545 | if (ret < 0) |
1545 | goto out; | 1546 | goto out; |
1546 | } | 1547 | } |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 17584c524486..105b508b47a8 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -2829,7 +2829,7 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci) | |||
2829 | || sci->sc_seq_request != sci->sc_seq_done); | 2829 | || sci->sc_seq_request != sci->sc_seq_done); |
2830 | spin_unlock(&sci->sc_state_lock); | 2830 | spin_unlock(&sci->sc_state_lock); |
2831 | 2831 | ||
2832 | if (flag || nilfs_segctor_confirm(sci)) | 2832 | if (flag || !nilfs_segctor_confirm(sci)) |
2833 | nilfs_segctor_write_out(sci); | 2833 | nilfs_segctor_write_out(sci); |
2834 | 2834 | ||
2835 | WARN_ON(!list_empty(&sci->sc_copied_buffers)); | 2835 | WARN_ON(!list_empty(&sci->sc_copied_buffers)); |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 72ba63eb83c5..3a779ffba60b 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -24,9 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | 26 | ||
27 | #define CN_IDX_CONNECTOR 0xffffffff | ||
28 | #define CN_VAL_CONNECTOR 0xffffffff | ||
29 | |||
30 | /* | 27 | /* |
31 | * Process Events connector unique ids -- used for message routing | 28 | * Process Events connector unique ids -- used for message routing |
32 | */ | 29 | */ |
@@ -75,30 +72,6 @@ struct cn_msg { | |||
75 | __u8 data[0]; | 72 | __u8 data[0]; |
76 | }; | 73 | }; |
77 | 74 | ||
78 | /* | ||
79 | * Notify structure - requests notification about | ||
80 | * registering/unregistering idx/val in range [first, first+range]. | ||
81 | */ | ||
82 | struct cn_notify_req { | ||
83 | __u32 first; | ||
84 | __u32 range; | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * Main notification control message | ||
89 | * *_notify_num - number of appropriate cn_notify_req structures after | ||
90 | * this struct. | ||
91 | * group - notification receiver's idx. | ||
92 | * len - total length of the attached data. | ||
93 | */ | ||
94 | struct cn_ctl_msg { | ||
95 | __u32 idx_notify_num; | ||
96 | __u32 val_notify_num; | ||
97 | __u32 group; | ||
98 | __u32 len; | ||
99 | __u8 data[0]; | ||
100 | }; | ||
101 | |||
102 | #ifdef __KERNEL__ | 75 | #ifdef __KERNEL__ |
103 | 76 | ||
104 | #include <asm/atomic.h> | 77 | #include <asm/atomic.h> |
@@ -151,11 +124,6 @@ struct cn_callback_entry { | |||
151 | u32 seq, group; | 124 | u32 seq, group; |
152 | }; | 125 | }; |
153 | 126 | ||
154 | struct cn_ctl_entry { | ||
155 | struct list_head notify_entry; | ||
156 | struct cn_ctl_msg *msg; | ||
157 | }; | ||
158 | |||
159 | struct cn_dev { | 127 | struct cn_dev { |
160 | struct cb_id id; | 128 | struct cb_id id; |
161 | 129 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index abdfacc58653..78efe7c485ac 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -310,6 +310,7 @@ extern void sched_show_task(struct task_struct *p); | |||
310 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 310 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
311 | extern void softlockup_tick(void); | 311 | extern void softlockup_tick(void); |
312 | extern void touch_softlockup_watchdog(void); | 312 | extern void touch_softlockup_watchdog(void); |
313 | extern void touch_softlockup_watchdog_sync(void); | ||
313 | extern void touch_all_softlockup_watchdogs(void); | 314 | extern void touch_all_softlockup_watchdogs(void); |
314 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | 315 | extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, |
315 | void __user *buffer, | 316 | void __user *buffer, |
@@ -323,6 +324,9 @@ static inline void softlockup_tick(void) | |||
323 | static inline void touch_softlockup_watchdog(void) | 324 | static inline void touch_softlockup_watchdog(void) |
324 | { | 325 | { |
325 | } | 326 | } |
327 | static inline void touch_softlockup_watchdog_sync(void) | ||
328 | { | ||
329 | } | ||
326 | static inline void touch_all_softlockup_watchdogs(void) | 330 | static inline void touch_all_softlockup_watchdogs(void) |
327 | { | 331 | { |
328 | } | 332 | } |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 1fbcc748044a..aa3bee566446 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2936,14 +2936,17 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, | |||
2936 | 2936 | ||
2937 | for_each_subsys(root, ss) { | 2937 | for_each_subsys(root, ss) { |
2938 | struct cgroup_subsys_state *css = ss->create(ss, cgrp); | 2938 | struct cgroup_subsys_state *css = ss->create(ss, cgrp); |
2939 | |||
2939 | if (IS_ERR(css)) { | 2940 | if (IS_ERR(css)) { |
2940 | err = PTR_ERR(css); | 2941 | err = PTR_ERR(css); |
2941 | goto err_destroy; | 2942 | goto err_destroy; |
2942 | } | 2943 | } |
2943 | init_cgroup_css(css, ss, cgrp); | 2944 | init_cgroup_css(css, ss, cgrp); |
2944 | if (ss->use_id) | 2945 | if (ss->use_id) { |
2945 | if (alloc_css_id(ss, parent, cgrp)) | 2946 | err = alloc_css_id(ss, parent, cgrp); |
2947 | if (err) | ||
2946 | goto err_destroy; | 2948 | goto err_destroy; |
2949 | } | ||
2947 | /* At error, ->destroy() callback has to free assigned ID. */ | 2950 | /* At error, ->destroy() callback has to free assigned ID. */ |
2948 | } | 2951 | } |
2949 | 2952 | ||
diff --git a/kernel/cred.c b/kernel/cred.c index dd76cfe5f5b0..1ed8ca18790c 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
@@ -224,7 +224,7 @@ struct cred *cred_alloc_blank(void) | |||
224 | #ifdef CONFIG_KEYS | 224 | #ifdef CONFIG_KEYS |
225 | new->tgcred = kzalloc(sizeof(*new->tgcred), GFP_KERNEL); | 225 | new->tgcred = kzalloc(sizeof(*new->tgcred), GFP_KERNEL); |
226 | if (!new->tgcred) { | 226 | if (!new->tgcred) { |
227 | kfree(new); | 227 | kmem_cache_free(cred_jar, new); |
228 | return NULL; | 228 | return NULL; |
229 | } | 229 | } |
230 | atomic_set(&new->tgcred->usage, 1); | 230 | atomic_set(&new->tgcred->usage, 1); |
diff --git a/kernel/futex.c b/kernel/futex.c index d9b3a2228f9d..e7a35f1039e7 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -530,8 +530,25 @@ lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, | |||
530 | return -EINVAL; | 530 | return -EINVAL; |
531 | 531 | ||
532 | WARN_ON(!atomic_read(&pi_state->refcount)); | 532 | WARN_ON(!atomic_read(&pi_state->refcount)); |
533 | WARN_ON(pid && pi_state->owner && | 533 | |
534 | pi_state->owner->pid != pid); | 534 | /* |
535 | * When pi_state->owner is NULL then the owner died | ||
536 | * and another waiter is on the fly. pi_state->owner | ||
537 | * is fixed up by the task which acquires | ||
538 | * pi_state->rt_mutex. | ||
539 | * | ||
540 | * We do not check for pid == 0 which can happen when | ||
541 | * the owner died and robust_list_exit() cleared the | ||
542 | * TID. | ||
543 | */ | ||
544 | if (pid && pi_state->owner) { | ||
545 | /* | ||
546 | * Bail out if user space manipulated the | ||
547 | * futex value. | ||
548 | */ | ||
549 | if (pid != task_pid_vnr(pi_state->owner)) | ||
550 | return -EINVAL; | ||
551 | } | ||
535 | 552 | ||
536 | atomic_inc(&pi_state->refcount); | 553 | atomic_inc(&pi_state->refcount); |
537 | *ps = pi_state; | 554 | *ps = pi_state; |
@@ -758,6 +775,13 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) | |||
758 | if (!pi_state) | 775 | if (!pi_state) |
759 | return -EINVAL; | 776 | return -EINVAL; |
760 | 777 | ||
778 | /* | ||
779 | * If current does not own the pi_state then the futex is | ||
780 | * inconsistent and user space fiddled with the futex value. | ||
781 | */ | ||
782 | if (pi_state->owner != current) | ||
783 | return -EINVAL; | ||
784 | |||
761 | raw_spin_lock(&pi_state->pi_mutex.wait_lock); | 785 | raw_spin_lock(&pi_state->pi_mutex.wait_lock); |
762 | new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); | 786 | new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); |
763 | 787 | ||
@@ -1971,7 +1995,7 @@ retry_private: | |||
1971 | /* Unqueue and drop the lock */ | 1995 | /* Unqueue and drop the lock */ |
1972 | unqueue_me_pi(&q); | 1996 | unqueue_me_pi(&q); |
1973 | 1997 | ||
1974 | goto out; | 1998 | goto out_put_key; |
1975 | 1999 | ||
1976 | out_unlock_put_key: | 2000 | out_unlock_put_key: |
1977 | queue_unlock(&q, hb); | 2001 | queue_unlock(&q, hb); |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 32c5c15d750d..498cabba225e 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
@@ -349,6 +349,7 @@ EXPORT_SYMBOL(__kfifo_from_user_n); | |||
349 | * @fifo: the fifo to be used. | 349 | * @fifo: the fifo to be used. |
350 | * @from: pointer to the data to be added. | 350 | * @from: pointer to the data to be added. |
351 | * @len: the length of the data to be added. | 351 | * @len: the length of the data to be added. |
352 | * @total: the actual returned data length. | ||
352 | * | 353 | * |
353 | * This function copies at most @len bytes from the @from into the | 354 | * This function copies at most @len bytes from the @from into the |
354 | * FIFO depending and returns -EFAULT/0. | 355 | * FIFO depending and returns -EFAULT/0. |
@@ -399,7 +400,7 @@ EXPORT_SYMBOL(__kfifo_to_user_n); | |||
399 | * @fifo: the fifo to be used. | 400 | * @fifo: the fifo to be used. |
400 | * @to: where the data must be copied. | 401 | * @to: where the data must be copied. |
401 | * @len: the size of the destination buffer. | 402 | * @len: the size of the destination buffer. |
402 | @ @lenout: pointer to output variable with copied data | 403 | * @lenout: pointer to output variable with copied data |
403 | * | 404 | * |
404 | * This function copies at most @len bytes from the FIFO into the | 405 | * This function copies at most @len bytes from the FIFO into the |
405 | * @to buffer and 0 or -EFAULT. | 406 | * @to buffer and 0 or -EFAULT. |
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index c7ade62e4ef0..761fdd2b3034 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c | |||
@@ -599,7 +599,7 @@ static void kgdb_wait(struct pt_regs *regs) | |||
599 | 599 | ||
600 | /* Signal the primary CPU that we are done: */ | 600 | /* Signal the primary CPU that we are done: */ |
601 | atomic_set(&cpu_in_kgdb[cpu], 0); | 601 | atomic_set(&cpu_in_kgdb[cpu], 0); |
602 | touch_softlockup_watchdog(); | 602 | touch_softlockup_watchdog_sync(); |
603 | clocksource_touch_watchdog(); | 603 | clocksource_touch_watchdog(); |
604 | local_irq_restore(flags); | 604 | local_irq_restore(flags); |
605 | } | 605 | } |
@@ -1453,7 +1453,7 @@ acquirelock: | |||
1453 | (kgdb_info[cpu].task && | 1453 | (kgdb_info[cpu].task && |
1454 | kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) { | 1454 | kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) { |
1455 | atomic_set(&kgdb_active, -1); | 1455 | atomic_set(&kgdb_active, -1); |
1456 | touch_softlockup_watchdog(); | 1456 | touch_softlockup_watchdog_sync(); |
1457 | clocksource_touch_watchdog(); | 1457 | clocksource_touch_watchdog(); |
1458 | local_irq_restore(flags); | 1458 | local_irq_restore(flags); |
1459 | 1459 | ||
@@ -1553,7 +1553,7 @@ kgdb_restore: | |||
1553 | } | 1553 | } |
1554 | /* Free kgdb_active */ | 1554 | /* Free kgdb_active */ |
1555 | atomic_set(&kgdb_active, -1); | 1555 | atomic_set(&kgdb_active, -1); |
1556 | touch_softlockup_watchdog(); | 1556 | touch_softlockup_watchdog_sync(); |
1557 | clocksource_touch_watchdog(); | 1557 | clocksource_touch_watchdog(); |
1558 | local_irq_restore(flags); | 1558 | local_irq_restore(flags); |
1559 | 1559 | ||
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index d22579087e27..0d4c7898ab80 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -25,6 +25,7 @@ static DEFINE_SPINLOCK(print_lock); | |||
25 | static DEFINE_PER_CPU(unsigned long, softlockup_touch_ts); /* touch timestamp */ | 25 | static DEFINE_PER_CPU(unsigned long, softlockup_touch_ts); /* touch timestamp */ |
26 | static DEFINE_PER_CPU(unsigned long, softlockup_print_ts); /* print timestamp */ | 26 | static DEFINE_PER_CPU(unsigned long, softlockup_print_ts); /* print timestamp */ |
27 | static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog); | 27 | static DEFINE_PER_CPU(struct task_struct *, softlockup_watchdog); |
28 | static DEFINE_PER_CPU(bool, softlock_touch_sync); | ||
28 | 29 | ||
29 | static int __read_mostly did_panic; | 30 | static int __read_mostly did_panic; |
30 | int __read_mostly softlockup_thresh = 60; | 31 | int __read_mostly softlockup_thresh = 60; |
@@ -79,6 +80,12 @@ void touch_softlockup_watchdog(void) | |||
79 | } | 80 | } |
80 | EXPORT_SYMBOL(touch_softlockup_watchdog); | 81 | EXPORT_SYMBOL(touch_softlockup_watchdog); |
81 | 82 | ||
83 | void touch_softlockup_watchdog_sync(void) | ||
84 | { | ||
85 | __raw_get_cpu_var(softlock_touch_sync) = true; | ||
86 | __raw_get_cpu_var(softlockup_touch_ts) = 0; | ||
87 | } | ||
88 | |||
82 | void touch_all_softlockup_watchdogs(void) | 89 | void touch_all_softlockup_watchdogs(void) |
83 | { | 90 | { |
84 | int cpu; | 91 | int cpu; |
@@ -118,6 +125,14 @@ void softlockup_tick(void) | |||
118 | } | 125 | } |
119 | 126 | ||
120 | if (touch_ts == 0) { | 127 | if (touch_ts == 0) { |
128 | if (unlikely(per_cpu(softlock_touch_sync, this_cpu))) { | ||
129 | /* | ||
130 | * If the time stamp was touched atomically | ||
131 | * make sure the scheduler tick is up to date. | ||
132 | */ | ||
133 | per_cpu(softlock_touch_sync, this_cpu) = false; | ||
134 | sched_clock_tick(); | ||
135 | } | ||
121 | __touch_softlockup_watchdog(); | 136 | __touch_softlockup_watchdog(); |
122 | return; | 137 | return; |
123 | } | 138 | } |
diff --git a/mm/filemap.c b/mm/filemap.c index e3736923220e..698ea80f2102 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -2232,6 +2232,9 @@ again: | |||
2232 | if (unlikely(status)) | 2232 | if (unlikely(status)) |
2233 | break; | 2233 | break; |
2234 | 2234 | ||
2235 | if (mapping_writably_mapped(mapping)) | ||
2236 | flush_dcache_page(page); | ||
2237 | |||
2235 | pagefault_disable(); | 2238 | pagefault_disable(); |
2236 | copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes); | 2239 | copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes); |
2237 | pagefault_enable(); | 2240 | pagefault_enable(); |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e91b81b63670..2d16fa6b8c2d 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1515,10 +1515,9 @@ static struct attribute_group hstate_attr_group = { | |||
1515 | .attrs = hstate_attrs, | 1515 | .attrs = hstate_attrs, |
1516 | }; | 1516 | }; |
1517 | 1517 | ||
1518 | static int __init hugetlb_sysfs_add_hstate(struct hstate *h, | 1518 | static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent, |
1519 | struct kobject *parent, | 1519 | struct kobject **hstate_kobjs, |
1520 | struct kobject **hstate_kobjs, | 1520 | struct attribute_group *hstate_attr_group) |
1521 | struct attribute_group *hstate_attr_group) | ||
1522 | { | 1521 | { |
1523 | int retval; | 1522 | int retval; |
1524 | int hi = h - hstates; | 1523 | int hi = h - hstates; |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d55d905463eb..ae007462b7f6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -509,6 +509,9 @@ static unsigned long lazy_max_pages(void) | |||
509 | 509 | ||
510 | static atomic_t vmap_lazy_nr = ATOMIC_INIT(0); | 510 | static atomic_t vmap_lazy_nr = ATOMIC_INIT(0); |
511 | 511 | ||
512 | /* for per-CPU blocks */ | ||
513 | static void purge_fragmented_blocks_allcpus(void); | ||
514 | |||
512 | /* | 515 | /* |
513 | * Purges all lazily-freed vmap areas. | 516 | * Purges all lazily-freed vmap areas. |
514 | * | 517 | * |
@@ -539,6 +542,9 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end, | |||
539 | } else | 542 | } else |
540 | spin_lock(&purge_lock); | 543 | spin_lock(&purge_lock); |
541 | 544 | ||
545 | if (sync) | ||
546 | purge_fragmented_blocks_allcpus(); | ||
547 | |||
542 | rcu_read_lock(); | 548 | rcu_read_lock(); |
543 | list_for_each_entry_rcu(va, &vmap_area_list, list) { | 549 | list_for_each_entry_rcu(va, &vmap_area_list, list) { |
544 | if (va->flags & VM_LAZY_FREE) { | 550 | if (va->flags & VM_LAZY_FREE) { |
@@ -667,8 +673,6 @@ static bool vmap_initialized __read_mostly = false; | |||
667 | struct vmap_block_queue { | 673 | struct vmap_block_queue { |
668 | spinlock_t lock; | 674 | spinlock_t lock; |
669 | struct list_head free; | 675 | struct list_head free; |
670 | struct list_head dirty; | ||
671 | unsigned int nr_dirty; | ||
672 | }; | 676 | }; |
673 | 677 | ||
674 | struct vmap_block { | 678 | struct vmap_block { |
@@ -678,10 +682,9 @@ struct vmap_block { | |||
678 | unsigned long free, dirty; | 682 | unsigned long free, dirty; |
679 | DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS); | 683 | DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS); |
680 | DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS); | 684 | DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS); |
681 | union { | 685 | struct list_head free_list; |
682 | struct list_head free_list; | 686 | struct rcu_head rcu_head; |
683 | struct rcu_head rcu_head; | 687 | struct list_head purge; |
684 | }; | ||
685 | }; | 688 | }; |
686 | 689 | ||
687 | /* Queue of free and dirty vmap blocks, for allocation and flushing purposes */ | 690 | /* Queue of free and dirty vmap blocks, for allocation and flushing purposes */ |
@@ -757,7 +760,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask) | |||
757 | vbq = &get_cpu_var(vmap_block_queue); | 760 | vbq = &get_cpu_var(vmap_block_queue); |
758 | vb->vbq = vbq; | 761 | vb->vbq = vbq; |
759 | spin_lock(&vbq->lock); | 762 | spin_lock(&vbq->lock); |
760 | list_add(&vb->free_list, &vbq->free); | 763 | list_add_rcu(&vb->free_list, &vbq->free); |
761 | spin_unlock(&vbq->lock); | 764 | spin_unlock(&vbq->lock); |
762 | put_cpu_var(vmap_block_queue); | 765 | put_cpu_var(vmap_block_queue); |
763 | 766 | ||
@@ -776,8 +779,6 @@ static void free_vmap_block(struct vmap_block *vb) | |||
776 | struct vmap_block *tmp; | 779 | struct vmap_block *tmp; |
777 | unsigned long vb_idx; | 780 | unsigned long vb_idx; |
778 | 781 | ||
779 | BUG_ON(!list_empty(&vb->free_list)); | ||
780 | |||
781 | vb_idx = addr_to_vb_idx(vb->va->va_start); | 782 | vb_idx = addr_to_vb_idx(vb->va->va_start); |
782 | spin_lock(&vmap_block_tree_lock); | 783 | spin_lock(&vmap_block_tree_lock); |
783 | tmp = radix_tree_delete(&vmap_block_tree, vb_idx); | 784 | tmp = radix_tree_delete(&vmap_block_tree, vb_idx); |
@@ -788,12 +789,61 @@ static void free_vmap_block(struct vmap_block *vb) | |||
788 | call_rcu(&vb->rcu_head, rcu_free_vb); | 789 | call_rcu(&vb->rcu_head, rcu_free_vb); |
789 | } | 790 | } |
790 | 791 | ||
792 | static void purge_fragmented_blocks(int cpu) | ||
793 | { | ||
794 | LIST_HEAD(purge); | ||
795 | struct vmap_block *vb; | ||
796 | struct vmap_block *n_vb; | ||
797 | struct vmap_block_queue *vbq = &per_cpu(vmap_block_queue, cpu); | ||
798 | |||
799 | rcu_read_lock(); | ||
800 | list_for_each_entry_rcu(vb, &vbq->free, free_list) { | ||
801 | |||
802 | if (!(vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS)) | ||
803 | continue; | ||
804 | |||
805 | spin_lock(&vb->lock); | ||
806 | if (vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS) { | ||
807 | vb->free = 0; /* prevent further allocs after releasing lock */ | ||
808 | vb->dirty = VMAP_BBMAP_BITS; /* prevent purging it again */ | ||
809 | bitmap_fill(vb->alloc_map, VMAP_BBMAP_BITS); | ||
810 | bitmap_fill(vb->dirty_map, VMAP_BBMAP_BITS); | ||
811 | spin_lock(&vbq->lock); | ||
812 | list_del_rcu(&vb->free_list); | ||
813 | spin_unlock(&vbq->lock); | ||
814 | spin_unlock(&vb->lock); | ||
815 | list_add_tail(&vb->purge, &purge); | ||
816 | } else | ||
817 | spin_unlock(&vb->lock); | ||
818 | } | ||
819 | rcu_read_unlock(); | ||
820 | |||
821 | list_for_each_entry_safe(vb, n_vb, &purge, purge) { | ||
822 | list_del(&vb->purge); | ||
823 | free_vmap_block(vb); | ||
824 | } | ||
825 | } | ||
826 | |||
827 | static void purge_fragmented_blocks_thiscpu(void) | ||
828 | { | ||
829 | purge_fragmented_blocks(smp_processor_id()); | ||
830 | } | ||
831 | |||
832 | static void purge_fragmented_blocks_allcpus(void) | ||
833 | { | ||
834 | int cpu; | ||
835 | |||
836 | for_each_possible_cpu(cpu) | ||
837 | purge_fragmented_blocks(cpu); | ||
838 | } | ||
839 | |||
791 | static void *vb_alloc(unsigned long size, gfp_t gfp_mask) | 840 | static void *vb_alloc(unsigned long size, gfp_t gfp_mask) |
792 | { | 841 | { |
793 | struct vmap_block_queue *vbq; | 842 | struct vmap_block_queue *vbq; |
794 | struct vmap_block *vb; | 843 | struct vmap_block *vb; |
795 | unsigned long addr = 0; | 844 | unsigned long addr = 0; |
796 | unsigned int order; | 845 | unsigned int order; |
846 | int purge = 0; | ||
797 | 847 | ||
798 | BUG_ON(size & ~PAGE_MASK); | 848 | BUG_ON(size & ~PAGE_MASK); |
799 | BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC); | 849 | BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC); |
@@ -806,24 +856,38 @@ again: | |||
806 | int i; | 856 | int i; |
807 | 857 | ||
808 | spin_lock(&vb->lock); | 858 | spin_lock(&vb->lock); |
859 | if (vb->free < 1UL << order) | ||
860 | goto next; | ||
861 | |||
809 | i = bitmap_find_free_region(vb->alloc_map, | 862 | i = bitmap_find_free_region(vb->alloc_map, |
810 | VMAP_BBMAP_BITS, order); | 863 | VMAP_BBMAP_BITS, order); |
811 | 864 | ||
812 | if (i >= 0) { | 865 | if (i < 0) { |
813 | addr = vb->va->va_start + (i << PAGE_SHIFT); | 866 | if (vb->free + vb->dirty == VMAP_BBMAP_BITS) { |
814 | BUG_ON(addr_to_vb_idx(addr) != | 867 | /* fragmented and no outstanding allocations */ |
815 | addr_to_vb_idx(vb->va->va_start)); | 868 | BUG_ON(vb->dirty != VMAP_BBMAP_BITS); |
816 | vb->free -= 1UL << order; | 869 | purge = 1; |
817 | if (vb->free == 0) { | ||
818 | spin_lock(&vbq->lock); | ||
819 | list_del_init(&vb->free_list); | ||
820 | spin_unlock(&vbq->lock); | ||
821 | } | 870 | } |
822 | spin_unlock(&vb->lock); | 871 | goto next; |
823 | break; | ||
824 | } | 872 | } |
873 | addr = vb->va->va_start + (i << PAGE_SHIFT); | ||
874 | BUG_ON(addr_to_vb_idx(addr) != | ||
875 | addr_to_vb_idx(vb->va->va_start)); | ||
876 | vb->free -= 1UL << order; | ||
877 | if (vb->free == 0) { | ||
878 | spin_lock(&vbq->lock); | ||
879 | list_del_rcu(&vb->free_list); | ||
880 | spin_unlock(&vbq->lock); | ||
881 | } | ||
882 | spin_unlock(&vb->lock); | ||
883 | break; | ||
884 | next: | ||
825 | spin_unlock(&vb->lock); | 885 | spin_unlock(&vb->lock); |
826 | } | 886 | } |
887 | |||
888 | if (purge) | ||
889 | purge_fragmented_blocks_thiscpu(); | ||
890 | |||
827 | put_cpu_var(vmap_block_queue); | 891 | put_cpu_var(vmap_block_queue); |
828 | rcu_read_unlock(); | 892 | rcu_read_unlock(); |
829 | 893 | ||
@@ -860,11 +924,11 @@ static void vb_free(const void *addr, unsigned long size) | |||
860 | BUG_ON(!vb); | 924 | BUG_ON(!vb); |
861 | 925 | ||
862 | spin_lock(&vb->lock); | 926 | spin_lock(&vb->lock); |
863 | bitmap_allocate_region(vb->dirty_map, offset >> PAGE_SHIFT, order); | 927 | BUG_ON(bitmap_allocate_region(vb->dirty_map, offset >> PAGE_SHIFT, order)); |
864 | 928 | ||
865 | vb->dirty += 1UL << order; | 929 | vb->dirty += 1UL << order; |
866 | if (vb->dirty == VMAP_BBMAP_BITS) { | 930 | if (vb->dirty == VMAP_BBMAP_BITS) { |
867 | BUG_ON(vb->free || !list_empty(&vb->free_list)); | 931 | BUG_ON(vb->free); |
868 | spin_unlock(&vb->lock); | 932 | spin_unlock(&vb->lock); |
869 | free_vmap_block(vb); | 933 | free_vmap_block(vb); |
870 | } else | 934 | } else |
@@ -1033,8 +1097,6 @@ void __init vmalloc_init(void) | |||
1033 | vbq = &per_cpu(vmap_block_queue, i); | 1097 | vbq = &per_cpu(vmap_block_queue, i); |
1034 | spin_lock_init(&vbq->lock); | 1098 | spin_lock_init(&vbq->lock); |
1035 | INIT_LIST_HEAD(&vbq->free); | 1099 | INIT_LIST_HEAD(&vbq->free); |
1036 | INIT_LIST_HEAD(&vbq->dirty); | ||
1037 | vbq->nr_dirty = 0; | ||
1038 | } | 1100 | } |
1039 | 1101 | ||
1040 | /* Import existing vmlist entries. */ | 1102 | /* Import existing vmlist entries. */ |
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 18e7f5a43dc4..6cf526d06e21 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -243,6 +243,39 @@ static void hidp_input_report(struct hidp_session *session, struct sk_buff *skb) | |||
243 | input_sync(dev); | 243 | input_sync(dev); |
244 | } | 244 | } |
245 | 245 | ||
246 | static int __hidp_send_ctrl_message(struct hidp_session *session, | ||
247 | unsigned char hdr, unsigned char *data, int size) | ||
248 | { | ||
249 | struct sk_buff *skb; | ||
250 | |||
251 | BT_DBG("session %p data %p size %d", session, data, size); | ||
252 | |||
253 | if (!(skb = alloc_skb(size + 1, GFP_ATOMIC))) { | ||
254 | BT_ERR("Can't allocate memory for new frame"); | ||
255 | return -ENOMEM; | ||
256 | } | ||
257 | |||
258 | *skb_put(skb, 1) = hdr; | ||
259 | if (data && size > 0) | ||
260 | memcpy(skb_put(skb, size), data, size); | ||
261 | |||
262 | skb_queue_tail(&session->ctrl_transmit, skb); | ||
263 | |||
264 | return 0; | ||
265 | } | ||
266 | |||
267 | static inline int hidp_send_ctrl_message(struct hidp_session *session, | ||
268 | unsigned char hdr, unsigned char *data, int size) | ||
269 | { | ||
270 | int err; | ||
271 | |||
272 | err = __hidp_send_ctrl_message(session, hdr, data, size); | ||
273 | |||
274 | hidp_schedule(session); | ||
275 | |||
276 | return err; | ||
277 | } | ||
278 | |||
246 | static int hidp_queue_report(struct hidp_session *session, | 279 | static int hidp_queue_report(struct hidp_session *session, |
247 | unsigned char *data, int size) | 280 | unsigned char *data, int size) |
248 | { | 281 | { |
@@ -282,7 +315,9 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep | |||
282 | 315 | ||
283 | static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count) | 316 | static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count) |
284 | { | 317 | { |
285 | if (hidp_queue_report(hid->driver_data, data, count)) | 318 | if (hidp_send_ctrl_message(hid->driver_data, |
319 | HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE, | ||
320 | data, count)) | ||
286 | return -ENOMEM; | 321 | return -ENOMEM; |
287 | return count; | 322 | return count; |
288 | } | 323 | } |
@@ -307,39 +342,6 @@ static inline void hidp_del_timer(struct hidp_session *session) | |||
307 | del_timer(&session->timer); | 342 | del_timer(&session->timer); |
308 | } | 343 | } |
309 | 344 | ||
310 | static int __hidp_send_ctrl_message(struct hidp_session *session, | ||
311 | unsigned char hdr, unsigned char *data, int size) | ||
312 | { | ||
313 | struct sk_buff *skb; | ||
314 | |||
315 | BT_DBG("session %p data %p size %d", session, data, size); | ||
316 | |||
317 | if (!(skb = alloc_skb(size + 1, GFP_ATOMIC))) { | ||
318 | BT_ERR("Can't allocate memory for new frame"); | ||
319 | return -ENOMEM; | ||
320 | } | ||
321 | |||
322 | *skb_put(skb, 1) = hdr; | ||
323 | if (data && size > 0) | ||
324 | memcpy(skb_put(skb, size), data, size); | ||
325 | |||
326 | skb_queue_tail(&session->ctrl_transmit, skb); | ||
327 | |||
328 | return 0; | ||
329 | } | ||
330 | |||
331 | static inline int hidp_send_ctrl_message(struct hidp_session *session, | ||
332 | unsigned char hdr, unsigned char *data, int size) | ||
333 | { | ||
334 | int err; | ||
335 | |||
336 | err = __hidp_send_ctrl_message(session, hdr, data, size); | ||
337 | |||
338 | hidp_schedule(session); | ||
339 | |||
340 | return err; | ||
341 | } | ||
342 | |||
343 | static void hidp_process_handshake(struct hidp_session *session, | 345 | static void hidp_process_handshake(struct hidp_session *session, |
344 | unsigned char param) | 346 | unsigned char param) |
345 | { | 347 | { |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 1120cf14a548..400efa26ddba 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -1368,7 +1368,6 @@ static int l2cap_ertm_send(struct sock *sk) | |||
1368 | 1368 | ||
1369 | while ((skb = sk->sk_send_head) && (!l2cap_tx_window_full(sk)) && | 1369 | while ((skb = sk->sk_send_head) && (!l2cap_tx_window_full(sk)) && |
1370 | !(pi->conn_state & L2CAP_CONN_REMOTE_BUSY)) { | 1370 | !(pi->conn_state & L2CAP_CONN_REMOTE_BUSY)) { |
1371 | tx_skb = skb_clone(skb, GFP_ATOMIC); | ||
1372 | 1371 | ||
1373 | if (pi->remote_max_tx && | 1372 | if (pi->remote_max_tx && |
1374 | bt_cb(skb)->retries == pi->remote_max_tx) { | 1373 | bt_cb(skb)->retries == pi->remote_max_tx) { |
@@ -1376,6 +1375,8 @@ static int l2cap_ertm_send(struct sock *sk) | |||
1376 | break; | 1375 | break; |
1377 | } | 1376 | } |
1378 | 1377 | ||
1378 | tx_skb = skb_clone(skb, GFP_ATOMIC); | ||
1379 | |||
1379 | bt_cb(skb)->retries++; | 1380 | bt_cb(skb)->retries++; |
1380 | 1381 | ||
1381 | control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); | 1382 | control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); |
@@ -3518,7 +3519,6 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk | |||
3518 | struct l2cap_pinfo *pi; | 3519 | struct l2cap_pinfo *pi; |
3519 | u16 control, len; | 3520 | u16 control, len; |
3520 | u8 tx_seq; | 3521 | u8 tx_seq; |
3521 | int err; | ||
3522 | 3522 | ||
3523 | sk = l2cap_get_chan_by_scid(&conn->chan_list, cid); | 3523 | sk = l2cap_get_chan_by_scid(&conn->chan_list, cid); |
3524 | if (!sk) { | 3524 | if (!sk) { |
@@ -3570,13 +3570,11 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk | |||
3570 | goto drop; | 3570 | goto drop; |
3571 | 3571 | ||
3572 | if (__is_iframe(control)) | 3572 | if (__is_iframe(control)) |
3573 | err = l2cap_data_channel_iframe(sk, control, skb); | 3573 | l2cap_data_channel_iframe(sk, control, skb); |
3574 | else | 3574 | else |
3575 | err = l2cap_data_channel_sframe(sk, control, skb); | 3575 | l2cap_data_channel_sframe(sk, control, skb); |
3576 | 3576 | ||
3577 | if (!err) | 3577 | goto done; |
3578 | goto done; | ||
3579 | break; | ||
3580 | 3578 | ||
3581 | case L2CAP_MODE_STREAMING: | 3579 | case L2CAP_MODE_STREAMING: |
3582 | control = get_unaligned_le16(skb->data); | 3580 | control = get_unaligned_le16(skb->data); |
@@ -3602,7 +3600,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk | |||
3602 | else | 3600 | else |
3603 | pi->expected_tx_seq = tx_seq + 1; | 3601 | pi->expected_tx_seq = tx_seq + 1; |
3604 | 3602 | ||
3605 | err = l2cap_sar_reassembly_sdu(sk, skb, control); | 3603 | l2cap_sar_reassembly_sdu(sk, skb, control); |
3606 | 3604 | ||
3607 | goto done; | 3605 | goto done; |
3608 | 3606 | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 312c20adc83f..624a54832a7c 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -63,6 +63,7 @@ struct nf_ct_frag6_queue | |||
63 | struct inet_frag_queue q; | 63 | struct inet_frag_queue q; |
64 | 64 | ||
65 | __be32 id; /* fragment id */ | 65 | __be32 id; /* fragment id */ |
66 | u32 user; | ||
66 | struct in6_addr saddr; | 67 | struct in6_addr saddr; |
67 | struct in6_addr daddr; | 68 | struct in6_addr daddr; |
68 | 69 | ||
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index ee94ea0c67e9..da8497ef7063 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -680,7 +680,7 @@ TRACE_EVENT(drv_ampdu_action, | |||
680 | __entry->ret = ret; | 680 | __entry->ret = ret; |
681 | __entry->action = action; | 681 | __entry->action = action; |
682 | __entry->tid = tid; | 682 | __entry->tid = tid; |
683 | __entry->ssn = *ssn; | 683 | __entry->ssn = ssn ? *ssn : 0; |
684 | ), | 684 | ), |
685 | 685 | ||
686 | TP_printk( | 686 | TP_printk( |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 59d8064eb522..42f21c01a93e 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -1437,8 +1437,9 @@ ctnetlink_exp_dump_mask(struct sk_buff *skb, | |||
1437 | struct nlattr *nest_parms; | 1437 | struct nlattr *nest_parms; |
1438 | 1438 | ||
1439 | memset(&m, 0xFF, sizeof(m)); | 1439 | memset(&m, 0xFF, sizeof(m)); |
1440 | m.src.u.all = mask->src.u.all; | ||
1441 | memcpy(&m.src.u3, &mask->src.u3, sizeof(m.src.u3)); | 1440 | memcpy(&m.src.u3, &mask->src.u3, sizeof(m.src.u3)); |
1441 | m.src.u.all = mask->src.u.all; | ||
1442 | m.dst.protonum = tuple->dst.protonum; | ||
1442 | 1443 | ||
1443 | nest_parms = nla_nest_start(skb, CTA_EXPECT_MASK | NLA_F_NESTED); | 1444 | nest_parms = nla_nest_start(skb, CTA_EXPECT_MASK | NLA_F_NESTED); |
1444 | if (!nest_parms) | 1445 | if (!nest_parms) |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 4b572163784b..023966b569bf 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -376,7 +376,7 @@ int ct_sip_get_header(const struct nf_conn *ct, const char *dptr, | |||
376 | dptr += hdr->len; | 376 | dptr += hdr->len; |
377 | else if (hdr->cname && limit - dptr >= hdr->clen + 1 && | 377 | else if (hdr->cname && limit - dptr >= hdr->clen + 1 && |
378 | strnicmp(dptr, hdr->cname, hdr->clen) == 0 && | 378 | strnicmp(dptr, hdr->cname, hdr->clen) == 0 && |
379 | !isalpha(*(dptr + hdr->clen + 1))) | 379 | !isalpha(*(dptr + hdr->clen))) |
380 | dptr += hdr->clen; | 380 | dptr += hdr->clen; |
381 | else | 381 | else |
382 | continue; | 382 | continue; |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 090f24839700..2f3230db7ffb 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -74,8 +74,8 @@ my %VCS_cmds; | |||
74 | my %VCS_cmds_git = ( | 74 | my %VCS_cmds_git = ( |
75 | "execute_cmd" => \&git_execute_cmd, | 75 | "execute_cmd" => \&git_execute_cmd, |
76 | "available" => '(which("git") ne "") && (-d ".git")', | 76 | "available" => '(which("git") ne "") && (-d ".git")', |
77 | "find_signers_cmd" => "git log --since=\$email_git_since -- \$file", | 77 | "find_signers_cmd" => "git log --no-color --since=\$email_git_since -- \$file", |
78 | "find_commit_signers_cmd" => "git log -1 \$commit", | 78 | "find_commit_signers_cmd" => "git log --no-color -1 \$commit", |
79 | "blame_range_cmd" => "git blame -l -L \$diff_start,+\$diff_length \$file", | 79 | "blame_range_cmd" => "git blame -l -L \$diff_start,+\$diff_length \$file", |
80 | "blame_file_cmd" => "git blame -l \$file", | 80 | "blame_file_cmd" => "git blame -l \$file", |
81 | "commit_pattern" => "^commit [0-9a-f]{40,40}", | 81 | "commit_pattern" => "^commit [0-9a-f]{40,40}", |
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index ce3e40b01e48..e950f9cde019 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl | |||
@@ -158,7 +158,7 @@ while (<STDIN>) { | |||
158 | $function = $1; | 158 | $function = $1; |
159 | $func_offset = $2; | 159 | $func_offset = $2; |
160 | } | 160 | } |
161 | if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { | 161 | if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) { |
162 | $function = $1; | 162 | $function = $1; |
163 | $func_offset = $2; | 163 | $func_offset = $2; |
164 | } | 164 | } |