All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: Compile problem on sparc64
Date: Wed, 24 Mar 2004 20:19:14 +0000	[thread overview]
Message-ID: <20040324121914.00fb9bf9.davem@redhat.com> (raw)
In-Reply-To: <1080130448.2515.108.camel@pegasus>


[ Please us sparclinux@vger.kernel.org in the future, thanks... ]

On Wed, 24 Mar 2004 13:15:22 +0100
Marcel Holtmann <marcel@holtmann.org> wrote:

> I am using Debian Sid with GCC 3.3.3 (Debian 20040320) and I got the
> following error on my sparc64 platform while compiling the latest
> Bitkeeper sources from 2.6:

This should cure it, let me know if it doesn't.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/03/24 12:16:41-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: Do not use cast exprs as lvalues.
# 
# include/asm-sparc64/pgalloc.h
#   2004/03/24 12:16:19-08:00 davem@nuts.davemloft.net +7 -6
#   [SPARC64]: Do not use cast exprs as lvalues.
# 
diff -Nru a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
--- a/include/asm-sparc64/pgalloc.h	Wed Mar 24 12:17:02 2004
+++ b/include/asm-sparc64/pgalloc.h	Wed Mar 24 12:17:02 2004
@@ -38,11 +38,12 @@
 
 	preempt_disable();
 	if (!page->lru.prev) {
-		(unsigned long *)page->lru.next = pgd_quicklist;
+		page->lru.next = (void *) pgd_quicklist;
 		pgd_quicklist = (unsigned long *)page;
 	}
-	(unsigned long)page->lru.prev |-		(((unsigned long)pgd & (PAGE_SIZE / 2)) ? 2 : 1);
+	page->lru.prev = (void *)
+	  (((unsigned long)page->lru.prev) |
+	   (((unsigned long)pgd & (PAGE_SIZE / 2)) ? 2 : 1));
 	pgd_cache_size++;
 	preempt_enable();
 }
@@ -62,7 +63,7 @@
 			off = PAGE_SIZE / 2;
 			mask &= ~2;
 		}
-		(unsigned long)ret->lru.prev = mask;
+		ret->lru.prev = (void *) mask;
 		if (!mask)
 			pgd_quicklist = (unsigned long *)ret->lru.next;
                 ret = (struct page *)(__page_address(ret) + off);
@@ -76,10 +77,10 @@
 		if (page) {
 			ret = (struct page *)page_address(page);
 			clear_page(ret);
-			(unsigned long)page->lru.prev = 2;
+			page->lru.prev = (void *) 2UL;
 
 			preempt_disable();
-			(unsigned long *)page->lru.next = pgd_quicklist;
+			page->lru.next = (void *) pgd_quicklist;
 			pgd_quicklist = (unsigned long *)page;
 			pgd_cache_size++;
 			preempt_enable();

WARNING: multiple messages have this Message-ID (diff)
From: "David S. Miller" <davem@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: Compile problem on sparc64
Date: Wed, 24 Mar 2004 12:19:14 -0800	[thread overview]
Message-ID: <20040324121914.00fb9bf9.davem@redhat.com> (raw)
In-Reply-To: <1080130448.2515.108.camel@pegasus>


[ Please us sparclinux@vger.kernel.org in the future, thanks... ]

On Wed, 24 Mar 2004 13:15:22 +0100
Marcel Holtmann <marcel@holtmann.org> wrote:

> I am using Debian Sid with GCC 3.3.3 (Debian 20040320) and I got the
> following error on my sparc64 platform while compiling the latest
> Bitkeeper sources from 2.6:

This should cure it, let me know if it doesn't.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/03/24 12:16:41-08:00 davem@nuts.davemloft.net 
#   [SPARC64]: Do not use cast exprs as lvalues.
# 
# include/asm-sparc64/pgalloc.h
#   2004/03/24 12:16:19-08:00 davem@nuts.davemloft.net +7 -6
#   [SPARC64]: Do not use cast exprs as lvalues.
# 
diff -Nru a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
--- a/include/asm-sparc64/pgalloc.h	Wed Mar 24 12:17:02 2004
+++ b/include/asm-sparc64/pgalloc.h	Wed Mar 24 12:17:02 2004
@@ -38,11 +38,12 @@
 
 	preempt_disable();
 	if (!page->lru.prev) {
-		(unsigned long *)page->lru.next = pgd_quicklist;
+		page->lru.next = (void *) pgd_quicklist;
 		pgd_quicklist = (unsigned long *)page;
 	}
-	(unsigned long)page->lru.prev |=
-		(((unsigned long)pgd & (PAGE_SIZE / 2)) ? 2 : 1);
+	page->lru.prev = (void *)
+	  (((unsigned long)page->lru.prev) |
+	   (((unsigned long)pgd & (PAGE_SIZE / 2)) ? 2 : 1));
 	pgd_cache_size++;
 	preempt_enable();
 }
@@ -62,7 +63,7 @@
 			off = PAGE_SIZE / 2;
 			mask &= ~2;
 		}
-		(unsigned long)ret->lru.prev = mask;
+		ret->lru.prev = (void *) mask;
 		if (!mask)
 			pgd_quicklist = (unsigned long *)ret->lru.next;
                 ret = (struct page *)(__page_address(ret) + off);
@@ -76,10 +77,10 @@
 		if (page) {
 			ret = (struct page *)page_address(page);
 			clear_page(ret);
-			(unsigned long)page->lru.prev = 2;
+			page->lru.prev = (void *) 2UL;
 
 			preempt_disable();
-			(unsigned long *)page->lru.next = pgd_quicklist;
+			page->lru.next = (void *) pgd_quicklist;
 			pgd_quicklist = (unsigned long *)page;
 			pgd_cache_size++;
 			preempt_enable();

  reply	other threads:[~2004-03-24 20:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24 12:15 Compile problem on sparc64 Marcel Holtmann
2004-03-24 20:19 ` David S. Miller [this message]
2004-03-24 20:19   ` David S. Miller
2004-03-24 20:32   ` Marcel Holtmann
2004-03-24 20:32     ` Marcel Holtmann
2004-03-24 22:30     ` David S. Miller
2004-03-24 22:30       ` David S. Miller
2004-03-24 22:56       ` Marcel Holtmann
2004-03-24 22:56         ` Marcel Holtmann
2004-03-25 20:06   ` David S. Miller
2004-03-25 23:25   ` Marcel Holtmann

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=20040324121914.00fb9bf9.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=sparclinux@vger.kernel.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.