[PATCH] [PATCH] of_reserved_mem: Increase the number of reserved regions

2020-10-03 Thread Phil Chang
Certain SoCs need to support large amount of reserved memory regions, especially to follow the GKI rules from Google. In MTK new SoC requires more than 68 regions of reserved memory for each IP's usage, such as load firmware to specific sapce, so that need to reserve more regisions

[PATCH v3] bluetooth: hci_h5: fix memory leak in h5_close

2020-10-03 Thread Anant Thazhemadam
When h5_close() is called and !hu->serdev, h5 is directly freed. However, h5->rx_skb is not freed before h5 is freed, which causes a memory leak. Freeing h5->rx_skb (when !hu->serdev) fixes this memory leak before freeing h5. Fixes: ce945552fde4 ("Bluetooth: hci_h5: Add support for serdev

Re: USBIP is claiming all my USB devices - Commit 7a2f2974f265 is broken

2020-10-03 Thread Greg Kroah-Hartman
On Sat, Oct 03, 2020 at 01:54:46PM -0400, Byron Stanoszek wrote: > On Sat, 3 Oct 2020, Greg Kroah-Hartman wrote: > > > On Sat, Oct 03, 2020 at 01:18:36PM -0400, Byron Stanoszek wrote: > > > All, > > > > > > I was testing Linux 5.9-rc7 today when I realized that none of my USB > > > devices > >

[PATCH 06/10] fpga: fpga-mgr: socfpga: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/socfpga.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c index 4a8a2fcd4e6c..1f467173fc1f 100644 ---

[PATCH 10/10] fpga: fpga-mgr: altera-pr-ip: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Remove the now obsolete altera_pr_unregister() function. Signed-off-by: Moritz Fischer --- We should take another look at this, IIRC correctly the point of splitting this up into a separate driver was to make it useable by a

[PATCH 05/10] fpga: fpga-mgr: machxo2-spi: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/machxo2-spi.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c index b316369156fe..114a64d2b7a4

[PATCH 08/10] fpga: fpga-mgr: xilinx-spi: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/xilinx-spi.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx-spi.c index 824abbbd631e..27defa98092d

[PATCH 07/10] fpga: fpga-mgr: ts73xx: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/ts73xx-fpga.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/ts73xx-fpga.c index 2888ff000e4d..101f016c6ed8

[PATCH 09/10] fpga: fpga-mgr: zynqmp: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/zynqmp-fpga.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/fpga/zynqmp-fpga.c b/drivers/fpga/zynqmp-fpga.c index

[PATCH 02/10] fpga: fpga-mgr: altera-ps-spi: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration by using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/altera-ps-spi.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/altera-ps-spi.c b/drivers/fpga/altera-ps-spi.c index

[PATCH 03/10] fpga: fpga-mgr: dfl-fme-mgr: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/dfl-fme-mgr.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c index b3f7eee3c93f..3fc2be87d059

[PATCH 00/10] Introduce devm_fpga_mgr_register()

2020-10-03 Thread Moritz Fischer
This patchset introduces the devm_fpga_mgr_register API, a devres managed version of fpga_mgr_register(). It reduces boilerplate being repeated literally in every single driver by moving it to the fpga-mgr core. Moritz Fischer (10): fpga: fpga-mgr: Add devm_fpga_mgr_register() API fpga:

[PATCH 01/10] fpga: fpga-mgr: Add devm_fpga_mgr_register() API

2020-10-03 Thread Moritz Fischer
Add a devm_fpga_mgr_register() API that can be used to register a FPGA Manager that was created using devm_fpga_mgr_create(). Introduce a struct fpga_mgr_devres that makes the devres allocation a little bit more readable and gets reused for devm_fpga_mgr_create() devm_fpga_mgr_register().

[PATCH 04/10] fpga: fpga-mgr: ice40-spi: Simplify registration

2020-10-03 Thread Moritz Fischer
Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer --- drivers/fpga/ice40-spi.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/ice40-spi.c index 8d689fea0dab..69dec5af23c3 100644

drivers/spi/spi-orion.c:409:24: sparse: sparse: incorrect type in argument 1 (different base types)

2020-10-03 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 22fbc037cd32e4e6771d2271b565806cfb8c134c commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH date: 11 months ago config: alpha-randconfig-s032-20201004 (attached as

Re: [PATCH v7 0/5] Fix DPC hotplug race and enhance error handling

2020-10-03 Thread Raj, Ashok
Hi Ethan On Sat, Oct 03, 2020 at 03:55:09AM -0400, Ethan Zhao wrote: > Hi,folks, > > This simple patch set fixed some serious security issues found when DPC > error injection and NVMe SSD hotplug brute force test were doing -- race > condition between DPC handler and pciehp, AER interrupt

[PATCH v5] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode

2020-10-03 Thread longguang.yue
It's ipvs's duty to do traffic statistic if packets get hit, no matter what mode it is. -- Changes in v1: support DR/TUN mode statistic Changes in v2: ip_vs_conn_out_get handles DR/TUN mode's conn Changes in v3: fix checkpatch Changes in v4, v5: restructure and optimise this

possible deadlock in start_transaction

2020-10-03 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:ccc1d052 Merge tag 'dmaengine-fix-5.9' of git://git.kernel.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17f1fa5b90 kernel config: https://syzkaller.appspot.com/x/.config?x=41b736b7ce1b3ea4

Re: [RFC PATCH v1 09/26] docs: reporting-bugs: help users find the proper place for their report

2020-10-03 Thread Randy Dunlap
On 10/1/20 1:39 AM, Thorsten Leemhuis wrote: > Make it obvious that bugzilla.kernel.org most of the time is the wrong > place to file a report, as it's not working well. Instead, tell users > how to read the MAINTAINERS file to find the proper place for their > report. Also mention

Re: [RFC PATCH v1 25/26] docs: reporting-bugs: explain things could be easier

2020-10-03 Thread Randy Dunlap
On 10/1/20 1:50 AM, Thorsten Leemhuis wrote: > A few closing words to explain why things are like this until someone > steps up to make things easier for people. > > Signed-off-by: Thorsten Leemhuis > --- > Documentation/admin-guide/reporting-bugs.rst | 9 + > 1 file changed, 9

Re: [RFC PATCH v1 24/26] docs: reporting-bugs: explain why users might get neither reply nor fix

2020-10-03 Thread Randy Dunlap
On 10/1/20 1:50 AM, Thorsten Leemhuis wrote: > Not even getting a reply after one invested quite a bit of time with > preparing and writing a report can be quite devastating. But when it > comes to Linux, this can easily happen for good or bad reasons. Hence, > use this opportunity to explain why

Re: [RFC PATCH v1 20/26] docs: reporting-bugs: instructions for handling regressions

2020-10-03 Thread Randy Dunlap
On 10/1/20 1:39 AM, Thorsten Leemhuis wrote: > Describe what users will have to do if they deal with a regression. > Point out that bisection is really important. > > While at it explicitly mention the .config files for the newer kernel > needs to be similar to the old kernel, as that's an

Re: [PATCH 2/2] Platform integrity information in sysfs (version 9)

2020-10-03 Thread Randy Dunlap
On 9/30/20 9:37 AM, Daniel Gutson wrote: > diff --git a/drivers/mtd/spi-nor/controllers/Kconfig > b/drivers/mtd/spi-nor/controllers/Kconfig > index 5c0e0ec2e6d1..e7eaef506fc2 100644 > --- a/drivers/mtd/spi-nor/controllers/Kconfig > +++ b/drivers/mtd/spi-nor/controllers/Kconfig > @@ -29,6 +29,7 @@

Re: [PATCH] ocfs2: ratelimit the 'max lookup times reached' notice

2020-10-03 Thread Joseph Qi
On 2020/10/2 06:44, Mauricio Faria de Oliveira wrote: > Running stress-ng on ocfs2 completely fills the kernel log with > 'max lookup times reached, filesystem may have nested directories.' > > Let's ratelimit this message as done with others in the code. > > Test-case: > > # mkfs.ocfs2

Re: [PATCH v10 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-10-03 Thread Coly Li
On 2020/10/3 06:28, David Miller wrote: > From: Coly Li > Date: Fri, 2 Oct 2020 16:27:27 +0800 > >> As Sagi Grimberg suggested, the original fix is refind to a more common >> inline routine: >> static inline bool sendpage_ok(struct page *page) >> { >> return (!PageSlab(page) &&

[PATCH v3 10/10] x86: Reclaim TIF_IA32 and TIF_X32

2020-10-03 Thread Gabriel Krisman Bertazi
Now that these flags are no longer used, reclaim those TI bits. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/thread_info.h | 4 arch/x86/kernel/process_64.c | 6 -- 2 files changed, 10 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h

[PATCH v3 09/10] x86: Convert mmu context ia32_compat into a proper flags field

2020-10-03 Thread Gabriel Krisman Bertazi
The ia32_compat attribute is a weird thing. It mirrors TIF_IA32 and TIF_X32 and is used only in two very unrelated places: (1) to decide if the vsyscall page is accessible (2) for uprobes to find whether the patched instruction is 32 or 64 bit. In preparation to remove the TI flags, we want new

[PATCH v3 04/10] x86: elf: Use e_machine to choose DLINFO in compat

2020-10-03 Thread Gabriel Krisman Bertazi
Since TIF_X32 is going away, avoid using it to find the ELF type on ARCH_DLINFO. According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to differentiate a x32 object from a IA32 object when loading ARCH_DLINFO

[PATCH v3 05/10] elf: Expose ELF header in compat_start_thread

2020-10-03 Thread Gabriel Krisman Bertazi
Like it is done for SET_PERSONALITY with x86, which requires the ELF header to select correct personality parameters, x86 requires the headers on compat_start_thread to choose starting CS for ELF32 binaries, instead of relying on the going-away TIF_IA32/X32 flags. This patch adds an indirection

[PATCH v3 08/10] x86: elf: Use e_machine to select additional_pages between x32

2020-10-03 Thread Gabriel Krisman Bertazi
Since TIF_X32 is going away, avoid using it to find the ELF type when choosing which additional pages to set up. According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to differentiate a x32 object from a IA32

[PATCH v3 07/10] elf: Expose ELF header on arch_setup_additional_pages

2020-10-03 Thread Gabriel Krisman Bertazi
Like it is done for SET_PERSONALITY with ARM, which requires the ELF header to select correct personality parameters, x86 requires the headers when selecting which vdso to load, instead of relying on the going-away TIF_IA32/X32 flags. This patch adds an indirection macro to

[PATCH v3 06/10] x86: elf: Use e_machine to select start_thread for x32

2020-10-03 Thread Gabriel Krisman Bertazi
Since TIF_X32 is going away, avoid using it to find the ELF type in compat_start_thread. According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to differentiate a x32 object from a IA32 object when executing

[PATCH v3 03/10] x86: oprofile: Avoid TIF_IA32 when checking 64bit mode

2020-10-03 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in oprofile code. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/oprofile/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index

[PATCH v3 00/10] Reclaim TIF_IA32 and TIF_X32

2020-10-03 Thread Gabriel Krisman Bertazi
This is the third version of the patch to reclaim those TI flags. The main difference from v2 is that it exports the elf32 headers in the macros in a proper way, instead of doing some magic to use them. Andy, I didn't follow (my understanding of) your suggestion to expose the elf32 headers

[PATCH v3 01/10] x86: events: Avoid TIF_IA32 when checking 64bit mode

2020-10-03 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in perf events code. Tested by running perf on 32-bit, 64-bit and x32 applications. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi Acked-by: Peter Zijlstra (Intel) --- arch/x86/events/core.c | 2 +-

[PATCH v3 02/10] x86: Simplify compat syscall userspace allocation

2020-10-03 Thread Gabriel Krisman Bertazi
When allocating user memory space for a compat system call, don't consider whether the originating code is IA32 or X32, just allocate from a safe region for both, beyond the redzone. This should be safe for IA32, and has the benefit of avoiding TIF_IA32, which we want to drop. Suggested-by: Andy

[PATCH v4 1/2] dt-bindings: hwmon: max20730: adding device tree doc for max20730

2020-10-03 Thread Chu Lin
max20730 Integrated, Step-Down Switching Regulator with PMBus Signed-off-by: Chu Lin --- ChangeLog v1 -> v2 hwmon: pmbus: max20730: - Don't do anything to the ret if an error is returned from pmbus_read_word - avoid overflow when doing multiplication ChangeLog v2 -> v3 dt-bindings:

[PATCH v4 0/2] hwmon: pmbus: max20730: adjust the vout base on

2020-10-03 Thread Chu Lin
The patchset includes: Patch #1 - Implmentation of adjusting vout base on voltage divider Patch #2 - device tree binding documentation ChangeLog v1 -> v2 hwmon: pmbus: max20730: - Don't do anything to the ret if an error is returned from pmbus_read_word - avoid overflow when doing

[PATCH v4 2/2] hwmon: pmbus: max20730: adjust the vout reading given voltage divider

2020-10-03 Thread Chu Lin
Problem: We use voltage dividers so that the voltage presented at the voltage sense pins is confusing. We might need to convert these readings to more meaningful readings given the voltage divider. Solution: Read the voltage divider resistance from dts and convert the voltage reading to a more

security/integrity/platform_certs/keyring_handler.c:62:30: warning: no previous prototype for 'get_handler_for_db'

2020-10-03 Thread kernel test robot
Hi Nayna, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 22fbc037cd32e4e6771d2271b565806cfb8c134c commit: ad723674d6758478829ee766e3f1a2a24d56236f x86/efi: move common keyring handler functions to new file date:

Re: [RFC][PATCHSET] epoll cleanups

2020-10-03 Thread Al Viro
On Sun, Oct 04, 2020 at 03:36:08AM +0100, Al Viro wrote: > Locking and especilly control flow in fs/eventpoll.c is > overcomplicated. As the result, the code has been hard to follow > and easy to fuck up while modifying. > > The following series attempts to untangle it; there's more

[RFC PATCH 09/27] reverse_path_check_proc(): don't bother with cookies

2020-10-03 Thread Al Viro
From: Al Viro We know there's no loops by the time we call it; the only thing we care about is too deep reverse paths. Signed-off-by: Al Viro --- fs/eventpoll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index

[RFC PATCH 02/27] epoll: get rid of epitem->nwait

2020-10-03 Thread Al Viro
From: Al Viro we use it only to indicate allocation failures within queueing callback back to ep_insert(). Might as well use epq.epi for that reporting... Signed-off-by: Al Viro --- fs/eventpoll.c | 46 -- 1 file changed, 20 insertions(+), 26

[RFC PATCH 27/27] epoll: take epitem list out of struct file

2020-10-03 Thread Al Viro
From: Al Viro Move the head of epitem list out of struct file; for epoll ones it's moved into struct eventpoll (->refs there), for non-epoll - into the new object (struct epitem_head). In place of ->f_ep_links we leave a pointer to the list head (->f_ep). ->f_ep is protected by ->f_lock and

[RFC PATCH 05/27] untangling ep_call_nested(): take pushing cookie into a helper

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 43aecae0935c..bd2cc78c47c8 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -424,6 +424,21 @@ static

[RFC PATCH 10/27] clean reverse_path_check_proc() a bit

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 0f540e91aa92..33af838046ea 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1317,23 +1317,15 @@

[RFC PATCH 11/27] ep_loop_check_proc(): lift pushing the cookie into callers

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 33af838046ea..9edea3933790 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1877,9 +1877,6 @@ static int

[RFC PATCH 12/27] get rid of ep_push_nested()

2020-10-03 Thread Al Viro
From: Al Viro The only remaining user is loop checking. But there we only need to check that we have not walked into the epoll we are inserting into - we are adding an edge to acyclic graph, so any loop being created will have to pass through the source of that edge. So we don't need that

[RFC PATCH 24/27] convert ->f_ep_links/->fllink to hlist

2020-10-03 Thread Al Viro
From: Al Viro we don't care about the order of elements there Signed-off-by: Al Viro --- fs/eventpoll.c| 18 +- include/linux/eventpoll.h | 4 ++-- include/linux/fs.h| 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/eventpoll.c

[RFC PATCH 06/27] untangling ep_call_nested(): move push/pop of cookie into the callbacks

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index bd2cc78c47c8..9a6ee5991f3d 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -455,15 +455,7 @@ static bool

[RFC PATCH 16/27] lift the calls of ep_send_events_proc() into the callers

2020-10-03 Thread Al Viro
From: Al Viro ... and kill ep_scan_ready_list() Signed-off-by: Al Viro --- fs/eventpoll.c | 33 + 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 9b9e29e0c85f..3b3a862f8014 100644 --- a/fs/eventpoll.c +++

[RFC PATCH 08/27] reverse_path_check_proc(): sane arguments

2020-10-03 Thread Al Viro
From: Al Viro no need to force its calling conventions to match the callback for late unlamented ep_call_nested()... Signed-off-by: Al Viro --- fs/eventpoll.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index

[RFC PATCH 20/27] ep_insert(): we only need tep->mtx around the insertion itself

2020-10-03 Thread Al Viro
From: Al Viro We do need ep->mtx (and we are holding it all along), but that's the lock on the epoll we are inserting into; locking of the epoll being inserted is not needed for most of that work - as the matter of fact, we only need it to provide barriers for the fastpath check (for now). Move

[RFC PATCH 22/27] fold ep_read_events_proc() into the only caller

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 49 - 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index a50b48d26c55..1efe8a1a022a 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@

[RFC PATCH 19/27] ep_insert(): don't open-code ep_remove() on failure exits

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 51 ++- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index f9c567af1f5f..c987b61701e4 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@

[RFC PATCH 21/27] take the common part of ep_eventpoll_poll() and ep_item_poll() into helper

2020-10-03 Thread Al Viro
From: Al Viro The only reason why ep_item_poll() can't simply call ep_eventpoll_poll() (or, better yet, call vfs_poll() in all cases) is that we need to tell lockdep how deep into the hierarchy of ->mtx we are. So let's add a variant of ep_eventpoll_poll() that would take depth explicitly and

[RFC PATCH 23/27] ep_insert(): move creation of wakeup source past the fl_ep_links insertion

2020-10-03 Thread Al Viro
From: Al Viro That's the beginning of preparations for taking f_ep_links out of struct file. If insertion might fail, we will need a new failure exit. Having wakeup source creation done after that point will simplify life there; ep_remove() can (and commonly does) live with NULL epi->ws, so it

[RFC PATCH 25/27] lift rcu_read_lock() into reverse_path_check()

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 78b8769b72dc..8a7ad752befd 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1257,7 +1257,6 @@ static int

[RFC PATCH 07/27] untangling ep_call_nested(): and there was much rejoicing

2020-10-03 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- fs/eventpoll.c | 43 +++ 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 9a6ee5991f3d..8c3b02755a50 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -439,25

[RFC PATCH 14/27] ep_scan_ready_list(): prepare to splitup

2020-10-03 Thread Al Viro
From: Al Viro take the stuff done before and after the callback into separate helpers Signed-off-by: Al Viro --- fs/eventpoll.c | 63 +- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c

[RFC PATCH 13/27] ep_loop_check_proc(): saner calling conventions

2020-10-03 Thread Al Viro
From: Al Viro 1) 'cookie' argument is unused; kill it. 2) 'priv' one is always an epoll struct file, and we only care about its associated struct eventpoll; pass that instead. Signed-off-by: Al Viro --- fs/eventpoll.c | 38 -- 1 file changed, 16

[RFC PATCH 26/27] epoll: massage the check list insertion

2020-10-03 Thread Al Viro
From: Al Viro in the "non-epoll target" cases do it in ep_insert() rather than in do_epoll_ctl(), so that we do it only with some epitem is already guaranteed to exist. Signed-off-by: Al Viro --- fs/eventpoll.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[RFC PATCH 18/27] lift locking/unlocking ep->mtx out of ep_{start,done}_scan()

2020-10-03 Thread Al Viro
From: Al Viro get rid of depth/ep_locked arguments there and document the kludge in ep_item_poll() that has lead to ep_locked existence in the first place Signed-off-by: Al Viro --- fs/eventpoll.c | 57 ++--- 1 file changed, 26

[RFC PATCH 04/27] untangling ep_call_nested(): it's all serialized on epmutex.

2020-10-03 Thread Al Viro
From: Al Viro IOW, * no locking is needed to protect the list * the list is actually a stack * no need to check ->ctx * it can bloody well be a static 5-element array - nobody is going to be accessing it in parallel. Signed-off-by: Al Viro --- fs/eventpoll.c |

[RFC PATCH 01/27] epoll: switch epitem->pwqlist to single-linked list

2020-10-03 Thread Al Viro
From: Al Viro We only traverse it once to destroy all associated eppoll_entry at epitem destruction time. The order of traversal is irrelevant there. Signed-off-by: Al Viro --- fs/eventpoll.c | 51 +-- 1 file changed, 25 insertions(+), 26

[RFC PATCH 03/27] untangling ep_call_nested(): get rid of useless arguments

2020-10-03 Thread Al Viro
From: Al Viro ctx is always equal to current, ncalls - to _loop_ncalls. Signed-off-by: Al Viro --- fs/eventpoll.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 44aca681d897..ef73d71a5dc8 100644 ---

[RFC PATCH 15/27] lift the calls of ep_read_events_proc() into the callers

2020-10-03 Thread Al Viro
From: Al Viro Expand the calls of ep_scan_ready_list() that get ep_read_events_proc(). As a side benefit we can pass depth to ep_read_events_proc() by value and not by address - the latter used to be forced by the signature expected from ep_scan_ready_list() callback. Signed-off-by: Al Viro

[RFC PATCH 17/27] ep_send_events_proc(): fold into the caller

2020-10-03 Thread Al Viro
From: Al Viro ... and get rid of struct ep_send_events_data - not needed anymore. The weird way of passing the arguments in (and real return value out - nominal return value of ep_send_events_proc() is ignored) was due to the signature forced on ep_scan_ready_list() callbacks. Signed-off-by: Al

[RFC][PATCHSET] epoll cleanups

2020-10-03 Thread Al Viro
Locking and especilly control flow in fs/eventpoll.c is overcomplicated. As the result, the code has been hard to follow and easy to fuck up while modifying. The following series attempts to untangle it; there's more to be done there, but this should take care of some of the

Re: Where is the declaration of buffer used in kernel_param_ops .get functions?

2020-10-03 Thread Joe Perches
On Sun, 2020-10-04 at 02:36 +0100, Matthew Wilcox wrote: > On Sat, Oct 03, 2020 at 06:19:18PM -0700, Joe Perches wrote: > > These patches came up because I was looking for > > the location of the declaration of the buffer used > > in kernel/params.c struct kernel_param_ops .get > > functions. > >

arm-linux-gnueabi-ld: drivers/gpu/drm/bridge/sil-sii8620.c:2191: undefined reference to `extcon_register_notifier'

2020-10-03 Thread kernel test robot
Hi Masahiro, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 22fbc037cd32e4e6771d2271b565806cfb8c134c commit: def2fbffe62c00c330c7f41584a356001179c59c kconfig: allow symbols implied by y to become m date: 7

Re: [PATCH v3 5/7] rtc: New driver for RTC in Netronix embedded controller

2020-10-03 Thread Jonathan Neuschäfer
On Fri, Sep 25, 2020 at 07:44:24AM +0200, Uwe Kleine-König wrote: > Hello Jonathan, > > On Thu, Sep 24, 2020 at 09:24:53PM +0200, Jonathan Neuschäfer wrote: > > +#define NTXEC_REG_WRITE_YEAR 0x10 > > +#define NTXEC_REG_WRITE_MONTH 0x11 > > +#define NTXEC_REG_WRITE_DAY0x12 > >

[PATCH v3 10/14] iommu/amd: Refactor fetch_pte to use struct amd_io_pgtable

2020-10-03 Thread Suravee Suthikulpanit
To simplify the fetch_pte function. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/io_pgtable.c | 13 +++-- drivers/iommu/amd/iommu.c | 4 +++- 3 files changed, 11 insertions(+), 8 deletions(-)

[PATCH v3 13/14] iommu/amd: Introduce IOMMU flush callbacks

2020-10-03 Thread Suravee Suthikulpanit
Add TLB flush callback functions, which are used by the IO page table framework. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/io_pgtable.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/iommu/amd/io_pgtable.c

[PATCH v3 11/14] iommu/amd: Introduce iommu_v1_iova_to_phys

2020-10-03 Thread Suravee Suthikulpanit
This implements iova_to_phys for AMD IOMMU v1 pagetable, which will be used by the IO page table framework. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/io_pgtable.c | 22 ++ drivers/iommu/amd/iommu.c | 16 +--- 2 files changed, 23

[PATCH v3 06/14] iommu/amd: Move IO page table related functions

2020-10-03 Thread Suravee Suthikulpanit
Preparing to migrate to use IO page table framework. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 18 ++ drivers/iommu/amd/io_pgtable.c | 473 drivers/iommu/amd/iommu.c | 476

[PATCH v3 14/14] iommu/amd: Adopt IO page table framework

2020-10-03 Thread Suravee Suthikulpanit
Switch to using IO page table framework for AMD IOMMU v1 page table. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/iommu.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index

[PATCH v3 12/14] iommu/amd: Introduce iommu_v1_map_page and iommu_v1_unmap_page

2020-10-03 Thread Suravee Suthikulpanit
These implement map and unmap for AMD IOMMU v1 pagetable, which will be used by the IO pagetable framework. Also clean up unused extern function declarations. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 13 - drivers/iommu/amd/io_pgtable.c | 25

[PATCH v3 09/14] iommu/amd: Rename variables to be consistent with struct io_pgtable_ops

2020-10-03 Thread Suravee Suthikulpanit
There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/io_pgtable.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/amd/io_pgtable.c b/drivers/iommu/amd/io_pgtable.c index

[PATCH v3 02/14] iommu/amd: Prepare for generic IO page table framework

2020-10-03 Thread Suravee Suthikulpanit
Add initial hook up code to implement generic IO page table framework. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/Kconfig | 1 + drivers/iommu/amd/Makefile | 2 +- drivers/iommu/amd/amd_iommu_types.h | 35 +++

[PATCH v3 08/14] iommu/amd: Remove amd_iommu_domain_get_pgtable

2020-10-03 Thread Suravee Suthikulpanit
Since the IO page table root and mode parameters have been moved into the struct amd_io_pg, the function is no longer needed. Therefore, remove it along with the struct domain_pgtable. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 4 ++--

[PATCH v3 05/14] iommu/amd: Declare functions as extern

2020-10-03 Thread Suravee Suthikulpanit
And move declaration to header file so that they can be included across multiple files. There is no functional change. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 3 +++ drivers/iommu/amd/iommu.c | 39 +-- 2 files changed, 22

[PATCH v3 04/14] iommu/amd: Convert to using amd_io_pgtable

2020-10-03 Thread Suravee Suthikulpanit
Make use of the new struct amd_io_pgtable in preparation to remove the struct domain_pgtable. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 1 + drivers/iommu/amd/iommu.c | 25 ++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff

[PATCH v3 01/14] iommu/amd: Re-define amd_iommu_domain_encode_pgtable as inline

2020-10-03 Thread Suravee Suthikulpanit
Move the function to header file to allow inclusion in other files. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 13 + drivers/iommu/amd/iommu.c | 10 -- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git

[PATCH v3 07/14] iommu/amd: Restructure code for freeing page table

2020-10-03 Thread Suravee Suthikulpanit
Introduce amd_iommu_free_pgtable helper function, which consolidates logic for freeing page table. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/io_pgtable.c | 12 +++- drivers/iommu/amd/iommu.c | 19 ++- 3 files

[PATCH v3 00/14] iommu/amd: Add Generic IO Page Table Framework Support

2020-10-03 Thread Suravee Suthikulpanit
The framework allows callable implementation of IO page table. This allows AMD IOMMU driver to switch between different types of AMD IOMMU page tables (e.g. v1 vs. v2). This series refactors the current implementation of AMD IOMMU v1 page table to adopt the framework. There should be no

[PATCH v3 03/14] iommu/amd: Move pt_root to to struct amd_io_pgtable

2020-10-03 Thread Suravee Suthikulpanit
To better organize the data structure since it contains IO page table related information. Signed-off-by: Suravee Suthikulpanit --- drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/amd_iommu_types.h | 2 +- drivers/iommu/amd/iommu.c | 2 +- 3 files changed, 3

[PATCH] tools: memory-model: Document that the LKMM can easily miss control dependencies

2020-10-03 Thread Alan Stern
Add a small section to the litmus-tests.txt documentation file for the Linux Kernel Memory Model explaining that the memory model often fails to recognize certain control dependencies. Suggested-by: Akira Yokosawa Signed-off-by: Alan Stern ---

Re: Where is the declaration of buffer used in kernel_param_ops .get functions?

2020-10-03 Thread Matthew Wilcox
On Sat, Oct 03, 2020 at 06:19:18PM -0700, Joe Perches wrote: > These patches came up because I was looking for > the location of the declaration of the buffer used > in kernel/params.c struct kernel_param_ops .get > functions. > > I didn't find it. > > I want to see if it's appropriate to

Re: [External] [RFC] Documentation: Add documentation for new performance_profile sysfs class

2020-10-03 Thread Mark Pearson
Hi Hans, On 2020-10-03 9:19 a.m., Hans de Goede wrote: On modern systems CPU/GPU/... performance is often dynamically configurable in the form of e.g. variable clock-speeds and TPD. The performance is often automatically adjusted to the load by some automatic-mechanism (which may very well live

Where is the declaration of buffer used in kernel_param_ops .get functions?

2020-10-03 Thread Joe Perches
These patches came up because I was looking for the location of the declaration of the buffer used in kernel/params.c struct kernel_param_ops .get functions. I didn't find it. I want to see if it's appropriate to convert the sprintf family of functions used in these .get functions to sysfs_emit.

[PATCH 3/8] staging: rtl8723bs: replace _RND8 with round_up()

2020-10-03 Thread Ross Schmidt
Use round_up instead of inline _RND8. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c| 2 +- drivers/staging/rtl8723bs/include/osdep_service.h | 11 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git

[PATCH 8/8] staging: rtl8723bs: replace _cancel_timer with del_timer_sync

2020-10-03 Thread Ross Schmidt
Replace _cancel_timer with API function del_timer_sync. One instance of del_timer_sync is moved and an unnecessary pair of spin locks are removed. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +-- drivers/staging/rtl8723bs/core/rtw_mlme.c| 16

[PATCH 6/8] staging: rtl8723bs: replace RTW_GET_LE16 with get_unaligned_le16

2020-10-03 Thread Ross Schmidt
Replace RTW_GET_LE16 macro with get_unaligned_le16. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_ap.c | 5 +++-- drivers/staging/rtl8723bs/core/rtw_ieee80211.c| 4 ++-- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 7 ---

[PATCH 4/8] staging: rtl8723bs: remove unused macros

2020-10-03 Thread Ross Schmidt
Remove several macros in osdep_service.h because they are not used. Signed-off-by: Ross Schmidt --- .../staging/rtl8723bs/include/osdep_service.h | 57 --- 1 file changed, 57 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h

[PATCH 5/8] staging: rtl8723bs: replace RTW_GET_BE24 with get_unaligned_be24

2020-10-03 Thread Ross Schmidt
Replace RTW_GET_BE24 macro with get_unaligned_be24. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c| 3 ++- drivers/staging/rtl8723bs/include/osdep_service.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 2/8] staging: rtl8723bs: replace _RND4 with round_up()

2020-10-03 Thread Ross Schmidt
Use round_up instead of inline _RND4. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +- drivers/staging/rtl8723bs/include/osdep_service.h | 11 --- 3 files changed, 2 insertions(+), 13

[PATCH 1/8] staging: rtl8723bs: replace RND4 with round_up()

2020-10-03 Thread Ross Schmidt
Use round_up instead of define RND4. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_security.c | 6 +++--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 4 ++-- drivers/staging/rtl8723bs/hal/sdio_ops.c | 6 +++---

Re: [PATCH] MIPS: cevt-r4k: Enable intimer for Loongson64 CPUs with extimer

2020-10-03 Thread Jiaxun Yang
于 2020年10月2日 GMT+08:00 下午9:27:21, Thomas Bogendoerfer 写到: >On Wed, Sep 23, 2020 at 07:02:54PM +0800, Jiaxun Yang wrote: >> >> +#ifdef CONFIG_CPU_LOONGSON64 >> +static int c0_compare_int_enable(struct clock_event_device *cd) >> +{ >> +if (cpu_has_extimer) >> +

[PATCH 7/8] staging: rtl8723bs: replace RTW_GET_BE16 with get_unaligned_be16

2020-10-03 Thread Ross Schmidt
Replace RTW_GET_BE16 macro with get_unlaligned_be16. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c| 4 ++-- drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++- drivers/staging/rtl8723bs/include/osdep_service.h | 2 --

  1   2   3   4   5   >