From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752394AbdBAVzr (ORCPT ); Wed, 1 Feb 2017 16:55:47 -0500 Received: from mail-co1nam03on0047.outbound.protection.outlook.com ([104.47.40.47]:58656 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750897AbdBAVzq (ORCPT ); Wed, 1 Feb 2017 16:55:46 -0500 From: "Ghannam, Yazen" To: Borislav Petkov CC: x86-ml , Yves Dionne , Brice Goglin , Peter Zijlstra , lkml Subject: RE: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Thread-Topic: [RFC PATCH] x86/CPU/AMD: Bring back Compute Unit ID Thread-Index: AQHSfMYxvrnaS0VdfkWSUoCNViP3AKFUpQKAgAAKIoCAAAHzQA== Date: Wed, 1 Feb 2017 21:55:44 +0000 Message-ID: References: <20170201200237.36s2jwjgxi24we66@pd.tnic> <20170201214421.ppw2ww3faxxu2jrm@pd.tnic> In-Reply-To: <20170201214421.ppw2ww3faxxu2jrm@pd.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yazen.Ghannam@amd.com; x-originating-ip: [73.35.89.163] x-ms-office365-filtering-correlation-id: 9232094d-1e4e-4dd4-d13b-08d44aed1283 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:CY4PR12MB1639; x-microsoft-exchange-diagnostics: 1;CY4PR12MB1639;7:N/OkEzYYD1DZvLyodUK76jlfuNrEKOicoqdwvfb5Icmk8QO53WF1Zzcp9qciiZFtE9IuD2Tdet9FarcUBikQupduCeanZgPKH/SyfEswlyNo9MQ7tgrroPVCDnfjVqjk/Rb0+D/5tRuLsIzv1/W+9vV6HGNyXz6OLtiJe9oJZyCAD9FWgTOTVzXFh12ttx+x+dYYgUNOkV1rDbmqD4yxT7FQBEY3FDje8ZcZmZn++8IeQthRlWwLHV14ofEe6IdE4Bg+BkqKZMlLEkX7Eayn2was+9NiZ7Teu/JPHTzkF1YTHR1PPKa6ziP9Etooc27iubkGtJCftPSkW1w4ih9gdVR/Xyc4JMWZTWFea52TVeOCcNGCl9h59g7WjDB3KbsQ5d5oo9+L7WOCJ85Ulcw160FVoYCUtWEQlLFO8AgQd0MoEgW5tqw5XR3M2pCBdewLf7vSpRNVORqw8yC+BMBlLuwQnpM4pEDkuzm7q/2FCo6lhlVfQS3CnEj+qizuMRKNoWd5Y1CtSeMARmINPx5brl7JxOVlr7fXOCic/hAKGBuk3Nkoo5bEfmWYe+foH1AC;20:Eritkh+X3iV2XxCBFSh4rSq0EZBPjG/n2RhtdhzBg0knPxlPjyV0KwN0iqzXIsv5wWSYM4Jm7pnfsuH5XYuaUr5/F/iIj1nz8jF1tkZcKFxaQPvn6MlXhBihooUsTFHA0bu8ZXVnR5N43oCokinOdC9HWmkm72w2ZyKB1tYq5IOYDgks8AMJBMpG5UMDKihwOB33B4yuZbveHfWMlkV0LjPoIFGpnJPIDc1z0fVEuc7bd86kyzqwKQTVEbwralkS x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558025)(6072148);SRVR:CY4PR12MB1639;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1639; x-forefront-prvs: 0205EDCD76 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39410400002)(39840400002)(39860400002)(39450400003)(39850400002)(13464003)(189002)(377454003)(199003)(76176999)(38730400001)(50986999)(25786008)(3660700001)(68736007)(5660300001)(54356999)(77096006)(122556002)(229853002)(33656002)(53936002)(39060400001)(9686003)(74316002)(97736004)(92566002)(106356001)(54906002)(55016002)(106116001)(6436002)(101416001)(105586002)(99286003)(6506006)(6116002)(2900100001)(81166006)(4326007)(102836003)(2906002)(3846002)(81156014)(3280700002)(110136003)(305945005)(66066001)(8936002)(2950100002)(86362001)(7736002)(189998001)(6916009)(7696004)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1639;H:CY4PR12MB1640.namprd12.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2017 21:55:44.3322 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1639 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v11Ltvbv007583 > -----Original Message----- > From: Borislav Petkov [mailto:bp@alien8.de] > Sent: Wednesday, February 1, 2017 4:44 PM > > > To get around this we can set cu_id for all TOPOEXT systems, and update > > cpu_core_id, etc. for SMT enabled systems. This way we can just change > > cpu_core_id to cu_id in match_smt(). > > Ok, so we want to init ->cu_id to something invalid then. -1, for > example and then do: > > if (c->cu_id != -1 && o->cu_id != -1 && (c->cu_id == o->cu_id)) > ... > > Alternatively, we can define an X86_FEATURE_COMPUTE_UNITS or so > synthetic bit which we can check. > > One thing I don't want to do is reuse ->cu_id on systems which don't > have CUs. > Okay, in that case I would prefer to define a synthetic bit. I think it'll be a lot more clear. Thanks, Yazen