1. 17 3月, 2011 1 次提交
  2. 15 3月, 2011 1 次提交
    • T
      arm: Remove bogus comment in futex_atomic_cmpxchg_inatomic() · 07d5ecae
      Thomas Gleixner 提交于
      commit 522d7dec(futex: Remove redundant pagefault_disable in
      futex_atomic_cmpxchg_inatomic()) added a bogus comment.
      
      /* Note that preemption is disabled by futex_atomic_cmpxchg_inatomic
       * call sites. */
      
      Bogus in two aspects:
      
      1) pagefault_disable != preempt_disable even if the mechanism we use
         is the same
      
      2) we have a call site which deliberately does not disable pagefaults
         as it wants the possible fault to be handled - though that has been
         changed for consistency reasons now.
      
      Sigh. I really should have seen that when committing the above. :(
      Catched-by-and-rightfully-ranted-at-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <alpine.LFD.2.00.1103141126590.2787@localhost6.localdomain6>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Darren Hart <darren@dvhart.com>
      07d5ecae
  3. 11 3月, 2011 3 次提交
    • M
      futex: Sanitize futex ops argument types · 8d7718aa
      Michel Lespinasse 提交于
      Change futex_atomic_op_inuser and futex_atomic_cmpxchg_inatomic
      prototypes to use u32 types for the futex as this is the data type the
      futex core code uses all over the place.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311025058.GD26122@google.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      8d7718aa
    • M
      futex: Sanitize cmpxchg_futex_value_locked API · 37a9d912
      Michel Lespinasse 提交于
      The cmpxchg_futex_value_locked API was funny in that it returned either
      the original, user-exposed futex value OR an error code such as -EFAULT.
      This was confusing at best, and could be a source of livelocks in places
      that retry the cmpxchg_futex_value_locked after trying to fix the issue
      by running fault_in_user_writeable().
          
      This change makes the cmpxchg_futex_value_locked API more similar to the
      get_futex_value_locked one, returning an error code and updating the
      original value through a reference argument.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: Chris Metcalf <cmetcalf@tilera.com>  [tile]
      Acked-by: Tony Luck <tony.luck@intel.com>  [ia64]
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: Michal Simek <monstr@monstr.eu>  [microblaze]
      Acked-by: David Howells <dhowells@redhat.com> [frv]
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311024851.GC26122@google.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      37a9d912
    • M
      futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic() · 522d7dec
      Michel Lespinasse 提交于
      kernel/futex.c disables page faults before calling
      futex_atomic_cmpxchg_inatomic(), so there is no need to do it again
      within that function.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311024731.GB26122@google.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      522d7dec
  4. 04 3月, 2011 17 次提交
  5. 03 3月, 2011 2 次提交
    • S
      OMAP2+: PM: SmartReflex: fix memory leaks in Smartreflex driver · b3329a33
      Shweta Gulati 提交于
      This Patch frees all the dynamically allocated memory
      which couldn't have been released in some error hitting cases.
      Signed-off-by: NShweta Gulati <shweta.gulati@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      b3329a33
    • A
      arm: mach-omap2: smartreflex: fix another memory leak · 865212ab
      Aaro Koskinen 提交于
      Temporary strings with volt_* file names should be released after the
      debugfs entries are created. While at it, also simplify the string
      allocation, and use just snprintf() to create the name.
      
      The patch eliminates kmemleak reports with the following stack trace
      (multiple objects depending on HW):
      
      unreferenced object 0xcedbc5a0 (size 64):
        comm "swapper", pid 1, jiffies 4294929375 (age 423.734s)
        hex dump (first 32 bytes):
          76 6f 6c 74 5f 39 37 35 30 30 30 00 00 00 00 00  volt_975000.....
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<c012fee0>] create_object+0x104/0x208
          [<c012dbc8>] kmem_cache_alloc_trace+0xf0/0x17c
          [<c0013f64>] omap_sr_probe+0x314/0x420
          [<c02a1724>] platform_drv_probe+0x18/0x1c
          [<c02a088c>] driver_probe_device+0xc8/0x188
          [<c02a09b4>] __driver_attach+0x68/0x8c
          [<c02a00ac>] bus_for_each_dev+0x44/0x74
          [<c029f9e0>] bus_add_driver+0xa0/0x228
          [<c02a0cac>] driver_register+0xa8/0x130
          [<c02a1b2c>] platform_driver_probe+0x18/0x8c
          [<c0013c1c>] sr_init+0x40/0x74
          [<c005a554>] do_one_initcall+0xc8/0x1a0
          [<c00084f4>] kernel_init+0x150/0x218
          [<c0065d64>] kernel_thread_exit+0x0/0x8
          [<ffffffff>] 0xffffffff
      Signed-off-by: NAaro Koskinen <aaro.koskinen@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      865212ab
  6. 01 3月, 2011 4 次提交
    • A
      davinci: cpufreq: fix section mismatch warning · 079db590
      Axel Lin 提交于
      Fix below section mismatch warning:
      WARNING: vmlinux.o(.data+0x673c): Section mismatch in reference from the variable davinci_driver to the function .init.text:davinci_cpu_init()
      The variable davinci_driver references
      the function __init davinci_cpu_init()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      079db590
    • S
      DaVinci: fix compilation warnings in <mach/clkdev.h> · 3113307a
      Sergei Shtylyov 提交于
      Commit 6d803ba7 (ARM: 6483/1: arm & sh:
      factorised duplicated clkdev.c) caused the following warnings:
      
      In file included from /home/headless/src/kernel.org/linux-davinci/arch/arm/
      include/asm/clkdev.h:17,
                       from include/linux/clkdev.h:15,
                       from arch/arm/mach-davinci/clock.h:71,
                       from arch/arm/mach-davinci/common.c:22:
      arch/arm/mach-davinci/include/mach/clkdev.h:4: warning: `struct clk' declared
      inside parameter list
      arch/arm/mach-davinci/include/mach/clkdev.h:4: warning: its scope is only this
      definition or declaration, which is probably not what you want
      arch/arm/mach-davinci/include/mach/clkdev.h:9: warning: `struct clk' declared
      inside parameter list
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      3113307a
    • H
      davinci: tnetv107x: fix register indexing for GPIOs numbers > 31 · c284d9fa
      Hirosh Dabui 提交于
      This patch fix a bug in the register indexing for GPIOs numbers >  31
      to get the relevant hardware registers of tnetv107x to control the GPIOs.
      
      In the structure tnetv107x_gpio_regs:
      
      struct tnetv107x_gpio_regs {
                  u32     idver;
                  u32     data_in[3];
                  u32     data_out[3];
                  u32     direction[3];
                  u32     enable[3];
      };
      
      The GPIO hardware register addresses of tnetv107x are stored.
      The chip implements 3 registers of each entity to serve 96 GPIOs,
      each register provides a subset of 32 GPIOs.
      The driver provides these macros: gpio_reg_set_bit, gpio_reg_get_bit
      and gpio_reg_clear_bit.
      
      The bug implied the use of macros to access the relevant hardware
      register e.g. the driver code used the macro like this:
      'gpio_reg_clear_bit(&reg->data_out, gpio)'
      
      But it has to be used like this:
      'gpio_reg_clear_bit(reg->data_out, gpio)'.
      
      The different results are shown here:
      - &reg->data_out + 1 (it will add the full array size of data_out i.e. 12 bytes)
      - reg->data_out + 1 (it will increment only the size of data_out i.e. only 4 bytes)
      Acked-by: NCyril Chemparathy <cyril@ti.com>
      Signed-off-by: NHirosh Dabui <hirosh.dabui@snom.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      c284d9fa
    • R
      davinci: da8xx/omap-l1x: add platform device for davinci-pcm-audio · b3d1ffb2
      Rajashekhara, Sudhakar 提交于
      After the multi-component commit f0fba2ad (ASoC: multi-component - ASoC
      Multi-Component Support) for ASoC, we need to register the platform
      device for davinci-pcm-audio.
      
      This patch and patch at [1] are required for audio to work on
      DA850/OMAP-L138.
      
      [1] https://patchwork.kernel.org/patch/495211/Signed-off-by: NRajashekhara, Sudhakar <sudhakar.raj@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      b3d1ffb2
  7. 27 2月, 2011 3 次提交
  8. 26 2月, 2011 6 次提交
  9. 25 2月, 2011 1 次提交
    • P
      OMAP2+: clocksource: fix crash on boot when !CONFIG_OMAP_32K_TIMER · cbc94380
      Paul Walmsley 提交于
      
      OMAP2+ kernels built without CONFIG_OMAP_32K_TIMER crash on boot after the
      2.6.38 sched_clock changes:
      
      [    0.000000] OMAP clockevent source: GPTIMER1 at 13000000 Hz
      [    0.000000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [    0.000000] pgd = c0004000
      [    0.000000] [00000000] *pgd=00000000
      [    0.000000] Internal error: Oops: 80000005 [#1] SMP
      [    0.000000] last sysfs file:
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0    Not tainted  (2.6.38-rc5-00057-g04aa67de #152)
      [    0.000000] PC is at 0x0
      [    0.000000] LR is at sched_clock_poll+0x2c/0x3c
      
      Without CONFIG_OMAP_32K_TIMER, the kernel has an clockevent and
      clocksource resolution about three orders of magnitude higher than
      with CONFIG_OMAP_32K_TIMER set.  The tradeoff is that the lowest
      power consumption states are not available.
      
      Fix by calling init_sched_clock() from the GPTIMER clocksource init code.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      cbc94380
  10. 24 2月, 2011 2 次提交
    • S
      ARM: Tegra: DMA: Fail safe if initialization fails · ccac0515
      Stephen Warren 提交于
      tegra_dma_init currently simply bails out early if any initialization fails.
      This skips various data-structure initialization. In turn, this means that
      tegra_dma_allocate_channel can still hand out channels. In this case, when
      tegra_dma_free_channel is called, which calls tegra_dma_cancel, the walking
      on ch->list will OOPS since the list's next/prev pointers may still be
      NULL.
      
      To solve this, add an explicit "initialized" flag, only set this once _init
      has fully completed successfully, and have _allocate_channel refuse to hand
      out channels if this is not set.
      
      While at it, simplify _init:
      * Remove redundant memsets
      * Use bitmap_fill to mark all channels as in-use up-front, and remove
        some now-redundant bitmap initialization loops.
      * Only mark a channel as free once all channel-related initialization has
        completed.
      
      Finally, the successful exit path from _init always has ret==0, so just
      hard-code that return. The error path still returns ret.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NColin Cross <ccross@android.com>
      ccac0515
    • S
      ARM: Tegra: Rename clk_dev1/2 to cdev1/2 · ddb7d5d8
      Stephen Warren 提交于
      The ASoC machine driver was written assuming my previous patch to add
      complete support for these clocks, which named them cdev1/2. Rename
      the clocks to match that, to avoid churn in the ASoC driver.
      
      This rename also makes the clocks more consistent with other Tegra
      clocks irrespective of any of that.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NColin Cross <ccross@android.com>
      ddb7d5d8