From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9611C433DF for ; Wed, 20 May 2020 11:49:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9DF8207F9 for ; Wed, 20 May 2020 11:49:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mHm9uxo8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9DF8207F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zNaILzBWWxOnADOkXeku4xC06TcHCXrSHtjihZVskH8=; b=mHm9uxo86dtL4b ilws/Xn4vvUendfVdGaSzVCA3HnYJNG9CCf0UaiH1iNgKa+Q/HscpUBBBehbSHl2SVOfpJV4+am0q OOdkjmEng7G6KfEbuvpcotzrQIzyrF62PCYy2c0vf5uSCaNOPuQTbGdhVmqvopXP0Lp6MeGt9WAZu U3wJIGmG80zLmT1aMe0RObKxSsxMudO5Wfc+WokUQAe0KSicgfO7NuU37p9iCezDF394ppx0DMMBo NTSEg11x1btod4cf58v8janB+Vx615VwoXetBqGQssjwk3kYLFvkO2sQQ4fpJbR+AuW7J801kD0V4 UUjPXI5H6vkKacVFzL3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbNEQ-0000vr-BG; Wed, 20 May 2020 11:49:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jbNEM-0000v9-PX for linux-arm-kernel@lists.infradead.org; Wed, 20 May 2020 11:49:53 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CEDD61045; Wed, 20 May 2020 04:49:49 -0700 (PDT) Received: from gaia (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AC6C13F52E; Wed, 20 May 2020 04:49:48 -0700 (PDT) Date: Wed, 20 May 2020 12:49:42 +0100 From: Catalin Marinas To: Anshuman Khandual Subject: Re: [PATCH] arm64/cpufeature: Move BUG_ON() inside get_arm64_ftr_reg() Message-ID: <20200520114941.GB18302@gaia> References: <1589937774-20479-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1589937774-20479-1-git-send-email-anshuman.khandual@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200520_044950_867803_8A22418B X-CRM114-Status: GOOD ( 12.16 ) 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, Suzuki K Poulose , linux-kernel@vger.kernel.org, Mark Brown , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 20, 2020 at 06:52:54AM +0530, Anshuman Khandual wrote: > There is no way to proceed when requested register could not be searched in > arm64_ftr_reg[]. Requesting for a non present register would be an error as > well. Hence lets just BUG_ON() when the search fails in get_arm64_ftr_reg() > rather than checking for return value and doing the same in some individual > callers. > > But there are some callers that dont BUG_ON() upon search failure. It adds > an argument 'failsafe' that provides required switch between callers based > on whether they could proceed or not. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Suzuki K Poulose > Cc: Mark Brown > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > > Signed-off-by: Anshuman Khandual BTW, there should be no empty line between the Cc block and the SoB. The patch looks fine. Just a note that the patch transforms a current WARN_ON in a BUG_ON but that's fine by me. Reviewed-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel