projects/linux·commit f0a08fcb

Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

f0a08fcb · Linus Torvalds <[email protected]> · 2012-07-23 19:10:54 -07:00

Pull arch/tile updates from Chris Metcalf:
 "These changes provide support for PCIe root complex and USB host mode
  for tilegx's on-chip I/Os.

  In addition, this pull provides the required underpinning for the
  on-chip networking support that was pulled into 3.5.  The changes have
  all been through LKML (with several rounds for PCIe RC) and on
  linux-next."

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: updates to pci root complex from community feedback
  bounce: allow use of bounce pool via config option
  usb: add host support for the tilegx architecture
  arch/tile: provide kernel support for the tilegx USB shim
  tile pci: enable IOMMU to support DMA for legacy devices
  arch/tile: enable ZONE_DMA for tilegx
  tilegx pci: support I/O to arbitrarily-cached pages
  tile: remove unused header
  arch/tile: tilegx PCI root complex support
  arch/tile: provide kernel support for the tilegx TRIO shim
  arch/tile: break out the "csum a long" function to <asm/checksum.h>
  arch/tile: provide kernel support for the tilegx mPIPE shim
  arch/tile: common DMA code for the GXIO IORPC subsystem
  arch/tile: support MMIO-based readb/writeb etc.
  arch/tile: introduce GXIO IORPC framework for tilegx
Commit
f0a08fcb5972167e55faa330c4a24fbaa3328b1f
Parents
474183b1 · f6d2ce00

Merge commit. Changes below are compared with the first parent: 474183b1.

Changes

71 files changed · +11226 −392

