WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XENFB] No need for IRQs to be disabled i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XENFB] No need for IRQs to be disabled in critical regions.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Dec 2006 19:20:13 +0000
Delivery-date: Thu, 14 Dec 2006 11:19:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID c98ca86138a7422cdf9b15d87c95619b7277bb6a
# Parent  35c724302bdd1339e17dad43085c841917a5dd88
[XENFB] No need for IRQs to be disabled in critical regions.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c |   28 +++++++++--------------
 1 files changed, 11 insertions(+), 17 deletions(-)

diff -r 35c724302bdd -r c98ca86138a7 
linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c
--- a/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c  Thu Dec 14 11:09:27 
2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c  Thu Dec 14 11:37:14 
2006 +0000
@@ -105,7 +105,6 @@ static int xenfb_queue_full(struct xenfb
 
 static void xenfb_update_screen(struct xenfb_info *info)
 {
-       unsigned long flags;
        int y1, y2, x1, x2;
        struct xenfb_mapping *map;
 
@@ -114,7 +113,7 @@ static void xenfb_update_screen(struct x
        if (xenfb_queue_full(info))
                return;
 
-       spin_lock_irqsave(&info->mm_lock, flags);
+       spin_lock(&info->mm_lock);
 
        y1 = info->y1;
        y2 = info->y2;
@@ -131,7 +130,7 @@ static void xenfb_update_screen(struct x
                map->faults = 0;
        }
 
-       spin_unlock_irqrestore(&info->mm_lock, flags);
+       spin_unlock(&info->mm_lock);
 
        xenfb_do_update(info, x1, y1, x2 - x1, y2 - y1);
 }
@@ -214,11 +213,9 @@ static void xenfb_refresh(struct xenfb_i
 static void xenfb_refresh(struct xenfb_info *info,
                          int x1, int y1, int w, int h)
 {
-       unsigned long flags;
-
-       spin_lock_irqsave(&info->mm_lock, flags);
+       spin_lock(&info->mm_lock);
        __xenfb_refresh(info, x1, y1, w, h);
-       spin_unlock_irqrestore(&info->mm_lock, flags);
+       spin_unlock(&info->mm_lock);
 }
 
 static void xenfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
@@ -255,14 +252,13 @@ static void xenfb_vm_close(struct vm_are
 {
        struct xenfb_mapping *map = vma->vm_private_data;
        struct xenfb_info *info = map->info;
-       unsigned long flags;
-
-       spin_lock_irqsave(&info->mm_lock, flags);
+
+       spin_lock(&info->mm_lock);
        if (atomic_dec_and_test(&map->map_refs)) {
                list_del(&map->link);
                kfree(map);
        }
-       spin_unlock_irqrestore(&info->mm_lock, flags);
+       spin_unlock(&info->mm_lock);
 }
 
 static struct page *xenfb_vm_nopage(struct vm_area_struct *vma,
@@ -271,14 +267,13 @@ static struct page *xenfb_vm_nopage(stru
        struct xenfb_mapping *map = vma->vm_private_data;
        struct xenfb_info *info = map->info;
        int pgnr = (vaddr - vma->vm_start) >> PAGE_SHIFT;
-       unsigned long flags;
        struct page *page;
        int y1, y2;
 
        if (pgnr >= info->nr_pages)
                return NOPAGE_SIGBUS;
 
-       spin_lock_irqsave(&info->mm_lock, flags);
+       spin_lock(&info->mm_lock);
        page = info->pages[pgnr];
        get_page(page);
        map->faults++;
@@ -288,7 +283,7 @@ static struct page *xenfb_vm_nopage(stru
        if (y2 > info->fb_info->var.yres)
                y2 = info->fb_info->var.yres;
        __xenfb_refresh(info, 0, y1, info->fb_info->var.xres, y2 - y1);
-       spin_unlock_irqrestore(&info->mm_lock, flags);
+       spin_unlock(&info->mm_lock);
 
        if (type)
                *type = VM_FAULT_MINOR;
@@ -305,7 +300,6 @@ static int xenfb_mmap(struct fb_info *fb
 static int xenfb_mmap(struct fb_info *fb_info, struct vm_area_struct *vma)
 {
        struct xenfb_info *info = fb_info->par;
-       unsigned long flags;
        struct xenfb_mapping *map;
        int map_pages;
 
@@ -329,9 +323,9 @@ static int xenfb_mmap(struct fb_info *fb
        map->info = info;
        atomic_set(&map->map_refs, 1);
 
-       spin_lock_irqsave(&info->mm_lock, flags);
+       spin_lock(&info->mm_lock);
        list_add(&map->link, &info->mappings);
-       spin_unlock_irqrestore(&info->mm_lock, flags);
+       spin_unlock(&info->mm_lock);
 
        vma->vm_ops = &xenfb_vm_ops;
        vma->vm_flags |= (VM_DONTEXPAND | VM_RESERVED);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XENFB] No need for IRQs to be disabled in critical regions., Xen patchbot-unstable <=