From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: linux-btrfs@vger.kernel.org, Qu Wenruo <wqu@suse.com>
Cc: borntraeger@linux.ibm.com, David Sterba <dsterba@suse.com>,
Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: [PATCH 1/1] s390x/css: Fix css stsch detection to go beyond 8192 devices
Date: Fri, 14 Aug 2026 17:17:59 +0200 [thread overview]
Message-ID: <20260814151759.1831153-1-borntraeger@linux.ibm.com> (raw)
find_last_bit expects a size in bits and not in words. the calculation
limits the number of guest devices to 8192. This probably does not
matter in reality, its wrong anyway.
Fixes: df1fe5bb49241 ("s390: Virtual channel subsystem support")
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
---
hw/s390x/css.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 3a67b670531..dedd39006bf 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -2023,8 +2023,7 @@ bool css_schid_final(int m, uint8_t cssid, uint8_t ssid, uint16_t schid)
return true;
}
set = channel_subsys.css[real_cssid]->sch_set[ssid];
- return schid > find_last_bit(set->schids_used,
- (MAX_SCHID + 1) / sizeof(unsigned long));
+ return schid > find_last_bit(set->schids_used,(MAX_SCHID + 1));
}
unsigned int css_find_free_chpid(uint8_t cssid)
--
2.55.0
next reply other threads:[~2026-08-14 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 15:17 Christian Borntraeger [this message]
2026-08-14 15:19 ` [PATCH 1/1] s390x/css: Fix css stsch detection to go beyond 8192 devices Christian Borntraeger
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=20260814151759.1831153-1-borntraeger@linux.ibm.com \
--to=borntraeger@linux.ibm.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=kvm@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=wqu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox