PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/powerpc/include/asm/msi_bitmap.h

http://github.com/mirrors/linux
C Header | 31 lines | 20 code | 7 blank | 4 comment | 0 complexity | 061efe10574a02318bcabe402829cd1c MD5 | raw file
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2#ifndef _POWERPC_SYSDEV_MSI_BITMAP_H
 3#define _POWERPC_SYSDEV_MSI_BITMAP_H
 4
 5/*
 6 * Copyright 2008, Michael Ellerman, IBM Corporation.
 7 */
 8
 9#include <linux/of.h>
10#include <asm/irq.h>
11
12struct msi_bitmap {
13	struct device_node	*of_node;
14	unsigned long		*bitmap;
15	spinlock_t		lock;
16	unsigned int		irq_count;
17	bool		 	bitmap_from_slab;
18};
19
20int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num);
21void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset,
22			    unsigned int num);
23void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq);
24
25int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp);
26
27int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count,
28		     struct device_node *of_node);
29void msi_bitmap_free(struct msi_bitmap *bmp);
30
31#endif /* _POWERPC_SYSDEV_MSI_BITMAP_H */