aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-10-16IPMI: Fix some uninitialized warningCorey Minyard1-1/+1
There was a spot where the compiler couldn't tell some variables would be set. So initialize them to make the warning go away. Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-16IPMI: Change link orderMatthew Garrett2-1/+4
IPMI must be initialised before ACPI in order to ensure that any IPMI services are available before ACPI driver initialisation attempts to use any IPMI operation regions. Signed-off-by: Matthew Garrett <[email protected]> Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-16ACPI: Reorder IPMI driver before any other ACPI driversMatthew Garrett1-1/+4
Drivers may make calls that require the ACPI IPMI driver to have been initialised already, so make sure that it appears earlier in the build order. Signed-off-by: Matthew Garrett <[email protected]> Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-16IPMI: Remove SMBus driver info from the docsCorey Minyard1-62/+3
Some documentation for the SMBus driver is in the IPMI docs, but that code is not in the kernel tree at this point. So remove the docs to avoid confusion. Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-16MAINTAINERS: change email after moving for LED subsystem maintainingBryan Wu1-1/+1
Signed-off-by: Bryan Wu <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-16mm, mempolicy: fix printing stack contents in numa_mapsDavid Rientjes2-5/+7
When reading /proc/pid/numa_maps, it's possible to return the contents of the stack where the mempolicy string should be printed if the policy gets freed from beneath us. This happens because mpol_to_str() may return an error the stack-allocated buffer is then printed without ever being stored. There are two possible error conditions in mpol_to_str(): - if the buffer allocated is insufficient for the string to be stored, and - if the mempolicy has an invalid mode. The first error condition is not triggered in any of the callers to mpol_to_str(): at least 50 bytes is always allocated on the stack and this is sufficient for the string to be written. A future patch should convert this into BUILD_BUG_ON() since we know the maximum strlen possible, but that's not -rc material. The second error condition is possible if a race occurs in dropping a reference to a task's mempolicy causing it to be freed during the read(). The slab poison value is then used for the mode and mpol_to_str() returns -EINVAL. This race is only possible because get_vma_policy() believes that mm->mmap_sem protects task->mempolicy, which isn't true. The exit path does not hold mm->mmap_sem when dropping the reference or setting task->mempolicy to NULL: it uses task_lock(task) instead. Thus, it's required for the caller of a task mempolicy to hold task_lock(task) while grabbing the mempolicy and reading it. Callers with a vma policy store their mempolicy earlier and can simply increment the reference count so it's guaranteed not to be freed. Reported-by: Dave Jones <[email protected]> Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-10-17MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.Ralf Baechle1-0/+1
On some CPU the write to pagemask might complete before the TLB write instruction reads from the pagemask register. Signed-off-by: Ralf Baechle <[email protected]>
2012-10-17MIPS: Restore pagemask after dumping the TLB.Ralf Baechle1-1/+3
Or bad things might happen if the last TLB entry isn't a basic size page. Signed-off-by: Ralf Baechle <[email protected]>
2012-10-17MIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()Ralf Baechle1-1/+14
Signed-off-by: Ralf Baechle <[email protected]>
2012-10-16ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error messageSebastien Guiriec1-1/+1
Correct DMIC hwmod lockup error message and replace printk() by pr_err(). Signed-off-by: Sebastien Guiriec <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-16ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fckBenoit Cousson1-1/+1
The GPMC code has been converted to a driver by the following commit: commit da496873970c57c4b31e186d967933da0ffa0d7c Author: Afzal Mohammed <[email protected]> Date: Sun Sep 23 17:28:25 2012 -0600 ARM: OMAP2+: gpmc: minimal driver support It now requests a clock with con-id "fck" otherwise the probe will fails. [ 0.342010] omap-gpmc omap-gpmc: error: clk_get [ 0.346771] omap-gpmc: probe of omap-gpmc failed with error -2 Add the "omap-gmpc" dev-id and fck con-id to the already existing gmpc-fck dummy clock. Reported-by: Russell King <[email protected]> Signed-off-by: Benoit Cousson <[email protected]> Cc: Afzal Mohammed <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-16ARM: OMAP: resolve sparse warning concerning debug_card_init()Paul Walmsley1-0/+1
Commit 801475ccb2b2c1928b22aec4b9e5285d9e347602 ("ARM: OMAP: move debug_card_init() function") results in the following new sparse warning: arch/arm/plat-omap/debug-devices.c:71:12: warning: symbol 'debug_card_init' was not declared. Should it be static? Fix by implementing Tony's suggestion to add a "sideways include" to the new location of the debug-devices.h file in arch/arm/mach-omap2/. Signed-off-by: Paul Walmsley <[email protected]> Acked-by: Igor Grinberg <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-16UAPI: (Scripted) Disintegrate arch/parisc/include/asmDavid Howells35-1453/+1507
Signed-off-by: David Howells <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Michael Kerrisk <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>
2012-10-16Merge branch 'misc' of ↵David Howells23-89/+4
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6.git/
2012-10-16MIPS: R5000: Fix TLB hazard handling.Ralf Baechle1-15/+8
R5000 and the Nevada CPUs (RM5230, RM5231, RM5260, RM5261, RM5270 and RM5271) are basically the same CPU core and all are documented to require two instructions separating a write to c0_pagemask, c0_entryhi, c0_entrylo0, c0_entrylo1 or c0_index. So far we were only providing on cycle before / after a TLBR/TLBWI for R5000 but 3 cycles before and 1 cycles after for the Nevadas. Signed-off-by: Ralf Baechle <[email protected]>
2012-10-16MIPS: tlbex: Deal with re-definition of labelRalf Baechle1-7/+34
The microassembler used in tlbex.c does not notice if a label is redefined resulting in relocations against such labels silently missrelocated. The issues exists since commit add6eb04776db4189ea89f596cbcde31b899be9d [Synthesize TLB exception handlers at runtime.] in 2.6.10 and went unnoticed for so long because the relocations for the affected branches got computed to do something *almost* sensible. The issue affects R4000, R4400, QED/IDT RM5230, RM5231, RM5260, RM5261, RM5270 and RM5271 processors. Signed-off-by: Ralf Baechle <[email protected]>
2012-10-16MIPS: Make __{,n,u}delay declarations match definitions and generic delay.hDavid Daney2-4/+8
At some recent point arch/mips/include/asm/delay.h has started being included into csrc-octeon.c where the __?delay() functions are defined. This causes a compile failure due to conflicting declarations and definitions of the functions. It turns out that the generic definitions in arch/mips/lib/delay.c also conflict. Proposed fix: Declare the functions to take unsigned long parameters just like asm-generic (and x86) does. Update __delay to agree (__ndelay and __udelay need no change). Bonus: Get rid of 'inline' from __delay() definition, as it is globally visible, and the compiler should be making this decision itself (it does in fact inline the function without being told to). Signed-off-by: David Daney <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/4354/ Signed-off-by: Ralf Baechle <[email protected]>
2012-10-16sparc64: Fix bit twiddling in sparc_pmu_enable_event().David S. Miller1-2/+4
There was a serious disconnect in the logic happening in sparc_pmu_disable_event() vs. sparc_pmu_enable_event(). Event disable is implemented by programming a NOP event into the PCR. However, event enable was not reversing this operation. Instead, it was setting the User/Priv/Hypervisor trace enable bits. That's not sparc_pmu_enable_event()'s job, that's what sparc_pmu_enable() and sparc_pmu_disable() do . The intent of sparc_pmu_enable_event() is clear, since it first clear out the event type encoding field. So fix this by OR'ing in the event encoding rather than the trace enable bits. Signed-off-by: David S. Miller <[email protected]>
2012-10-16ipv6: addrconf: fix /proc/net/if_inet6Eric Dumazet1-6/+9
Commit 1d5783030a1 (ipv6/addrconf: speedup /proc/net/if_inet6 filling) added bugs hiding some devices from if_inet6 and breaking applications. "ip -6 addr" could still display all IPv6 addresses, while "ifconfig -a" couldnt. One way to reproduce the bug is by starting in a shell : unshare -n /bin/bash ifconfig lo up And in original net namespace, lo device disappeared from if_inet6 Reported-by: Jan Hinnerk Stosch <[email protected]> Tested-by: Jan Hinnerk Stosch <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Cc: Mihai Maruseac <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-16bnx2x: fix handling mf storage modesDmitry Kravkov2-4/+8
Since commit a3348722 AFEX FCoE function is continuously reset. The patch prevents the resetting and removes debug print to stop garbaging syslog. Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-16qeth: fix deadlock between recovery and bonding driverStefan Raspl2-10/+12
The recovery thread, when failing, tears down the respective interface. To do so, it needs to obtain the rtnl lock first, as the interface configuration is changed. If another process tries to modify an interface setting at the same time, that process can obtain the rtnl lock first, but the respective callback in the qeth driver will block until recovery has completed - which cannot happen since the calling process already obtained it. In one particular case, the bonding driver acquired the rtnl lock to modify the card's MAC address, while the recovery failed at the same time due to the card being removed. Hence qeth_l2_set_mac_address (implicitly holding the rtnl lock) was waiting on qeth_l2_recover, which deadlocked when waiting on the rtnl lock. This patch uses rtnl_trylock instead of rtnl_lock in the recovery thread. If the lock cannot be obtained, the interface will be left up, but the card state remains in CARD_STATE_RECOVER, which will prevent any further activities on the card. Signed-off-by: Stefan Raspl <[email protected]> Signed-off-by: Frank Blaschka <[email protected]> Reviewed-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-16smsgiucv: reestablish IUCV path after resumeHendrik Brueckner1-1/+1
smsg_pm_restore_thaw() uses wrong checking before reconnecting the IUCV path to *MSG. It is corrected with this patch. Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: Frank Blaschka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-16sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()Zijie Pan1-1/+2
Bug introduced by commit edfee0339e681a784ebacec7e8c2dc97dc6d2839 (sctp: check src addr when processing SACK to update transport state) Signed-off-by: Zijie Pan <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Acked-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-16vlan: fix bond/team enslave of vlan challenged slave/portJiri Pirko2-2/+9
In vlan_uses_dev() check for number of vlan devs rather than existence of vlan_info. The reason is that vlan id 0 is there without appropriate vlan dev on it by default which prevented from enslaving vlan challenged dev. Reported-by: Jon Stanley <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-16ARM: OMAP4: Fix twd_local_timer_register regressionTony Lindgren1-1/+1
Commit 7d7e1eba (ARM: OMAP2+: Prepare for irqs.h removal) changed the interrupts to allow enabling sparse IRQ, but accidentally added the omap3 INTC base to the local IRQ. This causes the following: twd: can't register interrupt 45 (-22) twd_local_timer_register failed -22 The right fix is to not add any base, as it is a local timer. For the OMAP44XX_IRQ_LOCALWDT we had defined earlier there are no users, so no need to fix that. Reported-by: Russell King <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-16MAINTAINERS: Add explicit section for IPSEC networking.David S. Miller1-0/+14
Signed-off-by: David S. Miller <[email protected]>
2012-10-16bury SEL_{IN,OUT,EX}Al Viro1-4/+0
Had not been used for more than a decade and half; it used to be a part of (in-kernel) ->select() API and it has been pining for fjords since 2.1.23pre1. This is an ex-parrot... Signed-off-by: Al Viro <[email protected]>
2012-10-16Unexport some bits of linux/fs.hDavid Howells2-132/+130
There are some bits of linux/fs.h which are only used within the kernel and shouldn't be in the UAPI. Move these from uapi/linux/fs.h into linux/fs.h. Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-10-16fix a leak in replace_fd() usersAl Viro2-13/+10
replace_fd() began with "eats a reference, tries to insert into descriptor table" semantics; at some point I'd switched it to much saner current behaviour ("try to insert into descriptor table, grabbing a new reference if inserted; caller should do fput() in any case"), but forgot to update the callers. Mea culpa... [Spotted by Pavel Roskin, who has really weird system with pipe-fed coredumps as part of what he considers a normal boot ;-)] Signed-off-by: Al Viro <[email protected]>
2012-10-16USB: fix port probing and removal in garmin_gpsAlan Stern1-17/+7
This patch (as1615) fixes a bug in the Garmin USB serial driver. It uses attach, disconnect, and release routines to carry out actions that should be handled by port_probe and port_remove routines, because they access port-specific data. The bug causes an oops when the device in unplugged, because the private data for each port structure now gets erased when the port is unbound from the driver, resulting in a null-pointer dereference. Signed-off-by: Alan Stern <[email protected]> Reported--by: Markus Schauler <[email protected]> Tested-by: Markus Schauler <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-16USB: pl2303: fix port-data memory leakJohan Hovold1-36/+54
Fix port-data memory leak by allocating and freeing port data in port_probe/remove rather than in attach/release, and by introducing serial private data to store the device type which is interface rather than port specific. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-16USB: cp210x: fix port-data memory leakJohan Hovold1-23/+17
Fix port data memory leak by replacing port private data with serial private data. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release. The private data is used to store the control interface number, but as this is the same for all ports on an interface it should be stored as usb-serial data anyway. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-16USB: belkin_sa: fix port-data memory leakJohan Hovold1-16/+15
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the write waitqueue was initialised but never used. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-16USB: cyberjack: fix port-data memory leakJohan Hovold1-30/+19
Fix port-data memory leak by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is no longer freed at release as it is no longer accessible. Note that the write waitqueue was initialised but never used. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-16USB: ark3116: fix NULL-pointer dereferenceJohan Hovold1-12/+14
Fix NULL-pointer dereference at release by replacing attach and release with port_probe and port_remove. Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no driver is bound) the port private data is NULL when release is called. Compile-only tested. Cc: <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-16ARM: tegra: add tegra_timer clockSivaram Nair2-0/+2
This undoes commit 20f4665 "ARM: tegra: remove tegra_timer from tegra_list_clks" by bringing back the tegra_timer clock. tegra_timer is indeed a clock (hidden by the PERIPH_CLK macro) which should be added to the tegra_list_clks. The above commit caused tegra_init_timer() failing to get the clk reference. Signed-off-by: Sivaram Nair <[email protected]> [swarren: added the reverted commit's subject to this patch description] Signed-off-by: Stephen Warren <[email protected]>
2012-10-16ARM: tegra: rename tegra system timerSivaram Nair4-4/+4
The timer variable is renamed to avoid confusion and symbol name clash with the tegra_timer clock. Signed-off-by: Sivaram Nair <[email protected]> Signed-off-by: Stephen Warren <[email protected]>
2012-10-16ARM: tegra30: clk: Fix output_rate overflowMark Zhang1-1/+1
Change the type of variable from "unsigned long" to "u64". This avoids the overflow while clock rate calculating. Signed-off-by: Mark Zhang <[email protected]> Signed-off-by: Stephen Warren <[email protected]>
2012-10-16ARM: dts: imx6q-arm2: move NANDF_CS pins out of 'hog'Shawn Guo1-1/+9
Commit 9e3c0066 (ARM: dts: imx6q-arm2: add pinctrl for uart and enet) defines NANDF_CS pins as gpio in 'hog', assuming these two pins are always used by usdhc3 in gpio mode as card-detection and write-protection on ARM2 board. But it's not true. These pins are shared by usdhc3 and gpmi-nand. We should have the pins functional for gpmi-nand when usdhc3 is disabled. Move the pins out of 'hog', so that pins only work in gpio mode as CD and WP when usdhc3 is enabled, and otherwise they are available for gpmi-nand. Reported-by: Huang Shijie <[email protected]> Signed-off-by: Shawn Guo <[email protected]> Tested-by: Huang Shijie <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2012-10-16sparc64: Add global PMU register dumping via sysrq.David S. Miller7-23/+189
Signed-off-by: David S. Miller <[email protected]>
2012-10-16arm64: Remove duplicate inclusion of mmu_context.h in smp.cSachin Kamat1-1/+0
asm/mmu_context.h was included twice. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2012-10-16tools lib traceevent: Fix missed freeing of subargs in free_arg() in filterSteven Rostedt1-0/+15
Some of args were missed in free_args(), as well as subargs. That is args like FILTER_ARG_NUM have left and right pointers to other args that also need to be freed. Signed-off-by: Steven Rostedt <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16lib tools traceevent: Add back pevent assignment in __pevent_parse_format()Steven Rostedt1-3/+6
Even though with the change of commit commit 2b29175 "tools lib traceevent: Carve out events format parsing routine", allowed __pevent_parse_format() to parse an event without the need of a pevent handler, the event still needs to assign the pevent handed to it. There's no problem with assigning it if the pevent is NULL, as the event->pevent would be NULL without the assignment. But function parsing handlers may be assigned to the pevent handler to help in parsing the event. If there's no pevent then there would not be any function handlers, but if the pevent isn't assigned first before parsing the event, it wont honor the function handlers that were assigned. Worse yet, the current code crashes if an event has a function that it tries to parse. For example: # perf record -e scsi:scsi_dispatch_cmd_timeout Segmentation fault (core dumped) This happens because the scsi_dispatch_cmd_timeout event format has the following: scsi_trace_parse_cdb(p, __get_dynamic_array(cmnd), REC->cmd_len) which hasn't been defined by the pevent code. Signed-off-by: Steven Rostedt <[email protected]> Reviewed-by: Namhyung Kim <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Namhyung Kim <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16perf hists browser: Fix off-by-two bug on the first columnNamhyung Kim1-1/+3
The commit 5395a04841fc ("perf hists: Separate overhead and baseline columns") makes the "Overhead" column no more the first one. So it resulted in the mis-aligned column in the normal (non-diff) output. Signed-off-by: Namhyung Kim <[email protected]> Reported-by: Markus Trippelsdorf <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/None Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16perf tools: Remove warnings on JIT samples for srcline sort keyNamhyung Kim1-0/+3
When using the srcline sort key with perf report, I see many lines of warning related to JIT samples like below: addr2line: '/tmp/perf-1397.map': No such file Since it's not a ELF binary and doesn't provide such information, just use the raw ip address. Signed-off-by: Namhyung Kim <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Irina Tirdea <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16perf tools: Fix segfault when using srcline sort keyNamhyung Kim1-0/+3
The srcline sort key is for grouping samples based on their source file and line number. It use addr2line tool to get the information but it requires dso name. It caused a segfault when a sample does not have the name by dereferencing a NULL pointer. Fix it by using raw ip addresses for those samples. Signed-off-by: Namhyung Kim <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16ALSA: hda - Stop LPIB delay counting on broken hardwareTakashi Iwai1-3/+6
If LPIB reports a pretty bad value, we can't trust such hardware for calculating the PCM delay. Automatically turn off the delay counting when such a problem is encountered. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48911 Cc: <[email protected]> [v3.6] Signed-off-by: Takashi Iwai <[email protected]>
2012-10-16perf: Require exclude_guest to use PEBS - kernel side enforcementPeter Zijlstra1-0/+6
Intel PEBS in VT-x context uses the DS address as a guest linear address, even though its programmed by the host as a host linear address. This either results in guest memory corruption and or the hardware faulting and 'crashing' the virtual machine. Therefore we have to disable PEBS on VT-x enter and re-enable on VT-x exit, enforcing a strict exclude_guest. This patch enforces exclude_guest kernel side. Signed-off-by: Peter Zijlstra <[email protected]> Cc: Avi Kivity <[email protected]> Cc: David Ahern <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Robert Richter <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Ahern <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16perf tool: Precise mode requires exclude_guestDavid Ahern1-0/+3
Summary of events per Peter: "Intel PEBS in VT-x context uses the DS address as a guest linear address, even though its programmed by the host as a host linear address. This either results in guest memory corruption and or the hardware faulting and 'crashing' the virtual machine. Therefore we have to disable PEBS on VT-x enter and re-enable on VT-x exit, enforcing a strict exclude_guest. AMB IBS does work but doesn't currently support exclude_* at all, setting an exclude_* bit will make it fail." This patch handles userspace perf command, setting the exclude_guest attribute if precise mode is requested, but only if a user has not specified a request for guest or host only profiling (G or H attribute). Kernel side AMD currently ignores all exclude_* bits, so there is no impact to existing IBS code paths. Robert Richter has a patch where IBS code will return EINVAL if an exclude_* bit is set. When this goes in it means use of :p on AMD with IBS will first fail with EINVAL (because exclude_guest will be set). Then the existing fallback code within perf will unset exclude_guest and try again. The second attempt will succeed if the CPU supports IBS profiling. Signed-off-by: David Ahern <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Robert Richter <[email protected]> Tested-by: Robert Richter <[email protected]> Reviewed-by: Robert Richter <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robert Richter <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-10-16usb: gadget: lpc32xx_udc: Fix compatibility with STOTG04Alexandre Pereira da Silva1-2/+2
The STOTG04 is an replacement for ISP1301. Most of the registers on STOTG04 are the same as on ISP1301, but the register ISP1301_I2C_OTG_CONTROL_2 (address 0x10) doesn't exist on the ST part. This is a work around for this by using the interrupt source register that should behave the same on both parts and has the needed information. Tested-by: Roland Stigge <[email protected]> Signed-off-by: Alexandre Pereira da Silva <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>