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
| ||
|
Date: Thu, 22 Jan 2015 11:40:49 +0200 From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com> To: "Li, Aubrey" <aubrey.li@...ux.intel.com> Cc: x86@...nel.org, "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>, "Kumar P, Mahesh" <mahesh.kumar.p@...el.com>, linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org Subject: Re: [PATCH v2 2/4] x86: pmc_atom: print index of device in loop On Thu, 2015-01-22 at 11:45 +0800, Li, Aubrey wrote: > On 2015/1/21 5:50, Andy Shevchenko wrote: > > The register mapping may change from one platform to another. Thus, indices > > might be not the same on different platforms. The patch makes the code to print > > the device index dynamically at run time. > > Will another platform use the same table but different bit position? In > my opinion, different platform should use different mapping table. Yes, indeed. The only improvement I could suggest now is to use indices for bit field name from one array of possible names. Or use macro to fill the item like #define BIT_X(bitname) { .name = __stringify(bitname), .bit_mask = BIT_ ## bitname, } > > > > The patch also changes the for loop to iterate over the map until a terminator > > is found. > > Why do we need to do this? did you see any hurt from the existing > implementation? Just a micro optimization plus it allows in consequent patches to avoid size members in the pmc_reg_map. -- Andy Shevchenko <andriy.shevchenko@...el.com> Intel Finland Oy -- 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