qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Huang <wei@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M
Date: Fri, 28 Apr 2017 08:58:20 -0500	[thread overview]
Message-ID: <8b782ee5-3545-3cb5-3b09-209fcffee7e4@redhat.com> (raw)
In-Reply-To: <CAFEAcA8K9DENSPqJD2Okqjqyi7T8RhSBmhCa3ztooJK5xdcZVg@mail.gmail.com>



On 04/28/2017 07:09 AM, Peter Maydell wrote:
> On 28 April 2017 at 01:10, Wei Huang <wei@redhat.com> wrote:
>> In our downstream code, we try to minimize the number of supported
>> devices to reduce the maintenance effort. ARM v7M is not in the
>> supported list.
>>
>> For most unsupported devices, we can remove them by configuring
>> default-configs file, except for CONFIG_ARM_V7M=y. This is because the
>> ARMv7m code in target/arm/helper.c intertwines with NVIC code. As a
>> result we have to keep NVIC and SysTick in order to compile helper.c,
>> which is not desirable.
>>
>> This patchset tries to address the problem by making NVIC and SysTick
>> removable.
> 
> I think that's the wrong way to do it. If you want to not compile
> in ARMv7M support then you need more ifdeffery in the target/arm
> code to disable the v7M code and CPUs entirely. NVIC and systick

We do disable most CPUs, which means only a limited number of CPUs
(host, cortex-a15, cortex-53/57) are left.

Using #ifdef is indeed a cleaner solution. However I can't use "#ifdef
CONFIG_ARM_V7M" & co inside target/arm/cpu.c file because CONFIG_xxx
aren't available as preprocessor directives. From what I saw the
CONFIG_xxx options can only control compiling source file. One solution
is to extract out all v7M code into separate files and use
CONFIG_ARM_V7M to direct compilation. A bit messy though. Any other
suggestions?

> are required core parts of v7M CPUs and so if they are not
> present then QEMU will claim to support the v7M cores but not
> in fact correctly do so.



> 
> thanks
> -- PMM
> 

  reply	other threads:[~2017-04-28 13:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 17:38 [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M Wei Huang
2017-04-27 17:38 ` [Qemu-devel] [PATCH 1/2] armv7m: Make armv7m SoC compilation dependent on CONFIG_ARM_V7M Wei Huang
2017-04-27 17:38 ` [Qemu-devel] [PATCH 2/2] armv7m: Use stub functions if CONFIG_ARM_V7M is not defined Wei Huang
2017-04-27 17:51 ` [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M no-reply
2017-04-27 21:13 ` Peter Maydell
2017-04-28  0:10   ` Wei Huang
2017-04-28 12:09     ` Peter Maydell
2017-04-28 13:58       ` Wei Huang [this message]
2017-06-02 15:00         ` Peter Maydell
2017-06-02 15:49           ` Alex Bennée
2017-06-02 15:55             ` Peter Maydell
2017-06-02 16:12               ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b782ee5-3545-3cb5-3b09-209fcffee7e4@redhat.com \
    --to=wei@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).