mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Thomas Gleixner](/assets/img/avatar_default.png)
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 315 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
867 B
C
31 lines
867 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef _POWERPC_SYSDEV_MSI_BITMAP_H
|
|
#define _POWERPC_SYSDEV_MSI_BITMAP_H
|
|
|
|
/*
|
|
* Copyright 2008, Michael Ellerman, IBM Corporation.
|
|
*/
|
|
|
|
#include <linux/of.h>
|
|
#include <asm/irq.h>
|
|
|
|
struct msi_bitmap {
|
|
struct device_node *of_node;
|
|
unsigned long *bitmap;
|
|
spinlock_t lock;
|
|
unsigned int irq_count;
|
|
bool bitmap_from_slab;
|
|
};
|
|
|
|
int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num);
|
|
void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset,
|
|
unsigned int num);
|
|
void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq);
|
|
|
|
int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp);
|
|
|
|
int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count,
|
|
struct device_node *of_node);
|
|
void msi_bitmap_free(struct msi_bitmap *bmp);
|
|
|
|
#endif /* _POWERPC_SYSDEV_MSI_BITMAP_H */
|