Commit a0332406 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] sched: fix scheduling latencies in vgacon.c

This patch fixes scheduling latencies in vgacon_do_font_op().  The code is
protected by vga_lock already so it's safe to drop (and re-acquire) the
BKL.

Has been tested in the -VP patchset.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fcaa3865
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/smp_lock.h>
#include <video/vga.h> #include <video/vga.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -763,6 +764,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) ...@@ -763,6 +764,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
charmap += 4 * cmapsz; charmap += 4 * cmapsz;
#endif #endif
unlock_kernel();
spin_lock_irq(&vga_lock); spin_lock_irq(&vga_lock);
/* First, the Sequencer */ /* First, the Sequencer */
vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1); vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1);
...@@ -848,6 +850,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) ...@@ -848,6 +850,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0); vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0);
} }
spin_unlock_irq(&vga_lock); spin_unlock_irq(&vga_lock);
lock_kernel();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment