summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CRIS: Minor generic kernel/traps.c changes.Jesper Nilsson2008-02-081-87/+139
| | | | | | | - Collect extern declarations at top of file. - Change raw_printk to printk, use oops_in_progress instead. - Fix formatting and whitespace. - Allow the watchdog to be disabled during oops.
* CRIS: Minor fixes to mm/fault.cJesper Nilsson2008-02-081-141/+28
| | | | | | | - Only disallow oops if we're in_interrupt context (was in_atomic before) - Use the generic oops_in_progress instead of the raw_printk hack. - Fix whitespace/formatting. - Remove CVS log entries.
* CRIS v32: Add headers for EtraxFS and Artpec-3 chips.Jesper Nilsson2008-02-081-0/+3
|
* CRIS v32: Add prototypes for cache flushingJesper Nilsson2008-02-081-0/+11
| | | | We need these to work around some cache bugs in CRISv32 chips.
* CRIS: Remove unnecessary CVS log from cris/mm/init.cJesper Nilsson2008-02-081-111/+0
|
* CRIS v32: Update asm-cris/arch-v32/irq.h for ETRAX FS and ARTPEC-3Jesper Nilsson2008-02-081-5/+10
| | | | | | - Correct include to use <> - Rework calculation of number of IRQs and exceptions we have. - Remove useless "mask" argument to BUILD_IRQ macro
* CRIS: Merge axisflashmap.h with Axis internal changes.Jesper Nilsson2008-02-081-12/+27
| | | | | | | - Add partition table struct to be used to parse partition table in flash. - Add JFFS2 as a type, and add readoly flag. - Improve some comments. - Lindent has been run, fixing whitespace and formatting issues.
* CRIS v32: Update synchronous serial driver.Jesper Nilsson2008-02-081-341/+599
| | | | | Now uses a DMA descriptor ring, which should avoid any unnecessary pauses in the streams.
* CRIS v32: Add SECOND_WORD_SYNC, used in sync_serial.Jesper Nilsson2008-02-081-0/+1
|
* CRIS v32: Add L2 cache initialization code.Jesper Nilsson2008-02-081-0/+29
|
* CRIS v32: Add hardware dependent include files and defconfigs for ETRAX FS ↵Jesper Nilsson2008-02-0865-0/+19631
| | | | | | | | and ARTPEC-3 chips. The header files describe the hardware registers available in both these chips, note that most of this documentation is automatically generated from the hardware implementation.
* CRIS v32: Add new machine dependent files for Etrax-FS and Artpec-3.Jesper Nilsson2008-02-0823-186/+3470
| | | | | | | | The two chips are somewhat different, and needs different handling. Adds handing of the dma, dram initialization, hardware settings, io, memory arbiter and pinmux Also moves the dma, dram initialization and io from CRIS v32 common files.
* CRIS v32: Add new driver files for Etrax-FSJesper Nilsson2008-02-083-0/+1149
| | | | Adds gpio and nandflash handling for Etrax-FS
* CRIS v32: Add new driver files for Artpec-3.Jesper Nilsson2008-02-083-0/+1168
| | | | Adds gpio and nandflash handling for Artpec-3.
* CRIS: Rearrange Kconfigs for v10 and v32 to allow compilation without warnings.Jesper Nilsson2008-02-085-536/+988
| | | | | | | | | | | - Remove some unneeded configs and add some new ones. - Merge common config items to common file instead of duplicating them. - Pull in standard Kconfig.preempt. - Remove some unneeded Kconfigs for subsystems not (yet) available on CRIS (md, scsi, ieee1394, i2o, isdn, telephony, media, pcmcia, pci) - Rename CRISv32 config items which had different types from CRISv10. (ETRAX_LED2G, ETRAX_LED2R, ETRAX_LED3G, ETRAX_LED3R, ETRAX_I2C_DATA_PORT, ETRAX_I2C_CLK_PORT)
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dmLinus Torvalds2008-02-0715-483/+1372
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (44 commits) dm raid1: report fault status dm raid1: handle read failures dm raid1: fix EIO after log failure dm raid1: handle recovery failures dm raid1: handle write failures dm snapshot: combine consecutive exceptions in memory dm: stripe enhanced status return dm: stripe trigger event on failure dm log: auto load modules dm: move deferred bio flushing to workqueue dm crypt: use async crypto dm crypt: prepare async callback fn dm crypt: add completion for async dm crypt: add async request mempool dm crypt: extract scatterlist processing dm crypt: tidy io ref counting dm crypt: introduce crypt_write_io_loop dm crypt: abstract crypt_write_done dm crypt: store sector mapping in dm_crypt_io dm crypt: move queue functions ...
| * dm raid1: report fault statusJonathan Brassow2008-02-081-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds extra information to the mirror status output, so that it can be determined which device(s) have failed. For each mirror device, a character is printed indicating the most severe error encountered. The characters are: * A => Alive - No failures * D => Dead - A write failure occurred leaving mirror out-of-sync * S => Sync - A sychronization failure occurred, mirror out-of-sync * R => Read - A read failure occurred, mirror data unaffected This allows userspace to properly reconfigure the mirror set. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm raid1: handle read failuresJonathan Brassow2008-02-081-45/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch gives the ability to respond-to/record device failures that happen during read operations. It also adds the ability to read from mirror devices that are not the primary if they are in-sync. There are essentially two read paths in mirroring; the direct path and the queued path. When a read request is mapped, if the region is 'in-sync' the direct path is taken; otherwise the queued path is taken. If the direct path is taken, we must record bio information so that if the read fails we can retry it. We then discover the status of a direct read through mirror_end_io. If the read has failed, we will mark the device from which the read was attempted as failed (so we don't try to read from it again), restore the bio and try again. If the queued path is taken, we discover the results of the read from 'read_callback'. If the device failed, we will mark the device as failed and attempt the read again if there is another device where this region is known to be 'in-sync'. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm raid1: fix EIO after log failureJonathan Brassow2008-02-081-11/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to requeue write I/O to core device-mapper when there is a log device failure. If a write to the log produces and error, the pending writes are put on the "failures" list. Since the log is marked as failed, they will stay on the failures list until a suspend happens. Suspends come in two phases, presuspend and postsuspend. We must make sure that all the writes on the failures list are requeued in the presuspend phase (a requirement of dm core). This means that recovery must be complete (because writes may be delayed behind it) and the failures list must be requeued before we return from presuspend. The mechanisms to ensure recovery is complete (or stopped) was already in place, but needed to be moved from postsuspend to presuspend. We rely on 'flush_workqueue' to ensure that the mirror thread is complete and therefore, has requeued all writes in the failures list. Because we are using flush_workqueue, we must ensure that no additional 'queue_work' calls will produce additional I/O that we need to requeue (because once we return from presuspend, we are unable to do anything about it). 'queue_work' is called in response to the following functions: - complete_resync_work = NA, recovery is stopped - rh_dec (mirror_end_io) = NA, only calls 'queue_work' if it is ready to recover the region (recovery is stopped) or it needs to clear the region in the log* **this doesn't get called while suspending** - rh_recovery_end = NA, recovery is stopped - rh_recovery_start = NA, recovery is stopped - write_callback = 1) Writes w/o failures simply call bio_endio -> mirror_end_io -> rh_dec (see rh_dec above) 2) Writes with failures are put on the failures list and queue_work is called** ** write_callbacks don't happen during suspend ** - do_failures = NA, 'queue_work' not called if suspending - add_mirror (initialization) = NA, only done on mirror creation - queue_bio = NA, 1) delayed I/O scheduled before flush_workqueue is called. 2) No more I/Os are being issued. 3) Re-attempted READs can still be handled. (Write completions are handled through rh_dec/ write_callback - mention above - and do not use queue_bio.) Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm raid1: handle recovery failuresJonathan Brassow2008-02-081-3/+20
| | | | | | | | | | | | | | | | | | | | This patch adds the calls to 'fail_mirror' if an error occurs during mirror recovery (aka resynchronization). 'fail_mirror' is responsible for recording the type of error by mirror device and ensuring an event gets raised for the purpose of notifying userspace. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm raid1: handle write failuresJonathan Brassow2008-02-081-26/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch gives mirror the ability to handle device failures during normal write operations. The 'write_callback' function is called when a write completes. If all the writes failed or succeeded, we report failure or success respectively. If some of the writes failed, we call fail_mirror; which increments the error count for the device, notes the type of error encountered (DM_RAID1_WRITE_ERROR), and selects a new primary (if necessary). Note that the primary device can never change while the mirror is not in-sync (IOW, while recovery is happening.) This means that the scenario where a failed write changes the primary and gives recovery_complete a chance to misread the primary never happens. The fact that the primary can change has necessitated the change to the default_mirror field. We need to protect against reading garbage while the primary changes. We then add the bio to a new list in the mirror set, 'failures'. For every bio in the 'failures' list, we call a new function, '__bio_mark_nosync', where we mark the region 'not-in-sync' in the log and properly set the region state as, RH_NOSYNC. Userspace must also be notified of the failure. This is done by 'raising an event' (dm_table_event()). If fail_mirror is called in process context the event can be raised right away. If in interrupt context, the event is deferred to the kmirrord thread - which raises the event if 'event_waiting' is set. Backwards compatibility is maintained by ignoring errors if the DM_FEATURES_HANDLE_ERRORS flag is not present. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm snapshot: combine consecutive exceptions in memoryMilan Broz2008-02-082-16/+116
| | | | | | | | | | | | | | | | | | Provided sector_t is 64 bits, reduce the in-memory footprint of the snapshot exception table by the simple method of using unused bits of the chunk number to combine consecutive entries. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: stripe enhanced status returnBrian Wood2008-02-081-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds additional information to the status line. It is added at the end of the returned text so it will not interfere with existing implementations using this data. The addition of this information will allow for a common return interface to match that returned with the dm-raid1.c status line (with Jonathan Brassow's patches). Here is a sample of what is returned with a mirror "status" call: isw_eeaaabgfg_mirror: 0 488390920 mirror 2 8:16 8:32 3727/3727 1 AA 1 core Here's what's returned with this patch for a stripe "status" call: isw_dheeijjdej_stripe: 0 976783872 striped 2 8:16 8:32 1 AA Signed-off-by: Brian Wood <brian.j.wood@intel.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: stripe trigger event on failureBrian Wood2008-02-081-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the stripe_end_io function to process errors that might occur after an IO operation. As part of this there are a number of enhancements made to record and trigger events: - New atomic variable in struct stripe to record the number of errors each stripe volume device has experienced (could be used later with uevents to report back directly to userspace) - New workqueue/work struct setup to process the trigger_event function - New end_io function. It is here that testing for BIO error conditions take place. It determines the exact stripe that cause the error, records this in the new atomic variable, and calls the queue_work() function - New trigger_event function to process failure events. This calls dm_table_event() Signed-off-by: Brian Wood <brian.j.wood@intel.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm log: auto load modulesJonathan Brassow2008-02-081-1/+50
| | | | | | | | | | | | | | | | If the log type is not recognised, attempt to load the module 'dm-log-<type>.ko'. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: move deferred bio flushing to workqueueMilan Broz2008-02-081-12/+67
| | | | | | | | | | | | | | | | | | Add a single-thread workqueue for each mapped device and move flushing of the lists of pushback and deferred bios to this new workqueue. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: use async cryptoMilan Broz2008-02-081-59/+72
| | | | | | | | | | | | | | | | | | | | dm-crypt: Use crypto ablkcipher interface Move encrypt/decrypt core to async crypto call. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: prepare async callback fnMilan Broz2008-02-081-4/+41
| | | | | | | | | | | | | | | | | | | | dm-crypt: Use crypto ablkcipher interface Prepare callback function for async crypto operation. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: add completion for asyncMilan Broz2008-02-081-0/+21
| | | | | | | | | | | | | | | | | | dm-crypt: Use crypto ablkcipher interface Prepare completion for async crypto request. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: add async request mempoolMilan Broz2008-02-081-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | dm-crypt: Use crypto ablkcipher interface Introduce mempool for async crypto requests. cc->req is used mainly during synchronous operations (to prevent allocation and deallocation of the same object). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: extract scatterlist processingMilan Broz2008-02-081-24/+39
| | | | | | | | | | | | | | | | | | | | dm-crypt: Use crypto ablkcipher interface Move scatterlists to separate dm_crypt_struct and pick out block processing from crypt_convert. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: tidy io ref countingMilan Broz2008-02-081-12/+8
| | | | | | | | | | | | | | Make io reference counting more obvious. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: introduce crypt_write_io_loopMilan Broz2008-02-081-5/+11
| | | | | | | | | | | | | | Introduce crypt_write_io_loop(). Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: abstract crypt_write_doneMilan Broz2008-02-081-16/+25
| | | | | | | | | | | | | | | | Process write request in separate function and queue final bio through io workqueue. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: store sector mapping in dm_crypt_ioMilan Broz2008-02-081-7/+7
| | | | | | | | | | | | | | Add sector into dm_crypt_io instead of using local variable. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: move queue functionsAlasdair G Kergon2008-02-081-28/+26
| | | | | | | | | | | | Reorder kcryptd functions for clarity. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: adjust io processing functionsMilan Broz2008-02-081-15/+25
| | | | | | | | | | | | | | | | Rename functions to follow calling convention. Prepare write io error processing function skeleton. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: tidy crypt_endioMilan Broz2008-02-081-11/+6
| | | | | | | | | | | | | | Simplify crypt_endio function. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: move error setting outside crypt_dec_pendingMilan Broz2008-02-081-11/+25
| | | | | | | | | | | | | | | | Move error code setting outside of crypt_dec_pending function. Use -EIO if crypt_convert_scatterlist() fails. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: remove unnecessary crypt_context write parmMilan Broz2008-02-081-6/+4
| | | | | | | | | | | | | | Remove write attribute from convert_context and use bio flag instead. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm crypt: move convert_context inside dm_crypt_ioMilan Broz2008-02-081-20/+21
| | | | | | | | | | | | | | | | Move convert_context inside dm_crypt_io. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm mpath: add missing staticAlasdair G Kergon2008-02-081-1/+1
| | | | | | | | | | | | A static declaration missing. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: targets no longer experimentalAlasdair G Kergon2008-02-081-12/+12
| | | | | | | | | | | | | | Drop the EXPERIMENTAL tag from well-established device-mapper targets, so the newer ones stand out better. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: refactor dm_suspend completion waitMilan Broz2008-02-081-16/+27
| | | | | | | | | | | | | | Move completion wait to separate function Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: split dm_suspend io_lock hold into twoMilan Broz2008-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change io_locking to allow processing flush in separate thread. Because we have DMF_BLOCK_IO already set, any possible new ios are queued in dm_requests now. In the case of interrupting previous wait there can be more ios queued (we unlocked io_lock for a while) but this is safe. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: tidy dm_suspendMilan Broz2008-02-081-10/+11
| | | | | | | | | | | | | | | | | | | | | | Tidy dm_suspend function - change return value logic in dm_suspend - use atomic_read only once. - move DMF_BLOCK_IO clearing into one place Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: refactor deferred bio_list processingMilan Broz2008-02-081-38/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor deferred bio_list processing. - use separate _merge_pushback_list function - move deferred bio list pick up to flush function - use bio_list_pop instead of bio_list_get - simplify noflush flag use No real functional change in this patch. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: tidy alloc_dev labelsMilan Broz2008-02-081-13/+13
| | | | | | | | | | | | | | | | | | Tidy labels in alloc_dev to make later patches more clear. No functional change in this patch. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm ioctl: use uninitialized_varAndrew Morton2008-02-081-1/+1
| | | | | | | | | | | | | | drivers/md/dm-ioctl.c:1405: warning: 'param' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * dm: table use uninitialized_varAndrew Morton2008-02-081-1/+1
| | | | | | | | | | | | | | | | drivers/md/dm-table.c: In function 'dm_get_device': drivers/md/dm-table.c:478: warning: 'dev' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alasdair G Kergon <agk@redhat.com>