ARM: vexpress/spc: Avoid negative array index when !SMP
Subsystems (11)
Sasha Levin
maintainerPATCH 10/14 drm/msm/mdp5: check the return of kzalloc()
In reply to Sasha LevinFrom: Xiaoke Wang <[email protected]>
[ Upstream commit 047ae665577776b7feb11bd4f81f46627cff95e7 ]
kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check it to prevent potential wrong memory access.
Besides, since mdp5_plane_reset() is void type, so we should better set plane-state to NULL after releasing it.
Patchwork: https://patchwork.freedesktop.org/patch/481055/
--- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c +3 -0
@@ -179,7 +179,10 @@ static void mdp5_plane_reset(struct drm_plane *plane)drm_framebuffer_put (plane->state->fb);kfree (to_mdp5_plane_state (plane->state)); + plane->state =NULL ; mdp5_state =kzalloc (sizeof (*mdp5_state),GFP_KERNEL ); +if (!mdp5_state) +return ;/* assign default blend parameters */ mdp5_state->alpha =255 ;
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 11/14 drm/msm: Stop using iommu_present()
In reply to Sasha LevinFrom: Robin Murphy <[email protected]>
[ Upstream commit e2a88eabb02410267519b838fb9b79f5206769be ]
Even if some IOMMU has registered itself on the platform "bus", that doesn't necessarily mean it provides translation for the device we care about. Replace iommu_present() with a more appropriate check.
Patchwork: https://patchwork.freedesktop.org/patch/480707/
--- drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_drv.c +1 -1
@@ -303,7 +303,7 @@ bool msm_use_mmu(struct drm_device *dev)struct msm_drm_private *priv = dev->dev_private;/* a2xx comes with its own MMU */ -return priv->is_a2xx ||iommu_present (&platform_bus_type); +return priv->is_a2xx ||device_iommu_mapped (dev->dev); }static int msm_init_vram (struct drm_device *dev)
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 4/14 ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant
In reply to Sasha LevinFrom: Borislav Petkov <[email protected]>
[ Upstream commit 1ef8715975de8bd481abbd0839ed4f49d9e5b0ff ]
Fix:
sound/usb/midi.c: In function ‘snd_usbmidi_out_endpoint_create’:
sound/usb/midi.c:1389:2: error: case label does not reduce to an integer constant
case USB_ID(0xfc08, 0x0101): /* Unknown vendor Cable */
^~~~See https://lore.kernel.org/r/YkwQ6%[email protected] for the gory details as to why it triggers with older gccs only.
[ A slight correction with parentheses around the argument by tiwai ]
--- sound/usb/usbaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/usbaudio.h +1 -1
@@ -8,7 +8,7 @@*/ /* handling of USB vendor/product ID pairs as 32-bit numbers */ -#define USB_ID (vendor, product) (((vendor) << 16) | (product)) +#define USB_ID (vendor, product) (((unsigned int)(vendor) << 16) | (product))#define USB_ID_VENDOR (id) ((id) >> 16)#define USB_ID_PRODUCT (id) ((u16)(id))
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 8/14 brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
In reply to Sasha LevinFrom: Borislav Petkov <[email protected]>
[ Upstream commit 6fb3a5868b2117611f41e421e10e6a8c2a13039a ]
Fix:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function ‘brcmf_sdio_drivestrengthinit’:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3798:2: error: case label does not reduce to an integer constant
case SDIOD_DRVSTR_KEY(BRCM_CC_43143_CHIP_ID, 17):
^~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3809:2: error: case label does not reduce to an integer constant
case SDIOD_DRVSTR_KEY(BRCM_CC_43362_CHIP_ID, 13):
^~~~See https://lore.kernel.org/r/YkwQ6%[email protected] for the gory details as to why it triggers with older gccs only.
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +1 -1
@@ -550,7 +550,7 @@ enum brcmf_sdio_frmtype { BRCMF_SDIO_FT_SUB, }; -#define SDIOD_DRVSTR_KEY (chip, pmu) (((chip) << 16) | (pmu)) +#define SDIOD_DRVSTR_KEY (chip, pmu) (((unsigned int)(chip) << 16) | (pmu))/* SDIO Pad drive strength to select value mappings */ struct sdiod_drive_str {
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 7/14 mt76: Fix undefined behavior due to shift overflowing the constant
In reply to Sasha LevinFrom: Borislav Petkov <[email protected]>
[ Upstream commit dbc2b1764734857d68425468ffa8486e97ab89df ]
Fix:
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c: In function ‘mt76x2e_probe’:
././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_946’ \
declared with attribute error: FIELD_PREP: mask is not constant
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
See https://lore.kernel.org/r/YkwQ6%[email protected] for the gory details as to why it triggers with older gccs only.
--- drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c +1 -1
@@ -76,7 +76,7 @@ mt76pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)mt76_rmw_field (dev,0x15a10 ,0x1f <<16 ,0x9 );/* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */ -mt76_rmw_field (dev,0x15a0c ,0xf <<28 ,0xf ); +mt76_rmw_field (dev,0x15a0c ,0xfU <<28 ,0xf );/* RG_SSUSB_CDR_BR_PE1D = 0x3 */ mt76_rmw_field (dev,0x15c58 ,0x3 <<6 ,0x3 );
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 5/14 vxlan: fix error return code in vxlan_fdb_append
In reply to Sasha LevinFrom: Hongbin Wang <[email protected]>
[ Upstream commit 7cea5560bf656b84f9ed01c0cc829d4eecd0640b ]
When kmalloc and dst_cache_init failed, should return ENOMEM rather than ENOBUFS.
--- drivers/net/vxlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/vxlan.c +2 -2
@@ -679,11 +679,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f, rd =kmalloc (sizeof (*rd),GFP_ATOMIC );if (rd ==NULL ) -return -ENOBUFS ; +return -ENOMEM ;if (dst_cache_init (&rd->dst_cache,GFP_ATOMIC )) {kfree (rd); -return -ENOBUFS ; +return -ENOMEM ; } rd->remote_ip = *ip;
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 9/14 dpaa_eth: Fix missing of_node_put in dpaa_get_ts_info()
In reply to Sasha LevinFrom: Lv Ruyi <[email protected]>
[ Upstream commit 1a7eb80d170c28be2928433702256fe2a0bd1e0f ]
Both of of_get_parent() and of_parse_phandle() return node pointer with refcount incremented, use of_node_put() on it to decrease refcount when done.
--- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +6 -2
@@ -506,11 +506,15 @@ static int dpaa_get_ts_info(struct net_device *net_dev, info->phc_index =-1 ; fman_node =of_get_parent (mac_node); -if (fman_node) +if (fman_node) { ptp_node =of_parse_phandle (fman_node,"ptimer-handle" ,0 ); +of_node_put (fman_node); + } -if (ptp_node) +if (ptp_node) { ptp_dev =of_find_device_by_node (ptp_node); +of_node_put (ptp_node); + }if (ptp_dev) ptp =platform_get_drvdata (ptp_dev);
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 12/14 net: macb: Restart tx only if queue pointer is lagging
In reply to Sasha LevinFrom: Tomas Melin <[email protected]>
[ Upstream commit 5ad7f18cd82cee8e773d40cc7a1465a526f2615c ]
commit 4298388574da ("net: macb: restart tx after tx used bit read") added support for restarting transmission. Restarting tx does not work in case controller asserts TXUBR interrupt and TQBP is already at the end of the tx queue. In that situation, restarting tx will immediately cause assertion of another TXUBR interrupt. The driver will end up in an infinite interrupt loop which it cannot break out of.
For cases where TQBP is at the end of the tx queue, instead only clear TX_USED interrupt. As more data gets pushed to the queue, transmission will resume.
This issue was observed on a Xilinx Zynq-7000 based board. During stress test of the network interface,
driver would get stuck on interrupt loop within seconds or minutes causing CPU to stall.
--- drivers/net/ethernet/cadence/macb_main.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/cadence/macb_main.c +8 -0
@@ -1378,6 +1378,7 @@ static void macb_tx_restart(struct macb_queue *queue)unsigned int head = queue->tx_head;unsigned int tail = queue->tx_tail;struct macb *bp = queue->bp; +unsigned int head_idx, tbqp;if (bp->caps &MACB_CAPS_ISR_CLEAR_ON_WRITE )queue_writel (queue,ISR ,MACB_BIT (TXUBR ));
@@ -1385,6 +1386,13 @@ static void macb_tx_restart(struct macb_queue *queue)if (head == tail)return ; + tbqp =queue_readl (queue,TBQP ) /macb_dma_desc_get_size (bp); + tbqp =macb_adj_dma_desc_idx (bp,macb_tx_ring_wrap (bp, tbqp)); + head_idx =macb_adj_dma_desc_idx (bp,macb_tx_ring_wrap (bp, head)); + +if (tbqp == head_idx) +return ; +macb_writel (bp,NCR ,macb_readl (bp,NCR ) |MACB_BIT (TSTART )); }
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 13/14 scsi: qedi: Fix failed disconnect handling
In reply to Sasha LevinFrom: Mike Christie <[email protected]>
[ Upstream commit 857b06527f707f5df634b854898a191b5c1d0272 ]
We set the qedi_ep state to EP_STATE_OFLDCONN_START when the ep is created. Then in qedi_set_path we kick off the offload work. If userspace times out the connection and calls ep_disconnect, qedi will only flush the offload work if the qedi_ep state has transitioned away from EP_STATE_OFLDCONN_START. If we can't connect we will not have transitioned state and will leave the offload work running, and we will free the qedi_ep from under it.
This patch just has us init the work when we create the ep, then always flush it.
--- drivers/scsi/qedi/qedi_iscsi.c | 69 +++++++++++++++++----------------- 1 file changed, 34 insertions(+), 35 deletions(-)
drivers/scsi/qedi/qedi_iscsi.c +34 -35
@@ -797,6 +797,37 @@ static int qedi_task_xmit(struct iscsi_task *task)return qedi_iscsi_send_ioreq (task); } +static void qedi_offload_work (struct work_struct *work) +{ +struct qedi_endpoint *qedi_ep = + container_of(work, struct qedi_endpoint, offload_work); +struct qedi_ctx *qedi; +int wait_delay =5 *HZ ; +int ret; + + qedi = qedi_ep->qedi; + + ret =qedi_iscsi_offload_conn (qedi_ep); +if (ret) { +QEDI_ERR (&qedi->dbg_ctx, +"offload error: iscsi_cid=%u, qedi_ep=%p, ret=%d\n" , + qedi_ep->iscsi_cid, qedi_ep, ret); + qedi_ep->state =EP_STATE_OFLDCONN_FAILED ; +return ; + } + + ret =wait_event_interruptible_timeout (qedi_ep->tcp_ofld_wait, + (qedi_ep->state == +EP_STATE_OFLDCONN_COMPL ), + wait_delay); +if (ret <=0 || qedi_ep->state !=EP_STATE_OFLDCONN_COMPL ) { + qedi_ep->state =EP_STATE_OFLDCONN_FAILED ; +QEDI_ERR (&qedi->dbg_ctx, +"Offload conn TIMEOUT iscsi_cid=%u, qedi_ep=%p\n" , + qedi_ep->iscsi_cid, qedi_ep); + } +} +static struct iscsi_endpoint *qedi_ep_connect (struct Scsi_Host *shost,struct sockaddr *dst_addr,int non_blocking)
@@ -840,6 +871,7 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, } qedi_ep = ep->dd_data;memset (qedi_ep,0 ,sizeof (struct qedi_endpoint )); +INIT_WORK (&qedi_ep->offload_work, qedi_offload_work); qedi_ep->state =EP_STATE_IDLE ; qedi_ep->iscsi_cid = (u32)-1 ; qedi_ep->qedi = qedi;
@@ -996,12 +1028,11 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep) qedi_ep = ep->dd_data; qedi = qedi_ep->qedi; +flush_work (&qedi_ep->offload_work); +if (qedi_ep->state ==EP_STATE_OFLDCONN_START ) goto ep_exit_recover; -if (qedi_ep->state !=EP_STATE_OFLDCONN_NONE ) -flush_work (&qedi_ep->offload_work); -if (qedi_ep->conn) { qedi_conn = qedi_ep->conn; conn = qedi_conn->cls_conn->dd_data;
@@ -1161,37 +1192,6 @@ static int qedi_data_avail(struct qedi_ctx *qedi, u16 vlanid)return rc; } -static void qedi_offload_work (struct work_struct *work) -{ -struct qedi_endpoint *qedi_ep = - container_of(work, struct qedi_endpoint, offload_work); -struct qedi_ctx *qedi; -int wait_delay =5 *HZ ; -int ret; - - qedi = qedi_ep->qedi; - - ret =qedi_iscsi_offload_conn (qedi_ep); -if (ret) { -QEDI_ERR (&qedi->dbg_ctx, -"offload error: iscsi_cid=%u, qedi_ep=%p, ret=%d\n" , - qedi_ep->iscsi_cid, qedi_ep, ret); - qedi_ep->state =EP_STATE_OFLDCONN_FAILED ; -return ; - } - - ret =wait_event_interruptible_timeout (qedi_ep->tcp_ofld_wait, - (qedi_ep->state == -EP_STATE_OFLDCONN_COMPL ), - wait_delay); -if ((ret <=0 ) || (qedi_ep->state !=EP_STATE_OFLDCONN_COMPL )) { - qedi_ep->state =EP_STATE_OFLDCONN_FAILED ; -QEDI_ERR (&qedi->dbg_ctx, -"Offload conn TIMEOUT iscsi_cid=%u, qedi_ep=%p\n" , - qedi_ep->iscsi_cid, qedi_ep); - } -} -static int qedi_set_path (struct Scsi_Host *shost,struct iscsi_path *path_data) {struct qedi_ctx *qedi;
@@ -1307,7 +1307,6 @@ static int qedi_set_path(struct Scsi_Host *shost, struct iscsi_path *path_data) qedi_ep->dst_addr, qedi_ep->dst_port); } -INIT_WORK (&qedi_ep->offload_work, qedi_offload_work);queue_work (qedi->offload_thread, &qedi_ep->offload_work); ret =0 ;
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 14/14 stat: fix inconsistency between struct stat and struct compat_stat
In reply to Sasha LevinFrom: Mikulas Patocka <[email protected]>
[ Upstream commit 932aba1e169090357a77af18850a10c256b50819 ]
struct stat (defined in arch/x86/include/uapi/asm/stat.h) has 32-bit st_dev and st_rdev; struct compat_stat (defined in arch/x86/include/asm/compat.h) has 16-bit st_dev and st_rdev followed by a 16-bit padding.
This patch fixes struct compat_stat to match struct stat.
[ Historical note: the old x86 'struct stat' did have that 16-bit field
that the compat layer had kept around, but it was changes back in 2003 by "struct stat - support larger dev_t":
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=e95b2065677fe32512a597a79db94b77b90c968d
and back in those days, the x86_64 port was still new, and separate from the i386 code, and had already picked up the old version with a 16-bit st_dev field ]
Note that we can't change compat_dev_t because it is used by compat_loop_info.
Also, if the st_dev and st_rdev values are 32-bit, we don't have to use old_valid_dev to test if the value fits into them. This fixes -EOVERFLOW on filesystems that are on NVMe because NVMe uses the major number 259.
--- arch/x86/include/asm/compat.h | 6 ++---- fs/stat.c | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-)
arch/x86/include/asm/compat.h +2 -4
@@ -31,15 +31,13 @@ typedef s64 __attribute__((aligned(4))) compat_s64; typedef u64 __attribute__((aligned(4))) compat_u64;struct compat_stat { -compat_dev_t st_dev; -u16 __pad1; +u32 st_dev;compat_ino_t st_ino;compat_mode_t st_mode;compat_nlink_t st_nlink;__compat_uid_t st_uid;__compat_gid_t st_gid; -compat_dev_t st_rdev; -u16 __pad2; +u32 st_rdev;u32 st_size;u32 st_blksize;u32 st_blocks;
fs/stat.c +10 -9
@@ -290,9 +290,6 @@ SYSCALL_DEFINE2(fstat, unsigned int, fd, struct __old_kernel_stat __user *, stat# define choose_32_64 (a,b) b#endif -#define valid_dev (x) choose_32_64(old_valid_dev(x),true) -#define encode_dev (x) choose_32_64(old_encode_dev,new_encode_dev)(x) -#ifndef INIT_STRUCT_STAT_PADDING # define INIT_STRUCT_STAT_PADDING (st) memset(&st, 0, sizeof(st))#endif
@@ -301,7 +298,9 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) {struct stat tmp; -if (!valid_dev (stat->dev) || !valid_dev (stat->rdev)) +if (sizeof (tmp.st_dev) <4 && !old_valid_dev (stat->dev)) +return -EOVERFLOW ; +if (sizeof (tmp.st_rdev) <4 && !old_valid_dev (stat->rdev))return -EOVERFLOW ;#if BITS_PER_LONG ==32 if (stat->size >MAX_NON_LFS )
@@ -309,7 +308,7 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf)#endif INIT_STRUCT_STAT_PADDING (tmp); - tmp.st_dev =encode_dev (stat->dev); + tmp.st_dev =new_encode_dev (stat->dev); tmp.st_ino = stat->ino;if (sizeof (tmp.st_ino) <sizeof (stat->ino) && tmp.st_ino != stat->ino)return -EOVERFLOW ;
@@ -319,7 +318,7 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf)return -EOVERFLOW ;SET_UID (tmp.st_uid,from_kuid_munged (current_user_ns (), stat->uid));SET_GID (tmp.st_gid,from_kgid_munged (current_user_ns (), stat->gid)); - tmp.st_rdev =encode_dev (stat->rdev); + tmp.st_rdev =new_encode_dev (stat->rdev); tmp.st_size = stat->size; tmp.st_atime = stat->atime.tv_sec; tmp.st_mtime = stat->mtime.tv_sec;
@@ -593,11 +592,13 @@ static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf) {struct compat_stat tmp; -if (!old_valid_dev (stat->dev) || !old_valid_dev (stat->rdev)) +if (sizeof (tmp.st_dev) <4 && !old_valid_dev (stat->dev)) +return -EOVERFLOW ; +if (sizeof (tmp.st_rdev) <4 && !old_valid_dev (stat->rdev))return -EOVERFLOW ;memset (&tmp,0 ,sizeof (tmp)); - tmp.st_dev =old_encode_dev (stat->dev); + tmp.st_dev =new_encode_dev (stat->dev); tmp.st_ino = stat->ino;if (sizeof (tmp.st_ino) <sizeof (stat->ino) && tmp.st_ino != stat->ino)return -EOVERFLOW ;
@@ -607,7 +608,7 @@ static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)return -EOVERFLOW ;SET_UID (tmp.st_uid,from_kuid_munged (current_user_ns (), stat->uid));SET_GID (tmp.st_gid,from_kgid_munged (current_user_ns (), stat->gid)); - tmp.st_rdev =old_encode_dev (stat->rdev); + tmp.st_rdev =new_encode_dev (stat->rdev);if ((u64 ) stat->size >MAX_NON_LFS )return -EOVERFLOW ; tmp.st_size = stat->size;
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 3/14 platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative
In reply to Sasha LevinFrom: Jiapeng Chong <[email protected]>
[ Upstream commit 0284d4d1be753f648f28b77bdfbe6a959212af5c ]
Eliminate the follow smatch warnings:
drivers/platform/x86/samsung-laptop.c:1124 kbd_led_set() warn: unsigned 'value' is never less than zero.
--- drivers/platform/x86/samsung-laptop.c | 2 -- 1 file changed, 2 deletions(-)
drivers/platform/x86/samsung-laptop.c +0 -2
@@ -1121,8 +1121,6 @@ static void kbd_led_set(struct led_classdev *led_cdev,if (value > samsung->kbd_led.max_brightness) value = samsung->kbd_led.max_brightness; -else if (value <0 ) - value =0 ; samsung->kbd_led_wk = value;queue_work (samsung->led_workqueue, &samsung->kbd_led_work);
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 1/14 ARM: vexpress/spc: Avoid negative array index when !SMP
From: Kees Cook <[email protected]>
[ Upstream commit b3f1dd52c991d79118f35e6d1bf4d7cb09882e38 ]
When building multi_v7_defconfig+CONFIG_SMP=n, -Warray-bounds exposes a couple negative array index accesses:
arch/arm/mach-vexpress/spc.c: In function 've_spc_clk_init':arch/arm/mach-vexpress/spc.c:583:21: warning: array subscript -1 is below array bounds of 'bool[2]' {aka '_Bool[2]'} [-Warray-bounds]
583 | if (init_opp_table[cluster])
| ~~~~~~~~~~~~~~^~~~~~~~~
arch/arm/mach-vexpress/spc.c:556:7: note: while referencing 'init_opp_table'
556 | bool init_opp_table[MAX_CLUSTERS] = { false };
| ^~~~~~~~~~~~~~
arch/arm/mach-vexpress/spc.c:592:18: warning: array subscript -1 is below array bounds of 'bool[2]' {aka '_Bool[2]'} [-Warray-bounds]
592 | init_opp_table[cluster] = true;
| ~~~~~~~~~~~~~~^~~~~~~~~
arch/arm/mach-vexpress/spc.c:556:7: note: while referencing 'init_opp_table'
556 | bool init_opp_table[MAX_CLUSTERS] = { false };
| ^~~~~~~~~~~~~~Skip this logic when built !SMP.
--- arch/arm/mach-vexpress/spc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-vexpress/spc.c +1 -1
@@ -580,7 +580,7 @@ static int __init ve_spc_clk_init(void) } cluster =topology_physical_package_id (cpu_dev->id); -if (init_opp_table[cluster]) +if (cluster <0 || init_opp_table[cluster])continue ;if (ve_init_opp_table (cpu_dev))
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 2/14 reset: tegra-bpmp: Restore Handle errors in BPMP response
From: Sameer Pujar <[email protected]>
[ Upstream commit d1da1052ffad63aa5181b69f20a6952e31f339c2 ]
This reverts following commit 69125b4b9440 ("reset: tegra-bpmp: Revert Handle errors in BPMP response").
The Tegra194 HDA reset failure is fixed by commit d278dc9151a0 ("ALSA:
hda/tegra: Fix Tegra194 HDA reset failure"). The temporary revert of original commit c045ceb5a145 ("reset: tegra-bpmp: Handle errors in BPMP response") can be removed now.
--- drivers/reset/tegra/reset-bpmp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/reset/tegra/reset-bpmp.c +8 -1
@@ -20,6 +20,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,struct tegra_bpmp *bpmp =to_tegra_bpmp (rstc);struct mrq_reset_request request;struct tegra_bpmp_message msg; +int err;memset (&request,0 ,sizeof (request)); request.cmd = command;
@@ -30,7 +31,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, msg.tx.data = &request; msg.tx.size =sizeof (request); -return tegra_bpmp_transfer (bpmp, &msg); + err =tegra_bpmp_transfer (bpmp, &msg); +if (err) +return err; +if (msg.rx.ret) +return -EINVAL ; + +return 0 ; } static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 6/14 cifs: Check the IOCB_DIRECT flag, not O_DIRECT
In reply to Sasha LevinFrom: David Howells <[email protected]>
[ Upstream commit 994fd530a512597ffcd713b0f6d5bc916c5698f0 ]
Use the IOCB_DIRECT indicator flag on the I/O context rather than checking to see if the file was opened O_DIRECT.
--- fs/cifs/cifsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/cifsfs.c +1 -1
@@ -889,7 +889,7 @@ cifs_loose_read_iter(struct kiocb *iocb, struct iov_iter *iter)ssize_t rc;struct inode *inode =file_inode (iocb->ki_filp); -if (iocb->ki_filp->f_flags &O_DIRECT ) +if (iocb->ki_flags &IOCB_DIRECT )return cifs_user_readv (iocb, iter); rc =cifs_revalidate_mapping (inode);
Signature · 1 line
2.35.1
Re: [PATCH AUTOSEL 5.4 11/14] drm/msm: Stop using iommu_present()
In reply to Sasha LevinYou might want to drop this one, it seems to be causing some issues on older generations.. I'll be sending another PR shortly with a revert.
https://patchwork.freedesktop.org/patch/482453
BR,
-R
Quoted 36 lines · Sasha Levin
From: Robin Murphy <[email protected]>
[ Upstream commit
e2a88eabb02410267519b838fb9b79f5206769be]Even if some IOMMU has registered itself on the platform "bus", that doesn't necessarily mean it provides translation for the device we care about. Replace
iommu_present()with a more appropriate check.Signed-off-by Robin Murphy <[email protected]>Reviewed-by Rob Clark <[email protected]>Patchwork: https://patchwork.freedesktop.org/patch/480707/
Link https://lore.kernel.org/r/5ab4f4574d7f3e042261da702d493ee40d003356.1649168268.git.robin.murphy@arm.com open hereSigned-off-by Dmitry Baryshkov <[email protected]>Signed-off-by Rob Clark <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/msm/msm_drv.c +1
-2@@ -303,7 +303,7 @@ bool msm_use_mmu(struct drm_device *dev)struct msm_drm_private *priv = dev->dev_private;/* a2xx comes with its own MMU */ -return priv->is_a2xx ||iommu_present (&platform_bus_type); +return priv->is_a2xx ||device_iommu_mapped (dev->dev); }static int msm_init_vram (struct drm_device *dev) --2.35.1
Sasha Levin
maintainerRe: [PATCH AUTOSEL 5.4 11/14] drm/msm: Stop using iommu_present()
Quoted 4 lines · Rob Clark
You might want to drop this one, it seems to be causing some issues on older generations.. I'll be sending another PR shortly with a revert.
Dropped, thanks!
Signature · 2 lines
Thanks, Sasha