Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp919882imj; Sat, 9 Feb 2019 10:48:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IZtvyEqkXRtARUcLBw1bbIc4hOcVRyFxeQ/0NVQ/7ExUL1q1cXM3GtkhLE5ovKHwB++fnHP X-Received: by 2002:a62:8d46:: with SMTP id z67mr10374785pfd.249.1549738084913; Sat, 09 Feb 2019 10:48:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549738084; cv=none; d=google.com; s=arc-20160816; b=dJtTdR6URDqLHnZKsqt/vfUgqKl3NcD1/XKZ6RqUpRmH7b6H3nPuBH9f3TBqK0KQkW u7yulHlL4slKQW3FHYHCKo7xC4eSUrP0hN3pPg9itWfTfVw/497wJs+eDLX+h0ATn6hE Usv/F8uvm/tQ9e0xdMIqCJtfIRjHmOm2k4kW8rIqZlXcGnsrEorUNDgYpsnh6IQ/eKzb ZcDWEOVaHINDa/tiksYX5cMbABS7sIetuW+dhIk5EOQ35022/a0EBCLrhsAXXJUADmzd BthCZzSYB7GLnFc2Xuw3dmUDZOSHRpvHNWV7GdyOxVB7OHqk4epBZ+4zu1JbsIMSpn8Q MJ1w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FDkHkJ1kjOvaNsENg6MIcdK+XIMaNOS6ClMVnmDKYiI=; b=EhL48t8JYIOv7YTemTIr46QJitCds/EH7P145EyCo96Qu8E3ayMlZzmwEqx5zSU3V8 dvMpzY98XGJgDIHDF7mJtq5YVFpb25OT1Z2lh01qrenPqTeYcEgmF+6BmNA7EhPq+Vps OJP1trcK/CCFlBhbb8zG0Ie8obVpMuILHftGyZ8YXOfyZphwVcD1qf0jLHivj98ytV01 fueEOvP4o4QlSxUJVeVhvDB510qFPLpIGR8teV8ZxjlnCgrQ18tD1YlvEmvWT2AwXEBq NQMwC4l51EbvST+79lz/8twd8D+/qxW6mOkw6r+W5H5lucUl3/Jq15kkGHuL/O8cIwBA V7Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NWXyzy6D; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si5123222pgp.274.2019.02.09.10.47.48; Sat, 09 Feb 2019 10:48:04 -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=NWXyzy6D; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbfBISrk (ORCPT + 99 others); Sat, 9 Feb 2019 13:47:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:60086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727236AbfBISri (ORCPT ); Sat, 9 Feb 2019 13:47:38 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 014C321919; Sat, 9 Feb 2019 18:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549738057; bh=vOgHPGL/g4zudCafBbIFcRmE0R1+zjoErFUDkXGWpT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NWXyzy6DYqgdT7MQXQx6jKFWbG/XxPDEtwWpp/VFbuUmF5q/+xis0K1ghhryaTvFF wtJeJyL3RNnuu+UUcYpg8GNUtJ0rXfgw8mI+K/cEwADZVWEfApE+UEYGaMhmlm+DVv ks7k6H+E0J27uMIvHxEtesejukiWZYJyJuLBoDqk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chao Fan , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL 4.20 02/42] ACPI: NUMA: Use correct type for printing addresses on i386-PAE Date: Sat, 9 Feb 2019 13:46:54 -0500 Message-Id: <20190209184734.125935-2-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190209184734.125935-1-sashal@kernel.org> References: <20190209184734.125935-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Fan [ 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 274699463b4f..7bbbf8256a41 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -146,9 +146,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