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: <554A92C3.7060606@amd.com>
Date:	Wed, 6 May 2015 17:16:35 -0500
From:	Suravee Suthikulanit <suravee.suthikulpanit@....com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
CC:	<lenb@...nel.org>, <catalin.marinas@....com>,
	<will.deacon@....com>, <thomas.lendacky@....com>,
	<herbert@...dor.apana.org.au>, <davem@...emloft.net>,
	<msalter@...hat.com>, <hanjun.guo@...aro.org>,
	<al.stone@...aro.org>, <grant.likely@...aro.org>, <arnd@...db.de>,
	<leo.duran@....com>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linaro-acpi@...ts.linaro.org>, <netdev@...r.kernel.org>,
	<linux-crypto@...r.kernel.org>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [V2 PATCH 1/5] ACPI / scan: Parse _CCA and setup device coherency

On 5/6/2015 5:21 PM, Rafael J. Wysocki wrote:
>>>> > >>+	bool
>>>> > >>+
>>>> > >>+config ACPI_SUPPORT_CCA_ZERO
>>> > >
>>> > >I guess this means "we support devices that can DMA, but are not coherent".
>>> > >right?
>> >
>> >Yes, basically when _CCA=0.
> So what about
>
> 	ARCH_SUPPORT_CACHE_INCOHERENT_DMA

Since this is specific to ACPI _CCA, I just want to be clear with the 
naming.

> or something similar?
>
>>>> > >>+	bool
>>>> > >>+
>>>> > >>   config ACPI_SLEEP
>>>> > >>   	bool
>>>> > >>   	depends on SUSPEND || HIBERNATION
>>>> > >>diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
>>>> > >>index 4bf7559..a6feca4 100644
>>>> > >>--- a/drivers/acpi/acpi_platform.c
>>>> > >>+++ b/drivers/acpi/acpi_platform.c
>>>> > >>@@ -108,9 +108,11 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
>>>> > >>   	if (IS_ERR(pdev))
>>>> > >>   		dev_err(&adev->dev, "platform device creation failed: %ld\n",
>>>> > >>   			PTR_ERR(pdev));
>>>> > >>-	else
>>>> > >>+	else {
>>> > >
>>> > >Please add braces to both branches when making such changes (as per CodingStyle).
>>> > >
>> >
>> >OK.
>> >
>>>> > >>+		acpi_setup_device_dma(adev, &pdev->dev);
>>> > >
>>> > >Why do we need to do that here (for the second time)?
>> >
>> >Because we are calling:
>> >    acpi_create_platform_device()
>> >      |--> platform_device_register_device_full()
>> >        |-->platform_device_alloc()
>> >
>> >This creates platform_device, which allocate a new platform_device->dev.
>> >This is not the same as the original acpi_device->dev that was created
>> >during acpi_add_single_object(). So, we have to set up the device
>> >coherency again.
> Ah, so the second arg is different now.
>
> Well, in that case, why do we need to set it up for the adev's dev member?
>

Just for sanity, since I don't know if adev->dev will be referenced 
anywhere else. This way, it's consistent for all copied of struct device 
generated.

Lemme know if you think that is unnecessary.

Thanks,

Suravee


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