* [RFC] Support 36-bit iomem on 32-bit Au1x00
@ 2010-01-03 12:39 pascal
2010-01-26 20:46 ` Manuel Lauss
0 siblings, 1 reply; 6+ messages in thread
From: pascal @ 2010-01-03 12:39 UTC (permalink / raw)
To: linux-mips
Hi,
I believe these changes are needed on Alchemy SoCs in order to
use iomem above 4G with the usual platform_device machinery:
- Set CONFIG_ARCH_PHYS_ADDR_T_64BIT to make resource_size_t 64-bit.
- Increase IOMEM_RESOURCE_END so that platforms can register resources.
--- linux-2.6.33-rc2/arch/mips/Kconfig.orig 2009-12-30 18:06:02.000000000 +0100
+++ linux-2.6.33-rc2/arch/mips/Kconfig 2009-12-30 22:05:38.000000000 +0100
@@ -1725,6 +1725,9 @@
config 64BIT_PHYS_ADDR
bool
+config ARCH_PHYS_ADDR_T_64BIT
+ def_bool 64BIT_PHYS_ADDR
+
config CPU_HAS_SMARTMIPS
depends on SYS_SUPPORTS_SMARTMIPS
bool "Support for the SmartMIPS ASE"
--- linux-2.6.33-rc2/arch/mips/include/asm/mach-au1x00/au1000.h.orig 2009-12-30 19:45:35.000000000 +0100
+++ linux-2.6.33-rc2/arch/mips/include/asm/mach-au1x00/au1000.h 2010-01-03 13:28:50.000000000 +0100
@@ -1728,7 +1728,7 @@
#define IOPORT_RESOURCE_START 0x10000000
#define IOPORT_RESOURCE_END 0xffffffff
#define IOMEM_RESOURCE_START 0x10000000
-#define IOMEM_RESOURCE_END 0xffffffff
+#define IOMEM_RESOURCE_END 0xfffffffffLL
#define PCI_IO_START 0
#define PCI_IO_END 0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Support 36-bit iomem on 32-bit Au1x00
2010-01-03 12:39 [RFC] Support 36-bit iomem on 32-bit Au1x00 pascal
@ 2010-01-26 20:46 ` Manuel Lauss
2010-01-26 21:19 ` pascal
0 siblings, 1 reply; 6+ messages in thread
From: Manuel Lauss @ 2010-01-26 20:46 UTC (permalink / raw)
To: pascal@pabr.org; +Cc: linux-mips
Hi Pascal,
On Sun, Jan 3, 2010 at 1:39 PM, pascal@pabr.org <pascal@pabr.org> wrote:
> Hi,
>
> I believe these changes are needed on Alchemy SoCs in order to
> use iomem above 4G with the usual platform_device machinery:
>
> - Set CONFIG_ARCH_PHYS_ADDR_T_64BIT to make resource_size_t 64-bit.
> - Increase IOMEM_RESOURCE_END so that platforms can register resources.
Have you tried to register a platform device above the 4G line? I get an oops
inside the platform device match code when I do. I'll try to figure out why.
Manuel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Support 36-bit iomem on 32-bit Au1x00
2010-01-26 20:46 ` Manuel Lauss
@ 2010-01-26 21:19 ` pascal
2010-01-28 13:18 ` Ralf Baechle
0 siblings, 1 reply; 6+ messages in thread
From: pascal @ 2010-01-26 21:19 UTC (permalink / raw)
To: Manuel Lauss; +Cc: linux-mips
Manuel Lauss writes:
> Have you tried to register a platform device above the 4G line? I get an oops
> inside the platform device match code when I do. I'll try to figure out why.
Yes, I used these patches on top of 2.6.33-rc2 and 2.6.33-rc2-next-20100101
for an ethernet chip at 0xd:1000:0000 on a Au1250 board.
I don't remember seeing oopses while I was figuring out how to get
36-bit I/O working. arch/x86 and arch/powerpc have been supporting
32-bit processors with 64-bit physical addresses for a long time,
so I would expect the generic resource management code to be reliable.
There are other changes in my tree, but I can't think of anything
which might affect this. Let me know if I can help further.
Pascal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Support 36-bit iomem on 32-bit Au1x00
2010-01-26 21:19 ` pascal
@ 2010-01-28 13:18 ` Ralf Baechle
2010-01-28 13:22 ` Manuel Lauss
0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2010-01-28 13:18 UTC (permalink / raw)
To: pascal; +Cc: Manuel Lauss, linux-mips
On Tue, Jan 26, 2010 at 10:19:22PM +0100, pascal@pabr.org wrote:
The whole fixing up of I/O addresses was necessary because the generic
code was written to assume that sizeof(unsigned long) == sizeof(void *)
and that mostly because it was handy for Linus' i386 world.
Today I think it would be preferable to get rid of the the fixups, pay the
small price for the larger resources and get sanity in exchange. My gut
feeling is that the bloat factor should be small. Either way, I'll let
you two sort this out for Alchemy and mark this patch as defered.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Support 36-bit iomem on 32-bit Au1x00
2010-01-28 13:18 ` Ralf Baechle
@ 2010-01-28 13:22 ` Manuel Lauss
2010-01-28 13:53 ` Ralf Baechle
0 siblings, 1 reply; 6+ messages in thread
From: Manuel Lauss @ 2010-01-28 13:22 UTC (permalink / raw)
To: Ralf Baechle; +Cc: pascal, linux-mips
On Thu, Jan 28, 2010 at 2:18 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Tue, Jan 26, 2010 at 10:19:22PM +0100, pascal@pabr.org wrote:
>
> The whole fixing up of I/O addresses was necessary because the generic
> code was written to assume that sizeof(unsigned long) == sizeof(void *)
> and that mostly because it was handy for Linus' i386 world.
>
> Today I think it would be preferable to get rid of the the fixups, pay the
> small price for the larger resources and get sanity in exchange. My gut
> feeling is that the bloat factor should be small. Either way, I'll let
> you two sort this out for Alchemy and mark this patch as defered.
I'm fine with it as-is; it doesn't break anything. I was experimenting with
extending the PCMCIA socket code to pass on 36bit addresses and got
bitten by the driver core.
Manuel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] Support 36-bit iomem on 32-bit Au1x00
2010-01-28 13:22 ` Manuel Lauss
@ 2010-01-28 13:53 ` Ralf Baechle
0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2010-01-28 13:53 UTC (permalink / raw)
To: Manuel Lauss; +Cc: pascal, linux-mips
On Thu, Jan 28, 2010 at 02:22:55PM +0100, Manuel Lauss wrote:
> > Today I think it would be preferable to get rid of the the fixups, pay the
> > small price for the larger resources and get sanity in exchange. My gut
> > feeling is that the bloat factor should be small. Either way, I'll let
> > you two sort this out for Alchemy and mark this patch as defered.
>
> I'm fine with it as-is; it doesn't break anything. I was experimenting with
> extending the PCMCIA socket code to pass on 36bit addresses and got
> bitten by the driver core.
Fine, so I applied the patch and fixed up the reject.
Pascal, please include a Signed-off-by: line in future patches.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-28 13:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 12:39 [RFC] Support 36-bit iomem on 32-bit Au1x00 pascal
2010-01-26 20:46 ` Manuel Lauss
2010-01-26 21:19 ` pascal
2010-01-28 13:18 ` Ralf Baechle
2010-01-28 13:22 ` Manuel Lauss
2010-01-28 13:53 ` Ralf Baechle
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).