diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-02 20:20:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-02 20:20:12 -0700 |
commit | f5a8eb632b562bd9c16c389f5db3a5260fba4157 (patch) | |
tree | 82687234d772ff8f72a31e598fe16553885c56c9 /drivers/tty/hvc | |
parent | Merge tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux (diff) | |
parent | MAINTAINERS: UNICORE32: Change email account (diff) | |
download | linux-dev-f5a8eb632b562bd9c16c389f5db3a5260fba4157.tar.xz linux-dev-f5a8eb632b562bd9c16c389f5db3a5260fba4157.zip |
Merge tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pul removal of obsolete architecture ports from Arnd Bergmann:
"This removes the entire architecture code for blackfin, cris, frv,
m32r, metag, mn10300, score, and tile, including the associated device
drivers.
I have been working with the (former) maintainers for each one to
ensure that my interpretation was right and the code is definitely
unused in mainline kernels. Many had fond memories of working on the
respective ports to start with and getting them included in upstream,
but also saw no point in keeping the port alive without any users.
In the end, it seems that while the eight architectures are extremely
different, they all suffered the same fate: There was one company in
charge of an SoC line, a CPU microarchitecture and a software
ecosystem, which was more costly than licensing newer off-the-shelf
CPU cores from a third party (typically ARM, MIPS, or RISC-V). It
seems that all the SoC product lines are still around, but have not
used the custom CPU architectures for several years at this point. In
contrast, CPU instruction sets that remain popular and have actively
maintained kernel ports tend to all be used across multiple licensees.
[ See the new nds32 port merged in the previous commit for the next
generation of "one company in charge of an SoC line, a CPU
microarchitecture and a software ecosystem" - Linus ]
The removal came out of a discussion that is now documented at
https://lwn.net/Articles/748074/. Unlike the original plans, I'm not
marking any ports as deprecated but remove them all at once after I
made sure that they are all unused. Some architectures (notably tile,
mn10300, and blackfin) are still being shipped in products with old
kernels, but those products will never be updated to newer kernel
releases.
After this series, we still have a few architectures without mainline
gcc support:
- unicore32 and hexagon both have very outdated gcc releases, but the
maintainers promised to work on providing something newer. At least
in case of hexagon, this will only be llvm, not gcc.
- openrisc, risc-v and nds32 are still in the process of finishing
their support or getting it added to mainline gcc in the first
place. They all have patched gcc-7.3 ports that work to some
degree, but complete upstream support won't happen before gcc-8.1.
Csky posted their first kernel patch set last week, their situation
will be similar
[ Palmer Dabbelt points out that RISC-V support is in mainline gcc
since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]"
This really says it all:
2498 files changed, 95 insertions(+), 467668 deletions(-)
* tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits)
MAINTAINERS: UNICORE32: Change email account
staging: iio: remove iio-trig-bfin-timer driver
tty: hvc: remove tile driver
tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
serial: remove tile uart driver
serial: remove m32r_sio driver
serial: remove blackfin drivers
serial: remove cris/etrax uart drivers
usb: Remove Blackfin references in USB support
usb: isp1362: remove blackfin arch glue
usb: musb: remove blackfin port
usb: host: remove tilegx platform glue
pwm: remove pwm-bfin driver
i2c: remove bfin-twi driver
spi: remove blackfin related host drivers
watchdog: remove bfin_wdt driver
can: remove bfin_can driver
mmc: remove bfin_sdh driver
input: misc: remove blackfin rotary driver
input: keyboard: remove bf54x driver
...
Diffstat (limited to 'drivers/tty/hvc')
-rw-r--r-- | drivers/tty/hvc/Kconfig | 9 | ||||
-rw-r--r-- | drivers/tty/hvc/Makefile | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_bfin_jtag.c | 104 | ||||
-rw-r--r-- | drivers/tty/hvc/hvc_tile.c | 196 |
4 files changed, 0 insertions, 311 deletions
diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig index fec457edad14..3bade5ad3d71 100644 --- a/drivers/tty/hvc/Kconfig +++ b/drivers/tty/hvc/Kconfig @@ -88,15 +88,6 @@ config HVC_DCC driver. This console is used through a JTAG only on ARM. If you don't have a JTAG then you probably don't want this option. -config HVC_BFIN_JTAG - bool "Blackfin JTAG console" - depends on BLACKFIN - select HVC_DRIVER - help - This console uses the Blackfin JTAG to create a console under the - the HVC driver. If you don't have JTAG, then you probably don't - want this option. - config HVCS tristate "IBM Hypervisor Virtual Console Server support" depends on PPC_PSERIES && HVC_CONSOLE diff --git a/drivers/tty/hvc/Makefile b/drivers/tty/hvc/Makefile index 0b02ec7f1dfd..7da1934d34e8 100644 --- a/drivers/tty/hvc/Makefile +++ b/drivers/tty/hvc/Makefile @@ -3,12 +3,10 @@ obj-$(CONFIG_HVC_CONSOLE) += hvc_vio.o hvsi_lib.o obj-$(CONFIG_HVC_OPAL) += hvc_opal.o hvsi_lib.o obj-$(CONFIG_HVC_OLD_HVSI) += hvsi.o obj-$(CONFIG_HVC_RTAS) += hvc_rtas.o -obj-$(CONFIG_HVC_TILE) += hvc_tile.o obj-$(CONFIG_HVC_DCC) += hvc_dcc.o obj-$(CONFIG_HVC_DRIVER) += hvc_console.o obj-$(CONFIG_HVC_IRQ) += hvc_irq.o obj-$(CONFIG_HVC_XEN) += hvc_xen.o obj-$(CONFIG_HVC_IUCV) += hvc_iucv.o obj-$(CONFIG_HVC_UDBG) += hvc_udbg.o -obj-$(CONFIG_HVC_BFIN_JTAG) += hvc_bfin_jtag.o obj-$(CONFIG_HVCS) += hvcs.o diff --git a/drivers/tty/hvc/hvc_bfin_jtag.c b/drivers/tty/hvc/hvc_bfin_jtag.c deleted file mode 100644 index dd7cae4c195b..000000000000 --- a/drivers/tty/hvc/hvc_bfin_jtag.c +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Console via Blackfin JTAG Communication - * - * Copyright 2008-2011 Analog Devices Inc. - * - * Enter bugs at http://blackfin.uclinux.org/ - */ - -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/err.h> -#include <linux/init.h> -#include <linux/moduleparam.h> -#include <linux/types.h> - -#include "hvc_console.h" - -/* See the Debug/Emulation chapter in the HRM */ -#define EMUDOF 0x00000001 /* EMUDAT_OUT full & valid */ -#define EMUDIF 0x00000002 /* EMUDAT_IN full & valid */ -#define EMUDOOVF 0x00000004 /* EMUDAT_OUT overflow */ -#define EMUDIOVF 0x00000008 /* EMUDAT_IN overflow */ - -/* Helper functions to glue the register API to simple C operations */ -static inline uint32_t bfin_write_emudat(uint32_t emudat) -{ - __asm__ __volatile__("emudat = %0;" : : "d"(emudat)); - return emudat; -} - -static inline uint32_t bfin_read_emudat(void) -{ - uint32_t emudat; - __asm__ __volatile__("%0 = emudat;" : "=d"(emudat)); - return emudat; -} - -/* Send data to the host */ -static int hvc_bfin_put_chars(uint32_t vt, const char *buf, int count) -{ - static uint32_t outbound_len; - uint32_t emudat; - int ret; - - if (bfin_read_DBGSTAT() & EMUDOF) - return 0; - - if (!outbound_len) { - outbound_len = count; - bfin_write_emudat(outbound_len); - return 0; - } - - ret = min(outbound_len, (uint32_t)4); - memcpy(&emudat, buf, ret); - bfin_write_emudat(emudat); - outbound_len -= ret; - - return ret; -} - -/* Receive data from the host */ -static int hvc_bfin_get_chars(uint32_t vt, char *buf, int count) -{ - static uint32_t inbound_len; - uint32_t emudat; - int ret; - - if (!(bfin_read_DBGSTAT() & EMUDIF)) - return 0; - emudat = bfin_read_emudat(); - - if (!inbound_len) { - inbound_len = emudat; - return 0; - } - - ret = min(inbound_len, (uint32_t)4); - memcpy(buf, &emudat, ret); - inbound_len -= ret; - - return ret; -} - -/* Glue the HVC layers to the Blackfin layers */ -static const struct hv_ops hvc_bfin_get_put_ops = { - .get_chars = hvc_bfin_get_chars, - .put_chars = hvc_bfin_put_chars, -}; - -static int __init hvc_bfin_console_init(void) -{ - hvc_instantiate(0, 0, &hvc_bfin_get_put_ops); - return 0; -} -console_initcall(hvc_bfin_console_init); - -static int __init hvc_bfin_init(void) -{ - hvc_alloc(0, 0, &hvc_bfin_get_put_ops, 128); - return 0; -} -device_initcall(hvc_bfin_init); diff --git a/drivers/tty/hvc/hvc_tile.c b/drivers/tty/hvc/hvc_tile.c deleted file mode 100644 index b517c0661abb..000000000000 --- a/drivers/tty/hvc/hvc_tile.c +++ /dev/null @@ -1,196 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright 2010 Tilera Corporation. All Rights Reserved. - * - * Tilera TILE Processor hypervisor console - */ - -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/err.h> -#include <linux/init.h> -#include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> -#include <linux/types.h> - -#include <asm/setup.h> -#include <arch/sim_def.h> - -#include <hv/hypervisor.h> - -#include "hvc_console.h" - -static int use_sim_console; -static int __init sim_console(char *str) -{ - use_sim_console = 1; - return 0; -} -early_param("sim_console", sim_console); - -int tile_console_write(const char *buf, int count) -{ - if (unlikely(use_sim_console)) { - int i; - for (i = 0; i < count; ++i) - __insn_mtspr(SPR_SIM_CONTROL, SIM_CONTROL_PUTC | - (buf[i] << _SIM_CONTROL_OPERATOR_BITS)); - __insn_mtspr(SPR_SIM_CONTROL, SIM_CONTROL_PUTC | - (SIM_PUTC_FLUSH_BINARY << - _SIM_CONTROL_OPERATOR_BITS)); - return 0; - } else { - /* Translate 0 bytes written to EAGAIN for hvc_console_print. */ - return hv_console_write((HV_VirtAddr)buf, count) ?: -EAGAIN; - } -} - -static int hvc_tile_put_chars(uint32_t vt, const char *buf, int count) -{ - return tile_console_write(buf, count); -} - -static int hvc_tile_get_chars(uint32_t vt, char *buf, int count) -{ - int i, c; - - for (i = 0; i < count; ++i) { - c = hv_console_read_if_ready(); - if (c < 0) - break; - buf[i] = c; - } - - return i; -} - -#ifdef __tilegx__ -/* - * IRQ based callbacks. - */ -static int hvc_tile_notifier_add_irq(struct hvc_struct *hp, int irq) -{ - int rc; - int cpu = raw_smp_processor_id(); /* Choose an arbitrary cpu */ - HV_Coord coord = { .x = cpu_x(cpu), .y = cpu_y(cpu) }; - - rc = notifier_add_irq(hp, irq); - if (rc) - return rc; - - /* - * Request that the hypervisor start sending us interrupts. - * If the hypervisor returns an error, we still return 0, so that - * we can fall back to polling. - */ - if (hv_console_set_ipi(KERNEL_PL, irq, coord) < 0) - notifier_del_irq(hp, irq); - - return 0; -} - -static void hvc_tile_notifier_del_irq(struct hvc_struct *hp, int irq) -{ - HV_Coord coord = { 0, 0 }; - - /* Tell the hypervisor to stop sending us interrupts. */ - hv_console_set_ipi(KERNEL_PL, -1, coord); - - notifier_del_irq(hp, irq); -} - -static void hvc_tile_notifier_hangup_irq(struct hvc_struct *hp, int irq) -{ - hvc_tile_notifier_del_irq(hp, irq); -} -#endif - -static const struct hv_ops hvc_tile_get_put_ops = { - .get_chars = hvc_tile_get_chars, - .put_chars = hvc_tile_put_chars, -#ifdef __tilegx__ - .notifier_add = hvc_tile_notifier_add_irq, - .notifier_del = hvc_tile_notifier_del_irq, - .notifier_hangup = hvc_tile_notifier_hangup_irq, -#endif -}; - - -#ifdef __tilegx__ -static int hvc_tile_probe(struct platform_device *pdev) -{ - struct hvc_struct *hp; - int tile_hvc_irq; - - /* Create our IRQ and register it. */ - tile_hvc_irq = irq_alloc_hwirq(-1); - if (!tile_hvc_irq) - return -ENXIO; - - tile_irq_activate(tile_hvc_irq, TILE_IRQ_PERCPU); - hp = hvc_alloc(0, tile_hvc_irq, &hvc_tile_get_put_ops, 128); - if (IS_ERR(hp)) { - irq_free_hwirq(tile_hvc_irq); - return PTR_ERR(hp); - } - dev_set_drvdata(&pdev->dev, hp); - - return 0; -} - -static int hvc_tile_remove(struct platform_device *pdev) -{ - int rc; - struct hvc_struct *hp = dev_get_drvdata(&pdev->dev); - - rc = hvc_remove(hp); - if (rc == 0) - irq_free_hwirq(hp->data); - - return rc; -} - -static void hvc_tile_shutdown(struct platform_device *pdev) -{ - struct hvc_struct *hp = dev_get_drvdata(&pdev->dev); - - hvc_tile_notifier_del_irq(hp, hp->data); -} - -static struct platform_device hvc_tile_pdev = { - .name = "hvc-tile", - .id = 0, -}; - -static struct platform_driver hvc_tile_driver = { - .probe = hvc_tile_probe, - .remove = hvc_tile_remove, - .shutdown = hvc_tile_shutdown, - .driver = { - .name = "hvc-tile", - } -}; -#endif - -static int __init hvc_tile_console_init(void) -{ - hvc_instantiate(0, 0, &hvc_tile_get_put_ops); - add_preferred_console("hvc", 0, NULL); - return 0; -} -console_initcall(hvc_tile_console_init); - -static int __init hvc_tile_init(void) -{ -#ifndef __tilegx__ - struct hvc_struct *hp; - hp = hvc_alloc(0, 0, &hvc_tile_get_put_ops, 128); - return PTR_ERR_OR_ZERO(hp); -#else - platform_device_register(&hvc_tile_pdev); - return platform_driver_register(&hvc_tile_driver); -#endif -} -device_initcall(hvc_tile_init); |