Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263637
b: refs/heads/master
c: ff71c18
h: refs/heads/master
i:
  263635: 941f738
v: v3
  • Loading branch information
Guenter Roeck committed Sep 6, 2011
1 parent 5ed82b2 commit 57637e7
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 271 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28c51ee3da3be98a3d7ce54250ec0b4d99826bb7
refs/heads/master: ff71c182f461da5ae9d2d65f8a63f5a9193b9be1
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/pvclock.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
#elif defined(__x86_64__)
__asm__ (
"mulq %[mul_frac] ; shrd $32, %[hi], %[lo]"
"mul %[mul_frac] ; shrd $32, %[hi], %[lo]"
: [lo]"=a"(product),
[hi]"=d"(tmp)
: "0"(delta),
Expand Down
19 changes: 0 additions & 19 deletions trunk/arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,6 @@ static unsigned long __init xen_set_identity(const struct e820entry *list,
PFN_UP(start_pci), PFN_DOWN(last));
return identity;
}

static unsigned long __init xen_get_max_pages(void)
{
unsigned long max_pages = MAX_DOMAIN_PAGES;
domid_t domid = DOMID_SELF;
int ret;

ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
if (ret > 0)
max_pages = ret;
return min(max_pages, MAX_DOMAIN_PAGES);
}

/**
* machine_specific_memory_setup - Hook for machine specific memory setup.
**/
Expand Down Expand Up @@ -305,12 +292,6 @@ char * __init xen_memory_setup(void)

sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);

extra_limit = xen_get_max_pages();
if (extra_limit >= max_pfn)
extra_pages = extra_limit - max_pfn;
else
extra_pages = 0;

extra_pages += xen_return_unused_memory(xen_start_info->nr_pages, &e820);

/*
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <xen/page.h>
#include <xen/events.h>

#include <xen/hvc-console.h>
#include "xen-ops.h"
#include "mmu.h"

Expand Down Expand Up @@ -208,15 +207,6 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
unsigned cpu;
unsigned int i;

if (skip_ioapic_setup) {
char *m = (max_cpus == 0) ?
"The nosmp parameter is incompatible with Xen; " \
"use Xen dom0_max_vcpus=1 parameter" :
"The noapic parameter is incompatible with Xen";

xen_raw_printk(m);
panic(m);
}
xen_init_lock_cpu(0);

smp_store_cpu_info(0);
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/x86/xen/xen-asm_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,11 @@ xen_iret_start_crit:

/*
* If there's something pending, mask events again so we can
* jump back into xen_hypervisor_callback. Otherwise do not
* touch XEN_vcpu_info_mask.
* jump back into xen_hypervisor_callback
*/
jne 1f
movb $1, XEN_vcpu_info_mask(%eax)
sete XEN_vcpu_info_mask(%eax)

1: popl %eax
popl %eax

/*
* From this point on the registers are restored and the stack
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/hwmon/max16065.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static inline int MV_TO_LIMIT(int mv, int range)

static inline int ADC_TO_CURR(int adc, int gain)
{
return adc * 1400000 / gain * 255;
return adc * 1400000 / (gain * 255);
}

/*
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/9p/v9fs_vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ extern struct kmem_cache *v9fs_inode_cache;

struct inode *v9fs_alloc_inode(struct super_block *sb);
void v9fs_destroy_inode(struct inode *inode);
struct inode *v9fs_get_inode(struct super_block *sb, int mode, dev_t);
struct inode *v9fs_get_inode(struct super_block *sb, int mode);
int v9fs_init_inode(struct v9fs_session_info *v9ses,
struct inode *inode, int mode, dev_t);
struct inode *inode, int mode);
void v9fs_evict_inode(struct inode *inode);
ino_t v9fs_qid2ino(struct p9_qid *qid);
void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *);
Expand All @@ -83,6 +83,4 @@ static inline void v9fs_invalidate_inode_attr(struct inode *inode)
v9inode->cache_validity |= V9FS_INO_INVALID_ATTR;
return;
}

int v9fs_open_to_dotl_flags(int flags);
#endif
36 changes: 8 additions & 28 deletions trunk/fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int v9fs_file_open(struct inode *inode, struct file *file)
v9inode = V9FS_I(inode);
v9ses = v9fs_inode2v9ses(inode);
if (v9fs_proto_dotl(v9ses))
omode = v9fs_open_to_dotl_flags(file->f_flags);
omode = file->f_flags;
else
omode = v9fs_uflags2omode(file->f_flags,
v9fs_proto_dotu(v9ses));
Expand Down Expand Up @@ -169,18 +169,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)

/* convert posix lock to p9 tlock args */
memset(&flock, 0, sizeof(flock));
/* map the lock type */
switch (fl->fl_type) {
case F_RDLCK:
flock.type = P9_LOCK_TYPE_RDLCK;
break;
case F_WRLCK:
flock.type = P9_LOCK_TYPE_WRLCK;
break;
case F_UNLCK:
flock.type = P9_LOCK_TYPE_UNLCK;
break;
}
flock.type = fl->fl_type;
flock.start = fl->fl_start;
if (fl->fl_end == OFFSET_MAX)
flock.length = 0;
Expand Down Expand Up @@ -256,7 +245,7 @@ static int v9fs_file_getlock(struct file *filp, struct file_lock *fl)

/* convert posix lock to p9 tgetlock args */
memset(&glock, 0, sizeof(glock));
glock.type = P9_LOCK_TYPE_UNLCK;
glock.type = fl->fl_type;
glock.start = fl->fl_start;
if (fl->fl_end == OFFSET_MAX)
glock.length = 0;
Expand All @@ -268,26 +257,17 @@ static int v9fs_file_getlock(struct file *filp, struct file_lock *fl)
res = p9_client_getlock_dotl(fid, &glock);
if (res < 0)
return res;
/* map 9p lock type to os lock type */
switch (glock.type) {
case P9_LOCK_TYPE_RDLCK:
fl->fl_type = F_RDLCK;
break;
case P9_LOCK_TYPE_WRLCK:
fl->fl_type = F_WRLCK;
break;
case P9_LOCK_TYPE_UNLCK:
fl->fl_type = F_UNLCK;
break;
}
if (glock.type != P9_LOCK_TYPE_UNLCK) {
if (glock.type != F_UNLCK) {
fl->fl_type = glock.type;
fl->fl_start = glock.start;
if (glock.length == 0)
fl->fl_end = OFFSET_MAX;
else
fl->fl_end = glock.start + glock.length - 1;
fl->fl_pid = glock.proc_id;
}
} else
fl->fl_type = F_UNLCK;

return res;
}

Expand Down
Loading

0 comments on commit 57637e7

Please sign in to comment.