summaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/messaging.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-03-09 14:13:42 +0100
committerArnd Bergmann <arnd@arndb.de>2018-03-16 10:56:03 +0100
commitbb9d812643d8a121df7d614a2b9c60193a92deb0 (patch)
tree419096f57ca0501d8813151a5236387074edb4ea /arch/tile/kernel/messaging.c
parentarch: remove blackfin port (diff)
downloadlinux-bb9d812643d8a121df7d614a2b9c60193a92deb0.tar.xz
linux-bb9d812643d8a121df7d614a2b9c60193a92deb0.zip
arch: remove tile port
The Tile architecture port was added by Chris Metcalf in 2010, and maintained until early 2018 when he orphaned it due to his departure from Mellanox, and nobody else stepped up to maintain it. The product line is still around in the form of the BlueField SoC, but no longer uses the Tile architecture. There are also still products for sale with Tile-GX SoCs, notably the Mikrotik CCR router family. The products all use old (linux-3.3) kernels with lots of patches and won't be upgraded by their manufacturers. There have been efforts to port both OpenWRT and Debian to these, but both projects have stalled and are very unlikely to be continued in the future. Given that we are reasonably sure that nobody is still using the port with an upstream kernel any more, it seems better to remove it now while the port is in a good shape than to let it bitrot for a few years first. Cc: Chris Metcalf <chris.d.metcalf@gmail.com> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: http://www.mellanox.com/page/npu_multicore_overview Link: https://jenkins.debian.net/view/rebootstrap/job/rebootstrap_tilegx_gcc7/ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/tile/kernel/messaging.c')
-rw-r--r--arch/tile/kernel/messaging.c115
1 files changed, 0 insertions, 115 deletions
diff --git a/arch/tile/kernel/messaging.c b/arch/tile/kernel/messaging.c
deleted file mode 100644
index 7475af3aacec..000000000000
--- a/arch/tile/kernel/messaging.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2010 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/percpu.h>
-#include <linux/smp.h>
-#include <linux/hardirq.h>
-#include <linux/ptrace.h>
-#include <asm/hv_driver.h>
-#include <asm/irq_regs.h>
-#include <asm/traps.h>
-#include <hv/hypervisor.h>
-#include <arch/interrupts.h>
-
-/* All messages are stored here */
-static DEFINE_PER_CPU(HV_MsgState, msg_state);
-
-void init_messaging(void)
-{
- /* Allocate storage for messages in kernel space */
- HV_MsgState *state = this_cpu_ptr(&msg_state);
- int rc = hv_register_message_state(state);
- if (rc != HV_OK)
- panic("hv_register_message_state: error %d", rc);
-
- /* Make sure downcall interrupts will be enabled. */
- arch_local_irq_unmask(INT_INTCTRL_K);
-}
-
-void hv_message_intr(struct pt_regs *regs, int intnum)
-{
- /*
- * We enter with interrupts disabled and leave them disabled,
- * to match expectations of called functions (e.g.
- * do_ccupdate_local() in mm/slab.c). This is also consistent
- * with normal call entry for device interrupts.
- */
-
- int message[HV_MAX_MESSAGE_SIZE/sizeof(int)];
- HV_RcvMsgInfo rmi;
- int nmsgs = 0;
-
- /* Track time spent here in an interrupt context */
- struct pt_regs *old_regs = set_irq_regs(regs);
- irq_enter();
-
-#ifdef CONFIG_DEBUG_STACKOVERFLOW
- /* Debugging check for stack overflow: less than 1/8th stack free? */
- {
- long sp = stack_pointer - (long) current_thread_info();
- if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) {
- pr_emerg("%s: stack overflow: %ld\n",
- __func__, sp - sizeof(struct thread_info));
- dump_stack();
- }
- }
-#endif
-
- while (1) {
- HV_MsgState *state = this_cpu_ptr(&msg_state);
- rmi = hv_receive_message(*state, (HV_VirtAddr) message,
- sizeof(message));
- if (rmi.msglen == 0)
- break;
-
- if (rmi.msglen < 0)
- panic("hv_receive_message failed: %d", rmi.msglen);
-
- ++nmsgs;
-
- if (rmi.source == HV_MSG_TILE) {
- int tag;
-
- /* we just send tags for now */
- BUG_ON(rmi.msglen != sizeof(int));
-
- tag = message[0];
-#ifdef CONFIG_SMP
- evaluate_message(message[0]);
-#else
- panic("Received IPI message %d in UP mode", tag);
-#endif
- } else if (rmi.source == HV_MSG_INTR) {
- HV_IntrMsg *him = (HV_IntrMsg *)message;
- struct hv_driver_cb *cb =
- (struct hv_driver_cb *)him->intarg;
- cb->callback(cb, him->intdata);
- __this_cpu_inc(irq_stat.irq_hv_msg_count);
- }
- }
-
- /*
- * We shouldn't have gotten a message downcall with no
- * messages available.
- */
- if (nmsgs == 0)
- panic("Message downcall invoked with no messages!");
-
- /*
- * Track time spent against the current process again and
- * process any softirqs if they are waiting.
- */
- irq_exit();
- set_irq_regs(old_regs);
-}