linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: linuxppc-dev@ozlabs.org, linux-pci@atrey.karlin.mff.cuni.cz,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pci: Fix bus resource assignment on 32 bits with 64b resources
Date: Thu, 06 Dec 2007 14:22:27 +1100	[thread overview]
Message-ID: <1196911347.7033.15.camel@pasglop> (raw)
In-Reply-To: <20071205064116.D849BDE10A@ozlabs.org>


On Wed, 2007-12-05 at 17:40 +1100, Benjamin Herrenschmidt wrote:
> The current pci_assign_unassigned_resources() code doesn't work properly
> on 32 bits platforms with 64 bits resources. The main reason is the use
> of unsigned long in various places instead of resource_size_t.
> 
> This fixes it, along with some tricks to avoid casting to 64 bits on
> platforms that don't need it in every printk around.
> 
> This is a pre-requisite for making powerpc use the generic code instead of
> its own half-useful implementation.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> This version fixes some stupid warnings when using 32 bits resources

 ... and has warnings on 64 bits platforms... GRRRR

This whole issue of printk vs. resource_size_t is a terrible mess :-(

Part of the problem is that resource_size_t can be either u32 or u64..

that is  it can be either unsigned int, unsigned long or unsigned long
long... and we have no way to reliably printk that.

Any clever idea before I start pushing filthy macros up linux/types.h ?

Cheers,
Ben.

  reply	other threads:[~2007-12-06  3:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05  6:40 [PATCH] pci: Fix bus resource assignment on 32 bits with 64b resources Benjamin Herrenschmidt
2007-12-06  3:22 ` Benjamin Herrenschmidt [this message]
2007-12-06  6:39   ` Greg KH
2007-12-06  7:58     ` Benjamin Herrenschmidt
2007-12-06  8:13       ` Geert Uytterhoeven
2007-12-06  8:16       ` Matthew Wilcox
2007-12-06 13:24         ` Kumar Gala
2007-12-06 13:35           ` Andreas Schwab
2007-12-06 22:37         ` Benjamin Herrenschmidt
2007-12-07  1:00       ` Greg KH
2007-12-09  7:16         ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2007-12-10  6:15 Benjamin Herrenschmidt
2007-12-10  6:19 ` Benjamin Herrenschmidt
2007-12-04  6:08 Benjamin Herrenschmidt
2007-12-04 12:39 ` Geert Uytterhoeven
2007-12-04 19:57   ` Benjamin Herrenschmidt
2007-12-05  2:37 ` Benjamin Herrenschmidt

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=1196911347.7033.15.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --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).