Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  cpu_has_feature.h   Sprache: C

 
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_POWERPC_CPU_HAS_FEATURE_H
#define __ASM_POWERPC_CPU_HAS_FEATURE_H

#ifndef __ASSEMBLY__

#include <linux/bug.h>
#include <asm/cputable.h>

static __always_inline bool early_cpu_has_feature(unsigned long feature)
{
 return !!((CPU_FTRS_ALWAYS & feature) ||
    (CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
}

#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
#include <linux/jump_label.h>

#define NUM_CPU_FTR_KEYS BITS_PER_LONG

extern struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS];

static __always_inline bool cpu_has_feature(unsigned long feature)
{
 int i;

 BUILD_BUG_ON(!__builtin_constant_p(feature));
 BUILD_BUG_ON(__builtin_popcountl(feature) > 1);

#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG
 if (!static_key_feature_checks_initialized) {
  printk("Warning! cpu_has_feature() used prior to jump label init!\n");
  dump_stack();
  return early_cpu_has_feature(feature);
 }
#endif

 if (CPU_FTRS_ALWAYS & feature)
  return true;

 if (!(CPU_FTRS_POSSIBLE & feature))
  return false;

 i = __builtin_ctzl(feature);
 return static_branch_likely(&cpu_feature_keys[i]);
}
#else
static __always_inline bool cpu_has_feature(unsigned long feature)
{
 return early_cpu_has_feature(feature);
}
#endif

#endif /* __ASSEMBLY__ */
#endif /* __ASM_POWERPC_CPU_HAS_FEATURE_H */

Messung V0.5
C=91 H=84 G=87

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge