From patchwork Wed Oct 17 21:54:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10646109 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 2662E13B0 for ; Wed, 17 Oct 2018 22:03:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17C6528A10 for ; Wed, 17 Oct 2018 22:03:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BC3E28A20; Wed, 17 Oct 2018 22:03:51 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A077828A10 for ; Wed, 17 Oct 2018 22:03:50 +0000 (UTC) Received: from localhost ([::1]:39280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCtuv-00072U-UC for patchwork-qemu-devel@patchwork.kernel.org; Wed, 17 Oct 2018 18:03:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCtto-0006QN-Lm for qemu-devel@nongnu.org; Wed, 17 Oct 2018 18:02:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCttm-0005jF-DJ for qemu-devel@nongnu.org; Wed, 17 Oct 2018 18:02:40 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:40311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCttm-0005So-1k for qemu-devel@nongnu.org; Wed, 17 Oct 2018 18:02:38 -0400 Received: by mail-pl1-x644.google.com with SMTP id 1-v6so13324195plv.7 for ; Wed, 17 Oct 2018 15:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:cc:from:to; bh=djgaHHspX/r4LW9RNoaqNxt/yfn+CeUOWfG+J5f6csU=; b=HlOELGmYDfn9PnvTKhU9Q6ALH1Z+HmwqyAGfQGyHF49AHwquoZTJfyQqQ141WIMjNr 1zUuPVkdHfyq7vS8MBAPpikdbVHmxKI2b8IV03kjoxJGjn7+9eK+dhhkCMYN9Jsv5f/N tEdnQX0F86EtYTA/NSBZl9CQ5qME7n8KaiUyI4Ufqzn41b1+F7tll+DluBhHNR9Qsgd3 e4JG0/zoEhKANAC75Gu+iavO2VuaE/iwY9Ga7y/hgCWuxYBxl7cmdEGfwWm/bLNGhjQg FyqvLaV8COWGpWmfGse11kXlRxLlPaXEe1TJfHn0cEUcaF88oZ/od6IVwUzGlAHD96hi SRxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:cc:from:to; bh=djgaHHspX/r4LW9RNoaqNxt/yfn+CeUOWfG+J5f6csU=; b=hoojRhGerhJuQPMFc+FtuftaWYQs9xucI3KRt5O47P6vFZKUJfEfSBqUidM2Pjs32C PyKWO1y9XwRwbpb5j2vT/P+C5/YZG1mkHwGIbOvmbyUXq8aS59nfh9lxVSY0E0jV2Pge BnfrfGKiB048QzGyoiLqIdeyCvW+8ZOXDbq/lhGsM4F8HDJIHc8AYRq7TCJe01bUc+mr XcEWH0dzXKltkxToB227KbDpN9k4ZPM19dwnMXK+L8fCbLzWxHwwpEzeyYbN/41L9G2i cpcOvqG/XcC0A8jZFHnPBnOkgyrhPCf4RhtLQTh7pXziqpnOJlV4MlgEiBlwBiuErfQN tgVw== X-Gm-Message-State: ABuFfoh3cStvusqizsBqZzVNUhKupRHc7Km0EwVAoB853aKSDA6NHp04 Juza+N/eWvBgCmEaPJP6E38uUg== X-Google-Smtp-Source: ACcGV63jiVZfeS4uROhujsNhWLbVsO/xlhl4KlM6E34LUbu6mnf75jPIR26/PEdAXZO5BJ0P6gIWyQ== X-Received: by 2002:a17:902:109:: with SMTP id 9-v6mr27207266plb.320.1539813740080; Wed, 17 Oct 2018 15:02:20 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id o24-v6sm35043248pfa.90.2018.10.17.15.02.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:02:19 -0700 (PDT) Date: Wed, 17 Oct 2018 14:54:17 -0700 Message-Id: <20181017215422.3973-1-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 From: Palmer Dabbelt To: Peter Maydell X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::644 Subject: [Qemu-devel] [PULL] First RISC-V Patch Set for the 3.1 Soft Freeze X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Clark , Alistair Francis , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The following changes since commit 09558375a634e17cea6cfbfec883ac2376d2dc7f: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181016-1' into staging (2018-10-16 17:42:56 +0100) are available in the Git repository at: git://github.com/riscv/riscv-qemu.git tags/riscv-for-master-3.1-sf0 for you to fetch changes up to 7c28f4da20e5585dce7d575691dac5392b7c6f78: RISC-V: Don't add NULL bootargs to device-tree (2018-10-17 13:02:30 -0700) ---------------------------------------------------------------- First RISC-V Patch Set for the 3.1 Soft Freeze This pull request contains a handful of patches that have been floating around various trees for a while but haven't made it upstream. These patches all appear quite safe. They're all somewhat independent from each other: * One refactors our IRQ management function to allow multiple interrupts to be raised an once. This patch has no functional difference. * Cleaning up the op_helper/cpu_helper split. This patch has no functional difference. * Updates to various constants to keep them in sync with the latest ISA specification and to remove some non-standard bits that snuck in. * A fix for a memory leak in the PLIC driver. * A fix to our device tree handling to avoid provinging a NULL string. I've given this my standard test: building the port, booting a Fedora root filesytem on the latest Linux tag, and then shutting down that image. Essentially I'm just following the QEMU RISC-V wiki page's instructions. Everything looks fine here. We have a lot more outstanding patches so I'll definately be submitting another PR for the soft freeze. ---------------------------------------------------------------- Michael Clark (5): RISC-V: Allow setting and clearing multiple irqs RISC-V: Move non-ops from op_helper to cpu_helper RISC-V: Update CSR and interrupt definitions RISC-V: Add missing free for plic_hart_config RISC-V: Don't add NULL bootargs to device-tree hw/riscv/sifive_clint.c | 8 +- hw/riscv/sifive_plic.c | 4 +- hw/riscv/sifive_u.c | 4 +- hw/riscv/spike.c | 6 +- hw/riscv/virt.c | 6 +- target/riscv/Makefile.objs | 2 +- target/riscv/cpu.c | 6 +- target/riscv/cpu.h | 22 +- target/riscv/cpu_bits.h | 683 +++++++++++++++++--------------- target/riscv/{helper.c => cpu_helper.c} | 35 +- target/riscv/op_helper.c | 34 +- 11 files changed, 438 insertions(+), 372 deletions(-) rename target/riscv/{helper.c => cpu_helper.c} (95%)