From patchwork Thu Dec 1 15:00:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 86068 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp731858qgi; Thu, 1 Dec 2016 07:02:19 -0800 (PST) X-Received: by 10.84.193.101 with SMTP id e92mr85314525pld.12.1480604538988; Thu, 01 Dec 2016 07:02:18 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 1si497262plv.49.2016.12.01.07.02.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 07:02:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cCSrC-00077Z-0j; Thu, 01 Dec 2016 15:01:06 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cCSqt-0006Kc-Nh for linux-arm-kernel@lists.infradead.org; Thu, 01 Dec 2016 15:00:48 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OHI0176EHOJDJ80@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 02 Dec 2016 00:00:23 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-6a-58403b07ec4e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id DC.99.16530.70B30485; Fri, 2 Dec 2016 00:00:23 +0900 (KST) Received: from AMDC2765.digital.local ([106.116.147.25]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OHI00C4RHODRK50@mmp2.samsung.com>; Fri, 02 Dec 2016 00:00:23 +0900 (KST) From: Marek Szyprowski To: linux-arm-kernel@lists.infradead.org Subject: [PATCH/RFC] ARM64: use this_cpu_read in raw_smp_processor_id() Date: Thu, 01 Dec 2016 16:00:07 +0100 Message-id: <1480604407-6022-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t9jQV12a4cIg87LxhYbZ6xntXi/rIfR YtPja6wWa4/cZbdYev0ik8XLjydYHNg81sxbw+ixeUm9R9+WVYwBzFFuNhmpiSmpRQqpecn5 KZl56bZKoSFuuhZKCnmJuam2ShG6viFBSgpliTmlQJ6RARpwcA5wD1bSt0twy/jed5+9YCt3 xbtrJ1gaGPdwdjFyckgImEjMWdHFDGGLSVy4t54NxBYSmMUoceeMTRcjF5D9i1Fi2+w+sCI2 AUOJrrddYEUiAhoSU7oes4MUMQvcAyqa84cdJCEs4C7xt2cnkM3BwSKgKjHvTA5ImBcofPHB ZCaIZXISJ49NZp3AyL2AkWEVo0RqQXJBcVJ6rlFearlecWJucWleul5yfu4mRnAQPpPewXh4 l/shRgEORiUeXgczhwgh1sSy4srcQ4wSHMxKIryOFkAh3pTEyqrUovz4otKc1OJDjKZA+ycy S4km5wMjJK8k3tDE3MTc2MDC3NLSxEhJnLdx9rNwIYH0xJLU7NTUgtQimD4mDk6pBsbeIJs8 q76oC7NsL7gvn5Mvrcwaydlq4SpifCDcb06E+Sa5/h9znn+Rn5PXcvCG/pbghcE/c5T9RAJ+ Pl+Ry/U1aeufX994GzbadMuarWhiX7zi7KwXukt32iX+yZbS7BFO/PNonaX916ns18Kusu3S Z9efGzx3YmzR0gvzb73/6C4ilrbmyRslluKMREMt5qLiRAADAvIAWAIAAA== X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161201_070047_982293_9FC57E01 X-CRM114-Status: GOOD ( 13.95 ) X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [203.254.224.33 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Bartlomiej Zolnierkiewicz , Will Deacon , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Direct access to cpu_number entry in per-cpu variables causes boot failure on Exynos5433, so replace it with this_cpu_read() macro. This approach is also used on x86_64. Signed-off-by: Marek Szyprowski --- This change is needed to get linux-next to boot on Exynos5433, otherwise it hangs somewhere in early init. There is even no message on the earlycon. This issue appeared first on linux-next from 14.11.2016. The tree from 11.11.2016 is the last one, which boots on Exynos5433. I've tried to debug a bit this issue, but I ran out of ideas. Any comments or suggestions are welcome. Best regards Marek Szyprowski Samsung R&D Institute Poland --- arch/arm64/include/asm/smp.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index a62db952ffcb..d514383d6219 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -37,12 +37,7 @@ DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number); -/* - * We don't use this_cpu_read(cpu_number) as that has implicit writes to - * preempt_count, and associated (compiler) barriers, that we'd like to avoid - * the expense of. If we're preemptible, the value can be stale at use anyway. - */ -#define raw_smp_processor_id() (*this_cpu_ptr(&cpu_number)) +#define raw_smp_processor_id() (this_cpu_read(cpu_number)) struct seq_file;