Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1610092
| From | Mason <slash.tmp@free.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge |
| Date | 2017-03-27 21:50 +0200 |
| Message-ID | <tpIOl-4Gg-15@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <tobUu-3mq-13@gated-at.bofh.it> <toepj-5id-5@gated-at.bofh.it> <toCrE-5z0-11@gated-at.bofh.it> <tpFns-2iK-27@gated-at.bofh.it> <tpGtc-34b-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 27/03/2017 19:09, Marc Zyngier wrote: > On 27/03/17 16:53, Mason wrote: > >> I have one remaining issue with bitmaps. >> >> My HW regs are 32b. How do I grab e.g. bits 96-127? >> All I can think of is >> u32 val = ((u32 *)bitmap)[3]; >> >> Is this acceptable? > > No. > >> mrutland mentioned bitmap_to_u32array() but IIUC it is used to >> copy an entire bitmap. > > The real question is "Why do you need such a thing?". You told me to use an in-memory version of the "unmasked" bitmap, yes? In that case, I need to be able to grab a piece of said bitmap, to update the corresponding piece of the HW bitmap. For example, assume the first 3 MSIs are unmasked, in other words, unmasked = 0x7 A new user comes along and wants to assign an MSI. Scan "unmasked", found bit at pos 3. Update "unmasked" to 0xf. At some point, I need to write 0xf to some HW reg. So I need to grab a piece of "unmasked" (bits 0-31 in my example) pos = find_first_zero_bit(unmasked, COUNT); __set_bit(pos, unmasked); int reg_index = pos / 32; u32 val = ((u32 *)unmasked)[reg_index]; writel_relaxed(val, pcie->enabled + reg_index * 4); Or did I miss something in your suggestion? Regards.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-23 14:10 +0100
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Marc Zyngier <marc.zyngier@arm.com> - 2017-03-23 15:30 +0100
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-23 18:10 +0100
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-24 00:50 +0100
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Marc Zyngier <marc.zyngier@arm.com> - 2017-03-24 19:30 +0100
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-27 16:40 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Thomas Gleixner <tglx@linutronix.de> - 2017-03-27 16:50 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-27 17:20 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Marc Zyngier <marc.zyngier@arm.com> - 2017-03-24 19:50 +0100
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-27 18:10 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Marc Zyngier <marc.zyngier@arm.com> - 2017-03-27 19:20 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-27 21:50 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Marc Zyngier <marc.zyngier@arm.com> - 2017-03-27 23:10 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-28 00:10 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Marc Zyngier <marc.zyngier@arm.com> - 2017-03-28 10:30 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-29 13:50 +0200
Re: [RFC PATCH v0.2] PCI: Add support for tango PCIe host bridge Mason <slash.tmp@free.fr> - 2017-03-30 13:10 +0200
csiph-web