public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Globally defining phys_addr_t
@ 2008-09-11  8:31 Jeremy Fitzhardinge
  2008-09-11  9:53 ` Ingo Molnar
  2008-09-11 10:03 ` Geert Uytterhoeven
  0 siblings, 2 replies; 9+ messages in thread
From: Jeremy Fitzhardinge @ 2008-09-11  8:31 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Alex Nixon, Andrew Morton, Linux Kernel Mailing List

Hi Ingo,

This is a repost of a little 3-patch series which Andrew has been
carrying in -mm.  It cleans up the definition of phys_addr_t to make it
kernel-wide rather than x86-specific, and fixes up PFN_PHYS() to use it
to avoid address truncation.

We currently have a few workarounds for this problem in the tree, but
Alex found another bug caused by PFN_PHYS(), so it's probably better if
you bring these patches into tip.git for now.

PowerPC also defines a phys_addr_t with the same meaning as x86; the
powerpc arch maintainers are happy with these patches.

The third patch in the series is not necessary to fix any bug, but it
removes the separate definition of resource_size_t to define it in terms
of phys_addr_t.  I include it for competeness.

Thanks,
    J

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11  8:31 [PATCH 0/3] Globally defining phys_addr_t Jeremy Fitzhardinge
@ 2008-09-11  9:53 ` Ingo Molnar
  2008-09-11 10:20   ` Andrew Morton
  2008-09-11 10:03 ` Geert Uytterhoeven
  1 sibling, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2008-09-11  9:53 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: Alex Nixon, Andrew Morton, Linux Kernel Mailing List


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Hi Ingo,
> 
> This is a repost of a little 3-patch series which Andrew has been 
> carrying in -mm.  It cleans up the definition of phys_addr_t to make 
> it kernel-wide rather than x86-specific, and fixes up PFN_PHYS() to 
> use it to avoid address truncation.
> 
> We currently have a few workarounds for this problem in the tree, but 
> Alex found another bug caused by PFN_PHYS(), so it's probably better 
> if you bring these patches into tip.git for now.
> 
> PowerPC also defines a phys_addr_t with the same meaning as x86; the 
> powerpc arch maintainers are happy with these patches.

Andrew, are you fine with that approach too?

Also, i dont see Andrew's signoffs in the patches, and that's the true 
path of these patches which should be preserved: you => -mm => -tip.

	Ingo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11  8:31 [PATCH 0/3] Globally defining phys_addr_t Jeremy Fitzhardinge
  2008-09-11  9:53 ` Ingo Molnar
@ 2008-09-11 10:03 ` Geert Uytterhoeven
  2008-09-11 11:50   ` Ralf Baechle
  2008-09-11 16:06   ` Jeremy Fitzhardinge
  1 sibling, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2008-09-11 10:03 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Ingo Molnar, Alex Nixon, Andrew Morton, Linux Kernel Mailing List,
	Linux/MIPS Development

On Thu, 11 Sep 2008, Jeremy Fitzhardinge wrote:
> This is a repost of a little 3-patch series which Andrew has been
> carrying in -mm.  It cleans up the definition of phys_addr_t to make it
> kernel-wide rather than x86-specific, and fixes up PFN_PHYS() to use it
> to avoid address truncation.
> 
> We currently have a few workarounds for this problem in the tree, but
> Alex found another bug caused by PFN_PHYS(), so it's probably better if
> you bring these patches into tip.git for now.
> 
> PowerPC also defines a phys_addr_t with the same meaning as x86; the
> powerpc arch maintainers are happy with these patches.

If I'm not mistaking, this is also true for some MIPS machines.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11  9:53 ` Ingo Molnar
@ 2008-09-11 10:20   ` Andrew Morton
  2008-09-11 11:56     ` Ingo Molnar
  2008-09-11 16:08     ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 9+ messages in thread
From: Andrew Morton @ 2008-09-11 10:20 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Jeremy Fitzhardinge, Alex Nixon, Linux Kernel Mailing List

