From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752827AbbCWR0l (ORCPT ); Mon, 23 Mar 2015 13:26:41 -0400 Received: from mail-db3on0069.outbound.protection.outlook.com ([157.55.234.69]:35456 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752230AbbCWR0h (ORCPT ); Mon, 23 Mar 2015 13:26:37 -0400 Message-ID: <55104CBE.90603@ezchip.com> Date: Mon, 23 Mar 2015 13:26:22 -0400 From: Chris Metcalf User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Richard Cochran CC: , , Amir Vadai , Ariel Elior , Arnd Bergmann , Baolin Wang , Ben Hutchings , Bruce Allan , Carolyn Wyborny , David Miller , Frank Li , Giuseppe Cavallaro , Jeff Kirsher , John Stultz , Luwei Zhou , Matthew Vick , Michael Chan , Prashant Sreedharan , Shradha Shah , Solarflare linux maintainers , Sonic Zhang , =?windows-1252?Q?Stefan_S=F8rensen?= , Thomas Gleixner , Tom Lendacky Subject: Re: [PATCH net-next V2 19/23] ptp: tilegx: convert to the 64 bit get/set time methods. References: <8bc233b19d08308c01015936841d9be8d4441ece.1426973658.git.richardcochran@gmail.com> <551038FB.2070200@ezchip.com> <20150323165839.GA4330@localhost.localdomain> In-Reply-To: <20150323165839.GA4330@localhost.localdomain> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: DM2PR00CA0024.namprd00.prod.outlook.com (25.160.243.34) To DB3PR02MB0537.eurprd02.prod.outlook.com (25.160.51.149) Authentication-Results: amd.com; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB0537; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10009020)(6049001)(6009001)(51704005)(479174004)(24454002)(377454003)(33656002)(42186005)(110136001)(1411001)(50466002)(23746002)(66066001)(36756003)(47776003)(87976001)(83506001)(19580395003)(77156002)(122386002)(62966003)(54356999)(65816999)(40100003)(76176999)(50986999)(93886004)(2950100001)(92566002)(15975445007)(86362001)(77096005)(46102003)(7059030)(21314002)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR02MB0537;H:[10.7.0.41];FPR:;SPF:None;MLV:sfv;LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:DB3PR02MB0537;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB0537; X-Forefront-PRVS: 05245CA661 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2015 17:26:30.5487 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR02MB0537 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23/2015 12:58 PM, Richard Cochran wrote: > On Mon, Mar 23, 2015 at 12:02:03PM -0400, Chris Metcalf wrote: >> >This driver is 64-bit only. Would it make more sense to just change >> >the accessors from gettime/settime to gettime/settime64 and nothing >> >else, i.e. rely on the current behavior that timespec and timespec64 >> >are the same type, and trust the compiler to fail it if somehow someone >> >tried to build this driver into a 32-bit kernel? > On the one hand, I think the best way would be for > gxio_mpipe_get/set_timestamp to also take a timespec64, because it > makes the width clear. With a plain old timespec, you have to > remember whether you are 64 bit or not. However, but I couldn't tell > if changing gxio_mpipe_get/set_timestamp would work for other callers > or not. If you're suggesting changing the gxio_mpipe_xxx_timespec routines to take a timespec64, that sounds reasonable to me, particularly in conjunction with your new gettime64 etc API. As far as I know, the tilegx driver is the only client of those gxio routines. > If the driver is 64 bit only, shouldn't that be reflected in the > Kconfig? Well, the tilegx driver is only supported for the tilegx architecture, which is only 64-bit for kernel-space. It may be a bit confusing because the actual driver is tile_net, which has separate implementations for tilegx (64-bit) and tilepro (32-bit). It's not immediately clear how to make that more obvious. > On the other hand, I wouldn't mind the change you suggest, if it were > super obvious that the code is 64 bit only. It was not obvious to me. I guess that brings us back to changing the gxio_xxx APIs. -- Chris Metcalf, EZChip Semiconductor http://www.ezchip.com