Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752908AbbFPDoj (ORCPT ); Mon, 15 Jun 2015 23:44:39 -0400 Received: from mail-bn1bbn0109.outbound.protection.outlook.com ([157.56.111.109]:1848 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750996AbbFPDob (ORCPT ); Mon, 15 Jun 2015 23:44:31 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NQ0QDY-08-FVK-02 X-M-MSG: Message-ID: <557F9BDF.9090201@amd.com> Date: Mon, 15 Jun 2015 22:45:35 -0500 From: Suravee Suthikulpanit User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Rafael J. Wysocki" CC: , , , , , , , , , , , , , , , , , , , , , Subject: Re: [V6 PATCH 0/7] ACPI: Introduce support for _CCA object References: <1433952538-22455-1-git-send-email-Suravee.Suthikulpanit@amd.com> <29279491.10zZbufEv8@vostro.rjw.lan> In-Reply-To: <29279491.10zZbufEv8@vostro.rjw.lan> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD031;1:31blUWKxYm5NOavsDHB+mj5xGhNC+MEYQxjFd2NrPNYG0zP2fq68GeFVNJkmd83E7Yd8L0n/9MUt3pyWJgo1w3gYEmtPhd1p4oqz48tS0Yo1ObNcr6HzcWfmQoJNShR8Aho/erwZeFBkRAUVrm/DqpPycig3V4l2yCQYRbzQJC5kIXXSvNgHSRflHBpkYzzf5shqBGPbuUXQdyEtBLBfBtEAim2M9nMSibGtOHXcGkRjbhLLHG0Jx6Ua3AcX8BRK7MY++6kP62yXURINoUdRwYjR3cpQ2kb1jIFIbXL+ED0WhmTE50lf3ZGPkDX1qBStU+aF5tK0J7ZSGltW7YosGG671bWdWz/pRtPLHgkszj4= X-Forefront-Antispam-Report: CIP:165.204.84.222;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(428002)(24454002)(199003)(377454003)(189002)(243025005)(51704005)(479174004)(65816999)(76176999)(54356999)(87266999)(47776003)(50986999)(106466001)(23676002)(36756003)(87936001)(189998001)(2950100001)(15975445007)(50466002)(77096005)(110136002)(4001350100001)(101416001)(65806001)(65956001)(46102003)(19580395003)(64126003)(80316001)(92566002)(59896002)(83506001)(105586002)(77156002)(33656002)(62966003)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR02MB078;H:atltwp02.amd.com;FPR:;SPF:None;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB078;2:9tZCPfn61QohGFykxm/XTH68l5nV/tdCv0fikTMSWQMfpmhkji2m9+qfGu35n3nr;2:sbpKwvY/4RT2aJqrvaOsuYHNE4Cnf95ZCxtfSTmjpogi+QGKQOF5s7RBcACxh7gvbnVaH83Ucp8V2ThzwHDyXO8mM1AZW/pYJVyYOKZ1p8bKd6SquSvr4a6RA84G8mgy3hjRkVNUEXZ+NdqDt0i03XWnfusdWBsZ7LK7QUSDZmhuc4bZucCDrWYClsu7caV2PG28vize2wPDooiGNcWu74Sdgkdz8cNHZAEFgbBroD+m92AGU0H08YVf6UNmq31x;6:TSYjY8Q1Ss4CiS80/JNNTr2m4QJM5nKLP0HlONo7Ia7wIO8FWkee4SuhObZl/bAhkOFCUhyh81TxFbbHNcU27cd9CR6DJq9ED21jfuwp2IjzZ/YyovWTeVzU3ShoNFutANZqoFv1ZC5f2zu+5jvplT2ozAq84sfJo2j696grK+mlMzwx1O8dEmLNKHWsITy08TaBawE2e1mz9H+LU51r8uYIGoYCrox5J1vJBg+ax1C4P1z/iN9wxbIGaRwOK1Jf9JnBFKC1CwmRKtOIzWSNGg7ow1W8lg7E+CVVWCzHW9QbTJqI5fUski4qlg1mKC5BQNdaWgS47gwVabPVgSk2pMitMuyHJg2oy71U5IS8e0mU/lAF7nTSz1L1juMTH+CHOFBKR0uWtZiMEIZ/LK0EvlYaTB/f2R2IYx0CwIFuRBb+/BYd3JRfzmAjtnh3Dt4n1tYRNf/PN9FtjKxpL8Vkje6woUh23OODGAfLXZnpyae4POFZl0ERyOLQSQv8s3Ex X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB078; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(520003)(3002001);SRVR:CO1PR02MB078;BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB078; X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB078;3:zChX1An3XhQ0cEi3OlWwOVhal6X0ipDITKRw+PxRtRn4tulqQIjRR5+72sCreVk4qIsHCqp6OyInnHYRkij5QbCx7m4wvucyZswtJcKp3RrGzh4dNUkZC+eCCJC1m2Q2FIfHf03Wo1zxQfgxWLVV/SZMZcUXrv7l/iR26BOI2Lz9t9oNiggYYzIiYj5qYhHK9aSbPDSsPqbYdf6yd1ntSKw2LZYiGIVfyUR6o3jpbamT7U+JVbTJeaU5/ta3kbvAOxWVGjEfNJkx0uWGfVRLBI7J2k4MiCCQCf0wBKIrU+5MZ6a0mLICM8aJlDZhCHwE X-Forefront-PRVS: 06098A2863 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDTzFQUjAyTUIwNzg7OTpmOSt2dEtwcHBqdldCSG9tV2p3SS9kcmFoOWxk?= =?utf-8?B?QUhYbWwxWVE2MkQ4Y0NHd2JhN1dTRXk5QzFnRitFNzlDa001Tnltcjlha2Ro?= =?utf-8?B?VFpNVDZlaCtreTJCcUVtaDUyWUhBSUJNU0t2eHdRQkptS3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4emVXbmNuMnBSY0VxVklVOGhVdmJteEJBalFrL2pUeENV?= =?utf-8?B?dEVzSlhVYy8vT3JEY2pPSHE0cFUrUll3SE9nWW9YR0lFZWNYMzNkY0JYUUlp?= =?utf-8?B?WEtxWFF0VDNPUmpPK1d6YnIxbzcvaVFrWEdRLy9Ydk9EWUhmRzZHRWRhMllS?= =?utf-8?B?NFJqdEZFSzdRSlFNWGJ1YUR5NHRRMFZ1TzRZQVpkMW96UjRndGpBK29vUFNt?= =?utf-8?B?KzVuNTh2bzJZUUtWY1gzZnk2UDk4N2FmS3BpZmhWelBTd1lKZTdLSHcxWXhX?= =?utf-8?B?MllmZHlVOU1lS0xEMjhkbjdlWWFqc1lkb2tMRXZLc1NwQmpRdy96Y3c1NnZC?= =?utf-8?B?MUJyRGp6SlZLS0NRd2RvYVR2YVNqYmVZZHZLaVZFWGFyVDhwbHBjUE92OTF2?= =?utf-8?Q?adUnF0Wvv4vW5O9FnO9KP9sRI?= X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB078;3:Cu/kPyZ3kBoPGbxjlLnvKSsxVwgFeYzvQpTxZeL98+d/V6uIRQt8WxLokh7P+JQrQ4XrMyLoV0z9DcjDU0iPbIX3rQXnCos04R7fk55jq6YJykPTIBmV2dnVPA7uBe0ZrwXQsDOWOGDzL3OxHBoD3g==;10:p8+tKOhnd+HsslJxIFOqhGEoGsCXRSXixpKdAJnry6IIonPYsaWbG3PwzWKr4hCuIfsqfwJZgywJvcIsE+lEnv/0auJNL4dLitPwyUgNPHw=;6:LFmstXWPXZejKhHwXwVo5HizrPbR16ekrr/CoQteUGyN/UBRAMFmSI6C3Ch4Epl4 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2015 03:44:25.2674 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.222];Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR02MB078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6068 Lines: 125 Thank you. Suravee On 6/15/15 18:24, Rafael J. Wysocki wrote: > On Wednesday, June 10, 2015 11:08:51 AM Suravee Suthikulpanit wrote: >> This patch series introduce support for _CCA object, which is currently >> used mainly by ARM64 platform to specify DMA coherency attribute for >> devices when booting with ACPI. >> >> A copy of ACPIv6 can be found here: >> http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf >> >> This patch also introduces a new APIS: >> 1. acpi_check_dma() as part of ACPI API. >> 2. device_dma_is_coherent() as part of unified device property API. >> >> This simplifies the logic in device drivers to determine device coherency >> attribute regardless of booting with DT vs ACPI. >> >> This has been tested on AMD-Seattle platform, which implements _CCA >> object as described in the AMD Opteron A1100 Series Processor ACPI Porting Guide: >> >> http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Seattle_ACPI_Guide.pdf >> >> Changes from V5 (https://lkml.org/lkml/2015/5/20/1033): >> * Fix build error in the megaraid and ufs driver >> (reported by Mark Salter) >> >> Changes from V4 (https://lkml.org/lkml/2015/5/15/669): >> * Patch1: >> - Move the arch_setup_dma_ops() call from acpi_create_platform_device() >> to acpi_bind_one() to support other bus types (per Rafael). >> - Rename acpi_device_flags.is_coherent to acpi_device_flags.coherent_dma. >> (per Rafael) >> - Refactor acpi_dma_is_supported() and acpi_dma_is_coherent() to >> acpi_check_dma() to simplify the new interface. >> - Only support _CCA=1 for now. See acpi_check_dma() (per Arnd and Catalin) >> * Patch2: >> - Add acked-by Catalin. >> * Patch3: >> - Use ACPI_COMPANION() instead of acpi_node(). >> - Remove has_acpi_companion() check since already done by acpi_node(). >> (per Will) >> * Remove the patch "Generic function for setting up PCI device DMA coherency" >> introduced in V4. (per Bjorn) >> >> Changes from V3 (https://lkml.org/lkml/2015/5/7/1004): >> * Remove ARCH64_SUPPORT_ACPI_CCA_ZERO and just use CONFIG_ARM64. >> (per Catalin and Rafael) >> * Do not need to call arch_setup_dma_ops() for acpi_device->dev. >> (per Rafael) >> * [3/6] (New) We also need to call arch_setup_dma_ops() for pci >> devices and check the CCA of the host bridge. Similar logic >> exists for OF. So, I refactor of_pci_dma_configure() to >> the more generic version pci_dma_configure(), and add support >> for ACPI. >> >> Changes from V2 (https://lkml.org/lkml/2015/5/5/510): >> * Reword ACPI_MUST_HAVE_CCA to ACPI_CCA_REQUIRED (per Rafael) >> * Reword ACPI_SUPPORT_CCA_ZERO to ARCH64_SUPPORT_ACPI_CCA_ZERO >> (per Rafael and Arnd) >> * Misc code styling clean up (per Rafael) >> * Only print missing _CCA warning message in debug mode. >> * Refactor logic in acpi_setup_device_dma() into >> if acpi_dma_is_supported() then call arch_setup_dma_ops(). >> * Do not allocate device dma_mask if !acpi_dma_is_supported() >> (per Arnd). >> * Re-use the dummy functions with the same signature. >> >> Changes from V1 (https://lkml.org/lkml/2015/4/29/290): >> * Remove supports for 32-bit ARM since doesn't currently >> supporting ACPI (Per Catalin suggestions.) >> * Do not call arch_setup_dma_ops() and when _CCA is missing. >> (per Arnd suggestion) >> * Add CONFIG_ACPI_SUPPORT_CCA_ZERO kernel config flag to >> allow architectures to specify the behavior when _CCA=0. >> * Add dummy_dma_ops for ARM64 (per Catalin suggestions). >> * Fixed build error when ACPI is not configured by defining >> acpi_dma_is_coherent() for when CONFIG_ACPI is not set. >> * Introduce device_dma_is_coherent(). >> * Use device_dma_is_coherent in crypto/ccp and amd-xgbe driver. >> >> Changes from RFC: (https://lkml.org/lkml/2015/4/1/389) >> * New logic for deriving and propagating coherent attribute from >> parent devices. (by Mark) >> * Introducing acpi_dma_is_coherent() API (Per Tom suggestion) >> * Introducing CONFIG_ACPI_MUST_HAVE_CCA kernel configuration. >> * Rebased to linux-4.1-rc1 >> >> Suravee Suthikulpanit (7): >> ACPI / scan: Parse _CCA and setup device coherency >> arm64 : Introduce support for ACPI _CCA object >> device property: Introduces device_dma_is_coherent() >> crypto: ccp - Unify coherency checking logic with >> device_dma_is_coherent() >> amd-xgbe: Unify coherency checking logic with device_dma_is_coherent() >> megaraid_sas: fix TRUE and FALSE re-define build error >> ufs: fix TRUE and FALSE re-define build error >> >> arch/arm64/Kconfig | 1 + >> arch/arm64/include/asm/dma-mapping.h | 18 +++++- >> arch/arm64/mm/dma-mapping.c | 92 +++++++++++++++++++++++++++++++ >> drivers/acpi/Kconfig | 3 + >> drivers/acpi/acpi_platform.c | 2 +- >> drivers/acpi/glue.c | 5 ++ >> drivers/acpi/scan.c | 35 ++++++++++++ >> drivers/base/property.c | 14 +++++ >> drivers/crypto/ccp/ccp-platform.c | 60 +------------------- >> drivers/net/ethernet/amd/xgbe/xgbe-main.c | 27 +-------- >> drivers/scsi/megaraid/megaraid_sas_fp.c | 8 +++ >> drivers/scsi/ufs/unipro.h | 8 +++ >> include/acpi/acpi_bus.h | 37 ++++++++++++- >> include/linux/acpi.h | 5 ++ >> include/linux/property.h | 2 + >> 15 files changed, 228 insertions(+), 89 deletions(-) > > I've queued up the series for 4.2, thanks! > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/