All of lore.kernel.org
 help / color / mirror / Atom feed
From: mel@csn.ul.ie (Mel Gorman)
To: Paul Mackerras <paulus@samba.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linuxppc-dev@ozlabs.org, vgoyal@in.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Compile failure fix for ppc on 2.6.17-rc4-mm3 (2nd attempt)
Date: Tue, 13 Jun 2006 17:49:04 +0100	[thread overview]
Message-ID: <20060613164904.GA15240@skynet.ie> (raw)
In-Reply-To: <17545.16696.195276.334774@cargo.ozlabs.ibm.com>

On (09/06/06 19:36), Paul Mackerras didst pronounce:
> Mel Gorman writes:
> 
> > +	res->end = -(-res->end & ~(unsigned long)mask); \
> > +	res->end += mask; \
> 
> I think this is equivalent to
> 
> 	res->end = (res->end + mask) | mask;
> 
> and I have to say the latter seems more understandable to me (and
> doesn't need a cast) ...
> 

Makes sense. The patch on top of the latest -mm is below if you want to push
it. It has not been boot tested as building with the latest -mm is broken
at the moment for older powerpcs because of the git-powerpc.patch patch .
That patch assumes that mm_context_t is a struct with a vdso_base which is
not always the case (it's an unsigned long in include/asm-ppc/mmu.h).

diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.17-rc6-mm2-clean/arch/powerpc/kernel/pci_32.c linux-2.6.17-rc6-mm2-resources/arch/powerpc/kernel/pci_32.c
--- linux-2.6.17-rc6-mm2-clean/arch/powerpc/kernel/pci_32.c	2006-06-13 17:25:39.000000000 +0100
+++ linux-2.6.17-rc6-mm2-resources/arch/powerpc/kernel/pci_32.c	2006-06-13 17:30:20.000000000 +0100
@@ -1121,9 +1121,8 @@ check_for_io_childs(struct pci_bus *bus,
 	 * e.g. res->end of 0x1fff moves to 0x2fff
 	 */
 #define push_end(res, mask) do {				\
-	BUG_ON(((mask+1) & mask) != 0);			\
-	res->end = -(-res->end & ~(unsigned long)mask);		\
-	res->end += mask;					\
+	BUG_ON(((mask+1) & mask) != 0);				\
+	res->end = (res->end + mask) | mask;			\
     } while (0)
 
 	list_for_each_entry(dev, &bus->devices, bus_list) {
-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

WARNING: multiple messages have this Message-ID (diff)
From: mel@csn.ul.ie (Mel Gorman)
To: Paul Mackerras <paulus@samba.org>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Andrew Morton <akpm@osdl.org>,
	linuxppc-dev@ozlabs.org, vgoyal@in.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Compile failure fix for ppc on 2.6.17-rc4-mm3 (2nd attempt)
Date: Tue, 13 Jun 2006 17:49:04 +0100	[thread overview]
Message-ID: <20060613164904.GA15240@skynet.ie> (raw)
In-Reply-To: <17545.16696.195276.334774@cargo.ozlabs.ibm.com>

On (09/06/06 19:36), Paul Mackerras didst pronounce:
> Mel Gorman writes:
> 
> > +	res->end = -(-res->end & ~(unsigned long)mask); \
> > +	res->end += mask; \
> 
> I think this is equivalent to
> 
> 	res->end = (res->end + mask) | mask;
> 
> and I have to say the latter seems more understandable to me (and
> doesn't need a cast) ...
> 

Makes sense. The patch on top of the latest -mm is below if you want to push
it. It has not been boot tested as building with the latest -mm is broken
at the moment for older powerpcs because of the git-powerpc.patch patch .
That patch assumes that mm_context_t is a struct with a vdso_base which is
not always the case (it's an unsigned long in include/asm-ppc/mmu.h).

diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.17-rc6-mm2-clean/arch/powerpc/kernel/pci_32.c linux-2.6.17-rc6-mm2-resources/arch/powerpc/kernel/pci_32.c
--- linux-2.6.17-rc6-mm2-clean/arch/powerpc/kernel/pci_32.c	2006-06-13 17:25:39.000000000 +0100
+++ linux-2.6.17-rc6-mm2-resources/arch/powerpc/kernel/pci_32.c	2006-06-13 17:30:20.000000000 +0100
@@ -1121,9 +1121,8 @@ check_for_io_childs(struct pci_bus *bus,
 	 * e.g. res->end of 0x1fff moves to 0x2fff
 	 */
 #define push_end(res, mask) do {				\
-	BUG_ON(((mask+1) & mask) != 0);			\
-	res->end = -(-res->end & ~(unsigned long)mask);		\
-	res->end += mask;					\
+	BUG_ON(((mask+1) & mask) != 0);				\
+	res->end = (res->end + mask) | mask;			\
     } while (0)
 
 	list_for_each_entry(dev, &bus->devices, bus_list) {
-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

  reply	other threads:[~2006-06-13 16:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-26 15:12 [PATCH] Compile failure fix for ppc on 2.6.17-rc4-mm3 (2nd attempt) Mel Gorman
2006-05-26 15:12 ` Mel Gorman
2006-05-26 16:49 ` Andrew Morton
2006-05-29 15:49   ` Mel Gorman
2006-05-29 15:49     ` Mel Gorman
2006-05-29 16:22     ` Segher Boessenkool
2006-05-29 16:22       ` Segher Boessenkool
2006-05-29 17:38       ` Mel Gorman
2006-05-29 17:38         ` Mel Gorman
2006-05-29 17:56         ` Segher Boessenkool
2006-05-29 17:56           ` Segher Boessenkool
2006-05-29 19:05           ` Mel Gorman
2006-05-29 19:05             ` Mel Gorman
2006-06-09  9:36             ` Paul Mackerras
2006-06-09  9:36               ` Paul Mackerras
2006-06-13 16:49               ` Mel Gorman [this message]
2006-06-13 16:49                 ` Mel Gorman

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=20060613164904.GA15240@skynet.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=vgoyal@in.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 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.