public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Valentine Barshak <vbarshak@ru•mvista.com>
To: Vitaly Bordug <vitb@kernel•crashing.org>
Cc: linuxppc-dev <linuxppc-dev@ozlabs•org>
Subject: Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit	pci_process_bridge_OF_ranges() instances
Date: Tue, 18 Sep 2007 16:03:50 +0400	[thread overview]
Message-ID: <46EFBEA6.4050406@ru.mvista.com> (raw)
In-Reply-To: <20070911224952.9838.46644.stgit@localhost.localdomain>

Vitaly Bordug wrote:
> +
> +			hose->io_base_phys = cpu_phys_addr - pci_addr;

This is not gonna work on 32-bit platform (unless pci_addr == 0).
Should be
hose->io_base_phys = cpu_phys_addr;
The other way we should adjust io size like we do on 64-bit and rewrite 
resource fixup functions.

> +			/* handle from 0 to top of I/O window */
> +#ifdef CONFIG_PPC64
> +			hose->pci_io_size = pci_addr + size;
> +#endif
> +			hose->io_base_virt = ioremap(hose->io_base_phys, size);

Do we need to ioremap on 64-bit? I think 64-bit uses different approach 
in handling io space.

> +#ifdef CONFIG_PPC32
> +			if (prim)
> +				isa_io_base = (unsigned long)hose->io_base_virt;
> +#endif

What's exactly the point of merging this single function?
If this was intended to add 64-bit physical address support to 32-bit 
platforms (like ppc440), then it does not seem sufficient to make pci 
stuff work right.
What about the 32-bit pcibios_fixup_resources(), 
pcibios_resource_to_bus(), pcibios_bus_to_resource() stuff?
There's still no 64-bit support. You'll get
"PCI Cannot allocate resource region" attempting to initialize resources 
at PCI start-up.
Thanks,
Valentine.

  parent reply	other threads:[~2007-09-18 12:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-11 22:49 [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances Vitaly Bordug
2007-09-11 22:57 ` Arnd Bergmann
2007-09-11 23:56   ` Vitaly Bordug
2007-09-12  8:13     ` Arnd Bergmann
2007-09-12 14:51       ` Segher Boessenkool
2007-09-12 16:07       ` Vitaly Bordug
2007-09-13  5:11         ` David Gibson
2007-09-18 12:03 ` Valentine Barshak [this message]
2007-09-18 14:27   ` Vitaly Bordug
2007-09-18 14:38     ` Valentine Barshak
2007-09-19  0:09       ` Vitaly Bordug
2007-09-18 21:44   ` Benjamin Herrenschmidt
2007-09-18 21:41 ` Benjamin Herrenschmidt
2007-09-18 21:42 ` 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=46EFBEA6.4050406@ru.mvista.com \
    --to=vbarshak@ru$(echo .)mvista.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=vitb@kernel$(echo .)crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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