From patchwork Wed Jun 27 08:40:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10490817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 517EE60230 for ; Wed, 27 Jun 2018 08:40:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D9FD28739 for ; Wed, 27 Jun 2018 08:40:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AECB28AA0; Wed, 27 Jun 2018 08:40:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CDABF28739 for ; Wed, 27 Jun 2018 08:40:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g5ZigZVDBNDLi4Q0cni4+U3aup5MID3nd7MU3BJX1JA=; b=O71CUGo79btxy2 tUgwsb28BymNk39rTScFQDFGEzfd5BFBYjBppxj3I8M6/HfoOojlb5+nKZ9JlTVTuqpnNlQrOLUZ7 8UfhCL+n0bYgsDbCRZ9A4gvVHGeQuzr+MM/AvaWW4ytHXWkmFTuqKTZaEd4yZ4OyvL8tpQ+oZhobV E0+wp6Wh3bfNKYjASnS0ErmQDtToMwbJ++2xYDt2+l5nT9vpfx9ydfrZHrLZymNE+9uKKoeI0J7pt 2CFYbxzMd7ExRzYK3Q4OZEVezigfgq7ca281TdZ9MmYCZOrWyNl1zrTl7NevOqxXxa+7odxhl9edt Kq4gKRFfn6ms1hCW7DoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fY60J-0007T2-Kb; Wed, 27 Jun 2018 08:40:43 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fY60C-0007R1-Fg for linux-arm-kernel@lists.infradead.org; Wed, 27 Jun 2018 08:40:40 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2667618A; Wed, 27 Jun 2018 01:40:26 -0700 (PDT) Received: from [10.1.206.34] (melchizedek.cambridge.arm.com [10.1.206.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1EB423F5AD; Wed, 27 Jun 2018 01:40:22 -0700 (PDT) Subject: Re: [PATCH v5 12/20] ACPI / APEI: Don't store CPER records physical address in struct ghes To: linux-acpi@vger.kernel.org References: <20180626170116.25825-13-james.morse@arm.com> <201806270332.vrWmASbO%fengguang.wu@intel.com> From: James Morse Message-ID: <5a35a9d3-c536-998d-7a76-e18206305ea6@arm.com> Date: Wed, 27 Jun 2018 09:40:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201806270332.vrWmASbO%fengguang.wu@intel.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180627_014036_637338_80A9A511 X-CRM114-Status: GOOD ( 18.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jonathan.zhang@cavium.com, Rafael Wysocki , Tony Luck , Punit Agrawal , Xie XiuQi , Marc Zyngier , Catalin Marinas , Tyler Baicar , Will Deacon , Christoffer Dall , Dongjiu Geng , linux-mm@kvack.org, Borislav Petkov , Naoya Horiguchi , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Len Brown Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 26/06/18 21:55, kbuild test robot wrote: > # save the attached .config to linux build tree > make ARCH=i386 Gah, guess who forgot about 32bit. > All errors (new ones prefixed by >>): > > drivers/acpi/apei/ghes.c: In function 'ghes_read_estatus': >>> drivers/acpi/apei/ghes.c:300:17: error: passing argument 1 of 'apei_read' from incompatible pointer type [-Werror=incompatible-pointer-types] > rc = apei_read(buf_paddr, &g->error_status_address); > ^~~~~~~~~ This takes a u64 pointer even on 32bit systems, because that's the size of the GAS structure in the spec. (I wonder what it expects you to do if the high bits are set...) I'll fix this locally[0]. Thanks, James [0] phys_addr_t is a good thing, lets not use it: struct acpi_hest_generic_status estatus; @@ -337,7 +337,7 @@ static int ghes_peek_estatus(struct ghes *ghes, int fixmap_idx, } static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus, - phys_addr_t buf_paddr, size_t buf_len, + u64 buf_paddr, size_t buf_len, int fixmap_idx) { ghes_copy_tofrom_phys(estatus, buf_paddr, buf_len, 1, fixmap_idx); @@ -353,7 +353,7 @@ static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus, static int ghes_read_estatus(struct ghes *ghes, struct acpi_hest_generic_status *estatus, - phys_addr_t *buf_paddr, int fixmap_idx) + u64 *buf_paddr, int fixmap_idx) { int rc; u32 buf_len; @@ -366,7 +366,7 @@ static int ghes_read_estatus(struct ghes *ghes, } static void ghes_clear_estatus(struct acpi_hest_generic_status *estatus, - phys_addr_t buf_paddr, int fixmap_idx) + u64 buf_paddr, int fixmap_idx) { estatus->block_status = 0; if (buf_paddr) @@ -716,9 +716,9 @@ static void ghes_print_queued_estatus(void) static int _in_nmi_notify_one(struct ghes *ghes, int fixmap_idx) { + u64 buf_paddr; int sev, rc = 0; u32 len, node_len; - phys_addr_t buf_paddr; struct ghes_estatus_node *estatus_node; struct acpi_hest_generic_status *estatus; @@ -876,8 +876,8 @@ static int ghes_ack_error(struct acpi_hest_generic_v2 *gv2) static int ghes_proc(struct ghes *ghes) { int rc; + u64 buf_paddr; unsigned long flags; - phys_addr_t buf_paddr; struct acpi_hest_generic_status *estatus = ghes->estatus; spin_lock_irqsave(&ghes_notify_lock_irq, flags); diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index b7b335450a6b..930adecd87d4 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -267,7 +267,7 @@ static inline int ghes_severity(int severity) } } -static void ghes_copy_tofrom_phys(void *buffer, phys_addr_t paddr, u32 len, +static void ghes_copy_tofrom_phys(void *buffer, u64 paddr, u32 len, int from_phys, int fixmap_idx) { void __iomem *vaddr; @@ -292,7 +292,7 @@ static void ghes_copy_tofrom_phys(void *buffer, phys_addr_t paddr, u32 len, /* read the CPER block returning its address and size */ static int ghes_peek_estatus(struct ghes *ghes, int fixmap_idx, - phys_addr_t *buf_paddr, u32 *buf_len) + u64 *buf_paddr, u32 *buf_len) { struct acpi_hest_generic *g = ghes->generic;