Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752569AbdIFJAt (ORCPT ); Wed, 6 Sep 2017 05:00:49 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:37091 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117AbdIFJAo (ORCPT ); Wed, 6 Sep 2017 05:00:44 -0400 X-Google-Smtp-Source: AOwi7QC/Slh8AdUsaL1k3qkbHcIMBBbdCWIx06juJQyCGuY9ZU8tfr3AD/B1bXIwkcyE1blQSZrNH+r6nKnwjvHWkio= MIME-Version: 1.0 In-Reply-To: <7d0dbcce-0863-cfb0-6012-2c3ac0fc3c27@gmail.com> References: <1504401889-113524-7-git-send-email-sathyanarayanan.kuppuswamy@linux.intel.com> <20170905073849.eeeo3kbncozzer46@dell> <7d0dbcce-0863-cfb0-6012-2c3ac0fc3c27@gmail.com> From: Andy Shevchenko Date: Wed, 6 Sep 2017 12:00:43 +0300 Message-ID: Subject: Re: [RFC v2 6/6] platform/x86: intel_pmc_ipc: Use generic Intel IPC device calls To: "Kuppuswamy, Sathyanarayanan" Cc: Lee Jones , Kuppuswamy Sathyanarayanan , Souvik Kumar Chakravarty , "x86@kernel.org" , Ingo Molnar , Zha Qipeng , "H. Peter Anvin" , "dvhart@infradead.org" , Thomas Gleixner , Andy Shevchenko , "linux-kernel@vger.kernel.org" , Platform Driver Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1226 Lines: 32 On Wed, Sep 6, 2017 at 8:27 AM, Kuppuswamy, Sathyanarayanan wrote: > On 9/5/2017 12:38 AM, Lee Jones wrote: >> On Sat, 02 Sep 2017, sathyanarayanan.kuppuswamy@linux.intel.com wrote: >> I'm a bit concerned by the API. > > This is not a new change. Even before refactoring this driver, we have been > using u32 bit variable to pass the DPTR and SPTR address. >> >> Any reason why you're not using >> pointers for addresses? > > I think the main reason is, this is the expected format defined by SCU/PMC > spec. According to the spec document, SPTR and DPTR registers are used to > program the 32 bit SRAM address from which the PMC/SCU firmware can > read/write the data of an IPC command. if we are not using SPTR or DPTR, we > need to leave the value at zero. It's an effect, the cause is that the system controllers which are used in Intel SoCs are 32-bit microprocessors and they can't address more. That's why SRAM is placed in 32-bit address space. And thus, the SCU protocol defines fixed width parameters for addresses. So, it means we can't use any address outside of 4G space, iow 32-bit wide. >> pointers, you should be using NULL, instead of 0. -- With Best Regards, Andy Shevchenko