aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-22Blackfin: gpio: add peripheral group checksteven miao1-67/+118
Many Blackfin parts group sets of pins into a single functional unit. This means you cannot use different pins within a group for different peripherals. Our resource conflict checking thus far has been limited to individual pins, so if someone tried to grab a different pin from the same group, it would be allowed while silently changing the other pins in the same group. One common example is the pin set PG12 - PG15 on BF51x parts. They may either be used with SPI0 (1st function), or they may be used with PTP/PWM/AMS3 (3rd function). Ideally, we'd like to use PG12 - PG14 for SPI0 while using PG15 with AMS3, but the hardware does not permit this. In the past, the software would allow the pins to be requested this way, but ultimately things like the Blackfin SPI driver would stop working when the hardware rerouted to a different peripheral. Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: dma: bf54x: add missing break for SPORT1 TX IRQMike Frysinger1-0/+1
Reported-by: D Binderman <dcb314@hotmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: add new cacheflush syscallSonic Zhang7-3/+44
Flushing caches sometimes requires anomaly workarounds which require supervisor-only insns. Normally we don't need to flush caches from userspace so this isn't a problem, but when gcc generates trampolines on the stack, we do. So add a new syscall for gcc to use modeled after the mips version. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf548-ezkit: increase u-boot partition sizeMike Frysinger1-3/+7
The BF54x processor has a ton of on-chip peripherals and in order to support them all, the u-boot image is quite large. So give it 512KiB in all bootable flashes to make our lives easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: add example i2c resources for ad525x devicessteven miao4-0/+20
Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: SIC: fix off-by-one error in loopMichael Hennerich1-3/+4
Make sure we include EMAC_SYSTAT when showing errors. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: tweak i2c address for ad5280 add-on tftlcd boardSonic Zhang1-1/+1
The predefined i2c address 0x2c doesn't match the configuration of the ad5280 PINs AD0 and AD1 on the tftlcd add-on board. Both AD0 and AD1 are of voltage 3.3V, which means the i2c address should be 0x2F. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf51x: enable support for 0.2 siliconMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: initial preempt support while returning from interruptBarry Song2-3/+126
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: workaround anomaly 05000481 (corruption with ITEST MMRs)Robin Getz1-3/+6
Nothing actually needs to use these MMRs (as direct cache manipulation is done with the DTEST MMRs), so simply hide the read funcs behind the anomaly define. They're generally unusable anyways when this anomaly is in effect. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: i2c-gpio boards: use GPIO_PF# definesMike Frysinger4-8/+8
Rather than use raw numbers for the GPIO pins, use proper GPIO defines. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: access_ok: permit L1 stackBarry Song1-0/+5
When apps run with their stack in L1, some system calls might be made where a buffer is in the stack as an argument. So make sure the core Blackfin access code does not reject this memory location. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf561-ezkit: add AD1836 codec resourcesBarry Song1-0/+50
This board has an AD1836 codec, so make sure we have the right resources declared for it. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: ptrace: enable access to L1 stacksBarry Song1-0/+8
If an app is placing its stack in L1 scratchpad SRAM, make sure ptrace is granted access to it so that gdb can do its thing. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: fix num_chipselect values for on-chip SPI busesMike Frysinger5-9/+9
The num_chipselect field for on-chip Blackfin SPI buses is supposed to be 1 larger than the number of actual CSs available. This is because the hardware starts counting at 1 and not 0. There is a field for "CS0", but it is marked as "reserved" everywhere. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: ad7160eval: new board portMichael Hennerich5-1/+984
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: re-use regulator framework with ad5398 partsSonic Zhang1-10/+1
We don't need our own header and structure to hook up the ad5398 part, so drop the custom resources for it. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: re-use the fixed regulator voltage driverSonic Zhang1-55/+25
Rather than write our own ADP switch driver, use the existing fixed regulator driver and rewrite the platform resources accordingly. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: SIC: BF537: change default data/error relative prioritiesMichael Hennerich1-2/+2
Some peripherals might generate an error interrupt shortly after the data interrupt due to the fact that the peripheral isn't serviced fast enough. In most cases this isn't a problem and is expected behavior. This hasn't been a problem on most parts since you simply don't request the error interrupt (or you leave it disabled while there is an expected state) and do the peripheral status checking in the data interrupt. The Blackfin SIC allows people to prioritize data and error interrupts, and the Blackfin CEC allows interrupts of equal or higher priority to nest. The current default settings gives error interrupts a higher priority than data interrupts. So if an error occurs while processing the data interrupt, it will be serviced immediately. However, the error interrupt on the BF537 SIC cannot be enabled on a per-peripheral basis. Once the error interrupt is enabled for one peripheral, it is automatically enabled for all peripherals. Therefore lower the default multiplexed error interrupt priority so most people need not worry themselves with this issue. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: add example IIO resourcesMichael Hennerich1-12/+442
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: use correct spi mode with ad2s90 partsBarry Song1-0/+1
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: add example adau1373 i2c resourcesCliff Cai1-0/+5
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: add example adav801/3 resourcesYi Li1-0/+25
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: add example ad1937 i2c resourcesBarry Song1-0/+6
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: fix NAND resourcesMike Frysinger1-1/+1
The NAND platform driver expects the registers to have a "mem" resource type rather than "io". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: use proper irq flags with isp1362-hcdMichael Hennerich8-8/+8
With the recent kernel update the isp1362-hcd driver evaluates the IORESOURCE_IRQ resource flags and requests the irq with the given polarity/edge settings. However the ISP1362 config requires low level/edge interrupts. Most of the Blackfin boards use some random flag or no flag at all. Make all boards use a know good flag IORESOURCE_IRQ_LOWEDGE. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf561-acvilon: fix NAND resourcesValentin Yakovenkov1-1/+1
The NAND platform driver expects the registers to have a "mem" resource type rather than "io". Signed-off-by: Valentin Yakovenkov <yakovenkov@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: cm-bf548: add support for Socket CANMichael Hennerich1-0/+43
Add platform resources for the on-chip CAN peripheral so we can use it. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: boards: update AD183x resourcesBarry Song14-63/+65
Make sure we use the right Kconfig names and platform strings. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: bf537-stamp: update GPIO CS devicesBarry Song1-5/+3
Now that we've rewritten the GPIO CS handling in the Blackfin SPI peripheral, we need to update the platform resources accordingly. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-22Blackfin: punt short SPI MMR bit namesMike Frysinger7-383/+0
Now that the common header defines everything and the SPI drivers are using it, we can drop these duplicated global namespace polluters. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-21include/linux/libata.h: fix typoAndrea Gelmini1-1/+1
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21pata_bf54x: fix return type of bfin_set_devctlMike Frysinger1-1/+1
The new devctl func added for us to the driver has the wrong return type. Which is to say there shouldn't be any. This fixes compile time warnings as there shouldn't be any runtime difference. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21Drivers: ata: Makefile: replace the use of <module>-objs with <module>-yTracey Dent1-1/+1
Changed <module>-objs to <module>-y in Makefile. Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libahci: fix result_tf handling after an ATA PIO data-in commandTejun Heo2-3/+16
ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in command. The host is supposed to take the TF and E_Status of the preceding PIO Setup FIS. Update ahci_qc_fill_rtf() such that it takes TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in command. Without this patch, result_tf for such a command is filled with the content of the previous D2H Reg FIS which belongs to a previous command, which can make the command incorrectly seen as failed. * Patch updated to grab the whole TF + E_Status from PIO Setup FIS instead of just E_Status as suggested by Robert Hancock. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Mark Lord <kernel@teksavvy.com> Cc: Robert Hancock <hancockrwd@gmail.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21pata_sl82c105: implement sff_irq_check() methodSergei Shtylyov1-0/+11
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21pata_sil680: implement sff_irq_check() methodSergei Shtylyov1-0/+12
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21pata_pdc202xx_old: implement sff_irq_check() methodSergei Shtylyov1-0/+23
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21pata_cmd640: implement sff_irq_check() methodSergei Shtylyov1-0/+12
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21ata_piix: Add device ID for ICH4-LBen Hutchings1-0/+2
ICH4-L is a variant of ICH4 lacking USB2 functionality and with some different device IDs. It is documented in Intel specification update 290745-025, currently at <http://www.intel.com/assets/pdf/specupdate/290745.pdf>, and is included in the device ID table for piix. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21pata_sil680: make sil680_sff_exec_command() 'static'Sergei Shtylyov1-2/+2
... since, of course, it's not used outside this driver. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21ata: Intel IDE-R supportAlan Cox1-1/+53
Intel IDE-R devices are part of the Intel AMT management setup. They don't have any special configuration registers or settings so the ata_generic driver will support them fully. Rather than add a huge table of IDs for each chipset and keep sending in new ones this patch autodetects them. Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libata: reorder ata_queued_cmd to remove alignment padding on 64 bit buildsRichard Kennedy1-3/+3
Reorder structure ata_queued_cmd to remove 8 bytes of alignment padding on 64 bit builds & therefore reduce the size of structure ata_port by 256 bytes. Overall this will have little impact, other than reducing the amount of memory that is cleared when allocating ata_ports. Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libata: Signal that our SATL supports WRITE SAME(16) with UNMAPMartin K. Petersen1-0/+14
Until now identifying that a device supports WRITE SAME(16) with the UNMAP bit set has been black magic. Implement support for the SBC-3 Thin Provisioning VPD page and set the TPWS bit. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21ata_piix: remove SIDPR lockingTejun Heo1-8/+0
Now that libata provides proper cross-port EH exclusion. The SIDPR locking added by commit 213373cf (ata_piix: fix locking around SIDPR access) is no longer necessary. Remove it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libata: implement cross-port EH exclusionTejun Heo4-1/+80
In libata, the non-EH code paths should always take and release ap->lock explicitly when accessing hardware or shared data structures. However, once EH is active, it's assumed that the port is owned by EH and EH methods don't explicitly take ap->lock unless race from irq handler or other code paths are expected. However, libata EH didn't guarantee exclusion among EHs for ports of the same host. IOW, multiple EHs may execute in parallel on multiple ports of the same controller. In many cases, especially in SATA, the ports are completely independent of each other and this doesn't cause problems; however, there are cases where different ports share the same resource, which lead to obscure timing related bugs such as the one fixed by commit 213373cf (ata_piix: fix locking around SIDPR access). This patch implements exclusion among EHs of the same host. When EH begins, it acquires per-host EH ownership by calling ata_eh_acquire(). When EH finishes, the ownership is released by calling ata_eh_release(). EH ownership is also released whenever the EH thread goes to sleep from ata_msleep() or explicitly and reacquired after waking up. This ensures that while EH is actively accessing the hardware, it has exclusive access to it while allowing EHs to interleave and progress in parallel as they hit waiting stages, which dominate the time spent in EH. This achieves cross-port EH exclusion without pervasive and fragile changes while still allowing parallel EH for the most part. This was first reported by yuanding02@gmail.com more than three years ago in the following bugzilla. :-) https://bugzilla.kernel.org/show_bug.cgi?id=8223 Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Reported-by: yuanding02@gmail.com Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libata: add @ap to ata_wait_register() and introduce ata_msleep()Tejun Heo12-48/+57
Add optional @ap argument to ata_wait_register() and replace msleep() calls with ata_msleep() which take optional @ap in addition to the duration. These will be used to implement EH exclusion. This patch doesn't cause any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21ata_piix: implement LPM supportTejun Heo1-1/+23
Now that DIPM can be used independently from HIPM, ata_piix can support LPM too. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libata: implement LPM support for port multipliersTejun Heo3-10/+67
Port multipliers can do DIPM on fan-out links fine. Implement support for it. Tested w/ SIMG 57xx and marvell PMPs. Both the host and fan-out links enter power save modes nicely. SIMG 37xx and 47xx report link offline on SStatus causing EH to detach the devices. Blacklisted. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21libata: reimplement link power managementTejun Heo9-356/+206
The current LPM implementation has the following issues. * Operation order isn't well thought-out. e.g. HIPM should be configured after IPM in SControl is properly configured. Not the other way around. * Suspend/resume paths call ata_lpm_enable/disable() which must only be called from EH context directly. Also, ata_lpm_enable/disable() were called whether LPM was in use or not. * Implementation is per-port when it should be per-link. As a result, it can't be used for controllers with slave links or PMP. * LPM state isn't managed consistently. After a link reset for whatever reason including suspend/resume the actual LPM state would be reset leaving ap->lpm_policy inconsistent. * Generic/driver-specific logic boundary isn't clear. Currently, libahci has to mangle stuff which libata EH proper should be handling. This makes the implementation unnecessarily complex and fragile. * Tied to ALPM. Doesn't consider DIPM only cases and doesn't check whether the device allows HIPM. * Error handling isn't implemented. Given the extent of mismatch with the rest of libata, I don't think trying to fix it piecewise makes much sense. This patch reimplements LPM support. * The new implementation is per-link. The target policy is still port-wide (ap->target_lpm_policy) but all the mechanisms and states are per-link and integrate well with the rest of link abstraction and can work with slave and PMP links. * Core EH has proper control of LPM state. LPM state is reconfigured when and only when reconfiguration is necessary. It makes sure that LPM state is reset when probing for new device on the link. Controller agnostic logic is now implemented in libata EH proper and driver implementation only has to deal with controller specifics. * Proper error handling. LPM config failure is attributed to the device on the link and LPM is disabled for the link if it fails repeatedly. * ops->enable/disable_pm() are replaced with single ops->set_lpm() which takes @policy and @hints. This simplifies driver specific implementation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>