forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'x86_misc_for_v5.16_rc1' of git://git.kernel.org/pub/scm/li…
…nux/kernel/git/tip/tip Pull misc x86 changes from Borislav Petkov: - Use the proper interface for the job: get_unaligned() instead of memcpy() in the insn decoder - A randconfig build fix * tag 'x86_misc_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/insn: Use get_unaligned() instead of memcpy() x86/Kconfig: Fix an unused variable error in dell-smm-hwmon
- Loading branch information
Showing
5 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
/* | ||
* Copied from the kernel sources to tools/perf/: | ||
*/ | ||
|
||
#ifndef __TOOLS_LINUX_ASM_GENERIC_UNALIGNED_H | ||
#define __TOOLS_LINUX_ASM_GENERIC_UNALIGNED_H | ||
|
||
#define __get_unaligned_t(type, ptr) ({ \ | ||
const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ | ||
__pptr->x; \ | ||
}) | ||
|
||
#define __put_unaligned_t(type, val, ptr) do { \ | ||
struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ | ||
__pptr->x = (val); \ | ||
} while (0) | ||
|
||
#define get_unaligned(ptr) __get_unaligned_t(typeof(*(ptr)), (ptr)) | ||
#define put_unaligned(val, ptr) __put_unaligned_t(typeof(*(ptr)), (val), (ptr)) | ||
|
||
#endif /* __TOOLS_LINUX_ASM_GENERIC_UNALIGNED_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters