lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <5308760.2G5KJFF9Pi@wuerfel> Date: Wed, 07 Oct 2015 21:12:55 +0200 From: Arnd Bergmann <arnd@...db.de> To: Viresh Kumar <viresh.kumar@...aro.org> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Michael Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...eaurora.org>, "Rafael J. Wysocki" <rjw@...ysocki.net>, Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>, Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>, Nishanth Menon <nm@...com>, Dmitry Torokhov <dtor@...omium.org>, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org Subject: Re: [PATCH] PM / OPP: fix debugfs files for 64-bit On Wednesday 07 October 2015 18:33:24 Viresh Kumar wrote: > Cc'ing Mike and Stephen.. > > On 07-10-15, 13:57, Greg Kroah-Hartman wrote: > > On Wed, Oct 07, 2015 at 04:51:49PM +0530, Viresh Kumar wrote: > > > On 07-10-15, 12:07, Greg Kroah-Hartman wrote: > > > > Why would you be wanting to create a "unsigned long" as an api anyway? > > > > Just force it to be u64 all the time, can't you do that? > > > > > > Okay, so the variable in question (lets say frequency) is an 'unsigned > > > long' and that's how all the APIs of clock framework expect/define > > > it. > > > > > > And you are probably saying that we do this: > > > > > > unsigned long freq; > > > > > > debugfs_create_u64((u64 *)&freq); > > > > > > Right? Or are you asking to update clock APIs to be converted to u64? > > > > Yes, they should be u64 as I doubt you want to debug problems that you > > have in the driver where it works on a 64bit system but doesn't on a > > 32bit one. > > Firstly changing the clock API (and other similar APIs) to make > frequency u64 instead of 'unsigned long', looks like a giant effort. > There are too many users of those API, etc.. > > Over that, it might be good performance wise to use u32 for 32 bit > systems and u64 for 64 bit one, to represent clock frequency and maybe > that's why we chose unsigned long there. I think it clearly makes sense to have a fixed length for each of these members: either 32 bit is enough to represent all possible values, then there is no need to make them 'long' on 64-bit architectures, or 32 bit is not enough and then the code is broken on 32-bit architectures today and should be fixed. In my patch, I assumed that if 32-bit architectures work fine today, then we don't need more range on 64-bit architectures either. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists