From patchwork Wed Dec 26 17:20:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10743259 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 CADD013A4 for ; Wed, 26 Dec 2018 17:34:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABE6226246 for ; Wed, 26 Dec 2018 17:34:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 997C9262AE; Wed, 26 Dec 2018 17:34:13 +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 B7DA926246 for ; Wed, 26 Dec 2018 17:34:12 +0000 (UTC) Received: from localhost ([127.0.0.1]:47544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcD4N-0004IK-UG for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Dec 2018 12:34:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcCrb-0004bV-LX for qemu-devel@nongnu.org; Wed, 26 Dec 2018 12:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcCrZ-00081n-KZ for qemu-devel@nongnu.org; Wed, 26 Dec 2018 12:20:59 -0500 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:34801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcCrZ-0007rW-C0 for qemu-devel@nongnu.org; Wed, 26 Dec 2018 12:20:57 -0500 Received: by mail-qt1-x833.google.com with SMTP id r14so17897998qtp.1 for ; Wed, 26 Dec 2018 09:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:in-reply-to:references:cc:from:to; bh=tnbr8NQlLnEwyDk6jq23yeNCNXL8rh7xi2hs6eUQisk=; b=MCTcCgKEuIsDzv4ERa4r2oGv/ipCRZ0Eo7Z+RbldxxUMaRf9xwFRRL/ZXxpzfa2dg2 e2b7SPOsoxVkMXoOYGy4jFmHAn/K02jbf+zwxCz17vk9QNC6M6PV6KWBkGyV2qFc1BxB 0qx5yYpshTweDq38c7YXC9fa/jVJPT7bZAeGhKrTP0CoBdaKaaAxc23Vu0oM2G7xB0wp KiPc0WxhK6nBZ+zwDSALPQGx5q17Qm2R12UzsTuas8MepT7yuiHI7+mR3KWZpMSK8zjR ibPH2BQ6W6Nii76hmaNkLjbTGatG2YHVIcqc09c5nu3O6IqwSGhWOv+fD5niI+ua560r OAsg== 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:in-reply-to:references :cc:from:to; bh=tnbr8NQlLnEwyDk6jq23yeNCNXL8rh7xi2hs6eUQisk=; b=k37y0nG1vUKURrC03tC7TpJajLqr5NYxB6QAsiFtlzxBhv7lzTiMXOK65RrS2QzI+l JlrKSo+Y/PBDksqinhlwOzNL82AncNQqWnjf97FVW3/fAs/YW9ppoI7dD78XJaZzSZ76 /YWJ29FeUyFA/6RcuEENCcJbhBK+I1o1KZI13yrOATSNn0+xZR8JYcUBorz12nnWD3VY anhs8JePJ7DfzhHawKotyHsFcAYlDP8Knn53/cdsnUFnRr1RBWLy1dTX6LP+ft1wdF92 +ThIYbS6ZyfYy6AgjHOPpeeaBoTQvyIREuGLzWQtZ34Syboe2k+sMG4JKXOdiK67obdl TvAA== X-Gm-Message-State: AJcUukch7VimK3FGz6aaLdXXX6KRu7Q/CkD2YwgpwZmIaI/8x42mhK78 pomv9+joQsb5SRyw6hp1CEBIqw== X-Google-Smtp-Source: ALg8bN6OSZHuNb+qWxL/LJZgQSTD2YPrhU+RjbZrZ7V987okAqSBHSPixUbeGjqs12lhhOX07cG+WA== X-Received: by 2002:a0c:f50c:: with SMTP id j12mr18973572qvm.149.1545844837514; Wed, 26 Dec 2018 09:20:37 -0800 (PST) Received: from localhost ([2601:182:c980:96c:8dd:4488:90b1:59d1]) by smtp.gmail.com with ESMTPSA id c11sm11728719qtn.95.2018.12.26.09.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Dec 2018 09:20:36 -0800 (PST) Date: Wed, 26 Dec 2018 09:20:04 -0800 Message-Id: <20181226172005.26990-14-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181226172005.26990-1-palmer@sifive.com> References: <20181226172005.26990-1-palmer@sifive.com> 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::833 Subject: [Qemu-devel] [PULL 13/14] riscv/cpu: use device_class_set_parent_realize 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: Palmer Dabbelt , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Mao Zhongyi Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Mao Zhongyi Signed-off-by: Mao Zhongyi Reviewed-by: Bastian Koppelmann Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index a025a0a3baac..5e8a2cb2ba61 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -330,8 +330,8 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data) CPUClass *cc = CPU_CLASS(c); DeviceClass *dc = DEVICE_CLASS(c); - mcc->parent_realize = dc->realize; - dc->realize = riscv_cpu_realize; + device_class_set_parent_realize(dc, riscv_cpu_realize, + &mcc->parent_realize); mcc->parent_reset = cc->reset; cc->reset = riscv_cpu_reset;