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: 169810 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12908601ilk; Fri, 26 Jul 2019 04:27:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDJiCZbb8BhWMKMfmOvCg5EBu+shseqhLCo1oSvq/DfbW7XaO8K5rW7H7ShwpFSuRz54eG X-Received: by 2002:a63:dd4e:: with SMTP id g14mr18881642pgj.227.1564140445183; Fri, 26 Jul 2019 04:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564140445; cv=none; d=google.com; s=arc-20160816; b=iIpwU3sCKC8zYPPTWsmiweOjrLd3VZ+1/q2PjcOslZ15A0LOmz9l7DJqKwbmaQehQm zkRm2ked2ZAysacyEy/dY7oLUdUKIDmFFZOwR5XCpTzAw+ZTQcYB/Hgbjw7SKPQl9dUe 0918pi2WfWwSMxtYrpPbsmhjEXT4dPr/fYDlxiJ7Yk3qjOXHC13LOYkRCVC+txnxI19f gkhDGFDE/Obt1RxcsQE7KHVlVbFMqaZTROGcDvZTFwK94Q8aitAuBMGBoC1pM848kQXH /59JDmVgHIrBNTRIRHua+uvbKPz7vFUBmS3OENaXf2mUOuVt2s7j0fj+7iLDVuu0ichz Lk/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=g0nLERSg4u07PeLcbnJNifTNV6Ww1N/l/brHYj7jzWs=; b=Fx5dbtHz9YaVbDikFPupKOoVTZKDyEDWwGHE7PS46Z1VPVHb/frl5Jfs3DQ7tnic9B Cz5/XHkn9aLptoHVQp85VIV87lvd6NLPXc0K4YDR2ECEY7TdVry7lUwX6HQgtajNTCGn y84PxMDSL52wfPbtYWfMESjZer5jc/FJ3Bg8FyncDUI+JcUU8IUhWzoJ+o3/8sY4ZjWM jV3tqz5srH2QqgMR62OGWubElVGx9NL5tLf5dwf2BT6ZPW3uLPLFmg2G7C7l6fwvX96i aLM7k/gd4DtrYIFZoqvFiqVa8sYySRoZlTeA9SrkK0DaoKN9NA2NJhn6WJBoR1DTZ+j6 4UVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tEZoMFkZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si18569164pjo.75.2019.07.26.04.27.24; Fri, 26 Jul 2019 04:27:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tEZoMFkZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726901AbfGZL1X (ORCPT + 29 others); Fri, 26 Jul 2019 07:27:23 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35424 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfGZL1X (ORCPT ); Fri, 26 Jul 2019 07:27:23 -0400 Received: by mail-lf1-f65.google.com with SMTP id p197so36819080lfa.2 for ; Fri, 26 Jul 2019 04:27:21 -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=dLPehG9GVZHHxaUu1WxN7vx2qZF0Riww8gcj5R7OGtHgAuaT3F+Pw1yoTq7EZDiOxa /GnnrMUZBk3KmZh4HfpJsMCM0ifYM0a6PjAcqRvfGp1ZsyKJjLvJiWuNZ5QEJliQXYwu 0pFnJw5VufVKdLlTGUvjyOeq1WzB6f2pvaSIWz0VQcdKSavgyhqZ1ZEUTztaXe08s8PS /o+n/1F6xGA9mM8qf/S+fODzpDETcCOXv5zdUoSdBzLsW3iRaFMNr5Fp0hfDjwHJOoQz 1nfBB5R8Y9ggfNCF+0+BwPyMBP2xvnro0tLFYJvPR5Xy0JU+DC8uQ7YNs8MiNqTmeTU+ mhlw== X-Gm-Message-State: APjAAAVJc+AdmjW8fJNiZln2YuoGtIhnrJUvI6WzYaOkD7+MkBLO+hUq V7XXKvP6V623+DnJS2xJZPvohA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell , stable@vger.kernel.org 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm64/kernel/hw_breakpoint.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.20.1 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: 169811 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12908664ilk; Fri, 26 Jul 2019 04:27:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa+dbouJTkmYhZQ31CkMMm+q3owo1iZ3X3vObiDSC9d+/WLZnsz/tGFxnEiBjdGJSSoaRs X-Received: by 2002:a17:902:a40c:: with SMTP id p12mr95804860plq.146.1564140449687; Fri, 26 Jul 2019 04:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564140449; cv=none; d=google.com; s=arc-20160816; b=fPeURgNYgL8iWwh8JRpuSM/Q2KekgB2wfB25SJuM7QTY9G/jZBJCN1K9QjHVTHs5Mt S4i+Qj25rY0wKxTGMkDcyy8ZytDGU5HAIwO7ItPV7Ek1z9d8MDRx3GaWEUwmxXDZZbO0 jvnu2RM6xG80P+3fsYLoQE6p1MKcUug1UJKttlIHY1+vMAZiKgIASivWsdxvB/MEYFBn PN8Z87OWSAR6E84YNLmiNzWpDg325TmWaNpah0FkUxEow0NEzjW7CGZ88Lxq2ar7Ov56 IeIhVWUV7BNLWCQrLmjEU96o8nEzyaltQwrEY7utckHxrjBnoIpQqKQuxKAPli/htgnx phkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mD75t+URGZsK68zObcoQDgfEcM4EggmUqFsamz8uvA8=; b=p/WIEXL6+mCvt+uU5W0Fh3CaZTuKL7GOZLa4o3C5/k+IZpNcjcXOJ1LH4u/sUMxb5W K2u4U6gzk5zPEK/WZAKFE+DUp41TGnSpEkk/zmzhgLsCWCD9VO5prce7DmPf5DG2CNvn Udk9ItASwTpnKnm9Dl7PgBL8BOpbJtQZPHbaM3EwnqSGhlwABpV10bcj8+rN67o4aB2g aa/6M+x/DrfuWXPhWhV+nB8sH+hboP5oAVuwviRUhBtyge//zfuvMILgAKgsShvkY4e0 olyk5lPqPxZQPA/fz4nWnb7SU/oca2W3EhtAznl4PuoxaghEerHpcttsaLk9uo2ghQ6G Bwog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v/lqe97a"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cp2si19854400plb.437.2019.07.26.04.27.29; Fri, 26 Jul 2019 04:27:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v/lqe97a"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726923AbfGZL12 (ORCPT + 29 others); Fri, 26 Jul 2019 07:27:28 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36077 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfGZL11 (ORCPT ); Fri, 26 Jul 2019 07:27:27 -0400 Received: by mail-lj1-f193.google.com with SMTP id i21so51173692ljj.3 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=KVeRC5IUoccF31slE9DM1zi61GzzKR9UAMhnZZJQ/95ArDdEeka3w5wK7Jp4XJFJ3Q U37mLdOkyl7EG4SvVII8v0SCSrFc0fJT+sTi2UbB4h+w7Kfb6fljvJDs3L7/MajO3G9j K4xlyEBdu2b3ubsk/clyYWea0jriatw21C0kbBYP1w28Ax/e55AlA8mjUClelcIxGsiy BoQJAPdZfbsSsFFNOt91oY9WptCesWI4WRmjjF7lOAm5x10O00hrtxn+KGsMHjJwk8Cd vxNiQba8yV9ZTn/mLFIX+SNqpbvwWxg7AOoR6pcg0iY1n66LhGWwqOdJn9Fr+9eB+YjA lGfw== X-Gm-Message-State: APjAAAUfljdAJuRFaOy5tM2M+FGXu9B3GSz0tBQw66+iGutKrTVDcA5d 5MSiS9AsNK95htdS/YVaSbuyMg== 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 Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.20.1 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: 169812 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12908789ilk; Fri, 26 Jul 2019 04:27:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqx05a8jpIM2DTMTzHCYecC9sjUvgOVWtmOL6mdVH5jAvLb2dsdo5pR2f6MS+XD0Q/IXFyPY X-Received: by 2002:a65:52c5:: with SMTP id z5mr76874139pgp.118.1564140456459; Fri, 26 Jul 2019 04:27:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564140456; cv=none; d=google.com; s=arc-20160816; b=J1dvV/oXyWf/razyP+H/Navy8lkdZrwY3+kPBd58NZin04AKnrbG1SIqgZDzajzR0i DtWHvhbK8mDBsNenAdipl5q3VTEFEcVs33kmtdV+Y4EwM5niKl2Fj8lj+ey/dV/L46i4 1i1Km0Ywtu45s6VALC2kI/e3c0ijM4X4PrysSt7D7wjhUx1NCPBhfHz+LMjyjhdlxqk/ B0lr+94ni5f7/PNjc/3pucbSgo/eK4gzAbEjEuspkYnrKOnrD1/zA7HoERYJMiCOBimm I+PqBK3h6YIaVRuX7D6TeLXGg86ZZ35kwOXrvglJNy2ranPjMk54rbNlrwcml3+qEA8K CYNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VvJrkmi1Cwn8lyhtsQMDHS3PdPwEeGsIk+aMiHF32Hg=; b=SMXXSpRSatXJP4hCMMjGid9FgY0nGu2wCqIrNerMcYuAwKgMvoMp3TnTnZMQlQ9Q49 /TI7GFug0fDMpjYDIobrL7NcsQ+RemR98esylRk5xIJwg3AiZDrmcWgbMbosO58fbSSs eoty29Tn6TParYvEtNCuUXz8c5JL2YvMGgu/PaScpF7x6QcwfglcXgcmScXpqIcXbc76 Odh9ReUU+z1wJaOlsMh4TltvwreTe3SxdI5TYakoOXJNbmc+sjJl7u/N3wwJgmEyL3zQ PsSYhvjbwb7f4YvlRwGtt9GlZJggvnjH/Kuxfy2tJDqrCV4g1Ef5HGRR0Mof5XtZp8bq uR4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iZQOA7Vh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si20076195pgt.13.2019.07.26.04.27.36; Fri, 26 Jul 2019 04:27:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iZQOA7Vh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbfGZL1e (ORCPT + 29 others); Fri, 26 Jul 2019 07:27:34 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:39421 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbfGZL1e (ORCPT ); Fri, 26 Jul 2019 07:27:34 -0400 Received: by mail-lj1-f195.google.com with SMTP id v18so51101141ljh.6 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=AvlXNAgqU0QwSDxa2iCVF9+v8cvK7SkYSzZYyY/Wps8Z2qg4NXbtHtciBBEtz3Y9RG EK0rhA+AhkKnhAH+UAdO4ZMKWBw3ph2B0Kz4Ipe8yoYTBrlqFJETjakI6NhmjVCtHHPO U//0LPEOxIYU5oZIM14kVRmkfeyOW1YJCfNF0X0oMly32ixQ8NlLfFN1NobEFF7OTVJv ovbCu12DzRaNBNZDF2jtY5Q7BLkt1vesmYVpTxYJC6PpWhmTC00GSK4aRJnTi2UgGOL9 mqYBFcBh5nSLKPSSoJ/e7NYUf/PiaRhXz60BcXua0vsZ4HFoIpApdfPXsqKS2mVX8Yiq cwXA== X-Gm-Message-State: APjAAAV3eYdsmJTvUHF4iG2o+qopdQMa+L7akZpOFqQ3nIGQy2MadtVx NC0k2uPA4sn1Q8N4lxERZ6on1w== 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 Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.20.1 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)