aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-08-04arch/x86/oprofile/op_model_amd.c: fix op_amd_handle_ibs() return typeAndrew Morton
arch/x86/oprofile/op_model_amd.c: In function 'op_amd_handle_ibs': arch/x86/oprofile/op_model_amd.c:217: warning: no return statement in function returning non-void Fix this by making op_amd_handle_ibs() return void. Cc: Robert Richter <robert.richter@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-08-04Revert "x86: oprofile/op_model_amd.c set return values for op_amd_handle_ibs()"Robert Richter
This reverts commit 21e70878215f620fe99ea7d7c74bc641aeec932f. Instead Andrew's patch will be applied he posted at the same time. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Small coding style fixesRobert Richter
Some small coding style fixes. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Add counter reservation check for virtual countersRobert Richter
This patch adds a check for the availability of a counter. A virtual counter is used only if its physical counter is not reserved. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Implement op_x86_virt_to_phys()Robert Richter
This patch implements a common x86 function to convert virtual counter numbers to physical. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Adding switch counter to oprofile statistic variablesRobert Richter
This patch moves the multiplexing switch counter from x86 code to common oprofile statistic variables. Now the value will be available and usable for all architectures. The initialization and incrementation also moved to common code. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Implement mux_clone()Robert Richter
To setup a counter for all cpus, its structure is cloned from cpu 0. This patch implements mux_clone() to do this part for multiplexing data. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Enable multiplexing only if the model supports itRobert Richter
This patch checks if the model supports multiplexing. Only then multiplexing will be enabled. The code is added to the common x86 initialization. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Add function has_mux() to check multiplexing supportRobert Richter
The check is used to prevent running multiplexing code for models not supporting multiplexing. Before, the code was running but without effect. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Modify initialization of num_virt_countersRobert Richter
Models that do not yet support counter multiplexing have to setup num_virt_counters. This patch implements the setup from num_counters if num_virt_counters is not set. Thus, num_virt_counters must be setup only for multiplexing support. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Remove unused num_virt_controls from struct op_x86_model_specRobert Richter
The member num_virt_controls of struct op_x86_model_spec is not used. This patch removes it. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Remove const qualifier from struct op_x86_model_specRobert Richter
This patch removes the const qualifier from struct op_x86_model_spec to make model parameters changable. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Moving nmi_cpu_switch() in nmi_int.cRobert Richter
This patch moves some code in nmi_int.c to get a single separate multiplexing code section. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Moving nmi_cpu_save/restore_mpx_registers() in nmi_int.cRobert Richter
This patch moves some code in nmi_int.c to get a single separate multiplexing code section. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Moving nmi_setup_cpu_mux() in nmi_int.cRobert Richter
This patch moves some code in nmi_int.c to get a single separate multiplexing code section. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Implement multiplexing setup/shutdown functionsRobert Richter
This patch implements nmi_setup_mux() and nmi_shutdown_mux() functions to setup/shutdown multiplexing. Multiplexing code in nmi_int.c is now much more separated. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Grouping multiplexing code in op_model_amd.cRobert Richter
This patch moves some multiplexing code to the new function op_mux_fill_in_addresses(). Also, the whole multiplexing code is now at a single location. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Introduce op_x86_phys_to_virt()Robert Richter
This new function translates physical to virtual counter numbers. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Grouping multiplexing code in oprof.cRobert Richter
This patch moves multiplexing code to a single section of code. This reduces the use of #ifdefs especially within functions. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Remove oprofile_multiplexing_init()Robert Richter
oprofile_multiplexing_init() can be removed when moving the initialization of oprofile_time_slice to oprofile_create_files(). Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Rename variable timeout_jiffies and move to oprofile_files.cRobert Richter
This patch renames timeout_jiffies into an oprofile specific name. The macro MULTIPLEXING_TIMER_DEFAULT is changed too. Also, since this variable is controlled using oprofilefs, its definition is moved to oprofile_files.c. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: oprofile_set_timeout(), return with error for invalid argsRobert Richter
Return with -EINVAL for invalid parameters instead of setting the default value in oprofile_set_timeout(). Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Fix initialization of switch_indexRobert Richter
Variable switch_index must be initialized for each cpu. This patch fixes the initialization by moving it to the per-cpu init function nmi_cpu_setup(). Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Use per_cpu() instead of __get_cpu_var()Robert Richter
__get_cpu_var() calls smp_processor_id(). When the cpu id is already known, instead use per_cpu() to avoid generating the id again. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20x86/oprofile: Fix usage of NUM_CONTROLS/NUM_COUNTERS macrosRobert Richter
Use the corresponding macros when iterating over counter and control registers. Since NUM_CONTROLS and NUM_COUNTERS are equal for AMD cpus the fix is more a cosmetical change. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20oprofile: Implement performance counter multiplexingJason Yeh
The number of hardware counters is limited. The multiplexing feature enables OProfile to gather more events than counters are provided by the hardware. This is realized by switching between events at an user specified time interval. A new file (/dev/oprofile/time_slice) is added for the user to specify the timer interval in ms. If the number of events to profile is higher than the number of hardware counters available, the patch will schedule a work queue that switches the event counter and re-writes the different sets of values into it. The switching mechanism needs to be implemented for each architecture to support multiplexing. This patch only implements AMD CPU support, but multiplexing can be easily extended for other models and architectures. There are follow-on patches that rework parts of this patch. Signed-off-by: Jason Yeh <jason.yeh@amd.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-14x86/oprofile: Whitespaces changes onlyRobert Richter
This patch fixes whitespace changes of code that will be touched in follow-on patches. Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-14x86/oprofile: Rework and simplify nmi_cpu_setup()Robert Richter
This patch removes the function nmi_save_registers(). Per-cpu code is now executed only in the function nmi_cpu_setup(). Also, it renames the per-cpu function nmi_restore_registers() to nmi_cpu_restore_registers(). Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-14x86/oprofile: Fix cast of counter valueRobert Richter
When casting the counter value to a 64 bit value in 32 bit mode, sign extension may lead to broken counter values. This patch fixes this by casting to (u64) instead of (s64). Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-14Merge commit 'v2.6.31-rc3'; commit 'tip/oprofile' into oprofile/coreRobert Richter
Conflicts: drivers/oprofile/oprofile_stats.c drivers/usb/otg/Kconfig drivers/usb/otg/Makefile Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-13Linux 2.6.31-rc3Linus Torvalds
2009-07-13Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: jbd2: fix race between write_metadata_buffer and get_write_access ext4: Fix ext4_mb_initialize_context() to initialize all fields ext4: fix null handler of ioctls in no journal mode ext4: Fix buffer head reference leak in no-journal mode ext4: Move __ext4_journalled_writepage() to avoid forward declaration ext4: Fix mmap/truncate race when blocksize < pagesize && !nodellaoc ext4: Fix mmap/truncate race when blocksize < pagesize && delayed allocation ext4: Don't look at buffer_heads outside i_size. ext4: Fix goal inum check in the inode allocator ext4: fix no journal corruption with locale-gen ext4: Calculate required journal credits for inserting an extent properly ext4: Fix truncation of symlinks after failed write jbd2: Fix a race between checkpointing code and journal_get_write_access() ext4: Use rcu_barrier() on module unload. ext4: naturally align struct ext4_allocation_request ext4: mark several more functions in mballoc.c as noinline ext4: Fix potential reclaim deadlock when truncating partial block jbd2: Remove GFP_ATOMIC kmalloc from inside spinlock critical region ext4: Fix type warning on 64-bit platforms in tracing events header
2009-07-13jbd2: fix race between write_metadata_buffer and get_write_accessdingdinghua
The function jbd2_journal_write_metadata_buffer() calls jbd_unlock_bh_state(bh_in) too early; this could potentially allow another thread to call get_write_access on the buffer head, modify the data, and dirty it, and allowing the wrong data to be written into the journal. Fortunately, if we lose this race, the only time this will actually cause filesystem corruption is if there is a system crash or other unclean shutdown of the system before the next commit can take place. Signed-off-by: dingdinghua <dingdinghua85@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: Staging: stlc45xx: convert config_interface to bss_info_changed, fixing a build error Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 board Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME Staging: rtl8192su: convert to net_device_ops Staging: serqt_usb2: declare qt_open static in serqt_usb2 Staging: serqt_usb2: fix qt_close parameters in serqt_usb2 Staging: comedi: jr3_pci.c: add required includes Staging: meilhaus: add email address to TODO Staging: rspiusb: use NULL virtual address instead of a bogus one Staging: vt6655: compile fix Staging: rt2870: Add USB ID for Sitecom WL-608
2009-07-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: wm97xx_batery: replace driver_data with dev_get_drvdata() omap: video: remove direct access of driver_data Sound: remove direct access of driver_data driver model: fix show/store prototypes in doc. Firmware: firmware_class, fix lock imbalance Driver Core: remove BUS_ID_SIZE sparc: remove driver-core BUS_ID_SIZE partitions: fix broken uevent_suppress conversion devres: WARN() and return, don't crash on device_del() of uninitialized device
2009-07-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (48 commits) USB: otg: fix module reinsert issue USB: handle zero-length usbfs submissions correctly USB: EHCI: report actual_length for iso transfers USB: option: remove unnecessary and erroneous code USB: cypress_m8: remove invalid Clear-Halt USB: musb_host: undo incorrect change in musb_advance_schedule() USB: fix LANGID=0 regression USB: serial: sierra driver id_table additions USB serial: Add ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter. USB: fix race leading to a write after kfree in usbfs USB: Sierra: fix oops upon device close USB: option.c: add A-Link 3GU device id USB: Serial: Add support for Arkham Technology adapters USB: Fix option_ms regression in 2.6.31-rc2 USB: gadget audio: select SND_PCM USB: ftdi: support NDI devices Revert USB: usbfs: deprecate and hide option for !embedded USB: usb.h: fix kernel-doc notation USB: RNDIS gadget, fix issues talking from PXA USB: serial: FTDI with product code FB80 and vendor id 0403 ...
2009-07-13update JFS entry in MAINTAINERSDave Kleikamp
JFS hasn't really been supported for a while. It's still maintained, but saying it's supported is a stretch. Updating my preferred email address as well. Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-13mn10300: remove duplicated #includeHuang Weiyi
Remove duplicated #include('s) in arch/mn10300/kernel/sys_mn10300.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-13Fix staging drivers after smp_lock.h reduxJean Delvare
Commit 405f55712dfe464b3240d7816cc4fe4174831be2 ("headers: smp_lock.h redux") broke the build of two staging drivers. Fix them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-13ext4: Fix ext4_mb_initialize_context() to initialize all fieldsTheodore Ts'o
Pavel Roskin pointed out that kmemcheck indicated that ext4_mb_store_history() was accessing uninitialized values of ac->ac_tail and ac->ac_buddy leading to garbage in the mballoc history. Fix this by initializing the entire structure to all zeros first. Also, two fields were getting doubly initialized by the caller of ext4_mb_initialize_context, so remove them for efficiency's sake. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-13ext4: fix null handler of ioctls in no journal modePeng Tao
The EXT4_IOC_GROUP_ADD and EXT4_IOC_GROUP_EXTEND ioctls should not flush the journal in no_journal mode. Otherwise, running resize2fs on a mounted no_journal partition triggers the following error messages: BUG: unable to handle kernel NULL pointer dereference at 00000014 IP: [<c039d282>] _spin_lock+0x8/0x19 *pde = 00000000 Oops: 0002 [#1] SMP Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-13ext4: Fix buffer head reference leak in no-journal modeCurt Wohlgemuth
We found a problem with buffer head reference leaks when using an ext4 partition without a journal. In particular, calls to ext4_forget() would not to a brelse() on the input buffer head, which will cause pages they belong to to not be reclaimable. Further investigation showed that all places where ext4_journal_forget() and ext4_journal_revoke() are called are subject to the same problem. The patch below changes __ext4_journal_forget/__ext4_journal_revoke to do an explicit release of the buffer head when the journal handle isn't valid. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-12USB: otg: fix module reinsert issueAjay Kumar Gupta
Platform_device instance (pd) is not set to NULL in usb_nop_xceiv_unregister() causing usb_nop_xceiv_register() to fail during module reinsert. From: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Babu Ravi <ravibabu@ti.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2009-07-12USB: handle zero-length usbfs submissions correctlyAlan Stern
This patch (as1262) fixes a bug in usbfs: It refuses to accept zero-length transfers, and it insists that the buffer pointer be valid even if there is no data being transferred. The patch also consolidates a bunch of repetitive access_ok() checks into a single check, which incidentally fixes the lack of such a check for Isochronous URBs. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: EHCI: report actual_length for iso transfersAlan Stern
This patch (as1259b) makes ehci-hcd return the total number of bytes transferred in urb->actual_length for Isochronous transfers. Until now, the actual_length value was unaccountably left at 0. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: option: remove unnecessary and erroneous codeAlan Stern
This patch (as1264) removes a bunch of unnecessary and erroneous stuff from the option USB-serial driver. Clearly there's no need to verify that the device pointer stored in the URBs is right or to store the same pointer over again. After all, the pointer can't change once it has been set up. There's also no need to call usb_clear_halt for the IN endpoint multiple times -- in fact, doing so is an error since every time after the first there will be active URBs queued for that endpoint. Since the Clear-Halts don't appear to be needed at all, the patch simply removes them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: cypress_m8: remove invalid Clear-HaltAlan Stern
This patch (as1265) removes an erroneous call to usb_clear_halt from the cypress_m8 driver. The call isn't valid because it is made from interrupt context whereas usb_clear_halt is a blocking routine. Presumably the code has never been executed; if it did it would cause an oops. So instead treat -EPIPE like any other sort of unexplained error. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: musb_host: undo incorrect change in musb_advance_schedule()Sergei Shtylyov
Commit c9cd06b3d6ea825c62e277def929cc4315802b48 (musb_host: refactor URB giveback) included due to my overlook the change incorrect in the context of the current kernel -- undo it. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: fix LANGID=0 regressionDaniel Mack
commit b7af0bb ("USB: allow malformed LANGID descriptors") broke support for devices without string descriptor support. Reporting string descriptors is optional to USB devices, and a device lets us know it can't deal with strings by responding to the LANGID request with a STALL token. The kernel handled that correctly before b7af0bb came in, but failed hard if the LANGID was reported but broken. More than that, if a device was not able to provide string descriptors, the LANGID was retrieved over and over again at each string read request. This patch changes the behaviour so that a) the LANGID is only queried once b) devices which can't handle string requests are not asked again c) devices with malformed LANGID values have a sane fallback to 0x0409 Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: serial: sierra driver id_table additionsElina Pasheva
- Updated the id_table with all devices that Sierra Wireless currently support - Re-ordered the contents of the id_table for better readability Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>