From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 163B9C48BD1 for ; Thu, 10 Jun 2021 14:33:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EED19613D8 for ; Thu, 10 Jun 2021 14:33:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231465AbhFJOfM (ORCPT ); Thu, 10 Jun 2021 10:35:12 -0400 Received: from mga18.intel.com ([134.134.136.126]:36675 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbhFJOfL (ORCPT ); Thu, 10 Jun 2021 10:35:11 -0400 IronPort-SDR: VRQXk7bPXe6jnMheEG6UBQEtYDWODn4WMOV03qpOBOvHEsm7U8JUG61vz6kYMlriGrwQ9AdCFX +ghpHxZZbD0Q== X-IronPort-AV: E=McAfee;i="6200,9189,10011"; a="192624645" X-IronPort-AV: E=Sophos;i="5.83,263,1616482800"; d="scan'208";a="192624645" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 07:32:51 -0700 IronPort-SDR: 8uDDKdrfy1Mxx0drDVGhpbL++tNhkiIuRRyYQA0/KVeB9ft4qtJOj+rxFDu81KmgSKMve3m9Yb 1zweDXmSa1Ig== X-IronPort-AV: E=Sophos;i="5.83,263,1616482800"; d="scan'208";a="402879486" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 07:32:49 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lrLji-001AjR-Ql; Thu, 10 Jun 2021 17:32:46 +0300 Date: Thu, 10 Jun 2021 17:32:46 +0300 From: Andy Shevchenko To: Henning Schild Cc: Mika Westerberg , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Andy Shevchenko , Linus Walleij Subject: Re: [PATCH] pinctrl: intel: fix NULL pointer deref Message-ID: References: <20210609062722.9132-1-henning.schild@siemens.com> <20210609130816.3631f0aa@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 05:25:04PM +0300, Andy Shevchenko wrote: > On Wed, Jun 09, 2021 at 01:08:16PM +0200, Henning Schild wrote: > > Am Wed, 9 Jun 2021 13:33:34 +0300 > > schrieb Andy Shevchenko : > > ... > > > In order to use GPIO from the drivers i need to make sure > > "broxton-pinctrl" comes up even if p2sb is hidden. > > > > Long story short, i thought the patch was simple enough to merge even > > taken out of my special context. > > > > Currently intel_pinctl only works if "ps2b is not hidden by BIOS" or > > "ACPI tables are correct", lifting the ban on the hidden p2sb seems > > like a useful thing in general (i.e. sysfs gpio interface). And i was > > hoping Andy would take the lead on that. It is something my Siemens > > drivers would depend on, but really a generic thing as far as i > > understand it. > > From p2sb series discussion it appears that this patch is not needed. > The case is when BIOS already provides an ACPI device. > > So, the initial bug is in that series that needs to check if the ACPI device is > exposed and forbid platform device instantiation in that case. Actually, I'm still thinking how this ever possible. We have all drivers to provide SoC data pointers. match data may be NULL if and only if the ACPI device provided is a new one that doesn't provide a SoC data. So, w/o seeing ACPI table, I'm really puzzled here. -- With Best Regards, Andy Shevchenko