summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v10/kernel/kgdb.c
AgeCommit message (Collapse)Author
2015-11-02cris: arch-v10: kgdb: Add '__used' for static variable is_dyn_brkpChen Gang
Within one C file, current gcc can optimize the global static variables according to the C code, but it will skip assembly code -- it will pass them to gas directly. if the static variable is used between C code and assembly code in one C file (e.g. is_dyn_brkp in kgdb.c), it needs '__used' to let gcc know it should be still used, or gcc may remove it for optimization. The related error in this case: LD init/built-in.o arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint': (.text+0x2aca): undefined reference to `is_dyn_brkp' arch/cris/arch-v10/kernel/built-in.o: In function `is_static': kgdb.c:(.text+0x2ada): undefined reference to `is_dyn_brkp' Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-11-02cris: arch-v10: kgdb: Use BAR instead of DTP0 for register P12Chen Gang
For arch-v10, there is no DTP0 register, and at present, assembler know BAR, so use BAR instead of DTP0, the related error (with allmodconfig): CC arch/cris/arch-v10/kernel/kgdb.o {standard input}: Assembler messages: {standard input}:6: Error: Illegal operands {standard input}:6: Error: Illegal operands Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Acked-by: Hans-Peter Nilsson <hp@axis.com> Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-11-02cris: kgdb: use native hex2binAndy Shevchenko
There are kernel native helpers to convert hex ascii to the binary format: hex_to_bin() and hex2bin(). Thus, no need to reimplement them customly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jesper Nilsson <jespern@axis.com>
2013-06-16cris/kgdb: Remove sections protected by #ifdef PROCESS_SUPPORTGeert 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: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Fix buffer overflow in getpacket()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: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Remove obsolete USED*() macrosGeert Uytterhoeven
handle_exception and internal_stack are now global Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Make symbols used from asm globalGeert 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: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Use #ifdef PROCESS_SUPPORT where neededGeert 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: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Kill forward declarations for static functionsGeert 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: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Remove unused static int do_printkGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16cris/kgdb: Properly split long lines in asmGeert 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: Geert Uytterhoeven <geert@linux-m68k.org>
2012-04-03cris:fix the wrong function declearWanlong Gao
Fix wrong declear of write_stack_register. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Jesper Nilsson <jespern@axis.com>
2011-11-01kgdb: follow rename pack_hex_byte() to hex_byte_pack()Andy Shevchenko
There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-29[CRIS] Move header files from include to arch/cris/include.Jesper Nilsson
Change all users of header files to correct path. Remove some unneeded headers for arch-v32. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-07-26cris: use the common ascii hex helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08CRIS v10: Remove CVS log and id from kernel/kgdb.cJesper Nilsson
2007-10-19Spelling fix: explicitlyJean Delvare
From: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2006-11-30Fix misc .c/.h comment typosMatt LaPlante
Fix various .c/.h typos in comments (no code changes). Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-06[PATCH] cris: kgdb: remove double_this()Alexey Dobriyan
Doesn't make much sense and unused. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27[PATCH] CRIS update: misc patchesMikael Starvik
* Start threads with IRQs enabled. * Move symbol exports to arch specific file. * Prepare for real command line in the future. * Handle csum for partition that crosses flash boundary. * Set utsname. Signed-off-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!