Received: by 10.213.65.68 with SMTP id h4csp3759585imn; Tue, 3 Apr 2018 10:10:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+iyOWULanV5B+YuoiPQEhHE6exox1F9GJnWw+ORuEezEXoO6CBykHQYCkaCmW6Uu5voNt9 X-Received: by 10.99.111.6 with SMTP id k6mr9665197pgc.444.1522775436190; Tue, 03 Apr 2018 10:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522775436; cv=none; d=google.com; s=arc-20160816; b=wrPMw4gL89Y7vigYDFvzNZbKWFfGRSoEo5+N8Q1SWDsCIozB7MY5JA60cMZdwZOPDQ UXFJR1bcfP0EQTqa1iKRBiqIgplspGn2NBX81yLCgYBSZOapKppiOyPvmN/FyXMPvMbu q6a2YbWJwk3G/+hT+zkQ2Q7q0slFmGjLNvfINiRkTunPyyWFCpzxcQyELOXEIMqZYgyU lMNNCnFA6QFGfkTBCb8AH+PHzEb9LmXsXdyoPHemPT6Q3Lkdc8DsVVp0RRjbjrzoIkP1 g7sMdMuAT5wcduJoWehHMbHax6m6GlGLE5rYAQGsQcvTqq519Im2areNadkhGSpM0E2N UwAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=nECTDkqF+CqA2lu2R1kMCmoSbnkRea/WyzvJZvYNot4=; b=GuwJC8l01RazV4enklQLm1735BmIcO26XpeFJarGlZJeUXlLh8kdPSmumYVpY4Qjct 6L4Q3C/NmMQArlOhnN/kANVCY2amfXIGbf0ysPt6rji1Orbjd1d0bL+fTIpm7/9l+3Gz TpTTbrR4Juy4bNZFRa5b1ankFKiG+YAkwrm8pSu5Js45x2535YBbhXiAZkTV229N/WeQ eEFZmG0UgdJrJM8BoMqvHeEhx+XQePQmIqzrqOeQZD98li8MzYWbnBZkB5P8BlIOj2pD 1LnvBfLjLHtjg7E5CfpeokCnWM7zNA7OcVDBZGRw31k3zBMmYbuB7wuO1PI/Eic+3U/x 8uCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lSzWvJc0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si2271863pge.714.2018.04.03.10.10.22; Tue, 03 Apr 2018 10:10:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lSzWvJc0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752706AbeDCRIy (ORCPT + 99 others); Tue, 3 Apr 2018 13:08:54 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:32955 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752576AbeDCRIw (ORCPT ); Tue, 3 Apr 2018 13:08:52 -0400 Received: by mail-oi0-f66.google.com with SMTP id 126-v6so16664317oig.0; Tue, 03 Apr 2018 10:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nECTDkqF+CqA2lu2R1kMCmoSbnkRea/WyzvJZvYNot4=; b=lSzWvJc0WYcd22KEeR+ivD59HE9pfOqXmxyZEjYVCff0QSfIU50bDplgLPItq/9iJC uKkTtqv3AocOmRy4xn7GupWD4aYHhAdb6UsQ1F+H7AzlP2TYGvwfONBv19s4nbHAMtGN WKJUDJVIj1/BbuQXgr5T1keRBGNuBY281Il5Ekd2a0/p7A2FxOFs1OC4bomBmLwAiukl av0+swG7CGqLeGHe/Owcwx2dXZtudGKRUSdo27bZeuJidx4SUEsFTj2D3cORxnbEr98U XMzvPvW2u9jMHe6D7/z3cfEpOyzDhJbNwGnVeel6hoFRznT15+JIM0YmsuswWmuSX/w6 QOJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nECTDkqF+CqA2lu2R1kMCmoSbnkRea/WyzvJZvYNot4=; b=Lfm1VFwsGaCNq0SJnqy/+M06fgXi/d4G11ytpQdvQHkV8LiiJBdmJtLkfIPYMP3E91 1Gfs7yWI7UzHXeUpgnPUJeqTLKYiWRaHXjQkUF2yzqpJLkRGLQKXUYwxi09ggShxiQrb pZHFYctYNklntA6UmNfge/2kQgYk+sKrtD1NAAhH1ZX9UGhTP94YmRyLfUY1n9Y41mE3 oIk1DkxzCerPD7jpUaTHQn/TYLSJvtEc2iV81gSAz0al2QS6fYGyJ2odP9WutegsSeO1 KNEPojoWBHAAcsXBCjI8GWFpxjPxjLAGLoOm9k7J1cFCe3R/lxZApmGFl3cmzI3tY/sl nWYg== X-Gm-Message-State: ALQs6tD3idAk2PvWmSRuo5osrsBvRWdGEz23PVcvUvUpJSVkh0Ygxe+p 90qGBivgJsh9UdjVV+Lawv2Aoe+8 X-Received: by 2002:aca:e008:: with SMTP id x8-v6mr7678278oig.345.1522775331256; Tue, 03 Apr 2018 10:08:51 -0700 (PDT) Received: from nuclearis2_1.lan (c-98-197-2-30.hsd1.tx.comcast.net. [98.197.2.30]) by smtp.gmail.com with ESMTPSA id p35-v6sm1763878ota.72.2018.04.03.10.08.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Apr 2018 10:08:50 -0700 (PDT) From: Alexandru Gagniuc To: linux-acpi@vger.kernel.org Cc: rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, bp@alien8.de, tbaicar@codeaurora.org, will.deacon@arm.com, james.morse@arm.com, shiju.jose@huawei.com, zjzhang@codeaurora.org, gengdongjiu@huawei.com, linux-kernel@vger.kernel.org, alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, Alexandru Gagniuc Subject: [RFC PATCH 2/4] acpi: apei: Swap ghes_print_queued_estatus and ghes_proc_in_irq Date: Tue, 3 Apr 2018 12:08:28 -0500 Message-Id: <20180403170830.29282-3-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180403170830.29282-1-mr.nuke.me@gmail.com> References: <20180403170830.29282-1-mr.nuke.me@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move ghes_print_queued_estatus() above ghes_proc_in_irq(). In a subsequent patch, the NMI handler will be updated, and the print functionality will be used in ghes_proc_in_irq. This simply makes the subsequent diff look sane. Signed-off-by: Alexandru Gagniuc --- drivers/acpi/apei/ghes.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 25cf77a18e0a..2c998125b1d5 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -870,13 +870,12 @@ static atomic_t ghes_in_nmi = ATOMIC_INIT(0); static LIST_HEAD(ghes_nmi); -static void ghes_proc_in_irq(struct irq_work *irq_work) +static void ghes_print_queued_estatus(void) { - struct llist_node *llnode, *next; + struct llist_node *llnode; struct ghes_estatus_node *estatus_node; struct acpi_hest_generic *generic; struct acpi_hest_generic_status *estatus; - u32 len, node_len; llnode = llist_del_all(&ghes_estatus_llist); /* @@ -885,30 +884,22 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) */ llnode = llist_reverse_order(llnode); while (llnode) { - next = llnode->next; estatus_node = llist_entry(llnode, struct ghes_estatus_node, llnode); estatus = GHES_ESTATUS_FROM_NODE(estatus_node); - len = cper_estatus_len(estatus); - node_len = GHES_ESTATUS_NODE_LEN(len); - ghes_do_proc(estatus_node->ghes, estatus); - if (!ghes_estatus_cached(estatus)) { - generic = estatus_node->generic; - if (ghes_print_estatus(NULL, generic, estatus)) - ghes_estatus_cache_add(generic, estatus); - } - gen_pool_free(ghes_estatus_pool, (unsigned long)estatus_node, - node_len); - llnode = next; + generic = estatus_node->generic; + ghes_print_estatus(NULL, generic, estatus); + llnode = llnode->next; } } -static void ghes_print_queued_estatus(void) +static void ghes_proc_in_irq(struct irq_work *irq_work) { - struct llist_node *llnode; + struct llist_node *llnode, *next; struct ghes_estatus_node *estatus_node; struct acpi_hest_generic *generic; struct acpi_hest_generic_status *estatus; + u32 len, node_len; llnode = llist_del_all(&ghes_estatus_llist); /* @@ -917,12 +908,21 @@ static void ghes_print_queued_estatus(void) */ llnode = llist_reverse_order(llnode); while (llnode) { + next = llnode->next; estatus_node = llist_entry(llnode, struct ghes_estatus_node, llnode); estatus = GHES_ESTATUS_FROM_NODE(estatus_node); - generic = estatus_node->generic; - ghes_print_estatus(NULL, generic, estatus); - llnode = llnode->next; + len = cper_estatus_len(estatus); + node_len = GHES_ESTATUS_NODE_LEN(len); + ghes_do_proc(estatus_node->ghes, estatus); + if (!ghes_estatus_cached(estatus)) { + generic = estatus_node->generic; + if (ghes_print_estatus(NULL, generic, estatus)) + ghes_estatus_cache_add(generic, estatus); + } + gen_pool_free(ghes_estatus_pool, (unsigned long)estatus_node, + node_len); + llnode = next; } } -- 2.14.3