]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc: vdso: lockdep fixes
authorDave Kleikamp <dave.kleikamp@oracle.com>
Tue, 6 Oct 2015 22:57:39 +0000 (17:57 -0500)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 19 Oct 2015 20:41:01 +0000 (13:41 -0700)
Allow UEK4 kernel to be built with CONFIG_LOCK_STAT and initialize
seqcount in vdso data structure.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
arch/sparc/vdso/vclock_gettime.c
arch/sparc/vdso/vma.c

index 538532eeebb941d3f017a2205bb45d59bb2a0e8d..50ee343b9b92adcd59e35f54e9ce13b4eb15ed9c 100644 (file)
@@ -132,7 +132,7 @@ do_realtime(struct vsyscall_gtod_data *gtod, struct timespec *ts)
 
        ts->tv_nsec = 0;
        do {
-               seq = read_seqcount_begin(&gtod->seq);
+               seq = raw_read_seqcount_begin(&gtod->seq);
                ts->tv_sec = gtod->wall_time_sec;
                ns = gtod->wall_time_snsec;
                ns += vgetsns(gtod);
@@ -152,7 +152,7 @@ do_monotonic(struct vsyscall_gtod_data *gtod, struct timespec *ts)
 
        ts->tv_nsec = 0;
        do {
-               seq = read_seqcount_begin(&gtod->seq);
+               seq = raw_read_seqcount_begin(&gtod->seq);
                ts->tv_sec = gtod->monotonic_time_sec;
                ns = gtod->monotonic_time_snsec;
                ns += vgetsns(gtod);
@@ -169,7 +169,7 @@ do_realtime_coarse(struct vsyscall_gtod_data *gtod, struct timespec *ts)
 {
        unsigned long seq;
        do {
-               seq = read_seqcount_begin(&gtod->seq);
+               seq = raw_read_seqcount_begin(&gtod->seq);
                ts->tv_sec = gtod->wall_time_coarse.tv_sec;
                ts->tv_nsec = gtod->wall_time_coarse.tv_nsec;
        } while (unlikely(read_seqcount_retry(&gtod->seq, seq)));
@@ -181,7 +181,7 @@ do_monotonic_coarse(struct vsyscall_gtod_data *gtod, struct timespec *ts)
 {
        unsigned long seq;
        do {
-               seq = read_seqcount_begin(&gtod->seq);
+               seq = raw_read_seqcount_begin(&gtod->seq);
                ts->tv_sec = gtod->monotonic_time_coarse.tv_sec;
                ts->tv_nsec = gtod->monotonic_time_coarse.tv_nsec;
        } while (unlikely(read_seqcount_retry(&gtod->seq, seq)));
index b49a527422e6f91cef042af64fc9136915ada5bd..afc7e992030d07d295ef952e512c9b4314cd48cb 100644 (file)
@@ -80,6 +80,8 @@ int __init init_vdso_image(struct vdso_image *image)
        vvar_data = page_address(p);
        memset(vvar_data, 0, PAGE_SIZE);
 
+       seqcount_init(&vvar_data->gtod.seq);
+
        return 0;
  oom:
        printk(KERN_WARNING "Cannot allocate vdso\n");