From patchwork Thu May 25 20:32:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Pledge X-Patchwork-Id: 9749103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8B81560246 for ; Thu, 25 May 2017 20:33:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DCB328381 for ; Thu, 25 May 2017 20:33:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 725C6283BE; Thu, 25 May 2017 20:33:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D15B528381 for ; Thu, 25 May 2017 20:33:08 +0000 (UTC) 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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date: Subject:To:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UBCDX6v4rMZ4CuINPvtVb0t94t5lREKToXmmEs3z2Pc=; b=PtEoXA2zMkwLRq ZUMcz7GobEO8B7+fZoqSxLrq7OS3C4wfnwMtpIylVlDtz54ab73DZgyvbnvxeZwd876gDpNtM73n2 WpYX9ry+98hNLz0T9j/tnh5of82qfK2xRASR5HG4aJDaoYQ4Csd62KIOYhsF/5jAGGAoMEMBFqvKu Tn61xxrHtFSUjfFw9rW7eAAJ0fAKQvqoAkfHTrsZYWFapAoZIcXQAf/PdAcUveS2QJtX+bRewzFal g2Oglc6ep4U/dKY/l2KLo9DmIWPMMc9sLZ8Y2s79BttNVEgx38uGUwCCtIdZg7cdevWWDkqyAyjDR RszaxLD+/dqgoJnhWxyA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dDzRS-0002zt-Dd; Thu, 25 May 2017 20:33:06 +0000 Received: from mail-sn1nam02on0064.outbound.protection.outlook.com ([104.47.36.64] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDzRN-0002oH-TA for linux-arm-kernel@lists.infradead.org; Thu, 25 May 2017 20:33:03 +0000 Received: from BN6PR03CA0022.namprd03.prod.outlook.com (2603:10b6:404:23::32) by BL2PR03MB164.namprd03.prod.outlook.com (2a01:111:e400:c0d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 25 May 2017 20:32:36 +0000 Received: from BN1BFFO11FD002.protection.gbl (2a01:111:f400:7c10::1:173) by BN6PR03CA0022.outlook.office365.com (2603:10b6:404:23::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Thu, 25 May 2017 20:32:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD002.mail.protection.outlook.com (10.58.144.65) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1075.5 via Frontend Transport; Thu, 25 May 2017 20:32:36 +0000 Received: from otc-sw1.am.freescale.net (otc-sw1.am.freescale.net [10.29.200.182]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v4PKWYIK030487; Thu, 25 May 2017 13:32:34 -0700 From: Roy Pledge To: , , , Subject: [PATCH] soc/fsl/qbman: Check if CPU is offline when initializing portals Date: Thu, 25 May 2017 16:32:32 -0400 Message-ID: <1495744352-22476-1-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131402179564866518; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39410400002)(39840400002)(39850400002)(39400400002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(5003940100001)(85426001)(81166006)(97736004)(2201001)(8936002)(8656002)(54906002)(53936002)(105606002)(50466002)(4326008)(498600001)(356003)(48376002)(36756003)(104016004)(2906002)(106466001)(77096006)(33646002)(5660300001)(305945005)(43066003)(50986999)(3450700001)(86362001)(8676002)(50226002)(47776003)(189998001)(38730400002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB164; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD002; 1:m5recMp3gNTkiCyTQH/epCt3RnGl+wBHWIDol76Bvf9uGscOH19c7ZD/AtCALA85XWKO+nJUUorfW5/ShIrYowShBXKkz/XYToil+EVEjyG5pREsEXV/34eX2hEg6F0LnM5v4GcidfY06noLnOwFClPJr4rxZ+huY88m7l7xjPq0pi/MSsgOc/spHE7iBNw17ZrwvrD7ntHiHB13vJeH4jd+VSUMIBr9qPd8zOopxboV07VGA8VB1UbZ4v2h2DBwyImcdW+/1NCb7UU8Ts6Kue4rC5BSzsLVg0QifC6v7Rjj76Ns6R89Yf2i1N0KR48yQ0/IwefWX2UWp7zxdoev9EwT7iVuHUL5c0SPXZKWWc6q8K9xRUAt36B1NIh0slIYs2miGH1E7obsB7R06BRZtdtS5NrqG4kmIxhxiR0smj4BeiPMXNw+rN8309Sld3NNsc6U7l+zKVPWEzf/UWwDCg+3cni7SLzKbfkc5c52zv/8b+URUPy+xq2bAJZAr0CUuLv3yxn8DatujnaBkAC6OyWTBl9ZfRKK+BApykvYPK1Q4R3iSQEMLjLq2ENBaBhwotwMU+bBThxhEasrInw/OegMBqsHPAXX4NEOn7wk6ln70h3eNkbgzRf/OrrKV8as/4RTWa4tyX2WOqirICzxu2+537ctu+WQcjHrKxE8m3g= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL2PR03MB164: X-MS-Office365-Filtering-Correlation-Id: ebeabe80-0904-4574-00d6-08d4a3ad2e11 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BL2PR03MB164; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB164; 3:s3O0msSyihUyO+Y/LjgEKxoQW3OtSRtV/dZM9dZoviuTbme/Qh5zVBOwl/XKjq6pl+j+EhxPY/X11luqrcQrEtbTIguTItk1sVcQZn3DgS7PmD3/0qX4cul4NcQ3Qyr16xQ9dN7LAsZW+tu4YYOPbeRjAwz0NNnRyZgVhkx2zxcVRHADWTNj/XJ04MRYKrnXHEhuwkHa9vFFBuJxsZAoTBt4I6ll3BS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PRVS: X-Exchange-Antispam-Report-Test: UriScan:(209352067349851)(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123561025)(20161123556025)(20161123559100)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025); SRVR:BL2PR03MB164; BCL:0; PCL:0; RULEID:(400006); SRVR:BL2PR03MB164; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB164; 4:ATWsSXQa8nWCkT3t/WJPtwrtUSHeZWb6eejNRF/lFpv?= =?us-ascii?Q?dKxN+U12J32vsl+KFMmvKzFr5f21hk5K/XTLN8elJ4fXzJLleGxRdfY4nwT+?= =?us-ascii?Q?oV1Y5GiLprzxB/4N+Xz7bBUImGJtJu2aQwwBuISnhwD0LH6v/hdX8W7+dbdY?= =?us-ascii?Q?AtB8p1qvMxlHiG/VzGU/Rh2erDkMi+KbsRE46XSpA8LUlRZ3pE6gq3IFlOyb?= =?us-ascii?Q?LG6Ws0v03JvYtgkLh2okYl7vCBY5z8p6mT4pbmBJwpkwJBfX/lWpkaNareja?= =?us-ascii?Q?o6Gx66xpM36OmR0VDsQOKOA6ZuBCtozCD9NrDMUQSg6Ty+jCys96W3C7zWii?= =?us-ascii?Q?FLW4mFViHTtWK2Yu/gtUoDBB0YdOaYZjr95cGra9SUbIDiHvrV20PMDmwS+q?= =?us-ascii?Q?SMw5GWrFtGJp0sIOwmMnE/hSpcI0M+PTdWkEhtwVSEagi1gF1HYu7pGUP7BH?= =?us-ascii?Q?I1lrUEQma66zNS1Jc3OvLnTuunPgKBBVsROL3GwXoSca0ZO+nwBckzC32j5X?= =?us-ascii?Q?jtnlangDSW/nOPRzLOSKDXWwzchRyR+YGD/T5QWhghrpBKFPro/Nq9w4yYw6?= =?us-ascii?Q?g8XDyYFpe/W30HxVDFcjRdnvynVHuhRuESRsNYxWxQsr9jEfclpBtCaXeXPN?= =?us-ascii?Q?cm/8+4YVCzW1tDFYpdPs52Yxsi0ZCmXRRUqGuOQBY5ZFZCNTS941F81nst6F?= =?us-ascii?Q?oamwAEK/scnc1M79VQJR8iMcUIf4xDQZwYCQEJ2Z7noDrfzBK/148sODWGfd?= =?us-ascii?Q?CyeXSJkul6VF+Cx/EbcMwkg0DPTftEdAtQuHVj3Tcz69cNRxotV9mkSL5B58?= =?us-ascii?Q?oDiGEOIgqqVPgK9lnesAirbccgJdi3sXqbWgtPQQ2B4RGhR6X8TNCd98Yi/O?= =?us-ascii?Q?ZGEZZ2k0n9KBDedmJZKwbm/TdQnH0yEWs0A4AShfF3OwvbVE4lE54UHJ8gd5?= =?us-ascii?Q?zNk1SSDNmDj7LUWUyF8cNJyWOZZIGlM9laq9o9BGiv6XEB+p0kMngST3MA7n?= =?us-ascii?Q?qH0/slKK6Zby6CYjctVtg?= X-Forefront-PRVS: 0318501FAE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB164; 23:VloGZagP4WxdVIC8GOhqax3lrS3ljSO7g+1j/q55zS?= =?us-ascii?Q?oI9X+ER6D1qH6bSU8HKjwLWYiBWTMz+bcIemayJ9lCeFJc6D7LTDfcCAKy/3?= =?us-ascii?Q?IeFzo9T064QJFOe6A99p/iA535HVordl7qydYGGxs4rkHnTaPVnOrOI6N/hq?= =?us-ascii?Q?NkWRu2BBc+bDL7wgZVckhcOAwyraXQduNuO5e2P9vxYHCWanFdvlEAqlAjIO?= =?us-ascii?Q?Gvp9E6CCmgoGoZUOaN28IomwVnm6Hz1XloXKhtNMK6kvQpe2gweJwxa8IwQ/?= =?us-ascii?Q?SkDuXy7pPqpXaq75JQRBUTcrdGFkcavsqEuFbHOr/URyBdF7vs9Gj8ymXoi1?= =?us-ascii?Q?3H5XG6aQ4Lr1E5+L3KppTxuhSTw/ERBn4wBD/Rd/duneC+7qbTDarQn3pLPB?= =?us-ascii?Q?yKQCum/fSFglAKRbp/3YJckK1mln3aVP6A3aAsBiHMsEkwmeuMM9gJROWwxq?= =?us-ascii?Q?AK8TZvYdFA9FSsY6OOF/Na4eepH3d9VocpvIgaUl6LcDjj2ceM2LUUr4p7g3?= =?us-ascii?Q?XomIvynEgB54dnmqREh3x6XZWywSkRyTBM/N2yXKKSStB45owxMAtE+7/9O8?= =?us-ascii?Q?zL142e+RzcBYSxh7pFPb1WneY5Vr9JjP3iylAHn9niFJ/lrcyNt+v6XCiAU/?= =?us-ascii?Q?mIpsDkThfzhQG627KH9CrDyu2jUMZGgUHONPjn8mz2kjVi3v+R2fvKGv/ruf?= =?us-ascii?Q?GZ7YKDh9h/mC6jHA1QS7rpsDc5LFCZGN2qaQz1HEwb2rafTIg6Q8/V0T9aBm?= =?us-ascii?Q?nmBBbi3x/iIKwInSSQhClzetsV5B4c+NbmcUvJQO0JpfrfIPm4z66e1rNAG6?= =?us-ascii?Q?eJWodHVWIL8Hw6ZO7/xRGHOO5sL/MRxXIHJnDj/HygDD2NHzZMetazylpgKJ?= =?us-ascii?Q?AdUMdywI+Jg+KhjGjcHFWYlGT+czDy9FMw8B9wLRQoNGNoVAclsIDATibYuy?= =?us-ascii?Q?t8eB3tbYKJSXFvPZlZqoiTJNsCTziVbs+jm78jg2N+8//Zr216snGZS2tcRJ?= =?us-ascii?Q?Ki2zCo1MWfd3m7XPOg3mVXUo9ZaXs4NSDRWHTS95z58ZjRs+6d7WzVyzqhii?= =?us-ascii?Q?CMBbNPyr3LUWhPHnDTWihnaYykJ81xFpFm+8YoXpY5hkNtwLRWpoucCRCrmB?= =?us-ascii?Q?S43UEDLECL+JcatsgXA5SaL590ZlsBj3mLEkTgGqqRgiIYJbaHpur1iQLSqP?= =?us-ascii?Q?whj75/DX01ehFyQWa7wKpvYlOReBMPNXfybrhw8JgNdzYVEEn/Mranmg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03M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aR+QK7jIftnMYUTp63ry7fRsTfdeyUBMkO86qIbsNL/1XGh15FPK1XIgw49K3XufsWDmHoIAVJF4gBgBC28uBinCP6pUwc+bTWPo9NvfB/Y4b5f6dm++3BHNCEthbvqM4qU8ElkR0LkYHkU72Q5dp09u4LQgf5ePOxlIvcsg86uHyhnjqaCWUblAWlIq0ErTCstc69w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 20:32:36.1434 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB164 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170525_133302_057223_7F1BE7B6 X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: roy.pledge@nxp.com Cc: Roy Pledge , madalin.bucur@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP If the affine portal for a specific CPU is offline at boot time affine its interrupt to CPU 0. If the CPU is later brought online the hotplug handler will correctly adjust the affinity. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/bman.c | 17 +++++++++++++---- drivers/soc/fsl/qbman/qman.c | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c index 1fa9099..b72a92c 100644 --- a/drivers/soc/fsl/qbman/bman.c +++ b/drivers/soc/fsl/qbman/bman.c @@ -560,10 +560,19 @@ static int bman_create_portal(struct bman_portal *portal, dev_err(c->dev, "request_irq() failed\n"); goto fail_irq; } - if (c->cpu != -1 && irq_can_set_affinity(c->irq) && - irq_set_affinity(c->irq, cpumask_of(c->cpu))) { - dev_err(c->dev, "irq_set_affinity() failed\n"); - goto fail_affinity; + if (cpu_online(c->cpu) && c->cpu != -1 && + irq_can_set_affinity(c->irq)) { + if (irq_set_affinity(c->irq, cpumask_of(c->cpu))) { + dev_err(c->dev, "irq_set_affinity() failed %d\n", + c->cpu); + goto fail_affinity; + } + } else { + /* CPU is offline, direct IRQ to CPU 0 */ + if (irq_set_affinity(c->irq, cpumask_of(0))) { + dev_err(c->dev, "irq_set_affinity() cpu 0 failed\n"); + goto fail_affinity; + } } /* Need RCR to be empty before continuing */ diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index aebcf16..b1b1268 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -941,7 +941,6 @@ static inline int qm_mc_result_timeout(struct qm_portal *portal, break; udelay(1); } while (--timeout); - return timeout; } @@ -1218,10 +1217,19 @@ static int qman_create_portal(struct qman_portal *portal, dev_err(c->dev, "request_irq() failed\n"); goto fail_irq; } - if (c->cpu != -1 && irq_can_set_affinity(c->irq) && - irq_set_affinity(c->irq, cpumask_of(c->cpu))) { - dev_err(c->dev, "irq_set_affinity() failed\n"); - goto fail_affinity; + if (cpu_online(c->cpu) && c->cpu != -1 && + irq_can_set_affinity(c->irq)) { + if (irq_set_affinity(c->irq, cpumask_of(c->cpu))) { + dev_err(c->dev, "irq_set_affinity() failed %d\n", + c->cpu); + goto fail_affinity; + } + } else { + /* CPU is offline, direct IRQ to CPU 0 */ + if (irq_set_affinity(c->irq, cpumask_of(0))) { + dev_err(c->dev, "irq_set_affinity() cpu 0 failed\n"); + goto fail_affinity; + } } /* Need EQCR to be empty before continuing */