5.1.6-stable review
Subsystems (12)
Greg Kroah-Hartman
maintainerPATCH 303/405 staging: mt7621-mmc: Initialize completions a single time during probe
In reply to Greg Kroah-Hartman[ Upstream commit 7ca8c2c8bbeda2a2a2a9898cd35066bc1dc83836 ]
The module was initializing completions whenever it was going to wait on them, and not when the completion was allocated. This is incorrect according to the completion docs:
Calling init_completion() on the same completion object twice is most likely a bug [...]
Re-initialization is also unnecessary because the module never uses complete_all(). Fix this by only ever initializing the completion a single time, and log if the completions are not consumed as intended (this is not a fatal problem, but should not go unnoticed).
--- drivers/staging/mt7621-mmc/sd.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/staging/mt7621-mmc/sd.c +14 -4
@@ -468,7 +468,11 @@ static unsigned int msdc_command_start(struct msdc_host *host, host->cmd = cmd; host->cmd_rsp = resp; -init_completion (&host->cmd_done); +// The completion should have been consumed by the previous command +// response handler, because the mmc requests should be serialized +if (completion_done (&host->cmd_done)) +dev_err (mmc_dev (host->mmc), +"previous command was not handled\n" );sdr_set_bits (host->base +MSDC_INTEN , wints);sdc_send_cmd (rawcmd, cmd->arg);
@@ -490,7 +494,6 @@ static unsigned int msdc_command_resp(struct msdc_host *host,MSDC_INT_ACMD19_DONE ;BUG_ON (in_interrupt ()); -//init_completion(&host->cmd_done); //sdr_set_bits(host->base + MSDC_INTEN, wints); spin_unlock (&host->lock);
@@ -674,7 +677,13 @@ static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq)//msdc_clr_fifo(host); /* no need */ msdc_dma_on ();/* enable DMA mode first!! */ -init_completion (&host->xfer_done); + +// The completion should have been consumed by the previous +// xfer response handler, because the mmc requests should be +// serialized +if (completion_done (&host->cmd_done)) +dev_err (mmc_dev (host->mmc), +"previous transfer was not handled\n" );/* start the command first*/ if (msdc_command_start (host, cmd,CMD_TIMEOUT ) !=0 )
@@ -693,7 +702,6 @@ static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq)/* for read, the data coming too fast, then CRC error * start DMA no business with CRC. */ -//init_completion(&host->xfer_done); msdc_dma_start (host);spin_unlock (&host->lock);
@@ -1688,6 +1696,8 @@ static int msdc_drv_probe(struct platform_device *pdev) }msdc_init_gpd_bd (host, &host->dma); +init_completion (&host->cmd_done); +init_completion (&host->xfer_done);INIT_DELAYED_WORK (&host->card_delaywork, msdc_tasklet_card);spin_lock_init (&host->lock);msdc_init_hw (host);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 304/405 overflow: Fix -Wtype-limits compilation warnings
In reply to Greg Kroah-Hartman[ Upstream commit dc7fe518b0493faa0af0568d6d8c2a33c00f58d0 ]
Attempt to use check_shl_overflow() with inputs of unsigned type produces the following compilation warnings.
drivers/infiniband/hw/mlx5/qp.c: In function _set_user_rq_size_:./include/linux/overflow.h:230:6: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
_s >= 0 && _s < 8 * sizeof(*d) ? _s : 0; \
^~
drivers/infiniband/hw/mlx5/qp.c:5820:6: note: in expansion of macro _check_shl_overflow_
if (check_shl_overflow(rwq->wqe_count, rwq->wqe_shift,
&rwq->buf_size))
^~~~~~~~~~~~~~~~~~
./include/linux/overflow.h:232:26: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
(_to_shift != _s || *_d < 0 || _a < 0 || \
^
drivers/infiniband/hw/mlx5/qp.c:5820:6: note: in expansion of macro _check_shl_overflow_
if (check_shl_overflow(rwq->wqe_count, rwq->wqe_shift, &rwq->buf_size))
^~~~~~~~~~~~~~~~~~
./include/linux/overflow.h:232:36: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
(_to_shift != _s || *_d < 0 || _a < 0 || \
^
drivers/infiniband/hw/mlx5/qp.c:5820:6: note: in expansion of macro _check_shl_overflow_
if (check_shl_overflow(rwq->wqe_count, rwq->wqe_shift,&rwq->buf_size))
^~~~~~~~~~~~~~~~~~--- include/linux/overflow.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
include/linux/overflow.h +9 -3
@@ -36,6 +36,12 @@#define type_max (T ) ((T)((__type_half_max(T) - 1) + __type_half_max(T)))#define type_min (T ) ((T)((T)-type_max(T)-(T)1)) +/* +* Avoids triggering -Wtype-limits compilation warning, +* while using unsigned data types to check a < 0. +*/ +#define is_non_negative (a) ((a) > 0 || (a) == 0) +#define is_negative (a) (!(is_non_negative(a)))#ifdef COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW /*
@@ -227,10 +233,10 @@typeof (d) _d = d; \u64 _a_full = _a; \unsigned int _to_shift = \ - _s >=0 && _s <8 *sizeof (*d) ? _s :0 ; \ +is_non_negative (_s) && _s <8 *sizeof (*d) ? _s :0 ; \ *_d = (_a_full << _to_shift); \ - (_to_shift != _s || *_d <0 || _a <0 || \ - (*_d >> _to_shift) != _a); \ + (_to_shift != _s ||is_negative (*_d) ||is_negative (_a) || \ + (*_d >> _to_shift) != _a); \ })/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 305/405 x86/mce: Fix machine_check_poll() tests for error types
In reply to Greg Kroah-Hartman[ Upstream commit f19501aa07f18268ab14f458b51c1c6b7f72a134 ]
There has been a lurking "TBD" in the machine check poll routine ever since it was first split out from the machine check handler. The potential issue is that the poll routine may have just begun a read from the STATUS register in a machine check bank when the hardware logs an error in that bank and signals a machine check.
That race used to be pretty small back when machine checks were broadcast, but the addition of local machine check means that the poll code could continue running and clear the error from the bank before the local machine check handler on another CPU gets around to reading it.
Fix the code to be sure to only process errors that need to be processed in the poll code, leaving other logged errors alone for the machine check handler to find and process.
[ bp: Massage a bit and flip the "== 0" check to the usual !(..) test. ]
--- arch/x86/kernel/cpu/mce/core.c | 44 ++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 7 deletions(-)
arch/x86/kernel/cpu/mce/core.c +37 -7
@@ -712,19 +712,49 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)barrier (); m.status =mce_rdmsrl (msr_ops.status (i)); + +/* If this entry is not valid, ignore it */ if (!(m.status &MCI_STATUS_VAL ))continue ;/* -* Uncorrected or signalled events are handled by the exception -* handler when it is enabled, so don't process those here. -* -* TBD do the same check for MCI_STATUS_EN here? +* If we are logging everything (at CPU online) or this +* is a corrected error, then we must log it. */ -if (!(flags &MCP_UC ) && - (m.status & (mca_cfg.ser ?MCI_STATUS_S :MCI_STATUS_UC ))) -continue ; +if ((flags &MCP_UC ) || !(m.status &MCI_STATUS_UC )) + goto log_it; + +/* +* Newer Intel systems that support software error +* recovery need to make additional checks. Other +* CPUs should skip over uncorrected errors, but log +* everything else. +*/ +if (!mca_cfg.ser) { +if (m.status &MCI_STATUS_UC ) +continue ; + goto log_it; + } + +/* Log "not enabled" (speculative) errors */ +if (!(m.status &MCI_STATUS_EN )) + goto log_it; + +/* +* Log UCNA (SDM: 15.6.3 "UCR Error Classification") +* UC == 1 && PCC == 0 && S == 0 +*/ +if (!(m.status &MCI_STATUS_PCC ) && !(m.status &MCI_STATUS_S )) + goto log_it; + +/* +* Skip anything else. Presumption is that our read of this +* bank is racing with a machine check. Leave the log alone +* for do_machine_check() to deal with it. +*/ +continue ; +log_it: error_seen = true;mce_read_aux (&m, i);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 306/405 rcutorture: Fix cleanup path for invalid torture_type strings
In reply to Greg Kroah-Hartman[ Upstream commit b813afae7ab6a5e91b4e16cc567331d9c2ae1f04 ]
If the specified rcutorture.torture_type is not in the rcu_torture_init() function's torture_ops[] array, rcutorture prints some console messages and then invokes rcu_torture_cleanup() to set state so that a future torture test can run. However, rcu_torture_cleanup() also attempts to end the test that didn't actually start, and in doing so relies on the value of cur_ops, a value that is not particularly relevant in this case. This can result in confusing output or even follow-on failures due to attempts to use facilities that have not been properly initialized.
This commit therefore sets the value of cur_ops to NULL in this case and inserts a check near the beginning of rcu_torture_cleanup(), thus avoiding relying on an irrelevant cur_ops value.
--- kernel/rcu/rcutorture.c | 5 +++++ 1 file changed, 5 insertions(+)
kernel/rcu/rcutorture.c +5 -0
@@ -2094,6 +2094,10 @@ rcu_torture_cleanup(void) cur_ops->cb_barrier ();return ; } +if (!cur_ops) { +torture_cleanup_end (); +return ; + }rcu_torture_barrier_cleanup ();torture_stop_kthread (rcu_torture_fwd_prog, fwd_prog_task);
@@ -2267,6 +2271,7 @@ rcu_torture_init(void)pr_cont ("\n" );WARN_ON (!IS_MODULE (CONFIG_RCU_TORTURE_TEST )); firsterr = -EINVAL ; + cur_ops =NULL ; goto unwind; }if (cur_ops->fqs ==NULL && fqs_duration !=0 ) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 307/405 x86/mce: Handle varying MCA bank counts
In reply to Greg Kroah-Hartman[ Upstream commit 006c077041dc73b9490fffc4c6af5befe0687110 ]
Linux reads MCG_CAP[Count] to find the number of MCA banks visible to a CPU. Currently, this number is the same for all CPUs and a warning is shown if there is a difference. The number of banks is overwritten with the MCG_CAP[Count] value of each following CPU that boots.
According to the Intel SDM and AMD APM, the MCG_CAP[Count] value gives the number of banks that are available to a "processor implementation". The AMD BKDGs/PPRs further clarify that this value is per core. This value has historically been the same for every core in the system, but that is not an architectural requirement.
Future AMD systems may have different MCG_CAP[Count] values per core, so the assumption that all CPUs will have the same MCG_CAP[Count] value will no longer be valid.
Also, the first CPU to boot will allocate the struct mce_banks[] array using the number of banks based on its MCG_CAP[Count] value. The machine check handler and other functions use the global number of banks to iterate and index into the mce_banks[] array. So it's possible to use an out-of-bounds index on an asymmetric system where a following CPU sees a MCG_CAP[Count] value greater than its predecessors.
Thus, allocate the mce_banks[] array to the maximum number of banks. This will avoid the potential out-of-bounds index since the value of mca_cfg.banks is capped to MAX_NR_BANKS.
Set the value of mca_cfg.banks equal to the max of the previous value and the value for the current CPU. This way mca_cfg.banks will always represent the max number of banks detected on any CPU in the system.
This will ensure that all CPUs will access all the banks that are visible to them. A CPU that can access fewer than the max number of banks will find the registers of the extra banks to be read-as-zero.
Furthermore, print the resulting number of MCA banks in use. Do this in mcheck_late_init() so that the final value is printed after all CPUs have been initialized.
Finally, get bank count from target CPU when doing injection with mce-inject module.
[ bp: Remove out-of-bounds example, passify and cleanup commit message. ]
--- arch/x86/kernel/cpu/mce/core.c | 22 +++++++--------------- arch/x86/kernel/cpu/mce/inject.c | 14 +++++++------- 2 files changed, 14 insertions(+), 22 deletions(-)
arch/x86/kernel/cpu/mce/core.c +7 -15
@@ -1481,13 +1481,12 @@ EXPORT_SYMBOL_GPL(mce_notify_irq);static int __mcheck_cpu_mce_banks_init (void ) {int i; -u8 num_banks = mca_cfg.banks; - mce_banks =kcalloc (num_banks,sizeof (struct mce_bank ),GFP_KERNEL ); + mce_banks =kcalloc (MAX_NR_BANKS ,sizeof (struct mce_bank ),GFP_KERNEL );if (!mce_banks)return -ENOMEM ; -for (i =0 ; i < num_banks; i++) { +for (i =0 ; i <MAX_NR_BANKS ; i++) {struct mce_bank *b = &mce_banks[i]; b->ctl =-1ULL ;
@@ -1501,28 +1500,19 @@ static int __mcheck_cpu_mce_banks_init(void)*/ static int __mcheck_cpu_cap_init (void ) { -unsigned b;u64 cap; +u8 b;rdmsrl (MSR_IA32_MCG_CAP , cap); b = cap &MCG_BANKCNT_MASK ; -if (!mca_cfg.banks) -pr_info ("CPU supports %d MCE banks\n" , b); - -if (b >MAX_NR_BANKS ) { -pr_warn ("Using only %u machine check banks out of %u\n" , -MAX_NR_BANKS , b); +if (WARN_ON_ONCE (b >MAX_NR_BANKS )) b =MAX_NR_BANKS ; - } -/* Don't support asymmetric configurations today */ -WARN_ON (mca_cfg.banks !=0 && b != mca_cfg.banks); - mca_cfg.banks = b; + mca_cfg.banks =max (mca_cfg.banks, b);if (!mce_banks) {int err =__mcheck_cpu_mce_banks_init (); -if (err)return err; }
@@ -2489,6 +2479,8 @@ EXPORT_SYMBOL_GPL(mcsafe_key);static int __init mcheck_late_init (void ) { +pr_info ("Using %d MCE banks\n" , mca_cfg.banks); +if (mca_cfg.recovery)static_branch_inc (&mcsafe_key);
arch/x86/kernel/cpu/mce/inject.c +7 -7
@@ -46,8 +46,6 @@static struct mce i_mce;static struct dentry *dfs_inj; -static u8 n_banks; -#define MAX_FLAG_OPT_SIZE 4#define NBCFG 0x44
@@ -570,9 +568,15 @@ static void do_inject(void)static int inj_bank_set (void *data,u64 val) {struct mce *m = (struct mce *)data; +u8 n_banks; +u64 cap; + +/* Get bank count on target CPU so we can handle non-uniform values. */ +rdmsrl_on_cpu (m->extcpu,MSR_IA32_MCG_CAP , &cap); + n_banks = cap &MCG_BANKCNT_MASK ;if (val >= n_banks) { -pr_err ("Non-existent MCE bank: %llu\n" , val); +pr_err ("MCA bank %llu non-existent on CPU%d\n" , val, m->extcpu);return -EINVAL ; }
@@ -665,10 +669,6 @@ static struct dfs_node {static int __init debugfs_init (void ) {unsigned int i; -u64 cap; - -rdmsrl (MSR_IA32_MCG_CAP , cap); - n_banks = cap &MCG_BANKCNT_MASK ; dfs_inj =debugfs_create_dir ("mce-inject" ,NULL );if (!dfs_inj)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 308/405 rcuperf: Fix cleanup path for invalid perf_type strings
In reply to Greg Kroah-Hartman[ Upstream commit ad092c027713a68a34168942a5ef422e42e039f4 ]
If the specified rcuperf.perf_type is not in the rcu_perf_init() function's perf_ops[] array, rcuperf prints some console messages and then invokes rcu_perf_cleanup() to set state so that a future torture test can run. However, rcu_perf_cleanup() also attempts to end the test that didn't actually start, and in doing so relies on the value of cur_ops, a value that is not particularly relevant in this case. This can result in confusing output or even follow-on failures due to attempts to use facilities that have not been properly initialized.
This commit therefore sets the value of cur_ops to NULL in this case and inserts a check near the beginning of rcu_perf_cleanup(), thus avoiding relying on an irrelevant cur_ops value.
--- kernel/rcu/rcuperf.c | 5 +++++ 1 file changed, 5 insertions(+)
kernel/rcu/rcuperf.c +5 -0
@@ -494,6 +494,10 @@ rcu_perf_cleanup(void)if (torture_cleanup_begin ())return ; +if (!cur_ops) { +torture_cleanup_end (); +return ; + }if (reader_tasks) {for (i =0 ; i < nrealreaders; i++)
@@ -614,6 +618,7 @@ rcu_perf_init(void)pr_cont ("\n" );WARN_ON (!IS_MODULE (CONFIG_RCU_PERF_TEST )); firsterr = -EINVAL ; + cur_ops =NULL ; goto unwind; }if (cur_ops->init)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 309/405 rcu: Do a single rhp->func read in rcu_head_after_call_rcu()
In reply to Greg Kroah-Hartman[ Upstream commit b699cce1604e828f19c39845252626eb78cdf38a ]
The rcu_head_after_call_rcu() function reads the rhp->func pointer twice, which can result in a false-positive WARN_ON_ONCE() if the callback were passed to call_rcu() between the two reads. Although racing rcu_head_after_call_rcu() with call_rcu() is to be a dubious use case (the return value is not reliable in that case), intermittent and irreproducible warnings are also quite dubious. This commit therefore uses a single READ_ONCE() to pick up the value of rhp->func once, then tests that value twice, thus guaranteeing consistent processing within rcu_head_after_call_rcu()().
Neverthless, racing rcu_head_after_call_rcu() with call_rcu() is still a dubious use case.
--- include/linux/rcupdate.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/rcupdate.h +4 -2
@@ -878,9 +878,11 @@ static inline void rcu_head_init(struct rcu_head *rhp)static inline bool rcu_head_after_call_rcu (struct rcu_head *rhp,rcu_callback_t f) { -if (READ_ONCE (rhp->func) == f) +rcu_callback_t func =READ_ONCE (rhp->func); + +if (func == f)return true; -WARN_ON_ONCE (READ_ONCE (rhp->func) != (rcu_callback_t )~0L ); +WARN_ON_ONCE (func != (rcu_callback_t )~0L );return false; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 310/405 x86/platform/uv: Fix missing checks of kcalloc() return values
In reply to Greg Kroah-Hartman[ Upstream commit 766460852cfaeca4042e5f3aeb9616b3689147bc ]
Handle potential errors returned from kcalloc().
[ bp: rewrite commit message. ]
--- arch/x86/platform/uv/tlb_uv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/platform/uv/tlb_uv.c +6 -1
@@ -2133,14 +2133,19 @@ static int __init summarize_uvhub_sockets(int nuvhubs,*/ static int __init init_per_cpu (int nuvhubs,int base_part_pnode) { -unsigned char *uvhub_mask;struct uvhub_desc *uvhub_descs; +unsigned char *uvhub_mask =NULL ;if (is_uv3_hub () ||is_uv2_hub () ||is_uv1_hub ()) timeout_us =calculate_destination_timeout (); uvhub_descs =kcalloc (nuvhubs,sizeof (struct uvhub_desc ),GFP_KERNEL ); +if (!uvhub_descs) + goto fail; + uvhub_mask =kzalloc ((nuvhubs+7 )/8 ,GFP_KERNEL ); +if (!uvhub_mask) + goto fail;if (get_cpu_topology (base_part_pnode, uvhub_descs, uvhub_mask)) goto fail;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 311/405 RDMA/rxe: Fix slab-out-bounds access which lead to kernel crash later
In reply to Greg Kroah-Hartman[ Upstream commit a4b7013db23e93824ac53083eeb3e4efdef4b5b0 ]
BUG: KASAN: slab-out-of-bounds in rxe_mem_init_user+0x6c1/0x740 [rdma_rxe] Read of size 8 at addr ffff88805c01a608 by task ib_send_bw/573 CPU: 24 PID: 573 Comm: ib_send_bw Not tainted 5.0.0-rc5+ #189 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014 Call Trace: rxe_mem_init_user+0x6c1/0x740 [rdma_rxe] rxe_reg_user_mr+0x9b/0x110 [rdma_rxe] ib_uverbs_reg_mr+0x428/0x9c0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2b0/0x410 [ib_uverbs] ib_uverbs_run_method+0x79c/0x1da0 [ib_uverbs] rxe_mem_init_user+0x6c1/0x740 [rdma_rxe] rxe_reg_user_mr+0x9b/0x110 [rdma_rxe] ib_uverbs_reg_mr+0x428/0x9c0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2b0/0x410 [ib_uverbs] ib_uverbs_run_method+0x79c/0x1da0 [ib_uverbs] ib_uverbs_cmd_verbs+0x5f2/0xf20 [ib_uverbs] ib_uverbs_ioctl+0x202/0x310 [ib_uverbs] do_vfs_ioctl+0x193/0x1440 ksys_ioctl+0x3a/0x70 __x64_sys_ioctl+0x6f/0xb0 do_syscall_64+0x13f/0x570 entry_SYSCALL_64_after_hwframe+0x49/0xbe Allocated by task 573: __kasan_kmalloc.constprop.5+0xc1/0xd0 __kmalloc+0x161/0x310 rxe_mem_alloc+0x52/0x470 [rdma_rxe] rxe_mem_init_user+0x113/0x740 [rdma_rxe] rxe_reg_user_mr+0x9b/0x110 [rdma_rxe] ib_uverbs_reg_mr+0x428/0x9c0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2b0/0x410 [ib_uverbs] ib_uverbs_run_method+0x79c/0x1da0 [ib_uverbs] ib_uverbs_cmd_verbs+0x5f2/0xf20 [ib_uverbs] ib_uverbs_ioctl+0x202/0x310 [ib_uverbs] do_vfs_ioctl+0x193/0x1440 ksys_ioctl+0x3a/0x70 __x64_sys_ioctl+0x6f/0xb0 do_syscall_64+0x13f/0x570 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: __kasan_slab_free+0x12e/0x180 kfree+0x10a/0x2c0 rcu_process_callbacks+0xa77/0x1260 __do_softirq+0x2ad/0xacb
Test scenario:
ib_send_bw -x 1 -d rxe0 -a &
ib_send_bw -x 1 -d rxe0 -a localhost
--- drivers/infiniband/sw/rxe/rxe_mr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/infiniband/sw/rxe/rxe_mr.c +6 -5
@@ -199,6 +199,12 @@ int rxe_mem_init_user(struct rxe_pd *pd, u64 start, buf = map[0 ]->buf;for_each_sg_page (umem->sg_head.sgl, &sg_iter, umem->nmap,0 ) { +if (num_buf >=RXE_BUF_PER_MAP ) { + map++; + buf = map[0 ]->buf; + num_buf =0 ; + } + vaddr =page_address (sg_page_iter_page (&sg_iter));if (!vaddr) {pr_warn ("null vaddr\n" );
@@ -211,11 +217,6 @@ int rxe_mem_init_user(struct rxe_pd *pd, u64 start, num_buf++; buf++; -if (num_buf >=RXE_BUF_PER_MAP ) { - map++; - buf = map[0 ]->buf; - num_buf =0 ; - } } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 312/405 spi: stm32-qspi: add spi_master_put in release function
In reply to Greg Kroah-Hartman[ Upstream commit a88eceb17ac7e8dc4ad9995681af61c8371668f4 ]
This patch adds spi_master_put in release function to drop the controller's refcount.
--- drivers/spi/spi-stm32-qspi.c | 46 ++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 18 deletions(-)
drivers/spi/spi-stm32-qspi.c +28 -18
@@ -93,6 +93,7 @@ struct stm32_qspi_flash {struct stm32_qspi {struct device *dev; +struct spi_controller *ctrl;void __iomem *io_base;void __iomem *mm_base;resource_size_t mm_size;
@@ -397,6 +398,7 @@ static void stm32_qspi_release(struct stm32_qspi *qspi)writel_relaxed (0 , qspi->io_base +QSPI_CR );mutex_destroy (&qspi->lock);clk_disable_unprepare (qspi->clk); +spi_master_put (qspi->ctrl); }static int stm32_qspi_probe (struct platform_device *pdev)
@@ -413,43 +415,54 @@ static int stm32_qspi_probe(struct platform_device *pdev)return -ENOMEM ; qspi =spi_controller_get_devdata (ctrl); + qspi->ctrl = ctrl; res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"qspi" ); qspi->io_base =devm_ioremap_resource (dev, res); -if (IS_ERR (qspi->io_base)) -return PTR_ERR (qspi->io_base); +if (IS_ERR (qspi->io_base)) { + ret =PTR_ERR (qspi->io_base); + goto err; + } res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"qspi_mm" ); qspi->mm_base =devm_ioremap_resource (dev, res); -if (IS_ERR (qspi->mm_base)) -return PTR_ERR (qspi->mm_base); +if (IS_ERR (qspi->mm_base)) { + ret =PTR_ERR (qspi->mm_base); + goto err; + } qspi->mm_size =resource_size (res); -if (qspi->mm_size >STM32_QSPI_MAX_MMAP_SZ ) -return -EINVAL ; +if (qspi->mm_size >STM32_QSPI_MAX_MMAP_SZ ) { + ret = -EINVAL ; + goto err; + } irq =platform_get_irq (pdev,0 ); ret =devm_request_irq (dev, irq, stm32_qspi_irq,0 ,dev_name (dev), qspi);if (ret) {dev_err (dev,"failed to request irq\n" ); -return ret; + goto err; }init_completion (&qspi->data_completion); qspi->clk =devm_clk_get (dev,NULL ); -if (IS_ERR (qspi->clk)) -return PTR_ERR (qspi->clk); +if (IS_ERR (qspi->clk)) { + ret =PTR_ERR (qspi->clk); + goto err; + } qspi->clk_rate =clk_get_rate (qspi->clk); -if (!qspi->clk_rate) -return -EINVAL ; +if (!qspi->clk_rate) { + ret = -EINVAL ; + goto err; + } ret =clk_prepare_enable (qspi->clk);if (ret) {dev_err (dev,"can not enable the clock\n" ); -return ret; + goto err; } rstc =devm_reset_control_get_exclusive (dev,NULL );
@@ -472,14 +485,11 @@ static int stm32_qspi_probe(struct platform_device *pdev) ctrl->dev.of_node = dev->of_node; ret =devm_spi_register_master (dev, ctrl); -if (ret) - goto err_spi_register; - -return 0 ; +if (!ret) +return 0 ; -err_spi_register: +err:stm32_qspi_release (qspi); -return ret; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 313/405 usb: core: Add PM runtime calls to usb_hcd_platform_shutdown
In reply to Greg Kroah-Hartman[ Upstream commit 8ead7e817224d7832fe51a19783cb8fcadc79467 ]
If ohci-platform is runtime suspended, we can currently get an "imprecise external abort" on reboot with ohci-platform loaded when PM runtime is implemented for the SoC.
Let's fix this by adding PM runtime support to usb_hcd_platform_shutdown.
--- drivers/usb/core/hcd.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/hcd.c +3 -0
@@ -3020,6 +3020,9 @@ usb_hcd_platform_shutdown(struct platform_device *dev) {struct usb_hcd *hcd =platform_get_drvdata (dev); +/* No need for pm_runtime_put(), we're shutting down */ +pm_runtime_get_sync (&dev->dev); +if (hcd->driver->shutdown) hcd->driver->shutdown (hcd); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 314/405 ice: Fix for adaptive interrupt moderation
In reply to Greg Kroah-Hartman[ Upstream commit 64a59d05a4b3ddb37eb5ad3a3be0f17148f449f5 ]
commit 63f545ed1285 ("ice: Add support for adaptive interrupt moderation") was meant to add support for adaptive interrupt moderation but there was an error on my part while formatting the patch, and thus only part of the patch ended up being submitted.
This patch rectifies the error by adding the rest of the code.
--- drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_txrx.c | 292 ++++++++++++++++++++-- drivers/net/ethernet/intel/ice/ice_txrx.h | 6 + 3 files changed, 275 insertions(+), 24 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +1 -0
@@ -277,6 +277,7 @@ struct ice_q_vector {* value to the device */ u8 intrl; +u8 itr_countdown;/* when 0 should adjust adaptive ITR */ }____cacheline_internodealigned_in_smp ;enum ice_pf_flags {
drivers/net/ethernet/intel/ice/ice_txrx.c +268 -24
331 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_txrx.h +6 -0
@@ -128,6 +128,12 @@ enum ice_rx_dtype {#define ICE_ITR_MASK 0x1FFE/* ITR register value alignment mask */ #define ITR_REG_ALIGN (setting) __ALIGN_MASK(setting, ~ICE_ITR_MASK) +#define ICE_ITR_ADAPTIVE_MIN_INC 0x0002 +#define ICE_ITR_ADAPTIVE_MIN_USECS 0x0002 +#define ICE_ITR_ADAPTIVE_MAX_USECS 0x00FA +#define ICE_ITR_ADAPTIVE_LATENCY 0x8000 +#define ICE_ITR_ADAPTIVE_BULK 0x0000 +#define ICE_DFLT_INTRL 0/* Legacy or Advanced Mode Queue */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 315/405 scsi: qla4xxx: avoid freeing unallocated dma memory
In reply to Greg Kroah-Hartman[ Upstream commit 608f729c31d4caf52216ea00d20092a80959256d ]
Clang -Wuninitialized notices that on is_qla40XX we never allocate any DMA memory in get_fw_boot_info() but attempt to free it anyway:
drivers/scsi/qla4xxx/ql4_os.c:5915:7: error: variable 'buf_dma' is used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (!(val & 0x07)) {
^~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5985:47: note: uninitialized use occurs here
dma_free_coherent(&ha->pdev->dev, size, buf, buf_dma);
^~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5915:3: note: remove the 'if' if its condition is always true
if (!(val & 0x07)) {
^~~~~~~~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5885:20: note: initialize the variable 'buf_dma' to silence this warning
dma_addr_t buf_dma;
^
= 0Skip the call to dma_free_coherent() here.
--- drivers/scsi/qla4xxx/ql4_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla4xxx/ql4_os.c +1 -1
@@ -5930,7 +5930,7 @@ static int get_fw_boot_info(struct scsi_qla_host *ha, uint16_t ddb_index[]) val =rd_nvram_byte (ha, sec_addr);if (val &BIT_7 ) ddb_index[1 ] = (val &0x7f ); - + goto exit_boot_info; }else if (is_qla80XX (ha)) { buf =dma_alloc_coherent (&ha->pdev->dev, size, &buf_dma,GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 316/405 scsi: lpfc: avoid uninitialized variable warning
In reply to Greg Kroah-Hartman[ Upstream commit faf5a744f4f8d76e7c03912b5cd381ac8045f6ec ]
clang -Wuninitialized incorrectly sees a variable being used without initialization:
drivers/scsi/lpfc/lpfc_nvme.c:2102:37: error: variable 'localport' is uninitialized when used here
[-Werror,-Wuninitialized]
lport = (struct lpfc_nvme_lport *)localport->private;
^~~~~~~~~
drivers/scsi/lpfc/lpfc_nvme.c:2059:38: note: initialize the variable 'localport' to silence this warning
struct nvme_fc_local_port *localport;
^
= NULL1 error generated.
This is clearly in dead code, as the condition leading up to it is always false when CONFIG_NVME_FC is disabled, and the variable is always initialized when nvme_fc_register_localport() got called successfully.
Change the preprocessor conditional to the equivalent C construct, which makes the code more readable and gets rid of the warning.
--- drivers/scsi/lpfc/lpfc_nvme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_nvme.c +4 -4
@@ -2080,15 +2080,15 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport) lpfc_nvme_template.max_hw_queues = phba->sli4_hba.num_present_cpu; +if (!IS_ENABLED (CONFIG_NVME_FC )) +return ret; +/* localport is allocated from the stack, but the registration * call allocates heap memory as well as the private area. */ -#if (IS_ENABLED (CONFIG_NVME_FC )) + ret =nvme_fc_register_localport (&nfcp_info, &lpfc_nvme_template, &vport->phba->pcidev->dev, &localport); -#else - ret = -ENOMEM ; -#endif if (!ret) {lpfc_printf_vlog (vport,KERN_INFO ,LOG_NVME |LOG_NVME_DISC , "6005 Successfully registered local "
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 317/405 media: vicodec: bugfix - call v4l2_m2m_buf_copy_metadata also if decoding fails
In reply to Greg Kroah-Hartman[ Upstream commit 8eead25cbdf911e17cff321903bd3397bc6ea22c ]
The function 'v4l2_m2m_buf_copy_metadata' should be called even if decoding/encoding ends with status VB2_BUF_STATE_ERROR, so that the metadata is copied from the source buffer to the dest buffer.
--- drivers/media/platform/vicodec/vicodec-core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/media/platform/vicodec/vicodec-core.c +9 -8
@@ -159,12 +159,10 @@ static int device_process(struct vicodec_ctx *ctx, struct vb2_v4l2_buffer *dst_vb) {struct vicodec_dev *dev = ctx->dev; -struct vicodec_q_data *q_dst;struct v4l2_fwht_state *state = &ctx->state;u8 *p_src, *p_dst;int ret; - q_dst =get_q_data (ctx,V4L2_BUF_TYPE_VIDEO_CAPTURE );if (ctx->is_enc) p_src =vb2_plane_vaddr (&src_vb->vb2_buf,0 );else
@@ -186,8 +184,10 @@ static int device_process(struct vicodec_ctx *ctx,return ret;vb2_set_plane_payload (&dst_vb->vb2_buf,0 , ret); }else { +struct vicodec_q_data *q_dst;unsigned int comp_frame_size =ntohl (ctx->state.header.size); + q_dst =get_q_data (ctx,V4L2_BUF_TYPE_VIDEO_CAPTURE );if (comp_frame_size > ctx->comp_max_size)return -EINVAL ; state->info = q_dst->info;
@@ -196,11 +196,6 @@ static int device_process(struct vicodec_ctx *ctx,return ret;vb2_set_plane_payload (&dst_vb->vb2_buf,0 , q_dst->sizeimage); } - - dst_vb->sequence = q_dst->sequence++; - dst_vb->flags &= ~V4L2_BUF_FLAG_LAST ; -v4l2_m2m_buf_copy_metadata (src_vb, dst_vb, !ctx->is_enc); -return 0 ; }
@@ -274,16 +269,22 @@ static void device_run(void *priv)struct vicodec_ctx *ctx = priv;struct vicodec_dev *dev = ctx->dev;struct vb2_v4l2_buffer *src_buf, *dst_buf; -struct vicodec_q_data *q_src; +struct vicodec_q_data *q_src, *q_dst;u32 state; src_buf =v4l2_m2m_next_src_buf (ctx->fh.m2m_ctx); dst_buf =v4l2_m2m_dst_buf_remove (ctx->fh.m2m_ctx); q_src =get_q_data (ctx,V4L2_BUF_TYPE_VIDEO_OUTPUT ); + q_dst =get_q_data (ctx,V4L2_BUF_TYPE_VIDEO_CAPTURE ); state =VB2_BUF_STATE_DONE ;if (device_process (ctx, src_buf, dst_buf)) state =VB2_BUF_STATE_ERROR ; +else + dst_buf->sequence = q_dst->sequence++; + dst_buf->flags &= ~V4L2_BUF_FLAG_LAST ; +v4l2_m2m_buf_copy_metadata (src_buf, dst_buf, !ctx->is_enc); + ctx->last_dst_buf = dst_buf;spin_lock (ctx->lock);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 318/405 ice: Prevent unintended multiple chain resets
In reply to Greg Kroah-Hartman[ Upstream commit 2ebd4428d93a2f6ce0c813b10a1a43b6a8241fe5 ]
In the current implementation of ice_reset_subtask, if multiple reset types are set in the pf->state, the most intrusive one is meant to be performed only, but the bits requesting the other types are not being cleared. This would lead to another reset being performed the next time the service task is scheduled.
Change the flow of ice_reset_subtask so that all reset request bits in pf->state are cleared, and we still perform the most intrusive of the resets requested.
--- drivers/net/ethernet/intel/ice/ice_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +8 -2
@@ -416,8 +416,14 @@ static void ice_reset_subtask(struct ice_pf *pf)* for the reset now), poll for reset done, rebuild and return. */ if (test_bit (__ICE_RESET_OICR_RECV, pf->state)) { -clear_bit (__ICE_GLOBR_RECV, pf->state); -clear_bit (__ICE_CORER_RECV, pf->state); +/* Perform the largest reset requested */ +if (test_and_clear_bit (__ICE_CORER_RECV, pf->state)) + reset_type =ICE_RESET_CORER ; +if (test_and_clear_bit (__ICE_GLOBR_RECV, pf->state)) + reset_type =ICE_RESET_GLOBR ; +/* return if no valid reset type requested */ +if (reset_type ==ICE_RESET_INVAL ) +return ;if (!test_bit (__ICE_PREPARED_FOR_RESET, pf->state))ice_prepare_for_reset (pf);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 319/405 selinux: avoid uninitialized variable warning
In reply to Greg Kroah-Hartman[ Upstream commit 98bbbb76f2edcfb8fb2b8f4b3ccc7b6e99d64bd8 ]
clang correctly points out a code path that would lead to an uninitialized variable use:
security/selinux/netlabel.c:310:6: error: variable 'addr' is used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
if (ip_hdr(skb)->version == 4) {
^~~~~~~~~~~~~~~~~~~~~~~~~
security/selinux/netlabel.c:322:40: note: uninitialized use occurs here
rc = netlbl_conn_setattr(ep->base.sk, addr, &secattr);
^~~~
security/selinux/netlabel.c:310:2: note: remove the 'if' if its condition is always true
if (ip_hdr(skb)->version == 4) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/selinux/netlabel.c:291:23: note: initialize the variable 'addr' to silence this warning
struct sockaddr *addr;
^
= NULLThis is probably harmless since we should not see ipv6 packets of CONFIG_IPV6 is disabled, but it's better to rearrange the code so this cannot happen.
--- security/selinux/netlabel.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
security/selinux/netlabel.c +5 -9
@@ -288,11 +288,8 @@ int selinux_netlbl_sctp_assoc_request(struct sctp_endpoint *ep,int rc;struct netlbl_lsm_secattr secattr;struct sk_security_struct *sksec = ep->base.sk->sk_security; -struct sockaddr *addr;struct sockaddr_in addr4; -#if IS_ENABLED (CONFIG_IPV6 )struct sockaddr_in6 addr6; -#endif if (ep->base.sk->sk_family !=PF_INET && ep->base.sk->sk_family !=PF_INET6 )
@@ -310,16 +307,15 @@ int selinux_netlbl_sctp_assoc_request(struct sctp_endpoint *ep,if (ip_hdr (skb)->version ==4 ) { addr4.sin_family =AF_INET ; addr4.sin_addr.s_addr =ip_hdr (skb)->saddr; - addr = (struct sockaddr *)&addr4; -#if IS_ENABLED (CONFIG_IPV6 ) - } else { + rc =netlbl_conn_setattr (ep->base.sk, (void *)&addr4, &secattr); + }else if (IS_ENABLED (CONFIG_IPV6 ) &&ip_hdr (skb)->version ==6 ) { addr6.sin6_family =AF_INET6 ; addr6.sin6_addr =ipv6_hdr (skb)->saddr; - addr = (struct sockaddr *)&addr6; -#endif + rc =netlbl_conn_setattr (ep->base.sk, (void *)&addr6, &secattr); + }else { + rc = -EAFNOSUPPORT ; } - rc =netlbl_conn_setattr (ep->base.sk, addr, &secattr);if (rc ==0 ) sksec->nlbl_state =NLBL_LABELED ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 320/405 batman-adv: allow updating DAT entry timeouts on incoming ARP Replies
In reply to Greg Kroah-Hartman[ Upstream commit 099e6cc1582dc2903fecb898bbeae8f7cf4262c7 ]
Currently incoming ARP Replies, for example via a DHT-PUT message, do not update the timeout for an already existing DAT entry. These ARP Replies are dropped instead.
This however defeats the purpose of the DHCPACK snooping, for instance. Right now, a DAT entry in the DHT will be purged every five minutes, likely leading to a mesh-wide ARP Request broadcast after this timeout. Which then recreates the entry. The idea of the DHCPACK snooping is to be able to update an entry before a timeout happens, to avoid ARP Request flooding.
This patch fixes this issue by updating a DAT entry on incoming ARP Replies even if a matching DAT entry already exists. While still filtering the ARP Reply towards the soft-interface, to avoid duplicate messages on the client device side.
--- net/batman-adv/distributed-arp-table.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/batman-adv/distributed-arp-table.c +3 -1
@@ -1444,7 +1444,6 @@ bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv, hw_src, &ip_src, hw_dst, &ip_dst, dat_entry->mac_addr, &dat_entry->ip); dropped = true; - goto out; }/* Update our internal cache with both the IP addresses the node got
@@ -1453,6 +1452,9 @@ bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,batadv_dat_entry_add (bat_priv, ip_src, hw_src, vid);batadv_dat_entry_add (bat_priv, ip_dst, hw_dst, vid); +if (dropped) + goto out; +/* If BLA is enabled, only forward ARP replies if we have claimed the * source of the ARP reply or if no one else of the same backbone has * already claimed that client. This prevents that different gateways
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 321/405 dmaengine: tegra210-adma: use devm_clk_*() helpers
In reply to Greg Kroah-Hartman[ Upstream commit f6ed6491d565c336a360471e0c29228e34f4380e ]
adma driver is using pm_clk_*() interface for managing clock resources. With this it is observed that clocks remain ON always. This happens on Tegra devices which use BPMP co-processor to manage clock resources, where clocks are enabled during prepare phase. This is necessary because clocks to BPMP are always blocking. When pm_clk_*() interface is used on such Tegra devices, clock prepare count is not balanced till remove call happens for the driver and hence clocks are seen ON always. Thus this patch replaces pm_clk_*() with devm_clk_*() framework.
--- drivers/dma/tegra210-adma.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-)
drivers/dma/tegra210-adma.c +12 -15
@@ -22,7 +22,6 @@#include <linux/of_device.h> #include <linux/of_dma.h> #include <linux/of_irq.h> -#include <linux/pm_clock.h> #include <linux/pm_runtime.h> #include <linux/slab.h>
@@ -141,6 +140,7 @@ struct tegra_adma {struct dma_device dma_dev;struct device *dev;void __iomem *base_addr; +struct clk *ahub_clk;unsigned int nr_channels;unsigned long rx_requests_reserved;unsigned long tx_requests_reserved;
@@ -637,8 +637,9 @@ static int tegra_adma_runtime_suspend(struct device *dev)struct tegra_adma *tdma =dev_get_drvdata (dev); tdma->global_cmd =tdma_read (tdma,ADMA_GLOBAL_CMD ); +clk_disable_unprepare (tdma->ahub_clk); -return pm_clk_suspend (dev); +return 0 ; }static int tegra_adma_runtime_resume (struct device *dev)
@@ -646,10 +647,11 @@ static int tegra_adma_runtime_resume(struct device *dev)struct tegra_adma *tdma =dev_get_drvdata (dev);int ret; - ret =pm_clk_resume (dev); -if (ret) + ret =clk_prepare_enable (tdma->ahub_clk); +if (ret) { +dev_err (dev,"ahub clk_enable failed: %d\n" , ret);return ret; - + }tdma_write (tdma,ADMA_GLOBAL_CMD , tdma->global_cmd);return 0 ;
@@ -693,13 +695,11 @@ static int tegra_adma_probe(struct platform_device *pdev)if (IS_ERR (tdma->base_addr))return PTR_ERR (tdma->base_addr); - ret =pm_clk_create (&pdev->dev); -if (ret) -return ret; - - ret =of_pm_clk_add_clk (&pdev->dev,"d_audio" ); -if (ret) - goto clk_destroy; + tdma->ahub_clk =devm_clk_get (&pdev->dev,"d_audio" ); +if (IS_ERR (tdma->ahub_clk)) { +dev_err (&pdev->dev,"Error: Missing ahub controller clock\n" ); +return PTR_ERR (tdma->ahub_clk); + }pm_runtime_enable (&pdev->dev);
@@ -776,8 +776,6 @@ static int tegra_adma_probe(struct platform_device *pdev)pm_runtime_put_sync (&pdev->dev); rpm_disable:pm_runtime_disable (&pdev->dev); -clk_destroy: -pm_clk_destroy (&pdev->dev);return ret; }
@@ -795,7 +793,6 @@ static int tegra_adma_remove(struct platform_device *pdev)pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev); -pm_clk_destroy (&pdev->dev);return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 322/405 x86/CPU/hygon: Fix phys_proc_id calculation logic for multi-die processors
In reply to Greg Kroah-Hartman[ Upstream commit e0ceeae708cebf22c990c3d703a4ca187dc837f5 ]
The Hygon family 18h multi-die processor platform supports 1, 2 or 4-Dies per socket. The topology looks like this:
System View (with 1-Die 2-Socket):
|------------|
------ -----
SOCKET0 | D0 | | D1 | SOCKET1
------ -----System View (with 2-Die 2-socket):
--------------------
| -------------|------
| | | |
------------ ------------
SOCKET0 | D1 -- D0 | | D3 -- D2 | SOCKET1
------------ ------------System View (with 4-Die 2-Socket) :
--------------------
| -------------|------
| | | |
------------ ------------
| D1 -- D0 | | D7 -- D6 |
| | \/ | | | | \/ | |
SOCKET0 | | /\ | | | | /\ | | SOCKET1
| D2 -- D3 | | D4 -- D5 |
------------ ------------
| | | |
------|------------| |
--------------------Currently
phys_proc_id = initial_apicid >> bits
calculates the physical processor ID from the initial_apicid by shifting *bits*.
However, this does not work for 1-Die and 2-Die 2-socket systems.
According to document [1] section 2.1.11.1, the bits is the value of CPUID_Fn80000008_ECX[12:15]. The possible values are 4, 5 or 6 which mean:
4 - 1 die
5 - 2 dies
6 - 3/4 dies.
Hygon programs the initial ApicId the same way as AMD. The ApicId is read from CPUID_Fn00000001_EBX (see section 2.1.11.1 of referrence [1]) and the definition is as below (see section 2.1.10.2.1.3 of [1]):
-------------------------------------------------
Bit | 6 | 5 4 | 3 | 2 1 0 |
|-----------|---------|--------|----------------|
IDs | Socket ID | Node ID | CCX ID | Core/Thread ID |
-------------------------------------------------So for 3/4-Die configurations, the bits variable is 6, which is the same as the ApicID definition field.
For 1-Die and 2-Die configurations, bits is 4 or 5, which will cause the right shifted result to not be exactly the value of socket ID.
However, the socket ID should be obtained from ApicId[6]. To fix the problem and match the ApicID field definition, set the shift bits to 6 for all Hygon family 18h multi-die CPUs.
Because AMD doesn't have 2-Socket systems with 1-Die/2-Die processors (see reference [2]), this doesn't need to be changed on the AMD side but only for Hygon.
[1] https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf
[2] https://www.amd.com/en/products/specifications/processors
[bp: heavily massage commit message. ]
--- arch/x86/kernel/cpu/hygon.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/x86/kernel/cpu/hygon.c +5 -0
@@ -19,6 +19,8 @@#include "cpu.h" +#define APICID_SOCKET_ID_BIT 6 +/* * nodes_per_socket: Stores the number of nodes per socket. * Refer to CPUID Fn8000_001E_ECX Node Identifiers[10:8]
@@ -87,6 +89,9 @@ static void hygon_get_topology(struct cpuinfo_x86 *c)if (!err) c->x86_coreid_bits =get_count_order (c->x86_max_cores); +/* Socket ID is ApicId[6] for these processors. */ + c->phys_proc_id = c->apicid >>APICID_SOCKET_ID_BIT ; +cacheinfo_hygon_init_llc_id (c, cpu, node_id); }else if (cpu_has (c,X86_FEATURE_NODEID_MSR )) {u64 value;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 323/405 net/mlx5e: Fix compilation warning in en_tc.c
In reply to Greg Kroah-Hartman[ Upstream commit ee576ec1c1c66ec1cd0c4735bb12bc08f675f530 ]
Amazingly a mlx5e_tc function is being called from the eswitch layer, which is by itself very terrible! The function was declared locally in eswitch_offloads.c so it could be used there, which caused the following compilation warning, fix that.
drivers/.../mlx5/core/en_tc.c:3242:6: [-Werror=missing-prototypes]
error: no previous prototype for ‘mlx5e_tc_clean_fdb_peer_flows’
--- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +3 -0
@@ -431,6 +431,9 @@ static inline int mlx5_eswitch_index_to_vport_num(struct mlx5_eswitch *esw, return index; } +/* TODO: This mlx5e_tc function shouldn't be called by eswitch */ +void mlx5e_tc_clean_fdb_peer_flows (struct mlx5_eswitch *esw); +#else /* CONFIG_MLX5_ESWITCH */ /* eswitch API stubs */ static inline int mlx5_eswitch_init (struct mlx5_core_dev *dev) {return 0 ; }
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +0 -2
@@ -1521,8 +1521,6 @@ static int mlx5_esw_offloads_pair(struct mlx5_eswitch *esw,return 0 ; } -void mlx5e_tc_clean_fdb_peer_flows (struct mlx5_eswitch *esw); -static void mlx5_esw_offloads_unpair (struct mlx5_eswitch *esw) {mlx5e_tc_clean_fdb_peer_flows (esw);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 324/405 staging: mt7621-mmc: Check for nonzero number of scatterlist entries
In reply to Greg Kroah-Hartman[ Upstream commit d4223e06b6aed581625f574ad8faa71b6c0fc903 ]
The buffer descriptor setup loop is correct only if it is setting up at least one bd struct. Besides, there is an error if dma_map_sg() returns 0, which is possible and must be handled.
Additionally, remove the BUG_ON() checking sglen, which is unnecessary because we configure DMA with that constraint during init.
--- drivers/staging/mt7621-mmc/sd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/staging/mt7621-mmc/sd.c +7 -2
@@ -596,8 +596,6 @@ static void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma,struct bd *bd;u32 j; -BUG_ON (sglen >MAX_BD_NUM );/* not support currently */ - gpd = dma->gpd; bd = dma->bd;
@@ -692,6 +690,13 @@ static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq) data->sg_count =dma_map_sg (mmc_dev (mmc), data->sg, data->sg_len,mmc_get_dma_dir (data)); + +if (data->sg_count ==0 ) { +dev_err (mmc_dev (host->mmc),"failed to map DMA for transfer\n" ); + data->error = -ENOMEM ; + goto done; + } +msdc_dma_setup (host, &host->dma, data->sg, data->sg_count);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 325/405 hwrng: omap - Set default quality
In reply to Greg Kroah-Hartman[ Upstream commit 62f95ae805fa9e1e84d47d3219adddd97b2654b7 ]
Newer combinations of the glibc, kernel and openssh can result in long initial startup times on OMAP devices:
[ 6.671425] systemd-rc-once[102]: Creating ED25519 key; this may take some time ... [ 142.652491] systemd-rc-once[102]: Creating ED25519 key; done.
due to the blocking getrandom(2) system call:
[ 142.610335] random: crng init done
Set the quality level for the omap hwrng driver allowing the kernel to use the hwrng as an entropy source at boot.
--- drivers/char/hw_random/omap-rng.c | 1 + 1 file changed, 1 insertion(+)
drivers/char/hw_random/omap-rng.c +1 -0
@@ -443,6 +443,7 @@ static int omap_rng_probe(struct platform_device *pdev) priv->rng.read = omap_rng_do_read; priv->rng.init = omap_rng_init; priv->rng.cleanup = omap_rng_cleanup; + priv->rng.quality =900 ; priv->rng.priv = (unsigned long )priv;platform_set_drvdata (pdev, priv);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 326/405 thunderbolt: Fix to check return value of ida_simple_get
In reply to Greg Kroah-Hartman[ Upstream commit 9aabb68568b473bf2f0b179d053b403961e42e4d ]
In enumerate_services, ida_simple_get on failure can return an error and leaks memory. The patch ensures that the dev_set_name is set on non failure cases, and releases memory during failure.
--- drivers/thunderbolt/xdomain.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/thunderbolt/xdomain.c +7 -1
@@ -740,6 +740,7 @@ static void enumerate_services(struct tb_xdomain *xd)struct tb_service *svc;struct tb_property *p;struct device *dev; +int id;/* * First remove all services that are not available anymore in
@@ -768,7 +769,12 @@ static void enumerate_services(struct tb_xdomain *xd)break ; } - svc->id =ida_simple_get (&xd->service_ids,0 ,0 ,GFP_KERNEL ); + id =ida_simple_get (&xd->service_ids,0 ,0 ,GFP_KERNEL ); +if (id <0 ) { +kfree (svc); +break ; + } + svc->id = id; svc->dev.bus = &tb_bus_type; svc->dev.type = &tb_service_type; svc->dev.parent = &xd->dev;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 327/405 thunderbolt: Fix to check for kmemdup failure
In reply to Greg Kroah-Hartman[ Upstream commit 2cc12751cf464a722ff57b54d17d30c84553f9c0 ]
Memory allocated via kmemdup might fail and return a NULL pointer. This patch adds a check on the return value of kmemdup and passes the error upstream.
--- drivers/thunderbolt/switch.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
drivers/thunderbolt/switch.c +16 -6
@@ -1287,13 +1287,14 @@ int tb_switch_configure(struct tb_switch *sw)return tb_plug_events_active (sw, true); } -static void tb_switch_set_uuid (struct tb_switch *sw) +static int tb_switch_set_uuid (struct tb_switch *sw) {u32 uuid[4 ]; -int cap; +int cap, ret; + ret =0 ;if (sw->uuid) -return ; +return ret;/* * The newer controllers include fused UUID as part of link
@@ -1301,7 +1302,9 @@ static void tb_switch_set_uuid(struct tb_switch *sw)*/ cap =tb_switch_find_vse_cap (sw,TB_VSE_CAP_LINK_CONTROLLER );if (cap >0 ) { -tb_sw_read (sw, uuid,TB_CFG_SWITCH , cap +3 ,4 ); + ret =tb_sw_read (sw, uuid,TB_CFG_SWITCH , cap +3 ,4 ); +if (ret) +return ret; }else {/* * ICM generates UUID based on UID and fills the upper
@@ -1316,6 +1319,9 @@ static void tb_switch_set_uuid(struct tb_switch *sw) } sw->uuid =kmemdup (uuid,sizeof (uuid),GFP_KERNEL ); +if (!sw->uuid) + ret = -ENOMEM ; +return ret; }static int tb_switch_add_dma_port (struct tb_switch *sw)
@@ -1365,7 +1371,9 @@ static int tb_switch_add_dma_port(struct tb_switch *sw)if (status) {tb_sw_info (sw,"switch flash authentication failed\n" ); -tb_switch_set_uuid (sw); + ret =tb_switch_set_uuid (sw); +if (ret) +return ret;nvm_set_auth_status (sw, status); }
@@ -1415,7 +1423,9 @@ int tb_switch_add(struct tb_switch *sw) }tb_sw_dbg (sw,"uid: %#llx\n" , sw->uid); -tb_switch_set_uuid (sw); + ret =tb_switch_set_uuid (sw); +if (ret) +return ret;for (i =0 ; i <= sw->config.max_port_number; i++) {if (sw->ports[i].disabled) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 328/405 spi: export tracepoint symbols to modules
In reply to Greg Kroah-Hartman[ Upstream commit ca1438dcb34c7fcad63b6ce14ea63a870b92a69b ]
The newly added tracepoints in the spi-mxs driver cause a link error when the driver is a loadable module:
ERROR: "__tracepoint_spi_transfer_stop" [drivers/spi/spi-mxs.ko] undefined!
ERROR: "__tracepoint_spi_transfer_start" [drivers/spi/spi-mxs.ko] undefined!
I'm not quite sure where to put the export statements, but directly after the inclusion of the header seems as good as any other place.
--- drivers/spi/spi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi.c +2 -0
@@ -36,6 +36,8 @@#define CREATE_TRACE_POINTS #include <trace/events/spi.h> +EXPORT_TRACEPOINT_SYMBOL (spi_transfer_start); +EXPORT_TRACEPOINT_SYMBOL (spi_transfer_stop);#include "internals.h"
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 329/405 regulator: add regulator_get_linear_step() stub helper
In reply to Greg Kroah-Hartman[ Upstream commit 7287275b4301e230be9e4569431c7dacb67ebc13 ]
The regulator header has empty inline functions for most interfaces, but not regulator_get_linear_step(), which has just grown a user that does not depend on regulators otherwise:
drivers/clk/tegra/clk-tegra124-dfll-fcpu.c: In function 'get_alignment_from_regulator':drivers/clk/tegra/clk-tegra124-dfll-fcpu.c:555:19: error: implicit declaration of function 'regulator_get_linear_step'; did you mean 'regulator_get_drvdata'? [-Werror=implicit-function-declaration]
align->step_uv = regulator_get_linear_step(reg);
^~~~~~~~~~~~~~~~~~~~~~~~~
regulator_get_drvdatacc1: all warnings being treated as errorsscripts/Makefile.build:278: recipe for target 'drivers/clk/tegra/clk-tegra124-dfll-fcpu.o' failed
Add the missing stub along the others.
--- include/linux/regulator/consumer.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/regulator/consumer.h +5 -0
@@ -478,6 +478,11 @@ static inline int regulator_is_supported_voltage(struct regulator *regulator,return 0 ; } +static inline unsigned int regulator_get_linear_step (struct regulator *regulator) +{ +return 0 ; +} +static inline int regulator_set_current_limit (struct regulator *regulator,int min_uA,int max_uA) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 330/405 drm/amd/display: fix releasing planes when exiting odm
In reply to Greg Kroah-Hartman[ Upstream commit bc2193992b00488f5734613ac95b78ef2d2803ab ]
Releasing planes should not release the 2nd odm pipe right away, this change leaves us with 2 pipes with null planes and same stream when planes are released during odm.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -2
@@ -1266,10 +1266,12 @@ bool dc_remove_plane_from_context(* For head pipe detach surfaces from pipe for tail * pipe just zero it out */ -if (!pipe_ctx->top_pipe) { +if (!pipe_ctx->top_pipe || + (!pipe_ctx->top_pipe->top_pipe && + pipe_ctx->top_pipe->stream_res.opp != pipe_ctx->stream_res.opp)) { pipe_ctx->plane_state =NULL ; pipe_ctx->bottom_pipe =NULL ; - }else { + }else {memset (pipe_ctx,0 ,sizeof (*pipe_ctx)); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 331/405 drm/amd/display: Link train only when link is DP and backend is enabled
In reply to Greg Kroah-Hartman[ Upstream commit 66acd4418d7de131ef3831e52a8af3d2480e5b15 ]
[Why]
In certain cases we do link training when we don't have a backend.
[How]
In dc_link_set_preferred_link_settings(), store preferred link settings first and then verify that the link is DP and the link stream's backend is enabled. If either is false, then we will not do any link retraining.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +12 -1
@@ -524,6 +524,14 @@ void dc_link_set_preferred_link_settings(struct dc *dc,struct dc_stream_state *link_stream;struct dc_link_settings store_settings = *link_setting; + link->preferred_link_setting = store_settings; + +/* Retrain with preferred link settings only relevant for +* DP signal type +*/ +if (!dc_is_dp_signal (link->connector_signal)) +return ; +for (i =0 ; i <MAX_PIPES ; i++) { pipe = &dc->current_state->res_ctx.pipe_ctx[i];if (pipe->stream && pipe->stream->link) {
@@ -538,7 +546,10 @@ void dc_link_set_preferred_link_settings(struct dc *dc, link_stream = link->dc->current_state->res_ctx.pipe_ctx[i].stream; - link->preferred_link_setting = store_settings; +/* Cannot retrain link if backend is off */ +if (link_stream->dpms_off) +return ; +if (link_stream)decide_link_settings (link_stream, &store_settings);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 332/405 drm/amd/display: Update ABM crtc state on non-modeset
In reply to Greg Kroah-Hartman[ Upstream commit b05e2c5e81f9a0be4a145e0926b1dfe62f6347d4 ]
[Why]
Somewhere in the atomic check reshuffle ABM got lost. ABM is a crtc property (copied from a connector property). It can change without a modeset, just like underscan.
[How]
In the skip_modeset branch of atomic check crtc updates, copy over the abm property.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -5661,6 +5661,9 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,update_stream_scaling_settings ( &new_crtc_state->mode, dm_new_conn_state, dm_new_crtc_state->stream); +/* ABM settings */ + dm_new_crtc_state->abm_level = dm_new_conn_state->abm_level; +/* * Color management settings. We also update color properties * when a modeset is needed, to ensure it gets reprogrammed.
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 333/405 drm/amd/display: Reset alpha state for planes to the correct values
In reply to Greg Kroah-Hartman[ Upstream commit eec3d5efd16d13984a88396b685ae17462fb6d87 ]
[Why]
The plane_reset callback is subclassed but hasn't been updated since the drm helper got updated to include resetting alpha related state (state->alpha and state->pixel_blend_mode). The overlay planes exposed by amdgpu_dm were therefore being rendered as invisible by default ever since supported was exposed for alpha blending properties on overlays.
This caused regressions in igt@kms_plane_multiple@atomic-tiling-none and igt@kms_plane@plane-position-covered-pipe tests.
[How]
Reset the plane state values to their correct values as defined in the drm helper.
This fixes the IGT test regression.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -3587,6 +3587,8 @@ static void dm_drm_plane_reset(struct drm_plane *plane) plane->state = &amdgpu_state->base; plane->state->plane = plane; plane->state->rotation =DRM_MODE_ROTATE_0 ; + plane->state->alpha =DRM_BLEND_ALPHA_OPAQUE ; + plane->state->pixel_blend_mode =DRM_MODE_BLEND_PREMULTI ; } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 334/405 thunderbolt: property: Fix a NULL pointer dereference
In reply to Greg Kroah-Hartman[ Upstream commit 106204b56f60abf1bead7dceb88f2be3e34433da ]
In case kzalloc fails, the fix releases resources and returns -ENOMEM to avoid the NULL pointer dereference.
--- drivers/thunderbolt/property.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/thunderbolt/property.c +5 -0
@@ -548,6 +548,11 @@ int tb_property_add_data(struct tb_property_dir *parent, const char *key, property->length = size /4 ; property->value.data =kzalloc (size,GFP_KERNEL ); +if (!property->value.data) { +kfree (property); +return -ENOMEM ; + } +memcpy (property->value.data, buf, buflen);list_add_tail (&property->list, &parent->properties);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 335/405 media: v4l2-fwnode: The first default data lane is 0 on C-PHY
In reply to Greg Kroah-Hartman[ Upstream commit fff35d45e16fae125c6000cb87e254cb634ac7fb ]
C-PHY has no clock lanes. Therefore the first data lane is 0 by default.
--- drivers/media/v4l2-core/v4l2-fwnode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-fwnode.c +5 -1
@@ -225,6 +225,10 @@ static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode,if (bus_type ==V4L2_MBUS_CSI2_DPHY || bus_type ==V4L2_MBUS_CSI2_CPHY || lanes_used || have_clk_lane || (flags & ~V4L2_MBUS_CSI2_CONTINUOUS_CLOCK )) { +/* Only D-PHY has a clock lane. */ +unsigned int dfl_data_lane_index = + bus_type ==V4L2_MBUS_CSI2_DPHY ; + bus->flags = flags;if (bus_type ==V4L2_MBUS_UNKNOWN ) vep->bus_type =V4L2_MBUS_CSI2_DPHY ;
@@ -233,7 +237,7 @@ static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode,if (use_default_lane_mapping) { bus->clock_lane =0 ;for (i =0 ; i < num_data_lanes; i++) - bus->data_lanes[i] =1 + i; + bus->data_lanes[i] = dfl_data_lane_index + i; }else { bus->clock_lane = clock_lane;for (i =0 ; i < num_data_lanes; i++)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 336/405 media: ov7670: restore default settings after power-up
In reply to Greg Kroah-Hartman[ Upstream commit 32ab688b280301f7cee9e547564cb74e33e06322 ]
Since commit 3d6a8fe25605 ("media: ov7670: hook s_power onto v4l2 core"), the device is actually powered off while the video stream is stopped.
The frame format and framerate are restored right after power-up, but restoring the default register settings is forgotten.
--- drivers/media/i2c/ov7670.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/i2c/ov7670.c +1 -0
@@ -1664,6 +1664,7 @@ static int ov7670_s_power(struct v4l2_subdev *sd, int on)if (on) {ov7670_power_on (sd); +ov7670_init (sd,0 );ov7670_apply_fmt (sd);ov7675_apply_framerate (sd);v4l2_ctrl_handler_setup (&info->hdl);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 337/405 media: staging/intel-ipu3: mark PM function as __maybe_unused
In reply to Greg Kroah-Hartman[ Upstream commit 948dff7cfa1d7653e7828e7b905863bd24ca5c02 ]
The imgu_rpm_dummy_cb() looks like an API misuse that is explained in the comment above it. Aside from that, it also causes a warning when power management support is disabled:
drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function]
The warning is at least easy to fix by marking the function as __maybe_unused.
--- drivers/staging/media/ipu3/ipu3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3.c +1 -1
@@ -791,7 +791,7 @@ static int __maybe_unused imgu_resume(struct device *dev)* PCI rpm framework checks the existence of driver rpm callbacks. * Place a dummy callback here to avoid rpm going into error state. */ -static int imgu_rpm_dummy_cb (struct device *dev) +static __maybe_unused int imgu_rpm_dummy_cb (struct device *dev) {return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 338/405 media: vicodec: reset last_src/dst_buf based on the IS_OUTPUT
In reply to Greg Kroah-Hartman[ Upstream commit 76eb24fc233b8c94b2156ead5811e08d2046ad58 ]
When start_streaming was called both last_src_buf and last_dst_buf pointers were set to NULL, but this depends on whether the capture or output queue starts streaming.
When decoding with resolution changes in between the capture queue has to restart streaming whenever a resolution change occurs. And that would reset last_src_buf as well, which causes a problem if the decoder was stopped by the application. Since last_src_buf is now NULL, the LAST flag is never set for the last capture buffer.
--- drivers/media/platform/vicodec/vicodec-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/platform/vicodec/vicodec-core.c +5 -2
@@ -1339,8 +1339,11 @@ static int vicodec_start_streaming(struct vb2_queue *q, chroma_div = info->width_div * info->height_div; q_data->sequence =0 ; - ctx->last_src_buf =NULL ; - ctx->last_dst_buf =NULL ; +if (V4L2_TYPE_IS_OUTPUT (q->type)) + ctx->last_src_buf =NULL ; +else + ctx->last_dst_buf =NULL ; + state->gop_cnt =0 ; if ((V4L2_TYPE_IS_OUTPUT(q->type) && !ctx->is_enc) ||
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 339/405 ice: Fix issue with VF reset and multiple VFs support on PFs
In reply to Greg Kroah-Hartman[ Upstream commit 42b2cc83afb4d1afcf7794148dd4e8e45ba32943 ]
This patch fixes issues with VF queues being disabled, and VF netdev network carrier being lost after reset. Basically, we need to check if VF is enabled, and queue configured in reset_all_vfs flow, and disable/enable those queues appropriately whenever the function is called after Global/CORER/PFR reset/rebuild/replay.
--- .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +13 -7
@@ -764,6 +764,7 @@ static void ice_cleanup_and_realloc_vf(struct ice_vf *vf)bool ice_reset_all_vfs (struct ice_pf *pf,bool is_vflr) {struct ice_hw *hw = &pf->hw; +struct ice_vf *vf;int v, i;/* If we don't have any VFs, then there is nothing to reset */
@@ -778,12 +779,17 @@ bool ice_reset_all_vfs(struct ice_pf *pf, bool is_vflr)for (v =0 ; v < pf->num_alloc_vfs; v++)ice_trigger_vf_reset (&pf->vf[v], is_vflr); -/* Call Disable LAN Tx queue AQ call with VFR bit set and 0 -* queues to inform Firmware about VF reset. -*/ -for (v =0 ; v < pf->num_alloc_vfs; v++) -ice_dis_vsi_txq (pf->vsi[0 ]->port_info,0 ,NULL ,NULL , -ICE_VF_RESET , v,NULL ); +for (v =0 ; v < pf->num_alloc_vfs; v++) { +struct ice_vsi *vsi; + + vf = &pf->vf[v]; + vsi = pf->vsi[vf->lan_vsi_idx]; +if (test_bit (ICE_VF_STATE_ENA , vf->vf_states)) { +ice_vsi_stop_lan_tx_rings (vsi,ICE_VF_RESET , vf->vf_id); +ice_vsi_stop_rx_rings (vsi); +clear_bit (ICE_VF_STATE_ENA , vf->vf_states); + } + }/* HW requires some time to make sure it can flush the FIFO for a VF * when it resets it. Poll the VPGEN_VFRSTAT register for each VF in
@@ -796,9 +802,9 @@ bool ice_reset_all_vfs(struct ice_pf *pf, bool is_vflr)/* Check each VF in sequence */ while (v < pf->num_alloc_vfs) { -struct ice_vf *vf = &pf->vf[v];u32 reg; + vf = &pf->vf[v]; reg =rd32 (hw,VPGEN_VFRSTAT (vf->vf_id));if (!(reg &VPGEN_VFRSTAT_VFRD_M ))break ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 340/405 e1000e: Disable runtime PM on CNP+
In reply to Greg Kroah-Hartman[ Upstream commit 459d69c407f9ba122f12216555c3012284dc9fd7 ]
There are some new e1000e devices can only be woken up from D3 one time, by plugging Ethernet cable. Subsequent cable plugging does set PME bit correctly, but it still doesn't get woken up.
Since e1000e connects to the root complex directly, we rely on ACPI to wake it up. In this case, the GPE from _PRW only works once and stops working after that. Though it appears to be a platform bug, e1000e maintainers confirmed that I219 does not support D3.
So disable runtime PM on CNP+ chips. We may need to disable earlier generations if this bug also hit older platforms.
Bugzilla: https://bugzilla.kernel.org/attachment.cgi?id=280819
--- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -7350,7 +7350,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)dev_pm_set_driver_flags (&pdev->dev,DPM_FLAG_NEVER_SKIP ); -if (pci_dev_run_wake (pdev)) +if (pci_dev_run_wake (pdev) && hw->mac.type < e1000_pch_cnp)pm_runtime_put_noidle (&pdev->dev);return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 341/405 tinydrm/mipi-dbi: Use dma-safe buffers for all SPI transfers
In reply to Greg Kroah-Hartman[ Upstream commit a89bfc5d9a0732d84b4de311e27133daa0586316 ]
Buffers passed to spi_sync() must be dma-safe even for tiny buffers since some SPI controllers use DMA for all transfers.
Example splat with CONFIG_DMA_API_DEBUG enabled:
[ 23.750467] DMA-API: dw_dmac_pci 0000:00:15.0: device driver maps memory from stack [probable addr=000000001e49185d] [ 23.750529] WARNING: CPU: 1 PID: 1296 at kernel/dma/debug.c:1161 check_for_stack+0xb7/0x190 [ 23.750533] Modules linked in: mmc_block(+) spi_pxa2xx_platform(+) pwm_lpss_pci pwm_lpss spi_pxa2xx_pci sdhci_pci cqhci intel_mrfld_pwrbtn extcon_intel_mrfld sdhci intel_mrfld_adc led_class mmc_core ili9341 mipi_dbi tinydrm backlight ti_ads7950 industrialio_triggered_buffer kfifo_buf intel_soc_pmic_mrfld hci_uart btbcm [ 23.750599] CPU: 1 PID: 1296 Comm: modprobe Not tainted 5.0.0-rc7+ #236 [ 23.750605] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48 [ 23.750620] RIP: 0010:check_for_stack+0xb7/0x190 [ 23.750630] Code: 8b 6d 50 4d 85 ed 75 04 4c 8b 6d 10 48 89 ef e8 2f 8b 44 00 48 89 c6 4a 8d 0c 23 4c 89 ea 48 c7 c7 88 d0 82 b4 e8 40 7c f9 ff <0f> 0b 8b 05 79 00 4b 01 85 c0 74 07 5b 5d 41 5c 41 5d c3 8b 05 54 [ 23.750637] RSP: 0000:ffff97bbc0292fa0 EFLAGS: 00010286 [ 23.750646] RAX: 0000000000000000 RBX: ffff97bbc0290000 RCX: 0000000000000006 [ 23.750652] RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff94b33e115450 [ 23.750658] RBP: ffff94b33c8578b0 R08: 0000000000000002 R09: 00000000000201c0 [ 23.750664] R10: 00000006ecb0ccc6 R11: 0000000000034f38 R12: 000000000000316c [ 23.750670] R13: ffff94b33c84b250 R14: ffff94b33dedd5a0 R15: 0000000000000001 [ 23.750679] FS: 0000000000000000(0000) GS:ffff94b33e100000(0063) knlGS:00000000f7faf690 [ 23.750686] CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 [ 23.750691] CR2: 00000000f7f54faf CR3: 000000000722c000 CR4: 00000000001006e0 [ 23.750696] Call Trace: [ 23.750713] debug_dma_map_sg+0x100/0x340 [ 23.750727] ? dma_direct_map_sg+0x3b/0xb0 [ 23.750739] spi_map_buf+0x25a/0x300 [ 23.750751] __spi_pump_messages+0x2a4/0x680 [ 23.750762] __spi_sync+0x1dd/0x1f0 [ 23.750773] spi_sync+0x26/0x40 [ 23.750790] mipi_dbi_typec3_command_read+0x14d/0x240 [mipi_dbi] [ 23.750802] ? spi_finalize_current_transfer+0x10/0x10 [ 23.750821] mipi_dbi_typec3_command+0x1bc/0x1d0 [mipi_dbi]
--- drivers/gpu/drm/tinydrm/ili9225.c | 6 ++-- drivers/gpu/drm/tinydrm/mipi-dbi.c | 58 +++++++++++++++++++++--------- include/drm/tinydrm/mipi-dbi.h | 5 +-- 3 files changed, 48 insertions(+), 21 deletions(-)
drivers/gpu/drm/tinydrm/ili9225.c +3 -3
@@ -301,7 +301,7 @@ static void ili9225_pipe_disable(struct drm_simple_display_pipe *pipe) mipi->enabled = false; } -static int ili9225_dbi_command (struct mipi_dbi *mipi,u8 cmd,u8 *par, +static int ili9225_dbi_command (struct mipi_dbi *mipi,u8 *cmd,u8 *par,size_t num) {struct spi_device *spi = mipi->spi;
@@ -311,11 +311,11 @@ static int ili9225_dbi_command(struct mipi_dbi *mipi, u8 cmd, u8 *par,gpiod_set_value_cansleep (mipi->dc,0 ); speed_hz =mipi_dbi_spi_cmd_max_speed (spi,1 ); - ret =tinydrm_spi_transfer (spi, speed_hz,NULL ,8 , &cmd,1 ); + ret =tinydrm_spi_transfer (spi, speed_hz,NULL ,8 , cmd,1 );if (ret || !num)return ret; -if (cmd ==ILI9225_WRITE_DATA_TO_GRAM && !mipi->swap_bytes) +if (*cmd ==ILI9225_WRITE_DATA_TO_GRAM && !mipi->swap_bytes) bpw =16 ;gpiod_set_value_cansleep (mipi->dc,1 );
drivers/gpu/drm/tinydrm/mipi-dbi.c +42 -16
130 lines not on this page · raw message
include/drm/tinydrm/mipi-dbi.h +3 -2
@@ -43,7 +43,7 @@ struct mipi_dbi {struct spi_device *spi;bool enabled;struct mutex cmdlock; -int (*command)(struct mipi_dbi *mipi,u8 cmd,u8 *param,size_t num); +int (*command)(struct mipi_dbi *mipi,u8 *cmd,u8 *param,size_t num);const u8 *read_commands;struct gpio_desc *dc;u16 *tx_buf;
@@ -82,6 +82,7 @@ u32 mipi_dbi_spi_cmd_max_speed(struct spi_device *spi, size_t len);int mipi_dbi_command_read (struct mipi_dbi *mipi,u8 cmd,u8 *val);int mipi_dbi_command_buf (struct mipi_dbi *mipi,u8 cmd,u8 *data,size_t len); +int mipi_dbi_command_stackbuf (struct mipi_dbi *mipi,u8 cmd,u8 *data,size_t len);int mipi_dbi_buf_copy (void *dst,struct drm_framebuffer *fb,struct drm_rect *clip,bool swap);/**
@@ -99,7 +100,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, #define mipi_dbi_command(mipi, cmd, seq...) \ ({ \ u8 d[] = { seq }; \ - mipi_dbi_command_buf(mipi, cmd, d, ARRAY_SIZE(d)); \ + mipi_dbi_command_stackbuf(mipi, cmd, d, ARRAY_SIZE(d)); \ })#ifdef CONFIG_DEBUG_FS
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 342/405 igb: Exclude device from suspend direct complete optimization
In reply to Greg Kroah-Hartman[ Upstream commit 5b6e13216be29ced7350d9c354a1af8fe0ad9a3e ]
igb sets different WoL settings in system suspend callback and runtime suspend callback.
The suspend direct complete optimization leaves igb in runtime suspended state with wrong WoL setting during system suspend.
To fix this, we need to disable suspend direct complete optimization to let igb always use suspend callback to set correct WoL during system suspend.
--- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/igb/igb_main.c +3 -0
@@ -3452,6 +3452,9 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)break ; } } + +dev_pm_set_driver_flags (&pdev->dev,DPM_FLAG_NEVER_SKIP ); +pm_runtime_put_noidle (&pdev->dev);return 0 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 343/405 media: si2165: fix a missing check of return value
In reply to Greg Kroah-Hartman[ Upstream commit 0ab34a08812a3334350dbaf69a018ee0ab3d2ddd ]
si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find that "val_tmp" will be an uninitialized value when regmap_read() fails. "val_tmp" is then assigned to "val". So if si2165_readreg8() fails, "val" will be a random value. Further use will lead to undefined behaviors. The fix checks if si2165_readreg8() fails, and if so, returns its error code upstream.
--- drivers/media/dvb-frontends/si2165.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/media/dvb-frontends/si2165.c +5 -3
@@ -275,18 +275,20 @@ static u32 si2165_get_fe_clk(struct si2165_state *state)static int si2165_wait_init_done (struct si2165_state *state) { -int ret = -EINVAL ; +int ret;u8 val =0 ;int i;for (i =0 ; i <3 ; ++i) { -si2165_readreg8 (state,REG_INIT_DONE , &val); + ret =si2165_readreg8 (state,REG_INIT_DONE , &val); +if (ret <0 ) +return ret;if (val ==0x01 )return 0 ;usleep_range (1000 ,50000 ); }dev_err (&state->client->dev,"init_done was not set\n" ); -return ret; +return -EINVAL ; } static int si2165_upload_firmware_block(struct si2165_state *state,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 344/405 media: dvbsky: Avoid leaking dvb frontend
In reply to Greg Kroah-Hartman[ Upstream commit fdfa59cd63b184e1e96d51ff170fcac739bc6f6f ]
Commit 14f4eaeddabc ("media: dvbsky: fix driver unregister logic") fixed a use-after-free by removing the reference to the frontend after deleting the backing i2c device.
This has the unfortunate side effect the frontend device is never freed in the dvb core leaving a dangling device, leading to errors when the dvb core tries to register the frontend after e.g. a replug as reported
here: https://www.spinics.net/lists/linux-media/msg138181.html
media: dvbsky: issues with DVBSky T680CI
===
[ 561.119145] sp2 8-0040: CIMaX SP2 successfully attached [ 561.119161] usb 2-3: DVB: registering adapter 0 frontend 0 (Silicon Labs Si2168)... [ 561.119174] sysfs: cannot create duplicate filename '/class/dvb/
dvb0.frontend0'
===
The use after free happened as dvb_usbv2_disconnect calls in this order:
- dvb_usb_device::props->exit(...)
- dvb_usbv2_adapter_frontend_exit(...)
+ if (fe) dvb_unregister_frontend(fe)
+ dvb_usb_device::props->frontend_detach(...)
Moving the release of the i2c device from exit() to frontend_detach() avoids the dangling pointer access and allows the core to unregister the frontend.
This was originally reported for a DVBSky T680CI, but it also affects the MyGica T230C. As all supported devices structure the registration/ unregistration identically, apply the change for all device types.
--- drivers/media/usb/dvb-usb-v2/dvbsky.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/media/usb/dvb-usb-v2/dvbsky.c +10 -8
@@ -615,16 +615,18 @@ static int dvbsky_init(struct dvb_usb_device *d)return 0 ; } -static void dvbsky_exit (struct dvb_usb_device *d) +static int dvbsky_frontend_detach (struct dvb_usb_adapter *adap) { +struct dvb_usb_device *d =adap_to_d (adap);struct dvbsky_state *state =d_to_priv (d); -struct dvb_usb_adapter *adap = &d->adapter[0 ]; + +dev_dbg (&d->udev->dev,"%s: adap=%d\n" , __func__, adap->id);dvb_module_release (state->i2c_client_tuner);dvb_module_release (state->i2c_client_demod);dvb_module_release (state->i2c_client_ci); - adap->fe[0 ] =NULL ; +return 0 ; }/* DVB USB Driver stuff */
@@ -640,11 +642,11 @@ static struct dvb_usb_device_properties dvbsky_s960_props = { .i2c_algo = &dvbsky_i2c_algo, .frontend_attach = dvbsky_s960_attach, + .frontend_detach = dvbsky_frontend_detach, .init = dvbsky_init, .get_rc_config = dvbsky_get_rc_config, .streaming_ctrl = dvbsky_streaming_ctrl, .identify_state = dvbsky_identify_state, - .exit = dvbsky_exit, .read_mac_address = dvbsky_read_mac_addr, .num_adapters = 1,
@@ -667,11 +669,11 @@ static struct dvb_usb_device_properties dvbsky_s960c_props = { .i2c_algo = &dvbsky_i2c_algo, .frontend_attach = dvbsky_s960c_attach, + .frontend_detach = dvbsky_frontend_detach, .init = dvbsky_init, .get_rc_config = dvbsky_get_rc_config, .streaming_ctrl = dvbsky_streaming_ctrl, .identify_state = dvbsky_identify_state, - .exit = dvbsky_exit, .read_mac_address = dvbsky_read_mac_addr, .num_adapters = 1,
@@ -694,11 +696,11 @@ static struct dvb_usb_device_properties dvbsky_t680c_props = { .i2c_algo = &dvbsky_i2c_algo, .frontend_attach = dvbsky_t680c_attach, + .frontend_detach = dvbsky_frontend_detach, .init = dvbsky_init, .get_rc_config = dvbsky_get_rc_config, .streaming_ctrl = dvbsky_streaming_ctrl, .identify_state = dvbsky_identify_state, - .exit = dvbsky_exit, .read_mac_address = dvbsky_read_mac_addr, .num_adapters = 1,
@@ -721,11 +723,11 @@ static struct dvb_usb_device_properties dvbsky_t330_props = { .i2c_algo = &dvbsky_i2c_algo, .frontend_attach = dvbsky_t330_attach, + .frontend_detach = dvbsky_frontend_detach, .init = dvbsky_init, .get_rc_config = dvbsky_get_rc_config, .streaming_ctrl = dvbsky_streaming_ctrl, .identify_state = dvbsky_identify_state, - .exit = dvbsky_exit, .read_mac_address = dvbsky_read_mac_addr, .num_adapters = 1,
@@ -748,11 +750,11 @@ static struct dvb_usb_device_properties mygica_t230c_props = { .i2c_algo = &dvbsky_i2c_algo, .frontend_attach = dvbsky_mygica_t230c_attach, + .frontend_detach = dvbsky_frontend_detach, .init = dvbsky_init, .get_rc_config = dvbsky_get_rc_config, .streaming_ctrl = dvbsky_streaming_ctrl, .identify_state = dvbsky_identify_state, - .exit = dvbsky_exit, .num_adapters = 1, .adapter = {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 345/405 media: m88ds3103: serialize reset messages in m88ds3103_set_frontend
In reply to Greg Kroah-Hartman[ Upstream commit 981fbe3da20a6f35f17977453bce7dfc1664d74f ]
Ref: https://bugzilla.kernel.org/show_bug.cgi?id=199323
Users are experiencing problems with the DVBSky S960/S960C USB devices since the following commit:
9d659ae: ("locking/mutex: Add lock handoff to avoid starvation")
The device malfunctions after running for an indeterminable period of time, and the problem can only be cleared by rebooting the machine.
It is possible to encourage the problem to surface by blocking the signal to the LNB.
Further debugging revealed the cause of the problem.
In the following capture:
- thread #1325 is running m88ds3103_set_frontend
- thread #42 is running ts2020_stat_work
a> [1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 07 80
[1325] usb 1-1: dvb_usb_v2_generic_io: <<< 08
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 68 3f
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 08 ff
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 60 3d
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07 ff
b> [1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 07 00
[1325] usb 1-1: dvb_usb_v2_generic_io: <<< 07
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 60 21
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07 ff
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 60 66
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07 ff [1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11 [1325] usb 1-1: dvb_usb_v2_generic_io: <<< 07 [1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 60 02 10 0b [1325] usb 1-1: dvb_usb_v2_generic_io: <<< 07
Two i2c messages are sent to perform a reset in m88ds3103_set_frontend:
a. 0x07, 0x80
b. 0x07, 0x00
However, as shown in the capture, the regmap mutex is being handed over to another thread (ts2020_stat_work) in between these two messages.
Quoted 1 line
From here, the device responds to every i2c message with an 07 message,
and will only return to normal operation following a power cycle.
Use regmap_multi_reg_write to group the two reset messages, ensuring both are processed before the regmap mutex is unlocked.
--- drivers/media/dvb-frontends/m88ds3103.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/media/dvb-frontends/m88ds3103.c +4 -5
@@ -309,6 +309,9 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)u16 u16tmp;u32 tuner_frequency_khz, target_mclk;s32 s32tmp; +static const struct reg_sequence reset_buf[] = { + {0x07 ,0x80 }, {0x07 ,0x00 } + }; dev_dbg(&client->dev, "delivery_system=%d modulation=%d frequency=%u symbol_rate=%d inversion=%d pilot=%d rolloff=%d\n",
@@ -321,11 +324,7 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe) }/* reset */ - ret =regmap_write (dev->regmap,0x07 ,0x80 ); -if (ret) - goto err; - - ret =regmap_write (dev->regmap,0x07 ,0x00 ); + ret =regmap_multi_reg_write (dev->regmap, reset_buf,2 );if (ret) goto err;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 346/405 drm/amd/display: add pipe lock during stream update
In reply to Greg Kroah-Hartman[ Upstream commit e6bddf6c67f9a3abf6f1ef75e52bc1cd228dfe4d ]
[why]
Stream update will adjust both info packets and stream params, need to make sure all things are applied togather.
[how]
add pipe lock during stream update
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -1677,6 +1677,7 @@ static void commit_planes_do_stream_update(struct dc *dc,continue ;if (stream_update->dpms_off) { + dc->hwss.pipe_control_lock (dc, pipe_ctx, true);if (*stream_update->dpms_off) {core_link_disable_stream (pipe_ctx,KEEP_ACQUIRED_RESOURCE ); dc->hwss.optimize_bandwidth (dc, dc->current_state);
@@ -1684,6 +1685,7 @@ static void commit_planes_do_stream_update(struct dc *dc, dc->hwss.prepare_bandwidth (dc, dc->current_state);core_link_enable_stream (dc->current_state, pipe_ctx); } + dc->hwss.pipe_control_lock (dc, pipe_ctx, false); }if (stream_update->abm_level && pipe_ctx->stream_res.abm) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 347/405 media: staging: davinci_vpfe: disallow building with COMPILE_TEST
In reply to Greg Kroah-Hartman[ Upstream commit 49dc762cffd8305a861ca649e82dc5533b3e3344 ]
The driver should really call dm365_isif_setup_pinmux() through a callback, but uses a hack to include a davinci specific machine header file when compile testing instead. This works almost everywhere, but not on the ARM omap1 platform, which has another header named mach/mux.h. This causes a build failure:
drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: implicit declaration of function 'davinci_cfg_reg' [-Werror,-Wimplicit-function-declaration]
davinci_cfg_reg(DM365_VIN_CAM_WEN);
^
drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:18: error: use of undeclared identifier 'DM365_VIN_CAM_WEN'
davinci_cfg_reg(DM365_VIN_CAM_WEN);
^
drivers/staging/media/davinci_vpfe/dm365_isif.c:2029:18: error: use of undeclared identifier 'DM365_VIN_CAM_VD'
davinci_cfg_reg(DM365_VIN_CAM_VD);
^
drivers/staging/media/davinci_vpfe/dm365_isif.c:2030:18: error: use of undeclared identifier 'DM365_VIN_CAM_HD'
davinci_cfg_reg(DM365_VIN_CAM_HD);
^
drivers/staging/media/davinci_vpfe/dm365_isif.c:2031:18: error: use of undeclared identifier 'DM365_VIN_YIN4_7_EN'
davinci_cfg_reg(DM365_VIN_YIN4_7_EN);
^
drivers/staging/media/davinci_vpfe/dm365_isif.c:2032:18: error: use of undeclared identifier 'DM365_VIN_YIN0_3_EN'
davinci_cfg_reg(DM365_VIN_YIN0_3_EN);
^7 errors generated.
Exclude omap1 from compile-testing, under the assumption that all others still work.
--- drivers/staging/media/davinci_vpfe/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/davinci_vpfe/Kconfig +1 -1
@@ -1,7 +1,7 @@ config VIDEO_DM365_VPFE tristate "DM365 VPFE Media Controller Capture Driver" depends on VIDEO_V4L2 - depends on (ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF) || COMPILE_TEST + depends on (ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF) || (COMPILE_TEST && !ARCH_OMAP1) depends on VIDEO_V4L2_SUBDEV_API depends on VIDEO_DAVINCI_VPBE_DISPLAY select VIDEOBUF2_DMA_CONTIG
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 348/405 drm/amd/display: Fix Divide by 0 in memory calculations
In reply to Greg Kroah-Hartman[ Upstream commit 59979bf8be1784ebfc44215031c6c88ca22ae65d ]
Check if we get any values equal to 0, and set to 1 if so.
--- .../drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +15 -5
@@ -406,15 +406,25 @@ void dpp1_dscl_calc_lb_num_partitions(int *num_part_y, int *num_part_c) { + int lb_memory_size, lb_memory_size_c, lb_memory_size_a, num_partitions_a, + lb_bpc, memory_line_size_y, memory_line_size_c, memory_line_size_a; +int line_size = scl_data->viewport.width < scl_data->recout.width ? scl_data->viewport.width : scl_data->recout.width;int line_size_c = scl_data->viewport_c.width < scl_data->recout.width ? scl_data->viewport_c.width : scl_data->recout.width; -int lb_bpc =dpp1_dscl_get_lb_depth_bpc (scl_data->lb_params.depth); -int memory_line_size_y = (line_size * lb_bpc +71 ) /72 ;/* +71 to ceil */ -int memory_line_size_c = (line_size_c * lb_bpc +71 ) /72 ;/* +71 to ceil */ -int memory_line_size_a = (line_size +5 ) /6 ;/* +5 to ceil */ -int lb_memory_size, lb_memory_size_c, lb_memory_size_a, num_partitions_a; + +if (line_size ==0 ) + line_size =1 ; + +if (line_size_c ==0 ) + line_size_c =1 ; + + + lb_bpc =dpp1_dscl_get_lb_depth_bpc (scl_data->lb_params.depth); + memory_line_size_y = (line_size * lb_bpc +71 ) /72 ;/* +71 to ceil */ + memory_line_size_c = (line_size_c * lb_bpc +71 ) /72 ;/* +71 to ceil */ + memory_line_size_a = (line_size +5 ) /6 ;/* +5 to ceil */ if (lb_config ==LB_MEMORY_CONFIG_1 ) { lb_memory_size =816 ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 349/405 drm/amd/display: Re-add custom degamma support
In reply to Greg Kroah-Hartman[ Upstream commit f91813992c343272813e707343b50f8d06383659 ]
[Why]
The dc_gamma_type CUSTOM_GAMMA is used to represent degamma mappings passed in by drm. This type of gamma must be interpolated into a transfer function by apply_1d_lut. The line in mod_color_calculate_degamma_params that handled this case was erroneously removed.
[How]
For CUSTOM_GAMMA degamma, calculate the lut as before.
--- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +2 -0
@@ -1854,6 +1854,8 @@ bool mod_color_calculate_degamma_params(struct dc_transfer_func *input_tf, coordinates_x, axis_x, curve,MAX_HW_POINTS , tf_pts, mapUserRamp && ramp && ramp->type == GAMMA_RGB_256); +if (ramp->type ==GAMMA_CUSTOM ) +apply_lut_1d (ramp,MAX_HW_POINTS , tf_pts); ret = true;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 350/405 drm/amd/display: half bandwidth for YCbCr420 during validation
In reply to Greg Kroah-Hartman[ Upstream commit 162f807858d15bde60cf373a3ad46e03200ad9d8 ]
[Why]
used to be unable to run 4:2:0 if using a dongle because 4k60 bandwidth exceeded dongle caps
[How]
half pixel clock during comparison to dongle cap. *Could get stuck on black screen on monitor that don't support 420 but will be selecting 420 as preferred mode*
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +20 -13
@@ -2074,11 +2074,28 @@ static void disable_link(struct dc_link *link, enum signal_type signal) } } +static uint32_t get_timing_pixel_clock_100hz (const struct dc_crtc_timing *timing) +{ + +uint32_t pxl_clk = timing->pix_clk_100hz; + +if (timing->pixel_encoding ==PIXEL_ENCODING_YCBCR420 ) + pxl_clk /=2 ; +else if (timing->pixel_encoding ==PIXEL_ENCODING_YCBCR422 ) + pxl_clk = pxl_clk *2 /3 ; + +if (timing->display_color_depth ==COLOR_DEPTH_101010 ) + pxl_clk = pxl_clk *10 /8 ; +else if (timing->display_color_depth ==COLOR_DEPTH_121212 ) + pxl_clk = pxl_clk *12 /8 ; + +return pxl_clk; +} +static bool dp_active_dongle_validate_timing (const struct dc_crtc_timing *timing,const struct dpcd_caps *dpcd_caps) { -unsigned int required_pix_clk_100hz = timing->pix_clk_100hz;const struct dc_dongle_caps *dongle_caps = &dpcd_caps->dongle_caps;switch (dpcd_caps->dongle_type) {
@@ -2115,13 +2132,6 @@ static bool dp_active_dongle_validate_timing(return false; } - -/* Check Color Depth and Pixel Clock */ -if (timing->pixel_encoding ==PIXEL_ENCODING_YCBCR420 ) - required_pix_clk_100hz /=2 ; -else if (timing->pixel_encoding ==PIXEL_ENCODING_YCBCR422 ) - required_pix_clk_100hz = required_pix_clk_100hz *2 /3 ; -switch (timing->display_color_depth) {case COLOR_DEPTH_666 :case COLOR_DEPTH_888 :
@@ -2130,14 +2140,11 @@ static bool dp_active_dongle_validate_timing(case COLOR_DEPTH_101010 :if (dongle_caps->dp_hdmi_max_bpc <10 )return false; - required_pix_clk_100hz = required_pix_clk_100hz *10 /8 ;break ;case COLOR_DEPTH_121212 :if (dongle_caps->dp_hdmi_max_bpc <12 )return false; - required_pix_clk_100hz = required_pix_clk_100hz *12 /8 ;break ; -case COLOR_DEPTH_141414 :case COLOR_DEPTH_161616 :default :
@@ -2145,7 +2152,7 @@ static bool dp_active_dongle_validate_timing(return false; } -if (required_pix_clk_100hz > (dongle_caps->dp_hdmi_max_pixel_clk *10 )) +if (get_timing_pixel_clock_100hz (timing) > (dongle_caps->dp_hdmi_max_pixel_clk *10 ))return false;return true;
@@ -2166,7 +2173,7 @@ enum dc_status dc_link_validate_mode_timing(return DC_OK ;/* Passive Dongle */ -if (0 != max_pix_clk && timing->pix_clk_100hz > max_pix_clk) +if (max_pix_clk !=0 &&get_timing_pixel_clock_100hz (timing) > max_pix_clk)return DC_EXCEED_DONGLE_CAP ;/* Active Dongle*/
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 351/405 drm/amd/display: Set stream->mode_changed when connectors change
In reply to Greg Kroah-Hartman[ Upstream commit b9952f93cd2cf5fca82b06a8179c0f5f7b769e83 ]
[Why]
The kms_plane@plane-position-covered-pipe-*-planes subtests can produce a sequence of atomic commits such that neither active_changed nor mode_changed but connectors_changed.
When this happens we remove the old stream from the context and add a new stream but the new stream doesn't have mode_changed=true set.
This incorrect programming sequence causes CRC mismatches to occur in the test.
The stream->mode_changed value should be set whenever a new stream is created.
[How]
A new stream is created whenever drm_atomic_crtc_needs_modeset is true. We previously covered the active_changed and mode_changed conditions for the CRTC but connectors_changed is also checked within drm_atomic_crtc_needs_modeset.
So just use drm_atomic_crtc_needs_modeset directly to determine the mode_changed flag.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
@@ -4955,8 +4955,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,static void amdgpu_dm_crtc_copy_transient_flags (struct drm_crtc_state *crtc_state,struct dc_stream_state *stream_state) { - stream_state->mode_changed = - crtc_state->mode_changed || crtc_state->active_changed; + stream_state->mode_changed =drm_atomic_crtc_needs_modeset (crtc_state); } static int amdgpu_dm_atomic_commit(struct drm_device *dev,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 352/405 scsi: ufs: fix a missing check of devm_reset_control_get
In reply to Greg Kroah-Hartman[ Upstream commit 63a06181d7ce169d09843645c50fea1901bc9f0a ]
devm_reset_control_get could fail, so the fix checks its return value and passes the error code upstream in case it fails.
--- drivers/scsi/ufs/ufs-hisi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/scsi/ufs/ufs-hisi.c +4 -0
@@ -587,6 +587,10 @@ static int ufs_hisi_init_common(struct ufs_hba *hba)ufshcd_set_variant (hba, host); host->rst =devm_reset_control_get (dev,"rst" ); +if (IS_ERR (host->rst)) { +dev_err (dev,"%s: failed to get reset control\n" , __func__); +return PTR_ERR (host->rst); + }ufs_hisi_set_pm_lvl (hba);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 353/405 media: vimc: stream: fix thread state before sleep
In reply to Greg Kroah-Hartman[ Upstream commit 2978a505aaa981b279ef359f74ba93d25098e0a0 ]
The state TASK_UNINTERRUPTIBLE should be set just before schedule_timeout() call, so it knows the sleep mode it should enter. There is no point in setting TASK_UNINTERRUPTIBLE at the initialization of the thread as schedule_timeout() will set the state back to TASK_RUNNING.
This fixes a warning in __might_sleep() call, as it's expecting the task to be in TASK_RUNNING state just before changing the state to a sleeping state.
--- drivers/media/platform/vimc/vimc-streamer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vimc/vimc-streamer.c +1 -1
@@ -120,7 +120,6 @@ static int vimc_streamer_thread(void *data)int i;set_freezable (); -set_current_state (TASK_UNINTERRUPTIBLE );for (;;) {try_to_freeze ();
@@ -137,6 +136,7 @@ static int vimc_streamer_thread(void *data)break ; }//wait for 60hz +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout (HZ /60 ); }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 354/405 media: gspca: do not resubmit URBs when streaming has stopped
In reply to Greg Kroah-Hartman[ Upstream commit e6f8bd59c28f758feea403a70d6c3ef28c50959f ]
When streaming is stopped all URBs are killed, but in fill_frame and in bulk_irq this results in an attempt to resubmit the killed URB. That is not what you want and causes spurious kernel messages.
So check if streaming has stopped before resubmitting.
Also check against gspca_dev->streaming rather than vb2_start_streaming_called() since vb2_start_streaming_called() will return true when in stop_streaming, but gspca_dev->streaming is set to false when stop_streaming is called.
--- drivers/media/usb/gspca/gspca.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/media/usb/gspca/gspca.c +6 -2
@@ -314,6 +314,8 @@ static void fill_frame(struct gspca_dev *gspca_dev, } resubmit: +if (!gspca_dev->streaming) +return ;/* resubmit the URB */ st =usb_submit_urb (urb,GFP_ATOMIC );if (st <0 )
@@ -330,7 +332,7 @@ static void isoc_irq(struct urb *urb)struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;gspca_dbg (gspca_dev,D_PACK ,"isoc irq\n" ); -if (!vb2_start_streaming_called (&gspca_dev->queue)) +if (!gspca_dev->streaming)return ;fill_frame (gspca_dev, urb); }
@@ -344,7 +346,7 @@ static void bulk_irq(struct urb *urb)int st;gspca_dbg (gspca_dev,D_PACK ,"bulk irq\n" ); -if (!vb2_start_streaming_called (&gspca_dev->queue)) +if (!gspca_dev->streaming)return ;switch (urb->status) {case 0 :
@@ -367,6 +369,8 @@ static void bulk_irq(struct urb *urb) urb->actual_length); resubmit: +if (!gspca_dev->streaming) +return ;/* resubmit the URB */ if (gspca_dev->cam.bulk_nurbs !=0 ) { st =usb_submit_urb (urb,GFP_ATOMIC );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 355/405 media: vicodec: avoid clang frame size warning
In reply to Greg Kroah-Hartman[ Upstream commit e855165f3dae6f71da859a5f00b85d5368641d61 ]
Clang-9 makes some different inlining decisions compared to gcc, which leads to a warning about a possible stack overflow problem when building with CONFIG_KASAN, including when setting asan-stack=0, which avoids most other frame overflow warnings:
drivers/media/platform/vicodec/codec-fwht.c:673:12: error: stack frame size of 2224 bytes in function 'encode_plane'
Manually adding noinline_for_stack annotations in those functions called by encode_plane() or decode_plane() that require a significant amount of kernel stack makes this impossible to happen with any compiler.
--- drivers/media/platform/vicodec/codec-fwht.c | 29 +++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-)
drivers/media/platform/vicodec/codec-fwht.c +18 -11
@@ -46,8 +46,12 @@ static const uint8_t zigzag[64] = { 63, }; - -static int rlc (const s16 *in,__be16 *output,int blocktype) +/* +* noinline_for_stack to work around +* https://bugs.llvm.org/show_bug.cgi?id=38809 +*/ +static int noinline_for_stack +rlc (const s16 *in,__be16 *output,int blocktype) {s16 block[8 *8 ];s16 *wp = block;
@@ -106,8 +110,8 @@ static int rlc(const s16 *in, __be16 *output, int blocktype)* This function will worst-case increase rlc_in by 65*2 bytes: * one s16 value for the header and 8 * 8 coefficients of type s16. */ -static u16 derlc (const __be16 **rlc_in,s16 *dwht_out, -const __be16 *end_of_input) +static noinline_for_stack u16 +derlc (const __be16 **rlc_in,s16 *dwht_out,const __be16 *end_of_input) {/* header */ const __be16 *input = *rlc_in;
@@ -240,8 +244,9 @@ static void dequantize_inter(s16 *coeff) *coeff <<= *quant; } -static void fwht (const u8 *block,s16 *output_block,unsigned int stride, -unsigned int input_step,bool intra) +static void noinline_for_stack fwht(const u8 *block, s16 *output_block, +unsigned int stride, +unsigned int input_step,bool intra) {/* we'll need more than 8 bits for the transformed coefficients */ s32 workspace1[8 ], workspace2[8 ];
@@ -373,7 +378,8 @@ static void fwht(const u8 *block, s16 *output_block, unsigned int stride,* Furthermore values can be negative... This is just a version that * works with 16 signed data */ -static void fwht16 (const s16 *block,s16 *output_block,int stride,int intra) +static void noinline_for_stack +fwht16 (const s16 *block,s16 *output_block,int stride,int intra) {/* we'll need more than 8 bits for the transformed coefficients */ s32 workspace1[8 ], workspace2[8 ];
@@ -456,7 +462,8 @@ static void fwht16(const s16 *block, s16 *output_block, int stride, int intra) } } -static void ifwht (const s16 *block,s16 *output_block,int intra) +static noinline_for_stack void +ifwht (const s16 *block,s16 *output_block,int intra) {/* * we'll need more than 8 bits for the transformed coefficients
@@ -604,9 +611,9 @@ static int var_inter(const s16 *old, const s16 *new)return ret; } -static int decide_blocktype (const u8 *cur,const u8 *reference, -s16 *deltablock,unsigned int stride, -unsigned int input_step) +static noinline_for_stack int +decide_blocktype (const u8 *cur,const u8 *reference,s16 *deltablock, +unsigned int stride,unsigned int input_step) {s16 tmp[64 ];s16 old[64 ];
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 356/405 media: go7007: avoid clang frame overflow warning with KASAN
In reply to Greg Kroah-Hartman[ Upstream commit ed713a4a1367aca5c0f2f329579465db00c17995 ]
clang-8 warns about one function here when KASAN is enabled, even without the 'asan-stack' option:
drivers/media/usb/go7007/go7007-fw.c:1551:5: warning: stack frame size of 2656 bytes in function
I have reported this issue in the llvm bugzilla, but to make it work with the clang-8 release, a small annotation is still needed.
--- drivers/media/usb/go7007/go7007-fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/go7007/go7007-fw.c +2 -2
@@ -1499,8 +1499,8 @@ static int modet_to_package(struct go7007 *go, __le16 *code, int space)return cnt; } -static int do_special (struct go7007 *go,u16 type,__le16 *code,int space, -int *framelen) +static noinline_for_stack int do_special(struct go7007 *go, u16 type, +__le16 *code,int space,int *framelen) {switch (type) {case SPECIAL_FRM_HEAD :
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 357/405 media: mtk-vcodec: fix access to vb2_v4l2_buffer struct
In reply to Greg Kroah-Hartman[ Upstream commit 3235d3946429f64b19addfd89fc926a36eaec06a ]
Commit 0650a91499e0 ("media: mtk-vcodec: Correct return type for mem2mem buffer helpers") fixed the return types for mem2mem buffer helper functions, but omitted two occurrences that are accessed in the mtk_v4l2_debug() macro. These only trigger compiler errors when DEBUG is defined.
--- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +2 -2
@@ -1158,7 +1158,7 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb) src_mem.size = (size_t )src_buf->vb2_buf.planes[0 ].bytesused;mtk_v4l2_debug (2 ,"[%d] buf id=%d va=%p dma=%pad size=%zx" , - ctx->id, src_buf->index, + ctx->id, src_buf->vb2_buf.index, src_mem.va, &src_mem.dma_addr, src_mem.size);
@@ -1182,7 +1182,7 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb) }mtk_v4l2_debug (ret ?0 :1 ,"[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d" , - ctx->id, src_buf->index, + ctx->id, src_buf->vb2_buf.index, src_mem.size, ret, res_chg);return ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 358/405 media: imx: vdic: Restore default case to prepare_vdi_in_buffers()
In reply to Greg Kroah-Hartman[ Upstream commit ce3c2433b074eb9d569a0f63a15d6fd5dbc87f02 ]
Restore a default case to prepare_vdi_in_buffers() to fix the following smatch errors:
drivers/staging/media/imx/imx-media-vdic.c:236 prepare_vdi_in_buffers() error: uninitialized symbol 'prev_phys'. drivers/staging/media/imx/imx-media-vdic.c:237 prepare_vdi_in_buffers() error: uninitialized symbol 'curr_phys'. drivers/staging/media/imx/imx-media-vdic.c:238 prepare_vdi_in_buffers() error: uninitialized symbol 'next_phys'.
--- drivers/staging/media/imx/imx-media-vdic.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/staging/media/imx/imx-media-vdic.c +6 -0
@@ -231,6 +231,12 @@ static void __maybe_unused prepare_vdi_in_buffers(struct vdic_priv *priv, curr_phys =vb2_dma_contig_plane_dma_addr (curr_vb,0 ); next_phys =vb2_dma_contig_plane_dma_addr (curr_vb,0 ) + is;break ; +default : +/* +* can't get here, priv->fieldtype can only be one of +* the above. This is to quiet smatch errors. +*/ +return ; }ipu_cpmem_set_buffer (priv->vdi_in_ch_p,0 , prev_phys);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 359/405 media: vimc: zero the media_device on probe
In reply to Greg Kroah-Hartman[ Upstream commit f74267b51cb36321f777807b2e04ca02167ecc08 ]
The media_device is part of a static global vimc_device struct. The media framework expects this to be zeroed before it is used, however, since this is a global this is not the case if vimc is unbound and then bound again.
So call memset to ensure any left-over values are cleared.
--- drivers/media/platform/vimc/vimc-core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/platform/vimc/vimc-core.c +2 -0
@@ -304,6 +304,8 @@ static int vimc_probe(struct platform_device *pdev)dev_dbg (&pdev->dev,"probe" ); +memset (&vimc->mdev,0 ,sizeof (vimc->mdev)); +/* Create platform_device for each entity in the topology*/ vimc->subdevs =devm_kcalloc (&vimc->pdev.dev, vimc->pipe_cfg->num_ents,sizeof (*vimc->subdevs),GFP_KERNEL );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 360/405 media: vim2m: replace devm_kzalloc by kzalloc
In reply to Greg Kroah-Hartman[ Upstream commit ea6c7e34f3b28e165988aa7391310752969842e8 ]
It is not possible to use devm_kzalloc since that memory is freed immediately when the device instance is unbound.
Various objects like the video device may still be in use since someone has the device node open, and when that is closed it expects the memory to be around.
So use kzalloc and release it at the appropriate time.
--- drivers/media/platform/vim2m.c | 35 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)
drivers/media/platform/vim2m.c +22 -13
@@ -1262,6 +1262,15 @@ static int vim2m_release(struct file *file)return 0 ; } +static void vim2m_device_release (struct video_device *vdev) +{ + struct vim2m_dev *dev = container_of(vdev, struct vim2m_dev, vfd); + +v4l2_device_unregister (&dev->v4l2_dev); +v4l2_m2m_release (dev->m2m_dev); +kfree (dev); +} +static const struct v4l2_file_operations vim2m_fops = { .owner =THIS_MODULE , .open = vim2m_open,
@@ -1277,7 +1286,7 @@ static const struct video_device vim2m_videodev = { .fops = &vim2m_fops, .ioctl_ops = &vim2m_ioctl_ops, .minor = -1, - .release = video_device_release_empty, + .release = vim2m_device_release, .device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING, };
@@ -1298,13 +1307,13 @@ static int vim2m_probe(struct platform_device *pdev)struct video_device *vfd;int ret; - dev =devm_kzalloc (&pdev->dev,sizeof (*dev),GFP_KERNEL ); + dev =kzalloc (sizeof (*dev),GFP_KERNEL );if (!dev)return -ENOMEM ; ret =v4l2_device_register (&pdev->dev, &dev->v4l2_dev);if (ret) -return ret; + goto error_free;atomic_set (&dev->num_inst,0 );mutex_init (&dev->dev_mutex);
@@ -1317,7 +1326,7 @@ static int vim2m_probe(struct platform_device *pdev) ret =video_register_device (vfd,VFL_TYPE_GRABBER ,0 );if (ret) {v4l2_err (&dev->v4l2_dev,"Failed to register video device\n" ); - goto unreg_v4l2; + goto error_v4l2; }video_set_drvdata (vfd, dev);
@@ -1330,7 +1339,7 @@ static int vim2m_probe(struct platform_device *pdev)if (IS_ERR (dev->m2m_dev)) {v4l2_err (&dev->v4l2_dev,"Failed to init mem2mem device\n" ); ret =PTR_ERR (dev->m2m_dev); - goto unreg_dev; + goto error_dev; }#ifdef CONFIG_MEDIA_CONTROLLER
@@ -1346,27 +1355,29 @@ static int vim2m_probe(struct platform_device *pdev) MEDIA_ENT_F_PROC_VIDEO_SCALER);if (ret) {v4l2_err (&dev->v4l2_dev,"Failed to init mem2mem media controller\n" ); - goto unreg_m2m; + goto error_m2m; } ret =media_device_register (&dev->mdev);if (ret) {v4l2_err (&dev->v4l2_dev,"Failed to register mem2mem media device\n" ); - goto unreg_m2m_mc; + goto error_m2m_mc; }#endif return 0 ;#ifdef CONFIG_MEDIA_CONTROLLER -unreg_m2m_mc: +error_m2m_mc:v4l2_m2m_unregister_media_controller (dev->m2m_dev); -unreg_m2m: +error_m2m:v4l2_m2m_release (dev->m2m_dev);#endif -unreg_dev: +error_dev:video_unregister_device (&dev->vfd); -unreg_v4l2: +error_v4l2:v4l2_device_unregister (&dev->v4l2_dev); +error_free: +kfree (dev);return ret; }
@@ -1382,9 +1393,7 @@ static int vim2m_remove(struct platform_device *pdev)v4l2_m2m_unregister_media_controller (dev->m2m_dev);media_device_cleanup (&dev->mdev);#endif -v4l2_m2m_release (dev->m2m_dev);video_unregister_device (&dev->vfd); -v4l2_device_unregister (&dev->v4l2_dev);return 0 ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 361/405 media: cedrus: Add a quirk for not setting DMA offset
In reply to Greg Kroah-Hartman[ Upstream commit 70a4f5cda82f7197c350099b66fd23506620810e ]
H6 VPU doesn't work if DMA offset is set.
Add a quirk for it.
--- drivers/staging/media/sunxi/cedrus/cedrus.h | 3 +++ drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/staging/media/sunxi/cedrus/cedrus.h +3 -0
@@ -28,6 +28,8 @@#define CEDRUS_CAPABILITY_UNTILED BIT(0) +#define CEDRUS_QUIRK_NO_DMA_OFFSET BIT(0) +enum cedrus_codec {CEDRUS_CODEC_MPEG2 ,
@@ -91,6 +93,7 @@ struct cedrus_dec_ops {struct cedrus_variant {unsigned int capabilities; +unsigned int quirks; };struct cedrus_dev {
drivers/staging/media/sunxi/cedrus/cedrus_hw.c +2 -1
@@ -177,7 +177,8 @@ int cedrus_hw_probe(struct cedrus_dev *dev)*/ #ifdef PHYS_PFN_OFFSET - dev->dev->dma_pfn_offset =PHYS_PFN_OFFSET ; +if (!(variant->quirks &CEDRUS_QUIRK_NO_DMA_OFFSET )) + dev->dev->dma_pfn_offset =PHYS_PFN_OFFSET ;#endif ret =of_reserved_mem_device_init (dev->dev);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 362/405 scsi: lpfc: Fix FDMI manufacturer attribute value
In reply to Greg Kroah-Hartman[ Upstream commit d67f935b79a76ac9d86dde1a27bdd413feb5d987 ]
The FDMI manufacturer value being reported on Linux is inconsistent with other OS's.
Set the value to "Emulex Corporation" for consistency.
--- drivers/scsi/lpfc/lpfc_ct.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_ct.c +4 -1
@@ -2005,8 +2005,11 @@ lpfc_fdmi_hba_attr_manufacturer(struct lpfc_vport *vport, ae = (struct lpfc_fdmi_attr_entry *)&ad->AttrValue;memset (ae,0 ,256 ); +/* This string MUST be consistent with other FC platforms +* supported by Broadcom. +*/ strncpy (ae->un.AttrString, -"Broadcom Inc." , +"Emulex Corporation" ,sizeof (ae->un.AttrString)); len =strnlen (ae->un.AttrString,sizeof (ae->un.AttrString));
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 363/405 scsi: lpfc: Fix fc4type information for FDMI
In reply to Greg Kroah-Hartman[ Upstream commit 32a80c093b524a0682f1c6166c910387b116ffce ]
The driver is reporting support for NVME even when not configured for NVME operation.
Fix (and make more readable) when NVME protocol support is indicated.
--- drivers/scsi/lpfc/lpfc_ct.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +10 -7
@@ -2363,10 +2363,11 @@ lpfc_fdmi_port_attr_fc4type(struct lpfc_vport *vport, ae = (struct lpfc_fdmi_attr_entry *)&ad->AttrValue;memset (ae,0 ,32 ); - ae->un.AttrTypes[3 ] =0x02 ;/* Type 1 - ELS */ - ae->un.AttrTypes[2 ] =0x01 ;/* Type 8 - FCP */ - ae->un.AttrTypes[6 ] =0x01 ;/* Type 40 - NVME */ - ae->un.AttrTypes[7 ] =0x01 ;/* Type 32 - CT */ + ae->un.AttrTypes[3 ] =0x02 ;/* Type 0x1 - ELS */ + ae->un.AttrTypes[2 ] =0x01 ;/* Type 0x8 - FCP */ +if (vport->nvmei_support || vport->phba->nvmet_support) + ae->un.AttrTypes[6 ] =0x01 ;/* Type 0x28 - NVME */ + ae->un.AttrTypes[7 ] =0x01 ;/* Type 0x20 - CT */ size =FOURBYTES +32 ; ad->AttrLen =cpu_to_be16 (size); ad->AttrType =cpu_to_be16 (RPRT_SUPPORTED_FC4_TYPES );
@@ -2676,9 +2677,11 @@ lpfc_fdmi_port_attr_active_fc4type(struct lpfc_vport *vport, ae = (struct lpfc_fdmi_attr_entry *)&ad->AttrValue;memset (ae,0 ,32 ); - ae->un.AttrTypes[3 ] =0x02 ;/* Type 1 - ELS */ - ae->un.AttrTypes[2 ] =0x01 ;/* Type 8 - FCP */ - ae->un.AttrTypes[7 ] =0x01 ;/* Type 32 - CT */ + ae->un.AttrTypes[3 ] =0x02 ;/* Type 0x1 - ELS */ + ae->un.AttrTypes[2 ] =0x01 ;/* Type 0x8 - FCP */ +if (vport->phba->cfg_enable_fc4_type &LPFC_ENABLE_NVME ) + ae->un.AttrTypes[6 ] =0x1 ;/* Type 0x28 - NVME */ + ae->un.AttrTypes[7 ] =0x01 ;/* Type 0x20 - CT */ size =FOURBYTES +32 ; ad->AttrLen =cpu_to_be16 (size); ad->AttrType =cpu_to_be16 (RPRT_ACTIVE_FC4_TYPES );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 364/405 scsi: lpfc: Fix io lost on host resets
In reply to Greg Kroah-Hartman[ Upstream commit c66a91974634bfdf9d8e8736219d3b27621fa704 ]
If the driver undergoes repeated host resets it starts losing exchange structures and eventually returns SCSI_MLQUEUE_HOST_BUSY and does not recover. The offline path is not reclaiming the outstanding ios on the fcp pring txcmplq before calling lpfc_destroy_multixripool, which causes the txmcplq to be reinit and the resources lost.
Flush the fcp rings before destroying the multixripools.
--- drivers/scsi/lpfc/lpfc_init.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/scsi/lpfc/lpfc_init.c +7 -0
@@ -3245,6 +3245,13 @@ void lpfc_destroy_multixri_pools(struct lpfc_hba *phba)if (phba->cfg_enable_fc4_type &LPFC_ENABLE_NVME )lpfc_destroy_expedite_pool (phba); +if (!(phba->pport->load_flag &FC_UNLOADING )) { +lpfc_sli_flush_fcp_rings (phba); + +if (phba->cfg_enable_fc4_type &LPFC_ENABLE_NVME ) +lpfc_sli_flush_nvme_rings (phba); + } + hwq_count = phba->cfg_hdw_queue;for (i =0 ; i < hwq_count; i++) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 365/405 media: saa7146: avoid high stack usage with clang
In reply to Greg Kroah-Hartman[ Upstream commit 03aa4f191a36f33fce015387f84efa0eee94408e ]
Two saa7146/hexium files contain a construct that causes a warning when built with clang:
drivers/media/pci/saa7146/hexium_orion.c:210:12: error: stack frame size of 2272 bytes in function 'hexium_probe'
[-Werror,-Wframe-larger-than=]
static int hexium_probe(struct saa7146_dev *dev)
^
drivers/media/pci/saa7146/hexium_gemini.c:257:12: error: stack frame size of 2304 bytes in function 'hexium_attach'
[-Werror,-Wframe-larger-than=]
static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
^This one happens regardless of KASAN, and the problem is that a constructor to initialize a dynamically allocated structure leads to a copy of that structure on the stack, whereas gcc initializes it in place.
--- drivers/media/pci/saa7146/hexium_gemini.c | 5 ++--- drivers/media/pci/saa7146/hexium_orion.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/media/pci/saa7146/hexium_gemini.c +2 -3
@@ -270,9 +270,8 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d/* enable i2c-port pins */ saa7146_write (dev,MC1 , (MASK_08 |MASK_24 |MASK_10 |MASK_26 )); - hexium->i2c_adapter = (struct i2c_adapter ) { - .name ="hexium gemini" , - }; +strscpy (hexium->i2c_adapter.name,"hexium gemini" , +sizeof (hexium->i2c_adapter.name));saa7146_i2c_adapter_prepare (dev, &hexium->i2c_adapter,SAA7146_I2C_BUS_BIT_RATE_480 );if (i2c_add_adapter (&hexium->i2c_adapter) <0 ) {DEB_S ("cannot register i2c-device. skipping.\n" );
drivers/media/pci/saa7146/hexium_orion.c +2 -3
@@ -231,9 +231,8 @@ static int hexium_probe(struct saa7146_dev *dev)saa7146_write (dev,DD1_STREAM_B ,0x00000000 );saa7146_write (dev,MC2 , (MASK_09 |MASK_25 |MASK_10 |MASK_26 )); - hexium->i2c_adapter = (struct i2c_adapter ) { - .name ="hexium orion" , - }; +strscpy (hexium->i2c_adapter.name,"hexium orion" , +sizeof (hexium->i2c_adapter.name));saa7146_i2c_adapter_prepare (dev, &hexium->i2c_adapter,SAA7146_I2C_BUS_BIT_RATE_480 );if (i2c_add_adapter (&hexium->i2c_adapter) <0 ) {DEB_S ("cannot register i2c-device. skipping.\n" );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 366/405 scsi: lpfc: Fix SLI3 commands being issued on SLI4 devices
In reply to Greg Kroah-Hartman[ Upstream commit c95a3b4b0fb8d351e2329a96f87c4fc96a149505 ]
During debug, it was seen that the driver is issuing commands specific to SLI3 on SLI4 devices. Although the adapter correctly rejected the command, this should not be done.
Revise the code to stop sending these commands on a SLI4 adapter.
--- drivers/scsi/lpfc/lpfc_hbadisc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +10 -1
@@ -932,7 +932,11 @@ lpfc_linkdown(struct lpfc_hba *phba) } }lpfc_destroy_vport_work_array (phba, vports); -/* Clean up any firmware default rpi's */ + +/* Clean up any SLI3 firmware default rpi's */ +if (phba->sli_rev >LPFC_SLI_REV3 ) + goto skip_unreg_did; + mb =mempool_alloc (phba->mbox_mem_pool,GFP_KERNEL );if (mb) {lpfc_unreg_did (phba,0xffff ,LPFC_UNREG_ALL_DFLT_RPIS , mb);
@@ -944,6 +948,7 @@ lpfc_linkdown(struct lpfc_hba *phba) } } + skip_unreg_did:/* Setup myDID for link up if we are in pt2pt mode */ if (phba->pport->fc_flag &FC_PT2PT ) { mb =mempool_alloc (phba->mbox_mem_pool,GFP_KERNEL );
@@ -4979,6 +4984,10 @@ lpfc_unreg_default_rpis(struct lpfc_vport *vport)LPFC_MBOXQ_t *mbox;int rc; +/* Unreg DID is an SLI3 operation. */ +if (phba->sli_rev >LPFC_SLI_REV3 ) +return ; + mbox =mempool_alloc (phba->mbox_mem_pool,GFP_KERNEL );if (mbox) { lpfc_unreg_did(phba, vport->vpi, LPFC_UNREG_ALL_DFLT_RPIS,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 367/405 scsi: lpfc: Fix mailbox hang on adapter init
In reply to Greg Kroah-Hartman[ Upstream commit e8869f5b0a7273fcf20ef99066fd8129e58ba5b7 ]
The adapter initialization sequence enables interrupts, initializes the adapter link_state to LINK_DOWN, then issues commands to initialize the adapter. The interrupt handler on the adapter validates the link_state (has to be at least LINK_DOWN) and if invalid, will discard the interrupting event.
In most cases, there is not a command completion, thus an interrupt until the initialization commands have been sent which is post the setting of state to LINK_DOWN. However, in cases of firmware reset, the reset will modify the link_state to an invalid value (indicating a reset of the adapter) and there occasionally are cases where the adapter will generate an asynchronous event which shares the eq/cq used for mailbox commands. In the failure case, an interrupt is generated immediately after enabling them due to the async event. As link_state is invalid, the eq is list and the CQ not serviced. At this point link_state is initialized and the mailbox command sent. As the CQ has not been serviced, it is not armed, so no interrupt event is generated when the mailbox command completes.
Modify the initialization sequence so that interrupts are enabled after link_state is properly initialized, which avoids the race condition with the async event.
--- drivers/scsi/lpfc/lpfc_sli.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +6 -6
@@ -7652,12 +7652,6 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) phba->cfg_xri_rebalancing =0 ; } -/* Arm the CQs and then EQs on device */ -lpfc_sli4_arm_cqeq_intr (phba); - -/* Indicate device interrupt mode */ - phba->sli4_hba.intr_enable =1 ; -/* Allow asynchronous mailbox command to go through */ spin_lock_irq (&phba->hbalock); phba->sli.sli_flag &= ~LPFC_SLI_ASYNC_MBX_BLK ;
@@ -7726,6 +7720,12 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) phba->trunk_link.link3.state =LPFC_LINK_DOWN ;spin_unlock_irq (&phba->hbalock); +/* Arm the CQs and then EQs on device */ +lpfc_sli4_arm_cqeq_intr (phba); + +/* Indicate device interrupt mode */ + phba->sli4_hba.intr_enable =1 ; +if (!(phba->hba_flag &HBA_FCOE_MODE ) && (phba->hba_flag &LINK_DISABLED )) { lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_SLI,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 368/405 scsi: lpfc: Resolve inconsistent check of hdwq in lpfc_scsi_cmd_iocb_cmpl
In reply to Greg Kroah-Hartman[ Upstream commit ff6bf89717b0dc7b8dd0934d1c065f29069831e7 ]
A prior patch which added support for non-uniform allocation of MSIX vectors now causes a smatch complaint:
drivers/scsi/lpfc/lpfc_scsi.c:3674 lpfc_scsi_cmd_iocb_cmpl()
error: we previously assumed 'phba->sli4_hba.hdwq' could be
null (see line 3667)
Resolve by removing the unnecessary check for a NULL hdwq table.
Fixes 6a828b0f6192: ("scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues")
--- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_scsi.c +1 -1
@@ -3670,7 +3670,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,#ifdef CONFIG_SCSI_LPFC_DEBUG_FS if (phba->cpucheck_on &LPFC_CHECK_SCSI_IO ) { cpu =smp_processor_id (); -if (cpu <LPFC_CHECK_CPU_CNT ) +if (cpu <LPFC_CHECK_CPU_CNT && phba->sli4_hba.hdwq) phba->sli4_hba.hdwq[idx].cpucheck_cmpl_io[cpu]++; }#endif
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 369/405 scsi: lpfc: Resolve irq-unsafe lockdep heirarchy warning in lpfc_io_free
In reply to Greg Kroah-Hartman[ Upstream commit 50e3f871fb20a9bb644743e2986e8f50f98a25bc ]
A patch in the 12.2.0.0 set caused a new lockdep warning:
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 5.0.0-rc8-next-20190301-dbg+ #1 Not tainted
Possible interrupt unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&(&qp->io_buf_list_put_lock)->rlock);
local_irq_disable();
lock(&(&phba->hbalock)->rlock);
lock(&(&qp->io_buf_list_put_lock)->rlock);
<Interrupt>
lock(&(&phba->hbalock)->rlock);see: https://www.spinics.net/lists/linux-scsi/msg128389.html
In summary, the new patch added taking the io_buf_list_put_lock while under an irq-disabled hbalock. This created a lock heirarchy dependent upon irq being disabled, and there are paths that take the io_buf_list_put_lock without disabling irq.
Looking at the lpfc_io_free routine, which is where the new heirarchy was introduced, there is no reason to be taking out the hbalock and raising irq, as the functionality is replaced by the io_buf_list_xxx locks.
Resolve by removing the hbalock/irq calls in lpfc_io_free.
--- drivers/scsi/lpfc/lpfc_init.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +0 -4
@@ -3618,8 +3618,6 @@ lpfc_io_free(struct lpfc_hba *phba)struct lpfc_sli4_hdw_queue *qp;int idx; -spin_lock_irq (&phba->hbalock); -for (idx =0 ; idx < phba->cfg_hdw_queue; idx++) { qp = &phba->sli4_hba.hdwq[idx];/* Release all the lpfc_nvme_bufs maintained by this host. */
@@ -3649,8 +3647,6 @@ lpfc_io_free(struct lpfc_hba *phba) }spin_unlock (&qp->io_buf_list_get_lock); } - -spin_unlock_irq (&phba->hbalock); }/**
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 370/405 scsi: lpfc: Fix use-after-free mailbox cmd completion
In reply to Greg Kroah-Hartman[ Upstream commit 9b1640686470fbbd1c6efb35ada6fe1427ea8d0f ]
When unloading the driver, mailbox commands may be sent without holding a reference on the ndlp. By the time the mailbox command completes, the ndlp may have reduced its ref counts and been freed. The problem was reported by KASAN.
While unregistering due to driver unload, have the completion noop'd by setting the ndlp context NULL'd. Due to the unload, no further action was necessary. Also, while reviewing this path, the generic nulling of the context after handling should be slightly moved.
Reported by: Bart Van Assche <[email protected]>
--- drivers/scsi/lpfc/lpfc_hbadisc.c | 4 ++++ drivers/scsi/lpfc/lpfc_sli.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +4 -0
@@ -4873,6 +4873,10 @@ lpfc_unreg_rpi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)* accept PLOGIs after unreg_rpi_cmpl */ acc_plogi =0 ; + }else if (vport->load_flag &FC_UNLOADING ) { + mbox->ctx_ndlp =NULL ; + mbox->mbox_cmpl = + lpfc_sli_def_mbox_cmpl; }else { mbox->ctx_ndlp = ndlp; mbox->mbox_cmpl =
drivers/scsi/lpfc/lpfc_sli.c +1 -1
@@ -2502,8 +2502,8 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) }else { ndlp->nlp_flag &= ~NLP_UNREG_INP ; } + pmb->ctx_ndlp =NULL ; } - pmb->ctx_ndlp =NULL ; }/* Check security permission status on INIT_LINK mailbox command */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 371/405 audit: fix a memleak caused by auditing load module
In reply to Greg Kroah-Hartman[ Upstream commit 95e0b46fcebd7dbf6850dee96046e4c4ddc7f69c ]
module.name will be allocated unconditionally when auditing load module, and audit_log_start() can fail with other reasons, or audit_log_exit maybe not called, caused module.name is not freed
so free module.name in audit_free_context and __audit_syscall_exit
unreferenced object 0xffff88af90837d20 (size 8):
comm "modprobe", pid 1036, jiffies 4294704867 (age 3069.138s) hex dump (first 8 bytes):
69 78 67 62 65 00 ff ff ixgbe...
backtrace:
[<0000000008da28fe>] __audit_log_kern_module+0x33/0x80
[<00000000c1491e61>] load_module+0x64f/0x3850
[<000000007fc9ae3f>] __do_sys_init_module+0x218/0x250
[<0000000000d4a478>] do_syscall_64+0x117/0x400
[<000000004924ded8>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[<000000007dc331dd>] 0xffffffffffffffff--- kernel/auditsc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
kernel/auditsc.c +9 -1
@@ -840,6 +840,13 @@ static inline void audit_proctitle_free(struct audit_context *context) context->proctitle.len =0 ; } +static inline void audit_free_module (struct audit_context *context) +{ +if (context->type ==AUDIT_KERN_MODULE ) { +kfree (context->module.name); + context->module.name =NULL ; + } +}static inline void audit_free_names (struct audit_context *context) {struct audit_names *n, *next;
@@ -923,6 +930,7 @@ int audit_alloc(struct task_struct *tsk)static inline void audit_free_context (struct audit_context *context) { +audit_free_module (context);audit_free_names (context);unroll_tree_refs (context,NULL ,0 );free_tree_refs (context);
@@ -1266,7 +1274,6 @@ static void show_special(struct audit_context *context, int *call_panic)audit_log_format (ab,"name=" );if (context->module.name) {audit_log_untrustedstring (ab, context->module.name); -kfree (context->module.name); }else audit_log_format (ab,"(null)" );
@@ -1697,6 +1704,7 @@ void __audit_syscall_exit(int success, long return_code) context->in_syscall =0 ; context->prio = context->state ==AUDIT_RECORD_CONTEXT ? ~0ULL :0 ; +audit_free_module (context);audit_free_names (context);unroll_tree_refs (context,NULL ,0 );audit_free_aux (context);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 372/405 spi : spi-topcliff-pch: Fix to handle empty DMA buffers
In reply to Greg Kroah-Hartman[ Upstream commit f37d8e67f39e6d3eaf4cc5471e8a3d21209843c6 ]
pch_alloc_dma_buf allocated tx, rx DMA buffers which can fail. Further, these buffers are used without a check. The patch checks for these failures and sends the error upstream.
--- drivers/spi/spi-topcliff-pch.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/spi/spi-topcliff-pch.c +13 -2
@@ -1299,18 +1299,27 @@ static void pch_free_dma_buf(struct pch_spi_board_data *board_dat, dma->rx_buf_virt, dma->rx_buf_dma); } -static void pch_alloc_dma_buf (struct pch_spi_board_data *board_dat, +static int pch_alloc_dma_buf (struct pch_spi_board_data *board_dat,struct pch_spi_data *data) {struct pch_spi_dma_ctrl *dma; +int ret; dma = &data->dma; + ret =0 ;/* Get Consistent memory for Tx DMA */ dma->tx_buf_virt =dma_alloc_coherent (&board_dat->pdev->dev,PCH_BUF_SIZE , &dma->tx_buf_dma,GFP_KERNEL ); +if (!dma->tx_buf_virt) + ret = -ENOMEM ; +/* Get Consistent memory for Rx DMA */ dma->rx_buf_virt =dma_alloc_coherent (&board_dat->pdev->dev,PCH_BUF_SIZE , &dma->rx_buf_dma,GFP_KERNEL ); +if (!dma->rx_buf_virt) + ret = -ENOMEM ; + +return ret; }static int pch_spi_pd_probe (struct platform_device *plat_dev)
@@ -1387,7 +1396,9 @@ static int pch_spi_pd_probe(struct platform_device *plat_dev)if (use_dma) {dev_info (&plat_dev->dev,"Use DMA for data transfers\n" ); -pch_alloc_dma_buf (board_dat, data); + ret =pch_alloc_dma_buf (board_dat, data); +if (ret) + goto err_spi_register_master; } ret =spi_register_master (master);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 373/405 drm: writeback: Fix leak of writeback job
In reply to Greg Kroah-Hartman[ Upstream commit e482ae9b5fdc01a343f22f52930e85a6cfdf85eb ]
Writeback jobs are allocated when the WRITEBACK_FB_ID is set, and deleted when the jobs complete. This results in both a memory leak of the job and a leak of the framebuffer if the atomic commit returns before the job is queued for processing, for instance if the atomic check fails or if the commit runs in test-only mode.
Fix this by implementing the drm_writeback_cleanup_job() function and calling it from __drm_atomic_helper_connector_destroy_state(). As writeback jobs are removed from the state when they're queued for processing, any job left in the state when the state gets destroyed needs to be cleaned up.
The existing declaration of the drm_writeback_cleanup_job() function without an implementation hints that this problem was considered, but never addressed.
--- drivers/gpu/drm/drm_atomic_state_helper.c | 4 ++++ drivers/gpu/drm/drm_writeback.c | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_atomic_state_helper.c +4 -0
@@ -30,6 +30,7 @@#include <drm/drm_connector.h> #include <drm/drm_atomic.h> #include <drm/drm_device.h> +#include <drm/drm_writeback.h> #include <linux/slab.h> #include <linux/dma-fence.h>
@@ -412,6 +413,9 @@ __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *state)if (state->commit)drm_crtc_commit_put (state->commit); + +if (state->writeback_job) +drm_writeback_cleanup_job (state->writeback_job); }EXPORT_SYMBOL (__drm_atomic_helper_connector_destroy_state);
drivers/gpu/drm/drm_writeback.c +11 -3
@@ -268,6 +268,15 @@ void drm_writeback_queue_job(struct drm_writeback_connector *wb_connector, }EXPORT_SYMBOL (drm_writeback_queue_job); +void drm_writeback_cleanup_job (struct drm_writeback_job *job) +{ +if (job->fb) +drm_framebuffer_put (job->fb); + +kfree (job); +} +EXPORT_SYMBOL (drm_writeback_cleanup_job); +/* * @cleanup_work: deferred cleanup of a writeback job *
@@ -280,10 +289,9 @@ static void cleanup_work(struct work_struct *work)struct drm_writeback_job *job =container_of (work, struct drm_writeback_job, cleanup_work); -drm_framebuffer_put (job->fb); -kfree (job); -} +drm_writeback_cleanup_job (job); +}/** * drm_writeback_signal_completion - Signal the completion of a writeback job
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 374/405 drm/omap: dsi: Fix PM for display blank with paired dss_pll calls
In reply to Greg Kroah-Hartman[ Upstream commit fe4ed1b457943113ee1138c939fbdeede4af6cf3 ]
Currently dsi_display_init_dsi() calls dss_pll_enable() but it is not paired with dss_pll_disable() in dsi_display_uninit_dsi(). This leaves the DSS clocks enabled when the display is blanked wasting about extra 5mW of power while idle.
The clock that is left on by not calling dss_pll_disable() is DSS_CLKCTRL bit 10 OPTFCLKEN_SYS_CLK that is the source clock for DSI PLL.
We can fix this issue by by making the current dsi_pll_uninit() into dsi_pll_disable(). This way we can just call dss_pll_disable() from dsi_display_uninit_dsi() and the code becomes a bit easier to follow.
However, we need to also consider that DSI PLL can be muxed for DVI too as pointed out by Tomi Valkeinen <[email protected]>. In the DVI case, we want to unconditionally disable the clocks. To get around this issue, we separate out the DSI lane handling from dsi_pll_enable() and dsi_pll_disable() as suggested by Tomi in an earlier experimental patch.
So we must only toggle the DSI regulator based on the vdds_dsi_enabled flag from dsi_display_init_dsi() and dsi_display_uninit_dsi().
We need to make these two changes together to avoid breaking things for DVI when fixing the DSI clock handling. And this all causes a slight renumbering of the error path for dsi_display_init_dsi().
--- drivers/gpu/drm/omapdrm/dss/dsi.c | 60 ++++++++++++++++--------------- 1 file changed, 31 insertions(+), 29 deletions(-)
drivers/gpu/drm/omapdrm/dss/dsi.c +31 -29
@@ -1342,12 +1342,9 @@ static int dsi_pll_enable(struct dss_pll *pll)*/ dsi_enable_scp_clk (dsi); -if (!dsi->vdds_dsi_enabled) { - r =regulator_enable (dsi->vdds_dsi_reg); -if (r) - goto err0; - dsi->vdds_dsi_enabled = true; - } + r =regulator_enable (dsi->vdds_dsi_reg); +if (r) + goto err0;/* XXX PLL does not come out of reset without this... */ dispc_pck_free_enable (dsi->dss->dispc,1 );
@@ -1372,36 +1369,25 @@ static int dsi_pll_enable(struct dss_pll *pll)return 0 ; err1: -if (dsi->vdds_dsi_enabled) { -regulator_disable (dsi->vdds_dsi_reg); - dsi->vdds_dsi_enabled = false; - } +regulator_disable (dsi->vdds_dsi_reg); err0:dsi_disable_scp_clk (dsi);dsi_runtime_put (dsi);return r; } -static void dsi_pll_uninit (struct dsi_data *dsi,bool disconnect_lanes) +static void dsi_pll_disable (struct dss_pll *pll) { + struct dsi_data *dsi = container_of(pll, struct dsi_data, pll); +dsi_pll_power (dsi,DSI_PLL_POWER_OFF ); -if (disconnect_lanes) { -WARN_ON (!dsi->vdds_dsi_enabled); -regulator_disable (dsi->vdds_dsi_reg); - dsi->vdds_dsi_enabled = false; - } + +regulator_disable (dsi->vdds_dsi_reg);dsi_disable_scp_clk (dsi);dsi_runtime_put (dsi); -DSSDBG ("PLL uninit done\n" ); -} - -static void dsi_pll_disable (struct dss_pll *pll) -{ - struct dsi_data *dsi = container_of(pll, struct dsi_data, pll); - -dsi_pll_uninit (dsi, true); +DSSDBG ("PLL disable done\n" ); }static int dsi_dump_dsi_clocks (struct seq_file *s,void *p)
@@ -4096,11 +4082,11 @@ static int dsi_display_init_dsi(struct dsi_data *dsi) r =dss_pll_enable (&dsi->pll);if (r) - goto err0; +return r; r =dsi_configure_dsi_clocks (dsi);if (r) - goto err1; + goto err0; dss_select_dsi_clk_source(dsi->dss, dsi->module_id, dsi->module_id == 0 ?
@@ -4108,6 +4094,14 @@ static int dsi_display_init_dsi(struct dsi_data *dsi)DSSDBG ("PLL OK\n" ); +if (!dsi->vdds_dsi_enabled) { + r =regulator_enable (dsi->vdds_dsi_reg); +if (r) + goto err1; + + dsi->vdds_dsi_enabled = true; + } + r =dsi_cio_init (dsi);if (r) goto err2;
@@ -4136,10 +4130,13 @@ static int dsi_display_init_dsi(struct dsi_data *dsi) err3:dsi_cio_uninit (dsi); err2: -dss_select_dsi_clk_source (dsi->dss, dsi->module_id,DSS_CLK_SRC_FCK ); +regulator_disable (dsi->vdds_dsi_reg); + dsi->vdds_dsi_enabled = false; err1: -dss_pll_disable (&dsi->pll); +dss_select_dsi_clk_source (dsi->dss, dsi->module_id,DSS_CLK_SRC_FCK ); err0: +dss_pll_disable (&dsi->pll); +return r; }
@@ -4158,7 +4155,12 @@ static void dsi_display_uninit_dsi(struct dsi_data *dsi, bool disconnect_lanes,dss_select_dsi_clk_source (dsi->dss, dsi->module_id,DSS_CLK_SRC_FCK );dsi_cio_uninit (dsi); -dsi_pll_uninit (dsi, disconnect_lanes); +dss_pll_disable (&dsi->pll); + +if (disconnect_lanes) { +regulator_disable (dsi->vdds_dsi_reg); + dsi->vdds_dsi_enabled = false; + } }static int dsi_display_enable (struct omap_dss_device *dssdev)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 375/405 drm/omap: Notify all devices in the pipeline of output disconnection
In reply to Greg Kroah-Hartman[ Upstream commit 27a7e3e18419869cdcc414a404f3fe66f1b4e644 ]
For HDMI pipelines, when the output gets disconnected the device handling CEC needs to be notified. Instead of guessing which device that would be (and sometimes getting it wrong), notify all devices in the pipeline.
--- drivers/gpu/drm/omapdrm/omap_connector.c | 28 ++++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-)
drivers/gpu/drm/omapdrm/omap_connector.c +16 -12
@@ -36,18 +36,22 @@ struct omap_connector { };static void omap_connector_hpd_notify (struct drm_connector *connector, -struct omap_dss_device *src,enum drm_connector_status status) { -if (status == connector_status_disconnected) { -/* -* If the source is an HDMI encoder, notify it of disconnection. -* This is required to let the HDMI encoder reset any internal -* state related to connection status, such as the CEC address. -*/ -if (src && src->type ==OMAP_DISPLAY_TYPE_HDMI && - src->ops->hdmi.lost_hotplug) - src->ops->hdmi.lost_hotplug (src); +struct omap_connector *omap_connector =to_omap_connector (connector); +struct omap_dss_device *dssdev; + +if (status != connector_status_disconnected) +return ; + +/* +* Notify all devics in the pipeline of disconnection. This is required +* to let the HDMI encoders reset their internal state related to +* connection status, such as the CEC address. +*/ +for (dssdev = omap_connector->output; dssdev; dssdev = dssdev->next) { +if (dssdev->ops && dssdev->ops->hdmi.lost_hotplug) + dssdev->ops->hdmi.lost_hotplug (dssdev); } }
@@ -67,7 +71,7 @@ static void omap_connector_hpd_cb(void *cb_data,if (old_status == status)return ; -omap_connector_hpd_notify (connector, omap_connector->hpd, status); +omap_connector_hpd_notify (connector, status);drm_kms_helper_hotplug_event (dev); }
@@ -128,7 +132,7 @@ static enum drm_connector_status omap_connector_detect( ? connector_status_connected : connector_status_disconnected; -omap_connector_hpd_notify (connector, dssdev->src, status); +omap_connector_hpd_notify (connector, status); }else {switch (omap_connector->display->type) {case OMAP_DISPLAY_TYPE_DPI :
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 376/405 spi: rspi: Fix sequencer reset during initialization
In reply to Greg Kroah-Hartman[ Upstream commit 26843bb128590edd7eba1ad7ce22e4b9f1066ce3 ]
While the sequencer is reset after each SPI message since commit 880c6d114fd79a69 ("spi: rspi: Add support for Quad and Dual SPI Transfers on QSPI"), it was never reset for the first message, thus relying on reset state or bootloader settings.
Fix this by initializing it explicitly during configuration.
--- drivers/spi/spi-rspi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/spi/spi-rspi.c +6 -3
@@ -271,7 +271,8 @@ static int rspi_set_config_register(struct rspi_data *rspi, int access_size)/* Sets parity, interrupt mask */ rspi_write8 (rspi,0x00 ,RSPI_SPCR2 ); -/* Sets SPCMD */ +/* Resets sequencer */ +rspi_write8 (rspi,0 ,RSPI_SPSCR ); rspi->spcmd |=SPCMD_SPB_8_TO_16 (access_size);rspi_write16 (rspi, rspi->spcmd,RSPI_SPCMD0 );
@@ -315,7 +316,8 @@ static int rspi_rz_set_config_register(struct rspi_data *rspi, int access_size)rspi_write8 (rspi,0x00 ,RSPI_SSLND );rspi_write8 (rspi,0x00 ,RSPI_SPND ); -/* Sets SPCMD */ +/* Resets sequencer */ +rspi_write8 (rspi,0 ,RSPI_SPSCR ); rspi->spcmd |=SPCMD_SPB_8_TO_16 (access_size);rspi_write16 (rspi, rspi->spcmd,RSPI_SPCMD0 );
@@ -366,7 +368,8 @@ static int qspi_set_config_register(struct rspi_data *rspi, int access_size)/* Sets buffer to allow normal operation */ rspi_write8 (rspi,0x00 ,QSPI_SPBFCR ); -/* Sets SPCMD */ +/* Resets sequencer */ +rspi_write8 (rspi,0 ,RSPI_SPSCR );rspi_write16 (rspi, rspi->spcmd,RSPI_SPCMD0 );/* Sets RSPI mode */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 377/405 regulator: wm831x ldo: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 8be64b6d87bd47d81753b60ddafe70102ebfd76b ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/wm831x-ldo.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/wm831x-ldo.c +2 -0
@@ -51,9 +51,11 @@ static irqreturn_t wm831x_ldo_uv_irq(int irq, void *data) {struct wm831x_ldo *ldo = data; +regulator_lock (ldo->regulator);regulator_notifier_call_chain (ldo->regulator,REGULATOR_EVENT_UNDER_VOLTAGE ,NULL ); +regulator_unlock (ldo->regulator);return IRQ_HANDLED ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 378/405 regulator: wm831x isink: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit f7a621728a6a23bfd2c6ac4d3e42e1303aefde0f ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/wm831x-isink.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/wm831x-isink.c +2 -0
@@ -140,9 +140,11 @@ static irqreturn_t wm831x_isink_irq(int irq, void *data) {struct wm831x_isink *isink = data; +regulator_lock (isink->regulator);regulator_notifier_call_chain (isink->regulator,REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (isink->regulator);return IRQ_HANDLED ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 379/405 regulator: ltc3676: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 769fc8d4182c1d1875db7859852afeb436714c5c ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/ltc3676.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/regulator/ltc3676.c +8 -2
@@ -285,17 +285,23 @@ static irqreturn_t ltc3676_isr(int irq, void *dev_id)if (irqstat <C3676_IRQSTAT_THERMAL_WARN ) {dev_warn (dev,"Over-temperature Warning\n" ); event =REGULATOR_EVENT_OVER_TEMP ; -for (i =0 ; i <LTC3676_NUM_REGULATORS ; i++) +for (i =0 ; i <LTC3676_NUM_REGULATORS ; i++) { +regulator_lock (ltc3676->regulators[i]);regulator_notifier_call_chain (ltc3676->regulators[i], event,NULL ); +regulator_unlock (ltc3676->regulators[i]); + } }if (irqstat <C3676_IRQSTAT_UNDERVOLT_WARN ) {dev_info (dev,"Undervoltage Warning\n" ); event =REGULATOR_EVENT_UNDER_VOLTAGE ; -for (i =0 ; i <LTC3676_NUM_REGULATORS ; i++) +for (i =0 ; i <LTC3676_NUM_REGULATORS ; i++) { +regulator_lock (ltc3676->regulators[i]);regulator_notifier_call_chain (ltc3676->regulators[i], event,NULL ); +regulator_unlock (ltc3676->regulators[i]); + } }/* Clear warning condition */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 380/405 regulator: ltc3589: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit f132da2534ec6599c78c4adcef15340cff2e9dd9 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/ltc3589.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/regulator/ltc3589.c +8 -2
@@ -419,16 +419,22 @@ static irqreturn_t ltc3589_isr(int irq, void *dev_id)if (irqstat <C3589_IRQSTAT_THERMAL_WARN ) { event =REGULATOR_EVENT_OVER_TEMP ; -for (i =0 ; i <LTC3589_NUM_REGULATORS ; i++) +for (i =0 ; i <LTC3589_NUM_REGULATORS ; i++) { +regulator_lock (ltc3589->regulators[i]);regulator_notifier_call_chain (ltc3589->regulators[i], event,NULL ); +regulator_unlock (ltc3589->regulators[i]); + } }if (irqstat <C3589_IRQSTAT_UNDERVOLT_WARN ) { event =REGULATOR_EVENT_UNDER_VOLTAGE ; -for (i =0 ; i <LTC3589_NUM_REGULATORS ; i++) +for (i =0 ; i <LTC3589_NUM_REGULATORS ; i++) { +regulator_lock (ltc3589->regulators[i]);regulator_notifier_call_chain (ltc3589->regulators[i], event,NULL ); +regulator_unlock (ltc3589->regulators[i]); + } }/* Clear warning condition */
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 381/405 regulator: pv88060: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit f58213637206e190453e3bd91f98f535566290a3 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/pv88060-regulator.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/regulator/pv88060-regulator.c +4 -0
@@ -244,9 +244,11 @@ static irqreturn_t pv88060_irq_handler(int irq, void *data)if (reg_val &PV88060_E_VDD_FLT ) {for (i =0 ; i <PV88060_MAX_REGULATORS ; i++) {if (chip->rdev[i] !=NULL ) { +regulator_lock (chip->rdev[i]);regulator_notifier_call_chain (chip->rdev[i],REGULATOR_EVENT_UNDER_VOLTAGE ,NULL ); +regulator_unlock (chip->rdev[i]); } }
@@ -261,9 +263,11 @@ static irqreturn_t pv88060_irq_handler(int irq, void *data)if (reg_val &PV88060_E_OVER_TEMP ) {for (i =0 ; i <PV88060_MAX_REGULATORS ; i++) {if (chip->rdev[i] !=NULL ) { +regulator_lock (chip->rdev[i]);regulator_notifier_call_chain (chip->rdev[i],REGULATOR_EVENT_OVER_TEMP ,NULL ); +regulator_unlock (chip->rdev[i]); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 382/405 spi: imx: stop buffer overflow in RX FIFO flush
In reply to Greg Kroah-Hartman[ Upstream commit c842749ea1d32513f9e603c074d60d7aa07cb2ef ]
Commit 71abd29057cb ("spi: imx: Add support for SPI Slave mode") added an RX FIFO flush before start of a transfer. In slave mode, the master may have sent more data than expected and this data will still be in the RX FIFO at the start of the next transfer, and so needs to be flushed.
However, the code to do the flush was accidentally saving this data into the previous transfer's RX buffer, clobbering the contents of whatever followed that buffer.
Change it to empty the FIFO and throw away the data. Every one of the RX functions for the different eCSPI versions and modes reads the RX FIFO data using the same readl() call, so just use that, rather than using the spi_imx->rx function pointer and making sure all the different rx functions have a working "throw away" mode.
There is another issue, which affects master mode when switching from DMA to PIO. There can be extra data in the RX FIFO which triggers this flush code, causing memory corruption in the same manner. I don't know why this data is unexpectedly in the FIFO. It's likely there is a different bug or erratum responsible for that. But regardless of that, I think this is proper fix the for bug at hand here.
--- drivers/spi/spi-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-imx.c +1 -1
@@ -1494,7 +1494,7 @@ static int spi_imx_transfer(struct spi_device *spi,/* flush rxfifo before transfer */ while (spi_imx->devtype_data->rx_available (spi_imx)) - spi_imx->rx (spi_imx); +readl (spi_imx->base +MXC_CSPIRXDATA );if (spi_imx->slave_mode)return spi_imx_pio_transfer_slave (spi, transfer);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 383/405 regulator: lp8755: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 89b2758c192c35068b07766a6830433bfbdc1f44 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/lp8755.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/regulator/lp8755.c +12 -3
@@ -372,10 +372,13 @@ static irqreturn_t lp8755_irq_handler(int irq, void *data)for (icnt =0 ; icnt <LP8755_BUCK_MAX ; icnt++)if ((flag0 & (0x4 << icnt)) && (pchip->irqmask & (0x04 << icnt)) - && (pchip->rdev[icnt] !=NULL )) + && (pchip->rdev[icnt] !=NULL )) { +regulator_lock (pchip->rdev[icnt]);regulator_notifier_call_chain (pchip->rdev[icnt],LP8755_EVENT_PWR_FAULT ,NULL ); +regulator_unlock (pchip->rdev[icnt]); + }/* read flag1 register */ ret =lp8755_read (pchip,0x0E , &flag1);
@@ -389,18 +392,24 @@ static irqreturn_t lp8755_irq_handler(int irq, void *data)/* send OCP event to all regulator devices */ if ((flag1 &0x01 ) && (pchip->irqmask &0x01 ))for (icnt =0 ; icnt <LP8755_BUCK_MAX ; icnt++) -if (pchip->rdev[icnt] !=NULL ) +if (pchip->rdev[icnt] !=NULL ) { +regulator_lock (pchip->rdev[icnt]);regulator_notifier_call_chain (pchip->rdev[icnt],LP8755_EVENT_OCP ,NULL ); +regulator_unlock (pchip->rdev[icnt]); + }/* send OVP event to all regulator devices */ if ((flag1 &0x02 ) && (pchip->irqmask &0x02 ))for (icnt =0 ; icnt <LP8755_BUCK_MAX ; icnt++) -if (pchip->rdev[icnt] !=NULL ) +if (pchip->rdev[icnt] !=NULL ) { +regulator_lock (pchip->rdev[icnt]);regulator_notifier_call_chain (pchip->rdev[icnt],LP8755_EVENT_OVP ,NULL ); +regulator_unlock (pchip->rdev[icnt]); + }return IRQ_HANDLED ; err_i2c:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 384/405 regulator: da9211: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 65378de3359d30ebce44762d8b8027f372b5b1c4 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/da9211-regulator.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/regulator/da9211-regulator.c +4 -0
@@ -322,8 +322,10 @@ static irqreturn_t da9211_irq_handler(int irq, void *data) goto error_i2c;if (reg_val &DA9211_E_OV_CURR_A ) { +regulator_lock (chip->rdev[0 ]);regulator_notifier_call_chain (chip->rdev[0 ],REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (chip->rdev[0 ]); err =regmap_write (chip->regmap,DA9211_REG_EVENT_B ,DA9211_E_OV_CURR_A );
@@ -334,8 +336,10 @@ static irqreturn_t da9211_irq_handler(int irq, void *data) }if (reg_val &DA9211_E_OV_CURR_B ) { +regulator_lock (chip->rdev[1 ]);regulator_notifier_call_chain (chip->rdev[1 ],REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (chip->rdev[1 ]); err =regmap_write (chip->regmap,DA9211_REG_EVENT_B ,DA9211_E_OV_CURR_B );
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 385/405 regulator: da9063: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 29d40b4a5776ec4727c9f0e00a884423dd5e3366 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/da9063-regulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/regulator/da9063-regulator.c +4 -1
@@ -615,9 +615,12 @@ static irqreturn_t da9063_ldo_lim_event(int irq, void *data)if (regl->info->oc_event.reg !=DA9063_REG_STATUS_D )continue ; -if (BIT (regl->info->oc_event.lsb) & bits) +if (BIT (regl->info->oc_event.lsb) & bits) { +regulator_lock (regl->rdev);regulator_notifier_call_chain (regl->rdev,REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (regl->rdev); + } }return IRQ_HANDLED ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 386/405 regulator: pv88080: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 1867af94cfdf37fc70fe67b3d522e78352800196 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/pv88080-regulator.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/regulator/pv88080-regulator.c +4 -0
@@ -345,9 +345,11 @@ static irqreturn_t pv88080_irq_handler(int irq, void *data)if (reg_val &PV88080_E_VDD_FLT ) {for (i =0 ; i <PV88080_MAX_REGULATORS ; i++) {if (chip->rdev[i] !=NULL ) { +regulator_lock (chip->rdev[i]);regulator_notifier_call_chain (chip->rdev[i],REGULATOR_EVENT_UNDER_VOLTAGE ,NULL ); +regulator_unlock (chip->rdev[i]); } }
@@ -362,9 +364,11 @@ static irqreturn_t pv88080_irq_handler(int irq, void *data)if (reg_val &PV88080_E_OVER_TEMP ) {for (i =0 ; i <PV88080_MAX_REGULATORS ; i++) {if (chip->rdev[i] !=NULL ) { +regulator_lock (chip->rdev[i]);regulator_notifier_call_chain (chip->rdev[i],REGULATOR_EVENT_OVER_TEMP ,NULL ); +regulator_unlock (chip->rdev[i]); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 387/405 regulator: wm831x: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 119c4f5085c45b60cb23c5595e45d06135b89518 ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/wm831x-dcdc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/regulator/wm831x-dcdc.c +4 -0
@@ -183,9 +183,11 @@ static irqreturn_t wm831x_dcdc_uv_irq(int irq, void *data) {struct wm831x_dcdc *dcdc = data; +regulator_lock (dcdc->regulator);regulator_notifier_call_chain (dcdc->regulator,REGULATOR_EVENT_UNDER_VOLTAGE ,NULL ); +regulator_unlock (dcdc->regulator);return IRQ_HANDLED ; }
@@ -194,9 +196,11 @@ static irqreturn_t wm831x_dcdc_oc_irq(int irq, void *data) {struct wm831x_dcdc *dcdc = data; +regulator_lock (dcdc->regulator);regulator_notifier_call_chain (dcdc->regulator,REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (dcdc->regulator);return IRQ_HANDLED ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 388/405 regulator: pv88090: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 275513b7695a61b75b2546406ecd0f8e3d9fc8be ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/pv88090-regulator.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/regulator/pv88090-regulator.c +4 -0
@@ -237,9 +237,11 @@ static irqreturn_t pv88090_irq_handler(int irq, void *data)if (reg_val &PV88090_E_VDD_FLT ) {for (i =0 ; i <PV88090_MAX_REGULATORS ; i++) {if (chip->rdev[i] !=NULL ) { +regulator_lock (chip->rdev[i]);regulator_notifier_call_chain (chip->rdev[i],REGULATOR_EVENT_UNDER_VOLTAGE ,NULL ); +regulator_unlock (chip->rdev[i]); } }
@@ -254,9 +256,11 @@ static irqreturn_t pv88090_irq_handler(int irq, void *data)if (reg_val &PV88090_E_OVER_TEMP ) {for (i =0 ; i <PV88090_MAX_REGULATORS ; i++) {if (chip->rdev[i] !=NULL ) { +regulator_lock (chip->rdev[i]);regulator_notifier_call_chain (chip->rdev[i],REGULATOR_EVENT_OVER_TEMP ,NULL ); +regulator_unlock (chip->rdev[i]); } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 389/405 regulator: da9062: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 978995def0f6030aa6b3b494682f673aca13881b ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/da9062-regulator.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/da9062-regulator.c +2 -0
@@ -974,8 +974,10 @@ static irqreturn_t da9062_ldo_lim_event(int irq, void *data)continue ;if (BIT (regl->info->oc_event.lsb) & bits) { +regulator_lock (regl->rdev);regulator_notifier_call_chain (regl->rdev,REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (regl->rdev); handled =IRQ_HANDLED ; } }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 390/405 regulator: da9055: Fix notifier mutex lock warning
In reply to Greg Kroah-Hartman[ Upstream commit 5e6afb3832bedf420dd8e4c5b32ed85117c5087d ]
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function.
Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API.
--- drivers/regulator/da9055-regulator.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/da9055-regulator.c +2 -0
@@ -487,8 +487,10 @@ static irqreturn_t da9055_ldo5_6_oc_irq(int irq, void *data) {struct da9055_regulator *regulator = data; +regulator_lock (regulator->rdev);regulator_notifier_call_chain (regulator->rdev,REGULATOR_EVENT_OVER_CURRENT ,NULL ); +regulator_unlock (regulator->rdev);return IRQ_HANDLED ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 391/405 spi: Fix zero length xfer bug
In reply to Greg Kroah-Hartman[ Upstream commit 5442dcaa0d90fc376bdfc179a018931a8f43dea4 ]
This fixes a bug for messages containing both zero length and unidirectional xfers.
The function spi_map_msg will allocate dummy tx and/or rx buffers for use with unidirectional transfers when the hardware can only do a bidirectional transfer. That dummy buffer will be used in place of a NULL buffer even when the xfer length is 0.
Then in the function __spi_map_msg, if he hardware can dma, the zero length xfer will have spi_map_buf called on the dummy buffer.
Eventually, __sg_alloc_table is called and returns -EINVAL because nents == 0.
This fix prevents the error by not using the dummy buffer when the xfer length is zero.
--- drivers/spi/spi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi.c +2 -0
@@ -1041,6 +1041,8 @@ static int spi_map_msg(struct spi_controller *ctlr, struct spi_message *msg)if (max_tx || max_rx) {list_for_each_entry (xfer, &msg->transfers, transfer_list) { +if (!xfer->len) +continue ;if (!xfer->tx_buf) xfer->tx_buf = ctlr->dummy_tx;if (!xfer->rx_buf)
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 392/405 ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM
In reply to Greg Kroah-Hartman[ Upstream commit 8ca5104715cfd14254ea5aecc390ae583b707607 ]
Building with clang shows a variable that is only used by the suspend/resume functions but defined outside of their #ifdef block:
sound/soc/ti/davinci-mcasp.c:48:12: error: variable 'context_regs' is not needed and will not be emitted
We commonly fix these by marking the PM functions as __maybe_unused, but here that would grow the davinci_mcasp structure, so instead add another #ifdef here.
--- sound/soc/ti/davinci-mcasp.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/ti/davinci-mcasp.c +2 -0
@@ -45,6 +45,7 @@#define MCASP_MAX_AFIFO_DEPTH 64 +#ifdef CONFIG_PM static u32 context_regs[] = {DAVINCI_MCASP_TXFMCTL_REG , DAVINCI_MCASP_RXFMCTL_REG,
@@ -68,6 +69,7 @@ struct davinci_mcasp_context {u32 *xrsr_regs;/* for serializer configuration */ bool pm_state; }; +#endif struct davinci_mcasp_ruledata {struct davinci_mcasp *mcasp;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 393/405 ASoC: ti: fix davinci_mcasp_probe dependencies
In reply to Greg Kroah-Hartman[ Upstream commit 7d7b25d05ef1c5a1a9320190e1eeb55534847558 ]
The SND_SOC_DAVINCI_MCASP driver can use either edma or sdma as a back-end, and it takes the presence of the respective dma engine drivers in the configuration as an indication to which ones should be built. However, this is flawed in multiple ways:
- With CONFIG_TI_EDMA=m and CONFIG_SND_SOC_DAVINCI_MCASP=y,
is enabled as =m, and we get a link error:
sound/soc/ti/davinci-mcasp.o: In function `davinci_mcasp_probe':
davinci-mcasp.c:(.text+0x930): undefined reference to `edma_pcm_platform_register'
- When CONFIG_SND_SOC_DAVINCI_MCASP=m has already been selected by another driver, the same link error appears even if CONFIG_TI_EDMA is disabled
There are possibly other issues here, but it seems that the only reasonable solution is to always build both SND_SOC_TI_EDMA_PCM and SND_SOC_TI_SDMA_PCM as a dependency here. Both are fairly small and do not have any other compile-time dependencies, so the cost is very small, and makes the configuration stage much more consistent.
--- sound/soc/ti/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/ti/Kconfig +2 -2
@@ -21,8 +21,8 @@ config SND_SOC_DAVINCI_ASP config SND_SOC_DAVINCI_MCASP tristate "Multichannel Audio Serial Port (McASP) support" - select SND_SOC_TI_EDMA_PCM if TI_EDMA - select SND_SOC_TI_SDMA_PCM if DMA_OMAP + select SND_SOC_TI_EDMA_PCM + select SND_SOC_TI_SDMA_PCM help Say Y or M here if you want to have support for McASP IP found in various Texas Instruments SoCs like:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 394/405 drm/v3d: Handle errors from IRQ setup.
In reply to Greg Kroah-Hartman[ Upstream commit fc22771547e7e8a63679f0218e943d72b107de65 ]
Noted in review by Dave Emett for V3D 4.2 support.
--- drivers/gpu/drm/v3d/v3d_drv.c | 8 ++++++-- drivers/gpu/drm/v3d/v3d_drv.h | 2 +- drivers/gpu/drm/v3d/v3d_irq.c | 13 +++++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.c +6 -2
@@ -312,14 +312,18 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)if (ret) goto dev_destroy; -v3d_irq_init (v3d); + ret =v3d_irq_init (v3d); +if (ret) + goto gem_destroy; ret =drm_dev_register (drm,0 );if (ret) - goto gem_destroy; + goto irq_disable;return 0 ; +irq_disable: +v3d_irq_disable (v3d); gem_destroy:v3d_gem_destroy (drm); dev_destroy:
drivers/gpu/drm/v3d/v3d_drv.h +1 -1
@@ -310,7 +310,7 @@ void v3d_reset(struct v3d_dev *v3d);void v3d_invalidate_caches (struct v3d_dev *v3d);/* v3d_irq.c */ -void v3d_irq_init (struct v3d_dev *v3d); +int v3d_irq_init (struct v3d_dev *v3d);void v3d_irq_enable (struct v3d_dev *v3d);void v3d_irq_disable (struct v3d_dev *v3d);void v3d_irq_reset (struct v3d_dev *v3d);
drivers/gpu/drm/v3d/v3d_irq.c +11 -2
@@ -156,7 +156,7 @@ v3d_hub_irq(int irq, void *arg)return status; } -void +int v3d_irq_init (struct v3d_dev *v3d) {int ret, core;
@@ -173,13 +173,22 @@ v3d_irq_init(struct v3d_dev *v3d) ret =devm_request_irq (v3d->dev,platform_get_irq (v3d->pdev,0 ), v3d_hub_irq,IRQF_SHARED ,"v3d_hub" , v3d); +if (ret) + goto fail; + ret =devm_request_irq (v3d->dev,platform_get_irq (v3d->pdev,1 ), v3d_irq,IRQF_SHARED ,"v3d_core0" , v3d);if (ret) -dev_err (v3d->dev,"IRQ setup failed: %d\n" , ret); + goto fail;v3d_irq_enable (v3d); +return 0 ; + +fail: +if (ret != -EPROBE_DEFER ) +dev_err (v3d->dev,"IRQ setup failed: %d\n" , ret); +return ret; }void
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 395/405 drm/amd/display: Fix exception from AUX acquire failure
In reply to Greg Kroah-Hartman[ Upstream commit dcf1a988678e2e39ce2b4115b8ce14d208c8c481 ]
[Why]
AUX arbitration occurs between SW and FW components. When AUX acquire fails, it causes engine->ddc to be NULL, which leads to an exception when we try to release the AUX engine.
[How]
When AUX engine acquire fails, it should return from the function without trying to continue the operation. The upper level will determine if it wants to retry. i.e. dce_aux_transfer_with_retries will be used and retry.
--- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +2 -2
@@ -377,7 +377,6 @@ static bool acquire(struct dce_aux *engine, struct ddc *ddc) { - enum gpio_result result;if (!is_engine_available (engine))
@@ -458,7 +457,8 @@ int dce_aux_transfer(struct ddc_service *ddc,memset (&aux_rep,0 ,sizeof (aux_rep)); aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]; -acquire (aux_engine, ddc_pin); +if (!acquire (aux_engine, ddc_pin)) +return -1 ;if (payload->i2c_over_aux) aux_req.type =AUX_TRANSACTION_TYPE_I2C ;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 396/405 drm/amd/display: Reset planes that were disabled in init_pipes
In reply to Greg Kroah-Hartman[ Upstream commit 4bc46da4a3aeeb4d55e83dd276cf72756e908286 ]
[Why]
Seamless boot tries to reuse planes that were enabled for the first commit applied.
In the case where Raven is booting with two monitors connected and the first commit contains two streams the screen corruption would occur because the second stream was trying to re-use a tg and plane that weren't previously enabled.
The state on the first commit looks something like the following:
TG0: enabled=1
TG1: enabled=0
TG2: enabled=0
TG3: enabled=0
New state: pipe=0, stream=0, plane=0, new_tg=0
New state: pipe=1, stream=1, plane=1, new_tg=1
New state: pipe=2, stream=NULL, plane=NULL, new_tg=NULL
New state: pipe=3, stream=NULL, plane=NULL, new_tg=NULL
Only one plane/tg is setup before we enter accelerated mode so we really want to disabling everything but that first plane.
[How]
Check if the stream is not NULL and if the tg is enabled before deciding whether to skip the plane disable.
Also ensure we're also disabling on the current state's pipe_ctx so we don't overwrite the fields in the new pending state.
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +6 -1
@@ -1008,9 +1008,14 @@ static void dcn10_init_pipes(struct dc *dc, struct dc_state *context)* to non-preferred front end. If pipe_ctx->stream is not NULL, * we will use the pipe, so don't disable */ -if (pipe_ctx->stream !=NULL ) +if (pipe_ctx->stream !=NULL && + pipe_ctx->stream_res.tg->funcs->is_tg_enabled ( + pipe_ctx->stream_res.tg))continue ; +/* Disable on the current state so the new one isn't cleared. */ + pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i]; + dpp->funcs->dpp_reset (dpp); pipe_ctx->stream_res.tg = tg;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 397/405 drm/drv: Hold ref on parent device during drm_device lifetime
In reply to Greg Kroah-Hartman[ Upstream commit 56be6503aab2bc3a30beae408071b9be5e1bae51 ]
This makes it safe to access drm_device->dev after the parent device has been removed/unplugged.
--- drivers/gpu/drm/drm_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_drv.c +4 -1
@@ -497,7 +497,7 @@ int drm_dev_init(struct drm_device *dev,BUG_ON (!parent);kref_init (&dev->ref); - dev->dev = parent; + dev->dev =get_device (parent); dev->driver = driver;/* no per-device feature limits by default */
@@ -567,6 +567,7 @@ int drm_dev_init(struct drm_device *dev,drm_minor_free (dev,DRM_MINOR_RENDER );drm_fs_inode_free (dev->anon_inode); err_free: +put_device (dev->dev);mutex_destroy (&dev->master_mutex);mutex_destroy (&dev->ctxlist_mutex);mutex_destroy (&dev->clientlist_mutex);
@@ -602,6 +603,8 @@ void drm_dev_fini(struct drm_device *dev)drm_minor_free (dev,DRM_MINOR_PRIMARY );drm_minor_free (dev,DRM_MINOR_RENDER ); +put_device (dev->dev); +mutex_destroy (&dev->master_mutex);mutex_destroy (&dev->ctxlist_mutex);mutex_destroy (&dev->clientlist_mutex);
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 398/405 drm: Wake up next in drm_read() chain if we are forced to putback the event
In reply to Greg Kroah-Hartman[ Upstream commit 60b801999c48b6c1dd04e653a38e2e613664264e ]
After an event is sent, we try to copy it into the user buffer of the first waiter in drm_read() and if the user buffer doesn't have enough room we put it back onto the list. However, we didn't wake up any subsequent waiter, so that event may sit on the list until either a new vblank event is sent or a new waiter appears. Rare, but in the worst case may lead to a stuck process.
Testcase: igt/drm_read/short-buffer-wakeup
--- drivers/gpu/drm/drm_file.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_file.c +1 -0
@@ -577,6 +577,7 @@ ssize_t drm_read(struct file *filp, char __user *buffer, file_priv->event_space -= length;list_add (&e->link, &file_priv->event_list);spin_unlock_irq (&dev->event_lock); +wake_up_interruptible (&file_priv->event_wait);break ; }
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 399/405 drm/sun4i: dsi: Change the start delay calculation
In reply to Greg Kroah-Hartman[ Upstream commit da676c6aa6413d59ab0a80c97bbc273025e640b2 ]
The current calculation for the video start delay in the current DSI driver is that it is the total vertical size, minus the front porch and sync length, plus 1. This equals to the active vertical size plus the back porch plus 1.
That 1 is coming in the Allwinner BSP from an variable that is set to 1. However, if we look at the Allwinner BSP more closely, and especially in the "legacy" code for the display (in drivers/video/sunxi/legacy/), we can see that this variable is actually computed from the porches and the sync minus 10, clamped between 8 and 100.
This fixes the start delay symptom we've seen on some panels (vblank timeouts with vertical white stripes at the bottom of the panel).
--- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +3 -1
@@ -358,7 +358,9 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi,static u16 sun6i_dsi_get_video_start_delay (struct sun6i_dsi *dsi,struct drm_display_mode *mode) { -return mode->vtotal - (mode->vsync_end - mode->vdisplay) +1 ; +u16 start =clamp (mode->vtotal - mode->vdisplay -10 ,8 ,100 ); + +return mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; } static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 400/405 drm/sun4i: dsi: Restrict DSI tcon clock divider
In reply to Greg Kroah-Hartman[ Upstream commit 85fb352666732a9e5caf6027b9c253b3d7881d8f ]
The current code allows the TCON clock divider to have a range between 4 and 127 when feeding the DSI controller.
The only display supported so far had a display clock rate that ended up using a divider of 4, but testing with other displays show that only 4 seems to be functional.
This also aligns with what Allwinner is doing in their BSP, so let's just hardcode that we want a divider of 4 when using the DSI output.
--- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/sun4i/sun4i_tcon.c +2 -2
@@ -341,8 +341,8 @@ static void sun4i_tcon0_mode_set_cpu(struct sun4i_tcon *tcon,u32 block_space, start_delay;u32 tcon_div; - tcon->dclk_min_div =4 ; - tcon->dclk_max_div =127 ; + tcon->dclk_min_div =SUN6I_DSI_TCON_DIV ; + tcon->dclk_max_div =SUN6I_DSI_TCON_DIV ;sun4i_tcon0_mode_set_common (tcon, mode);
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h +2 -0
@@ -13,6 +13,8 @@#include <drm/drm_encoder.h> #include <drm/drm_mipi_dsi.h> +#define SUN6I_DSI_TCON_DIV 4 +struct sun6i_dsi {struct drm_connector connector;struct drm_encoder encoder;
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 401/405 vfio-ccw: Prevent quiesce function going into an infinite loop
In reply to Greg Kroah-Hartman[ Upstream commit d1ffa760d22aa1d8190478e5ef555c59a771db27 ]
The quiesce function calls cio_cancel_halt_clear() and if we get an -EBUSY we go into a loop where we:
- wait for any interrupts
- flush all I/O in the workqueue
- retry cio_cancel_halt_clear
During the period where we are waiting for interrupts or flushing all I/O, the channel subsystem could have completed a halt/clear action and turned off the corresponding activity control bits in the subchannel status word. This means the next time we call cio_cancel_halt_clear(), we will again start by calling cancel subchannel and so we can be stuck between calling cancel and halt forever.
Rather than calling cio_cancel_halt_clear() immediately after waiting, let's try to disable the subchannel. If we succeed in disabling the subchannel then we know nothing else can happen with the device.
Message-Id: <4d5a4b98ab1b41ac6131b5c36de18b76c5d66898.1555449329.git.alifm@linux.ibm.com>
--- drivers/s390/cio/vfio_ccw_drv.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-)
drivers/s390/cio/vfio_ccw_drv.c +18 -14
@@ -40,26 +40,30 @@ int vfio_ccw_sch_quiesce(struct subchannel *sch)if (ret != -EBUSY ) goto out_unlock; + iretry =255 ;do { - iretry =255 ; ret =cio_cancel_halt_clear (sch, &iretry); -while (ret == -EBUSY ) { -/* -* Flush all I/O and wait for -* cancel/halt/clear completion. -*/ - private->completion = &completion; -spin_unlock_irq (sch->lock); -wait_for_completion_timeout (&completion,3 *HZ ); +if (ret == -EIO ) { +pr_err ("vfio_ccw: could not quiesce subchannel 0.%x.%04x!\n" , + sch->schid.ssid, sch->schid.sch_no); +break ; + } + +/* +* Flush all I/O and wait for +* cancel/halt/clear completion. +*/ + private->completion = &completion; +spin_unlock_irq (sch->lock); - private->completion =NULL ; -flush_workqueue (vfio_ccw_work_q); -spin_lock_irq (sch->lock); - ret =cio_cancel_halt_clear (sch, &iretry); - }; +if (ret == -EBUSY ) +wait_for_completion_timeout (&completion,3 *HZ ); + private->completion =NULL ; +flush_workqueue (vfio_ccw_work_q); +spin_lock_irq (sch->lock); ret =cio_disable_subchannel (sch); }while (ret == -EBUSY ); out_unlock:
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 402/405 extcon: axp288: Add a depends on ACPI to the Kconfig entry
In reply to Greg Kroah-Hartman[ Upstream commit fa3c098c2d52a268f6372fa053932e11f50cecb1 ]
As Hans de Goede pointed, using this driver without ACPI makes little sense, so add ACPI dependency to Kconfig entry to fix a build error while CONFIG_ACPI is not set.
drivers/extcon/extcon-axp288.c: In function 'axp288_extcon_probe':drivers/extcon/extcon-axp288.c:363:20: error: dereferencing pointer to incomplete type
put_device(&adev->dev);
--- drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/Kconfig +1 -1
@@ -30,7 +30,7 @@ config EXTCON_ARIZONA config EXTCON_AXP288 tristate "X-Power AXP288 EXTCON support" - depends on MFD_AXP20X && USB_SUPPORT && X86 + depends on MFD_AXP20X && USB_SUPPORT && X86 && ACPI select USB_ROLE_SWITCH help Say Y here to enable support for USB peripheral detection
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 403/405 ice: Put __ICE_PREPARED_FOR_RESET check in ice_prepare_for_reset
In reply to Greg Kroah-Hartman[ Upstream commit 5abac9d7e1bb9a373673811154774d4c89a7f85e ]
Currently we check if the __ICE_PREPARED_FOR_RESET bit is set prior to calling ice_prepare_for_reset in ice_reset_subtask(), but we aren't checking that bit in ice_do_reset() before calling ice_prepare_for_reset(). This is not consistent and can cause issues if ice_prepare_for_reset() is called prior to ice_do_reset(). Fix this by checking if the __ICE_PREPARED_FOR_RESET bit is set internal to ice_prepare_for_reset().
--- drivers/net/ethernet/intel/ice/ice_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +5 -2
@@ -342,6 +342,10 @@ ice_prepare_for_reset(struct ice_pf *pf) {struct ice_hw *hw = &pf->hw; +/* already prepared for reset */ +if (test_bit (__ICE_PREPARED_FOR_RESET, pf->state)) +return ; +/* Notify VFs of impending reset */ if (ice_check_sq_alive (hw, &hw->mailboxq))ice_vc_notify_reset (pf);
@@ -424,8 +428,7 @@ static void ice_reset_subtask(struct ice_pf *pf)/* return if no valid reset type requested */ if (reset_type ==ICE_RESET_INVAL )return ; -if (!test_bit (__ICE_PREPARED_FOR_RESET, pf->state)) -ice_prepare_for_reset (pf); +ice_prepare_for_reset (pf);/* make sure we are ready to rebuild */ if (ice_check_reset (&pf->hw)) {
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 404/405 drm/sun4i: dsi: Enforce boundaries on the start delay
In reply to Greg Kroah-Hartman[ Upstream commit efa31801203ac2f5c6a82a28cb991c7163ee0f1d ]
The Allwinner BSP makes sure that we don't end up with a null start delay or with a delay larger than vtotal.
The former condition is likely to happen now with the reworked start delay, so make sure we enforce the same boundaries.
--- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +5 -1
@@ -359,8 +359,12 @@ static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) {u16 start =clamp (mode->vtotal - mode->vdisplay -10 ,8 ,100 ); +u16 delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; -return mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; +if (delay > mode->vtotal) + delay = delay % mode->vtotal; + +return max_t (u16, delay,1 ); } static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi,
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerPATCH 405/405 NFS: Fix a double unlock from nfs_match,get_client
In reply to Greg Kroah-Hartman[ Upstream commit c260121a97a3e4df6536edbc2f26e166eff370ce ]
Now that nfs_match_client drops the nfs_client_lock, we should be careful
to always return it in the same condition: locked.
--- fs/nfs/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/client.c +1 -1
@@ -299,9 +299,9 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *datspin_unlock (&nn->nfs_client_lock); error =nfs_wait_client_init_complete (clp);nfs_put_client (clp); +spin_lock (&nn->nfs_client_lock);if (error <0 )return ERR_PTR (error); -spin_lock (&nn->nfs_client_lock); goto again; }
Signature · 1 line
2.20.1
stable-rc/linux-5.1.y boot: 125 boots: 1 failed, 122 passed with 2 untried/unknown (v5.1.5-406-ge151dd0525b9)
stable-rc/linux-5.1.y boot: 125 boots: 1 failed, 122 passed with 2 untried/unknown (v5.1.5-406-ge151dd0525b9)
Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-5.1.y/kernel/v5.1.5-406-ge151dd0525b9/
Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-5.1.y/kernel/v5.1.5-406-ge151dd0525b9/
Tree: stable-rc
Branch: linux-5.1.y
Git Describe: v5.1.5-406-ge151dd0525b9
Git Commit: e151dd0525b9aaeac84987d2790c30d8a89ae274
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Tested: 69 unique boards, 22 SoC families, 14 builds out of 209
Boot Failure Detected:
arm:
multi_v7_defconfig:
gcc-8:
bcm4708-smartrg-sr400ac: 1 failed lab---
For more info write to <[email protected]>
Jon Hunter
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.1.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.1.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.1:
12 builds: 12 pass, 0 fail
22 boots: 22 pass, 0 fail
32 tests: 32 pass, 0 failLinux version: 5.1.6-rc1-g6df8e06
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04Cheers
Jon
Signature · 1 line
nvpublic
Greg Kroah-Hartman
maintainerQuoted 23 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.1.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.1.y
and the diffstat can be found below.thanks,
greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.1:
Quoted 9 lines
12 builds: 12 pass, 0 fail 22 boots: 22 pass, 0 fail 32 tests: 32 pass, 0 failLinux version: 5.1.6-rc1-g6df8e06
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra30-cardhu-a04
Wonderful, thanks for testing all of these and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
Build results:
total: 159 pass: 159 fail: 0 Qemu test results: total: 349 pass: 349 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 6 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Quoted 3 lines
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
Build results:
total: 159 pass: 159 fail: 0 Qemu test results: total: 349 pass: 349 fail: 0
Wonderful, thanks for testing all of these and letting me know.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.1.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.1.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Greg Kroah-Hartman
maintainerQuoted 15 lines · shuah
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.1.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.1.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Thanks for testing all of these (and 5.0 twice!) and letting me know.
greg k-h
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.1.6 release. There are 405 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat 01 Jun 2019 03:01:59 AM UTC. Anything received after that time might be too late.
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 5.1.6-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.1.y
git commit: 6df8e06907e10b03bfeb68d794def0a11133a8a3
git describe: v5.1.5-406-g6df8e06907e1
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.1-oe/build/v5.1.5-406-g6df8e06907e1
No regressions (compared to build v5.1.5)
No fixes (compared to build v5.1.5)
Ran 23969 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libgpiod
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-timers-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* network-basic-tests
* ltp-fs-tests
* ltp-open-posix-tests
* kvm-unit-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* ssuite
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org