Re: [RFC] Host Virtual Serial Interface driver

From: Randy.Dunlap (rddunlap_at_osdl.org)
Date: 08/09/04

  • Next message: Andi Kleen: "Re: AES assembler optimizations"
    Date:	Mon, 9 Aug 2004 10:51:13 -0700
    To: Hollis Blanchard <hollisb@us.ibm.com>
    
    

    On Fri, 06 Aug 2004 16:23:05 -0500 Hollis Blanchard wrote:

    | Hi, I have a new char driver I'd like to get comments on. It is specific
    | to IBM's p5 server line; I've included a description from the comments
    | here:
    ...
    | I've included the whole file below; it's pretty much self-contained. All
    | comments welcome.
    |
    | --
    |
    | #include <linux/init.h>
    | #include <linux/module.h>
    | #include <linux/console.h>
    | #include <linux/major.h>
    | #include <linux/kernel.h>
    | #include <linux/sysrq.h>
    | #include <linux/tty.h>
    | #include <linux/tty_flip.h>
    | #include <linux/sched.h>
    | #include <linux/kbd_kern.h>
    | #include <linux/spinlock.h>
    | #include <linux/ctype.h>
    | #include <linux/interrupt.h>
    | #include <linux/delay.h>

    To the extent possible, we like to put the linux/* files in alpha
    order, and same with the asm/* files. Separately, as you have them.

    | #include <asm/uaccess.h>
    | #include <asm/hvconsole.h>
    | #include <asm/prom.h>
    | #include <asm/hvcall.h>
    | #include <asm/vio.h>
    |
    | #define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))

    You should explain this bit (__ALIGNED__).

    | static inline int hdrlen(const uint8_t *packet)
    | {
    | const int lengths[] = { 4, 6, 6, 8, };
    | struct hvsi_header *header = (struct hvsi_header *)packet;
    |
    | return lengths[VS_DATA_PACKET_HEADER - header->type];
    | }

    Any chance of bad data (value) in header->type ?

    | if (hangup) {
    | tty_hangup(hangup);
    | }

    extra braces (style); maybe in a few other places also.

    --
    ~Randy
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Andi Kleen: "Re: AES assembler optimizations"

    Relevant Pages

    • Re: post-halloween server down?
      ... | anybody knows what happened to this server? ... Is this document maintained somwehre else? ... -- ~Randy - ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [CFT][RFC] HT scheduler
      ... willing to take the 1-2% penalty on light load to get the bonus on heavy ... If someone has measured the effect of HT on interrupt latency or server ... transaction response I haven't seen it, but based on a server I just ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Misc NFSv4 (was Re: statfs() / statvfs() syscall ballsup...)
      ... and just running the few compile commands ... not sure if they have the delegation recall feature. ... the server when your client reconnects. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.11 oops in skb_drop_fraglist
      ... i had implemented a patch to cause the RPC client to reuse the port ... number when reconnecting to the server after the server drops the ... i suspect it was that patch that was causing the trouble. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.6-rc{1,2} bad VM/NFS interaction in case of dirty page writeback
      ... Trond Myklebust wrote: ... The problem is that screws the server over pretty hard ... If it's a significant problem then perhaps ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)