linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: Allow SPARSEMEM on multiplatform build
@ 2015-06-05  1:58 Gregory Fong
  2015-06-05  1:58 ` [PATCH 1/3] ARM: Add default SPARSEMEM settings Gregory Fong
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Gregory Fong @ 2015-06-05  1:58 UTC (permalink / raw)
  To: linux-arm-kernel

This is based on the changeset submitted by Kevin Cernekee last September:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/286835.html

The changes I have made are:
- update commit messages per review comments from Arnd and Russell
- change to allow FLATMEM or SPARSEMEM on all multiplatform builds, not just
  multi-v7

Gregory Fong (1):
  ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build

Kevin Cernekee (2):
  ARM: Add default SPARSEMEM settings
  ARM: Remove redundant ARCH_SPARSEMEM_DEFAULT setting

 arch/arm/Kconfig                 | 8 +++++---
 arch/arm/include/asm/sparsemem.h | 7 ++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 1/3] ARM: Add default SPARSEMEM settings
@ 2014-09-12  2:22 Kevin Cernekee
  2014-10-31 20:11 ` Gregory Fong
  2014-10-31 21:00 ` Russell King - ARM Linux
  0 siblings, 2 replies; 13+ messages in thread
From: Kevin Cernekee @ 2014-09-12  2:22 UTC (permalink / raw)
  To: linux-arm-kernel

We can still override these settings via mach/memory.h, but let's provide
sensible defaults so that SPARSEMEM is available in the multiplatform
kernels.

Two platforms currently use SECTION_SIZE_BITS < 28, but are expected to
work with 28 (albeit slightly less efficiently if not all banks are
populated):

 - mach-rpc: uses 26 bits.  Based on mach/hardware.h it looks like this
   platform puts RAM@0x1000_0000 - 0x1fff_ffff, and I/O below
   0x1000_0000.

 - mach-sa1100: uses 27 bits.  mach/memory.h indicates that RAM occupies
   the entire range of 0xc000_0000 - 0xdfff_ffff.

Several platforms need MAX_PHYSMEM_BITS >= 36 so we'll pick that as the
minimum.  Anything higher and we'll fail the SECTIONS_WIDTH + NODES_WIDTH +
ZONES_WIDTH test in <linux/mm.h>.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
---
 arch/arm/include/asm/sparsemem.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/sparsemem.h b/arch/arm/include/asm/sparsemem.h
index 0009861..73e5e85 100644
--- a/arch/arm/include/asm/sparsemem.h
+++ b/arch/arm/include/asm/sparsemem.h
@@ -15,10 +15,11 @@
  * Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000,
  * then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26.
  *
- * Define these in your mach/memory.h.
+ * These can be overridden in your mach/memory.h.
  */
-#if !defined(SECTION_SIZE_BITS) || !defined(MAX_PHYSMEM_BITS)
-#error Sparsemem is not supported on this platform
+#if !defined(MAX_PHYSMEM_BITS) || !defined(SECTION_SIZE_BITS)
+#define MAX_PHYSMEM_BITS	36
+#define SECTION_SIZE_BITS	28
 #endif
 
 #endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-06-17 19:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05  1:58 [PATCH 0/3] ARM: Allow SPARSEMEM on multiplatform build Gregory Fong
2015-06-05  1:58 ` [PATCH 1/3] ARM: Add default SPARSEMEM settings Gregory Fong
2015-06-05  1:58 ` [PATCH 2/3] ARM: Remove redundant ARCH_SPARSEMEM_DEFAULT setting Gregory Fong
2015-06-05 12:23   ` Arnd Bergmann
2015-06-05  1:58 ` [PATCH 3/3] ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build Gregory Fong
2015-06-05 12:26   ` Arnd Bergmann
2015-06-05 19:27     ` Gregory Fong
2015-06-16 23:08 ` [PATCH 0/3] ARM: Allow SPARSEMEM on " Gregory Fong
2015-06-17 19:00 ` Stephen Boyd
  -- strict thread matches above, loose matches on Subject: below --
2014-09-12  2:22 [PATCH 1/3] ARM: Add default SPARSEMEM settings Kevin Cernekee
2014-10-31 20:11 ` Gregory Fong
2014-10-31 20:47   ` Arnd Bergmann
2014-10-31 21:00 ` Russell King - ARM Linux

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).