All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	blauwirbel@gmail.com, Heinz Graalfs <graalfs@linux.vnet.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 4/7] s390: sclp event support
Date: Mon, 30 Jul 2012 16:46:47 +0200	[thread overview]
Message-ID: <50169E57.5010203@de.ibm.com> (raw)
In-Reply-To: <9EB25248-1A13-4519-A034-DE1707D7FE61@suse.de>

On 30/07/12 15:24, Alexander Graf wrote:

Thanks for the review.

Here is just a short answer regarding the interrupt, we will adress the other comments in a later
mail.

>> void sclp_service_interrupt(uint32_t sccb)
>> {
>> -    if (!sccb) {
>> +    SCLPEventFacility *ef = sbus->event_facility->instance;
>> +    int event_pending = sbus->event_facility->event_pending(ef);
>> +
>> +    if (!event_pending && !sccb) {
>>         return;
>>     }
> 
> Uh. So when there's no event pending no sclp call may trigger an interrupt?

No. If there is no event pending AND no sccb was specified, then we have nothing to report
--> no interrupt.

An service interrupt has a 32bit value as payload. Bits 0-28 (in IBM speak, 31-3 in Linux speak)
contain the sccb address (if any), the other bits are special. The LSB describes if there are still
events pending.

So an unsolicited interrupt will only set the LSB.
An answer to a service call will always contain the sccb and might have the lsb set if there are
events pending.


>> -    s390_sclp_extint(sccb & ~3);
>> +    s390_sclp_extint((sccb & ~3) + event_pending);
> 
> event_pending returns a bool, right? Please make this code a bit less magical :).

Something like "event_pending?1:0" ?

  reply	other threads:[~2012-07-30 14:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24  7:37 [Qemu-devel] [PATCH 0/7v3] s390: sclp patch set Christian Borntraeger
2012-07-24  7:37 ` [Qemu-devel] [PATCH 1/7] s390: Fix error handling and condition code of service call Christian Borntraeger
2012-07-24  7:37 ` [Qemu-devel] [PATCH 2/7] s390: provide interface for service interrupt/introduce interrupt.c Christian Borntraeger
2012-07-24  7:37 ` [Qemu-devel] [PATCH 3/7] s390: sclp base support Christian Borntraeger
2012-07-30 12:38   ` Alexander Graf
2012-07-30 14:34     ` Christian Borntraeger
2012-08-20 12:15     ` Heinz Graalfs
2012-08-03 15:23   ` Andreas Färber
2012-07-24  7:37 ` [Qemu-devel] [PATCH 4/7] s390: sclp event support Christian Borntraeger
2012-07-30 13:24   ` Alexander Graf
2012-07-30 14:46     ` Christian Borntraeger [this message]
2012-07-30 14:57       ` Alexander Graf
2012-08-20 12:15     ` Heinz Graalfs
2012-07-31 12:59   ` Andreas Färber
2012-08-03 12:31     ` Christian Borntraeger
2012-08-20 12:14     ` Heinz Graalfs
2012-07-24  7:37 ` [Qemu-devel] [PATCH 5/7] s390: sclp signal quiesce support Christian Borntraeger
2012-07-24  7:37 ` [Qemu-devel] [PATCH 6/7] s390: sclp ascii console support Christian Borntraeger
2012-07-24 19:42   ` Blue Swirl
2012-07-26  8:55     ` [Qemu-devel] [PATCH v4 06/07] " Christian Borntraeger
2012-07-30 14:02       ` Alexander Graf
2012-07-31 13:05         ` Christian Borntraeger
2012-07-24  7:37 ` [Qemu-devel] [PATCH 7/7] s390: make sclp ascii console the default Christian Borntraeger
2012-07-24 19:35   ` Blue Swirl
2012-07-25  6:55     ` Christian Borntraeger
2012-07-26 13:48       ` Andreas Färber
2012-07-26  8:59     ` [Qemu-devel] [PATCH v4 07/07] " Christian Borntraeger
2012-07-30 14:05       ` Alexander Graf
2012-07-31 12:44         ` Christian Borntraeger
2012-07-31 12:52           ` Alexander Graf
2012-07-26  9:11     ` Christian Borntraeger
2012-07-30  9:00 ` [Qemu-devel] [PATCH 0/7v3] s390: sclp patch set Christian Borntraeger
2012-07-30 14:11   ` Alexander Graf

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=50169E57.5010203@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=blauwirbel@gmail.com \
    --cc=graalfs@linux.vnet.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.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 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.