···182182 space-efficient. If this option is not present, large padding is183183 used - that is for compatibility with older kernels.184184185185+allow_discards186186+ Allow block discard requests (a.k.a. TRIM) for the integrity device.187187+ Discards are only allowed to devices using internal hash.185188186186-The journal mode (D/J), buffer_sectors, journal_watermark, commit_time can187187-be changed when reloading the target (load an inactive table and swap the188188-tables with suspend and resume). The other arguments should not be changed189189-when reloading the target because the layout of disk data depend on them190190-and the reloaded target would be non-functional.189189+The journal mode (D/J), buffer_sectors, journal_watermark, commit_time and190190+allow_discards can be changed when reloading the target (load an inactive191191+table and swap the tables with suspend and resume). The other arguments192192+should not be changed when reloading the target because the layout of disk193193+data depend on them and the reloaded target would be non-functional.191194192195193196The layout of the formatted block device:
···6060 select ARCH_HAS_GIGANTIC_PAGE6161 select ARCH_HAS_SET_DIRECT_MAP6262 select ARCH_HAS_SET_MEMORY6363- select ARCH_HAS_STRICT_KERNEL_RWX6363+ select ARCH_HAS_STRICT_KERNEL_RWX if MMU6464 select ARCH_WANT_HUGE_PMD_SHARE if 64BIT6565 select SPARSEMEM_STATIC if 32BIT6666 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
+10-7
arch/riscv/kernel/sbi.c
···102102{103103 sbi_ecall(SBI_EXT_0_1_SHUTDOWN, 0, 0, 0, 0, 0, 0, 0);104104}105105-EXPORT_SYMBOL(sbi_set_timer);105105+EXPORT_SYMBOL(sbi_shutdown);106106107107/**108108 * sbi_clear_ipi() - Clear any pending IPIs for the calling hart.···113113{114114 sbi_ecall(SBI_EXT_0_1_CLEAR_IPI, 0, 0, 0, 0, 0, 0, 0);115115}116116-EXPORT_SYMBOL(sbi_shutdown);116116+EXPORT_SYMBOL(sbi_clear_ipi);117117118118/**119119 * sbi_set_timer_v01() - Program the timer for next timer event.···167167168168 return result;169169}170170+171171+static void sbi_set_power_off(void)172172+{173173+ pm_power_off = sbi_shutdown;174174+}170175#else171176static void __sbi_set_timer_v01(uint64_t stime_value)172177{···196191197192 return 0;198193}194194+195195+static void sbi_set_power_off(void) {}199196#endif /* CONFIG_RISCV_SBI_V01 */200197201198static void __sbi_set_timer_v02(uint64_t stime_value)···547540 return __sbi_base_ecall(SBI_EXT_BASE_GET_IMP_VERSION);548541}549542550550-static void sbi_power_off(void)551551-{552552- sbi_shutdown();553553-}554543555544int __init sbi_init(void)556545{557546 int ret;558547559559- pm_power_off = sbi_power_off;548548+ sbi_set_power_off();560549 ret = sbi_get_spec_version();561550 if (ret > 0)562551 sbi_spec_version = ret;
+2-2
arch/riscv/kernel/stacktrace.c
···1212#include <linux/stacktrace.h>1313#include <linux/ftrace.h>14141515+register unsigned long sp_in_global __asm__("sp");1616+1517#ifdef CONFIG_FRAME_POINTER16181719struct stackframe {1820 unsigned long fp;1921 unsigned long ra;2022};2121-2222-register unsigned long sp_in_global __asm__("sp");23232424void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,2525 bool (*fn)(unsigned long, void *), void *arg)
+3-3
arch/riscv/kernel/vdso/Makefile
···3333 $(call if_changed,vdsold)34343535# We also create a special relocatable object that should mirror the symbol3636-# table and layout of the linked DSO. With ld -R we can then refer to3737-# these symbols in the kernel code rather than hand-coded addresses.3636+# table and layout of the linked DSO. With ld --just-symbols we can then3737+# refer to these symbols in the kernel code rather than hand-coded addresses.38383939SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \4040 -Wl,--build-id -Wl,--hash-style=both4141$(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/rt_sigreturn.o FORCE4242 $(call if_changed,vdsold)43434444-LDFLAGS_vdso-syms.o := -r -R4444+LDFLAGS_vdso-syms.o := -r --just-symbols4545$(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE4646 $(call if_changed,ld)4747
+4
arch/s390/lib/uaccess.c
···6464{6565 mm_segment_t old_fs;6666 unsigned long asce, cr;6767+ unsigned long flags;67686869 old_fs = current->thread.mm_segment;6970 if (old_fs & 1)7071 return old_fs;7272+ /* protect against a concurrent page table upgrade */7373+ local_irq_save(flags);7174 current->thread.mm_segment |= 1;7275 asce = S390_lowcore.kernel_asce;7376 if (likely(old_fs == USER_DS)) {···8683 __ctl_load(asce, 7, 7);8784 set_cpu_flag(CIF_ASCE_SECONDARY);8885 }8686+ local_irq_restore(flags);8987 return old_fs;9088}9189EXPORT_SYMBOL(enable_sacf_uaccess);
+14-2
arch/s390/mm/pgalloc.c
···7070{7171 struct mm_struct *mm = arg;72727373- if (current->active_mm == mm)7474- set_user_asce(mm);7373+ /* we must change all active ASCEs to avoid the creation of new TLBs */7474+ if (current->active_mm == mm) {7575+ S390_lowcore.user_asce = mm->context.asce;7676+ if (current->thread.mm_segment == USER_DS) {7777+ __ctl_load(S390_lowcore.user_asce, 1, 1);7878+ /* Mark user-ASCE present in CR1 */7979+ clear_cpu_flag(CIF_ASCE_PRIMARY);8080+ }8181+ if (current->thread.mm_segment == USER_DS_SACF) {8282+ __ctl_load(S390_lowcore.user_asce, 7, 7);8383+ /* enable_sacf_uaccess does all or nothing */8484+ WARN_ON(!test_cpu_flag(CIF_ASCE_SECONDARY));8585+ }8686+ }7587 __tlb_flush_local();7688}7789
+10-2
arch/x86/hyperv/hv_init.c
···7373 struct page *pg;74747575 input_arg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);7676- pg = alloc_page(GFP_KERNEL);7676+ /* hv_cpu_init() can be called with IRQs disabled from hv_resume() */7777+ pg = alloc_page(irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);7778 if (unlikely(!pg))7879 return -ENOMEM;7980 *input_arg = page_address(pg);···255254static int hv_suspend(void)256255{257256 union hv_x64_msr_hypercall_contents hypercall_msr;257257+ int ret;258258259259 /*260260 * Reset the hypercall page as it is going to be invalidated···272270 hypercall_msr.enable = 0;273271 wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);274272275275- return 0;273273+ ret = hv_cpu_die(0);274274+ return ret;276275}277276278277static void hv_resume(void)279278{280279 union hv_x64_msr_hypercall_contents hypercall_msr;280280+ int ret;281281+282282+ ret = hv_cpu_init(0);283283+ WARN_ON(ret);281284282285 /* Re-enable the hypercall page */283286 rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);···295288 hv_hypercall_pg_saved = NULL;296289}297290291291+/* Note: when the ops are called, only CPU0 is online and IRQs are disabled. */298292static struct syscore_ops hv_syscore_ops = {299293 .suspend = hv_suspend,300294 .resume = hv_resume,
···496496497497 if (!disk_part_scan_enabled(disk))498498 return 0;499499- if (bdev->bd_part_count || bdev->bd_openers > 1)499499+ if (bdev->bd_part_count)500500 return -EBUSY;501501 res = invalidate_partition(disk, 0);502502 if (res)
+2-2
drivers/acpi/device_pm.c
···273273 end:274274 if (result) {275275 dev_warn(&device->dev, "Failed to change power state to %s\n",276276- acpi_power_state_string(state));276276+ acpi_power_state_string(target_state));277277 } else {278278 device->power.state = target_state;279279 ACPI_DEBUG_PRINT((ACPI_DB_INFO,280280 "Device [%s] transitioned to %s\n",281281 device->pnp.bus_id,282282- acpi_power_state_string(state)));282282+ acpi_power_state_string(target_state)));283283 }284284285285 return result;
+1-1
drivers/cpufreq/intel_pstate.c
···1059105910601060 update_turbo_state();10611061 if (global.turbo_disabled) {10621062- pr_warn("Turbo disabled by BIOS or unavailable on processor\n");10621062+ pr_notice_once("Turbo disabled by BIOS or unavailable on processor\n");10631063 mutex_unlock(&intel_pstate_limits_lock);10641064 mutex_unlock(&intel_pstate_driver_lock);10651065 return -EPERM;
+7-3
drivers/crypto/caam/caamalg.c
···963963 struct caam_drv_private_jr *jrp = dev_get_drvdata(jrdev);964964 struct aead_edesc *edesc;965965 int ecode = 0;966966+ bool has_bklog;966967967968 dev_dbg(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err);968969969970 edesc = rctx->edesc;971971+ has_bklog = edesc->bklog;970972971973 if (err)972974 ecode = caam_jr_strstatus(jrdev, err);···981979 * If no backlog flag, the completion of the request is done982980 * by CAAM, not crypto engine.983981 */984984- if (!edesc->bklog)982982+ if (!has_bklog)985983 aead_request_complete(req, ecode);986984 else987985 crypto_finalize_aead_request(jrp->engine, req, ecode);···997995 struct caam_drv_private_jr *jrp = dev_get_drvdata(jrdev);998996 int ivsize = crypto_skcipher_ivsize(skcipher);999997 int ecode = 0;998998+ bool has_bklog;100099910011000 dev_dbg(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err);1002100110031002 edesc = rctx->edesc;10031003+ has_bklog = edesc->bklog;10041004 if (err)10051005 ecode = caam_jr_strstatus(jrdev, err);10061006···10321028 * If no backlog flag, the completion of the request is done10331029 * by CAAM, not crypto engine.10341030 */10351035- if (!edesc->bklog)10311031+ if (!has_bklog)10361032 skcipher_request_complete(req, ecode);10371033 else10381034 crypto_finalize_skcipher_request(jrp->engine, req, ecode);···1715171117161712 if (ivsize || mapped_dst_nents > 1)17171713 sg_to_sec4_set_last(edesc->sec4_sg + dst_sg_idx +17181718- mapped_dst_nents);17141714+ mapped_dst_nents - 1 + !!ivsize);1719171517201716 if (sec4_sg_bytes) {17211717 edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg,
+6-2
drivers/crypto/caam/caamhash.c
···583583 struct caam_hash_state *state = ahash_request_ctx(req);584584 struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash);585585 int ecode = 0;586586+ bool has_bklog;586587587588 dev_dbg(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err);588589589590 edesc = state->edesc;591591+ has_bklog = edesc->bklog;590592591593 if (err)592594 ecode = caam_jr_strstatus(jrdev, err);···605603 * If no backlog flag, the completion of the request is done606604 * by CAAM, not crypto engine.607605 */608608- if (!edesc->bklog)606606+ if (!has_bklog)609607 req->base.complete(&req->base, ecode);610608 else611609 crypto_finalize_hash_request(jrp->engine, req, ecode);···634632 struct caam_hash_state *state = ahash_request_ctx(req);635633 int digestsize = crypto_ahash_digestsize(ahash);636634 int ecode = 0;635635+ bool has_bklog;637636638637 dev_dbg(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err);639638640639 edesc = state->edesc;640640+ has_bklog = edesc->bklog;641641 if (err)642642 ecode = caam_jr_strstatus(jrdev, err);643643···667663 * If no backlog flag, the completion of the request is done668664 * by CAAM, not crypto engine.669665 */670670- if (!edesc->bklog)666666+ if (!has_bklog)671667 req->base.complete(&req->base, ecode);672668 else673669 crypto_finalize_hash_request(jrp->engine, req, ecode);
+6-2
drivers/crypto/caam/caampkc.c
···121121 struct caam_drv_private_jr *jrp = dev_get_drvdata(dev);122122 struct rsa_edesc *edesc;123123 int ecode = 0;124124+ bool has_bklog;124125125126 if (err)126127 ecode = caam_jr_strstatus(dev, err);127128128129 edesc = req_ctx->edesc;130130+ has_bklog = edesc->bklog;129131130132 rsa_pub_unmap(dev, edesc, req);131133 rsa_io_unmap(dev, edesc, req);···137135 * If no backlog flag, the completion of the request is done138136 * by CAAM, not crypto engine.139137 */140140- if (!edesc->bklog)138138+ if (!has_bklog)141139 akcipher_request_complete(req, ecode);142140 else143141 crypto_finalize_akcipher_request(jrp->engine, req, ecode);···154152 struct caam_rsa_req_ctx *req_ctx = akcipher_request_ctx(req);155153 struct rsa_edesc *edesc;156154 int ecode = 0;155155+ bool has_bklog;157156158157 if (err)159158 ecode = caam_jr_strstatus(dev, err);160159161160 edesc = req_ctx->edesc;161161+ has_bklog = edesc->bklog;162162163163 switch (key->priv_form) {164164 case FORM1:···180176 * If no backlog flag, the completion of the request is done181177 * by CAAM, not crypto engine.182178 */183183- if (!edesc->bklog)179179+ if (!has_bklog)184180 akcipher_request_complete(req, ecode);185181 else186182 crypto_finalize_akcipher_request(jrp->engine, req, ecode);
+4-3
drivers/dma-buf/dma-buf.c
···388388389389 return ret;390390391391- case DMA_BUF_SET_NAME:391391+ case DMA_BUF_SET_NAME_A:392392+ case DMA_BUF_SET_NAME_B:392393 return dma_buf_set_name(dmabuf, (const char __user *)arg);393394394395 default:···656655 * calls attach() of dma_buf_ops to allow device-specific attach functionality657656 * @dmabuf: [in] buffer to attach device to.658657 * @dev: [in] device to be attached.659659- * @importer_ops [in] importer operations for the attachment660660- * @importer_priv [in] importer private pointer for the attachment658658+ * @importer_ops: [in] importer operations for the attachment659659+ * @importer_priv: [in] importer private pointer for the attachment661660 *662661 * Returns struct dma_buf_attachment pointer for this attachment. Attachments663662 * must be cleaned up by calling dma_buf_detach().
+2-1
drivers/dma/Kconfig
···241241242242config HISI_DMA243243 tristate "HiSilicon DMA Engine support"244244- depends on ARM64 || (COMPILE_TEST && PCI_MSI)244244+ depends on ARM64 || COMPILE_TEST245245+ depends on PCI_MSI245246 select DMA_ENGINE246247 select DMA_VIRTUAL_CHANNELS247248 help
+26-34
drivers/dma/dmaengine.c
···232232 struct dma_chan_dev *chan_dev;233233234234 chan_dev = container_of(dev, typeof(*chan_dev), device);235235- if (atomic_dec_and_test(chan_dev->idr_ref)) {236236- ida_free(&dma_ida, chan_dev->dev_id);237237- kfree(chan_dev->idr_ref);238238- }239235 kfree(chan_dev);240236}241237···10391043}1040104410411045static int __dma_async_device_channel_register(struct dma_device *device,10421042- struct dma_chan *chan,10431043- int chan_id)10461046+ struct dma_chan *chan)10441047{10451048 int rc = 0;10461046- int chancnt = device->chancnt;10471047- atomic_t *idr_ref;10481048- struct dma_chan *tchan;10491049-10501050- tchan = list_first_entry_or_null(&device->channels,10511051- struct dma_chan, device_node);10521052- if (!tchan)10531053- return -ENODEV;10541054-10551055- if (tchan->dev) {10561056- idr_ref = tchan->dev->idr_ref;10571057- } else {10581058- idr_ref = kmalloc(sizeof(*idr_ref), GFP_KERNEL);10591059- if (!idr_ref)10601060- return -ENOMEM;10611061- atomic_set(idr_ref, 0);10621062- }1063104910641050 chan->local = alloc_percpu(typeof(*chan->local));10651051 if (!chan->local)···10571079 * When the chan_id is a negative value, we are dynamically adding10581080 * the channel. Otherwise we are static enumerating.10591081 */10601060- chan->chan_id = chan_id < 0 ? chancnt : chan_id;10821082+ mutex_lock(&device->chan_mutex);10831083+ chan->chan_id = ida_alloc(&device->chan_ida, GFP_KERNEL);10841084+ mutex_unlock(&device->chan_mutex);10851085+ if (chan->chan_id < 0) {10861086+ pr_err("%s: unable to alloc ida for chan: %d\n",10871087+ __func__, chan->chan_id);10881088+ goto err_out;10891089+ }10901090+10611091 chan->dev->device.class = &dma_devclass;10621092 chan->dev->device.parent = device->dev;10631093 chan->dev->chan = chan;10641064- chan->dev->idr_ref = idr_ref;10651094 chan->dev->dev_id = device->dev_id;10661066- atomic_inc(idr_ref);10671095 dev_set_name(&chan->dev->device, "dma%dchan%d",10681096 device->dev_id, chan->chan_id);10691069-10701097 rc = device_register(&chan->dev->device);10711098 if (rc)10721072- goto err_out;10991099+ goto err_out_ida;10731100 chan->client_count = 0;10741074- device->chancnt = chan->chan_id + 1;11011101+ device->chancnt++;1075110210761103 return 0;1077110411051105+ err_out_ida:11061106+ mutex_lock(&device->chan_mutex);11071107+ ida_free(&device->chan_ida, chan->chan_id);11081108+ mutex_unlock(&device->chan_mutex);10781109 err_out:10791110 free_percpu(chan->local);10801111 kfree(chan->dev);10811081- if (atomic_dec_return(idr_ref) == 0)10821082- kfree(idr_ref);10831112 return rc;10841113}10851114···10951110{10961111 int rc;1097111210981098- rc = __dma_async_device_channel_register(device, chan, -1);11131113+ rc = __dma_async_device_channel_register(device, chan);10991114 if (rc < 0)11001115 return rc;11011116···11151130 device->chancnt--;11161131 chan->dev->chan = NULL;11171132 mutex_unlock(&dma_list_mutex);11331133+ mutex_lock(&device->chan_mutex);11341134+ ida_free(&device->chan_ida, chan->chan_id);11351135+ mutex_unlock(&device->chan_mutex);11181136 device_unregister(&chan->dev->device);11191137 free_percpu(chan->local);11201138}···11401152 */11411153int dma_async_device_register(struct dma_device *device)11421154{11431143- int rc, i = 0;11551155+ int rc;11441156 struct dma_chan* chan;1145115711461158 if (!device)···12451257 if (rc != 0)12461258 return rc;1247125912601260+ mutex_init(&device->chan_mutex);12611261+ ida_init(&device->chan_ida);12621262+12481263 /* represent channels in sysfs. Probably want devs too */12491264 list_for_each_entry(chan, &device->channels, device_node) {12501250- rc = __dma_async_device_channel_register(device, chan, i++);12651265+ rc = __dma_async_device_channel_register(device, chan);12511266 if (rc < 0)12521267 goto err_out;12531268 }···13251334 */13261335 dma_cap_set(DMA_PRIVATE, device->cap_mask);13271336 dma_channel_rebalance();13371337+ ida_free(&dma_ida, device->dev_id);13281338 dma_device_put(device);13291339 mutex_unlock(&dma_list_mutex);13301340}
···816816static void tegra_dma_synchronize(struct dma_chan *dc)817817{818818 struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);819819+ int err;820820+821821+ err = pm_runtime_get_sync(tdc->tdma->dev);822822+ if (err < 0) {823823+ dev_err(tdc2dev(tdc), "Failed to synchronize DMA: %d\n", err);824824+ return;825825+ }819826820827 /*821828 * CPU, which handles interrupt, could be busy in···832825 wait_event(tdc->wq, tegra_dma_eoc_interrupt_deasserted(tdc));833826834827 tasklet_kill(&tdc->tasklet);828828+829829+ pm_runtime_put(tdc->tdma->dev);835830}836831837832static unsigned int tegra_dma_sg_bytes_xferred(struct tegra_dma_channel *tdc,
+1
drivers/dma/ti/k3-psil.c
···2727 soc_ep_map = &j721e_ep_map;2828 } else {2929 pr_err("PSIL: No compatible machine found for map\n");3030+ mutex_unlock(&ep_map_mutex);3031 return ERR_PTR(-ENOTSUPP);3132 }3233 pr_debug("%s: Using map for %s\n", __func__, soc_ep_map->name);
+10-10
drivers/dma/xilinx/xilinx_dma.c
···12301230 return ret;1231123112321232 spin_lock_irqsave(&chan->lock, flags);12331233-12341234- desc = list_last_entry(&chan->active_list,12351235- struct xilinx_dma_tx_descriptor, node);12361236- /*12371237- * VDMA and simple mode do not support residue reporting, so the12381238- * residue field will always be 0.12391239- */12401240- if (chan->has_sg && chan->xdev->dma_config->dmatype != XDMA_TYPE_VDMA)12411241- residue = xilinx_dma_get_residue(chan, desc);12421242-12331233+ if (!list_empty(&chan->active_list)) {12341234+ desc = list_last_entry(&chan->active_list,12351235+ struct xilinx_dma_tx_descriptor, node);12361236+ /*12371237+ * VDMA and simple mode do not support residue reporting, so the12381238+ * residue field will always be 0.12391239+ */12401240+ if (chan->has_sg && chan->xdev->dma_config->dmatype != XDMA_TYPE_VDMA)12411241+ residue = xilinx_dma_get_residue(chan, desc);12421242+ }12431243 spin_unlock_irqrestore(&chan->lock, flags);1244124412451245 dma_set_residue(txstate, residue);
+2-1
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
···8585 * - 3.34.0 - Non-DC can flip correctly between buffers with different pitches8686 * - 3.35.0 - Add drm_amdgpu_info_device::tcc_disabled_mask8787 * - 3.36.0 - Allow reading more status registers on si/cik8888+ * - 3.37.0 - L2 is invalidated before SDMA IBs, needed for correctness8889 */8990#define KMS_DRIVER_MAJOR 39090-#define KMS_DRIVER_MINOR 369191+#define KMS_DRIVER_MINOR 379192#define KMS_DRIVER_PATCHLEVEL 092939394int amdgpu_vram_limit = 0;
···16251625 hws->funcs.verify_allow_pstate_change_high(dc);16261626}1627162716281628+void dcn10_cursor_lock(struct dc *dc, struct pipe_ctx *pipe, bool lock)16291629+{16301630+ /* cursor lock is per MPCC tree, so only need to lock one pipe per stream */16311631+ if (!pipe || pipe->top_pipe)16321632+ return;16331633+16341634+ dc->res_pool->mpc->funcs->cursor_lock(dc->res_pool->mpc,16351635+ pipe->stream_res.opp->inst, lock);16361636+}16371637+16281638static bool wait_for_reset_trigger_to_occur(16291639 struct dc_context *dc_ctx,16301640 struct timing_generator *tg)
···284284 .dram_channel_width_bytes = 4,285285 .fabric_datapath_to_dcn_data_return_bytes = 32,286286 .dcn_downspread_percent = 0.5,287287- .downspread_percent = 0.5,287287+ .downspread_percent = 0.38,288288 .dram_page_open_time_ns = 50.0,289289 .dram_rw_turnaround_time_ns = 17.5,290290 .dram_return_buffer_per_channel_bytes = 8192,···339339#define DCCG_SRII(reg_name, block, id)\340340 .block ## _ ## reg_name[id] = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \341341 mm ## block ## id ## _ ## reg_name342342+343343+#define VUPDATE_SRII(reg_name, block, id)\344344+ .reg_name[id] = BASE(mm ## reg_name ## _ ## block ## id ## _BASE_IDX) + \345345+ mm ## reg_name ## _ ## block ## id342346343347/* NBIO */344348#define NBIO_BASE_INNER(seg) \···13781374{13791375 struct dcn21_resource_pool *pool = TO_DCN21_RES_POOL(dc->res_pool);13801376 struct clk_limit_table *clk_table = &bw_params->clk_table;13811381- unsigned int i, j, k;13821382- int closest_clk_lvl;13771377+ struct _vcs_dpi_voltage_scaling_st clock_limits[DC__VOLTAGE_STATES];13781378+ unsigned int i, j, closest_clk_lvl;1383137913841380 // Default clock levels are used for diags, which may lead to overclocking.13851385- if (!IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment) && !IS_DIAG_DC(dc->ctx->dce_environment)) {13811381+ if (!IS_DIAG_DC(dc->ctx->dce_environment)) {13861382 dcn2_1_ip.max_num_otg = pool->base.res_cap->num_timing_generator;13871383 dcn2_1_ip.max_num_dpp = pool->base.pipe_count;13881384 dcn2_1_soc.num_chans = bw_params->num_channels;1389138513901390- /* Vmin: leave lowest DCN clocks, override with dcfclk, fclk, memclk from fuse */13911391- dcn2_1_soc.clock_limits[0].state = 0;13921392- dcn2_1_soc.clock_limits[0].dcfclk_mhz = clk_table->entries[0].dcfclk_mhz;13931393- dcn2_1_soc.clock_limits[0].fabricclk_mhz = clk_table->entries[0].fclk_mhz;13941394- dcn2_1_soc.clock_limits[0].socclk_mhz = clk_table->entries[0].socclk_mhz;13951395- dcn2_1_soc.clock_limits[0].dram_speed_mts = clk_table->entries[0].memclk_mhz * 2;13961396-13971397- /*13981398- * Other levels: find closest DCN clocks that fit the given clock limit using dcfclk13991399- * as indicator14001400- */14011401-14021402- closest_clk_lvl = -1;14031403- /* index currently being filled */14041404- k = 1;14051405- for (i = 1; i < clk_table->num_entries; i++) {14061406- /* loop backwards, skip duplicate state*/14071407- for (j = dcn2_1_soc.num_states - 1; j >= k; j--) {13861386+ ASSERT(clk_table->num_entries);13871387+ for (i = 0; i < clk_table->num_entries; i++) {13881388+ /* loop backwards*/13891389+ for (closest_clk_lvl = 0, j = dcn2_1_soc.num_states - 1; j >= 0; j--) {14081390 if ((unsigned int) dcn2_1_soc.clock_limits[j].dcfclk_mhz <= clk_table->entries[i].dcfclk_mhz) {14091391 closest_clk_lvl = j;14101392 break;14111393 }14121394 }1413139514141414- /* if found a lvl that fits, use the DCN clks from it, if not, go to next clk limit*/14151415- if (closest_clk_lvl != -1) {14161416- dcn2_1_soc.clock_limits[k].state = i;14171417- dcn2_1_soc.clock_limits[k].dcfclk_mhz = clk_table->entries[i].dcfclk_mhz;14181418- dcn2_1_soc.clock_limits[k].fabricclk_mhz = clk_table->entries[i].fclk_mhz;14191419- dcn2_1_soc.clock_limits[k].socclk_mhz = clk_table->entries[i].socclk_mhz;14201420- dcn2_1_soc.clock_limits[k].dram_speed_mts = clk_table->entries[i].memclk_mhz * 2;13961396+ clock_limits[i].state = i;13971397+ clock_limits[i].dcfclk_mhz = clk_table->entries[i].dcfclk_mhz;13981398+ clock_limits[i].fabricclk_mhz = clk_table->entries[i].fclk_mhz;13991399+ clock_limits[i].socclk_mhz = clk_table->entries[i].socclk_mhz;14001400+ clock_limits[i].dram_speed_mts = clk_table->entries[i].memclk_mhz * 2;1421140114221422- dcn2_1_soc.clock_limits[k].dispclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dispclk_mhz;14231423- dcn2_1_soc.clock_limits[k].dppclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dppclk_mhz;14241424- dcn2_1_soc.clock_limits[k].dram_bw_per_chan_gbps = dcn2_1_soc.clock_limits[closest_clk_lvl].dram_bw_per_chan_gbps;14251425- dcn2_1_soc.clock_limits[k].dscclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dscclk_mhz;14261426- dcn2_1_soc.clock_limits[k].dtbclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dtbclk_mhz;14271427- dcn2_1_soc.clock_limits[k].phyclk_d18_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].phyclk_d18_mhz;14281428- dcn2_1_soc.clock_limits[k].phyclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].phyclk_mhz;14291429- k++;14301430- }14021402+ clock_limits[i].dispclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dispclk_mhz;14031403+ clock_limits[i].dppclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dppclk_mhz;14041404+ clock_limits[i].dram_bw_per_chan_gbps = dcn2_1_soc.clock_limits[closest_clk_lvl].dram_bw_per_chan_gbps;14051405+ clock_limits[i].dscclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dscclk_mhz;14061406+ clock_limits[i].dtbclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].dtbclk_mhz;14071407+ clock_limits[i].phyclk_d18_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].phyclk_d18_mhz;14081408+ clock_limits[i].phyclk_mhz = dcn2_1_soc.clock_limits[closest_clk_lvl].phyclk_mhz;14311409 }14321432- dcn2_1_soc.num_states = k;14101410+ for (i = 0; i < clk_table->num_entries; i++)14111411+ dcn2_1_soc.clock_limits[i] = clock_limits[i];14121412+ if (clk_table->num_entries) {14131413+ dcn2_1_soc.num_states = clk_table->num_entries;14141414+ /* duplicate last level */14151415+ dcn2_1_soc.clock_limits[dcn2_1_soc.num_states] = dcn2_1_soc.clock_limits[dcn2_1_soc.num_states - 1];14161416+ dcn2_1_soc.clock_limits[dcn2_1_soc.num_states].state = dcn2_1_soc.num_states;14171417+ }14331418 }14341434-14351435- /* duplicate last level */14361436- dcn2_1_soc.clock_limits[dcn2_1_soc.num_states] = dcn2_1_soc.clock_limits[dcn2_1_soc.num_states - 1];14371437- dcn2_1_soc.clock_limits[dcn2_1_soc.num_states].state = dcn2_1_soc.num_states;1438141914391420 dml_init_instance(&dc->dml, &dcn2_1_soc, &dcn2_1_ip, DML_PROJECT_DCN21);14401421}
+16
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
···210210 struct mpcc_blnd_cfg *blnd_cfg,211211 int mpcc_id);212212213213+ /*214214+ * Lock cursor updates for the specified OPP.215215+ * OPP defines the set of MPCC that are locked together for cursor.216216+ *217217+ * Parameters:218218+ * [in] mpc - MPC context.219219+ * [in] opp_id - The OPP to lock cursor updates on220220+ * [in] lock - lock/unlock the OPP221221+ *222222+ * Return: void223223+ */224224+ void (*cursor_lock)(225225+ struct mpc *mpc,226226+ int opp_id,227227+ bool lock);228228+213229 struct mpcc* (*get_mpcc_for_dpp)(214230 struct mpc_tree *tree,215231 int dpp_id);
···480480 return ret;481481482482 ret = qxl_release_reserve_list(release, true);483483- if (ret)483483+ if (ret) {484484+ qxl_release_free(qdev, release);484485 return ret;485485-486486+ }486487 cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release);487488 cmd->type = QXL_SURFACE_CMD_CREATE;488489 cmd->flags = QXL_SURF_FLAG_KEEP_DATA;···500499 /* no need to add a release to the fence for this surface bo,501500 since it is only released when we ask to destroy the surface502501 and it would never signal otherwise */503503- qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);504502 qxl_release_fence_buffer_objects(release);503503+ qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);505504506505 surf->hw_surf_alloc = true;507506 spin_lock(&qdev->surf_id_idr_lock);···543542 cmd->surface_id = id;544543 qxl_release_unmap(qdev, release, &cmd->release_info);545544546546- qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);547547-548545 qxl_release_fence_buffer_objects(release);546546+ qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);549547550548 return 0;551549}
···978978979979 return drv->resume(dev);980980}981981+#else982982+#define vmbus_suspend NULL983983+#define vmbus_resume NULL981984#endif /* CONFIG_PM_SLEEP */982985983986/*···1000997}10019981002999/*10031003- * Note: we must use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS rather than10041004- * SET_SYSTEM_SLEEP_PM_OPS: see the comment before vmbus_bus_pm.10001000+ * Note: we must use the "noirq" ops: see the comment before vmbus_bus_pm.10011001+ *10021002+ * suspend_noirq/resume_noirq are set to NULL to support Suspend-to-Idle: we10031003+ * shouldn't suspend the vmbus devices upon Suspend-to-Idle, otherwise there10041004+ * is no way to wake up a Generation-2 VM.10051005+ *10061006+ * The other 4 ops are for hibernation.10051007 */10081008+10061009static const struct dev_pm_ops vmbus_pm = {10071007- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(vmbus_suspend, vmbus_resume)10101010+ .suspend_noirq = NULL,10111011+ .resume_noirq = NULL,10121012+ .freeze_noirq = vmbus_suspend,10131013+ .thaw_noirq = vmbus_resume,10141014+ .poweroff_noirq = vmbus_suspend,10151015+ .restore_noirq = vmbus_resume,10081016};1009101710101018/* The one and only one */···2295228122962282 return 0;22972283}22842284+#else22852285+#define vmbus_bus_suspend NULL22862286+#define vmbus_bus_resume NULL22982287#endif /* CONFIG_PM_SLEEP */2299228823002289static const struct acpi_device_id vmbus_acpi_device_ids[] = {···23082291MODULE_DEVICE_TABLE(acpi, vmbus_acpi_device_ids);2309229223102293/*23112311- * Note: we must use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS rather than23122312- * SET_SYSTEM_SLEEP_PM_OPS, otherwise NIC SR-IOV can not work, because the23132313- * "pci_dev_pm_ops" uses the "noirq" callbacks: in the resume path, the23142314- * pci "noirq" restore callback runs before "non-noirq" callbacks (see22942294+ * Note: we must use the "no_irq" ops, otherwise hibernation can not work with22952295+ * PCI device assignment, because "pci_dev_pm_ops" uses the "noirq" ops: in22962296+ * the resume path, the pci "noirq" restore op runs before "non-noirq" op (see23152297 * resume_target_kernel() -> dpm_resume_start(), and hibernation_restore() ->23162298 * dpm_resume_end()). This means vmbus_bus_resume() and the pci-hyperv's23172317- * resume callback must also run via the "noirq" callbacks.22992299+ * resume callback must also run via the "noirq" ops.23002300+ *23012301+ * Set suspend_noirq/resume_noirq to NULL for Suspend-to-Idle: see the comment23022302+ * earlier in this file before vmbus_pm.23182303 */23042304+23192305static const struct dev_pm_ops vmbus_bus_pm = {23202320- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(vmbus_bus_suspend, vmbus_bus_resume)23062306+ .suspend_noirq = NULL,23072307+ .resume_noirq = NULL,23082308+ .freeze_noirq = vmbus_bus_suspend,23092309+ .thaw_noirq = vmbus_bus_resume,23102310+ .poweroff_noirq = vmbus_bus_suspend,23112311+ .restore_noirq = vmbus_bus_resume23212312};2322231323232314static struct acpi_driver vmbus_acpi_driver = {
···360360 value = (u8)((val >> S_RX_DATA_SHIFT) & S_RX_DATA_MASK);361361 i2c_slave_event(iproc_i2c->slave,362362 I2C_SLAVE_WRITE_RECEIVED, &value);363363+ if (rx_status == I2C_SLAVE_RX_END)364364+ i2c_slave_event(iproc_i2c->slave,365365+ I2C_SLAVE_STOP, &value);363366 }364367 } else if (status & BIT(IS_S_TX_UNDERRUN_SHIFT)) {365368 /* Master read other than start */
+12-24
drivers/i2c/busses/i2c-tegra.c
···996996 do {997997 u32 status = i2c_readl(i2c_dev, I2C_INT_STATUS);998998999999- if (status)999999+ if (status) {10001000 tegra_i2c_isr(i2c_dev->irq, i2c_dev);1001100110021002- if (completion_done(complete)) {10031003- s64 delta = ktime_ms_delta(ktimeout, ktime);10021002+ if (completion_done(complete)) {10031003+ s64 delta = ktime_ms_delta(ktimeout, ktime);1004100410051005- return msecs_to_jiffies(delta) ?: 1;10051005+ return msecs_to_jiffies(delta) ?: 1;10061006+ }10061007 }1007100810081009 ktime = ktime_get();···10301029 disable_irq(i2c_dev->irq);1031103010321031 /*10331033- * Under some rare circumstances (like running KASAN +10341034- * NFS root) CPU, which handles interrupt, may stuck in10351035- * uninterruptible state for a significant time. In this10361036- * case we will get timeout if I2C transfer is running on10371037- * a sibling CPU, despite of IRQ being raised.10381038- *10391039- * In order to handle this rare condition, the IRQ status10401040- * needs to be checked after timeout.10321032+ * There is a chance that completion may happen after IRQ10331033+ * synchronization, which is done by disable_irq().10411034 */10421042- if (ret == 0)10431043- ret = tegra_i2c_poll_completion_timeout(i2c_dev,10441044- complete, 0);10351035+ if (ret == 0 && completion_done(complete)) {10361036+ dev_warn(i2c_dev->dev,10371037+ "completion done after timeout\n");10381038+ ret = 1;10391039+ }10451040 }1046104110471042 return ret;···12151218 if (dma) {12161219 time_left = tegra_i2c_wait_completion_timeout(12171220 i2c_dev, &i2c_dev->dma_complete, xfer_time);12181218-12191219- /*12201220- * Synchronize DMA first, since dmaengine_terminate_sync()12211221- * performs synchronization after the transfer's termination12221222- * and we want to get a completion if transfer succeeded.12231223- */12241224- dmaengine_synchronize(i2c_dev->msg_read ?12251225- i2c_dev->rx_dma_chan :12261226- i2c_dev->tx_dma_chan);1227122112281222 dmaengine_terminate_sync(i2c_dev->msg_read ?12291223 i2c_dev->rx_dma_chan :
···360360 * uverbs_uobject_fd_release(), and the caller is expected to ensure361361 * that release is never done while a call to lookup is possible.362362 */363363- if (f->f_op != fd_type->fops) {363363+ if (f->f_op != fd_type->fops || uobject->ufile != ufile) {364364 fput(f);365365 return ERR_PTR(-EBADF);366366 }···474474 filp = anon_inode_getfile(fd_type->name, fd_type->fops, NULL,475475 fd_type->flags);476476 if (IS_ERR(filp)) {477477+ uverbs_uobject_put(uobj);477478 uobj = ERR_CAST(filp);478478- goto err_uobj;479479+ goto err_fd;479480 }480481 uobj->object = filp;481482482483 uobj->id = new_fd;483484 return uobj;484485485485-err_uobj:486486- uverbs_uobject_put(uobj);487486err_fd:488487 put_unused_fd(new_fd);489488 return uobj;···678679 enum rdma_lookup_mode mode)679680{680681 assert_uverbs_usecnt(uobj, mode);681681- uobj->uapi_object->type_class->lookup_put(uobj, mode);682682 /*683683 * In order to unlock an object, either decrease its usecnt for684684 * read access or zero it in case of exclusive access. See···694696 break;695697 }696698699699+ uobj->uapi_object->type_class->lookup_put(uobj, mode);697700 /* Pairs with the kref obtained by type->lookup_get */698701 uverbs_uobject_put(uobj);699702}
+4
drivers/infiniband/core/uverbs_main.c
···820820 ret = mmget_not_zero(mm);821821 if (!ret) {822822 list_del_init(&priv->list);823823+ if (priv->entry) {824824+ rdma_user_mmap_entry_put(priv->entry);825825+ priv->entry = NULL;826826+ }823827 mm = NULL;824828 continue;825829 }
···14991499 int i;1500150015011501 for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) {15021502+ union ib_flow_spec ib_spec = {};15021503 int ret;15031503- union ib_flow_spec ib_spec;15041504+15041505 switch (pdefault_rules->rules_create_list[i]) {15051506 case 0:15061507 /* no rule */
···814814 qcom_iommu->dev = dev;815815816816 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);817817- if (res)817817+ if (res) {818818 qcom_iommu->local_base = devm_ioremap_resource(dev, res);819819+ if (IS_ERR(qcom_iommu->local_base))820820+ return PTR_ERR(qcom_iommu->local_base);821821+ }819822820823 qcom_iommu->iface_clk = devm_clk_get(dev, "iface");821824 if (IS_ERR(qcom_iommu->iface_clk)) {
+4-2
drivers/md/dm-mpath.c
···585585586586 /* Do we need to select a new pgpath? */587587 pgpath = READ_ONCE(m->current_pgpath);588588- queue_io = test_bit(MPATHF_QUEUE_IO, &m->flags);589589- if (!pgpath || !queue_io)588588+ if (!pgpath || !test_bit(MPATHF_QUEUE_IO, &m->flags))590589 pgpath = choose_pgpath(m, bio->bi_iter.bi_size);590590+591591+ /* MPATHF_QUEUE_IO might have been cleared by choose_pgpath. */592592+ queue_io = test_bit(MPATHF_QUEUE_IO, &m->flags);591593592594 if ((pgpath && queue_io) ||593595 (!pgpath && test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags))) {
+1-1
drivers/md/dm-verity-fec.c
···435435 fio->level++;436436437437 if (type == DM_VERITY_BLOCK_TYPE_METADATA)438438- block += v->data_blocks;438438+ block = block - v->hash_start + v->data_blocks;439439440440 /*441441 * For RS(M, N), the continuous FEC data is divided into blocks of N
···878878 * Issued High Priority Interrupt, and check for card status879879 * until out-of prg-state.880880 */881881-int mmc_interrupt_hpi(struct mmc_card *card)881881+static int mmc_interrupt_hpi(struct mmc_card *card)882882{883883 int err;884884 u32 status;
+10-11
drivers/mmc/host/cqhci.c
···55#include <linux/delay.h>66#include <linux/highmem.h>77#include <linux/io.h>88+#include <linux/iopoll.h>89#include <linux/module.h>910#include <linux/dma-mapping.h>1011#include <linux/slab.h>···350349/* CQHCI is idle and should halt immediately, so set a small timeout */351350#define CQHCI_OFF_TIMEOUT 100352351352352+static u32 cqhci_read_ctl(struct cqhci_host *cq_host)353353+{354354+ return cqhci_readl(cq_host, CQHCI_CTL);355355+}356356+353357static void cqhci_off(struct mmc_host *mmc)354358{355359 struct cqhci_host *cq_host = mmc->cqe_private;356356- ktime_t timeout;357357- bool timed_out;358360 u32 reg;361361+ int err;359362360363 if (!cq_host->enabled || !mmc->cqe_on || cq_host->recovery_halt)361364 return;···369364370365 cqhci_writel(cq_host, CQHCI_HALT, CQHCI_CTL);371366372372- timeout = ktime_add_us(ktime_get(), CQHCI_OFF_TIMEOUT);373373- while (1) {374374- timed_out = ktime_compare(ktime_get(), timeout) > 0;375375- reg = cqhci_readl(cq_host, CQHCI_CTL);376376- if ((reg & CQHCI_HALT) || timed_out)377377- break;378378- }379379-380380- if (timed_out)367367+ err = readx_poll_timeout(cqhci_read_ctl, cq_host, reg,368368+ reg & CQHCI_HALT, 0, CQHCI_OFF_TIMEOUT);369369+ if (err < 0)381370 pr_err("%s: cqhci: CQE stuck on\n", mmc_hostname(mmc));382371 else383372 pr_debug("%s: cqhci: CQE off\n", mmc_hostname(mmc));
···235235{236236 /* Wait for 5ms after set 1.8V signal enable bit */237237 usleep_range(5000, 5500);238238+239239+ /*240240+ * For some reason the controller's Host Control2 register reports241241+ * the bit representing 1.8V signaling as 0 when read after it was242242+ * written as 1. Subsequent read reports 1.243243+ *244244+ * Since this may cause some issues, do an empty read of the Host245245+ * Control2 register here to circumvent this.246246+ */247247+ sdhci_readw(host, SDHCI_HOST_CONTROL2);238248}239249240250static const struct sdhci_ops sdhci_xenon_ops = {
···37323732 }37333733 qla2x00_wait_for_hba_ready(base_vha);3734373437353735+ /*37363736+ * if UNLOADING flag is already set, then continue unload,37373737+ * where it was set first.37383738+ */37393739+ if (test_and_set_bit(UNLOADING, &base_vha->dpc_flags))37403740+ return;37413741+37353742 if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) ||37363743 IS_QLA28XX(ha)) {37373744 if (ha->flags.fw_started)···37563749 }3757375037583751 qla2x00_wait_for_sess_deletion(base_vha);37593759-37603760- /*37613761- * if UNLOAD flag is already set, then continue unload,37623762- * where it was set first.37633763- */37643764- if (test_bit(UNLOADING, &base_vha->dpc_flags))37653765- return;37663766-37673767- set_bit(UNLOADING, &base_vha->dpc_flags);3768375237693753 qla_nvme_delete(base_vha);37703754···48614863{48624864 struct qla_work_evt *e;48634865 uint8_t bail;48664866+48674867+ if (test_bit(UNLOADING, &vha->dpc_flags))48684868+ return NULL;4864486948654870 QLA_VHA_MARK_BUSY(vha, bail);48664871 if (bail)···66296628 struct pci_dev *pdev = ha->pdev;66306629 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);6631663066326632- /*66336633- * if UNLOAD flag is already set, then continue unload,66346634- * where it was set first.66356635- */66366636- if (test_bit(UNLOADING, &base_vha->dpc_flags))66376637- return;66386638-66396631 ql_log(ql_log_warn, base_vha, 0x015b,66406632 "Disabling adapter.\n");66416633···66396645 return;66406646 }6641664766426642- qla2x00_wait_for_sess_deletion(base_vha);66486648+ /*66496649+ * if UNLOADING flag is already set, then continue unload,66506650+ * where it was set first.66516651+ */66526652+ if (test_and_set_bit(UNLOADING, &base_vha->dpc_flags))66536653+ return;6643665466446644- set_bit(UNLOADING, &base_vha->dpc_flags);66556655+ qla2x00_wait_for_sess_deletion(base_vha);6645665666466657 qla2x00_delete_all_vps(ha, base_vha);66476658
···88888989config HVC_RISCV_SBI9090 bool "RISC-V SBI console support"9191- depends on RISCV_SBI9191+ depends on RISCV_SBI_V019292 select HVC_DRIVER9393 help9494 This enables support for console output via RISC-V SBI calls, which
+1-1
drivers/tty/serial/Kconfig
···86868787config SERIAL_EARLYCON_RISCV_SBI8888 bool "Early console using RISC-V SBI"8989- depends on RISCV_SBI8989+ depends on RISCV_SBI_V019090 select SERIAL_CORE9191 select SERIAL_CORE_CONSOLE9292 select SERIAL_EARLYCON
···916916 path = btrfs_alloc_path();917917 if (!path) {918918 ret = -ENOMEM;919919- goto out;919919+ goto out_put_group;920920 }921921922922 /*···954954 ret = btrfs_orphan_add(trans, BTRFS_I(inode));955955 if (ret) {956956 btrfs_add_delayed_iput(inode);957957- goto out;957957+ goto out_put_group;958958 }959959 clear_nlink(inode);960960 /* One for the block groups ref */···977977978978 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);979979 if (ret < 0)980980- goto out;980980+ goto out_put_group;981981 if (ret > 0)982982 btrfs_release_path(path);983983 if (ret == 0) {984984 ret = btrfs_del_item(trans, tree_root, path);985985 if (ret)986986- goto out;986986+ goto out_put_group;987987 btrfs_release_path(path);988988 }989989···1102110211031103 ret = remove_block_group_free_space(trans, block_group);11041104 if (ret)11051105- goto out;11051105+ goto out_put_group;1106110611071107- btrfs_put_block_group(block_group);11071107+ /* Once for the block groups rbtree */11081108 btrfs_put_block_group(block_group);1109110911101110 ret = btrfs_search_slot(trans, root, &key, path, -1, 1);···11271127 /* once for the tree */11281128 free_extent_map(em);11291129 }11301130+11311131+out_put_group:11321132+ /* Once for the lookup reference */11331133+ btrfs_put_block_group(block_group);11301134out:11311135 if (remove_rsv)11321136 btrfs_delayed_refs_rsv_release(fs_info, 1);···12921288 if (ret)12931289 goto err;12941290 mutex_unlock(&fs_info->unused_bg_unpin_mutex);12911291+ if (prev_trans)12921292+ btrfs_put_transaction(prev_trans);1295129312961294 return true;1297129512981296err:12991297 mutex_unlock(&fs_info->unused_bg_unpin_mutex);12981298+ if (prev_trans)12991299+ btrfs_put_transaction(prev_trans);13001300 btrfs_dec_block_group_ro(bg);13011301 return false;13021302}
···662662 }663663664664got_it:665665- btrfs_record_root_in_trans(h, root);666666-667665 if (!current->journal_info)668666 current->journal_info = h;667667+668668+ /*669669+ * btrfs_record_root_in_trans() needs to alloc new extents, and may670670+ * call btrfs_join_transaction() while we're also starting a671671+ * transaction.672672+ *673673+ * Thus it need to be called after current->journal_info initialized,674674+ * or we can deadlock.675675+ */676676+ btrfs_record_root_in_trans(h, root);677677+669678 return h;670679671680join_fail:
+40-3
fs/btrfs/tree-log.c
···42264226 const u64 ino = btrfs_ino(inode);42274227 struct btrfs_path *dst_path = NULL;42284228 bool dropped_extents = false;42294229+ u64 truncate_offset = i_size;42304230+ struct extent_buffer *leaf;42314231+ int slot;42294232 int ins_nr = 0;42304233 int start_slot;42314234 int ret;···42434240 if (ret < 0)42444241 goto out;4245424242434243+ /*42444244+ * We must check if there is a prealloc extent that starts before the42454245+ * i_size and crosses the i_size boundary. This is to ensure later we42464246+ * truncate down to the end of that extent and not to the i_size, as42474247+ * otherwise we end up losing part of the prealloc extent after a log42484248+ * replay and with an implicit hole if there is another prealloc extent42494249+ * that starts at an offset beyond i_size.42504250+ */42514251+ ret = btrfs_previous_item(root, path, ino, BTRFS_EXTENT_DATA_KEY);42524252+ if (ret < 0)42534253+ goto out;42544254+42554255+ if (ret == 0) {42564256+ struct btrfs_file_extent_item *ei;42574257+42584258+ leaf = path->nodes[0];42594259+ slot = path->slots[0];42604260+ ei = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item);42614261+42624262+ if (btrfs_file_extent_type(leaf, ei) ==42634263+ BTRFS_FILE_EXTENT_PREALLOC) {42644264+ u64 extent_end;42654265+42664266+ btrfs_item_key_to_cpu(leaf, &key, slot);42674267+ extent_end = key.offset +42684268+ btrfs_file_extent_num_bytes(leaf, ei);42694269+42704270+ if (extent_end > i_size)42714271+ truncate_offset = extent_end;42724272+ }42734273+ } else {42744274+ ret = 0;42754275+ }42764276+42464277 while (true) {42474247- struct extent_buffer *leaf = path->nodes[0];42484248- int slot = path->slots[0];42784278+ leaf = path->nodes[0];42794279+ slot = path->slots[0];4249428042504281 if (slot >= btrfs_header_nritems(leaf)) {42514282 if (ins_nr > 0) {···43174280 ret = btrfs_truncate_inode_items(trans,43184281 root->log_root,43194282 &inode->vfs_inode,43204320- i_size,42834283+ truncate_offset,43214284 BTRFS_EXTENT_DATA_KEY);43224285 } while (ret == -EAGAIN);43234286 if (ret)
+31-27
fs/io_uring.c
···524524 REQ_F_OVERFLOW_BIT,525525 REQ_F_POLLED_BIT,526526 REQ_F_BUFFER_SELECTED_BIT,527527+ REQ_F_NO_FILE_TABLE_BIT,527528528529 /* not a real bit, just to check we're not overflowing the space */529530 __REQ_F_LAST_BIT,···578577 REQ_F_POLLED = BIT(REQ_F_POLLED_BIT),579578 /* buffer already selected */580579 REQ_F_BUFFER_SELECTED = BIT(REQ_F_BUFFER_SELECTED_BIT),580580+ /* doesn't need file table for this request */581581+ REQ_F_NO_FILE_TABLE = BIT(REQ_F_NO_FILE_TABLE_BIT),581582};582583583584struct async_poll {···802799 .needs_file = 1,803800 .fd_non_neg = 1,804801 .needs_fs = 1,802802+ .file_table = 1,805803 },806804 [IORING_OP_READ] = {807805 .needs_mm = 1,···12951291 struct io_kiocb *req;1296129212971293 req = ctx->fallback_req;12981298- if (!test_and_set_bit_lock(0, (unsigned long *) ctx->fallback_req))12941294+ if (!test_and_set_bit_lock(0, (unsigned long *) &ctx->fallback_req))12991295 return req;1300129613011297 return NULL;···13821378 if (likely(!io_is_fallback_req(req)))13831379 kmem_cache_free(req_cachep, req);13841380 else13851385- clear_bit_unlock(0, (unsigned long *) req->ctx->fallback_req);13811381+ clear_bit_unlock(0, (unsigned long *) &req->ctx->fallback_req);13861382}1387138313881384struct req_batch {···20382034 * any file. For now, just ensure that anything potentially problematic is done20392035 * inline.20402036 */20412041-static bool io_file_supports_async(struct file *file)20372037+static bool io_file_supports_async(struct file *file, int rw)20422038{20432039 umode_t mode = file_inode(file)->i_mode;20442040···20472043 if (S_ISREG(mode) && file->f_op != &io_uring_fops)20482044 return true;2049204520502050- return false;20462046+ if (!(file->f_mode & FMODE_NOWAIT))20472047+ return false;20482048+20492049+ if (rw == READ)20502050+ return file->f_op->read_iter != NULL;20512051+20522052+ return file->f_op->write_iter != NULL;20512053}2052205420532055static int io_prep_rw(struct io_kiocb *req, const struct io_uring_sqe *sqe,···25812571 * If the file doesn't support async, mark it as REQ_F_MUST_PUNT so25822572 * we know to async punt it even if it was opened O_NONBLOCK25832573 */25842584- if (force_nonblock && !io_file_supports_async(req->file))25742574+ if (force_nonblock && !io_file_supports_async(req->file, READ))25852575 goto copy_iov;2586257625872577 iov_count = iov_iter_count(&iter);···26042594 if (ret)26052595 goto out_free;26062596 /* any defer here is final, must blocking retry */26072607- if (!(req->flags & REQ_F_NOWAIT))25972597+ if (!(req->flags & REQ_F_NOWAIT) &&25982598+ !file_can_poll(req->file))26082599 req->flags |= REQ_F_MUST_PUNT;26092600 return -EAGAIN;26102601 }···26732662 * If the file doesn't support async, mark it as REQ_F_MUST_PUNT so26742663 * we know to async punt it even if it was opened O_NONBLOCK26752664 */26762676- if (force_nonblock && !io_file_supports_async(req->file))26652665+ if (force_nonblock && !io_file_supports_async(req->file, WRITE))26772666 goto copy_iov;2678266726792668 /* file path doesn't support NOWAIT for non-direct_IO */···27272716 if (ret)27282717 goto out_free;27292718 /* any defer here is final, must blocking retry */27302730- req->flags |= REQ_F_MUST_PUNT;27192719+ if (!file_can_poll(req->file))27202720+ req->flags |= REQ_F_MUST_PUNT;27312721 return -EAGAIN;27322722 }27332723 }···27682756 return 0;27692757}2770275827712771-static bool io_splice_punt(struct file *file)27722772-{27732773- if (get_pipe_info(file))27742774- return false;27752775- if (!io_file_supports_async(file))27762776- return true;27772777- return !(file->f_flags & O_NONBLOCK);27782778-}27792779-27802759static int io_splice(struct io_kiocb *req, bool force_nonblock)27812760{27822761 struct io_splice *sp = &req->splice;···27772774 loff_t *poff_in, *poff_out;27782775 long ret;2779277627802780- if (force_nonblock) {27812781- if (io_splice_punt(in) || io_splice_punt(out))27822782- return -EAGAIN;27832783- flags |= SPLICE_F_NONBLOCK;27842784- }27772777+ if (force_nonblock)27782778+ return -EAGAIN;2785277927862780 poff_in = (sp->off_in == -1) ? NULL : &sp->off_in;27872781 poff_out = (sp->off_out == -1) ? NULL : &sp->off_out;···33553355 struct kstat stat;33563356 int ret;3357335733583358- if (force_nonblock)33583358+ if (force_nonblock) {33593359+ /* only need file table for an actual valid fd */33603360+ if (ctx->dfd == -1 || ctx->dfd == AT_FDCWD)33613361+ req->flags |= REQ_F_NO_FILE_TABLE;33593362 return -EAGAIN;33633363+ }3360336433613365 if (vfs_stat_set_lookup_flags(&lookup_flags, ctx->how.flags))33623366 return -EINVAL;···35063502 if (io_req_cancelled(req))35073503 return;35083504 __io_sync_file_range(req);35093509- io_put_req(req); /* put submission ref */35053505+ io_steal_work(req, workptr);35103506}3511350735123508static int io_sync_file_range(struct io_kiocb *req, bool force_nonblock)···50195015 int ret;5020501650215017 /* Still need defer if there is pending req in defer list. */50225022- if (!req_need_defer(req) && list_empty(&ctx->defer_list))50185018+ if (!req_need_defer(req) && list_empty_careful(&ctx->defer_list))50235019 return 0;5024502050255021 if (!req->io && io_alloc_async_ctx(req))···54335429 int ret = -EBADF;54345430 struct io_ring_ctx *ctx = req->ctx;5435543154365436- if (req->work.files)54325432+ if (req->work.files || (req->flags & REQ_F_NO_FILE_TABLE))54375433 return 0;54385434 if (!ctx->ring_file)54395435 return -EBADF;···73317327 * it could cause shutdown to hang.73327328 */73337329 while (ctx->sqo_thread && !wq_has_sleeper(&ctx->sqo_wait))73347334- cpu_relax();73307330+ cond_resched();7335733173367332 io_kill_timeouts(ctx);73377333 io_poll_remove_all(ctx);
+8
fs/ioctl.c
···5555static int ioctl_fibmap(struct file *filp, int __user *p)5656{5757 struct inode *inode = file_inode(filp);5858+ struct super_block *sb = inode->i_sb;5859 int error, ur_block;5960 sector_t block;6061···71707271 block = ur_block;7372 error = bmap(inode, &block);7373+7474+ if (block > INT_MAX) {7575+ error = -ERANGE;7676+ pr_warn_ratelimited("[%s/%d] FS: %s File: %pD4 would truncate fibmap result\n",7777+ current->comm, task_pid_nr(current),7878+ sb->s_id, filp);7979+ }74807581 if (error)7682 ur_block = 0;
···329329330330/**331331 * struct dma_buf_attach_ops - importer operations for an attachment332332- * @move_notify: [optional] notification that the DMA-buf is moving333332 *334333 * Attachment operations implemented by the importer.335334 */336335struct dma_buf_attach_ops {337336 /**338338- * @move_notify337337+ * @move_notify: [optional] notification that the DMA-buf is moving339338 *340339 * If this callback is provided the framework can avoid pinning the341340 * backing store while mappings exists.
+6-6
include/linux/dmaengine.h
···8383/**8484 * Interleaved Transfer Request8585 * ----------------------------8686- * A chunk is collection of contiguous bytes to be transfered.8686+ * A chunk is collection of contiguous bytes to be transferred.8787 * The gap(in bytes) between two chunks is called inter-chunk-gap(ICG).8888- * ICGs may or maynot change between chunks.8888+ * ICGs may or may not change between chunks.8989 * A FRAME is the smallest series of contiguous {chunk,icg} pairs,9090 * that when repeated an integral number of times, specifies the transfer.9191 * A transfer template is specification of a Frame, the number of times···341341 * @chan: driver channel device342342 * @device: sysfs device343343 * @dev_id: parent dma_device dev_id344344- * @idr_ref: reference count to gate release of dma_device dev_id345344 */346345struct dma_chan_dev {347346 struct dma_chan *chan;348347 struct device device;349348 int dev_id;350350- atomic_t *idr_ref;351349};352350353351/**···833835 int dev_id;834836 struct device *dev;835837 struct module *owner;838838+ struct ida chan_ida;839839+ struct mutex chan_mutex; /* to protect chan_ida */836840837841 u32 src_addr_widths;838842 u32 dst_addr_widths;···10691069 * dmaengine_synchronize() needs to be called before it is safe to free10701070 * any memory that is accessed by previously submitted descriptors or before10711071 * freeing any resources accessed from within the completion callback of any10721072- * perviously submitted descriptors.10721072+ * previously submitted descriptors.10731073 *10741074 * This function can be called from atomic context as well as from within a10751075 * complete callback of a descriptor submitted on the same channel.···10911091 *10921092 * Synchronizes to the DMA channel termination to the current context. When this10931093 * function returns it is guaranteed that all transfers for previously issued10941094- * descriptors have stopped and and it is safe to free the memory assoicated10941094+ * descriptors have stopped and it is safe to free the memory associated10951095 * with them. Furthermore it is guaranteed that all complete callback functions10961096 * for a previously submitted descriptor have finished running and it is safe to10971097 * free resources accessed from within the complete callbacks.
···7171#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)7272 struct dentry *cl_debugfs; /* debugfs directory */7373#endif7474- struct rpc_xprt_iter cl_xpi;7474+ /* cl_work is only needed after cl_xpi is no longer used,7575+ * and that are of similar size7676+ */7777+ union {7878+ struct rpc_xprt_iter cl_xpi;7979+ struct work_struct cl_work;8080+ };7581 const struct cred *cl_cred;7682};7783···242236 (task->tk_msg.rpc_proc->p_decode != NULL);243237}244238239239+static inline void rpc_task_close_connection(struct rpc_task *task)240240+{241241+ if (task->tk_xprt)242242+ xprt_force_disconnect(task->tk_xprt);243243+}245244#endif /* _LINUX_SUNRPC_CLNT_H */
···39394040#define DMA_BUF_BASE 'b'4141#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)4242+4343+/* 32/64bitness of this uapi was botched in android, there's no difference4444+ * between them in actual uapi, they're just different numbers.4545+ */4246#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)4747+#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)4848+#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)43494450#endif
+2-2
include/uapi/linux/hyperv.h
···119119120120struct hv_fcopy_hdr {121121 __u32 operation;122122- uuid_le service_id0; /* currently unused */123123- uuid_le service_id1; /* currently unused */122122+ __u8 service_id0[16]; /* currently unused */123123+ __u8 service_id1[16]; /* currently unused */124124} __attribute__((packed));125125126126#define OVER_WRITE 0x1
···1687168716881688 case USB_ID(0x0d8c, 0x0316): /* Hegel HD12 DSD */16891689 case USB_ID(0x10cb, 0x0103): /* The Bit Opus #3; with fp->dsd_raw */16901690- case USB_ID(0x16b0, 0x06b2): /* NuPrime DAC-10 */16901690+ case USB_ID(0x16d0, 0x06b2): /* NuPrime DAC-10 */16911691 case USB_ID(0x16d0, 0x09dd): /* Encore mDSD */16921692 case USB_ID(0x16d0, 0x0733): /* Furutech ADL Stratos */16931693 case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */
···1515 exit_unsupported1616fi17171818-if [ ! -f set_ftrace_filter ]; then1919- echo "set_ftrace_filter not found? Is function tracer not set?"2020- exit_unsupported2121-fi1818+check_filter_file set_ftrace_filter22192320do_function_fork=12421
···1616 exit_unsupported1717fi18181919-if [ ! -f set_ftrace_filter ]; then2020- echo "set_ftrace_filter not found? Is function tracer not set?"2121- exit_unsupported2222-fi1919+check_filter_file set_ftrace_filter23202421do_function_fork=12522
···1111#12121313# The triggers are set within the set_ftrace_filter file1414-if [ ! -f set_ftrace_filter ]; then1515- echo "set_ftrace_filter not found? Is dynamic ftrace not set?"1616- exit_unsupported1717-fi1414+check_filter_file set_ftrace_filter18151916do_reset() {2017 reset_ftrace_filter
···1010#11111212# The triggers are set within the set_ftrace_filter file1313-if [ ! -f set_ftrace_filter ]; then1414- echo "set_ftrace_filter not found? Is dynamic ftrace not set?"1515- exit_unsupported1616-fi1313+check_filter_file set_ftrace_filter17141815fail() { # mesg1916 echo $1
···1111#12121313# The triggers are set within the set_ftrace_filter file1414-if [ ! -f set_ftrace_filter ]; then1515- echo "set_ftrace_filter not found? Is dynamic ftrace not set?"1616- exit_unsupported1717-fi1414+check_filter_file set_ftrace_filter18151916fail() { # mesg2017 echo $1
+6
tools/testing/selftests/ftrace/test.d/functions
···11+check_filter_file() { # check filter file introduced by dynamic ftrace22+ if [ ! -f "$1" ]; then33+ echo "$1 not found? Is dynamic ftrace not set?"44+ exit_unsupported55+ fi66+}1728clear_trace() { # reset trace output39 echo > trace