irq.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) irq.c (8633186209e35dfafc27c3d0f0d5e702ab47265f)
1/*
2 * Copyright 2014 IBM Corp.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */

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

88static irqreturn_t schedule_cxl_fault(struct cxl_context *ctx, u64 dsisr, u64 dar)
89{
90 ctx->dsisr = dsisr;
91 ctx->dar = dar;
92 schedule_work(&ctx->fault_work);
93 return IRQ_HANDLED;
94}
95
1/*
2 * Copyright 2014 IBM Corp.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */

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

88static irqreturn_t schedule_cxl_fault(struct cxl_context *ctx, u64 dsisr, u64 dar)
89{
90 ctx->dsisr = dsisr;
91 ctx->dar = dar;
92 schedule_work(&ctx->fault_work);
93 return IRQ_HANDLED;
94}
95
96static irqreturn_t cxl_irq(int irq, void *data, struct cxl_irq_info *irq_info)
96irqreturn_t cxl_irq(int irq, void *data, struct cxl_irq_info *irq_info)
97{
98 struct cxl_context *ctx = data;
99 u64 dsisr, dar;
100
101 dsisr = irq_info->dsisr;
102 dar = irq_info->dar;
103
104 trace_cxl_psl_irq(ctx, irq, dsisr, dar);

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

286}
287
288void cxl_unmap_irq(unsigned int virq, void *cookie)
289{
290 free_irq(virq, cookie);
291 irq_dispose_mapping(virq);
292}
293
97{
98 struct cxl_context *ctx = data;
99 u64 dsisr, dar;
100
101 dsisr = irq_info->dsisr;
102 dar = irq_info->dar;
103
104 trace_cxl_psl_irq(ctx, irq, dsisr, dar);

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

286}
287
288void cxl_unmap_irq(unsigned int virq, void *cookie)
289{
290 free_irq(virq, cookie);
291 irq_dispose_mapping(virq);
292}
293
294static int cxl_register_one_irq(struct cxl *adapter,
295 irq_handler_t handler,
296 void *cookie,
297 irq_hw_number_t *dest_hwirq,
298 unsigned int *dest_virq,
299 const char *name)
294int cxl_register_one_irq(struct cxl *adapter,
295 irq_handler_t handler,
296 void *cookie,
297 irq_hw_number_t *dest_hwirq,
298 unsigned int *dest_virq,
299 const char *name)
300{
301 int hwirq, virq;
302
303 if ((hwirq = cxl_alloc_one_irq(adapter)) < 0)
304 return hwirq;
305
306 if (!(virq = cxl_map_irq(adapter, hwirq, handler, cookie, name)))
307 goto err;

--- 221 unchanged lines hidden ---
300{
301 int hwirq, virq;
302
303 if ((hwirq = cxl_alloc_one_irq(adapter)) < 0)
304 return hwirq;
305
306 if (!(virq = cxl_map_irq(adapter, hwirq, handler, cookie, name)))
307 goto err;

--- 221 unchanged lines hidden ---