public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] PATCH redirectable IRQs
Date: Mon, 07 Jan 2002 16:31:51 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805757@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805756@msgid-missing>

Erich Focht <efocht@ess.nec.de> writes:

|> @@ -234,9 +234,13 @@
|>  		writel(IOSAPIC_RTE_LOW(pin), addr + IOSAPIC_REG_SELECT);
|>  		low32 = readl(addr + IOSAPIC_WINDOW);
|>  
|> -		/* change delivery mode to fixed */
|>  		low32 &= ~(7 << IOSAPIC_DELIVERY_SHIFT);
|> -		low32 |= (IOSAPIC_FIXED << IOSAPIC_DELIVERY_SHIFT);
|> +		if (redir == 1)

Just a nit: since redir is a boolean value it should be used as such.

|> diff -ur 2.4.17/arch/ia64/kernel/irq.c 2.4.17-irqr/arch/ia64/kernel/irq.c
|> --- 2.4.17/arch/ia64/kernel/irq.c	Mon Jan  7 11:35:08 2002
|> +++ 2.4.17-irqr/arch/ia64/kernel/irq.c	Mon Jan  7 12:45:17 2002
|> @@ -1090,13 +1090,15 @@
|>  static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
|>  
|>  static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
|> +static char irq_redir [NR_IRQS] = { [0 ... NR_IRQS-1] = 1 };
|>  
|>  static int irq_affinity_read_proc (char *page, char **start, off_t off,
|>  			int count, int *eof, void *data)
|>  {
|>  	if (count < HEX_DIGITS+1)
|>  		return -EINVAL;
|> -	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
|> +	return sprintf (page, "%s %08lx\n", irq_redir[(long)data] == 1 ? "r" : "f",

Same here.

|> @@ -1104,11 +1106,20 @@
|>  {
|>  	int irq = (long) data, full_count = count, err;
|>  	unsigned long new_value;
|> +	char *buf = buffer;
|> +	int redir;
|>  
|>  	if (!irq_desc(irq)->handler->set_affinity)
|>  		return -EIO;
|>  
|> -	err = parse_hex_value(buffer, count, &new_value);
|> +	if (buf[0] == 'r' || buf[0] == 'R') {
|> +		++buf;
|> +		while (*buf == ' ') ++buf;
|> +		redir = 1;
|> +	} else
|> +		redir = 0;
|> +
|> +	err = parse_hex_value(buf, count, &new_value);

Should this handle buf[0] == 'f'?  You get this when you read the file, so
someone will probably try to write in the same format.  Unfortunately this
conflicts with the use of hexadecimal for the cpu number, so
irq_affinity_read_proc should perhaps not output the 'f' prefix.

Andreas.

-- 
Andreas Schwab             SuSE Labs                  schwab@suse.de
SuSE GmbH, Deutschhherrnstr. 15-19, D-904229 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


  reply	other threads:[~2002-01-07 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-07 14:28 [Linux-ia64] PATCH redirectable IRQs Erich Focht
2002-01-07 16:31 ` Andreas Schwab [this message]
2002-01-07 17:12 ` David Mosberger
2002-01-07 17:16 ` Erich Focht
2002-01-08 16:35 ` Erich Focht
2002-01-10 21:24 ` David Mosberger
2003-09-10 18:26 ` Michael.Meduna
2003-09-11 11:33 ` Erich Focht
2003-09-12  1:36 ` Michael Meduna

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=marc-linux-ia64-105590698805757@msgid-missing \
    --to=schwab@suse.de \
    --cc=linux-ia64@vger.kernel.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