1. 10 9月, 2013 1 次提交
  2. 15 7月, 2013 1 次提交
    • P
      cris: delete __cpuinit usage from all cris files · 2de6c0bd
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/cris uses of the __cpuinit macros from
      all C files.  Currently cris does not have any __CPUINIT used in
      assembly files.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: linux-cris-kernel@axis.com
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      2de6c0bd
  3. 11 7月, 2013 1 次提交
  4. 04 7月, 2013 4 次提交
    • J
      mm/CRIS: clean up unused VALID_PAGE() · 35fa075f
      Jiang Liu 提交于
      VALID_PAGE() has been removed from kernel long time ago, so clean up it.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      35fa075f
    • J
      mm/cris: prepare for removing num_physpages and simplify mem_init() · 4e422de9
      Jiang Liu 提交于
      Prepare for removing num_physpages and simplify mem_init().
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4e422de9
    • 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
  5. 29 6月, 2013 1 次提交
  6. 20 6月, 2013 2 次提交
  7. 19 6月, 2013 1 次提交
  8. 18 6月, 2013 2 次提交
  9. 16 6月, 2013 14 次提交
    • G
      cris: Wire up asm-generic/vga.h · e3ccbc34
      Geert Uytterhoeven 提交于
      When compiling several DRM related files:
      
      include/video/vga.h:22:21: fatal error: asm/vga.h: No such file or directory
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      e3ccbc34
    • G
      cris: Switch cris to drivers/Kconfig · acf83630
      Geert Uytterhoeven 提交于
      allmodconfig:
      
      drivers/video/console/fonts.c:71:2: error: #error No fonts configured.
      
      This is caused by cris not using the generic drivers/Kconfig, and thus not
      traversing drivers/video/console/Kconfig.
      As the build system does traverse drivers/video/console/Makefile, fonts.c
      was compiled with an inconsistent configuration.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      acf83630
    • G
      cris: Wire up asm-generic/xor.h · cd07f4f3
      Geert Uytterhoeven 提交于
      crypto/xor.c:25:21: fatal error: asm/xor.h: No such file or directory
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      cd07f4f3
    • G
    • G
      cris: Provide inb_p() and outb_p() · 0dad16fd
      Geert Uytterhoeven 提交于
      drivers/block/hd.c: In function 'check_status':
      drivers/block/hd.c:256:2: error: implicit declaration of function 'inb_p' [-Werror=implicit-function-declaration]
      drivers/block/hd.c: In function 'controller_ready':
      drivers/block/hd.c:297:3: error: implicit declaration of function 'outb_p' [-Werror=implicit-function-declaration]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      0dad16fd
    • G
      cris: Provide <asm/kvm_para.h> · 95f40de9
      Geert Uytterhoeven 提交于
      In file included from include/linux/kvm_para.h:4:0,
                       from kernel/watchdog.c:28:
      include/uapi/linux/kvm_para.h:26:26: fatal error: asm/kvm_para.h: No such file or directory
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      95f40de9
    • G
      cris/kgdb: Remove sections protected by #ifdef PROCESS_SUPPORT · 6a89a9db
      Geert Uytterhoeven 提交于
      When enabled, it doesn't build anyway:
      
      arch/cris/arch-v10/kernel/kgdb.c: In function 'copy_registers_from_stack':
      arch/cris/arch-v10/kernel/kgdb.c:631:2: error: unknown type name 'stack_registers'
      arch/cris/arch-v10/kernel/kgdb.c:631:24: error: 'stack_registers' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c:631:24: note: each undeclared identifier is reported only once for each function it appears in
      arch/cris/arch-v10/kernel/kgdb.c:631:41: error: expected expression before ')' token
      arch/cris/arch-v10/kernel/kgdb.c:635:11: error: request for member 'r' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:636:29: error: 'stack_list' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c:637:16: error: request for member 'pc' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:638:18: error: request for member 'dccr' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:639:17: error: request for member 'srp' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c: In function 'copy_registers_to_stack':
      arch/cris/arch-v10/kernel/kgdb.c:648:2: error: unknown type name 'stack_registers'
      arch/cris/arch-v10/kernel/kgdb.c:648:24: error: 'stack_registers' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c:648:41: error: expected expression before ')' token
      arch/cris/arch-v10/kernel/kgdb.c:652:4: error: request for member 'r' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:654:3: error: request for member 'pc' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:655:3: error: request for member 'dccr' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:656:3: error: request for member 'srp' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c: In function 'write_stack_register':
      arch/cris/arch-v10/kernel/kgdb.c:702:2: error: unknown type name 'stack_registers'
      arch/cris/arch-v10/kernel/kgdb.c:702:24: error: 'stack_registers' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c:702:41: error: expected expression before ')' token
      arch/cris/arch-v10/kernel/kgdb.c:707:4: error: request for member 'r' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:710:3: error: 'stack_list' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c:713:4: error: request for member 'pc' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:716:4: error: request for member 'srp' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c:719:4: error: request for member 'dccr' in something not a structure or union
      arch/cris/arch-v10/kernel/kgdb.c: In function 'stub_is_stopped':
      arch/cris/arch-v10/kernel/kgdb.c:827:36: error: 'pos' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c: In function 'handle_exception':
      arch/cris/arch-v10/kernel/kgdb.c:1064:40: error: 'number_of_tasks' undeclared (first use in this function)
      arch/cris/arch-v10/kernel/kgdb.c:1125:8: error: implicit declaration of function 'os_is_started' [-Werror=implicit-function-declaration]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      6a89a9db
    • G
      cris/kgdb: Fix buffer overflow in getpacket() · de666cf0
      Geert Uytterhoeven 提交于
      arch/cris/arch-v10/kernel/kgdb.c: In function 'handle_exception':
      arch/cris/arch-v10/kernel/kgdb.c:534:17: warning: array subscript is above array bounds [-Warray-bounds]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      de666cf0
    • G
      cris/kgdb: Remove obsolete USED*() macros · e42e3980
      Geert Uytterhoeven 提交于
      handle_exception and internal_stack are now global
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      e42e3980
    • G
      cris/kgdb: Make symbols used from asm global · 6408ac49
      Geert Uytterhoeven 提交于
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
      (.text+0x2c3e): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
      (.text+0x2c48): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
      (.text+0x2c50): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
      (.text+0x2c58): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
      (.text+0x2c60): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o:(.text+0x2c68): more undefined references to `reg' follow
      arch/cris/arch-v10/kernel/built-in.o: In function `is_static':
      kgdb.c:(.text+0x2d46): undefined reference to `internal_stack'
      kgdb.c:(.text+0x2d4e): undefined reference to `handle_exception'
      kgdb.c:(.text+0x2d54): undefined reference to `reg'
      kgdb.c:(.text+0x2d5c): undefined reference to `reg'
      kgdb.c:(.text+0x2d64): undefined reference to `reg'
      kgdb.c:(.text+0x2d6c): undefined reference to `reg'
      kgdb.c:(.text+0x2d74): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o:kgdb.c:(.text+0x2d7c): more undefined references to `reg' follow
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_serial':
      (.text+0x2ef6): undefined reference to `internal_stack'
      arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_serial':
      (.text+0x2efe): undefined reference to `handle_exception'
      arch/cris/arch-v10/kernel/built-in.o: In function `goback':
      kgdb.c:(.text+0x2f04): undefined reference to `reg'
      kgdb.c:(.text+0x2f0c): undefined reference to `reg'
      kgdb.c:(.text+0x2f14): undefined reference to `reg'
      kgdb.c:(.text+0x2f1c): undefined reference to `reg'
      kgdb.c:(.text+0x2f24): undefined reference to `reg'
      arch/cris/arch-v10/kernel/built-in.o:kgdb.c:(.text+0x2f2c): more undefined references to `reg' follow
      
      Make reg, internal_stack, and handle_exception global to fix this.
      Rename reg to cris_reg as it's a too generic name for a global symbol.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      6408ac49
    • G
      cris/kgdb: Use #ifdef PROCESS_SUPPORT where needed · d6c97e1c
      Geert Uytterhoeven 提交于
      arch/cris/arch-v10/kernel/kgdb.c:354:12: warning: 'current_thread_c' defined but not used [-Wunused-variable]
      arch/cris/arch-v10/kernel/kgdb.c:355:12: warning: 'current_thread_g' defined but not used [-Wunused-variable]
      arch/cris/arch-v10/kernel/kgdb.c:359:18: warning: 'reg_g' defined but not used [-Wunused-variable]
      arch/cris/arch-v10/kernel/kgdb.c:622:1: warning: 'copy_registers' defined but not used [-Wunused-function]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      d6c97e1c
    • G
      cris/kgdb: Kill forward declarations for static functions · 4bf01dda
      Geert Uytterhoeven 提交于
      Move some functions around and kill forward declarations for static
      functions. This fixes:
      
      arch/cris/arch-v10/kernel/kgdb.c:255:13: warning: 'copy_registers_from_stack' declared 'static' but never defined [-Wunused-function]
      arch/cris/arch-v10/kernel/kgdb.c:259:13: warning: 'copy_registers_to_stack' declared 'static' but never defined [-Wunused-function]
      arch/cris/arch-v10/kernel/kgdb.c:267:12: warning: 'write_stack_register' declared 'static' but never defined [-Wunused-function]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      4bf01dda
    • G
      4bb77a9d
    • G
      cris/kgdb: Properly split long lines in asm · 7fc6a8ba
      Geert Uytterhoeven 提交于
      arch/cris/arch-v10/kernel/kgdb.c:1273:6: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1359:1: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1370:6: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1457:1: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1273:6: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1273:1: error: missing terminating " character
      arch/cris/arch-v10/kernel/kgdb.c:1274:3: error: expected string literal before '.' token
      arch/cris/arch-v10/kernel/kgdb.c:1359:1: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1359:1: error: missing terminating " character
      arch/cris/arch-v10/kernel/kgdb.c:1370:6: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1370:1: error: missing terminating " character
      arch/cris/arch-v10/kernel/kgdb.c:1457:1: warning: missing terminating " character [enabled by default]
      arch/cris/arch-v10/kernel/kgdb.c:1457:1: error: missing terminating " character
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      7fc6a8ba
  10. 04 6月, 2013 1 次提交
  11. 08 5月, 2013 1 次提交
  12. 05 5月, 2013 1 次提交
  13. 01 5月, 2013 2 次提交
    • T
      dump_stack: unify debug information printed by show_regs() · a43cb95d
      Tejun Heo 提交于
      show_regs() is inherently arch-dependent but it does make sense to print
      generic debug information and some archs already do albeit in slightly
      different forms.  This patch introduces a generic function to print debug
      information from show_regs() so that different archs print out the same
      information and it's much easier to modify what's printed.
      
      show_regs_print_info() prints out the same debug info as dump_stack()
      does plus task and thread_info pointers.
      
      * Archs which didn't print debug info now do.
      
        alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
        metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
        um, xtensa
      
      * Already prints debug info.  Replaced with show_regs_print_info().
        The printed information is superset of what used to be there.
      
        arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86
      
      * s390 is special in that it used to print arch-specific information
        along with generic debug info.  Heiko and Martin think that the
        arch-specific extra isn't worth keeping s390 specfic implementation.
        Converted to use the generic version.
      
      Note that now all archs print the debug info before actual register
      dumps.
      
      An example BUG() dump follows.
      
       kernel BUG at /work/os/work/kernel/workqueue.c:4841!
       invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
       Hardware name: empty empty/S3992, BIOS 080011  10/26/2007
       task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
       RIP: 0010:[<ffffffff8234a07e>]  [<ffffffff8234a07e>] init_workqueues+0x4/0x6
       RSP: 0000:ffff88007c861ec8  EFLAGS: 00010246
       RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
       RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
       RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
       R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
       R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
       FS:  0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
       CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
       Stack:
        ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
        0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
        ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
       Call Trace:
        [<ffffffff81000312>] do_one_initcall+0x122/0x170
        [<ffffffff82335e5d>] kernel_init_freeable+0x9b/0x1c8
        [<ffffffff81c47760>] ? rest_init+0x140/0x140
        [<ffffffff81c4776e>] kernel_init+0xe/0xf0
        [<ffffffff81c6be9c>] ret_from_fork+0x7c/0xb0
        [<ffffffff81c47760>] ? rest_init+0x140/0x140
        ...
      
      v2: Typo fix in x86-32.
      
      v3: CPU number dropped from show_regs_print_info() as
          dump_stack_print_info() has been updated to print it.  s390
          specific implementation dropped as requested by s390 maintainers.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Acked-by: Chris Metcalf <cmetcalf@tilera.com>		[tile bits]
      Acked-by: Richard Kuo <rkuo@codeaurora.org>		[hexagon bits]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a43cb95d
    • T
      dump_stack: consolidate dump_stack() implementations and unify their behaviors · 196779b9
      Tejun Heo 提交于
      Both dump_stack() and show_stack() are currently implemented by each
      architecture.  show_stack(NULL, NULL) dumps the backtrace for the
      current task as does dump_stack().  On some archs, dump_stack() prints
      extra information - pid, utsname and so on - in addition to the
      backtrace while the two are identical on other archs.
      
      The usages in arch-independent code of the two functions indicate
      show_stack(NULL, NULL) should print out bare backtrace while
      dump_stack() is used for debugging purposes when something went wrong,
      so it does make sense to print additional information on the task which
      triggered dump_stack().
      
      There's no reason to require archs to implement two separate but mostly
      identical functions.  It leads to unnecessary subtle information.
      
      This patch expands the dummy fallback dump_stack() implementation in
      lib/dump_stack.c such that it prints out debug information (taken from
      x86) and invokes show_stack(NULL, NULL) and drops arch-specific
      dump_stack() implementations in all archs except blackfin.  Blackfin's
      dump_stack() does something wonky that I don't understand.
      
      Debug information can be printed separately by calling
      dump_stack_print_info() so that arch-specific dump_stack()
      implementation can still emit the same debug information.  This is used
      in blackfin.
      
      This patch brings the following behavior changes.
      
      * On some archs, an extra level in backtrace for show_stack() could be
        printed.  This is because the top frame was determined in
        dump_stack() on those archs while generic dump_stack() can't do that
        reliably.  It can be compensated by inlining dump_stack() but not
        sure whether that'd be necessary.
      
      * Most archs didn't use to print debug info on dump_stack().  They do
        now.
      
      An example WARN dump follows.
      
       WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
       Hardware name: empty
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #9
        0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
        ffffffff8108f50f ffffffff82228240 0000000000000040 ffffffff8234a03c
        0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
       Call Trace:
        [<ffffffff81c614dc>] dump_stack+0x19/0x1b
        [<ffffffff8108f50f>] warn_slowpath_common+0x7f/0xc0
        [<ffffffff8108f56a>] warn_slowpath_null+0x1a/0x20
        [<ffffffff8234a071>] init_workqueues+0x35/0x505
        ...
      
      v2: CPU number added to the generic debug info as requested by s390
          folks and dropped the s390 specific dump_stack().  This loses %ksp
          from the debug message which the maintainers think isn't important
          enough to keep the s390-specific dump_stack() implementation.
      
          dump_stack_print_info() is moved to kernel/printk.c from
          lib/dump_stack.c.  Because linkage is per objecct file,
          dump_stack_print_info() living in the same lib file as generic
          dump_stack() means that archs which implement custom dump_stack()
          - at this point, only blackfin - can't use dump_stack_print_info()
          as that will bring in the generic version of dump_stack() too.  v1
          The v1 patch broke build on blackfin due to this issue.  The build
          breakage was reported by Fengguang Wu.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>	[s390 bits]
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Acked-by: Richard Kuo <rkuo@codeaurora.org>		[hexagon bits]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      196779b9
  14. 30 4月, 2013 2 次提交
  15. 17 4月, 2013 1 次提交
  16. 10 4月, 2013 2 次提交
  17. 08 4月, 2013 2 次提交
  18. 05 4月, 2013 1 次提交