Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933169AbbFCOhj (ORCPT ); Wed, 3 Jun 2015 10:37:39 -0400 Received: from mail-by2on0138.outbound.protection.outlook.com ([207.46.100.138]:6016 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932641AbbFCOh3 convert rfc822-to-8bit (ORCPT ); Wed, 3 Jun 2015 10:37:29 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NPDHYA-07-CKS-02 X-M-MSG: Message-ID: <556F1115.3080302@amd.com> Date: Wed, 3 Jun 2015 09:37:09 -0500 From: Suravee Suthikulanit User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mark Salter , , , CC: , , , , , , , , , , , , , , , , , , , Subject: Re: [V5 PATCH 2/5] arm64 : Introduce support for ACPI _CCA object References: <1432159758-4486-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1432159758-4486-3-git-send-email-Suravee.Suthikulpanit@amd.com> <1432867099.24429.4.camel@deneb.redhat.com> In-Reply-To: <1432867099.24429.4.camel@deneb.redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD006;1:lDJUqoPfOIiO7BCvWS7rFS5bQdyb1UXYSMnPtLO6iqNX9xW3HCa0OdJm4/Pbi4N4C8wEryhmGjB0tgTf84rlY0PxfhAHyoJ59W0a2LPX0iRT31Y7txzDHPgEAiaFrD8BX38t6u4A0hZQPxxyJga89O+ex55lvx3FORwQg/FuT6vh51zBQhE9n/2STyD4+VgkwnU3eAwWCC+vWvhv8/NQvcsF8sL1UuDUt3lH24H6T6OdUeyv0wuo46XLonYk7lAdGKecZcEg9Yd2VCbZReLDC6jNPdG5RGauJ1d4psuzOO4aI4sTVhZy7QaAOGmQSRf0QAjubvh5eDLmu5Eh4bV0Qg== X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(428002)(24454002)(189002)(199003)(377454003)(164054003)(479174004)(52604005)(51704005)(377424004)(59896002)(62966003)(77096005)(120886001)(189998001)(5001860100001)(33656002)(92566002)(68736005)(105586002)(50466002)(4001350100001)(65806001)(97736004)(5001770100001)(87936001)(101416001)(2201001)(575784001)(86362001)(106466001)(19580405001)(19580395003)(64126003)(80316001)(87266999)(83506001)(76176999)(77156002)(4001540100001)(2950100001)(46102003)(47776003)(64706001)(65956001)(5001830100001)(54356999)(65816999)(50986999)(23676002)(36756003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1115;H:atltwp01.amd.com;FPR:;SPF:None;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1115; 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:BY1PR02MB1115;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1115; X-Forefront-PRVS: 05961EBAFC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2015 14:37:24.6557 (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.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1115 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3898 Lines: 101 On 5/28/2015 9:38 PM, Mark Salter wrote: > On Wed, 2015-05-20 at 17:09 -0500, Suravee Suthikulpanit wrote: >> >Fromhttp://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf, >> >section 6.2.17 _CCA states that ARM platforms require ACPI _CCA >> >object to be specified for DMA-cabpable devices. Therefore, this patch >> >specifies ACPI_CCA_REQUIRED in arm64 Kconfig. >> > >> >In addition, to handle the case when _CCA is missing, arm64 would assign >> >dummy_dma_ops to disable DMA capability of the device. >> > >> >Acked-by: Catalin Marinas >> >Signed-off-by: Mark Salter >> >Signed-off-by: Suravee Suthikulpanit >> >--- >> > arch/arm64/Kconfig | 1 + >> > arch/arm64/include/asm/dma-mapping.h | 18 ++++++- >> > arch/arm64/mm/dma-mapping.c | 92 ++++++++++++++++++++++++++++++++++++ >> > 3 files changed, 109 insertions(+), 2 deletions(-) >> > >> >diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> >index 4269dba..95307b4 100644 >> >--- a/arch/arm64/Kconfig >> >+++ b/arch/arm64/Kconfig >> >@@ -1,5 +1,6 @@ >> > config ARM64 >> > def_bool y >> >+ select ACPI_CCA_REQUIRED if ACPI >> > select ACPI_GENERIC_GSI if ACPI >> > select ACPI_REDUCED_HARDWARE_ONLY if ACPI >> > select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE >> >diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h >> >index 9437e3d..f0d6d0b 100644 >> >--- a/arch/arm64/include/asm/dma-mapping.h >> >+++ b/arch/arm64/include/asm/dma-mapping.h >> >@@ -18,6 +18,7 @@ >> > >> > #ifdef __KERNEL__ >> > >> >+#include >> > #include >> > #include >> > > ^^^ This hunk causes build issues with a couple of drivers: > > drivers/scsi/megaraid/megaraid_sas_fp.c:69:0: warning: "FALSE" redefined [enabled by default] > #define FALSE 0 > ^ > In file included from include/acpi/acpi.h:58:0, > from include/linux/acpi.h:37, > from ./arch/arm64/include/asm/dma-mapping.h:21, > from include/linux/dma-mapping.h:86, > from ./arch/arm64/include/asm/pci.h:7, > from include/linux/pci.h:1460, > from drivers/scsi/megaraid/megaraid_sas_fp.c:37: > include/acpi/actypes.h:433:0: note: this is the location of the previous definition > #define FALSE (1 == 0) > ^ > > > In file included from include/acpi/acpi.h:58:0, > from include/linux/acpi.h:37, > from ./arch/arm64/include/asm/dma-mapping.h:21, > from include/linux/dma-mapping.h:86, > from include/scsi/scsi_cmnd.h:4, > from drivers/scsi/ufs/ufshcd.h:60, > from drivers/scsi/ufs/ufshcd.c:43: > include/acpi/actypes.h:433:41: error: expected identifier before ‘(’ token > #define FALSE (1 == 0) > ^ > drivers/scsi/ufs/unipro.h:203:2: note: in expansion of macro ‘FALSE’ > FALSE = 0, > ^ > > This happens because the ACPI definitions of TRUE and FALSE conflict > with local definitions in megaraid and enum declaration in ufs. > Mark, Thanks for pointing this out. Although, I would think that the megaraid_sas_fp.c should have had the #ifndef to check before defining the TRUE and FALSE as following. #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif This seems to be what other drivers are also doing. If this is okay, I can send out a fix-up patch for the megaraid driver. Thanks, Suravee -- 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/