From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: <dev@dpdk.org>
Cc: david.hunt@intel.com, "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: [dpdk-dev] [PATCH] power: fix struct cache line-alignment issues
Date: Sun, 5 May 2019 20:12:16 +0200 [thread overview]
Message-ID: <20190505181216.30192-1-mattias.ronnblom@ericsson.com> (raw)
Message-ID: <20190505181216.FbB1wJ6MPttASrTIKfLEVgCaDdHEUEklSbZbpLeeBoQ@z> (raw)
The ACPI and PState CPU frequency scaling drivers used the
__rte_cache_aligned attribute without including rte_memory.h, which
turns what looks as the declaration of a cache line-aligned struct
into a non-aligned struct declaration and the definition of an
instance of the struct.
Fixes: e6c6dc0f96 ("power: add p-state driver compatibility")
Fixes: 445c6528b5 ("power: common interface for guest and host")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
lib/librte_power/power_acpi_cpufreq.c | 5 +++--
lib/librte_power/power_pstate_cpufreq.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
index 5672c594e..7c386f891 100644
--- a/lib/librte_power/power_acpi_cpufreq.c
+++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -12,9 +12,10 @@
#include <signal.h>
#include <limits.h>
-#include <rte_string_fns.h>
-#include <rte_memcpy.h>
#include <rte_atomic.h>
+#include <rte_memcpy.h>
+#include <rte_memory.h>
+#include <rte_string_fns.h>
#include "power_acpi_cpufreq.h"
#include "power_common.h"
diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c
index c2c4e8e14..30727f04b 100644
--- a/lib/librte_power/power_pstate_cpufreq.c
+++ b/lib/librte_power/power_pstate_cpufreq.c
@@ -14,9 +14,10 @@
#include <errno.h>
#include <inttypes.h>
-#include <rte_string_fns.h>
-#include <rte_memcpy.h>
#include <rte_atomic.h>
+#include <rte_memcpy.h>
+#include <rte_memory.h>
+#include <rte_string_fns.h>
#include "power_pstate_cpufreq.h"
#include "power_common.h"
--
2.17.1
next reply other threads:[~2019-05-05 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-05 18:12 Mattias Rönnblom [this message]
2019-05-05 18:12 ` Mattias Rönnblom
2019-05-09 18:55 ` Thomas Monjalon
2019-05-09 18:55 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190505181216.30192-1-mattias.ronnblom@ericsson.com \
--to=mattias.ronnblom@ericsson.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).