[dpdk-dev,v3,01/12] test: limit x86 cpuflags checks to x86 builds

Message ID 1436172698-21749-2-git-send-email-zlu@ezchip.com (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Zhigang Lu July 6, 2015, 8:51 a.m. UTC
  The original code mistakenly defaulted to X86 when RTE_ARCH_PPC_64 was
left undefined.  This did not accomodate other non-PPC/non-X86
architectures.  This patch fixes this issue.

Change-Id: I5e8cf33c2eb917f7f6583dc95ed0f336066a285e
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
---
 app/test/test_cpuflags.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson July 6, 2015, 10:53 a.m. UTC | #1
On Mon, Jul 06, 2015 at 04:51:26PM +0800, Zhigang Lu wrote:
> The original code mistakenly defaulted to X86 when RTE_ARCH_PPC_64 was
> left undefined.  This did not accomodate other non-PPC/non-X86
> architectures.  This patch fixes this issue.
> 
> Change-Id: I5e8cf33c2eb917f7f6583dc95ed0f336066a285e
We don't use gerrit on dpdk.org, so these change-ids are unnecessary on submissions.

> Signed-off-by: Zhigang Lu <zlu@ezchip.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Zhigang Lu July 7, 2015, 8:21 a.m. UTC | #2
>-----Original Message-----
>From: Bruce Richardson [mailto:bruce.richardson@intel.com]
>Sent: Monday, July 06, 2015 6:53 PM
>To: Zhigang Lu
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH v3 01/12] test: limit x86 cpuflags checks to
x86
>builds
>
>On Mon, Jul 06, 2015 at 04:51:26PM +0800, Zhigang Lu wrote:
>> The original code mistakenly defaulted to X86 when RTE_ARCH_PPC_64 was
>> left undefined.  This did not accomodate other non-PPC/non-X86
>> architectures.  This patch fixes this issue.
>>
>> Change-Id: I5e8cf33c2eb917f7f6583dc95ed0f336066a285e
>We don't use gerrit on dpdk.org, so these change-ids are unnecessary on
>submissions.
>

I will remove these change-ids in the next version of patch series.
And thanks a lot for reviewing this patch set.

>> Signed-off-by: Zhigang Lu <zlu@ezchip.com>
>
>Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c
index 5aeba5d..5b92061 100644
--- a/app/test/test_cpuflags.c
+++ b/app/test/test_cpuflags.c
@@ -113,7 +113,9 @@  test_cpuflags(void)
 
 	printf("Check for ICACHE_SNOOP:\t\t");
 	CHECK_FOR_FLAG(RTE_CPUFLAG_ICACHE_SNOOP);
-#else
+#endif
+
+#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)
 	printf("Check for SSE:\t\t");
 	CHECK_FOR_FLAG(RTE_CPUFLAG_SSE);
 
@@ -149,8 +151,6 @@  test_cpuflags(void)
 
 	printf("Check for INVTSC:\t");
 	CHECK_FOR_FLAG(RTE_CPUFLAG_INVTSC);
-
-
 #endif
 
 	/*