summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ocfs2: avoid unaligned access to dqc_bitmapAkinobu Mita2011-12-012-5/+52
| | | | | | | | | | | | | | | | | | | | | | The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned, but not 64-bit aligned. The dqc_bitmap is accessed by ocfs2_set_bit(), ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit(). These are wrapper macros for ext2_*_bit() which need to take an unsigned long aligned address (though some architectures are able to handle unaligned address correctly) So some 64bit architectures may not be able to access the dqc_bitmap correctly. This avoids such unaligned access by using another wrapper functions for ext2_*_bit(). The code is taken from fs/ext4/mballoc.c which also need to handle unaligned bitmap access. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* ocfs2: Use filemap_write_and_wait() instead of write_inode_now()Jan Kara2011-11-171-1/+1
| | | | | | | | | | Since ocfs2 has no ->write_inode method, there's no point in calling write_inode_now() from ocfs2_cleanup_delete_inode(). Use filemap_write_and_wait() instead. This helps us to cleanup inode writing interfaces... Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* ocfs2: honor O_(D)SYNC flag in fallocateMark Fasheh2011-11-171-0/+3
| | | | | | | | We need to sync the transaction which updates i_size if the file is marked as needing sync semantics. Signed-off-by: Mark Fasheh <mfasheh@suse.de> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* ocfs2: Add a missing journal credit in ocfs2_link_credits() -v2Xiaowei.Hu2011-11-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With indexed_dir enabled, ocfs2 maintains a list of dirblocks having space. The credit calculation in ocfs2_link_credits() did not correctly account for adding an entry that exactly fills a dirblock that triggers removing that dirblock by changing the pointer in the previous block in the list. The credit calculation did not account for that previous block. To expose, do: mkfs.ocfs2 -b 512 -M local /dev/sdX mount /dev/sdX /ocfs2 mkdir /ocfs2/linkdir touch /ocfs2/linkdir/file1 for i in `seq 1 29` ; do link /ocfs2/linkdir/file1 /ocfs2/linkdir/linklinklinklinklinklink$i; done rm -f /ocfs2/linkdir/linklinklinklinklinklink10 sleep 8 link /ocfs2/linkdir/file1 /ocfs2/linkdir/linklinklinklinklinklinkaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Note: The link names have been crafted for a 512 byte blocksize. Reproducing with a larger blocksize will require longer (or more) links. The sleep is important. We want jbd2 to commit the transaction so that the missing block does not piggy back on account of the previous transaction. Signed-off-by: XiaoweiHu <xiaowei.hu at oracle.com> Reviewed-by: WengangWang <wen.gang.wang at oracle.com> Reviewed-by: Sunil.Mushran <sunil.mushran at oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* ocfs2: send correct UUID to cleancache initializationDan Magenheimer2011-11-171-1/+1
| | | | | | | | | | | | | | ocfs2: Fix cleancache initialization call to correctly pass uuid As reported by Steven Whitehouse in https://lkml.org/lkml/2011/5/27/221 the ocfs2 volume UUID is incorrectly passed to cleancache. As a result, shared-ephemeral tmem pools will not actually be created; instead they will be private (unshared) which misses out on a major benefit of tmem. Reported-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* ocfs2: Commit transactions in error cases -v2Wengang Wang2011-11-173-6/+9
| | | | | | | | | | There are three cases found that in error cases, journal transactions are not committed nor aborted. We should take care of these case by committing the transactions. Otherwise, there would left a journal handle which will lead to , in same process context, the comming ocfs2_start_trans() gets wrong credits. Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* ocfs2: make direntry invalid when deleting itWengang Wang2011-11-171-2/+1Star
| | | | | | | | | | | | | | | | | | When we deleting a direntry from a directory, if it's the first in a block we invalid it by setting inode to 0; otherwise, we merge the deleted one to the prior and contiguous direntry. And we don't truncate directories. There is a problem for the later case since inode is not set to 0. This problem happens when the caller passes a file position as parameter to ocfs2_dir_foreach_blk(). If the position happens to point to a stale(not the first, deleted in betweens of ocfs2_dir_foreach_blk()s) direntry, we are not able to recognize its staleness. So that we treat it as a live one wrongly. The fix is to set inode to 0 in both cases indicating the direntry is stale. This won't introduce additional IOs. Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_freeJulia Lawall2011-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Memory allocated using kmem_cache_zalloc should be freed using kmem_cache_free, not kfree. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,e,e1,e2; @@ x = kmem_cache_zalloc(e1,e2) ... when != x = e ?-kfree(x) +kmem_cache_free(e1,x) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Joel Becker <jlbec@evilplan.org>
* Merge branch 'mw-3.1-jul25' of git://oss.oracle.com/git/smushran/linux-2.6 ↵Joel Becker2011-08-224577-119139/+261695
|\ | | | | | | into ocfs2-fixes
| * ocfs2: Implement llseek()Sunil Mushran2011-07-253-2/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2 implements its own llseek() to provide the SEEK_HOLE/SEEK_DATA functionality. SEEK_HOLE sets the file pointer to the start of either a hole or an unwritten (preallocated) extent, that is greater than or equal to the supplied offset. SEEK_DATA sets the file pointer to the start of an allocated extent (not unwritten) that is greater than or equal to the supplied offset. If the supplied offset is on a desired region, then the file pointer is set to it. Offsets greater than or equal to the file size return -ENXIO. Unwritten (preallocated) extents are considered holes because the file system treats reads to such regions in the same way as it does to holes. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2: Fix ocfs2_page_mkwrite()Wengang Wang2011-07-242-37/+67
| | | | | | | | | | | | | | | | | | | | | | | | This patch address two shortcomings in ocfs2_page_mkwrite(): 1. Makes the function return better VM_FAULT_* errors. 2. It handles a error that is triggered when a page is dropped from the mapping due to memory pressure. This patch locks the page to prevent that. [Patch was cleaned up by Sunil Mushran.] Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2: Add comment about orphan scanningSunil Mushran2011-07-241-0/+14
| | | | | | | | | | | | Add a comment that explains the reason as to why orphan scan scans all the slots. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2: Clean up messages in the fsSunil Mushran2011-07-244-14/+22
| | | | | | | | | | | | Convert useful messages from ML_NOTICE to KERN_NOTICE to improve readability. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/cluster: Cluster up now includes network connections tooSunil Mushran2011-07-242-13/+61
| | | | | | | | | | | | | | | | | | | | | | | | The cluster up check only checks to see if the node is heartbeating or not. If yes it continues assuming that the node is connected to all the nodes. But if that is not the case, the cluster join aborts with a stack of errors that are not easy to comprehend. This patch adds the network connect check upfront and prints the nodes that the node is not yet connected to, before aborting. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/cluster: Add new function o2net_fill_node_map()Sunil Mushran2011-07-243-33/+90
| | | | | | | | | | | | | | | | Patch adds function o2net_fill_node_map() to return the bitmap of nodes that it is connected to. This bitmap is also accessible by the user via the debugfs file, /sys/kernel/debug/o2net/connected_nodes. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/cluster: Fix output in file elapsed_time_in_msSunil Mushran2011-07-241-3/+6
| | | | | | | | | | | | | | The o2hb debugfs file, elapsed_time_in_ms, should return values only after the timer is armed atleast once. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: dlmlock_remote() needs to account for remasterySunil Mushran2011-07-241-10/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In dlmlock_remote(), we wait for the resource to stop being active before setting the inprogress flag. Active includes recovery, migration, etc. The problem here is that if the resource was being recovered or migrated, the new owner could very well be that node itself (and thus not a remote node). This problem was observed in Oracle bug#12583620. The error messages observed were as follows: dlm_send_remote_lock_request:337 ERROR: Error -40 (ELOOP) when sending message 503 (key 0xd6d8c7) to node 2 dlmlock_remote:271 ERROR: dlm status = DLM_BADARGS dlmlock:751 ERROR: dlm status = DLM_BADARGS Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: Take inflight reference count for remotely mastered resources tooSunil Mushran2011-07-243-39/+32Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The inflight reference count, in the lock resource, is taken to pin the resource in memory. We take it when a new resource is created and release it after a lock is attached to it. We do this to prevent the resource from getting purged prematurely. Earlier this reference count was being taken for locally mastered resources only. This patch extends the same functionality for remotely mastered ones. We are doing this because the same premature purging could occur for remotely mastered resources if the remote node were to die before completion of the create lock. Fix for Oracle bug#12405575. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: Cleanup dlm_wait_for_node_death() and dlm_wait_for_node_recovery()Sunil Mushran2011-07-242-26/+24Star
| | | | | | | | | | | | dlm_wait_for_node_death() and dlm_wait_for_node_recovery() needed a facelift. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: Trace insert/remove of resource to/from hashSunil Mushran2011-07-243-11/+15
| | | | | | | | | | | | Add mlog to trace adding and removing the resource from/to the hash table. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: Clean up refmap helpersSunil Mushran2011-07-243-79/+66Star
| | | | | | | | | | | | | | Patch cleans up helpers that set/clear refmap bits and grab/drop inflight lock ref counts. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: Cleanup up dlm_finish_local_lockres_recovery()Sunil Mushran2011-07-241-32/+25Star
| | | | | | | | | | | | dlm_finish_local_lockres_recovery() needed a facelift. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2: Clean up messages in stack_o2cb.cSunil Mushran2011-07-241-2/+2
| | | | | | | | | | | | o2cb messages needed a facelift. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/dlm: Clean up messages in o2dlmSunil Mushran2011-07-245-70/+71
| | | | | | | | | | | | o2dlm messages needed a facelift. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/cluster: Clean up messages in o2netSunil Mushran2011-07-241-66/+53Star
| | | | | | | | | | | | o2net messages needed a facelift. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * ocfs2/cluster: Abort heartbeat start on hard-ro devicesSunil Mushran2011-07-241-69/+116
| | | | | | | | | | | | | | | | | | | | | | | | Currently if the heartbeat device is hard-ro, the o2hb thread keeps chugging along and dumping errors along the way. The user needs to manually stop the heartbeat. The patch addresses this shortcoming by adding a limit to the number of times the hb thread will iterate in an unsteady state. If the hb thread does not ready steady state in that many interation, the start is aborted. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
| * Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2011-07-24211-5754/+7199
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (237 commits) ARM: 7004/1: fix traps.h compile warnings ARM: 6998/2: kernel: use proper memory barriers for bitops ARM: 6997/1: ep93xx: increase NR_BANKS to 16 for support of 128MB RAM ARM: Fix build errors caused by adding generic macros ARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU ARM: CPU hotplug: pass in proper affinity mask on IRQ migration ARM: GIC: avoid routing interrupts to offline CPUs ARM: CPU hotplug: fix abuse of irqdesc->node ARM: 6981/2: mmci: adjust calculation of f_min ARM: 7000/1: LPAE: Use long long printk format for displaying the pud ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state ARM: btc: avoid invalidating the branch target cache on kernel TLB maintanence ARM: ARM_DMA_ZONE_SIZE is no more ARM: mach-shark: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-sa1100: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-realview: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-pxa: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-ixp4xx: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-h720x: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size ...
| | * Merge branch 'devel-stable' into for-nextRussell King2011-07-23107-4020/+5104
| | |\ | | | | | | | | | | | | | | | | Conflicts: arch/arm/kernel/entry-armv.S
| | | * ARM: Fix build errors caused by adding generic macrosRussell King2011-07-218-21/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 66a625a (ARM: mm: proc-macros: Add generic proc/cache/tlb struct definition macros) introduced build errors when PM_SLEEP is not enabled. The per-CPU do_suspend/do_resume functions are defined via the preprocessor to constant 0. However, the macros which use these were converted to assembly, resulting in undefined references to these functions. Fix that by moving the ! ifdef section into proc-macros.S and deleting it from all effected proc-*.S files. Acked-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | | * Merge branch 'dma' of http://git.linaro.org/git/people/nico/linux into ↵Russell King2011-07-1955-288/+304
| | | |\ | | | | | | | | | | | | | | | devel-stable
| | | | * ARM: ARM_DMA_ZONE_SIZE is no moreNicolas Pitre2011-07-182-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One less dependency on mach/memory.h. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-shark: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-182-2/+1Star
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-sa1100: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-184-4/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-realview: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-186-4/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-pxa: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-182-4/+3Star
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-ixp4xx: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-1813-4/+48
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-h720x: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-183-7/+2Star
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_sizeNicolas Pitre2011-07-1813-7/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: add dma_zone_size to the machine_desc structureNicolas Pitre2011-07-182-0/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * ARM: change ARM_DMA_ZONE_SIZE into a variableNicolas Pitre2011-07-182-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having this value defined at compile time prevents multiple machines with conflicting definitions to coexist. Move it to a variable in preparation for having a per machine value selected at run time. This is relevant only when CONFIG_ZONE_DMA is selected. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | * | Merge branch 'kprobes-thumb' of git://git.yxit.co.uk/linux into devel-stableRussell King2011-07-15436-3923/+31057
| | | |\ \
| | | | * | ARM: kprobes: Remove now unused codeJon Medhurst2011-07-131-738/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Decode ARM preload (immediate) instructionsJon Medhurst2011-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were missing from the previous implementation. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Reject probing of unprivileged load and store instructionsJon Medhurst2011-07-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These occur extremely rarely in the kernel and writing test cases for them is difficult. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Use new versions of emulate_ldr() and emulate_str()Jon Medhurst2011-07-131-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Add new versions of emulate_ldr() and emulate_str()Jon Medhurst2011-07-131-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These use the register calling conventions required by the new decoding table framework for calling simulated instructions. We rename the old versions of these functions to *_old for now. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Add emulate_rdlo12rdhi16rn0rm8_rwflags_nopc()Jon Medhurst2011-07-131-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM multiply long instructions. It replaces use of prep_emulate_rdhi16rdlo12rs8rm0_wflags(). Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Add emulate_rd12rm0_noflags_nopc()Jon Medhurst2011-07-131-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM bit-field manipulation instructions. Various other instruction forms can also make use of this and it is used to replace use of prep_emulate_rd12{rm0}{_modify} Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Replace use of prep_emulate_rd12rn16rm0_wflags()Jon Medhurst2011-07-131-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These can now use emulate_rd12rn16rm0_rwflags_nopc(). Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
| | | | * | ARM: kprobes: Add emulate_rd16rn12rm0rs8_rwflags_nopc()Jon Medhurst2011-07-131-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the emulation function for the instruction format used by the ARM multiply-accumulate instructions. These don't allow use of PC so we don't have to add special cases for this. This function is used to replace use of prep_emulate_rd16rs8rm0_wflags and prep_emulate_rd16rn12rs8rm0_wflags. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>