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: 10490815 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 8CD8960230 for ; Wed, 27 Jun 2018 08:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A205286B3 for ; Wed, 27 Jun 2018 08:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E12928AE8; Wed, 27 Jun 2018 08:40:31 +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, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B8A028ABC for ; Wed, 27 Jun 2018 08:40:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A6656B0003; Wed, 27 Jun 2018 04:40:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8575D6B0006; Wed, 27 Jun 2018 04:40:29 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F70C6B0007; Wed, 27 Jun 2018 04:40:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by kanga.kvack.org (Postfix) with ESMTP id 4688B6B0003 for ; Wed, 27 Jun 2018 04:40:29 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id 22-v6so1031516oij.10 for ; Wed, 27 Jun 2018 01:40:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:to:cc :references:from:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=MEjm1nvNHwmMzbeheiq8BPONnwg29M7vdRfE9OPLaGM=; b=O53iHYlJBw+I/r+5yZ0lyqAnFedkNjchuJE83Hcc/ocv1aELeL1V0FBLd12PhV/QUi zfJdGJaBHAKNCj/WspUrODJINqF22PZNTPhNmgBatpKFTq0Rw3Kciglk1LnV3PKkVnA9 sdzo/nE39FTkZuSjs0u1SF4JXLJQp045iddo5G6NlnKaEXIjMu3mXU0yNcD0l9/KjtpU 0RtmXyYnR6r4mha2lXy24Qolj9boNo+7YNm1RsKfJWRvyyiJlVXPD2/Lw5zcUVGVrvlH dq6CW2dP4S3md7y8Wken4acM9/mcmiaijhRznnDp7ClrCqcI3blJlcyWLxU7OuDv14ou 4EPQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=james.morse@arm.com X-Gm-Message-State: APt69E2W8q21ChaEE86an3r//lJPWXPNphhEeHjjFJvsWp1WCXCn3B8F 44/qUFu+mCC0y9I/fO8tb+DSMbxpqOrrFfnbFQukilhRFKmwrf51Bazl9jZHDwDHSo1NbQe5u8D eJ8IrZ/RGYKeXQyJWmEZMKNfO3ooUAlKtVeP6mJFBGlnKLgT4p8HXw09IrKxJXKPrig== X-Received: by 2002:aca:42:: with SMTP id 63-v6mr2528755oia.154.1530088829040; Wed, 27 Jun 2018 01:40:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpchaRVvhluc4m0XLN+GFqk7XjwBbafaibTeEGEMDb9faw/h7Ij02PwsWHN4fw8LONraNIT4 X-Received: by 2002:aca:42:: with SMTP id 63-v6mr2528732oia.154.1530088827890; Wed, 27 Jun 2018 01:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530088827; cv=none; d=google.com; s=arc-20160816; b=vbr4D5zKNdDClTR27frUOUvLpRjYd0i37WqN3DBPCYq/BglAiOvTQJ6RLOCG3bTyVh GVHIuNQwpYvFpzfXYXDblLVIosbmt3weCDi+nbNBj+BbUSAoqhz2o3f1h+BFnWnu/79p iPR/xy7ds1KUScmnvNRQvqCQ+yJCkTeZ+OFzTYdZwdoFsrPs6YF/mk8E5qoQ9stQtt+0 gV8E08ow1kP/5dnq+ro9kkB9etBDqLz8MT16C+6Kb12B5FlG+lQcr5DFdZUle3wQcFRS gnXUTeSldwI9pltHTxssG/M/tq73Fakwz4QF6yTThaAARgkCAd9uB7zIRAAxgg0a3gUr QCqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=MEjm1nvNHwmMzbeheiq8BPONnwg29M7vdRfE9OPLaGM=; b=1IgWGar6UnhQbEjjRts0l5ZYbiyarVFNlW9vi0qVRT/hsnhF4qCKmlYC4HW2VoFEbr tiWleam8A/+mwl2bqMLbR3t43rIEC32/uq+tU9OMQ/vN+tLUzIu7oes2DTSC5IHesn0+ 9B7Sapj7ziuHrXN8TsHi54zYcDDXvOj7/Ga4WzP4UI0jPdvBuvD6/dMsLju4JB/OK4Rv f2aZu6gaQH4y3C6FRo1tHyqUvCAwL4TTFLM/RPg1tYmBdt1EXWjzlaYUsYTjoIjZ2HqA NUe++uOU7jkv0EQvlff4gKZ0XGzcHZjXNG0Efggvpil1QWT7j1BKc3/K8+VEXEpf/xEp ci2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=james.morse@arm.com Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id p12-v6si1091692otg.226.2018.06.27.01.40.27 for ; Wed, 27 Jun 2018 01:40:27 -0700 (PDT) Received-SPF: pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of james.morse@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=james.morse@arm.com 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 Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, Borislav Petkov , Marc Zyngier , Christoffer Dall , Will Deacon , Catalin Marinas , Naoya Horiguchi , Rafael Wysocki , Len Brown , Tony Luck , Tyler Baicar , Dongjiu Geng , Xie XiuQi , Punit Agrawal , jonathan.zhang@cavium.com 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-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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;