Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Florian Fainelli <florian@openwrt.org>
Subject: Re: [PATCH] MIPS: add proper set_mode() to cevt-r4k
Date: Thu, 01 Aug 2013 16:16:47 +0200	[thread overview]
Message-ID: <51FA6DCF.8000802@phrozen.org> (raw)
In-Reply-To: <20130801141358.GB3466@linux-mips.org>


> setup_irq() may fail but set_mode doesn't have a way to communicate an
> error - other than leaving back a half-wrecked system so set_mode is not
> a good place to do that kind of job.

much like the current code which does not check set_mode either. also, a 
core that boots and cannot get its clock irq is not half wrecked, its 
fully wrecked and wont be able to boot anyway.

>
> How about using get_c0_compare_int() for a solution?  Currently
> get_c0_compare_int() can not return an error.  If it could return a
> negative value to indicate the unavailability of an interrupt for
> cevt-r4k's use, that interrupt would be available for alternative use.

the code could be changed but get_c0_compare_int() returns an unsigned 
so that would require changing the return value everywhere the function 
is defined.

i still think that my proposed patch is valid, we could add a panic call 
if set_mode fails. having your kernel tell you to start an instance of 
your main clock and not being able to request said irq, does look like a 
valid cause for a panic() to me

	John

  reply	other threads:[~2013-08-01 14:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29  9:55 [PATCH] MIPS: add proper set_mode() to cevt-r4k John Crispin
2013-07-29 10:40 ` Florian Fainelli
2013-07-29 10:52   ` John Crispin
2013-07-29 11:14     ` Florian Fainelli
2013-07-29 11:14       ` John Crispin
2013-07-30 10:01         ` Florian Fainelli
2013-07-31 19:22       ` David Daney
2013-07-31 19:26         ` Florian Fainelli
2013-08-01  6:15           ` John Crispin
2013-08-01 14:13             ` Ralf Baechle
2013-08-01 14:16               ` John Crispin [this message]
2013-07-29 14:53   ` Maciej W. Rozycki

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=51FA6DCF.8000802@phrozen.org \
    --to=john@phrozen.org \
    --cc=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox