From patchwork Fri Jul 26 11:27:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11060807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA6C71399 for ; Fri, 26 Jul 2019 11:27:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B98FC28A75 for ; Fri, 26 Jul 2019 11:27:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD59D28A8C; Fri, 26 Jul 2019 11:27:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A71E28A75 for ; Fri, 26 Jul 2019 11:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Jq1zAEB12aWUTbd0aSpvAgShcGbYXGB8reV5xpoasmc=; b=HsH1Dg0bMaL9aV 5CUsLmgD0f9mWYrqkmwxB/FF6cyE9io6LSTN/IO1b75NPpyPPsYVPc2iqy4dJOgX9LzAKsQ79Vo82 ZUAHOnbwvV4NDZV7DB+KEjKym0JZ9VD/3KJtXCkvM4ag9iBH23W65+U28b5JJS6LNB7etuhRZ7Xrx QsjUmKReOdaecuCqU+ilazqZH7BbHejPWimYN2Q6/1ZApTgc71oKhB/ymAqo6UjGSo+dA423cbw6d DxZKpbuMIonY6xkdveRGMpI1w4No/Z7iotEDGdMNmOBuPcPuIPnmdifqv9k/tUGk5wIJuevfTkCEI fuVi5snZilw6MntWjB1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqyOA-00022p-Hc; Fri, 26 Jul 2019 11:27:54 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqyNg-0001cE-1b for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2019 11:27:25 +0000 Received: by mail-lf1-x144.google.com with SMTP id x3so36943416lfc.0 for ; Fri, 26 Jul 2019 04:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g0nLERSg4u07PeLcbnJNifTNV6Ww1N/l/brHYj7jzWs=; b=tEZoMFkZNgKAf/ALc17jFdnG9AJ4QvVybihHJF/c2D6S8n5SsN+L+0XjTStbuw6X3M bhiLIFDVRKQDJwMjvY2YSPQW6Z18SiYmYS/N8UJts90hythAR+0+zfg+jIGnVVW2J+rP 8qs/GJBVLpPG9EnfUtu3StUmEO0+4fVONMAQaypVDPNuMax6SLKkNRDcIq3OFdqbtPzf Bzga0dDpWlbFfGCELpmpkhKsiNExxgIJHjumwcK/j5zDry2aUVodOsIv/Y0GsUrnIZOY dk6ZmzAJmE/wTwCzcPDS8Gbt0fcwWyQ/djnGDjygEEDWDm/NHJI6XyPIxmmU41YyBfip K++A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g0nLERSg4u07PeLcbnJNifTNV6Ww1N/l/brHYj7jzWs=; b=IXmF9+LICmPFGXwOaW9aIYpFTxkFulToi30H6ZmVVnp+Q5a76GhLrj5QXAEOXQUwb+ v7AdMRn8czv1qZXW+dwbxZOYaLJP8akIqXnR7/3GKACY6Ye/vURjHXoxaLJDpIy+yoZi gtc4CYYDrfmq3ywgRaMGoYswx/3bA3eqeTZPsuujBngc4nVq+UHGQyLoP7/321LUj9gV zDIYrUK7kFOjxu9V5n25mBrrJixVV2dTXKfk7Q5a4N+nLYFohga+1L9HzhGBPVJYvSxd l3SwWj0uAcSjfvxBdDZztwTlQ/U/JRFqcai/pa46kjBm3k6pddKhSvMBl9S9NWgGT6iB P0LA== X-Gm-Message-State: APjAAAVWnCncHPtZev1j8hJLwQ5krbvpr+ixkOTRm+XZGoaseIY89qH4 rGowT7xsNLKvJivE8bygWcDDdA== X-Google-Smtp-Source: APXvYqzA4M9X20guHIBIplEQvEBB6Y95fjhGaemXWIsOmXfspEG/yh8Z8jnFK4oopjvXljlNC+Uf6w== X-Received: by 2002:a19:234c:: with SMTP id j73mr1078425lfj.96.1564140441031; Fri, 26 Jul 2019 04:27:21 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id l22sm9910671ljc.4.2019.07.26.04.27.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:27:20 -0700 (PDT) From: Anders Roxell To: will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com Subject: [PATCH 1/3] arm64: perf: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:27:16 +0200 Message-Id: <20190726112716.19104-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190726_042724_160172_320303E9 X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable@vger.kernel.org, Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When fall-through warnings was enabled by default, commit d93512ef0f0e ("Makefile: Globally enable fall-through warning"), the following warnings was starting to show up: ../arch/arm64/kernel/hw_breakpoint.c: In function ‘hw_breakpoint_arch_parse’: ../arch/arm64/kernel/hw_breakpoint.c:540:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) ^ ../arch/arm64/kernel/hw_breakpoint.c:542:3: note: here case 2: ^~~~ ../arch/arm64/kernel/hw_breakpoint.c:544:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) ^ ../arch/arm64/kernel/hw_breakpoint.c:546:3: note: here default: ^~~~~~~ Rework so that the compiler doesn't warn about fall-through. Rework so the code looks like the arm code. Since the comment in the function indicates taht this is supposed to behave the same way as arm32 because it handles 32-bit tasks also. Cc: stable@vger.kernel.org # v3.16+ Fixes: 6ee33c2712fc ("ARM: hw_breakpoint: correct and simplify alignment fixup code") Signed-off-by: Anders Roxell Acked-by: Mark Rutland --- arch/arm64/kernel/hw_breakpoint.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index dceb84520948..ea616adf1cf1 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -535,14 +535,17 @@ int hw_breakpoint_arch_parse(struct perf_event *bp, case 0: /* Aligned */ break; - case 1: - /* Allow single byte watchpoint. */ - if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) - break; case 2: /* Allow halfword watchpoints and breakpoints. */ if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) break; + /* Fall through */ + case 1: + case 3: + /* Allow single byte watchpoint. */ + if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) + break; + /* Fall through */ default: return -EINVAL; } From patchwork Fri Jul 26 11:27:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11060815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0643813AC for ; Fri, 26 Jul 2019 11:28:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E968A28A75 for ; Fri, 26 Jul 2019 11:28:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBDEF28A8C; Fri, 26 Jul 2019 11:28:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 85DFA28A75 for ; Fri, 26 Jul 2019 11:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5IzGf51xnRAyo4wcQpW8KL0KqjquSS/cpJZyKtQhcns=; b=UvLpFeujyVSFB/ PP/Q2xuHC9WNYZXRm62Z9cbm8yrSDzD1+7ecn33GvPXHI9DNt7ngYajLy6tHbu9+cfQPZQk/oEYlf 8asagx48bl0xOhwX9PQPsAybLijOXMRaTYOZzCmtyToR66buEUwu+lQSoDH6j9Qd/U2PmMrD1pFsL AWuk436h4FlLn20wYlIwM4ONmWlowccPQZhk9sm9NeLEWvfySnv7frDqL7z3FPPD69Ln6qwJgfUV7 u8wq6KOH5Q6dKqRlSwhNPSqCBBhV+ykFFh0SP5aIKZoLSMyNTXggQqKubRPxJe6LzSRmFfdXdELM5 0lwVOhXoLj2JZg9FM7oA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqyOY-0002K1-Vq; Fri, 26 Jul 2019 11:28:19 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqyNi-0001fq-TA for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2019 11:27:28 +0000 Received: by mail-lj1-x244.google.com with SMTP id x25so51208318ljh.2 for ; Fri, 26 Jul 2019 04:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mD75t+URGZsK68zObcoQDgfEcM4EggmUqFsamz8uvA8=; b=v/lqe97aY/6DKYSisz+Bh2DOxmrmfqzDS78mI5csTH9jAkHOsQf3u/nQHsbpw6wuAR bMIIYx1fPDpnl3RkTb4wAx50nibsu3pMG3MYUzUX1qaqyy5QzU784Z/rxIp2Hs3i7Z2/ JGvxNlWagTD1QUHKl1n/cx6w1ei6w0SlS5IlDrMUXjfcqn0d9fhA+3gSJ33IQ4H6YSpW MDfW5F/MG4dpu8ozAK5L5RxmRx+lzrsoLICfH8V2EWH83o9rfP4uTHnxHp428YRXL0LL jP4u4B9D5If5HLU5D4h+FgCmFq4bEx7gwQ+OOIanHaMGdYIeCPvqox1hd4jukUHDmmG8 7wSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mD75t+URGZsK68zObcoQDgfEcM4EggmUqFsamz8uvA8=; b=NMaKW8U6QYSDwIi3ZqD5ZyHjerrwsjPLb3P3sFvmu0gndBSS5QuGjh8FPdoxqN3SOK U1KktZq4A2AB8n/r2JvZcekYu4xKcyj19cUU/4F9PKGFlPHmnI/o8kdzNNQrmOKyXx/e cCFRObUh91sxxTPhqzAYwM+zDQHukiMJFPwCm7OQlkXLpFOI2jype9hKXbaUWKdU42F+ vBY5oQxwvs1PVlX92mQMOlCDAqSkYEhr+QW1hLltDlU0SPWe7v3DFyHekL3MbVHVTtBx 5c4x/yGPsw/KOzIp9XzBke89X16Nr7YHt1j0CcUwE32A9vZaiOSeBjx5EXiADtw3TOqn FamQ== X-Gm-Message-State: APjAAAVCRLZgXmI6NkJYRRgQQWYw4Pa3UrFSz8qgKlgubGfHxYkfHnFA pxtWzA3sR72BHY0aFu1uHz5/X3KD+Zoh8w== X-Google-Smtp-Source: APXvYqy1Iy6b2yOwjFSIa/VBUa/31LvNZNgxAzQlPOq9T/Kdpd5y1geOUuOJ4C07BdR6g4ervbZ1PQ== X-Received: by 2002:a2e:8396:: with SMTP id x22mr50602259ljg.135.1564140445364; Fri, 26 Jul 2019 04:27:25 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id i9sm8365620lfl.10.2019.07.26.04.27.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:27:24 -0700 (PDT) From: Anders Roxell To: catalin.marinas@arm.com, will@kernel.org Subject: [PATCH 2/3] arm64: module: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:27:21 +0200 Message-Id: <20190726112721.19154-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190726_042727_137782_3AD848C2 X-CRM114-Status: UNSURE ( 7.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When fall-through warnings was enabled by default the following warnings was starting to show up: ../arch/arm64/kernel/module.c: In function ‘apply_relocate_add’: ../arch/arm64/kernel/module.c:316:19: warning: this statement may fall through [-Wimplicit-fallthrough=] overflow_check = false; ~~~~~~~~~~~~~~~^~~~~~~ ../arch/arm64/kernel/module.c:317:3: note: here case R_AARCH64_MOVW_UABS_G0: ^~~~ ../arch/arm64/kernel/module.c:322:19: warning: this statement may fall through [-Wimplicit-fallthrough=] overflow_check = false; ~~~~~~~~~~~~~~~^~~~~~~ ../arch/arm64/kernel/module.c:323:3: note: here case R_AARCH64_MOVW_UABS_G1: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- arch/arm64/kernel/module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index 46e643e30708..03ff15bffbb6 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -314,18 +314,21 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, /* MOVW instruction relocations. */ case R_AARCH64_MOVW_UABS_G0_NC: overflow_check = false; + /* Fall through */ case R_AARCH64_MOVW_UABS_G0: ovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 0, AARCH64_INSN_IMM_MOVKZ); break; case R_AARCH64_MOVW_UABS_G1_NC: overflow_check = false; + /* Fall through */ case R_AARCH64_MOVW_UABS_G1: ovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 16, AARCH64_INSN_IMM_MOVKZ); break; case R_AARCH64_MOVW_UABS_G2_NC: overflow_check = false; + /* Fall through */ case R_AARCH64_MOVW_UABS_G2: ovf = reloc_insn_movw(RELOC_OP_ABS, loc, val, 32, AARCH64_INSN_IMM_MOVKZ); @@ -393,6 +396,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, break; case R_AARCH64_ADR_PREL_PG_HI21_NC: overflow_check = false; + /* Fall through */ case R_AARCH64_ADR_PREL_PG_HI21: ovf = reloc_insn_adrp(me, sechdrs, loc, val); if (ovf && ovf != -ERANGE) From patchwork Fri Jul 26 11:27:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11060821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B64414E5 for ; Fri, 26 Jul 2019 11:28:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFDA528A75 for ; Fri, 26 Jul 2019 11:28:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E41AA28A8E; Fri, 26 Jul 2019 11:28:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9471D28A75 for ; Fri, 26 Jul 2019 11:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tIYAT8R4qlXpbBsQtt/TLyVXWJySshP1YRMgo9Cxjxw=; b=lv2ReEq6fa1qFj tV2Gq/N7U6C/Q073jgdRg40mPF2MU9Biq2YQHWdDZXbt8xWVUBv1EMgZG8mLd8RkDHYzdq868Qqz3 L5yAnXJYMdOwRnsvFtmQp3GeSJTwOk4Cpdpj2V1w743ga57KFOGGBsNNU0bu/oVFrjUiFtWgBgkec KdkfSOoGB8+L0jjVnxHTby51NTKdF5G2SeQBXGWHLdV9epXwE07hdExL/qUibO15NKKRAGqFytceB R4qNf356q4Snnffc5d8VxETnIPYUmygG7zPn7xWQqE1mbqVwq1UNcVuWzmdEGW5VDG5OUkdJ4die5 dcWfMD1dZDBqrhe/oYCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqyP2-0002gS-EA; Fri, 26 Jul 2019 11:28:48 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqyNr-0001lh-Tt for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2019 11:27:37 +0000 Received: by mail-lj1-x242.google.com with SMTP id m23so51065851lje.12 for ; Fri, 26 Jul 2019 04:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VvJrkmi1Cwn8lyhtsQMDHS3PdPwEeGsIk+aMiHF32Hg=; b=iZQOA7Vh1AeiCmJRZYyWRcnNJw7mx3vuhfziN5xJyN0nCT7/YCjDyON4hFIJluzUUJ PBTIsl/eTYaLQkxKXopF6i/KGxtsqDXJcMB/A4YDGS1hE+Ki4Pr4zt6VHpzzflC6hsWp MISFZM1VeJsGmuRFCfMd+od6WxGiROAM528q+xZV79/evZBuTXs4Bs6m3pc8kaILzXkl Dd49j4aAP4LQVPeWFIsFLkYUEgriYpGKy0OLxZSgXv9oy5W5YMtOLGvb63AJ1gKU+swq iLHXB9AOquA7wCoGVyOLOjI/gWq4QRP24yyN1zU9HTy/B6iQs3Kc3OUWz7Y5syEkxwKc IXFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VvJrkmi1Cwn8lyhtsQMDHS3PdPwEeGsIk+aMiHF32Hg=; b=YI7wv66T/U0dbGF0AdgGd3lvdiopymXJXT8f2+ZGtI/eftlFYRHZn8svd90FrNapWv cqLI6op2m5IxZTBZbiNINIBRgvc08UEyTcy7hNXYOcG/oZWOJjeNIZ194YmsIpOiu/BR yV76bamNsUwOqrbzmDKki4DwZFkMYeArKPbY1cYZ4wi0+1ZDPptnYxyEHIsPNAdsP2+w y2snZy499jG0nB/qQ7cYjrqOBvT2yq5QDC6Yxq3GOuPH76Eolimpun0oxiPRP5VhdDEg HcUDsJ/msmSqTEOAKFRF5BRHgtabE7TdGrcEw1H3mrm55Iwj3QXGFzluWt69dJvO/9WZ DM4Q== X-Gm-Message-State: APjAAAWGYfJL+QsVdN562qFV50xbvmXs3HC+NycYZWFy8i5t29BBhE5F SPl5bTyfyxk2HmvDG9h2pkGkzw== X-Google-Smtp-Source: APXvYqy2DiXWMGAc7lrhMJwuj/3I02AlVEVzIwxTmJTwoNODqG05gW6+VZKwf3/2vqK/EXuRJ4PyAg== X-Received: by 2002:a2e:2b57:: with SMTP id q84mr49315455lje.105.1564140452344; Fri, 26 Jul 2019 04:27:32 -0700 (PDT) Received: from localhost (c-243c70d5.07-21-73746f28.bbcust.telenor.se. [213.112.60.36]) by smtp.gmail.com with ESMTPSA id i17sm8324734lfp.94.2019.07.26.04.27.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 04:27:31 -0700 (PDT) From: Anders Roxell To: catalin.marinas@arm.com, will@kernel.org Subject: [PATCH 3/3] arm64: smp: Mark expected switch fall-through Date: Fri, 26 Jul 2019 13:27:25 +0200 Message-Id: <20190726112725.19204-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190726_042736_119969_33283CCE X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When fall-through warnings was enabled by default the following warning was starting to show up: In file included from ../include/linux/kernel.h:15, from ../include/linux/list.h:9, from ../include/linux/kobject.h:19, from ../include/linux/of.h:17, from ../include/linux/irqdomain.h:35, from ../include/linux/acpi.h:13, from ../arch/arm64/kernel/smp.c:9: ../arch/arm64/kernel/smp.c: In function ‘__cpu_up’: ../include/linux/printk.h:302:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../arch/arm64/kernel/smp.c:156:4: note: in expansion of macro ‘pr_crit’ pr_crit("CPU%u: may not have shut down cleanly\n", cpu); ^~~~~~~ ../arch/arm64/kernel/smp.c:157:3: note: here case CPU_STUCK_IN_KERNEL: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell --- arch/arm64/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index ea90d3bd9253..018a33e01b0e 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -152,8 +152,8 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) pr_crit("CPU%u: died during early boot\n", cpu); break; } - /* Fall through */ pr_crit("CPU%u: may not have shut down cleanly\n", cpu); + /* Fall through */ case CPU_STUCK_IN_KERNEL: pr_crit("CPU%u: is stuck in kernel\n", cpu); if (status & CPU_STUCK_REASON_52_BIT_VA)