[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] xen: miscellaneous cleanup
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1242292090 -3600 # Node ID 271d9b9bee40657b1714b2bb62531e989c7b5813 # Parent 42dfb4e2bce075458446970be280f03d151db0f2 xen: miscellaneous cleanup - 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 Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- arch/i386/kernel/entry-xen.S | 2 ++ drivers/oprofile/oprofile_files.c | 4 ++-- drivers/xen/blkback/vbd.c | 2 +- drivers/xen/blktap/blktap.c | 2 +- drivers/xen/core/smpboot.c | 6 +----- 5 files changed, 7 insertions(+), 9 deletions(-) diff -r 42dfb4e2bce0 -r 271d9b9bee40 arch/i386/kernel/entry-xen.S --- a/arch/i386/kernel/entry-xen.S Tue May 05 13:32:55 2009 +0100 +++ b/arch/i386/kernel/entry-xen.S Thu May 14 10:08:10 2009 +0100 @@ -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. diff -r 42dfb4e2bce0 -r 271d9b9bee40 drivers/oprofile/oprofile_files.c --- a/drivers/oprofile/oprofile_files.c Tue May 05 13:32:55 2009 +0100 +++ b/drivers/oprofile/oprofile_files.c Thu May 14 10:08:10 2009 +0100 @@ -215,7 +215,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, }; @@ -308,7 +308,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, }; diff -r 42dfb4e2bce0 -r 271d9b9bee40 drivers/xen/blkback/vbd.c --- a/drivers/xen/blkback/vbd.c Tue May 05 13:32:55 2009 +0100 +++ b/drivers/xen/blkback/vbd.c Thu May 14 10:08:10 2009 +0100 @@ -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) { diff -r 42dfb4e2bce0 -r 271d9b9bee40 drivers/xen/blktap/blktap.c --- a/drivers/xen/blktap/blktap.c Tue May 05 13:32:55 2009 +0100 +++ b/drivers/xen/blktap/blktap.c Thu May 14 10:08:10 2009 +0100 @@ -957,7 +957,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; diff -r 42dfb4e2bce0 -r 271d9b9bee40 drivers/xen/core/smpboot.c --- a/drivers/xen/core/smpboot.c Tue May 05 13:32:55 2009 +0100 +++ b/drivers/xen/core/smpboot.c Thu May 14 10:08:10 2009 +0100 @@ -48,10 +48,6 @@ struct cpuinfo_x86 cpu_data[NR_CPUS] __c 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-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |