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]
Message-ID: <555C7563.6080409@amd.com>
Date:	Wed, 20 May 2015 06:52:03 -0500
From:	Suravee Suthikulanit <suravee.suthikulpanit@....com>
To:	Catalin Marinas <catalin.marinas@....com>
CC:	<rjw@...ysocki.net>, <lenb@...nel.org>, <will.deacon@....com>,
	<bhelgaas@...gle.com>, <thomas.lendacky@....com>,
	<herbert@...dor.apana.org.au>, <davem@...emloft.net>,
	<arnd@...db.de>, <al.stone@...aro.org>,
	<linaro-acpi@...ts.linaro.org>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-acpi@...r.kernel.org>,
	<leo.duran@....com>, <hanjun.guo@...aro.org>, <msalter@...hat.com>,
	<grant.likely@...aro.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-crypto@...r.kernel.org>
Subject: Re: [V4 PATCH 1/6] ACPI / scan: Parse _CCA and setup device coherency

On 5/20/2015 5:01 AM, Catalin Marinas wrote:
> On Fri, May 15, 2015 at 04:23:09PM -0500, Suravee Suthikulpanit wrote:
>> +static inline bool acpi_dma_is_supported(struct acpi_device *adev)
>> +{
>> +	/**
>> +	 * Currently, we mainly support _CCA=1 (i.e. is_coherent=1)
>> +	 * This should be equivalent to specifyig dma-coherent for
>> +	 * a device in OF.
>> +	 *
>> +	 * For the case when _CCA=0 (i.e. is_coherent=0 && cca_seen=1),
>> +	 * There are two approaches:
>> +	 * 1. Do not support and disable DMA.
>> +	 * 2. Support but rely on arch-specific cache maintenance for
>> +	 * non-coherence DMA operations. ARM64 is one example.
>> +	 *
>> +	 * For the case when _CCA is missing (i.e. cca_seen=0) but
>> +	 * platform specifies ACPI_CCA_REQUIRED, we do not support DMA,
>> +	 * and fallback to arch-specific default handling.
>> +	 *
>> +	 * See acpi_init_coherency() for more info.
>> +	 */
>> +	return adev && (adev->flags.is_coherent ||
>> +			(adev->flags.cca_seen && IS_ENABLED(CONFIG_ARM64)));
>> +}
>
> I don't particularly like the check for CONFIG_ARM64 here but I
> understand why it was added (I had the wrong impression that x86 can
> cope with _CCA = 0).
>
> Alternatively, we could leave it out (together with cca_seen) until
> someone comes forward with a real use-case for _CCA = 0 on arm64. One
> platform I'm aware of is Juno but even though it boot with ACPI, I
> wouldn't call it a server platform.

Ok. That seems to be what Arnd would prefer as well.  Let's just leave 
the support for _CCA=0 out until it is needed then.

Thanks,
Suravee




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