1. 12 Dec, 2009 16 commits
    • Kevin Hilman's avatar
      OMAP: omap_device: add to_omap_device() macro · a470c42c
      Kevin Hilman authored
      Following the model of to_platform_device(), add to_omap_device()
      macro so a platform_device pointer can be converted into an
      omap_device pointer.
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      a470c42c
    • Paul Walmsley's avatar
      OMAP3 hwmod: drop most of the OCP_SYSCONFIG.CLOCKACTIVITY code · a16b1f7f
      Paul Walmsley authored
      Earlier, the hwmod code had considered the OCP_SYSCONFIG.CLOCKACTIVITY
      bits to be incremental power saving bits, controlling internal IP
      block clock gates.  This was a misapprehension.  The CLOCKACTIVITY
      bits are used to indicate, in advance, which clocks will be cut when
      the module acknowledges an idle request.  This enables the IP block to
      take whatever action is necessary to complete any in-progress work
      before asserting its IdleAck.
      
      In the current Linux-OMAP code, this implies that the clock framework
      should be changing module CLOCKACTIVITY bits as module clocks are enabled
      and disabled.  We don't do that yet, but in the future, we should.
      This must wait until the clock tree is annotated with omap_hwmod pointers
      (or vice-versa).  In the meantime, drop most of the hwmod code that
      controls CLOCKACTIVITY bits to avoid confusion.
      
      This patch has benefited from many illuminating discussions with (in
      alphabetical order) Benoît Cousson <b-cousson@ti.com>, Rajendra Nayak
      <rnayak@ti.com>, and Sebastien Sabatier <s-sabatier1@ti.com>.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Sebastien Sabatier <s-sabatier1@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      a16b1f7f
    • Paul Walmsley's avatar
      OMAP hwmod: add names to module MPU IRQ lines · 718bfd76
      Paul Walmsley authored
      Replace the existing u8 array of module MPU IRQ lines with a struct
      that includes a name - similar to the existing struct
      omap_hwmod_dma_info.  Device drivers can then use
      platform_get_resource_byname() to retrieve specific IRQs without nasty
      dependencies on array ordering.
      
      Thanks to Benoît Cousson <b-cousson@ti.com> and Kevin Hilman
      <khilman@deeprootsystems.com> for feedback on this approach.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      718bfd76
    • Paul Walmsley's avatar
      OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling · 726072e5
      Paul Walmsley authored
      This patch fills in the OCP_SYSCONFIG.AUTOIDLE handling in the OMAP
      hwmod code.
      
      After this patch, the hwmod code will set the module AUTOIDLE bit
      (generally <module>.OCP_SYSCONFIG.AUTOIDLE) to 1 by default upon
      enable.  If the hwmod flag HWMOD_NO_OCP_AUTOIDLE is set, AUTOIDLE will
      be set to 0 upon enable.  Upon module disable, AUTOIDLE will be set to
      1.
      
      Enabling module autoidle should save some power.  The only reason to
      not set the OCP_SYSCONFIG.AUTOIDLE bit is if there is a bug in the
      module RTL, e.g., the MPUINTC block on OMAP3.
      
      Comments from Kevin Hilman <khilman@deeprootsystems.com> inspired this patch,
      and Kevin tested an earlier version of this patch.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Tested-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      726072e5
    • Paul Walmsley's avatar
      OMAP3 hwmod: reprogram OCP_SYSCONFIG register after setting SOFTRESET · b835d014
      Paul Walmsley authored
      Reprogram the module's OCP_SYSCONFIG register after module reset (SOFTRESET
      = 1).  This may not be needed, but the definition of the reset performed by
      the SOFTRESET bit is unclear.
      
      Kevin Hilman <khilman@deeprootsystems.com> tested an earlier version of
      this patch.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Tested-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      b835d014
    • Paul Walmsley's avatar
      OMAP clock/hwmod: fix off-by-one errors · 6f8b7ff5
      Paul Walmsley authored
      Fix loop bailout off-by-one bugs reported by Juha Leppänen
      <juha_motorsportcom@luukku.com>.
      
      This second version incorporates comments from Russell King
      <linux@arm.linux.org.uk>.  A new macro, 'omap_test_timeout', has
      been created, with cleaner code, and existing code has been converted
      to use it.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Juha Leppänen <juha_motorsportcom@luukku.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      6f8b7ff5
    • Thara Gopinath's avatar
      OMAP3: PM: Fix for MPU power domain MEM BANK position · 3863c74b
      Thara Gopinath authored
      MPU power domain bank 0 bits are displayed in position of bank 1
      in PWRSTS and PREPWRSTS registers. So read them from correct
      position
      Signed-off-by: default avatarThara Gopinath <thara@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      3863c74b
    • Paul Walmsley's avatar
      OMAP3: SDRC: Place SDRC AC timing and MR changes in CORE DVFS SRAM code behind Kconfig · 18862cbe
      Paul Walmsley authored
      The code that reprograms the SDRC memory controller during CORE DVFS,
      mach-omap2/sram34xx.S:omap3_sram_configure_core_dpll(), does not
      ensure that all L3 initiators are prevented from accessing the SDRAM
      before modifying the SDRC AC timing and MR registers.  This can cause
      memory to be corrupted or cause the SDRC to enter an unpredictable
      state.  This patch places that code behind a Kconfig option,
      CONFIG_OMAP3_SDRC_AC_TIMING for now, and adds a note explaining what
      is going on.  Ideally the code can be added back in once supporting
      code is present to ensure that other initiators aren't touching the
      SDRAM.  At the very least, these registers should be reprogrammable
      during kernel init to deal with buggy bootloaders.  Users who know
      that all other system initiators will not be touching the SDRAM can
      also re-enable this Kconfig option.
      
      This is a modification of a patch originally written by Rajendra Nayak
      <rnayak@ti.com> (the original is at http://patchwork.kernel.org/patch/51927/).
      Rather than removing the code completely, this patch just comments it out.
      
      Thanks to Benoît Cousson <b-cousson@ti.com> and Christophe Sucur
      <c-sucur@ti.com> for explaining the technical basis for this and for
      explaining what can be done to make this path work in future code.
      Thanks to Richard Woodruff <r-woodruff2@ti.com>, Nishanth Menon
      <nm@ti.com>, and Olof Johansson <olof@lixom.net> for their comments.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Christophe Sucur <c-sucur@ti.com>
      Cc: Benoît Cousson <b-cousson@ti.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Olof Johansson <olof@lixom.net>
      18862cbe
    • Roel Kluin's avatar
      OMAP2/3 powerdomain: return errors rather than returning the output of IS_ERR() · 1fda39e6
      Roel Kluin authored
      IS_ERR returns only 1 or 0, and the functions return a negative error
      in other cases anyways.
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      1fda39e6
    • Paul Walmsley's avatar
      OMAP powerdomain: rearrange struct powerdomain to save some memory · 155a22ec
      Paul Walmsley authored
      This patch rearranges the order of structure members in struct powerdomain
      to avoid wasting memory due to alignment restrictions.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      155a22ec
    • Paul Walmsley's avatar
      OMAP powerdomain/PM: use symbolic constants for the max number of power states · 2354eb5a
      Paul Walmsley authored
      Replace some bare constants with power states.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      2354eb5a
    • Paul Walmsley's avatar
      OMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx · 6a06fa68
      Paul Walmsley authored
      OMAP24xx chips don't support software-configurable sleep dependencies.
      Test early for this so the compiler can redact the entire function body
      on OMAP24xx.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      6a06fa68
    • Paul Walmsley's avatar
      OMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK,POWER}DOMAIN · 33903eb5
      Paul Walmsley authored
      Avoid cluttering the Kconfig space with debug options that are rarely
      used.  These can now be enabled and disabled by patching the "#undef DEBUG"
      in the source files with "#define DEBUG", conforming to the practice for
      the rest of the linux-omap code.
      
      Also, while we're here, some lines in plat-omap/Kconfig use sets of
      leading spaces when those lines should start with tabs.  Convert most
      of them to use tabs.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      33903eb5
    • Paul Walmsley's avatar
      OMAP2/3 PRCM: don't export prm_*(), cm_*() functions · 42d75e7d
      Paul Walmsley authored
      Device drivers and loadable modules should not be calling these
      prm_* and cm_* functions, so stop exporting them.  Only core code
      and device driver integration code (in arch/arm/*omap*) should
      call these functions.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      42d75e7d
    • Paul Walmsley's avatar
      OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c · 52650505
      Paul Walmsley authored
      The OMAP1 clock code currently #includes a large .h file full of static
      data structures.  Instead, define the data in a .c file.
      
      Russell King <linux@arm.linux.org.uk> proposed this new arrangement:
      
          http://marc.info/?l=linux-omap&m=125967425908895&w=2
      
      This patch also deals with most of the flagrant checkpatch violations.
      
      While here, separate the mpu_rate data structures out into their own
      files, opp.h and opp_data.c.  In the long run, these mpu_rate tables
      should be replaced with OPP code.
      
      Also includes a patch from Felipe Balbi <felipe.balbi@nokia.com> to
      mark omap1_clk_functions as __initdata to avoid a section warning:
      
          http://patchwork.kernel.org/patch/64366/Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Felipe Balbi <felipe.balbi@nokia.com>
      Cc: Nishanth Menon <nm@ti.com>
      52650505
    • Paul Walmsley's avatar
      OMAP1 clock: convert test in disable_unused() to use ENABLE_ON_INIT · 6f62b58d
      Paul Walmsley authored
      mach-omap1/clock.c:omap1_clk_disable_unused() contains a test that
      assumes that the clock structures are available in the file's
      namespace.  After a following patch, this will no longer be the case.
      So we need to reimplement that test.  It turns out that we already
      have a facility in the clock framework to handle this case - the
      ENABLE_ON_INIT flag - used on OMAP2/3.  Remove the offending test and
      mark the clocks that it was intended to catch as ENABLE_ON_INIT.
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      6f62b58d
  2. 11 Dec, 2009 7 commits
  3. 10 Dec, 2009 17 commits
    • Linus Torvalds's avatar
      d71cb81a
    • Linus Torvalds's avatar
      Merge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen · ab1831b0
      Linus Torvalds authored
      * 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
        xen: try harder to balloon up under memory pressure.
        Xen balloon: fix totalram_pages counting.
        xen: explicitly create/destroy stop_machine workqueues outside suspend/resume region.
        xen: improve error handling in do_suspend.
        xen: don't leak IRQs over suspend/resume.
        xen: call clock resume notifier on all CPUs
        xen: use iret for return from 64b kernel to 32b usermode
        xen: don't call dpm_resume_noirq() with interrupts disabled.
        xen: register runstate info for boot CPU early
        xen: register runstate on secondary CPUs
        xen: register timer interrupt with IRQF_TIMER
        xen: correctly restore pfn_to_mfn_list_list after resume
        xen: restore runstate_info even if !have_vcpu_info_placement
        xen: re-register runstate area earlier on resume.
        xen: wait up to 5 minutes for device connetion
        xen: improvement to wait_for_devices()
        xen: fix is_disconnected_device/exists_disconnected_device
        xen/xenbus: make DEVICE_ATTR()s static
      ab1831b0
    • Linus Torvalds's avatar
      Merge branch 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen · eae6fa9b
      Linus Torvalds authored
      * 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
        xen pvfb: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers.
        fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers.
        fb-defio: If FBINFO_VIRTFB is defined, do not set VM_IO flag.
        Fix toogle whether xenbus driver should be built as module or part of kernel.
      eae6fa9b
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 4515c306
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (47 commits)
        ext4: Fix potential fiemap deadlock (mmap_sem vs. i_data_sem)
        ext4: Do not override ext2 or ext3 if built they are built as modules
        jbd2: Export jbd2_log_start_commit to fix ext4 build
        ext4: Fix insufficient checks in EXT4_IOC_MOVE_EXT
        ext4: Wait for proper transaction commit on fsync
        ext4: fix incorrect block reservation on quota transfer.
        ext4: quota macros cleanup
        ext4: ext4_get_reserved_space() must return bytes instead of blocks
        ext4: remove blocks from inode prealloc list on failure
        ext4: wait for log to commit when umounting
        ext4: Avoid data / filesystem corruption when write fails to copy data
        ext4: Use ext4 file system driver for ext2/ext3 file system mounts
        ext4: Return the PTR_ERR of the correct pointer in setup_new_group_blocks()
        jbd2: Add ENOMEM checking in and for jbd2_journal_write_metadata_buffer()
        ext4: remove unused parameter wbc from __ext4_journalled_writepage()
        ext4: remove encountered_congestion trace
        ext4: move_extent_per_page() cleanup
        ext4: initialize moved_len before calling ext4_move_extents()
        ext4: Fix double-free of blocks with EXT4_IOC_MOVE_EXT
        ext4: use ext4_data_block_valid() in ext4_free_blocks()
        ...
      4515c306
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd · a5eba3f6
      Linus Torvalds authored
      * 'for-linus' of git://git.open-osd.org/linux-open-osd:
        exofs: Multi-device mirror support
        exofs: Move all operations to an io_engine
        exofs: move osd.c to ios.c
        exofs: statfs blocks is sectors not FS blocks
        exofs: Prints on mount and unmout
        exofs: refactor exofs_i_info initialization into common helper
        exofs: dbg-print less
        exofs: More sane debug print
        trivial: some small fixes in exofs documentation
      a5eba3f6
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/ubifs-2.6 · fc1495bf
      Linus Torvalds authored
      * git://git.infradead.org/ubifs-2.6:
        UBIFS: fix return code in check_leaf
        UBI: flush wl before clearing update marker
        MAINTAINERS: change e-mail of Artem Bityutskiy
        UBIFS: remove manual O_SYNC handling
        UBIFS: support mounting of UBI volume character devices
        UBI: Add ubi_open_volume_path
      fc1495bf
    • David Wong's avatar
      V4L/DVB (13592): max2165: 32bit build patch · 5476ffd2
      David Wong authored
      This patch drops usage of floating point variable for 32bit build
      Signed-off-by: default avatarDavid T. L. Wong <davidtlwong@gmail.com>
      Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      5476ffd2
    • Boaz Harrosh's avatar
      exofs: Multi-device mirror support · 04dc1e88
      Boaz Harrosh authored
      This patch changes on-disk format, it is accompanied with a parallel
      patch to mkfs.exofs that enables multi-device capabilities.
      
      After this patch, old exofs will refuse to mount a new formatted FS and
      new exofs will refuse an old format. This is done by moving the magic
      field offset inside the FSCB. A new FSCB *version* field was added. In
      the future, exofs will refuse to mount unmatched FSCB version. To
      up-grade or down-grade an exofs one must use mkfs.exofs --upgrade option
      before mounting.
      
      Introduced, a new object that contains a *device-table*. This object
      contains the default *data-map* and a linear array of devices
      information, which identifies the devices used in the filesystem. This
      object is only written to offline by mkfs.exofs. This is why it is kept
      separate from the FSCB, since the later is written to while mounted.
      
      Same partition number, same object number is used on all devices only
      the device varies.
      
      * define the new format, then load the device table on mount time make
        sure every thing is supported.
      
      * Change I/O engine to now support Mirror IO, .i.e write same data
        to multiple devices, read from a random device to spread the
        read-load from multiple clients (TODO: stripe read)
      
      Implementation notes:
       A few points introduced in previous patch should be mentioned here:
      
      * Special care was made so absolutlly all operation that have any chance
        of failing are done before any osd-request is executed. This is to
        minimize the need for a data consistency recovery, to only real IO
        errors.
      
      * Each IO state has a kref. It starts at 1, any osd-request executed
        will increment the kref, finally when all are executed the first ref
        is dropped. At IO-done, each request completion decrements the kref,
        the last one to return executes the internal _last_io() routine.
        _last_io() will call the registered io_state_done. On sync mode a
        caller does not supply a done method, indicating a synchronous
        request, the caller is put to sleep and a special io_state_done is
        registered that will awaken the caller. Though also in sync mode all
        operations are executed in parallel.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      04dc1e88
    • Boaz Harrosh's avatar
      exofs: Move all operations to an io_engine · 06886a5a
      Boaz Harrosh authored
      In anticipation for multi-device operations, we separate osd operations
      into an abstract I/O API. Currently only one device is used but later
      when adding more devices, we will drive all devices in parallel according
      to a "data_map" that describes how data is arranged on multiple devices.
      The file system level operates, like before, as if there is one object
      (inode-number) and an i_size. The io engine will split this to the same
      object-number but on multiple device.
      
      At first we introduce Mirror (raid 1) layout. But at the final outcome
      we intend to fully implement the pNFS-Objects data-map, including
      raid 0,4,5,6 over mirrored devices, over multiple device-groups. And
      more. See: http://tools.ietf.org/html/draft-ietf-nfsv4-pnfs-obj-12
      
      * Define an io_state based API for accessing osd storage devices
        in an abstract way.
        Usage:
      	First a caller allocates an io state with:
      		exofs_get_io_state(struct exofs_sb_info *sbi,
      				   struct exofs_io_state** ios);
      
      	Then calles one of:
      		exofs_sbi_create(struct exofs_io_state *ios);
      		exofs_sbi_remove(struct exofs_io_state *ios);
      		exofs_sbi_write(struct exofs_io_state *ios);
      		exofs_sbi_read(struct exofs_io_state *ios);
      		exofs_oi_truncate(struct exofs_i_info *oi, u64 new_len);
      
      	And when done
      		exofs_put_io_state(struct exofs_io_state *ios);
      
      * Convert all source files to use this new API
      * Convert from bio_alloc to bio_kmalloc
      * In io engine we make use of the now fixed osd_req_decode_sense
      
      There are no functional changes or on disk additions after this patch.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      06886a5a
    • Boaz Harrosh's avatar
      exofs: move osd.c to ios.c · 8ce9bdd1
      Boaz Harrosh authored
      If I do a "git mv" together with a massive code change
      and commit in one patch, git looses the rename and
      records a delete/new instead. This is bad because I want
      a rename recorded so later rebased/cherry-picked patches
      to the old name will work. Also the --follow is lost.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      8ce9bdd1
    • Boaz Harrosh's avatar
      exofs: statfs blocks is sectors not FS blocks · cae012d8
      Boaz Harrosh authored
      Even though exofs has a 4k block size, statfs blocks
      is in sectors (512 bytes).
      
      Also if target returns 0 for capacity then make it
      ULLONG_MAX. df does not like zero-size filesystems
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      cae012d8
    • Boaz Harrosh's avatar
      exofs: Prints on mount and unmout · 19fe294f
      Boaz Harrosh authored
      It is important to print in the logs when a filesystem was
      mounted and eventually unmounted.
      
      Print the osd-device's osd_name and pid the FS was
      mounted/unmounted on.
      
      TODO: How to also print the namespace path the filesystem was
            mounted on?
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      19fe294f
    • Boaz Harrosh's avatar
      exofs: refactor exofs_i_info initialization into common helper · 9cfdc7aa
      Boaz Harrosh authored
      There are two places that initialize inodes: exofs_iget() and
      exofs_new_inode()
      
      As more members of exofs_i_info that need initialization are
      added this code will grow. (soon)
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      9cfdc7aa
    • Boaz Harrosh's avatar
      exofs: dbg-print less · fe33cc1e
      Boaz Harrosh authored
      Iner-loops printing is converted to EXOFS_DBG2 which is #defined
      to nothing.
      
      It is now almost bareable to just leave debug-on. Every operation
      is printed once, with most relevant info (I hope).
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      fe33cc1e
    • Boaz Harrosh's avatar
      exofs: More sane debug print · 58311c43
      Boaz Harrosh authored
      debug prints should be somewhat useful without actually
      reading the source code
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      58311c43
    • Thadeu Lima de Souza Cascardo's avatar
      trivial: some small fixes in exofs documentation · 9f249162
      Thadeu Lima de Souza Cascardo authored
      Add exofs.txt to filesystems Documentation index and fix some typos,
      identation and grammar.
      Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      9f249162