···4141the amount of free space and expand the <COW device> before it fills up.42424343<persistent?> is P (Persistent) or N (Not persistent - will not survive4444-after reboot).4545-The difference is that for transient snapshots less metadata must be4646-saved on disk - they can be kept in memory by the kernel.4444+after reboot). O (Overflow) can be added as a persistent store option4545+to allow userspace to advertise its support for seeing "Overflow" in the4646+snapshot status. So supported store types are "P", "PO" and "N".4747+4848+The difference between persistent and transient is with transient4949+snapshots less metadata must be saved on disk - they can be kept in5050+memory by the kernel.475148524953* snapshot-merge <origin> <COW device> <persistent> <chunksize>
···5151- renesas,tx-fifo-size : Overrides the default tx fifo size given in words5252 (default is 64)5353- renesas,rx-fifo-size : Overrides the default rx fifo size given in words5454- (default is 64, or 256 on R-Car Gen2)5454+ (default is 64)55555656Pinctrl properties might be needed, too. See5757Documentation/devicetree/bindings/pinctrl/renesas,*.
···55 - "renesas,usbhs-r8a7790"66 - "renesas,usbhs-r8a7791"77 - "renesas,usbhs-r8a7794"88+ - "renesas,usbhs-r8a7795"89 - reg: Base address and length of the register for the USBHS910 - interrupts: Interrupt specifier for the USBHS1011 - clocks: A list of phandle + clock specifier pairs
+2-12
MAINTAINERS
···40034003F: sound/usb/misc/ua101.c4004400440054005EXTENSIBLE FIRMWARE INTERFACE (EFI)40064006-M: Matt Fleming <matt.fleming@intel.com>40064006+M: Matt Fleming <matt@codeblueprint.co.uk>40074007L: linux-efi@vger.kernel.org40084008T: git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git40094009S: Maintained···40184018EFI VARIABLE FILESYSTEM40194019M: Matthew Garrett <matthew.garrett@nebula.com>40204020M: Jeremy Kerr <jk@ozlabs.org>40214021-M: Matt Fleming <matt.fleming@intel.com>40214021+M: Matt Fleming <matt@codeblueprint.co.uk>40224022T: git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git40234023L: linux-efi@vger.kernel.org40244024S: Maintained···99149914F: drivers/staging/lustre9915991599169916STAGING - NVIDIA COMPLIANT EMBEDDED CONTROLLER INTERFACE (nvec)99179917-M: Julian Andres Klode <jak@jak-linux.org>99189917M: Marc Dietrich <marvin24@gmx.de>99199918L: ac100@lists.launchpad.net (moderated for non-subscribers)99209919L: linux-tegra@vger.kernel.org···1137611377W: http://oops.ghostprotocols.net:81/blog1137711378S: Maintained1137811379F: drivers/net/wireless/wl3501*1137911379-1138011380-WM97XX TOUCHSCREEN DRIVERS1138111381-M: Mark Brown <broonie@kernel.org>1138211382-M: Liam Girdwood <lrg@slimlogic.co.uk>1138311383-L: linux-input@vger.kernel.org1138411384-W: https://github.com/CirrusLogic/linux-drivers/wiki1138511385-S: Supported1138611386-F: drivers/input/touchscreen/*wm97*1138711387-F: include/linux/wm97xx.h11388113801138911381WOLFSON MICROELECTRONICS DRIVERS1139011382L: patches@opensource.wolfsonmicro.com
+2-2
Makefile
···11VERSION = 422PATCHLEVEL = 333SUBLEVEL = 044-EXTRAVERSION = -rc455-NAME = Hurr durr I'ma sheep44+EXTRAVERSION = -rc555+NAME = Blurry Fish Butt6677# *DOCUMENTATION*88# To see a list of typical targets execute "make help"
···2020#include <asm/cputype.h>2121#include <asm/cp15.h>2222#include <asm/mcpm.h>2323+#include <asm/smp_plat.h>23242425#include "regs-pmu.h"2526#include "common.h"···7170 cluster >= EXYNOS5420_NR_CLUSTERS)7271 return -EINVAL;73727474- exynos_cpu_power_up(cpunr);7373+ if (!exynos_cpu_power_state(cpunr)) {7474+ exynos_cpu_power_up(cpunr);7575+7676+ /*7777+ * This assumes the cluster number of the big cores(Cortex A15)7878+ * is 0 and the Little cores(Cortex A7) is 1.7979+ * When the system was booted from the Little core,8080+ * they should be reset during power up cpu.8181+ */8282+ if (cluster &&8383+ cluster == MPIDR_AFFINITY_LEVEL(cpu_logical_map(0), 1)) {8484+ /*8585+ * Before we reset the Little cores, we should wait8686+ * the SPARE2 register is set to 1 because the init8787+ * codes of the iROM will set the register after8888+ * initialization.8989+ */9090+ while (!pmu_raw_readl(S5P_PMU_SPARE2))9191+ udelay(10);9292+9393+ pmu_raw_writel(EXYNOS5420_KFC_CORE_RESET(cpu),9494+ EXYNOS_SWRESET);9595+ }9696+ }9797+7598 return 0;7699}77100
···201201}202202203203/*204204- * Call registered single step handers204204+ * Call registered single step handlers205205 * There is no Syndrome info to check for determining the handler.206206 * So we call all the registered handlers, until the right handler is207207 * found which returns zero.···271271 * Use reader/writer locks instead of plain spinlock.272272 */273273static LIST_HEAD(break_hook);274274-static DEFINE_RWLOCK(break_hook_lock);274274+static DEFINE_SPINLOCK(break_hook_lock);275275276276void register_break_hook(struct break_hook *hook)277277{278278- write_lock(&break_hook_lock);279279- list_add(&hook->node, &break_hook);280280- write_unlock(&break_hook_lock);278278+ spin_lock(&break_hook_lock);279279+ list_add_rcu(&hook->node, &break_hook);280280+ spin_unlock(&break_hook_lock);281281}282282283283void unregister_break_hook(struct break_hook *hook)284284{285285- write_lock(&break_hook_lock);286286- list_del(&hook->node);287287- write_unlock(&break_hook_lock);285285+ spin_lock(&break_hook_lock);286286+ list_del_rcu(&hook->node);287287+ spin_unlock(&break_hook_lock);288288+ synchronize_rcu();288289}289290290291static int call_break_hook(struct pt_regs *regs, unsigned int esr)···293292 struct break_hook *hook;294293 int (*fn)(struct pt_regs *regs, unsigned int esr) = NULL;295294296296- read_lock(&break_hook_lock);297297- list_for_each_entry(hook, &break_hook, node)295295+ rcu_read_lock();296296+ list_for_each_entry_rcu(hook, &break_hook, node)298297 if ((esr & hook->esr_mask) == hook->esr_val)299298 fn = hook->fn;300300- read_unlock(&break_hook_lock);299299+ rcu_read_unlock();301300302301 return fn ? fn(regs, esr) : DBG_HOOK_ERROR;303302}
+3-3
arch/arm64/kernel/insn.c
···8585 aarch64_insn_is_bcond(insn));8686}87878888-static DEFINE_SPINLOCK(patch_lock);8888+static DEFINE_RAW_SPINLOCK(patch_lock);89899090static void __kprobes *patch_map(void *addr, int fixmap)9191{···131131 unsigned long flags = 0;132132 int ret;133133134134- spin_lock_irqsave(&patch_lock, flags);134134+ raw_spin_lock_irqsave(&patch_lock, flags);135135 waddr = patch_map(addr, FIX_TEXT_POKE0);136136137137 ret = probe_kernel_write(waddr, &insn, AARCH64_INSN_SIZE);138138139139 patch_unmap(FIX_TEXT_POKE0);140140- spin_unlock_irqrestore(&patch_lock, flags);140140+ raw_spin_unlock_irqrestore(&patch_lock, flags);141141142142 return ret;143143}
+2
arch/arm64/kernel/setup.c
···364364 to_free = ram_end - orig_start;365365366366 size = orig_end - orig_start;367367+ if (!size)368368+ return;367369368370 /* initrd needs to be relocated completely inside linear mapping */369371 new_start = memblock_find_in_range(0, PFN_PHYS(max_pfn),
···256256 */257257#define ioremap_nocache(offset, size) \258258 __ioremap_mode((offset), (size), _CACHE_UNCACHED)259259+#define ioremap_uc ioremap_nocache259260260261/*261262 * ioremap_cachable - map bus memory into CPU space
···1919int __node_distance(int a, int b);2020void numa_update_cpu_topology(void);21212222-extern cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];2222+extern cpumask_t node_to_cpumask_map[MAX_NUMNODES];2323extern int numa_debug_enabled;24242525#else
···66struct word_at_a_time { /* unused */ };77#define WORD_AT_A_TIME_CONSTANTS {}8899-/* Generate 0x01 byte values for non-zero bytes using a SIMD instruction. */99+/* Generate 0x01 byte values for zero bytes using a SIMD instruction. */1010static inline unsigned long has_zero(unsigned long val, unsigned long *data,1111 const struct word_at_a_time *c)1212{···3232 return __builtin_ctzl(mask) >> 3;3333#endif3434}3535+3636+#ifdef __BIG_ENDIAN3737+#define zero_bytemask(mask) (~1ul << (63 - __builtin_clzl(mask)))3838+#else3939+#define zero_bytemask(mask) ((2ul << __builtin_ctzl(mask)) - 1)4040+#endif35413642#endif /* _ASM_WORD_AT_A_TIME_H */
+1
arch/x86/Kconfig
···13081308config X86_PAE13091309 bool "PAE (Physical Address Extension) Support"13101310 depends on X86_32 && !HIGHMEM4G13111311+ select SWIOTLB13111312 ---help---13121313 PAE is required for NX support, and furthermore enables13131314 larger swapspace support for non-overcommit purposes. It
···3333#include <linux/memblock.h>3434#include <linux/edd.h>35353636+#ifdef CONFIG_KEXEC_CORE3737+#include <linux/kexec.h>3838+#endif3939+3640#include <xen/xen.h>3741#include <xen/events.h>3842#include <xen/interface/xen.h>···10811077 /* Fast syscall setup is all done in hypercalls, so10821078 these are all ignored. Stub them out here to stop10831079 Xen console noise. */10801080+ break;1084108110851082 default:10861083 if (!pmu_msr_write(msr, low, high, &ret))···18121807 .notifier_call = xen_hvm_cpu_notify,18131808};1814180918101810+#ifdef CONFIG_KEXEC_CORE18111811+static void xen_hvm_shutdown(void)18121812+{18131813+ native_machine_shutdown();18141814+ if (kexec_in_progress)18151815+ xen_reboot(SHUTDOWN_soft_reset);18161816+}18171817+18181818+static void xen_hvm_crash_shutdown(struct pt_regs *regs)18191819+{18201820+ native_machine_crash_shutdown(regs);18211821+ xen_reboot(SHUTDOWN_soft_reset);18221822+}18231823+#endif18241824+18151825static void __init xen_hvm_guest_init(void)18161826{18171827 if (xen_pv_domain())···18461826 x86_init.irqs.intr_init = xen_init_IRQ;18471827 xen_hvm_init_time_ops();18481828 xen_hvm_init_mmu_ops();18291829+#ifdef CONFIG_KEXEC_CORE18301830+ machine_ops.shutdown = xen_hvm_shutdown;18311831+ machine_ops.crash_shutdown = xen_hvm_crash_shutdown;18321832+#endif18491833}18501834#endif18511835
+18-1
arch/x86/xen/p2m.c
···112112static pte_t *p2m_missing_pte;113113static pte_t *p2m_identity_pte;114114115115+/*116116+ * Hint at last populated PFN.117117+ *118118+ * Used to set HYPERVISOR_shared_info->arch.max_pfn so the toolstack119119+ * can avoid scanning the whole P2M (which may be sized to account for120120+ * hotplugged memory).121121+ */122122+static unsigned long xen_p2m_last_pfn;123123+115124static inline unsigned p2m_top_index(unsigned long pfn)116125{117126 BUG_ON(pfn >= MAX_P2M_PFN);···279270 else280271 HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =281272 virt_to_mfn(p2m_top_mfn);282282- HYPERVISOR_shared_info->arch.max_pfn = xen_max_p2m_pfn;273273+ HYPERVISOR_shared_info->arch.max_pfn = xen_p2m_last_pfn;283274 HYPERVISOR_shared_info->arch.p2m_generation = 0;284275 HYPERVISOR_shared_info->arch.p2m_vaddr = (unsigned long)xen_p2m_addr;285276 HYPERVISOR_shared_info->arch.p2m_cr3 =···414405{415406 static struct vm_struct vm;416407 unsigned long p2m_limit;408408+409409+ xen_p2m_last_pfn = xen_max_p2m_pfn;417410418411 p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE;419412 vm.flags = VM_ALLOC;···617606618607 if (p2m)619608 free_p2m_page(p2m);609609+ }610610+611611+ /* Expanded the p2m? */612612+ if (pfn > xen_p2m_last_pfn) {613613+ xen_p2m_last_pfn = pfn;614614+ HYPERVISOR_shared_info->arch.max_pfn = xen_p2m_last_pfn;620615 }621616622617 return true;
+2-2
arch/x86/xen/setup.c
···548548{549549 unsigned long max_pages, limit;550550 domid_t domid = DOMID_SELF;551551- int ret;551551+ long ret;552552553553 limit = xen_get_pages_limit();554554 max_pages = limit;···798798 xen_ignore_unusable();799799800800 /* Make sure the Xen-supplied memory map is well-ordered. */801801- sanitize_e820_map(xen_e820_map, xen_e820_map_entries,801801+ sanitize_e820_map(xen_e820_map, ARRAY_SIZE(xen_e820_map),802802 &xen_e820_map_entries);803803804804 max_pages = xen_get_max_pages();
+2-3
drivers/base/regmap/regmap-debugfs.c
···3232/* Calculate the length of a fixed format */3333static size_t regmap_calc_reg_len(int max_val, char *buf, size_t buf_size)3434{3535- snprintf(buf, buf_size, "%x", max_val);3636- return strlen(buf);3535+ return snprintf(NULL, 0, "%x", max_val);3736}38373938static ssize_t regmap_name_read_file(struct file *file,···431432 /* If we're in the region the user is trying to read */432433 if (p >= *ppos) {433434 /* ...but not beyond it */434434- if (buf_pos >= count - 1 - tot_len)435435+ if (buf_pos + tot_len + 1 >= count)435436 break;436437437438 /* Format the register */
···164164 * the values for DIV_COPY and DIV_HPM dividers need not be set.165165 */166166 div0 = cfg_data->div0;167167- if (test_bit(CLK_CPU_HAS_DIV1, &cpuclk->flags)) {167167+ if (cpuclk->flags & CLK_CPU_HAS_DIV1) {168168 div1 = cfg_data->div1;169169 if (readl(base + E4210_SRC_CPU) & E4210_MUX_HPM_MASK)170170 div1 = readl(base + E4210_DIV_CPU1) &···185185 alt_div = DIV_ROUND_UP(alt_prate, tmp_rate) - 1;186186 WARN_ON(alt_div >= MAX_DIV);187187188188- if (test_bit(CLK_CPU_NEEDS_DEBUG_ALT_DIV, &cpuclk->flags)) {188188+ if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) {189189 /*190190 * In Exynos4210, ATB clock parent is also mout_core. So191191 * ATB clock also needs to be mantained at safe speed.···206206 writel(div0, base + E4210_DIV_CPU0);207207 wait_until_divider_stable(base + E4210_DIV_STAT_CPU0, DIV_MASK_ALL);208208209209- if (test_bit(CLK_CPU_HAS_DIV1, &cpuclk->flags)) {209209+ if (cpuclk->flags & CLK_CPU_HAS_DIV1) {210210 writel(div1, base + E4210_DIV_CPU1);211211 wait_until_divider_stable(base + E4210_DIV_STAT_CPU1,212212 DIV_MASK_ALL);···225225 unsigned long mux_reg;226226227227 /* find out the divider values to use for clock data */228228- if (test_bit(CLK_CPU_NEEDS_DEBUG_ALT_DIV, &cpuclk->flags)) {228228+ if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) {229229 while ((cfg_data->prate * 1000) != ndata->new_rate) {230230 if (cfg_data->prate == 0)231231 return -EINVAL;···240240 writel(mux_reg & ~(1 << 16), base + E4210_SRC_CPU);241241 wait_until_mux_stable(base + E4210_STAT_CPU, 16, 1);242242243243- if (test_bit(CLK_CPU_NEEDS_DEBUG_ALT_DIV, &cpuclk->flags)) {243243+ if (cpuclk->flags & CLK_CPU_NEEDS_DEBUG_ALT_DIV) {244244 div |= (cfg_data->div0 & E4210_DIV0_ATB_MASK);245245 div_mask |= E4210_DIV0_ATB_MASK;246246 }
···222222 }223223 }224224225225- if (unlikely(!clk->enable_reg)) {225225+ if (unlikely(IS_ERR(clk->enable_reg))) {226226 pr_err("%s: %s missing enable_reg\n", __func__,227227 clk_hw_get_name(hw));228228 ret = -EINVAL;···264264 u32 v;265265266266 clk = to_clk_hw_omap(hw);267267- if (!clk->enable_reg) {267267+ if (IS_ERR(clk->enable_reg)) {268268 /*269269 * 'independent' here refers to a clock which is not270270 * controlled by its parent.
···14361436 * since this is a core component, and is essential for the14371437 * subsequent light-weight ->init() to succeed.14381438 */14391439- if (cpufreq_driver->exit)14391439+ if (cpufreq_driver->exit) {14401440 cpufreq_driver->exit(policy);14411441+ policy->freq_table = NULL;14421442+ }14411443}1442144414431445/**
+4-3
drivers/devfreq/devfreq.c
···492492 if (err) {493493 put_device(&devfreq->dev);494494 mutex_unlock(&devfreq->lock);495495- goto err_dev;495495+ goto err_out;496496 }497497498498 mutex_unlock(&devfreq->lock);···518518err_init:519519 list_del(&devfreq->node);520520 device_unregister(&devfreq->dev);521521-err_dev:522521 kfree(devfreq);523522err_out:524523 return ERR_PTR(err);···794795 ret = PTR_ERR(governor);795796 goto out;796797 }797797- if (df->governor == governor)798798+ if (df->governor == governor) {799799+ ret = 0;798800 goto out;801801+ }799802800803 if (df->governor) {801804 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL);
+4-2
drivers/mcb/mcb-pci.c
···7474 ret = -ENOTSUPP;7575 dev_err(&pdev->dev,7676 "IO mapped PCI devices are not supported\n");7777- goto out_release;7777+ goto out_iounmap;7878 }79798080 pci_set_drvdata(pdev, priv);···89899090 ret = chameleon_parse_cells(priv->bus, priv->mapbase, priv->base);9191 if (ret < 0)9292- goto out_iounmap;9292+ goto out_mcb_bus;9393 num_cells = ret;94949595 dev_dbg(&pdev->dev, "Found %d cells\n", num_cells);···98989999 return 0;100100101101+out_mcb_bus:102102+ mcb_release_bus(priv->bus);101103out_iounmap:102104 iounmap(priv->base);103105out_release:
···203203 return -EINVAL;204204 }205205206206- tmp_store = kmalloc(sizeof(*tmp_store), GFP_KERNEL);206206+ tmp_store = kzalloc(sizeof(*tmp_store), GFP_KERNEL);207207 if (!tmp_store) {208208 ti->error = "Exception store allocation failed";209209 return -ENOMEM;···215215 else if (persistent == 'N')216216 type = get_type("N");217217 else {218218- ti->error = "Persistent flag is not P or N";218218+ ti->error = "Exception store type is not P or N";219219 r = -EINVAL;220220 goto bad_type;221221 }···233233 if (r)234234 goto bad;235235236236- r = type->ctr(tmp_store, 0, NULL);236236+ r = type->ctr(tmp_store, (strlen(argv[0]) > 1 ? &argv[0][1] : NULL));237237 if (r) {238238 ti->error = "Exception store type constructor failed";239239 goto bad;
+3-2
drivers/md/dm-exception-store.h
···4242 const char *name;4343 struct module *module;44444545- int (*ctr) (struct dm_exception_store *store,4646- unsigned argc, char **argv);4545+ int (*ctr) (struct dm_exception_store *store, char *options);47464847 /*4948 * Destroys this object when you've finished with it.···122123 unsigned chunk_shift;123124124125 void *context;126126+127127+ bool userspace_supports_overflow;125128};126129127130/*
+1-2
drivers/md/dm-raid.c
···329329 */330330 if (min_region_size > (1 << 13)) {331331 /* If not a power of 2, make it the next power of 2 */332332- if (min_region_size & (min_region_size - 1))333333- region_size = 1 << fls(region_size);332332+ region_size = roundup_pow_of_two(min_region_size);334333 DMINFO("Choosing default region size of %lu sectors",335334 region_size);336335 } else {
+14-3
drivers/md/dm-snap-persistent.c
···7788#include "dm-exception-store.h"991010+#include <linux/ctype.h>1011#include <linux/mm.h>1112#include <linux/pagemap.h>1213#include <linux/vmalloc.h>···844843 DMWARN("write header failed");845844}846845847847-static int persistent_ctr(struct dm_exception_store *store,848848- unsigned argc, char **argv)846846+static int persistent_ctr(struct dm_exception_store *store, char *options)849847{850848 struct pstore *ps;851849···873873 return -ENOMEM;874874 }875875876876+ if (options) {877877+ char overflow = toupper(options[0]);878878+ if (overflow == 'O')879879+ store->userspace_supports_overflow = true;880880+ else {881881+ DMERR("Unsupported persistent store option: %s", options);882882+ return -EINVAL;883883+ }884884+ }885885+876886 store->context = ps;877887878888 return 0;···898888 case STATUSTYPE_INFO:899889 break;900890 case STATUSTYPE_TABLE:901901- DMEMIT(" P %llu", (unsigned long long)store->chunk_size);891891+ DMEMIT(" %s %llu", store->userspace_supports_overflow ? "PO" : "P",892892+ (unsigned long long)store->chunk_size);902893 }903894904895 return sz;
···10011001 struct dm_rq_target_io *tio = info->tio;10021002 struct bio *bio = info->orig;10031003 unsigned int nr_bytes = info->orig->bi_iter.bi_size;10041004+ int error = clone->bi_error;1004100510051006 bio_put(clone);10061007···10121011 * the remainder.10131012 */10141013 return;10151015- else if (bio->bi_error) {10141014+ else if (error) {10161015 /*10171016 * Don't notice the error to the upper layer yet.10181017 * The error handling decision is made by the target driver,10191018 * when the request is completed.10201019 */10211021- tio->error = bio->bi_error;10201020+ tio->error = error;10221021 return;10231022 }10241023···2838283728392838 might_sleep();2840283928412841- map = dm_get_live_table(md, &srcu_idx);28422842-28432840 spin_lock(&_minor_lock);28442841 idr_replace(&_minor_idr, MINOR_ALLOCED, MINOR(disk_devt(dm_disk(md))));28452842 set_bit(DMF_FREEING, &md->flags);···28512852 * do not race with internal suspend.28522853 */28532854 mutex_lock(&md->suspend_lock);28552855+ map = dm_get_live_table(md, &srcu_idx);28542856 if (!dm_suspended_md(md)) {28552857 dm_table_presuspend_targets(map);28562858 dm_table_postsuspend_targets(map);28572859 }28582858- mutex_unlock(&md->suspend_lock);28592859-28602860 /* dm_put_live_table must be before msleep, otherwise deadlock is possible */28612861 dm_put_live_table(md, srcu_idx);28622862+ mutex_unlock(&md->suspend_lock);2862286328632864 /*28642865 * Rare, but there may be I/O requests still going to complete,
···12091209 * after the host receives the enum_resp12101210 * message clients may be added or removed12111211 */12121212- if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS &&12121212+ if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS ||12131213 dev->hbm_state >= MEI_HBM_STOPPED) {12141214 dev_err(dev->dev, "hbm: add client: state mismatch, [%d, %d]\n",12151215 dev->dev_state, dev->hbm_state);
+9-5
drivers/mmc/host/omap_hsmmc.c
···182182 struct clk *fclk;183183 struct clk *dbclk;184184 struct regulator *pbias;185185+ bool pbias_enabled;185186 void __iomem *base;186187 int vqmmc_enabled;187188 resource_size_t mapbase;···329328 return ret;330329 }331330332332- if (!regulator_is_enabled(host->pbias)) {331331+ if (host->pbias_enabled == 0) {333332 ret = regulator_enable(host->pbias);334333 if (ret) {335334 dev_err(host->dev, "pbias reg enable fail\n");336335 return ret;337336 }337337+ host->pbias_enabled = 1;338338 }339339 } else {340340- if (regulator_is_enabled(host->pbias)) {340340+ if (host->pbias_enabled == 1) {341341 ret = regulator_disable(host->pbias);342342 if (ret) {343343 dev_err(host->dev, "pbias reg disable fail\n");344344 return ret;345345 }346346+ host->pbias_enabled = 0;346347 }347348 }348349···478475 mmc->supply.vmmc = devm_regulator_get_optional(host->dev, "vmmc");479476 if (IS_ERR(mmc->supply.vmmc)) {480477 ret = PTR_ERR(mmc->supply.vmmc);481481- if (ret != -ENODEV)478478+ if ((ret != -ENODEV) && host->dev->of_node)482479 return ret;483480 dev_dbg(host->dev, "unable to get vmmc regulator %ld\n",484481 PTR_ERR(mmc->supply.vmmc));···493490 mmc->supply.vqmmc = devm_regulator_get_optional(host->dev, "vmmc_aux");494491 if (IS_ERR(mmc->supply.vqmmc)) {495492 ret = PTR_ERR(mmc->supply.vqmmc);496496- if (ret != -ENODEV)493493+ if ((ret != -ENODEV) && host->dev->of_node)497494 return ret;498495 dev_dbg(host->dev, "unable to get vmmc_aux regulator %ld\n",499496 PTR_ERR(mmc->supply.vqmmc));···503500 host->pbias = devm_regulator_get_optional(host->dev, "pbias");504501 if (IS_ERR(host->pbias)) {505502 ret = PTR_ERR(host->pbias);506506- if (ret != -ENODEV)503503+ if ((ret != -ENODEV) && host->dev->of_node)507504 return ret;508505 dev_dbg(host->dev, "unable to get pbias regulator %ld\n",509506 PTR_ERR(host->pbias));···20562053 host->base = base + pdata->reg_offset;20572054 host->power_mode = MMC_POWER_OFF;20582055 host->next_data.cookie = 1;20562056+ host->pbias_enabled = 0;20592057 host->vqmmc_enabled = 0;2060205820612059 ret = omap_hsmmc_gpio_init(mmc, host, pdata);
···11601160 host->mmc->actual_clock = 0;1161116111621162 sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);11631163+ if (host->quirks2 & SDHCI_QUIRK2_NEED_DELAY_AFTER_INT_CLK_RST)11641164+ mdelay(1);1163116511641166 if (clock == 0)11651167 return;
+5
drivers/mmc/host/sdhci.h
···412412#define SDHCI_QUIRK2_ACMD23_BROKEN (1<<14)413413/* Broken Clock divider zero in controller */414414#define SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN (1<<15)415415+/*416416+ * When internal clock is disabled, a delay is needed before modifying the417417+ * SD clock frequency or enabling back the internal clock.418418+ */419419+#define SDHCI_QUIRK2_NEED_DELAY_AFTER_INT_CLK_RST (1<<16)415420416421 int irq; /* Device IRQ */417422 void __iomem *ioaddr; /* Mapped address */
+1-1
drivers/mtd/nand/mxc_nand.c
···879879 oob_chunk_size);880880881881 /* the last chunk */882882- memcpy16_toio(&s[oob_chunk_size * sparebuf_size],882882+ memcpy16_toio(&s[i * sparebuf_size],883883 &d[i * oob_chunk_size],884884 host->used_oobsize - i * oob_chunk_size);885885 }
···6767 int rc;68686969 /* Stop the user from reading */7070- if (pos > nvmem->size)7070+ if (pos >= nvmem->size)7171 return 0;72727373 if (pos + count > nvmem->size)···9292 int rc;93939494 /* Stop the user from writing */9595- if (pos > nvmem->size)9595+ if (pos >= nvmem->size)9696 return 0;97979898 if (pos + count > nvmem->size)···825825 return rc;826826827827 /* shift bits in-place */828828- if (cell->bit_offset || cell->bit_offset)828828+ if (cell->bit_offset || cell->nbits)829829 nvmem_shift_read_buffer_in_place(cell, buf);830830831831 *len = cell->bytes;···938938 rc = regmap_raw_write(nvmem->regmap, cell->offset, buf, cell->bytes);939939940940 /* free the tmp buffer */941941- if (cell->bit_offset)941941+ if (cell->bit_offset || cell->nbits)942942 kfree(buf);943943944944 if (IS_ERR_VALUE(rc))
+10-1
drivers/nvmem/sunxi_sid.c
···103103 struct nvmem_device *nvmem;104104 struct regmap *regmap;105105 struct sunxi_sid *sid;106106- int i, size;106106+ int ret, i, size;107107 char *randomness;108108109109 sid = devm_kzalloc(dev, sizeof(*sid), GFP_KERNEL);···131131 return PTR_ERR(nvmem);132132133133 randomness = kzalloc(sizeof(u8) * size, GFP_KERNEL);134134+ if (!randomness) {135135+ ret = -EINVAL;136136+ goto err_unreg_nvmem;137137+ }138138+134139 for (i = 0; i < size; i++)135140 randomness[i] = sunxi_sid_read_byte(sid, i);136141···145140 platform_set_drvdata(pdev, nvmem);146141147142 return 0;143143+144144+err_unreg_nvmem:145145+ nvmem_unregister(nvmem);146146+ return ret;148147}149148150149static int sunxi_sid_remove(struct platform_device *pdev)
···9898 struct device_node *child;9999 struct regmap *grf;100100 unsigned int reg_offset;101101+ int err;101102102103 grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf");103104 if (IS_ERR(grf)) {···130129 return PTR_ERR(rk_phy->phy);131130 }132131 phy_set_drvdata(rk_phy->phy, rk_phy);132132+133133+ /* only power up usb phy when it use, so disable it when init*/134134+ err = rockchip_usb_phy_power(rk_phy, 1);135135+ if (err)136136+ return err;133137 }134138135139 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
···27862786 ret = atmel_init_gpios(port, &pdev->dev);27872787 if (ret < 0) {27882788 dev_err(&pdev->dev, "Failed to initialize GPIOs.");27892789- goto err;27892789+ goto err_clear_bit;27902790 }2791279127922792 ret = atmel_init_port(port, pdev);
+14-6
drivers/tty/serial/imx.c
···16311631 int locked = 1;16321632 int retval;1633163316341634- retval = clk_prepare_enable(sport->clk_per);16341634+ retval = clk_enable(sport->clk_per);16351635 if (retval)16361636 return;16371637- retval = clk_prepare_enable(sport->clk_ipg);16371637+ retval = clk_enable(sport->clk_ipg);16381638 if (retval) {16391639- clk_disable_unprepare(sport->clk_per);16391639+ clk_disable(sport->clk_per);16401640 return;16411641 }16421642···16751675 if (locked)16761676 spin_unlock_irqrestore(&sport->port.lock, flags);1677167716781678- clk_disable_unprepare(sport->clk_ipg);16791679- clk_disable_unprepare(sport->clk_per);16781678+ clk_disable(sport->clk_ipg);16791679+ clk_disable(sport->clk_per);16801680}1681168116821682/*···1777177717781778 retval = uart_set_options(&sport->port, co, baud, parity, bits, flow);1779177917801780- clk_disable_unprepare(sport->clk_ipg);17801780+ clk_disable(sport->clk_ipg);17811781+ if (retval) {17821782+ clk_unprepare(sport->clk_ipg);17831783+ goto error_console;17841784+ }17851785+17861786+ retval = clk_prepare(sport->clk_per);17871787+ if (retval)17881788+ clk_disable_unprepare(sport->clk_ipg);1781178917821790error_console:17831791 return retval;
+17-5
drivers/tty/tty_buffer.c
···242242 atomic_inc(&buf->priority);243243244244 mutex_lock(&buf->lock);245245- while ((next = buf->head->next) != NULL) {245245+ /* paired w/ release in __tty_buffer_request_room; ensures there are246246+ * no pending memory accesses to the freed buffer247247+ */248248+ while ((next = smp_load_acquire(&buf->head->next)) != NULL) {246249 tty_buffer_free(port, buf->head);247250 buf->head = next;248251 }···293290 if (n != NULL) {294291 n->flags = flags;295292 buf->tail = n;296296- b->commit = b->used;293293+ /* paired w/ acquire in flush_to_ldisc(); ensures294294+ * flush_to_ldisc() sees buffer data.295295+ */296296+ smp_store_release(&b->commit, b->used);297297 /* paired w/ acquire in flush_to_ldisc(); ensures the298298 * latest commit value can be read before the head is299299 * advanced to the next buffer···399393{400394 struct tty_bufhead *buf = &port->buf;401395402402- buf->tail->commit = buf->tail->used;396396+ /* paired w/ acquire in flush_to_ldisc(); ensures397397+ * flush_to_ldisc() sees buffer data.398398+ */399399+ smp_store_release(&buf->tail->commit, buf->tail->used);403400 schedule_work(&buf->work);404401}405402EXPORT_SYMBOL(tty_schedule_flip);···476467 struct tty_struct *tty;477468 struct tty_ldisc *disc;478469479479- tty = port->itty;470470+ tty = READ_ONCE(port->itty);480471 if (tty == NULL)481472 return;482473···500491 * is advancing to the next buffer501492 */502493 next = smp_load_acquire(&head->next);503503- count = head->commit - head->read;494494+ /* paired w/ release in __tty_buffer_request_room() or in495495+ * tty_buffer_flush(); ensures we see the committed buffer data496496+ */497497+ count = smp_load_acquire(&head->commit) - head->read;504498 if (!count) {505499 if (next == NULL) {506500 check_other_closed(tty);
+34-6
drivers/tty/tty_io.c
···21282128 if (!noctty &&21292129 current->signal->leader &&21302130 !current->signal->tty &&21312131- tty->session == NULL)21322132- __proc_set_tty(tty);21312131+ tty->session == NULL) {21322132+ /*21332133+ * Don't let a process that only has write access to the tty21342134+ * obtain the privileges associated with having a tty as21352135+ * controlling terminal (being able to reopen it with full21362136+ * access through /dev/tty, being able to perform pushback).21372137+ * Many distributions set the group of all ttys to "tty" and21382138+ * grant write-only access to all terminals for setgid tty21392139+ * binaries, which should not imply full privileges on all ttys.21402140+ *21412141+ * This could theoretically break old code that performs open()21422142+ * on a write-only file descriptor. In that case, it might be21432143+ * necessary to also permit this if21442144+ * inode_permission(inode, MAY_READ) == 0.21452145+ */21462146+ if (filp->f_mode & FMODE_READ)21472147+ __proc_set_tty(tty);21482148+ }21332149 spin_unlock_irq(¤t->sighand->siglock);21342150 read_unlock(&tasklist_lock);21352151 tty_unlock(tty);···24342418 * Takes ->siglock() when updating signal->tty24352419 */2436242024372437-static int tiocsctty(struct tty_struct *tty, int arg)24212421+static int tiocsctty(struct tty_struct *tty, struct file *file, int arg)24382422{24392423 int ret = 0;24402424···24682452 goto unlock;24692453 }24702454 }24552455+24562456+ /* See the comment in tty_open(). */24572457+ if ((file->f_mode & FMODE_READ) == 0 && !capable(CAP_SYS_ADMIN)) {24582458+ ret = -EPERM;24592459+ goto unlock;24602460+ }24612461+24712462 proc_set_tty(tty);24722463unlock:24732464 read_unlock(&tasklist_lock);···28672844 no_tty();28682845 return 0;28692846 case TIOCSCTTY:28702870- return tiocsctty(tty, arg);28472847+ return tiocsctty(tty, file, arg);28712848 case TIOCGPGRP:28722849 return tiocgpgrp(tty, real_tty, p);28732850 case TIOCSPGRP:···31743151static int tty_cdev_add(struct tty_driver *driver, dev_t dev,31753152 unsigned int index, unsigned int count)31763153{31543154+ int err;31553155+31773156 /* init here, since reused cdevs cause crashes */31783157 driver->cdevs[index] = cdev_alloc();31793158 if (!driver->cdevs[index])31803159 return -ENOMEM;31813181- cdev_init(driver->cdevs[index], &tty_fops);31603160+ driver->cdevs[index]->ops = &tty_fops;31823161 driver->cdevs[index]->owner = driver->owner;31833183- return cdev_add(driver->cdevs[index], dev, count);31623162+ err = cdev_add(driver->cdevs[index], dev, count);31633163+ if (err)31643164+ kobject_put(&driver->cdevs[index]->kobj);31653165+ return err;31843166}3185316731863168/**
···16281628static int fsl_diu_resume(struct platform_device *ofdev)16291629{16301630 struct fsl_diu_data *data;16311631+ unsigned int i;1631163216321633 data = dev_get_drvdata(&ofdev->dev);16331633- enable_lcdc(data->fsl_diu_info);16341634+16351635+ fsl_diu_enable_interrupts(data);16361636+ update_lcdc(data->fsl_diu_info);16371637+ for (i = 0; i < NUM_AOIS; i++) {16381638+ if (data->mfb[i].count)16391639+ fsl_diu_enable_panel(&data->fsl_diu_info[i]);16401640+ }1634164116351642 return 0;16361643}
···28282828 struct btrfs_delayed_ref_head *head;28292829 int ret;28302830 int run_all = count == (unsigned long)-1;28312831+ bool can_flush_pending_bgs = trans->can_flush_pending_bgs;2831283228322833 /* We'll clean this up in btrfs_cleanup_transaction */28332834 if (trans->aborted)···28452844#ifdef SCRAMBLE_DELAYED_REFS28462845 delayed_refs->run_delayed_start = find_middle(&delayed_refs->root);28472846#endif28472847+ trans->can_flush_pending_bgs = false;28482848 ret = __btrfs_run_delayed_refs(trans, root, count);28492849 if (ret < 0) {28502850 btrfs_abort_transaction(trans, root, ret);···28952893 }28962894out:28972895 assert_qgroups_uptodate(trans);28962896+ trans->can_flush_pending_bgs = can_flush_pending_bgs;28982897 return 0;28992898}29002899···43094306 * the block groups that were made dirty during the lifetime of the43104307 * transaction.43114308 */43124312- if (trans->chunk_bytes_reserved >= (2 * 1024 * 1024ull)) {43094309+ if (trans->can_flush_pending_bgs &&43104310+ trans->chunk_bytes_reserved >= (2 * 1024 * 1024ull)) {43134311 btrfs_create_pending_block_groups(trans, trans->root);43144312 btrfs_trans_release_chunk_metadata(trans);43154313 }···95649560 struct btrfs_block_group_item item;95659561 struct btrfs_key key;95669562 int ret = 0;95639563+ bool can_flush_pending_bgs = trans->can_flush_pending_bgs;9567956495659565+ trans->can_flush_pending_bgs = false;95689566 list_for_each_entry_safe(block_group, tmp, &trans->new_bgs, bg_list) {95699567 if (ret)95709568 goto next;···95879581next:95889582 list_del_init(&block_group->bg_list);95899583 }95849584+ trans->can_flush_pending_bgs = can_flush_pending_bgs;95909585}9591958695929587int btrfs_make_block_group(struct btrfs_trans_handle *trans,
+11-8
fs/btrfs/extent_io.c
···31323132 get_extent_t *get_extent,31333133 struct extent_map **em_cached,31343134 struct bio **bio, int mirror_num,31353135- unsigned long *bio_flags, int rw)31353135+ unsigned long *bio_flags, int rw,31363136+ u64 *prev_em_start)31363137{31373138 struct inode *inode;31383139 struct btrfs_ordered_extent *ordered;31393140 int index;31403140- u64 prev_em_start = (u64)-1;3141314131423142 inode = pages[0]->mapping->host;31433143 while (1) {···3153315331543154 for (index = 0; index < nr_pages; index++) {31553155 __do_readpage(tree, pages[index], get_extent, em_cached, bio,31563156- mirror_num, bio_flags, rw, &prev_em_start);31563156+ mirror_num, bio_flags, rw, prev_em_start);31573157 page_cache_release(pages[index]);31583158 }31593159}···31633163 int nr_pages, get_extent_t *get_extent,31643164 struct extent_map **em_cached,31653165 struct bio **bio, int mirror_num,31663166- unsigned long *bio_flags, int rw)31663166+ unsigned long *bio_flags, int rw,31673167+ u64 *prev_em_start)31673168{31683169 u64 start = 0;31693170 u64 end = 0;···31853184 index - first_index, start,31863185 end, get_extent, em_cached,31873186 bio, mirror_num, bio_flags,31883188- rw);31873187+ rw, prev_em_start);31893188 start = page_start;31903189 end = start + PAGE_CACHE_SIZE - 1;31913190 first_index = index;···31963195 __do_contiguous_readpages(tree, &pages[first_index],31973196 index - first_index, start,31983197 end, get_extent, em_cached, bio,31993199- mirror_num, bio_flags, rw);31983198+ mirror_num, bio_flags, rw,31993199+ prev_em_start);32003200}3201320132023202static int __extent_read_full_page(struct extent_io_tree *tree,···42094207 struct page *page;42104208 struct extent_map *em_cached = NULL;42114209 int nr = 0;42104210+ u64 prev_em_start = (u64)-1;4212421142134212 for (page_idx = 0; page_idx < nr_pages; page_idx++) {42144213 page = list_entry(pages->prev, struct page, lru);···42264223 if (nr < ARRAY_SIZE(pagepool))42274224 continue;42284225 __extent_readpages(tree, pagepool, nr, get_extent, &em_cached,42294229- &bio, 0, &bio_flags, READ);42264226+ &bio, 0, &bio_flags, READ, &prev_em_start);42304227 nr = 0;42314228 }42324229 if (nr)42334230 __extent_readpages(tree, pagepool, nr, get_extent, &em_cached,42344234- &bio, 0, &bio_flags, READ);42314231+ &bio, 0, &bio_flags, READ, &prev_em_start);4235423242364233 if (em_cached)42374234 free_extent_map(em_cached);
+5-3
fs/btrfs/send.c
···19201920 /*19211921 * We know that it is or will be overwritten. Check this now.19221922 * The current inode being processed might have been the one that caused19231923- * inode 'ino' to be orphanized, therefore ow_inode can actually be the19241924- * same as sctx->send_progress.19231923+ * inode 'ino' to be orphanized, therefore check if ow_inode matches19241924+ * the current inode being processed.19251925 */19261926- if (ow_inode <= sctx->send_progress)19261926+ if ((ow_inode < sctx->send_progress) ||19271927+ (ino != sctx->cur_ino && ow_inode == sctx->cur_ino &&19281928+ gen == sctx->cur_inode_gen))19271929 ret = 1;19281930 else19291931 ret = 0;
···922922 if (tcon && tcon->bad_network_name)923923 return -ENOENT;924924925925- if ((tcon->seal) &&925925+ if ((tcon && tcon->seal) &&926926 ((ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION) == 0)) {927927 cifs_dbg(VFS, "encryption requested but no server support");928928 return -EOPNOTSUPP;
+6-2
fs/namei.c
···15581558 negative = d_is_negative(dentry);15591559 if (read_seqcount_retry(&dentry->d_seq, seq))15601560 return -ECHILD;15611561- if (negative)15621562- return -ENOENT;1563156115641562 /*15651563 * This sequence count validates that the parent had no···15781580 goto unlazy;15791581 }15801582 }15831583+ /*15841584+ * Note: do negative dentry check after revalidation in15851585+ * case that drops it.15861586+ */15871587+ if (negative)15881588+ return -ENOENT;15811589 path->mnt = mnt;15821590 path->dentry = dentry;15831591 if (likely(__follow_mount_rcu(nd, path, inode, seqp)))
+13-2
fs/nfs/nfs4proc.c
···14581458 if (delegation)14591459 delegation_flags = delegation->flags;14601460 rcu_read_unlock();14611461- if (data->o_arg.claim == NFS4_OPEN_CLAIM_DELEGATE_CUR) {14611461+ switch (data->o_arg.claim) {14621462+ default:14631463+ break;14641464+ case NFS4_OPEN_CLAIM_DELEGATE_CUR:14651465+ case NFS4_OPEN_CLAIM_DELEG_CUR_FH:14621466 pr_err_ratelimited("NFS: Broken NFSv4 server %s is "14631467 "returning a delegation for "14641468 "OPEN(CLAIM_DELEGATE_CUR)\n",14651469 clp->cl_hostname);14661466- } else if ((delegation_flags & 1UL<<NFS_DELEGATION_NEED_RECLAIM) == 0)14701470+ return;14711471+ }14721472+ if ((delegation_flags & 1UL<<NFS_DELEGATION_NEED_RECLAIM) == 0)14671473 nfs_inode_set_delegation(state->inode,14681474 data->owner->so_cred,14691475 &data->o_res);···17771771 if (IS_ERR(opendata))17781772 return PTR_ERR(opendata);17791773 nfs4_stateid_copy(&opendata->o_arg.u.delegation, stateid);17741774+ write_seqlock(&state->seqlock);17751775+ nfs4_stateid_copy(&state->stateid, &state->open_stateid);17761776+ write_sequnlock(&state->seqlock);17801777 clear_bit(NFS_DELEGATED_STATE, &state->flags);17811778 switch (type & (FMODE_READ|FMODE_WRITE)) {17821779 case FMODE_READ|FMODE_WRITE:···18721863 data->rpc_done = 0;18731864 data->rpc_status = 0;18741865 data->timestamp = jiffies;18661866+ if (data->is_recover)18671867+ nfs4_set_sequence_privileged(&data->c_arg.seq_args);18751868 task = rpc_run_task(&task_setup_data);18761869 if (IS_ERR(task))18771870 return PTR_ERR(task);
+2-1
fs/nfs/nfs4state.c
···17251725 if (!test_and_clear_bit(ops->owner_flag_bit,17261726 &sp->so_flags))17271727 continue;17281728- atomic_inc(&sp->so_count);17281728+ if (!atomic_inc_not_zero(&sp->so_count))17291729+ continue;17291730 spin_unlock(&clp->cl_lock);17301731 rcu_read_unlock();17311732
+1-1
fs/nfs/nfs4trace.h
···409409 __entry->flags = flags;410410 __entry->fmode = (__force unsigned int)ctx->mode;411411 __entry->dev = ctx->dentry->d_sb->s_dev;412412- if (!IS_ERR(state))412412+ if (!IS_ERR_OR_NULL(state))413413 inode = state->inode;414414 if (inode != NULL) {415415 __entry->fileid = NFS_FILEID(inode);
+7-7
fs/nfs/write.c
···569569 if (!nfs_pageio_add_request(pgio, req)) {570570 nfs_redirty_request(req);571571 ret = pgio->pg_error;572572- }572572+ } else573573+ nfs_add_stats(page_file_mapping(page)->host,574574+ NFSIOS_WRITEPAGES, 1);573575out:574576 return ret;575577}576578577579static int nfs_do_writepage(struct page *page, struct writeback_control *wbc, struct nfs_pageio_descriptor *pgio)578580{579579- struct inode *inode = page_file_mapping(page)->host;580581 int ret;581581-582582- nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE);583583- nfs_add_stats(inode, NFSIOS_WRITEPAGES, 1);584582585583 nfs_pageio_cond_complete(pgio, page_file_index(page));586584 ret = nfs_page_async_flush(pgio, page, wbc->sync_mode == WB_SYNC_NONE);···595597static int nfs_writepage_locked(struct page *page, struct writeback_control *wbc)596598{597599 struct nfs_pageio_descriptor pgio;600600+ struct inode *inode = page_file_mapping(page)->host;598601 int err;599602600600- nfs_pageio_init_write(&pgio, page->mapping->host, wb_priority(wbc),603603+ nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE);604604+ nfs_pageio_init_write(&pgio, inode, wb_priority(wbc),601605 false, &nfs_async_write_completion_ops);602606 err = nfs_do_writepage(page, wbc, &pgio);603607 nfs_pageio_complete(&pgio);···12231223 return 1;12241224 if (!flctx || (list_empty_careful(&flctx->flc_flock) &&12251225 list_empty_careful(&flctx->flc_posix)))12261226- return 0;12261226+ return 1;1227122712281228 /* Check to see if there are whole file write locks */12291229 ret = 0;
···107107#define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */108108#define SHUTDOWN_crash 3 /* Tell controller we've crashed. */109109#define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */110110+/*111111+ * Domain asked to perform 'soft reset' for it. The expected behavior is to112112+ * reset internal Xen state for the domain returning it to the point where it113113+ * was created but leaving the domain's memory contents and vCPU contexts114114+ * intact. This will allow the domain to start over and set up all Xen specific115115+ * interfaces again.116116+ */117117+#define SHUTDOWN_soft_reset 5110118111119#endif /* __XEN_PUBLIC_SCHED_H__ */
+1-1
kernel/irq/handle.c
···22222323/**2424 * handle_bad_irq - handle spurious and unhandled irqs2525- * @irq: the interrupt number2625 * @desc: description of the interrupt2726 *2827 * Handles spurious and unhandled IRQ's. It also prints a debugmessage.···3435 kstat_incr_irqs_this_cpu(desc);3536 ack_bad_irq(irq);3637}3838+EXPORT_SYMBOL_GPL(handle_bad_irq);37393840/*3941 * Special, empty irq handler:
-3
kernel/sched/core.c
···72617261 alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);72627262 alloc_cpumask_var(&fallback_doms, GFP_KERNEL);7263726372647264- /* nohz_full won't take effect without isolating the cpus. */72657265- tick_nohz_full_add_cpus_to(cpu_isolated_map);72667266-72677264 sched_init_numa();7268726572697266 /*
+5-3
kernel/sched/deadline.c
···10661066 int target = find_later_rq(p);1067106710681068 if (target != -1 &&10691069- dl_time_before(p->dl.deadline,10701070- cpu_rq(target)->dl.earliest_dl.curr))10691069+ (dl_time_before(p->dl.deadline,10701070+ cpu_rq(target)->dl.earliest_dl.curr) ||10711071+ (cpu_rq(target)->dl.dl_nr_running == 0)))10711072 cpu = target;10721073 }10731074 rcu_read_unlock();···1418141714191418 later_rq = cpu_rq(cpu);1420141914211421- if (!dl_time_before(task->dl.deadline,14201420+ if (later_rq->dl.dl_nr_running &&14211421+ !dl_time_before(task->dl.deadline,14221422 later_rq->dl.earliest_dl.curr)) {14231423 /*14241424 * Target rq has tasks of equal or earlier deadline,
+5-4
kernel/sched/fair.c
···23702370 */23712371 tg_weight = atomic_long_read(&tg->load_avg);23722372 tg_weight -= cfs_rq->tg_load_avg_contrib;23732373- tg_weight += cfs_rq_load_avg(cfs_rq);23732373+ tg_weight += cfs_rq->load.weight;2374237423752375 return tg_weight;23762376}···23802380 long tg_weight, load, shares;2381238123822382 tg_weight = calc_tg_weight(tg, cfs_rq);23832383- load = cfs_rq_load_avg(cfs_rq);23832383+ load = cfs_rq->load.weight;2384238423852385 shares = (tg->shares * load);23862386 if (tg_weight)···26862686static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)26872687{26882688 struct sched_avg *sa = &cfs_rq->avg;26892689- int decayed;26892689+ int decayed, removed = 0;2690269026912691 if (atomic_long_read(&cfs_rq->removed_load_avg)) {26922692 long r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0);26932693 sa->load_avg = max_t(long, sa->load_avg - r, 0);26942694 sa->load_sum = max_t(s64, sa->load_sum - r * LOAD_AVG_MAX, 0);26952695+ removed = 1;26952696 }2696269726972698 if (atomic_long_read(&cfs_rq->removed_util_avg)) {···27092708 cfs_rq->load_last_update_time_copy = sa->last_update_time;27102709#endif2711271027122712- return decayed;27112711+ return decayed || removed;27132712}2714271327152714/* Update task and its cfs_rq load average */
···203203 unsigned long c, data;204204205205 c = *(unsigned long *)(src+res);206206- *(unsigned long *)(dest+res) = c;207206 if (has_zero(c, &data, &constants)) {208207 data = prep_zero_mask(c, data, &constants);209208 data = create_zero_mask(data);209209+ *(unsigned long *)(dest+res) = c & zero_bytemask(data);210210 return res + find_zero(data);211211 }212212+ *(unsigned long *)(dest+res) = c;212213 res += sizeof(unsigned long);213214 count -= sizeof(unsigned long);214215 max -= sizeof(unsigned long);
+16-18
mm/filemap.c
···24732473 iov_iter_count(i));2474247424752475again:24762476+ /*24772477+ * Bring in the user page that we will copy from _first_.24782478+ * Otherwise there's a nasty deadlock on copying from the24792479+ * same page as we're writing to, without it being marked24802480+ * up-to-date.24812481+ *24822482+ * Not only is this an optimisation, but it is also required24832483+ * to check that the address is actually valid, when atomic24842484+ * usercopies are used, below.24852485+ */24862486+ if (unlikely(iov_iter_fault_in_readable(i, bytes))) {24872487+ status = -EFAULT;24882488+ break;24892489+ }24902490+24762491 status = a_ops->write_begin(file, mapping, pos, bytes, flags,24772492 &page, &fsdata);24782493 if (unlikely(status < 0))···2495248024962481 if (mapping_writably_mapped(mapping))24972482 flush_dcache_page(page);24982498- /*24992499- * 'page' is now locked. If we are trying to copy from a25002500- * mapping of 'page' in userspace, the copy might fault and25012501- * would need PageUptodate() to complete. But, page can not be25022502- * made Uptodate without acquiring the page lock, which we hold.25032503- * Deadlock. Avoid with pagefault_disable(). Fix up below with25042504- * iov_iter_fault_in_readable().25052505- */25062506- pagefault_disable();24832483+25072484 copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes);25082508- pagefault_enable();25092485 flush_dcache_page(page);2510248625112487 status = a_ops->write_end(file, mapping, pos, bytes, copied,···25192513 */25202514 bytes = min_t(unsigned long, PAGE_CACHE_SIZE - offset,25212515 iov_iter_single_seg_count(i));25222522- /*25232523- * This is the fallback to recover if the copy from25242524- * userspace above faults.25252525- */25262526- if (unlikely(iov_iter_fault_in_readable(i, bytes))) {25272527- status = -EFAULT;25282528- break;25292529- }25302516 goto again;25312517 }25322518 pos += copied;