linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE
@ 2008-02-03 11:22 Cyrill Gorcunov
  2008-02-03 12:22 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 11:22 UTC (permalink / raw)
  To: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells

This patch series removes code duplication for PAGE_SIZE
definition on various architectures.

Please review. Any comments are welcome. *UNTESTED*

Statistics:
 asm-avr32/page.h     |    8 +++-----
 asm-blackfin/page.h  |    8 +++-----
 asm-frv/mem-layout.h |   10 +++-------
 asm-sparc/page.h     |   11 ++++-------

4 files changed, 13 insertions(+), 24 deletions(-)

		- Cyrill -
-- 

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

* Re: [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE
  2008-02-03 11:22 [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE Cyrill Gorcunov
@ 2008-02-03 12:22 ` Sam Ravnborg
  2008-02-03 12:40   ` Cyrill Gorcunov
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sam Ravnborg @ 2008-02-03 12:22 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells

On Sun, Feb 03, 2008 at 02:22:17PM +0300, Cyrill Gorcunov wrote:
> This patch series removes code duplication for PAGE_SIZE
> definition on various architectures.
> 
> Please review. Any comments are welcome. *UNTESTED*

Looks good.
Could you do a followup patch for each architecture introducing
use of PAGE_SIZE in their respective kernel/vmlinux.lds.S too?
I think more than your 4 listed architectures could need this fix.

	Sam

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

* Re: [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE
  2008-02-03 12:22 ` Sam Ravnborg
@ 2008-02-03 12:40   ` Cyrill Gorcunov
  2008-02-03 13:07   ` Cyrill Gorcunov
  2008-02-04 20:01   ` Mike Frysinger
  2 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 12:40 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells

[Sam Ravnborg - Sun, Feb 03, 2008 at 01:22:39PM +0100]
| On Sun, Feb 03, 2008 at 02:22:17PM +0300, Cyrill Gorcunov wrote:
| > This patch series removes code duplication for PAGE_SIZE
| > definition on various architectures.
| > 
| > Please review. Any comments are welcome. *UNTESTED*
| 
| Looks good.
| Could you do a followup patch for each architecture introducing
| use of PAGE_SIZE in their respective kernel/vmlinux.lds.S too?
| I think more than your 4 listed architectures could need this fix.
| 
| 	Sam
| 

Hi, Sam,

i'll try but a bit lately, ok?

		- Cyrill -

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

* Re: [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE
  2008-02-03 12:22 ` Sam Ravnborg
  2008-02-03 12:40   ` Cyrill Gorcunov
@ 2008-02-03 13:07   ` Cyrill Gorcunov
  2008-02-04 20:01   ` Mike Frysinger
  2 siblings, 0 replies; 6+ messages in thread
From: Cyrill Gorcunov @ 2008-02-03 13:07 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel, davem, bryan.wu, hskinnemoen, dhowells

[Sam Ravnborg - Sun, Feb 03, 2008 at 01:22:39PM +0100]
| On Sun, Feb 03, 2008 at 02:22:17PM +0300, Cyrill Gorcunov wrote:
| > This patch series removes code duplication for PAGE_SIZE
| > definition on various architectures.
| > 
| > Please review. Any comments are welcome. *UNTESTED*
| 
| Looks good.
| Could you do a followup patch for each architecture introducing
| use of PAGE_SIZE in their respective kernel/vmlinux.lds.S too?
| I think more than your 4 listed architectures could need this fix.
| 
| 	Sam
| 

a bit *later* I mean (was a misprint ;)

		- Cyrill -

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

* Re: [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE
  2008-02-03 12:22 ` Sam Ravnborg
  2008-02-03 12:40   ` Cyrill Gorcunov
  2008-02-03 13:07   ` Cyrill Gorcunov
@ 2008-02-04 20:01   ` Mike Frysinger
  2008-02-04 20:28     ` Sam Ravnborg
  2 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2008-02-04 20:01 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Cyrill Gorcunov, linux-kernel, davem, bryan.wu, hskinnemoen, dhowells

On Feb 3, 2008 7:22 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Sun, Feb 03, 2008 at 02:22:17PM +0300, Cyrill Gorcunov wrote:
> > This patch series removes code duplication for PAGE_SIZE
> > definition on various architectures.
> >
> > Please review. Any comments are welcome. *UNTESTED*
>
> Looks good.
> Could you do a followup patch for each architecture introducing
> use of PAGE_SIZE in their respective kernel/vmlinux.lds.S too?
> I think more than your 4 listed architectures could need this fix.

what did you have in mind exactly ?  afaik, the Blackfin linker script
should already be friendly wrt using defines instead of hardcoded
constants ...
-mike

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

* Re: [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE
  2008-02-04 20:01   ` Mike Frysinger
@ 2008-02-04 20:28     ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2008-02-04 20:28 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Cyrill Gorcunov, linux-kernel, davem, bryan.wu, hskinnemoen, dhowells

On Mon, Feb 04, 2008 at 03:01:30PM -0500, Mike Frysinger wrote:
> On Feb 3, 2008 7:22 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> > On Sun, Feb 03, 2008 at 02:22:17PM +0300, Cyrill Gorcunov wrote:
> > > This patch series removes code duplication for PAGE_SIZE
> > > definition on various architectures.
> > >
> > > Please review. Any comments are welcome. *UNTESTED*
> >
> > Looks good.
> > Could you do a followup patch for each architecture introducing
> > use of PAGE_SIZE in their respective kernel/vmlinux.lds.S too?
> > I think more than your 4 listed architectures could need this fix.
> 
> what did you have in mind exactly ?  afaik, the Blackfin linker script
> should already be friendly wrt using defines instead of hardcoded
> constants ...
Blackfin look ok.
Lets take following code snippet from blackfin:
       .init.text :
        {
                . = ALIGN(PAGE_SIZE);
                __sinittext = .;
                INIT_TEXT
                __einittext = .;
        }


And a grep quicly reveals:

m32r/kernel/vmlinux.lds.S-  . = ALIGN(4096);            /* Init code and data */
m32r/kernel/vmlinux.lds.S-  __init_begin = .;
m32r/kernel/vmlinux.lds.S-  .init.text : {
m32r/kernel/vmlinux.lds.S-      _sinittext = .;
m32r/kernel/vmlinux.lds.S:      INIT_TEXT
m32r/kernel/vmlinux.lds.S-      _einittext = .;
m32r/kernel/vmlinux.lds.S-  }
m32r/kernel/vmlinux.lds.S-  .init.data : { INIT_DATA }
m32r/kernel/vmlinux.lds.S-  . = ALIGN(16);
m32r/kernel/vmlinux.lds.S-  __setup_start = .;
--
m68knommu/kernel/vmlinux.lds.S-
m68knommu/kernel/vmlinux.lds.S- .init : {
m68knommu/kernel/vmlinux.lds.S-         . = ALIGN(4096);
m68knommu/kernel/vmlinux.lds.S-         __init_begin = .;
m68knommu/kernel/vmlinux.lds.S-         _sinittext = .;
m68knommu/kernel/vmlinux.lds.S:         INIT_TEXT
m68knommu/kernel/vmlinux.lds.S-         _einittext = .;

It is maybe common knowledge that 4096 is equal to PAGE_SIZE
but it is more descriptive to use a constant.

As for sparc64 where we fixed this recently it was a bug since the
page size are configuration dependent.

So I just ask to use appropriate constants when they are
already available and visible from the vmlinux.lds.S files.

Consistent indenting in all vmlinux.lds.S files would also
be good - but I am still missing a third of them.
Blackfin looks good also in this respect.

	Sam

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

end of thread, other threads:[~2008-02-04 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-03 11:22 [patch 0/4] cleanup - use _AC macro to define PAGE_SIZE Cyrill Gorcunov
2008-02-03 12:22 ` Sam Ravnborg
2008-02-03 12:40   ` Cyrill Gorcunov
2008-02-03 13:07   ` Cyrill Gorcunov
2008-02-04 20:01   ` Mike Frysinger
2008-02-04 20:28     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).