Re: [PATCH v5 09/44] drm: handle HAS_IOPORT dependencies

2023-05-22 Thread Arnd Bergmann
On Mon, May 22, 2023, at 14:38, Thomas Zimmermann wrote: > Am 22.05.23 um 12:50 schrieb Niklas Schnelle: >> There is also a direct and hard coded use in cirrus.c which according to >> the comment is only necessary during resume. Let's just skip this as >> for example s390 which doesn't have I/O p

Re: [PATCH 00/20] x86: address -Wmissing-prototype warnings

2023-05-19 Thread Arnd Bergmann
On Thu, May 18, 2023, at 23:56, Dave Hansen wrote: > On 5/16/23 12:35, Arnd Bergmann wrote: >> >> All of the warnings have to be addressed in some form before the warning >> can be enabled by default. > > I picked up the ones that were blatantly obvious, but left out

Re: [PATCH 10/20] x86: xen: add missing prototypes

2023-05-19 Thread Arnd Bergmann
On Thu, May 18, 2023, at 19:28, Dave Hansen wrote: > On 5/16/23 12:35, Arnd Bergmann wrote: >> >> arch/x86/xen/enlighten_pv.c:1233:34: error: no previous prototype for >> 'xen_start_kernel' [-Werror=missing-prototypes] >> arch/x86/xen/irq.c:22

Re: [PATCH v4 07/41] drm: handle HAS_IOPORT dependencies

2023-05-16 Thread Arnd Bergmann
resume. Let's just skip this as >> for example s390 which doesn't have I/O port support also doesen't >> support suspend/resume. >> >> Co-developed-by: Arnd Bergmann >> Signed-off-by: Arnd Bergmann >> Signed-off-by: Niklas Schnelle >>

Re: [PATCH 3/3 v6] virtio: vdpa: new SolidNET DPU driver.

2022-12-20 Thread Arnd Bergmann
On Tue, Dec 20, 2022, at 17:46, Alvaro Karsz wrote: > Hi Nathan, > >> This does not appear to be a false positive but what was the intent >> here? Should the local name variables increase their length or should >> the buffer length be reduced? > > You're right, the local name variables and snprintf

Re: [GIT PULL] virtio: fixes, features

2022-10-12 Thread Arnd Bergmann
On Thu, Oct 13, 2022, at 12:08 AM, Michael S. Tsirkin wrote: > On Wed, Oct 12, 2022 at 11:06:54PM +0200, Arnd Bergmann wrote: >> On Wed, Oct 12, 2022, at 7:22 PM, Linus Torvalds wrote: >> > >> > The NO_IRQ thing is mainly actually defined by a few drivers that just >

Re: [GIT PULL] virtio: fixes, features

