From patchwork Fri Jun 1 14:43:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 137537 Delivered-To: patches@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1029439lji; Fri, 1 Jun 2018 07:43:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKHJuLba5Mxrc/qAogPa5HmWnIKhX+F0ASJhzAcerhr45KbyqA7EsDD2QV1Gy8abNmQ123T X-Received: by 2002:a17:902:3c5:: with SMTP id d63-v6mr11306758pld.163.1527864215361; Fri, 01 Jun 2018 07:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527864215; cv=none; d=google.com; s=arc-20160816; b=qM9lnM1lHVNQx8K91FP9fMi43cGWd2yzTqDU6Hv9/U6R/HeR1tvVofV9yZphwHP/u5 5gt4vKb1Ls5dA4nhRKvIop2V7nY7gDDQLGEpMbAr1HjPMN2nOEza8IrzDss0arQWMDmC Pw7r/zY7NlT57A3kHANahooIxvcJ1+frfC/Y68kuX7R8ptp44V3zbgsqzm7Tnq0wPkJQ BFBbbT/QNXzTk1xpGjtr2R6UOAZI5svJSTIR+l80rRJdVeAQeANQ93wJDrQ05CPRAGrW wD0263VdRVn38vuA1/Kb5Vm2EDMHIS97tiWFKKFkbrDm6lvGkh1iVlPF8vrx29R6evDx C7+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=UMce9Xyzs4XW629Y6lYOMz4Vrzq0XJxkm6338mM9900=; b=FCG0+GpvUsQRLPugP+WLcOadZFJnquILvCjSMFDZBly5G7Wh4FCc5YYFxIoR/foIaT xELPmi4f/eLSF+4UdFIbB0cQh650JdkNIGybt4H7052mfGJFUo1mYmlIuAD6oEh+cF7t T/5EdplTcLkh/VsydKlyBq63gb1WJFGuLIacR+SS8Y+VDNuXwA4nHwiX6j7wmJiEfdF3 p3kqWmxRVQxa330UbAUhdX9ZvmS+smXLAh4BXg50GYzayfQVhv1aFuYiBCxKZ02hBuZW CyvdamJGydovxebkOUl06MfsjFr7r3oVeHKWXs97k00MXPkmTgcF+DWzhEGn8wEF5Zaw 9jFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id p91-v6si39953770plb.457.2018.06.01.07.43.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jun 2018 07:43:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fOlH7-00047J-Hw; Fri, 01 Jun 2018 15:43:29 +0100 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, Julia Suvorova , Stefan Hajnoczi , Joel Stanley , Jim Mussared , =?utf-8?q?Steffen_G=C3=B6rtz?= Subject: [PATCH 0/2] armv7m: Remove armv7m_init() function Date: Fri, 1 Jun 2018 15:43:26 +0100 Message-Id: <20180601144328.23817-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.1 The armv7m_init() function is a legacy from before we properly QOMified ARMv7M, and it has some flaws: * it combines work that needs to be done by an SoC object (creating and initializing the TYPE_ARMV7M object) with work that needs to be done by the board model (setting the system up to load the ELF file specified with -kernel) * TYPE_ARMV7M creation failure is fatal, but an SoC object wants to arrange to propagate the failure outward * it uses allocate-and-create via qdev_create() whereas the current preferred style for SoC objects is to do creation in-place This patchset fixes the only current caller (the stellaris board) to not use it, and then removes the function. New board and SoC models should do the two jobs this function was doing themselves, in the right places and with whatever their preferred style/error handling is. (I've cc'd the people working on the nRF51 SoC model, as a heads-up that they'll need to update their code so it compiles once this hits master.) thanks -- PMM Peter Maydell (2): stellaris: Stop using armv7m_init() hw/arm/armv7m: Remove unused armv7m_init() function include/hw/arm/arm.h | 8 ++------ hw/arm/armv7m.c | 21 --------------------- hw/arm/stellaris.c | 12 ++++++++++-- 3 files changed, 12 insertions(+), 29 deletions(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé