aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-08-06sound/oss: Adjust confusing if indentationJulia Lawall1-1/+1
Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-06sound: oss: au1550_ac97.c removed duplicated #includeAndrea Gelmini1-1/+0
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-05Merge branch 'topic/misc' into for-linusTakashi Iwai56-612/+991
2010-08-05Merge branch 'topic/asoc' into for-linusTakashi Iwai127-659/+9110
2010-08-05Merge branch 'topic/hda' into for-linusTakashi Iwai13-147/+897
2010-08-04ALSA: hda - Add pin-fix for HP dc5750Takashi Iwai1-0/+29
The NID 0x11 on HP dc5750 with ALC260 should be a speaker although BIOS gives it as a line-out. This patch adds a quirk to fix the pin config so that the real line-out is used properly. Reference: bnc#624118 https://bugzilla.novell.com/show_bug.cgi?id=624118 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04ALSA: als4000: Fix potentially invalid DMA mode setupOndrej Zary1-1/+1
My previous patch assumed that the DMA mode (represented by 3 lowest bits of ALS4K_GCR99_DMA_EMULATION_CTRL register) is set to the default value 0. If that's not the case, it might result in invalid mode to be set. This patch fixes this potential problem. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04ALSA: als4000: enable burst modeOndrej Zary1-2/+2
Enable burst mode to prevent dropouts during high PCI bus usage. The card is useless in X without this because of dropouts when anything moves on the screen (at least with PCI VGA card). Enabling this is also recommended by the datasheet (page 48). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04ALSA: hda - Fix initial capsrc selection in patch_alc269()Takashi Iwai1-11/+16
In patch_alc269(), we initialize the primary capsrc so that the device works from the beginning. It issues CONNECT_SEL verb no matter which widget is although some widget (e.g. 0x23) has no connection selection but a mixer, which requires unmuting instead. This patch fixes the initialization of capsrc by re-using the code as a helper function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04ASoC: TWL4030: Capture route runtime DAPM ordering fixPeter Ujfalusi1-36/+12
Fix the ordering problem in DAPM domain, when the user changes between digital and analog sources during active capture (or loopback) scenario. Before this patch, when the user changed from analog source to digital there were a short time, when the codec enabled analog mic bias (2.2 volts) instead of the correct digital mic bias (1.8 volts) to the digital microphones. This behaviour caused by the former implementation of selecting the correct type of bias. This was done at the POST_REG event of the DAPM_MUX_E("TXx Capture Route") widget. By moving the bias type selection as DAPM_SUPPLY and connecting it to the corresponding digimic widget the problematic situation can be avoided. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-03ALSA: hda - Add PC-beep whitelist for an Intel boardTakashi Iwai1-0/+1
An Intel board needs a white-list entry to enable PC-beep. Otherwise the driver misdetects (due to bogus BIOS info) and ignores the PC-beep on 2.6.35. Reported-and-tested-by: Leandro Lucarella <luca@llucax.com.ar> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - More relax for pending period handlingTakashi Iwai1-1/+1
Since the pending periods are often bogus and take long time until actually processed, it often results in a high CPU usage of the hd-audio workq. Overall it's better to have low CPU consumption by avoiding a too tight loop rather than the wake-up timing accuracy. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Define AC_FMT_* constantsTakashi Iwai3-21/+50
Define constants for the HD-audio stream format bits, and replace the magic numbers in codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecsDaniel J Blueman1-1/+11
Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs. These codecs use the standard beep frequency calculation although the datasheet says it's linear frequency. Other IDT/STAC codecs might have the same problem. They should be fixed individually later. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Add support for HDMI HBR passthroughAnssi Hannula4-5/+44
Passing IEC 61937 encapsulated compressed audio at bitrates over 6.144 Mbps (i.e. more than a single 2-channel 16-bit 192kHz IEC 60958 link) over HDMI requires the use of HBR Audio Stream Packets instead of Audio Sample Packets. Enable HBR mode when the stream has 8 channels and the Non-PCM bit is set. If the audio converter is not connected to any HBR-capable pins, return -EINVAL in prepare(). Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Set Stream Type in Stream Format according to AES0Anssi Hannula3-3/+9
Set bit 15 (Stream Type) of HDA Stream Format to 1 (Non-PCM) when IEC958 channel status bit 1 (AES0 & 0x02) is set to 1 (non-audio). This is a prequisite for HDMI HBR passthrough. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposedJerone Young1-1/+6
Just as with the X301. The X300 does not have a way to do SPDIF either. It does not have a dock connector, nor does it have the SPDIF through the headphone jack. This patch fixes it so X300 does not show SPDIF, since it cannot do it. To add all Lenovo Thinkpads had different codec subsytem IDs: X300: http://launchpadlibrarian.net/34862838/Card0.Codecs.codec.0.txt Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIFJerone Young1-0/+4
The Lenovo X301 does not have the ability to connect to a docking station to use the SPDIF port. It also does not have the ability to do SPDIF though the headphone jack or Display Port jacks. This patch fixes it so this is not exposed for the X301 and users do think it has the ability to do SPDIF. I tested both headphone & display port jacks and it is not there. I have tested this patch and it works great. Also to add the other Thinkpads have different subsystem codec IDs. Here are examples: X301: http://launchpadlibrarian.net/31561902/Card0.Codecs.codec.0.txt X200: http://launchpadlibrarian.net/49055036/Card0.Codecs.codec.0.txt W500: http://launchpadlibrarian.net/36276057/Card0.Codecs.codec.0.txt Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03ASoC: wm9081: fix resource reclaim in wm9081_register error pathAxel Lin1-5/+6
This patch fixes the error path in wm9081_register to properly free resources. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8978: fix a memory leak if a wm8978_register failAxel Lin1-3/+7
There is a memory leak found if wm8978_register() fail. This patch moves the buffer allocate and release at the same level to prevent the memory leak. Signed-off-by: Axel Lin <axel.lin@gmail.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8974: fix a memory leak if another WM8974 is registeredAxel Lin1-1/+2
wm8974 is allocated in wm8974_i2c_probe() but is not freed if wm8974_register() return -EINVAL (if another WM8974 is registered). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8961: fix resource reclaim in wm8961_register error pathAxel Lin1-4/+5
This patch fixes the error path in wm8961_register to properly free resources. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8955: fix resource reclaim in wm8955_register error pathAxel Lin1-4/+6
This patch fixes the error path in wm8955_register to properly free resources. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8940: fix a memory leak if wm8940_register return errorAxel Lin1-1/+6
This patch adds checking for wm8940_register return value, and does kfree(wm8940) if wm8940_register() fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8904: fix resource reclaim in wm8904_register error pathAxel Lin1-5/+8
This patch includes below fixes: 1. wm8904 need to be kfreed in wm8904_register() error path before return. 2. fix the error path for snd_soc_register_codec() fail and snd_soc_register_dai() fail to properly free resources. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8711: fix a memory leak if another WM8711 is registeredAxel Lin1-1/+2
wm8711 is allocated in either wm8711_spi_probe() or wm8711_i2c_probe() but is not freed if wm8711_register() return -EINVAL(if another ad1836 is registered). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: wm8523: fix resource reclaim in wm8523_register error pathAxel Lin1-4/+6
This patch includes below fixes: 1. If another WM8523 is registered, need to kfree wm8523 before return -EINVAL. 2. If snd_soc_register_codec failed, goto error path to properly free resources. 3. Instead of using mixed in-line and goto style cleanup, use goto style error handling if snd_soc_register_dai failed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: da7210: fix a memory leak if failed to initialise da7210 audio codecAxel Lin1-2/+6
da7210 should be kfreed if da7210_init() return error. This patch also fixes the error handing in the case of snd_soc_register_dai() fail by adding snd_soc_unregister_codec() in error path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: ak4642: fix a memory leak if failed to initialise AK4642Axel Lin1-1/+3
ak4642 should be kfreed if ak4642_init() return error. Signed-off-by: Axel Lin <axel.lin@gmail.com> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: ad1836: fix a memory leak if another ad1836 is registeredAxel Lin1-0/+1
ad1836 is allocated in ad1836_spi_probe() but is not freed if ad1836_register() return -EINVAL (if another ad1836 is registered). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Barry Song <21cnbao@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03ASoC: Initial WM8741 CODEC driverIan Lartey4-0/+799
The WM8741 is a very high performance stereo DAC designed for audio applications such as professional recording systems, A/V receivers and high specification CD, DVD and home theatre systems. The device supports PCM data input word lengths from 16 to 32-bits and sampling rates up to 192kHz. The WM8741 also supports DSD bit-stream data format, in both direct DSD and PCM-converted DSD modes. TODO: Expand wm8741_set_dai_sysclk and rate_constraint members to allow for all supported sample rate / Master Clock frequency combinations. Fully enable control of supplies. Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-02ALSA: hda - Do not try to create speaker NIDs for ALC268 if there aren't anyDavid Henningsson1-1/+1
Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-02Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asocTakashi Iwai4-108/+158
2010-08-02ASoC: omap-mcbsp: Remove period size constraint in THRESHOLD modePeter Ujfalusi1-39/+4
The use of sDMA packet mode in THRESHOLD mode removes the restriction on the period size. With the extended THRESHOLD mode user space can ask for any period size it wishes, and the driver will configure the sDMA and McBSP FIFO accordingly. Replace the hw_rule for the period size with static constraint, which will make sure that the period size will be always even (to avoid prime period size, which could be possible in mono stream) Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02ASoC: omap-mcbsp: Support for sDMA packet modePeter Ujfalusi1-6/+56
Utilize the sDMA controller's packet syncronization mode, when the McBSP FIFO is in use (by extending the THRESHOLD mode). When the sDMA is configured for packet mode, the sDMA frame size does not need to match with the McBSP threshold configuration. Uppon DMA request the sDMA will transfer packet size number of words, and still trigger interrupt on frame boundary. The patch extends the original THRESHOLD mode by doing the following: if (period_words <= max_threshold) Current THRESHOLD mode configuration Otherwise (period_words > max_threshold) McBSP threshold = sDMA packet size sDMA frame size = period size With the extended THRESHOLD mode we can remove the constraint for the maximum period size, since if the period size is bigger than the maximum allowed threshold, than the driver will switch to packet mode, and picks the best (biggest) threshold value, which can divide evenly the period size. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02ASoC: omap-mcbsp: Code cleanup in omap_mcbsp_dai_hw_paramsPeter Ujfalusi1-9/+12
To make the code a bit more readable, change the indexed references to the omap_mcbsp_dai_dma_params elements with pointer. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02ASoC: omap-mcbsp: Restructure the code within omap_mcbsp_dai_hw_paramsPeter Ujfalusi1-14/+11
In preparation for the extended threshold mode (sDMA packet mode support), the code need to be restructured. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02ALSA: usb - Correct audio problem for Hauppage HVR-850 and others rel. to urb data alignJohn S Gruber1-8/+22
Match usb ids in usb/quirks-table.h for some Hauppage HVR-950Q models and for the HVR850 model to those ids at the end of au0828-cards.c Thanks to nhJm449 for pointing out the problem. Signed-off-by: John S Gruber <JohnSGruber@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-01Linux 2.6.35Linus Torvalds1-1/+1
2010-08-01NFS: Fix a typo in include/linux/nfs_fs.hTrond Myklebust2-5/+6
nfs_commit_inode() needs to be defined irrespectively of whether or not we are supporting NFSv3 and NFSv4. Allow the compiler to optimise away code in the NFSv2-only case by converting it into an inlined stub function. Reported-and-tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-30Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds11-49/+75
* master.kernel.org:/home/rmk/linux-2.6-arm: cyber2000fb: fix console in truecolor modes cyber2000fb: fix machine hang on module load SA1111: Eliminate use after free ARM: Fix Versatile/Realview/VExpress MMC card detection sense ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_vipt ARM: Add barriers to io{read,write}{8,16,32} accessors as well ARM: 6273/1: Add barriers to the I/O accessors if ARM_DMA_MEM_BUFFERABLE ARM: 6272/1: Convert L2x0 to use the IO relaxed operations ARM: 6271/1: Introduce *_relaxed() I/O accessors ARM: 6275/1: ux500: don't use writeb() in uncompress.h ARM: 6270/1: clean files in arch/arm/boot/compressed/ ARM: Fix csum_partial_copy_from_user()
2010-07-30Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds4-11/+32
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFS: Ensure that writepage respects the nonblock flag NFS: kswapd must not block in nfs_release_page nfs: include space for the NUL in root path
2010-07-30Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6Linus Torvalds2-2/+3
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/edid: Fix the HDTV hack sync adjustment drm/radeon/kms: fix radeon mid power profile reporting
2010-07-30mm: fix ia64 crash when gcore reads gate areaHugh Dickins1-3/+13
Debian's ia64 autobuilders have been seeing kernel freeze or reboot when running the gdb testsuite (Debian bug 588574): dannf bisected to 2.6.32 62eede62dafb4a6633eae7ffbeb34c60dba5e7b1 "mm: ZERO_PAGE without PTE_SPECIAL"; and reproduced it with gdb's gcore on a simple target. I'd missed updating the gate_vma handling in __get_user_pages(): that happens to use vm_normal_page() (nowadays failing on the zero page), yet reported success even when it failed to get a page - boom when access_process_vm() tried to copy that to its intermediate buffer. Fix this, resisting cleanups: in particular, leave it for now reporting success when not asked to get any pages - very probably safe to change, but let's not risk it without testing exposure. Why did ia64 crash with 16kB pages, but succeed with 64kB pages? Because setup_gate() pads each 64kB of its gate area with zero pages. Reported-by: Andreas Barth <aba@not.so.argh.org> Bisected-by: dann frazier <dannf@debian.org> Signed-off-by: Hugh Dickins <hughd@google.com> Tested-by: dann frazier <dannf@dannf.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-30CIFS: Remove __exit mark from cifs_exit_dns_resolver()David Howells2-2/+2
Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the module init routine in case of error, and so may have been discarded during linkage. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-30cyber2000fb: fix console in truecolor modesOndrej Zary1-0/+1
Return value was not set to 0 in setcolreg() with truecolor modes. This causes fb_set_cmap() to abort after first color, resulting in blank palette - and blank console in 24bpp and 32bpp modes. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-30cyber2000fb: fix machine hang on module loadOndrej Zary1-0/+2
I was testing two CyberPro 2000 based PCI cards on x86 and the machine always hanged completely when the cyber2000fb module was loaded. It seems that the card hangs when some registers are accessed too quickly after writing RAMDAC control register. With this patch, both card work. Add delay after RAMDAC control register write to prevent hangs on module load. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-30SA1111: Eliminate use after freeJulia Lawall1-3/+2
__sa1111_remove always frees its argument, so the subsequent reference to sachip->saved_state represents a use after free. __sa1111_remove does not appear to use the saved_state field, so the patch simply frees it first. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E,E2; @@ __sa1111_remove(E) ... ( E = E2 | * E ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-30ARM: Fix Versatile/Realview/VExpress MMC card detection senseRussell King3-4/+8
The MMC card detection sense has become really confused with negations at various levels, leading to some platforms not detecting inserted cards. Fix this by converting everything to positive logic throughout, thereby getting rid of these negations. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-30ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_viptGary King1-5/+8
smp_processor_id() must not be called from a preemptible context (this is checked by CONFIG_DEBUG_PREEMPT). kmap_high_l1_vipt() was doing so. This lead to a problem where the wrong per_cpu kmap_high_l1_vipt_depth could be incremented, causing a BUG_ON(*depth <= 0); in kunmap_high_l1_vipt(). The solution is to move the call to smp_processor_id() after the call to preempt_disable(). Originally by: Andrew Howe <ahowe@nvidia.com> Signed-off-by: Gary King <gking@nvidia.com> Acked-by: Nicolas Pitre <nico.as.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>