Alpha print the symbol name in Oops
Subsystems (4)
PATCH 1/1 Alpha print the symbol name in Oops
Hi,
This makes Alpha to print the symbol name in a Oops message.
-aneesh
tmp/traps.c renamed from traps.c +4 -2
@@ -14,10 +14,11 @@#include <linux/tty.h> #include <linux/delay.h> #include <linux/smp_lock.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/kallsyms.h> #include <asm/gentrap.h> #include <asm/uaccess.h> #include <asm/unaligned.h> #include <asm/sysinfo.h>
@@ -117,20 +118,21 @@static void dik_show_trace (unsigned long *sp) {long i =0 ; -printk ("Trace:" ); +printk ("Trace:\n" );while (0x1ff8 & (unsigned long ) sp) {extern char _stext[], _etext[];unsigned long tmp = *sp; sp++;if (tmp < (unsigned long ) &_stext)continue ;if (tmp >= (unsigned long ) &_etext)continue ; -printk ("%lx%c" , tmp,' ' ); +printk ("[<%lx>]" , tmp); +print_symbol (" %s\n" , tmp);if (i >40 ) {printk (" ..." );break ; } }
Quoted 3 lines · Aneesh Kumar
+
printk("[<%lx>]", tmp);
+print_symbol(" %s\n", tmp);
print_symbol() does nothing at all if CONFIG_KALLSYMS=n. You probably want:
printk("[<%lx>]", tmp);
print_symbol(" %s", tmp);
printk("\n");Quoted 11 lines · Andrew Morton
Quoted 3 lines · Aneesh Kumar
+
printk("[<%lx>]", tmp);
+print_symbol(" %s\n", tmp);
print_symbol()does nothing at all ifCONFIG_KALLSYMS=n. You probably want:printk("[<%lx>]", tmp); print_symbol(" %s", tmp); printk("\n");
Patch attached.
-aneesh
Only in linux-2.6.6: .config
Only in linux-2.6.6: .config.old
Only in linux-2.6.6: .version
Makefile +7 -7
@@ -436,22 +436,22 @@ # If .config needs to be updated, it will be done via the dependency # that autoconf has on .config. # To avoid any implicit rule to kick in, define an empty command .config: ; -#Add OpenSSI directory if CONFIG_CLUSTER -cluster-$(CONFIG_CLUSTER) := cluster/ + # If .config is newer than include/linux/autoconf.h, someone tinkered # with it and forgot to run make oldconfig include/linux/autoconf.h: .config $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig else # Dummy target needed, because used as prerequisite include/linux/autoconf.h: ; endif + include $(srctree)/arch/$(ARCH)/Makefile ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE CFLAGS += -Os else
@@ -485,12 +485,11 @@ MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) export MODLIB ifeq ($(KBUILD_EXTMOD),) -core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ -core-y += $(cluster-y) +core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ cluster/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ $(net-y) $(net-m) $(libs-y) $(libs-m)))
@@ -634,13 +633,10 @@ endif ifdef CONFIG_CLUSTER # All OpenSSI cluster relation preparation of code goes here # - -MRPROPER_FILES += include/cluster/arch include/cluster/gen/ics_proto_gen.h - preparecluster: clustersymlinks clustergen clustersymlinks: include/cluster/arch include/cluster/arch: $(srctree)/scripts/openssi/lnrel.sh
@@ -652,10 +648,11 @@ clustergen: include/cluster/gen/ics_proto_gen.h openssirpcgen include/cluster/gen/ics_proto_gen.h: $(srctree)/scripts/openssi/type_template.awk @echo ' Generating.... $@' $(Q)if [ ! -d include/cluster/gen ]; then mkdir -p include/cluster/gen; fi; + $(Q)if [ ! -x /usr/bin/gawk ]; then echo "/usr/bin/gawk not found" ; exit 1; fi; @gawk -f $(srctree)/scripts/openssi/type_template.awk \ $(srctree)/include/cluster/gen/ics_proto_gen.h.template \ $(srctree)/include/cluster/gen/ics_proto_gen.h.list >$@ openssirpcgen:
@@ -840,10 +837,13 @@ MRPROPER_DIRS += include/config include2 MRPROPER_FILES += .config .config.old include/asm .version \ include/linux/autoconf.h include/linux/version.h \ Module.symvers tags TAGS cscope* +#OpenSSI files that need to be cleaned +MRPROPER_FILES += include/cluster/arch include/cluster/gen/ics_proto_gen.h + # clean - Delete most, but leave enough to build external modules # clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) clean-dirs := $(addprefix _clean_,$(vmlinux-alldirs))
arch/alpha/kernel/entry.S +5 -4
@@ -643,13 +643,13 @@ ldq $2, alpha_mv+HAE_CACHE stq $2, 152($sp) /* HAE */ /* Shuffle FLAGS to the front; add CLONE_VM. */ #ifdef CONFIG_SSI - ldi $1, CLONE_VM|CLONE_UNTRACED + ldi $1, KTHREAD_FLAGS | CLONE_UNTRACED #else - ldi $1, KTHREAD_FLAGS + ldi $1, CLONE_VM|CLONE_UNTRACED #endif or $18, $1, $16 bsr $26, sys_clone /* We don't actually care for a3 success widgetry in the kernel.
@@ -708,11 +708,11 @@ /* Avoid the HAE being gratuitously wrong, to avoid restoring it. */ ldq $2, alpha_mv+HAE_CACHE stq $2, 152($sp) /* HAE */ /* Shuffle FLAGS to the front */ - ldi $1, KTHREAD_FLAGS + ldi $1, KTHREAD_FLAGS | CLONE_UNTRACED or $18, $1, $16 mov $31, $17 /* second argument = 0 */ mov $31, $18 /* third argument = 0 */ mov $31, $19 /* fourth argument = 0 */ mov $31, $20 /* fifth argument = 0 */
@@ -722,11 +722,12 @@ /* We don't actually care for a3 success widgetry in the kernel. * Not for positive errno values. */ stq $0, 0($sp) /* $0 */ br restore_all -.end kernel_thread +.end kernel_thread_with_pid +#endif /* * execve(path, argv, envp) */ .align 4 .globl execve
arch/alpha/kernel/systbls.S +15 -0
@@ -455,10 +455,25 @@ .quad sys_mq_unlink .quad sys_mq_timedsend .quad sys_mq_timedreceive /* 435 */ .quad sys_mq_notify .quad sys_mq_getsetattr +#ifdef CONFIG_CLUSTER + .quad sys_ssisys /* 438 */ +#else + .quad alpha_ni_syscall +#endif +#ifdef CONFIG_SSI + .quad sys_rfork + .quad sys_rexecve + .quad sys_migrate /* 441 */ +#else + .quad alpha_ni_syscall + .quad alpha_ni_syscall + .quad alpha_ni_syscall +#endif + .size sys_call_table, . - sys_call_table .type sys_call_table, @object /* Remember to update everything, kids. */
arch/alpha/kernel/traps.c +5 -2
@@ -14,10 +14,11 @@#include <linux/tty.h> #include <linux/delay.h> #include <linux/smp_lock.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/kallsyms.h> #include <asm/gentrap.h> #include <asm/uaccess.h> #include <asm/unaligned.h> #include <asm/sysinfo.h>
@@ -117,20 +118,22 @@static void dik_show_trace (unsigned long *sp) {long i =0 ; -printk ("Trace:" ); +printk ("Trace:\n" );while (0x1ff8 & (unsigned long ) sp) {extern char _stext[], _etext[];unsigned long tmp = *sp; sp++;if (tmp < (unsigned long ) &_stext)continue ;if (tmp >= (unsigned long ) &_etext)continue ; -printk ("%lx%c" , tmp,' ' ); +//printk("%lx%c", tmp, ' '); +printk ("[<%lx>]" , tmp); +print_symbol (" %s\n" , tmp);if (i >40 ) {printk (" ..." );break ; } }
arch/i386/kernel/entry.S +7 -1
@@ -933,14 +933,20 @@ .long sys_mq_notify .long sys_mq_getsetattr # SSI_XXX: might need asmlinkage declaration in include/linux/syscalls.h #ifdef CONFIG_CLUSTER .long sys_ssisys +#else + .long sys_ni_syscall +#endif #ifdef CONFIG_SSI /* BEGIN SSI SYSTEM CALLS */ .long sys_rfork .long sys_rexecve /* 285 */ .long sys_migrate +#else + .long sys_ni_syscall + .long sys_ni_syscall + .long sys_ni_syscall #endif /* CONFIG_SSI */ -#endif /* CONFIG_CLUSTER */ syscall_table_size=(.-sys_call_table)
cluster/Kconfig +8 -0
@@ -65,10 +65,18 @@ This value specifies how many "imalive" packets to send out per timeout period. The default is set to the value 3. +config NODE_MONITOR_LOG_THRESHOLD + int "Node Monitor log threshold" + default 1 + ---help--- + FIXME!! write down what it is + + The default is set to the value 1. + config CPID bool "Clusterwide PIDs" ---help--- Saying Y here enables a clusterwide PID space.
cluster/Makefile +2 -4
@@ -1,8 +1,6 @@ # # Top level Makefile for the linux OpenSSI cluster implementation. # -obj-y := -obj-$(CONFIG_SSI) += ssi/ -obj-$(CONFIG_CLUSTER) += clms/ ics/ util/ - +obj-$(CONFIG_CLUSTER) := clms/ ics/ util/ +#obj-$(CONFIG_SSI) += ssi/
cluster/clms/Makefile +0 -1
@@ -19,6 +19,5 @@ clean-files := icscli_clms_gen.c icssvr_clms_gen.c icssvr_clms_tables_gen.c clean-files += ics_clms_macros_gen.h ics_clms_protos_gen.h SVCFILES := clms.svc -
cluster/clms/clms_client.c +2 -2
@@ -392,12 +392,12 @@ &key_servers, &num_key_servers, &key_icsinfo, &num_key_servers_ics, this_node, - cpucount+1 , - cpucount+1 , +num_possible_cpus (), +num_online_cpus (), loops_per_jiffy, num_physpages);if ( (error) || (rval) ) {panic ("clms_client_join_cluster: rpc to clms master failed error %d rval %d\n" , error, rval); }
cluster/clms/clms_master.c +2 -2
@@ -73,12 +73,12 @@void clms_initialize_node_info (clusternode_t node) { - clms.clms_node_info[node].online_cpus = - clms.clms_node_info[node].total_cpus = cpucount +1 ; + clms.clms_node_info[node].online_cpus =num_online_cpus (); + clms.clms_node_info[node].total_cpus =num_possible_cpus (); clms.clms_node_info[node].cpu_power = loops_per_jiffy; clms.clms_node_info[node].total_memory = num_physpages; }/*
cluster/ics/Makefile +1 -1
@@ -13,9 +13,9 @@ $(obj)/ics_svr.o: $(obj)/ics_icssig_protos_gen.h $(obj)/ics_svr_mgmt.o: $(obj)/ics_icssig_protos_gen.h $(obj)/icssig_ics.o: $(obj)/ics_icssig_protos_gen.h $(obj)/icscli_icssig_gen.c $(obj)/icssvr_icssig_gen.c clean-files := icscli_icssig_gen.c icssvr_icssig_gen.c icssvr_icssig_tables_gen.c -clean-files := ics_icssig_macros_gen.h ics_icssig_protos_gen.h +clean-files += ics_icssig_macros_gen.h ics_icssig_protos_gen.h SVCFILES := icssig.svc
Only in linux-2.6.6/cluster/rpcgen: openssirpcgen
cluster/util/Makefile +1 -2
@@ -4,12 +4,11 @@ # # obj-$(CONFIG_CLUSTER) := assert.o cluster_ksyms.o cluster_api_ics.o nsc_async.o nsc_daemon.o -#obj-$(CONFIG_CLUSTER) += nsc_ics.o nsc_init.o nsc_log.o nsc_nodelist.o nsc_scalls.o nsc_xdr.o -obj-$(CONFIG_CLUSTER) += nsc_init.o nsc_log.o nsc_nodelist.o +obj-$(CONFIG_CLUSTER) += nsc_ics.o nsc_init.o nsc_log.o nsc_nodelist.o nsc_scalls.o nsc_xdr.o obj-$(CONFIG_CLUSTER) += nsc_callback.o nsc_ndreg.o xdr_msghdr.o xdr.o assert.o node_monitor.o $(obj)/cluster_api_ics.o: $(obj)/ics_cluster_api_protos_gen.h $(obj)/icscli_cluster_api_gen.c $(obj)/icssvr_cluster_api_gen.c $(obj)/nsc_scalls..o: $(obj)/ics_cluster_api_protos_gen.h $(obj)/ics_cluster_api_macros_gen.h
cluster/util/node_monitor.c +1 -2
@@ -128,12 +128,11 @@/* * Initialize Node Monitoring on Master node. * reinit_flag is set if this is a CLMS secondary becoming the Master. */ -static void __init -nm_do_init (void ) +static void nm_do_init (void ) {int error;struct nm_settings nm_settings;INIT_EVENT (&nm_nodedown_event);
cluster/util/nsc_ics.c +4 -4
@@ -741,11 +741,11 @@/* * Using the given xdr routine encode the arguments into * a msghdr. */ if (!icsxdr_encode_msghdr (&x, xargs, argsp, &margsp)) { - ics_stat =RPC_CANTENCODEARGS ; + ics_stat =CLUSTER_RPC_CANTENCODEARGS ;freemsghdr (margsp);ICSXDRLOG (ICSXDR_DBG_RCALL ,"nsc_rcall: returning %d\n" , ics_stat); goto out; }
@@ -782,11 +782,11 @@/* * Decode results and free the returned msghdr. */ ASSERT (mresp !=NULL );if (!icsxdr_decode_msghdr (&x, xresults, resultsp, mresp)) - ics_stat =RPC_CANTDECODERES ; + ics_stat =CLUSTER_RPC_CANTDECODERES ;freemsghdr (mresp); } }else { ics_stat = cli_icsnsc_rcall_msg(node, svc,
@@ -857,11 +857,11 @@* Decode any arguments and free the associated mblks. */ if (margsp) {if (!icsxdr_decode_msghdr (xdrs, funcinfoptr->trpc_xargs, argp, margsp)) { - error =RPC_CANTDECODEARGS ; + error =CLUSTER_RPC_CANTDECODEARGS ;freemsghdr (margsp); goto out; }freemsghdr (margsp); }
@@ -893,11 +893,11 @@* if this fails. */ if (funcinfoptr->trpc_xresults != (xdrproc_t )xdr_void && !icsxdr_encode_msghdr (xdrs,funcinfoptr->trpc_xresults, resp,mrespp)) { - error =RPC_SYSTEMERROR ; + error =CLUSTER_RPC_SYSTEMERROR ;freemsghdr (*mrespp); *mrespp =NULL ; } }
cluster/util/nsc_scalls.c +6 -24
@@ -1148,11 +1148,11 @@clusternode_info_t outargs;clusternode_t node;int error =0 ;int online =0 ;int cpus =0 ; -int status, i; +int status;clms_api_state_t info;int info_size; if (uaddrin_len <= 0 || uaddrin_len > sizeof(inargs) ||
@@ -1193,20 +1193,13 @@/* * Get information about the CPU's * This should be function ship to the specified node */ if (this_node == node) { -#ifdef CONFIG_SMP -for (i =0 ; i <NR_CPUS ; i++) -if (cpu_online_map & (1UL << i)) - cpus++; - online = cpucount +1 ; -#else /* CONFIG_SMP */ - cpus = online =1 ; -#endif /* CONFIG_SMP */ - } -else { + cpus =num_possible_cpus (); + online =num_online_cpus (); + }else { error =RCLUSTER_API_GETCPUINFO (node, &status, this_node, &cpus, &online);if (error == -EREMOTE ) { cpus = online =0 ;
@@ -1370,23 +1363,12 @@int *rval, clusternode_t my_node, int *num_cpus, int *onlinecpus) { -#ifdef CONFIG_SMP - int cpus = 0; -int i; - -for (i =0 ; i <NR_CPUS ; i++) -if (cpu_online_map & (1UL << i)) - cpus++; - *num_cpus = cpus; - *onlinecpus = cpucount +1 ; -#else /* CONFIG_SMP */ - *num_cpus = *onlinecpus =1 ; -#endif /* CONFIG_SMP */ - + *num_cpus =num_possible_cpus (); + *onlinecpus =num_online_cpus ();return 0 ; }/* * cluster_maxnodes()
cluster/util/xdr.c +2 -2
@@ -88,11 +88,11 @@#define LASTUNSIGNED ((u_int) 0-1)/* * for unit alignment */ -static const char xdr_zero[BYTES_PER_XDR_UNIT ] = {0 ,0 ,0 ,0 }; +static const char xdrzero[BYTES_PER_XDR_UNIT ] = {0 ,0 ,0 ,0 };/* * Free a data structure using XDR * Not a filter, but a convenient utility nonetheless */
@@ -182,11 +182,11 @@ {return FALSE; }if (rndup ==0 )return TRUE; -return XDR_PUTBYTES (xdrs, xdr_zero, rndup); +return XDR_PUTBYTES (xdrs, xdrzero, rndup);case XDR_FREE :return TRUE; }return FALSE;
Only in linux-2.6.6/include: asm
include/asm-i386/unistd.h +0 -8
@@ -297,19 +297,11 @@#define __NR_ssisys 283#define __NR_rfork 284#define __NR_rexecve 285#define __NR_migrate 286 -#ifdef CONFIG_CLUSTER -#ifdef CONFIG_SSI #define NR_syscalls 287 -#else -#define NR_syscalls 284 -#endif -#else -#define NR_syscalls 283 -#endif /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */ #define __syscall_return (type, res) \ do { \
Only in linux-2.6.6/include/cluster: arch
include/cluster/clms.h +0 -6
@@ -41,16 +41,10 @@#define CLMS_NODEDOWN_HALT 1#define CLMS_NODEDOWN_DEBUG 2#if defined(__KERNEL__) -/* This may not work with the Voyager SMP architecture for x86, since it has -* its own static definition of cpucount, but it's old so it probably -* doesn't matter -*/ -extern int cpucount; -/* * Interface to CLMS Subsystems */ #define CLMS_MAX_SUBSYSTEMS 15typedef int clms_subsys_t ;
Only in linux-2.6.6/include/cluster/gen: ics_proto_gen.h
include/cluster/rpc/clnt.h +28 -28
95 lines not on this page · raw message
include/cluster/rpc/rpc_msg.h +1 -1
@@ -71,11 +71,11 @@GARBAGE_ARGS =4 , SYSTEM_ERR=5 };enum reject_stat { -RPC_MISMATCH =0 , +CLUSTER_RPC_MISMATCH =0 ,AUTH_ERROR =1 };/* * Reply part of an rpc exchange
Only in linux-2.6.6/include: config
Only in linux-2.6.6/include/linux: autoconf.h Only in linux-2.6.6/include/linux: version.h
net/ipv4/tcp.c +1 -1
@@ -1813,11 +1813,11 @@* There is no particular user process reading from this socket * (we select an ICS daemon to process the packet) and we can * assume urgent data is never sent on this stream. */ void ics_recvmsg (struct sock *sk,struct sk_buff *skb) { -struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); +struct tcp_opt *tp =tcp_sk (sk);u32 adjust;/* * Handle retransmits which can back the sequence number up. * and we must not reprocess the data.
Only in linux-2.6.6/scripts/basic: docproc Only in linux-2.6.6/scripts/basic: fixdep Only in linux-2.6.6/scripts/basic: split-include Only in linux-2.6.6/scripts: bin2c
Only in linux-2.6.6/scripts: conmakehash Only in linux-2.6.6/scripts: elfconfig.h Only in linux-2.6.6/scripts/genksyms: genksyms Only in linux-2.6.6/scripts/genksyms: keywords.c Only in linux-2.6.6/scripts/genksyms: lex.c Only in linux-2.6.6/scripts/genksyms: parse.c Only in linux-2.6.6/scripts/genksyms: parse.h Only in linux-2.6.6/scripts: kallsyms
Only in linux-2.6.6/scripts/kconfig: lex.zconf.c Only in linux-2.6.6/scripts/kconfig: libkconfig.so Only in linux-2.6.6/scripts/kconfig: mconf Only in linux-2.6.6/scripts/kconfig: zconf.tab.c Only in linux-2.6.6/scripts/kconfig: zconf.tab.h Only in linux-2.6.6/scripts/lxdialog: lxdialog Only in linux-2.6.6/scripts: mk_elfconfig Only in linux-2.6.6/scripts: modpost
scripts/openssi/Makefile +3 -3
@@ -2,24 +2,24 @@ # Makefile with OpenSSI specific rules # #Authors: Aneesh Kumar K.V <[email protected]> # -NSCICSGEN := $(objtree)/cluster/util/icsgen +NSCICSGEN := $(srctree)/cluster/util/icsgen # Rule for generating files from .svc # One should have SVCFILES and NSCDEFS defined in the Makefile %_gen.c: $(patsubst %,$(src)/%,$(SVCFILES)) @chmod +x $(NSCICSGEN) $(Q)for svc_file in $< ; \ do \ - CPP="$(CC) -E $(CPPFLAGS) -include $(objtree)/include/linux/config.h" OUT_DIR=$(obj) \ + CPP="$(CC) -E $(CPPFLAGS) -include $(srctree)/include/linux/config.h" OUT_DIR=$(obj) \ $(NSCICSGEN) $(NSCDEFS) $$svc_file; \ done %_gen.h: $(patsubst %,$(src)/%,$(SVCFILES)) @chmod +x $(NSCICSGEN) $(Q)for svc_file in $< ; \ do \ - CPP="$(CC) -E $(CPPFLAGS) -include $(objtree)/include/linux/config.h" OUT_DIR=$(obj) \ + CPP="$(CC) -E $(CPPFLAGS) -include $(srctree)/include/linux/config.h" OUT_DIR=$(obj) \ $(NSCICSGEN) $(NSCDEFS) $$svc_file; \ done
Only in linux-2.6.6/scripts: pnmtologo Only in linux-2.6.6: vmlinux.gz
Quoted 8 lines · Aneesh Kumar
Quoted 5 lines · Andrew Morton
Quoted 3 lines · Aneesh Kumar
+
printk("[<%lx>]", tmp);
+print_symbol(" %s\n", tmp);
Quoted 9 lines
Quoted 6 lines
print_symbol()does nothing at all ifCONFIG_KALLSYMS=n. You probably want:printk("[<%lx>]", tmp); print_symbol(" %s", tmp); printk("\n");Patch attached.
Sorry I attached a wrong patch of the CI project :)
-aneesh
tmp/traps.c renamed from alpha/kernel/traps.c +5 -2
@@ -14,10 +14,11 @@#include <linux/tty.h> #include <linux/delay.h> #include <linux/smp_lock.h> #include <linux/module.h> #include <linux/init.h> +#include <linux/kallsyms.h> #include <asm/gentrap.h> #include <asm/uaccess.h> #include <asm/unaligned.h> #include <asm/sysinfo.h>
@@ -117,20 +118,22 @@static void dik_show_trace (unsigned long *sp) {long i =0 ; -printk ("Trace:" ); +printk ("Trace:\n" );while (0x1ff8 & (unsigned long ) sp) {extern char _stext[], _etext[];unsigned long tmp = *sp; sp++;if (tmp < (unsigned long ) &_stext)continue ;if (tmp >= (unsigned long ) &_etext)continue ; -printk ("%lx%c" , tmp,' ' ); +printk ("[<%lx>]" , tmp); +print_symbol (" %s" , tmp); +printk ("\n" );if (i >40 ) {printk (" ..." );break ; } }
Quoted 2 lines · Aneesh Kumar
Patch attached.
That's the wrong patch.