All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Pavel Machek <pavel@ucw.cz>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	Pratap Subrahmanyam <pratap@vmware.com>,
	Christopher Li <chrisl@vmware.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 1/10] Cr4 is valid on some 486s
Date: Fri, 11 Nov 2005 12:14:01 -0800	[thread overview]
Message-ID: <4374FB89.6000304@vmware.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0511111147390.4627@g5.osdl.org>

Linus Torvalds wrote:

>On Fri, 11 Nov 2005, Zachary Amsden wrote:
>  
>
>>Agree nested exceptions are evil.  But where is this called from execption
>>context? 
>>    
>>
>
>We have really nice ways of handling these things, so we should just use 
>them.
>
>For example, you can do
>
>	static inline void read_cr4(void)
>	{
>		unsigned long cr4;
>		alternative_input("xorl %0,%0",
>				  "movl %%cr4,%0",
>				  X86_FEATURE_CR4,
>				  "r" (cr4));
>		return cr4;
>	}
>
>and then just add that feature-flag discovery early on in boot (it needs 
>to be pretty early, since the alternative instruction rewriting happens 
>early).
>
>We have several "calculated" features already. Things like X86_FEATURE_P4 
>etc.
>  
>

Yes, this is fine, but is it worth writing the feature discovery code?  
I suppose it doesn't matter, as it gets jettisoned after init.  I guess 
it is just preference.

Considering run time code size, the alternative approach wins, has no 
extra branches, and is just nicer.  The faulting technique requires two 
extra dwords of space that can not be jettisonned.  So obviously, I must 
do it (the alternative approach).

Could we consider doing the same with LOCK prefix for SMP kernels booted 
on UP?  Evil grin.

Zach

  reply	other threads:[~2005-11-11 20:14 UTC|newest]

