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 7/7] I/OAT: Add DCA services
Date: Fri, 24 Aug 2007 12:12:17 -0700 [thread overview]
Message-ID: <20070824121217.3048147c.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20070824001527.16997.2238.stgit@localhost.localdomain>
On Thu, 23 Aug 2007 17:15:27 -0700 Shannon Nelson wrote:
> Add code to connect to the DCA driver and provide cpu tags for use by
> drivers that would like to use Direct Cache Access hints.
>
> [Adrian Bunk] Several Kconfig cleanup items
> [Andrew Morten, Chris Leech] fix for using cpu_physical_id() even when
> built for uni-processor
>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Acked-by: David S. Miller <davem@davemloft.net>
> ---
>
> drivers/dca/Kconfig | 7 -
> drivers/dma/Kconfig | 60 ++++++-----
> drivers/dma/Makefile | 2
> drivers/dma/ioat.c | 12 ++
> drivers/dma/ioat_dca.c | 267 ++++++++++++++++++++++++++++++++++++++++++++++++
> drivers/dma/ioatdma.h | 2
> 6 files changed, 318 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/dma/ioat_dca.c b/drivers/dma/ioat_dca.c
> new file mode 100644
> index 0000000..03c993a
> --- /dev/null
> +++ b/drivers/dma/ioat_dca.c
> @@ -0,0 +1,267 @@
> +
> +/* either a kernel change is needed, or we need something like this in kernel */
> +#ifndef CONFIG_SMP
> +#include <asm/smp.h>
> +#undef cpu_physical_id
> +#define cpu_physical_id(cpu) (cpuid_ebx(1) >> 24)
> +#endif
> +
> +#include "ioatdma.h"
> +#include "ioatdma_registers.h"
> +
> +/* THIS STUFF NEEDS TO LIVE SOMEWHERE ELSE */
> +#define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */
> +/* / THIS STUFF NEEDS TO LIVE SOMEWHERE ELSE */
Yes, feature bits need to be integrated with the other CPU-specific
feature bits.
> +/* pack PCI B/D/F into a u16 */
> +static inline u16 dcaid_from_pcidev(struct pci_dev *pci)
> +{
> + return (pci->bus->number << 8) | pci->devfn;
> +}
Could any other PCI users use this in include/linux/pci.h ?
> diff --git a/drivers/dma/ioatdma.h b/drivers/dma/ioatdma.h
> index 5931e56..d59c90b 100644
> --- a/drivers/dma/ioatdma.h
> +++ b/drivers/dma/ioatdma.h
> @@ -132,9 +132,11 @@ struct ioat_desc_sw {
> #if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE)
> struct ioatdma_device *ioat_dma_probe(struct pci_dev *, void __iomem *);
> void ioat_dma_remove(struct ioatdma_device *device);
> +struct dca_provider *ioat_dca_init(struct pci_dev *, void __iomem *);
Parameter (variable) names in prototypes, please.
> #else
> #define ioat_dma_probe(pdev, io) NULL
> #define ioat_dma_remove(dev) do { } while (0)
> +#define ioat_dca_init(pdev, io) NULL
> #endif
>
> #endif /* IOATDMA_H */
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-08-24 19:17 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
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 [this message]
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=20070824121217.3048147c.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®