On Thu, 11 Sep 2008 11:53:11 +0200 Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> 
> > Hi Ingo,
> > 
> > This is a repost of a little 3-patch series which Andrew has been 
> > carrying in -mm.  It cleans up the definition of phys_addr_t to make 
> > it kernel-wide rather than x86-specific, and fixes up PFN_PHYS() to 
> > use it to avoid address truncation.
> > 
> > We currently have a few workarounds for this problem in the tree, but 
> > Alex found another bug caused by PFN_PHYS(), so it's probably better 
> > if you bring these patches into tip.git for now.
> > 
> > PowerPC also defines a phys_addr_t with the same meaning as x86; the 
> > powerpc arch maintainers are happy with these patches.
> 
> Andrew, are you fine with that approach too?

spose so.  These patches are the same as those in -mm (I checked).

Still seems a bit odd to me that we're disallowing things like 32-bit
reosurces on >4G-memory-span machines.  A resource_size_t is a
different (and narrower) concept from a physical address.

> Also, i dont see Andrew's signoffs in the patches, and that's the true 
> path of these patches which should be preserved: you => -mm => -tip.

Not really.  These went

JF -> mm

and

JF -> you

but whatever.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11 10:03 ` Geert Uytterhoeven
@ 2008-09-11 11:50   ` Ralf Baechle
  2008-09-11 16:06   ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2008-09-11 11:50 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jeremy Fitzhardinge, Ingo Molnar, Alex Nixon, Andrew Morton,
	Linux Kernel Mailing List, Linux/MIPS Development, Jeff Dike,
	user-mode-linux-devel

On Thu, Sep 11, 2008 at 12:03:36PM +0200, Geert Uytterhoeven wrote:

> On Thu, 11 Sep 2008, Jeremy Fitzhardinge wrote:
> > This is a repost of a little 3-patch series which Andrew has been
> > carrying in -mm.  It cleans up the definition of phys_addr_t to make it
> > kernel-wide rather than x86-specific, and fixes up PFN_PHYS() to use it
> > to avoid address truncation.
> > 
> > We currently have a few workarounds for this problem in the tree, but
> > Alex found another bug caused by PFN_PHYS(), so it's probably better if
> > you bring these patches into tip.git for now.
> > 
> > PowerPC also defines a phys_addr_t with the same meaning as x86; the
> > powerpc arch maintainers are happy with these patches.
> 
> If I'm not mistaking, this is also true for some MIPS machines.

Jeremy probably missed it because it's called phys_t on MIPS.  It's usually
the same size as unsigned long but a few of the 32-bit Alchemy SOCs have
peripherals placed outside of the 32-bit physical address space so for
those CONFIG_64BIT_PHYS_ADDR will be defined and phys_t be unsigned long
long and used for some pagetable stuff to map those devices into the 32-bit
virtual address space.

UM uses a phys_t for its pagetables.

A single data type for everybody is enough.  phys_addr_t or phys_t I don't
care; I went for phys_t because it's shorter, less to type.

  Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11 10:20   ` Andrew Morton
@ 2008-09-11 11:56     ` Ingo Molnar
  2008-09-11 16:08     ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2008-09-11 11:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Jeremy Fitzhardinge, Alex Nixon, Linux Kernel Mailing List


* Andrew Morton <akpm@linux-foundation.org> wrote:

> > Also, i dont see Andrew's signoffs in the patches, and that's the 
> > true path of these patches which should be preserved: you => -mm => 
> > -tip.
> 
> Not really.  These went
> 
> JF -> mm
> 
> and
> 
> JF -> you

yeah - it was just a small detail: i generally try to preserve the 
testing (and review) track record of patches. So since they've been in 
-mm for some time, ideally that fact should be preserved.

	Ingo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11 10:03 ` Geert Uytterhoeven
  2008-09-11 11:50   ` Ralf Baechle
@ 2008-09-11 16:06   ` Jeremy Fitzhardinge
  2008-09-11 16:17     ` Maciej W. Rozycki
  1 sibling, 1 reply; 9+ messages in thread
