LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org, Tomaso.Paoletti@caviumnetworks.com
Subject: Re: [PATCH] serial: Initialize spinlocks in 8250 and don't clobber them.
Date: Tue, 21 Oct 2008 08:35:39 -0700 [thread overview]
Message-ID: <48FDF6CB.4070605@caviumnetworks.com> (raw)
In-Reply-To: <20081021103833.5e960c8d@lxorguk.ukuu.org.uk>
Alan Cox wrote:
>> But yes, copying a spinlock by value is quite wrong. Perhaps we could
>> retain the struct assigment and then run spin_lock_init() to get the
>> spinlock into a sane state?
>
> Kind of irrelevant now however, the split of patches that caused the
> original bug is over and the NR_IRQ removal patch half of it hit Linus
> tree.
>
My original patch fixed *two* problems. As you note here, you already fixed the first one.
As far as I know, the second problem is still present, and that is what akpm was referring to above. Several days ago I posted a revised patch for this here:
http://marc.info/?l=linux-serial&m=122408950013741&w=2
The question is: What is the best way to initialize some (or all) fields of a structure *except* a single lock field that was previously initialized?
We can just copy field by field as my patch does, or you could do something ugly using memcpy on portions of the structure. In this case we know which structure elements will be used by the early console, so I just copied them.
Any comments about that patch are certainly most welcome.
Thanks,
David Daney
next prev parent reply other threads:[~2008-10-21 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 21:37 David Daney
2008-10-20 21:17 ` Andrew Morton
2008-10-20 21:37 ` David Daney
2008-10-21 9:38 ` Alan Cox
2008-10-21 15:35 ` David Daney [this message]
2008-10-21 15:50 ` Alan Cox
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=48FDF6CB.4070605@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=Tomaso.Paoletti@caviumnetworks.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--subject='Re: [PATCH] serial: Initialize spinlocks in 8250 and don'\''t clobber them.' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).