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=-13.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 5E29FC433DF for ; Mon, 18 May 2020 18:11:39 +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 2F1B220829 for ; Mon, 18 May 2020 18:11:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oL3ZnUbu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F1B220829 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=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=9P9HG4xOr6b58GYEeRmnrE0vZEOtSx3NCMKkN0s/rEI=; b=oL3ZnUbu81iypd ab7YNDfSzDm19ZjrtSTo8swt6nEp6scj7FdvSIwabdO/jR0NPrzmsHzSLuy/yKbqg3MI/iFNIcgiJ V5NeeIKWXoEGcxyfXojRxCpkQr58uCQhFOPOoeUPJ4m+vAumnzKDwCeOTy0npYbNEG4eNVvrs525K 3/Q5TCjNSUIe87sD5Hson++aRyNHKPIaCO63kqZsMJcTJ+U+VtrCYlQUHW3QfPpWpYyCRHCBfZc85 xaYJtsDMwDYqE+18wfa2x4+MUXPDpp/BnC+rhbdzCKWCDAAQq/KyuVikZuKMQCRNHGf6QsybpGEqZ K0Ick8frCI6G7fBW3AYg==; 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 1jakEj-0006yC-BD; Mon, 18 May 2020 18:11:37 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jakEI-0006e5-4x; Mon, 18 May 2020 18:11:18 +0000 IronPort-SDR: 8piZpjbGY+05Y4+vi3/DwTjnZ3To1faasOJS0ruNM52JibSsrD+sH8mbFdVqPgYuAnmNMjHleF Aadk93CnxLlA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 11:11:08 -0700 IronPort-SDR: 4PTj0JCNuHA2KBITWxMsHBG0lvanYZRK6CkXelcZuJd9rLLbOv9o5Xe4vuYLc2cXwOltPBKNMq LeWae4iARKuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,407,1583222400"; d="scan'208";a="308177709" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by FMSMGA003.fm.intel.com with ESMTP; 18 May 2020 11:11:08 -0700 Date: Mon, 18 May 2020 11:11:08 -0700 From: Ira Weiny To: Guenter Roeck Subject: Re: [PATCH V3 07/15] arch/kunmap_atomic: Consolidate duplicate code Message-ID: <20200518181107.GC3025231@iweiny-DESK2.sc.intel.com> References: <20200507150004.1423069-1-ira.weiny@intel.com> <20200507150004.1423069-8-ira.weiny@intel.com> <20200516223306.GA161252@roeck-us.net> <20200518034938.GA3023182@iweiny-DESK2.sc.intel.com> <20200518042932.GA59205@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200518042932.GA59205@roeck-us.net> User-Agent: Mutt/1.11.1 (2018-12-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200518_111110_211658_C4A89837 X-CRM114-Status: GOOD ( 20.35 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, "James E.J. Bottomley" , Max Filippov , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Dan Williams , Helge Deller , x86@kernel.org, linux-csky@vger.kernel.org, Christoph Hellwig , Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Borislav Petkov , Al Viro , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Chris Zankel , Thomas Bogendoerfer , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Koenig , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On Sun, May 17, 2020 at 09:29:32PM -0700, Guenter Roeck wrote: > On Sun, May 17, 2020 at 08:49:39PM -0700, Ira Weiny wrote: > > On Sat, May 16, 2020 at 03:33:06PM -0700, Guenter Roeck wrote: > > > On Thu, May 07, 2020 at 07:59:55AM -0700, ira.weiny@intel.com wrote: > > > > From: Ira Weiny > > > > > > > > Every single architecture (including !CONFIG_HIGHMEM) calls... > > > > > > > > pagefault_enable(); > > > > preempt_enable(); > > > > > > > > ... before returning from __kunmap_atomic(). Lift this code into the > > > > kunmap_atomic() macro. > > > > > > > > While we are at it rename __kunmap_atomic() to kunmap_atomic_high() to > > > > be consistent. > > > > > > > > Reviewed-by: Christoph Hellwig > > > > Signed-off-by: Ira Weiny > > > > > > This patch results in: > > > > > > Starting init: /bin/sh exists but couldn't execute it (error -14) > > > > > > when trying to boot microblazeel:petalogix-ml605 in qemu. > > > > Thanks for the report. I'm not readily seeing the issue. > > > > Do you have a kernel config? Specifically is CONFIG_HIGHMEM set? > > > See below. Yes, CONFIG_HIGHMEM is set. > > The scripts used to build and boot the image are at: > > https://github.com/groeck/linux-build-test/tree/master/rootfs/microblazeel > > Hope this helps, Thank you ... Could you try the following patch? commit 82c284b2bb74ca195dfcd35b70a175f010b9fd46 (HEAD -> lm-kmap17) Author: Ira Weiny Date: Mon May 18 11:01:10 2020 -0700 microblaze/kmap: Don't enable pagefault/preempt twice The kunmap_atomic clean up failed to remove the pagefault/preempt enables on this path. Fixes: bee2128a09e6 ("arch/kunmap_atomic: consolidate duplicate code") Signed-off-by: Ira Weiny diff --git a/arch/microblaze/mm/highmem.c b/arch/microblaze/mm/highmem.c index ee8a422b2b76..92e0890416c9 100644 --- a/arch/microblaze/mm/highmem.c +++ b/arch/microblaze/mm/highmem.c @@ -57,11 +57,8 @@ void kunmap_atomic_high(void *kvaddr) int type; unsigned int idx; - if (vaddr < __fix_to_virt(FIX_KMAP_END)) { - pagefault_enable(); - preempt_enable(); + if (vaddr < __fix_to_virt(FIX_KMAP_END)) return; - } type = kmap_atomic_idx(); _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc