Re: [PATCH v6 0/7] treewide cleanup of random integer usage

2022-10-11 Thread Jakub Kicinski
On Mon, 10 Oct 2022 17:06:06 -0600 Jason A. Donenfeld wrote: > - If you want a secure or an insecure random u64, use get_random_u64(). > - If you want a secure or an insecure random u32, use get_random_u32(). > * The old function prandom_u32() has been deprecated for a while now > and is

[PATCH 2/2] powerpc: move sync_file_range2 compat definition

2022-10-11 Thread Nicholas Piggin
sync_file_range2 is not a special unaligned-odd-pair calling convention syscall, it's just a regular one that does not have a generic compat definition. Move it out of sys_ppc32.c and into syscalls.c. Signed-off-by: Nicholas Piggin --- This one doesn't fix anything and is not required for the

[PATCH 1/2] powerpc/32: fix syscall wrappers with 64-bit arguments of unaligned register-pairs

2022-10-11 Thread Nicholas Piggin
powerpc 32-bit system call (and function) calling convention for 64-bit arguments requires the next available odd-pair (two sequential registers with the first being odd-numbered) from the standard register argument allocation. The first argument register is r3, so a 64-bit argument that appears

[PATCH v2] soc: fsl: qe: Add check for ioremap

2022-10-11 Thread Jiasheng Jiang
As ioremap can return NULL pointer, it should be better to check the return value return error if fails. Moreover, the return value of qe_reset should be checked by cascade. Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for TDM mode") Suggested-by: Christophe Leroy Signed-off-by:

Re: [PATCH v2] soc: fsl: qe: Add check for ioremap

2022-10-11 Thread Christophe Leroy
Le 11/10/2022 à 08:32, Jiasheng Jiang a écrit : > As ioremap can return NULL pointer, it should > be better to check the return value return error > if fails. > Moreover, the return value of qe_reset should be > checked by cascade. > > Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for

Re: [PATCH v2] perf: Rewrite core context handling

