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

Commit 01ed58ab authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'x86/mem' into perf/core



Merge reason: memcpy_64.S changes an assumption perf bench has, so merge this
              here so we can fix it.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parents af2d03d4 26afb7c6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -15,4 +15,13 @@
	.endm
#endif

.macro altinstruction_entry orig alt feature orig_len alt_len
	.align 8
	.quad \orig
	.quad \alt
	.word \feature
	.byte \orig_len
	.byte \alt_len
.endm

#endif  /*  __ASSEMBLY__  */
+1 −0
Original line number Diff line number Diff line
@@ -195,6 +195,7 @@

/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
#define X86_FEATURE_FSGSBASE	(9*32+ 0) /* {RD/WR}{FS/GS}BASE instructions*/
#define X86_FEATURE_ERMS	(9*32+ 9) /* Enhanced REP MOVSB/STOSB */

#if defined(__KERNEL__) && !defined(__ASSEMBLY__)

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
 * Returns 0 if the range is valid, nonzero otherwise.
 *
 * This is equivalent to the following test:
 * (u33)addr + (u33)size >= (u33)current->addr_limit.seg (u65 for x86_64)
 * (u33)addr + (u33)size > (u33)current->addr_limit.seg (u65 for x86_64)
 *
 * This needs 33-bit (65-bit for x86_64) arithmetic. We have a carry...
 */
+9 −0
Original line number Diff line number Diff line
@@ -210,6 +210,15 @@ void __init_or_module apply_alternatives(struct alt_instr *start,
	u8 insnbuf[MAX_PATCH_LEN];

	DPRINTK("%s: alt table %p -> %p\n", __func__, start, end);
	/*
	 * The scan order should be from start to end. A later scanned
	 * alternative code can overwrite a previous scanned alternative code.
	 * Some kernel functions (e.g. memcpy, memset, etc) use this order to
	 * patch code.
	 *
	 * So be careful if you want to change the scan order to any other
	 * order.
	 */
	for (a = start; a < end; a++) {
		u8 *instr = a->instr;
		BUG_ON(a->replacementlen > a->instrlen);
+1 −2
Original line number Diff line number Diff line
@@ -565,7 +565,6 @@ void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)

		cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx);

		if (eax > 0)
		c->x86_capability[9] = ebx;
	}

Loading