Re: [PATCH] xen: drop anti-dependency on X86_VISWS

2011-04-08 Thread Ian Campbell
(dropping netdev and the visws list)

On Thu, 2011-04-07 at 11:07 -0700, Jeremy Fitzhardinge wrote:
 On 04/06/2011 11:58 PM, Ian Campbell wrote:
  On Wed, 2011-04-06 at 22:45 +0100, David Miller wrote:
  From: Ian Campbell ian.campb...@eu.citrix.com
  Date: Mon, 4 Apr 2011 10:55:55 +0100
 
  You mean the !X86_VISWS I presume? It doesn't make sense to me either.
  No, I think 32-bit x86 allmodconfig elides XEN because of it's X86_TSC 
  dependency.
  TSC is a real dependency of the Xen interfaces.
 
 Not really.  The TSC register is a requirement, but that's going to be
 present on any CPU which can boot Xen.  We don't need any of the
 kernel's TSC machinery though.

So why the Kconfig dependency then? In principal a kernel compiled for a
non-TSC processor (which meets the other requirements for Xen, such as
PAE support) will run just fine under Xen on a newer piece of hardware.

Is there any downside to this patch (is X86_CMPXCHG in the same sort of
boat?)

8--

From 7204945696a927d281366f2a57baee37e2b43ca3 Mon Sep 17 00:00:00 2001
From: Ian Campbell i...@hellion.org.uk
Date: Fri, 8 Apr 2011 07:33:21 +0100
Subject: [PATCH] xen: remove Kconfig dependency on X86_TSC

The TSC register is a requirement when running under Xen, but that's going to
be present on any CPU which can boot Xen. We don't need any of the kernel's TSC
machinery, since the usage is contained within the Xen interfaces, and therefore
XEN does not need to depend on CONFIG_X86_TSC.

Signed-off-by: Ian Campbell ian.campb...@citrix.com
---
 arch/x86/xen/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index 1c7121b..ac69c5b 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -7,7 +7,7 @@ config XEN
select PARAVIRT
select PARAVIRT_CLOCK
depends on X86_64 || (X86_32  X86_PAE  !X86_VISWS)
-   depends on X86_CMPXCHG  X86_TSC
+   depends on X86_CMPXCHG
help
  This is the Linux Xen port.  Enabling this will allow the
  kernel to boot in a paravirtualized environment under the
-- 
1.7.4.1



___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


Re: [PATCH] xen: drop anti-dependency on X86_VISWS

2011-04-08 Thread Ian Campbell
(dropping netdev and visws list)
On Thu, 2011-04-07 at 18:00 +0100, H. Peter Anvin wrote:
 On 04/06/2011 11:58 PM, Ian Campbell wrote:
  
  I'm not sure why ELAN belongs in the EXTENDED_PLATFORM option space
  rather than in the CPU choice option, since its only impact seems to be
  on -march, MODULE_PROC_FAMILY and some cpufreq drivers which doesn't
  sound like an extended platform to me but does it appear to be
  deliberate (see 9e111f3e167a x86: move ELAN to the
  NON_STANDARD_PLATFORM section, that was the old name for
  EXTENDED_PLATFORM).
  
 
 Historic... we used to have nonstandard A20M# handling on Elan, until it
 was discovered that we could make it work without it.

Any reason not switch it over at this point then?

8--

From b1942fa168aee77537bf467e4c68c6f181b8fdee Mon Sep 17 00:00:00 2001
From: Ian Campbell i...@hellion.org.uk
Date: Fri, 8 Apr 2011 07:42:29 +0100
Subject: [PATCH] x86: move AMD Elan Kconfig under Processor family

Currently the option resides under X86_EXTENDED_PLATFORM due to historical
nonstandard A20M# handling. However that is no longer the case and so Elan can
be treated as part of the standard processor choice Kconfig option.

Signed-off-by: Ian Campbell ian.campb...@citrix.com
Cc: H. Peter Anvin h...@zytor.com
---
 arch/x86/Kconfig|   11 ---
 arch/x86/Kconfig.cpu|   16 ++--
 arch/x86/Makefile_32.cpu|2 +-
 arch/x86/include/asm/module.h   |2 +-
 arch/x86/kernel/cpu/cpufreq/Kconfig |4 ++--
 5 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index cc6c53a..f00a3f3 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -365,17 +365,6 @@ config X86_UV
 # Following is an alphabetically sorted list of 32 bit extended platforms
 # Please maintain the alphabetic order if and when there are additions
 
-config X86_ELAN
-   bool AMD Elan
-   depends on X86_32
-   depends on X86_EXTENDED_PLATFORM
-   ---help---
- Select this for an AMD Elan processor.
-
- Do not use this option for K6/Athlon/Opteron processors!
-
- If unsure, choose PC-compatible instead.
-
 config X86_INTEL_CE
bool CE4100 TV platform
depends on PCI
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index d161e93..6a7cfdf 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -1,6 +1,4 @@
 # Put here option for CPU selection and depending optimization
-if !X86_ELAN
-
 choice
prompt Processor family
default M686 if X86_32
@@ -203,6 +201,14 @@ config MWINCHIP3D
  stores for this CPU, which can increase performance of some
  operations.
 
+config MELAN
+   bool AMD Elan
+   depends on X86_32
+   ---help---
+ Select this for an AMD Elan processor.
+
+ Do not use this option for K6/Athlon/Opteron processors!
+
 config MGEODEGX1
bool GeodeGX1
depends on X86_32
@@ -292,8 +298,6 @@ config X86_GENERIC
  This is really intended for distributors who need more
  generic optimizations.
 
-endif
-
 #
 # Define implied options from the CPU selection here
 config X86_INTERNODE_CACHE_SHIFT
@@ -312,7 +316,7 @@ config X86_L1_CACHE_SHIFT
int
default 7 if MPENTIUM4 || MPSC
default 6 if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || 
X86_GENERIC || GENERIC_CPU
-   default 4 if X86_ELAN || M486 || M386 || MGEODEGX1
+   default 4 if MELAN || M486 || M386 || MGEODEGX1
default 5 if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || 
MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || 
M586 || MVIAC3_2 || MGEODE_LX
 
 config X86_XADD
@@ -358,7 +362,7 @@ config X86_POPAD_OK
 
 config X86_ALIGNMENT_16
def_bool y
-   depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || 
M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
+   depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || 
M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
 
 config X86_INTEL_USERCOPY
def_bool y
diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index f2ee1ab..86cee7b 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -37,7 +37,7 @@ cflags-$(CONFIG_MATOM)+= $(call 
cc-option,-march=atom,$(call cc-option,-march=
$(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
 
 # AMD Elan support
-cflags-$(CONFIG_X86_ELAN)  += -march=i486
+cflags-$(CONFIG_MELAN) += -march=i486
 
 # Geode GX1 support
 cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx
diff --git a/arch/x86/include/asm/module.h b/arch/x86/include/asm/module.h
index 67763c5..9eae775 100644
--- a/arch/x86/include/asm/module.h
+++ b/arch/x86/include/asm/module.h
@@ -35,7 +35,7 @@
 #define MODULE_PROC_FAMILY K7 
 #elif defined CONFIG_MK8
 #define MODULE_PROC_FAMILY K8 
-#elif 

Re: [PATCH] xen: drop anti-dependency on X86_VISWS

2011-04-08 Thread Jeremy Fitzhardinge
On 04/07/2011 11:38 PM, Ian Campbell wrote:
 Not really.  The TSC register is a requirement, but that's going to be
 present on any CPU which can boot Xen.  We don't need any of the
 kernel's TSC machinery though.
 So why the Kconfig dependency then? In principal a kernel compiled for a
 non-TSC processor (which meets the other requirements for Xen, such as
 PAE support) will run just fine under Xen on a newer piece of hardware.

Not sure where it came from.  It was probably never needed, or just
added for some secondary effect we wanted.

 Is there any downside to this patch (is X86_CMPXCHG in the same sort of
 boat?)

Only if we don't use cmpxchg in shared memory with other domains or the
hypervisor.  (I don't think it will dynamically switch between real and
emulated cmpxchg depending on availability.)

J

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Xen-devel] Re: [PATCH] xen: drop anti-dependency on X86_VISWS

2011-04-08 Thread Jan Beulich
 On 08.04.11 at 17:25, Jeremy Fitzhardinge jer...@goop.org wrote:
 On 04/07/2011 11:38 PM, Ian Campbell wrote:
 Is there any downside to this patch (is X86_CMPXCHG in the same sort of
 boat?)
 
 Only if we don't use cmpxchg in shared memory with other domains or the
 hypervisor.  (I don't think it will dynamically switch between real and
 emulated cmpxchg depending on availability.)

Actually it does - see the #ifndef CONFIG_X86_CMPXCHG section
in asm/cmpxchg_32.h.

Jan

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


Re: [Xen-devel] Re: [PATCH] xen: drop anti-dependency on X86_VISWS

2011-04-08 Thread Jeremy Fitzhardinge
On 04/08/2011 08:42 AM, Jan Beulich wrote:
 On 08.04.11 at 17:25, Jeremy Fitzhardinge jer...@goop.org wrote:
 On 04/07/2011 11:38 PM, Ian Campbell wrote:
 Is there any downside to this patch (is X86_CMPXCHG in the same sort of
 boat?)
 Only if we don't use cmpxchg in shared memory with other domains or the
 hypervisor.  (I don't think it will dynamically switch between real and
 emulated cmpxchg depending on availability.)
 Actually it does - see the #ifndef CONFIG_X86_CMPXCHG section
 in asm/cmpxchg_32.h.

Hm, OK.  Still, I'm happiest with that dependency in case someone
knobbles the cpu to exclude cmpxchg and breaks things.

J
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization


Re: [PATCH] xen: drop anti-dependency on X86_VISWS

2011-04-08 Thread H. Peter Anvin
On 04/07/2011 11:46 PM, Ian Campbell wrote:
 
 Any reason not switch it over at this point then?
 

Not really.

-hpa
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization