All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Alessandro Zummo <a.zummo@towertech.it>
Subject: Re: [PATCH 6/7] ARM: rtc: update CMOS RTC to support MMIO and private lock
Date: Fri, 25 Apr 2014 13:32:55 +0100	[thread overview]
Message-ID: <535A55F7.8030506@arm.com> (raw)
In-Reply-To: <20140425102732.GI26756@n2100.arm.linux.org.uk>

Hi Russell,

On 25/04/14 11:27, Russell King - ARM Linux wrote:
> On Fri, Apr 25, 2014 at 10:31:14AM +0100, Marc Zyngier wrote:
>> So far, the CMOS RTC (PC-style mc146818) has always been used
>> through an ISA I/O port of some sort, with each platform configuring
>> the address in a static way.
>>
>> Some platforms (KVM with kvmtools, for example) offer a MMIO version
>> of the CMOS RTC, which requires a different access method.
>>
>> This patch select the RTC_DRV_CMOS_MMIO configuration in order to
>> support MMIO accesses as well as the older IO port method.
>>
>> While we're at it, switch to RTC_DRV_CMOS_PRIV_LOCK and remove the
>> ancient rtc_lock.
> 
> rtc_lock is there so that if you build the RTC driver and nvram driver
> in, and load them, they will both want to access the RTC via its
> indexed registers, and they need to share the lock to avoid trampling
> on each others toes.

Ah, I completely missed that one. Note to self: never look at that kind
of code just after lunch...

> Yes, it should be handled in a more modern way, but I don't think you
> can simply get rid of this in this manner.  We can have both these
> drivers loaded on ARM platforms.

Agreed. I suppose that would have to be handled by some kind of module
dependency, but it is starting to look even uglier than I initially thought.

Back to the drawing board...

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2014-04-25 12:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25  9:31 [PATCH 0/7] rtc-cmos: private locking and MMIO support Marc Zyngier
2014-04-25  9:31 ` [PATCH 1/7] rtc-cmos: abstract IO accessors Marc Zyngier
2014-04-25  9:31 ` [PATCH 2/7] rtc-cmos: abstract locking primitives Marc Zyngier
2014-04-25  9:31 ` [PATCH 3/7] rtc-cmos: allow MMIO to be used when initialized from FDT Marc Zyngier
2014-04-25  9:31 ` [PATCH 4/7] rtc-cmos: allow strictly MMIO based configurations Marc Zyngier
2014-04-25  9:31 ` [PATCH 5/7] rtc-cmos: implement driver private locking Marc Zyngier
2014-04-25  9:31 ` [PATCH 6/7] ARM: rtc: update CMOS RTC to support MMIO and private lock Marc Zyngier
2014-04-25 10:27   ` Russell King - ARM Linux
2014-04-25 12:32     ` Marc Zyngier [this message]
2014-04-25  9:31 ` [PATCH 7/7] arm64: rtc: plug the PC CMOS RTC using MMIO accessors Marc Zyngier

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=535A55F7.8030506@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rtc-linux@googlegroups.com \
    /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.