From patchwork Tue May 4 14:01:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bruno Larsen (billionai)" X-Patchwork-Id: 12238121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83BE7C43460 for ; Tue, 4 May 2021 14:05:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E51D610FA for ; Tue, 4 May 2021 14:05:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E51D610FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=eldorado.org.br Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldvgJ-00076E-2o for qemu-devel@archiver.kernel.org; Tue, 04 May 2021 10:05:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldvd3-0005Kg-U8; Tue, 04 May 2021 10:02:25 -0400 Received: from [201.28.113.2] (port=56991 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldvd2-0002dQ-0J; Tue, 04 May 2021 10:02:25 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 4 May 2021 11:02:19 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 698DA8012B4; Tue, 4 May 2021 11:02:19 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH v4 0/5] target/ppc: Untangle CPU init from translation Date: Tue, 4 May 2021 11:01:52 -0300 Message-Id: <20210504140157.76066-1-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 X-OriginalArrivalTime: 04 May 2021 14:02:19.0561 (UTC) FILETIME=[18F1C190:01D740EE] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, "Bruno Larsen \(billionai\)" , matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Based-on: ppc-for-6.1 tree This patch series aims to remove the logic of initializing CPU from the file related to TCG translation. To achieve this, we have to make it so registering SPRs isn't directly tied to TCG, and move code only related to translation out of translate_init.c.inc and into translate.c. This is in preparation to compile this target without TCG. Changes for v4: * reordered patches, to make partially applying simpler * removed patches that were already applied * undone creation of spt_tcg.c.inc, now waiting for further cleanup * moved SPR_NOACCESS motion to last patch, and to spr_tcg.h Changes for v3: * fixed the parameters of _spr_register * remove some redundant #include statements * removed some functions that were mentioned in v2 as unnecessary * added copyright header to relevant files * removed first patch, that was already applied * removed a changed that would add a regression Changes for v2: * split and reordered patches, to make it easier to review * improved commit messages * Undid creation of spr_common, as it was unnecessary * kept more functions as static * ensured that the project builds after every commit Bruno Larsen (billionai) (5): target/ppc: Fold gen_*_xer into their callers target/ppc: renamed SPR registration functions target/ppc: move SPR R/W callbacks to translate.c target/ppc: turned SPR R/W callbacks not static target/ppc: isolated cpu init from translation logic .../ppc/{translate_init.c.inc => cpu_init.c} | 1848 ++++------------- target/ppc/meson.build | 1 + target/ppc/spr_tcg.h | 136 ++ target/ppc/translate.c | 1072 +++++++++- 4 files changed, 1598 insertions(+), 1459 deletions(-) rename target/ppc/{translate_init.c.inc => cpu_init.c} (89%) create mode 100644 target/ppc/spr_tcg.h