Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-05-16 Thread David Hildenbrand
On 16.05.24 19:44, Guillaume Morin wrote: On 02 May 5:59, Guillaume Morin wrote: On 30 Apr 21:25, David Hildenbrand wrote: I tried to get the hugepd stuff right but this was the first I heard about it :-) Afaict follow_huge_pmd and friends were already DTRT I'll have to have a closer look

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-05-16 Thread Guillaume Morin
On 02 May 5:59, Guillaume Morin wrote: > > On 30 Apr 21:25, David Hildenbrand wrote: > > > I tried to get the hugepd stuff right but this was the first I heard > > > about it :-) Afaict follow_huge_pmd and friends were already DTRT > > > > I'll have to have a closer look at some details (the

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-05-01 Thread Guillaume Morin
pcode_hugetlb(pte_t *ptep, unsigned long page_mask, + unsigned long vaddr, + unsigned long next, struct mm_walk *walk) +{ + struct uwo_data *data = walk->private; + const bool is_register = !!is_swbp_insn(>opcode); + pte_t pte = huge_ptep_get(ptep)

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-30 Thread David Hildenbrand
On 26.04.24 21:55, Guillaume Morin wrote: On 26 Apr 9:19, David Hildenbrand wrote: A couple of points: a) Don't use page_mapcount(). Either folio_mapcount(), but likely you want to check PageAnonExclusive. b) If you're not following the can_follow_write_pte/_pmd model, you are doing

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-30 Thread Guillaume Morin
n is that the previous __replace_page worked directly on the full HP page so adjusting after gup seemed to make more sense to me. But now I guess it's not that useful (esp we're going with a different version of write_uprobe). I'll fix (...) > > { > > struct uwo_data *dat

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-30 Thread David Hildenbrand
unsigned long next, struct mm_walk *walk) +static int __write_opcode(pte_t *ptep, unsigned long vaddr, + unsigned long page_mask, struct mm_walk *walk) Unrelated alignment change. { struct uwo_data *data = walk->private;; const bool is_register =

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-30 Thread Guillaume Morin
t, struct mm_walk *walk) +static int __write_opcode(pte_t *ptep, unsigned long vaddr, + unsigned long page_mask, struct mm_walk *walk) { struct uwo_data *data = walk->private;; const bool is_register = !!is_swbp_insn(>opcode); @@ -415,9 +417,12 @@ static int

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-26 Thread Guillaume Morin
VM_SHARED)) + return false; + + /* ... or read-only private ones */ + if (!(vma->vm_flags & VM_MAYWRITE)) + return false; + + /* ... or already writable ones that just need to take a write fault */ + if (vma->vm_flags & VM_WRITE) +

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-26 Thread David Hildenbrand
, my patch seems to be working. The hugetlb code is pretty simple. And it allows ptrace and the proc pid mem file to work on the executable private hugetlb mappings. There is one thing I am unclear about though. hugetlb enforces that huge_pte_write() is true on FOLL_WRITE in both the fault

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-25 Thread Guillaume Morin
> be > > > the cleaner thing to use here once I manage to switch over to > > > FOLL_WRITE|FOLL_FORCE to break COW. > > > > Yes, my patch seems to be working. The hugetlb code is pretty simple. > > And it allows ptrace and the proc pid mem file to work on the executa

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-25 Thread David Hildenbrand
and the proc pid mem file to work on the executable private hugetlb mappings. There is one thing I am unclear about though. hugetlb enforces that huge_pte_write() is true on FOLL_WRITE in both the fault and follow_page_mask paths. I am not sure if we can simply assume in the hugetlb code

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-25 Thread David Hildenbrand
and the proc pid mem file to work on the executable private hugetlb mappings. There is one thing I am unclear about though. hugetlb enforces that huge_pte_write() is true on FOLL_WRITE in both the fault and follow_page_mask paths. I am not sure if we can simply assume in the hugetlb code

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-25 Thread Guillaume Morin
ptrace and the proc pid mem file to work on the executable private hugetlb mappings. There is one thing I am unclear about though. hugetlb enforces that huge_pte_write() is true on FOLL_WRITE in both the fault and follow_page_mask paths. I am not sure if we can simply assume in the hugetlb cod

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-24 Thread David Hildenbrand
On 24.04.24 22:44, Guillaume Morin wrote: On 24 Apr 22:09, David Hildenbrand wrote: Let me try to see if we can get this done cleaner. One ugly part (in general here) is the custom page replacement in the registration part. We are guaranteed to have a MAP_PRIVATE mapping. Instead of replacing

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-24 Thread Guillaume Morin
On 24 Apr 22:09, David Hildenbrand wrote: > > > Let me try to see if we can get this done cleaner. > > > > > > One ugly part (in general here) is the custom page replacement in the > > > registration part. > > > > > > We are guaranteed to have a MAP_PRIVATE mapping. Instead of replacing > > >

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-24 Thread David Hildenbrand
On 22.04.24 22:53, Guillaume Morin wrote: On 22 Apr 20:59, David Hildenbrand wrote: The benefit - to me - is very clear. People do use hugetlb mappings to run code in production environments. The perf benefits are there for some workloads. Intel has published a whitepaper about it etc. Uprobes

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-22 Thread Guillaume Morin
On 22 Apr 20:59, David Hildenbrand wrote: > > The benefit - to me - is very clear. People do use hugetlb mappings to > > run code in production environments. The perf benefits are there for some > > workloads. Intel has published a whitepaper about it etc. > > Uprobes are a very good tool to do

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-22 Thread David Hildenbrand
wrote: libhugetlbfs, the Intel iodlr code both allow to remap .text onto a hugetlb private mapping. It's also pretty easy to do it manually. One drawback of using this functionality is the lack of support for uprobes (NOTE uprobe ignores shareable vmas) This patch adds support for private hugetlb

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-04-22 Thread Guillaume Morin
Intel iodlr code both allow to remap .text onto a > > hugetlb private mapping. It's also pretty easy to do it manually. > > One drawback of using this functionality is the lack of support for > > uprobes (NOTE uprobe ignores shareable vmas) > > > > This patch adds supp

