All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Brian King <brking@us.ibm.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] IBM Power RAID driver (ipr) 2.0.6
Date: 10 May 2004 15:38:57 -0500	[thread overview]
Message-ID: <1084221540.2659.353.camel@mulgrave> (raw)
In-Reply-To: <4097D863.8040505@us.ibm.com>

On Tue, 2004-05-04 at 12:52, Brian King wrote:
> Here is the latest version of the LLD for the IBM Power RAID family of
> adapters. This includes several IBM iSeries and pSeries SCSI adapters.
> Please apply.

OK, I put this in the tree.  However, it fails to compile on parisc:

 CC [M]  drivers/scsi/ipr.o
{standard input}: Assembler messages:
{standard input}:1788: Error: Field not properly aligned [8] (1028).
{standard input}:1788: Error: Invalid operands 
[...]

The problem is your use of list_head pointers in packed structures.  You
can't simply pass a pointer to a misaligned structure to a common kernel
function and expect it to work: the packed attribute is lost doing this
and what you end up with is a misaligned pointer reference.

The attached actually allows me to compile, but all it's doing is hiding
the problem.

James

===== drivers/scsi/ipr.h 1.1 vs edited =====
--- 1.1/drivers/scsi/ipr.h	Mon May 10 11:26:37 2004
+++ edited/drivers/scsi/ipr.h	Mon May 10 14:53:55 2004
@@ -666,7 +666,7 @@
 
 	/* Driver added data */
 	u32 hostrcb_dma;
-	struct list_head queue;
+	struct list_head queue __attribute__((aligned(sizeof(unsigned long))));
 }__attribute__((packed, aligned (4)));
 
 #define IPR_HOSTRCB_SZ offsetof(struct ipr_hostrcb, hostrcb_dma)


  parent reply	other threads:[~2004-05-10 20:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-04 17:52 [PATCH] IBM Power RAID driver (ipr) 2.0.6 Brian King
2004-05-04 17:56 ` Christoph Hellwig
2004-05-04 18:24   ` Brian King
2004-05-10 20:38 ` James Bottomley [this message]
2004-05-10 21:39   ` Matthew Wilcox
2004-05-10 21:54     ` Brian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1084221540.2659.353.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=brking@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.