Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2429481imj; Mon, 18 Feb 2019 05:58:33 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib9xbb0hO1+faZSqnEaninMv0oBTM++YzM5MejBW5PpBlwOGDdKgEe3VZ18RhktFoQEFkhv X-Received: by 2002:a63:ca:: with SMTP id 193mr19947089pga.288.1550498313023; Mon, 18 Feb 2019 05:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550498313; cv=none; d=google.com; s=arc-20160816; b=WK+EK7hvRNMYNJrNMdZDf3os5hWEtAdlj8kLwUNtwisuercrMxhlfP4Dy8TSbAtLLt 5j2+ndMUKYoKJ1WMBxNAnkyK4qkypTGJaw8y11v8IYPgPxctC9oWy8ZBTR+gjCxEWsii DkOOfDtn5wqxEMjLIHPOpit0W5P0qot1mvOjq1YP43s1YRUMjrbdvJbbygRPxYuMZljF GtFgwBlHaBPEDnftdHO3lhlxhNhX7o47fhd0woaTSosu7bcstt++4SC6064+ioeOu9ni GEFFXW/RM0F4qLlVYmd6sJBtxwdPz/VMWf6oD+hENvz+4b3//dpJFXfBSnKENW+qzWHd rO8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qDDFJ7w2RooLQLZFqZSpxFAB/t4LR69qfFD8ZIMUc+Q=; b=rK9ZlNJRmpBw8HYtN3aeGeKbRrmDdqSxTN+C6CDMC+JFGJeXFCP4SVMcjjJweFyv0z O8ThW4oRWrr8OSS3I2XLEzwbSPklY+5cINJDdJ7ojzwDRPzI+KcEVPV4c092mqxGRTz0 a+Idd1H/32ywG3lg8aTkKZTaeR1dydNRU2TPF7pHFbrK6xzTOhUNjzcKcgXxx6nHbMlN fOX6QzyxqooDDIEEE/e7DEccv821CiyqhNB5VAtsFn3Jp3+03dAgwiotpKmnPuCvFJGr HBUiffpdfgpFgSykW5chklsi4RtpGjsiQCPiWFD6yel+zQ4Gbph7YG8UifQ8ygZAQ31H Fa0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hvXCUHm8; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18si12747286pgk.308.2019.02.18.05.58.17; Mon, 18 Feb 2019 05:58:33 -0800 (PST) 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=@kernel.org header.s=default header.b=hvXCUHm8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387742AbfBRN4R (ORCPT + 99 others); Mon, 18 Feb 2019 08:56:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:36290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387681AbfBRN4J (ORCPT ); Mon, 18 Feb 2019 08:56:09 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E113121901; Mon, 18 Feb 2019 13:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550498167; bh=IBAcOoi5OUDSyC9FELhCcGkHQCvv8dh0ICRpk+THWxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hvXCUHm8gwC602YnL03LkRGVwSjlp7jWP8F9WvatZjJ6WXmEYd/pfvgqOxueG72pH Y8VZHvpjhg1iZslAM7RisYo7ycvbfSV/fH6HL+4ZqMKZkKrXpSJHQ0Zv6mS32r+GlP bM+CJqPFScXvd0dxjGram5P3+ome/8k0bSq1G+aw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Fan , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 24/62] ACPI: NUMA: Use correct type for printing addresses on i386-PAE Date: Mon, 18 Feb 2019 14:43:30 +0100 Message-Id: <20190218133508.040363220@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133505.801423074@linuxfoundation.org> References: <20190218133505.801423074@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit b9ced18acf68dffebe6888c7ec765a2b1db7a039 ] The addresses of NUMA nodes are not printed correctly on i386-PAE which is misleading. Here is a debian9-32bit with PAE in a QEMU guest having more than 4G of memory: qemu-system-i386 \ -hda /var/lib/libvirt/images/debian32.qcow2 \ -m 5G \ -enable-kvm \ -smp 10 \ -numa node,mem=512M,nodeid=0,cpus=0 \ -numa node,mem=512M,nodeid=1,cpus=1 \ -numa node,mem=512M,nodeid=2,cpus=2 \ -numa node,mem=512M,nodeid=3,cpus=3 \ -numa node,mem=512M,nodeid=4,cpus=4 \ -numa node,mem=512M,nodeid=5,cpus=5 \ -numa node,mem=512M,nodeid=6,cpus=6 \ -numa node,mem=512M,nodeid=7,cpus=7 \ -numa node,mem=512M,nodeid=8,cpus=8 \ -numa node,mem=512M,nodeid=9,cpus=9 \ -serial stdio Because of the wrong value type, it prints as below: [ 0.021049] ACPI: SRAT Memory (0x0 length 0xa0000) in proximity domain 0 enabled [ 0.021740] ACPI: SRAT Memory (0x100000 length 0x1ff00000) in proximity domain 0 enabled [ 0.022425] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 1 enabled [ 0.023092] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 2 enabled [ 0.023764] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 3 enabled [ 0.024431] ACPI: SRAT Memory (0x80000000 length 0x20000000) in proximity domain 4 enabled [ 0.025104] ACPI: SRAT Memory (0xa0000000 length 0x20000000) in proximity domain 5 enabled [ 0.025791] ACPI: SRAT Memory (0x0 length 0x20000000) in proximity domain 6 enabled [ 0.026412] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 7 enabled [ 0.027118] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 8 enabled [ 0.027802] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 9 enabled The upper half of the start address of the NUMA domains between 6 and 9 inclusive was cut, so the printed values are incorrect. Fix the value type, to get the correct values in the log as follows: [ 0.023698] ACPI: SRAT Memory (0x0 length 0xa0000) in proximity domain 0 enabled [ 0.024325] ACPI: SRAT Memory (0x100000 length 0x1ff00000) in proximity domain 0 enabled [ 0.024981] ACPI: SRAT Memory (0x20000000 length 0x20000000) in proximity domain 1 enabled [ 0.025659] ACPI: SRAT Memory (0x40000000 length 0x20000000) in proximity domain 2 enabled [ 0.026317] ACPI: SRAT Memory (0x60000000 length 0x20000000) in proximity domain 3 enabled [ 0.026980] ACPI: SRAT Memory (0x80000000 length 0x20000000) in proximity domain 4 enabled [ 0.027635] ACPI: SRAT Memory (0xa0000000 length 0x20000000) in proximity domain 5 enabled [ 0.028311] ACPI: SRAT Memory (0x100000000 length 0x20000000) in proximity domain 6 enabled [ 0.028985] ACPI: SRAT Memory (0x120000000 length 0x20000000) in proximity domain 7 enabled [ 0.029667] ACPI: SRAT Memory (0x140000000 length 0x20000000) in proximity domain 8 enabled [ 0.030334] ACPI: SRAT Memory (0x160000000 length 0x20000000) in proximity domain 9 enabled Signed-off-by: Chao Fan [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 8fb74d9011da..a7907b58562a 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -147,9 +147,9 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) { struct acpi_srat_mem_affinity *p = (struct acpi_srat_mem_affinity *)header; - pr_debug("SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n", - (unsigned long)p->base_address, - (unsigned long)p->length, + pr_debug("SRAT Memory (0x%llx length 0x%llx) in proximity domain %d %s%s%s\n", + (unsigned long long)p->base_address, + (unsigned long long)p->length, p->proximity_domain, (p->flags & ACPI_SRAT_MEM_ENABLED) ? "enabled" : "disabled", -- 2.19.1