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-devel

[Xen-devel] [PATCH] linux: miscellaneous cleanup

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: miscellaneous cleanup
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Wed, 13 May 2009 15:31:18 +0100
Delivery-date: Wed, 13 May 2009 07:33:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
- add two missing unwind annotations
- mark remaining struct file_operations instances const
- use get_capacity() instead of raw access to the capacity field
- use assert_spin_locked() instead of BUG_ON(!spin_is_locked())
- use clear_tsk_thread_flag() instead of clear_ti_thread_flag()
- remove dead variable cpu_state

As usual, written and tested on 2.6.30-rc4 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- head-2009-05-04.orig/arch/i386/kernel/entry-xen.S   2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/arch/i386/kernel/entry-xen.S        2009-05-13 
14:11:53.000000000 +0200
@@ -388,8 +388,10 @@ ENTRY(sysenter_entry_pv)
        movl %ebp,12(%esp)
        movl $__USER_CS,4(%esp)
        addl $4,%esp
+       CFI_ADJUST_CFA_OFFSET -4
        /* +5*4 is SS:ESP,EFLAGS,CS:EIP. +8 is esp0 setting. */
        pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
+       CFI_ADJUST_CFA_OFFSET 4
 /*
  * Load the potential sixth argument from user stack.
  * Careful about security.
--- head-2009-05-04.orig/drivers/oprofile/oprofile_files.c      2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/drivers/oprofile/oprofile_files.c   2009-05-04 
11:04:43.000000000 +0200
@@ -222,7 +222,7 @@ static ssize_t adomain_read(struct file 
 }
 
 
-static struct file_operations active_domain_ops = {
+static const struct file_operations active_domain_ops = {
        .read           = adomain_read,
        .write          = adomain_write,
 };
@@ -315,7 +315,7 @@ static ssize_t pdomain_read(struct file 
        return retval;
 }
 
-static struct file_operations passive_domain_ops = {
+static const struct file_operations passive_domain_ops = {
        .read           = pdomain_read,
        .write          = pdomain_write,
 };
--- head-2009-05-04.orig/drivers/xen/blkback/vbd.c      2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/drivers/xen/blkback/vbd.c   2009-05-04 11:04:43.000000000 
+0200
@@ -33,7 +33,7 @@
 #include "common.h"
 
 #define vbd_sz(_v)   ((_v)->bdev->bd_part ?                            \
-       (_v)->bdev->bd_part->nr_sects : (_v)->bdev->bd_disk->capacity)
+       (_v)->bdev->bd_part->nr_sects : get_capacity((_v)->bdev->bd_disk))
 
 unsigned long long vbd_size(struct vbd *vbd)
 {
--- head-2009-05-04.orig/drivers/xen/blktap/blktap.c    2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/drivers/xen/blktap/blktap.c 2009-05-04 11:04:43.000000000 
+0200
@@ -958,7 +958,7 @@ static int req_increase(void)
 
 static void mmap_req_del(int mmap)
 {
-       BUG_ON(!spin_is_locked(&pending_free_lock));
+       assert_spin_locked(&pending_free_lock);
 
        kfree(pending_reqs[mmap]);
        pending_reqs[mmap] = NULL;
--- head-2009-05-04.orig/drivers/xen/core/smpboot.c     2009-05-13 
14:06:24.000000000 +0200
+++ head-2009-05-04/drivers/xen/core/smpboot.c  2009-05-04 11:04:43.000000000 
+0200
@@ -48,10 +48,6 @@ cpumask_t cpu_initialized_map;
 struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
 EXPORT_SYMBOL(cpu_data);
 
-#ifdef CONFIG_HOTPLUG_CPU
-DEFINE_PER_CPU(int, cpu_state) = { 0 };
-#endif
-
 static DEFINE_PER_CPU(int, resched_irq);
 static DEFINE_PER_CPU(int, callfunc_irq);
 static char resched_name[NR_CPUS][15];
@@ -345,7 +341,7 @@ void __init smp_prepare_cpus(unsigned in
 #ifdef __x86_64__
                cpu_pda(cpu)->pcurrent = idle;
                cpu_pda(cpu)->cpunumber = cpu;
-               clear_ti_thread_flag(idle->thread_info, TIF_FORK);
+               clear_tsk_thread_flag(idle, TIF_FORK);
 #endif
 
                irq_ctx_init(cpu);




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux: miscellaneous cleanup, Jan Beulich <=