Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp269247yba; Thu, 25 Apr 2019 23:00:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwHgB4cOcwS2+fiayV03Egu7dk8WRwR1aAioXWHuUDeF3jcBW8bvg9ESIEzqZW/W3w/7dv X-Received: by 2002:a17:902:8c8b:: with SMTP id t11mr44548660plo.15.1556258454025; Thu, 25 Apr 2019 23:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556258454; cv=none; d=google.com; s=arc-20160816; b=ZBmid/en7yT6NNrgIPV0GSVlgl1cCh51dcw8PYhCqnxIUibDvBkbheqjd+EYo4QmPv 4cQnaeCFlNyGDPtysjvHRuXoJOTWTH9gjqdkfck4KWdLwL3VPHWFDwQDoaGKPT9YbSKd cSYvs/ndh5QlFWkk0f0+Kz8/6hdGG7OAQzhVtrqrVC4hIEVLHkHyd77c1tKbPouzfXJx kl2M6fUCMbd9Htn2ImEAndKSfjaCNFdZskk2JnPPE5s3+9IlxcVFgV7NBE170dnisH47 AiHMKtqBQHCunlQswsxfr8dvFpIXxDRCZPQEONkCTwaSKpvle29gqouW6Kdh673IhWid f2UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=Zm6ZnYvUkWxwYXsOqQdxiSykYTniGaBNNjGiCYmoLWc=; b=QF1C9R94i3oDo568Lx+ejvZKAA3YbqwfREQKD74ddXeTmICAGe9+eBVQBZO4Pohqlj eNgkGvvqZC0Axj2CkxXBT/U3k57Hna7QZFjh6NhjrIZW9l9cbW3I1MHuYNZc15M7odaj 9RLNVdULeFBWkhP/1xuD57qC57FfvlMCtc8GA/AjAj9NG8lKRoxX7e6cruSIcqnneAGJ fX8ZFiYdTrMiWL9P8BobXIqcUSDOvCXaQ7qwn5ssfsKUnenY+NIDdjALup/5QwDo2OwD C713ae7qEu4KwJdpmQg21TcUW6JUq4emIAVvzOSVQ5suHtRLV8oJKWJR1SFko2WkgYTo OEOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=H5yXS0GE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cn2si10697038plb.358.2019.04.25.23.00.39; Thu, 25 Apr 2019 23:00:54 -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=@c-s.fr header.s=mail header.b=H5yXS0GE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbfDZF7n (ORCPT + 99 others); Fri, 26 Apr 2019 01:59:43 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:44472 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfDZF7j (ORCPT ); Fri, 26 Apr 2019 01:59:39 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44r3Kg62vVz9v1v6; Fri, 26 Apr 2019 07:59:35 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=H5yXS0GE; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id xMGdyZ-sALfV; Fri, 26 Apr 2019 07:59:35 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44r3Kg4s4Gz9v1tj; Fri, 26 Apr 2019 07:59:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1556258375; bh=Zm6ZnYvUkWxwYXsOqQdxiSykYTniGaBNNjGiCYmoLWc=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=H5yXS0GEP+GF89KizLPXR51Xpzb7Q57+wrhMPVF3CAnrtbwcYf7/T6AUnMM4om3i3 0FF8FK9bk0oi/YeOJPUNd+0GYa1z/KjwlOPkWiU1IFDah2zsvBwSkfvkclzkgprhoC 3hdGpfEVfQ0OShsG+TCQwziDhsOa76iTuF4eMIrY= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8D7DF8B807; Fri, 26 Apr 2019 07:59:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 0V0bsa9S-etu; Fri, 26 Apr 2019 07:59:36 +0200 (CEST) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.6]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 690E88B74C; Fri, 26 Apr 2019 07:59:36 +0200 (CEST) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 5F02866278; Fri, 26 Apr 2019 05:59:36 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v2 01/17] powerpc/mm: Don't BUG() in hugepd_page() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , aneesh.kumar@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 26 Apr 2019 05:59:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use VM_BUG_ON() instead of BUG_ON(), as those BUG_ON() are not there to catch runtime errors but to catch errors during development cycle only. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/hugetlb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index 8d40565ad0c3..7f1867e428c0 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h @@ -14,7 +14,7 @@ */ static inline pte_t *hugepd_page(hugepd_t hpd) { - BUG_ON(!hugepd_ok(hpd)); + VM_BUG_ON(!hugepd_ok(hpd)); /* * We have only four bits to encode, MMU page size */ @@ -42,7 +42,7 @@ static inline void flush_hugetlb_page(struct vm_area_struct *vma, static inline pte_t *hugepd_page(hugepd_t hpd) { - BUG_ON(!hugepd_ok(hpd)); + VM_BUG_ON(!hugepd_ok(hpd)); #ifdef CONFIG_PPC_8xx return (pte_t *)__va(hpd_val(hpd) & ~HUGEPD_SHIFT_MASK); #else -- 2.13.3