From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24053 invoked from network); 8 Jul 1999 10:20:29 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 8 Jul 1999 10:20:29 -0000 Received: from piglet.twiddle.net (root@piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id CAA09678 for ; Tue, 29 Jun 1999 02:54:30 -0400 Received: from owl.twiddle.net (root@owl.twiddle.home [192.168.2.4]) by piglet.twiddle.net (8.8.7/8.8.7) with ESMTP id XAA00777; Mon, 28 Jun 1999 23:54:28 -0700 Received: (from rth@localhost) by owl.twiddle.net (8.8.7/8.8.7) id XAA00384; Mon, 28 Jun 1999 23:54:28 -0700 Date: Mon, 28 Jun 1999 23:54:28 -0700 From: Richard Henderson To: becker@cesdis1.gsfc.nasa.gov Cc: axp-list@redhat.com, torvalds@transmeta.com Subject: yellowfin buglet Message-ID: <19990628235428.A380@twiddle.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i The answer to the comment's question is no. Pre-ev56, loading an unaligned 16-bit quantity will silently fail if addr & 7 == 7. There will be no unaligned trap to fix up. With an ev56, we'll use the ldwu instruction, which does trap, which is how I noticed. r~ --- drivers/net/yellowfin.c.orig Mon Jun 28 23:43:36 1999 +++ drivers/net/yellowfin.c Mon Jun 28 23:44:38 1999 @@ -76,6 +76,7 @@ static int full_duplex[MAX_UNITS] = {-1, #include #include /* Processor type for cache alignment. */ #include +#include #include #include @@ -1054,7 +1055,7 @@ static int yellowfin_rx(struct device *d u16 desc_status = desc->status; int data_size = desc->request_cnt - desc->result_cnt; u8 *buf_addr = bus_to_virt(desc->addr); - s16 frame_status = *(s16*)&(buf_addr[data_size - 2]); /* ?Alpha safe on 885? */ + s16 frame_status = get_unaligned((s16*)(buf_addr+data_size-2)); if (yellowfin_debug > 4) printk(KERN_DEBUG " yellowfin_rx() status was %4.4x.\n",