1. 08 7月, 2013 13 次提交
  2. 04 7月, 2013 4 次提交
    • J
      mm/xtensa: prepare for removing num_physpages and simplify mem_init() · 808c2c37
      Jiang Liu 提交于
      Prepare for removing num_physpages and simplify mem_init().
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      808c2c37
    • J
      mm: concentrate modification of totalram_pages into the mm core · 0c988534
      Jiang Liu 提交于
      Concentrate code to modify totalram_pages into the mm core, so the arch
      memory initialized code doesn't need to take care of it.  With these
      changes applied, only following functions from mm core modify global
      variable totalram_pages: free_bootmem_late(), free_all_bootmem(),
      free_all_bootmem_node(), adjust_managed_page_count().
      
      With this patch applied, it will be much more easier for us to keep
      totalram_pages and zone->managed_pages in consistence.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0c988534
    • J
      mm: enhance free_reserved_area() to support poisoning memory with zero · dbe67df4
      Jiang Liu 提交于
      Address more review comments from last round of code review.
      1) Enhance free_reserved_area() to support poisoning freed memory with
         pattern '0'. This could be used to get rid of poison_init_mem()
         on ARM64.
      2) A previous patch has disabled memory poison for initmem on s390
         by mistake, so restore to the original behavior.
      3) Remove redundant PAGE_ALIGN() when calling free_reserved_area().
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dbe67df4
    • J
      mm: change signature of free_reserved_area() to fix building warnings · 11199692
      Jiang Liu 提交于
      Change signature of free_reserved_area() according to Russell King's
      suggestion to fix following build warnings:
      
        arch/arm/mm/init.c: In function 'mem_init':
        arch/arm/mm/init.c:603:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default]
          free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL);
          ^
        In file included from include/linux/mman.h:4:0,
                         from arch/arm/mm/init.c:15:
        include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'void *'
         extern unsigned long free_reserved_area(unsigned long start, unsigned long end,
      
         mm/page_alloc.c: In function 'free_reserved_area':
      >> mm/page_alloc.c:5134:3: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [enabled by default]
         In file included from arch/mips/include/asm/page.h:49:0,
                          from include/linux/mmzone.h:20,
                          from include/linux/gfp.h:4,
                          from include/linux/mm.h:8,
                          from mm/page_alloc.c:18:
         arch/mips/include/asm/io.h:119:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int'
         mm/page_alloc.c: In function 'free_area_init_nodes':
         mm/page_alloc.c:5030:34: warning: array subscript is below array bounds [-Warray-bounds]
      
      Also address some minor code review comments.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      11199692
  3. 29 6月, 2013 1 次提交
  4. 18 6月, 2013 1 次提交
  5. 06 6月, 2013 7 次提交
  6. 21 5月, 2013 2 次提交
  7. 10 5月, 2013 1 次提交
    • G
      xtensa simdisk: Fix proc_create_data() conversion fallout · 0757f615
      Geert Uytterhoeven 提交于
      arch/xtensa/platforms/iss/simdisk.c: In function 'proc_read_simdisk':
      arch/xtensa/platforms/iss/simdisk.c:220:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
      arch/xtensa/platforms/iss/simdisk.c: In function 'proc_write_simdisk':
      arch/xtensa/platforms/iss/simdisk.c:241:38: error: 'buffer' undeclared (first use in this function)
      arch/xtensa/platforms/iss/simdisk.c:241:38: note: each undeclared identifier is reported only once for each function it appears in
      
      Introduced by commit a69755b1 ("xtensa
      simdisk: switch to proc_create_data()")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0757f615
  8. 09 5月, 2013 11 次提交
    • G
      b341d84c
    • C
      xtensa: fix redboot load address · a078ccff
      Chris Zankel 提交于
      With the patch to support MMUv3, the base address for the loaded
      binary image has changed, and a fix was applied to the U-Boot image.
      This fixes the RedBoot image.
      Signed-off-by: NChris Zankel <chris@zankel.net>
      a078ccff
    • M
      xtensa: ISS: fix timer_lock usage in rs_open · efefbcc5
      Max Filippov 提交于
      This fixes the following lockdep splat:
      
      [   66.460000] =================================
      [   66.460000] [ INFO: inconsistent lock state ]
      [   66.460000] 3.9.0-rc5-00161-ga48dd49 #4 Not tainted
      [   66.460000] ---------------------------------
      [   66.460000] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [   66.460000] swapper/1 [HC0[0]:SC1[1]:HE1:SE0] takes:
      [   66.460000]  (timer_lock){+.?...}, at: [<d0006cde>] rs_poll+0x12/0xdc
      [   66.460000] {SOFTIRQ-ON-W} state was registered at:
      [   66.460000]   [<d00421f0>] lock_acquire+0xec/0x13c
      [   66.460000]   [<d01ea036>] _raw_spin_lock+0x3a/0x84
      [   66.460000]   [<d0006c8c>] rs_open+0x18/0x58
      [   66.460000]   [<d0139ea2>] tty_open+0x262/0x3cc
      [   66.460000]   [<d00942e0>] chrdev_open+0x8c/0xe0
      [   66.460000]   [<d00907b2>] do_dentry_open$isra$16+0x10e/0x190
      [   66.460000]   [<d0091141>] finish_open+0x39/0x48
      [   66.460000]   [<d009a0b4>] do_last$isra$34+0x6c4/0x824
      [   66.460000]   [<d009a27a>] path_openat+0x66/0x310
      [   66.460000]   [<d009a53a>] do_filp_open+0x16/0x44
      [   66.460000]   [<d0091445>] do_sys_open+0xd5/0x13c
      [   66.460000]   [<d00914be>] sys_open+0x12/0x18
      [   66.460000]   [<d0413ffc>] kernel_init_freeable+0xe4/0x12c
      [   66.460000]   [<d01e2a9c>] kernel_init+0xc/0x9c
      [   66.460000]   [<d00044fc>] ret_from_kernel_thread+0x8/0xc
      [   66.460000] irq event stamp: 132542
      [   66.460000] hardirqs last  enabled at (132542): [<d01ea2ec>] _raw_spin_unlock_irq+0x30/0x44
      [   66.460000] hardirqs last disabled at (132541): [<d01ea11e>] _raw_spin_lock_irq+0xe/0x8c
      [   66.460000] softirqs last  enabled at (132234): [<d0017d32>] __do_softirq+0x216/0x2a4
      [   66.460000] softirqs last disabled at (132539): [<d0018024>] irq_exit+0x38/0x40
      [   66.460000]
      [   66.460000] other info that might help us debug this:
      [   66.460000]  Possible unsafe locking scenario:
      [   66.460000]
      [   66.460000]        CPU0
      [   66.460000]        ----
      [   66.460000]   lock(timer_lock);
      [   66.460000]   <Interrupt>
      [   66.460000]     lock(timer_lock);
      [   66.460000]
      [   66.460000]  *** DEADLOCK ***
      [   66.460000]
      [   66.460000] 1 lock held by swapper/1:
      [   66.460000]  #0:  (((&serial_timer))){+.-...}, at: [<d001c65c>] call_timer_fn+0x0/0x1f0
      [   66.460000]
      Stack: d7c2fac0 00000018 00000004 00000001 d7c2faa0 00000004 00000006 d7c2fa90
             9003e87c d7c2fae0 d7c30000 d025a87c 00000001 0000000f 00000000 d7c2fac0
             9004005d d7c2fb10 d7c30000 d7c30338 00000001 00000001 00000000 d7c30338
      [   66.460000] Call Trace:
      [   66.460000]  [<d01e4f93>] print_usage_bug$part$26+0x1c3/0x1c8
      [   66.460000]  [<d003e87c>] mark_lock+0x2b4/0x440
      [   66.460000]  [<d004005d>] __lock_acquire+0x54d/0x16c4
      [   66.460000]  [<d00421f0>] lock_acquire+0xec/0x13c
      [   66.460000]  [<d01ea036>] _raw_spin_lock+0x3a/0x84
      [   66.460000]  [<d0006cde>] rs_poll+0x12/0xdc
      [   66.460000]  [<d001c71a>] call_timer_fn+0xbe/0x1f0
      [   66.460000]  [<d001cd90>] run_timer_softirq+0x198/0x1f4
      [   66.460000]  [<d0017c30>] __do_softirq+0x114/0x2a4
      [   66.460000]  [<d0018024>] irq_exit+0x38/0x40
      [   66.460000]  [<d00046c0>] do_IRQ+0x44/0x48
      [   66.460000]  [<d0005c58>] do_interrupt+0x4c/0x54
      [   66.460000]  [<d0003c80>] common_exception_return+0x0/0x5c
      [   66.460000]  [<d006682c>] free_pcppages_bulk+0x254/0x308
      [   66.460000]
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      efefbcc5
    • M
      xtensa: disable IRQs while IRQ handler is running · 895666a9
      Max Filippov 提交于
      IRQ handlers are expected to run with IRQs disabled.
      See e.g. http://lwn.net/Articles/380931/ for a longer story.
      
      This was overlooked in the commit
        2d1c645c xtensa: dispatch medium-priority interrupts
      Revert to old behavior and simplify interrupt entry and exit code.
      Interrupt handler still honours IRQ priority.
      
      do_notify_resume/schedule must be called with interrupts enabled, enable
      interrupts if we return from user exception.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      895666a9
    • M
      xtensa: enable lockdep support · 8f371c75
      Max Filippov 提交于
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      8f371c75
    • M
      xtensa: fix arch_irqs_disabled_flags implementation · 031d0112
      Max Filippov 提交于
      IRQs are disabled when PS.EXCM is set or PS.INTLEVEL is equal to or
      higher than LOCKLEVEL.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      031d0112
    • M
      xtensa: add irq flags trace support · c92931b2
      Max Filippov 提交于
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      c92931b2
    • M
      xtensa: provide custom CALLER_ADDR* implementations · 3ae908c9
      Max Filippov 提交于
      Definition of CALLER_ADDR* through __builtin_return_address makes
      compiler insert calls to __xtensa_libgcc_window_spill, which in turn
      makes fast_syscall_spill_registers syscall that clobbers registers when
      called from the kernel mode, leading to invalid opcode exceptions on
      return to userspace.
      
      Provide definition for CALLER_ADDR0 as MAKE_PC_FROM_RA(a0, a1) and in
      case CONFIG_FRAME_POINTER is enabled extract CALLER_ADDR{1-3} from
      stack.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      3ae908c9
    • M
      xtensa: add stacktrace support · 3e4196a5
      Max Filippov 提交于
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      3e4196a5
    • M
      xtensa: clean up stpill_registers · 4e96274e
      Max Filippov 提交于
      - remove unused asm parameters;
      - fix EXCM bit setting in the PS SR during _spill_registers call.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      4e96274e
    • M
      xtensa: don't use a7 in simcalls · f4b93ba9
      Max Filippov 提交于
      To support FRAME_POINTER avoid using a7 in __simc (none of the existing
      simcalls needs it). Replace calls to __simc with more specific
      simc_read, simc_write and simc_lseek calls.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      f4b93ba9