2022-10-11 Thread Peter Zijlstra
On Tue, Oct 11, 2022 at 06:49:55PM +0530, Ravi Bangoria wrote: > On 11-Oct-22 4:59 PM, Peter Zijlstra wrote: > > On Sat, Oct 08, 2022 at 11:54:24AM +0530, Ravi Bangoria wrote: > > > >> +static void perf_event_swap_task_ctx_data(struct perf_event_context > >> *prev_ctx, > >> +

Re: [PATCH v6 4/7] treewide: use get_random_{u8,u16}() when possible, part 2

2022-10-11 Thread Heiko Carstens
On Mon, Oct 10, 2022 at 05:06:10PM -0600, Jason A. Donenfeld wrote: > Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value, > simply use the get_random_{u8,u16}() functions, which are faster than > wasting the additional bytes from a 32-bit value. This was done by hand, >

Re: [PATCH v6 5/7] treewide: use get_random_u32() when possible

2022-10-11 Thread Heiko Carstens
On Mon, Oct 10, 2022 at 05:06:11PM -0600, Jason A. Donenfeld wrote: > The prandom_u32() function has been a deprecated inline wrapper around > get_random_u32() for several releases now, and compiles down to the > exact same code. Replace the deprecated wrapper with a direct call to > the real

Re: [PATCH v2] perf: Rewrite core context handling

2022-10-11 Thread Ravi Bangoria
On 11-Oct-22 4:59 PM, Peter Zijlstra wrote: > On Sat, Oct 08, 2022 at 11:54:24AM +0530, Ravi Bangoria wrote: > >> +static void perf_event_swap_task_ctx_data(struct perf_event_context >> *prev_ctx, >> + struct perf_event_context *next_ctx) >> +{ >> +struct

Re: [PATCH v6 1/7] treewide: use prandom_u32_max() when possible, part 1

2022-10-11 Thread Heiko Carstens
On Mon, Oct 10, 2022 at 05:06:07PM -0600, Jason A. Donenfeld wrote: > Rather than incurring a division or requesting too many random bytes for > the given range, use the prandom_u32_max() function, which only takes > the minimum required bytes from the RNG and avoids divisions. This was ... >

Re: [PATCH v3] powerpc/pseries/vas: Add VAS IRQ primary handler

2022-10-11 Thread Frederic Barrat
On 10/10/2022 05:41, Haren Myneni wrote: irq_default_primary_handler() can be used only with IRQF_ONESHOT flag, but the flag disables IRQ before executing the thread handler and enables it after the interrupt is handled. But this IRQ disable sets the VAS IRQ OFF state in the hypervisor. In

Re: [PATCH] powerpc/kasan/book3s_64: warn when running with hash MMU

2022-10-11 Thread Michael Ellerman
Nathan Lynch writes: > Michael Ellerman writes: >> Christophe Leroy writes: >>> + KASAN list >>> >>> Le 06/10/2022 à 06:10, Michael Ellerman a écrit : Nathan Lynch writes: > kasan is known to crash at boot on book3s_64 with non-radix MMU. As > noted in commit 41b7a347bf14

[PATCH v3] soc: fsl: qe: Add check for ioremap

2022-10-11 Thread Jiasheng Jiang
As ioremap can return NULL pointer, it should be better to check the return value return error if fails. Moreover, the return value of qe_reset should be checked by cascade. Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for TDM mode") Suggested-by: Christophe Leroy Signed-off-by:

Re: [PATCH v2] perf: Rewrite core context handling

2022-10-11 Thread Peter Zijlstra
On Sat, Oct 08, 2022 at 11:54:24AM +0530, Ravi Bangoria wrote: > +static void perf_event_swap_task_ctx_data(struct perf_event_context > *prev_ctx, > + struct perf_event_context *next_ctx) > +{ > + struct perf_event_pmu_context *prev_epc, *next_epc; > + >

Re: [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers

2022-10-11 Thread Javier Martinez Canillas
Hello Thomas, On 9/28/22 12:50, Thomas Zimmermann wrote: > All DRM formats assume little-endian byte order. On big-endian systems, > it is likely that the scanout buffer is in big endian as well. Update You say it is likely, not always then? Does it depend on whether the Open Firmware is BE or

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-11 Thread Michael Ellerman
"Jason A. Donenfeld" writes: > On Tue, Oct 11, 2022 at 12:44:20PM +1100, Michael Ellerman wrote: >> "Jason A. Donenfeld" writes: >> > Hi Andrew, >> > >> > On Tue, Oct 11, 2022 at 11:00:15AM +1100, Andrew Donnellan wrote: >> >> Thanks for bisecting, this is interesting! Could you provide your >>

Re: [PATCH] powerpc/kasan/book3s_64: warn when running with hash MMU

2022-10-11 Thread Christophe Leroy
Le 11/10/2022 à 12:00, Michael Ellerman a écrit : > Nathan Lynch writes: >> Michael Ellerman writes: >>> Christophe Leroy writes: + KASAN list Le 06/10/2022 à 06:10, Michael Ellerman a écrit : > Nathan Lynch writes: >> kasan is known to crash at boot on book3s_64 with

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-11 Thread Nicholas Piggin
On Tue Oct 11, 2022 at 7:35 PM AEST, Michael Ellerman wrote: > "Jason A. Donenfeld" writes: > > On Tue, Oct 11, 2022 at 12:53:17PM +1100, Michael Ellerman wrote: > >> "Jason A. Donenfeld" writes: > >> > On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote: > >> >> Hi Michael, > >>

Re: [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers

2022-10-11 Thread Thomas Zimmermann
Hi Am 11.10.22 um 09:46 schrieb Javier Martinez Canillas: Hello Thomas, On 9/28/22 12:50, Thomas Zimmermann wrote: All DRM formats assume little-endian byte order. On big-endian systems, it is likely that the scanout buffer is in big endian as well. Update You say it is likely, not always

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-11 Thread Michael Ellerman
"Jason A. Donenfeld" writes: > On Tue, Oct 11, 2022 at 12:53:17PM +1100, Michael Ellerman wrote: >> "Jason A. Donenfeld" writes: >> > On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote: >> >> Hi Michael, >> >> >> >> On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman

[PATCH v5 4/5] drm/ofdrm: Support color management

2022-10-11 Thread Thomas Zimmermann
Support the CRTC's color-management property and implement each model's palette support. The OF hardware has different methods of setting the palette. The respective code has been taken from fbdev's offb and refactored into per-model device functions. The device functions integrate this

[PATCH v5 3/5] drm/ofdrm: Add per-model device function

2022-10-11 Thread Thomas Zimmermann
Add a per-model device-function structure in preparation of adding color-management support. Detection of the individual models has been taken from fbdev's offb. v3: * define constants for PCI ids (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas ---

Re: [RFC PATCH 0/5] Generic IPI sending tracepoint

2022-10-11 Thread Valentin Schneider
On 11/10/22 18:22, Daniel Bristot de Oliveira wrote: > On 10/11/22 18:17, Valentin Schneider wrote: >> Thinking out loud, it makes way more sense to record a cpumask in the >> tracepoint, but perhaps we could have a postprocessing step to transform >> those into N events each targeting a single

Re: [RFC PATCH 4/5] irq_work: Trace calls to arch_irq_work_raise()

2022-10-11 Thread Valentin Schneider
On 08/10/22 15:34, Steven Rostedt wrote: > On Fri, 7 Oct 2022 16:45:32 +0100 > Valentin Schneider wrote: >> } >> >> +static inline void irq_work_raise(void) >> +{ >> +if (arch_irq_work_has_interrupt()) >> +trace_ipi_send_cpu(_RET_IP_, smp_processor_id()); > > To save on the

[PATCH v5 2/5] drm/ofdrm: Add CRTC state

2022-10-11 Thread Thomas Zimmermann
Add a dedicated CRTC state to ofdrm to later store information for palette updates. v3: * rework CRTC state helpers (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tiny/ofdrm.c | 59 ++-- 1 file

[PATCH v5 0/5] drm: Add driver for PowerPC OF displays

2022-10-11 Thread Thomas Zimmermann
PowerPC's Open Firmware offers a simple display buffer for graphics output. Add ofdrm, a DRM driver for the device. As with the existing simpledrm driver, the graphics hardware is pre-initialized by the firmware. The driver only provides blitting, no actual DRM modesetting is possible. Patch 1

Re: [RFC PATCH 0/5] Generic IPI sending tracepoint

2022-10-11 Thread Daniel Bristot de Oliveira
On 10/11/22 18:17, Valentin Schneider wrote: > Thinking out loud, it makes way more sense to record a cpumask in the > tracepoint, but perhaps we could have a postprocessing step to transform > those into N events each targeting a single CPU? My approach on the tracers/rtla is to make the simple

[PATCH v5 1/5] drm/ofdrm: Add ofdrm for Open Firmware framebuffers

2022-10-11 Thread Thomas Zimmermann
Open Firmware provides basic display output via the 'display' node. DT platform code already provides a device that represents the node's framebuffer. Add a DRM driver for the device. The display mode and color format is pre-initialized by the system's firmware. Runtime modesetting via DRM is not

Re: [RFC PATCH 0/5] Generic IPI sending tracepoint

2022-10-11 Thread Valentin Schneider
+Cc Douglas On 07/10/22 17:01, Marcelo Tosatti wrote: > Hi Valentin, > > On Fri, Oct 07, 2022 at 04:41:40PM +0100, Valentin Schneider wrote: >> Background >> == >> >> As for the targeted CPUs, the existing tracepoint does export them, albeit in >> cpumask form, which is quite

[PATCH v5 5/5] drm/ofdrm: Support big-endian scanout buffers

2022-10-11 Thread Thomas Zimmermann
All DRM formats assume little-endian byte order. On big-endian systems, it is likely that the scanout buffer is in big endian as well. Update the format accordingly and add endianess conversion to the format-helper library. Also opt-in to allocated buffers in host format by default. Suggested-by:

Re: [PATCH v2] perf: Rewrite core context handling

2022-10-11 Thread Peter Zijlstra
On Tue, Oct 11, 2022 at 04:02:56PM +0200, Peter Zijlstra wrote: > On Tue, Oct 11, 2022 at 06:49:55PM +0530, Ravi Bangoria wrote: > > On 11-Oct-22 4:59 PM, Peter Zijlstra wrote: > > > On Sat, Oct 08, 2022 at 11:54:24AM +0530, Ravi Bangoria wrote: > > > > > >> +static void

Re: [PATCH] powerpc: Fix 85xx build

2022-10-11 Thread Linus Torvalds
On Mon, Oct 10, 2022 at 8:59 PM Joel Stanley wrote: > > The merge of the kbuild tree dropped the renaming of the FSL_BOOKE > kconfig option. Thanks. Mea culpa. Applied, Linus

Re: [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers

2022-10-11 Thread Arnd Bergmann
On Tue, Oct 11, 2022, at 1:30 PM, Thomas Zimmermann wrote: > Am 11.10.22 um 09:46 schrieb Javier Martinez Canillas: >>> +static bool display_get_big_endian_of(struct drm_device *dev, struct >>> device_node *of_node) >>> +{ >>> + bool big_endian; >>> + >>> +#ifdef __BIG_ENDIAN >>> + big_endian

Re: [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers

2022-10-11 Thread Michal Suchánek
On Tue, Oct 11, 2022 at 10:06:59PM +0200, Arnd Bergmann wrote: > On Tue, Oct 11, 2022, at 1:30 PM, Thomas Zimmermann wrote: > > Am 11.10.22 um 09:46 schrieb Javier Martinez Canillas: > >>> +static bool display_get_big_endian_of(struct drm_device *dev, struct > >>> device_node *of_node) > >>> +{ >

Re: [RFC PATCH 0/5] Generic IPI sending tracepoint

2022-10-11 Thread Steven Rostedt
On Tue, 11 Oct 2022 17:17:04 +0100 Valentin Schneider wrote: > tep_get_field_val() just yields an unsigned long long of value 0x200018, > which AFAICT is just the [length, offset] thing associated with dynamic > arrays. Not really usable, and I don't see anything exported in the lib to > extract

Re: [PATCH v4 11/16] objtool: Add --mnop as an option to --mcount

2022-10-11 Thread Josh Poimboeuf
On Mon, Oct 10, 2022 at 05:07:46PM +0530, Naveen N. Rao wrote: > > +++ b/scripts/Makefile.lib > > @@ -234,6 +234,7 @@ objtool_args = > > \ > > $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \ > > $(if

Re: [RFC PATCH 0/5] Generic IPI sending tracepoint

2022-10-11 Thread Steven Rostedt
On Tue, 11 Oct 2022 17:40:26 +0100 Valentin Schneider wrote: > > You could keep the tracepoint as a mask, and then make it pretty, like > > cpus=3-5,8 > > in user-space. For example with a trace-cmd/perf loadable plugin, > > libtracefs helper. > > > > That's a nice idea, the one downside I