* Re: U-Boot on 440EP Bamboo board, anybody succeed?
From: Wolfgang Denk @ 2006-04-12 19:39 UTC (permalink / raw)
To: Andriy Korud; +Cc: linuxppc-embedded
In-Reply-To: <60E856FD577CC04BA3727AF4122D3F1601238501@3bit.vector.com.pl>
In message <60E856FD577CC04BA3727AF4122D3F1601238501@3bit.vector.com.pl> you wrote:
>
> Does anybody succeed to run U-Boot on this board?
Yes, see my reply on the U-Boot list.
Please note thet it is really bad manner to post the same question to
several mailing lists without any indication.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Let's say the docs present a simplified view of reality... :-)
- Larry Wall in <6940@jpl-devvax.JPL.NASA.GOV>
^ permalink raw reply
* Re: Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board
From: Grant Likely @ 2006-04-12 19:52 UTC (permalink / raw)
To: Vincent Winstead; +Cc: trini, linuxppc-embedded list
In-Reply-To: <20060412193338.75924.qmail@web52010.mail.yahoo.com>
Please remember to CC the mailing list when replying
On 4/12/06, Vincent Winstead <vwinstead@yahoo.com> wrote:
>
> Now, what does that mean, to get the tree. Does it mean I'll get a li=
st
> of possible kernels that I can download, and then i'll have to choose one=
of
> them to download?
It means you get a clone of the source tree + revision history which
you can easily keep up to date with mainline. For things like Paul's
powerpc and powerpc-merge trees, you need to use it because I don't
think anybody is making .tar.gz snapshots from it.
> Also, how come I have to go through all this 'git' mumbo-jumbo? Why
> can't I just go to kernel.org and grab one of the 2.6 kernels off of ther=
e,
> then untar it? What's so special about the source.mvista.com kernels
> through git and rsync?
If you want to use 2.6: Git is a pretty easy way to keep up to date
with changes other are making on the tree. But no, you don't have to
use it. Some of the maintainers have snapshots generated from their
trees which you can download.
If you use 2.4: You need to use rsync to get the linuxppc-2.4 tree
because I don't think anyone is maintaining .tar.gz of the rsync
snapshot. Email Tom Rini and ask him. The linuxppc-2.4 tree is
special because it's one of the trees that actually has the ML300
patches integrated. Mainline does not.
> --
> Grant Likely, B.Sc. P.Eng.
> Secret Lab Technologies Ltd.
> (403) 399-0195
>
>
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 399-0195
^ permalink raw reply
* Re: freescale lite 5200 board and kernel 2.6
From: Matthias Fechner @ 2006-04-12 20:09 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20060410215428.GA22290@raptus.dandreoli.com>
Hello Domenico,
* Domenico Andreoli <cavokz@gmail.com> [10-04-06 23:54]:
> unfortunately it does not :/
im sorry about it, but I'm a newbie too.
The only think I did is documenting how i got the kernel running. :(
> is there any way to force eth0 auto-negotiation?
maybe giving a parameter to the bootargs?
Maybe you found something in the description of the driver in the
kernelconfiguration.
Best regards,
Matthias
^ permalink raw reply
* RE: question about Linux 2.6 with Xilinx ML-403
From: Martin, Tim @ 2006-04-12 20:15 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-embedded
> >
> > Ethernet? (Hard-Core PLB TEMAC?, Soft-Core PLB EMAC? Localink TEMAC?
Is
> > 10/100/1000 supported, or is there only 1 rate e.g. 1000 supported?)
>=20
> No. I've ported the 2.4 driver, but I haven't got permission to
> release it yet. (I'm a contractor; I don't own any of the work I do)
>=20
Which 2.4 driver - there's the "Montavista" one for the softcore PLB
EMAC, and there's also one for the hardcore PLB TEMAC that gets
distributed with the GSRD.
Thanks,
Tim
^ permalink raw reply
* [0/10]: Clean up boot time console messages
From: Olof Johansson @ 2006-04-12 20:18 UTC (permalink / raw)
To: paulus; +Cc: hollisb, linuxppc-dev
Here's a series of patches that removes a bunch of console messages during PPC
boot. They are moved to KERN_DEBUG instead, which means that:
1. They will still be in dmesg.
2. If needed for debugging, they can be enabled by adding "loglevel=8" to the
boot command line.
But for most uses, I don't see how these messages really add value to the user.
The information is normally available at other places, and mostly needed when
trying to figure out why something doesn't work right.
Since these are all janitorial, I'd appreciate them being queued for 2.6.18.
-Olof
^ permalink raw reply
* [1/10]: Quiet HVSI boot output
From: Olof Johansson @ 2006-04-12 20:19 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, hollisb
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
There's no real need to print the number of found HVSI devices on the
console at every boot.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/drivers/char/hvsi.c
===================================================================
--- 2.6.orig/drivers/char/hvsi.c
+++ 2.6/drivers/char/hvsi.c
@@ -1179,7 +1179,7 @@ static int __init hvsi_init(void)
if (tty_register_driver(hvsi_driver))
panic("Couldn't register hvsi console driver\n");
- printk(KERN_INFO "HVSI: registered %i devices\n", hvsi_count);
+ printk(KERN_DEBUG "HVSI: registered %i devices\n", hvsi_count);
return 0;
}
^ permalink raw reply
* [2/10]: Quiet time init output
From: Olof Johansson @ 2006-04-12 20:20 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
Move time_init console output to KERN_DEBUG prink level. No need to
print it at every boot.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/kernel/time.c
===================================================================
--- 2.6.orig/arch/powerpc/kernel/time.c
+++ 2.6/arch/powerpc/kernel/time.c
@@ -945,9 +945,9 @@ void __init time_init(void)
} else {
/* Normal PowerPC with timebase register */
ppc_md.calibrate_decr();
- printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n",
+ printk(KERN_DEBUG "time_init: decrementer frequency = %lu.%.6lu MHz\n",
ppc_tb_freq / 1000000, ppc_tb_freq % 1000000);
- printk(KERN_INFO "time_init: processor frequency = %lu.%.6lu MHz\n",
+ printk(KERN_DEBUG "time_init: processor frequency = %lu.%.6lu MHz\n",
ppc_proc_freq / 1000000, ppc_proc_freq % 1000000);
tb_last_stamp = tb_last_jiffy = get_tb();
}
^ permalink raw reply
* [3/10]: Quiet page order output
From: Olof Johansson @ 2006-04-12 20:21 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
No need to always print page orders.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/mm/hash_utils_64.c
===================================================================
--- 2.6.orig/arch/powerpc/mm/hash_utils_64.c
+++ 2.6/arch/powerpc/mm/hash_utils_64.c
@@ -319,7 +319,7 @@ static void __init htab_init_page_sizes(
mmu_virtual_psize = MMU_PAGE_64K;
#endif
- printk(KERN_INFO "Page orders: linear mapping = %d, others = %d\n",
+ printk(KERN_DEBUG "Page orders: linear mapping = %d, others = %d\n",
mmu_psize_defs[mmu_linear_psize].shift,
mmu_psize_defs[mmu_virtual_psize].shift);
^ permalink raw reply
* [4/10]: Quiet VETH version printk
From: Olof Johansson @ 2006-04-12 20:22 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
ibmveth_printk() is only used to print the driver version when the module
initializes, which means on all machines as long as it's compiled in.
If it's really only needed for debugging, boot with loglevel=8, or get
it from dmesg instead.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/drivers/net/ibmveth.c
===================================================================
--- 2.6.orig/drivers/net/ibmveth.c
+++ 2.6/drivers/net/ibmveth.c
@@ -61,7 +61,7 @@
#undef DEBUG
#define ibmveth_printk(fmt, args...) \
- printk(KERN_INFO "%s: " fmt, __FILE__, ## args)
+ printk(KERN_DEBUG "%s: " fmt, __FILE__, ## args)
#define ibmveth_error_printk(fmt, args...) \
printk(KERN_ERR "(%s:%3.3d ua:%x) ERROR: " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args)
^ permalink raw reply
* [5/10]: Don't print chosen idle loop at every boot
From: Olof Johansson @ 2006-04-12 20:23 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
No need to write out what idle loop is used on every boot.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/platforms/maple/setup.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/maple/setup.c
+++ 2.6/arch/powerpc/platforms/maple/setup.c
@@ -189,7 +189,7 @@ void __init maple_setup_arch(void)
conswitchp = &dummy_con;
#endif
- printk(KERN_INFO "Using native/NAP idle loop\n");
+ printk(KERN_DEBUG "Using native/NAP idle loop\n");
}
/*
Index: 2.6/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/iseries/setup.c
+++ 2.6/arch/powerpc/platforms/iseries/setup.c
@@ -535,10 +535,10 @@ static void __init iSeries_setup_arch(vo
{
if (get_lppaca()->shared_proc) {
ppc_md.idle_loop = iseries_shared_idle;
- printk(KERN_INFO "Using shared processor idle loop\n");
+ printk(KERN_DEBUG "Using shared processor idle loop\n");
} else {
ppc_md.idle_loop = iseries_dedicated_idle;
- printk(KERN_INFO "Using dedicated idle loop\n");
+ printk(KERN_DEBUG "Using dedicated idle loop\n");
}
/* Setup the Lp Event Queue */
Index: 2.6/arch/powerpc/platforms/powermac/feature.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/powermac/feature.c
+++ 2.6/arch/powerpc/platforms/powermac/feature.c
@@ -2510,7 +2510,7 @@ found:
if (get_property(np, "flush-on-lock", NULL))
break;
powersave_nap = 1;
- printk(KERN_INFO "Processor NAP mode on idle enabled.\n");
+ printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n");
break;
}
Index: 2.6/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/pseries/setup.c
+++ 2.6/arch/powerpc/platforms/pseries/setup.c
@@ -235,14 +235,14 @@ static void __init pSeries_setup_arch(vo
if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
vpa_init(boot_cpuid);
if (get_lppaca()->shared_proc) {
- printk(KERN_INFO "Using shared processor idle loop\n");
+ printk(KERN_DEBUG "Using shared processor idle loop\n");
ppc_md.power_save = pseries_shared_idle_sleep;
} else {
- printk(KERN_INFO "Using dedicated idle loop\n");
+ printk(KERN_DEBUG "Using dedicated idle loop\n");
ppc_md.power_save = pseries_dedicated_idle_sleep;
}
} else {
- printk(KERN_INFO "Using default idle loop\n");
+ printk(KERN_DEBUG "Using default idle loop\n");
}
if (firmware_has_feature(FW_FEATURE_LPAR))
^ permalink raw reply
* [6/10]: Less verbose mem configuration output
From: Olof Johansson @ 2006-04-12 20:25 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
Quieten some of the debug ram config output. we already print out available
memory at KERN_INFO level.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/mm/mem.c
===================================================================
--- 2.6.orig/arch/powerpc/mm/mem.c
+++ 2.6/arch/powerpc/mm/mem.c
@@ -299,9 +299,9 @@ void __init paging_init(void)
kmap_prot = PAGE_KERNEL;
#endif /* CONFIG_HIGHMEM */
- printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
+ printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
top_of_ram, total_ram);
- printk(KERN_INFO "Memory hole size: %ldMB\n",
+ printk(KERN_DEBUG "Memory hole size: %ldMB\n",
(top_of_ram - total_ram) >> 20);
/*
* All pages are DMA-able so we put them all in the DMA zone.
@@ -380,7 +380,7 @@ void __init mem_init(void)
totalhigh_pages++;
}
totalram_pages += totalhigh_pages;
- printk(KERN_INFO "High memory: %luk\n",
+ printk(KERN_DEBUG "High memory: %luk\n",
totalhigh_pages << (PAGE_SHIFT-10));
}
#endif /* CONFIG_HIGHMEM */
Index: 2.6/arch/powerpc/mm/numa.c
===================================================================
--- 2.6.orig/arch/powerpc/mm/numa.c
+++ 2.6/arch/powerpc/mm/numa.c
@@ -465,9 +465,9 @@ static void __init setup_nonnuma(void)
unsigned long total_ram = lmb_phys_mem_size();
unsigned int i;
- printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
+ printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
top_of_ram, total_ram);
- printk(KERN_INFO "Memory hole size: %ldMB\n",
+ printk(KERN_DEBUG "Memory hole size: %ldMB\n",
(top_of_ram - total_ram) >> 20);
for (i = 0; i < lmb.memory.cnt; ++i)
@@ -485,7 +485,7 @@ void __init dump_numa_cpu_topology(void)
return;
for_each_online_node(node) {
- printk(KERN_INFO "Node %d CPUs:", node);
+ printk(KERN_DEBUG "Node %d CPUs:", node);
count = 0;
/*
@@ -521,7 +521,7 @@ static void __init dump_numa_memory_topo
for_each_online_node(node) {
unsigned long i;
- printk(KERN_INFO "Node %d Memory:", node);
+ printk(KERN_DEBUG "Node %d Memory:", node);
count = 0;
^ permalink raw reply
* [7/10]: Lack of ISA interrupts on XICS isn't dangerous
From: Olof Johansson @ 2006-04-12 20:26 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
This isn't really a dangerous thing any more; most systems lack
ISA interrupt controllers.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/pseries/xics.c
+++ 2.6/arch/powerpc/platforms/pseries/xics.c
@@ -522,7 +522,7 @@ nextnode:
np = of_find_node_by_type(NULL, "interrupt-controller");
if (!np) {
- printk(KERN_WARNING "xics: no ISA interrupt controller\n");
+ printk(KERN_DEBUG "xics: no ISA interrupt controller\n");
xics_irq_8259_cascade_real = -1;
xics_irq_8259_cascade = -1;
} else {
^ permalink raw reply
* [8/10]: Quiet PCI init printouts
From: Olof Johansson @ 2006-04-12 20:26 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
Quiet some of the more debug related output from the pci probe routines.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/kernel/pci_64.c
===================================================================
--- 2.6.orig/arch/powerpc/kernel/pci_64.c
+++ 2.6/arch/powerpc/kernel/pci_64.c
@@ -605,7 +605,7 @@ static int __init pcibios_init(void)
iSeries_pcibios_init();
#endif
- printk("PCI: Probing PCI hardware\n");
+ printk(KERN_DEBUG "PCI: Probing PCI hardware\n");
/* Scan all of the recorded PCI controllers. */
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
@@ -630,14 +630,14 @@ static int __init pcibios_init(void)
/* Cache the location of the ISA bridge (if we have one) */
ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
if (ppc64_isabridge_dev != NULL)
- printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
+ printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
#ifdef CONFIG_PPC_MULTIPLATFORM
/* map in PCI I/O space */
phbs_remap_io();
#endif
- printk("PCI: Probing PCI hardware done\n");
+ printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
return 0;
}
@@ -804,7 +804,7 @@ static pgprot_t __pci_mmap_set_pgprot(st
else
prot |= _PAGE_GUARDED;
- printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start,
+ printk(KERN_DEBUG "PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start,
prot);
return __pgprot(prot);
@@ -1212,7 +1212,7 @@ int remap_bus_range(struct pci_bus *bus)
return 1;
if (start_phys == 0)
return 1;
- printk("mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size);
+ printk(KERN_DEBUG "mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size);
if (__ioremap_explicit(start_phys, start_virt, size,
_PAGE_NO_CACHE | _PAGE_GUARDED))
return 1;
^ permalink raw reply
* [9/10]: Quiet rtasd output at boot
From: Olof Johansson @ 2006-04-12 20:28 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
Most users won't really know the difference between a started RTAS
daemon and a missing event-scan. Move it to debug levels.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/platforms/pseries/rtasd.c
===================================================================
--- 2.6.orig/arch/powerpc/platforms/pseries/rtasd.c
+++ 2.6/arch/powerpc/platforms/pseries/rtasd.c
@@ -348,7 +348,7 @@ static int enable_surveillance(int timeo
return 0;
if (error == -EINVAL) {
- printk(KERN_INFO "rtasd: surveillance not supported\n");
+ printk(KERN_DEBUG "rtasd: surveillance not supported\n");
return 0;
}
@@ -440,7 +440,7 @@ static int rtasd(void *unused)
goto error;
}
- printk(KERN_INFO "RTAS daemon started\n");
+ printk(KERN_DEBUG "RTAS daemon started\n");
DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate));
@@ -487,7 +487,7 @@ static int __init rtas_init(void)
/* No RTAS */
if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) {
- printk(KERN_INFO "rtasd: no event-scan on system\n");
+ printk(KERN_DEBUG "rtasd: no event-scan on system\n");
return 1;
}
^ permalink raw reply
* [10/10]: Quiet oprofile output at boot
From: Olof Johansson @ 2006-04-12 20:29 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060412201823.GG19464@pb15.lixom.net>
No need to always print out which performance monitoring type is used
on the console at every boot.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: 2.6/arch/powerpc/oprofile/common.c
===================================================================
--- 2.6.orig/arch/powerpc/oprofile/common.c
+++ 2.6/arch/powerpc/oprofile/common.c
@@ -162,7 +162,7 @@ int __init oprofile_arch_init(struct opr
ops->stop = op_powerpc_stop;
ops->backtrace = op_powerpc_backtrace;
- printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
+ printk(KERN_DEBUG "oprofile: using %s performance monitoring.\n",
ops->cpu_type);
return 0;
^ permalink raw reply
* Re: question about Linux 2.6 with Xilinx ML-403
From: Grant Likely @ 2006-04-12 21:24 UTC (permalink / raw)
To: Martin, Tim; +Cc: linuxppc-embedded
In-Reply-To: <821B2170E9E7F04FA38DF7EC21DE487104571455@VCAEXCH01.hq.corp.viasat.com>
On 4/12/06, Martin, Tim <tim.martin@viasat.com> wrote:
>
> Which 2.4 driver - there's the "Montavista" one for the softcore PLB
> EMAC, and there's also one for the hardcore PLB TEMAC that gets
> distributed with the GSRD.
The montavista softcore driver. Has someone written a driver for the TEMAC=
yet?
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 399-0195
^ permalink raw reply
* Re: Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board
From: Grant Likely @ 2006-04-12 21:50 UTC (permalink / raw)
To: Vincent Winstead; +Cc: linuxppc-embedded list
In-Reply-To: <20060412214613.10018.qmail@web52004.mail.yahoo.com>
On 4/12/06, Vincent Winstead <vwinstead@yahoo.com> wrote:
>
> Very Interesting. Now I know what they were talking about on the sites t=
hat
> go through how to install the linux kernel onto the ML300. because in th=
ose
> method walk-throughs they show which options you should choose when doin=
g a
> "make menuconfig" and there are specific ones regarding Xilinx but I neve=
r
> saw these when doing configurations of what you call mainline versions of
> the linux kernel.
> So, when you say that the "The linuxppc-2.4 tree is
> special because it's one of the trees that actually has the ML300
> patches integrated", are you implying that you could put these patches in=
to
> the system on your own if you wanted to?
Of course you can
> You're not talking about the board
> support package are you?
As far as you can apply the concept of BSP to Linux; yes I am. The
patches provide the code required to work on an ML300 ref design...
drivers and initialization code specifically
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 399-0195
^ permalink raw reply
* Re: Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board
From: Grant Likely @ 2006-04-12 21:55 UTC (permalink / raw)
To: Vincent Winstead; +Cc: linuxppc-embedded list
In-Reply-To: <528646bc0604121450t2467be31med5e97fc14077313@mail.gmail.com>
On 4/12/06, Grant Likely <grant.likely@secretlab.ca> wrote:
> On 4/12/06, Vincent Winstead <vwinstead@yahoo.com> wrote:
>
> > So, when you say that the "The linuxppc-2.4 tree is
> > special because it's one of the trees that actually has the ML300
> > patches integrated", are you implying that you could put these patches =
into
> > the system on your own if you wanted to?
>
> Of course you can
(assuming of course you can find copies of the patch files)
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 399-0195
^ permalink raw reply
* Re: Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board
From: Aidan Williams @ 2006-04-12 22:11 UTC (permalink / raw)
To: Vincent Winstead; +Cc: linuxppc-embedded list
In-Reply-To: <528646bc0604121252r48d93ac0ubf7d60116815c1b5@mail.gmail.com>
Grant Likely wrote:
> If you use 2.4: You need to use rsync to get the linuxppc-2.4 tree
> because I don't think anyone is maintaining .tar.gz of the rsync
> snapshot. Email Tom Rini and ask him. The linuxppc-2.4 tree is
> special because it's one of the trees that actually has the ML300
> patches integrated. Mainline does not.
>
For 2.4, I've had good success on two different boards
using the v2pro and virtex4 parts with:
http://www.itee.uq.edu.au/~pml/uclinux_powerpc/
The kernel tarball there has support for various xilinx
supplied peripheral cores..
The neat thing about this approach is that there is a
uclinux BSP for the EDK that is used to generate an
auto-config.in file which you then drop directly
into the linux kernel tree.
Even though it is about the microblaze rather than
the PPC, a helpful "getting started" document is:
http://www.itee.uq.edu.au/~wu/downloads/uClinux_ready_Microblaze_design.pdf
- aidan
^ permalink raw reply
* RE: question about Linux 2.6 with Xilinx ML-403
From: Rick Moleres @ 2006-04-12 21:54 UTC (permalink / raw)
To: Grant Likely, Martin, Tim; +Cc: linuxppc-embedded
Yes, we have a driver for the PLB TEMAC (different than the GSRD LL
TEMAC) for Linux 2.4 (MontaVista Linux 2.4.20) that's shipped in EDK
8.1.1, and MontaVista is on the verge of publishing a driver for PLB
TEMAC for Linux 2.6. (I believe it came across this mailing list a few
weeks ago)
-Rick
-----Original Message-----
From: linuxppc-embedded-bounces+moleres=3Dxilinx.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+moleres=3Dxilinx.com@ozlabs.org] On
Behalf Of Grant Likely
Sent: Wednesday, April 12, 2006 3:25 PM
To: Martin, Tim
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: question about Linux 2.6 with Xilinx ML-403
On 4/12/06, Martin, Tim <tim.martin@viasat.com> wrote:
>
> Which 2.4 driver - there's the "Montavista" one for the softcore PLB
> EMAC, and there's also one for the hardcore PLB TEMAC that gets
> distributed with the GSRD.
The montavista softcore driver. Has someone written a driver for the
TEMAC yet?
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 399-0195
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: freescale lite 5200 board and kernel 2.6
From: Sylvain Munaut @ 2006-04-12 22:30 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20060410215428.GA22290@raptus.dandreoli.com>
Domenico Andreoli wrote:
> On Sat, Apr 08, 2006 at 10:21:00AM +0200, Matthias Fechner wrote:
>
>> Hello Domenico,
>>
>
> Hello Matthias,
>
>
>> * Domenico Andreoli <cavokz@gmail.com> [07-04-06 00:10]:
>>
>>> kernel is built following the instructions on your wiki, i attached
>>> the config file. please have a look, let me know if any check/test may
>>> be advised.
>>>
>> sry, but I have now time to try your kernel config, but I attached
>> mine which is working fine for me.
>> Maybe this helps you.
>>
>
> unfortunately it does not :/
>
> sometimes kernel prints "eth0: config: auto-negotiation on, 100HDX,
> 10HDX.", the eth0 is up and everything works.
>
> most of the times "eth0: config: auto-negotiation off, No speed/duplex
> selected?." is instead printed and eth0 seems to not exist.
>
> i tend to exclude hw problems, older kernel 2.4.x always succeed in
> using eth0.
>
> is there any way to force eth0 auto-negotiation?
>
When it doesn't work, did it detect the phy correctly ?
Somewhere in the boot sequence it should print something about a LXT971
being found at some address.
Sylvain
^ permalink raw reply
* Re: [PATCH] 2 of 3 kdump-ppc64-soft-reset-fixes
From: David Wilder @ 2006-04-12 20:22 UTC (permalink / raw)
To: Olaf Hering; +Cc: akpm, fastboot, mchintage, linuxppc-dev, paulus
In-Reply-To: <20060412171520.GA24681@suse.de>
Olaf Hering wrote:
> On Mon, Apr 10, David Wilder wrote:
>
>
>
>
>>+++ 2617-rc1/arch/powerpc/kernel/crash.c 2006-04-05 13:24:19.000000000 -0700
>>
>>
>
>
>
>>@@ -185,15 +277,14 @@ void default_machine_crash_shutdown(stru
>> * The kernel is broken so disable interrupts.
>> */
>> local_irq_disable();
>>-
>>- if (ppc_md.kexec_cpu_down)
>>- ppc_md.kexec_cpu_down(1, 0);
>>-
>> /*
>> * Make a note of crashing cpu. Will be used in machine_kexec
>> * such that another IPI will not be sent.
>>
>>
>
>This change conflicts with the patch for interrupt shutdown. I guess
>both patches are needed, as each one fixes a different bug?
>
>http://ozlabs.org/pipermail/linuxppc-dev/2006-April/021855.html
>[PATCH] powerpc: Disable and EOI interrupts in machine_crash_shutdown()
>
>
>
Yes both are needed, I don t see the conflict. If you apply interrupt
shutdown first then the soft-reset patch. It should work ok.
--
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA
dwilder@us.ibm.com
(503)578-3789
^ permalink raw reply
* Re: [PATCH] powerpc: Add FSL CPM2 device tree node documentation
From: Andy Fleming @ 2006-04-12 23:19 UTC (permalink / raw)
To: Paul Nasrat; +Cc: linuxppc-dev, Jon Loeliger, Paul Mackerras
In-Reply-To: <1143564910.2660.4.camel@enki.eridu>
On Mar 28, 2006, at 10:55, Paul Nasrat wrote:
> On Tue, 2006-03-28 at 20:14 +0400, Vitaly Bordug wrote:
>> Updated the documentation to include the initial description of
>> the CPM2
>> device that are used on PQII and PQIII families. Only initial sub-
>> devices
>> described so far, but that should be sufficient to move the
>> respective
>> boards to powerpc, with a reasonable minimum supporteddevice set.
>>
>
>> + 5) FCCs (Fast Communications Controllers)
>> +
>> + Required properties:
>> +
>> + - device_type : should be "network"
>> + - model : "FCCx", x is typically a small number depending on the
>> + devices amount
>> + - compatible : should be "fs_enet"
>> + - address : List of bytes representing the ethernet address of
>> + this controller
>
> Umm should we not use local-mac-address and mac-address (and
> address-bits) as in section 3.7.4 in 1275-1994?
So no one chimed in on this. Clearly, 1275 states that it's supposed
to be local-mac-address or mac-address. We use "address". But I'm
pretty sure we copied our ethernet node from somewhere else, so which
one should it be?
Andy Fleming
^ permalink raw reply
* [PATCH 0/7] [RFC] Sizing zones and holes in an architecture independent manner V2
From: Mel Gorman @ 2006-04-12 23:20 UTC (permalink / raw)
To: davej, tony.luck, linuxppc-dev, linux-kernel, bob.picco, ak,
linux-mm
Cc: Mel Gorman
This is V2 of the patchset. They have been boot tested on x86, ppc64
and x86_64 but I still need to do a double check that zones are the
same size before and after the patch on all arches. IA64 passed a
basic compile-test. a driver program that fed in the values generated
by IA64 to add_active_range(), zone_present_pages_in_node() and
zone_absent_pages_in_node() seemed to generate expected values.
Changelog since V1
o Correctly convert virtual and physical addresses to PFNs on ia64
o Correctly convert physical addresses to PFN on older ppc
o When add_active_range() is called with overlapping pfn ranges, merge them
o When a zone boundary occurs within a memory hole, account correctly
o Minor whitespace damage cleanup
o Debugging patch temporarily included
At a basic level, architectures define structures to record where active
ranges of page frames are located. Once located, the code to calculate
zone sizes and holes in each architecture is very similar. Some of this
zone and hole sizing code is difficult to read for no good reason. This
set of patches eliminates the similar-looking architecture-specific code.
The patches introduce a mechanism where architectures register where the
active ranges of page frames are with add_active_range(). When all areas
have been discovered, free_area_init_nodes() is called to initialise
the pgdat and zones. The zone sizes and holes are then calculated in an
architecture independent manner.
Patch 1 introduces the mechanism for registering and initialising PFN ranges
Patch 2 changes ppc to use the mechanism - 128 arch-specific LOC removed
Patch 3 changes x86 to use the mechanism - 150 arch-specific LOC removed
Patch 4 changes x86_64 to use the mechanism - 34 arch-specific LOC removed
Patch 5 changes ia64 to use the mechanism - 57 arch-specific LOC removed
At this point, there is a net reduction of 27 lines of code and the
arch-independent code is a lot easier to read in comparison to some of
the arch-specific stuff, particularly in arch/i386/ .
For Patch 6, it was also noted that page_alloc.c has a *lot* of
initialisation code which makes the file harder to read than it needs to
be. Patch 6 creates a new file mem_init.c and moves a lot of initialisation
code from page_alloc.c to it. After the patch is applied, there is still
a net reduction of 6 lines of code.
The patches have been successfully boot tested on
o x86, flatmem
o x86, NUMAQ
o PPC64, NUMA
o PPC64, CONFIG_NUMA=n
o x86_64, NUMA with SRAT
The patches have been compile tested for ia64 for flatmem and sparsemem
configurations. At attempt was made to boot test on an ancient RS/6000
but the vanilla kernel does not boot so I have to investigate there.
The net reduction seems small but the big benefit of this set of patches
is the reduction of 380 lines of architecture-specific code, some of
which is very hairy. There should be a greater net reduction when other
architectures use the same mechanisms for zone and hole sizing but I lack
the hardware to test on.
Comments?
Additional credit;
Dave Hansen for the initial suggestion and comments on early patches
Andy Whitcroft for reviewing early versions and catching numerous errors
Tony Luck and Bob Picco for testing and debugging on IA64
arch/i386/Kconfig | 8
arch/i386/kernel/setup.c | 19
arch/i386/kernel/srat.c | 98 ----
arch/i386/mm/discontig.c | 59 --
arch/ia64/Kconfig | 3
arch/ia64/mm/contig.c | 60 --
arch/ia64/mm/discontig.c | 41 -
arch/ia64/mm/init.c | 12
arch/powerpc/Kconfig | 13
arch/powerpc/mm/mem.c | 53 --
arch/powerpc/mm/numa.c | 157 ------
arch/ppc/Kconfig | 3
arch/ppc/mm/init.c | 26 -
arch/x86_64/Kconfig | 3
arch/x86_64/kernel/e820.c | 19
arch/x86_64/mm/init.c | 60 --
arch/x86_64/mm/numa.c | 15
include/asm-ia64/meminit.h | 1
include/asm-x86_64/e820.h | 1
include/asm-x86_64/proto.h | 2
include/linux/mm.h | 14
include/linux/mmzone.h | 15
mm/Makefile | 2
mm/mem_init.c | 1014 +++++++++++++++++++++++++++++++++++++++++++++
mm/page_alloc.c | 678 ------------------------------
25 files changed, 1185 insertions(+), 1191 deletions(-)
--
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
^ permalink raw reply
* [PATCH 1/7] Introduce mechanism for registering active regions of memory
From: Mel Gorman @ 2006-04-12 23:20 UTC (permalink / raw)
To: davej, tony.luck, linux-mm, ak, bob.picco, linux-kernel,
linuxppc-dev
Cc: Mel Gorman
In-Reply-To: <20060412232036.18862.84118.sendpatchset@skynet>
This patch defines the structure to represent an active range of page
frames within a node in an architecture independent manner. Architectures
are expected to register active ranges of PFNs using add_active_range(nid,
start_pfn, end_pfn) and call free_area_init_nodes() passing the PFNs of
the end of each zone.
include/linux/mm.h | 14 +
include/linux/mmzone.h | 15 +
mm/page_alloc.c | 363 +++++++++++++++++++++++++++++++++++++++++---
3 files changed, 367 insertions(+), 25 deletions(-)
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
diff -rup -X /usr/src/patchset-0.5/bin//dontdiff linux-2.6.17-rc1-clean/include/linux/mm.h linux-2.6.17-rc1-101-add_free_area_init_nodes/include/linux/mm.h
--- linux-2.6.17-rc1-clean/include/linux/mm.h 2006-04-03 04:22:10.000000000 +0100
+++ linux-2.6.17-rc1-101-add_free_area_init_nodes/include/linux/mm.h 2006-04-12 20:02:10.000000000 +0100
@@ -867,6 +867,20 @@ extern void free_area_init(unsigned long
extern void free_area_init_node(int nid, pg_data_t *pgdat,
unsigned long * zones_size, unsigned long zone_start_pfn,
unsigned long *zholes_size);
+#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
+extern void free_area_init_nodes(unsigned long max_dma_pfn,
+ unsigned long max_dma32_pfn,
+ unsigned long max_low_pfn,
+ unsigned long max_high_pfn);
+extern void add_active_range(unsigned int nid, unsigned long start_pfn,
+ unsigned long end_pfn);
+extern void get_pfn_range_for_nid(unsigned int nid,
+ unsigned long *start_pfn, unsigned long *end_pfn);
+extern int early_pfn_to_nid(unsigned long pfn);
+extern void free_bootmem_with_active_regions(int nid,
+ unsigned long max_low_pfn);
+extern void memory_present_with_active_regions(int nid);
+#endif
extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long);
extern void setup_per_zone_pages_min(void);
extern void mem_init(void);
diff -rup -X /usr/src/patchset-0.5/bin//dontdiff linux-2.6.17-rc1-clean/include/linux/mmzone.h linux-2.6.17-rc1-101-add_free_area_init_nodes/include/linux/mmzone.h
--- linux-2.6.17-rc1-clean/include/linux/mmzone.h 2006-04-03 04:22:10.000000000 +0100
+++ linux-2.6.17-rc1-101-add_free_area_init_nodes/include/linux/mmzone.h 2006-04-12 20:02:10.000000000 +0100
@@ -271,6 +271,18 @@ struct zonelist {
struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited
};
+#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
+/*
+ * This represents an active range of physical memory. Architectures register
+ * a pfn range using add_active_range() and later initialise the nodes and
+ * free list with free_area_init_nodes()
+ */
+struct node_active_region {
+ unsigned long start_pfn;
+ unsigned long end_pfn;
+ int nid;
+};
+#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */
/*
* The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
@@ -465,7 +477,8 @@ extern struct zone *next_zone(struct zon
#endif
-#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
+#if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \
+ !defined(CONFIG_ARCH_POPULATES_NODE_MAP)
#define early_pfn_to_nid(nid) (0UL)
#endif
diff -rup -X /usr/src/patchset-0.5/bin//dontdiff linux-2.6.17-rc1-clean/mm/page_alloc.c linux-2.6.17-rc1-101-add_free_area_init_nodes/mm/page_alloc.c
--- linux-2.6.17-rc1-clean/mm/page_alloc.c 2006-04-03 04:22:10.000000000 +0100
+++ linux-2.6.17-rc1-101-add_free_area_init_nodes/mm/page_alloc.c 2006-04-12 21:03:59.000000000 +0100
@@ -37,6 +37,8 @@
#include <linux/nodemask.h>
#include <linux/vmalloc.h>
#include <linux/mempolicy.h>
+#include <linux/sort.h>
+#include <linux/pfn.h>
#include <asm/tlbflush.h>
#include "internal.h"
@@ -84,6 +86,18 @@ int min_free_kbytes = 1024;
unsigned long __initdata nr_kernel_pages;
unsigned long __initdata nr_all_pages;
+#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
+ #ifdef CONFIG_MAX_ACTIVE_REGIONS
+ #define MAX_ACTIVE_REGIONS CONFIG_MAX_ACTIVE_REGIONS
+ #else
+ #define MAX_ACTIVE_REGIONS (MAX_NR_ZONES * MAX_NUMNODES + 1)
+ #endif
+
+ struct node_active_region __initdata early_node_map[MAX_ACTIVE_REGIONS];
+ unsigned long __initdata arch_zone_lowest_possible_pfn[MAX_NR_ZONES];
+ unsigned long __initdata arch_zone_highest_possible_pfn[MAX_NR_ZONES];
+#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */
+
#ifdef CONFIG_DEBUG_VM
static int page_outside_zone_boundaries(struct zone *zone, struct page *page)
{
@@ -1743,25 +1757,6 @@ static inline unsigned long wait_table_b
#define LONG_ALIGN(x) (((x)+(sizeof(long))-1)&~((sizeof(long))-1))
-static void __init calculate_zone_totalpages(struct pglist_data *pgdat,
- unsigned long *zones_size, unsigned long *zholes_size)
-{
- unsigned long realtotalpages, totalpages = 0;
- int i;
-
- for (i = 0; i < MAX_NR_ZONES; i++)
- totalpages += zones_size[i];
- pgdat->node_spanned_pages = totalpages;
-
- realtotalpages = totalpages;
- if (zholes_size)
- for (i = 0; i < MAX_NR_ZONES; i++)
- realtotalpages -= zholes_size[i];
- pgdat->node_present_pages = realtotalpages;
- printk(KERN_DEBUG "On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages);
-}
-
-
/*
* Initially all pages are reserved - free ones are freed
* up by free_all_bootmem() once the early boot process is
@@ -2048,6 +2043,200 @@ static __meminit void init_currently_emp
zone_init_free_lists(pgdat, zone, zone->spanned_pages);
}
+#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
+static int __init first_active_region_index_in_nid(int nid)
+{
+ int i;
+ for (i = 0; early_node_map[i].end_pfn; i++) {
+ if (early_node_map[i].nid == nid)
+ return i;
+ }
+
+ return MAX_ACTIVE_REGIONS;
+}
+
+static int __init next_active_region_index_in_nid(unsigned int index, int nid)
+{
+ for (index = index + 1; early_node_map[index].end_pfn; index++) {
+ if (early_node_map[index].nid == nid)
+ return index;
+ }
+
+ return MAX_ACTIVE_REGIONS;
+}
+
+#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
+int __init early_pfn_to_nid(unsigned long pfn)
+{
+ int i;
+
+ for (i = 0; early_node_map[i].end_pfn; i++) {
+ unsigned long start_pfn = early_node_map[i].start_pfn;
+ unsigned long end_pfn = early_node_map[i].end_pfn;
+
+ if ((start_pfn <= pfn) && (pfn < end_pfn))
+ return early_node_map[i].nid;
+ }
+
+ return -1;
+}
+#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
+
+#define for_each_active_range_index_in_nid(i, nid) \
+ for (i = first_active_region_index_in_nid(nid); \
+ i != MAX_ACTIVE_REGIONS; \
+ i = next_active_region_index_in_nid(i, nid))
+
+void __init free_bootmem_with_active_regions(int nid,
+ unsigned long max_low_pfn)
+{
+ unsigned int i;
+ for_each_active_range_index_in_nid(i, nid) {
+ unsigned long size_pages = 0;
+ unsigned long end_pfn = early_node_map[i].end_pfn;
+ if (early_node_map[i].start_pfn >= max_low_pfn)
+ continue;
+
+ if (end_pfn > max_low_pfn)
+ end_pfn = max_low_pfn;
+
+ size_pages = end_pfn - early_node_map[i].start_pfn;
+ free_bootmem_node(NODE_DATA(early_node_map[i].nid),
+ PFN_PHYS(early_node_map[i].start_pfn),
+ PFN_PHYS(size_pages));
+ }
+}
+
+void __init memory_present_with_active_regions(int nid)
+{
+ unsigned int i;
+ for_each_active_range_index_in_nid(i, nid)
+ memory_present(early_node_map[i].nid,
+ early_node_map[i].start_pfn,
+ early_node_map[i].end_pfn);
+}
+
+void __init get_pfn_range_for_nid(unsigned int nid,
+ unsigned long *start_pfn, unsigned long *end_pfn)
+{
+ unsigned int i;
+ *start_pfn = -1UL;
+ *end_pfn = 0;
+
+ for_each_active_range_index_in_nid(i, nid) {
+ if (early_node_map[i].start_pfn < *start_pfn)
+ *start_pfn = early_node_map[i].start_pfn;
+
+ if (early_node_map[i].end_pfn > *end_pfn)
+ *end_pfn = early_node_map[i].end_pfn;
+ }
+
+ if (*start_pfn == -1UL) {
+ printk(KERN_WARNING "Node %u active with no memory\n", nid);
+ *start_pfn = 0;
+ }
+}
+
+unsigned long __init zone_present_pages_in_node(int nid,
+ unsigned long zone_type,
+ unsigned long *ignored)
+{
+ unsigned long node_start_pfn, node_end_pfn;
+ unsigned long zone_start_pfn, zone_end_pfn;
+
+ /* Get the start and end of the node and zone */
+ get_pfn_range_for_nid(nid, &node_start_pfn, &node_end_pfn);
+ zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
+ zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
+
+ /* Check that this node has pages within the zone's required range */
+ if (zone_end_pfn < node_start_pfn || zone_start_pfn > node_end_pfn)
+ return 0;
+
+ /* Move the zone boundaries inside the node if necessary */
+ if (zone_end_pfn > node_end_pfn)
+ zone_end_pfn = node_end_pfn;
+ if (zone_start_pfn < node_start_pfn)
+ zone_start_pfn = node_start_pfn;
+
+ /* Return the spanned pages */
+ return zone_end_pfn - zone_start_pfn;
+}
+
+unsigned long __init zone_absent_pages_in_node(int nid,
+ unsigned long zone_type,
+ unsigned long *ignored)
+{
+ int i = 0;
+ unsigned long prev_end_pfn = 0, hole_pages = 0;
+ unsigned long start_pfn;
+
+ /* Find the end_pfn of the first active range of pfns in the node */
+ i = first_active_region_index_in_nid(nid);
+ prev_end_pfn = early_node_map[i].start_pfn;
+
+ /* Find all holes for the zone within the node */
+ for (; i != MAX_ACTIVE_REGIONS;
+ i = next_active_region_index_in_nid(i, nid)) {
+
+ /* No need to continue if prev_end_pfn is outside the zone */
+ if (prev_end_pfn >= arch_zone_highest_possible_pfn[zone_type])
+ break;
+
+ /* Make sure the end of the zone is not within the hole */
+ start_pfn = early_node_map[i].start_pfn;
+ if (start_pfn > arch_zone_highest_possible_pfn[zone_type])
+ start_pfn = arch_zone_highest_possible_pfn[zone_type];
+ BUG_ON(prev_end_pfn > start_pfn);
+
+ /* Update the hole size cound and move on */
+ hole_pages += start_pfn - prev_end_pfn;
+ prev_end_pfn = early_node_map[i].end_pfn;
+ }
+
+ return hole_pages;
+}
+#else
+static inline unsigned long zone_present_pages_in_node(int nid,
+ unsigned long zone_type,
+ unsigned long *zones_size)
+{
+ return zones_size[zone_type];
+}
+
+static inline unsigned long zone_absent_pages_in_node(int nid,
+ unsigned long zone_type,
+ unsigned long *zholes_size)
+{
+ if (!zholes_size)
+ return 0;
+
+ return zholes_size[zone_type];
+}
+#endif
+
+static void __init calculate_node_totalpages(struct pglist_data *pgdat,
+ unsigned long *zones_size, unsigned long *zholes_size)
+{
+ unsigned long realtotalpages, totalpages = 0;
+ int i;
+
+ for (i = 0; i < MAX_NR_ZONES; i++) {
+ totalpages += zone_present_pages_in_node(pgdat->node_id, i,
+ zones_size);
+ }
+ pgdat->node_spanned_pages = totalpages;
+
+ realtotalpages = totalpages;
+ for (i = 0; i < MAX_NR_ZONES; i++) {
+ realtotalpages -=
+ zone_absent_pages_in_node(pgdat->node_id, i, zholes_size);
+ }
+ pgdat->node_present_pages = realtotalpages;
+ printk(KERN_DEBUG "On node %d totalpages: %lu\n", pgdat->node_id,
+ realtotalpages);
+}
+
/*
* Set up the zone data structures:
* - mark all pages reserved
@@ -2070,10 +2259,9 @@ static void __init free_area_init_core(s
struct zone *zone = pgdat->node_zones + j;
unsigned long size, realsize;
- realsize = size = zones_size[j];
- if (zholes_size)
- realsize -= zholes_size[j];
-
+ size = zone_present_pages_in_node(nid, j, zones_size);
+ realsize = size - zone_absent_pages_in_node(nid, j,
+ zholes_size);
if (j < ZONE_HIGHMEM)
nr_kernel_pages += realsize;
nr_all_pages += realsize;
@@ -2140,13 +2328,140 @@ void __init free_area_init_node(int nid,
{
pgdat->node_id = nid;
pgdat->node_start_pfn = node_start_pfn;
- calculate_zone_totalpages(pgdat, zones_size, zholes_size);
+ calculate_node_totalpages(pgdat, zones_size, zholes_size);
alloc_node_mem_map(pgdat);
free_area_init_core(pgdat, zones_size, zholes_size);
}
+#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
+void __init add_active_range(unsigned int nid, unsigned long start_pfn,
+ unsigned long end_pfn)
+{
+ unsigned int i;
+
+ /* Merge with existing active regions if possible */
+ for (i = 0; early_node_map[i].end_pfn; i++) {
+ if (early_node_map[i].nid != nid)
+ continue;
+
+ /* Merge forward if suitable */
+ if (start_pfn <= early_node_map[i].end_pfn &&
+ end_pfn > early_node_map[i].end_pfn) {
+ early_node_map[i].end_pfn = end_pfn;
+ return;
+ }
+
+ /* Merge backward if suitable */
+ if (start_pfn < early_node_map[i].end_pfn &&
+ end_pfn >= early_node_map[i].start_pfn) {
+ early_node_map[i].start_pfn = start_pfn;
+ return;
+ }
+ }
+
+ /*
+ * Leave last entry NULL so we dont iterate off the end (we use
+ * entry.end_pfn to terminate the walk).
+ */
+ if (i >= MAX_ACTIVE_REGIONS - 1) {
+ printk(KERN_ERR "WARNING: too many memory regions in "
+ "numa code, truncating\n");
+ return;
+ }
+
+ early_node_map[i].nid = nid;
+ early_node_map[i].start_pfn = start_pfn;
+ early_node_map[i].end_pfn = end_pfn;
+}
+
+/* Compare two active node_active_regions */
+static int __init cmp_node_active_region(const void *a, const void *b)
+{
+ struct node_active_region *arange = (struct node_active_region *)a;
+ struct node_active_region *brange = (struct node_active_region *)b;
+
+ /* Done this way to avoid overflows */
+ if (arange->start_pfn > brange->start_pfn)
+ return 1;
+ if (arange->start_pfn < brange->start_pfn)
+ return -1;
+
+ return 0;
+}
+
+/* sort the node_map by start_pfn */
+static void __init sort_node_map(void)
+{
+ size_t num = 0;
+ while (early_node_map[num].end_pfn)
+ num++;
+
+ sort(early_node_map, num, sizeof(struct node_active_region),
+ cmp_node_active_region, NULL);
+}
+
+unsigned long __init find_min_pfn(void)
+{
+ int i;
+ unsigned long min_pfn = -1UL;
+
+ for (i = 0; early_node_map[i].end_pfn; i++) {
+ if (early_node_map[i].start_pfn < min_pfn)
+ min_pfn = early_node_map[i].start_pfn;
+ }
+
+ return min_pfn;
+}
+
+/* Find the lowest pfn in a node. This depends on a sorted early_node_map */
+unsigned long __init find_start_pfn_for_node(unsigned long nid)
+{
+ int i;
+
+ /* Assuming a sorted map, the first range found has the starting pfn */
+ for_each_active_range_index_in_nid(i, nid) {
+ return early_node_map[i].start_pfn;
+ }
+
+ /* nid does not exist in early_node_map */
+ printk(KERN_WARNING "Could not find start_pfn for node %lu\n", nid);
+ return 0;
+}
+
+void __init free_area_init_nodes(unsigned long arch_max_dma_pfn,
+ unsigned long arch_max_dma32_pfn,
+ unsigned long arch_max_low_pfn,
+ unsigned long arch_max_high_pfn)
+{
+ unsigned long nid;
+
+ /* Record where the zone boundaries are */
+ memset(arch_zone_lowest_possible_pfn, 0,
+ sizeof(arch_zone_lowest_possible_pfn));
+ memset(arch_zone_highest_possible_pfn, 0,
+ sizeof(arch_zone_highest_possible_pfn));
+ arch_zone_lowest_possible_pfn[ZONE_DMA] = find_min_pfn();
+ arch_zone_highest_possible_pfn[ZONE_DMA] = arch_max_dma_pfn;
+ arch_zone_lowest_possible_pfn[ZONE_DMA32] = arch_max_dma_pfn;
+ arch_zone_highest_possible_pfn[ZONE_DMA32] = arch_max_dma32_pfn;
+ arch_zone_lowest_possible_pfn[ZONE_NORMAL] = arch_max_dma32_pfn;
+ arch_zone_highest_possible_pfn[ZONE_NORMAL] = arch_max_low_pfn;
+ arch_zone_lowest_possible_pfn[ZONE_HIGHMEM] = arch_max_low_pfn;
+ arch_zone_highest_possible_pfn[ZONE_HIGHMEM] = arch_max_high_pfn;
+
+ /* Regions in the early_node_map can be in any order */
+ sort_node_map();
+
+ for_each_online_node(nid) {
+ pg_data_t *pgdat = NODE_DATA(nid);
+ free_area_init_node(nid, pgdat, NULL,
+ find_start_pfn_for_node(nid), NULL);
+ }
+}
+#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */
+
#ifndef CONFIG_NEED_MULTIPLE_NODES
static bootmem_data_t contig_bootmem_data;
struct pglist_data contig_page_data = { .bdata = &contig_bootmem_data };
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox