<commit_before>/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef __INC_SYS_APIC_H
#define __INC_SYS_APIC_H

#include <drivers/ioapic.h>
#include <drivers/loapic.h>

#define _IRQ_TRIGGER_EDGE	IOAPIC_EDGE
#define _IRQ_TRIGGER_LEVEL	IOAPIC_LEVEL

#define _IRQ_POLARITY_HIGH	IOAPIC_HIGH
#define _IRQ_POLARITY_LOW	IOAPIC_LOW

#ifndef _ASMLANGUAGE

#define LOAPIC_IRQ_BASE  CONFIG_IOAPIC_NUM_RTES
#define LOAPIC_IRQ_COUNT 6  /* Default to LOAPIC_TIMER to LOAPIC_ERROR */

/* irq_controller.h interface */
void __irq_controller_irq_config(unsigned int vector, unsigned int irq,
				 uint32_t flags);

int __irq_controller_isr_vector_get(void);

static inline void __irq_controller_eoi(void)
{
#if CONFIG_EOI_FORWARDING_BUG
	_lakemont_eoi();
#else
	*(volatile int *)(CONFIG_LOAPIC_BASE_ADDRESS + LOAPIC_EOI) = 0;
#endif
}

#else /* _ASMLANGUAGE */

#if CONFIG_EOI_FORWARDING_BUG
.macro __irq_controller_eoi_macro
	call	_lakemont_eoi
.endm
#else
.macro __irq_controller_eoi_macro
	xorl %eax, %eax			/* zeroes eax */
	loapic_eoi_reg = (CONFIG_LOAPIC_BASE_ADDRESS + LOAPIC_EOI)
	movl %eax, loapic_eoi_reg	/* tell LOAPIC the IRQ is handled */
.endm
#endif /* CONFIG_EOI_FORMWARDING_BUG */<commit_msg>kconfig: fixed typo in CONFIG_EOI_FORMWARDING_BUG<commit_after>/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef __INC_SYS_APIC_H
#define __INC_SYS_APIC_H

#include <drivers/ioapic.h>
#include <drivers/loapic.h>

#define _IRQ_TRIGGER_EDGE	IOAPIC_EDGE
#define _IRQ_TRIGGER_LEVEL	IOAPIC_LEVEL

#define _IRQ_POLARITY_HIGH	IOAPIC_HIGH
#define _IRQ_POLARITY_LOW	IOAPIC_LOW

#ifndef _ASMLANGUAGE

#define LOAPIC_IRQ_BASE  CONFIG_IOAPIC_NUM_RTES
#define LOAPIC_IRQ_COUNT 6  /* Default to LOAPIC_TIMER to LOAPIC_ERROR */

/* irq_controller.h interface */
void __irq_controller_irq_config(unsigned int vector, unsigned int irq,
				 uint32_t flags);

int __irq_controller_isr_vector_get(void);

static inline void __irq_controller_eoi(void)
{
#if CONFIG_EOI_FORWARDING_BUG
	_lakemont_eoi();
#else
	*(volatile int *)(CONFIG_LOAPIC_BASE_ADDRESS + LOAPIC_EOI) = 0;
#endif
}

#else /* _ASMLANGUAGE */

#if CONFIG_EOI_FORWARDING_BUG
.macro __irq_controller_eoi_macro
	call	_lakemont_eoi
.endm
#else
.macro __irq_controller_eoi_macro
	xorl %eax, %eax			/* zeroes eax */
	loapic_eoi_reg = (CONFIG_LOAPIC_BASE_ADDRESS + LOAPIC_EOI)
	movl %eax, loapic_eoi_reg	/* tell LOAPIC the IRQ is handled */
.endm
#endif /* CONFIG_EOI_FORWARDING_BUG */
{'fraction_non_alphanumeric': 0.0841643398484244, 'fraction_numerical': 0.007977662544874352, 'mean_word_length': 5.947368421052632, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3483188', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1055, 'n_words': 204}