public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: benh@kernel.crashing.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	ehabkost@redhat.com, Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1 of 3] add phys_addr_t for holding physical addresses
Date: Sun, 24 Aug 2008 09:59:15 -0700	[thread overview]
Message-ID: <48B19363.6040409@goop.org> (raw)
In-Reply-To: <1219570798.21386.213.camel@pasglop>

Benjamin Herrenschmidt wrote:
>  .../...
>
>   
>> diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
>> --- a/include/asm-x86/page_32.h
>> +++ b/include/asm-x86/page_32.h
>> @@ -33,7 +33,6 @@
>>  typedef u64	pudval_t;
>>  typedef u64	pgdval_t;
>>  typedef u64	pgprotval_t;
>> -typedef u64	phys_addr_t;
>>     
>  
>  .../...
>
> Might sound a stupid question, but why have a CONFIG_ option and
> a global definition based on it rather than each arch defining it
> as part of the base types ? I don't have a firm preference for one
> or the other at this point, I can see pro and cons to both approach,
> so I'm curious to see what others think about it.

My thinking is that:

There's only two possible types it can have: u32 and u64.  If we leave
it to per-arch definitions, they'll come up with a variety of different
ways of spelling those types (like u64 itself, but I gather that's being
fixed).

Furthermore, with only a couple of exceptions, the size is the same as
the bitness of the architecture, so there's no need to set a config in
most cases.

So, avoiding lots of duplication, basically.

    J

  reply	other threads:[~2008-08-24 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 20:02 [PATCH 0 of 3] define and use phys_addr_t Jeremy Fitzhardinge
2008-08-19 20:02 ` [PATCH 1 of 3] add phys_addr_t for holding physical addresses Jeremy Fitzhardinge
2008-08-22 20:02   ` Andrew Morton
2008-08-22 21:11     ` Jeremy Fitzhardinge
2008-08-22 21:35       ` Andrew Morton
2008-08-22 22:30         ` Jeremy Fitzhardinge
2008-08-24  9:39   ` Benjamin Herrenschmidt
2008-08-24 16:59     ` Jeremy Fitzhardinge [this message]
2008-08-19 20:02 ` [PATCH 2 of 3] make PFN_PHYS explicitly return phys_addr_t Jeremy Fitzhardinge
2008-08-19 20:02 ` [PATCH 3 of 3] redefine resource_size_t as phys_addr_t Jeremy Fitzhardinge

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=48B19363.6040409@goop.org \
    --to=jeremy@goop.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=ehabkost@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox