From patchwork Wed Jun 3 13:08:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 49477 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A5BC24614 for ; Wed, 3 Jun 2015 15:37:24 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf3723332lbc.2 for ; Wed, 03 Jun 2015 08:37:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=T6i6fnfOmq5L0UFyRxqnjyQ0kURg8NEG7E8GCvCOfyo=; b=K4QRpmyOlPEBec+y45ZxcDvjTjAnuhSdprr5ONBsZ/rKljtGvuAn4BRs4XSkt0fBj8 yeHe8GRGpQOpJUYZZMqh9U1OHwqRGSvIIzgL/pIBarP3lzA4UTPZnzezbq7tp+Af8Azw tACjP2Wa54QPxszFJFAqFA3iLs7W8JRlDt7pTu8RBRO+5Sh16xr1kbu7vdJkdPD3FqNc PHJAKGa/IFOiX7cY7hqS/VGssR6VwvrDiO0qUoYeWytTpViapcyBv/cuJ4dCqiIsVfJo WxXINqwotZQthXI+mqCtlczD9WyG5nfBQyasSVFajem+l6tc5Uo7c9mzIRmIWGXadhhm HRlQ== X-Gm-Message-State: ALoCoQmJTKWDN9QQoJTa36KGDGX9m8bs887VUrvwOtCZFWu4lSsXFZINp6Yl+lIGlmRvCrgD/pFg X-Received: by 10.112.13.200 with SMTP id j8mr31020795lbc.14.1433345843014; Wed, 03 Jun 2015 08:37:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.2 with SMTP id bc2ls87866lab.101.gmail; Wed, 03 Jun 2015 08:37:22 -0700 (PDT) X-Received: by 10.152.205.102 with SMTP id lf6mr11925039lac.1.1433345842872; Wed, 03 Jun 2015 08:37:22 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id r10si18077615lal.134.2015.06.03.08.37.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 08:37:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbuc2 with SMTP id uc2so9683549lbb.2 for ; Wed, 03 Jun 2015 08:37:22 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr32379000lah.76.1433345842787; Wed, 03 Jun 2015 08:37:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3955040lbb; Wed, 3 Jun 2015 08:37:21 -0700 (PDT) X-Received: by 10.140.23.147 with SMTP id 19mr16259083qgp.84.1433345841338; Wed, 03 Jun 2015 08:37:21 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w104si956420qgd.2.2015.06.03.08.37.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Jun 2015 08:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:36257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AjI-0000w4-AM for patch@linaro.org; Wed, 03 Jun 2015 11:37:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Aie-0000Iw-I3 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0Aib-0004id-45 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:36:40 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:36812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Aia-0004hG-T4; Wed, 03 Jun 2015 11:36:37 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 04374407DB; Wed, 3 Jun 2015 18:36:34 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id EEE58A67; Wed, 3 Jun 2015 16:08:54 +0300 (MSK) Received: (nullmailer pid 27455 invoked by uid 1000); Wed, 03 Jun 2015 13:08:52 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 3 Jun 2015 16:08:41 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Michael Tokarev , Shannon Zhao , Shannon Zhao Subject: [Qemu-devel] [PULL 21/30] hw/lm32/milkymist.c: Fix misusing qemu_allocate_irqs for single irq X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mjt@tls.msk.ru X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Michael Tokarev --- hw/lm32/milkymist.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index e0cec7d..e755f5b 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -86,7 +86,7 @@ milkymist_init(MachineState *machine) DriveInfo *dinfo; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *phys_sdram = g_new(MemoryRegion, 1); - qemu_irq irq[32], *cpu_irq; + qemu_irq irq[32]; int i; char *bios_filename; ResetInfo *reset_info; @@ -130,8 +130,7 @@ milkymist_init(MachineState *machine) 2, 0x00, 0x89, 0x00, 0x1d, 1); /* create irq lines */ - cpu_irq = qemu_allocate_irqs(cpu_irq_handler, cpu, 1); - env->pic_state = lm32_pic_init(*cpu_irq); + env->pic_state = lm32_pic_init(qemu_allocate_irq(cpu_irq_handler, cpu, 0)); for (i = 0; i < 32; i++) { irq[i] = qdev_get_gpio_in(env->pic_state, i); }