summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.infradead.org/~dwmw2/rbtree-2.6Linus Torvalds2006-06-2013-136/+140
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/~dwmw2/rbtree-2.6: [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency Update UML kernel/physmem.c to use rb_parent() accessor macro [RBTREE] Update hrtimers to use rb_parent() accessor macro. [RBTREE] Add explicit alignment to sizeof(long) for struct rb_node. [RBTREE] Merge colour and parent fields of struct rb_node. [RBTREE] Remove dead code in rb_erase() [RBTREE] Update JFFS2 to use rb_parent() accessor macro. [RBTREE] Update eventpoll.c to use rb_parent() accessor macro. [RBTREE] Update key.c to use rb_parent() accessor macro. [RBTREE] Update ext3 to use rb_parent() accessor macro. [RBTREE] Change rbtree off-tree marking in I/O schedulers. [RBTREE] Add accessor macros for colour and parent fields of rb_node
| * [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistencyDavid Woodhouse2006-06-052-16/+16
| | | | | | | | | | | | | | Since rb_insert_color() is part of the _public_ API, while the others are purely internal, switch to be consistent with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * Update UML kernel/physmem.c to use rb_parent() accessor macroAndrew Morton2006-05-011-1/+1
| | | | | | | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update hrtimers to use rb_parent() accessor macro.David Woodhouse2006-04-222-3/+3
| | | | | | | | | | | | | | Also switch it to use the same method of using off-tree nodes as everyone else now does -- set them to point to themselves. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Add explicit alignment to sizeof(long) for struct rb_node.David Woodhouse2006-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | Seems like a strange requirement, but allegedly it was necessary for struct address_space on CRIS, because it otherwise ended up being only byte-aligned. It's harmless enough, and easier to just do it than to prove it isn't necessary... although I really ought to dig out my etrax board and test it some time. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Merge colour and parent fields of struct rb_node.David Woodhouse2006-04-212-101/+109
| | | | | | | | | | | | | | | | | | We only used a single bit for colour information, so having a whole machine word of space allocated for it was a bit wasteful. Instead, store it in the lowest bit of the 'parent' pointer, since that was always going to be aligned anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Remove dead code in rb_erase()David Woodhouse2006-04-211-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observe rb_erase(), when the victim node 'old' has two children so neither of the simple cases at the beginning are taken. Observe that it effectively does an 'rb_next()' operation to find the next (by value) node in the tree. That is; we go to the victim's right-hand child and then follow left-hand pointers all the way down the tree as far as we can until we find the next node 'node'. We end up with 'node' being either the same immediate right-hand child of 'old', or one of its descendants on the far left-hand side. For a start, we _know_ that 'node' has a parent. We can drop that check. We also know that if 'node's parent is 'old', then 'node' is the right-hand child of its parent. And that if 'node's parent is _not_ 'old', then 'node' is the left-hand child of its parent. So instead of checking for 'node->rb_parent == old' in one place and also checking 'node's heritage separately when we're trying to change its link from its parent, we can shuffle things around a bit and do it like this... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update JFFS2 to use rb_parent() accessor macro.David Woodhouse2006-04-212-10/+9
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update eventpoll.c to use rb_parent() accessor macro.David Woodhouse2006-04-211-3/+3
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update key.c to use rb_parent() accessor macro.David Woodhouse2006-04-211-4/+4
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Update ext3 to use rb_parent() accessor macro.David Woodhouse2006-04-211-1/+1
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Change rbtree off-tree marking in I/O schedulers.David Woodhouse2006-04-213-13/+5
| | | | | | | | | | | | | | | | | | They were abusing the rb_color field to mark nodes which weren't currently on the tree. Fix that to use the same method as eventpoll did -- setting the parent pointer to point back to itself. And use the appropriate accessor macros for setting and reading the parent. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * [RBTREE] Add accessor macros for colour and parent fields of rb_nodeDavid Woodhouse2006-04-211-0/+9
| | | | | | | | | | | | | | | | This is in preparation for merging those fields into a single 'unsigned long', because using a whole machine-word for a single bit of colour information is wasteful. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge git://git.infradead.org/mtd-2.6Linus Torvalds2006-06-20124-6710/+11074
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/mtd-2.6: (199 commits) [MTD] NAND: Fix breakage all over the place [PATCH] NAND: fix remaining OOB length calculation [MTD] NAND Fixup NDFC merge brokeness [MTD NAND] S3C2410 driver cleanup [MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation. [JFFS2] Check CRC32 on dirent and data nodes each time they're read [JFFS2] When retiring nextblock, allocate a node_ref for the wasted space [JFFS2] Mark XATTR support as experimental, for now [JFFS2] Don't trust node headers before the CRC is checked. [MTD] Restore MTD_ROM and MTD_RAM types [MTD] assume mtd->writesize is 1 for NOR flashes [MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compiles [MTD] Prepare physmap for 64-bit-resources [JFFS2] Fix more breakage caused by janitorial meddling. [JFFS2] Remove stray __exit from jffs2_compressors_exit() [MTD] Allow alternate JFFS2 mount variant for root filesystem. [MTD] Disconnect struct mtd_info from ABI [MTD] replace MTD_RAM with MTD_GENERIC_TYPE [MTD] replace MTD_ROM with MTD_GENERIC_TYPE [MTD] remove a forgotten MTD_XIP ...
| * | [MTD] NAND: Fix breakage all over the placeThomas Gleixner2006-06-204-88/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following problems are addressed: - wrong status caused early break out of nand_wait() - removed the bogus status check in nand_wait() which is a relict of the abandoned support for interrupted erase. - status check moved to the correct place in read_oob - oob support for syndrom based ecc with strange layouts - use given offset in the AUTOOOB based oob operations Partially based on a patch from Vitaly Vool <vwool@ru.mvista.com> Thanks to Savin Zlobec <savin@epico.si> for tracking down the status problem. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [PATCH] NAND: fix remaining OOB length calculationVitaly Wool2006-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In nand_read_page_syndrome/nand_write_page_syndrome the calculation of the remaining oob length which is not used by the prepad/ecc/postpad areas is wrong. Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] NAND Fixup NDFC merge brokenessThomas Gleixner2006-06-201-9/+4
| | | | | | | | | | | | | | | | | | Remove the remains of a broken merge. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD NAND] S3C2410 driver cleanupBen Dooks2006-06-191-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix unused variables and commenting since tglx's new NAND updates Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD NAND] s3c24x0 board: Fix clock handling, ensure proper initialisation.Ben Dooks2006-06-192-5/+81
| | | | | | | | | | | | | | | Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Check CRC32 on dirent and data nodes each time they're readDavid Woodhouse2006-06-182-15/+38
| | | | | | | | | | | | | | | | | | | | | Also, make sure dirents are marked REF_UNCHECKED when we 'discover' them through eraseblock summary. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] When retiring nextblock, allocate a node_ref for the wasted spaceDavid Woodhouse2006-06-181-4/+22
| | | | | | | | | | | | | | | | | | | | | Failing to do so makes the calculated length of the last node incorrect, when we're not using eraseblock summaries. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Mark XATTR support as experimental, for nowDavid Woodhouse2006-06-181-28/+28
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Don't trust node headers before the CRC is checked.David Woodhouse2006-06-181-28/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Especially when summary code is used, we can have in-memory data structures referencing certain nodes without them actually being readable on the flash. Discard the nodes gracefully in that case, rather than triggering a BUG(). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] Restore MTD_ROM and MTD_RAM typesDavid Woodhouse2006-06-149-9/+10
| | | | | | | | | | | | | | | | | | | | | Let's not attempt the abolition of mtd->type until/unless it's properly thought through. And certainly, let's not do it by halves. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] assume mtd->writesize is 1 for NOR flashesArtem B. Bityutskiy2006-06-148-3/+13
| | | | | | | | | | | | Signed-off-by: Artem B. Bityitskiy
| * | [MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compilesDavid Woodhouse2006-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | Fix the control bit handling so it even looks like it might work, too. Bad tglx. No biscuit. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] Prepare physmap for 64-bit-resourcesAndrew Morton2006-06-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fallout from the incoming 64-bit-resource stuff: drivers/mtd/maps/physmap.c: In function 'physmap_flash_probe': drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix more breakage caused by janitorial meddling.David Woodhouse2006-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | jffs2_zlib_exit() and free_workspaces() shouldn't be marked __exit because they get called in the error case from the init functions. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Remove stray __exit from jffs2_compressors_exit()David Woodhouse2006-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's used from the initfunc in case of failure too. We could actually do with an '__initexit' for this kind of thing -- when built in to the kernel, it could do with being dropped with the init text. We _could_ actually just use __init for it, but that would break if/when we start dropping init text from modules. So let's just leave it as it was for now, and mutter a little more about random 'janitorial' fixes from people who aren't paying attention to what they're doing. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] Allow alternate JFFS2 mount variant for root filesystem.Joern Engel2006-05-301-0/+4
| | | | | | | | | | | | | | | | | | With this patch, "root=mtd3" and "root=mtd:foo" work for a JFFS2 rootfs. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * | [MTD] Disconnect struct mtd_info from ABIJoern Engel2006-05-301-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | mtdchar.c direcly copied part of struct mtd_info to userspace, thereby implicitly making it part of the ABI. With this patch, struct mtd_info is independent of the ABI and can have its fields removed, reordered, etc. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * | [MTD] replace MTD_RAM with MTD_GENERIC_TYPEJoern Engel2006-05-309-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Ram devices get the extra capability of MTD_NO_ERASE - not requiring an explicit erase before writing to it. Currently only mtdblock uses this capability. Rest of the patch is a simple text replacement. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * | [MTD] replace MTD_ROM with MTD_GENERIC_TYPEJoern Engel2006-05-302-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | No mtd user should ever check for the device type. Instead, device features should be checked by the flags - if at all. As a first step towards type removal, change MTD_ROM into MTD_GENERIC_TYPE. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * | [MTD] remove a forgotten MTD_XIPJoern Engel2006-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | MTD_XIP definition was removed in an earlier patch. This invocation was left by mistake. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
| * | [MTD] Fix build warnings (and debug build error) in nand_base.cAndrew Morton2006-05-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/mtd/nand/nand_base.c: In function 'nand_transfer_oob': drivers/mtd/nand/nand_base.c:909: warning: comparison of distinct pointer types lacks a cast drivers/mtd/nand/nand_base.c: In function 'nand_do_read_oob': drivers/mtd/nand/nand_base.c:1097: error: 'len' undeclared (first use in this function) drivers/mtd/nand/nand_base.c:1097: error: (Each undeclared identifier is reported only once drivers/mtd/nand/nand_base.c:1097: error: for each function it appears in.) drivers/mtd/nand/nand_base.c: In function 'nand_fill_oob': drivers/mtd/nand/nand_base.c:1411: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Preallocate node refs for cleanmarker in summary scanDavid Woodhouse2006-05-301-5/+8
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix calculation of potential summary marker offset on NOR flash.David Woodhouse2006-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Helps if we look _inside_ the buffer, rather than adding jeb->offset to it. Doh. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] NAND Expose the new raw mode function and status info to userspaceThomas Gleixner2006-05-307-98/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The raw read/write access to NAND (without ECC) has been changed in the NAND rework. Expose the new way - setting the file mode via ioctl - to userspace. Also allow to read out the ecc statistics information so userspace tools can see that bitflips happened and whether errors where correctable or not. Also expose the number of bad blocks for the partition, so nandwrite can check if the data fits into the parition before writing to it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] NAND Signal that a bitflip was corrected by ECCThomas Gleixner2006-05-296-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | Return -EUCLEAN on read when a bitflip was detected and corrected, so the clients can react and eventually copy the affected block to a spare one. Make all in kernel users aware of the change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] Rework the out of band handling completelyThomas Gleixner2006-05-2918-590/+1028
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully the last iteration on this! The handling of out of band data on NAND was accompanied by tons of fruitless discussions and halfarsed patches to make it work for a particular problem. Sufficiently annoyed by I all those "I know it better" mails and the resonable amount of discarded "it solves my problem" patches, I finally decided to go for the big rework. After removing the _ecc variants of mtd read/write functions the solution to satisfy the various requirements was to refactor the read/write _oob functions in mtd. The major change is that read/write_oob now takes a pointer to an operation descriptor structure "struct mtd_oob_ops".instead of having a function with at least seven arguments. read/write_oob which should probably renamed to a more descriptive name, can do the following tasks: - read/write out of band data - read/write data content and out of band data - read/write raw data content and out of band data (ecc disabled) struct mtd_oob_ops has a mode field, which determines the oob handling mode. Aside of the MTD_OOB_RAW mode, which is intended to be especially for diagnostic purposes and some internal functions e.g. bad block table creation, the other two modes are for mtd clients: MTD_OOB_PLACE puts/gets the given oob data exactly to/from the place which is described by the ooboffs and ooblen fields of the mtd_oob_ops strcuture. It's up to the caller to make sure that the byte positions are not used by the ECC placement algorithms. MTD_OOB_AUTO puts/gets the given oob data automaticaly to/from the places in the out of band area which are described by the oobfree tuples in the ecclayout data structre which is associated to the devicee. The decision whether data plus oob or oob only handling is done depends on the setting of the datbuf member of the data structure. When datbuf == NULL then the internal read/write_oob functions are selected, otherwise the read/write data routines are invoked. Tested on a few platforms with all variants. Please be aware of possible regressions for your particular device / application scenario Disclaimer: Any whining will be ignored from those who just contributed "hot air blurb" and never sat down to tackle the underlying problem of the mess in the NAND driver grown over time and the big chunk of work to fix up the existing users. The problem was not the holiness of the existing MTD interfaces. The problems was the lack of time to go for the big overhaul. It's easy to add more mess to the existing one, but it takes alot of effort to go for a real solution. Improvements and bugfixes are welcome! Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] Remove silly MTD_WRITE/READ macrosThomas Gleixner2006-05-299-179/+195
| | | | | | | | | | | | | | | | | | | | | Most of those macros are unused and the used ones just obfuscate the code. Remove them and fixup all users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] NAND Replace oobinfo by ecclayoutThomas Gleixner2006-05-2920-99/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | The nand_oobinfo structure is not fitting the newer error correction demands anymore. Replace it by struct nand_ecclayout and fixup the users all over the place. Keep the nand_oobinfo based ioctl for user space compability reasons. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] NAND Consolidate oobinfo handlingThomas Gleixner2006-05-297-28/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The info structure for out of band data was copied into the mtd structure. Make it a pointer and remove the ability to set it from userspace. The position of ecc bytes is defined by the hardware and should not be changed by software. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] NAND Fix platform structure and NDFC driverThomas Gleixner2006-05-293-6/+7
| | | | | | | | | | | | | | | | | | | | | The platform structure was lacking an oobinfo field. The NDFC driver had some remains from another tree. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | [MTD] Fix debug printk format warning in m25p80 SPI chip driver, again.Andrew Morton2006-05-291-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] AMD Geode NAND support can depend on X86_32; we won't see it on x86_64David Woodhouse2006-05-291-1/+1
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Preallocate raw_node_refs in a couple of missing places in scanDavid Woodhouse2006-05-291-2/+7
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.David Woodhouse2006-05-281-1/+1
| | | | | | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [JFFS2] Fix wbuf recovery of f->metadata->raw node.David Woodhouse2006-05-271-1/+5
| | | | | | | | | | | | | | | | | | A data node might not be in the fraglist; it could be f->metadata. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * | [MTD] NAND Consolidate references and add back default name settingThomas Gleixner2006-05-271-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a type pointer. Make use of it instead of the error prone nand_ids[i] reference. The NAND driver used to set default name settings from the chip ID string for the device. The feature got lost during the rework. Add it back. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
OpenPOWER on IntegriCloud