summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [S390] cio: update sac valuesPeter Oberparleiter2008-12-251-2/+2
| | | | | | | Values for the sac field have changed - update code accordingly. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] cio: get rid of compile warningHeiko Carstens2008-12-251-38/+37
| | | | | | | | | | Move cio_tpi() to the rest of the CONFIG_CCW_CONSOLE functions to get rid of this one: drivers/s390/cio/cio.c:115: warning: 'cio_tpi' defined but not used Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] remove ptrace warning on 31 bit.Martin Schwidefsky2008-12-251-6/+4
| | | | | | | | | | | | | A kernel compile on 31 bit gives the following warnings in ptrace.c: arch/s390/kernel/ptrace.c: In function 'peek_user': arch/s390/kernel/ptrace.c:207: warning: unused variable 'dummy' arch/s390/kernel/ptrace.c: In function 'poke_user': arch/s390/kernel/ptrace.c:315: warning: unused variable 'dummy' Getting rid of the dummy variables removes the warnings. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] __page_to_pfn warningsMartin Schwidefsky2008-12-251-1/+1
| | | | | | | | | | | | For CONFIG_SPARSEMEM_VMEMMAP=y on s390 I get warnings like init/main.c: In function 'start_kernel': init/main.c:641: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'int' The warning can be suppressed with a cast to unsigned long in the CONFIG_SPARSEMEM_VMEMMAP=y version of __page_to_pfn. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] iucv: Locking free version of iucv_message_(receive|send)Hendrik Brueckner2008-12-252-36/+161
| | | | | | | Provide a locking free version of iucv_message_receive and iucv_message_send that do not call local_bh_enable in a spin_lock_(bh|irqsave)() context. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
* [S390] s390/hvc_console: z/VM IUCV hypervisor console supportHendrik Brueckner2008-12-253-0/+861
| | | | | | | | | | | | | | | | | | | | | This patch introduces a new hypervisor console (HVC) back-end that provides terminal access over the z/VM inter-user communication vehicle (IUCV). The z/VM IUCV communication is independent of the regular tcp/ip network and allows access even if there is no network connection between two z/VM guest virtual machines. The z/VM IUCV hypervisor console back-end helps the user to access a z/VM guest virtual machine that lacks of network connectivity; and thus, provides a "full-screen" terminal alternative to 3215/3270 terminal sessions. Use the hvc_iucv=[0..8] kernel boot parameter to specify the number of HVC terminals using a z/VM IUCV back-end. A recent version of the s390-tools package is required to establish a terminal connection to a z/VM IUCV hypervisor console back-end. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] ftrace: function tracer backend for s390Heiko Carstens2008-12-255-0/+76
| | | | | | | | This implements just the basic function tracer (_mcount) backend for s390. The dynamic variant will come later. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2008-12-255-14/+20
| | | | | | | | Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] dasd: call cleanup_cqr with request_queue_lockStefan Haberland2008-12-251-0/+4
| | | | | | | | __dasd_cleanup_cqr should be called with request_queue_lock held and __dasd_block_process_erp with queue_lock Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] dasd: correct sense byte condition for SIMStefan Haberland2008-12-251-1/+1
| | | | | | | | SIM sense data are always 32 bit sense data so sense byte 27 bit 0 has not to be set. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] dasd: Use accessors instead of using driver_data directly.Cornelia Huck2008-12-251-3/+3
| | | | | Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] dasd: improve dasd statistics proc interfaceStefan Haberland2008-12-251-13/+15
| | | | | | | | | | For a large number of I/O requests the values were shifted binary. The shift was not transparent for the user because the shift value was not displayed. To make this interface more human readable the values are shifted decimal and the scale factor is displayed. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] zfcp: Report microcode level through service level interfaceChristof Schmitt2008-12-253-2/+20
| | | | | | | | | | Register zfcp with the new /proc/service_level interface to report the FCP microcode level. When the adapter goes offline or a channel path disappears, zfcp unregisters, since the microcode version might change and zfcp does not know about it. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] service level interface.Martin Schwidefsky2008-12-254-2/+149
| | | | | | | | Add a new proc interface /proc/service_levels that allows any code to report a relevant service level, e.g. the microcode level of devices, the service level of the hypervisor, etc. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] qdio: fix error reporting for hipersocketsJan Glauber2008-12-253-103/+56
| | | | | | | | | | | | | | | | Hipersocket connections can encounter temporary busy conditions. In case of the busy bit set we retry the SIGA operation immediatelly. If the busy condition still persists after 100 ms we fail and report the error to the upper layer. The second stage retry logic is removed. In case of ongoing busy conditions the upper layer needs to reset the connection. The reporting of a SIGA error is now done synchronously to allow the network driver to requeue the buffers. Also no error trace is created for the temporary SIGA errors so the error message view is not flooded. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] qdio: improve inbound buffer acknowledgementJan Glauber2008-12-257-74/+139
| | | | | | | | | | | | | | | - Use automatic acknowledgement of incoming buffers in QEBSM mode - Move ACK for non-QEBSM mode always to the newest buffer to prevent a race with qdio_stop_polling - Remove the polling spinlock, the upper layer drivers return new buffers in the same code path and could not run in parallel - Don't flood the error log in case of no-target-buffer-empty - In handle_inbound we check if we would overwrite an ACK'ed buffer, if so advance the pointer to the oldest ACK'ed buffer so we don't overwrite an empty buffer in qdio_stop_polling Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] qdio: rework debug feature loggingJan Glauber2008-12-257-443/+238
| | | | | | | | | | | | | - make qdio_trace a per device view - remove s390dbf exceptions - remove CONFIG_QDIO_DEBUG, not needed anymore if we check for the level before calling sprintf - use snprintf for dbf entries - add start markers to see if the dbf view wrapped - add a global error view for all queues Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] qdio: fix compile warning under 31 bitJan Glauber2008-12-252-2/+2
| | | | | | | | | | | The QEBSM instructions are only available for CONFIG_64BIT, they are not used under 31 bit. Make compiler happy about the false positive: drivers/s390/cio/qdio_main.c: In function ?qdio_inbound_q_done?: drivers/s390/cio/qdio_main.c:532: warning: ?state? may be used uninitialized in this function Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] qdio: add eqbs/sqbs instruction countersJan Glauber2008-12-253-1/+16
| | | | | | | | | Add counters for the eqbs and sqbs instructions that indicate how often we issued the instructions and how often the instructions returned with less buffers than specified. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] qdio: fix qeth port count detectionJan Glauber2008-12-255-30/+55
| | | | | | | | | | qeth needs to get the port count information before qdio has allocated a page for the chsc operation. Extend qdio_get_ssqd_desc() to store the data in the specified structure. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] ap: Minor code beautification.Christian Maaser2008-12-251-14/+14
| | | | | | | | Changed some symbol names for a better and clearer code. Signed-off-by: Christian Maaser <cmaaser@de.ibm.com> Signed-off-by: Felix Beck <beckf@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] zcrypt: Use of Thin InterruptsFelix Beck2008-12-253-4/+177
| | | | | | | | | When the machine supports AP adapter interrupts polling will be switched off at module initialization and the driver will work in interrupt mode. Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] Move stfle to header file.Heiko Carstens2008-12-252-19/+18
| | | | | | | | stfle will be needed by the ap_bus module to figure out wether the AP queue adapter interruption facility is installed. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] convert s390 to generic IPI infrastructureHeiko Carstens2008-12-254-158/+24
| | | | | | | | Since etr/stp don't need the old smp_call_function semantics anymore we can convert s390 to the generic IPI infrastructure. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] serialize stp/etr workMartin Schwidefsky2008-12-251-5/+18
| | | | | | | | | | | The work function dispatched with schedule_work() can be run twice on different cpus because run_workqueue clears the WORK_STRUCT_PENDING bit and then executes the function. Another cpu can call schedule_work() again and run the work function a second time before the first call is completed. This patch serialized the etr and stp work function with a mutex. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] convert etr/stp to stop_machine interfaceHeiko Carstens2008-12-251-81/+131
| | | | | | | | | | This converts the etr and stp code to the new stop_machine interface which allows to synchronize all cpus without allocating any memory. This way we get rid of the only reason why we haven't converted s390 to the generic IPI interface yet. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] introduce vdso on s390Martin Schwidefsky2008-12-2524-1/+1218
| | | | | | | Add a vdso to speed up gettimeofday and clock_getres/clock_gettime for CLOCK_REALTIME/CLOCK_MONOTONIC. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] arch_setup_additional_pages argumentsMartin Schwidefsky2008-12-258-10/+8
| | | | | | | | | | | | | | | | arch_setup_additional_pages currently gets two arguments, the binary format descripton and an indication if the process uses an executable stack or not. The second argument is not used by anybody, it could be removed without replacement. What actually does make sense is to pass an indication if the process uses the elf interpreter or not. The glibc code will not use anything from the vdso if the process does not use the dynamic linker, so for statically linked binaries the architecture backend can choose not to map the vdso. Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] vmcp: remove BKLChristian Borntraeger2008-12-251-3/+0
| | | | | | | | | | | | The vmcp driver uses the session->mutex for concurrent access of the data structures. Therefore, the BKL in vmcp_open does not protect against any other function in the driver. The BLK in vmcp_open would protect concurrent access to the module init but all necessary steps ave finished before misc_register is called. We can safely remove the lock_kernel from vcmp. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] cpu topology: dont destroy cpu sets on topology changeHeiko Carstens2008-12-251-1/+2
| | | | | | | | | | | Call rebuild_sched_domains instead of arch_reinit_sched_domains if cpu topology changes. This leaves cpu sets alone which otherwise would be destroyed. If and how it makes sense to define cpu sets on a virtualized architecture is another question. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] audit: get s390 ret_from_fork in sync with other architecturesAl Viro2008-12-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On s390 we have ret_from_fork jump not to the "do all work we normally do on return from syscall" as on x86, ppc, etc., but to the "do all such work except audit". Historical reasons - the codepath triggered when we have AUDIT process flag set is separated from the normall one and they converge at sysc_return, which is the common part of post-syscall work. And does not include calling audit_syscall_exit() - that's done in the end of sysc_tracesys path, just before that path jumps to sysc_return. IOW, the child returning from fork()/clone()/vfork() doesn't call audit_syscall_exit() at all, so no matter what we do with its audit context, we are not going to see the audit entry. The fix is simple: have ret_from_fork go to the point just past the call of sys_.... in the 'we have AUDIT flag set' path. There we have (64bit variant; for 31bit the situation is the same): sysc_tracenogo: tm __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) jz sysc_return la %r2,SP_PTREGS(%r15) # load pt_regs larl %r14,sysc_return # return point is sysc_return jg do_syscall_trace_exit which is precisely what we need - check the flag, bugger off to sysc_return if not set, otherwise call do_syscall_trace_exit() and bugger off to sysc_return. r9 has just been properly set by ret_from_fork itself, so we are fine. Tested on s390x, seems to work fine. WARNING: it's been about 16 years since my last contact with 3X0 assembler[1], so additional review would be very welcome. I don't think I've managed to screw it up, but... [1] that *was* in another country and besides, the box is dead... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] cpu topology: fix cpu_core_map initializationHeiko Carstens2008-12-251-4/+4
| | | | | | | | | | | | | Common code doesn't call arch_update_cpu_topology() anymore on cpu hotplug. But our architecture backend relied on that in order to update the cpu_core_map. For machines without cpu topology support this leads uninitialized cpu_core_maps for later on added cpus. To solve this just initialize the maps with cpu_possible_map, since that will be always valid for machines without topology support. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* Linux 2.6.28v2.6.28Linus Torvalds2008-12-241-1/+1
| | | | Happy holidays..
* Merge branch 'for_linus' of ↵Linus Torvalds2008-12-2416-42/+49
|\ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command V4L/DVB (9908a): MAINTAINERS: mark linux-uvc-devel as subscribers only V4L/DVB (9906): v4l2-compat: test for unlocked_ioctl as well. V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204 V4L/DVB (9875): gspca - main: Fix vidioc_s_jpegcomp locking. V4L/DVB (9781): [PATCH] Cablestar 2 I2C retries (fix CableStar2 support) V4L/DVB (9780): dib0700: Stop repeating after user stops pushing button
| * V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to ↵Devin Heitmueller2008-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | VIDIOC_INT_RESET command Fix a NULL pointer dereference that would occur if the video decoder tied to the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver) Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9908a): MAINTAINERS: mark linux-uvc-devel as subscribers onlyJiri Slaby2008-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Posting to linux-uvc-devel is restricted to members. You can subscribe to the list at ... MAINTAINERS | 2 +- Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9906): v4l2-compat: test for unlocked_ioctl as well.Hans Verkuil2008-12-161-1/+1
| | | | | | | | | | | | | | | | | | The v4l_compat_ioctl32() function only tested for the presence of the ioctl op, not for unlocked_ioctl. So it would always return an error when used with drivers that use unlocked_ioctl instead of ioctl. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204Mauro Carvalho Chehab2008-12-169-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the tuner modules were moved to common/tuners, a separate customize option were added for tuners. However, the automatic selection of the tuners were still using the older option. This causes that the automatic selection to fail, if DVB_FE_CUSTOMISE is selected. Also, since those tuners are now under MEDIA_TUNER_CUSTOMIZE menu, if you unset MEDIA_TUNER_CUSTOMIZE, you can't manually select the tuners. This patch fixes this error by replacing DVB_FE_CUSTOMISE by MEDIA_TUNER_CUSTOMIZE on all places were a tuner is selected. The patch were generated by this small script: for i in `find drivers/media -name Kconfig`; do cat $i|perl -ne 's/(MEDIA_TUNER.*)DVB_FE_CUSTOMISE/\1MEDIA_TUNER_CUSTOMIZE/; print $_' >a mv a $i done Also, manually reordered the tuner entries. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9875): gspca - main: Fix vidioc_s_jpegcomp locking.Jim Paris2008-12-161-2/+2
| | | | | | | | | | | | Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9781): [PATCH] Cablestar 2 I2C retries (fix CableStar2 support)Antti Seppälä2008-12-162-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At some point the Flexcop driver was changed to support newer Flexcop cards. These modifications however broke the detection of Cablestar 2 DVB-C cards. The reason is that the earlier version of the driver used to retry unsuccessful i2c operations. The demodulator of Cablestar 2 cards (stv0297) seems to be very dependent on these retries and adding them back fixes Cablestar detection. This patch restores this behaviour for the CableStar2. Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9780): dib0700: Stop repeating after user stops pushing buttonDevin Heitmueller2008-12-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user noticed that there would continue to be 4-6 keypresses even after the user stopped holding down the button. This was because we were not reading the bulk pipe faster than the firmware was injecting information, which would result in a backlog. Make the query interval faster, and increase the number of cycles before we start repeating to compensate. Thanks to Knud Poulsen <knud.poulsen@nokia.com> for pointing this out. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds2008-12-241-0/+1
|\ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: disable X86_PTRACE_BTS
| * | x86: disable X86_PTRACE_BTSIngo Molnar2008-12-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there's a new ptrace arch level feature in .28: config X86_PTRACE_BTS bool "Branch Trace Store" it has broken fork() handling: the old DS area gets copied over into a new task without clearing it. Fixes exist but they came too late: c5dee61: x86, bts: memory accounting bf53de9: x86, bts: add fork and exit handling and are queued up for v2.6.29. This shows that the facility is still not tested well enough to release into a stable kernel - disable it for now and reactivate in .29. In .29 the hardware-branch-tracer will use the DS/BTS facilities too - hopefully resulting in better code. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2008-12-241-0/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Add missing terminators in patch_sigmatel.c
| * | | ALSA: hda - Add missing terminators in patch_sigmatel.cHerton Ronaldo Krzesinski2008-12-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | parisc: disable UP-optimized flush_tlb_mmKyle McMartin2008-12-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flush_tlb_mm's "optimized" uniprocessor case of allocating a new context for userspace is exposing a race where we can suddely return to a syscall with the protection id and space id out of sync, trapping on the next userspace access. Debugged-by: James Bottomley <James.Bottomley@HansenPartnership.com> Tested-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | Merge branch 'drm-fixes' of ↵Linus Torvalds2008-12-231-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon: fix correctness of irq_enabled check for radeon.
| * | | | drm/radeon: fix correctness of irq_enabled check for radeon.Dave Airlie2008-12-231-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This check was introduced with the logic the wrong way around. Fixes regression: http://bugzilla.kernel.org/show_bug.cgi?id=12216 Tested-by: François Valenduc <francois.valenduc@tvcablenet.be> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | edac: fix edac core deadlock when removing a deviceHarry Ciao2008-12-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting an edac device, we have to wait for its edac_dev.work to be completed before deleting the whole edac_dev structure. Since we have no idea which work in current edac_poller's workqueue is the work we are conerned about, we wait for all work in the edac_poller's workqueue to be proceseed. This is done via flush_cpu_workqueue() which inserts a wq_barrier into the tail of the workqueue and then sleeping on the completion of this wq_barrier. The edac_poller will wake up sleepers when it is found. EDAC core creates only one kernel worker thread, edac_poller, to run the works of all current edac devices. They share the same callback function of edac_device_workq_function(), which would grab the mutex of device_ctls_mutex first before it checks the device. This is exactly where edac_poller and rmmod would have a great chance to deadlock. In below call trace of rmmod > ... > edac_device_del_device > edac_device_workq_teardown > flush_workqueue > flush_cpu_workqueue, device_ctls_mutex would have already been grabbed by edac_device_del_device(). So, on one hand rmmod would sleep on the completion of a wq_barrier, holding device_ctls_mutex; on the other hand edac_poller would be blocked on the same mutex when it's running any one of works of existing edac evices(Note, this edac_dev.work is likely to be totally irrelevant to the one that is being removed right now)and never would have a chance to run the work of above wq_barrier to wake rmmod up. edac_device_workq_teardown() should not be called within the critical region of device_ctls_mutex. Just like is done in edac_pci_del_device() and edac_mc_del_mc(), where edac_pci_workq_teardown() and edac_mc_workq_teardown() are called after related mutex are released. Moreover, an edac_dev.work should check first if it is being removed. If this is the case, then it should bail out immediately. Since not all of existing edac devices are to be removed, this "shutting flag" should be contained to edac device being removed. The current edac_dev.op_state can be used to serve this purpose. The original deadlock problem and the solution have been witnessed and tested on actual hardware. Without the solution, rmmod an edac driver would result in below deadlock: root@localhost:/root> rmmod mv64x60_edac EDAC DEBUG: mv64x60_dma_err_remove() EDAC DEBUG: edac_device_del_device() EDAC DEBUG: find_edac_device_by_dev() (hang for a moment) INFO: task edac-poller:2030 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. edac-poller D 00000000 0 2030 2 Call Trace: [df159dc0] [c0071e3c] free_hot_cold_page+0x17c/0x304 (unreliable) [df159e80] [c000a024] __switch_to+0x6c/0xa0 [df159ea0] [c03587d8] schedule+0x2f4/0x4d8 [df159f00] [c03598a8] __mutex_lock_slowpath+0xa0/0x174 [df159f40] [e1030434] edac_device_workq_function+0x28/0xd8 [edac_core] [df159f60] [c003beb4] run_workqueue+0x114/0x218 [df159f90] [c003c674] worker_thread+0x5c/0xc8 [df159fd0] [c004106c] kthread+0x5c/0xa0 [df159ff0] [c0013538] original_kernel_thread+0x44/0x60 INFO: task rmmod:2062 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. rmmod D 0ff2c9fc 0 2062 1839 Call Trace: [df119c00] [c0437a74] 0xc0437a74 (unreliable) [df119cc0] [c000a024] __switch_to+0x6c/0xa0 [df119ce0] [c03587d8] schedule+0x2f4/0x4d8 [df119d40] [c03591dc] schedule_timeout+0xb0/0xf4 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | cgroups: avoid accessing uninitialized data in failure pathLi Zefan2008-12-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If cgroup_get_rootdir() failed, free_cg_links() will be called in the failure path, but tmp_cg_links hasn't been initialized at that time. I introduced this bug in the 2.6.27 merge window. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Cc: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud