mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2 v2] minor cleanups to EFLAGS initialisation in ret_from_fork
@ 2011-08-10 16:29 Ian Campbell
  2011-08-10 16:29 ` [PATCH 1/2] x86: drop unnecessary kernel_eflags variable from 64 bit Ian Campbell
  2011-08-10 16:29 ` [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to " Ian Campbell
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2011-08-10 16:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, H. Peter Anvin, Pekka Enberg, Cyrill Gorcunov,
	Andi Kleen, Ingo Molnar, Brian Gerst, Frederic Weisbecker, x86,
	LinusTorvalds

The following series removes the use of a global kernel_eflags variable
from the x86_64 ret_from_fork path and (very slightly) merges the 32 and
64 bit version of that code path.

kernel_eflags could be made a __read_mostly but actually there is no
reason to prefer the value at cpu_init() time to a compile time constant
value for the initial eflags after a fork.

Test booted on 32 and 64 bit.

changes since v1:
      * rebased onto tip/master
      * make 32 bit look like 64 bit instead of vice versa since the
        behaviour of resetting eflags with interrupts disabled before
        calling schedule_tail seems more obviously safe than resetting
        eflags with interrupts enabled afterwards (although I think both
        are actually correct).
      * As a consequence of the above patch 3/3 (use symbolic names for
        bits in eflags) goes away since we only use the MBO bit 1 now,
        which doesn't have a name.


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 0/2] minor cleanups to EFLAGS initialisation in ret_from_fork
@ 2011-08-31  9:22 Ian Campbell
  2011-08-31  9:22 ` [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to 64 bit Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2011-08-31  9:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cyrill Gorcunov, H. Peter Anvin, Peter Zijlstra, Pekka Enberg,
	Andi Kleen

This fell off my radar but Cyrill kindly reminded me so here is a repost
of my short cleanup to remove the kernel_eflags variable from 64 bit and
to converge the ret_from_fork paths on 32 and 64 bit slightly.

This is unchanged from the last posting except I have rebased to current
tip/master and retested (it boots successfully on both 32 and 64 bit).

As previously discussed since the original posting I have switched to
converging on the 64 bit variant rather than the 32 bit variant.
Although I believe both variants are strictly speaking correct and
equivalent the 64 bit version seems to be more obviously so.

Ian.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-31  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10 16:29 [PATCH 0/2 v2] minor cleanups to EFLAGS initialisation in ret_from_fork Ian Campbell
2011-08-10 16:29 ` [PATCH 1/2] x86: drop unnecessary kernel_eflags variable from 64 bit Ian Campbell
2011-08-10 16:29 ` [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to " Ian Campbell
2011-08-31  9:22 [PATCH 0/2] minor cleanups to EFLAGS initialisation in ret_from_fork Ian Campbell
2011-08-31  9:22 ` [PATCH 2/2] x86: make 32 bit ret_from_fork a little more similar to 64 bit Ian Campbell

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®