ia64/linux-2.6.18-xen.hg

changeset 869:271d9b9bee40

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@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 14 10:08:10 2009 +0100 (2009-05-14)
parents 42dfb4e2bce0
children 9b9454800544
files arch/i386/kernel/entry-xen.S drivers/oprofile/oprofile_files.c drivers/xen/blkback/vbd.c drivers/xen/blktap/blktap.c drivers/xen/core/smpboot.c
line diff
     1.1 --- a/arch/i386/kernel/entry-xen.S	Tue May 05 13:32:55 2009 +0100
     1.2 +++ b/arch/i386/kernel/entry-xen.S	Thu May 14 10:08:10 2009 +0100
     1.3 @@ -388,8 +388,10 @@ ENTRY(sysenter_entry_pv)
     1.4  	movl %ebp,12(%esp)
     1.5  	movl $__USER_CS,4(%esp)
     1.6  	addl $4,%esp
     1.7 +	CFI_ADJUST_CFA_OFFSET -4
     1.8  	/* +5*4 is SS:ESP,EFLAGS,CS:EIP. +8 is esp0 setting. */
     1.9  	pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
    1.10 +	CFI_ADJUST_CFA_OFFSET 4
    1.11  /*
    1.12   * Load the potential sixth argument from user stack.
    1.13   * Careful about security.
     2.1 --- a/drivers/oprofile/oprofile_files.c	Tue May 05 13:32:55 2009 +0100
     2.2 +++ b/drivers/oprofile/oprofile_files.c	Thu May 14 10:08:10 2009 +0100
     2.3 @@ -215,7 +215,7 @@ static ssize_t adomain_read(struct file 
     2.4  }
     2.5  
     2.6  
     2.7 -static struct file_operations active_domain_ops = {
     2.8 +static const struct file_operations active_domain_ops = {
     2.9  	.read		= adomain_read,
    2.10  	.write		= adomain_write,
    2.11  };
    2.12 @@ -308,7 +308,7 @@ static ssize_t pdomain_read(struct file 
    2.13  	return retval;
    2.14  }
    2.15  
    2.16 -static struct file_operations passive_domain_ops = {
    2.17 +static const struct file_operations passive_domain_ops = {
    2.18  	.read		= pdomain_read,
    2.19  	.write		= pdomain_write,
    2.20  };
     3.1 --- a/drivers/xen/blkback/vbd.c	Tue May 05 13:32:55 2009 +0100
     3.2 +++ b/drivers/xen/blkback/vbd.c	Thu May 14 10:08:10 2009 +0100
     3.3 @@ -33,7 +33,7 @@
     3.4  #include "common.h"
     3.5  
     3.6  #define vbd_sz(_v)   ((_v)->bdev->bd_part ?				\
     3.7 -	(_v)->bdev->bd_part->nr_sects : (_v)->bdev->bd_disk->capacity)
     3.8 +	(_v)->bdev->bd_part->nr_sects : get_capacity((_v)->bdev->bd_disk))
     3.9  
    3.10  unsigned long long vbd_size(struct vbd *vbd)
    3.11  {
     4.1 --- a/drivers/xen/blktap/blktap.c	Tue May 05 13:32:55 2009 +0100
     4.2 +++ b/drivers/xen/blktap/blktap.c	Thu May 14 10:08:10 2009 +0100
     4.3 @@ -957,7 +957,7 @@ static int req_increase(void)
     4.4  
     4.5  static void mmap_req_del(int mmap)
     4.6  {
     4.7 -	BUG_ON(!spin_is_locked(&pending_free_lock));
     4.8 +	assert_spin_locked(&pending_free_lock);
     4.9  
    4.10  	kfree(pending_reqs[mmap]);
    4.11  	pending_reqs[mmap] = NULL;
     5.1 --- a/drivers/xen/core/smpboot.c	Tue May 05 13:32:55 2009 +0100
     5.2 +++ b/drivers/xen/core/smpboot.c	Thu May 14 10:08:10 2009 +0100
     5.3 @@ -48,10 +48,6 @@ cpumask_t cpu_initialized_map;
     5.4  struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
     5.5  EXPORT_SYMBOL(cpu_data);
     5.6  
     5.7 -#ifdef CONFIG_HOTPLUG_CPU
     5.8 -DEFINE_PER_CPU(int, cpu_state) = { 0 };
     5.9 -#endif
    5.10 -
    5.11  static DEFINE_PER_CPU(int, resched_irq);
    5.12  static DEFINE_PER_CPU(int, callfunc_irq);
    5.13  static char resched_name[NR_CPUS][15];
    5.14 @@ -345,7 +341,7 @@ void __init smp_prepare_cpus(unsigned in
    5.15  #ifdef __x86_64__
    5.16  		cpu_pda(cpu)->pcurrent = idle;
    5.17  		cpu_pda(cpu)->cpunumber = cpu;
    5.18 -		clear_ti_thread_flag(idle->thread_info, TIF_FORK);
    5.19 +		clear_tsk_thread_flag(idle, TIF_FORK);
    5.20  #endif
    5.21  
    5.22  		irq_ctx_init(cpu);