AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090701164924.252d67b3@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<rendell.fong@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB52AD1B85F00@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 1 Jul 2009 16:49:48 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Rendell Fong <rendell.fong@onstor.com>
Subject: Re: please review - 32712
Message-ID: <20090701164948.37b36804@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB52AD1B85F00@exch1.onstor.net>
References: <2779531E7C760D4491C96305019FEEB52AD1B85F00@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi Rendell,

Feel free to swing on by "The Pit" and chat about some of this stuff....


linux/kernel/linux-mips-2.6/arch/mips/kernel/Makefile

     uh, not really...

linux/kernel/linux-mips-2.6/arch/mips/kernel/nfx_crashdump.c

     >>add linux/kernel/linux-mips-2.6/arch/mips/kernel/nfx_crashdump.c


     please don't use the letters "nfx".  they make me ill.  how about
     cougar_  or cg_ ?

     line 20 if you're going to put the whole file inside an ifdef,
     might as well put the whole file inside the ifdef.

     line 42 please don't use typedefs like this, it's verboten
     in linux.  more on this in cougar_crashdump.h

     line 43 this should be static

     line 51, 62, please use standard kernel functions

     line 87, what's up with the checksum?  can we use standard kernel
     checksum function(s) instead?

     153, 156 trailing whitespace -- git should have mentioned this.
     is this commited to your git tree?  multiple places.

     205 not sure what this has to do with this function?  i don't
     see any reading in this function

     250 please fix bogus commenting style, multiple places


     316 are you sure about that?  i'm not positive that KALLSYMS
     is required...

     328 isn't there a stock kernel function that does this?  will it
     not work for us?

     348 this is the same description as the previous function.

     395 this is pretty ugly.  at the very least you should explicitly
     mask the part you are throwing away.  not sure you should be
     throwing away the upper 32-bits anyway.

     479 what is a "crashdump"?  this business about CONFIG_PROM not
     being configured... i'm not sure i get it.  won't it always be
     configured?  should not CONFIG_COUGAR and CONFIG_TUXRX depend
     on it?

     505 not sure how well malloc will be working at this point.  can we
     allocate on the stack instead?  other places too.  actually, here
     might be fine.  check other uses of kmalloc for this possibility.




linux/kernel/linux-mips-2.6/arch/mips/kernel/nfx_crashdump.h

     >>add linux/kernel/linux-mips-2.6/arch/mips/kernel/nfx_crashdump.h

     line 26 ix-nay on the typedefs-ay .  also, there should be stock
     kernel thingies for these types.  See Documentation/CodingStyle,
     line 255.

linux/kernel/linux-mips-2.6/arch/mips/kernel/traps.c

     line 46 there should be a single CONFIG variable for our crashdump
     feature

linux/kernel/linux-mips-2.6/cougar-config

     line 1202, uh no, you don't want that change

linux/kernel/linux-mips-2.6/drivers/char/sysrq.c

     312 this looks like debugging stuff.  all these changes do.

linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/prom.c

     line 1419 you can use __func__.  does this now violate the 80
     column rule?  what is this debug(()) macro, anyway?  it looks
     broken to me.

     1507 please use the return type, even though it's a dreaded typedef

linux/kernel/linux-mips-2.6/kernel/panic.c

     line 22 use your new crashdump config

     line 73, ditto, etc.

nfx-tree/code/sm-except/crashdump.c

     line 6, might as well go ahead and update the copyright years
     2002-2009


nfx-tree/code/sm-except/crashdump.h

     looks good

nfx-tree/code/ssc-crashsave/Makefile

     uhh, ok

nfx-tree/code/ssc-crashsave/crashsave-int.h

     looks good

nfx-tree/code/ssc-crashsave/crashsave.c

     looks good

nfx-tree/code/ssc-crashsave/linux.c

     looks good





On Wed, 24 Jun 2009 18:45:43 -0700 Rendell Fong
<rendell.fong@onstor.com> wrote:

> Finally got the code ported over and working...
> 
> Change 32712 by rendellf@rendellf-test on 2009/06/23 16:51:57
> *pending*
> 
>         Changes to support save of SSC crashdump info when a crash
> occurs due to kernel panic or non-fatal die exception in Cougar
> (Linux).  The crashdump info is stored in boot PROM at time of crash
> and then copied to the crash file after the system is rebooted.
> 
> Affected files ...
> 
> ... //depot/dev/linux/kernel/linux-mips-2.6/arch/mips/kernel/Makefile#1
> edit ... //depot/dev/linux/kernel/linux-mips-2.6/arch/mips/kernel/nfx_crashdump.c#1
> add ... //depot/dev/linux/kernel/linux-mips-2.6/arch/mips/kernel/nfx_crashdump.h#1
> add ... //depot/dev/linux/kernel/linux-mips-2.6/arch/mips/kernel/traps.c#3
> edit ... //depot/dev/linux/kernel/linux-mips-2.6/cougar-config#5 edit
> ... //depot/dev/linux/kernel/linux-mips-2.6/drivers/char/sysrq.c#2
> edit ... //depot/dev/linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/prom.c#3
> edit ... //depot/dev/linux/kernel/linux-mips-2.6/kernel/panic.c#1 edit
> ... //depot/dev/nfx-tree/code/sm-except/crashdump.c#5 edit
> ... //depot/dev/nfx-tree/code/sm-except/crashdump.h#2 edit
> ... //depot/dev/nfx-tree/code/ssc-crashsave/Makefile#1 edit
> ... //depot/dev/nfx-tree/code/ssc-crashsave/crashsave-int.h#1 edit
> ... //depot/dev/nfx-tree/code/ssc-crashsave/crashsave.c#3 edit
> ... //depot/dev/nfx-tree/code/ssc-crashsave/linux.c#2 edit
> 