[PATCH 5.11 125/210] xfrm: Provide private skb extensions for segmented and hw offloaded ESP packets

2021-04-12 Thread Greg Kroah-Hartman
he secpath that is shared amongst segments. This lead to a situation where some segments are not transformed correctly when segmentation happens at layer 3. Fix this by using private skb extensions for segmented and hw offloaded ESP packets. Fixes: 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion

[PATCH 5.10 115/188] xfrm: Provide private skb extensions for segmented and hw offloaded ESP packets

2021-04-12 Thread Greg Kroah-Hartman
he secpath that is shared amongst segments. This lead to a situation where some segments are not transformed correctly when segmentation happens at layer 3. Fix this by using private skb extensions for segmented and hw offloaded ESP packets. Fixes: 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion

[PATCH v7 10/28] mm: Handle per-folio private data

2021-04-09 Thread Matthew Wilcox (Oracle)
Add folio_private() and set_folio_private() which mirror page_private() and set_page_private() -- ie folio private data is the same as page private data. The only difference is that these return a void * instead of an unsigned long, which matches the majority of users. Turn attach_page_private

Re: [PATCH v2 12/21] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc

2021-04-09 Thread Andrew Jeffery
On Fri, 9 Apr 2021, at 13:37, Zev Weiss wrote: > On Fri, Mar 19, 2021 at 01:27:43AM CDT, Andrew Jeffery wrote: > >Move all client-private data out of `struct kcs_bmc` into the KCS client > >implementation. > > > >With this change the KCS BMC core code now only conce

Re: [PATCH v2 12/21] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc

2021-04-08 Thread Zev Weiss
On Fri, Mar 19, 2021 at 01:27:43AM CDT, Andrew Jeffery wrote: >Move all client-private data out of `struct kcs_bmc` into the KCS client >implementation. > >With this change the KCS BMC core code now only concerns itself with >abstract `struct kcs_bmc` and `struct kcs_bmc_client` t

