[PATCH] Add sparse annotation to vsyscall.c
Fixes linux/arch/x86_64/kernel/vsyscall.c:276:7: warning: constant 0x0f40000000000 is so big it is long linux/arch/x86_64/kernel/vsyscall.c:80:14: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:80:14: expected void const volatile [noderef] *addr<asn:2> linux/arch/x86_64/kernel/vsyscall.c:80:14: got void *<noident> linux/arch/x86_64/kernel/vsyscall.c:200:7: warning: incorrect type in assignment (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:200:7: expected unsigned short [usertype] *map1 linux/arch/x86_64/kernel/vsyscall.c:200:7: got void [noderef] *<asn:2> linux/arch/x86_64/kernel/vsyscall.c:203:7: warning: incorrect type in assignment (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:203:7: expected unsigned short [usertype] *map2 linux/arch/x86_64/kernel/vsyscall.c:203:7: got void [noderef] *<asn:2> linux/arch/x86_64/kernel/vsyscall.c:215:10: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:215:10: expected void volatile [noderef] *addr<asn:2> linux/arch/x86_64/kernel/vsyscall.c:215:10: got unsigned short [usertype] *map2 linux/arch/x86_64/kernel/vsyscall.c:217:10: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:217:10: expected void volatile [noderef] *addr<asn:2> linux/arch/x86_64/kernel/vsyscall.c:217:10: got unsigned short [usertype] *map1 Signed-off-by: Andi Kleen <ak@suse.de>
This commit is contained in:
@@ -77,7 +77,8 @@ static __always_inline void do_vgettimeofday(struct timeval * tv)
|
|||||||
__vxtime.tsc_quot) >> 32;
|
__vxtime.tsc_quot) >> 32;
|
||||||
/* See comment in x86_64 do_gettimeofday. */
|
/* See comment in x86_64 do_gettimeofday. */
|
||||||
} else {
|
} else {
|
||||||
usec += ((readl((void *)fix_to_virt(VSYSCALL_HPET) + 0xf0) -
|
usec += ((readl((void __iomem *)
|
||||||
|
fix_to_virt(VSYSCALL_HPET) + 0xf0) -
|
||||||
__vxtime.last) * __vxtime.quot) >> 32;
|
__vxtime.last) * __vxtime.quot) >> 32;
|
||||||
}
|
}
|
||||||
} while (read_seqretry(&__xtime_lock, sequence));
|
} while (read_seqretry(&__xtime_lock, sequence));
|
||||||
@@ -191,7 +192,8 @@ static int vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
|
|||||||
void __user *buffer, size_t *lenp, loff_t *ppos)
|
void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||||
{
|
{
|
||||||
extern u16 vsysc1, vsysc2;
|
extern u16 vsysc1, vsysc2;
|
||||||
u16 *map1, *map2;
|
u16 __iomem *map1;
|
||||||
|
u16 __iomem *map2;
|
||||||
int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
|
int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
|
||||||
if (!write)
|
if (!write)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -206,11 +208,11 @@ static int vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!sysctl_vsyscall) {
|
if (!sysctl_vsyscall) {
|
||||||
*map1 = SYSCALL;
|
writew(SYSCALL, map1);
|
||||||
*map2 = SYSCALL;
|
writew(SYSCALL, map2);
|
||||||
} else {
|
} else {
|
||||||
*map1 = NOP2;
|
writew(NOP2, map1);
|
||||||
*map2 = NOP2;
|
writew(NOP2, map2);
|
||||||
}
|
}
|
||||||
iounmap(map2);
|
iounmap(map2);
|
||||||
out:
|
out:
|
||||||
|
Reference in New Issue
Block a user