FileStatusAddDelContent
arch/tile/Kconfigmodified+42−0View file
arch/tile/Makefilemodified+2−0View file
arch/tile/gxio/Kconfigadded+28−0View file
arch/tile/gxio/Makefileadded+9−0View file
arch/tile/gxio/dma_queue.cadded+176−0View file
arch/tile/gxio/iorpc_globals.cadded+89−0View file
arch/tile/gxio/iorpc_mpipe.cadded+529−0View file
arch/tile/gxio/iorpc_mpipe_info.cadded+85−0View file
arch/tile/gxio/iorpc_trio.cadded+327−0View file
arch/tile/gxio/iorpc_usb_host.cadded+99−0View file
arch/tile/gxio/kiorpc.cadded+61−0View file
arch/tile/gxio/mpipe.cadded+545−0View file
arch/tile/gxio/trio.cadded+49−0View file
arch/tile/gxio/usb_host.cadded+91−0View file
arch/tile/include/arch/mpipe.hadded+359−0View file
arch/tile/include/arch/mpipe_constants.hadded+42−0View file
arch/tile/include/arch/mpipe_def.hadded+39−0View file
arch/tile/include/arch/mpipe_shm.hadded+509−0View file
arch/tile/include/arch/mpipe_shm_def.hadded+23−0View file
arch/tile/include/arch/trio.hadded+72−0View file
arch/tile/include/arch/trio_constants.hadded+36−0View file
arch/tile/include/arch/trio_def.hadded+41−0View file
arch/tile/include/arch/trio_pcie_intfc.hadded+229−0View file
arch/tile/include/arch/trio_pcie_intfc_def.hadded+32−0View file
arch/tile/include/arch/trio_pcie_rc.hadded+156−0View file
arch/tile/include/arch/trio_pcie_rc_def.hadded+24−0View file
arch/tile/include/arch/trio_shm.hadded+125−0View file
arch/tile/include/asm/memprof.h → arch/tile/include/arch/trio_shm_def.hrenamed+5−19View file
arch/tile/include/arch/usb_host.hadded+26−0View file
arch/tile/include/arch/usb_host_def.hadded+19−0View file
arch/tile/include/asm/Kbuildmodified+0−1View file
arch/tile/include/asm/cache.hmodified+9−3View file
arch/tile/include/asm/checksum.hmodified+18−0View file
arch/tile/include/asm/device.hadded+33−0View file
arch/tile/include/asm/dma-mapping.hmodified+98−48View file
arch/tile/include/asm/fixmap.hmodified+11−3View file
arch/tile/include/asm/homecache.hmodified+13−6View file
arch/tile/include/asm/io.hmodified+116−28View file
arch/tile/include/asm/page.hmodified+3−4View file
arch/tile/include/asm/pci.hmodified+138−13View file
arch/tile/include/gxio/common.hadded+40−0View file
arch/tile/include/gxio/dma_queue.hadded+161−0View file
arch/tile/include/gxio/iorpc_globals.hadded+38−0View file
arch/tile/include/gxio/iorpc_mpipe.hadded+136−0View file
arch/tile/include/gxio/iorpc_mpipe_info.hadded+46−0View file
arch/tile/include/gxio/iorpc_trio.hadded+97−0View file
arch/tile/include/gxio/iorpc_usb_host.hadded+46−0View file
arch/tile/include/gxio/kiorpc.hadded+29−0View file
arch/tile/include/gxio/mpipe.hadded+1736−0View file
arch/tile/include/gxio/trio.hadded+298−0View file
arch/tile/include/gxio/usb_host.hadded+87−0View file
arch/tile/include/hv/drv_mpipe_intf.hadded+602−0View file
arch/tile/include/hv/drv_trio_intf.hadded+195−0View file
arch/tile/include/hv/drv_usb_host_intf.hadded+39−0View file
arch/tile/include/hv/iorpc.hadded+714−0View file
arch/tile/kernel/Makefilemodified+5−0View file
arch/tile/kernel/pci-dma.cmodified+435−101View file
arch/tile/kernel/pci_gx.cadded+1543−0View file
arch/tile/kernel/setup.cmodified+28−17View file
arch/tile/kernel/usb.cadded+69−0View file
arch/tile/lib/checksum.cmodified+1−14View file
arch/tile/mm/homecache.cmodified+75−81View file
arch/tile/mm/init.cmodified+29−41View file
arch/tile/mm/pgtable.cmodified+0−7View file
drivers/pci/quirks.cmodified+3−3View file
drivers/usb/host/ehci-hcd.cmodified+5−0View file
drivers/usb/host/ehci-tilegx.cadded+214−0View file
drivers/usb/host/ohci-hcd.cmodified+5−0View file
drivers/usb/host/ohci-tilegx.cadded+203−0View file
include/linux/usb/tilegx.hadded+34−0View file
mm/bounce.cmodified+5−3View file

Only the first 600 diff lines are shown. Download the complete patch.

arch/tile/Kconfig

View file
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index fe12881..932e443 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -3,6 +3,8 @@
config TILE
def_bool y
+ select HAVE_DMA_ATTRS
+ select HAVE_DMA_API_DEBUG
select HAVE_KVM if !TILEGX
select GENERIC_FIND_FIRST_BIT
select USE_GENERIC_SMP_HELPERS
@@ -79,6 +81,9 @@ config ARCH_DMA_ADDR_T_64BIT
config NEED_DMA_MAP_STATE
def_bool y
+config ARCH_HAS_DMA_SET_COHERENT_MASK
+ bool
+
config LOCKDEP_SUPPORT
def_bool y
@@ -212,6 +217,22 @@ config HIGHMEM
If unsure, say "true".
+config ZONE_DMA
+ def_bool y
+
+config IOMMU_HELPER
+ bool
+
+config NEED_SG_DMA_LENGTH
+ bool
+
+config SWIOTLB
+ bool
+ default TILEGX
+ select IOMMU_HELPER
+ select NEED_SG_DMA_LENGTH
+ select ARCH_HAS_DMA_SET_COHERENT_MASK
+
# We do not currently support disabling NUMA.
config NUMA
bool # "NUMA Memory Allocation and Scheduler Support"
@@ -345,6 +366,8 @@ config KERNEL_PL
kernel will be built to run at. Generally you should use
the default value here.
+source "arch/tile/gxio/Kconfig"
+
endmenu # Tilera-specific configuration
menu "Bus options"
@@ -354,6 +377,9 @@ config PCI
default y
select PCI_DOMAINS
select GENERIC_PCI_IOMAP
+ select TILE_GXIO_TRIO if TILEGX
+ select ARCH_SUPPORTS_MSI if TILEGX
+ select PCI_MSI if TILEGX
---help---
Enable PCI root complex support, so PCIe endpoint devices can
be attached to the Tile chip. Many, but not all, PCI devices
@@ -370,6 +396,22 @@ config NO_IOPORT
source "drivers/pci/Kconfig"
+config TILE_USB
+ tristate "Tilera USB host adapter support"
+ default y
+ depends on USB
+ depends on TILEGX
+ select TILE_GXIO_USB_HOST
+ ---help---
+ Provides USB host adapter support for the built-in EHCI and OHCI
+ interfaces on TILE-Gx chips.
+
+# USB OHCI needs the bounce pool since tilegx will often have more
+# than 4GB of memory, but we don't currently use the IOTLB to present
+# a 32-bit address to OHCI. So we need to use a bounce pool instead.
+config NEED_BOUNCE_POOL
+ def_bool USB_OHCI_HCD
+
config HOTPLUG
bool "Support for hot-pluggable devices"
---help---

