[Devel] [PATCH RH8 05/10] fbcon: use kvmalloc() for scrollback buffer
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Wed May 26 17:56:13 MSK 2021
From: Konstantin Khorenko <khorenko at virtuozzo.com>
Scrollback frame buffer is rather big - 32K,
so it requires 3rd order page, so let's use kvmalloc() instead of
ordinary kmalloc() for it.
https://pmc.acronis.com/browse/VSTOR-17781
https://jira.sw.ru/browse/HCI-188
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Rebased to vz8:
- fbcon.c was moved to drivers/video/fbdev/core/fbcon.c
(cherry-picked from e60259bd950c)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 5fb9547..4316fd2 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -980,7 +980,7 @@ static const char *fbcon_startup(void)
if (!softback_buf) {
softback_buf =
(unsigned long)
- kmalloc(fbcon_softback_size,
+ kvmalloc(fbcon_softback_size,
GFP_KERNEL);
if (!softback_buf) {
fbcon_softback_size = 0;
@@ -989,7 +989,7 @@ static const char *fbcon_startup(void)
}
} else {
if (softback_buf) {
- kfree((void *) softback_buf);
+ kvfree((void *) softback_buf);
softback_buf = 0;
softback_top = 0;
}
@@ -3553,7 +3553,7 @@ static void fbcon_exit(void)
struct fb_info *info;
int i, j, mapped;
- kfree((void *)softback_buf);
+ kvfree((void *)softback_buf);
softback_buf = 0UL;
for (i = 0; i < FB_MAX; i++) {
--
1.8.3.1
More information about the Devel
mailing list