#include <linux/workqueue.h>
#include <linux/debugfs.h>
#include <linux/smc.h>
+#include <linux/cpumask.h>
#include <soc/samsung/exynos-seclog.h>
pr_debug("%s: Start seclog_worker\n", __func__);
/* Print log message in a message buffer */
- for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ for_each_possible_cpu(cpu) {
v_log_addr = SECLOG_PHYS_TO_VIRT(sec_log[cpu]->start_log_addr);
while (sec_log[cpu]->log_read_cnt != sec_log[cpu]->log_write_cnt) {
schedule_work(&slog_ctx.work);
} else {
/* Skip all log messages */
- for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ for_each_possible_cpu(cpu) {
sec_log[cpu]->log_read_cnt = sec_log[cpu]->log_write_cnt;
sec_log[cpu]->log_return_cnt = 0;
}
detect_ldfw_err:
/* Setup virtual address of message buffer of each core */
- for (i = 0; i < NR_CPUS; i++) {
+ for_each_possible_cpu(i) {
sec_log[i] = (struct sec_log_info *)((unsigned long)ldata.virt_addr
+ (SECLOG_LOG_BUF_SIZE * i));
dev_dbg(&pdev->dev,