Re: [PATCH v2 1/1] iommu/vt-d: Don't set then clear private data in prq_event_thread()

2021-04-07 Thread Joerg Roedel
On Sat, Mar 20, 2021 at 10:41:56AM +0800, Lu Baolu wrote: > drivers/iommu/intel/svm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks.

Re: [PATCH v6 09/27] mm: Handle per-folio private data

2021-04-06 Thread Christoph Hellwig
On Wed, Mar 31, 2021 at 07:47:10PM +0100, Matthew Wilcox (Oracle) wrote: > Add folio_private() and set_folio_private() which mirror page_private() > and set_page_private() -- ie folio private data is the same as page > private data. The only difference is that these return a void *

[PATCH v6 4/7] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-04-01 Thread Daniel Lezcano
The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure. It is more elegant to use the container_of macro

[PATCH v5 1/6] usb: typec: Organize the private headers properly

2021-04-01 Thread Heikki Krogerus
Adding a header file for each subsystem - the connector class, alt mode bus and the class for the muxes. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/bus.c | 2 ++ drivers/usb/typec/bus.h | 19 +- drivers/usb/typec/class.c | 69 +++

[PATCH v2 0/2] staging: rtl8723bs: replace private macro with print_hex_dump_debug

2021-04-01 Thread Fabio Aiuto
this patchset replaces RT_PRINT_DATA private macro for dump hex values with the kernel helper used for this pourpose. - Changes in v2: - removed the do-nothing macro declaration as well Fabio Aiuto (2): staging: rtl8723bs: use print_hex_dump_debug

[PATCH v2 1/2] staging: rtl8723bs: use print_hex_dump_debug instead of private RT_PRINT_DATA

2021-04-01 Thread Fabio Aiuto
replace private macro RT_PRINT_DATA with in-kernel helper print_hex_dump_debug Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/hal/hal_com.c | 13 --- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 22 ++- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c

Re: [PATCH 0/2] staging: rtl8723bs: replace private macro with print_hex_dump_debug

2021-04-01 Thread Fabio Aiuto
On Wed, Mar 31, 2021 at 11:34:05AM +0200, Fabio Aiuto wrote: > this patchset replaces RT_PRINT_DATA private macro for dump hex values > with the kernel helper used for this pourpose. > > Fabio Aiuto (2): > staging: rtl8723bs: use print_hex_dump_debug instead of private >

[PATCH v4 1/6] usb: typec: Organize the private headers properly

2021-04-01 Thread Heikki Krogerus
Adding a header file for each subsystem - the connector class, alt mode bus and the class for the muxes. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/bus.c | 2 ++ drivers/usb/typec/bus.h | 19 +- drivers/usb/typec/class.c | 69 +++

[PATCH v6 09/27] mm: Handle per-folio private data

2021-03-31 Thread Matthew Wilcox (Oracle)
Add folio_private() and set_folio_private() which mirror page_private() and set_page_private() -- ie folio private data is the same as page private data. The only difference is that these return a void * instead of an unsigned long, which matches the majority of users. Turn attach_page_private

[PATCH v5 4/5] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-03-31 Thread Daniel Lezcano
The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure. It is more elegant to use the container_of macro

[PATCH v3 1/6] usb: typec: Organize the private headers properly

2021-03-31 Thread Heikki Krogerus
Adding a header file for each subsystem - the connector class, alt mode bus and the class for the muxes. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/bus.c | 2 ++ drivers/usb/typec/bus.h | 19 +- drivers/usb/typec/class.c | 69 +++

[PATCH 00/40] staging: rtl8723bs: replace RT_TRACE private macro

2021-03-31 Thread Fabio Aiuto
this patchset replace all RT_TRACE usages with public log functions used for this pourpose Fabio Aiuto (40): staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_xmit.c staging: rtl8723bs: replace RT_TRACE with public printk wrappers in core/rtw_security.c

