All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
To: Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ashok Raj <ashok.raj-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-pci <linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Huang Ying <ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] efi/cper: Fix endianness of PCI class code
Date: Thu, 11 May 2017 07:48:52 -0700	[thread overview]
Message-ID: <2d5f9331-6f31-2584-9ec1-2447163c6611@caviumnetworks.com> (raw)
In-Reply-To: <CAKv+Gu81gvNL1jkb3T35=-5fr_x-BmSg9X2CcQ97xv5JTZ-c1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 05/11/2017 07:06 AM, Ard Biesheuvel wrote:
> On 10 May 2017 at 09:41, Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> wrote:
>> On Wed, May 10, 2017 at 09:03:11AM +0100, Ard Biesheuvel wrote:
[...]
>>
>> It seems clumsy and unnecessary to me so I'd prefer the bitfield.
>> Please excuse my stubbornness.
>>
> 
> Stubbornness alone is not going to convince me. What *could* convince
> me (although unlikely) is a quote from the C spec which explains why
> it is 100% legal to make assumptions about how bitfields are projected
> onto byte locations in memory.

I don't think you will find that in the C specifications.

Structure layout is specified per-architecture/per-ABI so for the Linux 
kernel you would only have to check that it is strongly specified and 
compatible across `ls arch | wc -l` different architectures.  If you 
want to get started with MIPS, for example, you could look in the 
"SYSTEM V APPLICATION BINARY INTERFACE MIPS(r) RISC Processor Supplement 
3rd Edition" starting on page 3-7.  For x86 and arm{,64} I am sure you 
could find similar specifications.

David Daney

WARNING: multiple messages have this Message-ID (diff)
From: David Daney <ddaney@caviumnetworks.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Lukas Wunner <lukas@wunner.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	Ashok Raj <ashok.raj@intel.com>,
	linux-pci <linux-pci@vger.kernel.org>,
	Huang Ying <ying.huang@intel.com>
Subject: Re: [PATCH] efi/cper: Fix endianness of PCI class code
Date: Thu, 11 May 2017 07:48:52 -0700	[thread overview]
Message-ID: <2d5f9331-6f31-2584-9ec1-2447163c6611@caviumnetworks.com> (raw)
In-Reply-To: <CAKv+Gu81gvNL1jkb3T35=-5fr_x-BmSg9X2CcQ97xv5JTZ-c1A@mail.gmail.com>

On 05/11/2017 07:06 AM, Ard Biesheuvel wrote:
> On 10 May 2017 at 09:41, Lukas Wunner <lukas@wunner.de> wrote:
>> On Wed, May 10, 2017 at 09:03:11AM +0100, Ard Biesheuvel wrote:
[...]
>>
>> It seems clumsy and unnecessary to me so I'd prefer the bitfield.
>> Please excuse my stubbornness.
>>
> 
> Stubbornness alone is not going to convince me. What *could* convince
> me (although unlikely) is a quote from the C spec which explains why
> it is 100% legal to make assumptions about how bitfields are projected
> onto byte locations in memory.

I don't think you will find that in the C specifications.

Structure layout is specified per-architecture/per-ABI so for the Linux 
kernel you would only have to check that it is strongly specified and 
compatible across `ls arch | wc -l` different architectures.  If you 
want to get started with MIPS, for example, you could look in the 
"SYSTEM V APPLICATION BINARY INTERFACE MIPS(r) RISC Processor Supplement 
3rd Edition" starting on page 3-7.  For x86 and arm{,64} I am sure you 
could find similar specifications.

David Daney

  parent reply	other threads:[~2017-05-11 14:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 18:38 [PATCH] efi/cper: Fix endianness of PCI class code Lukas Wunner
2017-05-05 18:38 ` Lukas Wunner
     [not found] ` <771bc335fb5856792d086ae7db288dcf244cb4cd.1493964354.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-06  7:46   ` Ard Biesheuvel
2017-05-06  7:46     ` Ard Biesheuvel
2017-05-06  9:07     ` Lukas Wunner
2017-05-10  8:03       ` Ard Biesheuvel
2017-05-10  8:12         ` Arnd Bergmann
2017-05-10  8:41         ` Lukas Wunner
2017-05-11 14:06           ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu81gvNL1jkb3T35=-5fr_x-BmSg9X2CcQ97xv5JTZ-c1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-11 14:48               ` David Daney [this message]
2017-05-11 14:48                 ` David Daney
2017-05-25 12:30               ` Lukas Wunner
2017-05-25 12:30                 ` Lukas Wunner
     [not found]                 ` <20170525123047.GA4172-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-25 12:36                   ` Ard Biesheuvel
2017-05-25 12:36                     ` Ard Biesheuvel
     [not found]                     ` <CAKv+Gu_3vYKGOrzC8+Y3QwXOtV8Tbm8HC7nzQCdKVB1Qbdoriw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-25 12:44                       ` Lukas Wunner
2017-05-25 12:44                         ` Lukas Wunner
2017-05-25 12:47                         ` Ard Biesheuvel
2017-05-25 12:56                           ` Lukas Wunner
     [not found]                             ` <20170525125650.GA4196-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-25 13:07                               ` Ard Biesheuvel
2017-05-25 13:07                                 ` Ard Biesheuvel
2017-05-26  6:08                                 ` Lukas Wunner
2017-05-26  8:01                                   ` Arnd Bergmann
2017-05-26 10:45                                     ` Lukas Wunner
2017-05-26  9:16                                   ` Ard Biesheuvel
     [not found]                                     ` <CAKv+Gu_fbNSK+LuWmQGqLHtu3rF9BdYwNB+K-myNXS=X+goXkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-26 10:43                                       ` Lukas Wunner
2017-05-26 10:43                                         ` Lukas Wunner

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=2d5f9331-6f31-2584-9ec1-2447163c6611@caviumnetworks.com \
    --to=ddaney-m3mlkvoiwjvv6pq1l3v1odbpr1lh4cv8@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=ashok.raj-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
    --cc=ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.