Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp144497imm; Thu, 27 Sep 2018 17:53:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV612FLcrTA3X1fwVhL+rlefow+LwJcqgme0Vyd45+mQqbEXEYwMJ1//b5WHIk+E028jBVyyG X-Received: by 2002:a63:78cc:: with SMTP id t195-v6mr3333315pgc.329.1538096038532; Thu, 27 Sep 2018 17:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538096038; cv=none; d=google.com; s=arc-20160816; b=nLTEfXV8IWaTbpfA1IubRywIyHG2mR0B/JLijlkuJSXHAhcKPUyZ+0GOdhPx4FQ9a3 N+RpbOKQdPEA58+fcQEsLhd+NAvuTIeuFdHUsP5FBg4oK0ZlHFOQTzRUPe1tdi28saVF F8YZFBVz93jfkuDCi9TwG1Io+460Sq1h053cPWRuuzTfiKD4hS0uXruRkjZrFX171+/b JvHX6NdtBP8pkFy1ibSWa/Hrs6iuqh6T6RaM7f23s/q2wxmy5QKeH4hIcdyE51kx8xfi GLOjLG8x35vCuNyXE3DRGtiMLJTHCyTnYILLeJQdEUQhVD11Tayzvms2iXCU9fgk6Xep rYZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=RSnX3H3a34J2ge4oRiqi0+ggekLZqEJLK0aXXF32guQ=; b=G/FW+WZCDcxlY3yxWtgK7Y/4Vg6z1knPMKy0A09DcE1WB6tAICDLpC50oiaDNpA8UZ Xn3tI7RN55xY27RhYyEYAFyORkX5421sA2wLgChuo/TMVboJG+gsY8K+f0EzHQhUU3Yy wzQTO6jGQB+sVvCn3FPhHck6C9wp0jDoK06tR41Rrw9F1fLRREvTdU038yb6wBAXyANY vpAQB9N8mO8i3cuDrBylCbDOWZlDr/M6rVidGT0NskDSVcaF2NNbg0HWJEAbdgdzPzef aMFCDeucAAZQnUTYvugiFJq2dA38Hc01cdZ6TuDInhTv7YVyJxtKbknawp1o+rPLImLD aFdw== ARC-Authentication-Results: i=1; mx.google.com; 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 z17-v6si3436671pgc.653.2018.09.27.17.53.42; Thu, 27 Sep 2018 17:53:58 -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; 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 S1728954AbeI1HOP (ORCPT + 99 others); Fri, 28 Sep 2018 03:14:15 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:52994 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbeI1HOK (ORCPT ); Fri, 28 Sep 2018 03:14:10 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07694427|-1;CH=blue;FP=3409973072285762938|1|1|12|0|-1|-1|-1;HT=e02c03278;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=18;RT=18;SR=0;TI=SMTPD_---.Cwkm2cI_1538095948; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.Cwkm2cI_1538095948) by smtp.aliyun-inc.com(10.147.44.129); Fri, 28 Sep 2018 08:52:29 +0800 From: Guo Ren To: akpm@linux-foundation.org, arnd@arndb.de, daniel.lezcano@linaro.org, davem@davemloft.net, gregkh@linuxfoundation.org, jason@lakedaemon.net, marc.zyngier@arm.com, mark.rutland@arm.com, mchehab+samsung@kernel.org, peterz@infradead.org, robh@kernel.org, robh+dt@kernel.org, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, green.hu@gmail.com, Guo Ren Subject: [PATCH V6 31/33] csky: fix compile error in linux/bug.h with SMP enabled Date: Fri, 28 Sep 2018 08:51:28 +0800 Message-Id: <0b20e1e62b23f9963020423e7e9c5ce833313fcc.1538058840.git.ren_guo@c-sky.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <62098e7d0a7fbdd09f44d7e23333dad258a01bd2.1538058840.git.ren_guo@c-sky.com> References: <62098e7d0a7fbdd09f44d7e23333dad258a01bd2.1538058840.git.ren_guo@c-sky.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In linux-4.19 we couldn't include linux/bug.h here when SMP enabled. It'll cause compile error for bad include. In file included from ./arch/csky/include/asm/bitops.h:70:0, from ./include/linux/bitops.h:19, from ./include/linux/kernel.h:11, from ./include/asm-generic/bug.h:18, from ./arch/csky/include/asm/bug.h:19, from ./include/linux/bug.h:5, from ./arch/csky/include/asm/cmpxchg.h:6, from ./arch/csky/include/asm/atomic.h:8, from ./include/linux/atomic.h:7, from ./include/linux/rcupdate.h:38, from ./include/linux/init_task.h:5, from init/init_task.c:2: The asm/bitops.h will lose asm/atomic.h for cycle include. Signed-off-by: Guo Ren --- arch/csky/include/asm/cmpxchg.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/csky/include/asm/cmpxchg.h b/arch/csky/include/asm/cmpxchg.h index 9b63dd7..ad53006 100644 --- a/arch/csky/include/asm/cmpxchg.h +++ b/arch/csky/include/asm/cmpxchg.h @@ -2,9 +2,10 @@ #define __ASM_CSKY_CMPXCHG_H #ifdef CONFIG_CPU_HAS_LDSTEX -#include #include +extern void __bad_xchg(volatile void *ptr, int size); + #define __xchg(new, ptr, size) \ ({ \ __typeof__(ptr) __ptr = (ptr); \ @@ -25,7 +26,7 @@ smp_mb(); \ break; \ default: \ - BUILD_BUG(); \ + __bad_xchg(ptr, size), __ret = 0; \ } \ __ret; \ }) @@ -56,7 +57,7 @@ smp_mb(); \ break; \ default: \ - BUILD_BUG(); \ + __bad_xchg(ptr, size), __ret = 0; \ } \ __ret; \ }) -- 2.7.4