From: Randy Dunlap <randy.dunlap@oracle.com>
To: Shannon Nelson <shannon.nelson@intel.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
davem@davemloft.net
Subject: Re: [PATCH v2 -mm 6/7] DCA: Add Direct Cache Access driver
Date: Thu, 23 Aug 2007 22:55:45 -0700 [thread overview]
Message-ID: <20070823225545.743ee1bf.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20070824001522.16997.57613.stgit@localhost.localdomain>
On Thu, 23 Aug 2007 17:15:22 -0700 Shannon Nelson wrote:
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Acked-by: David S. Miller <davem@davemloft.net>
> ---
>
> drivers/Kconfig | 2 +
> drivers/Makefile | 1
> drivers/dca/Kconfig | 11 +++
> drivers/dca/Makefile | 2 +
> drivers/dca/dca-core.c | 168 +++++++++++++++++++++++++++++++++++++++++++++++
> drivers/dca/dca-sysfs.c | 88 +++++++++++++++++++++++++
> include/linux/dca.h | 47 +++++++++++++
> 7 files changed, 319 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dca/Kconfig b/drivers/dca/Kconfig
> new file mode 100644
> index 0000000..d901615
> --- /dev/null
> +++ b/drivers/dca/Kconfig
> @@ -0,0 +1,11 @@
> +#
> +# DCA server configuration
> +#
> +
> +config DCA
> + tristate "DCA support for clients and providers"
> + ---help---
> + This is a server to help modules that want to use Direct Cache
> + Access to find DCA providers that will supply correct CPU tags.
> + default m
We conventionally put help text last in each config entry.
& Help text should be indented by 1 tab + 2 spaces.
> diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
> new file mode 100644
> index 0000000..c0ff9bd
> --- /dev/null
> +++ b/drivers/dca/dca-core.c
> @@ -0,0 +1,168 @@
> +/*
> + * Copyright(c) 2007 Intel Corporation. All rights reserved.
> + *
> +/*
> + * This driver supports an interface for DCA clients and providers to meet.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/notifier.h>
> +#include <linux/device.h>
> +#include <linux/dca.h>
> +
> +MODULE_LICENSE("GPL");
> +
> +/* For now we're assuming a single, global, DCA provider for the system. */
> +
> +static DEFINE_SPINLOCK(dca_lock);
> +
> +struct dca_provider *global_dca = NULL;
Can global_dca be static, or is it used in other source files?
It would be good to have all of these global/exported interfaces
documented somewhere. Did I miss it in another file?
If not, you could use kernel-doc to add inline function docs.
See Documentation/kernel-doc-nano-HOWTO.txt.
> +u8 dca_get_tag(int cpu)
> +{
> + if (!global_dca)
> + return -ENODEV;
> + return global_dca->ops->get_tag(global_dca, cpu);
> +}
> +EXPORT_SYMBOL(dca_get_tag);
> +
> +
> +static BLOCKING_NOTIFIER_HEAD(dca_provider_chain);
> +
> +
> +static int __init dca_init(void)
> +{
> + int err;
> +
> + err = dca_sysfs_init();
> + if (err)
> + return err;
> + return 0;
or just (in all cases):
return err;
> +}
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-08-24 5:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-24 0:14 [PATCH v2 -mm 0/7] I/OAT: Add support for DCA - Direct Cache Access Shannon Nelson
2007-08-24 0:14 ` [PATCH v2 -mm 1/7] I/OAT: New device ids Shannon Nelson
2007-08-24 0:15 ` [PATCH v2 -mm 2/7] I/OAT: Rename the source file Shannon Nelson
2007-08-24 0:15 ` [PATCH v2 -mm 3/7] I/OAT: code cleanup from checkpatch output Shannon Nelson
2007-08-24 5:38 ` Randy Dunlap
2007-08-24 16:39 ` Nelson, Shannon
2007-08-24 0:15 ` [PATCH v2 -mm 4/7] I/OAT: Split PCI startup from DMA handling code Shannon Nelson
2007-08-24 6:08 ` Randy Dunlap
2007-08-24 16:47 ` Nelson, Shannon
2007-08-24 0:15 ` [PATCH v2 -mm 5/7] I/OAT: Add support for MSI and MSI-X Shannon Nelson
2007-08-24 17:48 ` Randy Dunlap
2007-08-24 18:18 ` Nelson, Shannon
2007-08-24 0:15 ` [PATCH v2 -mm 6/7] DCA: Add Direct Cache Access driver Shannon Nelson
2007-08-24 5:55 ` Randy Dunlap [this message]
2007-08-24 16:43 ` Nelson, Shannon
2007-08-24 0:15 ` [PATCH v2 -mm 7/7] I/OAT: Add DCA services Shannon Nelson
2007-08-24 19:12 ` Randy Dunlap
2007-08-24 21:50 ` Nelson, Shannon
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=20070823225545.743ee1bf.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=shannon.nelson@intel.com \
/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 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®