All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>,
	xen-devel@lists.xen.org
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [RFC PATCH v3 8/8] xen/arm: cpufreq: add xen-cpufreq driver
Date: Thu, 23 Oct 2014 17:03:33 +0100	[thread overview]
Message-ID: <544926D5.2060007@linaro.org> (raw)
In-Reply-To: <1414076916-2231-9-git-send-email-oleksandr.dmytryshyn@globallogic.com>

Hi Oleksandr,

On 10/23/2014 04:08 PM, Oleksandr Dmytryshyn wrote:
> diff --git a/drivers/cpufreq/xen-cpufreq.c b/drivers/cpufreq/xen-cpufreq.c
> new file mode 100644
> index 0000000..a7f0977
> --- /dev/null
> +++ b/drivers/cpufreq/xen-cpufreq.c
> @@ -0,0 +1,889 @@
> +/*
> + *  Copyright (C) 2001 Russell King
> + *            (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
> + *
> + *  Oct 2005 - Ashok Raj <ashok.raj@intel.com>
> + *	Added handling for CPU hotplug
> + *  Feb 2006 - Jacob Shin <jacob.shin@amd.com>
> + *	Fix handling for CPU hotplug -- affected CPUs
> + *
> + *           (C) 2014 GlobalLogic Inc.
> + *
> + * Based on drivers/cpufreq/cpufreq.c

It would be interesting to explain roughly what are the major changes
between drivers/cpufreq/cpufreq.c and this drivers.

> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> + * more details.
> + */
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/init.h>
> +#include <linux/notifier.h>
> +#include <linux/types.h>
> +#include <linux/slab.h>
> +#include <linux/mutex.h>
> +#include <linux/irq.h>
> +#include <linux/workqueue.h>
> +#include <linux/cpufreq.h>
> +
> +#include <trace/events/power.h>
> +
> +#include <xen/xen.h>
> +#include <xen/events.h>
> +#include <xen/interface/xen.h>
> +#include <xen/interface/platform.h>
> +#include <xen/interface/sysctl.h>
> +#include <asm/xen/hypercall.h>
> +
> +#include "cpufreq_drv_ops.h"
> +
> +#ifdef CONFIG_CPUMASK_OFFSTACK
> +#error CONFIG_CPUMASK_OFFSTACK config should not be used with this driver
> +#endif

I remembered we talk about this check on a previous version of this
patch. Can't we disable the option in Kconfig rather than throwing a
compilation error?

Or maybe...

> +static int __init xen_cpufreq_init(void)

[..]

> +	xen_nr_cpus = op.u.physinfo.nr_cpus;
> +	if (xen_nr_cpus == 0 || xen_nr_cpus > NR_CPUS) {

Improving this check by also testing nr_cpumask_bits here.

Regards,

-- 
Julien Grall

  reply	other threads:[~2014-10-23 16:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 15:08 [RFC PATCH v3 0/8] xen_cpufreq implementation in kernel Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 1/8] PM / OPP: make cpufreq functions dependent on CONFIG_CPU_FREQ_TABLE Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 2/8] xen/arm: implement HYPERVISOR_sysctl Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 3/8] xen/arm: implement HYPERVISOR_dom0_op Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 4/8] xen/arm: add XEN_SYSCTL_cpufreq_op definition Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 5/8] cpufreq: cpufreq-cpu0: change cpus data path in devtree for hwdom kernel Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 6/8] cpufreq: introduce cpufreq_drv_ops Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 7/8] cpufreq: make cpufreq low-level drivers visible for CPUFREQ_DRV_OPS config Oleksandr Dmytryshyn
2014-10-23 15:08 ` [RFC PATCH v3 8/8] xen/arm: cpufreq: add xen-cpufreq driver Oleksandr Dmytryshyn
2014-10-23 16:03   ` Julien Grall [this message]
2014-10-24 10:38     ` Oleksandr Dmytryshyn
2014-10-24 11:29       ` Julien Grall
2014-10-24 12:28         ` Oleksandr Dmytryshyn
2014-10-26 17:38 ` [RFC PATCH v3 0/8] xen_cpufreq implementation in kernel Stefano Stabellini
2014-11-04 13:07   ` Oleksandr Dmytryshyn

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=544926D5.2060007@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=oleksandr.dmytryshyn@globallogic.com \
    --cc=rjw@sisk.pl \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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.