···319319 Symlink to each of the cache devices comprising this cache set. 320320321321cache_available_percent322322- Percentage of cache device free.322322+ Percentage of cache device which doesn't contain dirty data, and could323323+ potentially be used for writeback. This doesn't mean this space isn't used324324+ for clean cached data; the unused statistic (in priority_stats) is typically325325+ much lower.323326324327clear_stats325328 Clears the statistics associated with this cache···426423 Total buckets in this cache427424428425priority_stats429429- Statistics about how recently data in the cache has been accessed. This can430430- reveal your working set size.426426+ Statistics about how recently data in the cache has been accessed.427427+ This can reveal your working set size. Unused is the percentage of428428+ the cache that doesn't contain any data. Metadata is bcache's429429+ metadata overhead. Average is the average priority of cache buckets.430430+ Next is a list of quantiles with the priority threshold of each.431431432432written433433 Sum of all data that has been written to the cache; comparison with
+2-6
Documentation/devices.txt
···498498499499 Each device type has 5 bits (32 minors).500500501501- 13 block 8-bit MFM/RLL/IDE controller502502- 0 = /dev/xda First XT disk whole disk503503- 64 = /dev/xdb Second XT disk whole disk504504-505505- Partitions are handled in the same way as IDE disks506506- (see major number 3).501501+ 13 block Previously used for the XT disk (/dev/xdN)502502+ Deleted in kernel v3.9.507503508504 14 char Open Sound System (OSS)509505 0 = /dev/mixer Mixer control
···11Atmel AT91RM9200 Real Time Clock2233Required properties:44-- compatible: should be: "atmel,at91rm9200-rtc"44+- compatible: should be: "atmel,at91rm9200-rtc" or "atmel,at91sam9x5-rtc"55- reg: physical base address of the controller and length of memory mapped66 region.77- interrupts: rtc alarm/event interrupt
-3
Documentation/kernel-parameters.txt
···33513351 plus one apbt timer for broadcast timer.33523352 x86_mrst_timer=apbt_only | lapic_and_apbt3353335333543354- xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks.33553355- xd_geo= See header of drivers/block/xd.c.33563356-33573354 xen_emul_unplug= [HW,X86,XEN]33583355 Unplug Xen emulated devices33593356 Format: [unplug0,][unplug1]
-2
Documentation/m68k/kernel-options.txt
···8080 /dev/sdd: -> 0x0830 (forth SCSI disk)8181 /dev/sde: -> 0x0840 (fifth SCSI disk)8282 /dev/fd : -> 0x0200 (floppy disk)8383- /dev/xda: -> 0x0c00 (first XT disk, unused in Linux/m68k)8484- /dev/xdb: -> 0x0c40 (second XT disk, unused in Linux/m68k)85838684 The name must be followed by a decimal number, that stands for the8785partition number. Internally, the value of the number is just
+3-4
MAINTAINERS
···57665766L: linux-nvme@lists.infradead.org57675767T: git git://git.infradead.org/users/willy/linux-nvme.git57685768S: Supported57695769-F: drivers/block/nvme.c57695769+F: drivers/block/nvme*57705770F: include/linux/nvme.h5771577157725772OMAP SUPPORT···76247624SPI SUBSYSTEM76257625M: Mark Brown <broonie@kernel.org>76267626M: Grant Likely <grant.likely@linaro.org>76277627-L: spi-devel-general@lists.sourceforge.net76277627+L: linux-spi@vger.kernel.org76287628T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git76297629Q: http://patchwork.kernel.org/project/spi-devel-general/list/76307630S: Maintained···90049004F: drivers/net/wireless/wl3501*9005900590069006WM97XX TOUCHSCREEN DRIVERS90079007-M: Mark Brown <broonie@opensource.wolfsonmicro.com>90079007+M: Mark Brown <broonie@kernel.org>90089008M: Liam Girdwood <lrg@slimlogic.co.uk>90099009L: linux-input@vger.kernel.org90109010T: git git://opensource.wolfsonmicro.com/linux-2.6-touch···90149014F: include/linux/wm97xx.h9015901590169016WOLFSON MICROELECTRONICS DRIVERS90179017-M: Mark Brown <broonie@opensource.wolfsonmicro.com>90189017L: patches@opensource.wolfsonmicro.com90199018T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc90209019T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
···546546 /* Clear any pending PRCM interrupts */547547 omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);548548549549- if (omap3_has_iva())550550- omap3_iva_idle();549549+ /*550550+ * We need to idle iva2_pwrdm even on am3703 with no iva2.551551+ */552552+ omap3_iva_idle();551553552554 omap3_d2d_idle();553555}
+4-2
arch/arm/mach-prima2/pm.c
···101101 struct device_node *np;102102103103 np = of_find_matching_node(NULL, pwrc_ids);104104- if (!np)105105- panic("unable to find compatible pwrc node in dtb\n");104104+ if (!np) {105105+ pr_err("unable to find compatible sirf pwrc node in dtb\n");106106+ return -ENOENT;107107+ }106108107109 /*108110 * pwrc behind rtciobrg is not located in memory space
+4-2
arch/arm/mach-prima2/rstc.c
···2828 struct device_node *np;29293030 np = of_find_matching_node(NULL, rstc_ids);3131- if (!np)3232- panic("unable to find compatible rstc node in dtb\n");3131+ if (!np) {3232+ pr_err("unable to find compatible sirf rstc node in dtb\n");3333+ return -ENOENT;3434+ }33353436 sirfsoc_rstc_base = of_iomap(np, 0);3537 if (!sirfsoc_rstc_base)
+13-5
arch/arm/plat-samsung/pm.c
···1616#include <linux/suspend.h>1717#include <linux/errno.h>1818#include <linux/delay.h>1919+#include <linux/of.h>1920#include <linux/serial_core.h>2021#include <linux/io.h>2122···262261 * require a full power-cycle)263262 */264263265265- if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) &&264264+ if (!of_have_populated_dt() &&265265+ !any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) &&266266 !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) {267267 printk(KERN_ERR "%s: No wake-up sources!\n", __func__);268268 printk(KERN_ERR "%s: Aborting sleep\n", __func__);···272270273271 /* save all necessary core registers not covered by the drivers */274272275275- samsung_pm_save_gpios();276276- samsung_pm_saved_gpios();273273+ if (!of_have_populated_dt()) {274274+ samsung_pm_save_gpios();275275+ samsung_pm_saved_gpios();276276+ }277277+277278 s3c_pm_save_uarts();278279 s3c_pm_save_core();279280···315310316311 s3c_pm_restore_core();317312 s3c_pm_restore_uarts();318318- samsung_pm_restore_gpios();319319- s3c_pm_restored_gpios();313313+314314+ if (!of_have_populated_dt()) {315315+ samsung_pm_restore_gpios();316316+ s3c_pm_restored_gpios();317317+ }320318321319 s3c_pm_debug_init();322320
+1-1
arch/mips/include/asm/mmu_context.h
···117117 if (! ((asid += ASID_INC) & ASID_MASK) ) {118118 if (cpu_has_vtag_icache)119119 flush_icache_all();120120-#ifdef CONFIG_VIRTUALIZATION120120+#ifdef CONFIG_KVM121121 kvm_local_flush_tlb_all(); /* start new asid cycle */122122#else123123 local_flush_tlb_all(); /* start new asid cycle */
+39-42
arch/mips/include/uapi/asm/kvm.h
···5858 * bits[2..0] - Register 'sel' index.5959 * bits[7..3] - Register 'rd' index.6060 * bits[15..8] - Must be zero.6161- * bits[63..16] - 1 -> CP0 registers.6161+ * bits[31..16] - 1 -> CP0 registers.6262+ * bits[51..32] - Must be zero.6363+ * bits[63..52] - As per linux/kvm.h6264 *6365 * Other sets registers may be added in the future. Each set would6464- * have its own identifier in bits[63..16].6565- *6666- * The addr field of struct kvm_one_reg must point to an aligned6767- * 64-bit wide location. For registers that are narrower than6868- * 64-bits, the value is stored in the low order bits of the location,6969- * and sign extended to 64-bits.6666+ * have its own identifier in bits[31..16].7067 *7168 * The registers defined in struct kvm_regs are also accessible, the7269 * id values for these are below.7370 */74717575-#define KVM_REG_MIPS_R0 07676-#define KVM_REG_MIPS_R1 17777-#define KVM_REG_MIPS_R2 27878-#define KVM_REG_MIPS_R3 37979-#define KVM_REG_MIPS_R4 48080-#define KVM_REG_MIPS_R5 58181-#define KVM_REG_MIPS_R6 68282-#define KVM_REG_MIPS_R7 78383-#define KVM_REG_MIPS_R8 88484-#define KVM_REG_MIPS_R9 98585-#define KVM_REG_MIPS_R10 108686-#define KVM_REG_MIPS_R11 118787-#define KVM_REG_MIPS_R12 128888-#define KVM_REG_MIPS_R13 138989-#define KVM_REG_MIPS_R14 149090-#define KVM_REG_MIPS_R15 159191-#define KVM_REG_MIPS_R16 169292-#define KVM_REG_MIPS_R17 179393-#define KVM_REG_MIPS_R18 189494-#define KVM_REG_MIPS_R19 199595-#define KVM_REG_MIPS_R20 209696-#define KVM_REG_MIPS_R21 219797-#define KVM_REG_MIPS_R22 229898-#define KVM_REG_MIPS_R23 239999-#define KVM_REG_MIPS_R24 24100100-#define KVM_REG_MIPS_R25 25101101-#define KVM_REG_MIPS_R26 26102102-#define KVM_REG_MIPS_R27 27103103-#define KVM_REG_MIPS_R28 28104104-#define KVM_REG_MIPS_R29 29105105-#define KVM_REG_MIPS_R30 30106106-#define KVM_REG_MIPS_R31 317272+#define KVM_REG_MIPS_R0 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0)7373+#define KVM_REG_MIPS_R1 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 1)7474+#define KVM_REG_MIPS_R2 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 2)7575+#define KVM_REG_MIPS_R3 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 3)7676+#define KVM_REG_MIPS_R4 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 4)7777+#define KVM_REG_MIPS_R5 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 5)7878+#define KVM_REG_MIPS_R6 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 6)7979+#define KVM_REG_MIPS_R7 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 7)8080+#define KVM_REG_MIPS_R8 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 8)8181+#define KVM_REG_MIPS_R9 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 9)8282+#define KVM_REG_MIPS_R10 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 10)8383+#define KVM_REG_MIPS_R11 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 11)8484+#define KVM_REG_MIPS_R12 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 12)8585+#define KVM_REG_MIPS_R13 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 13)8686+#define KVM_REG_MIPS_R14 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 14)8787+#define KVM_REG_MIPS_R15 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 15)8888+#define KVM_REG_MIPS_R16 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 16)8989+#define KVM_REG_MIPS_R17 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 17)9090+#define KVM_REG_MIPS_R18 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 18)9191+#define KVM_REG_MIPS_R19 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 19)9292+#define KVM_REG_MIPS_R20 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 20)9393+#define KVM_REG_MIPS_R21 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 21)9494+#define KVM_REG_MIPS_R22 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 22)9595+#define KVM_REG_MIPS_R23 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 23)9696+#define KVM_REG_MIPS_R24 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 24)9797+#define KVM_REG_MIPS_R25 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 25)9898+#define KVM_REG_MIPS_R26 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 26)9999+#define KVM_REG_MIPS_R27 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 27)100100+#define KVM_REG_MIPS_R28 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 28)101101+#define KVM_REG_MIPS_R29 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 29)102102+#define KVM_REG_MIPS_R30 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 30)103103+#define KVM_REG_MIPS_R31 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 31)107104108108-#define KVM_REG_MIPS_HI 32109109-#define KVM_REG_MIPS_LO 33110110-#define KVM_REG_MIPS_PC 34105105+#define KVM_REG_MIPS_HI (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 32)106106+#define KVM_REG_MIPS_LO (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 33)107107+#define KVM_REG_MIPS_PC (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 34)111108112109/*113110 * KVM MIPS specific structures and definitions
+4
arch/mips/kernel/ftrace.c
···2525#define MCOUNT_OFFSET_INSNS 42626#endif27272828+#ifdef CONFIG_DYNAMIC_FTRACE2929+2830/* Arch override because MIPS doesn't need to run this from stop_machine() */2931void arch_ftrace_update_code(int command)3032{3133 ftrace_modify_all_code(command);3234}3535+3636+#endif33373438/*3539 * Check if the address is in kernel space
+7-6
arch/mips/kernel/idle.c
···9393}94949595/*9696- * The Au1xxx wait is available only if using 32khz counter or9797- * external timer source, but specifically not CP0 Counter.9898- * alchemy/common/time.c may override cpu_wait!9696+ * Au1 'wait' is only useful when the 32kHz counter is used as timer,9797+ * since coreclock (and the cp0 counter) stops upon executing it. Only an9898+ * interrupt can wake it, so they must be enabled before entering idle modes.9999 */100100static void au1k_wait(void)101101{102102+ unsigned long c0status = read_c0_status() | 1; /* irqs on */103103+102104 __asm__(103105 " .set mips3 \n"104106 " cache 0x14, 0(%0) \n"105107 " cache 0x14, 32(%0) \n"106108 " sync \n"107107- " nop \n"109109+ " mtc0 %1, $12 \n" /* wr c0status */108110 " wait \n"109111 " nop \n"110112 " nop \n"111113 " nop \n"112114 " nop \n"113115 " .set mips0 \n"114114- : : "r" (au1k_wait));115115- local_irq_enable();116116+ : : "r" (au1k_wait), "r" (c0status));116117}117118118119static int __initdata nowait;
···513513 */514514#define STD_EXCEPTION_COMMON_ASYNC(trap, label, hdlr) \515515 EXCEPTION_COMMON(trap, label, hdlr, ret_from_except_lite, \516516- FINISH_NAP;RUNLATCH_ON;DISABLE_INTS)516516+ FINISH_NAP;DISABLE_INTS;RUNLATCH_ON)517517518518/*519519 * When the idle code in power4_idle puts the CPU into NAP mode,
···454454 xori r10,r10,(MSR_FE0|MSR_FE1)455455 mtmsrd r10456456 sync457457- fmr 0,0458458- fmr 1,1459459- fmr 2,2460460- fmr 3,3461461- fmr 4,4462462- fmr 5,5463463- fmr 6,6464464- fmr 7,7465465- fmr 8,8466466- fmr 9,9467467- fmr 10,10468468- fmr 11,11469469- fmr 12,12470470- fmr 13,13471471- fmr 14,14472472- fmr 15,15473473- fmr 16,16474474- fmr 17,17475475- fmr 18,18476476- fmr 19,19477477- fmr 20,20478478- fmr 21,21479479- fmr 22,22480480- fmr 23,23481481- fmr 24,24482482- fmr 25,25483483- fmr 26,26484484- fmr 27,27485485- fmr 28,28486486- fmr 29,29487487- fmr 30,30488488- fmr 31,31457457+458458+#define FMR2(n) fmr (n), (n) ; fmr n+1, n+1459459+#define FMR4(n) FMR2(n) ; FMR2(n+2)460460+#define FMR8(n) FMR4(n) ; FMR4(n+4)461461+#define FMR16(n) FMR8(n) ; FMR8(n+8)462462+#define FMR32(n) FMR16(n) ; FMR16(n+16)463463+ FMR32(0)464464+489465FTR_SECTION_ELSE490466/*491467 * To denormalise we need to move a copy of the register to itself.···471495 oris r10,r10,MSR_VSX@h472496 mtmsrd r10473497 sync474474- XVCPSGNDP(0,0,0)475475- XVCPSGNDP(1,1,1)476476- XVCPSGNDP(2,2,2)477477- XVCPSGNDP(3,3,3)478478- XVCPSGNDP(4,4,4)479479- XVCPSGNDP(5,5,5)480480- XVCPSGNDP(6,6,6)481481- XVCPSGNDP(7,7,7)482482- XVCPSGNDP(8,8,8)483483- XVCPSGNDP(9,9,9)484484- XVCPSGNDP(10,10,10)485485- XVCPSGNDP(11,11,11)486486- XVCPSGNDP(12,12,12)487487- XVCPSGNDP(13,13,13)488488- XVCPSGNDP(14,14,14)489489- XVCPSGNDP(15,15,15)490490- XVCPSGNDP(16,16,16)491491- XVCPSGNDP(17,17,17)492492- XVCPSGNDP(18,18,18)493493- XVCPSGNDP(19,19,19)494494- XVCPSGNDP(20,20,20)495495- XVCPSGNDP(21,21,21)496496- XVCPSGNDP(22,22,22)497497- XVCPSGNDP(23,23,23)498498- XVCPSGNDP(24,24,24)499499- XVCPSGNDP(25,25,25)500500- XVCPSGNDP(26,26,26)501501- XVCPSGNDP(27,27,27)502502- XVCPSGNDP(28,28,28)503503- XVCPSGNDP(29,29,29)504504- XVCPSGNDP(30,30,30)505505- XVCPSGNDP(31,31,31)498498+499499+#define XVCPSGNDP2(n) XVCPSGNDP(n,n,n) ; XVCPSGNDP(n+1,n+1,n+1)500500+#define XVCPSGNDP4(n) XVCPSGNDP2(n) ; XVCPSGNDP2(n+2)501501+#define XVCPSGNDP8(n) XVCPSGNDP4(n) ; XVCPSGNDP4(n+4)502502+#define XVCPSGNDP16(n) XVCPSGNDP8(n) ; XVCPSGNDP8(n+8)503503+#define XVCPSGNDP32(n) XVCPSGNDP16(n) ; XVCPSGNDP16(n+16)504504+ XVCPSGNDP32(0)505505+506506ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_206)507507+508508+BEGIN_FTR_SECTION509509+ b denorm_done510510+END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)511511+/*512512+ * To denormalise we need to move a copy of the register to itself.513513+ * For POWER8 we need to do that for all 64 VSX registers514514+ */515515+ XVCPSGNDP32(32)516516+denorm_done:507517 mtspr SPRN_HSRR0,r11508518 mtcrf 0x80,r9509519 ld r9,PACA_EXGEN+EX_R9(r13)···683721 STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)684722 STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)685723 STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)686686- STD_EXCEPTION_COMMON(0xe40, emulation_assist, .program_check_exception)724724+ STD_EXCEPTION_COMMON(0xe40, emulation_assist, .emulation_assist_interrupt)687725 STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception)688726#ifdef CONFIG_PPC_DOORBELL689727 STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, .doorbell_exception)
+1-1
arch/powerpc/kernel/irq.c
···162162 * in case we also had a rollover while hard disabled163163 */164164 local_paca->irq_happened &= ~PACA_IRQ_DEC;165165- if (decrementer_check_overflow())165165+ if ((happened & PACA_IRQ_DEC) || decrementer_check_overflow())166166 return 0x900;167167168168 /* Finally check if an external interrupt happened */
+3-1
arch/powerpc/kernel/pci-common.c
···827827 }828828 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {829829 struct resource *res = dev->resource + i;830830+ struct pci_bus_region reg;830831 if (!res->flags)831832 continue;832833···836835 * at 0 as unset as well, except if PCI_PROBE_ONLY is also set837836 * since in that case, we don't want to re-assign anything838837 */838838+ pcibios_resource_to_bus(dev, ®, res);839839 if (pci_has_flag(PCI_REASSIGN_ALL_RSRC) ||840840- (res->start == 0 && !pci_has_flag(PCI_PROBE_ONLY))) {840840+ (reg.start == 0 && !pci_has_flag(PCI_PROBE_ONLY))) {841841 /* Only print message if not re-assigning */842842 if (!pci_has_flag(PCI_REASSIGN_ALL_RSRC))843843 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] "
+4-3
arch/powerpc/kernel/process.c
···399399static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)400400{401401 mtspr(SPRN_DABR, dabr);402402- mtspr(SPRN_DABRX, dabrx);402402+ if (cpu_has_feature(CPU_FTR_DABRX))403403+ mtspr(SPRN_DABRX, dabrx);403404 return 0;404405}405406#else···1369136813701369#ifdef CONFIG_PPC6413711370/* Called with hard IRQs off */13721372-void __ppc64_runlatch_on(void)13711371+void notrace __ppc64_runlatch_on(void)13731372{13741373 struct thread_info *ti = current_thread_info();13751374 unsigned long ctrl;···13821381}1383138213841383/* Called with hard IRQs off */13851385-void __ppc64_runlatch_off(void)13841384+void notrace __ppc64_runlatch_off(void)13861385{13871386 struct thread_info *ti = current_thread_info();13881387 unsigned long ctrl;
+10
arch/powerpc/kernel/traps.c
···11651165 exception_exit(prev_state);11661166}1167116711681168+/*11691169+ * This occurs when running in hypervisor mode on POWER6 or later11701170+ * and an illegal instruction is encountered.11711171+ */11721172+void __kprobes emulation_assist_interrupt(struct pt_regs *regs)11731173+{11741174+ regs->msr |= REASON_ILLEGAL;11751175+ program_check_exception(regs);11761176+}11771177+11681178void alignment_exception(struct pt_regs *regs)11691179{11701180 enum ctx_state prev_state = exception_enter();
···832832{833833 int r = RESUME_HOST;834834 int s;835835+ int idx;836836+837837+#ifdef CONFIG_PPC64838838+ WARN_ON(local_paca->irq_happened != 0);839839+#endif840840+841841+ /*842842+ * We enter with interrupts disabled in hardware, but843843+ * we need to call hard_irq_disable anyway to ensure that844844+ * the software state is kept in sync.845845+ */846846+ hard_irq_disable();835847836848 /* update before a new last_exit_type is rewritten */837849 kvmppc_update_timing_stats(vcpu);···10651053 break;10661054 }1067105510561056+ idx = srcu_read_lock(&vcpu->kvm->srcu);10571057+10681058 gpaddr = kvmppc_mmu_xlate(vcpu, gtlb_index, eaddr);10691059 gfn = gpaddr >> PAGE_SHIFT;10701060···10891075 kvmppc_account_exit(vcpu, MMIO_EXITS);10901076 }1091107710781078+ srcu_read_unlock(&vcpu->kvm->srcu, idx);10921079 break;10931080 }10941081···1113109811141099 kvmppc_account_exit(vcpu, ITLB_VIRT_MISS_EXITS);1115110011011101+ idx = srcu_read_lock(&vcpu->kvm->srcu);11021102+11161103 gpaddr = kvmppc_mmu_xlate(vcpu, gtlb_index, eaddr);11171104 gfn = gpaddr >> PAGE_SHIFT;11181105···11311114 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_MACHINE_CHECK);11321115 }1133111611171117+ srcu_read_unlock(&vcpu->kvm->srcu, idx);11341118 break;11351119 }11361120
+5
arch/powerpc/kvm/e500_mmu.c
···396396 struct kvm_book3e_206_tlb_entry *gtlbe;397397 int tlbsel, esel;398398 int recal = 0;399399+ int idx;399400400401 tlbsel = get_tlb_tlbsel(vcpu);401402 esel = get_tlb_esel(vcpu, tlbsel);···431430 kvmppc_set_tlb1map_range(vcpu, gtlbe);432431 }433432433433+ idx = srcu_read_lock(&vcpu->kvm->srcu);434434+434435 /* Invalidate shadow mappings for the about-to-be-clobbered TLBE. */435436 if (tlbe_is_host_safe(vcpu, gtlbe)) {436437 u64 eaddr = get_tlb_eaddr(gtlbe);···446443 /* Premap the faulting page */447444 kvmppc_mmu_map(vcpu, eaddr, raddr, index_of(tlbsel, esel));448445 }446446+447447+ srcu_read_unlock(&vcpu->kvm->srcu, idx);449448450449 kvmppc_set_exit_type(vcpu, EMULATED_TLBWE_EXITS);451450 return EMULATE_DONE;
-2
arch/powerpc/kvm/e500mc.c
···177177 r = 0;178178 else if (strcmp(cur_cpu_spec->cpu_name, "e5500") == 0)179179 r = 0;180180- else if (strcmp(cur_cpu_spec->cpu_name, "e6500") == 0)181181- r = 0;182180 else183181 r = -ENOTSUPP;184182
···311311 spin_unlock(&ma_subclass_lock);312312}313313EXPORT_SYMBOL(measurement_alert_subclass_unregister);314314+315315+void synchronize_irq(unsigned int irq)316316+{317317+ /*318318+ * Not needed, the handler is protected by a lock and IRQs that occur319319+ * after the handler is deleted are just NOPs.320320+ */321321+}322322+EXPORT_SYMBOL_GPL(synchronize_irq);323323+324324+#ifndef CONFIG_PCI325325+326326+/* Only PCI devices have dynamically-defined IRQ handlers */327327+328328+int request_irq(unsigned int irq, irq_handler_t handler,329329+ unsigned long irqflags, const char *devname, void *dev_id)330330+{331331+ return -EINVAL;332332+}333333+EXPORT_SYMBOL_GPL(request_irq);334334+335335+void free_irq(unsigned int irq, void *dev_id)336336+{337337+ WARN_ON(1);338338+}339339+EXPORT_SYMBOL_GPL(free_irq);340340+341341+void enable_irq(unsigned int irq)342342+{343343+ WARN_ON(1);344344+}345345+EXPORT_SYMBOL_GPL(enable_irq);346346+347347+void disable_irq(unsigned int irq)348348+{349349+ WARN_ON(1);350350+}351351+EXPORT_SYMBOL_GPL(disable_irq);352352+353353+#endif /* !CONFIG_PCI */354354+355355+void disable_irq_nosync(unsigned int irq)356356+{357357+ disable_irq(irq);358358+}359359+EXPORT_SYMBOL_GPL(disable_irq_nosync);360360+361361+unsigned long probe_irq_on(void)362362+{363363+ return 0;364364+}365365+EXPORT_SYMBOL_GPL(probe_irq_on);366366+367367+int probe_irq_off(unsigned long val)368368+{369369+ return 0;370370+}371371+EXPORT_SYMBOL_GPL(probe_irq_off);372372+373373+unsigned int probe_irq_mask(unsigned long val)374374+{375375+ return val;376376+}377377+EXPORT_SYMBOL_GPL(probe_irq_mask);
+1-1
arch/s390/kernel/sclp.S
···225225 ahi %r2,1226226 ltr %r0,%r0 # end of string?227227 jz .LfinalizemtoS4228228- chi %r0,0x15 # end of line (NL)?228228+ chi %r0,0x0a # end of line (NL)?229229 jz .LfinalizemtoS4230230 stc %r0,0(%r6,%r7) # copy to mto231231 la %r11,0(%r6,%r7)
-33
arch/s390/pci/pci.c
···302302 return rc;303303}304304305305-void synchronize_irq(unsigned int irq)306306-{307307- /*308308- * Not needed, the handler is protected by a lock and IRQs that occur309309- * after the handler is deleted are just NOPs.310310- */311311-}312312-EXPORT_SYMBOL_GPL(synchronize_irq);313313-314305void enable_irq(unsigned int irq)315306{316307 struct msi_desc *msi = irq_get_msi_desc(irq);···317326 zpci_msi_set_mask_bits(msi, 1, 1);318327}319328EXPORT_SYMBOL_GPL(disable_irq);320320-321321-void disable_irq_nosync(unsigned int irq)322322-{323323- disable_irq(irq);324324-}325325-EXPORT_SYMBOL_GPL(disable_irq_nosync);326326-327327-unsigned long probe_irq_on(void)328328-{329329- return 0;330330-}331331-EXPORT_SYMBOL_GPL(probe_irq_on);332332-333333-int probe_irq_off(unsigned long val)334334-{335335- return 0;336336-}337337-EXPORT_SYMBOL_GPL(probe_irq_off);338338-339339-unsigned int probe_irq_mask(unsigned long val)340340-{341341- return val;342342-}343343-EXPORT_SYMBOL_GPL(probe_irq_mask);344329345330void pcibios_fixup_bus(struct pci_bus *bus)346331{
···1717#include <linux/slab.h>1818#include <linux/smp.h>1919#include <linux/irq_work.h>2020+#include <linux/tick.h>20212122#include <asm/paravirt.h>2223#include <asm/desc.h>···448447 play_dead_common();449448 HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);450449 cpu_bringup();450450+ /*451451+ * commit 4b0c0f294 (tick: Cleanup NOHZ per cpu data on cpu down)452452+ * clears certain data that the cpu_idle loop (which called us453453+ * and that we return from) expects. The only way to get that454454+ * data back is to call:455455+ */456456+ tick_nohz_idle_enter();451457}452458453459#else /* !CONFIG_HOTPLUG_CPU */
···519519};520520521521/*522522- * Initialize an rbd client instance.523523- * We own *ceph_opts.522522+ * Initialize an rbd client instance. Success or not, this function523523+ * consumes ceph_opts.524524 */525525static struct rbd_client *rbd_client_create(struct ceph_options *ceph_opts)526526{···675675676676/*677677 * Get a ceph client with specific addr and configuration, if one does678678- * not exist create it.678678+ * not exist create it. Either way, ceph_opts is consumed by this679679+ * function.679680 */680681static struct rbd_client *rbd_get_client(struct ceph_options *ceph_opts)681682{···46984697 return ret;46994698}4700469947014701-/* Undo whatever state changes are made by v1 or v2 image probe */47024702-47004700+/*47014701+ * Undo whatever state changes are made by v1 or v2 header info47024702+ * call.47034703+ */47034704static void rbd_dev_unprobe(struct rbd_device *rbd_dev)47044705{47054706 struct rbd_image_header *header;···49054902 int tmp;4906490349074904 /*49084908- * Get the id from the image id object. If it's not a49094909- * format 2 image, we'll get ENOENT back, and we'll assume49104910- * it's a format 1 image.49054905+ * Get the id from the image id object. Unless there's an49064906+ * error, rbd_dev->spec->image_id will be filled in with49074907+ * a dynamically-allocated string, and rbd_dev->image_format49084908+ * will be set to either 1 or 2.49114909 */49124910 ret = rbd_dev_image_id(rbd_dev);49134911 if (ret)···49964992 rc = PTR_ERR(rbdc);49974993 goto err_out_args;49984994 }49994999- ceph_opts = NULL; /* rbd_dev client now owns this */5000499550014996 /* pick the pool */50024997 osdc = &rbdc->client->osdc;···50305027 rbd_dev->mapping.read_only = read_only;5031502850325029 rc = rbd_dev_device_setup(rbd_dev);50335033- if (!rc)50345034- return count;50305030+ if (rc) {50315031+ rbd_dev_image_release(rbd_dev);50325032+ goto err_out_module;50335033+ }5035503450365036- rbd_dev_image_release(rbd_dev);50355035+ return count;50365036+50375037err_out_rbd_dev:50385038 rbd_dev_destroy(rbd_dev);50395039err_out_client:50405040 rbd_put_client(rbdc);50415041err_out_args:50425042- if (ceph_opts)50435043- ceph_destroy_options(ceph_opts);50445044- kfree(rbd_opts);50455042 rbd_spec_put(spec);50465043err_out_module:50475044 module_put(THIS_MODULE);
+2-2
drivers/bluetooth/Kconfig
···201201 The core driver to support Marvell Bluetooth devices.202202203203 This driver is required if you want to support204204- Marvell Bluetooth devices, such as 8688/8787/8797.204204+ Marvell Bluetooth devices, such as 8688/8787/8797/8897.205205206206 Say Y here to compile Marvell Bluetooth driver207207 into the kernel or say M to compile it as module.···214214 The driver for Marvell Bluetooth chipsets with SDIO interface.215215216216 This driver is required if you want to use Marvell Bluetooth217217- devices with SDIO interface. Currently SD8688/SD8787/SD8797217217+ devices with SDIO interface. Currently SD8688/SD8787/SD8797/SD8897218218 chipsets are supported.219219220220 Say Y here to compile support for Marvell BT-over-SDIO driver
···14621462 size_t addr = 0;14631463 struct gtt_range *gt;14641464 struct drm_gem_object *obj;14651465- int ret;14651465+ int ret = 0;1466146614671467 /* if we want to turn of the cursor ignore width and height */14681468 if (!handle) {···1499149915001500 if (obj->size < width * height * 4) {15011501 dev_dbg(dev->dev, "buffer is to small\n");15021502- return -ENOMEM;15021502+ ret = -ENOMEM;15031503+ goto unref_cursor;15031504 }1504150515051506 gt = container_of(obj, struct gtt_range, gem);···15091508 ret = psb_gtt_pin(gt);15101509 if (ret) {15111510 dev_err(dev->dev, "Can not pin down handle 0x%x\n", handle);15121512- return ret;15111511+ goto unref_cursor;15131512 }1514151315151514 addr = gt->offset; /* Or resource.start ??? */···15331532 struct gtt_range, gem);15341533 psb_gtt_unpin(gt);15351534 drm_gem_object_unreference(psb_intel_crtc->cursor_obj);15361536- psb_intel_crtc->cursor_obj = obj;15371535 }15381538- return 0;15361536+15371537+ psb_intel_crtc->cursor_obj = obj;15381538+ return ret;15391539+15401540+unref_cursor:15411541+ drm_gem_object_unreference(obj);15421542+ return ret;15391543}1540154415411545static int cdv_intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)···17561750 kfree(psb_intel_crtc);17571751}1758175217531753+static void cdv_intel_crtc_disable(struct drm_crtc *crtc)17541754+{17551755+ struct gtt_range *gt;17561756+ struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;17571757+17581758+ crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);17591759+17601760+ if (crtc->fb) {17611761+ gt = to_psb_fb(crtc->fb)->gtt;17621762+ psb_gtt_unpin(gt);17631763+ }17641764+}17651765+17591766const struct drm_crtc_helper_funcs cdv_intel_helper_funcs = {17601767 .dpms = cdv_intel_crtc_dpms,17611768 .mode_fixup = cdv_intel_crtc_mode_fixup,···17761757 .mode_set_base = cdv_intel_pipe_set_base,17771758 .prepare = cdv_intel_crtc_prepare,17781759 .commit = cdv_intel_crtc_commit,17601760+ .disable = cdv_intel_crtc_disable,17791761};1780176217811763const struct drm_crtc_funcs cdv_intel_crtc_funcs = {
+2-2
drivers/gpu/drm/gma500/framebuffer.c
···121121 unsigned long address;122122 int ret;123123 unsigned long pfn;124124- /* FIXME: assumes fb at stolen base which may not be true */125125- unsigned long phys_addr = (unsigned long)dev_priv->stolen_base;124124+ unsigned long phys_addr = (unsigned long)dev_priv->stolen_base +125125+ psbfb->gtt->offset;126126127127 page_num = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;128128 address = (unsigned long)vmf->virtual_address - (vmf->pgoff << PAGE_SHIFT);
+27-6
drivers/gpu/drm/gma500/psb_intel_display.c
···843843 struct gtt_range *cursor_gt = psb_intel_crtc->cursor_gt;844844 struct drm_gem_object *obj;845845 void *tmp_dst, *tmp_src;846846- int ret, i, cursor_pages;846846+ int ret = 0, i, cursor_pages;847847848848 /* if we want to turn of the cursor ignore width and height */849849 if (!handle) {···880880881881 if (obj->size < width * height * 4) {882882 dev_dbg(dev->dev, "buffer is to small\n");883883- return -ENOMEM;883883+ ret = -ENOMEM;884884+ goto unref_cursor;884885 }885886886887 gt = container_of(obj, struct gtt_range, gem);···890889 ret = psb_gtt_pin(gt);891890 if (ret) {892891 dev_err(dev->dev, "Can not pin down handle 0x%x\n", handle);893893- return ret;892892+ goto unref_cursor;894893 }895894896895 if (dev_priv->ops->cursor_needs_phys) {897896 if (cursor_gt == NULL) {898897 dev_err(dev->dev, "No hardware cursor mem available");899899- return -ENOMEM;898898+ ret = -ENOMEM;899899+ goto unref_cursor;900900 }901901902902 /* Prevent overflow */···938936 struct gtt_range, gem);939937 psb_gtt_unpin(gt);940938 drm_gem_object_unreference(psb_intel_crtc->cursor_obj);941941- psb_intel_crtc->cursor_obj = obj;942939 }943943- return 0;940940+941941+ psb_intel_crtc->cursor_obj = obj;942942+ return ret;943943+944944+unref_cursor:945945+ drm_gem_object_unreference(obj);946946+ return ret;944947}945948946949static int psb_intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)···11571150 kfree(psb_intel_crtc);11581151}1159115211531153+static void psb_intel_crtc_disable(struct drm_crtc *crtc)11541154+{11551155+ struct gtt_range *gt;11561156+ struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;11571157+11581158+ crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);11591159+11601160+ if (crtc->fb) {11611161+ gt = to_psb_fb(crtc->fb)->gtt;11621162+ psb_gtt_unpin(gt);11631163+ }11641164+}11651165+11601166const struct drm_crtc_helper_funcs psb_intel_helper_funcs = {11611167 .dpms = psb_intel_crtc_dpms,11621168 .mode_fixup = psb_intel_crtc_mode_fixup,···11771157 .mode_set_base = psb_intel_pipe_set_base,11781158 .prepare = psb_intel_crtc_prepare,11791159 .commit = psb_intel_crtc_commit,11601160+ .disable = psb_intel_crtc_disable,11801161};1181116211821163const struct drm_crtc_funcs psb_intel_crtc_funcs = {
+14-10
drivers/gpu/drm/i915/intel_sdvo.c
···17771777 * arranged in priority order.17781778 */17791779 intel_ddc_get_modes(connector, &intel_sdvo->ddc);17801780- if (list_empty(&connector->probed_modes) == false)17811781- goto end;1782178017831783- /* Fetch modes from VBT */17811781+ /*17821782+ * Fetch modes from VBT. For SDVO prefer the VBT mode since some17831783+ * SDVO->LVDS transcoders can't cope with the EDID mode. Since17841784+ * drm_mode_probed_add adds the mode at the head of the list we add it17851785+ * last.17861786+ */17841787 if (dev_priv->sdvo_lvds_vbt_mode != NULL) {17851788 newmode = drm_mode_duplicate(connector->dev,17861789 dev_priv->sdvo_lvds_vbt_mode);···17951792 }17961793 }1797179417981798-end:17991795 list_for_each_entry(newmode, &connector->probed_modes, head) {18001796 if (newmode->type & DRM_MODE_TYPE_PREFERRED) {18011797 intel_sdvo->sdvo_lvds_fixed_mode =···27922790 SDVOB_HOTPLUG_INT_STATUS_I915 : SDVOC_HOTPLUG_INT_STATUS_I915;27932791 }2794279227952795- /* Only enable the hotplug irq if we need it, to work around noisy27962796- * hotplug lines.27972797- */27982798- if (intel_sdvo->hotplug_active)27992799- intel_encoder->hpd_pin = HPD_SDVO_B ? HPD_SDVO_B : HPD_SDVO_C;28002800-28012793 intel_encoder->compute_config = intel_sdvo_compute_config;28022794 intel_encoder->disable = intel_disable_sdvo;28032795 intel_encoder->mode_set = intel_sdvo_mode_set;···28082812 SDVO_NAME(intel_sdvo));28092813 /* Output_setup can leave behind connectors! */28102814 goto err_output;28152815+ }28162816+28172817+ /* Only enable the hotplug irq if we need it, to work around noisy28182818+ * hotplug lines.28192819+ */28202820+ if (intel_sdvo->hotplug_active) {28212821+ intel_encoder->hpd_pin =28222822+ intel_sdvo->is_sdvob ? HPD_SDVO_B : HPD_SDVO_C;28112823 }2812282428132825 /*
···331331 man_id = i2c_smbus_read_byte_data(client, ADM1021_REG_MAN_ID);332332 dev_id = i2c_smbus_read_byte_data(client, ADM1021_REG_DEV_ID);333333334334+ if (man_id < 0 || dev_id < 0)335335+ return -ENODEV;336336+334337 if (man_id == 0x4d && dev_id == 0x01)335338 type_name = "max1617a";336339 else if (man_id == 0x41) {337340 if ((dev_id & 0xF0) == 0x30)338341 type_name = "adm1023";339339- else342342+ else if ((dev_id & 0xF0) == 0x00)340343 type_name = "adm1021";344344+ else345345+ return -ENODEV;341346 } else if (man_id == 0x49)342347 type_name = "thmc10";343348 else if (man_id == 0x23)344349 type_name = "gl523sm";345350 else if (man_id == 0x54)346351 type_name = "mc1066";347347- /* LM84 Mfr ID in a different place, and it has more unused bits */348348- else if (conv_rate == 0x00349349- && (config & 0x7F) == 0x00350350- && (status & 0xAB) == 0x00)351351- type_name = "lm84";352352- else353353- type_name = "max1617";352352+ else {353353+ int lte, rte, lhi, rhi, llo, rlo;354354+355355+ /* extra checks for LM84 and MAX1617 to avoid misdetections */356356+357357+ llo = i2c_smbus_read_byte_data(client, ADM1021_REG_THYST_R(0));358358+ rlo = i2c_smbus_read_byte_data(client, ADM1021_REG_THYST_R(1));359359+360360+ /* fail if any of the additional register reads failed */361361+ if (llo < 0 || rlo < 0)362362+ return -ENODEV;363363+364364+ lte = i2c_smbus_read_byte_data(client, ADM1021_REG_TEMP(0));365365+ rte = i2c_smbus_read_byte_data(client, ADM1021_REG_TEMP(1));366366+ lhi = i2c_smbus_read_byte_data(client, ADM1021_REG_TOS_R(0));367367+ rhi = i2c_smbus_read_byte_data(client, ADM1021_REG_TOS_R(1));368368+369369+ /*370370+ * Fail for negative temperatures and negative high limits.371371+ * This check also catches read errors on the tested registers.372372+ */373373+ if ((s8)lte < 0 || (s8)rte < 0 || (s8)lhi < 0 || (s8)rhi < 0)374374+ return -ENODEV;375375+376376+ /* fail if all registers hold the same value */377377+ if (lte == rte && lte == lhi && lte == rhi && lte == llo378378+ && lte == rlo)379379+ return -ENODEV;380380+381381+ /*382382+ * LM84 Mfr ID is in a different place,383383+ * and it has more unused bits.384384+ */385385+ if (conv_rate == 0x00386386+ && (config & 0x7F) == 0x00387387+ && (status & 0xAB) == 0x00) {388388+ type_name = "lm84";389389+ } else {390390+ /* fail if low limits are larger than high limits */391391+ if ((s8)llo > lhi || (s8)rlo > rhi)392392+ return -ENODEV;393393+ type_name = "max1617";394394+ }395395+ }354396355397 pr_debug("Detected chip %s at adapter %d, address 0x%02x.\n",356398 type_name, i2c_adapter_id(adapter), client->addr);
-1
drivers/md/bcache/Kconfig
···1122config BCACHE33 tristate "Block device as cache"44- select CLOSURES54 ---help---65 Allows a block device to be used as cache for other devices; uses76 a btree for indexing and the layout is optimized for SSDs.
···417417418418 r1_bio->bios[mirror] = NULL;419419 to_put = bio;420420- set_bit(R1BIO_Uptodate, &r1_bio->state);420420+ /*421421+ * Do not set R1BIO_Uptodate if the current device is422422+ * rebuilding or Faulty. This is because we cannot use423423+ * such device for properly reading the data back (we could424424+ * potentially use it, if the current write would have felt425425+ * before rdev->recovery_offset, but for simplicity we don't426426+ * check this here.427427+ */428428+ if (test_bit(In_sync, &conf->mirrors[mirror].rdev->flags) &&429429+ !test_bit(Faulty, &conf->mirrors[mirror].rdev->flags))430430+ set_bit(R1BIO_Uptodate, &r1_bio->state);421431422432 /* Maybe we can clear some bad blocks. */423433 if (is_badblock(conf->mirrors[mirror].rdev,···880870 wake_up(&conf->wait_barrier);881871}882872883883-static void freeze_array(struct r1conf *conf)873873+static void freeze_array(struct r1conf *conf, int extra)884874{885875 /* stop syncio and normal IO and wait for everything to886876 * go quite.887877 * We increment barrier and nr_waiting, and then888888- * wait until nr_pending match nr_queued+1878878+ * wait until nr_pending match nr_queued+extra889879 * This is called in the context of one normal IO request890880 * that has failed. Thus any sync request that might be pending891881 * will be blocked by nr_pending, and we need to wait for892882 * pending IO requests to complete or be queued for re-try.893893- * Thus the number queued (nr_queued) plus this request (1)883883+ * Thus the number queued (nr_queued) plus this request (extra)894884 * must match the number of pending IOs (nr_pending) before895885 * we continue.896886 */···898888 conf->barrier++;899889 conf->nr_waiting++;900890 wait_event_lock_irq_cmd(conf->wait_barrier,901901- conf->nr_pending == conf->nr_queued+1,891891+ conf->nr_pending == conf->nr_queued+extra,902892 conf->resync_lock,903893 flush_pending_writes(conf));904894 spin_unlock_irq(&conf->resync_lock);···15541544 * we wait for all outstanding requests to complete.15551545 */15561546 synchronize_sched();15571557- raise_barrier(conf);15581558- lower_barrier(conf);15471547+ freeze_array(conf, 0);15481548+ unfreeze_array(conf);15591549 clear_bit(Unmerged, &rdev->flags);15601550 }15611551 md_integrity_add_rdev(rdev, mddev);···16051595 */16061596 struct md_rdev *repl =16071597 conf->mirrors[conf->raid_disks + number].rdev;16081608- raise_barrier(conf);15981598+ freeze_array(conf, 0);16091599 clear_bit(Replacement, &repl->flags);16101600 p->rdev = repl;16111601 conf->mirrors[conf->raid_disks + number].rdev = NULL;16121612- lower_barrier(conf);16021602+ unfreeze_array(conf);16131603 clear_bit(WantReplacement, &rdev->flags);16141604 } else16151605 clear_bit(WantReplacement, &rdev->flags);···22052195 * frozen22062196 */22072197 if (mddev->ro == 0) {22082208- freeze_array(conf);21982198+ freeze_array(conf, 1);22092199 fix_read_error(conf, r1_bio->read_disk,22102200 r1_bio->sector, r1_bio->sectors);22112201 unfreeze_array(conf);···27902780 return PTR_ERR(conf);2791278127922782 if (mddev->queue)27932793- blk_queue_max_write_same_sectors(mddev->queue,27942794- mddev->chunk_sectors);27832783+ blk_queue_max_write_same_sectors(mddev->queue, 0);27842784+27952785 rdev_for_each(rdev, mddev) {27962786 if (!mddev->gendisk)27972787 continue;···29732963 return -ENOMEM;29742964 }2975296529762976- raise_barrier(conf);29662966+ freeze_array(conf, 0);2977296729782968 /* ok, everything is stopped */29792969 oldpool = conf->r1bio_pool;···30042994 conf->raid_disks = mddev->raid_disks = raid_disks;30052995 mddev->delta_disks = 0;3006299630073007- lower_barrier(conf);29972997+ unfreeze_array(conf);3008299830092999 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);30103000 md_wakeup_thread(mddev->thread);
+19-10
drivers/md/raid10.c
···490490 sector_t first_bad;491491 int bad_sectors;492492493493- set_bit(R10BIO_Uptodate, &r10_bio->state);493493+ /*494494+ * Do not set R10BIO_Uptodate if the current device is495495+ * rebuilding or Faulty. This is because we cannot use496496+ * such device for properly reading the data back (we could497497+ * potentially use it, if the current write would have felt498498+ * before rdev->recovery_offset, but for simplicity we don't499499+ * check this here.500500+ */501501+ if (test_bit(In_sync, &rdev->flags) &&502502+ !test_bit(Faulty, &rdev->flags))503503+ set_bit(R10BIO_Uptodate, &r10_bio->state);494504495505 /* Maybe we can clear some bad blocks. */496506 if (is_badblock(rdev,···10651055 wake_up(&conf->wait_barrier);10661056}1067105710681068-static void freeze_array(struct r10conf *conf)10581058+static void freeze_array(struct r10conf *conf, int extra)10691059{10701060 /* stop syncio and normal IO and wait for everything to10711061 * go quiet.10721062 * We increment barrier and nr_waiting, and then10731073- * wait until nr_pending match nr_queued+110631063+ * wait until nr_pending match nr_queued+extra10741064 * This is called in the context of one normal IO request10751065 * that has failed. Thus any sync request that might be pending10761066 * will be blocked by nr_pending, and we need to wait for10771067 * pending IO requests to complete or be queued for re-try.10781078- * Thus the number queued (nr_queued) plus this request (1)10681068+ * Thus the number queued (nr_queued) plus this request (extra)10791069 * must match the number of pending IOs (nr_pending) before10801070 * we continue.10811071 */···10831073 conf->barrier++;10841074 conf->nr_waiting++;10851075 wait_event_lock_irq_cmd(conf->wait_barrier,10861086- conf->nr_pending == conf->nr_queued+1,10761076+ conf->nr_pending == conf->nr_queued+extra,10871077 conf->resync_lock,10881078 flush_pending_writes(conf));10891079···18471837 * we wait for all outstanding requests to complete.18481838 */18491839 synchronize_sched();18501850- raise_barrier(conf, 0);18511851- lower_barrier(conf);18401840+ freeze_array(conf, 0);18411841+ unfreeze_array(conf);18521842 clear_bit(Unmerged, &rdev->flags);18531843 }18541844 md_integrity_add_rdev(rdev, mddev);···26222612 r10_bio->devs[slot].bio = NULL;2623261326242614 if (mddev->ro == 0) {26252625- freeze_array(conf);26152615+ freeze_array(conf, 1);26262616 fix_read_error(conf, mddev, r10_bio);26272617 unfreeze_array(conf);26282618 } else···36193609 if (mddev->queue) {36203610 blk_queue_max_discard_sectors(mddev->queue,36213611 mddev->chunk_sectors);36223622- blk_queue_max_write_same_sectors(mddev->queue,36233623- mddev->chunk_sectors);36123612+ blk_queue_max_write_same_sectors(mddev->queue, 0);36243613 blk_queue_io_min(mddev->queue, chunk_size);36253614 if (conf->geo.raid_disks % conf->geo.near_copies)36263615 blk_queue_io_opt(mddev->queue, chunk_size * conf->geo.raid_disks);
+5-1
drivers/md/raid5.c
···664664 if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags))665665 bi->bi_rw |= REQ_FLUSH;666666667667+ bi->bi_vcnt = 1;667668 bi->bi_io_vec[0].bv_len = STRIPE_SIZE;668669 bi->bi_io_vec[0].bv_offset = 0;669670 bi->bi_size = STRIPE_SIZE;···702701 else703702 rbi->bi_sector = (sh->sector704703 + rrdev->data_offset);704704+ rbi->bi_vcnt = 1;705705 rbi->bi_io_vec[0].bv_len = STRIPE_SIZE;706706 rbi->bi_io_vec[0].bv_offset = 0;707707 rbi->bi_size = STRIPE_SIZE;···54665464 if (mddev->major_version == 0 &&54675465 mddev->minor_version > 90)54685466 rdev->recovery_offset = reshape_offset;54695469-54675467+54705468 if (rdev->recovery_offset < reshape_offset) {54715469 /* We need to check old and new layout */54725470 if (!only_parity(rdev->raid_disk,···55885586 * guarantee discard_zerors_data55895587 */55905588 mddev->queue->limits.discard_zeroes_data = 0;55895589+55905590+ blk_queue_max_write_same_sectors(mddev->queue, 0);5591559155925592 rdev_for_each(rdev, mddev) {55935593 disk_stack_limits(mddev->gendisk, rdev->bdev,
···764764 struct net_device *bond_dev, *vlan_dev, *upper_dev;765765 struct vlan_entry *vlan;766766767767- rcu_read_lock();768767 read_lock(&bond->lock);768768+ rcu_read_lock();769769770770 bond_dev = bond->dev;771771···787787 if (vlan_dev)788788 __bond_resend_igmp_join_requests(vlan_dev);789789 }790790-791791- if (--bond->igmp_retrans > 0)792792- queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5);793793-794794- read_unlock(&bond->lock);795790 rcu_read_unlock();791791+792792+ /* We use curr_slave_lock to protect against concurrent access to793793+ * igmp_retrans from multiple running instances of this function and794794+ * bond_change_active_slave795795+ */796796+ write_lock_bh(&bond->curr_slave_lock);797797+ if (bond->igmp_retrans > 1) {798798+ bond->igmp_retrans--;799799+ queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5);800800+ }801801+ write_unlock_bh(&bond->curr_slave_lock);802802+ read_unlock(&bond->lock);796803}797804798805static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)···1964195719651958err_undo_flags:19661959 bond_compute_features(bond);19601960+ /* Enslave of first slave has failed and we need to fix master's mac */19611961+ if (bond->slave_cnt == 0 &&19621962+ ether_addr_equal(bond_dev->dev_addr, slave_dev->dev_addr))19631963+ eth_hw_addr_random(bond_dev);1967196419681965 return res;19691966}
···18001800 int i;18011801 u32 val;1802180218031803+ if (tg3_flag(tp, NO_FWARE_REPORTED))18041804+ return 0;18051805+18031806 if (tg3_flag(tp, IS_SSB_CORE)) {18041807 /* We don't use firmware. */18051808 return 0;···1040710404 */1040810405static int tg3_init_hw(struct tg3 *tp, bool reset_phy)1040910406{1040710407+ /* Chip may have been just powered on. If so, the boot code may still1040810408+ * be running initialization. Wait for it to finish to avoid races in1040910409+ * accessing the hardware.1041010410+ */1041110411+ tg3_enable_register_access(tp);1041210412+ tg3_poll_fw(tp);1041310413+1041010414 tg3_switch_clocks(tp);10411104151041210416 tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);
···42624262 netdev->features |= NETIF_F_HIGHDMA;42634263 } else {42644264 status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));42654265+ if (!status)42664266+ status = dma_set_coherent_mask(&pdev->dev,42674267+ DMA_BIT_MASK(32));42654268 if (status) {42664269 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");42674270 goto free_netdev;
+13-6
drivers/net/ethernet/renesas/sh_eth.c
···897897 mdelay(1);898898 cnt--;899899 }900900- if (cnt < 0) {901901- pr_err("Device reset fail\n");900900+ if (cnt <= 0) {901901+ pr_err("Device reset failed\n");902902 ret = -ETIMEDOUT;903903 }904904 return ret;···14011401 desc_status = edmac_to_cpu(mdp, rxdesc->status);14021402 pkt_len = rxdesc->frame_length;1403140314041404-#if defined(CONFIG_ARCH_R8A7740)14051405- desc_status >>= 16;14061406-#endif14071407-14081404 if (--boguscnt < 0)14091405 break;1410140614111407 if (!(desc_status & RDFEND))14121408 ndev->stats.rx_length_errors++;14091409+14101410+#if defined(CONFIG_ARCH_R8A7740)14111411+ /*14121412+ * In case of almost all GETHER/ETHERs, the Receive Frame State14131413+ * (RFS) bits in the Receive Descriptor 0 are from bit 9 to14141414+ * bit 0. However, in case of the R8A7740's GETHER, the RFS14151415+ * bits are from bit 25 to bit 16. So, the driver needs right14161416+ * shifting by 16.14171417+ */14181418+ desc_status >>= 16;14191419+#endif1413142014141421 if (desc_status & (RD_RFS1 | RD_RFS2 | RD_RFS3 | RD_RFS4 |14151422 RD_RFS5 | RD_RFS6 | RD_RFS10)) {
···28282929 port_index = random_N(team->en_port_count);3030 port = team_get_port_by_index_rcu(team, port_index);3131+ if (unlikely(!port))3232+ goto drop;3133 port = team_get_first_port_txable_rcu(team, port);3234 if (unlikely(!port))3335 goto drop;
+2
drivers/net/team/team_mode_roundrobin.c
···32323333 port_index = rr_priv(team)->sent_packets++ % team->en_port_count;3434 port = team_get_port_by_index_rcu(team, port_index);3535+ if (unlikely(!port))3636+ goto drop;3537 port = team_get_first_port_txable_rcu(team, port);3638 if (unlikely(!port))3739 goto drop;
···9292 This option enables collection of statistics for Rx/Tx status9393 data and some other MAC related statistics94949595-config ATH9K_RATE_CONTROL9595+config ATH9K_LEGACY_RATE_CONTROL9696 bool "Atheros ath9k rate control"9797 depends on ATH9K9898- default y9898+ default n9999 ---help---100100 Say Y, if you want to use the ath9k specific rate control101101- module instead of minstrel_ht.101101+ module instead of minstrel_ht. Be warned that there are various102102+ issues with the ath9k RC and minstrel is a more robust algorithm.103103+ Note that even if this option is selected, "ath9k_rate_control"104104+ has to be passed to mac80211 using the module parameter,105105+ ieee80211_default_rc_algo.102106103107config ATH9K_HTC104108 tristate "Atheros HTC based wireless cards support"
···17361736 void (*bt_wifi_media_status_notify) (struct ieee80211_hw *hw,17371737 bool mstate);17381738 void (*bt_coex_off_before_lps) (struct ieee80211_hw *hw);17391739+ void (*fill_h2c_cmd) (struct ieee80211_hw *hw, u8 element_id,17401740+ u32 cmd_len, u8 *p_cmdbuffer);17391741};1740174217411743struct rtl_intf_ops {···18711869 struct delayed_work fwevt_wq;1872187018731871 struct work_struct lps_change_work;18721872+ struct work_struct fill_h2c_cmd;18741873};1875187418761875struct rtl_debug {···20512048 };20522049 };20532050 bool enter_ps; /* true when entering PS */20512051+ u8 rate_mask[5];2054205220552053 /*This must be the last item so20562054 that it points to the data allocated
+1-1
drivers/net/wireless/ti/wl12xx/scan.c
···310310 memcpy(cmd->channels_2, cmd_channels->channels_2,311311 sizeof(cmd->channels_2));312312 memcpy(cmd->channels_5, cmd_channels->channels_5,313313- sizeof(cmd->channels_2));313313+ sizeof(cmd->channels_5));314314 /* channels_4 are not supported, so no need to copy them */315315}316316
+3-3
drivers/net/wireless/ti/wl12xx/wl12xx.h
···3636#define WL127X_IFTYPE_SR_VER 33737#define WL127X_MAJOR_SR_VER 103838#define WL127X_SUBTYPE_SR_VER WLCORE_FW_VER_IGNORE3939-#define WL127X_MINOR_SR_VER 1153939+#define WL127X_MINOR_SR_VER 1334040/* minimum multi-role FW version for wl127x */4141#define WL127X_IFTYPE_MR_VER 54242#define WL127X_MAJOR_MR_VER 74343#define WL127X_SUBTYPE_MR_VER WLCORE_FW_VER_IGNORE4444-#define WL127X_MINOR_MR_VER 1154444+#define WL127X_MINOR_MR_VER 4245454646/* FW chip version for wl128x */4747#define WL128X_CHIP_VER 7···4949#define WL128X_IFTYPE_SR_VER 35050#define WL128X_MAJOR_SR_VER 105151#define WL128X_SUBTYPE_SR_VER WLCORE_FW_VER_IGNORE5252-#define WL128X_MINOR_SR_VER 1155252+#define WL128X_MINOR_SR_VER 1335353/* minimum multi-role FW version for wl128x */5454#define WL128X_IFTYPE_MR_VER 55555#define WL128X_MAJOR_MR_VER 7
+1-1
drivers/net/wireless/ti/wl18xx/scan.c
···3434 memcpy(cmd->channels_2, cmd_channels->channels_2,3535 sizeof(cmd->channels_2));3636 memcpy(cmd->channels_5, cmd_channels->channels_5,3737- sizeof(cmd->channels_2));3737+ sizeof(cmd->channels_5));3838 /* channels_4 are not supported, so no need to copy them */3939}4040
···267267{268268 struct xilinx_spi *xspi = spi_master_get_devdata(spi->master);269269 u32 ipif_ier;270270- u16 cr;271270272271 /* We get here with transmitter inhibited */273272···275276 xspi->remaining_bytes = t->len;276277 INIT_COMPLETION(xspi->done);277278278278- xilinx_spi_fill_tx_fifo(xspi);279279280280 /* Enable the transmit empty interrupt, which we use to determine281281 * progress on the transmission.···283285 xspi->write_fn(ipif_ier | XSPI_INTR_TX_EMPTY,284286 xspi->regs + XIPIF_V123B_IIER_OFFSET);285287286286- /* Start the transfer by not inhibiting the transmitter any longer */287287- cr = xspi->read_fn(xspi->regs + XSPI_CR_OFFSET) &288288- ~XSPI_CR_TRANS_INHIBIT;289289- xspi->write_fn(cr, xspi->regs + XSPI_CR_OFFSET);288288+ for (;;) {289289+ u16 cr;290290+ u8 sr;290291291291- wait_for_completion(&xspi->done);292292+ xilinx_spi_fill_tx_fifo(xspi);293293+294294+ /* Start the transfer by not inhibiting the transmitter any295295+ * longer296296+ */297297+ cr = xspi->read_fn(xspi->regs + XSPI_CR_OFFSET) &298298+ ~XSPI_CR_TRANS_INHIBIT;299299+ xspi->write_fn(cr, xspi->regs + XSPI_CR_OFFSET);300300+301301+ wait_for_completion(&xspi->done);302302+303303+ /* A transmit has just completed. Process received data and304304+ * check for more data to transmit. Always inhibit the305305+ * transmitter while the Isr refills the transmit register/FIFO,306306+ * or make sure it is stopped if we're done.307307+ */308308+ cr = xspi->read_fn(xspi->regs + XSPI_CR_OFFSET);309309+ xspi->write_fn(cr | XSPI_CR_TRANS_INHIBIT,310310+ xspi->regs + XSPI_CR_OFFSET);311311+312312+ /* Read out all the data from the Rx FIFO */313313+ sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET);314314+ while ((sr & XSPI_SR_RX_EMPTY_MASK) == 0) {315315+ xspi->rx_fn(xspi);316316+ sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET);317317+ }318318+319319+ /* See if there is more data to send */320320+ if (!xspi->remaining_bytes > 0)321321+ break;322322+ }292323293324 /* Disable the transmit empty interrupt */294325 xspi->write_fn(ipif_ier, xspi->regs + XIPIF_V123B_IIER_OFFSET);···341314 xspi->write_fn(ipif_isr, xspi->regs + XIPIF_V123B_IISR_OFFSET);342315343316 if (ipif_isr & XSPI_INTR_TX_EMPTY) { /* Transmission completed */344344- u16 cr;345345- u8 sr;346346-347347- /* A transmit has just completed. Process received data and348348- * check for more data to transmit. Always inhibit the349349- * transmitter while the Isr refills the transmit register/FIFO,350350- * or make sure it is stopped if we're done.351351- */352352- cr = xspi->read_fn(xspi->regs + XSPI_CR_OFFSET);353353- xspi->write_fn(cr | XSPI_CR_TRANS_INHIBIT,354354- xspi->regs + XSPI_CR_OFFSET);355355-356356- /* Read out all the data from the Rx FIFO */357357- sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET);358358- while ((sr & XSPI_SR_RX_EMPTY_MASK) == 0) {359359- xspi->rx_fn(xspi);360360- sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET);361361- }362362-363363- /* See if there is more data to send */364364- if (xspi->remaining_bytes > 0) {365365- xilinx_spi_fill_tx_fifo(xspi);366366- /* Start the transfer by not inhibiting the367367- * transmitter any longer368368- */369369- xspi->write_fn(cr, xspi->regs + XSPI_CR_OFFSET);370370- } else {371371- /* No more data to send.372372- * Indicate the transfer is completed.373373- */374374- complete(&xspi->done);375375- }317317+ complete(&xspi->done);376318 }377319378320 return IRQ_HANDLED;
···1678167816791679 ci->gadget.ep0 = &ci->ep0in->ep;1680168016811681- if (ci->global_phy)16811681+ if (ci->global_phy) {16821682 ci->transceiver = usb_get_phy(USB_PHY_TYPE_USB2);16831683+ if (IS_ERR(ci->transceiver))16841684+ ci->transceiver = NULL;16851685+ }1683168616841687 if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) {16851688 if (ci->transceiver == NULL) {···16971694 goto put_transceiver;16981695 }1699169617001700- if (!IS_ERR_OR_NULL(ci->transceiver)) {16971697+ if (ci->transceiver) {17011698 retval = otg_set_peripheral(ci->transceiver->otg,17021699 &ci->gadget);17031700 if (retval)···17141711 return retval;1715171217161713remove_trans:17171717- if (!IS_ERR_OR_NULL(ci->transceiver)) {17141714+ if (ci->transceiver) {17181715 otg_set_peripheral(ci->transceiver->otg, NULL);17191716 if (ci->global_phy)17201717 usb_put_phy(ci->transceiver);···1722171917231720 dev_err(dev, "error = %i\n", retval);17241721put_transceiver:17251725- if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy)17221722+ if (ci->transceiver && ci->global_phy)17261723 usb_put_phy(ci->transceiver);17271724destroy_eps:17281725 destroy_eps(ci);···17501747 dma_pool_destroy(ci->td_pool);17511748 dma_pool_destroy(ci->qh_pool);1752174917531753- if (!IS_ERR_OR_NULL(ci->transceiver)) {17501750+ if (ci->transceiver) {17541751 otg_set_peripheral(ci->transceiver->otg, NULL);17551752 if (ci->global_phy)17561753 usb_put_phy(ci->transceiver);
+4-4
drivers/usb/serial/f81232.c
···165165 /* FIXME - Stubbed out for now */166166167167 /* Don't change anything if nothing has changed */168168- if (!tty_termios_hw_change(&tty->termios, old_termios))168168+ if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios))169169 return;170170171171 /* Do the real work here... */172172- tty_termios_copy_hw(&tty->termios, old_termios);172172+ if (old_termios)173173+ tty_termios_copy_hw(&tty->termios, old_termios);173174}174175175176static int f81232_tiocmget(struct tty_struct *tty)···188187189188static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port)190189{191191- struct ktermios tmp_termios;192190 int result;193191194192 /* Setup termios */195193 if (tty)196196- f81232_set_termios(tty, port, &tmp_termios);194194+ f81232_set_termios(tty, port, NULL);197195198196 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);199197 if (result) {
+5-5
drivers/usb/serial/pl2303.c
···284284 serial settings even to the same values as before. Thus285285 we actually need to filter in this specific case */286286287287- if (!tty_termios_hw_change(&tty->termios, old_termios))287287+ if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios))288288 return;289289290290 cflag = tty->termios.c_cflag;···293293 if (!buf) {294294 dev_err(&port->dev, "%s - out of memory.\n", __func__);295295 /* Report back no change occurred */296296- tty->termios = *old_termios;296296+ if (old_termios)297297+ tty->termios = *old_termios;297298 return;298299 }299300···434433 control = priv->line_control;435434 if ((cflag & CBAUD) == B0)436435 priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);437437- else if ((old_termios->c_cflag & CBAUD) == B0)436436+ else if (old_termios && (old_termios->c_cflag & CBAUD) == B0)438437 priv->line_control |= (CONTROL_DTR | CONTROL_RTS);439438 if (control != priv->line_control) {440439 control = priv->line_control;···493492494493static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)495494{496496- struct ktermios tmp_termios;497495 struct usb_serial *serial = port->serial;498496 struct pl2303_serial_private *spriv = usb_get_serial_data(serial);499497 int result;···508508509509 /* Setup termios */510510 if (tty)511511- pl2303_set_termios(tty, port, &tmp_termios);511511+ pl2303_set_termios(tty, port, NULL);512512513513 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);514514 if (result) {
+4-6
drivers/usb/serial/spcp8x5.c
···291291 struct spcp8x5_private *priv = usb_get_serial_port_data(port);292292 unsigned long flags;293293 unsigned int cflag = tty->termios.c_cflag;294294- unsigned int old_cflag = old_termios->c_cflag;295294 unsigned short uartdata;296295 unsigned char buf[2] = {0, 0};297296 int baud;···298299 u8 control;299300300301 /* check that they really want us to change something */301301- if (!tty_termios_hw_change(&tty->termios, old_termios))302302+ if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios))302303 return;303304304305 /* set DTR/RTS active */305306 spin_lock_irqsave(&priv->lock, flags);306307 control = priv->line_control;307307- if ((old_cflag & CBAUD) == B0) {308308+ if (old_termios && (old_termios->c_cflag & CBAUD) == B0) {308309 priv->line_control |= MCR_DTR;309309- if (!(old_cflag & CRTSCTS))310310+ if (!(old_termios->c_cflag & CRTSCTS))310311 priv->line_control |= MCR_RTS;311312 }312313 if (control != priv->line_control) {···393394394395static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port)395396{396396- struct ktermios tmp_termios;397397 struct usb_serial *serial = port->serial;398398 struct spcp8x5_private *priv = usb_get_serial_port_data(port);399399 int ret;···409411 spcp8x5_set_ctrl_line(port, priv->line_control);410412411413 if (tty)412412- spcp8x5_set_termios(tty, port, &tmp_termios);414414+ spcp8x5_set_termios(tty, port, NULL);413415414416 port->port.drain_delay = 256;415417
+13-16
drivers/vhost/net.c
···155155156156static void vhost_net_clear_ubuf_info(struct vhost_net *n)157157{158158-159159- bool zcopy;160158 int i;161159162162- for (i = 0; i < n->dev.nvqs; ++i) {163163- zcopy = vhost_net_zcopy_mask & (0x1 << i);164164- if (zcopy)165165- kfree(n->vqs[i].ubuf_info);160160+ for (i = 0; i < VHOST_NET_VQ_MAX; ++i) {161161+ kfree(n->vqs[i].ubuf_info);162162+ n->vqs[i].ubuf_info = NULL;166163 }167164}168165···168171 bool zcopy;169172 int i;170173171171- for (i = 0; i < n->dev.nvqs; ++i) {174174+ for (i = 0; i < VHOST_NET_VQ_MAX; ++i) {172175 zcopy = vhost_net_zcopy_mask & (0x1 << i);173176 if (!zcopy)174177 continue;···180183 return 0;181184182185err:183183- while (i--) {184184- zcopy = vhost_net_zcopy_mask & (0x1 << i);185185- if (!zcopy)186186- continue;187187- kfree(n->vqs[i].ubuf_info);188188- }186186+ vhost_net_clear_ubuf_info(n);189187 return -ENOMEM;190188}191189···188196{189197 int i;190198199199+ vhost_net_clear_ubuf_info(n);200200+191201 for (i = 0; i < VHOST_NET_VQ_MAX; i++) {192202 n->vqs[i].done_idx = 0;193203 n->vqs[i].upend_idx = 0;194204 n->vqs[i].ubufs = NULL;195195- kfree(n->vqs[i].ubuf_info);196196- n->vqs[i].ubuf_info = NULL;197205 n->vqs[i].vhost_hlen = 0;198206 n->vqs[i].sock_hlen = 0;199207 }···428436 kref_get(&ubufs->kref);429437 }430438 nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV;431431- }439439+ } else440440+ msg.msg_control = NULL;432441 /* TODO: Check specific error and bomb out unless ENOBUFS? */433442 err = sock->ops->sendmsg(NULL, sock, &msg, len);434443 if (unlikely(err < 0)) {···10461053 int r;1047105410481055 mutex_lock(&n->dev.mutex);10561056+ if (vhost_dev_has_owner(&n->dev)) {10571057+ r = -EBUSY;10581058+ goto out;10591059+ }10491060 r = vhost_net_set_ubuf_info(n);10501061 if (r)10511062 goto out;
+7-1
drivers/vhost/vhost.c
···344344}345345346346/* Caller should have device mutex */347347+bool vhost_dev_has_owner(struct vhost_dev *dev)348348+{349349+ return dev->mm;350350+}351351+352352+/* Caller should have device mutex */347353long vhost_dev_set_owner(struct vhost_dev *dev)348354{349355 struct task_struct *worker;350356 int err;351357352358 /* Is there an owner already? */353353- if (dev->mm) {359359+ if (vhost_dev_has_owner(dev)) {354360 err = -EBUSY;355361 goto err_mm;356362 }
···141141 for (i = 0; i < ctx->nr_pages; i++)142142 put_page(ctx->ring_pages[i]);143143144144- if (ctx->mmap_size)145145- vm_munmap(ctx->mmap_base, ctx->mmap_size);146146-147144 if (ctx->ring_pages && ctx->ring_pages != ctx->internal_pages)148145 kfree(ctx->ring_pages);149146}···319322320323 aio_free_ring(ctx);321324322322- spin_lock(&aio_nr_lock);323323- BUG_ON(aio_nr - ctx->max_reqs > aio_nr);324324- aio_nr -= ctx->max_reqs;325325- spin_unlock(&aio_nr_lock);326326-327325 pr_debug("freeing %p\n", ctx);328326329327 /*···427435{428436 if (!atomic_xchg(&ctx->dead, 1)) {429437 hlist_del_rcu(&ctx->list);430430- /* Between hlist_del_rcu() and dropping the initial ref */431431- synchronize_rcu();432438433439 /*434434- * We can't punt to workqueue here because put_ioctx() ->435435- * free_ioctx() will unmap the ringbuffer, and that has to be436436- * done in the original process's context. kill_ioctx_rcu/work()437437- * exist for exit_aio(), as in that path free_ioctx() won't do438438- * the unmap.440440+ * It'd be more correct to do this in free_ioctx(), after all441441+ * the outstanding kiocbs have finished - but by then io_destroy442442+ * has already returned, so io_setup() could potentially return443443+ * -EAGAIN with no ioctxs actually in use (as far as userspace444444+ * could tell).439445 */440440- kill_ioctx_work(&ctx->rcu_work);446446+ spin_lock(&aio_nr_lock);447447+ BUG_ON(aio_nr - ctx->max_reqs > aio_nr);448448+ aio_nr -= ctx->max_reqs;449449+ spin_unlock(&aio_nr_lock);450450+451451+ if (ctx->mmap_size)452452+ vm_munmap(ctx->mmap_base, ctx->mmap_size);453453+454454+ /* Between hlist_del_rcu() and dropping the initial ref */455455+ call_rcu(&ctx->rcu_head, kill_ioctx_rcu);441456 }442457}443458···494495 */495496 ctx->mmap_size = 0;496497497497- if (!atomic_xchg(&ctx->dead, 1)) {498498- hlist_del_rcu(&ctx->list);499499- call_rcu(&ctx->rcu_head, kill_ioctx_rcu);500500- }498498+ kill_ioctx(ctx);501499 }502500}503501
···80128012{80138013 struct btrfs_root *root = BTRFS_I(inode)->root;8014801480158015+ if (root == NULL)80168016+ return 1;80178017+80158018 /* the snap/subvol tree is on deleting */80168019 if (btrfs_root_refs(&root->root_item) == 0 &&80178020 root != root->fs_info->tree_root)
···191191}192192193193/**194194- * Encode the flock and fcntl locks for the given inode into the pagelist.195195- * Format is: #fcntl locks, sequential fcntl locks, #flock locks,196196- * sequential flock locks.197197- * Must be called with lock_flocks() already held.198198- * If we encounter more of a specific lock type than expected,199199- * we return the value 1.194194+ * Encode the flock and fcntl locks for the given inode into the ceph_filelock195195+ * array. Must be called with lock_flocks() already held.196196+ * If we encounter more of a specific lock type than expected, return -ENOSPC.200197 */201201-int ceph_encode_locks(struct inode *inode, struct ceph_pagelist *pagelist,202202- int num_fcntl_locks, int num_flock_locks)198198+int ceph_encode_locks_to_buffer(struct inode *inode,199199+ struct ceph_filelock *flocks,200200+ int num_fcntl_locks, int num_flock_locks)203201{204202 struct file_lock *lock;205205- struct ceph_filelock cephlock;206203 int err = 0;207204 int seen_fcntl = 0;208205 int seen_flock = 0;206206+ int l = 0;209207210208 dout("encoding %d flock and %d fcntl locks", num_flock_locks,211209 num_fcntl_locks);212212- err = ceph_pagelist_append(pagelist, &num_fcntl_locks, sizeof(u32));213213- if (err)214214- goto fail;210210+215211 for (lock = inode->i_flock; lock != NULL; lock = lock->fl_next) {216212 if (lock->fl_flags & FL_POSIX) {217213 ++seen_fcntl;···215219 err = -ENOSPC;216220 goto fail;217221 }218218- err = lock_to_ceph_filelock(lock, &cephlock);222222+ err = lock_to_ceph_filelock(lock, &flocks[l]);219223 if (err)220224 goto fail;221221- err = ceph_pagelist_append(pagelist, &cephlock,222222- sizeof(struct ceph_filelock));225225+ ++l;223226 }224224- if (err)225225- goto fail;226227 }227227-228228- err = ceph_pagelist_append(pagelist, &num_flock_locks, sizeof(u32));229229- if (err)230230- goto fail;231228 for (lock = inode->i_flock; lock != NULL; lock = lock->fl_next) {232229 if (lock->fl_flags & FL_FLOCK) {233230 ++seen_flock;···228239 err = -ENOSPC;229240 goto fail;230241 }231231- err = lock_to_ceph_filelock(lock, &cephlock);242242+ err = lock_to_ceph_filelock(lock, &flocks[l]);232243 if (err)233244 goto fail;234234- err = ceph_pagelist_append(pagelist, &cephlock,235235- sizeof(struct ceph_filelock));245245+ ++l;236246 }237237- if (err)238238- goto fail;239247 }240248fail:249249+ return err;250250+}251251+252252+/**253253+ * Copy the encoded flock and fcntl locks into the pagelist.254254+ * Format is: #fcntl locks, sequential fcntl locks, #flock locks,255255+ * sequential flock locks.256256+ * Returns zero on success.257257+ */258258+int ceph_locks_to_pagelist(struct ceph_filelock *flocks,259259+ struct ceph_pagelist *pagelist,260260+ int num_fcntl_locks, int num_flock_locks)261261+{262262+ int err = 0;263263+ __le32 nlocks;264264+265265+ nlocks = cpu_to_le32(num_fcntl_locks);266266+ err = ceph_pagelist_append(pagelist, &nlocks, sizeof(nlocks));267267+ if (err)268268+ goto out_fail;269269+270270+ err = ceph_pagelist_append(pagelist, flocks,271271+ num_fcntl_locks * sizeof(*flocks));272272+ if (err)273273+ goto out_fail;274274+275275+ nlocks = cpu_to_le32(num_flock_locks);276276+ err = ceph_pagelist_append(pagelist, &nlocks, sizeof(nlocks));277277+ if (err)278278+ goto out_fail;279279+280280+ err = ceph_pagelist_append(pagelist,281281+ &flocks[num_fcntl_locks],282282+ num_flock_locks * sizeof(*flocks));283283+out_fail:241284 return err;242285}243286
···822822extern int ceph_lock(struct file *file, int cmd, struct file_lock *fl);823823extern int ceph_flock(struct file *file, int cmd, struct file_lock *fl);824824extern void ceph_count_locks(struct inode *inode, int *p_num, int *f_num);825825-extern int ceph_encode_locks(struct inode *i, struct ceph_pagelist *p,826826- int p_locks, int f_locks);825825+extern int ceph_encode_locks_to_buffer(struct inode *inode,826826+ struct ceph_filelock *flocks,827827+ int num_fcntl_locks,828828+ int num_flock_locks);829829+extern int ceph_locks_to_pagelist(struct ceph_filelock *flocks,830830+ struct ceph_pagelist *pagelist,831831+ int num_fcntl_locks, int num_flock_locks);827832extern int lock_to_ceph_filelock(struct file_lock *fl, struct ceph_filelock *c);828833829834/* debugfs.c */
+10-9
fs/file_table.c
···306306{307307 if (atomic_long_dec_and_test(&file->f_count)) {308308 struct task_struct *task = current;309309+ unsigned long flags;310310+309311 file_sb_list_del(file);310310- if (unlikely(in_interrupt() || task->flags & PF_KTHREAD)) {311311- unsigned long flags;312312- spin_lock_irqsave(&delayed_fput_lock, flags);313313- list_add(&file->f_u.fu_list, &delayed_fput_list);314314- schedule_work(&delayed_fput_work);315315- spin_unlock_irqrestore(&delayed_fput_lock, flags);316316- return;312312+ if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) {313313+ init_task_work(&file->f_u.fu_rcuhead, ____fput);314314+ if (!task_work_add(task, &file->f_u.fu_rcuhead, true))315315+ return;317316 }318318- init_task_work(&file->f_u.fu_rcuhead, ____fput);319319- task_work_add(task, &file->f_u.fu_rcuhead, true);317317+ spin_lock_irqsave(&delayed_fput_lock, flags);318318+ list_add(&file->f_u.fu_list, &delayed_fput_list);319319+ schedule_work(&delayed_fput_work);320320+ spin_unlock_irqrestore(&delayed_fput_lock, flags);320321 }321322}322323
+2-2
fs/namei.c
···19761976 err = complete_walk(nd);1977197719781978 if (!err && nd->flags & LOOKUP_DIRECTORY) {19791979- if (!nd->inode->i_op->lookup) {19791979+ if (!can_lookup(nd->inode)) {19801980 path_put(&nd->path);19811981 err = -ENOTDIR;19821982 }···28502850 if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode))28512851 goto out;28522852 error = -ENOTDIR;28532853- if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup)28532853+ if ((nd->flags & LOOKUP_DIRECTORY) && !can_lookup(nd->inode))28542854 goto out;28552855 audit_inode(name, nd->path.dentry, 0);28562856finish_open:
-9
fs/ncpfs/dir.c
···10291029 DPRINTK("ncp_rmdir: removing %s/%s\n",10301030 dentry->d_parent->d_name.name, dentry->d_name.name);1031103110321032- /*10331033- * fail with EBUSY if there are still references to this10341034- * directory.10351035- */10361036- dentry_unhash(dentry);10371037- error = -EBUSY;10381038- if (!d_unhashed(dentry))10391039- goto out;10401040-10411032 len = sizeof(__name);10421033 error = ncp_io2vol(server, __name, &len, dentry->d_name.name,10431034 dentry->d_name.len, !ncp_preserve_case(dir));
···25442544 if (error)25452545 goto error0;2546254625472547+ /*25482548+ * we can't just memcpy() the root in for CRC enabled btree blocks.25492549+ * In that case have to also ensure the blkno remains correct25502550+ */25472551 memcpy(cblock, block, xfs_btree_block_len(cur));25522552+ if (cur->bc_flags & XFS_BTREE_CRC_BLOCKS) {25532553+ if (cur->bc_flags & XFS_BTREE_LONG_PTRS)25542554+ cblock->bb_u.l.bb_blkno = cpu_to_be64(cbp->b_bn);25552555+ else25562556+ cblock->bb_u.s.bb_blkno = cpu_to_be64(cbp->b_bn);25572557+ }2548255825492559 be16_add_cpu(&block->bb_level, 1);25502560 xfs_btree_set_numrecs(block, 1);
+3-2
fs/xfs/xfs_dir2_format.h
···266266struct xfs_dir3_data_hdr {267267 struct xfs_dir3_blk_hdr hdr;268268 xfs_dir2_data_free_t best_free[XFS_DIR2_DATA_FD_COUNT];269269+ __be32 pad; /* 64 bit alignment */269270};270271271272#define XFS_DIR3_DATA_CRC_OFF offsetof(struct xfs_dir3_data_hdr, hdr.crc)···478477 struct xfs_da3_blkinfo info; /* header for da routines */479478 __be16 count; /* count of entries */480479 __be16 stale; /* count of stale entries */481481- __be32 pad;480480+ __be32 pad; /* 64 bit alignment */482481};483482484483struct xfs_dir3_icleaf_hdr {···716715 __be32 firstdb; /* db of first entry */717716 __be32 nvalid; /* count of valid entries */718717 __be32 nused; /* count of used entries */719719- __be32 pad; /* 64 bit alignment. */718718+ __be32 pad; /* 64 bit alignment */720719};721720722721struct xfs_dir3_free {
+17-2
fs/xfs/xfs_log_recover.c
···18451845 xfs_agino_t *buffer_nextp;1846184618471847 trace_xfs_log_recover_buf_inode_buf(mp->m_log, buf_f);18481848- bp->b_ops = &xfs_inode_buf_ops;18481848+18491849+ /*18501850+ * Post recovery validation only works properly on CRC enabled18511851+ * filesystems.18521852+ */18531853+ if (xfs_sb_version_hascrc(&mp->m_sb))18541854+ bp->b_ops = &xfs_inode_buf_ops;1849185518501856 inodes_per_buf = BBTOB(bp->b_io_length) >> mp->m_sb.sb_inodelog;18511857 for (i = 0; i < inodes_per_buf; i++) {···22112205 /* Shouldn't be any more regions */22122206 ASSERT(i == item->ri_total);2213220722142214- xlog_recovery_validate_buf_type(mp, bp, buf_f);22082208+ /*22092209+ * We can only do post recovery validation on items on CRC enabled22102210+ * fielsystems as we need to know when the buffer was written to be able22112211+ * to determine if we should have replayed the item. If we replay old22122212+ * metadata over a newer buffer, then it will enter a temporarily22132213+ * inconsistent state resulting in verification failures. Hence for now22142214+ * just avoid the verification stage for non-crc filesystems22152215+ */22162216+ if (xfs_sb_version_hascrc(&mp->m_sb))22172217+ xlog_recovery_validate_buf_type(mp, bp, buf_f);22152218}2216221922172220/*
+11-7
fs/xfs/xfs_mount.c
···314314xfs_mount_validate_sb(315315 xfs_mount_t *mp,316316 xfs_sb_t *sbp,317317- bool check_inprogress)317317+ bool check_inprogress,318318+ bool check_version)318319{319320320321 /*···338337339338 /*340339 * Version 5 superblock feature mask validation. Reject combinations the341341- * kernel cannot support up front before checking anything else.340340+ * kernel cannot support up front before checking anything else. For341341+ * write validation, we don't need to check feature masks.342342 */343343- if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) {343343+ if (check_version && XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) {344344 xfs_alert(mp,345345"Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!\n"346346"Use of these features in this kernel is at your own risk!");···677675678676static int679677xfs_sb_verify(680680- struct xfs_buf *bp)678678+ struct xfs_buf *bp,679679+ bool check_version)681680{682681 struct xfs_mount *mp = bp->b_target->bt_mount;683682 struct xfs_sb sb;···689686 * Only check the in progress field for the primary superblock as690687 * mkfs.xfs doesn't clear it from secondary superblocks.691688 */692692- return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR);689689+ return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR,690690+ check_version);693691}694692695693/*···723719 goto out_error;724720 }725721 }726726- error = xfs_sb_verify(bp);722722+ error = xfs_sb_verify(bp, true);727723728724out_error:729725 if (error) {···762758 struct xfs_buf_log_item *bip = bp->b_fspriv;763759 int error;764760765765- error = xfs_sb_verify(bp);761761+ error = xfs_sb_verify(bp, false);766762 if (error) {767763 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, bp->b_addr);768764 xfs_buf_ioerror(bp, error);
···175175176176extern void get_online_cpus(void);177177extern void put_online_cpus(void);178178+extern void cpu_hotplug_disable(void);179179+extern void cpu_hotplug_enable(void);178180#define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri)179181#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)180182#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)···200198201199#define get_online_cpus() do { } while (0)202200#define put_online_cpus() do { } while (0)201201+#define cpu_hotplug_disable() do { } while (0)202202+#define cpu_hotplug_enable() do { } while (0)203203#define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0)204204/* These aren't inline functions due to a GCC bug. */205205#define register_hotcpu_notifier(nb) ({ (void)(nb); 0; })
+1
include/linux/filter.h
···4646extern int sk_detach_filter(struct sock *sk);4747extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);4848extern int sk_get_filter(struct sock *sk, struct sock_filter __user *filter, unsigned len);4949+extern void sk_decode_filter(struct sock_filter *filt, struct sock_filter *to);49505051#ifdef CONFIG_BPF_JIT5152#include <stdarg.h>
+2-2
include/linux/if_team.h
···249249 return port;250250 cur = port;251251 list_for_each_entry_continue_rcu(cur, &team->port_list, list)252252- if (team_port_txable(port))252252+ if (team_port_txable(cur))253253 return cur;254254 list_for_each_entry_rcu(cur, &team->port_list, list) {255255 if (cur == port)256256 break;257257- if (team_port_txable(port))257257+ if (team_port_txable(cur))258258 return cur;259259 }260260 return NULL;
···1111#include <linux/list.h>1212#include <linux/cpumask.h>1313#include <linux/init.h>1414+#include <linux/irqflags.h>14151516extern void cpu_idle(void);1617···140139}141140#define smp_call_function(func, info, wait) \142141 (up_smp_call_function(func, info))143143-#define on_each_cpu(func,info,wait) \144144- ({ \145145- local_irq_disable(); \146146- func(info); \147147- local_irq_enable(); \148148- 0; \149149- })142142+143143+static inline int on_each_cpu(smp_call_func_t func, void *info, int wait)144144+{145145+ unsigned long flags;146146+147147+ local_irq_save(flags);148148+ func(info);149149+ local_irq_restore(flags);150150+ return 0;151151+}152152+150153/*151154 * Note we still need to test the mask even for UP152155 * because we actually can get an empty mask from
···450450 snd_soc_dapm_aif_in, /* audio interface input */451451 snd_soc_dapm_aif_out, /* audio interface output */452452 snd_soc_dapm_siggen, /* signal generator */453453- snd_soc_dapm_dai, /* link to DAI structure */453453+ snd_soc_dapm_dai_in, /* link to DAI structure */454454+ snd_soc_dapm_dai_out,454455 snd_soc_dapm_dai_link, /* link between two DAI structures */455456};456457
···431431config TREE_RCU432432 bool "Tree-based hierarchical RCU"433433 depends on !PREEMPT && SMP434434+ select IRQ_WORK434435 help435436 This option selects the RCU implementation that is436437 designed for very large SMP system with hundreds or
+1-1
kernel/audit.c
···10561056static void wait_for_auditd(unsigned long sleep_time)10571057{10581058 DECLARE_WAITQUEUE(wait, current);10591059- set_current_state(TASK_INTERRUPTIBLE);10591059+ set_current_state(TASK_UNINTERRUPTIBLE);10601060 add_wait_queue(&audit_backlog_wait, &wait);1061106110621062 if (audit_backlog_limit &&
+1
kernel/audit_tree.c
···658658 struct vfsmount *mnt;659659 int err;660660661661+ rule->tree = NULL;661662 list_for_each_entry(tree, &tree_list, list) {662663 if (!strcmp(seed->pathname, tree->pathname)) {663664 put_tree(seed);
+23-32
kernel/cpu.c
···133133 mutex_unlock(&cpu_hotplug.lock);134134}135135136136+/*137137+ * Wait for currently running CPU hotplug operations to complete (if any) and138138+ * disable future CPU hotplug (from sysfs). The 'cpu_add_remove_lock' protects139139+ * the 'cpu_hotplug_disabled' flag. The same lock is also acquired by the140140+ * hotplug path before performing hotplug operations. So acquiring that lock141141+ * guarantees mutual exclusion from any currently running hotplug operations.142142+ */143143+void cpu_hotplug_disable(void)144144+{145145+ cpu_maps_update_begin();146146+ cpu_hotplug_disabled = 1;147147+ cpu_maps_update_done();148148+}149149+150150+void cpu_hotplug_enable(void)151151+{152152+ cpu_maps_update_begin();153153+ cpu_hotplug_disabled = 0;154154+ cpu_maps_update_done();155155+}156156+136157#else /* #if CONFIG_HOTPLUG_CPU */137158static void cpu_hotplug_begin(void) {}138159static void cpu_hotplug_done(void) {}···562541core_initcall(alloc_frozen_cpus);563542564543/*565565- * Prevent regular CPU hotplug from racing with the freezer, by disabling CPU566566- * hotplug when tasks are about to be frozen. Also, don't allow the freezer567567- * to continue until any currently running CPU hotplug operation gets568568- * completed.569569- * To modify the 'cpu_hotplug_disabled' flag, we need to acquire the570570- * 'cpu_add_remove_lock'. And this same lock is also taken by the regular571571- * CPU hotplug path and released only after it is complete. Thus, we572572- * (and hence the freezer) will block here until any currently running CPU573573- * hotplug operation gets completed.574574- */575575-void cpu_hotplug_disable_before_freeze(void)576576-{577577- cpu_maps_update_begin();578578- cpu_hotplug_disabled = 1;579579- cpu_maps_update_done();580580-}581581-582582-583583-/*584584- * When tasks have been thawed, re-enable regular CPU hotplug (which had been585585- * disabled while beginning to freeze tasks).586586- */587587-void cpu_hotplug_enable_after_thaw(void)588588-{589589- cpu_maps_update_begin();590590- cpu_hotplug_disabled = 0;591591- cpu_maps_update_done();592592-}593593-594594-/*595544 * When callbacks for CPU hotplug notifications are being executed, we must596545 * ensure that the state of the system with respect to the tasks being frozen597546 * or not, as reported by the notification, remains unchanged *throughout the···580589581590 case PM_SUSPEND_PREPARE:582591 case PM_HIBERNATION_PREPARE:583583- cpu_hotplug_disable_before_freeze();592592+ cpu_hotplug_disable();584593 break;585594586595 case PM_POST_SUSPEND:587596 case PM_POST_HIBERNATION:588588- cpu_hotplug_enable_after_thaw();597597+ cpu_hotplug_enable();589598 break;590599591600 default:
+1-1
kernel/exit.c
···649649 * jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)650650 */651651 forget_original_parent(tsk);652652- exit_task_namespaces(tsk);653652654653 write_lock_irq(&tasklist_lock);655654 if (group_dead)···794795 exit_shm(tsk);795796 exit_files(tsk);796797 exit_fs(tsk);798798+ exit_task_namespaces(tsk);797799 exit_task_work(tsk);798800 check_stack_usage();799801 exit_thread();
+50-41
kernel/printk.c
···363363 log_next_seq++;364364}365365366366+#ifdef CONFIG_SECURITY_DMESG_RESTRICT367367+int dmesg_restrict = 1;368368+#else369369+int dmesg_restrict;370370+#endif371371+372372+static int syslog_action_restricted(int type)373373+{374374+ if (dmesg_restrict)375375+ return 1;376376+ /*377377+ * Unless restricted, we allow "read all" and "get buffer size"378378+ * for everybody.379379+ */380380+ return type != SYSLOG_ACTION_READ_ALL &&381381+ type != SYSLOG_ACTION_SIZE_BUFFER;382382+}383383+384384+static int check_syslog_permissions(int type, bool from_file)385385+{386386+ /*387387+ * If this is from /proc/kmsg and we've already opened it, then we've388388+ * already done the capabilities checks at open time.389389+ */390390+ if (from_file && type != SYSLOG_ACTION_OPEN)391391+ return 0;392392+393393+ if (syslog_action_restricted(type)) {394394+ if (capable(CAP_SYSLOG))395395+ return 0;396396+ /*397397+ * For historical reasons, accept CAP_SYS_ADMIN too, with398398+ * a warning.399399+ */400400+ if (capable(CAP_SYS_ADMIN)) {401401+ pr_warn_once("%s (%d): Attempt to access syslog with "402402+ "CAP_SYS_ADMIN but no CAP_SYSLOG "403403+ "(deprecated).\n",404404+ current->comm, task_pid_nr(current));405405+ return 0;406406+ }407407+ return -EPERM;408408+ }409409+ return security_syslog(type);410410+}411411+412412+366413/* /dev/kmsg - userspace message inject/listen interface */367414struct devkmsg_user {368415 u64 seq;···667620 if ((file->f_flags & O_ACCMODE) == O_WRONLY)668621 return 0;669622670670- err = security_syslog(SYSLOG_ACTION_READ_ALL);623623+ err = check_syslog_permissions(SYSLOG_ACTION_READ_ALL,624624+ SYSLOG_FROM_READER);671625 if (err)672626 return err;673627···860812{861813}862814#endif863863-864864-#ifdef CONFIG_SECURITY_DMESG_RESTRICT865865-int dmesg_restrict = 1;866866-#else867867-int dmesg_restrict;868868-#endif869869-870870-static int syslog_action_restricted(int type)871871-{872872- if (dmesg_restrict)873873- return 1;874874- /* Unless restricted, we allow "read all" and "get buffer size" for everybody */875875- return type != SYSLOG_ACTION_READ_ALL && type != SYSLOG_ACTION_SIZE_BUFFER;876876-}877877-878878-static int check_syslog_permissions(int type, bool from_file)879879-{880880- /*881881- * If this is from /proc/kmsg and we've already opened it, then we've882882- * already done the capabilities checks at open time.883883- */884884- if (from_file && type != SYSLOG_ACTION_OPEN)885885- return 0;886886-887887- if (syslog_action_restricted(type)) {888888- if (capable(CAP_SYSLOG))889889- return 0;890890- /* For historical reasons, accept CAP_SYS_ADMIN too, with a warning */891891- if (capable(CAP_SYS_ADMIN)) {892892- printk_once(KERN_WARNING "%s (%d): "893893- "Attempt to access syslog with CAP_SYS_ADMIN "894894- "but no CAP_SYSLOG (deprecated).\n",895895- current->comm, task_pid_nr(current));896896- return 0;897897- }898898- return -EPERM;899899- }900900- return 0;901901-}902815903816#if defined(CONFIG_PRINTK_TIME)904817static bool printk_time = 1;···1258124912591250SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)12601251{12611261- return do_syslog(type, buf, len, SYSLOG_FROM_CALL);12521252+ return do_syslog(type, buf, len, SYSLOG_FROM_READER);12621253}1263125412641255/*
+17-4
kernel/rcutree.c
···14511451 rnp->grphi, rnp->qsmask);14521452 raw_spin_unlock_irq(&rnp->lock);14531453#ifdef CONFIG_PROVE_RCU_DELAY14541454- if ((prandom_u32() % (rcu_num_nodes * 8)) == 0 &&14541454+ if ((prandom_u32() % (rcu_num_nodes + 1)) == 0 &&14551455 system_state == SYSTEM_RUNNING)14561456- schedule_timeout_uninterruptible(2);14561456+ udelay(200);14571457#endif /* #ifdef CONFIG_PROVE_RCU_DELAY */14581458 cond_resched();14591459 }···16131613 }16141614}1615161516161616+static void rsp_wakeup(struct irq_work *work)16171617+{16181618+ struct rcu_state *rsp = container_of(work, struct rcu_state, wakeup_work);16191619+16201620+ /* Wake up rcu_gp_kthread() to start the grace period. */16211621+ wake_up(&rsp->gp_wq);16221622+}16231623+16161624/*16171625 * Start a new RCU grace period if warranted, re-initializing the hierarchy16181626 * in preparation for detecting the next grace period. The caller must hold···16451637 }16461638 rsp->gp_flags = RCU_GP_FLAG_INIT;1647163916481648- /* Wake up rcu_gp_kthread() to start the grace period. */16491649- wake_up(&rsp->gp_wq);16401640+ /*16411641+ * We can't do wakeups while holding the rnp->lock, as that16421642+ * could cause possible deadlocks with the rq->lock. Deter16431643+ * the wakeup to interrupt context.16441644+ */16451645+ irq_work_queue(&rsp->wakeup_work);16501646}1651164716521648/*···3247323532483236 rsp->rda = rda;32493237 init_waitqueue_head(&rsp->gp_wq);32383238+ init_irq_work(&rsp->wakeup_work, rsp_wakeup);32503239 rnp = rsp->level[rcu_num_lvls - 1];32513240 for_each_possible_cpu(i) {32523241 while (i > rnp->grphi)
+2
kernel/rcutree.h
···2727#include <linux/threads.h>2828#include <linux/cpumask.h>2929#include <linux/seqlock.h>3030+#include <linux/irq_work.h>30313132/*3233 * Define shape of hierarchy based on NR_CPUS, CONFIG_RCU_FANOUT, and···443442 char *name; /* Name of structure. */444443 char abbr; /* Abbreviated name. */445444 struct list_head flavors; /* List of RCU flavors. */445445+ struct irq_work wakeup_work; /* Postponed wakeups */446446};447447448448/* Values for rcu_state structure's gp_flags field. */
+10-3
kernel/softirq.c
···195195EXPORT_SYMBOL(local_bh_enable_ip);196196197197/*198198- * We restart softirq processing for at most 2 ms,199199- * and if need_resched() is not set.198198+ * We restart softirq processing for at most MAX_SOFTIRQ_RESTART times,199199+ * but break the loop if need_resched() is set or after 2 ms.200200+ * The MAX_SOFTIRQ_TIME provides a nice upper bound in most cases, but in201201+ * certain cases, such as stop_machine(), jiffies may cease to202202+ * increment and so we need the MAX_SOFTIRQ_RESTART limit as203203+ * well to make sure we eventually return from this method.200204 *201205 * These limits have been established via experimentation.202206 * The two things to balance is latency against fairness -···208204 * should not be able to lock up the box.209205 */210206#define MAX_SOFTIRQ_TIME msecs_to_jiffies(2)207207+#define MAX_SOFTIRQ_RESTART 10211208212209asmlinkage void __do_softirq(void)213210{···217212 unsigned long end = jiffies + MAX_SOFTIRQ_TIME;218213 int cpu;219214 unsigned long old_flags = current->flags;215215+ int max_restart = MAX_SOFTIRQ_RESTART;220216221217 /*222218 * Mask out PF_MEMALLOC s current task context is borrowed for the···271265272266 pending = local_softirq_pending();273267 if (pending) {274274- if (time_before(jiffies, end) && !need_resched())268268+ if (time_before(jiffies, end) && !need_resched() &&269269+ --max_restart)275270 goto restart;276271277272 wakeup_softirqd();
+26-3
kernel/sys.c
···362362}363363EXPORT_SYMBOL(unregister_reboot_notifier);364364365365+/* Add backwards compatibility for stable trees. */366366+#ifndef PF_NO_SETAFFINITY367367+#define PF_NO_SETAFFINITY PF_THREAD_BOUND368368+#endif369369+370370+static void migrate_to_reboot_cpu(void)371371+{372372+ /* The boot cpu is always logical cpu 0 */373373+ int cpu = 0;374374+375375+ cpu_hotplug_disable();376376+377377+ /* Make certain the cpu I'm about to reboot on is online */378378+ if (!cpu_online(cpu))379379+ cpu = cpumask_first(cpu_online_mask);380380+381381+ /* Prevent races with other tasks migrating this task */382382+ current->flags |= PF_NO_SETAFFINITY;383383+384384+ /* Make certain I only run on the appropriate processor */385385+ set_cpus_allowed_ptr(current, cpumask_of(cpu));386386+}387387+365388/**366389 * kernel_restart - reboot the system367390 * @cmd: pointer to buffer containing command to execute for restart···396373void kernel_restart(char *cmd)397374{398375 kernel_restart_prepare(cmd);399399- disable_nonboot_cpus();376376+ migrate_to_reboot_cpu();400377 syscore_shutdown();401378 if (!cmd)402379 printk(KERN_EMERG "Restarting system.\n");···423400void kernel_halt(void)424401{425402 kernel_shutdown_prepare(SYSTEM_HALT);426426- disable_nonboot_cpus();403403+ migrate_to_reboot_cpu();427404 syscore_shutdown();428405 printk(KERN_EMERG "System halted.\n");429406 kmsg_dump(KMSG_DUMP_HALT);···442419 kernel_shutdown_prepare(SYSTEM_POWER_OFF);443420 if (pm_power_off_prepare)444421 pm_power_off_prepare();445445- disable_nonboot_cpus();422422+ migrate_to_reboot_cpu();446423 syscore_shutdown();447424 printk(KERN_EMERG "Power down.\n");448425 kmsg_dump(KMSG_DUMP_POWEROFF);
+3-5
kernel/trace/trace.c
···652652 ARCH_TRACE_CLOCKS653653};654654655655-int trace_clock_id;656656-657655/*658656 * trace_parser_get_init - gets the buffer for trace parser659657 */···28242826 iter->iter_flags |= TRACE_FILE_ANNOTATE;2825282728262828 /* Output in nanoseconds only if we are using a clock in nanoseconds. */28272827- if (trace_clocks[trace_clock_id].in_ns)28292829+ if (trace_clocks[tr->clock_id].in_ns)28282830 iter->iter_flags |= TRACE_FILE_TIME_IN_NS;2829283128302832 /* stop the trace while dumping if we are not opening "snapshot" */···38233825 iter->iter_flags |= TRACE_FILE_LAT_FMT;3824382638253827 /* Output in nanoseconds only if we are using a clock in nanoseconds. */38263826- if (trace_clocks[trace_clock_id].in_ns)38283828+ if (trace_clocks[tr->clock_id].in_ns)38273829 iter->iter_flags |= TRACE_FILE_TIME_IN_NS;3828383038293831 iter->cpu_file = tc->cpu;···50935095 cnt = ring_buffer_bytes_cpu(trace_buf->buffer, cpu);50945096 trace_seq_printf(s, "bytes: %ld\n", cnt);5095509750965096- if (trace_clocks[trace_clock_id].in_ns) {50985098+ if (trace_clocks[tr->clock_id].in_ns) {50975099 /* local or global for trace_clock */50985100 t = ns2usecs(ring_buffer_oldest_event_ts(trace_buf->buffer, cpu));50995101 usec_rem = do_div(t, USEC_PER_SEC);
-2
kernel/trace/trace.h
···700700701701extern unsigned long trace_flags;702702703703-extern int trace_clock_id;704704-705703/* Standard output formatting function used for function return traces */706704#ifdef CONFIG_FUNCTION_GRAPH_TRACER707705
+1-1
lib/mpi/mpicoder.c
···3737 mpi_limb_t a;3838 MPI val = NULL;39394040- while (nbytes >= 0 && buffer[0] == 0) {4040+ while (nbytes > 0 && buffer[0] == 0) {4141 buffer++;4242 nbytes--;4343 }
···200200 * get to the page and wait until migration is finished.201201 * When we return from this function the fault will be retried.202202 */203203-void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd,204204- unsigned long address)203203+static void __migration_entry_wait(struct mm_struct *mm, pte_t *ptep,204204+ spinlock_t *ptl)205205{206206- pte_t *ptep, pte;207207- spinlock_t *ptl;206206+ pte_t pte;208207 swp_entry_t entry;209208 struct page *page;210209211211- ptep = pte_offset_map_lock(mm, pmd, address, &ptl);210210+ spin_lock(ptl);212211 pte = *ptep;213212 if (!is_swap_pte(pte))214213 goto out;···233234 return;234235out:235236 pte_unmap_unlock(ptep, ptl);237237+}238238+239239+void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd,240240+ unsigned long address)241241+{242242+ spinlock_t *ptl = pte_lockptr(mm, pmd);243243+ pte_t *ptep = pte_offset_map(pmd, address);244244+ __migration_entry_wait(mm, ptep, ptl);245245+}246246+247247+void migration_entry_wait_huge(struct mm_struct *mm, pte_t *pte)248248+{249249+ spinlock_t *ptl = &(mm)->page_table_lock;250250+ __migration_entry_wait(mm, pte, ptl);236251}237252238253#ifdef CONFIG_BLOCK
+4-2
mm/page_alloc.c
···16281628 long min = mark;16291629 long lowmem_reserve = z->lowmem_reserve[classzone_idx];16301630 int o;16311631+ long free_cma = 0;1631163216321633 free_pages -= (1 << order) - 1;16331634 if (alloc_flags & ALLOC_HIGH)···16381637#ifdef CONFIG_CMA16391638 /* If allocation can't use CMA areas don't use free CMA pages */16401639 if (!(alloc_flags & ALLOC_CMA))16411641- free_pages -= zone_page_state(z, NR_FREE_CMA_PAGES);16401640+ free_cma = zone_page_state(z, NR_FREE_CMA_PAGES);16421641#endif16431643- if (free_pages <= min + lowmem_reserve)16421642+16431643+ if (free_pages - free_cma <= min + lowmem_reserve)16441644 return false;16451645 for (o = 0; o < order; o++) {16461646 /* At the next order, this order's pages become unavailable */
+17-1
mm/swap_state.c
···336336 * Swap entry may have been freed since our caller observed it.337337 */338338 err = swapcache_prepare(entry);339339- if (err == -EEXIST) { /* seems racy */339339+ if (err == -EEXIST) {340340 radix_tree_preload_end();341341+ /*342342+ * We might race against get_swap_page() and stumble343343+ * across a SWAP_HAS_CACHE swap_map entry whose page344344+ * has not been brought into the swapcache yet, while345345+ * the other end is scheduled away waiting on discard346346+ * I/O completion at scan_swap_map().347347+ *348348+ * In order to avoid turning this transitory state349349+ * into a permanent loop around this -EEXIST case350350+ * if !CONFIG_PREEMPT and the I/O completion happens351351+ * to be waiting on the CPU waitqueue where we are now352352+ * busy looping, we just conditionally invoke the353353+ * scheduler here, if there are some more important354354+ * tasks to run.355355+ */356356+ cond_resched();341357 continue;342358 }343359 if (err) { /* swp entry is obsolete ? */
+1-1
mm/swapfile.c
···21162116 }21172117 /* frontswap enabled? set up bit-per-page map for frontswap */21182118 if (frontswap_enabled)21192119- frontswap_map = vzalloc(maxpages / sizeof(long));21192119+ frontswap_map = vzalloc(BITS_TO_LONGS(maxpages) * sizeof(long));2120212021212121 if (p->bdev) {21222122 if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
+18-37
net/9p/client.c
···562562563563 if (!p9_is_proto_dotl(c)) {564564 /* Error is reported in string format */565565- uint16_t len;566566- /* 7 = header size for RERROR, 2 is the size of string len; */567567- int inline_len = in_hdrlen - (7 + 2);565565+ int len;566566+ /* 7 = header size for RERROR; */567567+ int inline_len = in_hdrlen - 7;568568569569- /* Read the size of error string */570570- err = p9pdu_readf(req->rc, c->proto_version, "w", &len);571571- if (err)572572- goto out_err;573573-574574- ename = kmalloc(len + 1, GFP_NOFS);575575- if (!ename) {576576- err = -ENOMEM;569569+ len = req->rc->size - req->rc->offset;570570+ if (len > (P9_ZC_HDR_SZ - 7)) {571571+ err = -EFAULT;577572 goto out_err;578573 }579579- if (len <= inline_len) {580580- /* We have error in protocol buffer itself */581581- if (pdu_read(req->rc, ename, len)) {582582- err = -EFAULT;583583- goto out_free;584574585585- }586586- } else {587587- /*588588- * Part of the data is in user space buffer.589589- */590590- if (pdu_read(req->rc, ename, inline_len)) {591591- err = -EFAULT;592592- goto out_free;593593-594594- }575575+ ename = &req->rc->sdata[req->rc->offset];576576+ if (len > inline_len) {577577+ /* We have error in external buffer */595578 if (kern_buf) {596579 memcpy(ename + inline_len, uidata,597580 len - inline_len);···583600 uidata, len - inline_len);584601 if (err) {585602 err = -EFAULT;586586- goto out_free;603603+ goto out_err;587604 }588605 }589606 }590590- ename[len] = 0;591591- if (p9_is_proto_dotu(c)) {592592- /* For dotu we also have error code */593593- err = p9pdu_readf(req->rc,594594- c->proto_version, "d", &ecode);595595- if (err)596596- goto out_free;607607+ ename = NULL;608608+ err = p9pdu_readf(req->rc, c->proto_version, "s?d",609609+ &ename, &ecode);610610+ if (err)611611+ goto out_err;612612+613613+ if (p9_is_proto_dotu(c))597614 err = -ecode;598598- }615615+599616 if (!err || !IS_ERR_VALUE(err)) {600617 err = p9_errstr2errno(ename, strlen(ename));601618···611628 }612629 return err;613630614614-out_free:615615- kfree(ename);616631out_err:617632 p9_debug(P9_DEBUG_ERROR, "couldn't parse error%d\n", err);618633 return err;
+55-31
net/batman-adv/bat_iv_ogm.c
···2929#include "bat_algo.h"3030#include "network-coding.h"31313232+/**3333+ * batadv_dup_status - duplicate status3434+ * @BATADV_NO_DUP: the packet is a duplicate3535+ * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the3636+ * neighbor)3737+ * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor3838+ * @BATADV_PROTECTED: originator is currently protected (after reboot)3939+ */4040+enum batadv_dup_status {4141+ BATADV_NO_DUP = 0,4242+ BATADV_ORIG_DUP,4343+ BATADV_NEIGH_DUP,4444+ BATADV_PROTECTED,4545+};4646+3247static struct batadv_neigh_node *3348batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface,3449 const uint8_t *neigh_addr,···665650 const struct batadv_ogm_packet *batadv_ogm_packet,666651 struct batadv_hard_iface *if_incoming,667652 const unsigned char *tt_buff,668668- int is_duplicate)653653+ enum batadv_dup_status dup_status)669654{670655 struct batadv_neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL;671656 struct batadv_neigh_node *router = NULL;···691676 continue;692677 }693678694694- if (is_duplicate)679679+ if (dup_status != BATADV_NO_DUP)695680 continue;696681697682 spin_lock_bh(&tmp_neigh_node->lq_update_lock);···733718 neigh_node->tq_avg = batadv_ring_buffer_avg(neigh_node->tq_recv);734719 spin_unlock_bh(&neigh_node->lq_update_lock);735720736736- if (!is_duplicate) {721721+ if (dup_status == BATADV_NO_DUP) {737722 orig_node->last_ttl = batadv_ogm_packet->header.ttl;738723 neigh_node->last_ttl = batadv_ogm_packet->header.ttl;739724 }···917902 return ret;918903}919904920920-/* processes a batman packet for all interfaces, adjusts the sequence number and921921- * finds out whether it is a duplicate.922922- * returns:923923- * 1 the packet is a duplicate924924- * 0 the packet has not yet been received925925- * -1 the packet is old and has been received while the seqno window926926- * was protected. Caller should drop it.905905+/**906906+ * batadv_iv_ogm_update_seqnos - process a batman packet for all interfaces,907907+ * adjust the sequence number and find out whether it is a duplicate908908+ * @ethhdr: ethernet header of the packet909909+ * @batadv_ogm_packet: OGM packet to be considered910910+ * @if_incoming: interface on which the OGM packet was received911911+ *912912+ * Returns duplicate status as enum batadv_dup_status927913 */928928-static int914914+static enum batadv_dup_status929915batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,930916 const struct batadv_ogm_packet *batadv_ogm_packet,931917 const struct batadv_hard_iface *if_incoming)···934918 struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface);935919 struct batadv_orig_node *orig_node;936920 struct batadv_neigh_node *tmp_neigh_node;937937- int is_duplicate = 0;921921+ int is_dup;938922 int32_t seq_diff;939923 int need_update = 0;940940- int set_mark, ret = -1;924924+ int set_mark;925925+ enum batadv_dup_status ret = BATADV_NO_DUP;941926 uint32_t seqno = ntohl(batadv_ogm_packet->seqno);942927 uint8_t *neigh_addr;943928 uint8_t packet_count;944929945930 orig_node = batadv_get_orig_node(bat_priv, batadv_ogm_packet->orig);946931 if (!orig_node)947947- return 0;932932+ return BATADV_NO_DUP;948933949934 spin_lock_bh(&orig_node->ogm_cnt_lock);950935 seq_diff = seqno - orig_node->last_real_seqno;···953936 /* signalize caller that the packet is to be dropped. */954937 if (!hlist_empty(&orig_node->neigh_list) &&955938 batadv_window_protected(bat_priv, seq_diff,956956- &orig_node->batman_seqno_reset))939939+ &orig_node->batman_seqno_reset)) {940940+ ret = BATADV_PROTECTED;957941 goto out;942942+ }958943959944 rcu_read_lock();960945 hlist_for_each_entry_rcu(tmp_neigh_node,961946 &orig_node->neigh_list, list) {962962- is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits,963963- orig_node->last_real_seqno,964964- seqno);965965-966947 neigh_addr = tmp_neigh_node->addr;948948+ is_dup = batadv_test_bit(tmp_neigh_node->real_bits,949949+ orig_node->last_real_seqno,950950+ seqno);951951+967952 if (batadv_compare_eth(neigh_addr, ethhdr->h_source) &&968968- tmp_neigh_node->if_incoming == if_incoming)953953+ tmp_neigh_node->if_incoming == if_incoming) {969954 set_mark = 1;970970- else955955+ if (is_dup)956956+ ret = BATADV_NEIGH_DUP;957957+ } else {971958 set_mark = 0;959959+ if (is_dup && (ret != BATADV_NEIGH_DUP))960960+ ret = BATADV_ORIG_DUP;961961+ }972962973963 /* if the window moved, set the update flag. */974964 need_update |= batadv_bit_get_packet(bat_priv,···994970 orig_node->last_real_seqno, seqno);995971 orig_node->last_real_seqno = seqno;996972 }997997-998998- ret = is_duplicate;9999731000974out:1001975 spin_unlock_bh(&orig_node->ogm_cnt_lock);···1016994 int is_broadcast = 0, is_bidirect;1017995 bool is_single_hop_neigh = false;1018996 bool is_from_best_next_hop = false;10191019- int is_duplicate, sameseq, simlar_ttl;997997+ int sameseq, similar_ttl;998998+ enum batadv_dup_status dup_status;1020999 uint32_t if_incoming_seqno;10211000 uint8_t *prev_sender;10221001···11611138 if (!orig_node)11621139 return;1163114011641164- is_duplicate = batadv_iv_ogm_update_seqnos(ethhdr, batadv_ogm_packet,11651165- if_incoming);11411141+ dup_status = batadv_iv_ogm_update_seqnos(ethhdr, batadv_ogm_packet,11421142+ if_incoming);1166114311671167- if (is_duplicate == -1) {11441144+ if (dup_status == BATADV_PROTECTED) {11681145 batadv_dbg(BATADV_DBG_BATMAN, bat_priv,11691146 "Drop packet: packet within seqno protection time (sender: %pM)\n",11701147 ethhdr->h_source);···12341211 * seqno and similar ttl as the non-duplicate12351212 */12361213 sameseq = orig_node->last_real_seqno == ntohl(batadv_ogm_packet->seqno);12371237- simlar_ttl = orig_node->last_ttl - 3 <= batadv_ogm_packet->header.ttl;12381238- if (is_bidirect && (!is_duplicate || (sameseq && simlar_ttl)))12141214+ similar_ttl = orig_node->last_ttl - 3 <= batadv_ogm_packet->header.ttl;12151215+ if (is_bidirect && ((dup_status == BATADV_NO_DUP) ||12161216+ (sameseq && similar_ttl)))12391217 batadv_iv_ogm_orig_update(bat_priv, orig_node, ethhdr,12401218 batadv_ogm_packet, if_incoming,12411241- tt_buff, is_duplicate);12191219+ tt_buff, dup_status);1242122012431221 /* is single hop (direct) neighbor */12441222 if (is_single_hop_neigh) {···12601236 goto out_neigh;12611237 }1262123812631263- if (is_duplicate) {12391239+ if (dup_status == BATADV_NEIGH_DUP) {12641240 batadv_dbg(BATADV_DBG_BATMAN, bat_priv,12651241 "Drop packet: duplicate packet received\n");12661242 goto out_neigh;
+4
net/batman-adv/bridge_loop_avoidance.c
···10671067 group = htons(crc16(0, primary_if->net_dev->dev_addr, ETH_ALEN));10681068 bat_priv->bla.claim_dest.group = group;1069106910701070+ /* purge everything when bridge loop avoidance is turned off */10711071+ if (!atomic_read(&bat_priv->bridge_loop_avoidance))10721072+ oldif = NULL;10731073+10701074 if (!oldif) {10711075 batadv_bla_purge_claims(bat_priv, NULL, 1);10721076 batadv_bla_purge_backbone_gw(bat_priv, 1);
+1-4
net/batman-adv/sysfs.c
···582582 (strncmp(hard_iface->soft_iface->name, buff, IFNAMSIZ) == 0))583583 goto out;584584585585- if (!rtnl_trylock()) {586586- ret = -ERESTARTSYS;587587- goto out;588588- }585585+ rtnl_lock();589586590587 if (status_tmp == BATADV_IF_NOT_IN_USE) {591588 batadv_hardif_disable_interface(hard_iface,
+5-1
net/bluetooth/hci_core.c
···15551555static void hci_power_on(struct work_struct *work)15561556{15571557 struct hci_dev *hdev = container_of(work, struct hci_dev, power_on);15581558+ int err;1558155915591560 BT_DBG("%s", hdev->name);1560156115611561- if (hci_dev_open(hdev->id) < 0)15621562+ err = hci_dev_open(hdev->id);15631563+ if (err < 0) {15641564+ mgmt_set_powered_failed(hdev, err);15621565 return;15661566+ }1563156715641568 if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags))15651569 queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
···149149150150 rcu_read_lock();151151 list_for_each_entry_rcu(cur, &nfnl_acct_list, head) {152152- if (last && cur != last)153153- continue;152152+ if (last) {153153+ if (cur != last)154154+ continue;154155156156+ last = NULL;157157+ }155158 if (nfnl_acct_fill_info(skb, NETLINK_CB(cb->skb).portid,156159 cb->nlh->nlmsg_seq,157160 NFNL_MSG_TYPE(cb->nlh->nlmsg_type),
+5-2
net/netfilter/nfnetlink_cttimeout.c
···220220221221 rcu_read_lock();222222 list_for_each_entry_rcu(cur, &cttimeout_list, head) {223223- if (last && cur != last)224224- continue;223223+ if (last) {224224+ if (cur != last)225225+ continue;225226227227+ last = NULL;228228+ }226229 if (ctnl_timeout_fill_info(skb, NETLINK_CB(cb->skb).portid,227230 cb->nlh->nlmsg_seq,228231 NFNL_MSG_TYPE(cb->nlh->nlmsg_type),
···125125126126 skb_put(skb, TCPOLEN_MSS);127127128128+ /* RFC 879 states that the default MSS is 536 without specific129129+ * knowledge that the destination host is prepared to accept larger.130130+ * Since no MSS was provided, we MUST NOT set a value > 536.131131+ */132132+ newmss = min(newmss, (u16)536);133133+128134 opt = (u_int8_t *)tcph + sizeof(struct tcphdr);129135 memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr));130136
···4003400340044004 /* Release our hold on the endpoint. */40054005 sp = sctp_sk(sk);40064006+ /* This could happen during socket init, thus we bail out40074007+ * early, since the rest of the below is not setup either.40084008+ */40094009+ if (sp->ep == NULL)40104010+ return;40114011+40064012 if (sp->do_auto_asconf) {40074013 sp->do_auto_asconf = 0;40084014 list_del(&sp->auto_asconf_list);
···11+/* A Bison parser, made by GNU Bison 2.5. */1222-/* A Bison parser, made by GNU Bison 2.4.1. */33-44-/* Skeleton implementation for Bison's Yacc-like parsers in C33+/* Bison implementation for Yacc-like parsers in C5466- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 200677- Free Software Foundation, Inc.55+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.8697 This program is free software: you can redistribute it and/or modify108 it under the terms of the GNU General Public License as published by···4446#define YYBISON 145474648/* Bison version. */4747-#define YYBISON_VERSION "2.4.1"4949+#define YYBISON_VERSION "2.5"48504951/* Skeleton name. */5052#define YYSKELETON_NAME "yacc.c"···65676668/* Copy the first part of user declarations. */67696868-/* Line 189 of yacc.c */7070+/* Line 268 of yacc.c */6971#line 21 "dtc-parser.y"70727173#include <stdio.h>···8688static unsigned char eval_char_literal(const char *s);878988908989-/* Line 189 of yacc.c */9090-#line 93 "dtc-parser.tab.c"9191+/* Line 268 of yacc.c */9292+#line 91 "dtc-parser.tab.c"91939294/* Enabling traces. */9395#ifndef YYDEBUG···145147typedef union YYSTYPE146148{147149148148-/* Line 214 of yacc.c */150150+/* Line 293 of yacc.c */149151#line 40 "dtc-parser.y"150152151153 char *propnodename;···169171170172171173172172-/* Line 214 of yacc.c */173173-#line 176 "dtc-parser.tab.c"174174+/* Line 293 of yacc.c */175175+#line 174 "dtc-parser.tab.c"174176} YYSTYPE;175177# define YYSTYPE_IS_TRIVIAL 1176178# define yystype YYSTYPE /* obsolescent; will be withdrawn */···181183/* Copy the second part of user declarations. */182184183185184184-/* Line 264 of yacc.c */185185-#line 188 "dtc-parser.tab.c"186186+/* Line 343 of yacc.c */187187+#line 186 "dtc-parser.tab.c"186188187189#ifdef short188190# undef short···232234#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)233235234236#ifndef YY_235235-# if YYENABLE_NLS237237+# if defined YYENABLE_NLS && YYENABLE_NLS236238# if ENABLE_NLS237239# include <libintl.h> /* INFRINGES ON USER NAME SPACE */238240# define YY_(msgid) dgettext ("bison-runtime", msgid)···285287# define alloca _alloca286288# else287289# define YYSTACK_ALLOC alloca288288-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \290290+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \289291 || defined __cplusplus || defined _MSC_VER)290292# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */291291-# ifndef _STDLIB_H292292-# define _STDLIB_H 1293293+# ifndef EXIT_SUCCESS294294+# define EXIT_SUCCESS 0293295# endif294296# endif295297# endif···312314# ifndef YYSTACK_ALLOC_MAXIMUM313315# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM314316# endif315315-# if (defined __cplusplus && ! defined _STDLIB_H \317317+# if (defined __cplusplus && ! defined EXIT_SUCCESS \316318 && ! ((defined YYMALLOC || defined malloc) \317319 && (defined YYFREE || defined free)))318320# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */319319-# ifndef _STDLIB_H320320-# define _STDLIB_H 1321321+# ifndef EXIT_SUCCESS322322+# define EXIT_SUCCESS 0321323# endif322324# endif323325# ifndef YYMALLOC324326# define YYMALLOC malloc325325-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \327327+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \326328 || defined __cplusplus || defined _MSC_VER)327329void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */328330# endif329331# endif330332# ifndef YYFREE331333# define YYFREE free332332-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \334334+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \333335 || defined __cplusplus || defined _MSC_VER)334336void free (void *); /* INFRINGES ON USER NAME SPACE */335337# endif···358360 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \359361 + YYSTACK_GAP_MAXIMUM)360362361361-/* Copy COUNT objects from FROM to TO. The source and destination do362362- not overlap. */363363-# ifndef YYCOPY364364-# if defined __GNUC__ && 1 < __GNUC__365365-# define YYCOPY(To, From, Count) \366366- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))367367-# else368368-# define YYCOPY(To, From, Count) \369369- do \370370- { \371371- YYSIZE_T yyi; \372372- for (yyi = 0; yyi < (Count); yyi++) \373373- (To)[yyi] = (From)[yyi]; \374374- } \375375- while (YYID (0))376376-# endif377377-# endif363363+# define YYCOPY_NEEDED 1378364379365/* Relocate STACK from its old location to the new one. The380366 local variables YYSIZE and YYSTACKSIZE give the old and new number of···377395 while (YYID (0))378396379397#endif398398+399399+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED400400+/* Copy COUNT objects from FROM to TO. The source and destination do401401+ not overlap. */402402+# ifndef YYCOPY403403+# if defined __GNUC__ && 1 < __GNUC__404404+# define YYCOPY(To, From, Count) \405405+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))406406+# else407407+# define YYCOPY(To, From, Count) \408408+ do \409409+ { \410410+ YYSIZE_T yyi; \411411+ for (yyi = 0; yyi < (Count); yyi++) \412412+ (To)[yyi] = (From)[yyi]; \413413+ } \414414+ while (YYID (0))415415+# endif416416+# endif417417+#endif /* !YYCOPY_NEEDED */380418381419/* YYFINAL -- State number of the termination state. */382420#define YYFINAL 4···573571 2, 0, 2, 2, 0, 2, 2, 2, 3, 2574572};575573576576-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state577577- STATE-NUM when YYTABLE doesn't specify something else to do. Zero574574+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.575575+ Performed when YYTABLE doesn't specify something else to do. Zero578576 means the default is an error. */579577static const yytype_uint8 yydefact[] =580578{···635633636634/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If637635 positive, shift that token. If negative, reduce the rule which638638- number is the opposite. If zero, do what YYDEFACT says.639639- If YYTABLE_NINF, syntax error. */636636+ number is the opposite. If YYTABLE_NINF, syntax error. */640637#define YYTABLE_NINF -1641638static const yytype_uint8 yytable[] =642639{···654653 68, 0, 0, 70, 0, 0, 0, 0, 72, 0,655654 137, 0, 73, 139656655};656656+657657+#define yypact_value_is_default(yystate) \658658+ ((yystate) == (-78))659659+660660+#define yytable_value_is_error(yytable_value) \661661+ YYID (0)657662658663static const yytype_int16 yycheck[] =659664{···712705713706/* Like YYERROR except do call yyerror. This remains here temporarily714707 to ease the transition to the new meaning of YYERROR, for GCC.715715- Once GCC version 2 has supplanted version 1, this can go. */708708+ Once GCC version 2 has supplanted version 1, this can go. However,709709+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated710710+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is711711+ discussed. */716712717713#define YYFAIL goto yyerrlab714714+#if defined YYFAIL715715+ /* This is here to suppress warnings from the GCC cpp's716716+ -Wunused-macros. Normally we don't worry about that warning, but717717+ some users do, and we want to make it easy for users to remove718718+ YYFAIL uses, which will produce warnings from Bison 2.5. */719719+#endif718720719721#define YYRECOVERING() (!!yyerrstatus)720722···733717 { \734718 yychar = (Token); \735719 yylval = (Value); \736736- yytoken = YYTRANSLATE (yychar); \737720 YYPOPSTACK (1); \738721 goto yybackup; \739722 } \···774759#endif775760776761777777-/* YY_LOCATION_PRINT -- Print the location on the stream.778778- This macro was not mandated originally: define only if we know779779- we won't break user code: when these are the locations we know. */762762+/* This macro is provided for backward compatibility. */780763781764#ifndef YY_LOCATION_PRINT782782-# if YYLTYPE_IS_TRIVIAL783783-# define YY_LOCATION_PRINT(File, Loc) \784784- fprintf (File, "%d.%d-%d.%d", \785785- (Loc).first_line, (Loc).first_column, \786786- (Loc).last_line, (Loc).last_column)787787-# else788788-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)789789-# endif765765+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)790766#endif791767792768···969963# define YYMAXDEPTH 10000970964#endif971965972972-973966974967#if YYERROR_VERBOSE975968···10711066}10721067# endif1073106810741074-/* Copy into YYRESULT an error message about the unexpected token10751075- YYCHAR while in state YYSTATE. Return the number of bytes copied,10761076- including the terminating null byte. If YYRESULT is null, do not10771077- copy anything; just return the number of bytes that would be10781078- copied. As a special case, return 0 if an ordinary "syntax error"10791079- message will do. Return YYSIZE_MAXIMUM if overflow occurs during10801080- size calculation. */10811081-static YYSIZE_T10821082-yysyntax_error (char *yyresult, int yystate, int yychar)10691069+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message10701070+ about the unexpected token YYTOKEN for the state stack whose top is10711071+ YYSSP.10721072+10731073+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is10741074+ not large enough to hold the message. In that case, also set10751075+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the10761076+ required number of bytes is too large to store. */10771077+static int10781078+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,10791079+ yytype_int16 *yyssp, int yytoken)10831080{10841084- int yyn = yypact[yystate];10811081+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);10821082+ YYSIZE_T yysize = yysize0;10831083+ YYSIZE_T yysize1;10841084+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };10851085+ /* Internationalized format string. */10861086+ const char *yyformat = 0;10871087+ /* Arguments of yyformat. */10881088+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];10891089+ /* Number of reported tokens (one for the "unexpected", one per10901090+ "expected"). */10911091+ int yycount = 0;1085109210861086- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))10871087- return 0;10881088- else10931093+ /* There are many possibilities here to consider:10941094+ - Assume YYFAIL is not used. It's too flawed to consider. See10951095+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>10961096+ for details. YYERROR is fine as it does not invoke this10971097+ function.10981098+ - If this state is a consistent state with a default action, then10991099+ the only way this function was invoked is if the default action11001100+ is an error action. In that case, don't check for expected11011101+ tokens because there are none.11021102+ - The only way there can be no lookahead present (in yychar) is if11031103+ this state is a consistent state with a default action. Thus,11041104+ detecting the absence of a lookahead is sufficient to determine11051105+ that there is no unexpected or expected token to report. In that11061106+ case, just report a simple "syntax error".11071107+ - Don't assume there isn't a lookahead just because this state is a11081108+ consistent state with a default action. There might have been a11091109+ previous inconsistent state, consistent state with a non-default11101110+ action, or user semantic action that manipulated yychar.11111111+ - Of course, the expected token list depends on states to have11121112+ correct lookahead information, and it depends on the parser not11131113+ to perform extra reductions after fetching a lookahead from the11141114+ scanner and before detecting a syntax error. Thus, state merging11151115+ (from LALR or IELR) and default reductions corrupt the expected11161116+ token list. However, the list is correct for canonical LR with11171117+ one exception: it will still contain any token that will not be11181118+ accepted due to an error action in a later state.11191119+ */11201120+ if (yytoken != YYEMPTY)10891121 {10901090- int yytype = YYTRANSLATE (yychar);10911091- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);10921092- YYSIZE_T yysize = yysize0;10931093- YYSIZE_T yysize1;10941094- int yysize_overflow = 0;10951095- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };10961096- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];10971097- int yyx;11221122+ int yyn = yypact[*yyssp];11231123+ yyarg[yycount++] = yytname[yytoken];11241124+ if (!yypact_value_is_default (yyn))11251125+ {11261126+ /* Start YYX at -YYN if negative to avoid negative indexes in11271127+ YYCHECK. In other words, skip the first -YYN actions for11281128+ this state because they are default actions. */11291129+ int yyxbegin = yyn < 0 ? -yyn : 0;11301130+ /* Stay within bounds of both yycheck and yytname. */11311131+ int yychecklim = YYLAST - yyn + 1;11321132+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;11331133+ int yyx;1098113410991099-# if 011001100- /* This is so xgettext sees the translatable formats that are11011101- constructed on the fly. */11021102- YY_("syntax error, unexpected %s");11031103- YY_("syntax error, unexpected %s, expecting %s");11041104- YY_("syntax error, unexpected %s, expecting %s or %s");11051105- YY_("syntax error, unexpected %s, expecting %s or %s or %s");11061106- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");11071107-# endif11081108- char *yyfmt;11091109- char const *yyf;11101110- static char const yyunexpected[] = "syntax error, unexpected %s";11111111- static char const yyexpecting[] = ", expecting %s";11121112- static char const yyor[] = " or %s";11131113- char yyformat[sizeof yyunexpected11141114- + sizeof yyexpecting - 111151115- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)11161116- * (sizeof yyor - 1))];11171117- char const *yyprefix = yyexpecting;11181118-11191119- /* Start YYX at -YYN if negative to avoid negative indexes in11201120- YYCHECK. */11211121- int yyxbegin = yyn < 0 ? -yyn : 0;11221122-11231123- /* Stay within bounds of both yycheck and yytname. */11241124- int yychecklim = YYLAST - yyn + 1;11251125- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;11261126- int yycount = 1;11271127-11281128- yyarg[0] = yytname[yytype];11291129- yyfmt = yystpcpy (yyformat, yyunexpected);11301130-11311131- for (yyx = yyxbegin; yyx < yyxend; ++yyx)11321132- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)11331133- {11341134- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)11351135- {11361136- yycount = 1;11371137- yysize = yysize0;11381138- yyformat[sizeof yyunexpected - 1] = '\0';11391139- break;11401140- }11411141- yyarg[yycount++] = yytname[yyx];11421142- yysize1 = yysize + yytnamerr (0, yytname[yyx]);11431143- yysize_overflow |= (yysize1 < yysize);11441144- yysize = yysize1;11451145- yyfmt = yystpcpy (yyfmt, yyprefix);11461146- yyprefix = yyor;11471147- }11481148-11491149- yyf = YY_(yyformat);11501150- yysize1 = yysize + yystrlen (yyf);11511151- yysize_overflow |= (yysize1 < yysize);11521152- yysize = yysize1;11531153-11541154- if (yysize_overflow)11551155- return YYSIZE_MAXIMUM;11561156-11571157- if (yyresult)11581158- {11591159- /* Avoid sprintf, as that infringes on the user's name space.11601160- Don't have undefined behavior even if the translation11611161- produced a string with the wrong number of "%s"s. */11621162- char *yyp = yyresult;11631163- int yyi = 0;11641164- while ((*yyp = *yyf) != '\0')11651165- {11661166- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)11671167- {11681168- yyp += yytnamerr (yyp, yyarg[yyi++]);11691169- yyf += 2;11701170- }11711171- else11721172- {11731173- yyp++;11741174- yyf++;11751175- }11761176- }11771177- }11781178- return yysize;11351135+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)11361136+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR11371137+ && !yytable_value_is_error (yytable[yyx + yyn]))11381138+ {11391139+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)11401140+ {11411141+ yycount = 1;11421142+ yysize = yysize0;11431143+ break;11441144+ }11451145+ yyarg[yycount++] = yytname[yyx];11461146+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);11471147+ if (! (yysize <= yysize111481148+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))11491149+ return 2;11501150+ yysize = yysize1;11511151+ }11521152+ }11791153 }11541154+11551155+ switch (yycount)11561156+ {11571157+# define YYCASE_(N, S) \11581158+ case N: \11591159+ yyformat = S; \11601160+ break11611161+ YYCASE_(0, YY_("syntax error"));11621162+ YYCASE_(1, YY_("syntax error, unexpected %s"));11631163+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));11641164+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));11651165+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));11661166+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));11671167+# undef YYCASE_11681168+ }11691169+11701170+ yysize1 = yysize + yystrlen (yyformat);11711171+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))11721172+ return 2;11731173+ yysize = yysize1;11741174+11751175+ if (*yymsg_alloc < yysize)11761176+ {11771177+ *yymsg_alloc = 2 * yysize;11781178+ if (! (yysize <= *yymsg_alloc11791179+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))11801180+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;11811181+ return 1;11821182+ }11831183+11841184+ /* Avoid sprintf, as that infringes on the user's name space.11851185+ Don't have undefined behavior even if the translation11861186+ produced a string with the wrong number of "%s"s. */11871187+ {11881188+ char *yyp = *yymsg;11891189+ int yyi = 0;11901190+ while ((*yyp = *yyformat) != '\0')11911191+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)11921192+ {11931193+ yyp += yytnamerr (yyp, yyarg[yyi++]);11941194+ yyformat += 2;11951195+ }11961196+ else11971197+ {11981198+ yyp++;11991199+ yyformat++;12001200+ }12011201+ }12021202+ return 0;11801203}11811204#endif /* YYERROR_VERBOSE */11821182-1183120511841206/*-----------------------------------------------.11851207| Release the memory associated to this symbol. |···12391207 }12401208}1241120912101210+12421211/* Prevent warnings from -Wmissing-prototypes. */12431212#ifdef YYPARSE_PARAM12441213#if defined __STDC__ || defined __cplusplus···12661233int yynerrs;126712341268123512691269-12701270-/*-------------------------.12711271-| yyparse or yypush_parse. |12721272-`-------------------------*/12361236+/*----------.12371237+| yyparse. |12381238+`----------*/1273123912741240#ifdef YYPARSE_PARAM12751241#if (defined __STDC__ || defined __C99__FUNC__ \···12921260#endif12931261#endif12941262{12951295-12961296-12971263 int yystate;12981264 /* Number of tokens to shift before error messages enabled. */12991265 int yyerrstatus;···1446141614471417 /* First try to decide what to do without reference to lookahead token. */14481418 yyn = yypact[yystate];14491449- if (yyn == YYPACT_NINF)14191419+ if (yypact_value_is_default (yyn))14501420 goto yydefault;1451142114521422 /* Not known => get a lookahead token if don't already have one. */···14771447 yyn = yytable[yyn];14781448 if (yyn <= 0)14791449 {14801480- if (yyn == 0 || yyn == YYTABLE_NINF)14811481- goto yyerrlab;14501450+ if (yytable_value_is_error (yyn))14511451+ goto yyerrlab;14821452 yyn = -yyn;14831453 goto yyreduce;14841454 }···15331503 {15341504 case 2:1535150515361536-/* Line 1455 of yacc.c */15061506+/* Line 1806 of yacc.c */15371507#line 110 "dtc-parser.y"15381508 {15391509 the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),15401510 guess_boot_cpuid((yyvsp[(4) - (4)].node)));15411541- ;}15111511+ }15421512 break;1543151315441514 case 3:1545151515461546-/* Line 1455 of yacc.c */15161516+/* Line 1806 of yacc.c */15471517#line 118 "dtc-parser.y"15481518 {15491519 (yyval.re) = NULL;15501550- ;}15201520+ }15511521 break;1552152215531523 case 4:1554152415551555-/* Line 1455 of yacc.c */15251525+/* Line 1806 of yacc.c */15561526#line 122 "dtc-parser.y"15571527 {15581528 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));15591559- ;}15291529+ }15601530 break;1561153115621532 case 5:1563153315641564-/* Line 1455 of yacc.c */15341534+/* Line 1806 of yacc.c */15651535#line 129 "dtc-parser.y"15661536 {15671537 (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));15681568- ;}15381538+ }15691539 break;1570154015711541 case 6:1572154215731573-/* Line 1455 of yacc.c */15431543+/* Line 1806 of yacc.c */15741544#line 133 "dtc-parser.y"15751545 {15761546 add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));15771547 (yyval.re) = (yyvsp[(2) - (2)].re);15781578- ;}15481548+ }15791549 break;1580155015811551 case 7:1582155215831583-/* Line 1455 of yacc.c */15531553+/* Line 1806 of yacc.c */15841554#line 141 "dtc-parser.y"15851555 {15861556 (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");15871587- ;}15571557+ }15881558 break;1589155915901560 case 8:1591156115921592-/* Line 1455 of yacc.c */15621562+/* Line 1806 of yacc.c */15931563#line 145 "dtc-parser.y"15941564 {15951565 (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));15961596- ;}15661566+ }15971567 break;1598156815991569 case 9:1600157016011601-/* Line 1455 of yacc.c */15711571+/* Line 1806 of yacc.c */16021572#line 149 "dtc-parser.y"16031573 {16041574 struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));···16081578 else16091579 print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref));16101580 (yyval.node) = (yyvsp[(1) - (3)].node);16111611- ;}15811581+ }16121582 break;1613158316141584 case 10:1615158516161616-/* Line 1455 of yacc.c */15861586+/* Line 1806 of yacc.c */16171587#line 159 "dtc-parser.y"16181588 {16191589 struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));···16241594 delete_node(target);1625159516261596 (yyval.node) = (yyvsp[(1) - (4)].node);16271627- ;}15971597+ }16281598 break;1629159916301600 case 11:1631160116321632-/* Line 1455 of yacc.c */16021602+/* Line 1806 of yacc.c */16331603#line 173 "dtc-parser.y"16341604 {16351605 (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));16361636- ;}16061606+ }16371607 break;1638160816391609 case 12:1640161016411641-/* Line 1455 of yacc.c */16111611+/* Line 1806 of yacc.c */16421612#line 180 "dtc-parser.y"16431613 {16441614 (yyval.proplist) = NULL;16451645- ;}16151615+ }16461616 break;1647161716481618 case 13:1649161916501650-/* Line 1455 of yacc.c */16201620+/* Line 1806 of yacc.c */16511621#line 184 "dtc-parser.y"16521622 {16531623 (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));16541654- ;}16241624+ }16551625 break;1656162616571627 case 14:1658162816591659-/* Line 1455 of yacc.c */16291629+/* Line 1806 of yacc.c */16601630#line 191 "dtc-parser.y"16611631 {16621632 (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));16631663- ;}16331633+ }16641634 break;1665163516661636 case 15:1667163716681668-/* Line 1455 of yacc.c */16381638+/* Line 1806 of yacc.c */16691639#line 195 "dtc-parser.y"16701640 {16711641 (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);16721672- ;}16421642+ }16731643 break;1674164416751645 case 16:1676164616771677-/* Line 1455 of yacc.c */16471647+/* Line 1806 of yacc.c */16781648#line 199 "dtc-parser.y"16791649 {16801650 (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));16811681- ;}16511651+ }16821652 break;1683165316841654 case 17:1685165516861686-/* Line 1455 of yacc.c */16561656+/* Line 1806 of yacc.c */16871657#line 203 "dtc-parser.y"16881658 {16891659 add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));16901660 (yyval.prop) = (yyvsp[(2) - (2)].prop);16911691- ;}16611661+ }16921662 break;1693166316941664 case 18:1695166516961696-/* Line 1455 of yacc.c */16661666+/* Line 1806 of yacc.c */16971667#line 211 "dtc-parser.y"16981668 {16991669 (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));17001700- ;}16701670+ }17011671 break;1702167217031673 case 19:1704167417051705-/* Line 1455 of yacc.c */16751675+/* Line 1806 of yacc.c */17061676#line 215 "dtc-parser.y"17071677 {17081678 (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);17091709- ;}16791679+ }17101680 break;1711168117121682 case 20:1713168317141714-/* Line 1455 of yacc.c */16841684+/* Line 1806 of yacc.c */17151685#line 219 "dtc-parser.y"17161686 {17171687 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));17181718- ;}16881688+ }17191689 break;1720169017211691 case 21:1722169217231723-/* Line 1455 of yacc.c */16931693+/* Line 1806 of yacc.c */17241694#line 223 "dtc-parser.y"17251695 {17261696 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));17271727- ;}16971697+ }17281698 break;1729169917301700 case 22:1731170117321732-/* Line 1455 of yacc.c */17021702+/* Line 1806 of yacc.c */17331703#line 227 "dtc-parser.y"17341704 {17351705 FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);···1746171617471717 (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);17481718 fclose(f);17491749- ;}17191719+ }17501720 break;1751172117521722 case 23:1753172317541754-/* Line 1455 of yacc.c */17241724+/* Line 1806 of yacc.c */17551725#line 244 "dtc-parser.y"17561726 {17571727 FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);···1761173117621732 (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);17631733 fclose(f);17641764- ;}17341734+ }17651735 break;1766173617671737 case 24:1768173817691769-/* Line 1455 of yacc.c */17391739+/* Line 1806 of yacc.c */17701740#line 254 "dtc-parser.y"17711741 {17721742 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));17731773- ;}17431743+ }17741744 break;1775174517761746 case 25:1777174717781778-/* Line 1455 of yacc.c */17481748+/* Line 1806 of yacc.c */17791749#line 261 "dtc-parser.y"17801750 {17811751 (yyval.data) = empty_data;17821782- ;}17521752+ }17831753 break;1784175417851755 case 26:1786175617871787-/* Line 1455 of yacc.c */17571757+/* Line 1806 of yacc.c */17881758#line 265 "dtc-parser.y"17891759 {17901760 (yyval.data) = (yyvsp[(1) - (2)].data);17911791- ;}17611761+ }17921762 break;1793176317941764 case 27:1795176517961796-/* Line 1455 of yacc.c */17661766+/* Line 1806 of yacc.c */17971767#line 269 "dtc-parser.y"17981768 {17991769 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));18001800- ;}17701770+ }18011771 break;1802177218031773 case 28:1804177418051805-/* Line 1455 of yacc.c */17751775+/* Line 1806 of yacc.c */18061776#line 276 "dtc-parser.y"18071777 {18081778 (yyval.array).data = empty_data;···18171787 " are currently supported");18181788 (yyval.array).bits = 32;18191789 }18201820- ;}17901790+ }18211791 break;1822179218231793 case 29:1824179418251825-/* Line 1455 of yacc.c */17951795+/* Line 1806 of yacc.c */18261796#line 291 "dtc-parser.y"18271797 {18281798 (yyval.array).data = empty_data;18291799 (yyval.array).bits = 32;18301830- ;}18001800+ }18311801 break;1832180218331803 case 30:1834180418351835-/* Line 1455 of yacc.c */18051805+/* Line 1806 of yacc.c */18361806#line 296 "dtc-parser.y"18371807 {18381808 if ((yyvsp[(1) - (2)].array).bits < 64) {···18521822 }1853182318541824 (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);18551855- ;}18251825+ }18561826 break;1857182718581828 case 31:1859182918601860-/* Line 1455 of yacc.c */18301830+/* Line 1806 of yacc.c */18611831#line 316 "dtc-parser.y"18621832 {18631833 uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);···18711841 "arrays with 32-bit elements.");1872184218731843 (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);18741874- ;}18441844+ }18751845 break;1876184618771847 case 32:1878184818791879-/* Line 1455 of yacc.c */18491849+/* Line 1806 of yacc.c */18801850#line 330 "dtc-parser.y"18811851 {18821852 (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));18831883- ;}18531853+ }18841854 break;1885185518861856 case 33:1887185718881888-/* Line 1455 of yacc.c */18581858+/* Line 1806 of yacc.c */18891859#line 337 "dtc-parser.y"18901860 {18911861 (yyval.integer) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);18921892- ;}18621862+ }18931863 break;1894186418951865 case 34:1896186618971897-/* Line 1455 of yacc.c */18671867+/* Line 1806 of yacc.c */18981868#line 341 "dtc-parser.y"18991869 {19001870 (yyval.integer) = eval_char_literal((yyvsp[(1) - (1)].literal));19011901- ;}18711871+ }19021872 break;1903187319041874 case 35:1905187519061906-/* Line 1455 of yacc.c */18761876+/* Line 1806 of yacc.c */19071877#line 345 "dtc-parser.y"19081878 {19091879 (yyval.integer) = (yyvsp[(2) - (3)].integer);19101910- ;}18801880+ }19111881 break;1912188219131883 case 38:1914188419151915-/* Line 1455 of yacc.c */18851885+/* Line 1806 of yacc.c */19161886#line 356 "dtc-parser.y"19171917- { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); ;}18871887+ { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }19181888 break;1919188919201890 case 40:1921189119221922-/* Line 1455 of yacc.c */18921892+/* Line 1806 of yacc.c */19231893#line 361 "dtc-parser.y"19241924- { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); ;}18941894+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }19251895 break;1926189619271897 case 42:1928189819291929-/* Line 1455 of yacc.c */18991899+/* Line 1806 of yacc.c */19301900#line 366 "dtc-parser.y"19311931- { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); ;}19011901+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }19321902 break;1933190319341904 case 44:1935190519361936-/* Line 1455 of yacc.c */19061906+/* Line 1806 of yacc.c */19371907#line 371 "dtc-parser.y"19381938- { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); ;}19081908+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }19391909 break;1940191019411911 case 46:1942191219431943-/* Line 1455 of yacc.c */19131913+/* Line 1806 of yacc.c */19441914#line 376 "dtc-parser.y"19451945- { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); ;}19151915+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }19461916 break;1947191719481918 case 48:1949191919501950-/* Line 1455 of yacc.c */19201920+/* Line 1806 of yacc.c */19511921#line 381 "dtc-parser.y"19521952- { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); ;}19221922+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }19531923 break;1954192419551925 case 50:1956192619571957-/* Line 1455 of yacc.c */19271927+/* Line 1806 of yacc.c */19581928#line 386 "dtc-parser.y"19591959- { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); ;}19291929+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }19601930 break;1961193119621932 case 51:1963193319641964-/* Line 1455 of yacc.c */19341934+/* Line 1806 of yacc.c */19651935#line 387 "dtc-parser.y"19661966- { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); ;}19361936+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }19671937 break;1968193819691939 case 53:1970194019711971-/* Line 1455 of yacc.c */19411941+/* Line 1806 of yacc.c */19721942#line 392 "dtc-parser.y"19731973- { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); ;}19431943+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }19741944 break;1975194519761946 case 54:1977194719781978-/* Line 1455 of yacc.c */19481948+/* Line 1806 of yacc.c */19791949#line 393 "dtc-parser.y"19801980- { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); ;}19501950+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }19811951 break;1982195219831953 case 55:1984195419851985-/* Line 1455 of yacc.c */19551955+/* Line 1806 of yacc.c */19861956#line 394 "dtc-parser.y"19871987- { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); ;}19571957+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }19881958 break;1989195919901960 case 56:1991196119921992-/* Line 1455 of yacc.c */19621962+/* Line 1806 of yacc.c */19931963#line 395 "dtc-parser.y"19941994- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); ;}19641964+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }19951965 break;1996196619971967 case 57:1998196819991999-/* Line 1455 of yacc.c */19691969+/* Line 1806 of yacc.c */20001970#line 399 "dtc-parser.y"20012001- { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); ;}19711971+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }20021972 break;2003197320041974 case 58:2005197520062006-/* Line 1455 of yacc.c */19761976+/* Line 1806 of yacc.c */20071977#line 400 "dtc-parser.y"20082008- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); ;}19781978+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }20091979 break;2010198020111981 case 60:2012198220132013-/* Line 1455 of yacc.c */19831983+/* Line 1806 of yacc.c */20141984#line 405 "dtc-parser.y"20152015- { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;}19851985+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }20161986 break;2017198720181988 case 61:2019198920202020-/* Line 1455 of yacc.c */19901990+/* Line 1806 of yacc.c */20211991#line 406 "dtc-parser.y"20222022- { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); ;}19921992+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }20231993 break;2024199420251995 case 63:2026199620272027-/* Line 1455 of yacc.c */19971997+/* Line 1806 of yacc.c */20281998#line 411 "dtc-parser.y"20292029- { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); ;}19991999+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }20302000 break;2031200120322002 case 64:2033200320342034-/* Line 1455 of yacc.c */20042004+/* Line 1806 of yacc.c */20352005#line 412 "dtc-parser.y"20362036- { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); ;}20062006+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }20372007 break;2038200820392009 case 65:2040201020412041-/* Line 1455 of yacc.c */20112011+/* Line 1806 of yacc.c */20422012#line 413 "dtc-parser.y"20432043- { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); ;}20132013+ { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }20442014 break;2045201520462016 case 68:2047201720482048-/* Line 1455 of yacc.c */20182018+/* Line 1806 of yacc.c */20492019#line 419 "dtc-parser.y"20502050- { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}20202020+ { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }20512021 break;2052202220532023 case 69:2054202420552055-/* Line 1455 of yacc.c */20252025+/* Line 1806 of yacc.c */20562026#line 420 "dtc-parser.y"20572057- { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); ;}20272027+ { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }20582028 break;2059202920602030 case 70:2061203120622062-/* Line 1455 of yacc.c */20322032+/* Line 1806 of yacc.c */20632033#line 421 "dtc-parser.y"20642064- { (yyval.integer) = !(yyvsp[(2) - (2)].integer); ;}20342034+ { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }20652035 break;2066203620672037 case 71:2068203820692069-/* Line 1455 of yacc.c */20392039+/* Line 1806 of yacc.c */20702040#line 426 "dtc-parser.y"20712041 {20722042 (yyval.data) = empty_data;20732073- ;}20432043+ }20742044 break;2075204520762046 case 72:2077204720782078-/* Line 1455 of yacc.c */20482048+/* Line 1806 of yacc.c */20792049#line 430 "dtc-parser.y"20802050 {20812051 (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));20822082- ;}20522052+ }20832053 break;2084205420852055 case 73:2086205620872087-/* Line 1455 of yacc.c */20572057+/* Line 1806 of yacc.c */20882058#line 434 "dtc-parser.y"20892059 {20902060 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));20912091- ;}20612061+ }20922062 break;2093206320942064 case 74:2095206520962096-/* Line 1455 of yacc.c */20662066+/* Line 1806 of yacc.c */20972067#line 441 "dtc-parser.y"20982068 {20992069 (yyval.nodelist) = NULL;21002100- ;}20702070+ }21012071 break;2102207221032073 case 75:2104207421052105-/* Line 1455 of yacc.c */20752075+/* Line 1806 of yacc.c */21062076#line 445 "dtc-parser.y"21072077 {21082078 (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));21092109- ;}20792079+ }21102080 break;2111208121122082 case 76:2113208321142114-/* Line 1455 of yacc.c */20842084+/* Line 1806 of yacc.c */21152085#line 449 "dtc-parser.y"21162086 {21172087 print_error("syntax error: properties must precede subnodes");21182088 YYERROR;21192119- ;}20892089+ }21202090 break;2121209121222092 case 77:2123209321242124-/* Line 1455 of yacc.c */20942094+/* Line 1806 of yacc.c */21252095#line 457 "dtc-parser.y"21262096 {21272097 (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));21282128- ;}20982098+ }21292099 break;2130210021312101 case 78:2132210221332133-/* Line 1455 of yacc.c */21032103+/* Line 1806 of yacc.c */21342104#line 461 "dtc-parser.y"21352105 {21362106 (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));21372137- ;}21072107+ }21382108 break;2139210921402110 case 79:2141211121422142-/* Line 1455 of yacc.c */21122112+/* Line 1806 of yacc.c */21432113#line 465 "dtc-parser.y"21442114 {21452115 add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));21462116 (yyval.node) = (yyvsp[(2) - (2)].node);21472147- ;}21172117+ }21482118 break;21492119215021202151212121522152-/* Line 1455 of yacc.c */21532153-#line 2124 "dtc-parser.tab.c"21222122+/* Line 1806 of yacc.c */21232123+#line 2154 "dtc-parser.tab.c"21542124 default: break;21552125 }21262126+ /* User semantic actions sometimes alter yychar, and that requires21272127+ that yytoken be updated with the new translation. We take the21282128+ approach of translating immediately before every use of yytoken.21292129+ One alternative is translating here after every semantic action,21302130+ but that translation would be missed if the semantic action invokes21312131+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or21322132+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an21332133+ incorrect destructor might then be invoked immediately. In the21342134+ case of YYERROR or YYBACKUP, subsequent parser actions might lead21352135+ to an incorrect destructor call or verbose syntax error message21362136+ before the lookahead is translated. */21562137 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);2157213821582139 YYPOPSTACK (yylen);···21912150| yyerrlab -- here on detecting error |21922151`------------------------------------*/21932152yyerrlab:21532153+ /* Make sure we have latest lookahead translation. See comments at21542154+ user semantic actions for why this is necessary. */21552155+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);21562156+21942157 /* If not already recovering from an error, report this error. */21952158 if (!yyerrstatus)21962159 {···22022157#if ! YYERROR_VERBOSE22032158 yyerror (YY_("syntax error"));22042159#else21602160+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \21612161+ yyssp, yytoken)22052162 {22062206- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);22072207- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)22082208- {22092209- YYSIZE_T yyalloc = 2 * yysize;22102210- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))22112211- yyalloc = YYSTACK_ALLOC_MAXIMUM;22122212- if (yymsg != yymsgbuf)22132213- YYSTACK_FREE (yymsg);22142214- yymsg = (char *) YYSTACK_ALLOC (yyalloc);22152215- if (yymsg)22162216- yymsg_alloc = yyalloc;22172217- else22182218- {22192219- yymsg = yymsgbuf;22202220- yymsg_alloc = sizeof yymsgbuf;22212221- }22222222- }22232223-22242224- if (0 < yysize && yysize <= yymsg_alloc)22252225- {22262226- (void) yysyntax_error (yymsg, yystate, yychar);22272227- yyerror (yymsg);22282228- }22292229- else22302230- {22312231- yyerror (YY_("syntax error"));22322232- if (yysize != 0)22332233- goto yyexhaustedlab;22342234- }21632163+ char const *yymsgp = YY_("syntax error");21642164+ int yysyntax_error_status;21652165+ yysyntax_error_status = YYSYNTAX_ERROR;21662166+ if (yysyntax_error_status == 0)21672167+ yymsgp = yymsg;21682168+ else if (yysyntax_error_status == 1)21692169+ {21702170+ if (yymsg != yymsgbuf)21712171+ YYSTACK_FREE (yymsg);21722172+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);21732173+ if (!yymsg)21742174+ {21752175+ yymsg = yymsgbuf;21762176+ yymsg_alloc = sizeof yymsgbuf;21772177+ yysyntax_error_status = 2;21782178+ }21792179+ else21802180+ {21812181+ yysyntax_error_status = YYSYNTAX_ERROR;21822182+ yymsgp = yymsg;21832183+ }21842184+ }21852185+ yyerror (yymsgp);21862186+ if (yysyntax_error_status == 2)21872187+ goto yyexhaustedlab;22352188 }21892189+# undef YYSYNTAX_ERROR22362190#endif22372191 }22382192···22902246 for (;;)22912247 {22922248 yyn = yypact[yystate];22932293- if (yyn != YYPACT_NINF)22492249+ if (!yypact_value_is_default (yyn))22942250 {22952251 yyn += YYTERROR;22962252 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)···2349230523502306yyreturn:23512307 if (yychar != YYEMPTY)23522352- yydestruct ("Cleanup: discarding lookahead",23532353- yytoken, &yylval);23082308+ {23092309+ /* Make sure we have latest lookahead translation. See comments at23102310+ user semantic actions for why this is necessary. */23112311+ yytoken = YYTRANSLATE (yychar);23122312+ yydestruct ("Cleanup: discarding lookahead",23132313+ yytoken, &yylval);23142314+ }23542315 /* Do not reclaim the symbols of the rule which action triggered23552316 this YYABORT or YYACCEPT. */23562317 YYPOPSTACK (yylen);···23802331238123322382233323832383-/* Line 1675 of yacc.c */23342334+/* Line 2067 of yacc.c */23842335#line 471 "dtc-parser.y"2385233623862337
+6-8
scripts/dtc/dtc-parser.tab.h_shipped
···11+/* A Bison parser, made by GNU Bison 2.5. */1222-/* A Bison parser, made by GNU Bison 2.4.1. */33-44-/* Skeleton interface for Bison's Yacc-like parsers in C33+/* Bison interface for Yacc-like parsers in C5466- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 200677- Free Software Foundation, Inc.55+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.8697 This program is free software: you can redistribute it and/or modify108 it under the terms of the GNU General Public License as published by···6870typedef union YYSTYPE6971{70727171-/* Line 1676 of yacc.c */7373+/* Line 2068 of yacc.c */7274#line 40 "dtc-parser.y"73757476 char *propnodename;···9294939594969595-/* Line 1676 of yacc.c */9696-#line 99 "dtc-parser.tab.h"9797+/* Line 2068 of yacc.c */9898+#line 97 "dtc-parser.tab.h"9799} YYSTYPE;98100# define YYSTYPE_IS_TRIVIAL 199101# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+2-2
sound/core/pcm_native.c
···16491649 }16501650 if (!snd_pcm_stream_linked(substream)) {16511651 substream->group = group;16521652+ group = NULL;16521653 spin_lock_init(&substream->group->lock);16531654 INIT_LIST_HEAD(&substream->group->substreams);16541655 list_add_tail(&substream->link_list, &substream->group->substreams);···16641663 _nolock:16651664 snd_card_unref(substream1->pcm->card);16661665 fput_light(file, fput_needed);16671667- if (res < 0)16681668- kfree(group);16661666+ kfree(group);16691667 return res;16701668}16711669
···5555 [snd_soc_dapm_clock_supply] = 1,5656 [snd_soc_dapm_micbias] = 2,5757 [snd_soc_dapm_dai_link] = 2,5858- [snd_soc_dapm_dai] = 3,5858+ [snd_soc_dapm_dai_in] = 3,5959+ [snd_soc_dapm_dai_out] = 3,5960 [snd_soc_dapm_aif_in] = 3,6061 [snd_soc_dapm_aif_out] = 3,6162 [snd_soc_dapm_mic] = 4,···9392 [snd_soc_dapm_value_mux] = 9,9493 [snd_soc_dapm_aif_in] = 10,9594 [snd_soc_dapm_aif_out] = 10,9696- [snd_soc_dapm_dai] = 10,9595+ [snd_soc_dapm_dai_in] = 10,9696+ [snd_soc_dapm_dai_out] = 10,9797 [snd_soc_dapm_dai_link] = 11,9898 [snd_soc_dapm_clock_supply] = 12,9999 [snd_soc_dapm_regulator_supply] = 12,···421419 case snd_soc_dapm_clock_supply:422420 case snd_soc_dapm_aif_in:423421 case snd_soc_dapm_aif_out:424424- case snd_soc_dapm_dai:422422+ case snd_soc_dapm_dai_in:423423+ case snd_soc_dapm_dai_out:425424 case snd_soc_dapm_hp:426425 case snd_soc_dapm_mic:427426 case snd_soc_dapm_spk:···823820 switch (widget->id) {824821 case snd_soc_dapm_adc:825822 case snd_soc_dapm_aif_out:826826- case snd_soc_dapm_dai:823823+ case snd_soc_dapm_dai_out:827824 if (widget->active) {828825 widget->outputs = snd_soc_dapm_suspend_check(widget);829826 return widget->outputs;···919916 switch (widget->id) {920917 case snd_soc_dapm_dac:921918 case snd_soc_dapm_aif_in:922922- case snd_soc_dapm_dai:919919+ case snd_soc_dapm_dai_in:923920 if (widget->active) {924921 widget->inputs = snd_soc_dapm_suspend_check(widget);925922 return widget->inputs;···11361133 out = is_connected_output_ep(w, NULL);11371134 dapm_clear_walk_output(w->dapm, &w->sinks);11381135 return out != 0 && in != 0;11391139-}11401140-11411141-static int dapm_dai_check_power(struct snd_soc_dapm_widget *w)11421142-{11431143- DAPM_UPDATE_STAT(w, power_checks);11441144-11451145- if (w->active)11461146- return w->active;11471147-11481148- return dapm_generic_check_power(w);11491136}1150113711511138/* Check to see if an ADC has power */···23112318 case snd_soc_dapm_clock_supply:23122319 case snd_soc_dapm_aif_in:23132320 case snd_soc_dapm_aif_out:23142314- case snd_soc_dapm_dai:23212321+ case snd_soc_dapm_dai_in:23222322+ case snd_soc_dapm_dai_out:23152323 case snd_soc_dapm_dai_link:23162324 list_add(&path->list, &dapm->card->paths);23172325 list_add(&path->list_sink, &wsink->sources);···31233129 break;31243130 case snd_soc_dapm_adc:31253131 case snd_soc_dapm_aif_out:31323132+ case snd_soc_dapm_dai_out:31263133 w->power_check = dapm_adc_check_power;31273134 break;31283135 case snd_soc_dapm_dac:31293136 case snd_soc_dapm_aif_in:31373137+ case snd_soc_dapm_dai_in:31303138 w->power_check = dapm_dac_check_power;31313139 break;31323140 case snd_soc_dapm_pga:···31473151 case snd_soc_dapm_regulator_supply:31483152 case snd_soc_dapm_clock_supply:31493153 w->power_check = dapm_supply_check_power;31503150- break;31513151- case snd_soc_dapm_dai:31523152- w->power_check = dapm_dai_check_power;31533154 break;31543155 default:31553156 w->power_check = dapm_always_on_check_power;···33683375 template.reg = SND_SOC_NOPM;3369337633703377 if (dai->driver->playback.stream_name) {33713371- template.id = snd_soc_dapm_dai;33783378+ template.id = snd_soc_dapm_dai_in;33723379 template.name = dai->driver->playback.stream_name;33733380 template.sname = dai->driver->playback.stream_name;33743381···33863393 }3387339433883395 if (dai->driver->capture.stream_name) {33893389- template.id = snd_soc_dapm_dai;33963396+ template.id = snd_soc_dapm_dai_out;33903397 template.name = dai->driver->capture.stream_name;33913398 template.sname = dai->driver->capture.stream_name;33923399···3416342334173424 /* For each DAI widget... */34183425 list_for_each_entry(dai_w, &card->widgets, list) {34193419- if (dai_w->id != snd_soc_dapm_dai)34263426+ switch (dai_w->id) {34273427+ case snd_soc_dapm_dai_in:34283428+ case snd_soc_dapm_dai_out:34293429+ break;34303430+ default:34203431 continue;34323432+ }3421343334223434 dai = dai_w->priv;34233435···34313433 if (w->dapm != dai_w->dapm)34323434 continue;3433343534343434- if (w->id == snd_soc_dapm_dai)34363436+ switch (w->id) {34373437+ case snd_soc_dapm_dai_in:34383438+ case snd_soc_dapm_dai_out:34353439 continue;34403440+ default:34413441+ break;34423442+ }3436344334373444 if (!w->sname)34383445 continue;
+10-3
sound/soc/soc-pcm.c
···928928 /* Create any new FE <--> BE connections */929929 for (i = 0; i < list->num_widgets; i++) {930930931931- if (list->widgets[i]->id != snd_soc_dapm_dai)931931+ switch (list->widgets[i]->id) {932932+ case snd_soc_dapm_dai_in:933933+ case snd_soc_dapm_dai_out:934934+ break;935935+ default:932936 continue;937937+ }933938934939 /* is there a valid BE rtd for this widget */935940 be = dpcm_get_be(card, list->widgets[i], stream);···20162011 if (cpu_dai->driver->capture.channels_min)20172012 capture = 1;20182013 } else {20192019- if (codec_dai->driver->playback.channels_min)20142014+ if (codec_dai->driver->playback.channels_min &&20152015+ cpu_dai->driver->playback.channels_min)20202016 playback = 1;20212021- if (codec_dai->driver->capture.channels_min)20172017+ if (codec_dai->driver->capture.channels_min &&20182018+ cpu_dai->driver->capture.channels_min)20222019 capture = 1;20232020 }20242021