From patchwork Mon Apr 15 17:49:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 10901301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 966C214DB for ; Mon, 15 Apr 2019 17:49:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FFFB283F9 for ; Mon, 15 Apr 2019 17:49:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73DD428662; Mon, 15 Apr 2019 17:49:52 +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=ham 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 4BBF4283F9 for ; Mon, 15 Apr 2019 17:49:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1A74E6B0006; Mon, 15 Apr 2019 13:49:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 138646B0007; Mon, 15 Apr 2019 13:49:48 -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 EEBDD6B0008; Mon, 15 Apr 2019 13:49:47 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by kanga.kvack.org (Postfix) with ESMTP id C21256B0007 for ; Mon, 15 Apr 2019 13:49:47 -0400 (EDT) Received: by mail-ot1-f72.google.com with SMTP id r23so9464775ota.17 for ; Mon, 15 Apr 2019 10:49:47 -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:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Ow+Ul3i0SMFqzj5C3FIRZsbVoU8F8je6HR5OyLi3CXo=; b=MGN9LJjiY2n+UYsR5GNoZTxoUVdUlZH1wh6ps29UvR4zh03j3YD0Vq5R55RLD43b3b r1K3yMIK4Zowi0p+bpw7j4vNGOV9LqlTmg9GV5bBHQ9BA4tKmP3E/CQVbqmseiw+zwAv 4HzO4SLxh0kiutamhzieghKfr2YOsSTSAxPZMNt3OnEtD+t2+zfWEHxlZVNNRipLIaaE rIXyjMW1RET051MifHWPl5ff/ZyxNLaJaFcxP9LCePlV5KYkRq/7ZZLhdshIF8T0bbrf CcUtL4IyRXHzSm7J7rbtmeS48kZTIk6FCJa3m3l+kL0TOu24DOzxppaDuOfxj5cfAtqu 4Gqw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com X-Gm-Message-State: APjAAAV2tjPFvTmsOsW4ZSiAK1pKUClR5bAu8LF0TkLpp0sh1FH4Y5k3 7bk8nAgec907BK1P9SgANrSZaF3Z3mrR5NCnpFMZT4KFYbiSOXERo4uMwYcCJcGxzKxa7c8DWt7 P9XN2BXdliv1u9eFrU9OdItN2FamFFGlLiylBV69FDlVimRYfMvw84jsTEeI85W1goA== X-Received: by 2002:aca:31c3:: with SMTP id x186mr19079085oix.131.1555350587355; Mon, 15 Apr 2019 10:49:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkqr93tUjLkeKWWoB8YCRDeX8T8Qg7+yeMHP/B7Q8stUF55YFCd+PMBzqLKeicyUO5XeFW X-Received: by 2002:aca:31c3:: with SMTP id x186mr19079016oix.131.1555350585808; Mon, 15 Apr 2019 10:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555350585; cv=none; d=google.com; s=arc-20160816; b=E9eouDIiT14xus18BrkeLpH0zHdujZzrjhDuPTfzqsUQBPbz0Ts8Oe+vXJe/SYvs5L STh0OWlFCR3gFidcBnPFGSslcNKKwYVPagwqci6HeGEoqGjpP/SZRx+9LJN8SIL5i1xM aBnxyvGrsIh1uUUJNj5Tq14KndwuOkS/5aDOU+tiDJtjjekFRgDw/mblZKJ8w5RiPuXX fhaIUCs5+k1bqSQ68Aifylj8hLPnE1MUIv7BZxIC1JHB0Xh5Hl284fat/xfsT94KlBTr GuOp5xvTU2XRPBaEm27HciMtZgz2WwWDlLlGR0QP25hi/Tj4qpM2f3Wezfpc6K6FUjhu TYEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Ow+Ul3i0SMFqzj5C3FIRZsbVoU8F8je6HR5OyLi3CXo=; b=Zh8uCmRqClxkHaevhztIYh7zN3ZhtMMtTUBAOR38Pk26EIl2bvWzS050jYvMisKmIf uQqf2FJ4bqCQeMlLGmV5SYfUyJjQUsa3WMaDmhfrAHmIHex5DCuF41N7uEoSZBUdVzVf WTuB0aAdtf6rZbwAptohoaqxhLj8ASJBGzKeCjLCy7brTutiOyN8kGBJ4px93nIN2nOu z2Yr9nkXvF/roXsLutWbcl8Xh2j9OUU999RnDiERMZ+244cvLesPl/AkdQBZjzu3iflM 8rfiJ3qiNf6SoMxF5Y+whwDEN6/7claQE5hIlYT+TPJBet50oecJpaXP4cbVZfubYixg GM3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from huawei.com (szxga06-in.huawei.com. [45.249.212.32]) by mx.google.com with ESMTPS id x64si22669062oig.54.2019.04.15.10.49.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 10:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) client-ip=45.249.212.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D55DD2A446898EE82B5D; Tue, 16 Apr 2019 01:49:41 +0800 (CST) Received: from FRA1000014316.huawei.com (100.126.230.97) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Tue, 16 Apr 2019 01:49:34 +0800 From: Jonathan Cameron To: , , , CC: =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Keith Busch , "Rafael J . Wysocki" , , Andrew Morton , "Jonathan Cameron" Subject: [PATCH 1/4 V3] ACPI: Support Generic Initiator only domains Date: Tue, 16 Apr 2019 01:49:04 +0800 Message-ID: <20190415174907.102307-2-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> References: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [100.126.230.97] X-CFilter-Loop: Reflected 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 Generic Initiators are a new ACPI concept that allows for the description of proximity domains that contain a device which performs memory access (such as a network card) but neither host CPU nor Memory. This patch has the parsing code and provides the infrastructure for an architecture to associate these new domains with their nearest memory processing node. Signed-off-by: Jonathan Cameron --- drivers/acpi/numa.c | 62 +++++++++++++++++++++++++++++++++- drivers/base/node.c | 3 ++ include/asm-generic/topology.h | 3 ++ include/linux/nodemask.h | 1 + include/linux/topology.h | 7 ++++ 5 files changed, 75 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 867f6e3f2b4f..b08ceea5e546 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -184,6 +184,38 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) } break; + case ACPI_SRAT_TYPE_GENERIC_AFFINITY: + { + struct acpi_srat_generic_affinity *p = + (struct acpi_srat_generic_affinity *)header; + char name[9] = {}; + + if (p->device_handle_type == 0) { + /* + * For pci devices this may be the only place they + * are assigned a proximity domain + */ + pr_debug("SRAT Generic Initiator(Seg:%u BDF:%u) in proximity domain %d %s\n", + *(u16 *)(&p->device_handle[0]), + *(u16 *)(&p->device_handle[2]), + p->proximity_domain, + (p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ? + "enabled" : "disabled"); + } else { + /* + * In this case we can rely on the device having a + * proximity domain reference + */ + memcpy(name, p->device_handle, 8); + pr_info("SRAT Generic Initiator(HID=%.8s UID=%.4s) in proximity domain %d %s\n", + (char *)(&p->device_handle[0]), + (char *)(&p->device_handle[8]), + p->proximity_domain, + (p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ? + "enabled" : "disabled"); + } + } + break; default: pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", header->type); @@ -392,6 +424,32 @@ acpi_parse_gicc_affinity(struct acpi_subtable_header *header, return 0; } +static int __init +acpi_parse_gi_affinity(struct acpi_subtable_header *header, + const unsigned long end) +{ + struct acpi_srat_generic_affinity *gi_affinity; + int node; + + gi_affinity = (struct acpi_srat_generic_affinity *)header; + if (!gi_affinity) + return -EINVAL; + acpi_table_print_srat_entry(header); + + if (!(gi_affinity->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED)) + return -EINVAL; + + node = acpi_map_pxm_to_node(gi_affinity->proximity_domain); + if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) { + pr_err("SRAT: Too many proximity domains.\n"); + return -EINVAL; + } + node_set(node, numa_nodes_parsed); + node_set_state(node, N_GENERIC_INITIATOR); + + return 0; +} + static int __initdata parsed_numa_memblks; static int __init @@ -447,7 +505,7 @@ int __init acpi_numa_init(void) /* SRAT: System Resource Affinity Table */ if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { - struct acpi_subtable_proc srat_proc[3]; + struct acpi_subtable_proc srat_proc[4]; memset(srat_proc, 0, sizeof(srat_proc)); srat_proc[0].id = ACPI_SRAT_TYPE_CPU_AFFINITY; @@ -456,6 +514,8 @@ int __init acpi_numa_init(void) srat_proc[1].handler = acpi_parse_x2apic_affinity; srat_proc[2].id = ACPI_SRAT_TYPE_GICC_AFFINITY; srat_proc[2].handler = acpi_parse_gicc_affinity; + srat_proc[3].id = ACPI_SRAT_TYPE_GENERIC_AFFINITY; + srat_proc[3].handler = acpi_parse_gi_affinity; acpi_table_parse_entries_array(ACPI_SIG_SRAT, sizeof(struct acpi_table_srat), diff --git a/drivers/base/node.c b/drivers/base/node.c index 86d6cd92ce3d..f59b9d4ca5d5 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -634,6 +634,8 @@ static struct node_attr node_state_attr[] = { #endif [N_MEMORY] = _NODE_ATTR(has_memory, N_MEMORY), [N_CPU] = _NODE_ATTR(has_cpu, N_CPU), + [N_GENERIC_INITIATOR] = _NODE_ATTR(has_generic_initiator, + N_GENERIC_INITIATOR), }; static struct attribute *node_state_attrs[] = { @@ -645,6 +647,7 @@ static struct attribute *node_state_attrs[] = { #endif &node_state_attr[N_MEMORY].attr.attr, &node_state_attr[N_CPU].attr.attr, + &node_state_attr[N_GENERIC_INITIATOR].attr.attr, NULL }; diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 238873739550..54d0b4176a45 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -71,6 +71,9 @@ #ifndef set_cpu_numa_mem #define set_cpu_numa_mem(cpu, node) #endif +#ifndef set_gi_numa_mem +#define set_gi_numa_mem(gi, node) +#endif #endif /* !CONFIG_NUMA || !CONFIG_HAVE_MEMORYLESS_NODES */ diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 27e7fa36f707..1aebf766fb52 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -399,6 +399,7 @@ enum node_states { #endif N_MEMORY, /* The node has memory(regular, high, movable) */ N_CPU, /* The node has one or more cpus */ + N_GENERIC_INITIATOR, /* The node is a GI only node */ NR_NODE_STATES }; diff --git a/include/linux/topology.h b/include/linux/topology.h index cb0775e1ee4b..9d5f8501efcf 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -125,6 +125,13 @@ static inline void set_numa_mem(int node) } #endif +#ifndef set_gi_numa_mem +static inline void set_gi_numa_mem(int gi, int node) +{ + _node_numa_mem_[gi] = node; +} +#endif + #ifndef node_to_mem_node static inline int node_to_mem_node(int node) { From patchwork Mon Apr 15 17:49:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 10901305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C735014DB for ; Mon, 15 Apr 2019 17:49:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B00DE283F9 for ; Mon, 15 Apr 2019 17:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A44A12867F; Mon, 15 Apr 2019 17:49:56 +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=ham 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 47EC9283F9 for ; Mon, 15 Apr 2019 17:49:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A89C26B000A; Mon, 15 Apr 2019 13:49:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 94C166B000C; Mon, 15 Apr 2019 13:49:52 -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 814256B000D; Mon, 15 Apr 2019 13:49:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by kanga.kvack.org (Postfix) with ESMTP id 4C6926B000A for ; Mon, 15 Apr 2019 13:49:52 -0400 (EDT) Received: by mail-ot1-f71.google.com with SMTP id q25so9489211otf.6 for ; Mon, 15 Apr 2019 10:49:52 -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:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=c8Oa8if3Ah0YDZHoU72RxzlhFP90iXNpwesyngeW7fE=; b=RFsq2AdcuVCSR2KKgSlurFt2EN+ta3AFRlQoI/1zeMT87tPxgoemLWAc+CtTswWWzC kc/XqlXfpiPMVMB/fIIMW+tSOG9M7Njy4Nk2pN9HxzT4UXLy4azy4bkNu7+mkiWMq7XW wy77FlW6uwDk4V0FM5I4GhP4VUwdasDr7OA7CO11oRh8j5uk9P8870H1gEtug1/M1Uul wYiGw56cl+Bs6VU7A7AqoZvRHHSnmhwXC7LSXhHMxn1EDPFYLmDmw9R0iQWQF7Tjp6UR Ly1g83PQK+6bFgKRbuZECIwVS/YaMaZa60s1MrmyITO6HodJyW7OhcozMhQFOjracPT4 87Yw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com X-Gm-Message-State: APjAAAVC6T0ypv9E3E1quxCC2hHCkPbwe7Tok8RVFOJYa/51iI/VJ/GJ oV6VRsABbrillUBMqTbYn+IVhvgR5Twy9z83k1RqAvwhmx0wQM6fIo8f1FLd6SNNJmrWAArtgFE cBgDe7DfpW+fS5Eh8YfnhPpnxtzacAiTHObDfqB7uj0vkhduBWsg37ezla/TT6dYTyw== X-Received: by 2002:a9d:63c9:: with SMTP id e9mr48493187otl.76.1555350591965; Mon, 15 Apr 2019 10:49:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEVVWoAbj3JROSFoQ4O5TLPgUnwu2zOrmjoReI1dG0L6cIWeAWP8QEPN1Jdlf/RFdBUswZ X-Received: by 2002:a9d:63c9:: with SMTP id e9mr48493116otl.76.1555350590395; Mon, 15 Apr 2019 10:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555350590; cv=none; d=google.com; s=arc-20160816; b=je7CAsI7enwKbvhzYq/1VCFlw0Cy+iZseCgEbIFq3bdKL7uTZHP+RRjYsp2P61I2Ud aHU7n1CjMWFpERZiJK8pSmfE8p1+ixvpHoPhH3Kr31yxUyZ+fhTv6jlpnw9S9x7hbTWf iEzTTmN+Ab0E/GA86B/uyqqMyIxHYPbplG9lGpeJ7EWmvI3ZuRPWxyg6kUpEf7Yxzpg6 1kSoIQ0CcvyY+cXsj9YwJDrziAXdYiO+rTYHsTU4GROfls0dEKX1LshnILBMs3Uph+7J 5NMOXijYesLGY5y8UxANZxD0uYzkPPKHrW5mVaThCYx9WJXaJ8v1pqfo4F3af83IwVjO VO5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=c8Oa8if3Ah0YDZHoU72RxzlhFP90iXNpwesyngeW7fE=; b=a1Wi5szgsURLxq+ax9mlWpULGBuUJBXb/UhT5BuNvYnWkpe3aTvpnS75kse5xcnEA+ +/TL+DdABc2wh9lkqLsv6Lug5mo2IKwjQ1nYtHWHU2STRTr0O4TAtdhSksAOBjtRNVEl j7vf7JWkwRTQuuu+t5U4BTDl50qfXhm2/RBwm9H3HhfUy3uvGW3VFXCvOipncB9xi1j8 NV14SdCuYhNo8xAk0+tn/JzC9Bp3ZzKf12GgMr1Q7Q6MdKjdeCPnmfSEfKsGn8Qe7ltO 3mIOnMydPQYZTDxQUsFFrBgeHLRTrc07KIbAZZAg55Ff5uSuohloS0wKCguQint2UmP4 NF7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from huawei.com (szxga05-in.huawei.com. [45.249.212.191]) by mx.google.com with ESMTPS id g9si14922636oib.37.2019.04.15.10.49.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 10:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) client-ip=45.249.212.191; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E4BA485083B4B38C348A; Tue, 16 Apr 2019 01:49:46 +0800 (CST) Received: from FRA1000014316.huawei.com (100.126.230.97) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Tue, 16 Apr 2019 01:49:37 +0800 From: Jonathan Cameron To: , , , CC: =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Keith Busch , "Rafael J . Wysocki" , , Andrew Morton , "Jonathan Cameron" Subject: [PATCH 2/4 V3] arm64: Support Generic Initiator only domains Date: Tue, 16 Apr 2019 01:49:05 +0800 Message-ID: <20190415174907.102307-3-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> References: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [100.126.230.97] X-CFilter-Loop: Reflected 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 The one thing that currently needs doing from an architecture point of view is associating the GI domain with its nearest memory domain. This allows all the standard NUMA aware code to get a 'reasonable' answer. A clever driver might elect to do load balancing etc if there are multiple host / memory domains nearby, but that's a decision for the driver. Signed-off-by: Jonathan Cameron --- arch/arm64/kernel/smp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 824de7038967..7c419bf92374 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -731,6 +731,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) { int err; unsigned int cpu; + unsigned int node; unsigned int this_cpu; init_cpu_topology(); @@ -769,6 +770,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus) set_cpu_present(cpu, true); numa_store_cpu_info(cpu); } + + /* + * Walk the numa domains and set the node to numa memory reference + * for any that are Generic Initiator Only. + */ + for_each_node_state(node, N_GENERIC_INITIATOR) + set_gi_numa_mem(node, local_memory_node(node)); } void (*__smp_cross_call)(const struct cpumask *, unsigned int); From patchwork Mon Apr 15 17:49:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 10901303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BD8B14DB for ; Mon, 15 Apr 2019 17:49:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 556C3283F9 for ; Mon, 15 Apr 2019 17:49:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49A6A28662; Mon, 15 Apr 2019 17:49:54 +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=ham 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 C7FD5283F9 for ; Mon, 15 Apr 2019 17:49:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF2FF6B0008; Mon, 15 Apr 2019 13:49:51 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EA2286B000A; Mon, 15 Apr 2019 13:49:51 -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 D904E6B000C; Mon, 15 Apr 2019 13:49:51 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by kanga.kvack.org (Postfix) with ESMTP id A2A726B0008 for ; Mon, 15 Apr 2019 13:49:51 -0400 (EDT) Received: by mail-ot1-f71.google.com with SMTP id j20so9514227otr.0 for ; Mon, 15 Apr 2019 10:49:51 -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:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=hF0XPxmSlriUa3biRRCnOMC8/O51OfJgLGjA5b/WPw4=; b=HgLVBMWSLlhVaGuXz12vhuo0Ue114AM6MQx8akHXrVkYxex2OtMaHO4oxtCvjXAPpJ S6FD2w6vYqvBqNYuY5MO909Al1Ux5qgpljRW/x9Tj+uahILNHPTpGsq/Ku8y4LUVK6mB KOjYHCE/F6jX4OKsThSJi31jCkxlocOAI0+kjAEP1/ndMBghvD4mlv5j63VDpPY8lnp3 2W83dzBL6d6TXLKYIHuq1Lh8idPjIIDKAVUH5sePl6sq5YGPGUrHp4rxytXt2+dJWalb 3NYm4s+MxRWc4whytzakTMTxtCTvI7Gd6m0n4L8ypQdSD1lVwunSvMLZYC2zCPGh/i0Q WbDg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com X-Gm-Message-State: APjAAAVdrBZ/XYnaZVp2EKBSyobWOx0JOgXMSGM/99sX50pql7/0EqiG eKl09uYDrXD2iNPFNPeJkkNLnR335A14CSXd1IC0NbuaPVjGrtlt8lJQpYCEz7u24uQ3u986y6v t1GovbKvBMj/KKQ04HRiaKCH+urUIGLfmLbMsCifT/0ZRzHeVPjjWF8jTMVd/L5siGg== X-Received: by 2002:a9d:6344:: with SMTP id y4mr40042007otk.11.1555350591285; Mon, 15 Apr 2019 10:49:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3G85ShjNKJ1YYderLm55mekLTOln78aZ75o/GmiSj3UHMMiG5ziUkd9DsUNz2StLQ3Rwq X-Received: by 2002:a9d:6344:: with SMTP id y4mr40041973otk.11.1555350590432; Mon, 15 Apr 2019 10:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555350590; cv=none; d=google.com; s=arc-20160816; b=or7uo4LnIqjVyelwxRbh5Ot4l1EmH52jwGgRhRmYrb0tCQIk2Tq6/KoXAw+uEh91RX pD3CUfBq4UeaUb0aC+ZeVZGNUhal4zDWwxkEJ/cI7jUsZxsh0MAxU0vhuXVXOWFRKc36 aeAbypiCDOLw6hqzXYVjuK7ijwgVMp+5IPxm6BghKv6AWfPKW0ujsDR9R4okQnrp92T+ 7USXU3+zCWzlpEUybNvUCr+F0fjdpVc6xWMvrsy0muLxt+8Ik7X5iC3ZNSxSEOkxrSDQ /N7Qg3jliDwP8funf3ORMjvCIrlvvyuHCqKPFOhXXJzdIChkRJNAb0xffejQ64fmdCty bZgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=hF0XPxmSlriUa3biRRCnOMC8/O51OfJgLGjA5b/WPw4=; b=w99o2upRW1OXpEFsnQfjlrHa0H9PSSV2e5ht42rJ7yg3WCTHfqqIDNAHlrQekoSnim uAC5eTlYz7iWA3DdAewqjVDTZANA6CPnok7IKlCB7BONFIY2mLL8yNrb0DaRtjfBw1Ei 9oKd0agxiKLqL+aj82HrVutMeyDqYEU88o35FNZ5QtcxeeZXbcnNG5JTpXqyQ1x5JeYR vQ29YLejQhP8SBFlShNm9D/8EYdn2i1G6Jn6t2dBRFBhr5lXCVVQa/lKf+TgurYv0Sla a/ZJGyHwGMVIyu+29NicB5GX8S4PfvTenSyjefw6kiRQ/P9MgoeTvwoNnAGrFw05WcQs IlOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from huawei.com (szxga05-in.huawei.com. [45.249.212.191]) by mx.google.com with ESMTPS id 32si22039336ots.280.2019.04.15.10.49.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 10:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) client-ip=45.249.212.191; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E9F36BCDACFC859002AD; Tue, 16 Apr 2019 01:49:46 +0800 (CST) Received: from FRA1000014316.huawei.com (100.126.230.97) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Tue, 16 Apr 2019 01:49:40 +0800 From: Jonathan Cameron To: , , , CC: =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Keith Busch , "Rafael J . Wysocki" , , Andrew Morton , "Jonathan Cameron" Subject: [PATCH 3/4 V3] x86: Support Generic Initiator only proximity domains Date: Tue, 16 Apr 2019 01:49:06 +0800 Message-ID: <20190415174907.102307-4-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> References: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [100.126.230.97] X-CFilter-Loop: Reflected 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 Done in a somewhat different fashion to arm64. Here the infrastructure for memoryless domains was already in place. That infrastruture applies just as well to domains that also don't have a CPU, hence it works for Generic Initiator Domains. In common with memoryless domains we only register GI domains if the proximity node is not online. If a domain is already a memory containing domain, or a memoryless domain there is nothing to do just because it also contains a Generic Initiator. Signed-off-by: Jonathan Cameron --- arch/x86/include/asm/numa.h | 2 ++ arch/x86/kernel/setup.c | 1 + arch/x86/mm/numa.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h index bbfde3d2662f..f631467272a3 100644 --- a/arch/x86/include/asm/numa.h +++ b/arch/x86/include/asm/numa.h @@ -62,12 +62,14 @@ extern void numa_clear_node(int cpu); extern void __init init_cpu_to_node(void); extern void numa_add_cpu(int cpu); extern void numa_remove_cpu(int cpu); +extern void init_gi_nodes(void); #else /* CONFIG_NUMA */ static inline void numa_set_node(int cpu, int node) { } static inline void numa_clear_node(int cpu) { } static inline void init_cpu_to_node(void) { } static inline void numa_add_cpu(int cpu) { } static inline void numa_remove_cpu(int cpu) { } +static inline void init_gi_nodes(void) { } #endif /* CONFIG_NUMA */ #ifdef CONFIG_DEBUG_PER_CPU_MAPS diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 3d872a527cd9..240568c3ac60 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1245,6 +1245,7 @@ void __init setup_arch(char **cmdline_p) prefill_possible_map(); init_cpu_to_node(); + init_gi_nodes(); io_apic_init_mappings(); diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index dfb6c4df639a..5770d2dcad29 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -732,6 +732,20 @@ static void __init init_memory_less_node(int nid) */ } +/* + * Generic Initiator Nodes may have neither CPU nor Memory. + * At this stage if either of the others were present we would + * already be online. + */ +void __init init_gi_nodes(void) +{ + int nid; + + for_each_node_state(nid, N_GENERIC_INITIATOR) + if (!node_online(nid)) + init_memory_less_node(nid); +} + /* * Setup early cpu_to_node. * From patchwork Mon Apr 15 17:49:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 10901309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36AAF13B5 for ; Mon, 15 Apr 2019 17:50:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FFC6283F9 for ; Mon, 15 Apr 2019 17:50:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1462E28662; Mon, 15 Apr 2019 17:50:00 +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=ham 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 D56BB283F9 for ; Mon, 15 Apr 2019 17:49:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F40D96B0010; Mon, 15 Apr 2019 13:49:56 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id ED3086B0266; Mon, 15 Apr 2019 13:49:56 -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 D1C856B0269; Mon, 15 Apr 2019 13:49:56 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by kanga.kvack.org (Postfix) with ESMTP id 9CA5A6B0010 for ; Mon, 15 Apr 2019 13:49:56 -0400 (EDT) Received: by mail-oi1-f199.google.com with SMTP id r84so8430080oia.9 for ; Mon, 15 Apr 2019 10:49:56 -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:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/ctch9BIG/gBXs/UumXXhUGfeedoBTKJpXlhlTSkdIA=; b=IFjtM3+yIubz8k+gSsUHmCSI9U1WxP/r9XxHZaWrUlwj9OwboNlJNrPJtfsFd/K2dg X6HDQn3FHK7/HP61orkEHEXJHPzCOAM22Zk3dA36g7ud3oH9OUSsQYvoWD3qr34ym0Cm b7KvplycWt2rL2m/0P2EQXmqS5uxzRN/0wDOBl23GXyUuzai4VcSFhr56SVHz9PjrM3F I9RbWmc56EbAPNO4cQiAIu6+AtLgzOLWzTETzDOSqTSSOon7gfuc9O1vQz3M/bz2V0wB IGM0BznWlRjErbT/0ZVtstUVfoBhdSC+ZcuZEF7rdKTh0bF81pdzxzEgxq+QPP4jMrPi OkKw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com X-Gm-Message-State: APjAAAX3DZhviMpj442ojxTChHW2+fxd1PiflentzUh4n1+SucKzPof9 AlkQRLiuGFogoodWlNsh+HSGnHJBm0q9Gh5bwpbLQRFlBBQdt8FkDa+zdS1VkNxoWUFomyASy/0 BPj655bQRUYyd3HaVWquZvcXgsZ8ApIoWwzjqYkNhcWN7ib7CI/Bg0tJKSB2953pDxw== X-Received: by 2002:aca:c4cc:: with SMTP id u195mr20452269oif.40.1555350596312; Mon, 15 Apr 2019 10:49:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwco1GY5DB3Ex9PbIYdNImS6/r8UepslI1A/mQVYe4nLnOkxt5H5BnsQaRW7aPFfdSSWa7A X-Received: by 2002:aca:c4cc:: with SMTP id u195mr20452229oif.40.1555350595552; Mon, 15 Apr 2019 10:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555350595; cv=none; d=google.com; s=arc-20160816; b=mqgW4h4WA0H9nSAWuLH5KjrnuKgnPq+szsy/p0yj45aWq7A9S0evPXKUCuBmL6BrJW qRb1EoUOkNZ3wvN2B7lFqdCPt/r0SQP/IMRVFBP2Dy3nFur/rpkY2s0kTMxHORM08uy2 DaanQMNLWdwMJom7n3v6BDHyCkU1EdTY5S0yBfNQxxEfmt9PpJZmYXGfZ1phtx52JpO5 FM1Dg2xtMke1VwWF6WWftAZl7gPpp/r/JpiBBA1n9HrU+jzXkmkEy+h1vAQ13n2NXk6j MIPORvJW6KFnhpHZF7ubJCC9Iv+J8JdKKwRWdbBkvcE+xbCgqzSQcJXrkny0at130/pZ ppjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=/ctch9BIG/gBXs/UumXXhUGfeedoBTKJpXlhlTSkdIA=; b=rp+IfqwIcn8WfGHvp8CuZjumfBBhHXWnJSUtSinQbvzydAvzm7jkghF5h3oa0HrgG0 6YujTbCvFkRFnQlETWHs6yims0bOPpNDNfEOTjBV0/IuWA0a1slLs9bmPNg9rSdwB03c rwrWjyP9+jxlzd1tsoRpUhHyooa5Fo1JHaetWfaKpDwjz5CVawmvxhQWMnJHwbwstYAg UQ4no/UxLGZagERaOJdTzqJYcFhkj0aG72QKYqgDl3d+meKX3OJt8WGnbcilV8yo/oi4 7Cs2kQiYJEqAuEutxmvEOTSl+kTmU0/2vVsKQnyhjTr/fzzWF57fIom+RRYt2GpYeBF0 3AbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from huawei.com (szxga06-in.huawei.com. [45.249.212.32]) by mx.google.com with ESMTPS id 5si18298242oii.252.2019.04.15.10.49.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 10:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) client-ip=45.249.212.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jonathan.cameron@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 02E473ED7A4E7FCD7631; Tue, 16 Apr 2019 01:49:52 +0800 (CST) Received: from FRA1000014316.huawei.com (100.126.230.97) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Tue, 16 Apr 2019 01:49:42 +0800 From: Jonathan Cameron To: , , , CC: =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Keith Busch , "Rafael J . Wysocki" , , Andrew Morton , "Jonathan Cameron" Subject: [PATCH 4/4 V3] ACPI: Let ACPI know we support Generic Initiator Affinity Structures Date: Tue, 16 Apr 2019 01:49:07 +0800 Message-ID: <20190415174907.102307-5-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> References: <20190415174907.102307-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [100.126.230.97] X-CFilter-Loop: Reflected 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 Until we tell ACPI that we support generic initiators, it will have to operate in fall back domain mode and all _PXM entries should be on existing non GI domains. This patch sets the relevant OSC bit to make that happen. Note that this currently doesn't take into account whether we have the relevant setup code for a given architecture. Do we want to make this optional, or should the initial patch set just enable it for all ACPI supporting architectures? Signed-off-by: Jonathan Cameron --- drivers/acpi/bus.c | 1 + include/linux/acpi.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index eec263c9019e..ef251f454a5b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -315,6 +315,7 @@ static void acpi_bus_osc_support(void) capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT; + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT; #ifdef CONFIG_X86 if (boot_cpu_has(X86_FEATURE_HWP)) { diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d5dcebd7aad3..cc68b2ad0630 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -503,6 +503,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); #define OSC_SB_PCLPI_SUPPORT 0x00000080 #define OSC_SB_OSLPI_SUPPORT 0x00000100 #define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT 0x00001000 +#define OSC_SB_GENERIC_INITIATOR_SUPPORT 0x00002000 extern bool osc_sb_apei_support_acked; extern bool osc_pc_lpi_support_confirmed;