* [PATCH AUTOSEL 6.5 01/52] fbdev: atyfb: only use ioremap_uc() on i386 and ia64
@ 2023-10-29 22:52 Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 32/52] fbdev: omapfb: fix some error codes Sasha Levin
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Sasha Levin @ 2023-10-29 22:52 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Arnd Bergmann, Baoquan He, Luis Chamberlain, Helge Deller,
Thomas Zimmermann, Christophe Leroy, linux-fbdev, dri-devel,
Sasha Levin, sam, javierm, xu.panda, schnelle, steve
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit c1a8d1d0edb71dec15c9649cb56866c71c1ecd9e ]
ioremap_uc() is only meaningful on old x86-32 systems with the PAT
extension, and on ia64 with its slightly unconventional ioremap()
behavior, everywhere else this is the same as ioremap() anyway.
Change the only driver that still references ioremap_uc() to only do so
on x86-32/ia64 in order to allow removing that interface at some
point in the future for the other architectures.
On some architectures, ioremap_uc() just returns NULL, changing
the driver to call ioremap() means that they now have a chance
of working correctly.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/aty/atyfb_base.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index cba2b113b28b0..a73114c1c6918 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -3440,11 +3440,15 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info,
}
info->fix.mmio_start = raddr;
+#if defined(__i386__) || defined(__ia64__)
/*
* By using strong UC we force the MTRR to never have an
* effect on the MMIO region on both non-PAT and PAT systems.
*/
par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);
+#else
+ par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000);
+#endif
if (par->ati_regbase == NULL)
return -ENOMEM;
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH AUTOSEL 6.5 32/52] fbdev: omapfb: fix some error codes
2023-10-29 22:52 [PATCH AUTOSEL 6.5 01/52] fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Sasha Levin
@ 2023-10-29 22:53 ` Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 33/52] fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() Sasha Levin
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2023-10-29 22:53 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Dan Carpenter, Helge Deller, Sasha Levin, sam, tzimmermann,
xu.panda, mielkesteven, u.kleine-koenig, linux-fbdev, linux-omap,
dri-devel
From: Dan Carpenter <dan.carpenter@linaro.org>
[ Upstream commit dc608db793731426938baa2f0e75a4a3cce5f5cf ]
Return negative -ENXIO instead of positive ENXIO.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/omap/omapfb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index ad65554b33c35..0be95b4e14fdb 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1648,13 +1648,13 @@ static int omapfb_do_probe(struct platform_device *pdev,
}
fbdev->int_irq = platform_get_irq(pdev, 0);
if (fbdev->int_irq < 0) {
- r = ENXIO;
+ r = -ENXIO;
goto cleanup;
}
fbdev->ext_irq = platform_get_irq(pdev, 1);
if (fbdev->ext_irq < 0) {
- r = ENXIO;
+ r = -ENXIO;
goto cleanup;
}
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH AUTOSEL 6.5 33/52] fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
2023-10-29 22:52 [PATCH AUTOSEL 6.5 01/52] fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 32/52] fbdev: omapfb: fix some error codes Sasha Levin
@ 2023-10-29 22:53 ` Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 35/52] fbdev: core: syscopyarea: " Sasha Levin
3 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2023-10-29 22:53 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jorge Maidana, Helge Deller, Sasha Levin, spock, linux-fbdev,
dri-devel
From: Jorge Maidana <jorgem.linux@gmail.com>
[ Upstream commit 1022e7e2f40574c74ed32c3811b03d26b0b81daf ]
Delete the v86d netlink only after all the VBE tasks have been
completed.
Fixes initial state restore on module unload:
uvesafb: VBE state restore call failed (eax=0x4f04, err=-19)
Signed-off-by: Jorge Maidana <jorgem.linux@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/uvesafb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 78d85dae8ec80..c4559768f00f6 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -1931,10 +1931,10 @@ static void uvesafb_exit(void)
}
}
- cn_del_callback(&uvesafb_cn_id);
driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d);
platform_device_unregister(uvesafb_device);
platform_driver_unregister(&uvesafb_driver);
+ cn_del_callback(&uvesafb_cn_id);
}
module_exit(uvesafb_exit);
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing
2023-10-29 22:52 [PATCH AUTOSEL 6.5 01/52] fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 32/52] fbdev: omapfb: fix some error codes Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 33/52] fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() Sasha Levin
@ 2023-10-29 22:53 ` Sasha Levin
2023-10-30 8:39 ` Sergey Shtylyov
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 35/52] fbdev: core: syscopyarea: " Sasha Levin
3 siblings, 1 reply; 8+ messages in thread
From: Sasha Levin @ 2023-10-29 22:53 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sergey Shtylyov, Helge Deller, Sasha Levin, daniel, linux-fbdev,
dri-devel
From: Sergey Shtylyov <s.shtylyov@omp.ru>
[ Upstream commit 7f33df94cf0156f64eee9509bd9b4a178990f613 ]
In cfb_copyarea(), the local variable bits_per_line is needlessly typed as
*unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit
type on the 64-bit arches; that variable's value is derived from the __u32
typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bit
*unsigned int* type should still be enough to store the # of bits per line.
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/core/cfbcopyarea.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/core/cfbcopyarea.c b/drivers/video/fbdev/core/cfbcopyarea.c
index 6d4bfeecee350..5b80bf3dae504 100644
--- a/drivers/video/fbdev/core/cfbcopyarea.c
+++ b/drivers/video/fbdev/core/cfbcopyarea.c
@@ -382,7 +382,7 @@ void cfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
{
u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy;
u32 height = area->height, width = area->width;
- unsigned long const bits_per_line = p->fix.line_length*8u;
+ unsigned int const bits_per_line = p->fix.line_length * 8u;
unsigned long __iomem *base = NULL;
int bits = BITS_PER_LONG, bytes = bits >> 3;
unsigned dst_idx = 0, src_idx = 0, rev_copy = 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH AUTOSEL 6.5 35/52] fbdev: core: syscopyarea: fix sloppy typing
2023-10-29 22:52 [PATCH AUTOSEL 6.5 01/52] fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Sasha Levin
` (2 preceding siblings ...)
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing Sasha Levin
@ 2023-10-29 22:53 ` Sasha Levin
2023-10-30 8:40 ` Sergey Shtylyov
3 siblings, 1 reply; 8+ messages in thread
From: Sasha Levin @ 2023-10-29 22:53 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sergey Shtylyov, Helge Deller, Sasha Levin, daniel, linux-fbdev,
dri-devel
From: Sergey Shtylyov <s.shtylyov@omp.ru>
[ Upstream commit e8e4a470b677511f9d1ad4f3cef32adc1d9a60ca ]
In sys_copyarea(), the local variable bits_per_line is needlessly typed as
*unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit
type on the 64-bit arches; that variable's value is derived from the __u32
typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bit
*unsigned int* type should still be enough to store the # of bits per line.
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/core/syscopyarea.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/core/syscopyarea.c b/drivers/video/fbdev/core/syscopyarea.c
index c1eda31909682..7b8bd3a2bedc5 100644
--- a/drivers/video/fbdev/core/syscopyarea.c
+++ b/drivers/video/fbdev/core/syscopyarea.c
@@ -316,7 +316,7 @@ void sys_copyarea(struct fb_info *p, const struct fb_copyarea *area)
{
u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy;
u32 height = area->height, width = area->width;
- unsigned long const bits_per_line = p->fix.line_length*8u;
+ unsigned int const bits_per_line = p->fix.line_length * 8u;
unsigned long *base = NULL;
int bits = BITS_PER_LONG, bytes = bits >> 3;
unsigned dst_idx = 0, src_idx = 0, rev_copy = 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing Sasha Levin
@ 2023-10-30 8:39 ` Sergey Shtylyov
2023-11-04 2:07 ` Sasha Levin
0 siblings, 1 reply; 8+ messages in thread
From: Sergey Shtylyov @ 2023-10-30 8:39 UTC (permalink / raw)
To: Sasha Levin, linux-kernel, stable
Cc: Helge Deller, daniel, linux-fbdev, dri-devel
Hello!
On 10/30/23 1:53 AM, Sasha Levin wrote:
> From: Sergey Shtylyov <s.shtylyov@omp.ru>
>
> [ Upstream commit 7f33df94cf0156f64eee9509bd9b4a178990f613 ]
>
> In cfb_copyarea(), the local variable bits_per_line is needlessly typed as
> *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit
> type on the 64-bit arches; that variable's value is derived from the __u32
> typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bit
> *unsigned int* type should still be enough to store the # of bits per line.
>
> Found by Linux Verification Center (linuxtesting.org) with the Svace static
> analysis tool.
>
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> Signed-off-by: Helge Deller <deller@gmx.de>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/video/fbdev/core/cfbcopyarea.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/core/cfbcopyarea.c b/drivers/video/fbdev/core/cfbcopyarea.c
> index 6d4bfeecee350..5b80bf3dae504 100644
> --- a/drivers/video/fbdev/core/cfbcopyarea.c
> +++ b/drivers/video/fbdev/core/cfbcopyarea.c
> @@ -382,7 +382,7 @@ void cfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
> {
> u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy;
> u32 height = area->height, width = area->width;
> - unsigned long const bits_per_line = p->fix.line_length*8u;
> + unsigned int const bits_per_line = p->fix.line_length * 8u;
> unsigned long __iomem *base = NULL;
> int bits = BITS_PER_LONG, bytes = bits >> 3;
> unsigned dst_idx = 0, src_idx = 0, rev_copy = 0;
I highly doubt this is necessary to pull that into stable. This was
intended to be a cleanup originally.
MBR, Sergey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH AUTOSEL 6.5 35/52] fbdev: core: syscopyarea: fix sloppy typing
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 35/52] fbdev: core: syscopyarea: " Sasha Levin
@ 2023-10-30 8:40 ` Sergey Shtylyov
0 siblings, 0 replies; 8+ messages in thread
From: Sergey Shtylyov @ 2023-10-30 8:40 UTC (permalink / raw)
To: Sasha Levin, linux-kernel, stable
Cc: Helge Deller, daniel, linux-fbdev, dri-devel
On 10/30/23 1:53 AM, Sasha Levin wrote:
> From: Sergey Shtylyov <s.shtylyov@omp.ru>
>
> [ Upstream commit e8e4a470b677511f9d1ad4f3cef32adc1d9a60ca ]
>
> In sys_copyarea(), the local variable bits_per_line is needlessly typed as
> *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit
> type on the 64-bit arches; that variable's value is derived from the __u32
> typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bit
> *unsigned int* type should still be enough to store the # of bits per line.
>
> Found by Linux Verification Center (linuxtesting.org) with the Svace static
> analysis tool.
>
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> Signed-off-by: Helge Deller <deller@gmx.de>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/video/fbdev/core/syscopyarea.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/core/syscopyarea.c b/drivers/video/fbdev/core/syscopyarea.c
> index c1eda31909682..7b8bd3a2bedc5 100644
> --- a/drivers/video/fbdev/core/syscopyarea.c
> +++ b/drivers/video/fbdev/core/syscopyarea.c
> @@ -316,7 +316,7 @@ void sys_copyarea(struct fb_info *p, const struct fb_copyarea *area)
> {
> u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy;
> u32 height = area->height, width = area->width;
> - unsigned long const bits_per_line = p->fix.line_length*8u;
> + unsigned int const bits_per_line = p->fix.line_length * 8u;
> unsigned long *base = NULL;
> int bits = BITS_PER_LONG, bytes = bits >> 3;
> unsigned dst_idx = 0, src_idx = 0, rev_copy = 0;
This one doesn't seem necessary in the stable kernels too...
MBR, Sergey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing
2023-10-30 8:39 ` Sergey Shtylyov
@ 2023-11-04 2:07 ` Sasha Levin
0 siblings, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2023-11-04 2:07 UTC (permalink / raw)
To: Sergey Shtylyov
Cc: linux-kernel, stable, Helge Deller, daniel, linux-fbdev,
dri-devel
On Mon, Oct 30, 2023 at 11:39:14AM +0300, Sergey Shtylyov wrote:
>Hello!
>
>On 10/30/23 1:53 AM, Sasha Levin wrote:
>
>> From: Sergey Shtylyov <s.shtylyov@omp.ru>
>>
>> [ Upstream commit 7f33df94cf0156f64eee9509bd9b4a178990f613 ]
>>
>> In cfb_copyarea(), the local variable bits_per_line is needlessly typed as
>> *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit
>> type on the 64-bit arches; that variable's value is derived from the __u32
>> typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bit
>> *unsigned int* type should still be enough to store the # of bits per line.
>>
>> Found by Linux Verification Center (linuxtesting.org) with the Svace static
>> analysis tool.
>>
>> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> drivers/video/fbdev/core/cfbcopyarea.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/video/fbdev/core/cfbcopyarea.c b/drivers/video/fbdev/core/cfbcopyarea.c
>> index 6d4bfeecee350..5b80bf3dae504 100644
>> --- a/drivers/video/fbdev/core/cfbcopyarea.c
>> +++ b/drivers/video/fbdev/core/cfbcopyarea.c
>> @@ -382,7 +382,7 @@ void cfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
>> {
>> u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy;
>> u32 height = area->height, width = area->width;
>> - unsigned long const bits_per_line = p->fix.line_length*8u;
>> + unsigned int const bits_per_line = p->fix.line_length * 8u;
>> unsigned long __iomem *base = NULL;
>> int bits = BITS_PER_LONG, bytes = bits >> 3;
>> unsigned dst_idx = 0, src_idx = 0, rev_copy = 0;
>
> I highly doubt this is necessary to pull that into stable. This was
>intended to be a cleanup originally.
I'll drop this and the other one you've pointed out, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-11-04 2:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-29 22:52 [PATCH AUTOSEL 6.5 01/52] fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 32/52] fbdev: omapfb: fix some error codes Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 33/52] fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 34/52] fbdev: core: cfbcopyarea: fix sloppy typing Sasha Levin
2023-10-30 8:39 ` Sergey Shtylyov
2023-11-04 2:07 ` Sasha Levin
2023-10-29 22:53 ` [PATCH AUTOSEL 6.5 35/52] fbdev: core: syscopyarea: " Sasha Levin
2023-10-30 8:40 ` Sergey Shtylyov
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).