···9494CONFIG_BACKLIGHT_PWM=y9595# CONFIG_USB_SUPPORT is not set9696CONFIG_MMC=y9797-CONFIG_MMC_UNSAFE_RESUME=y9897CONFIG_MMC_BLOCK_MINORS=329998CONFIG_MMC_TEST=y10099CONFIG_MMC_SDHCI=y100100+CONFIG_MMC_SDHCI_PLTFM=y101101CONFIG_MMC_SDHCI_BCM_KONA=y102102CONFIG_NEW_LEDS=y103103CONFIG_LEDS_CLASS=y
···6666extern void ll_disable_coherency(void);6767extern void ll_enable_coherency(void);68686969+extern void armada_370_xp_cpu_resume(void);7070+6971static struct platform_device armada_xp_cpuidle_device = {7072 .name = "cpuidle-armada-370-xp",7173};···140138 reg = readl(pmsu_mp_base + L2C_NFABRIC_PM_CTL);141139 reg |= L2C_NFABRIC_PM_CTL_PWR_DOWN;142140 writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL);143143-}144144-145145-static void armada_370_xp_cpu_resume(void)146146-{147147- asm volatile("bl ll_add_cpu_to_smp_group\n\t"148148- "bl ll_enable_coherency\n\t"149149- "b cpu_resume\n\t");150141}151142152143/* No locking is needed because we only access per-CPU registers */
+25
arch/arm/mach-mvebu/pmsu_ll.S
···11+/*22+ * Copyright (C) 2014 Marvell33+ *44+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>55+ * Gregory Clement <gregory.clement@free-electrons.com>66+ *77+ * This file is licensed under the terms of the GNU General Public88+ * License version 2. This program is licensed "as is" without any99+ * warranty of any kind, whether express or implied.1010+ */1111+1212+#include <linux/linkage.h>1313+#include <asm/assembler.h>1414+1515+/*1616+ * This is the entry point through which CPUs exiting cpuidle deep1717+ * idle state are going.1818+ */1919+ENTRY(armada_370_xp_cpu_resume)2020+ARM_BE8(setend be ) @ go BE8 if entered LE2121+ bl ll_add_cpu_to_smp_group2222+ bl ll_enable_coherency2323+ b cpu_resume2424+ENDPROC(armada_370_xp_cpu_resume)2525+
···649649 }650650 break;651651652652+ case 0xb9bc:653653+ switch (rev) {654654+ case 0:655655+ omap_revision = DRA722_REV_ES1_0;656656+ break;657657+ default:658658+ /* If we have no new revisions */659659+ omap_revision = DRA722_REV_ES1_0;660660+ break;661661+ }662662+ break;663663+652664 default:653665 /* Unknown default to latest silicon rev as default*/654666 pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
+4-2
arch/arm/mach-omap2/mux.c
···183183 m0_entry = mux->muxnames[0];184184185185 /* First check for full name in mode0.muxmode format */186186- if (mode0_len && strncmp(muxname, m0_entry, mode0_len))187187- continue;186186+ if (mode0_len)187187+ if (strncmp(muxname, m0_entry, mode0_len) ||188188+ (strlen(m0_entry) != mode0_len))189189+ continue;188190189191 /* Then check for muxmode only */190192 for (i = 0; i < OMAP_MUX_NR_MODES; i++) {
-20
arch/arm/mach-omap2/omap4-common.c
···102102{}103103#endif104104105105-void __init gic_init_irq(void)106106-{107107- void __iomem *omap_irq_base;108108-109109- /* Static mapping, never released */110110- gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);111111- BUG_ON(!gic_dist_base_addr);112112-113113- twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_4K);114114- BUG_ON(!twd_base);115115-116116- /* Static mapping, never released */117117- omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);118118- BUG_ON(!omap_irq_base);119119-120120- omap_wakeupgen_init();121121-122122- gic_init(0, 29, gic_dist_base_addr, omap_irq_base);123123-}124124-125105void gic_dist_disable(void)126106{127107 if (gic_dist_base_addr)
···9595#define KVM_REFILL_PAGES 259696#define KVM_MAX_CPUID_ENTRIES 809797#define KVM_NR_FIXED_MTRR_REGION 889898-#define KVM_NR_VAR_MTRR 89898+#define KVM_NR_VAR_MTRR 109999100100#define ASYNC_PF_PER_VCPU 64101101···461461 bool nmi_injected; /* Trying to inject an NMI this entry */462462463463 struct mtrr_state_type mtrr_state;464464- u32 pat;464464+ u64 pat;465465466466 unsigned switch_db_regs;467467 unsigned long db[KVM_NR_DB_REGS];
+16
arch/x86/include/asm/ptrace.h
···231231232232#define ARCH_HAS_USER_SINGLE_STEP_INFO233233234234+/*235235+ * When hitting ptrace_stop(), we cannot return using SYSRET because236236+ * that does not restore the full CPU state, only a minimal set. The237237+ * ptracer can change arbitrary register values, which is usually okay238238+ * because the usual ptrace stops run off the signal delivery path which239239+ * forces IRET; however, ptrace_event() stops happen in arbitrary places240240+ * in the kernel and don't force IRET path.241241+ *242242+ * So force IRET path after a ptrace stop.243243+ */244244+#define arch_ptrace_stop_needed(code, info) \245245+({ \246246+ set_thread_flag(TIF_NOTIFY_RESUME); \247247+ false; \248248+})249249+234250struct user_desc;235251extern int do_get_thread_area(struct task_struct *p, int idx,236252 struct user_desc __user *info);
···810810tda998x_encoder_mode_valid(struct drm_encoder *encoder,811811 struct drm_display_mode *mode)812812{813813+ if (mode->clock > 150000)814814+ return MODE_CLOCK_HIGH;815815+ if (mode->htotal >= BIT(13))816816+ return MODE_BAD_HVALUE;817817+ if (mode->vtotal >= BIT(11))818818+ return MODE_BAD_VVALUE;813819 return MODE_OK;814820}815821···10541048 return i;10551049 }10561050 } else {10571057- for (i = 10; i > 0; i--) {10581058- msleep(10);10511051+ for (i = 100; i > 0; i--) {10521052+ msleep(1);10591053 ret = reg_read(priv, REG_INT_FLAGS_2);10601054 if (ret < 0)10611055 return ret;···11891183tda998x_encoder_destroy(struct drm_encoder *encoder)11901184{11911185 struct tda998x_priv *priv = to_tda998x_priv(encoder);11921192- drm_i2c_encoder_destroy(encoder);1193118611941187 /* disable all IRQs and free the IRQ handler */11951188 cec_write(priv, REG_CEC_RXSHPDINTENA, 0);···1198119311991194 if (priv->cec)12001195 i2c_unregister_device(priv->cec);11961196+ drm_i2c_encoder_destroy(encoder);12011197 kfree(priv);12021198}12031199
+26-1
drivers/gpu/drm/i915/intel_display.c
···20872087static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv,20882088 enum plane plane, enum pipe pipe)20892089{20902090+ struct drm_device *dev = dev_priv->dev;20902091 struct intel_crtc *intel_crtc =20912092 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);20922093 int reg;···2107210621082107 I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE);21092108 intel_flush_primary_plane(dev_priv, plane);21092109+21102110+ /*21112111+ * BDW signals flip done immediately if the plane21122112+ * is disabled, even if the plane enable is already21132113+ * armed to occur at the next vblank :(21142114+ */21152115+ if (IS_BROADWELL(dev))21162116+ intel_wait_for_vblank(dev, intel_crtc->pipe);21102117}2111211821122119/**···1109711088 return names[output];1109811089}11099110901109111091+static bool intel_crt_present(struct drm_device *dev)1109211092+{1109311093+ struct drm_i915_private *dev_priv = dev->dev_private;1109411094+1109511095+ if (IS_ULT(dev))1109611096+ return false;1109711097+1109811098+ if (IS_CHERRYVIEW(dev))1109911099+ return false;1110011100+1110111101+ if (IS_VALLEYVIEW(dev) && !dev_priv->vbt.int_crt_support)1110211102+ return false;1110311103+1110411104+ return true;1110511105+}1110611106+1110011107static void intel_setup_outputs(struct drm_device *dev)1110111108{1110211109 struct drm_i915_private *dev_priv = dev->dev_private;···11121110961112211097 intel_lvds_init(dev);11123110981112411124- if (!IS_ULT(dev) && !IS_CHERRYVIEW(dev) && dev_priv->vbt.int_crt_support)1109911099+ if (intel_crt_present(dev))1112511100 intel_crt_init(dev);11126111011112711102 if (HAS_DDI(dev)) {
+29
drivers/gpu/drm/i915/intel_pm.c
···32093209*/32103210static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)32113211{32123212+ struct drm_device *dev = dev_priv->dev;32133213+32143214+ /* Latest VLV doesn't need to force the gfx clock */32153215+ if (dev->pdev->revision >= 0xd) {32163216+ valleyview_set_rps(dev_priv->dev, dev_priv->rps.min_freq_softlimit);32173217+ return;32183218+ }32193219+32123220 /*32133221 * When we are idle. Drop to min voltage state.32143222 */···60456037 return 0;60466038}60476039EXPORT_SYMBOL_GPL(i915_release_power_well);60406040+60416041+/*60426042+ * Private interface for the audio driver to get CDCLK in kHz.60436043+ *60446044+ * Caller must request power well using i915_request_power_well() prior to60456045+ * making the call.60466046+ */60476047+int i915_get_cdclk_freq(void)60486048+{60496049+ struct drm_i915_private *dev_priv;60506050+60516051+ if (!hsw_pwr)60526052+ return -ENODEV;60536053+60546054+ dev_priv = container_of(hsw_pwr, struct drm_i915_private,60556055+ power_domains);60566056+60576057+ return intel_ddi_get_cdclk_freq(dev_priv);60586058+}60596059+EXPORT_SYMBOL_GPL(i915_get_cdclk_freq);60606060+6048606160496062#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1)60506063
+8
drivers/gpu/drm/i915/intel_sprite.c
···691691 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);692692693693 /*694694+ * BDW signals flip done immediately if the plane695695+ * is disabled, even if the plane enable is already696696+ * armed to occur at the next vblank :(697697+ */698698+ if (IS_BROADWELL(dev))699699+ intel_wait_for_vblank(dev, intel_crtc->pipe);700700+701701+ /*694702 * FIXME IPS should be fine as long as one plane is695703 * enabled, but in practice it seems to have problems696704 * when going from primary only to sprite only and vice
+7-5
drivers/gpu/drm/radeon/atombios_dp.c
···403403{404404 struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;405405 u8 msg[DP_DPCD_SIZE];406406- int ret, i;406406+ int ret;407407+408408+ char dpcd_hex_dump[DP_DPCD_SIZE * 3];407409408410 ret = drm_dp_dpcd_read(&radeon_connector->ddc_bus->aux, DP_DPCD_REV, msg,409411 DP_DPCD_SIZE);410412 if (ret > 0) {411413 memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE);412412- DRM_DEBUG_KMS("DPCD: ");413413- for (i = 0; i < DP_DPCD_SIZE; i++)414414- DRM_DEBUG_KMS("%02x ", msg[i]);415415- DRM_DEBUG_KMS("\n");414414+415415+ hex_dump_to_buffer(dig_connector->dpcd, sizeof(dig_connector->dpcd),416416+ 32, 1, dpcd_hex_dump, sizeof(dpcd_hex_dump), false);417417+ DRM_DEBUG_KMS("DPCD: %s\n", dpcd_hex_dump);416418417419 radeon_dp_probe_oui(radeon_connector);418420
···102102extern int radeon_hard_reset;103103extern int radeon_vm_size;104104extern int radeon_vm_block_size;105105+extern int radeon_deep_color;105106106107/*107108 * Copy from radeon_drv.h so we don't have to include both and have conflicting···749748 struct evergreen_irq_stat_regs evergreen;750749 struct cik_irq_stat_regs cik;751750};752752-753753-#define RADEON_MAX_HPD_PINS 7754754-#define RADEON_MAX_CRTCS 6755755-#define RADEON_MAX_AFMT_BLOCKS 7756751757752struct radeon_irq {758753 bool installed;
+9-1
drivers/gpu/drm/radeon/radeon_atombios.c
···12271227 rdev->clock.default_dispclk =12281228 le32_to_cpu(firmware_info->info_21.ulDefaultDispEngineClkFreq);12291229 if (rdev->clock.default_dispclk == 0) {12301230- if (ASIC_IS_DCE5(rdev))12301230+ if (ASIC_IS_DCE6(rdev))12311231+ rdev->clock.default_dispclk = 60000; /* 600 Mhz */12321232+ else if (ASIC_IS_DCE5(rdev))12311233 rdev->clock.default_dispclk = 54000; /* 540 Mhz */12321234 else12331235 rdev->clock.default_dispclk = 60000; /* 600 Mhz */12361236+ }12371237+ /* set a reasonable default for DP */12381238+ if (ASIC_IS_DCE6(rdev) && (rdev->clock.default_dispclk < 53900)) {12391239+ DRM_INFO("Changing default dispclk from %dMhz to 600Mhz\n",12401240+ rdev->clock.default_dispclk / 100);12411241+ rdev->clock.default_dispclk = 60000;12341242 }12351243 rdev->clock.dp_extclk =12361244 le16_to_cpu(firmware_info->info_21.usUniphyDPModeExtClkFreq);
···7373 rdev->pm.dpm.ac_power = true;7474 else7575 rdev->pm.dpm.ac_power = false;7676- if (rdev->asic->dpm.enable_bapm)7777- radeon_dpm_enable_bapm(rdev, rdev->pm.dpm.ac_power);7676+ if (rdev->family == CHIP_ARUBA) {7777+ if (rdev->asic->dpm.enable_bapm)7878+ radeon_dpm_enable_bapm(rdev, rdev->pm.dpm.ac_power);7979+ }7880 mutex_unlock(&rdev->pm.mutex);7981 } else if (rdev->pm.pm_method == PM_METHOD_PROFILE) {8082 if (rdev->pm.profile == PM_PROFILE_AUTO) {
+2-2
drivers/gpu/drm/radeon/radeon_vm.c
···495495 mutex_unlock(&vm->mutex);496496497497 r = radeon_bo_create(rdev, RADEON_VM_PTE_COUNT * 8,498498- RADEON_GPU_PAGE_SIZE, false, 498498+ RADEON_GPU_PAGE_SIZE, true,499499 RADEON_GEM_DOMAIN_VRAM, NULL, &pt);500500 if (r)501501 return r;···992992 return -ENOMEM;993993 }994994995995- r = radeon_bo_create(rdev, pd_size, align, false,995995+ r = radeon_bo_create(rdev, pd_size, align, true,996996 RADEON_GEM_DOMAIN_VRAM, NULL,997997 &vm->page_directory);998998 if (r)
+9-1
drivers/gpu/drm/radeon/trinity_dpm.c
···18741874 for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++)18751875 pi->at[i] = TRINITY_AT_DFLT;1876187618771877- pi->enable_bapm = false;18771877+ /* There are stability issues reported on latops with18781878+ * bapm installed when switching between AC and battery18791879+ * power. At the same time, some desktop boards hang18801880+ * if it's not enabled and dpm is enabled.18811881+ */18821882+ if (rdev->flags & RADEON_IS_MOBILITY)18831883+ pi->enable_bapm = false;18841884+ else18851885+ pi->enable_bapm = true;18781886 pi->enable_nbps_policy = true;18791887 pi->enable_sclk_ds = true;18801888 pi->enable_gfx_power_gating = true;
···55995599 if (mddev->in_sync)56005600 info.state = (1<<MD_SB_CLEAN);56015601 if (mddev->bitmap && mddev->bitmap_info.offset)56025602- info.state = (1<<MD_SB_BITMAP_PRESENT);56025602+ info.state |= (1<<MD_SB_BITMAP_PRESENT);56035603 info.active_disks = insync;56045604 info.working_disks = working;56055605 info.failed_disks = failed;···75017501 rdev->recovery_offset < j)75027502 j = rdev->recovery_offset;75037503 rcu_read_unlock();75047504+75057505+ /* If there is a bitmap, we need to make sure all75067506+ * writes that started before we added a spare75077507+ * complete before we start doing a recovery.75087508+ * Otherwise the write might complete and (via75097509+ * bitmap_endwrite) set a bit in the bitmap after the75107510+ * recovery has checked that bit and skipped that75117511+ * region.75127512+ */75137513+ if (mddev->bitmap) {75147514+ mddev->pers->quiesce(mddev, 1);75157515+ mddev->pers->quiesce(mddev, 0);75167516+ }75047517 }7505751875067519 printk(KERN_INFO "md: %s of RAID array %s\n", desc, mdname(mddev));
+15
drivers/of/fdt.c
···880880 const u64 phys_offset = __pa(PAGE_OFFSET);881881 base &= PAGE_MASK;882882 size &= PAGE_MASK;883883+884884+ if (sizeof(phys_addr_t) < sizeof(u64)) {885885+ if (base > ULONG_MAX) {886886+ pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",887887+ base, base + size);888888+ return;889889+ }890890+891891+ if (base + size > ULONG_MAX) {892892+ pr_warning("Ignoring memory range 0x%lx - 0x%llx\n",893893+ ULONG_MAX, base + size);894894+ size = ULONG_MAX - base;895895+ }896896+ }897897+883898 if (base + size < phys_offset) {884899 pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",885900 base, base + size);
···516516 skb_pull(skb, sizeof(struct fcoe_hdr));517517 fr_len = skb->len - sizeof(struct fcoe_crc_eof);518518519519- stats = per_cpu_ptr(lport->stats, get_cpu());520520- stats->RxFrames++;521521- stats->RxWords += fr_len / FCOE_WORD_TO_BYTE;522522-523519 fp = (struct fc_frame *)skb;524520 fc_frame_init(fp);525521 fr_dev(fp) = lport;526522 fr_sof(fp) = hp->fcoe_sof;527523 if (skb_copy_bits(skb, fr_len, &crc_eof, sizeof(crc_eof))) {528528- put_cpu();529524 kfree_skb(skb);530525 return;531526 }532527 fr_eof(fp) = crc_eof.fcoe_eof;533528 fr_crc(fp) = crc_eof.fcoe_crc32;534529 if (pskb_trim(skb, fr_len)) {535535- put_cpu();536530 kfree_skb(skb);537531 return;538532 }···538544 port = lport_priv(vn_port);539545 if (!ether_addr_equal(port->data_src_addr, dest_mac)) {540546 BNX2FC_HBA_DBG(lport, "fpma mismatch\n");541541- put_cpu();542547 kfree_skb(skb);543548 return;544549 }···545552 if (fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA &&546553 fh->fh_type == FC_TYPE_FCP) {547554 /* Drop FCP data. We dont this in L2 path */548548- put_cpu();549555 kfree_skb(skb);550556 return;551557 }···554562 case ELS_LOGO:555563 if (ntoh24(fh->fh_s_id) == FC_FID_FLOGI) {556564 /* drop non-FIP LOGO */557557- put_cpu();558565 kfree_skb(skb);559566 return;560567 }···563572564573 if (fh->fh_r_ctl == FC_RCTL_BA_ABTS) {565574 /* Drop incoming ABTS */566566- put_cpu();567575 kfree_skb(skb);568576 return;569577 }578578+579579+ stats = per_cpu_ptr(lport->stats, smp_processor_id());580580+ stats->RxFrames++;581581+ stats->RxWords += fr_len / FCOE_WORD_TO_BYTE;570582571583 if (le32_to_cpu(fr_crc(fp)) !=572584 ~crc32(~0, skb->data, fr_len)) {···577583 printk(KERN_WARNING PFX "dropping frame with "578584 "CRC error\n");579585 stats->InvalidCRCCount++;580580- put_cpu();581586 kfree_skb(skb);582587 return;583588 }584584- put_cpu();585589 fc_exch_recv(lport, fp);586590}587591
+2
drivers/scsi/bnx2fc/bnx2fc_io.c
···282282 arr_sz, GFP_KERNEL);283283 if (!cmgr->free_list_lock) {284284 printk(KERN_ERR PFX "failed to alloc free_list_lock\n");285285+ kfree(cmgr->free_list);286286+ cmgr->free_list = NULL;285287 goto mem_err;286288 }287289
+12-1
drivers/scsi/ibmvscsi/ibmvscsi.c
···185185 if (crq->valid & 0x80) {186186 if (++queue->cur == queue->size)187187 queue->cur = 0;188188+189189+ /* Ensure the read of the valid bit occurs before reading any190190+ * other bits of the CRQ entry191191+ */192192+ rmb();188193 } else189194 crq = NULL;190195 spin_unlock_irqrestore(&queue->lock, flags);···208203{209204 struct vio_dev *vdev = to_vio_dev(hostdata->dev);210205206206+ /*207207+ * Ensure the command buffer is flushed to memory before handing it208208+ * over to the VIOS to prevent it from fetching any stale data.209209+ */210210+ mb();211211 return plpar_hcall_norets(H_SEND_CRQ, vdev->unit_address, word1, word2);212212}213213···807797 evt->hostdata->dev);808798 if (evt->cmnd_done)809799 evt->cmnd_done(evt->cmnd);810810- } else if (evt->done)800800+ } else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&801801+ evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)811802 evt->done(evt);812803 free_event_struct(&evt->hostdata->pool, evt);813804 spin_lock_irqsave(hostdata->host->host_lock, flags);
···237237 virtscsi_vq_done(vscsi, req_vq, virtscsi_complete_cmd);238238};239239240240+static void virtscsi_poll_requests(struct virtio_scsi *vscsi)241241+{242242+ int i, num_vqs;243243+244244+ num_vqs = vscsi->num_queues;245245+ for (i = 0; i < num_vqs; i++)246246+ virtscsi_vq_done(vscsi, &vscsi->req_vqs[i],247247+ virtscsi_complete_cmd);248248+}249249+240250static void virtscsi_complete_free(struct virtio_scsi *vscsi, void *buf)241251{242252 struct virtio_scsi_cmd *cmd = buf;···263253 virtscsi_vq_done(vscsi, &vscsi->ctrl_vq, virtscsi_complete_free);264254};265255256256+static void virtscsi_handle_event(struct work_struct *work);257257+266258static int virtscsi_kick_event(struct virtio_scsi *vscsi,267259 struct virtio_scsi_event_node *event_node)268260{···272260 struct scatterlist sg;273261 unsigned long flags;274262263263+ INIT_WORK(&event_node->work, virtscsi_handle_event);275264 sg_init_one(&sg, &event_node->event, sizeof(struct virtio_scsi_event));276265277266 spin_lock_irqsave(&vscsi->event_vq.vq_lock, flags);···390377{391378 struct virtio_scsi_event_node *event_node = buf;392379393393- INIT_WORK(&event_node->work, virtscsi_handle_event);394380 schedule_work(&event_node->work);395381}396382···600588 if (cmd->resp.tmf.response == VIRTIO_SCSI_S_OK ||601589 cmd->resp.tmf.response == VIRTIO_SCSI_S_FUNCTION_SUCCEEDED)602590 ret = SUCCESS;591591+592592+ /*593593+ * The spec guarantees that all requests related to the TMF have594594+ * been completed, but the callback might not have run yet if595595+ * we're using independent interrupts (e.g. MSI). Poll the596596+ * virtqueues once.597597+ *598598+ * In the abort case, sc->scsi_done will do nothing, because599599+ * the block layer must have detected a timeout and as a result600600+ * REQ_ATOM_COMPLETE has been set.601601+ */602602+ virtscsi_poll_requests(vscsi);603603604604out:605605 mempool_free(cmd, virtscsi_cmd_pool);
+2-2
drivers/staging/iio/adc/ad7291.c
···465465 struct ad7291_platform_data *pdata = client->dev.platform_data;466466 struct ad7291_chip_info *chip;467467 struct iio_dev *indio_dev;468468- int ret = 0;468468+ int ret;469469470470 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));471471 if (!indio_dev)···475475 if (pdata && pdata->use_external_ref) {476476 chip->reg = devm_regulator_get(&client->dev, "vref");477477 if (IS_ERR(chip->reg))478478- return ret;478478+ return PTR_ERR(chip->reg);479479480480 ret = regulator_enable(chip->reg);481481 if (ret)
+4-2
drivers/staging/tidspbridge/core/tiomap3430.c
···280280 OMAP3430_IVA2_MOD, OMAP2_CM_CLKSTCTRL);281281282282 /* Wait until the state has moved to ON */283283- while (*pdata->dsp_prm_read(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST)&284284- OMAP_INTRANSITION_MASK);283283+ while ((*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD,284284+ OMAP2_PM_PWSTST) &285285+ OMAP_INTRANSITION_MASK)286286+ ;285287 /* Disable Automatic transition */286288 (*pdata->dsp_cm_write)(OMAP34XX_CLKSTCTRL_DISABLE_AUTO,287289 OMAP3430_IVA2_MOD, OMAP2_CM_CLKSTCTRL);
···4545config USB_DWC3_OMAP4646 tristate "Texas Instruments OMAP5 and similar Platforms"4747 depends on EXTCON && (ARCH_OMAP2PLUS || COMPILE_TEST)4848+ depends on OF4849 default USB_DWC34950 help5051 Some platforms from Texas Instruments like OMAP5, DRA7xxx and
···176176177177config USB_EHCI_MSM178178 tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller"179179- depends on ARCH_MSM179179+ depends on ARCH_MSM || ARCH_QCOM180180 select USB_EHCI_ROOT_HUB_TT181181 ---help---182182 Enables support for the USB Host controller present on the
+4-1
drivers/usb/host/xhci-hub.c
···222223232424#include <linux/slab.h>2525+#include <linux/device.h>2526#include <asm/unaligned.h>26272728#include "xhci.h"···11401139 * including the USB 3.0 roothub, but only if CONFIG_PM_RUNTIME11411140 * is enabled, so also enable remote wake here.11421141 */11431143- if (hcd->self.root_hub->do_remote_wakeup) {11421142+ if (hcd->self.root_hub->do_remote_wakeup11431143+ && device_may_wakeup(hcd->self.controller)) {11441144+11441145 if (t1 & PORT_CONNECT) {11451146 t2 |= PORT_WKOC_E | PORT_WKDISC_E;11461147 t2 &= ~PORT_WKCONN_E;
+6-3
drivers/usb/host/xhci-ring.c
···14331433 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code);14341434 break;14351435 case TRB_RESET_DEV:14361436- WARN_ON(slot_id != TRB_TO_SLOT_ID(14371437- le32_to_cpu(cmd_trb->generic.field[3])));14361436+ /* SLOT_ID field in reset device cmd completion event TRB is 0.14371437+ * Use the SLOT_ID from the command TRB instead (xhci 4.6.11)14381438+ */14391439+ slot_id = TRB_TO_SLOT_ID(14401440+ le32_to_cpu(cmd_trb->generic.field[3]));14381441 xhci_handle_cmd_reset_dev(xhci, slot_id, event);14391442 break;14401443 case TRB_NEC_GET_FW:···35373534 return 0;3538353535393536 max_burst = urb->ep->ss_ep_comp.bMaxBurst;35403540- return roundup(total_packet_count, max_burst + 1) - 1;35373537+ return DIV_ROUND_UP(total_packet_count, max_burst + 1) - 1;35413538}3542353935433540/*
+7-3
drivers/usb/host/xhci.c
···936936 */937937int xhci_resume(struct xhci_hcd *xhci, bool hibernated)938938{939939- u32 command, temp = 0;939939+ u32 command, temp = 0, status;940940 struct usb_hcd *hcd = xhci_to_hcd(xhci);941941 struct usb_hcd *secondary_hcd;942942 int retval = 0;···1054105410551055 done:10561056 if (retval == 0) {10571057- usb_hcd_resume_root_hub(hcd);10581058- usb_hcd_resume_root_hub(xhci->shared_hcd);10571057+ /* Resume root hubs only when have pending events. */10581058+ status = readl(&xhci->op_regs->status);10591059+ if (status & STS_EINT) {10601060+ usb_hcd_resume_root_hub(hcd);10611061+ usb_hcd_resume_root_hub(xhci->shared_hcd);10621062+ }10591063 }1060106410611065 /*
···12291229 motg->chg_state = USB_CHG_STATE_UNDEFINED;12301230 motg->chg_type = USB_INVALID_CHARGER;12311231 }12321232- pm_runtime_put_sync(otg->phy->dev);12321232+12331233+ if (otg->phy->state == OTG_STATE_B_IDLE)12341234+ pm_runtime_put_sync(otg->phy->dev);12331235 break;12341236 case OTG_STATE_B_PERIPHERAL:12351237 dev_dbg(otg->phy->dev, "OTG_STATE_B_PERIPHERAL state\n");
+8
drivers/usb/renesas_usbhs/fifo.c
···681681 usbhs_pipe_number(pipe),682682 pkt->length, pkt->actual, *is_done, pkt->zero);683683684684+ /*685685+ * Transmission end686686+ */687687+ if (*is_done) {688688+ if (usbhs_pipe_is_dcp(pipe))689689+ usbhs_dcp_control_transfer_done(pipe);690690+ }691691+684692usbhs_fifo_read_busy:685693 usbhsf_fifo_unselect(pipe, fifo);686694
+5-2
drivers/usb/serial/ftdi_sio.c
···15661566 struct usb_device *udev = serial->dev;1567156715681568 struct usb_interface *interface = serial->interface;15691569- struct usb_endpoint_descriptor *ep_desc = &interface->cur_altsetting->endpoint[1].desc;15691569+ struct usb_endpoint_descriptor *ep_desc;1570157015711571 unsigned num_endpoints;15721572- int i;15721572+ unsigned i;1573157315741574 num_endpoints = interface->cur_altsetting->desc.bNumEndpoints;15751575 dev_info(&udev->dev, "Number of endpoints %d\n", num_endpoints);15761576+15771577+ if (!num_endpoints)15781578+ return;1576157915771580 /* NOTE: some customers have programmed FT232R/FT245R devices15781581 * with an endpoint size of 0 - not good. In this case, we
···256256 if (us->fflags & US_FL_WRITE_CACHE)257257 sdev->wce_default_on = 1;258258259259+ /* A few buggy USB-ATA bridges don't understand FUA */260260+ if (us->fflags & US_FL_BROKEN_FUA)261261+ sdev->broken_fua = 1;262262+259263 } else {260264261265 /* Non-disk-type devices don't need to blacklist any pages
+7
drivers/usb/storage/unusual_devs.h
···19361936 USB_SC_DEVICE, USB_PR_DEVICE, NULL,19371937 US_FL_IGNORE_RESIDUE ),1938193819391939+/* Reported by Michael Büsch <m@bues.ch> */19401940+UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0114,19411941+ "JMicron",19421942+ "USB to ATA/ATAPI Bridge",19431943+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,19441944+ US_FL_BROKEN_FUA ),19451945+19391946/* Reported by Alexandre Oliva <oliva@lsd.ic.unicamp.br>19401947 * JMicron responds to USN and several other SCSI ioctls with a19411948 * residue that causes subsequent I/O requests to fail. */
+2
drivers/video/fbdev/atmel_lcdfb.c
···10571057 goto put_display_node;10581058 }1059105910601060+ INIT_LIST_HEAD(&pdata->pwr_gpios);10601061 ret = -ENOMEM;10611062 for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {10621063 gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",···10831082 dev_err(dev, "set direction output gpio %d failed\n", gpio);10841083 goto put_display_node;10851084 }10851085+ list_add(&og->list, &pdata->pwr_gpios);10861086 }1087108710881088 if (is_gpio_power)
+1-1
drivers/video/fbdev/bfin_adv7393fb.c
···408408 /* Workaround "PPI Does Not Start Properly In Specific Mode" */409409 if (ANOMALY_05000400) {410410 ret = gpio_request_one(P_IDENT(P_PPI0_FS3), GPIOF_OUT_INIT_LOW,411411- "PPI0_FS3")411411+ "PPI0_FS3");412412 if (ret) {413413 dev_err(&client->dev, "PPI0_FS3 GPIO request failed\n");414414 ret = -EBUSY;
···210210 int pipefd;211211 struct autofs_sb_info *sbi;212212 struct autofs_info *ino;213213- int pgrp;213213+ int pgrp = 0;214214 bool pgrp_set = false;215215 int ret = -EINVAL;216216
···386386 bool reloc_reserved = false;387387 int ret;388388389389+ /* Send isn't supposed to start transactions. */390390+ ASSERT(current->journal_info != (void *)BTRFS_SEND_TRANS_STUB);391391+389392 if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state))390393 return ERR_PTR(-EROFS);391394392392- if (current->journal_info &&393393- current->journal_info != (void *)BTRFS_SEND_TRANS_STUB) {395395+ if (current->journal_info) {394396 WARN_ON(type & TRANS_EXTWRITERS);395397 h = current->journal_info;396398 h->use_count++;···493491 smp_mb();494492 if (cur_trans->state >= TRANS_STATE_BLOCKED &&495493 may_wait_transaction(root, type)) {494494+ current->journal_info = h;496495 btrfs_commit_transaction(h, root);497496 goto again;498497 }···16181615 int ret;1619161616201617 ret = btrfs_run_delayed_items(trans, root);16211621- /*16221622- * running the delayed items may have added new refs. account16231623- * them now so that they hinder processing of more delayed refs16241624- * as little as possible.16251625- */16261618 if (ret)16271619 return ret;16281620
+25-5
fs/btrfs/volumes.c
···4040#include "rcu-string.h"4141#include "math.h"4242#include "dev-replace.h"4343+#include "sysfs.h"43444445static int init_first_rw_device(struct btrfs_trans_handle *trans,4546 struct btrfs_root *root,···555554 * This is ok to do without rcu read locked because we hold the556555 * uuid mutex so nothing we touch in here is going to disappear.557556 */558558- name = rcu_string_strdup(orig_dev->name->str, GFP_NOFS);559559- if (!name) {560560- kfree(device);561561- goto error;557557+ if (orig_dev->name) {558558+ name = rcu_string_strdup(orig_dev->name->str, GFP_NOFS);559559+ if (!name) {560560+ kfree(device);561561+ goto error;562562+ }563563+ rcu_assign_pointer(device->name, name);562564 }563563- rcu_assign_pointer(device->name, name);564565565566 list_add(&device->dev_list, &fs_devices->devices);566567 device->fs_devices = fs_devices;···16831680 if (device->bdev)16841681 device->fs_devices->open_devices--;1685168216831683+ /* remove sysfs entry */16841684+ btrfs_kobj_rm_device(root->fs_info, device);16851685+16861686 call_rcu(&device->rcu, free_device);1687168716881688 num_devices = btrfs_super_num_devices(root->fs_info->super_copy) - 1;···21492143 total_bytes = btrfs_super_num_devices(root->fs_info->super_copy);21502144 btrfs_set_super_num_devices(root->fs_info->super_copy,21512145 total_bytes + 1);21462146+21472147+ /* add sysfs device entry */21482148+ btrfs_kobj_add_device(root->fs_info, device);21492149+21522150 mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);2153215121542152 if (seeding_dev) {21532153+ char fsid_buf[BTRFS_UUID_UNPARSED_SIZE];21552154 ret = init_first_rw_device(trans, root, device);21562155 if (ret) {21572156 btrfs_abort_transaction(trans, root, ret);···21672156 btrfs_abort_transaction(trans, root, ret);21682157 goto error_trans;21692158 }21592159+21602160+ /* Sprouting would change fsid of the mounted root,21612161+ * so rename the fsid on the sysfs21622162+ */21632163+ snprintf(fsid_buf, BTRFS_UUID_UNPARSED_SIZE, "%pU",21642164+ root->fs_info->fsid);21652165+ if (kobject_rename(&root->fs_info->super_kobj, fsid_buf))21662166+ goto error_trans;21702167 } else {21712168 ret = btrfs_add_device(trans, root, device);21722169 if (ret) {···22242205 unlock_chunks(root);22252206 btrfs_end_transaction(trans, root);22262207 rcu_string_free(device->name);22082208+ btrfs_kobj_rm_device(root->fs_info, device);22272209 kfree(device);22282210error:22292211 blkdev_put(bdev, FMODE_EXCL);
+1-1
fs/btrfs/zlib.c
···136136 if (workspace->def_strm.total_in > 8192 &&137137 workspace->def_strm.total_in <138138 workspace->def_strm.total_out) {139139- ret = -EIO;139139+ ret = -E2BIG;140140 goto out;141141 }142142 /* we need another page for writing out. Test this
+16
fs/ext4/balloc.c
···194194 if (!ext4_group_desc_csum_verify(sb, block_group, gdp)) {195195 ext4_error(sb, "Checksum bad for group %u", block_group);196196 grp = ext4_get_group_info(sb, block_group);197197+ if (!EXT4_MB_GRP_BBITMAP_CORRUPT(grp))198198+ percpu_counter_sub(&sbi->s_freeclusters_counter,199199+ grp->bb_free);197200 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);201201+ if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {202202+ int count;203203+ count = ext4_free_inodes_count(sb, gdp);204204+ percpu_counter_sub(&sbi->s_freeinodes_counter,205205+ count);206206+ }198207 set_bit(EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT, &grp->bb_state);199208 return;200209 }···368359{369360 ext4_fsblk_t blk;370361 struct ext4_group_info *grp = ext4_get_group_info(sb, block_group);362362+ struct ext4_sb_info *sbi = EXT4_SB(sb);371363372364 if (buffer_verified(bh))373365 return;···379369 ext4_unlock_group(sb, block_group);380370 ext4_error(sb, "bg %u: block %llu: invalid block bitmap",381371 block_group, blk);372372+ if (!EXT4_MB_GRP_BBITMAP_CORRUPT(grp))373373+ percpu_counter_sub(&sbi->s_freeclusters_counter,374374+ grp->bb_free);382375 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);383376 return;384377 }···389376 desc, bh))) {390377 ext4_unlock_group(sb, block_group);391378 ext4_error(sb, "bg %u: bad block bitmap checksum", block_group);379379+ if (!EXT4_MB_GRP_BBITMAP_CORRUPT(grp))380380+ percpu_counter_sub(&sbi->s_freeclusters_counter,381381+ grp->bb_free);392382 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);393383 return;394384 }
+23
fs/ext4/ialloc.c
···7171 struct ext4_group_desc *gdp)7272{7373 struct ext4_group_info *grp;7474+ struct ext4_sb_info *sbi = EXT4_SB(sb);7475 J_ASSERT_BH(bh, buffer_locked(bh));75767677 /* If checksum is bad mark all blocks and inodes use to prevent···7978 if (!ext4_group_desc_csum_verify(sb, block_group, gdp)) {8079 ext4_error(sb, "Checksum bad for group %u", block_group);8180 grp = ext4_get_group_info(sb, block_group);8181+ if (!EXT4_MB_GRP_BBITMAP_CORRUPT(grp))8282+ percpu_counter_sub(&sbi->s_freeclusters_counter,8383+ grp->bb_free);8284 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);8585+ if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {8686+ int count;8787+ count = ext4_free_inodes_count(sb, gdp);8888+ percpu_counter_sub(&sbi->s_freeinodes_counter,8989+ count);9090+ }8391 set_bit(EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT, &grp->bb_state);8492 return 0;8593 }···126116 struct buffer_head *bh = NULL;127117 ext4_fsblk_t bitmap_blk;128118 struct ext4_group_info *grp;119119+ struct ext4_sb_info *sbi = EXT4_SB(sb);129120130121 desc = ext4_get_group_desc(sb, block_group, NULL);131122 if (!desc)···196185 ext4_error(sb, "Corrupt inode bitmap - block_group = %u, "197186 "inode_bitmap = %llu", block_group, bitmap_blk);198187 grp = ext4_get_group_info(sb, block_group);188188+ if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {189189+ int count;190190+ count = ext4_free_inodes_count(sb, desc);191191+ percpu_counter_sub(&sbi->s_freeinodes_counter,192192+ count);193193+ }199194 set_bit(EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT, &grp->bb_state);200195 return NULL;201196 }···338321 fatal = err;339322 } else {340323 ext4_error(sb, "bit already cleared for inode %lu", ino);324324+ if (!EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) {325325+ int count;326326+ count = ext4_free_inodes_count(sb, gdp);327327+ percpu_counter_sub(&sbi->s_freeinodes_counter,328328+ count);329329+ }341330 set_bit(EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT, &grp->bb_state);342331 }343332
+19-5
fs/ext4/indirect.c
···389389 return 0;390390failed:391391 for (; i >= 0; i--) {392392- if (i != indirect_blks && branch[i].bh)392392+ /*393393+ * We want to ext4_forget() only freshly allocated indirect394394+ * blocks. Buffer for new_blocks[i-1] is at branch[i].bh and395395+ * buffer at branch[0].bh is indirect block / inode already396396+ * existing before ext4_alloc_branch() was called.397397+ */398398+ if (i > 0 && i != indirect_blks && branch[i].bh)393399 ext4_forget(handle, 1, inode, branch[i].bh,394400 branch[i].bh->b_blocknr);395401 ext4_free_blocks(handle, inode, NULL, new_blocks[i],···13161310 blk = *i_data;13171311 if (level > 0) {13181312 ext4_lblk_t first2;13131313+ ext4_lblk_t count2;13141314+13191315 bh = sb_bread(inode->i_sb, le32_to_cpu(blk));13201316 if (!bh) {13211317 EXT4_ERROR_INODE_BLOCK(inode, le32_to_cpu(blk),13221318 "Read failure");13231319 return -EIO;13241320 }13251325- first2 = (first > offset) ? first - offset : 0;13211321+ if (first > offset) {13221322+ first2 = first - offset;13231323+ count2 = count;13241324+ } else {13251325+ first2 = 0;13261326+ count2 = count - (offset - first);13271327+ }13261328 ret = free_hole_blocks(handle, inode, bh,13271329 (__le32 *)bh->b_data, level - 1,13281328- first2, count - offset,13301330+ first2, count2,13291331 inode->i_sb->s_blocksize >> 2);13301332 if (ret) {13311333 brelse(bh);···13431329 if (level == 0 ||13441330 (bh && all_zeroes((__le32 *)bh->b_data,13451331 (__le32 *)bh->b_data + addr_per_block))) {13461346- ext4_free_data(handle, inode, parent_bh, &blk, &blk+1);13471347- *i_data = 0;13321332+ ext4_free_data(handle, inode, parent_bh,13331333+ i_data, i_data + 1);13481334 }13491335 brelse(bh);13501336 bh = NULL;
+8
fs/ext4/mballoc.c
···722722 void *buddy, void *bitmap, ext4_group_t group)723723{724724 struct ext4_group_info *grp = ext4_get_group_info(sb, group);725725+ struct ext4_sb_info *sbi = EXT4_SB(sb);725726 ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb);726727 ext4_grpblk_t i = 0;727728 ext4_grpblk_t first;···760759 * corrupt and update bb_free using bitmap value761760 */762761 grp->bb_free = free;762762+ if (!EXT4_MB_GRP_BBITMAP_CORRUPT(grp))763763+ percpu_counter_sub(&sbi->s_freeclusters_counter,764764+ grp->bb_free);763765 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);764766 }765767 mb_set_largest_free_order(sb, grp);···14351431 right_is_free = !mb_test_bit(last + 1, e4b->bd_bitmap);1436143214371433 if (unlikely(block != -1)) {14341434+ struct ext4_sb_info *sbi = EXT4_SB(sb);14381435 ext4_fsblk_t blocknr;1439143614401437 blocknr = ext4_group_first_block_no(sb, e4b->bd_group);···14461441 "freeing already freed block "14471442 "(bit %u); block bitmap corrupt.",14481443 block);14441444+ if (!EXT4_MB_GRP_BBITMAP_CORRUPT(e4b->bd_info))14451445+ percpu_counter_sub(&sbi->s_freeclusters_counter,14461446+ e4b->bd_info->bb_free);14491447 /* Mark the block group as corrupt. */14501448 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT,14511449 &e4b->bd_info->bb_state);
+55-14
fs/kernfs/file.c
···3939 struct list_head files; /* goes through kernfs_open_file.list */4040};41414242+/*4343+ * kernfs_notify() may be called from any context and bounces notifications4444+ * through a work item. To minimize space overhead in kernfs_node, the4545+ * pending queue is implemented as a singly linked list of kernfs_nodes.4646+ * The list is terminated with the self pointer so that whether a4747+ * kernfs_node is on the list or not can be determined by testing the next4848+ * pointer for NULL.4949+ */5050+#define KERNFS_NOTIFY_EOL ((void *)&kernfs_notify_list)5151+5252+static DEFINE_SPINLOCK(kernfs_notify_lock);5353+static struct kernfs_node *kernfs_notify_list = KERNFS_NOTIFY_EOL;5454+4255static struct kernfs_open_file *kernfs_of(struct file *file)4356{4457 return ((struct seq_file *)file->private_data)->private;···796783 return DEFAULT_POLLMASK|POLLERR|POLLPRI;797784}798785799799-/**800800- * kernfs_notify - notify a kernfs file801801- * @kn: file to notify802802- *803803- * Notify @kn such that poll(2) on @kn wakes up.804804- */805805-void kernfs_notify(struct kernfs_node *kn)786786+static void kernfs_notify_workfn(struct work_struct *work)806787{807807- struct kernfs_root *root = kernfs_root(kn);788788+ struct kernfs_node *kn;808789 struct kernfs_open_node *on;809790 struct kernfs_super_info *info;810810- unsigned long flags;811811-812812- if (WARN_ON(kernfs_type(kn) != KERNFS_FILE))791791+repeat:792792+ /* pop one off the notify_list */793793+ spin_lock_irq(&kernfs_notify_lock);794794+ kn = kernfs_notify_list;795795+ if (kn == KERNFS_NOTIFY_EOL) {796796+ spin_unlock_irq(&kernfs_notify_lock);813797 return;798798+ }799799+ kernfs_notify_list = kn->attr.notify_next;800800+ kn->attr.notify_next = NULL;801801+ spin_unlock_irq(&kernfs_notify_lock);814802815803 /* kick poll */816816- spin_lock_irqsave(&kernfs_open_node_lock, flags);804804+ spin_lock_irq(&kernfs_open_node_lock);817805818806 on = kn->attr.open;819807 if (on) {···822808 wake_up_interruptible(&on->poll);823809 }824810825825- spin_unlock_irqrestore(&kernfs_open_node_lock, flags);811811+ spin_unlock_irq(&kernfs_open_node_lock);826812827813 /* kick fsnotify */828814 mutex_lock(&kernfs_mutex);829815830830- list_for_each_entry(info, &root->supers, node) {816816+ list_for_each_entry(info, &kernfs_root(kn)->supers, node) {831817 struct inode *inode;832818 struct dentry *dentry;833819···847833 }848834849835 mutex_unlock(&kernfs_mutex);836836+ kernfs_put(kn);837837+ goto repeat;838838+}839839+840840+/**841841+ * kernfs_notify - notify a kernfs file842842+ * @kn: file to notify843843+ *844844+ * Notify @kn such that poll(2) on @kn wakes up. Maybe be called from any845845+ * context.846846+ */847847+void kernfs_notify(struct kernfs_node *kn)848848+{849849+ static DECLARE_WORK(kernfs_notify_work, kernfs_notify_workfn);850850+ unsigned long flags;851851+852852+ if (WARN_ON(kernfs_type(kn) != KERNFS_FILE))853853+ return;854854+855855+ spin_lock_irqsave(&kernfs_notify_lock, flags);856856+ if (!kn->attr.notify_next) {857857+ kernfs_get(kn);858858+ kn->attr.notify_next = kernfs_notify_list;859859+ kernfs_notify_list = kn;860860+ schedule_work(&kernfs_notify_work);861861+ }862862+ spin_unlock_irqrestore(&kernfs_notify_lock, flags);850863}851864EXPORT_SYMBOL_GPL(kernfs_notify);852865
···617617618618 switch (create->cr_type) {619619 case NF4LNK:620620- /* ugh! we have to null-terminate the linktext, or621621- * vfs_symlink() will choke. it is always safe to622622- * null-terminate by brute force, since at worst we623623- * will overwrite the first byte of the create namelen624624- * in the XDR buffer, which has already been extracted625625- * during XDR decode.626626- */627627- create->cr_linkname[create->cr_linklen] = 0;628628-629620 status = nfsd_symlink(rqstp, &cstate->current_fh,630621 create->cr_name, create->cr_namelen,631622 create->cr_linkname, create->cr_linklen,
+13-2
fs/nfsd/nfs4xdr.c
···600600 READ_BUF(4);601601 create->cr_linklen = be32_to_cpup(p++);602602 READ_BUF(create->cr_linklen);603603- SAVEMEM(create->cr_linkname, create->cr_linklen);603603+ /*604604+ * The VFS will want a null-terminated string, and605605+ * null-terminating in place isn't safe since this might606606+ * end on a page boundary:607607+ */608608+ create->cr_linkname =609609+ kmalloc(create->cr_linklen + 1, GFP_KERNEL);610610+ if (!create->cr_linkname)611611+ return nfserr_jukebox;612612+ memcpy(create->cr_linkname, p, create->cr_linklen);613613+ create->cr_linkname[create->cr_linklen] = '\0';614614+ defer_free(argp, kfree, create->cr_linkname);604615 break;605616 case NF4BLK:606617 case NF4CHR:···3278326732793268 wire_count = htonl(maxcount);32803269 write_bytes_to_xdr_buf(xdr->buf, length_offset, &wire_count, 4);32813281- xdr_truncate_encode(xdr, length_offset + 4 + maxcount);32703270+ xdr_truncate_encode(xdr, length_offset + 4 + ALIGN(maxcount, 4));32823271 if (maxcount & 3)32833272 write_bytes_to_xdr_buf(xdr->buf, length_offset + 4 + maxcount,32843273 &zero, 4 - (maxcount&3));
+2-20
fs/proc/stat.c
···184184185185static int stat_open(struct inode *inode, struct file *file)186186{187187- size_t size = 1024 + 128 * num_possible_cpus();188188- char *buf;189189- struct seq_file *m;190190- int res;187187+ size_t size = 1024 + 128 * num_online_cpus();191188192189 /* minimum size to display an interrupt count : 2 bytes */193190 size += 2 * nr_irqs;194194-195195- /* don't ask for more than the kmalloc() max size */196196- if (size > KMALLOC_MAX_SIZE)197197- size = KMALLOC_MAX_SIZE;198198- buf = kmalloc(size, GFP_KERNEL);199199- if (!buf)200200- return -ENOMEM;201201-202202- res = single_open(file, show_stat, NULL);203203- if (!res) {204204- m = file->private_data;205205- m->buf = buf;206206- m->size = ksize(buf);207207- } else208208- kfree(buf);209209- return res;191191+ return single_open_size(file, show_stat, NULL, size);210192}211193212194static const struct file_operations proc_stat_operations = {
···3232/* For use by hda_i915 driver */3333extern int i915_request_power_well(void);3434extern int i915_release_power_well(void);3535+extern int i915_get_cdclk_freq(void);35363637#endif /* _I915_POWERWELL_H_ */
···334334 * calling arch_ptrace_stop() when it would be superfluous. For example,335335 * if the thread has not been back to user mode since the last stop, the336336 * thread state might indicate that nothing needs to be done.337337+ *338338+ * This is guaranteed to be invoked once before a task stops for ptrace and339339+ * may include arch-specific operations necessary prior to a ptrace stop.337340 */338341#define arch_ptrace_stop_needed(code, info) (0)339342#endif
+3-1
include/linux/usb_usual.h
···7070 US_FLAG(NEEDS_CAP16, 0x00400000) \7171 /* cannot handle READ_CAPACITY_10 */ \7272 US_FLAG(IGNORE_UAS, 0x00800000) \7373- /* Device advertises UAS but it is broken */7373+ /* Device advertises UAS but it is broken */ \7474+ US_FLAG(BROKEN_FUA, 0x01000000) \7575+ /* Cannot handle FUA in WRITE or READ CDBs */ \74767577#define US_FLAG(name, value) US_FL_##name = value ,7678enum { US_DO_ALL_FLAGS };
+1-1
include/scsi/scsi_cmnd.h
···318318319319static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd)320320{321321- unsigned int xfer_len = blk_rq_bytes(scmd->request);321321+ unsigned int xfer_len = scsi_out(scmd)->length;322322 unsigned int prot_op = scsi_get_prot_op(scmd);323323 unsigned int sector_size = scmd->device->sector_size;324324
+1
include/scsi/scsi_device.h
···173173 unsigned is_visible:1; /* is the device visible in sysfs */174174 unsigned wce_default_on:1; /* Cache is ON by default */175175 unsigned no_dif:1; /* T10 PI (DIF) should be disabled */176176+ unsigned broken_fua:1; /* Don't set FUA bit */176177177178 atomic_t disk_events_disable_depth; /* disable depth for disk events */178179
···3333 __u8 bInterval;3434} __attribute__((packed));35353636+/* Legacy format, deprecated as of 3.14. */3737+struct usb_functionfs_descs_head {3838+ __le32 magic;3939+ __le32 length;4040+ __le32 fs_count;4141+ __le32 hs_count;4242+} __attribute__((packed, deprecated));36433744/*3845 * Descriptors format:
+3-3
kernel/events/uprobes.c
···846846{847847 int err;848848849849- if (!consumer_del(uprobe, uc)) /* WARN? */849849+ if (WARN_ON(!consumer_del(uprobe, uc)))850850 return;851851852852 err = register_for_each_vma(uprobe, NULL);···927927 int ret = -ENOENT;928928929929 uprobe = find_uprobe(inode, offset);930930- if (!uprobe)930930+ if (WARN_ON(!uprobe))931931 return ret;932932933933 down_write(&uprobe->register_rwsem);···952952 struct uprobe *uprobe;953953954954 uprobe = find_uprobe(inode, offset);955955- if (!uprobe)955955+ if (WARN_ON(!uprobe))956956 return;957957958958 down_write(&uprobe->register_rwsem);
+2-2
kernel/irq/irqdesc.c
···455455 */456456void irq_free_hwirqs(unsigned int from, int cnt)457457{458458- int i;458458+ int i, j;459459460460- for (i = from; cnt > 0; i++, cnt--) {460460+ for (i = from, j = cnt; j > 0; i++, j--) {461461 irq_set_status_flags(i, _IRQ_NOREQUEST | _IRQ_NOPROBE);462462 arch_teardown_hwirq(i);463463 }
+18-26
kernel/printk/printk.c
···14161416/*14171417 * Can we actually use the console at this time on this cpu?14181418 *14191419- * Console drivers may assume that per-cpu resources have been allocated. So14201420- * unless they're explicitly marked as being able to cope (CON_ANYTIME) don't14211421- * call them until this CPU is officially up.14191419+ * Console drivers may assume that per-cpu resources have14201420+ * been allocated. So unless they're explicitly marked as14211421+ * being able to cope (CON_ANYTIME) don't call them until14221422+ * this CPU is officially up.14221423 */14231424static inline int can_use_console(unsigned int cpu)14241425{···14321431 * console_lock held, and 'console_locked' set) if it14331432 * is successful, false otherwise.14341433 */14351435-static int console_trylock_for_printk(void)14341434+static int console_trylock_for_printk(unsigned int cpu)14361435{14371437- unsigned int cpu = smp_processor_id();14381438-14391436 if (!console_trylock())14401437 return 0;14411438 /*···16081609 */16091610 if (!oops_in_progress && !lockdep_recursing(current)) {16101611 recursion_bug = 1;16111611- local_irq_restore(flags);16121612- return 0;16121612+ goto out_restore_irqs;16131613 }16141614 zap_locks();16151615 }···1716171817171719 logbuf_cpu = UINT_MAX;17181720 raw_spin_unlock(&logbuf_lock);17191719- lockdep_on();17201720- local_irq_restore(flags);1721172117221722 /* If called from the scheduler, we can not call up(). */17231723- if (in_sched)17241724- return printed_len;17231723+ if (!in_sched) {17241724+ /*17251725+ * Try to acquire and then immediately release the console17261726+ * semaphore. The release will print out buffers and wake up17271727+ * /dev/kmsg and syslog() users.17281728+ */17291729+ if (console_trylock_for_printk(this_cpu))17301730+ console_unlock();17311731+ }1725173217261726- /*17271727- * Disable preemption to avoid being preempted while holding17281728- * console_sem which would prevent anyone from printing to console17291729- */17301730- preempt_disable();17311731- /*17321732- * Try to acquire and then immediately release the console semaphore.17331733- * The release will print out buffers and wake up /dev/kmsg and syslog()17341734- * users.17351735- */17361736- if (console_trylock_for_printk())17371737- console_unlock();17381738- preempt_enable();17391739-17331733+ lockdep_on();17341734+out_restore_irqs:17351735+ local_irq_restore(flags);17401736 return printed_len;17411737}17421738EXPORT_SYMBOL(vprintk_emit);
···193193 int msg, pid, err;194194 struct msgque_data msgque;195195196196+ if (getuid() != 0) {197197+ printf("Please run the test as root - Exiting.\n");198198+ exit(1);199199+ }200200+196201 msgque.key = ftok(argv[0], 822155650);197202 if (msgque.key == -1) {198203 printf("Can't make key\n");