linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* early_memtest() patterns
@ 2019-03-26  8:09 Anshuman Khandual
  2019-03-26  8:40 ` Michal Hocko
  2019-03-26 13:54 ` Mike Rapoport
  0 siblings, 2 replies; 4+ messages in thread
From: Anshuman Khandual @ 2019-03-26  8:09 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Michal Hocko, Dave Hansen, Vladimir Murzin,
	Tony Luck, Dan Williams

Hello,

early_memtest() is being executed on many platforms even though they dont enable
CONFIG_MEMTEST by default. Just being curious how the following set of patterns
got decided. Are they just random 64 bit patterns ? Or there is some particular
significance to them in detecting bad memory.

static u64 patterns[] __initdata = {
        /* The first entry has to be 0 to leave memtest with zeroed memory */
        0,
        0xffffffffffffffffULL,
        0x5555555555555555ULL,
        0xaaaaaaaaaaaaaaaaULL,
        0x1111111111111111ULL,
        0x2222222222222222ULL,
        0x4444444444444444ULL,
        0x8888888888888888ULL,
        0x3333333333333333ULL,
        0x6666666666666666ULL,
        0x9999999999999999ULL,
        0xccccccccccccccccULL,
        0x7777777777777777ULL,
        0xbbbbbbbbbbbbbbbbULL,
        0xddddddddddddddddULL,
        0xeeeeeeeeeeeeeeeeULL,
        0x7a6c7258554e494cULL, /* yeah ;-) */
};

BTW what about the last one here. Most of them got moved from x86 through the
commit 63823126c221dd ("x86: memtest: add additional (regular) test patterns").

- Anshuman


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

end of thread, other threads:[~2019-03-27 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26  8:09 early_memtest() patterns Anshuman Khandual
2019-03-26  8:40 ` Michal Hocko
2019-03-26 13:54 ` Mike Rapoport
2019-03-27 11:21   ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox