Re: [PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-09 Thread Michael Ellerman
Nathan Lynch writes: > Michael Ellerman writes: >> Nathan Lynch via B4 Submission Endpoint >> writes: ... >>> +struct rtas_work_area * __ref rtas_work_area_alloc(size_t size) >>> +{ >>> + struct rtas_work_area *area; >>> + unsigned long addr; >>> + >>> + might_sleep(); >>> + >>> + WARN_O

Re: [PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-08 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch via B4 Submission Endpoint > writes: >> diff --git a/arch/powerpc/include/asm/rtas-work-area.h >> b/arch/powerpc/include/asm/rtas-work-area.h >> new file mode 100644 >> index ..76ccb039cc37 >> --- /dev/null >> +++ b/arch/powerpc/include/asm/rta

Re: [PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-08 Thread Michael Ellerman
Nathan Lynch via B4 Submission Endpoint writes: > diff --git a/arch/powerpc/include/asm/rtas-work-area.h > b/arch/powerpc/include/asm/rtas-work-area.h > new file mode 100644 > index ..76ccb039cc37 > --- /dev/null > +++ b/arch/powerpc/include/asm/rtas-work-area.h > @@ -0,0 +1,45 @@ > +

[PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Most callers of RTAS functions that take a temporary "work area" parameter use the statically allocated rtas_data_buf buffer as the argument. This buffer is protected by a global spinlock. So users of rtas_data_buf cannot perform sleeping operations while accessing the buffer.