{"id":732138,"url":"http://patchwork.ozlabs.org/api/patches/732138/?format=json","web_url":"http://patchwork.ozlabs.org/project/skiboot/patch/20170224124336.29047-1-npiggin@gmail.com/","project":{"id":44,"url":"http://patchwork.ozlabs.org/api/projects/44/?format=json","name":"skiboot firmware development","link_name":"skiboot","list_id":"skiboot.lists.ozlabs.org","list_email":"skiboot@lists.ozlabs.org","web_url":"http://github.com/open-power/skiboot","scm_url":"http://github.com/open-power/skiboot","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170224124336.29047-1-npiggin@gmail.com>","list_archive_url":null,"date":"2017-02-24T12:43:36","name":"dt: add ibm, tlb-(radix-)congruence-classes for tlbie invalidation","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"714b3b3f3f38c926e0a1a11542f3edaa66258648","submitter":{"id":69518,"url":"http://patchwork.ozlabs.org/api/people/69518/?format=json","name":"Nicholas Piggin","email":"npiggin@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/skiboot/patch/20170224124336.29047-1-npiggin@gmail.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/732138/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/732138/checks/","tags":{},"related":[],"headers":{"Return-Path":"<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","skiboot@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","skiboot@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3vV9lH5QCHz9s7t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 24 Feb 2017 23:43:55 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3vV9lH4QwDzDqHZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 24 Feb 2017 23:43:55 +1100 (AEDT)","from mail-pg0-x244.google.com (mail-pg0-x244.google.com\n\t[IPv6:2607:f8b0:400e:c05::244])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3vV9lB0dPnzDqGv\n\tfor <skiboot@lists.ozlabs.org>; Fri, 24 Feb 2017 23:43:49 +1100 (AEDT)","by mail-pg0-x244.google.com with SMTP id z128so3004004pgb.3\n\tfor <skiboot@lists.ozlabs.org>; Fri, 24 Feb 2017 04:43:49 -0800 (PST)","from roar.au.ibm.com ([203.221.48.234])\n\tby smtp.gmail.com with ESMTPSA id\n\tu129sm15049237pfb.130.2017.02.24.04.43.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 24 Feb 2017 04:43:45 -0800 (PST)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"GT3IFpGp\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"GT3IFpGp\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"GT3IFpGp\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=Jk4ahQPNqXFVrFL//zEAsw8zZPdVsoBSVcIhV4AAVHE=;\n\tb=GT3IFpGptKxGSW8rMK8dvRrjdUgT99VwmBQVRYOgBK5S2A+t678e+rWHlL6zIsQvYA\n\thyJUYiGlPUCNuj9o1ce6pXxBLNgwHA1ZRH4tp/IgYWE7lonvwgxhu4PJ9Q1mIPbToIsA\n\t3N4jcraXxIayNTt3ZKUhJkB7+DlUT3bskTfnNre2VdfChYpL/3CV/mOSXJW8Q5Dnm9sj\n\tm11WB313RPul5gDWbMTGoBx8ThLUkmFkVH3jC5eatBdxtcRZxzGXh1cIAooLHvC7Dazu\n\tNi3K9qHaG57Lxc3+IjZhTf0l41jbuFjt4ecDHBI/DHLa59N1XgaWj4DqCs8yUQtnn2Qj\n\tMBuQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=Jk4ahQPNqXFVrFL//zEAsw8zZPdVsoBSVcIhV4AAVHE=;\n\tb=ELW6HzYh1DUZsEF0SY2ABJ7HTG6rnQKc5HtJVYt2X/vilRY/gfNHefdciJpzUDhiXm\n\tC31v2A3L8x/z/ayeADopjGQTZmM1BGsRRPcGZA3UiBYm9yG2ALHrcCWOXaAG2AMvyZM6\n\tIocDv6KzRHRVVb0TZRc6fpi7+mi/9xu7i1g6JQSPxWzeOHQrdsrtPzx0tzt3t7PWKN6o\n\tIVdmI9OC986tnfZObbt49/ujFAqTmSIdfN2QDfHadeu7AW6hzvZP6wb9x3W9ReM9nIdm\n\t4fm8a5Xn+I7DQocjkxLWc8ly00roRx5D0+QNqMDePKNQasr1aQcui8OkEJsyg3GdG4bB\n\tQEUA==","X-Gm-Message-State":"AMke39mZeudM7IIVbH7GLy+UjI3uBTFf94VL1kfovGZ+ZQ2n7YkXBx106r1UlnMz6so7gw==","X-Received":"by 10.99.127.71 with SMTP id p7mr3269677pgn.125.1487940227494;\n\tFri, 24 Feb 2017 04:43:47 -0800 (PST)","From":"Nicholas Piggin <npiggin@gmail.com>","To":"skiboot@lists.ozlabs.org","Date":"Fri, 24 Feb 2017 22:43:36 +1000","Message-Id":"<20170224124336.29047-1-npiggin@gmail.com>","X-Mailer":"git-send-email 2.11.0","Subject":"[Skiboot] [PATCH] dt: add ibm,\n\ttlb-(radix-)congruence-classes for tlbie invalidation","X-BeenThere":"skiboot@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Mailing list for skiboot development <skiboot.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/skiboot/>","List-Post":"<mailto:skiboot@lists.ozlabs.org>","List-Help":"<mailto:skiboot-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>","Cc":"\"Aneesh Kumar K . V\" <aneesh.kumar@linux.vnet.ibm.com>,\n\tNicholas Piggin <npiggin@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"},"content":"Signed-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n doc/device-tree.rst |  3 +++\n hdata/cpu-common.c  | 15 +++++++++++++++\n 2 files changed, 18 insertions(+)","diff":"diff --git a/doc/device-tree.rst b/doc/device-tree.rst\nindex fe527c65..b6cc7d2f 100644\n--- a/doc/device-tree.rst\n+++ b/doc/device-tree.rst\n@@ -181,6 +181,9 @@ Root node of device tree\n \t\t\t/* SLB size, use as-is */\n \t\t\tibm,slb-size = <0x20>;\n \n+\t\t\t/* TLB congruence classes for TLBIE invalidation */\n+\t\t\tibm,tlb-congruence-classes = <0x200>;\n+\n \t\t\t/* VSX support, use as-is */\n \t\t\tibm,vmx = <0x2>;\n \ndiff --git a/hdata/cpu-common.c b/hdata/cpu-common.c\nindex 50c6adc7..aa2752c1 100644\n--- a/hdata/cpu-common.c\n+++ b/hdata/cpu-common.c\n@@ -64,6 +64,8 @@ struct dt_node * add_core_common(struct dt_node *cpus,\n \t       0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 48 .. 55 */\n \t       0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, /* 56 .. 63 */\n \t};\n+\tint tlb_congruence = 0;\n+\tint tlb_radix_congruence = 0;\n \n \tconst uint8_t *pa_features;\n \tsize_t pa_features_size;\n@@ -84,11 +86,13 @@ struct dt_node * add_core_common(struct dt_node *cpus,\n \t\tname = \"PowerPC,POWER7\";\n \t\tpa_features = pa_features_p7;\n \t\tpa_features_size = sizeof(pa_features_p7);\n+\t\ttlb_congruence = 128;\n \t\tbreak;\n \tcase PVR_TYPE_P7P:\n \t\tname = \"PowerPC,POWER7+\";\n \t\tpa_features = pa_features_p7p;\n \t\tpa_features_size = sizeof(pa_features_p7p);\n+\t\ttlb_congruence = 128;\n \t\tbreak;\n \tcase PVR_TYPE_P8E:\n \tcase PVR_TYPE_P8:\n@@ -96,6 +100,7 @@ struct dt_node * add_core_common(struct dt_node *cpus,\n \t\tname = \"PowerPC,POWER8\";\n \t\tpa_features = pa_features_p8;\n \t\tpa_features_size = sizeof(pa_features_p8);\n+\t\ttlb_congruence = 512;\n \t\tbreak;\n \tcase PVR_TYPE_P9:\n \t\tname = \"PowerPC,POWER9\";\n@@ -106,6 +111,8 @@ struct dt_node * add_core_common(struct dt_node *cpus,\n \t\t\tpa_features = pa_features_p9_dd2;\n \t\t\tpa_features_size = sizeof(pa_features_p9_dd2);\n \t\t}\n+\t\ttlb_congruence = 256;\n+\t\ttlb_radix_congruence = 128;\n \t\tbreak;\n \tdefault:\n \t\tname = \"PowerPC,Unknown\";\n@@ -147,6 +154,14 @@ struct dt_node * add_core_common(struct dt_node *cpus,\n \t\t\t\tpa_features, pa_features_size);\n \t}\n \tdt_add_property_cells(cpu, \"ibm,slb-size\", 0x20);\n+\tif (tlb_congruence) {\n+\t\tdt_add_property_cells(cpu, \"ibm,tlb-congruence-classes\",\n+\t\t\t\t\t\ttlb_congruence);\n+\t}\n+\tif (tlb_radix_congruence) {\n+\t\tdt_add_property_cells(cpu, \"ibm,tlb-radix-congruence-classes\",\n+\t\t\t\t\t\ttlb_radix_congruence);\n+\t}\n \n \tdt_add_property_cells(cpu, \"ibm,vmx\", 0x2);\n \tdt_add_property_cells(cpu, \"ibm,dfp\", 0x2);\n","prefixes":[]}