Re: [PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-28 Thread Anshuman Khandual
On 05/27/2020 05:55 PM, Will Deacon wrote: > On Wed, 27 May 2020 15:34:36 +0530, Anshuman Khandual wrote: >> There is no way to proceed when requested register could not be searched in >> arm64_ftr_reg[]. Requesting for a non present register would be an error as >> well. Hence lets just

Re: [PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-27 Thread Will Deacon
On Wed, 27 May 2020 15:34:36 +0530, Anshuman Khandual wrote: > There is no way to proceed when requested register could not be searched in > arm64_ftr_reg[]. Requesting for a non present register would be an error as > well. Hence lets just WARN_ON() when search fails in get_arm64_ftr_reg() >

Re: [PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-27 Thread Catalin Marinas
On Wed, May 27, 2020 at 03:34:36PM +0530, Anshuman Khandual wrote: > +/* > + * get_arm64_ftr_reg - Looks up a feature register entry using > + * its sys_reg() encoding. This calls get_arm64_ftr_reg_nowarn(). > + * > + * returns - Upon success, matching ftr_reg entry for id. > + * - NULL

[PATCH V3] arm64/cpufeature: Add get_arm64_ftr_reg_nowarn()

2020-05-27 Thread Anshuman Khandual
There is no way to proceed when requested register could not be searched in arm64_ftr_reg[]. Requesting for a non present register would be an error as well. Hence lets just WARN_ON() when search fails in get_arm64_ftr_reg() rather than checking for return value and doing a BUG_ON() instead in