[PATCH 1/2] staging: rtl8723bs: use print_hex_dump_debug instead of private RT_PRINT_DATA

2021-03-31 Thread Fabio Aiuto
replace private macro RT_PRINT_DATA with in-kernel helper print_hex_dump_debug Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/hal/hal_com.c | 13 --- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 22 ++- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c

[PATCH 0/2] staging: rtl8723bs: replace private macro with print_hex_dump_debug

2021-03-31 Thread Fabio Aiuto
this patchset replaces RT_PRINT_DATA private macro for dump hex values with the kernel helper used for this pourpose. Fabio Aiuto (2): staging: rtl8723bs: use print_hex_dump_debug instead of private RT_PRINT_DATA staging: rtl8723bs: remove unused macro RT_PRINT_DATA drivers/staging

[PATCH v2 1/6] usb: typec: Organize the private headers properly

2021-03-29 Thread Heikki Krogerus
Adding a header file for each subsystem - the connector class, alt mode bus and the class for the muxes. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/bus.c | 2 ++ drivers/usb/typec/bus.h | 19 +- drivers/usb/typec/class.c | 69 +++

[PATCH 2/6] usb: typec: Organize the private headers properly

2021-03-25 Thread Heikki Krogerus
Adding a header file for each subsystem - the connector class, alt mode bus and the class for the muxes. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/bus.c | 2 ++ drivers/usb/typec/bus.h | 19 +- drivers/usb/typec/class.c | 69 +++

RE: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-22 Thread Stefan Chulski
> > CM3 won't use this interface till ethtool priv flag was set, it can be done > > by > communication over CM3 SRAM memory. > > > > > How does CM3 know the status of the link? > > > > CM3 has access to MAC registers and can read port status bit. > > > > > How does CM3 set its > > > flow control

Re: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-22 Thread Andrew Lunn
On Mon, Mar 22, 2021 at 03:59:43PM +, Stefan Chulski wrote: > > > > 2. CM3 code has very small footprint requirement, we cannot > > > implement the complete Serdes and PHY infrastructure that kernel > > > provides as part of CM3 application. Therefore I would like to > > > continue relying

RE: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-22 Thread Stefan Chulski
> > 2. CM3 code has very small footprint requirement, we cannot > > implement the complete Serdes and PHY infrastructure that kernel > > provides as part of CM3 application. Therefore I would like to > > continue relying on kernel configuration for that. > > How can that work? How does Linux

[PATCH] staging: rtl8188eu: use netdev routines for private data

2021-03-21 Thread Martin Kaiser
This driver implements its own routines to allocate, access and free the private data of its net_device. Use the functionality from the networking core instead. Signed-off-by: Martin Kaiser --- drivers/staging/rtl8188eu/core/rtw_debug.c| 8 +- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c

[PATCH v5 11/27] mm: Handle per-folio private data

2021-03-19 Thread Matthew Wilcox (Oracle)
Add folio_private() and set_folio_private() which mirror page_private() and set_page_private() -- ie folio private data is the same as page private data. The only difference is that these return a void * instead of an unsigned long, which matches the majority of users. Turn attach_page_private

[PATCH v2 1/1] iommu/vt-d: Don't set then clear private data in prq_event_thread()

2021-03-19 Thread Lu Baolu
The VT-d specification (section 7.6) requires that the value in the Private Data field of a Page Group Response Descriptor must match the value in the Private Data field of the respective Page Request Descriptor. The private data field of a page group response descriptor is set then immediately

[PATCH v2 12/21] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc

2021-03-19 Thread Andrew Jeffery
Move all client-private data out of `struct kcs_bmc` into the KCS client implementation. With this change the KCS BMC core code now only concerns itself with abstract `struct kcs_bmc` and `struct kcs_bmc_client` types, achieving expected separation of concerns. Further, the change clears the path

Re: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-18 Thread Andrew Lunn
> 2. CM3 code has very small footprint requirement, we cannot > implement the complete Serdes and PHY infrastructure that kernel > provides as part of CM3 application. Therefore I would like to > continue relying on kernel configuration for that. How can that work? How does Linux know when CM3

Re: [PATCH v4 08/25] mm: Handle per-folio private data

2021-03-18 Thread Matthew Wilcox
a tail pointer cast to a folio is not going to get very far, assuming CONFIG_DEBUG_VM_PGFLAGS is enabled (most distros don't, but I do when I'm testing anything THPish). These helpers aren't going to live for very long ... I expect to have all filesystems which use attach/detach page private converted to foli

Re: [PATCH] memcg: set page->private before calling swap_readpage

2021-03-18 Thread Michal Hocko
On Thu 18-03-21 11:02:17, Johannes Weiner wrote: > On Thu, Mar 18, 2021 at 03:01:25PM +0100, Michal Hocko wrote: > > On Wed 17-03-21 18:59:59, Shakeel Butt wrote: > > > The function swap_readpage() (and other functions it call) extracts swap > > > entry

Re: [PATCH] memcg: set page->private before calling swap_readpage

2021-03-18 Thread Johannes Weiner
On Wed, Mar 17, 2021 at 06:59:59PM -0700, Shakeel Butt wrote: > The function swap_readpage() (and other functions it call) extracts swap > entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel > skips the swapcache and thus we need to manually set the page->private

Re: [PATCH] memcg: set page->private before calling swap_readpage

2021-03-18 Thread Johannes Weiner
On Thu, Mar 18, 2021 at 03:01:25PM +0100, Michal Hocko wrote: > On Wed 17-03-21 18:59:59, Shakeel Butt wrote: > > The function swap_readpage() (and other functions it call) extracts swap > > entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel > > skips t

Re: [PATCH] memcg: set page->private before calling swap_readpage

2021-03-18 Thread Michal Hocko
On Wed 17-03-21 18:59:59, Shakeel Butt wrote: > The function swap_readpage() (and other functions it call) extracts swap > entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel > skips the swapcache and thus we need to manually set the page->private > with the

Re: [PATCH] memcg: set page->private before calling swap_readpage

2021-03-18 Thread Heiko Carstens
On Wed, Mar 17, 2021 at 06:59:59PM -0700, Shakeel Butt wrote: > The function swap_readpage() (and other functions it call) extracts swap > entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel > skips the swapcache and thus we need to manually set the page->private

[PATCH] memcg: set page->private before calling swap_readpage

2021-03-17 Thread Shakeel Butt
The function swap_readpage() (and other functions it call) extracts swap entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel skips the swapcache and thus we need to manually set the page->private with the swap entry before calling swap_readpage(). Signed-off-by: Shakee

Re: [PATCH v4 08/25] mm: Handle per-folio private data

2021-03-17 Thread Christoph Hellwig
> +static inline void attach_page_private(struct page *page, void *data) > +{ > + attach_folio_private((struct folio *)page, data); > +} > + > +static inline void *detach_page_private(struct page *page) > +{ > + return detach_folio_private((struct folio *)page); > +} I hate these open

Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private

2021-03-16 Thread sundeep subbaraya
gt; > > > From: Subbaraya Sundeep > > > > > > > > Memory for driver private structure rvu_devlink is > > > > also allocated during devlink_alloc. Hence use > > > > the allocated memory by devlink_alloc and access it > > > > by devlink_priv call.

Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private

2021-03-16 Thread Jakub Kicinski
On Tue, 16 Mar 2021 23:33:40 +0530 sundeep subbaraya wrote: > On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski wrote: > > > > On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote: > > > From: Subbaraya Sundeep > > > > > > Memory for driver p

Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private

2021-03-16 Thread sundeep subbaraya
Hi Jakub, On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski wrote: > > On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote: > > From: Subbaraya Sundeep > > > > Memory for driver private structure rvu_devlink is > > also allocated during devlink_alloc. Henc

Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private

2021-03-16 Thread Jakub Kicinski
On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote: > From: Subbaraya Sundeep > > Memory for driver private structure rvu_devlink is > also allocated during devlink_alloc. Hence use > the allocated memory by devlink_alloc and access it > by devlink_priv call. &g

