Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755604AbbKCRjU (ORCPT ); Tue, 3 Nov 2015 12:39:20 -0500 Received: from mail-bn1on0065.outbound.protection.outlook.com ([157.56.110.65]:63234 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752932AbbKCRjR (ORCPT ); Tue, 3 Nov 2015 12:39:17 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com; Message-ID: <5638F13D.3080406@caviumnetworks.com> Date: Tue, 3 Nov 2015 09:39:09 -0800 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Hanjun Guo CC: Lorenzo Pieralisi , Sinan Kaya , Tomasz Nowicki , , , , , , , , , , , , , , , , , , Gabriele Paoloni , "Wangzhou (B)" , "liudongdong (C)" Subject: Re: [PATCH V1 11/11] arm64, pci, acpi: Support for ACPI based PCI hostbridge init References: <1445963922-22711-1-git-send-email-tn@semihalf.com> <1445963922-22711-12-git-send-email-tn@semihalf.com> <5631180D.2000902@codeaurora.org> <20151103141512.GC3574@red-moon> <5638D07B.2030001@linaro.org> In-Reply-To: <5638D07B.2030001@linaro.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BY2PR07CA075.namprd07.prod.outlook.com (10.141.251.50) To DM3PR07MB2140.namprd07.prod.outlook.com (25.164.4.146) X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2140;2:7SAf+3yrWxLRt9PJXjNCSzj1x7BpzG9MJJ5cf7Fj5fjc5aqHLulroWx5pelj8YlG8s4i9XZ4Wck7Y7/lfr4TUrJeIcKvM6xqGqkjHKTyUDvmgKU2URIB9rD2l7dXseJmzQeVfA5uoChbqLkPHc05e1rS/75KkklWY/sR0J+2QrA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3UogCZbvQvCjAsEB82yQdbOurMQqR7nW96AuUwH+e3PL/0H2CdQvUF0oTVrOUKxO9Umzc2S+VfI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046);SRVR:DM3PR07MB2140;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2140; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2140;4:eFcGCQ9GdOYLlPULNKVbxqRXzxB/V0PGKjaXb1Zdb4/ql5Vp3+6u8Ssy3JZniVbvP77an1wT1tLFsqiRcDg3hr7q/qyXLNuNsS1qGNqqs2IonJvysqJtHjJvf9O8Lr1AX5Byp/SYH/tdarvvCNdMWnBfuAWQIsCCemxQolNOeoUiBvGnALTRSb9tml2rTdl8cS4ePVMMM3XNOI0jkGHxY8GTBHb5/qrmi2udFq8ZCD+sIjAdH35fkzxjlz5vQU5ZfwqTmsR2m5v32pt6PiHlmKa2H5W6U/OfEXFetv0QpnTU29HSN04bGkHQlMiEaexn+AXbkZFO1omIrfFcru2Pjduio/D+pHkFpE2p8p7BoV8Vee1A4KOtaVuatPdlBWTV X-Forefront-PRVS: 0749DC2CE6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(479174004)(189002)(24454002)(377454003)(4001350100001)(97736004)(5004730100002)(64126003)(33656002)(93886004)(53416004)(65816999)(81156007)(230700001)(101416001)(59896002)(83506001)(5007970100001)(5008740100001)(42186005)(50986999)(2950100001)(5001960100002)(76176999)(36756003)(40100003)(110136002)(92566002)(65806001)(66066001)(189998001)(15975445007)(19580395003)(47776003)(106356001)(87976001)(77096005)(105586002)(65956001)(80316001)(23746002)(69596002)(50466002)(54356999)(122386002)(87266999)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2140;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM3PR07MB2140;23:QUECT27P/VY8YPMOUXZ+vQiT+TdbEqmBUw+PC?= =?Windows-1252?Q?ExleKCb+AES2PQHWPFLNNWIXGPmLBGqn006n7gNbbGFZr4UGRv2vdVG1?= =?Windows-1252?Q?QNvngfK1iEydsYsHwS40Ze3XENqzzzVV9fj57uG74Tye9hXTTlP73NUn?= =?Windows-1252?Q?fJlWTpvRXHO1qKTclj2zHkMeCu3A/atKcIi4nCDuOG3Saj9SM+WPs6xC?= =?Windows-1252?Q?D6Ihs9O7C05vQKXIgbvYpiwB735JPemtOL/2iJ+MUMu17JPd0+tAipLJ?= =?Windows-1252?Q?OLppUdu7G0was7zwcJKjNGRps2j/XlkdrwikPO1tF+BOcqv6nes1vxcI?= =?Windows-1252?Q?CFoWqwcq/w7867xGP6fQ0pvNpjzKGKls2/Lo3Kic0XgvFSSntv6mgg2Q?= =?Windows-1252?Q?LJaE+o3yxomtmFlXkpqg98+Sq8f2yv6wvaIeHZKmejrj+7FBjq0rzMCs?= =?Windows-1252?Q?yg5MmqKOUepB1QVLGCLPgvLwqoD1pEgQ2zjpCVWkNq5tLB9QShS1BT5b?= =?Windows-1252?Q?63+BM3pgucrQIRllHt4aJNxyVzrn9yLN2rZaxeawjl7CZxOyfY0tD+zR?= =?Windows-1252?Q?Z4G5suTbsiavSfNcZYVTcQRcZ0rPUbgyzcHIn3se9cajs3MVgmxbdPFd?= =?Windows-1252?Q?WQnpSF3CCM9hr63iPicMMbltVJpQ4j+2HyxtFlfaojbgMPtTiTIVSX30?= =?Windows-1252?Q?wD2nnyoA7a1z+r7Xu2yAoJDFzEqPlKB/wQaIm8aB75e1NQW1BsWHspBc?= =?Windows-1252?Q?H/8KgWC4dTyRdsto1sTxfTOmbvRE6vUkV23+g7du/mECF6n4/ytcIHWq?= =?Windows-1252?Q?4gCCwl7OCXwTsvgF5utT2ygYHPEkviLYOB9idsRnM8Wm003zW2I6597u?= =?Windows-1252?Q?cgt8u+q+6PZlH6S74Hv0fEXu18H9RPZtho+rrqvAgqpDufA2SAOIprDf?= =?Windows-1252?Q?e6fZhqcV8YLjdNxnP6pTSF/g2A4kDQPxdHrl89DcTFbxcWahzSXjNMaD?= =?Windows-1252?Q?yB46DDqqULcGOAKpmADsoWpUXTh8N4eryHSsV3iqJ+QWRWhTfM1liayr?= =?Windows-1252?Q?oiVy+90WBFIaoxqwe5LVLPUshE4P93Q4Ci3hszFpYzL3LWLXQuOyjdPg?= =?Windows-1252?Q?tOU2KG5s0uk1q7d+xb+7KRvm7O3I3yD9DprEuy8kKdWfgQngiFBWHBdi?= =?Windows-1252?Q?jq9bs9Lu0UisJ0QXQFTpso58156VVG8HiyqSMK/rmhsnZ1/oDfhJLK1h?= =?Windows-1252?Q?TyDITN5+csWeWsLtjaJ5NtTTHD54mUaexHP5iZyMy1ozAQJD9fXXmMap?= =?Windows-1252?Q?X3OAODVuV/obfmFAFqQOnGAzVhdO+w6DBegekiZS80hbHOn9Fz5Wv4XU?= =?Windows-1252?Q?7rGfoQDm5WdrL99r59Rzz4ItsGfGOApBA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2140;5:nuXH9wAPruC1YZaUJiQTFc0kbkYq01CpIWLvfYUVHgO3iv3/ntyQt7RC4v6epzNW5VCiuocc69hi5isUqQU1frrcmqbamIY2JV+HBrAYtQ2YSa9uxntPoopKZTAjyacBU32vbYdZEsTBX7/J7QzsDw==;24:+qgYrDXmnlO1t3EyyduiscddOPv04xFJi4K+WbRD2X9RaJwekv6Bn9FO24wDtCNUtIsThO3JkJYfZSGMe256q4SHLUnBHoD49C1Z9zDwQio=;20:I7b3RHnAehDl2EMnzNIrdZ3cavK9jRcD1bUuPaXEsQYhIa+j0+6FWaf8wEcZf2pe88SD3w4fXShiVJCuajHAKQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2015 17:39:12.7705 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2140 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1730 Lines: 55 On 11/03/2015 07:19 AM, Hanjun Guo wrote: > On 11/03/2015 10:15 PM, Lorenzo Pieralisi wrote: >> On Wed, Oct 28, 2015 at 02:46:37PM -0400, Sinan Kaya wrote: >> >> [...] >> >>>> -int raw_pci_write(unsigned int domain, unsigned int bus, >>>> - unsigned int devfn, int reg, int len, u32 val) >>>> +struct pci_ops pci_root_ops = { >>>> + .map_bus = pci_mcfg_dev_base, >>>> + .read = pci_generic_config_read, >>>> + .write = pci_generic_config_write, >>> >>> >>> Can you change these with pci_generic_config_read32 and >>> pci_generic_config_write32? We have some targets that can only do 32 >>> bits PCI config space access. >> >> No. >> >> http://www.spinics.net/lists/linux-pci/msg44869.html >> >> Can you be a bit more specific please ? >> >> Sigh. Looks like we have to start adding platform specific quirks even >> before we merged the generic ACPI PCIe host controller implementation. > > Cc Gab, Zhou, and Dondong who upstream the hip05 (designware) PCIe host > support. > > I think so, some platform may not support ECAM for root complex, > which needs special handling of access config space, we may need > to consider those cases. > Yes, it is indeed true. For example, some Cavium ThunderX processors fall into this category. Some options I thought of are: o Use DECLARE_ACPI_MCFG_FIXUP() in the kernel to supply the needed config space accessors. o Define additional root_device_ids that imply the needed config space accessors. > Thanks > Hanjun -- 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/