From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org,
Christoph Lameter <cl@linux-foundation.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [GIT PULL] percpu consistent-ops changes for v3.18-rc1
Date: Wed, 15 Oct 2014 08:38:22 +1100 [thread overview]
Message-ID: <20141015083822.0f78e28b@canb.auug.org.au> (raw)
In-Reply-To: <20141014130752.GA14897@htj.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 2935 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-10-14 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 13:07 Tejun Heo
2014-10-14 21:38 ` Stephen Rothwell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141015083822.0f78e28b@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=cl@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®