Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3925955imm; Mon, 8 Oct 2018 11:48:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV60FT9HWqwWloZTPY0xDVve7Si0NW+1ki1IyanAJf1jUK6C5IJOQIfw3LFrOiFUIDCJyLB5c X-Received: by 2002:aa7:880d:: with SMTP id c13-v6mr11934781pfo.251.1539024485018; Mon, 08 Oct 2018 11:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024484; cv=none; d=google.com; s=arc-20160816; b=dO8Zn9lgiyNpGInpg2+MwvIRn859gcM0xFDBPdShRB9ek6u/9XaMkY2tpPqY6pHurX hmt/ewC9b/giMWRNY+5/mPrfpwMMQO/jVLQ3ERPmVzdooQJcTKEurL/E8dRa6VrQVqeb +usYvR8NnAy5p+lBCshnG/DzObjR4x83VuopQ8kB66F21VzuTmIS5mkdbOKLsdaYVFod shCGTKi077GarK2fOzu8GoN3ocb1Ahg9LwehUZAPkCY+HO1qwE/prwgl1UPCtQzA70Fl UxA3Sz2iKT+uvt28iueACettRweWyKH+F9DtBuZv4Fkv5voFn937gs4YTGNdqgApXW0/ pBnA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=craI1+skvShNNTDBd9G7/7Tt2zMx40uuL1Cq2wkfnUM=; b=TCJ3BuquvYPdMyXbH3nANLa74UlgwlzjDJ7JYhXXSvbKaBKH/dupUTzGihs3bBMmIo cEOuIxnS+g06fOCBNGKyRG3Ioxx9KKd3s4lWHkj3MT0VTCSncka+j89X96ahZgUzCEe/ A6hTK8ClptY8oLAmKwJDyzS61obzg42SSkb8qeHF8pJcREia+nK4lOx4r0EWmROF0N7+ YNRocAFxl8+A8+aai6HQ93uNMfNWmbwwDuKhLSMMfIpAomxEwIxcFxZ81dvuU9DDw/Td TMyDVObMGAzndtKDZN4Trwqp6Qpzg3FenKeaO3++NI5uqUemBAs8wwYFJWqpiV8D+tDa My2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cR2WMRp8; 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 a10-v6si17550942pgk.365.2018.10.08.11.47.50; Mon, 08 Oct 2018 11:48:04 -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=@kernel.org header.s=default header.b=cR2WMRp8; 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 S1731455AbeJICAh (ORCPT + 99 others); Mon, 8 Oct 2018 22:00:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:49354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730798AbeJICAh (ORCPT ); Mon, 8 Oct 2018 22:00:37 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 821312087D; Mon, 8 Oct 2018 18:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024451; bh=hu7Hyg3w3TdtarDfoQLg2qPjtFBTNqdVDKXCW/PTs9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cR2WMRp8heSgB5908mJHQZHwswDFo4eEacaKZ3vx6WDPaD0o7AZlQVf9iFVs1fqKK bsMkGZAwl1Mw+Tpfd7B/yOcOxFfxZzxZ09P7WMsTsUa+GBsHtDGno2zYdzYAxRTjdK kUcN7leEZ5J8PL612gNezMpgABkYzc/kXGQudPaE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eugeniy Paltsev , "Peter Zijlstra (Intel)" , Will Deacon , Vineet Gupta , Sasha Levin Subject: [PATCH 4.18 044/168] ARC: atomics: unbork atomic_fetch_##op() Date: Mon, 8 Oct 2018 20:30:24 +0200 Message-Id: <20181008175621.727112508@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon [ Upstream commit 3fcbb8260a87efb691d837e8cd24e81f65b3eb70 ] In 4.19-rc1, Eugeniy reported weird boot and IO errors on ARC HSDK | INFO: task syslogd:77 blocked for more than 10 seconds. | Not tainted 4.19.0-rc1-00007-gf213acea4e88 #40 | "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this | message. | syslogd D 0 77 76 0x00000000 | | Stack Trace: | __switch_to+0x0/0xac | __schedule+0x1b2/0x730 | io_schedule+0x5c/0xc0 | __lock_page+0x98/0xdc | find_lock_entry+0x38/0x100 | shmem_getpage_gfp.isra.3+0x82/0xbfc | shmem_fault+0x46/0x138 | handle_mm_fault+0x5bc/0x924 | do_page_fault+0x100/0x2b8 | ret_from_exception+0x0/0x8 He bisected to 84c6591103db ("locking/atomics, asm-generic/bitops/lock.h: Rewrite using atomic_fetch_*()") This commit however only unmasked the real issue introduced by commit 4aef66c8ae9 ("locking/atomic, arch/arc: Fix build") which missed the retry-if-scond-failed branch in atomic_fetch_##op() macros. The bisected commit started using atomic_fetch_##op() macros for building the rest of atomics. Fixes: 4aef66c8ae9 ("locking/atomic, arch/arc: Fix build") Reported-by: Eugeniy Paltsev Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon Signed-off-by: Vineet Gupta [vgupta: wrote changelog] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/arc/include/asm/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arc/include/asm/atomic.h +++ b/arch/arc/include/asm/atomic.h @@ -84,7 +84,7 @@ static inline int atomic_fetch_##op(int "1: llock %[orig], [%[ctr]] \n" \ " " #asm_op " %[val], %[orig], %[i] \n" \ " scond %[val], [%[ctr]] \n" \ - " \n" \ + " bnz 1b \n" \ : [val] "=&r" (val), \ [orig] "=&r" (orig) \ : [ctr] "r" (&v->counter), \