mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 00:38:55 +00:00
cb0446c1b6
This reverts commit c822e73731fce3b49a4887140878d084d8a44c08. This commit conflicted with a bitmap allocator change that partially accomplishes the same thing, but which does so more correctly. Revert this one until it can be respun on top of the correct change. Signed-off-by: Scott Wood <scottwood@freescale.com>
36 lines
1008 B
C
36 lines
1008 B
C
#ifndef _POWERPC_SYSDEV_MSI_BITMAP_H
|
|
#define _POWERPC_SYSDEV_MSI_BITMAP_H
|
|
|
|
/*
|
|
* Copyright 2008, Michael Ellerman, IBM Corporation.
|
|
*
|
|
* 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.
|
|
*
|
|
*/
|
|
|
|
#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;
|
|
};
|
|
|
|
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 */
|