This fix went into 4.10 and looks like it is needed for the 4.9-stable
branch:
commit d47b8715953ad0cf82bb0a9d30d7b11d83bc9c11
Author: Chao Yu <yuchao0(a)huawei.com>
Date: Sat Nov 5 11:12:40 2016 +0800
Revert "f2fs: do not recover from previous remained wrong dnodes"
Ben.
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
Generally, irq_create_affinity_masks() assign default affinity to pre/
post vectors correctly. However, it ignore the case that there are only
pre/post vectors (when nvecs == affd->pre_vectors + affd->post_vectors)
and return NULL. This case usually happens when nvecs = 1 (e.g. in nvme
driver when MSI-X is unavailable and fallback to MSI) and will trigger
the warning in pci_irq_get_affinity(). This patch fix the corner case.
Fixes: 6f9a22bc5775d231ab8f ("PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs")
Cc: stable(a)vger.kernel.org
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Michael Hernandez <michael.hernandez(a)cavium.com>
Signed-off-by: Huacai Chen <chenhc(a)lemote.com>
---
kernel/irq/affinity.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index 45b68b4..9b766eb 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -240,13 +240,6 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
struct irq_affinity_desc *masks = NULL;
int i, nr_sets;
- /*
- * If there aren't any vectors left after applying the pre/post
- * vectors don't bother with assigning affinity.
- */
- if (nvecs == affd->pre_vectors + affd->post_vectors)
- return NULL;
-
node_to_cpumask = alloc_node_to_cpumask();
if (!node_to_cpumask)
return NULL;
@@ -255,6 +248,17 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
if (!masks)
goto outnodemsk;
+ /*
+ * If there aren't any vectors left after applying the pre/post
+ * vectors then just assign the default affinity to all vectors.
+ */
+ if (nvecs == affd->pre_vectors + affd->post_vectors) {
+ /* Fill all vectors that don't need affinity */
+ for (curvec = 0; curvec < nvecs; curvec++)
+ cpumask_copy(&masks[curvec].mask, irq_default_affinity);
+ goto outnodemsk;
+ }
+
/* Fill out vectors at the beginning that don't need affinity */
for (curvec = 0; curvec < affd->pre_vectors; curvec++)
cpumask_copy(&masks[curvec].mask, irq_default_affinity);
--
2.7.0
Some imx platforms do not have fwnode connections to all CSI input
ports, and should not be treated as an error. This includes the
imx6q SabreAuto, which has no connections to ipu1_csi1 and ipu2_csi0.
Return -ENOTCONN in imx_csi_parse_endpoint() so that v4l2-fwnode
endpoint parsing will not treat an unconnected CSI input port as
an error.
Fixes: c893500a16baf ("media: imx: csi: Register a subdev notifier")
Signed-off-by: Steve Longerbeam <slongerbeam(a)gmail.com>
Reviewed-by: Philipp Zabel <p.zabel(a)pengutronix.de>
Acked-by: Tim Harvey <tharvey(a)gateworks.com>
Cc: stable(a)vger.kernel.org
---
Changes in v2:
- Added some acks and Cc: stable. No functional changes.
---
drivers/staging/media/imx/imx-media-csi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 555aa45e02e3..e18f58f56dfb 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -1861,7 +1861,7 @@ static int imx_csi_parse_endpoint(struct device *dev,
struct v4l2_fwnode_endpoint *vep,
struct v4l2_async_subdev *asd)
{
- return fwnode_device_is_available(asd->match.fwnode) ? 0 : -EINVAL;
+ return fwnode_device_is_available(asd->match.fwnode) ? 0 : -ENOTCONN;
}
static int imx_csi_async_register(struct csi_priv *priv)
--
2.17.1
'nobats' kernel parameter or some options like CONFIG_DEBUG_PAGEALLOC
deny the use of BATS for mapping memory.
This patch makes sure that the specific wii RAM mapping function
takes it into account as well.
Fixes: de32400dd26e ("wii: use both mem1 and mem2 as ram")
Cc: stable(a)vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy(a)c-s.fr>
---
Resending due to some servers not accepting 'umlaut' on Jonathan's family name. Sorry Jonathan.
<linux-kernel(a)vger.kernel.org>: host vger.kernel.org[209.132.180.67] said: 550
5.7.1 Content-Policy reject msg: Message headers can not have 8-bit
non-ASCII characters in it; Use MIME encodings if such are needed! BF:<H
1.16368e-10>; S1729557AbfAOQgb (in reply to end of DATA command)
<stable(a)vger.kernel.org>: host vger.kernel.org[209.132.180.67] said: 550 5.7.1
Content-Policy reject msg: Message headers can not have 8-bit non-ASCII
characters in it; Use MIME encodings if such are needed! BF:<H
1.16368e-10>; S1729557AbfAOQgb (in reply to end of DATA command)
arch/powerpc/platforms/embedded6xx/wii.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
index ecf703ee3a76..bae843e32ae7 100644
--- a/arch/powerpc/platforms/embedded6xx/wii.c
+++ b/arch/powerpc/platforms/embedded6xx/wii.c
@@ -82,6 +82,9 @@ unsigned long __init wii_mmu_mapin_mem2(unsigned long top)
/* MEM2 64MB@0x10000000 */
delta = wii_hole_start + wii_hole_size;
+ if (__map_without_bats)
+ return delta;
+
size = top - delta;
for (bl = 128<<10; bl < max_size; bl <<= 1) {
if (bl * 2 > size)
--
2.13.3