ARC fixes for 4.16-rc4
- MCIP aka ARconnect fixes for SMP builds [Euginey] - Preventive fix for SLC (L2 cache) flushing [Euginey] - Kconfig default fix [Ulf Magnusson] - trailing semicolon fixes [Luis de Bethencourt] - other assorted minor fixes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJamHh7AAoJEGnX8d3iisJeM+MQAL+cIkdRd9NJoPPL66IOgwmi 68jUkVQ8PSgR2P/sWvwIRTionOG9siu58Q1ygXpPR9SNnSJlyIYIW4Onuoajs+Ii TmTwWm8jnKtuPtKMBep8XpYQQ+FRL6sDNn0QLjCnnvqAeE7rTFODSlpBR+jL6ur4 t2h1wHQem6oas1YRwnKrxxMnfV3KP3TkCS2a/lvmeAAt8xi+ll+9OnzVcSCj7pCJ ZToenfH3UAbhAd5T7gWkJv2v00zbHNzKtpdluSW6WBybP1Ib2IxOxEiUlAvxQgpl NctvS8Q1uveOPQZHO+fNXsJvf+imP2RdWh5RaOcmm8a4tp8jsR51BScX55usjr/z ybg4bzHBV3x9YbZkkW9DKyF9eeZ7hWST8nNoebcHNVjboUeD+wgtV8e3Fvc6bIoo /Xkw28y/mZwCs7mBfu1fNOIIiiZDSgz7YeeqzOPBzEYVcHE4VGINwX+9cLXPOsgz rmI/Md3buSjrfXPnXTuk1R4fl0WKM5FT/2BJ+IbNU2w6VO1/iKqiBQREH5lBfYAI BUikxKNwrJ9+zG8EXFUAEi6gn4dxosxMKJ04CTviwGFc1y6yNsmMgizevFpPUyx7 9o3z19hHUZLx94QsGHLI7QJe3Kawamu0tmdJvQBgB/eZ9lj6OdkzY48I2lgGezSw 00e+JPSy6EDi8YrlMki5 =+Bmc -----END PGP SIGNATURE----- Merge tag 'arc-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - MCIP aka ARconnect fixes for SMP builds [Euginey] - preventive fix for SLC (L2 cache) flushing [Euginey] - Kconfig default fix [Ulf Magnusson] - trailing semicolon fixes [Luis de Bethencourt] - other assorted minor fixes * tag 'arc-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: setup cpu possible mask according to possible-cpus dts property ARC: mcip: update MCIP debug mask when the new cpu came online ARC: mcip: halt GFRC counter when ARC cores halt ARCv2: boot log: fix HS48 release number arc: dts: use 'atmel' as manufacturer for at24 in axs10x_mb ARC: Fix malformed ARC_EMUL_UNALIGNED default ARC: boot log: Fix trailing semicolon ARC: dw2 unwind: Fix trailing semicolon ARC: Enable fatal signals on boot for dev platforms ARCv2: Don't pretend we may set L-bit in STATUS32 with kflag instruction ARCv2: cache: fix slc_entire_op: flush only instead of flush-n-inv
This commit is contained in:
commit
2120447b5d
|
@ -484,7 +484,6 @@ config ARC_CURR_IN_REG
|
|||
|
||||
config ARC_EMUL_UNALIGNED
|
||||
bool "Emulate unaligned memory access (userspace only)"
|
||||
default N
|
||||
select SYSCTL_ARCH_UNALIGN_NO_WARN
|
||||
select SYSCTL_ARCH_UNALIGN_ALLOW
|
||||
depends on ISA_ARCOMPACT
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
compatible = "snps,axs101", "snps,arc-sdp";
|
||||
|
||||
chosen {
|
||||
bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 console=tty0 console=ttyS3,115200n8 consoleblank=0 video=1280x720@60";
|
||||
bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 console=tty0 console=ttyS3,115200n8 consoleblank=0 video=1280x720@60 print-fatal-signals=1";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -214,13 +214,13 @@
|
|||
};
|
||||
|
||||
eeprom@0x54{
|
||||
compatible = "24c01";
|
||||
compatible = "atmel,24c01";
|
||||
reg = <0x54>;
|
||||
pagesize = <0x8>;
|
||||
};
|
||||
|
||||
eeprom@0x57{
|
||||
compatible = "24c04";
|
||||
compatible = "atmel,24c04";
|
||||
reg = <0x57>;
|
||||
pagesize = <0x8>;
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=ttyS0,115200n8 debug";
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
interrupt-parent = <&core_intc>;
|
||||
|
||||
chosen {
|
||||
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8";
|
||||
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8 print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8";
|
||||
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8 print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
interrupt-parent = <&core_intc>;
|
||||
|
||||
chosen {
|
||||
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8";
|
||||
bootargs = "earlycon=arc_uart,mmio32,0xc0fc1000,115200n8 console=ttyARC0,115200n8 print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/* this is for console on PGU */
|
||||
/* bootargs = "console=tty0 consoleblank=0"; */
|
||||
/* this is for console on serial */
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0 console=ttyS0,115200n8 consoleblank=0 debug video=640x480-24";
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0 console=ttyS0,115200n8 consoleblank=0 debug video=640x480-24 print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/* this is for console on PGU */
|
||||
/* bootargs = "console=tty0 consoleblank=0"; */
|
||||
/* this is for console on serial */
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0 console=ttyS0,115200n8 consoleblank=0 debug video=640x480-24";
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0 console=ttyS0,115200n8 consoleblank=0 debug video=640x480-24 print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
chosen {
|
||||
/* this is for console on serial */
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0 console=ttyS0,115200n8 consoleblan=0 debug video=640x480-24";
|
||||
bootargs = "earlycon=uart8250,mmio32,0xf0000000,115200n8 console=tty0 console=ttyS0,115200n8 consoleblan=0 debug video=640x480-24 print-fatal-signals=1";
|
||||
};
|
||||
|
||||
aliases {
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
.macro FAKE_RET_FROM_EXCPN
|
||||
lr r9, [status32]
|
||||
bic r9, r9, (STATUS_U_MASK|STATUS_DE_MASK|STATUS_AE_MASK)
|
||||
or r9, r9, (STATUS_L_MASK|STATUS_IE_MASK)
|
||||
or r9, r9, STATUS_IE_MASK
|
||||
kflag r9
|
||||
.endm
|
||||
|
||||
|
|
|
@ -22,10 +22,79 @@ static DEFINE_RAW_SPINLOCK(mcip_lock);
|
|||
|
||||
static char smp_cpuinfo_buf[128];
|
||||
|
||||
/*
|
||||
* Set mask to halt GFRC if any online core in SMP cluster is halted.
|
||||
* Only works for ARC HS v3.0+, on earlier versions has no effect.
|
||||
*/
|
||||
static void mcip_update_gfrc_halt_mask(int cpu)
|
||||
{
|
||||
struct bcr_generic gfrc;
|
||||
unsigned long flags;
|
||||
u32 gfrc_halt_mask;
|
||||
|
||||
READ_BCR(ARC_REG_GFRC_BUILD, gfrc);
|
||||
|
||||
/*
|
||||
* CMD_GFRC_SET_CORE and CMD_GFRC_READ_CORE commands were added in
|
||||
* GFRC 0x3 version.
|
||||
*/
|
||||
if (gfrc.ver < 0x3)
|
||||
return;
|
||||
|
||||
raw_spin_lock_irqsave(&mcip_lock, flags);
|
||||
|
||||
__mcip_cmd(CMD_GFRC_READ_CORE, 0);
|
||||
gfrc_halt_mask = read_aux_reg(ARC_REG_MCIP_READBACK);
|
||||
gfrc_halt_mask |= BIT(cpu);
|
||||
__mcip_cmd_data(CMD_GFRC_SET_CORE, 0, gfrc_halt_mask);
|
||||
|
||||
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||
}
|
||||
|
||||
static void mcip_update_debug_halt_mask(int cpu)
|
||||
{
|
||||
u32 mcip_mask = 0;
|
||||
unsigned long flags;
|
||||
|
||||
raw_spin_lock_irqsave(&mcip_lock, flags);
|
||||
|
||||
/*
|
||||
* mcip_mask is same for CMD_DEBUG_SET_SELECT and CMD_DEBUG_SET_MASK
|
||||
* commands. So read it once instead of reading both CMD_DEBUG_READ_MASK
|
||||
* and CMD_DEBUG_READ_SELECT.
|
||||
*/
|
||||
__mcip_cmd(CMD_DEBUG_READ_SELECT, 0);
|
||||
mcip_mask = read_aux_reg(ARC_REG_MCIP_READBACK);
|
||||
|
||||
mcip_mask |= BIT(cpu);
|
||||
|
||||
__mcip_cmd_data(CMD_DEBUG_SET_SELECT, 0, mcip_mask);
|
||||
/*
|
||||
* Parameter specified halt cause:
|
||||
* STATUS32[H]/actionpoint/breakpoint/self-halt
|
||||
* We choose all of them (0xF).
|
||||
*/
|
||||
__mcip_cmd_data(CMD_DEBUG_SET_MASK, 0xF, mcip_mask);
|
||||
|
||||
raw_spin_unlock_irqrestore(&mcip_lock, flags);
|
||||
}
|
||||
|
||||
static void mcip_setup_per_cpu(int cpu)
|
||||
{
|
||||
struct mcip_bcr mp;
|
||||
|
||||
READ_BCR(ARC_REG_MCIP_BCR, mp);
|
||||
|
||||
smp_ipi_irq_setup(cpu, IPI_IRQ);
|
||||
smp_ipi_irq_setup(cpu, SOFTIRQ_IRQ);
|
||||
|
||||
/* Update GFRC halt mask as new CPU came online */
|
||||
if (mp.gfrc)
|
||||
mcip_update_gfrc_halt_mask(cpu);
|
||||
|
||||
/* Update MCIP debug mask as new CPU came online */
|
||||
if (mp.dbg)
|
||||
mcip_update_debug_halt_mask(cpu);
|
||||
}
|
||||
|
||||
static void mcip_ipi_send(int cpu)
|
||||
|
@ -101,11 +170,6 @@ static void mcip_probe_n_setup(void)
|
|||
IS_AVAIL1(mp.gfrc, "GFRC"));
|
||||
|
||||
cpuinfo_arc700[0].extn.gfrc = mp.gfrc;
|
||||
|
||||
if (mp.dbg) {
|
||||
__mcip_cmd_data(CMD_DEBUG_SET_SELECT, 0, 0xf);
|
||||
__mcip_cmd_data(CMD_DEBUG_SET_MASK, 0xf, 0xf);
|
||||
}
|
||||
}
|
||||
|
||||
struct plat_smp_ops plat_smp_ops = {
|
||||
|
|
|
@ -51,7 +51,7 @@ static const struct id_to_str arc_cpu_rel[] = {
|
|||
{ 0x51, "R2.0" },
|
||||
{ 0x52, "R2.1" },
|
||||
{ 0x53, "R3.0" },
|
||||
{ 0x54, "R4.0" },
|
||||
{ 0x54, "R3.10a" },
|
||||
#endif
|
||||
{ 0x00, NULL }
|
||||
};
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/reboot.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/of_fdt.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/setup.h>
|
||||
|
@ -47,6 +48,42 @@ void __init smp_prepare_boot_cpu(void)
|
|||
{
|
||||
}
|
||||
|
||||
static int __init arc_get_cpu_map(const char *name, struct cpumask *cpumask)
|
||||
{
|
||||
unsigned long dt_root = of_get_flat_dt_root();
|
||||
const char *buf;
|
||||
|
||||
buf = of_get_flat_dt_prop(dt_root, name, NULL);
|
||||
if (!buf)
|
||||
return -EINVAL;
|
||||
|
||||
if (cpulist_parse(buf, cpumask))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read from DeviceTree and setup cpu possible mask. If there is no
|
||||
* "possible-cpus" property in DeviceTree pretend all [0..NR_CPUS-1] exist.
|
||||
*/
|
||||
static void __init arc_init_cpu_possible(void)
|
||||
{
|
||||
struct cpumask cpumask;
|
||||
|
||||
if (arc_get_cpu_map("possible-cpus", &cpumask)) {
|
||||
pr_warn("Failed to get possible-cpus from dtb, pretending all %u cpus exist\n",
|
||||
NR_CPUS);
|
||||
|
||||
cpumask_setall(&cpumask);
|
||||
}
|
||||
|
||||
if (!cpumask_test_cpu(0, &cpumask))
|
||||
panic("Master cpu (cpu[0]) is missed in cpu possible mask!");
|
||||
|
||||
init_cpu_possible(&cpumask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called from setup_arch() before calling setup_processor()
|
||||
*
|
||||
|
@ -58,10 +95,7 @@ void __init smp_prepare_boot_cpu(void)
|
|||
*/
|
||||
void __init smp_init_cpus(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < NR_CPUS; i++)
|
||||
set_cpu_possible(i, true);
|
||||
arc_init_cpu_possible();
|
||||
|
||||
if (plat_smp_ops.init_early_smp)
|
||||
plat_smp_ops.init_early_smp();
|
||||
|
@ -70,16 +104,12 @@ void __init smp_init_cpus(void)
|
|||
/* called from init ( ) => process 1 */
|
||||
void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* if platform didn't set the present map already, do it now
|
||||
* boot cpu is set to present already by init/main.c
|
||||
*/
|
||||
if (num_present_cpus() <= 1) {
|
||||
for (i = 0; i < max_cpus; i++)
|
||||
set_cpu_present(i, true);
|
||||
}
|
||||
if (num_present_cpus() <= 1)
|
||||
init_cpu_present(cpu_possible_mask);
|
||||
}
|
||||
|
||||
void __init smp_cpus_done(unsigned int max_cpus)
|
||||
|
|
|
@ -780,7 +780,10 @@ noinline static void slc_entire_op(const int op)
|
|||
|
||||
write_aux_reg(r, ctrl);
|
||||
|
||||
write_aux_reg(ARC_REG_SLC_INVALIDATE, 1);
|
||||
if (op & OP_INV) /* Inv or flush-n-inv use same cmd reg */
|
||||
write_aux_reg(ARC_REG_SLC_INVALIDATE, 0x1);
|
||||
else
|
||||
write_aux_reg(ARC_REG_SLC_FLUSH, 0x1);
|
||||
|
||||
/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
|
||||
read_aux_reg(r);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#define ARC_REG_MCIP_BCR 0x0d0
|
||||
#define ARC_REG_MCIP_IDU_BCR 0x0D5
|
||||
#define ARC_REG_GFRC_BUILD 0x0D6
|
||||
#define ARC_REG_MCIP_CMD 0x600
|
||||
#define ARC_REG_MCIP_WDATA 0x601
|
||||
#define ARC_REG_MCIP_READBACK 0x602
|
||||
|
@ -36,10 +37,14 @@ struct mcip_cmd {
|
|||
#define CMD_SEMA_RELEASE 0x12
|
||||
|
||||
#define CMD_DEBUG_SET_MASK 0x34
|
||||
#define CMD_DEBUG_READ_MASK 0x35
|
||||
#define CMD_DEBUG_SET_SELECT 0x36
|
||||
#define CMD_DEBUG_READ_SELECT 0x37
|
||||
|
||||
#define CMD_GFRC_READ_LO 0x42
|
||||
#define CMD_GFRC_READ_HI 0x43
|
||||
#define CMD_GFRC_SET_CORE 0x47
|
||||
#define CMD_GFRC_READ_CORE 0x48
|
||||
|
||||
#define CMD_IDU_ENABLE 0x71
|
||||
#define CMD_IDU_DISABLE 0x72
|
||||
|
|
Loading…
Reference in New Issue