1. 02 Apr, 2013 1 commit
  2. 30 Mar, 2013 1 commit
  3. 28 Mar, 2013 9 commits
  4. 27 Mar, 2013 8 commits
    • Arnd Bergmann's avatar
      Merge tag 'ux500-fixes-for-v3.9' of... · cba26c5a
      Arnd Bergmann authored
      Merge tag 'ux500-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into fixes
      
      From Linus Walleij <linus.walleij@stericsson.com>:
      
      Fixes boot regressions on Device Tree:
      - Get TCPM and TCDM locations from the device tree
      - Skip passing the ios_handler for the MMCI
      - Enable the ethernet clock for Snowball
      
      * tag 'ux500-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
        ARM: ux500: Enable the clock controlling Ethernet on Snowball
        ARM: ux500: Stop passing ios_handler() as an MMCI power controlling call-back
        ARM: ux500: Apply the TCPM and TCDM locations and sizes to dbx5x0 DT
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      cba26c5a
    • Lee Jones's avatar
      ARM: ux500: Enable the clock controlling Ethernet on Snowball · 265c3c0a
      Lee Jones authored
      This fixes a regression introduced by common clk enablement.
      
      On some u8500 based boards, the FMSC clock which is usually used
      for flash, is wired up to the SMSC911x Ethernet driver. However,
      the SMSC911x doesn't have common clk support yet, rendering it
      unusable. Prior to the introduction of common clk the FMSC clock
      was default on; however, common clk disables all clocks by default
      and insists drivers take responsibility to enable theirs.
      
      This fix enables the FMSC clock on Snowball, subsequently turning
      on the SMSC911x Ethernet chip. It will be removed when the driver
      is compatible with common clk.
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      265c3c0a
    • Lee Jones's avatar
      ARM: ux500: Stop passing ios_handler() as an MMCI power controlling call-back · 26135256
      Lee Jones authored
      This fixes a regression introduced during the v3.9 merge window.
      
      Now MMCI on/off functionality is using the regulator framework
      from the MMCI driver, if we provide the ios_handler call-back we
      essentially duplicate functionality, which causes a large mess
      and lots of booting issues.
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      26135256
    • Lee Jones's avatar
      ARM: ux500: Apply the TCPM and TCDM locations and sizes to dbx5x0 DT · e73081d9
      Lee Jones authored
      This fixes a regression introduced by commit:
        05ec260e mfd:db8500-prcmu: update resource passing
      
      All DBx5x0 based SoCs have access to two Tightly Coupled Memory
      (TCM) locations based on the PRCMU itself. One area from program
      memory (TCPM) and one for data memory (TCDM). The PRCMU needs to
      know where these are in order to function correctly. However,
      these are currently passed though platform device resources, which
      can only be obtained if Device Tree booting isn't in use. Thus we
      must also support them in DT by supplying them through the PRCMU
      node.
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      e73081d9
    • Arnd Bergmann's avatar
      Merge tag 'omap-for-v3.9-rc3/fixes-signed' of... · 68843129
      Arnd Bergmann authored
      Merge tag 'omap-for-v3.9-rc3/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren <tony@atomide.com>:
      
      A clock regression fix that happened with the common clock
      conversion, and few USB regression fixes.
      
      * tag 'omap-for-v3.9-rc3/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP: clocks: Delay clk inits atleast until slab is initialized
        ARM: OMAP4: PM: fix PM regression introduced by recent clock cleanup
        ARM: OMAP3: hwmod data: keep MIDLEMODE in force-standby for musb
        ARM: OMAP4: clock data: lock USB DPLL on boot
        ARM: OMAP1: fix USB host on 1710
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      68843129
    • Arnd Bergmann's avatar
      Merge tag 'renesas-fbdev-fixes-for-v3.9' of... · b7e8c43c
      Arnd Bergmann authored
      Merge tag 'renesas-fbdev-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
      
      From Simon Horman <horms+renesas@verge.net.au>:
      
      Renesas fbdev fixes for v3.9
      
      A fix from Morimoto-san to correct the horizontal location of output.
      
      I apologise for this being posted late in the cycle.
      
      * tag 'renesas-fbdev-fixes-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        fbdev: sh_mobile_lcdc: fixup B side hsync adjust settings
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      b7e8c43c
    • Kuninori Morimoto's avatar
      fbdev: sh_mobile_lcdc: fixup B side hsync adjust settings · 9beb09f1
      Kuninori Morimoto authored
      The lcdc B side horizon output is shifted
      if sh_mobile_lcdc_pan() was called.
      This patch fixup this issue.
      It is tested on R8A7740 Armadillo800eva HDMI output.
      Special thanks to Fukushima-san, and Sano-san
      Reported-by: default avatarOsamu Fukushima <osamu.fukushima.wr@renesas.com>
      Signed-off-by: default avatarHideyuki Sano <hideyuki.sano.dn@renesas.com>
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      9beb09f1
    • Rajendra Nayak's avatar
      ARM: OMAP: clocks: Delay clk inits atleast until slab is initialized · ff931c82
      Rajendra Nayak authored
      clk inits on OMAP happen quite early, even before slab is available.
      The dependency comes from the fact that the timer init code starts to
      use clocks and hwmod and we need clocks to be initialized by then.
      
      There are various problems doing clk inits this early, one is,
      not being able to do dynamic clk registrations and hence the
      dependency on clk-private.h. The other is, inability to debug
      early kernel crashes without enabling DEBUG_LL and earlyprintk.
      
      Doing early clk init also exposed another instance of a kernel
      panic due to a BUG() when CONFIG_DEBUG_SLAB is enabled.
      
      [    0.000000] Kernel BUG at c01174f8 [verbose debug info unavailable]
      [    0.000000] Internal error: Oops - BUG: 0 [#1] SMP ARM
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0    Not tainted  (3.9.0-rc1-12179-g72d48f9 #6)
      [    0.000000] PC is at __kmalloc+0x1d4/0x248
      [    0.000000] LR is at __clk_init+0x2e0/0x364
      [    0.000000] pc : [<c01174f8>]    lr : [<c0441f54>]    psr: 600001d3
      [    0.000000] sp : c076ff28  ip : c065cefc  fp : c0441f54
      [    0.000000] r10: 0000001c  r9 : 000080d0  r8 : c076ffd4
      [    0.000000] r7 : c074b578  r6 : c0794d88  r5 : 00000040  r4 : 00000000
      [    0.000000] r3 : 00000000  r2 : c07cac70  r1 : 000080d0  r0 : 0000001c
      [    0.000000] Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
      [    0.000000] Control: 10c53c7d  Table: 8000404a  DAC: 00000017
      [    0.000000] Process swapper (pid: 0, stack limit = 0xc076e240)
      [    0.000000] Stack: (0xc076ff28 to 0xc0770000)
      [    0.000000] ff20:                   22222222 c0794ec8 c06546e8 00000000 00000040 c0794d88
      [    0.000000] ff40: c074b578 c076ffd4 c07951c8 c076e000 00000000 c0441f54 c074b578 c076ffd4
      [    0.000000] ff60: c0793828 00000040 c0794d88 c074b578 c076ffd4 c0776900 c076e000 c07272ac
      [    0.000000] ff80: 2f800000 c074c968 c07f93d0 c0719780 c076ffa0 c076ff98 00000000 00000000
      [    0.000000] ffa0: 00000000 00000000 00000000 00000001 c074cd6c c077b1ec 8000406a c0715724
      [    0.000000] ffc0: 00000000 00000000 00000000 00000000 00000000 c074c968 10c53c7d c0776974
      [    0.000000] ffe0: c074cd6c c077b1ec 8000406a 411fc092 00000000 80008074 00000000 00000000
      [    0.000000] [<c01174f8>] (__kmalloc+0x1d4/0x248) from [<c0441f54>] (__clk_init+0x2e0/0x364)
      [    0.000000] [<c0441f54>] (__clk_init+0x2e0/0x364) from [<c07272ac>] (omap4xxx_clk_init+0xbc/0x140)
      [    0.000000] [<c07272ac>] (omap4xxx_clk_init+0xbc/0x140) from [<c0719780>] (setup_arch+0x15c/0x284)
      [    0.000000] [<c0719780>] (setup_arch+0x15c/0x284) from [<c0715724>] (start_kernel+0x7c/0x334)
      [    0.000000] [<c0715724>] (start_kernel+0x7c/0x334) from [<80008074>] (0x80008074)
      [    0.000000] Code: e5883004 e1a00006 e28dd00c e8bd8ff0 (e7f001f2)
      [    0.000000] ---[ end trace 1b75b31a2719ed1c ]---
      [    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
      
      It was a know issue, that slab allocations would fail when common
      clock core tries to cache parent pointers for mux clocks on OMAP,
      and hence a patch 'clk: Allow late cache allocation for clk->parents,
      commit 7975059d' was added to work this problem around.
      A BUG() within kmalloc() with CONFIG_DEBUG_SLAB enabled was completely
      overlooked causing this regression.
      
      More details on the issue reported can be found here,
      http://www.mail-archive.com/linux-omap@vger.kernel.org/msg85932.html
      
      With all these issues around clk inits happening way too early, it
      makes sense to at least move them to a point where dynamic memory
      allocations are possible. So move them to a point just before the
      timer code starts using clocks and hwmod.
      
      This should at least pave way for clk inits on OMAP moving to dynamic
      clock registrations instead of using the static macros defined in
      clk-private.h.
      
      The issue with kernel panic while CONFIG_DEBUG_SLAB is enabled
      was reported by Piotr Haber and Tony Lindgren and this patch
      fixes the reported issue as well.
      Reported-by: default avatarPiotr Haber <phaber@broadcom.com>
      Reported-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Reviewed-by: default avatarMike Turquette <mturquette@linaro.org>
      Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
      Cc: stable@vger.kernel.org  # v3.8
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      ff931c82
  5. 26 Mar, 2013 1 commit
    • Shawn Guo's avatar
      ARM: imx: fix sync issue between imx_cpu_die and imx_cpu_kill · 2f3edfd7
      Shawn Guo authored
      There is a sync issue with hotplug operation.  It's possible that when
      imx_cpu_kill gets running on primary core, the imx_cpu_die execution
      on the core which is to be killed hasn't been finished yet.  The problem
      will very likely be hit when running suspend without no_console_suspend
      setting on kernel cmdline.
      
      It uses cpu jumping argument register to sync imx_cpu_die and
      imx_cpu_kill.  The register will be set in imx_cpu_die and imx_cpu_kill
      will wait for the register being cleared to actually kill the cpu.
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Cc: <stable@vger.kernel.org>
      2f3edfd7
  6. 25 Mar, 2013 1 commit
  7. 23 Mar, 2013 8 commits
  8. 22 Mar, 2013 11 commits
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/users/willy/linux-nvme · 5da273fe
      Linus Torvalds authored
      Pull NVMe driver update from Matthew Wilcox:
       "These patches have mostly been baking for a few months; sorry I didn't
        get them in during the merge window.  They're all bug fixes, except
        for the addition of the SMART log and the addition to MAINTAINERS."
      
      * git://git.infradead.org/users/willy/linux-nvme:
        NVMe: Add namespaces with no LBA range feature
        MAINTAINERS: Add entry for the NVMe driver
        NVMe: Initialize iod nents to 0
        NVMe: Define SMART log
        NVMe: Add result to nvme_get_features
        NVMe: Set result from user admin command
        NVMe: End queued bio requests when freeing queue
        NVMe: Free cmdid on nvme_submit_bio error
      5da273fe
    • Linus Torvalds's avatar
      Merge branch 'akpm' (fixes from Andrew) · 14629ed3
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mqueue: sys_mq_open: do not call mnt_drop_write() if read-only
        mm/hotplug: only free wait_table if it's allocated by vmalloc
        dma-debug: update DMA debug API to better handle multiple mappings of a buffer
        dma-debug: fix locking bug in check_unmap()
        drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR
        drivers/video/ep93xx-fb.c: include <linux/io.h> for devm_ioremap()
        drivers/rtc/rtc-da9052.c: fix for rtc device registration
        mm: zone_end_pfn is too small
        poweroff: change orderly_poweroff() to use schedule_work()
        mm/hugetlb: fix total hugetlbfs pages count when using memory overcommit accouting
        printk: Provide a wake_up_klogd() off-case
        irq_work.h: fix warning when CONFIG_IRQ_WORK=n
      14629ed3
    • Vladimir Davydov's avatar
      mqueue: sys_mq_open: do not call mnt_drop_write() if read-only · 38d78e58
      Vladimir Davydov authored
      mnt_drop_write() must be called only if mnt_want_write() succeeded,
      otherwise the mnt_writers counter will diverge.
      
      mnt_writers counters are used to check if remounting FS as read-only is
      OK, so after an extra mnt_drop_write() call, it would be impossible to
      remount mqueue FS as read-only.  Besides, on umount a warning would be
      printed like this one:
      
        =====================================
        [ BUG: bad unlock balance detected! ]
        3.9.0-rc3 #5 Not tainted
        -------------------------------------
        a.out/12486 is trying to release lock (sb_writers) at:
        mnt_drop_write+0x1f/0x30
        but there are no more locks to release!
      Signed-off-by: default avatarVladimir Davydov <vdavydov@parallels.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      38d78e58
    • Jianguo Wu's avatar
      mm/hotplug: only free wait_table if it's allocated by vmalloc · ca4b3f30
      Jianguo Wu authored
      zone->wait_table may be allocated from bootmem, it can not be freed.
      Signed-off-by: default avatarJianguo Wu <wujianguo@huawei.com>
      Reviewed-by: default avatarTang Chen <tangchen@cn.fujitsu.com>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Jiang Liu <jiang.liu@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ca4b3f30
    • Alexander Duyck's avatar
      dma-debug: update DMA debug API to better handle multiple mappings of a buffer · 96e7d7a1
      Alexander Duyck authored
      There were reports of the igb driver unmapping buffers without calling
      dma_mapping_error.  On closer inspection issues were found in the DMA
      debug API and how it handled multiple mappings of the same buffer.
      
      The issue I found is the fact that the debug_dma_mapping_error would
      only set the map_err_type to MAP_ERR_CHECKED in the case that the was
      only one match for device and device address.  However in the case of
      non-IOMMU, multiple addresses existed and as a result it was not setting
      this field once a second mapping was instantiated.  I have resolved this
      by changing the search so that it instead will now set MAP_ERR_CHECKED
      on the first buffer that matches the device and DMA address that is
      currently in the state MAP_ERR_NOT_CHECKED.
      
      A secondary side effect of this patch is that in the case of multiple
      buffers using the same address only the last mapping will have a valid
      map_err_type.  The previous mappings will all end up with map_err_type
      set to MAP_ERR_CHECKED because of the dma_mapping_error call in
      debug_dma_map_page.  However this behavior may be preferable as it means
      you will likely only see one real error per multi-mapped buffer, versus
      the current behavior of multiple false errors mer multi-mapped buffer.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Reviewed-by: default avatarShuah Khan <shuah.khan@hp.com>
      Tested-by: default avatarShuah Khan <shuah.khan@hp.com>
      Cc: Jakub Kicinski <kubakici@wp.pl>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      96e7d7a1
    • Alexander Duyck's avatar
      dma-debug: fix locking bug in check_unmap() · 8d640a51
      Alexander Duyck authored
      In check_unmap() it is possible to get into a dead-locked state if
      dma_mapping_error is called.  The problem is that the bucket is locked in
      check_unmap, and locked again by debug_dma_mapping_error which is called
      by dma_mapping_error.  To resolve that we must release the lock on the
      bucket before making the call to dma_mapping_error.
      
      [akpm@linux-foundation.org: restore 80-col trickery to be consistent with the rest of the file]
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Reviewed-by: default avatarShuah Khan <shuah.khan@hp.com>
      Tested-by: default avatarShuah Khan <shuah.khan@hp.com>
      Cc: Jakub Kicinski <kubakici@wp.pl>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8d640a51
    • Nicolas Ferre's avatar
      drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR · 0ef1594c
      Nicolas Ferre authored
      On some revisions of AT91 SoCs, the RTC IMR register is not working.
      Instead of elaborating a workaround for that specific SoC or IP version,
      we simply use a software variable to store the Interrupt Mask Register
      and modify it for each enabling/disabling of an interrupt.  The overhead
      of this is negligible anyway.
      
      The interrupt mask register (IMR) for the RTC is broken on the AT91SAM9x5
      sub-family of SoCs (good overview of the members here:
      http://www.eewiki.net/display/linuxonarm/AT91SAM9x5 ).  The "user visible
      effect" is the RTC doesn't work.
      
      That sub-family is less than two years old and only has devicetree (DT)
      support and came online circa lk 3.7 .  The dust is yet to settle on the
      DT stuff at least for AT91 SoCs (translation: lots of stuff is still
      broken, so much that it is hard to know where to start).
      
      The fix in the patch is pretty simple: just shadow the silicon IMR
      register with a variable in the driver.  Some older SoCs (pre-DT) use the
      the rtc-at91rm9200 driver (e.g.  obviously the AT91RM9200) and they should
      not be impacted by the change.  There shouldn't be a large volume of
      interrupts associated with a RTC.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Reported-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
      Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0ef1594c
    • H Hartley Sweeten's avatar
      drivers/video/ep93xx-fb.c: include <linux/io.h> for devm_ioremap() · e66b0587
      H Hartley Sweeten authored
      Commit be867814 ("drivers/video/ep93xx-fb.c: use devm_ functions")
      introduced a build error:
      
        drivers/video/ep93xx-fb.c: In function 'ep93xxfb_probe':
        drivers/video/ep93xx-fb.c:532: error: implicit declaration of function 'devm_ioremap'
        drivers/video/ep93xx-fb.c:533: warning: assignment makes pointer from integer without a cast
      
      Include <linux/io.h> to pickup the declaration of 'devm_ioremap'.
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Acked-by: default avatarRyan Mallon <rmallon@gmail.com>
      Cc: Damien Cassou <damien.cassou@lifl.fr>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e66b0587
    • Ashish Jangam's avatar
      drivers/rtc/rtc-da9052.c: fix for rtc device registration · 925e8ea6
      Ashish Jangam authored
      Add support for the virtual irq since now MFD only handles virtual irq
      Without this patch rtc device will fail in registration.
      
      (akpm: Ashish has a different version whcih will be needed for 3.8.x and
      earlier kernels)
      Signed-off-by: default avatarAshish <ashish.jangam@kpitcummins.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      925e8ea6
    • Russ Anderson's avatar
      mm: zone_end_pfn is too small · f9228b20
      Russ Anderson authored
      Booting with 32 TBytes memory hits BUG at mm/page_alloc.c:552! (output
      below).
      
      The key hint is "page 4294967296 outside zone".
      4294967296 = 0x100000000 (bit 32 is set).
      
      The problem is in include/linux/mmzone.h:
      
        530 static inline unsigned zone_end_pfn(const struct zone *zone)
        531 {
        532         return zone->zone_start_pfn + zone->spanned_pages;
        533 }
      
      zone_end_pfn is "unsigned" (32 bits).  Changing it to "unsigned long"
      (64 bits) fixes the problem.
      
      zone_end_pfn() was added recently in commit 108bcc96 ("mm: add & use
      zone_end_pfn() and zone_spans_pfn()")
      
      Output from the failure.
      
        No AGP bridge found
        page 4294967296 outside zone [ 4294967296 - 4327469056 ]
        ------------[ cut here ]------------
        kernel BUG at mm/page_alloc.c:552!
        invalid opcode: 0000 [#1] SMP
        Modules linked in:
        CPU 0
        Pid: 0, comm: swapper Not tainted 3.9.0-rc2.dtp+ #10
        RIP: free_one_page+0x382/0x430
        Process swapper (pid: 0, threadinfo ffffffff81942000, task ffffffff81955420)
        Call Trace:
          __free_pages_ok+0x96/0xb0
          __free_pages+0x25/0x50
          __free_pages_bootmem+0x8a/0x8c
          __free_memory_core+0xea/0x131
          free_low_memory_core_early+0x4a/0x98
          free_all_bootmem+0x45/0x47
          mem_init+0x7b/0x14c
          start_kernel+0x216/0x433
          x86_64_start_reservations+0x2a/0x2c
          x86_64_start_kernel+0x144/0x153
        Code: 89 f1 ba 01 00 00 00 31 f6 d3 e2 4c 89 ef e8 66 a4 01 00 e9 2c fe ff ff 0f 0b eb fe 0f 0b 66 66 2e 0f 1f 84 00 00 00 00 00 eb f3 <0f> 0b eb fe 0f 0b 0f 1f 84 00 00 00 00 00 eb f6 0f 0b eb fe 49
      Signed-off-by: default avatarRuss Anderson <rja@sgi.com>
      Reported-by: default avatarGeorge Beshers <gbeshers@sgi.com>
      Acked-by: default avatarHedi Berriche <hedi@sgi.com>
      Cc: Cody P Schafer <cody@linux.vnet.ibm.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f9228b20
    • Oleg Nesterov's avatar
      poweroff: change orderly_poweroff() to use schedule_work() · 2ca067ef
      Oleg Nesterov authored
      David said:
      
          Commit 6c0c0d4d ("poweroff: fix bug in orderly_poweroff()")
          apparently fixes one bug in orderly_poweroff(), but introduces
          another.  The comments on orderly_poweroff() claim it can be called
          from any context - and indeed we call it from interrupt context in
          arch/powerpc/platforms/pseries/ras.c for example.  But since that
          commit this is no longer safe, since call_usermodehelper_fns() is not
          safe in interrupt context without the UMH_NO_WAIT option.
      
      orderly_poweroff() can be used from any context but UMH_WAIT_EXEC is
      sleepable.  Move the "force" logic into __orderly_poweroff() and change
      orderly_poweroff() to use the global poweroff_work which simply calls
      __orderly_poweroff().
      
      While at it, remove the unneeded "int argc" and change argv_split() to
      use GFP_KERNEL.
      
      We use the global "bool poweroff_force" to pass the argument, this can
      obviously affect the previous request if it is pending/running.  So we
      only allow the "false => true" transition assuming that the pending
      "true" should succeed anyway.  If schedule_work() fails after that we
      know that work->func() was not called yet, it must see the new value.
      
      This means that orderly_poweroff() becomes async even if we do not run
      the command and always succeeds, schedule_work() can only fail if the
      work is already pending.  We can export __orderly_poweroff() and change
      the non-atomic callers which want the old semantics.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reported-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reported-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: Feng Hong <hongfeng@marvell.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Serge Hallyn <serge.hallyn@canonical.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2ca067ef