[vz7] fbcon: use kvmalloc() for scrollback buffer

Submitted by Konstantin Khorenko on Nov. 19, 2018, 4:20 p.m.

Details

Message ID 20181119162034.30914-1-khorenko@virtuozzo.com
State New
Series "fbcon: use kvmalloc() for scrollback buffer"
Headers show

Commit Message

Konstantin Khorenko Nov. 19, 2018, 4:20 p.m.
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@virtuozzo.com>
---
 drivers/video/console/fbcon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index e409686abee9..dbbf049956e3 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -993,7 +993,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;
@@ -1002,7 +1002,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;
 			}
@@ -3551,7 +3551,7 @@  static void fbcon_exit(void)
 	if (fbcon_has_exited)
 		return;
 
-	kfree((void *)softback_buf);
+	kvfree((void *)softback_buf);
 	softback_buf = 0UL;
 
 	for (i = 0; i < FB_MAX; i++) {