linux/arch/powerpc
Michael Ellerman 7e302869e0 powerpc: Split-out common MSI bitmap logic into msi_bitmap.c
There are now two almost identical implementations of an MSI bitmap
allocator, one in mpic_msi.c and the other in fsl_msi.c.

Merge them together and put the result in msi_bitmap.c.  Some of the
MPIC bits will remain to provide a nicer interface for the MPIC users.

In the process we fix two buglets.  The first is that the allocation
routines, now msi_bitmap_alloc_hwirqs(), returned an unsigned result,
even though they use -1 to indicate allocation failure.  Although all
the callers were checking correctly, it is much better for the routine
to just return an int.  At least until someone wants > ~2 billion MSIs.

The second buglet is that the device tree reservation logic only
allowed power-of-two reservations.  AFAICT that didn't effect any
existing code but it's nicer if we can reserve arbitrary irqs from MSI
use.

We also add some selftests, which exposed the two buglets and now test
for them, as well as some basic sanity tests.  The tests are only built
when CONFIG_DEBUG_KERNEL=y.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-08-20 16:34:57 +10:00
..
boot Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-08-11 10:40:28 -07:00
configs powerpc/4xx: Update defconfig files for 2.6.27-rc1 2008-08-06 07:55:37 -04:00
include/asm powerpc: Split-out common MSI bitmap logic into msi_bitmap.c 2008-08-20 16:34:57 +10:00
kernel powerpc: Replace __FUNCTION__ with __func__ 2008-08-20 16:34:57 +10:00
kvm KVM: ppc: fix invalidation of large guest pages 2008-07-27 12:02:05 +03:00
lib powerpc: Remove use of CONFIG_PPC_MERGE 2008-08-04 13:18:17 +10:00
math-emu powerpc: Add macros to access floating point registers in thread_struct. 2008-07-01 11:28:43 +10:00
mm powerpc: Guard htab_dt_scan_hugepage_blocks appropriately 2008-08-20 16:34:57 +10:00
oprofile on_each_cpu(): kill unused 'retry' parameter 2008-06-26 11:24:38 +02:00
platforms powerpc: Guard print_device_node_tree() with #if 0 2008-08-20 16:34:57 +10:00
sysdev powerpc: Split-out common MSI bitmap logic into msi_bitmap.c 2008-08-20 16:34:57 +10:00
xmon Merge branch 'linux-2.6' 2008-06-30 10:16:50 +10:00
Kconfig mm: Make generic weak get_user_pages_fast and EXPORT_GPL it 2008-08-12 17:52:53 +10:00
Kconfig.debug powerpc: Split-out common MSI bitmap logic into msi_bitmap.c 2008-08-20 16:34:57 +10:00
Makefile powerpc/bootwrapper: Add documentation of boot wrapper targets 2008-07-04 00:59:03 -06:00