search for: console_lock

Displaying 20 results from an estimated 52 matches for "console_lock".

Did you mean: console_unlock
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...-omap2/serial.c index 302da74..32e91a9 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -812,7 +812,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) oh->dev_attr = uart; - acquire_console_sem(); /* in case the earlycon is on the UART */ + console_lock(); /* in case the earlycon is on the UART */ /* * Because of early UART probing, UART did not get idled @@ -838,7 +838,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) omap_uart_block_sleep(uart); uart->timeout = DEFAULT_TIMEOUT; - release_console_sem(); + conso...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...-omap2/serial.c index 302da74..32e91a9 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -812,7 +812,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) oh->dev_attr = uart; - acquire_console_sem(); /* in case the earlycon is on the UART */ + console_lock(); /* in case the earlycon is on the UART */ /* * Because of early UART probing, UART did not get idled @@ -838,7 +838,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) omap_uart_block_sleep(uart); uart->timeout = DEFAULT_TIMEOUT; - release_console_sem(); + conso...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...-omap2/serial.c index 302da74..32e91a9 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -812,7 +812,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) oh->dev_attr = uart; - acquire_console_sem(); /* in case the earlycon is on the UART */ + console_lock(); /* in case the earlycon is on the UART */ /* * Because of early UART probing, UART did not get idled @@ -838,7 +838,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) omap_uart_block_sleep(uart); uart->timeout = DEFAULT_TIMEOUT; - release_console_sem(); + conso...
2013 Jan 03
2
3.8-rc2: EFI framebuffer lock inversion...
...ocking dependency detected ] 3.8.0-rc2-expert #1 Not tainted ------------------------------------------------------- Xorg/1193 is trying to acquire lock: ((fb_notifier_list).rwsem){++++.+}, at: [<ffffffff810697c1>] __blocking_notifier_call_chain+0x51/0xc0 but task is already holding lock: (console_lock){+.+.+.}, at: [<ffffffff81263f95>] do_fb_ioctl+0x2e5/0x5f0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (console_lock){+.+.+.}: [<ffffffff81090a61>] __lock_acquire+0x3a1/0xb60 [<ffffffff810916ea>] lock_acquir...
2016 Jul 13
2
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
On Wed, Jul 13, 2016 at 11:54:49AM +0200, Daniel Vetter wrote: > On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > while nouveau was runtime suspended, a deadlock would occur due to > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > i915 code (which was don...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...7:19PM +0200, Daniel Vetter wrote: > On Wed, Jul 13, 2016 at 02:40:50PM +0200, Peter Wu wrote: > > On Wed, Jul 13, 2016 at 11:54:49AM +0200, Daniel Vetter wrote: > > > On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > > > > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > > > while nouveau was runtime suspended, a deadlock would occur due to > > > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based o...
2013 Aug 16
7
[PATCH v2] xen/console: buffer and show origin of guest PV writes
...kcount; + struct domain *cd = current->domain; while ( count > 0 ) { @@ -388,19 +390,60 @@ static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, int count) return -EFAULT; kbuf[kcount] = ''\0''; - spin_lock_irq(&console_lock); + if ( is_hardware_domain(cd) ) + { + /* Use direct console output as it could be interactive */ + spin_lock_irq(&console_lock); + + sercon_puts(kbuf); + video_puts(kbuf); - sercon_puts(kbuf); - video_puts(kbuf); +...
2016 Jul 12
6
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called while nouveau was runtime suspended, a deadlock would occur due to nouveau_fbcon_set_suspend also trying to obtain console_lock(). Fix this by delaying the drm_fb_helper_set_suspend call. Based on the i915 code (which was done for performance reasons though). Cc: Chris Wils...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
On Wed, Jul 13, 2016 at 02:40:50PM +0200, Peter Wu wrote: > On Wed, Jul 13, 2016 at 11:54:49AM +0200, Daniel Vetter wrote: > > On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > > > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > > while nouveau was runtime suspended, a deadlock would occur due to > > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > >...
2012 Sep 12
1
[PATCH] drm/nouveau: fix early vram corruption originating from vgacon
...onfig, charp, 0400); @@ -247,9 +250,20 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) struct nouveau_drm *drm; int ret; + /* Blank initial console to prevent VRAM corruption while we initialize + * the HW. For vgacon it will move console memory from VGA VRAM to RAM. + */ + console_lock(); + do_blank_screen(1); + console_unlock(); + + /* Completely disable access to VGA IO/memory, just to be sure no one + * will change it. */ + pci_write_config_byte(pdev, NV_PCI_VGAMEM_ENABLE, 0); + ret = nouveau_cli_create(pdev, "DRM", sizeof(*drm), (void**)&drm); if (ret) - r...
2013 Jan 30
1
[PATCH v2] xen: print "debug=y|n" during hypervisor startup
...7,11 @@ void __init console_init_preirq(void) { char *p; int sh; +#ifndef NDEBUG + char debug = ''y''; +#else + char debug = ''n''; +#endif serial_init_preirq(); @@ -608,10 +613,10 @@ void __init console_init_preirq(void) spin_lock(&console_lock); __putstr(xen_banner()); spin_unlock(&console_lock); - printk("Xen version %d.%d%s (%s@%s) (%s) %s\n", + printk("Xen version %d.%d%s (%s@%s) (%s) debug=%c %s\n", xen_major_version(), xen_minor_version(), xen_extra_version(), xen_compi...
2013 Sep 09
0
[PATCH v3] xen/console: buffer and show origin of guest PV writes
...kcount; + struct domain *cd = current->domain; while ( count > 0 ) { @@ -388,19 +390,60 @@ static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, int count) return -EFAULT; kbuf[kcount] = ''\0''; - spin_lock_irq(&console_lock); + if ( is_hardware_domain(cd) ) + { + /* Use direct console output as it could be interactive */ + spin_lock_irq(&console_lock); + + sercon_puts(kbuf); + video_puts(kbuf); - sercon_puts(kbuf); - video_puts(kbuf); +...
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > while nouveau was runtime suspended, a deadlock would occur due to > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > i915 code (which was done for performance reasons...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > while nouveau was runtime suspended, a deadlock would occur due to > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > i915 code (which was done for performance reasons...
2018 Oct 02
1
[PATCH] qxl: fix null-pointer crash during suspend
...rs/gpu/drm/qxl/qxl_drv.c > @@ -136,20 +136,11 @@ static int qxl_drm_freeze(struct drm_device *dev) > { > struct pci_dev *pdev = dev->pdev; > struct qxl_device *qdev = dev->dev_private; > - struct drm_crtc *crtc; > - > - drm_kms_helper_poll_disable(dev); > - > - console_lock(); > - qxl_fbdev_set_suspend(qdev, 1); > - console_unlock(); > + int ret; > > - /* unpin the front buffers */ > - list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { > - const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; > - if (c...
2019 Feb 20
4
[PATCH] drm/qxl: unbind vgacon
...<linux/vt_kern.h> #include <drm/drmP.h> #include <drm/drm.h> @@ -89,6 +90,11 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) drm_kms_helper_poll_init(&qdev->ddev); + /* unbind vgacon to make sure it doesn't touch our vga registers */ + console_lock(); + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, true); + console_unlock(); + /* Complete initialization. */ ret = drm_dev_register(&qdev->ddev, ent->driver_data); if (ret) -- 2.9.3
2019 Feb 20
4
[PATCH] drm/qxl: unbind vgacon
...<linux/vt_kern.h> #include <drm/drmP.h> #include <drm/drm.h> @@ -89,6 +90,11 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) drm_kms_helper_poll_init(&qdev->ddev); + /* unbind vgacon to make sure it doesn't touch our vga registers */ + console_lock(); + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, true); + console_unlock(); + /* Complete initialization. */ ret = drm_dev_register(&qdev->ddev, ent->driver_data); if (ret) -- 2.9.3
2017 Jan 12
2
[PATCH v2 1/2] drm/nouveau: Don't enabling polling twice on runtime resume
As it turns out, on cards that actually have CRTCs on them we're already calling drm_kms_helper_poll_enable(drm_dev) from nouveau_display_resume() before we call it in nouveau_pmops_runtime_resume(). This leads us to accidentally trying to enable polling twice, which results in a potential deadlock between the RPM locks and drm_dev->mode_config.mutex if we end up trying to enable polling
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > while nouveau was runtime suspended, a deadlock would occur due to > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > i915 code (which was done for performance reasons...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
On Wed, Jul 13, 2016 at 06:17:47PM +0100, Chris Wilson wrote: > On Tue, Jul 12, 2016 at 06:49:34PM +0200, Peter Wu wrote: > > The FBIOPUT_CON2FBMAP ioctl takes a console_lock(). When this is called > > while nouveau was runtime suspended, a deadlock would occur due to > > nouveau_fbcon_set_suspend also trying to obtain console_lock(). > > > > Fix this by delaying the drm_fb_helper_set_suspend call. Based on the > > i915 code (which was don...