From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0077.outbound.protection.outlook.com [104.47.34.77]) by dpdk.org (Postfix) with ESMTP id 32B843772 for ; Thu, 15 Dec 2016 08:02:08 +0100 (CET) Received: from CY4PR03CA0017.namprd03.prod.outlook.com (10.168.162.27) by DM5PR03MB2474.namprd03.prod.outlook.com (10.168.233.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Thu, 15 Dec 2016 07:02:07 +0000 Received: from BN1BFFO11FD024.protection.gbl (2a01:111:f400:7c10::1:133) by CY4PR03CA0017.outlook.office365.com (2603:10b6:903:33::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8 via Frontend Transport; Thu, 15 Dec 2016 07:02:07 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.com; dmarc=fail action=none header.from=nxp.com;caviumnetworks.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD024.mail.protection.outlook.com (10.58.144.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.761.6 via Frontend Transport; Thu, 15 Dec 2016 07:02:06 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:989; Count:13 Received: from [127.0.0.1] ([10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uBF71wc6020248; Thu, 15 Dec 2016 00:02:03 -0700 To: Jerin Jacob References: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> <1480875447-23680-17-git-send-email-hemant.agrawal@nxp.com> <20161215063409.GC19354@localhost.localdomain> CC: , , , From: Hemant Agrawal Message-ID: <363db5f9-dfda-6818-1b14-2a573023e9e6@nxp.com> Date: Thu, 15 Dec 2016 12:31:58 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161215063409.GC19354@localhost.localdomain> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131262589263259605; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39840400002)(39410400002)(39850400002)(39380400002)(39860400002)(39450400003)(39400400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(24454002)(377454003)(54356999)(104016004)(33646002)(81166006)(356003)(50466002)(229853002)(6666003)(38730400001)(92566002)(8666005)(81156014)(77096006)(305945005)(120886001)(64126003)(50986999)(2906002)(6916009)(626004)(7246003)(65956001)(65806001)(47776003)(2950100002)(7126002)(4326007)(65826007)(23746002)(36756003)(5660300001)(110136003)(76176999)(230700001)(106466001)(68736007)(86362001)(8936002)(97736004)(4001350100001)(31696002)(189998001)(85426001)(31686004)(105606002)(83506001)(8676002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2474; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD024; 1:iNBPF7iXchKf+Mg3mLU7WAzzFF8cWkscPLX+j/IYZdwfU9g9D9LRfQQU5oFJtPsYM6KDXhf4cf2M55ttWbO8EIroaTfUIFfmjEoSjZurECZHtCV/+w2bEAPs1zwC8obJ8/WKvMoNowuwMb436tOR0d2UK0K3LxWO2rrU81QCKIjI3hm/Nbayo8X5DksFwtwJq4HAFfopoQnEqJBSbQV9Yr2WjZLoUd7p2mtzElEcXcHOhsxwPtm5qO3xUNzC/XOAuBFp25crcNhotwyaBgmD11sXBvjr72HdnOeMFJ/vXV1RQpWMCkIpr8oC1/KkOOWJ0IOr+Xyy/GVddQvEpkVqQ7T9zgr0ONCwVsrQKI1fKiBq8fjF/n6m8Qj5hlaXwPYXLT8UAlp2Irmr2O/o2KrOB+Lln9fQBH6/EZAk+ovhjhI/YQw+/1+HoMQvGTuaLiGLfslXYAHGBCOFx77HX11biK8YyXlVdNMqvk6Jyfoik2ptYtQLpcQnsJFH0VD5YPQEoM3qeh+CBV9OT0CojJZ0ihZIpIVaLyStBizSRB8cBfsuahpSFue3xGyx9mb3FMtneC5bPrJdAMw6+bir3FFTVd4zUuC6iPjRNn6W1th4Z80gVpVkIt/pFt7rBaiJiP1lX1OVnr65gS+D7xaemIX8OA== X-MS-Office365-Filtering-Correlation-Id: a21c875c-63d6-4c98-9ce5-08d424b847b9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2474; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 3:hHACnNzV7/ox9osGOIAVExlJNMm9lxPSEC+yxu+elZz/cBnJdgAfLoYypqZfjxSUDk/W0MgNPs/Fj8suPXAeY0eMhPDLFEXVpSss1UEKVxcAz4nMFDL0wOF+ihbLwsMSdmxkVp5/tPe1pHZQa6aBCig9rIuH4xDXJjO4GaNLYmM1/W8MCkjEJ4S5xoECJT5tuBfBHWRVMj++I2X7Fo0xy8aqXG2Uf60IxtF+tuB47b7ou9XyjMy01hSP7oU+Piv6wOHrEkomSVPl0yaYr5SuWUWSi8qjPgELWnUSJUI/0vuRmEFFZcardO/iDByEnJbDHgkg4cyQdfemnwYc9+vb1s2ce1IPOTxt3gi25IYjOEwp2YNod110ql2Hm10fykNj X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 25:ZW6kYbMahSP7Q8fwk8kuaFebvbdRwm+2V5k+4Vz4D64bDyPhVIa1J27wc1ahs75yZPkongTkJGwde1yb6Tp/Ft6jWyBJCBFY0POilDSRh+I1RZY0vu9BNseVG2vwKh1XC+bal7ZSkMs+kcdweWuTANZQwU6xPUC2cFzR479UKnMrSX9SE8QQIsYk9M4XoQTtqRtbRR4BtssZu5L2QLAuQvJGG/53qiFungcQltwDXe4pv+6oVlZM7sqqwTlZYJCxQDeHPSv/FgiEsYuFmj7kxk2Tva1xMLHeSnMg7i/SH+f0ZYthoTjhYWoDFgnpsOzUAEEHcMjTb6ldAhRkJt3iWZmwStNcE88txaxddUJax4jllpRiHg0Ik7SgqXjUj42zhk2h9r5R+40w16PoN+71mtpmDKd3Z4zVRMJNu0Kw0+OoOMOJJGlWi+yDt3rjDP+9J9T0K9yDpDGSv3gRXeyzMLE4T1kR98qhKhpvPgageOh6Gkw/CM4ZVD770mZNr4geNlQrICZlXSeRoi/vJBL5eAdTVtpt+j7IKmSFehQ3ccS4rd9yd94t6X2Rwe3zxTx7hDP7HYoeQ5wemHCyhn3B0sEiSY+ymSBNj9ituwvqqtUmWxucooZCcft0TsAwZuAWkvl+pDGpPWPnI4hz9n6kCslHKk+4zAk7htMURxKbd0MMhhgfGbOwoz02wbJSRwXATM1hjSK/oG1fCaZyUGzdi/oRdHZ1aqB9t5BOH69MWnprY3a41vJ0DSsp53FsIX25xWa57vBZOfS645q99aQi9jzncXL56g5LUo1pUhyjX00= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 31:WbVA3sU0l1cwM7tNH3p7ZDjTnCNdGhelvxgK2BCaXB7y0xpsAWW8oSwY5Pz31V92m0tVAqni57dyu2PhMa3g/1TFcTvCVEGGWFcJPWe1F6aRC/HBjzW/nhDWizfYugavC/dWuUh6jhYgCYH24q8/B1ortEZuwR83QBNWHjAe/WA6cHBkrxUk+W3M6eZUPHBX9c01GtX1hwOk05RKwZph4e/SnemKmmLD5De4HFU2HsLyt89rZ7fEqws7MEpvn1e1q0VFLkjSCzIjZcRuWRCRnH+E9YeKxanYJf1VHCkooc9uuVuOa5pBMgVZaGpKKDA7 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13017025)(13018025)(13015025)(13024025)(13023025)(10201501046)(3002001)(6055026)(6096035)(20161123559025)(20161123563025)(20161123565025)(20161123556025)(20161123561025); SRVR:DM5PR03MB2474; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2474; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 4:wYqqvNNcHY6uhMS0tlD5A7WV4/btDWaiayIiMH/KwLpBWn6DRS1b0GbzoE0g5vT2KspUSNH1U1uJUVCHBHD7aqJWs9t/kMphO0jJveW891E1R+gvq9Y561obPiSQbyjxBiJdUX3bFBiKRSHq5dOIhzGDJIdclh0VyZIPmp/AGVnF5wX+bR5+VctZLU4nQKYMmFKTeyyGls8ghtFw+Rprrkqd6DgWKNWlmOK80ZPE1bzsuy+yKP9ntL8UrYDKL7TCJRq6K9GO5uDUttX+Aepfy9Yjbz3jLCdDKkAKpI0RA8fby4QTWtUu8k8HgibQP6hqlC/k6aERIbGTUO0dNseoeQ6F5UIKLQL1tpznm8bELTDoFhggu9hRLaTcEnRc1BO1vkFQR+GdJrx411UzIZq3VZqJhgN1E/DHnwzXkenwZgcSnswvG2JoSExPibxaf/BMX19e6bw8VgM2SJ5rZcBixldzzZXjHVOHUenSMcHXR7QaPOrwn7zYlJViscA6kkdTS8eaumxBWz7qRBT6uUqiMPekcV98vvPW2yU5uZFvznGLaMNlgyHQSN9Fijn2DNBnr5UxS5OSQA+8b6mBXPG+5P+jqfcJATSA7V1840SArX7RsILryyCL3JJ9LYqe5q4+dQlysvZ9tuoxA+jKlRuQITWo0P3JA+Y54xHESHC83Gbl5svX0LDBX80PR/aCk/BZ2PsCGBoajJCj+jzXiWIavBHc+D4bzRZKICmVJ72/otAwkKGWGHOMdGOXaNlzxxWu X-Forefront-PRVS: 0157DEB61B X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DM5PR03MB2474; 23:71HyVZdg0XdpguN3ElUTbzF/a9CY82+Rh4EB+?= =?Windows-1252?Q?XzdtN+QdvYkBwUs+QnPq2cCtJzniKlvpxTyPGm9mJjizx3Lxzoizn1UD?= =?Windows-1252?Q?5Ml15F0ozPNdx4uw/Mid1OrZ8fZhKDDG5pHbFtsaAq0bT5dzhCZ6G/ep?= =?Windows-1252?Q?JNkCKkZIDB/CGBY4h/Ljtrkpd16Sp8b09Lbja1tEcVjMlr0t1FskjCHA?= =?Windows-1252?Q?ewwWVZD44h2dOeAXNKVs+mWSF67E6k7stNj6uJ1clPa9e8JRA2WLTtQ6?= =?Windows-1252?Q?un15n2aY8qKJGxw+5yaVgDYmU+lPgQD2+7CxBKZvbqNu4dT6KEGPi51B?= =?Windows-1252?Q?O/s+OhowQ4FZIUgmYyzHwrqRPjNF2EWMhUndu4/ZU3IKhHSnVUQEB9Vc?= =?Windows-1252?Q?Rn11GG+WM+XLzogI1vO3lUJBGv6iQMD6cPDP7iJkhjqnhmGLZVR2KYMQ?= =?Windows-1252?Q?e3BFKn1gmroDzE67U0MbwL9sR2GV2pUbsEcDLXtk5P1Ohq/kpNj+qSdP?= =?Windows-1252?Q?OZ9/LOL5GlVB+twxrcIkBhpIbX1lHoqH4e7VE4AxVJRScQAK4d16jXvz?= =?Windows-1252?Q?SSBugmgYZ7Wf25FqwBCmr7VRXvr5Qp5gAvccOWwErwYwQL9bwSbZ896R?= =?Windows-1252?Q?22Azgo58VjkdhqflCg/7PPhLDRUX2FpFetY9OWf8ggeK0ggkpSdqJVlk?= =?Windows-1252?Q?DYK6TXq4r4Bd2lYdzu6AEg2wxxgcv3kP/FDF7JnVfl/lhi3Tn3mScuuv?= =?Windows-1252?Q?Ows/L4QTabCq4tL1ImSPar9I2ikwIitGTlw/F9Ibfl9ougocNXAPfGC2?= =?Windows-1252?Q?kNXSwD2bxBkueHn8MAh1k3isYvfZfN/2GMx/eCk5TZIIkM4gt9Py429S?= =?Windows-1252?Q?qbx4Hj/UlSeGkwLr6bv5SUU+baZ078ImMrJpVVPpCSYpYdWHdkcA06/5?= =?Windows-1252?Q?O+fGe6nCaC3YzQ8VBIt9cstusInGI2YfPt1rVBtSoBaVHxigZd+qJnqq?= =?Windows-1252?Q?VxUcjL8Sqrluz+NwcvUiWEqhsR3vLSZrZW2a9e7T6Tkzxivf06sTVb6B?= =?Windows-1252?Q?SwuK/Su/X0iwiOOpckQ51eK91e1eEQFfJxZ5Dj/BoP6VxJRK3/8Jn5KN?= =?Windows-1252?Q?lszz0Z5gSsGXfJCfPM5VnxC8+6mq4fCUC4WqYucrc+ikgcKnhYah9Q4m?= =?Windows-1252?Q?XRQ0adlV+o+/A9DQfDbw/G/m/Cxl81hCP8ROZ6I0fCmw6xUfLIvdNmKR?= =?Windows-1252?Q?1dglgvawvv4uX1mQlFBu17moFfew0hLgYAPJfUWRkVlht7lfPhS0KdlT?= =?Windows-1252?Q?hGiIoTAGP00eZuXe8zLZJaWZVkP/AJvACTDdT97+RNUOeoeUCz4VKzqi?= =?Windows-1252?Q?uKPgCb/y+EVMdtj/08IwlEAWWqC2XiKEyaB6KaW4E2NNXaz54x3YbdK9?= =?Windows-1252?Q?Z3B8x5xRb5HVnVEMhAxMznh2yPnWfgBrpkKZhOfRXWIe7rtlyGAUhqQq?= =?Windows-1252?Q?N+rxz9ezzcZH3mEArXpCtDCa4c3Sb5LDUBT/dS6JdJ5h0CQ7oC4JvoL3?= =?Windows-1252?Q?ONA3IyoKNAhbJrxNdQhLLc919E+mRJvCZU+up+cn+wa07VWoCxuJJKxc?= =?Windows-1252?Q?297Iyenp4yZWXwgidApjTdmgDqU7sDrBb3aDX22dX2909JAK6rMczovg?= =?Windows-1252?Q?o6bBE2+a5EwtqdDXUIaqDTnTQJ+kBY=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 6:plp//+2LUbwFw//HKtUR7XcZwZTB3Y1X35i0vElZjAE8J9skb+LKQ23GACq1r8j47idUcfQn2ZaEkxFFuFRLrIP5tTspLBMneAxTUNFN0PLTsw8KPGGwvExYrnBeyL/FelI43BJ3yhfrhOgckc+q+l9afV4CPG3RPfpv28mgwniIR9RubtSIDDpzV7w/DWHD/JWAJaA6ApuEx6VxwM5rqOtDnwOsoOMJ/RRWQ3qKRWsIxbfErrx0DcGXJ6RlSJpV0neHN6tsfkfpyKbWJ6p4jU4qLYjY8Z46BsjuRP2hUwnbzfHKsE3ORge5pzxQYQlvBMxk2fMwKZfV/cel6nz6phTIzsAKUbJfD4+5V58hdPmhB8ZpVTKbS9nQ+F/vrYJM8nLykcfqm2MOogG8iF7UDCtivxia3c/e7RPfPyd31VwYHyHSV04188UrvX1i0b87; 5:GpzFCQcYqbduGxfDSvNXut8C6EW2Y4/503RfL/IY+cCj0tVXEeJUeioAqnO1zye5bsbmrrnvSc5xO947KBNZLykN22PqCUYt+6yMuvuHI1/vyvYuPBB92Xp9yoCxvQrb+8wlI5+8ljGAdaiw0mStOPcr0HXve4pmb3bC5LajIWllmjxnsW0ouhYxoBapApCe; 24:8yP5I1ZVR5WDBFY4ROUWb1N0JcLJKanXkcmdEnl0QgO2y5eq6alUEo350RekxwL22u254jxkBcfFTkklR7Q9zmDNVzKGDGeFMHgzmSW/gLw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2474; 7:B1nVflJyhBrB9nq3C1vJurqGl9thnHT2HnQez1YH2zUonVAeY80sIH/ePGVPSWLIC9bFX0g6nxZl69LUDTs+0GLDmhqLnfoq2bumpTc5W2LerJLQ6d/j0dqA4bBLjdOiUGE3VUAJ80AZNizDMFgr1Vq5Zhp8pbtPlJopen7VKJkvwy/oE8CVvgAMPASToz5YnxakvMs5/iw3eBPY/42N4kK6cbs0aqnD3hYKKzUh/+rSbFfqf86Qss0pJF+s17JO8HjK2MXB1rQpQEw1sO0cxp5XU/n1zpykpNUnXR6+dFF6NNOlAu8tMyk1kZqy3GSgJI1Kkj+nBgyAt/qJtM3pEQmYIG6DFV7R+Y0hIYC8RN08t19LxoI0gIBt9/tPNOzduOfhPi9jS5WPbKDq6bnNEEKF2ExxJI0TGu/9b+XVkeeSDNPn6KuHIG+3kdxe8WrnQGagrSJmwEUtUCoToDp0RA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2016 07:02:06.0139 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2474 Subject: Re: [dpdk-dev] [PATCH 16/32] net/dpaa2: dpio add support to check SOC type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 07:02:08 -0000 On 12/15/2016 12:04 PM, Jerin Jacob wrote: > On Sun, Dec 04, 2016 at 11:47:11PM +0530, Hemant Agrawal wrote: >> Signed-off-by: Hemant Agrawal >> --- >> drivers/net/dpaa2/base/dpaa2_hw_dpio.c | 74 ++++++++++++++++++++++++++++++++++ >> 1 file changed, 74 insertions(+) >> >> diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpio.c b/drivers/net/dpaa2/base/dpaa2_hw_dpio.c >> index 9c6eb96..3b8f87d 100644 >> --- a/drivers/net/dpaa2/base/dpaa2_hw_dpio.c >> +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpio.c >> @@ -70,6 +70,18 @@ >> static struct dpio_device_list *dpio_dev_list; /*!< DPIO device list */ >> static uint32_t io_space_count; >> >> +#define ARM_CORTEX_A53 0xD03 >> +#define ARM_CORTEX_A57 0xD07 >> +#define ARM_CORTEX_A72 0xD08 > > May not be good idea to have generic ARM part number definition in driver > file. > >> + >> +static int dpaa2_soc_core = ARM_CORTEX_A72; >> + >> +#define NXP_LS2085 1 >> +#define NXP_LS2088 2 >> +#define NXP_LS1088 3 >> + >> +static int dpaa2_soc_family = NXP_LS2088; >> + >> /*Stashing Macros default for LS208x*/ >> static int dpaa2_core_cluster_base = 0x04; >> static int dpaa2_cluster_sz = 2; >> @@ -101,6 +113,58 @@ >> return dpaa2_core_cluster_base + x; >> } >> >> +static int cpuinfo_arm(FILE *file) >> +{ >> + char str[128], *pos; >> + int part = -1; >> + >> + #define ARM_CORTEX_A53_INFO "Cortex-A53" >> + #define ARM_CORTEX_A57_INFO "Cortex-A57" >> + #define ARM_CORTEX_A72_INFO "Cortex-A72" >> + >> + while (fgets(str, sizeof(str), file) != NULL) { >> + if (part >= 0) >> + break; >> + pos = strstr(str, "CPU part"); >> + if (pos != NULL) { >> + pos = strchr(pos, ':'); >> + if (pos != NULL) >> + sscanf(++pos, "%x", &part); >> + } >> + } >> + >> + dpaa2_soc_core = part; >> + if (part == ARM_CORTEX_A53) { >> + dpaa2_soc_family = NXP_LS1088; >> + printf("\n########## Detected NXP LS108x with %s\n", >> + ARM_CORTEX_A53_INFO); >> + } else if (part == ARM_CORTEX_A57) { >> + dpaa2_soc_family = NXP_LS2085; >> + printf("\n########## Detected NXP LS208x Rev1.0 with %s\n", >> + ARM_CORTEX_A57_INFO); >> + } else if (part == ARM_CORTEX_A72) { >> + dpaa2_soc_family = NXP_LS2088; >> + printf("\n########## Detected NXP LS208x with %s\n", >> + ARM_CORTEX_A72_INFO); >> + } >> + return 0; >> +} >> + >> +static void >> +check_cpu_part(void) >> +{ >> + FILE *stream; >> + >> + stream = fopen("/proc/cpuinfo", "r"); >> + if (!stream) { >> + PMD_INIT_LOG(WARNING, "Unable to open /proc/cpuinfo\n"); >> + return; >> + } >> + cpuinfo_arm(stream); >> + >> + fclose(stream); >> +} >> + >> static int >> configure_dpio_qbman_swp(struct dpaa2_dpio_dev *dpio_dev) >> { >> @@ -326,6 +390,16 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void) >> { >> struct dpaa2_dpio_dev *dpio_dev; >> struct vfio_region_info reg_info = { .argsz = sizeof(reg_info)}; >> + static int first_time; >> + >> + if (!first_time) { >> + check_cpu_part(); >> + if (dpaa2_soc_family == NXP_LS1088) { >> + dpaa2_core_cluster_base = 0x02; >> + dpaa2_cluster_sz = 4; > Can this device configuration information passed through dt/the means > where you are populating the fsl bus for dpio ? > > if not arm64 cpu part identification code can go in arm64 common > code. Even better if we have EAL API for same. Looks like x86 similar > attribute called "model" > This is good idea to have something equivalent in EAL. let me try to make an attempt on it.