All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>,
	Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Andy Shevchenko <andy@infradead.org>,
	Zha Qipeng <qipeng.zha@intel.com>,
	"dvhart@infradead.org" <dvhart@infradead.org>,
	David Box <david.e.box@linux.intel.com>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH v2 3/4] watchdog: iTCO_wdt: Fix PMC GCR memory mapping failure
Date: Fri, 17 Mar 2017 16:25:28 +0200	[thread overview]
Message-ID: <CAHp75VdyW-kH2nzk63_A=XD62ftrMbSfbec9nBiKbexpP+9zkg@mail.gmail.com> (raw)
In-Reply-To: <0a68f91f-e396-90aa-8337-cad3aa28a0f7@roeck-us.net>

On Fri, Mar 17, 2017 at 3:40 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 03/17/2017 04:43 AM, Rajneesh Bhardwaj wrote:
>> On Thu, Mar 16, 2017 at 05:41:35PM -0700, Kuppuswamy Sathyanarayanan
>> wrote:
>>>
>>> Currently, iTCO watchdog driver uses memory map to access
>>> PMC_CFG GCR register. But the entire GCR address space is
>>> already mapped in intel_scu_ipc driver. So remapping the

> I don't think I (or the watchdog mailing list) was copied on the original
> patch.
> Major immediate concern is that this introduces a dependency on external
> code.
> The pmc_ipc driver's Kconfig entry states "This is not needed for PC-type
> machines". I don't know where the function is introduced, but I hope this
> change
> does not require the pmc_ipc code to be present on such machines for the
> watchdog
> to work. It would be bad if it does. If it doesn't, it appears that the
> function
> should not be declared in asm/intel_pmc_ipc.h.

Agree.

