<commit_before>/*
 * Copyright (c) 2015 Intel Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <stdio.h>
#include <stdint.h>
#include <device.h>
#include <init.h>

#include "board.h"
#include <nanokernel.h>
#include <arch/cpu.h>

#if CONFIG_IPM_QUARK_SE
#include <ipm.h>
#include <ipm/ipm_quark_se.h>

static int x86_quark_se_ipm_init(void)
{
	IRQ_CONNECT(QUARK_SE_IPM_INTERRUPT, CONFIG_QUARK_SE_IPM_IRQ_PRI,
		    quark_se_ipm_isr, NULL, 0);
	irq_enable(QUARK_SE_IPM_INTERRUPT);
	return 0;
}

static struct quark_se_ipm_controller_config_info ipm_controller_config = {
	.controller_init = x86_quark_se_ipm_init
};
DEVICE_AND_API_INIT(quark_se_ipm, "", quark_se_ipm_controller_initialize,
				NULL, &ipm_controller_config,
				PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
				&ipm_quark_se_api_funcs);

#if defined(CONFIG_IPM_CONSOLE_RECEIVER) && defined(CONFIG_PRINTK)
#include <console/ipm_console.h>

QUARK_SE_IPM_DEFINE(quark_se_ipm4, 4, QUARK_SE_IPM_INBOUND);

#define QUARK_SE_IPM_CONSOLE_LINE_BUF_SIZE	80

static uint32_t ipm_console_ring_buf_data[CONFIG_QUARK_SE_IPM_CONSOLE_RING_BUF_SIZE32];
static char __stack ipm_console_fiber_stack[IPM_CONSOLE_STACK_SIZE];
static char ipm_console_line_buf[QUARK_SE_IPM_CONSOLE_LINE_BUF_SIZE];

struct ipm_console_receiver_config_info quark_se_ipm_receiver_config = {
	.bind_to = "quark_se_ipm4",
	.fiber_stack = ipm_console_fiber_stack,
	.ring_buf_data = ipm_console_ring_buf_data,
	.rb_size32 = CONFIG_QUARK_SE_IPM_CONSOLE_RING_BUF_SIZE32,
	.line_buf = ipm_console_line_buf,
	.lb_size = QUARK_SE_IPM_CONSOLE_LINE_BUF_SIZE,
	.flags = IPM_CONSOLE_PRINTK
};
struct ipm_console_receiver_runtime_data quark_se_ipm_receiver_driver_data;
DEVICE_INIT(ipm_console0, "ipm_console0", ipm_console_receiver_init,
				&quark_se_ipm_receiver_driver_data, &quark_se_ipm_receiver_config,
				SECONDARY, CONFIG_IPM_CONSOLE_INIT_PRIORITY);

#endif /* CONFIG_PRINTK && CONFIG_IPM_CONSOLE_RECEIVER */
#endif /* CONFIG_IPM_QUARK_SE */<commit_msg>quark_se: Make ipm console config structure static.<commit_after>/*
 * Copyright (c) 2015 Intel Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <stdio.h>
#include <stdint.h>
#include <device.h>
#include <init.h>

#include "board.h"
#include <nanokernel.h>
#include <arch/cpu.h>

#if CONFIG_IPM_QUARK_SE
#include <ipm.h>
#include <ipm/ipm_quark_se.h>

static int x86_quark_se_ipm_init(void)
{
	IRQ_CONNECT(QUARK_SE_IPM_INTERRUPT, CONFIG_QUARK_SE_IPM_IRQ_PRI,
		    quark_se_ipm_isr, NULL, 0);
	irq_enable(QUARK_SE_IPM_INTERRUPT);
	return 0;
}

static struct quark_se_ipm_controller_config_info ipm_controller_config = {
	.controller_init = x86_quark_se_ipm_init
};
DEVICE_AND_API_INIT(quark_se_ipm, "", quark_se_ipm_controller_initialize,
				NULL, &ipm_controller_config,
				PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
				&ipm_quark_se_api_funcs);

#if defined(CONFIG_IPM_CONSOLE_RECEIVER) && defined(CONFIG_PRINTK)
#include <console/ipm_console.h>

QUARK_SE_IPM_DEFINE(quark_se_ipm4, 4, QUARK_SE_IPM_INBOUND);

#define QUARK_SE_IPM_CONSOLE_LINE_BUF_SIZE	80

static uint32_t ipm_console_ring_buf_data[CONFIG_QUARK_SE_IPM_CONSOLE_RING_BUF_SIZE32];
static char __stack ipm_console_fiber_stack[IPM_CONSOLE_STACK_SIZE];
static char ipm_console_line_buf[QUARK_SE_IPM_CONSOLE_LINE_BUF_SIZE];

static struct ipm_console_receiver_config_info quark_se_ipm_receiver_config = {
	.bind_to = "quark_se_ipm4",
	.fiber_stack = ipm_console_fiber_stack,
	.ring_buf_data = ipm_console_ring_buf_data,
	.rb_size32 = CONFIG_QUARK_SE_IPM_CONSOLE_RING_BUF_SIZE32,
	.line_buf = ipm_console_line_buf,
	.lb_size = QUARK_SE_IPM_CONSOLE_LINE_BUF_SIZE,
	.flags = IPM_CONSOLE_PRINTK
};
struct ipm_console_receiver_runtime_data quark_se_ipm_receiver_driver_data;
DEVICE_INIT(ipm_console0, "ipm_console0", ipm_console_receiver_init,
				&quark_se_ipm_receiver_driver_data, &quark_se_ipm_receiver_config,
				SECONDARY, CONFIG_IPM_CONSOLE_INIT_PRIORITY);

#endif /* CONFIG_PRINTK && CONFIG_IPM_CONSOLE_RECEIVER */
#endif /* CONFIG_IPM_QUARK_SE */
{'fraction_non_alphanumeric': 0.07943094250148192, 'fraction_numerical': 0.011460185734044654, 'mean_word_length': 6.72824427480916, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1553070', 'n_tokens_mistral': 2055, 'n_tokens_neox': 1947, 'n_words': 369}