Re: lmb: Remove __init from lmb_end_of_DRAM()

2009-08-28 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 19:59 +, Linux Kernel Mailing List wrote:
 Gitweb: 
 http://git.kernel.org/linus/4f8ee2c9cc0e885d2bb50ef26db66150ab25213e
 Commit: 4f8ee2c9cc0e885d2bb50ef26db66150ab25213e
 Parent: cf481442f2e086316ed8a1b3046f00ad23632ac4
 Author: Benjamin Herrenschmidt b...@kernel.crashing.org
 AuthorDate: Thu Aug 27 17:20:30 2009 +1000
 Committer:  Linus Torvalds torva...@linux-foundation.org
 CommitDate: Thu Aug 27 12:25:26 2009 -0700
 
 lmb: Remove __init from lmb_end_of_DRAM()
 
 We call lmb_end_of_DRAM() to test whether a DMA mask is ok on a machine
 without IOMMU, but this function is marked as __init.
 
 I don't think there's a clean way to get the top of RAM max_pfn doesn't
 appear to include highmem or I missed (or we have a bug :-) so for now,
 let's just avoid having a broken 2.6.31 by making this function
 non-__init and we can revisit later.

And another brown paper bag for me ! Patch is fine, but doesn't do the
job because some idiot (me) didn't actually test (it looked so obvious)
and didn't notice somebody had the strange idea to also put __init on
the declaration in the .h file ! Ugh.

I'll send another patch later, have to run home now.

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] lmb: Remove __init from lmb_end_of_DRAM()

2009-08-27 Thread Benjamin Herrenschmidt
We call lmb_end_of_DRAM() to test whether a DMA mask
is ok on a machine without IOMMU, but this function is
marked as __init.

I don't think there's a clean way to get the top of RAM
max_pfn doesn't appear to include highmem or I missed
(or we have a bug :-) so for now, let's just avoid having
a broken 2.6.31 by making this function non-__init and we
can revisit later.

Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org
---

David, you use lmb too, any objection there ?

diff --git a/lib/lmb.c b/lib/lmb.c
index e4a6482..0343c05 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -429,7 +429,7 @@ u64 __init lmb_phys_mem_size(void)
return lmb.memory.size;
 }
 
-u64 __init lmb_end_of_DRAM(void)
+u64 lmb_end_of_DRAM(void)
 {
int idx = lmb.memory.cnt - 1;
 



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev