irqchip updates for 5.4, take 2

- Sifive PLIC: force driver to skip non-relevant contexts
 - GICv4: Don't send VMOVP commands to ITSs that don't have
   this vPE mapped
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAl2y1PUPHG1hekBrZXJu
 ZWwub3JnAAoJECPQ0LrRPXpDz54P+wQaHlsTcA6vqI5L3BobmQawzY8la9qKqEOu
 nAM2ni8/3hU4Q/VIYySrgK/qIlrrUYHWCvvInlEPQLsU/XiQnUfQfwFkQKAvsw1C
 JCPTtrO6WBBvOr2uPGDD4Y/6/AvK2Ff1x3BC9JPdBOJKuNn/8YI0iKoz4jEGTAi4
 9JRQIG+jwAPZ7BytRqJtVg54O3F7ukCNY8vFLL7Ej2getJgRZcZuho2ENx/F0iID
 bN9o2z+IOtgcG2sumjlcDx8VX6+aNVaHHcWDKLTkMddznBggksvyCoZgeZgKxSt0
 CSM5Ol1SS9UtswtKvxLt9aRqjoSm9GxggvKc2VbFMtuLqcNSUHwtu0TYNxbBFkuY
 EEXDLYAUVMcU2S2C45V6rOotOrNfXvJm70bMwXE1Zd6FnwHsmT2zRMU2D9Bl3Pxb
 vJSbZlo662aHWIVob5vyRt+XrJF5nte9S6tkl2UJU0uf/m7BH+4bBZ6J/lER5xEM
 RQWt3kkSK8TRAwI8t8ZhC7XVQjcBa5ASocttd6tgmAlZdgpClWI2yuViR7tfLWZA
 YlotswT9vuBdgkzbwTxV7xTTDQSfvggqqkvvunlUdXPUUChb/UWN3iAaxZ1RBnuY
 ZJzEjUuvU5Md1umtvqNOPawsX/pxWjWh3CDuOUZNgz8OLAZXIdoTD2K9G0HeoYo2
 riv2dfSd
 =9wMN
 -----END PGP SIGNATURE-----

Merge tag 'irqchip-fixes-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent

Pull the second lot of irqchip updates for 5.4 from Marc Zyngier:

- Sifive PLIC: force driver to skip non-relevant contexts
- GICv4: Don't send VMOVP commands to ITSs that don't have
  this vPE mapped
This commit is contained in:
Thomas Gleixner 2019-10-25 14:25:15 +02:00
Родитель 7d194c2100 41860cc447
Коммит 1486b7b42b
2 изменённых файлов: 20 добавлений и 5 удалений

Просмотреть файл

@ -175,6 +175,22 @@ static DEFINE_IDA(its_vpeid_ida);
#define gic_data_rdist_rd_base() (gic_data_rdist()->rd_base) #define gic_data_rdist_rd_base() (gic_data_rdist()->rd_base)
#define gic_data_rdist_vlpi_base() (gic_data_rdist_rd_base() + SZ_128K) #define gic_data_rdist_vlpi_base() (gic_data_rdist_rd_base() + SZ_128K)
static u16 get_its_list(struct its_vm *vm)
{
struct its_node *its;
unsigned long its_list = 0;
list_for_each_entry(its, &its_nodes, entry) {
if (!its->is_v4)
continue;
if (vm->vlpi_count[its->list_nr])
__set_bit(its->list_nr, &its_list);
}
return (u16)its_list;
}
static struct its_collection *dev_event_to_col(struct its_device *its_dev, static struct its_collection *dev_event_to_col(struct its_device *its_dev,
u32 event) u32 event)
{ {
@ -976,17 +992,15 @@ static void its_send_vmapp(struct its_node *its,
static void its_send_vmovp(struct its_vpe *vpe) static void its_send_vmovp(struct its_vpe *vpe)
{ {
struct its_cmd_desc desc; struct its_cmd_desc desc = {};
struct its_node *its; struct its_node *its;
unsigned long flags; unsigned long flags;
int col_id = vpe->col_idx; int col_id = vpe->col_idx;
desc.its_vmovp_cmd.vpe = vpe; desc.its_vmovp_cmd.vpe = vpe;
desc.its_vmovp_cmd.its_list = (u16)its_list_map;
if (!its_list_map) { if (!its_list_map) {
its = list_first_entry(&its_nodes, struct its_node, entry); its = list_first_entry(&its_nodes, struct its_node, entry);
desc.its_vmovp_cmd.seq_num = 0;
desc.its_vmovp_cmd.col = &its->collections[col_id]; desc.its_vmovp_cmd.col = &its->collections[col_id];
its_send_single_vcommand(its, its_build_vmovp_cmd, &desc); its_send_single_vcommand(its, its_build_vmovp_cmd, &desc);
return; return;
@ -1003,6 +1017,7 @@ static void its_send_vmovp(struct its_vpe *vpe)
raw_spin_lock_irqsave(&vmovp_lock, flags); raw_spin_lock_irqsave(&vmovp_lock, flags);
desc.its_vmovp_cmd.seq_num = vmovp_seq_num++; desc.its_vmovp_cmd.seq_num = vmovp_seq_num++;
desc.its_vmovp_cmd.its_list = get_its_list(vpe->its_vm);
/* Emit VMOVPs */ /* Emit VMOVPs */
list_for_each_entry(its, &its_nodes, entry) { list_for_each_entry(its, &its_nodes, entry) {

Просмотреть файл

@ -252,8 +252,8 @@ static int __init plic_init(struct device_node *node,
continue; continue;
} }
/* skip context holes */ /* skip contexts other than supervisor external interrupt */
if (parent.args[0] == -1) if (parent.args[0] != IRQ_S_EXT)
continue; continue;
hartid = plic_find_hart_id(parent.np); hartid = plic_find_hart_id(parent.np);