eal: fix tsc frequency
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Mon, 27 Jul 2015 12:17:55 +0000 (13:17 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Jul 2015 12:43:30 +0000 (14:43 +0200)
commitac7c9f725f62a44671c1cd35d791f8a51f93fe06
treeb6a19745f66c63bdfb251b7c9695fbe2cee262ef
parent799d1c554a6dbce4c4afbdf74f431efd2c9d8c42
eal: fix tsc frequency

Fix error where TSC freq is 0.

The logical OR operator evaluates to 1 if any of its operands is
different than 0.

Error showed later while initializing PMD:
EAL: TSC frequency is ~0 KHz
<snip>
PMD: eth_ixgbe_dev_init(): Hardware Initialization Failure: -30
EAL: Error - exiting with code: 1
  Cause: Requested device 0000:84:00.0 cannot be used

Fixes: 040cf8a41187 ("eal: deduplicate timer functions")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/common/eal_common_timer.c