From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org, vilhelm.gray@gmail.com,
rrichter@marvell.com, bgolaszewski@baylibre.com,
syednwaris@gmail.com
Subject: [to-be-updated] gpio-thunderx-utilize-for_each_set_clump-macro.patch removed from -mm tree
Date: Tue, 22 Dec 2020 12:42:34 -0800 [thread overview]
Message-ID: <20201222204234.v9eJb%akpm@linux-foundation.org> (raw)
The patch titled
Subject: gpio: thunderx: utilize for_each_set_clump macro
has been removed from the -mm tree. Its filename was
gpio-thunderx-utilize-for_each_set_clump-macro.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Syed Nayyar Waris <syednwaris@gmail.com>
Subject: gpio: thunderx: utilize for_each_set_clump macro
Reimplement the thunderx_gpio_set_multiple function in
drivers/gpio/gpio-thunderx.c to use the new for_each_set_clump macro.
Instead of looping for each bank in thunderx_gpio_set_multiple function,
now we can skip bank which is not set and save cycles.
Link: https://lkml.kernel.org/r/5e94ad3c156b98d2ed28617b2ca25bacadc189d5.1603055402.git.syednwaris@gmail.com
Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Robert Richter <rrichter@marvell.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/gpio/gpio-thunderx.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/drivers/gpio/gpio-thunderx.c~gpio-thunderx-utilize-for_each_set_clump-macro
+++ a/drivers/gpio/gpio-thunderx.c
@@ -275,12 +275,15 @@ static void thunderx_gpio_set_multiple(s
unsigned long *bits)
{
int bank;
- u64 set_bits, clear_bits;
+ unsigned long set_bits, clear_bits, gpio_mask;
+ unsigned long offset;
+
struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
- for (bank = 0; bank <= chip->ngpio / 64; bank++) {
- set_bits = bits[bank] & mask[bank];
- clear_bits = ~bits[bank] & mask[bank];
+ for_each_set_clump(offset, gpio_mask, mask, chip->ngpio, 64) {
+ bank = offset / 64;
+ set_bits = bits[bank] & gpio_mask;
+ clear_bits = ~bits[bank] & gpio_mask;
writeq(set_bits, txgpio->register_base + (bank * GPIO_2ND_BANK) + GPIO_TX_SET);
writeq(clear_bits, txgpio->register_base + (bank * GPIO_2ND_BANK) + GPIO_TX_CLR);
}
_
Patches currently in -mm which might be from syednwaris@gmail.com are
gpio-xilinx-utilize-generic-bitmap_get_value-and-_set_value.patch
reply other threads:[~2020-12-22 20:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201222204234.v9eJb%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=rrichter@marvell.com \
--cc=syednwaris@gmail.com \
--cc=vilhelm.gray@gmail.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