From: Jeremy Fitzhardinge @ 2008-09-11 16:06 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ingo Molnar, Alex Nixon, Andrew Morton, Linux Kernel Mailing List,
	Linux/MIPS Development

Geert Uytterhoeven wrote:
>> PowerPC also defines a phys_addr_t with the same meaning as x86; the
>> powerpc arch maintainers are happy with these patches.
>>     
>
> If I'm not mistaking, this is also true for some MIPS machines.
>   

Nothing turns up in a grep over arch/mips and include/asm-mips.

    J

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11 10:20   ` Andrew Morton
  2008-09-11 11:56     ` Ingo Molnar
@ 2008-09-11 16:08     ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 9+ messages in thread
From: Jeremy Fitzhardinge @ 2008-09-11 16:08 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ingo Molnar, Alex Nixon, Linux Kernel Mailing List,
	Benjamin Herrenschmidt

Andrew Morton wrote:
> On Thu, 11 Sep 2008 11:53:11 +0200 Ingo Molnar <mingo@elte.hu> wrote:
>
>   
>> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>
>>     
>>> Hi Ingo,
>>>
>>> This is a repost of a little 3-patch series which Andrew has been 
>>> carrying in -mm.  It cleans up the definition of phys_addr_t to make 
>>> it kernel-wide rather than x86-specific, and fixes up PFN_PHYS() to 
>>> use it to avoid address truncation.
>>>
>>> We currently have a few workarounds for this problem in the tree, but 
>>> Alex found another bug caused by PFN_PHYS(), so it's probably better 
>>> if you bring these patches into tip.git for now.
>>>
>>> PowerPC also defines a phys_addr_t with the same meaning as x86; the 
>>> powerpc arch maintainers are happy with these patches.
>>>       
>> Andrew, are you fine with that approach too?
>>     
>
> spose so.  These patches are the same as those in -mm (I checked).
>
> Still seems a bit odd to me that we're disallowing things like 32-bit
> reosurces on >4G-memory-span machines.  A resource_size_t is a
> different (and narrower) concept from a physical address.
>   

I don't mind much either way.  I added that patch on suggestion from
BenH, and don't really mind if it gets dropped.  The first two are the
really important ones.

>> Also, i dont see Andrew's signoffs in the patches, and that's the true 
>> path of these patches which should be preserved: you => -mm => -tip.
>>     
>
> Not really.  These went
>
> JF -> mm
>
> and
>
> JF -> you
>
> but whatever.
>   

Yes, I just resent the same patches.  But getting the ones blessed with
-mm pee would be the best.

    J


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] Globally defining phys_addr_t
  2008-09-11 16:06   ` Jeremy Fitzhardinge
@ 2008-09-11 16:17     ` Maciej W. Rozycki
  0 siblings, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2008-09-11 16:17 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Geert Uytterhoeven, Ingo Molnar, Alex Nixon, Andrew Morton,
	Linux Kernel Mailing List, Linux/MIPS Development

On Thu, 11 Sep 2008, Jeremy Fitzhardinge wrote:

> > If I'm not mistaking, this is also true for some MIPS machines.
> >   
> 
> Nothing turns up in a grep over arch/mips and include/asm-mips.

 It's called phys_t for MIPS.  It's time to make it consistent probably.

  Maciej

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-09-15  8:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11  8:31 [PATCH 0/3] Globally defining phys_addr_t Jeremy Fitzhardinge
2008-09-11  9:53 ` Ingo Molnar
2008-09-11 10:20   ` Andrew Morton
2008-09-11 11:56     ` Ingo Molnar
2008-09-11 16:08     ` Jeremy Fitzhardinge
2008-09-11 10:03 ` Geert Uytterhoeven
2008-09-11 11:50   ` Ralf Baechle
2008-09-11 16:06   ` Jeremy Fitzhardinge
2008-09-11 16:17     ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox