2560cffd21
This ARM11 SMP configuration was one of the first SMP configurations the ARM kernel supported, but it has the downside of odd DMA handling, odd cache tagging, and often (as of recent) completely broken cache handling on the ARM RealView PB11MPCore test chips. To boot the platform it was necessary to completely disable the cache. When it comes to the EB 11MPCore it is unclear if this ever worked. These reference designs are now the only ARMv6K SMP platforms. As only reference designs of purely academic interest remain, and since the special-cased DMA and PMU code is hard to maintain and doesn't really work, it is not really worth our time. Delete the ARM11MPCore support along with: - The special DMA quirk CONFIG_DMA_CACHE_RWFO that is only used on ARMv6K SMP, and we are the last ARMV6K system leaving the building and the cache handling is awkward, so good-bye. - The special PMU handling that was only used by ARM11MPCore. The following is left behind: - TIMER_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", ...) in arch/arm/kernel/smp_twd.c, this is still in use by Marvell MMP3 arch/arm/boot/dts/marvell/mmp3.dtsi - IRQCHIP_DECLARE(arm11mp_gic, "arm,arm11mp-gic", ...) in drivers/irqchip/irq-gic.c, this is still in use by Marvell MMP3 arch/arm/boot/dts/marvell/mmp3.dtsi - A compatible for the arm11mpcore SCU, since this was mistakedly used for the Cortex-A9 version of RealView EB. These are unfortunate but will need to be kept around for compatibility. New Marvell-specific compatibles should however probably be added. Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/r/20231207-drop-11mpcore-v2-1-560b396f3bf5@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
98 lines
2.5 KiB
C
98 lines
2.5 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (C) 2015 Linus Walleij
|
|
*/
|
|
#include <linux/smp.h>
|
|
#include <linux/io.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of_address.h>
|
|
#include <linux/regmap.h>
|
|
#include <linux/mfd/syscon.h>
|
|
|
|
#include <asm/cacheflush.h>
|
|
#include <asm/smp_plat.h>
|
|
#include <asm/smp_scu.h>
|
|
|
|
#include "platsmp.h"
|
|
|
|
#define REALVIEW_SYS_FLAGSSET_OFFSET 0x30
|
|
|
|
static const struct of_device_id realview_scu_match[] = {
|
|
/*
|
|
* The ARM11MP SCU compatible is only provided as fallback for
|
|
* old RealView EB Cortex-A9 device trees that were using this
|
|
* compatible by mistake.
|
|
*/
|
|
{ .compatible = "arm,arm11mp-scu", },
|
|
{ .compatible = "arm,cortex-a9-scu", },
|
|
{ .compatible = "arm,cortex-a5-scu", },
|
|
{ }
|
|
};
|
|
|
|
static const struct of_device_id realview_syscon_match[] = {
|
|
{ .compatible = "arm,core-module-integrator", },
|
|
{ .compatible = "arm,realview-eb-syscon", },
|
|
{ .compatible = "arm,realview-pbx-syscon", },
|
|
{ },
|
|
};
|
|
|
|
static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
|
|
{
|
|
struct device_node *np;
|
|
void __iomem *scu_base;
|
|
struct regmap *map;
|
|
unsigned int ncores;
|
|
int i;
|
|
|
|
np = of_find_matching_node(NULL, realview_scu_match);
|
|
if (!np) {
|
|
pr_err("PLATSMP: No SCU base address\n");
|
|
return;
|
|
}
|
|
scu_base = of_iomap(np, 0);
|
|
of_node_put(np);
|
|
if (!scu_base) {
|
|
pr_err("PLATSMP: No SCU remap\n");
|
|
return;
|
|
}
|
|
|
|
scu_enable(scu_base);
|
|
ncores = scu_get_core_count(scu_base);
|
|
pr_info("SCU: %d cores detected\n", ncores);
|
|
for (i = 0; i < ncores; i++)
|
|
set_cpu_possible(i, true);
|
|
iounmap(scu_base);
|
|
|
|
/* The syscon contains the magic SMP start address registers */
|
|
np = of_find_matching_node(NULL, realview_syscon_match);
|
|
if (!np) {
|
|
pr_err("PLATSMP: No syscon match\n");
|
|
return;
|
|
}
|
|
map = syscon_node_to_regmap(np);
|
|
if (IS_ERR(map)) {
|
|
pr_err("PLATSMP: No syscon regmap\n");
|
|
return;
|
|
}
|
|
/* Put the boot address in this magic register */
|
|
regmap_write(map, REALVIEW_SYS_FLAGSSET_OFFSET,
|
|
__pa_symbol(versatile_secondary_startup));
|
|
}
|
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
static void realview_cpu_die(unsigned int cpu)
|
|
{
|
|
return versatile_immitation_cpu_die(cpu, 0x20);
|
|
}
|
|
#endif
|
|
|
|
static const struct smp_operations realview_dt_smp_ops __initconst = {
|
|
.smp_prepare_cpus = realview_smp_prepare_cpus,
|
|
.smp_secondary_init = versatile_secondary_init,
|
|
.smp_boot_secondary = versatile_boot_secondary,
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
.cpu_die = realview_cpu_die,
|
|
#endif
|
|
};
|
|
CPU_METHOD_OF_DECLARE(realview_smp, "arm,realview-smp", &realview_dt_smp_ops);
|