linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: linuxppc-dev@ozlabs.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, adaplas@gmail.com
Subject: [PATCH 2/3] aty128fb: Fix 64 bits resources on 32 bits archs
Date: Tue, 22 Apr 2008 11:26:08 +1000	[thread overview]
Message-ID: <20080422012724.C22F5DE1AF@ozlabs.org> (raw)

This fixes aty128fb to not truncate 64 bits resources on 32 bits
platforms. Unfortunately, there are still issues with addresses
returned to userspace via struct fb_fix_screeninfo. This will
have to be dealt with separately.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 drivers/video/aty/aty128fb.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- linux-work.orig/drivers/video/aty/aty128fb.c	2008-04-22 11:18:41.000000000 +1000
+++ linux-work/drivers/video/aty/aty128fb.c	2008-04-22 11:19:31.000000000 +1000
@@ -2011,7 +2011,7 @@ static int __devinit aty128_init(struct 
 /* register a card    ++ajoshi */
 static int __devinit aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
-	unsigned long fb_addr, reg_addr;
+	resource_size_t fb_addr, reg_addr;
 	struct aty128fb_par *par;
 	struct fb_info *info;
 	int err;
@@ -2052,7 +2052,6 @@ static int __devinit aty128_probe(struct
 	info->pseudo_palette = par->pseudo_palette;
 
 	/* Virtualize mmio region */
-	info->fix.mmio_start = reg_addr;
 	par->regbase = ioremap(reg_addr, pci_resource_len(pdev, 2));
 	if (!par->regbase)
 		goto err_free_info;
@@ -2068,9 +2067,9 @@ static int __devinit aty128_probe(struct
 
 	/* Set up info->fix */
 	info->fix = aty128fb_fix;
-	info->fix.smem_start = fb_addr;
+	info->fix.smem_start = (unsigned long)fb_addr;
 	info->fix.smem_len = par->vram_size;
-	info->fix.mmio_start = reg_addr;
+	info->fix.mmio_start = (unsigned long)reg_addr;
 
 	/* If we can't test scratch registers, something is seriously wrong */
 	if (!register_test(par)) {

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

                 reply	other threads:[~2008-04-22  1:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080422012724.C22F5DE1AF@ozlabs.org \
    --to=benh@kernel.crashing.org \
    --cc=adaplas@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).