From patchwork Fri Dec 21 16:03:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10740671 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 15A3014DE for ; Fri, 21 Dec 2018 16:10:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0526D284A5 for ; Fri, 21 Dec 2018 16:10:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED4B1284B9; Fri, 21 Dec 2018 16:10:46 +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 A5277284A5 for ; Fri, 21 Dec 2018 16:10:46 +0000 (UTC) Received: from localhost ([::1]:46451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaNNt-0008AY-K5 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 21 Dec 2018 11:10:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaNHQ-0001h9-3X for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaNHN-0004F6-N2 for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:03 -0500 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]:46705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gaNHN-0004Bp-DL for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:01 -0500 Received: by mail-qk1-x732.google.com with SMTP id q1so3331102qkf.13 for ; Fri, 21 Dec 2018 08:03:57 -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=mFl6Z5azvogZ9jJPXFPruvbA9SbiO4GkQV8grB0yT4t5k4U9y/JlSch+ceztPgE1Yx +ETdBUbuEIMdWib2/w/0/KDdgSOnfrDhDeCb3AUpv0Z846Z/EKJES2Gzh1nHYYaU9DEZ Y6ZNeOodMjNsNbpGzkkmMcIimGH+SBwZF9lskKOU/eMx5J6vhsfLbwqg7MIRGeiSa15C QkoQRMfOLlHW5Zrw0gf+X7jkB94ppsat4AeYINa7yFBy8yM0bIJ6HKpABA3qT6YQbEcG MCKse4gChsaH0RnoPPFWMoW2xCEWqulmaJrWTonxQh94o76TR+hb+zQpQrsHLrGgU3/I hqjA== 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=IX9QO4CyZxX7n09LdV0c4AmhgKlEoMD4TufQfCoNizX16eYrC2gvF/BroA19zX+o2r mA4kb+6tZIjbdnV+fd2SAHAXdFiGV9YJ5K8pWYqt60R/Rv05d6Nr2PRJIEGEzV0UaVf9 +FSIwbBCNswpKsaKWKIuFvEVzKZXIDAOIWH5vAAgVfImspXG9GMY/hMVtqmXADuOuP6M 0XWdbk9L4chXRhDxrDOKBSgpDfTeNtZ0OQFmorZaf625ZTbz+/xKEJDTAObmJS5RKEYz cLrvqSGtGVuR4c/MwYBcyS8IUb+nV5kFt3cN5onLl+dWIKY7Xo1EBY86eK0qd/so+Jqp +9LA== X-Gm-Message-State: AJcUukdrGzZQgwyf1J3JQyVaUQp1eazXjdoXnxZeRTZSIiNS0LLkZHP+ kEyUSZ9uhipE3wX6gEWLciDAUPC0rug= X-Google-Smtp-Source: ALg8bN7KRmM2VX/iRzWCAqmI5J62TMLWFDcOwY2wu4BZEr/5qRmoInpDlcG78FcsvQuzzfYGJrScuQ== X-Received: by 2002:a37:ba06:: with SMTP id k6mr2860378qkf.115.1545408236411; Fri, 21 Dec 2018 08:03:56 -0800 (PST) Received: from localhost ([2601:182:c980:96c:8dd:4488:90b1:59d1]) by smtp.gmail.com with ESMTPSA id a68sm6069751qkj.63.2018.12.21.08.03.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 08:03:55 -0800 (PST) Date: Fri, 21 Dec 2018 08:03:06 -0800 Message-Id: <20181221160307.14819-14-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181221160307.14819-1-palmer@sifive.com> References: <20181221160307.14819-1-palmer@sifive.com> From: Palmer Dabbelt To: qemu-riscv@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::732 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-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;