From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Re: [kvm-unit-tests PATCH v2 3/3] arm/debugtest: test access to the debug registers for guest Date: Mon, 22 May 2017 19:40:10 +0100 Message-ID: <87pof03fcl.fsf@linaro.org> References: <20170518160208.9674-1-alex.bennee@linaro.org> <20170518160208.9674-4-alex.bennee@linaro.org> <20170522165605.GA27253@potion> 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: Radim =?utf-8?B?S3LEjW3DocWZ?= Return-path: Received: from mail-wr0-f170.google.com ([209.85.128.170]:35220 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759362AbdEVSkI (ORCPT ); Mon, 22 May 2017 14:40:08 -0400 Received: by mail-wr0-f170.google.com with SMTP id z52so43820530wrc.2 for ; Mon, 22 May 2017 11:40:08 -0700 (PDT) In-reply-to: <20170522165605.GA27253@potion> Sender: kvm-owner@vger.kernel.org List-ID: Radim Krčmář writes: > 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. And here was I thinking checkpatch was being overly anal. OK I shall fix that up for the next version. > >> + case 14: >> + array[14].dbgbcr = read_debug_bcr(14); >> + array[14].dbgbvr = read_debug_bvr(14); -- Alex Bennée