From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [kvm-unit-tests PATCH v2 3/3] arm/debugtest: test access to the debug registers for guest Date: Mon, 22 May 2017 18:56:05 +0200 Message-ID: <20170522165605.GA27253@potion> References: <20170518160208.9674-1-alex.bennee@linaro.org> <20170518160208.9674-4-alex.bennee@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: pbonzini@redhat.com, marc.zyngier@arm.com, christoffer.dall@linaro.org, drjones@redhat.com, kvm@vger.kernel.org To: Alex =?utf-8?Q?Benn=C3=A9e?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42258 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbdEVQ4P (ORCPT ); Mon, 22 May 2017 12:56:15 -0400 Content-Disposition: inline In-Reply-To: <20170518160208.9674-4-alex.bennee@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: 2017-05-18 17:02+0100, Alex Bennée: > Currently this is a fairly simple test that reads the debug register > state and attempts to write/read-back the watchpoint and breakpoint > registers. > > Signed-off-by: Alex Bennée > --- > diff --git a/arm/debugtest.c b/arm/debugtest.c > @@ -0,0 +1,671 @@ > + > +static void read_dbgb(int n, struct dbgregs *array) > +{ > + switch (n-1) { > + case 15: > + array[15].dbgbcr = read_debug_bcr(15); > + array[15].dbgbvr = read_debug_bvr(15); Newer GCC (I have 7.0.1) does not like a fall through without a comment: arm/debugtest.c: In function ‘read_dbgb’: arm/debugtest.c:144:20: error: this statement may fall through [-Werror=implicit-fallthrough=] array[15].dbgbvr = read_debug_bvr(15); arm/debugtest.c:145:2: note: here case 14: ^~~~ I managed to compile with + /* fall through */ everywhere. > + case 14: > + array[14].dbgbcr = read_debug_bcr(14); > + array[14].dbgbvr = read_debug_bvr(14);