- Oct 15, 2010
-
-
Paul Mundt authored
When updating the iterator macro an old argument assignment was used on the initial assignment causing a fault on the table rounding. Fix it up. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
This adds a new clk_rate_div_range_round() for implementing rate rounding by divisor ranges. This can be used trivially by clocks that support arbitrary ranged divisors without the need for rate table construction. This should only be used by clocks that both have large divisor ranges in addition to clocks that will never be arbitrarily scaled, as the lack of a backing frequency table will prevent cpufreq from being able to do much of anything with them. Primarily intended for use as a ->recalc helper. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
Presently the only assisted rate rounding is frequency table backed, but there are cases where it's impractical to use a frequency table for certain clocks (such as the FSIDIV case, which supports 65535 divisors), and we wish to reuse the same rate rounding algorithm. This breaks out the core of the rate rounding logic in to its own helper routine and shuffles the frequency table logic around, switching to using an iterator for the generic helper routine. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
This implements support for ioremapping of register windows that encapsulate clock control registers used by a struct clk, with transparent sibling inheritance. Root clocks at the top of a given topology often encapsulate the entire register space of all of their sibling clocks, so this mapping can be done once and handed down. A given clock enable/disable case maps out to a single bit in a shared register, so this prevents creating multiple overlapping mappings. The mapping case breaks down in to a couple of different situations: - Sibling clocks without a specific mapping. - Root clocks without a specific mapping. - Any of sibling/root clocks with a specific mapping. Sibling clocks with no specified mapping will grovel up the clock chain and install the root clock mapping unconditionally at registration time. Root clocks without their own mappings have a dummy BSS-initialized mapping inserted that is handed down the chain just like any other mapping. This permits all of the sibling clock ops to read/write using the mapping offsets without any special configuration, enabling them to not care whether access ultimately goes through translatable or untranslatable memory. Any clock with its own mapping will have the window initialized at registration time and be ready for use by its clock ops. Failure to establish the mapping will prevent registration, so no additional sanity checks are needed. Sibling clocks that double as parents for the moment will not propagate their mapping down, but this is easily tunable if the need arises. All clock mappings are kref refcounted, with each instance of mapping inheritance incrementing the refcount. Tested-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 13, 2010
-
-
Paul Mundt authored
Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Magnus Damm authored
Remove "name" and "id" from drivers/sh/ struct clk. The struct clk members "name" and "id" are not used now when matching is done through clkdev. Signed-off-by:
Magnus Damm <damm@opensource.se> Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Magnus Damm authored
Without this fix the LCDC driver will try to free framebuffer memory even though the allocation failed. Signed-off-by:
Magnus Damm <damm@opensource.se> Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 06, 2010
-
-
Paul Mundt authored
The balancing stubs obviously need to be static inline.. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
The Kconfig and Makefile were overlooked, add those in now to improve odds of building. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 05, 2010
-
-
Paul Mundt authored
This splits up the sh intc core in to something more vaguely resembling a subsystem. Most of the functionality was alread fairly well compartmentalized, and there were only a handful of interdependencies that needed to be resolved in the process. This also serves as future-proofing for the genirq and sparseirq rework, which will make some of the split out functionality wholly generic, allowing things to be killed off in place with minimal migration pain. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
If lookups happen while the radix node still points to a subgroup mapping, an IRQ hasn't yet been made available for the specified id, so error out accordingly. Once the slot is replaced with an IRQ mapping and the tag is discarded, lookup can commence as normal. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 04, 2010
-
-
Paul Mundt authored
Many interrupts that share a single mask source but are on different hardware vectors will have an associated register tied to an INTEVT that denotes the precise cause for the interrupt exception being triggered. This introduces the concept of IRQ subgroups in the intc core, where a virtual IRQ map is constructed for each of the pre-defined cause bits, and a higher level chained handler takes control of the parent INTEVT. This enables CPUs with heavily muxed IRQ vectors (especially across disjoint blocks) to break things out in to a series of managed chained handlers while being able to dynamically lookup and adopt the IRQs created for them. This is largely an opt-in interface, requiring CPUs to manually submit IRQs for subgroup splitting, in addition to providing identifiers in their enum maps that can be used for lazy lookup via the radix tree. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
This implements a scheme roughly analogous to the PowerPC virtual to hardware IRQ mapping, which we use for IRQ to per-controller ID mapping. This makes it possible for drivers to use the IDs directly for lookup instead of hardcoding the vector. The main motivation for this work is as a building block for dynamically allocating virtual IRQs for demuxing INTC events sharing a single INTEVT in addition to a common masking source. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 03, 2010
-
-
Paul Mundt authored
The gpiolib debugfs entry takes a hammer approach and iterates over all of the potential GPIOs, regardless of their type. The SH PFC code on the other hand contains a variable mismash of input/output/function types spread out sparsely, leading to situations where the debug code can trigger an out of range enum for the type. Since we already have an error path for out of range enums, we can just hand that up to the higher level instead of the current BUG() behaviour. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
Presently the pinmux code is a one-way thing, but there's nothing preventing an unregistration if no one has grabbed any of the pins. This will permit us to save a bit of memory on systems that require pin demux for certain peripherals in the case where registration of those peripherals fails, or they are otherwise not attached to the system. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 02, 2010
-
-
Paul Mundt authored
Some controllers will need to be initialized lazily due to pinmux constraints, while others may simply have no need to be brought online if there are no backing devices for them attached. In this case it's still necessary to be able to reserve their hardware vector map before dynamic IRQs get a hold of them. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Oct 01, 2010
-
-
Paul Mundt authored
This adds in hardware IRQ auto-distribution support for SH-X3 proto CPUs, following the SH7786 support. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Sep 16, 2010
-
-
Paul Mundt authored
The _remove() routine is flagged __init_or_module, despite only being used in a __devexit context. As the rest of the driver is already balanced out with __devinit, switch to __devexit and __devexit_p() wrapping. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Paul Mundt authored
The current probe/remove definitions are split between __init and __devexit, make them consistent by switching to __devinit. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Aug 20, 2010
-
-
Paul Mundt authored
This was killed off by a simplification patch previously that failed to take the cpufreq use case in to account, so reinstate the old bounding logic. The lowest rate bounding on the other hand was broken in that it never actually got assigned a rate and the best fit rate was instead just getting lucky based on the ordering of the rate table, fix this up so the code actually does what it was intended to do originally. Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
- Aug 18, 2010
-
-
Uwe Kleine-König authored
This fixes a build breakage introduced by commit 4c2ef25f ("mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume") Cc: David Brownell <david-b@pacbell.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: linux-mmc@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Kukjin Kim <kgene.kim@samsung.com> Acked-by:
Maxim Levitsky <maximlevitsky@gmail.com> Acked-by:
Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Nicholas Piggin authored
tty: fix fu_list abuse tty code abuses fu_list, which causes a bug in remount,ro handling. If a tty device node is opened on a filesystem, then the last link to the inode removed, the filesystem will be allowed to be remounted readonly. This is because fs_may_remount_ro does not find the 0 link tty inode on the file sb list (because the tty code incorrectly removed it to use for its own purpose). This can result in a filesystem with errors after it is marked "clean". Taking idea from Christoph's initial patch, allocate a tty private struct at file->private_data and put our required list fields in there, linking file and tty. This makes tty nodes behave the same way as other device nodes and avoid meddling with the vfs, and avoids this bug. The error handling is not trivial in the tty code, so for this bugfix, I take the simple approach of using __GFP_NOFAIL and don't worry about memory errors. This is not a problem because our allocator doesn't fail small allocs as a rule anyway. So proper error handling is left as an exercise for tty hackers. [ Arguably filesystem's device inode would ideally be divorced from the driver's pseudo inode when it is opened, but in practice it's not clear whether that will ever be worth implementing. ] Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig <hch@infradead.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Nick Piggin <npiggin@kernel.dk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Nicholas Piggin authored
fs: cleanup files_lock locking Lock tty_files with a new spinlock, tty_files_lock; provide helpers to manipulate the per-sb files list; unexport the files_lock spinlock. Cc: linux-kernel@vger.kernel.org Cc: Christoph Hellwig <hch@infradead.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by:
Andi Kleen <ak@linux.intel.com> Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Nick Piggin <npiggin@kernel.dk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Nicholas Piggin authored
fs: fs_struct rwlock to spinlock struct fs_struct.lock is an rwlock with the read-side used to protect root and pwd members while taking references to them. Taking a reference to a path typically requires just 2 atomic ops, so the critical section is very small. Parallel read-side operations would have cacheline contention on the lock, the dentry, and the vfsmount cachelines, so the rwlock is unlikely to ever give a real parallelism increase. Replace it with a spinlock to avoid one or two atomic operations in typical path lookup fastpath. Signed-off-by:
Nick Piggin <npiggin@kernel.dk> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
NeilBrown authored
commit 7b6d91da changed the behaviour of a few variables in raid1 and raid10 from flags to bit-sets, but left them as type 'bool' so they did not work. Change them (back) to unsigned long. (historical note: see 1ef04fef) Signed-off-by:
NeilBrown <neilb@suse.de> Reported-by: Jiri Slaby <jslaby@suse.cz> and many others
-
Greg Ungerer authored
Using the coldfire qspi driver, I get the following error: drivers/spi/coldfire_qspi.c: In function 'mcfqspi_irq_handler': drivers/spi/coldfire_qspi.c:166: error: 'TASK_NORMAL' undeclared (first use in this function) drivers/spi/coldfire_qspi.c:166: error: (Each undeclared identifier is reported only once It is solved by adding the following include to coldfire_sqpi.c: #include <linux/sched.h> Fix suggested by Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com> Signed-off-by:
Greg Ungerer <gerg@uclinux.org>
-
NeilBrown authored
md_check_recovery expects ->spare_active to return 'true' if any spares were activated, but none of them do, so the consequent change in 'degraded' is not notified through sysfs. So count the number of spares activated, subtract it from 'degraded' just once, and return it. Reported-by:
Adrian Drzewiecki <adriand@vmware.com> Signed-off-by:
NeilBrown <neilb@suse.de>
-
Adrian Drzewiecki authored
When RAID1 is done syncing disks, it'll update the state of synced rdevs to In_sync. But it neglected to notify sysfs that the attribute changed. So any programs that are waiting for an rdev's state to change will not be woken. (raid5/raid10 added by neilb) Signed-off-by:
Adrian Drzewiecki <adriand@vmware.com> Signed-off-by:
NeilBrown <neilb@suse.de>
-
NeilBrown authored
The update of ->recovery_offset in sync_sbs is appropriate even then external metadata is in use. However sync_sbs is only called when native metadata is used. So move that update in to the top of md_update_sb (which is the only caller of sync_sbs) before the test on ->external. This moves the update out of ->write_lock protection, but those fields only need ->reconfig_mutex protection which they still have. Also move the test on ->persistent up to where ->external is set as for metadata update purposes they are the same. Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing if ->external is set or ->persistent isn't. Finally move the update of ->utime down as it is only relevent (like the ->events update) for native metadata. Signed-off-by:
NeilBrown <neilb@suse.de> Reported-by:
"Kwolek, Adam" <adam.kwolek@intel.com>
-
David Miller authored
Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Aug 17, 2010
-
-
Russell King authored
Fix the clock enable/disable tracking in the AMBA CLCD driver so that the driver doesn't try to disable an already disabled clock, thereby causing the clock (if shared) to become unbalanced. This resolves a problem with CLCD on LPC32xx ARM platforms. Reported-by:
Kevin Wells <wellsk40@gmail.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Graeme Smecher authored
The drivers for Xilinx' SystemACE and physically mapped MTDs were missing prototypes for of_address_to_resource(). This patch adds the necessary headers. Signed-off-by:
Graeme Smecher <graeme.smecher@mail.mcgill.ca> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Grant Likely authored
This patch fixes missing includes from a number of .c files because the code (wrongfully) depended on prom.h including them. The include of linux/of_address.h was removed in microblaze prom.h in commit "of/address: Clean up function declarations" (sha1 id 22ae782f), but not fixed in some callers. This patch fixes them up. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Tested-by:
Michal Simek <monstr@monstr.eu>
-
- Aug 16, 2010
-
-
Stephen Rothwell authored
Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Grant Likely <grant.likely@secretlab.ca>
-
Jason Wessel authored
Commit b45cfba4 (vt,console,kdb: implement atomic console enter/leave functions) introduced the ability to atomically change the console mode with kernel mode setting but did not preserve the state of the console_blanked variable. The console_blanked variable must be restored when executing the con_debug_leave() or further kernel mode set changes (such as using chvt X) will fail to correctly set the state of console. Signed-off-by:
Jason Wessel <jason.wessel@windriver.com> Reviewed-by:
Jesse Barnes <jbarnes@virtuousgeek.org> CC: Andrew Morton <akpm@linux-foundation.org>
-
Jason Wessel authored
Fix the following new sparse warnings in vt.c introduced by the commit b45cfba4 (vt,console,kdb: implement atomic console enter/leave functions): drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static? drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static? drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static? drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static? Signed-off-by:
Jason Wessel <jason.wessel@windriver.com> Reviewed-by:
Jesse Barnes <jbarnes@virtuousgeek.org> CC: Andrew Morton <akpm@linux-foundation.org>
-
David S. Miller authored
If a video head and keyboard are hooked up, specifying "console=ttyS0" or similar to use a serial console will not work properly. The key issue is that we must register all serial console capable devices with register_console(), otherwise the command line specified device won't be found. The sun serial drivers would only register themselves as console devices if the OpenFirmware specified console device node matched. To fix this part we now unconditionally get the serial console register by setting serial_drv->cons always. Secondarily we must not add_preferred_console() using the firmware provided console setting if the user gaven an override on the kernel command line using "console=" The "primary framebuffer" matching logic was always triggering o n openfirmware device node match, make it not when a command line override was given. Reported-by:
Frans Pop <elendil@planet.nl> Tested-by:
Frans Pop <elendil@planet.nl> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Victor van den Elzen authored
Like others in the Mini series, the Dell Mini 1012 does not support the smbios hook required by dell-laptop. Signed-off-by:
Victor van den Elzen <victor.vde@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by:
Matthew Garrett <mjg@redhat.com>
-
Jens Taprogge authored
On the T410s and most likely other current models, Fn-F6 is labeled as Camera/Headphone key. Report key presses as KEY_CAMERA. Signed-off-by:
Jens Taprogge <jens.taprogge@taprogge.org> Acked-by:
Jerone Young <jerone.young@canonical.com> Acked-by:
Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by:
Matthew Garrett <mjg@redhat.com>
-
Henrique de Moraes Holschuh authored
Use the quirks engine to select model-specific keymaps, which makes it much easier to extend should we need it. Keycodes are based on the tables at http://www.thinkwiki.org/wiki/Default_meanings_of_special_keys . Signed-off-by:
Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by:
Matthew Garrett <mjg@redhat.com>
-