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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 31 Mar 2015 09:49:42 +0800
From:	Hanjun Guo <guohanjun@...wei.com>
To:	Catalin Marinas <catalin.marinas@....com>,
	Hanjun Guo <hanjun.guo@...aro.org>
CC:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Mark Rutland <mark.rutland@....com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	"Robert Richter" <rric@...nel.org>, Arnd Bergmann <arnd@...db.de>,
	Ashwin Chaugule <ashwinc@...eaurora.org>,
	<linaro-acpi@...ts.linaro.org>,
	Marc Zyngier <marc.zyngier@....com>,
	Jon Masters <jcm@...hat.com>,
	Timur Tabi <timur@...eaurora.org>,
	Mark Salter <msalter@...hat.com>,
	Will Deacon <will.deacon@....com>,
	<linux-kernel@...r.kernel.org>,
	Sudeep Holla <Sudeep.Holla@....com>,
	Olof Johansson <olof@...om.net>,
	Mark Brown <broonie@...nel.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	Grant Likely <grant.likely@...aro.org>,
	Graeme Gregory <graeme.gregory@...aro.org>,
	<linux-acpi@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [patch v11 13/23] ACPI / processor: Introduce phys_cpuid_t for
 CPU hardware ID

On 2015/3/30 21:58, Catalin Marinas wrote:
> On Fri, Mar 27, 2015 at 09:40:26PM +0800, Hanjun Guo wrote:
>> On 2015年03月26日 11:49, Hanjun Guo wrote:
>>> On 2015/3/26 1:21, Catalin Marinas wrote:
>>>> On Tue, Mar 24, 2015 at 10:02:46PM +0800, Hanjun Guo wrote:
>>>>> --- a/drivers/acpi/acpi_processor.c
>>>>> +++ b/drivers/acpi/acpi_processor.c
>>>>> @@ -170,7 +170,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
>>>>>  	acpi_status status;
>>>>>  	int ret;
>>>>>
>>>>> -	if (pr->phys_id == -1)
>>>>> +	if (pr->phys_id == PHYS_CPUID_INVALID)
>>>>>  		return -ENODEV;
>>>> If PHYS_CPUID_INVALID is the same as INVALID_HWID, we should get rid of
>>>> the latter in the arm64 code (as a subsequent clean-up patch).
>>> OK, I'm preparing a patch set to introduce invalid_phys_cpuid() and invalid_logical_cpuid()
>>> to remove the direct comparison of PHYS_CPUID_INVALID and -1 in ACPI processor drivers,
>>> which is suggested by Rafael, I will cleanup PHYS_CPUID_INVALID in this patch set.
>> I met difficulty to do so, because we use
>>
>> +#ifndef PHYS_CPUID_INVALID
>> +typedef u32 phys_cpuid_t;
>> +#define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)
>> +#endif
>>
>> in the common head file linux/acpi.h, we need macro
>> PHYS_CPUID_INVALID to identify if phys_cpuid_t is typedefed
>> for different arch, so if we want remove PHYS_CPUID_INVALID
>> for ARM64, we need to got back to typedef phys_cpuid_t for
>> each arch using ACPI. which means that
> What I meant was removing INVALID_HWID from arm64 and always use the
> PHYS_CPUID_INVALID but I think we should leave them as they are for now
> since PHYS_CPUID_INVALID is defined in the asm/acpi.h file.

OK, thanks for the clarify.

Hanjun

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