[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120628113738.GA5499@kroah.com>
Date: Thu, 28 Jun 2012 04:37:38 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: Yanfei Zhang <zhangyanfei@...fujitsu.com>
Cc: Avi Kivity <avi@...hat.com>, mtosatti@...hat.com,
ebiederm@...ssion.com, luto@....edu,
Joerg Roedel <joerg.roedel@....com>, dzickus@...hat.com,
paul.gortmaker@...driver.com, ludwig.nussel@...e.de,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
kexec@...ts.infradead.org
Subject: Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs
On Thu, Jun 28, 2012 at 05:54:30PM +0800, Yanfei Zhang wrote:
> 于 2012年06月28日 03:22, Greg KH 写道:
> > On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote:
> >> This patch export offsets of fields via /sys/devices/cpu/vmcs/.
> >> Individual offsets are contained in subfiles named by the filed's
> >> encoding, e.g.: /sys/devices/cpu/vmcs/0800
> >>
> >> Signed-off-by: zhangyanfei <zhangyanfei@...fujitsu.com>
> >> ---
> >> drivers/base/core.c | 13 +++++++++++++
> >> 1 files changed, 13 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/base/core.c b/drivers/base/core.c
> >> index 346be8b..dd05ee7 100644
> >> --- a/drivers/base/core.c
> >> +++ b/drivers/base/core.c
> >> @@ -26,6 +26,7 @@
> >> #include <linux/async.h>
> >> #include <linux/pm_runtime.h>
> >> #include <linux/netdevice.h>
> >> +#include <asm/vmcsinfo.h>
> >
> > Did you just break the build on all other arches? Not nice.
> >
> >> @@ -1038,6 +1039,11 @@ int device_add(struct device *dev)
> >> error = dpm_sysfs_add(dev);
> >> if (error)
> >> goto DPMError;
> >> +#if defined(CONFIG_KVM_INTEL) || defined(CONFIG_KVM_INTEL_MODULE)
> >> + error = vmcs_sysfs_add(dev);
> >> + if (error)
> >> + goto VMCSError;
> >> +#endif
> >
> > Oh my no, that's no way to ever do this, you know better than that,
> > please fix.
> >
> > greg k-h
> >
>
> Sorry for my thoughtless, Here is the new patch.
>
> ---
> drivers/base/core.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 346be8b..7b5266a 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -30,6 +30,13 @@
> #include "base.h"
> #include "power/power.h"
>
> +#if defined(CONFIG_KVM_INTEL) || defined(CONFIG_KVM_INTEL_MODULE)
> +#include <asm/vmcsinfo.h>
> +#else
> +static inline int vmcs_sysfs_add(struct device *dev) { return 0; }
> +static inline void vmcs_sysfs_remove(struct device *dev) { }
> +#endif
{sigh} No, again, you know better, don't do this.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists