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

Commit aaa7be48 authored by James Hogan's avatar James Hogan Committed by Ralf Baechle
Browse files

MIPS: Probe for small (1KiB) page support



Probe Config3 for small page support. This will be useful to give clues
as to whether the PageGrain register exists.

Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10722/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 3c865dd9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -411,4 +411,8 @@
# define cpu_has_cdmm		(cpu_data[0].options & MIPS_CPU_CDMM)
#endif

#ifndef cpu_has_small_pages
# define cpu_has_small_pages	(cpu_data[0].options & MIPS_CPU_SP)
#endif

#endif /* __ASM_CPU_FEATURES_H */
+1 −0
Original line number Diff line number Diff line
@@ -384,6 +384,7 @@ enum cpu_type_enum {
#define MIPS_CPU_XPA		0x2000000000ull /* CPU supports Extended Physical Addressing */
#define MIPS_CPU_CDMM		0x4000000000ull	/* CPU has Common Device Memory Map */
#define MIPS_CPU_BP_GHIST	0x8000000000ull /* R12K+ Branch Prediction Global History */
#define MIPS_CPU_SP		0x10000000000ull /* Small (1KB) page support */

/*
 * CPU ASE encodings
+2 −0
Original line number Diff line number Diff line
@@ -538,6 +538,8 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
	}
	if (config3 & MIPS_CONF3_CDMM)
		c->options |= MIPS_CPU_CDMM;
	if (config3 & MIPS_CONF3_SP)
		c->options |= MIPS_CPU_SP;

	return config3 & MIPS_CONF_M;
}