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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Mar 2015 17:17:35 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Hanjun Guo <hanjun.guo@...aro.org>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Will Deacon <will.deacon@....com>,
	Olof Johansson <olof@...om.net>,
	Grant Likely <grant.likely@...aro.org>,
	Mark Rutland <mark.rutland@....com>,
	Ashwin Chaugule <ashwinc@...eaurora.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
	Robert Richter <rric@...nel.org>,
	Arnd Bergmann <arnd@...db.de>,
	Graeme Gregory <graeme.gregory@...aro.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>, linux-kernel@...r.kernel.org,
	Tomasz Nowicki <tomasz.nowicki@...aro.org>,
	linux-acpi@...r.kernel.org, Mark Brown <broonie@...nel.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	Sudeep Holla <Sudeep.Holla@....com>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [patch v11 12/23] ARM64 / ACPI: Parse MADT for SMP initialization

On Tue, Mar 24, 2015 at 10:02:45PM +0800, Hanjun Guo wrote:
> +/**
> + * acpi_map_gic_cpu_interface - generates a logical cpu number
> + * and map to MPIDR represented by GICC structure
> + * @mpidr: CPU's hardware id to register, MPIDR represented in MADT
> + * @enabled: this cpu is enabled or not
> + *
> + * Returns the logical cpu number which maps to MPIDR
> + */
> +static int __init acpi_map_gic_cpu_interface(u64 mpidr, u8 enabled)

So here we have an u8 enabled.

> +static int __init
> +acpi_parse_gic_cpu_interface(struct acpi_subtable_header *header,
> +				const unsigned long end)
> +{
> +	struct acpi_madt_generic_interrupt *processor;
> +
> +	processor = (struct acpi_madt_generic_interrupt *)header;
> +
> +	if (BAD_MADT_ENTRY(processor, end))
> +		return -EINVAL;
> +
> +	acpi_table_print_madt_entry(header);
> +
> +	acpi_map_gic_cpu_interface(processor->arm_mpidr & MPIDR_HWID_BITMASK,
> +		processor->flags & ACPI_MADT_ENABLED);

and here processor->flags is u32. Luckily, ACPI_MADT_ENABLED is 1 and we
don't lose any information. So either make the enabled above a bool or
simply pass the flags with the check in acpi_map_gic_cpu_interface()
(personal preference for the latter).

Apart from this:

Reviewed-by: Catalin Marinas <catalin.marinas@....com>

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