From patchwork Fri Mar 22 11:48:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 160888 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp780111jan; Fri, 22 Mar 2019 05:56:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaAwOox0MLFbqDQb5Pj8wMX0T4K45KKg8ixIeZxgQ3C0J5W8Gl8yEvH0L7j/cRRntNNdW1 X-Received: by 2002:a17:902:7e46:: with SMTP id a6mr9502134pln.150.1553259410298; Fri, 22 Mar 2019 05:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553259410; cv=none; d=google.com; s=arc-20160816; b=jVpb9coeynmYiJym1LSmlWn7IYlBwe0cKZZNBA9Q2T3DC4JGh9/wEp7xvLaNram+H/ KKFfX6d3bV41yq3reN8cN8dKlh7BY3dE1S+75L5GcI6kk0XIk4cLtdTAI8bzaKZuTupk asWF1EIhwCE1hX6QtVSXpFKHXSl2g8hD8IhRKjMSwr3mSGngcaGcM6Q5zoeu7+hqZ3vL a9fLzxthyTAK059mL9AKhL5IuEZB7c07YLZghnNP0CGvwhunT+yiER72x5Y/+yqzntuy qlIopPecQWhZC2QhLBzngYK7McODrTzL8eZMREdMykUnI2TM8eIfZz4vEssw1Dm5g9AJ atOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=EZ3cSRxRFNptsnTd4HUwIWHPEwjkAF0h0Vpqlu3d7Gk=; b=QKY3wmj0jZ77wG4dVw2p+TeJqFvNKFZjaWtoP6qy7UpJvwrWXcC9nDWNZg3aFeM2gE +gL1RiBrX+uMl/BoqnlxewD5RU4z/ovQVRai566/3YXYGtzVjDL3c0tJFbulqNrGr65J 0EJoEt1+PF4NtyBrWak9ZMuf7D5W3h7DzXSIM9kGbxHuG8f8NaJjLuDEkTZ+Rdvm6nCZ wJ7qtR3VqPxay9EfnOlxDhkca9E7aVnOgzgdWoMGmXygztGogRnPDTJyinZcashkXZVU 7f3zusyPpwVE0L6S3zwxGXtgSGR+PVlhxxwBIuua9RcvwVsgS6wCW0lhS8LtrnWDFxc3 mjTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=N+wasyXZ; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si5301036pgl.331.2019.03.22.05.56.49; Fri, 22 Mar 2019 05:56:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=N+wasyXZ; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732349AbfCVLss (ORCPT + 3 others); Fri, 22 Mar 2019 07:48:48 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51569 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732184AbfCVLss (ORCPT ); Fri, 22 Mar 2019 07:48:48 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190322114846euoutp0106c35a596de91f72557f4a68cbfe0608~ORX1QPd8F2784327843euoutp01Y; Fri, 22 Mar 2019 11:48:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190322114846euoutp0106c35a596de91f72557f4a68cbfe0608~ORX1QPd8F2784327843euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553255326; bh=EZ3cSRxRFNptsnTd4HUwIWHPEwjkAF0h0Vpqlu3d7Gk=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=N+wasyXZshV15dM3NPdPh0h+Air0Ta7YFnK+Pi7+MTAu+5uOKeWMGk0AaZMyLkRd8 ibdLdKLV18G1eiWmKX8u9EhauKpqSAVke69n+92CiOO7C4SJ8R9uy+QxPgr6wXJyaB aliFHV5ABf2xvn1Z2FD11jwBabG2fI8V2hSwlXl4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190322114845eucas1p2237f0ee3228780525c7cee372ea4613a~ORX00T__C0940009400eucas1p2h; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 8F.CC.04294.D9BC49C5; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190322114844eucas1p244c77dfdf2a88bd6806974f41e7c348b~ORX0M3Xcm0935109351eucas1p2g; Fri, 22 Mar 2019 11:48:44 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-e3-5c94cb9dc8a3 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 0C.1B.04284.C9BC49C5; Fri, 22 Mar 2019 11:48:44 +0000 (GMT) Received: from AMDC2765.digital.local ([106.120.51.73]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POR007ESNH2J220@eusync3.samsung.com>; Fri, 22 Mar 2019 11:48:44 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 1/3] ARM: exynos: Unify secondary CPU boot procedure a bit Date: Fri, 22 Mar 2019 12:48:31 +0100 Message-id: <20190322114833.12686-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190322114833.12686-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42LZduznOd25p6fEGMyeIGSxccZ6Vovz5zew W8w4v4/JYu2Ru+wOLB6bVnWyefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAldG08vPTAVb2SoO r3zN0sC4grWLkZNDQsBEYkHvaZYuRi4OIYEVjBKdb44xQzifGSW2npwNVzV73mN2iMQyRonN W78wQTj/GSV2PFnJBFLFJmAo0fW2iw3EFhFQlfjctgCsg1mgj1Hi+t65zCAJYQEviRWzT7KA 2CxARY/uvwZbwStgK7H/4k0miHXyEqs3HACr5xSwk9i+8QAbRPwuq8S3K1EQtovEsWnLmCFs GYnOjoNgF0kINDNKPDy3lh3C6WGUuNw0gxGiylri8PGLYNuYBfgkJm2bDtTNARTnlehoE4Io 8ZC4d2cbI8RrExkljnZuZp/AKLGAkWEVo3hqaXFuemqxUV5quV5xYm5xaV66XnJ+7iZGYOyc /nf8yw7GXX+SDjEKcDAq8fBq9E6OEWJNLCuuzD3EKMHBrCTCuysaKMSbklhZlVqUH19UmpNa fIhRmoNFSZy3muFBtJBAemJJanZqakFqEUyWiYNTqoEx8qHZXNZp59qapwXG701IWhZ9xvP/ qzXM5keli4okXi9TcuMPb/Atzzs86+iRX2zKl3i9g1U3Bt8oyPkoujx37ydD9na5rClnhKf5 Baefust73eW3Sce5FO7/mlknvS/URzzYLX/bIviI2WGe9ZHiQtbXtBMz7t2ZdrjEM9l4o+jN c8svJ8krsRRnJBpqMRcVJwIA9zM84ZkCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPJMWRmVeSWpSXmKPExsVy+t/xq7pzTk+JMTj8S9Fi44z1rBbnz29g t5hxfh+Txdojd9kdWDw2repk8+jbsorR4/MmuQDmKC6blNSczLLUIn27BK6MppefmQq2slUc XvmapYFxBWsXIyeHhICJxOx5j9m7GLk4hASWMEp8+PoPymlkklg37xczSBWbgKFE19suNhBb REBV4nPbArAiZoEJjBKrF84CGyUs4CWxYvZJFhCbBajo0f3XYHFeAVuJ/RdvMkGsk5dYveEA 2FBOATuJ7RsPgA0VAqp5tHMx6wRGngWMDKsYRVJLi3PTc4sN9YoTc4tL89L1kvNzNzECg2Hb sZ+bdzBe2hh8iFGAg1GJh1ehbXKMEGtiWXFl7iFGCQ5mJRHeXdFAId6UxMqq1KL8+KLSnNTi Q4zSHCxK4rznDSqjhATSE0tSs1NTC1KLYLJMHJxSDYxVj/SWB9w5KpBaWfJq6h3e3YJZZjc2 Wd979j237PgUmcXz5sxZf+Oyr7RBj+0P01z+OV4VcSuiDeWOvN7/4+mKugUqqz8bvTtUveuf dflpoXqu2Q/U2bcLe/7ZmeLKWeD80rE+opLzn/phFQsGs8viE/44LRGf8XjV2dZc9sn3VJo7 Dl1e+S9KiaU4I9FQi7moOBEArkSG6AICAAA= X-CMS-MailID: 20190322114844eucas1p244c77dfdf2a88bd6806974f41e7c348b CMS-TYPE: 201P X-CMS-RootMailID: 20190322114844eucas1p244c77dfdf2a88bd6806974f41e7c348b References: <20190322114833.12686-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org On all supported Exynos SoC it is enough to call dsb_sev() like in the Exynos3250 case instead of the IPI, so simplify the code a bit. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/platsmp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.17.1 diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 3cced9dfe963..65da13923b8f 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -361,10 +361,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) call_firmware_op(cpu_boot, core_id); - if (soc_is_exynos3250()) - dsb_sev(); - else - arch_send_wakeup_ipi_mask(cpumask_of(cpu)); + dsb_sev(); if (exynos_pen_release == -1) break; From patchwork Fri Mar 22 11:48:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 160887 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp780091jan; Fri, 22 Mar 2019 05:56:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuV7NRd4p9js5bF8a4buWc0J4JGucNzwhhpVh6+3cdG0JKiacRggJ2nbjWD+m4TDEr+rDN X-Received: by 2002:aa7:8d17:: with SMTP id j23mr8964853pfe.62.1553259408791; Fri, 22 Mar 2019 05:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553259408; cv=none; d=google.com; s=arc-20160816; b=nAJT1c6PFQJSBMGrO4DZYSPCQY+d28TSBBCdjw0fRmxh80djiow0DyJg10EWsIKyh/ CgWLWiJZKQ1YHPfwHbXDIp0dIICYVcUsqf3bUb6JJJEiCQdLUHJkoRTcclCRe8VmUCci plEaX0ahxhSMLFZzG5jOej+pZyqP5H6rFNZZ6bZKzuqNuVtPrxMA1pX5TbHH7krlDvqr 0rTgnrEiUkTS3Fv+cfMPen1ylW1cGhaoRvpvk2+LKiOdemWLoE0gjB0meH8hGhNou3S+ 0V3g8npmds9ywK1Pbx7OM95T9wxSfYHeCHI/N7w3l0KVeiBZ3TlcDgxlln4DcuXpCFEt aClg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=gOapTRepoIgQUEff9Xp/+rQoPW5Ll5OB0yXKeq52fQU=; b=byw2/icGCOiTLUUKZZPBOuEfIQwGcM982yIPP1H4BaFVpFKCc84NUvDSuTELfvtXUo PfRJfxw31M0xCNtn6dQqQPyAOS0A+avSNrWGnIhsTVb6rlm0iXbotHBcCwWQ7+hueXdO Vhday8yHzs/J6cjVZoh1nwKsH0yNdTIkR2csiobiiRQT4SPYLgFG3v5Q5tBi+jBh5kdh ilXVb6HUjrRVfvZM9pdVaOXOi7yGwH6fkCjSjCeNYtyQ83W5tRtePfGJHDXUBIRLYoj8 s1H7ojYTAom3ozoO4Sk+hZW8Qq40iAe/wNHr+O93/XH6kBR27K7rM3euIEUQ2oGgP6Qw w2bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="pAVK/Noj"; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si5301036pgl.331.2019.03.22.05.56.48; Fri, 22 Mar 2019 05:56:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b="pAVK/Noj"; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732184AbfCVLst (ORCPT + 3 others); Fri, 22 Mar 2019 07:48:49 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:54079 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732339AbfCVLss (ORCPT ); Fri, 22 Mar 2019 07:48:48 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190322114846euoutp026104da5def0b89b48e19dd9b60f89ef5~ORX1VevHc0653906539euoutp02R; Fri, 22 Mar 2019 11:48:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190322114846euoutp026104da5def0b89b48e19dd9b60f89ef5~ORX1VevHc0653906539euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553255326; bh=gOapTRepoIgQUEff9Xp/+rQoPW5Ll5OB0yXKeq52fQU=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=pAVK/NojoqUa03sqCm4ECxKO0UdGBNuFkw+o/niMpdLC1rYInQDqhDrvo/ZMFlokV hMWy2o+GcUGkjVj/jjzZiQeziTSv02Hr+oyFa86smwX7VJ5bh+GPklIcMsXJpToFE6 Z0wOz8DS3FYs5dFXsYQd8Q1hn01DGM22hB2rG08c= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190322114845eucas1p11944b738e3eab735a8513032b7e728f8~ORX1AdwVX1109311093eucas1p15; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id E1.4E.04441.D9BC49C5; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190322114844eucas1p16095d6c26d9b6ef23c1168ce70194255~ORX0S1iJX3059830598eucas1p1u; Fri, 22 Mar 2019 11:48:44 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-81-5c94cb9ded75 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 41.76.04128.C9BC49C5; Fri, 22 Mar 2019 11:48:44 +0000 (GMT) Received: from AMDC2765.digital.local ([106.120.51.73]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POR007ESNH2J220@eusync3.samsung.com>; Fri, 22 Mar 2019 11:48:44 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 2/3] ARM: exynos: Simplify code in Exynos3250 CPU core restart path Date: Fri, 22 Mar 2019 12:48:32 +0100 Message-id: <20190322114833.12686-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190322114833.12686-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeLIzCtJLcpLzFFi42LZduznOd25p6fEGBycKGexccZ6Vovz5zew W8w4v4/JYu2Ru+wOLB6bVnWyefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfG1Gtn2QrWsVfc bznN1MC4gK2LkYNDQsBEYvsqmy5GLg4hgRWMEs8uTWOBcD4zSny6d5Cpi5ETrGj9qVtMEIll jBITbp5mhnD+M0rseLISrIpNwFCi620XG4gtIqAq8bltATtIEbNAH6PE9b1zmUESwgKhEpcf 72QEsVmAivZe+QBm8wrYSszef54VYp28xOoNB8DqOQXsJLZvPMAGMkhC4CGrxPrWlSwQRS4S 919tgrpPRuLy5G4WiKJmRomH59ayQzg9jBKXm2YwQlRZSxw+fhFsBbMAn8SkbdOZIUHAK9HR JgRR4iFxZdk2sKFCAhMZJb488ZjAKLGAkWEVo3hqaXFuemqxYV5quV5xYm5xaV66XnJ+7iZG YOSc/nf80w7Gr5eSDjEKcDAq8fBq9E6OEWJNLCuuzD3EKMHBrCTCuysaKMSbklhZlVqUH19U mpNafIhRmoNFSZy3muFBtJBAemJJanZqakFqEUyWiYNTqoFRae4Xx8MHP07cfbCuc/Mp59af YaenhWoe5848llP40uig559M5rcbMxpPVn5w1hHZq++S9P3ArSQ1xqjZv2T27pg53fJEnVTW 841qZz/vXu525rTgsqXccQWGVpeZvz48xDzjha8iT1hzttC72AgX5e9LfQ0ltY5yHzmfH8ix YmmB8P/da9UzlFiKMxINtZiLihMBHIp4gpgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPJMWRmVeSWpSXmKPExsVy+t/xq7pzTk+JMXi7x9Ri44z1rBbnz29g t5hxfh+Txdojd9kdWDw2repk8+jbsorR4/MmuQDmKC6blNSczLLUIn27BK6MqdfOshWsY6+4 33KaqYFxAVsXIyeHhICJxPpTt5i6GLk4hASWMEq0HNnCAuE0Mkmsm/eLGaSKTcBQouttF1iH iICqxOe2BewgRcwCExglVi+cxQqSEBYIlfjT/o4JxGYBKtp75QMjiM0rYCsxe/95Voh18hKr NxwAG8opYCexfeMBsKFCQDWPdi5mncDIs4CRYRWjSGppcW56brGRXnFibnFpXrpecn7uJkZg MGw79nPLDsaud8GHGAU4GJV4eE80T44RYk0sK67MPcQowcGsJMK7KxooxJuSWFmVWpQfX1Sa k1p8iFGag0VJnPe8QWWUkEB6YklqdmpqQWoRTJaJg1OqgfHkMX6O2r+PPrO8CBBbKxPlf53f oa+W4/CbTxmejFwPg4S/la0SFU3R9l0UPMkyRPfaka/ObXeM4s4ll6juMS2fkL1j2aV9v/L/ LF/T7OxzMvim8PLfqSlJx73W2ZTNfHxRV/VREWdfretsK4e8peeub9oVwiTFfWrHtWbnueIC LFF6B1k1XyixFGckGmoxFxUnAgC2ju+4AgIAAA== X-CMS-MailID: 20190322114844eucas1p16095d6c26d9b6ef23c1168ce70194255 CMS-TYPE: 201P X-CMS-RootMailID: 20190322114844eucas1p16095d6c26d9b6ef23c1168ce70194255 References: <20190322114833.12686-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org exynos_core_restart() is called by secondary CPU boot procedure, used by CPU hotplug. Replace of_machine_is_compatible() call with a simple SoC revision check. of_machine_is_compatible() function performs a dozen of string comparisons during the full device tree walk, while soc_is_exynos3250() is a simple integer check on SoC revision variable. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 65da13923b8f..d5d48fbdab17 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -216,7 +216,7 @@ void exynos_core_restart(u32 core_id) { u32 val; - if (!of_machine_is_compatible("samsung,exynos3250")) + if (!soc_is_exynos3250()) return; while (!pmu_raw_readl(S5P_PMU_SPARE2)) From patchwork Fri Mar 22 11:48:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 160890 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp780122jan; Fri, 22 Mar 2019 05:56:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCcsM87kH69AMc79jQ/+qKHfZFyMLB2OW94pQ92ta94xbQ9fnfHiov0DvXpNbqCVgiYrTD X-Received: by 2002:a63:4383:: with SMTP id q125mr8236693pga.370.1553259411140; Fri, 22 Mar 2019 05:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553259411; cv=none; d=google.com; s=arc-20160816; b=HKHUXSh0Fpe0FPHYIGu57f8HFMBb7FhHIqIzqtnJPmnjQ6cnhPu2R2nEYfKx8FWFfG kORuvs0107rNR03J/gnov9hIZOD6yM5fC4Vxi7l2ff+SV8Pku48WoPrl2HUACTW2UkAY 1oL3HphcdH6++d4acQ+j8GAAQFhVGYNZMUl9GEGFDY1SPBqgm2EofgqpOgKT9MksZVX7 Fdv++F1sXv98XvD8Ul4KlKwG08qp3qvD3fazsdAR8L4iNjontUjfni+3nzmXdpbHpTTb uH71eAt6G01672lMnCTPvWtep28zNXhMsaqKXqewY/K23pkKAHMBbV+0W/e5cnnU0KKu az7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=cgIGtXARntSbIVJbyqMEgOABYwp4NPWddeKDz7YfvEI=; b=N8JDZw3vgfDegwlt7LOG04+LYsv4+vXw+rvi2rgrxulFJrMemi4bdd0ZM799Di5s3L vdD7nKAI/iXDUQds45neJ35npVFfzVzqzrG2K306lq5FO73h5+ddhYQsvozJuQk9I+w5 RmEgxTGrOMt78fIJmlaxRB7heCUPD+ggnosmPabyR01bLFWah/Uw2eE+NwPIxNWsWZPb SlEjOvhJHYd9nbewYhA40hWoM6+2DhUF3Jo1nMvyRLCKLTtmzgmHvLnyR/+IwLPFcs/o o00mSIe03zZ367q4T3rrj3rswM2Z/ngeLAlY+2Dnn9VYfX88hWOqIXZkHLE9ivNkmP4T PWpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=epTOyPJY; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si5301036pgl.331.2019.03.22.05.56.50; Fri, 22 Mar 2019 05:56:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=epTOyPJY; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731629AbfCVM4u (ORCPT + 3 others); Fri, 22 Mar 2019 08:56:50 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51575 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732040AbfCVLsr (ORCPT ); Fri, 22 Mar 2019 07:48:47 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190322114846euoutp012206d8e096eb79bf29693aff9e416497~ORX1mmx2n2784327843euoutp01Z; Fri, 22 Mar 2019 11:48:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190322114846euoutp012206d8e096eb79bf29693aff9e416497~ORX1mmx2n2784327843euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553255326; bh=cgIGtXARntSbIVJbyqMEgOABYwp4NPWddeKDz7YfvEI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=epTOyPJYxBvOSStN+24CYxoLDixUWfnkSWgqw2ml3JHN6Xnz1mICaEnOiHbaeiM7F 5qAwYMAhPZQNNkM9491/Qu5ekom1Mu3TlXCa+onFnLHVAsmG90G+zWE090QbZ3Wo7O aovkt9RKTSrVKneoZ58W6kn9wvnJUKxcESOL+yHE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190322114845eucas1p1a9cce7d22637fb4d1ee8c520d6b3e09b~ORX1O7Glr0330203302eucas1p1Q; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 62.4E.04441.D9BC49C5; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190322114845eucas1p11a8303a61da33992cd0590291770b2c6~ORX0evLvg2278522785eucas1p1b; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) X-AuditID: cbfec7f2-a1ae89c000001159-83-5c94cb9d484f Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 91.76.04128.D9BC49C5; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) Received: from AMDC2765.digital.local ([106.120.51.73]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POR007ESNH2J220@eusync3.samsung.com>; Fri, 22 Mar 2019 11:48:45 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 3/3] ARM: exynos: Fix infinite loops on CPU powerup failure Date: Fri, 22 Mar 2019 12:48:33 +0100 Message-id: <20190322114833.12686-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190322114833.12686-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42LZduznOd25p6fEGOxYrm6xccZ6Vovz5zew W8w4v4/JYu2Ru+wOLB6bVnWyefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfGmt6ogj0CFZu2 FzYw9vF2MXJySAiYSBx8eYIJxBYSWMEosfuHcBcjF5D9mVHiWMd2FpiizbeeM0IkljFK3O5Y zw7h/GeU2NS/jhmkik3AUKLrbRcbiC0ioCrxuW0BWBGzQB+jxPW9c8GKhAW8JVY+2Q02lgWo qOP2e7AGXgFbideL7rBBrJOXWL3hAFg9p4CdxPaNB9hABkkI3GWV2DV1KdRNLhJ/v35kh7Bl JC5P7maBKGpmlHh4bi07hNPDKHG5aQYjRJW1xOHjF1lBbGYBPolJ26YDreAAivNKdLQJQZR4 SEy7MAfq0YlAj955zzSBUWIBI8MqRvHU0uLc9NRiw7zUcr3ixNzi0rx0veT83E2MwLg5/e/4 px2MXy8lHWIU4GBU4uHV6J0cI8SaWFZcmXuIUYKDWUmEd1c0UIg3JbGyKrUoP76oNCe1+BCj NAeLkjhvNcODaCGB9MSS1OzU1ILUIpgsEwenFDCqWg60t3McKctlb3jftmdOZmi6gLhesdHz n3k3aj9eelaatOXBqi0XfFv+cdyJ/Xj+lVufYJH2zvfHvVRF5/ZE3P5cuICJI29+3h21JzdX 7bHKnvTH9PqWl56cK0Ujxdza1kb/kdkdWbLVPdcsfrJPhvsqwVtTplfoHdtS0/osNkRs35tq vWNKLMUZiYZazEXFiQB1RARclwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLJMWRmVeSWpSXmKPExsVy+t/xq7pzT0+JMdg4mcti44z1rBbnz29g t5hxfh+Txdojd9kdWDw2repk8+jbsorR4/MmuQDmKC6blNSczLLUIn27BK6MNb1RBXsEKjZt L2xg7OPtYuTkkBAwkdh86zljFyMXh5DAEkaJKz8/MEE4jUwS/zecZAOpYhMwlOh62wVmiwio SnxuW8AOUsQsMIFRYvXCWawgCWEBb4mVT3azgNgsQEUdt9+DNfAK2Eq8XnSHDWKdvMTqDQeY QWxOATuJ7RsPgMWFgGoe7VzMOoGRZwEjwypGkdTS4tz03GIjveLE3OLSvHS95PzcTYzAQNh2 7OeWHYxd74IPMQpwMCrx8J5onhwjxJpYVlyZe4hRgoNZSYR3VzRQiDclsbIqtSg/vqg0J7X4 EKM0B4uSOO95g8ooIYH0xJLU7NTUgtQimCwTB6dUA2PXxan6hvt2//nUfLu3ddfPN/s3Jsaa FB8/xHTFlDkuJt3d71rtobNCM94arBf/9JVb7WJZSdjsty3Lm+fNKyu1aZNz3W1z5tmmnS88 PrGbFW/VKpLpVEyvbLBbEnPiSrnYFME2vwteS6q+ZpWe4M1/t++nhPjJszqFtmFn+tYnn2aW XdD/drESS3FGoqEWc1FxIgB0pb55AAIAAA== X-CMS-MailID: 20190322114845eucas1p11a8303a61da33992cd0590291770b2c6 CMS-TYPE: 201P X-CMS-RootMailID: 20190322114845eucas1p11a8303a61da33992cd0590291770b2c6 References: <20190322114833.12686-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add timeout to infinite loops during the CPU powerup procedures. It is better to report an error instead of busylooping for infinite time in case of failure. Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/mcpm-exynos.c | 11 ++++++++++- arch/arm/mach-exynos/platsmp.c | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index 72bc035bedbe..43d6f7755842 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c @@ -75,14 +75,23 @@ static int exynos_cpu_powerup(unsigned int cpu, unsigned int cluster) */ if (cluster && cluster == MPIDR_AFFINITY_LEVEL(cpu_logical_map(0), 1)) { + unsigned int timeout = 16; /* * Before we reset the Little cores, we should wait * the SPARE2 register is set to 1 because the init * codes of the iROM will set the register after * initialization. */ - while (!pmu_raw_readl(S5P_PMU_SPARE2)) + while (timeout && !pmu_raw_readl(S5P_PMU_SPARE2)) { + timeout--; udelay(10); + } + + if (timeout == 0) { + pr_err("cpu %d cluster %d powerup failed\n", + cpu, cluster); + return -ETIMEDOUT; + } pmu_raw_writel(EXYNOS5420_KFC_CORE_RESET(cpu), EXYNOS_SWRESET); diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index d5d48fbdab17..c01e2f7ba1ec 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -214,13 +214,20 @@ static inline void __iomem *cpu_boot_reg(int cpu) */ void exynos_core_restart(u32 core_id) { + unsigned int timeout = 16; u32 val; if (!soc_is_exynos3250()) return; - while (!pmu_raw_readl(S5P_PMU_SPARE2)) + while (timeout && !pmu_raw_readl(S5P_PMU_SPARE2)) { + timeout--; udelay(10); + } + if (timeout == 0) { + pr_err("cpu core %d restart failed\n", core_id); + return; + } udelay(10); val = pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(core_id));