2022-10-12 Thread Arnd Bergmann
On Wed, Oct 12, 2022, at 7:22 PM, Linus Torvalds wrote: > > The NO_IRQ thing is mainly actually defined by a few drivers that just > never got converted to the proper world order, and even then you can > see the confusion (ie some drivers use "-1", others use "0", and yet > others use "((unsigned i

Re: [PATCH 20/36] arch/idle: Change arch_cpu_idle() IRQ behaviour

2022-06-08 Thread Arnd Bergmann
On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > Current arch_cpu_idle() is called with IRQs disabled, but will return > with IRQs enabled. > > However, the very first thing the generic code does after calling > arch_cpu_idle() is raw_local_irq_disable(). This means that > architectures th

Re: [PATCH 33/36] cpuidle,omap3: Use WFI for omap3_pm_idle()

2022-06-08 Thread Arnd Bergmann
On Wed, Jun 8, 2022 at 4:27 PM Peter Zijlstra wrote: > > arch_cpu_idle() is a very simple idle interface and exposes only a > single idle state and is expected to not require RCU and not do any > tracing/instrumentation. > > As such, omap_sram_idle() is not a valid implementation. Replace it > wit

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

2022-05-26 Thread Arnd Bergmann
On Wed, May 25, 2022 at 11:35 PM kernel test robot wrote: > .__mulsi3.o.cmd: No such file or directory > Makefile:686: arch/h8300/Makefile: No such file or directory > Makefile:765: arch/h8300/Makefile: No such file or directory > arch/Kconfig:10: can't open file "arch/h8300/Kconfig" Please stop

Re: [PATCH V2 5/7] dt-bindings: Add xen,dev-domid property description for xen-grant DMA ops

2022-05-18 Thread Arnd Bergmann
On Wed, May 18, 2022 at 5:06 PM Oleksandr wrote: > On 18.05.22 17:32, Arnd Bergmann wrote: > > On Sat, May 7, 2022 at 7:19 PM Oleksandr Tyshchenko > > wrote: > > > This would mean having a device > > node for the grant-table mechanism that can be refe

Re: [PATCH V2 5/7] dt-bindings: Add xen,dev-domid property description for xen-grant DMA ops

2022-05-18 Thread Arnd Bergmann
On Sat, May 7, 2022 at 7:19 PM Oleksandr Tyshchenko wrote: > > diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml > b/Documentation/devicetree/bindings/virtio/mmio.yaml > index 10c22b5..29a0932 100644 > --- a/Documentation/devicetree/bindings/virtio/mmio.yaml > +++ b/Documentation/de

Re: [PATCH] VMCI: Add support for ARM64

2022-05-11 Thread Arnd Bergmann
On Wed, May 11, 2022 at 9:54 PM Vishnu Dasa wrote: > > > > FWIW, it seems you're doing three things at once, better split this into > > a 3-patch series. > > Thanks for the feedback. I was debating between the two ways of doing > it and ultimately did it one way. It is a bit late now to change i

Re: [PATCH 8/8] virtio_ring.h: do not include from exported header

2022-04-04 Thread Arnd Bergmann
On Tue, Apr 5, 2022 at 7:35 AM Christoph Hellwig wrote: > > On Mon, Apr 04, 2022 at 10:04:02AM +0200, Arnd Bergmann wrote: > > The header is shared between kernel and other projects using virtio, such as > > qemu and any boot loaders booting from virtio devices. It's

Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code

2021-11-19 Thread Arnd Bergmann
On Fri, Nov 19, 2021 at 5:12 PM Alejandro Colomar (man-pages) wrote: > > On 11/19/21 16:57, Arnd Bergmann wrote: > > > > From what I can tell, linux/stddef.h is tiny, I don't think it's really > > worth optimizing this part. I have spent some time last year >

Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code

2021-11-19 Thread Arnd Bergmann
On Fri, Nov 19, 2021 at 5:22 PM Alejandro Colomar (man-pages) wrote: > On 11/19/21 17:18, Arnd Bergmann wrote: > > On Fri, Nov 19, 2021 at 5:10 PM Andy Shevchenko > > wrote: > >> On Fri, Nov 19, 2021 at 04:57:46PM +0100, Arnd Bergmann wrote: > > > >>> T

Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code

2021-11-19 Thread Arnd Bergmann
On Fri, Nov 19, 2021 at 5:10 PM Andy Shevchenko wrote: > On Fri, Nov 19, 2021 at 04:57:46PM +0100, Arnd Bergmann wrote: > > The main problem with this approach is that as soon as you start > > actually reducing the unneeded indirect includes, you end up with > > countless .c

Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code

2021-11-19 Thread Arnd Bergmann
On Fri, Nov 19, 2021 at 4:06 PM Alejandro Colomar (man-pages) wrote: > On 11/19/21 15:47, Arnd Bergmann wrote: > > On Fri, Nov 19, 2021 at 12:36 PM Alejandro Colomar > > Yes, I would like to untangle the dependencies. > > The main reason I started doing this splitting >

Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code

2021-11-19 Thread Arnd Bergmann
On Fri, Nov 19, 2021 at 12:36 PM Alejandro Colomar wrote: > > Alejandro Colomar (17): > linux/container_of.h: Add memberof(T, m) > Use memberof(T, m) instead of explicit NULL dereference > Replace some uses of memberof() by its wrappers > linux/memberof.h: Move memberof() to separate heade

Re: [PATCH v4 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-12 Thread Arnd Bergmann
On Thu, Aug 12, 2021 at 10:08 AM Xianting TIan wrote: > 在 2021/8/6 下午10:51, Arnd Bergmann 写道: > > On Fri, Aug 6, 2021 at 5:01 AM Xianting Tian > >> +#define __ALIGNED__ __attribute__((__aligned__(sizeof(long > > I think you need a higher alignment for DMA buffers, ins

Re: [PATCH v4 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-06 Thread Arnd Bergmann
On Fri, Aug 6, 2021 at 5:01 AM Xianting Tian wrote: > @@ -163,6 +155,13 @@ static void hvc_console_print(struct console *co, const > char *b, > if (vtermnos[index] == -1) > return; > > + list_for_each_entry(hp, &hvc_structs, next) > + if (hp->vtermno ==

Re: [PATCH 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-01 Thread Arnd Bergmann
On Sun, Aug 1, 2021 at 7:16 AM Xianting Tian wrote: > Considering lock competition of hp->outbuf and the complicated logic in > hvc_console_print(), I didn’t use hp->outbuf, just allocate additional > memory(length N_OUTBUF) and append it to hp->outbuf. > For the issue in hvc_poll_put_char(), I u

Re: [PATCH] virtio-console: avoid DMA from vmalloc area

2021-07-28 Thread Arnd Bergmann
On Wed, Jul 28, 2021 at 10:28 AM Xianting Tian wrote: > 在 2021/7/28 下午3:25, Arnd Bergmann 写道: > > I checked several hvc backends, like drivers/tty/hvc/hvc_riscv_sbi.c, > drivers/tty/hvc/hvc_iucv.c, drivers/tty/hvc/hvc_rtas.c, they don't use dma. > > I not finished all hvc

Re: [PATCH] virtio-console: avoid DMA from vmalloc area

2021-07-28 Thread Arnd Bergmann
On Wed, Jul 28, 2021 at 4:59 AM Xianting Tian wrote: > > Arnd, thanks for your quick reply, > > As we know put_chars() of virtio-console is registered to hvc framework. > I go throughed the code, actually there are totally three places that > put_chars() is called in hvc driver, but only 1 has is

Re: [PATCH] virtio-console: avoid DMA from vmalloc area

2021-07-27 Thread Arnd Bergmann
On Tue, Jul 27, 2021 at 3:13 PM Xianting Tian wrote: > @@ -1127,13 +1128,18 @@ static int put_chars(u32 vtermno, const char *buf, > int count) > if (!port) > return -EPIPE; > > - data = kmemdup(buf, count, GFP_ATOMIC); > - if (!data) > - return -E

Re: [PATCH v15] i2c: virtio: add a virtio i2c frontend driver

2021-07-23 Thread Arnd Bergmann
On Fri, Jul 23, 2021 at 7:44 AM Jie Deng wrote: > + > + ret = virtio_i2c_setup_vqs(vi); > + if (ret) > + return ret; > + > + vi->adap.owner = THIS_MODULE; > + snprintf(vi->adap.name, sizeof(vi->adap.name), > +"i2c_virtio at virtio bus %d", vde

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-06-30 Thread Arnd Bergmann
On Wed, Jun 30, 2021 at 10:09 AM Andy Shevchenko wrote: > > On Wed, Jun 30, 2021 at 09:55:49AM +0200, Arnd Bergmann wrote: > > On Wed, Jun 30, 2021 at 9:51 AM Jie Deng wrote: > > ... > > > On a related note, we are apparently still missing the bit in the virtio bus

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-06-30 Thread Arnd Bergmann
On Wed, Jun 30, 2021 at 9:51 AM Jie Deng wrote: > On 2021/6/30 15:32, Wolfram Sang wrote: > + snprintf(vi->adap.name, sizeof(vi->adap.name), "Virtio I2C Adapter"); > >>> Is there something to add so you can distinguish multiple instances? > >>> Most people want that. > >> > >> I find the I2C

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-06-28 Thread Arnd Bergmann
On Mon, Jun 28, 2021 at 12:13 PM Wolfram Sang wrote: > > > > Ok, that's what I thought. There is one corner case that I've struggled > > with though: Suppose the host has an SMBus-only driver, and the > > proposed driver exposes this as an I2C device to the guest, which > > makes it available to g

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-06-28 Thread Arnd Bergmann
On Mon, Jun 28, 2021 at 11:25 AM Wolfram Sang wrote: > > As far as I understand me (please clarify), implementing only the smbus > > subset would mean that we cannot communicate with all client devices, > > while implementing both would add more complexity than the lower-level > > protocol. > > Co

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-06-28 Thread Arnd Bergmann
On Mon, Jun 28, 2021 at 10:39 AM Wolfram Sang wrote: > > sorry for the long delay. I am not familiar with VFIO, so I had to dive > into the topic a little first. I am still not seeing through it > completely, so I have very high-level questions first. You probably know this already, but just in c

Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

2021-03-23 Thread Arnd Bergmann
On Tue, Mar 23, 2021 at 9:33 AM Jie Deng wrote: > > On 2021/3/23 15:27, Viresh Kumar wrote: > > > On 23-03-21, 22:19, Jie Deng wrote: > >> +static int __maybe_unused virtio_i2c_freeze(struct virtio_device *vdev) > >> +{ > >> +virtio_i2c_del_vqs(vdev); > >> +return 0; > >> +} > >> + > >> +s

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-19 Thread Arnd Bergmann
On Fri, Mar 19, 2021 at 7:35 AM Viresh Kumar wrote: > > On 19-03-21, 14:29, Jie Deng wrote: > > I also see example drivers/i2c/busses/i2c-xiic.c. Some people might think > > this way is more clearer than > > > > updating each member in probe. Basically, I think it's just a matter of > > personal p

Re: [PATCH v8] i2c: virtio: add a virtio i2c frontend driver

2021-03-18 Thread Arnd Bergmann
On Thu, Mar 18, 2021 at 3:42 PM Enrico Weigelt, metux IT consult wrote: > > On 16.03.21 08:44, Viresh Kumar wrote: > > > FWIW, this limits this driver to support a single device ever. We > > can't bind multiple devices to this driver now. Yeah, perhaps we will > > never be required to do so, but w

Re: [PATCH v7] i2c: virtio: add a virtio i2c frontend driver

2021-03-15 Thread Arnd Bergmann
On Mon, Mar 15, 2021 at 6:54 AM Jie Deng wrote: > On 2021/3/15 11:13, Jason Wang wrote: > > On 2021/3/15 9:14 上午, Jie Deng wrote: > >> On 2021/3/12 16:58, Arnd Bergmann wrote: > > > Then do you think it is necessary to mark the virtio bufs with > cacheline_al

Re: [PATCH v7] i2c: virtio: add a virtio i2c frontend driver

2021-03-12 Thread Arnd Bergmann
On Fri, Mar 12, 2021 at 2:33 PM Jie Deng wrote: > + > +/** > + * struct virtio_i2c_req - the virtio I2C request structure > + * @out_hdr: the OUT header of the virtio I2C message > + * @buf: the buffer into which data is read, or from which it's written > + * @in_hdr: the IN header of the virtio

Re: [PATCH v6] i2c: virtio: add a virtio i2c frontend driver

2021-03-10 Thread Arnd Bergmann
On Wed, Mar 10, 2021 at 4:59 AM Jason Wang wrote: > On 2021/3/10 10:22 上午, Jie Deng wrote: > > On 2021/3/4 17:15, Jason Wang wrote: > >> > >> > >>> +} > >>> + > >>> +if (msgs[i].flags & I2C_M_RD) > >>> +memcpy(msgs[i].buf, req->buf, msgs[i].len); > >> > >> > >> Sorry if

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-02 Thread Arnd Bergmann
On Tue, Mar 2, 2021 at 10:51 AM Stefan Hajnoczi wrote: > On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote: > > > > +/* > > > > + * Definitions for virtio I2C Adpter > > > > + * > > > > + * Copyright (c) 2021 Intel Corporation. All rights reserved. > > > > + */ > > > > + > > > > +#ifndef _U

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-01 Thread Arnd Bergmann
On Mon, Mar 1, 2021 at 1:10 PM Andy Shevchenko wrote: > On Mon, Mar 01, 2021 at 02:09:25PM +0200, Andy Shevchenko wrote: > > On Mon, Mar 01, 2021 at 05:24:41PM +0530, Viresh Kumar wrote: > > > On 01-03-21, 14:41, Jie Deng wrote: > > > > +/** > > > > + * struct virtio_i2c_req - the virtio I2C reque

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-01 Thread Arnd Bergmann
On Mon, Mar 1, 2021 at 7:41 AM Jie Deng wrote: > --- /dev/null > +++ b/include/uapi/linux/virtio_i2c.h > @@ -0,0 +1,56 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */ > +/* > + * Definitions for virtio I2C Adpter > + * > + * Copyright (c) 2021 Intel Corporation. All

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Arnd Bergmann
On Thu, Jul 2, 2020 at 1:18 PM Will Deacon wrote: > On Thu, Jul 02, 2020 at 12:08:41PM +0200, Arnd Bergmann wrote: > > On Thu, Jul 2, 2020 at 11:48 AM Will Deacon wrote: > > > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > Not sure I follow you here, but I

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Arnd Bergmann
On Thu, Jul 2, 2020 at 11:48 AM Will Deacon wrote: > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > > -#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory") > > > +#define __smp_load_acquire(p)

Re: [PATCH 0/5] drivers/char: Constify static variables

2020-07-02 Thread Arnd Bergmann
o - Constify id_table[] > ipmi: watchdog: Constify ident > virtio_console: Constify some static variables I just realized it was a series rather than a single patch I received. They all look correct, so Acked-by: Arnd Bergmann but if you do more of those, I would suggest not including the

Re: [PATCH 02/18] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h

2020-07-01 Thread Arnd Bergmann
On Wed, Jul 1, 2020 at 12:16 PM Will Deacon wrote: > On Tue, Jun 30, 2020 at 09:11:32PM +0200, Arnd Bergmann wrote: > > On Tue, Jun 30, 2020 at 7:37 PM Will Deacon wrote: > > > > > > In preparation for allowing architectures to define their own > > > implement

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-01 Thread Arnd Bergmann
On Wed, Jul 1, 2020 at 12:19 PM Will Deacon wrote: > On Tue, Jun 30, 2020 at 09:25:03PM +0200, Arnd Bergmann wrote: > > On Tue, Jun 30, 2020 at 7:39 PM Will Deacon wrote: > > Once we make gcc-4.9 the minimum version, > > this could be further improved to > > >

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-06-30 Thread Arnd Bergmann
On Tue, Jun 30, 2020 at 7:39 PM Will Deacon wrote: > +#define __READ_ONCE(x) \ > +({ \ > + int atomic = 1; \ > + union { _

Re: [PATCH 02/18] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h

2020-06-30 Thread Arnd Bergmann
On Tue, Jun 30, 2020 at 7:37 PM Will Deacon wrote: > > In preparation for allowing architectures to define their own > implementation of the READ_ONCE() macro, move the generic > {READ,WRITE}_ONCE() definitions out of the unwieldy 'linux/compiler.h' > file and into a new 'rwonce.h' header under 'a

[PATCH] vhost: fix default for vhost_iotlb

2020-04-29 Thread Arnd Bergmann
this configuration. Fixes: e6faeaa12841 ("vhost: drop vring dependency on iotlb") Signed-off-by: Arnd Bergmann --- I fixed this a while ago locally but never got around to sending the fix. If the problem has been addressed differently in the meantime, please ignore this one. --- dri

Re: [PATCH V9 9/9] virtio: Intel IFC VF driver for VDPA

2020-04-09 Thread Arnd Bergmann
On Thu, Mar 26, 2020 at 3:08 PM Jason Wang wrote: > > From: Zhu Lingshan > > This commit introduced two layers to drive IFC VF: > > (1) ifcvf_base layer, which handles IFC VF NIC hardware operations and > configurations. > > (2) ifcvf_main layer, which complies to VDPA bus framework, > im

Re: [PATCH v2 2/2] vhost: disable for OABI

2020-04-06 Thread Arnd Bergmann
On Mon, Apr 6, 2020 at 3:02 PM Michael S. Tsirkin wrote: > > On Mon, Apr 06, 2020 at 02:50:32PM +0200, Arnd Bergmann wrote: > > On Mon, Apr 6, 2020 at 2:12 PM Michael S. Tsirkin wrote: > > > > > > > > +config VHOST_DPN > > > + bool "

Re: [PATCH v2 2/2] vhost: disable for OABI

2020-04-06 Thread Arnd Bergmann
On Mon, Apr 6, 2020 at 2:12 PM Michael S. Tsirkin wrote: > > +config VHOST_DPN > + bool "VHOST dependencies" > + depends on !ARM || AEABI > + default y > + help > + Anything selecting VHOST or VHOST_RING must depend on VHOST_DPN. > + This excludes the depre

Re: [PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers

2020-02-12 Thread Arnd Bergmann
On Wed, Feb 12, 2020 at 10:15 PM Johannes Hirte wrote: > > On 2020 Jan 02, Arnd Bergmann wrote: > > Error in getting drive hardware properties > Error in getting drive reading properties > Error in getting drive writing properties > __ >

Re: [PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Arnd Bergmann
e memory under the address > so they can be converted to a "const" version for const-safety and > consistency among architectures. > > Suggested-by: Geert Uytterhoeven > Signed-off-by: Krzysztof Kozlowski > Reviewed-by: Geert Uytterhoeven Thanks for getting this done! R

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Arnd Bergmann
On Wed, Jan 8, 2020 at 10:15 AM Krzysztof Kozlowski wrote: > > The __force-cast that removes the __iomem here also means that > > the 'volatile' keyword could be dropped from the argument list, > > as it has no real effect any more, but then there are a few drivers > > that mark their iomem point

Re: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread Arnd Bergmann
On Wed, Jan 8, 2020 at 9:36 AM Christophe Leroy wrote: > Le 08/01/2020 à 09:18, Krzysztof Kozlowski a écrit : > > On Wed, 8 Jan 2020 at 09:13, Geert Uytterhoeven > > wrote: > > I'll add to this one also changes to ioreadX_rep() and add another > > patch for volatile for reads and writes. I guess

Re: [RFT 06/13] arc: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-07 Thread Arnd Bergmann
On Tue, Jan 7, 2020 at 5:54 PM Krzysztof Kozlowski wrote: > > The ioreadX() helpers have inconsistent interface. On some architectures > void *__iomem address argument is a pointer to const, on some not. > > Implementations of ioreadX() do not modify the memory under the > address so they can be

Re: [RFT 03/13] sh: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-07 Thread Arnd Bergmann
On Tue, Jan 7, 2020 at 5:54 PM Krzysztof Kozlowski wrote: > > The ioreadX() helpers have inconsistent interface. On some architectures > void *__iomem address argument is a pointer to const, on some not. > > Implementations of ioreadX() do not modify the memory under the address > so they can be

[PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers

2020-01-02 Thread Arnd Bergmann
mode, with the argument passed through compat_ptr(). With this, we can remove the entries from fs/compat_ioctl.c. The new code is larger, but should be easier to maintain and keep updated with newly added commands. Signed-off-by: Arnd Bergmann --- drivers/block/virtio_blk.c | 3 + drivers/scsi

Re: [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 1:28 AM Paolo Bonzini wrote: > On 12/12/19 00:05, Michael S. Tsirkin wrote: > >> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, > >> struct hd_geometry *geo) > >> > >> static const struct block_device_operations virtblk_fops = { > >> .ioctl =

[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-11 Thread Arnd Bergmann
mode, with the argument passed through compat_ptr(). With this, we can remove the entries from fs/compat_ioctl.c. The new code is larger, but should be easier to maintain and keep updated with newly added commands. Signed-off-by: Arnd Bergmann --- drivers/block/virtio_blk.c | 3 + drivers/scsi

[PATCH 00/24] block, scsi: final compat_ioctl cleanup

2019-12-11 Thread Arnd Bergmann
nel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=compat-ioctl-endgame Arnd Bergmann (24): compat: ARM64: always include asm-generic/compat.h compat: scsi: sg: fix v3 compat read/write interface compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE compat_ioctl: block: hand

Re: [PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h

2019-11-11 Thread Arnd Bergmann
On Mon, Nov 11, 2019 at 9:10 AM Christian Borntraeger wrote: > On 08.11.19 20:57, Arnd Bergmann wrote: > > On Fri, Nov 8, 2019 at 6:01 PM Will Deacon wrote: > >> > >> In preparation for allowing architectures to define their own > >> implementation of the &

Re: [PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h

2019-11-08 Thread Arnd Bergmann
On Fri, Nov 8, 2019 at 6:01 PM Will Deacon wrote: > > In preparation for allowing architectures to define their own > implementation of the 'READ_ONCE()' macro, move the generic > '{READ,WRITE}_ONCE()' definitions out of the unwieldy 'linux/compiler.h' > and into a new 'rwonce.h' header under 'asm

[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
-by: Jason Gunthorpe Reviewed-by: Jiri Kosina Reviewed-by: Stefan Hajnoczi Signed-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/tpm/tpm_vtpm_proxy.c | 12 +- drivers/firewire/core-cdev.c | 12 +- drivers/hid/usbhid/hiddev.c

[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl

2019-04-16 Thread Arnd Bergmann
-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/tpm/tpm_vtpm_proxy.c | 12 +- drivers/firewire/core-cdev.c | 12 +- drivers/hid/usbhid/hiddev.c | 11 + drivers/hwtracing/stm/core.c | 12 +- drivers/misc/mei

[PATCH] vhost: silence an unused-variable warning

2019-03-06 Thread Arnd Bergmann
size_t s = vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX) ? 2 : 0; Mark the variable as __maybe_unused to shut up that warning. Signed-off-by: Arnd Bergmann --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vho

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-24 Thread Arnd Bergmann
On Mon, Sep 17, 2018 at 3:00 PM Thomas Gleixner wrote: > > On Fri, 14 Sep 2018, Arnd Bergmann wrote: > > On Fri, Sep 14, 2018 at 2:52 PM Thomas Gleixner wrote: > > A couple of architectures (s390, ia64, riscv, powerpc, arm64) > > implement the vdso as assembler cod

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-09-14 Thread Arnd Bergmann
On Fri, Sep 14, 2018 at 2:52 PM Thomas Gleixner wrote: > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > implementation, which extended the clockid switch case and added yet > another slightly different copy of the same code. > > Especially the extended switch case is probl

Re: [PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
On Wed, Sep 12, 2018 at 5:33 PM Jason Gunthorpe wrote: > > On Wed, Sep 12, 2018 at 05:01:03PM +0200, Arnd Bergmann wrote: > > Each of these drivers has a copy of the same trivial helper function to > > convert the pointer argument and then call the native ioctl handler. >

[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg

2018-09-12 Thread Arnd Bergmann
Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler. We now have a generic implementation of that, so use it. Signed-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char

Re: [PATCH v4 1/3] compiler-gcc.h: add gnu_inline to all inline declarations

2018-06-08 Thread Arnd Bergmann
On Thu, Jun 7, 2018 at 10:49 PM, Nick Desaulniers wrote: > Functions marked extern inline do not emit an externally visible > function when the gnu89 C standard is used. Some KBUILD Makefiles > overwrite KBUILD_CFLAGS. This is an issue for GCC 5.1+ users as without > an explicit C standard specifi

Re: [PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline

2018-06-05 Thread Arnd Bergmann
On Tue, Jun 5, 2018 at 11:28 PM, Arnd Bergmann wrote: > On Tue, Jun 5, 2018 at 7:05 PM, Nick Desaulniers > wrote: >> >> The semantics of extern inline has changed since gnu89. This means that >> folks using GCC versions >= 5.1 may see symbol redefinition errors at &g

Re: [PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline

2018-06-05 Thread Arnd Bergmann
On Tue, Jun 5, 2018 at 7:05 PM, Nick Desaulniers wrote: > > The semantics of extern inline has changed since gnu89. This means that > folks using GCC versions >= 5.1 may see symbol redefinition errors at > link time for subdirs that override KBUILD_CFLAGS (making the C standard > used implicit) re

[4.4-stable 12/22] virtio_balloon: prevent uninitialized variable use

2018-02-20 Thread Arnd Bergmann
y added in 2.6.34. Fixes: 9564e138b1f6 ("virtio: Add memory statistics reporting to the balloon driver (V4)") Signed-off-by: Arnd Bergmann Signed-off-by: Ladi Prosek Signed-off-by: Michael S. Tsirkin [arnd: backported to 4.4] Signed-off-by: Arnd Bergmann --- drivers/virtio/virtio_b

[PATCH net-next] virtio-net: mark PM functions as __maybe_unused

2017-07-25 Thread Arnd Bergmann
he compiler will now just silently drop the unused code. Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set") Signed-off-by: Arnd Bergmann --- drivers/net/virtio_net.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/

Re: [PATCH v3 2/3] virtio-balloon: use actual number of stats for stats queue buffers

2017-03-28 Thread Arnd Bergmann
to the statsq." > > Suggested-by: Arnd Bergmann > Signed-off-by: Ladi Prosek > Acked-by: Arnd Bergmann ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] virtio_balloon: prevent uninitialized variable use

2017-03-24 Thread Arnd Bergmann
On Fri, Mar 24, 2017 at 9:11 PM, Ladi Prosek wrote: > On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand wrote: >> On 23.03.2017 16:17, Arnd Bergmann wrote: >>> The latest gcc-7.0.1 snapshot reports a new warning: >>> >>> virtio/virtio_balloon.c: In functio

[PATCH] virtio_balloon: prevent uninitialized variable use

2017-03-23 Thread Arnd Bergmann
Add memory statistics reporting to the balloon driver (V4)") Signed-off-by: Arnd Bergmann --- drivers/virtio/virtio_balloon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 4e1191508228..cd5c54e2003d 10

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Arnd Bergmann
On Tuesday, January 10, 2017 1:44:37 PM CET Robin Murphy wrote: > On 10/01/17 13:15, Arnd Bergmann wrote: > > On Tuesday, January 10, 2017 12:26:01 PM CET Robin Murphy wrote: > >> @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device > >> *pdev) >

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Arnd Bergmann
On Tuesday, January 10, 2017 12:26:01 PM CET Robin Murphy wrote: > @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device > *pdev) > if (vm_dev->version == 1) > writel(PAGE_SIZE, vm_dev->base + VIRTIO_MMIO_GUEST_PAGE_SIZE); > > + rc = dma_set_mask_

Re: [PATCH] x86/paravirt: hide unused patch_default label

2016-12-16 Thread Arnd Bergmann
On Friday, December 16, 2016 10:51:50 AM CET Peter Zijlstra wrote: > -patch_default: > +patch_default: __maybe_unused > ret = paravirt_patch_default(type, clobbers, ibuf, addr, len); > break; > Ah, nice, I didn't know you could do that. Yes, please do this instead.

[PATCH] x86/paravirt: hide unused patch_default label

2016-12-16 Thread Arnd Bergmann
: 45dbea5f55c0 ("x86/paravirt: Fix native_patch()") Signed-off-by: Arnd Bergmann --- arch/x86/kernel/paravirt_patch_32.c | 2 ++ arch/x86/kernel/paravirt_patch_64.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/kernel/paravirt_patch_32.c b/arch/x86/kernel/paravirt

Re: [PATCH] virtio: mark vring_dma_dev() static

2016-09-01 Thread Arnd Bergmann
n the file in which it is > declared and don't need a declaration, but can be made static. > so this patch marks this function with 'static'. > > Signed-off-by: Baoyou Xie > Acked-by: Arnd Bergmann ___ Virtualization

[PATCH] drm/virtio: fix building without CONFIG_FBDEV

2016-08-02 Thread Arnd Bergmann
both subsystems are configured as loadable modules. Signed-off-by: Arnd Bergmann Fixes: 0b6320dfdfea ("drm/virtio: make fbdev support really optional") --- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vi

Re: Build regressions/improvements in v4.7-rc6

2016-07-04 Thread Arnd Bergmann
On Monday, July 4, 2016 10:21:45 AM CEST Geert Uytterhoeven wrote: > On Mon, Jul 4, 2016 at 10:12 AM, Geert Uytterhoeven > wrote: > > JFYI, when comparing v4.7-rc6[1] to v4.7-rc5[3], the summaries are: > > - build errors: +3/-2 > > + /home/kisskb/slave/src/drivers/vhost/vhost.c: error: call t

Re: [PATCH 00/34] arch: barrier cleanup + __smp_xxx barriers for virt

2015-12-30 Thread Arnd Bergmann
On Wednesday 30 December 2015 23:45:41 Michael S. Tsirkin wrote: > On Wed, Dec 30, 2015 at 02:49:53PM +0100, Arnd Bergmann wrote: > > On Wednesday 30 December 2015 15:24:12 Michael S. Tsirkin wrote: > > > This is really trying to cleanup some virt code, as suggested by Peter, &g

Re: [PATCH 08/34] asm-generic: smp_store_mb should use smp_mb

2015-12-30 Thread Arnd Bergmann
On Wednesday 30 December 2015 22:30:38 Michael S. Tsirkin wrote: > On Wed, Dec 30, 2015 at 02:44:21PM +0100, Arnd Bergmann wrote: > > On Wednesday 30 December 2015 15:24:47 Michael S. Tsirkin wrote: > > > #ifndef smp_store_mb > > > -#define smp_store_mb(var, value)

Re: [PATCH 00/34] arch: barrier cleanup + __smp_XXX barriers for virt

2015-12-30 Thread Arnd Bergmann
nup, both for using the asm-generic file, and for the virtualization users. Please add my "Acked-by: Arnd Bergmann " when merging the series through your tree. Arnd ___ Virtualization mailing list Virtualization@lists.linux-foundation

Re: [PATCH 08/34] asm-generic: smp_store_mb should use smp_mb

2015-12-30 Thread Arnd Bergmann
On Wednesday 30 December 2015 15:24:47 Michael S. Tsirkin wrote: > asm-generic variant of smp_store_mb() calls mb() which is stronger > than implied by both the name and the documentation. > > smp_store_mb is only used by core kernel code at the moment, so > we know no one mis-uses it for an MMIO

[PATCH] vhost: vsock: select CONFIG_VHOST

2015-12-08 Thread Arnd Bergmann
When building the new vsock code without vhost, we get a build error: drivers/built-in.o: In function `vhost_vsock_flush': :(.text+0x24d29c): undefined reference to `vhost_poll_flush' This adds an explicit 'select' like we have for the other vhost drivers. Signed-o

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 09:34:15 Geert Uytterhoeven wrote: > On Wed, Oct 7, 2015 at 1:23 PM, Arnd Bergmann wrote: > > static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) > > > > which truncates the result to 32 bit. > > Woops. > > S

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 11:37:00 Ralf Baechle wrote: > On Wed, Oct 07, 2015 at 01:23:07PM +0200, Arnd Bergmann wrote: > > > > I haven't checked all architectures, but I assume what happens is that > > > 64-bit ones just #define atomic64_t atomic_long_t, so they don&

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Arnd Bergmann
On Wednesday 07 October 2015 13:04:06 Arnd Bergmann wrote: > On Wednesday 07 October 2015 11:45:02 Russell King - ARM Linux wrote: > > On Wed, Oct 07, 2015 at 12:41:21PM +0200, Arnd Bergmann wrote: > > > The virtgpu driver prints the last_seq variable using the %ld or >

Re: [PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Arnd Bergmann
On Wednesday 07 October 2015 11:45:02 Russell King - ARM Linux wrote: > On Wed, Oct 07, 2015 at 12:41:21PM +0200, Arnd Bergmann wrote: > > The virtgpu driver prints the last_seq variable using the %ld or > > %lu format string, which does not work correctly on all architectures >

[PATCH] drm/virtio: use %llu format string form atomic64_t

2015-10-07 Thread Arnd Bergmann
d %lld\n", ^ In order to avoid the warnings, this changes the format strings to %llu and adds a cast to u64, which makes it work the same way everywhere. Signed-off-by: Arnd Bergmann diff --git a/drivers/gpu/drm/virtio/virtgpu_debugfs.c b/drivers/gpu/drm/virtio/virtgpu_debugfs.

Re: [PULL] uaccess: fix sparse warning on get/put_user for bitwise types

2015-01-14 Thread Arnd Bergmann
On Wednesday 14 January 2015 19:36:18 Michael S. Tsirkin wrote: > As you asked, here's a pull request. > This has been in linux-next apparently with no ill effects. > > The following changes since commit 99975cc6ada0d5f2675e83abecae05aba5f437d2: > > vhost/net: length miscalculation (2015-01-07

Re: [PATCH RFC 3/5] pci: add pci_iomap_range

2014-12-11 Thread Arnd Bergmann
On Thursday 11 December 2014 21:37:34 Michael S. Tsirkin wrote: > if (flags & IORESOURCE_MEM) { > - if (flags & IORESOURCE_CACHEABLE) > + if (!force_nocache && (flags & IORESOURCE_CACHEABLE)) > return ioremap(start, len); >

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-04 Thread Arnd Bergmann
On Monday 04 August 2014, Yijing Wang wrote: > On 2014/8/1 21:52, Arnd Bergmann wrote: > > On Wednesday 30 July 2014, Yijing Wang wrote: > >> On 2014/7/29 22:08, Arnd Bergmann wrote: > >>> The other part I'm not completely sure about is how you want to

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-04 Thread Arnd Bergmann
On Monday 04 August 2014, Yijing Wang wrote: > I have another question is some drivers will request more than one > MSI/MSI-X IRQ, and the driver will use them to process different things. > Eg. network driver generally uses one of them to process trivial network > thins, > and others to transmit/

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-01 Thread Arnd Bergmann
On Wednesday 30 July 2014, Yijing Wang wrote: > On 2014/7/29 22:08, Arnd Bergmann wrote: > > On Saturday 26 July 2014 11:08:37 Yijing Wang wrote: > >> > >> The new data struct for generic MSI driver. > >> struct msi_irqs { > >> u8 msi

  1   2   3   >