I already asked once [1] to fix up the mess we have in PDx86 regarding SCU IPC.
(PMC IPC how it's called is actually just a [main] part of SCU in newer SoCs).

Rajneesh, Kuppuswamy,
please pay attention on the below.

We have two libraries doing almost the same (basics) one for old
platforms, one for new.

My vision what should be done before we go further is:
1. Split out common part from intel_scu_ipc and intel_pmc_ipc to some library.
2. Move headers to linux/platform_data/x86 for sharing with drivers
that are supporting non-Intel / not-newest-Intel hardware.
3. Fix the mess inside the intel_pmc_ipc code (like use devm_()
helpers where it makes sense, no use of global variables, etc)

On top of that
4. Fix up Whiskey Cove PMIC code (See Hans' message [2] for the details)

[1] Oops, it happened on internal mailing list Jan 27. And mentioned
publicly after in a review on some patch here.
[2] http://lkml.iu.edu/hypermail/linux/kernel/1702.3/01408.html

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Rajneesh Bhardwaj
	<rajneesh.bhardwaj-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Kuppuswamy Sathyanarayanan
	<sathyanarayanan.kuppuswamy-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Andy Shevchenko <andy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Zha Qipeng <qipeng.zha-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org"
	<dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	David Box <david.e.box-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Platform Driver
	<platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
Subject: Re: [PATCH v2 3/4] watchdog: iTCO_wdt: Fix PMC GCR memory mapping failure
Date: Fri, 17 Mar 2017 16:25:28 +0200	[thread overview]
Message-ID: <CAHp75VdyW-kH2nzk63_A=XD62ftrMbSfbec9nBiKbexpP+9zkg@mail.gmail.com> (raw)
In-Reply-To: <0a68f91f-e396-90aa-8337-cad3aa28a0f7-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

On Fri, Mar 17, 2017 at 3:40 PM, Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> wrote:
> On 03/17/2017 04:43 AM, Rajneesh Bhardwaj wrote:
>> On Thu, Mar 16, 2017 at 05:41:35PM -0700, Kuppuswamy Sathyanarayanan
>> wrote:
>>>
>>> Currently, iTCO watchdog driver uses memory map to access
>>> PMC_CFG GCR register. But the entire GCR address space is
>>> already mapped in intel_scu_ipc driver. So remapping the

> I don't think I (or the watchdog mailing list) was copied on the original
> patch.
> Major immediate concern is that this introduces a dependency on external
> code.
> The pmc_ipc driver's Kconfig entry states "This is not needed for PC-type
> machines". I don't know where the function is introduced, but I hope this
> change
> does not require the pmc_ipc code to be present on such machines for the
> watchdog
> to work. It would be bad if it does. If it doesn't, it appears that the
> function
> should not be declared in asm/intel_pmc_ipc.h.

Agree.

I already asked once [1] to fix up the mess we have in PDx86 regarding SCU IPC.
(PMC IPC how it's called is actually just a [main] part of SCU in newer SoCs).

Rajneesh, Kuppuswamy,
please pay attention on the below.

We have two libraries doing almost the same (basics) one for old
platforms, one for new.

My vision what should be done before we go further is:
1. Split out common part from intel_scu_ipc and intel_pmc_ipc to some library.
2. Move headers to linux/platform_data/x86 for sharing with drivers
that are supporting non-Intel / not-newest-Intel hardware.
3. Fix the mess inside the intel_pmc_ipc code (like use devm_()
helpers where it makes sense, no use of global variables, etc)

On top of that
4. Fix up Whiskey Cove PMIC code (See Hans' message [2] for the details)

[1] Oops, it happened on internal mailing list Jan 27. And mentioned
publicly after in a review on some patch here.
[2] http://lkml.iu.edu/hypermail/linux/kernel/1702.3/01408.html

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-03-17 14:25 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  3:32 [PATCH v1 1/1] platform/x86: intel_pmc_ipc: fix io mem mapping size Kuppuswamy Sathyanarayanan
2017-03-16  3:32 ` Kuppuswamy Sathyanarayanan
2017-03-16 14:52 ` Rajneesh Bhardwaj
2017-03-16 14:52   ` Rajneesh Bhardwaj
2017-03-16 16:05   ` Andy Shevchenko
2017-03-16 16:05     ` Andy Shevchenko
2017-03-16 18:13     ` Rajneesh Bhardwaj
2017-03-16 18:13       ` Rajneesh Bhardwaj
2017-03-16 20:12       ` Andy Shevchenko
2017-03-16 20:12         ` Andy Shevchenko
2017-03-16 21:15         ` sathyanarayanan kuppuswamy
2017-03-16 21:15           ` sathyanarayanan kuppuswamy
2017-03-16 18:50   ` sathyanarayanan kuppuswamy
2017-03-16 18:50     ` sathyanarayanan kuppuswamy
2017-03-16 19:20     ` Rajneesh Bhardwaj
2017-03-16 19:20       ` Rajneesh Bhardwaj
2017-03-16 21:05       ` sathyanarayanan kuppuswamy
2017-03-16 21:05         ` sathyanarayanan kuppuswamy
2017-03-17  0:41       ` [PATCH v2 1/4] platform/x86: intel_pmc_ipc: fix gcr offset Kuppuswamy Sathyanarayanan
2017-03-17  0:41         ` Kuppuswamy Sathyanarayanan
2017-03-17  0:41         ` [PATCH v2 2/4] platform/x86: intel_pmc_ipc: Add pmc gcr read/write api's Kuppuswamy Sathyanarayanan
2017-03-17  0:41           ` Kuppuswamy Sathyanarayanan
2017-03-17 11:26           ` Rajneesh Bhardwaj
2017-03-17 11:26             ` Rajneesh Bhardwaj
2017-03-17 17:11             ` sathyanarayanan kuppuswamy
2017-03-17 17:11               ` sathyanarayanan kuppuswamy
2017-03-17  0:41         ` [PATCH v2 3/4] watchdog: iTCO_wdt: Fix PMC GCR memory mapping failure Kuppuswamy Sathyanarayanan
2017-03-17  0:41           ` Kuppuswamy Sathyanarayanan
2017-03-17 11:43           ` Rajneesh Bhardwaj
2017-03-17 11:43             ` Rajneesh Bhardwaj
2017-03-17 11:43             ` Rajneesh Bhardwaj
2017-03-17 13:40             ` Guenter Roeck
2017-03-17 13:40               ` Guenter Roeck
2017-03-17 13:40               ` Guenter Roeck
2017-03-17 14:05               ` Rajneesh Bhardwaj
2017-03-17 14:05                 ` Rajneesh Bhardwaj
2017-03-17 14:05                 ` Rajneesh Bhardwaj
2017-03-17 14:25               ` Andy Shevchenko [this message]
2017-03-17 14:25                 ` Andy Shevchenko
2017-03-17 14:25                 ` Andy Shevchenko
2017-03-17 17:37                 ` sathyanarayanan kuppuswamy
2017-03-17 17:37                   ` sathyanarayanan kuppuswamy
2017-03-17 18:38                   ` Andy Shevchenko
2017-03-17 18:38                     ` Andy Shevchenko
2017-03-17 18:38                     ` Andy Shevchenko
2017-03-17 18:50                     ` sathyanarayanan kuppuswamy
2017-03-17 18:50                       ` sathyanarayanan kuppuswamy
2017-03-17 17:24               ` sathyanarayanan kuppuswamy
2017-03-17 17:24                 ` sathyanarayanan kuppuswamy
2017-03-17 17:50                 ` Guenter Roeck
2017-03-17 17:50                   ` Guenter Roeck
2017-03-17 18:39                   ` sathyanarayanan kuppuswamy
2017-03-17 18:39                     ` sathyanarayanan kuppuswamy
2017-03-17 17:15             ` sathyanarayanan kuppuswamy
2017-03-17 17:15               ` sathyanarayanan kuppuswamy
2017-03-17 17:15               ` sathyanarayanan kuppuswamy
2017-03-20  2:52           ` kbuild test robot
2017-03-20  2:52             ` kbuild test robot
2017-03-17  0:41         ` [PATCH v2 4/4] platform/x86: intel_pmc_ipc: remove iTCO GCR mem resource Kuppuswamy Sathyanarayanan
2017-03-17  0:41           ` Kuppuswamy Sathyanarayanan
2017-03-17 11:47           ` Rajneesh Bhardwaj
2017-03-17 11:47             ` Rajneesh Bhardwaj
2017-03-17 11:13         ` [PATCH v2 1/4] platform/x86: intel_pmc_ipc: fix gcr offset Rajneesh Bhardwaj
2017-03-17 11:13           ` Rajneesh Bhardwaj
2017-03-17 17:06           ` sathyanarayanan kuppuswamy
2017-03-17 17:06             ` sathyanarayanan kuppuswamy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75VdyW-kH2nzk63_A=XD62ftrMbSfbec9nBiKbexpP+9zkg@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=andy@infradead.org \
    --cc=david.e.box@linux.intel.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=qipeng.zha@intel.com \
    --cc=rajneesh.bhardwaj@intel.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.