[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141015083822.0f78e28b@canb.auug.org.au>
Date: Wed, 15 Oct 2014 08:38:22 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
Christoph Lameter <cl@...ux-foundation.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>
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@...nel.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@...b.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@...b.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@...b.auug.org.au
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists