summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'efi-urgent' into x86/urgentH. Peter Anvin2013-05-223-8/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid confusing the user by returning -EIO instead of -ENOENT in efivarfs if an EFI variable gets deleted from under us and return EOF when reading from a zero-length file - Lingzhu Xiang * Fix an oops in efivar_update_sysfs_entries() caused by reusing (and therefore corrupting) a kzalloc() allocation - Seiji Aguchi * Initialise the DataSize argument to GetVariable() otherwise it will not be updated with the actual size of the variable on return. Discovered on a Acer Aspire V3 BIOS - Lee, Chun-Yi Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * x86, efi: initial the local variable of DataSize to zeroLee, Chun-Yi2013-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will be better initial the value of DataSize to zero for the input of GetVariable(), otherwise we will feed a random value. The debug log of input DataSize like this: ... [ 195.915612] EFI Variables Facility v0.08 2004-May-17 [ 195.915819] efi: size: 18446744071581821342 [ 195.915969] efi: size': 18446744071581821342 [ 195.916324] efi: size: 18446612150714306560 [ 195.916632] efi: size': 18446612150714306560 [ 195.917159] efi: size: 18446612150714306560 [ 195.917453] efi: size': 18446612150714306560 ... The size' is value that was returned by BIOS. After applied this patch: [ 82.442042] EFI Variables Facility v0.08 2004-May-17 [ 82.442202] efi: size: 0 [ 82.442360] efi: size': 1039 [ 82.443828] efi: size: 0 [ 82.444127] efi: size': 2616 [ 82.447057] efi: size: 0 [ 82.447356] efi: size': 5832 ... Found on Acer Aspire V3 BIOS, it will not return the size of data if we input a non-zero DataSize. Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * efivar: fix oops in efivar_update_sysfs_entries() caused by memory reuseSeiji Aguchi2013-05-131-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop in efivar_update_sysfs_entries() reuses the same allocation for entries each time it calls efivar_create_sysfs_entry(entry). This is wrong because efivar_create_sysfs_entry() expects to keep the memory it was passed, so the caller may not free it (and may not pass the same memory in multiple times). This leads to the oops below. Fix by getting a new allocation each time we go around the loop. ---[ end trace ba4907d5c519d111 ]--- BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8142f81f>] efivar_entry_find+0x14f/0x2d0 PGD 0 Oops: 0000 [#2] SMP Modules linked in: oops(OF+) ebtable_nat ebtables xt_CHECKSUM [...] CPU: 0 PID: 301 Comm: kworker/0:2 Tainted: GF D O 3.9.0+ #1 Hardware name: LENOVO 4291EV7/4291EV7, BIOS 8DET52WW (1.22 ) 09/15/2011 Workqueue: events efivar_update_sysfs_entries task: ffff8801955920c0 ti: ffff88019413e000 task.ti: ffff88019413e000 RIP: 0010:[<ffffffff8142f81f>] [<ffffffff8142f81f>] efivar_entry_find+0x14f/0x2d0 RSP: 0018:ffff88019413fa48 EFLAGS: 00010006 RAX: 0000000000000000 RBX: ffff880195d87c00 RCX: ffffffff81ab6f60 RDX: ffff88019413fb88 RSI: 0000000000000400 RDI: ffff880196254000 RBP: ffff88019413fbd8 R08: 0000000000000000 R09: ffff8800dad99037 R10: ffff880195d87c00 R11: 0000000000000430 R12: ffffffff81ab6f60 R13: fffffffffffff7d8 R14: ffff880196254000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88019e200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000001a0b000 CR4: 00000000000407f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Stack: ffff88019413fb78 ffff88019413fb88 ffffffff81e85d60 03000000972b5c00 ffff88019413fa29 ffffffff81e85d60 ffff88019413fbfb 0000000197087280 00000000000000fe 0000000000000001 ffffffff81e85dd9 ffff880197087280 Call Trace: [<ffffffff81254371>] ? idr_get_empty_slot+0x131/0x240 [<ffffffff8125b6d2>] ? put_dec+0x72/0x90 [<ffffffff81158e40>] ? cache_alloc_refill+0x170/0x2f0 [<ffffffff81430420>] efivar_update_sysfs_entry+0x150/0x220 [<ffffffff8103dd29>] ? efi_call2+0x9/0x70 [<ffffffff8103d787>] ? virt_efi_get_next_variable+0x47/0x1b0 [<ffffffff8115a8df>] ? kmem_cache_alloc_trace+0x1af/0x1c0 [<ffffffff81430033>] efivar_init+0x2c3/0x380 [<ffffffff814302d0>] ? efivar_delete+0xd0/0xd0 [<ffffffff8143111f>] efivar_update_sysfs_entries+0x6f/0x90 [<ffffffff810605f3>] process_one_work+0x183/0x490 [<ffffffff81061780>] worker_thread+0x120/0x3a0 [<ffffffff81061660>] ? manage_workers+0x160/0x160 [<ffffffff8106752e>] kthread+0xce/0xe0 [<ffffffff81067460>] ? kthread_freezable_should_stop+0x70/0x70 [<ffffffff81543c5c>] ret_from_fork+0x7c/0xb0 [<ffffffff81067460>] ? kthread_freezable_should_stop+0x70/0x70 Code: 8d 55 b0 48 8d 45 a0 49 81 ed 28 08 00 00 48 89 95 78 fe [...] RIP [<ffffffff8142f81f>] efivar_entry_find+0x14f/0x2d0 RSP <ffff88019413fa48> CR2: 0000000000000000 ---[ end trace ba4907d5c519d112 ]--- Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Tomoki Sekiyama <tomoki.sekiyama@hds.com> Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * efivarfs: Never return ENOENT from firmware againLingzhu Xiang2013-05-131-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously in 1fa7e69 efi_status_to_err() translated firmware status EFI_NOT_FOUND to -EIO instead of -ENOENT for efivarfs operations to avoid confusion. After refactoring in e14ab23, it is also used in other places where the translation may be unnecessary. So move the translation to efivarfs specific code. Also return EOF for reading zero-length files, which is what users would expect. Cc: Josh Boyer <jwboyer@redhat.com> Cc: Jeremy Kerr <jk@ozlabs.org> Cc: Lee, Chun-Yi <jlee@suse.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Lingzhu Xiang <lxiang@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | x86, range: fix missing merge during add rangeYinghai Lu2013-05-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Christian found v3.9 does not work with E350 with EFI is enabled. [ 1.658832] Trying to unpack rootfs image as initramfs... [ 1.679935] BUG: unable to handle kernel paging request at ffff88006e3fd000 [ 1.686940] IP: [<ffffffff813661df>] memset+0x1f/0xb0 [ 1.692010] PGD 1f77067 PUD 1f7a067 PMD 61420067 PTE 0 but early memtest report all memory could be accessed without problem. early page table is set in following sequence: [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] [ 0.000000] init_memory_mapping: [mem 0x6e600000-0x6e7fffff] [ 0.000000] init_memory_mapping: [mem 0x6c000000-0x6e5fffff] [ 0.000000] init_memory_mapping: [mem 0x00100000-0x6bffffff] [ 0.000000] init_memory_mapping: [mem 0x6e800000-0x6ea07fff] but later efi_enter_virtual_mode try set mapping again wrongly. [ 0.010644] pid_max: default: 32768 minimum: 301 [ 0.015302] init_memory_mapping: [mem 0x640c5000-0x6e3fcfff] that means it fails with pfn_range_is_mapped. It turns out that we have a bug in add_range_with_merge and it does not merge range properly when new add one fill the hole between two exsiting ranges. In the case when [mem 0x00100000-0x6bffffff] is the hole between [mem 0x00000000-0x000fffff] and [mem 0x6c000000-0x6e7fffff]. Fix the add_range_with_merge by calling itself recursively. Reported-by: "Christian König" <christian.koenig@amd.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/CAE9FiQVofGoSk7q5-0irjkBxemqK729cND4hov-1QCBJDhxpgQ@mail.gmail.com Cc: <stable@vger.kernel.org> v3.9 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge tag 'sound-3.10' of ↵Linus Torvalds2013-05-179-37/+53
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A fairly calm update at this time, as seen in the short log, only one fix per person: including, - a few ASoC fixes (da7213 dmic, ux500 AD slot, wm0010 error path) - a copule of HD-audio fixes - a few other misc fixes (MIPS allmodconfig, proc output in usb, old PowerBook support)" * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: proc: use found syncmaxsize to determine feedback format ALSA: hda - Add headset mic support for another Dell machine ALSA: snd-aoa: Add a layout entry for PowerBook6,5 ALSA: hda - Check the activity of the NID to be powered down sound: Fix make allmodconfig on MIPS correctly ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate ASoC: ux500: Swap even/odd AD slot definitions ASoC: wm0010: fix error return code in wm0010_boot()
| * | ALSA: usb-audio: proc: use found syncmaxsize to determine feedback formatTorstein Hegge2013-05-171-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | freqshift is only set for the data endpoint and syncmaxsize is only set for the sync endpoint. This results in a syncmaxsize of zero used in the proc output feedback format calculation, which gives a feedback format incorrectly shown as 8.16 for UAC2 devices. As neither the data nor the sync endpoint gives all the relevant content, output the two combined. Also remove the sync_endpoint "packet size" which is always zero and the sync_endpoint "momentary freq" which is constant. Tested with UAC2 async and UAC1 adaptive, not tested with UAC1 async. Reported-by: B. Zhang <bb.zhang@free.fr> Signed-off-by: Torstein Hegge <hegge@resisty.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Add headset mic support for another Dell machineDavid Henningsson2013-05-161-0/+1
| | | | | | | | | | | | | | | | | | BugLink: https://bugs.launchpad.net/bugs/1180351 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: snd-aoa: Add a layout entry for PowerBook6,5Michael Ellerman2013-05-162-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Either one or a combination of commits 81e5d86 "Register i2c devices from device-tree" and 3a3dd01 "Improve detection of devices from device-tree" broke sound on PowerBook6,5 machines. Fix it by adding an entry to the new driver to match PowerBook6,5 machines. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge tag 'asoc-v3.10-rc1' of ↵Takashi Iwai2013-05-163-22/+23
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.10 A few small driver-specific fixes, none of them especially crippling.
| | * \ Merge remote-tracking branch 'asoc/fix/wm0010' into asoc-linusMark Brown2013-05-141-0/+1
| | |\ \
| | | * | ASoC: wm0010: fix error return code in wm0010_boot()Wei Yongjun2013-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix to return -ENOMEM in the memory malloc of 'out' and 'img_swap' error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * | | Merge remote-tracking branch 'asoc/fix/ux500' into asoc-linusMark Brown2013-05-141-18/+18
| | |\ \ \
| | | * | | ASoC: ux500: Swap even/odd AD slot definitionsFabio Baltieri2013-05-081-18/+18
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AD slots definitions for ab8500 codec were erroneously swapped between even and odd channels. Fix this by swapping the definitions to be coherent with the channel number. Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * | | Merge remote-tracking branch 'asoc/fix/da7213' into asoc-linusMark Brown2013-05-141-4/+4
| | |\ \ \ | | | |_|/ | | |/| |
| | | * | ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rateAxel Lin2013-05-091-4/+4
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When set dmic_samplephase and dmic_clk_rate bits for dmic_cfg, current code checks pdata->dmic_data_sel which is wrong. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
| * | | ALSA: hda - Check the activity of the NID to be powered downTakashi Iwai2013-05-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an inactive path is powered down with spec->power_down_unused flag, we should check the activity of each widget in the path whether it's still referred from any active path. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | sound: Fix make allmodconfig on MIPS correctlyPaul Bolle2013-05-131-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d4702b189c ("sound: Fix make allmodconfig on MIPS") added a (negative) dependency on ISA_DMA_SUPPORT_BROKEN. Since that Kconfig symbol doesn't exist, this dependency will always evaluate to true. Apparently GENERIC_ISA_DMA_SUPPORT_BROKEN was meant to be used here. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2013-05-167-41/+36
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm fixes from Dave Airlie: "Fix for radeon nomodeset regression, old radeon interface cliprects fix, 2 qxl crasher fixes, and a couple of minor cleanups. I may have a new AMD hw support branch next week, its one of those doesn't affect anything existing just adds new support, I'll see how it shapes up and I might ask you to take it, just thought I'd warn in advance." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: drm/radeon: restore nomodeset operation (v2) qxl: fix bug with object eviction and update area drm/qxl: drop active_user_framebuffer as its unneeded qxl: drop unused variable. drm/qxl: fix ioport interactions for kernel submitted commands. drm: remove unused wrapper macros drm/radeon: check incoming cliprects pointer
| * | | drm/radeon: restore nomodeset operation (v2)Dave Airlie2013-05-171-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When UMS was deprecated it removed support for nomodeset commandline we really want this in distro land so we can debug stuff, everyone should fallback to vesa correctly. v2: oops -1 isn't used anymore, restore original behaviour -1 is default, so we can boot with nomodeset on the command line, then use radeon.modeset=1 to override it for debugging later. Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | qxl: fix bug with object eviction and update areaDave Airlie2013-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if the surface is evicted, this validation will happen to the wrong place, I noticed this with other work I was doing, haven't seen it go wrong in practice. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/qxl: drop active_user_framebuffer as its unneededDave Airlie2013-05-172-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a bogus way to figure out what the active framebuffer was, just check if the underlying bo is the primary bo. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | qxl: drop unused variable.Dave Airlie2013-05-172-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | this boolean isn't used anymore so drop it. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/qxl: fix ioport interactions for kernel submitted commands.Dave Airlie2013-05-171-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So qxl has ioports, but it really really really doesn't want you to write to them twice, but if you write and get a signal before the irq arrives to let you know its completed, you have to think ahead and avoid writing another time. However this works fine for update area where really multiple writes aren't the end of the world, however with create primary surface, you can't ever do multiple writes. So this stop internal kernel writes from doing interruptible waits, because otherwise we have no idea if this write is a new one or a continuation of a previous one. virtual hw sucks more than real hw. This fixes lockups and VM crashes when resizing and starting/stopping X. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm: remove unused wrapper macrosDave Airlie2013-05-131-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | We don't use these anymore so nuke them. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/radeon: check incoming cliprects pointerKees Cook2013-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "boxes" parameter points into userspace memory. It should be verified like any other operation against user memory. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | | Merge tag 'pm+acpi-3.10-rc2' of ↵Linus Torvalds2013-05-1626-195/+190
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI fixes from Rafael Wysocki: - intel_pstate driver fixes and cleanups from Dirk Brandewie and Wei Yongjun. - cpufreq fixes related to ARM big.LITTLE support and the cpufreq-cpu0 driver from Viresh Kumar. - Assorted cpufreq fixes from Srivatsa S Bhat, Borislav Petkov, Wolfram Sang, Alexander Shiyan, and Nishanth Menon. - Assorted ACPI fixes from Catalin Marinas, Lan Tianyu, Alex Hung, Jan-Simon Möller, and Rafael J Wysocki. - Fix for a kfree() under spinlock in the PM core from Shuah Khan. - PM documentation updates from Borislav Petkov and Zhang Rui. * tag 'pm+acpi-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (30 commits) cpufreq: Preserve sysfs files across suspend/resume ACPI / scan: Fix memory leak on acpi_scan_init_hotplug() error path PM / hibernate: Correct documentation PM / Documentation: remove inaccurate suspend/hibernate transition lantency statement PM: Documentation update for freeze state cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0) cpufreq, ondemand: Remove leftover debug line PM: Avoid calling kfree() under spinlock in dev_pm_put_subsys_data() cpufreq / kirkwood: don't check resource with devm_ioremap_resource cpufreq / intel_pstate: remove #ifdef MODULE compile fence cpufreq / intel_pstate: Remove idle mode PID cpufreq / intel_pstate: fix ffmpeg regression cpufreq / intel_pstate: use lowest requested max performance cpufreq / intel_pstate: remove idle time and duration from sample and calculations cpufreq: Fix incorrect dependecies for ARM SA11xx drivers cpufreq: ARM big LITTLE: Fix Kconfig entries cpufreq: cpufreq-cpu0: Free parent node for error cases cpufreq: cpufreq-cpu0: defer probe when regulator is not ready cpufreq: Issue CPUFREQ_GOV_POLICY_EXIT notifier before dropping policy refcount cpufreq: governors: Fix CPUFREQ_GOV_POLICY_{INIT|EXIT} notifiers ...
| * \ \ \ Merge branch 'acpi-fixes'Rafael J. Wysocki2013-05-161-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * acpi-fixes: ACPI / scan: Fix memory leak on acpi_scan_init_hotplug() error path
| | * | | | ACPI / scan: Fix memory leak on acpi_scan_init_hotplug() error pathCatalin Marinas2013-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following commit 6b772e8f9 (ACPI: Update PNPID match handling for notify), the acpi_scan_init_hotplug() calls acpi_set_pnp_ids() which allocates acpi_hardware_id and copies a few strings (kstrdup). If the devices does not have hardware_id set, the function exits without freeing the previously allocated ids (and kmemleak complains). This patch calls simply changes 'return' on error to a 'goto out' which calls acpi_free_pnp_ids(). Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Toshi Kani <toshi.kani@hp.com> Tested-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | | | | Merge branch 'pm-cpufreq'Rafael J. Wysocki2013-05-162-6/+5
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pm-cpufreq: cpufreq: Preserve sysfs files across suspend/resume
| | * | | | | cpufreq: Preserve sysfs files across suspend/resumeSrivatsa S. Bhat2013-05-152-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file permissions of cpufreq per-cpu sysfs files are not preserved across suspend/resume because we internally go through the CPU Hotplug path which reinitializes the file permissions on CPU online. But the user is not supposed to know that we are using CPU hotplug internally within suspend/resume (IOW, the kernel should not silently wreck the user-set file permissions across a suspend cycle). Therefore, we need to preserve the file permissions as they are across suspend/resume. The simplest way to achieve that is to just not touch the sysfs files at all - ie., just ignore the CPU hotplug notifications in the suspend/resume path (_FROZEN) in the cpufreq hotplug callback. Reported-by: Robert Jarzmik <robert.jarzmik@intel.com> Reported-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | | | | | Merge branch 'pm-fixes'Rafael J. Wysocki2013-05-145-30/+37
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pm-fixes: PM / hibernate: Correct documentation PM / Documentation: remove inaccurate suspend/hibernate transition lantency statement PM: Documentation update for freeze state PM: Avoid calling kfree() under spinlock in dev_pm_put_subsys_data()
| | * | | | | | PM / hibernate: Correct documentationBorislav Petkov2013-05-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct the meaning of PM_HIBERNATION_PREPARE in the docs. References: http://lkml.kernel.org/r/20130512162717.GA6305@pd.tnic Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | | PM / Documentation: remove inaccurate suspend/hibernate transition lantency ↵Zhang Rui2013-05-141-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement The lantency of the transition from suspend and hibernate is platform-dependent. Thus we should not refer the lantency in the documentation. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | | PM: Documentation update for freeze stateZhang Rui2013-05-143-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | | PM: Avoid calling kfree() under spinlock in dev_pm_put_subsys_data()Shuah Khan2013-05-121-6/+6
| | | |_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix dev_pm_put_subsys_data() so that it doesn't call kfree() under a spinlock and make it return 1 whenever it leaves NULL power.subsys_data (regardless of the reason). Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Reviewed-by: Pavel Machek <pavel@ucw.cz> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | | | | | Merge branch 'acpi-fixes'Rafael J. Wysocki2013-05-147-20/+74
| |\ \ \ \ \ \ | | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acpi-fixes: ACPI / AC: Add sleep quirk for Thinkpad e530 ACPI / EC: Restart transaction even when the IBF flag set ACPI video: ignore BIOS initial backlight value for HP 1000 ACPI: Fix section to __init. Align with usage in acpixf.h ACPI / PM: Move processor suspend/resume to syscore_ops
| | * | | | | ACPI / AC: Add sleep quirk for Thinkpad e530Lan Tianyu2013-05-121-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Thinkpad e530's BIOS notifies the AC device first and then sleeps for certain amount of time before doing real work in the EC event handler (_Qxx): Method (_Q27, 0, NotSerialized) { Notify (AC, 0x80) Sleep (0x03E8) Store (Zero, PWRS) PNOT () } This causes the AC driver to report an outdated AC state to user space, because it reads the state information from the device while the EC handler is sleeping. Introduce a quirk to cause the AC driver to wait in acpi_ac_notify() before calling acpi_ac_get_state() on systems known to have this problem and add Thinkpad e530 to the list of quirky machines (with a 1s delay which has been verified to be sufficient for that machine). [rjw: Changelog] References: https://bugzilla.kernel.org/show_bug.cgi?id=45221 Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | ACPI / EC: Restart transaction even when the IBF flag setLan Tianyu2013-05-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC driver works abnormally with IBF flag always set. IBF means "The host has written a byte of data to the command or data port, but the embedded controller has not yet read it". If IBF is set in the EC status and not cleared, this will cause all subsequent EC requests to fail with a timeout error. Change the EC driver so that it doesn't refuse to restart a transaction if IBF is set in the status. Also increase the number of transaction restarts to 5, as it turns out that 2 is not sufficient in some cases. This bug happens on several different machines (Asus V1S, Dell Latitude E6530, Samsung R719, Acer Aspire 5930G, Sony Vaio SR19VN and others). [rjw: Changelog] References: https://bugzilla.kernel.org/show_bug.cgi?id=14733 References: https://bugzilla.kernel.org/show_bug.cgi?id=15560 References: https://bugzilla.kernel.org/show_bug.cgi?id=15946 References: https://bugzilla.kernel.org/show_bug.cgi?id=42945 References: https://bugzilla.kernel.org/show_bug.cgi?id=48221 Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Cc: All <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | ACPI video: ignore BIOS initial backlight value for HP 1000Alex Hung2013-05-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness. References:: https://bugs.launchpad.net/bugs/1167760 Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | ACPI: Fix section to __init. Align with usage in acpixf.hJan-Simon Möller2013-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes warning during compilation with clang. [rjw: Subject and changelog] Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | | | ACPI / PM: Move processor suspend/resume to syscore_opsRafael J. Wysocki2013-05-123-16/+31
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The system suspend routine of the ACPI processor driver saves the BUS_MASTER_RLD register and its resume routine restores it. However, there can be only one such register in the system and it really should be saved after non-boot CPUs have been offlined and restored before they are put back online during resume. For this reason, move the saving and restoration of BUS_MASTER_RLD to syscore suspend and syscore resume, respectively, and drop the no longer necessary suspend/resume callbacks from the ACPI processor driver. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * | | | | Merge branch 'pm-cpufreq'Rafael J. Wysocki2013-05-1412-138/+72
| |\ \ \ \ \ | | |/ / / / | |/| / / / | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pm-cpufreq: cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0) cpufreq, ondemand: Remove leftover debug line cpufreq / kirkwood: don't check resource with devm_ioremap_resource cpufreq / intel_pstate: remove #ifdef MODULE compile fence cpufreq / intel_pstate: Remove idle mode PID cpufreq / intel_pstate: fix ffmpeg regression cpufreq / intel_pstate: use lowest requested max performance cpufreq / intel_pstate: remove idle time and duration from sample and calculations cpufreq: Fix incorrect dependecies for ARM SA11xx drivers cpufreq: ARM big LITTLE: Fix Kconfig entries cpufreq: cpufreq-cpu0: Free parent node for error cases cpufreq: cpufreq-cpu0: defer probe when regulator is not ready cpufreq: Issue CPUFREQ_GOV_POLICY_EXIT notifier before dropping policy refcount cpufreq: governors: Fix CPUFREQ_GOV_POLICY_{INIT|EXIT} notifiers cpufreq: ARM big LITTLE: Improve print message cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found cpufreq: ARM big LITTLE DT: Return correct transition latency cpufreq: ARM big LITTLE: Select PM_OPP
| | * | | cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)Wei Yongjun2013-05-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use vzalloc() instead of vmalloc() and memset(0). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | cpufreq, ondemand: Remove leftover debug lineBorislav Petkov2013-05-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't see how the virtual address of the tuners pointer would be of any help to anyone so remove it. Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | cpufreq / kirkwood: don't check resource with devm_ioremap_resourceWolfram Sang2013-05-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | cpufreq / intel_pstate: remove #ifdef MODULE compile fenceDirk Brandewie2013-05-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver can no longer be built as a module remove the compile fence around cpufreq tracing call. Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | cpufreq / intel_pstate: Remove idle mode PIDDirk Brandewie2013-05-121-49/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dead code from the driver. Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | cpufreq / intel_pstate: fix ffmpeg regressionDirk Brandewie2013-05-121-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ffmpeg benchmark in the phoronix test suite has threads on multiple cores that rely on the progress on of threads on other cores and ping pong back and forth fast enough to make the core appear less busy than it "should" be. If the core has been at minimum p-state for a while bump the pstate up to kick the core to see if it is in this ping pong state. If the core is truly idle the p-state will be reduced at the next sample time. If the core makes more progress it will send more work to the thread bringing both threads out of the ping pong scenario and the p-state will be selected normally. This fixes a performance regression of approximately 30% Cc: 3.9+ <stable@vger.kernel.org> Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| | * | | cpufreq / intel_pstate: use lowest requested max performanceDirk Brandewie2013-05-121-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two ways that the maximum p-state can be clamped, via a policy change and via the sysfs file. The acpi-thermal driver adjusts the p-state policy in response to thermal events. These changes override the users settings at the moment. Use the lowest of the two requested values this ensures that we will not exceed the requested pstate from either mechanism. Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: 3.9+ <stable@vger.kernel.org> Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
OpenPOWER on IntegriCloud