2005-12-05 20:26:07

by Mark Underwood

[permalink] [raw]
Subject: [PATCH] [SPI] build as module and fix priority inversion problem

Sorry, made a bit of a mess with the last e-mail :(. Trying again :)

This patch fix's the possible priority inversion that vitaly pointed out and allows the driver to
be built as a module.

David, please can you test this patch. Can you also submit a patch which adds the module author,
description and license please, thanks. Kconfig | 2 +-

spi.c | 23 ++++++++++++++++++-----
2 files changed, 19 insertions(+), 6 deletions(-)





___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com


Attachments:
spi-dir.patch (2.14 kB)
1747405766-spi-dir.patch

2005-12-05 22:28:30

by David Brownell

[permalink] [raw]
Subject: Re: [PATCH] [SPI] build as module and fix priority inversion problem

On Monday 05 December 2005 12:26 pm, Mark Underwood wrote:
> Sorry, made a bit of a mess with the last e-mail :(. Trying again :)
>
> This patch fix's the possible priority inversion that vitaly pointed out

That part looks OK to me, though I don't have time to test it just.
It's the change to "use kmalloc if we must".

I'd like to see you split that part out so it can be merged into the
next MM kernel. (I don't know when that is, but I'd guess RSN.)


> and allows the driver to be built as a module.

That part won't work right. Remember, the spi_board_info setup
must be safe to call from arch_init() code; that support needs
to be statically linked. The full patch for this would split
those parts into a separate file, and expose some internal hooks
to the module. (Like maybe the struct boardinfo type, and the
board_list of instances, and the lock protecting that list.)

- Dave