RE: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-16 Thread Stefan Chulski
> I really, really hope that someone has thought this through: > > Packet Processor I/O Interface (PPIO) > >The MUSDK PPIO driver provides low-level network interface API for >User-Space network drivers/applications. The PPIO infrastrcuture maps >Marvell's Packet Processor (PPv2)

Re: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-16 Thread Russell King - ARM Linux admin
On Tue, Mar 16, 2021 at 03:28:51PM +, Stefan Chulski wrote: > No XDP doesn't require this. One of the use cases of the port reservation > feature is the Marvell User Space SDK (MUSDK) which its latest code is > publicly available here: >

RE: [EXT] Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-16 Thread Stefan Chulski
DP capable drivers having a > flag like this. If this was required, i would expect it to be a common > properly, > not driver private. No XDP doesn't require this. One of the use cases of the port reservation feature is the Marvell User Space SDK (MUSDK) which its latest c

[PATCH v7 35/38] firmware: arm_scmi: make notify_priv really private

2021-03-16 Thread Cristian Marussi
Notification private data is currently accessible via handle->notify_priv; this data was indeed meant to be private to the notification core support and not to be accessible by SCMI drivers: make it private hiding it inside instance descriptor struct scmi_info and accessible only via dedica

[net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private

2021-03-16 Thread Hariprasad Kelam
From: Subbaraya Sundeep Memory for driver private structure rvu_devlink is also allocated during devlink_alloc. Hence use the allocated memory by devlink_alloc and access it by devlink_priv call. Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver") Signed-off-by: Subbara

[PATCH v2 04/24] x86/resctrl: Pass the schema in info dir's private pointer

2021-03-12 Thread James Morse
means the type of the private pointers varies between control and monitor info dirs. If the flags are RF_MON_INFO, its a struct rdt_resource. If the flags are RF_CTRL_INFO, its a struct resctrl_schema. Nothing in res_common_files[] has both flags. Reviewed-by: Jamie Iles Signed-off-by: James Morse

Re: [PATCH 05/24] x86/resctrl: Pass the schema in resdir's private pointer

2021-03-12 Thread James Morse
eflect the >> right level of information. >> >> For the info dirs that represent a control, the information needed >> is in the schema, as this is how the resource is being used. For the >> monitors, its the resource as L3CODE_MON doesn't make sense, and would >>

[PATCH v4 4/5] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-03-12 Thread Daniel Lezcano
The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure. It is more elegant to use the container_of macro

Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-11 Thread Jakub Kicinski
On Thu, 11 Mar 2021 18:43:27 +0200 stef...@marvell.com wrote: > According to Armada SoC architecture and design, all the PPv2 ports > which are populated on the same communication processor silicon die > (CP11x) share the same Classifier and Parser engines. > > Armada is an embedded platform and

Re: [V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-11 Thread Andrew Lunn
e port, and the DT for the CM3 does. Linux never sees the port, since Linux should not be using it. > or by user-space data plane application. You mean XDP/AF_XDP? I don't see any other XDP capable drivers having a flag like this. If this was required, i would expect it to be a co

[V2 net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-11 Thread stefanc
VED BIT(2) /* Marvell tag types */ enum mvpp2_tag_type { @@ -1251,6 +1252,9 @@ struct mvpp2_port { /* Firmware TX flow control */ bool tx_fc; + + /* private storage, allocated/used by Reserved/Normal mode toggling */ + void *res_cfg; }; /* The mvpp2_tx_d

RE: [EXT] Re: [net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-11 Thread Stefan Chulski
> > From: Stefan Chulski > > > > According to Armada SoC architecture and design, all the PPv2 ports > > which are populated on the same communication processor silicon die > > (CP11x) share the same Classifier and Parser engines. > > > > Armada is an embedded platform and therefore there is a

Re: [net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-10 Thread Russell King - ARM Linux admin
On Wed, Mar 10, 2021 at 11:42:09AM +0200, stef...@marvell.com wrote: > From: Stefan Chulski > > According to Armada SoC architecture and design, all the PPv2 ports > which are populated on the same communication processor silicon die > (CP11x) share the same Classifier and Parser engines. > >

Re: [EXT] Re: [net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-10 Thread Andrew Lunn
> Make it patch series? I can split it to 2/3 patches. I don't think that will be needed. The helpers should be pretty obvious. Andrew

RE: [EXT] Re: [net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-10 Thread Stefan Chulski
> k...@kernel.org; li...@armlinux.org.uk; m...@semihalf.com; > rmk+ker...@armlinux.org.uk; aten...@kernel.org; rab...@solid-run.com > Subject: [EXT] Re: [net-next] net: mvpp2: Add reserved port private flag > configuration > > External Email > > --

Re: [net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-10 Thread Andrew Lunn
> static void mvpp2_ethtool_get_strings(struct net_device *netdev, u32 sset, > u8 *data) > { > struct mvpp2_port *port = netdev_priv(netdev); > int i, q; > > - if (sset != ETH_SS_STATS) > - return; > + switch (sset) { > +

[PATCH v3 4/5] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-03-10 Thread Daniel Lezcano
The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure. It is more elegant to use the container_of macro

[net-next] net: mvpp2: Add reserved port private flag configuration

2021-03-10 Thread stefanc
MVPP22_F_IF_RESERVED BIT(2) /* Marvell tag types */ enum mvpp2_tag_type { @@ -1251,6 +1252,9 @@ struct mvpp2_port { /* Firmware TX flow control */ bool tx_fc; + + /* private storage, allocated/used by Reserved/Normal mode toggling */ + void *res_cfg

[PATCH v2 4/5] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-03-09 Thread Daniel Lezcano
The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure. It is more elegant to use the container_of macro

Re: [PATCH 4/5] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-03-09 Thread Lukasz Luba
On 3/1/21 9:21 PM, Daniel Lezcano wrote: The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure

Re: [PATCH v6 35/37] firmware: arm_scmi: make notify_priv really private

2021-03-08 Thread Cristian Marussi
On Mon, Mar 08, 2021 at 06:12:29AM +, Sudeep Holla wrote: > On Tue, Feb 02, 2021 at 10:15:53PM +, Cristian Marussi wrote: > > Notification private data is currently accessible via handle->notify_priv; > > this data was indeed meant to be private to the notific

Re: [PATCH v6 35/37] firmware: arm_scmi: make notify_priv really private

2021-03-07 Thread Sudeep Holla
On Tue, Feb 02, 2021 at 10:15:53PM +, Cristian Marussi wrote: > Notification private data is currently accessible via handle->notify_priv; > this data was indeed meant to be private to the notification core support > and not to be accessible by SCMI drivers: make it private hidi

[PATCH v4 08/25] mm: Handle per-folio private data

2021-03-04 Thread Matthew Wilcox (Oracle)
Add folio_private() and set_folio_private() which mirror page_private() and set_page_private() -- ie folio private data is the same as page private data. Turn attach_page_private() into attach_folio_private() and reimplement attach_page_private() as a wrapper. No filesystem which uses page

[PATCH 4/5] powercap/drivers/dtpm: Use container_of instead of a private data field

2021-03-01 Thread Daniel Lezcano
The dtpm framework provides an API to allocate a dtpm node. However when a backend dtpm driver needs to allocate a dtpm node it must define its own structure and store the pointer of this structure in the private field of the dtpm structure. It is more elegant to use the container_of macro

[PATCH 5.11 455/775] svcrdma: Hold private mutex while invoking rdma_accept()

2021-03-01 Thread Greg Kroah-Hartman
sc_cm_id->event_handler = svc_rdma_cma_handler; - /* Construct RDMA-CM private message */ pmsg.cp_magic = rpcrdma_cmp_magic; pmsg.cp_version = RPCRDMA_CMP_VERSION; @@ -498,7 +495,10 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) }

[PATCH 5.10 296/663] dmaengine: idxd: set DMA channel to be private

2021-03-01 Thread Greg Kroah-Hartman
From: Dave Jiang [ Upstream commit c06e424be5f5184468c5f761c0d2cf1ed0a4e0fc ] Add DMA_PRIVATE attribute flag to idxd DMA channels. The dedicated WQs are expected to be used by a single client and not shared. While doing NTB testing this mistake was discovered, which prevented ntb_transport from

[PATCH 5.11 350/775] dmaengine: idxd: set DMA channel to be private

2021-03-01 Thread Greg Kroah-Hartman
From: Dave Jiang [ Upstream commit c06e424be5f5184468c5f761c0d2cf1ed0a4e0fc ] Add DMA_PRIVATE attribute flag to idxd DMA channels. The dedicated WQs are expected to be used by a single client and not shared. While doing NTB testing this mistake was discovered, which prevented ntb_transport from

[PATCH 5.10 374/663] svcrdma: Hold private mutex while invoking rdma_accept()

2021-03-01 Thread Greg Kroah-Hartman
sc_cm_id->event_handler = svc_rdma_cma_handler; - /* Construct RDMA-CM private message */ pmsg.cp_magic = rpcrdma_cmp_magic; pmsg.cp_version = RPCRDMA_CMP_VERSION; @@ -498,7 +495,10 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) }

[PATCH V4 08/18] iommu/ioasid: Introduce ioasid_set private ID

2021-02-27 Thread Jacob Pan
When an IOASID set is used for guest SVA, each VM will acquire its ioasid_set for IOASID allocations. IOASIDs within the VM must have a host/physical IOASID backing, mapping between guest and host IOASIDs can be non-identical. IOASID set private ID (SPID) is introduced in this patch to be used

[PATCH 4.9 08/49] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 4.4 06/35] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 4.14 09/57] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 12/19] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc

2021-02-19 Thread Andrew Jeffery
Move all client-private data out of `struct kcs_bmc` into the KCS client implementation. With this change the KCS BMC core code now only concerns itself with abstract `struct kcs_bmc` and `struct kcs_bmc_client` types, achieving expected separation of concerns. Further, the change clears the path

[PATCH v6 22/24] tools: iio: make iioutils_get_type() private in iio_utils

2021-02-15 Thread Alexandru Ardelean
This is a bit of a tidy-up, but also helps with extending the iioutils_get_type() function a bit, as we don't need to use it outside of the iio_utils.c file. So, we'll need to update it only in one place. With this change, the 'unsigned' types are updated to 'unsigned int' in the

[PATCH 5.10 39/54] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-11 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 5.4 15/24] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-11 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH 4.19 14/24] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-11 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file

[PATCH v5 15/17] tools: iio: make iioutils_get_type() private in iio_utils

2021-02-11 Thread Alexandru Ardelean
This is a bit of a tidy-up, but also helps with extending the iioutils_get_type() function a bit, as we don't need to use it outside of the iio_utils.c file. So, we'll need to update it only in one place. With this change, the 'unsigned' types are updated to 'unsigned int' in the

Re: [PATCH 1/9] mm/migrate.c: Always allow device private pages to migrate

2021-02-10 Thread Jason Gunthorpe
On Wed, Feb 10, 2021 at 02:40:10PM +1100, Alistair Popple wrote: > On Wednesday, 10 February 2021 12:39:32 AM AEDT Jason Gunthorpe wrote: > > On Tue, Feb 09, 2021 at 12:07:14PM +1100, Alistair Popple wrote: > > > Device private pages are used to represent device memory that is

[PATCH v4 15/17] tools: iio: make iioutils_get_type() private in iio_utils

2021-02-10 Thread Alexandru Ardelean
This is a bit of a tidy-up, but also helps with extending the iioutils_get_type() function a bit, as we don't need to use it outside of the iio_utils.c file. So, we'll need to update it only in one place. With this change, the 'unsigned' types are updated to 'unsigned int' in the

  1   2   3   4   5   6   7   8   9   10   >