diff options
-rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch | 52 | ||||
-rw-r--r-- | meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch b/meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch new file mode 100644 index 000000000..f3316aa26 --- /dev/null +++ b/meta-oe/recipes-bsp/flashrom/flashrom/0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 3334dd4e9fc34c79c3925c3c24869939d8955f21 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rosen Penev <rosenp@gmail.com> | ||
3 | Date: Sat, 18 Jul 2020 12:16:00 -0700 | ||
4 | Subject: [PATCH] hwaccess: use __asm__ as is done elsewhere | ||
5 | |||
6 | Fixes compilation under powerpc platform. Made the change for the SPARC | ||
7 | platform as well. | ||
8 | |||
9 | ../hwaccess.c: In function 'sync_primitive': | ||
10 | ../hwaccess.c:74:2: warning: implicit declaration of function 'asm' | ||
11 | [-Wimplicit-function-declaration] | ||
12 | 74 | asm("eieio" : : : "memory"); | ||
13 | | ^~~ | ||
14 | ../hwaccess.c:74:13: error: expected ')' before ':' token | ||
15 | 74 | asm("eieio" : : : "memory"); | ||
16 | |||
17 | Upstream-Status: Submitted [https://github.com/flashrom/flashrom/pull/155] | ||
18 | Signed-off-by: Rosen Penev <rosenp@gmail.com> | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | hwaccess.c | 6 +++--- | ||
22 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
23 | |||
24 | diff --git a/hwaccess.c b/hwaccess.c | ||
25 | index 48ccb34..2a39989 100644 | ||
26 | --- a/hwaccess.c | ||
27 | +++ b/hwaccess.c | ||
28 | @@ -71,18 +71,18 @@ static inline void sync_primitive(void) | ||
29 | * See also https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/memory-barriers.txt | ||
30 | */ | ||
31 | #if IS_PPC // cf. http://lxr.free-electrons.com/source/arch/powerpc/include/asm/barrier.h | ||
32 | - asm("eieio" : : : "memory"); | ||
33 | + __asm__ ("eieio" : : : "memory"); | ||
34 | #elif IS_SPARC | ||
35 | #if defined(__sparc_v9__) || defined(__sparcv9) | ||
36 | /* Sparc V9 CPUs support three different memory orderings that range from x86-like TSO to PowerPC-like | ||
37 | * RMO. The modes can be switched at runtime thus to make sure we maintain the right order of access we | ||
38 | * use the strongest hardware memory barriers that exist on Sparc V9. */ | ||
39 | - asm volatile ("membar #Sync" ::: "memory"); | ||
40 | + __asm__ volatile ("membar #Sync" ::: "memory"); | ||
41 | #elif defined(__sparc_v8__) || defined(__sparcv8) | ||
42 | /* On SPARC V8 there is no RMO just PSO and that does not apply to I/O accesses... but if V8 code is run | ||
43 | * on V9 CPUs it might apply... or not... we issue a write barrier anyway. That's the most suitable | ||
44 | * operation in the V8 instruction set anyway. If you know better then please tell us. */ | ||
45 | - asm volatile ("stbar"); | ||
46 | + __asm__ volatile ("stbar"); | ||
47 | #else | ||
48 | #error Unknown and/or unsupported SPARC instruction set version detected. | ||
49 | #endif | ||
50 | -- | ||
51 | 2.32.0 | ||
52 | |||
diff --git a/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb b/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb index 145a3cad0..1d0613214 100644 --- a/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb +++ b/meta-oe/recipes-bsp/flashrom/flashrom_1.2.bb | |||
@@ -7,6 +7,7 @@ SRC_URI = "https://download.flashrom.org/releases/flashrom-v${PV}.tar.bz2 \ | |||
7 | file://0001-typecast-enum-conversions-explicitly.patch \ | 7 | file://0001-typecast-enum-conversions-explicitly.patch \ |
8 | file://meson-fixes.patch \ | 8 | file://meson-fixes.patch \ |
9 | file://0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch \ | 9 | file://0001-flashrom-Mark-RISCV-as-non-memory-mapped-I-O-archite.patch \ |
10 | file://0001-hwaccess-use-__asm__-as-is-done-elsewhere.patch \ | ||
10 | " | 11 | " |
11 | SRC_URI[md5sum] = "7f8e4b87087eb12ecee0fcc5445b4956" | 12 | SRC_URI[md5sum] = "7f8e4b87087eb12ecee0fcc5445b4956" |
12 | SRC_URI[sha256sum] = "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b" | 13 | SRC_URI[sha256sum] = "e1f8d95881f5a4365dfe58776ce821dfcee0f138f75d0f44f8a3cd032d9ea42b" |