From: Frank Haverkamp <haver@linux.vnet.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
cody@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
utz.bacher@de.ibm.com, mmarek@suse.cz, rmallon@gmail.com,
jsvogt@de.ibm.com, MIJUNG@de.ibm.com,
cascardo@linux.vnet.ibm.com, michael@ibmra.de
Subject: Re: [PATCH 1/6] GenWQE PCI support, health monitoring and recovery
Date: Fri, 06 Dec 2013 09:39:41 +0100 [thread overview]
Message-ID: <1386319181.7915.4.camel@oc7383187364.ibm.com> (raw)
In-Reply-To: <201312052131.42316.arnd@arndb.de>
Hi Arnd,
Am Donnerstag, den 05.12.2013, 21:31 +0100 schrieb Arnd Bergmann:
> On Thursday 05 December 2013, Frank Haverkamp wrote:
> > > > Was wrong, as already pointed out before. It is now:
> > > >
> > > > struct genwqe_mem {
> > > > __u64 addr;
> > > > __u64 size;
> > > > int direction;
> > > > };
> > > >
> > > > I hope the int is ok here.
> > >
> > > No, it's not. The problem is that sizeof(struct genwqe_mem) is now 24 on
> > > most architectures (including x86-64) and 20 on x86-32.
> >
> > Interesting. So int is like long architecture specific. I changed it to
> > be __u64 too, to avoid any problem.
>
> The solution is ok, but the problem is different from what you thought:
>
> On all architectures that Linux runs on, 'int' is 32 bit. The problem is
> again the alignment of __u64. On normal architectures, it is naturally
> aligned, and gcc adds 4 byte padding so that 'sizeof (struct genwqe_mem)'
> is multiple of the required alignment. On x86-32, the required alignment
> for the __u64 members is only 4 bytes, so no padding is added.
>
> Arnd
>
now I understand. Interesting. I wondered how one could check this
automatically such that others don't repeat the mistakes I did.
I hope I have fixed all those issues now in my latest posting, or do you
still see some?
Other than that, is the code ready for inclusion now, or do you still
like to have other changes done (hopefully not, but if so which ones)?
Thanks
Frank
next prev parent reply other threads:[~2013-12-06 8:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 14:28 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v8) Frank Haverkamp
2013-12-03 14:28 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-12-04 10:02 ` Frank Haverkamp
2013-12-05 2:27 ` Arnd Bergmann
2013-12-05 12:44 ` Frank Haverkamp
2013-12-04 14:02 ` Frank Haverkamp
2013-12-05 2:38 ` Arnd Bergmann
2013-12-05 12:50 ` Frank Haverkamp
2013-12-05 20:31 ` Arnd Bergmann
2013-12-06 8:39 ` Frank Haverkamp [this message]
2013-12-09 12:34 ` Frank Haverkamp
2013-12-03 14:28 ` [PATCH 2/6] GenWQE Character device and DDCB queue Frank Haverkamp
2013-12-03 14:28 ` [PATCH 3/6] GenWQE Utility functions Frank Haverkamp
2013-12-03 14:28 ` [PATCH 4/6] GenWQE Debugfs interfaces Frank Haverkamp
2013-12-03 14:28 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-12-03 14:28 ` [PATCH 6/6] GenWQE Enable driver Frank Haverkamp
-- strict thread matches above, loose matches on Subject: below --
2013-12-09 12:30 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v10) Frank Haverkamp
2013-12-09 12:30 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-12-05 14:15 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v9) Frank Haverkamp
2013-12-05 14:15 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-11-06 12:45 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v7) Frank Haverkamp
2013-11-06 12:45 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-11-27 19:16 ` Greg KH
2013-12-03 13:35 ` Frank Haverkamp
2013-12-03 14:30 ` Greg KH
2013-12-03 14:46 ` Frank Haverkamp
2013-12-03 15:05 ` Arnd Bergmann
2013-12-04 9:59 ` Frank Haverkamp
2013-11-27 19:20 ` Greg KH
2013-12-03 13:49 ` Frank Haverkamp
2013-12-03 14:30 ` Greg KH
2013-11-05 8:44 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v6) Frank Haverkamp
2013-11-05 8:44 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
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=1386319181.7915.4.camel@oc7383187364.ibm.com \
--to=haver@linux.vnet.ibm.com \
--cc=MIJUNG@de.ibm.com \
--cc=arnd@arndb.de \
--cc=cascardo@linux.vnet.ibm.com \
--cc=cody@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jsvogt@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ibmra.de \
--cc=mmarek@suse.cz \
--cc=rmallon@gmail.com \
--cc=schwidefsky@de.ibm.com \
--cc=utz.bacher@de.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®