Deleted Added
full compact
octeon-model.h (232812) octeon-model.h (243469)
1/***********************license start***************
2 * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights
3 * reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 303 unchanged lines hidden (view full) ---

312 && ((chip_model) >= OCTEON_CN63XX_PASS1_0) && ((chip_model) < OCTEON_CNF71XX_PASS1_0)) || \
313 ((((arg_model) & (OM_MATCH_F7XXX_FAMILY_MODELS)) == OM_MATCH_F7XXX_FAMILY_MODELS) \
314 && ((chip_model) >= OCTEON_CNF71XX_PASS1_0)) || \
315 ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \
316 && (((chip_model) & OCTEON_58XX_MODEL_MASK) < ((arg_model) & OCTEON_58XX_MODEL_MASK))) \
317 )))
318
319#ifndef OCTEON_IS_MODEL
1/***********************license start***************
2 * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights
3 * reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 303 unchanged lines hidden (view full) ---

312 && ((chip_model) >= OCTEON_CN63XX_PASS1_0) && ((chip_model) < OCTEON_CNF71XX_PASS1_0)) || \
313 ((((arg_model) & (OM_MATCH_F7XXX_FAMILY_MODELS)) == OM_MATCH_F7XXX_FAMILY_MODELS) \
314 && ((chip_model) >= OCTEON_CNF71XX_PASS1_0)) || \
315 ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \
316 && (((chip_model) & OCTEON_58XX_MODEL_MASK) < ((arg_model) & OCTEON_58XX_MODEL_MASK))) \
317 )))
318
319#ifndef OCTEON_IS_MODEL
320#if defined(USE_RUNTIME_MODEL_CHECKS) || defined(__U_BOOT__) || (defined(__linux__) && defined(__KERNEL__)) || defined(CVMX_BUILD_FOR_TOOLCHAIN) || (defined(__FreeBSD__) && defined(_KERNEL))
320#if defined(USE_RUNTIME_MODEL_CHECKS) || defined(__U_BOOT__) || (defined(__linux__) && defined(__KERNEL__)) || defined(CVMX_BUILD_FOR_TOOLCHAIN) || (defined(__FreeBSD__) && defined(_KERNEL) && !defined(OCTEON_MODEL))
321
322/* NOTE: This for internal use only!!!!! */
323static inline int __octeon_is_model_runtime__(uint32_t model)
324{
325 uint32_t cpuid = cvmx_get_proc_id();
326
327 /* Check for special case of mismarked 3005 samples. We only need to check
328 if the sub model isn't being ignored */

--- 25 unchanged lines hidden (view full) ---

354 (((x & (OM_IGNORE_REVISION | OM_IGNORE_MINOR_REVISION)) != 0) \
355 ? __OCTEON_IS_MODEL_COMPILE__(x, OCTEON_MODEL) \
356 : __OCTEON_IS_MODEL_COMPILE__(x, cvmx_get_proc_id()))
357
358#define OCTEON_IS_COMMON_BINARY() 0
359#endif
360#endif
361
321
322/* NOTE: This for internal use only!!!!! */
323static inline int __octeon_is_model_runtime__(uint32_t model)
324{
325 uint32_t cpuid = cvmx_get_proc_id();
326
327 /* Check for special case of mismarked 3005 samples. We only need to check
328 if the sub model isn't being ignored */

--- 25 unchanged lines hidden (view full) ---

354 (((x & (OM_IGNORE_REVISION | OM_IGNORE_MINOR_REVISION)) != 0) \
355 ? __OCTEON_IS_MODEL_COMPILE__(x, OCTEON_MODEL) \
356 : __OCTEON_IS_MODEL_COMPILE__(x, cvmx_get_proc_id()))
357
358#define OCTEON_IS_COMMON_BINARY() 0
359#endif
360#endif
361
362int octeon_model_version_check(uint32_t chip_id);
362const char *octeon_model_get_string(uint32_t chip_id);
363const char *octeon_model_get_string_buffer(uint32_t chip_id, char * buffer);
364
365/**
366 * Return the octeon family, i.e., ProcessorID of the PrID register.
367 *
368 * @return the octeon family on success, ((unint32_t)-1) on error.
369 */

--- 14 unchanged lines hidden ---
363const char *octeon_model_get_string(uint32_t chip_id);
364const char *octeon_model_get_string_buffer(uint32_t chip_id, char * buffer);
365
366/**
367 * Return the octeon family, i.e., ProcessorID of the PrID register.
368 *
369 * @return the octeon family on success, ((unint32_t)-1) on error.
370 */

--- 14 unchanged lines hidden ---