arch/tile/Makefile

View file
diff --git a/arch/tile/Makefile b/arch/tile/Makefile
index e20b0a0..55640cf 100644
--- a/arch/tile/Makefile
+++ b/arch/tile/Makefile
@@ -59,6 +59,8 @@ libs-y += $(LIBGCC_PATH)
# See arch/tile/Kbuild for content of core part of the kernel
core-y += arch/tile/
+core-$(CONFIG_TILE_GXIO) += arch/tile/gxio/
+
ifdef TILERA_ROOT
INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
endif

arch/tile/gxio/Kconfig

View file
diff --git a/arch/tile/gxio/Kconfig b/arch/tile/gxio/Kconfig
new file mode 100644
index 0000000..d221f8d
--- /dev/null
+++ b/arch/tile/gxio/Kconfig
@@ -0,0 +1,28 @@
+# Support direct access to TILE-Gx hardware from user space, via the
+# gxio library, or from kernel space, via kernel IORPC support.
+config TILE_GXIO
+ bool
+ depends on TILEGX
+
+# Support direct access to the common I/O DMA facility within the
+# TILE-Gx mPIPE and Trio hardware from kernel space.
+config TILE_GXIO_DMA
+ bool
+ select TILE_GXIO
+
+# Support direct access to the TILE-Gx mPIPE hardware from kernel space.
+config TILE_GXIO_MPIPE
+ bool
+ select TILE_GXIO
+ select TILE_GXIO_DMA
+
+# Support direct access to the TILE-Gx TRIO hardware from kernel space.
+config TILE_GXIO_TRIO
+ bool
+ select TILE_GXIO
+ select TILE_GXIO_DMA
+
+# Support direct access to the TILE-Gx USB hardware from kernel space.
+config TILE_GXIO_USB_HOST
+ bool
+ select TILE_GXIO

arch/tile/gxio/Makefile

View file
diff --git a/arch/tile/gxio/Makefile b/arch/tile/gxio/Makefile
new file mode 100644
index 0000000..8684bca
--- /dev/null
+++ b/arch/tile/gxio/Makefile
@@ -0,0 +1,9 @@
+#
+# Makefile for the Tile-Gx device access support.
+#
+
+obj-$(CONFIG_TILE_GXIO) += iorpc_globals.o kiorpc.o
+obj-$(CONFIG_TILE_GXIO_DMA) += dma_queue.o
+obj-$(CONFIG_TILE_GXIO_MPIPE) += mpipe.o iorpc_mpipe.o iorpc_mpipe_info.o
+obj-$(CONFIG_TILE_GXIO_TRIO) += trio.o iorpc_trio.o
+obj-$(CONFIG_TILE_GXIO_USB_HOST) += usb_host.o iorpc_usb_host.o

