All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Jack Miller <jack@codezen.org>
Cc: linuxppc-dev@lists.ozlabs.org, michael.neuling@au1.ibm.com,
	michaele@au1.ibm.com
Subject: Re: [PATCH 1/3] powerpc: Complete FSCR context switch
Date: Wed, 13 Apr 2016 20:51:12 +1000	[thread overview]
Message-ID: <20160413205112.425444de@kryten> (raw)
In-Reply-To: <1460401065-10540-2-git-send-email-jack@codezen.org>

Hi Jack,

> Previously we just saved the FSCR, but only restored it in some
> settings, and never copied it thread to thread. This patch always
> restores the FSCR and formalizes new threads inheriting its setting so
> that later we can manipulate FSCR bits in start_thread.

Will this break the existing FSCR_DSCR bit handling?

         if (cpu_has_feature(CPU_FTR_DSCR)) {
                u64 dscr = get_paca()->dscr_default;
                u64 fscr = old_thread->fscr & ~FSCR_DSCR;

                if (new_thread->dscr_inherit) {
                        dscr = new_thread->dscr;
                        fscr |= FSCR_DSCR;
                }

                if (old_thread->dscr != dscr)
                        mtspr(SPRN_DSCR, dscr);

                if (old_thread->fscr != fscr)
                        mtspr(SPRN_FSCR, fscr);
        }

If not, we should modify the above so we don't write the FSCR twice.

Anton

  parent reply	other threads:[~2016-04-13 10:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 18:57 [RFC] P9 ldmx support Jack Miller
2016-04-11 18:57 ` [PATCH 1/3] powerpc: Complete FSCR context switch Jack Miller
2016-04-12 23:42   ` [1/3] " Michael Ellerman
2016-04-13 10:51   ` Anton Blanchard [this message]
2016-04-13 17:52     ` [PATCH 1/3] " Jack Miller
2016-04-13 23:49       ` Michael Neuling
2016-04-14 18:39         ` Jack Miller
2016-04-14 23:11           ` Michael Neuling
2016-04-11 18:57 ` [PATCH 2/3] powerpc: Load Monitor Register Support Jack Miller
2016-04-12  5:40   ` Segher Boessenkool
2016-04-13 17:39     ` Jack Miller
2016-04-11 18:57 ` [PATCH 3/3] powerpc: Load Monitor Register Tests Jack Miller
2016-04-15 10:34   ` Madhavan Srinivasan
2016-04-12  1:05 ` [RFC] P9 ldmx support Michael Neuling
  -- strict thread matches above, loose matches on Subject: below --
2016-04-18 19:07 [v2] " Jack Miller
2016-04-18 19:08 ` [PATCH 1/3] powerpc: Complete FSCR context switch Jack Miller
2016-04-18 20:47 [PATCH 2/3] powerpc: Load Monitor Register Support kbuild test robot
2016-04-18 21:08 ` [v3] P9 ldmx support Jack Miller
2016-04-18 21:08   ` [PATCH 1/3] powerpc: Complete FSCR context switch Jack Miller

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=20160413205112.425444de@kryten \
    --to=anton@samba.org \
    --cc=jack@codezen.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michael.neuling@au1.ibm.com \
    --cc=michaele@au1.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.