linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.9 1/5] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling
@ 2020-12-12 16:09 Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 2/5] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve Sasha Levin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sasha Levin @ 2020-12-12 16:09 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Nicholas Piggin, Aneesh Kumar K . V, Peter Zijlstra,
	Michael Ellerman, Sasha Levin

From: Nicholas Piggin <npiggin@gmail.com>

[ Upstream commit 8ff00399b153440c1c83e20c43020385b416415b ]

powerpc/64s keeps a counter in the mm which counts bits set in
mm_cpumask as well as other things. This means it can't use generic code
to clear bits out of the mask and doesn't adjust the arch specific
counter.

Add an arch override that allows powerpc/64s to use
clear_tasks_mm_cpumask().

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201126102530.691335-4-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/cpu.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index a542b5e583503..e005209f279e1 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -815,6 +815,10 @@ void __unregister_cpu_notifier(struct notifier_block *nb)
 EXPORT_SYMBOL(__unregister_cpu_notifier);
 
 #ifdef CONFIG_HOTPLUG_CPU
+#ifndef arch_clear_mm_cpumask_cpu
+#define arch_clear_mm_cpumask_cpu(cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm))
+#endif
+
 /**
  * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU
  * @cpu: a CPU id
@@ -850,7 +854,7 @@ void clear_tasks_mm_cpumask(int cpu)
 		t = find_lock_task_mm(p);
 		if (!t)
 			continue;
-		cpumask_clear_cpu(cpu, mm_cpumask(t->mm));
+		arch_clear_mm_cpumask_cpu(cpu, t->mm);
 		task_unlock(t);
 	}
 	rcu_read_unlock();
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.9 2/5] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve
  2020-12-12 16:09 [PATCH AUTOSEL 4.9 1/5] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling Sasha Levin
@ 2020-12-12 16:09 ` Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 3/5] drm/tegra: sor: Disable clocks on error in tegra_sor_init() Sasha Levin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2020-12-12 16:09 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Christian König, Mark Hounschell, Karol Herbst, Sasha Levin,
	dri-devel

From: Christian König <christian.koenig@amd.com>

[ Upstream commit aea656b0d05ec5b8ed5beb2f94c4dd42ea834e9d ]

This wasn't initialized for pre NV50 hardware.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reported-and-Tested-by: Mark Hounschell <markh@compro.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/series/84298/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index a2e6a81669e78..91ffd853e94d6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1371,6 +1371,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
 			nvkm_vm_map(&node->bar_vma, node);
 			mem->bus.offset = node->bar_vma.offset;
 		}
+		ret = 0;
 		break;
 	default:
 		return -EINVAL;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.9 3/5] drm/tegra: sor: Disable clocks on error in tegra_sor_init()
  2020-12-12 16:09 [PATCH AUTOSEL 4.9 1/5] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 2/5] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve Sasha Levin
@ 2020-12-12 16:09 ` Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 4/5] scsi: mpt3sas: Increase IOCInit request timeout to 30s Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 5/5] dm table: Remove BUG_ON(in_interrupt()) Sasha Levin
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2020-12-12 16:09 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Qinglang Miao, Thierry Reding, Sasha Levin, dri-devel, linux-tegra

From: Qinglang Miao <miaoqinglang@huawei.com>

[ Upstream commit bf3a3cdcad40e5928a22ea0fd200d17fd6d6308d ]

Fix the missing clk_disable_unprepare() before return from
tegra_sor_init() in the error handling case.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/tegra/sor.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 74d0540b8d4c7..76717d2f51e74 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -2375,17 +2375,23 @@ static int tegra_sor_init(struct host1x_client *client)
 		if (err < 0) {
 			dev_err(sor->dev, "failed to deassert SOR reset: %d\n",
 				err);
+			clk_disable_unprepare(sor->clk);
 			return err;
 		}
 	}
 
 	err = clk_prepare_enable(sor->clk_safe);
-	if (err < 0)
+	if (err < 0) {
+		clk_disable_unprepare(sor->clk);
 		return err;
+	}
 
 	err = clk_prepare_enable(sor->clk_dp);
-	if (err < 0)
+	if (err < 0) {
+		clk_disable_unprepare(sor->clk_safe);
+		clk_disable_unprepare(sor->clk);
 		return err;
+	}
 
 	return 0;
 }
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.9 4/5] scsi: mpt3sas: Increase IOCInit request timeout to 30s
  2020-12-12 16:09 [PATCH AUTOSEL 4.9 1/5] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 2/5] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 3/5] drm/tegra: sor: Disable clocks on error in tegra_sor_init() Sasha Levin
@ 2020-12-12 16:09 ` Sasha Levin
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 5/5] dm table: Remove BUG_ON(in_interrupt()) Sasha Levin
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2020-12-12 16:09 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Sreekanth Reddy, Martin K . Petersen, Sasha Levin,
	MPT-FusionLinux.pdl, linux-scsi

From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>

[ Upstream commit 85dad327d9b58b4c9ce08189a2707167de392d23 ]

Currently the IOCInit request message timeout is set to 10s. This is not
sufficient in some scenarios such as during HBA FW downgrade operations.

Increase the IOCInit request timeout to 30s.

Link: https://lore.kernel.org/r/20201130082733.26120-1-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 601a93953307d..16716b2644020 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -4477,7 +4477,7 @@ _base_send_ioc_init(struct MPT3SAS_ADAPTER *ioc)
 
 	r = _base_handshake_req_reply_wait(ioc,
 	    sizeof(Mpi2IOCInitRequest_t), (u32 *)&mpi_request,
-	    sizeof(Mpi2IOCInitReply_t), (u16 *)&mpi_reply, 10);
+	    sizeof(Mpi2IOCInitReply_t), (u16 *)&mpi_reply, 30);
 
 	if (r != 0) {
 		pr_err(MPT3SAS_FMT "%s: handshake failed (r=%d)\n",
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 4.9 5/5] dm table: Remove BUG_ON(in_interrupt())
  2020-12-12 16:09 [PATCH AUTOSEL 4.9 1/5] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling Sasha Levin
                   ` (2 preceding siblings ...)
  2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 4/5] scsi: mpt3sas: Increase IOCInit request timeout to 30s Sasha Levin
@ 2020-12-12 16:09 ` Sasha Levin
  3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2020-12-12 16:09 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Thomas Gleixner, Sebastian Andrzej Siewior, Mike Snitzer,
	Sasha Levin, dm-devel, linux-raid

From: Thomas Gleixner <tglx@linutronix.de>

[ Upstream commit e7b624183d921b49ef0a96329f21647d38865ee9 ]

The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from
a rework of the dm table code which changed the calling context.

Issuing a BUG for a wrong calling context is frowned upon and
in_interrupt() is deprecated and only covering parts of the wrong
contexts. The sanity check for the context is covered by
CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/md/dm-table.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 2d3ff028f50c9..62e3dc19b6099 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1250,12 +1250,6 @@ void dm_table_event_callback(struct dm_table *t,
 
 void dm_table_event(struct dm_table *t)
 {
-	/*
-	 * You can no longer call dm_table_event() from interrupt
-	 * context, use a bottom half instead.
-	 */
-	BUG_ON(in_interrupt());
-
 	mutex_lock(&_event_lock);
 	if (t->event_fn)
 		t->event_fn(t->event_context);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-12 16:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 16:09 [PATCH AUTOSEL 4.9 1/5] kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling Sasha Levin
2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 2/5] drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve Sasha Levin
2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 3/5] drm/tegra: sor: Disable clocks on error in tegra_sor_init() Sasha Levin
2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 4/5] scsi: mpt3sas: Increase IOCInit request timeout to 30s Sasha Levin
2020-12-12 16:09 ` [PATCH AUTOSEL 4.9 5/5] dm table: Remove BUG_ON(in_interrupt()) Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).