Messages in this thread Patch in this message | | | Date | Wed, 15 Oct 2014 08:38:22 +1100 | From | Stephen Rothwell <> | Subject | Re: [GIT PULL] percpu consistent-ops changes for v3.18-rc1 |
| |
Hi Linus,
On Tue, 14 Oct 2014 09:07:52 -0400 Tejun Heo <tj@kernel.org> wrote: > > 2. arch/s390/kernel/vtime.c > > b5f87f15e200 ("s390/idle: consolidate idle functions and definitions") > removes two functions which contained percpu accesses. > > <<<<<<< HEAD > ======= > void __kprobes vtime_stop_cpu(void) > { > struct s390_idle_data *idle = this_cpu_ptr(&s390_idle); > unsigned long long idle_time; > unsigned long psw_mask; > > trace_hardirqs_on(); > > /* Wait for external, I/O or machine check interrupt. */ > psw_mask = PSW_KERNEL_BITS | PSW_MASK_WAIT | PSW_MASK_DAT | > PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK; > idle->nohz_delay = 0; > > /* Call the assembler magic in entry.S */ > psw_idle(idle, psw_mask); > > /* Account time spent with enabled wait psw loaded as idle time. */ > idle->sequence++; > smp_wmb(); > idle_time = idle->clock_idle_exit - idle->clock_idle_enter; > idle->clock_idle_enter = idle->clock_idle_exit = 0ULL; > idle->idle_time += idle_time; > idle->idle_count++; > account_idle_time(idle_time); > smp_wmb(); > idle->sequence++; > } > > cputime64_t s390_get_idle_time(int cpu) > { > struct s390_idle_data *idle = &per_cpu(s390_idle, cpu); > unsigned long long now, idle_enter, idle_exit; > unsigned int sequence; > > do { > now = get_tod_clock(); > sequence = ACCESS_ONCE(idle->sequence); > idle_enter = ACCESS_ONCE(idle->clock_idle_enter); > idle_exit = ACCESS_ONCE(idle->clock_idle_exit); > } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence)); > return idle_enter ? ((idle_exit ?: now) - idle_enter) : 0; > } > > >>>>>>> 513d1a2884a49654f368b5fa25ef186e976bdada > > The conflicting code can be removed.
This actually moved some of the code into a new file and so, for completeness, I have been carrying the following merge fix patch (which you could include in the merge - but I am not sure if it matters if the old accessors are still around):
From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Tue, 7 Oct 2014 16:44:38 +1100 Subject: [PATCH] s390: fixup for Replace __get_cpu_var uses
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> --- arch/s390/kernel/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c index c75fbae1e37e..9d19a91dc6a6 100644 --- a/arch/s390/kernel/idle.c +++ b/arch/s390/kernel/idle.c @@ -20,7 +20,7 @@ static DEFINE_PER_CPU(struct s390_idle_data, s390_idle); void __kprobes enabled_wait(void) { - struct s390_idle_data *idle = &__get_cpu_var(s390_idle); + struct s390_idle_data *idle = this_cpu_ptr(&s390_idle); unsigned long long idle_time; unsigned long psw_mask; -- 2.1.1 -- Cheers, Stephen Rothwell sfr@canb.auug.org.au [unhandled content-type:application/pgp-signature] | |