Thread overview: 154+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-10  0:32 [PATCH 1/10] Cr4 is valid on some 486s Zachary Amsden
2005-11-11 10:36 ` Pavel Machek
2005-11-11 17:49   ` H. Peter Anvin
2005-11-11 18:00     ` Maciej W. Rozycki
2005-11-11 19:36   ` Zachary Amsden
2005-11-11 19:58     ` Linus Torvalds
2005-11-11 20:14       ` Zachary Amsden [this message]
2005-11-11 20:22         ` Linus Torvalds
2005-11-13  7:42           ` Dave Jones
2005-11-13 10:59             ` Andi Kleen
2005-11-13 17:26               ` Alan Cox
2005-11-13 17:09                 ` Eric W. Biederman
2005-11-13 19:00                 ` Andi Kleen
2005-11-13 19:07                   ` Eric W. Biederman
2005-11-13 19:41                   ` Alan Cox
2005-11-13 19:36                     ` Linus Torvalds
2005-11-13 21:32                       ` Alan Cox
2005-11-14  7:46                         ` Arjan van de Ven
2005-11-13 19:56                 ` H. Peter Anvin
2005-11-13 19:24             ` Linus Torvalds
2005-11-13 20:29               ` Linus Torvalds
2005-11-14 15:06                 ` Gerd Knorr
2005-11-14 19:25                   ` Linus Torvalds
2005-11-14 19:46                     ` Zachary Amsden
2005-11-14 19:52                       ` Arjan van de Ven
2005-11-14 20:34                         ` Zachary Amsden
2005-11-14 20:52                           ` Arjan van de Ven
2005-11-15 14:12                     ` Gerd Knorr
2005-11-15 16:01                       ` Gerd Knorr
2005-11-15 16:04                         ` Zachary Amsden
2005-11-15 16:06                           ` Arjan van de Ven
2005-11-15 16:10                             ` Dave Jones
2005-11-15 16:14                               ` H. Peter Anvin
2005-11-15 16:19                                 ` Dave Jones
2005-11-15 16:25                                   ` Arjan van de Ven
2005-11-15 16:34                                     ` Zachary Amsden
2005-11-15 16:28                                   ` H. Peter Anvin
2005-11-15 16:24                             ` Zachary Amsden
2005-11-15 16:52                               ` Linus Torvalds
2005-11-15 16:16                           ` Gerd Knorr
2005-11-15 16:08                         ` Roland Dreier
2005-11-16  9:58                           ` Gerd Knorr
2005-11-15 16:12                         ` Linus Torvalds
2005-11-15 16:16                           ` Dave Jones
2005-11-15 16:27                             ` Gerd Knorr
2005-11-16 16:12                         ` [RFC] SMP alternatives Gerd Knorr
2005-11-22 17:48                           ` [patch] " Gerd Knorr
2005-11-22 18:01                             ` Pavel Machek
2005-11-23 15:12                             ` Vincent Hanquez
2005-11-23 19:17                             ` Andi Kleen
2005-11-23 15:29                               ` Gerd Knorr
2005-11-23 16:42                               ` Alan Cox
2005-11-23 16:39                                 ` Andi Kleen
2005-11-23 17:21                                   ` Alan Cox
2005-11-23 16:59                                     ` Andi Kleen
2005-11-23 22:00                                       ` Alan Cox
2005-11-24 13:13                                         ` Andi Kleen
2005-11-24 13:30                                           ` Eric W. Biederman
2005-11-24 13:39                                             ` Andi Kleen
2005-11-24 13:58                                               ` Eric W. Biederman
2005-11-24 19:16                                                 ` thockin
2005-11-24 19:26                                                   ` Andi Kleen
2005-11-24 14:34                                               ` Alan Cox
2005-11-24 14:22                                                 ` Andi Kleen
2005-11-24 15:15                                                   ` Alan Cox
2005-11-24 14:55                                                     ` Andi Kleen
2005-11-24 15:09                                                       ` Eric W. Biederman
2005-11-24 15:36                                                         ` Andi Kleen
2005-11-24 16:49                                                           ` Eric W. Biederman
2005-11-24 19:12                                                           ` thockin
2005-11-24 19:14                                                             ` Andi Kleen
2005-11-24 19:24                                                               ` thockin
2005-11-24 19:29                                                                 ` Andi Kleen
2005-11-24 19:44                                                                   ` thockin
2005-11-24 21:20                                                                     ` Andi Kleen
2005-11-24 21:40                                                                       ` thockin
2005-11-24 23:33                                                                       ` Eric W. Biederman
2005-11-24 23:12                                                               ` Alan Cox
2005-11-24 22:48                                                                 ` thockin
2005-11-24 23:35                                                                   ` Andi Kleen
2005-11-25  0:13                                                                     ` Alan Cox
2005-11-25  1:33                                                                     ` H. Peter Anvin
2005-11-28 19:15                                                                     ` Bill Davidsen
2005-11-24 16:02                                                         ` Alan Cox
2005-11-24 19:09                                                     ` thockin
2005-11-24 14:30                                           ` Alan Cox
2005-11-23 17:02                                     ` Linus Torvalds
2005-11-23 18:02                                       ` H. Peter Anvin
2005-11-23 18:42                                         ` Linus Torvalds
2005-11-23 17:26                                           ` Jeff V. Merkey
2005-11-23 19:03                                             ` Linus Torvalds
2005-11-23 19:31                                               ` jmerkey
2005-11-23 18:46                                           ` Andi Kleen
2005-11-23 19:12                                           ` H. Peter Anvin
2005-11-23 19:30                                             ` jmerkey
2005-11-23 21:44                                           ` Alan Cox
2005-11-23 21:13                                             ` Andi Kleen
2005-11-23 21:46                                               ` Jeff Garzik
2005-11-23 22:23                                                 ` Andi Kleen
2005-11-23 22:30                                                 ` Pavel Machek
2005-11-23 22:05                                               ` Alan Cox
2005-11-23 21:36                                                 ` Arjan van de Ven
2005-11-23 21:36                                                 ` Andi Kleen
2005-11-23 22:13                                                 ` Linus Torvalds
2005-11-23 21:36                                             ` Linus Torvalds
2005-11-23 21:43                                               ` Andi Kleen
2005-11-23 22:15                                                 ` Linus Torvalds
2005-11-23 22:22                                                   ` Andi Kleen
2005-11-23 22:25                                                     ` H. Peter Anvin
2005-11-23 22:32                                                       ` Andi Kleen
2005-11-23 22:36                                                         ` H. Peter Anvin
2005-11-23 22:40                                                           ` Andi Kleen
2005-11-23 22:52                                                             ` H. Peter Anvin
2005-11-23 23:10                                                     ` Linus Torvalds
2005-11-24  0:55                                                 ` Jeff Garzik
2005-11-23 21:48                                               ` Daniel Jacobowitz
2005-11-23 21:53                                                 ` H. Peter Anvin
2005-11-23 22:03                                                   ` Daniel Jacobowitz
2005-11-23 22:09                                                     ` H. Peter Anvin
2005-11-23 22:21                                                       ` Linus Torvalds
2005-11-23 23:29                                                         ` Eric W. Biederman
2005-11-23 23:40                                                           ` Linus Torvalds
2005-11-23 22:19                                                 ` Linus Torvalds
2005-11-23 22:20                                                   ` Daniel Jacobowitz
2005-11-23 23:08                                                     ` Linus Torvalds
2005-11-23 23:02                                                       ` Jeff V. Merkey
2005-11-23 23:42                                                       ` Daniel Jacobowitz
2005-11-23 23:59                                                         ` Linus Torvalds
2005-11-24  2:06                                                           ` Daniel Jacobowitz
2005-11-24 22:32                                                         ` Ulrich Drepper
2005-11-28 19:58                                                         ` Bill Davidsen
2005-11-24  1:02                                                       ` Jeff Garzik
2005-11-24 13:01                                                       ` Pádraig Brady
2005-11-24 13:12                                                         ` Arjan van de Ven
2005-11-28 19:52                                                       ` Bill Davidsen
2005-11-28 20:05                                                         ` Zachary Amsden
2005-11-28 22:19                                                         ` Jeff V. Merkey
2005-11-28 23:00                                                           ` Zachary Amsden
2005-11-28 23:07                                                             ` H. Peter Anvin
2005-11-28 23:30                                                               ` Zachary Amsden
2005-11-28 23:32                                                                 ` H. Peter Anvin
2005-11-28 23:12                                                             ` Andi Kleen
2005-11-23 22:50                                               ` Alan Cox
2005-11-23 22:22                                                 ` H. Peter Anvin
2005-11-25  7:38                                               ` Chris Wedgwood
2005-11-25 17:33                                                 ` Linus Torvalds
2005-11-28 20:25                                                   ` Bill Davidsen
2005-11-25 20:13                                                 ` H. Peter Anvin
2005-11-24  3:23                                             ` Mikulas Patocka
2005-11-24  3:31                                           ` Mikulas Patocka
2005-11-24  3:55                                             ` H. Peter Anvin
2005-11-24 22:30                                           ` Ulrich Drepper
2005-11-23 16:43                                 ` Gerd Knorr
2005-11-23 16:51                                   ` H. Peter Anvin

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=4374FB89.6000304@vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@osdl.org \
    --cc=chrisl@vmware.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=pratap@vmware.com \
    --cc=torvalds@osdl.org \
    --cc=zwane@arm.linux.org.uk \
    /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.