You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge 5.10.99 into android12-5.10-lts
Changes in 5.10.99 selinux: fix double free of cond_list on error paths audit: improve audit queue handling when "audit=1" on cmdline ASoC: ops: Reject out of bounds values in snd_soc_put_volsw() ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx() ASoC: ops: Reject out of bounds values in snd_soc_put_xr_sx() ALSA: usb-audio: Correct quirk for VF0770 ALSA: hda: Fix UAF of leds class devs at unbinding ALSA: hda: realtek: Fix race at concurrent COEF updates ALSA: hda/realtek: Add quirk for ASUS GU603 ALSA: hda/realtek: Add missing fixup-model entry for Gigabyte X570 ALC1220 quirks ALSA: hda/realtek: Fix silent output on Gigabyte X570S Aorus Master (newer chipset) ALSA: hda/realtek: Fix silent output on Gigabyte X570 Aorus Xtreme after reboot from Windows btrfs: fix deadlock between quota disable and qgroup rescan worker drm/nouveau: fix off by one in BIOS boundary checking drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018 15" Apple Retina panels nvme-fabrics: fix state check in nvmf_ctlr_matches_baseopts() mm/debug_vm_pgtable: remove pte entry from the page table mm/pgtable: define pte_index so that preprocessor could recognize it mm/kmemleak: avoid scanning potential huge holes block: bio-integrity: Advance seed correctly for larger interval sizes dma-buf: heaps: Fix potential spectre v1 gadget IB/hfi1: Fix AIP early init panic Revert "ASoC: mediatek: Check for error clk pointer" memcg: charge fs_context and legacy_fs_context RDMA/cma: Use correct address when leaving multicast group RDMA/ucma: Protect mc during concurrent multicast leaves IB/rdmavt: Validate remote_addr during loopback atomic tests RDMA/siw: Fix broken RDMA Read Fence/Resume logic. RDMA/mlx4: Don't continue event handler after memory allocation failure iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping() iommu/amd: Fix loop timeout issue in iommu_ga_log_enable() spi: bcm-qspi: check for valid cs before applying chip select spi: mediatek: Avoid NULL pointer crash in interrupt spi: meson-spicc: add IRQ check in meson_spicc_probe spi: uniphier: fix reference count leak in uniphier_spi_probe() net: ieee802154: hwsim: Ensure proper channel selection at probe time net: ieee802154: mcr20a: Fix lifs/sifs periods net: ieee802154: ca8210: Stop leaking skb's net: ieee802154: Return meaningful error codes from the netlink helpers net: macsec: Fix offload support for NETDEV_UNREGISTER event net: macsec: Verify that send_sci is on when setting Tx sci explicitly net: stmmac: dump gmac4 DMA registers correctly net: stmmac: ensure PTP time register reads are consistent drm/i915/overlay: Prevent divide by zero bugs in scaling ASoC: fsl: Add missing error handling in pcm030_fabric_probe ASoC: xilinx: xlnx_formatter_pcm: Make buffer bytes multiple of period bytes ASoC: cpcap: Check for NULL pointer after calling of_get_child_by_name ASoC: max9759: fix underflow in speaker_gain_control_put() pinctrl: intel: Fix a glitch when updating IRQ flags on a preconfigured line pinctrl: intel: fix unexpected interrupt pinctrl: bcm2835: Fix a few error paths scsi: bnx2fc: Make bnx2fc_recv_frame() mp safe nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client. gve: fix the wrong AdminQ buffer queue index check bpf: Use VM_MAP instead of VM_ALLOC for ringbuf selftests/exec: Remove pipe from TEST_GEN_FILES selftests: futex: Use variable MAKE instead of make tools/resolve_btfids: Do not print any commands when building silently rtc: cmos: Evaluate century appropriate Revert "fbcon: Disable accelerated scrolling" fbcon: Add option to enable legacy hardware acceleration perf stat: Fix display of grouped aliased events perf/x86/intel/pt: Fix crash with stop filters in single-range mode x86/perf: Default set FREEZE_ON_SMI for all EDAC/altera: Fix deferred probing EDAC/xgene: Fix deferred probing ext4: prevent used blocks from being allocated during fast commit replay ext4: modify the logic of ext4_mb_new_blocks_simple ext4: fix error handling in ext4_restore_inline_data() ext4: fix error handling in ext4_fc_record_modified_inode() ext4: fix incorrect type issue during replay_del_range net: dsa: mt7530: make NET_DSA_MT7530 select MEDIATEK_GE_PHY cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning selftests: nft_concat_range: add test for reload with no element add/del Linux 5.10.99 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Idc1d987b935d86d2a201e0b4a8db801c08c71b98
This commit is contained in:
@@ -273,24 +273,6 @@ Contact: Daniel Vetter, Noralf Tronnes
|
||||
|
||||
Level: Advanced
|
||||
|
||||
Garbage collect fbdev scrolling acceleration
|
||||
--------------------------------------------
|
||||
|
||||
Scroll acceleration is disabled in fbcon by hard-wiring p->scrollmode =
|
||||
SCROLL_REDRAW. There's a ton of code this will allow us to remove:
|
||||
- lots of code in fbcon.c
|
||||
- a bunch of the hooks in fbcon_ops, maybe the remaining hooks could be called
|
||||
directly instead of the function table (with a switch on p->rotate)
|
||||
- fb_copyarea is unused after this, and can be deleted from all drivers
|
||||
|
||||
Note that not all acceleration code can be deleted, since clearing and cursor
|
||||
support is still accelerated, which might be good candidates for further
|
||||
deletion projects.
|
||||
|
||||
Contact: Daniel Vetter
|
||||
|
||||
Level: Intermediate
|
||||
|
||||
idr_init_base()
|
||||
---------------
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 98
|
||||
SUBLEVEL = 99
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -4353,6 +4353,19 @@ static __initconst const struct x86_pmu intel_pmu = {
|
||||
.lbr_read = intel_pmu_lbr_read_64,
|
||||
.lbr_save = intel_pmu_lbr_save,
|
||||
.lbr_restore = intel_pmu_lbr_restore,
|
||||
|
||||
/*
|
||||
* SMM has access to all 4 rings and while traditionally SMM code only
|
||||
* ran in CPL0, 2021-era firmware is starting to make use of CPL3 in SMM.
|
||||
*
|
||||
* Since the EVENTSEL.{USR,OS} CPL filtering makes no distinction
|
||||
* between SMM or not, this results in what should be pure userspace
|
||||
* counters including SMM data.
|
||||
*
|
||||
* This is a clear privilege issue, therefore globally disable
|
||||
* counting SMM by default.
|
||||
*/
|
||||
.attr_freeze_on_smi = 1,
|
||||
};
|
||||
|
||||
static __init void intel_clovertown_quirk(void)
|
||||
|
||||
@@ -897,8 +897,9 @@ static void pt_handle_status(struct pt *pt)
|
||||
* means we are already losing data; need to let the decoder
|
||||
* know.
|
||||
*/
|
||||
if (!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries) ||
|
||||
buf->output_off == pt_buffer_region_size(buf)) {
|
||||
if (!buf->single &&
|
||||
(!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries) ||
|
||||
buf->output_off == pt_buffer_region_size(buf))) {
|
||||
perf_aux_output_flag(&pt->handle,
|
||||
PERF_AUX_FLAG_TRUNCATED);
|
||||
advance++;
|
||||
|
||||
@@ -384,7 +384,7 @@ void bio_integrity_advance(struct bio *bio, unsigned int bytes_done)
|
||||
struct blk_integrity *bi = blk_get_integrity(bio->bi_disk);
|
||||
unsigned bytes = bio_integrity_bytes(bi, bytes_done >> 9);
|
||||
|
||||
bip->bip_iter.bi_sector += bytes_done >> 9;
|
||||
bip->bip_iter.bi_sector += bio_integrity_intervals(bi, bytes_done >> 9);
|
||||
bvec_iter_advance(bip->bip_vec, &bip->bip_iter, bytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/xarray.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/dma-heap.h>
|
||||
@@ -172,6 +173,7 @@ static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
|
||||
if (nr >= ARRAY_SIZE(dma_heap_ioctl_cmds))
|
||||
return -EINVAL;
|
||||
|
||||
nr = array_index_nospec(nr, ARRAY_SIZE(dma_heap_ioctl_cmds));
|
||||
/* Get the kernel ioctl cmd that matches */
|
||||
kcmd = dma_heap_ioctl_cmds[nr];
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ static int altr_sdram_probe(struct platform_device *pdev)
|
||||
if (irq < 0) {
|
||||
edac_printk(KERN_ERR, EDAC_MC,
|
||||
"No irq %d in DT\n", irq);
|
||||
return -ENODEV;
|
||||
return irq;
|
||||
}
|
||||
|
||||
/* Arria10 has a 2nd IRQ */
|
||||
|
||||
@@ -1919,7 +1919,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
|
||||
irq = platform_get_irq(pdev, i);
|
||||
if (irq < 0) {
|
||||
dev_err(&pdev->dev, "No IRQ resource\n");
|
||||
rc = -EINVAL;
|
||||
rc = irq;
|
||||
goto out_err;
|
||||
}
|
||||
rc = devm_request_irq(&pdev->dev, irq,
|
||||
|
||||
@@ -3587,6 +3587,26 @@ static bool retrieve_link_cap(struct dc_link *link)
|
||||
dp_hw_fw_revision.ieee_fw_rev,
|
||||
sizeof(dp_hw_fw_revision.ieee_fw_rev));
|
||||
|
||||
/* Quirk for Apple MBP 2018 15" Retina panels: wrong DP_MAX_LINK_RATE */
|
||||
{
|
||||
uint8_t str_mbp_2018[] = { 101, 68, 21, 103, 98, 97 };
|
||||
uint8_t fwrev_mbp_2018[] = { 7, 4 };
|
||||
uint8_t fwrev_mbp_2018_vega[] = { 8, 4 };
|
||||
|
||||
/* We also check for the firmware revision as 16,1 models have an
|
||||
* identical device id and are incorrectly quirked otherwise.
|
||||
*/
|
||||
if ((link->dpcd_caps.sink_dev_id == 0x0010fa) &&
|
||||
!memcmp(link->dpcd_caps.sink_dev_id_str, str_mbp_2018,
|
||||
sizeof(str_mbp_2018)) &&
|
||||
(!memcmp(link->dpcd_caps.sink_fw_revision, fwrev_mbp_2018,
|
||||
sizeof(fwrev_mbp_2018)) ||
|
||||
!memcmp(link->dpcd_caps.sink_fw_revision, fwrev_mbp_2018_vega,
|
||||
sizeof(fwrev_mbp_2018_vega)))) {
|
||||
link->reported_link_cap.link_rate = LINK_RATE_RBR2;
|
||||
}
|
||||
}
|
||||
|
||||
memset(&link->dpcd_caps.dsc_caps, '\0',
|
||||
sizeof(link->dpcd_caps.dsc_caps));
|
||||
memset(&link->dpcd_caps.fec_cap, '\0', sizeof(link->dpcd_caps.fec_cap));
|
||||
|
||||
@@ -932,6 +932,9 @@ static int check_overlay_dst(struct intel_overlay *overlay,
|
||||
const struct intel_crtc_state *pipe_config =
|
||||
overlay->crtc->config;
|
||||
|
||||
if (rec->dst_height == 0 || rec->dst_width == 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (rec->dst_x < pipe_config->pipe_src_w &&
|
||||
rec->dst_x + rec->dst_width <= pipe_config->pipe_src_w &&
|
||||
rec->dst_y < pipe_config->pipe_src_h &&
|
||||
|
||||
@@ -38,7 +38,7 @@ nvbios_addr(struct nvkm_bios *bios, u32 *addr, u8 size)
|
||||
*addr += bios->imaged_addr;
|
||||
}
|
||||
|
||||
if (unlikely(*addr + size >= bios->size)) {
|
||||
if (unlikely(*addr + size > bios->size)) {
|
||||
nvkm_error(&bios->subdev, "OOB %d %08x %08x\n", size, p, *addr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ static const char * const cma_events[] = {
|
||||
[RDMA_CM_EVENT_TIMEWAIT_EXIT] = "timewait exit",
|
||||
};
|
||||
|
||||
static void cma_set_mgid(struct rdma_id_private *id_priv, struct sockaddr *addr,
|
||||
union ib_gid *mgid);
|
||||
static void cma_iboe_set_mgid(struct sockaddr *addr, union ib_gid *mgid,
|
||||
enum ib_gid_type gid_type);
|
||||
|
||||
const char *__attribute_const__ rdma_event_msg(enum rdma_cm_event_type event)
|
||||
{
|
||||
@@ -1840,17 +1840,19 @@ static void destroy_mc(struct rdma_id_private *id_priv,
|
||||
if (dev_addr->bound_dev_if)
|
||||
ndev = dev_get_by_index(dev_addr->net,
|
||||
dev_addr->bound_dev_if);
|
||||
if (ndev) {
|
||||
if (ndev && !send_only) {
|
||||
enum ib_gid_type gid_type;
|
||||
union ib_gid mgid;
|
||||
|
||||
cma_set_mgid(id_priv, (struct sockaddr *)&mc->addr,
|
||||
&mgid);
|
||||
|
||||
if (!send_only)
|
||||
cma_igmp_send(ndev, &mgid, false);
|
||||
|
||||
dev_put(ndev);
|
||||
gid_type = id_priv->cma_dev->default_gid_type
|
||||
[id_priv->id.port_num -
|
||||
rdma_start_port(
|
||||
id_priv->cma_dev->device)];
|
||||
cma_iboe_set_mgid((struct sockaddr *)&mc->addr, &mgid,
|
||||
gid_type);
|
||||
cma_igmp_send(ndev, &mgid, false);
|
||||
}
|
||||
dev_put(ndev);
|
||||
|
||||
cancel_work_sync(&mc->iboe_join.work);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ struct ucma_context {
|
||||
u64 uid;
|
||||
|
||||
struct list_head list;
|
||||
struct list_head mc_list;
|
||||
struct work_struct close_work;
|
||||
};
|
||||
|
||||
@@ -105,6 +106,7 @@ struct ucma_multicast {
|
||||
|
||||
u64 uid;
|
||||
u8 join_state;
|
||||
struct list_head list;
|
||||
struct sockaddr_storage addr;
|
||||
};
|
||||
|
||||
@@ -198,6 +200,7 @@ static struct ucma_context *ucma_alloc_ctx(struct ucma_file *file)
|
||||
|
||||
INIT_WORK(&ctx->close_work, ucma_close_id);
|
||||
init_completion(&ctx->comp);
|
||||
INIT_LIST_HEAD(&ctx->mc_list);
|
||||
/* So list_del() will work if we don't do ucma_finish_ctx() */
|
||||
INIT_LIST_HEAD(&ctx->list);
|
||||
ctx->file = file;
|
||||
@@ -484,19 +487,19 @@ err1:
|
||||
|
||||
static void ucma_cleanup_multicast(struct ucma_context *ctx)
|
||||
{
|
||||
struct ucma_multicast *mc;
|
||||
unsigned long index;
|
||||
struct ucma_multicast *mc, *tmp;
|
||||
|
||||
xa_for_each(&multicast_table, index, mc) {
|
||||
if (mc->ctx != ctx)
|
||||
continue;
|
||||
xa_lock(&multicast_table);
|
||||
list_for_each_entry_safe(mc, tmp, &ctx->mc_list, list) {
|
||||
list_del(&mc->list);
|
||||
/*
|
||||
* At this point mc->ctx->ref is 0 so the mc cannot leave the
|
||||
* lock on the reader and this is enough serialization
|
||||
*/
|
||||
xa_erase(&multicast_table, index);
|
||||
__xa_erase(&multicast_table, mc->id);
|
||||
kfree(mc);
|
||||
}
|
||||
xa_unlock(&multicast_table);
|
||||
}
|
||||
|
||||
static void ucma_cleanup_mc_events(struct ucma_multicast *mc)
|
||||
@@ -1469,12 +1472,16 @@ static ssize_t ucma_process_join(struct ucma_file *file,
|
||||
mc->uid = cmd->uid;
|
||||
memcpy(&mc->addr, addr, cmd->addr_size);
|
||||
|
||||
if (xa_alloc(&multicast_table, &mc->id, NULL, xa_limit_32b,
|
||||
xa_lock(&multicast_table);
|
||||
if (__xa_alloc(&multicast_table, &mc->id, NULL, xa_limit_32b,
|
||||
GFP_KERNEL)) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free_mc;
|
||||
}
|
||||
|
||||
list_add_tail(&mc->list, &ctx->mc_list);
|
||||
xa_unlock(&multicast_table);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_join_multicast(ctx->cm_id, (struct sockaddr *)&mc->addr,
|
||||
join_state, mc);
|
||||
@@ -1500,8 +1507,11 @@ err_leave_multicast:
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_cleanup_mc_events(mc);
|
||||
err_xa_erase:
|
||||
xa_erase(&multicast_table, mc->id);
|
||||
xa_lock(&multicast_table);
|
||||
list_del(&mc->list);
|
||||
__xa_erase(&multicast_table, mc->id);
|
||||
err_free_mc:
|
||||
xa_unlock(&multicast_table);
|
||||
kfree(mc);
|
||||
err_put_ctx:
|
||||
ucma_put_ctx(ctx);
|
||||
@@ -1569,15 +1579,17 @@ static ssize_t ucma_leave_multicast(struct ucma_file *file,
|
||||
mc = ERR_PTR(-EINVAL);
|
||||
else if (!refcount_inc_not_zero(&mc->ctx->ref))
|
||||
mc = ERR_PTR(-ENXIO);
|
||||
else
|
||||
__xa_erase(&multicast_table, mc->id);
|
||||
xa_unlock(&multicast_table);
|
||||
|
||||
if (IS_ERR(mc)) {
|
||||
xa_unlock(&multicast_table);
|
||||
ret = PTR_ERR(mc);
|
||||
goto out;
|
||||
}
|
||||
|
||||
list_del(&mc->list);
|
||||
__xa_erase(&multicast_table, mc->id);
|
||||
xa_unlock(&multicast_table);
|
||||
|
||||
mutex_lock(&mc->ctx->mutex);
|
||||
rdma_leave_multicast(mc->ctx->cm_id, (struct sockaddr *) &mc->addr);
|
||||
mutex_unlock(&mc->ctx->mutex);
|
||||
|
||||
@@ -185,12 +185,6 @@ static void hfi1_ipoib_netdev_dtor(struct net_device *dev)
|
||||
free_percpu(priv->netstats);
|
||||
}
|
||||
|
||||
static void hfi1_ipoib_free_rdma_netdev(struct net_device *dev)
|
||||
{
|
||||
hfi1_ipoib_netdev_dtor(dev);
|
||||
free_netdev(dev);
|
||||
}
|
||||
|
||||
static void hfi1_ipoib_set_id(struct net_device *dev, int id)
|
||||
{
|
||||
struct hfi1_ipoib_dev_priv *priv = hfi1_ipoib_priv(dev);
|
||||
@@ -227,24 +221,23 @@ static int hfi1_ipoib_setup_rn(struct ib_device *device,
|
||||
priv->port_num = port_num;
|
||||
priv->netdev_ops = netdev->netdev_ops;
|
||||
|
||||
netdev->netdev_ops = &hfi1_ipoib_netdev_ops;
|
||||
|
||||
ib_query_pkey(device, port_num, priv->pkey_index, &priv->pkey);
|
||||
|
||||
rc = hfi1_ipoib_txreq_init(priv);
|
||||
if (rc) {
|
||||
dd_dev_err(dd, "IPoIB netdev TX init - failed(%d)\n", rc);
|
||||
hfi1_ipoib_free_rdma_netdev(netdev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = hfi1_ipoib_rxq_init(netdev);
|
||||
if (rc) {
|
||||
dd_dev_err(dd, "IPoIB netdev RX init - failed(%d)\n", rc);
|
||||
hfi1_ipoib_free_rdma_netdev(netdev);
|
||||
hfi1_ipoib_txreq_deinit(priv);
|
||||
return rc;
|
||||
}
|
||||
|
||||
netdev->netdev_ops = &hfi1_ipoib_netdev_ops;
|
||||
|
||||
netdev->priv_destructor = hfi1_ipoib_netdev_dtor;
|
||||
netdev->needs_free_netdev = true;
|
||||
|
||||
|
||||
@@ -3273,7 +3273,7 @@ static void mlx4_ib_event(struct mlx4_dev *dev, void *ibdev_ptr,
|
||||
case MLX4_DEV_EVENT_PORT_MGMT_CHANGE:
|
||||
ew = kmalloc(sizeof *ew, GFP_ATOMIC);
|
||||
if (!ew)
|
||||
break;
|
||||
return;
|
||||
|
||||
INIT_WORK(&ew->work, handle_port_mgmt_change_event);
|
||||
memcpy(&ew->ib_eqe, eqe, sizeof *eqe);
|
||||
|
||||
@@ -3124,6 +3124,8 @@ do_write:
|
||||
case IB_WR_ATOMIC_FETCH_AND_ADD:
|
||||
if (unlikely(!(qp->qp_access_flags & IB_ACCESS_REMOTE_ATOMIC)))
|
||||
goto inv_err;
|
||||
if (unlikely(wqe->atomic_wr.remote_addr & (sizeof(u64) - 1)))
|
||||
goto inv_err;
|
||||
if (unlikely(!rvt_rkey_ok(qp, &qp->r_sge.sge, sizeof(u64),
|
||||
wqe->atomic_wr.remote_addr,
|
||||
wqe->atomic_wr.rkey,
|
||||
|
||||
@@ -644,14 +644,9 @@ static inline struct siw_sqe *orq_get_current(struct siw_qp *qp)
|
||||
return &qp->orq[qp->orq_get % qp->attrs.orq_size];
|
||||
}
|
||||
|
||||
static inline struct siw_sqe *orq_get_tail(struct siw_qp *qp)
|
||||
{
|
||||
return &qp->orq[qp->orq_put % qp->attrs.orq_size];
|
||||
}
|
||||
|
||||
static inline struct siw_sqe *orq_get_free(struct siw_qp *qp)
|
||||
{
|
||||
struct siw_sqe *orq_e = orq_get_tail(qp);
|
||||
struct siw_sqe *orq_e = &qp->orq[qp->orq_put % qp->attrs.orq_size];
|
||||
|
||||
if (READ_ONCE(orq_e->flags) == 0)
|
||||
return orq_e;
|
||||
|
||||
@@ -1153,11 +1153,12 @@ static int siw_check_tx_fence(struct siw_qp *qp)
|
||||
|
||||
spin_lock_irqsave(&qp->orq_lock, flags);
|
||||
|
||||
rreq = orq_get_current(qp);
|
||||
|
||||
/* free current orq entry */
|
||||
rreq = orq_get_current(qp);
|
||||
WRITE_ONCE(rreq->flags, 0);
|
||||
|
||||
qp->orq_get++;
|
||||
|
||||
if (qp->tx_ctx.orq_fence) {
|
||||
if (unlikely(tx_waiting->wr_status != SIW_WR_QUEUED)) {
|
||||
pr_warn("siw: [QP %u]: fence resume: bad status %d\n",
|
||||
@@ -1165,10 +1166,12 @@ static int siw_check_tx_fence(struct siw_qp *qp)
|
||||
rv = -EPROTO;
|
||||
goto out;
|
||||
}
|
||||
/* resume SQ processing */
|
||||
/* resume SQ processing, if possible */
|
||||
if (tx_waiting->sqe.opcode == SIW_OP_READ ||
|
||||
tx_waiting->sqe.opcode == SIW_OP_READ_LOCAL_INV) {
|
||||
rreq = orq_get_tail(qp);
|
||||
|
||||
/* SQ processing was stopped because of a full ORQ */
|
||||
rreq = orq_get_free(qp);
|
||||
if (unlikely(!rreq)) {
|
||||
pr_warn("siw: [QP %u]: no ORQE\n", qp_id(qp));
|
||||
rv = -EPROTO;
|
||||
@@ -1181,15 +1184,14 @@ static int siw_check_tx_fence(struct siw_qp *qp)
|
||||
resume_tx = 1;
|
||||
|
||||
} else if (siw_orq_empty(qp)) {
|
||||
/*
|
||||
* SQ processing was stopped by fenced work request.
|
||||
* Resume since all previous Read's are now completed.
|
||||
*/
|
||||
qp->tx_ctx.orq_fence = 0;
|
||||
resume_tx = 1;
|
||||
} else {
|
||||
pr_warn("siw: [QP %u]: fence resume: orq idx: %d:%d\n",
|
||||
qp_id(qp), qp->orq_get, qp->orq_put);
|
||||
rv = -EPROTO;
|
||||
}
|
||||
}
|
||||
qp->orq_get++;
|
||||
out:
|
||||
spin_unlock_irqrestore(&qp->orq_lock, flags);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/kmemleak.h>
|
||||
#include <linux/mem_encrypt.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <asm/pci-direct.h>
|
||||
#include <asm/iommu.h>
|
||||
#include <asm/apic.h>
|
||||
@@ -833,6 +834,7 @@ static int iommu_ga_log_enable(struct amd_iommu *iommu)
|
||||
status = readl(iommu->mmio_base + MMIO_STATUS_OFFSET);
|
||||
if (status & (MMIO_STATUS_GALOG_RUN_MASK))
|
||||
break;
|
||||
udelay(10);
|
||||
}
|
||||
|
||||
if (WARN_ON(i >= LOOP_TIMEOUT))
|
||||
|
||||
@@ -576,9 +576,8 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)
|
||||
fn, &intel_ir_domain_ops,
|
||||
iommu);
|
||||
if (!iommu->ir_domain) {
|
||||
irq_domain_free_fwnode(fn);
|
||||
pr_err("IR%d: failed to allocate irqdomain\n", iommu->seq_id);
|
||||
goto out_free_bitmap;
|
||||
goto out_free_fwnode;
|
||||
}
|
||||
iommu->ir_msi_domain =
|
||||
arch_create_remap_msi_irq_domain(iommu->ir_domain,
|
||||
@@ -602,7 +601,7 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)
|
||||
|
||||
if (dmar_enable_qi(iommu)) {
|
||||
pr_err("Failed to enable queued invalidation\n");
|
||||
goto out_free_bitmap;
|
||||
goto out_free_ir_domain;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,6 +625,14 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_ir_domain:
|
||||
if (iommu->ir_msi_domain)
|
||||
irq_domain_remove(iommu->ir_msi_domain);
|
||||
iommu->ir_msi_domain = NULL;
|
||||
irq_domain_remove(iommu->ir_domain);
|
||||
iommu->ir_domain = NULL;
|
||||
out_free_fwnode:
|
||||
irq_domain_free_fwnode(fn);
|
||||
out_free_bitmap:
|
||||
bitmap_free(bitmap);
|
||||
out_free_pages:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user