Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66dfe181 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: Add support for 16kB PAGE_SIZE.



16kB is a useful size on nommu, while 64kB still tends to be too big to
be useful. Newer MMUs are likely to support this as well, so plug it
in in anticipation of those, too.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 74fcc779
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,12 @@ config PAGE_SIZE_8KB
	help
	help
	  This enables 8kB pages as supported by SH-X2 and later MMUs.
	  This enables 8kB pages as supported by SH-X2 and later MMUs.


config PAGE_SIZE_16KB
	bool "16kB"
	depends on !MMU
	help
	  This enables 16kB pages on MMU-less SH systems.

config PAGE_SIZE_64KB
config PAGE_SIZE_64KB
	bool "64kB"
	bool "64kB"
	depends on !MMU || CPU_SH4 || CPU_SH5
	depends on !MMU || CPU_SH4 || CPU_SH5
+2 −0
Original line number Original line Diff line number Diff line
@@ -12,6 +12,8 @@
# define PAGE_SHIFT	12
# define PAGE_SHIFT	12
#elif defined(CONFIG_PAGE_SIZE_8KB)
#elif defined(CONFIG_PAGE_SIZE_8KB)
# define PAGE_SHIFT	13
# define PAGE_SHIFT	13
#elif defined(CONFIG_PAGE_SIZE_16KB)
# define PAGE_SHIFT	14
#elif defined(CONFIG_PAGE_SIZE_64KB)
#elif defined(CONFIG_PAGE_SIZE_64KB)
# define PAGE_SHIFT	16
# define PAGE_SHIFT	16
#else
#else
+3 −1
Original line number Original line Diff line number Diff line
@@ -102,7 +102,9 @@
#define _PAGE_FLAGS_HARDWARE_MASK	(PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS))
#define _PAGE_FLAGS_HARDWARE_MASK	(PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS))


/* Hardware flags, page size encoding */
/* Hardware flags, page size encoding */
#if defined(CONFIG_X2TLB)
#if !defined(CONFIG_MMU)
# define _PAGE_FLAGS_HARD	0ULL
#elif defined(CONFIG_X2TLB)
# if defined(CONFIG_PAGE_SIZE_4KB)
# if defined(CONFIG_PAGE_SIZE_4KB)
#  define _PAGE_FLAGS_HARD	_PAGE_EXT(_PAGE_EXT_ESZ0)
#  define _PAGE_FLAGS_HARD	_PAGE_EXT(_PAGE_EXT_ESZ0)
# elif defined(CONFIG_PAGE_SIZE_8KB)
# elif defined(CONFIG_PAGE_SIZE_8KB)
+2 −0
Original line number Original line Diff line number Diff line
@@ -38,6 +38,8 @@ struct thread_info {
#define THREAD_SIZE_ORDER	(1)
#define THREAD_SIZE_ORDER	(1)
#elif defined(CONFIG_PAGE_SIZE_8KB)
#elif defined(CONFIG_PAGE_SIZE_8KB)
#define THREAD_SIZE_ORDER	(1)
#define THREAD_SIZE_ORDER	(1)
#elif defined(CONFIG_PAGE_SIZE_16KB)
#define THREAD_SIZE_ORDER	(0)
#elif defined(CONFIG_PAGE_SIZE_64KB)
#elif defined(CONFIG_PAGE_SIZE_64KB)
#define THREAD_SIZE_ORDER	(0)
#define THREAD_SIZE_ORDER	(0)
#else
#else