arch/tile/gxio/dma_queue.c

View file
diff --git a/arch/tile/gxio/dma_queue.c b/arch/tile/gxio/dma_queue.c
new file mode 100644
index 0000000..baa6035
--- /dev/null
+++ b/arch/tile/gxio/dma_queue.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2012 Tilera Corporation. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT. See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/io.h>
+#include <linux/atomic.h>
+#include <linux/module.h>
+#include <gxio/dma_queue.h>
+
+/* Wait for a memory read to complete. */
+#define wait_for_value(val) \
+ __asm__ __volatile__("move %0, %0" :: "r"(val))
+
+/* The index is in the low 16. */
+#define DMA_QUEUE_INDEX_MASK ((1 << 16) - 1)
+
+/*
+ * The hardware descriptor-ring type.
+ * This matches the types used by mpipe (MPIPE_EDMA_POST_REGION_VAL_t)
+ * and trio (TRIO_PUSH_DMA_REGION_VAL_t or TRIO_PULL_DMA_REGION_VAL_t).
+ * See those types for more documentation on the individual fields.
+ */
+typedef union {
+ struct {
+#ifndef __BIG_ENDIAN__
+ uint64_t ring_idx:16;
+ uint64_t count:16;
+ uint64_t gen:1;
+ uint64_t __reserved:31;
+#else
+ uint64_t __reserved:31;
+ uint64_t gen:1;
+ uint64_t count:16;
+ uint64_t ring_idx:16;
+#endif
+ };
+ uint64_t word;
+} __gxio_ring_t;
+
+void __gxio_dma_queue_init(__gxio_dma_queue_t *dma_queue,
+ void *post_region_addr, unsigned int num_entries)
+{
+ /*
+ * Limit 65536 entry rings to 65535 credits because we only have a
+ * 16 bit completion counter.
+ */
+ int64_t credits = (num_entries < 65536) ? num_entries : 65535;
+
+ memset(dma_queue, 0, sizeof(*dma_queue));
+
+ dma_queue->post_region_addr = post_region_addr;
+ dma_queue->hw_complete_count = 0;
+ dma_queue->credits_and_next_index = credits << DMA_QUEUE_CREDIT_SHIFT;
+}
+
+EXPORT_SYMBOL_GPL(__gxio_dma_queue_init);
+
+void __gxio_dma_queue_update_credits(__gxio_dma_queue_t *dma_queue)
+{
+ __gxio_ring_t val;
+ uint64_t count;
+ uint64_t delta;
+ uint64_t new_count;
+
+ /*
+ * Read the 64-bit completion count without touching the cache, so
+ * we later avoid having to evict any sharers of this cache line
+ * when we update it below.
+ */
+ uint64_t orig_hw_complete_count =
+ cmpxchg(&dma_queue->hw_complete_count,
+ -1, -1);
+
+ /* Make sure the load completes before we access the hardware. */
+ wait_for_value(orig_hw_complete_count);
+
+ /* Read the 16-bit count of how many packets it has completed. */
+ val.word = __gxio_mmio_read(dma_queue->post_region_addr);
+ count = val.count;
+
+ /*
+ * Calculate the number of completions since we last updated the
+ * 64-bit counter. It's safe to ignore the high bits because the
+ * maximum credit value is 65535.
+ */
+ delta = (count - orig_hw_complete_count) & 0xffff;
+ if (delta == 0)
+ return;
+
+ /*
+ * Try to write back the count, advanced by delta. If we race with
+ * another thread, this might fail, in which case we return
+ * immediately on the assumption that some credits are (or at least
+ * were) available.
+ */
+ new_count = orig_hw_complete_count + delta;
+ if (cmpxchg(&dma_queue->hw_complete_count,
+ orig_hw_complete_count,
+ new_count) != orig_hw_complete_count)
+ return;
+
+ /*
+ * We succeeded in advancing the completion count; add back the
+ * corresponding number of egress credits.
+ */
+ __insn_fetchadd(&dma_queue->credits_and_next_index,
+ (delta << DMA_QUEUE_CREDIT_SHIFT));
+}
+
+EXPORT_SYMBOL_GPL(__gxio_dma_queue_update_credits);
+
+/*
+ * A separate 'blocked' method for put() so that backtraces and
+ * profiles will clearly indicate that we're wasting time spinning on
+ * egress availability rather than actually posting commands.
+ */
+int64_t __gxio_dma_queue_wait_for_credits(__gxio_dma_queue_t *dma_queue,
+ int64_t modifier)
+{
+ int backoff = 16;
+ int64_t old;
+
+ do {
+ int i;
+ /* Back off to avoid spamming memory networks. */
+ for (i = backoff; i > 0; i--)
+ __insn_mfspr(SPR_PASS);
+
+ /* Check credits again. */
+ __gxio_dma_queue_update_credits(dma_queue);
+ old = __insn_fetchaddgez(&dma_queue->credits_and_next_index,
+ modifier);
+
+ /* Calculate bounded exponential backoff for next iteration. */
+ if (backoff < 256)
+ backoff *= 2;
+ } while (old + modifier < 0);
+
+ return old;
+}
+
+EXPORT_SYMBOL_GPL(__gxio_dma_queue_wait_for_credits);
+
+int64_t __gxio_dma_queue_reserve_aux(__gxio_dma_queue_t *dma_queue,
+ unsigned int num, int wait)
+{
+ return __gxio_dma_queue_reserve(dma_queue, num, wait != 0, true);
+}
+
+EXPORT_SYMBOL_GPL(__gxio_dma_queue_reserve_aux);
+
+int __gxio_dma_queue_is_complete(__gxio_dma_queue_t *dma_queue,
+ int64_t completion_slot, int update)
+{
+ if (update) {
+ if (ACCESS_ONCE(dma_queue->hw_complete_count) >
+ completion_slot)
+ return 1;
+
+ __gxio_dma_queue_update_credits(dma_queue);
+ }
+
+ return ACCESS_ONCE(dma_queue->hw_complete_count) > completion_slot;
+}
+
+EXPORT_SYMBOL_GPL(__gxio_dma_queue_is_complete);

arch/tile/gxio/iorpc_globals.c

View file
diff --git a/arch/tile/gxio/iorpc_globals.c b/arch/tile/gxio/iorpc_globals.c
new file mode 100644
index 0000000..e178e90
--- /dev/null
+++ b/arch/tile/gxio/iorpc_globals.c
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2012 Tilera Corporation. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT. See the GNU General Public License for
+ * more details.
+ */
+
+/* This file is machine-generated; DO NOT EDIT! */
+#include "gxio/iorpc_globals.h"
+
+struct arm_pollfd_param {
+ union iorpc_pollfd pollfd;
+};
+
+int __iorpc_arm_pollfd(int fd, int pollfd_cookie)
+{
+ struct arm_pollfd_param temp;
+ struct arm_pollfd_param *params = &temp;
+
+ params->pollfd.kernel.cookie = pollfd_cookie;
+
+ return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
+ IORPC_OP_ARM_POLLFD);
+}
+
+EXPORT_SYMBOL(__iorpc_arm_pollfd);
+
+struct close_pollfd_param {
+ union iorpc_pollfd pollfd;
+};
+
+int __iorpc_close_pollfd(int fd, int pollfd_cookie)
+{
+ struct close_pollfd_param temp;
+ struct close_pollfd_param *params = &temp;
+
+ params->pollfd.kernel.cookie = pollfd_cookie;
+
+ return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
+ IORPC_OP_CLOSE_POLLFD);
+}
+
+EXPORT_SYMBOL(__iorpc_close_pollfd);
+
+struct get_mmio_base_param {
+ HV_PTE base;
+};
+
+int __iorpc_get_mmio_base(int fd, HV_PTE *base)
+{
+ int __result;
+ struct get_mmio_base_param temp;
+ struct get_mmio_base_param *params = &temp;
+
+ __result =
+ hv_dev_pread(fd, 0, (HV_VirtAddr) params, sizeof(*params),
+ IORPC_OP_GET_MMIO_BASE);
+ *base = params->base;
+
+ return __result;
+}
+
+EXPORT_SYMBOL(__iorpc_get_mmio_base);
+
+struct check_mmio_offset_param {
+ unsigned long offset;
+ unsigned long size;
+};
+
+int __iorpc_check_mmio_offset(int fd, unsigned long offset, unsigned long size)
+{
+ struct check_mmio_offset_param temp;
+ struct check_mmio_offset_param *params = &temp;
+
+ params->offset = offset;
+ params->size = size;
+
+ return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
+ IORPC_OP_CHECK_MMIO_OFFSET);
+}
+
+EXPORT_SYMBOL(__iorpc_check_mmio_offset);

arch/tile/gxio/iorpc_mpipe.c

View file
diff --git a/arch/tile/gxio/iorpc_mpipe.c b/arch/tile/gxio/iorpc_mpipe.c
new file mode 100644
index 0000000..31b87bf
--- /dev/null
+++ b/arch/tile/gxio/iorpc_mpipe.c
@@ -0,0 +1,529 @@
+/*
+ * Copyright 2012 Tilera Corporation. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT. See the GNU General Public License for
+ * more details.
+ */
+
+/* This file is machine-generated; DO NOT EDIT! */
+#include "gxio/iorpc_mpipe.h"
+
+struct alloc_buffer_stacks_param {
+ unsigned int count;
+ unsigned int first;
+ unsigned int flags;
+};
+
+int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t * context,
+ unsigned int count, unsigned int first,
+ unsigned int flags)
+{
+ struct alloc_buffer_stacks_param temp;
+ struct alloc_buffer_stacks_param *params = &temp;
+
+ params->count = count;
+ params->first = first;
+ params->flags = flags;
+
+ return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
+ sizeof(*params),
+ GXIO_MPIPE_OP_ALLOC_BUFFER_STACKS);
+}
+
+EXPORT_SYMBOL(gxio_mpipe_alloc_buffer_stacks);
+
+struct init_buffer_stack_aux_param {
+ union iorpc_mem_buffer buffer;
+ unsigned int stack;
+ unsigned int buffer_size_enum;
+};
+
+int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t * context,
+ void *mem_va, size_t mem_size,
+ unsigned int mem_flags, unsigned int stack,
+ unsigned int buffer_size_enum)
+{
+ int __result;
+ unsigned long long __cpa;
+ pte_t __pte;
+ struct init_buffer_stack_aux_param temp;
+ struct init_buffer_stack_aux_param *params = &temp;
+
+ __result = va_to_cpa_and_pte(mem_va, &__cpa, &__pte);
+ if (__result != 0)
+ return __result;
+ params->buffer.kernel.cpa = __cpa;
+ params->buffer.kernel.size = mem_size;
+ params->buffer.kernel.pte = __pte;
+ params->buffer.kernel.flags = mem_flags;
+ params->stack = stack;
+ params->buffer_size_enum = buffer_size_enum;
+
+ return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
+ sizeof(*params),
+ GXIO_MPIPE_OP_INIT_BUFFER_STACK_AUX);
+}
+
+EXPORT_SYMBOL(gxio_mpipe_init_buffer_stack_aux);
+
+
+struct alloc_notif_rings_param {
+ unsigned int count;
+ unsigned int first;
+ unsigned int flags;
+};
+
+int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t * context,
+ unsigned int count, unsigned int first,
+ unsigned int flags)
+{
+ struct alloc_notif_rings_param temp;
+ struct alloc_notif_rings_param *params = &temp;
+
+ params->count = count;
+ params->first = first;
+ params->flags = flags;
+
+ return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
+ sizeof(*params), GXIO_MPIPE_OP_ALLOC_NOTIF_RINGS);
+}
+
+EXPORT_SYMBOL(gxio_mpipe_alloc_notif_rings);
+
+struct init_notif_ring_aux_param {
+ union iorpc_mem_buffer buffer;
+ unsigned int ring;
+};
+
+int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t * context, void *mem_va,
+ size_t mem_size, unsigned int mem_flags,
+ unsigned int ring)
+{
+ int __result;
+ unsigned long long __cpa;
+ pte_t __pte;
+ struct init_notif_ring_aux_param temp;
+ struct init_notif_ring_aux_param *params = &temp;
+
+ __result = va_to_cpa_and_pte(mem_va, &__cpa, &__pte);
+ if (__result != 0)
+ return __result;
+ params->buffer.kernel.cpa = __cpa;
+ params->buffer.kernel.size = mem_size;
+ params->buffer.kernel.pte = __pte;
+ params->buffer.kernel.flags = mem_flags;
+ params->ring = ring;
+
+ return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
+ sizeof(*params),
+ GXIO_MPIPE_OP_INIT_NOTIF_RING_AUX);
+}
+
+EXPORT_SYMBOL(gxio_mpipe_init_notif_ring_aux);
+
+struct request_notif_ring_interrupt_param {
+ union iorpc_interrupt interrupt;
+ unsigned int ring;
+};
+
+int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t * context,
+ int inter_x, int inter_y,
+ int inter_ipi, int inter_event,
+ unsigned int ring)
+{
+ struct request_notif_ring_interrupt_param temp;
+ struct request_notif_ring_interrupt_param *params = &temp;
+
+ params->interrupt.kernel.x = inter_x;
+ params->interrupt.kernel.y = inter_y;
+ params->interrupt.kernel.ipi = inter_ipi;
+ params->interrupt.kernel.event = inter_event;
+ params->ring = ring;
+
+ return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
+ sizeof(*params),
+ GXIO_MPIPE_OP_REQUEST_NOTIF_RING_INTERRUPT);
+}
+
+EXPORT_SYMBOL(gxio_mpipe_request_notif_ring_interrupt);
+
+struct enable_notif_ring_interrupt_param {
+ unsigned int ring;
+};
+
+int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t * context,
+ unsigned int ring)
+{
+ struct enable_notif_ring_interrupt_param temp;
+ struct enable_notif_ring_interrupt_param *params = &temp;
+
+ params->ring = ring;

This diff is incomplete. Download the complete patch.

arch/tile/gxio/iorpc_mpipe_info.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/gxio/iorpc_trio.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/gxio/iorpc_usb_host.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/gxio/kiorpc.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/gxio/mpipe.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/gxio/trio.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/gxio/usb_host.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/mpipe.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/mpipe_constants.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/mpipe_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/mpipe_shm.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/mpipe_shm_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_constants.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_pcie_intfc.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_pcie_intfc_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_pcie_rc.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_pcie_rc_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_shm.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/trio_shm_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/usb_host.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/arch/usb_host_def.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/Kbuild

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/cache.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/checksum.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/device.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/dma-mapping.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/fixmap.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/homecache.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/io.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/page.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/asm/pci.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/common.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/dma_queue.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/iorpc_globals.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/iorpc_mpipe.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/iorpc_mpipe_info.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/iorpc_trio.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/iorpc_usb_host.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/kiorpc.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/mpipe.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/trio.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/gxio/usb_host.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/hv/drv_mpipe_intf.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/hv/drv_trio_intf.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/hv/drv_usb_host_intf.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/include/hv/iorpc.h

View file

This diff is incomplete. Download the complete patch.

arch/tile/kernel/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/tile/kernel/pci-dma.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/kernel/pci_gx.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/kernel/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/kernel/usb.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/lib/checksum.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/mm/homecache.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/mm/init.c

View file

This diff is incomplete. Download the complete patch.

arch/tile/mm/pgtable.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/quirks.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/host/ehci-hcd.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/host/ehci-tilegx.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/host/ohci-hcd.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/host/ohci-tilegx.c

View file

This diff is incomplete. Download the complete patch.

include/linux/usb/tilegx.h

View file

This diff is incomplete. Download the complete patch.

mm/bounce.c

View file

This diff is incomplete. Download the complete patch.