Skip to content
  1. Feb 08, 2013
  2. Feb 06, 2013
  3. Jan 17, 2013
  4. Jan 16, 2013
  5. Jan 04, 2013
  6. Jan 03, 2013
    • Gabor Juhos's avatar
      powerpc: Add missing NULL terminator to avoid boot panic on PPC40x · e6449c9b
      Gabor Juhos authored
      
      
      The missing NULL terminator can cause a panic on
      PPC405 boards during boot:
      
        Linux/PowerPC load: console=ttyS0,115200 root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd init=/etc/preinit
        Finalizing device tree... flat tree at 0x6a5160
        bootconsole [udbg0] enabled
        Page fault in user mode with in_atomic() = 1 mm = (null)
        NIP = c0275f50  MSR = fffffffe
        Oops: Weird page fault, sig: 11 [#1]
        PowerPC 40x Platform
        Modules linked in:
        NIP: c0275f50 LR: c0275f60 CTR: c0280000
        REGS: c0275eb0 TRAP: 636f7265   Not tainted  (3.7.1)
        MSR: fffffffe <VEC,VSX,EE,PR,FP,ME,SE,BE,IR,DR,PMM,RI> CR: c06a6190  XER: 00000001
        TASK = c02662a8[0] 'swapper' THREAD: c0274000
        GPR00: c0275ec0 c000c658 c027c4bf 00000000 c0275ee0 c000a0ec c020a1a8 c020a1f0
        GPR08: c020f631 c020f404 c025f078 c025f080 c0275f10
         Call Trace:
         ---[ end trace 31fd0ba7d8756001 ]---
      
        Kernel panic - not syncing: Attempted to kill the idle task!
      
      The panic happens since commit 9597abe0
      (sections: fix section conflicts in arch/powerpc), however the root
      cause of this is that the NULL terminator were not added in commit
      a4f740cf (of/flattree: Add of_flat_dt_match()
      helper function).
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e6449c9b
    • Shan Hai's avatar
      powerpc/vdso: Remove redundant locking in update_vsyscall_tz() · ce73ec6d
      Shan Hai authored
      
      
      The locking in update_vsyscall_tz() is not only unnecessary because the vdso
      code copies the data unproteced in __kernel_gettimeofday() but also
      introduces a hard to reproduce race condition between update_vsyscall()
      and update_vsyscall_tz(), which causes user space process to loop
      forever in vdso code.
      
      The following patch removes the locking from update_vsyscall_tz().
      
      Locking is not only unnecessary because the vdso code copies the data
      unprotected in __kernel_gettimeofday() but also erroneous because updating
      the tb_update_count is not atomic and introduces a hard to reproduce race
      condition between update_vsyscall() and update_vsyscall_tz(), which further
      causes user space process to loop forever in vdso code.
      
      The below scenario describes the race condition,
      x==0	Boot CPU			other CPU
      	proc_P: x==0
      	    timer interrupt
      		update_vsyscall
      x==1		    x++;sync		settimeofday
      					    update_vsyscall_tz
      x==2						x++;sync
      x==3		    sync;x++
      						sync;x++
      	proc_P: x==3 (loops until x becomes even)
      
      Because the ++ operator would be implemented as three instructions and not
      atomic on powerpc.
      
      A similar change was made for x86 in commit 6c260d58
      ("x86: vdso: Remove bogus locking in update_vsyscall_tz")
      
      Signed-off-by: default avatarShan Hai <shan.hai@windriver.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ce73ec6d
    • Linus Torvalds's avatar
      Linux 3.8-rc2 · d1c3ed66
      Linus Torvalds authored
      d1c3ed66
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds · d50403dc
      Linus Torvalds authored
      Pull LED fix from Bryan Wu.
      
      * 'fixes-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: leds-gpio: set devm_gpio_request_one() flags param correctly
      d50403dc
    • Javier Martinez Canillas's avatar
      leds: leds-gpio: set devm_gpio_request_one() flags param correctly · 2d7c22f6
      Javier Martinez Canillas authored
      
      
      commit a99d76f9 leds: leds-gpio: use gpio_request_one
      
      changed the leds-gpio driver to use gpio_request_one() instead
      of gpio_request() + gpio_direction_output()
      
      Unfortunately, it also made a semantic change that breaks the
      leds-gpio driver.
      
      The gpio_request_one() flags parameter was set to:
      
      GPIOF_DIR_OUT | (led_dat->active_low ^ state)
      
      Since GPIOF_DIR_OUT is 0, the final flags value will just be the
      XOR'ed value of led_dat->active_low and state.
      
      This value were used to distinguish between HIGH/LOW output initial
      level and call gpio_direction_output() accordingly.
      
      With this new semantic gpio_request_one() will take the flags value
      of 1 as a configuration of input direction (GPIOF_DIR_IN) and will
      call gpio_direction_input() instead of gpio_direction_output().
      
      int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
      {
      ..
      	if (flags & GPIOF_DIR_IN)
      		err = gpio_direction_input(gpio);
      	else
      		err = gpio_direction_output(gpio,
      				(flags & GPIOF_INIT_HIGH) ? 1 : 0);
      ..
      }
      
      The right semantic is to evaluate led_dat->active_low ^ state and
      set the output initial level explicitly.
      
      Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reported-by: default avatarArnaud Patard <arnaud.patard@rtp-net.org>
      Tested-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
      2d7c22f6
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · ef05e9b9
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
       "This fixes some small errors in the new da9055 driver, eliminates a
        compiler warning and adds DT support for the twl4030_wdt driver (so
        that we can have multiple watchdogs with DT on the omap platforms)."
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: twl4030_wdt: add DT support
        watchdog: omap_wdt: eliminate unused variable and a compiler warning
        watchdog: da9055: Don't update wdt_dev->timeout in da9055_wdt_set_timeout error path
        watchdog: da9055: Fix invalid free of devm_ allocated data
      ef05e9b9