ipi.c (4f2c0a4acffbec01079c28f839422e64ddeff004) ipi.c (feabecaff5902f896531dde90646ca5dfa9d4f7d)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2015 Imagination Technologies Ltd
4 * Author: Qais Yousef <qais.yousef@imgtec.com>
5 *
6 * This file contains driver APIs to the IPI subsystem.
7 */
8

--- 174 unchanged lines hidden (view full) ---

183
184 return data ? irqd_to_hwirq(data) : INVALID_HWIRQ;
185}
186EXPORT_SYMBOL_GPL(ipi_get_hwirq);
187
188static int ipi_send_verify(struct irq_chip *chip, struct irq_data *data,
189 const struct cpumask *dest, unsigned int cpu)
190{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2015 Imagination Technologies Ltd
4 * Author: Qais Yousef <qais.yousef@imgtec.com>
5 *
6 * This file contains driver APIs to the IPI subsystem.
7 */
8

--- 174 unchanged lines hidden (view full) ---

183
184 return data ? irqd_to_hwirq(data) : INVALID_HWIRQ;
185}
186EXPORT_SYMBOL_GPL(ipi_get_hwirq);
187
188static int ipi_send_verify(struct irq_chip *chip, struct irq_data *data,
189 const struct cpumask *dest, unsigned int cpu)
190{
191 const struct cpumask *ipimask = irq_data_get_affinity_mask(data);
191 const struct cpumask *ipimask;
192
192
193 if (!chip || !ipimask)
193 if (!chip || !data)
194 return -EINVAL;
195
196 if (!chip->ipi_send_single && !chip->ipi_send_mask)
197 return -EINVAL;
198
199 if (cpu >= nr_cpu_ids)
200 return -EINVAL;
201
194 return -EINVAL;
195
196 if (!chip->ipi_send_single && !chip->ipi_send_mask)
197 return -EINVAL;
198
199 if (cpu >= nr_cpu_ids)
200 return -EINVAL;
201
202 ipimask = irq_data_get_affinity_mask(data);
203 if (!ipimask)
204 return -EINVAL;
205
202 if (dest) {
203 if (!cpumask_subset(dest, ipimask))
204 return -EINVAL;
205 } else {
206 if (!cpumask_test_cpu(cpu, ipimask))
207 return -EINVAL;
208 }
209 return 0;

--- 132 unchanged lines hidden ---
206 if (dest) {
207 if (!cpumask_subset(dest, ipimask))
208 return -EINVAL;
209 } else {
210 if (!cpumask_test_cpu(cpu, ipimask))
211 return -EINVAL;
212 }
213 return 0;

--- 132 unchanged lines hidden ---