android_kernel_xiaomi_sm8350/arch/um
Paolo 'Blaisorblade' Giarrusso dbce706e25 [PATCH] uml: add and use generic hw_controller_type->release
With Chris Wedgwood <cw@f00f.org>

Currently UML must explicitly call the UML-specific
free_irq_by_irq_and_dev() for each free_irq call it's done.

This is needed because ->shutdown and/or ->disable are only called when the
last "action" for that irq is removed.

Instead, for UML shared IRQs (UML IRQs are very often, if not always,
shared), for each dev_id some setup is done, which must be cleared on the
release of that fd.  For instance, for each open console a new instance
(i.e.  new dev_id) of the same IRQ is requested().

Exactly, a fd is stored in an array (pollfds), which is after read by a
host thread and passed to poll().  Each event registered by poll() triggers
an interrupt.  So, for each free_irq() we must remove the corresponding
host fd from the table, which we do via this -release() method.

In this patch we add an appropriate hook for this, and remove all uses of
it by pointing the hook to the said procedure; this is safe to do since the
said procedure.

Also some cosmetic improvements are included.

This is heavily based on some work by Chris Wedgwood, which however didn't
get the patch merged for something I'd call a "misunderstanding" (the need
for this patch wasn't cleanly explained, thus adding the generic hook was
felt as undesirable).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
CC: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21 19:07:32 -07:00
..
drivers [PATCH] uml: add and use generic hw_controller_type->release 2005-06-21 19:07:32 -07:00
include [PATCH] uml: build cleanups 2005-06-13 20:58:43 -07:00
kernel [PATCH] uml: add and use generic hw_controller_type->release 2005-06-21 19:07:32 -07:00
os-Linux [PATCH] uml: compile fixes for gcc 4 2005-06-08 16:21:12 -07:00
scripts [PATCH] uml: build cleanups 2005-06-13 20:58:43 -07:00
sys-i386 [PATCH] uml: stack dump fix 2005-05-28 16:46:13 -07:00
sys-ia64 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys-ppc [PATCH] uml: stack dump fix 2005-05-28 16:46:13 -07:00
sys-x86_64 [PATCH] uml: fixlet for arch_prctl_skas 2005-05-28 16:46:14 -07:00
util [PATCH] uml: cross-build support : mk_task and mk_constants 2005-05-05 16:36:35 -07:00
config.release Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
defconfig [PATCH] uml: support AES i586 crypto driver 2005-05-01 08:58:54 -07:00
Kconfig [PATCH] uml: support AES i586 crypto driver 2005-05-01 08:58:54 -07:00
Kconfig_char [PATCH] uml: make the emulated iomem driver work on 2.6 2005-06-08 16:21:11 -07:00
Kconfig_i386 [PATCH] uml: support AES i586 crypto driver 2005-05-01 08:58:54 -07:00
Kconfig_net Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig_scsi Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig_x86_64 [PATCH] uml: small fixes left over from rc4 2005-05-20 15:48:17 -07:00
Kconfig.debug [PATCH] uml: split CONFIG_FRAME_POINTER from DEBUG_INFO 2005-05-28 16:46:13 -07:00
Makefile [PATCH] uml: remove a dangling symlink 2005-05-05 16:36:38 -07:00
Makefile-i386 [PATCH] uml: cross-build support : mk_thread 2005-05-05 16:36:35 -07:00
Makefile-ia64 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-os-Linux Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-ppc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-skas Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-tt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile-x86_64 [PATCH] uml: cross-build support : mk_thread 2005-05-05 16:36:35 -07:00